src/HOL/Tools/Function/function.ML
changeset 36323 655e2d74de3a
parent 35756 cfde251d03a5
child 36518 a33b986f2e22
equal deleted inserted replaced
36322:81cba3921ba5 36323:655e2d74de3a
   118         lthy
   118         lthy
   119         |> Local_Theory.declaration false (add_function_data o morph_function_data info)
   119         |> Local_Theory.declaration false (add_function_data o morph_function_data info)
   120       end
   120       end
   121   in
   121   in
   122     lthy
   122     lthy
   123     |> Proof.theorem_i NONE afterqed [[(Logic.unprotect (concl_of goalstate), [])]]
   123     |> Proof.theorem NONE afterqed [[(Logic.unprotect (concl_of goalstate), [])]]
   124     |> Proof.refine (Method.primitive_text (fn _ => goalstate)) |> Seq.hd
   124     |> Proof.refine (Method.primitive_text (fn _ => goalstate)) |> Seq.hd
   125   end
   125   end
   126 
   126 
   127 val add_function =
   127 val add_function =
   128   gen_add_function false Specification.check_spec (TypeInfer.anyT HOLogic.typeS)
   128   gen_add_function false Specification.check_spec (TypeInfer.anyT HOLogic.typeS)
   175     |> ProofContext.note_thmss ""
   175     |> ProofContext.note_thmss ""
   176        [((Binding.empty, [Context_Rules.intro_bang (SOME 1)]), [([allI], [])])] |> snd
   176        [((Binding.empty, [Context_Rules.intro_bang (SOME 1)]), [([allI], [])])] |> snd
   177     |> ProofContext.note_thmss ""
   177     |> ProofContext.note_thmss ""
   178        [((Binding.name "termination", [Context_Rules.intro_bang (SOME 0)]),
   178        [((Binding.name "termination", [Context_Rules.intro_bang (SOME 0)]),
   179          [([Goal.norm_result termination], [])])] |> snd
   179          [([Goal.norm_result termination], [])])] |> snd
   180     |> Proof.theorem_i NONE afterqed [[(goal, [])]]
   180     |> Proof.theorem NONE afterqed [[(goal, [])]]
   181   end
   181   end
   182 
   182 
   183 val termination_proof = gen_termination_proof Syntax.check_term
   183 val termination_proof = gen_termination_proof Syntax.check_term
   184 val termination_proof_cmd = gen_termination_proof Syntax.read_term
   184 val termination_proof_cmd = gen_termination_proof Syntax.read_term
   185 
   185