[6/24]: rework assumptions to use FactRules (Basic)
commit8bf95bf21b5e2ec3b0b14b9933a3ccaa81ee3432
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Fri, 25 Jul 2008 18:03:06 +0000 (25 22:03 +0400)
committerKirill Smelkov <kirr@landau.phys.spbu.ru>
Fri, 25 Jul 2008 18:03:06 +0000 (25 22:03 +0400)
tree1f92bf88696bca312d8843b37dd93b13d2bc9d85
parentf1f09e6d44c2b4ec6a5b76da5560eb05062c3eb1
[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>
sympy/core/basic.py