| author | paulson | 
| Wed, 09 Jun 2004 11:19:23 +0200 | |
| changeset 14890 | 51f28df21c8b | 
| parent 14168 | ed81cd283816 | 
| child 14981 | e73f8140af78 | 
| permissions | -rw-r--r-- | 
| 13403 | 1 | (* Title: HOL/Extraction.thy | 
| 2 | ID: $Id$ | |
| 3 | Author: Stefan Berghofer, TU Muenchen | |
| 4 | License: GPL (GNU GENERAL PUBLIC LICENSE) | |
| 5 | *) | |
| 6 | ||
| 7 | header {* Program extraction for HOL *}
 | |
| 8 | ||
| 9 | theory Extraction = Datatype | |
| 10 | files | |
| 11 | "Tools/rewrite_hol_proof.ML": | |
| 12 | ||
| 13 | subsection {* Setup *}
 | |
| 14 | ||
| 15 | ML_setup {*
 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 16 | fun realizes_set_proc (Const ("realizes", Type ("fun", [Type ("Null", []), _])) $ r $
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 17 |       (Const ("op :", _) $ x $ S)) = (case strip_comb S of
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 18 | (Var (ixn, U), ts) => Some (list_comb (Var (ixn, binder_types U @ | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 19 | [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), ts @ [x])) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 20 | | (Free (s, U), ts) => Some (list_comb (Free (s, binder_types U @ | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 21 | [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), ts @ [x])) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 22 | | _ => None) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 23 |   | realizes_set_proc (Const ("realizes", Type ("fun", [T, _])) $ r $
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 24 |       (Const ("op :", _) $ x $ S)) = (case strip_comb S of
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 25 | (Var (ixn, U), ts) => Some (list_comb (Var (ixn, T :: binder_types U @ | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 26 | [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), r :: ts @ [x])) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 27 | | (Free (s, U), ts) => Some (list_comb (Free (s, T :: binder_types U @ | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 28 | [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), r :: ts @ [x])) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 29 | | _ => None) | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 30 | | realizes_set_proc _ = None; | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 31 | |
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 32 | fun mk_realizes_set r rT s (setT as Type ("set", [elT])) =
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 33 |   Abs ("x", elT, Const ("realizes", rT --> HOLogic.boolT --> HOLogic.boolT) $
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 34 |     incr_boundvars 1 r $ (Const ("op :", elT --> setT --> HOLogic.boolT) $
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 35 | Bound 0 $ incr_boundvars 1 s)); | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 36 | |
| 13403 | 37 | Context.>> (fn thy => thy |> | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 38 | Extraction.add_types | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 39 |       [("bool", ([], None)),
 | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 40 |        ("set", ([realizes_set_proc], Some mk_realizes_set))] |>
 | 
| 13403 | 41 | Extraction.set_preprocessor (fn sg => | 
| 42 | Proofterm.rewrite_proof_notypes | |
| 43 |         ([], ("HOL/elim_cong", RewriteHOLProof.elim_cong) ::
 | |
| 44 | ProofRewriteRules.rprocs true) o | |
| 45 | Proofterm.rewrite_proof (Sign.tsig_of sg) | |
| 13599 | 46 | (RewriteHOLProof.rews, ProofRewriteRules.rprocs true) o | 
| 47 | ProofRewriteRules.elim_vars (curry Const "arbitrary"))) | |
| 13403 | 48 | *} | 
| 49 | ||
| 50 | lemmas [extraction_expand] = | |
| 13468 
71118807d303
Removed (now unneeded) declaration of realizers for induction on natural numbers.
 berghofe parents: 
13452diff
changeset | 51 | atomize_eq atomize_all atomize_imp | 
| 13403 | 52 | allE rev_mp conjE Eq_TrueI Eq_FalseI eqTrueI eqTrueE eq_cong2 | 
| 53 | notE' impE' impE iffE imp_cong simp_thms | |
| 54 | induct_forall_eq induct_implies_eq induct_equal_eq | |
| 13942 | 55 | induct_forall_def induct_implies_def induct_impliesI | 
| 13403 | 56 | induct_atomize induct_rulify1 induct_rulify2 | 
| 57 | ||
| 58 | datatype sumbool = Left | Right | |
| 59 | ||
| 60 | subsection {* Type of extracted program *}
 | |
| 61 | ||
| 62 | extract_type | |
| 63 | "typeof (Trueprop P) \<equiv> typeof P" | |
| 64 | ||
| 65 |   "typeof P \<equiv> Type (TYPE(Null)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 66 |      typeof (P \<longrightarrow> Q) \<equiv> Type (TYPE('Q))"
 | |
| 67 | ||
| 68 | "typeof Q \<equiv> Type (TYPE(Null)) \<Longrightarrow> typeof (P \<longrightarrow> Q) \<equiv> Type (TYPE(Null))" | |
| 69 | ||
| 70 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 71 |      typeof (P \<longrightarrow> Q) \<equiv> Type (TYPE('P \<Rightarrow> 'Q))"
 | |
| 72 | ||
| 73 | "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE(Null))) \<Longrightarrow> | |
| 74 | typeof (\<forall>x. P x) \<equiv> Type (TYPE(Null))" | |
| 75 | ||
| 76 |   "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE('P))) \<Longrightarrow>
 | |
| 77 |      typeof (\<forall>x::'a. P x) \<equiv> Type (TYPE('a \<Rightarrow> 'P))"
 | |
| 78 | ||
| 79 | "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE(Null))) \<Longrightarrow> | |
| 80 |      typeof (\<exists>x::'a. P x) \<equiv> Type (TYPE('a))"
 | |
| 81 | ||
| 82 |   "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE('P))) \<Longrightarrow>
 | |
| 83 |      typeof (\<exists>x::'a. P x) \<equiv> Type (TYPE('a \<times> 'P))"
 | |
| 84 | ||
| 85 | "typeof P \<equiv> Type (TYPE(Null)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE(Null)) \<Longrightarrow> | |
| 86 | typeof (P \<or> Q) \<equiv> Type (TYPE(sumbool))" | |
| 87 | ||
| 88 |   "typeof P \<equiv> Type (TYPE(Null)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 89 |      typeof (P \<or> Q) \<equiv> Type (TYPE('Q option))"
 | |
| 90 | ||
| 91 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE(Null)) \<Longrightarrow>
 | |
| 92 |      typeof (P \<or> Q) \<equiv> Type (TYPE('P option))"
 | |
| 93 | ||
| 94 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 95 |      typeof (P \<or> Q) \<equiv> Type (TYPE('P + 'Q))"
 | |
| 96 | ||
| 97 |   "typeof P \<equiv> Type (TYPE(Null)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 98 |      typeof (P \<and> Q) \<equiv> Type (TYPE('Q))"
 | |
| 99 | ||
| 100 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE(Null)) \<Longrightarrow>
 | |
| 101 |      typeof (P \<and> Q) \<equiv> Type (TYPE('P))"
 | |
| 102 | ||
| 103 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow> typeof Q \<equiv> Type (TYPE('Q)) \<Longrightarrow>
 | |
| 104 |      typeof (P \<and> Q) \<equiv> Type (TYPE('P \<times> 'Q))"
 | |
| 105 | ||
| 106 | "typeof (P = Q) \<equiv> typeof ((P \<longrightarrow> Q) \<and> (Q \<longrightarrow> P))" | |
| 107 | ||
| 108 | "typeof (x \<in> P) \<equiv> typeof P" | |
| 109 | ||
| 110 | subsection {* Realizability *}
 | |
| 111 | ||
| 112 | realizability | |
| 113 | "(realizes t (Trueprop P)) \<equiv> (Trueprop (realizes t P))" | |
| 114 | ||
| 115 | "(typeof P) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 116 | (realizes t (P \<longrightarrow> Q)) \<equiv> (realizes Null P \<longrightarrow> realizes t Q)" | |
| 117 | ||
| 118 |   "(typeof P) \<equiv> (Type (TYPE('P))) \<Longrightarrow>
 | |
| 119 | (typeof Q) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 120 | (realizes t (P \<longrightarrow> Q)) \<equiv> (\<forall>x::'P. realizes x P \<longrightarrow> realizes Null Q)" | |
| 121 | ||
| 122 | "(realizes t (P \<longrightarrow> Q)) \<equiv> (\<forall>x. realizes x P \<longrightarrow> realizes (t x) Q)" | |
| 123 | ||
| 124 | "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE(Null))) \<Longrightarrow> | |
| 125 | (realizes t (\<forall>x. P x)) \<equiv> (\<forall>x. realizes Null (P x))" | |
| 126 | ||
| 127 | "(realizes t (\<forall>x. P x)) \<equiv> (\<forall>x. realizes (t x) (P x))" | |
| 128 | ||
| 129 | "(\<lambda>x. typeof (P x)) \<equiv> (\<lambda>x. Type (TYPE(Null))) \<Longrightarrow> | |
| 130 | (realizes t (\<exists>x. P x)) \<equiv> (realizes Null (P t))" | |
| 131 | ||
| 132 | "(realizes t (\<exists>x. P x)) \<equiv> (realizes (snd t) (P (fst t)))" | |
| 133 | ||
| 134 | "(typeof P) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 135 | (typeof Q) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 136 | (realizes t (P \<or> Q)) \<equiv> | |
| 137 | (case t of Left \<Rightarrow> realizes Null P | Right \<Rightarrow> realizes Null Q)" | |
| 138 | ||
| 139 | "(typeof P) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 140 | (realizes t (P \<or> Q)) \<equiv> | |
| 141 | (case t of None \<Rightarrow> realizes Null P | Some q \<Rightarrow> realizes q Q)" | |
| 142 | ||
| 143 | "(typeof Q) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 144 | (realizes t (P \<or> Q)) \<equiv> | |
| 145 | (case t of None \<Rightarrow> realizes Null Q | Some p \<Rightarrow> realizes p P)" | |
| 146 | ||
| 147 | "(realizes t (P \<or> Q)) \<equiv> | |
| 148 | (case t of Inl p \<Rightarrow> realizes p P | Inr q \<Rightarrow> realizes q Q)" | |
| 149 | ||
| 150 | "(typeof P) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 151 | (realizes t (P \<and> Q)) \<equiv> (realizes Null P \<and> realizes t Q)" | |
| 152 | ||
| 153 | "(typeof Q) \<equiv> (Type (TYPE(Null))) \<Longrightarrow> | |
| 154 | (realizes t (P \<and> Q)) \<equiv> (realizes t P \<and> realizes Null Q)" | |
| 155 | ||
| 156 | "(realizes t (P \<and> Q)) \<equiv> (realizes (fst t) P \<and> realizes (snd t) Q)" | |
| 157 | ||
| 158 | "typeof P \<equiv> Type (TYPE(Null)) \<Longrightarrow> | |
| 159 | realizes t (\<not> P) \<equiv> \<not> realizes Null P" | |
| 160 | ||
| 161 |   "typeof P \<equiv> Type (TYPE('P)) \<Longrightarrow>
 | |
| 162 | realizes t (\<not> P) \<equiv> (\<forall>x::'P. \<not> realizes x P)" | |
| 163 | ||
| 164 | "typeof (P::bool) \<equiv> Type (TYPE(Null)) \<Longrightarrow> | |
| 165 | typeof Q \<equiv> Type (TYPE(Null)) \<Longrightarrow> | |
| 166 | realizes t (P = Q) \<equiv> realizes Null P = realizes Null Q" | |
| 167 | ||
| 168 | "(realizes t (P = Q)) \<equiv> (realizes t ((P \<longrightarrow> Q) \<and> (Q \<longrightarrow> P)))" | |
| 169 | ||
| 170 | subsection {* Computational content of basic inference rules *}
 | |
| 171 | ||
| 172 | theorem disjE_realizer: | |
| 173 | assumes r: "case x of Inl p \<Rightarrow> P p | Inr q \<Rightarrow> Q q" | |
| 174 | and r1: "\<And>p. P p \<Longrightarrow> R (f p)" and r2: "\<And>q. Q q \<Longrightarrow> R (g q)" | |
| 175 | shows "R (case x of Inl p \<Rightarrow> f p | Inr q \<Rightarrow> g q)" | |
| 176 | proof (cases x) | |
| 177 | case Inl | |
| 178 | with r show ?thesis by simp (rule r1) | |
| 179 | next | |
| 180 | case Inr | |
| 181 | with r show ?thesis by simp (rule r2) | |
| 182 | qed | |
| 183 | ||
| 184 | theorem disjE_realizer2: | |
| 185 | assumes r: "case x of None \<Rightarrow> P | Some q \<Rightarrow> Q q" | |
| 186 | and r1: "P \<Longrightarrow> R f" and r2: "\<And>q. Q q \<Longrightarrow> R (g q)" | |
| 187 | shows "R (case x of None \<Rightarrow> f | Some q \<Rightarrow> g q)" | |
| 188 | proof (cases x) | |
| 189 | case None | |
| 190 | with r show ?thesis by simp (rule r1) | |
| 191 | next | |
| 192 | case Some | |
| 193 | with r show ?thesis by simp (rule r2) | |
| 194 | qed | |
| 195 | ||
| 196 | theorem disjE_realizer3: | |
| 197 | assumes r: "case x of Left \<Rightarrow> P | Right \<Rightarrow> Q" | |
| 198 | and r1: "P \<Longrightarrow> R f" and r2: "Q \<Longrightarrow> R g" | |
| 199 | shows "R (case x of Left \<Rightarrow> f | Right \<Rightarrow> g)" | |
| 200 | proof (cases x) | |
| 201 | case Left | |
| 202 | with r show ?thesis by simp (rule r1) | |
| 203 | next | |
| 204 | case Right | |
| 205 | with r show ?thesis by simp (rule r2) | |
| 206 | qed | |
| 207 | ||
| 208 | theorem conjI_realizer: | |
| 209 | "P p \<Longrightarrow> Q q \<Longrightarrow> P (fst (p, q)) \<and> Q (snd (p, q))" | |
| 210 | by simp | |
| 211 | ||
| 212 | theorem exI_realizer: | |
| 13918 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 213 | "P y x \<Longrightarrow> P (snd (x, y)) (fst (x, y))" by simp | 
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 214 | |
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 215 | theorem exE_realizer: "P (snd p) (fst p) \<Longrightarrow> | 
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 216 | (\<And>x y. P y x \<Longrightarrow> Q (f x y)) \<Longrightarrow> Q (case p of (x, y) \<Rightarrow> f x y)" | 
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 217 | by (cases p) simp | 
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 218 | |
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 219 | theorem exE_realizer': "P (snd p) (fst p) \<Longrightarrow> | 
| 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 220 | (\<And>x y. P y x \<Longrightarrow> Q) \<Longrightarrow> Q" by (cases p) simp | 
| 13403 | 221 | |
| 222 | realizers | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 223 | impI (P, Q): "\<lambda>pq. pq" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 224 | "\<Lambda> P Q pq (h: _). allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h \<cdot> x))" | 
| 13403 | 225 | |
| 226 | impI (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 227 | "\<Lambda> P Q (h: _). allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h \<cdot> x))" | 
| 13403 | 228 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 229 | impI (Q): "\<lambda>q. q" "\<Lambda> P Q q. impI \<cdot> _ \<cdot> _" | 
| 13403 | 230 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 231 | impI: "Null" "impI" | 
| 13403 | 232 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 233 | mp (P, Q): "\<lambda>pq. pq" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 234 | "\<Lambda> P Q pq (h: _) p. mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)" | 
| 13403 | 235 | |
| 236 | mp (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 237 | "\<Lambda> P Q (h: _) p. mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)" | 
| 13403 | 238 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 239 | mp (Q): "\<lambda>q. q" "\<Lambda> P Q q. mp \<cdot> _ \<cdot> _" | 
| 13403 | 240 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 241 | mp: "Null" "mp" | 
| 13403 | 242 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 243 | allI (P): "\<lambda>p. p" "\<Lambda> P p. allI \<cdot> _" | 
| 13403 | 244 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 245 | allI: "Null" "allI" | 
| 13403 | 246 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 247 | spec (P): "\<lambda>x p. p x" "\<Lambda> P x p. spec \<cdot> _ \<cdot> x" | 
| 13403 | 248 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 249 | spec: "Null" "spec" | 
| 13403 | 250 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 251 | exI (P): "\<lambda>x p. (x, p)" "\<Lambda> P x p. exI_realizer \<cdot> P \<cdot> p \<cdot> x" | 
| 13403 | 252 | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 253 | exI: "\<lambda>x. x" "\<Lambda> P x (h: _). h" | 
| 13403 | 254 | |
| 13918 
2134ed516b1b
Tuned realizer for exE rule, to avoid blowup of extracted program.
 berghofe parents: 
13725diff
changeset | 255 | exE (P, Q): "\<lambda>p pq. case p of (x, y) \<Rightarrow> pq x y" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 256 | "\<Lambda> P Q p (h: _) pq. exE_realizer \<cdot> P \<cdot> p \<cdot> Q \<cdot> pq \<bullet> h" | 
| 13403 | 257 | |
| 258 | exE (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 259 | "\<Lambda> P Q p. exE_realizer' \<cdot> _ \<cdot> _ \<cdot> _" | 
| 13403 | 260 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 261 | exE (Q): "\<lambda>x pq. pq x" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 262 | "\<Lambda> P Q x (h1: _) pq (h2: _). h2 \<cdot> x \<bullet> h1" | 
| 13403 | 263 | |
| 264 | exE: "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 265 | "\<Lambda> P Q x (h1: _) (h2: _). h2 \<cdot> x \<bullet> h1" | 
| 13403 | 266 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 267 | conjI (P, Q): "Pair" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 268 | "\<Lambda> P Q p (h: _) q. conjI_realizer \<cdot> P \<cdot> p \<cdot> Q \<cdot> q \<bullet> h" | 
| 13403 | 269 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 270 | conjI (P): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 271 | "\<Lambda> P Q p. conjI \<cdot> _ \<cdot> _" | 
| 13403 | 272 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 273 | conjI (Q): "\<lambda>q. q" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 274 | "\<Lambda> P Q (h: _) q. conjI \<cdot> _ \<cdot> _ \<bullet> h" | 
| 13403 | 275 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 276 | conjI: "Null" "conjI" | 
| 13403 | 277 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 278 | conjunct1 (P, Q): "fst" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 279 | "\<Lambda> P Q pq. conjunct1 \<cdot> _ \<cdot> _" | 
| 13403 | 280 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 281 | conjunct1 (P): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 282 | "\<Lambda> P Q p. conjunct1 \<cdot> _ \<cdot> _" | 
| 13403 | 283 | |
| 284 | conjunct1 (Q): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 285 | "\<Lambda> P Q q. conjunct1 \<cdot> _ \<cdot> _" | 
| 13403 | 286 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 287 | conjunct1: "Null" "conjunct1" | 
| 13403 | 288 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 289 | conjunct2 (P, Q): "snd" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 290 | "\<Lambda> P Q pq. conjunct2 \<cdot> _ \<cdot> _" | 
| 13403 | 291 | |
| 292 | conjunct2 (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 293 | "\<Lambda> P Q p. conjunct2 \<cdot> _ \<cdot> _" | 
| 13403 | 294 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 295 | conjunct2 (Q): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 296 | "\<Lambda> P Q p. conjunct2 \<cdot> _ \<cdot> _" | 
| 13403 | 297 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 298 | conjunct2: "Null" "conjunct2" | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 299 | |
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 300 | disjI1 (P, Q): "Inl" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 301 | "\<Lambda> P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_1 \<cdot> P \<cdot> _ \<cdot> p)" | 
| 13403 | 302 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 303 | disjI1 (P): "Some" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 304 | "\<Lambda> P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> P \<cdot> p)" | 
| 13403 | 305 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 306 | disjI1 (Q): "None" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 307 | "\<Lambda> P Q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_1 \<cdot> _ \<cdot> _)" | 
| 13403 | 308 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 309 | disjI1: "Left" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 310 | "\<Lambda> P Q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sumbool.cases_1 \<cdot> _ \<cdot> _)" | 
| 13403 | 311 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 312 | disjI2 (P, Q): "Inr" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 313 | "\<Lambda> Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_2 \<cdot> _ \<cdot> Q \<cdot> q)" | 
| 13403 | 314 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 315 | disjI2 (P): "None" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 316 | "\<Lambda> Q P. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_1 \<cdot> _ \<cdot> _)" | 
| 13403 | 317 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 318 | disjI2 (Q): "Some" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 319 | "\<Lambda> Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> Q \<cdot> q)" | 
| 13403 | 320 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 321 | disjI2: "Right" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 322 | "\<Lambda> Q P. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sumbool.cases_2 \<cdot> _ \<cdot> _)" | 
| 13403 | 323 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 324 | disjE (P, Q, R): "\<lambda>pq pr qr. | 
| 13403 | 325 | (case pq of Inl p \<Rightarrow> pr p | Inr q \<Rightarrow> qr q)" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 326 | "\<Lambda> P Q R pq (h1: _) pr (h2: _) qr. | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 327 | disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2" | 
| 13403 | 328 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 329 | disjE (Q, R): "\<lambda>pq pr qr. | 
| 13403 | 330 | (case pq of None \<Rightarrow> pr | Some q \<Rightarrow> qr q)" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 331 | "\<Lambda> P Q R pq (h1: _) pr (h2: _) qr. | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 332 | disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2" | 
| 13403 | 333 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 334 | disjE (P, R): "\<lambda>pq pr qr. | 
| 13403 | 335 | (case pq of None \<Rightarrow> qr | Some p \<Rightarrow> pr p)" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 336 | "\<Lambda> P Q R pq (h1: _) pr (h2: _) qr (h3: _). | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 337 | disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> qr \<cdot> pr \<bullet> h1 \<bullet> h3 \<bullet> h2" | 
| 13403 | 338 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 339 | disjE (R): "\<lambda>pq pr qr. | 
| 13403 | 340 | (case pq of Left \<Rightarrow> pr | Right \<Rightarrow> qr)" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 341 | "\<Lambda> P Q R pq (h1: _) pr (h2: _) qr. | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 342 | disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2" | 
| 13403 | 343 | |
| 344 | disjE (P, Q): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 345 | "\<Lambda> P Q R pq. disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _" | 
| 13403 | 346 | |
| 347 | disjE (Q): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 348 | "\<Lambda> P Q R pq. disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _" | 
| 13403 | 349 | |
| 350 | disjE (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 351 | "\<Lambda> P Q R pq (h1: _) (h2: _) (h3: _). | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 352 | disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _ \<bullet> h1 \<bullet> h3 \<bullet> h2" | 
| 13403 | 353 | |
| 354 | disjE: "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 355 | "\<Lambda> P Q R pq. disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _" | 
| 13403 | 356 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 357 | FalseE (P): "arbitrary" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 358 | "\<Lambda> P. FalseE \<cdot> _" | 
| 13403 | 359 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 360 | FalseE: "Null" "FalseE" | 
| 13403 | 361 | |
| 362 | notI (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 363 | "\<Lambda> P (h: _). allI \<cdot> _ \<bullet> (\<Lambda> x. notI \<cdot> _ \<bullet> (h \<cdot> x))" | 
| 13403 | 364 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 365 | notI: "Null" "notI" | 
| 13403 | 366 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 367 | notE (P, R): "\<lambda>p. arbitrary" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 368 | "\<Lambda> P R (h: _) p. notE \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)" | 
| 13403 | 369 | |
| 370 | notE (P): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 371 | "\<Lambda> P R (h: _) p. notE \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)" | 
| 13403 | 372 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 373 | notE (R): "arbitrary" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 374 | "\<Lambda> P R. notE \<cdot> _ \<cdot> _" | 
| 13403 | 375 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 376 | notE: "Null" "notE" | 
| 13403 | 377 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 378 | subst (P): "\<lambda>s t ps. ps" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 379 | "\<Lambda> s t P (h: _) ps. subst \<cdot> s \<cdot> t \<cdot> P ps \<bullet> h" | 
| 13403 | 380 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 381 | subst: "Null" "subst" | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 382 | |
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 383 | iffD1 (P, Q): "fst" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 384 | "\<Lambda> Q P pq (h: _) p. | 
| 13403 | 385 | mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h))" | 
| 386 | ||
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 387 | iffD1 (P): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 388 | "\<Lambda> Q P p (h: _). mp \<cdot> _ \<cdot> _ \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h)" | 
| 13403 | 389 | |
| 390 | iffD1 (Q): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 391 | "\<Lambda> Q P q1 (h: _) q2. | 
| 13403 | 392 | mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q2 \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h))" | 
| 393 | ||
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 394 | iffD1: "Null" "iffD1" | 
| 13403 | 395 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 396 | iffD2 (P, Q): "snd" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 397 | "\<Lambda> P Q pq (h: _) q. | 
| 13403 | 398 | mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h))" | 
| 399 | ||
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 400 | iffD2 (P): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 401 | "\<Lambda> P Q p (h: _). mp \<cdot> _ \<cdot> _ \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h)" | 
| 13403 | 402 | |
| 403 | iffD2 (Q): "Null" | |
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 404 | "\<Lambda> P Q q1 (h: _) q2. | 
| 13403 | 405 | mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q2 \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h))" | 
| 406 | ||
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 407 | iffD2: "Null" "iffD2" | 
| 13403 | 408 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 409 | iffI (P, Q): "Pair" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 410 | "\<Lambda> P Q pq (h1 : _) qp (h2 : _). conjI_realizer \<cdot> | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 411 | (\<lambda>pq. \<forall>x. P x \<longrightarrow> Q (pq x)) \<cdot> pq \<cdot> | 
| 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 412 | (\<lambda>qp. \<forall>x. Q x \<longrightarrow> P (qp x)) \<cdot> qp \<bullet> | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 413 | (allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h1 \<cdot> x))) \<bullet> | 
| 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 414 | (allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h2 \<cdot> x)))" | 
| 13403 | 415 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 416 | iffI (P): "\<lambda>p. p" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 417 | "\<Lambda> P Q (h1 : _) p (h2 : _). conjI \<cdot> _ \<cdot> _ \<bullet> | 
| 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 418 | (allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h1 \<cdot> x))) \<bullet> | 
| 13403 | 419 | (impI \<cdot> _ \<cdot> _ \<bullet> h2)" | 
| 420 | ||
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 421 | iffI (Q): "\<lambda>q. q" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 422 | "\<Lambda> P Q q (h1 : _) (h2 : _). conjI \<cdot> _ \<cdot> _ \<bullet> | 
| 13403 | 423 | (impI \<cdot> _ \<cdot> _ \<bullet> h1) \<bullet> | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 424 | (allI \<cdot> _ \<bullet> (\<Lambda> x. impI \<cdot> _ \<cdot> _ \<bullet> (h2 \<cdot> x)))" | 
| 13403 | 425 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 426 | iffI: "Null" "iffI" | 
| 13403 | 427 | |
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 428 | (* | 
| 13403 | 429 | classical: "Null" | 
| 14168 
ed81cd283816
Prepared for extended identifiers (\<alpha>, etc.)
 skalberg parents: 
13942diff
changeset | 430 | "\<Lambda> P. classical \<cdot> _" | 
| 13725 
12404b452034
Changed format of realizers / correctness proofs.
 berghofe parents: 
13599diff
changeset | 431 | *) | 
| 13403 | 432 | |
| 433 | end |