test/Tools/isac/MathEngine/step.sml
author wneuper <Walther.Neuper@jku.at>
Mon, 11 Dec 2023 09:24:02 +0100
changeset 60778 41abd196342a
parent 60766 2e0603ca18a4
child 60780 91b105cf194a
permissions -rw-r--r--
prepare 1: delete old code with I_Model.T (without Position.T)
walther@59763
     1
(* Title:  "MathEngine/step.sml"
walther@59763
     2
   Author: Walther Neuper
walther@59763
     3
*)
walther@59763
     4
walther@59763
     5
"-----------------------------------------------------------------------------------------------";
walther@59763
     6
"table of contents -----------------------------------------------------------------------------";
walther@59763
     7
"-----------------------------------------------------------------------------------------------";
walther@59763
     8
"-----------------------------------------------------------------------------------------------";
walther@59814
     9
"----------- survey on istate, context ----- ---------------------------------------------------";
walther@59959
    10
"----------- embed fun Step.inconsistent -------------------------------------------------------";
walther@59996
    11
"----------- maximum example with Step.specify_do_next -----------------------------------------";
walther@59996
    12
(*"----------- maximum example with 'specify', fmz <> [] -----------------------------------------";*)
walther@59996
    13
(*"----------- maximum example with 'specify', fmz = [] ------------------------------------------";*)
walther@59763
    14
"-----------------------------------------------------------------------------------------------";
walther@59763
    15
"-----------------------------------------------------------------------------------------------";
walther@59763
    16
"-----------------------------------------------------------------------------------------------";
walther@59763
    17
walther@59814
    18
"----------- survey on istate, context ----- ---------------------------------------------------";
walther@59814
    19
"----------- survey on istate, context ----- ---------------------------------------------------";
walther@59814
    20
"----------- survey on istate, context ----- ---------------------------------------------------";
walther@59814
    21
(* run this ---vvv code * )
walther@59814
    22
"----------- fun me_trace all Minisubpbl -------------------------------------------------------";
walther@59997
    23
val fmz = ["equality (x+1=(2::real))", "solveFor x", "solutions L"];
walther@59814
    24
val (dI',pI',mI') =
walther@59997
    25
  ("Test", ["sqroot-test", "univariate", "equation", "test"],
walther@59997
    26
   ["Test", "squ-equ-test-subpbl1"]);
Walther@60571
    27
 (*[], Pbl*)val (p,_,f,nxt,_,pt) = Test_Code.init_calc @{context} [(fmz, (dI',pI',mI'))];(*Model_Problem*)
walther@59814
    28
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    29
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    30
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    31
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    32
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    33
(*[], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    34
(*[], Met*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59997
    35
(*[1], Frm*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Apply_Method ["Test", "squ-equ-test-subpbl1"]*)
walther@59814
    36
(*[1], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Rewrite_Set "norm_equation"*)
walther@59814
    37
(*[2], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Rewrite_Set "Test_simplify"*)
walther@59814
    38
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"]*)
walther@59814
    39
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    40
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    41
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    42
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    43
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    44
(*[3], Pbl*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59814
    45
(*[3], Met*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;
walther@59997
    46
(*[3, 1], Frm*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Apply_Method ["Test", "solve_linear"]*)
walther@59814
    47
(*[3, 1], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Rewrite_Set_Inst ([(''bdv'', x)], "isolate_bdv")*)
walther@59814
    48
(*[3, 2], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Rewrite_Set "Test_simplify"*)
walther@59997
    49
(*[3], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Check_Postcond ["LINEAR", "univariate", "equation", "test"]*)
walther@59814
    50
(*[4], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Check_elementwise "Assumptions"*)
walther@59997
    51
(*[], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*Check_Postcond ["sqroot-test", "univariate", "equation", "test"]*)
walther@59814
    52
(*[], Res*)val ((pt, p), nxt, t) = me_trace (pt, p) nxt trace_ist_ctxt;(*End_Proof'*)
walther@60242
    53
( * run this --- \<up> code *)
walther@59814
    54
walther@59814
    55
(* for this output:
walther@59814
    56
========= ([], Pbl)========= Step.by_tactic: Model_Problem  ================================== 
walther@59852
    57
Frm ..... (SOME (Pstate ([], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, false),
walther@59814
    58
... ctxt:    []) , 
walther@59814
    59
Res .....  NONE) 
walther@59814
    60
--------- ([], Pbl)--------- Step.do_next \<rightarrow> Add_Given equality (x + 1 = 2)---------------------------------- 
walther@59997
    61
========= ([], Met)========= Step.by_tactic: Apply_Method ["Test", "squ-equ-test-subpbl1"] ================================== 
walther@59852
    62
Frm ..... (SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
walther@59814
    63
... ctxt:    ["precond_rootmet x"]) , 
walther@59814
    64
Res .....  NONE) 
walther@59814
    65
--------- ([1], Frm)--------- Step.do_next \<rightarrow> Rewrite_Set "norm_equation"---------------------------------- 
walther@59852
    66
Frm ..... (SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
walther@59814
    67
... ctxt:    ["precond_rootmet x"]) , 
walther@59852
    68
Res .....  SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [R,L,R,L,L,R,R], Rule_Set.empty, SOME e_e, x + 1 + -1 * 2 = 0, ORundef, true, false),
walther@59814
    69
... ctxt:    ["precond_rootmet x"]) ) 
walther@59814
    70
========= ([1], Frm)========= Step.by_tactic: Rewrite_Set "norm_equation" ================================== 
walther@59852
    71
Frm ..... (SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
walther@59814
    72
... ctxt:    ["precond_rootmet x"]) , 
walther@59852
    73
Res .....  SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [R,L,R,L,L,R,R], Rule_Set.empty, SOME e_e, x + 1 + -1 * 2 = 0, ORundef, true, true),
walther@59814
    74
... ctxt:    ["precond_rootmet x"]) ) 
walther@59814
    75
--------- ([1], Res)--------- Step.do_next \<rightarrow> Rewrite_Set "Test_simplify"---------------------------------- 
walther@59814
    76
Frm .....  (NONE, 
walther@59852
    77
Res .....  SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [R,L,R,L,R,R], Rule_Set.empty, SOME e_e, -1 + x = 0, ORundef, true, false),
walther@59814
    78
... ctxt:    ["precond_rootmet x"]) ) 
walther@59814
    79
========= ([1], Res)========= Step.by_tactic: Rewrite_Set "Test_simplify" ================================== 
walther@59814
    80
Frm .....  (NONE, 
walther@59852
    81
Res .....  SOME (Pstate ([(e_e, x + 1 = 2),(v_v, x)], [R,L,R,L,R,R], Rule_Set.empty, SOME e_e, -1 + x = 0, ORundef, true, false),
walther@59814
    82
... ctxt:    ["precond_rootmet x"]) ) 
walther@59997
    83
--------- ([2], Res)--------- Step.do_next \<rightarrow> Subproblem (Test, ["LINEAR", "univariate", "equation", "test"])---------------------------------- 
walther@59852
    84
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, Subproblem
walther@59814
    85
 (''Test'',
walther@59814
    86
  ??.\<^const>String.char.Char ''LINEAR'' ''univariate'' ''equation''
walther@59814
    87
   ''test''), ORundef, true, false),
