Closed DavePearce closed 7 years ago
Fixing that rule causes these tests to now fail:
Test_List_18 Test_Set_16 Test_Set_26
Which seems odd ... !
Right, so actually I need both rules for this to work. That's because Sum_2
will reduce Sum[0.0,{|Mul[0.0,{|LengthOf(X)|}]|}]
to LengthOf(X)
. However, in the above example, this rule wouldn't apply as we had a negative length (i.e. 0 == -1*|X|
).
An alternative to having both rules would be to normalise equations of the form 0 == -x
to be 0 == x
. Curiously, I thought the rule Equation_Gcd_1
should do that already?
... no, because gcd always returns a positive number.
Currently, the following code fails to verify:
The reason being simply that we end up with this:
Here, we want the
Equation
to be reformulated as anEquals
. Currently we can get back from anEquation
to anEquals
as follows:But, this rule doesn't apply here...
... hmmm, ok so that rule is broken as it should never apply.