simplifyAssertEq(e0 * e0, e0)
${{{{e_{0}}}} {{{e_{0}}}}} = {{e_{0}}}$
GOOD
time: 1.649000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq(e1 * e1, -e0)
${{{{e_{1}}}} {{{e_{1}}}}} = {-{{e_{0}}}}$
GOOD
time: 4.977000ms
stack: size: 11
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy

simplifyAssertEq(e1 * e2, e3)
${{{{e_{1}}}} {{{e_{2}}}}} = {{e_{3}}}$
GOOD
time: 1.401000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq(e2 * e1, -e3)
${{{{e_{2}}}} {{{e_{1}}}}} = {-{{e_{3}}}}$
GOOD
time: 1.984000ms
stack: size: 11
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy
zero-associator
simplifyAssertEq((e1 * e2) * e3, -e0)
${{{{{{e_{1}}}} {{{e_{2}}}}}} {{{e_{3}}}}} = {-{{e_{0}}}}$
GOOD
time: 1.861000ms
stack: size: 11
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy

simplifyAssertEq(e1 * (e2 * e3), -e0)
${{{{e_{1}}}} {{{{{e_{2}}}} {{{e_{3}}}}}}} = {-{{e_{0}}}}$
GOOD
time: 2.204000ms
stack: size: 11
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy
nonzero associator
simplifyAssertEq((e1 * e2) * e4, e7)
${{{{{{e_{1}}}} {{{e_{2}}}}}} {{{e_{4}}}}} = {{e_{7}}}$
GOOD
time: 0.676000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq(e1 * (e2 * e4), -e7)
${{{{e_{1}}}} {{{{{e_{2}}}} {{{e_{4}}}}}}} = {-{{e_{7}}}}$
GOOD
time: 1.892000ms
stack: size: 11
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy

simplifyAssertEq( (var'a' * e1) * var'a', var'a'^2 * e1)
${{{a}} {{{e_{1}}}} {{a}}} = {{{{a}^{2}}} {{{e_{1}}}}}$
GOOD
time: 7.143000ms
stack: size: 10
  • Init
  • Prune
  • ^:Expand:integerPower
  • Expand
  • +:Prune:combineConstants
  • *:Prune:combinePows
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq( (var'a' * e1 * e2) * var'a', var'a'^2 * e3)
${{{a}} {{{{{e_{1}}}} {{{e_{2}}}}}} {{a}}} = {{{{a}^{2}}} {{{e_{3}}}}}$
GOOD
time: 7.204000ms
stack: size: 10
  • Init
  • Prune
  • ^:Expand:integerPower
  • Expand
  • +:Prune:combineConstants
  • *:Prune:combinePows
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq( var'a' * (var'a' * e1 * e2) , var'a'^2 * e3)
${{{a}} {{a}} {{{{{e_{1}}}} {{{e_{2}}}}}}} = {{{{a}^{2}}} {{{e_{3}}}}}$
GOOD
time: 5.793000ms
stack: size: 10
  • Init
  • Prune
  • ^:Expand:integerPower
  • Expand
  • +:Prune:combineConstants
  • *:Prune:combinePows
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq( (var'a' * e1 * e2) * e4, var'a' * e7 )
${{{a}} {{{{{e_{1}}}} {{{e_{2}}}}}} {{{e_{4}}}}} = {{{a}} {{{e_{7}}}}}$
GOOD
time: 3.008000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy
with coefficients:
simplifyAssertEq((var'a' * e1 * e2) * e4, var'a' * e7)
${{{a}} {{{{{e_{1}}}} {{{e_{2}}}}}} {{{e_{4}}}}} = {{{a}} {{{e_{7}}}}}$
GOOD
time: 2.578000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

simplifyAssertEq(((e1 + e2) * e2)(), e3 - e0)
${{-{{e_{0}}}} + {{e_{3}}}} = {{{e_{3}}}{-{{e_{0}}}}}$
GOOD
time: 5.292000ms
stack: size: 12
  • Init
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • +:Factor:apply
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy

simplifyAssertEq(((e1 + e2) * e2) * e2, -e1 - e2)
${{{{{\left({{{e_{1}}} + {{e_{2}}}}\right)}} {{{e_{2}}}}}} {{{e_{2}}}}} = {{-{{e_{1}}}}{-{{e_{2}}}}}$
GOOD
time: 14.036000ms
stack: size: 27
  • Init
  • unm:Prune:doubleNegative
  • unm:Prune:doubleNegative
  • Prune
  • Expand
  • Prune
  • unm:Prune:doubleNegative
  • +:Prune:combineConstants
  • unm:Prune:doubleNegative
  • +:Prune:combineConstants
  • +:Factor:apply
  • Factor
  • Prune
  • *:Expand:apply
  • Expand
  • Prune
  • unm:Prune:doubleNegative
  • +:Prune:combineConstants
  • unm:Prune:doubleNegative
  • +:Prune:combineConstants
  • +:Factor:apply
  • Factor
  • Prune
  • Constant:Tidy:apply
  • *:Tidy:apply
  • *:Tidy:apply
  • Tidy