walther@59814
    88
... ctxt:    ["precond_rootmet x"]) , 
walther@59814
    89
Res .....  NONE) 
walther@59997
    90
========= ([2], Res)========= Step.by_tactic: Subproblem (Test, ["LINEAR", "univariate", "equation", "test"]) ================================== 
walther@59852
    91
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, Subproblem
walther@59814
    92
 (''Test'',
walther@59814
    93
  ??.\<^const>String.char.Char ''LINEAR'' ''univariate'' ''equation''
walther@59814
    94
   ''test''), ORundef, true, true),
walther@59814
    95
... ctxt:    []) , 
walther@59814
    96
Res .....  NONE) 
walther@59814
    97
--------- ([3], Pbl)--------- Step.do_next \<rightarrow> Model_Problem ---------------------------------- 
walther@59814
    98
========= ([3], Pbl)========= Step.by_tactic: Model_Problem  ================================== 
walther@59852
    99
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, Subproblem
walther@59814
   100
 (''Test'',
walther@59814
   101
  ??.\<^const>String.char.Char ''LINEAR'' ''univariate'' ''equation''
walther@59814
   102
   ''test''), ORundef, true, true),
walther@59814
   103
... ctxt:    []) , 
walther@59814
   104
Res .....  NONE) 
walther@59814
   105
--------- ([3], Pbl)--------- Step.do_next \<rightarrow> Add_Given equality (-1 + x = 0)---------------------------------- 
walther@59997
   106
========= ([3], Met)========= Step.by_tactic: Apply_Method ["Test", "solve_linear"] ================================== 
walther@59852
   107
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
wenzelm@60237
   108
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) , 
walther@59814
   109
Res .....  NONE) 
walther@59814
   110
--------- ([3,1], Frm)--------- Step.do_next \<rightarrow> Rewrite_Set_Inst ([(''bdv'', x)], "isolate_bdv")---------------------------------- 
walther@59852
   111
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
wenzelm@60237
   112
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) , 
walther@59852
   113
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,L,R,L,R,L,R], Rule_Set.empty, SOME e_e, x = 0 + -1 * -1, ORundef, true, false),
wenzelm@60237
   114
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) ) 
walther@59814
   115
