equal
deleted
inserted
replaced
107 @{index_ML Variable.declare_constraints: "term -> Proof.context -> Proof.context"} \\ |
107 @{index_ML Variable.declare_constraints: "term -> Proof.context -> Proof.context"} \\ |
108 @{index_ML Variable.export: "Proof.context -> Proof.context -> thm list -> thm list"} \\ |
108 @{index_ML Variable.export: "Proof.context -> Proof.context -> thm list -> thm list"} \\ |
109 @{index_ML Variable.polymorphic: "Proof.context -> term list -> term list"} \\ |
109 @{index_ML Variable.polymorphic: "Proof.context -> term list -> term list"} \\ |
110 @{index_ML Variable.import: "bool -> thm list -> Proof.context -> |
110 @{index_ML Variable.import: "bool -> thm list -> Proof.context -> |
111 ((((indexname * sort) * ctyp) list * ((indexname * typ) * cterm) list) * thm list) * Proof.context"} \\ |
111 ((((indexname * sort) * ctyp) list * ((indexname * typ) * cterm) list) * thm list) * Proof.context"} \\ |
112 @{index_ML Variable.focus: "term -> Proof.context -> |
112 @{index_ML Variable.focus: "binding list option -> term -> Proof.context -> |
113 ((string * (string * typ)) list * term) * Proof.context"} \\ |
113 ((string * (string * typ)) list * term) * Proof.context"} \\ |
114 \end{mldecls} |
114 \end{mldecls} |
115 |
115 |
116 \begin{description} |
116 \begin{description} |
117 |
117 |
151 type and term variables for the schematic ones occurring in @{text |
151 type and term variables for the schematic ones occurring in @{text |
152 "thms"}. The @{text "open"} flag indicates whether the fixed names |
152 "thms"}. The @{text "open"} flag indicates whether the fixed names |
153 should be accessible to the user, otherwise newly introduced names |
153 should be accessible to the user, otherwise newly introduced names |
154 are marked as ``internal'' (\secref{sec:names}). |
154 are marked as ``internal'' (\secref{sec:names}). |
155 |
155 |
156 \item @{ML Variable.focus}~@{text B} decomposes the outermost @{text |
156 \item @{ML Variable.focus}~@{text "bindings B"} decomposes the outermost @{text |
157 "\<And>"} prefix of proposition @{text "B"}. |
157 "\<And>"} prefix of proposition @{text "B"}, using the given name bindings. |
158 |
158 |
159 \end{description} |
159 \end{description} |
160 \<close> |
160 \<close> |
161 |
161 |
162 text %mlex \<open>The following example shows how to work with fixed term |
162 text %mlex \<open>The following example shows how to work with fixed term |
392 Proof.context -> int -> tactic"} \\ |
392 Proof.context -> int -> tactic"} \\ |
393 @{index_ML Subgoal.FOCUS_PREMS: "(Subgoal.focus -> tactic) -> |
393 @{index_ML Subgoal.FOCUS_PREMS: "(Subgoal.focus -> tactic) -> |
394 Proof.context -> int -> tactic"} \\ |
394 Proof.context -> int -> tactic"} \\ |
395 @{index_ML Subgoal.FOCUS_PARAMS: "(Subgoal.focus -> tactic) -> |
395 @{index_ML Subgoal.FOCUS_PARAMS: "(Subgoal.focus -> tactic) -> |
396 Proof.context -> int -> tactic"} \\ |
396 Proof.context -> int -> tactic"} \\ |
397 @{index_ML Subgoal.focus: "Proof.context -> int -> thm -> Subgoal.focus * thm"} \\ |
397 @{index_ML Subgoal.focus: "Proof.context -> int -> binding list option -> |
398 @{index_ML Subgoal.focus_prems: "Proof.context -> int -> thm -> Subgoal.focus * thm"} \\ |
398 thm -> Subgoal.focus * thm"} \\ |
399 @{index_ML Subgoal.focus_params: "Proof.context -> int -> thm -> Subgoal.focus * thm"} \\ |
399 @{index_ML Subgoal.focus_prems: "Proof.context -> int -> binding list option -> |
|
400 thm -> Subgoal.focus * thm"} \\ |
|
401 @{index_ML Subgoal.focus_params: "Proof.context -> int -> binding list option -> |
|
402 thm -> Subgoal.focus * thm"} \\ |
400 \end{mldecls} |
403 \end{mldecls} |
401 |
404 |
402 \begin{mldecls} |
405 \begin{mldecls} |
403 @{index_ML Goal.prove: "Proof.context -> string list -> term list -> term -> |
406 @{index_ML Goal.prove: "Proof.context -> string list -> term list -> term -> |
404 ({prems: thm list, context: Proof.context} -> tactic) -> thm"} \\ |
407 ({prems: thm list, context: Proof.context} -> tactic) -> thm"} \\ |
471 |
474 |
472 have "\<And>x. A x \<Longrightarrow> B x \<Longrightarrow> C x" |
475 have "\<And>x. A x \<Longrightarrow> B x \<Longrightarrow> C x" |
473 ML_val |
476 ML_val |
474 \<open>val {goal, context = goal_ctxt, ...} = @{Isar.goal}; |
477 \<open>val {goal, context = goal_ctxt, ...} = @{Isar.goal}; |
475 val (focus as {params, asms, concl, ...}, goal') = |
478 val (focus as {params, asms, concl, ...}, goal') = |
476 Subgoal.focus goal_ctxt 1 goal; |
479 Subgoal.focus goal_ctxt 1 (SOME [@{binding x}]) goal; |
477 val [A, B] = #prems focus; |
480 val [A, B] = #prems focus; |
478 val [(_, x)] = #params focus;\<close> |
481 val [(_, x)] = #params focus;\<close> |
479 sorry |
482 sorry |
480 end |
483 end |
481 |
484 |