You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Compute Engine doesn't recognize the precedence of the logical operations.
Steps to Reproduce
Write some propositions with logical connectives in a mathfield, such as:
3=4\vee 7=8
A\subseteq B\wedge\emptyset\subset B
Actual Behavior
These propositions renders to the following MathJSON:
["Equal",3,["And",["Error",["ErrorCode","'incompatible-domain'","Booleans","PositiveIntegers"],4],["Error",["ErrorCode","'incompatible-domain'","Booleans","PositiveIntegers"],5]],7]
["SubsetEqual","A",["Subset",["And","B",["Error",["ErrorCode","'incompatible-domain'","Booleans","Sets"],"EmptySet"]],"B"]]
An error occurs because the Compute Engine reads all these propositions as simple propositions and not compound ones. So it find the first relational symbol and expects to find a noun to the left of it and a noun to the right it.
To note - adding parentheses "solves" the problem and the MathJSON is as above. But the paraentheses in these cases a superfluous - even without them these are still WFF's; these propositions cannot be interpreted in any other way - that is why the parentheses are not needed, and the Compute Engine should have read them accordingly.
Environment
I have never checked if this worked in the past. Did this with the latest version of mathlive in the demo page and adding to the developer console this code:
formula._mathfield.getValue("math-json")
The text was updated successfully, but these errors were encountered:
Description
The Compute Engine doesn't recognize the precedence of the logical operations.
Steps to Reproduce
Write some propositions with logical connectives in a mathfield, such as:
3=4\vee 7=8
A\subseteq B\wedge\emptyset\subset B
Actual Behavior
These propositions renders to the following MathJSON:
["Equal",3,["And",["Error",["ErrorCode","'incompatible-domain'","Booleans","PositiveIntegers"],4],["Error",["ErrorCode","'incompatible-domain'","Booleans","PositiveIntegers"],5]],7]
["SubsetEqual","A",["Subset",["And","B",["Error",["ErrorCode","'incompatible-domain'","Booleans","Sets"],"EmptySet"]],"B"]]
Expected Behavior
["Or",["Equal",3,4],["Equal",7,8]]
["And",["SubsetEqual","A","B"],["Subset","EmptySet","B"]]
An error occurs because the Compute Engine reads all these propositions as simple propositions and not compound ones. So it find the first relational symbol and expects to find a noun to the left of it and a noun to the right it.
To note - adding parentheses "solves" the problem and the MathJSON is as above. But the paraentheses in these cases a superfluous - even without them these are still WFF's; these propositions cannot be interpreted in any other way - that is why the parentheses are not needed, and the Compute Engine should have read them accordingly.
Environment
I have never checked if this worked in the past. Did this with the latest version of mathlive in the demo page and adding to the developer console this code:
formula._mathfield.getValue("math-json")
The text was updated successfully, but these errors were encountered: