112 val no_attributes: 'a -> 'a * 'b list |
112 val no_attributes: 'a -> 'a * 'b list |
113 val simple_fact: 'a -> ('a * 'b list) list |
113 val simple_fact: 'a -> ('a * 'b list) list |
114 val tag: string * string -> attribute |
114 val tag: string * string -> attribute |
115 val untag: string -> attribute |
115 val untag: string -> attribute |
116 val kind: string -> attribute |
116 val kind: string -> attribute |
117 val reconstruct_proof_of: Proof.context -> thm -> Proofterm.proof |
117 val reconstruct_proof_of: thm -> Proofterm.proof |
118 val clean_proof_of: Proof.context -> bool -> thm -> Proofterm.proof |
118 val clean_proof_of: bool -> thm -> Proofterm.proof |
119 val register_proofs: thm list lazy -> theory -> theory |
119 val register_proofs: thm list lazy -> theory -> theory |
120 val consolidate_theory: theory -> unit |
120 val consolidate_theory: theory -> unit |
121 val show_consts: bool Config.T |
121 val show_consts: bool Config.T |
122 val show_hyps: bool Config.T |
122 val show_hyps: bool Config.T |
123 val show_tags: bool Config.T |
123 val show_tags: bool Config.T |
674 |
674 |
675 |
675 |
676 |
676 |
677 (** proof terms **) |
677 (** proof terms **) |
678 |
678 |
679 fun reconstruct_proof_of ctxt raw_thm = |
679 fun reconstruct_proof_of thm = |
680 let val thm = Thm.transfer' ctxt raw_thm |
680 Proofterm.reconstruct_proof (Thm.theory_of_thm thm) (Thm.prop_of thm) (Thm.proof_of thm); |
681 in Proofterm.reconstruct_proof ctxt (Thm.prop_of thm) (Thm.proof_of thm) end; |
681 |
682 |
682 fun clean_proof_of full thm = |
683 fun clean_proof_of ctxt full raw_thm = |
683 let |
684 let |
684 val thy = Thm.theory_of_thm thm; |
685 val thm = Thm.transfer' ctxt raw_thm; |
|
686 val (_, prop) = |
685 val (_, prop) = |
687 Logic.unconstrainT (Thm.shyps_of thm) |
686 Logic.unconstrainT (Thm.shyps_of thm) |
688 (Logic.list_implies (Thm.hyps_of thm, Thm.prop_of thm)); |
687 (Logic.list_implies (Thm.hyps_of thm, Thm.prop_of thm)); |
689 in |
688 in |
690 Proofterm.proof_of (Proofterm.strip_thm (Thm.proof_body_of thm)) |
689 Proofterm.proof_of (Proofterm.strip_thm (Thm.proof_body_of thm)) |
691 |> Proofterm.reconstruct_proof ctxt prop |
690 |> Proofterm.reconstruct_proof thy prop |
692 |> Proofterm.expand_proof ctxt [("", NONE)] |
691 |> Proofterm.expand_proof thy [("", NONE)] |
693 |> Proofterm.rew_proof (Proof_Context.theory_of ctxt) |
692 |> Proofterm.rew_proof thy |
694 |> Proofterm.no_thm_proofs |
693 |> Proofterm.no_thm_proofs |
695 |> not full ? Proofterm.shrink_proof |
694 |> not full ? Proofterm.shrink_proof |
696 end; |
695 end; |
697 |
696 |
698 |
697 |