assert that we are moving commutative scalars to the left
assert.eq(true, Expression.__eq((2 * e0)(), 2 * e0))
GOOD time: 0.649000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

assert.eq(true, Expression.__eq((e0 * 2)(), 2 * e0))
GOOD time: 0.963000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

assert.eq(false, Expression.__eq((2 * e0)(), e0 * 2))
GOOD time: 0.793000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

assert.eq( (e0 * 2)(), (2 * e0)() )
GOOD time: 1.925000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

assert.eq(true, Expression.__eq( (var'a' * e0)(), (e0 * var'a')() ))
GOOD time: 0.977000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

assert.eq( (e0 * var'a')(), (var'a' * e0)() )
GOOD time: 0.830000ms
stack: size: 7
  • Init
  • Prune
  • Expand
  • Prune
  • Factor
  • Prune
  • Tidy

local a = var'a' a.mulNonCommutative = true
local b = var'b' b.mulNonCommutative = true
printbr((a * e0 + b * e1)())
printbr((e0 * a + e1 * b)())
assert.eq(false, Expression.__eq( (a * e0 + b * e1)(), (e0 * a + e1 * b)() ))
${{{a}} {{{e_{0}}}}} + {{{b}} {{{e_{1}}}}}$
${{{{e_{0}}}} {{a}}} + {{{{e_{1}}}} {{b}}}$
GOOD
time: 9.232000ms
stack: size: 8
  • Init
  • Prune
  • Expand
  • Prune
  • +:Factor:apply
  • Factor
  • Prune
  • Tidy

local a = var'a' a.mulNonCommutative = true
local b = var'b' b.mulNonCommutative = true
printbr(a * e0 + b * e1)
printbr(e0 * a + e1 * b)
assert.ne(a * e0 + b * e1, e0 * a + e1 * b)
${{{a}} {{{e_{0}}}}} + {{{b}} {{{e_{1}}}}}$
${{{{e_{0}}}} {{a}}} + {{{{e_{1}}}} {{b}}}$
GOOD
time: 0.608000ms
stack: size: 0

    local a = var'a'
    local b = var'b'
    printbr(a * e0 + b * e1)
    printbr(e0 * a + e1 * b)
    assert.eq(a * e0 + b * e1, e0 * a + e1 * b)
    ${{{a}} {{{e_{0}}}}} + {{{b}} {{{e_{1}}}}}$
    ${{{{e_{0}}}} {{a}}} + {{{{e_{1}}}} {{b}}}$
    GOOD
    time: 0.419000ms
    stack: size: 0

      local a = var'a' a.mulNonCommutative = true
      local b = var'b' b.mulNonCommutative = true
      assert.eq(true, Expression.__eq( (a * e0 + b * e1)(), a * e0 + b * e1 ))
      GOOD time: 1.544000ms
      stack: size: 8
      • Init
      • Prune
      • Expand
      • Prune
      • +:Factor:apply
      • Factor
      • Prune
      • Tidy

      local a = var'a' a.mulNonCommutative = true
      local b = var'b' b.mulNonCommutative = true
      printbr((e0 * a + e1 * b)())
      assert.eq(true, Expression.__eq( (e0 * a + e1 * b)(), e0 * a + e1 * b ))
      ${{{{e_{0}}}} {{a}}} + {{{{e_{1}}}} {{b}}}$
      GOOD
      time: 3.470000ms
      stack: size: 8
      • Init
      • Prune
      • Expand
      • Prune
      • +:Factor:apply
      • Factor
      • Prune
      • Tidy

      local a,b = vars('a', 'b')
      simplifyAssertEq((2 * a + 2 * b) / 2, a + b)
      ${{\frac{1}{2}}{\left({{{{2}} {{a}}} + {{{2}} {{b}}}}\right)}} = {{a} + {b}}$
      GOOD
      time: 6.239000ms
      stack: size: 8
      • Init
      • Prune
      • Expand
      • Prune
      • +:Factor:apply
      • Factor
      • Prune
      • Tidy

      local a,b = vars('a', 'b')
      simplifyAssertEq((2 * a * e0 + 2 * b * e1) / 2, a * e0 + b * e1)
      ${{\frac{1}{2}}{\left({{{{2}} {{a}} {{{e_{0}}}}} + {{{2}} {{b}} {{{e_{1}}}}}}\right)}} = {{{{a}} {{{e_{0}}}}} + {{{b}} {{{e_{1}}}}}}$
      GOOD
      time: 7.868000ms
      stack: size: 8
      • Init
      • Prune
      • Expand
      • Prune
      • +:Factor:apply
      • Factor
      • Prune
      • Tidy

      simplifyAssertEq((2 * e0 + 2 * e1) / 2, e0 + e1)
      ${{\frac{1}{2}}{\left({{{{2}} {{{e_{0}}}}} + {{{2}} {{{e_{1}}}}}}\right)}} = {{{e_{0}}} + {{e_{1}}}}$
      GOOD
      time: 5.790000ms
      stack: size: 8
      • Init
      • Prune
      • Expand
      • Prune
      • +:Factor:apply
      • Factor
      • Prune
      • Tidy