Rename *ll* and *ul* to ll and ul in defint
[maxima.git] / share / simplification / ineq.mac
blobb7a639d1a7e95be8699970db617fbbfc7b757150
1 /* coded by LPH prior to MAY 12, 1983 */
2 /* re-coded for DOE MACSYMA */
4 /* I made some changes so that ineq loads without       */
5 /* asking for the sign of d. Mario Rodriguez, 30-4-2006 */
7 /*
8 eval_when([translate,batch,demo,load,loadfile],
9 matchdeclare([a,b],true,c,negp,d,posp),
10 matchdeclare([e,f,g,h],freeof("<=",">=","<",">","=")));
14 matchdeclare([a,b],true,c,negp,d,posp)$
15 matchdeclare([e,f,g,h],freeof("<=",">=","<",">","="))$
17 negp(u):=
18    (mode_declare(u,any,function(negp),boolean),
19     if asksign(u)='neg then true);
20 posp(u):=
21    (mode_declare(u,any,function(posp),boolean),
22     if asksign(u)='pos then true);
23 define_variable(?matchreverse,true,boolean);
27 eval_when(translate,simp:false);
30 simp:false$
31 tellsimpafter((a<b)*c,a*c>b*c);
32 tellsimpafter((a>b)*c,a*c<b*c);
33 tellsimpafter(("<="(a,b))*c,">="(a*c,b*c));
34 tellsimpafter((">="(a,b))*c,"<="(a*c,b*c));
35 tellsimpafter((a<b)*d,a*d<b*d);
36 tellsimpafter((a>b)*d,a*d>b*d);
37 tellsimpafter(("<="(a,b))*d,"<="(a*d,b*d));
38 tellsimpafter((">="(a,b))*d,">="(a*d,b*d));
40 tellsimpafter((a<b)+e,a+e<b+e);
41 tellsimpafter(("<="(a,b))+e,"<="(a+e,b+e));
42 tellsimpafter((a>b)+e,a+e>b+e);
43 tellsimpafter((">="(a,b))+e,">="(a+e,b+e));
45 tellsimpafter((e<f)+(g<h),e+g<f+h);
46 tellsimpafter((e<f)+("<="(g,h)),e+g<f+h);
47 tellsimpafter(("<="(e,f))+("<="(g,h)),"<="(e+g,f+h));
48 tellsimp((g<h)+(e=f),g+e<h+f);
49 tellsimp(("<="(g,h))+(e=f),"<="(g+e,h+f));
50 tellsimp((e=f)+(g<h),g+e<h+f);
51 tellsimp((e=f)+("<="(g,h)),"<="(g+e,h+f));
52 tellsimp((e=f)+(g>h),g+e>h+f);
53 tellsimp((e=f)+(">="(g,h)),">="(g+e,h+f));
54 tellsimp((g>h)+(e=f),g+e>h+f);
55 tellsimp((">="(g,h))+(e=f),">="(g+e,h+f));
56 tellsimpafter((e>f)+(g>h),e+g>f+h);
57 tellsimpafter((e>f)+(">="(g,h)),e+g>f+h);
58 tellsimpafter((">="(e,f))+(">="(g,h)),">="(e+g,f+h));
59 simp:true$
62 eval_when(translate,simp:true);