src/Tools/isac/Knowledge/PolyMinus.thy
changeset 59472 3e904f8ec16c
parent 59416 229e5c9cf78b
child 59473 28b67cae58c3
equal deleted inserted replaced
59471:f2b3681fafb9 59472:3e904f8ec16c
   103   klammer_minus_minus:         "a - (b - c) = (a - b) + c" and
   103   klammer_minus_minus:         "a - (b - c) = (a - b) + c" and
   104 
   104 
   105   klammer_mult_minus:          "a * (b - c) = a * b - a * c" and
   105   klammer_mult_minus:          "a * (b - c) = a * b - a * c" and
   106   klammer_minus_mult:          "(b - c) * a = b * a - c * a"
   106   klammer_minus_mult:          "(b - c) * a = b * a - c * a"
   107 
   107 
   108 ML {*
   108 ML \<open>
   109 val thy = @{theory};
   109 val thy = @{theory};
   110 
   110 
   111 (** eval functions **)
   111 (** eval functions **)
   112 
   112 
   113 (*. get the identifier from specific monomials; see fun ist_monom .*)
   113 (*. get the identifier from specific monomials; see fun ist_monom .*)
   383     Rule.append_rls "rechnen" Rule.e_rls
   383     Rule.append_rls "rechnen" Rule.e_rls
   384 	       [Rule.Calc ("Groups.times_class.times", eval_binop "#mult_"),
   384 	       [Rule.Calc ("Groups.times_class.times", eval_binop "#mult_"),
   385 		Rule.Calc ("Groups.plus_class.plus", eval_binop "#add_"),
   385 		Rule.Calc ("Groups.plus_class.plus", eval_binop "#add_"),
   386 		Rule.Calc ("Groups.minus_class.minus", eval_binop "#subtr_")
   386 		Rule.Calc ("Groups.minus_class.minus", eval_binop "#subtr_")
   387 		];
   387 		];
   388 *}
   388 \<close>
   389 setup {* KEStore_Elems.add_rlss 
   389 setup \<open>KEStore_Elems.add_rlss 
   390   [("ordne_alphabetisch", (Context.theory_name @{theory}, prep_rls' ordne_alphabetisch)), 
   390   [("ordne_alphabetisch", (Context.theory_name @{theory}, prep_rls' ordne_alphabetisch)), 
   391   ("fasse_zusammen", (Context.theory_name @{theory}, prep_rls' fasse_zusammen)), 
   391   ("fasse_zusammen", (Context.theory_name @{theory}, prep_rls' fasse_zusammen)), 
   392   ("verschoenere", (Context.theory_name @{theory}, prep_rls' verschoenere)), 
   392   ("verschoenere", (Context.theory_name @{theory}, prep_rls' verschoenere)), 
   393   ("ordne_monome", (Context.theory_name @{theory}, prep_rls' ordne_monome)), 
   393   ("ordne_monome", (Context.theory_name @{theory}, prep_rls' ordne_monome)), 
   394   ("klammern_aufloesen", (Context.theory_name @{theory}, prep_rls' klammern_aufloesen)), 
   394   ("klammern_aufloesen", (Context.theory_name @{theory}, prep_rls' klammern_aufloesen)), 
   395   ("klammern_ausmultiplizieren",
   395   ("klammern_ausmultiplizieren",
   396     (Context.theory_name @{theory}, prep_rls' klammern_ausmultiplizieren))] *}
   396     (Context.theory_name @{theory}, prep_rls' klammern_ausmultiplizieren))]\<close>
   397 
   397 
   398 (** problems **)
   398 (** problems **)
   399 setup {* KEStore_Elems.add_pbts
   399 setup \<open>KEStore_Elems.add_pbts
   400   [(Specify.prep_pbt thy "pbl_vereinf_poly" [] Celem.e_pblID
   400   [(Specify.prep_pbt thy "pbl_vereinf_poly" [] Celem.e_pblID
   401       (["polynom","vereinfachen"], [], Rule.Erls, NONE, [])),
   401       (["polynom","vereinfachen"], [], Rule.Erls, NONE, [])),
   402     (Specify.prep_pbt thy "pbl_vereinf_poly_minus" [] Celem.e_pblID
   402     (Specify.prep_pbt thy "pbl_vereinf_poly_minus" [] Celem.e_pblID
   403       (["plus_minus","polynom","vereinfachen"],
   403       (["plus_minus","polynom","vereinfachen"],
   404         [("#Given", ["Term t_t"]),
   404         [("#Given", ["Term t_t"]),
   470         [("#Given" ,["Pruefe e_e", "mitWert w_w"]),
   470         [("#Given" ,["Pruefe e_e", "mitWert w_w"]),
   471           ("#Where" ,["e_e is_ratpolyexp"]),
   471           ("#Where" ,["e_e is_ratpolyexp"]),
   472           ("#Find"  ,["Geprueft p_p"])],
   472           ("#Find"  ,["Geprueft p_p"])],
   473         Rule.append_rls "prls_pbl_probe_bruch" Rule.e_rls [(*for preds in where_*)
   473         Rule.append_rls "prls_pbl_probe_bruch" Rule.e_rls [(*for preds in where_*)
   474 		      Rule.Calc ("Rational.is'_ratpolyexp", eval_is_ratpolyexp "")], 
   474 		      Rule.Calc ("Rational.is'_ratpolyexp", eval_is_ratpolyexp "")], 
   475         SOME "Probe e_e w_w", [["probe","fuer_bruch"]]))] *}
   475         SOME "Probe e_e w_w", [["probe","fuer_bruch"]]))]\<close>
   476 
   476 
   477 (** methods **)
   477 (** methods **)
   478 setup {* KEStore_Elems.add_mets
   478 setup \<open>KEStore_Elems.add_mets
   479   [Specify.prep_met thy "met_simp_poly_minus" [] Celem.e_metID
   479   [Specify.prep_met thy "met_simp_poly_minus" [] Celem.e_metID
   480 	    (["simplification","for_polynomials","with_minus"],
   480 	    (["simplification","for_polynomials","with_minus"],
   481 	      [("#Given" ,["Term t_t"]),
   481 	      [("#Given" ,["Term t_t"]),
   482 	        ("#Where" ,["t_t is_polyexp",
   482 	        ("#Where" ,["t_t is_polyexp",
   483 	            "Not (matchsub (?a + (?b + ?c)) t_t | " ^
   483 	            "Not (matchsub (?a + (?b + ?c)) t_t | " ^
   559 	      {rew_ord'="tless_true", rls' = Rule.e_rls, calc = [], srls = Rule.e_rls, 
   559 	      {rew_ord'="tless_true", rls' = Rule.e_rls, calc = [], srls = Rule.e_rls, 
   560 	        prls = Rule.append_rls "prls_met_probe_bruch" Rule.e_rls
   560 	        prls = Rule.append_rls "prls_met_probe_bruch" Rule.e_rls
   561 	            [(*for preds in where_*) Rule.Calc ("Rational.is'_ratpolyexp", eval_is_ratpolyexp "")], 
   561 	            [(*for preds in where_*) Rule.Calc ("Rational.is'_ratpolyexp", eval_is_ratpolyexp "")], 
   562 	        crls = Rule.e_rls, errpats = [], nrls = Rule.Erls}, 
   562 	        crls = Rule.e_rls, errpats = [], nrls = Rule.Erls}, 
   563 	      "empty_script")]
   563 	      "empty_script")]
   564 *}
   564 \<close>
   565 
   565 
   566 end
   566 end
   567 
   567