On Wed, Feb 10, 2021 at 1:44 PM Oscar Benjamin <oscar.j.benja...@gmail.com> wrote:
> On Wed, 10 Feb 2021 at 20:24, Aaron Meurer <asmeu...@gmail.com> wrote: > > > > On Wed, Feb 10, 2021 at 6:47 AM David Bailey <d...@dbailey.co.uk> wrote: > >> > >> On 10/02/2021 00:53, Oscar Benjamin wrote: > >> > >> On Tue, 9 Feb 2021 at 23:58, S.Y. Lee <sylee...@gmail.com> wrote: > >> > >> > >> And we would also arrive in questions like: If equation brings its own > algebra system, there should be an equation of equations? How should we > solve them? > >> > >> It's not an "algebra system": it's just a few convenience operations. > >> It should not be confused with allowing Equation to be used in places > >> where Expr is expected. > >> > >> Might it be an idea to introduce functions such as AddSides, > SubtractSides, etc that Mathematica has? Not only would these avoid any > confusion with the normal arithmetic operations, but I think using these > functions would clarify what is going on. After all, when people do such > operations by hand, they don't write (a=b)*k,or whatever, they typically > write "Multiplying equation 4 by k we get..." > > > > > > Is there a need to have an unevaluated version of AddSides? + already > works for an evaluated version. > > > > It might be worth thinking about inequalities in the design here. We've > been ignoring them because it's simpler to do equalities first, but > inequalities have some restrictions that might clarify what design we want. > For a > b, things like function application or even multiplication aren't > straightforward. What should x*(a > b) do if x is only known to be real? > One option is a Piecewise, but then things get hairy if you start doing > other operations. Maybe a MultiplySides does actually make sense for this. > > See also these two links: > https://github.com/sympy/sympy/pull/20723#issuecomment-763975854 > https://github.com/sympy/sympy/pull/17097 > > Yes, DivideSides would make sense for unevaluated division of inequalities > etc. > > That is not inconsistent with using + though: We can use eq1+eq2 as a > shorthand for the evaluated form of AddSides(eq1, eq2). For equations > that would always be able to evaluate. In Mathematica this is all > organised around making Boolean expressions that can evaluate after > substitution. > We can generalize this to applying any function to equations or inequalities. For equations, it matters where the function either isn't defined (like y=0 for f(x, y) = x/y), or isn't well-defined (for example, square roots are multivalued). For inequalities it matters on what parts of the domain the function is (strictly) monotonic. Except I don't know if SymPy can really answer either of these questions right now. So this might have to remain only a theoretical idea for the time being. Aaron Meurer > > > 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 sympy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CAHVvXxTAAA%3DHDaNA4-HU%2BqFV34nF7GfA7GbHn_HzVWgu0Epr6w%40mail.gmail.com > . > -- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BKckP1oKFc3PhSoMN96FFU%2B_jxybGgD9DPpENdPNEE3A%40mail.gmail.com.