On Sat, 13 Mar 2021 at 07:01, JSS95 <[email protected]> wrote: > > > Why (briefly) is it not possible for Eq to work here? > > That's because inference system in assumptions module requires the boolean > function as object, not type. > > Known facts such as "x being real number implies x being complex number" is > registered in assumptions/ask module as Implies(Q.real, Q.complex). If we > want to express "x > y implies both x and y being real number" with this > system, we need something like Implies(Q.gt, AllArgs(Q.real)) which is > applied to Tuple(x, y). These boldface objects play the role of composite > function, which requires boolean functions as objects. We cannot do > Implies(Gt, AllArgs(Q.real)) because Gt is a type and thus cannot be the > argument of Implies(). > > This is why we need Q.eq, Q.lt, and other predicates to represent Eq, Lt, etc > in assumption system.
I guess if these are just being used to express the internal rules of the assumptions system then that's fine. I wonder though if it would also make sense for Eq to have an internal representation that is like `Relational(Eq, x, y)` as well. Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxRhd%2Bu_ApzrpYBUnNFhsC2OrDX6Pd01mNuOpWEPEGRyWw%40mail.gmail.com.
