I will need some help interpreting that. Here's my attempt: >>> f = eq = ITE(x<1,x,Eq(y,1)).to_nnf(); eq (x∨x≥1)∧(y=1∨x<1)(x∨x≥1)∧(y=1∨x<1) >>> eq.subs(x, 0) False >>> eq.subs(x, 1) y = 1
I'm not sure how I am supposed to add these mod 2. Maybe `(0 + ITE(Eq(y,1), 1, 0)) % 2`? So does x change the value of f? The answer depends on y, doesn't it? If y is 0 then the value of x doesn't change f but it it is 1 then it does. So is the derivative wrt x `Eq(y, 1)`? On Tuesday, September 19, 2017 at 4:06:04 PM UTC-5, brombo wrote: > On 09/19/2017 04:24 PM, Aaron Meurer wrote: > > I'm not sure the derivative really makes sense. I would either error > > or leave it unevaluated. > > > > Aaron Meurer > > > > On Tue, Sep 19, 2017 at 9:19 AM, Chris Smith <[email protected] > <javascript:>> wrote: > >> In PR #13204 I encountered the question of what to do with the > derivative if > >> a Boolean. A Boolean is true or false but may contain expressions > within > >> relationals, For example, `x**2 < y` depends on x and y but the Boolean > >> value is a "square wave" for this relational. Does a derivative wrt x > or y > >> even make sense? Should an error, 0 or something else be done for a > return > >> value? > >> > >> /c > >> > >> -- > >> 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] <javascript:>. > >> To post to this group, send email to [email protected] > <javascript:>. > >> Visit this group at https://groups.google.com/group/sympy. > >> To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/sympy/13fc1fdc-caba-4336-a7df-148efa2f716a%40googlegroups.com. > > > >> For more options, visit https://groups.google.com/d/optout. > > > See link - > > https://www.encyclopediaofmath.org/index.php/Boolean_differential_calculus > > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/2364638a-ed60-4a6d-aa09-af6b9f738a01%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
