src/Tools/isac/MathEngBasic/MathEngBasic.thy
author wneuper <Walther.Neuper@jku.at>
Wed, 07 Sep 2022 10:58:12 +0200
changeset 60543 9555ee96e046
parent 60518 a4d8e2874627
child 60544 794948e61b46
permissions -rw-r--r--
eliminate KEStore_Elems.get_thes, add_thes 1: get_rls 1
     1 (* Title:  "MathEngBasic/MathEngBasic.thy"
     2    Author: Walther Neuper 110226
     3    (c) due to copyright terms
     4 
     5 Definitions required for both, for Specify and for the Lucas-Interpreter.
     6 
     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.
    12 
    13 The separation of "xxxxx-def.sml" from "xxxxx.sml" should be overcome by
    14 appropriate use of polymorphic high order functions.
    15 *)
    16 theory MathEngBasic
    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"
    21 begin
    22   ML_file thmC.sml
    23   ML_file problem.sml
    24   ML_file method.sml
    25 
    26   ML_file rewrite.sml
    27 
    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"
    32 
    33   ML_file tactic.sml                                     
    34   ML_file applicable.sml
    35 
    36   ML_file position.sml
    37   ML_file "specification-def.sml"
    38 
    39   ML_file "ctree-basic.sml"
    40   ML_file "ctree-access.sml"
    41   ML_file "ctree-navi.sml"
    42   ML_file ctree.sml
    43 
    44   ML_file references.sml
    45   ML_file "state-steps.sml"
    46   ML_file calculation.sml
    47 
    48 ML \<open>
    49 \<close> ML \<open>
    50 fun lev_up [] = raise Ctree.PTREE "lev_up []"
    51   | lev_up p = (drop_last p);
    52 \<close> ML \<open>
    53 \<close> ML \<open>
    54 open Ctree
    55 \<close> ML \<open> (*postpone after successful test*)
    56 fun parent_node _ [] = (true, [], Rule_Set.Empty)
    57   | parent_node pt p =
    58     let
    59       fun par _ [] = (true, [], Rule_Set.Empty)
    60         | par pt p =
    61             if is_pblobj (get_obj I pt p)
    62             then (true, p, Rule_Set.Empty)
    63   		      else 
    64               let
    65                 val ctxt = p |> get_obj g_loc pt |> snd |> the |> snd (*???*)
    66               in
    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)
    71               end
    72     in par pt (lev_up p) end; 
    73 \<close> ML \<open>
    74 \<close>
    75 end