1 (* Title: "MathEngBasic/MathEngBasic.thy"
2 Author: Walther Neuper 110226
3 (c) due to copyright terms
5 Definitions required for both, for Specify and for the Lucas-Interpreter.
7 Note (compare \<^ML>\<open>@{theory Know_Store}\<close> cf.03dea0a179d0):
8 The files ("xxxxx-def.sml") contain definitions required for ML_structure\<open>Ctree\<close>;
9 they also include minimal code required for other "xxxxx-def.sml" files.
10 These files have companion files "xxxxx.sml" with all further code,
11 located at appropriate positions in the file structure.
13 The separation of "xxxxx-def.sml" from "xxxxx.sml" should be overcome by
14 appropriate use of polymorphic high order functions.
17 imports "$ISABELLE_ISAC/ProgLang/ProgLang" "$ISABELLE_ISAC/Specify/Input_Descript"
18 keywords "problem" "method" :: thy_decl
19 and "Author" "Theory_Ref" "Problem_Ref" "Method_Ref"
20 "CAS" "Program" "Given" "Where" "Find" "Relate"
28 ML_file "model-def.sml"
29 ML_file "istate-def.sml"
30 ML_file "calc-tree-elem.sml"
31 ML_file "pre-conds-def.sml"
34 ML_file applicable.sml
37 ML_file "specification-def.sml"
39 ML_file "ctree-basic.sml"
40 ML_file "ctree-access.sml"
41 ML_file "ctree-navi.sml"
44 ML_file references.sml
45 ML_file "state-steps.sml"
46 ML_file calculation.sml
50 fun lev_up [] = raise Ctree.PTREE "lev_up []"
51 | lev_up p = (drop_last p);
55 \<close> ML \<open> (*postpone after successful test*)
56 fun parent_node _ [] = (true, [], Rule_Set.Empty)
59 fun par _ [] = (true, [], Rule_Set.Empty)
61 if is_pblobj (get_obj I pt p)
62 then (true, p, Rule_Set.Empty)
65 val ctxt = p |> get_obj g_loc pt |> snd |> the |> snd (*???*)
67 case get_obj g_tac pt p of
68 Tactic.Rewrite_Set rls' => (false, p, get_rls ctxt rls')
69 | Tactic.Rewrite_Set_Inst (_, rls') => (false, p, get_rls ctxt rls')
70 | _ => par pt (lev_up p)
72 in par pt (lev_up p) end;