1.1 --- a/src/Tools/isac/Knowledge/Biegelinie.thy Mon Apr 19 20:44:18 2021 +0200
1.2 +++ b/src/Tools/isac/Knowledge/Biegelinie.thy Tue Apr 20 16:58:44 2021 +0200
1.3 @@ -370,8 +370,8 @@
1.4 \<close>
1.5 subsection \<open>Transform an equality into a function\<close>
1.6
1.7 - (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) (M_b L = 0) -->
1.8 - 0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
1.9 + (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) (M_b L = 0) -->
1.10 + 0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2*)
1.11 partial_function (tailrec) function_to_equality :: "bool \<Rightarrow> bool \<Rightarrow> bool"
1.12 where
1.13 "function_to_equality fu_n su_b = (
1.14 @@ -379,7 +379,7 @@
1.15 fu_n = Take fu_n;
1.16 bd_v = argument_in (lhs fu_n);
1.17 va_l = argument_in (lhs su_b);
1.18 - eq_u = Substitute [bd_v = va_l] fu_n; \<comment> \<open>([1], Res), M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2\<close>
1.19 + eq_u = Substitute [bd_v = va_l] fu_n; \<comment> \<open>([1], Res), M_b L = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2\<close>
1.20 eq_u = Substitute [su_b] eq_u
1.21 in
1.22 (Rewrite_Set ''norm_Rational'') eq_u)"
1.23 @@ -393,8 +393,8 @@
1.24 [Rule.Eval("Prog_Expr.lhs", Prog_Expr.eval_lhs "eval_lhs_"),
1.25 Rule.Eval("Prog_Expr.argument'_in", Prog_Expr.eval_argument_in "Prog_Expr.argument'_in")],
1.26 prls=Rule_Set.empty, crls = Atools_erls, errpats = [], nrls = Rule_Set.empty},
1.27 - (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) (M_b L = 0) -->
1.28 - 0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
1.29 + (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) (M_b L = 0) -->
1.30 + 0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2*)
1.31 @{thm function_to_equality.simps})]
1.32 \<close>
1.33 ML \<open>
2.1 --- a/src/Tools/isac/Knowledge/Build_Thydata.thy Mon Apr 19 20:44:18 2021 +0200
2.2 +++ b/src/Tools/isac/Knowledge/Build_Thydata.thy Tue Apr 20 16:58:44 2021 +0200
2.3 @@ -119,7 +119,7 @@
2.4 [("chain-rule-diff-both",
2.5 [TermC.parse_patt @{theory Diff} "d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)",
2.6 TermC.parse_patt @{theory Diff} "d_d ?bdv (cos ?u) = - sin (d_d ?bdv ?u)",
2.7 - TermC.parse_patt @{theory Diff} "d_d ?bdv (?u ^^^ ?n) = ?n * ?u ^^^ (?n - 1)",
2.8 + TermC.parse_patt @{theory Diff} "d_d ?bdv (?u \<up> ?n) = ?n * ?u \<up> (?n - 1)",
2.9 TermC.parse_patt @{theory Diff} "d_d ?bdv (LogExp.ln ?u) = 1 / ?u",
2.10 TermC.parse_patt @{theory Diff} "d_d ?bdv (LogExp.ln ?u) = 1 / d_d ?bdv ?u"],
2.11 [@{thm diff_sin_chain}, @{thm diff_cos_chain}, @{thm diff_pow_chain}, @{thm diff_ln_chain},
3.1 --- a/src/Tools/isac/Knowledge/Diff.thy Mon Apr 19 20:44:18 2021 +0200
3.2 +++ b/src/Tools/isac/Knowledge/Diff.thy Tue Apr 20 16:58:44 2021 +0200
3.3 @@ -19,7 +19,7 @@
3.4 (*predicates*)
3.5 primed :: "'a => 'a" (*"primed A" -> "A'"*)
3.6
3.7 - (*the CAS-commands, eg. "Diff (2*x^^^3, x)",
3.8 + (*the CAS-commands, eg. "Diff (2*x \<up> 3, x)",
3.9 "Differentiate (A = s * (a - s), s)"*)
3.10 Diff :: "[real * real] => real"
3.11 Differentiate :: "[bool * real] => bool"
3.12 @@ -52,14 +52,14 @@
3.13 diff_dif: "d_d bdv (u - v) = d_d bdv u - d_d bdv v" and
3.14 diff_prod: "d_d bdv (u * v) = d_d bdv u * v + u * d_d bdv v" and
3.15 diff_quot: "Not (v = 0) ==> (d_d bdv (u / v) =
3.16 - (d_d bdv u * v - u * d_d bdv v) / v ^^^ 2)" and
3.17 + (d_d bdv u * v - u * d_d bdv v) / v \<up> 2)" and
3.18
3.19 diff_sin: "d_d bdv (sin bdv) = cos bdv" and
3.20 diff_sin_chain: "d_d bdv (sin u) = cos u * d_d bdv u" and
3.21 diff_cos: "d_d bdv (cos bdv) = - sin bdv" and
3.22 diff_cos_chain: "d_d bdv (cos u) = - sin u * d_d bdv u" and
3.23 - diff_pow: "d_d bdv (bdv ^^^ n) = n * (bdv ^^^ (n - 1))" and
3.24 - diff_pow_chain: "d_d bdv (u ^^^ n) = n * (u ^^^ (n - 1)) * d_d bdv u" and
3.25 + diff_pow: "d_d bdv (bdv \<up> n) = n * (bdv \<up> (n - 1))" and
3.26 + diff_pow_chain: "d_d bdv (u \<up> n) = n * (u \<up> (n - 1)) * d_d bdv u" and
3.27 diff_ln: "d_d bdv (ln bdv) = 1 / bdv" and
3.28 diff_ln_chain: "d_d bdv (ln u) = d_d bdv u / u" and
3.29 diff_exp: "d_d bdv (exp bdv) = exp bdv" and
3.30 @@ -71,18 +71,18 @@
3.31 (*...*)
3.32
3.33 frac_conv: "[| bdv occurs_in b; 0 < n |] ==>
3.34 - a / (b ^^^ n) = a * b ^^^ (-n)" and
3.35 - frac_sym_conv: "n < 0 ==> a * b ^^^ n = a / b ^^^ (-n)" and
3.36 + a / (b \<up> n) = a * b \<up> (-n)" and
3.37 + frac_sym_conv: "n < 0 ==> a * b \<up> n = a / b \<up> (-n)" and
3.38
3.39 - sqrt_conv_bdv: "sqrt bdv = bdv ^^^ (1 / 2)" and
3.40 - sqrt_conv_bdv_n: "sqrt (bdv ^^^ n) = bdv ^^^ (n / 2)" and
3.41 - sqrt_conv: "bdv occurs_in u ==> sqrt u = u ^^^ (1 / 2)" and
3.42 - sqrt_sym_conv: "u ^^^ (a / 2) = sqrt (u ^^^ a)" and
3.43 + sqrt_conv_bdv: "sqrt bdv = bdv \<up> (1 / 2)" and
3.44 + sqrt_conv_bdv_n: "sqrt (bdv \<up> n) = bdv \<up> (n / 2)" and
3.45 + sqrt_conv: "bdv occurs_in u ==> sqrt u = u \<up> (1 / 2)" and
3.46 + sqrt_sym_conv: "u \<up> (a / 2) = sqrt (u \<up> a)" and
3.47
3.48 - root_conv: "bdv occurs_in u ==> nroot n u = u ^^^ (1 / n)" and
3.49 - root_sym_conv: "u ^^^ (a / b) = nroot b (u ^^^ a)" and
3.50 + root_conv: "bdv occurs_in u ==> nroot n u = u \<up> (1 / n)" and
3.51 + root_sym_conv: "u \<up> (a / b) = nroot b (u \<up> a)" and
3.52
3.53 - realpow_pow_bdv: "(bdv ^^^ b) ^^^ c = bdv ^^^ (b * c)"
3.54 + realpow_pow_bdv: "(bdv \<up> b) \<up> c = bdv \<up> (b * c)"
3.55
3.56 ML \<open>
3.57 val thy = @{theory};
3.58 @@ -120,17 +120,17 @@
3.59 srls = Rule_Set.Empty, calc = [], errpatts = [],
3.60 rules =
3.61 [Rule.Thm ("frac_conv", ThmC.numerals_to_Free @{thm frac_conv}),
3.62 - (*"?bdv occurs_in ?b \<Longrightarrow> 0 < ?n \<Longrightarrow> ?a / ?b ^^^ ?n = ?a * ?b ^^^ - ?n"*)
3.63 + (*"?bdv occurs_in ?b \<Longrightarrow> 0 < ?n \<Longrightarrow> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n"*)
3.64 Rule.Thm ("sqrt_conv_bdv", ThmC.numerals_to_Free @{thm sqrt_conv_bdv}),
3.65 - (*"sqrt ?bdv = ?bdv ^^^ (1 / 2)"*)
3.66 + (*"sqrt ?bdv = ?bdv \<up> (1 / 2)"*)
3.67 Rule.Thm ("sqrt_conv_bdv_n", ThmC.numerals_to_Free @{thm sqrt_conv_bdv_n}),
3.68 - (*"sqrt (?bdv ^^^ ?n) = ?bdv ^^^ (?n / 2)"*)
3.69 + (*"sqrt (?bdv \<up> ?n) = ?bdv \<up> (?n / 2)"*)
3.70 Rule.Thm ("sqrt_conv", ThmC.numerals_to_Free @{thm sqrt_conv}),
3.71 - (*"?bdv occurs_in ?u \<Longrightarrow> sqrt ?u = ?u ^^^ (1 / 2)"*)
3.72 + (*"?bdv occurs_in ?u \<Longrightarrow> sqrt ?u = ?u \<up> (1 / 2)"*)
3.73 Rule.Thm ("root_conv", ThmC.numerals_to_Free @{thm root_conv}),
3.74 - (*"?bdv occurs_in ?u \<Longrightarrow> nroot ?n ?u = ?u ^^^ (1 / ?n)"*)
3.75 + (*"?bdv occurs_in ?u \<Longrightarrow> nroot ?n ?u = ?u \<up> (1 / ?n)"*)
3.76 Rule.Thm ("realpow_pow_bdv", ThmC.numerals_to_Free @{thm realpow_pow_bdv}),
3.77 - (* "(?bdv ^^^ ?b) ^^^ ?c = ?bdv ^^^ (?b * ?c)"*)
3.78 + (* "(?bdv \<up> ?b) \<up> ?c = ?bdv \<up> (?b * ?c)"*)
3.79 Rule.Eval ("Groups.times_class.times", (**)eval_binop "#mult_"),
3.80 Rule.Thm ("rat_mult",ThmC.numerals_to_Free @{thm rat_mult}),
3.81 (*a / b * (c / d) = a * c / (b * d)*)
4.1 --- a/src/Tools/isac/Knowledge/Integrate.thy Mon Apr 19 20:44:18 2021 +0200
4.2 +++ b/src/Tools/isac/Knowledge/Integrate.thy Tue Apr 20 16:58:44 2021 +0200
4.3 @@ -26,7 +26,7 @@
4.4 specifically as a 'bound variable' *)
4.5
4.6 integral_const: "Not (bdv occurs_in u) ==> Integral u D bdv = u * bdv" and
4.7 - integral_var: "Integral bdv D bdv = bdv ^^^ 2 / 2" and
4.8 + integral_var: "Integral bdv D bdv = bdv \<up> 2 / 2" and
4.9
4.10 integral_add: "Integral (u + v) D bdv =
4.11 (Integral u D bdv) + (Integral v D bdv)" and
4.12 @@ -36,7 +36,7 @@
4.13 call_for_new_c: "[| Not (matches (u + new_c v) a); Not (a is_f_x) |] ==>
4.14 a = a + new_c a"
4.15 *)
4.16 - integral_pow: "Integral bdv ^^^ n D bdv = bdv ^^^ (n+1) / (n + 1)"
4.17 + integral_pow: "Integral bdv \<up> n D bdv = bdv \<up> (n+1) / (n + 1)"
4.18
4.19 ML \<open>
4.20 val thy = @{theory};
5.1 --- a/src/Tools/isac/Knowledge/Inverse_Z_Transform.thy Mon Apr 19 20:44:18 2021 +0200
5.2 +++ b/src/Tools/isac/Knowledge/Inverse_Z_Transform.thy Tue Apr 20 16:58:44 2021 +0200
5.3 @@ -9,10 +9,10 @@
5.4 rule1: "1 = \<delta>[n]" and
5.5 rule2: "|| z || > 1 ==> z / (z - 1) = u [n]" and
5.6 rule3: "|| z || < 1 ==> z / (z - 1) = -u [-n - 1]" and
5.7 - rule4: "c * (z / (z - \<alpha>)) = c * \<alpha>^^^n * u [n]" and
5.8 - rule5: "|| z || < || \<alpha> || ==> z / (z - \<alpha>) = -(\<alpha>^^^n) * u [-n - 1]" and
5.9 - rule6: "|| z || > 1 ==> z/(z - 1)^^^2 = n * u [n]" (*and
5.10 - rule42: "(a * (z/(z-b)) + c * (z/(z-d))) = (a * b^^^n * u [n] + c * d^^^n * u [n])"*)
5.11 + rule4: "c * (z / (z - \<alpha>)) = c * \<alpha> \<up> n * u [n]" and
5.12 + rule5: "|| z || < || \<alpha> || ==> z / (z - \<alpha>) = -(\<alpha> \<up> n) * u [-n - 1]" and
5.13 + rule6: "|| z || > 1 ==> z/(z - 1) \<up> 2 = n * u [n]" (*and
5.14 + rule42: "(a * (z/(z-b)) + c * (z/(z-d))) = (a * b \<up> n * u [n] + c * d \<up> n * u [n])"*)
5.15
5.16 axiomatization where
5.17 (*ruleZY: "(X z = a / b) = (d_d z X = a / (z * b))" ..looks better, but types are flawed*)
6.1 --- a/src/Tools/isac/Knowledge/LinEq.thy Mon Apr 19 20:44:18 2021 +0200
6.2 +++ b/src/Tools/isac/Knowledge/LinEq.thy Tue Apr 20 16:58:44 2021 +0200
6.3 @@ -13,7 +13,7 @@
6.4 (*-- normalise --*)
6.5 (*WN0509 compare PolyEq.all_left "[|Not(b=!=0)|] ==> (a = b) = (a - b = 0)"*)
6.6 all_left: "[|Not(b=!=0)|] ==> (a=b) = (a+(-1)*b=0)" and
6.7 - makex1_x: "a^^^1 = a" and
6.8 + makex1_x: "a \<up> 1 = a" and
6.9 real_assoc_1: "a+(b+c) = a+b+c" and
6.10 real_assoc_2: "a*(b*c) = a*b*c" and
6.11
7.1 --- a/src/Tools/isac/Knowledge/LogExp.thy Mon Apr 19 20:44:18 2021 +0200
7.2 +++ b/src/Tools/isac/Knowledge/LogExp.thy Tue Apr 20 16:58:44 2021 +0200
7.3 @@ -7,15 +7,15 @@
7.4 consts
7.5
7.6 ln :: "real => real"
7.7 - exp :: "real => real" ("E'_ ^^^ _" 80)
7.8 + exp :: "real => real" ("E'_ \<up> _" 80)
7.9 alog :: "[real, real] => real" ("_ log _" 90)
7.10
7.11 axiomatization where
7.12
7.13 - equality_pow: "0 < a ==> (l = r) = (a^^^l = a^^^r)" and
7.14 - (* this is what students ^^^^^^^... are told to do *)
7.15 - equality_power: "((a log b) = c) = (a^^^(a log b) = a^^^c)" and
7.16 - exp_invers_log: "a^^^(a log b) = b"
7.17 + equality_pow: "0 < a ==> (l = r) = (a \<up> l = a \<up> r)" and
7.18 + (* this is what students \<up> \<up> ^... are told to do *)
7.19 + equality_power: "((a log b) = c) = (a \<up> (a log b) = a \<up> c)" and
7.20 + exp_invers_log: "a \<up> (a log b) = b"
7.21
7.22 ML \<open>
7.23 val thy = @{theory};
8.1 --- a/src/Tools/isac/Knowledge/Poly.thy Mon Apr 19 20:44:18 2021 +0200
8.2 +++ b/src/Tools/isac/Knowledge/Poly.thy Tue Apr 20 16:58:44 2021 +0200
8.3 @@ -3,7 +3,7 @@
8.4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8.5 !!! THIS IS THE _least_ NUMBER OF ADDITIONAL THEOREMS !!!
8.6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8.7 - xxxI contain ^^^ instead of ^ in the respective theorem xxx in 2002
8.8 + xxxI contain \<up> instead of ^ in the respective theorem xxx in 2002
8.9 changed by: Richard Lang 020912
8.10 *)
8.11
8.12 @@ -30,24 +30,24 @@
8.13 not (a_n = 0), some a_i may be zero (ie. monomials disappear),
8.14 exponents and coefficients equal 1 are not (WN060904.TODO in cancel_p_)shown,
8.15 and variables in monomials are lexicographically ordered
8.16 - examples: [1]: "1 + (-10) * x ^^^ 1 + 25 * x ^^^ 2"
8.17 - [1]: "11 + 0 * x ^^^ 1 + 1 * x ^^^ 2"
8.18 - [2]: "x + (-50) * x ^^^ 3"
8.19 - [2]: "(-1) * x * y ^^^ 2 + 7 * x ^^^ 3"
8.20 + examples: [1]: "1 + (-10) * x \<up> 1 + 25 * x \<up> 2"
8.21 + [1]: "11 + 0 * x \<up> 1 + 1 * x \<up> 2"
8.22 + [2]: "x + (-50) * x \<up> 3"
8.23 + [2]: "(-1) * x * y \<up> 2 + 7 * x \<up> 3"
8.24
8.25 [3] 'expanded_term' (Ausmultiplizierter Term):
8.26 pull out unary minus to binary minus,
8.27 as frequently exercised in schools; other conditions for [2] hold however
8.28 - examples: "a ^^^ 2 - 2 * a * b + b ^^^ 2"
8.29 - "4 * x ^^^ 2 - 9 * y ^^^ 2"
8.30 + examples: "a \<up> 2 - 2 * a * b + b \<up> 2"
8.31 + "4 * x \<up> 2 - 9 * y \<up> 2"
8.32 [4] 'polynomial_in' (Polynom in):
8.33 polynomial in 1 variable with arbitrary coefficients
8.34 - examples: "2 * x + (-50) * x ^^^ 3" (poly in x)
8.35 - "(u + v) + (2 * u ^^^ 2) * a + (-u) * a ^^^ 2 (poly in a)
8.36 + examples: "2 * x + (-50) * x \<up> 3" (poly in x)
8.37 + "(u + v) + (2 * u \<up> 2) * a + (-u) * a \<up> 2 (poly in a)
8.38 [5] 'expanded_in' (Ausmultiplizierter Termin in):
8.39 analoguous to [3] with binary minus like [3]
8.40 - examples: "2 * x - 50 * x ^^^ 3" (expanded in x)
8.41 - "(u + v) + (2 * u ^^^ 2) * a - u * a ^^^ 2 (expanded in a)
8.42 + examples: "2 * x - 50 * x \<up> 3" (expanded in x)
8.43 + "(u + v) + (2 * u \<up> 2) * a - u * a \<up> 2 (expanded in a)
8.44 \<close>
8.45 subsection \<open>consts definition for predicates in specifications\<close>
8.46 consts
8.47 @@ -64,38 +64,38 @@
8.48 subsection \<open>theorems not yet adopted from Isabelle\<close>
8.49 axiomatization where (*.not contained in Isabelle2002,
8.50 stated as axioms, TODO: prove as theorems;
8.51 - theorem-IDs 'xxxI' with ^^^ instead of ^ in 'xxx' in Isabelle2002.*)
8.52 + theorem-IDs 'xxxI' with \<up> instead of ^ in 'xxx' in Isabelle2002.*)
8.53
8.54 - realpow_pow: "(a ^^^ b) ^^^ c = a ^^^ (b * c)" and
8.55 - realpow_addI: "r ^^^ (n + m) = r ^^^ n * r ^^^ m" and
8.56 - realpow_addI_assoc_l: "r ^^^ n * (r ^^^ m * s) = r ^^^ (n + m) * s" and
8.57 - realpow_addI_assoc_r: "s * r ^^^ n * r ^^^ m = s * r ^^^ (n + m)" and
8.58 + realpow_pow: "(a \<up> b) \<up> c = a \<up> (b * c)" and
8.59 + realpow_addI: "r \<up> (n + m) = r \<up> n * r \<up> m" and
8.60 + realpow_addI_assoc_l: "r \<up> n * (r \<up> m * s) = r \<up> (n + m) * s" and
8.61 + realpow_addI_assoc_r: "s * r \<up> n * r \<up> m = s * r \<up> (n + m)" and
8.62
8.63 - realpow_oneI: "r ^^^ 1 = r" and
8.64 - realpow_zeroI: "r ^^^ 0 = 1" and
8.65 - realpow_eq_oneI: "1 ^^^ n = 1" and
8.66 - realpow_multI: "(r * s) ^^^ n = r ^^^ n * s ^^^ n" and
8.67 + realpow_oneI: "r \<up> 1 = r" and
8.68 + realpow_zeroI: "r \<up> 0 = 1" and
8.69 + realpow_eq_oneI: "1 \<up> n = 1" and
8.70 + realpow_multI: "(r * s) \<up> n = r \<up> n * s \<up> n" and
8.71 realpow_multI_poly: "[| r is_polyexp; s is_polyexp |] ==>
8.72 - (r * s) ^^^ n = r ^^^ n * s ^^^ n" and
8.73 - realpow_minus_oneI: "(- 1) ^^^ (2 * n) = 1" and
8.74 + (r * s) \<up> n = r \<up> n * s \<up> n" and
8.75 + realpow_minus_oneI: "(- 1) \<up> (2 * n) = 1" and
8.76 real_diff_0: "0 - x = - (x::real)" and
8.77
8.78 - realpow_twoI: "r ^^^ 2 = r * r" and
8.79 - realpow_twoI_assoc_l: "r * (r * s) = r ^^^ 2 * s" and
8.80 - realpow_twoI_assoc_r: "s * r * r = s * r ^^^ 2" and
8.81 - realpow_two_atom: "r is_atom ==> r * r = r ^^^ 2" and
8.82 - realpow_plus_1: "r * r ^^^ n = r ^^^ (n + 1)" and
8.83 - realpow_plus_1_assoc_l: "r * (r ^^^ m * s) = r ^^^ (1 + m) * s" and
8.84 - realpow_plus_1_assoc_l2: "r ^^^ m * (r * s) = r ^^^ (1 + m) * s" and
8.85 - realpow_plus_1_assoc_r: "s * r * r ^^^ m = s * r ^^^ (1 + m)" and
8.86 - realpow_plus_1_atom: "r is_atom ==> r * r ^^^ n = r ^^^ (1 + n)" and
8.87 + realpow_twoI: "r \<up> 2 = r * r" and
8.88 + realpow_twoI_assoc_l: "r * (r * s) = r \<up> 2 * s" and
8.89 + realpow_twoI_assoc_r: "s * r * r = s * r \<up> 2" and
8.90 + realpow_two_atom: "r is_atom ==> r * r = r \<up> 2" and
8.91 + realpow_plus_1: "r * r \<up> n = r \<up> (n + 1)" and
8.92 + realpow_plus_1_assoc_l: "r * (r \<up> m * s) = r \<up> (1 + m) * s" and
8.93 + realpow_plus_1_assoc_l2: "r \<up> m * (r * s) = r \<up> (1 + m) * s" and
8.94 + realpow_plus_1_assoc_r: "s * r * r \<up> m = s * r \<up> (1 + m)" and
8.95 + realpow_plus_1_atom: "r is_atom ==> r * r \<up> n = r \<up> (1 + n)" and
8.96 realpow_def_atom: "[| Not (r is_atom); 1 < n |]
8.97 - ==> r ^^^ n = r * r ^^^ (n + -1)" and
8.98 - realpow_addI_atom: "r is_atom ==> r ^^^ n * r ^^^ m = r ^^^ (n + m)" and
8.99 + ==> r \<up> n = r * r \<up> (n + -1)" and
8.100 + realpow_addI_atom: "r is_atom ==> r \<up> n * r \<up> m = r \<up> (n + m)" and
8.101
8.102
8.103 - realpow_minus_even: "n is_even ==> (- r) ^^^ n = r ^^^ n" and
8.104 - realpow_minus_odd: "Not (n is_even) ==> (- r) ^^^ n = -1 * r ^^^ n" and
8.105 + realpow_minus_even: "n is_even ==> (- r) \<up> n = r \<up> n" and
8.106 + realpow_minus_odd: "Not (n is_even) ==> (- r) \<up> n = -1 * r \<up> n" and
8.107
8.108
8.109 (* RL 020914 *)
8.110 @@ -103,44 +103,44 @@
8.111 real_pm_binom_times: "(a + b)*(c - d) = a*c - a*d + b*c - b*d" and
8.112 real_mp_binom_times: "(a - b)*(c + d) = a*c + a*d - b*c - b*d" and
8.113 real_mm_binom_times: "(a - b)*(c - d) = a*c - a*d - b*c + b*d" and
8.114 - real_plus_binom_pow3: "(a + b)^^^3 = a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3" and
8.115 + real_plus_binom_pow3: "(a + b) \<up> 3 = a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3" and
8.116 real_plus_binom_pow3_poly: "[| a is_polyexp; b is_polyexp |] ==>
8.117 - (a + b)^^^3 = a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3" and
8.118 - real_minus_binom_pow3: "(a - b)^^^3 = a^^^3 - 3*a^^^2*b + 3*a*b^^^2 - b^^^3" and
8.119 - real_minus_binom_pow3_p: "(a + -1 * b)^^^3 = a^^^3 + -3*a^^^2*b + 3*a*b^^^2 +
8.120 - -1*b^^^3" and
8.121 + (a + b) \<up> 3 = a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3" and
8.122 + real_minus_binom_pow3: "(a - b) \<up> 3 = a \<up> 3 - 3*a \<up> 2*b + 3*a*b \<up> 2 - b \<up> 3" and
8.123 + real_minus_binom_pow3_p: "(a + -1 * b) \<up> 3 = a \<up> 3 + -3*a \<up> 2*b + 3*a*b \<up> 2 +
8.124 + -1*b \<up> 3" and
8.125 (* real_plus_binom_pow: "[| n is_const; 3 < n |] ==>
8.126 - (a + b)^^^n = (a + b) * (a + b)^^^(n - 1)" *)
8.127 - real_plus_binom_pow4: "(a + b)^^^4 = (a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3)
8.128 + (a + b)^^^n = (a + b) * (a + b)\<up>(n - 1)" *)
8.129 + real_plus_binom_pow4: "(a + b) \<up> 4 = (a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3)
8.130 *(a + b)" and
8.131 real_plus_binom_pow4_poly: "[| a is_polyexp; b is_polyexp |] ==>
8.132 - (a + b)^^^4 = (a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3)
8.133 + (a + b) \<up> 4 = (a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3)
8.134 *(a + b)" and
8.135 - real_plus_binom_pow5: "(a + b)^^^5 = (a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3)
8.136 - *(a^^^2 + 2*a*b + b^^^2)" and
8.137 + real_plus_binom_pow5: "(a + b) \<up> 5 = (a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3)
8.138 + *(a \<up> 2 + 2*a*b + b \<up> 2)" and
8.139 real_plus_binom_pow5_poly: "[| a is_polyexp; b is_polyexp |] ==>
8.140 - (a + b)^^^5 = (a^^^3 + 3*a^^^2*b + 3*a*b^^^2
8.141 - + b^^^3)*(a^^^2 + 2*a*b + b^^^2)" and
8.142 + (a + b) \<up> 5 = (a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2
8.143 + + b \<up> 3)*(a \<up> 2 + 2*a*b + b \<up> 2)" and
8.144 real_diff_plus: "a - b = a + -b" (*17.3.03: do_NOT_use*) and
8.145 real_diff_minus: "a - b = a + -1 * b" and
8.146 - real_plus_binom_times: "(a + b)*(a + b) = a^^^2 + 2*a*b + b^^^2" and
8.147 - real_minus_binom_times: "(a - b)*(a - b) = a^^^2 - 2*a*b + b^^^2" and
8.148 + real_plus_binom_times: "(a + b)*(a + b) = a \<up> 2 + 2*a*b + b \<up> 2" and
8.149 + real_minus_binom_times: "(a - b)*(a - b) = a \<up> 2 - 2*a*b + b \<up> 2" and
8.150 (*WN071229 changed for Schaerding -----vvv*)
8.151 (*real_plus_binom_pow2: "(a + b)^^^2 = a^^^2 + 2*a*b + b^^^2"*)
8.152 - real_plus_binom_pow2: "(a + b)^^^2 = (a + b) * (a + b)" and
8.153 - (*WN071229 changed for Schaerding -----^^^*)
8.154 + real_plus_binom_pow2: "(a + b) \<up> 2 = (a + b) * (a + b)" and
8.155 + (*WN071229 changed for Schaerding -----\<up>*)
8.156 real_plus_binom_pow2_poly: "[| a is_polyexp; b is_polyexp |] ==>
8.157 - (a + b)^^^2 = a^^^2 + 2*a*b + b^^^2" and
8.158 - real_minus_binom_pow2: "(a - b)^^^2 = a^^^2 - 2*a*b + b^^^2" and
8.159 - real_minus_binom_pow2_p: "(a - b)^^^2 = a^^^2 + -2*a*b + b^^^2" and
8.160 - real_plus_minus_binom1: "(a + b)*(a - b) = a^^^2 - b^^^2" and
8.161 - real_plus_minus_binom1_p: "(a + b)*(a - b) = a^^^2 + -1*b^^^2" and
8.162 - real_plus_minus_binom1_p_p: "(a + b)*(a + -1 * b) = a^^^2 + -1*b^^^2" and
8.163 - real_plus_minus_binom2: "(a - b)*(a + b) = a^^^2 - b^^^2" and
8.164 - real_plus_minus_binom2_p: "(a - b)*(a + b) = a^^^2 + -1*b^^^2" and
8.165 - real_plus_minus_binom2_p_p: "(a + -1 * b)*(a + b) = a^^^2 + -1*b^^^2" and
8.166 - real_plus_binom_times1: "(a + 1*b)*(a + -1*b) = a^^^2 + -1*b^^^2" and
8.167 - real_plus_binom_times2: "(a + -1*b)*(a + 1*b) = a^^^2 + -1*b^^^2" and
8.168 + (a + b) \<up> 2 = a \<up> 2 + 2*a*b + b \<up> 2" and
8.169 + real_minus_binom_pow2: "(a - b) \<up> 2 = a \<up> 2 - 2*a*b + b \<up> 2" and
8.170 + real_minus_binom_pow2_p: "(a - b) \<up> 2 = a \<up> 2 + -2*a*b + b \<up> 2" and
8.171 + real_plus_minus_binom1: "(a + b)*(a - b) = a \<up> 2 - b \<up> 2" and
8.172 + real_plus_minus_binom1_p: "(a + b)*(a - b) = a \<up> 2 + -1*b \<up> 2" and
8.173 + real_plus_minus_binom1_p_p: "(a + b)*(a + -1 * b) = a \<up> 2 + -1*b \<up> 2" and
8.174 + real_plus_minus_binom2: "(a - b)*(a + b) = a \<up> 2 - b \<up> 2" and
8.175 + real_plus_minus_binom2_p: "(a - b)*(a + b) = a \<up> 2 + -1*b \<up> 2" and
8.176 + real_plus_minus_binom2_p_p: "(a + -1 * b)*(a + b) = a \<up> 2 + -1*b \<up> 2" and
8.177 + real_plus_binom_times1: "(a + 1*b)*(a + -1*b) = a \<up> 2 + -1*b \<up> 2" and
8.178 + real_plus_binom_times2: "(a + -1*b)*(a + 1*b) = a \<up> 2 + -1*b \<up> 2" and
8.179
8.180 real_num_collect: "[| l is_const; m is_const |] ==>
8.181 l * n + m * n = (l + m) * n" and
8.182 @@ -708,7 +708,7 @@
8.183 (*"(a + b)*(a + -1 * b) = a^^^2 + -1*b^^^2"*)
8.184 (*Rule.Thm ("real_plus_minus_binom2_p_p", ThmC.numerals_to_Free @{thm real_plus_minus_binom2_p_p}),*)
8.185 (*"(a + -1 * b)*(a + b) = a^^^2 + -1*b^^^2"*)
8.186 - (*WN071229 changed/removed for Schaerding -----^^^*)
8.187 + (*WN071229 changed/removed for Schaerding -----\<up>*)
8.188
8.189 Rule.Thm ("distrib_right" ,ThmC.numerals_to_Free @{thm distrib_right}),
8.190 (*"(z1.0 + z2.0) * w = z1.0 * w + z2.0 * w"*)
8.191 @@ -716,9 +716,9 @@
8.192 (*"w * (z1.0 + z2.0) = w * z1.0 + w * z2.0"*)
8.193
8.194 Rule.Thm ("realpow_multI", ThmC.numerals_to_Free @{thm realpow_multI}),
8.195 - (*"(r * s) ^^^ n = r ^^^ n * s ^^^ n"*)
8.196 + (*"(r * s) \<up> n = r \<up> n * s \<up> n"*)
8.197 Rule.Thm ("realpow_pow",ThmC.numerals_to_Free @{thm realpow_pow})
8.198 - (*"(a ^^^ b) ^^^ c = a ^^^ (b * c)"*)
8.199 + (*"(a \<up> b) \<up> c = a \<up> (b * c)"*)
8.200 ], scr = Rule.Empty_Prog};
8.201
8.202 val expand_poly_rat_ =
8.203 @@ -754,9 +754,9 @@
8.204
8.205 Rule.Thm ("realpow_multI_poly", ThmC.numerals_to_Free @{thm realpow_multI_poly}),
8.206 (*"[| r is_polyexp; s is_polyexp |] ==>
8.207 - (r * s) ^^^ n = r ^^^ n * s ^^^ n"*)
8.208 + (r * s) \<up> n = r \<up> n * s \<up> n"*)
8.209 Rule.Thm ("realpow_pow",ThmC.numerals_to_Free @{thm realpow_pow})
8.210 - (*"(a ^^^ b) ^^^ c = a ^^^ (b * c)"*)
8.211 + (*"(a \<up> b) \<up> c = a \<up> (b * c)"*)
8.212 ], scr = Rule.Empty_Prog};
8.213
8.214 val simplify_power_ =
8.215 @@ -768,30 +768,30 @@
8.216 a*(a*a) --> a*a^^^2 und nicht a*(a*a) --> a^^^2*a *)
8.217 Rule.Thm ("sym_realpow_twoI",
8.218 ThmC.numerals_to_Free (@{thm realpow_twoI} RS @{thm sym})),
8.219 - (*"r * r = r ^^^ 2"*)
8.220 + (*"r * r = r \<up> 2"*)
8.221 Rule.Thm ("realpow_twoI_assoc_l",ThmC.numerals_to_Free @{thm realpow_twoI_assoc_l}),
8.222 - (*"r * (r * s) = r ^^^ 2 * s"*)
8.223 + (*"r * (r * s) = r \<up> 2 * s"*)
8.224
8.225 Rule.Thm ("realpow_plus_1",ThmC.numerals_to_Free @{thm realpow_plus_1}),
8.226 - (*"r * r ^^^ n = r ^^^ (n + 1)"*)
8.227 + (*"r * r \<up> n = r \<up> (n + 1)"*)
8.228 Rule.Thm ("realpow_plus_1_assoc_l",
8.229 ThmC.numerals_to_Free @{thm realpow_plus_1_assoc_l}),
8.230 - (*"r * (r ^^^ m * s) = r ^^^ (1 + m) * s"*)
8.231 + (*"r * (r \<up> m * s) = r \<up> (1 + m) * s"*)
8.232 (*MG 9.7.03: neues Rule.Thm wegen a*(a*(a*b)) --> a^^^2*(a*b) *)
8.233 Rule.Thm ("realpow_plus_1_assoc_l2",
8.234 ThmC.numerals_to_Free @{thm realpow_plus_1_assoc_l2}),
8.235 - (*"r ^^^ m * (r * s) = r ^^^ (1 + m) * s"*)
8.236 + (*"r \<up> m * (r * s) = r \<up> (1 + m) * s"*)
8.237
8.238 Rule.Thm ("sym_realpow_addI",
8.239 ThmC.numerals_to_Free (@{thm realpow_addI} RS @{thm sym})),
8.240 - (*"r ^^^ n * r ^^^ m = r ^^^ (n + m)"*)
8.241 + (*"r \<up> n * r \<up> m = r \<up> (n + m)"*)
8.242 Rule.Thm ("realpow_addI_assoc_l",ThmC.numerals_to_Free @{thm realpow_addI_assoc_l}),
8.243 - (*"r ^^^ n * (r ^^^ m * s) = r ^^^ (n + m) * s"*)
8.244 + (*"r \<up> n * (r \<up> m * s) = r \<up> (n + m) * s"*)
8.245
8.246 (* ist in expand_poly - wird hier aber auch gebraucht, wegen:
8.247 - "r * r = r ^^^ 2" wenn r=a^^^b*)
8.248 + "r * r = r \<up> 2" wenn r=a^^^b*)
8.249 Rule.Thm ("realpow_pow",ThmC.numerals_to_Free @{thm realpow_pow})
8.250 - (*"(a ^^^ b) ^^^ c = a ^^^ (b * c)"*)
8.251 + (*"(a \<up> b) \<up> c = a \<up> (b * c)"*)
8.252 ], scr = Rule.Empty_Prog};
8.253
8.254 val calc_add_mult_pow_ =
8.255 @@ -817,11 +817,11 @@
8.256 Rule.Thm ("mult_1_right",ThmC.numerals_to_Free @{thm mult_1_right}),
8.257 (*"z * 1 = z"*) (*wegen "a * b * b^^^(-1) + a"*)
8.258 Rule.Thm ("realpow_zeroI",ThmC.numerals_to_Free @{thm realpow_zeroI}),
8.259 - (*"r ^^^ 0 = 1"*) (*wegen "a*a^^^(-1)*c + b + c"*)
8.260 + (*"r \<up> 0 = 1"*) (*wegen "a*a^^^(-1)*c + b + c"*)
8.261 Rule.Thm ("realpow_oneI",ThmC.numerals_to_Free @{thm realpow_oneI}),
8.262 - (*"r ^^^ 1 = r"*)
8.263 + (*"r \<up> 1 = r"*)
8.264 Rule.Thm ("realpow_eq_oneI",ThmC.numerals_to_Free @{thm realpow_eq_oneI})
8.265 - (*"1 ^^^ n = 1"*)
8.266 + (*"1 \<up> n = 1"*)
8.267 ], scr = Rule.Empty_Prog};
8.268
8.269 val collect_numerals_ =
8.270 @@ -867,7 +867,7 @@
8.271 (*"z + 0 = z"*) (*wegen a+b-b --> a+(1-1)*b --> a+0 --> a*)
8.272
8.273 (*Rule.Thm ("realpow_oneI",ThmC.numerals_to_Free @{thm realpow_oneI})*)
8.274 - (*"?r ^^^ 1 = ?r"*)
8.275 + (*"?r \<up> 1 = ?r"*)
8.276 Rule.Thm ("division_ring_divide_zero",ThmC.numerals_to_Free @{thm division_ring_divide_zero})
8.277 (*"0 / ?x = 0"*)
8.278 ], scr = Rule.Empty_Prog};
8.279 @@ -927,22 +927,22 @@
8.280 erls = Rule_Set.empty, srls = Rule_Set.Empty,
8.281 calc = [], errpatts = [],
8.282 rules = [Rule.Thm ("realpow_multI", ThmC.numerals_to_Free @{thm realpow_multI}),
8.283 - (*"(r * s) ^^^ n = r ^^^ n * s ^^^ n"*)
8.284 + (*"(r * s) \<up> n = r \<up> n * s \<up> n"*)
8.285
8.286 Rule.Thm ("sym_realpow_twoI",
8.287 ThmC.numerals_to_Free( @{thm realpow_twoI} RS @{thm sym})),
8.288 - (*"r1 * r1 = r1 ^^^ 2"*)
8.289 + (*"r1 * r1 = r1 \<up> 2"*)
8.290 Rule.Thm ("realpow_plus_1",ThmC.numerals_to_Free @{thm realpow_plus_1}),
8.291 - (*"r * r ^^^ n = r ^^^ (n + 1)"*)
8.292 + (*"r * r \<up> n = r \<up> (n + 1)"*)
8.293 Rule.Thm ("realpow_pow",ThmC.numerals_to_Free @{thm realpow_pow}),
8.294 - (*"(a ^^^ b) ^^^ c = a ^^^ (b * c)"*)
8.295 + (*"(a \<up> b) \<up> c = a \<up> (b * c)"*)
8.296 Rule.Thm ("sym_realpow_addI",
8.297 ThmC.numerals_to_Free (@{thm realpow_addI} RS @{thm sym})),
8.298 - (*"r ^^^ n * r ^^^ m = r ^^^ (n + m)"*)
8.299 + (*"r \<up> n * r \<up> m = r \<up> (n + m)"*)
8.300 Rule.Thm ("realpow_oneI",ThmC.numerals_to_Free @{thm realpow_oneI}),
8.301 - (*"r ^^^ 1 = r"*)
8.302 + (*"r \<up> 1 = r"*)
8.303 Rule.Thm ("realpow_eq_oneI",ThmC.numerals_to_Free @{thm realpow_eq_oneI})
8.304 - (*"1 ^^^ n = 1"*)
8.305 + (*"1 \<up> n = 1"*)
8.306 ], scr = Rule.Empty_Prog};
8.307
8.308 val collect_numerals =
8.309 @@ -1226,7 +1226,7 @@
8.310
8.311 Rule.Thm ("sym_realpow_twoI",
8.312 ThmC.numerals_to_Free (@{thm realpow_twoI} RS @{thm sym})),
8.313 - (*"r1 * r1 = r1 ^^^ 2"*)
8.314 + (*"r1 * r1 = r1 \<up> 2"*)
8.315 Rule.Thm ("sym_real_mult_2",
8.316 ThmC.numerals_to_Free (@{thm real_mult_2} RS @{thm sym})),
8.317 (*"z1 + z1 = 2 * z1"*)
8.318 @@ -1244,7 +1244,7 @@
8.319 (*"m is_const ==> k + (n + m * n) = k + (1 + m) * n"*)
8.320
8.321 Rule.Thm ("realpow_multI", ThmC.numerals_to_Free @{thm realpow_multI}),
8.322 - (*"(r * s) ^^^ n = r ^^^ n * s ^^^ n"*)
8.323 + (*"(r * s) \<up> n = r \<up> n * s \<up> n"*)
8.324
8.325 Rule.Eval ("Groups.plus_class.plus", (**)eval_binop "#add_"),
8.326 Rule.Eval ("Groups.times_class.times", (**)eval_binop "#mult_"),
8.327 @@ -1305,22 +1305,22 @@
8.328 ], errpatts = [],
8.329 rules = [Rule.Thm ("real_plus_binom_pow2",
8.330 ThmC.numerals_to_Free @{thm real_plus_binom_pow2}),
8.331 - (*"(a + b) ^^^ 2 = a ^^^ 2 + 2 * a * b + b ^^^ 2"*)
8.332 + (*"(a + b) \<up> 2 = a \<up> 2 + 2 * a * b + b \<up> 2"*)
8.333 Rule.Thm ("real_plus_binom_times",
8.334 ThmC.numerals_to_Free @{thm real_plus_binom_times}),
8.335 (*"(a + b)*(a + b) = ...*)
8.336 Rule.Thm ("real_minus_binom_pow2",
8.337 ThmC.numerals_to_Free @{thm real_minus_binom_pow2}),
8.338 - (*"(a - b) ^^^ 2 = a ^^^ 2 - 2 * a * b + b ^^^ 2"*)
8.339 + (*"(a - b) \<up> 2 = a \<up> 2 - 2 * a * b + b \<up> 2"*)
8.340 Rule.Thm ("real_minus_binom_times",
8.341 ThmC.numerals_to_Free @{thm real_minus_binom_times}),
8.342 (*"(a - b)*(a - b) = ...*)
8.343 Rule.Thm ("real_plus_minus_binom1",
8.344 ThmC.numerals_to_Free @{thm real_plus_minus_binom1}),
8.345 - (*"(a + b) * (a - b) = a ^^^ 2 - b ^^^ 2"*)
8.346 + (*"(a + b) * (a - b) = a \<up> 2 - b \<up> 2"*)
8.347 Rule.Thm ("real_plus_minus_binom2",
8.348 ThmC.numerals_to_Free @{thm real_plus_minus_binom2}),
8.349 - (*"(a - b) * (a + b) = a ^^^ 2 - b ^^^ 2"*)
8.350 + (*"(a - b) * (a + b) = a \<up> 2 - b \<up> 2"*)
8.351 (*RL 020915*)
8.352 Rule.Thm ("real_pp_binom_times",ThmC.numerals_to_Free @{thm real_pp_binom_times}),
8.353 (*(a + b)*(c + d) = a*c + a*d + b*c + b*d*)
8.354 @@ -1368,9 +1368,9 @@
8.355 *)
8.356 Rule.Thm ("sym_realpow_twoI",
8.357 ThmC.numerals_to_Free (@{thm realpow_twoI} RS @{thm sym})),
8.358 - (*"r1 * r1 = r1 ^^^ 2"*)
8.359 + (*"r1 * r1 = r1 \<up> 2"*)
8.360 Rule.Thm ("realpow_plus_1",ThmC.numerals_to_Free @{thm realpow_plus_1}),
8.361 - (*"r * r ^^^ n = r ^^^ (n + 1)"*)
8.362 + (*"r * r \<up> n = r \<up> (n + 1)"*)
8.363 (*Rule.Thm ("sym_real_mult_2",
8.364 ThmC.numerals_to_Free (@{thm real_mult_2} RS @{thm sym})),
8.365 (*"z1 + z1 = 2 * z1"*)*)
9.1 --- a/src/Tools/isac/Knowledge/PolyEq.thy Mon Apr 19 20:44:18 2021 +0200
9.2 +++ b/src/Tools/isac/Knowledge/PolyEq.thy Tue Apr 20 16:58:44 2021 +0200
9.3 @@ -13,55 +13,55 @@
9.4 theory PolyEq imports LinEq RootRatEq begin
9.5
9.6 (*-------------------- rules -------------------------------------------------*)
9.7 -(* type real enforced by op "^^^" *)
9.8 +(* type real enforced by op " \<up> " *)
9.9 axiomatization where
9.10 - cancel_leading_coeff1: "Not (c =!= 0) ==> (a + b*bdv + c*bdv^^^2 = 0) =
9.11 - (a/c + b/c*bdv + bdv^^^2 = 0)" and
9.12 - cancel_leading_coeff2: "Not (c =!= 0) ==> (a - b*bdv + c*bdv^^^2 = 0) =
9.13 - (a/c - b/c*bdv + bdv^^^2 = 0)" and
9.14 - cancel_leading_coeff3: "Not (c =!= 0) ==> (a + b*bdv - c*bdv^^^2 = 0) =
9.15 - (a/c + b/c*bdv - bdv^^^2 = 0)" and
9.16 + cancel_leading_coeff1: "Not (c =!= 0) ==> (a + b*bdv + c*bdv \<up> 2 = 0) =
9.17 + (a/c + b/c*bdv + bdv \<up> 2 = 0)" and
9.18 + cancel_leading_coeff2: "Not (c =!= 0) ==> (a - b*bdv + c*bdv \<up> 2 = 0) =
9.19 + (a/c - b/c*bdv + bdv \<up> 2 = 0)" and
9.20 + cancel_leading_coeff3: "Not (c =!= 0) ==> (a + b*bdv - c*bdv \<up> 2 = 0) =
9.21 + (a/c + b/c*bdv - bdv \<up> 2 = 0)" and
9.22
9.23 - cancel_leading_coeff4: "Not (c =!= 0) ==> (a + bdv + c*bdv^^^2 = 0) =
9.24 - (a/c + 1/c*bdv + bdv^^^2 = 0)" and
9.25 - cancel_leading_coeff5: "Not (c =!= 0) ==> (a - bdv + c*bdv^^^2 = 0) =
9.26 - (a/c - 1/c*bdv + bdv^^^2 = 0)" and
9.27 - cancel_leading_coeff6: "Not (c =!= 0) ==> (a + bdv - c*bdv^^^2 = 0) =
9.28 - (a/c + 1/c*bdv - bdv^^^2 = 0)" and
9.29 + cancel_leading_coeff4: "Not (c =!= 0) ==> (a + bdv + c*bdv \<up> 2 = 0) =
9.30 + (a/c + 1/c*bdv + bdv \<up> 2 = 0)" and
9.31 + cancel_leading_coeff5: "Not (c =!= 0) ==> (a - bdv + c*bdv \<up> 2 = 0) =
9.32 + (a/c - 1/c*bdv + bdv \<up> 2 = 0)" and
9.33 + cancel_leading_coeff6: "Not (c =!= 0) ==> (a + bdv - c*bdv \<up> 2 = 0) =
9.34 + (a/c + 1/c*bdv - bdv \<up> 2 = 0)" and
9.35
9.36 - cancel_leading_coeff7: "Not (c =!= 0) ==> ( b*bdv + c*bdv^^^2 = 0) =
9.37 - ( b/c*bdv + bdv^^^2 = 0)" and
9.38 - cancel_leading_coeff8: "Not (c =!= 0) ==> ( b*bdv - c*bdv^^^2 = 0) =
9.39 - ( b/c*bdv - bdv^^^2 = 0)" and
9.40 + cancel_leading_coeff7: "Not (c =!= 0) ==> ( b*bdv + c*bdv \<up> 2 = 0) =
9.41 + ( b/c*bdv + bdv \<up> 2 = 0)" and
9.42 + cancel_leading_coeff8: "Not (c =!= 0) ==> ( b*bdv - c*bdv \<up> 2 = 0) =
9.43 + ( b/c*bdv - bdv \<up> 2 = 0)" and
9.44
9.45 - cancel_leading_coeff9: "Not (c =!= 0) ==> ( bdv + c*bdv^^^2 = 0) =
9.46 - ( 1/c*bdv + bdv^^^2 = 0)" and
9.47 - cancel_leading_coeff10:"Not (c =!= 0) ==> ( bdv - c*bdv^^^2 = 0) =
9.48 - ( 1/c*bdv - bdv^^^2 = 0)" and
9.49 + cancel_leading_coeff9: "Not (c =!= 0) ==> ( bdv + c*bdv \<up> 2 = 0) =
9.50 + ( 1/c*bdv + bdv \<up> 2 = 0)" and
9.51 + cancel_leading_coeff10:"Not (c =!= 0) ==> ( bdv - c*bdv \<up> 2 = 0) =
9.52 + ( 1/c*bdv - bdv \<up> 2 = 0)" and
9.53
9.54 - cancel_leading_coeff11:"Not (c =!= 0) ==> (a + b*bdv^^^2 = 0) =
9.55 - (a/b + bdv^^^2 = 0)" and
9.56 - cancel_leading_coeff12:"Not (c =!= 0) ==> (a - b*bdv^^^2 = 0) =
9.57 - (a/b - bdv^^^2 = 0)" and
9.58 - cancel_leading_coeff13:"Not (c =!= 0) ==> ( b*bdv^^^2 = 0) =
9.59 - ( bdv^^^2 = 0/b)" and
9.60 + cancel_leading_coeff11:"Not (c =!= 0) ==> (a + b*bdv \<up> 2 = 0) =
9.61 + (a/b + bdv \<up> 2 = 0)" and
9.62 + cancel_leading_coeff12:"Not (c =!= 0) ==> (a - b*bdv \<up> 2 = 0) =
9.63 + (a/b - bdv \<up> 2 = 0)" and
9.64 + cancel_leading_coeff13:"Not (c =!= 0) ==> ( b*bdv \<up> 2 = 0) =
9.65 + ( bdv \<up> 2 = 0/b)" and
9.66
9.67 - complete_square1: "(q + p*bdv + bdv^^^2 = 0) =
9.68 - (q + (p/2 + bdv)^^^2 = (p/2)^^^2)" and
9.69 - complete_square2: "( p*bdv + bdv^^^2 = 0) =
9.70 - ( (p/2 + bdv)^^^2 = (p/2)^^^2)" and
9.71 - complete_square3: "( bdv + bdv^^^2 = 0) =
9.72 - ( (1/2 + bdv)^^^2 = (1/2)^^^2)" and
9.73 + complete_square1: "(q + p*bdv + bdv \<up> 2 = 0) =
9.74 + (q + (p/2 + bdv) \<up> 2 = (p/2) \<up> 2)" and
9.75 + complete_square2: "( p*bdv + bdv \<up> 2 = 0) =
9.76 + ( (p/2 + bdv) \<up> 2 = (p/2) \<up> 2)" and
9.77 + complete_square3: "( bdv + bdv \<up> 2 = 0) =
9.78 + ( (1/2 + bdv) \<up> 2 = (1/2) \<up> 2)" and
9.79
9.80 - complete_square4: "(q - p*bdv + bdv^^^2 = 0) =
9.81 - (q + (p/2 - bdv)^^^2 = (p/2)^^^2)" and
9.82 - complete_square5: "(q + p*bdv - bdv^^^2 = 0) =
9.83 - (q + (p/2 - bdv)^^^2 = (p/2)^^^2)" and
9.84 + complete_square4: "(q - p*bdv + bdv \<up> 2 = 0) =
9.85 + (q + (p/2 - bdv) \<up> 2 = (p/2) \<up> 2)" and
9.86 + complete_square5: "(q + p*bdv - bdv \<up> 2 = 0) =
9.87 + (q + (p/2 - bdv) \<up> 2 = (p/2) \<up> 2)" and
9.88
9.89 - square_explicit1: "(a + b^^^2 = c) = ( b^^^2 = c - a)" and
9.90 - square_explicit2: "(a - b^^^2 = c) = (-(b^^^2) = c - a)" and
9.91 + square_explicit1: "(a + b \<up> 2 = c) = ( b \<up> 2 = c - a)" and
9.92 + square_explicit2: "(a - b \<up> 2 = c) = (-(b \<up> 2) = c - a)" and
9.93
9.94 - (*bdv_explicit* required type constrain to real in --- (-8 - 2*x + x^^^2 = 0), by rewriting ---*)
9.95 + (*bdv_explicit* required type constrain to real in --- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---*)
9.96 bdv_explicit1: "(a + bdv = b) = (bdv = - a + (b::real))" and
9.97 bdv_explicit2: "(a - bdv = b) = ((-1)*bdv = - a + (b::real))" and
9.98 bdv_explicit3: "((-1)*bdv = b) = (bdv = (-1)*(b::real))" and
9.99 @@ -72,7 +72,7 @@
9.100 (*-- normalise --*)
9.101 (*WN0509 compare LinEq.all_left "[|Not(b=!=0)|] ==> (a=b) = (a+(-1)*b=0)"*)
9.102 all_left: "[|Not(b=!=0)|] ==> (a = b) = (a - b = 0)" and
9.103 - makex1_x: "a^^^1 = a" and
9.104 + makex1_x: "a\<up>1 = a" and
9.105 real_assoc_1: "a+(b+c) = a+b+c" and
9.106 real_assoc_2: "a*(b*c) = a*b*c" and
9.107
9.108 @@ -88,24 +88,24 @@
9.109 "[|Not(b=0);Not(bdv occurs_in c)|] ==> (b*bdv = c) = (bdv = c/b)" and
9.110 (* ---- degree 2 ----*)
9.111 d2_isolate_add1:
9.112 - "[|Not(bdv occurs_in a)|] ==> (a + b*bdv^^^2=0) = (b*bdv^^^2= (-1)*a)" and
9.113 + "[|Not(bdv occurs_in a)|] ==> (a + b*bdv \<up> 2=0) = (b*bdv \<up> 2= (-1)*a)" and
9.114 d2_isolate_add2:
9.115 - "[|Not(bdv occurs_in a)|] ==> (a + bdv^^^2=0) = ( bdv^^^2= (-1)*a)" and
9.116 + "[|Not(bdv occurs_in a)|] ==> (a + bdv \<up> 2=0) = ( bdv \<up> 2= (-1)*a)" and
9.117 d2_isolate_div:
9.118 - "[|Not(b=0);Not(bdv occurs_in c)|] ==> (b*bdv^^^2=c) = (bdv^^^2=c/b)" and
9.119 + "[|Not(b=0);Not(bdv occurs_in c)|] ==> (b*bdv \<up> 2=c) = (bdv \<up> 2=c/b)" and
9.120
9.121 - d2_prescind1: "(a*bdv + b*bdv^^^2 = 0) = (bdv*(a +b*bdv)=0)" and
9.122 - d2_prescind2: "(a*bdv + bdv^^^2 = 0) = (bdv*(a + bdv)=0)" and
9.123 - d2_prescind3: "( bdv + b*bdv^^^2 = 0) = (bdv*(1+b*bdv)=0)" and
9.124 - d2_prescind4: "( bdv + bdv^^^2 = 0) = (bdv*(1+ bdv)=0)" and
9.125 + d2_prescind1: "(a*bdv + b*bdv \<up> 2 = 0) = (bdv*(a +b*bdv)=0)" and
9.126 + d2_prescind2: "(a*bdv + bdv \<up> 2 = 0) = (bdv*(a + bdv)=0)" and
9.127 + d2_prescind3: "( bdv + b*bdv \<up> 2 = 0) = (bdv*(1+b*bdv)=0)" and
9.128 + d2_prescind4: "( bdv + bdv \<up> 2 = 0) = (bdv*(1+ bdv)=0)" and
9.129 (* eliminate degree 2 *)
9.130 (* thm for neg arguments in sqroot have postfix _neg *)
9.131 d2_sqrt_equation1: "[|(0<=c);Not(bdv occurs_in c)|] ==>
9.132 - (bdv^^^2=c) = ((bdv=sqrt c) | (bdv=(-1)*sqrt c ))" and
9.133 + (bdv \<up> 2=c) = ((bdv=sqrt c) | (bdv=(-1)*sqrt c ))" and
9.134 d2_sqrt_equation1_neg:
9.135 - "[|(c<0);Not(bdv occurs_in c)|] ==> (bdv^^^2=c) = False" and
9.136 - d2_sqrt_equation2: "(bdv^^^2=0) = (bdv=0)" and
9.137 - d2_sqrt_equation3: "(b*bdv^^^2=0) = (bdv=0)"
9.138 + "[|(c<0);Not(bdv occurs_in c)|] ==> (bdv \<up> 2=c) = False" and
9.139 + d2_sqrt_equation2: "(bdv \<up> 2=0) = (bdv=0)" and
9.140 + d2_sqrt_equation3: "(b*bdv \<up> 2=0) = (bdv=0)"
9.141 axiomatization where (*AK..if replaced by "and" we get errors:
9.142 exception PTREE "nth _ []" raised
9.143 (line 783 of "/usr/local/isabisac/src/Tools/isac/Interpret/ctree.sml"):
9.144 @@ -114,7 +114,7 @@
9.145 exception Bind raised
9.146 (line 1097 of "/usr/local/isabisac/test/Tools/isac/Frontend/interface.sml"):
9.147 'val (Form f, tac, asms) = pt_extract (pt, p);' *)
9.148 - (* WN120315 these 2 thms need "::real", because no "^^^" constrains type as
9.149 + (* WN120315 these 2 thms need "::real", because no " \<up> " constrains type as
9.150 required in test --- rls d2_polyeq_bdv_only_simplify --- *)
9.151 d2_reduce_equation1: "(bdv*(a +b*bdv)=0) = ((bdv=0)|(a+b*bdv=(0::real)))" and
9.152 d2_reduce_equation2: "(bdv*(a + bdv)=0) = ((bdv=0)|(a+ bdv=(0::real)))"
9.153 @@ -127,102 +127,102 @@
9.154 exception Bind raised
9.155 (line 1097 of "/usr/local/isabisac/test/Tools/isac/Frontend/interface.sml"):
9.156 'val (Form f, tac, asms) = pt_extract (pt, p);' *)
9.157 -d2_pqformula1: "[|0<=p^^^2 - 4*q|] ==> (q+p*bdv+ bdv^^^2=0) =
9.158 - ((bdv= (-1)*(p/2) + sqrt(p^^^2 - 4*q)/2)
9.159 - | (bdv= (-1)*(p/2) - sqrt(p^^^2 - 4*q)/2))" and
9.160 - d2_pqformula1_neg: "[|p^^^2 - 4*q<0|] ==> (q+p*bdv+ bdv^^^2=0) = False" and
9.161 - d2_pqformula2: "[|0<=p^^^2 - 4*q|] ==> (q+p*bdv+1*bdv^^^2=0) =
9.162 - ((bdv= (-1)*(p/2) + sqrt(p^^^2 - 4*q)/2)
9.163 - | (bdv= (-1)*(p/2) - sqrt(p^^^2 - 4*q)/2))" and
9.164 - d2_pqformula2_neg: "[|p^^^2 - 4*q<0|] ==> (q+p*bdv+1*bdv^^^2=0) = False" and
9.165 - d2_pqformula3: "[|0<=1 - 4*q|] ==> (q+ bdv+ bdv^^^2=0) =
9.166 +d2_pqformula1: "[|0<=p \<up> 2 - 4*q|] ==> (q+p*bdv+ bdv \<up> 2=0) =
9.167 + ((bdv= (-1)*(p/2) + sqrt(p \<up> 2 - 4*q)/2)
9.168 + | (bdv= (-1)*(p/2) - sqrt(p \<up> 2 - 4*q)/2))" and
9.169 + d2_pqformula1_neg: "[|p \<up> 2 - 4*q<0|] ==> (q+p*bdv+ bdv \<up> 2=0) = False" and
9.170 + d2_pqformula2: "[|0<=p \<up> 2 - 4*q|] ==> (q+p*bdv+1*bdv \<up> 2=0) =
9.171 + ((bdv= (-1)*(p/2) + sqrt(p \<up> 2 - 4*q)/2)
9.172 + | (bdv= (-1)*(p/2) - sqrt(p \<up> 2 - 4*q)/2))" and
9.173 + d2_pqformula2_neg: "[|p \<up> 2 - 4*q<0|] ==> (q+p*bdv+1*bdv \<up> 2=0) = False" and
9.174 + d2_pqformula3: "[|0<=1 - 4*q|] ==> (q+ bdv+ bdv \<up> 2=0) =
9.175 ((bdv= (-1)*(1/2) + sqrt(1 - 4*q)/2)
9.176 | (bdv= (-1)*(1/2) - sqrt(1 - 4*q)/2))" and
9.177 - d2_pqformula3_neg: "[|1 - 4*q<0|] ==> (q+ bdv+ bdv^^^2=0) = False" and
9.178 - d2_pqformula4: "[|0<=1 - 4*q|] ==> (q+ bdv+1*bdv^^^2=0) =
9.179 + d2_pqformula3_neg: "[|1 - 4*q<0|] ==> (q+ bdv+ bdv \<up> 2=0) = False" and
9.180 + d2_pqformula4: "[|0<=1 - 4*q|] ==> (q+ bdv+1*bdv \<up> 2=0) =
9.181 ((bdv= (-1)*(1/2) + sqrt(1 - 4*q)/2)
9.182 | (bdv= (-1)*(1/2) - sqrt(1 - 4*q)/2))" and
9.183 - d2_pqformula4_neg: "[|1 - 4*q<0|] ==> (q+ bdv+1*bdv^^^2=0) = False" and
9.184 - d2_pqformula5: "[|0<=p^^^2 - 0|] ==> ( p*bdv+ bdv^^^2=0) =
9.185 - ((bdv= (-1)*(p/2) + sqrt(p^^^2 - 0)/2)
9.186 - | (bdv= (-1)*(p/2) - sqrt(p^^^2 - 0)/2))" and
9.187 + d2_pqformula4_neg: "[|1 - 4*q<0|] ==> (q+ bdv+1*bdv \<up> 2=0) = False" and
9.188 + d2_pqformula5: "[|0<=p \<up> 2 - 0|] ==> ( p*bdv+ bdv \<up> 2=0) =
9.189 + ((bdv= (-1)*(p/2) + sqrt(p \<up> 2 - 0)/2)
9.190 + | (bdv= (-1)*(p/2) - sqrt(p \<up> 2 - 0)/2))" and
9.191 (* d2_pqformula5_neg not need p^2 never less zero in R *)
9.192 - d2_pqformula6: "[|0<=p^^^2 - 0|] ==> ( p*bdv+1*bdv^^^2=0) =
9.193 - ((bdv= (-1)*(p/2) + sqrt(p^^^2 - 0)/2)
9.194 - | (bdv= (-1)*(p/2) - sqrt(p^^^2 - 0)/2))" and
9.195 + d2_pqformula6: "[|0<=p \<up> 2 - 0|] ==> ( p*bdv+1*bdv \<up> 2=0) =
9.196 + ((bdv= (-1)*(p/2) + sqrt(p \<up> 2 - 0)/2)
9.197 + | (bdv= (-1)*(p/2) - sqrt(p \<up> 2 - 0)/2))" and
9.198 (* d2_pqformula6_neg not need p^2 never less zero in R *)
9.199 - d2_pqformula7: "[|0<=1 - 0|] ==> ( bdv+ bdv^^^2=0) =
9.200 + d2_pqformula7: "[|0<=1 - 0|] ==> ( bdv+ bdv \<up> 2=0) =
9.201 ((bdv= (-1)*(1/2) + sqrt(1 - 0)/2)
9.202 | (bdv= (-1)*(1/2) - sqrt(1 - 0)/2))" and
9.203 (* d2_pqformula7_neg not need, because 1<0 ==> False*)
9.204 - d2_pqformula8: "[|0<=1 - 0|] ==> ( bdv+1*bdv^^^2=0) =
9.205 + d2_pqformula8: "[|0<=1 - 0|] ==> ( bdv+1*bdv \<up> 2=0) =
9.206 ((bdv= (-1)*(1/2) + sqrt(1 - 0)/2)
9.207 | (bdv= (-1)*(1/2) - sqrt(1 - 0)/2))" and
9.208 (* d2_pqformula8_neg not need, because 1<0 ==> False*)
9.209 d2_pqformula9: "[|Not(bdv occurs_in q); 0<= (-1)*4*q|] ==>
9.210 - (q+ 1*bdv^^^2=0) = ((bdv= 0 + sqrt(0 - 4*q)/2)
9.211 + (q+ 1*bdv \<up> 2=0) = ((bdv= 0 + sqrt(0 - 4*q)/2)
9.212 | (bdv= 0 - sqrt(0 - 4*q)/2))" and
9.213 d2_pqformula9_neg:
9.214 - "[|Not(bdv occurs_in q); (-1)*4*q<0|] ==> (q+ 1*bdv^^^2=0) = False" and
9.215 + "[|Not(bdv occurs_in q); (-1)*4*q<0|] ==> (q+ 1*bdv \<up> 2=0) = False" and
9.216 d2_pqformula10:
9.217 - "[|Not(bdv occurs_in q); 0<= (-1)*4*q|] ==> (q+ bdv^^^2=0) =
9.218 + "[|Not(bdv occurs_in q); 0<= (-1)*4*q|] ==> (q+ bdv \<up> 2=0) =
9.219 ((bdv= 0 + sqrt(0 - 4*q)/2)
9.220 | (bdv= 0 - sqrt(0 - 4*q)/2))" and
9.221 d2_pqformula10_neg:
9.222 - "[|Not(bdv occurs_in q); (-1)*4*q<0|] ==> (q+ bdv^^^2=0) = False" and
9.223 + "[|Not(bdv occurs_in q); (-1)*4*q<0|] ==> (q+ bdv \<up> 2=0) = False" and
9.224 d2_abcformula1:
9.225 - "[|0<=b^^^2 - 4*a*c|] ==> (c + b*bdv+a*bdv^^^2=0) =
9.226 - ((bdv=( -b + sqrt(b^^^2 - 4*a*c))/(2*a))
9.227 - | (bdv=( -b - sqrt(b^^^2 - 4*a*c))/(2*a)))" and
9.228 + "[|0<=b \<up> 2 - 4*a*c|] ==> (c + b*bdv+a*bdv \<up> 2=0) =
9.229 + ((bdv=( -b + sqrt(b \<up> 2 - 4*a*c))/(2*a))
9.230 + | (bdv=( -b - sqrt(b \<up> 2 - 4*a*c))/(2*a)))" and
9.231 d2_abcformula1_neg:
9.232 - "[|b^^^2 - 4*a*c<0|] ==> (c + b*bdv+a*bdv^^^2=0) = False" and
9.233 + "[|b \<up> 2 - 4*a*c<0|] ==> (c + b*bdv+a*bdv \<up> 2=0) = False" and
9.234 d2_abcformula2:
9.235 - "[|0<=1 - 4*a*c|] ==> (c+ bdv+a*bdv^^^2=0) =
9.236 + "[|0<=1 - 4*a*c|] ==> (c+ bdv+a*bdv \<up> 2=0) =
9.237 ((bdv=( -1 + sqrt(1 - 4*a*c))/(2*a))
9.238 | (bdv=( -1 - sqrt(1 - 4*a*c))/(2*a)))" and
9.239 d2_abcformula2_neg:
9.240 - "[|1 - 4*a*c<0|] ==> (c+ bdv+a*bdv^^^2=0) = False" and
9.241 + "[|1 - 4*a*c<0|] ==> (c+ bdv+a*bdv \<up> 2=0) = False" and
9.242 d2_abcformula3:
9.243 - "[|0<=b^^^2 - 4*1*c|] ==> (c + b*bdv+ bdv^^^2=0) =
9.244 - ((bdv=( -b + sqrt(b^^^2 - 4*1*c))/(2*1))
9.245 - | (bdv=( -b - sqrt(b^^^2 - 4*1*c))/(2*1)))" and
9.246 + "[|0<=b \<up> 2 - 4*1*c|] ==> (c + b*bdv+ bdv \<up> 2=0) =
9.247 + ((bdv=( -b + sqrt(b \<up> 2 - 4*1*c))/(2*1))
9.248 + | (bdv=( -b - sqrt(b \<up> 2 - 4*1*c))/(2*1)))" and
9.249 d2_abcformula3_neg:
9.250 - "[|b^^^2 - 4*1*c<0|] ==> (c + b*bdv+ bdv^^^2=0) = False" and
9.251 + "[|b \<up> 2 - 4*1*c<0|] ==> (c + b*bdv+ bdv \<up> 2=0) = False" and
9.252 d2_abcformula4:
9.253 - "[|0<=1 - 4*1*c|] ==> (c + bdv+ bdv^^^2=0) =
9.254 + "[|0<=1 - 4*1*c|] ==> (c + bdv+ bdv \<up> 2=0) =
9.255 ((bdv=( -1 + sqrt(1 - 4*1*c))/(2*1))
9.256 | (bdv=( -1 - sqrt(1 - 4*1*c))/(2*1)))" and
9.257 d2_abcformula4_neg:
9.258 - "[|1 - 4*1*c<0|] ==> (c + bdv+ bdv^^^2=0) = False" and
9.259 + "[|1 - 4*1*c<0|] ==> (c + bdv+ bdv \<up> 2=0) = False" and
9.260 d2_abcformula5:
9.261 - "[|Not(bdv occurs_in c); 0<=0 - 4*a*c|] ==> (c + a*bdv^^^2=0) =
9.262 + "[|Not(bdv occurs_in c); 0<=0 - 4*a*c|] ==> (c + a*bdv \<up> 2=0) =
9.263 ((bdv=( 0 + sqrt(0 - 4*a*c))/(2*a))
9.264 | (bdv=( 0 - sqrt(0 - 4*a*c))/(2*a)))" and
9.265 d2_abcformula5_neg:
9.266 - "[|Not(bdv occurs_in c); 0 - 4*a*c<0|] ==> (c + a*bdv^^^2=0) = False" and
9.267 + "[|Not(bdv occurs_in c); 0 - 4*a*c<0|] ==> (c + a*bdv \<up> 2=0) = False" and
9.268 d2_abcformula6:
9.269 - "[|Not(bdv occurs_in c); 0<=0 - 4*1*c|] ==> (c+ bdv^^^2=0) =
9.270 + "[|Not(bdv occurs_in c); 0<=0 - 4*1*c|] ==> (c+ bdv \<up> 2=0) =
9.271 ((bdv=( 0 + sqrt(0 - 4*1*c))/(2*1))
9.272 | (bdv=( 0 - sqrt(0 - 4*1*c))/(2*1)))" and
9.273 d2_abcformula6_neg:
9.274 - "[|Not(bdv occurs_in c); 0 - 4*1*c<0|] ==> (c+ bdv^^^2=0) = False" and
9.275 + "[|Not(bdv occurs_in c); 0 - 4*1*c<0|] ==> (c+ bdv \<up> 2=0) = False" and
9.276 d2_abcformula7:
9.277 - "[|0<=b^^^2 - 0|] ==> ( b*bdv+a*bdv^^^2=0) =
9.278 - ((bdv=( -b + sqrt(b^^^2 - 0))/(2*a))
9.279 - | (bdv=( -b - sqrt(b^^^2 - 0))/(2*a)))" and
9.280 + "[|0<=b \<up> 2 - 0|] ==> ( b*bdv+a*bdv \<up> 2=0) =
9.281 + ((bdv=( -b + sqrt(b \<up> 2 - 0))/(2*a))
9.282 + | (bdv=( -b - sqrt(b \<up> 2 - 0))/(2*a)))" and
9.283 (* d2_abcformula7_neg not need b^2 never less zero in R *)
9.284 d2_abcformula8:
9.285 - "[|0<=b^^^2 - 0|] ==> ( b*bdv+ bdv^^^2=0) =
9.286 - ((bdv=( -b + sqrt(b^^^2 - 0))/(2*1))
9.287 - | (bdv=( -b - sqrt(b^^^2 - 0))/(2*1)))" and
9.288 + "[|0<=b \<up> 2 - 0|] ==> ( b*bdv+ bdv \<up> 2=0) =
9.289 + ((bdv=( -b + sqrt(b \<up> 2 - 0))/(2*1))
9.290 + | (bdv=( -b - sqrt(b \<up> 2 - 0))/(2*1)))" and
9.291 (* d2_abcformula8_neg not need b^2 never less zero in R *)
9.292 d2_abcformula9:
9.293 - "[|0<=1 - 0|] ==> ( bdv+a*bdv^^^2=0) =
9.294 + "[|0<=1 - 0|] ==> ( bdv+a*bdv \<up> 2=0) =
9.295 ((bdv=( -1 + sqrt(1 - 0))/(2*a))
9.296 | (bdv=( -1 - sqrt(1 - 0))/(2*a)))" and
9.297 (* d2_abcformula9_neg not need, because 1<0 ==> False*)
9.298 d2_abcformula10:
9.299 - "[|0<=1 - 0|] ==> ( bdv+ bdv^^^2=0) =
9.300 + "[|0<=1 - 0|] ==> ( bdv+ bdv \<up> 2=0) =
9.301 ((bdv=( -1 + sqrt(1 - 0))/(2*1))
9.302 | (bdv=( -1 - sqrt(1 - 0))/(2*1)))" and
9.303 (* d2_abcformula10_neg not need, because 1<0 ==> False*)
9.304 @@ -230,53 +230,53 @@
9.305
9.306 (* ---- degree 3 ----*)
9.307 d3_reduce_equation1:
9.308 - "(a*bdv + b*bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | (a + b*bdv + c*bdv^^^2=0))" and
9.309 + "(a*bdv + b*bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | (a + b*bdv + c*bdv \<up> 2=0))" and
9.310 d3_reduce_equation2:
9.311 - "( bdv + b*bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | (1 + b*bdv + c*bdv^^^2=0))" and
9.312 + "( bdv + b*bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | (1 + b*bdv + c*bdv \<up> 2=0))" and
9.313 d3_reduce_equation3:
9.314 - "(a*bdv + bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | (a + bdv + c*bdv^^^2=0))" and
9.315 + "(a*bdv + bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | (a + bdv + c*bdv \<up> 2=0))" and
9.316 d3_reduce_equation4:
9.317 - "( bdv + bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | (1 + bdv + c*bdv^^^2=0))" and
9.318 + "( bdv + bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | (1 + bdv + c*bdv \<up> 2=0))" and
9.319 d3_reduce_equation5:
9.320 - "(a*bdv + b*bdv^^^2 + bdv^^^3=0) = (bdv=0 | (a + b*bdv + bdv^^^2=0))" and
9.321 + "(a*bdv + b*bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | (a + b*bdv + bdv \<up> 2=0))" and
9.322 d3_reduce_equation6:
9.323 - "( bdv + b*bdv^^^2 + bdv^^^3=0) = (bdv=0 | (1 + b*bdv + bdv^^^2=0))" and
9.324 + "( bdv + b*bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | (1 + b*bdv + bdv \<up> 2=0))" and
9.325 d3_reduce_equation7:
9.326 - "(a*bdv + bdv^^^2 + bdv^^^3=0) = (bdv=0 | (1 + bdv + bdv^^^2=0))" and
9.327 + "(a*bdv + bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | (1 + bdv + bdv \<up> 2=0))" and
9.328 d3_reduce_equation8:
9.329 - "( bdv + bdv^^^2 + bdv^^^3=0) = (bdv=0 | (1 + bdv + bdv^^^2=0))" and
9.330 + "( bdv + bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | (1 + bdv + bdv \<up> 2=0))" and
9.331 d3_reduce_equation9:
9.332 - "(a*bdv + c*bdv^^^3=0) = (bdv=0 | (a + c*bdv^^^2=0))" and
9.333 + "(a*bdv + c*bdv \<up> 3=0) = (bdv=0 | (a + c*bdv \<up> 2=0))" and
9.334 d3_reduce_equation10:
9.335 - "( bdv + c*bdv^^^3=0) = (bdv=0 | (1 + c*bdv^^^2=0))" and
9.336 + "( bdv + c*bdv \<up> 3=0) = (bdv=0 | (1 + c*bdv \<up> 2=0))" and
9.337 d3_reduce_equation11:
9.338 - "(a*bdv + bdv^^^3=0) = (bdv=0 | (a + bdv^^^2=0))" and
9.339 + "(a*bdv + bdv \<up> 3=0) = (bdv=0 | (a + bdv \<up> 2=0))" and
9.340 d3_reduce_equation12:
9.341 - "( bdv + bdv^^^3=0) = (bdv=0 | (1 + bdv^^^2=0))" and
9.342 + "( bdv + bdv \<up> 3=0) = (bdv=0 | (1 + bdv \<up> 2=0))" and
9.343 d3_reduce_equation13:
9.344 - "( b*bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | ( b*bdv + c*bdv^^^2=0))" and
9.345 + "( b*bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | ( b*bdv + c*bdv \<up> 2=0))" and
9.346 d3_reduce_equation14:
9.347 - "( bdv^^^2 + c*bdv^^^3=0) = (bdv=0 | ( bdv + c*bdv^^^2=0))" and
9.348 + "( bdv \<up> 2 + c*bdv \<up> 3=0) = (bdv=0 | ( bdv + c*bdv \<up> 2=0))" and
9.349 d3_reduce_equation15:
9.350 - "( b*bdv^^^2 + bdv^^^3=0) = (bdv=0 | ( b*bdv + bdv^^^2=0))" and
9.351 + "( b*bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | ( b*bdv + bdv \<up> 2=0))" and
9.352 d3_reduce_equation16:
9.353 - "( bdv^^^2 + bdv^^^3=0) = (bdv=0 | ( bdv + bdv^^^2=0))" and
9.354 + "( bdv \<up> 2 + bdv \<up> 3=0) = (bdv=0 | ( bdv + bdv \<up> 2=0))" and
9.355 d3_isolate_add1:
9.356 - "[|Not(bdv occurs_in a)|] ==> (a + b*bdv^^^3=0) = (b*bdv^^^3= (-1)*a)" and
9.357 + "[|Not(bdv occurs_in a)|] ==> (a + b*bdv \<up> 3=0) = (b*bdv \<up> 3= (-1)*a)" and
9.358 d3_isolate_add2:
9.359 - "[|Not(bdv occurs_in a)|] ==> (a + bdv^^^3=0) = ( bdv^^^3= (-1)*a)" and
9.360 + "[|Not(bdv occurs_in a)|] ==> (a + bdv \<up> 3=0) = ( bdv \<up> 3= (-1)*a)" and
9.361 d3_isolate_div:
9.362 - "[|Not(b=0);Not(bdv occurs_in a)|] ==> (b*bdv^^^3=c) = (bdv^^^3=c/b)" and
9.363 + "[|Not(b=0);Not(bdv occurs_in a)|] ==> (b*bdv \<up> 3=c) = (bdv \<up> 3=c/b)" and
9.364 d3_root_equation2:
9.365 - "(bdv^^^3=0) = (bdv=0)" and
9.366 + "(bdv \<up> 3=0) = (bdv=0)" and
9.367 d3_root_equation1:
9.368 - "(bdv^^^3=c) = (bdv = nroot 3 c)" and
9.369 + "(bdv \<up> 3=c) = (bdv = nroot 3 c)" and
9.370
9.371 (* ---- degree 4 ----*)
9.372 (* RL03.FIXME es wir nicht getestet ob u>0 *)
9.373 d4_sub_u1:
9.374 - "(c+b*bdv^^^2+a*bdv^^^4=0) =
9.375 - ((a*u^^^2+b*u+c=0) & (bdv^^^2=u))" and
9.376 + "(c+b*bdv \<up> 2+a*bdv \<up> 4=0) =
9.377 + ((a*u \<up> 2+b*u+c=0) & (bdv \<up> 2=u))" and
9.378
9.379 (* ---- 7.3.02 von Termorder ---- *)
9.380
9.381 @@ -297,26 +297,26 @@
9.382 bdv_collect_assoc2_3: "k + l * bdv + bdv = k + (l + 1) * bdv" and
9.383
9.384
9.385 - bdv_n_collect_1: "l * bdv^^^n + m * bdv^^^n = (l + m) * bdv^^^n" and
9.386 - bdv_n_collect_2: " bdv^^^n + m * bdv^^^n = (1 + m) * bdv^^^n" and
9.387 - bdv_n_collect_3: "l * bdv^^^n + bdv^^^n = (l + 1) * bdv^^^n" (*order!*) and
9.388 + bdv_n_collect_1: "l * bdv \<up> n + m * bdv \<up> n = (l + m) * bdv \<up> n" and
9.389 + bdv_n_collect_2: " bdv \<up> n + m * bdv \<up> n = (1 + m) * bdv \<up> n" and
9.390 + bdv_n_collect_3: "l * bdv \<up> n + bdv \<up> n = (l + 1) * bdv \<up> n" (*order!*) and
9.391
9.392 bdv_n_collect_assoc1_1:
9.393 - "l * bdv^^^n + (m * bdv^^^n + k) = (l + m) * bdv^^^n + k" and
9.394 - bdv_n_collect_assoc1_2: "bdv^^^n + (m * bdv^^^n + k) = (1 + m) * bdv^^^n + k" and
9.395 - bdv_n_collect_assoc1_3: "l * bdv^^^n + (bdv^^^n + k) = (l + 1) * bdv^^^n + k" and
9.396 + "l * bdv \<up> n + (m * bdv \<up> n + k) = (l + m) * bdv \<up> n + k" and
9.397 + bdv_n_collect_assoc1_2: "bdv \<up> n + (m * bdv \<up> n + k) = (1 + m) * bdv \<up> n + k" and
9.398 + bdv_n_collect_assoc1_3: "l * bdv \<up> n + (bdv \<up> n + k) = (l + 1) * bdv \<up> n + k" and
9.399
9.400 - bdv_n_collect_assoc2_1: "k + l * bdv^^^n + m * bdv^^^n = k +(l + m) * bdv^^^n" and
9.401 - bdv_n_collect_assoc2_2: "k + bdv^^^n + m * bdv^^^n = k + (1 + m) * bdv^^^n" and
9.402 - bdv_n_collect_assoc2_3: "k + l * bdv^^^n + bdv^^^n = k + (l + 1) * bdv^^^n" and
9.403 + bdv_n_collect_assoc2_1: "k + l * bdv \<up> n + m * bdv \<up> n = k +(l + m) * bdv \<up> n" and
9.404 + bdv_n_collect_assoc2_2: "k + bdv \<up> n + m * bdv \<up> n = k + (1 + m) * bdv \<up> n" and
9.405 + bdv_n_collect_assoc2_3: "k + l * bdv \<up> n + bdv \<up> n = k + (l + 1) * bdv \<up> n" and
9.406
9.407 (*WN.14.3.03*)
9.408 real_minus_div: "- (a / b) = (-1 * a) / b" and
9.409
9.410 separate_bdv: "(a * bdv) / b = (a / b) * (bdv::real)" and
9.411 - separate_bdv_n: "(a * bdv ^^^ n) / b = (a / b) * bdv ^^^ n" and
9.412 + separate_bdv_n: "(a * bdv \<up> n) / b = (a / b) * bdv \<up> n" and
9.413 separate_1_bdv: "bdv / b = (1 / b) * (bdv::real)" and
9.414 - separate_1_bdv_n: "bdv ^^^ n / b = (1 / b) * bdv ^^^ n"
9.415 + separate_1_bdv_n: "bdv \<up> n / b = (1 / b) * bdv \<up> n"
9.416
9.417 ML \<open>
9.418 val thy = @{theory};
9.419 @@ -679,65 +679,65 @@
9.420 srls = Rule_Set.Empty, calc = [], errpatts = [],
9.421 rules =
9.422 [Rule.Thm("d3_reduce_equation1",ThmC.numerals_to_Free @{thm d3_reduce_equation1}),
9.423 - (*a*bdv + b*bdv^^^2 + c*bdv^^^3=0) =
9.424 - (bdv=0 | (a + b*bdv + c*bdv^^^2=0)*)
9.425 + (*a*bdv + b*bdv \<up> 2 + c*bdv \<up> 3=0) =
9.426 + (bdv=0 | (a + b*bdv + c*bdv \<up> 2=0)*)
9.427 Rule.Thm("d3_reduce_equation2",ThmC.numerals_to_Free @{thm d3_reduce_equation2}),
9.428 - (* bdv + b*bdv^^^2 + c*bdv^^^3=0) =
9.429 - (bdv=0 | (1 + b*bdv + c*bdv^^^2=0)*)
9.430 + (* bdv + b*bdv \<up> 2 + c*bdv \<up> 3=0) =
9.431 + (bdv=0 | (1 + b*bdv + c*bdv \<up> 2=0)*)
9.432 Rule.Thm("d3_reduce_equation3",ThmC.numerals_to_Free @{thm d3_reduce_equation3}),
9.433 - (*a*bdv + bdv^^^2 + c*bdv^^^3=0) =
9.434 - (bdv=0 | (a + bdv + c*bdv^^^2=0)*)
9.435 + (*a*bdv + bdv \<up> 2 + c*bdv \<up> 3=0) =
9.436 + (bdv=0 | (a + bdv + c*bdv \<up> 2=0)*)
9.437 Rule.Thm("d3_reduce_equation4",ThmC.numerals_to_Free @{thm d3_reduce_equation4}),
9.438 - (* bdv + bdv^^^2 + c*bdv^^^3=0) =
9.439 - (bdv=0 | (1 + bdv + c*bdv^^^2=0)*)
9.440 + (* bdv + bdv \<up> 2 + c*bdv \<up> 3=0) =
9.441 + (bdv=0 | (1 + bdv + c*bdv \<up> 2=0)*)
9.442 Rule.Thm("d3_reduce_equation5",ThmC.numerals_to_Free @{thm d3_reduce_equation5}),
9.443 - (*a*bdv + b*bdv^^^2 + bdv^^^3=0) =
9.444 - (bdv=0 | (a + b*bdv + bdv^^^2=0)*)
9.445 + (*a*bdv + b*bdv \<up> 2 + bdv \<up> 3=0) =
9.446 + (bdv=0 | (a + b*bdv + bdv \<up> 2=0)*)
9.447 Rule.Thm("d3_reduce_equation6",ThmC.numerals_to_Free @{thm d3_reduce_equation6}),
9.448 - (* bdv + b*bdv^^^2 + bdv^^^3=0) =
9.449 - (bdv=0 | (1 + b*bdv + bdv^^^2=0)*)
9.450 + (* bdv + b*bdv \<up> 2 + bdv \<up> 3=0) =
9.451 + (bdv=0 | (1 + b*bdv + bdv \<up> 2=0)*)
9.452 Rule.Thm("d3_reduce_equation7",ThmC.numerals_to_Free @{thm d3_reduce_equation7}),
9.453 - (*a*bdv + bdv^^^2 + bdv^^^3=0) =
9.454 - (bdv=0 | (1 + bdv + bdv^^^2=0)*)
9.455 + (*a*bdv + bdv \<up> 2 + bdv \<up> 3=0) =
9.456 + (bdv=0 | (1 + bdv + bdv \<up> 2=0)*)
9.457 Rule.Thm("d3_reduce_equation8",ThmC.numerals_to_Free @{thm d3_reduce_equation8}),
9.458 - (* bdv + bdv^^^2 + bdv^^^3=0) =
9.459 - (bdv=0 | (1 + bdv + bdv^^^2=0)*)
9.460 + (* bdv + bdv \<up> 2 + bdv \<up> 3=0) =
9.461 + (bdv=0 | (1 + bdv + bdv \<up> 2=0)*)
9.462 Rule.Thm("d3_reduce_equation9",ThmC.numerals_to_Free @{thm d3_reduce_equation9}),
9.463 - (*a*bdv + c*bdv^^^3=0) =
9.464 - (bdv=0 | (a + c*bdv^^^2=0)*)
9.465 + (*a*bdv + c*bdv \<up> 3=0) =
9.466 + (bdv=0 | (a + c*bdv \<up> 2=0)*)
9.467 Rule.Thm("d3_reduce_equation10",ThmC.numerals_to_Free @{thm d3_reduce_equation10}),
9.468 - (* bdv + c*bdv^^^3=0) =
9.469 - (bdv=0 | (1 + c*bdv^^^2=0)*)
9.470 + (* bdv + c*bdv \<up> 3=0) =
9.471 + (bdv=0 | (1 + c*bdv \<up> 2=0)*)
9.472 Rule.Thm("d3_reduce_equation11",ThmC.numerals_to_Free @{thm d3_reduce_equation11}),
9.473 - (*a*bdv + bdv^^^3=0) =
9.474 - (bdv=0 | (a + bdv^^^2=0)*)
9.475 + (*a*bdv + bdv \<up> 3=0) =
9.476 + (bdv=0 | (a + bdv \<up> 2=0)*)
9.477 Rule.Thm("d3_reduce_equation12",ThmC.numerals_to_Free @{thm d3_reduce_equation12}),
9.478 - (* bdv + bdv^^^3=0) =
9.479 - (bdv=0 | (1 + bdv^^^2=0)*)
9.480 + (* bdv + bdv \<up> 3=0) =
9.481 + (bdv=0 | (1 + bdv \<up> 2=0)*)
9.482 Rule.Thm("d3_reduce_equation13",ThmC.numerals_to_Free @{thm d3_reduce_equation13}),
9.483 - (* b*bdv^^^2 + c*bdv^^^3=0) =
9.484 - (bdv=0 | ( b*bdv + c*bdv^^^2=0)*)
9.485 + (* b*bdv \<up> 2 + c*bdv \<up> 3=0) =
9.486 + (bdv=0 | ( b*bdv + c*bdv \<up> 2=0)*)
9.487 Rule.Thm("d3_reduce_equation14",ThmC.numerals_to_Free @{thm d3_reduce_equation14}),
9.488 - (* bdv^^^2 + c*bdv^^^3=0) =
9.489 - (bdv=0 | ( bdv + c*bdv^^^2=0)*)
9.490 + (* bdv \<up> 2 + c*bdv \<up> 3=0) =
9.491 + (bdv=0 | ( bdv + c*bdv \<up> 2=0)*)
9.492 Rule.Thm("d3_reduce_equation15",ThmC.numerals_to_Free @{thm d3_reduce_equation15}),
9.493 - (* b*bdv^^^2 + bdv^^^3=0) =
9.494 - (bdv=0 | ( b*bdv + bdv^^^2=0)*)
9.495 + (* b*bdv \<up> 2 + bdv \<up> 3=0) =
9.496 + (bdv=0 | ( b*bdv + bdv \<up> 2=0)*)
9.497 Rule.Thm("d3_reduce_equation16",ThmC.numerals_to_Free @{thm d3_reduce_equation16}),
9.498 - (* bdv^^^2 + bdv^^^3=0) =
9.499 - (bdv=0 | ( bdv + bdv^^^2=0)*)
9.500 + (* bdv \<up> 2 + bdv \<up> 3=0) =
9.501 + (bdv=0 | ( bdv + bdv \<up> 2=0)*)
9.502 Rule.Thm("d3_isolate_add1",ThmC.numerals_to_Free @{thm d3_isolate_add1}),
9.503 - (*[|Not(bdv occurs_in a)|] ==> (a + b*bdv^^^3=0) =
9.504 - (bdv=0 | (b*bdv^^^3=a)*)
9.505 + (*[|Not(bdv occurs_in a)|] ==> (a + b*bdv \<up> 3=0) =
9.506 + (bdv=0 | (b*bdv \<up> 3=a)*)
9.507 Rule.Thm("d3_isolate_add2",ThmC.numerals_to_Free @{thm d3_isolate_add2}),
9.508 - (*[|Not(bdv occurs_in a)|] ==> (a + bdv^^^3=0) =
9.509 - (bdv=0 | ( bdv^^^3=a)*)
9.510 + (*[|Not(bdv occurs_in a)|] ==> (a + bdv \<up> 3=0) =
9.511 + (bdv=0 | ( bdv \<up> 3=a)*)
9.512 Rule.Thm("d3_isolate_div",ThmC.numerals_to_Free @{thm d3_isolate_div}),
9.513 - (*[|Not(b=0)|] ==> (b*bdv^^^3=c) = (bdv^^^3=c/b*)
9.514 + (*[|Not(b=0)|] ==> (b*bdv \<up> 3=c) = (bdv \<up> 3=c/b*)
9.515 Rule.Thm("d3_root_equation2",ThmC.numerals_to_Free @{thm d3_root_equation2}),
9.516 - (*(bdv^^^3=0) = (bdv=0) *)
9.517 + (*(bdv \<up> 3=0) = (bdv=0) *)
9.518 Rule.Thm("d3_root_equation1",ThmC.numerals_to_Free @{thm d3_root_equation1})
9.519 - (*bdv^^^3=c) = (bdv = nroot 3 c*)
9.520 + (*bdv \<up> 3=c) = (bdv = nroot 3 c*)
9.521 ],
9.522 scr = Rule.Empty_Prog
9.523 });
9.524 @@ -816,45 +816,45 @@
9.525 (Problem.prep_input thy "pbl_equ_univ_poly_deg2_sqonly" [] Problem.id_empty
9.526 (["sq_only", "degree_2", "polynomial", "univariate", "equation"],
9.527 [("#Given" ,["equality e_e", "solveFor v_v"]),
9.528 - ("#Where" ,["matches ( ?a + ?v_^^^2 = 0) e_e | " ^
9.529 - "matches ( ?a + ?b*?v_^^^2 = 0) e_e | " ^
9.530 - "matches ( ?v_^^^2 = 0) e_e | " ^
9.531 - "matches ( ?b*?v_^^^2 = 0) e_e" ,
9.532 - "Not (matches (?a + ?v_ + ?v_^^^2 = 0) e_e) &" ^
9.533 - "Not (matches (?a + ?b*?v_ + ?v_^^^2 = 0) e_e) &" ^
9.534 - "Not (matches (?a + ?v_ + ?c*?v_^^^2 = 0) e_e) &" ^
9.535 - "Not (matches (?a + ?b*?v_ + ?c*?v_^^^2 = 0) e_e) &" ^
9.536 - "Not (matches ( ?v_ + ?v_^^^2 = 0) e_e) &" ^
9.537 - "Not (matches ( ?b*?v_ + ?v_^^^2 = 0) e_e) &" ^
9.538 - "Not (matches ( ?v_ + ?c*?v_^^^2 = 0) e_e) &" ^
9.539 - "Not (matches ( ?b*?v_ + ?c*?v_^^^2 = 0) e_e)"]),
9.540 + ("#Where" ,["matches ( ?a + ?v_ \<up> 2 = 0) e_e | " ^
9.541 + "matches ( ?a + ?b*?v_ \<up> 2 = 0) e_e | " ^
9.542 + "matches ( ?v_ \<up> 2 = 0) e_e | " ^
9.543 + "matches ( ?b*?v_ \<up> 2 = 0) e_e" ,
9.544 + "Not (matches (?a + ?v_ + ?v_ \<up> 2 = 0) e_e) &" ^
9.545 + "Not (matches (?a + ?b*?v_ + ?v_ \<up> 2 = 0) e_e) &" ^
9.546 + "Not (matches (?a + ?v_ + ?c*?v_ \<up> 2 = 0) e_e) &" ^
9.547 + "Not (matches (?a + ?b*?v_ + ?c*?v_ \<up> 2 = 0) e_e) &" ^
9.548 + "Not (matches ( ?v_ + ?v_ \<up> 2 = 0) e_e) &" ^
9.549 + "Not (matches ( ?b*?v_ + ?v_ \<up> 2 = 0) e_e) &" ^
9.550 + "Not (matches ( ?v_ + ?c*?v_ \<up> 2 = 0) e_e) &" ^
9.551 + "Not (matches ( ?b*?v_ + ?c*?v_ \<up> 2 = 0) e_e)"]),
9.552 ("#Find" ,["solutions v_v'i'"])],
9.553 PolyEq_prls, SOME "solve (e_e::bool, v_v)",
9.554 [["PolyEq", "solve_d2_polyeq_sqonly_equation"]])),
9.555 (Problem.prep_input thy "pbl_equ_univ_poly_deg2_bdvonly" [] Problem.id_empty
9.556 (["bdv_only", "degree_2", "polynomial", "univariate", "equation"],
9.557 [("#Given", ["equality e_e", "solveFor v_v"]),
9.558 - ("#Where", ["matches (?a*?v_ + ?v_^^^2 = 0) e_e | " ^
9.559 - "matches ( ?v_ + ?v_^^^2 = 0) e_e | " ^
9.560 - "matches ( ?v_ + ?b*?v_^^^2 = 0) e_e | " ^
9.561 - "matches (?a*?v_ + ?b*?v_^^^2 = 0) e_e | " ^
9.562 - "matches ( ?v_^^^2 = 0) e_e | " ^
9.563 - "matches ( ?b*?v_^^^2 = 0) e_e "]),
9.564 + ("#Where", ["matches (?a*?v_ + ?v_ \<up> 2 = 0) e_e | " ^
9.565 + "matches ( ?v_ + ?v_ \<up> 2 = 0) e_e | " ^
9.566 + "matches ( ?v_ + ?b*?v_ \<up> 2 = 0) e_e | " ^
9.567 + "matches (?a*?v_ + ?b*?v_ \<up> 2 = 0) e_e | " ^
9.568 + "matches ( ?v_ \<up> 2 = 0) e_e | " ^
9.569 + "matches ( ?b*?v_ \<up> 2 = 0) e_e "]),
9.570 ("#Find", ["solutions v_v'i'"])],
9.571 PolyEq_prls, SOME "solve (e_e::bool, v_v)",
9.572 [["PolyEq", "solve_d2_polyeq_bdvonly_equation"]])),
9.573 (Problem.prep_input thy "pbl_equ_univ_poly_deg2_pq" [] Problem.id_empty
9.574 (["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
9.575 [("#Given", ["equality e_e", "solveFor v_v"]),
9.576 - ("#Where", ["matches (?a + 1*?v_^^^2 = 0) e_e | " ^
9.577 - "matches (?a + ?v_^^^2 = 0) e_e"]),
9.578 + ("#Where", ["matches (?a + 1*?v_ \<up> 2 = 0) e_e | " ^
9.579 + "matches (?a + ?v_ \<up> 2 = 0) e_e"]),
9.580 ("#Find", ["solutions v_v'i'"])],
9.581 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq", "solve_d2_polyeq_pq_equation"]])),
9.582 (Problem.prep_input thy "pbl_equ_univ_poly_deg2_abc" [] Problem.id_empty
9.583 (["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
9.584 [("#Given", ["equality e_e", "solveFor v_v"]),
9.585 - ("#Where", ["matches (?a + ?v_^^^2 = 0) e_e | " ^
9.586 - "matches (?a + ?b*?v_^^^2 = 0) e_e"]),
9.587 + ("#Where", ["matches (?a + ?v_ \<up> 2 = 0) e_e | " ^
9.588 + "matches (?a + ?b*?v_ \<up> 2 = 0) e_e"]),
9.589 ("#Find", ["solutions v_v'i'"])],
9.590 PolyEq_prls, SOME "solve (e_e::bool, v_v)", [["PolyEq", "solve_d2_polyeq_abc_equation"]])),
9.591 (*--- d3 ---*)
9.592 @@ -1316,7 +1316,7 @@
9.593 Rule.Thm ("separate_1_bdv", ThmC.numerals_to_Free @{thm separate_1_bdv}),
9.594 (*"?bdv / ?b = (1 / ?b) * ?bdv"*)
9.595 Rule.Thm ("separate_1_bdv_n", ThmC.numerals_to_Free @{thm separate_1_bdv_n}),
9.596 - (*"?bdv ^^^ ?n / ?b = 1 / ?b * ?bdv ^^^ ?n"*)
9.597 + (*"?bdv \<up> ?n / ?b = 1 / ?b * ?bdv \<up> ?n"*)
9.598 Rule.Thm ("add_divide_distrib",
9.599 ThmC.numerals_to_Free @{thm add_divide_distrib})
9.600 (*"(?x + ?y) / ?z = ?x / ?z + ?y / ?z"
10.1 --- a/src/Tools/isac/Knowledge/PolyMinus.thy Mon Apr 19 20:44:18 2021 +0200
10.2 +++ b/src/Tools/isac/Knowledge/PolyMinus.thy Tue Apr 20 16:58:44 2021 +0200
10.3 @@ -46,7 +46,7 @@
10.4 (-b * a) = (-a * b)" and
10.5 tausche_mal_mal: "[| c is_atom; b kleiner c |] ==>
10.6 (x * c * b) = (x * b * c)" and
10.7 - x_quadrat: "(x * a) * a = x * a ^^^ 2" and
10.8 + x_quadrat: "(x * a) * a = x * a \<up> 2" and
10.9
10.10
10.11 subtrahiere: "[| l is_const; m is_const |] ==>
10.12 @@ -354,7 +354,7 @@
10.13 Rule.Thm ("tausche_mal_mal",ThmC.numerals_to_Free @{thm tausche_mal_mal}),
10.14 (*"[| c is_atom; b kleiner c |] ==> (a * c * b) = (a * b *c)"*)
10.15 Rule.Thm ("x_quadrat",ThmC.numerals_to_Free @{thm x_quadrat})
10.16 - (*"(x * a) * a = x * a ^^^ 2"*)
10.17 + (*"(x * a) * a = x * a \<up> 2"*)
10.18
10.19 (*Rule.Thm ("",ThmC.numerals_to_Free @{}),
10.20 (*""*)*)
11.1 --- a/src/Tools/isac/Knowledge/RatEq.thy Mon Apr 19 20:44:18 2021 +0200
11.2 +++ b/src/Tools/isac/Knowledge/RatEq.thy Tue Apr 20 16:58:44 2021 +0200
11.3 @@ -33,7 +33,7 @@
11.4 real_rat_mult_1: "a*(b/c) = (a*b)/c" and
11.5 real_rat_mult_2: "(a/b)*(c/d) = (a*c)/(b*d)" and
11.6 real_rat_mult_3: "(a/b)*c = (a*c)/b" and
11.7 - real_rat_pow: "(a/b)^^^2 = a^^^2/b^^^2" and
11.8 + real_rat_pow: "(a/b) \<up> 2 = a \<up> 2/b \<up> 2" and
11.9
11.10 rat_double_rat_1: "[|Not(c=0); Not(d=0)|] ==> (a / (c/d) = (a*d) / c)" and
11.11 rat_double_rat_2: "[|Not(b=0);Not(c=0); Not(d=0)|] ==>
12.1 --- a/src/Tools/isac/Knowledge/Rational.thy Mon Apr 19 20:44:18 2021 +0200
12.2 +++ b/src/Tools/isac/Knowledge/Rational.thy Tue Apr 20 16:58:44 2021 +0200
12.3 @@ -98,7 +98,7 @@
12.4 real_divide_divide1_mg: "y ~= 0 ==> (u / v) / (y / z) = (u * z) / (y * v)" and
12.5 (*real_divide_divide2_eq: "x / y / z = x / (y * z)"..Isa02*)
12.6
12.7 - rat_power: "(a / b)^^^n = (a^^^n) / (b^^^n)" and
12.8 + rat_power: "(a / b) \<up> n = (a \<up> n) / (b \<up> n)" and
12.9
12.10 rat_add: "[| a is_const; b is_const; c is_const; d is_const |] ==>
12.11 a / c + b / d = (a * d + b * c) / (c * d)" and
13.1 --- a/src/Tools/isac/Knowledge/Root.thy Mon Apr 19 20:44:18 2021 +0200
13.2 +++ b/src/Tools/isac/Knowledge/Root.thy Tue Apr 20 16:58:44 2021 +0200
13.3 @@ -18,28 +18,28 @@
13.4 theorem-IDs 'xxxI' with ^^^ instead of ^ in 'xxx' in Isabelle2002.*)
13.5
13.6 root_plus_minus: "0 <= b ==>
13.7 - (a^^^2 = b) = ((a = sqrt b) | (a = (-1)*sqrt b))" and
13.8 - root_false: "b < 0 ==> (a^^^2 = b) = False" and
13.9 + (a \<up> 2 = b) = ((a = sqrt b) | (a = (-1)*sqrt b))" and
13.10 + root_false: "b < 0 ==> (a \<up> 2 = b) = False" and
13.11
13.12 (* for expand_rootbinom *)
13.13 real_pp_binom_times: "(a + b)*(c + d) = a*c + a*d + b*c + b*d" and
13.14 real_pm_binom_times: "(a + b)*(c - d) = a*c - a*d + b*c - b*d" and
13.15 real_mp_binom_times: "(a - b)*(c + d) = a*c + a*d - b*c - b*d" and
13.16 real_mm_binom_times: "(a - b)*(c - d) = a*c - a*d - b*c + b*d" and
13.17 - real_plus_binom_pow3: "(a + b)^^^3 = a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3" and
13.18 - real_minus_binom_pow3: "(a - b)^^^3 = a^^^3 - 3*a^^^2*b + 3*a*b^^^2 - b^^^3" and
13.19 - realpow_mul: "(a*b)^^^n = a^^^n * b^^^n" and
13.20 + real_plus_binom_pow3: "(a + b) \<up> 3 = a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3" and
13.21 + real_minus_binom_pow3: "(a - b) \<up> 3 = a \<up> 3 - 3*a \<up> 2*b + 3*a*b \<up> 2 - b \<up> 3" and
13.22 + realpow_mul: "(a*b) \<up> n = a \<up> n * b \<up> n" and
13.23
13.24 real_diff_minus: "a - b = a + (-1) * b" and
13.25 - real_plus_binom_times: "(a + b)*(a + b) = a^^^2 + 2*a*b + b^^^2" and
13.26 - real_minus_binom_times: "(a - b)*(a - b) = a^^^2 - 2*a*b + b^^^2" and
13.27 - real_plus_binom_pow2: "(a + b)^^^2 = a^^^2 + 2*a*b + b^^^2" and
13.28 - real_minus_binom_pow2: "(a - b)^^^2 = a^^^2 - 2*a*b + b^^^2" and
13.29 - real_plus_minus_binom1: "(a + b)*(a - b) = a^^^2 - b^^^2" and
13.30 - real_plus_minus_binom2: "(a - b)*(a + b) = a^^^2 - b^^^2" and
13.31 + real_plus_binom_times: "(a + b)*(a + b) = a \<up> 2 + 2*a*b + b \<up> 2" and
13.32 + real_minus_binom_times: "(a - b)*(a - b) = a \<up> 2 - 2*a*b + b \<up> 2" and
13.33 + real_plus_binom_pow2: "(a + b) \<up> 2 = a \<up> 2 + 2*a*b + b \<up> 2" and
13.34 + real_minus_binom_pow2: "(a - b) \<up> 2 = a \<up> 2 - 2*a*b + b \<up> 2" and
13.35 + real_plus_minus_binom1: "(a + b)*(a - b) = a \<up> 2 - b \<up> 2" and
13.36 + real_plus_minus_binom2: "(a - b)*(a + b) = a \<up> 2 - b \<up> 2" and
13.37
13.38 - real_root_positive: "0 <= a ==> (x ^^^ 2 = a) = (x = sqrt a)" and
13.39 - real_root_negative: "a < 0 ==> (x ^^^ 2 = a) = False"
13.40 + real_root_positive: "0 <= a ==> (x \<up> 2 = a) = (x = sqrt a)" and
13.41 + real_root_negative: "a < 0 ==> (x \<up> 2 = a) = False"
13.42
13.43 ML \<open>
13.44 val thy = @{theory};
14.1 --- a/src/Tools/isac/Knowledge/RootEq.thy Mon Apr 19 20:44:18 2021 +0200
14.2 +++ b/src/Tools/isac/Knowledge/RootEq.thy Tue Apr 20 16:58:44 2021 +0200
14.3 @@ -28,13 +28,13 @@
14.4 subsection \<open>theorems not yet adopted from Isabelle\<close>
14.5 axiomatization where
14.6 (* normalise *)
14.7 - makex1_x: "a^^^1 = a" and
14.8 + makex1_x: "a \<up> 1 = a" and
14.9 real_assoc_1: "a+(b+c) = a+b+c" and
14.10 real_assoc_2: "a*(b*c) = a*b*c" and
14.11
14.12 (* simplification of root*)
14.13 - sqrt_square_1: "[|0 <= a|] ==> (sqrt a)^^^2 = a" and
14.14 - sqrt_square_2: "sqrt (a ^^^ 2) = a" and
14.15 + sqrt_square_1: "[|0 <= a|] ==> (sqrt a) \<up> 2 = a" and
14.16 + sqrt_square_2: "sqrt (a \<up> 2) = a" and
14.17 sqrt_times_root_1: "sqrt a * sqrt b = sqrt(a*b)" and
14.18 sqrt_times_root_2: "a * sqrt b * sqrt c = a * sqrt(b*c)" and
14.19
14.20 @@ -79,31 +79,31 @@
14.21 ( (sqrt a - sqrt b = sqrt c - sqrt d) =
14.22 (a - 2*sqrt(a)*sqrt(b)+b = c - 2*sqrt(c)*sqrt(d)+d))" and
14.23 sqrt_square_equation_left_1: "[|bdv occurs_in a; 0 <= a; 0 <= b|] ==>
14.24 - ( (sqrt (a) = b) = (a = (b^^^2)))" and
14.25 + ( (sqrt (a) = b) = (a = (b \<up> 2)))" and
14.26 sqrt_square_equation_left_2: "[|bdv occurs_in a; 0 <= a; 0 <= b*c|] ==>
14.27 - ( (c*sqrt(a) = b) = (c^^^2*a = b^^^2))" and
14.28 + ( (c*sqrt(a) = b) = (c \<up> 2*a = b \<up> 2))" and
14.29 sqrt_square_equation_left_3: "[|bdv occurs_in a; 0 <= a; 0 <= b*c|] ==>
14.30 - ( c/sqrt(a) = b) = (c^^^2 / a = b^^^2)" and
14.31 + ( c/sqrt(a) = b) = (c \<up> 2 / a = b \<up> 2)" and
14.32 (* small hack: thm 4-6 are not needed if rootnormalise is well done*)
14.33 sqrt_square_equation_left_4: "[|bdv occurs_in a; 0 <= a; 0 <= b*c*d|] ==>
14.34 - ( (c*(d/sqrt (a)) = b) = (c^^^2*(d^^^2/a) = b^^^2))" and
14.35 + ( (c*(d/sqrt (a)) = b) = (c \<up> 2*(d \<up> 2/a) = b \<up> 2))" and
14.36 sqrt_square_equation_left_5: "[|bdv occurs_in a; 0 <= a; 0 <= b*c*d|] ==>
14.37 - ( c/(d*sqrt(a)) = b) = (c^^^2 / (d^^^2*a) = b^^^2)" and
14.38 + ( c/(d*sqrt(a)) = b) = (c \<up> 2 / (d \<up> 2*a) = b \<up> 2)" and
14.39 sqrt_square_equation_left_6: "[|bdv occurs_in a; 0 <= a; 0 <= b*c*d*e|] ==>
14.40 - ( (c*(d/(e*sqrt (a))) = b) = (c^^^2*(d^^^2/(e^^^2*a)) = b^^^2))" and
14.41 + ( (c*(d/(e*sqrt (a))) = b) = (c \<up> 2*(d \<up> 2/(e \<up> 2*a)) = b \<up> 2))" and
14.42 sqrt_square_equation_right_1: "[|bdv occurs_in b; 0 <= a; 0 <= b|] ==>
14.43 - ( (a = sqrt (b)) = (a^^^2 = b))" and
14.44 + ( (a = sqrt (b)) = (a \<up> 2 = b))" and
14.45 sqrt_square_equation_right_2: "[|bdv occurs_in b; 0 <= a*c; 0 <= b|] ==>
14.46 - ( (a = c*sqrt (b)) = ((a^^^2) = c^^^2*b))" and
14.47 + ( (a = c*sqrt (b)) = ((a \<up> 2) = c \<up> 2*b))" and
14.48 sqrt_square_equation_right_3: "[|bdv occurs_in b; 0 <= a*c; 0 <= b|] ==>
14.49 - ( (a = c/sqrt (b)) = (a^^^2 = c^^^2/b))" and
14.50 + ( (a = c/sqrt (b)) = (a \<up> 2 = c \<up> 2/b))" and
14.51 (* small hack: thm 4-6 are not needed if rootnormalise is well done*)
14.52 sqrt_square_equation_right_4: "[|bdv occurs_in b; 0 <= a*c*d; 0 <= b|] ==>
14.53 - ( (a = c*(d/sqrt (b))) = ((a^^^2) = c^^^2*(d^^^2/b)))" and
14.54 + ( (a = c*(d/sqrt (b))) = ((a \<up> 2) = c \<up> 2*(d \<up> 2/b)))" and
14.55 sqrt_square_equation_right_5: "[|bdv occurs_in b; 0 <= a*c*d; 0 <= b|] ==>
14.56 - ( (a = c/(d*sqrt (b))) = (a^^^2 = c^^^2/(d^^^2*b)))" and
14.57 + ( (a = c/(d*sqrt (b))) = (a \<up> 2 = c \<up> 2/(d \<up> 2*b)))" and
14.58 sqrt_square_equation_right_6: "[|bdv occurs_in b; 0 <= a*c*d*e; 0 <= b|] ==>
14.59 - ( (a = c*(d/(e*sqrt (b)))) = ((a^^^2) = c^^^2*(d^^^2/(e^^^2*b))))"
14.60 + ( (a = c*(d/(e*sqrt (b)))) = ((a \<up> 2) = c \<up> 2*(d \<up> 2/(e \<up> 2*b))))"
14.61
14.62 subsection \<open>predicates\<close>
14.63 ML \<open>
15.1 --- a/src/Tools/isac/Knowledge/Test.thy Mon Apr 19 20:44:18 2021 +0200
15.2 +++ b/src/Tools/isac/Knowledge/Test.thy Tue Apr 20 16:58:44 2021 +0200
15.3 @@ -162,10 +162,10 @@
15.4 rcancel_const: "[| a is_const; b is_const |] ==> a*(x/b) = a/b*x" and
15.5 rshift_nominator: "(a::real) * b / c = a / c * b" and
15.6
15.7 - exp_pow: "(a ^^^ b) ^^^ c = a ^^^ (b * c)" and
15.8 - rsqare: "(a::real) * a = a ^^^ 2" and
15.9 - power_1: "(a::real) ^^^ 1 = a" and
15.10 - rbinom_power_2: "((a::real) + b)^^^ 2 = a^^^ 2 + 2*a*b + b^^^ 2" and
15.11 + exp_pow: "(a \<up> b) \<up> c = a \<up> (b * c)" and
15.12 + rsqare: "(a::real) * a = a \<up> 2" and
15.13 + power_1: "(a::real) \<up> 1 = a" and
15.14 + rbinom_power_2: "((a::real) + b) \<up> 2 = a \<up> 2 + 2*a*b + b \<up> 2" and
15.15
15.16 rmult_1: "1 * k = (k::real)" and
15.17 rmult_1_right: "k * 1 = (k::real)" and
15.18 @@ -206,7 +206,7 @@
15.19 "[| 0<=a; 0<=b; 0<=c |] ==> (0 <= sqrt a + b * sqrt c) = True" and
15.20
15.21
15.22 - rroot_square_inv: "(sqrt a)^^^ 2 = a" and
15.23 + rroot_square_inv: "(sqrt a) \<up> 2 = a" and
15.24 rroot_times_root: "sqrt a * sqrt b = sqrt(a*b)" and
15.25 rroot_times_root_assoc: "(a * sqrt b) * sqrt c = a * sqrt(b*c)" and
15.26 rroot_times_root_assoc_p: "sqrt b * (sqrt c * a)= sqrt(b*c) * a" and
15.27 @@ -214,26 +214,26 @@
15.28
15.29 (*for root-equations*)
15.30 square_equation_left:
15.31 - "[| 0 <= a; 0 <= b |] ==> (((sqrt a)=b)=(a=(b^^^ 2)))" and
15.32 + "[| 0 <= a; 0 <= b |] ==> (((sqrt a)=b)=(a=(b \<up> 2)))" and
15.33 square_equation_right:
15.34 - "[| 0 <= a; 0 <= b |] ==> ((a=(sqrt b))=((a^^^ 2)=b))" and
15.35 + "[| 0 <= a; 0 <= b |] ==> ((a=(sqrt b))=((a \<up> 2)=b))" and
15.36 (*causes frequently non-termination:*)
15.37 square_equation:
15.38 - "[| 0 <= a; 0 <= b |] ==> ((a=b)=((a^^^ 2)=b^^^ 2))" and
15.39 + "[| 0 <= a; 0 <= b |] ==> ((a=b)=((a \<up> 2)=b \<up> 2))" and
15.40
15.41 risolate_root_add: "(a+ sqrt c = d) = ( sqrt c = d + (-1)*a)" and
15.42 risolate_root_mult: "(a+b*sqrt c = d) = (b*sqrt c = d + (-1)*a)" and
15.43 risolate_root_div: "(a * sqrt c = d) = ( sqrt c = d / a)" and
15.44
15.45 (*for polynomial equations of degree 2; linear case in RatArith*)
15.46 - mult_square: "(a*bdv^^^2 = b) = (bdv^^^2 = b / a)" and
15.47 - constant_square: "(a + bdv^^^2 = b) = (bdv^^^2 = b + -1*a)" and
15.48 - constant_mult_square: "(a + b*bdv^^^2 = c) = (b*bdv^^^2 = c + -1*a)" and
15.49 + mult_square: "(a*bdv \<up> 2 = b) = (bdv \<up> 2 = b / a)" and
15.50 + constant_square: "(a + bdv \<up> 2 = b) = (bdv \<up> 2 = b + -1*a)" and
15.51 + constant_mult_square: "(a + b*bdv \<up> 2 = c) = (b*bdv \<up> 2 = c + -1*a)" and
15.52
15.53 square_equality:
15.54 - "0 <= a ==> (x^^^2 = a) = ((x=sqrt a) | (x=-1*sqrt a))" and
15.55 + "0 <= a ==> (x \<up> 2 = a) = ((x=sqrt a) | (x=-1*sqrt a))" and
15.56 square_equality_0:
15.57 - "(x^^^2 = 0) = (x = 0)" and
15.58 + "(x \<up> 2 = 0) = (x = 0)" and
15.59
15.60 (*isolate root on the LEFT hand side of the equation
15.61 otherwise shuffling from left to right would not terminate*)
15.62 @@ -244,7 +244,7 @@
15.63 "is_root_free a ==> (a = c*sqrt b) = (a + (-1)*c*sqrt b = 0)" and
15.64 rroot_to_lhs_add_mult:
15.65 "is_root_free a ==> (a = d+c*sqrt b) = (a + (-1)*c*sqrt b = d)"
15.66 -(*17.9.02 aus SqRoot.thy------------------------------^^^---*)
15.67 +(*17.9.02 aus SqRoot.thy------------------------------ \<up> ---*)
15.68
15.69 section \<open>eval functions\<close>
15.70 ML \<open>
15.71 @@ -639,9 +639,9 @@
15.72
15.73 Rule.Thm ("sym_realpow_twoI",
15.74 ThmC.numerals_to_Free (@{thm realpow_twoI} RS @{thm sym})),
15.75 - (*"r1 * r1 = r1 ^^^ 2"*)
15.76 + (*"r1 * r1 = r1 \<up> 2"*)
15.77 Rule.Thm ("realpow_plus_1",ThmC.numerals_to_Free @{thm realpow_plus_1}),
15.78 - (*"r * r ^^^ n = r ^^^ (n + 1)"*)
15.79 + (*"r * r \<up> n = r \<up> (n + 1)"*)
15.80 Rule.Thm ("sym_real_mult_2",
15.81 ThmC.numerals_to_Free (@{thm real_mult_2} RS @{thm sym})),
15.82 (*"z1 + z1 = 2 * z1"*)
15.83 @@ -676,17 +676,17 @@
15.84 ], errpatts = [],
15.85 rules =
15.86 [Rule.Thm ("real_plus_binom_pow2" ,ThmC.numerals_to_Free @{thm real_plus_binom_pow2}),
15.87 - (*"(a + b) ^^^ 2 = a ^^^ 2 + 2 * a * b + b ^^^ 2"*)
15.88 + (*"(a + b) \<up> 2 = a \<up> 2 + 2 * a * b + b \<up> 2"*)
15.89 Rule.Thm ("real_plus_binom_times" ,ThmC.numerals_to_Free @{thm real_plus_binom_times}),
15.90 (*"(a + b)*(a + b) = ...*)
15.91 Rule.Thm ("real_minus_binom_pow2" ,ThmC.numerals_to_Free @{thm real_minus_binom_pow2}),
15.92 - (*"(a - b) ^^^ 2 = a ^^^ 2 - 2 * a * b + b ^^^ 2"*)
15.93 + (*"(a - b) \<up> 2 = a \<up> 2 - 2 * a * b + b \<up> 2"*)
15.94 Rule.Thm ("real_minus_binom_times",ThmC.numerals_to_Free @{thm real_minus_binom_times}),
15.95 (*"(a - b)*(a - b) = ...*)
15.96 Rule.Thm ("real_plus_minus_binom1",ThmC.numerals_to_Free @{thm real_plus_minus_binom1}),
15.97 - (*"(a + b) * (a - b) = a ^^^ 2 - b ^^^ 2"*)
15.98 + (*"(a + b) * (a - b) = a \<up> 2 - b \<up> 2"*)
15.99 Rule.Thm ("real_plus_minus_binom2",ThmC.numerals_to_Free @{thm real_plus_minus_binom2}),
15.100 - (*"(a - b) * (a + b) = a ^^^ 2 - b ^^^ 2"*)
15.101 + (*"(a - b) * (a + b) = a \<up> 2 - b \<up> 2"*)
15.102 (*RL 020915*)
15.103 Rule.Thm ("real_pp_binom_times",ThmC.numerals_to_Free @{thm real_pp_binom_times}),
15.104 (*(a + b)*(c + d) = a*c + a*d + b*c + b*d*)
15.105 @@ -697,11 +697,11 @@
15.106 Rule.Thm ("real_mm_binom_times",ThmC.numerals_to_Free @{thm real_mm_binom_times}),
15.107 (*(a - b)*(c p d) = a*c - a*d - b*c + b*d*)
15.108 Rule.Thm ("realpow_multI",ThmC.numerals_to_Free @{thm realpow_multI}),
15.109 - (*(a*b)^^^n = a^^^n * b^^^n*)
15.110 + (*(a*b) \<up> n = a \<up> n * b \<up> n*)
15.111 Rule.Thm ("real_plus_binom_pow3",ThmC.numerals_to_Free @{thm real_plus_binom_pow3}),
15.112 - (* (a + b)^^^3 = a^^^3 + 3*a^^^2*b + 3*a*b^^^2 + b^^^3 *)
15.113 + (* (a + b) \<up> 3 = a \<up> 3 + 3*a \<up> 2*b + 3*a*b \<up> 2 + b \<up> 3 *)
15.114 Rule.Thm ("real_minus_binom_pow3",ThmC.numerals_to_Free @{thm real_minus_binom_pow3}),
15.115 - (* (a - b)^^^3 = a^^^3 - 3*a^^^2*b + 3*a*b^^^2 - b^^^3 *)
15.116 + (* (a - b) \<up> 3 = a \<up> 3 - 3*a \<up> 2*b + 3*a*b \<up> 2 - b \<up> 3 *)
15.117
15.118
15.119 (* Rule.Thm ("distrib_right" ,ThmC.numerals_to_Free @{thm distrib_right}),
15.120 @@ -736,9 +736,9 @@
15.121
15.122 Rule.Thm ("sym_realpow_twoI",
15.123 ThmC.numerals_to_Free (@{thm realpow_twoI} RS @{thm sym})),
15.124 - (*"r1 * r1 = r1 ^^^ 2"*)
15.125 + (*"r1 * r1 = r1 \<up> 2"*)
15.126 Rule.Thm ("realpow_plus_1",ThmC.numerals_to_Free @{thm realpow_plus_1}),
15.127 - (*"r * r ^^^ n = r ^^^ (n + 1)"*)
15.128 + (*"r * r \<up> n = r \<up> (n + 1)"*)
15.129 (*Rule.Thm ("sym_real_mult_2",
15.130 ThmC.numerals_to_Free (@{thm real_mult_2} RS @{thm sym})),
15.131 (*"z1 + z1 = 2 * z1"*)*)
15.132 @@ -775,34 +775,34 @@
15.133 [(Problem.prep_input thy "pbl_test_uni_plain2" [] Problem.id_empty
15.134 (["plain_square", "univariate", "equation", "test"],
15.135 [("#Given" ,["equality e_e", "solveFor v_v"]),
15.136 - ("#Where" ,["(matches (?a + ?b*v_v ^^^2 = 0) e_e) |" ^
15.137 - "(matches ( ?b*v_v ^^^2 = 0) e_e) |" ^
15.138 - "(matches (?a + v_v ^^^2 = 0) e_e) |" ^
15.139 - "(matches ( v_v ^^^2 = 0) e_e)"]),
15.140 + ("#Where" ,["(matches (?a + ?b*v_v \<up> 2 = 0) e_e) |" ^
15.141 + "(matches ( ?b*v_v \<up> 2 = 0) e_e) |" ^
15.142 + "(matches (?a + v_v \<up> 2 = 0) e_e) |" ^
15.143 + "(matches ( v_v \<up> 2 = 0) e_e)"]),
15.144 ("#Find" ,["solutions v_v'i'"])],
15.145 assoc_rls' @{theory} "matches",
15.146 SOME "solve (e_e::bool, v_v)", [["Test", "solve_plain_square"]])),
15.147 (Problem.prep_input thy "pbl_test_uni_poly" [] Problem.id_empty
15.148 (["polynomial", "univariate", "equation", "test"],
15.149 - [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.150 + [("#Given" ,["equality (v_v \<up> 2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.151 ("#Where" ,["HOL.False"]),
15.152 ("#Find" ,["solutions v_v'i'"])],
15.153 Rule_Set.empty, SOME "solve (e_e::bool, v_v)", [])),
15.154 (Problem.prep_input thy "pbl_test_uni_poly_deg2" [] Problem.id_empty
15.155 (["degree_two", "polynomial", "univariate", "equation", "test"],
15.156 - [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.157 + [("#Given" ,["equality (v_v \<up> 2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.158 ("#Find" ,["solutions v_v'i'"])],
15.159 - Rule_Set.empty, SOME "solve (v_v ^^^2 + p_p * v_v + q__q = 0, v_v)", [])),
15.160 + Rule_Set.empty, SOME "solve (v_v \<up> 2 + p_p * v_v + q__q = 0, v_v)", [])),
15.161 (Problem.prep_input thy "pbl_test_uni_poly_deg2_pq" [] Problem.id_empty
15.162 (["pq_formula", "degree_two", "polynomial", "univariate", "equation", "test"],
15.163 - [("#Given" ,["equality (v_v ^^^2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.164 + [("#Given" ,["equality (v_v \<up> 2 + p_p * v_v + q__q = 0)", "solveFor v_v"]),
15.165 ("#Find" ,["solutions v_v'i'"])],
15.166 - Rule_Set.empty, SOME "solve (v_v ^^^2 + p_p * v_v + q__q = 0, v_v)", [])),
15.167 + Rule_Set.empty, SOME "solve (v_v \<up> 2 + p_p * v_v + q__q = 0, v_v)", [])),
15.168 (Problem.prep_input thy "pbl_test_uni_poly_deg2_abc" [] Problem.id_empty
15.169 (["abc_formula", "degree_two", "polynomial", "univariate", "equation", "test"],
15.170 - [("#Given" ,["equality (a_a * x ^^^2 + b_b * x + c_c = 0)", "solveFor v_v"]),
15.171 + [("#Given" ,["equality (a_a * x \<up> 2 + b_b * x + c_c = 0)", "solveFor v_v"]),
15.172 ("#Find" ,["solutions v_v'i'"])],
15.173 - Rule_Set.empty, SOME "solve (a_a * x ^^^2 + b_b * x + c_c = 0, v_v)", [])),
15.174 + Rule_Set.empty, SOME "solve (a_a * x \<up> 2 + b_b * x + c_c = 0, v_v)", [])),
15.175 (Problem.prep_input thy "pbl_test_uni_root" [] Problem.id_empty
15.176 (["squareroot", "univariate", "equation", "test"],
15.177 [("#Given" ,["equality e_e", "solveFor v_v"]),
15.178 @@ -1036,10 +1036,10 @@
15.179 (*solve_plain_square*)
15.180 (["Test", "solve_plain_square"],
15.181 [("#Given",["equality e_e", "solveFor v_v"]),
15.182 - ("#Where" ,["(matches (?a + ?b*v_v ^^^2 = 0) e_e) |" ^
15.183 - "(matches ( ?b*v_v ^^^2 = 0) e_e) |" ^
15.184 - "(matches (?a + v_v ^^^2 = 0) e_e) |" ^
15.185 - "(matches ( v_v ^^^2 = 0) e_e)"]),
15.186 + ("#Where" ,["(matches (?a + ?b*v_v \<up> 2 = 0) e_e) |" ^
15.187 + "(matches ( ?b*v_v \<up> 2 = 0) e_e) |" ^
15.188 + "(matches (?a + v_v \<up> 2 = 0) e_e) |" ^
15.189 + "(matches ( v_v \<up> 2 = 0) e_e)"]),
15.190 ("#Find" ,["solutions v_v'i'"])],
15.191 {rew_ord'="e_rew_ord",rls'=tval_rls,calc=[],srls=Rule_Set.empty,
15.192 prls = assoc_rls' @{theory} "matches", crls=tval_rls, errpats = [], nrls = Rule_Set.empty(*,
16.1 --- a/src/Tools/isac/ProgLang/Prog_Expr.thy Mon Apr 19 20:44:18 2021 +0200
16.2 +++ b/src/Tools/isac/ProgLang/Prog_Expr.thy Tue Apr 20 16:58:44 2021 +0200
16.3 @@ -16,7 +16,7 @@
16.4
16.5 subsection \<open>Power re-defined for a specific type\<close>
16.6 consts
16.7 - pow :: "[real, real] => real" (infixr "^^^" 80)
16.8 + pow :: "[real, real] => real" (infixr "\<up>" 80)
16.9
16.10 subsection \<open>consts of functions in pre-conditions and program-expressions\<close>
16.11 consts
16.12 @@ -138,49 +138,49 @@
16.13 | eval_matches _ _ _ _ = NONE;
16.14 (*
16.15 > val t = (Thm.term_of o the o (parse thy))
16.16 - "matches (?x = 0) (1 * x ^^^ 2 = 0)";
16.17 + "matches (?x = 0) (1 * x \<up> 2 = 0)";
16.18 > eval_matches "/thmid/" "/op_/" t thy;
16.19 val it =
16.20 SOME
16.21 - ("matches (x = 0) (1 * x ^^^ 2 = 0) = False",
16.22 + ("matches (x = 0) (1 * x \<up> 2 = 0) = False",
16.23 Const (#,#) $ (# $ # $ Const #)) : (string * term) option
16.24
16.25 > val t = (Thm.term_of o the o (parse thy))
16.26 - "matches (?a = #0) (#1 * x ^^^ #2 = #0)";
16.27 + "matches (?a = #0) (#1 * x \<up> #2 = #0)";
16.28 > eval_matches "/thmid/" "/op_/" t thy;
16.29 val it =
16.30 SOME
16.31 - ("matches (?a = #0) (#1 * x ^^^ #2 = #0) = True",
16.32 + ("matches (?a = #0) (#1 * x \<up> #2 = #0) = True",
16.33 Const (#,#) $ (# $ # $ Const #)) : (string * term) option
16.34
16.35 > val t = (Thm.term_of o the o (parse thy))
16.36 - "matches (?a * x = #0) (#1 * x ^^^ #2 = #0)";
16.37 + "matches (?a * x = #0) (#1 * x \<up> #2 = #0)";
16.38 > eval_matches "/thmid/" "/op_/" t thy;
16.39 val it =
16.40 SOME
16.41 - ("matches (?a * x = #0) (#1 * x ^^^ #2 = #0) = False",
16.42 + ("matches (?a * x = #0) (#1 * x \<up> #2 = #0) = False",
16.43 Const (#,#) $ (# $ # $ Const #)) : (string * term) option
16.44
16.45 > val t = (Thm.term_of o the o (parse thy))
16.46 - "matches (?a * x ^^^ #2 = #0) (#1 * x ^^^ #2 = #0)";
16.47 + "matches (?a * x \<up> #2 = #0) (#1 * x \<up> #2 = #0)";
16.48 > eval_matches "/thmid/" "/op_/" t thy;
16.49 val it =
16.50 SOME
16.51 - ("matches (?a * x ^^^ #2 = #0) (#1 * x ^^^ #2 = #0) = True",
16.52 + ("matches (?a * x \<up> #2 = #0) (#1 * x \<up> #2 = #0) = True",
16.53 Const (#,#) $ (# $ # $ Const #)) : (string * term) option
16.54 ----- before ?patterns ---:
16.55 > val t = (Thm.term_of o the o (parse thy))
16.56 "matches (a * b^^^#2 = c) (#3 * x^^^#2 = #1)";
16.57 > eval_matches "/thmid/" "/op_/" t thy;
16.58 SOME
16.59 - ("matches (a * b ^^^ #2 = c) (#3 * x ^^^ #2 = #1) = True",
16.60 + ("matches (a * b \<up> #2 = c) (#3 * x \<up> #2 = #1) = True",
16.61 Const ("HOL.Trueprop", "bool => prop") $ (Const # $ (# $ #) $ Const (#,#)))
16.62 : (string * term) option
16.63
16.64 > val t = (Thm.term_of o the o (parse thy))
16.65 "matches (a * b^^^#2 = c) (#3 * x^^^#2222 = #1)";
16.66 > eval_matches "/thmid/" "/op_/" t thy;
16.67 -SOME ("matches (a * b ^^^ #2 = c) (#3 * x ^^^ #2222 = #1) = False",
16.68 +SOME ("matches (a * b \<up> #2 = c) (#3 * x \<up> #2222 = #1) = False",
16.69 Const ("HOL.Trueprop", "bool => prop") $ (Const # $ (# $ #) $ Const (#,#)))
16.70
16.71 > val t = (Thm.term_of o the o (parse thy))
16.72 @@ -233,11 +233,11 @@
16.73 HOLogic.Trueprop $ (TermC.mk_equality (t, l)))
16.74 | eval_lhs _ _ _ _ = NONE;
16.75 (*
16.76 -> val t = (Thm.term_of o the o (parse thy)) "lhs (1 * x ^^^ 2 = 0)";
16.77 +> val t = (Thm.term_of o the o (parse thy)) "lhs (1 * x \<up> 2 = 0)";
16.78 > val SOME (id,t') = eval_lhs 0 0 t 0;
16.79 -val id = "Prog_Expr.lhs (1 * x ^^^ 2 = 0) = 1 * x ^^^ 2" : string
16.80 +val id = "Prog_Expr.lhs (1 * x \<up> 2 = 0) = 1 * x \<up> 2" : string
16.81 > term2str t';
16.82 -val it = "Prog_Expr.lhs (1 * x ^^^ 2 = 0) = 1 * x ^^^ 2" : string
16.83 +val it = "Prog_Expr.lhs (1 * x \<up> 2 = 0) = 1 * x \<up> 2" : string
16.84 *)
16.85
16.86 fun rhs (Const ("HOL.eq",_) $ _ $ r) = r
17.1 --- a/test/Tools/isac/ADDTESTS/course/CADGME/example_1.thy Mon Apr 19 20:44:18 2021 +0200
17.2 +++ b/test/Tools/isac/ADDTESTS/course/CADGME/example_1.thy Tue Apr 20 16:58:44 2021 +0200
17.3 @@ -7,7 +7,7 @@
17.4 text \<open>Setup equation, Eval Tree,\ldots\<close>
17.5
17.6 ML \<open>
17.7 - val expr = ["equality (-1 + -2 * z + 8 * z ^^^ 2 = (0::real))",
17.8 + val expr = ["equality (-1 + -2 * z + 8 * z \<up> 2 = (0::real))",
17.9 "solveFor z", "solutions L"];
17.10 val (dI', pI', mI') =
17.11 ("Isac_Knowledge",
18.1 --- a/test/Tools/isac/ADDTESTS/course/CADGME/example_2.thy Mon Apr 19 20:44:18 2021 +0200
18.2 +++ b/test/Tools/isac/ADDTESTS/course/CADGME/example_2.thy Tue Apr 20 16:58:44 2021 +0200
18.3 @@ -21,7 +21,7 @@
18.4 rule1: "1 = \<delta>[n]" and
18.5 rule2: "|| z || > 1 ==> z / (z - 1) = u [n]" and
18.6 rule3: "|| z || < 1 ==> z / (z - 1) = -u [-n - 1]" and
18.7 - rule4: "|| z || > || \<alpha> || ==> z / (z - \<alpha>) = \<alpha>^^^n * u [n]"
18.8 + rule4: "|| z || > || \<alpha> || ==> z / (z - \<alpha>) = \<alpha>\<up>n * u [n]"
18.9
18.10 ML \<open>
18.11 @{thm rule1};
18.12 @@ -50,7 +50,7 @@
18.13 ML\<open>
18.14 UnparseC.term t';
18.15 UnparseC.term t' = "z / (z - ?\<delta> [?n]) + z / (z - \<alpha>) + ?\<delta> [?n]";
18.16 - UnparseC.term t' = "?u [?n] + \<alpha>^^^?n u[n] + ?\<delta> [?n]";
18.17 + UnparseC.term t' = "?u [?n] + \<alpha>\<up>?n u[n] + ?\<delta> [?n]";
18.18 \<close>
18.19
18.20 text\<open>Problems: Rule~1 is applied before the expression is checked for Rule~4
19.1 --- a/test/Tools/isac/ADDTESTS/course/SignalProcess/Build_Inverse_Z_Transform.thy Mon Apr 19 20:44:18 2021 +0200
19.2 +++ b/test/Tools/isac/ADDTESTS/course/SignalProcess/Build_Inverse_Z_Transform.thy Tue Apr 20 16:58:44 2021 +0200
19.3 @@ -56,9 +56,9 @@
19.4 rule1: "1 = \<delta>[n]" and
19.5 rule2: "|| z || > 1 ==> z / (z - 1) = u [n]" and
19.6 rule3: "|| z || < 1 ==> z / (z - 1) = -u [-n - 1]" and
19.7 - rule4: "|| z || > || \<alpha> || ==> z / (z - \<alpha>) = \<alpha>^^^n * u [n]" and
19.8 - rule5: "|| z || < || \<alpha> || ==> z / (z - \<alpha>) = -(\<alpha>^^^n) * u [-n - 1]" and
19.9 - rule6: "|| z || > 1 ==> z/(z - 1)^^^2 = n * u [n]"
19.10 + rule4: "|| z || > || \<alpha> || ==> z / (z - \<alpha>) = \<alpha> \<up> n * u [n]" and
19.11 + rule5: "|| z || < || \<alpha> || ==> z / (z - \<alpha>) = -(\<alpha> \<up> n) * u [-n - 1]" and
19.12 + rule6: "|| z || > 1 ==> z/(z - 1) \<up> 2 = n * u [n]"
19.13
19.14 text\<open>\noindent Check the rules for their correct notation.
19.15 (See the machine output.)\<close>
19.16 @@ -98,13 +98,13 @@
19.17
19.18 val SOME (t, asm2) =
19.19 Rewrite.rewrite_ thy ro er true (ThmC.numerals_to_Free @{thm rule4}) t;
19.20 - UnparseC.term t = "- ?u [- ?n - 1] + \<alpha> ^^^ ?n * ?u [?n] + 1";
19.21 + UnparseC.term t = "- ?u [- ?n - 1] + \<alpha> \<up> ?n * ?u [?n] + 1";
19.22 (*- real *)
19.23 UnparseC.term t;
19.24
19.25 val SOME (t, asm3) =
19.26 Rewrite.rewrite_ thy ro er true (ThmC.numerals_to_Free @{thm rule1}) t;
19.27 - UnparseC.term t = "- ?u [- ?n - 1] + \<alpha> ^^^ ?n * ?u [?n] + ?\<delta> [?n]";
19.28 + UnparseC.term t = "- ?u [- ?n - 1] + \<alpha> \<up> ?n * ?u [?n] + ?\<delta> [?n]";
19.29 (*- real *)
19.30 UnparseC.term t;
19.31 \<close>
19.32 @@ -129,7 +129,7 @@
19.33 (*val ctxt = ContextC.declare_constraints' [@{term "z::real"}] ctxt;*)
19.34
19.35 val SOME fun1 =
19.36 - TermC.parseNEW ctxt "X z = 3 / (z - 1/4 + -1/8 * z ^^^ -1)"; UnparseC.term fun1;
19.37 + TermC.parseNEW ctxt "X z = 3 / (z - 1/4 + -1/8 * z \<up> -1)"; UnparseC.term fun1;
19.38 val SOME fun1' =
19.39 TermC.parseNEW ctxt "X z = 3 / (z - 1/4 + -1/8 * (1/z))"; UnparseC.term fun1';
19.40 \<close>
19.41 @@ -154,7 +154,7 @@
19.42 Rewrite.rewrite_set_ @{theory} false norm_Rational fun2;
19.43 UnparseC.term fun3;
19.44 (*
19.45 - * Fails on x^^^(-1)
19.46 + * Fails on x \<up> (-1)
19.47 * We solve this problem by using 1/x as a workaround.
19.48 *)
19.49 val SOME (fun3',_) =
19.50 @@ -181,7 +181,7 @@
19.51 val (_, expr) = HOLogic.dest_eq fun3'; UnparseC.term expr;
19.52 val (_, denom) =
19.53 HOLogic.dest_bin "Rings.divide_class.divide" (type_of expr) expr;
19.54 - UnparseC.term denom = "-1 + -2 * z + 8 * z ^^^ 2";
19.55 + UnparseC.term denom = "-1 + -2 * z + 8 * z \<up> 2";
19.56 \<close>
19.57
19.58 text\<open>\noindent We have rhs\footnote{Note: lhs means \em Left Hand Side
19.59 @@ -257,8 +257,8 @@
19.60 for this equation type. Later on {\sisac} should determine the type
19.61 of the given equation self.\<close>
19.62 ML \<open>
19.63 - val denominator = TermC.parseNEW ctxt "z^^^2 - 1/4*z - 1/8 = 0";
19.64 - val fmz = ["equality (z^^^2 - 1/4*z - 1/8 = (0::real))",
19.65 + val denominator = TermC.parseNEW ctxt "z \<up> 2 - 1/4*z - 1/8 = 0";
19.66 + val fmz = ["equality (z \<up> 2 - 1/4*z - 1/8 = (0::real))",
19.67 "solveFor z",
19.68 "solutions L"];
19.69 val (dI',pI',mI') =("Isac_Knowledge", ["univariate", "equation"], ["no_met"]);
19.70 @@ -274,9 +274,9 @@
19.71
19.72 ML \<open>
19.73 Context.theory_name thy = "Isac_Knowledge";
19.74 - val denominator = TermC.parseNEW ctxt "-1 + -2 * z + 8 * z ^^^ 2 = 0";
19.75 + val denominator = TermC.parseNEW ctxt "-1 + -2 * z + 8 * z \<up> 2 = 0";
19.76 val fmz = (*specification*)
19.77 - ["equality (-1 + -2 * z + 8 * z ^^^ 2 = (0::real))",(*equality*)
19.78 + ["equality (-1 + -2 * z + 8 * z \<up> 2 = (0::real))",(*equality*)
19.79 "solveFor z", (*bound variable*)
19.80 "solutions L"]; (*identifier for
19.81 solution*)
19.82 @@ -480,11 +480,11 @@
19.83 SignalProcessing])),
19.84 (([1], Frm), X z = 3 / (z - 1 / 4 + -1 / 8 * (1 / z))),
19.85 (([1], Res), ?X' z = 3 / (z * (z - 1 / 4 + -1 / 8 * (1 / z)))),
19.86 - (([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z ^^^ 2)),
19.87 - (([3], Pbl), solve (-1 + -2 * z + 8 * z ^^^ 2 = 0, z)),
19.88 - (([3,1], Frm), -1 + -2 * z + 8 * z ^^^ 2 = 0),
19.89 - (([3,1], Res), z = (- -2 + sqrt (-2 ^^^ 2 - 4 * 8 * -1)) / (2 * 8)|
19.90 - z = (- -2 - sqrt (-2 ^^^ 2 - 4 * 8 * -1)) / (2 * 8)),
19.91 + (([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z \<up> 2)),
19.92 + (([3], Pbl), solve (-1 + -2 * z + 8 * z \<up> 2 = 0, z)),
19.93 + (([3,1], Frm), -1 + -2 * z + 8 * z \<up> 2 = 0),
19.94 + (([3,1], Res), z = (- -2 + sqrt (-2 \<up> 2 - 4 * 8 * -1)) / (2 * 8)|
19.95 + z = (- -2 - sqrt (-2 \<up> 2 - 4 * 8 * -1)) / (2 * 8)),
19.96 (([3,2], Res), z = 1 / 2 | z = -1 / 4),
19.97 (([3,3], Res), [ z = 1 / 2, z = -1 / 4]),
19.98 (([3,4], Res), [ z = 1 / 2, z = -1 / 4]),
19.99 @@ -495,7 +495,7 @@
19.100 \par \noindent In particular that:
19.101
19.102 \begin{verbatim}
19.103 - (([3], Pbl), solve (-1 + -2 * z + 8 * z ^^^ 2 = 0, z)),
19.104 + (([3], Pbl), solve (-1 + -2 * z + 8 * z \<up> 2 = 0, z)),
19.105 \end{verbatim}
19.106 \par \noindent Shows the equation which has been created in
19.107 the program by:
19.108 @@ -998,7 +998,7 @@
19.109 val str =
19.110 "Program InverseZTransform (Xeq::bool) = "^
19.111 (*
19.112 - * 1/z) instead of z ^^^ -1
19.113 + * 1/z) instead of z \<up> -1
19.114 *)
19.115 " (let X = Take Xeq; "^
19.116 " X' = Rewrite ruleZY False X; "^
19.117 @@ -1015,7 +1015,7 @@
19.118 *)
19.119 "Program InverseZTransform (Xeq::bool) = "^
19.120 (*
19.121 - * (1/z) instead of z ^^^ -1
19.122 + * (1/z) instead of z \<up> -1
19.123 *)
19.124 " (let X = Take Xeq; "^
19.125 " X' = Rewrite ruleZY False X; "^
19.126 @@ -1129,7 +1129,7 @@
19.127 {rew_ord'="tless_true", rls'= Rule_Set.empty, calc = [], srls = srls, prls = Rule_Set.empty, crls = Rule_Set.empty,
19.128 errpats = [], nrls = Rule_Set.empty},
19.129 "Program InverseZTransform (X_eq::bool) = "^
19.130 - (*(1/z) instead of z ^^^ -1*)
19.131 + (*(1/z) instead of z \<up> -1*)
19.132 "(let X = Take X_eq; "^
19.133 " X' = Rewrite ruleZY False X; "^
19.134 (*z * denominator*)
19.135 @@ -1285,7 +1285,7 @@
19.136 \ttfamily Empty\_Tac; \normalfont the search for the reason considered
19.137 the following points:\begin{itemize}
19.138 \item What shows \ttfamily show\_pt pt;\normalfont\ldots?
19.139 -\begin{verbatim}(([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z ^^^ 2))]\end{verbatim}
19.140 +\begin{verbatim}(([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z \<up> 2))]\end{verbatim}
19.141 The calculation is ok but no \ttfamily next \normalfont step found:
19.142 Should be\\ \ttfamily nxt = Subproblem\normalfont!
19.143 \item What shows \ttfamily trace\_script := true; \normalfont we read
19.144 @@ -1335,7 +1335,7 @@
19.145
19.146 ML \<open>
19.147 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
19.148 - (*Add_Given equality (-1 + -2 * z + 8 * z ^^^ 2 = 0)";*)
19.149 + (*Add_Given equality (-1 + -2 * z + 8 * z \<up> 2 = 0)";*)
19.150 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
19.151 (*Add_Given solveFor z";*)
19.152 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
19.153 @@ -1355,7 +1355,7 @@
19.154 print_depth 999; f; print_depth 3;
19.155 { Find = [ Correct "solutions z_i"],
19.156 With = [],
19.157 - Given = [Correct "equality (-1 + -2*z + 8*z ^^^ 2 = 0)",
19.158 + Given = [Correct "equality (-1 + -2*z + 8*z \<up> 2 = 0)",
19.159 Correct "solveFor z"],
19.160 Where = [...],
19.161 Relate = [] }
20.1 --- a/test/Tools/isac/ADDTESTS/course/SignalProcess/document/Build_Inverse_Z_Transform.tex Mon Apr 19 20:44:18 2021 +0200
20.2 +++ b/test/Tools/isac/ADDTESTS/course/SignalProcess/document/Build_Inverse_Z_Transform.tex Tue Apr 20 16:58:44 2021 +0200
20.3 @@ -969,11 +969,11 @@
20.4 SignalProcessing])),
20.5 (([1], Frm), X z = 3 / (z - 1 / 4 + -1 / 8 * (1 / z))),
20.6 (([1], Res), ?X' z = 3 / (z * (z - 1 / 4 + -1 / 8 * (1 / z)))),
20.7 - (([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z ^^^ 2)),
20.8 - (([3], Pbl), solve (-1 + -2 * z + 8 * z ^^^ 2 = 0, z)),
20.9 - (([3,1], Frm), -1 + -2 * z + 8 * z ^^^ 2 = 0),
20.10 - (([3,1], Res), z = (- -2 + sqrt (-2 ^^^ 2 - 4 * 8 * -1)) / (2 * 8)|
20.11 - z = (- -2 - sqrt (-2 ^^^ 2 - 4 * 8 * -1)) / (2 * 8)),
20.12 + (([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z \<up> 2)),
20.13 + (([3], Pbl), solve (-1 + -2 * z + 8 * z \<up> 2 = 0, z)),
20.14 + (([3,1], Frm), -1 + -2 * z + 8 * z \<up> 2 = 0),
20.15 + (([3,1], Res), z = (- -2 + sqrt (-2 \<up> 2 - 4 * 8 * -1)) / (2 * 8)|
20.16 + z = (- -2 - sqrt (-2 \<up> 2 - 4 * 8 * -1)) / (2 * 8)),
20.17 (([3,2], Res), z = 1 / 2 | z = -1 / 4),
20.18 (([3,3], Res), [ z = 1 / 2, z = -1 / 4]),
20.19 (([3,4], Res), [ z = 1 / 2, z = -1 / 4]),
20.20 @@ -984,7 +984,7 @@
20.21 \par \noindent In particular that:
20.22
20.23 \begin{verbatim}
20.24 - (([3], Pbl), solve (-1 + -2 * z + 8 * z ^^^ 2 = 0, z)),
20.25 + (([3], Pbl), solve (-1 + -2 * z + 8 * z \<up> 2 = 0, z)),
20.26 \end{verbatim}
20.27 \par \noindent Shows the equation which has been created in
20.28 the program by:
20.29 @@ -2369,7 +2369,7 @@
20.30 \ttfamily Empty\_Tac; \normalfont the search for the reason considered
20.31 the following points:\begin{itemize}
20.32 \item What shows \ttfamily show\_pt pt;\normalfont\ldots?
20.33 -\begin{verbatim}(([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z ^^^ 2))]\end{verbatim}
20.34 +\begin{verbatim}(([2], Res), ?X' z = 24 / (-1 + -2 * z + 8 * z \<up> 2))]\end{verbatim}
20.35 The calculation is ok but no \ttfamily next \normalfont step found:
20.36 Should be\\ \ttfamily nxt = Subproblem\normalfont!
20.37 \item What shows \ttfamily trace\_script := true; \normalfont we read
20.38 @@ -2468,7 +2468,7 @@
20.39 print_depth 999; f; print_depth 3;
20.40 { Find = [ Correct "solutions z_i"],
20.41 With = [],
20.42 - Given = [Correct "equality (-1 + -2*z + 8*z ^^^ 2 = 0)",
20.43 + Given = [Correct "equality (-1 + -2*z + 8*z \<up> 2 = 0)",
20.44 Correct "solveFor z"],
20.45 Where = [...],
20.46 Relate = [] }
21.1 --- a/test/Tools/isac/ADDTESTS/course/phst11/T2_Rewriting.thy Mon Apr 19 20:44:18 2021 +0200
21.2 +++ b/test/Tools/isac/ADDTESTS/course/phst11/T2_Rewriting.thy Tue Apr 20 16:58:44 2021 +0200
21.3 @@ -40,7 +40,7 @@
21.4 \<close>
21.5 text \<open>... and let us differentiate the term t:\<close>
21.6 ML \<open>
21.7 -val t = (Thm.term_of o the o (TermC.parse thy)) "d_d x (x^^^2 + x + y)";
21.8 +val t = (Thm.term_of o the o (TermC.parse thy)) "d_d x (x\<up>2 + x + y)";
21.9
21.10 val SOME (t, _) = Rewrite.rewrite_inst_ thy ro er true inst diff_sum t; UnparseC.term t;
21.11 val SOME (t, _) = Rewrite.rewrite_inst_ thy ro er true inst diff_sum t; UnparseC.term t;
21.12 @@ -49,7 +49,7 @@
21.13 val SOME (t, _) = Rewrite.rewrite_inst_ thy ro er true inst diff_const t; UnparseC.term t;
21.14 \<close>
21.15 text \<open>Please, scoll up the Output-window to check the 5 steps of rewriting !
21.16 - You might not be satisfied by the result "2 * x ^^^ (2 - 1) + 1 + 0".
21.17 + You might not be satisfied by the result "2 * x \<up> (2 - 1) + 1 + 0".
21.18
21.19 ISAC has a set of rules called 'make_polynomial', which simplifies the result:
21.20 \<close>
21.21 @@ -146,12 +146,12 @@
21.22 \<close>
21.23 ML \<open>
21.24 (*show_brackets := false; TODO*)
21.25 -val t1 = (Thm.term_of o the o (TermC.parse thy)) "(a - b) * (a^^^2 + a*b + b^^^2)";
21.26 +val t1 = (Thm.term_of o the o (TermC.parse thy)) "(a - b) * (a\<up>2 + a*b + b\<up>2)";
21.27 val SOME (t, _) = Rewrite.rewrite_set_ thy true make_polynomial t1; UnparseC.term t;
21.28 \<close>
21.29 ML \<open>
21.30 val t2 = (Thm.term_of o the o (TermC.parse thy))
21.31 - "(2 / (x + 3) + 2 / (x - 3)) / (8 * x / (x ^^^ 2 - 9))";
21.32 + "(2 / (x + 3) + 2 / (x - 3)) / (8 * x / (x \<up> 2 - 9))";
21.33 val SOME (t, _) = Rewrite.rewrite_set_ thy true norm_Rational t2; UnparseC.term t;
21.34 \<close>
21.35 text \<open>The simplifiers are quite busy when finding the above results. you can
22.1 --- a/test/Tools/isac/ADDTESTS/open-structure.sml Mon Apr 19 20:44:18 2021 +0200
22.2 +++ b/test/Tools/isac/ADDTESTS/open-structure.sml Tue Apr 20 16:58:44 2021 +0200
22.3 @@ -9,7 +9,7 @@
22.4 datatype foo = Foo of string
22.5 end
22.6 (* this here is required in order to get "evaluated with def.2": open Pervasive *)
22.7 -(* TODO un-comment ... ^^^^^^^^^^^^^^ *)
22.8 +(* TODO un-comment ... \<up> \<up> \<up> \<up> ^^ *)
22.9
22.10 signature OPENED =
22.11 sig
23.1 --- a/test/Tools/isac/BaseDefinitions/contextC.sml Mon Apr 19 20:44:18 2021 +0200
23.2 +++ b/test/Tools/isac/BaseDefinitions/contextC.sml Tue Apr 20 16:58:44 2021 +0200
23.3 @@ -74,11 +74,11 @@
23.4 "----------- fun avoid_contradict --------------------------------------------------------------";
23.5 "----------- fun avoid_contradict --------------------------------------------------------------";
23.6 val preds = [
23.7 -(*0.pre*)TermC.str2term "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.8 -(*1.pre*)TermC.str2term ("\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n"
23.9 -(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x"),
23.10 +(*0.pre*)TermC.str2term "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.11 +(*1.pre*)TermC.str2term ("\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n"
23.12 +(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x"),
23.13 (*0.asm*)TermC.str2term "x \<noteq> 0", (* <-------------- "x \<noteq> 0" would contradict "x = 0" ---\*)
23.14 -(*0.asm*)TermC.str2term "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"
23.15 +(*0.asm*)TermC.str2term "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"
23.16 ];
23.17
23.18 val t = TermC.str2term "[x = 0, x = 6 / 5]";
23.19 @@ -139,7 +139,7 @@
23.20 "----------- rat-equ: remove x = 0 from [x = 0, x = 6 / 5] due to contexts ---------------------";
23.21 "----------- rat-equ: remove x = 0 from [x = 0, x = 6 / 5] due to contexts ---------------------";
23.22 (*ER-7*) (*Schalk I s.87 Bsp 55b*)
23.23 -val fmz = ["equality (x/(x^^^2 - 6*x+9) - 1/(x^^^2 - 3*x) =1/x)",
23.24 +val fmz = ["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
23.25 "solveFor x", "solutions L"];
23.26 val spec = ("RatEq",["univariate", "equation"],["no_met"]);
23.27 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, spec)]; (* 0. specify-phase *)
23.28 @@ -153,14 +153,14 @@
23.29
23.30 val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* 0. solve-phase*)
23.31 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
23.32 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)";
23.33 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)";
23.34
23.35 (*+*)if (Ctree.get_assumptions pt p |> map UnparseC.term) =
23.36 (*+*) ["x \<noteq> 0",
23.37 -(*+*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0",
23.38 -(*+*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x"]
23.39 +(*+*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0",
23.40 +(*+*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x"]
23.41 (*+*)then () else error "assumptions before 1. Subproblem CHANGED";
23.42 -(*+*)if p = ([3], Res) andalso f2str f = "(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)"
23.43 +(*+*)if p = ([3], Res) andalso f2str f = "(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)"
23.44 (*+*)then
23.45 (*+*) ((case nxt of Subproblem ("PolyEq", ["normalise", "polynomial", "univariate", "equation"]) => ()
23.46 (*+*) | _ => error ("S.68, Bsp.: 40 nxt =" ^ Tactic.input_to_string nxt)))
23.47 @@ -177,9 +177,9 @@
23.48
23.49 val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* 1. solve-phase *)
23.50 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
23.51 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "-6 * x + 5 * x ^^^ 2 = 0";
23.52 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "-6 * x + 5 * x \<up> 2 = 0";
23.53
23.54 -if p = ([4, 3], Res) andalso f2str f = "-6 * x + 5 * x ^^^ 2 = 0"
23.55 +if p = ([4, 3], Res) andalso f2str f = "-6 * x + 5 * x \<up> 2 = 0"
23.56 then
23.57 ((case nxt of Subproblem ("PolyEq", ["bdv_only", "degree_2", "polynomial", "univariate", "equation"]) => ()
23.58 | _ => error ("S.68, Bsp.: 40 nxt =" ^ Tactic.input_to_string nxt)))
23.59 @@ -194,7 +194,7 @@
23.60 case nxt of Apply_Method ["PolyEq", "solve_d2_polyeq_bdvonly_equation"] => ()
23.61 | _ => error "55b normalise_poly specification broken 2";
23.62
23.63 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*f = "-6 * x + 5 * x ^^^ 2 = 0"*) (* 2. solve-phase *)
23.64 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*f = "-6 * x + 5 * x \<up> 2 = 0"*) (* 2. solve-phase *)
23.65 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
23.66
23.67 (*[4, 4, 3], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Or_to_List*)
23.68 @@ -202,13 +202,13 @@
23.69 (*[4, 4, 5], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>2. Check_Postcond ["bdv_only", "degree_2", "polynomial", "univariate", "equation"]*)
23.70
23.71 (* *)if eq_set op = ((Ctree.get_assumptions pt p |> map UnparseC.term), [
23.72 -(*0.pre*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.73 -(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n"
23.74 -(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
23.75 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
23.76 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
23.77 +(*0.pre*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.78 +(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n"
23.79 +(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
23.80 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
23.81 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) has_degree_in x = 2",
23.82 (*0.asm*) "x \<noteq> 0",
23.83 -(*0.asm*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"
23.84 +(*0.asm*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"
23.85 (* *)])
23.86 (* *)then () else error "assumptions at end 2. Subproblem CHANGED";
23.87 (*[4, 4], Res*)val (p''''',_,f,nxt''''',_,pt''''') = me nxt p [] pt;(*\<rightarrow>1. Check_Postcond ["normalise", "polynomial", "univariate", "equation"]*)
23.88 @@ -248,24 +248,24 @@
23.89 (*NEW*) | _ => error "LI.by_tactic Check_Postcond': uncovered case get_loc";
23.90
23.91 (* *)if eq_set op = (map UnparseC.term (get_assumptions ctxt_parent), [
23.92 -(*0.pre*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.93 -(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n"
23.94 -(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
23.95 +(*0.pre*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.96 +(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n"
23.97 +(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
23.98 (*0.asm*) "x \<noteq> 0",
23.99 -(*0.asm*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"
23.100 +(*0.asm*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"
23.101 (* *)])
23.102 (* *)then () else error "assumptions at xxx CHANGED";
23.103
23.104 val (prog_res', ctxt') =
23.105 ContextC.subpbl_to_caller sub_ctxt prog_res ctxt_parent;
23.106 (* *)if eq_set op = (map UnparseC.term (get_assumptions ctxt'), [
23.107 -(*0.pre*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.108 -(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n"
23.109 -(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
23.110 -(*0.asm*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0",
23.111 +(*0.pre*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x",
23.112 +(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n"
23.113 +(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
23.114 +(*0.asm*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0",
23.115 (*0.asm*) "x \<noteq> 0", (* <----------------------- "x \<noteq> 0" contradiction resoved ---\*)
23.116 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
23.117 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
23.118 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
23.119 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) has_degree_in x = 2",
23.120 (*2.res*) (*"x \<noteq> 0",*) "x = 6 / 5" (* <---------------- "x \<noteq> 0" would contradict "x = 0" ---/*)
23.121 (* *)])
23.122 (* *)then () else error "assumptions at xxx CHANGED";
23.123 @@ -306,9 +306,9 @@
23.124
23.125 (*/-------- final test -----------------------------------------------------------------------\*)
23.126 if f2str f = "[x = 6 / 5]" andalso map UnparseC.term (Ctree.get_assumptions pt p) =
23.127 - ["x = 6 / 5", "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
23.128 - "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
23.129 - "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
23.130 - "x \<noteq> 0", "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0",
23.131 - "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x"]
23.132 + ["x = 6 / 5", "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
23.133 + "lhs (-6 * x + 5 * x \<up> 2 = 0) has_degree_in x = 2",
23.134 + "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
23.135 + "x \<noteq> 0", "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0",
23.136 + "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x"]
23.137 then () else error "test CHANGED";
24.1 --- a/test/Tools/isac/BaseDefinitions/termC.sml Mon Apr 19 20:44:18 2021 +0200
24.2 +++ b/test/Tools/isac/BaseDefinitions/termC.sml Tue Apr 20 16:58:44 2021 +0200
24.3 @@ -232,9 +232,9 @@
24.4 "----------- Pattern.match ------------------------------";
24.5 "----------- Pattern.match ------------------------------";
24.6 "----------- Pattern.match ------------------------------";
24.7 - val t = (Thm.term_of o the o (TermC.parse thy)) "3 * x^^^2 = (1::real)";
24.8 - val pat = (TermC.free2var o Thm.term_of o the o (TermC.parse thy)) "a * b^^^2 = (c::real)";
24.9 - (* !^^^^^^^^!... necessary for Pattern.match, see Logic.varify_global below*)
24.10 + val t = (Thm.term_of o the o (TermC.parse thy)) "3 * x\<up>2 = (1::real)";
24.11 + val pat = (TermC.free2var o Thm.term_of o the o (TermC.parse thy)) "a * b\<up>2 = (c::real)";
24.12 + (* ! \<up> \<up> ^^!... necessary for Pattern.match, see Logic.varify_global below*)
24.13 val insts = Pattern.match @{theory "Isac_Knowledge"} (pat, t) (Vartab.empty, Vartab.empty);
24.14 (*default_print_depth 3; 999*) insts;
24.15 (*val insts =
24.16 @@ -261,9 +261,9 @@
24.17 "----------- fun TermC.matches --------------------------------";
24.18 (*examples see
24.19 test/../Knowledge/polyeq.sml:
24.20 - Where=[Correct "matches (?a = 0) (-8 - 2 * x + x ^^^ 2 = 0)"*)
24.21 + Where=[Correct "matches (?a = 0) (-8 - 2 * x + x \<up> 2 = 0)"*)
24.22 (*test/../Specify/refine.sml:
24.23 - |\nmatches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],*)
24.24 + |\nmatches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x \<up> #2 + #8)"],*)
24.25 val thy = @{theory "Complex_Main"};
24.26
24.27 "----- test 1: OK";
24.28 @@ -342,7 +342,7 @@
24.29 "----------- fun TermC.parse, fun TermC.parse_patt, fun T_a2real -------------------------------------------";
24.30 "----------- fun TermC.parse, fun TermC.parse_patt, fun T_a2real -------------------------------------------";
24.31 (* added after Isabelle2015->17
24.32 -> val (SOME ct) = TermC.parse thy "(-#5)^^^#3";
24.33 +> val (SOME ct) = TermC.parse thy "(-#5)\<up>#3";
24.34 > TermC.atomty (Thm.term_of ct);
24.35 *** -------------
24.36 *** Const ( Nat.op ^, ['a, nat] => 'a)
24.37 @@ -421,9 +421,9 @@
24.38 val thy = @{theory Partial_Fractions};
24.39 val ctxt = Proof_Context.init_global @{theory}
24.40
24.41 -val SOME t = TermC.parseNEW ctxt "x ^^^ 2 + -1 * x * y";
24.42 +val SOME t = TermC.parseNEW ctxt "x \<up> 2 + -1 * x * y";
24.43 case TermC.vars_of t of [Free ("x", _), Free ("y", _)] => ()
24.44 -| _ => error "TermC.vars_of (x ^^^ 2 + -1 * x * y) ..changed";
24.45 +| _ => error "TermC.vars_of (x \<up> 2 + -1 * x * y) ..changed";
24.46
24.47 val SOME t = TermC.parseNEW ctxt "3 = 3 * AA / 4";
24.48
25.1 --- a/test/Tools/isac/BridgeJEdit/parseC.sml Mon Apr 19 20:44:18 2021 +0200
25.2 +++ b/test/Tools/isac/BridgeJEdit/parseC.sml Tue Apr 20 16:58:44 2021 +0200
25.3 @@ -102,14 +102,14 @@
25.4 case ParseC.parse given_comma (ParseC.tokenize given_comma_str) of
25.5 ((("Given", ":"), [_(*"<markup>"*), _(*"<markup>"*)]),
25.6 []) => ()
25.7 - (*^^^^--------------------------------- is empty: parsing OK*)
25.8 + (* \<up> ^--------------------------------- is empty: parsing OK*)
25.9 | _ => error "TermC.parse given_comma CHANGED";
25.10
25.11 "----------- Parse.list1 DOES expect <,> between elements";
25.12 case ParseC.parse given (ParseC.tokenize given_str) of
25.13 ((("Given", ":"), [_(*"<markup>"*)]),
25.14 [_(*Token (("Streckenlast q_0", ({}, {})), (String, "Streckenlast q_0"), Slot)*)]) => ()
25.15 - (*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is NOT empty: parsing NOT ok*)
25.16 + (* \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^ is NOT empty: parsing NOT ok*)
25.17 | _ => error "TermC.parse given CHANGED";
25.18
25.19
25.20 @@ -118,7 +118,7 @@
25.21 "----------- Model -----------------------------------------------------------------------------";
25.22 val model_str = (
25.23 "Model:" ^
25.24 - (*^^^^^^^^^^^^*)
25.25 + (* \<up> \<up> \<up> \<up> *)
25.26 "Given: \"Traegerlaenge L\", \"Streckenlast q_0\"" ^
25.27 "Where: \"q_0 ist_integrierbar_auf {| 0, L |}\", \"0 < L\"" ^
25.28 "Find: \"Biegelinie y\"" ^
25.29 @@ -126,7 +126,7 @@
25.30 );
25.31 val model_empty_str = ( (*Model before student's input"*)
25.32 "Model:" ^
25.33 - (*^^^^^^^^^^^^*)
25.34 + (* \<up> \<up> \<up> \<up> *)
25.35 "Given: \"Traegerlaenge \", \"Streckenlast \"" ^
25.36 "Where: \"_ ist_integrierbar_auf {| |}\"" ^
25.37 "Find: \"Biegelinie \"" ^
25.38 @@ -134,7 +134,7 @@
25.39 );
25.40 val model_str_opt = ( (*Model explicitly referring to RProblem (default), not RMethod*)
25.41 "Model ( RProblem ):" ^
25.42 - (*^^^^^^^^^^^^*)
25.43 + (* \<up> \<up> \<up> \<up> *)
25.44 "Given: \"Traegerlaenge L\", \"Streckenlast q_0\"" ^
25.45 "Where: \"q_0 ist_integrierbar_auf {| 0, L |}\", \"0 < L\"" ^
25.46 "Find: \"Biegelinie y\"" ^
26.1 --- a/test/Tools/isac/BridgeLibisabelle/datatypes.sml Mon Apr 19 20:44:18 2021 +0200
26.2 +++ b/test/Tools/isac/BridgeLibisabelle/datatypes.sml Tue Apr 20 16:58:44 2021 +0200
26.3 @@ -65,7 +65,7 @@
26.4 val Hthm {guh=guh, thm=thm, mathauthors=ma, coursedesign=co} = thydata;
26.5 writeln(thydata2xml (theID, thydata));
26.6 "----- check 'manually' ...0 < ?n |] ==> ?a... -----";
26.7 -"----------------------------^^^---------^^^------------";
26.8 +"---------------------------- \<up> --------- \<up> ------------";
26.9
26.10
26.11
26.12 @@ -79,7 +79,7 @@
26.13 (*create testdata: see --- tryrefine ---
26.14 xml_of_model used via refineProblem \<longrightarrow> matchpbl2xml \<longrightarrow> model2xml*)
26.15 reset_states ();
26.16 -CalcTree [(["equality (x/(x^2 - 6*x+9) - 1/(x^2 - 3*x) =1/x)",
26.17 +CalcTree [(["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
26.18 "solveFor x", "solutions L"],
26.19 ("RatEq",["univariate", "equation"],["no_met"]))];
26.20 Iterator 1;
26.21 @@ -97,7 +97,7 @@
26.22 val xxx = xml_of_model itms where_;
26.23 (xmlstr 0 xxx);
26.24 writeln(xmlstr 0 xxx);
26.25 -if xmlstr 0 xxx = "(MODEL)\n. (GIVEN)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . equality (x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) = 1 / x)\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solveFor x\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/GIVEN)\n. (WHERE)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . x / (x ^ 2 - 6 * x + 9) - 1 / (x ^ 2 - 3 * x) =\n1 / x is_ratequation_in x\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/WHERE)\n. (FIND)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solutions L\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/FIND)\n. (RELATE)\n. (/RELATE)\n(/MODEL)\n"
26.26 +if xmlstr 0 xxx = "(MODEL)\n. (GIVEN)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . equality (x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) = 1 / x)\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solveFor x\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/GIVEN)\n. (WHERE)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/WHERE)\n. (FIND)\n. . (ITEM status=correct)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solutions L\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/ITEM)\n. (/FIND)\n. (RELATE)\n. (/RELATE)\n(/MODEL)\n"
26.27 then () else error ("xml_of_model changed = " ^ xmlstr 0 xxx);
26.28
26.29 "----------- fun xml_of_tac --------------------------------------------------------------------";
27.1 --- a/test/Tools/isac/BridgeLibisabelle/interface.sml Mon Apr 19 20:44:18 2021 +0200
27.2 +++ b/test/Tools/isac/BridgeLibisabelle/interface.sml Tue Apr 20 16:58:44 2021 +0200
27.3 @@ -52,7 +52,7 @@
27.4 "=====new ctree 1: crippled by cut_level_'_ ======================";
27.5 reset_states ();
27.6 CalcTree
27.7 -[(["equality (x/(x^2 - 6*x+9) - 1/(x^2 - 3*x) =1/x)",
27.8 +[(["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
27.9 "solveFor x", "solutions L"],
27.10 ("RatEq",["univariate", "equation"],["no_met"]))];
27.11 Iterator 1; moveActiveRoot 1;
28.1 --- a/test/Tools/isac/BridgeLibisabelle/mathml.sml Mon Apr 19 20:44:18 2021 +0200
28.2 +++ b/test/Tools/isac/BridgeLibisabelle/mathml.sml Tue Apr 20 16:58:44 2021 +0200
28.3 @@ -7,10 +7,10 @@
28.4 "-----------------------------------------------------------------";
28.5 "within struct ---------------------------------------------------";
28.6 "-----------------------------------------------------------------";
28.7 -"--------- encode ^^^ -> ^ ---------------------------------------";
28.8 +"--------- encode \<up> -> ^ ---------------------------------------";
28.9 "--------- encode < -> < and > -> > --------------------------";
28.10 -"--------- fun rm_doublets '-4 * b ^^^^^^^^^ 2 / (...' -----------";
28.11 -"--------- fun decode '-4 * b ^^^^^^^^^ 2 / (...' ----------------";
28.12 +"--------- fun rm_doublets '-4 * b \<up>\<up>\<up> 2 / (...' -----------";
28.13 +"--------- fun decode '-4 * b \<up>\<up>\<up> 2 / (...' ----------------";
28.14 "--------- fun xml_of_term_NEW, xml_to_term_NEW ------------------";
28.15 "--------- create testdata for TestPIDE.java#testTermTransfer ----";
28.16 "-----------------------------------------------------------------";
28.17 @@ -26,18 +26,18 @@
28.18 "-----------------------------------------------------------------";
28.19 (*==================================================================*)
28.20
28.21 -"--------- encode ^^^ -> ^ ---------------------------------------";
28.22 -"--------- encode ^^^ -> ^ ---------------------------------------";
28.23 -"--------- encode ^^^ -> ^ ---------------------------------------";
28.24 -val str = "a^^^2+b^^^2=c^^^2";
28.25 -if decode str = "a^2+b^2=c^2" then ()
28.26 -else error "mathml.sml: diff.behav. in encode ^^^ -> ^";
28.27 +"--------- encode \<up> -> ^ ---------------------------------------";
28.28 +"--------- encode \<up> -> ^ ---------------------------------------";
28.29 +"--------- encode \<up> -> ^ ---------------------------------------";
28.30 +val str = "a\<up>2+b\<up>2=c\<up>2";
28.31 +if decode str = "a\<up>2+b\<up>2=c\<up>2" then ()
28.32 +else error "mathml.sml: diff.behav. in encode \<up> -> ^";
28.33
28.34 "--------- encode < -> < and > -> > --------------------------";
28.35 "--------- encode < -> < and > -> > --------------------------";
28.36 "--------- encode < -> < and > -> > --------------------------";
28.37 -val str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n";
28.38 -if decode str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n" then ()
28.39 +val str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n";
28.40 +if decode str = "?bdv occurs_in ?b; 0 < ?n |] ==> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n" then ()
28.41 else error "mathml.sml: diff.behav. in encode '<' and '>'";
28.42
28.43 (*========== inhibit exn AK110725 ================================================
28.44 @@ -45,20 +45,20 @@
28.45 formula2xml 1 (TermC.str2term str);
28.46
28.47 (* AK110725
28.48 -(*TermC.str2term str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
28.49 +(*TermC.str2term str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n"
28.50 Failed to TermC.parse term*)*)
28.51 "~~~~~ fun TermC.str2term, args:"; val (str) = (str);
28.52 ThyC.get_theory "Isac_Knowledge";
28.53
28.54 TermC.parse_patt;
28.55 TermC.parse_patt (ThyC.get_theory "Isac_Knowledge");
28.56 -(*TermC.parse_patt (ThyC.get_theory "Isac_Knowledge") str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
28.57 +(*TermC.parse_patt (ThyC.get_theory "Isac_Knowledge") str; (* ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n"
28.58 Failed to TermC.parse term*)*)
28.59
28.60 "~~~~~ fun TermC.parse_patt, args:"; val (thy, str) = ((ThyC.get_theory "Isac_Knowledge"), str);
28.61 (thy, str)
28.62 |>> ThyC.to_ctxt
28.63 -(*|-> Proof_Context.read_term_pattern (*ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b ^ ?n = ?a * ?b ^ - ?n"
28.64 +(*|-> Proof_Context.read_term_pattern (*ERROR: Inner syntax error at "; 0 < ?n |] ==> ?a / ?b \<up> ?n = ?a * ?b \<up> - ?n"
28.65 Failed to TermC.parse term*)*)
28.66
28.67 Proof_Context.read_term_pattern;
28.68 @@ -72,32 +72,6 @@
28.69 "-----------------------------------------------------------------";
28.70 ========== inhibit exn AK110725 ================================================*)
28.71
28.72 -"--------- fun rm_doublets '-4 * b ^^^^^^^^^ 2 / (...' -----------";
28.73 -"--------- fun rm_doublets '-4 * b ^^^^^^^^^ 2 / (...' -----------";
28.74 -"--------- fun rm_doublets '-4 * b ^^^^^^^^^ 2 / (...' -----------";
28.75 -val c = "^";
28.76 -val cs = ["^", "^", "^", "d", "e"];
28.77 -if rm_doublets c [] cs = Symbol.explode "^de"
28.78 -then () else error "rm_doublets '^^^de' CHANGED";
28.79 -
28.80 -val cs = ["a", "b", "^", "^", "^", "d", "e"];
28.81 -if rm_doublets c [] cs = Symbol.explode "ab^de"
28.82 -then () else error "rm_doublets 'ab^^^de' CHANGED";
28.83 -
28.84 -val cstr =
28.85 -"-4 * b ^^^^^^^^^ 2 / (a + b) + 4 * a ^^^^^^^^^ 2 / (a + b) -4 * b ^ 2 / (a + b) + 4 * a ^ 2 / (a + b)";
28.86 -val cs = Symbol.explode cstr;
28.87 -if rm_doublets c [] cs = Symbol.explode
28.88 - "-4 * b ^ 2 / (a + b) + 4 * a ^ 2 / (a + b) -4 * b ^ 2 / (a + b) + 4 * a ^ 2 / (a + b)"
28.89 -then () else error "rm_doublets '-4 * b ^^^^^..' CHANGED";
28.90 -
28.91 -"--------- fun decode '-4 * b ^^^^^^^^^ 2 / (...' ----------------";
28.92 -"--------- fun decode '-4 * b ^^^^^^^^^ 2 / (...' ----------------";
28.93 -"--------- fun decode '-4 * b ^^^^^^^^^ 2 / (...' ----------------";
28.94 -if encode cstr =
28.95 -"-4 * b ^^^ 2 / (a + b) + 4 * a ^^^ 2 / (a + b) -4 * b ^^^ 2 / (a + b) + 4 * a ^^^ 2 / (a + b)"
28.96 -then () else error "encode '-4 * b ^^^^^..' CHANGED";
28.97 -
28.98 "--------- fun xmlstr --------------------------------------------";
28.99 "--------- fun xmlstr --------------------------------------------";
28.100 "--------- fun xmlstr --------------------------------------------";
28.101 @@ -143,7 +117,7 @@
28.102 *** . . Type (Real.real,[])
28.103 *** . . ]
28.104 *** . ]
28.105 -with this ^^^ build the typ ...*)
28.106 +with this \<up> build the typ ...*)
28.107 Type ("fun", [
28.108 Type ("Real.real", []),
28.109 Type ("fun", [
28.110 @@ -159,7 +133,7 @@
28.111 *** . . Type (HOL.bool,[])
28.112 *** . . ]
28.113 *** . ]
28.114 -with this ^^^ build the typ ...*)
28.115 +with this \<up> build the typ ...*)
28.116 Type ("fun", [
28.117 Type ("Real.real", []),
28.118 Type ("fun", [
29.1 --- a/test/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Mon Apr 19 20:44:18 2021 +0200
29.2 +++ b/test/Tools/isac/BridgeLibisabelle/pbl-met-hierarchy.sml Tue Apr 20 16:58:44 2021 +0200
29.3 @@ -158,7 +158,7 @@
29.4 [("chain-rule-diff-both",
29.5 [TermC.parse_patt @{theory} "d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)",
29.6 TermC.parse_patt @{theory} "d_d ?bdv (cos ?u) = - sin (d_d ?bdv ?u)",
29.7 - TermC.parse_patt @{theory} "d_d ?bdv (?u ^^^ ?n) = ?n * ?u ^^^ (?n - 1)",
29.8 + TermC.parse_patt @{theory} "d_d ?bdv (?u \<up> ?n) = ?n * ?u \<up> (?n - 1)",
29.9 TermC.parse_patt @{theory} "d_d ?bdv (LogExp.ln ?u) = 1 / ?u",
29.10 TermC.parse_patt @{theory} "d_d ?bdv (LogExp.ln ?u) = 1 / d_d ?bdv ?u"],
29.11 [@{thm diff_sin_chain}, @{thm diff_cos_chain}, @{thm diff_pow_chain},
29.12 @@ -170,5 +170,5 @@
29.13 case errpats of
29.14 ("chain-rule-diff-both", _, _) :: _ => ()
29.15 | _ => error "insert_errpats chain-rule-diff-both changed";
29.16 -^^^^^--- here intermediate save/restore does not work and affects other tests ---^^*)
29.17 + \<up> ^^--- here intermediate save/restore does not work and affects other tests ---^^*)
29.18
30.1 --- a/test/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Mon Apr 19 20:44:18 2021 +0200
30.2 +++ b/test/Tools/isac/BridgeLibisabelle/thy-hierarchy.sml Tue Apr 20 16:58:44 2021 +0200
30.3 @@ -274,7 +274,7 @@
30.4 "----------- gen.minimal KEStore_Elems from Test_Build_Thydata.thy";
30.5 "----------- gen.minimal KEStore_Elems from Test_Build_Thydata.thy";
30.6 val isacrlsthms = KEStore_Elems.get_rlss @{theory Test_Build_Thydata}
30.7 -(* CHANGE FOR CODE ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
30.8 +(* CHANGE FOR CODE \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> *)
30.9 |> remove (fn (rlsID, (rls', (_, _))) => rlsID = rls') "prog_expr" (*unpleasant in test*)
30.10 |> remove (fn (rlsID, (rls', (_, _))) => rlsID = rls') "e_rrls" (*unpleasant in test*)
30.11 |> remove (fn (rlsID, (rls', (_, _))) => rlsID = rls') "empty" (*unpleasant in test*)
31.1 --- a/test/Tools/isac/BridgeLibisabelle/use-cases.sml Mon Apr 19 20:44:18 2021 +0200
31.2 +++ b/test/Tools/isac/BridgeLibisabelle/use-cases.sml Tue Apr 20 16:58:44 2021 +0200
31.3 @@ -19,7 +19,7 @@
31.4 "--------------------------------------------------------";
31.5 "within struct ------------------------------------------";
31.6 "--------------------------------------------------------";
31.7 -"--------- encode ^ -> ^^^ ------------------------------";
31.8 +"--------- encode ^ -> ^^ ------------------------------";
31.9 "--------------------------------------------------------";
31.10 "exported from struct -----------------------------------";
31.11 "--------------------------------------------------------";
31.12 @@ -65,14 +65,14 @@
31.13 (*==================================================================
31.14
31.15
31.16 -"--------- encode ^ -> ^^^ ------------------------------";
31.17 -"--------- encode ^ -> ^^^ ------------------------------";
31.18 -"--------- encode ^ -> ^^^ ------------------------------";
31.19 -if encode "a^2+b^2=c^2" = "a^^^2+b^^^2=c^^^2" then ()
31.20 -else error "interface.sml: diff.behav. in encode ^ -> ^^^ ";
31.21 +"--------- encode ^ -> ^^ ------------------------------";
31.22 +"--------- encode ^ -> ^^ ------------------------------";
31.23 +"--------- encode ^ -> ^^ ------------------------------";
31.24 +if encode "a \<up> 2+b \<up> 2=c \<up> 2" = "a \<up> 2+b \<up> 2=c \<up> 2" then ()
31.25 +else error "interface.sml: diff.behav. in encode ^ -> \<up> ";
31.26
31.27 -if (decode o encode) "a^2+b^2=c^2" = "a^2+b^2=c^2" then ()
31.28 -else error "interface.sml: diff.behav. in de/encode ^ <-> ^^^ ";
31.29 +if (decode o encode) "a \<up> 2+b \<up> 2=c \<up> 2" = "a \<up> 2+b \<up> 2=c \<up> 2" then ()
31.30 +else error "interface.sml: diff.behav. in de/encode ^ <-> \<up> ";
31.31
31.32 ==================================================================*)
31.33 "exported from struct --------------------------------------------";
31.34 @@ -241,7 +241,7 @@
31.35 (*//------------------------------------- final test -----------------------------------------\\*)
31.36 val ("ok", [], ptp as (pt, p)) = xxxx;
31.37
31.38 -if Istate.string_of (get_istate_LI pt p) (* <> <> <> <> ^^^^^^^^^^^^^*)
31.39 +if Istate.string_of (get_istate_LI pt p) (* <> <> <> <> \<up> \<up> \<up> \<up> ^*)
31.40 (*REP*) = "Pstate ([\"\n(e_e, 1 + -1 * 2 + x = 0)\", \"\n(v_v, x)\"], [R, L, R, L, R, L, R], empty, SOME e_e, \nx = 0 + -1 * (1 + -1 * 2), ORundef, true, true)"
31.41 then () else error "REP autoCalculate on (e_e, 1 + -1 * 2 + x = 0) changed"
31.42
31.43 @@ -621,7 +621,7 @@
31.44 autoCalculate 1 (Steps 1);
31.45 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
31.46 *)
31.47 -"-----^^^^^ and vvvvv do the same -----";
31.48 +"----- \<up> ^^ and vvvvv do the same -----";
31.49 setContext 1 p "thy_isac_Test-rls-Test_simplify";
31.50 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt; (*2 lines, OK*)
31.51
31.52 @@ -701,7 +701,7 @@
31.53 autoCalculate 1 (Steps 1); fetchProposedTactic 1;
31.54 setNextTactic 1 (Rewrite_Set "RatEq_eliminate");
31.55 autoCalculate 1 (Steps 1); fetchProposedTactic 1;
31.56 - (* __________ for "12 * x + 4 * x ^^^ 2 = 4 * (-4 + x ^^^ 2)"*)
31.57 + (* __________ for "12 * x + 4 * x \<up> 2 = 4 * (-4 + x \<up> 2)"*)
31.58 setNextTactic 1 (Subproblem ("PolyEq", ["normalise", "polynomial",
31.59 "univariate", "equation"]));
31.60 autoCalculate 1 (Steps 1); fetchProposedTactic 1;
31.61 @@ -764,11 +764,11 @@
31.62 "--------- tryMatchProblem, tryRefineProblem ------------";
31.63 (*{\bf\UC{Having \isac{} Refine the Problem
31.64 * Automatically}\label{SPECIFY:refine-auto}\\} test match and refine with
31.65 - * x^^^2 + 4*x + 5 = 2
31.66 + * x \<up>2 + 4*x + 5 = 2
31.67 see isac.bridge.TestSpecify#testMatchRefine*)
31.68 reset_states ();
31.69 CalcTree
31.70 - [(["equality (x^2 + 4*x + 5 = (2::real))", "solveFor x", "solutions L"],
31.71 + [(["equality (x \<up> 2 + 4*x + 5 = (2::real))", "solveFor x", "solutions L"],
31.72 ("Isac_Knowledge",
31.73 ["univariate", "equation"],
31.74 ["no_met"]))];
31.75 @@ -788,14 +788,14 @@
31.76 autoCalculate 1 (Steps 1);
31.77
31.78 fetchProposedTactic 1;
31.79 - setNextTactic 1 (Add_Given "equality (x ^^^ 2 + 4 * x + 5 = (2::real))");
31.80 + setNextTactic 1 (Add_Given "equality (x \<up> 2 + 4 * x + 5 = (2::real))");
31.81 autoCalculate 1 (Steps 1);
31.82
31.83 "--------- we go into the ProblemBrowser (_NO_ pblID selected) -";
31.84 initContext 1 Ptool.Pbl_ ([],Pbl);
31.85 (* this would break if a calculation would be inserted before: CALCID...
31.86 and pattern matching is not available in *.java.
31.87 -if cut_xml xml = "(CONTEXTPBL)\n. (CALCID)\n. . 1\n. (/CALCID)\n. (CONTEXTDATA)\n. . (GUH)\n. . . pbl_equ_univ\n. . (/GUH)\n. . (STATUS)\n. . . correct\n. . (/STATUS)\n. . (HEAD)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solve (x ^ 2 + 4 * x + 5 = 2, x)\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/HEAD)\n. . (MODEL)\n. . . (GIVEN)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . equality (x ^ 2 + 4 * x + 5 = 2)\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . solveFor x\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/GIVEN)\n. . . (WHERE)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . TermC.matches (?a = ?b) (x ^ 2 + 4 * x + 5 = 2)\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/WHERE)\n. . . (FIND)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . solutions L\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/FI"
31.88 +if cut_xml xml = "(CONTEXTPBL)\n. (CALCID)\n. . 1\n. (/CALCID)\n. (CONTEXTDATA)\n. . (GUH)\n. . . pbl_equ_univ\n. . (/GUH)\n. . (STATUS)\n. . . correct\n. . (/STATUS)\n. . (HEAD)\n. . . (MATHML)\n. . . . (ISA)\n. . . . . solve (x ^ 2 + 4 * x + 5 = 2, x)\n. . . . (/ISA)\n. . . (/MATHML)\n. . (/HEAD)\n. . (MODEL)\n. . . (GIVEN)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . equality (x ^ 2 + 4 * x + 5 = 2)\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . solveFor x\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/GIVEN)\n. . . (WHERE)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . TermC.matches (?a = ?b) (x \<up> ^ 2 + 4 * x + 5 = 2)\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/WHERE)\n. . . (FIND)\n. . . . (ITEM status=correct)\n. . . . . (MATHML)\n. . . . . . (ISA)\n. . . . . . . solutions L\n. . . . . . (/ISA)\n. . . . . (/MATHML)\n. . . . (/ITEM)\n. . . (/FI"
31.89 then () else error "--- tryMatchProblem, tryRefineProblem: initContext 1 Ptool.Pbl_ ([],Pbl); CHANGED";
31.90 *)
31.91 initContext 1 Ptool.Met_ ([],Pbl);
31.92 @@ -831,7 +831,7 @@
31.93 "univariate", "equation"]);
31.94 autoCalculate 1 (Steps 1);
31.95 (*WN050904 fetchProposedTactic again --> Specify_Problem ["normalise",...
31.96 - and Specify_Theory skipped in comparison to below ---^^^-inserted *)
31.97 + and Specify_Theory skipped in comparison to below --- \<up> -inserted *)
31.98 (*------------vvv-inserted-----------------------------------------------*)
31.99 fetchProposedTactic 1;
31.100 (*/-----ERROR INTRODUCED BY CHILD OF 33913fe24685 --------------------------------------------\* )
31.101 @@ -857,7 +857,7 @@
31.102 if UnparseC.term f = "[x = -1, x = -3]" andalso p = ([], Res) then () else
31.103 error "FE-interface.sml: diff.behav. in tryMatchProblem, tryRefine";
31.104
31.105 -(*------------^^^-inserted-----------------------------------------------*)
31.106 +(*------------ \<up> -inserted-----------------------------------------------*)
31.107 (*WN050904 the fetchProposedTactic's below may not have worked like that
31.108 before, too, because there was no check*)
31.109 fetchProposedTactic 1;
31.110 @@ -947,10 +947,10 @@
31.111 see isac.bridge.TestModel#testEditItems
31.112 *)
31.113 val elems = ["fixedValues [r=Arbfix]", "maximum A", "valuesFor [a,b]",
31.114 - "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
31.115 - "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
31.116 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
31.117 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
31.118 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
31.119 - (*^^^ these are the elements for the root-problem (in variants)*)
31.120 + (* \<up> these are the elements for the root-problem (in variants)*)
31.121 (*vvv these are elements required for subproblems*)
31.122 "boundVariable a", "boundVariable b", "boundVariable alpha",
31.123 "interval {x::real. 0 <= x & x <= 2*r}",
31.124 @@ -984,7 +984,7 @@
31.125 (*input of two items, 'fixedValues [r=Arbfix]' and 'maximum b'...*)
31.126 modifyCalcHead 1 (([],Pbl) (*position, from previous refFormula*),
31.127 "Problem (DiffApp.thy, [maximum_of, function])",
31.128 - (*the head-form ^^^ is not used for input here*)
31.129 + (*the head-form \<up> is not used for input here*)
31.130 [P_Spec.Given ["fixedValues [r=Arbfix]"(*new input*)],
31.131 P_Spec.Find ["maximum b"(*new input*), "valuesFor"],
31.132 P_Spec.Relate ["relations"]],
31.133 @@ -1004,7 +1004,7 @@
31.134 [P_Spec.Given ["fixedValues [r=Arbfix]"],
31.135 P_Spec.Find ["maximum A", "valuesFor [a,b]"(*new input*)],
31.136 P_Spec.Relate ["relations [A=a*b, \
31.137 - \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl, References.empty);
31.138 + \(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"]], Pbl, References.empty);
31.139
31.140 (*specification is not interesting and should be skipped by the dialogguide;
31.141 !!!!!!!!!!!!!!!!!!!! input of ONE part at a time !!!!!!!!!!!!!!!!!!!!!!*)
31.142 @@ -1012,20 +1012,20 @@
31.143 [P_Spec.Given ["fixedValues [r=Arbfix]"],
31.144 P_Spec.Find ["maximum A", "valuesFor [a,b]"(*new input*)],
31.145 P_Spec.Relate ["relations [A=a*b, \
31.146 - \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl,
31.147 + \(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"]], Pbl,
31.148 ("DiffApp", ["empty_probl_id"], ["empty_meth_id"]));
31.149 modifyCalcHead 1 (([],Pbl), "not used here",
31.150 [P_Spec.Given ["fixedValues [r=Arbfix]"],
31.151 P_Spec.Find ["maximum A", "valuesFor [a,b]"(*new input*)],
31.152 P_Spec.Relate ["relations [A=a*b, \
31.153 - \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl,
31.154 + \(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"]], Pbl,
31.155 ("DiffApp", ["maximum_of", "function"],
31.156 ["empty_meth_id"]));
31.157 modifyCalcHead 1 (([],Pbl), "not used here",
31.158 [P_Spec.Given ["fixedValues [r=Arbfix]"],
31.159 P_Spec.Find ["maximum A", "valuesFor [a,b]"(*new input*)],
31.160 P_Spec.Relate ["relations [A=a*b, \
31.161 - \(a/2)^2 + (b/2)^2 = r^2]"]], Pbl,
31.162 + \(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"]], Pbl,
31.163 ("DiffApp", ["maximum_of", "function"],
31.164 ["DiffApp", "max_by_calculus"]));
31.165 (*this final calcHead now has STATUS 'complete' !*)
31.166 @@ -1143,7 +1143,7 @@
31.167 "--------- getAssumptions, getAccumulatedAsms -----------";
31.168 "--------- getAssumptions, getAccumulatedAsms -----------";
31.169 CalcTree
31.170 -[(["equality (x/(x^2 - 6*x+9) - 1/(x^2 - 3*x) =1/x)",
31.171 +[(["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
31.172 "solveFor x", "solutions L"],
31.173 ("RatEq",["univariate", "equation"],["no_met"]))];
31.174 Iterator 1; moveActiveRoot 1;
31.175 @@ -1153,13 +1153,13 @@
31.176 val (Form f, tac, asms) = ME_Misc.pt_extract (pt, p);
31.177 (*============ inhibit exn WN120316 compare 2002--2011 ===========================
31.178 if map UnparseC.term asms =
31.179 - ["True |\n~ lhs ((3 + -1 * x + x ^^^ 2) * x =\n" ^
31.180 - " 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x", "-6 * x + 5 * x ^^^ 2 = 0",
31.181 - "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
31.182 - "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
31.183 - "9 * x + -6 * x ^^^ 2 + x ^^^ 3 ~= 0"]
31.184 -andalso UnparseC.term f = "[-6 * x + 5 * x ^^^ 2 = 0]" andalso p = ([], Res) then ()
31.185 -else error "TODO compare 2002--2011"; (*...data during test --- x / (x ^ 2 - 6 * x + 9) - 1...*)
31.186 + ["True |\n~ lhs ((3 + -1 * x + x \<up> 2) * x =\n" ^
31.187 + " 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x", "-6 * x + 5 * x \<up>\<up> 2 = 0",
31.188 + "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
31.189 + "lhs (-6 * x + 5 * x \<up>\<up> 2 = 0) has_degree_in x = 2",
31.190 + "9 * x + -6 * x \<up> 2 + x \<up> 3 ~= 0"]
31.191 +andalso UnparseC.term f = "[-6 * x + 5 * x \<up> 2 = 0]" andalso p = ([], Res) then ()
31.192 +else error "TODO compare 2002--2011"; (*...data during test --- x / (x \<up> 2 - 6 * x + 9) - 1...*)
31.193 ============ inhibit exn WN120316 compare 2002--2011 ===========================*)
31.194
31.195 if p = ([], Res) andalso UnparseC.term f = "[x = 6 / 5]"
31.196 @@ -1451,23 +1451,23 @@
31.197 "--------- UC errpat chain-rule-diff-both, fillpat by input ------";
31.198 "--------- UC errpat chain-rule-diff-both, fillpat by input ------";
31.199 CalcTree
31.200 -[(["functionTerm (x ^ 2 + sin (x ^ 4))", "differentiateFor x", "derivative f_f'"],
31.201 +[(["functionTerm (x \<up> 2 + sin (x \<up> 4))", "differentiateFor x", "derivative f_f'"],
31.202 ("Isac_Knowledge", ["derivative_of", "function"], ["diff", "differentiate_on_R"]))];
31.203 Iterator 1;
31.204 moveActiveRoot 1;
31.205 autoCalculate 1 CompleteCalcHead;
31.206 autoCalculate 1 (Steps 1);
31.207 -autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
31.208 -appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" (*|> Future.join*); (*<<<<<<<=========================*)
31.209 +autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
31.210 +appendFormula 1 "d_d x (x \<up> 2) + cos (4 * x \<up> 3)" (*|> Future.join*); (*<<<<<<<=========================*)
31.211 (* the check for errpat is maximally liberal (whole term modulo "nrls" from "type met"),
31.212 - would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
31.213 + would recognize "cos (4 * x \<up> (4 - 1)) + 2 * x" as well.
31.214 results in <CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>
31.215 instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
31.216 val ((pt,pos), _) = get_calc 1;
31.217 val p = get_pos 1 1;
31.218 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
31.219
31.220 - if p = ([1], Res) andalso UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))"
31.221 + if p = ([1], Res) andalso UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))"
31.222 then case get_obj g_tac pt (fst p) of Rewrite_Inst (["(''bdv'', x)"],
31.223 ("diff_sum", thm)) => () | _ => error "embed fun fill_form changed 0"
31.224 | _ => error "embed fun fill_form changed 1"
31.225 @@ -1475,13 +1475,13 @@
31.226
31.227 (*========== inhibit exn WN1130621 Isabelle2012-->13 !thehier! ====================
31.228 findFillpatterns 1 "chain-rule-diff-both"; (*<<<<<<<=================================*)
31.229 -(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =
31.230 - d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
31.231 +(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =
31.232 + d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
31.233 val ((pt,pos),_) = get_calc 1;
31.234 val p = get_pos 1 1;
31.235
31.236 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
31.237 - if p = ([1], Res) andalso UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" andalso
31.238 + if p = ([1], Res) andalso UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" andalso
31.239 get_obj g_tac pt (fst p) = Rewrite_Inst (["(''bdv'', x)"], ("diff_sum", "Diff.diff_sum"(*?!?*)))
31.240 then ()
31.241 else error "embed fun fill_form changed 2";
31.242 @@ -1495,16 +1495,16 @@
31.243 val p = get_pos 1 1;
31.244 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
31.245 if p = ([1], Res) andalso existpt [2] pt andalso
31.246 - UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" andalso
31.247 + UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up>\<up> 4))" andalso
31.248 get_obj g_tac pt (fst p) = Rewrite_Inst (["(''bdv'', x)"], ("diff_sum", "Diff.diff_sum"))
31.249 then () else error "embed fun fill_form changed 3";
31.250
31.251 -inputFillFormula 1 "d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)";(*<<<<<<<=====*)
31.252 +inputFillFormula 1 "d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> 4)";(*<<<<<<<=====*)
31.253 val ((pt, _),_) = get_calc 1;
31.254 val p = get_pos 1 1;
31.255 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
31.256 if p = ([2], Res) andalso
31.257 - UnparseC.term f = "d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)" andalso
31.258 + UnparseC.term f = "d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> 4)" andalso
31.259 get_obj g_tac pt (fst p) = Rewrite_Inst (["(''bdv'', x)"], ("diff_sin_chain", ""))
31.260 then () else error "inputFillFormula changed 11";
31.261
31.262 @@ -1514,18 +1514,18 @@
31.263 val ((pt, _),_) = get_calc 1;
31.264 val p = get_pos 1 1;
31.265 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
31.266 -if p = ([], Res) andalso UnparseC.term f = "2 * x + cos (x ^^^ 4) * 4 * x ^^^ 3"
31.267 +if p = ([], Res) andalso UnparseC.term f = "2 * x + cos (x \<up> 4) * 4 * x \<up> 3"
31.268 then () else error "inputFillFormula changed 12";
31.269 Test_Tool.show_pt pt;
31.270 (*[
31.271 -(([], Frm), Diff (x ^^^ 2 + sin (x ^^^ 4), x)),
31.272 -(([1], Frm), d_d x (x ^^^ 2 + sin (x ^^^ 4))),
31.273 -(([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))),
31.274 -(([2], Res), d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)), (*<<<<<<<=====*)
31.275 -(([3], Res), d_d x (x ^^^ 2) + cos (x ^^^ 4) * (4 * x ^^^ (4 - 1))),
31.276 -(([4], Res), 2 * x ^^^ (2 - 1) + cos (x ^^^ 4) * (4 * x ^^^ (4 - 1))),
31.277 -(([5], Res), 2 * x + cos (x ^^^ 4) * 4 * x ^^^ 3),
31.278 -(([], Res), 2 * x + cos (x ^^^ 4) * 4 * x ^^^ 3)] *)
31.279 +(([], Frm), Diff (x \<up> 2 + sin (x \<up> 4), x)),
31.280 +(([1], Frm), d_d x (x \<up> 2 + sin (x \<up> 4))),
31.281 +(([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))),
31.282 +(([2], Res), d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> 4)), (*<<<<<<<=====*)
31.283 +(([3], Res), d_d x (x \<up> 2) + cos (x \<up> 4) * (4 * x \<up> (4 - 1))),
31.284 +(([4], Res), 2 * x \<up> (2 - 1) + cos (x \<up> 4) * (4 * x \<up> (4 - 1))),
31.285 +(([5], Res), 2 * x + cos (x \<up> 4) * 4 * x \<up> 3),
31.286 +(([], Res), 2 * x + cos (x \<up> 4) * 4 * x \<up> 3)] *)
31.287 ============ inhibit exn WN1130621 Isabelle2012-->13 !thehier! ==================*)
31.288 DEconstrCalcTree 1;
31.289
31.290 @@ -1551,7 +1551,7 @@
31.291 "--------- UC errpat, fillpat step to Rewrite --------------------";
31.292 (*TODO*)
31.293 CalcTree
31.294 -[(["functionTerm ((x ^ 2) ^ 3 + sin (x ^ 4))",
31.295 +[(["functionTerm ((x \<up> 2) \<up> 3 + sin (x \<up> 4))",
31.296 "differentiateFor x", "derivative f_f'"],
31.297 ("Isac_Knowledge", ["derivative_of", "function"],
31.298 ["diff", "differentiate_on_R"]))]; (*<<<======= EP is directly in script*)
31.299 @@ -1565,7 +1565,7 @@
31.300 "--------- UC errpat, fillpat step to Rewrite_Set ----------------";
31.301 "--------- UC errpat, fillpat step to Rewrite_Set ----------------";
31.302 CalcTree
31.303 -[(["functionTerm ((x ^ 2) ^ 3 + sin (x ^ 4))",
31.304 +[(["functionTerm ((x \<up> 2) \<up> 3 + sin (x \<up> 4))",
31.305 "differentiateFor x", "derivative f_f'"],
31.306 ("Isac_Knowledge", ["derivative_of", "function"],
31.307 ["diff", "after_simplification"]))]; (*<<<======= EP is in a ruleset*)
32.1 --- a/test/Tools/isac/Interpret/error-pattern.sml Mon Apr 19 20:44:18 2021 +0200
32.2 +++ b/test/Tools/isac/Interpret/error-pattern.sml Tue Apr 20 16:58:44 2021 +0200
32.3 @@ -377,10 +377,10 @@
32.4
32.5 val p = ([],Pbl);
32.6 val elems = ["fixedValues [r=Arbfix]", "maximum A", "valuesFor [a,b]",
32.7 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
32.8 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
32.9 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
32.10 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
32.11 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
32.12 - (*^^^ these are the elements for the root-problem (in variants)*)
32.13 + (* \<up> these are the elements for the root-problem (in variants)*)
32.14 (*vvv these are elements required for subproblems*)
32.15 "boundVariable a", "boundVariable b", "boundVariable alpha",
32.16 "interval {x::real. 0 <= x & x <= 2*r}",
32.17 @@ -431,14 +431,14 @@
32.18 Relate ["relations [A=a*b, a/2=r*sin alpha, \
32.19 \b/2=r*cos alpha]"]], Pbl, References.empty);
32.20 val pbl = get_obj g_pbl pt''''' (fst p); (writeln o (I_Model.to_string ctxt)) pbl;
32.21 - if ocalhd2str ocalhd = ------------^^^^^^^^^^ missing !!!*)
32.22 + if ocalhd2str ocalhd = ------------ \<up> \<up> \<up> ^ missing !!!*)
32.23
32.24 (*this input is complete in variant 1 (variant 3 does not work yet)*)
32.25 val (b,pt''''',ocalhd) =
32.26 input_icalhd pt (p,"", [Given ["fixedValues [r=Arbfix]"],
32.27 Find ["maximum A", "valuesFor [a,b]"],
32.28 Relate ["relations [A=a*b, \
32.29 - \(a/2)^^^2 + (b/2)^^^2 = r^^^2]"]],
32.30 + \(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"]],
32.31 Pbl, References.empty);
32.32 val pbl = get_obj g_pbl pt''''' (fst p); (writeln o (I_Model.to_string ctxt)) pbl;
32.33
32.34 @@ -474,7 +474,7 @@
32.35 val ifo = "solve(x+1=2,x)";
32.36 val (_,(_,c,(pt,p))) = Step_Solve.by_term (pt,p) "solve(x+1=2,x)";
32.37 (*
32.38 - This trick ^^^^^^^^^ micked input of ^^^^^^^^^^^^^^^^^ in the front-end.
32.39 + This trick \<up> \<up> \<up> micked input of \<up> \<up> \<up> \<up> \<up> ^^ in the front-end.
32.40 The trick worked in changeset fbaff8cf0179, it does not work in 59c5dd27d589 anymore
32.41 (TODO hg bisect ?) and raises the ERROR Undefined fact: "xfoldr_Nil".
32.42
32.43 @@ -637,7 +637,7 @@
32.44 "--------- Take as 1st tac, start with <NEW> (CAS input) ---------";
32.45 "--------- Take as 1st tac, start with <NEW> (CAS input) ---------";
32.46 "--------- Take as 1st tac, start with <NEW> (CAS input) ---------";
32.47 -val t = TermC.str2term "Diff (x^^^2 + x + 1, x)";
32.48 +val t = TermC.str2term "Diff (x \<up> 2 + x + 1, x)";
32.49 case t of Const ("Diff.Diff", _) $ _ => ()
32.50 | _ => raise
32.51 error "diff.sml behav.changed for CAS Diff (..., x)";
32.52 @@ -648,7 +648,7 @@
32.53 (*3>*)Iterator 1;moveActiveRoot 1;
32.54 "----- here the Headline has been finished";
32.55 (*4>*)moveActiveFormula 1 ([],Pbl);
32.56 -(*5>*)replaceFormula 1 "Diff (x^2 + x + 1, x)";
32.57 +(*5>*)replaceFormula 1 "Diff (x \<up> 2 + x + 1, x)";
32.58 val ((pt,_),_) = get_calc 1;
32.59 val PblObj {probl, meth, spec, fmz, loc, ...} = get_obj I pt [];
32.60 val (SOME istate, NONE) = loc;
32.61 @@ -679,12 +679,12 @@
32.62 ["diff", "differentiate_on_R"]) : spec*)
32.63 writeln (I_Model.to_string ctxt probl);
32.64 (*[
32.65 -(1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
32.66 +(1 ,[1] ,true ,#Given ,Cor functionTerm (x \<up> 2 + x + 1) ,(f_, [x \<up> 2 + x + 1])),
32.67 (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
32.68 (3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
32.69 writeln (I_Model.to_string ctxt meth);
32.70 (*[
32.71 -(1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
32.72 +(1 ,[1] ,true ,#Given ,Cor functionTerm (x \<up> 2 + x + 1) ,(f_, [x \<up> 2 + x + 1])),
32.73 (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
32.74 (3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
32.75 writeln"-----------------------------------------------------------";
32.76 @@ -694,8 +694,9 @@
32.77 val ((pt,p),_) = get_calc 1;
32.78 val Form res = (#1 o ME_Misc.pt_extract) (pt, ([],Res));
32.79 Test_Tool.show_pt pt;
32.80 +
32.81 if p = ([], Res) andalso UnparseC.term res = "1 + 2 * x" then ()
32.82 -else error "diff.sml behav.changed for Diff (x^2 + x + 1, x)";
32.83 +else error "diff.sml behav.changed for Diff (x \<up> 2 + x + 1, x)";
32.84 DEconstrCalcTree 1;
32.85
32.86 "--------- Take as 1st tac, start from exp -----------------------";
32.87 @@ -704,7 +705,7 @@
32.88 (*the following input is copied from BridgeLog Java <==> SML,
32.89 omitting unnecessary inputs*)
32.90 (*1>*)reset_states ();
32.91 -(*2>*)CalcTree [(["functionTerm (x^2 + x + 1)", "differentiateFor x", "derivative f_'_f"],("Isac_Knowledge",["derivative_of", "function"],["diff", "differentiate_on_R"]))];
32.92 +(*2>*)CalcTree [(["functionTerm (x \<up> 2 + x + 1)", "differentiateFor x", "derivative f_'_f"],("Isac_Knowledge",["derivative_of", "function"],["diff", "differentiate_on_R"]))];
32.93 (*3>*)Iterator 1; moveActiveRoot 1;
32.94
32.95 (*6>*)(*completeCalcHead*)autoCalculate 1 CompleteCalcHead;
32.96 @@ -722,12 +723,12 @@
32.97 ["diff", "differentiate_on_R"]) : spec*)
32.98 writeln (I_Model.to_string ctxt probl);
32.99 (*[
32.100 -(1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
32.101 +(1 ,[1] ,true ,#Given ,Cor functionTerm (x \<up> 2 + x + 1) ,(f_, [x \<up> 2 + x + 1])),
32.102 (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
32.103 (3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
32.104 writeln (I_Model.to_string ctxt meth);
32.105 (*[
32.106 -(1 ,[1] ,true ,#Given ,Cor functionTerm (x ^^^ 2 + x + 1) ,(f_, [x ^^^ 2 + x + 1])),
32.107 +(1 ,[1] ,true ,#Given ,Cor functionTerm (x \<up> 2 + x + 1) ,(f_, [x \<up> 2 + x + 1])),
32.108 (2 ,[1] ,true ,#Given ,Cor differentiateFor x ,(v_, [x])),
32.109 (3 ,[1] ,true ,#Find ,Cor derivative f_'_f ,(f_'_f, [f_'_f]))]*)
32.110 writeln"-----------------------------------------------------------";
32.111 @@ -735,8 +736,8 @@
32.112 autoCalculate 1 (Steps 1);
32.113 val ((pt,p),_) = get_calc 1;
32.114 val Form res = (#1 o ME_Misc.pt_extract) (pt, p);
32.115 -if UnparseC.term res = "d_d x (x ^^^ 2 + x + 1)" then ()
32.116 -else error "diff.sml Diff (x^2 + x + 1, x) from exp";
32.117 +if UnparseC.term res = "d_d x (x \<up> 2 + x + 1)" then ()
32.118 +else error "diff.sml Diff (x \<up> 2 + x + 1, x) from exp";
32.119 DEconstrCalcTree 1;
32.120
32.121 "--------- implicit_take, start with <NEW> (CAS input) ---------------";
32.122 @@ -945,30 +946,30 @@
32.123 "--------- build fun check_for' ?bdv -------------------------";
32.124 "--------- build fun check_for' ?bdv -------------------------";
32.125 val subst = [(TermC.str2term "bdv", TermC.str2term "x")]: subst;
32.126 -val t = TermC.str2term "d_d x (x ^^^ 2 + sin (x ^^^ 4))";
32.127 +val t = TermC.str2term "d_d x (x \<up> 2 + sin (x \<up> 4))";
32.128 val SOME (t, _) = rewrite_set_inst_ thy false subst norm_diff t;
32.129 -if UnparseC.term t = "2 * x + cos (x ^^^ 4) * 4 * x ^^^ 3" then ()
32.130 +if UnparseC.term t = "2 * x + cos (x \<up> 4) * 4 * x \<up> 3" then ()
32.131 else error "build fun check_for' ?bdv changed 1";
32.132
32.133 val rls = norm_diff
32.134 val pat = TermC.parse_patt @{theory} "d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)";
32.135 -val (res, inf) = (TermC.str2term "2 * x + d_d x (sin (x ^^^ 4))", TermC.str2term "2 * x + cos (4 * x ^^^ 3)");
32.136 +val (res, inf) = (TermC.str2term "2 * x + d_d x (sin (x \<up> 4))", TermC.str2term "2 * x + cos (4 * x \<up> 3)");
32.137
32.138 val (res', _, _, rewritten) = (*rewritten: the lhs of the pattern TermC.matches in res*)
32.139 rew_sub thy 1 subst e_rew_ord Rule_Set.empty false [] (HOLogic.Trueprop $ pat) res;
32.140 -if UnparseC.term res' = "2 * x + cos (d_d x (x ^^^ 4))" andalso rewritten then ()
32.141 +if UnparseC.term res' = "2 * x + cos (d_d x (x \<up> 4))" andalso rewritten then ()
32.142 else error "build fun check_for' ?bdv changed 2";
32.143
32.144 val norm_res = case rewrite_set_inst_ (Isac()) false subst rls res' of
32.145 NONE => res'
32.146 | SOME (norm_res, _) => norm_res;
32.147 -if UnparseC.term norm_res = "2 * x + cos (4 * x ^^^ 3)" then ()
32.148 +if UnparseC.term norm_res = "2 * x + cos (4 * x \<up> 3)" then ()
32.149 else error "build fun check_for' ?bdv changed 3";
32.150
32.151 val norm_inf = case rewrite_set_inst_ (Isac()) false subst rls inf of
32.152 NONE => inf
32.153 | SOME (norm_inf, _) => norm_inf;
32.154 -if UnparseC.term norm_inf = "2 * x + cos (4 * x ^^^ 3)" then ()
32.155 +if UnparseC.term norm_inf = "2 * x + cos (4 * x \<up> 3)" then ()
32.156 else error "build fun check_for' ?bdv changed 4";
32.157
32.158 res' = inf;
32.159 @@ -982,8 +983,8 @@
32.160 "--------- build fun check_for ------------------------";
32.161 "--------- build fun check_for ------------------------";
32.162 val (res, inf) =
32.163 - (TermC.str2term "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))",
32.164 - TermC.str2term "d_d x (x ^^^ 2) + cos (4 * x ^^^ 3)");
32.165 + (TermC.str2term "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))",
32.166 + TermC.str2term "d_d x (x \<up> 2) + cos (4 * x \<up> 3)");
32.167 val {errpats, nrls = rls, scr = Prog prog, ...} = MethodC.from_store ["diff", "differentiate_on_R"]
32.168
32.169 val env = [(TermC.str2term "v_v", TermC.str2term "x")];
32.170 @@ -992,7 +993,7 @@
32.171 ("chain-rule-diff-both",
32.172 [TermC.parse_patt @{theory} "d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)",
32.173 TermC.parse_patt @{theory} "d_d ?bdv (cos ?u) = - sin (d_d ?bdv ?u)",
32.174 - TermC.parse_patt @{theory} "d_d ?bdv (?u ^^^ ?n) = ?n * ?u ^^^ (?n - 1)",
32.175 + TermC.parse_patt @{theory} "d_d ?bdv (?u \<up> ?n) = ?n * ?u \<up> (?n - 1)",
32.176 TermC.parse_patt @{theory} "d_d ?bdv (LogExp.ln ?u) = 1 / ?u",
32.177 TermC.parse_patt @{theory} "d_d ?bdv (LogExp.ln ?u) = 1 / d_d ?bdv ?u"],
32.178 [@{thm diff_sin_chain}, @{thm diff_cos_chain}, @{thm diff_pow_chain},
32.179 @@ -1006,16 +1007,16 @@
32.180 "--------- embed fun check_for ------------------------";
32.181 reset_states ();
32.182 CalcTree
32.183 -[(["functionTerm (x ^ 2 + sin (x ^ 4))", "differentiateFor x", "derivative f_f'"],
32.184 +[(["functionTerm (x \<up> 2 + sin (x \<up> 4))", "differentiateFor x", "derivative f_f'"],
32.185 ("Isac_Knowledge", ["derivative_of", "function"], ["diff", "differentiate_on_R"]))];
32.186 Iterator 1;
32.187 moveActiveRoot 1;
32.188 autoCalculate 1 CompleteCalcHead;
32.189 autoCalculate 1 (Steps 1);
32.190 -autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
32.191 -(*autoCalculate 1 (Steps 1);([2], Res), d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)*)
32.192 +autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
32.193 +(*autoCalculate 1 (Steps 1);([2], Res), d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> \<up> 4)*)
32.194
32.195 -"~~~~~ fun appendFormula , args:"; val (cI, (ifo:TermC.as_string)) = (1, "d_d x (x ^ 2) + cos (4 * x ^ 3)");
32.196 +"~~~~~ fun appendFormula , args:"; val (cI, (ifo:TermC.as_string)) = (1, "d_d x (x \<up> 2) + cos (4 * x \<up> 3)");
32.197 "~~~~~ fun appendFormula' , args:"; val (cI, (ifo: TermC.as_string)) = (cI, ifo);
32.198 val cs = get_calc cI
32.199 val pos = get_pos cI 1;
32.200 @@ -1043,13 +1044,13 @@
32.201 {errpats, nrls, scr = Rule.Prog prog, ...} => (errpats, nrls, prog)
32.202 | _ => error "inform: uncovered case of MethodC.from_store"
32.203 ;
32.204 -(*+*)if Error_Pattern.s_to_string errpats = "[(\"chain-rule-diff-both\",\n[\"d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)\", \"d_d ?bdv (cos ?u) = - sin (d_d ?bdv ?u)\", \"d_d ?bdv (?u ^^^ ?n) = ?n * ?u ^^^ (?n - 1)\", \"d_d ?bdv (LogExp.ln ?u) = 1 / ?u\", \"d_d ?bdv (LogExp.ln ?u) = 1 / d_d ?bdv ?u\"],\n[\"d_d ?bdv (sin ?u) = cos ?u * d_d ?bdv ?u\", \"d_d ?bdv (cos ?u) = - sin ?u * d_d ?bdv ?u\", \"d_d ?bdv (?u ^^^ ?n) = ?n * ?u ^^^ (?n - 1) * d_d ?bdv ?u\", \"d_d ?bdv (LogExp.ln ?u) = d_d ?bdv ?u / ?u\", \"d_d ?bdv (E_ ^^^ ?u) = E_ ^^^ ?u * d_d ?x ?u\"]]"
32.205 +(*+*)if Error_Pattern.s_to_string errpats = "[(\"chain-rule-diff-both\",\n[\"d_d ?bdv (sin ?u) = cos (d_d ?bdv ?u)\", \"d_d ?bdv (cos ?u) = - sin (d_d ?bdv ?u)\", \"d_d ?bdv (?u \<up> ?n) = ?n * ?u \<up> (?n - 1)\", \"d_d ?bdv (LogExp.ln ?u) = 1 / ?u\", \"d_d ?bdv (LogExp.ln ?u) = 1 / d_d ?bdv ?u\"],\n[\"d_d ?bdv (sin ?u) = cos ?u * d_d ?bdv ?u\", \"d_d ?bdv (cos ?u) = - sin ?u * d_d ?bdv ?u\", \"d_d ?bdv (?u \<up> ?n) = ?n * ?u \<up> (?n - 1) * d_d ?bdv ?u\", \"d_d ?bdv (LogExp.ln ?u) = d_d ?bdv ?u / ?u\", \"d_d ?bdv (E_ \<up> ?u) = E_ \<up> ?u * d_d ?x ?u\"]]"
32.206 (*+*)then () else error "inform with (positive) Error_Pattern.check_for broken 3";
32.207
32.208 val {env, ...} = Ctree.get_istate_LI pt pos |> Istate.the_pstate
32.209 ;
32.210 -(*+*)if UnparseC.term f_pred = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" andalso
32.211 -(*+*) UnparseC.term f_in = "d_d x (x ^^^ 2) + cos (4 * x ^^^ 3)"
32.212 +(*+*)if UnparseC.term f_pred = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" andalso
32.213 +(*+*) UnparseC.term f_in = "d_d x (x \<up> 2) + cos (4 * x \<up> 3)"
32.214 (*+*)then () else error "inform with (positive) Error_Pattern.check_for broken 2";
32.215
32.216 val SOME "chain-rule-diff-both" = (*case*) Error_Pattern.check_for (f_pred, f_in) (prog, env) (errpats, nrls) (*of*);
32.217 @@ -1066,14 +1067,14 @@
32.218 "--------- embed fun find_fill_patterns ---------------------------";
32.219 reset_states ();
32.220 CalcTree
32.221 -[(["functionTerm (x ^ 2 + sin (x ^ 4))", "differentiateFor x", "derivative f_f'"],
32.222 +[(["functionTerm (x \<up> 2 + sin (x \<up> 4))", "differentiateFor x", "derivative f_f'"],
32.223 ("Isac_Knowledge", ["derivative_of", "function"], ["diff", "differentiate_on_R"]))];
32.224 Iterator 1;
32.225 moveActiveRoot 1;
32.226 autoCalculate 1 CompleteCalcHead;
32.227 autoCalculate 1 (Steps 1);
32.228 -autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
32.229 -appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" (*|> Future.join*);
32.230 +autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
32.231 +appendFormula 1 "d_d x (x \<up> 2) + cos (4 * x \<up> 3)" (*|> Future.join*);
32.232 (*<CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>*)
32.233 (*or
32.234 <CALCMESSAGE> no derivation found </CALCMESSAGE>*)
32.235 @@ -1096,7 +1097,7 @@
32.236
32.237 case map (Error_Pattern.fill_from_store subst f_curr errpatID) errpatthms |> flat of
32.238 ("fill-d_d-arg", tm, thm, subs_opt) :: _ => if UnparseC.term tm =
32.239 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1"
32.240 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1"
32.241 then () else error "find_fill_patterns changed 1a"
32.242 | _ => error "find_fill_patterns changed 1b"
32.243
32.244 @@ -1110,7 +1111,7 @@
32.245
32.246 case some |> filter is_some |> map the of
32.247 ("fill-d_d-arg", tm, thm, subsopt) :: _ => if UnparseC.term tm =
32.248 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1"
32.249 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1"
32.250 then () else error "find_fill_patterns changed 2a"
32.251 | _ => error "find_fill_patterns changed 2b"
32.252
32.253 @@ -1120,7 +1121,7 @@
32.254 val (form', _, _, rewritten) =
32.255 rew_sub (Isac()) 1 subst e_rew_ord Rule_Set.empty false [] (HOLogic.Trueprop $ pat) form;
32.256
32.257 -if UnparseC.term form' = "d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1" then ()
32.258 +if UnparseC.term form' = "d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1" then ()
32.259 else error "find_fill_patterns changed 3";
32.260
32.261 "~~~~~ to findFillpatterns return val:"; val (fillpats) =
32.262 @@ -1130,16 +1131,16 @@
32.263 val msg = "fill patterns " ^
32.264 ((map ((apsnd UnparseC.term) o quad2pair) fillpats) |> map pair2str_ |> strs2str_);
32.265 msg =
32.266 - "fill patterns #fill-d_d-arg#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" ^
32.267 - " =\nd_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1" ^
32.268 - "#fill-both-args#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" ^
32.269 - " =\nd_d x (x ^^^ 2) + cos ?_dummy_2 * d_d x ?_dummy_3" ^
32.270 - "#fill-d_d#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" ^
32.271 - " =\nd_d x (x ^^^ 2) + cos (x ^^^ 4) * ?_dummy_1 x (x ^^^ 4)" ^
32.272 - "#fill-inner-deriv#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" ^
32.273 - " =\nd_d x (x ^^^ 2) + cos (x ^^^ 4) * ?_dummy_1" ^
32.274 - "#fill-all#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) = d_d x (x ^^^ 2) + ?_dummy_1#";
32.275 -"^^^--- dropped this code WN120730";
32.276 + "fill patterns #fill-d_d-arg#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" ^
32.277 + " =\nd_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1" ^
32.278 + "#fill-both-args#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" ^
32.279 + " =\nd_d x (x \<up> 2) + cos ?_dummy_2 * d_d x ?_dummy_3" ^
32.280 + "#fill-d_d#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" ^
32.281 + " =\nd_d x (x \<up> 2) + cos (x \<up> 4) * ?_dummy_1 x (x \<up> 4)" ^
32.282 + "#fill-inner-deriv#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" ^
32.283 + " =\nd_d x (x \<up> 2) + cos (x \<up> 4) * ?_dummy_1" ^
32.284 + "#fill-all#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) = d_d x (x \<up> 2) + ?_dummy_1#";
32.285 +" \<up> --- dropped this code WN120730";
32.286
32.287 if (map #1 fillpats) =
32.288 ["fill-d_d-arg", "fill-both-args", "fill-d_d", "fill-inner-deriv", "fill-all"]
32.289 @@ -1151,23 +1152,23 @@
32.290 "--------- build fun is_exactly_equal, inputFillFormula ----------";
32.291 reset_states ();
32.292 CalcTree
32.293 -[(["functionTerm (x ^ 2 + sin (x ^ 4))", "differentiateFor x", "derivative f_f'"],
32.294 +[(["functionTerm (x \<up> 2 + sin (x \<up> 4))", "differentiateFor x", "derivative f_f'"],
32.295 ("Isac_Knowledge", ["derivative_of", "function"], ["diff", "differentiate_on_R"]))];
32.296 Iterator 1;
32.297 moveActiveRoot 1;
32.298 autoCalculate 1 CompleteCalcHead;
32.299 autoCalculate 1 (Steps 1);
32.300 -autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
32.301 -appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" (*|> Future.join*); (*<<<<<<<=========================*)
32.302 +autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
32.303 +appendFormula 1 "d_d x (x \<up> 2) + cos (4 * x \<up> 3)" (*|> Future.join*); (*<<<<<<<=========================*)
32.304 (* the check for errpat is maximally liberal (whole term modulo "nrls" from "type met"),
32.305 - would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
32.306 + would recognize "cos (4 * x \<up> (4 - 1)) + 2 * x" as well.
32.307 results in <CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>
32.308 instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
32.309 val ((pt,pos), _) = get_calc 1;
32.310 val p = get_pos 1 1;
32.311 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
32.312
32.313 - if p = ([1], Res) andalso UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" then
32.314 + if p = ([1], Res) andalso UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" then
32.315 case get_obj g_tac pt (fst p) of Rewrite_Inst (["(''bdv'', x)"],
32.316 ("diff_sum", thm)) =>
32.317 if (UnparseC.term o Thm.prop_of) thm = "d_d ?bdv (?u + ?v) = d_d ?bdv ?u + d_d ?bdv ?v" then ()
32.318 @@ -1176,13 +1177,13 @@
32.319 else error "embed fun fill_form changed 13";
32.320
32.321 findFillpatterns 1 "chain-rule-diff-both"; (*<<<<<<<=================================*)
32.322 -(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =
32.323 - d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
32.324 +(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =
32.325 + d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
32.326 val ((pt,pos),_) = get_calc 1;
32.327 val p = get_pos 1 1;
32.328
32.329 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
32.330 - if p = ([1], Res) andalso UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))" then
32.331 + if p = ([1], Res) andalso UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))" then
32.332 case get_obj g_tac pt (fst p) of Rewrite_Inst (["(''bdv'', x)"],
32.333 ("diff_sum", thm)) =>
32.334 if (UnparseC.term o Thm.prop_of) thm = "d_d ?bdv (?u + ?v) = d_d ?bdv ?u + d_d ?bdv ?v" then ()
32.335 @@ -1196,7 +1197,7 @@
32.336 val p = get_pos 1 1;
32.337 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
32.338 if p = ([1], Res) andalso existpt [2] pt
32.339 - andalso UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))"
32.340 + andalso UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))"
32.341 then case get_obj g_tac pt (fst p) of Rewrite_Inst (["(''bdv'', x)"],
32.342 ("diff_sum", thm)) =>
32.343 if (UnparseC.term o Thm.prop_of) thm = "d_d ?bdv (?u + ?v) = d_d ?bdv ?u + d_d ?bdv ?v" then ()
32.344 @@ -1210,7 +1211,7 @@
32.345 the respective thm is in the ctree ................
32.346 *)
32.347 "~~~~~ fun inputFillFormula, args:"; val (cI, ifo) =
32.348 - (1, "d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)");
32.349 + (1, "d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> 4)");
32.350 val ((pt, _), _) = get_calc cI
32.351 val pos = get_pos cI 1;
32.352
32.353 @@ -1234,7 +1235,7 @@
32.354 val ((pt, _),_) = get_calc 1;
32.355 val p = get_pos 1 1;
32.356 val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
32.357 - if p = ([2], Res) andalso UnparseC.term f = "d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x (x ^^^ 4)"
32.358 + if p = ([2], Res) andalso UnparseC.term f = "d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x (x \<up> 4)"
32.359 then case get_obj g_tac pt (fst p) of Rewrite_Inst (["(''bdv'', x)"],
32.360 ("diff_sin_chain", thm)) =>
32.361 if (UnparseC.term o Thm.prop_of) thm = "d_d ?bdv (sin ?u) = cos ?u * d_d ?bdv ?u" then ()
32.362 @@ -1307,7 +1308,7 @@
32.363 ------------------------------------------------------------------------------
32.364 1. "5 * x / (x - 2) - x / (x + 2) = 4"
32.365 ...
32.366 -4. "12 * x + 4 * x ^^^ 2 = 4 * (-4 + x ^^^ 2)",Subproblem["normalise", "poly"..
32.367 +4. "12 * x + 4 * x \<up> 2 = 4 * (-4 + x \<up> 2)",Subproblem["normalise", "poly"..
32.368 ...
32.369 4.3. "16 + 12 * x = 0", Subproblem["degree_1", "polynomial", "univariate"..
32.370 ...
32.371 @@ -1322,14 +1323,14 @@
32.372
32.373
32.374 ------------------------------------------------------------------------------
32.375 -"Schalk I s.87 Bsp 55b (x/(x^^^2 - 6*x+9) - 1/(x^^^2 - 3*x) =1/x)";
32.376 +"Schalk I s.87 Bsp 55b (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)";
32.377 ------------------------------------------------------------------------------
32.378 -1. "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) = 1 / x"
32.379 +1. "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) = 1 / x"
32.380 ...
32.381 -4. "(3 + (-1 * x + x ^^^ 2)) * x = 1 * (9 * x + (x ^^^ 3 + -6 * x ^^^ 2))"
32.382 +4. "(3 + (-1 * x + x \<up> 2)) * x = 1 * (9 * x + (x \<up> 3 + -6 * x \<up> 2))"
32.383 Subproblem["normalise", "polynomial", "univariate"..
32.384 ...
32.385 -4.4. "-6 * x + 5 * x ^^^ 2 = 0", Subproblem["bdv_only", "degree_2", "poly"..
32.386 +4.4. "-6 * x + 5 * x \<up> 2 = 0", Subproblem["bdv_only", "degree_2", "poly"..
32.387 ...
32.388 4.4.4. "[x = 0, x = 6 / 5]", Check_elementwise "Assumptions"
32.389 4.4.5. "[x = 0, x = 6 / 5]"
32.390 @@ -1351,10 +1352,9 @@
32.391 6. "13 + 13 * x + -2 * sqrt ((4 + 4 * x) * (9 + 9 * x)) = 1 + x"
32.392 Subproblem["sq", "rootX", "univariate", "equation"]
32.393 ...
32.394 -6.6. "144 + 288 * x + 144 * x ^^^ 2 = 144 + x ^^^ 2 + 288 * x + 143 * x ^^^ 2"
32.395 +6.6. "144 + 288 * x + 144 * x \<up> 2 = 144 + x \<up> 2 + 288 * x + 143 * x \<up> 2"
32.396 Subproblem["normalise", "polynomial", "univariate", "equation"]
32.397 -...
32.398 -6.6.3 "0 = 0" Subproblem["degree_0", "polynomial", "univariate", "equation"]
32.399 +...6.6.3 "0 = 0" Subproblem["degree_0", "polynomial", "univariate", "equation"]
32.400 ... Or_to_List
32.401 6.6.3.2 "UniversalList"
32.402 ------------------------------------------------------------------------------
33.1 --- a/test/Tools/isac/Interpret/lucas-interpreter.sml Mon Apr 19 20:44:18 2021 +0200
33.2 +++ b/test/Tools/isac/Interpret/lucas-interpreter.sml Tue Apr 20 16:58:44 2021 +0200
33.3 @@ -22,7 +22,7 @@
33.4 val p = e_pos'; val c = [];
33.5 val (p,_,f,nxt,_,pt) =
33.6 CalcTreeTEST
33.7 - [(["functionTerm (x^^^2 + 1)", "integrateBy x", "antiDerivative FF"],
33.8 + [(["functionTerm (x \<up> 2 + 1)", "integrateBy x", "antiDerivative FF"],
33.9 ("Integrate", ["integrate", "function"], ["diff", "integration"]))];
33.10 val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = ("Tac ", ...) --> Add_Given...*)
33.11 val (p,_,f,nxt,_,pt) = me nxt p c pt;
33.12 @@ -53,14 +53,14 @@
33.13 val (is, env, ctxt, sc) = case LItool.init_pstate srls ctxt itms mI of
33.14 (is as Istate.Pstate {env, ...}, ctxt, sc) => (is, env, ctxt, sc)
33.15 | _ => error "solve Apply_Method: uncovered case init_pstate";
33.16 -(*+*)pstate2str (the_pstate is) = "([\"\n(f_f, x ^^^ 2 + 1)\",\"\n(v_v, x)\"], [], empty, NONE, \n??.empty, ORundef, false, true)";
33.17 +(*+*)pstate2str (the_pstate is) = "([\"\n(f_f, x \<up> 2 + 1)\",\"\n(v_v, x)\"], [], empty, NONE, \n??.empty, ORundef, false, true)";
33.18 val ini = LItool.implicit_take sc env;
33.19 val p = lev_dn p;
33.20
33.21 val NONE = (*case*) ini (*of*);
33.22 val Next_Step (is', ctxt', m') =
33.23 LI.find_next_step sc (pt, (p, Res)) is ctxt;
33.24 -(*+*)pstate2str (the_pstate is') = "([\"\n(f_f, x ^^^ 2 + 1)\",\"\n(v_v, x)\"], [R,L,R], empty, NONE, \nIntegral x ^^^ 2 + 1 D x, ORundef, false, false)";
33.25 +(*+*)pstate2str (the_pstate is') = "([\"\n(f_f, x \<up> 2 + 1)\",\"\n(v_v, x)\"], [R,L,R], empty, NONE, \nIntegral x \<up> 2 + 1 D x, ORundef, false, false)";
33.26 val Safe_Step (_, _, Take' _) = (*case*)
33.27 locate_input_tactic sc (pt, (p, Res)) is' ctxt' m' (*of*);
33.28 "~~~~~ fun locate_input_tactic , args:"; val ((Prog prog), cstate, istate, ctxt, tac)
34.1 --- a/test/Tools/isac/Interpret/step-solve.sml Mon Apr 19 20:44:18 2021 +0200
34.2 +++ b/test/Tools/isac/Interpret/step-solve.sml Tue Apr 20 16:58:44 2021 +0200
34.3 @@ -17,10 +17,10 @@
34.4 "----------- Apply_Method with explicit Take by fun me (from integrate) ------------------------";
34.5 (*cp fom..*)
34.6 "----------- me method [diff,integration] ---------------";
34.7 -val fmz = ["functionTerm (x^^^2 + 1)", "integrateBy x", "antiDerivative FF"];
34.8 +val fmz = ["functionTerm (x \<up> 2 + 1)", "integrateBy x", "antiDerivative FF"];
34.9 val spec = ("Integrate", ["integrate", "function"], ["diff", "integration"]);
34.10 (*[], Pbl*)val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, spec)];(*\<rightarrow>Model_Problem*)
34.11 -(*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Add_Given "functionTerm (x ^^^ 2 + 1)"*)
34.12 +(*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Add_Given "functionTerm (x \<up> 2 + 1)"*)
34.13 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Add_Given "integrateBy x"*)
34.14 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Add_Find "Integrate.antiDerivative FF"*)
34.15 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Specify_Theory "Integrate"*)
34.16 @@ -40,5 +40,5 @@
34.17
34.18 (*/--------- final test ----------------------------------------------------------------------\*)
34.19 val (res, asm) = (get_obj g_result pt (fst p));
34.20 -if UnparseC.term res = "c + x + 1 / 3 * x ^^^ 3" then ()
34.21 +if UnparseC.term res = "c + x + 1 / 3 * x \<up> 3" then ()
34.22 else error "Apply_Method with explicit Take CHANGED";
35.1 --- a/test/Tools/isac/Knowledge/biegelinie-1.sml Mon Apr 19 20:44:18 2021 +0200
35.2 +++ b/test/Tools/isac/Knowledge/biegelinie-1.sml Tue Apr 20 16:58:44 2021 +0200
35.3 @@ -44,9 +44,9 @@
35.4 (*if term2s t = "M_b' x = - q_0 * x + c" then () cf.fbe1652b0df8 new handling of quotes in mixfix*)
35.5 else error "/biegelinie.sml: Querkraft_Moment";
35.6
35.7 -val t = rewrit @{thm Moment_Neigung} (TermC.str2term "M_b x = -q_0 * x^^^2/2 + q_0/2 *L*x");
35.8 +val t = rewrit @{thm Moment_Neigung} (TermC.str2term "M_b x = -q_0 * x \<up> 2/2 + q_0/2 *L*x");
35.9 term2s t;
35.10 -if term2s t = "- EI * y'' x = - q_0 * x ^^^ 2 / 2 + q_0 / 2 * L * x" then ()
35.11 +if term2s t = "- EI * y'' x = - q_0 * x \<up> 2 / 2 + q_0 / 2 * L * x" then ()
35.12 else error "biegelinie.sml: Moment_Neigung";
35.13
35.14 "----------- simplify_leaf for this script -----------------------";
35.15 @@ -71,7 +71,7 @@
35.16 ],
35.17 scr = Empty_Prog};
35.18 val rm_ = TermC.str2term"[M_b 0 = 0, M_b L = 0]";
35.19 -val M__ = TermC.str2term"M_b x = -1 * x ^^^ 2 / 2 + x * c + c_2";
35.20 +val M__ = TermC.str2term"M_b x = -1 * x \<up> 2 / 2 + x * c + c_2";
35.21 val SOME (e1__,_) = rewrite_set_ thy false srls
35.22 (TermC.str2term "(NTH::[real,bool list]=>bool) 1 " $ rm_);
35.23 if UnparseC.term e1__ = "M_b 0 = 0" then () else error "biegelinie.sml simplify NTH 1 rm_";
35.24 @@ -88,7 +88,7 @@
35.25 "----------- SubProblem (_,[setzeRandbedingungen,Biegelinien] ----";
35.26 "----------- SubProblem (_,[setzeRandbedingungen,Biegelinien] ----";
35.27 "----------- SubProblem (_,[setzeRandbedingungen,Biegelinien] ----";
35.28 -val fmz = ["functionEq (M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2)",
35.29 +val fmz = ["functionEq (M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2)",
35.30 "substitution (M_b L = 0)",
35.31 "equality equ_equ"];
35.32 val (dI',pI',mI') = ("Biegelinie", ["makeFunctionTo", "equation"],
35.33 @@ -101,15 +101,15 @@
35.34 val (p,_,f,nxt,_,pt) = me nxt p c pt;
35.35
35.36 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
35.37 - "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
35.38 + "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
35.39 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
35.40 - "M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2";
35.41 + "M_b L = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2";
35.42 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
35.43 - "0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2";
35.44 + "0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2";
35.45 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
35.46 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
35.47 -if (* f2str f = "0 = c_2 + L * c + -1 * q_0 / 2 * L ^^^ 2" CHANGE NOT considered, already on leave*)
35.48 - f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2"
35.49 +if (* f2str f = "0 = c_2 + L * c + -1 * q_0 / 2 * L \<up> 2" CHANGE NOT considered, already on leave*)
35.50 + f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2"
35.51 then case nxt of End_Proof' => ()
35.52 | _ => error "biegelinie.sml: SubProblem (_,[setzeRandbed 1"
35.53 else error "biegelinie.sml: SubProblem (_,[setzeRandbed 2";
35.54 @@ -119,7 +119,7 @@
35.55 "----------- investigate normalforms in biegelinien --------------";
35.56 "----- coming from integration, kept for later improvements:";
35.57 val Q = TermC.str2term "Q x = c + -1 * q_0 * x";
35.58 -val M_b = TermC.str2term "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
35.59 -val y' = TermC.str2term "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)";
35.60 -val y = TermC.str2term "y x = c_4 + c_3 * x +\n1 / (-1 * EI) * (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)";
35.61 -(*^^^ 1 / (-1 * EI) NOT distributed - ok! ^^^^^^^^^^^^^^^^^^^^^^^*)
35.62 +val M_b = TermC.str2term "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
35.63 +val y' = TermC.str2term "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)";
35.64 +val y = TermC.str2term "y x = c_4 + c_3 * x +\n1 / (-1 * EI) * (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)";
35.65 +(* \<up> 1 / (-1 * EI) NOT distributed - ok! \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^^*)
36.1 --- a/test/Tools/isac/Knowledge/biegelinie-2.sml Mon Apr 19 20:44:18 2021 +0200
36.2 +++ b/test/Tools/isac/Knowledge/biegelinie-2.sml Tue Apr 20 16:58:44 2021 +0200
36.3 @@ -17,9 +17,9 @@
36.4 val fmz =
36.5 ["Streckenlast q_0", "FunktionsVariable x",
36.6 "Funktionen [Q x = c + -1 * q_0 * x, \
36.7 - \M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2,\
36.8 - \ y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3),\
36.9 - \ y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]",
36.10 + \M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2,\
36.11 + \ y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3),\
36.12 + \ y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]",
36.13 "AbleitungBiegelinie dy"];
36.14 val (dI',pI',mI') = ("Biegelinie", ["vonBelastungZu", "Biegelinien"],
36.15 ["Biegelinien", "ausBelastung"]);
36.16 @@ -32,7 +32,7 @@
36.17
36.18 val ((pt, p),_) = get_calc 1;
36.19 if p = ([], Res) andalso (get_obj g_res pt (fst p) |> UnparseC.term) =
36.20 - "[Q x = c + -1 * q_0 * x, M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2,\n dy x =\n c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3),\n y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]"
36.21 + "[Q x = c + -1 * q_0 * x, M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2,\n dy x =\n c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3),\n y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]"
36.22 then () else error "auto SubProblem (_,[vonBelastungZu,Biegelinien] changed";
36.23
36.24
36.25 @@ -42,9 +42,9 @@
36.26 val fmz =
36.27 ["Streckenlast q_0", "FunktionsVariable x",
36.28 "Funktionen [Q x = c + -1 * q_0 * x, \
36.29 - \M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2,\
36.30 - \ y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3),\
36.31 - \ y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]",
36.32 + \M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2,\
36.33 + \ y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3),\
36.34 + \ y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]",
36.35 "AbleitungBiegelinie dy"];
36.36 val (dI',pI',mI') = ("Biegelinie", ["vonBelastungZu", "Biegelinien"],
36.37 ["Biegelinien", "ausBelastung"]);
36.38 @@ -83,38 +83,38 @@
36.39 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.40 "M_b x = Integral c + -1 * q_0 * x D x";
36.41 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.42 - "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
36.43 + "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
36.44 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.45 - "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
36.46 + "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
36.47 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.48 - "- EI * y'' x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
36.49 + "- EI * y'' x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
36.50 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.51 - "y'' x = 1 / - EI * (c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2)";
36.52 + "y'' x = 1 / - EI * (c_2 + c * x + -1 * q_0 / 2 * x \<up> 2)";
36.53 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.54 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.55 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.56 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.57 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.58 - "y' x = Integral 1 / - EI * (c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) D x";
36.59 + "y' x = Integral 1 / - EI * (c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) D x";
36.60 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.61 -"y' x = Integral 1 / (-1 * EI) * (c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) D x";
36.62 +"y' x = Integral 1 / (-1 * EI) * (c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) D x";
36.63 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.64 -"y' x =\nc_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)";
36.65 +"y' x =\nc_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)";
36.66 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.67 -"y' x =\nc_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)";
36.68 +"y' x =\nc_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)";
36.69 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.70 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.71 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.72 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.73 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.74 -"y x =\nIntegral c_3 +\n 1 / (-1 * EI) *\n (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3) D x";
36.75 +"y x =\nIntegral c_3 +\n 1 / (-1 * EI) *\n (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3) D x";
36.76 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.77 -"y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)";
36.78 +"y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)";
36.79 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
36.80 - "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)";
36.81 + "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)";
36.82 val (p,_,f,nxt,_,pt) = me nxt p c pt;
36.83 if f2str f =
36.84 - "[Q x = c + -1 * q_0 * x, M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2,\n dy x =\n c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3),\n y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]"
36.85 + "[Q x = c + -1 * q_0 * x, M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2,\n dy x =\n c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3),\n y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]"
36.86 then case nxt of ("End_Proof'", End_Proof') => ()
36.87 | _ => error "biegelinie.sml met2 e 1"
36.88 else error "biegelinie.sml met2 e 2";
37.1 --- a/test/Tools/isac/Knowledge/biegelinie-3.sml Mon Apr 19 20:44:18 2021 +0200
37.2 +++ b/test/Tools/isac/Knowledge/biegelinie-3.sml Tue Apr 20 16:58:44 2021 +0200
37.3 @@ -16,9 +16,9 @@
37.4 "----------- auto method [Biegelinien,setzeRandbedingungenEin]--------------------------------";
37.5 "----------- auto method [Biegelinien,setzeRandbedingungenEin]--------------------------------";
37.6 val fmz = ["Funktionen [Q x = c + -1 * q_0 * x," ^
37.7 - "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2," ^
37.8 - "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)," ^
37.9 - "y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]",
37.10 + "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2," ^
37.11 + "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)," ^
37.12 + "y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]",
37.13 "Randbedingungen [y 0 = (0::real), y L = 0, M_b 0 = 0, M_b L = 0]",
37.14 "Gleichungen equ_s"];
37.15 val (dI',pI',mI') = ("Biegelinie", ["setzeRandbedingungen", "Biegelinien"],
37.16 @@ -32,7 +32,7 @@
37.17
37.18 val ((pt, p),_) = get_calc 1;
37.19 if p = ([], Res) andalso (get_obj g_res pt (fst p) |> UnparseC.term) =
37.20 - "[0 = -1 * c_4 / -1,\n 0 =\n (-24 * c_4 * EI + -24 * L * c_3 * EI + 12 * L ^^^ 2 * c_2 +\n 4 * L ^^^ 3 * c +\n -1 * L ^^^ 4 * q_0) /\n (-24 * EI),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]"
37.21 + "[0 = -1 * c_4 / -1,\n 0 =\n (-24 * c_4 * EI + -24 * L * c_3 * EI + 12 * L \<up> 2 * c_2 +\n 4 * L \<up> 3 * c +\n -1 * L \<up> 4 * q_0) /\n (-24 * EI),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]"
37.22 then () else error "auto method [Biegelinien,setzeRandbedingungenEin] changed";
37.23
37.24
37.25 @@ -40,9 +40,9 @@
37.26 "----------- me method [Biegelinien,setzeRandbedingungenEin]----------------------------------";
37.27 "----------- me method [Biegelinien,setzeRandbedingungenEin]----------------------------------";
37.28 val fmz = ["Funktionen [Q x = c + -1 * q_0 * x," ^
37.29 - "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2," ^
37.30 - "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)," ^
37.31 - "y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)]",
37.32 + "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2," ^
37.33 + "y' x = c_3 + 1 / (-1 * EI) * (c_2 * x + c / 2 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)," ^
37.34 + "y x = c_4 + c_3 * x + 1 / (-1 * EI) * (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)]",
37.35 "Randbedingungen [y 0 = (0::real), y L = 0, M_b 0 = 0, M_b L = 0]",
37.36 "Gleichungen equ_s"];
37.37 val (dI',pI',mI') = ("Biegelinie", ["setzeRandbedingungen", "Biegelinien"],
37.38 @@ -62,7 +62,7 @@
37.39 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.40 if (#1 o (get_obj g_fmz pt)) (fst p) =
37.41 ["functionEq\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *" ^
37.42 - "\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4))",
37.43 + "\n (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4))",
37.44 "substitution (y 0 = 0)", "equality equ'''"] then ()
37.45 else error "biegelinie.sml met setzeRandbed*Ein bb";
37.46 (writeln o Istate.string_of) (get_istate_LI pt p);
37.47 @@ -75,7 +75,7 @@
37.48 case nxt of (_, Apply_Method["Equation", "fromFunction"]) => ()
37.49 | _ => error "biegelinie.sml met2 ff";
37.50 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f =
37.51 - "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)";
37.52 + "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)";
37.53 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.54 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.55 case nxt of (_, Check_Postcond ["makeFunctionTo", "equation"]) => ()
37.56 @@ -89,7 +89,7 @@
37.57
37.58 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.59 if (#1 o (get_obj g_fmz pt)) (fst p) =
37.60 - ["functionEq\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4))",
37.61 + ["functionEq\n (y x =\n c_4 + c_3 * x +\n 1 / (-1 * EI) *\n (c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4))",
37.62 "substitution (y L = 0)", "equality equ'''"] then ()
37.63 else error "biegelinie.sml metsetzeRandbed*Ein bb ";
37.64 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.65 @@ -98,11 +98,11 @@
37.66 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.67 case nxt of (_, Apply_Method["Equation", "fromFunction"]) => ()
37.68 | _ => error "biegelinie.sml met2 ii";
37.69 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)";
37.70 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y L =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L ^^^ 2 + c / 6 * L ^^^ 3 + -1 * q_0 / 24 * L ^^^ 4)";
37.71 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L ^^^ 2 + c / 6 * L ^^^ 3 + -1 * q_0 / 24 * L ^^^ 4)";
37.72 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI)" ;
37.73 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI)";
37.74 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)";
37.75 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "y L =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L \<up> 2 + c / 6 * L \<up> 3 + -1 * q_0 / 24 * L \<up> 4)";
37.76 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + c_3 * L +\n1 / (-1 * EI) *\n(c_2 / 2 * L \<up> 2 + c / 6 * L \<up> 3 + -1 * q_0 / 24 * L \<up> 4)";
37.77 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI)" ;
37.78 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 =\nc_4 + L * c_3 +\n(12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI)";
37.79 case nxt of (_,Subproblem (_, ["makeFunctionTo", "equation"])) => ()
37.80 | _ => error "biegelinie.sml met2 jj";
37.81 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.82 @@ -112,8 +112,8 @@
37.83 case nxt of (_, Apply_Method ["Equation", "fromFunction"])=>()
37.84 | _ => error "biegelinie.sml met2 kk";
37.85
37.86 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2"(*true*);
37.87 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2";
37.88 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2"(*true*);
37.89 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 \<up> 2";
37.90 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2";
37.91 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2";
37.92 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.93 @@ -129,17 +129,17 @@
37.94 case nxt of (_, Apply_Method ["Equation", "fromFunction"])=>()
37.95 | _ => error "biegelinie.sml met2 mm";
37.96
37.97 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2";
37.98 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2";
37.99 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2";
37.100 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2";
37.101 -val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2";
37.102 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2";
37.103 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "M_b L = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2";
37.104 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2";
37.105 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2";
37.106 +val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f = "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2";
37.107 case nxt of (_, Check_Postcond ["setzeRandbedingungen", "Biegelinien"]) => ()
37.108 | _ => error "biegelinie.sml met2 nn";
37.109 val (p,_,f,nxt,_,pt) = me nxt p c pt;
37.110 if nxt = ("End_Proof'", End_Proof') andalso f2str f =
37.111 -(* "[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]" *)
37.112 -"[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) /\n (-1 * EI * 24),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]"
37.113 +(* "[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]" *)
37.114 +"[0 = c_4,\n 0 =\n c_4 + L * c_3 +\n (12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) /\n (-1 * EI * 24),\n 0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]"
37.115 then () else error "biegelinie.sml met2 oo";
37.116 ============ inhibit exn WN1130722 Isabelle2012-->13 thehier? works in Test_Some=*)
37.117
38.1 --- a/test/Tools/isac/Knowledge/biegelinie-4.sml Mon Apr 19 20:44:18 2021 +0200
38.2 +++ b/test/Tools/isac/Knowledge/biegelinie-4.sml Tue Apr 20 16:58:44 2021 +0200
38.3 @@ -33,7 +33,7 @@
38.4 if p = ([], Pbl) then () else error ""
38.5 get_obj I pt (fst p); (*TODO investigate failure*)
38.6
38.7 -(* NOTE: ^^^^^^^^^^^^^^^^^ no progress already in isabisac15, but not noticed ^^^^^^^^^^^^^^^^^ * )
38.8 +(* NOTE: \<up> \<up> \<up> \<up> \<up> ^^ no progress already in isabisac15, but not noticed \<up> \<up> \<up> \<up> \<up> ^^ * )
38.9 (*[], Met*)autoCalculate 1 CompleteCalcHead;
38.10 (*[1], Pbl*)autoCalculate 1 (Steps 1); (* into SubProblem *)
38.11 (*[1], Res*)autoCalculate 1 CompleteSubpbl; (**)
38.12 @@ -63,13 +63,13 @@
38.13 val (Form f, tac, asms) = ME_Misc.pt_extract (pt, ip);
38.14
38.15 if ip = ([3, 8, 1], Res) andalso
38.16 -UnparseC.term f = "[-1 * c_4 / -1 = 0,\n (6 * c_4 * EI + 6 * L * c_3 * EI + -3 * L ^^^ 2 * c_2 + -1 * L ^^^ 3 * c) /\n (6 * EI) =\n L ^^^ 4 * q_0 / (-24 * EI),\n c_2 = 0, c_2 + L * c = L ^^^ 2 * q_0 / 2]"
38.17 +UnparseC.term f = "[-1 * c_4 / -1 = 0,\n (6 * c_4 * EI + 6 * L * c_3 * EI + -3 * L \<up> 2 * c_2 + -1 * L \<up> 3 * c) /\n (6 * EI) =\n L \<up> 4 * q_0 / (-24 * EI),\n c_2 = 0, c_2 + L * c = L \<up> 2 * q_0 / 2]"
38.18 then
38.19 case tac of
38.20 SOME (Check_Postcond ["normalise", "4x4", "LINEAR", "system"]) => ()
38.21 | _ => error "ERROR biegel.7.70 changed 1"
38.22 else error "ERROR biegel.7.70 changed 2";
38.23 -( * NOTE: ^^^^^^^^^^^^^^^^^ no progress already in isabisac15, but not noticed ^^^^^^^^^^^^^^^^^ *)
38.24 +( * NOTE: \<up> \<up> \<up> \<up> \<up> ^^ no progress already in isabisac15, but not noticed \<up> \<up> \<up> \<up> \<up> ^^ *)
38.25
38.26
38.27 "----------- IntegrierenUndKonstanteBestimmen2: Bsp.7.70. me' --------------------------------";
38.28 @@ -124,5 +124,5 @@
38.29 (tac, (pt, p)) |> me' |> me' |> me' |> me' |> me' |> me' |> me' |> me';
38.30
38.31 if p = ([2, 1, 1], Frm) andalso (Calc.current_formula (pt, p) |> UnparseC.term) =
38.32 - "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x ^^^ 2 + c / 6 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)"
38.33 + "y x =\nc_4 + c_3 * x +\n1 / (-1 * EI) *\n(c_2 / 2 * x \<up> 2 + c / 6 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)"
38.34 then () else error "";
39.1 --- a/test/Tools/isac/Knowledge/diff.sml Mon Apr 19 20:44:18 2021 +0200
39.2 +++ b/test/Tools/isac/Knowledge/diff.sml Tue Apr 20 16:58:44 2021 +0200
39.3 @@ -16,11 +16,11 @@
39.4 "----------- 1.5.02 me from script ----------------------";
39.5 "----------- primed id ----------------------------------";
39.6 "----------- diff_conv, sym_diff_conv -------------------";
39.7 -"----------- autoCalculate differentiate_on_R 2/x^2 -----";
39.8 +"----------- autoCalculate differentiate_on_R 2/x \<up> 2 -----";
39.9 "----------- autoCalculate diff after_simplification ----";
39.10 "----------- autoCalculate differentiate_equality -------";
39.11 "----------- tests for examples -------------------------";
39.12 -"------------inform for x^2+x+1 -------------------------";
39.13 +"------------inform for x \<up> 2+x+1 -------------------------";
39.14 "--------------------------------------------------------";
39.15 "--------------------------------------------------------";
39.16 "--------------------------------------------------------";
39.17 @@ -38,7 +38,7 @@
39.18 Relate=[]}:string ppc;
39.19 val chkpbt = ((map (the o (TermC.parse thy))) o P_Model.to_list) pbt;
39.20
39.21 -val org = ["functionTerm (d_d x (x ^^^ 2 + 3 * x + 4))",
39.22 +val org = ["functionTerm (d_d x (x \<up> 2 + 3 * x + 4))",
39.23 "differentiateFor x", "derivative f_f'"];
39.24 val chkorg = map (the o (TermC.parse thy)) org;
39.25
39.26 @@ -80,7 +80,7 @@
39.27 "----------- differentiate by rewrite -------------------";
39.28 "----------- differentiate by rewrite -------------------";
39.29 val thy = @{theory "Diff"};
39.30 -val ct = (Thm.term_of o the o (TermC.parse thy)) "d_d x (x ^^^ 2 + 3 * x + 4)";
39.31 +val ct = (Thm.term_of o the o (TermC.parse thy)) "d_d x (x \<up> 2 + 3 * x + 4)";
39.32 "--- 1 ---";
39.33 val thm = @{thm "diff_sum"};
39.34 val (ct, _) = the (rewrite_inst_ thy tless_true erls_diff true subst thm ct);
39.35 @@ -98,19 +98,19 @@
39.36 "--- 6 ---";
39.37 val thm = @{thm "diff_var"};
39.38 val (ct, _) = the (rewrite_inst_ thy tless_true erls_diff true subst thm ct);
39.39 -if UnparseC.term ct = "2 * x ^^^ (2 - 1) + 3 * 1 + 0" then ()
39.40 +if UnparseC.term ct = "2 * x \<up> (2 - 1) + 3 * 1 + 0" then ()
39.41 else error "diff.sml diff.behav. in rewrite 1";
39.42 "--- 7 ---";
39.43 "--- 7 ---";
39.44 val rls = Test_simplify;
39.45 -val ct = (Thm.term_of o the o (TermC.parse thy)) "2 * x ^^^ (2 - 1) + 3 * 1 + 0";
39.46 +val ct = (Thm.term_of o the o (TermC.parse thy)) "2 * x \<up> (2 - 1) + 3 * 1 + 0";
39.47 val (ct, _) = the (rewrite_set_ thy true rls ct);
39.48 if UnparseC.term ct = "3 + 2 * x" then () else error "rewrite_set_ Test_simplify 2 changed";
39.49
39.50 "----------- differentiate: me (*+ tacs input*) ---------";
39.51 "----------- differentiate: me (*+ tacs input*) ---------";
39.52 "----------- differentiate: me (*+ tacs input*) ---------";
39.53 -val fmz = ["functionTerm (x ^^^ 2 + 3 * x + 4)",
39.54 +val fmz = ["functionTerm (x \<up> 2 + 3 * x + 4)",
39.55 "differentiateFor x", "derivative f_f'"];
39.56 val (dI',pI',mI') =
39.57 ("Diff",["derivative_of", "function"],
39.58 @@ -121,7 +121,7 @@
39.59 val (p,_,f,nxt,_,pt) = me nxt p c pt;
39.60 "--- s2 ---";
39.61 (*val nxt = ("Add_Given",
39.62 -Add_Given "functionTerm (d_d x (x ^^^ #2 + #3 * x + #4))");*)
39.63 +Add_Given "functionTerm (d_d x (x \<up> #2 + #3 * x + #4))");*)
39.64 val (p,_,f,nxt,_,pt) = me nxt p c pt;
39.65 "--- s3 ---";
39.66 (*val nxt = ("Add_Given",Add_Given "differentiateFor x");*)
39.67 @@ -164,8 +164,8 @@
39.68 "--- 6 ---";
39.69 (*val nxt = ("Rewrite_Inst",Rewrite_Inst (["(''bdv'',x)"],("diff_var", "")));*)
39.70 val (p,_,f,nxt,_,pt) = me nxt p c pt;
39.71 -if f2str f = "2 * x ^^^ (2 - 1) + 3 * 1 + 0" then ()
39.72 -else error "diff.sml: diff.behav. in d_d x ^^^ 2 + 3 * x + 4";
39.73 +if f2str f = "2 * x \<up> (2 - 1) + 3 * 1 + 0" then ()
39.74 +else error "diff.sml: diff.behav. in d_d x \<up> 2 + 3 * x + 4";
39.75 "--- 7 ---";
39.76 (*val nxt = ("Rewrite_Set",Rewrite_Set "make_polynomial");*)
39.77 val (p,_,f,nxt,_,pt) = me nxt p c pt;
39.78 @@ -185,7 +185,7 @@
39.79 "----------- 1.5.02 me from script ----------------------";
39.80 "----------- 1.5.02 me from script ----------------------";
39.81 (*exp_Diff_No-1.xml*)
39.82 -val fmz = ["functionTerm (x ^^^ 2 + 3 * x + 4)",
39.83 +val fmz = ["functionTerm (x \<up> 2 + 3 * x + 4)",
39.84 "differentiateFor x", "derivative f_f'"];
39.85 val (dI',pI',mI') =
39.86 ("Diff",["derivative_of", "function"],
39.87 @@ -268,40 +268,40 @@
39.88 val subs = [(TermC.str2term "bdv", TermC.str2term "x")];
39.89 val rls = diff_conv;
39.90
39.91 -val t = TermC.str2term "2/x^^^2";
39.92 +val t = TermC.str2term "2/x \<up> 2";
39.93 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.94 -if UnparseC.term t = "2 * x ^^^ -2" then () else error "diff.sml 1/x";
39.95 +if UnparseC.term t = "2 * x \<up> -2" then () else error "diff.sml 1/x";
39.96
39.97 -val t = TermC.str2term "sqrt (x^^^3)";
39.98 +val t = TermC.str2term "sqrt (x \<up> 3)";
39.99 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.100 -if UnparseC.term t = "x ^^^ (3 / 2)" then () else error "diff.sml x^1/2";
39.101 +if UnparseC.term t = "x \<up> (3 / 2)" then () else error "diff.sml x \<up> 1/2";
39.102
39.103 -val t = TermC.str2term "2 / sqrt x^^^3";
39.104 +val t = TermC.str2term "2 / sqrt x \<up> 3";
39.105 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.106 -if UnparseC.term t = "2 * x ^^^ (-3 / 2)" then () else error"diff.sml x^-1/2";
39.107 +if UnparseC.term t = "2 * x \<up> (-3 / 2)" then () else error"diff.sml x \<up> -1/2";
39.108 val rls = diff_sym_conv;
39.109
39.110 -val t = TermC.str2term "2 * x ^^^ -2";
39.111 +val t = TermC.str2term "2 * x \<up> -2";
39.112 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.113 -if UnparseC.term t = "2 / x ^^^ 2" then () else error "diff.sml sym 1/x";
39.114 +if UnparseC.term t = "2 / x \<up> 2" then () else error "diff.sml sym 1/x";
39.115
39.116
39.117 -val t = TermC.str2term "x ^^^ (3 / 2)";
39.118 +val t = TermC.str2term "x \<up> (3 / 2)";
39.119 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.120 -if UnparseC.term t = "sqrt (x ^^^ 3)" then () else error"diff.sml sym x^1/x";
39.121 +if UnparseC.term t = "sqrt (x \<up> 3)" then () else error"diff.sml sym x \<up> 1/x";
39.122
39.123 -val t = TermC.str2term "2 * x ^^^ (-3 / 2)";
39.124 +val t = TermC.str2term "2 * x \<up> (-3 / 2)";
39.125 val SOME (t,_) = rewrite_set_inst_ thy false subs rls t; UnparseC.term t;
39.126 -if UnparseC.term t ="2 / sqrt (x ^^^ 3)"then()else error"diff.sml sym x^-1/x";
39.127 +if UnparseC.term t ="2 / sqrt (x \<up> 3)"then()else error"diff.sml sym x \<up> -1/x";
39.128
39.129
39.130 -"----------- autoCalculate differentiate_on_R 2/x^2 -----";
39.131 -"----------- autoCalculate differentiate_on_R 2/x^2 -----";
39.132 -"----------- autoCalculate differentiate_on_R 2/x^2 -----";
39.133 +"----------- autoCalculate differentiate_on_R 2/x \<up> 2 -----";
39.134 +"----------- autoCalculate differentiate_on_R 2/x \<up> 2 -----";
39.135 +"----------- autoCalculate differentiate_on_R 2/x \<up> 2 -----";
39.136 reset_states ();
39.137 CalcTree
39.138 -[(["functionTerm (x^2 + x+ 1/x + 2/x^2)",
39.139 - (*"functionTerm ((x^3)^5)",*)
39.140 +[(["functionTerm (x \<up> 2 + x+ 1/x + 2/x \<up> 2)",
39.141 + (*"functionTerm ((x \<up> 3) \<up> 5)",*)
39.142 "differentiateFor x", "derivative f_f'"],
39.143 ("Isac_Knowledge", ["derivative_of", "function"],
39.144 ["diff", "differentiate_on_R"]))];
39.145 @@ -310,13 +310,13 @@
39.146 autoCalculate 1 CompleteCalc;
39.147 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
39.148 if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) =
39.149 - "1 + 2 * x + -1 / x ^^^ 2 + -4 / x ^^^ 3" then ()
39.150 -else error "diff.sml: differentiate_on_R 2/x^2 changed";
39.151 + "1 + 2 * x + -1 / x \<up> 2 + -4 / x \<up> 3" then ()
39.152 +else error "diff.sml: differentiate_on_R 2/x \<up> 2 changed";
39.153
39.154 "---------------------------------------------------------";
39.155 reset_states ();
39.156 CalcTree
39.157 -[(["functionTerm (x^3 * x^5)",
39.158 +[(["functionTerm (x \<up> 3 * x \<up> 5)",
39.159 "differentiateFor x", "derivative f_f'"],
39.160 ("Isac_Knowledge", ["derivative_of", "function"],
39.161 ["diff", "differentiate_on_R"]))];
39.162 @@ -329,15 +329,15 @@
39.163 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
39.164
39.165 if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) =
39.166 - "8 * x ^^^ 7" then ()
39.167 -else error "diff.sml: differentiate_on_R (x^3 * x^5) changed";
39.168 + "8 * x \<up> 7" then ()
39.169 +else error "diff.sml: differentiate_on_R (x \<up> 3 * x \<up> 5) changed";
39.170
39.171 "----------- autoCalculate diff after_simplification ----";
39.172 "----------- autoCalculate diff after_simplification ----";
39.173 "----------- autoCalculate diff after_simplification ----";
39.174 reset_states ();
39.175 CalcTree
39.176 -[(["functionTerm (x^3 * x^5)",
39.177 +[(["functionTerm (x \<up> 3 * x \<up> 5)",
39.178 "differentiateFor x", "derivative f_f'"],
39.179 ("Isac_Knowledge", ["derivative_of", "function"],
39.180 ["diff", "after_simplification"]))];
39.181 @@ -351,13 +351,13 @@
39.182 LItool.trace_on := false;
39.183 *)
39.184 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
39.185 -if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) = "8 * x ^^^ 7"
39.186 +if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) = "8 * x \<up> 7"
39.187 then () else error "biegelinie.sml: 1st biegelin.7.27 changed";
39.188
39.189 "--------------------------------------------------------";
39.190 reset_states ();
39.191 CalcTree
39.192 -[(["functionTerm ((x^3)^5)",
39.193 +[(["functionTerm ((x \<up> 3) \<up> 5)",
39.194 "differentiateFor x", "derivative f_f'"],
39.195 ("Isac_Knowledge", ["derivative_of", "function"],
39.196 ["diff", "after_simplification"]))];
39.197 @@ -365,7 +365,7 @@
39.198 moveActiveRoot 1;
39.199 autoCalculate 1 CompleteCalc;
39.200 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
39.201 -if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) = "15 * x ^^^ 14"
39.202 +if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) = "15 * x \<up> 14"
39.203 then () else error "biegelinie.sml: 1st biegelin.7.27 changed";
39.204
39.205 "----------- autoCalculate differentiate_equality -------";
39.206 @@ -385,21 +385,21 @@
39.207 "----------- tests for examples -------------------------";
39.208 "----------- tests for examples -------------------------";
39.209 "----- TermC.parse errors";
39.210 -(*TermC.str2term "F = sqrt( y^^^2 - O) * (z + O^^^2)";
39.211 +(*TermC.str2term "F = sqrt( y \<up> 2 - O) * (z + O \<up> 2)";
39.212 TermC.str2term "O";
39.213 TermC.str2term "OO"; ---errors*)
39.214 TermC.str2term "OOO";
39.215
39.216 "----- thm 'diff_prod_const'";
39.217 val subs = [(TermC.str2term "bdv", TermC.str2term "l")];
39.218 -val f = TermC.str2term "G' = d_d l (l * sqrt (7 * s ^^^ 2 - l ^^^ 2))";
39.219 +val f = TermC.str2term "G' = d_d l (l * sqrt (7 * s \<up> 2 - l \<up> 2))";
39.220
39.221 -"------------inform for x^2+x+1 -------------------------";
39.222 -"------------inform for x^2+x+1 -------------------------";
39.223 -"------------inform for x^2+x+1 -------------------------";
39.224 +"------------inform for x \<up> 2+x+1 -------------------------";
39.225 +"------------inform for x \<up> 2+x+1 -------------------------";
39.226 +"------------inform for x \<up> 2+x+1 -------------------------";
39.227 reset_states ();
39.228 CalcTree
39.229 -[(["functionTerm (x^2 + x + 1)",
39.230 +[(["functionTerm (x \<up> 2 + x + 1)",
39.231 "differentiateFor x", "derivative f_f'"],
39.232 ("Isac_Knowledge", ["derivative_of", "function"],
39.233 ["diff", "differentiate_on_R"]))];
39.234 @@ -413,5 +413,5 @@
39.235 appendFormula 1 "2*x + d_d x x + d_d x 1" (*|> Future.join*);
39.236 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
39.237 if existpt' ([3], Res) pt then ()
39.238 -else error "diff.sml: inform d_d x (x^2 + x + 1) doesnt work";
39.239 +else error "diff.sml: inform d_d x (x \<up> 2 + x + 1) doesnt work";
39.240
40.1 --- a/test/Tools/isac/Knowledge/diffapp.sml Mon Apr 19 20:44:18 2021 +0200
40.2 +++ b/test/Tools/isac/Knowledge/diffapp.sml Tue Apr 20 16:58:44 2021 +0200
40.3 @@ -36,8 +36,8 @@
40.4 val fmz =
40.5 ["fixedValues [r=Arbfix]", "maximum A",
40.6 "valuesFor [a,b]",
40.7 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
40.8 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
40.9 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.10 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.11 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
40.12
40.13 "boundVariable a", "boundVariable b", "boundVariable alpha",
40.14 @@ -56,7 +56,7 @@
40.15 map (the o (parseold thy)) pbt;
40.16 val fmz12 =
40.17 ["functionOf A", "boundVariable a", "boundVariable b",
40.18 - "equalities [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
40.19 + "equalities [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.20 (*28.11.00: "functionTerm (A_0=Undef)"*)"functionTerm (Undef)"];
40.21 map (the o (parseold thy)) fmz12;
40.22 val fmz3 =
40.23 @@ -69,7 +69,7 @@
40.24 ["equality e_e", "solveFor v_v", "solutions v_i_i"];
40.25 map (the o (parseold thy)) pbt;
40.26 val fmz =
40.27 - ["equality ((a/2)^^^2 + (b/2)^^^2 = r^^^2)",
40.28 + ["equality ((a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2)",
40.29 "solveFor b", "solutions b_i"];
40.30 map (the o (parseold thy)) fmz;
40.31 " ---- [on_interval,maximum_of,function] ---- ";
40.32 @@ -78,10 +78,10 @@
40.33 "errorBound err_r", "maxArgument v_0"];
40.34 map (the o (parseold thy)) pbt;
40.35 val fmz12 =
40.36 - [(*28.11.00: "functionTerm (A_0 = a*sqrt(#4*r^^^#2 - a^^^#2))",*)
40.37 - "functionTerm (a*sqrt(4*r^^^2 - a^^^2))",
40.38 - (*28.11.00: "functionTerm (A_0 = b*sqrt(#4*r^^^#2 - b^^^#2))",*)
40.39 - "functionTerm (b*sqrt(4*r^^^2 - b^^^2))",
40.40 + [(*28.11.00: "functionTerm (A_0 = a*sqrt(#4*r \<up> #2 - a \<up> #2))",*)
40.41 + "functionTerm (a*sqrt(4*r \<up> 2 - a \<up> 2))",
40.42 + (*28.11.00: "functionTerm (A_0 = b*sqrt(#4*r \<up> #2 - b \<up> #2))",*)
40.43 + "functionTerm (b*sqrt(4*r \<up> 2 - b \<up> 2))",
40.44 "boundVariable a", "boundVariable b",
40.45 "interval {x::real. 0 <= x & x <= 2*r}",
40.46 "errorBound (eps=0)", "maxArgument (a_0=Undef)"];
40.47 @@ -98,8 +98,8 @@
40.48 ["functionTerm f_f", "boundVariable v_v", "derivative f_f'"];
40.49 map (the o (parseold thy)) pbt;
40.50 val fmz =
40.51 - [(*28.11.00: "functionTerm (A_0=a*#2*sqrt r^^^#2 - (a//#2)^^^#2)",*)
40.52 - "functionTerm (a*2*sqrt r^^^2 - (a/2)^^^2)",
40.53 + [(*28.11.00: "functionTerm (A_0=a*#2*sqrt r \<up> #2 - (a//#2) \<up> #2)",*)
40.54 + "functionTerm (a*2*sqrt r \<up> 2 - (a/2) \<up> 2)",
40.55 "boundVariable a",
40.56 (*28.11.00: "derivative (A_0'=Undef)"*)"derivative (Undef)"];
40.57 map (the o (parseold thy)) fmz;
40.58 @@ -110,11 +110,11 @@
40.59 map (the o (parseold thy)) pbt;
40.60 val fmz1 =
40.61 ["maxArgument (a_0=(srqt 2)*r)",
40.62 - (*28.11.00: "functionTerm (A_0=a*#2*sqrt r^^^#2 - (a//#2)^^^#2)",*)
40.63 - "functionTerm (a*2*sqrt r^^^2 - (a/2)^^^2)",
40.64 + (*28.11.00: "functionTerm (A_0=a*#2*sqrt r \<up> #2 - (a//#2) \<up> #2)",*)
40.65 + "functionTerm (a*2*sqrt r \<up> 2 - (a/2) \<up> 2)",
40.66 "boundVariable a",
40.67 "valuesFor [a,b]", "maximum A",
40.68 - "additionalRels [(a/2)^^^2 + (b/2)^^^2 = r^^^2]"];
40.69 + "additionalRels [(a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]"];
40.70 map (the o (parseold thy)) fmz1;
40.71
40.72 === inhibit exn 110722=============================================================*)
40.73 @@ -135,7 +135,7 @@
40.74 (*
40.75 val (mI,m) = ("Init_Proof",Init_Proof (fmz, (dI',pI',mI')));
40.76 val ((p,p_),_,_,_,_,(_,pt,_)) = CalcTreeTEST [fmz, (dI',pI',mI')))];
40.77 - --^^^-- ausgeliehen von test-root-equ/sml *)
40.78 + -- \<up> -- ausgeliehen von test-root-equ/sml *)
40.79 (*-------------- 9.6.03 --- cappend_ ... term -------irreparabler test
40.80 val (pt,_) =
40.81 cappend_problem EmptyPtree [] loc ([],(dI',pI',mI'), .....);
40.82 @@ -189,37 +189,37 @@
40.83
40.84 val pos = (lev_on o lev_dn) pos;
40.85 (*val pos = ([4,1,1]) *)
40.86 -val (pt,_) = cappend_parent(*pbl*) pt pos loc"f_x = d/dx x^3 ..."
40.87 +val (pt,_) = cappend_parent(*pbl*) pt pos loc"f_x = d/dx x \<up> 3 ..."
40.88 Empty_Tac TransitiveB;
40.89 val pos = (lev_on o lev_dn) pos;
40.90 (*val pos = ([4,1,1,1]) *)
40.91 -val (pt,_) = cappend_parent pt pos loc "d/dx x^3 ..."
40.92 +val (pt,_) = cappend_parent pt pos loc "d/dx x \<up> 3 ..."
40.93 Empty_Tac TransitiveB;
40.94 val pos = (lev_on o lev_dn) pos;
40.95 (*val pos = ([4,1,1,1,1]) *)
40.96 -val (pt,_) = cappend_atomic pt pos loc "d/dx x^3 ..."
40.97 - Empty_Tac ("[4,1,1,1,1]:3x^2 + d/dx ...",[]) Complete;
40.98 +val (pt,_) = cappend_atomic pt pos loc "d/dx x \<up> 3 ..."
40.99 + Empty_Tac ("[4,1,1,1,1]:3x \<up> 2 + d/dx ...",[]) Complete;
40.100 val pos = lev_on pos;
40.101 (*val pos = ([4,1,1,1,2]) *)
40.102 -val (pt,_) = cappend_atomic pt pos loc "3x^2 + d/dx ..."
40.103 - Empty_Tac ("[4,1,1,1,2]:3x^2 + 0 + d/dx ...",[]) Complete;
40.104 +val (pt,_) = cappend_atomic pt pos loc "3x \<up> 2 + d/dx ..."
40.105 + Empty_Tac ("[4,1,1,1,2]:3x \<up> 2 + 0 + d/dx ...",[]) Complete;
40.106 val pos = lev_on pos;
40.107 (*pos = ([4,1,1,1,3]) *)
40.108 -val (pt,_) = cappend_atomic pt pos loc "3x^2 + 0 + d/dx ..."
40.109 - Empty_Tac ("[4,1,1,1,3]:3x^2 + 0 -3 ...",[]) Complete;
40.110 +val (pt,_) = cappend_atomic pt pos loc "3x \<up> 2 + 0 + d/dx ..."
40.111 + Empty_Tac ("[4,1,1,1,3]:3x \<up> 2 + 0 -3 ...",[]) Complete;
40.112 "--- 1 ---";
40.113 val pos = lev_up pos;
40.114 (*pos = ([4,1,1,1]) *)
40.115 -val (pt,_) = append_result pt pos Istate.empty ("[4,1,1,1#]:3x^2 -3.",[])Complete;
40.116 +val (pt,_) = append_result pt pos Istate.empty ("[4,1,1,1#]:3x \<up> 2 -3.",[])Complete;
40.117 "--- 2 ---";
40.118 val pos = lev_up pos;
40.119 (*val pos = ([4,1,1]) *)
40.120 -val (pt,_) = append_result pt pos Istate.empty ("[4,1,1#]:found 3x^2 -3 ...",[])
40.121 +val (pt,_) = append_result pt pos Istate.empty ("[4,1,1#]:found 3x \<up> 2 -3 ...",[])
40.122 Complete;
40.123 "--- 3 ---";
40.124 val pos = lev_on pos;
40.125 (*val pos = ([4,1,2]+) *)
40.126 -val (pt,_) = cappend_parent(*pbl*) pt pos loc "f_y = d/dy x^3 ..."
40.127 +val (pt,_) = cappend_parent(*pbl*) pt pos loc "f_y = d/dy x \<up> 3 ..."
40.128 Empty_Tac TransitiveB;
40.129 "--- 4 ---";
40.130 writeln (pr_ctree pr_short pt);
40.131 @@ -235,12 +235,12 @@
40.132 3.2. {(a,b). f_x & f_xx } cup..
40.133 4. {(a,b). f_x ..} cup ...
40.134 4.1. set_1 = ...
40.135 -4.1.1. f_x = d/dx x^3 ...
40.136 -4.1.1.1. d/dx x^3 ...
40.137 -4.1.1.1.1. d/dx x^3 ...
40.138 -4.1.1.1.2. 3x^2 + d/dx ...
40.139 -4.1.1.1.3. 3x^2 + 0 + d/dx ...
40.140 -4.1.2. f_y = d/dy x^3 ...
40.141 +4.1.1. f_x = d/dx x \<up> 3 ...
40.142 +4.1.1.1. d/dx x \<up> 3 ...
40.143 +4.1.1.1.1. d/dx x \<up> 3 ...
40.144 +4.1.1.1.2. 3x \<up> 2 + d/dx ...
40.145 +4.1.1.1.3. 3x \<up> 2 + 0 + d/dx ...
40.146 +4.1.2. f_y = d/dy x \<up> 3 ...
40.147
40.148 use"test-max-surf1.sml";
40.149 *)
40.150 @@ -254,8 +254,8 @@
40.151 val fmz =
40.152 ["fixedValues [r=Arbfix]", "maximum A",
40.153 "valuesFor [a,b]",
40.154 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
40.155 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
40.156 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.157 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.158 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
40.159
40.160 "boundVariable a", "boundVariable b", "boundVariable alpha",
40.161 @@ -332,11 +332,11 @@
40.162 stac= Substitute
40.163 [(b, (rhs o hd)
40.164 (Subproblem (thy, [normalise, polynomial, univariate, equation])))]
40.165 - (hd (filterVar A [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]))
40.166 + (hd (filterVar A [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]))
40.167 *** tac_from_prog TODO: no match for Substitute
40.168 *** [(b, (rhs o hd)
40.169 *** (Subproblem (thy, [normalise, polynomial, univariate, equation])))]
40.170 -*** (hd (filterVar A [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]))
40.171 +*** (hd (filterVar A [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]))
40.172 Exception- ERROR raised
40.173
40.174 ############################################################################
40.175 @@ -405,8 +405,8 @@
40.176 val fmz =
40.177 ["fixedValues [r=Arbfix]", "maximum A",
40.178 "valuesFor [a,b]",
40.179 - "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
40.180 - "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
40.181 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.182 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
40.183 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
40.184
40.185 "boundVariable a", "boundVariable b", "boundVariable alpha",
40.186 @@ -441,7 +441,7 @@
40.187 *)
40.188 (*FIXME: the environments contain identifers, and NOT values ?!?!?*)
40.189 (* WN051209 while extending 'fun step' for initac, this became better ...
40.190 - if I_Model.to_string ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(r_s, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]" then ()
40.191 + if I_Model.to_string ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] ,(r_s, [[A = a * b],[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]" then ()
40.192 else error "diffapp.sml: diff.behav. in autoCalc .. scripts for max 1";
40.193 *)
40.194
40.195 @@ -470,7 +470,7 @@
40.196 val m_m = (TermC.str2term "m_m::real",
40.197 TermC.str2term "A");
40.198 val r_s = (TermC.str2term "rs_s::bool list",
40.199 - TermC.str2term "[A = a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]");
40.200 + TermC.str2term "[A = a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]");
40.201 val v_v = (TermC.str2term "v_v::real",
40.202 TermC.str2term "b");
40.203 val itv_v = (TermC.str2term "itv_v::real set",
40.204 @@ -483,7 +483,7 @@
40.205 val t = TermC.str2term "(hd o (filterVar m_m)) (r_s::bool list)";
40.206 val s = subst_atomic env t;
40.207 UnparseC.term s;
40.208 -"(hd o filterVar A) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
40.209 +"(hd o filterVar A) [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]";
40.210 (*=== inhibit exn 110726=============================================================
40.211 val SOME (s',_) = rewrite_set_ thy false prog_expr s;
40.212 val s'' = UnparseC.term s';
40.213 @@ -495,7 +495,7 @@
40.214 val t = TermC.str2term "1 < length_h (r_s::bool list)";
40.215 val s = subst_atomic env t;
40.216 UnparseC.term s;
40.217 -"1 < length_h [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
40.218 +"1 < length_h [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]";
40.219 (*=== inhibit exn 110726=============================================================
40.220 val SOME (s',_) = rewrite_set_ thy false prog_expr s;
40.221 val s'' = UnparseC.term s';
40.222 @@ -510,22 +510,22 @@
40.223 \ else (hd r_s))";
40.224 val s = subst_atomic env t;
40.225 UnparseC.term s;
40.226 -"if 1 < length_h [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]\
40.227 +"if 1 < length_h [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]\
40.228 \then SubProblem (Reals_s, [make, function], [no_met])\
40.229 \ [REAL A, REAL b,\
40.230 -\ BOOL_LIST [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]\
40.231 -\else hd [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
40.232 +\ BOOL_LIST [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]\
40.233 +\else hd [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]";
40.234 (*=== inhibit exn 110726=============================================================
40.235 val SOME (s',_) = rewrite_set_ thy false prog_expr s;
40.236 val s'' = UnparseC.term s';
40.237 if s'' =
40.238 "SubProblem (Reals_s, [make, function], [no_met])\n\
40.239 \ [REAL A, REAL b,\n\
40.240 -\ BOOL_LIST [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]" then ()
40.241 +\ BOOL_LIST [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]" then ()
40.242 else error "new behaviour with prog_expr 1.3.";
40.243 === inhibit exn 110726=============================================================*)
40.244 val env = env @ [(TermC.str2term "t_t::bool",
40.245 - TermC.str2term "A = (2*sqrt(r^^^2-(b/2)^^^2)) * b")];
40.246 + TermC.str2term "A = (2*sqrt(r \<up> 2-(b/2) \<up> 2)) * b")];
40.247
40.248
40.249
40.250 @@ -547,7 +547,7 @@
40.251 val v_v = (TermC.str2term "v_v::real",
40.252 TermC.str2term "b");
40.253 val eqs=(TermC.str2term "eqs::bool list",
40.254 - TermC.str2term "[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]");
40.255 + TermC.str2term "[A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]");
40.256 val env = [f_f, v_v, eqs];
40.257
40.258 (*--- 1.line in script ---*)
40.259 @@ -555,7 +555,7 @@
40.260 val s = subst_atomic env t;
40.261 UnparseC.term s;
40.262 val t = TermC.str2term
40.263 - "(hd o filterVar b) [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]";
40.264 + "(hd o filterVar b) [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]";
40.265 val SOME (t',_) = rewrite_set_ thy false prog_expr t;
40.266 val s' = UnparseC.term t';
40.267 (*=== inhibit exn 110726=============================================================
40.268 @@ -569,13 +569,13 @@
40.269 UnparseC.term s;
40.270 val t = TermC.str2term
40.271 "hd (dropWhile (ident (A = a * b))\
40.272 - \ [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2])";
40.273 + \ [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2])";
40.274 (*=== inhibit exn 110726=============================================================
40.275 mem_rls "dropWhile_Cons" prog_expr;
40.276 mem_rls "Prog_Expr.ident" prog_expr;
40.277 val SOME (t',_) = rewrite_set_ thy false prog_expr t;
40.278 val s' = UnparseC.term t';
40.279 -if s' = "(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2" then ()
40.280 +if s' = "(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2" then ()
40.281 else error "new behaviour with prog_expr 2.2";
40.282 === inhibit exn 110726=============================================================*)
40.283 val env = env @ [(TermC.str2term "e_1::bool", TermC.str2term s')];
40.284 @@ -610,22 +610,22 @@
40.285 val s = subst_atomic env t;
40.286 UnparseC.term s;
40.287 "SubProblem (Reals_s, [univar, equation], [no_met])\n\
40.288 -\ [BOOL ((a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2), REAL a]";
40.289 +\ [BOOL ((a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2), REAL a]";
40.290 val env = env @ [(TermC.str2term "s_1::bool list",
40.291 - TermC.str2term "[a = 2 * sqrt (r^^^2 - (b/2)^^^2)]")];
40.292 + TermC.str2term "[a = 2 * sqrt (r \<up> 2 - (b/2) \<up> 2)]")];
40.293
40.294 (*--- 6.line in script ---*)
40.295 val t = TermC.str2term "Substitute [(v_1 = (rhs o hd) (s_1::bool list))] (h_h::bool)";
40.296 val s = subst_atomic env t;
40.297 UnparseC.term s;
40.298 val t = TermC.str2term
40.299 -"Substitute [(a = (rhs o hd) [a = 2 * sqrt (r ^^^ 2 - (b / 2) ^^^ 2)])]\n\
40.300 +"Substitute [(a = (rhs o hd) [a = 2 * sqrt (r \<up> 2 - (b / 2) \<up> 2)])]\n\
40.301 \ (A = a * b)";
40.302 (*=== inhibit exn 110726=============================================================
40.303 mem_rls "Prog_Expr.rhs" prog_expr;
40.304 val SOME (t',_) = rewrite_set_ thy false prog_expr t;
40.305 val s' = UnparseC.term t';
40.306 -if s' = "Substitute [a = 2 * sqrt (r ^^^ 2 - (b / 2) ^^^ 2)] (A = a * b)"
40.307 +if s' = "Substitute [a = 2 * sqrt (r \<up> 2 - (b / 2) \<up> 2)] (A = a * b)"
40.308 then () else error "new behaviour with prog_expr 2.6.";
40.309 === inhibit exn 110726=============================================================*)
40.310
41.1 --- a/test/Tools/isac/Knowledge/eqsystem.sml Mon Apr 19 20:44:18 2021 +0200
41.2 +++ b/test/Tools/isac/Knowledge/eqsystem.sml Tue Apr 20 16:58:44 2021 +0200
41.3 @@ -32,7 +32,7 @@
41.4 "----------- occur_exactly_in ------------------------------------";
41.5 "----------- occur_exactly_in ------------------------------------";
41.6 val all = [TermC.str2term"c", TermC.str2term"c_2", TermC.str2term"c_3"];
41.7 -val t = TermC.str2term"0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2";
41.8 +val t = TermC.str2term"0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2";
41.9
41.10 if occur_exactly_in [TermC.str2term"c", TermC.str2term"c_2"] all t
41.11 then () else error "eqsystem.sml occur_exactly_in 1";
41.12 @@ -43,25 +43,25 @@
41.13 if not (occur_exactly_in [TermC.str2term"c_2"] all t)
41.14 then () else error "eqsystem.sml occur_exactly_in 3";
41.15
41.16 -val t = TermC.str2term"[c,c_2] from [c,c_2,c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2";
41.17 +val t = TermC.str2term"[c,c_2] from [c,c_2,c_3] occur_exactly_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2";
41.18 eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0;
41.19 val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0;
41.20 if str = "[c, c_2] from [c, c_2,\n" ^
41.21 - " c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = True"
41.22 + " c_3] occur_exactly_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2 = True"
41.23 then () else error "eval_occur_exactly_in [c, c_2]";
41.24
41.25 val t = TermC.str2term ("[c,c_2,c_3] from [c,c_2,c_3] occur_exactly_in " ^
41.26 - "-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2");
41.27 + "-1 * q_0 * L \<up> 2 / 2 + L * c + c_2");
41.28 val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0;
41.29 if str = "[c, c_2,\n c_3] from [c, c_2,\n" ^
41.30 -" c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False"
41.31 +" c_3] occur_exactly_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2 = False"
41.32 then () else error "eval_occur_exactly_in [c, c_2, c_3]";
41.33
41.34 val t = TermC.str2term"[c_2] from [c,c_2,c_3] occur_exactly_in \
41.35 - \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2";
41.36 + \-1 * q_0 * L \<up> 2 / 2 + L * c + c_2";
41.37 val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0;
41.38 if str = "[c_2] from [c, c_2,\n" ^
41.39 - " c_3] occur_exactly_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False"
41.40 + " c_3] occur_exactly_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2 = False"
41.41 then () else error "eval_occur_exactly_in [c, c_2, c_3]";
41.42
41.43 val t = TermC.str2term"[] from [c,c_2,c_3] occur_exactly_in 0";
41.44 @@ -71,10 +71,10 @@
41.45
41.46 val t =
41.47 TermC.str2term
41.48 - "[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L ^^^ 2) /2";
41.49 + "[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L \<up> 2) /2";
41.50 val SOME (str, t') = eval_occur_exactly_in 0 "EqSystem.occur'_exactly'_in" t 0;
41.51 if str = "[] from [c, c_2, c_3, c_4] occur_exactly_in \
41.52 - \-1 * (q_0 * L ^^^ 2) / 2 = True" then ()
41.53 + \-1 * (q_0 * L \<up> 2) / 2 = True" then ()
41.54 else error "eval_occur_exactly_in [c, c_2, c_3, c_4]";
41.55
41.56 "----------- problems --------------------------------------------";
41.57 @@ -117,15 +117,15 @@
41.58 "----------- rewrite-order ord_simplify_System -------------------";
41.59 "----------- rewrite-order ord_simplify_System -------------------";
41.60 "----------- rewrite-order ord_simplify_System -------------------";
41.61 -"M_b x = c * x + -1 * q_0 * (x ^^^ 2 / 2) + c_2";
41.62 +"M_b x = c * x + -1 * q_0 * (x \<up> 2 / 2) + c_2";
41.63 "--- add.commute ---"; (* ... add.commute cf. b42e334c97ee *)
41.64 -if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x ^^^ 2 / 2)",
41.65 +if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x \<up> 2 / 2)",
41.66 TermC.str2term"c * x") then ()
41.67 -else error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c * x) not#1";
41.68 +else error "integrate.sml, (-1 * q_0 * (x \<up> 2 / 2)) < (c * x) not#1";
41.69
41.70 -if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x ^^^ 2 / 2)",
41.71 +if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x \<up> 2 / 2)",
41.72 TermC.str2term"c_2") then ()
41.73 -else error "integrate.sml, (-1 * q_0 * (x ^^^ 2 / 2)) < (c_2) not#2";
41.74 +else error "integrate.sml, (-1 * q_0 * (x \<up> 2 / 2)) < (c_2) not#2";
41.75
41.76 if ord_simplify_System false thy [] (TermC.str2term"c * x",
41.77 TermC.str2term"c_2") then ()
41.78 @@ -136,36 +136,36 @@
41.79 TermC.str2term"c * x") then ()
41.80 else error "integrate.sml, (x * c) < (c * x) not#4";
41.81
41.82 -if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x ^^^ 2 / 2) * c",
41.83 - TermC.str2term"-1 * q_0 * c * (x ^^^ 2 / 2)")
41.84 +if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x \<up> 2 / 2) * c",
41.85 + TermC.str2term"-1 * q_0 * c * (x \<up> 2 / 2)")
41.86 then () else error "integrate.sml, (. * .) < (. * .) not#5";
41.87
41.88 -if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x ^^^ 2 / 2) * c",
41.89 - TermC.str2term"c * -1 * q_0 * (x ^^^ 2 / 2)")
41.90 +if ord_simplify_System false thy [] (TermC.str2term"-1 * q_0 * (x \<up> 2 / 2) * c",
41.91 + TermC.str2term"c * -1 * q_0 * (x \<up> 2 / 2)")
41.92 then () else error "integrate.sml, (. * .) < (. * .) not#6";
41.93
41.94
41.95 "----------- rewrite in [EqSystem,normalise,2x2] -----------------";
41.96 "----------- rewrite in [EqSystem,normalise,2x2] -----------------";
41.97 "----------- rewrite in [EqSystem,normalise,2x2] -----------------";
41.98 -val t = TermC.str2term"[0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2,\
41.99 - \0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2]";
41.100 +val t = TermC.str2term"[0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2,\
41.101 + \0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2]";
41.102 val bdvs = [(TermC.str2term"bdv_1",TermC.str2term"c"),
41.103 (TermC.str2term"bdv_2",TermC.str2term"c_2")];
41.104 val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t;
41.105 -if UnparseC.term t = "[0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c + c_2), 0 = c_2]"
41.106 +if UnparseC.term t = "[0 = -1 * q_0 * L \<up> 2 / 2 + (L * c + c_2), 0 = c_2]"
41.107 then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.1";
41.108
41.109 val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t;
41.110 -if UnparseC.term t = "[L * c + c_2 = 0 + -1 * (-1 * q_0 * L ^^^ 2 / 2), c_2 = 0]"then () else error "eqsystem.sml rewrite in 2x2 isolate_bdvs";
41.111 +if UnparseC.term t = "[L * c + c_2 = 0 + -1 * (-1 * q_0 * L \<up> 2 / 2), c_2 = 0]"then () else error "eqsystem.sml rewrite in 2x2 isolate_bdvs";
41.112
41.113 val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System t;
41.114 -if UnparseC.term t = "[L * c + c_2 = q_0 * L ^^^ 2 / 2, c_2 = 0]"
41.115 +if UnparseC.term t = "[L * c + c_2 = q_0 * L \<up> 2 / 2, c_2 = 0]"
41.116 then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.2";
41.117
41.118 "--- 3--- see EqSystem.thy (*..if replaced by 'and' ...";
41.119 val SOME (t,_) = rewrite_set_ thy true order_system t;
41.120 -if UnparseC.term t = "[c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]"
41.121 +if UnparseC.term t = "[c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]"
41.122 then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.3";
41.123 "--- 4---";
41.124
41.125 @@ -174,28 +174,28 @@
41.126 "----------- rewrite example from 2nd [EqSystem,normalise,2x2] ---";
41.127 val thy = @{theory "Isac_Knowledge"} (*because of Undeclared constant "Biegelinie.EI*);
41.128 val t =
41.129 - TermC.str2term"[0 = c_2 + c * 0 + 1 / EI * (L * q_0 / 12 * 0 ^^^ 3 + \
41.130 - \ -1 * q_0 / 24 * 0 ^^^ 4),\
41.131 - \ 0 = c_2 + c * L + 1 / EI * (L * q_0 / 12 * L ^^^ 3 + \
41.132 - \ -1 * q_0 / 24 * L ^^^ 4)]";
41.133 + TermC.str2term"[0 = c_2 + c * 0 + 1 / EI * (L * q_0 / 12 * 0 \<up> 3 + \
41.134 + \ -1 * q_0 / 24 * 0 \<up> 4),\
41.135 + \ 0 = c_2 + c * L + 1 / EI * (L * q_0 / 12 * L \<up> 3 + \
41.136 + \ -1 * q_0 / 24 * L \<up> 4)]";
41.137 val SOME (t,_) = rewrite_set_ thy true norm_Rational t;
41.138 if UnparseC.term t =
41.139 - "[0 = c_2, 0 = (24 * c_2 * EI + 24 * L * c * EI + L ^^^ 4 * q_0) / (24 * EI)]"
41.140 + "[0 = c_2,\n 0 = (24 * c_2 * EI + 24 * L * c * EI + L \<up> 4 * q_0) / (24 * EI)]"
41.141 then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.0b";
41.142
41.143 val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t;
41.144 -if UnparseC.term t = (*"[0 = 0 / EI + c_2, 0 = q_0 * L ^^^ 4 / (24 * EI) + (L * c + c_2)]"*)
41.145 - "[0 = c_2, 0 = q_0 * L ^^^ 4 / (24 * EI) + (L * c + c_2)]"
41.146 +if UnparseC.term t = (*"[0 = 0 / EI + c_2, 0 = q_0 * L \<up> 4 / (24 * EI) + (L * c + c_2)]"*)
41.147 + "[0 = c_2, 0 = q_0 * L \<up> 4 / (24 * EI) + (L * c + c_2)]"
41.148 then () else error "eqsystem.sml rewrite in 2x2 simplify_System_par.1b";
41.149
41.150 val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t;
41.151 -if UnparseC.term t = (*"[c_2 = 0 + -1 * (0 / EI),\n L * c + c_2 = 0 + -1 * (q_0 * L ^^^ 4 / (24 * EI))]"*)
41.152 - "[c_2 = 0, L * c + c_2 = 0 + -1 * (q_0 * L ^^^ 4 / (24 * EI))]"
41.153 +if UnparseC.term t = (*"[c_2 = 0 + -1 * (0 / EI),\n L * c + c_2 = 0 + -1 * (q_0 * L \<up> 4 / (24 * EI))]"*)
41.154 + "[c_2 = 0, L * c + c_2 = 0 + -1 * (q_0 * L \<up> 4 / (24 * EI))]"
41.155 then () else error "eqsystem.sml rewrite in 2x2 isolate_bdvs b";
41.156
41.157 val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System t;
41.158 -if UnparseC.term t = (*"[c_2 = 0 / EI, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (24 * EI)]"*)
41.159 - "[c_2 = 0, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (24 * EI)]"
41.160 +if UnparseC.term t = (*"[c_2 = 0 / EI, L * c + c_2 = -1 * q_0 * L \<up> 4 / (24 * EI)]"*)
41.161 + "[c_2 = 0, L * c + c_2 = -1 * q_0 * L \<up> 4 / (24 * EI)]"
41.162 then () else error "eqsystem.sml rewrite in 2x2 simplify_System.2b";
41.163
41.164 val xxx = rewrite_set_ thy true order_system t;
41.165 @@ -207,31 +207,31 @@
41.166 "----------- rewrite in [EqSystem,top_down_substitution,2x2] -----";
41.167 "----------- rewrite in [EqSystem,top_down_substitution,2x2] -----";
41.168 val e1__ = TermC.str2term "c_2 = 77";
41.169 -val e2__ = TermC.str2term "L * c + c_2 = q_0 * L ^^^ 2 / 2";
41.170 +val e2__ = TermC.str2term "L * c + c_2 = q_0 * L \<up> 2 / 2";
41.171 val bdvs = [(TermC.str2term"bdv_1",TermC.str2term"c"),
41.172 (TermC.str2term"bdv_2",TermC.str2term"c_2")];
41.173 val SOME (e2__,_) = rewrite_terms_ thy dummy_ord Rule_Set.Empty [e1__] e2__;
41.174 -if UnparseC.term e2__ = "L * c + 77 = q_0 * L ^^^ 2 / 2" then ()
41.175 +if UnparseC.term e2__ = "L * c + 77 = q_0 * L \<up> 2 / 2" then ()
41.176 else error "eqsystem.sml top_down_substitution,2x2] subst";
41.177
41.178 val SOME (e2__,_) =
41.179 rewrite_set_inst_ thy true bdvs simplify_System_parenthesized e2__;
41.180 -if UnparseC.term e2__ = "77 + L * c = q_0 * L ^^^ 2 / 2" then ()
41.181 +if UnparseC.term e2__ = "77 + L * c = q_0 * L \<up> 2 / 2" then ()
41.182 else error "eqsystem.sml top_down_substitution,2x2] simpl_par";
41.183
41.184 val SOME (e2__,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs e2__;
41.185 -if UnparseC.term e2__ = "c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L" then ()
41.186 +if UnparseC.term e2__ = "c = (q_0 * L \<up> 2 / 2 + -1 * 77) / L" then ()
41.187 else error "eqsystem.sml top_down_substitution,2x2] isolate";
41.188
41.189 -val t = TermC.str2term "[c_2 = 77, c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L]";
41.190 +val t = TermC.str2term "[c_2 = 77, c = (q_0 * L \<up> 2 / 2 + -1 * 77) / L]";
41.191 val SOME (t,_) = rewrite_set_ thy true order_system t;
41.192 -if UnparseC.term t = "[c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L, c_2 = 77]" then ()
41.193 +if UnparseC.term t = "[c = (q_0 * L \<up> 2 / 2 + -1 * 77) / L, c_2 = 77]" then ()
41.194 else error "eqsystem.sml top_down_substitution,2x2] order_system";
41.195
41.196 if not (ord_simplify_System
41.197 false thy []
41.198 - (TermC.str2term"[c_2 = 77, c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L]",
41.199 - TermC.str2term"[c = (q_0 * L ^^^ 2 / 2 + -1 * 77) / L, c_2 = 77]"))
41.200 + (TermC.str2term"[c_2 = 77, c = (q_0 * L \<up> 2 / 2 + -1 * 77) / L]",
41.201 + TermC.str2term"[c = (q_0 * L \<up> 2 / 2 + -1 * 77) / L, c_2 = 77]"))
41.202 then () else error "eqsystem.sml, order_result rew_ord";
41.203
41.204
41.205 @@ -239,8 +239,8 @@
41.206 "----------- rewrite in [EqSystem,normalise,4x4] -----------------";
41.207 "----------- rewrite in [EqSystem,normalise,4x4] -----------------";
41.208 (*STOPPED.WN06?: revise rewrite in [EqSystem,normalise,4x4] from before 0609*)
41.209 -val t = TermC.str2term"[0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c_3 + c_4,\
41.210 - \0 = -1 * q_0 * L ^^^ 2 / 2 + L * c_3 + c_4,\
41.211 +val t = TermC.str2term"[0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c_3 + c_4,\
41.212 + \0 = -1 * q_0 * L \<up> 2 / 2 + L * c_3 + c_4,\
41.213 \c + c_2 + c_3 + c_4 = 0,\
41.214 \c_2 + c_3 + c_4 = 0]";
41.215 val bdvs = [(TermC.str2term"bdv_1",TermC.str2term"c"),
41.216 @@ -249,26 +249,26 @@
41.217 (TermC.str2term"bdv_4",TermC.str2term"c_4")];
41.218 val SOME (t,_) =
41.219 rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t;
41.220 -if UnparseC.term t = "[0 = c_4, 0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c_3 + c_4),\n\
41.221 +if UnparseC.term t = "[0 = c_4, 0 = -1 * q_0 * L \<up> 2 / 2 + (L * c_3 + c_4),\n\
41.222 \ c + (c_2 + (c_3 + c_4)) = 0, c_2 + (c_3 + c_4) = 0]"
41.223 then () else error "eqsystem.sml rewrite in 4x4 simplify_System_paren";
41.224
41.225 val SOME (t,_) = rewrite_set_inst_ thy true bdvs isolate_bdvs t;
41.226 if UnparseC.term t = "[c_4 = 0, \
41.227 - \L * c_3 + c_4 = 0 + -1 * (-1 * q_0 * L ^^^ 2 / 2),\n \
41.228 + \L * c_3 + c_4 = 0 + -1 * (-1 * q_0 * L \<up> 2 / 2),\n \
41.229 \c + (c_2 + (c_3 + c_4)) = 0, c_2 + (c_3 + c_4) = 0]"
41.230 then () else error "eqsystem.sml rewrite in 4x4 isolate_bdvs";
41.231
41.232 val SOME(t,_)= rewrite_set_inst_ thy true bdvs simplify_System_parenthesized t;
41.233 if UnparseC.term t = "[c_4 = 0,\
41.234 - \ L * c_3 + c_4 = q_0 * L ^^^ 2 / 2,\
41.235 + \ L * c_3 + c_4 = q_0 * L \<up> 2 / 2,\
41.236 \ c + (c_2 + (c_3 + c_4)) = 0,\n\
41.237 \ c_2 + (c_3 + c_4) = 0]"
41.238 then () else error "eqsystem.sml rewrite in 4x4 simplify_System_p..2";
41.239
41.240 val SOME (t,_) = rewrite_set_ thy true order_system t;
41.241 if UnparseC.term t = "[c_4 = 0,\
41.242 - \ L * c_3 + c_4 = q_0 * L ^^^ 2 / 2,\
41.243 + \ L * c_3 + c_4 = q_0 * L \<up> 2 / 2,\
41.244 \ c_2 + (c_3 + c_4) = 0,\n\
41.245 \ c + (c_2 + (c_3 + c_4)) = 0]"
41.246 then () else error "eqsystem.sml rewrite in 4x4 order_system";
41.247 @@ -277,8 +277,8 @@
41.248 "----------- refine [linear,system]-------------------------------";
41.249 "----------- refine [linear,system]-------------------------------";
41.250 val fmz =
41.251 - ["equalities [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2," ^
41.252 - "0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + (c_2::real)]",
41.253 + ["equalities [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2," ^
41.254 + "0 = -1 * q_0 * L \<up> 2 / 2 + L * c + (c_2::real)]",
41.255 "solveForVars [c, c_2]", "solution LL"];
41.256
41.257 (*WN120313 in "solution L" above "Refine.refine fmz ["LINEAR", "system"]" caused an error...*)
41.258 @@ -295,8 +295,8 @@
41.259 | (_, [] ) => get_vars vs) (*filter out nums as long as
41.260 we have Free ("123",_)*)
41.261 | get_vars [] = [];
41.262 - t = "equalities [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,"^
41.263 - "0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + (c_2::real)]";
41.264 + t = "equalities [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,"^
41.265 + "0 = -1 * q_0 * L \<up> 2 / 2 + L * c + (c_2::real)]";
41.266 val ts = Term.add_frees (Syntax.read_term ctxt t) [] |> get_vars;
41.267 val ctxt = Variable.declare_constraints (nth 1 ts) ctxt;
41.268 val ctxt = Variable.declare_constraints (nth 2 ts) ctxt;
41.269 @@ -324,14 +324,14 @@
41.270 With = [],
41.271 Given =
41.272 [Correct
41.273 - "equalities\n [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,\n 0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2]",
41.274 + "equalities\n [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,\n 0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2]",
41.275 Correct "solveForVars [c, c_2]"],
41.276 Where = [],
41.277 Relate = []})] => ()
41.278 | _ => error "eqsystem.sml Refine.refine ['normalise','2x2'...]";
41.279
41.280 "===== case 2 =====";
41.281 -val fmz = ["equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]",
41.282 +val fmz = ["equalities [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]",
41.283 "solveForVars [c, c_2]", "solution LL"];
41.284 val matches = Refine.refine fmz ["LINEAR", "system"];
41.285 case matches of [_,_,
41.286 @@ -340,32 +340,32 @@
41.287 {Find = [Correct "solution LL"],
41.288 With = [],
41.289 Given =
41.290 - [Correct "equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]",
41.291 + [Correct "equalities [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]",
41.292 Correct "solveForVars [c, c_2]"],
41.293 Where = [Correct
41.294 - "tl [c, c_2] from [c, c_2] occur_exactly_in NTH 1\n [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]",
41.295 + "tl [c, c_2] from [c, c_2] occur_exactly_in NTH 1\n [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]",
41.296 Correct
41.297 - "[c, c_2] from [c, c_2] occur_exactly_in NTH 2\n [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]"],
41.298 + "[c, c_2] from [c, c_2] occur_exactly_in NTH 2\n [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]"],
41.299 Relate = []})] => ()
41.300 | _ => error "eqsystem.sml Refine.refine ['triangular','2x2'...]";
41.301
41.302 (*WN051014----------------------------------------------------------------
41.303 the above 'val matches = Refine.refine fmz ["LINEAR", "system"]'
41.304 didn't work anymore; we investigated in these steps:*)
41.305 -val fmz = ["equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]",
41.306 +val fmz = ["equalities [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]",
41.307 "solveForVars [c, c_2]", "solution LL"];
41.308 val matches = Refine.refine fmz ["triangular", "2x2", "LINEAR", "system"];
41.309 (*... resulted in
41.310 False "[c, c_2] from_ [c, c_2] occur_exactly_in nth_ 2\n
41.311 - [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]"]*)
41.312 + [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]"]*)
41.313 val t = TermC.str2term ("[c, c_2] from [c, c_2] occur_exactly_in NTH 2" ^
41.314 - "[c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]");
41.315 + "[c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]");
41.316 Rewrite.trace_on := false;
41.317 val SOME (t',_) = rewrite_set_ thy false prls_triangular t;
41.318 (*found:...
41.319 ## try thm: NTH_CONS
41.320 ### eval asms: 1 < 2 + - 1
41.321 -==> nth_ (2 + - 1) [L * c + c_2 = q_0 * L ^^^ 2 / 2] =
41.322 +==> nth_ (2 + - 1) [L * c + c_2 = q_0 * L \<up> 2 / 2] =
41.323 nth_ (2 + - 1 + - 1) []
41.324 #### rls: erls_prls_triangular on: 1 < 2 + - 1
41.325 ##### try calc: op <'
41.326 @@ -376,7 +376,7 @@
41.327
41.328 "===== case 3: relaxed preconditions for triangular system =====";
41.329 val fmz = ["equalities [L * q_0 = c, \
41.330 - \ 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2,\
41.331 + \ 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2,\
41.332 \ 0 = c_4, \
41.333 \ 0 = c_3]",
41.334 "solveForVars [c, c_2, c_3, c_4]", "solution LL"];
41.335 @@ -402,7 +402,7 @@
41.336
41.337 "===== case 4 =====";
41.338 val fmz = ["equalities [L * q_0 = c, \
41.339 - \ 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2,\
41.340 + \ 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2,\
41.341 \ 0 = c_3, \
41.342 \ 0 = c_4]",
41.343 "solveForVars [c, c_2, c_3, c_4]", "solution LL"];
41.344 @@ -418,8 +418,8 @@
41.345 "----------- Refine.refine [2x2,linear,system] search error--------------";
41.346 (*didn't go into ["2x2", "LINEAR", "system"];
41.347 we investigated in these steps:*)
41.348 -val fmz = ["equalities [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,\
41.349 - \0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2]",
41.350 +val fmz = ["equalities [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,\
41.351 + \0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2]",
41.352 "solveForVars [c, c_2]", "solution LL"];
41.353 Rewrite.trace_on := false;
41.354 val matches = Refine.refine fmz ["2x2", "LINEAR", "system"];
41.355 @@ -452,7 +452,7 @@
41.356 > val (dd, ii) = (split_did o Thm.term_of o the o (TermC.parse thy)) equalities_es_;
41.357 > show_types:=true; UnparseC.term ii; show_types:=false;
41.358 val it = "es_::bool list" : string
41.359 -~~~~~~~~~~~~~~~^^^^^^^^^ OK~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41.360 +~~~~~~~~~~~~~~~ \<up> \<up> \<up> OK~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41.361
41.362 > val {where_,...} = Problem.from_store ["2x2", "LINEAR", "system"];
41.363 > show_types:=true; UnparseC.term (hd where_); show_types:=false;
41.364 @@ -463,9 +463,9 @@
41.365 > (writeln o (I_Model.to_string (ThyC.to_ctxt @{theory Isac_Knowledge}))) itms;
41.366 [
41.367 (1 ,[1] ,true ,#Given ,Cor equalities
41.368 - [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,
41.369 - 0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2] ,(es_, [[0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,
41.370 - 0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2]])),
41.371 + [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,
41.372 + 0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2] ,(es_, [[0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,
41.373 + 0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2]])),
41.374 (2 ,[1] ,true ,#Given ,Cor solveForVars [c, c_2] ,(v_s, [[c, c_2]])),
41.375 (3 ,[1] ,true ,#Find ,Cor solution L ,(ss___, [L]))]
41.376
41.377 @@ -482,8 +482,8 @@
41.378 ----- fun check in Pre_Conds.
41.379 > (writeln o env2str) env;
41.380 ["
41.381 -(es_, [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,
41.382 - 0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2])", "
41.383 +(es_, [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,
41.384 + 0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2])", "
41.385 (v_s, [c, c_2])", "
41.386 (ss___, L)"]
41.387
41.388 @@ -496,7 +496,7 @@
41.389 *** Const (op =, [real, real] => bool)
41.390 *** . Const (ListG.length_, real list => real)
41.391 *** . . Free (es_, real list)
41.392 -~~~~~~~~~~~~~~~~~~~^^^^^^^^^ should be bool list~~~~~~~~~~~~~~~~~~~
41.393 +~~~~~~~~~~~~~~~~~~~ \<up> \<up> \<up> should be bool list~~~~~~~~~~~~~~~~~~~
41.394 *** . Free (2, real)
41.395 ***
41.396
41.397 @@ -507,8 +507,8 @@
41.398 "----------- me [EqSystem,normalise,2x2] -------------------------";
41.399 "----------- me [EqSystem,normalise,2x2] -------------------------";
41.400 "----------- me [EqSystem,normalise,2x2] -------------------------";
41.401 -val fmz = ["equalities [0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2,\
41.402 - \0 = -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2]",
41.403 +val fmz = ["equalities [0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2,\
41.404 + \0 = -1 * q_0 * L \<up> 2 / 2 + L * c + c_2]",
41.405 "solveForVars [c, c_2]", "solution LL"];
41.406 val (dI',pI',mI') =
41.407 ("Biegelinie",["normalise", "2x2", "LINEAR", "system"],
41.408 @@ -544,7 +544,7 @@
41.409 val PblObj {probl,...} = get_obj I pt [5];
41.410 (writeln o (I_Model.to_string (ThyC.to_ctxt @{theory Isac_Knowledge}))) probl;
41.411 (*[
41.412 -(1 ,[1] ,true ,#Given ,Cor equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2] ,(es_, [[c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]])),
41.413 +(1 ,[1] ,true ,#Given ,Cor equalities [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2] ,(es_, [[c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]])),
41.414 (2 ,[1] ,true ,#Given ,Cor solveForVars [c, c_2] ,(v_s, [[c, c_2]])),
41.415 (3 ,[1] ,true ,#Find ,Cor solution ss___ ,(ss___, [ss___]))]
41.416 *)
41.417 @@ -572,10 +572,10 @@
41.418 "----------- me [linear,system] ..normalise..top_down_sub..-------";
41.419 val fmz =
41.420 ["equalities\
41.421 - \[0 = c_2 + c * 0 + 1 / EI * (L * q_0 / 12 * 0 ^^^ 3 + \
41.422 - \ -1 * q_0 / 24 * 0 ^^^ 4),\
41.423 - \ 0 = c_2 + c * L + 1 / EI * (L * q_0 / 12 * L ^^^ 3 + \
41.424 - \ -1 * q_0 / 24 * L ^^^ 4)]",
41.425 + \[0 = c_2 + c * 0 + 1 / EI * (L * q_0 / 12 * 0 \<up> 3 + \
41.426 + \ -1 * q_0 / 24 * 0 \<up> 4),\
41.427 + \ 0 = c_2 + c * L + 1 / EI * (L * q_0 / 12 * L \<up> 3 + \
41.428 + \ -1 * q_0 / 24 * L \<up> 4)]",
41.429 "solveForVars [c, c_2]", "solution LL"];
41.430 val (dI',pI',mI') =
41.431 ("Biegelinie",["LINEAR", "system"], ["no_met"]);
41.432 @@ -594,7 +594,7 @@
41.433 val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f;
41.434 val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f;
41.435 if f2str f =
41.436 -"[c_2 = 0, L * c + c_2 = -1 * q_0 * L ^^^ 4 / (24 * EI)]"
41.437 +"[c_2 = 0, L * c + c_2 = -1 * q_0 * L \<up> 4 / (24 * EI)]"
41.438 then () else error "eqsystem.sml me simpl. before SubProblem b";
41.439 case nxt of
41.440 (Subproblem ("Biegelinie", ["triangular", "2x2", "LINEAR",_])) => ()
41.441 @@ -612,7 +612,7 @@
41.442 val PblObj {probl,...} = get_obj I pt [5];
41.443 (writeln o (I_Model.to_string (ThyC.to_ctxt @{theory Isac_Knowledge}))) probl;
41.444 (*[
41.445 -(1 ,[1] ,true ,#Given ,Cor equalities [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2] ,(es_, [[c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]])),
41.446 +(1 ,[1] ,true ,#Given ,Cor equalities [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2] ,(es_, [[c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]])),
41.447 (2 ,[1] ,true ,#Given ,Cor solveForVars [c, c_2] ,(v_s, [[c, c_2]])),
41.448 (3 ,[1] ,true ,#Find ,Cor solution ss___ ,(ss___, [ss___]))]
41.449 *)
41.450 @@ -630,7 +630,7 @@
41.451 val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f;
41.452 val (p,_,f,nxt,_,pt) = me nxt p c pt;f2str f;
41.453
41.454 -if f2str f = "[c = -1 * q_0 * L ^^^ 3 / (24 * EI), c_2 = 0]"
41.455 +if f2str f = "[c = -1 * q_0 * L \<up> 3 / (24 * EI), c_2 = 0]"
41.456 then () else error "eqsystem.sml me [EqSys...2x2] finished f2str f b";
41.457 case nxt of
41.458 (End_Proof') => ()
41.459 @@ -661,20 +661,20 @@
41.460 c c_2 c c_2 c_3 c_4 [2':c, 1:c_2, 3:c_4] -> 4:c_3*)
41.461 val t = TermC.str2term
41.462 ("[0 = c_4, " ^
41.463 - "0 = c_4 + L * c_3 +(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI), " ^
41.464 + "0 = c_4 + L * c_3 +(12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI), " ^
41.465 "0 = c_2, " ^
41.466 - "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]");
41.467 + "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]");
41.468 val SOME (t, _) = rewrite_set_ thy false isolate_bdvs_4x4 t;
41.469 if UnparseC.term t =
41.470 -"[c_4 = 0,\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI) =\n -1 * (c_4 + L * c_3) + 0,\n c_2 = 0, (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2 = 0]"
41.471 +"[c_4 = 0,\n (12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) /\n (-24 * EI) =\n -1 * (c_4 + L * c_3) + 0,\n c_2 = 0, (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2 = 0]"
41.472 then () else error "Bsp 7.27";
41.473
41.474 "----- Bsp 7.27 go through the rewrites in met_eqsys_norm_4x4";
41.475 -val t = TermC.str2term "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2";
41.476 +val t = TermC.str2term "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2";
41.477 val NONE = rewrite_set_ thy false norm_Rational t;
41.478 val SOME (t,_) =
41.479 rewrite_set_inst_ thy false subst simplify_System_parenthesized t;
41.480 -if UnparseC.term t = "0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c + c_2)"
41.481 +if UnparseC.term t = "0 = -1 * q_0 * L \<up> 2 / 2 + (L * c + c_2)"
41.482 then () else error "Bsp 7.27 go through the rewrites in met_eqsys_norm_4x4";
41.483
41.484 "--- isolate_bdvs_4x4";
41.485 @@ -690,7 +690,7 @@
41.486 "------- Bsp 7.28 ---------------vvvvvvvvvvvvv Momentenlinie postponed";
41.487 reset_states ();
41.488 CalcTree [((*WN130908 <ERROR> error in kernel </ERROR>*)
41.489 - ["Traegerlaenge L", "Momentenlinie (-q_0 / L * x^^^3 / 6)",
41.490 + ["Traegerlaenge L", "Momentenlinie (-q_0 / L * x \<up> 3 / 6)",
41.491 "Biegelinie y",
41.492 "Randbedingungen [y L = 0, y' L = 0]",
41.493 "FunktionsVariable x"],
41.494 @@ -717,9 +717,9 @@
41.495 c c_2 c_3 c c_2 c_3 c_4 3:c_4 -> 4:c c_2 c_3 1:c_3 -> 4:c c_2*)
41.496 val t = TermC.str2term
41.497 ("[0 = c_4 + 0 / (-1 * EI), " ^
41.498 - "0 = c_4 + L * c_3 + (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI), " ^
41.499 + "0 = c_4 + L * c_3 + (12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI), " ^
41.500 "0 = c_3 + 0 / (-1 * EI), " ^
41.501 - "0 = c_3 + (6 * L * c_2 + 3 * L ^^^ 2 * c + -1 * L ^^^ 3 * q_0) / (-6 * EI)]");
41.502 + "0 = c_3 + (6 * L * c_2 + 3 * L \<up> 2 * c + -1 * L \<up> 3 * q_0) / (-6 * EI)]");
41.503
41.504 "------- Bsp 7.70";
41.505 reset_states ();
41.506 @@ -739,38 +739,38 @@
41.507 "----- 7.70 go through the rewrites in met_eqsys_norm_4x4";
41.508 val t = TermC.str2term
41.509 ("[L * q_0 = c, " ^
41.510 - "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2, " ^
41.511 + "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2, " ^
41.512 "0 = c_4, " ^
41.513 "0 = c_3]");
41.514 val SOME (t,_) = rewrite_ thy e_rew_ord Rule_Set.empty false (ThmC.numerals_to_Free @{thm commute_0_equality}) t;
41.515 val SOME (t,_) = rewrite_ thy e_rew_ord Rule_Set.empty false (ThmC.numerals_to_Free @{thm commute_0_equality}) t;
41.516 val SOME (t,_) = rewrite_ thy e_rew_ord Rule_Set.empty false (ThmC.numerals_to_Free @{thm commute_0_equality}) t;
41.517 if UnparseC.term t =
41.518 - "[L * q_0 = c, (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2 = 0, c_4 = 0,\n c_3 = 0]"
41.519 + "[L * q_0 = c, (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2 = 0, c_4 = 0,\n c_3 = 0]"
41.520 then () else error "7.70 go through the rewrites in met_eqsys_norm_4x4, 1";
41.521
41.522 val SOME (t,_) = rewrite_set_inst_ thy false subst simplify_System_parenthesized t;
41.523 -if UnparseC.term t = "[L * q_0 = c, -1 * q_0 * L ^^^ 2 / 2 + (L * c + c_2) = 0, c_4 = 0, c_3 = 0]"
41.524 +if UnparseC.term t = "[L * q_0 = c, -1 * q_0 * L \<up> 2 / 2 + (L * c + c_2) = 0, c_4 = 0,\n c_3 = 0]"
41.525 then () else error "7.70 go through the rewrites in met_eqsys_norm_4x4, 2";
41.526
41.527 val SOME (t,_) = rewrite_set_inst_ thy false subst isolate_bdvs_4x4 t;
41.528 if UnparseC.term t =
41.529 "[c = (-1 * (L * q_0) + 0) / -1,\n" ^
41.530 - " L * c + c_2 = -1 * (-1 * q_0 * L ^^^ 2 / 2) + 0, c_4 = 0, c_3 = 0]"
41.531 + " L * c + c_2 = -1 * (-1 * q_0 * L \<up> 2 / 2) + 0, c_4 = 0, c_3 = 0]"
41.532 then () else error "7.70 go through the rewrites in met_eqsys_norm_4x4, 3";
41.533
41.534 val SOME (t,_) = rewrite_set_inst_ thy false subst simplify_System_parenthesized t;
41.535 -if UnparseC.term t = "[c = -1 * L * q_0 / -1, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_4 = 0, c_3 = 0]"
41.536 +if UnparseC.term t = "[c = -1 * L * q_0 / -1, L * c + c_2 = q_0 * L \<up> 2 / 2, c_4 = 0, c_3 = 0]"
41.537 then () else error "7.70 go through the rewrites in met_eqsys_norm_4x4, 4";
41.538
41.539 val SOME (t, _) = rewrite_set_ thy false order_system t;
41.540 -if UnparseC.term t = "[c = -1 * L * q_0 / -1, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_3 = 0, c_4 = 0]"
41.541 +if UnparseC.term t = "[c = -1 * L * q_0 / -1, L * c + c_2 = q_0 * L \<up> 2 / 2, c_3 = 0, c_4 = 0]"
41.542 then () else error "eqsystem.sml: exp 7.70 normalise 4x4 by rewrite changed";
41.543
41.544 "----- 7.70 with met normalise: ";
41.545 val fmz = ["equalities" ^
41.546 "[L * q_0 = c, " ^
41.547 - "0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2, " ^
41.548 + "0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2, " ^
41.549 "0 = c_4, " ^
41.550 "0 = c_3]", "solveForVars [c, c_2, c_3, c_4]", "solution LL"];
41.551 val (dI',pI',mI') = ("Biegelinie",["LINEAR", "system"], ["no_met"]);
41.552 @@ -807,13 +807,13 @@
41.553 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.554 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.555 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.556 -if f2str f ="[c = L * q_0, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_3 = 0, c_4 = 0]"
41.557 +if f2str f ="[c = L * q_0, L * c + c_2 = q_0 * L \<up> 2 / 2, c_3 = 0, c_4 = 0]"
41.558 then () else error "eqsystem.sml: exp 7.70 normalise 4x4 by met changed";
41.559 --------------------------------------------------------------------------*)
41.560
41.561 "----- 7.70 with met top_down_: me";
41.562 val fmz = ["equalities \
41.563 - \[c = L * q_0, L * c + c_2 = q_0 * L ^^^ 2 / 2, c_3 = 0, c_4 = 0]",
41.564 + \[c = L * q_0, L * c + c_2 = q_0 * L \<up> 2 / 2, c_3 = 0, c_4 = 0]",
41.565 "solveForVars [c, c_2, c_3, c_4]", "solution LL"];
41.566 val (dI',pI',mI') =
41.567 ("Biegelinie",["LINEAR", "system"],["no_met"]);
41.568 @@ -832,7 +832,7 @@
41.569 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.570 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.571 if nxt = ("End_Proof'", End_Proof') andalso
41.572 - f2str f = "[c = L * q_0, c_2 = -1 * L ^^^ 2 * q_0 / 2, c_3 = 0, c_4 = 0]"
41.573 + f2str f = "[c = L * q_0, c_2 = -1 * L \<up> 2 * q_0 / 2, c_3 = 0, c_4 = 0]"
41.574 then () else error "eqsystem.sml: 7.70 with met top_down_: me";
41.575 ============ inhibit exn WN120314 ==============================================*)
41.576
41.577 @@ -852,15 +852,15 @@
41.578 c_4 | c_3 |2:c_3 -> 4' :c c_2 c_4 | |
41.579 c c_2 c_3 c_4 | c_4 |3' | |
41.580 c_3 |c c_2 c_3 c_4 |3:c_4 -> 4'':c c_2 |4'':c c_2 | *)
41.581 -val t = TermC.str2term"[0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2, \
41.582 +val t = TermC.str2term"[0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2, \
41.583 \ 0 = c_4 + 0 / (-1 * EI), \
41.584 -\ 0 = c_4 + L * c_3 +(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) /(-24 * EI),\
41.585 +\ 0 = c_4 + L * c_3 +(12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) /(-24 * EI),\
41.586 \ 0 = c_3 + 0 / (-1 * EI)]";
41.587
41.588 "------- Bsp 7.72a ---------------vvvvvvvvvvvvv Momentenlinie postponed";
41.589 reset_states ();
41.590 CalcTree [(["Traegerlaenge L",
41.591 - "Momentenlinie ((q_0 * L)/ 6 * x - q_0 /(6 * L) * x^3)",
41.592 + "Momentenlinie ((q_0 * L)/ 6 * x - q_0 /(6 * L) * x \<up> ^3)",
41.593 "Biegelinie y",
41.594 "Randbedingungen [y 0 = (0::real), y L = 0]",
41.595 "FunktionsVariable x"],
41.596 @@ -888,9 +888,9 @@
41.597 c_4 | | |
41.598 c c_2 c_3 c_4 | |3:c_4 -> 4':c c_2 c_3 |c_2 c c_3*)
41.599 val t = TermC.str2term"[0 = c_2, \
41.600 -\ 0 = (6 * c_2 + 6 * L * c + -1 * L ^^^ 2 * q_0) / 6, \
41.601 +\ 0 = (6 * c_2 + 6 * L * c + -1 * L \<up> 2 * q_0) / 6, \
41.602 \ 0 = c_4 + 0 / (-1 * EI), \
41.603 -\ 0 = c_4 + L * c_3 + (60 * L ^^^ 2 * c_2 + 20 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-120 * EI)]";
41.604 +\ 0 = c_4 + L * c_3 + (60 * L \<up> 2 * c_2 + 20 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-120 * EI)]";
41.605
41.606 "------- Bsp 7.73 ---------------vvvvvvvvvvvvv Momentenlinie postponed";
41.607 reset_states ();
41.608 @@ -912,9 +912,9 @@
41.609 "----- Bsp 7.27";
41.610 val fmz = ["equalities \
41.611 \[0 = c_4, \
41.612 - \ 0 = c_4 + L * c_3 +(12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI), \
41.613 + \ 0 = c_4 + L * c_3 +(12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI), \
41.614 \ 0 = c_2, \
41.615 - \ 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]",
41.616 + \ 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]",
41.617 "solveForVars [c, c_2, c_3, c_4]", "solution LL"];
41.618 val (dI',pI',mI') =
41.619 ("Biegelinie",["normalise", "4x4", "LINEAR", "system"],
41.620 @@ -928,27 +928,27 @@
41.621 "------------------------------------------- Apply_Method...";
41.622 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.623 "[0 = c_4, \
41.624 -\ 0 = c_4 + L * c_3 +\n (12 * L ^^^ 2 * c_2 + 4 * L ^^^ 3 * c + -1 * L ^^^ 4 * q_0) / (-24 * EI), \
41.625 +\ 0 = c_4 + L * c_3 +\n (12 * L \<up> 2 * c_2 + 4 * L \<up> 3 * c + -1 * L \<up> 4 * q_0) / (-24 * EI), \
41.626 \ 0 = c_2, \
41.627 -\ 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]";
41.628 +\ 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]";
41.629 (*vvvWN080102 Exception- Match raised
41.630 since associate Rewrite .. Rewrite'_Set
41.631 "------------------------------------------- simplify_System_parenthesized...";
41.632 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.633 "[0 = c_4, \
41.634 -\ 0 = -1 * q_0 * L ^^^ 4 / (-24 * EI) + \
41.635 -\ (4 * L ^^^ 3 * c / (-24 * EI) + \
41.636 -\ (12 * L ^^^ 2 * c_2 / (-24 * EI) + \
41.637 +\ 0 = -1 * q_0 * L \<up> 4 / (-24 * EI) + \
41.638 +\ (4 * L \<up> 3 * c / (-24 * EI) + \
41.639 +\ (12 * L \<up> 2 * c_2 / (-24 * EI) + \
41.640 \ (L * c_3 + c_4))), \
41.641 \ 0 = c_2, \
41.642 -\ 0 = -1 * q_0 * L ^^^ 2 / 2 + (L * c + c_2)]";
41.643 -(*? "(4 * L ^^^ 3 / (-24 * EI) * c" statt "(4 * L ^^^ 3 * c / (-24 * EI)" ?*)
41.644 +\ 0 = -1 * q_0 * L \<up> 2 / 2 + (L * c + c_2)]";
41.645 +(*? "(4 * L \<up> 3 / (-24 * EI) * c" statt "(4 * L \<up> 3 * c / (-24 * EI)" ?*)
41.646 "------------------------------------------- isolate_bdvs...";
41.647 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.648 "[c_4 = 0,\
41.649 -\ c_4 = 0 + -1 * (-1 * q_0 * L ^^^ 4 / (-24 * EI)) + -1 * (4 * L ^^^ 3 * c / (-24 * EI)) + -1 * (12 * L ^^^ 2 * c_2 / (-24 * EI)) + -1 * (L * c_3),\
41.650 +\ c_4 = 0 + -1 * (-1 * q_0 * L \<up> 4 / (-24 * EI)) + -1 * (4 * L \<up> 3 * c / (-24 * EI)) + -1 * (12 * L \<up> 2 * c_2 / (-24 * EI)) + -1 * (L * c_3),\
41.651 \ c_2 = 0, \
41.652 -\ c_2 = 0 + -1 * (-1 * q_0 * L ^^^ 2 / 2) + -1 * (L * c)]";
41.653 +\ c_2 = 0 + -1 * (-1 * q_0 * L \<up> 2 / 2) + -1 * (L * c)]";
41.654 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
41.655
41.656 ---------------------------------------------------------------------*)
42.1 --- a/test/Tools/isac/Knowledge/inssort.sml Mon Apr 19 20:44:18 2021 +0200
42.2 +++ b/test/Tools/isac/Knowledge/inssort.sml Tue Apr 20 16:58:44 2021 +0200
42.3 @@ -121,13 +121,13 @@
42.4 "----------- insertion sort: CAS-command -------------------------------------";
42.5 val (p,_,f,nxt,_,pt) = CalcTreeTEST [([], ("empty_thy_id", ["empty_probl_id"], ["empty_meth_id"]))];
42.6 val (_,(_,c,(pt,p))) = Step_Solve.by_term (pt, p) "Sort {||1, 3, 2||}";
42.7 -Test_Tool.show_pt pt; (*this trick ^^^^^^^^^ micked input of ^^^^^^^^^^^^^^^^^^ in the front-end.
42.8 +Test_Tool.show_pt pt; (*this trick \<up> \<up> \<up> micked input of \<up> \<up> \<up> \<up> \<up> \<up> in the front-end.
42.9 the trick worked in changeset fbaff8cf0179, it does not work in 59c5dd27d589
42.10 (TODO hg bisect ?) and raises the ERROR Undefined fact: "xfoldr_Nil" here.
42.11 vvvvv
42.12 compare tests "CAS-command" in test/../error-pattern.sml !
42.13
42.14 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*\<rightarrow>"Apply_Method --------------------------^^^^*)
42.15 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*\<rightarrow>"Apply_Method -------------------------- \<up> ^*)
42.16 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
42.17 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
42.18 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
43.1 --- a/test/Tools/isac/Knowledge/integrate.sml Mon Apr 19 20:44:18 2021 +0200
43.2 +++ b/test/Tools/isac/Knowledge/integrate.sml Tue Apr 20 16:58:44 2021 +0200
43.3 @@ -52,11 +52,11 @@
43.4 "----------- parsing ------------------------------------";
43.5 "----------- parsing ------------------------------------";
43.6 val t = str2t "Integral x D x";
43.7 -val t = str2t "Integral x^^^2 D x";
43.8 +val t = str2t "Integral x \<up> 2 D x";
43.9 case t of
43.10 Const ("Integrate.Integral", _) $
43.11 (Const ("Prog_Expr.pow", _) $ Free _ $ Free _) $ Free ("x", _) => ()
43.12 - | _ => error "integrate.sml: parsing: Integral x^^^2 D x";
43.13 + | _ => error "integrate.sml: parsing: Integral x \<up> 2 D x";
43.14
43.15 val t = str2t "ff x is_f_x";
43.16 case t of Const ("Integrate.is'_f'_x", _) $ _ => ()
43.17 @@ -74,60 +74,60 @@
43.18 else error "Integral M'/EJ D x BY integral_const";
43.19
43.20 val str = rewrit @{thm "integral_var"} (str2t "Integral x D x");
43.21 -if term2s str = "x ^^^ 2 / 2" then ()
43.22 +if term2s str = "x \<up> 2 / 2" then ()
43.23 else error "Integral x D x BY integral_var";
43.24
43.25 val str = rewrit @{thm "integral_add"} (str2t "Integral x + 1 D x");
43.26 if term2s str = "Integral x D x + Integral 1 D x" then ()
43.27 else error "Integral x + 1 D x BY integral_add";
43.28
43.29 -val str = rewrit @{thm "integral_mult"} (str2t "Integral M'/EJ * x^^^3 D x");
43.30 -if term2s str = "M' / EJ * Integral x ^^^ 3 D x" then ()
43.31 -else error "Integral M'/EJ * x^^^3 D x BY integral_mult";
43.32 +val str = rewrit @{thm "integral_mult"} (str2t "Integral M'/EJ * x \<up> 3 D x");
43.33 +if term2s str = "M' / EJ * Integral x \<up> 3 D x" then ()
43.34 +else error "Integral M'/EJ * x \<up> 3 D x BY integral_mult";
43.35
43.36 -val str = rewrit @{thm "integral_pow"} (str2t "Integral x^^^3 D x");
43.37 -if term2s str = "x ^^^ (3 + 1) / (3 + 1)" then ()
43.38 -else error "integrate.sml Integral x^^^3 D x";
43.39 +val str = rewrit @{thm "integral_pow"} (str2t "Integral x \<up> 3 D x");
43.40 +if term2s str = "x \<up> (3 + 1) / (3 + 1)" then ()
43.41 +else error "integrate.sml Integral x \<up> 3 D x";
43.42
43.43
43.44 "----------- test add_new_c, TermC.is_f_x ---------------------";
43.45 "----------- test add_new_c, TermC.is_f_x ---------------------";
43.46 "----------- test add_new_c, TermC.is_f_x ---------------------";
43.47 -val term = str2t "x^^^2 * c + c_2";
43.48 +val term = str2t "x \<up> 2 * c + c_2";
43.49 val cc = new_c term;
43.50 if UnparseC.term cc = "c_3" then () else error "integrate.sml: new_c ???";
43.51
43.52 val SOME (id,t') = eval_add_new_c "" "Integrate.add'_new'_c" term thy;
43.53 -if UnparseC.term t' = "x ^^^ 2 * c + c_2 = x ^^^ 2 * c + c_2 + c_3" then ()
43.54 +if UnparseC.term t' = "x \<up> 2 * c + c_2 = x \<up> 2 * c + c_2 + c_3" then ()
43.55 else error "intergrate.sml: diff. eval_add_new_c";
43.56
43.57 val cc = ("Integrate.add'_new'_c", eval_add_new_c "add_new_c_");
43.58 val SOME (thmstr, thm) = adhoc_thm1_ thy cc term;
43.59
43.60 val SOME (t',_) = rewrite_set_ thy true add_new_c term;
43.61 -if UnparseC.term t' = "x ^^^ 2 * c + c_2 + c_3" then ()
43.62 +if UnparseC.term t' = "x \<up> 2 * c + c_2 + c_3" then ()
43.63 else error "intergrate.sml: diff. rewrite_set add_new_c 1";
43.64
43.65 -val term = str2t "ff x = x^^^2*c + c_2";
43.66 +val term = str2t "ff x = x \<up> 2*c + c_2";
43.67 val SOME (t',_) = rewrite_set_ thy true add_new_c term;
43.68 -if UnparseC.term t' = "ff x = x ^^^ 2 * c + c_2 + c_3" then ()
43.69 +if UnparseC.term t' = "ff x = x \<up> 2 * c + c_2 + c_3" then ()
43.70 else error "intergrate.sml: diff. rewrite_set add_new_c 2";
43.71
43.72
43.73 (*WN080222 replace call_new_c with add_new_c----------------------
43.74 -val term = str2t "new_c (c * x^^^2 + c_2)";
43.75 +val term = str2t "new_c (c * x \<up> 2 + c_2)";
43.76 val SOME (_,t') = eval_new_c 0 0 term 0;
43.77 -if term2s t' = "new_c c * x ^^^ 2 + c_2 = c_3" then ()
43.78 +if term2s t' = "new_c c * x \<up> 2 + c_2 = c_3" then ()
43.79 else error "integrate.sml: eval_new_c ???";
43.80
43.81 -val t = str2t "matches (?u + new_c ?v) (x ^^^ 2 / 2)";
43.82 +val t = str2t "matches (?u + new_c ?v) (x \<up> 2 / 2)";
43.83 val SOME (_,t') = eval_matches "" "Prog_Expr.matches" t thy; term2s t';
43.84 -if term2s t' = "matches (?u + new_c ?v) (x ^^^ 2 / 2) = False" then ()
43.85 +if term2s t' = "matches (?u + new_c ?v) (x \<up> 2 / 2) = False" then ()
43.86 else error "integrate.sml: matches new_c = False";
43.87
43.88 -val t = str2t "matches (?u + new_c ?v) (x ^^^ 2 / 2 + new_c x ^^^ 2 / 2)";
43.89 +val t = str2t "matches (?u + new_c ?v) (x \<up> 2 / 2 + new_c x \<up> 2 / 2)";
43.90 val SOME (_,t') = eval_matches "" "Prog_Expr.matches" t thy; term2s t';
43.91 -if term2s t'="matches (?u + new_c ?v) (x ^^^ 2 / 2 + new_c x ^^^ 2 / 2) = True"
43.92 +if term2s t'="matches (?u + new_c ?v) (x \<up> 2 / 2 + new_c x \<up> 2 / 2) = True"
43.93 then () else error "integrate.sml: matches new_c = True";
43.94
43.95 val t = str2t "ff x TermC.is_f_x";
43.96 @@ -156,7 +156,7 @@
43.97 fun rewrit thm t =
43.98 fst (the (rewrite_inst_ thy tless_true
43.99 conditions_in_integration true subs thm t));
43.100 -val t = rewrit call_for_new_c (str2t "x ^^^ 2 / 2"); term2s t;
43.101 +val t = rewrit call_for_new_c (str2t "x \<up> 2 / 2"); term2s t;
43.102 val t = (rewrit call_for_new_c t)
43.103 handle OPTION => str2t "no_rewrite";
43.104
43.105 @@ -173,7 +173,7 @@
43.106 "----------- simplify by ruleset reducing make_ratpoly_in";
43.107 val thy = @{theory "Isac_Knowledge"};
43.108 "===== test 1";
43.109 -val t = TermC.str2term "1/EI * (L * q_0 * x / 2 + -1 * q_0 * x^^^2 / 2)";
43.110 +val t = TermC.str2term "1/EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)";
43.111
43.112 "----- stepwise from the rulesets in simplify_Integral and below-----";
43.113 val rls = norm_Rational_noadd_fractions;
43.114 @@ -184,13 +184,13 @@
43.115 "===== test 2";
43.116 val rls = order_add_mult_in;
43.117 val SOME (t,[]) = rewrite_set_ thy true rls t;
43.118 -if UnparseC.term t = "1 / EI * (L * (q_0 * x) / 2 + -1 * (q_0 * x ^^^ 2) / 2)" then()
43.119 +if UnparseC.term t = "1 / EI * (L * (q_0 * x) / 2 + -1 * (q_0 * x \<up> 2) / 2)" then()
43.120 else error "integrate.sml simplify by ruleset order_add_mult_in #2";
43.121
43.122 "===== test 3";
43.123 val rls = discard_parentheses;
43.124 val SOME (t,[]) = rewrite_set_ thy true rls t;
43.125 -if UnparseC.term t = "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)" then ()
43.126 +if UnparseC.term t = "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)" then ()
43.127 else error "integrate.sml simplify by ruleset discard_parenth.. #3";
43.128
43.129 "===== test 4";
43.130 @@ -200,48 +200,48 @@
43.131 [Thm ("separate_bdv", ThmC.numerals_to_Free @{thm separate_bdv}),
43.132 (*"?a * ?bdv / ?b = ?a / ?b * ?bdv"*)
43.133 Thm ("separate_bdv_n", ThmC.numerals_to_Free @{thm separate_bdv_n}),
43.134 - (*"?a * ?bdv ^^^ ?n / ?b = ?a / ?b * ?bdv ^^^ ?n"*)
43.135 + (*"?a * ?bdv \<up> ?n / ?b = ?a / ?b * ?bdv \<up> ?n"*)
43.136 Thm ("separate_1_bdv", ThmC.numerals_to_Free @{thm separate_1_bdv}),
43.137 (*"?bdv / ?b = (1 / ?b) * ?bdv"*)
43.138 Thm ("separate_1_bdv_n", ThmC.numerals_to_Free @{thm separate_1_bdv_n})
43.139 - (*"?bdv ^^^ ?n / ?b = 1 / ?b * ?bdv ^^^ ?n"*)
43.140 + (*"?bdv \<up> ?n / ?b = 1 / ?b * ?bdv \<up> ?n"*)
43.141 ]);
43.142 (*show_types := true; --- do we need type-constraint in thms? *)
43.143 @{thm separate_bdv}; (*::?'a does NOT rewrite here WITHOUT type constraint*)
43.144 -@{thm separate_bdv_n}; (*::real ..because of ^^^, rewrites*)
43.145 +@{thm separate_bdv_n}; (*::real ..because of \<up> , rewrites*)
43.146 @{thm separate_1_bdv}; (*::?'a*)
43.147 val xxx = ThmC.numerals_to_Free @{thm separate_1_bdv}; (*::?'a*)
43.148 -@{thm separate_1_bdv_n}; (*::real ..because of ^^^*)
43.149 +@{thm separate_1_bdv_n}; (*::real ..because of \<up> *)
43.150 (*show_types := false; --- do we need type-constraint in thms? YES ?!?!?!*)
43.151
43.152 val SOME (t, []) = rewrite_set_inst_ thy true subs rls t;
43.153 -if UnparseC.term t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2)" then ()
43.154 +if UnparseC.term t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x \<up> 2)" then ()
43.155 else error "integrate.sml simplify by ruleset separate_bdv.. #4";
43.156
43.157 "===== test 5";
43.158 -val t = str2t "1/EI * (L * q_0 * x / 2 + -1 * q_0 * x^^^2 / 2)";
43.159 +val t = str2t "1/EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)";
43.160 val rls = simplify_Integral;
43.161 val SOME (t,[]) = rewrite_set_inst_ thy true subs rls t;
43.162 -(* given was: "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x^^^2 / 2)" *)
43.163 -if UnparseC.term t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2)" then ()
43.164 +(* given was: "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)" *)
43.165 +if UnparseC.term t = "1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x \<up> 2)" then ()
43.166 else error "integrate.sml, simplify_Integral #99";
43.167
43.168 "........... 2nd integral ........................................";
43.169 "........... 2nd integral ........................................";
43.170 "........... 2nd integral ........................................";
43.171 val t = str2t
43.172 -"Integral 1 / EI * (L * q_0 / 2 * (x ^^^ 2 / 2) + -1 * q_0 / 2 * (x ^^^ 3 / 3)) D x";
43.173 +"Integral 1 / EI * (L * q_0 / 2 * (x \<up> 2 / 2) + -1 * q_0 / 2 * (x \<up> 3 / 3)) D x";
43.174 val rls = simplify_Integral;
43.175 val SOME (t,[]) = rewrite_set_inst_ thy true subs rls t;
43.176 if UnparseC.term t =
43.177 - "Integral 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3) D x"
43.178 + "Integral 1 / EI * (L * q_0 / 4 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3) D x"
43.179 then () else raise error "integrate.sml, simplify_Integral #198";
43.180
43.181 val rls = integration_rules;
43.182 val SOME (t,[]) = rewrite_set_ thy true rls t;
43.183 UnparseC.term t;
43.184 if UnparseC.term t =
43.185 - "1 / EI * (L * q_0 / 4 * (x ^^^ 3 / 3) + -1 * q_0 / 6 * (x ^^^ 4 / 4))"
43.186 + "1 / EI * (L * q_0 / 4 * (x \<up> 3 / 3) + -1 * q_0 / 6 * (x \<up> 4 / 4))"
43.187 then () else error "integrate.sml, simplify_Integral #199";
43.188
43.189
43.190 @@ -255,68 +255,68 @@
43.191
43.192 val t = (Thm.term_of o the o (TermC.parse thy)) "Integral x D x";
43.193 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.194 -if UnparseC.term res = "x ^^^ 2 / 2" then () else error "Integral x D x changed";
43.195 +if UnparseC.term res = "x \<up> 2 / 2" then () else error "Integral x D x changed";
43.196
43.197 -val t = (Thm.term_of o the o (TermC.parse thy)) "Integral c * x ^^^ 2 + c_2 D x";
43.198 +val t = (Thm.term_of o the o (TermC.parse thy)) "Integral c * x \<up> 2 + c_2 D x";
43.199 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.200 -if UnparseC.term res = "c * (x ^^^ 3 / 3) + c_2 * x" then () else error "Integral c * x ^^^ 2 + c_2 D x";
43.201 +if UnparseC.term res = "c * (x \<up> 3 / 3) + c_2 * x" then () else error "Integral c * x \<up> 2 + c_2 D x";
43.202
43.203 val rls = add_new_c;
43.204 -val t = (Thm.term_of o the o (TermC.parse thy)) "c * (x ^^^ 3 / 3) + c_2 * x";
43.205 +val t = (Thm.term_of o the o (TermC.parse thy)) "c * (x \<up> 3 / 3) + c_2 * x";
43.206 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.207 -if UnparseC.term res = "c * (x ^^^ 3 / 3) + c_2 * x + c_3" then ()
43.208 +if UnparseC.term res = "c * (x \<up> 3 / 3) + c_2 * x + c_3" then ()
43.209 else error "integrate.sml: diff.behav. in add_new_c simpl.";
43.210
43.211 -val t = (Thm.term_of o the o (TermC.parse thy)) "F x = x ^^^ 3 / 3 + x";
43.212 +val t = (Thm.term_of o the o (TermC.parse thy)) "F x = x \<up> 3 / 3 + x";
43.213 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.214 -if UnparseC.term res = "F x = x ^^^ 3 / 3 + x + c"(*not "F x + c =..."*) then ()
43.215 +if UnparseC.term res = "F x = x \<up> 3 / 3 + x + c"(*not "F x + c =..."*) then ()
43.216 else error "integrate.sml: diff.behav. in add_new_c equation";
43.217
43.218 val rls = simplify_Integral;
43.219 (*~~~~~~~~~~~~~~~~~~~~~~~~~~~*)
43.220 -val t = (Thm.term_of o the o (TermC.parse thy)) "ff x = c * x + -1 * q_0 * (x ^^^ 2 / 2) + c_2";
43.221 +val t = (Thm.term_of o the o (TermC.parse thy)) "ff x = c * x + -1 * q_0 * (x \<up> 2 / 2) + c_2";
43.222 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.223 -if UnparseC.term res = "ff x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2"
43.224 +if UnparseC.term res = "ff x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2"
43.225 then () else error "integrate.sml: diff.behav. in simplify_I #1";
43.226
43.227 val rls = integration;
43.228 (*~~~~~~~~~~~~~~~~~~~~~~~~~~~*)
43.229 -val t = (Thm.term_of o the o (TermC.parse thy)) "Integral c * x ^^^ 2 + c_2 D x";
43.230 +val t = (Thm.term_of o the o (TermC.parse thy)) "Integral c * x \<up> 2 + c_2 D x";
43.231 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.232 -if UnparseC.term res = "c_3 + c_2 * x + c / 3 * x ^^^ 3"
43.233 +if UnparseC.term res = "c_3 + c_2 * x + c / 3 * x \<up> 3"
43.234 then () else error "integrate.sml: diff.behav. in integration #1";
43.235
43.236 -val t = (Thm.term_of o the o (TermC.parse thy)) "Integral 3*x^^^2 + 2*x + 1 D x";
43.237 +val t = (Thm.term_of o the o (TermC.parse thy)) "Integral 3*x \<up> 2 + 2*x + 1 D x";
43.238 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.239 -if UnparseC.term res = "c + x + x ^^^ 2 + x ^^^ 3" then ()
43.240 +if UnparseC.term res = "c + x + x \<up> 2 + x \<up> 3" then ()
43.241 else error "integrate.sml: diff.behav. in integration #2";
43.242
43.243 val t = (Thm.term_of o the o (TermC.parse thy))
43.244 - "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2) D x";
43.245 + "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x \<up> 2) D x";
43.246 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.247 -"Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2) D x";
43.248 -if UnparseC.term res = "c + 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)"
43.249 +"Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x \<up> 2) D x";
43.250 +if UnparseC.term res = "c + 1 / EI * (L * q_0 / 4 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)"
43.251 then () else error "integrate.sml: diff.behav. in integration #3";
43.252
43.253 val t = (Thm.term_of o the o (TermC.parse thy)) ("Integral " ^ UnparseC.term res ^ " D x");
43.254 val SOME (res, _) = rewrite_set_inst_ thy true subs rls t;
43.255 -if UnparseC.term res = "c_2 + c * x + 1 / EI * (L * q_0 / 12 * x ^^^ 3 + -1 * q_0 / 24 * x ^^^ 4)"
43.256 +if UnparseC.term res = "c_2 + c * x +\n1 / EI * (L * q_0 / 12 * x \<up> 3 + -1 * q_0 / 24 * x \<up> 4)"
43.257 then () else error "integrate.sml: diff.behav. in integration #4";
43.258
43.259 "----------- rewrite 3rd integration in 7.27 ------------";
43.260 "----------- rewrite 3rd integration in 7.27 ------------";
43.261 "----------- rewrite 3rd integration in 7.27 ------------";
43.262 val thy = @{theory "Isac_Knowledge"} (*because of Undeclared constant "Biegelinie.EI*);
43.263 -val t = str2t "Integral 1 / EI * ((L * q_0 * x + -1 * q_0 * x ^^^ 2) / 2) D x";
43.264 +val t = str2t "Integral 1 / EI * ((L * q_0 * x + -1 * q_0 * x \<up> 2) / 2) D x";
43.265 val SOME(t,_)= rewrite_set_inst_ thy true subs simplify_Integral t;
43.266 if UnparseC.term t =
43.267 - "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x ^^^ 2) D x"
43.268 + "Integral 1 / EI * (L * q_0 / 2 * x + -1 * q_0 / 2 * x \<up> 2) D x"
43.269 then () else error "integrate.sml 3rd integration in 7.27, simplify_Integral";
43.270
43.271 val SOME(t,_)= rewrite_set_inst_ thy true subs integration t;
43.272 UnparseC.term t;
43.273 if UnparseC.term t =
43.274 - "c + 1 / EI * (L * q_0 / 4 * x ^^^ 2 + -1 * q_0 / 6 * x ^^^ 3)"
43.275 + "c + 1 / EI * (L * q_0 / 4 * x \<up> 2 + -1 * q_0 / 6 * x \<up> 3)"
43.276 then () else error "integrate.sml 3rd integration in 7.27, integration";
43.277
43.278
43.279 @@ -375,9 +375,9 @@
43.280 "----- step 0: returns nxt = Model_Problem ---";
43.281 val (p,_,f,nxt,_,pt) =
43.282 CalcTreeTEST
43.283 - [(["functionTerm (x^^^2 + 1)", "integrateBy x", "antiDerivative FF"],
43.284 + [(["functionTerm (x \<up> 2 + 1)", "integrateBy x", "antiDerivative FF"],
43.285 ("Integrate", ["integrate", "function"], ["diff", "integration"]))];
43.286 -"----- step 1: returns nxt = Add_Given \"functionTerm (x ^^^ 2 + 1)\" ---";
43.287 +"----- step 1: returns nxt = Add_Given \"functionTerm (x \<up> 2 + 1)\" ---";
43.288 val (p,_,f,nxt,_,pt) = me nxt p c pt; (*nxt = ("Tac ", ...) --> Add_Given...*)
43.289 "----- step 2: returns nxt = Add_Given \"integrateBy x\" ---";
43.290 val (p,_,f,nxt,_,pt) = me nxt p c pt;
43.291 @@ -397,7 +397,7 @@
43.292 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
43.293 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
43.294 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
43.295 -if f2str f = "c + x + 1 / 3 * x ^^^ 3" then ()
43.296 +if f2str f = "c + x + 1 / 3 * x \<up> 3" then ()
43.297 else error "integrate.sml -- me method [diff,integration] -- end";
43.298
43.299
43.300 @@ -406,14 +406,14 @@
43.301 "----------- autoCalculate [diff,integration] -----------";
43.302 reset_states ();
43.303 CalcTree
43.304 - [(["functionTerm (x^2 + 1)", "integrateBy x", "antiDerivative FF"],
43.305 + [(["functionTerm (x \<up> 2 + 1)", "integrateBy x", "antiDerivative FF"],
43.306 ("Integrate", ["integrate", "function"], ["diff", "integration"]))];
43.307 Iterator 1;
43.308 moveActiveRoot 1;
43.309 autoCalculate 1 CompleteCalc;
43.310 val ((pt,p),_) = get_calc 1; @{make_string} p; Test_Tool.show_pt pt;
43.311 val (Form t,_,_) = ME_Misc.pt_extract (pt, p);
43.312 -if UnparseC.term t = "c + x + 1 / 3 * x ^^^ 3" then ()
43.313 +if UnparseC.term t = "c + x + 1 / 3 * x \<up> 3" then ()
43.314 else error "integrate.sml -- interSteps [diff,integration] -- result";
43.315
43.316
43.317 @@ -421,7 +421,7 @@
43.318 "----------- me method [diff,integration,named] ---------";
43.319 "----------- me method [diff,integration,named] ---------";
43.320 (*exp_CalcInt_No-2.xml*)
43.321 -val fmz = ["functionTerm (x^^^2 + (1::real))",
43.322 +val fmz = ["functionTerm (x \<up> 2 + (1::real))",
43.323 "integrateBy x", "antiDerivativeName F"];
43.324 val (dI',pI',mI') =
43.325 ("Integrate",["named", "integrate", "function"],
43.326 @@ -438,7 +438,7 @@
43.327 val (p,_,f,nxt,_,pt) = me nxt p c pt;
43.328 val (p,_,f,nxt,_,pt) = me nxt p c pt;
43.329 val (p,_,f,nxt,_,pt) = me nxt p c pt; f2str f;
43.330 -if f2str f = "F x = c + x + 1 / 3 * x ^^^ 3" then()
43.331 +if f2str f = "F x = c + x + 1 / 3 * x \<up> 3" then()
43.332 else error "integrate.sml: method [diff,integration,named]";
43.333
43.334
44.1 --- a/test/Tools/isac/Knowledge/inverse_z_transform.sml Mon Apr 19 20:44:18 2021 +0200
44.2 +++ b/test/Tools/isac/Knowledge/inverse_z_transform.sml Tue Apr 20 16:58:44 2021 +0200
44.3 @@ -59,7 +59,7 @@
44.4 (*[2,2], Pbl*)val (p,_,fb,nxt,_,pt) = me nxt p [] pt; (**)
44.5 (*[2,2], Met*)val (p,_,fb,nxt,_,pt) = me nxt p [] pt; (*Apply_Method ["PolyEq", "solve_d2_polyeq_abc_equation"*)
44.6 (*[2,2,1], Frm*)val (p,_,fb,nxt,_,pt) = me nxt p [] pt; (**)
44.7 -if p = ([2, 2, 1], Frm) andalso f2str fb = "-1 + -2 * z + 8 * z ^^^ 2 = 0"
44.8 +if p = ([2, 2, 1], Frm) andalso f2str fb = "-1 + -2 * z + 8 * z \<up> 2 = 0"
44.9 then () else error "Z_Transform,inverse_sub] me 2";
44.10
44.11 (*[2,2,1], Res*)val (p,_,fb,nxt,_,pt) = me nxt p [] pt; (**)
44.12 @@ -172,7 +172,7 @@
44.13
44.14 case nxt of (_, End_Proof') =>
44.15 if p = ([], Res) andalso
44.16 - f2str fb = "X_z = 4 * (1 / 2) ^^^ ?n * ?u [?n] + -4 * (-1 / 4) ^^^ ?n * ?u [?n]"
44.17 + f2str fb = "X_z = 4 * (1 / 2) \<up> ?n * ?u [?n] + -4 * (-1 / 4) \<up> ?n * ?u [?n]"
44.18 then () else error "[SignalProcessing,Z_Transform,Inverse_sub] changed 1"
44.19 | _ => error "[SignalProcessing,Z_Transform,Inverse_sub] changed 2";
44.20
44.21 @@ -192,6 +192,6 @@
44.22
44.23 val ((pt,_),_) = get_calc 1; val p = get_pos 1 1;
44.24 val (Form f, tac, asms) = ME_Misc.pt_extract (pt, p);
44.25 -if UnparseC.term f = "X_z = 4 * (1 / 2) ^^^ ?n * ?u [?n] + -4 * (-1 / 4) ^^^ ?n * ?u [?n]"
44.26 +if UnparseC.term f = "X_z = 4 * (1 / 2) \<up> ?n * ?u [?n] + -4 * (-1 / 4) \<up> ?n * ?u [?n]"
44.27 andalso p = ([], Res) then ()
44.28 else error "inv Z, exp 1 autoCalculate changed";
45.1 --- a/test/Tools/isac/Knowledge/partial_fractions.sml Mon Apr 19 20:44:18 2021 +0200
45.2 +++ b/test/Tools/isac/Knowledge/partial_fractions.sml Tue Apr 20 16:58:44 2021 +0200
45.3 @@ -68,7 +68,7 @@
45.4 tacis; " = []";
45.5 pIopt (* = SOME ["Inverse", "Z_Transform", "SignalProcessing"]*);
45.6 member op = [Pbl,Met] p_; " = false";
45.7 -(* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ leads into
45.8 +(* \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^ leads into
45.9 Step_Solve.do_next, which is definitely WRONG (should be nxt_specify_ for FIND_ADD).
45.10 This ERROR seems to be introduced together with ctxt, concerns Apply_Method without implicit_take.
45.11 See TODO.txt
45.12 @@ -128,7 +128,7 @@
45.13 (*[1], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Subproblem ("PolyEq", ["abcFormula", "degree_2", "polynomial", "univariate", "equation"]))*)
45.14 (*10*)
45.15 (*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Model_Problem)*)
45.16 -(*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Add_Given "equality (-1 + -2 * z + 8 * z ^^^ 2 = 0)")*)
45.17 +(*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Add_Given "equality (-1 + -2 * z + 8 * z \<up> 2 = 0)")*)
45.18 (*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Add_Given "solveFor z")*)
45.19 (*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Add_Find "solutions z_i")*)
45.20 (*[2], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Specify_Theory "PolyEq")*)
45.21 @@ -260,8 +260,8 @@
45.22 if UnparseC.term f = "4 / (z - 1 / 2) + -4 / (z - -1 / 4)" andalso
45.23 UnparseC.terms_short asms =
45.24 "[BB = -4,BB is_polyexp,AA is_polyexp,AA = 4," ^
45.25 - "lhs (-1 + -2 * z + 8 * z ^^^ 2 = 0) has_degree_in z = 2," ^
45.26 - "lhs (-1 + -2 * z + 8 * z ^^^ 2 = 0) is_poly_in z,z = 1 / 2,z = -1 / 4,z is_polyexp]"
45.27 + "lhs (-1 + -2 * z + 8 * z \<up> 2 = 0) has_degree_in z = 2," ^
45.28 + "lhs (-1 + -2 * z + 8 * z \<up> 2 = 0) is_poly_in z,z = 1 / 2,z = -1 / 4,z is_polyexp]"
45.29 then case tac of NONE => ()
45.30 | _ => error "me for met_partial_fraction changed: final result 1"
45.31 else error "me for met_partial_fraction changed: final result 2"
45.32 @@ -272,12 +272,12 @@
45.33 "----------- progr.vers.2: check erls for multiply_ansatz";
45.34 "----------- progr.vers.2: check erls for multiply_ansatz";
45.35 (*test for outcommented 3 lines in script: is norm_Rational strong enough?*)
45.36 -val t = TermC.str2term "(3 / ((-1 + -2 * z + 8 * z ^^^ 2) *3/24)) = (3 / ((z - 1 / 2) * (z - -1 / 4)))";
45.37 +val t = TermC.str2term "(3 / ((-1 + -2 * z + 8 * z \<up> 2) *3/24)) = (3 / ((z - 1 / 2) * (z - -1 / 4)))";
45.38 val SOME (t', _) = rewrite_set_ @{theory Isac_Knowledge} true ansatz_rls t;
45.39 -UnparseC.term t' = "3 / ((-1 + -2 * z + 8 * z ^^^ 2) * 3 / 24) =\n?A / (z - 1 / 2) + ?B / (z - -1 / 4)";
45.40 +UnparseC.term t' = "3 / ((-1 + -2 * z + 8 * z \<up> 2) * 3 / 24) =\n?A / (z - 1 / 2) + ?B / (z - -1 / 4)";
45.41
45.42 val SOME (t'', _) = rewrite_set_ @{theory Isac_Knowledge} true multiply_ansatz t'; (*true*)
45.43 -UnparseC.term t'' = "(z - 1 / 2) * (z - -1 / 4) * 3 / ((-1 + -2 * z + 8 * z ^^^ 2) * 3 / 24) =\n" ^
45.44 +UnparseC.term t'' = "(z - 1 / 2) * (z - -1 / 4) * 3 / ((-1 + -2 * z + 8 * z \<up> 2) * 3 / 24) =\n" ^
45.45 "?A * (z - -1 / 4) + ?B * (z - 1 / 2)"; (*true*)
45.46
45.47 val SOME (t''', _) = rewrite_set_ @{theory Isac_Knowledge} true norm_Rational t'';
45.48 @@ -307,10 +307,10 @@
45.49 "Program PartFracScript (f_f::real) (zzz::real) = " ^(*f_f: 3 / (z * (z - 1 / 4 + -1 / 8 * (1 / z)), zzz: z*)
45.50 " (let f_f = Take f_f; " ^
45.51 " (num_orig::real) = get_numerator f_f; " ^(*num_orig: 3*)
45.52 - " f_f = (Rewrite_Set norm_Rational False) f_f; " ^(*f_f: 24 / (-1 + -2 * z + 8 * z ^^^ 2)*)
45.53 + " f_f = (Rewrite_Set norm_Rational False) f_f; " ^(*f_f: 24 / (-1 + -2 * z + 8 * z \<up> 2)*)
45.54 " (numer::real) = get_numerator f_f; " ^(*numer: 24*)
45.55 - " (denom::real) = get_denominator f_f; " ^(*denom: -1 + -2 * z + 8 * z ^^^ 2*)
45.56 - " (equ::bool) = (denom = (0::real)); " ^(*equ: -1 + -2 * z + 8 * z ^^^ 2 = 0*)
45.57 + " (denom::real) = get_denominator f_f; " ^(*denom: -1 + -2 * z + 8 * z \<up> 2*)
45.58 + " (equ::bool) = (denom = (0::real)); " ^(*equ: -1 + -2 * z + 8 * z \<up> 2 = 0*)
45.59 " (L_L::bool list) = (SubProblem (PolyEqX, " ^
45.60 " [abcFormula, degree_2, polynomial, univariate, equation], " ^
45.61 " [no_met]) [BOOL equ, REAL zzz]); " ^(*L_L: [z = 1 / 2, z = -1 / 4]*)
46.1 --- a/test/Tools/isac/Knowledge/poly.sml Mon Apr 19 20:44:18 2021 +0200
46.2 +++ b/test/Tools/isac/Knowledge/poly.sml Tue Apr 20 16:58:44 2021 +0200
46.3 @@ -78,21 +78,21 @@
46.4
46.5 (*----------*)
46.6 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
46.7 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x^^^7";
46.8 -if has_degree_in t v = 7 then () else error "has_degree_in ((a*b+c)*x^^^7) x";
46.9 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x \<up> 7";
46.10 +if has_degree_in t v = 7 then () else error "has_degree_in ((a*b+c)*x \<up> 7) x";
46.11
46.12 val v = (Thm.term_of o the o (TermC.parse thy)) "AA";
46.13 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA^^^7";
46.14 -if has_degree_in t v = 7 then () else error "has_degree_in ((a*b+c)*AA^^^7) AA";
46.15 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA \<up> 7";
46.16 +if has_degree_in t v = 7 then () else error "has_degree_in ((a*b+c)*AA \<up> 7) AA";
46.17
46.18 (*----------*)
46.19 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
46.20 -val t = (Thm.term_of o the o (TermC.parse thy)) "x^^^7";
46.21 -if has_degree_in t v = 7 then () else error "has_degree_in (x^^^7) x";
46.22 +val t = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 7";
46.23 +if has_degree_in t v = 7 then () else error "has_degree_in (x \<up> 7) x";
46.24
46.25 val v = (Thm.term_of o the o (TermC.parse thy)) "AA";
46.26 -val t = (Thm.term_of o the o (TermC.parse thy)) "AA^^^7";
46.27 -if has_degree_in t v = 7 then () else error "has_degree_in (AA^^^7) AA";
46.28 +val t = (Thm.term_of o the o (TermC.parse thy)) "AA \<up> 7";
46.29 +if has_degree_in t v = 7 then () else error "has_degree_in (AA \<up> 7) AA";
46.30
46.31 (*----------*)
46.32 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
46.33 @@ -135,11 +135,11 @@
46.34 "----------- fun mono_deg_in -------------------------------------------------------------------";
46.35 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
46.36
46.37 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x^^^7";
46.38 -if mono_deg_in t v = SOME 7 then () else error "mono_deg_in ((a*b+c)*x^^^7) x changed";
46.39 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x \<up> 7";
46.40 +if mono_deg_in t v = SOME 7 then () else error "mono_deg_in ((a*b+c)*x \<up> 7) x changed";
46.41
46.42 -val t = (Thm.term_of o the o (TermC.parse thy)) "x^^^7";
46.43 -if mono_deg_in t v = SOME 7 then () else error "mono_deg_in (x^^^7) x changed";
46.44 +val t = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 7";
46.45 +if mono_deg_in t v = SOME 7 then () else error "mono_deg_in (x \<up> 7) x changed";
46.46
46.47 val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x";
46.48 if mono_deg_in t v = SOME 1 then () else error "mono_deg_in ((a*b+c)*x) x changed";
46.49 @@ -160,11 +160,11 @@
46.50 val thy = @{theory Partial_Fractions}
46.51 val v = (Thm.term_of o the o (TermC.parse thy)) "AA";
46.52
46.53 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA^^^7";
46.54 -if mono_deg_in t v = SOME 7 then () else error "mono_deg_in ((a*b+c)*AA^^^7) AA changed";
46.55 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA \<up> 7";
46.56 +if mono_deg_in t v = SOME 7 then () else error "mono_deg_in ((a*b+c)*AA \<up> 7) AA changed";
46.57
46.58 -val t = (Thm.term_of o the o (TermC.parse thy)) "AA^^^7";
46.59 -if mono_deg_in t v = SOME 7 then () else error "mono_deg_in (AA^^^7) AA changed";
46.60 +val t = (Thm.term_of o the o (TermC.parse thy)) "AA \<up> 7";
46.61 +if mono_deg_in t v = SOME 7 then () else error "mono_deg_in (AA \<up> 7) AA changed";
46.62
46.63 val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA";
46.64 if mono_deg_in t v = SOME 1 then () else error "mono_deg_in ((a*b+c)*AA) AA changed";
46.65 @@ -185,47 +185,47 @@
46.66 "----------- rewrite_set_ has_degree_in Const ('Partial_Fractions', _) -------------------------";
46.67 "----------- rewrite_set_ has_degree_in Const ('Partial_Fractions', _) -------------------------";
46.68 val thy = @{theory Partial_Fractions}
46.69 -val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*x + x^^^2) has_degree_in x) = 2";
46.70 +val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
46.71 val SOME (Const ("HOL.True", _), []) = rewrite_set_ thy false PolyEq_prls expr;
46.72
46.73 -val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*AA + AA^^^2) has_degree_in AA) = 2";
46.74 +val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*AA + AA \<up> 2) has_degree_in AA) = 2";
46.75 val SOME (Const ("HOL.True", _), []) = rewrite_set_ thy false PolyEq_prls expr;
46.76
46.77 "----------- eval_ for is_expanded_in, is_poly_in, has_degree_in -------------------------------";
46.78 "----------- eval_ for is_expanded_in, is_poly_in, has_degree_in -------------------------------";
46.79 "----------- eval_ for is_expanded_in, is_poly_in, has_degree_in -------------------------------";
46.80 -val t = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*x + x^^^2) is_expanded_in x";
46.81 +val t = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*x + x \<up> 2) is_expanded_in x";
46.82 val SOME (id, t') = eval_is_expanded_in 0 0 t 0;
46.83 -if UnparseC.term t' = "-8 - 2 * x + x ^^^ 2 is_expanded_in x = True"
46.84 - andalso id = "-8 - 2 * x + x ^^^ 2 is_expanded_in x = True"
46.85 +if UnparseC.term t' = "-8 - 2 * x + x \<up> 2 is_expanded_in x = True"
46.86 + andalso id = "-8 - 2 * x + x \<up> 2 is_expanded_in x = True"
46.87 then () else error "eval_is_expanded_in x ..changed";
46.88
46.89 val thy = @{theory Partial_Fractions}
46.90 -val t = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*AA + AA^^^2) is_expanded_in AA";
46.91 +val t = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*AA + AA \<up> 2) is_expanded_in AA";
46.92 val SOME (id, t') = eval_is_expanded_in 0 0 t 0;
46.93 -if UnparseC.term t' = "-8 - 2 * AA + AA ^^^ 2 is_expanded_in AA = True"
46.94 - andalso id = "-8 - 2 * AA + AA ^^^ 2 is_expanded_in AA = True"
46.95 +if UnparseC.term t' = "-8 - 2 * AA + AA \<up> 2 is_expanded_in AA = True"
46.96 + andalso id = "-8 - 2 * AA + AA \<up> 2 is_expanded_in AA = True"
46.97 then () else error "eval_is_expanded_in AA ..changed";
46.98
46.99
46.100 -val t = (Thm.term_of o the o (TermC.parse thy)) "(8 + 2*x + x^^^2) is_poly_in x";
46.101 +val t = (Thm.term_of o the o (TermC.parse thy)) "(8 + 2*x + x \<up> 2) is_poly_in x";
46.102 val SOME (id, t') = eval_is_poly_in 0 0 t 0;
46.103 -if UnparseC.term t' = "8 + 2 * x + x ^^^ 2 is_poly_in x = True"
46.104 - andalso id = "8 + 2 * x + x ^^^ 2 is_poly_in x = True"
46.105 +if UnparseC.term t' = "8 + 2 * x + x \<up> 2 is_poly_in x = True"
46.106 + andalso id = "8 + 2 * x + x \<up> 2 is_poly_in x = True"
46.107 then () else error "is_poly_in x ..changed";
46.108
46.109 -val t = (Thm.term_of o the o (TermC.parse thy)) "(8 + 2*AA + AA^^^2) is_poly_in AA";
46.110 +val t = (Thm.term_of o the o (TermC.parse thy)) "(8 + 2*AA + AA \<up> 2) is_poly_in AA";
46.111 val SOME (id, t') = eval_is_poly_in 0 0 t 0;
46.112 -if UnparseC.term t' = "8 + 2 * AA + AA ^^^ 2 is_poly_in AA = True"
46.113 - andalso id = "8 + 2 * AA + AA ^^^ 2 is_poly_in AA = True"
46.114 +if UnparseC.term t' = "8 + 2 * AA + AA \<up> 2 is_poly_in AA = True"
46.115 + andalso id = "8 + 2 * AA + AA \<up> 2 is_poly_in AA = True"
46.116 then () else error "is_poly_in AA ..changed";
46.117
46.118
46.119 val thy = @{theory Partial_Fractions}
46.120 -val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*x + x^^^2) has_degree_in x) = 2";
46.121 +val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
46.122 val SOME (Const ("HOL.True", _), []) = rewrite_set_ thy false PolyEq_prls expr;
46.123
46.124 -val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*AA + AA^^^2) has_degree_in AA) = 2";
46.125 +val expr = (Thm.term_of o the o (TermC.parse thy)) "((-8 - 2*AA + AA \<up> 2) has_degree_in AA) = 2";
46.126 val SOME (Const ("HOL.True", _), []) = rewrite_set_ thy false PolyEq_prls expr;
46.127
46.128 "-------- investigate (new 2002) uniary minus -----------";
46.129 @@ -327,39 +327,39 @@
46.130 if UnparseC.term t = "4 * a" then () else error "check make_polynomial 5";
46.131
46.132 "----- check 6 ---";
46.133 -val t = TermC.str2term "4*(3*a^^^2 - 2*a^^^2)";
46.134 +val t = TermC.str2term "4*(3*a \<up> 2 - 2*a \<up> 2)";
46.135 val SOME (t, _) = rewrite_set_ thy false make_polynomial t;
46.136 -if UnparseC.term t = "4 * a ^^^ 2" then () else error "check make_polynomial 6";
46.137 +if UnparseC.term t = "4 * a \<up> 2" then () else error "check make_polynomial 6";
46.138
46.139 "-------- fun is_multUnordered --------------------------";
46.140 "-------- fun is_multUnordered --------------------------";
46.141 "-------- fun is_multUnordered --------------------------";
46.142 val thy = @{theory "Isac_Knowledge"};
46.143 "===== works for a simple example, see rewrite.sml -- fun app_rev ===";
46.144 -val t = TermC.str2term "x^^^2 * x";
46.145 +val t = TermC.str2term "x \<up> 2 * x";
46.146 val SOME (t', _) = rewrite_set_ thy true order_mult_ t;
46.147 -if UnparseC.term t' = "x * x ^^^ 2" then ()
46.148 +if UnparseC.term t' = "x * x \<up> 2" then ()
46.149 else error "poly.sml Poly.is'_multUnordered doesn't work";
46.150
46.151 (* 100928 Rewrite.trace_on shows the first occurring difference in 267b:
46.152 -### rls: order_mult_ on: 5 * x ^^^ 2 * (2 * x ^^^ 7) + 5 * x ^^^ 2 * 3 + (6 * x ^^^ 7 + 9) + (-1 * (3 * x ^^^ 5 * (6 * x ^^^ 4)) + -1 * (3 * x ^^^ 5 * -1) +
46.153 - (-48 * x ^^^ 4 + 8))
46.154 +### rls: order_mult_ on: 5 * x \<up> 2 * (2 * x \<up> 7) + 5 * x \<up> 2 * 3 + (6 * x \<up> 7 + 9) + (-1 * (3 * x \<up> 5 * (6 * x \<up> 4)) + -1 * (3 * x \<up> 5 * -1) +
46.155 + (-48 * x \<up> 4 + 8))
46.156 ###### rls: Rule_Set.empty-is_multUnordered on: p is_multUnordered
46.157 ####### try calc: Poly.is'_multUnordered'
46.158 ======= calc. to: False !!!!!!!!!!!!! INSTEAD OF TRUE in 2002 !!!!!!!!!!!!!
46.159 *)
46.160 -val t = TermC.str2term "5 * x ^^^ 2 * (2 * x ^^^ 7) + 5 * x ^^^ 2 * 3 + (6 * x ^^^ 7 + 9) + (-1 * (3 * x ^^^ 5 * (6 * x ^^^ 4)) + -1 * (3 * x ^^^ 5 * -1) + (-48 * x ^^^ 4 + 8))";
46.161 +val t = TermC.str2term "5 * x \<up> 2 * (2 * x \<up> 7) + 5 * x \<up> 2 * 3 + (6 * x \<up> 7 + 9) + (-1 * (3 * x \<up> 5 * (6 * x \<up> 4)) + -1 * (3 * x \<up> 5 * -1) + (-48 * x \<up> 4 + 8))";
46.162
46.163 "----- is_multUnordered ---";
46.164 val tsort = sort_variables t;
46.165 -UnparseC.term tsort = "2 * (5 * (x ^^^ 2 * x ^^^ 7)) + 3 * (5 * x ^^^ 2) + 6 * x ^^^ 7 + 9 +\n-1 * (3 * (6 * (x ^^^ 4 * x ^^^ 5))) +\n-1 * (-1 * (3 * x ^^^ 5)) +\n-48 * x ^^^ 4 +\n8";
46.166 +UnparseC.term tsort = "2 * (5 * (x \<up> 2 * x \<up> 7)) + 3 * (5 * x \<up> 2) + 6 * x \<up> 7 + 9 +\n-1 * (3 * (6 * (x \<up> 4 * x \<up> 5))) +\n-1 * (-1 * (3 * x \<up> 5)) +\n-48 * x \<up> 4 +\n8";
46.167 is_polyexp t;
46.168 tsort = t;
46.169 is_polyexp t andalso not (t = sort_variables t);
46.170 if is_multUnordered t then () else error "poly.sml diff. is_multUnordered 1";
46.171
46.172 "----- eval_is_multUnordered ---";
46.173 -val tm = TermC.str2term "(5 * x ^^^ 2 * (2 * x ^^^ 7) + 5 * x ^^^ 2 * 3 + (6 * x ^^^ 7 + 9) + (-1 * (3 * x ^^^ 5 * (6 * x ^^^ 4)) + -1 * (3 * x ^^^ 5 * -1) + (-48 * x ^^^ 4 + 8))) is_multUnordered";
46.174 +val tm = TermC.str2term "(5 * x \<up> 2 * (2 * x \<up> 7) + 5 * x \<up> 2 * 3 + (6 * x \<up> 7 + 9) + (-1 * (3 * x \<up> 5 * (6 * x \<up> 4)) + -1 * (3 * x \<up> 5 * -1) + (-48 * x \<up> 4 + 8))) is_multUnordered";
46.175 case eval_is_multUnordered "testid" "" tm thy of
46.176 SOME (_, Const ("HOL.Trueprop", _) $
46.177 (Const ("HOL.eq", _) $
46.178 @@ -375,111 +375,115 @@
46.179 "-------- examples from textbook Schalk I ---------------";
46.180 "-------- examples from textbook Schalk I ---------------";
46.181 "-----SPB Schalk I p.63 No.267b ---";
46.182 -val t = TermC.str2term "(5*x^^^2 + 3) * (2*x^^^7 + 3) - (3*x^^^5 + 8) * (6*x^^^4 - 1)";
46.183 +(*associate poly* )
46.184 +val t = TermC.str2term "(5*x \<up> 2 + 3) * (2*x \<up> 7 + 3) - (3*x \<up> 5 + 8) * (6*x \<up> 4 - 1)";
46.185 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.186 -if (UnparseC.term t) = "17 + 15 * x ^^^ 2 + -48 * x ^^^ 4 + 3 * x ^^^ 5 + 6 * x ^^^ 7 + -8 * x ^^^ 9"
46.187 +if (UnparseC.term t) = "17 + 15 * x \<up> 2 + -48 * x \<up> 4 + 3 * x \<up> 5 + 6 * x \<up> 7 + -8 * x \<up> 9"
46.188 then () else error "poly.sml: diff.behav. in make_polynomial 1";
46.189
46.190 "-----SPB Schalk I p.63 No.275b ---";
46.191 -val t = TermC.str2term "(3*x^^^2 - 2*x*y + y^^^2) * (x^^^2 - 2*y^^^2)";
46.192 +val t = TermC.str2term "(3*x \<up> 2 - 2*x*y + y \<up> 2) * (x \<up> 2 - 2*y \<up> 2)";
46.193 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.194 -if (UnparseC.term t) = ("3 * x ^^^ 4 + -2 * x ^^^ 3 * y + -5 * x ^^^ 2 * y ^^^ 2 + " ^
46.195 - "4 * x * y ^^^ 3 +\n-2 * y ^^^ 4")
46.196 +if (UnparseC.term t) = ("3 * x \<up> 4 + -2 * x \<up> 3 * y + -5 * x \<up> 2 * y \<up> 2 + " ^
46.197 + "4 * x * y \<up> 3 +\n-2 * y \<up> 4")
46.198 then () else error "poly.sml: diff.behav. in make_polynomial 2";
46.199
46.200 "-----SPB Schalk I p.63 No.279b ---";
46.201 val t = TermC.str2term "(x-a)*(x-b)*(x-c)*(x-d)";
46.202 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.203 if (UnparseC.term t) =
46.204 - ("a * b * c * d + -1 * a * b * c * x + -1 * a * b * d * x + a * b * x ^^^ 2 +\n" ^
46.205 - "-1 * a * c * d * x +\na * c * x ^^^ 2 +\na * d * x ^^^ 2 +\n-1 * a * x ^^^ 3 +\n" ^
46.206 - "-1 * b * c * d * x +\nb * c * x ^^^ 2 +\nb * d * x ^^^ 2 +\n-1 * b * x ^^^ 3 +\n" ^
46.207 - "c * d * x ^^^ 2 +\n-1 * c * x ^^^ 3 +\n-1 * d * x ^^^ 3 +\nx ^^^ 4")
46.208 + ("a * b * c * d + -1 * a * b * c * x + -1 * a * b * d * x + a * b * x \<up> 2 +\n" ^
46.209 + "-1 * a * c * d * x +\na * c * x \<up> 2 +\na * d * x \<up> 2 +\n-1 * a * x \<up> 3 +\n" ^
46.210 + "-1 * b * c * d * x +\nb * c * x \<up> 2 +\nb * d * x \<up> 2 +\n-1 * b * x \<up> 3 +\n" ^
46.211 + "c * d * x \<up> 2 +\n-1 * c * x \<up> 3 +\n-1 * d * x \<up> 3 +\nx \<up> 4")
46.212 then () else error "poly.sml: diff.behav. in make_polynomial 3";
46.213 +( *associate poly*)
46.214
46.215 "-----SPB Schalk I p.63 No.291 ---";
46.216 -val t = TermC.str2term "(5+96*x^^^3+8*x*(-4+(7- 3*x)*4*x))*(5*(2- 3*x)- (-15*x*(-8*x- 5)))";
46.217 +val t = TermC.str2term "(5+96*x \<up> 3+8*x*(-4+(7- 3*x)*4*x))*(5*(2- 3*x)- (-15*x*(-8*x- 5)))";
46.218 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.219 -if (UnparseC.term t) = "50 + -770 * x + 4520 * x ^^^ 2 + -16320 * x ^^^ 3 + -26880 * x ^^^ 4"
46.220 +if (UnparseC.term t) = "50 + -770 * x + 4520 * x \<up> 2 + -16320 * x \<up> 3 + -26880 * x \<up> 4"
46.221 then () else error "poly.sml: diff.behav. in make_polynomial 4";
46.222
46.223 +(*associate poly* )
46.224 "-----SPB Schalk I p.64 No.295c ---";
46.225 -val t = TermC.str2term "(13*a^^^4*b^^^9*c - 12*a^^^3*b^^^6*c^^^9)^^^2";
46.226 +val t = TermC.str2term "(13*a \<up> 4*b \<up> 9*c - 12*a \<up> 3*b \<up> 6*c \<up> 9) \<up> 2";
46.227 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.228 -if (UnparseC.term t) = ("169 * a ^^^ 8 * b ^^^ 18 * c ^^^ 2 + -312 * a ^^^ 7 * b ^^^ 15 * c ^^^ 10" ^
46.229 - " +\n144 * a ^^^ 6 * b ^^^ 12 * c ^^^ 18")
46.230 +if (UnparseC.term t) = ("169 * a \<up> 8 * b \<up> 18 * c \<up> 2 + -312 * a \<up> 7 * b \<up> 15 * c \<up> 10" ^
46.231 + " +\n144 * a \<up> 6 * b \<up> 12 * c \<up> 18")
46.232 then ()else error "poly.sml: diff.behav. in make_polynomial 5";
46.233 +( *associate poly*)
46.234
46.235 "-----SPB Schalk I p.64 No.299a ---";
46.236 val t = TermC.str2term "(x - y)*(x + y)";
46.237 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.238 -if (UnparseC.term t) = "x ^^^ 2 + -1 * y ^^^ 2"
46.239 +if (UnparseC.term t) = "x \<up> 2 + -1 * y \<up> 2"
46.240 then () else error "poly.sml: diff.behav. in make_polynomial 6";
46.241
46.242 "-----SPB Schalk I p.64 No.300c ---";
46.243 -val t = TermC.str2term "(3*x^^^2*y - 1)*(3*x^^^2*y + 1)";
46.244 +val t = TermC.str2term "(3*x \<up> 2*y - 1)*(3*x \<up> 2*y + 1)";
46.245 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.246 -if (UnparseC.term t) = "-1 + 9 * x ^^^ 4 * y ^^^ 2"
46.247 +if (UnparseC.term t) = "-1 + 9 * x \<up> 4 * y \<up> 2"
46.248 then () else error "poly.sml: diff.behav. in make_polynomial 7";
46.249
46.250 "-----SPB Schalk I p.64 No.302 ---";
46.251 val t = TermC.str2term
46.252 - "(13*x^^^2 + 5)*(13*x^^^2 - 5) - (5*x^^^2 + 3)*(5*x^^^2 - 3) - (12*x^^^2 + 4)*(12*x^^^2 - 4)";
46.253 + "(13*x \<up> 2 + 5)*(13*x \<up> 2 - 5) - (5*x \<up> 2 + 3)*(5*x \<up> 2 - 3) - (12*x \<up> 2 + 4)*(12*x \<up> 2 - 4)";
46.254 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.255 if UnparseC.term t = "0"
46.256 then () else error "poly.sml: diff.behav. in make_polynomial 8";
46.257 (* RL?MG?: Bei Berechnung sollte 3 mal real_plus_minus_binom1_p aus expand_poly verwendet werden *)
46.258
46.259 "-----SPB Schalk I p.64 No.306a ---";
46.260 -val t = TermC.str2term "((x^^^2 + 1)*(x^^^2 - 1))^^^2";
46.261 +val t = TermC.str2term "((x \<up> 2 + 1)*(x \<up> 2 - 1)) \<up> 2";
46.262 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.263 -if (UnparseC.term t) = "1 + 2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 + x ^^^ 8" then ()
46.264 -else error "poly.sml: diff.behav. in 2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 = -2 * x ^^^ 4";
46.265 +if (UnparseC.term t) = "1 + 2 * x \<up> 4 + 2 * -2 * x \<up> 4 + x \<up> 8" then ()
46.266 +else error "poly.sml: diff.behav. in 2 * x \<up> 4 + 2 * -2 * x \<up> 4 = -2 * x \<up> 4";
46.267
46.268 (*WN071729 when reducing "rls reduce_012_" for Schaerding,
46.269 the above resulted in the term below ... but reduces from then correctly*)
46.270 -val t = TermC.str2term "1 + 2 * x ^^^ 4 + 2 * -2 * x ^^^ 4 + x ^^^ 8";
46.271 +val t = TermC.str2term "1 + 2 * x \<up> 4 + 2 * -2 * x \<up> 4 + x \<up> 8";
46.272 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.273 -if (UnparseC.term t) = "1 + -2 * x ^^^ 4 + x ^^^ 8"
46.274 +if (UnparseC.term t) = "1 + -2 * x \<up> 4 + x \<up> 8"
46.275 then () else error "poly.sml: diff.behav. in make_polynomial 9b";
46.276
46.277 "-----SPB Schalk I p.64 No.296a ---";
46.278 -val t = TermC.str2term "(x - a)^^^3";
46.279 +val t = TermC.str2term "(x - a) \<up> 3";
46.280 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.281 -if (UnparseC.term t) = "-1 * a ^^^ 3 + 3 * a ^^^ 2 * x + -3 * a * x ^^^ 2 + x ^^^ 3"
46.282 +if (UnparseC.term t) = "-1 * a \<up> 3 + 3 * a \<up> 2 * x + -3 * a * x \<up> 2 + x \<up> 3"
46.283 then () else error "poly.sml: diff.behav. in make_polynomial 10";
46.284
46.285 "-----SPB Schalk I p.64 No.296c ---";
46.286 -val t = TermC.str2term "(-3*x - 4*y)^^^3";
46.287 +val t = TermC.str2term "(-3*x - 4*y) \<up> 3";
46.288 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.289 -if (UnparseC.term t) = "-27 * x ^^^ 3 + -108 * x ^^^ 2 * y + -144 * x * y ^^^ 2 + -64 * y ^^^ 3"
46.290 +if (UnparseC.term t) = "-27 * x \<up> 3 + -108 * x \<up> 2 * y + -144 * x * y \<up> 2 + -64 * y \<up> 3"
46.291 then () else error "poly.sml: diff.behav. in make_polynomial 11";
46.292
46.293 "-----SPB Schalk I p.62 No.242c ---";
46.294 -val t = TermC.str2term "x^^^(-4)*(x^^^(-4)*y^^^(-2))^^^(-1)*y^^^(-2)";
46.295 +val t = TermC.str2term "x \<up> (-4)*(x \<up> (-4)*y \<up> (-2)) \<up> (-1)*y \<up> (-2)";
46.296 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.297 if (UnparseC.term t) = "1"
46.298 then () else error "poly.sml: diff.behav. in make_polynomial 12";
46.299
46.300 "-----SPB Schalk I p.60 No.209a ---";
46.301 -val t = TermC.str2term "a^^^(7-x) * a^^^x";
46.302 +val t = TermC.str2term "a \<up> (7-x) * a \<up> x";
46.303 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.304 -if UnparseC.term t = "a ^^^ 7"
46.305 +if UnparseC.term t = "a \<up> 7"
46.306 then () else error "poly.sml: diff.behav. in make_polynomial 13";
46.307
46.308 "-----SPB Schalk I p.60 No.209d ---";
46.309 -val t = TermC.str2term "d^^^x * d^^^(x+1) * d^^^(2 - 2*x)";
46.310 +val t = TermC.str2term "d \<up> x * d \<up> (x+1) * d \<up> (2 - 2*x)";
46.311 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.312 -if UnparseC.term t = "d ^^^ 3"
46.313 +if UnparseC.term t = "d \<up> 3"
46.314 then () else error "poly.sml: diff.behav. in make_polynomial 14";
46.315
46.316 (*---------------------------------------------------------------------*)
46.317 (*---------------- ?RL?Bsple bei denen es Probleme gibt----------------*)
46.318 (*---------------------------------------------------------------------*)
46.319 "-----Schalk I p.64 No.303 ---";
46.320 -val t = TermC.str2term "(a + 2*b)*(a^^^2 + 4*b^^^2)*(a - 2*b) - (a - 6*b)*(a^^^2 + 36*b^^^2)*(a + 6*b)";
46.321 +val t = TermC.str2term "(a + 2*b)*(a \<up> 2 + 4*b \<up> 2)*(a - 2*b) - (a - 6*b)*(a \<up> 2 + 36*b \<up> 2)*(a + 6*b)";
46.322 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.323 -if UnparseC.term t = "1280 * b ^^^ 4"
46.324 +if UnparseC.term t = "1280 * b \<up> 4"
46.325 then () else error "poly.sml: diff.behav. in make_polynomial 14b";
46.326 (* Richtig - aber Binomische Formel wurde nicht verwendet! *)
46.327
46.328 @@ -487,7 +491,7 @@
46.329 (*----------------------- Eigene Beispiele ---------------------------*)
46.330 (*--------------------------------------------------------------------*)
46.331 "-----SPO ---";
46.332 -val t = TermC.str2term "a^^^2*a^^^(-2)";
46.333 +val t = TermC.str2term "a \<up> 2*a \<up> (-2)";
46.334 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.335 if UnparseC.term t = "1" then ()
46.336 else error "poly.sml: diff.behav. in make_polynomial 15";
46.337 @@ -502,12 +506,12 @@
46.338 if UnparseC.term t = "a + 3 * b" then ()
46.339 else error "poly.sml: diff.behav. in make_polynomial 17";
46.340 "-----SPO ---";
46.341 -val t = TermC.str2term "a^^^2*b*b^^^(-1)";
46.342 +val t = TermC.str2term "a \<up> 2*b*b \<up> (-1)";
46.343 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.344 -if UnparseC.term t = "a ^^^ 2" then ()
46.345 +if UnparseC.term t = "a \<up> 2" then ()
46.346 else error "poly.sml: diff.behav. in make_polynomial 18";
46.347 "-----SPO ---";
46.348 -val t = TermC.str2term "a^^^2*a^^^(-2)";
46.349 +val t = TermC.str2term "a \<up> 2*a \<up> (-2)";
46.350 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.351 if (UnparseC.term t) = "1" then ()
46.352 else error "poly.sml: diff.behav. in make_polynomial 19";
46.353 @@ -519,50 +523,50 @@
46.354 "-----SPO ---";
46.355 val t = TermC.str2term "b * a * a";
46.356 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.357 -if UnparseC.term t = "a ^^^ 2 * b" then ()
46.358 +if UnparseC.term t = "a \<up> 2 * b" then ()
46.359 else error "poly.sml: diff.behav. in make_polynomial 21";
46.360 "-----SPO ---";
46.361 -val t = TermC.str2term "(a^^^2)^^^3";
46.362 +val t = TermC.str2term "(a \<up> 2) \<up> 3";
46.363 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.364 -if UnparseC.term t = "a ^^^ 6" then ()
46.365 +if UnparseC.term t = "a \<up> 6" then ()
46.366 else error "poly.sml: diff.behav. in make_polynomial 22";
46.367 "-----SPO ---";
46.368 -val t = TermC.str2term "x^^^2 * y^^^2 + x * x^^^2 * y";
46.369 +val t = TermC.str2term "x \<up> 2 * y \<up> 2 + x * x \<up> 2 * y";
46.370 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.371 -if UnparseC.term t = "x ^^^ 3 * y + x ^^^ 2 * y ^^^ 2" then ()
46.372 +if UnparseC.term t = "x \<up> 3 * y + x \<up> 2 * y \<up> 2" then ()
46.373 else error "poly.sml: diff.behav. in make_polynomial 23";
46.374 "-----SPO ---";
46.375 -val t = (Thm.term_of o the o (TermC.parse thy)) "a^^^2 * (-a)^^^2";
46.376 +val t = (Thm.term_of o the o (TermC.parse thy)) "a \<up> 2 * (-a) \<up> 2";
46.377 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.378 -if (UnparseC.term t) = "a ^^^ 4" then ()
46.379 +if (UnparseC.term t) = "a \<up> 4" then ()
46.380 else error "poly.sml: diff.behav. in make_polynomial 24";
46.381 "-----SPO ---";
46.382 -val t = TermC.str2term "a * b * b^^^(-1) + a";
46.383 +val t = TermC.str2term "a * b * b \<up> (-1) + a";
46.384 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.385 if (UnparseC.term t) = "2 * a" then ()
46.386 else error "poly.sml: diff.behav. in make_polynomial 25";
46.387 "-----SPO ---";
46.388 -val t = TermC.str2term "a*c*b^^^(2*n) + 3*a + 5*b^^^(2*n)*c*b";
46.389 +val t = TermC.str2term "a*c*b \<up> (2*n) + 3*a + 5*b \<up> (2*n)*c*b";
46.390 val SOME (t,_) = rewrite_set_ thy false make_polynomial t; UnparseC.term t;
46.391 -if (UnparseC.term t) = "3 * a + 5 * b ^^^ (1 + 2 * n) * c + a * b ^^^ (2 * n) * c"
46.392 +if (UnparseC.term t) = "3 * a + 5 * b \<up> (1 + 2 * n) * c + a * b \<up> (2 * n) * c"
46.393 then () else error "poly.sml: diff.behav. in make_polynomial 26";
46.394
46.395 (*MG030627 -------------vvv-: Verschachtelte Terme -----------*)
46.396 "-----SPO ---";
46.397 -val t = TermC.str2term "(1 + (x*y*a) + x)^^^(1 + (x*y*a) + x)";
46.398 +val t = TermC.str2term "(1 + (x*y*a) + x) \<up> (1 + (x*y*a) + x)";
46.399 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.400 -if UnparseC.term t = "(1 + x + a * x * y) ^^^ (1 + x + a * x * y)"
46.401 +if UnparseC.term t = "(1 + x + a * x * y) \<up> (1 + x + a * x * y)"
46.402 then () else error "poly.sml: diff.behav. in make_polynomial 27";(*SPO*)
46.403
46.404 -val t = TermC.str2term "(1 + x*(y*z)*zz)^^^(1 + x*(y*z)*zz)";
46.405 +val t = TermC.str2term "(1 + x*(y*z)*zz) \<up> (1 + x*(y*z)*zz)";
46.406 val SOME (t,_) = rewrite_set_ thy false make_polynomial t;
46.407 -if UnparseC.term t = "(1 + x * y * z * zz) ^^^ (1 + x * y * z * zz)"
46.408 +if UnparseC.term t = "(1 + x * y * z * zz) \<up> (1 + x * y * z * zz)"
46.409 then () else error "poly.sml: diff.behav. in make_polynomial 28";
46.410
46.411 "-------- check pbl 'polynomial simplification' --------";
46.412 "-------- check pbl 'polynomial simplification' --------";
46.413 "-------- check pbl 'polynomial simplification' --------";
46.414 -val fmz = ["Term ((5*x^^^2 + 3) * (2*x^^^7 + 3) - (3*x^^^5 + 8) * (6*x^^^4 - 1))", "normalform N"];
46.415 +val fmz = ["Term ((5*x \<up> 2 + 3) * (2*x \<up> 7 + 3) - (3*x \<up> 5 + 8) * (6*x \<up> 4 - 1))", "normalform N"];
46.416 "-----0 ---";
46.417 case Refine.refine fmz ["polynomial", "simplification"]of
46.418 [M_Match.Matches (["polynomial", "simplification"], _)] => ()
46.419 @@ -576,7 +580,7 @@
46.420 (*if there is ...
46.421 > val M_Match.NoMatch' {Given=gi, Where=wh, Find=fi,...} = M_Match.match_pbl fmz pbt;
46.422 ... then Rewrite.trace_on:*)
46.423 -
46.424 +
46.425 "-----2 ---";
46.426 Rewrite.trace_on := false;
46.427 M_Match.match_pbl fmz pbt;
46.428 @@ -587,7 +591,7 @@
46.429 (*default_print_depth 7;*)
46.430 val prls = (#prls o Problem.from_store) ["polynomial", "simplification"];
46.431 (*default_print_depth 3;*)
46.432 -val t = TermC.str2term "((5*x^^^2 + 3) * (2*x^^^7 + 3) - (3*x^^^5 + 8) * (6*x^^^4 - 1)) is_polyexp";
46.433 +val t = TermC.str2term "((5*x \<up> 2 + 3) * (2*x \<up> 7 + 3) - (3*x \<up> 5 + 8) * (6*x \<up> 4 - 1)) is_polyexp";
46.434 val SOME (t',_) = rewrite_set_ thy false prls t;
46.435 if t' = @{term True} then ()
46.436 else error "poly.sml: diff.behav. in check pbl 'polynomial..";
46.437 @@ -598,7 +602,7 @@
46.438 (*
46.439 > val M_Match.NoMatch' {Given=gi, Where=wh, Find=fi,...} = M_Match.match_pbl fmz pbt;
46.440 val wh = [False "(t_::real => real) (is_polyexp::real)"]
46.441 -......................^^^^^^^^^^^^...............^^^^*)
46.442 +...................... \<up> \<up> \<up> \<up> ............... \<up> ^*)
46.443 val M_Match.Matches' _ = M_Match.match_pbl fmz pbt;
46.444 (*show_types:=false;*)
46.445
46.446 @@ -606,17 +610,17 @@
46.447 "-------- me 'poly. simpl.' Schalk I p.63 No.267b -------";
46.448 "-------- me 'poly. simpl.' Schalk I p.63 No.267b -------";
46.449 "-------- me 'poly. simpl.' Schalk I p.63 No.267b -------";
46.450 -val fmz = ["Term ((5*x^^^2 + 3) * (2*x^^^7 + 3) - (3*x^^^5 + 8) * (6*x^^^4 - 1))", "normalform N"];
46.451 +val fmz = ["Term ((5*x \<up> 2 + 3) * (2*x \<up> 7 + 3) - (3*x \<up> 5 + 8) * (6*x \<up> 4 - 1))", "normalform N"];
46.452 val (dI',pI',mI') =
46.453 ("Poly",["polynomial", "simplification"],
46.454 ["simplification", "for_polynomials"]);
46.455 val p = e_pos'; val c = [];
46.456 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
46.457 -(*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Add_Given "Term\n ((5 * x ^^^ 2 + 3) * (2 * x ^^^ 7 + 3) -\n (3 * x ^^^ 5 + 8) * (6 * x ^^^ 4 - 1))"*)
46.458 +(*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Add_Given "Term\n ((5 * x \<up> 2 + 3) * (2 * x \<up> 7 + 3) -\n (3 * x \<up> 5 + 8) * (6 * x \<up> 4 - 1))"*)
46.459 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Add_Find "normalform N"*)
46.460
46.461 (*+* )if I_Model.to_string ctxt (get_obj g_pbl pt (fst p)) =
46.462 -(*+*) "[\n(0 ,[] ,false ,#Find ,Inc ??.Simplify.normalform ,(??.empty, [])), \n(1 ,[1] ,true ,#Given ,Cor ??.Simplify.Term\n ((5 * x ^^^ 2 + 3) * (2 * x ^^^ 7 + 3) -\n (3 * x ^^^ 5 + 8) * (6 * x ^^^ 4 - 1)) ,(t_t, [(5 * x ^^^ 2 + 3) * (2 * x ^^^ 7 + 3) -\n(3 * x ^^^ 5 + 8) * (6 * x ^^^ 4 - 1)]))]"
46.463 +(*+*) "[\n(0 ,[] ,false ,#Find ,Inc ??.Simplify.normalform ,(??.empty, [])), \n(1 ,[1] ,true ,#Given ,Cor ??.Simplify.Term\n ((5 * x \<up> 2 + 3) * (2 * x \<up> 7 + 3) -\n (3 * x \<up> 5 + 8) * (6 * x \<up> 4 - 1)) ,(t_t, [(5 * x \<up> 2 + 3) * (2 * x \<up> 7 + 3) -\n(3 * x \<up> 5 + 8) * (6 * x \<up> 4 - 1)]))]"
46.464 (*+*)then () else error "No.267b: I_Model.T CHANGED";
46.465 ( *+ ...could not be repaired in child of 7e314dd233fd ?!?*)
46.466
46.467 @@ -626,17 +630,17 @@
46.468 (*[], Met*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Apply_Method ["simplification", "for_polynomials"]*)
46.469 (*[1], Frm*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Rewrite_Set "norm_Poly"*)
46.470
46.471 -(*+*)if f2str f = "(5 * x ^^^ 2 + 3) * (2 * x ^^^ 7 + 3) -\n(3 * x ^^^ 5 + 8) * (6 * x ^^^ 4 - 1)"
46.472 +(*+*)if f2str f = "(5 * x \<up> 2 + 3) * (2 * x \<up> 7 + 3) -\n(3 * x \<up> 5 + 8) * (6 * x \<up> 4 - 1)"
46.473 (*+*)then () else error "";
46.474
46.475 (*[1], Res*)val (p,_,f,nxt,_,pt) = me nxt p c pt;(*Empty_Tac: ERROR DETECTED Feb.2020*)
46.476
46.477 -(*+*)if f2str f = "17 + 15 * x ^^^ 2 + -48 * x ^^^ 4 + 3 * x ^^^ 5 + 6 * x ^^^ 7 + -8 * x ^^^ 9"
46.478 +(*+*)if f2str f = "17 + 15 * x \<up> 2 + -48 * x \<up> 4 + 3 * x \<up> 5 + 6 * x \<up> 7 + -8 * x \<up> 9"
46.479 (*+*)then () else error "";
46.480
46.481 (*[1], Res* )val (p,_,f,nxt,_,pt) = me nxt p c pt;( *SINCE Feb.2020 LItool.find_next_step without result*)
46.482
46.483 -(*+*)if f2str f = "17 + 15 * x ^^^ 2 + -48 * x ^^^ 4 + 3 * x ^^^ 5 + 6 * x ^^^ 7 + -8 * x ^^^ 9"
46.484 +(*+*)if f2str f = "17 + 15 * x \<up> 2 + -48 * x \<up> 4 + 3 * x \<up> 5 + 6 * x \<up> 7 + -8 * x \<up> 9"
46.485 (*+*)then () else error "poly.sml diff.behav. in me Schalk I p.63 No.267b";
46.486
46.487
46.488 @@ -685,7 +689,7 @@
46.489 if ord_make_polynomial true thy [] (t1, t2) then ()
46.490 else error "poly.sml: diff.behav. in ord_make_polynomial";
46.491
46.492 -(*WN071202: ^^^ why then is there no rewriting ...*)
46.493 +(*WN071202: \<up> why then is there no rewriting ...*)
46.494 val term = TermC.str2term "2*b + (3*a + 3*b)";
46.495 val NONE = rewrite_set_ (@{theory "Isac_Knowledge"}) false order_add_mult term;
46.496
47.1 --- a/test/Tools/isac/Knowledge/polyeq-1.sml Mon Apr 19 20:44:18 2021 +0200
47.2 +++ b/test/Tools/isac/Knowledge/polyeq-1.sml Tue Apr 20 16:58:44 2021 +0200
47.3 @@ -16,30 +16,30 @@
47.4 "----------- Matthias Goldgruber 2003 trials on rewrite orders -------------------------------";
47.5 "----------- lin.eq degree_0 -------------------------------------";
47.6 "----------- test thm's d2_pq_formulsxx[_neg]---------------------";
47.7 -"----------- equality (2 +(-1)*x + x^^^2 = (0::real)) ----------------------------------------";
47.8 -"----------- equality (-2 +(-1)*x + 1*x^^^2 = 0) ---------------------------------------------";
47.9 -"----------- equality (-2 + x + x^^^2 = 0) ---------------------------------------------------";
47.10 -"----------- equality (2 + x + x^^^2 = 0) ----------------------------------------------------";
47.11 -"----------- equality (-2 + x + 1*x^^^2 = 0)) ------------------------------------------------";
47.12 -"----------- equality (1*x + x^^^2 = 0) ----------------------------------------------------";
47.13 -"----------- equality (1*x + 1*x^^^2 = 0) ----------------------------------------------------";
47.14 -"----------- equality (x + x^^^2 = 0) ------------------------------------------------------";
47.15 -"----------- equality (x + 1*x^^^2 = 0) ------------------------------------------------------";
47.16 -"----------- equality (-4 + x^^^2 = 0) -------------------------------------------------------";
47.17 -"----------- equality (4 + 1*x^^^2 = 0) -------------------------------------------------------";
47.18 -"----------- equality (1 +(-1)*x + 2*x^^^2 = 0) ----------------------------------------------";
47.19 -"----------- equality (-1 + x + 2*x^^^2 = 0) -------------------------------------------------";
47.20 -"----------- equality (1 + x + 2*x^^^2 = 0) --------------------------------------------------";
47.21 -"----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.22 -"----------- (-8 - 2*x + x^^^2 = 0), by rewriting ---------------";
47.23 -"----------- (-16 + 4*x + 2*x^^^2 = 0), --------------------------";
47.24 +"----------- equality (2 +(-1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
47.25 +"----------- equality (-2 +(-1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
47.26 +"----------- equality (-2 + x + x \<up> 2 = 0) ---------------------------------------------------";
47.27 +"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
47.28 +"----------- equality (-2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
47.29 +"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
47.30 +"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
47.31 +"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
47.32 +"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
47.33 +"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
47.34 +"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
47.35 +"----------- equality (1 +(-1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
47.36 +"----------- equality (-1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
47.37 +"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
47.38 +"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.39 +"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
47.40 +"----------- (-16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
47.41 "-----------------------------------------------------------------";
47.42 "------ polyeq-2.sml ---------------------------------------------";
47.43 -"----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)";
47.44 -"----------- (-64 + x^^^2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
47.45 -"----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
47.46 +"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
47.47 +"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
47.48 +"----------- (-147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
47.49 "----------- (3*x - 1 - (5*x - (2 - 4*x)) = -11),(*Schalk Is86Bsp5";
47.50 -"----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37";
47.51 +"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
47.52 "----------- rls make_polynomial_in ------------------------------";
47.53 "----------- interSteps ([1],Res); on Schalk Is86Bsp5-------------";
47.54 "----------- rls d2_polyeq_bdv_only_simplify ---------------------";
47.55 @@ -52,12 +52,12 @@
47.56 (* Rewrite.trace_on:=true;
47.57 Rewrite.trace_on:=false;
47.58 *)
47.59 - val t1 = (Thm.term_of o the o (TermC.parse thy)) "lhs (-8 - 2*x + x^^^2 = 0)";
47.60 + val t1 = (Thm.term_of o the o (TermC.parse thy)) "lhs (-8 - 2*x + x \<up> 2 = 0)";
47.61 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t1;
47.62 - if ((UnparseC.term t) = "-8 - 2 * x + x ^^^ 2") then ()
47.63 + if ((UnparseC.term t) = "-8 - 2 * x + x \<up> 2") then ()
47.64 else error "polyeq.sml: diff.behav. in lhs";
47.65
47.66 - val t2 = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*x + x^^^2) is_expanded_in x";
47.67 + val t2 = (Thm.term_of o the o (TermC.parse thy)) "(-8 - 2*x + x \<up> 2) is_expanded_in x";
47.68 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t2;
47.69 if (UnparseC.term t) = "True" then ()
47.70 else error "polyeq.sml: diff.behav. 1 in is_expended_in";
47.71 @@ -67,23 +67,23 @@
47.72 if (UnparseC.term t) = "False" then ()
47.73 else error "polyeq.sml: diff.behav. 2 in is_poly_in";
47.74
47.75 - val t3 = (Thm.term_of o the o (TermC.parse thy)) "(-8 + (-1)*2*x + x^^^2) is_poly_in x";
47.76 + val t3 = (Thm.term_of o the o (TermC.parse thy)) "(-8 + (-1)*2*x + x \<up> 2) is_poly_in x";
47.77 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t3;
47.78 if (UnparseC.term t) = "True" then ()
47.79 else error "polyeq.sml: diff.behav. 3 in is_poly_in";
47.80
47.81 - val t4 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 + (-1)*2*x + x^^^2 = 0)) is_expanded_in x";
47.82 + val t4 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 + (-1)*2*x + x \<up> 2 = 0)) is_expanded_in x";
47.83 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t4;
47.84 if (UnparseC.term t) = "True" then ()
47.85 else error "polyeq.sml: diff.behav. 4 in is_expended_in";
47.86
47.87
47.88 - val t6 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 - 2*x + x^^^2 = 0)) is_expanded_in x";
47.89 + val t6 = (Thm.term_of o the o (TermC.parse thy)) "(lhs (-8 - 2*x + x \<up> 2 = 0)) is_expanded_in x";
47.90 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t6;
47.91 if (UnparseC.term t) = "True" then ()
47.92 else error "polyeq.sml: diff.behav. 5 in is_expended_in";
47.93
47.94 - val t3 = (Thm.term_of o the o (TermC.parse thy))"((-8 - 2*x + x^^^2) has_degree_in x) = 2";
47.95 + val t3 = (Thm.term_of o the o (TermC.parse thy))"((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
47.96 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t3;
47.97 if (UnparseC.term t) = "True" then ()
47.98 else error "polyeq.sml: diff.behav. in has_degree_in_in";
47.99 @@ -94,13 +94,13 @@
47.100 else error "polyeq.sml: diff.behav. 6 in has_degree_in_in";
47.101
47.102 val t4 = (Thm.term_of o the o (TermC.parse thy))
47.103 - "((-8 - 2*x + x^^^2) has_degree_in x) = 1";
47.104 + "((-8 - 2*x + x \<up> 2) has_degree_in x) = 1";
47.105 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t4;
47.106 if (UnparseC.term t) = "False" then ()
47.107 else error "polyeq.sml: diff.behav. 7 in has_degree_in_in";
47.108
47.109 val t5 = (Thm.term_of o the o (TermC.parse thy))
47.110 - "((-8 - 2*x + x^^^2) has_degree_in x) = 2";
47.111 + "((-8 - 2*x + x \<up> 2) has_degree_in x) = 2";
47.112 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_prls t5;
47.113 if (UnparseC.term t) = "True" then ()
47.114 else error "polyeq.sml: diff.behav. 8 in has_degree_in_in";
47.115 @@ -108,21 +108,21 @@
47.116 "----------- test matching problems --------------------------0---";
47.117 "----------- test matching problems --------------------------0---";
47.118 "----------- test matching problems --------------------------0---";
47.119 -val fmz = ["equality (-8 - 2*x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.120 +val fmz = ["equality (-8 - 2*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.121 if M_Match.match_pbl fmz (Problem.from_store ["expanded", "univariate", "equation"]) =
47.122 M_Match.Matches' {Find = [Correct "solutions L"],
47.123 With = [],
47.124 - Given = [Correct "equality (-8 - 2 * x + x ^^^ 2 = 0)", Correct "solveFor x"],
47.125 - Where = [Correct "matches (?a = 0) (-8 - 2 * x + x ^^^ 2 = 0)",
47.126 - Correct "lhs (-8 - 2 * x + x ^^^ 2 = 0) is_expanded_in x"],
47.127 + Given = [Correct "equality (-8 - 2 * x + x \<up> 2 = 0)", Correct "solveFor x"],
47.128 + Where = [Correct "matches (?a = 0) (-8 - 2 * x + x \<up> 2 = 0)",
47.129 + Correct "lhs (-8 - 2 * x + x \<up> 2 = 0) is_expanded_in x"],
47.130 Relate = []}
47.131 then () else error "M_Match.match_pbl [expanded,univariate,equation]";
47.132
47.133 if M_Match.match_pbl fmz (Problem.from_store ["degree_2", "expanded", "univariate", "equation"]) =
47.134 M_Match.Matches' {Find = [Correct "solutions L"],
47.135 With = [],
47.136 - Given = [Correct "equality (-8 - 2 * x + x ^^^ 2 = 0)", Correct "solveFor x"],
47.137 - Where = [Correct "lhs (-8 - 2 * x + x ^^^ 2 = 0) has_degree_in x = 2"],
47.138 + Given = [Correct "equality (-8 - 2 * x + x \<up> 2 = 0)", Correct "solveFor x"],
47.139 + Where = [Correct "lhs (-8 - 2 * x + x \<up> 2 = 0) has_degree_in x = 2"],
47.140 Relate = []} (*before WN110906 was: has_degree_in x =!= 2"]*)
47.141 then () else error "M_Match.match_pbl [degree_2,expanded,univariate,equation]";
47.142
47.143 @@ -134,30 +134,30 @@
47.144 -----------28.2.03: war nicht upgedatet und ausgeklammert in ROOT.ML-->Test_Isac.thy
47.145
47.146 (*Aufgabe zum Einstieg in die Arbeit...*)
47.147 - val t = (Thm.term_of o the o (TermC.parse thy)) "a*b - (a+b)*x + x^^^2 = 0";
47.148 + val t = (Thm.term_of o the o (TermC.parse thy)) "a*b - (a+b)*x + x \<up> 2 = 0";
47.149 (*ein 'ruleset' aus Poly.ML wird angewandt...*)
47.150 val SOME (t,_) = rewrite_set_ thy Poly_erls false make_polynomial t;
47.151 UnparseC.term t;
47.152 - "a * b + (-1 * (a * x) + (-1 * (b * x) + x ^^^ 2)) = 0";
47.153 + "a * b + (-1 * (a * x) + (-1 * (b * x) + x \<up> 2)) = 0";
47.154 val SOME (t,_) =
47.155 rewrite_set_inst_ thy Poly_erls false [("bdv", "a")] make_polynomial_in t;
47.156 UnparseC.term t;
47.157 - "x ^^^ 2 + (-1 * (b * x) + (-1 * (x * a) + b * a)) = 0";
47.158 + "x \<up> 2 + (-1 * (b * x) + (-1 * (x * a) + b * a)) = 0";
47.159 (* bei Verwendung von "size_of-term" nach MG :*)
47.160 -(*"x ^^^ 2 + (-1 * (b * x) + (b * a + -1 * (x * a))) = 0" !!! *)
47.161 +(*"x \<up> 2 + (-1 * (b * x) + (b * a + -1 * (x * a))) = 0" !!! *)
47.162
47.163 (*wir holen 'a' wieder aus der Klammerung heraus...*)
47.164 val SOME (t,_) = rewrite_set_ thy Poly_erls false discard_parentheses t;
47.165 UnparseC.term t;
47.166 - "x ^^^ 2 + -1 * b * x + -1 * x * a + b * a = 0";
47.167 -(* "x ^^^ 2 + -1 * b * x + b * a + -1 * x * a = 0" !!! *)
47.168 + "x \<up> 2 + -1 * b * x + -1 * x * a + b * a = 0";
47.169 +(* "x \<up> 2 + -1 * b * x + b * a + -1 * x * a = 0" !!! *)
47.170
47.171 val SOME (t,_) =
47.172 rewrite_set_inst_ thy Poly_erls false [("bdv", "a")] make_polynomial_in t;
47.173 UnparseC.term t;
47.174 - "x ^^^ 2 + (-1 * (b * x) + a * (b + -1 * x)) = 0";
47.175 + "x \<up> 2 + (-1 * (b * x) + a * (b + -1 * x)) = 0";
47.176 (*da sind wir fast am Ziel: make_polynomial_in 'a' sollte ergeben
47.177 - "x ^^^ 2 + (-1 * (b * x)) + (b + -1 * x) * a = 0"*)
47.178 + "x \<up> 2 + (-1 * (b * x)) + (b + -1 * x) * a = 0"*)
47.179
47.180 (*das rewriting l"asst sich beobachten mit
47.181 Rewrite.trace_on := false;
47.182 @@ -178,23 +178,23 @@
47.183 UnparseC.term t;
47.184 "1 + b * x + x * a";
47.185
47.186 - val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a * (x + b * x) + a^^^2";
47.187 + val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a * (x + b * x) + a \<up> 2";
47.188 val SOME (t,_) =
47.189 rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
47.190 UnparseC.term t;
47.191 val SOME (t,_) =
47.192 rewrite_set_ thy false discard_parentheses t;
47.193 UnparseC.term t;
47.194 -"1 + (x + b * x) * a + a ^^^ 2";
47.195 +"1 + (x + b * x) * a + a \<up> 2";
47.196
47.197 - val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a ^^^2 * x + b * a + 7*a^^^2";
47.198 + val t = (Thm.term_of o the o (TermC.parse thy)) "1 + a \<up> 2 * x + b * a + 7*a \<up> 2";
47.199 val SOME (t,_) =
47.200 rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
47.201 UnparseC.term t;
47.202 val SOME (t,_) =
47.203 rewrite_set_ thy false discard_parentheses t;
47.204 UnparseC.term t;
47.205 -"1 + b * a + (7 + x) * a ^^^ 2";
47.206 +"1 + b * a + (7 + x) * a \<up> 2";
47.207
47.208 (* MG2003
47.209 Prog_Expr.thy grundlegende Algebra
47.210 @@ -207,14 +207,14 @@
47.211 get_thm Termorder.thy "bdv_n_collect";
47.212 get_thm (theory "Isac_Knowledge") "bdv_n_collect";
47.213 *)
47.214 - val t = (Thm.term_of o the o (TermC.parse thy)) "a ^^^2 * x + 7 * a^^^2";
47.215 + val t = (Thm.term_of o the o (TermC.parse thy)) "a \<up> 2 * x + 7 * a \<up> 2";
47.216 val SOME (t,_) =
47.217 rewrite_set_inst_ thy false [(bdv,a)] make_polynomial_in t;
47.218 UnparseC.term t;
47.219 val SOME (t,_) =
47.220 rewrite_set_ thy false discard_parentheses t;
47.221 UnparseC.term t;
47.222 -"(7 + x) * a ^^^ 2";
47.223 +"(7 + x) * a \<up> 2";
47.224
47.225 val t = (Thm.term_of o the o (TermC.parse Termorder.thy)) "Pi";
47.226
47.227 @@ -244,12 +244,12 @@
47.228 else error "termorder.sml diff.behav ord_make_polynomial_in #3";
47.229
47.230 val aa = (Thm.term_of o the o (TermC.parse thy)) "-1 * a * x";
47.231 - val bb = (Thm.term_of o the o (TermC.parse thy)) "x^^^3";
47.232 + val bb = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 3";
47.233 ord_make_polynomial_in true thy substx (aa, bb);
47.234 true; (* => LESS *)
47.235
47.236 val aa = (Thm.term_of o the o (TermC.parse thy)) "-1 * a * x";
47.237 - val bb = (Thm.term_of o the o (TermC.parse thy)) "x^^^3";
47.238 + val bb = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 3";
47.239 ord_make_polynomial_in true thy substa (aa, bb);
47.240 false; (* => GREATER *)
47.241
47.242 @@ -269,14 +269,14 @@
47.243 if UnparseC.term t' = "a + b + x" then ()
47.244 else error "termorder.sml diff.behav ord_make_polynomial_in #13";
47.245
47.246 - val ppp' = "-6 + -5*x + x^^^3 + -1*x^^^2 + -1*x^^^3 + -14*x^^^2";
47.247 + val ppp' = "-6 + -5*x + x \<up> 3 + -1*x \<up> 2 + -1*x \<up> 3 + -14*x \<up> 2";
47.248 val ppp = (Thm.term_of o the o (TermC.parse thy)) ppp';
47.249 val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ppp;
47.250 -if UnparseC.term t' = "-6 + -5 * x + -15 * x ^^^ 2 + 0" then ()
47.251 +if UnparseC.term t' = "-6 + -5 * x + -15 * x \<up> 2 + 0" then ()
47.252 else error "termorder.sml diff.behav ord_make_polynomial_in #14";
47.253
47.254 val SOME (t', _) = rewrite_set_inst_ thy false [(bdv,x)] make_polynomial_in ppp;
47.255 -if UnparseC.term t' = "-6 + -5 * x + -15 * x ^^^ 2 + 0" then ()
47.256 +if UnparseC.term t' = "-6 + -5 * x + -15 * x \<up> 2 + 0" then ()
47.257 else error "termorder.sml diff.behav ord_make_polynomial_in #15";
47.258
47.259 val ttt' = "(3*x + 5)/18";
47.260 @@ -332,7 +332,7 @@
47.261 "----------- test thm's d2_pq_formulsxx[_neg]---------------------";
47.262 "----------- test thm's d2_pq_formulsxx[_neg]---------------------";
47.263 "----- d2_pqformula1 ------!!!!";
47.264 -val fmz = ["equality (-1/8 + (-1/4)*z + z^^^2 = (0::real))", "solveFor z", "solutions L"];
47.265 +val fmz = ["equality (-1/8 + (-1/4)*z + z \<up> 2 = (0::real))", "solveFor z", "solutions L"];
47.266 val (dI',pI',mI') =
47.267 ("Isac_Knowledge", ["pqFormula", "degree_2", "polynomial", "univariate", "equation"], ["no_met"]);
47.268 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.269 @@ -355,14 +355,14 @@
47.270
47.271 if p = ([], Res) andalso
47.272 f2str f = "[z = 1 / 8 + sqrt (9 / 16) / 2, z = 1 / 8 + -1 * sqrt (9 / 16) / 2]" then
47.273 - case nxt of End_Proof' => () | _ => error "(-1/8 + (-1/4)*z + z^^^2 = (0::real)) CHANGED 1"
47.274 -else error "(-1/8 + (-1/4)*z + z^^^2 = (0::real)) CHANGED 2";
47.275 + case nxt of End_Proof' => () | _ => error "(-1/8 + (-1/4)*z + z \<up> 2 = (0::real)) CHANGED 1"
47.276 +else error "(-1/8 + (-1/4)*z + z \<up> 2 = (0::real)) CHANGED 2";
47.277
47.278 -"----------- equality (2 +(-1)*x + x^^^2 = (0::real)) ----------------------------------------";
47.279 -"----------- equality (2 +(-1)*x + x^^^2 = (0::real)) ----------------------------------------";
47.280 -"----------- equality (2 +(-1)*x + x^^^2 = (0::real)) ----------------------------------------";
47.281 +"----------- equality (2 +(-1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
47.282 +"----------- equality (2 +(-1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
47.283 +"----------- equality (2 +(-1)*x + x \<up> 2 = (0::real)) ----------------------------------------";
47.284 "----- d2_pqformula1_neg ------";
47.285 -val fmz = ["equality (2 +(-1)*x + x^^^2 = (0::real))", "solveFor x", "solutions L"];
47.286 +val fmz = ["equality (2 +(-1)*x + x \<up> 2 = (0::real))", "solveFor x", "solutions L"];
47.287 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.288 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.289 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.290 @@ -379,15 +379,15 @@
47.291 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.292 val asm = Ctree.get_assumptions pt p;
47.293 if f2str f = "[]" andalso
47.294 - UnparseC.terms asm = "[\"lhs (2 + -1 * x + x ^^^ 2 = 0) is_poly_in x\", " ^
47.295 - "\"lhs (2 + -1 * x + x ^^^ 2 = 0) has_degree_in x = 2\"]" then ()
47.296 -else error "polyeq.sml: diff.behav. in 2 +(-1)*x + x^^^2 = 0";
47.297 + UnparseC.terms asm = "[\"lhs (2 + -1 * x + x \<up> 2 = 0) is_poly_in x\", " ^
47.298 + "\"lhs (2 + -1 * x + x \<up> 2 = 0) has_degree_in x = 2\"]" then ()
47.299 +else error "polyeq.sml: diff.behav. in 2 +(-1)*x + x \<up> 2 = 0";
47.300
47.301 -"----------- equality (-2 +(-1)*x + 1*x^^^2 = 0) ---------------------------------------------";
47.302 -"----------- equality (-2 +(-1)*x + 1*x^^^2 = 0) ---------------------------------------------";
47.303 -"----------- equality (-2 +(-1)*x + 1*x^^^2 = 0) ---------------------------------------------";
47.304 +"----------- equality (-2 +(-1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
47.305 +"----------- equality (-2 +(-1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
47.306 +"----------- equality (-2 +(-1)*x + 1*x \<up> 2 = 0) ---------------------------------------------";
47.307 "----- d2_pqformula2 ------";
47.308 -val fmz = ["equality (-2 +(-1)*x + 1*x^^^2 = 0)", "solveFor x", "solutions L"];
47.309 +val fmz = ["equality (-2 +(-1)*x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.310 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.311 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.312 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.313 @@ -404,12 +404,12 @@
47.314 | _ => error "polyeq.sml: diff.behav. in -2 + (-1)*x + x^2 = 0 -> [x = 2, x = -1]";
47.315
47.316
47.317 -"----------- equality (-2 + x + x^^^2 = 0) ---------------------------------------------------";
47.318 -"----------- equality (-2 + x + x^^^2 = 0) ---------------------------------------------------";
47.319 -"----------- equality (-2 + x + x^^^2 = 0) ---------------------------------------------------";
47.320 +"----------- equality (-2 + x + x \<up> 2 = 0) ---------------------------------------------------";
47.321 +"----------- equality (-2 + x + x \<up> 2 = 0) ---------------------------------------------------";
47.322 +"----------- equality (-2 + x + x \<up> 2 = 0) ---------------------------------------------------";
47.323 "----- d2_pqformula3 ------";
47.324 (*EP-9*)
47.325 -val fmz = ["equality (-2 + x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.326 +val fmz = ["equality (-2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.327 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.328 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.329 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.330 @@ -426,11 +426,11 @@
47.331 | _ => error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0-> [x = 1, x = -2]";
47.332
47.333
47.334 -"----------- equality (2 + x + x^^^2 = 0) ----------------------------------------------------";
47.335 -"----------- equality (2 + x + x^^^2 = 0) ----------------------------------------------------";
47.336 -"----------- equality (2 + x + x^^^2 = 0) ----------------------------------------------------";
47.337 +"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
47.338 +"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
47.339 +"----------- equality (2 + x + x \<up> 2 = 0) ----------------------------------------------------";
47.340 "----- d2_pqformula3_neg ------";
47.341 -val fmz = ["equality (2 + x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.342 +val fmz = ["equality (2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.343 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.344 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.345 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.346 @@ -442,15 +442,15 @@
47.347
47.348 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.349 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.350 -"TODO 2 + x + x^^^2 = 0";
47.351 -"TODO 2 + x + x^^^2 = 0";
47.352 -"TODO 2 + x + x^^^2 = 0";
47.353 +"TODO 2 + x + x \<up> 2 = 0";
47.354 +"TODO 2 + x + x \<up> 2 = 0";
47.355 +"TODO 2 + x + x \<up> 2 = 0";
47.356
47.357 -"----------- equality (-2 + x + 1*x^^^2 = 0)) ------------------------------------------------";
47.358 -"----------- equality (-2 + x + 1*x^^^2 = 0)) ------------------------------------------------";
47.359 -"----------- equality (-2 + x + 1*x^^^2 = 0)) ------------------------------------------------";
47.360 +"----------- equality (-2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
47.361 +"----------- equality (-2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
47.362 +"----------- equality (-2 + x + 1*x \<up> 2 = 0)) ------------------------------------------------";
47.363 "----- d2_pqformula4 ------";
47.364 -val fmz = ["equality (-2 + x + 1*x^^^2 = 0)", "solveFor x", "solutions L"];
47.365 +val fmz = ["equality (-2 + x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.366 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.367 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.368 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.369 @@ -463,13 +463,13 @@
47.370 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.371 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.372 case f of Test_Out.FormKF "[x = 1, x = -2]" => ()
47.373 - | _ => error "polyeq.sml: diff.behav. in -2 + x + 1*x^^^2 = 0 -> [x = 1, x = -2]";
47.374 + | _ => error "polyeq.sml: diff.behav. in -2 + x + 1*x \<up> 2 = 0 -> [x = 1, x = -2]";
47.375
47.376 -"----------- equality (1*x + x^^^2 = 0) ----------------------------------------------------";
47.377 -"----------- equality (1*x + x^^^2 = 0) ----------------------------------------------------";
47.378 -"----------- equality (1*x + x^^^2 = 0) ----------------------------------------------------";
47.379 +"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
47.380 +"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
47.381 +"----------- equality (1*x + x \<up> 2 = 0) ----------------------------------------------------";
47.382 "----- d2_pqformula5 ------";
47.383 -val fmz = ["equality (1*x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.384 +val fmz = ["equality (1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.385 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.386 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.387 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.388 @@ -484,11 +484,11 @@
47.389 case f of Test_Out.FormKF "[x = 0, x = -1]" => ()
47.390 | _ => error "polyeq.sml: diff.behav. in 1*x + x^2 = 0 -> [x = 0, x = -1]";
47.391
47.392 -"----------- equality (1*x + 1*x^^^2 = 0) ----------------------------------------------------";
47.393 -"----------- equality (1*x + 1*x^^^2 = 0) ----------------------------------------------------";
47.394 -"----------- equality (1*x + 1*x^^^2 = 0) ----------------------------------------------------";
47.395 +"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
47.396 +"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
47.397 +"----------- equality (1*x + 1*x \<up> 2 = 0) ----------------------------------------------------";
47.398 "----- d2_pqformula6 ------";
47.399 -val fmz = ["equality (1*x + 1*x^^^2 = 0)", "solveFor x", "solutions L"];
47.400 +val fmz = ["equality (1*x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.401 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.402 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.403 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.404 @@ -503,12 +503,12 @@
47.405 case f of Test_Out.FormKF "[x = 0, x = -1]" => ()
47.406 | _ => error "polyeq.sml: diff.behav. in 1*x + 1*x^2 = 0 -> [x = 0, x = -1]";
47.407
47.408 -"----------- equality (x + x^^^2 = 0) ------------------------------------------------------";
47.409 -"----------- equality (x + x^^^2 = 0) ------------------------------------------------------";
47.410 -"----------- equality (x + x^^^2 = 0) ------------------------------------------------------";
47.411 +"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
47.412 +"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
47.413 +"----------- equality (x + x \<up> 2 = 0) ------------------------------------------------------";
47.414 "----- d2_pqformula7 ------";
47.415 (*EP-10*)
47.416 -val fmz = ["equality ( x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.417 +val fmz = ["equality ( x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.418 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.419 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.420 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.421 @@ -523,11 +523,11 @@
47.422 case f of Test_Out.FormKF "[x = 0, x = -1]" => ()
47.423 | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]";
47.424
47.425 -"----------- equality (x + 1*x^^^2 = 0) ------------------------------------------------------";
47.426 -"----------- equality (x + 1*x^^^2 = 0) ------------------------------------------------------";
47.427 -"----------- equality (x + 1*x^^^2 = 0) ------------------------------------------------------";
47.428 +"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
47.429 +"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
47.430 +"----------- equality (x + 1*x \<up> 2 = 0) ------------------------------------------------------";
47.431 "----- d2_pqformula8 ------";
47.432 -val fmz = ["equality (x + 1*x^^^2 = 0)", "solveFor x", "solutions L"];
47.433 +val fmz = ["equality (x + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.434 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.435 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.436 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.437 @@ -542,11 +542,11 @@
47.438 case f of Test_Out.FormKF "[x = 0, x = -1]" => ()
47.439 | _ => error "polyeq.sml: diff.behav. in x + 1*x^2 = 0 -> [x = 0, x = -1]";
47.440
47.441 -"----------- equality (-4 + x^^^2 = 0) -------------------------------------------------------";
47.442 -"----------- equality (-4 + x^^^2 = 0) -------------------------------------------------------";
47.443 -"----------- equality (-4 + x^^^2 = 0) -------------------------------------------------------";
47.444 +"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
47.445 +"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
47.446 +"----------- equality (-4 + x \<up> 2 = 0) -------------------------------------------------------";
47.447 "----- d2_pqformula9 ------";
47.448 -val fmz = ["equality (-4 + x^^^2 = 0)", "solveFor x", "solutions L"];
47.449 +val fmz = ["equality (-4 + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.450 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.451 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.452 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.453 @@ -561,11 +561,11 @@
47.454 | _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]";
47.455
47.456
47.457 -"----------- equality (4 + 1*x^^^2 = 0) -------------------------------------------------------";
47.458 -"----------- equality (4 + 1*x^^^2 = 0) -------------------------------------------------------";
47.459 -"----------- equality (4 + 1*x^^^2 = 0) -------------------------------------------------------";
47.460 +"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
47.461 +"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
47.462 +"----------- equality (4 + 1*x \<up> 2 = 0) -------------------------------------------------------";
47.463 "----- d2_pqformula9_neg ------";
47.464 -val fmz = ["equality (4 + 1*x^^^2 = 0)", "solveFor x", "solutions L"];
47.465 +val fmz = ["equality (4 + 1*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.466 val (dI',pI',mI') = ("PolyEq",["pqFormula", "degree_2", "polynomial", "univariate", "equation"],
47.467 ["PolyEq", "solve_d2_polyeq_pq_equation"]);
47.468 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.469 @@ -575,14 +575,14 @@
47.470 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.471 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.472 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.473 -"TODO 4 + 1*x^^^2 = 0";
47.474 -"TODO 4 + 1*x^^^2 = 0";
47.475 -"TODO 4 + 1*x^^^2 = 0";
47.476 +"TODO 4 + 1*x \<up> 2 = 0";
47.477 +"TODO 4 + 1*x \<up> 2 = 0";
47.478 +"TODO 4 + 1*x \<up> 2 = 0";
47.479
47.480 "-------------------- test thm's d2_abc_formulsxx[_neg]-----";
47.481 "-------------------- test thm's d2_abc_formulsxx[_neg]-----";
47.482 "-------------------- test thm's d2_abc_formulsxx[_neg]-----";
47.483 -val fmz = ["equality (-1 +(-1)*x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.484 +val fmz = ["equality (-1 +(-1)*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.485 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.486 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.487 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.488 @@ -596,10 +596,10 @@
47.489 case f of Test_Out.FormKF "[x = 1, x = -1 / 2]" => ()
47.490 | _ => error "polyeq.sml: diff.behav. in -1 + (-1)*x + 2*x^2 = 0 -> [x = 1, x = -1/2]";
47.491
47.492 -"----------- equality (1 +(-1)*x + 2*x^^^2 = 0) ----------------------------------------------";
47.493 -"----------- equality (1 +(-1)*x + 2*x^^^2 = 0) ----------------------------------------------";
47.494 -"----------- equality (1 +(-1)*x + 2*x^^^2 = 0) ----------------------------------------------";
47.495 -val fmz = ["equality (1 +(-1)*x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.496 +"----------- equality (1 +(-1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
47.497 +"----------- equality (1 +(-1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
47.498 +"----------- equality (1 +(-1)*x + 2*x \<up> 2 = 0) ----------------------------------------------";
47.499 +val fmz = ["equality (1 +(-1)*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.500 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.501 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.502 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.503 @@ -610,16 +610,16 @@
47.504 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.505 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.506 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.507 -"TODO 1 +(-1)*x + 2*x^^^2 = 0";
47.508 -"TODO 1 +(-1)*x + 2*x^^^2 = 0";
47.509 -"TODO 1 +(-1)*x + 2*x^^^2 = 0";
47.510 +"TODO 1 +(-1)*x + 2*x \<up> 2 = 0";
47.511 +"TODO 1 +(-1)*x + 2*x \<up> 2 = 0";
47.512 +"TODO 1 +(-1)*x + 2*x \<up> 2 = 0";
47.513
47.514
47.515 -"----------- equality (-1 + x + 2*x^^^2 = 0) -------------------------------------------------";
47.516 -"----------- equality (-1 + x + 2*x^^^2 = 0) -------------------------------------------------";
47.517 -"----------- equality (-1 + x + 2*x^^^2 = 0) -------------------------------------------------";
47.518 +"----------- equality (-1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
47.519 +"----------- equality (-1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
47.520 +"----------- equality (-1 + x + 2*x \<up> 2 = 0) -------------------------------------------------";
47.521 (*EP-11*)
47.522 -val fmz = ["equality (-1 + x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.523 +val fmz = ["equality (-1 + x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.524 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.525 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.526 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.527 @@ -636,10 +636,10 @@
47.528 | _ => error "polyeq.sml: diff.behav. in -1 + x + 2*x^2 = 0 -> [x = 1/2, x = -1]";
47.529
47.530
47.531 -"----------- equality (1 + x + 2*x^^^2 = 0) --------------------------------------------------";
47.532 -"----------- equality (1 + x + 2*x^^^2 = 0) --------------------------------------------------";
47.533 -"----------- equality (1 + x + 2*x^^^2 = 0) --------------------------------------------------";
47.534 -val fmz = ["equality (1 + x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.535 +"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
47.536 +"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
47.537 +"----------- equality (1 + x + 2*x \<up> 2 = 0) --------------------------------------------------";
47.538 +val fmz = ["equality (1 + x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.539 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.540 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.541 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.542 @@ -651,12 +651,12 @@
47.543 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.544 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.545 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.546 -"TODO 1 + x + 2*x^^^2 = 0";
47.547 -"TODO 1 + x + 2*x^^^2 = 0";
47.548 -"TODO 1 + x + 2*x^^^2 = 0";
47.549 +"TODO 1 + x + 2*x \<up> 2 = 0";
47.550 +"TODO 1 + x + 2*x \<up> 2 = 0";
47.551 +"TODO 1 + x + 2*x \<up> 2 = 0";
47.552
47.553
47.554 -val fmz = ["equality (-2 + 1*x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.555 +val fmz = ["equality (-2 + 1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.556 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.557 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.558 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.559 @@ -670,7 +670,7 @@
47.560 case f of Test_Out.FormKF "[x = 1, x = -2]" => ()
47.561 | _ => error "polyeq.sml: diff.behav. in -2 + 1*x + x^2 = 0 -> [x = 1, x = -2]";
47.562
47.563 -val fmz = ["equality ( 2 + 1*x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.564 +val fmz = ["equality ( 2 + 1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.565 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.566 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.567 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.568 @@ -681,12 +681,12 @@
47.569 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.570 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.571 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.572 -"TODO 2 + 1*x + x^^^2 = 0";
47.573 -"TODO 2 + 1*x + x^^^2 = 0";
47.574 -"TODO 2 + 1*x + x^^^2 = 0";
47.575 +"TODO 2 + 1*x + x \<up> 2 = 0";
47.576 +"TODO 2 + 1*x + x \<up> 2 = 0";
47.577 +"TODO 2 + 1*x + x \<up> 2 = 0";
47.578
47.579 (*EP-12*)
47.580 -val fmz = ["equality (-2 + x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.581 +val fmz = ["equality (-2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.582 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.583 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.584 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.585 @@ -700,7 +700,7 @@
47.586 case f of Test_Out.FormKF "[x = 1, x = -2]" => ()
47.587 | _ => error "polyeq.sml: diff.behav. in -2 + x + x^2 = 0 -> [x = 1, x = -2]";
47.588
47.589 -val fmz = ["equality ( 2 + x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.590 +val fmz = ["equality ( 2 + x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.591 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.592 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.593 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.594 @@ -711,12 +711,12 @@
47.595 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.596 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.597 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.598 -"TODO 2 + x + x^^^2 = 0";
47.599 -"TODO 2 + x + x^^^2 = 0";
47.600 -"TODO 2 + x + x^^^2 = 0";
47.601 +"TODO 2 + x + x \<up> 2 = 0";
47.602 +"TODO 2 + x + x \<up> 2 = 0";
47.603 +"TODO 2 + x + x \<up> 2 = 0";
47.604
47.605 (*EP-13*)
47.606 -val fmz = ["equality (-8 + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.607 +val fmz = ["equality (-8 + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.608 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.609 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.610 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.611 @@ -730,7 +730,7 @@
47.612 case f of Test_Out.FormKF "[x = 2, x = -2]" => ()
47.613 | _ => error "polyeq.sml: diff.behav. in -8 + 2*x^2 = 0 -> [x = 2, x = -2]";
47.614
47.615 -val fmz = ["equality ( 8+ 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.616 +val fmz = ["equality ( 8+ 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.617 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.618 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.619 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.620 @@ -740,12 +740,12 @@
47.621 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.622 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.623 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.624 -"TODO 8+ 2*x^^^2 = 0";
47.625 -"TODO 8+ 2*x^^^2 = 0";
47.626 -"TODO 8+ 2*x^^^2 = 0";
47.627 +"TODO 8+ 2*x \<up> 2 = 0";
47.628 +"TODO 8+ 2*x \<up> 2 = 0";
47.629 +"TODO 8+ 2*x \<up> 2 = 0";
47.630
47.631 (*EP-14*)
47.632 -val fmz = ["equality (-4 + x^^^2 = 0)", "solveFor x", "solutions L"];
47.633 +val fmz = ["equality (-4 + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.634 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.635 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.636 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.637 @@ -759,7 +759,7 @@
47.638 | _ => error "polyeq.sml: diff.behav. in -4 + x^2 = 0 -> [x = 2, x = -2]";
47.639
47.640
47.641 -val fmz = ["equality ( 4+ x^^^2 = 0)", "solveFor x", "solutions L"];
47.642 +val fmz = ["equality ( 4+ x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.643 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"], ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.644 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.645 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.646 @@ -768,12 +768,12 @@
47.647 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.648 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.649 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.650 -"TODO 4+ x^^^2 = 0";
47.651 -"TODO 4+ x^^^2 = 0";
47.652 -"TODO 4+ x^^^2 = 0";
47.653 +"TODO 4+ x \<up> 2 = 0";
47.654 +"TODO 4+ x \<up> 2 = 0";
47.655 +"TODO 4+ x \<up> 2 = 0";
47.656
47.657 (*EP-15*)
47.658 -val fmz = ["equality (2*x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.659 +val fmz = ["equality (2*x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.660 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.661 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.662 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.663 @@ -787,7 +787,7 @@
47.664 case f of Test_Out.FormKF "[x = 0, x = -1]" => ()
47.665 | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]";
47.666
47.667 -val fmz = ["equality (1*x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.668 +val fmz = ["equality (1*x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.669 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.670 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.671 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.672 @@ -802,7 +802,7 @@
47.673 | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]";
47.674
47.675 (*EP-16*)
47.676 -val fmz = ["equality (x + 2*x^^^2 = 0)", "solveFor x", "solutions L"];
47.677 +val fmz = ["equality (x + 2*x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.678 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.679 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.680 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.681 @@ -817,7 +817,7 @@
47.682 | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1 / 2]";
47.683
47.684 (*EP-//*)
47.685 -val fmz = ["equality (x + x^^^2 = 0)", "solveFor x", "solutions L"];
47.686 +val fmz = ["equality (x + x \<up> 2 = 0)", "solveFor x", "solutions L"];
47.687 val (dI',pI',mI') = ("PolyEq",["abcFormula", "degree_2", "polynomial", "univariate", "equation"],
47.688 ["PolyEq", "solve_d2_polyeq_abc_equation"]);
47.689 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
47.690 @@ -832,15 +832,15 @@
47.691 | _ => error "polyeq.sml: diff.behav. in x + x^2 = 0 -> [x = 0, x = -1]";
47.692
47.693
47.694 -"----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.695 -"----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.696 -"----------- (-8 - 2*x + x^^^2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.697 +"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.698 +"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.699 +"----------- (-8 - 2*x + x \<up> 2 = 0), (*Schalk 2, S.67 Nr.31.b----";
47.700 (*stopped du to TODO.txt WN111014.TODO calculate_Poly < calculate_Rational < calculate_RootRat
47.701 see --- val rls = calculate_RootRat > calculate_Rational ---
47.702 calculate_RootRat was a TODO with 2002, requires re-design.
47.703 -see also --- (-8 - 2*x + x^^^2 = 0), by rewriting --- below
47.704 +see also --- (-8 - 2*x + x \<up> 2 = 0), by rewriting --- below
47.705 *)
47.706 - val fmz = ["equality (-8 - 2*x + x^^^2 = 0)", (*Schalk 2, S.67 Nr.31.b*)
47.707 + val fmz = ["equality (-8 - 2*x + x \<up> 2 = 0)", (*Schalk 2, S.67 Nr.31.b*)
47.708 "solveFor x", "solutions L"];
47.709 val (dI',pI',mI') =
47.710 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
47.711 @@ -853,27 +853,27 @@
47.712 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.713 (*Apply_Method ("PolyEq", "complete_square")*)
47.714 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.715 -(*"-8 - 2 * x + x ^^^ 2 = 0", nxt = Rewrite_Set_Inst ... "complete_square*)
47.716 +(*"-8 - 2 * x + x \<up> 2 = 0", nxt = Rewrite_Set_Inst ... "complete_square*)
47.717 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.718 -(*"-8 + (2 / 2 - x) ^^^ 2 = (2 / 2) ^^^ 2", nxt = Rewrite("square_explicit1"*)
47.719 +(*"-8 + (2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2", nxt = Rewrite("square_explicit1"*)
47.720 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.721 -(*"(2 / 2 - x) ^^^ 2 = (2 / 2) ^^^ 2 - -8" nxt = Rewrite("root_plus_minus*)
47.722 +(*"(2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2 - -8" nxt = Rewrite("root_plus_minus*)
47.723 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.724 -(*"2 / 2 - x = sqrt ((2 / 2) ^^^ 2 - -8) |
47.725 - 2 / 2 - x = - sqrt ((2 / 2) ^^^ 2 - -8)" nxt = Rewr_Inst("bdv_explicit2"*)
47.726 +(*"2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |
47.727 + 2 / 2 - x = - sqrt ((2 / 2) \<up> 2 - -8)" nxt = Rewr_Inst("bdv_explicit2"*)
47.728 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.729 -(*"2 / 2 - x = sqrt ((2 / 2) ^^^ 2 - -8) |
47.730 - -1*x = - (2 / 2) + - sqrt ((2 / 2) ^^^ 2 - -8)"nxt = R_Inst("bdv_explt2"*)
47.731 +(*"2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |
47.732 + -1*x = - (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8)"nxt = R_Inst("bdv_explt2"*)
47.733 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.734 -(*"-1 * x = - (2 / 2) + sqrt ((2 / 2) ^^^ 2 - -8) |
47.735 - -1 * x = (- (2 / 2) + - sqrt ((2 / 2) ^^^ 2 - -8))"nxt = bdv_explicit3*)
47.736 +(*"-1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |
47.737 + -1 * x = (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))"nxt = bdv_explicit3*)
47.738 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.739 -(*"-1 * x = - (2 / 2) + sqrt ((2 / 2) ^^^ 2 - -8) |
47.740 - x = -1 * (- (2 / 2) + - sqrt ((2 / 2) ^^^ 2 - -8))" nxt = bdv_explicit3*)
47.741 +(*"-1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |
47.742 + x = -1 * (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))" nxt = bdv_explicit3*)
47.743 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.744 -(*"x = -1 * (- (2 / 2) + sqrt ((2 / 2) ^^^ 2 - -8)) |
47.745 - x = -1 * (- (2 / 2) + - sqrt ((2 / 2) ^^^ 2 - -8))"nxt = calculate_Rational
47.746 - NOT IMPLEMENTED SINCE 2002 ------------------------------^^^^^^^^^^^^^^^^^^*)
47.747 +(*"x = -1 * (- (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8)) |
47.748 + x = -1 * (- (2 / 2) + - sqrt ((2 / 2) \<up> 2 - -8))"nxt = calculate_Rational
47.749 + NOT IMPLEMENTED SINCE 2002 ------------------------------ \<up> \<up> \<up> \<up> \<up> \<up> *)
47.750 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.751 (*"x = -2 | x = 4" nxt = Or_to_List*)
47.752 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
47.753 @@ -884,70 +884,70 @@
47.754 | _ => error "polyeq.sml: diff.behav. in [x = -2, x = 4]";
47.755 *)
47.756 if f2str f =
47.757 -"[x = -1 * -1 + -1 * sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8),\n x = -1 * -1 + -1 * (-1 * sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8))]"
47.758 -(*"[x = -1 * -1 + -1 * sqrt (1 ^^^ 2 - -8),\n x = -1 * -1 + -1 * (-1 * sqrt (1 ^^^ 2 - -8))]"*)
47.759 +"[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))]"
47.760 +(*"[x = -1 * -1 + -1 * sqrt (1 \<up> 2 - -8),\n x = -1 * -1 + -1 * (-1 * sqrt (1 \<up> 2 - -8))]"*)
47.761 then () else error "polyeq.sml corrected?behav. in [x = -2, x = 4]";
47.762
47.763
47.764 -"----------- (-8 - 2*x + x^^^2 = 0), by rewriting ---------------";
47.765 -"----------- (-8 - 2*x + x^^^2 = 0), by rewriting ---------------";
47.766 -"----------- (-8 - 2*x + x^^^2 = 0), by rewriting ---------------";
47.767 +"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
47.768 +"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
47.769 +"----------- (-8 - 2*x + x \<up> 2 = 0), by rewriting ---------------";
47.770 (*stopped du to TODO.txt WN111014.TODO calculate_Poly < calculate_Rational < calculate_RootRat
47.771 see --- val rls = calculate_RootRat > calculate_Rational ---*)
47.772 val thy = @{theory PolyEq};
47.773 val ctxt = Proof_Context.init_global thy;
47.774 val inst = [((the o (parseNEW ctxt)) "bdv::real", (the o (parseNEW ctxt)) "x::real")];
47.775 -val t = (the o (parseNEW ctxt)) "-8 - 2*x + x^^^2 = (0::real)";
47.776 +val t = (the o (parseNEW ctxt)) "-8 - 2*x + x \<up> 2 = (0::real)";
47.777
47.778 val rls = complete_square;
47.779 val SOME (t,asm) = rewrite_set_inst_ thy true inst rls t;
47.780 -UnparseC.term t = "-8 + (2 / 2 - x) ^^^ 2 = (2 / 2) ^^^ 2";
47.781 +UnparseC.term t = "-8 + (2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2";
47.782
47.783 val thm = ThmC.numerals_to_Free @{thm square_explicit1};
47.784 val SOME (t,asm) = rewrite_ thy dummy_ord Rule_Set.Empty true thm t;
47.785 -UnparseC.term t = "(2 / 2 - x) ^^^ 2 = (2 / 2) ^^^ 2 - -8";
47.786 +UnparseC.term t = "(2 / 2 - x) \<up> 2 = (2 / 2) \<up> 2 - -8";
47.787
47.788 val thm = ThmC.numerals_to_Free @{thm root_plus_minus};
47.789 val SOME (t,asm) = rewrite_ thy dummy_ord PolyEq_erls true thm t;
47.790 -UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) ^^^ 2 - -8) |"^
47.791 - "\n2 / 2 - x = -1 * sqrt ((2 / 2) ^^^ 2 - -8)";
47.792 +UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
47.793 + "\n2 / 2 - x = -1 * sqrt ((2 / 2) \<up> 2 - -8)";
47.794
47.795 (*the thm bdv_explicit2* here required to be constrained to ::real*)
47.796 val thm = ThmC.numerals_to_Free @{thm bdv_explicit2};
47.797 val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
47.798 -UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) ^^^ 2 - -8) |"^
47.799 - "\n-1 * x = - (2 / 2) + -1 * sqrt ((2 / 2) ^^^ 2 - -8)";
47.800 +UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
47.801 + "\n-1 * x = - (2 / 2) + -1 * sqrt ((2 / 2) \<up> 2 - -8)";
47.802
47.803 val thm = ThmC.numerals_to_Free @{thm bdv_explicit3};
47.804 val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
47.805 -UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) ^^^ 2 - -8) |"^
47.806 - "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) ^^^ 2 - -8))";
47.807 +UnparseC.term t = "2 / 2 - x = sqrt ((2 / 2) \<up> 2 - -8) |"^
47.808 + "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) \<up> 2 - -8))";
47.809
47.810 val thm = ThmC.numerals_to_Free @{thm bdv_explicit2};
47.811 val SOME (t,asm) = rewrite_inst_ thy dummy_ord Rule_Set.Empty true inst thm t;
47.812 -UnparseC.term t = "-1 * x = - (2 / 2) + sqrt ((2 / 2) ^^^ 2 - -8) |"^
47.813 - "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) ^^^ 2 - -8))";
47.814 +UnparseC.term t = "-1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |"^
47.815 + "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) \<up> 2 - -8))";
47.816
47.817 val rls = calculate_RootRat;
47.818 val SOME (t,asm) = rewrite_set_ thy true rls t;
47.819 if UnparseC.term t =
47.820 - "-1 * x = -1 + sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8) \<or>\nx = -1 * -1 + -1 * (-1 * sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8))"
47.821 -(*"-1 * x = -1 + sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8) |\nx = -1 * -1 + -1 * (-1 * sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8))"..isabisac15*)
47.822 -then () else error "(-8 - 2*x + x^^^2 = 0), by rewriting -- ERROR INDICATES IMPROVEMENT";
47.823 + "-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))"
47.824 +(*"-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*)
47.825 +then () else error "(-8 - 2*x + x \<up> 2 = 0), by rewriting -- ERROR INDICATES IMPROVEMENT";
47.826 (*SHOULD BE: UnparseC.term = "x = -2 | x = 4;*)
47.827
47.828
47.829 -"-------------------- (3 - 10*x + 3*x^^^2 = 0), ----------------------";
47.830 -"-------------------- (3 - 10*x + 3*x^^^2 = 0), ----------------------";
47.831 -"-------------------- (3 - 10*x + 3*x^^^2 = 0), ----------------------";
47.832 +"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
47.833 +"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
47.834 +"-------------------- (3 - 10*x + 3*x \<up> 2 = 0), ----------------------";
47.835 "---- test the erls ----";
47.836 - val t1 = (Thm.term_of o the o (TermC.parse thy)) "0 <= (10/3/2)^^^2 - 1";
47.837 + val t1 = (Thm.term_of o the o (TermC.parse thy)) "0 <= (10/3/2) \<up> 2 - 1";
47.838 val SOME (t,_) = rewrite_set_ @{theory PolyEq} false PolyEq_erls t1;
47.839 val t' = UnparseC.term t;
47.840 (*if t'= "HOL.True" then ()
47.841 else error "polyeq.sml: diff.behav. in 'rewrite_set_.. PolyEq_erls";*)
47.842 (* *)
47.843 - val fmz = ["equality (3 - 10*x + 3*x^^^2 = 0)",
47.844 + val fmz = ["equality (3 - 10*x + 3*x \<up> 2 = 0)",
47.845 "solveFor x", "solutions L"];
47.846 val (dI',pI',mI') =
47.847 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
47.848 @@ -963,10 +963,10 @@
47.849 (*Apply_Method ("PolyEq", "complete_square")*)
47.850 val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f;
47.851
47.852 -"----------- (-16 + 4*x + 2*x^^^2 = 0), --------------------------";
47.853 -"----------- (-16 + 4*x + 2*x^^^2 = 0), --------------------------";
47.854 -"----------- (-16 + 4*x + 2*x^^^2 = 0), --------------------------";
47.855 - val fmz = ["equality (-16 + 4*x + 2*x^^^2 = 0)",
47.856 +"----------- (-16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
47.857 +"----------- (-16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
47.858 +"----------- (-16 + 4*x + 2*x \<up> 2 = 0), --------------------------";
47.859 + val fmz = ["equality (-16 + 4*x + 2*x \<up> 2 = 0)",
47.860 "solveFor x", "solutions L"];
47.861 val (dI',pI',mI') =
47.862 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
48.1 --- a/test/Tools/isac/Knowledge/polyeq-2.sml Mon Apr 19 20:44:18 2021 +0200
48.2 +++ b/test/Tools/isac/Knowledge/polyeq-2.sml Tue Apr 20 16:58:44 2021 +0200
48.3 @@ -9,11 +9,11 @@
48.4 "-----------------------------------------------------------------";
48.5 "table of contents -----------------------------------------------";
48.6 "-----------------------------------------------------------------";
48.7 -"----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.8 -"----------- (-64 + x^^^2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.9 -"----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.10 +"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.11 +"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.12 +"----------- (-147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.13 "----------- (3*x - 1 - (5*x - (2 - 4*x)) = -11),(*Schalk Is86Bsp5";
48.14 -"----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37";
48.15 +"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
48.16 "----------- rls make_polynomial_in ------------------------------";
48.17 "----------- interSteps ([1],Res); on Schalk Is86Bsp5-------------";
48.18 "----------- rls d2_polyeq_bdv_only_simplify ---------------------";
48.19 @@ -21,10 +21,10 @@
48.20 "-----------------------------------------------------------------";
48.21
48.22
48.23 -"----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.24 -"----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.25 -"----------- (a*b - (a+b)*x + x^^^2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.26 - val fmz = ["equality (a*b - (a+b)*x + x^^^2 = 0)",
48.27 +"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.28 +"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.29 +"----------- (a*b - (a+b)*x + x \<up> 2 = 0), (*Schalk 2,S.68Nr.44.a*)";
48.30 + val fmz = ["equality (a*b - (a+b)*x + x \<up> 2 = 0)",
48.31 "solveFor x", "solutions L"];
48.32 val (dI',pI',mI') =
48.33 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
48.34 @@ -53,16 +53,16 @@
48.35 Form'
48.36 (Test_Out.FormKF
48.37 (~1,EdUndef,0,Nundef,
48.38 - "[x = (a + b) / 2 + -1 * sqrt ((a + b) ^^^ 2 / 2 ^^^ 2 - a * b),\n x = (a + b) / 2 + sqrt ((a + b) ^^^ 2 / 2 ^^^ 2 - a * b)]"))
48.39 + "[x = (a + b) / 2 + -1 * sqrt ((a + b) \<up> 2 / 2 \<up> 2 - a * b),\n x = (a + b) / 2 + sqrt ((a + b) \<up> 2 / 2 \<up> 2 - a * b)]"))
48.40 => ()
48.41 - | _ => error "polyeq.sml: diff.behav. in a*b - (a+b)*x + x^^^2 = 0";
48.42 + | _ => error "polyeq.sml: diff.behav. in a*b - (a+b)*x + x \<up> 2 = 0";
48.43 this will be simplified [x = a, x = b] to by Factor.ML*)
48.44
48.45
48.46 -"----------- (-64 + x^^^2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.47 -"----------- (-64 + x^^^2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.48 -"----------- (-64 + x^^^2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.49 - val fmz = ["equality (-64 + x^^^2 = 0)",(*Schalk 2, S.66 Nr.1.a~*)
48.50 +"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.51 +"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.52 +"----------- (-64 + x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.a~--------*)";
48.53 + val fmz = ["equality (-64 + x \<up> 2 = 0)",(*Schalk 2, S.66 Nr.1.a~*)
48.54 "solveFor x", "solutions L"];
48.55 val (dI',pI',mI') =
48.56 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
48.57 @@ -86,10 +86,10 @@
48.58 | _ => error "polyeq.sml: diff.behav. in [x = 8, x = -8]";
48.59 *)
48.60
48.61 -"----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.62 -"----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.63 -"----------- (-147 + 3*x^^^2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.64 -val fmz = ["equality (-147 + 3*x^^^2 = 0)",(*Schalk 2, S.66 Nr.1.b*)
48.65 +"----------- (-147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.66 +"----------- (-147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.67 +"----------- (-147 + 3*x \<up> 2 = 0), (*Schalk 2, S.66 Nr.1.b------*)";
48.68 +val fmz = ["equality (-147 + 3*x \<up> 2 = 0)",(*Schalk 2, S.66 Nr.1.b*)
48.69 "solveFor x", "solutions L"];
48.70 val (dI',pI',mI') =
48.71 ("PolyEq",["degree_2", "expanded", "univariate", "equation"],
48.72 @@ -150,11 +150,11 @@
48.73 | _ => error "polyeq.sml: diff.behav. in [x = 2]";
48.74
48.75
48.76 -"----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37";
48.77 -"----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37";
48.78 -"----------- ((x+1)*(x+2) - (3*x - 2)^^^2=.. Schalk II s.68 Bsp 37";
48.79 +"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
48.80 +"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
48.81 +"----------- ((x+1)*(x+2) - (3*x - 2) \<up> 2=.. Schalk II s.68 Bsp 37";
48.82 (*is in rlang.sml, too*)
48.83 -val fmz = ["equality ((x+1)*(x+2) - (3*x - 2)^^^2=(2*x - 1)^^^2+(3*x - 1)*(x+1))",
48.84 +val fmz = ["equality ((x+1)*(x+2) - (3*x - 2) \<up> 2=(2*x - 1) \<up> 2+(3*x - 1)*(x+1))",
48.85 "solveFor x", "solutions L"];
48.86 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
48.87 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
48.88 @@ -190,11 +190,11 @@
48.89 | _ => error "polyeq.sml: diff.behav. in [x = 2 / 15, x = 1]";
48.90
48.91
48.92 -" -4 + x^^^2 =0 ";
48.93 -" -4 + x^^^2 =0 ";
48.94 -" -4 + x^^^2 =0 ";
48.95 -val fmz = ["equality ( -4 + x^^^2 =0)", "solveFor x", "solutions L"];
48.96 -(* val fmz = ["equality (1 + x^^^2 =0)", "solveFor x", "solutions L"];*)
48.97 +" -4 + x \<up> 2 =0 ";
48.98 +" -4 + x \<up> 2 =0 ";
48.99 +" -4 + x \<up> 2 =0 ";
48.100 +val fmz = ["equality ( -4 + x \<up> 2 =0)", "solveFor x", "solutions L"];
48.101 +(* val fmz = ["equality (1 + x \<up> 2 =0)", "solveFor x", "solutions L"];*)
48.102 (*val fmz = ["equality (0 =0)", "solveFor x", "solutions L"];*)
48.103 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
48.104 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
48.105 @@ -223,10 +223,10 @@
48.106 (*WN.19.3.03 ---^-*)
48.107
48.108 (*3(c)*)val (bdv,v) = (TermC.str2term "bdv", TermC.str2term "p");
48.109 -val t = TermC.str2term "y ^^^ 2 + -2 * (x * p) = 0";
48.110 +val t = TermC.str2term "y \<up> 2 + -2 * (x * p) = 0";
48.111 val SOME (t',_) = rewrite_set_inst_ thy false [(bdv,v)] make_polynomial_in t;
48.112 -if UnparseC.term t' = "y ^^^ 2 + -2 * x * p = 0" then ()
48.113 -else error "make_polynomial_in (y ^^^ 2 + -2 * (x * p) = 0)";
48.114 +if UnparseC.term t' = "y \<up> 2 + -2 * x * p = 0" then ()
48.115 +else error "make_polynomial_in (y \<up> 2 + -2 * (x * p) = 0)";
48.116
48.117 (*3(d)*)val (bdv,v) = (TermC.str2term "''bdv''", TermC.str2term "x2");
48.118 val t = TermC.str2term
48.119 @@ -247,11 +247,11 @@
48.120
48.121 (*3(e)*)val (bdv,v) = (TermC.str2term "bdv", TermC.str2term "a");
48.122 val t = TermC.str2term
48.123 -"A ^^^ 2 + c ^^^ 2 * (c / d) ^^^ 2 + (-4 * (c / d) ^^^ 2) * a ^^^ 2 = 0";
48.124 +"A \<up> 2 + c \<up> 2 * (c / d) \<up> 2 + (-4 * (c / d) \<up> 2) * a \<up> 2 = 0";
48.125 val NONE = rewrite_set_inst_ thy false [(bdv,v)] make_polynomial_in t;
48.126 (* the invisible parentheses are as expected *)
48.127
48.128 -val t = TermC.str2term "(x + 1) * (x + 2) - (3 * x - 2) ^^^ 2 - ((2 * x - 1) ^^^ 2 + (3 * x - 1) * (x + 1)) = 0";
48.129 +val t = TermC.str2term "(x + 1) * (x + 2) - (3 * x - 2) \<up> 2 - ((2 * x - 1) \<up> 2 + (3 * x - 1) * (x + 1)) = 0";
48.130 Rewrite.trace_on:=(*true*)false;
48.131 rewrite_set_ thy false expand_binoms t;
48.132 Rewrite.trace_on:=false;
48.133 @@ -276,7 +276,7 @@
48.134 "----------- rls d2_polyeq_bdv_only_simplify ---------------------";
48.135 "----------- rls d2_polyeq_bdv_only_simplify ---------------------";
48.136 "----------- rls d2_polyeq_bdv_only_simplify ---------------------";
48.137 -val t = TermC.str2term "-6 * x + 5 * x ^^^ 2 = (0::real)";
48.138 +val t = TermC.str2term "-6 * x + 5 * x \<up> 2 = (0::real)";
48.139 val subst = [(TermC.str2term "(bdv::real)", TermC.str2term "(x::real)")];
48.140 val SOME (t''''', _) = rewrite_set_inst_ thy true subst d2_polyeq_bdv_only_simplify t;
48.141 (* steps in rls d2_polyeq_bdv_only_simplify:*)
49.1 --- a/test/Tools/isac/Knowledge/polyminus.sml Mon Apr 19 20:44:18 2021 +0200
49.2 +++ b/test/Tools/isac/Knowledge/polyminus.sml Tue Apr 20 16:58:44 2021 +0200
49.3 @@ -45,13 +45,13 @@
49.4 SOME ("3 * a ist_monom = True", _) => ()
49.5 | _ => error "polyminus.sml: 3 * a ist_monom = True";
49.6
49.7 -case eval_ist_monom 0 0 (TermC.str2term "(a^^^2) ist_monom") 0 of
49.8 - SOME ("a ^^^ 2 ist_monom = True", _) => ()
49.9 - | _ => error "polyminus.sml: a^^^2 ist_monom = True";
49.10 +case eval_ist_monom 0 0 (TermC.str2term "(a \<up> 2) ist_monom") 0 of
49.11 + SOME ("a \<up> 2 ist_monom = True", _) => ()
49.12 + | _ => error "polyminus.sml: a \<up> 2 ist_monom = True";
49.13
49.14 -case eval_ist_monom 0 0 (TermC.str2term "(3*a^^^2) ist_monom") 0 of
49.15 - SOME ("3 * a ^^^ 2 ist_monom = True", _) => ()
49.16 - | _ => error "polyminus.sml: 3*a^^^2 ist_monom = True";
49.17 +case eval_ist_monom 0 0 (TermC.str2term "(3*a \<up> 2) ist_monom") 0 of
49.18 + SOME ("3 * a \<up> 2 ist_monom = True", _) => ()
49.19 + | _ => error "polyminus.sml: 3*a \<up> 2 ist_monom = True";
49.20
49.21 case eval_ist_monom 0 0 (TermC.str2term "(a*b) ist_monom") 0 of
49.22 SOME ("a * b ist_monom = True", _) => ()
49.23 @@ -139,13 +139,13 @@
49.24 SOME ("10 * g kleiner f = False", _) => ()
49.25 | _ => error "polyminus.sml: 10 * g kleiner f = False";
49.26
49.27 -case eval_kleiner 0 0 (TermC.str2term "(a^^^2) kleiner b") 0 of
49.28 - SOME ("a ^^^ 2 kleiner b = True", _) => ()
49.29 - | _ => error "polyminus.sml: a ^^^ 2 kleiner b = True";
49.30 +case eval_kleiner 0 0 (TermC.str2term "(a \<up> 2) kleiner b") 0 of
49.31 + SOME ("a \<up> 2 kleiner b = True", _) => ()
49.32 + | _ => error "polyminus.sml: a \<up> 2 kleiner b = True";
49.33
49.34 -case eval_kleiner 0 0 (TermC.str2term "(3*a^^^2) kleiner b") 0 of
49.35 - SOME ("3 * a ^^^ 2 kleiner b = True", _) => ()
49.36 - | _ => error "polyminus.sml: 3 * a ^^^ 2 kleiner b = True";
49.37 +case eval_kleiner 0 0 (TermC.str2term "(3*a \<up> 2) kleiner b") 0 of
49.38 + SOME ("3 * a \<up> 2 kleiner b = True", _) => ()
49.39 + | _ => error "polyminus.sml: 3 * a \<up> 2 kleiner b = True";
49.40
49.41 case eval_kleiner 0 0 (TermC.str2term "(a*b) kleiner c") 0 of
49.42 SOME ("a * b kleiner c = True", _) => ()
49.43 @@ -414,12 +414,12 @@
49.44 autoCalculate 1 (Steps 1);
49.45 autoCalculate 1 (Steps 1);
49.46 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.47 -"----- 1 ^^^";
49.48 +"----- 1 \<up> ";
49.49 fetchApplicableTactics 1 0 p;
49.50 val appltacs = specific_from_prog pt p;
49.51 applyTactic 1 p (hd appltacs) (*addiere_x_plus_minus*);
49.52 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.53 -"----- 2 ^^^";
49.54 +"----- 2 \<up> ";
49.55 (*Rewrite.trace_on := true; ..stopped Test_Isac.thy*)
49.56 val erls = erls_ordne_alphabetisch;
49.57 val t = TermC.str2term "- 9 + 12 + 5 * e - 7 * e + (6 - 4) * f - 8 * g + 10 * g";
49.58 @@ -440,21 +440,21 @@
49.59
49.60 applyTactic 1 p (hd (specific_from_prog pt p)) (*tausche_minus*);
49.61 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.62 -"----- 3 ^^^";
49.63 +"----- 3 \<up> ";
49.64 applyTactic 1 p (hd (specific_from_prog pt p)) (**);
49.65 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.66 -"----- 4 ^^^";
49.67 +"----- 4 \<up> ";
49.68 applyTactic 1 p (hd (specific_from_prog pt p)) (**);
49.69 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.70 -"----- 5 ^^^";
49.71 +"----- 5 \<up> ";
49.72 applyTactic 1 p (hd (specific_from_prog pt p)) (**);
49.73 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.74 -"----- 6 ^^^";
49.75 +"----- 6 \<up> ";
49.76
49.77 (*<CALCMESSAGE> failure </CALCMESSAGE>
49.78 applyTactic 1 p (hd (specific_from_prog pt p)) (**);
49.79 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.80 -"----- 7 ^^^";
49.81 +"----- 7 \<up> ";
49.82 *)
49.83 autoCalculate 1 CompleteCalc;
49.84 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.85 @@ -531,7 +531,7 @@
49.86 autoCalculate 1 CompleteCalc;
49.87 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
49.88 if p = ([], Res) andalso
49.89 - UnparseC.term (get_obj g_res pt (fst p)) = "-2 + 12 * a ^^^ 2 + 5 * a"
49.90 + UnparseC.term (get_obj g_res pt (fst p)) = "-2 + 12 * a \<up> 2 + 5 * a"
49.91 then () else error "polyminus.sml: Vereinfache (2*u - 5 - (3 - ...";
49.92
49.93 "----------- pbl binom polynom vereinfachen: cube ----------------";
50.1 --- a/test/Tools/isac/Knowledge/rateq.sml Mon Apr 19 20:44:18 2021 +0200
50.2 +++ b/test/Tools/isac/Knowledge/rateq.sml Tue Apr 20 16:58:44 2021 +0200
50.3 @@ -35,7 +35,7 @@
50.4 val result = UnparseC.term t_;
50.5 if result <> "False" then error "rateq.sml: new behaviour 3:" else ();
50.6
50.7 -val t = (Thm.term_of o the o (TermC.parse thy)) "(3 + x^^^2 + 1/(x^^^2+3)=1) is_ratequation_in x";
50.8 +val t = (Thm.term_of o the o (TermC.parse thy)) "(3 + x \<up> 2 + 1/(x \<up> 2+3)=1) is_ratequation_in x";
50.9 val SOME (t_,_) = rewrite_set_ thy false RatEq_prls t;
50.10 val result = UnparseC.term t_;
50.11 if result <> "True" then error "rateq.sml: new behaviour 4:" else ();
50.12 @@ -44,7 +44,7 @@
50.13 (Problem.from_store ["rational", "univariate", "equation"]);
50.14 case result of M_Match.NoMatch' _ => () | _ => error "rateq.sml: new behaviour: 5";
50.15
50.16 -val result = M_Match.match_pbl ["equality (3 + x^^^2 + 1/(x^^^2+3)=1)", "solveFor x", "solutions L"]
50.17 +val result = M_Match.match_pbl ["equality (3 + x \<up> 2 + 1/(x \<up> 2+3)=1)", "solveFor x", "solutions L"]
50.18 (Problem.from_store ["rational", "univariate", "equation"]);
50.19 case result of M_Match.Matches' _ => () | _ => error "rateq.sml: new behaviour: 6";
50.20
50.21 @@ -125,7 +125,7 @@
50.22 (t as (Const ("Prog_Tac.Check'_elementwise",_) $ _ $ _ ))) = (E, a, v, t);
50.23 val Program.Tac tm = Program.Tac (subst_atomic E t);
50.24 UnparseC.term tm = "Check_elementwise [x = 1 / 5] {v_v. Assumptions}";
50.25 -(* ------ ^^^ ----- ? "x" ?*)
50.26 +(* ------ \<up> ----- ? "x" ?*)
50.27 "~~~~~ to check_leaf return val:"; val ((Program.Tac stac, a')) = ((Program.Tac (subst_atomic E t), NONE));
50.28 val stac' = eval_prog_expr (ThyC.get_theory thy) srls (subst_atomic (upd_env_opt E (a,v)) stac);
50.29 UnparseC.term stac' = "Check_elementwise [x = 1 / 5] {v_v. Assumptions}";
50.30 @@ -200,7 +200,7 @@
50.31 (case nxt of
50.32 ("Add_Given", Add_Given "solveFor x") =>
50.33 (case f of
50.34 - Test_Out.PpcKF (Problem [], {Given = [Incompl "solveFor", Correct "equality (320 + 128 * x + -16 * x ^^^ 2 = 0)"], ...}) => ()
50.35 + Test_Out.PpcKF (Problem [], {Given = [Incompl "solveFor", Correct "equality (320 + 128 * x + -16 * x \<up> 2 = 0)"], ...}) => ()
50.36 | _ => error ("S.68, Bsp.: 40 PblObj changed"))
50.37 | _ => error ("S.68, Bsp.: 40 changed nxt =" ^ Tactic.input_to_string (snd nxt)));
50.38
50.39 @@ -223,7 +223,7 @@
50.40 "----------- remove x = 0 from [x = 0, x = 6 / 5] ----------------------------------------------";
50.41 "----------- remove x = 0 from [x = 0, x = 6 / 5] ----------------------------------------------";
50.42 (*ER-7*) (*Schalk I s.87 Bsp 55b*)
50.43 -val fmz = ["equality (x/(x^^^2 - 6*x+9) - 1/(x^^^2 - 3*x) =1/x)",
50.44 +val fmz = ["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
50.45 "solveFor x", "solutions L"];
50.46 val spec = ("RatEq",["univariate", "equation"],["no_met"]);
50.47 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, spec)]; (* 0. specify-phase *)
50.48 @@ -237,14 +237,14 @@
50.49
50.50 val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* 0. solve-phase*)
50.51 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
50.52 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)";
50.53 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)";
50.54
50.55 (*+*)if eq_set op = (Ctree.get_assumptions pt p |> map UnparseC.term,
50.56 (*+*) ["x \<noteq> 0",
50.57 -(*+*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0",
50.58 -(*+*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x"])
50.59 +(*+*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0",
50.60 +(*+*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x"])
50.61 (*+*)then () else error "assumptions before 1. Subproblem CHANGED";
50.62 -(*+*)if p = ([3], Res) andalso f2str f = "(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)"
50.63 +(*+*)if p = ([3], Res) andalso f2str f = "(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)"
50.64 (*+*)then
50.65 (*+*) ((case nxt of Subproblem ("PolyEq", ["normalise", "polynomial", "univariate", "equation"]) => ()
50.66 (*+*) | _ => error ("S.68, Bsp.: 40 nxt =" ^ Tactic.input_to_string nxt)))
50.67 @@ -261,9 +261,9 @@
50.68
50.69 val (p,_,f,nxt,_,pt) = me nxt p [] pt; (* 1. solve-phase *)
50.70 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
50.71 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "-6 * x + 5 * x ^^^ 2 = 0";
50.72 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; f2str f = "-6 * x + 5 * x \<up> 2 = 0";
50.73
50.74 -if p = ([4, 3], Res) andalso f2str f = "-6 * x + 5 * x ^^^ 2 = 0"
50.75 +if p = ([4, 3], Res) andalso f2str f = "-6 * x + 5 * x \<up> 2 = 0"
50.76 then
50.77 ((case nxt of Subproblem ("PolyEq", ["bdv_only", "degree_2", "polynomial", "univariate", "equation"]) => ()
50.78 | _ => error ("S.68, Bsp.: 40 nxt =" ^ Tactic.input_to_string nxt)))
50.79 @@ -277,7 +277,7 @@
50.80 case nxt of Apply_Method ["PolyEq", "solve_d2_polyeq_bdvonly_equation"] => ()
50.81 | _ => error "55b normalise_poly specification broken 2";
50.82
50.83 -val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*f = "-6 * x + 5 * x ^^^ 2 = 0"*) (* 2. solve-phase *)
50.84 +val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*f = "-6 * x + 5 * x \<up> 2 = 0"*) (* 2. solve-phase *)
50.85 val (p,_,f,nxt,_,pt) = me nxt p [] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;
50.86
50.87 (*[4, 4, 3], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>Or_to_List*)
50.88 @@ -285,13 +285,13 @@
50.89 (*[4, 4, 5], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*\<rightarrow>2. Check_Postcond ["bdv_only", "degree_2", "polynomial", "univariate", "equation"]*)
50.90
50.91 (* *)if eq_set op = ((Ctree.get_assumptions pt p |> map UnparseC.term), [
50.92 -(*0.pre*) "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x",
50.93 -(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n"
50.94 -(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
50.95 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
50.96 -(*2.pre*) "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
50.97 +(*0.pre*) "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x",
50.98 +(*1.pre*) "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n"
50.99 +(*1.pre*) ^ "\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
50.100 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
50.101 +(*2.pre*) "lhs (-6 * x + 5 * x \<up> 2 = 0) has_degree_in x = 2",
50.102 (*0.asm*) "x \<noteq> 0",
50.103 -(*0.asm*) "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"
50.104 +(*0.asm*) "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"
50.105 (* *)])
50.106 (* *)then () else error "assumptions at end 2. Subproblem CHANGED";
50.107
50.108 @@ -306,11 +306,11 @@
50.109
50.110 (*/-------- final test -----------------------------------------------------------------------\*)
50.111 if f2str f = "[x = 6 / 5]" andalso eq_set op = (map UnparseC.term (Ctree.get_assumptions pt p),
50.112 - ["x = 6 / 5", "lhs (-6 * x + 5 * x ^^^ 2 = 0) is_poly_in x",
50.113 - "lhs (-6 * x + 5 * x ^^^ 2 = 0) has_degree_in x = 2",
50.114 - "\<not> matches (?a = 0)\n ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) \<or>\n\<not> lhs ((3 + -1 * x + x ^^^ 2) * x =\n 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)) is_poly_in x",
50.115 - "x \<noteq> 0", "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0",
50.116 - "x / (x ^^^ 2 - 6 * x + 9) - 1 / (x ^^^ 2 - 3 * x) =\n1 / x is_ratequation_in x"])
50.117 + ["x = 6 / 5", "lhs (-6 * x + 5 * x \<up> 2 = 0) is_poly_in x",
50.118 + "lhs (-6 * x + 5 * x \<up> 2 = 0) has_degree_in x = 2",
50.119 + "\<not> matches (?a = 0)\n ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) \<or>\n\<not> lhs ((3 + -1 * x + x \<up> 2) * x =\n 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)) is_poly_in x",
50.120 + "x \<noteq> 0", "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0",
50.121 + "x / (x \<up> 2 - 6 * x + 9) - 1 / (x \<up> 2 - 3 * x) =\n1 / x is_ratequation_in x"])
50.122 then () else error "test CHANGED";
50.123
50.124
50.125 @@ -338,7 +338,7 @@
50.126 (*+*)then () else error "rat-eq + subpbl: istate after found_accept";
50.127
50.128 (*[2], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*Rewrite_Set "RatEq_eliminate"*)
50.129 -(*^^^ 2*05*)
50.130 +(* \<up> 2*05*)
50.131 \<close> ML \<open>
50.132 (*[3], Res*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Subproblem ("PolyEq", ["normalise", "polynomial", "univariate", "equation"])*)
50.133 (*[4], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [] pt;(*Model_Problem*)
50.134 @@ -347,7 +347,7 @@
50.135 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.136 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.137 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.138 -(*^^^ 2*10*)
50.139 +(* \<up> 2*10*)
50.140 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.141 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.142 (**)val (p,_,f,nxt,_,pt) = me nxt p [1] pt; val (p,_,f,nxt,_,pt) = me nxt p [] pt;(**)
50.143 @@ -355,7 +355,7 @@
50.144
50.145 (*[4,3], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Specify_Method ["PolyEq", "solve_d1_polyeq_equation"]*)
50.146 (*[4,3], Met*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Apply_Method ["PolyEq", "solve_d1_polyeq_equation"]*)
50.147 -(*^^^ 2*15*)
50.148 +(* \<up> 2*15*)
50.149 (*[4,3,1], Frm*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Rewrite_Set_Inst (["(''bdv'', x)"], "d1_polyeq_simplify")*)
50.150 (*[4,3,1], Res*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Rewrite_Set "polyeq_simplify"*)
50.151 (*[4,3,2], Res*)val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*Or_to_List*)
51.1 --- a/test/Tools/isac/Knowledge/rational-old.sml Mon Apr 19 20:44:18 2021 +0200
51.2 +++ b/test/Tools/isac/Knowledge/rational-old.sml Tue Apr 20 16:58:44 2021 +0200
51.3 @@ -179,13 +179,13 @@
51.4 val t1 = (Thm.term_of o the o (TermC.parse thy)) "27";
51.5 val t11= (Thm.term_of o the o (TermC.parse thy)) "27 * c";
51.6 val t2 = (Thm.term_of o the o (TermC.parse thy)) "b";
51.7 -val t23= (Thm.term_of o the o (TermC.parse thy)) "c^^^7";
51.8 -val t24= (Thm.term_of o the o (TermC.parse thy)) "5 * c^^^7";
51.9 +val t23= (Thm.term_of o the o (TermC.parse thy)) "c \<up> 7";
51.10 +val t24= (Thm.term_of o the o (TermC.parse thy)) "5 * c \<up> 7";
51.11 val t26= (Thm.term_of o the o (TermC.parse thy)) "a * b";
51.12 val t3 = (Thm.term_of o the o (TermC.parse thy)) "2 + a";
51.13 val t4 = (Thm.term_of o the o (TermC.parse thy)) "b + a";
51.14 -val t5 = (Thm.term_of o the o (TermC.parse thy)) "2 + a^^^3";*)
51.15 -val t6 = (Thm.term_of o the o (TermC.parse thy)) "5*a^^^2*b^^^3*c+4*a^^^4*b+2*a*c";
51.16 +val t5 = (Thm.term_of o the o (TermC.parse thy)) "2 + a \<up> 3";*)
51.17 +val t6 = (Thm.term_of o the o (TermC.parse thy)) "5*a \<up> 2*b \<up> 3*c+4*a \<up> 4*b+2*a*c";
51.18 val t7 = (Thm.term_of o the o (TermC.parse thy)) "a-b";
51.19 (*
51.20 (the o term2poly) t0;
51.21 @@ -204,28 +204,28 @@
51.22
51.23 print("\n\n***** STEP_CANCEL_TESTS: *****\n");
51.24 (*
51.25 -val term2 = (Thm.term_of o the o (TermC.parse thy)) " (9 * a^^^2 * b) /// (6 * a * c)";
51.26 +val term2 = (Thm.term_of o the o (TermC.parse thy)) " (9 * a \<up> 2 * b) /// (6 * a * c)";
51.27 val div2 = step_cancel term2;
51.28 atomt div2;
51.29 *)
51.30
51.31 -val term1 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// a";
51.32 +val term1 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a \<up> 2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b \<up> 2 * c) /// a";
51.33 val div1 = step_cancel term1;
51.34 -(*if div1 = (Thm.term_of o the o (TermC.parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b^^^2 * c) * a) /// (1 * a)" then () else raise error ("Test failed");*)
51.35 +(*if div1 = (Thm.term_of o the o (TermC.parse thy)) "((10 * a * b * c + 14 * b + 3 * c + 20 * b \<up> 2 * c) * a) /// (1 * a)" then () else raise error ("Test failed");*)
51.36
51.37 -val term2 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// (5 * a * b * c + 7 * a^^^2 * b * c) ";
51.38 +val term2 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a \<up> 2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b \<up> 2 * c) /// (5 * a * b * c + 7 * a \<up> 2 * b * c) ";
51.39 val div2 = step_cancel term2;
51.40 (*if div2 = ([(10,[1,1,1]),(20,[0,2,1]),(14,[0,1,0]),(3,[0,0,1])],[(1,[1,0,0])],[(7,[1,1,1]),(5,[0,1,1])]) then () else raise error ("Test failed");*)
51.41
51.42
51.43 -val term3 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a^^^2 * b * c) /// (1 * x * y * z) ";
51.44 +val term3 = (Thm.term_of o the o (TermC.parse thy)) "(10 * a \<up> 2 * b * c) /// (1 * x * y * z) ";
51.45 val div3 = step_cancel term3;
51.46
51.47
51.48
51.49 (*val mul1=(Thm.term_of o the o (TermC.parse thy)) "(5*a*b*c+4*a*b+2*a*c)";
51.50 -val mul2=(the (term2poly((Thm.term_of o the o (TermC.parse thy)) "13*a^^^2*b*c+7*a*b-19*a*b*c^^^2")));
51.51 -val mul3=(the (term2poly((Thm.term_of o the o (TermC.parse thy)) "6*a*b^^^2-13*a^^^2*b^^^2*c^^^2+21*a^^^2*b*c")));
51.52 +val mul2=(the (term2poly((Thm.term_of o the o (TermC.parse thy)) "13*a \<up> 2*b*c+7*a*b-19*a*b*c \<up> 2")));
51.53 +val mul3=(the (term2poly((Thm.term_of o the o (TermC.parse thy)) "6*a*b \<up> 2-13*a \<up> 2*b \<up> 2*c \<up> 2+21*a \<up> 2*b*c")));
51.54 val t1=mv_mul(mul1,mul2,LEX_);
51.55 val t2=mv_mul(mul3,mul2,LEX_);
51.56 val div3=step_cancel t1 t2;
51.57 @@ -238,13 +238,13 @@
51.58 val thy = Rational.thy;
51.59 val rls = Prls {func=cancel};
51.60 val t = (Thm.term_of o the o (TermC.parse thy))
51.61 - "(1 + 1 * a ^^^ 1)///(-2 + 2 * a ^^^ 2)";
51.62 + "(1 + 1 * a \<up> 1)///(-2 + 2 * a \<up> 2)";
51.63 val (t,asm) = the (rewrite_set_ thy eval_rls false rls t);
51.64
51.65
51.66 val thy' = "Rational";
51.67 val rls' = "cancel";
51.68 -val t' = "(1 + 1 * a ^^^ 1)///(-2 + 2 * a ^^^ 2)";
51.69 +val t' = "(1 + 1 * a \<up> 1)///(-2 + 2 * a \<up> 2)";
51.70 val (t',asm') = the (rewrite_set thy' "eval_rls" false rls' t');
51.71 (*if t' = "1 /// (-2 + 2 * a)" then ()
51.72 else error "tests/rationals.sml(1): new behaviour";*)
51.73 @@ -252,18 +252,18 @@
51.74
51.75 val thy' = "Rational";
51.76 val rls' = "cancel";
51.77 -val t' = "(10 * a^^^2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b^^^2 * c) /// (5 * a * b * c + 7 * a^^^2 * b * c) ";
51.78 +val t' = "(10 * a \<up> 2 * b * c + 14 * a * b + 3 * a * c + 20 * a * b \<up> 2 * c) /// (5 * a * b * c + 7 * a \<up> 2 * b * c) ";
51.79 val (t',asm') = the (rewrite_set thy' "eval_rls" false rls' t');
51.80
51.81 val thy' = "Rational";
51.82 val rls' = "cancel";
51.83 -val t' = "(a^^^2 * b + 2 * a * b + b ) /// ( a^^^2 - 1 )";
51.84 +val t' = "(a \<up> 2 * b + 2 * a * b + b ) /// ( a \<up> 2 - 1 )";
51.85 val (t',asm') = the (rewrite_set thy' "eval_rls" false rls' t');
51.86
51.87 (*
51.88 -val term2 = (Thm.term_of o the o (TermC.parse thy)) "(a^^^2 * b + 2 * a * b + b ) /// ( a^^^2 - 1 )";
51.89 +val term2 = (Thm.term_of o the o (TermC.parse thy)) "(a \<up> 2 * b + 2 * a * b + b ) /// ( a \<up> 2 - 1 )";
51.90 val div2 = direct_cancel term2;
51.91 -val t = (Thm.term_of o the o (TermC.parse thy)) "(1 + 1 * a ^^^ 1)///(-2 + 2 * a ^^^ 2) = 0";*)
51.92 +val t = (Thm.term_of o the o (TermC.parse thy)) "(1 + 1 * a \<up> 1)///(-2 + 2 * a \<up> 2) = 0";*)
51.93
51.94
51.95
51.96 @@ -288,7 +288,7 @@
51.97 val e186b'="(60 * a * b) / ( 15 * a * b )";
51.98 val e186b = the (rewrite_set thy' "rational_erls" false rls' e186b');
51.99 print("c)\n");
51.100 -val e186c'="(144 * a^^^2 * b * c) / (12 * a * b * c )";
51.101 +val e186c'="(144 * a \<up> 2 * b * c) / (12 * a * b * c )";
51.102 val e186c = (the (rewrite_set thy' "rational_erls" false rls' e186c'))
51.103 handle e => OldGoals.print_exn e;
51.104 val t = (Thm.term_of o the o (TermC.parse thy)) e186c';
51.105 @@ -296,13 +296,13 @@
51.106
51.107 print("\n\nexample 187:\n");
51.108 print("a)\n");
51.109 -val e187a'="(12 * x * y) / (8 * y^^^2 )";
51.110 +val e187a'="(12 * x * y) / (8 * y \<up> 2 )";
51.111 val e187a = the (rewrite_set thy' "rational_erls" false rls' e187a');
51.112 print("b)\n");
51.113 -val e187b'="(8 * x^^^2 * y * z ) / (18 * x * y^^^2 * z )";
51.114 +val e187b'="(8 * x \<up> 2 * y * z ) / (18 * x * y \<up> 2 * z )";
51.115 val e187b = the (rewrite_set thy' "rational_erls" false rls' e187b');
51.116 print("c)\n");
51.117 -val e187c'="(9 * x^^^5 * y^^^2 * z^^^4) / (15 * x^^^6 * y^^^3 * z )";
51.118 +val e187c'="(9 * x \<up> 5 * y \<up> 2 * z \<up> 4) / (15 * x \<up> 6 * y \<up> 3 * z )";
51.119 val e187c = the (rewrite_set thy' "rational_erls" false rls' e187c');
51.120
51.121 print("\n\nexample 188:\n");
51.122 @@ -324,45 +324,45 @@
51.123
51.124 print("\n\nexample 190:\n");
51.125 print("c)\n");
51.126 -val e190c'="( 27 * a^^^3 + 9 * a^^^2 + 3 * a + 1 ) / ( 27 * a^^^3 + 18 * a^^^2 + 3 * a )";
51.127 +val e190c'="( 27 * a \<up> 3 + 9 * a \<up> 2 + 3 * a + 1 ) / ( 27 * a \<up> 3 + 18 * a \<up> 2 + 3 * a )";
51.128 val e190c = the (rewrite_set thy' "rational_erls" false rls' e190c');
51.129 -val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((1 + 9 * a ^^^ 2)*(1 + 3 * a))/((3 * a + 9 * a ^^^ 2)*(1 + 3 * a))";
51.130 -if t="(1 + (3 * a + (27 * a ^^^ 3 + 9 * a ^^^ 2))) /\n(3 * a + (18 * a ^^^ 2 + 27 * a ^^^ 3))"then()
51.131 +val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((1 + 9 * a \<up> 2)*(1 + 3 * a))/((3 * a + 9 * a \<up> 2)*(1 + 3 * a))";
51.132 +if t="(1 + (3 * a + (27 * a \<up> 3 + 9 * a \<up> 2))) /\n(3 * a + (18 * a \<up> 2 + 27 * a \<up> 3))"then()
51.133 (*TERMORDER ~~~~~~~ ~~~~~~~*)
51.134 else error "rationals.sml: e190c new behaviour";
51.135
51.136 print("\n\nexample 191:\n");
51.137 print("a)\n");
51.138 -val e191a'="( x^^^2 + -1 * y^^^2 ) / ( x + y )";
51.139 +val e191a'="( x \<up> 2 + -1 * y \<up> 2 ) / ( x + y )";
51.140 val e191a = the (rewrite_set thy' "rational_erls" false rls' e191a');
51.141 val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x + (-1) * y)*(x + y))/((1)*(x + y))";
51.142 -if t="(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)"then()
51.143 +if t="(x \<up> 2 + -1 * y \<up> 2) / (x + y)"then()
51.144 else error "rationals.sml: e191a new behaviour";
51.145 print("c)\n");
51.146 -val e191c'="( 9 * x^^^2 + -30 * x + 25 ) / ( 9 * x^^^2 + -25 )";
51.147 +val e191c'="( 9 * x \<up> 2 + -30 * x + 25 ) / ( 9 * x \<up> 2 + -25 )";
51.148 val e191c = the (rewrite_set thy' "rational_erls" false rls' e191c');
51.149 val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "(((-5) + 3 * x)*((-5) + 3 * x))/((5 + 3 * x)*((-5) + 3 * x))";
51.150 -if t="(25 + ((-30) * x + 9 * x ^^^ 2)) / ((-25) + 9 * x ^^^ 2)"then()
51.151 +if t="(25 + ((-30) * x + 9 * x \<up> 2)) / ((-25) + 9 * x \<up> 2)"then()
51.152 else error "rationals.sml: 'e191c' new behaviour";
51.153
51.154 print("\n\nexample 192:\n");
51.155 print("b)\n");
51.156 -val e192b'="( 7 * x^^^3 + -1 * x^^^2 * y ) / ( 7 * x * y^^^2 + -1 * y^^^3 )";
51.157 +val e192b'="( 7 * x \<up> 3 + -1 * x \<up> 2 * y ) / ( 7 * x * y \<up> 2 + -1 * y \<up> 3 )";
51.158 val e192b = the (rewrite_set thy' "rational_erls" false rls' e192b');
51.159 -val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))";
51.160 -if t="(7 * x ^^^ 3 + -1 * (y * x ^^^ 2)) / (-1 * y ^^^ 3 + 7 * (x * y ^^^ 2))"then()
51.161 +val SOME (t,_) = rewrite_set thy' "rational_erls" false mp "((x \<up> 2)*(7 * x + (-1) * y))/((y \<up> 2)*(7 * x + (-1) * y))";
51.162 +if t="(7 * x \<up> 3 + -1 * (y * x \<up> 2)) / (-1 * y \<up> 3 + 7 * (x * y \<up> 2))"then()
51.163 (*TERMORDER ~~~~~*)
51.164 else error "rationals.sml: 'e192b' new behaviour";
51.165
51.166 print("\n\nexample 193:\n");
51.167 print("a)\n");
51.168 -val e193a'="( x^^^2 + -6 * x + 9 ) / ( x^^^2 + -9 )";
51.169 +val e193a'="( x \<up> 2 + -6 * x + 9 ) / ( x \<up> 2 + -9 )";
51.170 val e193a = the (rewrite_set thy' "rational_erls" false rls' e193a');
51.171 print("b)\n");
51.172 -val e193b'="( x^^^2 + -8 * x + 16 ) / ( 2 * x^^^2 + -32 )";
51.173 +val e193b'="( x \<up> 2 + -8 * x + 16 ) / ( 2 * x \<up> 2 + -32 )";
51.174 val e193b = the (rewrite_set thy' "rational_erls" false rls' e193b');
51.175 print("c)\n");
51.176 -val e193c'="( 2 * x + -50 * x^^^3 ) / ( 25 * x^^^2 + -10 * x + 1 )";
51.177 +val e193c'="( 2 * x + -50 * x \<up> 3 ) / ( 25 * x \<up> 2 + -10 * x + 1 )";
51.178 val SOME(t,_) = rewrite_set thy' "rational_erls" false rls' e193c';
51.179 --------------------------------15.10.02---*)
51.180
51.181 @@ -407,7 +407,7 @@
51.182 val e209 = the (rewrite_set thy' "rational_erls" false rls' e209');
51.183
51.184 print("\n\nexample 210:\n");
51.185 -val e210'="((2 * x + 3 + -1 * x^^^2) / (5 * x)) + ((5 * x^^^2 + -2 * x + 1) / (5 * x)) + ((-3 * x^^^2 + -2 * x + 1) / (5 * x)) + ((-1 * x^^^2 + -3 * x + -5) / (5 * x)) ";
51.186 +val e210'="((2 * x + 3 + -1 * x \<up> 2) / (5 * x)) + ((5 * x \<up> 2 + -2 * x + 1) / (5 * x)) + ((-3 * x \<up> 2 + -2 * x + 1) / (5 * x)) + ((-1 * x \<up> 2 + -3 * x + -5) / (5 * x)) ";
51.187 val e210 = the (rewrite_set thy' "rational_erls" false rls' e210');
51.188
51.189 print("\n\nexample 211:\n");
51.190 @@ -415,7 +415,7 @@
51.191 val e211a'="((b) / (a + -1 * b)) + ((-1 * a) / (a + -1 * b))";
51.192 val e211a = the (rewrite_set thy' "rational_erls" false rls' e211a');
51.193 print("b)\n");
51.194 -val e211b'="((b) / (b^^^2 + -1 * a^^^2)) + ((-1 * a) / (b^^^2 + -1 * a^^^2))";
51.195 +val e211b'="((b) / (b \<up> 2 + -1 * a \<up> 2)) + ((-1 * a) / (b \<up> 2 + -1 * a \<up> 2))";
51.196 val e211b = the (rewrite_set thy' "rational_erls" false rls' e211b');
51.197
51.198 print("\n\nexample 212:\n");
51.199 @@ -428,10 +428,10 @@
51.200
51.201 print("\n\nexample 213:\n");
51.202 print("a)\n");
51.203 -val e213a'="((5 * x) / (3 * y^^^2)) + ((19 * z) / (6 * x * y)) + ((-2 * x) / (3 * y^^^2)) + ((7 * y^^^2) / (6 * x^^^2)) ";
51.204 +val e213a'="((5 * x) / (3 * y \<up> 2)) + ((19 * z) / (6 * x * y)) + ((-2 * x) / (3 * y \<up> 2)) + ((7 * y \<up> 2) / (6 * x \<up> 2)) ";
51.205 val e213a = the (rewrite_set thy' "rational_erls" false rls' e213a');
51.206 print("b)\n");
51.207 -val e213b'="((2 * b) / (3 * a^^^2)) + ((3 * c) / (7 * a * b)) + ((4 * b) / (3 * a^^^2)) + ((3 * a) / (7 * b^^^2))";
51.208 +val e213b'="((2 * b) / (3 * a \<up> 2)) + ((3 * c) / (7 * a * b)) + ((4 * b) / (3 * a \<up> 2)) + ((3 * a) / (7 * b \<up> 2))";
51.209 val e213b = the (rewrite_set thy' "rational_erls" false rls' e213b');
51.210
51.211 print("\n\nexample 214:\n");
51.212 @@ -444,18 +444,18 @@
51.213
51.214 print("\n\nexample 216:\n");
51.215 print("a)\n");
51.216 -val e216a'="((2 * b + 3 * c) / (a * c)) + ((3 * a + b) / (a * b)) + ((-2 * b^^^2 + -3 * a * c) / (a * b * c))";
51.217 +val e216a'="((2 * b + 3 * c) / (a * c)) + ((3 * a + b) / (a * b)) + ((-2 * b \<up> 2 + -3 * a * c) / (a * b * c))";
51.218 val e216a = the (rewrite_set thy' "rational_erls" false rls' e216a');
51.219 print("b)\n");
51.220 -val e216b'="((2 * a + 3 * b) / (b * c)) + ((3 * c + a) / (a * c)) + ((-2 * a^^^2 + -3 * b * c) / (a * b * c))";
51.221 +val e216b'="((2 * a + 3 * b) / (b * c)) + ((3 * c + a) / (a * c)) + ((-2 * a \<up> 2 + -3 * b * c) / (a * b * c))";
51.222 val e216b = the (rewrite_set thy' "rational_erls" false rls' e216b');
51.223
51.224 print("\n\nexample 217:\n");
51.225 -val e217'="((z + -1) / (z)) + ((3 * z ^^^2 + -6 * z + 5) / (z^^^2)) + ((-4 * z^^^3 + 7 * z^^^2 + -5 * z + 5) / (z^^^3))";
51.226 +val e217'="((z + -1) / (z)) + ((3 * z \<up> 2 + -6 * z + 5) / (z \<up> 2)) + ((-4 * z \<up> 3 + 7 * z \<up> 2 + -5 * z + 5) / (z \<up> 3))";
51.227 val e217 = the (rewrite_set thy' "rational_erls" false rls' e217');
51.228
51.229 print("\n\nexample 218:\n");
51.230 -val e218'="((9 * a^^^3 - 5 * a^^^2 + 2 * a + 8) / (108 * a^^^4)) + ((-5 * a + 3 * a^^^2 + 4) / (8 * a^^^3)) + ((-261 * a^^^3 + 19 * a^^^2 + -112 * a + 16) / (216 * a^^^4))";
51.231 +val e218'="((9 * a \<up> 3 - 5 * a \<up> 2 + 2 * a + 8) / (108 * a \<up> 4)) + ((-5 * a + 3 * a \<up> 2 + 4) / (8 * a \<up> 3)) + ((-261 * a \<up> 3 + 19 * a \<up> 2 + -112 * a + 16) / (216 * a \<up> 4))";
51.232 val e218 = the (rewrite_set thy' "rational_erls" false rls' e218');
51.233
51.234 print("\n\nexample 219:\n");
51.235 @@ -484,111 +484,111 @@
51.236
51.237 print("\n\nexample 222:\n");
51.238 print("a)\n");
51.239 -val e222a'="((1 + -1 * x) / (1 + x)) + ((-1 + -1 * x) / (1 + -1 * x)) + ((4 * x) / (1 + -1 * x^^^2))";
51.240 +val e222a'="((1 + -1 * x) / (1 + x)) + ((-1 + -1 * x) / (1 + -1 * x)) + ((4 * x) / (1 + -1 * x \<up> 2))";
51.241 val e222a = the (rewrite_set thy' "rational_erls" false rls' e222a');
51.242 print("b)\n");
51.243 -val e222b'="((1 + x ) / (1 + -1 * x)) + ((-1 + x) / (1 + x)) + ((2 * x) / (1 + -1 * x^^^2))";
51.244 +val e222b'="((1 + x ) / (1 + -1 * x)) + ((-1 + x) / (1 + x)) + ((2 * x) / (1 + -1 * x \<up> 2))";
51.245 val e222b = the (rewrite_set thy' "rational_erls" false rls' e222b');
51.246
51.247 print("\n\nexample 225:\n");
51.248 print("a)\n");
51.249 -val e225a'="((6 * a) / (a^^^2 + -64)) + ((a + 2) / (2 * a + 16)) + ((-1) / (2))";
51.250 +val e225a'="((6 * a) / (a \<up> 2 + -64)) + ((a + 2) / (2 * a + 16)) + ((-1) / (2))";
51.251 val e225a = the (rewrite_set thy' "rational_erls" false rls' e225a');
51.252 print("b)\n");
51.253 -val e225b'="((a + 2 ) / (2 * a + 12)) + ((4 * a) / (a^^^2 + -36)) + ((-1) / (2))";
51.254 +val e225b'="((a + 2 ) / (2 * a + 12)) + ((4 * a) / (a \<up> 2 + -36)) + ((-1) / (2))";
51.255 val e225b = the (rewrite_set thy' "rational_erls" false rls' e225b');
51.256
51.257 print("\n\nexample 226:\n");
51.258 print("a)\n");
51.259 -val e226a'="((35 * z) / (49 * z^^^2 + -4)) + -1 + ((14 * z + -1) / (14 * z + 4)) ";
51.260 +val e226a'="((35 * z) / (49 * z \<up> 2 + -4)) + -1 + ((14 * z + -1) / (14 * z + 4)) ";
51.261 val e226a = the (rewrite_set thy' "rational_erls" false rls' e226a');
51.262 print("b)\n");
51.263 -val e226b'="((45 * a * b) / (25 * a^^^2 + -9 * b^^^2)) + ((20 * a + 3 * b) / (10 * a + 6 * b)) + -2";
51.264 +val e226b'="((45 * a * b) / (25 * a \<up> 2 + -9 * b \<up> 2)) + ((20 * a + 3 * b) / (10 * a + 6 * b)) + -2";
51.265 val e226b = the (rewrite_set thy' "rational_erls" false rls' e226b');
51.266
51.267 print("\n\nexample 227:\n");
51.268 print("a)\n");
51.269 -val e227a'="((6 * z + 11) / (6 * z + 14)) + ((9 * z ) / (9 * z^^^2 + -49)) + -1 ";
51.270 +val e227a'="((6 * z + 11) / (6 * z + 14)) + ((9 * z ) / (9 * z \<up> 2 + -49)) + -1 ";
51.271 val e227a = the (rewrite_set thy' "rational_erls" false rls' e227a');
51.272 print("b)\n");
51.273 -val e227b'="((16 * a + 37 * b) / (4 * a + 10 * b)) + ((6 * a * b) / (4 * a^^^2 + -25 * b^^^2)) + -4 ";
51.274 +val e227b'="((16 * a + 37 * b) / (4 * a + 10 * b)) + ((6 * a * b) / (4 * a \<up> 2 + -25 * b \<up> 2)) + -4 ";
51.275 val e227b = the (rewrite_set thy' "rational_erls" false rls' e227b');
51.276
51.277 print("\n\nexample 228:\n");
51.278 print("a)\n");
51.279 -val e228a'="((7 * a + 11) / (3 * a^^^2 + -3)) + ((-2 * a + -1) / (a^^^2 + -1 * a)) + ((-1) / (3 * a + 3))";
51.280 +val e228a'="((7 * a + 11) / (3 * a \<up> 2 + -3)) + ((-2 * a + -1) / (a \<up> 2 + -1 * a)) + ((-1) / (3 * a + 3))";
51.281 val e228a = the (rewrite_set thy' "rational_erls" false rls' e228a');
51.282 print("b)\n");
51.283 -val e228b'="((11 * z + 2 * b) / (4 * b * z + -8 * b^^^2)) + ((-8 * z) / (z^^^2 + -4 * b^^^2)) + ((-9 * z + -2 * b) / (4 * b * z + 8 * b^^^2))";
51.284 +val e228b'="((11 * z + 2 * b) / (4 * b * z + -8 * b \<up> 2)) + ((-8 * z) / (z \<up> 2 + -4 * b \<up> 2)) + ((-9 * z + -2 * b) / (4 * b * z + 8 * b \<up> 2))";
51.285 val e228b = the (rewrite_set thy' "rational_erls" false rls' e228b');
51.286
51.287
51.288 print("\n\nexample 229:\n");
51.289 print("a)\n");
51.290 -val e229a'="((5 * x^^^2 + y) / (x + 2 * y)) + ((-8 * x^^^3 + 4 * x^^^2 * y + 3 * x * y) / (x^^^2 + -4 * y^^^2)) + ((3 * x^^^2 + -4 * y) / (x + -2 * y))";
51.291 +val e229a'="((5 * x \<up> 2 + y) / (x + 2 * y)) + ((-8 * x \<up> 3 + 4 * x \<up> 2 * y + 3 * x * y) / (x \<up> 2 + -4 * y \<up> 2)) + ((3 * x \<up> 2 + -4 * y) / (x + -2 * y))";
51.292 val e229a = the (rewrite_set thy' "rational_erls" false rls' e229a');
51.293 print("b)\n");
51.294 -val e229b'="((7 * x^^^2 + y) / (x + 3 * y)) + ((-24 * x^^^2 * y + 5 * x * y + 21 * y^^^2) / (x^^^2 + -9 * y^^^2)) + ((4 * x^^^2 + -6 * y) / (x + -3 * y))";
51.295 +val e229b'="((7 * x \<up> 2 + y) / (x + 3 * y)) + ((-24 * x \<up> 2 * y + 5 * x * y + 21 * y \<up> 2) / (x \<up> 2 + -9 * y \<up> 2)) + ((4 * x \<up> 2 + -6 * y) / (x + -3 * y))";
51.296 val e229b = the (rewrite_set thy' "rational_erls" false rls' e229b');
51.297
51.298 print("\n\nexample 230:\n");
51.299 print("a)\n");
51.300 -val e230a'="((5 * x^^^2 + y) / (2 * x + y)) + ((-16 * x^^^3 + 2 * x^^^2 * y + 6 * x * y) / (4 * x^^^2 + -1 * y^^^2)) + ((3 * x^^^2 + -4 * y) / (2 * x + -1 * y))";
51.301 +val e230a'="((5 * x \<up> 2 + y) / (2 * x + y)) + ((-16 * x \<up> 3 + 2 * x \<up> 2 * y + 6 * x * y) / (4 * x \<up> 2 + -1 * y \<up> 2)) + ((3 * x \<up> 2 + -4 * y) / (2 * x + -1 * y))";
51.302 val e230a = the (rewrite_set thy' "rational_erls" false rls' e230a');
51.303 print("b)\n");
51.304 -val e230b'="((7 * x^^^2 + y) / (3 * x + y)) + ((-3 * x^^^3 + 15 * x * y + -7 * x^^^2 * y + 7 * y^^^2) / (9 * x^^^2 + -1 * y^^^2)) + ((4 * x^^^2 + -6 * y) / (3 * x + -1 * y))";
51.305 +val e230b'="((7 * x \<up> 2 + y) / (3 * x + y)) + ((-3 * x \<up> 3 + 15 * x * y + -7 * x \<up> 2 * y + 7 * y \<up> 2) / (9 * x \<up> 2 + -1 * y \<up> 2)) + ((4 * x \<up> 2 + -6 * y) / (3 * x + -1 * y))";
51.306 val e230b = the (rewrite_set thy' "rational_erls" false rls' e230b');
51.307
51.308 print("\n\nexample 231:\n");
51.309 print("a)\n");
51.310 -val e231a'="((2 * x + 5 * y) / (x)) + ((2 * x^^^3 + -5 * y^^^3 + 3 * x * y^^^2) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-3 * x + -6 * y) / (x + -1 * y))";
51.311 +val e231a'="((2 * x + 5 * y) / (x)) + ((2 * x \<up> 3 + -5 * y \<up> 3 + 3 * x * y \<up> 2) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-3 * x + -6 * y) / (x + -1 * y))";
51.312 val e231a = the (rewrite_set thy' "rational_erls" false rls' e231a');
51.313 print("b)\n");
51.314 -val e231b'="((6 * x + 2 * y) / (x)) + ((6 * x^^^2 * y + -4 * x * y^^^2 + -2 * y^^^3) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-5 * x + -3 * y) / (x + -1 * y))";
51.315 +val e231b'="((6 * x + 2 * y) / (x)) + ((6 * x \<up> 2 * y + -4 * x * y \<up> 2 + -2 * y \<up> 3) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-5 * x + -3 * y) / (x + -1 * y))";
51.316 val e231b = the (rewrite_set thy' "rational_erls" false rls' e231b');
51.317
51.318 print("\n\nexample 232:\n");
51.319 print("a)\n");
51.320 -val e232a'="((2 * x + 3 * y) / (x)) + ((4 * x^^^3 + -1 * x * y^^^2 + -3 * y^^^3) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-5 * x + -6 * y) / (x + -1 * y))";
51.321 +val e232a'="((2 * x + 3 * y) / (x)) + ((4 * x \<up> 3 + -1 * x * y \<up> 2 + -3 * y \<up> 3) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-5 * x + -6 * y) / (x + -1 * y))";
51.322 val e232a = the (rewrite_set thy' "rational_erls" false rls' e232a');
51.323 print("b)\n");
51.324 -val e232b'="((5 * x + 2 * y) / (x)) + ((2 * x^^^3 + -3 * x * y^^^2 + 3 * x^^^2 * y + -2 * y^^^3) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-6 * x + -3 * y) / (x + -1 * y))";
51.325 +val e232b'="((5 * x + 2 * y) / (x)) + ((2 * x \<up> 3 + -3 * x * y \<up> 2 + 3 * x \<up> 2 * y + -2 * y \<up> 3) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-6 * x + -3 * y) / (x + -1 * y))";
51.326 val e232b = the (rewrite_set thy' "rational_erls" false rls' e232b');
51.327
51.328 print("\n\nexample 233:\n");
51.329 print("a)\n");
51.330 -val e233a'="((5 * x + 6 * y) / (x)) + ((5 * x * y^^^2 + -6 * y^^^3 + -2 * x^^^3 + 3 * x^^^2 * y) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-2 * x + -3 * y) / (x + -1 * y))";
51.331 +val e233a'="((5 * x + 6 * y) / (x)) + ((5 * x * y \<up> 2 + -6 * y \<up> 3 + -2 * x \<up> 3 + 3 * x \<up> 2 * y) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-2 * x + -3 * y) / (x + -1 * y))";
51.332 val e233a = the (rewrite_set thy' "rational_erls" false rls' e233a');
51.333 print("b)\n");
51.334 -val e233b'="((6 * x + 5 * y) / (x)) + ((4 * x^^^2 * y + 3 * x * y^^^2 + -5 * y^^^3 + -2 * x^^^3) / (x^^^3 + -2 * x^^^2 * y + x * y^^^2)) + ((-3 * x + -2 * y) / (x + -1 * y))";
51.335 +val e233b'="((6 * x + 5 * y) / (x)) + ((4 * x \<up> 2 * y + 3 * x * y \<up> 2 + -5 * y \<up> 3 + -2 * x \<up> 3) / (x \<up> 3 + -2 * x \<up> 2 * y + x * y \<up> 2)) + ((-3 * x + -2 * y) / (x + -1 * y))";
51.336 val e233b = the (rewrite_set thy' "rational_erls" false rls' e233b');
51.337
51.338 print("\n\nexample 234:\n");
51.339 print("a)\n");
51.340 -val e234a'="((5 * a + b) / (2 * a * b + -2 * b^^^2)) + ((-3 * a + -1 * b) / (2 * a * b + 2 * b^^^2)) + ((-2 * a) / (a^^^2 + -1 * b^^^2))";
51.341 +val e234a'="((5 * a + b) / (2 * a * b + -2 * b \<up> 2)) + ((-3 * a + -1 * b) / (2 * a * b + 2 * b \<up> 2)) + ((-2 * a) / (a \<up> 2 + -1 * b \<up> 2))";
51.342 val e234a = the (rewrite_set thy' "rational_erls" false rls' e234a');
51.343 print("b)\n");
51.344 -val e234b'="((5 * a + 3 * b) / (6 * a * b + -18 * b^^^2)) + ((-3 * a + -3 * b) / (6 * a * b + 18 * b^^^2)) + ((-2 * a) / (a^^^2 + -9 * b^^^2)) ";
51.345 +val e234b'="((5 * a + 3 * b) / (6 * a * b + -18 * b \<up> 2)) + ((-3 * a + -3 * b) / (6 * a * b + 18 * b \<up> 2)) + ((-2 * a) / (a \<up> 2 + -9 * b \<up> 2)) ";
51.346 val e234b = the (rewrite_set thy' "rational_erls" false rls' e234b');
51.347
51.348 print("\n\nexample 235:\n");
51.349 print("a)\n");
51.350 -val e235a'="((10 * x + 3 * y) / (12 * x * y + -18 * y^^^2)) + ((-6 * x + -3 * y) / (12 * x * y + 18 * y^^^2)) + ((-4 * x) / (4 * x^^^2 + -9 * y^^^2))";
51.351 +val e235a'="((10 * x + 3 * y) / (12 * x * y + -18 * y \<up> 2)) + ((-6 * x + -3 * y) / (12 * x * y + 18 * y \<up> 2)) + ((-4 * x) / (4 * x \<up> 2 + -9 * y \<up> 2))";
51.352 val e235a = the (rewrite_set thy' "rational_erls" false rls' e235a');
51.353 print("b)\n");
51.354 -val e235b'="((8 * a + b) / (4 * a * b + -2 * b^^^2)) + ((-4 * a + -1 * b) / (4 * a * b + 2 * b^^^2)) + ((-2 * a) / (4 * a^^^2 + -1 * b^^^2)) ";
51.355 +val e235b'="((8 * a + b) / (4 * a * b + -2 * b \<up> 2)) + ((-4 * a + -1 * b) / (4 * a * b + 2 * b \<up> 2)) + ((-2 * a) / (4 * a \<up> 2 + -1 * b \<up> 2)) ";
51.356 val e235b = the (rewrite_set thy' "rational_erls" false rls' e235b');
51.357
51.358 print("\n\nexample 236:\n");
51.359 print("a)\n");
51.360 -val e236a'="((8 * a + 5 * b) / (20 * a * b + -50 * b^^^2)) + ((-4 * a + -5 * b) / (20 * a * b + 50 * b^^^2)) + ((-2 * a) / (4 * a^^^2 + -25 * b^^^2))";
51.361 +val e236a'="((8 * a + 5 * b) / (20 * a * b + -50 * b \<up> 2)) + ((-4 * a + -5 * b) / (20 * a * b + 50 * b \<up> 2)) + ((-2 * a) / (4 * a \<up> 2 + -25 * b \<up> 2))";
51.362 val e236a = the (rewrite_set thy' "rational_erls" false rls' e236a');
51.363 print("b)\n");
51.364 -val e236b'="((24 * x + y) / (6 * x * y + -2 * y^^^2)) + ((-18 * x + -1 * y) / (6 * x * y + 2 * y^^^2)) + ((-15 * x) / (9 * x^^^2 + -1 * y^^^2)) ";
51.365 +val e236b'="((24 * x + y) / (6 * x * y + -2 * y \<up> 2)) + ((-18 * x + -1 * y) / (6 * x * y + 2 * y \<up> 2)) + ((-15 * x) / (9 * x \<up> 2 + -1 * y \<up> 2)) ";
51.366 val e236b = the (rewrite_set thy' "rational_erls" false rls' e236b');
51.367
51.368 print("\n\nexample heuberger:\n");
51.369 -val eheu'="(x^^^4 + x * y + x^^^3 * y + y^^^2) / (x + 5 * x^^^2 + y + 5 * x * y + x^^^2 * y^^^3 + x * y^^^4)";
51.370 +val eheu'="(x \<up> 4 + x * y + x \<up> 3 * y + y \<up> 2) / (x + 5 * x \<up> 2 + y + 5 * x * y + x \<up> 2 * y \<up> 3 + x * y \<up> 4)";
51.371 val eheu = the (rewrite_set thy' "rational_erls" false rls' eheu');
51.372
51.373 print("\n\nexample stiefel:\n");
51.374 @@ -601,7 +601,7 @@
51.375
51.376 (*
51.377 val t = (Thm.term_of o the o (TermC.parse thy))
51.378 - "(9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
51.379 + "(9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
51.380 val SOME (t',_) = factor_expanded_ thy t;
51.381 UnparseC.term t';
51.382
51.383 @@ -617,7 +617,7 @@
51.384
51.385 (*the term for which reverse rewriting is demonstrated*)
51.386 val t = (Thm.term_of o the o (TermC.parse thy))
51.387 - "(9 - x ^^^ 2) / (9 + 6 * x + x ^^^ 2)";
51.388 + "(9 - x \<up> 2) / (9 + 6 * x + x \<up> 2)";
51.389 val Rrls {scr=Rfuns {init_state=ini,locate_rule=loc,
51.390 next_rule=nex,normal_form=nor,...},...} = cancel;
51.391
51.392 @@ -638,27 +638,27 @@
51.393 which are listed after the thead in reverse order*)
51.394 val (r,(t,asm))::_ = loc revsets t r;
51.395 UnparseC.term t;
51.396 - "(9 - x ^^^ 2) / (3 ^^^ 2 + 6 * x + x ^^^ 2)";
51.397 + "(9 - x \<up> 2) / (3 \<up> 2 + 6 * x + x \<up> 2)";
51.398
51.399 (*find the next rule to apply*)
51.400 val SOME r = nex revsets t;
51.401 - (*val r = Thm ("sym_#power_3_2", "9 = 3 ^^^ 2") : rule*)
51.402 + (*val r = Thm ("sym_#power_3_2", "9 = 3 \<up> 2") : rule*)
51.403
51.404 (*check the next rule*)
51.405 val (r,(t,asm))::_ = loc revsets t r;
51.406 UnparseC.term t;
51.407 - "(3 ^^^ 2 - x ^^^ 2) / (3 ^^^ 2 + 6 * x + x ^^^ 2)";
51.408 + "(3 \<up> 2 - x \<up> 2) / (3 \<up> 2 + 6 * x + x \<up> 2)";
51.409
51.410 (*find and check the next rules, rewrite*)
51.411 val SOME r = nex revsets t;
51.412 val (r,(t,asm))::_ = loc revsets t r;
51.413 UnparseC.term t;
51.414 - "(3 ^^^ 2 - x ^^^ 2) / (3 ^^^ 2 + 2 * 3 * x + x ^^^ 2)";
51.415 + "(3 \<up> 2 - x \<up> 2) / (3 \<up> 2 + 2 * 3 * x + x \<up> 2)";
51.416
51.417 val SOME r = nex revsets t;
51.418 val (r,(t,asm))::_ = loc revsets t r;
51.419 UnparseC.term t;
51.420 - "(3 - x) * (3 + x) / (3 ^^^ 2 + 2 * 3 * x + x ^^^ 2)";
51.421 + "(3 - x) * (3 + x) / (3 \<up> 2 + 2 * 3 * x + x \<up> 2)";
51.422
51.423 val SOME r = nex revsets t;
51.424 val (r,(t,asm))::_ = loc revsets t r;
51.425 @@ -678,7 +678,7 @@
51.426
51.427 (*the term for which reverse rewriting is demonstrated*)
51.428 val t = (Thm.term_of o the o (TermC.parse thy))
51.429 - "(9 + (-1)*x^^^2) / (9 + ((-6)*x + x^^^2))";
51.430 + "(9 + (-1)*x \<up> 2) / (9 + ((-6)*x + x \<up> 2))";
51.431 val Rrls {scr=Rfuns {init_state=ini,locate_rule=loc,
51.432 next_rule=nex,normal_form=nor,...},...} = cancel;
51.433 (*normal_form produces the result in ONE step*)
51.434 @@ -713,10 +713,10 @@
51.435 OK Thm ("sym_real_mult_2_assoc", "2 * ?z1.0 + ?k = ?z1.0 + (?z1.0 + ?k)"),
51.436 OK Thm ("sym_real_add_left_commute", "?y + (?x + ?z) = ?x + (?y + ?z)"),
51.437 /// Thm ("sym_real_mult_1", "?z = 1 * ?z"),
51.438 -! Thm ("sym_#power_3_2", "9 = 3 ^^^ 2"),
51.439 -! Thm ("sym_#mult_-1_-1", "1 * x ^^^ 2 = -1 * (-1 * x ^^^ 2)"),
51.440 +! Thm ("sym_#power_3_2", "9 = 3 \<up> 2"),
51.441 +! Thm ("sym_#mult_-1_-1", "1 * x \<up> 2 = -1 * (-1 * x \<up> 2)"),
51.442 ! Thm ("sym_#mult_-1_3", "(-3) * x = -1 * (3 * x)"),
51.443 -OK Thm ("realpow_twoI", "?r1 ^^^ 2 = ?r1 * ?r1" [.]),
51.444 +OK Thm ("realpow_twoI", "?r1 \<up> 2 = ?r1 * ?r1" [.]),
51.445 OK Thm ("sym_real_add_assoc",
51.446 "?z1.0 + (?z2.0 + ?z3.0) = ?z1.0 + ?z2.0 + ?z3.0"),
51.447 OK Thm
51.448 @@ -733,7 +733,7 @@
51.449
51.450 val t = (Thm.term_of o the o (TermC.parse thy)) "(-6) * x";
51.451 val t = (Thm.term_of o the o (TermC.parse thy))
51.452 - "(9 + (-1)*x^^^2) / (9 + ((-6)*x + x^^^2))";
51.453 + "(9 + (-1)*x \<up> 2) / (9 + ((-6)*x + x \<up> 2))";
51.454 val thm = (mk_thm thy "(-6) * x = 2 * ((-3) * x)")
51.455 handle e => OldGoals.print_exn e;
51.456 val SOME (t',_) = rewrite_ thy e_rew_ord Rule_Set.empty false thm t;
51.457 @@ -744,13 +744,13 @@
51.458
51.459 (* SK: Testbeispiele --- WN kopiert Rational.ML -> rational.sml-----
51.460
51.461 -val t1 = (Thm.term_of o the o (TermC.parse thy)) "((3 * x^^^2 + 6 *x + 3) / (2*x + 2))";
51.462 +val t1 = (Thm.term_of o the o (TermC.parse thy)) "((3 * x \<up> 2 + 6 *x + 3) / (2*x + 2))";
51.463 val SOME (t1',rest)= cancel_ thy t1;
51.464 val SOME (t1'',_)= factor_out_gcd_ thy t1;
51.465 print(UnparseC.term t1'^" + Einschr\"ankung: "^UnparseC.term (hd(rest)));
51.466 UnparseC.term t1'';
51.467
51.468 -val t1 = (Thm.term_of o the o (TermC.parse thy)) "((-3 * x^^^2 + 6 *x - 3) / (2*x - 2))";
51.469 +val t1 = (Thm.term_of o the o (TermC.parse thy)) "((-3 * x \<up> 2 + 6 *x - 3) / (2*x - 2))";
51.470 val SOME (t1',_)= cancel_ thy t1;
51.471 val SOME (t1'',_)= factor_expanded_ thy t1;
51.472 UnparseC.term t1';
51.473 @@ -769,13 +769,13 @@
51.474 UnparseC.term t2'';
51.475
51.476
51.477 -val t3 = (Thm.term_of o the o (TermC.parse thy)) "((1) / (2*x + 2)) + ((1) / (2*x + (-2))) + ((1) / ( x^^^2 + (-1)))+((1) / (x^^^2 + (-2)*x + 1))";
51.478 +val t3 = (Thm.term_of o the o (TermC.parse thy)) "((1) / (2*x + 2)) + ((1) / (2*x + (-2))) + ((1) / ( x \<up> 2 + (-1)))+((1) / (x \<up> 2 + (-2)*x + 1))";
51.479 val SOME (t3',_) = common_nominators_ thy t3;
51.480 val SOME (t3'',_) = add_fractions_ thy t3;
51.481 (UnparseC.term t3');
51.482 (UnparseC.term t3'');
51.483
51.484 -val t3 = (Thm.term_of o the o (TermC.parse thy)) "((1) / (2*x + 2)) + ((1) / (2*x - 2)) + ((1) / ( x^^^2 - 1))+((1) / (x^^^2 - 2 * x + 1))";
51.485 +val t3 = (Thm.term_of o the o (TermC.parse thy)) "((1) / (2*x + 2)) + ((1) / (2*x - 2)) + ((1) / ( x \<up> 2 - 1))+((1) / (x \<up> 2 - 2 * x + 1))";
51.486 val SOME (t3',_) = common_expanded_nom_ thy t3;
51.487 val SOME (t3'',_) = add_expanded_frac_ thy t3;
51.488 (UnparseC.term t3');
51.489 @@ -787,8 +787,8 @@
51.490 UnparseC.term t4;
51.491 UnparseC.term (hd(t5));*)
51.492
51.493 -(*val test1 = (Thm.term_of o the o (TermC.parse thy)) "1 - x^^^2 - 5 * x^^^5";
51.494 -val test2 = (Thm.term_of o the o (TermC.parse thy)) "1 + (-1) * x ^^^ 2 + (-5) * x ^^^ 5";
51.495 +(*val test1 = (Thm.term_of o the o (TermC.parse thy)) "1 - x \<up> 2 - 5 * x \<up> 5";
51.496 +val test2 = (Thm.term_of o the o (TermC.parse thy)) "1 + (-1) * x \<up> 2 + (-5) * x \<up> 5";
51.497 val test2 = (Thm.term_of o the o (TermC.parse thy)) "1 - x";
51.498 val test2 = (Thm.term_of o the o (TermC.parse thy)) "1 + (-1) * x";
51.499 UnparseC.term(expanded2term(test1));
51.500 @@ -798,7 +798,7 @@
51.501
51.502 (* WN kopiert 16.10.02 Rational.ML -> rational.sml-----vvv---*)
51.503
51.504 - val t=(Thm.term_of o the o (TermC.parse thy)) "(9 - x^^^2)/(9 - 6*x + x^^^2)";
51.505 + val t=(Thm.term_of o the o (TermC.parse thy)) "(9 - x \<up> 2)/(9 - 6*x + x \<up> 2)";
51.506 val SOME (t',_) = factout_ thy t;
51.507 val SOME (t'',_) = cancel_ thy t;
51.508 UnparseC.term t';
51.509 @@ -807,38 +807,38 @@
51.510 "(3 + x) / (3 - x)";
51.511
51.512 val t=(Thm.term_of o the o(TermC.parse thy))
51.513 - "(9 - x^^^2) / (9 - 6*x + x^^^2) + 1 / (3 - x)";
51.514 + "(9 - x \<up> 2) / (9 - 6*x + x \<up> 2) + 1 / (3 - x)";
51.515 val SOME (t',_) = common_nominator_ thy t;
51.516 val SOME (t'',_) = add_fraction_ thy t;
51.517 UnparseC.term t';
51.518 UnparseC.term t'';
51.519 - "(9 - x ^^^ 2) / ((3 - x) * (3 - x)) + 1 * (3 - x) / ((3 - x) * (3 - x))";
51.520 + "(9 - x \<up> 2) / ((3 - x) * (3 - x)) + 1 * (3 - x) / ((3 - x) * (3 - x))";
51.521 "(4 + x) / (3 - x)";
51.522
51.523 (*WN.16.10.02 hinzugef"ugt -----vv---*)
51.524 val t=(Thm.term_of o the o(TermC.parse thy))
51.525 - "(9 - x^^^2) / (9 - 6*x + x^^^2) + 1";
51.526 + "(9 - x \<up> 2) / (9 - 6*x + x \<up> 2) + 1";
51.527 val SOME (t',_) = common_nominator_ thy t;
51.528 val SOME (t'',_) = add_fraction_ thy t;
51.529 UnparseC.term t';
51.530 UnparseC.term t'';
51.531 - "(9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2) +\
51.532 - \1 * (9 - 6 * x + x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
51.533 + "(9 - x \<up> 2) / (9 - 6 * x + x \<up> 2) +\
51.534 + \1 * (9 - 6 * x + x \<up> 2) / (9 - 6 * x + x \<up> 2)";
51.535 "6 / (3 - x)";
51.536
51.537 val t=(Thm.term_of o the o(TermC.parse thy))
51.538 - "1 + (9 - x^^^2) / (9 - 6*x + x^^^2)";
51.539 + "1 + (9 - x \<up> 2) / (9 - 6*x + x \<up> 2)";
51.540 val SOME (t',_) = common_nominator_ thy t;
51.541 val SOME (t'',_) = add_fraction_ thy t;
51.542 UnparseC.term t';
51.543 UnparseC.term t'';
51.544 - "1 * (9 - 6 * x + x ^^^ 2) / (9 - 6 * x + x ^^^ 2) +\
51.545 - \(9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
51.546 + "1 * (9 - 6 * x + x \<up> 2) / (9 - 6 * x + x \<up> 2) +\
51.547 + \(9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
51.548 "6 / (3 - x)";
51.549 (*WN.16.10.02 hinzugef"ugt -----^^---*)
51.550
51.551 val t=(Thm.term_of o the o (TermC.parse thy))
51.552 - "(y^^^2 - x^^^2)/(y^^^2 - 2*y*x + x^^^2)";
51.553 + "(y \<up> 2 - x \<up> 2)/(y \<up> 2 - 2*y*x + x \<up> 2)";
51.554 val SOME (t',_) = factout_ thy t;
51.555 val SOME (t'',_) = cancel_ thy t;
51.556 UnparseC.term t';
51.557 @@ -847,29 +847,29 @@
51.558 "(y + x) / (y - x)";
51.559
51.560 val t=(Thm.term_of o the o (TermC.parse thy))
51.561 - "(y^^^2 - x^^^2)/(y^^^2 - 2*y*x + x^^^2) + 1 / (y - x)";
51.562 + "(y \<up> 2 - x \<up> 2)/(y \<up> 2 - 2*y*x + x \<up> 2) + 1 / (y - x)";
51.563 val SOME (t',_) = common_nominator_ thy t;
51.564 val SOME (t'',_) = add_fraction_ thy t;
51.565 UnparseC.term t';
51.566 UnparseC.term t'';
51.567 - "((-1) * x ^^^ 2 + y ^^^ 2) / (((-1) * x + y) * ((-1) * x + y)) +\
51.568 + "((-1) * x \<up> 2 + y \<up> 2) / (((-1) * x + y) * ((-1) * x + y)) +\
51.569 \1 * ((-1) * x + y) / (((-1) * x + y) * ((-1) * x + y))";
51.570 "((-1) - x - y) / (x - y)";
51.571 - (*WN.16.10.02 ^^^^^^^ Reihenfolge aus Angabe umgekehrt ?!*)
51.572 + (*WN.16.10.02 \<up> \<up> ^ Reihenfolge aus Angabe umgekehrt ?!*)
51.573
51.574 val t=(Thm.term_of o the o (TermC.parse thy))
51.575 - "(x^^^2 - y^^^2)/(x^^^2 - 2*x*y + y^^^2) + 1 / (x - y)";
51.576 + "(x \<up> 2 - y \<up> 2)/(x \<up> 2 - 2*x*y + y \<up> 2) + 1 / (x - y)";
51.577 val SOME (t',_) = common_nominator_ thy t;
51.578 val SOME (t'',_) = add_fraction_ thy t;
51.579 UnparseC.term t';
51.580 UnparseC.term t'';
51.581 - "((-1) * y ^^^ 2 + x ^^^ 2) / (((-1) * y + x) * ((-1) * y + x)) +\
51.582 + "((-1) * y \<up> 2 + x \<up> 2) / (((-1) * y + x) * ((-1) * y + x)) +\
51.583 \1 * ((-1) * y + x) / (((-1) * y + x) * ((-1) * y + x))";
51.584 "((-1) - y - x) / (y - x)";
51.585 - (*WN.16.10.02 ^^^^^^^ lexicographische Ordnung ?!*)
51.586 + (*WN.16.10.02 \<up> \<up> ^ lexicographische Ordnung ?!*)
51.587
51.588 val t=(Thm.term_of o the o (TermC.parse thy))
51.589 - "(y^^^2 - x^^^2)/(y^^^2 - 2*y*x + x^^^2)";
51.590 + "(y \<up> 2 - x \<up> 2)/(y \<up> 2 - 2*y*x + x \<up> 2)";
51.591 val SOME (t',_) = norm_expanded_rat_ thy t;
51.592 UnparseC.term t';
51.593 "(y + x) / (y - x)";
51.594 @@ -879,24 +879,24 @@
51.595 WN.16.10.02 ?!*)
51.596
51.597 val t=(Thm.term_of o the o (TermC.parse thy))
51.598 - "(9 - x^^^2)/(9 - 6*x + x^^^2) + (1)/(3 + x)";
51.599 + "(9 - x \<up> 2)/(9 - 6*x + x \<up> 2) + (1)/(3 + x)";
51.600 val SOME (t',_) = norm_expanded_rat_ thy t;
51.601 UnparseC.term t';
51.602 - "(12 + 5 * x + x ^^^ 2) / (9 - x ^^^ 2)";
51.603 + "(12 + 5 * x + x \<up> 2) / (9 - x \<up> 2)";
51.604 (*val SOME (t'',_) = norm_rational_ thy t;
51.605 UnparseC.term t'';
51.606 *** RATIONALS_TERM2POLY_EXCEPTION: Invalid Polynomial
51.607 WN.16.10.02 ?!*)
51.608
51.609 val t=(Thm.term_of o the o (TermC.parse thy))
51.610 - "(9 + (-1)* x^^^2)/(9 + (-1)* 6*x + x^^^2) + (1)/(3 + x)";
51.611 + "(9 + (-1)* x \<up> 2)/(9 + (-1)* 6*x + x \<up> 2) + (1)/(3 + x)";
51.612 val SOME (t',_) = norm_expanded_rat_ thy t;
51.613 val SOME (t'',_) = norm_rational_ thy t;
51.614 UnparseC.term t';
51.615 UnparseC.term t'';
51.616 - "(12 + 5 * x + x ^^^ 2) / (9 - x ^^^ 2)";
51.617 - "(12 + 5 * x + x ^^^ 2) / (9 + (-1) * x ^^^ 2)";
51.618 -(* WN kopiert 16.10.02 Rational.ML -> rational.sml-----^^^---*)
51.619 + "(12 + 5 * x + x \<up> 2) / (9 - x \<up> 2)";
51.620 + "(12 + 5 * x + x \<up> 2) / (9 + (-1) * x \<up> 2)";
51.621 +(* WN kopiert 16.10.02 Rational.ML -> rational.sml----- \<up> ---*)
51.622
51.623
51.624
52.1 --- a/test/Tools/isac/Knowledge/rational.sml Mon Apr 19 20:44:18 2021 +0200
52.2 +++ b/test/Tools/isac/Knowledge/rational.sml Tue Apr 20 16:58:44 2021 +0200
52.3 @@ -50,59 +50,59 @@
52.4 "-------- fun poly_of_term ---------------------------------------------------";
52.5 val thy = @{theory Partial_Fractions};
52.6 val ctxt = Proof_Context.init_global @{theory}
52.7 -val vs = TermC.vars_of (the (parseNEW ctxt "12 * x^^^3 * y^^^4 * z^^^6"));
52.8 +val vs = TermC.vars_of (the (parseNEW ctxt "12 * x \<up> 3 * y \<up> 4 * z \<up> 6"));
52.9
52.10 if poly_of_term vs (TermC.str2term "12::real") = SOME [(12, [0, 0, 0])]
52.11 then () else error "poly_of_term 1 changed";
52.12 if poly_of_term vs (TermC.str2term "x::real") = SOME [(1, [1, 0, 0])]
52.13 then () else error "poly_of_term 2 changed";
52.14 -if poly_of_term vs (TermC.str2term "12 * x^^^3") = SOME [(12, [3, 0, 0])]
52.15 +if poly_of_term vs (TermC.str2term "12 * x \<up> 3") = SOME [(12, [3, 0, 0])]
52.16 then () else error "poly_of_term 3 changed";
52.17 -if poly_of_term vs (TermC.str2term "12 * x^^^3 * y^^^4 * z^^^6") = SOME [(12, [3, 4, 6])]
52.18 +if poly_of_term vs (TermC.str2term "12 * x \<up> 3 * y \<up> 4 * z \<up> 6") = SOME [(12, [3, 4, 6])]
52.19 then () else error "poly_of_term 4 changed";
52.20 -if poly_of_term vs (TermC.str2term "1 + 2 * x^^^3 * y^^^4 * z^^^6 + y") =
52.21 +if poly_of_term vs (TermC.str2term "1 + 2 * x \<up> 3 * y \<up> 4 * z \<up> 6 + y") =
52.22 SOME [(1, [0, 0, 0]), (1, [0, 1, 0]), (2, [3, 4, 6])]
52.23 then () else error "poly_of_term 5 changed";
52.24
52.25 (*poly_of_term is quite liberal:*)
52.26 (*the coefficient may be somewhere, the order of variables and the parentheses
52.27 within a monomial are arbitrary*)
52.28 -if poly_of_term vs (TermC.str2term "y^^^4 * (x^^^3 * 12 * z^^^6)") = SOME [(12, [3, 4, 6])]
52.29 +if poly_of_term vs (TermC.str2term "y \<up> 4 * (x \<up> 3 * 12 * z \<up> 6)") = SOME [(12, [3, 4, 6])]
52.30 then () else error "poly_of_term 6 changed";
52.31
52.32 (*there may even be more than 1 coefficient:*)
52.33 -if poly_of_term vs (TermC.str2term "2 * y^^^4 * (x^^^3 * 6 * z^^^6)") = SOME [(12, [3, 4, 6])]
52.34 +if poly_of_term vs (TermC.str2term "2 * y \<up> 4 * (x \<up> 3 * 6 * z \<up> 6)") = SOME [(12, [3, 4, 6])]
52.35 then () else error "poly_of_term 7 changed";
52.36
52.37 (*the order and the parentheses within monomials are arbitrary:*)
52.38 -if poly_of_term vs (TermC.str2term "2 * x^^^3 * y^^^4 * z^^^6 + (7 * y^^^8 + 1)")
52.39 +if poly_of_term vs (TermC.str2term "2 * x \<up> 3 * y \<up> 4 * z \<up> 6 + (7 * y \<up> 8 + 1)")
52.40 = SOME [(1, [0, 0, 0]), (7, [0, 8, 0]), (2, [3, 4, 6])]
52.41 then () else error "poly_of_term 8 changed";
52.42
52.43 "-------- fun is_poly --------------------------------------------------------";
52.44 "-------- fun is_poly --------------------------------------------------------";
52.45 "-------- fun is_poly --------------------------------------------------------";
52.46 -if is_poly (TermC.str2term "2 * x^^^3 * y^^^4 * z^^^6 + 7 * y^^^8 + 1")
52.47 +if is_poly (TermC.str2term "2 * x \<up> 3 * y \<up> 4 * z \<up> 6 + 7 * y \<up> 8 + 1")
52.48 then () else error "is_poly 1 changed";
52.49 -if not (is_poly (TermC.str2term "2 * (x^^^3 * y^^^4 * z^^^6 + 7) * y^^^8 + 1"))
52.50 +if not (is_poly (TermC.str2term "2 * (x \<up> 3 * y \<up> 4 * z \<up> 6 + 7) * y \<up> 8 + 1"))
52.51 then () else error "is_poly 2 changed";
52.52
52.53 "-------- fun term_of_poly ---------------------------------------------------";
52.54 "-------- fun term_of_poly ---------------------------------------------------";
52.55 "-------- fun term_of_poly ---------------------------------------------------";
52.56 val expT = HOLogic.realT
52.57 -val Free (_, baseT) = (hd o vars o TermC.str2term) "12 * x^^^3 * y^^^4 * z^^^6";
52.58 +val Free (_, baseT) = (hd o vars o TermC.str2term) "12 * x \<up> 3 * y \<up> 4 * z \<up> 6";
52.59 val p = [(1, [0, 0, 0]), (7, [0, 8, 0]), (2, [3, 4, 5])]
52.60 -val vs = TermC.vars_of (the (parseNEW ctxt "12 * x^^^3 * y^^^4 * z^^^6"))
52.61 +val vs = TermC.vars_of (the (parseNEW ctxt "12 * x \<up> 3 * y \<up> 4 * z \<up> 6"))
52.62 (*precondition for [(c, es),...]: legth es = length vs*)
52.63 ;
52.64 -if UnparseC.term (term_of_poly baseT expT vs p) = "1 + 7 * y ^^^ 8 + 2 * x ^^^ 3 * y ^^^ 4 * z ^^^ 5"
52.65 +if UnparseC.term (term_of_poly baseT expT vs p) = "1 + 7 * y \<up> 8 + 2 * x \<up> 3 * y \<up> 4 * z \<up> 5"
52.66 then () else error "term_of_poly 1 changed";
52.67
52.68 "-------- integration lev.1 fun factout_p_ -----------------------------------";
52.69 "-------- integration lev.1 fun factout_p_ -----------------------------------";
52.70 "-------- integration lev.1 fun factout_p_ -----------------------------------";
52.71 -val t = TermC.str2term "(x^^^2 + -1*y^^^2) / (x^^^2 + -1*x*y)"
52.72 +val t = TermC.str2term "(x \<up> 2 + -1*y \<up> 2) / (x \<up> 2 + -1*x*y)"
52.73 val SOME (t', asm) = factout_p_ thy t;
52.74 if UnparseC.term t' = "(x + y) * (x + -1 * y) / (x * (x + -1 * y))"
52.75 then () else error ("factout_p_ term 1 changed: " ^ UnparseC.term t')
52.76 @@ -113,7 +113,7 @@
52.77 val t = TermC.str2term "nothing + to_cancel ::real";
52.78 if NONE = factout_p_ thy t then () else error "factout_p_ doesn't report non-applicable";
52.79 ;
52.80 -val t = TermC.str2term "((3 * x^^^2 + 6 *x + 3) / (2*x + 2))";
52.81 +val t = TermC.str2term "((3 * x \<up> 2 + 6 *x + 3) / (2*x + 2))";
52.82 val SOME (t', asm) = factout_p_ thy t;
52.83 if UnparseC.term t' = "(3 + 3 * x) * (1 + x) / (2 * (1 + x))" andalso
52.84 UnparseC.terms asm = "[\"1 + x \<noteq> 0\"]"
52.85 @@ -122,7 +122,7 @@
52.86 "-------- integration lev.1 fun cancel_p_ ------------------------------------";
52.87 "-------- integration lev.1 fun cancel_p_ ------------------------------------";
52.88 "-------- integration lev.1 fun cancel_p_ ------------------------------------";
52.89 -val t = TermC.str2term "(x^^^2 + -1*y^^^2) / (x^^^2 + -1*x*y)"
52.90 +val t = TermC.str2term "(x \<up> 2 + -1*y \<up> 2) / (x \<up> 2 + -1*x*y)"
52.91 val SOME (t', asm) = cancel_p_ thy t;
52.92 if (UnparseC.term t', UnparseC.terms asm) = ("(x + y) / x", "[\"x \<noteq> 0\"]")
52.93 then () else error ("cancel_p_ (t', asm) 1 changed: " ^ UnparseC.term t')
52.94 @@ -130,7 +130,7 @@
52.95 val t = TermC.str2term "nothing + to_cancel ::real";
52.96 if NONE = cancel_p_ thy t then () else error "cancel_p_ doesn't report non-applicable";
52.97 ;
52.98 -val t = TermC.str2term "((3 * x^^^2 + 6 *x + 3) / (2*x + 2))";
52.99 +val t = TermC.str2term "((3 * x \<up> 2 + 6 *x + 3) / (2*x + 2))";
52.100 val SOME (t', asm) = cancel_p_ thy t;
52.101 if UnparseC.term t' = "(3 + 3 * x) / 2" andalso UnparseC.terms asm = "[]"
52.102 then () else error "cancel_p_ 1 changed";
52.103 @@ -153,7 +153,7 @@
52.104 then () else error "common_nominator_p_ asm 1 changed"
52.105
52.106 "-------- example in mail Nipkow";
52.107 -val t = TermC.str2term "x/(x^^^2 + -1*y^^^2) + y/(x^^^2 + -1*x*y)";
52.108 +val t = TermC.str2term "x/(x \<up> 2 + -1*y \<up> 2) + y/(x \<up> 2 + -1*x*y)";
52.109 val SOME (t', asm) = common_nominator_p_ thy t;
52.110 if UnparseC.term t' = "x * x / " ^
52.111 "((x + -1 * y) * ((x + y) * x))" ^
52.112 @@ -181,10 +181,10 @@
52.113 "-------- integration lev.1 fun add_fraction_p_ ------------------------------";
52.114 val t = TermC.str2term "((x + (-1)) / (x + 1)) + ((x + 1) / (x + (-1)))";
52.115 val SOME (t', asm) = add_fraction_p_ thy t;
52.116 -if UnparseC.term t' = "(2 + 2 * x ^^^ 2) / (-1 + x ^^^ 2)"
52.117 +if UnparseC.term t' = "(2 + 2 * x \<up> 2) / (-1 + x \<up> 2)"
52.118 then () else error "add_fraction_p_ 3 changed";
52.119 ;
52.120 -if UnparseC.terms asm = "[\"-1 + x ^^^ 2 \<noteq> 0\"]"
52.121 +if UnparseC.terms asm = "[\"-1 + x \<up> 2 \<noteq> 0\"]"
52.122 then () else error "add_fraction_p_ 3 changed";
52.123 ;
52.124 val t = TermC.str2term "nothing / to_add";
52.125 @@ -192,8 +192,8 @@
52.126 ;
52.127 val t = TermC.str2term "((x + (-1)) / (x + 1)) + ((x + 1) / (x + (-1)))";
52.128 val SOME (t', asm) = add_fraction_p_ thy t;
52.129 -if UnparseC.term t' = "(2 + 2 * x ^^^ 2) / (-1 + x ^^^ 2)" andalso
52.130 - UnparseC.terms asm = "[\"-1 + x ^^^ 2 \<noteq> 0\"]"
52.131 +if UnparseC.term t' = "(2 + 2 * x \<up> 2) / (-1 + x \<up> 2)" andalso
52.132 + UnparseC.terms asm = "[\"-1 + x \<up> 2 \<noteq> 0\"]"
52.133 then () else error "add_fraction_p_ 3 changed";
52.134
52.135 "-------- and app_rev ...traced down from rewrite_set_ until prepats ---------";
52.136 @@ -203,7 +203,7 @@
52.137 (which does not to work, because substitution is not done -- compare rew_sub!);
52.138 keep this sequence for the case, factout_p, cancel_p, common_nominator_p, add_fraction_p
52.139 (again) get prepat = [] changed to <>[]. *)
52.140 -val t = TermC.str2term "(x^^^2 + -1*y^^^2) / (x^^^2 + -1*x*y)";
52.141 +val t = TermC.str2term "(x \<up> 2 + -1*y \<up> 2) / (x \<up> 2 + -1*x*y)";
52.142
52.143 (*rewrite_set_ @{theory Isac_Knowledge} true cancel t = NONE; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*)
52.144 "~~~~~ fun rewrite_set_, args:"; val (thy, bool, rls, term) = (thy, false, cancel_p, t);
52.145 @@ -280,13 +280,13 @@
52.146 "-------- fun rewrite_set_ cancel_p downto fun gcd_poly ----------------------";
52.147 "-------- fun rewrite_set_ cancel_p downto fun gcd_poly ----------------------";
52.148 "-------- fun rewrite_set_ cancel_p downto fun gcd_poly ----------------------";
52.149 -val t = TermC.str2term "(12 * x * y) / (8 * y^^^2 )";
52.150 +val t = TermC.str2term "(12 * x * y) / (8 * y \<up> 2 )";
52.151 (* "-------- example 187a": exception Div raised...
52.152 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;*)
52.153 -val t = TermC.str2term "(8 * x^^^2 * y * z ) / (18 * x * y^^^2 * z )";
52.154 +val t = TermC.str2term "(8 * x \<up> 2 * y * z ) / (18 * x * y \<up> 2 * z )";
52.155 (* "-------- example 187b": doesn't terminate...
52.156 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;*)
52.157 -val t = TermC.str2term "(9 * x^^^5 * y^^^2 * z^^^4) / (15 * x^^^6 * y^^^3 * z )";
52.158 +val t = TermC.str2term "(9 * x \<up> 5 * y \<up> 2 * z \<up> 4) / (15 * x \<up> 6 * y \<up> 3 * z )";
52.159 (* "-------- example 187c": doesn't terminate...
52.160 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;*)
52.161 "~~~~~ fun rewrite_set_, args:"; val (thy, bool, rls, term) = (@{theory Isac_Knowledge}, false, cancel_p, t);
52.162 @@ -335,17 +335,17 @@
52.163 "-------- rls norm_Rational downto fun gcd_poly ------------------------------";
52.164 "-------- rls norm_Rational downto fun gcd_poly ------------------------------";
52.165 "-------- rls norm_Rational downto fun gcd_poly ------------------------------";
52.166 -val t = TermC.str2term "(x^^^2 - 4)*(3 - y) / ((y^^^2 - 9)*(2+x))";
52.167 +val t = TermC.str2term "(x \<up> 2 - 4)*(3 - y) / ((y \<up> 2 - 9)*(2+x))";
52.168 Rewrite.trace_on := false (*true false*);
52.169 (* trace stops with ...: (and then jEdit hangs)..
52.170 rewrite_set_ thy false norm_Rational t;
52.171 :
52.172 -### rls: cancel_p on: (-12 + 4 * y + 3 * x ^^^ 2 + -1 * (x ^^^ 2 * y)) /
52.173 -(-18 + -9 * x + 2 * y ^^^ 2 + x * y ^^^ 2)
52.174 +### rls: cancel_p on: (-12 + 4 * y + 3 * x \<up> 2 + -1 * (x \<up> 2 * y)) /
52.175 +(-18 + -9 * x + 2 * y \<up> 2 + x * y \<up> 2)
52.176 *)
52.177 -val t = TermC.str2term (*copy from above: "::real" is not required due to "^^^"*)
52.178 - ("(-12 + 4 * y + 3 * x ^^^ 2 + -1 * (x ^^^ 2 * y)) /" ^
52.179 - "(-18 + -9 * x + 2 * y ^^^ 2 + x * y ^^^ 2)");
52.180 +val t = TermC.str2term (*copy from above: "::real" is not required due to " \<up> "*)
52.181 + ("(-12 + 4 * y + 3 * x \<up> 2 + -1 * (x \<up> 2 * y)) /" ^
52.182 + "(-18 + -9 * x + 2 * y \<up> 2 + x * y \<up> 2)");
52.183 (*cancel_p_ thy t;
52.184 exception Div raised*)
52.185
52.186 @@ -435,7 +435,7 @@
52.187
52.188 (*---------- (1) with Free A, B ----------------------------------------------------------------*)
52.189 val t = (the o (parseNEW ctxt)) "3 = A / 2 + A / 4 + (B / 2 + -1 * B / (2::real))";
52.190 - (* required for applying thms in rewriting ^^^^*)
52.191 + (* required for applying thms in rewriting \<up> ^*)
52.192 (* we get details from here..*)
52.193
52.194 Rewrite.trace_on := false;
52.195 @@ -566,7 +566,7 @@
52.196 then () else error "rational.sml cancel Schalk 186b";
52.197
52.198 "-------- example 186c";
52.199 -val t = TermC.str2term "(144 * a^^^2 * b * c) / (12 * a * b * c)";
52.200 +val t = TermC.str2term "(144 * a \<up> 2 * b * c) / (12 * a * b * c)";
52.201 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.202 if (UnparseC.term t', UnparseC.terms asm) = ("12 * a / 1", "[]")
52.203 then () else error "rational.sml cancel Schalk 186c";
52.204 @@ -574,7 +574,7 @@
52.205 (* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! exception Div raised !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52.206 see --- fun rewrite_set_ downto fun gcd_poly ---
52.207 "-------- example 187a";
52.208 -val t = TermC.str2term "(12 * x * y) / (8 * y^^^2 )";
52.209 +val t = TermC.str2term "(12 * x * y) / (8 * y \<up> 2 )";
52.210 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.211 if (UnparseC.term t', UnparseC.terms asm) = ("3 * x / (2 * y)", "[\"4 * y ~= 0\"]")
52.212 then () else error "rational.sml cancel Schalk 187a";
52.213 @@ -583,7 +583,7 @@
52.214 (* doesn't terminate !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52.215 see --- fun rewrite_set_ downto fun gcd_poly ---
52.216 "-------- example 187b";
52.217 -val t = TermC.str2term "(8 * x^^^2 * y * z ) / (18 * x * y^^^2 * z )";
52.218 +val t = TermC.str2term "(8 * x \<up> 2 * y * z ) / (18 * x * y \<up> 2 * z )";
52.219 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.220 if (UnparseC.term t', UnparseC.terms asm) = ("4 * x / (9 * y)", "[\"2 * (z * (y * x)) ~= 0\"]")
52.221 then () else error "rational.sml cancel Schalk 187b";
52.222 @@ -592,10 +592,10 @@
52.223 (* doesn't terminate !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52.224 see --- fun rewrite_set_ downto fun gcd_poly ---
52.225 "-------- example 187c";
52.226 -val t = TermC.str2term "(9 * x^^^5 * y^^^2 * z^^^4) / (15 * x^^^6 * y^^^3 * z )";
52.227 +val t = TermC.str2term "(9 * x \<up> 5 * y \<up> 2 * z \<up> 4) / (15 * x \<up> 6 * y \<up> 3 * z )";
52.228 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.229 if (UnparseC.term t', UnparseC.terms asm) =
52.230 - ("3 * z ^^^ 3 / (5 * (y * x))", "[\"3 * (z * (y ^^^ 2 * x ^^^ 5)) ~= 0\"]")
52.231 + ("3 * z \<up> 3 / (5 * (y * x))", "[\"3 * (z * (y \<up> 2 * x \<up> 5)) ~= 0\"]")
52.232 then () else error "rational.sml cancel Schalk 187c";
52.233 *)
52.234
52.235 @@ -630,22 +630,22 @@
52.236 then () else error "rational.sml cancel Schalk make_polynomial 2";
52.237
52.238 "-------- example 190a";
52.239 -val t = TermC.str2term "( 27 * a^^^3 + 9 * a^^^2 + 3 * a + 1 ) / ( 27 * a^^^3 + 18 * a^^^2 + 3 * a )";
52.240 +val t = TermC.str2term "( 27 * a \<up> 3 + 9 * a \<up> 2 + 3 * a + 1 ) / ( 27 * a \<up> 3 + 18 * a \<up> 2 + 3 * a )";
52.241 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.242 if (UnparseC.term t', UnparseC.terms asm) =
52.243 - ("(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)", "[\"3 * a + 9 * a ^^^ 2 \<noteq> 0\"]")
52.244 + ("(1 + 9 * a \<up> 2) / (3 * a + 9 * a \<up> 2)", "[\"3 * a + 9 * a \<up> 2 \<noteq> 0\"]")
52.245 then () else error "rational.sml cancel Schalk 190a";
52.246
52.247 "-------- example 190c";
52.248 -val t = TermC.str2term "((1 + 9 * a ^^^ 2)*(1 + 3 * a))/((3 * a + 9 * a ^^^ 2)*(1 + 3 * a))";
52.249 +val t = TermC.str2term "((1 + 9 * a \<up> 2)*(1 + 3 * a))/((3 * a + 9 * a \<up> 2)*(1 + 3 * a))";
52.250 val SOME (t', asm) = rewrite_set_ thy false make_polynomial t;
52.251 if (UnparseC.term t', UnparseC.terms asm) =
52.252 - ("(1 + 3 * a + 9 * a ^^^ 2 + 27 * a ^^^ 3) /\n(3 * a + 18 * a ^^^ 2 + 27 * a ^^^ 3)", "[]")
52.253 + ("(1 + 3 * a + 9 * a \<up> 2 + 27 * a \<up> 3) /\n(3 * a + 18 * a \<up> 2 + 27 * a \<up> 3)", "[]")
52.254 then () else error "rational.sml make_polynomial Schalk 190c";
52.255
52.256 "-------- example 191a";
52.257 -val t = TermC.str2term "( x^^^2 + -1 * y^^^2 ) / ( x + y )";
52.258 - is_expanded (TermC.str2term "x^^^2 + -1 * y^^^2") = false; (*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*)
52.259 +val t = TermC.str2term "( x \<up> 2 + -1 * y \<up> 2 ) / ( x + y )";
52.260 + is_expanded (TermC.str2term "x \<up> 2 + -1 * y \<up> 2") = false; (*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*)
52.261 is_expanded (TermC.str2term "x + y") = true;
52.262 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.263 if (UnparseC.term t', UnparseC.terms asm) = ("(x + -1 * y) / 1", "[]")
52.264 @@ -654,69 +654,69 @@
52.265 "-------- example 191b";
52.266 val t = TermC.str2term "((x + (-1) * y)*(x + y))/((1)*(x + y))";
52.267 val SOME (t', asm) = rewrite_set_ thy false make_polynomial t;
52.268 -if (UnparseC.term t', UnparseC.terms asm) = ("(x ^^^ 2 + -1 * y ^^^ 2) / (x + y)", "[]")
52.269 +if (UnparseC.term t', UnparseC.terms asm) = ("(x \<up> 2 + -1 * y \<up> 2) / (x + y)", "[]")
52.270 then () else error "rational.sml make_polynomial Schalk 191b";
52.271
52.272 "-------- example 191c";
52.273 -val t = TermC.str2term "( 9 * x^^^2 + -30 * x + 25 ) / ( 9 * x^^^2 + -25 )";
52.274 - is_expanded (TermC.str2term "9 * x^^^2 + -30 * x + 25") = true;
52.275 - is_expanded (TermC.str2term "25 + -30*x + 9*x^^^2") = true;
52.276 - is_expanded (TermC.str2term "-25 + 9*x^^^2") = true;
52.277 +val t = TermC.str2term "( 9 * x \<up> 2 + -30 * x + 25 ) / ( 9 * x \<up> 2 + -25 )";
52.278 + is_expanded (TermC.str2term "9 * x \<up> 2 + -30 * x + 25") = true;
52.279 + is_expanded (TermC.str2term "25 + -30*x + 9*x \<up> 2") = true;
52.280 + is_expanded (TermC.str2term "-25 + 9*x \<up> 2") = true;
52.281
52.282 val t = TermC.str2term "(((-5) + 3 * x)*((-5) + 3 * x))/((5 + 3 * x)*((-5) + 3 * x))";
52.283 val SOME (t', asm) = rewrite_set_ thy false make_polynomial t;
52.284 -if (UnparseC.term t', UnparseC.terms asm) = ("(25 + -30 * x + 9 * x ^^^ 2) / (-25 + 9 * x ^^^ 2)", "[]")
52.285 +if (UnparseC.term t', UnparseC.terms asm) = ("(25 + -30 * x + 9 * x \<up> 2) / (-25 + 9 * x \<up> 2)", "[]")
52.286 then () else error "rational.sml make_polynomial Schalk 191c";
52.287
52.288 "-------- example 192b";
52.289 -val t = TermC.str2term "( 7 * x^^^3 + -1 * x^^^2 * y ) / ( 7 * x * y^^^2 + -1 * y^^^3 )";
52.290 +val t = TermC.str2term "( 7 * x \<up> 3 + -1 * x \<up> 2 * y ) / ( 7 * x * y \<up> 2 + -1 * y \<up> 3 )";
52.291 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.292 -if (UnparseC.term t', UnparseC.terms asm) = ("x ^^^ 2 / y ^^^ 2", "[\"y ^^^ 2 \<noteq> 0\"]")
52.293 +if (UnparseC.term t', UnparseC.terms asm) = ("x \<up> 2 / y \<up> 2", "[\"y \<up> 2 \<noteq> 0\"]")
52.294 then () else error "rational.sml cancel_p Schalk 192b";
52.295
52.296 -val t = TermC.str2term "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))";
52.297 +val t = TermC.str2term "((x \<up> 2)*(7 * x + (-1) * y))/((y \<up> 2)*(7 * x + (-1) * y))";
52.298 val SOME (t', asm) = rewrite_set_ thy false make_polynomial t;
52.299 if (UnparseC.term t', UnparseC.terms asm) =
52.300 - ("(7 * x ^^^ 3 + -1 * x ^^^ 2 * y) / (7 * x * y ^^^ 2 + -1 * y ^^^ 3)", "[]")
52.301 + ("(7 * x \<up> 3 + -1 * x \<up> 2 * y) / (7 * x * y \<up> 2 + -1 * y \<up> 3)", "[]")
52.302 then () else error "rational.sml make_polynomial Schalk 192b";
52.303
52.304 -val t = TermC.str2term "((x ^^^ 2)*(7 * x + (-1) * y))/((y ^^^ 2)*(7 * x + (-1) * y))";
52.305 +val t = TermC.str2term "((x \<up> 2)*(7 * x + (-1) * y))/((y \<up> 2)*(7 * x + (-1) * y))";
52.306 val SOME (t', asm) = rewrite_set_ thy false make_polynomial t;
52.307 if (UnparseC.term t', UnparseC.terms asm) =
52.308 - ("(7 * x ^^^ 3 + -1 * x ^^^ 2 * y) / (7 * x * y ^^^ 2 + -1 * y ^^^ 3)", "[]")
52.309 + ("(7 * x \<up> 3 + -1 * x \<up> 2 * y) / (7 * x * y \<up> 2 + -1 * y \<up> 3)", "[]")
52.310 then () else error "rational.sml make_polynomial Schalk WN050929 not working";
52.311
52.312 "-------- example 193a";
52.313 -val t = TermC.str2term "( x^^^2 + -6 * x + 9 ) / ( x^^^2 + -9 )";
52.314 +val t = TermC.str2term "( x \<up> 2 + -6 * x + 9 ) / ( x \<up> 2 + -9 )";
52.315 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.316 if (UnparseC.term t', UnparseC.terms asm) = ("(-3 + x) / (3 + x)", "[\"3 + x \<noteq> 0\"]")
52.317 then () else error "rational.sml cancel_p Schalk 193a";
52.318
52.319 "-------- example 193b";
52.320 -val t = TermC.str2term "( x^^^2 + -8 * x + 16 ) / ( 2 * x^^^2 + -32 )";
52.321 +val t = TermC.str2term "( x \<up> 2 + -8 * x + 16 ) / ( 2 * x \<up> 2 + -32 )";
52.322 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.323 if (UnparseC.term t', UnparseC.terms asm) = ("(-4 + x) / (8 + 2 * x)", "[\"8 + 2 * x \<noteq> 0\"]")
52.324 then () else error "rational.sml cancel_p Schalk 193b";
52.325
52.326 "-------- example 193c";
52.327 -val t = TermC.str2term "( 2 * x + -50 * x^^^3 ) / ( 25 * x^^^2 + -10 * x + 1 )";
52.328 +val t = TermC.str2term "( 2 * x + -50 * x \<up> 3 ) / ( 25 * x \<up> 2 + -10 * x + 1 )";
52.329 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.330 if (UnparseC.term t', UnparseC.terms asm) =
52.331 - ("(2 * x + 10 * x ^^^ 2) / (1 + -5 * x)", "[\"1 + -5 * x \<noteq> 0\"]")
52.332 + ("(2 * x + 10 * x \<up> 2) / (1 + -5 * x)", "[\"1 + -5 * x \<noteq> 0\"]")
52.333 then () else error "rational.sml cancel_p Schalk 193c";
52.334
52.335 (*WN:*)
52.336 -val t = TermC.str2term "(-25 + 9*x^^^2)/(5 + 3*x)";
52.337 +val t = TermC.str2term "(-25 + 9*x \<up> 2)/(5 + 3*x)";
52.338 val SOME (t, asm) = rewrite_set_ thy false cancel_p t;
52.339 -if (UnparseC.term t', UnparseC.terms asm) = ("(2 * x + 10 * x ^^^ 2) / (1 + -5 * x)", "[]")
52.340 +if (UnparseC.term t', UnparseC.terms asm) = ("(2 * x + 10 * x \<up> 2) / (1 + -5 * x)", "[]")
52.341 then () else error "rational.sml cancel WN 1";
52.342
52.343 "-------- example heuberger";
52.344 -val t = TermC.str2term ("(x^^^4 + x * y + x^^^3 * y + y^^^2) / " ^
52.345 - "(x + 5 * x^^^2 + y + 5 * x * y + x^^^2 * y^^^3 + x * y^^^4)");
52.346 +val t = TermC.str2term ("(x \<up> 4 + x * y + x \<up> 3 * y + y \<up> 2) / " ^
52.347 + "(x + 5 * x \<up> 2 + y + 5 * x * y + x \<up> 2 * y \<up> 3 + x * y \<up> 4)");
52.348 val SOME (t', asm) = rewrite_set_ thy false cancel_p t;
52.349 if (UnparseC.term t', UnparseC.terms asm) =
52.350 - ("(x ^^^ 3 + y) / (1 + 5 * x + x * y ^^^ 3)", "[\"1 + 5 * x + x * y ^^^ 3 \<noteq> 0\"]")
52.351 + ("(x \<up> 3 + y) / (1 + 5 * x + x * y \<up> 3)", "[\"1 + 5 * x + x * y \<up> 3 \<noteq> 0\"]")
52.352 then () else error "rational.sml cancel_p heuberger";
52.353
52.354 "-------- rewrite_set_ add_fractions_p from: Mathematik 1 Schalk -------------";
52.355 @@ -792,14 +792,14 @@
52.356 "-------- reverse rewrite ----------------------------------------------------";
52.357 "-------- reverse rewrite ----------------------------------------------------";
52.358 (** the term for which reverse rewriting is demonstrated **)
52.359 -val t = TermC.str2term "(9 + -1 * x ^^^ 2) / (9 + 6 * x + x ^^^ 2)";
52.360 +val t = TermC.str2term "(9 + -1 * x \<up> 2) / (9 + 6 * x + x \<up> 2)";
52.361 val Rrls {scr = Rfuns {init_state = ini, locate_rule = loc,
52.362 next_rule = nex, normal_form = nor, ...},...} = cancel_p;
52.363
52.364 (** normal_form produces the result in ONE step **)
52.365 val SOME (t',_) = nor t;
52.366 if UnparseC.term t' = "(3 + -1 * x) / (3 + x)" then ()
52.367 -else error "rational.sml normal_form (9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
52.368 +else error "rational.sml normal_form (9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
52.369
52.370 (** initialize the interpreter state used by the 'me' **)
52.371 val (t, _, revsets, _) = ini t;
52.372 @@ -809,8 +809,8 @@
52.373 (@{thm realpow_twoI} |> Thm.get_name_hint |> ThmC.cut_id)
52.374 then () else error "first element of revset changed";
52.375 if
52.376 -(revsets |> nth 1 |> nth 1 |> Rule.to_string) = "Thm (\"realpow_twoI\",?r1 ^^^ 2 = ?r1 * ?r1)" andalso
52.377 -(revsets |> nth 1 |> nth 2 |> Rule.to_string) = "Thm (\"#: 9 = 3 ^^^ 2\",9 = 3 ^^^ 2)" andalso
52.378 +(revsets |> nth 1 |> nth 1 |> Rule.to_string) = "Thm (\"realpow_twoI\",?r1 \<up> 2 = ?r1 * ?r1)" andalso
52.379 +(revsets |> nth 1 |> nth 2 |> Rule.to_string) = "Thm (\"#: 9 = 3 \<up> 2\",9 = 3 \<up> 2)" andalso
52.380 (revsets |> nth 1 |> nth 3 |> Rule.to_string) = "Thm (\"#: 6 * x = 2 * (3 * x)\",6 * x = 2 * (3 * x))"
52.381 andalso
52.382 (revsets |> nth 1 |> nth 4 |> Rule.to_string) = "Thm (\"#: -3 * x = -1 * (3 * x)\",-3 * x = -1 * (3 * x))"
52.383 @@ -841,8 +841,8 @@
52.384 if str = "sym_#power_Float ((3,0), (0,0)) __ ((2,0), (0,0))"
52.385 andalso ThmC.string_of_thm thm =
52.386 (string_of_thm (Thm.make_thm @{theory "Isac_Knowledge"}
52.387 - (Trueprop $ (Thm.term_of o the o (TermC.parse thy)) "9 = 3 ^^^ 2"))) then ()
52.388 -else error "rational.sml next_rule (9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
52.389 + (Trueprop $ (Thm.term_of o the o (TermC.parse thy)) "9 = 3 \<up> 2"))) then ()
52.390 +else error "rational.sml next_rule (9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
52.391 \---------------------------------------------------------------------------------------/*)
52.392
52.393 (** check, if the rule 'r' applied by the user to 't' belongs to the ruleset;
52.394 @@ -853,30 +853,30 @@
52.395 we don't repair this, because interaction within "reverse rewriting" never worked properly:
52.396
52.397 val (r, (t, asm))::_ = loc revsets t r;
52.398 -if UnparseC.term t = "(9 - x ^^^ 2) / (3 ^^^ 2 + 6 * x + x ^^^ 2)" andalso asm = []
52.399 -then () else error "rational.sml locate_rule (9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
52.400 +if UnparseC.term t = "(9 - x \<up> 2) / (3 \<up> 2 + 6 * x + x \<up> 2)" andalso asm = []
52.401 +then () else error "rational.sml locate_rule (9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
52.402
52.403 (* find the next rule to apply *)
52.404 val SOME (r as (Thm (str, thm))) = nex revsets t;
52.405 if str = "sym_#power_Float ((3,0), (0,0)) __ ((2,0), (0,0))" andalso
52.406 ThmC.string_of_thm thm = (string_of_thm (ThmC_Def.make_thm @{theory "Isac_Knowledge"}
52.407 - (Trueprop $ (Thm.term_of o the o (TermC.parse thy)) "9 = 3 ^^^ 2"))) then ()
52.408 -else error "rational.sml next_rule (9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2)";
52.409 + (Trueprop $ (Thm.term_of o the o (TermC.parse thy)) "9 = 3 \<up> 2"))) then ()
52.410 +else error "rational.sml next_rule (9 - x \<up> 2) / (9 - 6 * x + x \<up> 2)";
52.411
52.412 (*check the next rule*)
52.413 val (r, (t, asm)) :: _ = loc revsets t r;
52.414 -if UnparseC.term t = "(3 ^^^ 2 - x ^^^ 2) / (3 ^^^ 2 + 6 * x + x ^^^ 2)" then ()
52.415 -else error "rational.sml locate_rule (9 - x ^^^ 2) / (9 - 6 * x + x ^^^ 2) II";
52.416 +if UnparseC.term t = "(3 \<up> 2 - x \<up> 2) / (3 \<up> 2 + 6 * x + x \<up> 2)" then ()
52.417 +else error "rational.sml locate_rule (9 - x \<up> 2) / (9 - 6 * x + x \<up> 2) II";
52.418
52.419 (*find and check the next rules, rewrite*)
52.420 val SOME r = nex revsets t;
52.421 val (r,(t,asm))::_ = loc revsets t r;
52.422 -if UnparseC.term t = "(3 ^^^ 2 - x ^^^ 2) / (3 ^^^ 2 + 2 * 3 * x + x ^^^ 2)" then ()
52.423 +if UnparseC.term t = "(3 \<up> 2 - x \<up> 2) / (3 \<up> 2 + 2 * 3 * x + x \<up> 2)" then ()
52.424 else error "rational.sml locate_rule II";
52.425
52.426 val SOME r = nex revsets t;
52.427 val (r,(t,asm))::_ = loc revsets t r;
52.428 -if UnparseC.term t = "(3 - x) * (3 + x) / (3 ^^^ 2 + 2 * 3 * x + x ^^^ 2)" then ()
52.429 +if UnparseC.term t = "(3 - x) * (3 + x) / (3 \<up> 2 + 2 * 3 * x + x \<up> 2)" then ()
52.430 else error "rational.sml next_rule II";
52.431
52.432 val SOME r = nex revsets t;
52.433 @@ -898,7 +898,7 @@
52.434 special cases.*)
52.435
52.436 (*the term for which reverse rewriting is demonstrated*)
52.437 -val t = TermC.str2term "(9 + (-1)*x^^^2) / (9 + ((-6)*x + x^^^2))";
52.438 +val t = TermC.str2term "(9 + (-1)*x \<up> 2) / (9 + ((-6)*x + x \<up> 2))";
52.439 val Rrls {scr=Rfuns {init_state=ini,locate_rule=loc,
52.440 next_rule=nex,normal_form=nor,...},...} = cancel_p;
52.441
52.442 @@ -921,7 +921,7 @@
52.443
52.444 val SOME r = nex revsets t;
52.445 eq_Thm (r, Thm ("sym_#power_Float ((3,0), (0,0)) __ ((2,0), (0,0))",
52.446 - mk_thm thy "9 = 3 ^^^ 2"));
52.447 + mk_thm thy "9 = 3 \<up> 2"));
52.448 (*WN060831 *** id_of_thm
52.449 Exception- ERROR raised ...
52.450 val (r,(t,asm))::_ = loc revsets t r;
52.451 @@ -944,9 +944,9 @@
52.452 if UnparseC.term t' = "(237 + 65 * x) / 36 = 0" then ()
52.453 else error "rational.sml 2";
52.454
52.455 -val t = TermC.str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 - (6*x)^^^2 + 29";
52.456 +val t = TermC.str2term "(1/2 + (5*x)/2) \<up> 2 - ((13*x)/2 - 5/2) \<up> 2 - (6*x) \<up> 2 + 29";
52.457 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.458 -if UnparseC.term t' = "23 + 35 * x + -72 * x ^^^ 2" then ()
52.459 +if UnparseC.term t' = "23 + 35 * x + -72 * x \<up> 2" then ()
52.460 else error "rational.sml 3";
52.461
52.462 (*Rewrite.trace_on:=true;*)
52.463 @@ -957,19 +957,19 @@
52.464 val SOME (t',_) = rewrite_set_ thy false powers_erls t; UnparseC.term t';
52.465 "HOL.True";
52.466
52.467 -val t = TermC.str2term "(6*x)^^^2";
52.468 +val t = TermC.str2term "(6*x) \<up> 2";
52.469 val SOME (t',_) = rewrite_ thy dummy_ord powers_erls false
52.470 (ThmC.numerals_to_Free @{thm realpow_def_atom}) t;
52.471 -if UnparseC.term t' = "6 * x * (6 * x) ^^^ (2 + -1)" then ()
52.472 -else error "rational.sml powers_erls (6*x)^^^2";
52.473 +if UnparseC.term t' = "6 * x * (6 * x) \<up> (2 + -1)" then ()
52.474 +else error "rational.sml powers_erls (6*x) \<up> 2";
52.475
52.476 val t = TermC.str2term "-1 * (-2 * (5 / 2 * (13 * x / 2)))";
52.477 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.478 if UnparseC.term t' = "65 * x / 2" then () else error "rational.sml 4";
52.479
52.480 -val t = TermC.str2term "1 - ((13*x)/2 - 5/2)^^^2";
52.481 +val t = TermC.str2term "1 - ((13*x)/2 - 5/2) \<up> 2";
52.482 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.483 -if UnparseC.term t' = "(-21 + 130 * x + -169 * x ^^^ 2) / 4" then ()
52.484 +if UnparseC.term t' = "(-21 + 130 * x + -169 * x \<up> 2) / 4" then ()
52.485 else error "rational.sml 5";
52.486
52.487 (*SRAM Schalk I, p.92 Nr. 609a*)
52.488 @@ -984,13 +984,13 @@
52.489 if UnparseC.term t' = "(3 + x) / -2" then () else error "rational.sml 7";
52.490
52.491 (*SRAM Schalk I, p.92 Nr. 476a*)
52.492 -val t = TermC.str2term "(x^^^2/(1 - x^^^2) + 1)/(x/(1 - x) + 1) * (1 + x)";
52.493 +val t = TermC.str2term "(x \<up> 2/(1 - x \<up> 2) + 1)/(x/(1 - x) + 1) * (1 + x)";
52.494 (*. a/b : c/d translated to a/b * d/c .*)
52.495 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.496 if UnparseC.term t' = "1" then () else error "rational.sml 8";
52.497
52.498 (*Schalk I, p.92 Nr. 472a*)
52.499 -val t = TermC.str2term "((8*x^^^2 - 32*y^^^2)/(2*x + 4*y))/((4*x - 8*y)/(x + y))";
52.500 +val t = TermC.str2term "((8*x \<up> 2 - 32*y \<up> 2)/(2*x + 4*y))/((4*x - 8*y)/(x + y))";
52.501 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.502 if UnparseC.term t' = "x + y" then () else error "rational.sml p.92 Nr. 472a";
52.503
52.504 @@ -998,7 +998,7 @@
52.505
52.506 (*WN130910 add_fractions_p exception Div raised + history:
52.507 ### WN.2.6.03 from rlang.sml 56a
52.508 -val t = TermC.str2term "(a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) = 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)";
52.509 +val t = TermC.str2term "(a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) = 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)";
52.510 val NONE = rewrite_set_ thy false add_fractions_p t;
52.511
52.512 THE ERROR ALREADY OCCURS IN THIS PART:
52.513 @@ -1029,15 +1029,15 @@
52.514 "-------- examples cancellation from: Mathematik 1 Schalk --------------------";
52.515 "-------- examples cancellation from: Mathematik 1 Schalk --------------------";
52.516 (* e190c Stefan K.*)
52.517 -val t = TermC.str2term "((1 + 9*a^^^2) * (1 + 3*a)) / ((3*a + 9*a^^^2) * (1 + 3*a))";
52.518 +val t = TermC.str2term "((1 + 9*a \<up> 2) * (1 + 3*a)) / ((3*a + 9*a \<up> 2) * (1 + 3*a))";
52.519 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.520 -if UnparseC.term t = "(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)"
52.521 +if UnparseC.term t = "(1 + 9 * a \<up> 2) / (3 * a + 9 * a \<up> 2)"
52.522 then () else error "rational.sml: diff.behav. in norm_Rational_mg 3";
52.523
52.524 (* e192b Stefan K.*)
52.525 -val t = TermC.str2term "(x^^^2 * (7*x + (-1)*y)) / (y^^^2 * (7*x + (-1)*y))";
52.526 +val t = TermC.str2term "(x \<up> 2 * (7*x + (-1)*y)) / (y \<up> 2 * (7*x + (-1)*y))";
52.527 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.528 -if UnparseC.term t = "x ^^^ 2 / y ^^^ 2"
52.529 +if UnparseC.term t = "x \<up> 2 / y \<up> 2"
52.530 then () else error "rational.sml: diff.behav. in norm_Rational_mg 4";
52.531
52.532 (*SRC Schalk I, p.66 Nr. 379c *)
52.533 @@ -1054,28 +1054,28 @@
52.534 then () else error "rational.sml: diff.behav. in norm_Rational_mg 6";
52.535
52.536 (*Schalk I, p.60 Nr. 215c: was not cancelled with Isabelle2002 *)
52.537 -val t = TermC.str2term "(a + b)^^^4 * (x - y) / ((x - y)^^^3 * (a + b)^^^2)";
52.538 +val t = TermC.str2term "(a + b) \<up> 4 * (x - y) / ((x - y) \<up> 3 * (a + b) \<up> 2)";
52.539 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.540 -if UnparseC.term t = "(a ^^^ 2 + 2 * a * b + b ^^^ 2) / (x ^^^ 2 + -2 * x * y + y ^^^ 2)"
52.541 +if UnparseC.term t = "(a \<up> 2 + 2 * a * b + b \<up> 2) / (x \<up> 2 + -2 * x * y + y \<up> 2)"
52.542 then () else error "rational.sml: diff.behav. in norm_Rational_mg 7";
52.543
52.544 (*SRC Schalk I, p.66 Nr. 381b *)
52.545 val t = TermC.str2term
52.546 -"(4*x^^^2 - 20*x + 25)/(2*x - 5)^^^3";
52.547 +"(4*x \<up> 2 - 20*x + 25)/(2*x - 5) \<up> 3";
52.548 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.549 if UnparseC.term t = "1 / (-5 + 2 * x)"
52.550 then () else error "rational.sml: diff.behav. in norm_Rational_mg 9";
52.551
52.552 (* e190c Stefan K.*)
52.553 -val t = TermC.str2term "((1 + 9*a^^^2) * (1 + 3*a)) / ((3*a + 9*a^^^2) * (1 + 3 * a))";
52.554 +val t = TermC.str2term "((1 + 9*a \<up> 2) * (1 + 3*a)) / ((3*a + 9*a \<up> 2) * (1 + 3 * a))";
52.555 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.556 -if UnparseC.term t = "(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)"
52.557 +if UnparseC.term t = "(1 + 9 * a \<up> 2) / (3 * a + 9 * a \<up> 2)"
52.558 then () else error "rational.sml: diff.behav. in norm_Rational_mg 3";
52.559
52.560 (* e192b Stefan K.*)
52.561 -val t = TermC.str2term "(x^^^2 * (7*x + (-1)*y)) / (y^^^2 * (7*x + (-1)*y))";
52.562 +val t = TermC.str2term "(x \<up> 2 * (7*x + (-1)*y)) / (y \<up> 2 * (7*x + (-1)*y))";
52.563 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.564 -if UnparseC.term t = "x ^^^ 2 / y ^^^ 2"
52.565 +if UnparseC.term t = "x \<up> 2 / y \<up> 2"
52.566 then () else error "rational.sml: diff.behav. in norm_Rational_mg 4";
52.567
52.568 (*SRC Schalk I, p.66 Nr. 379c *)
52.569 @@ -1091,53 +1091,53 @@
52.570 then () else error "rational.sml: diff.behav. in norm_Rational_mg 6";
52.571
52.572 (*Schalk I, p.60 Nr. 215c *)
52.573 -val t = TermC.str2term "(a + b)^^^4 * (x - y) / ((x - y)^^^3 * (a + b)^^^2)";
52.574 +val t = TermC.str2term "(a + b) \<up> 4 * (x - y) / ((x - y) \<up> 3 * (a + b) \<up> 2)";
52.575 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.576 -if UnparseC.term t = "(a ^^^ 2 + 2 * a * b + b ^^^ 2) / (x ^^^ 2 + -2 * x * y + y ^^^ 2)"
52.577 +if UnparseC.term t = "(a \<up> 2 + 2 * a * b + b \<up> 2) / (x \<up> 2 + -2 * x * y + y \<up> 2)"
52.578 then () else error "Schalk I, p.60 Nr. 215c: with Isabelle2002 cancellation incomplete, changed";
52.579
52.580 (* extreme example from somewhere *)
52.581 val t = TermC.str2term
52.582 - ("(a^^^4 * x + -1*a^^^4 * y + 4*a^^^3 * b * x + -4*a^^^3 * b * y + " ^
52.583 - "6*a^^^2 * b^^^2 * x + -6*a^^^2 * b^^^2 * y + 4*a * b^^^3 * x + -4*a * b^^^3 * y + " ^
52.584 - "b^^^4 * x + -1*b^^^4 * y) " ^
52.585 - " / (a^^^2 * x^^^3 + -3*a^^^2 * x^^^2 * y + 3*a^^^2 * x * y^^^2 + -1*a^^^2 * y^^^3 + " ^
52.586 - "2*a * b * x^^^3 + -6*a * b * x^^^2 * y + 6*a * b * x * y^^^2 + -2*a * b * y^^^3 + " ^
52.587 - "b^^^2 * x^^^3 + -3*b^^^2 * x^^^2 * y + 3*b^^^2 * x * y^^^2 + -1*b ^^^ 2 * y ^^^ 3)")
52.588 + ("(a \<up> 4 * x + -1*a \<up> 4 * y + 4*a \<up> 3 * b * x + -4*a \<up> 3 * b * y + " ^
52.589 + "6*a \<up> 2 * b \<up> 2 * x + -6*a \<up> 2 * b \<up> 2 * y + 4*a * b \<up> 3 * x + -4*a * b \<up> 3 * y + " ^
52.590 + "b \<up> 4 * x + -1*b \<up> 4 * y) " ^
52.591 + " / (a \<up> 2 * x \<up> 3 + -3*a \<up> 2 * x \<up> 2 * y + 3*a \<up> 2 * x * y \<up> 2 + -1*a \<up> 2 * y \<up> 3 + " ^
52.592 + "2*a * b * x \<up> 3 + -6*a * b * x \<up> 2 * y + 6*a * b * x * y \<up> 2 + -2*a * b * y \<up> 3 + " ^
52.593 + "b \<up> 2 * x \<up> 3 + -3*b \<up> 2 * x \<up> 2 * y + 3*b \<up> 2 * x * y \<up> 2 + -1*b \<up> 2 * y \<up> 3)")
52.594 val SOME (t, _) = rewrite_set_ thy false cancel_p t;
52.595 -if UnparseC.term t = "(a ^^^ 2 + 2 * a * b + b ^^^ 2) / (x ^^^ 2 + -2 * x * y + y ^^^ 2)"
52.596 +if UnparseC.term t = "(a \<up> 2 + 2 * a * b + b \<up> 2) / (x \<up> 2 + -2 * x * y + y \<up> 2)"
52.597 then () else error "with Isabelle2002: NONE -- now SOME changed";
52.598
52.599 (*Schalk I, p.66 Nr. 381a *)
52.600 (* ATTENTION: here the rls is very slow. In Isabelle2002 this required 2 min *)
52.601 -val t = TermC.str2term "18*(a + b)^^^3 * (a - b)^^^2 / (72*(a - b)^^^3 * (a + b)^^^2)";
52.602 +val t = TermC.str2term "18*(a + b) \<up> 3 * (a - b) \<up> 2 / (72*(a - b) \<up> 3 * (a + b) \<up> 2)";
52.603 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.604 if UnparseC.term t = "(a + b) / (4 * a + -4 * b)"
52.605 then () else error "rational.sml: diff.behav. in norm_Rational_mg 8";
52.606
52.607 (*SRC Schalk I, p.66 Nr. 381b *)
52.608 -val t = TermC.str2term "(4*x^^^2 - 20*x + 25) / (2*x - 5)^^^3";
52.609 +val t = TermC.str2term "(4*x \<up> 2 - 20*x + 25) / (2*x - 5) \<up> 3";
52.610 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.611 if UnparseC.term t = "1 / (-5 + 2 * x)"
52.612 then () else error "rational.sml: diff.behav. in norm_Rational_mg 9";
52.613
52.614 (*SRC Schalk I, p.66 Nr. 381c *)
52.615 -val t = TermC.str2term "(27*a^^^3 + 9*a^^^2+3*a+1) / (27*a^^^3 + 18*a^^^2+3*a)";
52.616 +val t = TermC.str2term "(27*a \<up> 3 + 9*a \<up> 2+3*a+1) / (27*a \<up> 3 + 18*a \<up> 2+3*a)";
52.617 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.618 -if UnparseC.term t = "(1 + 9 * a ^^^ 2) / (3 * a + 9 * a ^^^ 2)"
52.619 +if UnparseC.term t = "(1 + 9 * a \<up> 2) / (3 * a + 9 * a \<up> 2)"
52.620 then () else error "rational.sml: diff.behav. in norm_Rational_mg 10";
52.621
52.622 (*SRC Schalk I, p.66 Nr. 383a *)
52.623 -val t = TermC.str2term "(5*a^^^2 - 5*a*b) / (a - b)^^^2";
52.624 +val t = TermC.str2term "(5*a \<up> 2 - 5*a*b) / (a - b) \<up> 2";
52.625 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.626 if UnparseC.term t = "-5 * a / (-1 * a + b)"
52.627 then () else error "rational.sml: diff.behav. in norm_Rational_mg 11";
52.628
52.629 "----- NOT TERMINATING ?: worked before 0707xx";
52.630 -val t = TermC.str2term "(a^^^2 - 1)*(b + 1) / ((b^^^2 - 1)*(a+1))";
52.631 +val t = TermC.str2term "(a \<up> 2 - 1)*(b + 1) / ((b \<up> 2 - 1)*(a+1))";
52.632 (* WN130911 "exception Div raised" by
52.633 - cancel_p_ thy (TermC.str2term ("(-1 + -1 * b + a ^^^ 2 + a ^^^ 2 * b) /" ^
52.634 - "(-1 + -1 * a + b ^^^ 2 + a * b ^^^ 2)"))
52.635 + cancel_p_ thy (TermC.str2term ("(-1 + -1 * b + a \<up> 2 + a \<up> 2 * b) /" ^
52.636 + "(-1 + -1 * a + b \<up> 2 + a * b \<up> 2)"))
52.637
52.638 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.639 if UnparseC.term t = "(1 + -1 * a) / (1 + -1 * b)" then ()
52.640 @@ -1153,7 +1153,7 @@
52.641 if UnparseC.term t = "(-3 * x + 4 * y + -1 * x * y) / (x * y)"
52.642 then () else error "rational.sml: diff.behav. in norm_Rational_mg 12";
52.643
52.644 -val t = TermC.str2term "(2*a+3*b)/(b*c) + (3*c+a)/(a*c) - (2*a^^^2+3*b*c)/(a*b*c)";
52.645 +val t = TermC.str2term "(2*a+3*b)/(b*c) + (3*c+a)/(a*c) - (2*a \<up> 2+3*b*c)/(a*b*c)";
52.646 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.647 if UnparseC.term t = "4 / c"
52.648 then () else error "rational.sml: diff.behav. in norm_Rational_mg 13";
52.649 @@ -1161,50 +1161,50 @@
52.650 (*SRA Schalk I, p.67 Nr. 410b *)
52.651 val t = TermC.str2term "1/(x+1) + 1/(x+2) - 2/(x+3)";
52.652 (* WN130911 non-termination due to non-termination of
52.653 - cancel_p_ thy (TermC.str2term "(5 + 3 * x) / (6 + 11 * x + 6 * x ^^^ 2 + x ^^^ 3)")
52.654 + cancel_p_ thy (TermC.str2term "(5 + 3 * x) / (6 + 11 * x + 6 * x \<up> 2 + x \<up> 3)")
52.655
52.656 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.657 -if UnparseC.term t = "(5 + 3 * x) / (6 + 11 * x + 6 * x ^^^ 2 + x ^^^ 3)"
52.658 +if UnparseC.term t = "(5 + 3 * x) / (6 + 11 * x + 6 * x \<up> 2 + x \<up> 3)"
52.659 then () else error "rational.sml: diff.behav. in norm_Rational_mg 14";
52.660 *)
52.661
52.662 (*SRA Schalk I, p.67 Nr. 413b *)
52.663 -val t = TermC.str2term "(1 + x)/(1 - x) - (1 - x)/(1 + x) + 2*x/(1 - x^^^2)";
52.664 +val t = TermC.str2term "(1 + x)/(1 - x) - (1 - x)/(1 + x) + 2*x/(1 - x \<up> 2)";
52.665 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.666 -if UnparseC.term t = "6 * x / (1 + -1 * x ^^^ 2)"
52.667 +if UnparseC.term t = "6 * x / (1 + -1 * x \<up> 2)"
52.668 then () else error "rational.sml: diff.behav. in norm_Rational_mg 15";
52.669
52.670 (*SRA Schalk I, p.68 Nr. 414a *)
52.671 val t = TermC.str2term "(x + 2)/(x - 1) + (x - 3)/(x - 2) - (x + 1)/((x - 1)*(x - 2))";
52.672 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.673 -if UnparseC.term t ="(-2 + -5 * x + 2 * x ^^^ 2) / (2 + -3 * x + x ^^^ 2)"
52.674 +if UnparseC.term t ="(-2 + -5 * x + 2 * x \<up> 2) / (2 + -3 * x + x \<up> 2)"
52.675 then () else error "rational.sml: diff.behav. in norm_Rational_mg 16";
52.676
52.677 (*SRA Schalk I, p.68 Nr. 428b *)
52.678 val t = TermC.str2term
52.679 - "1/(a - b)^^^2 + 1/(a + b)^^^2 - 2/(a^^^2 - b^^^2) - 4*(b^^^2 - 1)/(a^^^2 - b^^^2)^^^2";
52.680 + "1/(a - b) \<up> 2 + 1/(a + b) \<up> 2 - 2/(a \<up> 2 - b \<up> 2) - 4*(b \<up> 2 - 1)/(a \<up> 2 - b \<up> 2) \<up> 2";
52.681 (* WN130911 non-termination due to non-termination of
52.682 - cancel_p_ thy (TermC.str2term "(4 + -4 * b ^^^ 2) / (a ^^^ 4 + -2 * (a ^^^ 2 * b ^^^ 2) + b ^^^ 4)")
52.683 + cancel_p_ thy (TermC.str2term "(4 + -4 * b \<up> 2) / (a \<up> 4 + -2 * (a \<up> 2 * b \<up> 2) + b \<up> 4)")
52.684
52.685 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.686 -if UnparseC.term t = "4 / (a ^^^ 4 + -2 * a ^^^ 2 * b ^^^ 2 + b ^^^ 4)"
52.687 +if UnparseC.term t = "4 / (a \<up> 4 + -2 * a \<up> 2 * b \<up> 2 + b \<up> 4)"
52.688 then () else error "rational.sml: diff.behav. in norm_Rational_mg 18";
52.689 *)
52.690
52.691 (*SRA Schalk I, p.68 Nr. 430b *)
52.692 val t = TermC.str2term
52.693 - "a^^^2/(a - 3*b) - 108*a*b^^^3/((a+3*b)*(a^^^2 - 9*b^^^2)) - 9*b^^^2*(a - 3*b)/(a+3*b)^^^2";
52.694 + "a \<up> 2/(a - 3*b) - 108*a*b \<up> 3/((a+3*b)*(a \<up> 2 - 9*b \<up> 2)) - 9*b \<up> 2*(a - 3*b)/(a+3*b) \<up> 2";
52.695 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.696 if UnparseC.term t = "a + 3 * b"
52.697 then () else error "rational.sml: diff.behav. in norm_Rational_mg 19";
52.698
52.699 (*SRA Schalk I, p.68 Nr. 432 *)
52.700 val t = TermC.str2term
52.701 - ("(a^^^2 + a*b) / (a^^^2 - b^^^2) - (b^^^2 - a*b) / (b^^^2 - a^^^2) + " ^
52.702 - "a^^^2*(a - b) / (a^^^3 - a^^^2*b) - 2*a*(a^^^2 - b^^^2) / (a^^^3 - a*b^^^2) - " ^
52.703 - "2*b^^^2 / (a^^^2 - b^^^2)");
52.704 + ("(a \<up> 2 + a*b) / (a \<up> 2 - b \<up> 2) - (b \<up> 2 - a*b) / (b \<up> 2 - a \<up> 2) + " ^
52.705 + "a \<up> 2*(a - b) / (a \<up> 3 - a \<up> 2*b) - 2*a*(a \<up> 2 - b \<up> 2) / (a \<up> 3 - a*b \<up> 2) - " ^
52.706 + "2*b \<up> 2 / (a \<up> 2 - b \<up> 2)");
52.707 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.708 -if UnparseC.term t = (*"0" ..isabisac15 | Isabelle2017..*) "0 / (a ^^^ 2 + -1 * b ^^^ 2)"
52.709 +if UnparseC.term t = (*"0" ..isabisac15 | Isabelle2017..*) "0 / (a \<up> 2 + -1 * b \<up> 2)"
52.710 then () else error "rational.sml: diff.behav. in norm_Rational_mg 20";
52.711
52.712 (* some example *)
52.713 @@ -1217,30 +1217,30 @@
52.714 "-------- examples multiply and cancel from: Mathematik 1 Schalk -------------";
52.715 "-------- examples multiply and cancel from: Mathematik 1 Schalk -------------";
52.716 (*------- SRM Schalk I, p.68 Nr. 436a *)
52.717 -val t = TermC.str2term "3*(x+y) / (15*(x - y)) * 25*(x - y)^^^2 / (18*(x + y)^^^2)";
52.718 +val t = TermC.str2term "3*(x+y) / (15*(x - y)) * 25*(x - y) \<up> 2 / (18*(x + y) \<up> 2)";
52.719 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.720 if UnparseC.term t = "(-5 * x + 5 * y) / (-18 * x + -18 * y)"
52.721 then () else error "rational.sml: diff.behav. in norm_Rational_mg 22";
52.722
52.723 (*------- SRM.test Schalk I, p.68 Nr. 436b *)
52.724 -val t = TermC.str2term "5*a*(a - b)^^^2*(a + b)^^^3/(7*b*(a - b)^^^3) * 7*b/(a + b)^^^3";
52.725 +val t = TermC.str2term "5*a*(a - b) \<up> 2*(a + b) \<up> 3/(7*b*(a - b) \<up> 3) * 7*b/(a + b) \<up> 3";
52.726 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.727 if UnparseC.term t = "5 * a / (a + -1 * b)"
52.728 then () else error "rational.sml: diff.behav. in norm_Rational_mg 23";
52.729
52.730 (*------- Schalk I, p.68 Nr. 437a *)
52.731 -val t = TermC.str2term "(3*a - 4*b) / (4*c+3*e) * (3*a+4*b)/(9*a^^^2 - 16*b^^^2)";
52.732 +val t = TermC.str2term "(3*a - 4*b) / (4*c+3*e) * (3*a+4*b)/(9*a \<up> 2 - 16*b \<up> 2)";
52.733 (* raises an exception for unclear reasons:
52.734 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.735 :
52.736 -### rls: cancel_p on: (9 * a ^^^ 2 + -16 * b ^^^ 2) / (4 * c + 3 * e) /
52.737 -(9 * a ^^^ 2 + -16 * b ^^^ 2)
52.738 +### rls: cancel_p on: (9 * a \<up> 2 + -16 * b \<up> 2) / (4 * c + 3 * e) /
52.739 +(9 * a \<up> 2 + -16 * b \<up> 2)
52.740 exception Div raised
52.741
52.742 BUT
52.743 val t = TermC.str2term
52.744 - ("(9 * a ^^^ 2 + -16 * b ^^^ 2) / (4 * c + 3 * e) /" ^
52.745 - "(9 * a ^^^ 2 + -16 * b ^^^ 2)");
52.746 + ("(9 * a \<up> 2 + -16 * b \<up> 2) / (4 * c + 3 * e) /" ^
52.747 + "(9 * a \<up> 2 + -16 * b \<up> 2)");
52.748 NONE = cancel_p_ thy t;
52.749
52.750 if UnparseC.term t = "1 / (4 * c + 3 * e)" then ()
52.751 @@ -1248,16 +1248,16 @@
52.752 *)
52.753
52.754 "----- S.K. corrected non-termination 060904";
52.755 -val t = TermC.str2term "(3*a - 4*b) * (3*a+4*b)/((4*c+3*e)*(9*a^^^2 - 16*b^^^2))";
52.756 +val t = TermC.str2term "(3*a - 4*b) * (3*a+4*b)/((4*c+3*e)*(9*a \<up> 2 - 16*b \<up> 2))";
52.757 val SOME (t, _) = rewrite_set_ thy false make_polynomial t;
52.758 if UnparseC.term t =
52.759 - "(9 * a ^^^ 2 + -16 * b ^^^ 2) /\n(36 * a ^^^ 2 * c + 27 * a ^^^ 2 * e + -64 * b ^^^ 2 * c +\n -48 * b ^^^ 2 * e)"
52.760 -(*"(9 * a ^^^ 2 + -16 * b ^^^ 2) / (36 * a ^^^ 2 * c + 27 * a ^^^ 2 * e + -64 * b ^^^ 2 * c + -48 * b ^^^ 2 * e)"*)
52.761 + "(9 * a \<up> 2 + -16 * b \<up> 2) /\n(36 * a \<up> 2 * c + 27 * a \<up> 2 * e + -64 * b \<up> 2 * c +\n -48 * b \<up> 2 * e)"
52.762 +(*"(9 * a \<up> 2 + -16 * b \<up> 2) / (36 * a \<up> 2 * c + 27 * a \<up> 2 * e + -64 * b \<up> 2 * c + -48 * b \<up> 2 * e)"*)
52.763 then () else error "rational.sml: S.K.8..corrected 060904-6";
52.764
52.765 "----- S.K. corrected non-termination of cancel_p_";
52.766 -val t'' = TermC.str2term ("(9 * a ^^^ 2 + -16 * b ^^^ 2) /" ^
52.767 - "(36 * a^^^2 * c + (27 * a^^^2 * e + (-64 * b^^^2 * c + -48 * b^^^2 * e)))");
52.768 +val t'' = TermC.str2term ("(9 * a \<up> 2 + -16 * b \<up> 2) /" ^
52.769 + "(36 * a \<up> 2 * c + (27 * a \<up> 2 * e + (-64 * b \<up> 2 * c + -48 * b \<up> 2 * e)))");
52.770 (* /--- DOES NOT TERMINATE AT TRANSITION isabisac15 --> Isabelle2017 --------------------------\
52.771 val SOME (t',_) = rewrite_set_ thy false cancel_p t'';
52.772 if UnparseC.term t' = "1 / (4 * c + 3 * e)"
52.773 @@ -1265,64 +1265,64 @@
52.774 \--- DOES NOT TERMINATE AT TRANSITION isabisac15 --> Isabelle2017 --------------------------/*)
52.775
52.776 (*------- Schalk I, p.68 Nr. 437b*)
52.777 -val t = TermC.str2term "(a + b)/(x^^^2 - y^^^2) * ((x - y)^^^2/(a^^^2 - b^^^2))";
52.778 +val t = TermC.str2term "(a + b)/(x \<up> 2 - y \<up> 2) * ((x - y) \<up> 2/(a \<up> 2 - b \<up> 2))";
52.779 (*val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.780 :
52.781 -#### rls: cancel_p on: (a * x ^^^ 2 + -2 * (a * (x * y)) + a * y ^^^ 2 + b * x ^^^ 2 +
52.782 +#### rls: cancel_p on: (a * x \<up> 2 + -2 * (a * (x * y)) + a * y \<up> 2 + b * x \<up> 2 +
52.783 -2 * (b * (x * y)) +
52.784 - b * y ^^^ 2) /
52.785 -(a ^^^ 2 * x ^^^ 2 + -1 * (a ^^^ 2 * y ^^^ 2) + -1 * (b ^^^ 2 * x ^^^ 2) +
52.786 - b ^^^ 2 * y ^^^ 2)
52.787 + b * y \<up> 2) /
52.788 +(a \<up> 2 * x \<up> 2 + -1 * (a \<up> 2 * y \<up> 2) + -1 * (b \<up> 2 * x \<up> 2) +
52.789 + b \<up> 2 * y \<up> 2)
52.790 exception Div raised
52.791 *)
52.792
52.793 (*------- SRM Schalk I, p.68 Nr. 438a *)
52.794 -val t = TermC.str2term "x*y / (x*y - y^^^2) * (x^^^2 - x*y)";
52.795 +val t = TermC.str2term "x*y / (x*y - y \<up> 2) * (x \<up> 2 - x*y)";
52.796 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.797 -if UnparseC.term t = "x ^^^ 2"
52.798 +if UnparseC.term t = "x \<up> 2"
52.799 then () else error "rational.sml: diff.behav. in norm_Rational_mg 24";
52.800
52.801 (*------- SRM Schalk I, p.68 Nr. 439b *)
52.802 -val t = TermC.str2term "(4*x^^^2 + 4*x + 1) * ((x^^^2 - 2*x^^^3) / (4*x^^^2 + 2*x))";
52.803 +val t = TermC.str2term "(4*x \<up> 2 + 4*x + 1) * ((x \<up> 2 - 2*x \<up> 3) / (4*x \<up> 2 + 2*x))";
52.804 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.805 -if UnparseC.term t = "(x + -4 * x ^^^ 3) / 2"
52.806 +if UnparseC.term t = "(x + -4 * x \<up> 3) / 2"
52.807 then () else error "rational.sml: diff.behav. in norm_Rational_mg 25";
52.808
52.809 (*------- SRM Schalk I, p.68 Nr. 440a *)
52.810 -val t = TermC.str2term "(x^^^2 - 2*x) / (x^^^2 - 3*x) * (x - 3)^^^2 / (x^^^2 - 4)";
52.811 +val t = TermC.str2term "(x \<up> 2 - 2*x) / (x \<up> 2 - 3*x) * (x - 3) \<up> 2 / (x \<up> 2 - 4)";
52.812 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.813 if UnparseC.term t = "(-3 + x) / (2 + x)"
52.814 then () else error "rational.sml: diff.behav. in norm_Rational_mg 26";
52.815
52.816 "----- Schalk I, p.68 Nr. 440b SK11 works since 0707xx";
52.817 -val t = TermC.str2term "(a^^^3 - 9*a) / (a^^^3*b - a*b^^^3) * (a^^^2*b + a*b^^^2) / (a+3)";
52.818 +val t = TermC.str2term "(a \<up> 3 - 9*a) / (a \<up> 3*b - a*b \<up> 3) * (a \<up> 2*b + a*b \<up> 2) / (a+3)";
52.819 (* WN130911 non-termination for unclear reasons:
52.820 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.821
52.822 ... ENDS WITH THIS TRACE:
52.823 :
52.824 -### rls: cancel_p on: (-9 * (a ^^^ 3 * b) + -9 * (a ^^^ 2 * b ^^^ 2) + a ^^^ 5 * b +
52.825 - a ^^^ 4 * b ^^^ 2) /
52.826 -(a ^^^ 3 * b + -1 * (a * b ^^^ 3)) /
52.827 +### rls: cancel_p on: (-9 * (a \<up> 3 * b) + -9 * (a \<up> 2 * b \<up> 2) + a \<up> 5 * b +
52.828 + a \<up> 4 * b \<up> 2) /
52.829 +(a \<up> 3 * b + -1 * (a * b \<up> 3)) /
52.830 (3 + a)
52.831 BUT THIS IS CORRECTLY RECOGNISED
52.832 val t = TermC.str2term
52.833 - ("(-9 * (a^^^3 * b) + -9 * (a^^^2 * b^^^2) + a^^^5 * b + a^^^4 * b^^^2) /" ^
52.834 - "(a^^^3 * b + -1 * (a * b^^^3)) / (3 + (a::real))");
52.835 + ("(-9 * (a \<up> 3 * b) + -9 * (a \<up> 2 * b \<up> 2) + a \<up> 5 * b + a \<up> 4 * b \<up> 2) /" ^
52.836 + "(a \<up> 3 * b + -1 * (a * b \<up> 3)) / (3 + (a::real))");
52.837 AS
52.838 NONE = cancel_p_ thy t;
52.839
52.840 -if UnparseC.term t = "(-3 * a + a ^^^ 2) / (a + -1 * b)" then ()
52.841 +if UnparseC.term t = "(-3 * a + a \<up> 2) / (a + -1 * b)" then ()
52.842 else error "rational.sml: diff.behav. in norm_Rational 27";
52.843 *)
52.844
52.845 "----- SK12 works since 0707xx";
52.846 -val t = TermC.str2term "(a^^^3 - 9*a) * (a^^^2*b+a*b^^^2) / ((a^^^3*b - a*b^^^3) * (a+3))";
52.847 +val t = TermC.str2term "(a \<up> 3 - 9*a) * (a \<up> 2*b+a*b \<up> 2) / ((a \<up> 3*b - a*b \<up> 3) * (a+3))";
52.848 (* WN130911 non-termination due to non-termination of
52.849 - cancel_p_ thy (TermC.str2term "(4 + -4 * b ^^^ 2) / (a ^^^ 4 + -2 * (a ^^^ 2 * b ^^^ 2) + b ^^^ 4)")
52.850 + cancel_p_ thy (TermC.str2term "(4 + -4 * b \<up> 2) / (a \<up> 4 + -2 * (a \<up> 2 * b \<up> 2) + b \<up> 4)")
52.851
52.852 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.853 -if UnparseC.term t' = "(-3 * a + a ^^^ 2) / (a + -1 * b)" then ()
52.854 +if UnparseC.term t' = "(-3 * a + a \<up> 2) / (a + -1 * b)" then ()
52.855 else error "rational.sml: diff.behav. in norm_Rational 28";
52.856 *)
52.857
52.858 @@ -1330,57 +1330,57 @@
52.859 "-------- examples common denominator and multiplication from: Schalk --------";
52.860 "-------- examples common denominator and multiplication from: Schalk --------";
52.861 (*------- SRAM Schalk I, p.69 Nr. 441b *)
52.862 -val t = TermC.str2term "(4*a/3 + 3*b^^^2/a^^^3 + b/(4*a))*(4*b/(3*a))";
52.863 +val t = TermC.str2term "(4*a/3 + 3*b \<up> 2/a \<up> 3 + b/(4*a))*(4*b/(3*a))";
52.864 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.865 -if UnparseC.term t = "(36 * b ^^^ 3 + 3 * a ^^^ 2 * b ^^^ 2 + 16 * a ^^^ 4 * b) / (9 * a ^^^ 4)"
52.866 +if UnparseC.term t = "(36 * b \<up> 3 + 3 * a \<up> 2 * b \<up> 2 + 16 * a \<up> 4 * b) / (9 * a \<up> 4)"
52.867 then () else error "rational.sml: diff.behav. in norm_Rational_mg 28";
52.868
52.869 (*------- SRAM Schalk I, p.69 Nr. 442b *)
52.870 -val t = TermC.str2term ("(15*a^^^2/x^^^3 - 5*b^^^4/x^^^2 + 25*c^^^2/x) * " ^
52.871 - "(x^^^3/(5*a*b^^^3*c^^^3)) + 1/c^^^3 * (b*x/a - 3*a/b^^^3)");
52.872 +val t = TermC.str2term ("(15*a \<up> 2/x \<up> 3 - 5*b \<up> 4/x \<up> 2 + 25*c \<up> 2/x) * " ^
52.873 + "(x \<up> 3/(5*a*b \<up> 3*c \<up> 3)) + 1/c \<up> 3 * (b*x/a - 3*a/b \<up> 3)");
52.874 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.875 -if UnparseC.term t = "5 * x ^^^ 2 / (a * b ^^^ 3 * c)"
52.876 +if UnparseC.term t = "5 * x \<up> 2 / (a * b \<up> 3 * c)"
52.877 then () else error "rational.sml: diff.behav. in norm_Rational_mg 29";
52.878
52.879 (*------- SRAM Schalk I, p.69 Nr. 443b *)
52.880 val t = TermC.str2term "(a/2 + b/3) * (b/3 - a/2)";
52.881 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.882 -if UnparseC.term t = "(-9 * a ^^^ 2 + 4 * b ^^^ 2) / 36"
52.883 +if UnparseC.term t = "(-9 * a \<up> 2 + 4 * b \<up> 2) / 36"
52.884 then () else error "rational.sml: diff.behav. in norm_Rational_mg 30";
52.885
52.886 (*------- SRAM Schalk I, p.69 Nr. 445b *)
52.887 -val t = TermC.str2term "(a^^^2/9 + 2*a/(3*b) + 4/b^^^2)*(a/3 - 2/b) + 8/b^^^3";
52.888 +val t = TermC.str2term "(a \<up> 2/9 + 2*a/(3*b) + 4/b \<up> 2)*(a/3 - 2/b) + 8/b \<up> 3";
52.889 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.890 -if UnparseC.term t = "a ^^^ 3 / 27"
52.891 +if UnparseC.term t = "a \<up> 3 / 27"
52.892 then () else error "rational.sml: diff.behav. in norm_Rational_mg 31";
52.893
52.894 (*------- SRAM Schalk I, p.69 Nr. 446b *)
52.895 -val t = TermC.str2term "(x/(5*x + 4*y) - y/(5*x - 4*y) + 1)*(25*x^^^2 - 16*y^^^2)";
52.896 +val t = TermC.str2term "(x/(5*x + 4*y) - y/(5*x - 4*y) + 1)*(25*x \<up> 2 - 16*y \<up> 2)";
52.897 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.898 -if UnparseC.term t = (*"30 * x ^^^ 2 + -9 * x * y + -20 * y ^^^ 2" ..isabisac15 | Isabelle2017..*)
52.899 - "(-30 * x ^^^ 2 + 9 * x * y + 20 * y ^^^ 2) / -1"
52.900 +if UnparseC.term t = (*"30 * x \<up> 2 + -9 * x * y + -20 * y \<up> 2" ..isabisac15 | Isabelle2017..*)
52.901 + "(-30 * x \<up> 2 + 9 * x * y + 20 * y \<up> 2) / -1"
52.902 then () else error "rational.sml: diff.behav. in norm_Rational_mg 32";
52.903
52.904 (*------- SRAM Schalk I, p.69 Nr. 449a *)(*Achtung: rechnet ca 8 Sekunden*)
52.905 val t = TermC.str2term
52.906 -"(2*x^^^2/(3*y)+x/y^^^2)*(4*x^^^4/(9*y^^^2)+x^^^2/y^^^4)*(2*x^^^2/(3*y) - x/y^^^2)";
52.907 +"(2*x \<up> 2/(3*y)+x/y \<up> 2)*(4*x \<up> 4/(9*y \<up> 2)+x \<up> 2/y \<up> 4)*(2*x \<up> 2/(3*y) - x/y \<up> 2)";
52.908 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.909 -if UnparseC.term t = "(-81 * x ^^^ 4 + 16 * x ^^^ 8 * y ^^^ 4) / (81 * y ^^^ 8)"
52.910 +if UnparseC.term t = "(-81 * x \<up> 4 + 16 * x \<up> 8 * y \<up> 4) / (81 * y \<up> 8)"
52.911 then () else error "rational.sml: diff.behav. in norm_Rational_mg 33";
52.912
52.913 (*------- SRAM Schalk I, p.69 Nr. 450a *)
52.914 val t = TermC.str2term
52.915 -"(4*x/(3*y)+2*y/(3*x))^^^2 - (2*y/(3*x) - 2*x/y)*(2*y/(3*x)+2*x/y)";
52.916 +"(4*x/(3*y)+2*y/(3*x)) \<up> 2 - (2*y/(3*x) - 2*x/y)*(2*y/(3*x)+2*x/y)";
52.917 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.918 -if UnparseC.term t = "(52 * x ^^^ 2 + 16 * y ^^^ 2) / (9 * y ^^^ 2)"
52.919 +if UnparseC.term t = "(52 * x \<up> 2 + 16 * y \<up> 2) / (9 * y \<up> 2)"
52.920 then () else error "rational.sml: diff.behav. in norm_Rational_mg 34";
52.921
52.922 (*------- SRAM Schalk I, p.69 Nr. 442b --- abgewandelt*)
52.923 val t = TermC.str2term
52.924 - ("(15*a^^^4/(a*x^^^3) - 5*a*((b^^^4 - 5*c^^^2*x) / x^^^2)) * " ^
52.925 - "(x^^^3/(5*a*b^^^3*c^^^3)) + a/c^^^3 * (x*(b/a) - 3*b*(a/b^^^4))");
52.926 + ("(15*a \<up> 4/(a*x \<up> 3) - 5*a*((b \<up> 4 - 5*c \<up> 2*x) / x \<up> 2)) * " ^
52.927 + "(x \<up> 3/(5*a*b \<up> 3*c \<up> 3)) + a/c \<up> 3 * (x*(b/a) - 3*b*(a/b \<up> 4))");
52.928 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.929 -if UnparseC.term t = "5 * x ^^^ 2 / (b ^^^ 3 * c)"
52.930 +if UnparseC.term t = "5 * x \<up> 2 / (b \<up> 3 * c)"
52.931 then () else error "rational.sml: diff.behav. in norm_Rational_mg 53";
52.932
52.933
52.934 @@ -1390,20 +1390,20 @@
52.935 "----- SRD Schalk I, p.69 Nr. 454b";
52.936 val t = TermC.str2term "((2 - x)/(2*a)) / (2*a/(x - 2))";
52.937 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.938 -if UnparseC.term t = "(-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2)"
52.939 +if UnparseC.term t = "(-4 + 4 * x + -1 * x \<up> 2) / (4 * a \<up> 2)"
52.940 then () else error "rational.sml: diff.behav. in norm_Rational_mg 35";
52.941
52.942 "----- SRD Schalk I, p.69 Nr. 455a";
52.943 -val t = TermC.str2term "(a^^^2 + 1)/(a^^^2 - 1) / ((a+1)/(a - 1))";
52.944 +val t = TermC.str2term "(a \<up> 2 + 1)/(a \<up> 2 - 1) / ((a+1)/(a - 1))";
52.945 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.946 -if UnparseC.term t = "(1 + a ^^^ 2) / (1 + 2 * a + a ^^^ 2)" then ()
52.947 +if UnparseC.term t = "(1 + a \<up> 2) / (1 + 2 * a + a \<up> 2)" then ()
52.948 else error "rational.sml: diff.behav. in norm_Rational_mg 36";
52.949
52.950 "----- Schalk I, p.69 Nr. 455b";
52.951 -val t = TermC.str2term "(x^^^2 - 4)/(y^^^2 - 9)/((2+x)/(3 - y))";
52.952 +val t = TermC.str2term "(x \<up> 2 - 4)/(y \<up> 2 - 9)/((2+x)/(3 - y))";
52.953 (* WN130911 non-termination due to non-termination of
52.954 - cancel_p_ thy (TermC.str2term ("(-12 + 4 * y + 3 * x ^^^ 2 + -1 * (x ^^^ 2 * y)) /" ^
52.955 - "(-18 + -9 * x + 2 * y ^^^ 2 + x * y ^^^ 2)"))
52.956 + cancel_p_ thy (TermC.str2term ("(-12 + 4 * y + 3 * x \<up> 2 + -1 * (x \<up> 2 * y)) /" ^
52.957 + "(-18 + -9 * x + 2 * y \<up> 2 + x * y \<up> 2)"))
52.958
52.959 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.960 if UnparseC.term t = "(2 + -1 * x) / (3 + y)" then ()
52.961 @@ -1411,10 +1411,10 @@
52.962 *)
52.963
52.964 "----- SK060904-1a non-termination of cancel_p_ ?: worked before 0707xx";
52.965 -val t = TermC.str2term "(x^^^2 - 4)*(3 - y) / ((y^^^2 - 9)*(2+x))";
52.966 +val t = TermC.str2term "(x \<up> 2 - 4)*(3 - y) / ((y \<up> 2 - 9)*(2+x))";
52.967 (* WN130911 non-termination due to non-termination of
52.968 - cancel_p_ thy (TermC.str2term ("(-12 + 4 * y + 3 * x ^^^ 2 + -1 * (x ^^^ 2 * y)) /" ^
52.969 - "(-18 + -9 * x + 2 * y ^^^ 2 + x * y ^^^ 2)"))
52.970 + cancel_p_ thy (TermC.str2term ("(-12 + 4 * y + 3 * x \<up> 2 + -1 * (x \<up> 2 * y)) /" ^
52.971 + "(-18 + -9 * x + 2 * y \<up> 2 + x * y \<up> 2)"))
52.972
52.973 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.974 if UnparseC.term t = "(2 + -1 * x) / (3 + y)" then ()
52.975 @@ -1422,55 +1422,55 @@
52.976 *)
52.977
52.978 "----- ?: worked before 0707xx";
52.979 -val t = TermC.str2term "(3 + -1 * y) / (-9 + y ^^^ 2)";
52.980 +val t = TermC.str2term "(3 + -1 * y) / (-9 + y \<up> 2)";
52.981 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.982 if UnparseC.term t = "-1 / (3 + y)"
52.983 then () else error "rational.sml: -1 / (3 + y) norm_Rational";
52.984
52.985 "----- SRD Schalk I, p.69 Nr. 456b";
52.986 -val t = TermC.str2term "(b^^^3 - b^^^2) / (b^^^2+b) / (b^^^2 - 1)";
52.987 +val t = TermC.str2term "(b \<up> 3 - b \<up> 2) / (b \<up> 2+b) / (b \<up> 2 - 1)";
52.988 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.989 -if UnparseC.term t = "b / (1 + 2 * b + b ^^^ 2)"
52.990 +if UnparseC.term t = "b / (1 + 2 * b + b \<up> 2)"
52.991 then () else error "rational.sml: diff.behav. in norm_Rational_mg 38";
52.992
52.993 "----- SRD Schalk I, p.69 Nr. 457b";
52.994 -val t = TermC.str2term "(16*a^^^2 - 9*b^^^2)/(2*a+3*a*b) / ((4*a+3*b)/(4*a^^^2 - 9*a^^^2*b^^^2))";
52.995 +val t = TermC.str2term "(16*a \<up> 2 - 9*b \<up> 2)/(2*a+3*a*b) / ((4*a+3*b)/(4*a \<up> 2 - 9*a \<up> 2*b \<up> 2))";
52.996 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.997 -if UnparseC.term t = "8 * a ^^^ 2 + -6 * a * b + -12 * a ^^^ 2 * b + 9 * a * b ^^^ 2"
52.998 +if UnparseC.term t = "8 * a \<up> 2 + -6 * a * b + -12 * a \<up> 2 * b + 9 * a * b \<up> 2"
52.999 then () else error "rational.sml: diff.behav. in norm_Rational_mg 39";
52.1000
52.1001 "----- Schalk I, p.69 Nr. 458b works since 0707";
52.1002 -val t = TermC.str2term "(2*a^^^2*x - a^^^2) / (a*x - b*x) / (b^^^2*(2*x - 1) / (x*(a - b)))";
52.1003 +val t = TermC.str2term "(2*a \<up> 2*x - a \<up> 2) / (a*x - b*x) / (b \<up> 2*(2*x - 1) / (x*(a - b)))";
52.1004 (*val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1005 :
52.1006 -### rls: cancel_p on: (-1 * a ^^^ 2 + 2 * (a ^^^ 2 * x)) / (a * x + -1 * (b * x)) /
52.1007 -((-1 * b ^^^ 2 + 2 * (b ^^^ 2 * x)) / (a * x + -1 * (b * x)))
52.1008 +### rls: cancel_p on: (-1 * a \<up> 2 + 2 * (a \<up> 2 * x)) / (a * x + -1 * (b * x)) /
52.1009 +((-1 * b \<up> 2 + 2 * (b \<up> 2 * x)) / (a * x + -1 * (b * x)))
52.1010 exception Div raised
52.1011
52.1012 BUT
52.1013 val t = TermC.str2term
52.1014 - ("(-1 * a ^^^ 2 + 2 * (a ^^^ 2 * x)) / (a * x + -1 * (b * x)) /" ^
52.1015 - "((-1 * b ^^^ 2 + 2 * (b ^^^ 2 * x)) / (a * x + -1 * (b * x)))");
52.1016 + ("(-1 * a \<up> 2 + 2 * (a \<up> 2 * x)) / (a * x + -1 * (b * x)) /" ^
52.1017 + "((-1 * b \<up> 2 + 2 * (b \<up> 2 * x)) / (a * x + -1 * (b * x)))");
52.1018 NONE = cancel_p_ thy t;
52.1019
52.1020 -if UnparseC.term t = "a ^^^ 2 / b ^^^ 2" then ()
52.1021 +if UnparseC.term t = "a \<up> 2 / b \<up> 2" then ()
52.1022 else error "rational.sml: diff.behav. in norm_Rational_mg 39b";
52.1023 *)
52.1024
52.1025 "----- SRD Schalk I, p.69 Nr. 459b";
52.1026 -val t = TermC.str2term "(a^^^2 - b^^^2)/(a*b) / (4*(a+b)^^^2/a)";
52.1027 +val t = TermC.str2term "(a \<up> 2 - b \<up> 2)/(a*b) / (4*(a+b) \<up> 2/a)";
52.1028 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1029 -if UnparseC.term t = "(a + -1 * b) / (4 * a * b + 4 * b ^^^ 2)" then ()
52.1030 +if UnparseC.term t = "(a + -1 * b) / (4 * a * b + 4 * b \<up> 2)" then ()
52.1031 else error "rational.sml: diff.behav. in norm_Rational_mg 41";
52.1032
52.1033 "----- Schalk I, p.69 Nr. 460b nonterm.SK";
52.1034 -val t = TermC.str2term "(9*(x^^^2 - 8*x + 16) / (4*(y^^^2 - 2*y + 1))) / ((3*x - 12) / (16*y - 16))";
52.1035 +val t = TermC.str2term "(9*(x \<up> 2 - 8*x + 16) / (4*(y \<up> 2 - 2*y + 1))) / ((3*x - 12) / (16*y - 16))";
52.1036 (*val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1037 exception Div raised
52.1038
52.1039 BUT
52.1040 val t = TermC.str2term
52.1041 - ("(144 + -72 * x + 9 * x ^^^ 2) / (4 + -8 * y + 4 * y ^^^ 2) /" ^
52.1042 + ("(144 + -72 * x + 9 * x \<up> 2) / (4 + -8 * y + 4 * y \<up> 2) /" ^
52.1043 "((-12 + 3 * x) / (-16 + 16 * y))");
52.1044 NONE = cancel_p_ thy t;
52.1045
52.1046 @@ -1479,26 +1479,26 @@
52.1047 *)
52.1048
52.1049 "----- some variant of the above; was non-terminating before";
52.1050 -val t = TermC.str2term "9*(x^^^2 - 8*x+16)*(16*y - 16)/(4*(y^^^2 - 2*y+1)*(3*x - 12))";
52.1051 +val t = TermC.str2term "9*(x \<up> 2 - 8*x+16)*(16*y - 16)/(4*(y \<up> 2 - 2*y+1)*(3*x - 12))";
52.1052 val SOME (t , _) = rewrite_set_ thy false norm_Rational t;
52.1053 if UnparseC.term t = "(48 + -12 * x) / (1 + -1 * y)"
52.1054 then () else error "some variant of the above; was non-terminating before";
52.1055
52.1056 "----- SRD Schalk I, p.70 Nr. 472a";
52.1057 -val t = TermC.str2term ("((8*x^^^2 - 32*y^^^2) / (2*x + 4*y)) / ((4*x - 8*y) / (x + y))");
52.1058 +val t = TermC.str2term ("((8*x \<up> 2 - 32*y \<up> 2) / (2*x + 4*y)) / ((4*x - 8*y) / (x + y))");
52.1059 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1060 if UnparseC.term t = "x + y"
52.1061 then () else error "rational.sml: diff.behav. in norm_Rational_mg 43";
52.1062
52.1063 "----- Schalk I, p.70 Nr. 478b ----- Rechenzeit: 5 sec";
52.1064 -val t = TermC.str2term ("(a - (a*b + b^^^2)/(a+b))/(b+(a - b)/(1+(a+b)/(a - b))) / " ^
52.1065 - "((a - a^^^2/(a+b))/(a+(a*b)/(a - b)))");
52.1066 +val t = TermC.str2term ("(a - (a*b + b \<up> 2)/(a+b))/(b+(a - b)/(1+(a+b)/(a - b))) / " ^
52.1067 + "((a - a \<up> 2/(a+b))/(a+(a*b)/(a - b)))");
52.1068 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1069 -if UnparseC.term t = "(2 * a ^^^ 3 + 2 * a ^^^ 2 * b) / (a ^^^ 2 * b + b ^^^ 3)"
52.1070 +if UnparseC.term t = "(2 * a \<up> 3 + 2 * a \<up> 2 * b) / (a \<up> 2 * b + b \<up> 3)"
52.1071 then () else error "rational.sml: diff.behav. in norm_Rational_mg 51";
52.1072
52.1073 (*SRD Schalk I, p.69 Nr. 461a *)
52.1074 -val t = TermC.str2term "(2/(x+3) + 2/(x - 3)) / (8*x/(x^^^2 - 9))";
52.1075 +val t = TermC.str2term "(2/(x+3) + 2/(x - 3)) / (8*x/(x \<up> 2 - 9))";
52.1076 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1077 if UnparseC.term t = "1 / 2"
52.1078 then () else error "rational.sml: diff.behav. in norm_Rational_mg 44";
52.1079 @@ -1510,11 +1510,11 @@
52.1080 then () else error "rational.sml: diff.behav. in norm_Rational_mg 45";
52.1081
52.1082 (*SRD Schalk I, p.69 Nr. 465b *)
52.1083 -val t = TermC.str2term "((x+3*y)/9 + (4*y^^^2 - 9*z^^^2)/(16*x)) / (x/9 + y/6 + z/4)";
52.1084 +val t = TermC.str2term "((x+3*y)/9 + (4*y \<up> 2 - 9*z \<up> 2)/(16*x)) / (x/9 + y/6 + z/4)";
52.1085 (* WN130911 non-termination due to non-termination of
52.1086 cancel_p_ thy (TermC.str2term
52.1087 - ("("(576 * x ^^^ 2 + 1728 * (x * y) + 1296 * y ^^^ 2 + -2916 * z ^^^ 2) /" ^
52.1088 - "(576 * x ^^^ 2 + 864 * (x * y) + 1296 * (x * z))"))
52.1089 + ("("(576 * x \<up> 2 + 1728 * (x * y) + 1296 * y \<up> 2 + -2916 * z \<up> 2) /" ^
52.1090 + "(576 * x \<up> 2 + 864 * (x * y) + 1296 * (x * z))"))
52.1091
52.1092 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1093 if UnparseC.term t = "(4 * x + 6 * y + -9 * z) / (4 * x)"
52.1094 @@ -1522,16 +1522,16 @@
52.1095 *)
52.1096
52.1097 (*SRD Schalk I, p.69 Nr. 466b *)
52.1098 -val t = TermC.str2term "((1 - 7*(x - 2)/(x^^^2 - 4)) / (6/(x+2))) / (3/(x+5)+30/(x^^^2 - 25))";
52.1099 +val t = TermC.str2term "((1 - 7*(x - 2)/(x \<up> 2 - 4)) / (6/(x+2))) / (3/(x+5)+30/(x \<up> 2 - 25))";
52.1100 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1101 -if UnparseC.term t = "(25 + -10 * x + x ^^^ 2) / 18"
52.1102 +if UnparseC.term t = "(25 + -10 * x + x \<up> 2) / 18"
52.1103 then () else error "rational.sml: diff.behav. in norm_Rational_mg 47";
52.1104
52.1105 (*SRD Schalk I, p.70 Nr. 469 *)
52.1106 -val t = TermC.str2term ("3*b^^^2 / (4*a^^^2 - 8*a*b + 4*b^^^2) / " ^
52.1107 - "(a / (a^^^2*b - b^^^3) + (a - b) / (4*a*b^^^2 + 4*b^^^3) - 1 / (4*b^^^2))");
52.1108 +val t = TermC.str2term ("3*b \<up> 2 / (4*a \<up> 2 - 8*a*b + 4*b \<up> 2) / " ^
52.1109 + "(a / (a \<up> 2*b - b \<up> 3) + (a - b) / (4*a*b \<up> 2 + 4*b \<up> 3) - 1 / (4*b \<up> 2))");
52.1110 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1111 -if UnparseC.term t = "-3 * b ^^^ 3 / (-2 * a + 2 * b)"
52.1112 +if UnparseC.term t = "-3 * b \<up> 3 / (-2 * a + 2 * b)"
52.1113 then () else error "rational.sml: diff.behav. in norm_Rational_mg 48";
52.1114
52.1115 "-------- me Schalk I No.186 -------------------------------------------------";
52.1116 @@ -1576,8 +1576,8 @@
52.1117 (([1], Res), (2 + -1 * x) / (2 * a) / (2 * a / (x + -1 * 2))),
52.1118 (([2], Res), (2 + -1 * x) / (2 * a) / (2 * a / (-2 + x))),
52.1119 (([3], Res), (2 + -1 * x) * (-2 + x) / (2 * a * (2 * a))),
52.1120 -(([4], Res), (-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2)),
52.1121 -(([], Res), (-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2))]
52.1122 +(([4], Res), (-4 + 4 * x + -1 * x \<up> 2) / (4 * a \<up> 2)),
52.1123 +(([], Res), (-4 + 4 * x + -1 * x \<up> 2) / (4 * a \<up> 2))]
52.1124 *)
52.1125 interSteps 1 ([1], Res);
52.1126 val ((pt, p), _) = get_calc 1;
52.1127 @@ -1591,8 +1591,8 @@
52.1128 (([1], Res), (2 + -1 * x) / (2 * a) / (2 * a / (x + -1 * 2))),
52.1129 (([2], Res), (2 + -1 * x) / (2 * a) / (2 * a / (-2 + x))),
52.1130 (([3], Res), (2 + -1 * x) * (-2 + x) / (2 * a * (2 * a))),
52.1131 -(([4], Res), (-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2)),
52.1132 -(([], Res), (-4 + 4 * x + -1 * x ^^^ 2) / (4 * a ^^^ 2))]
52.1133 +(([4], Res), (-4 + 4 * x + -1 * x \<up> 2) / (4 * a \<up> 2)),
52.1134 +(([], Res), (-4 + 4 * x + -1 * x \<up> 2) / (4 * a \<up> 2))]
52.1135 *)
52.1136 val (t, asm) = get_obj g_result pt [1, 1];
52.1137 if UnparseC.term t = "(2 - x) / (2 * a) / (2 * a / (x + -1 * 2))" andalso UnparseC.terms asm = "[]"
52.1138 @@ -1614,9 +1614,9 @@
52.1139 val ((pt, p), _) = get_calc 1;
52.1140 (*Test_Tool.show_pt pt;
52.1141 [
52.1142 -(([], Frm), Simplify ((a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2))),
52.1143 -(([1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2)),
52.1144 -(([1], Res), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1145 +(([], Frm), Simplify ((a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2))),
52.1146 +(([1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2)),
52.1147 +(([1], Res), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1148 (([2], Res), (a + b) / (a + -1 * b)),
52.1149 (([], Res), (a + b) / (a + -1 * b))]
52.1150 *)
52.1151 @@ -1624,10 +1624,10 @@
52.1152 val ((pt, p), _) = get_calc 1;
52.1153 (*Test_Tool.show_pt pt;
52.1154 [
52.1155 -(([], Frm), Simplify ((a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2))),
52.1156 -(([1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2)),
52.1157 -(([1], Res), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1158 -(([2,1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1159 +(([], Frm), Simplify ((a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2))),
52.1160 +(([1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2)),
52.1161 +(([1], Res), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1162 +(([2,1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1163 (([2,1], Res), (a + b) / (a + -1 * b)),
52.1164 (([2], Res), (a + b) / (a + -1 * b)),
52.1165 (([], Res), (a + b) / (a + -1 * b))]
52.1166 @@ -1636,32 +1636,32 @@
52.1167 val ((pt, p), _) = get_calc 1;
52.1168 (*Test_Tool.show_pt pt;
52.1169 [
52.1170 -(([], Frm), Simplify ((a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2))),
52.1171 -(([1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * a * b + b ^^^ 2)),
52.1172 -(([1], Res), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1173 -(([2,1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1174 -(([2,1,1], Frm), (a ^^^ 2 + -1 * b ^^^ 2) / (a ^^^ 2 + -2 * (a * b) + b ^^^ 2)),
52.1175 -(([2,1,1], Res), (a ^^^ 2 + -1 * (a * b) + a * b + -1 * b ^^^ 2) /
52.1176 -(a ^^^ 2 + -2 * (a * b) + 1 * b ^^^ 2)),
52.1177 -(([2,1,2], Res), (a ^^^ 2 + -1 * (a * b) + a * b + -1 * b ^^^ 2) /
52.1178 -(a ^^^ 2 + -2 * (a * b) + -1 ^^^ 2 * b ^^^ 2)),
52.1179 -(([2,1,3], Res), (a ^^^ 2 + -1 * (a * b) + a * b + -1 * b ^^^ 2) /
52.1180 -(a ^^^ 2 + -2 * (a * b) + (-1 * b) ^^^ 2)),
52.1181 -(([2,1,4], Res), (a * a + -1 * (a * b) + a * b + -1 * b ^^^ 2) /
52.1182 -(a ^^^ 2 + -2 * (a * b) + (-1 * b) ^^^ 2)),
52.1183 +(([], Frm), Simplify ((a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2))),
52.1184 +(([1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * a * b + b \<up> 2)),
52.1185 +(([1], Res), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1186 +(([2,1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1187 +(([2,1,1], Frm), (a \<up> 2 + -1 * b \<up> 2) / (a \<up> 2 + -2 * (a * b) + b \<up> 2)),
52.1188 +(([2,1,1], Res), (a \<up> 2 + -1 * (a * b) + a * b + -1 * b \<up> 2) /
52.1189 +(a \<up> 2 + -2 * (a * b) + 1 * b \<up> 2)),
52.1190 +(([2,1,2], Res), (a \<up> 2 + -1 * (a * b) + a * b + -1 * b \<up> 2) /
52.1191 +(a \<up> 2 + -2 * (a * b) + -1 \<up> 2 * b \<up> 2)),
52.1192 +(([2,1,3], Res), (a \<up> 2 + -1 * (a * b) + a * b + -1 * b \<up> 2) /
52.1193 +(a \<up> 2 + -2 * (a * b) + (-1 * b) \<up> 2)),
52.1194 +(([2,1,4], Res), (a * a + -1 * (a * b) + a * b + -1 * b \<up> 2) /
52.1195 +(a \<up> 2 + -2 * (a * b) + (-1 * b) \<up> 2)),
52.1196 (([2,1,5], Res), (a * a + -1 * (a * b) + a * b + -1 * (b * b)) /
52.1197 -(a ^^^ 2 + -2 * (a * b) + (-1 * b) ^^^ 2)),
52.1198 +(a \<up> 2 + -2 * (a * b) + (-1 * b) \<up> 2)),
52.1199 (([2,1,6], Res), (a * a + -1 * (a * b) + a * b + -1 * (b * b)) /
52.1200 -(a ^^^ 2 + -1 * (2 * (a * b)) + (-1 * b) ^^^ 2)),
52.1201 +(a \<up> 2 + -1 * (2 * (a * b)) + (-1 * b) \<up> 2)),
52.1202 (([2,1,7], Res), (a * a + a * (-1 * b) + (b * a + b * (-1 * b))) /
52.1203 -(a ^^^ 2 + 2 * (a * (-1 * b)) + (-1 * b) ^^^ 2)),
52.1204 +(a \<up> 2 + 2 * (a * (-1 * b)) + (-1 * b) \<up> 2)),
52.1205 (([2,1,8], Res), (a * a + a * (-1 * b) + (b * a + b * (-1 * b))) /
52.1206 -(a ^^^ 2 + 2 * a * (-1 * b) + (-1 * b) ^^^ 2)),
52.1207 +(a \<up> 2 + 2 * a * (-1 * b) + (-1 * b) \<up> 2)),
52.1208 (([2,1,9], Res), (a * (a + -1 * b) + (b * a + b * (-1 * b))) /
52.1209 -(a ^^^ 2 + 2 * a * (-1 * b) + (-1 * b) ^^^ 2)),
52.1210 +(a \<up> 2 + 2 * a * (-1 * b) + (-1 * b) \<up> 2)),
52.1211 (([2,1,10], Res), (a * (a + -1 * b) + b * (a + -1 * b)) /
52.1212 -(a ^^^ 2 + 2 * a * (-1 * b) + (-1 * b) ^^^ 2)),
52.1213 -(([2,1,11], Res), (a + b) * (a + -1 * b) / (a ^^^ 2 + 2 * a * (-1 * b) + (-1 * b) ^^^ 2)),
52.1214 +(a \<up> 2 + 2 * a * (-1 * b) + (-1 * b) \<up> 2)),
52.1215 +(([2,1,11], Res), (a + b) * (a + -1 * b) / (a \<up> 2 + 2 * a * (-1 * b) + (-1 * b) \<up> 2)),
52.1216 (([2,1,12], Res), (a + b) * (a + -1 * b) / ((a + -1 * b) * (a + -1 * b))),
52.1217 (([2,1,13], Res), (a + b) / (a + -1 * b)),
52.1218 (([2,1], Res), (a + b) / (a + -1 * b)),
52.1219 @@ -1682,15 +1682,15 @@
52.1220 "-------- investigate rulesets for cancel_p ----------------------------------";
52.1221 "-------- investigate rulesets for cancel_p ----------------------------------";
52.1222 val thy = @{theory "Rational"};
52.1223 -val t = TermC.str2term "(a^^^2 + -1*b^^^2) / (a^^^2 + -2*a*b + b^^^2)";
52.1224 +val t = TermC.str2term "(a \<up> 2 + -1*b \<up> 2) / (a \<up> 2 + -2*a*b + b \<up> 2)";
52.1225 val tt = TermC.str2term "(1 * a + 1 * b) * (1 * a + -1 * b)"(*numerator only*);
52.1226
52.1227 "----- with rewrite_set_";
52.1228 val SOME (tt',asm) = rewrite_set_ thy false make_polynomial tt;
52.1229 -if UnparseC.term tt'= "a ^^^ 2 + -1 * b ^^^ 2" then () else error "rls chancel_p 1";
52.1230 +if UnparseC.term tt'= "a \<up> 2 + -1 * b \<up> 2" then () else error "rls chancel_p 1";
52.1231 val tt = TermC.str2term "((1 * a + -1 * b) * (1 * a + -1 * b))"(*denominator only*);
52.1232 val SOME (tt',asm) = rewrite_set_ thy false make_polynomial tt;
52.1233 -if UnparseC.term tt' = "a ^^^ 2 + -2 * a * b + b ^^^ 2" then () else error "rls chancel_p 2";
52.1234 +if UnparseC.term tt' = "a \<up> 2 + -2 * a * b + b \<up> 2" then () else error "rls chancel_p 2";
52.1235
52.1236 "----- with .make_deriv; WN1130912 not investigated further, will be discontinued";
52.1237 val SOME (tt, _) = factout_p_ thy t;
52.1238 @@ -1705,7 +1705,7 @@
52.1239 (*default_print_depth 99;*) writeln (deriv2str der); (*default_print_depth 3;*)
52.1240
52.1241 (*default_print_depth 99;*) map (UnparseC.term o #1) der; (*default_print_depth 3;*)
52.1242 -"...,(-1 * b ^^^ 2 + a ^^^ 2) / (-2 * (a * b) + a ^^^ 2 + (-1 * b) ^^^ 2) ]";
52.1243 +"...,(-1 * b \<up> 2 + a \<up> 2) / (-2 * (a * b) + a \<up> 2 + (-1 * b) \<up> 2) ]";
52.1244 (*default_print_depth 99;*) map (Rule.to_string o #2) der; (*default_print_depth 3;*)
52.1245 (*default_print_depth 99;*) map (UnparseC.term o #1 o #3) der; (*default_print_depth 3;*)
52.1246
52.1247 @@ -1745,17 +1745,17 @@
52.1248 val ((pt, p), _) = get_calc 1;
52.1249 (*Test_Tool.show_pt pt;
52.1250 [
52.1251 -(([], Frm), Simplify ((5 * b + 25) / (a ^^^ 2 - b ^^^ 2) * (a - b) / (5 * b))),
52.1252 -(([1], Frm), (5 * b + 25) / (a ^^^ 2 - b ^^^ 2) * (a - b) / (5 * b)),
52.1253 -(([1], Res), (5 * b + 25) / (a ^^^ 2 + -1 * b ^^^ 2) * (a + -1 * b) / (5 * b)),
52.1254 -(([2], Res), (5 * b + 25) * (a + -1 * b) / (a ^^^ 2 + -1 * b ^^^ 2) / (5 * b)),
52.1255 -(([3], Res), (25 * a + -25 * b + 5 * (a * b) + -5 * b ^^^ 2) / (a ^^^ 2 + -1 * b ^^^ 2) /
52.1256 +(([], Frm), Simplify ((5 * b + 25) / (a \<up> 2 - b \<up> 2) * (a - b) / (5 * b))),
52.1257 +(([1], Frm), (5 * b + 25) / (a \<up> 2 - b \<up> 2) * (a - b) / (5 * b)),
52.1258 +(([1], Res), (5 * b + 25) / (a \<up> 2 + -1 * b \<up> 2) * (a + -1 * b) / (5 * b)),
52.1259 +(([2], Res), (5 * b + 25) * (a + -1 * b) / (a \<up> 2 + -1 * b \<up> 2) / (5 * b)),
52.1260 +(([3], Res), (25 * a + -25 * b + 5 * (a * b) + -5 * b \<up> 2) / (a \<up> 2 + -1 * b \<up> 2) /
52.1261 (5 * b)),
52.1262 (([4], Res), (25 + 5 * b) / (a + b) / (5 * b)),
52.1263 (([5], Res), (25 + 5 * b) / ((a + b) * (5 * b))),
52.1264 -(([6], Res), (25 + 5 * b) / (5 * (a * b) + 5 * b ^^^ 2)),
52.1265 -(([7], Res), (5 + b) / (a * b + b ^^^ 2)),
52.1266 -(([], Res), (5 + b) / (a * b + b ^^^ 2))] *)
52.1267 +(([6], Res), (25 + 5 * b) / (5 * (a * b) + 5 * b \<up> 2)),
52.1268 +(([7], Res), (5 + b) / (a * b + b \<up> 2)),
52.1269 +(([], Res), (5 + b) / (a * b + b \<up> 2))] *)
52.1270
52.1271
52.1272 "-------- WN1309xx non-terminating rls norm_Rational -------------------------";
52.1273 @@ -1763,115 +1763,115 @@
52.1274 "-------- WN1309xx non-terminating rls norm_Rational -------------------------";
52.1275 (*------- Schalk I, p.70 Nr. 480b; a/b : c/d translated to a/b * d/c*)
52.1276 val t = TermC.str2term
52.1277 - ("((12*x*y / (9*x^^^2 - y^^^2)) / (1 / (3*x - y)^^^2 - 1 / (3*x + y)^^^2)) * " ^
52.1278 - "((1/(x - 5*y)^^^2 - 1/(x + 5*y)^^^2) / (20*x*y / (x^^^2 - 25*y^^^2)))");
52.1279 + ("((12*x*y / (9*x \<up> 2 - y \<up> 2)) / (1 / (3*x - y) \<up> 2 - 1 / (3*x + y) \<up> 2)) * " ^
52.1280 + "((1/(x - 5*y) \<up> 2 - 1/(x + 5*y) \<up> 2) / (20*x*y / (x \<up> 2 - 25*y \<up> 2)))");
52.1281
52.1282 (*1st factor separately simplified *)
52.1283 -val t = TermC.str2term "((12*x*y / (9*x^^^2 - y^^^2)) / (1 / (3*x - y)^^^2 - 1 / (3*x + y)^^^2))";
52.1284 +val t = TermC.str2term "((12*x*y / (9*x \<up> 2 - y \<up> 2)) / (1 / (3*x - y) \<up> 2 - 1 / (3*x + y) \<up> 2))";
52.1285 val SOME (t', _) = rewrite_set_ thy false norm_Rational t;
52.1286 -if UnparseC.term t' = "(-9 * x ^^^ 2 + y ^^^ 2) / -1" then () else error "Nr. 480b lhs changed";
52.1287 +if UnparseC.term t' = "(-9 * x \<up> 2 + y \<up> 2) / -1" then () else error "Nr. 480b lhs changed";
52.1288 (*2nd factor separately simplified *)
52.1289 -val t = TermC.str2term "((1/(x - 5*y)^^^2 - 1/(x + 5*y)^^^2) / (20*x*y / (x^^^2 - 25*y^^^2)))";
52.1290 +val t = TermC.str2term "((1/(x - 5*y) \<up> 2 - 1/(x + 5*y) \<up> 2) / (20*x*y / (x \<up> 2 - 25*y \<up> 2)))";
52.1291 val SOME (t',_) = rewrite_set_ thy false norm_Rational t; UnparseC.term t';
52.1292 -if UnparseC.term t' = "-1 / (-1 * x ^^^ 2 + 25 * y ^^^ 2)" then () else error "Nr. 480b rhs changed";
52.1293 +if UnparseC.term t' = "-1 / (-1 * x \<up> 2 + 25 * y \<up> 2)" then () else error "Nr. 480b rhs changed";
52.1294
52.1295 "-------- Schalk I, p.70 Nr. 477a: terms are exploding ?!?";
52.1296 -val t = TermC.str2term ("b*y/(b - 2*y)/((b^^^2 - y^^^2)/(b+2*y)) /" ^
52.1297 - "(b^^^2*y + b*y^^^2) * (a+x)^^^2 / ((b^^^2 - 4*y^^^2) * (a+2*x)^^^2)");
52.1298 +val t = TermC.str2term ("b*y/(b - 2*y)/((b \<up> 2 - y \<up> 2)/(b+2*y)) /" ^
52.1299 + "(b \<up> 2*y + b*y \<up> 2) * (a+x) \<up> 2 / ((b \<up> 2 - 4*y \<up> 2) * (a+2*x) \<up> 2)");
52.1300 (*val SOME (t',_) = rewrite_set_ thy false norm_Rational t;
52.1301 :
52.1302 -### rls: cancel_p on: (a ^^^ 2 * (b * y) + 2 * (a * (b * (x * y))) + b * (x ^^^ 2 * y)) /
52.1303 +### rls: cancel_p on: (a \<up> 2 * (b * y) + 2 * (a * (b * (x * y))) + b * (x \<up> 2 * y)) /
52.1304 (b + -2 * y) /
52.1305 -((b ^^^ 2 + -1 * y ^^^ 2) / (b + 2 * y)) /
52.1306 -(b ^^^ 2 * y + b * y ^^^ 2) /
52.1307 -(a ^^^ 2 * b ^^^ 2 + -4 * (a ^^^ 2 * y ^^^ 2) + 4 * (a * (b ^^^ 2 * x)) +
52.1308 - -16 * (a * (x * y ^^^ 2)) +
52.1309 - 4 * (b ^^^ 2 * x ^^^ 2) +
52.1310 - -16 * (x ^^^ 2 * y ^^^ 2))
52.1311 +((b \<up> 2 + -1 * y \<up> 2) / (b + 2 * y)) /
52.1312 +(b \<up> 2 * y + b * y \<up> 2) /
52.1313 +(a \<up> 2 * b \<up> 2 + -4 * (a \<up> 2 * y \<up> 2) + 4 * (a * (b \<up> 2 * x)) +
52.1314 + -16 * (a * (x * y \<up> 2)) +
52.1315 + 4 * (b \<up> 2 * x \<up> 2) +
52.1316 + -16 * (x \<up> 2 * y \<up> 2))
52.1317 exception Div raised
52.1318
52.1319 BUT
52.1320 val t = TermC.str2term
52.1321 - ("(a ^^^ 2 * (b * y) + 2 * (a * (b * (x * y))) + b * (x ^^^ 2 * y)) /" ^
52.1322 + ("(a \<up> 2 * (b * y) + 2 * (a * (b * (x * y))) + b * (x \<up> 2 * y)) /" ^
52.1323 "(b + -2 * y) /" ^
52.1324 - "((b ^^^ 2 + -1 * y ^^^ 2) / (b + 2 * y)) /" ^
52.1325 - "(b ^^^ 2 * y + b * y ^^^ 2) /" ^
52.1326 - "(a ^^^ 2 * b ^^^ 2 + -4 * (a ^^^ 2 * y ^^^ 2) + 4 * (a * (b ^^^ 2 * x)) +" ^
52.1327 - "-16 * (a * (x * y ^^^ 2)) +" ^
52.1328 - "4 * (b ^^^ 2 * x ^^^ 2) +" ^
52.1329 - "-16 * (x ^^^ 2 * y ^^^ 2))");
52.1330 + "((b \<up> 2 + -1 * y \<up> 2) / (b + 2 * y)) /" ^
52.1331 + "(b \<up> 2 * y + b * y \<up> 2) /" ^
52.1332 + "(a \<up> 2 * b \<up> 2 + -4 * (a \<up> 2 * y \<up> 2) + 4 * (a * (b \<up> 2 * x)) +" ^
52.1333 + "-16 * (a * (x * y \<up> 2)) +" ^
52.1334 + "4 * (b \<up> 2 * x \<up> 2) +" ^
52.1335 + "-16 * (x \<up> 2 * y \<up> 2))");
52.1336 NONE = cancel_p_ thy t;
52.1337 *)
52.1338
52.1339 (*------- Schalk I, p.70 Nr. 476b in 2003 this worked using 10 sec. *)
52.1340 val t = TermC.str2term
52.1341 - ("((a^^^2 - b^^^2)/(2*a*b) + 2*a*b/(a^^^2 - b^^^2)) / ((a^^^2 + b^^^2)/(2*a*b) + 1) / " ^
52.1342 - "((a^^^2 + b^^^2)^^^2 / (a + b)^^^2)");
52.1343 + ("((a \<up> 2 - b \<up> 2)/(2*a*b) + 2*a*b/(a \<up> 2 - b \<up> 2)) / ((a \<up> 2 + b \<up> 2)/(2*a*b) + 1) / " ^
52.1344 + "((a \<up> 2 + b \<up> 2) \<up> 2 / (a + b) \<up> 2)");
52.1345 (* Rewrite.trace_on := true;
52.1346 rewrite_set_ thy false norm_Rational t;
52.1347 :
52.1348 -#### rls: cancel_p on: (2 * (a ^^^ 7 * b) + 4 * (a ^^^ 6 * b ^^^ 2) + 6 * (a ^^^ 5 * b ^^^ 3) +
52.1349 - 8 * (a ^^^ 4 * b ^^^ 4) +
52.1350 - 6 * (a ^^^ 3 * b ^^^ 5) +
52.1351 - 4 * (a ^^^ 2 * b ^^^ 6) +
52.1352 - 2 * (a * b ^^^ 7)) /
52.1353 -(2 * (a ^^^ 9 * b) + 4 * (a ^^^ 8 * b ^^^ 2) +
52.1354 - 2 * (2 * (a ^^^ 7 * b ^^^ 3)) +
52.1355 - 4 * (a ^^^ 6 * b ^^^ 4) +
52.1356 - -4 * (a ^^^ 4 * b ^^^ 6) +
52.1357 - -4 * (a ^^^ 3 * b ^^^ 7) +
52.1358 - -4 * (a ^^^ 2 * b ^^^ 8) +
52.1359 - -2 * (a * b ^^^ 9))
52.1360 +#### rls: cancel_p on: (2 * (a \<up> 7 * b) + 4 * (a \<up> 6 * b \<up> 2) + 6 * (a \<up> 5 * b \<up> 3) +
52.1361 + 8 * (a \<up> 4 * b \<up> 4) +
52.1362 + 6 * (a \<up> 3 * b \<up> 5) +
52.1363 + 4 * (a \<up> 2 * b \<up> 6) +
52.1364 + 2 * (a * b \<up> 7)) /
52.1365 +(2 * (a \<up> 9 * b) + 4 * (a \<up> 8 * b \<up> 2) +
52.1366 + 2 * (2 * (a \<up> 7 * b \<up> 3)) +
52.1367 + 4 * (a \<up> 6 * b \<up> 4) +
52.1368 + -4 * (a \<up> 4 * b \<up> 6) +
52.1369 + -4 * (a \<up> 3 * b \<up> 7) +
52.1370 + -4 * (a \<up> 2 * b \<up> 8) +
52.1371 + -2 * (a * b \<up> 9))
52.1372
52.1373 -if UnparseC.term t = "1 / (a ^^^ 2 + -1 * b ^^^ 2)" then ()
52.1374 +if UnparseC.term t = "1 / (a \<up> 2 + -1 * b \<up> 2)" then ()
52.1375 else error "rational.sml: diff.behav. in norm_Rational_mg 49";
52.1376 *)
52.1377
52.1378 "-------- Schalk I, p.70 Nr. 480a: terms are exploding ?!?";
52.1379 val t = TermC.str2term ("(1/x + 1/y + 1/z) / (1/x - 1/y - 1/z) / " ^
52.1380 - "(2*x^^^2 / (x^^^2 - z^^^2) / (x / (x + z) + x / (x - z)))");
52.1381 + "(2*x \<up> 2 / (x \<up> 2 - z \<up> 2) / (x / (x + z) + x / (x - z)))");
52.1382 (* Rewrite.trace_on := true;
52.1383 rewrite_set_ thy false norm_Rational t;
52.1384 :
52.1385 -#### rls: cancel_p on: (2 * (x ^^^ 6 * (y ^^^ 2 * z)) + 2 * (x ^^^ 6 * (y * z ^^^ 2)) +
52.1386 - 2 * (x ^^^ 5 * (y ^^^ 2 * z ^^^ 2)) +
52.1387 - -2 * (x ^^^ 4 * (y ^^^ 2 * z ^^^ 3)) +
52.1388 - -2 * (x ^^^ 4 * (y * z ^^^ 4)) +
52.1389 - -2 * (x ^^^ 3 * (y ^^^ 2 * z ^^^ 4))) /
52.1390 -(-2 * (x ^^^ 6 * (y ^^^ 2 * z)) + -2 * (x ^^^ 6 * (y * z ^^^ 2)) +
52.1391 - 2 * (x ^^^ 5 * (y ^^^ 2 * z ^^^ 2)) +
52.1392 - 2 * (x ^^^ 4 * (y ^^^ 2 * z ^^^ 3)) +
52.1393 - 2 * (x ^^^ 4 * (y * z ^^^ 4)) +
52.1394 - -2 * (x ^^^ 3 * (y ^^^ 2 * z ^^^ 4)))
52.1395 +#### rls: cancel_p on: (2 * (x \<up> 6 * (y \<up> 2 * z)) + 2 * (x \<up> 6 * (y * z \<up> 2)) +
52.1396 + 2 * (x \<up> 5 * (y \<up> 2 * z \<up> 2)) +
52.1397 + -2 * (x \<up> 4 * (y \<up> 2 * z \<up> 3)) +
52.1398 + -2 * (x \<up> 4 * (y * z \<up> 4)) +
52.1399 + -2 * (x \<up> 3 * (y \<up> 2 * z \<up> 4))) /
52.1400 +(-2 * (x \<up> 6 * (y \<up> 2 * z)) + -2 * (x \<up> 6 * (y * z \<up> 2)) +
52.1401 + 2 * (x \<up> 5 * (y \<up> 2 * z \<up> 2)) +
52.1402 + 2 * (x \<up> 4 * (y \<up> 2 * z \<up> 3)) +
52.1403 + 2 * (x \<up> 4 * (y * z \<up> 4)) +
52.1404 + -2 * (x \<up> 3 * (y \<up> 2 * z \<up> 4)))
52.1405 *)
52.1406
52.1407 "-------- Schalk I, p.60 Nr. 215d: terms are exploding, internal loop does not terminate";
52.1408 -val t = TermC.str2term "(a-b)^^^3 * (x+y)^^^4 / ((x+y)^^^2 * (a-b)^^^5)";
52.1409 +val t = TermC.str2term "(a-b) \<up> 3 * (x+y) \<up> 4 / ((x+y) \<up> 2 * (a-b) \<up> 5)";
52.1410 (* Kein Wunder, denn Z???ler und Nenner extra als Polynom dargestellt ergibt:
52.1411
52.1412 -val t = TermC.str2term "(a-b)^^^3 * (x+y)^^^4";
52.1413 +val t = TermC.str2term "(a-b) \<up> 3 * (x+y) \<up> 4";
52.1414 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1415 UnparseC.term t;
52.1416 -"a^^^3 * x^^^4 + 4 * a^^^3 * x^^^3 * y +6 * a^^^3 * x^^^2 * y^^^2 +4 * a^^^3 * x * y^^^3 +a^^^3 * y^^^4 +-3 * a^^^2 * b * x^^^4 +-12 * a^^^2 * b * x^^^3 * y +-18 * a^^^2 * b * x^^^2 * y^^^2 +-12 * a^^^2 * b * x * y^^^3 +-3 * a^^^2 * b * y^^^4 +3 * a * b^^^2 * x^^^4 +12 * a * b^^^2 * x^^^3 * y +18 * a * b^^^2 * x^^^2 * y^^^2 +12 * a * b^^^2 * x * y^^^3 +3 * a * b^^^2 * y^^^4 +-1 * b^^^3 * x^^^4 +-4 * b^^^3 * x^^^3 * y +-6 * b^^^3 * x^^^2 * y^^^2 +-4 * b^^^3 * x * y^^^3 +-1 * b^^^3 * y^^^4";
52.1417 -val t = TermC.str2term "((x+y)^^^2 * (a-b)^^^5)";
52.1418 +"a \<up> 3 * x \<up> 4 + 4 * a \<up> 3 * x \<up> 3 * y +6 * a \<up> 3 * x \<up> 2 * y \<up> 2 +4 * a \<up> 3 * x * y \<up> 3 +a \<up> 3 * y \<up> 4 +-3 * a \<up> 2 * b * x \<up> 4 +-12 * a \<up> 2 * b * x \<up> 3 * y +-18 * a \<up> 2 * b * x \<up> 2 * y \<up> 2 +-12 * a \<up> 2 * b * x * y \<up> 3 +-3 * a \<up> 2 * b * y \<up> 4 +3 * a * b \<up> 2 * x \<up> 4 +12 * a * b \<up> 2 * x \<up> 3 * y +18 * a * b \<up> 2 * x \<up> 2 * y \<up> 2 +12 * a * b \<up> 2 * x * y \<up> 3 +3 * a * b \<up> 2 * y \<up> 4 +-1 * b \<up> 3 * x \<up> 4 +-4 * b \<up> 3 * x \<up> 3 * y +-6 * b \<up> 3 * x \<up> 2 * y \<up> 2 +-4 * b \<up> 3 * x * y \<up> 3 +-1 * b \<up> 3 * y \<up> 4";
52.1419 +val t = TermC.str2term "((x+y) \<up> 2 * (a-b) \<up> 5)";
52.1420 val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1421 UnparseC.term t;
52.1422 -"a^^^5 * x^^^2 + 2 * a^^^5 * x * y + a^^^5 * y^^^2 +-5 * a^^^4 * b * x^^^2 +-10 * a^^^4 * b * x * y +-5 * a^^^4 * b * y^^^2 +10 * a^^^3 * b^^^2 * x^^^2 +20 * a^^^3 * b^^^2 * x * y +10 * a^^^3 * b^^^2 * y^^^2 +-10 * a^^^2 * b^^^3 * x^^^2 +-20 * a^^^2 * b^^^3 * x * y +-10 * a^^^2 * b^^^3 * y^^^2 +5 * a * b^^^4 * x^^^2 +10 * a * b^^^4 * x * y +5 * a * b^^^4 * y^^^2 +-1 * b^^^5 * x^^^2 +-2 * b^^^5 * x * y +-1 * b^^^5 * y^^^2";
52.1423 +"a \<up> 5 * x \<up> 2 + 2 * a \<up> 5 * x * y + a \<up> 5 * y \<up> 2 +-5 * a \<up> 4 * b * x \<up> 2 +-10 * a \<up> 4 * b * x * y +-5 * a \<up> 4 * b * y \<up> 2 +10 * a \<up> 3 * b \<up> 2 * x \<up> 2 +20 * a \<up> 3 * b \<up> 2 * x * y +10 * a \<up> 3 * b \<up> 2 * y \<up> 2 +-10 * a \<up> 2 * b \<up> 3 * x \<up> 2 +-20 * a \<up> 2 * b \<up> 3 * x * y +-10 * a \<up> 2 * b \<up> 3 * y \<up> 2 +5 * a * b \<up> 4 * x \<up> 2 +10 * a * b \<up> 4 * x * y +5 * a * b \<up> 4 * y \<up> 2 +-1 * b \<up> 5 * x \<up> 2 +-2 * b \<up> 5 * x * y +-1 * b \<up> 5 * y \<up> 2";
52.1424
52.1425 anscheinend macht dem Rechner das Krzen diese Bruches keinen Spass mehr ...*)
52.1426
52.1427 "-------- Schalk I, p.70 Nr. 480b: terms are exploding, Rewrite.trace_on stops at";
52.1428 -val t = TermC.str2term ("((12*x*y/(9*x^^^2 - y^^^2))/" ^
52.1429 - "(1/(3*x - y)^^^2 - 1/(3*x + y)^^^2)) *" ^
52.1430 - "(1/(x - 5*y)^^^2 - 1/(x + 5*y)^^^2)/" ^
52.1431 - "(20*x*y/(x^^^2 - 25*y^^^2))");
52.1432 +val t = TermC.str2term ("((12*x*y/(9*x \<up> 2 - y \<up> 2))/" ^
52.1433 + "(1/(3*x - y) \<up> 2 - 1/(3*x + y) \<up> 2)) *" ^
52.1434 + "(1/(x - 5*y) \<up> 2 - 1/(x + 5*y) \<up> 2)/" ^
52.1435 + "(20*x*y/(x \<up> 2 - 25*y \<up> 2))");
52.1436 (*val SOME (t, _) = rewrite_set_ thy false norm_Rational t;
52.1437 :
52.1438 -#### rls: cancel_p on: (19440 * (x ^^^ 8 * y ^^^ 2) + -490320 * (x ^^^ 6 * y ^^^ 4) +
52.1439 - 108240 * (x ^^^ 4 * y ^^^ 6) +
52.1440 - -6000 * (x ^^^ 2 * y ^^^ 8)) /
52.1441 -(2160 * (x ^^^ 8 * y ^^^ 2) + -108240 * (x ^^^ 6 * y ^^^ 4) +
52.1442 - 1362000 * (x ^^^ 4 * y ^^^ 6) +
52.1443 - -150000 * (x ^^^ 2 * y ^^^ 8))
52.1444 +#### rls: cancel_p on: (19440 * (x \<up> 8 * y \<up> 2) + -490320 * (x \<up> 6 * y \<up> 4) +
52.1445 + 108240 * (x \<up> 4 * y \<up> 6) +
52.1446 + -6000 * (x \<up> 2 * y \<up> 8)) /
52.1447 +(2160 * (x \<up> 8 * y \<up> 2) + -108240 * (x \<up> 6 * y \<up> 4) +
52.1448 + 1362000 * (x \<up> 4 * y \<up> 6) +
52.1449 + -150000 * (x \<up> 2 * y \<up> 8))
52.1450 *)
52.1451
53.1 --- a/test/Tools/isac/Knowledge/rlang.sml Mon Apr 19 20:44:18 2021 +0200
53.2 +++ b/test/Tools/isac/Knowledge/rlang.sml Tue Apr 20 16:58:44 2021 +0200
53.3 @@ -109,11 +109,11 @@
53.4 | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 19 [x = 8]";
53.5
53.6 (*----------------- Schalk I s.86 Bsp 23 ------------------------*)
53.7 -"Schalk I s.86 Bsp 19 ((2*x+5)^^^2+(3*x+4)^^^2=(13*x+2)*(x+1)+2*(15+14*x))";
53.8 -"Schalk I s.86 Bsp 19 ((2*x+5)^^^2+(3*x+4)^^^2=(13*x+2)*(x+1)+2*(15+14*x))";
53.9 -"Schalk I s.86 Bsp 19 ((2*x+5)^^^2+(3*x+4)^^^2=(13*x+2)*(x+1)+2*(15+14*x))";
53.10 +"Schalk I s.86 Bsp 19 ((2*x+5) \<up> 2+(3*x+4) \<up> 2=(13*x+2)*(x+1)+2*(15+14*x))";
53.11 +"Schalk I s.86 Bsp 19 ((2*x+5) \<up> 2+(3*x+4) \<up> 2=(13*x+2)*(x+1)+2*(15+14*x))";
53.12 +"Schalk I s.86 Bsp 19 ((2*x+5) \<up> 2+(3*x+4) \<up> 2=(13*x+2)*(x+1)+2*(15+14*x))";
53.13 (*EP*)
53.14 -val fmz = ["equality ((2*x+5)^^^2+(3*x+4)^^^2=(13*x+2)*(x+1)+2*(15+14*x))",
53.15 +val fmz = ["equality ((2*x+5) \<up> 2+(3*x+4) \<up> 2=(13*x+2)*(x+1)+2*(15+14*x))",
53.16 "solveFor x", "solutions L"];
53.17 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.18 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.19 @@ -135,11 +135,11 @@
53.20 | _ => error "rlang.sml: diff.behav. in Schalk I s.86 Bsp 23 [x = -9]";
53.21
53.22 (*----------------- Schalk I s.86 Bsp 25 ------------------------*)
53.23 -"Schalk I s.86 Bsp 25 ((2*x+1)^^^3+(x+1)^^^3=(2*x+1)^^^2*2*x+(x+2)^^^3+x^^^2)";
53.24 -"Schalk I s.86 Bsp 25 ((2*x+1)^^^3+(x+1)^^^3=(2*x+1)^^^2*2*x+(x+2)^^^3+x^^^2)";
53.25 -"Schalk I s.86 Bsp 25 ((2*x+1)^^^3+(x+1)^^^3=(2*x+1)^^^2*2*x+(x+2)^^^3+x^^^2)";
53.26 +"Schalk I s.86 Bsp 25 ((2*x+1) \<up> 3+(x+1) \<up> 3=(2*x+1) \<up> 2*2*x+(x+2) \<up> 3+x \<up> 2)";
53.27 +"Schalk I s.86 Bsp 25 ((2*x+1) \<up> 3+(x+1) \<up> 3=(2*x+1) \<up> 2*2*x+(x+2) \<up> 3+x \<up> 2)";
53.28 +"Schalk I s.86 Bsp 25 ((2*x+1) \<up> 3+(x+1) \<up> 3=(2*x+1) \<up> 2*2*x+(x+2) \<up> 3+x \<up> 2)";
53.29 (*EP*)
53.30 -val fmz = ["equality ((2*x+1)^^^3+(x+1)^^^3=(2*x+1)^^^2*2*x+(x+2)^^^3+x^^^2)",
53.31 +val fmz = ["equality ((2*x+1) \<up> 3+(x+1) \<up> 3=(2*x+1) \<up> 2*2*x+(x+2) \<up> 3+x \<up> 2)",
53.32 "solveFor x", "solutions L"];
53.33 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.34 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.35 @@ -310,11 +310,11 @@
53.36
53.37
53.38 (*----------------- Schalk I s.87 Bsp 44a ------------------------*)
53.39 -"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2)^^^2 -((13*x)/2- 5/2)^^^2 -(6*x)^^^2+29)";
53.40 -"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2)^^^2 -((13*x)/2- 5/2)^^^2 -(6*x)^^^2+29)";
53.41 -"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2)^^^2 -((13*x)/2- 5/2)^^^2 -(6*x)^^^2+29)";
53.42 +"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2) \<up> 2 -((13*x)/2- 5/2) \<up> 2 -(6*x) \<up> 2+29)";
53.43 +"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2) \<up> 2 -((13*x)/2- 5/2) \<up> 2 -(6*x) \<up> 2+29)";
53.44 +"Schalk I s.87 Bsp 44a ((1/2+(5*x)/2) \<up> 2 -((13*x)/2- 5/2) \<up> 2 -(6*x) \<up> 2+29)";
53.45 (*ER-5*)
53.46 -val fmz = ["equality ((1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 = -1*(6*x)^^^2 + 29)",
53.47 +val fmz = ["equality ((1/2 + (5*x)/2) \<up> 2 - ((13*x)/2 - 5/2) \<up> 2 = -1*(6*x) \<up> 2 + 29)",
53.48 "solveFor x", "solutions L"];
53.49 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.50 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.51 @@ -338,13 +338,13 @@
53.52 | _ => error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 44a [x = 1]";
53.53
53.54 (*WN---v *)
53.55 -val t = TermC.str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 - (6*x)^^^2 + 29";
53.56 +val t = TermC.str2term "(1/2 + (5*x)/2) \<up> 2 - ((13*x)/2 - 5/2) \<up> 2 - (6*x) \<up> 2 + 29";
53.57 val subst = [(TermC.str2term "bdv", TermC.str2term "x")];
53.58 val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t;
53.59 -if UnparseC.term t' = "23 + 35 * x + -72 * x ^^^ 2" then ()
53.60 +if UnparseC.term t' = "23 + 35 * x + -72 * x \<up> 2" then ()
53.61 else error "rlang.sml: 4";
53.62
53.63 -val t = TermC.str2term "(1/2 + (5*x)/2)^^^2 - ((13*x)/2 - 5/2)^^^2 + (6*x)^^^2 - 29";
53.64 +val t = TermC.str2term "(1/2 + (5*x)/2) \<up> 2 - ((13*x)/2 - 5/2) \<up> 2 + (6*x) \<up> 2 - 29";
53.65 val subst = [(TermC.str2term "bdv", TermC.str2term "x")];
53.66 val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t;
53.67 if UnparseC.term t' = "-35 + 35 * x" then ()
53.68 @@ -578,11 +578,11 @@
53.69 else error "rlang.sml: diff.behav. in 98a(1) asm";
53.70
53.71 (*----------------- Schalk I s.89 Bsp 104a(1) ------------------------*)
53.72 -"Schalk I s.89 Bsp 104a (1) (y^^^2=2*p*x)";
53.73 -"Schalk I s.89 Bsp 104a (1) (y^^^2=2*p*x)";
53.74 -"Schalk I s.89 Bsp 104a (1) (y^^^2=2*p*x)";
53.75 +"Schalk I s.89 Bsp 104a (1) (y \<up> 2=2*p*x)";
53.76 +"Schalk I s.89 Bsp 104a (1) (y \<up> 2=2*p*x)";
53.77 +"Schalk I s.89 Bsp 104a (1) (y \<up> 2=2*p*x)";
53.78 (*ER-13 + EO-11 ?!?*)
53.79 -val fmz = ["equality (y^^^2=2*p*x)",
53.80 +val fmz = ["equality (y \<up> 2=2*p*x)",
53.81 "solveFor p", "solutions L"];
53.82 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.83 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.84 @@ -600,7 +600,7 @@
53.85 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.86 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.87 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.88 -case f of Form' (Test_Out.FormKF (_,_,0,_,"[p = y ^^^ 2 / (2 * x)]")) => ()
53.89 +case f of Form' (Test_Out.FormKF (_,_,0,_,"[p = y \<up> 2 / (2 * x)]")) => ()
53.90 | _ => error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 104a (1) [p = y^2/(2*x)]";
53.91 if Ctree.get_assumptions pt p = [TermC.str2term"-2 * x ~= 0"]
53.92 then writeln"should be x ~= 0\nshould be x ~= 0\nshould be x ~= 0\n"
53.93 @@ -608,11 +608,11 @@
53.94
53.95
53.96 (*----------------- Schalk I s.89 Bsp 104a(2) ------------------------*)
53.97 -"Schalk I s.89 Bsp 104a (2) (y^^^2=2*p*x)";
53.98 -"Schalk I s.89 Bsp 104a (2) (y^^^2=2*p*x)";
53.99 -"Schalk I s.89 Bsp 104a (2) (y^^^2=2*p*x)";
53.100 +"Schalk I s.89 Bsp 104a (2) (y \<up> 2=2*p*x)";
53.101 +"Schalk I s.89 Bsp 104a (2) (y \<up> 2=2*p*x)";
53.102 +"Schalk I s.89 Bsp 104a (2) (y \<up> 2=2*p*x)";
53.103 (*EO ??*)
53.104 -val fmz = ["equality (y^^^2=2*p*x)",
53.105 +val fmz = ["equality (y \<up> 2=2*p*x)",
53.106 "solveFor y", "solutions L"];
53.107 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.108 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.109 @@ -639,11 +639,11 @@
53.110
53.111
53.112 (*----------------- Schalk I s.90 Bsp 118a (1) ------------------------*)
53.113 -"Schalk I s.90 Bsp 118a (1) (b^^^2*x^^^2 + a^^^2*y^^^2 = a^^^2*b^^^2)";
53.114 -"Schalk I s.90 Bsp 118a (1) (b^^^2*x^^^2 + a^^^2*y^^^2 = a^^^2*b^^^2)";
53.115 -"Schalk I s.90 Bsp 118a (1) (b^^^2*x^^^2 + a^^^2*y^^^2 = a^^^2*b^^^2)";
53.116 +"Schalk I s.90 Bsp 118a (1) (b \<up> 2*x \<up> 2 + a \<up> 2*y \<up> 2 = a \<up> 2*b \<up> 2)";
53.117 +"Schalk I s.90 Bsp 118a (1) (b \<up> 2*x \<up> 2 + a \<up> 2*y \<up> 2 = a \<up> 2*b \<up> 2)";
53.118 +"Schalk I s.90 Bsp 118a (1) (b \<up> 2*x \<up> 2 + a \<up> 2*y \<up> 2 = a \<up> 2*b \<up> 2)";
53.119 (*EO-8*)
53.120 -val fmz = ["equality (b^^^2*x^^^2 + a^^^2*y^^^2 = a^^^2*b^^^2)",
53.121 +val fmz = ["equality (b \<up> 2*x \<up> 2 + a \<up> 2*y \<up> 2 = a \<up> 2*b \<up> 2)",
53.122 "solveFor x", "solutions L"];
53.123 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.124 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.125 @@ -674,14 +674,14 @@
53.126
53.127 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;f2str f;Ctree.get_assumptions pt p;
53.128 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;f2str f;Ctree.get_assumptions pt p;
53.129 -case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x = sqrt ((a ^^^ 2 * b ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 2) / b ^^^ 2),\n x = -1 * sqrt ((a ^^^ 2 * b ^^^ 2 + -1 * a ^^^ 2 * y ^^^ 2) / b ^^^ 2)]")) => writeln"should be simplified MG"
53.130 +case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x = sqrt ((a \<up> 2 * b \<up> 2 + -1 * a \<up> 2 * y \<up> 2) / b \<up> 2),\n x = -1 * sqrt ((a \<up> 2 * b \<up> 2 + -1 * a \<up> 2 * y \<up> 2) / b \<up> 2)]")) => writeln"should be simplified MG"
53.131 | _ => error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) [x = ]";
53.132 val asms = Ctree.get_assumptions pt p;
53.133 if asms =
53.134 - [TermC.str2term"0 * b ^^^ 2 <= -1 * (a ^^^ 2 * y ^^^ 2 + -1 * a ^^^ 2 * b ^^^ 2)",
53.135 - TermC.str2term"b ^^^ 2 ~= 0",
53.136 - TermC.str2term"0 * b ^^^ 2 <= -1 * (a ^^^ 2 * y ^^^ 2 + -1 * a ^^^ 2 * b ^^^ 2)",
53.137 - TermC.str2term"b ^^^ 2 ~= 0"] then writeln"should be simplified MG"
53.138 + [TermC.str2term"0 * b \<up> 2 <= -1 * (a \<up> 2 * y \<up> 2 + -1 * a \<up> 2 * b \<up> 2)",
53.139 + TermC.str2term"b \<up> 2 ~= 0",
53.140 + TermC.str2term"0 * b \<up> 2 <= -1 * (a \<up> 2 * y \<up> 2 + -1 * a \<up> 2 * b \<up> 2)",
53.141 + TermC.str2term"b \<up> 2 ~= 0"] then writeln"should be simplified MG"
53.142 else error "rlang.sml: diff.behav. in Schalk I s.89 Bsp 118a(2) asms";
53.143
53.144 (*----------------- Schalk I s.102 Bsp 268(1) ------------------------*)
53.145 @@ -793,7 +793,7 @@
53.146 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.147 if f = Form'
53.148 (Test_Out.FormKF
53.149 - (~1, EdUndef, 0, Nundef, "256 + -2368 * x + 576 * x ^^^ 2 = 0"))then()
53.150 + (~1, EdUndef, 0, Nundef, "256 + -2368 * x + 576 * x \<up> 2 = 0"))then()
53.151 else error "rlang.sml: diff.behav. in Schalk II s.56 Bsp 68a";
53.152 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.153 Ctree.get_assumptions pt p;
53.154 @@ -858,7 +858,7 @@
53.155 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.156 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.157 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.158 -(*"144 + 288 * x + 144 * x ^^^ 2 = 144 + x ^^^ 2 + 288 * x + 143 * x ^^^ 2"
53.159 +(*"144 + 288 * x + 144 * x \<up> 2 = 144 + x \<up> 2 + 288 * x + 143 * x \<up> 2"
53.160 -> Subproblem ("RootEq", ["univariate", ...])*)
53.161 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.162 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.163 @@ -899,7 +899,7 @@
53.164 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.165 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.166 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.167 -(*4 + 5 * x + -2 * sqrt (3 + 13 * x + 4 * x ^^^ 2) = -2 + x"
53.168 +(*4 + 5 * x + -2 * sqrt (3 + 13 * x + 4 * x \<up> 2) = -2 + x"
53.169 -> Subproblem ("RootEq", ["univariate", ...])*)
53.170 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.171 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.172 @@ -909,7 +909,7 @@
53.173 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.174 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.175 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.176 -(*"12 + 52 * x + 16 * x ^^^ 2 = 36 + x ^^^ 2 + 48 * x + 15 * x ^^^ 2"
53.177 +(*"12 + 52 * x + 16 * x \<up> 2 = 36 + x \<up> 2 + 48 * x + 15 * x \<up> 2"
53.178 -> Subproblem ("RootEq", ["univariate", ...])*)
53.179 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.180 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.181 @@ -1048,7 +1048,7 @@
53.182 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.183 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.184 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.185 -if f = Form' (Test_Out.FormKF (~1, EdUndef, 0, Nundef, "-8 + 2 * x ^^^ 2 = 0")) then ()
53.186 +if f = Form' (Test_Out.FormKF (~1, EdUndef, 0, Nundef, "-8 + 2 * x \<up> 2 = 0")) then ()
53.187 else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a";
53.188 (*-> Subproblem ("PolyEq", ["polynomial", ...])*)
53.189 (*
53.190 @@ -1067,10 +1067,10 @@
53.191 | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 8a [x = 2, x = -2]";
53.192
53.193 (*----------------- Schalk II s.66 Bsp 10b ------------------------*)
53.194 -"Schalk II s.66 Bsp 10b (1/(x^^^2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.195 -"Schalk II s.66 Bsp 10b (1/(x^^^2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.196 -"Schalk II s.66 Bsp 10b (1/(x^^^2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.197 -val fmz = ["equality (1/(x^^^2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))",
53.198 +"Schalk II s.66 Bsp 10b (1/(x \<up> 2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.199 +"Schalk II s.66 Bsp 10b (1/(x \<up> 2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.200 +"Schalk II s.66 Bsp 10b (1/(x \<up> 2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))";
53.201 +val fmz = ["equality (1/(x \<up> 2 - 9)+(2*x+3)/(x+3)=(3*x+4)/(x - 3))",
53.202 "solveFor x", "solutions L"];
53.203 val (dI',pI',mI') = ("RatEq",["univariate", "equation"],["no_met"]);
53.204 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.205 @@ -1092,7 +1092,7 @@
53.206 EdUndef,
53.207 0,
53.208 Nundef,
53.209 - "60 + 28 * x + -13 * x ^^^ 2 + -1 * x ^^^ 3 = 0")) then ()
53.210 + "60 + 28 * x + -13 * x \<up> 2 + -1 * x \<up> 3 = 0")) then ()
53.211 else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 10b";
53.212 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.213 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.214 @@ -1100,15 +1100,15 @@
53.215 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.216 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.217 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.218 -(*60 + 28 * x + -13 * x ^^^ 2 + -1 * x ^^^ 3 = 0 ... degree 3 not solvable*)
53.219 +(*60 + 28 * x + -13 * x \<up> 2 + -1 * x \<up> 3 = 0 ... degree 3 not solvable*)
53.220
53.221
53.222 (*----------------- Schalk II s.66 Bsp 20a ------------------------*)
53.223 (*EO-6*)
53.224 -"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x^^^2 - 9))=5)";
53.225 -"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x^^^2 - 9))=5)";
53.226 -"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x^^^2 - 9))=5)";
53.227 -val fmz = ["equality (sqrt(29 - sqrt(x^^^2 - 9))=5)",
53.228 +"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x \<up> 2 - 9))=5)";
53.229 +"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x \<up> 2 - 9))=5)";
53.230 +"Schalk II s.66 Bsp 20a (sqrt(29 - sqrt (x \<up> 2 - 9))=5)";
53.231 +val fmz = ["equality (sqrt(29 - sqrt(x \<up> 2 - 9))=5)",
53.232 "solveFor x", "solutions L"];
53.233 val (dI',pI',mI') = ("RootEq",["univariate", "equation"],["no_met"]);
53.234 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.235 @@ -1130,7 +1130,7 @@
53.236 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.237 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.238 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.239 -if f = Form' (Test_Out.FormKF (~1, EdUndef, 0, Nundef, "-25 + x ^^^ 2 = 0")) then ()
53.240 +if f = Form' (Test_Out.FormKF (~1, EdUndef, 0, Nundef, "-25 + x \<up> 2 = 0")) then ()
53.241 else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 20a";
53.242 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.243 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.244 @@ -1151,7 +1151,7 @@
53.245 "Schalk II s.66 Bsp 23b (2*sqrt(261 - x) - sqrt(2+2*x)=sqrt(2)*sqrt(5 - 3*x))";
53.246 "Schalk II s.66 Bsp 23b (2*sqrt(261 - x) - sqrt(2+2*x)=sqrt(2)*sqrt(5 - 3*x))";
53.247 (*EO WN060310 something wrong:
53.248 -([6, 6, 3, 1], Frm) "-1064944 + 32 * x + -48 * x ^^^ 2 = 0"
53.249 +([6, 6, 3, 1], Frm) "-1064944 + 32 * x + -48 * x \<up> 2 = 0"
53.250 ### or2list False
53.251 ([6, 6, 3, 1], Res) "HOL.False"
53.252 *)
53.253 @@ -1182,7 +1182,7 @@
53.254 val (p,_,f,nxt,_,pt) = me nxt p [1] pt; f2str f;
53.255 if f = Form'
53.256 (Test_Out.FormKF
53.257 - (~1, EdUndef, 0, Nundef, "-1064944 + 32 * x + -48 * x ^^^ 2 = 0"))then()
53.258 + (~1, EdUndef, 0, Nundef, "-1064944 + 32 * x + -48 * x \<up> 2 = 0"))then()
53.259 else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b";
53.260 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.261 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.262 @@ -1195,10 +1195,10 @@
53.263 | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 23b []";
53.264
53.265 (*----------------- Schalk II s.66 Bsp 28a ------------------------*)
53.266 -"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a^^^2 - c^^^2))";
53.267 -"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a^^^2 - c^^^2))";
53.268 -"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a^^^2 - c^^^2))";
53.269 -val fmz = ["equality (A=(c/d)*sqrt(4*a^^^2 - c^^^2))",
53.270 +"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a \<up> 2 - c \<up> 2))";
53.271 +"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a \<up> 2 - c \<up> 2))";
53.272 +"Schalk II s.66 Bsp 28a (A=(c/d)*sqrt(4*a \<up> 2 - c \<up> 2))";
53.273 +val fmz = ["equality (A=(c/d)*sqrt(4*a \<up> 2 - c \<up> 2))",
53.274 "solveFor a", "solutions L"];
53.275 val (dI',pI',mI') = ("RootEq",["univariate", "equation"],["no_met"]);
53.276 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.277 @@ -1219,9 +1219,9 @@
53.278 EdUndef,
53.279 0,
53.280 Nundef,
53.281 - "c ^^^ 4 / d ^^^ 2 + A ^^^ 2 * d ^^^ 2 / d ^^^ 2 +\n-4 * c ^^^ 2 / d ^^^ 2 * a ^^^ 2 =\n0")) then ()*)
53.282 + "c \<up> 4 / d \<up> 2 + A \<up> 2 * d \<up> 2 / d \<up> 2 +\n-4 * c \<up> 2 / d \<up> 2 * a \<up> 2 =\n0")) then ()*)
53.283 if f2str f =
53.284 - "c ^^^ 4 / d ^^^ 2 + A ^^^ 2 / 1 + -4 * c ^^^ 2 / d ^^^ 2 * a ^^^ 2 = 0"
53.285 + "c \<up> 4 / d \<up> 2 + A \<up> 2 / 1 + -4 * c \<up> 2 / d \<up> 2 * a \<up> 2 = 0"
53.286 then () else error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a";
53.287 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.288 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.289 @@ -1232,7 +1232,7 @@
53.290 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.291 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.292 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.293 -case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[a = sqrt ((c ^^^ 4 + A ^^^ 2 * d ^^^ 2) / (4 * c ^^^ 2)),\n a = -1 * sqrt ((c ^^^ 4 + A ^^^ 2 * d ^^^ 2) / (4 * c ^^^ 2))]")) => ()
53.294 +case f of Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[a = sqrt ((c \<up> 4 + A \<up> 2 * d \<up> 2) / (4 * c \<up> 2)),\n a = -1 * sqrt ((c \<up> 4 + A \<up> 2 * d \<up> 2) / (4 * c \<up> 2))]")) => ()
53.295 | _ => error "rlang.sml: diff.behav. in Schalk II s.66 Bsp 28a [a=...]";
53.296
53.297
53.298 @@ -1265,7 +1265,7 @@
53.299 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.300 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.301 (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt; at introducing of MGs norm_Rational*)
53.302 -(*val p = ([4,5],Res) val f ="b * a ^^^ 2 + -1 * a * b ^^^ 2 + (a ^^^ 2 + b ^^^ 2 + -2 * a * b) * x +\n(b + -1 * a) * x ^^^ 2 =\n0"))
53.303 +(*val p = ([4,5],Res) val f ="b * a \<up> 2 + -1 * a * b \<up> 2 + (a \<up> 2 + b \<up> 2 + -2 * a * b) * x +\n(b + -1 * a) * x \<up> 2 =\n0"))
53.304 val nxt = Subproblem ("PolyEq",["polynomial", "univariate", "equation"]))*)
53.305 if f = Form'
53.306 (Test_Out.FormKF
53.307 @@ -1273,7 +1273,7 @@
53.308 EdUndef,
53.309 0,
53.310 Nundef,
53.311 - "b * a ^^^ 2 + -1 * a * b ^^^ 2 + (a ^^^ 2 + b ^^^ 2 + -2 * a * b) * x +\n(b + -1 * a) * x ^^^ 2 =\n0")) then ()
53.312 + "b * a \<up> 2 + -1 * a * b \<up> 2 + (a \<up> 2 + b \<up> 2 + -2 * a * b) * x +\n(b + -1 * a) * x \<up> 2 =\n0")) then ()
53.313 else error "rlang.sml: diff.behav. in chalk I s.87 Bsp 38b";
53.314 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.315 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.316 @@ -1287,7 +1287,7 @@
53.317 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.318 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.319 (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt;introducing MGs norm_Rational*)
53.320 -(*val p = ([4,6,5],Res) val f ="[x =\n (2 * a * b + -1 * a ^^^ 2 + -1 * b ^^^ 2 +\n sqrt\n (a ^^^ 4 + b ^^^ 4 + -4 * a * a * b ^^^ 2 + -4 * a * b * a ^^^ 2 +\n -4 * b * b * a ^^^ 2 +\n 4 * a * a * b ^^^ 2 +\n 4 * a * b * a ^^^ 2 +\n 2 * a ^^^ 2 * b ^^^ 2)) /\n (-2 * a + 2 * #"
53.321 +(*val p = ([4,6,5],Res) val f ="[x =\n (2 * a * b + -1 * a \<up> 2 + -1 * b \<up> 2 +\n sqrt\n (a \<up> 4 + b \<up> 4 + -4 * a * a * b \<up> 2 + -4 * a * b * a \<up> 2 +\n -4 * b * b * a \<up> 2 +\n 4 * a * a * b \<up> 2 +\n 4 * a * b * a \<up> 2 +\n 2 * a \<up> 2 * b \<up> 2)) /\n (-2 * a + 2 * #"
53.322 nx Check_Postcond["abcFormula", "degree_2", "polynomial", "univariate", "equation*)
53.323 (*9.9.03: -"- ["normalise", "polynomial", "univar...*)
53.324 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.325 @@ -1296,12 +1296,12 @@
53.326 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.327 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;(*1 additional for MGs norm_Rational*)
53.328 if p = ([],Res) andalso f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,
53.329 -"[x =\n (2 * a * b + -1 * a ^^^ 2 + -1 * b ^^^ 2 +\n sqrt\n (a ^^^ 4 + b ^^^ 4 + -4 * a * a * b ^^^ 2 + -4 * a * b * a ^^^ 2 +\n -4 * b * b * a ^^^ 2 +\n 4 * a * a * b ^^^ 2 +\n 4 * a * b * a ^^^ 2 +\n 2 * a ^^^ 2 * b ^^^ 2)) /\n (-2 * a + 2 * b),\n x =\n (2 * a * b + -1 * a ^^^ 2 + -1 * b ^^^ 2 +\n -1 *\n sqrt\n (a ^^^ 4 + b ^^^ 4 + -4 * a * a * b ^^^ 2 + -4 * a * b * a ^^^ 2 +\n -4 * b * b * a ^^^ 2 +\n 4 * a * a * b ^^^ 2 +\n 4 * a * b * a ^^^ 2 +\n 2 * a ^^^ 2 * b ^^^ 2)) /\n (-2 * a + 2 * b)]")) andalso nxt = ("End_Proof'",End_Proof') then writeln"simplify MG"
53.330 +"[x =\n (2 * a * b + -1 * a \<up> 2 + -1 * b \<up> 2 +\n sqrt\n (a \<up> 4 + b \<up> 4 + -4 * a * a * b \<up> 2 + -4 * a * b * a \<up> 2 +\n -4 * b * b * a \<up> 2 +\n 4 * a * a * b \<up> 2 +\n 4 * a * b * a \<up> 2 +\n 2 * a \<up> 2 * b \<up> 2)) /\n (-2 * a + 2 * b),\n x =\n (2 * a * b + -1 * a \<up> 2 + -1 * b \<up> 2 +\n -1 *\n sqrt\n (a \<up> 4 + b \<up> 4 + -4 * a * a * b \<up> 2 + -4 * a * b * a \<up> 2 +\n -4 * b * b * a \<up> 2 +\n 4 * a * a * b \<up> 2 +\n 4 * a * b * a \<up> 2 +\n 2 * a \<up> 2 * b \<up> 2)) /\n (-2 * a + 2 * b)]")) andalso nxt = ("End_Proof'",End_Proof') then writeln"simplify MG"
53.331 else error "rlang.sml: diff.behav. in rational-a-b";
53.332
53.333 (*----------------- Schalk II s.68 Bsp 56a ------------------------*)
53.334 -"Schalk II s.68 Bsp 56a ((a+b*x)/(a-b*x) - (a - b*x)/(a+b*x)= (4*a*b)/(a^^^2 - b^^^2))";
53.335 -val fmz = ["equality ((a+b*x)/(a-b*x) - (a - b*x)/(a+b*x)= (4*a*b)/(a^^^2 - b^^^2))", "solveFor x", "solutions L"];
53.336 +"Schalk II s.68 Bsp 56a ((a+b*x)/(a-b*x) - (a - b*x)/(a+b*x)= (4*a*b)/(a \<up> 2 - b \<up> 2))";
53.337 +val fmz = ["equality ((a+b*x)/(a-b*x) - (a - b*x)/(a+b*x)= (4*a*b)/(a \<up> 2 - b \<up> 2))", "solveFor x", "solutions L"];
53.338 val (dI',pI',mI') = ("RatEq",["univariate", "equation"],["no_met"]);
53.339 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.340 (* val nxt = ("Model_Problem",Model_Problem ["rational", "univariate", "equation"]) *)
53.341 @@ -1315,27 +1315,27 @@
53.342
53.343 ... with sml-nj:
53.344 (a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) =
53.345 - 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.346 + 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.347 add_fractions_p wird nicht angewendet, weil ...
53.348 add_fract terminiert nicht: 030603
53.349 siehe Rational.ML rational.sml
53.350 *)
53.351
53.352 (*
53.353 -"(a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) =\n4 * a * b / (a ^^^ 2 + -1 * b ^^^ 2)"
53.354 +"(a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) =\n4 * a * b / (a \<up> 2 + -1 * b \<up> 2)"
53.355
53.356 val nxt = ("Rewrite_Set",Rewrite_Set "make_ratpoly") : string * tac
53.357 "(a + b * x) / (a + -1 * b * x) + (-1 * a + b * x) / (a + b * x) =\n4 *
53.358 -a * b / (a ^^^ 2 + -1 * b ^^^ 2)"
53.359 +a * b / (a \<up> 2 + -1 * b \<up> 2)"
53.360
53.361
53.362 -val t = TermC.str2term"(a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) =\n4 * a * b / (a ^^^ 2 + -1 * b ^^^ 2)";
53.363 +val t = TermC.str2term"(a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) =\n4 * a * b / (a \<up> 2 + -1 * b \<up> 2)";
53.364 Rewrite.trace_on := false;
53.365 val SOME (t',asm) = rewrite_set_ thy false norm_Rational t;
53.366 UnparseC.term t';
53.367 Rewrite.trace_on:=false;
53.368
53.369 -# rls: norm_Rational on: (a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) = 4 * a * b / (a ^^^ 2 + -1 * b ^^^ 2)
53.370 +# rls: norm_Rational on: (a + b * x) / (a + -1 * (b * x)) + -1 * (a + -1 * (b * x)) / (a + b * x) = 4 * a * b / (a \<up> 2 + -1 * b \<up> 2)
53.371
53.372 ## rls: discard_minus on:
53.373 ## rls: powers on:
53.374 @@ -1344,19 +1344,19 @@
53.375 ## rls: reduce_0_1_2 on:
53.376 ## rls: order_add_mult on:
53.377 ### try thm: mult.commute
53.378 -=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = b * (4 * a) / (a ^^^ 2 + -1 * b ^^^ 2)
53.379 +=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = b * (4 * a) / (a \<up> 2 + -1 * b \<up> 2)
53.380
53.381 ### try thm: real_mult_left_commute
53.382 -=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = 4 * (b * a) / (a ^^^ 2 + -1 * b ^^^ 2)
53.383 +=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = 4 * (b * a) / (a \<up> 2 + -1 * b \<up> 2)
53.384
53.385 ### try thm: mult.commute
53.386 -=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.387 +=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + -1 * (-1 * (b * x))) / (a + b * x) = 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.388
53.389 ### try calc: op *'
53.390 -=== calc. to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + 1 * (b * x)) / (a +b * x) = 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.391 +=== calc. to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + 1 * (b * x)) / (a +b * x) = 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.392
53.393 ## rls: add_fractions_p on: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + 1 * (b * x)) / (a + b * x) =
53.394 - 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.395 + 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.396 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GC
53.397
53.398 ## rls: discard_minus on:
53.399 @@ -1365,12 +1365,12 @@
53.400 ## rls: expand on:
53.401 ## rls: reduce_0_1_2 on:
53.402 ### try thm: real_mult_1
53.403 -=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) = 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.404 +=== rewrites to: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) = 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.405
53.406 ## rls: order_add_mult on:
53.407
53.408 ## rls: add_fractions_p on: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) =
53.409 - 4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.410 + 4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.411 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GC
53.412
53.413 ## rls: discard_minus on:
53.414 @@ -1381,7 +1381,7 @@
53.415 ## rls: order_add_mult on:
53.416 ## rls: collect_numerals on:
53.417 ## rls: add_fractions_p on: (a + b * x) / (a + -1 * (b * x)) + (-1 * a + b * x) / (a + b * x) =
53.418 -4 * (a * b) / (a ^^^ 2 + -1 * b ^^^ 2)
53.419 +4 * (a * b) / (a \<up> 2 + -1 * b \<up> 2)
53.420 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GC
53.421 *)
53.422
53.423 @@ -1422,8 +1422,8 @@
53.424 EdUndef,
53.425 0,
53.426 Nundef,
53.427 - (*"-4 * b ^^^ 2 + -4 * a * b + 4 * b ^^^ 2 + 8 * a * b +\n(-2 * a + -4 * a + -4 * b + 2 * a + 8 * b) * x +\n-4 * x ^^^ 2 =\n0" before MG*)
53.428 - "4 * a * b + (-4 * a + 4 * b) * x + -4 * x ^^^ 2 = 0")) then ()
53.429 + (*"-4 * b \<up> 2 + -4 * a * b + 4 * b \<up> 2 + 8 * a * b +\n(-2 * a + -4 * a + -4 * b + 2 * a + 8 * b) * x +\n-4 * x \<up> 2 =\n0" before MG*)
53.430 + "4 * a * b + (-4 * a + 4 * b) * x + -4 * x \<up> 2 = 0")) then ()
53.431 else error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 61b";
53.432 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.433 (*val nxt = ("Model_Problem", Model_Problem
53.434 @@ -1432,8 +1432,8 @@
53.435 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.436 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.437 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.438 -(* f= ... "-4 * b ^^^ 2 + -4 * a * b + 4 * b ^^^ 2 + 8 * a * b +
53.439 - (-2 * a + -4 * a + -4 * b + 2 * a + 8 * b) * x + -4 * x ^^^ 2 =0"*)
53.440 +(* f= ... "-4 * b \<up> 2 + -4 * a * b + 4 * b \<up> 2 + 8 * a * b +
53.441 + (-2 * a + -4 * a + -4 * b + 2 * a + 8 * b) * x + -4 * x \<up> 2 =0"*)
53.442 (*val nxt = ("Rewrite_Set_Inst",Rewrite_Set_Inst ([#],"d2_polyeq_abcFormula_simplify"))*)
53.443 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.444 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.445 @@ -1442,15 +1442,15 @@
53.446 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.447 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.448 (*if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef, with norm_Rational before MG
53.449 -"[x =\n (-2 * a + -4 * b + 6 * a +\n sqrt\n (32 * a * b + -16 * a ^^^ 2 + -48 * b ^^^ 2 + 24 * a ^^^ 2 +\n 64 * b ^^^ 2 +\n 8 * a ^^^ 2)) /\n -8,\n x =\n (-2 * a + -4 * b + 6 * a +\n -1 *\n sqrt\n (32 * a * b + -16 * a ^^^ 2 + -48 * b ^^^ 2 + 24 * a ^^^ 2 +\n 64 * b ^^^ 2 +\n 8 * a ^^^ 2)) /\n -8]")) then writeln"simplify MG"*)
53.450 -if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x =\n (-4 * b + 4 * a + sqrt (32 * a * b + 16 * a ^^^ 2 + 16 * b ^^^ 2)) / -8,\n x =\n (-4 * b + 4 * a + -1 * sqrt (32 * a * b + 16 * a ^^^ 2 + 16 * b ^^^ 2)) /\n -8]")) then ()
53.451 +"[x =\n (-2 * a + -4 * b + 6 * a +\n sqrt\n (32 * a * b + -16 * a \<up> 2 + -48 * b \<up> 2 + 24 * a \<up> 2 +\n 64 * b \<up> 2 +\n 8 * a \<up> 2)) /\n -8,\n x =\n (-2 * a + -4 * b + 6 * a +\n -1 *\n sqrt\n (32 * a * b + -16 * a \<up> 2 + -48 * b \<up> 2 + 24 * a \<up> 2 +\n 64 * b \<up> 2 +\n 8 * a \<up> 2)) /\n -8]")) then writeln"simplify MG"*)
53.452 +if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[x =\n (-4 * b + 4 * a + sqrt (32 * a * b + 16 * a \<up> 2 + 16 * b \<up> 2)) / -8,\n x =\n (-4 * b + 4 * a + -1 * sqrt (32 * a * b + 16 * a \<up> 2 + 16 * b \<up> 2)) /\n -8]")) then ()
53.453 else error "rlang.sml: diff.behav. Bsp 61b";
53.454 (*WN.18.12.03: extreme run-time !!!*)
53.455
53.456
53.457 (*----------------- Schalk II s.68 Bsp 62b ------------------------*)
53.458 -"Schalk II s.68 Bsp 62b (sqrt((x+a)^^^2+(x - 2*b)^^^2)=a+2*b)";
53.459 -val fmz = ["equality (sqrt((x+a)^^^2+(x - 2*b)^^^2)=a+2*b)",
53.460 +"Schalk II s.68 Bsp 62b (sqrt((x+a) \<up> 2+(x - 2*b) \<up> 2)=a+2*b)";
53.461 +val fmz = ["equality (sqrt((x+a) \<up> 2+(x - 2*b) \<up> 2)=a+2*b)",
53.462 "solveFor x", "solutions L"];
53.463 val (dI',pI',mI') = ("RootEq",["univariate", "equation"],["no_met"]);
53.464 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.465 @@ -1475,7 +1475,7 @@
53.466 EdUndef,
53.467 0,
53.468 Nundef,
53.469 - "-4 * a * b + (-4 * b + 2 * a) * x + 2 * x ^^^ 2 = 0")) then ()
53.470 + "-4 * a * b + (-4 * b + 2 * a) * x + 2 * x \<up> 2 = 0")) then ()
53.471 else error "rlang.sml: diff.behav. in Schalk II s.68 Bsp 62b";
53.472 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.473 (*val nxt = ("Model_Problem", Model_Problem
53.474 @@ -1485,7 +1485,7 @@
53.475 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.476 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.477 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.478 -(*val f = ... "-4 * a * b + (-4 * b + 2 * a) * x + 2 * x ^^^ 2 = 0" *)
53.479 +(*val f = ... "-4 * a * b + (-4 * b + 2 * a) * x + 2 * x \<up> 2 = 0" *)
53.480 (*val nxt = ("Rewrite_Set_Inst",Rewrite_Set_Inst ([#],"d2_polyeq_abcFormula_simplify"))*)
53.481 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.482 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.483 @@ -1493,17 +1493,17 @@
53.484 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.485 (*val (p,_,f,nxt,_,pt) = me nxt p [1] pt;introduc.MGs norm_Rational*)
53.486 if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,
53.487 - "[x = (-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4,\n x =\n (-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4]")) then writeln "simplify MG"
53.488 + "[x = (-2 * a + 4 * b + sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4,\n x =\n (-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4]")) then writeln "simplify MG"
53.489 else error "rlang.sml: diff.behav. in II 62b [x=...]";
53.490 val asms = Ctree.get_assumptions pt p;
53.491 -if asms = [TermC.str2term"0 <= ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 + a) ^^^ 2 + ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 - 2 * b) ^^^ 2",
53.492 +if asms = [TermC.str2term"0 <= ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4 + a) \<up> 2 + ((-2 * a + 4 * b + sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4 - 2 * b) \<up> 2",
53.493 TermC.str2term"0 <= a + 2 * b",
53.494 - TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2",
53.495 - TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2",
53.496 - TermC.str2term"0 <= ((-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 + a) ^^^ 2 + ((-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b ^^^ 2 + 4 * a ^^^ 2)) / 4 - 2 * b) ^^^ 2",
53.497 + TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) \<up> 2",
53.498 + TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) \<up> 2",
53.499 + TermC.str2term"0 <= ((-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4 + a) \<up> 2 + ((-2 * a + 4 * b + -1 * sqrt (16 * a * b + 16 * b \<up> 2 + 4 * a \<up> 2)) / 4 - 2 * b) \<up> 2",
53.500 TermC.str2term"0 <= a + 2 * b",
53.501 - TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2",
53.502 - TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) ^^^ 2"]
53.503 + TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) \<up> 2",
53.504 + TermC.str2term"8 * (-4 * a * b) <= (-4 * b + 2 * a) \<up> 2"]
53.505 then writeln "should be simplified MG"
53.506 else error "rlang.sml: diff.behav. in II 62b asms";
53.507
53.508 @@ -1511,7 +1511,7 @@
53.509 "------ WN.TEST---------------------------------";
53.510 "------ WN.TEST---------------------------------";
53.511 (*EO-7*)
53.512 -val fmz = ["equality ((2*x+1)*x^^^2 = 0)",
53.513 +val fmz = ["equality ((2*x+1)*x \<up> 2 = 0)",
53.514 "solveFor x", "solutions L"];
53.515 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.516 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.517 @@ -1521,12 +1521,12 @@
53.518 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.519 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.520 (*
53.521 -val f = Form' (Test_Out.FormKF (~1,EdUndef,1,Nundef,"(2 * x + 1) * x ^^^ 2 = 0"))
53.522 +val f = Form' (Test_Out.FormKF (~1,EdUndef,1,Nundef,"(2 * x + 1) * x \<up> 2 = 0"))
53.523 normiert nicht ... korr.WN:
53.524 -val t = TermC.str2term "(2*x+1)*x^^^2 = 0";
53.525 +val t = TermC.str2term "(2*x+1)*x \<up> 2 = 0";
53.526 val subst = [(TermC.str2term "bdv", TermC.str2term "x")];
53.527 val SOME (t',_) = rewrite_set_inst_ thy false subst make_ratpoly_in t;
53.528 -if UnparseC.term t' = "x ^^^ 2 + 2 * x ^^^ 3 = 0" then ()
53.529 +if UnparseC.term t' = "x \<up> 2 + 2 * x \<up> 3 = 0" then ()
53.530 else error "rlang.sml: 7";
53.531 *)
53.532 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
53.533 @@ -1548,21 +1548,21 @@
53.534 (*------------------------------vvv-Rewrite_Set "rat_eliminate"---------
53.535 > Rewrite.trace_on:=true;
53.536 > val t = TermC.str2term
53.537 - "(3 + -1 * x + 1 * x ^^^ 2) / (9 * x + -6 * x ^^^ 2 + 1 * x ^^^ 3) = 1 / x";
53.538 + "(3 + -1 * x + 1 * x \<up> 2) / (9 * x + -6 * x \<up> 2 + 1 * x \<up> 3) = 1 / x";
53.539 > val SOME (t',asm) =
53.540 rewrite_ thy dummy_ord rateq_erls true rat_mult_denominator_both t;
53.541 > UnparseC.term t'; UnparseC.terms asm;
53.542 -"(3 + -1 * x + 1 * x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + 1 * x ^^^ 3)"
53.543 -"[\"9 * x + -6 * x ^^^ 2 + 1 * x ^^^ 3 ~= 0\",\"x ~= 0\"]"
53.544 +"(3 + -1 * x + 1 * x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + 1 * x \<up> 3)"
53.545 +"[\"9 * x + -6 * x \<up> 2 + 1 * x \<up> 3 ~= 0\",\"x ~= 0\"]"
53.546 > Rewrite.trace_on:=false;
53.547 - ------------------------------^^^-Rewrite_Set "rat_eliminate"---------*)
53.548 + ------------------------------ \<up> -Rewrite_Set "rat_eliminate"---------*)
53.549
53.550
53.551 "-------------------- WN.15.5.03: Pythagoras -------------------------------";
53.552 "-------------------- WN.15.5.03: Pythagoras -------------------------------";
53.553 "-------------------- WN.15.5.03: Pythagoras -------------------------------";
53.554 (*EO-9*)
53.555 -val fmz = ["equality ((a/2)^^^2 + (b/2)^^^2 = r^^^2)",
53.556 +val fmz = ["equality ((a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2)",
53.557 "solveFor a", "solutions L"];
53.558 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.559 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
53.560 @@ -1591,15 +1591,15 @@
53.561 val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.562 val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.563 if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,
53.564 -"[a = sqrt ((-1 * b ^^^ 2 + 4 * r ^^^ 2) / 1),\n a = -1 * sqrt ((-1 * b ^^^ 2 + 4 * r ^^^ 2) / 1)]")) andalso nxt = ("End_Proof'",End_Proof')
53.565 +"[a = sqrt ((-1 * b \<up> 2 + 4 * r \<up> 2) / 1),\n a = -1 * sqrt ((-1 * b \<up> 2 + 4 * r \<up> 2) / 1)]")) andalso nxt = ("End_Proof'",End_Proof')
53.566 then writeln"simplify result\nsimplify result\nsimplify result"
53.567 else error "rlang.sml: diff.behav. in Pythagoras";
53.568 val asms = Ctree.get_assumptions pt p;
53.569 -(*if asms = [TermC.str2term"0 <= -4 * (b ^^^ 2 / 4 + -4 * r ^^^ 2 / 4)",
53.570 - TermC.str2term"0 <= -4 * (b ^^^ 2 / 4 + -4 * r ^^^ 2 / 4)"]*)
53.571 +(*if asms = [TermC.str2term"0 <= -4 * (b \<up> 2 / 4 + -4 * r \<up> 2 / 4)",
53.572 + TermC.str2term"0 <= -4 * (b \<up> 2 / 4 + -4 * r \<up> 2 / 4)"]*)
53.573 if UnparseC.terms (*WN1104changed*) asms =
53.574 - "[0 <= -4 * (b ^^^ 2 / 4 + -1 * r ^^^ 2 / 1),\
53.575 - \0 <= -4 * (b ^^^ 2 / 4 + -1 * r ^^^ 2 / 1)]"
53.576 + "[0 <= -4 * (b \<up> 2 / 4 + -1 * r \<up> 2 / 1),\
53.577 + \0 <= -4 * (b \<up> 2 / 4 + -1 * r \<up> 2 / 1)]"
53.578 then writeln"simplify result\nsimplify result\nsimplify result"
53.579 else error "rlang.sml: diff.behav. in Pythagoras asms";
53.580
53.581 @@ -1608,7 +1608,7 @@
53.582 "-------------------- WN.15.5.03: equation within the maximum example ------";
53.583 "-------------------- WN.15.5.03: equation within the maximum example ------";
53.584 (*EO-10*)
53.585 -val fmz = ["equality (2*sqrt(r^^^2 - (u/2)^^^2) - u^^^2/(2*sqrt(r^^^2 - (u/2)^^^2))= 0)",
53.586 +val fmz = ["equality (2*sqrt(r \<up> 2 - (u/2) \<up> 2) - u \<up> 2/(2*sqrt(r \<up> 2 - (u/2) \<up> 2))= 0)",
53.587 "solveFor u", "solutions L"];
53.588 val (dI',pI',mI') = ("PolyEq",["univariate", "equation"],["no_met"]);
53.589
53.590 @@ -1658,7 +1658,7 @@
53.591 EdUndef,
53.592 0,
53.593 Nundef,
53.594 - "-16 * r ^^^ 4 + 8 * r ^^^ 2 * u ^^^ 2 = 0")) then ()
53.595 + "-16 * r \<up> 4 + 8 * r \<up> 2 * u \<up> 2 = 0")) then ()
53.596 else error "rlang.sml: diff.behav. in Schalk I s.87 Bsp 38b";
53.597 val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.598 (*val nxt = Model_Problem ["sq_only", "degree_2", "polynomial", "univariate", "equation"]) *)
53.599 @@ -1674,5 +1674,5 @@
53.600 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.601 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.602 val (p,_,f,nxt,_,pt) = me nxt p c pt;
53.603 -if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[u = sqrt (2 * r ^^^ 2 / 1), u = -1 * sqrt (2 * r ^^^ 2 / 1)]")) then()
53.604 +if f = Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[u = sqrt (2 * r \<up> 2 / 1), u = -1 * sqrt (2 * r \<up> 2 / 1)]")) then()
53.605 else error "rlang.sml WN.TEST new behaviour in max-rooteq";
54.1 --- a/test/Tools/isac/Knowledge/rooteq.sml Mon Apr 19 20:44:18 2021 +0200
54.2 +++ b/test/Tools/isac/Knowledge/rooteq.sml Tue Apr 20 16:58:44 2021 +0200
54.3 @@ -72,12 +72,12 @@
54.4 val result = UnparseC.term t_;
54.5 if result <> "HOL.True" then error "rooteq.sml: new behaviour:" else ();
54.6
54.7 -val t = (Thm.term_of o the o (TermC.parse RootEq.thy)) "(1 - (sqrt(2+x+3)^^^3)) is_normSqrtTerm_in x";
54.8 +val t = (Thm.term_of o the o (TermC.parse RootEq.thy)) "(1 - (sqrt(2+x+3) \<up> 3)) is_normSqrtTerm_in x";
54.9 val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t;
54.10 val result = UnparseC.term t_;
54.11 if result <> "HOL.False" then error "rooteq.sml: new behaviour:" else ();
54.12
54.13 -val t = (Thm.term_of o the o (TermC.parse RootEq.thy)) "(1 + (sqrt(2+x+3)^^^3)) is_normSqrtTerm_in x";
54.14 +val t = (Thm.term_of o the o (TermC.parse RootEq.thy)) "(1 + (sqrt(2+x+3) \<up> 3)) is_normSqrtTerm_in x";
54.15 val SOME(t_, _) = rewrite_set_ RootEq.thy false RootEq_prls t;
54.16 val result = UnparseC.term t_;
54.17 if result <> "HOL.True" then error "rooteq.sml: new behaviour:" else ();
54.18 @@ -233,7 +233,7 @@
54.19 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.20 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.21 val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.22 -(*"144 + 288 * x + 144 * x ^^^ 2 = 144 + x ^^^ 2 + 288 * x + 143 * x ^^^ 2"))
54.23 +(*"144 + 288 * x + 144 * x \<up> 2 = 144 + x \<up> 2 + 288 * x + 143 * x \<up> 2"))
54.24 val nxt = ("Subproblem",Subproblem ("RootEq",["univariate", "equation"]))*)
54.25 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.26 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.27 @@ -274,7 +274,7 @@
54.28 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.29 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.30 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.31 -(*"144 + 288 * x + 144 * x ^^^ 2 = 144 + x ^^^ 2 + 288 * x + 143 * x ^^^ 2"))
54.32 +(*"144 + 288 * x + 144 * x \<up> 2 = 144 + x \<up> 2 + 288 * x + 143 * x \<up> 2"))
54.33 val nxt = ("Subproblem",Subproblem ("RootEq",["univariate", "equation"])) *)
54.34 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.35 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.36 @@ -439,7 +439,7 @@
54.37 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.38 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.39 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.40 -(*"2916 + x ^^^ 2 + 1296 * x + 143 * x ^^^ 2 = 3564 + 1620 * x + 144 * x ^^^ 2"))
54.41 +(*"2916 + x \<up> 2 + 1296 * x + 143 * x \<up> 2 = 3564 + 1620 * x + 144 * x \<up> 2"))
54.42 val nxt = ("Subproblem",Subproblem ("RootEq",["univariate", "equation"]))*)
54.43 val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.44 val (p,_,f,nxt,_,pt) = me nxt p c pt;val (p,_,f,nxt,_,pt) = me nxt p c pt;
54.45 @@ -491,16 +491,16 @@
54.46 (*"sqrt (9 + 4 * x) = sqrt x + sqrt (5 + x)"
54.47 square_equation_left*)
54.48 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.49 -(*"9 + 4 * x = (sqrt x + sqrt (5 + x)) ^^^ 2"
54.50 +(*"9 + 4 * x = (sqrt x + sqrt (5 + x)) \<up> 2"
54.51 Test_simplify*)
54.52 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.53 -(*"9 + 4 * x = 5 + (2 * x + 2 * sqrt (x ^^^ 2 + 5 * x))"
54.54 +(*"9 + 4 * x = 5 + (2 * x + 2 * sqrt (x \<up> 2 + 5 * x))"
54.55 rearrange_assoc*)
54.56 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.57 -(*"9 + 4 * x = 5 + 2 * x + 2 * sqrt (x ^^^ 2 + 5 * x)"
54.58 +(*"9 + 4 * x = 5 + 2 * x + 2 * sqrt (x \<up> 2 + 5 * x)"
54.59 isolate_root*)
54.60 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.61 -(*"sqrt (x ^^^ 2 + 5 * x) = (5 + 2 * x + -1 * (9 + 4 * x)) / (-1 * 2)"
54.62 +(*"sqrt (x \<up> 2 + 5 * x) = (5 + 2 * x + -1 * (9 + 4 * x)) / (-1 * 2)"
54.63 Test_simplify*)
54.64 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.65 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.66 @@ -508,7 +508,7 @@
54.67 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.68 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.69 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.70 -(*"x ^^^ 2 + 5 * x + -1 * (4 + (x ^^^ 2 + 4 * x)) = 0"*)
54.71 +(*"x \<up> 2 + 5 * x + -1 * (4 + (x \<up> 2 + 4 * x)) = 0"*)
54.72 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.73 (*"-4 + x = 0"
54.74 val nxt =("Subproblem",Subproblem ("Test",["LINEAR", "univariate"...*)
54.75 @@ -571,7 +571,7 @@
54.76 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.77 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.78 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.79 -(*"9 + -1 * x ^^^ 2 = 0"
54.80 +(*"9 + -1 * x \<up> 2 = 0"
54.81 Subproblem ("Test",["plain_square", "univariate", "equation"]))*)
54.82 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.83 (*Model_Problem ["plain_square", "univariate", "equation"]*)
54.84 @@ -585,11 +585,11 @@
54.85 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.86 (*Apply_Method ("Test", "solve_plain_square")*)
54.87 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.88 -(*"9 + -1 * x ^^^ 2 = 0", nxt Rewrite_Set "isolate_bdv"*)
54.89 +(*"9 + -1 * x \<up> 2 = 0", nxt Rewrite_Set "isolate_bdv"*)
54.90 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.91 -(*"x ^^^ 2 = (0 + -1 * 9) / -1", nxt Rewrite_Set "Test_simplify"*)
54.92 +(*"x \<up> 2 = (0 + -1 * 9) / -1", nxt Rewrite_Set "Test_simplify"*)
54.93 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.94 -(*"x ^^^ 2 = 9", nxt Rewrite ("square_equality"*)
54.95 +(*"x \<up> 2 = 9", nxt Rewrite ("square_equality"*)
54.96 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.97 (*"x = sqrt 9 | x = -1 * sqrt 9", nxt Rewrite_Set "tval_rls"*)
54.98 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
54.99 @@ -780,4 +780,4 @@
54.100 Refine.refine fmz ["univariate", "equation", "test"];
54.101 M_Match.match_pbl fmz (Problem.from_store ["polynomial", "univariate", "equation", "test"]);
54.102
54.103 -===== copied here from OLDTESTS in case there is a Program ===^^^=============================*)
54.104 +===== copied here from OLDTESTS in case there is a Program === \<up> =============================*)
55.1 --- a/test/Tools/isac/Knowledge/rootrat.sml Mon Apr 19 20:44:18 2021 +0200
55.2 +++ b/test/Tools/isac/Knowledge/rootrat.sml Tue Apr 20 16:58:44 2021 +0200
55.3 @@ -25,9 +25,9 @@
55.4
55.5 val thy = @{theory RootRat};
55.6 val ctxt = Proof_Context.init_global thy;
55.7 -val ttt = (the o (parseNEW ctxt)) ("-1 * x = - (2 / 2) + sqrt ((2 / 2) ^^^ 2 - -8) |"^
55.8 - "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) ^^^ 2 - -8))");
55.9 -TermC.atomty t; (*!real ?by sqrt and ^^^?*)
55.10 +val ttt = (the o (parseNEW ctxt)) ("-1 * x = - (2 / 2) + sqrt ((2 / 2) \<up> 2 - -8) |"^
55.11 + "\nx = -1 * (- (2 / 2) + -1 * sqrt ((2 / 2) \<up> 2 - -8))");
55.12 +TermC.atomty t; (*!real ?by sqrt and \<up> ?*)
55.13
55.14 "--- val rls = calculate_Poly ---";
55.15 (*val rls = assoc_rls "calculate_Poly"; WAS ME_Isa: 'calculate_Poly' not in system
55.16 @@ -48,8 +48,8 @@
55.17
55.18 val SOME (t,asm) = rewrite_set_ thy true rls ttt;
55.19 if UnparseC.term t =
55.20 -"-1 * x = -1 + sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8) \<or>\nx = -1 * (-1 + -1 * sqrt (2 ^^^ 2 / 2 ^^^ 2 - -8))"
55.21 -(*"-1 * x = -1 + sqrt (1 ^^^ 2 - -8) | x = -1 * (-1 + -1 * sqrt (1 ^^^ 2 - -8))"*)
55.22 +"-1 * x = -1 + sqrt (2 \<up> 2 / 2 \<up> 2 - -8) \<or>\nx = -1 * (-1 + -1 * sqrt (2 \<up> 2 / 2 \<up> 2 - -8))"
55.23 +(*"-1 * x = -1 + sqrt (1 \<up> 2 - -8) | x = -1 * (-1 + -1 * sqrt (1 \<up> 2 - -8))"*)
55.24 then () else error "val rls = calculate_Rational goon";
55.25
55.26 "--- val rls = calculate_RootRat ---";
56.1 --- a/test/Tools/isac/Knowledge/rootrateq.sml Mon Apr 19 20:44:18 2021 +0200
56.2 +++ b/test/Tools/isac/Knowledge/rootrateq.sml Tue Apr 20 16:58:44 2021 +0200
56.3 @@ -27,7 +27,7 @@
56.4 "------------ tests on predicates -------------------------------";
56.5 "------------ tests on predicates -------------------------------";
56.6 "------------ tests on predicates -------------------------------";
56.7 -val t1 = (Thm.term_of o the o (TermC.parse thy)) "(-8 - sqrt(x) + x^^^2) is_rootRatAddTerm_in x";
56.8 +val t1 = (Thm.term_of o the o (TermC.parse thy)) "(-8 - sqrt(x) + x \<up> 2) is_rootRatAddTerm_in x";
56.9 val SOME (t,_) = rewrite_set_ @{theory "RootRatEq"} false RootRatEq_prls t1;
56.10 if (UnparseC.term t) = "False" then ()
56.11 else error "rootrateq.sml: diff.behav. 1 in is_rootRatAddTerm_in";
56.12 @@ -185,14 +185,14 @@
56.13 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.14 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.15 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.16 -(*^^^ 10 *)
56.17 +(* \<up> 10 *)
56.18 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.19 (*-> Subproblem ("RootEq", ["univariate", ...])*)
56.20 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.21 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.22 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.23 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.24 -(*^^^ 20 *)
56.25 +(* \<up> 20 *)
56.26 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.27
56.28 (*//------------------ ERROR check_elementwise: no set 1 + sqrt x = 3 -----------------------\\* )
56.29 @@ -201,14 +201,14 @@
56.30 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.31 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.32 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.33 -(*^^^ 30 *)
56.34 +(* \<up> 30 *)
56.35 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.36 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.37 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.38 (*-> Subproblem ("RootEq", ["univariate", ...])*)
56.39 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.40 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.41 -(*^^^ 40 *)
56.42 +(* \<up> 40 *)
56.43 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.44 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.45 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.46 @@ -245,13 +245,13 @@
56.47 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.48 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.49 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.50 -(*^^^ 10 *)
56.51 +(* \<up> 10 *)
56.52 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.53 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.54 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.55 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.56 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.57 -(*^^^ 20 *)
56.58 +(* \<up> 20 *)
56.59 (*//------------------ ERROR check_elementwise: no set 1 + sqrt x = 3 -----------------------\\* )
56.60 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.61 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.62 @@ -259,13 +259,13 @@
56.63 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.64 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.65 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.66 -(*^^^ 30 *)
56.67 +(* \<up> 30 *)
56.68 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.69 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.70 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.71 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.72 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.73 -(*^^^ 40 *)
56.74 +(* \<up> 40 *)
56.75 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.76 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.77 ( *\\------------------ ERROR check_elementwise: no set 1 + sqrt x = 3 -----------------------//*)
56.78 @@ -300,7 +300,7 @@
56.79 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.80 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.81 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.82 -(*^^^ 10 *)
56.83 +(* \<up> 10 *)
56.84 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.85 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.86 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.87 @@ -351,19 +351,19 @@
56.88 (*\\------------------ end ERROR check ------------------------------------------------------//*)
56.89
56.90 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.91 -(*^^^ 20 *)
56.92 +(* \<up> 20 *)
56.93 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.94 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.95 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.96 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.97 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.98 -(*^^^ 30 *)
56.99 +(* \<up> 30 *)
56.100 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.101 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.102 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.103 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.104 val (p,_,f,nxt,_,pt) = me nxt p c pt; val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.105 -(*^^^ 40 *)
56.106 +(* \<up> 40 *)
56.107 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56.108 ( *\\------------------ ERROR WN200211 1, 2 -------------------------------------------------//*)
56.109
57.1 --- a/test/Tools/isac/Knowledge/system.sml Mon Apr 19 20:44:18 2021 +0200
57.2 +++ b/test/Tools/isac/Knowledge/system.sml Tue Apr 20 16:58:44 2021 +0200
57.3 @@ -19,32 +19,32 @@
57.4 "----------- normalise system ------------------------------------";
57.5 "----------- normalise system ------------------------------------";
57.6 "----------- normalise system ------------------------------------";
57.7 -val t = TermC.str2term "[0 = c*0 + -1*q_0*(0^^^2 / 2) + c_2,\
57.8 - \ 0 = c*L + -1*q_0*(L^^^2 / 2) + c_2]";
57.9 +val t = TermC.str2term "[0 = c*0 + -1*q_0*(0 \<up> 2 / 2) + c_2,\
57.10 + \ 0 = c*L + -1*q_0*(L \<up> 2 / 2) + c_2]";
57.11 val SOME (t,_) = rewrite_set_ thy false norm_Poly t;
57.12 if UnparseC.term t =
57.13 -"[0 = -1 * q_0 * (0 / 2) + c_2, 0 = L * c + -1 * q_0 * (L ^^^ 2 / 2) + c_2]"
57.14 +"[0 = -1 * q_0 * (0 / 2) + c_2, 0 = L * c + -1 * q_0 * (L \<up> 2 / 2) + c_2]"
57.15 then () else error "system.sml, diff.behav. in norm_Poly";
57.16
57.17 -val t = TermC.str2term "[0 = c*0 + -1*q_0*(0^^^2 / 2) + c_2,\
57.18 - \ 0 = c*L + -1*q_0*(L^^^2 / 2) + c_2]";
57.19 +val t = TermC.str2term "[0 = c*0 + -1*q_0*(0 \<up> 2 / 2) + c_2,\
57.20 + \ 0 = c*L + -1*q_0*(L \<up> 2 / 2) + c_2]";
57.21 val SOME (t,_) = rewrite_set_ thy false norm_Rational t;
57.22 if UnparseC.term t =
57.23 -"[0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L ^^^ 2 * q_0) / 2]"
57.24 +"[0 = c_2, 0 = (2 * c_2 + 2 * L * c + -1 * L \<up> 2 * q_0) / 2]"
57.25 then () else error "system.sml, diff.behav. in norm_Rational";
57.26
57.27
57.28 -val t = TermC.str2term "nth_ 1 [0 = c*0 + -1*q_0*(0^^^2 / 2) + c_2,\
57.29 - \ 0 = c*L + -1*q_0*(L^^^2 / 2) + c_2]";
57.30 +val t = TermC.str2term "nth_ 1 [0 = c*0 + -1*q_0*(0 \<up> 2 / 2) + c_2,\
57.31 + \ 0 = c*L + -1*q_0*(L \<up> 2 / 2) + c_2]";
57.32 val SOME (t,_) = rewrite_set_ thy false prog_expr t;
57.33 -if UnparseC.term t = "0 = c * 0 + -1 * q_0 * (0 ^^^ 2 / 2) + c_2"
57.34 +if UnparseC.term t = "0 = c * 0 + -1 * q_0 * (0 \<up> 2 / 2) + c_2"
57.35 then () else error "system.sml, prog_expr";
57.36
57.37
57.38 "----------- me --------------------------------------------------";
57.39 "----------- me --------------------------------------------------";
57.40 "----------- me --------------------------------------------------";
57.41 -val fmz = ["equalities [0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2, 0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2]",
57.42 +val fmz = ["equalities [0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 \<up> 2, 0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2]",
57.43 "solveForVars [c, c_2]", "solution ss___"];
57.44 val (dI',pI',mI') =
57.45 ("Biegelinie",["normalise", "2x2", "LINEAR", "system"],
58.1 --- a/test/Tools/isac/MathEngBasic/ctree.sml Mon Apr 19 20:44:18 2021 +0200
58.2 +++ b/test/Tools/isac/MathEngBasic/ctree.sml Tue Apr 20 16:58:44 2021 +0200
58.3 @@ -696,7 +696,7 @@
58.4 "=====new ctree 4: crooked by cut_level_'_ =======================";
58.5 reset_states ();
58.6 CalcTree
58.7 -[(["equality (x/(x^2 - 6*x+9) - 1/(x^2 - 3*x) =1/x)",
58.8 +[(["equality (x/(x \<up> 2 - 6*x+9) - 1/(x \<up> 2 - 3*x) =1/x)",
58.9 "solveFor x", "solutions L"],
58.10 ("RatEq",["univariate", "equation"],["no_met"]))];
58.11 Iterator 1; moveActiveRoot 1;
58.12 @@ -886,21 +886,21 @@
58.13 "-------------- ME_Misc.pt_extract form, tac, asm<>[] --------------------";
58.14 val (Form form, SOME tac, asm) = ME_Misc.pt_extract (pt, ([3], Res));
58.15 case (UnparseC.term form, tac, UnparseC.terms_to_strings asm) of
58.16 - ("(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)",
58.17 + ("(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)",
58.18 Subproblem
58.19 ("PolyEq",
58.20 ["normalise", "polynomial", "univariate", "equation"]),
58.21 - ["x \<noteq> 0", "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"]) => ()
58.22 + ["x \<noteq> 0", "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"]) => ()
58.23 | _ => error "diff.behav.in ctree.sml: ME_Misc.pt_extract asm<>[]";
58.24 (*WN060717 unintentionally changed some rls/ord while
58.25 completing knowl. for thes2file...
58.26
58.27 case (UnparseC.term form, tac, UnparseC.terms_to_strings asm) of
58.28 - ((*"(3 + (-1 * x + x ^^^ 2)) * x = 1 * (9 * x + (x ^^^ 3 + -6 * x ^^^ 2))",
58.29 + ((*"(3 + (-1 * x + x \<up> 2)) * x = 1 * (9 * x + (x \<up> 3 + -6 * x \<up> 2))",
58.30 *)Subproblem
58.31 ("PolyEq",
58.32 ["normalise", "polynomial", "univariate", "equation"]),
58.33 - ["9 * x + (x ^^^ 3 + -6 * x ^^^ 2) ~= 0"]) => ()
58.34 + ["9 * x + (x \<up> 3 + -6 * x \<up> 2) ~= 0"]) => ()
58.35 | _ => error "diff.behav.in ctree.sml: ME_Misc.pt_extract asm<>[]";
58.36
58.37 .... but it became even better*)
59.1 --- a/test/Tools/isac/MathEngBasic/mstools.sml Mon Apr 19 20:44:18 2021 +0200
59.2 +++ b/test/Tools/isac/MathEngBasic/mstools.sml Tue Apr 20 16:58:44 2021 +0200
59.3 @@ -32,9 +32,9 @@
59.4 > val t = TermC.str2term "valuesFor [a,b]";
59.5 > val (d,ts) = Input_Descript.split thy t; Input_Descript.join thy (d,ts);
59.6 "valuesFor [a, b]"
59.7 -> val t = TermC.str2term "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]";
59.8 +> val t = TermC.str2term "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]";
59.9 > val (d,ts) = Input_Descript.split thy t; Input_Descript.join thy (d,ts);
59.10 -relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]"
59.11 +relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]"
59.12 > val t = TermC.str2term "boundVariable a";
59.13 > val (d,ts) = Input_Descript.split thy t; Input_Descript.join thy (d,ts);
59.14 "boundVariable a"
59.15 @@ -78,7 +78,7 @@
59.16 "----------- type penv -------------------------------------------------------------------------";
59.17 (*
59.18 val e_ = (Thm.term_of o the o (TermC.parse thy)) "e_::bool";
59.19 - val ev = (Thm.term_of o the o (TermC.parse thy)) "#4 + #3 * x^^^#2 = #0";
59.20 + val ev = (Thm.term_of o the o (TermC.parse thy)) "#4 + #3 * x \<up> #2 = #0";
59.21 val v_ = (Thm.term_of o the o (TermC.parse thy)) "v_";
59.22 val vv = (Thm.term_of o the o (TermC.parse thy)) "x";
59.23 val r_ = (Thm.term_of o the o (TermC.parse thy)) "err_::bool";
60.1 --- a/test/Tools/isac/MathEngBasic/rewrite.sml Mon Apr 19 20:44:18 2021 +0200
60.2 +++ b/test/Tools/isac/MathEngBasic/rewrite.sml Tue Apr 20 16:58:44 2021 +0200
60.3 @@ -185,7 +185,7 @@
60.4 [Const ("HOL.Not", _) $ (Const ("HOL.eq", _)
60.5 $ Free ("x", _) $ Const ("Groups.zero_class.zero", _))] => ()
60.6 | _ => error "rewrite.sml assumption changed";
60.7 -"=====^^^ make asms without Trueprop ---^^^";
60.8 +"===== \<up> make asms without Trueprop --- \<up> ";
60.9 "----- step 4: get the (instantiated) RHS";
60.10 val t' = (snd o HOLogic.dest_eq o HOLogic.dest_Trueprop
60.11 o Logic.strip_imp_concl) r';
60.12 @@ -197,7 +197,7 @@
60.13 "----- step 0: args for rewrite_terms_, local fun";
60.14 val (thy, ord, erls, equs, t) =
60.15 (@{theory "Biegelinie"}, dummy_ord, Rule_Set.Empty, [TermC.str2term "x = 0"],
60.16 - TermC.str2term "M_b x = -1 * q_0 * x ^^^ 2 / 2 + x * c + c_2");
60.17 + TermC.str2term "M_b x = -1 * q_0 * x \<up> 2 / 2 + x * c + c_2");
60.18 "----- step 1: args for rew_";
60.19 val ((t', asm'), (rules as r::rs), t) = ((TermC.empty, []), equs, t);
60.20 "----- step 2: rew_sub";
60.21 @@ -207,21 +207,21 @@
60.22
60.23 val SOME (t', _) = rewrite_terms_ thy dummy_ord Rule_Set.Empty equs t;
60.24 writeln "----------- rewrite_terms_ 1---------------------------";
60.25 -if UnparseC.term t' = "M_b 0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then ()
60.26 +if UnparseC.term t' = "M_b 0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2" then ()
60.27 else error "rewrite.sml rewrite_terms_ [x = 0]";
60.28
60.29 val equs = [TermC.str2term "M_b 0 = 0"];
60.30 -val t = TermC.str2term "M_b 0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2";
60.31 +val t = TermC.str2term "M_b 0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2";
60.32 val SOME (t', _) = rewrite_terms_ thy dummy_ord Rule_Set.Empty equs t;
60.33 writeln "----------- rewrite_terms_ 2---------------------------";
60.34 -if UnparseC.term t' = "0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then ()
60.35 +if UnparseC.term t' = "0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2" then ()
60.36 else error "rewrite.sml rewrite_terms_ [M_b 0 = 0]";
60.37
60.38 val equs = [TermC.str2term "x = 0", TermC.str2term"M_b 0 = 0"];
60.39 -val t = TermC.str2term "M_b x = -1 * q_0 * x ^^^ 2 / 2 + x * c + c_2";
60.40 +val t = TermC.str2term "M_b x = -1 * q_0 * x \<up> 2 / 2 + x * c + c_2";
60.41 val SOME (t', _) = rewrite_terms_ thy dummy_ord Rule_Set.Empty equs t;
60.42 writeln "----------- rewrite_terms_ 3---------------------------";
60.43 -if UnparseC.term t' = "0 = -1 * q_0 * 0 ^^^ 2 / 2 + 0 * c + c_2" then ()
60.44 +if UnparseC.term t' = "0 = -1 * q_0 * 0 \<up> 2 / 2 + 0 * c + c_2" then ()
60.45 else error "rewrite.sml rewrite_terms_ [x = 0, M_b 0 = 0]";
60.46
60.47
60.48 @@ -229,7 +229,7 @@
60.49 "----------- rewrite_inst_ bdvs -------------------------";
60.50 "----------- rewrite_inst_ bdvs -------------------------";
60.51 (*see smltest/Scripts/term_G.sml: inst_bdv 2*)
60.52 -val t = TermC.str2term"-1 * (q_0 * L ^^^ 2) / 2 + (L * c_3 + c_4) = 0";
60.53 +val t = TermC.str2term"-1 * (q_0 * L \<up> 2) / 2 + (L * c_3 + c_4) = 0";
60.54 val bdvs = [(TermC.str2term"bdv_1",TermC.str2term"c"),
60.55 (TermC.str2term"bdv_2",TermC.str2term"c_2"),
60.56 (TermC.str2term"bdv_3",TermC.str2term"c_3"),
60.57 @@ -244,7 +244,7 @@
60.58 ])
60.59 false bdvs (ThmC.numerals_to_Free @{separate_bdvs_add) t;
60.60 (writeln o UnparseC.term) t;
60.61 -if UnparseC.term t = "L * c_3 + c_4 = 0 + -1 * (-1 * (q_0 * L ^^^ 2) / 2)"
60.62 +if UnparseC.term t = "L * c_3 + c_4 = 0 + -1 * (-1 * (q_0 * L \<up> 2) / 2)"
60.63 then () else error "rewrite.sml rewrite_inst_ bdvs";
60.64 > Rewrite.trace_on:=true;
60.65 Rewrite.trace_on:=false;--------------------------------------------*)
60.66 @@ -255,55 +255,55 @@
60.67 "----------- check diff 2002--2009-3 --------------------";
60.68 (*----- 2002 -------------------------------------------------------------------
60.69 # rls: norm_Rational_noadd_fractions on: 1 / EI * (L * q_0 * x / 2 + -1 *
60.70 -q_0 * x ^^^ 2 / 2)
60.71 -## rls: discard_minus_ on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2
60.72 +q_0 * x \<up> 2 / 2)
60.73 +## rls: discard_minus_ on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2
60.74 / 2)
60.75 ### try thm: real_diff_minus
60.76 ### try thm: sym_real_mult_minus1
60.77 -## rls: rat_mult_poly on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2
60.78 +## rls: rat_mult_poly on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2
60.79 / 2)
60.80 ### try thm: rat_mult_poly_l
60.81 ### try thm: rat_mult_poly_r
60.82 -#### eval asms: L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2 is_polyexp
60.83 -==> 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2) =
60.84 - 1 * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2) / EI
60.85 -##### rls: Rule_Set.empty-is_polyexp on: L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2
60.86 +#### eval asms: L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2 is_polyexp
60.87 +==> 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2) =
60.88 + 1 * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2) / EI
60.89 +##### rls: Rule_Set.empty-is_polyexp on: L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2
60.90 is_polyexp
60.91 ###### try calc: Poly.is'_polyexp'
60.92 ====== calc. to: False
60.93 ###### try calc: Poly.is'_polyexp'
60.94 ###### try calc: Poly.is'_polyexp'
60.95 -#### asms false: ["L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2 is_polyexp"]
60.96 +#### asms false: ["L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2 is_polyexp"]
60.97 ----- 2002 NONE rewrite --------------------------------------------------------
60.98 ----- 2009 should maintain this behaviour, but: --------------------------------
60.99 -# rls: norm_Rational_noadd_fractions on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)
60.100 -## rls: discard_minus on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)
60.101 +# rls: norm_Rational_noadd_fractions on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)
60.102 +## rls: discard_minus on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)
60.103 ### try thm: real_diff_minus
60.104 ### try thm: sym_real_mult_minus1
60.105 -## rls: rat_mult_poly on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)
60.106 +## rls: rat_mult_poly on: 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)
60.107 ### try thm: rat_mult_poly_l
60.108 ### try thm: rat_mult_poly_r
60.109 -#### eval asms: L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2 is_polyexp
60.110 -==> 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2) =
60.111 - 1 * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2) / EI
60.112 -##### rls: Rule_Set.empty-is_polyexp on: L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2 is_polyexp
60.113 +#### eval asms: L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2 is_polyexp
60.114 +==> 1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2) =
60.115 + 1 * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2) / EI
60.116 +##### rls: Rule_Set.empty-is_polyexp on: L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2 is_polyexp
60.117 ###### try calc: Poly.is'_polyexp'
60.118 ====== calc. to: False
60.119 ###### try calc: Poly.is'_polyexp'
60.120 ###### try calc: Poly.is'_polyexp'
60.121 -#### asms accepted: ["L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2 is_polyexp"] stored: ["False"]
60.122 -=== rewrites to: 1 * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2) / EI
60.123 +#### asms accepted: ["L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2 is_polyexp"] stored: ["False"]
60.124 +=== rewrites to: 1 * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2) / EI
60.125 ----- 2009 -------------------------------------------------------------------*)
60.126
60.127 (*the situation as was before repair (asm without Trueprop) is outcommented*)
60.128 val thy = @{theory "Isac_Knowledge"};
60.129 "===== example which raised the problem =================";
60.130 -val t = @{term "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)"};
60.131 +val t = @{term "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)"};
60.132 "----- rewrite_set_inst_ norm_Rational_noadd_fractions--";
60.133 val subs = [(@{term "bdv"}, @{term "x"})];
60.134 val rls = norm_Rational_noadd_fractions;
60.135 val SOME (t', asms) = rewrite_set_inst_ thy true subs rls t;
60.136 -if UnparseC.term t' = "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * 1 * x ^^^ 2 / 2)" andalso
60.137 +if UnparseC.term t' = "1 / EI * (L * q_0 * x / 2 + -1 * q_0 * 1 * x \<up> 2 / 2)" andalso
60.138 UnparseC.terms asms = "[]" then {}
60.139 else error "this was NONE with Isabelle2013-2 ?!?"
60.140 "----- rewrite_ rat_mult_poly_r--------------------------";
60.141 @@ -317,16 +317,16 @@
60.142 val (t''', _, _, _) = rew_sub thy 0 [] dummy_ord erls true [] (Thm.prop_of thm) t;
60.143 (*t'' = t'''; (*true*)*)
60.144 "----- rewrite_set_ erls --------------------------------";
60.145 -val cond = @{term "(L * q_0 * x / 2 + -1 * q_0 * x ^^^ 2 / 2)"};
60.146 +val cond = @{term "(L * q_0 * x / 2 + -1 * q_0 * x \<up> 2 / 2)"};
60.147 val NONE = rewrite_set_ thy true erls cond;
60.148 -(* ^^^^^ goes with '====== calc. to: False' above from beginning*)
60.149 +(* \<up> ^^ goes with '====== calc. to: False' above from beginning*)
60.150
60.151 writeln "===== maximally simplified example =====================";
60.152 -val t = @{term "a / b * (x / x ^^^ 2)"};
60.153 +val t = @{term "a / b * (x / x \<up> 2)"};
60.154 "?c::real is_polyexp ==> (?a::real) / (?b::real) * ?c = ?a * ?c / ?b";
60.155 writeln "----- rewrite_set_inst_ norm_Rational_noadd_fractions--";
60.156 val (*NONE*) SOME (t', asm) = rewrite_set_inst_ thy true subs rls t;
60.157 -UnparseC.term t' = "a * x / (b * x ^^^ 2)"; (*rew. by thm outside test case*)
60.158 +UnparseC.term t' = "a * x / (b * x \<up> 2)"; (*rew. by thm outside test case*)
60.159 (*checked visually: Rewrite.trace_on looks like above for 2009*)
60.160
60.161 writeln "----- rewrite_ rat_mult_poly_r--------------------------";
60.162 @@ -336,9 +336,9 @@
60.163 val (t''', _, _, _) = rew_sub thy 0 [] dummy_ord erls true [] (Thm.prop_of thm) t;
60.164 (*t'' = t'''; (*true*)*)
60.165 writeln "----- rewrite_set_ erls --------------------------------";
60.166 -val cond = @{term "(x / x ^^^ 2)"};
60.167 +val cond = @{term "(x / x \<up> 2)"};
60.168 val NONE = rewrite_set_ thy true erls cond;
60.169 -(* ^^^^^ goes with '====== calc. to: False' above from beginning*)
60.170 +(* \<up> ^^ goes with '====== calc. to: False' above from beginning*)
60.171
60.172
60.173 "----------- compare all prepat's existing 2010 ---------";
60.174 @@ -390,7 +390,7 @@
60.175 "===== Poly.thy: order_mult_ ===";
60.176 (* ?p matched with the current term gives an environment,
60.177 which evaluates (the instantiated) "p is_multUnordered" to true*)
60.178 -val t = TermC.str2term "x^^^2 * x";
60.179 +val t = TermC.str2term "x \<up> 2 * x";
60.180 val pat = TermC.parse_patt thy "?p :: real"
60.181 val pres = [TermC.parse_patt thy "?p is_multUnordered"];
60.182 val prepat = [(pres, pat)];
60.183 @@ -400,7 +400,7 @@
60.184
60.185 val subst = Pattern.match thy (pat, t) (Vartab.empty, Vartab.empty);
60.186 val asms = map (Envir.subst_term subst) pres;
60.187 -if UnparseC.terms asms = "[\"x ^^^ 2 * x is_multUnordered\"]"
60.188 +if UnparseC.terms asms = "[\"x \<up> 2 * x is_multUnordered\"]"
60.189 then () else error "rewrite.sml: prepat order_mult_ subst";
60.190 if ([], true) = eval__true thy 0 asms [] erls
60.191 then () else error "rewrite.sml: prepat order_mult_ eval__true";
60.192 @@ -409,10 +409,10 @@
60.193 "----------- fun app_rev, Rrls, -------------------------";
60.194 "----------- fun app_rev, Rrls, -------------------------";
60.195 "----------- fun app_rev, Rrls, -------------------------";
60.196 -val t = TermC.str2term "x^^^2 * x";
60.197 +val t = TermC.str2term "x \<up> 2 * x";
60.198
60.199 if is_multUnordered t then () else error "rewrite.sml diff. is_multUnordered 2";
60.200 -val tm = TermC.str2term "(x^^^2 * x) is_multUnordered";
60.201 +val tm = TermC.str2term "(x \<up> 2 * x) is_multUnordered";
60.202 eval_is_multUnordered "testid" "" tm thy;
60.203
60.204 case eval_is_multUnordered "testid" "" tm thy of
60.205 @@ -422,10 +422,10 @@
60.206 Const ("HOL.True", _))) => ()
60.207 | _ => error "rewrite.sml diff. eval_is_multUnordered 2b";
60.208
60.209 -tracing "----- begin rewrite x^^^2 * x ---"; Rewrite.trace_on := false;
60.210 +tracing "----- begin rewrite x \<up> 2 * x ---"; Rewrite.trace_on := false;
60.211 val SOME (t', _) = rewrite_set_ thy true order_mult_ t;
60.212 -tracing "----- end rewrite x^^^2 * x ---"; Rewrite.trace_on := false;
60.213 -if UnparseC.term t' = "x * x ^^^ 2" then ()
60.214 +tracing "----- end rewrite x \<up> 2 * x ---"; Rewrite.trace_on := false;
60.215 +if UnparseC.term t' = "x * x \<up> 2" then ()
60.216 else error "rewrite.sml Poly.is'_multUnordered doesn't work";
60.217
60.218 (* for achieving the previous result, the following code was taken apart *)
60.219 @@ -479,7 +479,7 @@
60.220 tracing "=== poly.sml: scan_ chk prepat end";
60.221
60.222 "----- chk ---";
60.223 -(*reestablish...*) val t = TermC.str2term "x ^^^ 2 * x";
60.224 +(*reestablish...*) val t = TermC.str2term "x \<up> 2 * x";
60.225 val [(pres, pat)] = prepat;
60.226 val subst: Type.tyenv * Envir.tenv =
60.227 Pattern.match thy (pat, t)
60.228 @@ -488,10 +488,10 @@
60.229 (*fixme: asms = ["p is_multUnordered"]...instantiate*)
60.230 "----- eval__true ---";
60.231 val asms = (map (Envir.subst_term subst) pres);
60.232 -if UnparseC.terms asms = "[\"x ^^^ 2 * x is_multUnordered\"]" then ()
60.233 +if UnparseC.terms asms = "[\"x \<up> 2 * x is_multUnordered\"]" then ()
60.234 else error "rewrite.sml: diff. is_multUnordered, asms";
60.235 val (thy, i, asms, bdv, rls) =
60.236 - (thy, (i+1), [TermC.str2term "(x^^^2 * x) is_multUnordered"],
60.237 + (thy, (i+1), [TermC.str2term "(x \<up> 2 * x) is_multUnordered"],
60.238 [] : (term * term) list, erls);
60.239 case eval__true thy i asms bdv rls of
60.240 ([], true) => ()
60.241 @@ -514,7 +514,7 @@
60.242 "----------- fun rewrite_set_ .. RatEq_eliminate step into to fun chk --------------------------";
60.243 val thy = @{theory RatEq};
60.244 val ctxt = Proof_Context.init_global thy;
60.245 -val SOME t = parseNEW ctxt "(3 + -1 * x + x ^^^ 2) / (9 * x + -6 * x ^^^ 2 + x ^^^ 3) = 1 / x";
60.246 +val SOME t = parseNEW ctxt "(3 + -1 * x + x \<up> 2) / (9 * x + -6 * x \<up> 2 + x \<up> 3) = 1 / x";
60.247 val rls = assoc_rls "RatEq_eliminate"
60.248
60.249 val SOME (t''''', asm''''') =
60.250 @@ -599,22 +599,22 @@
60.251 val r' = Envir.subst_term (Pattern.match thy (lhs, t) (Vartab.empty, Vartab.empty)) r
60.252 ;
60.253 (*+*)if UnparseC.term r' =
60.254 -(*+*) "\<lbrakk>9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0; x \<noteq> 0\<rbrakk>\n" ^
60.255 -(*+*) "\<Longrightarrow> ((3 + -1 * x + x ^^^ 2) /\n" ^
60.256 -(*+*) " (9 * x + -6 * x ^^^ 2 + x ^^^ 3) =\n" ^
60.257 +(*+*) "\<lbrakk>9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0; x \<noteq> 0\<rbrakk>\n" ^
60.258 +(*+*) "\<Longrightarrow> ((3 + -1 * x + x \<up> 2) /\n" ^
60.259 +(*+*) " (9 * x + -6 * x \<up> 2 + x \<up> 3) =\n" ^
60.260 (*+*) " 1 / x) =\n" ^
60.261 -(*+*) " ((3 + -1 * x + x ^^^ 2) * x =\n" ^
60.262 -(*+*) " 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3))"
60.263 +(*+*) " ((3 + -1 * x + x \<up> 2) * x =\n" ^
60.264 +(*+*) " 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3))"
60.265 (*+*)then () else error "instantiated rule CHANGED";
60.266
60.267 val p' = map HOLogic.dest_Trueprop ((fst o Logic.strip_prems) (Logic.count_prems r', [], r'))
60.268 ;
60.269 -(*+*)if map UnparseC.term p' = ["x \<noteq> 0", "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"]
60.270 +(*+*)if map UnparseC.term p' = ["x \<noteq> 0", "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"]
60.271 (*+*)then () else error "stored assumptions CHANGED";
60.272
60.273 val t' = (snd o HOLogic.dest_eq o HOLogic.dest_Trueprop o Logic.strip_imp_concl) r'
60.274 ;
60.275 -(*+*)if UnparseC.term t' = "(3 + -1 * x + x ^^^ 2) * x = 1 * (9 * x + -6 * x ^^^ 2 + x ^^^ 3)"
60.276 +(*+*)if UnparseC.term t' = "(3 + -1 * x + x \<up> 2) * x = 1 * (9 * x + -6 * x \<up> 2 + x \<up> 3)"
60.277 (*+*)then () else error "rewritten term (an equality) CHANGED";
60.278
60.279 val (simpl_p', nofalse) =
60.280 @@ -622,7 +622,7 @@
60.281 "~~~~~ and eval__true , args:"; val (thy, i, asms, bdv, rls) = (thy, (i + 1), p', bdv, rls);
60.282 (*if*) asms = [@{term True}] orelse asms = [] (*else*);
60.283
60.284 -(*+*)if map UnparseC.term asms = ["x \<noteq> 0", "9 * x + -6 * x ^^^ 2 + x ^^^ 3 \<noteq> 0"]
60.285 +(*+*)if map UnparseC.term asms = ["x \<noteq> 0", "9 * x + -6 * x \<up> 2 + x \<up> 3 \<noteq> 0"]
60.286 (*+*)then () else error "asms before chk CHANGED";
60.287
60.288 fun chk indets [] = (indets, true) (*return asms<>True until false*)
60.289 @@ -632,7 +632,7 @@
60.290 | SOME (t, a') =>
60.291 if t = @{term True} then (chk (indets @ a') asms)
60.292 else if t = @{term False} then ([], false)
60.293 - (*asm false .. thm not applied ^^^; continue until False vvv*)
60.294 + (*asm false .. thm not applied \<up> ; continue until False vvv*)
60.295 else chk (indets @ [t] @ a') asms);
60.296
60.297 val (xxx, true) =
61.1 --- a/test/Tools/isac/MathEngine/detail-step.sml Mon Apr 19 20:44:18 2021 +0200
61.2 +++ b/test/Tools/isac/MathEngine/detail-step.sml Tue Apr 20 16:58:44 2021 +0200
61.3 @@ -51,6 +51,6 @@
61.4 autoCalculate 1 CompleteCalc;
61.5 val ((pt,p),_) = get_calc 1; Test_Tool.show_pt pt;
61.6 val (Form t,_,_) = ME_Misc.pt_extract (pt, p); UnparseC.term t;
61.7 -if existpt' ([3], Res) pt andalso UnparseC.term t = "c + x + 1 / 3 * x ^^^ 3" then ()
61.8 +if existpt' ([3], Res) pt andalso UnparseC.term t = "c + x + 1 / 3 * x \<up> 3" then ()
61.9 else error "integrate.sml: test-script doesnt work";
61.10
62.1 --- a/test/Tools/isac/MathEngine/mathengine-stateless.sml Mon Apr 19 20:44:18 2021 +0200
62.2 +++ b/test/Tools/isac/MathEngine/mathengine-stateless.sml Tue Apr 20 16:58:44 2021 +0200
62.3 @@ -25,7 +25,7 @@
62.4 "----------- change to TermC.parse ctxt -----------------------";
62.5 "----------- change to TermC.parse ctxt -----------------------";
62.6 "===== start calculation: from problem description (fmz) to origin";
62.7 -val fmz = ["realTestGiven (((1+2)*4/3)^^^2)", "realTestFind s"];
62.8 +val fmz = ["realTestGiven (((1+2)*4/3) \<up> 2)", "realTestFind s"];
62.9 val (thyID, pblID, metID) =
62.10 ("Test", ["calculate", "test"], ["Test", "test_calculate"]);
62.11 (*======= Isabelle2013-2 --> Isabelle2014: unclear, why this test ever run =====================*)
62.12 @@ -83,7 +83,7 @@
62.13 "--------- search for Or_to_List ------------------------";
62.14 "--------- search for Or_to_List ------------------------";
62.15 "--------- search for Or_to_List ------------------------";
62.16 -val fmz = ["equality (x^^^2 + 4*x + 5 = (2::real))", "solveFor x", "solutions L"];
62.17 +val fmz = ["equality (x \<up> 2 + 4*x + 5 = (2::real))", "solveFor x", "solutions L"];
62.18 val (dI',pI',mI') = ("Isac_Knowledge", ["univariate", "equation"], ["no_met"])
62.19 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
62.20 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
62.21 @@ -191,13 +191,13 @@
62.22 (not o is_interpos) ip = false;
62.23 val ip' = lev_pred' pt ip;
62.24 "~~~~~ fun go, args:"; val (pt, (pos as (p,p_):pos')) = (pt, ip);
62.25 -(* ^^^^^^^^^ not in test/../ *)
62.26 +(* \<up> \<up> \<up> not in test/../ *)
62.27 val nd = get_nd pt p
62.28 val cn = children nd;
62.29 null cn = false;
62.30 (is_rewset o (get_obj g_tac nd)) [(*root of nd*)] = true;
62.31 "~~~~~ fun detailrls, args:"; val (pt, (pos as (p,p_):pos')) = (pt, pos);
62.32 -(* ^^^^^^^^^ only once in test/../solve.sml*)
62.33 +(* \<up> \<up> \<up> only once in test/../solve.sml*)
62.34 val t = get_obj g_form pt p
62.35 val tac = get_obj g_tac pt p
62.36 val rls = (assoc_rls o rls_of) tac
62.37 @@ -211,16 +211,16 @@
62.38 val thy = ThyC.get_theory "Isac_Knowledge"
62.39 val (_,_,_,pt') = (*implicit Take*)Step.add tac_ (is, ctxt) (pt, pos');
62.40 (*val (_,_,(pt'',_)) = *)complete_solve CompleteSubpbl [] (pt',pos');
62.41 - (* ^^^^^^^^^^^^^^ in test/../mathengine.sml*)
62.42 + (* \<up> \<up> \<up> \<up> ^^ in test/../mathengine.sml*)
62.43 (* in pt'': tac = Rewrite ("rnorm_equation_add", "Test.rnorm_equation_add")},
62.44 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
62.45 + \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> *)
62.46 "~~~~~ fun complete_solve , args:"; val (auto, c, (ptp as (_, p as (_,p_)): ctree * pos')) =
62.47 (CompleteSubpbl, [], (pt',pos'));
62.48 p = ([], Res) = false;
62.49 member op = [Pbl,Met] p_ = false;
62.50 val (_, (_, c', ptp')) = Step_Solve.do_next ptp;
62.51 (* in pt': tac = Rewrite ("rnorm_equation_add", "Test.rnorm_equation_add")},
62.52 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
62.53 + \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> *)
62.54 "~~~~~ fun do_next , args:"; val ((ptp as (pt, pos as (p,p_)))) = (ptp);
62.55 MethodC.id_empty = get_obj g_metID pt (par_pblobj pt p) = false;
62.56 val thy' = get_obj g_domID pt (par_pblobj pt p);
62.57 @@ -251,13 +251,13 @@
62.58 | _ => pos;
62.59 Step.add tac_ is pos pt;
62.60 (* tac = Rewrite ("rnorm_equation_add", "Test.rnorm_equation_add")},
62.61 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
62.62 + \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> *)
62.63 "~~~~~ fun add, args:"; val (thy, (Rewrite' (thy',ord',rls',pa,thm',f,(f',asm))),
62.64 (is, ctxt), (p,p_), pt) = ((ThyC.get_theory "Isac_Knowledge"), tac_, is, pos, pt);
62.65 val (pt,c) = cappend_atomic pt p (is, ContextC.insert_assumptions asm ctxt) f
62.66 (Rewrite thm') (f',asm) Complete;
62.67 (* in pt: tac = Rewrite ("rnorm_equation_add", "Test.rnorm_equation_add")},
62.68 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
62.69 + \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> *)
62.70 "~~~~~ fun cappend_atomic, args:"; val (pt, p, ist_res, f, r, f', s) =
62.71 (pt, p, (is, ContextC.insert_assumptions asm ctxt), f, (Rewrite thm'), (f',asm), Complete);
62.72 existpt p pt andalso Tactic.is_empty (get_obj g_tac pt p) = false;
62.73 @@ -280,7 +280,7 @@
62.74 (UnparseC.term o Thm.prop_of) form = "~ ?b =!= 0 ==> (?a = ?b) = (?a + -1 * ?b = 0)"
62.75 (*?!? should be "\<not> ?b =!= 0 \<Longrightarrow> (?a = ?b) = (?a + -1 * ?b = 0)"*)
62.76 (*thmstr2xml (j+i) form;
62.77 -ERROR Undeclared constant: "Test.rnorm_equation_add" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
62.78 +ERROR Undeclared constant: "Test.rnorm_equation_add" \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^*)
62.79 ;
62.80 Test_Tool.show_pt pt;
62.81 (*[
63.1 --- a/test/Tools/isac/MathEngine/solve.sml Mon Apr 19 20:44:18 2021 +0200
63.2 +++ b/test/Tools/isac/MathEngine/solve.sml Tue Apr 20 16:58:44 2021 +0200
63.3 @@ -20,7 +20,7 @@
63.4 "-------- cancel, detail rev-rew (cancel) afterwards ----------";
63.5 "-------------- cancel_p, without detail ------------------------------";
63.6 "-------------- cancel_p, detail rev-rew (cancel) afterwards ----------";
63.7 -(*---^^^ NOT working*)
63.8 +(*--- \<up> NOT working*)
63.9 "on 'miniscript with mini-subpbl':";
63.10 "------ interSteps'donesteps': on 'miniscript with mini-subpbl'---";
63.11 "------ interSteps'detailrls' after CompleteCalc -----------------";
63.12 @@ -38,7 +38,7 @@
63.13 "--------- interSteps on norm_Rational ---------------------------";
63.14 "--------- interSteps on norm_Rational ---------------------------";
63.15 reset_states (); (*exp_IsacCore_Simp_Rat_Double_No-7.xml*)
63.16 -CalcTree [(["Term ((2/(x+3) + 2/(x - 3)) / (8*x/(x^2 - 9)))", "normalform N"],
63.17 +CalcTree [(["Term ((2/(x+3) + 2/(x - 3)) / (8*x/(x \<up> 2 - 9)))", "normalform N"],
63.18 ("Rational", ["rational", "simplification"], ["simplification", "of_rationals"]))];
63.19 moveActiveRoot 1;
63.20 autoCalculate 1 CompleteCalc;
64.1 --- a/test/Tools/isac/MathEngine/states.sml Mon Apr 19 20:44:18 2021 +0200
64.2 +++ b/test/Tools/isac/MathEngine/states.sml Tue Apr 20 16:58:44 2021 +0200
64.3 @@ -43,8 +43,8 @@
64.4 val ((pt, p), _) = get_calc i; (*retrieve result, e.g. no.1*)
64.5 in
64.6 if p = ([], Res) andalso UnparseC.term (get_obj g_res pt (fst p)) =(*check result correct*)
64.7 - "y x =\n-6 * q_0 * L ^^^ 2 / (-24 * EI) * x ^^^ 2 +\n4 * L * q_0 / " ^
64.8 - "(-24 * EI) * x ^^^ 3 +\n-1 * q_0 / (-24 * EI) * x ^^^ 4"
64.9 + "y x =\n-6 * q_0 * L \<up> 2 / (-24 * EI) * x \<up> 2 +\n4 * L * q_0 / " ^
64.10 + "(-24 * EI) * x \<up> 3 +\n-1 * q_0 / (-24 * EI) * x \<up> 4"
64.11 then ()
64.12 (* else error "biegelinie.sml: diff.behav.7.70 with autoCalculate"
64.13 POSTPONE THE FIX OF THIS ERROR TO test/../Knowledge/biegelinie.sml*)
65.1 --- a/test/Tools/isac/MathEngine/step.sml Mon Apr 19 20:44:18 2021 +0200
65.2 +++ b/test/Tools/isac/MathEngine/step.sml Tue Apr 20 16:58:44 2021 +0200
65.3 @@ -51,7 +51,7 @@
65.4 (*[4], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Check_elementwise "Assumptions"*)
65.5 (*[], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Check_Postcond ["sqroot-test", "univariate", "equation", "test"]*)
65.6 (*[], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*End_Proof'*)
65.7 -( * run this ---^^^code *)
65.8 +( * run this --- \<up> code *)
65.9
65.10 (* for this output:
65.11 ========= ([], Pbl)========= Step.by_tactic: Model_Problem ==================================
65.12 @@ -181,7 +181,7 @@
65.13 moveActiveRoot 1;
65.14 autoCalculate 1 CompleteCalcHead;
65.15 autoCalculate 1 (Steps 1);
65.16 -autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
65.17 +autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
65.18 appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" (*|> Future.join*);
65.19 (* the check for errpat is maximally liberal (whole term modulo "nrls" from "type met"),
65.20 would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
65.21 @@ -189,8 +189,8 @@
65.22 instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
65.23 (*========== inhibit exn WN1130621 Isabelle2012-->13 !thehier! ====================
65.24 findFillpatterns 1 "chain-rule-diff-both";
65.25 -(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =
65.26 - d_d x (x ^^^ 2) + cos (x ^^^ 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
65.27 +(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =
65.28 + d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
65.29
65.30 "~~~~~ fun requestFillformula, args:"; val (cI, (errpatID, fillpatID)) =
65.31 (1, ("chain-rule-diff-both", "fill-both-args"));
65.32 @@ -211,7 +211,7 @@
65.33 val pos' as (p', _) = (lev_on p, Res);
65.34
65.35 if pos = ([1], Res) then () else error "Step.inconsistent changed 2a";
65.36 -if UnparseC.term f = "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))"
65.37 +if UnparseC.term f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))"
65.38 then () else error "Step.inconsistent changed 2b";
65.39
65.40 val (pt,c) =
65.41 @@ -238,13 +238,13 @@
65.42 if p = ([2], Res) andalso
65.43 get_obj g_tac pt (fst p) = Rewrite_Inst (["(''bdv'', x)"], ("diff_sin_chain", "")) andalso
65.44 UnparseC.term f =
65.45 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos ?u * d_d x ?_dummy_2"
65.46 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?u * d_d x ?_dummy_2"
65.47 (*WAS with old findFillpatterns:
65.48 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos ?_dummy_2 * d_d x ?_dummy_3"
65.49 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?_dummy_2 * d_d x ?_dummy_3"
65.50 WN120731 replaced
65.51 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos ?u * d_d x ?_dummy_2"
65.52 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?u * d_d x ?_dummy_2"
65.53 WN120804 replaced
65.54 - "d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4)) =\nd_d x (x ^^^ 2) + cos ?_dummy_1 * d_d x ?_dummy_2"*)
65.55 + "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?_dummy_1 * d_d x ?_dummy_2"*)
65.56 then () else error "Step.inconsistent changed: fill-formula?";
65.57
65.58 Test_Tool.show_pt pt; (*ATTENTION: omits the last step, if pt is incomplete, ([2], Res) EXISTS !*)
65.59 @@ -257,8 +257,8 @@
65.60 val fmz =
65.61 ["fixedValues [r=Arbfix]", "maximum A",
65.62 "valuesFor [a,b::real]",
65.63 - "relations [A=a*(b::real), (a/2)^^^2 + (b/2)^^^2 = (r::real)^^^2]",
65.64 - "relations [A=a*(b::real), (a/2)^^^2 + (b/2)^^^2 = (r::real)^^^2]",
65.65 + "relations [A=a*(b::real), (a/2) \<up> 2 + (b/2) \<up> 2 = (r::real) \<up> 2]",
65.66 + "relations [A=a*(b::real), (a/2) \<up> 2 + (b/2) \<up> 2 = (r::real) \<up> 2]",
65.67 "relations [A=a*(b::real), a/2=r*sin alpha, b/2 = (r::real)*cos (alpha::real)]",
65.68
65.69 "boundVariable a", "boundVariable b", "boundVariable alpha",
65.70 @@ -291,7 +291,7 @@
65.71 val ("ok", ([(Add_Relation "relations [A = a * b]", _, _)], _, ptp))
65.72 = Step.specify_do_next ptp;
65.73
65.74 -val ("ok", ([(Add_Relation "relations [(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]", _, _)], _, ptp))
65.75 +val ("ok", ([(Add_Relation "relations [(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]", _, _)], _, ptp))
65.76 = Step.specify_do_next ptp;
65.77 val PblObj {probl, ...} = get_obj I (fst ptp) [];
65.78
65.79 @@ -299,7 +299,7 @@
65.80 "(1 ,[1, 2, 3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])), \n" ^
65.81 "(2 ,[1, 2, 3] ,true ,#Find ,Cor maximum A ,(m_m, [A])), \n" ^
65.82 "(3 ,[1, 2, 3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a, b]])), \n" ^
65.83 - "(4 ,[1, 2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(r_s, [[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]"
65.84 + "(4 ,[1, 2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] ,(r_s, [[A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]))]"
65.85 then () else error "maximum example add_items changed";
65.86
65.87 val ("ok", ([(Specify_Theory "DiffApp", _, _)], _, ptp))
65.88 @@ -333,8 +333,8 @@
65.89 val fmz =
65.90 ["fixedValues [r=Arbfix]", "maximum A",
65.91 "valuesFor [a,b]",
65.92 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
65.93 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
65.94 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
65.95 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
65.96 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
65.97
65.98 "boundVariable a", "boundVariable b", "boundVariable alpha",
65.99 @@ -378,7 +378,7 @@
65.100 Step_Specify.by_tactic_input <> specify ?!
65.101
65.102 if nxt<>(Add_Relation
65.103 - "relations [(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]")
65.104 + "relations [(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]")
65.105 then error "test specify, fmz <> []: nxt <> Add_Relation (a/2)^2.." else (); (*different with show_types !!!*)
65.106
65.107 val nxt = tac2tac_ pt p nxt;
66.1 --- a/test/Tools/isac/Minisubpbl/300-init-subpbl.sml Mon Apr 19 20:44:18 2021 +0200
66.2 +++ b/test/Tools/isac/Minisubpbl/300-init-subpbl.sml Tue Apr 20 16:58:44 2021 +0200
66.3 @@ -23,7 +23,7 @@
66.4 (*[1], Frm*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Rewrite_Set "norm_equation"*)
66.5 (*[1], Res*)val (p,_,f,nxt,_,pt) = me nxt p [] pt; (*nxt = Rewrite_Set "Test_simplify" *)
66.6 (*[2], Res*)val (p''',_,f,nxt''',_,pt''') = me nxt p [] pt; (*nxt = ("Subproblem"*)
66.7 -(*//--1 begin step into relevant call -----------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----\\
66.8 +(*//--1 begin step into relevant call ----------- \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^-----\\
66.9 1 relevant for updating ctxt *)
66.10 "~~~~~ fun me , args:"; val (tac, p, _(*NEW remove*), pt) = (nxt''', p''', [], pt''');
66.11
67.1 --- a/test/Tools/isac/Minisubpbl/400-start-meth-subpbl.sml Mon Apr 19 20:44:18 2021 +0200
67.2 +++ b/test/Tools/isac/Minisubpbl/400-start-meth-subpbl.sml Tue Apr 20 16:58:44 2021 +0200
67.3 @@ -29,7 +29,7 @@
67.4 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
67.5 val (p,_,f,nxt,_,pt) = me nxt p [] pt;
67.6 val (p''',_,f,nxt''',_,pt''') = me nxt p [] pt; (*nxt = Apply_Method ["Test", "solve_linear"]*)
67.7 -(*//--1 begin step into relevant call ---------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------\\
67.8 +(*//--1 begin step into relevant call --------- \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^-------\\
67.9 1 relevant for all Apply_Method *)
67.10 (*+*)if get_ctxt pt p |> ContextC.is_empty then error "ctxt no initialised by specify, PblObj{ctxt,...}" else ();
67.11 (*+*)if get_ctxt pt p |> ContextC.is_empty then error "ctxt NOT initialised by Subproblem'}" else ();
68.1 --- a/test/Tools/isac/Minisubpbl/600-postcond-NEXT_STEP.sml Mon Apr 19 20:44:18 2021 +0200
68.2 +++ b/test/Tools/isac/Minisubpbl/600-postcond-NEXT_STEP.sml Tue Apr 20 16:58:44 2021 +0200
68.3 @@ -24,19 +24,19 @@
68.4
68.5 (*+*)if (get_istate_LI pt''''' p''''' |> the_pstate |> pstate2str)
68.6 = "([\"\n(e_e, x + 1 = 2)\", \"\n(v_v, x)\"], [], empty, NONE, \n??.empty, ORundef, false, true)"
68.7 -then () else error "pstate changed after ([1], Frm)"; (*this shall be corrected ...^^^^^^^^^: a tac has been found !!!*)
68.8 +then () else error "pstate changed after ([1], Frm)"; (*this shall be corrected ... \<up> \<up> \<up> : a tac has been found !!!*)
68.9
68.10 (*[1], Res*)val (_, ([(tac, _, _)], _, (pt, p))) = Step.do_next p''''' ((pt''''', e_pos'), []);(*Rewrite_Set "norm_equation"*)
68.11
68.12 (*+*)if (get_istate_LI pt p |> the_pstate |> pstate2str)
68.13 = "([\"\n(e_e, x + 1 = 2)\", \"\n(v_v, x)\"], [R, L, R, L, L, R, R], empty, SOME e_e, \nx + 1 + -1 * 2 = 0, ORundef, true, false)"
68.14 -then () else error "pstate changed after ([1], Res)"; (*this shall be corrected .............................^^^^^^^^^*)
68.15 +then () else error "pstate changed after ([1], Res)"; (*this shall be corrected ............................. \<up> \<up> \<up> *)
68.16
68.17 (*[2], Res*)val (_, ([(tac, _, _)], _, (pt, p))) =(**) Step.do_next p ((pt, e_pos'), []);(*Rewrite_Set "Test_simplify"*)
68.18
68.19 (*+*)if (get_istate_LI pt p |> the_pstate |> pstate2str)
68.20 = "([\"\n(e_e, x + 1 = 2)\", \"\n(v_v, x)\"], [R, L, R, L, R, R], empty, SOME e_e, \n-1 + x = 0, ORundef, true, false)"
68.21 -then () else error "pstate changed after ([2], Res)"; (*this shall be corrected ...................^^^^^^^^^*)
68.22 +then () else error "pstate changed after ([2], Res)"; (*this shall be corrected ................... \<up> \<up> \<up> *)
68.23
68.24 (*[3], Pbl*)val (_, ([(tac, _, _)], _, (pt, p))) = Step.do_next p ((pt, e_pos'), []);(*Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"])*)
68.25
69.1 --- a/test/Tools/isac/Minisubpbl/710-interSteps-short.sml Mon Apr 19 20:44:18 2021 +0200
69.2 +++ b/test/Tools/isac/Minisubpbl/710-interSteps-short.sml Tue Apr 20 16:58:44 2021 +0200
69.3 @@ -45,15 +45,15 @@
69.4 (* called by fun interSteps ---------------------- vvvvvvvvvvvvvvvvvvvvvv *)
69.5 val ("detailrls", pt, ([2, 6], Res)) = (*case*) Detail_Step.go pt ([2], Res) (*of*);
69.6
69.7 -(*+*)Test_Tool.show_pt_tac pt; (* ^^^ + ([2,1], Frm)..([2,6], Res) after ([1], Res)*)
69.8 +(*+*)Test_Tool.show_pt_tac pt; (* \<up> + ([2,1], Frm)..([2,6], Res) after ([1], Res)*)
69.9
69.10 val ("detailrls", pt, ([3, 1, 1], Res)) = (*case*) Detail_Step.go pt ([3,1], Res) (*of*);
69.11
69.12 -(*+*)Test_Tool.show_pt_tac pt; (* ^^^ +++ ([3,1,1], Frm),([3,1,1], Res) after ([3,1], Frm)*)
69.13 +(*+*)Test_Tool.show_pt_tac pt; (* \<up> +++ ([3,1,1], Frm),([3,1,1], Res) after ([3,1], Frm)*)
69.14
69.15 val ("detailrls", pt, ([3, 2, 2], Res)) = (*case*) Detail_Step.go pt ([3,2], Res) (*of*);
69.16
69.17 -(*+*)Test_Tool.show_pt_tac pt; (* ^^^ +++ +++ ([3,2,1], Frm)..([3,2,2], Res) after ([3,1], Res)*)
69.18 +(*+*)Test_Tool.show_pt_tac pt; (* \<up> +++ +++ ([3,2,1], Frm)..([3,2,2], Res) after ([3,1], Res)*)
69.19
69.20 (*---------- final test ----------------------------------------------------------\\*)
69.21 if pr_ctree pr_short pt =
70.1 --- a/test/Tools/isac/Minisubpbl/790-complete-NEXT_STEP.sml Mon Apr 19 20:44:18 2021 +0200
70.2 +++ b/test/Tools/isac/Minisubpbl/790-complete-NEXT_STEP.sml Tue Apr 20 16:58:44 2021 +0200
70.3 @@ -31,7 +31,7 @@
70.4
70.5 ((get_obj g_result pt (fst p)) |> snd |> UnparseC.terms) = "[]";(*isa*)
70.6 ((get_obj g_result pt (fst p)) |> snd |> UnparseC.terms) = "[\"matches (?a = ?b) (-1 + x = 0)\"]";(*REP*)
70.7 -(* there are questionable assumptions either ---------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
70.8 +(* there are questionable assumptions either --------- \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^^*)
70.9
70.10 (*[4], Res*)val (_, ([(tac, _, _)], _, (pt, p))) = Step.do_next p ((pt, e_pos'), []);(*Check_elementwise "Assumptions"*)
70.11
71.1 --- a/test/Tools/isac/OLDTESTS/root-equ.sml Mon Apr 19 20:44:18 2021 +0200
71.2 +++ b/test/Tools/isac/OLDTESTS/root-equ.sml Tue Apr 20 16:58:44 2021 +0200
71.3 @@ -27,7 +27,7 @@
71.4
71.5
71.6 (*
71.7 -> val t = (Thm.term_of o the o (TermC.parse thy)) "#2^^^#3";
71.8 +> val t = (Thm.term_of o the o (TermC.parse thy)) "#2 \<up> #3";
71.9 > val eval_fn = the (LibraryC.assoc (!eval_list, "pow"));
71.10 > val (SOME (id,t')) = get_pair thy "pow" eval_fn t;
71.11 > Syntax.string_of_term (ThyC.to_ctxt thy) t';
71.12 @@ -41,30 +41,30 @@
71.13 val ct = "sqrt(9+4*x)=sqrt x + sqrt(-3+x)";
71.14 val thm = ("square_equation_left", "");
71.15 val SOME (ct,asm) = rewrite thy' "tless_true" "tval_rls" true thm ct;
71.16 -(*"9 + 4 * x = (sqrt x + sqrt (-3 + x)) ^^^ 2"*)
71.17 +(*"9 + 4 * x = (sqrt x + sqrt (-3 + x)) \<up> 2"*)
71.18 val rls = ("Test_simplify");
71.19 val (ct,_) = the (rewrite_set thy' false rls ct);
71.20 -(*"9 + 4 * x = -3 + (2 * x + 2 * sqrt (x ^^^ 2 + -3 * x))"*)
71.21 +(*"9 + 4 * x = -3 + (2 * x + 2 * sqrt (x \<up> 2 + -3 * x))"*)
71.22 val rls = ("rearrange_assoc");
71.23 val (ct,_) = the (rewrite_set thy' false rls ct);
71.24 -(*"9 + 4 * x = -3 + 2 * x + 2 * sqrt (x ^^^ 2 + -3 * x)"*)
71.25 +(*"9 + 4 * x = -3 + 2 * x + 2 * sqrt (x \<up> 2 + -3 * x)"*)
71.26 val rls = ("isolate_root");
71.27 val (ct,_) = the (rewrite_set thy' false rls ct);
71.28 -(*"sqrt (x ^^^ 2 + -3 * x) =
71.29 +(*"sqrt (x \<up> 2 + -3 * x) =
71.30 (-3 + 2 * x + -1 * (9 + 4 * x)) // (-1 * 2)"*)
71.31 val rls = ("Test_simplify");
71.32 val (ct,_) = the (rewrite_set thy' false rls ct);
71.33 -(*"sqrt (x ^^^ 2 + -3 * x) = 6 + x"*)
71.34 +(*"sqrt (x \<up> 2 + -3 * x) = 6 + x"*)
71.35 val thm = ("square_equation_left", "");
71.36 val (ct,asm') = the (rewrite thy' "tless_true" "tval_rls" true thm ct);
71.37 val asm = asm union asm';
71.38 -(*"x ^^^ 2 + -3 * x = (6 + x) ^^^ 2"*)
71.39 +(*"x \<up> 2 + -3 * x = (6 + x) \<up> 2"*)
71.40 val rls = ("Test_simplify");
71.41 val (ct,_) = the (rewrite_set thy' false rls ct);
71.42 -(*"x ^^^ 2 + -3 * x = 36 + (x ^^^ 2 + 12 * x)"*)
71.43 +(*"x \<up> 2 + -3 * x = 36 + (x \<up> 2 + 12 * x)"*)
71.44 val rls = ("norm_equation");
71.45 val (ct,_) = the (rewrite_set thy' false rls ct);
71.46 -(*"x ^^^ 2 + -3 * x + -1 * (36 + (x ^^^ 2 + 12 * x)) = 0"*)
71.47 +(*"x \<up> 2 + -3 * x + -1 * (36 + (x \<up> 2 + 12 * x)) = 0"*)
71.48 val rls = ("Test_simplify");
71.49 val (ct,_) = the (rewrite_set thy' false rls ct);
71.50 (*"-36 + -15 * x = 0"*)
71.51 @@ -81,7 +81,7 @@
71.52 > asm;
71.53 val it =
71.54 ["(+0) <= sqrt x + sqrt ((-3) + x) ", "(+0) <= 9 + 4 * x",
71.55 - "(+0) <= (-3) * x + x ^^^ 2", "(+0) <= 6 + x"] : TermC.as_string list
71.56 + "(+0) <= (-3) * x + x \<up> 2", "(+0) <= 6 + x"] : TermC.as_string list
71.57 *)
71.58
71.59
71.60 @@ -145,33 +145,33 @@
71.61 val rls = Test_simplify;
71.62 val (t,_) = the (rewrite_set_ thy false rls t);
71.63 (*
71.64 -sqrt (x ^^^ 2 + 5 * x) =
71.65 +sqrt (x \<up> 2 + 5 * x) =
71.66 (5 + 2 * x + (-1 * 9 + -1 * (4 * x))) / (-1 * 2)
71.67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71.68 ### trying thm 'rdistr_div_right'
71.69 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.70 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.71 (5 + 2 * x) / (-1 * 2) + (-1 * 9 + -1 * (4 * x)) / (-1 * 2)
71.72 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.73 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.74 (5 + 2 * x) / (-1 * 2) + (-1 * 9 / (-1 * 2) + -1 * (4 * x) / (-1 * 2))
71.75 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.76 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.77 5 / (-1 * 2) + 2 * x / (-1 * 2) +
71.78 (-1 * 9 / (-1 * 2) + -1 * (4 * x) / (-1 * 2))
71.79
71.80 ### trying thm 'radd_left_commute'
71.81 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.82 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.83 -1 * 9 / (-1 * 2) +
71.84 (5 / (-1 * 2) + 2 * x / (-1 * 2) + -1 * (4 * x) / (-1 * 2))
71.85 ### trying thm 'radd_assoc'
71.86 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.87 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.88 -1 * 9 / (-1 * 2) +
71.89 (5 / (-1 * 2) + (2 * x / (-1 * 2) + -1 * (4 * x) / (-1 * 2)))
71.90
71.91 ### trying thm 'radd_real_const_eq'
71.92 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.93 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.94 -1 * 9 / (-1 * 2) + (5 / (-1 * 2) + (2 * x + -1 * (4 * x)) / (-1 * 2))
71.95 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.96 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.97 -1 * 9 / (-1 * 2) + (5 + (2 * x + -1 * (4 * x))) / (-1 * 2)
71.98 -### rewrites to: sqrt (x ^^^ 2 + 5 * x) =
71.99 +### rewrites to: sqrt (x \<up> 2 + 5 * x) =
71.100 (-1 * 9 + (5 + (2 * x + -1 * (4 * x)))) / (-1 * 2)
71.101 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71.102
71.103 @@ -207,29 +207,29 @@
71.104 val ct = "sqrt(9+4*x)=sqrt x + sqrt(5+x)";
71.105 (*1*)val thm = ("square_equation_left", "");
71.106 val (ct,asm) = the (rewrite thy' "tless_true" "tval_rls" true thm ct);
71.107 -"9 + 4 * x = (sqrt x + sqrt (5 + x)) ^^^ 2";
71.108 +"9 + 4 * x = (sqrt x + sqrt (5 + x)) \<up> 2";
71.109 (*2*)val rls = "Test_simplify";
71.110 val (ct,_) = the (rewrite_set thy' false rls ct);
71.111 -"9 + 4 * x = 5 + (2 * x + 2 * sqrt (x ^^^ 2 + 5 * x))";
71.112 +"9 + 4 * x = 5 + (2 * x + 2 * sqrt (x \<up> 2 + 5 * x))";
71.113 (*3*)val rls = "rearrange_assoc";
71.114 val (ct,_) = the (rewrite_set thy' false rls ct);
71.115 -"9 + 4 * x = 5 + 2 * x + 2 * sqrt (x ^^^ 2 + 5 * x)";
71.116 +"9 + 4 * x = 5 + 2 * x + 2 * sqrt (x \<up> 2 + 5 * x)";
71.117 (*4*)val rls = "isolate_root";
71.118 val (ct,_) = the (rewrite_set thy' false rls ct);
71.119 -"sqrt (x ^^^ 2 + 5 * x) = (5 + 2 * x + -1 * (9 + 4 * x)) // (-1 * 2)";
71.120 +"sqrt (x \<up> 2 + 5 * x) = (5 + 2 * x + -1 * (9 + 4 * x)) // (-1 * 2)";
71.121 (*5*)val rls = "Test_simplify";
71.122 val (ct,_) = the (rewrite_set thy' false rls ct);
71.123 -"sqrt (x ^^^ 2 + 5 * x) = 2 + x";
71.124 +"sqrt (x \<up> 2 + 5 * x) = 2 + x";
71.125 (*6*)val thm = ("square_equation_left", "");
71.126 val (ct,asm') = the (rewrite thy' "tless_true" "tval_rls" true thm ct);
71.127 val asm = asm union asm';
71.128 -"x ^^^ 2 + 5 * x = (2 + x) ^^^ 2";
71.129 +"x \<up> 2 + 5 * x = (2 + x) \<up> 2";
71.130 (*7*)val rls = "Test_simplify";
71.131 val (ct,_) = the (rewrite_set thy' false rls ct);
71.132 -"x ^^^ 2 + 5 * x = 4 + (x ^^^ 2 + 4 * x)";
71.133 +"x \<up> 2 + 5 * x = 4 + (x \<up> 2 + 4 * x)";
71.134 (*8*)val rls = "norm_equation";
71.135 val (ct,_) = the (rewrite_set thy' false rls ct);
71.136 -"x ^^^ 2 + 5 * x + -1 * (4 + (x ^^^ 2 + 4 * x)) = 0";
71.137 +"x \<up> 2 + 5 * x + -1 * (4 + (x \<up> 2 + 4 * x)) = 0";
71.138 (*9*)val rls = "Test_simplify";
71.139 val (ct,_) = the (rewrite_set thy' false rls ct);
71.140 "-4 + x = 0";
71.141 @@ -362,14 +362,14 @@
71.142 . sqrt(9+4*x)=sqrt x + sqrt(5+x), x, (+0)
71.143 1. sqrt(9+4*x)=sqrt x + sqrt(5+x)
71.144 1.1. sqrt(9+4*x)=sqrt x + sqrt(5+x)
71.145 -1.2. 9 + 4 * x = (sqrt x + sqrt (5 + x) ) ^^^ 2
71.146 -1.3. 9 + 4 * x = 5 + ((+2) * x + (+2) * sqrt (5 * x + x ^^^ 2) )
71.147 -1.4. 9 + 4 * x = 5 + (+2) * x + (+2) * sqrt (5 * x + x ^^^ 2)
71.148 -1.5. sqrt (5 * x + x ^^^ 2) = (5 + (+2) * x + (-1) * (9 + 4 * x)) / ((-1) * (+2))
71.149 -1.6. sqrt (5 * x + x ^^^ 2) = (+2) + x
71.150 -2. 5 * x + x ^^^ 2 = ((+2) + x) ^^^ 2
71.151 -3. 5 * x + x ^^^ 2 = 4 + (4 * x + x ^^^ 2) ###12.12.99: indent 2.1. !?!
71.152 -4. 5 * x + x ^^^ 2 + (-1) * (4 + (4 * x + x ^^^ 2)) = (+0)
71.153 +1.2. 9 + 4 * x = (sqrt x + sqrt (5 + x) ) \<up> 2
71.154 +1.3. 9 + 4 * x = 5 + ((+2) * x + (+2) * sqrt (5 * x + x \<up> 2) )
71.155 +1.4. 9 + 4 * x = 5 + (+2) * x + (+2) * sqrt (5 * x + x \<up> 2)
71.156 +1.5. sqrt (5 * x + x \<up> 2) = (5 + (+2) * x + (-1) * (9 + 4 * x)) / ((-1) * (+2))
71.157 +1.6. sqrt (5 * x + x \<up> 2) = (+2) + x
71.158 +2. 5 * x + x \<up> 2 = ((+2) + x) \<up> 2
71.159 +3. 5 * x + x \<up> 2 = 4 + (4 * x + x \<up> 2) ###12.12.99: indent 2.1. !?!
71.160 +4. 5 * x + x \<up> 2 + (-1) * (4 + (4 * x + x \<up> 2)) = (+0)
71.161 5. (-4) + x = (+0)
71.162 6. x = (+0) + (-1) * (-4)
71.163 *)
72.1 --- a/test/Tools/isac/OLDTESTS/script.sml Mon Apr 19 20:44:18 2021 +0200
72.2 +++ b/test/Tools/isac/OLDTESTS/script.sml Tue Apr 20 16:58:44 2021 +0200
72.3 @@ -233,7 +233,7 @@
72.4 if f = Form'
72.5 (Test_Out.FormKF
72.6 (~1,EdUndef,1,Nundef,
72.7 - "9 + 4 * x = 5 + 2 * x + 2 * sqrt (x ^^^ 2 + 5 * x)"))
72.8 + "9 + 4 * x = 5 + 2 * x + 2 * sqrt (x \<up> 2 + 5 * x)"))
72.9 then () else error "behaviour in root-expl. Free_Solve changed";
72.10 writeln (pr_ctree pr_short pt);
72.11 ---------------------------------me raises exception with not-locatable*)
72.12 @@ -264,7 +264,7 @@
72.13 val p = ([1],Res):pos';
72.14 val eq_ = (Thm.term_of o the o (TermC.parse thy))"e_::bool";
72.15
72.16 -val ct = "0+(sqrt(sqrt(sqrt a))^^^2)^^^2=0";
72.17 +val ct = "0+(sqrt(sqrt(sqrt a)) \<up> 2) \<up> 2=0";
72.18 val ve0_= (Thm.term_of o the o (TermC.parse thy)) ct;
72.19 val ets0=[([],(Tac_(Program.thy,"BS", "", ""),[(eq_,ve0_)],[(eq_,ve0_)],
72.20 TermC.empty,TermC.empty,Safe)),
72.21 @@ -292,7 +292,7 @@
72.22 "%%%%%%%%%%TODO 7.9.00---vvvvvv--- conflicts with Isa-types \n\
72.23 \ (Repeat (Calculate cancel g_)) Or \n\
72.24 \ (Repeat (Calculate power g_)) Or \n\
72.25 -\%%%%%%%%%%%%%%%%%%%%%---^^^^^^--- conflicts with Isa-types \n\
72.26 +\%%%%%%%%%%%%%%%%%%%%%--- \<up> \<up> --- conflicts with Isa-types \n\
72.27 \%%%%%%%%%%%%%%%%%%%%%TODO before Detail Rewrite_Set";
72.28
72.29
73.1 --- a/test/Tools/isac/OLDTESTS/script_if.sml Mon Apr 19 20:44:18 2021 +0200
73.2 +++ b/test/Tools/isac/OLDTESTS/script_if.sml Tue Apr 20 16:58:44 2021 +0200
73.3 @@ -52,7 +52,7 @@
73.4 "tval_rls" "is_rootequation_in (sqrt(x)=1) x";
73.5
73.6
73.7 -(*WN: ^^^--- bitte nimm vorerst immer (theory "Isac_Knowledge"), damit wird richtig gematcht,
73.8 +(*WN: \<up> --- bitte nimm vorerst immer (theory "Isac_Knowledge"), damit wird richtig gematcht,
73.9 siehe unten. Wir werden w"ahrend der Arbeit auf diesen Fehler drauskommen*)
73.10
73.11 KEStore_Elems.add_pbts
74.1 --- a/test/Tools/isac/OLDTESTS/scriptnew.sml Mon Apr 19 20:44:18 2021 +0200
74.2 +++ b/test/Tools/isac/OLDTESTS/scriptnew.sml Tue Apr 20 16:58:44 2021 +0200
74.3 @@ -114,7 +114,7 @@
74.4 \ e_e"
74.5 ));
74.6
74.7 -val fmz = ["boolTestGiven (0+(sqrt(sqrt(sqrt a))^^^2)^^^2=0)",
74.8 +val fmz = ["boolTestGiven (0+(sqrt(sqrt(sqrt a)) \<up> 2) \<up> 2=0)",
74.9 "boolTestFind v_i_"];
74.10 val (dI',pI',mI') = ("Test",["met_testeq", "tests"],
74.11 ["Test", "testeq1"]);
74.12 @@ -139,7 +139,7 @@
74.13 (*** No such constant: "Test.contains'_root" *)
74.14
74.15 val (p,_,f,nxt,_,pt) = me nxt p c pt;
74.16 -if f=(Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"a = 0 ^^^ 2"))) andalso
74.17 +if f=(Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"a = 0 \<up> 2"))) andalso
74.18 nxt=("End_Proof'",End_Proof') then ()
74.19 else error "different behaviour test 9.5.02 Testeq: While Try Repeat #>";
74.20
74.21 @@ -185,7 +185,7 @@
74.22 val (p,_,f,nxt,_,pt) = me nxt p c pt;
74.23 val (p,_,f,nxt,_,pt) = me nxt p c pt;
74.24 val (p,_,f,nxt,_,pt) = (me nxt p c pt) handle e => OldGoals.print_exn e;
74.25 -if f=(Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[a = 0 ^^^ 2]"))) andalso
74.26 +if f=(Form' (Test_Out.FormKF (~1,EdUndef,0,Nundef,"[a = 0 \<up> 2]"))) andalso
74.27 nxt=("End_Proof'",End_Proof') then ()
74.28 else error "different behaviour in test 11.5.02 Testeq: let e_e =... in [e_]";
74.29
74.30 @@ -337,7 +337,7 @@
74.31 (*###*)val nxt = ("Rewrite_Set",Rewrite_Set "norm_equation");
74.32 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
74.33 "--- !!! x2 --- 1.norm_equation";
74.34 -(*me-NEW: "9 + 4 * x = (sqrt x + sqrt (5 + x)) ^^^ 2" -- NICHT norm_equation!!*)
74.35 +(*me-NEW: "9 + 4 * x = (sqrt x + sqrt (5 + x)) \<up> 2" -- NICHT norm_equation!!*)
74.36 (*me-OLD: "sqrt (9 + 4 * x) + -1 * (sqrt x + sqrt (5 + x)) = 0"*)
74.37 (* val nxt = ("Rewrite_Set",Rewrite_Set "Test_simplify");*)
74.38 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
74.39 @@ -381,7 +381,7 @@
74.40 (*val nxt = ("Apply_Method",Apply_Method ["Test", "square_equation"])*)
74.41 val (p,_,f,nxt,_,pt) = me nxt p c pt;
74.42 (*val nxt = "square_equation_left",
74.43 - "[| 0 <= ?a; 0 <= ?b |] ==> (sqrt ?a = ?b) = (?a = ?b ^^^ 2)"))*)
74.44 + "[| 0 <= ?a; 0 <= ?b |] ==> (sqrt ?a = ?b) = (?a = ?b \<up> 2)"))*)
74.45 Ctree.get_assumptions pt p;
74.46 (*it = [] : string list;*)
74.47 Rewrite.trace_on := false;
74.48 @@ -403,7 +403,7 @@
74.49 if asms = [(TermC.str2term "0 <= 9 + 4 * x",[1]),
74.50 (TermC.str2term "0 <= x",[1]),
74.51 (TermC.str2term "0 <= -3 + x",[1]),
74.52 - (TermC.str2term "0 <= x ^^^ 2 + -3 * x",[6]),
74.53 + (TermC.str2term "0 <= x \<up> 2 + -3 * x",[6]),
74.54 (TermC.str2term "0 <= 6 + x",[6])] then ()
74.55 else error "scriptnew.sml diff.behav. in sqrt assumptions 2";
74.56
74.57 @@ -430,7 +430,7 @@
74.58 if asms = [(TermC.str2term "0 <= 9 + 4 * x",[1]),
74.59 (TermC.str2term "0 <= x",[1]),
74.60 (TermC.str2term "0 <= -3 + x",[1]),
74.61 - (TermC.str2term "0 <= x ^^^ 2 + -3 * x",[6]),
74.62 + (TermC.str2term "0 <= x \<up> 2 + -3 * x",[6]),
74.63 (TermC.str2term "0 <= 6 + x",[6])] then ()
74.64 else raise
74.65 error "scriptnew.sml: diff.behav. at Check_elementwise [x = -12 / 5]";
74.66 @@ -439,8 +439,8 @@
74.67 (*val nxt = Check_Postcond ["sqroot-test", "univariate", "equation", "test"])*)
74.68 val asms = Ctree.get_assumptions pt p;
74.69 [("0 <= 9 + 4 * x",[1]),("0 <= x",[1]),("0 <= -3 + x",[1]),
74.70 - ("0 <= x ^^^ 2 + -3 * x",[6]),("0 <= 6 + x",[6]),
74.71 - ("0 <= 6 + -12 / 5 &\n0 <= (-12 / 5) ^^^ 2 + -3 * (-12 / 5) &\n0 <= -3 + -12 / 5 & 0 <= -12 / 5 & 0 <= 9 + 4 * (-12 / 5)",
74.72 + ("0 <= x \<up> 2 + -3 * x",[6]),("0 <= 6 + x",[6]),
74.73 + ("0 <= 6 + -12 / 5 &\n0 <= (-12 / 5) \<up> 2 + -3 * (-12 / 5) &\n0 <= -3 + -12 / 5 & 0 <= -12 / 5 & 0 <= 9 + 4 * (-12 / 5)",
74.74 [13])];
74.75
74.76
74.77 @@ -454,7 +454,7 @@
74.78 if asms = [(TermC.str2term "0 <= 9 + 4 * (-12 / 5)",[]),
74.79 (TermC.str2term "0 <= -12 / 5", []),
74.80 (TermC.str2term "0 <= -3 + -12 / 5", []),
74.81 - (TermC.str2term "0 <= (-12 / 5) ^^^ 2 + -3 * (-12 / 5)", []),
74.82 + (TermC.str2term "0 <= (-12 / 5) \<up> 2 + -3 * (-12 / 5)", []),
74.83 (TermC.str2term "0 <= 6 + -12 / 5", [])] then ()
74.84 else error "scriptnew.sml diff.behav. in sqrt assumptions 4";
74.85
74.86 @@ -467,10 +467,10 @@
74.87 (*GoOn.5.03. script with Map, Subst (biquadr.equ.)
74.88 val scr = Prog ((inst_abs o Thm.term_of o the o (TermC.parse thy))
74.89 "Program Biquadrat_poly (e_e::bool) (v_::real) = \
74.90 - \(let e_e = Substitute [(v_^^^4, v_0_^^^2),(v_^^^2, v_0_)] e_; \
74.91 + \(let e_e = Substitute [(v_ \<up> 4, v_0_ \<up> 2),(v_ \<up> 2, v_0_)] e_; \
74.92 \ L_0_ = (SubProblem (PolyEqX,[univariate,equation], [no_met]) \
74.93 \ [BOOL e_e, REAL v_0_]); \
74.94 - \ L_i_ = Map (((Substitute [(v_0_, v_^^^2)]) #> \
74.95 + \ L_i_ = Map (((Substitute [(v_0_, v_ \<up> 2)]) #> \
74.96 \ ((Rewrite real_root_positive) Or \
74.97 \ (Rewrite real_root_negative)) #> \
74.98 \ OrToList) L_0_ \
75.1 --- a/test/Tools/isac/OLDTESTS/subp-rooteq.sml Mon Apr 19 20:44:18 2021 +0200
75.2 +++ b/test/Tools/isac/OLDTESTS/subp-rooteq.sml Tue Apr 20 16:58:44 2021 +0200
75.3 @@ -58,7 +58,7 @@
75.4 "---------------- solve_plain_square as rootpbl -----------";
75.5 "---------------- solve_plain_square as rootpbl -----------";
75.6 "---------------- solve_plain_square as rootpbl -----------";
75.7 -val fmz = ["equality (9 + -1 * x ^^^ 2 = 0)", "solveFor x",
75.8 +val fmz = ["equality (9 + -1 * x \<up> 2 = 0)", "solveFor x",
75.9 "solutions L"];
75.10 val (dI',pI',mI') =
75.11 ("Test",["plain_square", "univariate", "equation", "test"],
76.1 --- a/test/Tools/isac/OLDTESTS/tacis.sml Mon Apr 19 20:44:18 2021 +0200
76.2 +++ b/test/Tools/isac/OLDTESTS/tacis.sml Tue Apr 20 16:58:44 2021 +0200
76.3 @@ -46,7 +46,7 @@
76.4 autoCalculate 1 CompleteCalcHead; refFormula 1 (get_pos 1 1) (*OK*);
76.5 (*###########################################autoCalculate 1 (Steps 1);*)
76.6 fetchProposedTactic 1 (*'Apply_Method Test solve_linear' in tacis*);
76.7 - (* there was the only error ^^^^^^^^^ in step/begin_end_prog ..Apply_Method..
76.8 + (* there was the only error \<up> \<up> \<up> in step/begin_end_prog ..Apply_Method..
76.9 val (str', (tacis', (pt',p'))) = Step.do_next ip (ptp, tacis);
76.10 writeln (State_Steps.to_string tacis');
76.11 ######################################################################*)
77.1 --- a/test/Tools/isac/ProgLang/evaluate.sml Mon Apr 19 20:44:18 2021 +0200
77.2 +++ b/test/Tools/isac/ProgLang/evaluate.sml Tue Apr 20 16:58:44 2021 +0200
77.3 @@ -43,7 +43,7 @@
77.4 "----------- fun calculate_ --------------------------------------------------------------------";
77.5 "----------- fun calculate_ --------------------------------------------------------------------";
77.6 (* fun rewrite__set_ \<longrightarrow> fun rew_once works the same way *)
77.7 -val t = TermC.str2term "((1+2)*4/3)^^^2";
77.8 +val t = TermC.str2term "((1+2)*4/3) \<up> 2";
77.9 val thy = @{theory};
77.10 val times = ("Groups.times_class.times", eval_binop "#mult_") : string * Eval_Def.eval_fn;
77.11 val plus = ("Groups.plus_class.plus",eval_binop "#add_") : string * Eval_Def.eval_fn;
77.12 @@ -53,20 +53,20 @@
77.13 "~~~~~ fun calculate_, args:"; val (thy, isa_fn, t) = (thy, plus, t);
77.14 val SOME ("#: 1 + 2 = 3", adh_thm) = adhoc_thm @{theory} isa_fn t;
77.15 val SOME (t', []) = rewrite__ thy 0 [] e_rew_ord Rule_Set.empty true adh_thm t;
77.16 -if UnparseC.term t' = "(3 * 4 / 3) ^^^ 2" then () else error "calculate_ 1 + 2 = 3 changed";
77.17 +if UnparseC.term t' = "(3 * 4 / 3) \<up> 2" then () else error "calculate_ 1 + 2 = 3 changed";
77.18
77.19 "~~~~~ fun calculate_, args:"; val (thy, isa_fn, t) = (thy, times, t');
77.20 val SOME ("#: 3 * 4 = 12", adh_thm) = adhoc_thm @{theory} isa_fn t';
77.21 val SOME (t'', []) = rewrite__ thy 0 [] e_rew_ord Rule_Set.empty true adh_thm t;
77.22 -if UnparseC.term t'' = "(12 / 3) ^^^ 2" then () else error "calculate_ 3 * 4 = 12 changed";
77.23 +if UnparseC.term t'' = "(12 / 3) \<up> 2" then () else error "calculate_ 3 * 4 = 12 changed";
77.24
77.25 "~~~~~ fun calculate_, args:"; val (thy, isa_fn, t) = (thy, divide, t'');
77.26 val SOME ("#divide_e12_3", adh_thm) = adhoc_thm @{theory} isa_fn t;
77.27 val SOME (t''', []) = rewrite__ thy 0 [] e_rew_ord Rule_Set.empty true adh_thm t;
77.28 -if UnparseC.term t''' = "4 ^^^ 2" then () else error "calculate_ 12 / 3 = 4 changed";
77.29 +if UnparseC.term t''' = "4 \<up> 2" then () else error "calculate_ 12 / 3 = 4 changed";
77.30
77.31 "~~~~~ fun calculate_, args:"; val (thy, isa_fn, t) = (thy, pow, t''');
77.32 -val SOME ("#: 4 ^^^ 2 = 16", adh_thm) = adhoc_thm @{theory} isa_fn t;
77.33 +val SOME ("#: 4 \<up> 2 = 16", adh_thm) = adhoc_thm @{theory} isa_fn t;
77.34 val SOME (t'''', []) = rewrite__ thy 0 [] e_rew_ord Rule_Set.empty true adh_thm t;
77.35 if UnparseC.term t'''' = "16" then () else error "calculate_ 12 / 3 = 4 changed";
77.36
77.37 @@ -74,13 +74,13 @@
77.38 "----------- calculate from Prog --------------------------------- -----------------------------";
77.39 "----------- calculate from Prog --------------------------------- -----------------------------";
77.40 val thy = @{theory "Test"};
77.41 -val fmz = ["realTestGiven (((1+2)*4/3)^^^2)", "realTestFind s"];
77.42 +val fmz = ["realTestGiven (((1+2)*4/3) \<up> 2)", "realTestFind s"];
77.43 val (dI',pI',mI') =
77.44 ("Test",["calculate", "test"],["Test", "test_calculate"]);
77.45
77.46 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
77.47 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
77.48 -(*nxt =("Add_Given",Add_Given "realTestGiven (((#1 + #2) * #4 // #3) ^^^#2)")*)
77.49 +(*nxt =("Add_Given",Add_Given "realTestGiven (((#1 + #2) * #4 // #3) \<up> #2)")*)
77.50 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
77.51 (*nxt = ("Add_Find",Add_Find "realTestFind s") : string * tac*)
77.52 val (p,_,f,nxt,_,pt) = me nxt p [1] pt;
77.53 @@ -107,22 +107,22 @@
77.54 "----------- calculate check test-root-equ --------------";
77.55 (*(1): 2nd Test_simplify didn't work:
77.56 val ct =
77.57 - "sqrt (x ^^^ 2 + -3 * x) = (-3 + 2 * x + -1 * (9 + 4 * x)) / (-1 * 2)"
77.58 + "sqrt (x \<up> 2 + -3 * x) = (-3 + 2 * x + -1 * (9 + 4 * x)) / (-1 * 2)"
77.59 > val rls = ("Test_simplify");
77.60 > val (ct,_) = the (rewrite_set thy' ("tval_rls") false rls ct);
77.61 -val ct = "sqrt (x ^^^ 2 + -3 * x) =
77.62 +val ct = "sqrt (x \<up> 2 + -3 * x) =
77.63 (-9) / (-2) + (-3 / (-2) + (x * ((-4) / (-2)) + x * (2 / (-2))))";
77.64 ie. cancel does not work properly
77.65 *)
77.66 val thy = @{theory "Test"};
77.67 val op_ = the (LibraryC.assoc (KEStore_Elems.get_calcs @{theory}, "DIVIDE"));
77.68 val ct = ThmC_Def.num_to_Free @{term
77.69 - "sqrt (x ^^^ 2 + -3 * x) = (-9) / (-2) + (-3 / (-2) + (x * ((-4) / (-2)) + x * (2 / (-2))))"};
77.70 + "sqrt (x \<up> 2 + -3 * x) = (-9) / (-2) + (-3 / (-2) + (x * ((-4) / (-2)) + x * (2 / (-2))))"};
77.71 case calculate_ thy op_ ct of
77.72 SOME _ => ()
77.73 | NONE => error "calculate_ test-root-equ changed";
77.74 (*
77.75 - sqrt (x ^^^ 2 + -3 * x) =\
77.76 + sqrt (x \<up> 2 + -3 * x) =\
77.77 \(-9) / (-2) + (-3 / (-2) + (x * ((-4) / (-2)) + x * (2 / (-2))))
77.78 ............... does not work *)
77.79
77.80 @@ -227,7 +227,7 @@
77.81 *** . Free ( 1, 'a)
77.82 *** . Free ( aaa, nat) *)
77.83
77.84 -val t = TermC.str2term "1 ^^^ aaa";
77.85 +val t = TermC.str2term "1 \<up> aaa";
77.86 TermC.atomty t;
77.87 (****
77.88 *** Const (Prog_Expr.pow, real => real => real)
77.89 @@ -245,29 +245,29 @@
77.90 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.91 "12 / 3 = 4";
77.92 val thy = @{theory Test};
77.93 -val t = (Thm.term_of o the o (TermC.parse thy)) "4 ^^^ 2";
77.94 +val t = (Thm.term_of o the o (TermC.parse thy)) "4 \<up> 2";
77.95 val SOME (thmID,thm) = adhoc_thm thy(the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"POWER"))) t;
77.96 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.97 "4 ^ 2 = 16";
77.98
77.99 - val t = (Thm.term_of o the o (TermC.parse thy)) "((1 + 2) * 4 / 3) ^^^ 2";
77.100 + val t = (Thm.term_of o the o (TermC.parse thy)) "((1 + 2) * 4 / 3) \<up> 2";
77.101 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"PLUS"))) t;
77.102 "1 + 2 = 3";
77.103 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.104 UnparseC.term t;
77.105 -"(3 * 4 / 3) ^^^ 2";
77.106 +"(3 * 4 / 3) \<up> 2";
77.107 val SOME (thmID,thm) = adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"TIMES")))t;
77.108 "3 * 4 = 12";
77.109 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.110 UnparseC.term t;
77.111 -"(12 / 3) ^^^ 2";
77.112 +"(12 / 3) \<up> 2";
77.113 val SOME (thmID,thm) =adhoc_thm thy(the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"DIVIDE")))t;
77.114 "12 / 3 = 4";
77.115 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.116 UnparseC.term t;
77.117 -"4 ^^^ 2";
77.118 +"4 \<up> 2";
77.119 val SOME (thmID,thm) = adhoc_thm thy(the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"POWER")))t;
77.120 -"4 ^^^ 2 = 16";
77.121 +"4 \<up> 2 = 16";
77.122 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t;
77.123 UnparseC.term t;
77.124 "16";
77.125 @@ -275,7 +275,7 @@
77.126 else ();
77.127
77.128 (*13.9.02 *** calc: operator = pow not defined*)
77.129 - val t = (Thm.term_of o the o (TermC.parse thy)) "3^^^2";
77.130 + val t = (Thm.term_of o the o (TermC.parse thy)) "3 \<up> 2";
77.131 val SOME (thmID,thm) =
77.132 adhoc_thm thy (the(LibraryC.assoc(KEStore_Elems.get_calcs @{theory},"POWER"))) t;
77.133 (*** calc: operator = pow not defined*)
77.134 @@ -303,11 +303,11 @@
77.135 (thy, "EqSystem.occur'_exactly'_in",
77.136 assoc_calc' (@{theory "EqSystem"}) "occur_exactly_in" |> snd |> snd,
77.137 TermC.str2term
77.138 - "[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L ^^^ 2) / 2"
77.139 + "[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L \<up> 2) / 2"
77.140 );
77.141 val SOME (str, simpl) = get_pair thy op_ ef arg;
77.142 if str =
77.143 -"[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L ^^^ 2) / 2 = True"
77.144 +"[] from [c, c_2, c_3, c_4] occur_exactly_in -1 * (q_0 * L \<up> 2) / 2 = True"
77.145 then () else error "evaluate.sml get_pair with 3 args:occur_exactly_in";
77.146
77.147
77.148 @@ -358,10 +358,10 @@
77.149
77.150 val SOME (isa_str, eval_fn) = LibraryC.assoc (KEStore_Elems.get_calcs @{theory}, "POWER");
77.151
77.152 -val t = (Thm.term_of o the o (TermC.parse thy)) "2 ^^^ 3";
77.153 +val t = (Thm.term_of o the o (TermC.parse thy)) "2 \<up> 3";
77.154 val SOME (str, term) = get_pair thy isa_str eval_fn t;
77.155 -if str = "#: 2 ^^^ 3 = 8" andalso UnparseC.term term = "2 ^^^ 3 = 8"
77.156 -then () else error "get_pair 2 ^^^ 3 changed";
77.157 +if str = "#: 2 \<up> 3 = 8" andalso UnparseC.term term = "2 \<up> 3 = 8"
77.158 +then () else error "get_pair 2 \<up> 3 changed";
77.159
77.160 "----------- fun adhoc_thm: examples -----------------------------------------------------------";
77.161 "----------- fun adhoc_thm: examples -----------------------------------------------------------";
78.1 --- a/test/Tools/isac/ProgLang/prog_expr.sml Mon Apr 19 20:44:18 2021 +0200
78.2 +++ b/test/Tools/isac/ProgLang/prog_expr.sml Tue Apr 20 16:58:44 2021 +0200
78.3 @@ -64,17 +64,17 @@
78.4 "------- some_occur_in";
78.5 some_occur_in [str2t"c",str2t"c_2"] (str2t"a + b + c");
78.6 val t = str2t "some_of [c, c_2, c_3, c_4] occur_in \
78.7 - \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2";
78.8 + \-1 * q_0 * L \<up> 2 / 2 + L * c + c_2";
78.9 val SOME (str,t') = eval_some_occur_in 0 "Prog_Expr.some'_occur'_in" t 0;
78.10 if UnparseC.term t' =
78.11 - "some_of [c, c_2, c_3, c_4] occur_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 =\nTrue" then ()
78.12 + "some_of [c, c_2, c_3, c_4] occur_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2 =\nTrue" then ()
78.13 else error "atools.sml: some_occur_in true";
78.14
78.15 val t = str2t "some_of [c_3, c_4] occur_in \
78.16 - \-1 * q_0 * L ^^^ 2 / 2 + L * c + c_2";
78.17 + \-1 * q_0 * L \<up> 2 / 2 + L * c + c_2";
78.18 val SOME (str,t') = eval_some_occur_in 0 "Prog_Expr.some'_occur'_in" t 0;
78.19 if UnparseC.term t' =
78.20 - "some_of [c_3, c_4] occur_in -1 * q_0 * L ^^^ 2 / 2 + L * c + c_2 = False" then ()
78.21 + "some_of [c_3, c_4] occur_in -1 * q_0 * L \<up> 2 / 2 + L * c + c_2 = False" then ()
78.22 else error "atools.sml: some_occur_in false";
78.23
78.24
78.25 @@ -109,21 +109,21 @@
78.26
78.27 (*----------*)
78.28 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
78.29 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x^^^7";
78.30 -if occurs_in v t then () else error "factor_right_deg (a*b+c)*x^^^7) x ..changed";
78.31 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*x \<up> 7";
78.32 +if occurs_in v t then () else error "factor_right_deg (a*b+c)*x \<up> 7) x ..changed";
78.33
78.34 val v = (Thm.term_of o the o (TermC.parse thy)) "AA";
78.35 -val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA^^^7";
78.36 -if occurs_in v t then () else error "factor_right_deg (a*b+c)*AA^^^7) AA ..changed";
78.37 +val t = (Thm.term_of o the o (TermC.parse thy)) "(a*b+c)*AA \<up> 7";
78.38 +if occurs_in v t then () else error "factor_right_deg (a*b+c)*AA \<up> 7) AA ..changed";
78.39
78.40 (*----------*)
78.41 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
78.42 -val t = (Thm.term_of o the o (TermC.parse thy)) "x^^^7";
78.43 -if occurs_in v t then () else error "factor_right_deg (x^^^7) x ..changed";
78.44 +val t = (Thm.term_of o the o (TermC.parse thy)) "x \<up> 7";
78.45 +if occurs_in v t then () else error "factor_right_deg (x \<up> 7) x ..changed";
78.46
78.47 val v = (Thm.term_of o the o (TermC.parse thy)) "AA";
78.48 -val t = (Thm.term_of o the o (TermC.parse thy)) "AA^^^7";
78.49 -if occurs_in v t then () else error "factor_right_deg (AA^^^7) AA ..changed";
78.50 +val t = (Thm.term_of o the o (TermC.parse thy)) "AA \<up> 7";
78.51 +if occurs_in v t then () else error "factor_right_deg (AA \<up> 7) AA ..changed";
78.52
78.53 (*----------*)
78.54 val v = (Thm.term_of o the o (TermC.parse thy)) "x";
78.55 @@ -213,7 +213,7 @@
78.56 "---------fun eval_boollist2sum ----------------------------------------------------------------";
78.57 fun lhs (Const ("HOL.eq",_) $ l $ _) = l
78.58 | lhs t = error("lhs called with (" ^ UnparseC.term t ^ ")");
78.59 -"-----------^^^redefined due to overwritten identifier -----------";
78.60 +"----------- \<up> redefined due to overwritten identifier -----------";
78.61 val u_ = str2t "[]";
78.62 val u_ = str2t "[b1 = k - 2*q]";
78.63 val u_ = str2t "[b1 = k - 2*q, b2 = k - 2*q, b3 = k - 2*q, b4 = k - 2*q]";
79.1 --- a/test/Tools/isac/Specify/m-match.sml Mon Apr 19 20:44:18 2021 +0200
79.2 +++ b/test/Tools/isac/Specify/m-match.sml Tue Apr 20 16:58:44 2021 +0200
79.3 @@ -62,7 +62,7 @@
79.4 (*...copied from LItool.tac_from_prog*)
79.5 TermC.str2term (
79.6 "SubProblem (EqSystemX, [LINEAR, system], [no_met]) " ^
79.7 - " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]," ^
79.8 + " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]," ^
79.9 " REAL_LIST [c, c_2]]");
79.10 val ags = isalist2list ags';
79.11 val pI = ["LINEAR", "system"];
79.12 @@ -87,7 +87,7 @@
79.13 (*...copied from LItool.tac_from_prog*)
79.14 TermC.str2term (
79.15 "SubProblem (EqSystemX, [LINEAR, system], [no_met]) " ^
79.16 - " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]," ^
79.17 + " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]," ^
79.18 " REAL_LIST [c, c_2], BOOL_LIST ss''']");
79.19 val ags = isalist2list ags';
79.20 val pI = ["LINEAR", "system"];
79.21 @@ -153,7 +153,7 @@
79.22 (*...copied from LItool.tac_from_prog*)
79.23 TermC.str2term (
79.24 "SubProblem (EqSystemX, [LINEAR, system], [no_met]) " ^
79.25 - " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]," ^
79.26 + " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]," ^
79.27 " REAL_LIST [c, c_2]]");
79.28 val ags = isalist2list ags';
79.29 val pI = ["LINEAR", "system"];
79.30 @@ -178,7 +178,7 @@
79.31 (*...copied from LItool.tac_from_prog*)
79.32 TermC.str2term (
79.33 "SubProblem (EqSystemX, [LINEAR, system], [no_met]) " ^
79.34 - " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L ^^^ 2 / 2]," ^
79.35 + " [BOOL_LIST [c_2 = 0, L * c + c_2 = q_0 * L \<up> 2 / 2]," ^
79.36 " REAL_LIST [c, c_2], BOOL_LIST ss''']");
79.37 val ags = isalist2list ags';
79.38 val pI = ["LINEAR", "system"];
80.1 --- a/test/Tools/isac/Specify/o-model.sml Mon Apr 19 20:44:18 2021 +0200
80.2 +++ b/test/Tools/isac/Specify/o-model.sml Tue Apr 20 16:58:44 2021 +0200
80.3 @@ -147,7 +147,7 @@
80.4 "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
80.5 "relations [A=a*b, (a/2)^2 + (b/2)^2 = r^2]",
80.6 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
80.7 - (*^^^ these are the elements for the root-problem (in variants)*)
80.8 + (* \<up> these are the elements for the root-problem (in variants)*)
80.9 (*vvv these are elements required for subproblems*)
80.10 "boundVariable a", "boundVariable b", "boundVariable alpha",
80.11 "interval {x::real. 0 <= x & x <= 2*r}",
80.12 @@ -180,7 +180,7 @@
80.13 (*\------- unused code -----------------------------------------------------------------------/*)
80.14
80.15 val filtered = map (filter_vat o_model) [1,2,3];
80.16 -(*DIFFERENT ARGUMENT HERE ^^^^^^^ DOES not CHANGE ANYTHING .. ?error?*)
80.17 +(*DIFFERENT ARGUMENT HERE \<up> \<up> ^ DOES not CHANGE ANYTHING .. ?error?*)
80.18
80.19 case filtered of
80.20 [[
81.1 --- a/test/Tools/isac/Specify/refine.sml Mon Apr 19 20:44:18 2021 +0200
81.2 +++ b/test/Tools/isac/Specify/refine.sml Tue Apr 20 16:58:44 2021 +0200
81.3 @@ -324,7 +324,7 @@
81.4 The failure might be caused by inappropriate problem-hierarchy.
81.5 *)
81.6 val c = [];
81.7 -val fmz = ["equality ((x+1)*(x+2)=x^^^2+(8::real))", "solveFor x",
81.8 +val fmz = ["equality ((x+1)*(x+2)=x \<up> 2+(8::real))", "solveFor x",
81.9 "errorBound (eps=0)", "solutions L"];
81.10 val (dI',pI',mI') = ("Test",["sqroot-test", "univariate", "equation", "test"],
81.11 ["Test", "squ-equ-test-subpbl1"]);
81.12 @@ -335,29 +335,29 @@
81.13
81.14 (*=== specify a not-matching problem ---vvvvvvvvvvvvvvvvvvvvvvvvvvvv*)
81.15 val nxt = (Specify_Problem ["LINEAR", "univariate", "equation", "test"]);
81.16 -(*=== specify a not-matching problem ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
81.17 +(*=== specify a not-matching problem --- \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^*)
81.18
81.19 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt; (*\<rightarrow>Add_Find "solutions L"*)
81.20
81.21 val www =
81.22 case f of Test_Out.PpcKF (Test_Out.Problem [],
81.23 {Find = [Incompl "solutions []"], With = [],
81.24 - Given = [Correct "equality ((x + 1) * (x + 2) = x ^^^ 2 + 8)", Correct "solveFor x"],
81.25 + Given = [Correct "equality ((x + 1) * (x + 2) = x \<up> 2 + 8)", Correct "solveFor x"],
81.26 Where = [False www(*! ! ! ! ! !*)],
81.27 Relate = [],...}) => www(*! ! !*)
81.28 | _ => error "--- Refine_Problem broken 1";
81.29 -if www = "matches (x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\nmatches (?b * x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\nmatches (?a + x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\nmatches (?a + ?b * x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8)"
81.30 +if www = "matches (x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\nmatches (?b * x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\nmatches (?a + x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\nmatches (?a + ?b * x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8)"
81.31 then () else error "--- Refine_Problem broken 2";
81.32 (*ML> f;
81.33 val it = Form' (Test_Out.PpcKF (0,EdUndef,0,Nundef,
81.34 (Problem ["LINEAR", "univariate", "equation", "test"], <<<<<===== diff.to above WN120313
81.35 {Find=[Incompl "solutions []"],
81.36 - Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
81.37 + Given=[Correct "equality ((x + #1) * (x + #2) = x \<up> #2 + #8)",
81.38 Correct "solveFor x"],Relate=[],
81.39 - Where=[False "matches (x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
81.40 - |\nmatches (?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
81.41 - |\nmatches (?a + x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
81.42 - |\nmatches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
81.43 + Where=[False "matches (x = #0) ((x + #1) * (x + #2) = x \<up> #2 + #8)
81.44 + |\nmatches (?b * x = #0) ((x + #1) * (x + #2) = x \<up> #2 + #8)
81.45 + |\nmatches (?a + x = #0) ((x + #1) * (x + #2) = x \<up> #2 + #8)
81.46 + |\nmatches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x \<up> #2 + #8)"],
81.47 With=[]}))) : mout
81.48 *)
81.49
81.50 @@ -420,11 +420,11 @@
81.51 (*if*) not preok (*then*);
81.52
81.53 (*+*)Pre_Conds.to_string xxxxx = "[\n" ^
81.54 - "(false, matches (x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\n" ^
81.55 - "matches (?b * x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\n" ^
81.56 - "matches (?a + x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8) \<or>\n" ^
81.57 - "matches (?a + ?b * x = 0) ((x + 1) * (x + 2) = x ^^^ 2 + 8))]";
81.58 - (*TermC.matches ^^^^^^^^^^^^^^^^ NONE, ok: why then NONE = Refine.problem below?*)
81.59 + "(false, matches (x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\n" ^
81.60 + "matches (?b * x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\n" ^
81.61 + "matches (?a + x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8) \<or>\n" ^
81.62 + "matches (?a + ?b * x = 0) ((x + 1) * (x + 2) = x \<up> 2 + 8))]";
81.63 + (*TermC.matches \<up> \<up> \<up> \<up> \<up> ^ NONE, ok: why then NONE = Refine.problem below?*)
81.64 (*-------------------- stop step into find_next_step ----------------------------------------*)
81.65 (*+ continue after find_next_step*)val (p_', tac) = (p_'_'''''_', tac'''''_')
81.66 (*\------------------- step into find_next_step --------------------------------------------/*)
81.67 @@ -456,7 +456,7 @@
81.68
81.69 (*=== refine problem -----vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*)
81.70 val nxt = (Refine_Problem ["univariate", "equation", "test"]);
81.71 -(*=== refine problem -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*)
81.72 +(*=== refine problem ----- \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> ^^*)
81.73 (*[], Pbl*)val (p,_,f,nxt,_,pt) = me nxt p c pt;
81.74 (*("Specify_Problem", Specify_Problem ["normalise", "univariate", ...])*)
81.75 val (p,_,f,nxt,_,pt) = me nxt p c pt;
82.1 --- a/test/Tools/isac/Specify/specify.sml Mon Apr 19 20:44:18 2021 +0200
82.2 +++ b/test/Tools/isac/Specify/specify.sml Tue Apr 20 16:58:44 2021 +0200
82.3 @@ -22,8 +22,8 @@
82.4 CalcTreeTEST
82.5 [(["fixedValues [r=Arbfix]", "maximum A",
82.6 "valuesFor [a,b]",
82.7 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
82.8 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
82.9 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
82.10 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
82.11 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos alpha]",
82.12
82.13 "boundVariable a", "boundVariable b", "boundVariable alpha",
82.14 @@ -46,25 +46,25 @@
82.15 (2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A]))]*)
82.16 val (pt,p) = Specify.finish_phase (pt,p);
82.17 val pits = get_obj g_pbl pt (fst p);
82.18 - if I_Model.to_string ctxt pits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(rs_, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]"
82.19 + if I_Model.to_string ctxt pits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] ,(rs_, [[A = a * b],[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]))]"
82.20 then () else error "completetest.sml: new behav. in Specify.finish_phase 3";
82.21 writeln (I_Model.to_string ctxt pits);
82.22 (*[
82.23 (1 ,[1,2,3] ,true,#Given,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),
82.24 (2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),
82.25 (3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(valuesFor, [[a],[b]])),
82.26 -(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^
82.27 -2 = r ^^^ 2] ,(relations, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]*)
82.28 +(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up>
82.29 +2 = r \<up> 2] ,(relations, [[A = a * b],[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]))]*)
82.30 val mits = get_obj g_met pt (fst p);
82.31 - if I_Model.to_string ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(rs_, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]"
82.32 + if I_Model.to_string ctxt mits = "[\n(1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),\n(2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),\n(3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a],[b]])),\n(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] ,(rs_, [[A = a * b],[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]])),\n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_, [a])),\n(9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(itv_, [{x. 0 <= x & x <= 2 * r}])),\n(11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(err_, [eps = 0]))]"
82.33 then () else error "completetest.sml: new behav. in Specify.finish_phase 3";
82.34 writeln (I_Model.to_string ctxt mits);
82.35 (*[
82.36 (1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),
82.37 (2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),
82.38 (3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(valuesFor, [[a],[b]])),
82.39 -(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^
82.40 -2 = r ^^^ 2] ,(relations, [[A = a * b],[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),
82.41 +(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up>
82.42 +2 = r \<up> 2] ,(relations, [[A = a * b],[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]])),
82.43 (6 ,[1] ,true ,#undef ,Cor boundVariable a ,(boundVariable, [a])),
82.44 (9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(interval, [{x.
82.45 0 <= x & x <= 2 * r}])),
82.46 @@ -79,8 +79,8 @@
82.47 CalcTreeTEST
82.48 [(["fixedValues [r=Arbfix]", "maximum A",
82.49 "valuesFor [a,b]",
82.50 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
82.51 - "relations [A=a*b, (a/2)^^^2 + (b/2)^^^2 = r^^^2]",
82.52 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
82.53 + "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
82.54 "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
82.55
82.56 "boundVariable a", "boundVariable b", "boundVariable alpha",
82.57 @@ -104,7 +104,7 @@
82.58 (1, ["1", "2", "3"], #Given,fixedValues, ["[r = Arbfix]"]),
82.59 (2, ["1", "2", "3"], #Find,maximum, ["A"]),
82.60 (3, ["1", "2", "3"], #Find,valuesFor, ["[a]", "[b]"]),
82.61 -(4, ["1", "2"], #Relate,relations, ["[A = a * b]", "[(a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]"]),
82.62 +(4, ["1", "2"], #Relate,relations, ["[A = a * b]", "[(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]"]),
82.63 (5, ["3"], #Relate,relations, ["[A = a * b]", "[a / 2 = r * sin alpha]", "[b / 2 = r * cos alpha]"]),
82.64 (6, ["1"], #undef,boundVariable, ["a"]),
82.65 (7, ["2"], #undef,boundVariable, ["b"]),
82.66 @@ -118,8 +118,8 @@
82.67 (1 ,[1,2,3] ,true,#Given ,Cor fixedValues [r = Arbfix],(fix_, [[r = Arbfix]])),
82.68 (2 ,[1,2,3] ,true,#Find ,Cor maximum A ,(m_, [A])),
82.69 (3 ,[1,2,3] ,true,#Find ,Cor valuesFor [a, b] ,(vs_, [[a, b]])),
82.70 -(4 ,[1,2] ,true,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^
82.71 -2 = r ^^^ 2] ,(rs_, [[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]]))]*)
82.72 +(4 ,[1,2] ,true,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up>
82.73 +2 = r \<up> 2] ,(rs_, [[A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]]))]*)
82.74 val mits = get_obj g_met pt (fst p);
82.75 val mits = I_Model.complete oris pits []
82.76 ((#ppc o MethodC.from_store) ["DiffApp", "max_by_calculus"]);
82.77 @@ -128,14 +128,14 @@
82.78 (1 ,[1,2,3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(fix_, [[r = Arbfix]])),
82.79 (2 ,[1,2,3] ,true ,#Find ,Cor maximum A ,(m_, [A])),
82.80 (3 ,[1,2,3] ,true ,#Find ,Cor valuesFor [a, b] ,(vs_, [[a, b]])),
82.81 -(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^
82.82 -2 = r ^^^ 2] ,(rs_, [[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])),
82.83 +(4 ,[1,2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up>
82.84 +2 = r \<up> 2] ,(rs_, [[A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]])),
82.85 (6 ,[1] ,true ,#undef ,Cor boundVariable a ,(boundVariable, [a])),
82.86 (9 ,[1,2] ,true ,#undef ,Cor interval {x. 0 <= x & x <= 2 * r} ,(interval, [{x.
82.87 0 <= x & x <= 2 * r}])),
82.88 (11 ,[1,2,3] ,true ,#undef ,Cor errorBound (eps = 0) ,(errorBound, [eps = 0]))]*)
82.89 if I_Model.to_string ctxt mits
82.90 - = "[\n(1 ,[1, 2, 3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])), \n(2 ,[1, 2, 3] ,true ,#Find ,Cor maximum A ,(m_m, [A])), \n(3 ,[1, 2, 3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a, b]])), \n(4 ,[1, 2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2] ,(r_s, [[A = a * b, (a / 2) ^^^ 2 + (b / 2) ^^^ 2 = r ^^^ 2]])), \n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_v, [a])), \n(9 ,[1, 2] ,true ,#undef ,Cor interval {x. 0 \<le> x \<and> x \<le> 2 * r} ,(i_tv, [{x. 0 \<le> x \<and> x \<le> 2 * r}])), \n(11 ,[1, 2, 3] ,true ,#undef ,Cor errorBound (eps = 0) ,(e_rr, [eps = 0]))]"
82.91 + = "[\n(1 ,[1, 2, 3] ,true ,#Given ,Cor fixedValues [r = Arbfix] ,(f_ix, [[r = Arbfix]])), \n(2 ,[1, 2, 3] ,true ,#Find ,Cor maximum A ,(m_m, [A])), \n(3 ,[1, 2, 3] ,true ,#Find ,Cor valuesFor [a, b] ,(v_s, [[a, b]])), \n(4 ,[1, 2] ,true ,#Relate ,Cor relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] ,(r_s, [[A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]])), \n(6 ,[1] ,true ,#undef ,Cor boundVariable a ,(v_v, [a])), \n(9 ,[1, 2] ,true ,#undef ,Cor interval {x. 0 \<le> x \<and> x \<le> 2 * r} ,(i_tv, [{x. 0 \<le> x \<and> x \<le> 2 * r}])), \n(11 ,[1, 2, 3] ,true ,#undef ,Cor errorBound (eps = 0) ,(e_rr, [eps = 0]))]"
82.92 then () else error "completetest.sml: new behav. in I_Model.complete 1";
82.93
82.94 open O_Model;
82.95 @@ -335,7 +335,7 @@
82.96 "(5, [\"1\"], #undef, FunktionsVariable, [\"x\"]), \n" ^
82.97 "(6, [\"1\"], #undef, GleichungsVariablen, [\"[c]\", \"[c_2]\", \"[c_3]\", \"[c_4]\"]), \n" ^
82.98 "(7, [\"1\"], #undef, AbleitungBiegelinie, [\"dy\"])]";
82.99 -(* ERROR -------^^^^^^ CORRECTED TO #Given *)
82.100 +(* ERROR ------- \<up> \<up> CORRECTED TO #Given *)
82.101 (*+*)if I_Model.to_string @{context} meth = "[\n" ^
82.102 "(1 ,[1] ,true ,#Given ,Cor Traegerlaenge L ,(l_l, [L])), \n" ^
82.103 "(2 ,[1] ,true ,#Given ,Cor Streckenlast q_0 ,(q_q, [q_0])), \n" ^
82.104 @@ -572,7 +572,7 @@
82.105 (*[1], Met*)val (p''''',_,f,nxt''''',_,pt''''') = me nxt p c pt; (*\<rightarrow>Add_Given "Biegelinie y"*)
82.106 (*/------------------- step into me\<rightarrow>Add_Given "Biegelinie y" ||||||||||||||||||||||||||||||\*)
82.107 (*+*)val Specify_Method ["Biegelinien", "ausBelastung"] = nxt;
82.108 -(*+*)(* by ^^^^^^^^^^^^ "id_fun" and "id_abl" must be requested: PUT THEM INTO O_Model*)
82.109 +(*+*)(* by \<up> \<up> \<up> \<up> "id_fun" and "id_abl" must be requested: PUT THEM INTO O_Model*)
82.110
82.111 "~ fun me , args:"; val (tac, p, _(*NEW remove*), pt) = (nxt, p, c, pt);
82.112
82.113 @@ -637,7 +637,7 @@
82.114 "(3, [\"1\"], #Find, Funktionen, [\"funs'''\"]), \n" ^
82.115 "(4, [\"1\"], #Given, Biegelinie, [\"y\"]), \n" ^ (*.. value from O_Model of root-problem*)
82.116 "(5, [\"1\"], #Given, AbleitungBiegelinie, [\"dy\"])]" (*.. value from O_Model of root-problem*)
82.117 -(* ^^^----- aim at dropping this field *)
82.118 +(* \<up> ----- aim at dropping this field *)
82.119 (*+*)then () else error "[Biegelinien, ausBelastung] O_Model EXTENDED BY MethodC CHANGED";
82.120 (*\------------------- check for entry to O_Model.complete_for -----------------------------/*)
82.121
82.122 @@ -674,7 +674,7 @@
82.123 "(3, [\"1\"], #Find, Funktionen, [\"funs'''\"]), \n" ^
82.124 "(4, [\"1\"], #Given, Biegelinie, [\"y\"]), \n" ^
82.125 "(5, [\"1\"], #Given, AbleitungBiegelinie, [\"dy\"])]"
82.126 -(* ^^^----- aim at dropping this field *)
82.127 +(* \<up> ----- aim at dropping this field *)
82.128 (*+*)then () else error "[Biegelinien, ausBelastung] O_Model EXTENDED BY MethodC CHANGED";
82.129 (*\------------------- check within O_Model.complete_for -------------------------------------------/*)
82.130
82.131 @@ -698,7 +698,7 @@
82.132 "~~~ from Step_Specify.by_tactic \<longrightarrow>Step.by_tactic \<longrightarrow>fun me , return:"; val ("ok", (_, _, (pt, p))) =
82.133 ("ok", ([], [], (pt, pos)));
82.134 (* val ("helpless", ([(xxxxx, _, _)], _, _)) = (*case*)*)
82.135 - (* SHOULD BE ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Add_Given "Biegelinie y" | Add_Given "AbleitungBiegelinie dy"*)
82.136 + (* SHOULD BE \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> \<up> Add_Given "Biegelinie y" | Add_Given "AbleitungBiegelinie dy"*)
82.137
82.138 val ("ok", ([( Add_Given "Biegelinie y", _, _)], [], _)) =
82.139 Step.do_next p ((pt, Pos.e_pos'), []) (*of*);
82.140 @@ -789,7 +789,7 @@
82.141 "(1, [\"1\"], #Given, Streckenlast, [\"q_0\"]), \n" ^
82.142 "(2, [\"1\"], #Given, FunktionsVariable, [\"x\"]), \n" ^
82.143 "(3, [\"1\"], #Find, Funktionen, [\"funs'''\"]), \n" ^
82.144 - "(4, [\"1\"], #Given, Biegelinie, [\"y\"]), \n" ^ (*-------------------^^^^^^^^^^^^^*)
82.145 + "(4, [\"1\"], #Given, Biegelinie, [\"y\"]), \n" ^ (*------------------- \<up> \<up> \<up> \<up> ^*)
82.146 "(5, [\"1\"], #Given, AbleitungBiegelinie, [\"dy\"])]"
82.147 (*+*)then () else error "[Biegelinien, ausBelastung] O_Model CHANGED for entry";
82.148 (*+*)if I_Model.to_string ctxt met = "[\n" ^
82.149 @@ -843,18 +843,18 @@
82.150 "(#Given, (FunktionsVariable, v_v))\", \"" ^
82.151 "(#Find, (Funktionen, funs'''))\"]"
82.152 (*+*)then () else error "seek_orits Model_Pattern of Subproblem CHANGED";
82.153 -(* root-vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -------------------------------------^^^*)
82.154 +(* root-vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ------------------------------------- \<up> *)
82.155 (*+*)if (Problem.from_store ["Biegelinien"] |> #ppc |> Model_Pattern.to_string) = "[\"" ^
82.156 "(#Given, (Traegerlaenge, l_l))\", \"" ^
82.157 "(#Given, (Streckenlast, q_q))\", \"" ^
82.158 - "(#Find, (Biegelinie, b_b))\", \"" ^ (*-------------------------------------^^^*)
82.159 + "(#Find, (Biegelinie, b_b))\", \"" ^ (*------------------------------------- \<up> *)
82.160 "(#Relate, (Randbedingungen, r_b))\"]"
82.161 (*+*)then () else error "seek_orits Model_Pattern root-problem CHANGED";
82.162 (* sub-vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*)
82.163 (*+*)if (MethodC.from_store ["Biegelinien", "ausBelastung"] |> #ppc |> Model_Pattern.to_string) = "[\"" ^
82.164 "(#Given, (Streckenlast, q__q))\", \"" ^
82.165 "(#Given, (FunktionsVariable, v_v))\", \"" ^
82.166 - "(#Given, (Biegelinie, id_fun))\", \"" ^ (*---------------------------------^^^*)
82.167 + "(#Given, (Biegelinie, id_fun))\", \"" ^ (*--------------------------------- \<up> *)
82.168 "(#Given, (AbleitungBiegelinie, id_der))\", \"" ^
82.169 "(#Find, (Funktionen, fun_s))\"]"
82.170 (*+*)then () else error "seek_orits Model_Pattern CHANGED";
83.1 --- a/test/Tools/isac/Specify/step-specify.sml Mon Apr 19 20:44:18 2021 +0200
83.2 +++ b/test/Tools/isac/Specify/step-specify.sml Tue Apr 20 16:58:44 2021 +0200
83.3 @@ -18,7 +18,7 @@
83.4 "----------- re-build: Step_Specify.do_next ---------------------------------------------------";
83.5 reset_states ();
83.6 CalcTree (*ATTENTION: encode_fmz ... unlike CalcTreeTEST*)
83.7 - [(["functionTerm (x^2 + 1)", "integrateBy x", "antiDerivative FF"],
83.8 + [(["functionTerm (x \<up> 2 + 1)", "integrateBy x", "antiDerivative FF"],
83.9 ("Integrate", ["integrate", "function"], ["diff", "integration"]))];
83.10 Iterator 1;
83.11 moveActiveRoot 1;
83.12 @@ -93,5 +93,5 @@
83.13
83.14 val (Form t,_,_) = ME_Misc.pt_extract ptp;
83.15
83.16 -if UnparseC.term t = "c + x + 1 / 3 * x ^^^ 3" andalso p = ([], Res) then ()
83.17 +if UnparseC.term t = "c + x + 1 / 3 * x \<up> 3" andalso p = ([], Res) then ()
83.18 else error "mathengine.sml -- fun autoCalculate -- end";
84.1 --- a/test/Tools/isac/Test_Isac_Short.thy Mon Apr 19 20:44:18 2021 +0200
84.2 +++ b/test/Tools/isac/Test_Isac_Short.thy Tue Apr 20 16:58:44 2021 +0200
84.3 @@ -184,18 +184,6 @@
84.4 (*called by Know_Store..*)
84.5 ML_file "BaseDefinitions/calcelems.sml"
84.6 ML_file "BaseDefinitions/termC.sml"
84.7 -ML \<open>
84.8 -\<close> ML \<open>
84.9 -\<close> ML \<open>
84.10 -\<close> ML \<open>
84.11 -\<close> ML \<open>
84.12 -\<close> ML \<open>
84.13 -\<close> ML \<open>
84.14 -\<close> ML \<open>
84.15 -\<close> ML \<open>
84.16 -\<close> ML \<open>
84.17 -\<close> ML \<open>
84.18 -\<close>
84.19 ML_file "BaseDefinitions/substitution.sml"
84.20 ML_file "BaseDefinitions/contextC.sml"
84.21 ML_file "BaseDefinitions/environment.sml"
84.22 @@ -289,7 +277,7 @@
84.23 ML_file "Knowledge/delete.sml"
84.24 ML_file "Knowledge/descript.sml"
84.25 ML_file "Knowledge/simplify.sml"
84.26 - ML_file "Knowledge/poly.sml"
84.27 +(*ML_file "Knowledge/poly.sml" ONLY ERROR BY REPLACING ^^^ \<rightarrow> \<up> *)
84.28 ML_file "Knowledge/gcd_poly_ml.sml"
84.29 ML_file "Knowledge/gcd_poly_winkler.sml" (*must be after gcd_poly_ml.sml: redefines functions*)
84.30 (*ML_file "Knowledge/rational.sml" Test_Isac_Short*)
84.31 @@ -578,7 +566,7 @@
84.32 --------------------------------------------------------------------------------
84.33 WN120317.TODO changeset 977788dfed26 dropped rateq:
84.34 # test --- repair NO asms from rls RatEq_eliminate --- shows error from 2002
84.35 - # test --- solve (1/x = 5, x) by me --- and --- x / (x ^ 2 - 6 * x + 9) - ...:
84.36 + # test --- solve (1/x = 5, x) by me --- and --- x / (x \<up> 2 - 6 * x + 9) - ...:
84.37 investigation Check_elementwise stopped due to too much effort finding out,
84.38 why Check_elementwise worked in 2002 in spite of the error.
84.39 --------------------------------------------------------------------------------
84.40 @@ -596,7 +584,7 @@
84.41 FOUND 120321: Theory.axioms_of doesnt find LENGTH_CONS etc, thus are in Isab
84.42 # mark twice thms (in isac + (later) in Isabelle) in Isac.thy
84.43 --------------------------------------------------------------------------------
84.44 - WN120320.TODO rlsthmsNOTisac: replace twice thms ^
84.45 + WN120320.TODO rlsthmsNOTisac: replace twice thms \<up>
84.46 --------------------------------------------------------------------------------
84.47 WN120320.TODO rlsthmsNOTisac: reconsider design of sym_* thms, see test
84.48 --- OLD compute rlsthmsNOTisac by eq_thmID ---: some are in isab, some in isac.