[9/24]: rework assumptions.py to use FactRules   (BasicMeta stores derived assumptions back)
[9/24]: rework assumptions.py to use FactRules   (BasicMeta stores derived assumptions back)

Teach BasicMeta to store newly derived assumptions back into class as class
attribute.

This speeds things up, consider:

    class Integer(Rational):
        is_integer  = True


BasicMeta will then infere that is_irrational = False  (some previous patch),
and will store it as Integer attribute:

    Integer.is_irrational = False


Then when Integer.is_irrational will be accessed, the result will be obtained very fast:

    %timeit a.is_irrational     -> 20 us (without this optimization)
    %timeit a.is_irrational     ->  2 us (with    this optimization)


This may not be that important since the overal effect of this change is hidden
under our Add/Mul slowness, but:


    *****************************************************************************************
    * The patch itself contains a hint how one could speedup _all_ attribute access by x2.5 *
    *****************************************************************************************

I think this is important.


Signed-off-by: Kirill Smelkov <b0eeaac46e675e9f95bf68c0df1041cf581c26f4@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <b816faa87b7d35274d2e545c5be11ed4376f3ccf@certik.cz>
Signed-off-by: Mateusz Paprocki <4e51c28eba28c1534bcc4a6bd2cccd314d8bf749@gmail.com>

sunny94/temp,Mitchkoens/sympy,kmacinnis/sympy,sahmed95/sympy,atsao72/sympy,pbrady/sympy,wanglongqi/sympy,liangjiaxing/sympy,farhaanbukhsh/sympy,madan96/sympy,cccfran/sympy,shipci/sympy,sahilshekhawat/sympy,amitjamadagni/sympy,maniteja123/sympy,minrk/sympy,postvakje/sympy,sahilshekhawat/sympy,emon10005/sympy,kumarkrishna/sympy,jbaayen/sympy,abloomston/sympy,shipci/sympy,diofant/diofant,MridulS/sympy,shikil/sympy,Davidjohnwilson/sympy,Titan-C/sympy,wyom/sympy,chaffra/sympy,AunShiLord/sympy,farhaanbukhsh/sympy,pandeyadarsh/sympy,oliverlee/sympy,drufat/sympy,Gadal/sympy,kmacinnis/sympy,pandeyadarsh/sympy,kaushik94/sympy,vipulroxx/sympy,ga7g08/sympy,hrashk/sympy,jaimahajan1997/sympy,dqnykamp/sympy,meghana1995/sympy,jerli/sympy,kumarkrishna/sympy,iamutkarshtiwari/sympy,madan96/sympy,sunny94/temp,Vishluck/sympy,Shaswat27/sympy,shipci/sympy,ahhda/sympy,Designist/sympy,Titan-C/sympy,jbbskinny/sympy,bukzor/sympy,Vishluck/sympy,Gadal/sympy,Gadal/sympy,Curious72/sympy,yukoba/sympy,lidavidm/sympy,AunShiLord/sympy,cswiercz/sympy,cccfran/sympy,dqnykamp/sympy,skidzo/sympy,VaibhavAgarwalVA/sympy,mcdaniel67/sympy,debugger22/sympy,Arafatk/sympy,kumarkrishna/sympy,jbbskinny/sympy,sahilshekhawat/sympy,jbbskinny/sympy,mcdaniel67/sympy,beni55/sympy,wanglongqi/sympy,atreyv/sympy,moble/sympy,hazelnusse/sympy-old,rahuldan/sympy,AkademieOlympia/sympy,debugger22/sympy,mafiya69/sympy,iamutkarshtiwari/sympy,drufat/sympy,MridulS/sympy,liangjiaxing/sympy,MechCoder/sympy,lidavidm/sympy,asm666/sympy,saurabhjn76/sympy,srjoglekar246/sympy,atreyv/sympy,kmacinnis/sympy,grevutiu-gabriel/sympy,ChristinaZografou/sympy,Arafatk/sympy,pbrady/sympy,lindsayad/sympy,VaibhavAgarwalVA/sympy,saurabhjn76/sympy,ChristinaZografou/sympy,meghana1995/sympy,meghana1995/sympy,cswiercz/sympy,mafiya69/sympy,jamesblunt/sympy,sampadsaha5/sympy,maniteja123/sympy,hrashk/sympy,Vishluck/sympy,toolforger/sympy,sahmed95/sympy,hargup/sympy,atreyv/sympy,madan96/sympy,asm666/sympy,Sumith1896/sympy,toolforger/sympy,garvitr/sympy,aktech/sympy,Curious72/sympy,abloomston/sympy,AunShiLord/sympy,KevinGoodsell/sympy,Shaswat27/sympy,sampadsaha5/sympy,jamesblunt/sympy,VaibhavAgarwalVA/sympy,amitjamadagni/sympy,souravsingh/sympy,yukoba/sympy,Curious72/sympy,MechCoder/sympy,minrk/sympy,Shaswat27/sympy,AkademieOlympia/sympy,ChristinaZografou/sympy,ahhda/sympy,rahuldan/sympy,ahhda/sympy,garvitr/sympy,Designist/sympy,farhaanbukhsh/sympy,yashsharan/sympy,Designist/sympy,pbrady/sympy,AkademieOlympia/sympy,jamesblunt/sympy,rahuldan/sympy,Sumith1896/sympy,Davidjohnwilson/sympy,ga7g08/sympy,wyom/sympy,kevalds51/sympy,Arafatk/sympy,moble/sympy,hargup/sympy,kaichogami/sympy,toolforger/sympy,emon10005/sympy,mcdaniel67/sympy,ga7g08/sympy,vipulroxx/sympy,emon10005/sympy,cccfran/sympy,fperez/sympy,drufat/sympy,yukoba/sympy,skidzo/sympy,tovrstra/sympy,mattpap/sympy-polys,flacjacket/sympy,wanglongqi/sympy,oliverlee/sympy,atsao72/sympy,bukzor/sympy,sunny94/temp,aktech/sympy,hargup/sympy,oliverlee/sympy,yashsharan/sympy,jaimahajan1997/sympy,grevutiu-gabriel/sympy,moble/sympy,Mitchkoens/sympy,kaushik94/sympy,beni55/sympy,skirpichev/omg,jerli/sympy,dqnykamp/sympy,atsao72/sympy,lindsayad/sympy,MechCoder/sympy,postvakje/sympy,pandeyadarsh/sympy,kaichogami/sympy,wyom/sympy,mafiya69/sympy,Titan-C/sympy,garvitr/sympy,liangjiaxing/sympy,kaushik94/sympy,debugger22/sympy,asm666/sympy,saurabhjn76/sympy,Mitchkoens/sympy,maniteja123/sympy,kevalds51/sympy,MridulS/sympy,hrashk/sympy,souravsingh/sympy,jaimahajan1997/sympy,skidzo/sympy,kevalds51/sympy,yashsharan/sympy,abloomston/sympy,abhiii5459/sympy,jerli/sympy,Sumith1896/sympy,lindsayad/sympy,kaichogami/sympy,shikil/sympy,abhiii5459/sympy,sahmed95/sympy,iamutkarshtiwari/sympy,beni55/sympy,bukzor/sympy,postvakje/sympy,ryanGT/sympy,vipulroxx/sympy,chaffra/sympy,hazelnusse/sympy-old,chaffra/sympy,aktech/sympy,Davidjohnwilson/sympy,abhiii5459/sympy,souravsingh/sympy,pernici/sympy,cswiercz/sympy,shikil/sympy,sampadsaha5/sympy,lidavidm/sympy,grevutiu-gabriel/sympy