Skip to content

Commit

Permalink
forall and exists operators (Doenet#1980)
Browse files Browse the repository at this point in the history
  • Loading branch information
dqnykamp authored Mar 7, 2023
1 parent 4ad07cf commit 6b9db14
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
33 changes: 32 additions & 1 deletion cypress/e2e/DoenetML/equality/mathexpressions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,6 @@ describe('Math expressions equality tests', function () {
symbolicSimplifyEqual: false,
symbolicSimplifyExpandEqual: false,
},

{
expr1: 'linesegment(A,B)',
expr2: 'linesegment(B,A)',
Expand All @@ -870,6 +869,38 @@ describe('Math expressions equality tests', function () {
symbolicSimplifyEqual: true,
symbolicSimplifyExpandEqual: true,
},
{
expr1: '<math>exists x elementof A union B</math>',
expr2: '<math>exists x elementof B union A</math>',
equal: true,
symbolicEqual: false,
symbolicSimplifyEqual: true,
symbolicSimplifyExpandEqual: true,
},
{
expr1: '<math format="latex">\\exists x \\in A \\cup B</math>',
expr2: '<math format="latex">\\exists x \\in B \\cup A</math>',
equal: true,
symbolicEqual: false,
symbolicSimplifyEqual: true,
symbolicSimplifyExpandEqual: true,
},
{
expr1: '<math>forall x elementof A intersect B</math>',
expr2: '<math>forall x elementof B intersect A</math>',
equal: true,
symbolicEqual: false,
symbolicSimplifyEqual: true,
symbolicSimplifyExpandEqual: true,
},
{
expr1: '<math format="latex">\\forall x \\in A \\cap B</math>',
expr2: '<math format="latex">\\forall x \\in B \\cap A</math>',
equal: true,
symbolicEqual: false,
symbolicSimplifyEqual: true,
symbolicSimplifyExpandEqual: true,
},

]

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"json-stringify-deterministic": "^1.0.1",
"lodash.debounce": "^4.0.8",
"lorem-ipsum": "^2.0.4",
"math-expressions": "^2.0.0-alpha58",
"math-expressions": "^2.0.0-alpha59",
"nanoid": "^3.1.31",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/Viewer/core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Viewer/renderers/mathInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export default function MathInput(props) {
latex={rendererValue.current}
config={{
autoCommands:
'alpha beta gamma delta epsilon zeta eta mu nu xi omega rho sigma tau phi chi psi omega iota kappa lambda Gamma Delta Xi Omega Sigma Phi Psi Omega Lambda sqrt pi Pi theta Theta integral infinity',
'alpha beta gamma delta epsilon zeta eta mu nu xi omega rho sigma tau phi chi psi omega iota kappa lambda Gamma Delta Xi Omega Sigma Phi Psi Omega Lambda sqrt pi Pi theta Theta integral infinity forall exists',
autoOperatorNames:
'arg deg det dim exp gcd hom ker lg lim ln log max min' +
' Pr' +
Expand Down

0 comments on commit 6b9db14

Please sign in to comment.