src/Pure/Isar/obtain.ML
changeset 60555 51a6997b1384
parent 60481 09b04c815fdb
child 60642 48dd1cefb4ae
equal deleted inserted replaced
60554:c0e1c121c7c0 60555:51a6997b1384
   157     val ((_, thesis), thesis_ctxt) = obtain_thesis ctxt;
   157     val ((_, thesis), thesis_ctxt) = obtain_thesis ctxt;
   158     val obtains = prep_obtains thesis_ctxt thesis raw_obtains;
   158     val obtains = prep_obtains thesis_ctxt thesis raw_obtains;
   159     val atts = Rule_Cases.cases_open :: obtains_attributes raw_obtains;
   159     val atts = Rule_Cases.cases_open :: obtains_attributes raw_obtains;
   160   in
   160   in
   161     state
   161     state
   162     |> Proof.have NONE (K I)
   162     |> Proof.have true NONE (K I)
   163       [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   163       [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   164       (map (fn (a, A) => ((a, [Context_Rules.intro_query NONE]), [(A, [])])) obtains)
   164       (map (fn (a, A) => ((a, [Context_Rules.intro_query NONE]), [(A, [])])) obtains)
   165       [((Binding.empty, atts), [(thesis, [])])] int
   165       [((Binding.empty, atts), [(thesis, [])])] int
   166     |-> Proof.refine_insert
   166     |-> Proof.refine_insert
   167   end;
   167   end;
   231         |> Proof.map_context declare_asms
   231         |> Proof.map_context declare_asms
   232         |> Proof.assm (obtain_export params_ctxt rule cparams) asms
   232         |> Proof.assm (obtain_export params_ctxt rule cparams) asms
   233       end;
   233       end;
   234   in
   234   in
   235     state
   235     state
   236     |> Proof.have NONE after_qed
   236     |> Proof.have true NONE after_qed
   237       [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   237       [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   238       [((that_binding, [Context_Rules.intro_query NONE]), [(that_prop, [])])]
   238       [((that_binding, [Context_Rules.intro_query NONE]), [(that_prop, [])])]
   239       [(Thm.empty_binding, [(thesis, [])])] int
   239       [(Thm.empty_binding, [(thesis, [])])] int
   240     |-> Proof.refine_insert
   240     |-> Proof.refine_insert
   241     |> Proof.map_context (fold Variable.bind_term binds')
   241     |> Proof.map_context (fold Variable.bind_term binds')
   407     state
   407     state
   408     |> Proof.enter_forward
   408     |> Proof.enter_forward
   409     |> Proof.begin_block
   409     |> Proof.begin_block
   410     |> Proof.fix [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   410     |> Proof.fix [(Binding.name Auto_Bind.thesisN, NONE, NoSyn)]
   411     |> Proof.chain_facts chain_facts
   411     |> Proof.chain_facts chain_facts
   412     |> Proof.internal_goal print_result Proof_Context.mode_schematic "guess"
   412     |> Proof.internal_goal print_result Proof_Context.mode_schematic true "guess"
   413       (SOME before_qed) after_qed
   413       (SOME before_qed) after_qed
   414       [] [] [(Thm.empty_binding, [(Logic.mk_term goal, []), (goal, [])])]
   414       [] [] [(Thm.empty_binding, [(Logic.mk_term goal, []), (goal, [])])]
   415     |> snd
   415     |> snd
   416     |> Proof.refine (Method.primitive_text (fn _ => fn _ =>
   416     |> Proof.refine (Method.primitive_text (fn _ => fn _ =>
   417         Goal.init (Thm.cterm_of ctxt thesis)))
   417         Goal.init (Thm.cterm_of ctxt thesis)))