File: ineq.mac

package info (click to toggle)
maxima 5.49.0-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 128,980 kB
  • sloc: lisp: 437,854; fortran: 14,665; tcl: 10,143; sh: 4,598; makefile: 2,204; ansic: 447; java: 374; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (63 lines) | stat: -rw-r--r-- 1,794 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* coded by LPH prior to MAY 12, 1983 */
/* re-coded for DOE MACSYMA */

/* I made some changes so that ineq loads without       */
/* asking for the sign of d. Mario Rodriguez, 30-4-2006 */

/*
eval_when([translate,batch,demo,load,loadfile],
matchdeclare([a,b],true,c,negp,d,posp),
matchdeclare([e,f,g,h],freeof("<=",">=","<",">","=")));
*/


matchdeclare([a,b],true,c,negp,d,posp)$
matchdeclare([e,f,g,h],freeof("<=",">=","<",">","="))$

negp(u):=
   (mode_declare(u,any,function(negp),boolean),
    if asksign(u)='neg then true);
posp(u):=
   (mode_declare(u,any,function(posp),boolean),
    if asksign(u)='pos then true);
define_variable(?matchreverse,true,boolean);


/*
eval_when(translate,simp:false);
*/

simp:false$
tellsimpafter((a<b)*c,a*c>b*c);
tellsimpafter((a>b)*c,a*c<b*c);
tellsimpafter(("<="(a,b))*c,">="(a*c,b*c));
tellsimpafter((">="(a,b))*c,"<="(a*c,b*c));
tellsimpafter((a<b)*d,a*d<b*d);
tellsimpafter((a>b)*d,a*d>b*d);
tellsimpafter(("<="(a,b))*d,"<="(a*d,b*d));
tellsimpafter((">="(a,b))*d,">="(a*d,b*d));

tellsimpafter((a<b)+e,a+e<b+e);
tellsimpafter(("<="(a,b))+e,"<="(a+e,b+e));
tellsimpafter((a>b)+e,a+e>b+e);
tellsimpafter((">="(a,b))+e,">="(a+e,b+e));

tellsimpafter((e<f)+(g<h),e+g<f+h);
tellsimpafter((e<f)+("<="(g,h)),e+g<f+h);
tellsimpafter(("<="(e,f))+("<="(g,h)),"<="(e+g,f+h));
tellsimp((g<h)+(e=f),g+e<h+f);
tellsimp(("<="(g,h))+(e=f),"<="(g+e,h+f));
tellsimp((e=f)+(g<h),g+e<h+f);
tellsimp((e=f)+("<="(g,h)),"<="(g+e,h+f));
tellsimp((e=f)+(g>h),g+e>h+f);
tellsimp((e=f)+(">="(g,h)),">="(g+e,h+f));
tellsimp((g>h)+(e=f),g+e>h+f);
tellsimp((">="(g,h))+(e=f),">="(g+e,h+f));
tellsimpafter((e>f)+(g>h),e+g>f+h);
tellsimpafter((e>f)+(">="(g,h)),e+g>f+h);
tellsimpafter((">="(e,f))+(">="(g,h)),">="(e+g,f+h));
simp:true$

/*
eval_when(translate,simp:true); 
*/