1 (* tests on AlgEin, Algebra Einf"uhrung, , Unterrichtsversuch IMST-Projekt
2 author: Walther Neuper 2007
3 (c) due to copyright terms
5 use"../smltest/IsacKnowledge/algein.sml";
9 "-----------------------------------------------------------------";
10 "table of contents -----------------------------------------------";
11 "-----------------------------------------------------------------";
12 "----------- build method 'Berechnung' 'erstSymbolisch' ----------";
13 "----------- me 'Berechnung' 'erstNumerisch' ---------------------";
14 "----------- auto 'Berechnung' 'erstSymbolisch' ------------------";
15 "----------- Widerspruch 3 = 777 ---------------------------------";
16 "-----------------------------------------------------------------";
17 "-----------------------------------------------------------------";
18 "-----------------------------------------------------------------";
20 val thy = @{theory "AlgEin"};
23 (* use"../smltest/IsacKnowledge/algein.sml";
26 "----------- build method 'Berechnung' 'erstSymbolisch' ----------";
27 "----------- build method 'Berechnung' 'erstSymbolisch' ----------";
28 "----------- build method 'Berechnung' 'erstSymbolisch' ----------";
30 "Script RechnenSymbolScript (k_::bool) (q__::bool) \
31 \(u_::bool list) (s_::bool list) (o_::bool list) (l_::real) =\
35 (*=== inhibit exn 110722=============================================================
36 val sc = ((inst_abs thy) o term_of o the o (parse thy)) str;
37 === inhibit exn 110722=============================================================*)
40 (*=== inhibit exn 110722=============================================================
41 val sc = ((inst_abs thy) o term_of o the o (parse thy)) str;
45 === inhibit exn 110722=============================================================*)
47 "----------- me 'Berechnung' 'erstNumerisch' ---------------------";
48 "----------- me 'Berechnung' 'erstNumerisch' ---------------------";
49 "----------- me 'Berechnung' 'erstNumerisch' ---------------------";
51 ["KantenLaenge (k=10)","Querschnitt (q=1)",
52 "KantenUnten [b1 = k - 2*q, b2 = k - 2*q, b3 = k - 2*q, b4 = k - 2*q ]",
53 "KantenSenkrecht [v1 = k, v2 = k, v3 = k, v4 = k]",
54 "KantenOben [t1 = k - 2*q, t2 = k - 2*q, t3 = k - 2*q, t4 = k - 2*q ]",
57 ("Isac",["numerischSymbolische", "Berechnung"],
58 ["Berechnung","erstNumerisch"]);
59 val p = e_pos'; val c = [];
60 (*=== inhibit exn 110722=============================================================
61 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))](*nxt = ("Model_Pr*);
62 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Given "KantenLaenge (k = 10)"*);
63 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Given "Querschnitt (q = 1)"*);
64 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Given "KantenUnten [b1 = k - 2*q]"*);
65 val (p,_,f,nxt,_,pt) = me nxt p c pt(*..KantenUnten [b2 = k - 2 * q, b3=..b4*);
66 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Given "KantenSenkrecht [v1 = k]"*);
67 val (p,_,f,nxt,_,pt) = me nxt p c pt(*..KantenSenkrecht [v2 = k, v3 = k, v4]*);
68 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Given "KantenOben [b1 = k - 2 *q])*);
69 val (p,_,f,nxt,_,pt) = me nxt p c pt(*..KantenOben [b2 = k - 2 * q, b3 =, b4*);
70 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Add_Find "GesamtLaenge L"*);
71 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Specify_Theory "AlgEin"*);
72 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Specify_Problem ["numerischSymbolis,Be*);
73 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Specify_Method ["Berechnung", "erstSym*);
74 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Apply_Method*);
75 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Substitute["Oben = boollist2sum [b1 =*);
77 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Substitute ["t1 = k - 2 * q", *);f2str f;
78 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Substitute ["k = 10", "q = 1"]*);f2str f;
79 val (p,_,f,nxt,_,pt) = me nxt p c pt(*Rewrite_Set "norm_Rational"*);f2str f;
80 val (p,_,f,nxt,_,pt) = me nxt p c pt(**);
81 if f2str f = "L = 32 + senkrecht + unten" then ()
82 else error "algein.sml diff.behav. in erstSymbolisch 1";
83 val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f;
84 val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f;
85 val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f;
86 val (p,_,f,nxt,_,pt) = me nxt p c pt;val(p,_,f,nxt,_,pt)=me nxt p c pt;f2str f;
87 val (p,_,f,nxt,_,pt) = me nxt p c pt;
88 if f2str f = "L = 104" andalso nxt = ("End_Proof'", End_Proof') then ()
89 else error "algein.sml diff.behav. in erstSymbolisch 99";
91 === inhibit exn 110722=============================================================*)
93 "----------- auto 'Berechnung' 'erstSymbolisch' ------------------";
94 "----------- auto 'Berechnung' 'erstSymbolisch' ------------------";
95 "----------- auto 'Berechnung' 'erstSymbolisch' ------------------";
97 [(["KantenLaenge (k=10)","Querschnitt (q=1)",
98 "KantenUnten [b1 = k - 2*q, b2 = k - 2*q, b3 = k - 2*q, b4 = k - 2*q ]",
99 "KantenSenkrecht [v1 = k, v2 = k, v3 = k, v4 = k]",
100 "KantenOben [t1 = k - 2*q, t2 = k - 2*q, t3 = k - 2*q, t4 = k - 2*q ]",
102 ("Isac",["numerischSymbolische", "Berechnung"],
103 ["Berechnung","erstSymbolisch"]))];
106 autoCalculate 1 CompleteCalc;
107 val ((pt,p),_) = get_calc 1; show_pt pt;
108 (*=== inhibit exn 110722=============================================================
109 if p = ([], Res) andalso term2str (get_obj g_res pt (fst p)) = "L = 104" then()
110 else error "algein.sml: 'Berechnung' 'erstSymbolisch' changed";
111 ===== inhibit exn 110722===========================================================*)
115 trace_rewrite:=false;
119 "----------- Widerspruch 3 = 777 ---------------------------------";
120 "----------- Widerspruch 3 = 777 ---------------------------------";
121 "----------- Widerspruch 3 = 777 ---------------------------------";
122 val thy = @{theory "Isac"};
123 val rew_ord = dummy_ord;
125 (*===== inhibit exn 110722===========================================================
126 val thm = assoc_thm' thy ("sym_real_mult_0_right","");
127 val t = str2term "0 = 0";
128 val SOME (t',_) = rewrite_ thy rew_ord erls false thm t;
130 (********"0 = ?z1 * 0"*)
132 (*testing code in ME/appl.sml*)
133 val sube = ["?z1 = 3"];
134 val subte = sube2subte sube;
135 val subst = sube2subst thy sube;
136 foldl and_ (true, map contains_Var subte);
138 val t'' = subst_atomic subst t';
140 (********"0 = 3 * 0"*)
141 ===== inhibit exn 110722===========================================================*)
143 val thm = assoc_thm' thy ("sym","");
144 (*----- STOPPED.WN0x?: Widerspruch 3 = 777: sym contains "==>" instead of "=" !!!
145 val SOME (t''',_) = rewrite_ thy rew_ord erls false thm t'';
148 (* use"../smltest/IsacKnowledge/algein.sml";