========= ([3,1], Frm)========= Step.by_tactic: Rewrite_Set_Inst ([(''bdv'', x)], "isolate_bdv") ================================== 
walther@59852
   116
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, true),
wenzelm@60237
   117
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) , 
walther@59852
   118
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,L,R,L,R,L,R], Rule_Set.empty, SOME e_e, x = 0 + -1 * -1, ORundef, true, true),
wenzelm@60237
   119
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) ) 
walther@59814
   120
--------- ([3,1], Res)--------- Step.do_next \<rightarrow> Rewrite_Set "Test_simplify"---------------------------------- 
walther@59814
   121
Frm .....  (NONE, 
walther@59852
   122
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,L,R,L,R,R], Rule_Set.empty, SOME e_e, x = 1, ORundef, true, false),
wenzelm@60237
   123
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) ) 
walther@59814
   124
========= ([3,1], Res)========= Step.by_tactic: Rewrite_Set "Test_simplify" ================================== 
walther@59814
   125
Frm .....  (NONE, 
walther@59852
   126
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,L,R,L,R,R], Rule_Set.empty, SOME e_e, x = 1, ORundef, true, false),
wenzelm@60237
   127
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)"]) ) 
walther@59997
   128
--------- ([3,2], Res)--------- Step.do_next \<rightarrow> Check_Postcond ["LINEAR", "univariate", "equation", "test"]---------------------------------- 
walther@59852
   129
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, Subproblem
walther@59814
   130
 (''Test'',
walther@59814
   131
  ??.\<^const>String.char.Char ''LINEAR'' ''univariate'' ''equation''
walther@59814
   132
   ''test''), ORundef, true, true),
walther@59814
   133
... ctxt:    []) , 
walther@59852
   134
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   135
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59997
   136
========= ([3,2], Res)========= Step.by_tactic: Check_Postcond ["LINEAR", "univariate", "equation", "test"] ================================== 
walther@59852
   137
Frm ..... (SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, Subproblem
walther@59814
   138
 (''Test'',
walther@59814
   139
  ??.\<^const>String.char.Char ''LINEAR'' ''univariate'' ''equation''
walther@59814
   140
   ''test''), ORundef, true, true),
walther@59814
   141
... ctxt:    []) , 
walther@59852
   142
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x)], [R,R,D,L,R], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   143
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59814
   144
--------- ([3], Res)--------- Step.do_next \<rightarrow> Check_elementwise "Assumptions"---------------------------------- 
walther@59814
   145
Frm .....  (NONE, 
walther@59852
   146
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x),(L_L, [x = 1])], [R,R,D,R,D], Rule_Set.empty, NONE, [x = 1], ORundef, true, false),
wenzelm@60237
   147
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59814
   148
========= ([3], Res)========= Step.by_tactic: Check_elementwise "Assumptions" ================================== 
walther@59814
   149
Frm .....  (NONE, 
walther@59852
   150
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x),(L_L, [x = 1])], [R,R,D,R,D], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   151
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59997
   152
--------- ([4], Res)--------- Step.do_next \<rightarrow> Check_Postcond ["sqroot-test", "univariate", "equation", "test"]---------------------------------- 
walther@59852
   153
Frm ..... (SOME (Pstate ([], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, false),
walther@59814
   154
... ctxt:    []) , 
walther@59852
   155
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x),(L_L, [x = 1])], [R,R,D,R,D], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   156
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59997
   157
========= ([4], Res)========= Step.by_tactic: Check_Postcond ["sqroot-test", "univariate", "equation", "test"] ================================== 
walther@59852
   158
Frm ..... (SOME (Pstate ([], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, false),
walther@59814
   159
... ctxt:    []) , 
walther@59852
   160
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x),(L_L, [x = 1])], [R,R,D,R,D], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   161
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59814
   162
--------- ([], Res)--------- Step.do_next \<rightarrow> input End_Proof'---------------------------------- 
walther@59814
   163
========= ([], Res)========= Step.by_tactic: input End_Proof' ================================== 
walther@59852
   164
Frm ..... (SOME (Pstate ([], [], Rule_Set.empty, NONE, ??.empty, ORundef, false, false),
walther@59814
   165
... ctxt:    []) , 
walther@59852
   166
Res .....  SOME (Pstate ([(e_e, -1 + x = 0),(v_v, x),(L_L, [x = 1])], [R,R,D,R,D], Rule_Set.empty, NONE, [x = 1], ORundef, true, true),
wenzelm@60237
   167
... ctxt:    ["matches (?a = ?b) (-1 + x = 0)", "x = 1"]) ) 
walther@59814
   168
--------- ([], Res)--------- Step.do_next \<rightarrow> input End_Proof'---------------------------------- 
walther@59959
   169
*)
walther@59959
   170
walther@59959
   171
walther@59959
   172
"--------- embed fun Step.inconsistent -------------------";
walther@59959
   173
"--------- embed fun Step.inconsistent -------------------";
walther@59959
   174
"--------- embed fun Step.inconsistent -------------------";
Walther@60549
   175
States.reset ();
Walther@60571
   176
