123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278 |
- Thu Apr 15 22:02:44 MET DST 1999
- REDUCE 3.7, 15-Apr-1999 ...
- 1: 1:
- 2: 2: 2: 2: 2: 2: 2: 2: 2:
- 3: 3: % ----------------------------------------------------------------------
- % $Id: redlog.tst,v 1.5 1999/04/13 21:53:26 sturm Exp $
- % ----------------------------------------------------------------------
- % Copyright (c) 1995-1997
- % Andreas Dolzmann and Thomas Sturm, Universitaet Passau
- % ----------------------------------------------------------------------
- % $Log: redlog.tst,v $
- % Revision 1.5 1999/04/13 21:53:26 sturm
- % Removed "on echo".
- %
- % Revision 1.4 1999/04/05 12:25:29 dolzmann
- % Fixed a bug.
- %
- % Revision 1.3 1999/04/05 12:15:43 dolzmann
- % Added code for testing the contexts acfsf and dvfsf.
- %
- % Revision 1.2 1997/08/20 16:22:07 sturm
- % Do not use "on time".
- %
- % Revision 1.1 1997/08/18 15:59:01 sturm
- % Renamed "rl.red" to "redlog.red", and thus "rl.tst" to this file
- % "redlog.tst."
- %
- % ----------------------------------------------------------------------
- % Revision 1.3 1996/10/14 16:18:39 sturm
- % Added sc50b for testing the optimizer.
- %
- % Revision 1.2 1996/10/03 16:09:39 sturm
- % Added new QE example for testing rlatl, ..., rlifacml, rlstruct,
- % rlifstruct.
- %
- % Revision 1.1 1996/09/30 17:07:52 sturm
- % Initial check-in.
- %
- % ----------------------------------------------------------------------
- on rlverbose;
- % Ordered fields standard form:
- rlset ofsf;
- {}
- rlset();
- {ofsf}
- % Chains
- -3/5<x>y>z<=a<>b>c<5/3;
- - 5*x - 3 < 0 and x - y > 0 and y - z > 0 and - a + z <= 0 and a - b <> 0
- and b - c > 0 and 3*c - 5 < 0
- % For loop actions.
- g := for i:=1:6 mkor
- for j := 1:6 mkand
- mkid(a,i) <= mkid(a,j);
- g := false or (true and 0 <= 0 and a1 - a2 <= 0 and a1 - a3 <= 0
- and a1 - a4 <= 0 and a1 - a5 <= 0 and a1 - a6 <= 0) or (true
- and - a1 + a2 <= 0 and 0 <= 0 and a2 - a3 <= 0 and a2 - a4 <= 0
- and a2 - a5 <= 0 and a2 - a6 <= 0) or (true and - a1 + a3 <= 0
- and - a2 + a3 <= 0 and 0 <= 0 and a3 - a4 <= 0 and a3 - a5 <= 0
- and a3 - a6 <= 0) or (true and - a1 + a4 <= 0 and - a2 + a4 <= 0
- and - a3 + a4 <= 0 and 0 <= 0 and a4 - a5 <= 0 and a4 - a6 <= 0) or (true
- and - a1 + a5 <= 0 and - a2 + a5 <= 0 and - a3 + a5 <= 0 and - a4 + a5 <= 0
- and 0 <= 0 and a5 - a6 <= 0) or (true and - a1 + a6 <= 0 and - a2 + a6 <= 0
- and - a3 + a6 <= 0 and - a4 + a6 <= 0 and - a5 + a6 <= 0 and 0 <= 0)
- % Quantifier elimination and variants
- h := rlsimpl rlall g;
- h := all a1 all a2 all a3 all a4 all a5 all a6 ((a1 - a2 <= 0 and a1 - a3 <= 0
- and a1 - a4 <= 0 and a1 - a5 <= 0 and a1 - a6 <= 0) or (a1 - a2 >= 0
- and a2 - a3 <= 0 and a2 - a4 <= 0 and a2 - a5 <= 0 and a2 - a6 <= 0) or (
- a1 - a3 >= 0 and a2 - a3 >= 0 and a3 - a4 <= 0 and a3 - a5 <= 0 and a3 - a6 <= 0
- ) or (a1 - a4 >= 0 and a2 - a4 >= 0 and a3 - a4 >= 0 and a4 - a5 <= 0
- and a4 - a6 <= 0) or (a1 - a5 >= 0 and a2 - a5 >= 0 and a3 - a5 >= 0
- and a4 - a5 >= 0 and a5 - a6 <= 0) or (a1 - a6 >= 0 and a2 - a6 >= 0
- and a3 - a6 >= 0 and a4 - a6 >= 0 and a5 - a6 >= 0))
- rlmatrix h;
- (a1 - a2 <= 0 and a1 - a3 <= 0 and a1 - a4 <= 0 and a1 - a5 <= 0
- and a1 - a6 <= 0) or (a1 - a2 >= 0 and a2 - a3 <= 0 and a2 - a4 <= 0
- and a2 - a5 <= 0 and a2 - a6 <= 0) or (a1 - a3 >= 0 and a2 - a3 >= 0
- and a3 - a4 <= 0 and a3 - a5 <= 0 and a3 - a6 <= 0) or (a1 - a4 >= 0
- and a2 - a4 >= 0 and a3 - a4 >= 0 and a4 - a5 <= 0 and a4 - a6 <= 0) or (
- a1 - a5 >= 0 and a2 - a5 >= 0 and a3 - a5 >= 0 and a4 - a5 >= 0 and a5 - a6 <= 0
- ) or (a1 - a6 >= 0 and a2 - a6 >= 0 and a3 - a6 >= 0 and a4 - a6 >= 0
- and a5 - a6 >= 0)
- on rlrealtime;
- rlqe h;
- ---- (all a1 a2 a3 a4 a5 a6) [DFS: depth 6, watching 5]
- [0e] [1e] [2e] [3e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e]
- [3e] [3e] [3e] [2e] [3e] [3e] [3e] [3e] [1e] [2e] [3e] [3e] [3e] [2e] [3e] [3e]
- [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [3e] [1e] [2e] [3e] [3e] [3e] [2e]
- [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [1e] [2e] [3e] [3e] [3e]
- [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [1e] [2e] [3e] [3e]
- [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [1e] [2e] [3e]
- [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e] [3e] [3e] [3e] [2e]
- [3e] [3e] [3e] [3e] [DEL:25/116]
- Realtime: 2 s
- true
- off rlrealtime;
- h := rlsimpl rlall(g,{a2});
- h := all a1 all a3 all a4 all a5 all a6 ((a1 - a2 <= 0 and a1 - a3 <= 0
- and a1 - a4 <= 0 and a1 - a5 <= 0 and a1 - a6 <= 0) or (a1 - a2 >= 0
- and a2 - a3 <= 0 and a2 - a4 <= 0 and a2 - a5 <= 0 and a2 - a6 <= 0) or (
- a1 - a3 >= 0 and a2 - a3 >= 0 and a3 - a4 <= 0 and a3 - a5 <= 0 and a3 - a6 <= 0
- ) or (a1 - a4 >= 0 and a2 - a4 >= 0 and a3 - a4 >= 0 and a4 - a5 <= 0
- and a4 - a6 <= 0) or (a1 - a5 >= 0 and a2 - a5 >= 0 and a3 - a5 >= 0
- and a4 - a5 >= 0 and a5 - a6 <= 0) or (a1 - a6 >= 0 and a2 - a6 >= 0
- and a3 - a6 >= 0 and a4 - a6 >= 0 and a5 - a6 >= 0))
- rlqe h;
- ---- (all a1 a3 a4 a5 a6) [BFS: depth 5]
- -- left: 5
- [1e]
- -- left: 4
- [6e] [5e] [4e] [3e] [2e] [1e]
- -- left: 3
- [17e] [16e] [15e] [14e] [13e] [12e] [11e] [10e] [9e] [8e] [7e] [6e] [5e] [4e] [3
- e] [2e] [1e]
- -- left: 2
- [16e] [15e] [14e] [13e] [12e] [11e] [10e] [9e] [8e] [7e] [6e] [5e] [4e] [3e] [2e
- ] [1e] [DEL:65/40]
- true
- off rlqeheu,rlqedfs;
- rlqe ex(x,a*x**2+b*x+c>0);
- ---- (ex x) [BFS: depth 1]
- -- left: 1
- [1e] [DEL:0/1]
- 3
- a > 0 or (2*a*b*c - b > 0 and a = 0 and b <> 0)
- 2
- or (a = 0 and (b > 0 or (b = 0 and c > 0))) or (4*a*c - b < 0 and a < 0)
- on rlqedfs;
- rlqe ex(x,a*x**2+b*x+c>0);
- ---- (ex x) [DFS: depth 1, watching 1]
- [0e] [DEL:0/1]
- 3
- a > 0 or (2*a*b*c - b > 0 and a = 0 and b <> 0)
- 2
- or (a = 0 and (b > 0 or (b = 0 and c > 0))) or (4*a*c - b < 0 and a < 0)
- on rlqeheu;
- rlqe(ex(x,a*x**2+b*x+c>0),{a<0});
- ---- (ex x) [BFS: depth 1]
- -- left: 1
- [1e] [DEL:0/1]
- 2
- 4*a*c - b < 0
- rlgqe ex(x,a*x**2+b*x+c>0);
- ---- (ex x) [BFS: depth 1]
- -- left: 1
- [1e!] [DEL:0/1]
- {{a <> 0},
- 2
- 4*a*c - b < 0 or a >= 0}
- rlthsimpl ({a*b*c=0,b<>0});
- {a*c = 0,b <> 0}
- rlqe ex({x,y},(for i:=1:5 product mkid(a,i)*x**10-mkid(b,i)*y**2)<=0);
- ---- (ex x y) [BFS: depth 2]
- -- left: 2
- [1(y^2)(x^10)(SVF).e]
- -- left: 1
- [6e] [5e] [4e] [3e] [2e] [1e] [DEL:0/7]
- true
- sol := rlqe ex(x,a*x**2+b*x+c>0);
- ---- (ex x) [BFS: depth 1]
- -- left: 1
- [1e] [DEL:0/1]
- 3
- sol := a > 0 or (2*a*b*c - b > 0 and a = 0 and b <> 0)
- 2
- or (a = 0 and (b > 0 or (b = 0 and c > 0))) or (4*a*c - b < 0 and a < 0)
- rlatnum sol;
- 10
- rlatl sol;
- 3
- {2*a*b*c - b > 0,
- 2
- 4*a*c - b < 0,
- a = 0,
- a < 0,
- a > 0,
- b = 0,
- b <> 0,
- b > 0,
- c > 0}
- rlatml sol;
- 3
- {{2*a*b*c - b > 0,1},
- 2
- {4*a*c - b < 0,1},
- {a = 0,2},
- {a < 0,1},
- {a > 0,1},
- {b = 0,1},
- {b <> 0,1},
- {b > 0,1},
- {c > 0,1}}
- rlterml sol;
- 2
- {b*(2*a*c - b ),
- 2
- 4*a*c - b ,
- a,
- b,
- c}
- rltermml sol;
- 2
- {{b*(2*a*c - b ),1},
- 2
- {4*a*c - b ,1},
- {a,4},
- {b,3},
- {c,1}}
- rlifacl sol;
- 2
- {4*a*c - b ,
- 2
- 2*a*c - b ,
- a,
- b,
- c}
- rlifacml sol;
- 2
- {{4*a*c - b ,1},
- 2
- {2*a*c - b ,1},
- {a,4},
- {b,4},
- {c,1}}
- rlstruct(sol,v);
- {v3 > 0 or (v1 > 0 and v3 = 0 and v4 <> 0)
- or (v3 = 0 and (v4 > 0 or (v4 = 0 and v5 > 0))) or (v2 < 0 and v3 < 0),
- 3
- {v1 = 2*a*b*c - b ,
- 2
- v2 = 4*a*c - b ,
- v3 = a,
- v4 = b,
- v5 = c}}
- rlifstruct(sol,v);
- {v3 > 0 or (v2*v4 > 0 and v3 = 0 and v4 <> 0)
- or (v3 = 0 and (v4 > 0 or (v4 = 0 and v5 > 0))) or (v1 < 0 and v3 < 0),
- 2
- {v1 = 4*a*c - b ,
- 2
- v2 = 2*a*c - b ,
- v3 = a,
- v4 = b,
- v5 = c}}
- rlitab sol;
- 10 = 100%
- [9: 18] [8: 15] [7: 15] [6: 15] [5: 9] [4: 9] [3: 9] [2: 16] [1: 20]
- Success: 10 -> 9
- 0 = 100%
- No success, returning the original formula
- 5 = 100%
- [5: 7] [4: 5] [3: 5] [2: 5] [1: 9]
- No success, returning the original formula
- 1 = 100%
- [1: 1]
- No success, returning the original formula
- a > 0
- 3
- or (a = 0 and (b > 0 or (b = 0 and c > 0) or (2*a*b*c - b > 0 and b < 0)))
- 2
- or (4*a*c - b < 0 and a < 0)
- rlatnum ws;
- 9
- rlgsn sol;
- [DNF]
- global: 1; impl: 1; no neq: 3; glob-prod-al: 0.
- [GP] [1]
- [3] [2] [1]
- 3
- a > 0 or (a = 0 and b = 0 and c > 0) or (2*a*b*c - b > 0 and a = 0 and b <> 0)
- 2
- or (a = 0 and b > 0) or (4*a*c - b < 0 and a < 0)
- rlatnum ws;
- 11
- off rlverbose;
- rlqea ex(x,m*x+b=0);
- {{b = 0 and m = 0,{x = infinity1}},
- - b
- {m <> 0,{x = ------}}}
- m
- % from Marc van Dongen. Finding the first feasible solution for the
- % solution of systems of linear diophantine inequalities.
- dong := {
- 3*X259+4*X261+3*X262+2*X263+X269+2*X270+3*X271+4*X272+5*X273+X229=2,
- 7*X259+11*X261+8*X262+5*X263+3*X269+6*X270+9*X271+12*X272+15*X273+X229=4,
- 2*X259+5*X261+4*X262+3*X263+3*X268+4*X269+5*X270+6*X271+7*X272+8*X273=1,
- X262+2*X263+5*X268+4*X269+3*X270+2*X271+X272+2*X229=1,
- X259+X262+2*X263+4*X268+3*X269+2*X270+X271-X273+3*X229=2,
- X259+2*X261+2*X262+2*X263+3*X268+3*X269+3*X270+3*X271+3*X272+3*X273+X229=1,
- X259+X261+X262+X263+X268+X269+X270+X271+X272+X273+X229=1};
- dong := {x229 + 3*x259 + 4*x261 + 3*x262 + 2*x263 + x269 + 2*x270 + 3*x271
- + 4*x272 + 5*x273 = 2,
- x229 + 7*x259 + 11*x261 + 8*x262 + 5*x263 + 3*x269 + 6*x270 + 9*x271
- + 12*x272 + 15*x273 = 4,
- 2*x259 + 5*x261 + 4*x262 + 3*x263 + 3*x268 + 4*x269 + 5*x270 + 6*x271
- + 7*x272 + 8*x273 = 1,
- 2*x229 + x262 + 2*x263 + 5*x268 + 4*x269 + 3*x270 + 2*x271 + x272 = 1,
- 3*x229 + x259 + x262 + 2*x263 + 4*x268 + 3*x269 + 2*x270 + x271 - x273
- = 2,
- x229 + x259 + 2*x261 + 2*x262 + 2*x263 + 3*x268 + 3*x269 + 3*x270
- + 3*x271 + 3*x272 + 3*x273 = 1,
- x229 + x259 + x261 + x262 + x263 + x268 + x269 + x270 + x271 + x272
- + x273 = 1}
- sol := rlopt(dong,0);
- sol := {0,
- {{x229
- - x262 - 2*x263 - 5*x268 - 4*x269 - 3*x270 - 2*x271 - x272 + 1
- = -----------------------------------------------------------------,
- 2
- x259 = (x262 + 2*x263 + 7*x268 + 6*x269 + 5*x270 + 4*x271 + 3*x272
- + 2*x273 + 1)/2,
- x261 = - x262 - x263 - 2*x268 - 2*x269 - 2*x270 - 2*x271 - 2*x272
- - 2*x273}}}
- % Substitution
- sub(first second sol,for each atf in dong mkand atf);
- true and 0 = 0 and 0 = 0 and 0 = 0 and 0 = 0 and 0 = 0 and 0 = 0 and 0 = 0
- rlsimpl ws;
- true
- sub(x=a,x=0 and a=0 and ex(x,x=y) and ex(a,x>a));
- a = 0 and a = 0 and ex x (x - y = 0) and ex a0 (a - a0 > 0)
- f1 := x=0 and b>=0;
- f1 := x = 0 and b >= 0
- f2 := a=0;
- f2 := a = 0
- f := f1 or f2;
- f := (x = 0 and b >= 0) or a = 0
- % Boolean normal forms.
- rlcnf f;
- (a = 0 or b >= 0) and (a = 0 or x = 0)
- rldnf ws;
- a = 0 or (b >= 0 and x = 0)
- rlcnf f;
- (a = 0 or b >= 0) and (a = 0 or x = 0)
- % Negation normal form and prenex normal form
- hugo := a=0 and b=0 and y<0 equiv ex(y,y>=a) or a>0;
- hugo := (a = 0 and b = 0 and y < 0) equiv (ex y ( - a + y >= 0) or a > 0)
- rlnnf hugo;
- ((a = 0 and b = 0 and y < 0) and (ex y ( - a + y >= 0) or a > 0))
- or ((a <> 0 or b <> 0 or y >= 0) and (all y ( - a + y < 0) and a <= 0))
- rlpnf hugo;
- all y1 ex y0 (((a = 0 and b = 0 and y < 0) and ( - a + y0 >= 0 or a > 0))
- or ((a <> 0 or b <> 0 or y >= 0) and ( - a + y1 < 0 and a <= 0)))
- % Length and Part
- part(hugo,0);
- equiv
- part(hugo,2,1,2);
- - a + y >= 0
- length ws;
- 2
- length hugo;
- 2
- length part(hugo,1);
- 3
- % Tableau
- mats := all(t,ex({l,u},(
- (t>=0 and t<=1) impl
- (l>0 and u<=1 and
- -t*x1+t*x2+2*t*x1*u+u=l*x1 and
- -2*t*x2+t*x2*u=l*x2))));
- mats := all t ex l ex u ((t >= 0 and t - 1 <= 0) impl (l > 0 and u - 1 <= 0
- and - l*x1 + 2*t*u*x1 - t*x1 + t*x2 + u = 0 and - l*x2 + t*u*x2 - 2*t*x2 = 0)
- )
- sol := rlgsn rlqe mats;
- sol := 3*x1 + 2 <> 0 and 2*x1 + 1 <> 0 and x1 + 1 <> 0 and x2 = 0
- 2 2
- and (2*x1 + x1 < 0 or x1 >= 0) and (3*x1 + 5*x1 + 2 < 0
- 2 2 2
- or 2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0)
- 2 2 2
- and (3*x1 + 5*x1 + 2 < 0 or 2*x1 + x1 < 0 or x1 + x1 > 0 or x1 = 0)
- 2 2 2
- and (2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0)
- 2 2 2
- and (2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0 or x1 = 0)
- 2 2
- and (x1 + x1 < 0 or x1 >= 0) and (3*x1 + 2*x1 < 0 or x1 >= 0)
- rltab(sol,{x1>0,x1<0,x1=0});
- 2 2
- (x1 = 0 and (x2 = 0 and (3*x1 + 5*x1 + 2 < 0 or 2*x1 + 3*x1 + 1 >= 0
- 2 2
- or 2*x1 + x1 < 0 or x1 + x1 > 0)
- 2 2 2
- and (2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0))) or (x1 < 0 and
- 2 2 2
- (3*x1 + 2*x1 < 0 and 2*x1 + x1 < 0 and x1 + x1 < 0 and 3*x1 + 2 <> 0
- and 2*x1 + 1 <> 0 and x1 + 1 <> 0 and x2 = 0)) or (x1 > 0 and (x2 = 0 and (
- 2 2 2 2
- 3*x1 + 5*x1 + 2 < 0 or 2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0)
- 2 2 2
- and (3*x1 + 5*x1 + 2 < 0 or 2*x1 + x1 < 0 or x1 + x1 > 0)
- 2 2 2
- and (2*x1 + 3*x1 + 1 >= 0 or 2*x1 + x1 < 0 or x1 + x1 > 0)))
- % Part on psopfn / cleanupfn
- part(rlqe ex(x,m*x+b=0),1);
- b = 0
- walter := (x>0 and y>0);
- walter := x > 0 and y > 0
- rlsimpl(true,rlatl walter);
- true
- part(rlatl walter,1,1);
- x
- % Optimizer
- sc50b!-t := -1*vCOL00004$
- sc50b!-c := {
- vCOL00001 >= 0,vCOL00002 >= 0,vCOL00003 >= 0,vCOL00004 >= 0,vCOL00005 >= 0,
- vCOL00006 >= 0,vCOL00007 >= 0,vCOL00008 >= 0,vCOL00009 >= 0,vCOL00010 >= 0,
- vCOL00011 >= 0,vCOL00012 >= 0,vCOL00013 >= 0,vCOL00014 >= 0,vCOL00015 >= 0,
- vCOL00016 >= 0,vCOL00017 >= 0,vCOL00018 >= 0,vCOL00019 >= 0,vCOL00020 >= 0,
- vCOL00021 >= 0,vCOL00022 >= 0,vCOL00023 >= 0,vCOL00024 >= 0,vCOL00025 >= 0,
- vCOL00026 >= 0,vCOL00027 >= 0,vCOL00028 >= 0,vCOL00029 >= 0,vCOL00030 >= 0,
- vCOL00031 >= 0,vCOL00032 >= 0,vCOL00033 >= 0,vCOL00034 >= 0,vCOL00035 >= 0,
- vCOL00036 >= 0,vCOL00037 >= 0,vCOL00038 >= 0,vCOL00039 >= 0,vCOL00040 >= 0,
- vCOL00041 >= 0,vCOL00042 >= 0,vCOL00043 >= 0,vCOL00044 >= 0,vCOL00045 >= 0,
- vCOL00046 >= 0,vCOL00047 >= 0,vCOL00048 >= 0,
- 3*vCOL00001+(3*vCOL00002)+(3*vCOL00003) <= 300,
- 1*vCOL00004+(-1*vCOL00005) = 0,
- -1*vCOL00001+(1*vCOL00006) = 0,
- -1*vCOL00002+(1*vCOL00007) = 0,
- -1*vCOL00003+(1*vCOL00008) = 0,
- -1*vCOL00006+(1*vCOL00009) <= 0,
- -1*vCOL00007+(1*vCOL00010) <= 0,
- -1*vCOL00008+(1*vCOL00011) <= 0,
- -1*vCOL00009+(3*vCOL00012)+(3*vCOL00013)+(3*vCOL00014) <= 300,
- 0.400000*vCOL00005+(-1*vCOL00010) <= 0,
- 0.600000*vCOL00005+(-1*vCOL00011) <= 0,
- 1.100000*vCOL00004+(-1*vCOL00015) = 0,
- 1*vCOL00005+(1*vCOL00015)+(-1*vCOL00016) = 0,
- -1*vCOL00006+(-1*vCOL00012)+(1*vCOL00017) = 0,
- -1*vCOL00007+(-1*vCOL00013)+(1*vCOL00018) = 0,
- -1*vCOL00008+(-1*vCOL00014)+(1*vCOL00019) = 0,
- -1*vCOL00017+(1*vCOL00020) <= 0,
- -1*vCOL00018+(1*vCOL00021) <= 0,
- -1*vCOL00019+(1*vCOL00022) <= 0,
- -1*vCOL00020+(3*vCOL00023)+(3*vCOL00024)+(3*vCOL00025) <= 300,
- 0.400000*vCOL00016+(-1*vCOL00021) <= 0,
- 0.600000*vCOL00016+(-1*vCOL00022) <= 0,
- 1.100000*vCOL00015+(-1*vCOL00026) = 0,
- 1*vCOL00016+(1*vCOL00026)+(-1*vCOL00027) = 0,
- -1*vCOL00017+(-1*vCOL00023)+(1*vCOL00028) = 0,
- -1*vCOL00018+(-1*vCOL00024)+(1*vCOL00029) = 0,
- -1*vCOL00019+(-1*vCOL00025)+(1*vCOL00030) = 0,
- -1*vCOL00028+(1*vCOL00031) <= 0,
- -1*vCOL00029+(1*vCOL00032) <= 0,
- -1*vCOL00030+(1*vCOL00033) <= 0,
- -1*vCOL00031+(3*vCOL00034)+(3*vCOL00035)+(3*vCOL00036) <= 300,
- 0.400000*vCOL00027+(-1*vCOL00032) <= 0,
- 0.600000*vCOL00027+(-1*vCOL00033) <= 0,
- 1.100000*vCOL00026+(-1*vCOL00037) = 0,
- 1*vCOL00027+(1*vCOL00037)+(-1*vCOL00038) = 0,
- -1*vCOL00028+(-1*vCOL00034)+(1*vCOL00039) = 0,
- -1*vCOL00029+(-1*vCOL00035)+(1*vCOL00040) = 0,
- -1*vCOL00030+(-1*vCOL00036)+(1*vCOL00041) = 0,
- -1*vCOL00039+(1*vCOL00042) <= 0,
- -1*vCOL00040+(1*vCOL00043) <= 0,
- -1*vCOL00041+(1*vCOL00044) <= 0,
- -1*vCOL00042+(3*vCOL00045)+(3*vCOL00046)+(3*vCOL00047) <= 300,
- 0.400000*vCOL00038+(-1*vCOL00043) <= 0,
- 0.600000*vCOL00038+(-1*vCOL00044) <= 0,
- 1.100000*vCOL00037+(-1*vCOL00048) = 0,
- -0.700000*vCOL00045+(0.300000*vCOL00046)+(0.300000*vCOL00047) <= 0,
- -1*vCOL00046+(0.400000*vCOL00048) <= 0,
- -1*vCOL00047+(0.600000*vCOL00048) <= 0}$
- rlopt(sc50b!-c,sc50b!-t);
- {-70,
- {{vcol00001 = 30,
- vcol00002 = 28,
- vcol00003 = 42,
- vcol00004 = 70,
- vcol00005 = 70,
- vcol00006 = 30,
- vcol00007 = 28,
- vcol00008 = 42,
- vcol00009 = 30,
- vcol00010 = 28,
- vcol00011 = 42,
- vcol00012 = 33,
- 154
- vcol00013 = -----,
- 5
- 231
- vcol00014 = -----,
- 5
- vcol00015 = 77,
- vcol00016 = 147,
- vcol00017 = 63,
- 294
- vcol00018 = -----,
- 5
- 441
- vcol00019 = -----,
- 5
- vcol00020 = 63,
- 294
- vcol00021 = -----,
- 5
- 441
- vcol00022 = -----,
- 5
- 363
- vcol00023 = -----,
- 10
- 847
- vcol00024 = -----,
- 25
- 2541
- vcol00025 = ------,
- 50
- 847
- vcol00026 = -----,
- 10
- 2317
- vcol00027 = ------,
- 10
- 993
- vcol00028 = -----,
- 10
- 2317
- vcol00029 = ------,
- 25
- 6951
- vcol00030 = ------,
- 50
- 993
- vcol00031 = -----,
- 10
- 2317
- vcol00032 = ------,
- 25
- 6951
- vcol00033 = ------,
- 50
- 3993
- vcol00034 = ------,
- 100
- 9317
- vcol00035 = ------,
- 250
- 27951
- vcol00036 = -------,
- 500
- 9317
- vcol00037 = ------,
- 100
- 32487
- vcol00038 = -------,
- 100
- 13923
- vcol00039 = -------,
- 100
- 32487
- vcol00040 = -------,
- 250
- 97461
- vcol00041 = -------,
- 500
- 13923
- vcol00042 = -------,
- 100
- 32487
- vcol00043 = -------,
- 250
- 97461
- vcol00044 = -------,
- 500
- 43923
- vcol00045 = -------,
- 1000
- 102487
- vcol00046 = --------,
- 2500
- 307461
- vcol00047 = --------,
- 5000
- 102487
- vcol00048 = --------}}}
- 1000
- % Algebraically closed fields standard form:
- sub(x=a,x=0 and a=0 and ex(x,x=y) and ex(a,x<>a));
- a = 0 and a = 0 and ex x (x - y = 0) and ex a0 (a - a0 <> 0)
- rlset acfsf;
- {ofsf}
- rlsimpl(x^2+y^2+1<>0);
- 2 2
- x + y + 1 <> 0
- rlqe ex(x,x^2=y);
- true
- clear f;
- h := rlqe ex(x,x^3+a*x^2+b*x+c=0 and x^3+d*x^2+e*x+f=0);
- 2 2 2 2 3 2
- h := (a*b*c - 2*a*b*c*f + a*b*f - a*c *e + 2*a*c*e*f - a*e*f + b *f - b *c*e
- 2 2 2 3 2 3 2 3
- - 2*b *e*f + 2*b*c*e + b*e *f - c + 3*c *f - c*e - 3*c*f + f = 0 or (
- 3 2 2 2 2
- a*b*c - a*b*f - a*c*e + a*e*f - b + 2*b *e - b*e - c + 2*c*f - f <> 0
- and a - d <> 0) or (a*b - a*e - c + f <> 0 and a - d <> 0 and b - e <> 0)
- or (a - d <> 0 and b - e <> 0)) and (a - d <> 0 or b - e <> 0 or c - f = 0) and
- 2 2 2 2
- (a *e - a*b*d - a*c - a*d*e + a*f + b + b*d - 2*b*e + c*d - d*f + e <> 0
- 2 2 3 2
- or a *f - a*c*d - a*d*f + b*c - b*f + c*d - c*e + e*f = 0) and (a *f
- 2 2 2 2 2 2 2
- - a *b*e*f - 2*a *c*d*f + a *c*e - a *d*f + a*b *d*f - a*b*c*d*e + 3*a*b*c*f
- 2 2 2 2 2 2
- + a*b*d*e*f - 3*a*b*f + a*c *d - 2*a*c *e + 2*a*c*d *f - a*c*d*e + a*c*e*f
- 2 3 2 2 2 2 2 2
- + a*e*f - b *f + b *c*e - b *d *f + 2*b *e*f - b*c *d + b*c*d *e - b*c*d*f
- 2 2 2 3 2 3 2 2
- - 2*b*c*e + 2*b*d*f - b*e *f + c - c *d + 3*c *d*e - 3*c *f - 3*c*d*e*f
- 3 2 3
- + c*e + 3*c*f - f = 0 or a - d = 0)
- rlstruct h;
- {(v4 = 0 or (v5 <> 0 and v7 <> 0) or (v6 <> 0 and v7 <> 0 and v8 <> 0)
- or (v7 <> 0 and v8 <> 0)) and (v7 <> 0 or v8 <> 0 or v9 = 0)
- and (v2 <> 0 or v3 = 0) and (v1 = 0 or v7 = 0),
- 3 2 2 2 2 2 2 2 2
- {v1 = a *f - a *b*e*f - 2*a *c*d*f + a *c*e - a *d*f + a*b *d*f - a*b*c*d*e
- 2 2 2 2 2
- + 3*a*b*c*f + a*b*d*e*f - 3*a*b*f + a*c *d - 2*a*c *e + 2*a*c*d *f
- 2 2 3 2 2 2 2 2
- - a*c*d*e + a*c*e*f + a*e*f - b *f + b *c*e - b *d *f + 2*b *e*f - b*c *d
- 2 2 2 2 3 2 3 2
- + b*c*d *e - b*c*d*f - 2*b*c*e + 2*b*d*f - b*e *f + c - c *d + 3*c *d*e
- 2 3 2 3
- - 3*c *f - 3*c*d*e*f + c*e + 3*c*f - f ,
- 2 2 2 2
- v2 = a *e - a*b*d - a*c - a*d*e + a*f + b + b*d - 2*b*e + c*d - d*f + e ,
- 2 2
- v3 = a *f - a*c*d - a*d*f + b*c - b*f + c*d - c*e + e*f,
- 2 2 2 2 3 2
- v4 = a*b*c - 2*a*b*c*f + a*b*f - a*c *e + 2*a*c*e*f - a*e*f + b *f - b *c*e
- 2 2 2 3 2 3 2 3
- - 2*b *e*f + 2*b*c*e + b*e *f - c + 3*c *f - c*e - 3*c*f + f ,
- 3 2 2 2 2
- v5 = a*b*c - a*b*f - a*c*e + a*e*f - b + 2*b *e - b*e - c + 2*c*f - f ,
- v6 = a*b - a*e - c + f,
- v7 = a - d,
- v8 = b - e,
- v9 = c - f}}
- rlqe rlall (h equiv resultant(x^3+a*x^2+b*x+c,x^3+d*x^2+e*x+f,x)=0);
- true
- clear h;
- % Discretely valued fields standard form:
- rlset dvfsf;
- *** p is being cleared
- *** turned off switch rlqeheu
- *** turned off switch rlqedfs
- *** turned on switch rlsusi
- {acfsf}
- sub(x=a,x=0 and a=0 and ex(x,x=y) and ex(a,x~a));
- a = 0 and a = 0 and ex x (x - y = 0) and ex a0 (a ~ a0)
- % P-adic Balls, taken from Andreas Dolzmann, Thomas Sturm. P-adic
- % Constraint Solving, Proceedings of the ISSAC '99.
- rlset dvfsf;
- *** turned on switch rlqeheu
- *** turned on switch rlqedfs
- *** turned off switch rlsusi
- *** p is being cleared
- *** turned off switch rlqeheu
- *** turned off switch rlqedfs
- *** turned on switch rlsusi
- {dvfsf}
- rlqe all(r_1,all(r_2,all(a,all(b,
- ex(x,r_1||x-a and r_2||x-b and r_1|r_2) impl
- all(y,r_2||y-b impl r_1||y-a)))));
- 2 2
- (p - 4*p + 3 | 2 or 2 ~ 1) and (p + p - 2 | 3 or 3 ~ 1)
- and (p + 2 | 2*p or p - 2 || p + 2)
- rlmkcanonic ws;
- true
- rlset(dvfsf,100003);
- *** turned on switch rlqeheu
- *** turned on switch rlqedfs
- *** turned off switch rlsusi
- *** p is set to 100003
- *** turned off switch rlqeheu
- *** turned off switch rlqedfs
- *** turned on switch rlsusi
- {dvfsf}
- rlqe all(r_1,all(r_2,all(a,all(b,
- ex(x,r_1||x-a and r_2||x-b and r_1|r_2) impl
- all(y,r_2||y-b impl r_1||y-a)))));
- true
- % Size of the Residue Field, taken from Andreas Dolzmann, Thomas
- % Sturm. P-adic Constraint Solving. Proceedings of the ISSAC '99.
- rlset(dvfsf);
- *** turned on switch rlqeheu
- *** turned on switch rlqedfs
- *** turned off switch rlsusi
- *** p is being cleared
- *** turned off switch rlqeheu
- *** turned off switch rlqedfs
- *** turned on switch rlsusi
- {dvfsf,100003}
- rlqe ex(x,x~1 and x-1~1 and x-2~1 and x-3~1 and 2~1 and 3~1);
- (3 ~ 1 and 2 ~ 1) or (7 ~ 1 and 6 ~ 1 and 5 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (5 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (11 ~ 1 and 10 ~ 1 and 6 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (7 ~ 1 and 6 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (6 ~ 1 and 5 ~ 1 and 3 ~ 1 and 2 ~ 1)
- rlexplats ws;
- (3 ~ 1 and 2 ~ 1) or (7 ~ 1 and 5 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (11 ~ 1 and 5 ~ 1 and 3 ~ 1 and 2 ~ 1) or (7 ~ 1 and 3 ~ 1 and 2 ~ 1)
- or (5 ~ 1 and 3 ~ 1 and 2 ~ 1)
- rldnf ws;
- 3 ~ 1 and 2 ~ 1
- % Selecting contexts:
- rlset ofsf;
- *** turned on switch rlqeheu
- *** turned on switch rlqedfs
- *** turned off switch rlsusi
- {dvfsf}
- f:= ex(x,m*x+b=0);
- f := ex x (b + m*x = 0)
- rlqe f;
- b = 0 or m <> 0
- rlset dvfsf;
- *** p is being cleared
- *** turned off switch rlqeheu
- *** turned off switch rlqedfs
- *** turned on switch rlsusi
- {ofsf}
- rlqe f;
- b + m = 0 or m <> 0
- rlset acfsf;
- *** turned on switch rlqeheu
- *** turned on switch rlqedfs
- *** turned off switch rlsusi
- {dvfsf}
- rlqe f;
- b = 0 or m <> 0
- end;
- 4: 4: 4: 4: 4: 4: 4: 4: 4:
- Time for test: 11860 ms, plus GC time: 770 ms
- 5: 5:
- Quitting
- Thu Apr 15 22:03:15 MET DST 1999
|