1 (* chapter 'Biegelinie' from the textbook:
2 Timischl, Kaiser. Ingenieur-Mathematik 3. Wien 1999. p.268-271.
3 authors: Walther Neuper 2005
4 (c) due to copyright terms
6 use"IsacKnowledge/Biegelinie.ML";
10 remove_thy"Biegelinie";
11 use_thy"IsacKnowledge/Isac";
14 (** interface isabelle -- isac **)
16 theory' := overwritel (!theory', [("Biegelinie.thy",Biegelinie.thy)]);
18 (** theory elements **)
20 store_isa ["IsacKnowledge"] [];
21 store_thy Biegelinie.thy
22 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
23 store_isa ["IsacKnowledge", theory2thyID Biegelinie.thy, "Theorems"]
24 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
25 store_thm Biegelinie.thy ("Belastung_Querkraft", Belastung_Querkraft)
26 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
27 store_thm Biegelinie.thy ("Moment_Neigung", Moment_Neigung)
28 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
29 store_thm Biegelinie.thy ("Moment_Querkraft", Moment_Querkraft)
30 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
31 store_thm Biegelinie.thy ("Neigung_Moment", Neigung_Moment)
32 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
33 store_thm Biegelinie.thy ("Querkraft_Belastung", Querkraft_Belastung)
34 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
35 store_thm Biegelinie.thy ("Querkraft_Moment", Querkraft_Moment)
36 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
37 store_thm Biegelinie.thy ("make_fun_explicit", make_fun_explicit)
38 ["Walther Neuper 2005 supported by a grant from NMI Austria"];
44 (prep_pbt Biegelinie.thy "pbl_bieg" [] e_pblID
46 [("#Given" ,["Traegerlaenge l_", "Streckenlast q_"]),
47 (*("#Where",["0 < l_"]), ...wait for < and handling Arbfix*)
48 ("#Find" ,["Biegelinie b_"]),
49 ("#Relate",["Randbedingungen rb_"])
51 append_rls "e_rls" e_rls [],
53 [["IntegrierenUndKonstanteBestimmen2"]]));
56 (prep_pbt Biegelinie.thy "pbl_bieg_mom" [] e_pblID
57 (["MomentBestimmte","Biegelinien"],
58 [("#Given" ,["Traegerlaenge l_", "Streckenlast q_"]),
59 (*("#Where",["0 < l_"]), ...wait for < and handling Arbfix*)
60 ("#Find" ,["Biegelinie b_"]),
61 ("#Relate",["RandbedingungenBiegung rb_","RandbedingungenMoment rm_"])
63 append_rls "e_rls" e_rls [],
65 [["IntegrierenUndKonstanteBestimmen"]]));
68 (prep_pbt Biegelinie.thy "pbl_bieg_momg" [] e_pblID
69 (["MomentGegebene","Biegelinien"],
71 append_rls "e_rls" e_rls [],
73 [["IntegrierenUndKonstanteBestimmen","2xIntegrieren"]]));
76 (prep_pbt Biegelinie.thy "pbl_bieg_einf" [] e_pblID
77 (["einfache","Biegelinien"],
79 append_rls "e_rls" e_rls [],
81 [["IntegrierenUndKonstanteBestimmen","4x4System"]]));
84 (prep_pbt Biegelinie.thy "pbl_bieg_momquer" [] e_pblID
85 (["QuerkraftUndMomentBestimmte","Biegelinien"],
87 append_rls "e_rls" e_rls [],
89 [["IntegrierenUndKonstanteBestimmen","1xIntegrieren"]]));
92 (prep_pbt Biegelinie.thy "pbl_bieg_vonq" [] e_pblID
93 (["vonBelastungZu","Biegelinien"],
94 [("#Given" ,["Streckenlast q_","FunktionsVariable v_"]),
95 ("#Find" ,["Funktionen funs___"])],
96 append_rls "e_rls" e_rls [],
98 [["Biegelinien","ausBelastung"]]));
101 (prep_pbt Biegelinie.thy "pbl_bieg_randbed" [] e_pblID
102 (["setzeRandbedingungen","Biegelinien"],
103 [("#Given" ,["Funktionen funs_","Randbedingungen rb_"]),
104 ("#Find" ,["Gleichungen equs___"])],
105 append_rls "e_rls" e_rls [],
107 [["Biegelinien","setzeRandbedingungenEin"]]));
110 (prep_pbt Biegelinie.thy "pbl_equ_fromfun" [] e_pblID
111 (["makeFunctionTo","equation"],
112 [("#Given" ,["functionEq fun_","substitution sub_"]),
113 ("#Find" ,["equality equ___"])],
114 append_rls "e_rls" e_rls [],
116 [["Equation","fromFunction"]]));
122 val srls = Rls {id="srls_IntegrierenUnd..",
124 rew_ord = ("termlessI",termlessI),
125 erls = append_rls "erls_in_srls_IntegrierenUnd.." e_rls
126 [(*for asm in nth_Cons_ ...*)
127 Calc ("op <",eval_equ "#less_"),
128 (*2nd nth_Cons_ pushes n+-1 into asms*)
129 Calc("op +", eval_binop "#add_")
131 srls = Erls, calc = [],
132 rules = [Thm ("nth_Cons_",num_str nth_Cons_),
133 Calc("op +", eval_binop "#add_"),
134 Thm ("nth_Nil_",num_str nth_Nil_),
135 Calc("Tools.lhs", eval_lhs"eval_lhs_"),
136 Calc("Tools.rhs", eval_rhs"eval_rhs_"),
137 Calc("Atools.argument'_in",
138 eval_argument_in "Atools.argument'_in")
143 Rls {id="srls_IntegrierenUnd..",
145 rew_ord = ("termlessI",termlessI),
146 erls = append_rls "erls_in_srls_IntegrierenUnd.." e_rls
147 [(*for asm in nth_Cons_ ...*)
148 Calc ("op <",eval_equ "#less_"),
149 (*2nd nth_Cons_ pushes n+-1 into asms*)
150 Calc("op +", eval_binop "#add_")
152 srls = Erls, calc = [],
153 rules = [Thm ("nth_Cons_",num_str nth_Cons_),
154 Calc("op +", eval_binop "#add_"),
155 Thm ("nth_Nil_", num_str nth_Nil_),
156 Calc("Tools.lhs", eval_lhs "eval_lhs_"),
157 Calc("Atools.sameFunId",
158 eval_sameFunId "Atools.sameFunId"),
159 Thm ("filter_Cons", num_str filter_Cons),
160 Thm ("filter_Nil", num_str filter_Nil),
161 Thm ("if_True", num_str if_True),
162 Thm ("if_False", num_str if_False),
163 Thm ("hd_thm", num_str hd_thm)
166 (*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*)
167 (* use"IsacKnowledge/Biegelinie.ML";
171 (prep_met Biegelinie.thy "met_biege" [] e_metID
172 (["IntegrierenUndKonstanteBestimmen"],
173 [("#Given" ,["Traegerlaenge l_", "Streckenlast q_",
174 "FunktionsVariable v_"]),
175 (*("#Where",["0 < l_"]), ...wait for < and handling Arbfix*)
176 ("#Find" ,["Biegelinie b_"]),
177 ("#Relate",["RandbedingungenBiegung rb_",
178 "RandbedingungenMoment rm_"])
180 {rew_ord'="tless_true",
181 rls' = append_rls "erls_IntegrierenUndK.." e_rls
182 [Calc ("Atools.ident",eval_ident "#ident_"),
183 Thm ("not_true",num_str not_true),
184 Thm ("not_false",num_str not_false)],
185 calc = [], srls = srls, prls = Erls,
186 crls = Atools_erls, nrls = Erls},
187 "Script BiegelinieScript \
188 \(l_::real) (q_::real) (v_::real) (b_::real=>real) \
189 \(rb_::bool list) (rm_::bool list) = \
190 \ (let q__ = Take (q v_ = q_); \
191 \ q__ = ((Rewrite sym_real_minus_eq_cancel True) @@ \
192 \ (Rewrite Belastung_Querkraft True)) q__; \
194 \ (SubProblem (Biegelinie_,[named,integrate,function], \
195 \ [Diff,integration,named]) \
196 \ [real_ (rhs q__), real_ v_, real_real_ Q]); \
197 \ Q__ = Rewrite Querkraft_Moment True Q__; \
199 \ (SubProblem (Biegelinie_,[named,integrate,function], \
200 \ [Diff,integration,named]) \
201 \ [real_ (rhs Q__), real_ v_, real_real_ M_b]); \
202 \ e1__ = nth_ 1 rm_; \
203 \ (x1__::real) = argument_in (lhs e1__); \
204 \ (M1__::bool) = (Substitute [v_ = x1__]) M__; \
205 \ M1__ = (Substitute [e1__]) M1__ ; \
206 \ M2__ = Take M__; "^
207 (*without this Take 'Substitute [v_ = x2__]' takes _last formula from ctree_*)
208 " e2__ = nth_ 2 rm_; \
209 \ (x2__::real) = argument_in (lhs e2__); \
210 \ (M2__::bool) = ((Substitute [v_ = x2__]) @@ \
211 \ (Substitute [e2__])) M2__; \
212 \ (c_1_2__::bool list) = \
213 \ (SubProblem (Biegelinie_,[linear,system],[no_met]) \
214 \ [booll_ [M1__, M2__], reall [c,c_2]]); \
216 \ M__ = ((Substitute c_1_2__) @@ \
217 \ (Try (Rewrite_Set_Inst [(bdv_1, c),(bdv_2, c_2)]\
218 \ simplify_System False)) @@ \
219 \ (Rewrite Moment_Neigung False) @@ \
220 \ (Rewrite make_fun_explicit False)) M__; "^
221 (*----------------------- and the same once more ------------------------*)
223 \ (SubProblem (Biegelinie_,[named,integrate,function], \
224 \ [Diff,integration,named]) \
225 \ [real_ (rhs M__), real_ v_, real_real_ y']); \
227 \ (SubProblem (Biegelinie_,[named,integrate,function], \
228 \ [Diff,integration,named]) \
229 \ [real_ (rhs N__), real_ v_, real_real_ y]); \
230 \ e1__ = nth_ 1 rb_; \
231 \ (x1__::real) = argument_in (lhs e1__); \
232 \ (B1__::bool) = (Substitute [v_ = x1__]) B__; \
233 \ B1__ = (Substitute [e1__]) B1__ ; \
235 \ e2__ = nth_ 2 rb_; \
236 \ (x2__::real) = argument_in (lhs e2__); \
237 \ (B2__::bool) = ((Substitute [v_ = x2__]) @@ \
238 \ (Substitute [e2__])) B2__; \
239 \ (c_1_2__::bool list) = \
240 \ (SubProblem (Biegelinie_,[linear,system],[no_met]) \
241 \ [booll_ [B1__, B2__], reall [c,c_2]]); \
243 \ B__ = ((Substitute c_1_2__) @@ \
244 \ (Rewrite_Set_Inst [(bdv, x)] make_ratpoly_in False)) B__ \
249 (prep_met Biegelinie.thy "met_biege_2" [] e_metID
250 (["IntegrierenUndKonstanteBestimmen2"],
251 [("#Given" ,["Traegerlaenge l_", "Streckenlast q_",
252 "FunktionsVariable v_"]),
253 (*("#Where",["0 < l_"]), ...wait for < and handling Arbfix*)
254 ("#Find" ,["Biegelinie b_"]),
255 ("#Relate",["Randbedingungen rb_"])
257 {rew_ord'="tless_true",
258 rls' = append_rls "erls_IntegrierenUndK.." e_rls
259 [Calc ("Atools.ident",eval_ident "#ident_"),
260 Thm ("not_true",num_str not_true),
261 Thm ("not_false",num_str not_false)],
263 srls = append_rls "erls_IntegrierenUndK.." e_rls
264 [Calc("Tools.rhs", eval_rhs"eval_rhs_"),
265 Thm ("last_thm",num_str last_thm),
266 Thm ("if_True",num_str if_True),
267 Thm ("if_False",num_str if_False)
269 prls = Erls, crls = Atools_erls, nrls = Erls},
270 "Script Biegelinie2Script \
271 \(l_::real) (q_::real) (v_::real) (b_::real=>real) (rb_::bool list) = \
273 \ (funs_:: bool list) = \
274 \ (SubProblem (Biegelinie_,[vonBelastungZu,Biegelinien], \
275 \ [Biegelinien,ausBelastung]) \
276 \ [real_ q_, real_ v_]); \
277 \ (equs_::bool list) = \
278 \ (SubProblem (Biegelinie_,[setzeRandbedingungen,Biegelinien],\
279 \ [Biegelinien,setzeRandbedingungenEin]) \
280 \ [booll_ funs_, booll_ rb_]); \
281 \ (cons_::bool list) = \
282 \ (SubProblem (Biegelinie_,[linear,system],[no_met]) \
283 \ [booll_ equs_, reall [c,c_2,c_3,c_4]]); \
284 \ B_ = Take (last funs_); \
285 \ B_ = ((Substitute cons_) @@ \
286 \ (Rewrite_Set_Inst [(bdv, v_)] make_ratpoly_in False)) B_ \
291 (prep_met Biegelinie.thy "met_biege_intconst_2" [] e_metID
292 (["IntegrierenUndKonstanteBestimmen","2xIntegrieren"],
294 {rew_ord'="tless_true", rls'=Erls, calc = [],
297 crls = Atools_erls, nrls = e_rls},
302 (prep_met Biegelinie.thy "met_biege_intconst_4" [] e_metID
303 (["IntegrierenUndKonstanteBestimmen","4x4System"],
305 {rew_ord'="tless_true", rls'=Erls, calc = [],
308 crls = Atools_erls, nrls = e_rls},
313 (prep_met Biegelinie.thy "met_biege_intconst_1" [] e_metID
314 (["IntegrierenUndKonstanteBestimmen","1xIntegrieren"],
316 {rew_ord'="tless_true", rls'=Erls, calc = [],
319 crls = Atools_erls, nrls = e_rls},
324 (prep_met Biegelinie.thy "met_biege2" [] e_metID
327 {rew_ord'="tless_true", rls'=Erls, calc = [],
330 crls = Atools_erls, nrls = e_rls},
335 (prep_met Biegelinie.thy "met_biege_ausbelast" [] e_metID
336 (["Biegelinien","ausBelastung"],
337 [("#Given" ,["Streckenlast q_","FunktionsVariable v_"]),
338 ("#Find" ,["Funktionen funs_"])],
339 {rew_ord'="tless_true",
340 rls' = append_rls "erls_ausBelastung" e_rls
341 [Calc ("Atools.ident",eval_ident "#ident_"),
342 Thm ("not_true",num_str not_true),
343 Thm ("not_false",num_str not_false)],
345 srls = append_rls "srls_ausBelastung" e_rls
346 [Calc("Tools.rhs", eval_rhs"eval_rhs_")],
347 prls = e_rls, crls = Atools_erls, nrls = e_rls},
348 "Script Belastung2BiegelScript (q_::real) (v_::real) = \
349 \ (let q__ = Take (q v_ = q_); \
350 \ q__ = ((Rewrite sym_real_minus_eq_cancel True) @@ \
351 \ (Rewrite Belastung_Querkraft True)) q__; \
353 \ (SubProblem (Biegelinie_,[named,integrate,function], \
354 \ [Diff,integration,named]) \
355 \ [real_ (rhs q__), real_ v_, real_real_ Q]); \
356 \ M__ = Rewrite Querkraft_Moment True Q__; \
358 \ (SubProblem (Biegelinie_,[named,integrate,function], \
359 \ [Diff,integration,named]) \
360 \ [real_ (rhs M__), real_ v_, real_real_ M_b]); \
361 \ N__ = ((Rewrite Moment_Neigung False) @@ \
362 \ (Rewrite make_fun_explicit False)) M__; \
364 \ (SubProblem (Biegelinie_,[named,integrate,function], \
365 \ [Diff,integration,named]) \
366 \ [real_ (rhs N__), real_ v_, real_real_ y']); \
368 \ (SubProblem (Biegelinie_,[named,integrate,function], \
369 \ [Diff,integration,named]) \
370 \ [real_ (rhs N__), real_ v_, real_real_ y]) \
371 \ in [Q__, M__, N__, B__])"
375 (prep_met Biegelinie.thy "met_biege_setzrand" [] e_metID
376 (["Biegelinien","setzeRandbedingungenEin"],
377 [("#Given" ,["Funktionen funs_","Randbedingungen rb_"]),
378 ("#Find" ,["Gleichungen equs___"])],
379 {rew_ord'="tless_true", rls'=Erls, calc = [],
382 crls = Atools_erls, nrls = e_rls},
383 "Script SetzeRandbedScript (funs_::bool list) (rb_::bool list) = \
384 \ (let b1_ = nth_ 1 rb_; \
385 \ fs_ = filter (sameFunId (lhs b1_)) funs_; \
387 \ (SubProblem (Biegelinie_,[makeFunctionTo,equation],\
388 \ [Equation,fromFunction]) \
389 \ [bool_ (hd fs_), bool_ b1_]); \
390 \ b2_ = nth_ 2 rb_; \
391 \ fs_ = filter (sameFunId (lhs b2_)) funs_; \
393 \ (SubProblem (Biegelinie_,[makeFunctionTo,equation],\
394 \ [Equation,fromFunction]) \
395 \ [bool_ (hd fs_), bool_ b2_]); \
396 \ b3_ = nth_ 3 rb_; \
397 \ fs_ = filter (sameFunId (lhs b3_)) funs_; \
399 \ (SubProblem (Biegelinie_,[makeFunctionTo,equation],\
400 \ [Equation,fromFunction]) \
401 \ [bool_ (hd fs_), bool_ b3_]); \
402 \ b4_ = nth_ 4 rb_; \
403 \ fs_ = filter (sameFunId (lhs b4_)) funs_; \
405 \ (SubProblem (Biegelinie_,[makeFunctionTo,equation],\
406 \ [Equation,fromFunction]) \
407 \ [bool_ (hd fs_), bool_ b4_]) \
408 \ in [e1_,e2_,e3_,e4_])"
412 (prep_met Biegelinie.thy "met_equ" [] e_metID
415 {rew_ord'="tless_true", rls'=Erls, calc = [],
418 crls = Atools_erls, nrls = e_rls},
423 (prep_met Biegelinie.thy "met_equ_fromfun" [] e_metID
424 (["Equation","fromFunction"],
425 [("#Given" ,["functionEq fun_","substitution sub_"]),
426 ("#Find" ,["equality equ___"])],
427 {rew_ord'="tless_true", rls'=Erls, calc = [],
428 srls = append_rls "srls_in_EquationfromFunc" e_rls
429 [Calc("Tools.lhs", eval_lhs"eval_lhs_"),
430 Calc("Atools.argument'_in",
432 "Atools.argument'_in")],
434 crls = Atools_erls, nrls = e_rls},
435 (*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x ^^^ 2) (M_b L = 0) -->
436 0 = c_2 + c * L + -1 * q_0 / 2 * L ^^^ 2*)
437 "Script Function2Equality (fun_::bool) (sub_::bool) =\
438 \ (let fun_ = Take fun_; \
439 \ bdv_ = argument_in (lhs fun_); \
440 \ val_ = argument_in (lhs sub_); \
441 \ equ_ = (Substitute [bdv_ = val_]) fun_; \
442 \ equ_ = (Substitute [sub_]) fun_ \
443 \ in (Rewrite_Set norm_Rational False) equ_) "
448 (* use"IsacKnowledge/Biegelinie.ML";