CalcTree @{context}
walther@59959
   177
[(["functionTerm (x ^ 2 + sin (x ^ 4))", "differentiateFor x", "derivative f_f'"], 
walther@59997
   178
  ("Isac_Knowledge", ["derivative_of", "function"], ["diff", "differentiate_on_R"]))];
walther@59959
   179
Iterator 1;
walther@59959
   180
moveActiveRoot 1;
walther@59959
   181
autoCalculate 1 CompleteCalcHead;
walther@59959
   182
autoCalculate 1 (Steps 1);
walther@60242
   183
autoCalculate 1 (Steps 1);(*([1], Res), d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))*)
Walther@60658
   184
;
Walther@60658
   185
         @{term "d_d x (x \<up> 2) + cos (4 * x \<up> 3)" }
Walther@60658
   186
;
Walther@60658
   187
appendFormula 1 "d_d x (x \<up> 2) + cos (4 * x \<up> 3)";
Walther@60658
   188
  (*WAS ERROR: Inner syntax error \n Failed to parse term: "d_d x (x ^ 2) + cos (4 * x ^ 3)"
Walther@60658
   189
    -----------------------------------------------------------------\<up>-----------------\<up>*)
Walther@60658
   190
(*/------------------- locate ERROR within appendFormula more precisely ---------------------\*)
Walther@60658
   191
"~~~~~ fun appendFormula , args:"; val (cI, ifo) = (1, "d_d x (x \<up> 2) + cos (4 * x \<up> 3)");
Walther@60658
   192
    val cs = States.get_calc cI
Walther@60658
   193
    val pos = States.get_pos cI 1
Walther@60658
   194
val ("ok", (_, _, ptp)) =
Walther@60658
   195
    (*case*) Step.do_next pos cs (*of*);
Walther@60658
   196
Walther@60658
   197
  (*case*) Step_Solve.by_term ptp (encode ifo) (*of*); (*WAS ERROR: Inner syntax error \n Failed to parse term*)
Walther@60658
   198
