src/HOL/Extraction.thy
changeset 13725 12404b452034
parent 13599 cfdf7e4cd0d2
child 13918 2134ed516b1b
     1.1 --- a/src/HOL/Extraction.thy	Mon Nov 25 20:32:29 2002 +0100
     1.2 +++ b/src/HOL/Extraction.thy	Wed Nov 27 17:06:47 2002 +0100
     1.3 @@ -13,7 +13,31 @@
     1.4  subsection {* Setup *}
     1.5  
     1.6  ML_setup {*
     1.7 +fun realizes_set_proc (Const ("realizes", Type ("fun", [Type ("Null", []), _])) $ r $
     1.8 +      (Const ("op :", _) $ x $ S)) = (case strip_comb S of
     1.9 +        (Var (ixn, U), ts) => Some (list_comb (Var (ixn, binder_types U @
    1.10 +           [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), ts @ [x]))
    1.11 +      | (Free (s, U), ts) => Some (list_comb (Free (s, binder_types U @
    1.12 +           [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), ts @ [x]))
    1.13 +      | _ => None)
    1.14 +  | realizes_set_proc (Const ("realizes", Type ("fun", [T, _])) $ r $
    1.15 +      (Const ("op :", _) $ x $ S)) = (case strip_comb S of
    1.16 +        (Var (ixn, U), ts) => Some (list_comb (Var (ixn, T :: binder_types U @
    1.17 +           [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), r :: ts @ [x]))
    1.18 +      | (Free (s, U), ts) => Some (list_comb (Free (s, T :: binder_types U @
    1.19 +           [HOLogic.dest_setT (body_type U)] ---> HOLogic.boolT), r :: ts @ [x]))
    1.20 +      | _ => None)
    1.21 +  | realizes_set_proc _ = None;
    1.22 +
    1.23 +fun mk_realizes_set r rT s (setT as Type ("set", [elT])) =
    1.24 +  Abs ("x", elT, Const ("realizes", rT --> HOLogic.boolT --> HOLogic.boolT) $
    1.25 +    incr_boundvars 1 r $ (Const ("op :", elT --> setT --> HOLogic.boolT) $
    1.26 +      Bound 0 $ incr_boundvars 1 s));
    1.27 +
    1.28    Context.>> (fn thy => thy |>
    1.29 +    Extraction.add_types
    1.30 +      [("bool", ([], None)),
    1.31 +       ("set", ([realizes_set_proc], Some mk_realizes_set))] |>
    1.32      Extraction.set_preprocessor (fn sg =>
    1.33        Proofterm.rewrite_proof_notypes
    1.34          ([], ("HOL/elim_cong", RewriteHOLProof.elim_cong) ::
    1.35 @@ -189,223 +213,214 @@
    1.36    "P x y \<Longrightarrow> P (fst (x, y)) (snd (x, y))" by simp
    1.37  
    1.38  realizers
    1.39 -  impI (P, Q): "\<lambda>P Q pq. pq"
    1.40 +  impI (P, Q): "\<lambda>pq. pq"
    1.41      "\<Lambda>P Q pq (h: _). allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h \<cdot> x))"
    1.42  
    1.43    impI (P): "Null"
    1.44      "\<Lambda>P Q (h: _). allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h \<cdot> x))"
    1.45  
    1.46 -  impI (Q): "\<lambda>P Q q. q" "\<Lambda>P Q q. impI \<cdot> _ \<cdot> _"
    1.47 +  impI (Q): "\<lambda>q. q" "\<Lambda>P Q q. impI \<cdot> _ \<cdot> _"
    1.48  
    1.49 -  impI: "Null" "\<Lambda>P Q. impI \<cdot> _ \<cdot> _"
    1.50 +  impI: "Null" "impI"
    1.51  
    1.52 -  mp (P, Q): "\<lambda>P Q pq. pq"
    1.53 +  mp (P, Q): "\<lambda>pq. pq"
    1.54      "\<Lambda>P Q pq (h: _) p. mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)"
    1.55  
    1.56    mp (P): "Null"
    1.57      "\<Lambda>P Q (h: _) p. mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)"
    1.58  
    1.59 -  mp (Q): "\<lambda>P Q q. q" "\<Lambda>P Q q. mp \<cdot> _ \<cdot> _"
    1.60 +  mp (Q): "\<lambda>q. q" "\<Lambda>P Q q. mp \<cdot> _ \<cdot> _"
    1.61  
    1.62 -  mp: "Null" "\<Lambda>P Q. mp \<cdot> _ \<cdot> _"
    1.63 +  mp: "Null" "mp"
    1.64  
    1.65 -  allI (P): "\<lambda>P p. p" "\<Lambda>P p. allI \<cdot> _"
    1.66 +  allI (P): "\<lambda>p. p" "\<Lambda>P p. allI \<cdot> _"
    1.67  
    1.68 -  allI: "Null" "\<Lambda>P. allI \<cdot> _"
    1.69 +  allI: "Null" "allI"
    1.70  
    1.71 -  spec (P): "\<lambda>P x p. p x" "\<Lambda>P x p. spec \<cdot> _ \<cdot> x"
    1.72 +  spec (P): "\<lambda>x p. p x" "\<Lambda>P x p. spec \<cdot> _ \<cdot> x"
    1.73  
    1.74 -  spec: "Null" "\<Lambda>P x. spec \<cdot> _ \<cdot> x"
    1.75 +  spec: "Null" "spec"
    1.76  
    1.77 -  exI (P): "\<lambda>P x p. (x, p)" "\<Lambda>P. exI_realizer \<cdot> _"
    1.78 +  exI (P): "\<lambda>x p. (x, p)" "\<Lambda>P. exI_realizer \<cdot> _"
    1.79  
    1.80 -  exI: "\<lambda>P x. x" "\<Lambda>P x (h: _). h"
    1.81 +  exI: "\<lambda>x. x" "\<Lambda>P x (h: _). h"
    1.82  
    1.83 -  exE (P, Q): "\<lambda>P Q p pq. pq (fst p) (snd p)"
    1.84 +  exE (P, Q): "\<lambda>p pq. pq (fst p) (snd p)"
    1.85      "\<Lambda>P Q p (h1: _) pq (h2: _). h2 \<cdot> (fst p) \<cdot> (snd p) \<bullet> h1"
    1.86  
    1.87    exE (P): "Null"
    1.88      "\<Lambda>P Q p (h1: _) (h2: _). h2 \<cdot> (fst p) \<cdot> (snd p) \<bullet> h1"
    1.89  
    1.90 -  exE (Q): "\<lambda>P Q x pq. pq x"
    1.91 +  exE (Q): "\<lambda>x pq. pq x"
    1.92      "\<Lambda>P Q x (h1: _) pq (h2: _). h2 \<cdot> x \<bullet> h1"
    1.93  
    1.94    exE: "Null"
    1.95      "\<Lambda>P Q x (h1: _) (h2: _). h2 \<cdot> x \<bullet> h1"
    1.96  
    1.97 -  conjI (P, Q): "\<lambda>P Q p q. (p, q)"
    1.98 -    "\<Lambda>P Q p (h: _) q. conjI_realizer \<cdot>
    1.99 -       (\<lambda>p. realizes p P) \<cdot> p \<cdot> (\<lambda>q. realizes q Q) \<cdot> q \<bullet> h"
   1.100 +  conjI (P, Q): "Pair"
   1.101 +    "\<Lambda>P Q p (h: _) q. conjI_realizer \<cdot> P \<cdot> p \<cdot> Q \<cdot> q \<bullet> h"
   1.102  
   1.103 -  conjI (P): "\<lambda>P Q p. p"
   1.104 +  conjI (P): "\<lambda>p. p"
   1.105      "\<Lambda>P Q p. conjI \<cdot> _ \<cdot> _"
   1.106  
   1.107 -  conjI (Q): "\<lambda>P Q q. q"
   1.108 +  conjI (Q): "\<lambda>q. q"
   1.109      "\<Lambda>P Q (h: _) q. conjI \<cdot> _ \<cdot> _ \<bullet> h"
   1.110  
   1.111 -  conjI: "Null"
   1.112 -    "\<Lambda>P Q. conjI \<cdot> _ \<cdot> _"
   1.113 +  conjI: "Null" "conjI"
   1.114  
   1.115 -  conjunct1 (P, Q): "\<lambda>P Q. fst"
   1.116 +  conjunct1 (P, Q): "fst"
   1.117      "\<Lambda>P Q pq. conjunct1 \<cdot> _ \<cdot> _"
   1.118  
   1.119 -  conjunct1 (P): "\<lambda>P Q p. p"
   1.120 +  conjunct1 (P): "\<lambda>p. p"
   1.121      "\<Lambda>P Q p. conjunct1 \<cdot> _ \<cdot> _"
   1.122  
   1.123    conjunct1 (Q): "Null"
   1.124      "\<Lambda>P Q q. conjunct1 \<cdot> _ \<cdot> _"
   1.125  
   1.126 -  conjunct1: "Null"
   1.127 -    "\<Lambda>P Q. conjunct1 \<cdot> _ \<cdot> _"
   1.128 +  conjunct1: "Null" "conjunct1"
   1.129  
   1.130 -  conjunct2 (P, Q): "\<lambda>P Q. snd"
   1.131 +  conjunct2 (P, Q): "snd"
   1.132      "\<Lambda>P Q pq. conjunct2 \<cdot> _ \<cdot> _"
   1.133  
   1.134    conjunct2 (P): "Null"
   1.135      "\<Lambda>P Q p. conjunct2 \<cdot> _ \<cdot> _"
   1.136  
   1.137 -  conjunct2 (Q): "\<lambda>P Q p. p"
   1.138 +  conjunct2 (Q): "\<lambda>p. p"
   1.139      "\<Lambda>P Q p. conjunct2 \<cdot> _ \<cdot> _"
   1.140  
   1.141 -  conjunct2: "Null"
   1.142 -    "\<Lambda>P Q. conjunct2 \<cdot> _ \<cdot> _"
   1.143 +  conjunct2: "Null" "conjunct2"
   1.144 +
   1.145 +  disjI1 (P, Q): "Inl"
   1.146 +    "\<Lambda>P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_1 \<cdot> P \<cdot> _ \<cdot> p)"
   1.147  
   1.148 -  disjI1 (P, Q): "\<lambda>P Q. Inl"
   1.149 -    "\<Lambda>P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_1 \<cdot> (\<lambda>p. realizes p P) \<cdot> _ \<cdot> p)"
   1.150 +  disjI1 (P): "Some"
   1.151 +    "\<Lambda>P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> P \<cdot> p)"
   1.152  
   1.153 -  disjI1 (P): "\<lambda>P Q. Some"
   1.154 -    "\<Lambda>P Q p. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> (\<lambda>p. realizes p P) \<cdot> p)"
   1.155 -
   1.156 -  disjI1 (Q): "\<lambda>P Q. None"
   1.157 +  disjI1 (Q): "None"
   1.158      "\<Lambda>P Q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_1 \<cdot> _ \<cdot> _)"
   1.159  
   1.160 -  disjI1: "\<lambda>P Q. Left"
   1.161 +  disjI1: "Left"
   1.162      "\<Lambda>P Q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sumbool.cases_1 \<cdot> _ \<cdot> _)"
   1.163  
   1.164 -  disjI2 (P, Q): "\<lambda>Q P. Inr"
   1.165 -    "\<Lambda>Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_2 \<cdot> _ \<cdot> (\<lambda>q. realizes q Q) \<cdot> q)"
   1.166 +  disjI2 (P, Q): "Inr"
   1.167 +    "\<Lambda>Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sum.cases_2 \<cdot> _ \<cdot> Q \<cdot> q)"
   1.168  
   1.169 -  disjI2 (P): "\<lambda>Q P. None"
   1.170 +  disjI2 (P): "None"
   1.171      "\<Lambda>Q P. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_1 \<cdot> _ \<cdot> _)"
   1.172  
   1.173 -  disjI2 (Q): "\<lambda>Q P. Some"
   1.174 -    "\<Lambda>Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> (\<lambda>q. realizes q Q) \<cdot> q)"
   1.175 +  disjI2 (Q): "Some"
   1.176 +    "\<Lambda>Q P q. iffD2 \<cdot> _ \<cdot> _ \<bullet> (option.cases_2 \<cdot> _ \<cdot> Q \<cdot> q)"
   1.177  
   1.178 -  disjI2: "\<lambda>Q P. Right"
   1.179 +  disjI2: "Right"
   1.180      "\<Lambda>Q P. iffD2 \<cdot> _ \<cdot> _ \<bullet> (sumbool.cases_2 \<cdot> _ \<cdot> _)"
   1.181  
   1.182 -  disjE (P, Q, R): "\<lambda>P Q R pq pr qr.
   1.183 +  disjE (P, Q, R): "\<lambda>pq pr qr.
   1.184       (case pq of Inl p \<Rightarrow> pr p | Inr q \<Rightarrow> qr q)"
   1.185      "\<Lambda>P Q R pq (h1: _) pr (h2: _) qr.
   1.186 -       disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes r R) \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.187 +       disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.188  
   1.189 -  disjE (Q, R): "\<lambda>P Q R pq pr qr.
   1.190 +  disjE (Q, R): "\<lambda>pq pr qr.
   1.191       (case pq of None \<Rightarrow> pr | Some q \<Rightarrow> qr q)"
   1.192      "\<Lambda>P Q R pq (h1: _) pr (h2: _) qr.
   1.193 -       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes r R) \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.194 +       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.195  
   1.196 -  disjE (P, R): "\<lambda>P Q R pq pr qr.
   1.197 +  disjE (P, R): "\<lambda>pq pr qr.
   1.198       (case pq of None \<Rightarrow> qr | Some p \<Rightarrow> pr p)"
   1.199      "\<Lambda>P Q R pq (h1: _) pr (h2: _) qr (h3: _).
   1.200 -       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes r R) \<cdot> qr \<cdot> pr \<bullet> h1 \<bullet> h3 \<bullet> h2"
   1.201 +       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> qr \<cdot> pr \<bullet> h1 \<bullet> h3 \<bullet> h2"
   1.202  
   1.203 -  disjE (R): "\<lambda>P Q R pq pr qr.
   1.204 +  disjE (R): "\<lambda>pq pr qr.
   1.205       (case pq of Left \<Rightarrow> pr | Right \<Rightarrow> qr)"
   1.206      "\<Lambda>P Q R pq (h1: _) pr (h2: _) qr.
   1.207 -       disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes r R) \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.208 +       disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> R \<cdot> pr \<cdot> qr \<bullet> h1 \<bullet> h2"
   1.209  
   1.210    disjE (P, Q): "Null"
   1.211 -    "\<Lambda>P Q R pq. disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes Null R) \<cdot> _ \<cdot> _"
   1.212 +    "\<Lambda>P Q R pq. disjE_realizer \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _"
   1.213  
   1.214    disjE (Q): "Null"
   1.215 -    "\<Lambda>P Q R pq. disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes Null R) \<cdot> _ \<cdot> _"
   1.216 +    "\<Lambda>P Q R pq. disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _"
   1.217  
   1.218    disjE (P): "Null"
   1.219      "\<Lambda>P Q R pq (h1: _) (h2: _) (h3: _).
   1.220 -       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes Null R) \<cdot> _ \<cdot> _ \<bullet> h1 \<bullet> h3 \<bullet> h2"
   1.221 +       disjE_realizer2 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _ \<bullet> h1 \<bullet> h3 \<bullet> h2"
   1.222  
   1.223    disjE: "Null"
   1.224 -    "\<Lambda>P Q R pq. disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>r. realizes Null R) \<cdot> _ \<cdot> _"
   1.225 +    "\<Lambda>P Q R pq. disjE_realizer3 \<cdot> _ \<cdot> _ \<cdot> pq \<cdot> (\<lambda>x. R) \<cdot> _ \<cdot> _"
   1.226  
   1.227 -  FalseE (P): "\<lambda>P. arbitrary"
   1.228 +  FalseE (P): "arbitrary"
   1.229      "\<Lambda>P. FalseE \<cdot> _"
   1.230  
   1.231 -  FalseE: "Null"
   1.232 -    "\<Lambda>P. FalseE \<cdot> _"
   1.233 +  FalseE: "Null" "FalseE"
   1.234  
   1.235    notI (P): "Null"
   1.236      "\<Lambda>P (h: _). allI \<cdot> _ \<bullet> (\<Lambda>x. notI \<cdot> _ \<bullet> (h \<cdot> x))"
   1.237  
   1.238 -  notI: "Null"
   1.239 -    "\<Lambda>P. notI \<cdot> _"
   1.240 +  notI: "Null" "notI"
   1.241  
   1.242 -  notE (P, R): "\<lambda>P R p. arbitrary"
   1.243 +  notE (P, R): "\<lambda>p. arbitrary"
   1.244      "\<Lambda>P R (h: _) p. notE \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)"
   1.245  
   1.246    notE (P): "Null"
   1.247      "\<Lambda>P R (h: _) p. notE \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> h)"
   1.248  
   1.249 -  notE (R): "\<lambda>P R. arbitrary"
   1.250 -    "\<Lambda>P R. notE \<cdot> _ \<cdot> _"
   1.251 -
   1.252 -  notE: "Null"
   1.253 +  notE (R): "arbitrary"
   1.254      "\<Lambda>P R. notE \<cdot> _ \<cdot> _"
   1.255  
   1.256 -  subst (P): "\<lambda>s t P ps. ps"
   1.257 -    "\<Lambda>s t P (h: _) ps. subst \<cdot> s \<cdot> t \<cdot> (\<lambda>x. realizes ps (P x)) \<bullet> h"
   1.258 +  notE: "Null" "notE"
   1.259  
   1.260 -  subst: "Null"
   1.261 -    "\<Lambda>s t P. subst \<cdot> s \<cdot> t \<cdot> (\<lambda>x. realizes Null (P x))"
   1.262 +  subst (P): "\<lambda>s t ps. ps"
   1.263 +    "\<Lambda>s t P (h: _) ps. subst \<cdot> s \<cdot> t \<cdot> P ps \<bullet> h"
   1.264  
   1.265 -  iffD1 (P, Q): "\<lambda>Q P. fst"
   1.266 +  subst: "Null" "subst"
   1.267 +
   1.268 +  iffD1 (P, Q): "fst"
   1.269      "\<Lambda>Q P pq (h: _) p.
   1.270         mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> p \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h))"
   1.271  
   1.272 -  iffD1 (P): "\<lambda>Q P p. p"
   1.273 +  iffD1 (P): "\<lambda>p. p"
   1.274      "\<Lambda>Q P p (h: _). mp \<cdot> _ \<cdot> _ \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h)"
   1.275  
   1.276    iffD1 (Q): "Null"
   1.277      "\<Lambda>Q P q1 (h: _) q2.
   1.278         mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q2 \<bullet> (conjunct1 \<cdot> _ \<cdot> _ \<bullet> h))"
   1.279  
   1.280 -  iffD1: "Null"
   1.281 -    "\<Lambda>Q P. iffD1 \<cdot> _ \<cdot> _"
   1.282 +  iffD1: "Null" "iffD1"
   1.283  
   1.284 -  iffD2 (P, Q): "\<lambda>P Q. snd"
   1.285 +  iffD2 (P, Q): "snd"
   1.286      "\<Lambda>P Q pq (h: _) q.
   1.287         mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h))"
   1.288  
   1.289 -  iffD2 (P): "\<lambda>P Q p. p"
   1.290 +  iffD2 (P): "\<lambda>p. p"
   1.291      "\<Lambda>P Q p (h: _). mp \<cdot> _ \<cdot> _ \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h)"
   1.292  
   1.293    iffD2 (Q): "Null"
   1.294      "\<Lambda>P Q q1 (h: _) q2.
   1.295         mp \<cdot> _ \<cdot> _ \<bullet> (spec \<cdot> _ \<cdot> q2 \<bullet> (conjunct2 \<cdot> _ \<cdot> _ \<bullet> h))"
   1.296  
   1.297 -  iffD2: "Null"
   1.298 -    "\<Lambda>P Q. iffD2 \<cdot> _ \<cdot> _"
   1.299 +  iffD2: "Null" "iffD2"
   1.300  
   1.301 -  iffI (P, Q): "\<lambda>P Q pq qp. (pq, qp)"
   1.302 +  iffI (P, Q): "Pair"
   1.303      "\<Lambda>P Q pq (h1 : _) qp (h2 : _). conjI_realizer \<cdot>
   1.304 -       (\<lambda>pq. \<forall>x. realizes x P \<longrightarrow> realizes (pq x) Q) \<cdot> pq \<cdot>
   1.305 -       (\<lambda>qp. \<forall>x. realizes x Q \<longrightarrow> realizes (qp x) P) \<cdot> qp \<bullet>
   1.306 +       (\<lambda>pq. \<forall>x. P x \<longrightarrow> Q (pq x)) \<cdot> pq \<cdot>
   1.307 +       (\<lambda>qp. \<forall>x. Q x \<longrightarrow> P (qp x)) \<cdot> qp \<bullet>
   1.308         (allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h1 \<cdot> x))) \<bullet>
   1.309         (allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h2 \<cdot> x)))"
   1.310  
   1.311 -  iffI (P): "\<lambda>P Q p. p"
   1.312 +  iffI (P): "\<lambda>p. p"
   1.313      "\<Lambda>P Q (h1 : _) p (h2 : _). conjI \<cdot> _ \<cdot> _ \<bullet>
   1.314         (allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h1 \<cdot> x))) \<bullet>
   1.315         (impI \<cdot> _ \<cdot> _ \<bullet> h2)"
   1.316  
   1.317 -  iffI (Q): "\<lambda>P Q q. q"
   1.318 +  iffI (Q): "\<lambda>q. q"
   1.319      "\<Lambda>P Q q (h1 : _) (h2 : _). conjI \<cdot> _ \<cdot> _ \<bullet>
   1.320         (impI \<cdot> _ \<cdot> _ \<bullet> h1) \<bullet>
   1.321         (allI \<cdot> _ \<bullet> (\<Lambda>x. impI \<cdot> _ \<cdot> _ \<bullet> (h2 \<cdot> x)))"
   1.322  
   1.323 -  iffI: "Null"
   1.324 -    "\<Lambda>P Q. iffI \<cdot> _ \<cdot> _"
   1.325 +  iffI: "Null" "iffI"
   1.326  
   1.327 +(*
   1.328    classical: "Null"
   1.329      "\<Lambda>P. classical \<cdot> _"
   1.330 +*)
   1.331  
   1.332  end