cleanup, naming: 'KEStore_Elems' in Tests now 'Test_KEStore_Elems', 'store_pbts' now 'add_pbts'
1 (* chapter 'Biegelinie' from the textbook:
2 Timischl, Kaiser. Ingenieur-Mathematik 3. Wien 1999. p.268-271.
3 author: Walther Neuper 050826,
4 (c) due to copyright terms
7 theory Biegelinie imports Integrate Equation EqSystem Atools begin
11 qq :: "real => real" (* Streckenlast *)
12 Q :: "real => real" (* Querkraft *)
13 Q' :: "real => real" (* Ableitung der Querkraft *)
14 M'_b :: "real => real" ("M'_b") (* Biegemoment *)
15 M'_b' :: "real => real" ("M'_b'") (* Ableitung des Biegemoments *)
16 y'' :: "real => real" (* 2.Ableitung der Biegeline *)
17 y' :: "real => real" (* Neigung der Biegeline *)
18 (*y :: "real => real" (* Biegeline *)*)
19 EI :: "real" (* Biegesteifigkeit *)
21 (*new Descriptions in the related problems*)
22 Traegerlaenge :: "real => una"
23 Streckenlast :: "real => una"
24 BiegemomentVerlauf :: "bool => una"
25 Biegelinie :: "(real => real) => una"
26 Randbedingungen :: "bool list => una"
27 RandbedingungenBiegung :: "bool list => una"
28 RandbedingungenNeigung :: "bool list => una"
29 RandbedingungenMoment :: "bool list => una"
30 RandbedingungenQuerkraft :: "bool list => una"
31 FunktionsVariable :: "real => una"
32 Funktionen :: "bool list => una"
33 Gleichungen :: "bool list => una"
36 Biegelinie2Script :: "[real,real,real,real=>real,bool list,
38 ("((Script Biegelinie2Script (_ _ _ _ _ =))// (_))" 9)
39 BiegelinieScript :: "[real,real,real,real=>real,bool list,bool list,
41 ("((Script BiegelinieScript (_ _ _ _ _ _ =))// (_))" 9)
42 Biege2xIntegrierenScript :: "[real,real,real,bool,real=>real,bool list,
44 ("((Script Biege2xIntegrierenScript (_ _ _ _ _ _ =))// (_))" 9)
45 Biege4x4SystemScript :: "[real,real,real,real=>real,bool list,
47 ("((Script Biege4x4SystemScript (_ _ _ _ _ =))// (_))" 9)
48 Biege1xIntegrierenScript ::
49 "[real,real,real,real=>real,bool list,bool list,bool list,
51 ("((Script Biege1xIntegrierenScript (_ _ _ _ _ _ _ =))// (_))" 9)
52 Belastung2BiegelScript :: "[real,real,
53 bool list] => bool list"
54 ("((Script Belastung2BiegelScript (_ _ =))// (_))" 9)
55 SetzeRandbedScript :: "[bool list,bool list,
56 bool list] => bool list"
57 ("((Script SetzeRandbedScript (_ _ =))// (_))" 9)
61 Querkraft_Belastung: "Q' x = -qq x" and
62 Belastung_Querkraft: "-qq x = Q' x" and
64 Moment_Querkraft: "M_b' x = Q x" and
65 Querkraft_Moment: "Q x = M_b' x" and
67 Neigung_Moment: "y'' x = -M_b x/ EI" and
68 Moment_Neigung: "M_b x = -EI * y'' x" and
70 (*according to rls 'simplify_Integral': .. = 1/a * .. instead .. = ../ a*)
71 make_fun_explicit: "Not (a =!= 0) ==> (a * (f x) = b) = (f x = 1/a * b)"
76 (** theory elements for transfer into html **)
78 store_isa ["IsacKnowledge"] [];
80 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
81 store_isa ["IsacKnowledge", theory2thyID thy, "Theorems"]
82 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
83 store_thm thy "IsacKnowledge" ("Belastung_Querkraft", prop_of @{thm Belastung_Querkraft})
84 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
85 store_thm thy "IsacKnowledge" ("Moment_Neigung", prop_of @{thm Moment_Neigung})
86 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
87 store_thm thy "IsacKnowledge" ("Moment_Querkraft", prop_of @{thm Moment_Querkraft})
88 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
89 store_thm thy "IsacKnowledge" ("Neigung_Moment", prop_of @{thm Neigung_Moment})
90 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
91 store_thm thy "IsacKnowledge" ("Querkraft_Belastung", prop_of @{thm Querkraft_Belastung})
92 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
93 store_thm thy "IsacKnowledge" ("Querkraft_Moment", prop_of @{thm Querkraft_Moment})
94 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
95 store_thm thy "IsacKnowledge" ("make_fun_explicit", prop_of @{thm make_fun_explicit})
96 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
103 (prep_pbt thy "pbl_bieg" [] e_pblID
105 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
106 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
107 ("#Find" ,["Biegelinie b_b"]),
108 ("#Relate",["Randbedingungen r_b"])
110 append_rls "e_rls" e_rls [],
112 [["IntegrierenUndKonstanteBestimmen2"]]));
115 (prep_pbt thy "pbl_bieg_mom" [] e_pblID
116 (["MomentBestimmte","Biegelinien"],
117 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
118 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
119 ("#Find" ,["Biegelinie b_b"]),
120 ("#Relate",["RandbedingungenBiegung r_b","RandbedingungenMoment r_m"])
122 append_rls "e_rls" e_rls [],
124 [["IntegrierenUndKonstanteBestimmen"]]));
127 (prep_pbt thy "pbl_bieg_momg" [] e_pblID
128 (["MomentGegebene","Biegelinien"],
130 append_rls "e_rls" e_rls [],
132 [["IntegrierenUndKonstanteBestimmen","2xIntegrieren"]]));
135 (prep_pbt thy "pbl_bieg_einf" [] e_pblID
136 (["einfache","Biegelinien"],
138 append_rls "e_rls" e_rls [],
140 [["IntegrierenUndKonstanteBestimmen","4x4System"]]));
143 (prep_pbt thy "pbl_bieg_momquer" [] e_pblID
144 (["QuerkraftUndMomentBestimmte","Biegelinien"],
146 append_rls "e_rls" e_rls [],
148 [["IntegrierenUndKonstanteBestimmen","1xIntegrieren"]]));
151 (prep_pbt thy "pbl_bieg_vonq" [] e_pblID
152 (["vonBelastungZu","Biegelinien"],
153 [("#Given" ,["Streckenlast q_q","FunktionsVariable v_v"]),
154 ("#Find" ,["Funktionen funs'''"])],
155 append_rls "e_rls" e_rls [],
157 [["Biegelinien","ausBelastung"]]));
160 (prep_pbt thy "pbl_bieg_randbed" [] e_pblID
161 (["setzeRandbedingungen","Biegelinien"],
162 [("#Given" ,["Funktionen fun_s","Randbedingungen r_b"]),
163 ("#Find" ,["Gleichungen equs'''"])],
164 append_rls "e_rls" e_rls [],
166 [["Biegelinien","setzeRandbedingungenEin"]]));
169 (prep_pbt thy "pbl_equ_fromfun" [] e_pblID
170 (["makeFunctionTo","equation"],
171 [("#Given" ,["functionEq fu_n","substitution su_b"]),
172 ("#Find" ,["equality equ'''"])],
173 append_rls "e_rls" e_rls [],
175 [["Equation","fromFunction"]]));
176 KEStore_Elems.get_ptyps @{theory};
178 setup {* KEStore_Elems.add_pbts
179 [(prep_pbt thy "pbl_bieg" [] e_pblID
181 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
182 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
183 ("#Find" ,["Biegelinie b_b"]),
184 ("#Relate",["Randbedingungen r_b"])],
185 append_rls "e_rls" e_rls [], NONE, [["IntegrierenUndKonstanteBestimmen2"]])),
186 (prep_pbt thy "pbl_bieg_mom" [] e_pblID
187 (["MomentBestimmte","Biegelinien"],
188 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q_q"]),
189 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
190 ("#Find" ,["Biegelinie b_b"]),
191 ("#Relate",["RandbedingungenBiegung r_b","RandbedingungenMoment r_m"])
193 append_rls "e_rls" e_rls [], NONE, [["IntegrierenUndKonstanteBestimmen"]])),
194 (prep_pbt thy "pbl_bieg_momg" [] e_pblID
195 (["MomentGegebene","Biegelinien"], [], append_rls "e_rls" e_rls [], NONE,
196 [["IntegrierenUndKonstanteBestimmen","2xIntegrieren"]])),
197 (prep_pbt thy "pbl_bieg_einf" [] e_pblID
198 (["einfache","Biegelinien"], [], append_rls "e_rls" e_rls [], NONE,
199 [["IntegrierenUndKonstanteBestimmen","4x4System"]])),
200 (prep_pbt thy "pbl_bieg_momquer" [] e_pblID
201 (["QuerkraftUndMomentBestimmte","Biegelinien"], [], append_rls "e_rls" e_rls [], NONE,
202 [["IntegrierenUndKonstanteBestimmen","1xIntegrieren"]])),
203 (prep_pbt thy "pbl_bieg_vonq" [] e_pblID
204 (["vonBelastungZu","Biegelinien"],
205 [("#Given" ,["Streckenlast q_q","FunktionsVariable v_v"]),
206 ("#Find" ,["Funktionen funs'''"])],
207 append_rls "e_rls" e_rls [], NONE, [["Biegelinien","ausBelastung"]])),
208 (prep_pbt thy "pbl_bieg_randbed" [] e_pblID
209 (["setzeRandbedingungen","Biegelinien"],
210 [("#Given" ,["Funktionen fun_s","Randbedingungen r_b"]),
211 ("#Find" ,["Gleichungen equs'''"])],
212 append_rls "e_rls" e_rls [], NONE, [["Biegelinien","setzeRandbedingungenEin"]])),
213 (prep_pbt thy "pbl_equ_fromfun" [] e_pblID
214 (["makeFunctionTo","equation"],
215 [("#Given" ,["functionEq fu_n","substitution su_b"]),
216 ("#Find" ,["equality equ'''"])],
217 append_rls "e_rls" e_rls [], NONE, [["Equation","fromFunction"]]))] *}
221 val srls = Rls {id="srls_IntegrierenUnd..",
223 rew_ord = ("termlessI",termlessI),
224 erls = append_rls "erls_in_srls_IntegrierenUnd.." e_rls
225 [(*for asm in NTH_CONS ...*)
226 Calc ("Orderings.ord_class.less",eval_equ "#less_"),
227 (*2nd NTH_CONS pushes n+-1 into asms*)
228 Calc("Groups.plus_class.plus", eval_binop "#add_")
230 srls = Erls, calc = [], errpatts = [],
231 rules = [Thm ("NTH_CONS",num_str @{thm NTH_CONS}),
232 Calc("Groups.plus_class.plus", eval_binop "#add_"),
233 Thm ("NTH_NIL",num_str @{thm NTH_NIL}),
234 Calc("Tools.lhs", eval_lhs"eval_lhs_"),
235 Calc("Tools.rhs", eval_rhs"eval_rhs_"),
236 Calc("Atools.argument'_in",
237 eval_argument_in "Atools.argument'_in")
242 Rls {id="srls_IntegrierenUnd..",
244 rew_ord = ("termlessI",termlessI),
245 erls = append_rls "erls_in_srls_IntegrierenUnd.." e_rls
246 [(*for asm in NTH_CONS ...*)
247 Calc ("Orderings.ord_class.less",eval_equ "#less_"),
248 (*2nd NTH_CONS pushes n+-1 into asms*)
249 Calc("Groups.plus_class.plus", eval_binop "#add_")
251 srls = Erls, calc = [], errpatts = [],
252 rules = [Thm ("NTH_CONS",num_str @{thm NTH_CONS}),
253 Calc("Groups.plus_class.plus", eval_binop "#add_"),
254 Thm ("NTH_NIL", num_str @{thm NTH_NIL}),
255 Calc("Tools.lhs", eval_lhs "eval_lhs_"),
256 Calc("Atools.filter'_sameFunId",
257 eval_filter_sameFunId "Atools.filter'_sameFunId"),
258 (*WN070514 just for smltest/../biegelinie.sml ...*)
259 Calc("Atools.sameFunId", eval_sameFunId "Atools.sameFunId"),
260 Thm ("filter_Cons", num_str @{thm filter_Cons}),
261 Thm ("filter_Nil", num_str @{thm filter_Nil}),
262 Thm ("if_True", num_str @{thm if_True}),
263 Thm ("if_False", num_str @{thm if_False}),
264 Thm ("hd_thm", num_str @{thm hd_thm})
271 (prep_met thy "met_biege" [] e_metID
272 (["IntegrierenUndKonstanteBestimmen"],
273 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q__q", "FunktionsVariable v_v"]),
274 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
275 ("#Find" ,["Biegelinie b_b"]),
276 ("#Relate",["RandbedingungenBiegung r_b", "RandbedingungenMoment r_m"])],
277 {rew_ord'="tless_true",
278 rls' = append_rls "erls_IntegrierenUndK.." e_rls
279 [Calc ("Atools.ident",eval_ident "#ident_"),
280 Thm ("not_true",num_str @{thm not_true}),
281 Thm ("not_false",num_str @{thm not_false})],
282 calc = [], srls = srls, prls = Erls, crls = Atools_erls, errpats = [], nrls = Erls},
283 "Script BiegelinieScript " ^
284 "(l_l::real) (q__q::real) (v_v::real) (b_b::real=>real) " ^
285 "(r_b::bool list) (r_m::bool list) = " ^
286 " (let q___q = Take (qq v_v = q__q); " ^
287 " q___q = ((Rewrite sym_neg_equal_iff_equal True) @@ " ^
288 " (Rewrite Belastung_Querkraft True)) q___q; " ^
289 " (Q__Q:: bool) = " ^
290 " (SubProblem (Biegelinie',[named,integrate,function], " ^
291 " [diff,integration,named]) " ^
292 " [REAL (rhs q___q), REAL v_v, REAL_REAL Q]); " ^
293 " Q__Q = Rewrite Querkraft_Moment True Q__Q; " ^
295 " (SubProblem (Biegelinie',[named,integrate,function], " ^
296 " [diff,integration,named]) " ^
297 " [REAL (rhs Q__Q), REAL v_v, REAL_REAL M_b]); " ^
298 (*([5], Res), M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2*)
299 " e__1 = NTH 1 r_m; " ^
300 " (x__1::real) = argument_in (lhs e__1); " ^
301 " (M__1::bool) = (Substitute [v_v = x__1]) M__M; " ^
302 (*([6], Res), M_b 0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2*)
303 " M__1 = (Substitute [e__1]) M__1; " ^
304 (*([7], Res), 0 = c_2 + c * 0 + -1 * q_0 / 2 * 0 ^^^ 2*)
305 " M__2 = Take M__M; " ^
306 (*([8], Frm), M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2*)
307 (*without above Take 'Substitute [v_v = x__2]' takes _last formula from ctree_*)
308 " e__2 = NTH 2 r_m; " ^
309 " (x__2::real) = argument_in (lhs e__2); " ^
310 " (M__2::bool) = (Substitute [v_v = x__2]) M__M; " ^
311 (*([8], Res), M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
312 " M__2 = (Substitute [e__2]) M__2; " ^
314 " (c_1_2::bool list) = " ^
315 " (SubProblem (Biegelinie',[LINEAR,system],[no_met]) " ^
316 " [BOOL_LIST [M__1, M__2], REAL_LIST [c,c_2]]); " ^
317 " M__M = Take M__M; " ^
318 " M__M = ((Substitute c_1_2) @@ " ^
319 " (Try (Rewrite_Set_Inst [(bdv_1, c),(bdv_2, c_2)] " ^
320 " simplify_System False)) @@ " ^
321 " (Rewrite Moment_Neigung False) @@ " ^
322 " (Rewrite make_fun_explicit False)) M__M; " ^
323 (*----------------------- and the same once more ------------------------*)
324 " (N__N:: bool) = " ^
325 " (SubProblem (Biegelinie',[named,integrate,function], " ^
326 " [diff,integration,named]) " ^
327 " [REAL (rhs M__M), REAL v_v, REAL_REAL y']); " ^
328 " (B__B:: bool) = " ^
329 " (SubProblem (Biegelinie',[named,integrate,function], " ^
330 " [diff,integration,named]) " ^
331 " [REAL (rhs N__N), REAL v_v, REAL_REAL y]); " ^
332 " e__1 = NTH 1 r_b; " ^
333 " (x__1::real) = argument_in (lhs e__1); " ^
334 " (B__1::bool) = (Substitute [v_v = x__1]) B__B; " ^
335 " B__1 = (Substitute [e__1]) B__1 ; " ^
336 " B__2 = Take B__B; " ^
337 " e__2 = NTH 2 r_b; " ^
338 " (x__2::real) = argument_in (lhs e__2); " ^
339 " (B__2::bool) = (Substitute [v_v = x__2]) B__B; " ^
340 " B__2 = (Substitute [e__2]) B__2 ; " ^
341 " (c_1_2::bool list) = " ^
342 " (SubProblem (Biegelinie',[LINEAR,system],[no_met]) " ^
343 " [BOOL_LIST [B__1, B__2], REAL_LIST [c,c_2]]); " ^
344 " B__B = Take B__B; " ^
345 " B__B = ((Substitute c_1_2) @@ " ^
346 " (Rewrite_Set_Inst [(bdv, x)] make_ratpoly_in False)) B__B " ^
352 (prep_met thy "met_biege_2" [] e_metID
353 (["IntegrierenUndKonstanteBestimmen2"],
354 [("#Given" ,["Traegerlaenge l_l", "Streckenlast q__q", "FunktionsVariable v_v"]),
355 (*("#Where",["0 < l_l"]), ...wait for < and handling Arbfix*)
356 ("#Find" ,["Biegelinie b_b"]),
357 ("#Relate",["Randbedingungen r_b"])],
358 {rew_ord'="tless_true",
359 rls' = append_rls "erls_IntegrierenUndK.." e_rls
360 [Calc ("Atools.ident",eval_ident "#ident_"),
361 Thm ("not_true",num_str @{thm not_true}),
362 Thm ("not_false",num_str @{thm not_false})],
364 srls = append_rls "erls_IntegrierenUndK.." e_rls
365 [Calc("Tools.rhs", eval_rhs"eval_rhs_"),
366 Calc ("Atools.ident",eval_ident "#ident_"),
367 Thm ("last_thmI",num_str @{thm last_thmI}),
368 Thm ("if_True",num_str @{thm if_True}),
369 Thm ("if_False",num_str @{thm if_False})],
370 prls = Erls, crls = Atools_erls, errpats = [], nrls = Erls},
371 "Script Biegelinie2Script " ^
372 "(l_l::real) (q__q::real) (v_v::real) (b_b::real=>real) (r_b::bool list) = " ^
374 " (fun_s:: bool list) = " ^
375 " (SubProblem (Biegelinie',[vonBelastungZu,Biegelinien], " ^
376 " [Biegelinien,ausBelastung]) " ^
377 " [REAL q__q, REAL v_v]); " ^
378 " (equ_s::bool list) = " ^
379 " (SubProblem (Biegelinie',[setzeRandbedingungen,Biegelinien], " ^
380 " [Biegelinien,setzeRandbedingungenEin]) " ^
381 " [BOOL_LIST fun_s, BOOL_LIST r_b]); " ^
382 " (con_s::bool list) = " ^
383 " (SubProblem (Biegelinie',[LINEAR,system],[no_met]) " ^
384 " [BOOL_LIST equ_s, REAL_LIST [c,c_2,c_3,c_4]]); " ^
385 " B_B = Take (lastI fun_s); " ^
386 " B_B = ((Substitute con_s) @@ " ^
387 " (Rewrite_Set_Inst [(bdv, v_v)] make_ratpoly_in False)) B_B " ^
394 (prep_met thy "met_biege_intconst_2" [] e_metID
395 (["IntegrierenUndKonstanteBestimmen","2xIntegrieren"],
397 {rew_ord'="tless_true", rls'=Erls, calc = [],
400 crls = Atools_erls, errpats = [], nrls = e_rls},
405 (prep_met thy "met_biege_intconst_4" [] e_metID
406 (["IntegrierenUndKonstanteBestimmen","4x4System"],
408 {rew_ord'="tless_true", rls'=Erls, calc = [],
411 crls = Atools_erls, errpats = [], nrls = e_rls},
416 (prep_met thy "met_biege_intconst_1" [] e_metID
417 (["IntegrierenUndKonstanteBestimmen","1xIntegrieren"],
419 {rew_ord'="tless_true", rls'=Erls, calc = [],
422 crls = Atools_erls, errpats = [], nrls = e_rls},
427 (prep_met thy "met_biege2" [] e_metID
430 {rew_ord'="tless_true", rls'=Erls, calc = [],
433 crls = Atools_erls, errpats = [], nrls = e_rls},
440 (prep_met thy "met_biege_ausbelast" [] e_metID
441 (["Biegelinien", "ausBelastung"],
442 [("#Given" ,["Streckenlast q__q", "FunktionsVariable v_v"]),
443 ("#Find" ,["Funktionen fun_s"])],
444 {rew_ord'="tless_true",
445 rls' = append_rls "erls_ausBelastung" e_rls
446 [Calc ("Atools.ident", eval_ident "#ident_"),
447 Thm ("not_true", num_str @{thm not_true}),
448 Thm ("not_false", num_str @{thm not_false})],
450 srls = append_rls "srls_ausBelastung" e_rls
451 [Calc ("Tools.rhs", eval_rhs "eval_rhs_")],
452 prls = e_rls, crls = Atools_erls, errpats = [], nrls = e_rls},
453 "Script Belastung2BiegelScript (q__q::real) (v_v::real) = " ^
454 " (let q___q = Take (qq v_v = q__q); " ^
455 " q___q = ((Rewrite sym_neg_equal_iff_equal True) @@ " ^
456 " (Rewrite Belastung_Querkraft True)) q___q; " ^
457 " (Q__Q:: bool) = " ^
458 " (SubProblem (Biegelinie',[named,integrate,function], " ^
459 " [diff,integration,named]) " ^
460 " [REAL (rhs q___q), REAL v_v, REAL_REAL Q]); " ^
461 " M__M = Rewrite Querkraft_Moment True Q__Q; " ^
463 " (SubProblem (Biegelinie',[named,integrate,function], " ^
464 " [diff,integration,named]) " ^
465 " [REAL (rhs M__M), REAL v_v, REAL_REAL M_b]); " ^
466 " N__N = ((Rewrite Moment_Neigung False) @@ " ^
467 " (Rewrite make_fun_explicit False)) M__M; " ^
468 " (N__N:: bool) = " ^
469 " (SubProblem (Biegelinie',[named,integrate,function], " ^
470 " [diff,integration,named]) " ^
471 " [REAL (rhs N__N), REAL v_v, REAL_REAL y']); " ^
472 " (B__B:: bool) = " ^
473 " (SubProblem (Biegelinie',[named,integrate,function], " ^
474 " [diff,integration,named]) " ^
475 " [REAL (rhs N__N), REAL v_v, REAL_REAL y]) " ^
476 " in [Q__Q, M__M, N__N, B__B])"
482 (prep_met thy "met_biege_setzrand" [] e_metID
483 (["Biegelinien", "setzeRandbedingungenEin"],
484 [("#Given" , ["Funktionen fun_s", "Randbedingungen r_b"]),
485 ("#Find" , ["Gleichungen equs'''"])],
486 {rew_ord'="tless_true", rls'=Erls, calc = [],
489 crls = Atools_erls, errpats = [], nrls = e_rls},
490 "Script SetzeRandbedScript (fun_s::bool list) (r_b::bool list) = " ^
491 " (let b_1 = NTH 1 r_b; " ^
492 " f_s = filter_sameFunId (lhs b_1) fun_s; " ^
494 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
495 " [Equation,fromFunction]) " ^
496 " [BOOL (hd f_s), BOOL b_1]); " ^
497 " b_2 = NTH 2 r_b; " ^
498 " f_s = filter_sameFunId (lhs b_2) fun_s; " ^
500 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
501 " [Equation,fromFunction]) " ^
502 " [BOOL (hd f_s), BOOL b_2]); " ^
503 " b_3 = NTH 3 r_b; " ^
504 " f_s = filter_sameFunId (lhs b_3) fun_s; " ^
506 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
507 " [Equation,fromFunction]) " ^
508 " [BOOL (hd f_s), BOOL b_3]); " ^
509 " b_4 = NTH 4 r_b; " ^
510 " f_s = filter_sameFunId (lhs b_4) fun_s; " ^
512 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
513 " [Equation,fromFunction]) " ^
514 " [BOOL (hd f_s), BOOL b_4]) " ^
515 " in [e_1, e_2, e_3, e_4])"
516 (* filter requires more than 1 sec !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
517 "Script SetzeRandbedScript (fun_s::bool list) (r_b::bool list) = " ^
518 " (let b_1 = NTH 1 r_b; " ^
519 " f_s = filter (sameFunId (lhs b_1)) fun_s; " ^
521 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
522 " [Equation,fromFunction]) " ^
523 " [BOOL (hd f_s), BOOL b_1]); " ^
524 " b_2 = NTH 2 r_b; " ^
525 " f_s = filter (sameFunId (lhs b_2)) fun_s; " ^
527 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
528 " [Equation,fromFunction]) " ^
529 " [BOOL (hd f_s), BOOL b_2]); " ^
530 " b_3 = NTH 3 r_b; " ^
531 " f_s = filter (sameFunId (lhs b_3)) fun_s; " ^
533 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
534 " [Equation,fromFunction]) " ^
535 " [BOOL (hd f_s), BOOL b_3]); " ^
536 " b_4 = NTH 4 r_b; " ^
537 " f_s = filter (sameFunId (lhs b_4)) fun_s; " ^
539 " (SubProblem (Biegelinie',[makeFunctionTo,equation]," ^
540 " [Equation,fromFunction]) " ^
541 " [BOOL (hd f_s), BOOL b_4]) " ^
542 " in [e_1,e_2,e_3,e_4])"*)
548 (prep_met thy "met_equ_fromfun" [] e_metID
549 (["Equation","fromFunction"],
550 [("#Given" ,["functionEq fu_n","substitution su_b"]),
551 ("#Find" ,["equality equ'''"])],
552 {rew_ord'="tless_true", rls'=Erls, calc = [],
553 srls = append_rls "srls_in_EquationfromFunc" e_rls
554 [Calc("Tools.lhs", eval_lhs"eval_lhs_"),
555 Calc("Atools.argument'_in", eval_argument_in "Atools.argument'_in")],
556 prls=e_rls, crls = Atools_erls, errpats = [], nrls = e_rls},
557 (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) (M_b L = 0) -->
558 0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
559 "Script Function2Equality (fu_n::bool) (su_b::bool) =" ^
560 " (let fu_n = Take fu_n; " ^
561 " bd_v = argument_in (lhs fu_n); " ^
562 " va_l = argument_in (lhs su_b); " ^
563 " eq_u = (Substitute [bd_v = va_l]) fu_n; " ^
564 (*([1], Res), M_b L = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
565 " eq_u = (Substitute [su_b]) eq_u " ^
566 " in (Rewrite_Set norm_Rational False) eq_u) "