(*\------------------- locate ERROR within appendFormula more precisely ---------------------/*)
Walther@60658
   199
Walther@60586
   200
(* the check for errpat is maximally liberal (whole term modulo "rew_rls" from "type met"),
walther@59959
   201
  would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
walther@59959
   202
  results in <CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>
walther@59959
   203
  instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
walther@59959
   204
(*========== inhibit exn WN1130621 Isabelle2012-->13 !thehier! ====================
walther@59959
   205
findFillpatterns 1 "chain-rule-diff-both";
walther@60242
   206
(*<CALCMESSAGE> fill patterns #fill-d_d-arg#d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =
walther@60242
   207
  d_d x (x \<up> 2) + cos (x \<up> 4) * d_d x ?_dummy_1#fill-both-args#...#...#... *)
walther@59959
   208
walther@59959
   209
"~~~~~ fun requestFillformula, args:"; val (cI, (errpatID, fillpatID)) =
walther@59959
   210
  (1, ("chain-rule-diff-both", "fill-both-args"));
Walther@60549
   211
    val ((pt, _), _) = States.get_calc cI
Walther@60549
   212
		    val pos as (p, _) = States.get_pos cI 1;
walther@59959
   213
    val fillforms = Error_Pattern.find_fill_patterns (pt, pos) errpatID;
walther@59959
   214
walther@59959
   215
if pos = ([1], Res) then () else error "Step.inconsistent changed 1";
walther@59959
   216
walther@59959
   217
 val (_, fillform, thm, sube_opt) :: _ = filter ((curry op = fillpatID) o 
walther@59959
   218
        (#1: (fillpatID * term * thm * (subs option) -> fillpatID))) fillforms;
walther@59959
   219
walther@59959
   220
"~~~~~ fun Step.inconsistent, args:";
walther@59959
   221
  val ((subs_opt, thm'), f', (is, ctxt), pos, pt) =
walther@59959
   222
    ((sube_opt, thm'_of_thm thm), fillform, (get_loc pt pos), pos, pt);
walther@59959
   223
walther@59959
   224
    val f = get_curr_formula (pt, pos);
walther@59959
   225
    val pos' as (p', _) = (lev_on p, Res);
walther@59959
   226
walther@59959
   227
if pos = ([1], Res) then () else error "Step.inconsistent changed 2a";
Walther@60675
   228
if UnparseC.term @{context} f = "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4))"
walther@59959
   229
  then () else error "Step.inconsistent changed 2b";
walther@59959
   230
walther@59959
   231
    val (pt,c) = 
walther@59959
   232
      case subs_opt of
walther@59959
   233
        NONE => cappend_atomic pt p' (is, ContextC.insert_assumptions [] ctxt) f
walther@59959
   234
          (Rewrite thm') (f', []) Inconsistent
walther@59959
   235
      | SOME subs => cappend_atomic pt p' (is, ContextC.insert_assumptions [] ctxt) f
walther@59959
   236
          (Rewrite_Inst (subs, thm')) (f', []) Inconsistent
walther@59959
   237
    val pt = update_branch pt p' TransitiveB;
walther@59959
   238
walther@59959
   239
if get_obj g_tac pt p' = Rewrite_Inst (["(''bdv'', x)"], ("diff_sin_chain", ""))
walther@59959
   240
  andalso pos = ([1], Res) andalso pos' = ([2], Res) andalso p' = [2]
walther@59959
   241
then () else error "Step.inconsistent changed 3";
walther@59959
   242
walther@59959
   243
"~~~~~ to requestFillformula return val:"; val (pt, pos') = (pt, pos');
walther@59959
   244
(*val (pt, pos') = Step.inconsistent (sube_opt, thm'_of_thm thm)
walther@59959
   245
            (fillform, []) (get_loc pt pos) pos' pt*)
Walther@60549
   246
States.upd_calc cI ((pt, pos'), []); States.upd_ipos cI 1 pos';
walther@59959
   247
walther@59959
   248
"~~~~~ final check:";
Walther@60549
   249
val ((pt, _),_) = States.get_calc 1;
Walther@60549
   250
val p = States.get_pos 1 1;
walther@59983
   251
val (Form f, _, asms) = ME_Misc.pt_extract (pt, p);
walther@59959
   252
if p = ([2], Res) andalso 
walther@59959
   253
  get_obj g_tac pt (fst p) = Rewrite_Inst (["(''bdv'', x)"], ("diff_sin_chain", "")) andalso
Walther@60675
   254
  UnparseC.term @{context} f =
walther@60242
   255
  "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?u * d_d x ?_dummy_2"
walther@59959
   256
  (*WAS with old findFillpatterns:
walther@60242
   257
  "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?_dummy_2 * d_d x ?_dummy_3"
walther@59959
   258
  WN120731 replaced 
walther@60242
   259
  "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?u * d_d x ?_dummy_2"
walther@59959
   260
  WN120804 replaced
walther@60242
   261
  "d_d x (x \<up> 2) + d_d x (sin (x \<up> 4)) =\nd_d x (x \<up> 2) + cos ?_dummy_1 * d_d x ?_dummy_2"*)
walther@59959
   262
then () else error "Step.inconsistent changed: fill-formula?";
walther@59959
   263
walther@59983
   264
Test_Tool.show_pt pt; (*ATTENTION: omits the last step, if pt is incomplete, ([2], Res) EXISTS !*)
walther@59959
   265
============ inhibit exn WN1130621 Isabelle2012-->13 !thehier! ==================*)
walther@59996
   266
walther@59996
   267
Walther@60766
   268
(*** maximum example with Step.specify_do_next ============================================= ***);
walther@59996
   269
"----------- maximum example with Step.specify_do_next -----------------------------------------";
walther@59996
   270
"----------- maximum example with Step.specify_do_next -----------------------------------------";
walther@59996
   271
val c = []:cid;
Walther@60459
   272
val fmz = [
Walther@60459
   273
  "fixedValues [r=Arbfix]", "maximum A",
Walther@60459
   274
  "valuesFor [a,b::real]",
Walther@60459
   275
  "relations [A=a*(b::real), (a/2) \<up> 2 + (b/2) \<up> 2 = (r::real) \<up> 2]",
Walther@60459
   276
  "relations [A=a*(b::real), (a/2) \<up> 2 + (b/2) \<up> 2 = (r::real) \<up> 2]",
Walther@60459
   277
  "relations [A=a*(b::real), a/2=r*sin alpha, b/2 = (r::real)*cos (alpha::real)]",
Walther@60459
   278
  
Walther@60459
   279
  "boundVariable a", "boundVariable b", "boundVariable alpha",
Walther@60459
   280
  "interval {x::real. 0 <= x & x <= 2*r}",
Walther@60459
   281
  "interval {x::real. 0 <= x & x <= 2*r}",
Walther@60459
   282
  "interval {x::real. 0 <= x & x <= pi}",
Walther@60459
   283
  "errorBound (eps=(0::real))"];
Walther@60459
   284
val (dI',pI',mI') = ("Diff_App", ["maximum_of", "function"], ["Diff_App", "max_by_calculus"]);
Walther@60571
   285
val (p,_,f, nxt,_,pt) = Test_Code.init_calc @{context} [(fmz, (dI',pI',mI'))];
walther@59996
   286
Walther@60459
   287
(*** stepwise Specification: Problem model================================================= ***)
walther@60020
   288
val ("ok", ([(Model_Problem, Model_Problem' (["maximum_of", "function"], _, _), _)], _, ptp))
walther@59996
   289
  = Step.specify_do_next (pt, p);
walther@60020
   290
val ("ok", ([(Add_Given "fixedValues [r = Arbfix]", _, _)], _, ptp))
walther@59996
   291
  = Step.specify_do_next ptp;
walther@60020
   292
val ("ok", ([(Add_Find "maximum A", _, _)], _, ptp))
walther@59996
   293
  = Step.specify_do_next ptp;
walther@60020
   294
val ("ok", ([(Add_Find "valuesFor [a]", _, _)], _, ptp))
walther@59996
   295
  = Step.specify_do_next ptp;
Walther@60752
   296
val ("ok", ([(Add_Find "valuesFor [a, b]", _, _)], _, ptp))
Walther@60752
   297
  = Step.specify_do_next ptp;
walther@60020
   298
val ("ok", ([(Add_Relation "relations [A = a * b]", _, _)], _, ptp))
walther@59996
   299
  = Step.specify_do_next ptp;
Walther@60752
   300
val ("ok", ([(Add_Relation "relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]", _, _)], _, ptp))
Walther@60752
   301
  = Step.specify_do_next ptp;
Walther@60459
   302
Walther@60459
   303
(*** Problem model is complete ============================================================ ***)
walther@59996
   304
val PblObj {probl, ...} = get_obj I (fst ptp) [];
walther@59997
   305
Walther@60778
   306
val "[\n(1, [1, 2, 3], true ,#Given, (Cor_POS fixedValues [r = Arbfix] , pen2str, Position.T)), \n(2, [1, 2, 3], true ,#Find, (Cor_POS maximum A , pen2str, Position.T)), \n(3, [1, 2, 3], true ,#Find, (Cor_POS valuesFor [a, b] , pen2str, Position.T)), \n(4, [1, 2], true ,#Relate, (Cor_POS relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] , pen2str, Position.T))]"
Walther@60778
   307
 = probl |> I_Model.OLD_to_POS |> I_Model.to_string_POS ctxt
walther@59996
   308
Walther@60459
   309
(*** Specification of References ========================================================== ***)
Walther@60458
   310
val ("ok", ([(Specify_Theory "Diff_App", _, _)], _, ptp))
walther@59996
   311
  = Step.specify_do_next ptp;
walther@60020
   312
val ("ok", ([(Specify_Problem ["maximum_of", "function"], _, _)], _, ptp))
walther@59996
   313
  = Step.specify_do_next ptp;
Walther@60458
   314
val ("ok", ([(Specify_Method ["Diff_App", "max_by_calculus"], _, _)], _, ptp))
walther@59996
   315
  = Step.specify_do_next ptp;
walther@59996
   316
Walther@60459
   317
(*** stepwise Specification: MethodC model ================================================ ***)
Walther@60763
   318
val ("ok", ([(Add_Given "boundVariable a", _, _)], _, ptp))
walther@59996
   319
  = Step.specify_do_next ptp;
Walther@60763
   320
Step.specify_do_next ptp;
Walther@60766
   321
val ("ok", ([(Add_Given "interval {x. 0 \<le> x \<and> x \<le> 2 * r}", _, _)], _, ptp))
walther@59996
   322
  = Step.specify_do_next ptp;
walther@60020
   323
val ("ok", ([(Add_Given "errorBound (eps = 0)", _, _)], _, ptp))
walther@59996
   324
  = Step.specify_do_next ptp;
walther@59996
   325
Walther@60459
   326
val PblObj {meth, ...} = get_obj I (fst ptp) [];
Walther@60760
   327
Walther@60778
   328
(*+*)val "[\n(1, [1, 2, 3], true ,#Given, (Cor_POS fixedValues [r = Arbfix] , pen2str, Position.T)), \n(2, [1, 2, 3], true ,#Find, (Cor_POS maximum A , pen2str, Position.T)), \n(4, [1, 2], true ,#Relate, (Cor_POS relations [A = a * b, (a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2] , pen2str, Position.T)), \n(3, [1, 2, 3], true ,#Find, (Cor_POS valuesFor [a, b] , pen2str, Position.T)), \n(6, [1], true ,#Given, (Cor_POS boundVariable a , pen2str, Position.T)), \n(9, [1, 2], true ,#Given, (Cor_POS interval {x. 0 \<le> x \<and> x \<le> 2 * r} , pen2str, Position.T)), \n(11, [1, 2, 3], true ,#Given, (Cor_POS errorBound (eps = 0) , pen2str, Position.T))]"
Walther@60778
   329
 = meth |> I_Model.OLD_to_POS |> I_Model.to_string_POS ctxt
Walther@60760
   330
Walther@60459
   331
(*** Specification of Problem and MethodC model is complete, Solution starts ============== ***)
Walther@60459
   332
walther@59996
   333
(*  Step.specify_do_next ptp;
walther@59996
   334
ERROR
walther@59996
   335
---------------------------------------------------------------------- 
walther@59996
   336
actual arg(s) missing for '["(#Find, (maxArgument, v_0))"]' i.e. should be 'copy-named' by '*_._'
walther@59996
   337
*)
walther@59996
   338
Walther@60459
   339
walther@59996
   340
(*------------------------------------------------------ after specify --> Step.specify_find_next
walther@59996
   341
"----------- maximum example with 'specify', fmz <> [] -----------------------------------------";
walther@59996
   342
"----------- maximum example with 'specify', fmz <> [] -----------------------------------------";
walther@59996
   343
"----------- maximum example with 'specify', fmz <> [] -----------------------------------------";
walther@59996
   344
val fmz =
walther@59997
   345
    ["fixedValues [r=Arbfix]", "maximum A",
walther@59996
   346
     "valuesFor [a,b]",
walther@60242
   347
     "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
walther@60242
   348
     "relations [A=a*b, (a/2) \<up> 2 + (b/2) \<up> 2 = r \<up> 2]",
walther@59996
   349
     "relations [A=a*b, a/2=r*sin alpha, b/2=r*cos (alpha::real)]",
walther@59996
   350
walther@59997
   351
     "boundVariable a", "boundVariable b", "boundVariable alpha",
walther@59996
   352
     "interval {x::real. 0 <= x & x <= 2*r}",
walther@59996
   353
     "interval {x::real. 0 <= x & x <= 2*r}",
walther@59996
   354
     "interval {x::real. 0 <= x & x <= pi}",
walther@59996
   355
     "errorBound (eps=(0::real))"];
walther@59996
   356
val (dI',pI',mI') =
Walther@60458
   357
  ("Diff_App",["maximum_of", "function"],
Walther@60458
   358
   ["Diff_App", "max_by_calculus"]);
walther@59996
   359
val c = []:cid;
Walther@60571
   360
val (p,_,f,nxt,_,pt) = Test_Code.init_calc @{context} [(fmz, (dI',pI',mI'))];
walther@59996
   361
walther@59996
   362
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   363
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt e_pos' [] pt;
walther@59996
   364
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   365
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   366
(*val nxt = Add_Given "fixedValues [(r::real) = Arbfix]" : tac*)
walther@59996
   367
walther@59996
   368
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   369
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   370
(*val nxt = Add_Find "maximum (A::bool)" : tac*)
walther@59996
   371
walther@59996
   372
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   373
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   374
(*val nxt = Add_Find "valuesFor [(a::real)]" : tac*)
walther@59996
   375
walther@59996
   376
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   377
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   378
(*val nxt = Add_Find "valuesFor [(b::real)]" : tac*)
walther@59996
   379
walther@59996
   380
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   381
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   382
(*val nxt = Add_Relation "relations [A = a * b]" *)
walther@59996
   383
walther@59996
   384
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   385
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   386
(*Add_Relation "relations\n [((a::real) // (#2::real)) ..."*)
walther@59996
   387
walther@59996
   388
(*---------------------------- FIXXXXME.me !!! partial Add-Relation !!!
walther@59996
   389
  Step_Specify.by_tactic_input <> specify ?!
walther@59996
   390
walther@59996
   391
if nxt<>(Add_Relation 
walther@60242
   392
 "relations [(a / 2) \<up> 2 + (b / 2) \<up> 2 = r \<up> 2]")
walther@59996
   393
then error "test specify, fmz <> []: nxt <> Add_Relation (a/2)^2.." else (); (*different with show_types !!!*)
walther@59996
   394
walther@59996
   395
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   396
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   397
------------------------------ FIXXXXME.me !!! ---*)
walther@59996
   398
Walther@60458
   399
(*val nxt = Specify_Theory "Diff_App" : tac*)
walther@59996
   400
walther@59996
   401
val itms = get_obj g_pbl pt (fst p);writeln(I_Model.to_string ctxt itms);
walther@59996
   402
walther@59996
   403
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   404
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59997
   405
(*val nxt = Specify_Problem ["maximum_of", "function"]*)
walther@59996
   406
walther@59996
   407
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   408
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60458
   409
(*val nxt = Specify_Method ("Diff_App", "max_by_calculus")*)
walther@59996
   410
walther@59996
   411
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   412
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   413
(*val nxt = Add_Given "boundVariable a" : tac*)
walther@59996
   414
walther@59996
   415
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   416
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   417
(*val nxt = Add_Given "interval {x. #0 <= x & x <= #2 * r}" : *)
walther@59996
   418
walther@59996
   419
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   420
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   421
(*val nxt = Add_Given "errorBound (eps = #0)" : tac*)
walther@59996
   422
walther@59996
   423
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   424
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60458
   425
(*val nxt = Apply_Method ("Diff_App", "max_by_calculus") *)
Walther@60458
   426
case nxt of (Apply_Method ["Diff_App", "max_by_calculus"]) => ()
walther@59996
   427
| _ => error "test specify, fmz <> []: nxt <> Apply_Method max_by_calculus";
walther@59996
   428
walther@59996
   429
walther@59996
   430
"----------- maximum example with 'specify', fmz = [] ------------------------------------------";
walther@59996
   431
"----------- maximum example with 'specify', fmz = [] ------------------------------------------";
walther@59996
   432
"----------- maximum example with 'specify', fmz = [] ------------------------------------------";
walther@59996
   433
val fmz = [];
walther@59996
   434
val (dI',pI',mI') = empty_spec;
walther@59996
   435
val c = []:cid;
walther@59996
   436
Walther@60571
   437
(*val (p,_,f,(_,nxt),_,pt) = Test_Code.init_calc @{context} [(fmz, (dI',pI',mI'))]; !!!*)
Walther@60586
   438
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt e_pos' [] 
walther@59996
   439
  EmptyPtree;
walther@59996
   440
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   441
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60428
   442
(*val nxt = Specify_Theory ThyC.id_empty : tac*)
walther@59996
   443
Walther@60458
   444
val nxt = Specify_Theory "Diff_App";
walther@59996
   445
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   446
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60428
   447
(*val nxt = Specify_Problem Problem.id_empty : tac*)
walther@59996
   448
walther@59997
   449
val nxt = Specify_Problem ["maximum_of", "function"];
walther@59996
   450
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   451
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   452
(*val nxt = Add_Given "fixedValues" : tac*)
walther@59996
   453
walther@59996
   454
val nxt = Add_Given "fixedValues [r=Arbfix]";
walther@59996
   455
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   456
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   457
(*val nxt = Add_Find "maximum" : tac*)
walther@59996
   458
walther@59996
   459
val nxt = Add_Find "maximum A";
walther@59996
   460
val nxt = tac2tac_ pt p nxt; 
walther@59996
   461
walther@59996
   462
Walther@60586
   463
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   464
(*val nxt = Add_Find "valuesFor" : tac*)
walther@59996
   465
walther@59996
   466
val nxt = Add_Find "valuesFor [a]";
walther@59996
   467
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   468
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   469
(*val nxt = Add_Relation "relations" --- 
walther@59996
   470
  --- [b=Arbfix] KANN NICHT VERLANGT WERDEN !!!!*)
walther@59996
   471
walther@59996
   472
(*========== inhibit exn 010830 =======================================================*)
walther@59996
   473
(*30.8.01 ... funktioniert nicht mehr nach Einfuehrung env ....
walther@59996
   474
if nxt<>(Add_Relation "relations []")
walther@59996
   475
then error "test specify, fmz <> []: nxt <> Add_Relation.." 
walther@59996
   476
else (); (*different with show_types !!!*)
walther@59996
   477
*)
walther@59996
   478
(*========== inhibit exn 010830 =======================================================*)
walther@59996
   479
walther@59996
   480
val nxt = Add_Relation "relations [(A=a+b)]";
walther@59996
   481
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   482
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60428
   483
(*val nxt = Specify_Method (ThyC.id_empty, MethodC.id_empty) : tac*)
walther@59996
   484
Walther@60458
   485
val nxt = Specify_Method ["Diff_App", "max_by_calculus"];
walther@59996
   486
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   487
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   488
(*val nxt = Add_Given "boundVariable" : tac*)
walther@59996
   489
walther@59996
   490
val nxt = Add_Given "boundVariable alpha";
walther@59996
   491
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   492
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   493
(*val nxt = Add_Given "interval" : tac*)
walther@59996
   494
walther@59996
   495
val nxt = Add_Given "interval {x. 2 <= x & x <= 3}";
walther@59996
   496
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   497
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
walther@59996
   498
(*val nxt = Add_Given "errorBound" : tac*)
walther@59996
   499
walther@59996
   500
val nxt = Add_Given "errorBound (eps=999)";
walther@59996
   501
val nxt = tac2tac_ pt p nxt; 
Walther@60586
   502
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt;
Walther@60458
   503
(*val nxt = Apply_Method ("Diff_App", "max_by_calculus") *)
walther@59996
   504
walther@59996
   505
(*30.8.01 ... funktioniert nicht mehr nach Einfuehrung env ....
Walther@60458
   506
if nxt<>(Apply_Method ("Diff_App", "max_by_calculus"))
walther@59996
   507
then error "test specify, fmz <> []: nxt <> Add_Relation.." 
walther@59996
   508
else ();
walther@59996
   509
*)
walther@59996
   510
(* 2.4.00 nach Transfer specify -> hard_gen
Walther@60458
   511
val nxt = Apply_Method ("Diff_App", "max_by_calculus");
Walther@60586
   512
val(p,_, Test_Out.PpcKF model, nxt,_,pt) = specify nxt p [] pt; *)
walther@59996
   513
(*val nxt = Empty_Tac : tac*)
walther@59996
   514
------------------------------------------------------ after specify --> Step.specify_find_next *)
walther@59996
   515