Blame view

Giac_maj/epsilon-giac/poincare/src/simplify/rules.pr 1.08 KB
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  Addition(Addition(a*),b*)->Addition(a*,b*);
  Addition(Integer.a,Integer.b)->$AddIntegers(a,b);
  Addition(Integer.a,Integer.b,c*)->Addition($AddIntegers(a,b),c*);
  
  Subtraction(a,b)->Addition(a,Multiplication(b,Integer[-1]));
  Addition(a, Multiplication(a,Integer[-1]))->Integer[0];
  Addition(a, Multiplication(a,Integer[-1]), b)->b;
  Addition(a, Multiplication(a,Integer[-1]), b, c*)->Addition(b,c*);
  
  Addition(a,a,b*)->Addition(Multiplication(a,Integer[2]),b*);
  Addition(a,Multiplication(a,b),c*)->Addition(Multiplication(a,Addition(b,Integer[1])),c*);
  Addition(Multiplication(a,b),Multiplication(a,c),d*)->Addition(Multiplication(a,Addition(b,c)),d*);
  Addition(a,a)->Multiplication(a,Integer[2]);
  Addition(a,Multiplication(a,b))->Multiplication(a,Addition(b,Integer[1]));
  Addition(Multiplication(a,b),Multiplication(a,c))->Multiplication(a,Addition(b,c));
  
  Multiplication(Multiplication(a*),b*)->Multiplication(a*,b*);
  Multiplication(Integer[0],a*)->Integer[0];
  Multiplication(Integer.a,Integer.b)->$MultiplyIntegers(a,b);
  Multiplication(Integer.a,Integer.b,c*)->Multiplication($MultiplyIntegers(a,b),c*);