[6/24]: rework assumptions to use FactRules (Basic)
Rework Basic to use new assumptions interface. In particular:
- ._assumptions are initially created in shared state - i.e. in the hope that
they will not differ from class.default_assumptions
- Basic.__getattr__ is reworked to call ._what_known_about() and to act as a
upper-level cache (earlier caching was done in ._what_known_about equivalent,
but the soon we hit the cache - the better)
Also, add a note that there are a *lot* of Add/Mul creations with the only
'assumption' commutative=True.
This slows things down, and frankly commutative is not an assumptions - it's
like a type characteristic - so I hope we'll deal with it some day.
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <ondrej@certik.cz>
Signed-off-by: Mateusz Paprocki <mattpap@gmail.com>