walther@60329
|
1 |
(* Title: Knowledge/polyeq- 1.sml
|
walther@59627
|
2 |
testexamples for PolyEq, poynomial equations and equational systems
|
walther@59627
|
3 |
Author: Richard Lang 2003
|
walther@59627
|
4 |
(c) due to copyright terms
|
walther@59627
|
5 |
WN030609: some expls dont work due to unfinished handling of 'expanded terms';
|
walther@59627
|
6 |
others marked with TODO have to be checked, too.
|
walther@59627
|
7 |
*)
|
walther@59627
|
8 |
|
walther@59627
|
9 |
"-----------------------------------------------------------------";
|
walther@59627
|
10 |
"table of contents -----------------------------------------------";
|
walther@59627
|
11 |
"-----------------------------------------------------------------";
|
walther@60329
|
12 |
"------ polyeq- 1.sml ---------------------------------------------";
|
walther@59627
|
13 |
"----------- tests on predicates in problems ---------------------";
|
walther@59627
|
14 |
"----------- test matching problems ------------------------------";
|
walther@59847
|
15 |
"----------- prep. for introduction of Matthias Goldgruber 2003 trials on rewrite orders -----";
|
walther@59847
|
16 |
"----------- Matthias Goldgruber 2003 trials on rewrite orders -------------------------------";
|
walther@59627
|
17 |
"----------- lin.eq degree_0 -------------------------------------";
|
walther@59627
|
18 |
"----------- test thm's d2_pq_formulsxx[_neg]---------------------";
|
walther@60329
|
19 |
"----------- equality (2 +(- 1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
|
walther@60329
|
20 |
"----------- equality (- 2 +(- 1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
|
walther@60329
|
21 |
"----------- equality (- 2 + x + x \<up> 2 = 0) ---------------------------------------------------";
|
walther@60242
|
22 |
"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60329
|
23 |
"----------- equality (- 2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
|
walther@60242
|
24 |
"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
25 |
"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
26 |
"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
27 |
"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
28 |
"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60242
|
29 |
"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60329
|
30 |
"----------- equality (1 +(- 1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
|
walther@60329
|
31 |
"----------- equality (- 1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
|
walther@60242
|
32 |
"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
|
walther@60242
|
33 |
"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
|
walther@60242
|
34 |
"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
|
walther@60329
|
35 |
"----------- (- 16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
|
walther@59627
|
36 |
"-----------------------------------------------------------------";
|
walther@60329
|
37 |
"------ polyeq- 2.sml ---------------------------------------------";
|
walther@60242
|
38 |
"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
|
walther@60242
|
39 |
"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
|
walther@60329
|
40 |
"----------- (- 147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
|
walther@60329
|
41 |
"----------- (3*x - 1 - (5*x - (2 - 4*x)) = - 11),(*Schalk Is86Bsp5";
|
walther@60242
|
42 |
"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
|
walther@59627
|
43 |
"----------- rls make_polynomial_in ------------------------------";
|
walther@59627
|
44 |
"----------- interSteps ([1],Res); on Schalk Is86Bsp5-------------";
|
walther@59627
|
45 |
"----------- rls d2_polyeq_bdv_only_simplify ---------------------";
|
walther@59627
|
46 |
"-----------------------------------------------------------------";
|
walther@59627
|
47 |
"-----------------------------------------------------------------";
|
walther@59627
|
48 |
|
walther@59627
|
49 |
"----------- tests on predicates in problems ---------------------";
|
walther@59627
|
50 |
"----------- tests on predicates in problems ---------------------";
|
walther@59627
|
51 |
"----------- tests on predicates in problems ---------------------";
|
walther@60330
|
52 |
Rewrite.trace_on:=true; (*true false*)
|
walther@60330
|
53 |
|
walther@60242
|
54 |
val t1 = (Thm.term_of o the o (TermC.parse thy)) "lhs (-8 - 2*x + x \<up> 2 = 0)";
|
walther@59627
|
55 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t1;
|
walther@60242
|
56 |
if ((UnparseC.term t) = "-8 - 2 * x + x \<up> 2") then ()
|
walther@59627
|
57 |
else error "polyeq.sml: diff.behav. in lhs";
|
walther@59627
|
58 |
|
walther@60242
|
59 |
val t2 = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*x + x \<up> 2) is_expanded_in x";
|
walther@59627
|
60 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t2;
|
walther@59868
|
61 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
62 |
else error "polyeq.sml: diff.behav. 1 in is_expended_in";
|
walther@59627
|
63 |
|
walther@60230
|
64 |
val t0 = (Thm.term_of o the o (TermC.parse thy)) "(sqrt(x)) is_poly_in x";
|
walther@59627
|
65 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t0;
|
walther@59868
|
66 |
if (UnparseC.term t) = "False" then ()
|
walther@59627
|
67 |
else error "polyeq.sml: diff.behav. 2 in is_poly_in";
|
walther@59627
|
68 |
|
walther@60329
|
69 |
val t3 = (Thm.term_of o the o (TermC.parse thy)) "(-8 + (- 1)*2*x + x \<up> 2) is_poly_in x";
|
walther@59627
|
70 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t3;
|
walther@59868
|
71 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
72 |
else error "polyeq.sml: diff.behav. 3 in is_poly_in";
|
walther@59627
|
73 |
|
walther@60329
|
74 |
val t4 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 + (- 1)*2*x + x \<up> 2 = 0)) is_expanded_in x";
|
walther@59627
|
75 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t4;
|
walther@59868
|
76 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
77 |
else error "polyeq.sml: diff.behav. 4 in is_expended_in";
|
walther@59627
|
78 |
|
walther@59627
|
79 |
|
walther@60242
|
80 |
val t6 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 - 2*x + x \<up> 2 = 0)) is_expanded_in x";
|
walther@59627
|
81 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t6;
|
walther@59868
|
82 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
83 |
else error "polyeq.sml: diff.behav. 5 in is_expended_in";
|
walther@59627
|
84 |
|
walther@60242
|
85 |
val t3 = (Thm.term_of o the o (TermC.parse thy))"((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
|
walther@59627
|
86 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t3;
|
walther@59868
|
87 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
88 |
else error "polyeq.sml: diff.behav. in has_degree_in_in";
|
walther@59627
|
89 |
|
walther@60230
|
90 |
val t3 = (Thm.term_of o the o (TermC.parse thy)) "((sqrt(x)) has_degree_in x) = 2";
|
walther@59627
|
91 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t3;
|
walther@59868
|
92 |
if (UnparseC.term t) = "False" then ()
|
walther@59627
|
93 |
else error "polyeq.sml: diff.behav. 6 in has_degree_in_in";
|
walther@59627
|
94 |
|
walther@60230
|
95 |
val t4 = (Thm.term_of o the o (TermC.parse thy))
|
walther@60242
|
96 |
"((-8 - 2*x + x \<up> 2) has_degree_in x) = 1";
|
walther@59627
|
97 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t4;
|
walther@59868
|
98 |
if (UnparseC.term t) = "False" then ()
|
walther@59627
|
99 |
else error "polyeq.sml: diff.behav. 7 in has_degree_in_in";
|
walther@59627
|
100 |
|
walther@60230
|
101 |
val t5 = (Thm.term_of o the o (TermC.parse thy))
|
walther@60242
|
102 |
"((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
|
walther@59627
|
103 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t5;
|
walther@59868
|
104 |
if (UnparseC.term t) = "True" then ()
|
walther@59627
|
105 |
else error "polyeq.sml: diff.behav. 8 in has_degree_in_in";
|
walther@59627
|
106 |
|
walther@59627
|
107 |
"----------- test matching problems --------------------------0---";
|
walther@59627
|
108 |
"----------- test matching problems --------------------------0---";
|
walther@59627
|
109 |
"----------- test matching problems --------------------------0---";
|
walther@60242
|
110 |
val fmz = ["equality (-8 - 2*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
111 |
if M_Match.match_pbl fmz (Problem.from_store ["expanded", "univariate", "equation"]) =
|
walther@59984
|
112 |
M_Match.Matches' {Find = [Correct "solutions L"],
|
walther@59627
|
113 |
With = [],
|
walther@60242
|
114 |
Given = [Correct "equality (-8 - 2 * x + x \<up> 2 = 0)", Correct "solveFor x"],
|
walther@60242
|
115 |
Where = [Correct "matches (?a = 0) (-8 - 2 * x + x \<up> 2 = 0)",
|
walther@60242
|
116 |
Correct "lhs (-8 - 2 * x + x \<up> 2 = 0) is_expanded_in x"],
|
walther@59627
|
117 |
Relate = []}
|
walther@59984
|
118 |
then () else error "M_Match.match_pbl [expanded,univariate,equation]";
|
walther@59627
|
119 |
|
walther@59997
|
120 |
if M_Match.match_pbl fmz (Problem.from_store ["degree_2", "expanded", "univariate", "equation"]) =
|
walther@59984
|
121 |
M_Match.Matches' {Find = [Correct "solutions L"],
|
walther@59627
|
122 |
With = [],
|
walther@60242
|
123 |
Given = [Correct "equality (-8 - 2 * x + x \<up> 2 = 0)", Correct "solveFor x"],
|
walther@60242
|
124 |
Where = [Correct "lhs (-8 - 2 * x + x \<up> 2 = 0) has_degree_in x = 2"],
|
walther@59627
|
125 |
Relate = []} (*before WN110906 was: has_degree_in x =!= 2"]*)
|
walther@59984
|
126 |
then () else error "M_Match.match_pbl [degree_2,expanded,univariate,equation]";
|
walther@59627
|
127 |
|
walther@59847
|
128 |
|
walther@59847
|
129 |
"----------- prep. for introduction of Matthias Goldgruber 2003 trials on rewrite orders -----";
|
walther@59847
|
130 |
"----------- prep. for introduction of Matthias Goldgruber 2003 trials on rewrite orders -----";
|
walther@59847
|
131 |
"----------- prep. for introduction of Matthias Goldgruber 2003 trials on rewrite orders -----";
|
walther@59847
|
132 |
(*##################################################################################
|
walther@60329
|
133 |
----------- 28.2.03: war nicht upgedatet und ausgeklammert in ROOT.ML-->Test_Isac.thy
|
walther@59847
|
134 |
|
walther@59847
|
135 |
(*Aufgabe zum Einstieg in die Arbeit...*)
|
walther@60242
|
136 |
val t = (Thm.term_of o the o (TermC.parse thy)) "a*b - (a+b)*x + x \<up> 2 = 0";
|
walther@59847
|
137 |
(*ein 'ruleset' aus Poly.ML wird angewandt...*)
|
walther@59847
|
138 |
val SOME (t,_) = rewrite_set_ thy Poly_erls false make_polynomial t;
|
walther@59868
|
139 |
UnparseC.term t;
|
walther@60329
|
140 |
"a * b + (- 1 * (a * x) + (- 1 * (b * x) + x \<up> 2)) = 0";
|
walther@59847
|
141 |
val SOME (t,_) =
|
walther@59997
|
142 |
rewrite_set_inst_ thy Poly_erls false [("bdv", "a")] make_polynomial_in t;
|
walther@59868
|
143 |
UnparseC.term t;
|
walther@60329
|
144 |
"x \<up> 2 + (- 1 * (b * x) + (- 1 * (x * a) + b * a)) = 0";
|
walther@59847
|
145 |
(* bei Verwendung von "size_of-term" nach MG :*)
|
walther@60329
|
146 |
(*"x \<up> 2 + (- 1 * (b * x) + (b * a + - 1 * (x * a))) = 0" !!! *)
|
walther@59847
|
147 |
|
walther@59847
|
148 |
(*wir holen 'a' wieder aus der Klammerung heraus...*)
|
walther@59847
|
149 |
val SOME (t,_) = rewrite_set_ thy Poly_erls false discard_parentheses t;
|
walther@59868
|
150 |
UnparseC.term t;
|
walther@60329
|
151 |
"x \<up> 2 + - 1 * b * x + - 1 * x * a + b * a = 0";
|
walther@60329
|
152 |
(* "x \<up> 2 + - 1 * b * x + b * a + - 1 * x * a = 0" !!! *)
|
walther@59847
|
153 |
|
walther@59847
|
154 |
val SOME (t,_) =
|
walther@59997
|
155 |
rewrite_set_inst_ thy Poly_erls false [("bdv", "a")] make_polynomial_in t;
|
walther@59868
|
156 |
UnparseC.term t;
|
walther@60329
|
157 |
"x \<up> 2 + (- 1 * (b * x) + a * (b + - 1 * x)) = 0";
|
walther@59847
|
158 |
(*da sind wir fast am Ziel: make_polynomial_in 'a' sollte ergeben
|
walther@60329
|
159 |
"x \<up> 2 + (- 1 * (b * x)) + (b + - 1 * x) * a = 0"*)
|
walther@59847
|
160 |
|
walther@59847
|
161 |
(*das rewriting l"asst sich beobachten mit
|
walther@60330
|
162 |
Rewrite.trace_on := false; (*true false*)
|
walther@59847
|
163 |
*)
|
walther@59847
|
164 |
|
walther@60329
|
165 |
"------ 15.11.02 --------------------------";
|
walther@60230
|
166 |
val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a * x + b * x";
|
walther@60230
|
167 |
val bdv = (Thm.term_of o the o (TermC.parse thy)) "bdv";
|
walther@60230
|
168 |
val a = (Thm.term_of o the o (TermC.parse thy)) "a";
|
walther@59847
|
169 |
|
walther@60330
|
170 |
Rewrite.trace_on := false; (*true false*)
|
walther@59847
|
171 |
(* Anwenden einer Regelmenge aus Termorder.ML: *)
|
walther@59847
|
172 |
val SOME (t,_) =
|
walther@59847
|
173 |
rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
|
walther@59868
|
174 |
UnparseC.term t;
|
walther@59847
|
175 |
val SOME (t,_) =
|
walther@59847
|
176 |
rewrite_set_ thy false discard_parentheses t;
|
walther@59868
|
177 |
UnparseC.term t;
|
walther@59847
|
178 |
"1 + b * x + x * a";
|
walther@59847
|
179 |
|
walther@60242
|
180 |
val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a * (x + b * x) + a \<up> 2";
|
walther@59847
|
181 |
val SOME (t,_) =
|
walther@59847
|
182 |
rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
|
walther@59868
|
183 |
UnparseC.term t;
|
walther@59847
|
184 |
val SOME (t,_) =
|
walther@59847
|
185 |
rewrite_set_ thy false discard_parentheses t;
|
walther@59868
|
186 |
UnparseC.term t;
|
walther@60242
|
187 |
"1 + (x + b * x) * a + a \<up> 2";
|
walther@59847
|
188 |
|
walther@60242
|
189 |
val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a \<up> 2 * x + b * a + 7*a \<up> 2";
|
walther@59847
|
190 |
val SOME (t,_) =
|
walther@59847
|
191 |
rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
|
walther@59868
|
192 |
UnparseC.term t;
|
walther@59847
|
193 |
val SOME (t,_) =
|
walther@59847
|
194 |
rewrite_set_ thy false discard_parentheses t;
|
walther@59868
|
195 |
UnparseC.term t;
|
walther@60242
|
196 |
"1 + b * a + (7 + x) * a \<up> 2";
|
walther@59847
|
197 |
|
walther@59847
|
198 |
(* MG2003
|
walther@59847
|
199 |
Prog_Expr.thy grundlegende Algebra
|
walther@59847
|
200 |
Poly.thy Polynome
|
walther@59847
|
201 |
Rational.thy Br"uche
|
walther@59847
|
202 |
Root.thy Wurzeln
|
walther@59847
|
203 |
RootRat.thy Wurzen + Br"uche
|
walther@59847
|
204 |
Termorder.thy BITTE NUR HIERHER SCHREIBEN (...WN03)
|
walther@59847
|
205 |
|
walther@59847
|
206 |
get_thm Termorder.thy "bdv_n_collect";
|
walther@59847
|
207 |
get_thm (theory "Isac_Knowledge") "bdv_n_collect";
|
walther@59847
|
208 |
*)
|
walther@60242
|
209 |
val t = (Thm.term_of o the o (TermC.parse thy)) "a \<up> 2 * x + 7 * a \<up> 2";
|
walther@59847
|
210 |
val SOME (t,_) =
|
walther@59847
|
211 |
rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
|
walther@59868
|
212 |
UnparseC.term t;
|
walther@59847
|
213 |
val SOME (t,_) =
|
walther@59847
|
214 |
rewrite_set_ thy false discard_parentheses t;
|
walther@59868
|
215 |
UnparseC.term t;
|
walther@60242
|
216 |
"(7 + x) * a \<up> 2";
|
walther@59847
|
217 |
|
walther@60230
|
218 |
val t = (Thm.term_of o the o (TermC.parse Termorder.thy)) "Pi";
|
walther@59847
|
219 |
|
walther@59847
|
220 |
val t = (Thm.term_of o the o (parseold thy)) "7";
|
walther@59847
|
221 |
##################################################################################*)
|
walther@59847
|
222 |
|
walther@59847
|
223 |
|
walther@59847
|
224 |
"----------- Matthias Goldgruber 2003 trials on rewrite orders -------------------------------";
|
walther@59847
|
225 |
"----------- Matthias Goldgruber 2003 trials on rewrite orders -------------------------------";
|
walther@59847
|
226 |
"----------- Matthias Goldgruber 2003 trials on rewrite orders -------------------------------";
|
walther@60230
|
227 |
val substa = [(TermC.empty, (Thm.term_of o the o (TermC.parse thy)) "a")];
|
walther@60230
|
228 |
val substb = [(TermC.empty, (Thm.term_of o the o (TermC.parse thy)) "b")];
|
walther@60230
|
229 |
val substx = [(TermC.empty, (Thm.term_of o the o (TermC.parse thy)) "x")];
|
walther@59847
|
230 |
|
walther@60230
|
231 |
val x1 = (Thm.term_of o the o (TermC.parse thy)) "a + b + x";
|
walther@60230
|
232 |
val x2 = (Thm.term_of o the o (TermC.parse thy)) "a + x + b";
|
walther@60230
|
233 |
val x3 = (Thm.term_of o the o (TermC.parse thy)) "a + x + b";
|
walther@60230
|
234 |
val x4 = (Thm.term_of o the o (TermC.parse thy)) "x + a + b";
|
walther@59847
|
235 |
|
walther@59847
|
236 |
if ord_make_polynomial_in true thy substx (x1,x2) = true(*LESS *) then ()
|
walther@59847
|
237 |
else error "termorder.sml diff.behav ord_make_polynomial_in #1";
|
walther@59847
|
238 |
|
walther@59847
|
239 |
if ord_make_polynomial_in true thy substa (x1,x2) = true(*LESS *) then ()
|
walther@59847
|
240 |
else error "termorder.sml diff.behav ord_make_polynomial_in #2";
|
walther@59847
|
241 |
|
walther@59847
|
242 |
if ord_make_polynomial_in true thy substb (x1,x2) = false(*GREATER*) then ()
|
walther@59847
|
243 |
else error "termorder.sml diff.behav ord_make_polynomial_in #3";
|
walther@59847
|
244 |
|
walther@60329
|
245 |
val aa = (Thm.term_of o the o (TermC.parse thy)) "- 1 * a * x";
|
walther@60242
|
246 |
val bb = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 3";
|
walther@59847
|
247 |
ord_make_polynomial_in true thy substx (aa, bb);
|
walther@59847
|
248 |
true; (* => LESS *)
|
walther@59847
|
249 |
|
walther@60329
|
250 |
val aa = (Thm.term_of o the o (TermC.parse thy)) "- 1 * a * x";
|
walther@60242
|
251 |
val bb = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 3";
|
walther@59847
|
252 |
ord_make_polynomial_in true thy substa (aa, bb);
|
walther@59847
|
253 |
false; (* => GREATER *)
|
walther@59847
|
254 |
|
walther@59847
|
255 |
(* und nach dem Re-engineering der Termorders in den 'rulesets'
|
walther@59847
|
256 |
kannst Du die 'gr"osste' Variable frei w"ahlen: *)
|
walther@60230
|
257 |
val bdv= (Thm.term_of o the o (TermC.parse thy)) "''bdv''";
|
walther@60230
|
258 |
val x = (Thm.term_of o the o (TermC.parse thy)) "x";
|
walther@60230
|
259 |
val a = (Thm.term_of o the o (TermC.parse thy)) "a";
|
walther@60230
|
260 |
val b = (Thm.term_of o the o (TermC.parse thy)) "b";
|
walther@59847
|
261 |
val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in x2;
|
walther@59868
|
262 |
if UnparseC.term t' = "b + x + a" then ()
|
walther@59847
|
263 |
else error "termorder.sml diff.behav ord_make_polynomial_in #11";
|
walther@59847
|
264 |
|
walther@59847
|
265 |
val NONE = rewrite_set_inst_ thy false [(bdv,b)] make_polynomial_in x2;
|
walther@59847
|
266 |
|
walther@59847
|
267 |
val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in x2;
|
walther@59868
|
268 |
if UnparseC.term t' = "a + b + x" then ()
|
walther@59847
|
269 |
else error "termorder.sml diff.behav ord_make_polynomial_in #13";
|
walther@59847
|
270 |
|
walther@60329
|
271 |
val ppp' = "-6 + -5*x + x \<up> 3 + - 1*x \<up> 2 + - 1*x \<up> 3 + - 14*x \<up> 2";
|
walther@60230
|
272 |
val ppp = (Thm.term_of o the o (TermC.parse thy)) ppp';
|
walther@59847
|
273 |
val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ppp;
|
walther@60329
|
274 |
if UnparseC.term t' = "-6 + -5 * x + - 15 * x \<up> 2 + 0" then ()
|
walther@59847
|
275 |
else error "termorder.sml diff.behav ord_make_polynomial_in #14";
|
walther@59847
|
276 |
|
walther@59847
|
277 |
val SOME (t', _) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ppp;
|
walther@60329
|
278 |
if UnparseC.term t' = "-6 + -5 * x + - 15 * x \<up> 2 + 0" then ()
|
walther@59847
|
279 |
else error "termorder.sml diff.behav ord_make_polynomial_in #15";
|
walther@59847
|
280 |
|
walther@59847
|
281 |
val ttt' = "(3*x + 5)/18";
|
walther@60230
|
282 |
val ttt = (Thm.term_of o the o (TermC.parse thy)) ttt';
|
walther@59847
|
283 |
val SOME (uuu,_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ttt;
|
walther@59868
|
284 |
if UnparseC.term uuu = "(5 + 3 * x) / 18" then ()
|
walther@59847
|
285 |
else error "termorder.sml diff.behav ord_make_polynomial_in #16a";
|
walther@59847
|
286 |
|
walther@59847
|
287 |
(*============ inhibit exn WN120316 ==============================================
|
walther@59847
|
288 |
val SOME (uuu,_) = rewrite_set_ thy false make_polynomial ttt;
|
walther@59868
|
289 |
if UnparseC.term uuu = "(5 + 3 * x) / 18" then ()
|
walther@59847
|
290 |
else error "termorder.sml diff.behav ord_make_polynomial_in #16b";
|
walther@59847
|
291 |
============ inhibit exn WN120316 ==============================================*)
|
walther@59847
|
292 |
|
walther@59847
|
293 |
|
walther@59627
|
294 |
"----------- lin.eq degree_0 -------------------------------------";
|
walther@59627
|
295 |
"----------- lin.eq degree_0 -------------------------------------";
|
walther@59627
|
296 |
"----------- lin.eq degree_0 -------------------------------------";
|
walther@59627
|
297 |
"----- d0_false ------";
|
walther@59627
|
298 |
val fmz = ["equality (1 = (0::real))", "solveFor x", "solutions L"];
|
walther@59997
|
299 |
val (dI',pI',mI') = ("PolyEq",["degree_0", "polynomial", "univariate", "equation"],
|
walther@59997
|
300 |
["PolyEq", "solve_d0_polyeq_equation"]);
|
walther@59871
|
301 |
(*=== inhibit exn WN110914: declare_constraints doesnt work with ThmC.numerals_to_Free ========
|
walther@60329
|
302 |
TODO: change to "equality (x + - 1*x = (0::real))"
|
walther@59627
|
303 |
and search for an appropriate problem and method.
|
walther@59627
|
304 |
|
walther@59627
|
305 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
306 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
307 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
308 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
309 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
310 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
311 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59959
|
312 |
case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[]")) => ()
|
walther@59627
|
313 |
| _ => error "polyeq.sml: diff.behav. in 1 = 0 -> []";
|
walther@59627
|
314 |
|
walther@59627
|
315 |
"----- d0_true ------";
|
walther@59997
|
316 |
val fmz = ["equality (0 = (0::real))", "solveFor x", "solutions L"];
|
walther@59997
|
317 |
val (dI',pI',mI') = ("PolyEq",["degree_0", "polynomial", "univariate", "equation"],
|
walther@59997
|
318 |
["PolyEq", "solve_d0_polyeq_equation"]);
|
walther@59627
|
319 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
320 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
321 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
322 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
323 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
324 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
325 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59959
|
326 |
case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"UniversalList")) => ()
|
walther@59627
|
327 |
| _ => error "polyeq.sml: diff.behav. in 0 = 0 -> UniversalList";
|
walther@59627
|
328 |
============ inhibit exn WN110914 ============================================*)
|
walther@59627
|
329 |
|
walther@59627
|
330 |
"----------- test thm's d2_pq_formulsxx[_neg]---------------------";
|
walther@59627
|
331 |
"----------- test thm's d2_pq_formulsxx[_neg]---------------------";
|
walther@59627
|
332 |
"----------- test thm's d2_pq_formulsxx[_neg]---------------------";
|
walther@59627
|
333 |
"----- d2_pqformula1 ------!!!!";
|
walther@60329
|
334 |
val fmz = ["equality (- 1/8 + (- 1/4)*z + z \<up> 2 = (0::real))", "solveFor z", "solutions L"];
|
walther@59627
|
335 |
val (dI',pI',mI') =
|
walther@59997
|
336 |
("Isac_Knowledge", ["pqFormula", "degree_2", "polynomial", "univariate", "equation"], ["no_met"]);
|
walther@59627
|
337 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
338 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
339 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
340 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
341 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
342 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
343 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
344 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*Apply_Method ["PolyEq", "solve_d2_polyeq_pq_equation"]*)
|
walther@59627
|
345 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
346 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
347 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
348 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
349 |
|
walther@60329
|
350 |
(*[z = 1 / 8 + sqrt (9 / 16) / 2, z = 1 / 8 + - 1 * sqrt (9 / 16) / 2] TODO sqrt*)
|
walther@59627
|
351 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt =..,Check_elementwise "Assumptions")*)
|
walther@59921
|
352 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59921
|
353 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59921
|
354 |
|
walther@59921
|
355 |
if p = ([], Res) andalso
|
walther@60329
|
356 |
f2str f = "[z = 1 / 8 + sqrt (9 / 16) / 2, z = 1 / 8 + - 1 * sqrt (9 / 16) / 2]" then
|
walther@60329
|
357 |
case nxt of End_Proof' => () | _ => error "(- 1/8 + (- 1/4)*z + z \<up> 2 = (0::real)) CHANGED 1"
|
walther@60329
|
358 |
else error "(- 1/8 + (- 1/4)*z + z \<up> 2 = (0::real)) CHANGED 2";
|
walther@59627
|
359 |
|
walther@60329
|
360 |
"----------- equality (2 +(- 1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
|
walther@60329
|
361 |
"----------- equality (2 +(- 1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
|
walther@60329
|
362 |
"----------- equality (2 +(- 1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
|
walther@59627
|
363 |
"----- d2_pqformula1_neg ------";
|
walther@60329
|
364 |
val fmz = ["equality (2 +(- 1)*x + x \<up> 2 = (0::real))", "solveFor x", "solutions L"];
|
walther@59997
|
365 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
366 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
367 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
368 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
369 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
370 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
371 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
372 |
(*### or2list False
|
walther@59627
|
373 |
([1],Res) False Or_to_List)*)
|
walther@59627
|
374 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
375 |
(*### or2list False
|
walther@59627
|
376 |
([2],Res) [] Check_elementwise "Assumptions"*)
|
walther@59627
|
377 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
378 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59844
|
379 |
val asm = Ctree.get_assumptions pt p;
|
walther@59627
|
380 |
if f2str f = "[]" andalso
|
walther@60329
|
381 |
UnparseC.terms asm = "[\"lhs (2 + - 1 * x + x \<up> 2 = 0) is_poly_in x\", " ^
|
walther@60329
|
382 |
"\"lhs (2 + - 1 * x + x \<up> 2 = 0) has_degree_in x = 2\"]" then ()
|
walther@60329
|
383 |
else error "polyeq.sml: diff.behav. in 2 +(- 1)*x + x \<up> 2 = 0";
|
walther@59627
|
384 |
|
walther@60329
|
385 |
"----------- equality (- 2 +(- 1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
|
walther@60329
|
386 |
"----------- equality (- 2 +(- 1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
|
walther@60329
|
387 |
"----------- equality (- 2 +(- 1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
|
walther@59627
|
388 |
"----- d2_pqformula2 ------";
|
walther@60329
|
389 |
val fmz = ["equality (- 2 +(- 1)*x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
390 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
391 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
392 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
393 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
394 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
395 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
396 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
397 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
398 |
|
walther@59627
|
399 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
400 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
401 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
402 |
case f of Test_Out.FormKF "[x = 2, x = - 1]" => ()
|
walther@60329
|
403 |
| _ => error "polyeq.sml: diff.behav. in - 2 + (- 1)*x + x^2 = 0 -> [x = 2, x = - 1]";
|
walther@59627
|
404 |
|
walther@59627
|
405 |
|
walther@60329
|
406 |
"----------- equality (- 2 + x + x \<up> 2 = 0) ---------------------------------------------------";
|
walther@60329
|
407 |
"----------- equality (- 2 + x + x \<up> 2 = 0) ---------------------------------------------------";
|
walther@60329
|
408 |
"----------- equality (- 2 + x + x \<up> 2 = 0) ---------------------------------------------------";
|
walther@59627
|
409 |
"----- d2_pqformula3 ------";
|
walther@59627
|
410 |
(*EP-9*)
|
walther@60329
|
411 |
val fmz = ["equality (- 2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
412 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
413 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
414 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
415 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
416 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
417 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
418 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
419 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
420 |
|
walther@59627
|
421 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
422 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
423 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
424 |
case f of Test_Out.FormKF "[x = 1, x = - 2]" => ()
|
walther@60329
|
425 |
| _ => error "polyeq.sml: diff.behav. in - 2 + x + x^2 = 0-> [x = 1, x = - 2]";
|
walther@59627
|
426 |
|
walther@59627
|
427 |
|
walther@60242
|
428 |
"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
429 |
"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
430 |
"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@59627
|
431 |
"----- d2_pqformula3_neg ------";
|
walther@60242
|
432 |
val fmz = ["equality (2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
433 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
434 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
435 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
436 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
437 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
438 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
439 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
440 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
441 |
|
walther@59627
|
442 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
443 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
444 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@60242
|
445 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@60242
|
446 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@59627
|
447 |
|
walther@60329
|
448 |
"----------- equality (- 2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
|
walther@60329
|
449 |
"----------- equality (- 2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
|
walther@60329
|
450 |
"----------- equality (- 2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
|
walther@59627
|
451 |
"----- d2_pqformula4 ------";
|
walther@60329
|
452 |
val fmz = ["equality (- 2 + x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
453 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
454 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
455 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
456 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
457 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
458 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
459 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
460 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
461 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
462 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
463 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
464 |
case f of Test_Out.FormKF "[x = 1, x = - 2]" => ()
|
walther@60329
|
465 |
| _ => error "polyeq.sml: diff.behav. in - 2 + x + 1*x \<up> 2 = 0 -> [x = 1, x = - 2]";
|
walther@59627
|
466 |
|
walther@60242
|
467 |
"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
468 |
"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
469 |
"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
|
walther@59627
|
470 |
"----- d2_pqformula5 ------";
|
walther@60242
|
471 |
val fmz = ["equality (1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
472 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
473 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
474 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
475 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
476 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
477 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
478 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
479 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
480 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
481 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
482 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
483 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
484 |
| _ => error "polyeq.sml: diff.behav. in 1*x + x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
485 |
|
walther@60242
|
486 |
"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
487 |
"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
|
walther@60242
|
488 |
"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
|
walther@59627
|
489 |
"----- d2_pqformula6 ------";
|
walther@60242
|
490 |
val fmz = ["equality (1*x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
491 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
492 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
493 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
494 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
495 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
496 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
497 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
498 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
499 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
500 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
501 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
502 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
503 |
| _ => error "polyeq.sml: diff.behav. in 1*x + 1*x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
504 |
|
walther@60242
|
505 |
"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
506 |
"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
507 |
"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
|
walther@59627
|
508 |
"----- d2_pqformula7 ------";
|
walther@60329
|
509 |
(*EP- 10*)
|
walther@60242
|
510 |
val fmz = ["equality ( x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
511 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
512 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
513 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
514 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
515 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
516 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
517 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
518 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
519 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
520 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
521 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
522 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
523 |
| _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
524 |
|
walther@60242
|
525 |
"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
526 |
"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
|
walther@60242
|
527 |
"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
|
walther@59627
|
528 |
"----- d2_pqformula8 ------";
|
walther@60242
|
529 |
val fmz = ["equality (x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
530 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
531 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
532 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
533 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
534 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
535 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
536 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
537 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
538 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
539 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
540 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
541 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
542 |
| _ => error "polyeq.sml: diff.behav. in x + 1*x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
543 |
|
walther@60242
|
544 |
"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60242
|
545 |
"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60242
|
546 |
"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
|
walther@59627
|
547 |
"----- d2_pqformula9 ------";
|
walther@60242
|
548 |
val fmz = ["equality (-4 + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
549 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
550 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
551 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
552 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
553 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
554 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
555 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
556 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
557 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
558 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
559 |
case f of Test_Out.FormKF "[x = 2, x = - 2]" => ()
|
walther@60329
|
560 |
| _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = - 2]";
|
walther@59627
|
561 |
|
walther@59627
|
562 |
|
walther@60242
|
563 |
"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60242
|
564 |
"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
|
walther@60242
|
565 |
"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
|
walther@59627
|
566 |
"----- d2_pqformula9_neg ------";
|
walther@60242
|
567 |
val fmz = ["equality (4 + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
568 |
val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
569 |
["PolyEq", "solve_d2_polyeq_pq_equation"]);
|
walther@59627
|
570 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
571 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
572 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
573 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
574 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
575 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
576 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
577 |
"TODO 4 + 1*x \<up> 2 = 0";
|
walther@60242
|
578 |
"TODO 4 + 1*x \<up> 2 = 0";
|
walther@60242
|
579 |
"TODO 4 + 1*x \<up> 2 = 0";
|
walther@59627
|
580 |
|
walther@59627
|
581 |
"-------------------- test thm's d2_abc_formulsxx[_neg]-----";
|
walther@59627
|
582 |
"-------------------- test thm's d2_abc_formulsxx[_neg]-----";
|
walther@59627
|
583 |
"-------------------- test thm's d2_abc_formulsxx[_neg]-----";
|
walther@60329
|
584 |
val fmz = ["equality (- 1 +(- 1)*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
585 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
586 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
587 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
588 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
589 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
590 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
591 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
592 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
593 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
594 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
595 |
case f of Test_Out.FormKF "[x = 1, x = - 1 / 2]" => ()
|
walther@60329
|
596 |
| _ => error "polyeq.sml: diff.behav. in - 1 + (- 1)*x + 2*x^2 = 0 -> [x = 1, x = - 1/2]";
|
walther@59627
|
597 |
|
walther@60329
|
598 |
"----------- equality (1 +(- 1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
|
walther@60329
|
599 |
"----------- equality (1 +(- 1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
|
walther@60329
|
600 |
"----------- equality (1 +(- 1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
|
walther@60329
|
601 |
val fmz = ["equality (1 +(- 1)*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
602 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
603 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
604 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
605 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
606 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
607 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
608 |
|
walther@59627
|
609 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
610 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
611 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
612 |
"TODO 1 +(- 1)*x + 2*x \<up> 2 = 0";
|
walther@60329
|
613 |
"TODO 1 +(- 1)*x + 2*x \<up> 2 = 0";
|
walther@60329
|
614 |
"TODO 1 +(- 1)*x + 2*x \<up> 2 = 0";
|
walther@59627
|
615 |
|
walther@59627
|
616 |
|
walther@60329
|
617 |
"----------- equality (- 1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
|
walther@60329
|
618 |
"----------- equality (- 1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
|
walther@60329
|
619 |
"----------- equality (- 1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
|
walther@60329
|
620 |
(*EP- 11*)
|
walther@60329
|
621 |
val fmz = ["equality (- 1 + x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
622 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
623 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
624 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
625 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
626 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
627 |
|
walther@59627
|
628 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
629 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
630 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
631 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
632 |
|
walther@59627
|
633 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
634 |
case f of Test_Out.FormKF "[x = 1 / 2, x = - 1]" => ()
|
walther@60329
|
635 |
| _ => error "polyeq.sml: diff.behav. in - 1 + x + 2*x^2 = 0 -> [x = 1/2, x = - 1]";
|
walther@59627
|
636 |
|
walther@59627
|
637 |
|
walther@60242
|
638 |
"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
|
walther@60242
|
639 |
"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
|
walther@60242
|
640 |
"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
|
walther@60242
|
641 |
val fmz = ["equality (1 + x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
642 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
643 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
644 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
645 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
646 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
647 |
|
walther@59627
|
648 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
649 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
650 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
651 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
652 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
653 |
"TODO 1 + x + 2*x \<up> 2 = 0";
|
walther@60242
|
654 |
"TODO 1 + x + 2*x \<up> 2 = 0";
|
walther@60242
|
655 |
"TODO 1 + x + 2*x \<up> 2 = 0";
|
walther@59627
|
656 |
|
walther@59627
|
657 |
|
walther@60329
|
658 |
val fmz = ["equality (- 2 + 1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
659 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
660 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
661 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
662 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
663 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
664 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
665 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
666 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
667 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
668 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
669 |
case f of Test_Out.FormKF "[x = 1, x = - 2]" => ()
|
walther@60329
|
670 |
| _ => error "polyeq.sml: diff.behav. in - 2 + 1*x + x^2 = 0 -> [x = 1, x = - 2]";
|
walther@59627
|
671 |
|
walther@60242
|
672 |
val fmz = ["equality ( 2 + 1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
673 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
674 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
675 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
676 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
677 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
678 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
679 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
680 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
681 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
682 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
683 |
"TODO 2 + 1*x + x \<up> 2 = 0";
|
walther@60242
|
684 |
"TODO 2 + 1*x + x \<up> 2 = 0";
|
walther@60242
|
685 |
"TODO 2 + 1*x + x \<up> 2 = 0";
|
walther@59627
|
686 |
|
walther@60329
|
687 |
(*EP- 12*)
|
walther@60329
|
688 |
val fmz = ["equality (- 2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
689 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
690 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
691 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
692 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
693 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
694 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
695 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
696 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
697 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
698 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
699 |
case f of Test_Out.FormKF "[x = 1, x = - 2]" => ()
|
walther@60329
|
700 |
| _ => error "polyeq.sml: diff.behav. in - 2 + x + x^2 = 0 -> [x = 1, x = - 2]";
|
walther@59627
|
701 |
|
walther@60242
|
702 |
val fmz = ["equality ( 2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
703 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
704 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
705 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
706 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
707 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
708 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
709 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
710 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
711 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
712 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
713 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@60242
|
714 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@60242
|
715 |
"TODO 2 + x + x \<up> 2 = 0";
|
walther@59627
|
716 |
|
walther@60329
|
717 |
(*EP- 13*)
|
walther@60242
|
718 |
val fmz = ["equality (-8 + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
719 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
720 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
721 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
722 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
723 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
724 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
725 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
726 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
727 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
728 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
729 |
case f of Test_Out.FormKF "[x = 2, x = - 2]" => ()
|
walther@60329
|
730 |
| _ => error "polyeq.sml: diff.behav. in -8 + 2*x^2 = 0 -> [x = 2, x = - 2]";
|
walther@59627
|
731 |
|
walther@60242
|
732 |
val fmz = ["equality ( 8+ 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
733 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
734 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
735 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
736 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
737 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
738 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
739 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
740 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
741 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
742 |
"TODO 8+ 2*x \<up> 2 = 0";
|
walther@60242
|
743 |
"TODO 8+ 2*x \<up> 2 = 0";
|
walther@60242
|
744 |
"TODO 8+ 2*x \<up> 2 = 0";
|
walther@59627
|
745 |
|
walther@60329
|
746 |
(*EP- 14*)
|
walther@60242
|
747 |
val fmz = ["equality (-4 + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
748 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
749 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
750 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
751 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
752 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
753 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
754 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
755 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
756 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
757 |
case f of Test_Out.FormKF "[x = 2, x = - 2]" => ()
|
walther@60329
|
758 |
| _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = - 2]";
|
walther@59627
|
759 |
|
walther@59627
|
760 |
|
walther@60242
|
761 |
val fmz = ["equality ( 4+ x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
762 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
763 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
764 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
765 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
766 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
767 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
768 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
769 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
770 |
"TODO 4+ x \<up> 2 = 0";
|
walther@60242
|
771 |
"TODO 4+ x \<up> 2 = 0";
|
walther@60242
|
772 |
"TODO 4+ x \<up> 2 = 0";
|
walther@59627
|
773 |
|
walther@60329
|
774 |
(*EP- 15*)
|
walther@60242
|
775 |
val fmz = ["equality (2*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
776 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
777 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
778 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
779 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
780 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
781 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
782 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
783 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
784 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
785 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
786 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
787 |
| _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
788 |
|
walther@60242
|
789 |
val fmz = ["equality (1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
790 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
791 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
792 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
793 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
794 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
795 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
796 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
797 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
798 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
799 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
800 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
801 |
| _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
802 |
|
walther@60329
|
803 |
(*EP- 16*)
|
walther@60242
|
804 |
val fmz = ["equality (x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
805 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
806 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
807 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
808 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
809 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
810 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
811 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
812 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
813 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
814 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
815 |
case f of Test_Out.FormKF "[x = 0, x = - 1 / 2]" => ()
|
walther@60329
|
816 |
| _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = - 1 / 2]";
|
walther@59627
|
817 |
|
walther@59627
|
818 |
(*EP-//*)
|
walther@60242
|
819 |
val fmz = ["equality (x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
|
walther@59997
|
820 |
val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
|
walther@59997
|
821 |
["PolyEq", "solve_d2_polyeq_abc_equation"]);
|
walther@59627
|
822 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
823 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
824 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
825 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
826 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
827 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
828 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
829 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
830 |
case f of Test_Out.FormKF "[x = 0, x = - 1]" => ()
|
walther@60329
|
831 |
| _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = - 1]";
|
walther@59627
|
832 |
|
walther@59627
|
833 |
|
walther@60242
|
834 |
"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
|
walther@60242
|
835 |
"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
|
walther@60242
|
836 |
"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
|
walther@59627
|
837 |
(*stopped du to TODO.txt WN111014.TODO calculate_Poly < calculate_Rational < calculate_RootRat
|
walther@59627
|
838 |
see --- val rls = calculate_RootRat > calculate_Rational ---
|
walther@59627
|
839 |
calculate_RootRat was a TODO with 2002, requires re-design.
|
walther@60242
|
840 |
see also --- (-8 - 2*x + x \<up> 2 = 0), by rewriting --- below
|
walther@59627
|
841 |
*)
|
walther@60242
|
842 |
val fmz = ["equality (-8 - 2*x + x \<up> 2 = 0)", (*Schalk 2, S.67 Nr.31.b*)
|
walther@59997
|
843 |
"solveFor x", "solutions L"];
|
walther@59627
|
844 |
val (dI',pI',mI') =
|
walther@59997
|
845 |
("PolyEq",["degree_2", "expanded", "univariate", "equation"],
|
walther@59997
|
846 |
["PolyEq", "complete_square"]);
|
walther@59627
|
847 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
848 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
849 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
850 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
851 |
|
walther@59627
|
852 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59997
|
853 |
(*Apply_Method ("PolyEq", "complete_square")*)
|
walther@59627
|
854 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
855 |
(*"-8 - 2 * x + x \<up> 2 = 0", nxt = Rewrite_Set_Inst ... "complete_square*)
|
walther@59627
|
856 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
857 |
(*"-8 + (2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2", nxt = Rewrite("square_explicit1"*)
|
walther@59627
|
858 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
859 |
(*"(2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2 - -8" nxt = Rewrite("root_plus_minus*)
|
walther@59627
|
860 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
861 |
(*"2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |
|
walther@60242
|
862 |
2 / 2 - x = - sqrt ((2 / 2) \<up> 2 - -8)" nxt = Rewr_Inst("bdv_explicit2"*)
|
walther@59627
|
863 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60242
|
864 |
(*"2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |
|
walther@60329
|
865 |
- 1*x = - (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8)"nxt = R_Inst("bdv_explt2"*)
|
walther@59627
|
866 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
867 |
(*"- 1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |
|
walther@60329
|
868 |
- 1 * x = (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))"nxt = bdv_explicit3*)
|
walther@59627
|
869 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
870 |
(*"- 1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |
|
walther@60329
|
871 |
x = - 1 * (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))" nxt = bdv_explicit3*)
|
walther@59627
|
872 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
873 |
(*"x = - 1 * (- (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8)) |
|
walther@60329
|
874 |
x = - 1 * (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))"nxt = calculate_Rational
|
walther@60242
|
875 |
NOT IMPLEMENTED SINCE 2002 ------------------------------ \<up> \<up> \<up> \<up> \<up> \<up> *)
|
walther@59627
|
876 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
877 |
(*"x = - 2 | x = 4" nxt = Or_to_List*)
|
walther@59627
|
878 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@60329
|
879 |
(*"[x = - 2, x = 4]" nxt = Check_Postcond*)
|
walther@59627
|
880 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f;
|
walther@59627
|
881 |
(* FIXXXME
|
walther@60329
|
882 |
case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x = - 2, x = 4]")) => () TODO
|
walther@60329
|
883 |
| _ => error "polyeq.sml: diff.behav. in [x = - 2, x = 4]";
|
walther@59627
|
884 |
*)
|
walther@59627
|
885 |
if f2str f =
|
walther@60329
|
886 |
"[x = - 1 * - 1 + - 1 * sqrt (2 \<up> 2 / 2 \<up> 2 - -8),\n x = - 1 * - 1 + - 1 * (- 1 * sqrt (2 \<up> 2 / 2 \<up> 2 - -8))]"
|
walther@60329
|
887 |
(*"[x = - 1 * - 1 + - 1 * sqrt (1 \<up> 2 - -8),\n x = - 1 * - 1 + - 1 * (- 1 * sqrt (1 \<up> 2 - -8))]"*)
|
walther@60329
|
888 |
then () else error "polyeq.sml corrected?behav. in [x = - 2, x = 4]";
|
walther@59627
|
889 |
|
walther@59627
|
890 |
|
walther@60242
|
891 |
"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
|
walther@60242
|
892 |
"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
|
walther@60242
|
893 |
"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
|
walther@59627
|
894 |
(*stopped du to TODO.txt WN111014.TODO calculate_Poly < calculate_Rational < calculate_RootRat
|
walther@59627
|
895 |
see --- val rls = calculate_RootRat > calculate_Rational ---*)
|
walther@59627
|
896 |
val thy = @{theory PolyEq};
|
walther@59627
|
897 |
val ctxt = Proof_Context.init_global thy;
|
walther@59627
|
898 |
val inst = [((the o (parseNEW ctxt)) "bdv::real", (the o (parseNEW ctxt)) "x::real")];
|
walther@60242
|
899 |
val t = (the o (parseNEW ctxt)) "-8 - 2*x + x \<up> 2 = (0::real)";
|
walther@59627
|
900 |
|
walther@59627
|
901 |
val rls = complete_square;
|
walther@59627
|
902 |
val SOME (t,asm) = rewrite_set_inst_ thy true inst rls t;
|
walther@60242
|
903 |
UnparseC.term t = "-8 + (2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2";
|
walther@59627
|
904 |
|
walther@59871
|
905 |
val thm = ThmC.numerals_to_Free @{thm square_explicit1};
|
walther@59851
|
906 |
val SOME (t,asm) = rewrite_ thy dummy_ord Rule_Set.Empty true thm t;
|
walther@60242
|
907 |
UnparseC.term t = "(2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2 - -8";
|
walther@59627
|
908 |
|
walther@59871
|
909 |
val thm = ThmC.numerals_to_Free @{thm root_plus_minus};
|
walther@59627
|
910 |
val SOME (t,asm) = rewrite_ thy dummy_ord PolyEq_erls true thm t;
|
walther@60242
|
911 |
UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
|
walther@60329
|
912 |
"\n2 / 2 - x = - 1 * sqrt ((2 / 2) \<up> 2 - -8)";
|
walther@59627
|
913 |
|
walther@59627
|
914 |
(*the thm bdv_explicit2* here required to be constrained to ::real*)
|
walther@59871
|
915 |
val thm = ThmC.numerals_to_Free @{thm bdv_explicit2};
|
walther@59851
|
916 |
val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
|
walther@60242
|
917 |
UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
|
walther@60329
|
918 |
"\n- 1 * x = - (2 / 2) + - 1 * sqrt ((2 / 2) \<up> 2 - -8)";
|
walther@59627
|
919 |
|
walther@59871
|
920 |
val thm = ThmC.numerals_to_Free @{thm bdv_explicit3};
|
walther@59851
|
921 |
val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
|
walther@60242
|
922 |
UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
|
walther@60329
|
923 |
"\nx = - 1 * (- (2 / 2) + - 1 * sqrt ((2 / 2) \<up> 2 - -8))";
|
walther@59627
|
924 |
|
walther@59871
|
925 |
val thm = ThmC.numerals_to_Free @{thm bdv_explicit2};
|
walther@59851
|
926 |
val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
|
walther@60329
|
927 |
UnparseC.term t = "- 1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |"^
|
walther@60329
|
928 |
"\nx = - 1 * (- (2 / 2) + - 1 * sqrt ((2 / 2) \<up> 2 - -8))";
|
walther@59627
|
929 |
|
walther@59627
|
930 |
val rls = calculate_RootRat;
|
walther@59627
|
931 |
val SOME (t,asm) = rewrite_set_ thy true rls t;
|
walther@59868
|
932 |
if UnparseC.term t =
|
walther@60329
|
933 |
"- 1 * x = - 1 + sqrt (2 \<up> 2 / 2 \<up> 2 - -8) \<or>\nx = - 1 * - 1 + - 1 * (- 1 * sqrt (2 \<up> 2 / 2 \<up> 2 - -8))"
|
walther@60329
|
934 |
(*"- 1 * x = - 1 + sqrt (2 \<up> 2 / 2 \<up> 2 - -8) |\nx = - 1 * - 1 + - 1 * (- 1 * sqrt (2 \<up> 2 / 2 \<up> 2 - -8))"..isabisac15*)
|
walther@60242
|
935 |
then () else error "(-8 - 2*x + x \<up> 2 = 0), by rewriting -- ERROR INDICATES IMPROVEMENT";
|
walther@60329
|
936 |
(*SHOULD BE: UnparseC.term = "x = - 2 | x = 4;*)
|
walther@59627
|
937 |
|
walther@59627
|
938 |
|
walther@60242
|
939 |
"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
|
walther@60242
|
940 |
"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
|
walther@60242
|
941 |
"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
|
walther@59627
|
942 |
"---- test the erls ----";
|
walther@60242
|
943 |
val t1 = (Thm.term_of o the o (TermC.parse thy)) "0 <= (10/3/2) \<up> 2 - 1";
|
walther@59627
|
944 |
val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_erls t1;
|
walther@59868
|
945 |
val t' = UnparseC.term t;
|
wenzelm@60309
|
946 |
(*if t'= \<^const_name>\<open>True\<close> then ()
|
walther@59627
|
947 |
else error "polyeq.sml: diff.behav. in 'rewrite_set_.. PolyEq_erls";*)
|
walther@59627
|
948 |
(* *)
|
walther@60242
|
949 |
val fmz = ["equality (3 - 10*x + 3*x \<up> 2 = 0)",
|
walther@59997
|
950 |
"solveFor x", "solutions L"];
|
walther@59627
|
951 |
val (dI',pI',mI') =
|
walther@59997
|
952 |
("PolyEq",["degree_2", "expanded", "univariate", "equation"],
|
walther@59997
|
953 |
["PolyEq", "complete_square"]);
|
walther@59627
|
954 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
955 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
956 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
957 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
958 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
959 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
960 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
961 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59997
|
962 |
(*Apply_Method ("PolyEq", "complete_square")*)
|
walther@59627
|
963 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f;
|
walther@59627
|
964 |
|
walther@60329
|
965 |
"----------- (- 16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
|
walther@60329
|
966 |
"----------- (- 16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
|
walther@60329
|
967 |
"----------- (- 16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
|
walther@60329
|
968 |
val fmz = ["equality (- 16 + 4*x + 2*x \<up> 2 = 0)",
|
walther@59997
|
969 |
"solveFor x", "solutions L"];
|
walther@59627
|
970 |
val (dI',pI',mI') =
|
walther@59997
|
971 |
("PolyEq",["degree_2", "expanded", "univariate", "equation"],
|
walther@59997
|
972 |
["PolyEq", "complete_square"]);
|
walther@59627
|
973 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
walther@59627
|
974 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
975 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
976 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
977 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
978 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
979 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
980 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59997
|
981 |
(*Apply_Method ("PolyEq", "complete_square")*)
|
walther@59627
|
982 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
983 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
984 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
985 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
986 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
987 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
988 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
989 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
990 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
991 |
val (p,_,f,nxt,_,pt) = me nxt p [] pt;
|
walther@59627
|
992 |
(* FIXXXXME n1.,
|
walther@59959
|
993 |
case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x = 2, x = -4]")) => () TODO
|
walther@59627
|
994 |
| _ => error "polyeq.sml: diff.behav. in [x = 2, x = -4]";
|
walther@59627
|
995 |
*)
|
walther@59627
|
996 |
|