Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raydsameshima/97c2097a3fdeec41c46af0d828ea1efa to your computer and use it in GitHub Desktop.
Save raydsameshima/97c2097a3fdeec41c46af0d828ea1efa to your computer and use it in GitHub Desktop.
2 by 2 example of Moon's formula
(%i12) a: (-s11+r11+r12)*(-s22+r21+r22)-s12*s21;
(%o12) ((- s11) + r12 + r11) ((- s22) + r22 + r21) - s12 s21
(%i13) b: (r12*r21-s12*s21) + (r21*(r11-s11)+ r12*(r22-s22)) + (r11-s11)*(r22-s22);
(%o13) (r11 - s11) (r22 - s22) + r12 (r22 - s22) - s12 s21 + r21 (r11 - s11)
+ r12 r21
(%i14) is(a=b);
(%o14) false
(%i15) a-b, expand;
(%o15) 0
(%i16) is(ev(a=b, expand));
(%o16) true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment