Update files generated in HOL/Import/HOLLight
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Wed Jul 13 00:29:33 2011 +0900 (2011-07-13)
changeset 43786fea3ed6951e3
parent 43785 2bd54d4b5f3d
child 43787 5be84619e4d4
Update files generated in HOL/Import/HOLLight
src/HOL/Import/HOLLight/HOLLight.thy
src/HOL/Import/HOLLight/hollight.imp
     1.1 --- a/src/HOL/Import/HOLLight/HOLLight.thy	Wed Jul 13 00:23:24 2011 +0900
     1.2 +++ b/src/HOL/Import/HOLLight/HOLLight.thy	Wed Jul 13 00:29:33 2011 +0900
     1.3 @@ -1,6 +1,6 @@
     1.4  (* AUTOMATICALLY GENERATED, DO NOT EDIT! *)
     1.5  
     1.6 -theory HOLLight = "../HOLLightCompat" + "../HOL4Syntax":
     1.7 +theory HOLLight imports "../HOLLightCompat" "../HOL4Syntax" begin 
     1.8  
     1.9  ;setup_theory hollight
    1.10  
    1.11 @@ -13,235 +13,290 @@
    1.12  lemma DEF__FALSITY_: "_FALSITY_ = False"
    1.13    by (import hollight DEF__FALSITY_)
    1.14  
    1.15 -lemma CONJ_ACI: "((p::bool) & (q::bool)) = (q & p) &
    1.16 -((p & q) & (r::bool)) = (p & q & r) &
    1.17 +lemma CONJ_ACI: "(p & q) = (q & p) &
    1.18 +((p & q) & r) = (p & q & r) &
    1.19  (p & q & r) = (q & p & r) & (p & p) = p & (p & p & q) = (p & q)"
    1.20    by (import hollight CONJ_ACI)
    1.21  
    1.22 -lemma DISJ_ACI: "((p::bool) | (q::bool)) = (q | p) &
    1.23 -((p | q) | (r::bool)) = (p | q | r) &
    1.24 +lemma DISJ_ACI: "(p | q) = (q | p) &
    1.25 +((p | q) | r) = (p | q | r) &
    1.26  (p | q | r) = (q | p | r) & (p | p) = p & (p | p | q) = (p | q)"
    1.27    by (import hollight DISJ_ACI)
    1.28  
    1.29 -lemma EQ_CLAUSES: "ALL t::bool.
    1.30 -   (True = t) = t &
    1.31 -   (t = True) = t & (False = t) = (~ t) & (t = False) = (~ t)"
    1.32 +lemma IMP_CONJ_ALT: "(p & q --> r) = (q --> p --> r)"
    1.33 +  by (import hollight IMP_CONJ_ALT)
    1.34 +
    1.35 +lemma EQ_CLAUSES: "(True = t) = t & (t = True) = t & (False = t) = (~ t) & (t = False) = (~ t)"
    1.36    by (import hollight EQ_CLAUSES)
    1.37  
    1.38  lemma NOT_CLAUSES_WEAK: "(~ True) = False & (~ False) = True"
    1.39    by (import hollight NOT_CLAUSES_WEAK)
    1.40  
    1.41 -lemma AND_CLAUSES: "ALL t::bool.
    1.42 -   (True & t) = t &
    1.43 -   (t & True) = t & (False & t) = False & (t & False) = False & (t & t) = t"
    1.44 +lemma AND_CLAUSES: "(True & t) = t &
    1.45 +(t & True) = t & (False & t) = False & (t & False) = False & (t & t) = t"
    1.46    by (import hollight AND_CLAUSES)
    1.47  
    1.48 -lemma OR_CLAUSES: "ALL t::bool.
    1.49 -   (True | t) = True &
    1.50 -   (t | True) = True & (False | t) = t & (t | False) = t & (t | t) = t"
    1.51 +lemma OR_CLAUSES: "(True | t) = True &
    1.52 +(t | True) = True & (False | t) = t & (t | False) = t & (t | t) = t"
    1.53    by (import hollight OR_CLAUSES)
    1.54  
    1.55 -lemma IMP_CLAUSES: "ALL t::bool.
    1.56 -   (True --> t) = t &
    1.57 -   (t --> True) = True &
    1.58 -   (False --> t) = True & (t --> t) = True & (t --> False) = (~ t)"
    1.59 +lemma IMP_CLAUSES: "(True --> t) = t &
    1.60 +(t --> True) = True &
    1.61 +(False --> t) = True & (t --> t) = True & (t --> False) = (~ t)"
    1.62    by (import hollight IMP_CLAUSES)
    1.63  
    1.64 -lemma IMP_EQ_CLAUSE: "((x::'q_864::type) = x --> (p::bool)) = p"
    1.65 +lemma IMP_EQ_CLAUSE: "((x::'q_851) = x --> (p::bool)) = p"
    1.66    by (import hollight IMP_EQ_CLAUSE)
    1.67  
    1.68 -lemma SWAP_FORALL_THM: "ALL P::'A::type => 'B::type => bool.
    1.69 -   (ALL x::'A::type. All (P x)) = (ALL (y::'B::type) x::'A::type. P x y)"
    1.70 -  by (import hollight SWAP_FORALL_THM)
    1.71 -
    1.72 -lemma SWAP_EXISTS_THM: "ALL P::'A::type => 'B::type => bool.
    1.73 -   (EX x::'A::type. Ex (P x)) = (EX (x::'B::type) xa::'A::type. P xa x)"
    1.74 -  by (import hollight SWAP_EXISTS_THM)
    1.75 -
    1.76 -lemma TRIV_EXISTS_AND_THM: "ALL (P::bool) Q::bool.
    1.77 -   (EX x::'A::type. P & Q) = ((EX x::'A::type. P) & (EX x::'A::type. Q))"
    1.78 +lemma TRIV_EXISTS_AND_THM: "(EX x::'A. (P::bool) & (Q::bool)) = ((EX x::'A. P) & (EX x::'A. Q))"
    1.79    by (import hollight TRIV_EXISTS_AND_THM)
    1.80  
    1.81 -lemma TRIV_AND_EXISTS_THM: "ALL (P::bool) Q::bool.
    1.82 -   ((EX x::'A::type. P) & (EX x::'A::type. Q)) = (EX x::'A::type. P & Q)"
    1.83 +lemma TRIV_AND_EXISTS_THM: "((EX x::'A. (P::bool)) & (EX x::'A. (Q::bool))) = (EX x::'A. P & Q)"
    1.84    by (import hollight TRIV_AND_EXISTS_THM)
    1.85  
    1.86 -lemma TRIV_FORALL_OR_THM: "ALL (P::bool) Q::bool.
    1.87 -   (ALL x::'A::type. P | Q) = ((ALL x::'A::type. P) | (ALL x::'A::type. Q))"
    1.88 +lemma TRIV_FORALL_OR_THM: "(ALL x::'A. (P::bool) | (Q::bool)) = ((ALL x::'A. P) | (ALL x::'A. Q))"
    1.89    by (import hollight TRIV_FORALL_OR_THM)
    1.90  
    1.91 -lemma TRIV_OR_FORALL_THM: "ALL (P::bool) Q::bool.
    1.92 -   ((ALL x::'A::type. P) | (ALL x::'A::type. Q)) = (ALL x::'A::type. P | Q)"
    1.93 +lemma TRIV_OR_FORALL_THM: "((ALL x::'A. (P::bool)) | (ALL x::'A. (Q::bool))) = (ALL x::'A. P | Q)"
    1.94    by (import hollight TRIV_OR_FORALL_THM)
    1.95  
    1.96 -lemma TRIV_FORALL_IMP_THM: "ALL (P::bool) Q::bool.
    1.97 -   (ALL x::'A::type. P --> Q) =
    1.98 -   ((EX x::'A::type. P) --> (ALL x::'A::type. Q))"
    1.99 +lemma TRIV_FORALL_IMP_THM: "(ALL x::'A. (P::bool) --> (Q::bool)) = ((EX x::'A. P) --> (ALL x::'A. Q))"
   1.100    by (import hollight TRIV_FORALL_IMP_THM)
   1.101  
   1.102 -lemma TRIV_EXISTS_IMP_THM: "ALL (P::bool) Q::bool.
   1.103 -   (EX x::'A::type. P --> Q) =
   1.104 -   ((ALL x::'A::type. P) --> (EX x::'A::type. Q))"
   1.105 +lemma TRIV_EXISTS_IMP_THM: "(EX x::'A. (P::bool) --> (Q::bool)) = ((ALL x::'A. P) --> (EX x::'A. Q))"
   1.106    by (import hollight TRIV_EXISTS_IMP_THM)
   1.107  
   1.108 -lemma EXISTS_UNIQUE_ALT: "ALL P::'A::type => bool.
   1.109 -   Ex1 P = (EX x::'A::type. ALL y::'A::type. P y = (x = y))"
   1.110 +lemma EXISTS_UNIQUE_ALT: "Ex1 (P::'A => bool) = (EX x::'A. ALL y::'A. P y = (x = y))"
   1.111    by (import hollight EXISTS_UNIQUE_ALT)
   1.112  
   1.113 -lemma SELECT_UNIQUE: "ALL (P::'A::type => bool) x::'A::type.
   1.114 -   (ALL y::'A::type. P y = (y = x)) --> Eps P = x"
   1.115 +lemma SELECT_UNIQUE: "(!!y::'A. (P::'A => bool) y = (y = (x::'A))) ==> Eps P = x"
   1.116    by (import hollight SELECT_UNIQUE)
   1.117  
   1.118 -lemma EXCLUDED_MIDDLE: "ALL t::bool. t | ~ t"
   1.119 +lemma EXCLUDED_MIDDLE: "t | ~ t"
   1.120    by (import hollight EXCLUDED_MIDDLE)
   1.121  
   1.122 -definition COND :: "bool => 'A => 'A => 'A" where 
   1.123 -  "COND ==
   1.124 -%(t::bool) (t1::'A::type) t2::'A::type.
   1.125 -   SOME x::'A::type. (t = True --> x = t1) & (t = False --> x = t2)"
   1.126 -
   1.127 -lemma DEF_COND: "COND =
   1.128 -(%(t::bool) (t1::'A::type) t2::'A::type.
   1.129 -    SOME x::'A::type. (t = True --> x = t1) & (t = False --> x = t2))"
   1.130 -  by (import hollight DEF_COND)
   1.131 -
   1.132 -lemma COND_CLAUSES: "ALL (x::'A::type) xa::'A::type. COND True x xa = x & COND False x xa = xa"
   1.133 +lemma COND_CLAUSES: "(if True then x::'A else (xa::'A)) = x & (if False then x else xa) = xa"
   1.134    by (import hollight COND_CLAUSES)
   1.135  
   1.136 -lemma COND_EXPAND: "ALL (b::bool) (t1::bool) t2::bool. COND b t1 t2 = ((~ b | t1) & (b | t2))"
   1.137 +lemma COND_EXPAND: "(if b then t1 else t2) = ((~ b | t1) & (b | t2))"
   1.138    by (import hollight COND_EXPAND)
   1.139  
   1.140 -lemma COND_ID: "ALL (b::bool) t::'A::type. COND b t t = t"
   1.141 -  by (import hollight COND_ID)
   1.142 -
   1.143 -lemma COND_RAND: "ALL (b::bool) (f::'A::type => 'B::type) (x::'A::type) y::'A::type.
   1.144 -   f (COND b x y) = COND b (f x) (f y)"
   1.145 -  by (import hollight COND_RAND)
   1.146 -
   1.147 -lemma COND_RATOR: "ALL (b::bool) (f::'A::type => 'B::type) (g::'A::type => 'B::type)
   1.148 -   x::'A::type. COND b f g x = COND b (f x) (g x)"
   1.149 +lemma COND_RATOR: "(if b::bool then f::'A => 'B else (g::'A => 'B)) (x::'A) =
   1.150 +(if b then f x else g x)"
   1.151    by (import hollight COND_RATOR)
   1.152  
   1.153 -lemma COND_ABS: "ALL (b::bool) (f::'A::type => 'B::type) g::'A::type => 'B::type.
   1.154 -   (%x::'A::type. COND b (f x) (g x)) = COND b f g"
   1.155 +lemma COND_ABS: "(%x::'A. if b::bool then (f::'A => 'B) x else (g::'A => 'B) x) =
   1.156 +(if b then f else g)"
   1.157    by (import hollight COND_ABS)
   1.158  
   1.159 -lemma MONO_COND: "((A::bool) --> (B::bool)) & ((C::bool) --> (D::bool)) -->
   1.160 -COND (b::bool) A C --> COND b B D"
   1.161 +lemma MONO_COND: "[| (A --> B) & (C --> D); if b then A else C |] ==> if b then B else D"
   1.162    by (import hollight MONO_COND)
   1.163  
   1.164 -lemma COND_ELIM_THM: "(P::'A::type => bool) (COND (c::bool) (x::'A::type) (y::'A::type)) =
   1.165 -((c --> P x) & (~ c --> P y))"
   1.166 -  by (import hollight COND_ELIM_THM)
   1.167 -
   1.168 -lemma SKOLEM_THM: "ALL P::'A::type => 'B::type => bool.
   1.169 -   (ALL x::'A::type. Ex (P x)) =
   1.170 -   (EX x::'A::type => 'B::type. ALL xa::'A::type. P xa (x xa))"
   1.171 +lemma SKOLEM_THM: "(ALL x::'A. Ex ((P::'A => 'B => bool) x)) =
   1.172 +(EX x::'A => 'B. ALL xa::'A. P xa (x xa))"
   1.173    by (import hollight SKOLEM_THM)
   1.174  
   1.175 -lemma UNIQUE_SKOLEM_ALT: "ALL P::'A::type => 'B::type => bool.
   1.176 -   (ALL x::'A::type. Ex1 (P x)) =
   1.177 -   (EX f::'A::type => 'B::type.
   1.178 -       ALL (x::'A::type) y::'B::type. P x y = (f x = y))"
   1.179 +lemma UNIQUE_SKOLEM_ALT: "(ALL x::'A. Ex1 ((P::'A => 'B => bool) x)) =
   1.180 +(EX f::'A => 'B. ALL (x::'A) y::'B. P x y = (f x = y))"
   1.181    by (import hollight UNIQUE_SKOLEM_ALT)
   1.182  
   1.183 -lemma COND_EQ_CLAUSE: "COND ((x::'q_3000::type) = x) (y::'q_2993::type) (z::'q_2993::type) = y"
   1.184 +lemma COND_EQ_CLAUSE: "(if (x::'q_2963) = x then y::'q_2956 else (z::'q_2956)) = y"
   1.185    by (import hollight COND_EQ_CLAUSE)
   1.186  
   1.187 -lemma o_ASSOC: "ALL (f::'C::type => 'D::type) (g::'B::type => 'C::type)
   1.188 -   h::'A::type => 'B::type. f o (g o h) = f o g o h"
   1.189 +lemma bool_RECURSION: "EX x::bool => 'A. x False = (a::'A) & x True = (b::'A)"
   1.190 +  by (import hollight bool_RECURSION)
   1.191 +
   1.192 +lemma o_ASSOC: "(f::'C => 'D) o ((g::'B => 'C) o (h::'A => 'B)) = f o g o h"
   1.193    by (import hollight o_ASSOC)
   1.194  
   1.195 -lemma I_O_ID: "ALL f::'A::type => 'B::type. id o f = f & f o id = f"
   1.196 +lemma I_O_ID: "id o (f::'A => 'B) = f & f o id = f"
   1.197    by (import hollight I_O_ID)
   1.198  
   1.199 -lemma EXISTS_ONE_REP: "EX x::bool. x"
   1.200 +lemma EXISTS_ONE_REP: "EX x. x"
   1.201    by (import hollight EXISTS_ONE_REP)
   1.202  
   1.203 -lemma one_axiom: "ALL f::'A::type => unit. All (op = f)"
   1.204 +lemma one_axiom: "(f::'A => unit) = (x::'A => unit)"
   1.205    by (import hollight one_axiom)
   1.206  
   1.207 -lemma one_RECURSION: "ALL e::'A::type. EX x::unit => 'A::type. x () = e"
   1.208 +lemma one_RECURSION: "EX x::unit => 'A. x () = (e::'A)"
   1.209    by (import hollight one_RECURSION)
   1.210  
   1.211 -lemma one_Axiom: "ALL e::'A::type. EX! fn::unit => 'A::type. fn () = e"
   1.212 +lemma one_Axiom: "EX! fn::unit => 'A. fn () = (e::'A)"
   1.213    by (import hollight one_Axiom)
   1.214  
   1.215 -lemma th_cond: "(P::'A::type => bool => bool) (COND (b::bool) (x::'A::type) (y::'A::type))
   1.216 - b =
   1.217 -(b & P x True | ~ b & P y False)"
   1.218 +lemma th_cond: "(b = False --> x = x0) & (b = True --> x = x1) ==> x = (b & x1 | ~ b & x0)"
   1.219    by (import hollight th_cond)
   1.220  
   1.221 -definition LET_END :: "'A => 'A" where 
   1.222 -  "LET_END == %t::'A::type. t"
   1.223 -
   1.224 -lemma DEF_LET_END: "LET_END = (%t::'A::type. t)"
   1.225 +definition
   1.226 +  LET_END :: "'A => 'A"  where
   1.227 +  "LET_END == %t::'A. t"
   1.228 +
   1.229 +lemma DEF_LET_END: "LET_END = (%t::'A. t)"
   1.230    by (import hollight DEF_LET_END)
   1.231  
   1.232 -definition GABS :: "('A => bool) => 'A" where 
   1.233 -  "(op ==::(('A::type => bool) => 'A::type)
   1.234 -        => (('A::type => bool) => 'A::type) => prop)
   1.235 - (GABS::('A::type => bool) => 'A::type)
   1.236 - (Eps::('A::type => bool) => 'A::type)"
   1.237 -
   1.238 -lemma DEF_GABS: "(op =::(('A::type => bool) => 'A::type)
   1.239 -       => (('A::type => bool) => 'A::type) => bool)
   1.240 - (GABS::('A::type => bool) => 'A::type)
   1.241 - (Eps::('A::type => bool) => 'A::type)"
   1.242 -  by (import hollight DEF_GABS)
   1.243 -
   1.244 -definition GEQ :: "'A => 'A => bool" where 
   1.245 -  "(op ==::('A::type => 'A::type => bool)
   1.246 -        => ('A::type => 'A::type => bool) => prop)
   1.247 - (GEQ::'A::type => 'A::type => bool) (op =::'A::type => 'A::type => bool)"
   1.248 -
   1.249 -lemma DEF_GEQ: "(op =::('A::type => 'A::type => bool)
   1.250 -       => ('A::type => 'A::type => bool) => bool)
   1.251 - (GEQ::'A::type => 'A::type => bool) (op =::'A::type => 'A::type => bool)"
   1.252 -  by (import hollight DEF_GEQ)
   1.253 -
   1.254 -lemma PAIR_EXISTS_THM: "EX (x::'A::type => 'B::type => bool) (a::'A::type) b::'B::type.
   1.255 -   x = Pair_Rep a b"
   1.256 +consts
   1.257 +  "_SEQPATTERN" :: "('q_4007 => 'q_4004 => bool)
   1.258 +=> ('q_4007 => 'q_4004 => bool) => 'q_4007 => 'q_4004 => bool" ("'_SEQPATTERN")
   1.259 +
   1.260 +defs
   1.261 +  "_SEQPATTERN_def": "_SEQPATTERN ==
   1.262 +%(r::'q_4007 => 'q_4004 => bool) (s::'q_4007 => 'q_4004 => bool) x::'q_4007.
   1.263 +   if Ex (r x) then r x else s x"
   1.264 +
   1.265 +lemma DEF__SEQPATTERN: "_SEQPATTERN =
   1.266 +(%(r::'q_4007 => 'q_4004 => bool) (s::'q_4007 => 'q_4004 => bool)
   1.267 +    x::'q_4007. if Ex (r x) then r x else s x)"
   1.268 +  by (import hollight DEF__SEQPATTERN)
   1.269 +
   1.270 +consts
   1.271 +  "_UNGUARDED_PATTERN" :: "bool => bool => bool" ("'_UNGUARDED'_PATTERN")
   1.272 +
   1.273 +defs
   1.274 +  "_UNGUARDED_PATTERN_def": "_UNGUARDED_PATTERN == op &"
   1.275 +
   1.276 +lemma DEF__UNGUARDED_PATTERN: "_UNGUARDED_PATTERN = op &"
   1.277 +  by (import hollight DEF__UNGUARDED_PATTERN)
   1.278 +
   1.279 +consts
   1.280 +  "_GUARDED_PATTERN" :: "bool => bool => bool => bool" ("'_GUARDED'_PATTERN")
   1.281 +
   1.282 +defs
   1.283 +  "_GUARDED_PATTERN_def": "_GUARDED_PATTERN == %p g r. p & g & r"
   1.284 +
   1.285 +lemma DEF__GUARDED_PATTERN: "_GUARDED_PATTERN = (%p g r. p & g & r)"
   1.286 +  by (import hollight DEF__GUARDED_PATTERN)
   1.287 +
   1.288 +consts
   1.289 +  "_MATCH" :: "'q_4049 => ('q_4049 => 'q_4053 => bool) => 'q_4053" ("'_MATCH")
   1.290 +
   1.291 +defs
   1.292 +  "_MATCH_def": "_MATCH ==
   1.293 +%(e::'q_4049) r::'q_4049 => 'q_4053 => bool.
   1.294 +   if Ex1 (r e) then Eps (r e) else SOME z::'q_4053. False"
   1.295 +
   1.296 +lemma DEF__MATCH: "_MATCH =
   1.297 +(%(e::'q_4049) r::'q_4049 => 'q_4053 => bool.
   1.298 +    if Ex1 (r e) then Eps (r e) else SOME z::'q_4053. False)"
   1.299 +  by (import hollight DEF__MATCH)
   1.300 +
   1.301 +consts
   1.302 +  "_FUNCTION" :: "('q_4071 => 'q_4075 => bool) => 'q_4071 => 'q_4075" ("'_FUNCTION")
   1.303 +
   1.304 +defs
   1.305 +  "_FUNCTION_def": "_FUNCTION ==
   1.306 +%(r::'q_4071 => 'q_4075 => bool) x::'q_4071.
   1.307 +   if Ex1 (r x) then Eps (r x) else SOME z::'q_4075. False"
   1.308 +
   1.309 +lemma DEF__FUNCTION: "_FUNCTION =
   1.310 +(%(r::'q_4071 => 'q_4075 => bool) x::'q_4071.
   1.311 +    if Ex1 (r x) then Eps (r x) else SOME z::'q_4075. False)"
   1.312 +  by (import hollight DEF__FUNCTION)
   1.313 +
   1.314 +lemma PAIR_EXISTS_THM: "EX (x::'A => 'B => bool) (a::'A) b::'B. x = Pair_Rep a b"
   1.315    by (import hollight PAIR_EXISTS_THM)
   1.316  
   1.317 -definition CURRY :: "('A * 'B => 'C) => 'A => 'B => 'C" where 
   1.318 -  "CURRY ==
   1.319 -%(u::'A::type * 'B::type => 'C::type) (ua::'A::type) ub::'B::type.
   1.320 -   u (ua, ub)"
   1.321 -
   1.322 -lemma DEF_CURRY: "CURRY =
   1.323 -(%(u::'A::type * 'B::type => 'C::type) (ua::'A::type) ub::'B::type.
   1.324 -    u (ua, ub))"
   1.325 -  by (import hollight DEF_CURRY)
   1.326 -
   1.327 -definition UNCURRY :: "('A => 'B => 'C) => 'A * 'B => 'C" where 
   1.328 -  "UNCURRY ==
   1.329 -%(u::'A::type => 'B::type => 'C::type) ua::'A::type * 'B::type.
   1.330 -   u (fst ua) (snd ua)"
   1.331 -
   1.332 -lemma DEF_UNCURRY: "UNCURRY =
   1.333 -(%(u::'A::type => 'B::type => 'C::type) ua::'A::type * 'B::type.
   1.334 -    u (fst ua) (snd ua))"
   1.335 +lemma pair_RECURSION: "EX x::'A * 'B => 'C.
   1.336 +   ALL (a0::'A) a1::'B. x (a0, a1) = (PAIR'::'A => 'B => 'C) a0 a1"
   1.337 +  by (import hollight pair_RECURSION)
   1.338 +
   1.339 +definition
   1.340 +  UNCURRY :: "('A => 'B => 'C) => 'A * 'B => 'C"  where
   1.341 +  "UNCURRY == %(u::'A => 'B => 'C) ua::'A * 'B. u (fst ua) (snd ua)"
   1.342 +
   1.343 +lemma DEF_UNCURRY: "UNCURRY = (%(u::'A => 'B => 'C) ua::'A * 'B. u (fst ua) (snd ua))"
   1.344    by (import hollight DEF_UNCURRY)
   1.345  
   1.346 -definition PASSOC :: "(('A * 'B) * 'C => 'D) => 'A * 'B * 'C => 'D" where 
   1.347 +definition
   1.348 +  PASSOC :: "(('A * 'B) * 'C => 'D) => 'A * 'B * 'C => 'D"  where
   1.349    "PASSOC ==
   1.350 -%(u::('A::type * 'B::type) * 'C::type => 'D::type)
   1.351 -   ua::'A::type * 'B::type * 'C::type.
   1.352 +%(u::('A * 'B) * 'C => 'D) ua::'A * 'B * 'C.
   1.353     u ((fst ua, fst (snd ua)), snd (snd ua))"
   1.354  
   1.355  lemma DEF_PASSOC: "PASSOC =
   1.356 -(%(u::('A::type * 'B::type) * 'C::type => 'D::type)
   1.357 -    ua::'A::type * 'B::type * 'C::type.
   1.358 +(%(u::('A * 'B) * 'C => 'D) ua::'A * 'B * 'C.
   1.359      u ((fst ua, fst (snd ua)), snd (snd ua)))"
   1.360    by (import hollight DEF_PASSOC)
   1.361  
   1.362 -lemma num_Axiom: "ALL (e::'A::type) f::'A::type => nat => 'A::type.
   1.363 -   EX! fn::nat => 'A::type. fn 0 = e & (ALL n::nat. fn (Suc n) = f (fn n) n)"
   1.364 -  by (import hollight num_Axiom)
   1.365 -
   1.366 -lemma ADD_CLAUSES: "(ALL x::nat. 0 + x = x) &
   1.367 -(ALL x::nat. x + 0 = x) &
   1.368 +lemma LAMBDA_PAIR_THM: "(x::'q_4547 * 'q_4546 => 'q_4539) =
   1.369 +(SOME f::'q_4547 * 'q_4546 => 'q_4539.
   1.370 +    ALL (xa::'q_4547) y::'q_4546. f (xa, y) = x (xa, y))"
   1.371 +  by (import hollight LAMBDA_PAIR_THM)
   1.372 +
   1.373 +lemma FORALL_PAIRED_THM: "All (SOME f::'q_4576 * 'q_4575 => bool.
   1.374 +        ALL (x::'q_4576) y::'q_4575.
   1.375 +           f (x, y) = (P::'q_4576 => 'q_4575 => bool) x y) =
   1.376 +(ALL x::'q_4576. All (P x))"
   1.377 +  by (import hollight FORALL_PAIRED_THM)
   1.378 +
   1.379 +lemma EXISTS_PAIRED_THM: "Ex (SOME f::'q_4612 * 'q_4611 => bool.
   1.380 +       ALL (x::'q_4612) y::'q_4611.
   1.381 +          f (x, y) = (P::'q_4612 => 'q_4611 => bool) x y) =
   1.382 +(EX x::'q_4612. Ex (P x))"
   1.383 +  by (import hollight EXISTS_PAIRED_THM)
   1.384 +
   1.385 +lemma FORALL_TRIPLED_THM: "All (SOME f::'q_4649 * 'q_4648 * 'q_4647 => bool.
   1.386 +        ALL (x::'q_4649) (y::'q_4648) z::'q_4647.
   1.387 +           f (x, y, z) = (P::'q_4649 => 'q_4648 => 'q_4647 => bool) x y z) =
   1.388 +(ALL (x::'q_4649) y::'q_4648. All (P x y))"
   1.389 +  by (import hollight FORALL_TRIPLED_THM)
   1.390 +
   1.391 +lemma EXISTS_TRIPLED_THM: "Ex (SOME f::'q_4695 * 'q_4694 * 'q_4693 => bool.
   1.392 +       ALL (x::'q_4695) (y::'q_4694) z::'q_4693.
   1.393 +          f (x, y, z) = (P::'q_4695 => 'q_4694 => 'q_4693 => bool) x y z) =
   1.394 +(EX (x::'q_4695) y::'q_4694. Ex (P x y))"
   1.395 +  by (import hollight EXISTS_TRIPLED_THM)
   1.396 +
   1.397 +lemma IND_SUC_0_EXISTS: "EX (x::ind => ind) z::ind.
   1.398 +   (ALL (x1::ind) x2::ind. (x x1 = x x2) = (x1 = x2)) &
   1.399 +   (ALL xa::ind. x xa ~= z)"
   1.400 +  by (import hollight IND_SUC_0_EXISTS)
   1.401 +
   1.402 +definition
   1.403 +  IND_SUC :: "ind => ind"  where
   1.404 +  "IND_SUC ==
   1.405 +SOME f. EX z. (ALL x1 x2. (f x1 = f x2) = (x1 = x2)) & (ALL x. f x ~= z)"
   1.406 +
   1.407 +lemma DEF_IND_SUC: "IND_SUC =
   1.408 +(SOME f. EX z. (ALL x1 x2. (f x1 = f x2) = (x1 = x2)) & (ALL x. f x ~= z))"
   1.409 +  by (import hollight DEF_IND_SUC)
   1.410 +
   1.411 +definition
   1.412 +  IND_0 :: "ind"  where
   1.413 +  "IND_0 ==
   1.414 +SOME z.
   1.415 +   (ALL x1 x2. (IND_SUC x1 = IND_SUC x2) = (x1 = x2)) &
   1.416 +   (ALL x. IND_SUC x ~= z)"
   1.417 +
   1.418 +lemma DEF_IND_0: "IND_0 =
   1.419 +(SOME z.
   1.420 +    (ALL x1 x2. (IND_SUC x1 = IND_SUC x2) = (x1 = x2)) &
   1.421 +    (ALL x. IND_SUC x ~= z))"
   1.422 +  by (import hollight DEF_IND_0)
   1.423 +
   1.424 +definition
   1.425 +  NUM_REP :: "ind => bool"  where
   1.426 +  "NUM_REP ==
   1.427 +%a. ALL NUM_REP'.
   1.428 +       (ALL a.
   1.429 +           a = IND_0 | (EX i. a = IND_SUC i & NUM_REP' i) -->
   1.430 +           NUM_REP' a) -->
   1.431 +       NUM_REP' a"
   1.432 +
   1.433 +lemma DEF_NUM_REP: "NUM_REP =
   1.434 +(%a. ALL NUM_REP'.
   1.435 +        (ALL a.
   1.436 +            a = IND_0 | (EX i. a = IND_SUC i & NUM_REP' i) -->
   1.437 +            NUM_REP' a) -->
   1.438 +        NUM_REP' a)"
   1.439 +  by (import hollight DEF_NUM_REP)
   1.440 +
   1.441 +lemma num_RECURSION_STD: "EX fn::nat => 'Z.
   1.442 +   fn (0::nat) = (e::'Z) &
   1.443 +   (ALL n::nat. fn (Suc n) = (f::nat => 'Z => 'Z) n (fn n))"
   1.444 +  by (import hollight num_RECURSION_STD)
   1.445 +
   1.446 +lemma ADD_CLAUSES: "(ALL x::nat. (0::nat) + x = x) &
   1.447 +(ALL x::nat. x + (0::nat) = x) &
   1.448  (ALL (x::nat) xa::nat. Suc x + xa = Suc (x + xa)) &
   1.449  (ALL (x::nat) xa::nat. x + Suc xa = Suc (x + xa))"
   1.450    by (import hollight ADD_CLAUSES)
   1.451 @@ -250,25 +305,25 @@
   1.452  m + n + (p::nat) = m + (n + p) & m + (n + p) = n + (m + p)"
   1.453    by (import hollight ADD_AC)
   1.454  
   1.455 -lemma EQ_ADD_LCANCEL_0: "ALL (m::nat) n::nat. (m + n = m) = (n = 0)"
   1.456 +lemma EQ_ADD_LCANCEL_0: "((m::nat) + (n::nat) = m) = (n = (0::nat))"
   1.457    by (import hollight EQ_ADD_LCANCEL_0)
   1.458  
   1.459 -lemma EQ_ADD_RCANCEL_0: "ALL (x::nat) xa::nat. (x + xa = xa) = (x = 0)"
   1.460 +lemma EQ_ADD_RCANCEL_0: "((x::nat) + (xa::nat) = xa) = (x = (0::nat))"
   1.461    by (import hollight EQ_ADD_RCANCEL_0)
   1.462  
   1.463 -lemma ONE: "NUMERAL_BIT1 0 = Suc 0"
   1.464 -  by (import hollight ONE)
   1.465 -
   1.466 -lemma TWO: "NUMERAL_BIT0 (NUMERAL_BIT1 0) = Suc (NUMERAL_BIT1 0)"
   1.467 +lemma BIT1: "2 * x + 1 = Suc (x + x)"
   1.468 +  by (import hollight BIT1)
   1.469 +
   1.470 +lemma BIT1_THM: "2 * x + 1 = Suc (x + x)"
   1.471 +  by (import hollight BIT1_THM)
   1.472 +
   1.473 +lemma TWO: "2 = Suc 1"
   1.474    by (import hollight TWO)
   1.475  
   1.476 -lemma ADD1: "ALL x::nat. Suc x = x + NUMERAL_BIT1 0"
   1.477 -  by (import hollight ADD1)
   1.478 -
   1.479 -lemma MULT_CLAUSES: "(ALL x::nat. 0 * x = 0) &
   1.480 -(ALL x::nat. x * 0 = 0) &
   1.481 -(ALL x::nat. NUMERAL_BIT1 0 * x = x) &
   1.482 -(ALL x::nat. x * NUMERAL_BIT1 0 = x) &
   1.483 +lemma MULT_CLAUSES: "(ALL x::nat. (0::nat) * x = (0::nat)) &
   1.484 +(ALL x::nat. x * (0::nat) = (0::nat)) &
   1.485 +(ALL x::nat. (1::nat) * x = x) &
   1.486 +(ALL x::nat. x * (1::nat) = x) &
   1.487  (ALL (x::nat) xa::nat. Suc x * xa = x * xa + xa) &
   1.488  (ALL (x::nat) xa::nat. x * Suc xa = x + x * xa)"
   1.489    by (import hollight MULT_CLAUSES)
   1.490 @@ -277,1496 +332,831 @@
   1.491  m * n * (p::nat) = m * (n * p) & m * (n * p) = n * (m * p)"
   1.492    by (import hollight MULT_AC)
   1.493  
   1.494 -lemma MULT_2: "ALL n::nat. NUMERAL_BIT0 (NUMERAL_BIT1 0) * n = n + n"
   1.495 -  by (import hollight MULT_2)
   1.496 -
   1.497 -lemma MULT_EQ_1: "ALL (m::nat) n::nat.
   1.498 -   (m * n = NUMERAL_BIT1 0) = (m = NUMERAL_BIT1 0 & n = NUMERAL_BIT1 0)"
   1.499 -  by (import hollight MULT_EQ_1)
   1.500 -
   1.501 -definition EXP :: "nat => nat => nat" where 
   1.502 -  "EXP ==
   1.503 -SOME EXP::nat => nat => nat.
   1.504 -   (ALL m::nat. EXP m 0 = NUMERAL_BIT1 0) &
   1.505 -   (ALL (m::nat) n::nat. EXP m (Suc n) = m * EXP m n)"
   1.506 -
   1.507 -lemma DEF_EXP: "EXP =
   1.508 -(SOME EXP::nat => nat => nat.
   1.509 -    (ALL m::nat. EXP m 0 = NUMERAL_BIT1 0) &
   1.510 -    (ALL (m::nat) n::nat. EXP m (Suc n) = m * EXP m n))"
   1.511 -  by (import hollight DEF_EXP)
   1.512 -
   1.513 -lemma EXP_EQ_0: "ALL (m::nat) n::nat. (EXP m n = 0) = (m = 0 & n ~= 0)"
   1.514 -  by (import hollight EXP_EQ_0)
   1.515 -
   1.516 -lemma EXP_ADD: "ALL (m::nat) (n::nat) p::nat. EXP m (n + p) = EXP m n * EXP m p"
   1.517 -  by (import hollight EXP_ADD)
   1.518 -
   1.519 -lemma EXP_ONE: "ALL n::nat. EXP (NUMERAL_BIT1 0) n = NUMERAL_BIT1 0"
   1.520 -  by (import hollight EXP_ONE)
   1.521 -
   1.522 -lemma EXP_1: "ALL x::nat. EXP x (NUMERAL_BIT1 0) = x"
   1.523 -  by (import hollight EXP_1)
   1.524 -
   1.525 -lemma EXP_2: "ALL x::nat. EXP x (NUMERAL_BIT0 (NUMERAL_BIT1 0)) = x * x"
   1.526 -  by (import hollight EXP_2)
   1.527 -
   1.528 -lemma MULT_EXP: "ALL (p::nat) (m::nat) n::nat. EXP (m * n) p = EXP m p * EXP n p"
   1.529 -  by (import hollight MULT_EXP)
   1.530 -
   1.531 -lemma EXP_MULT: "ALL (m::nat) (n::nat) p::nat. EXP m (n * p) = EXP (EXP m n) p"
   1.532 -  by (import hollight EXP_MULT)
   1.533 -
   1.534 -consts
   1.535 -  "<=" :: "nat => nat => bool" ("<=")
   1.536 -
   1.537 -defs
   1.538 -  "<=_def": "<= ==
   1.539 -SOME u::nat => nat => bool.
   1.540 -   (ALL m::nat. u m 0 = (m = 0)) &
   1.541 -   (ALL (m::nat) n::nat. u m (Suc n) = (m = Suc n | u m n))"
   1.542 -
   1.543 -lemma DEF__lessthan__equal_: "<= =
   1.544 -(SOME u::nat => nat => bool.
   1.545 -    (ALL m::nat. u m 0 = (m = 0)) &
   1.546 -    (ALL (m::nat) n::nat. u m (Suc n) = (m = Suc n | u m n)))"
   1.547 -  by (import hollight DEF__lessthan__equal_)
   1.548 -
   1.549 -consts
   1.550 -  "<" :: "nat => nat => bool" ("<")
   1.551 -
   1.552 -defs
   1.553 -  "<_def": "< ==
   1.554 -SOME u::nat => nat => bool.
   1.555 -   (ALL m::nat. u m 0 = False) &
   1.556 -   (ALL (m::nat) n::nat. u m (Suc n) = (m = n | u m n))"
   1.557 -
   1.558 -lemma DEF__lessthan_: "< =
   1.559 -(SOME u::nat => nat => bool.
   1.560 -    (ALL m::nat. u m 0 = False) &
   1.561 -    (ALL (m::nat) n::nat. u m (Suc n) = (m = n | u m n)))"
   1.562 -  by (import hollight DEF__lessthan_)
   1.563 -
   1.564 -consts
   1.565 -  ">=" :: "nat => nat => bool" (">=")
   1.566 -
   1.567 -defs
   1.568 -  ">=_def": ">= == %(u::nat) ua::nat. <= ua u"
   1.569 -
   1.570 -lemma DEF__greaterthan__equal_: ">= = (%(u::nat) ua::nat. <= ua u)"
   1.571 -  by (import hollight DEF__greaterthan__equal_)
   1.572 -
   1.573 -consts
   1.574 -  ">" :: "nat => nat => bool" (">")
   1.575 -
   1.576 -defs
   1.577 -  ">_def": "> == %(u::nat) ua::nat. < ua u"
   1.578 -
   1.579 -lemma DEF__greaterthan_: "> = (%(u::nat) ua::nat. < ua u)"
   1.580 -  by (import hollight DEF__greaterthan_)
   1.581 -
   1.582 -lemma LE_SUC_LT: "ALL (m::nat) n::nat. <= (Suc m) n = < m n"
   1.583 -  by (import hollight LE_SUC_LT)
   1.584 -
   1.585 -lemma LT_SUC_LE: "ALL (m::nat) n::nat. < m (Suc n) = <= m n"
   1.586 -  by (import hollight LT_SUC_LE)
   1.587 -
   1.588 -lemma LE_SUC: "ALL (x::nat) xa::nat. <= (Suc x) (Suc xa) = <= x xa"
   1.589 -  by (import hollight LE_SUC)
   1.590 -
   1.591 -lemma LT_SUC: "ALL (x::nat) xa::nat. < (Suc x) (Suc xa) = < x xa"
   1.592 -  by (import hollight LT_SUC)
   1.593 -
   1.594 -lemma LE_0: "All (<= 0)"
   1.595 -  by (import hollight LE_0)
   1.596 -
   1.597 -lemma LT_0: "ALL x::nat. < 0 (Suc x)"
   1.598 -  by (import hollight LT_0)
   1.599 -
   1.600 -lemma LE_REFL: "ALL n::nat. <= n n"
   1.601 -  by (import hollight LE_REFL)
   1.602 -
   1.603 -lemma LT_REFL: "ALL n::nat. ~ < n n"
   1.604 -  by (import hollight LT_REFL)
   1.605 -
   1.606 -lemma LE_ANTISYM: "ALL (m::nat) n::nat. (<= m n & <= n m) = (m = n)"
   1.607 -  by (import hollight LE_ANTISYM)
   1.608 -
   1.609 -lemma LT_ANTISYM: "ALL (m::nat) n::nat. ~ (< m n & < n m)"
   1.610 +lemma EXP_EQ_1: "((x::nat) ^ (n::nat) = (1::nat)) = (x = (1::nat) | n = (0::nat))"
   1.611 +  by (import hollight EXP_EQ_1)
   1.612 +
   1.613 +lemma LT_ANTISYM: "~ ((m::nat) < (n::nat) & n < m)"
   1.614    by (import hollight LT_ANTISYM)
   1.615  
   1.616 -lemma LET_ANTISYM: "ALL (m::nat) n::nat. ~ (<= m n & < n m)"
   1.617 +lemma LET_ANTISYM: "~ ((m::nat) <= (n::nat) & n < m)"
   1.618    by (import hollight LET_ANTISYM)
   1.619  
   1.620 -lemma LTE_ANTISYM: "ALL (x::nat) xa::nat. ~ (< x xa & <= xa x)"
   1.621 +lemma LTE_ANTISYM: "~ ((x::nat) < (xa::nat) & xa <= x)"
   1.622    by (import hollight LTE_ANTISYM)
   1.623  
   1.624 -lemma LE_TRANS: "ALL (m::nat) (n::nat) p::nat. <= m n & <= n p --> <= m p"
   1.625 -  by (import hollight LE_TRANS)
   1.626 -
   1.627 -lemma LT_TRANS: "ALL (m::nat) (n::nat) p::nat. < m n & < n p --> < m p"
   1.628 -  by (import hollight LT_TRANS)
   1.629 -
   1.630 -lemma LET_TRANS: "ALL (m::nat) (n::nat) p::nat. <= m n & < n p --> < m p"
   1.631 -  by (import hollight LET_TRANS)
   1.632 -
   1.633 -lemma LTE_TRANS: "ALL (m::nat) (n::nat) p::nat. < m n & <= n p --> < m p"
   1.634 -  by (import hollight LTE_TRANS)
   1.635 -
   1.636 -lemma LE_CASES: "ALL (m::nat) n::nat. <= m n | <= n m"
   1.637 -  by (import hollight LE_CASES)
   1.638 -
   1.639 -lemma LT_CASES: "ALL (m::nat) n::nat. < m n | < n m | m = n"
   1.640 +lemma LT_CASES: "(m::nat) < (n::nat) | n < m | m = n"
   1.641    by (import hollight LT_CASES)
   1.642  
   1.643 -lemma LET_CASES: "ALL (m::nat) n::nat. <= m n | < n m"
   1.644 -  by (import hollight LET_CASES)
   1.645 -
   1.646 -lemma LTE_CASES: "ALL (x::nat) xa::nat. < x xa | <= xa x"
   1.647 +lemma LTE_CASES: "(x::nat) < (xa::nat) | xa <= x"
   1.648    by (import hollight LTE_CASES)
   1.649  
   1.650 -lemma LT_NZ: "ALL n::nat. < 0 n = (n ~= 0)"
   1.651 -  by (import hollight LT_NZ)
   1.652 -
   1.653 -lemma LE_LT: "ALL (m::nat) n::nat. <= m n = (< m n | m = n)"
   1.654 -  by (import hollight LE_LT)
   1.655 -
   1.656 -lemma LT_LE: "ALL (x::nat) xa::nat. < x xa = (<= x xa & x ~= xa)"
   1.657 -  by (import hollight LT_LE)
   1.658 -
   1.659 -lemma NOT_LE: "ALL (m::nat) n::nat. (~ <= m n) = < n m"
   1.660 -  by (import hollight NOT_LE)
   1.661 -
   1.662 -lemma NOT_LT: "ALL (m::nat) n::nat. (~ < m n) = <= n m"
   1.663 -  by (import hollight NOT_LT)
   1.664 -
   1.665 -lemma LT_IMP_LE: "ALL (x::nat) xa::nat. < x xa --> <= x xa"
   1.666 -  by (import hollight LT_IMP_LE)
   1.667 -
   1.668 -lemma EQ_IMP_LE: "ALL (m::nat) n::nat. m = n --> <= m n"
   1.669 -  by (import hollight EQ_IMP_LE)
   1.670 -
   1.671 -lemma LE_EXISTS: "ALL (m::nat) n::nat. <= m n = (EX d::nat. n = m + d)"
   1.672 -  by (import hollight LE_EXISTS)
   1.673 -
   1.674 -lemma LT_EXISTS: "ALL (m::nat) n::nat. < m n = (EX d::nat. n = m + Suc d)"
   1.675 +lemma LE_1: "(ALL x::nat. x ~= (0::nat) --> (0::nat) < x) &
   1.676 +(ALL x::nat. x ~= (0::nat) --> (1::nat) <= x) &
   1.677 +(ALL x>0::nat. x ~= (0::nat)) &
   1.678 +(ALL x>0::nat. (1::nat) <= x) &
   1.679 +(ALL x>=1::nat. (0::nat) < x) & (ALL x>=1::nat. x ~= (0::nat))"
   1.680 +  by (import hollight LE_1)
   1.681 +
   1.682 +lemma LT_EXISTS: "(m < n) = (EX d. n = m + Suc d)"
   1.683    by (import hollight LT_EXISTS)
   1.684  
   1.685 -lemma LE_ADD: "ALL (m::nat) n::nat. <= m (m + n)"
   1.686 -  by (import hollight LE_ADD)
   1.687 -
   1.688 -lemma LE_ADDR: "ALL (x::nat) xa::nat. <= xa (x + xa)"
   1.689 -  by (import hollight LE_ADDR)
   1.690 -
   1.691 -lemma LT_ADD: "ALL (m::nat) n::nat. < m (m + n) = < 0 n"
   1.692 +lemma LT_ADD: "((m::nat) < m + (n::nat)) = ((0::nat) < n)"
   1.693    by (import hollight LT_ADD)
   1.694  
   1.695 -lemma LT_ADDR: "ALL (x::nat) xa::nat. < xa (x + xa) = < 0 x"
   1.696 +lemma LT_ADDR: "((xa::nat) < (x::nat) + xa) = ((0::nat) < x)"
   1.697    by (import hollight LT_ADDR)
   1.698  
   1.699 -lemma LE_ADD_LCANCEL: "ALL (x::nat) (xa::nat) xb::nat. <= (x + xa) (x + xb) = <= xa xb"
   1.700 -  by (import hollight LE_ADD_LCANCEL)
   1.701 -
   1.702 -lemma LE_ADD_RCANCEL: "ALL (x::nat) (xa::nat) xb::nat. <= (x + xb) (xa + xb) = <= x xa"
   1.703 -  by (import hollight LE_ADD_RCANCEL)
   1.704 -
   1.705 -lemma LT_ADD_LCANCEL: "ALL (x::nat) (xa::nat) xb::nat. < (x + xa) (x + xb) = < xa xb"
   1.706 -  by (import hollight LT_ADD_LCANCEL)
   1.707 -
   1.708 -lemma LT_ADD_RCANCEL: "ALL (x::nat) (xa::nat) xb::nat. < (x + xb) (xa + xb) = < x xa"
   1.709 -  by (import hollight LT_ADD_RCANCEL)
   1.710 -
   1.711 -lemma LE_ADD2: "ALL (m::nat) (n::nat) (p::nat) q::nat.
   1.712 -   <= m p & <= n q --> <= (m + n) (p + q)"
   1.713 -  by (import hollight LE_ADD2)
   1.714 -
   1.715 -lemma LET_ADD2: "ALL (m::nat) (n::nat) (p::nat) q::nat. <= m p & < n q --> < (m + n) (p + q)"
   1.716 -  by (import hollight LET_ADD2)
   1.717 -
   1.718 -lemma LTE_ADD2: "ALL (x::nat) (xa::nat) (xb::nat) xc::nat.
   1.719 -   < x xb & <= xa xc --> < (x + xa) (xb + xc)"
   1.720 -  by (import hollight LTE_ADD2)
   1.721 -
   1.722 -lemma LT_ADD2: "ALL (m::nat) (n::nat) (p::nat) q::nat. < m p & < n q --> < (m + n) (p + q)"
   1.723 -  by (import hollight LT_ADD2)
   1.724 -
   1.725 -lemma LT_MULT: "ALL (m::nat) n::nat. < 0 (m * n) = (< 0 m & < 0 n)"
   1.726 -  by (import hollight LT_MULT)
   1.727 -
   1.728 -lemma LE_MULT2: "ALL (m::nat) (n::nat) (p::nat) q::nat.
   1.729 -   <= m n & <= p q --> <= (m * p) (n * q)"
   1.730 -  by (import hollight LE_MULT2)
   1.731 -
   1.732 -lemma LT_LMULT: "ALL (m::nat) (n::nat) p::nat. m ~= 0 & < n p --> < (m * n) (m * p)"
   1.733 +lemma LT_LMULT: "(m::nat) ~= (0::nat) & (n::nat) < (p::nat) ==> m * n < m * p"
   1.734    by (import hollight LT_LMULT)
   1.735  
   1.736 -lemma LE_MULT_LCANCEL: "ALL (m::nat) (n::nat) p::nat. <= (m * n) (m * p) = (m = 0 | <= n p)"
   1.737 +lemma LE_MULT_LCANCEL: "((m::nat) * (n::nat) <= m * (p::nat)) = (m = (0::nat) | n <= p)"
   1.738    by (import hollight LE_MULT_LCANCEL)
   1.739  
   1.740 -lemma LE_MULT_RCANCEL: "ALL (x::nat) (xa::nat) xb::nat. <= (x * xb) (xa * xb) = (<= x xa | xb = 0)"
   1.741 +lemma LE_MULT_RCANCEL: "((x::nat) * (xb::nat) <= (xa::nat) * xb) = (x <= xa | xb = (0::nat))"
   1.742    by (import hollight LE_MULT_RCANCEL)
   1.743  
   1.744 -lemma LT_MULT_LCANCEL: "ALL (m::nat) (n::nat) p::nat. < (m * n) (m * p) = (m ~= 0 & < n p)"
   1.745 +lemma LT_MULT_LCANCEL: "((m::nat) * (n::nat) < m * (p::nat)) = (m ~= (0::nat) & n < p)"
   1.746    by (import hollight LT_MULT_LCANCEL)
   1.747  
   1.748 -lemma LT_MULT_RCANCEL: "ALL (x::nat) (xa::nat) xb::nat. < (x * xb) (xa * xb) = (< x xa & xb ~= 0)"
   1.749 +lemma LT_MULT_RCANCEL: "((x::nat) * (xb::nat) < (xa::nat) * xb) = (x < xa & xb ~= (0::nat))"
   1.750    by (import hollight LT_MULT_RCANCEL)
   1.751  
   1.752 -lemma LT_MULT2: "ALL (m::nat) (n::nat) (p::nat) q::nat. < m n & < p q --> < (m * p) (n * q)"
   1.753 +lemma LT_MULT2: "(m::nat) < (n::nat) & (p::nat) < (q::nat) ==> m * p < n * q"
   1.754    by (import hollight LT_MULT2)
   1.755  
   1.756 -lemma LE_SQUARE_REFL: "ALL n::nat. <= n (n * n)"
   1.757 -  by (import hollight LE_SQUARE_REFL)
   1.758 -
   1.759  lemma WLOG_LE: "(ALL (m::nat) n::nat. (P::nat => nat => bool) m n = P n m) &
   1.760 -(ALL (m::nat) n::nat. <= m n --> P m n) -->
   1.761 -(ALL m::nat. All (P m))"
   1.762 +(ALL (m::nat) n::nat. m <= n --> P m n)
   1.763 +==> P (m::nat) (x::nat)"
   1.764    by (import hollight WLOG_LE)
   1.765  
   1.766  lemma WLOG_LT: "(ALL m::nat. (P::nat => nat => bool) m m) &
   1.767  (ALL (m::nat) n::nat. P m n = P n m) &
   1.768 -(ALL (m::nat) n::nat. < m n --> P m n) -->
   1.769 -(ALL m::nat. All (P m))"
   1.770 +(ALL (m::nat) n::nat. m < n --> P m n)
   1.771 +==> P (m::nat) (x::nat)"
   1.772    by (import hollight WLOG_LT)
   1.773  
   1.774 -lemma num_WF: "ALL P::nat => bool.
   1.775 -   (ALL n::nat. (ALL m::nat. < m n --> P m) --> P n) --> All P"
   1.776 -  by (import hollight num_WF)
   1.777 -
   1.778 -lemma num_WOP: "ALL P::nat => bool. Ex P = (EX n::nat. P n & (ALL m::nat. < m n --> ~ P m))"
   1.779 +lemma num_WOP: "Ex (P::nat => bool) = (EX n::nat. P n & (ALL m<n. ~ P m))"
   1.780    by (import hollight num_WOP)
   1.781  
   1.782 -lemma num_MAX: "ALL P::nat => bool.
   1.783 -   (Ex P & (EX M::nat. ALL x::nat. P x --> <= x M)) =
   1.784 -   (EX m::nat. P m & (ALL x::nat. P x --> <= x m))"
   1.785 +lemma num_MAX: "(Ex (P::nat => bool) & (EX M::nat. ALL x::nat. P x --> x <= M)) =
   1.786 +(EX m::nat. P m & (ALL x::nat. P x --> x <= m))"
   1.787    by (import hollight num_MAX)
   1.788  
   1.789 -definition EVEN :: "nat => bool" where 
   1.790 -  "EVEN ==
   1.791 -SOME EVEN::nat => bool.
   1.792 -   EVEN 0 = True & (ALL n::nat. EVEN (Suc n) = (~ EVEN n))"
   1.793 -
   1.794 -lemma DEF_EVEN: "EVEN =
   1.795 -(SOME EVEN::nat => bool.
   1.796 -    EVEN 0 = True & (ALL n::nat. EVEN (Suc n) = (~ EVEN n)))"
   1.797 -  by (import hollight DEF_EVEN)
   1.798 -
   1.799 -definition ODD :: "nat => bool" where 
   1.800 -  "ODD ==
   1.801 -SOME ODD::nat => bool. ODD 0 = False & (ALL n::nat. ODD (Suc n) = (~ ODD n))"
   1.802 -
   1.803 -lemma DEF_ODD: "ODD =
   1.804 -(SOME ODD::nat => bool.
   1.805 -    ODD 0 = False & (ALL n::nat. ODD (Suc n) = (~ ODD n)))"
   1.806 -  by (import hollight DEF_ODD)
   1.807 -
   1.808 -lemma NOT_EVEN: "ALL n::nat. (~ EVEN n) = ODD n"
   1.809 +lemma NOT_EVEN: "odd (n::nat) = odd n"
   1.810    by (import hollight NOT_EVEN)
   1.811  
   1.812 -lemma NOT_ODD: "ALL n::nat. (~ ODD n) = EVEN n"
   1.813 +lemma NOT_ODD: "(~ odd (n::nat)) = even n"
   1.814    by (import hollight NOT_ODD)
   1.815  
   1.816 -lemma EVEN_OR_ODD: "ALL n::nat. EVEN n | ODD n"
   1.817 +lemma EVEN_OR_ODD: "even (n::nat) | odd n"
   1.818    by (import hollight EVEN_OR_ODD)
   1.819  
   1.820 -lemma EVEN_AND_ODD: "ALL x::nat. ~ (EVEN x & ODD x)"
   1.821 +lemma EVEN_AND_ODD: "~ (even (x::nat) & odd x)"
   1.822    by (import hollight EVEN_AND_ODD)
   1.823  
   1.824 -lemma EVEN_ADD: "ALL (m::nat) n::nat. EVEN (m + n) = (EVEN m = EVEN n)"
   1.825 -  by (import hollight EVEN_ADD)
   1.826 -
   1.827 -lemma EVEN_MULT: "ALL (m::nat) n::nat. EVEN (m * n) = (EVEN m | EVEN n)"
   1.828 -  by (import hollight EVEN_MULT)
   1.829 -
   1.830 -lemma EVEN_EXP: "ALL (m::nat) n::nat. EVEN (EXP m n) = (EVEN m & n ~= 0)"
   1.831 +lemma EVEN_EXP: "even ((m::nat) ^ (n::nat)) = (even m & n ~= (0::nat))"
   1.832    by (import hollight EVEN_EXP)
   1.833  
   1.834 -lemma ODD_ADD: "ALL (m::nat) n::nat. ODD (m + n) = (ODD m ~= ODD n)"
   1.835 -  by (import hollight ODD_ADD)
   1.836 -
   1.837 -lemma ODD_MULT: "ALL (m::nat) n::nat. ODD (m * n) = (ODD m & ODD n)"
   1.838 +lemma ODD_MULT: "odd ((m::nat) * (n::nat)) = (odd m & odd n)"
   1.839    by (import hollight ODD_MULT)
   1.840  
   1.841 -lemma ODD_EXP: "ALL (m::nat) n::nat. ODD (EXP m n) = (ODD m | n = 0)"
   1.842 +lemma ODD_EXP: "odd ((m::nat) ^ (n::nat)) = (odd m | n = (0::nat))"
   1.843    by (import hollight ODD_EXP)
   1.844  
   1.845 -lemma EVEN_DOUBLE: "ALL n::nat. EVEN (NUMERAL_BIT0 (NUMERAL_BIT1 0) * n)"
   1.846 +lemma EVEN_DOUBLE: "even ((2::nat) * (n::nat))"
   1.847    by (import hollight EVEN_DOUBLE)
   1.848  
   1.849 -lemma ODD_DOUBLE: "ALL x::nat. ODD (Suc (NUMERAL_BIT0 (NUMERAL_BIT1 0) * x))"
   1.850 +lemma ODD_DOUBLE: "odd (Suc (2 * x))"
   1.851    by (import hollight ODD_DOUBLE)
   1.852  
   1.853 -lemma EVEN_EXISTS_LEMMA: "ALL n::nat.
   1.854 -   (EVEN n --> (EX m::nat. n = NUMERAL_BIT0 (NUMERAL_BIT1 0) * m)) &
   1.855 -   (~ EVEN n --> (EX m::nat. n = Suc (NUMERAL_BIT0 (NUMERAL_BIT1 0) * m)))"
   1.856 +lemma EVEN_EXISTS_LEMMA: "(even n --> (EX m. n = 2 * m)) & (odd n --> (EX m. n = Suc (2 * m)))"
   1.857    by (import hollight EVEN_EXISTS_LEMMA)
   1.858  
   1.859 -lemma EVEN_EXISTS: "ALL n::nat. EVEN n = (EX m::nat. n = NUMERAL_BIT0 (NUMERAL_BIT1 0) * m)"
   1.860 -  by (import hollight EVEN_EXISTS)
   1.861 -
   1.862 -lemma ODD_EXISTS: "ALL n::nat. ODD n = (EX m::nat. n = Suc (NUMERAL_BIT0 (NUMERAL_BIT1 0) * m))"
   1.863 -  by (import hollight ODD_EXISTS)
   1.864 -
   1.865 -lemma EVEN_ODD_DECOMPOSITION: "ALL n::nat.
   1.866 -   (EX (k::nat) m::nat.
   1.867 -       ODD m & n = EXP (NUMERAL_BIT0 (NUMERAL_BIT1 0)) k * m) =
   1.868 -   (n ~= 0)"
   1.869 +lemma EVEN_ODD_DECOMPOSITION: "(EX (k::nat) m::nat. odd m & (n::nat) = (2::nat) ^ k * m) = (n ~= (0::nat))"
   1.870    by (import hollight EVEN_ODD_DECOMPOSITION)
   1.871  
   1.872 -lemma SUB_0: "ALL x::nat. 0 - x = 0 & x - 0 = x"
   1.873 +lemma SUB_0: "(0::nat) - (x::nat) = (0::nat) & x - (0::nat) = x"
   1.874    by (import hollight SUB_0)
   1.875  
   1.876 -lemma SUB_PRESUC: "ALL (m::nat) n::nat. Pred (Suc m - n) = m - n"
   1.877 +lemma SUB_PRESUC: "Suc m - n - Suc 0 = m - n"
   1.878    by (import hollight SUB_PRESUC)
   1.879  
   1.880 -lemma SUB_EQ_0: "ALL (m::nat) n::nat. (m - n = 0) = <= m n"
   1.881 -  by (import hollight SUB_EQ_0)
   1.882 -
   1.883 -lemma ADD_SUBR: "ALL (x::nat) xa::nat. xa - (x + xa) = 0"
   1.884 +lemma ADD_SUBR: "(xa::nat) - ((x::nat) + xa) = (0::nat)"
   1.885    by (import hollight ADD_SUBR)
   1.886  
   1.887 -lemma SUB_ADD: "ALL (x::nat) xa::nat. <= xa x --> x - xa + xa = x"
   1.888 -  by (import hollight SUB_ADD)
   1.889 -
   1.890 -lemma SUC_SUB1: "ALL x::nat. Suc x - NUMERAL_BIT1 0 = x"
   1.891 -  by (import hollight SUC_SUB1)
   1.892 -
   1.893 -definition FACT :: "nat => nat" where 
   1.894 -  "FACT ==
   1.895 -SOME FACT::nat => nat.
   1.896 -   FACT 0 = NUMERAL_BIT1 0 & (ALL n::nat. FACT (Suc n) = Suc n * FACT n)"
   1.897 -
   1.898 -lemma DEF_FACT: "FACT =
   1.899 -(SOME FACT::nat => nat.
   1.900 -    FACT 0 = NUMERAL_BIT1 0 & (ALL n::nat. FACT (Suc n) = Suc n * FACT n))"
   1.901 -  by (import hollight DEF_FACT)
   1.902 -
   1.903 -lemma FACT_LT: "ALL n::nat. < 0 (FACT n)"
   1.904 -  by (import hollight FACT_LT)
   1.905 -
   1.906 -lemma FACT_LE: "ALL x::nat. <= (NUMERAL_BIT1 0) (FACT x)"
   1.907 -  by (import hollight FACT_LE)
   1.908 -
   1.909 -lemma FACT_MONO: "ALL (m::nat) n::nat. <= m n --> <= (FACT m) (FACT n)"
   1.910 -  by (import hollight FACT_MONO)
   1.911 -
   1.912 -lemma DIVMOD_EXIST: "ALL (m::nat) n::nat. n ~= 0 --> (EX (q::nat) r::nat. m = q * n + r & < r n)"
   1.913 +lemma EVEN_SUB: "even ((m::nat) - (n::nat)) = (m <= n | even m = even n)"
   1.914 +  by (import hollight EVEN_SUB)
   1.915 +
   1.916 +lemma ODD_SUB: "odd ((x::nat) - (xa::nat)) = (xa < x & odd x ~= odd xa)"
   1.917 +  by (import hollight ODD_SUB)
   1.918 +
   1.919 +lemma EXP_LT_0: "((0::nat) < (xa::nat) ^ (x::nat)) = (xa ~= (0::nat) | x = (0::nat))"
   1.920 +  by (import hollight EXP_LT_0)
   1.921 +
   1.922 +lemma LT_EXP: "((x::nat) ^ (m::nat) < x ^ (n::nat)) =
   1.923 +((2::nat) <= x & m < n | x = (0::nat) & m ~= (0::nat) & n = (0::nat))"
   1.924 +  by (import hollight LT_EXP)
   1.925 +
   1.926 +lemma LE_EXP: "((x::nat) ^ (m::nat) <= x ^ (n::nat)) =
   1.927 +(if x = (0::nat) then m = (0::nat) --> n = (0::nat)
   1.928 + else x = (1::nat) | m <= n)"
   1.929 +  by (import hollight LE_EXP)
   1.930 +
   1.931 +lemma EQ_EXP: "((x::nat) ^ (m::nat) = x ^ (n::nat)) =
   1.932 +(if x = (0::nat) then (m = (0::nat)) = (n = (0::nat))
   1.933 + else x = (1::nat) | m = n)"
   1.934 +  by (import hollight EQ_EXP)
   1.935 +
   1.936 +lemma EXP_MONO_LE_IMP: "(x::nat) <= (xa::nat) ==> x ^ (xb::nat) <= xa ^ xb"
   1.937 +  by (import hollight EXP_MONO_LE_IMP)
   1.938 +
   1.939 +lemma EXP_MONO_LT_IMP: "(x::nat) < (y::nat) & (n::nat) ~= (0::nat) ==> x ^ n < y ^ n"
   1.940 +  by (import hollight EXP_MONO_LT_IMP)
   1.941 +
   1.942 +lemma EXP_MONO_LE: "((x::nat) ^ (n::nat) <= (y::nat) ^ n) = (x <= y | n = (0::nat))"
   1.943 +  by (import hollight EXP_MONO_LE)
   1.944 +
   1.945 +lemma EXP_MONO_LT: "((x::nat) ^ (xb::nat) < (xa::nat) ^ xb) = (x < xa & xb ~= (0::nat))"
   1.946 +  by (import hollight EXP_MONO_LT)
   1.947 +
   1.948 +lemma EXP_MONO_EQ: "((x::nat) ^ (xb::nat) = (xa::nat) ^ xb) = (x = xa | xb = (0::nat))"
   1.949 +  by (import hollight EXP_MONO_EQ)
   1.950 +
   1.951 +lemma DIVMOD_EXIST: "(n::nat) ~= (0::nat) ==> EX (q::nat) r::nat. (m::nat) = q * n + r & r < n"
   1.952    by (import hollight DIVMOD_EXIST)
   1.953  
   1.954 -lemma DIVMOD_EXIST_0: "ALL (m::nat) n::nat.
   1.955 -   EX (x::nat) xa::nat.
   1.956 -      COND (n = 0) (x = 0 & xa = 0) (m = x * n + xa & < xa n)"
   1.957 +lemma DIVMOD_EXIST_0: "EX (x::nat) xa::nat.
   1.958 +   if (n::nat) = (0::nat) then x = (0::nat) & xa = (m::nat)
   1.959 +   else m = x * n + xa & xa < n"
   1.960    by (import hollight DIVMOD_EXIST_0)
   1.961  
   1.962 -definition DIV :: "nat => nat => nat" where 
   1.963 -  "DIV ==
   1.964 -SOME q::nat => nat => nat.
   1.965 -   EX r::nat => nat => nat.
   1.966 -      ALL (m::nat) n::nat.
   1.967 -         COND (n = 0) (q m n = 0 & r m n = 0)
   1.968 -          (m = q m n * n + r m n & < (r m n) n)"
   1.969 -
   1.970 -lemma DEF_DIV: "DIV =
   1.971 -(SOME q::nat => nat => nat.
   1.972 -    EX r::nat => nat => nat.
   1.973 -       ALL (m::nat) n::nat.
   1.974 -          COND (n = 0) (q m n = 0 & r m n = 0)
   1.975 -           (m = q m n * n + r m n & < (r m n) n))"
   1.976 -  by (import hollight DEF_DIV)
   1.977 -
   1.978 -definition MOD :: "nat => nat => nat" where 
   1.979 -  "MOD ==
   1.980 -SOME r::nat => nat => nat.
   1.981 -   ALL (m::nat) n::nat.
   1.982 -      COND (n = 0) (DIV m n = 0 & r m n = 0)
   1.983 -       (m = DIV m n * n + r m n & < (r m n) n)"
   1.984 -
   1.985 -lemma DEF_MOD: "MOD =
   1.986 -(SOME r::nat => nat => nat.
   1.987 -    ALL (m::nat) n::nat.
   1.988 -       COND (n = 0) (DIV m n = 0 & r m n = 0)
   1.989 -        (m = DIV m n * n + r m n & < (r m n) n))"
   1.990 -  by (import hollight DEF_MOD)
   1.991 -
   1.992 -lemma DIVISION: "ALL (m::nat) n::nat. n ~= 0 --> m = DIV m n * n + MOD m n & < (MOD m n) n"
   1.993 +lemma DIVISION: "(n::nat) ~= (0::nat) ==> (m::nat) = m div n * n + m mod n & m mod n < n"
   1.994    by (import hollight DIVISION)
   1.995  
   1.996 -lemma DIVMOD_UNIQ_LEMMA: "ALL (m::nat) (n::nat) (q1::nat) (r1::nat) (q2::nat) r2::nat.
   1.997 -   (m = q1 * n + r1 & < r1 n) & m = q2 * n + r2 & < r2 n -->
   1.998 -   q1 = q2 & r1 = r2"
   1.999 +lemma DIVMOD_UNIQ_LEMMA: "((m::nat) = (q1::nat) * (n::nat) + (r1::nat) & r1 < n) &
  1.1000 +m = (q2::nat) * n + (r2::nat) & r2 < n
  1.1001 +==> q1 = q2 & r1 = r2"
  1.1002    by (import hollight DIVMOD_UNIQ_LEMMA)
  1.1003  
  1.1004 -lemma DIVMOD_UNIQ: "ALL (m::nat) (n::nat) (q::nat) r::nat.
  1.1005 -   m = q * n + r & < r n --> DIV m n = q & MOD m n = r"
  1.1006 +lemma DIVMOD_UNIQ: "(m::nat) = (q::nat) * (n::nat) + (r::nat) & r < n
  1.1007 +==> m div n = q & m mod n = r"
  1.1008    by (import hollight DIVMOD_UNIQ)
  1.1009  
  1.1010 -lemma MOD_UNIQ: "ALL (m::nat) (n::nat) (q::nat) r::nat. m = q * n + r & < r n --> MOD m n = r"
  1.1011 +lemma MOD_UNIQ: "(m::nat) = (q::nat) * (n::nat) + (r::nat) & r < n ==> m mod n = r"
  1.1012    by (import hollight MOD_UNIQ)
  1.1013  
  1.1014 -lemma DIV_UNIQ: "ALL (m::nat) (n::nat) (q::nat) r::nat. m = q * n + r & < r n --> DIV m n = q"
  1.1015 +lemma DIV_UNIQ: "(m::nat) = (q::nat) * (n::nat) + (r::nat) & r < n ==> m div n = q"
  1.1016    by (import hollight DIV_UNIQ)
  1.1017  
  1.1018 -lemma MOD_MULT: "ALL (x::nat) xa::nat. x ~= 0 --> MOD (x * xa) x = 0"
  1.1019 -  by (import hollight MOD_MULT)
  1.1020 -
  1.1021 -lemma DIV_MULT: "ALL (x::nat) xa::nat. x ~= 0 --> DIV (x * xa) x = xa"
  1.1022 -  by (import hollight DIV_MULT)
  1.1023 -
  1.1024 -lemma DIV_DIV: "ALL (m::nat) (n::nat) p::nat. n * p ~= 0 --> DIV (DIV m n) p = DIV m (n * p)"
  1.1025 -  by (import hollight DIV_DIV)
  1.1026 -
  1.1027 -lemma MOD_LT: "ALL (m::nat) n::nat. < m n --> MOD m n = m"
  1.1028 -  by (import hollight MOD_LT)
  1.1029 -
  1.1030 -lemma MOD_EQ: "ALL (m::nat) (n::nat) (p::nat) q::nat. m = n + q * p --> MOD m p = MOD n p"
  1.1031 +lemma MOD_EQ: "(m::nat) = (n::nat) + (q::nat) * (p::nat) ==> m mod p = n mod p"
  1.1032    by (import hollight MOD_EQ)
  1.1033  
  1.1034 -lemma DIV_MOD: "ALL (m::nat) (n::nat) p::nat.
  1.1035 -   n * p ~= 0 --> MOD (DIV m n) p = DIV (MOD m (n * p)) n"
  1.1036 -  by (import hollight DIV_MOD)
  1.1037 -
  1.1038 -lemma DIV_1: "ALL n::nat. DIV n (NUMERAL_BIT1 0) = n"
  1.1039 -  by (import hollight DIV_1)
  1.1040 -
  1.1041 -lemma EXP_LT_0: "ALL (x::nat) xa::nat. < 0 (EXP xa x) = (xa ~= 0 | x = 0)"
  1.1042 -  by (import hollight EXP_LT_0)
  1.1043 -
  1.1044 -lemma DIV_LE: "ALL (m::nat) n::nat. n ~= 0 --> <= (DIV m n) m"
  1.1045 +lemma DIV_LE: "(n::nat) ~= (0::nat) ==> (m::nat) div n <= m"
  1.1046    by (import hollight DIV_LE)
  1.1047  
  1.1048 -lemma DIV_MUL_LE: "ALL (m::nat) n::nat. <= (n * DIV m n) m"
  1.1049 +lemma DIV_MUL_LE: "(n::nat) * ((m::nat) div n) <= m"
  1.1050    by (import hollight DIV_MUL_LE)
  1.1051  
  1.1052 -lemma DIV_0: "ALL n::nat. n ~= 0 --> DIV 0 n = 0"
  1.1053 -  by (import hollight DIV_0)
  1.1054 -
  1.1055 -lemma MOD_0: "ALL n::nat. n ~= 0 --> MOD 0 n = 0"
  1.1056 -  by (import hollight MOD_0)
  1.1057 -
  1.1058 -lemma DIV_LT: "ALL (m::nat) n::nat. < m n --> DIV m n = 0"
  1.1059 -  by (import hollight DIV_LT)
  1.1060 -
  1.1061 -lemma MOD_MOD: "ALL (m::nat) (n::nat) p::nat. n * p ~= 0 --> MOD (MOD m (n * p)) n = MOD m n"
  1.1062 +lemma MOD_MOD: "(n::nat) * (p::nat) ~= (0::nat) ==> (m::nat) mod (n * p) mod n = m mod n"
  1.1063    by (import hollight MOD_MOD)
  1.1064  
  1.1065 -lemma MOD_MOD_REFL: "ALL (m::nat) n::nat. n ~= 0 --> MOD (MOD m n) n = MOD m n"
  1.1066 +lemma MOD_MOD_REFL: "(n::nat) ~= (0::nat) ==> (m::nat) mod n mod n = m mod n"
  1.1067    by (import hollight MOD_MOD_REFL)
  1.1068  
  1.1069 -lemma DIV_MULT2: "ALL (x::nat) (xa::nat) xb::nat.
  1.1070 -   x * xb ~= 0 --> DIV (x * xa) (x * xb) = DIV xa xb"
  1.1071 +lemma DIV_MULT2: "(x::nat) * (xb::nat) ~= (0::nat) ==> x * (xa::nat) div (x * xb) = xa div xb"
  1.1072    by (import hollight DIV_MULT2)
  1.1073  
  1.1074 -lemma MOD_MULT2: "ALL (x::nat) (xa::nat) xb::nat.
  1.1075 -   x * xb ~= 0 --> MOD (x * xa) (x * xb) = x * MOD xa xb"
  1.1076 +lemma MOD_MULT2: "(x::nat) * (xb::nat) ~= (0::nat)
  1.1077 +==> x * (xa::nat) mod (x * xb) = x * (xa mod xb)"
  1.1078    by (import hollight MOD_MULT2)
  1.1079  
  1.1080 -lemma MOD_1: "ALL n::nat. MOD n (NUMERAL_BIT1 0) = 0"
  1.1081 -  by (import hollight MOD_1)
  1.1082 -
  1.1083 -lemma MOD_EXISTS: "ALL (m::nat) n::nat.
  1.1084 -   (EX q::nat. m = n * q) = COND (n = 0) (m = 0) (MOD m n = 0)"
  1.1085 +lemma MOD_EXISTS: "(EX q::nat. (m::nat) = (n::nat) * q) =
  1.1086 +(if n = (0::nat) then m = (0::nat) else m mod n = (0::nat))"
  1.1087    by (import hollight MOD_EXISTS)
  1.1088  
  1.1089 -lemma LT_EXP: "ALL (x::nat) (m::nat) n::nat.
  1.1090 -   < (EXP x m) (EXP x n) =
  1.1091 -   (<= (NUMERAL_BIT0 (NUMERAL_BIT1 0)) x & < m n | x = 0 & m ~= 0 & n = 0)"
  1.1092 -  by (import hollight LT_EXP)
  1.1093 -
  1.1094 -lemma LE_EXP: "ALL (x::nat) (m::nat) n::nat.
  1.1095 -   <= (EXP x m) (EXP x n) =
  1.1096 -   COND (x = 0) (m = 0 --> n = 0) (x = NUMERAL_BIT1 0 | <= m n)"
  1.1097 -  by (import hollight LE_EXP)
  1.1098 -
  1.1099 -lemma DIV_MONO: "ALL (m::nat) (n::nat) p::nat. p ~= 0 & <= m n --> <= (DIV m p) (DIV n p)"
  1.1100 +lemma LE_RDIV_EQ: "(a::nat) ~= (0::nat) ==> ((n::nat) <= (b::nat) div a) = (a * n <= b)"
  1.1101 +  by (import hollight LE_RDIV_EQ)
  1.1102 +
  1.1103 +lemma LE_LDIV_EQ: "(a::nat) ~= (0::nat)
  1.1104 +==> ((b::nat) div a <= (n::nat)) = (b < a * (n + (1::nat)))"
  1.1105 +  by (import hollight LE_LDIV_EQ)
  1.1106 +
  1.1107 +lemma LE_LDIV: "(x::nat) ~= (0::nat) & (xa::nat) <= x * (xb::nat) ==> xa div x <= xb"
  1.1108 +  by (import hollight LE_LDIV)
  1.1109 +
  1.1110 +lemma DIV_MONO: "(p::nat) ~= (0::nat) & (m::nat) <= (n::nat) ==> m div p <= n div p"
  1.1111    by (import hollight DIV_MONO)
  1.1112  
  1.1113 -lemma DIV_MONO_LT: "ALL (m::nat) (n::nat) p::nat.
  1.1114 -   p ~= 0 & <= (m + p) n --> < (DIV m p) (DIV n p)"
  1.1115 +lemma DIV_MONO_LT: "(p::nat) ~= (0::nat) & (m::nat) + p <= (n::nat) ==> m div p < n div p"
  1.1116    by (import hollight DIV_MONO_LT)
  1.1117  
  1.1118 -lemma LE_LDIV: "ALL (a::nat) (b::nat) n::nat. a ~= 0 & <= b (a * n) --> <= (DIV b a) n"
  1.1119 -  by (import hollight LE_LDIV)
  1.1120 -
  1.1121 -lemma LE_RDIV_EQ: "ALL (a::nat) (b::nat) n::nat. a ~= 0 --> <= n (DIV b a) = <= (a * n) b"
  1.1122 -  by (import hollight LE_RDIV_EQ)
  1.1123 -
  1.1124 -lemma LE_LDIV_EQ: "ALL (a::nat) (b::nat) n::nat.
  1.1125 -   a ~= 0 --> <= (DIV b a) n = < b (a * (n + NUMERAL_BIT1 0))"
  1.1126 -  by (import hollight LE_LDIV_EQ)
  1.1127 -
  1.1128 -lemma DIV_EQ_0: "ALL (m::nat) n::nat. n ~= 0 --> (DIV m n = 0) = < m n"
  1.1129 +lemma DIV_EQ_0: "(n::nat) ~= (0::nat) ==> ((m::nat) div n = (0::nat)) = (m < n)"
  1.1130    by (import hollight DIV_EQ_0)
  1.1131  
  1.1132 -lemma MOD_EQ_0: "ALL (m::nat) n::nat. n ~= 0 --> (MOD m n = 0) = (EX q::nat. m = q * n)"
  1.1133 +lemma MOD_EQ_0: "(n::nat) ~= (0::nat)
  1.1134 +==> ((m::nat) mod n = (0::nat)) = (EX q::nat. m = q * n)"
  1.1135    by (import hollight MOD_EQ_0)
  1.1136  
  1.1137 -lemma EVEN_MOD: "ALL n::nat. EVEN n = (MOD n (NUMERAL_BIT0 (NUMERAL_BIT1 0)) = 0)"
  1.1138 +lemma EVEN_MOD: "even (n::nat) = (n mod (2::nat) = (0::nat))"
  1.1139    by (import hollight EVEN_MOD)
  1.1140  
  1.1141 -lemma ODD_MOD: "ALL n::nat. ODD n = (MOD n (NUMERAL_BIT0 (NUMERAL_BIT1 0)) = NUMERAL_BIT1 0)"
  1.1142 +lemma ODD_MOD: "odd (n::nat) = (n mod (2::nat) = (1::nat))"
  1.1143    by (import hollight ODD_MOD)
  1.1144  
  1.1145 -lemma MOD_MULT_RMOD: "ALL (m::nat) (n::nat) p::nat. n ~= 0 --> MOD (m * MOD p n) n = MOD (m * p) n"
  1.1146 +lemma MOD_MULT_RMOD: "(n::nat) ~= (0::nat) ==> (m::nat) * ((p::nat) mod n) mod n = m * p mod n"
  1.1147    by (import hollight MOD_MULT_RMOD)
  1.1148  
  1.1149 -lemma MOD_MULT_LMOD: "ALL (x::nat) (xa::nat) xb::nat.
  1.1150 -   xa ~= 0 --> MOD (MOD x xa * xb) xa = MOD (x * xb) xa"
  1.1151 +lemma MOD_MULT_LMOD: "(xa::nat) ~= (0::nat) ==> (x::nat) mod xa * (xb::nat) mod xa = x * xb mod xa"
  1.1152    by (import hollight MOD_MULT_LMOD)
  1.1153  
  1.1154 -lemma MOD_MULT_MOD2: "ALL (x::nat) (xa::nat) xb::nat.
  1.1155 -   xa ~= 0 --> MOD (MOD x xa * MOD xb xa) xa = MOD (x * xb) xa"
  1.1156 +lemma MOD_MULT_MOD2: "(xa::nat) ~= (0::nat)
  1.1157 +==> (x::nat) mod xa * ((xb::nat) mod xa) mod xa = x * xb mod xa"
  1.1158    by (import hollight MOD_MULT_MOD2)
  1.1159  
  1.1160 -lemma MOD_EXP_MOD: "ALL (m::nat) (n::nat) p::nat.
  1.1161 -   n ~= 0 --> MOD (EXP (MOD m n) p) n = MOD (EXP m p) n"
  1.1162 +lemma MOD_EXP_MOD: "(n::nat) ~= (0::nat) ==> ((m::nat) mod n) ^ (p::nat) mod n = m ^ p mod n"
  1.1163    by (import hollight MOD_EXP_MOD)
  1.1164  
  1.1165 -lemma MOD_MULT_ADD: "ALL (m::nat) (n::nat) p::nat. MOD (m * n + p) n = MOD p n"
  1.1166 -  by (import hollight MOD_MULT_ADD)
  1.1167 -
  1.1168 -lemma MOD_ADD_MOD: "ALL (a::nat) (b::nat) n::nat.
  1.1169 -   n ~= 0 --> MOD (MOD a n + MOD b n) n = MOD (a + b) n"
  1.1170 +lemma MOD_ADD_MOD: "(n::nat) ~= (0::nat)
  1.1171 +==> ((a::nat) mod n + (b::nat) mod n) mod n = (a + b) mod n"
  1.1172    by (import hollight MOD_ADD_MOD)
  1.1173  
  1.1174 -lemma DIV_ADD_MOD: "ALL (a::nat) (b::nat) n::nat.
  1.1175 -   n ~= 0 -->
  1.1176 -   (MOD (a + b) n = MOD a n + MOD b n) = (DIV (a + b) n = DIV a n + DIV b n)"
  1.1177 +lemma DIV_ADD_MOD: "(n::nat) ~= (0::nat)
  1.1178 +==> (((a::nat) + (b::nat)) mod n = a mod n + b mod n) =
  1.1179 +    ((a + b) div n = a div n + b div n)"
  1.1180    by (import hollight DIV_ADD_MOD)
  1.1181  
  1.1182 -lemma DIV_REFL: "ALL n::nat. n ~= 0 --> DIV n n = NUMERAL_BIT1 0"
  1.1183 -  by (import hollight DIV_REFL)
  1.1184 -
  1.1185 -lemma MOD_LE: "ALL (m::nat) n::nat. n ~= 0 --> <= (MOD m n) m"
  1.1186 +lemma MOD_LE: "(n::nat) ~= (0::nat) ==> (m::nat) mod n <= m"
  1.1187    by (import hollight MOD_LE)
  1.1188  
  1.1189 -lemma DIV_MONO2: "ALL (m::nat) (n::nat) p::nat. p ~= 0 & <= p m --> <= (DIV n m) (DIV n p)"
  1.1190 +lemma DIV_MONO2: "(p::nat) ~= (0::nat) & p <= (m::nat) ==> (n::nat) div m <= n div p"
  1.1191    by (import hollight DIV_MONO2)
  1.1192  
  1.1193 -lemma DIV_LE_EXCLUSION: "ALL (a::nat) (b::nat) (c::nat) d::nat.
  1.1194 -   b ~= 0 & < (b * c) ((a + NUMERAL_BIT1 0) * d) --> <= (DIV c d) (DIV a b)"
  1.1195 +lemma DIV_LE_EXCLUSION: "(b::nat) ~= (0::nat) & b * (c::nat) < ((a::nat) + (1::nat)) * (d::nat)
  1.1196 +==> c div d <= a div b"
  1.1197    by (import hollight DIV_LE_EXCLUSION)
  1.1198  
  1.1199 -lemma DIV_EQ_EXCLUSION: "< ((b::nat) * (c::nat)) (((a::nat) + NUMERAL_BIT1 0) * (d::nat)) &
  1.1200 -< (a * d) ((c + NUMERAL_BIT1 0) * b) -->
  1.1201 -DIV a b = DIV c d"
  1.1202 +lemma DIV_EQ_EXCLUSION: "(b::nat) * (c::nat) < ((a::nat) + (1::nat)) * (d::nat) &
  1.1203 +a * d < (c + (1::nat)) * b
  1.1204 +==> a div b = c div d"
  1.1205    by (import hollight DIV_EQ_EXCLUSION)
  1.1206  
  1.1207 +lemma MULT_DIV_LE: "(p::nat) ~= (0::nat) ==> (m::nat) * ((n::nat) div p) <= m * n div p"
  1.1208 +  by (import hollight MULT_DIV_LE)
  1.1209 +
  1.1210 +lemma DIV_DIV: "(xa::nat) * (xb::nat) ~= (0::nat)
  1.1211 +==> (x::nat) div xa div xb = x div (xa * xb)"
  1.1212 +  by (import hollight DIV_DIV)
  1.1213 +
  1.1214 +lemma DIV_MOD: "(xa::nat) * (xb::nat) ~= (0::nat)
  1.1215 +==> (x::nat) div xa mod xb = x mod (xa * xb) div xa"
  1.1216 +  by (import hollight DIV_MOD)
  1.1217 +
  1.1218 +lemma PRE_ELIM_THM: "P (n - Suc 0) = (ALL m. n = Suc m | m = 0 & n = 0 --> P m)"
  1.1219 +  by (import hollight PRE_ELIM_THM)
  1.1220 +
  1.1221  lemma SUB_ELIM_THM: "(P::nat => bool) ((a::nat) - (b::nat)) =
  1.1222 -(ALL x::nat. (b = a + x --> P 0) & (a = b + x --> P x))"
  1.1223 +(ALL d::nat. a = b + d | a < b & d = (0::nat) --> P d)"
  1.1224    by (import hollight SUB_ELIM_THM)
  1.1225  
  1.1226 -lemma PRE_ELIM_THM: "(P::nat => bool) (Pred (n::nat)) =
  1.1227 -(ALL m::nat. (n = 0 --> P 0) & (n = Suc m --> P m))"
  1.1228 -  by (import hollight PRE_ELIM_THM)
  1.1229 -
  1.1230 -lemma DIVMOD_ELIM_THM: "(P::nat => nat => bool) (DIV (m::nat) (n::nat)) (MOD m n) =
  1.1231 -(n = 0 & P 0 0 |
  1.1232 - n ~= 0 & (ALL (q::nat) r::nat. m = q * n + r & < r n --> P q r))"
  1.1233 +lemma DIVMOD_ELIM_THM: "(P::nat => nat => bool) ((m::nat) div (n::nat)) (m mod n) =
  1.1234 +(ALL (x::nat) xa::nat.
  1.1235 +    n = (0::nat) & x = (0::nat) & xa = m | m = x * n + xa & xa < n -->
  1.1236 +    P x xa)"
  1.1237    by (import hollight DIVMOD_ELIM_THM)
  1.1238  
  1.1239 -definition eqeq :: "'q_9910 => 'q_9909 => ('q_9910 => 'q_9909 => bool) => bool" where 
  1.1240 -  "eqeq ==
  1.1241 -%(u::'q_9910::type) (ua::'q_9909::type)
  1.1242 -   ub::'q_9910::type => 'q_9909::type => bool. ub u ua"
  1.1243 -
  1.1244 -lemma DEF__equal__equal_: "eqeq =
  1.1245 -(%(u::'q_9910::type) (ua::'q_9909::type)
  1.1246 -    ub::'q_9910::type => 'q_9909::type => bool. ub u ua)"
  1.1247 -  by (import hollight DEF__equal__equal_)
  1.1248 -
  1.1249 -definition mod_nat :: "nat => nat => nat => bool" where 
  1.1250 -  "mod_nat ==
  1.1251 -%(u::nat) (ua::nat) ub::nat. EX (q1::nat) q2::nat. ua + u * q1 = ub + u * q2"
  1.1252 -
  1.1253 -lemma DEF_mod_nat: "mod_nat =
  1.1254 -(%(u::nat) (ua::nat) ub::nat.
  1.1255 -    EX (q1::nat) q2::nat. ua + u * q1 = ub + u * q2)"
  1.1256 -  by (import hollight DEF_mod_nat)
  1.1257 -
  1.1258 -definition minimal :: "(nat => bool) => nat" where 
  1.1259 -  "minimal == %u::nat => bool. SOME n::nat. u n & (ALL m::nat. < m n --> ~ u m)"
  1.1260 -
  1.1261 -lemma DEF_minimal: "minimal =
  1.1262 -(%u::nat => bool. SOME n::nat. u n & (ALL m::nat. < m n --> ~ u m))"
  1.1263 +definition
  1.1264 +  minimal :: "(nat => bool) => nat"  where
  1.1265 +  "minimal == %u. SOME n. u n & (ALL m<n. ~ u m)"
  1.1266 +
  1.1267 +lemma DEF_minimal: "minimal = (%u. SOME n. u n & (ALL m<n. ~ u m))"
  1.1268    by (import hollight DEF_minimal)
  1.1269  
  1.1270 -lemma MINIMAL: "ALL P::nat => bool.
  1.1271 -   Ex P = (P (minimal P) & (ALL x::nat. < x (minimal P) --> ~ P x))"
  1.1272 +lemma MINIMAL: "Ex P = (P (minimal P) & (ALL x<minimal P. ~ P x))"
  1.1273    by (import hollight MINIMAL)
  1.1274  
  1.1275 -definition WF :: "('A => 'A => bool) => bool" where 
  1.1276 -  "WF ==
  1.1277 -%u::'A::type => 'A::type => bool.
  1.1278 -   ALL P::'A::type => bool.
  1.1279 -      Ex P --> (EX x::'A::type. P x & (ALL y::'A::type. u y x --> ~ P y))"
  1.1280 -
  1.1281 -lemma DEF_WF: "WF =
  1.1282 -(%u::'A::type => 'A::type => bool.
  1.1283 -    ALL P::'A::type => bool.
  1.1284 -       Ex P --> (EX x::'A::type. P x & (ALL y::'A::type. u y x --> ~ P y)))"
  1.1285 -  by (import hollight DEF_WF)
  1.1286 -
  1.1287 -lemma WF_EQ: "WF (u_353::'A::type => 'A::type => bool) =
  1.1288 -(ALL P::'A::type => bool.
  1.1289 -    Ex P = (EX x::'A::type. P x & (ALL y::'A::type. u_353 y x --> ~ P y)))"
  1.1290 +lemma TRANSITIVE_STEPWISE_LT_EQ: "(!!x y z. R x y & R y z ==> R x z)
  1.1291 +==> (ALL m n. m < n --> R m n) = (ALL n. R n (Suc n))"
  1.1292 +  by (import hollight TRANSITIVE_STEPWISE_LT_EQ)
  1.1293 +
  1.1294 +lemma TRANSITIVE_STEPWISE_LT: "[| (ALL x y z. R x y & R y z --> R x z) & (ALL n. R n (Suc n)); m < n |]
  1.1295 +==> R m n"
  1.1296 +  by (import hollight TRANSITIVE_STEPWISE_LT)
  1.1297 +
  1.1298 +lemma TRANSITIVE_STEPWISE_LE_EQ: "(ALL x. R x x) & (ALL x y z. R x y & R y z --> R x z)
  1.1299 +==> (ALL m n. m <= n --> R m n) = (ALL n. R n (Suc n))"
  1.1300 +  by (import hollight TRANSITIVE_STEPWISE_LE_EQ)
  1.1301 +
  1.1302 +lemma TRANSITIVE_STEPWISE_LE: "[| (ALL x. R x x) &
  1.1303 +   (ALL x y z. R x y & R y z --> R x z) & (ALL n. R n (Suc n));
  1.1304 +   m <= n |]
  1.1305 +==> R m n"
  1.1306 +  by (import hollight TRANSITIVE_STEPWISE_LE)
  1.1307 +
  1.1308 +lemma WF_EQ: "wfP (u_556::'A => 'A => bool) =
  1.1309 +(ALL P::'A => bool.
  1.1310 +    Ex P = (EX x::'A. P x & (ALL y::'A. u_556 y x --> ~ P y)))"
  1.1311    by (import hollight WF_EQ)
  1.1312  
  1.1313 -lemma WF_IND: "WF (u_353::'A::type => 'A::type => bool) =
  1.1314 -(ALL P::'A::type => bool.
  1.1315 -    (ALL x::'A::type. (ALL y::'A::type. u_353 y x --> P y) --> P x) -->
  1.1316 -    All P)"
  1.1317 +lemma WF_IND: "wfP (u_556::'A => 'A => bool) =
  1.1318 +(ALL P::'A => bool.
  1.1319 +    (ALL x::'A. (ALL y::'A. u_556 y x --> P y) --> P x) --> All P)"
  1.1320    by (import hollight WF_IND)
  1.1321  
  1.1322 -lemma WF_DCHAIN: "WF (u_353::'A::type => 'A::type => bool) =
  1.1323 -(~ (EX s::nat => 'A::type. ALL n::nat. u_353 (s (Suc n)) (s n)))"
  1.1324 +lemma WF_DCHAIN: "wfP (u_556::'A => 'A => bool) =
  1.1325 +(~ (EX s::nat => 'A. ALL n::nat. u_556 (s (Suc n)) (s n)))"
  1.1326    by (import hollight WF_DCHAIN)
  1.1327  
  1.1328 -lemma WF_UREC: "WF (u_353::'A::type => 'A::type => bool) -->
  1.1329 -(ALL H::('A::type => 'B::type) => 'A::type => 'B::type.
  1.1330 -    (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1331 -        (ALL z::'A::type. u_353 z x --> f z = g z) --> H f x = H g x) -->
  1.1332 -    (ALL (f::'A::type => 'B::type) g::'A::type => 'B::type.
  1.1333 -        (ALL x::'A::type. f x = H f x) & (ALL x::'A::type. g x = H g x) -->
  1.1334 -        f = g))"
  1.1335 +lemma WF_UREC: "[| wfP (u_556::'A => 'A => bool);
  1.1336 +   !!(f::'A => 'B) (g::'A => 'B) x::'A.
  1.1337 +      (!!z::'A. u_556 z x ==> f z = g z)
  1.1338 +      ==> (H::('A => 'B) => 'A => 'B) f x = H g x;
  1.1339 +   (ALL x::'A. (f::'A => 'B) x = H f x) &
  1.1340 +   (ALL x::'A. (g::'A => 'B) x = H g x) |]
  1.1341 +==> f = g"
  1.1342    by (import hollight WF_UREC)
  1.1343  
  1.1344 -lemma WF_UREC_WF: "(ALL H::('A::type => bool) => 'A::type => bool.
  1.1345 -    (ALL (f::'A::type => bool) (g::'A::type => bool) x::'A::type.
  1.1346 -        (ALL z::'A::type.
  1.1347 -            (u_353::'A::type => 'A::type => bool) z x --> f z = g z) -->
  1.1348 -        H f x = H g x) -->
  1.1349 -    (ALL (f::'A::type => bool) g::'A::type => bool.
  1.1350 -        (ALL x::'A::type. f x = H f x) & (ALL x::'A::type. g x = H g x) -->
  1.1351 -        f = g)) -->
  1.1352 -WF u_353"
  1.1353 +lemma WF_UREC_WF: "(!!(H::('A => bool) => 'A => bool) (f::'A => bool) g::'A => bool.
  1.1354 +    [| !!(f::'A => bool) (g::'A => bool) x::'A.
  1.1355 +          (!!z::'A. (u_556::'A => 'A => bool) z x ==> f z = g z)
  1.1356 +          ==> H f x = H g x;
  1.1357 +       (ALL x::'A. f x = H f x) & (ALL x::'A. g x = H g x) |]
  1.1358 +    ==> f = g)
  1.1359 +==> wfP u_556"
  1.1360    by (import hollight WF_UREC_WF)
  1.1361  
  1.1362 -lemma WF_REC_INVARIANT: "WF (u_353::'A::type => 'A::type => bool) -->
  1.1363 -(ALL (H::('A::type => 'B::type) => 'A::type => 'B::type)
  1.1364 -    S::'A::type => 'B::type => bool.
  1.1365 -    (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1366 -        (ALL z::'A::type. u_353 z x --> f z = g z & S z (f z)) -->
  1.1367 -        H f x = H g x & S x (H f x)) -->
  1.1368 -    (EX f::'A::type => 'B::type. ALL x::'A::type. f x = H f x))"
  1.1369 +lemma WF_REC_INVARIANT: "[| wfP (u_556::'A => 'A => bool);
  1.1370 +   !!(f::'A => 'B) (g::'A => 'B) x::'A.
  1.1371 +      (!!z::'A. u_556 z x ==> f z = g z & (S::'A => 'B => bool) z (f z))
  1.1372 +      ==> (H::('A => 'B) => 'A => 'B) f x = H g x & S x (H f x) |]
  1.1373 +==> EX f::'A => 'B. ALL x::'A. f x = H f x"
  1.1374    by (import hollight WF_REC_INVARIANT)
  1.1375  
  1.1376 -lemma WF_REC: "WF (u_353::'A::type => 'A::type => bool) -->
  1.1377 -(ALL H::('A::type => 'B::type) => 'A::type => 'B::type.
  1.1378 -    (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1379 -        (ALL z::'A::type. u_353 z x --> f z = g z) --> H f x = H g x) -->
  1.1380 -    (EX f::'A::type => 'B::type. ALL x::'A::type. f x = H f x))"
  1.1381 +lemma WF_REC: "[| wfP (u_556::'A => 'A => bool);
  1.1382 +   !!(f::'A => 'B) (g::'A => 'B) x::'A.
  1.1383 +      (!!z::'A. u_556 z x ==> f z = g z)
  1.1384 +      ==> (H::('A => 'B) => 'A => 'B) f x = H g x |]
  1.1385 +==> EX f::'A => 'B. ALL x::'A. f x = H f x"
  1.1386    by (import hollight WF_REC)
  1.1387  
  1.1388 -lemma WF_REC_WF: "(ALL H::('A::type => nat) => 'A::type => nat.
  1.1389 -    (ALL (f::'A::type => nat) (g::'A::type => nat) x::'A::type.
  1.1390 -        (ALL z::'A::type.
  1.1391 -            (u_353::'A::type => 'A::type => bool) z x --> f z = g z) -->
  1.1392 -        H f x = H g x) -->
  1.1393 -    (EX f::'A::type => nat. ALL x::'A::type. f x = H f x)) -->
  1.1394 -WF u_353"
  1.1395 +lemma WF_REC_WF: "(!!H::('A => nat) => 'A => nat.
  1.1396 +    (!!(f::'A => nat) (g::'A => nat) x::'A.
  1.1397 +        (!!z::'A. (u_556::'A => 'A => bool) z x ==> f z = g z)
  1.1398 +        ==> H f x = H g x)
  1.1399 +    ==> EX f::'A => nat. ALL x::'A. f x = H f x)
  1.1400 +==> wfP u_556"
  1.1401    by (import hollight WF_REC_WF)
  1.1402  
  1.1403 -lemma WF_EREC: "WF (u_353::'A::type => 'A::type => bool) -->
  1.1404 -(ALL H::('A::type => 'B::type) => 'A::type => 'B::type.
  1.1405 -    (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1406 -        (ALL z::'A::type. u_353 z x --> f z = g z) --> H f x = H g x) -->
  1.1407 -    (EX! f::'A::type => 'B::type. ALL x::'A::type. f x = H f x))"
  1.1408 +lemma WF_EREC: "[| wfP (u_556::'A => 'A => bool);
  1.1409 +   !!(f::'A => 'B) (g::'A => 'B) x::'A.
  1.1410 +      (!!z::'A. u_556 z x ==> f z = g z)
  1.1411 +      ==> (H::('A => 'B) => 'A => 'B) f x = H g x |]
  1.1412 +==> EX! f::'A => 'B. ALL x::'A. f x = H f x"
  1.1413    by (import hollight WF_EREC)
  1.1414  
  1.1415 -lemma WF_SUBSET: "(ALL (x::'A::type) y::'A::type.
  1.1416 -    (u_353::'A::type => 'A::type => bool) x y -->
  1.1417 -    (u_472::'A::type => 'A::type => bool) x y) &
  1.1418 -WF u_472 -->
  1.1419 -WF u_353"
  1.1420 +lemma WF_SUBSET: "(ALL (x::'A) y::'A.
  1.1421 +    (u_556::'A => 'A => bool) x y --> (u_670::'A => 'A => bool) x y) &
  1.1422 +wfP u_670
  1.1423 +==> wfP u_556"
  1.1424    by (import hollight WF_SUBSET)
  1.1425  
  1.1426 -lemma WF_MEASURE_GEN: "ALL m::'A::type => 'B::type.
  1.1427 -   WF (u_353::'B::type => 'B::type => bool) -->
  1.1428 -   WF (%(x::'A::type) x'::'A::type. u_353 (m x) (m x'))"
  1.1429 +lemma WF_MEASURE_GEN: "wfP (u_556::'B => 'B => bool)
  1.1430 +==> wfP (%(x::'A) x'::'A. u_556 ((m::'A => 'B) x) (m x'))"
  1.1431    by (import hollight WF_MEASURE_GEN)
  1.1432  
  1.1433 -lemma WF_LEX_DEPENDENT: "ALL (R::'A::type => 'A::type => bool)
  1.1434 -   S::'A::type => 'B::type => 'B::type => bool.
  1.1435 -   WF R & (ALL x::'A::type. WF (S x)) -->
  1.1436 -   WF (GABS
  1.1437 -        (%f::'A::type * 'B::type => 'A::type * 'B::type => bool.
  1.1438 -            ALL (r1::'A::type) s1::'B::type.
  1.1439 -               GEQ (f (r1, s1))
  1.1440 -                (GABS
  1.1441 -                  (%f::'A::type * 'B::type => bool.
  1.1442 -                      ALL (r2::'A::type) s2::'B::type.
  1.1443 -                         GEQ (f (r2, s2))
  1.1444 -                          (R r1 r2 | r1 = r2 & S r1 s1 s2)))))"
  1.1445 +lemma WF_LEX_DEPENDENT: "wfP (R::'A => 'A => bool) & (ALL x::'A. wfP ((S::'A => 'B => 'B => bool) x))
  1.1446 +==> wfP (SOME f::'A * 'B => 'A * 'B => bool.
  1.1447 +            ALL (r1::'A) s1::'B.
  1.1448 +               f (r1, s1) =
  1.1449 +               (SOME f::'A * 'B => bool.
  1.1450 +                   ALL (r2::'A) s2::'B.
  1.1451 +                      f (r2, s2) = (R r1 r2 | r1 = r2 & S r1 s1 s2)))"
  1.1452    by (import hollight WF_LEX_DEPENDENT)
  1.1453  
  1.1454 -lemma WF_LEX: "ALL (x::'A::type => 'A::type => bool) xa::'B::type => 'B::type => bool.
  1.1455 -   WF x & WF xa -->
  1.1456 -   WF (GABS
  1.1457 -        (%f::'A::type * 'B::type => 'A::type * 'B::type => bool.
  1.1458 -            ALL (r1::'A::type) s1::'B::type.
  1.1459 -               GEQ (f (r1, s1))
  1.1460 -                (GABS
  1.1461 -                  (%f::'A::type * 'B::type => bool.
  1.1462 -                      ALL (r2::'A::type) s2::'B::type.
  1.1463 -                         GEQ (f (r2, s2)) (x r1 r2 | r1 = r2 & xa s1 s2)))))"
  1.1464 +lemma WF_LEX: "wfP (x::'A => 'A => bool) & wfP (xa::'B => 'B => bool)
  1.1465 +==> wfP (SOME f::'A * 'B => 'A * 'B => bool.
  1.1466 +            ALL (r1::'A) s1::'B.
  1.1467 +               f (r1, s1) =
  1.1468 +               (SOME f::'A * 'B => bool.
  1.1469 +                   ALL (r2::'A) s2::'B.
  1.1470 +                      f (r2, s2) = (x r1 r2 | r1 = r2 & xa s1 s2)))"
  1.1471    by (import hollight WF_LEX)
  1.1472  
  1.1473 -lemma WF_POINTWISE: "WF (u_353::'A::type => 'A::type => bool) &
  1.1474 -WF (u_472::'B::type => 'B::type => bool) -->
  1.1475 -WF (GABS
  1.1476 -     (%f::'A::type * 'B::type => 'A::type * 'B::type => bool.
  1.1477 -         ALL (x1::'A::type) y1::'B::type.
  1.1478 -            GEQ (f (x1, y1))
  1.1479 -             (GABS
  1.1480 -               (%f::'A::type * 'B::type => bool.
  1.1481 -                   ALL (x2::'A::type) y2::'B::type.
  1.1482 -                      GEQ (f (x2, y2)) (u_353 x1 x2 & u_472 y1 y2)))))"
  1.1483 +lemma WF_POINTWISE: "wfP (u_556::'A => 'A => bool) & wfP (u_670::'B => 'B => bool)
  1.1484 +==> wfP (SOME f::'A * 'B => 'A * 'B => bool.
  1.1485 +            ALL (x1::'A) y1::'B.
  1.1486 +               f (x1, y1) =
  1.1487 +               (SOME f::'A * 'B => bool.
  1.1488 +                   ALL (x2::'A) y2::'B.
  1.1489 +                      f (x2, y2) = (u_556 x1 x2 & u_670 y1 y2)))"
  1.1490    by (import hollight WF_POINTWISE)
  1.1491  
  1.1492 -lemma WF_num: "WF <"
  1.1493 +lemma WF_num: "(wfP::(nat => nat => bool) => bool) (op <::nat => nat => bool)"
  1.1494    by (import hollight WF_num)
  1.1495  
  1.1496 -lemma WF_REC_num: "ALL H::(nat => 'A::type) => nat => 'A::type.
  1.1497 -   (ALL (f::nat => 'A::type) (g::nat => 'A::type) x::nat.
  1.1498 -       (ALL z::nat. < z x --> f z = g z) --> H f x = H g x) -->
  1.1499 -   (EX f::nat => 'A::type. ALL x::nat. f x = H f x)"
  1.1500 +lemma WF_REC_num: "(!!(f::nat => 'A) (g::nat => 'A) x::nat.
  1.1501 +    (!!z::nat. z < x ==> f z = g z)
  1.1502 +    ==> (H::(nat => 'A) => nat => 'A) f x = H g x)
  1.1503 +==> EX f::nat => 'A. ALL x::nat. f x = H f x"
  1.1504    by (import hollight WF_REC_num)
  1.1505  
  1.1506 -consts
  1.1507 -  measure :: "('q_11107 => nat) => 'q_11107 => 'q_11107 => bool" 
  1.1508 -
  1.1509 -defs
  1.1510 -  measure_def: "hollight.measure ==
  1.1511 -%(u::'q_11107::type => nat) (x::'q_11107::type) y::'q_11107::type.
  1.1512 -   < (u x) (u y)"
  1.1513 -
  1.1514 -lemma DEF_measure: "hollight.measure =
  1.1515 -(%(u::'q_11107::type => nat) (x::'q_11107::type) y::'q_11107::type.
  1.1516 -    < (u x) (u y))"
  1.1517 -  by (import hollight DEF_measure)
  1.1518 -
  1.1519 -lemma WF_MEASURE: "ALL m::'A::type => nat. WF (hollight.measure m)"
  1.1520 +lemma WF_MEASURE: "wfP (%(a::'A) b::'A. measure (m::'A => nat) (a, b))"
  1.1521    by (import hollight WF_MEASURE)
  1.1522  
  1.1523 -lemma MEASURE_LE: "(ALL x::'q_11137::type.
  1.1524 -    hollight.measure (m::'q_11137::type => nat) x (a::'q_11137::type) -->
  1.1525 -    hollight.measure m x (b::'q_11137::type)) =
  1.1526 -<= (m a) (m b)"
  1.1527 +lemma MEASURE_LE: "(ALL x::'q_12099.
  1.1528 +    measure (m::'q_12099 => nat) (x, a::'q_12099) -->
  1.1529 +    measure m (x, b::'q_12099)) =
  1.1530 +(m a <= m b)"
  1.1531    by (import hollight MEASURE_LE)
  1.1532  
  1.1533 -lemma WF_REFL: "ALL x::'A::type. WF (u_353::'A::type => 'A::type => bool) --> ~ u_353 x x"
  1.1534 +lemma WF_REFL: "wfP (u_556::'A => 'A => bool) ==> ~ u_556 (x::'A) x"
  1.1535    by (import hollight WF_REFL)
  1.1536  
  1.1537 -lemma WF_FALSE: "WF (%(x::'A::type) y::'A::type. False)"
  1.1538 -  by (import hollight WF_FALSE)
  1.1539 -
  1.1540 -lemma WF_REC_TAIL: "ALL (P::'A::type => bool) (g::'A::type => 'A::type) h::'A::type => 'B::type.
  1.1541 -   EX f::'A::type => 'B::type.
  1.1542 -      ALL x::'A::type. f x = COND (P x) (f (g x)) (h x)"
  1.1543 +lemma WF_REC_TAIL: "EX f::'A => 'B.
  1.1544 +   ALL x::'A.
  1.1545 +      f x =
  1.1546 +      (if (P::'A => bool) x then f ((g::'A => 'A) x) else (h::'A => 'B) x)"
  1.1547    by (import hollight WF_REC_TAIL)
  1.1548  
  1.1549 -lemma WF_REC_TAIL_GENERAL: "ALL (P::('A::type => 'B::type) => 'A::type => bool)
  1.1550 -   (G::('A::type => 'B::type) => 'A::type => 'A::type)
  1.1551 -   H::('A::type => 'B::type) => 'A::type => 'B::type.
  1.1552 -   WF (u_353::'A::type => 'A::type => bool) &
  1.1553 -   (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1554 -       (ALL z::'A::type. u_353 z x --> f z = g z) -->
  1.1555 -       P f x = P g x & G f x = G g x & H f x = H g x) &
  1.1556 -   (ALL (f::'A::type => 'B::type) (g::'A::type => 'B::type) x::'A::type.
  1.1557 -       (ALL z::'A::type. u_353 z x --> f z = g z) --> H f x = H g x) &
  1.1558 -   (ALL (f::'A::type => 'B::type) (x::'A::type) y::'A::type.
  1.1559 -       P f x & u_353 y (G f x) --> u_353 y x) -->
  1.1560 -   (EX f::'A::type => 'B::type.
  1.1561 -       ALL x::'A::type. f x = COND (P f x) (f (G f x)) (H f x))"
  1.1562 +lemma WF_REC_TAIL_GENERAL: "wfP (u_556::'A => 'A => bool) &
  1.1563 +(ALL (f::'A => 'B) (g::'A => 'B) x::'A.
  1.1564 +    (ALL z::'A. u_556 z x --> f z = g z) -->
  1.1565 +    (P::('A => 'B) => 'A => bool) f x = P g x &
  1.1566 +    (G::('A => 'B) => 'A => 'A) f x = G g x &
  1.1567 +    (H::('A => 'B) => 'A => 'B) f x = H g x) &
  1.1568 +(ALL (f::'A => 'B) (g::'A => 'B) x::'A.
  1.1569 +    (ALL z::'A. u_556 z x --> f z = g z) --> H f x = H g x) &
  1.1570 +(ALL (f::'A => 'B) (x::'A) y::'A. P f x & u_556 y (G f x) --> u_556 y x)
  1.1571 +==> EX f::'A => 'B. ALL x::'A. f x = (if P f x then f (G f x) else H f x)"
  1.1572    by (import hollight WF_REC_TAIL_GENERAL)
  1.1573  
  1.1574 -lemma ARITH_ZERO: "(op &::bool => bool => bool) ((op =::nat => nat => bool) (0::nat) (0::nat))
  1.1575 - ((op =::nat => nat => bool) ((NUMERAL_BIT0::nat => nat) (0::nat)) (0::nat))"
  1.1576 +lemma ARITH_ZERO: "(0::nat) = (0::nat) & (0::nat) = (0::nat)"
  1.1577    by (import hollight ARITH_ZERO)
  1.1578  
  1.1579 -lemma ARITH_SUC: "(ALL x::nat. Suc x = Suc x) &
  1.1580 -Suc 0 = NUMERAL_BIT1 0 &
  1.1581 -(ALL x::nat. Suc (NUMERAL_BIT0 x) = NUMERAL_BIT1 x) &
  1.1582 -(ALL x::nat. Suc (NUMERAL_BIT1 x) = NUMERAL_BIT0 (Suc x))"
  1.1583 +lemma ARITH_SUC: "(ALL x. Suc x = Suc x) &
  1.1584 +Suc 0 = 1 &
  1.1585 +(ALL x. Suc (2 * x) = 2 * x + 1) & (ALL x. Suc (2 * x + 1) = 2 * Suc x)"
  1.1586    by (import hollight ARITH_SUC)
  1.1587  
  1.1588 -lemma ARITH_PRE: "(ALL x::nat. Pred x = Pred x) &
  1.1589 -Pred 0 = 0 &
  1.1590 -(ALL x::nat.
  1.1591 -    Pred (NUMERAL_BIT0 x) = COND (x = 0) 0 (NUMERAL_BIT1 (Pred x))) &
  1.1592 -(ALL x::nat. Pred (NUMERAL_BIT1 x) = NUMERAL_BIT0 x)"
  1.1593 +lemma ARITH_PRE: "(ALL x. x - Suc 0 = x - Suc 0) &
  1.1594 +0 - Suc 0 = 0 &
  1.1595 +(ALL x. 2 * x - Suc 0 = (if x = 0 then 0 else 2 * (x - Suc 0) + 1)) &
  1.1596 +(ALL x. 2 * x + 1 - Suc 0 = 2 * x)"
  1.1597    by (import hollight ARITH_PRE)
  1.1598  
  1.1599 -lemma ARITH_ADD: "(op &::bool => bool => bool)
  1.1600 - ((All::(nat => bool) => bool)
  1.1601 -   (%x::nat.
  1.1602 -       (All::(nat => bool) => bool)
  1.1603 -        (%xa::nat.
  1.1604 -            (op =::nat => nat => bool) ((plus::nat => nat => nat) x xa)
  1.1605 -             ((plus::nat => nat => nat) x xa))))
  1.1606 - ((op &::bool => bool => bool)
  1.1607 -   ((op =::nat => nat => bool) ((plus::nat => nat => nat) (0::nat) (0::nat))
  1.1608 -     (0::nat))
  1.1609 -   ((op &::bool => bool => bool)
  1.1610 -     ((All::(nat => bool) => bool)
  1.1611 -       (%x::nat.
  1.1612 -           (op =::nat => nat => bool)
  1.1613 -            ((plus::nat => nat => nat) (0::nat)
  1.1614 -              ((NUMERAL_BIT0::nat => nat) x))
  1.1615 -            ((NUMERAL_BIT0::nat => nat) x)))
  1.1616 -     ((op &::bool => bool => bool)
  1.1617 -       ((All::(nat => bool) => bool)
  1.1618 -         (%x::nat.
  1.1619 -             (op =::nat => nat => bool)
  1.1620 -              ((plus::nat => nat => nat) (0::nat)
  1.1621 -                ((NUMERAL_BIT1::nat => nat) x))
  1.1622 -              ((NUMERAL_BIT1::nat => nat) x)))
  1.1623 -       ((op &::bool => bool => bool)
  1.1624 -         ((All::(nat => bool) => bool)
  1.1625 -           (%x::nat.
  1.1626 -               (op =::nat => nat => bool)
  1.1627 -                ((plus::nat => nat => nat) ((NUMERAL_BIT0::nat => nat) x)
  1.1628 -                  (0::nat))
  1.1629 -                ((NUMERAL_BIT0::nat => nat) x)))
  1.1630 -         ((op &::bool => bool => bool)
  1.1631 -           ((All::(nat => bool) => bool)
  1.1632 -             (%x::nat.
  1.1633 -                 (op =::nat => nat => bool)
  1.1634 -                  ((plus::nat => nat => nat) ((NUMERAL_BIT1::nat => nat) x)
  1.1635 -                    (0::nat))
  1.1636 -                  ((NUMERAL_BIT1::nat => nat) x)))
  1.1637 -           ((op &::bool => bool => bool)
  1.1638 -             ((All::(nat => bool) => bool)
  1.1639 -               (%x::nat.
  1.1640 -                   (All::(nat => bool) => bool)
  1.1641 -                    (%xa::nat.
  1.1642 -                        (op =::nat => nat => bool)
  1.1643 -                         ((plus::nat => nat => nat)
  1.1644 -                           ((NUMERAL_BIT0::nat => nat) x)
  1.1645 -                           ((NUMERAL_BIT0::nat => nat) xa))
  1.1646 -                         ((NUMERAL_BIT0::nat => nat)
  1.1647 -                           ((plus::nat => nat => nat) x xa)))))
  1.1648 -             ((op &::bool => bool => bool)
  1.1649 -               ((All::(nat => bool) => bool)
  1.1650 -                 (%x::nat.
  1.1651 -                     (All::(nat => bool) => bool)
  1.1652 -                      (%xa::nat.
  1.1653 -                          (op =::nat => nat => bool)
  1.1654 -                           ((plus::nat => nat => nat)
  1.1655 -                             ((NUMERAL_BIT0::nat => nat) x)
  1.1656 -                             ((NUMERAL_BIT1::nat => nat) xa))
  1.1657 -                           ((NUMERAL_BIT1::nat => nat)
  1.1658 -                             ((plus::nat => nat => nat) x xa)))))
  1.1659 -               ((op &::bool => bool => bool)
  1.1660 -                 ((All::(nat => bool) => bool)
  1.1661 -                   (%x::nat.
  1.1662 -                       (All::(nat => bool) => bool)
  1.1663 -                        (%xa::nat.
  1.1664 -                            (op =::nat => nat => bool)
  1.1665 -                             ((plus::nat => nat => nat)
  1.1666 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1667 -                               ((NUMERAL_BIT0::nat => nat) xa))
  1.1668 -                             ((NUMERAL_BIT1::nat => nat)
  1.1669 -                               ((plus::nat => nat => nat) x xa)))))
  1.1670 -                 ((All::(nat => bool) => bool)
  1.1671 -                   (%x::nat.
  1.1672 -                       (All::(nat => bool) => bool)
  1.1673 -                        (%xa::nat.
  1.1674 -                            (op =::nat => nat => bool)
  1.1675 -                             ((plus::nat => nat => nat)
  1.1676 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1677 -                               ((NUMERAL_BIT1::nat => nat) xa))
  1.1678 -                             ((NUMERAL_BIT0::nat => nat)
  1.1679 -                               ((Suc::nat => nat)
  1.1680 -                                 ((plus::nat => nat => nat) x
  1.1681 -                                   xa))))))))))))))"
  1.1682 +lemma ARITH_ADD: "(ALL (x::nat) xa::nat. x + xa = x + xa) &
  1.1683 +(0::nat) + (0::nat) = (0::nat) &
  1.1684 +(ALL x::nat. (0::nat) + (2::nat) * x = (2::nat) * x) &
  1.1685 +(ALL x::nat.
  1.1686 +    (0::nat) + ((2::nat) * x + (1::nat)) = (2::nat) * x + (1::nat)) &
  1.1687 +(ALL x::nat. (2::nat) * x + (0::nat) = (2::nat) * x) &
  1.1688 +(ALL x::nat. (2::nat) * x + (1::nat) + (0::nat) = (2::nat) * x + (1::nat)) &
  1.1689 +(ALL (x::nat) xa::nat. (2::nat) * x + (2::nat) * xa = (2::nat) * (x + xa)) &
  1.1690 +(ALL (x::nat) xa::nat.
  1.1691 +    (2::nat) * x + ((2::nat) * xa + (1::nat)) =
  1.1692 +    (2::nat) * (x + xa) + (1::nat)) &
  1.1693 +(ALL (x::nat) xa::nat.
  1.1694 +    (2::nat) * x + (1::nat) + (2::nat) * xa =
  1.1695 +    (2::nat) * (x + xa) + (1::nat)) &
  1.1696 +(ALL (x::nat) xa::nat.
  1.1697 +    (2::nat) * x + (1::nat) + ((2::nat) * xa + (1::nat)) =
  1.1698 +    (2::nat) * Suc (x + xa))"
  1.1699    by (import hollight ARITH_ADD)
  1.1700  
  1.1701 -lemma ARITH_MULT: "(op &::bool => bool => bool)
  1.1702 - ((All::(nat => bool) => bool)
  1.1703 -   (%x::nat.
  1.1704 -       (All::(nat => bool) => bool)
  1.1705 -        (%xa::nat.
  1.1706 -            (op =::nat => nat => bool) ((op *::nat => nat => nat) x xa)
  1.1707 -             ((op *::nat => nat => nat) x xa))))
  1.1708 - ((op &::bool => bool => bool)
  1.1709 -   ((op =::nat => nat => bool) ((op *::nat => nat => nat) (0::nat) (0::nat))
  1.1710 -     (0::nat))
  1.1711 -   ((op &::bool => bool => bool)
  1.1712 -     ((All::(nat => bool) => bool)
  1.1713 -       (%x::nat.
  1.1714 -           (op =::nat => nat => bool)
  1.1715 -            ((op *::nat => nat => nat) (0::nat)
  1.1716 -              ((NUMERAL_BIT0::nat => nat) x))
  1.1717 -            (0::nat)))
  1.1718 -     ((op &::bool => bool => bool)
  1.1719 -       ((All::(nat => bool) => bool)
  1.1720 -         (%x::nat.
  1.1721 -             (op =::nat => nat => bool)
  1.1722 -              ((op *::nat => nat => nat) (0::nat)
  1.1723 -                ((NUMERAL_BIT1::nat => nat) x))
  1.1724 -              (0::nat)))
  1.1725 -       ((op &::bool => bool => bool)
  1.1726 -         ((All::(nat => bool) => bool)
  1.1727 -           (%x::nat.
  1.1728 -               (op =::nat => nat => bool)
  1.1729 -                ((op *::nat => nat => nat) ((NUMERAL_BIT0::nat => nat) x)
  1.1730 -                  (0::nat))
  1.1731 -                (0::nat)))
  1.1732 -         ((op &::bool => bool => bool)
  1.1733 -           ((All::(nat => bool) => bool)
  1.1734 -             (%x::nat.
  1.1735 -                 (op =::nat => nat => bool)
  1.1736 -                  ((op *::nat => nat => nat) ((NUMERAL_BIT1::nat => nat) x)
  1.1737 -                    (0::nat))
  1.1738 -                  (0::nat)))
  1.1739 -           ((op &::bool => bool => bool)
  1.1740 -             ((All::(nat => bool) => bool)
  1.1741 -               (%x::nat.
  1.1742 -                   (All::(nat => bool) => bool)
  1.1743 -                    (%xa::nat.
  1.1744 -                        (op =::nat => nat => bool)
  1.1745 -                         ((op *::nat => nat => nat)
  1.1746 -                           ((NUMERAL_BIT0::nat => nat) x)
  1.1747 -                           ((NUMERAL_BIT0::nat => nat) xa))
  1.1748 -                         ((NUMERAL_BIT0::nat => nat)
  1.1749 -                           ((NUMERAL_BIT0::nat => nat)
  1.1750 -                             ((op *::nat => nat => nat) x xa))))))
  1.1751 -             ((op &::bool => bool => bool)
  1.1752 -               ((All::(nat => bool) => bool)
  1.1753 -                 (%x::nat.
  1.1754 -                     (All::(nat => bool) => bool)
  1.1755 -                      (%xa::nat.
  1.1756 -                          (op =::nat => nat => bool)
  1.1757 -                           ((op *::nat => nat => nat)
  1.1758 -                             ((NUMERAL_BIT0::nat => nat) x)
  1.1759 -                             ((NUMERAL_BIT1::nat => nat) xa))
  1.1760 -                           ((plus::nat => nat => nat)
  1.1761 -                             ((NUMERAL_BIT0::nat => nat) x)
  1.1762 -                             ((NUMERAL_BIT0::nat => nat)
  1.1763 -                               ((NUMERAL_BIT0::nat => nat)
  1.1764 -                                 ((op *::nat => nat => nat) x xa)))))))
  1.1765 -               ((op &::bool => bool => bool)
  1.1766 -                 ((All::(nat => bool) => bool)
  1.1767 -                   (%x::nat.
  1.1768 -                       (All::(nat => bool) => bool)
  1.1769 -                        (%xa::nat.
  1.1770 -                            (op =::nat => nat => bool)
  1.1771 -                             ((op *::nat => nat => nat)
  1.1772 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1773 -                               ((NUMERAL_BIT0::nat => nat) xa))
  1.1774 -                             ((plus::nat => nat => nat)
  1.1775 -                               ((NUMERAL_BIT0::nat => nat) xa)
  1.1776 -                               ((NUMERAL_BIT0::nat => nat)
  1.1777 -                                 ((NUMERAL_BIT0::nat => nat)
  1.1778 -                                   ((op *::nat => nat => nat) x xa)))))))
  1.1779 -                 ((All::(nat => bool) => bool)
  1.1780 -                   (%x::nat.
  1.1781 -                       (All::(nat => bool) => bool)
  1.1782 -                        (%xa::nat.
  1.1783 -                            (op =::nat => nat => bool)
  1.1784 -                             ((op *::nat => nat => nat)
  1.1785 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1786 -                               ((NUMERAL_BIT1::nat => nat) xa))
  1.1787 -                             ((plus::nat => nat => nat)
  1.1788 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1789 -                               ((plus::nat => nat => nat)
  1.1790 -                                 ((NUMERAL_BIT0::nat => nat) xa)
  1.1791 -                                 ((NUMERAL_BIT0::nat => nat)
  1.1792 -                                   ((NUMERAL_BIT0::nat => nat)
  1.1793 -                                     ((op *::nat => nat => nat) x
  1.1794 - xa))))))))))))))))"
  1.1795 +lemma ARITH_MULT: "(ALL (x::nat) xa::nat. x * xa = x * xa) &
  1.1796 +(0::nat) * (0::nat) = (0::nat) &
  1.1797 +(ALL x::nat. (0::nat) * ((2::nat) * x) = (0::nat)) &
  1.1798 +(ALL x::nat. (0::nat) * ((2::nat) * x + (1::nat)) = (0::nat)) &
  1.1799 +(ALL x::nat. (2::nat) * x * (0::nat) = (0::nat)) &
  1.1800 +(ALL x::nat. ((2::nat) * x + (1::nat)) * (0::nat) = (0::nat)) &
  1.1801 +(ALL (x::nat) xa::nat.
  1.1802 +    (2::nat) * x * ((2::nat) * xa) = (2::nat) * ((2::nat) * (x * xa))) &
  1.1803 +(ALL (x::nat) xa::nat.
  1.1804 +    (2::nat) * x * ((2::nat) * xa + (1::nat)) =
  1.1805 +    (2::nat) * x + (2::nat) * ((2::nat) * (x * xa))) &
  1.1806 +(ALL (x::nat) xa::nat.
  1.1807 +    ((2::nat) * x + (1::nat)) * ((2::nat) * xa) =
  1.1808 +    (2::nat) * xa + (2::nat) * ((2::nat) * (x * xa))) &
  1.1809 +(ALL (x::nat) xa::nat.
  1.1810 +    ((2::nat) * x + (1::nat)) * ((2::nat) * xa + (1::nat)) =
  1.1811 +    (2::nat) * x + (1::nat) +
  1.1812 +    ((2::nat) * xa + (2::nat) * ((2::nat) * (x * xa))))"
  1.1813    by (import hollight ARITH_MULT)
  1.1814  
  1.1815 -lemma ARITH_EXP: "(ALL (x::nat) xa::nat. EXP x xa = EXP x xa) &
  1.1816 -EXP 0 0 = NUMERAL_BIT1 0 &
  1.1817 -(ALL m::nat. EXP (NUMERAL_BIT0 m) 0 = NUMERAL_BIT1 0) &
  1.1818 -(ALL m::nat. EXP (NUMERAL_BIT1 m) 0 = NUMERAL_BIT1 0) &
  1.1819 -(ALL n::nat. EXP 0 (NUMERAL_BIT0 n) = EXP 0 n * EXP 0 n) &
  1.1820 +lemma ARITH_EXP: "(ALL (x::nat) xa::nat. x ^ xa = x ^ xa) &
  1.1821 +(0::nat) ^ (0::nat) = (1::nat) &
  1.1822 +(ALL m::nat. ((2::nat) * m) ^ (0::nat) = (1::nat)) &
  1.1823 +(ALL m::nat. ((2::nat) * m + (1::nat)) ^ (0::nat) = (1::nat)) &
  1.1824 +(ALL n::nat. (0::nat) ^ ((2::nat) * n) = (0::nat) ^ n * (0::nat) ^ n) &
  1.1825  (ALL (m::nat) n::nat.
  1.1826 -    EXP (NUMERAL_BIT0 m) (NUMERAL_BIT0 n) =
  1.1827 -    EXP (NUMERAL_BIT0 m) n * EXP (NUMERAL_BIT0 m) n) &
  1.1828 +    ((2::nat) * m) ^ ((2::nat) * n) =
  1.1829 +    ((2::nat) * m) ^ n * ((2::nat) * m) ^ n) &
  1.1830 +(ALL (m::nat) n::nat.
  1.1831 +    ((2::nat) * m + (1::nat)) ^ ((2::nat) * n) =
  1.1832 +    ((2::nat) * m + (1::nat)) ^ n * ((2::nat) * m + (1::nat)) ^ n) &
  1.1833 +(ALL n::nat. (0::nat) ^ ((2::nat) * n + (1::nat)) = (0::nat)) &
  1.1834  (ALL (m::nat) n::nat.
  1.1835 -    EXP (NUMERAL_BIT1 m) (NUMERAL_BIT0 n) =
  1.1836 -    EXP (NUMERAL_BIT1 m) n * EXP (NUMERAL_BIT1 m) n) &
  1.1837 -(ALL n::nat. EXP 0 (NUMERAL_BIT1 n) = 0) &
  1.1838 -(ALL (m::nat) n::nat.
  1.1839 -    EXP (NUMERAL_BIT0 m) (NUMERAL_BIT1 n) =
  1.1840 -    NUMERAL_BIT0 m * (EXP (NUMERAL_BIT0 m) n * EXP (NUMERAL_BIT0 m) n)) &
  1.1841 +    ((2::nat) * m) ^ ((2::nat) * n + (1::nat)) =
  1.1842 +    (2::nat) * m * (((2::nat) * m) ^ n * ((2::nat) * m) ^ n)) &
  1.1843  (ALL (m::nat) n::nat.
  1.1844 -    EXP (NUMERAL_BIT1 m) (NUMERAL_BIT1 n) =
  1.1845 -    NUMERAL_BIT1 m * (EXP (NUMERAL_BIT1 m) n * EXP (NUMERAL_BIT1 m) n))"
  1.1846 +    ((2::nat) * m + (1::nat)) ^ ((2::nat) * n + (1::nat)) =
  1.1847 +    ((2::nat) * m + (1::nat)) *
  1.1848 +    (((2::nat) * m + (1::nat)) ^ n * ((2::nat) * m + (1::nat)) ^ n))"
  1.1849    by (import hollight ARITH_EXP)
  1.1850  
  1.1851 -lemma ARITH_EVEN: "(ALL x::nat. EVEN x = EVEN x) &
  1.1852 -EVEN 0 = True &
  1.1853 -(ALL x::nat. EVEN (NUMERAL_BIT0 x) = True) &
  1.1854 -(ALL x::nat. EVEN (NUMERAL_BIT1 x) = False)"
  1.1855 +lemma ARITH_EVEN: "(ALL x::nat. even x = even x) &
  1.1856 +even (0::nat) = True &
  1.1857 +(ALL x::nat. even ((2::nat) * x) = True) &
  1.1858 +(ALL x::nat. even ((2::nat) * x + (1::nat)) = False)"
  1.1859    by (import hollight ARITH_EVEN)
  1.1860  
  1.1861 -lemma ARITH_ODD: "(ALL x::nat. ODD x = ODD x) &
  1.1862 -ODD 0 = False &
  1.1863 -(ALL x::nat. ODD (NUMERAL_BIT0 x) = False) &
  1.1864 -(ALL x::nat. ODD (NUMERAL_BIT1 x) = True)"
  1.1865 +lemma ARITH_ODD: "(ALL x::nat. odd x = odd x) &
  1.1866 +odd (0::nat) = False &
  1.1867 +(ALL x::nat. odd ((2::nat) * x) = False) &
  1.1868 +(ALL x::nat. odd ((2::nat) * x + (1::nat)) = True)"
  1.1869    by (import hollight ARITH_ODD)
  1.1870  
  1.1871 -lemma ARITH_LE: "(ALL (x::nat) xa::nat. <= x xa = <= x xa) &
  1.1872 -<= 0 0 = True &
  1.1873 -(ALL x::nat. <= (NUMERAL_BIT0 x) 0 = (x = 0)) &
  1.1874 -(ALL x::nat. <= (NUMERAL_BIT1 x) 0 = False) &
  1.1875 -(ALL x::nat. <= 0 (NUMERAL_BIT0 x) = True) &
  1.1876 -(ALL x::nat. <= 0 (NUMERAL_BIT1 x) = True) &
  1.1877 -(ALL (x::nat) xa::nat. <= (NUMERAL_BIT0 x) (NUMERAL_BIT0 xa) = <= x xa) &
  1.1878 -(ALL (x::nat) xa::nat. <= (NUMERAL_BIT0 x) (NUMERAL_BIT1 xa) = <= x xa) &
  1.1879 -(ALL (x::nat) xa::nat. <= (NUMERAL_BIT1 x) (NUMERAL_BIT0 xa) = < x xa) &
  1.1880 -(ALL (x::nat) xa::nat. <= (NUMERAL_BIT1 x) (NUMERAL_BIT1 xa) = <= x xa)"
  1.1881 +lemma ARITH_LE: "(ALL (x::nat) xa::nat. (x <= xa) = (x <= xa)) &
  1.1882 +((0::nat) <= (0::nat)) = True &
  1.1883 +(ALL x::nat. ((2::nat) * x <= (0::nat)) = (x <= (0::nat))) &
  1.1884 +(ALL x::nat. ((2::nat) * x + (1::nat) <= (0::nat)) = False) &
  1.1885 +(ALL x::nat. ((0::nat) <= (2::nat) * x) = True) &
  1.1886 +(ALL x::nat. ((0::nat) <= (2::nat) * x + (1::nat)) = True) &
  1.1887 +(ALL (x::nat) xa::nat. ((2::nat) * x <= (2::nat) * xa) = (x <= xa)) &
  1.1888 +(ALL (x::nat) xa::nat.
  1.1889 +    ((2::nat) * x <= (2::nat) * xa + (1::nat)) = (x <= xa)) &
  1.1890 +(ALL (x::nat) xa::nat.
  1.1891 +    ((2::nat) * x + (1::nat) <= (2::nat) * xa) = (x < xa)) &
  1.1892 +(ALL (x::nat) xa::nat.
  1.1893 +    ((2::nat) * x + (1::nat) <= (2::nat) * xa + (1::nat)) = (x <= xa))"
  1.1894    by (import hollight ARITH_LE)
  1.1895  
  1.1896 -lemma ARITH_LT: "(ALL (x::nat) xa::nat. < x xa = < x xa) &
  1.1897 -< 0 0 = False &
  1.1898 -(ALL x::nat. < (NUMERAL_BIT0 x) 0 = False) &
  1.1899 -(ALL x::nat. < (NUMERAL_BIT1 x) 0 = False) &
  1.1900 -(ALL x::nat. < 0 (NUMERAL_BIT0 x) = < 0 x) &
  1.1901 -(ALL x::nat. < 0 (NUMERAL_BIT1 x) = True) &
  1.1902 -(ALL (x::nat) xa::nat. < (NUMERAL_BIT0 x) (NUMERAL_BIT0 xa) = < x xa) &
  1.1903 -(ALL (x::nat) xa::nat. < (NUMERAL_BIT0 x) (NUMERAL_BIT1 xa) = <= x xa) &
  1.1904 -(ALL (x::nat) xa::nat. < (NUMERAL_BIT1 x) (NUMERAL_BIT0 xa) = < x xa) &
  1.1905 -(ALL (x::nat) xa::nat. < (NUMERAL_BIT1 x) (NUMERAL_BIT1 xa) = < x xa)"
  1.1906 +lemma ARITH_LT: "(ALL (x::nat) xa::nat. (x < xa) = (x < xa)) &
  1.1907 +((0::nat) < (0::nat)) = False &
  1.1908 +(ALL x::nat. ((2::nat) * x < (0::nat)) = False) &
  1.1909 +(ALL x::nat. ((2::nat) * x + (1::nat) < (0::nat)) = False) &
  1.1910 +(ALL x::nat. ((0::nat) < (2::nat) * x) = ((0::nat) < x)) &
  1.1911 +(ALL x::nat. ((0::nat) < (2::nat) * x + (1::nat)) = True) &
  1.1912 +(ALL (x::nat) xa::nat. ((2::nat) * x < (2::nat) * xa) = (x < xa)) &
  1.1913 +(ALL (x::nat) xa::nat.
  1.1914 +    ((2::nat) * x < (2::nat) * xa + (1::nat)) = (x <= xa)) &
  1.1915 +(ALL (x::nat) xa::nat.
  1.1916 +    ((2::nat) * x + (1::nat) < (2::nat) * xa) = (x < xa)) &
  1.1917 +(ALL (x::nat) xa::nat.
  1.1918 +    ((2::nat) * x + (1::nat) < (2::nat) * xa + (1::nat)) = (x < xa))"
  1.1919    by (import hollight ARITH_LT)
  1.1920  
  1.1921 -lemma ARITH_EQ: "(op &::bool => bool => bool)
  1.1922 - ((All::(nat => bool) => bool)
  1.1923 -   (%x::nat.
  1.1924 -       (All::(nat => bool) => bool)
  1.1925 -        (%xa::nat.
  1.1926 -            (op =::bool => bool => bool) ((op =::nat => nat => bool) x xa)
  1.1927 -             ((op =::nat => nat => bool) x xa))))
  1.1928 - ((op &::bool => bool => bool)
  1.1929 -   ((op =::bool => bool => bool)
  1.1930 -     ((op =::nat => nat => bool) (0::nat) (0::nat)) (True::bool))
  1.1931 -   ((op &::bool => bool => bool)
  1.1932 -     ((All::(nat => bool) => bool)
  1.1933 -       (%x::nat.
  1.1934 -           (op =::bool => bool => bool)
  1.1935 -            ((op =::nat => nat => bool) ((NUMERAL_BIT0::nat => nat) x)
  1.1936 -              (0::nat))
  1.1937 -            ((op =::nat => nat => bool) x (0::nat))))
  1.1938 -     ((op &::bool => bool => bool)
  1.1939 -       ((All::(nat => bool) => bool)
  1.1940 -         (%x::nat.
  1.1941 -             (op =::bool => bool => bool)
  1.1942 -              ((op =::nat => nat => bool) ((NUMERAL_BIT1::nat => nat) x)
  1.1943 -                (0::nat))
  1.1944 -              (False::bool)))
  1.1945 -       ((op &::bool => bool => bool)
  1.1946 -         ((All::(nat => bool) => bool)
  1.1947 -           (%x::nat.
  1.1948 -               (op =::bool => bool => bool)
  1.1949 -                ((op =::nat => nat => bool) (0::nat)
  1.1950 -                  ((NUMERAL_BIT0::nat => nat) x))
  1.1951 -                ((op =::nat => nat => bool) (0::nat) x)))
  1.1952 -         ((op &::bool => bool => bool)
  1.1953 -           ((All::(nat => bool) => bool)
  1.1954 -             (%x::nat.
  1.1955 -                 (op =::bool => bool => bool)
  1.1956 -                  ((op =::nat => nat => bool) (0::nat)
  1.1957 -                    ((NUMERAL_BIT1::nat => nat) x))
  1.1958 -                  (False::bool)))
  1.1959 -           ((op &::bool => bool => bool)
  1.1960 -             ((All::(nat => bool) => bool)
  1.1961 -               (%x::nat.
  1.1962 -                   (All::(nat => bool) => bool)
  1.1963 -                    (%xa::nat.
  1.1964 -                        (op =::bool => bool => bool)
  1.1965 -                         ((op =::nat => nat => bool)
  1.1966 -                           ((NUMERAL_BIT0::nat => nat) x)
  1.1967 -                           ((NUMERAL_BIT0::nat => nat) xa))
  1.1968 -                         ((op =::nat => nat => bool) x xa))))
  1.1969 -             ((op &::bool => bool => bool)
  1.1970 -               ((All::(nat => bool) => bool)
  1.1971 -                 (%x::nat.
  1.1972 -                     (All::(nat => bool) => bool)
  1.1973 -                      (%xa::nat.
  1.1974 -                          (op =::bool => bool => bool)
  1.1975 -                           ((op =::nat => nat => bool)
  1.1976 -                             ((NUMERAL_BIT0::nat => nat) x)
  1.1977 -                             ((NUMERAL_BIT1::nat => nat) xa))
  1.1978 -                           (False::bool))))
  1.1979 -               ((op &::bool => bool => bool)
  1.1980 -                 ((All::(nat => bool) => bool)
  1.1981 -                   (%x::nat.
  1.1982 -                       (All::(nat => bool) => bool)
  1.1983 -                        (%xa::nat.
  1.1984 -                            (op =::bool => bool => bool)
  1.1985 -                             ((op =::nat => nat => bool)
  1.1986 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1987 -                               ((NUMERAL_BIT0::nat => nat) xa))
  1.1988 -                             (False::bool))))
  1.1989 -                 ((All::(nat => bool) => bool)
  1.1990 -                   (%x::nat.
  1.1991 -                       (All::(nat => bool) => bool)
  1.1992 -                        (%xa::nat.
  1.1993 -                            (op =::bool => bool => bool)
  1.1994 -                             ((op =::nat => nat => bool)
  1.1995 -                               ((NUMERAL_BIT1::nat => nat) x)
  1.1996 -                               ((NUMERAL_BIT1::nat => nat) xa))
  1.1997 -                             ((op =::nat => nat => bool) x xa))))))))))))"
  1.1998 +lemma ARITH_EQ: "(ALL (x::nat) xa::nat. (x = xa) = (x = xa)) &
  1.1999 +((0::nat) = (0::nat)) = True &
  1.2000 +(ALL x::nat. ((2::nat) * x = (0::nat)) = (x = (0::nat))) &
  1.2001 +(ALL x::nat. ((2::nat) * x + (1::nat) = (0::nat)) = False) &
  1.2002 +(ALL x::nat. ((0::nat) = (2::nat) * x) = ((0::nat) = x)) &
  1.2003 +(ALL x::nat. ((0::nat) = (2::nat) * x + (1::nat)) = False) &
  1.2004 +(ALL (x::nat) xa::nat. ((2::nat) * x = (2::nat) * xa) = (x = xa)) &
  1.2005 +(ALL (x::nat) xa::nat. ((2::nat) * x = (2::nat) * xa + (1::nat)) = False) &
  1.2006 +(ALL (x::nat) xa::nat. ((2::nat) * x + (1::nat) = (2::nat) * xa) = False) &
  1.2007 +(ALL (x::nat) xa::nat.
  1.2008 +    ((2::nat) * x + (1::nat) = (2::nat) * xa + (1::nat)) = (x = xa))"
  1.2009    by (import hollight ARITH_EQ)
  1.2010  
  1.2011 -lemma ARITH_SUB: "(op &::bool => bool => bool)
  1.2012 - ((All::(nat => bool) => bool)
  1.2013 -   (%x::nat.
  1.2014 -       (All::(nat => bool) => bool)
  1.2015 -        (%xa::nat.
  1.2016 -            (op =::nat => nat => bool) ((op -::nat => nat => nat) x xa)
  1.2017 -             ((op -::nat => nat => nat) x xa))))
  1.2018 - ((op &::bool => bool => bool)
  1.2019 -   ((op =::nat => nat => bool) ((op -::nat => nat => nat) (0::nat) (0::nat))
  1.2020 -     (0::nat))
  1.2021 -   ((op &::bool => bool => bool)
  1.2022 -     ((All::(nat => bool) => bool)
  1.2023 -       (%x::nat.
  1.2024 -           (op =::nat => nat => bool)
  1.2025 -            ((op -::nat => nat => nat) (0::nat)
  1.2026 -              ((NUMERAL_BIT0::nat => nat) x))
  1.2027 -            (0::nat)))
  1.2028 -     ((op &::bool => bool => bool)
  1.2029 -       ((All::(nat => bool) => bool)
  1.2030 -         (%x::nat.
  1.2031 -             (op =::nat => nat => bool)
  1.2032 -              ((op -::nat => nat => nat) (0::nat)
  1.2033 -                ((NUMERAL_BIT1::nat => nat) x))
  1.2034 -              (0::nat)))
  1.2035 -       ((op &::bool => bool => bool)
  1.2036 -         ((All::(nat => bool) => bool)
  1.2037 -           (%x::nat.
  1.2038 -               (op =::nat => nat => bool)
  1.2039 -                ((op -::nat => nat => nat) ((NUMERAL_BIT0::nat => nat) x)
  1.2040 -                  (0::nat))
  1.2041 -                ((NUMERAL_BIT0::nat => nat) x)))
  1.2042 -         ((op &::bool => bool => bool)
  1.2043 -           ((All::(nat => bool) => bool)
  1.2044 -             (%x::nat.
  1.2045 -                 (op =::nat => nat => bool)
  1.2046 -                  ((op -::nat => nat => nat) ((NUMERAL_BIT1::nat => nat) x)
  1.2047 -                    (0::nat))
  1.2048 -                  ((NUMERAL_BIT1::nat => nat) x)))
  1.2049 -           ((op &::bool => bool => bool)
  1.2050 -             ((All::(nat => bool) => bool)
  1.2051 -               (%m::nat.
  1.2052 -                   (All::(nat => bool) => bool)
  1.2053 -                    (%n::nat.
  1.2054 -                        (op =::nat => nat => bool)
  1.2055 -                         ((op -::nat => nat => nat)
  1.2056 -                           ((NUMERAL_BIT0::nat => nat) m)
  1.2057 -                           ((NUMERAL_BIT0::nat => nat) n))
  1.2058 -                         ((NUMERAL_BIT0::nat => nat)
  1.2059 -                           ((op -::nat => nat => nat) m n)))))
  1.2060 -             ((op &::bool => bool => bool)
  1.2061 -               ((All::(nat => bool) => bool)
  1.2062 -                 (%m::nat.
  1.2063 -                     (All::(nat => bool) => bool)
  1.2064 -                      (%n::nat.
  1.2065 -                          (op =::nat => nat => bool)
  1.2066 -                           ((op -::nat => nat => nat)
  1.2067 -                             ((NUMERAL_BIT0::nat => nat) m)
  1.2068 -                             ((NUMERAL_BIT1::nat => nat) n))
  1.2069 -                           ((Pred::nat => nat)
  1.2070 -                             ((NUMERAL_BIT0::nat => nat)
  1.2071 -                               ((op -::nat => nat => nat) m n))))))
  1.2072 -               ((op &::bool => bool => bool)
  1.2073 -                 ((All::(nat => bool) => bool)
  1.2074 -                   (%m::nat.
  1.2075 -                       (All::(nat => bool) => bool)
  1.2076 -                        (%n::nat.
  1.2077 -                            (op =::nat => nat => bool)
  1.2078 -                             ((op -::nat => nat => nat)
  1.2079 -                               ((NUMERAL_BIT1::nat => nat) m)
  1.2080 -                               ((NUMERAL_BIT0::nat => nat) n))
  1.2081 -                             ((COND::bool => nat => nat => nat)
  1.2082 -                               ((<=::nat => nat => bool) n m)
  1.2083 -                               ((NUMERAL_BIT1::nat => nat)
  1.2084 -                                 ((op -::nat => nat => nat) m n))
  1.2085 -                               (0::nat)))))
  1.2086 -                 ((All::(nat => bool) => bool)
  1.2087 -                   (%m::nat.
  1.2088 -                       (All::(nat => bool) => bool)
  1.2089 -                        (%n::nat.
  1.2090 -                            (op =::nat => nat => bool)
  1.2091 -                             ((op -::nat => nat => nat)
  1.2092 -                               ((NUMERAL_BIT1::nat => nat) m)
  1.2093 -                               ((NUMERAL_BIT1::nat => nat) n))
  1.2094 -                             ((NUMERAL_BIT0::nat => nat)
  1.2095 -                               ((op -::nat => nat => nat) m n)))))))))))))"
  1.2096 +lemma ARITH_SUB: "(ALL (x::nat) xa::nat. x - xa = x - xa) &
  1.2097 +(0::nat) - (0::nat) = (0::nat) &
  1.2098 +(ALL x::nat. (0::nat) - (2::nat) * x = (0::nat)) &
  1.2099 +(ALL x::nat. (0::nat) - ((2::nat) * x + (1::nat)) = (0::nat)) &
  1.2100 +(ALL x::nat. (2::nat) * x - (0::nat) = (2::nat) * x) &
  1.2101 +(ALL x::nat. (2::nat) * x + (1::nat) - (0::nat) = (2::nat) * x + (1::nat)) &
  1.2102 +(ALL (m::nat) n::nat. (2::nat) * m - (2::nat) * n = (2::nat) * (m - n)) &
  1.2103 +(ALL (m::nat) n::nat.
  1.2104 +    (2::nat) * m - ((2::nat) * n + (1::nat)) =
  1.2105 +    (2::nat) * (m - n) - Suc (0::nat)) &
  1.2106 +(ALL (m::nat) n::nat.
  1.2107 +    (2::nat) * m + (1::nat) - (2::nat) * n =
  1.2108 +    (if n <= m then (2::nat) * (m - n) + (1::nat) else (0::nat))) &
  1.2109 +(ALL (m::nat) n::nat.
  1.2110 +    (2::nat) * m + (1::nat) - ((2::nat) * n + (1::nat)) =
  1.2111 +    (2::nat) * (m - n))"
  1.2112    by (import hollight ARITH_SUB)
  1.2113  
  1.2114 -lemma right_th: "(s::nat) * NUMERAL_BIT1 (x::nat) = s + NUMERAL_BIT0 (s * x)"
  1.2115 +lemma right_th: "(s::nat) * ((2::nat) * (x::nat) + (1::nat)) = s + (2::nat) * (s * x)"
  1.2116    by (import hollight right_th)
  1.2117  
  1.2118 -lemma SEMIRING_PTHS: "(ALL (x::'A::type) (y::'A::type) z::'A::type.
  1.2119 -    (add::'A::type => 'A::type => 'A::type) x (add y z) = add (add x y) z) &
  1.2120 -(ALL (x::'A::type) y::'A::type. add x y = add y x) &
  1.2121 -(ALL x::'A::type. add (r0::'A::type) x = x) &
  1.2122 -(ALL (x::'A::type) (y::'A::type) z::'A::type.
  1.2123 -    (mul::'A::type => 'A::type => 'A::type) x (mul y z) = mul (mul x y) z) &
  1.2124 -(ALL (x::'A::type) y::'A::type. mul x y = mul y x) &
  1.2125 -(ALL x::'A::type. mul (r1::'A::type) x = x) &
  1.2126 -(ALL x::'A::type. mul r0 x = r0) &
  1.2127 -(ALL (x::'A::type) (y::'A::type) z::'A::type.
  1.2128 -    mul x (add y z) = add (mul x y) (mul x z)) &
  1.2129 -(ALL x::'A::type. (pwr::'A::type => nat => 'A::type) x 0 = r1) &
  1.2130 -(ALL (x::'A::type) n::nat. pwr x (Suc n) = mul x (pwr x n)) -->
  1.2131 -mul r1 (x::'A::type) = x &
  1.2132 -add (mul (a::'A::type) (m::'A::type)) (mul (b::'A::type) m) =
  1.2133 -mul (add a b) m &
  1.2134 -add (mul a m) m = mul (add a r1) m &
  1.2135 -add m (mul a m) = mul (add a r1) m &
  1.2136 -add m m = mul (add r1 r1) m &
  1.2137 -mul r0 m = r0 &
  1.2138 -add r0 a = a &
  1.2139 -add a r0 = a &
  1.2140 -mul a b = mul b a &
  1.2141 -mul (add a b) (c::'A::type) = add (mul a c) (mul b c) &
  1.2142 -mul r0 a = r0 &
  1.2143 -mul a r0 = r0 &
  1.2144 -mul r1 a = a &
  1.2145 -mul a r1 = a &
  1.2146 -mul (mul (lx::'A::type) (ly::'A::type))
  1.2147 - (mul (rx::'A::type) (ry::'A::type)) =
  1.2148 -mul (mul lx rx) (mul ly ry) &
  1.2149 -mul (mul lx ly) (mul rx ry) = mul lx (mul ly (mul rx ry)) &
  1.2150 -mul (mul lx ly) (mul rx ry) = mul rx (mul (mul lx ly) ry) &
  1.2151 -mul (mul lx ly) rx = mul (mul lx rx) ly &
  1.2152 -mul (mul lx ly) rx = mul lx (mul ly rx) &
  1.2153 -mul lx rx = mul rx lx &
  1.2154 -mul lx (mul rx ry) = mul (mul lx rx) ry &
  1.2155 -mul lx (mul rx ry) = mul rx (mul lx ry) &
  1.2156 -add (add a b) (add c (d::'A::type)) = add (add a c) (add b d) &
  1.2157 -add (add a b) c = add a (add b c) &
  1.2158 -add a (add c d) = add c (add a d) &
  1.2159 -add (add a b) c = add (add a c) b &
  1.2160 -add a c = add c a &
  1.2161 -add a (add c d) = add (add a c) d &
  1.2162 -mul (pwr x (p::nat)) (pwr x (q::nat)) = pwr x (p + q) &
  1.2163 -mul x (pwr x q) = pwr x (Suc q) &
  1.2164 -mul (pwr x q) x = pwr x (Suc q) &
  1.2165 -mul x x = pwr x (NUMERAL_BIT0 (NUMERAL_BIT1 0)) &
  1.2166 -pwr (mul x (y::'A::type)) q = mul (pwr x q) (pwr y q) &
  1.2167 -pwr (pwr x p) q = pwr x (p * q) &
  1.2168 -pwr x 0 = r1 &
  1.2169 -pwr x (NUMERAL_BIT1 0) = x &
  1.2170 -mul x (add y (z::'A::type)) = add (mul x y) (mul x z) &
  1.2171 -pwr x (Suc q) = mul x (pwr x q)"
  1.2172 +lemma SEMIRING_PTHS: "(ALL (x::'A) (y::'A) z::'A.
  1.2173 +    (add::'A => 'A => 'A) x (add y z) = add (add x y) z) &
  1.2174 +(ALL (x::'A) y::'A. add x y = add y x) &
  1.2175 +(ALL x::'A. add (r0::'A) x = x) &
  1.2176 +(ALL (x::'A) (y::'A) z::'A.
  1.2177 +    (mul::'A => 'A => 'A) x (mul y z) = mul (mul x y) z) &
  1.2178 +(ALL (x::'A) y::'A. mul x y = mul y x) &
  1.2179 +(ALL x::'A. mul (r1::'A) x = x) &
  1.2180 +(ALL x::'A. mul r0 x = r0) &
  1.2181 +(ALL (x::'A) (y::'A) z::'A. mul x (add y z) = add (mul x y) (mul x z)) &
  1.2182 +(ALL x::'A. (pwr::'A => nat => 'A) x (0::nat) = r1) &
  1.2183 +(ALL (x::'A) n::nat. pwr x (Suc n) = mul x (pwr x n))
  1.2184 +==> mul r1 (x::'A) = x &
  1.2185 +    add (mul (a::'A) (m::'A)) (mul (b::'A) m) = mul (add a b) m &
  1.2186 +    add (mul a m) m = mul (add a r1) m &
  1.2187 +    add m (mul a m) = mul (add a r1) m &
  1.2188 +    add m m = mul (add r1 r1) m &
  1.2189 +    mul r0 m = r0 &
  1.2190 +    add r0 a = a &
  1.2191 +    add a r0 = a &
  1.2192 +    mul a b = mul b a &
  1.2193 +    mul (add a b) (c::'A) = add (mul a c) (mul b c) &
  1.2194 +    mul r0 a = r0 &
  1.2195 +    mul a r0 = r0 &
  1.2196 +    mul r1 a = a &
  1.2197 +    mul a r1 = a &
  1.2198 +    mul (mul (lx::'A) (ly::'A)) (mul (rx::'A) (ry::'A)) =
  1.2199 +    mul (mul lx rx) (mul ly ry) &
  1.2200 +    mul (mul lx ly) (mul rx ry) = mul lx (mul ly (mul rx ry)) &
  1.2201 +    mul (mul lx ly) (mul rx ry) = mul rx (mul (mul lx ly) ry) &
  1.2202 +    mul (mul lx ly) rx = mul (mul lx rx) ly &
  1.2203 +    mul (mul lx ly) rx = mul lx (mul ly rx) &
  1.2204 +    mul lx rx = mul rx lx &
  1.2205 +    mul lx (mul rx ry) = mul (mul lx rx) ry &
  1.2206 +    mul lx (mul rx ry) = mul rx (mul lx ry) &
  1.2207 +    add (add a b) (add c (d::'A)) = add (add a c) (add b d) &
  1.2208 +    add (add a b) c = add a (add b c) &
  1.2209 +    add a (add c d) = add c (add a d) &
  1.2210 +    add (add a b) c = add (add a c) b &
  1.2211 +    add a c = add c a &
  1.2212 +    add a (add c d) = add (add a c) d &
  1.2213 +    mul (pwr x (p::nat)) (pwr x (q::nat)) = pwr x (p + q) &
  1.2214 +    mul x (pwr x q) = pwr x (Suc q) &
  1.2215 +    mul (pwr x q) x = pwr x (Suc q) &
  1.2216 +    mul x x = pwr x (2::nat) &
  1.2217 +    pwr (mul x (y::'A)) q = mul (pwr x q) (pwr y q) &
  1.2218 +    pwr (pwr x p) q = pwr x (p * q) &
  1.2219 +    pwr x (0::nat) = r1 &
  1.2220 +    pwr x (1::nat) = x &
  1.2221 +    mul x (add y (z::'A)) = add (mul x y) (mul x z) &
  1.2222 +    pwr x (Suc q) = mul x (pwr x q)"
  1.2223    by (import hollight SEMIRING_PTHS)
  1.2224  
  1.2225 -lemma sth: "(ALL (x::nat) (y::nat) z::nat. x + (y + z) = x + y + z) &
  1.2226 -(ALL (x::nat) y::nat. x + y = y + x) &
  1.2227 -(ALL x::nat. 0 + x = x) &
  1.2228 -(ALL (x::nat) (y::nat) z::nat. x * (y * z) = x * y * z) &
  1.2229 -(ALL (x::nat) y::nat. x * y = y * x) &
  1.2230 -(ALL x::nat. NUMERAL_BIT1 0 * x = x) &
  1.2231 -(ALL x::nat. 0 * x = 0) &
  1.2232 -(ALL (x::nat) (xa::nat) xb::nat. x * (xa + xb) = x * xa + x * xb) &
  1.2233 -(ALL x::nat. EXP x 0 = NUMERAL_BIT1 0) &
  1.2234 -(ALL (x::nat) xa::nat. EXP x (Suc xa) = x * EXP x xa)"
  1.2235 -  by (import hollight sth)
  1.2236 -
  1.2237 -lemma NUM_INTEGRAL_LEMMA: "(w::nat) = (x::nat) + (d::nat) & (y::nat) = (z::nat) + (e::nat) -->
  1.2238 -(w * y + x * z = w * z + x * y) = (w = x | y = z)"
  1.2239 +lemma NUM_INTEGRAL_LEMMA: "(w::nat) = (x::nat) + (d::nat) & (y::nat) = (z::nat) + (e::nat)
  1.2240 +==> (w * y + x * z = w * z + x * y) = (w = x | y = z)"
  1.2241    by (import hollight NUM_INTEGRAL_LEMMA)
  1.2242  
  1.2243 -lemma NUM_INTEGRAL: "(ALL x::nat. 0 * x = 0) &
  1.2244 +lemma NUM_INTEGRAL: "(ALL x::nat. (0::nat) * x = (0::nat)) &
  1.2245  (ALL (x::nat) (xa::nat) xb::nat. (x + xa = x + xb) = (xa = xb)) &
  1.2246  (ALL (w::nat) (x::nat) (y::nat) z::nat.
  1.2247      (w * y + x * z = w * z + x * y) = (w = x | y = z))"
  1.2248    by (import hollight NUM_INTEGRAL)
  1.2249  
  1.2250 -lemma INJ_INVERSE2: "ALL P::'A::type => 'B::type => 'C::type.
  1.2251 -   (ALL (x1::'A::type) (y1::'B::type) (x2::'A::type) y2::'B::type.
  1.2252 -       (P x1 y1 = P x2 y2) = (x1 = x2 & y1 = y2)) -->
  1.2253 -   (EX (x::'C::type => 'A::type) Y::'C::type => 'B::type.
  1.2254 -       ALL (xa::'A::type) y::'B::type. x (P xa y) = xa & Y (P xa y) = y)"
  1.2255 +lemma INJ_INVERSE2: "(!!(x1::'A) (y1::'B) (x2::'A) y2::'B.
  1.2256 +    ((P::'A => 'B => 'C) x1 y1 = P x2 y2) = (x1 = x2 & y1 = y2))
  1.2257 +==> EX (x::'C => 'A) Y::'C => 'B.
  1.2258 +       ALL (xa::'A) y::'B. x (P xa y) = xa & Y (P xa y) = y"
  1.2259    by (import hollight INJ_INVERSE2)
  1.2260  
  1.2261 -definition NUMPAIR :: "nat => nat => nat" where 
  1.2262 -  "NUMPAIR ==
  1.2263 -%(u::nat) ua::nat.
  1.2264 -   EXP (NUMERAL_BIT0 (NUMERAL_BIT1 0)) u *
  1.2265 -   (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua + NUMERAL_BIT1 0)"
  1.2266 -
  1.2267 -lemma DEF_NUMPAIR: "NUMPAIR =
  1.2268 -(%(u::nat) ua::nat.
  1.2269 -    EXP (NUMERAL_BIT0 (NUMERAL_BIT1 0)) u *
  1.2270 -    (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua + NUMERAL_BIT1 0))"
  1.2271 +definition
  1.2272 +  NUMPAIR :: "nat => nat => nat"  where
  1.2273 +  "NUMPAIR == %u ua. 2 ^ u * (2 * ua + 1)"
  1.2274 +
  1.2275 +lemma DEF_NUMPAIR: "NUMPAIR = (%u ua. 2 ^ u * (2 * ua + 1))"
  1.2276    by (import hollight DEF_NUMPAIR)
  1.2277  
  1.2278 -lemma NUMPAIR_INJ_LEMMA: "ALL (x::nat) (xa::nat) (xb::nat) xc::nat.
  1.2279 -   NUMPAIR x xa = NUMPAIR xb xc --> x = xb"
  1.2280 +lemma NUMPAIR_INJ_LEMMA: "NUMPAIR x xa = NUMPAIR xb xc ==> x = xb"
  1.2281    by (import hollight NUMPAIR_INJ_LEMMA)
  1.2282  
  1.2283 -lemma NUMPAIR_INJ: "ALL (x1::nat) (y1::nat) (x2::nat) y2::nat.
  1.2284 -   (NUMPAIR x1 y1 = NUMPAIR x2 y2) = (x1 = x2 & y1 = y2)"
  1.2285 +lemma NUMPAIR_INJ: "(NUMPAIR x1 y1 = NUMPAIR x2 y2) = (x1 = x2 & y1 = y2)"
  1.2286    by (import hollight NUMPAIR_INJ)
  1.2287  
  1.2288 -definition NUMFST :: "nat => nat" where 
  1.2289 -  "NUMFST ==
  1.2290 -SOME X::nat => nat.
  1.2291 -   EX Y::nat => nat.
  1.2292 -      ALL (x::nat) y::nat. X (NUMPAIR x y) = x & Y (NUMPAIR x y) = y"
  1.2293 -
  1.2294 -lemma DEF_NUMFST: "NUMFST =
  1.2295 -(SOME X::nat => nat.
  1.2296 -    EX Y::nat => nat.
  1.2297 -       ALL (x::nat) y::nat. X (NUMPAIR x y) = x & Y (NUMPAIR x y) = y)"
  1.2298 +definition
  1.2299 +  NUMFST :: "nat => nat"  where
  1.2300 +  "NUMFST == SOME X. EX Y. ALL x y. X (NUMPAIR x y) = x & Y (NUMPAIR x y) = y"
  1.2301 +
  1.2302 +lemma DEF_NUMFST: "NUMFST = (SOME X. EX Y. ALL x y. X (NUMPAIR x y) = x & Y (NUMPAIR x y) = y)"
  1.2303    by (import hollight DEF_NUMFST)
  1.2304  
  1.2305 -definition NUMSND :: "nat => nat" where 
  1.2306 -  "NUMSND ==
  1.2307 -SOME Y::nat => nat.
  1.2308 -   ALL (x::nat) y::nat. NUMFST (NUMPAIR x y) = x & Y (NUMPAIR x y) = y"
  1.2309 -
  1.2310 -lemma DEF_NUMSND: "NUMSND =
  1.2311 -(SOME Y::nat => nat.
  1.2312 -    ALL (x::nat) y::nat. NUMFST (NUMPAIR x y) = x & Y (NUMPAIR x y) = y)"
  1.2313 +definition
  1.2314 +  NUMSND :: "nat => nat"  where
  1.2315 +  "NUMSND == SOME Y. ALL x y. NUMFST (NUMPAIR x y) = x & Y (NUMPAIR x y) = y"
  1.2316 +
  1.2317 +lemma DEF_NUMSND: "NUMSND = (SOME Y. ALL x y. NUMFST (NUMPAIR x y) = x & Y (NUMPAIR x y) = y)"
  1.2318    by (import hollight DEF_NUMSND)
  1.2319  
  1.2320 -definition NUMSUM :: "bool => nat => nat" where 
  1.2321 -  "NUMSUM ==
  1.2322 -%(u::bool) ua::nat.
  1.2323 -   COND u (Suc (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua))
  1.2324 -    (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua)"
  1.2325 -
  1.2326 -lemma DEF_NUMSUM: "NUMSUM =
  1.2327 -(%(u::bool) ua::nat.
  1.2328 -    COND u (Suc (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua))
  1.2329 -     (NUMERAL_BIT0 (NUMERAL_BIT1 0) * ua))"
  1.2330 +definition
  1.2331 +  NUMSUM :: "bool => nat => nat"  where
  1.2332 +  "NUMSUM == %u ua. if u then Suc (2 * ua) else 2 * ua"
  1.2333 +
  1.2334 +lemma DEF_NUMSUM: "NUMSUM = (%u ua. if u then Suc (2 * ua) else 2 * ua)"
  1.2335    by (import hollight DEF_NUMSUM)
  1.2336  
  1.2337 -lemma NUMSUM_INJ: "ALL (b1::bool) (x1::nat) (b2::bool) x2::nat.
  1.2338 -   (NUMSUM b1 x1 = NUMSUM b2 x2) = (b1 = b2 & x1 = x2)"
  1.2339 +lemma NUMSUM_INJ: "(NUMSUM b1 x1 = NUMSUM b2 x2) = (b1 = b2 & x1 = x2)"
  1.2340    by (import hollight NUMSUM_INJ)
  1.2341  
  1.2342 -definition NUMLEFT :: "nat => bool" where 
  1.2343 -  "NUMLEFT ==
  1.2344 -SOME X::nat => bool.
  1.2345 -   EX Y::nat => nat.
  1.2346 -      ALL (x::bool) y::nat. X (NUMSUM x y) = x & Y (NUMSUM x y) = y"
  1.2347 -
  1.2348 -lemma DEF_NUMLEFT: "NUMLEFT =
  1.2349 -(SOME X::nat => bool.
  1.2350 -    EX Y::nat => nat.
  1.2351 -       ALL (x::bool) y::nat. X (NUMSUM x y) = x & Y (NUMSUM x y) = y)"
  1.2352 +definition
  1.2353 +  NUMLEFT :: "nat => bool"  where
  1.2354 +  "NUMLEFT == SOME X. EX Y. ALL x y. X (NUMSUM x y) = x & Y (NUMSUM x y) = y"
  1.2355 +
  1.2356 +lemma DEF_NUMLEFT: "NUMLEFT = (SOME X. EX Y. ALL x y. X (NUMSUM x y) = x & Y (NUMSUM x y) = y)"
  1.2357    by (import hollight DEF_NUMLEFT)
  1.2358  
  1.2359 -definition NUMRIGHT :: "nat => nat" where 
  1.2360 -  "NUMRIGHT ==
  1.2361 -SOME Y::nat => nat.
  1.2362 -   ALL (x::bool) y::nat. NUMLEFT (NUMSUM x y) = x & Y (NUMSUM x y) = y"
  1.2363 -
  1.2364 -lemma DEF_NUMRIGHT: "NUMRIGHT =
  1.2365 -(SOME Y::nat => nat.
  1.2366 -    ALL (x::bool) y::nat. NUMLEFT (NUMSUM x y) = x & Y (NUMSUM x y) = y)"
  1.2367 +definition
  1.2368 +  NUMRIGHT :: "nat => nat"  where
  1.2369 +  "NUMRIGHT == SOME Y. ALL x y. NUMLEFT (NUMSUM x y) = x & Y (NUMSUM x y) = y"
  1.2370 +
  1.2371 +lemma DEF_NUMRIGHT: "NUMRIGHT = (SOME Y. ALL x y. NUMLEFT (NUMSUM x y) = x & Y (NUMSUM x y) = y)"
  1.2372    by (import hollight DEF_NUMRIGHT)
  1.2373  
  1.2374 -definition INJN :: "nat => nat => 'A => bool" where 
  1.2375 -  "INJN == %(u::nat) (n::nat) a::'A::type. n = u"
  1.2376 -
  1.2377 -lemma DEF_INJN: "INJN = (%(u::nat) (n::nat) a::'A::type. n = u)"
  1.2378 +definition
  1.2379 +  INJN :: "nat => nat => 'A => bool"  where
  1.2380 +  "INJN == %(u::nat) (n::nat) a::'A. n = u"
  1.2381 +
  1.2382 +lemma DEF_INJN: "INJN = (%(u::nat) (n::nat) a::'A. n = u)"
  1.2383    by (import hollight DEF_INJN)
  1.2384  
  1.2385 -lemma INJN_INJ: "(All::(nat => bool) => bool)
  1.2386 - (%n1::nat.
  1.2387 -     (All::(nat => bool) => bool)
  1.2388 -      (%n2::nat.
  1.2389 -          (op =::bool => bool => bool)
  1.2390 -           ((op =::(nat => 'A::type => bool)
  1.2391 -                   => (nat => 'A::type => bool) => bool)
  1.2392 -             ((INJN::nat => nat => 'A::type => bool) n1)
  1.2393 -             ((INJN::nat => nat => 'A::type => bool) n2))
  1.2394 -           ((op =::nat => nat => bool) n1 n2)))"
  1.2395 +lemma INJN_INJ: "(op =::bool => bool => bool)
  1.2396 + ((op =::(nat => 'A::type => bool) => (nat => 'A::type => bool) => bool)
  1.2397 +   ((INJN::nat => nat => 'A::type => bool) (n1::nat))
  1.2398 +   ((INJN::nat => nat => 'A::type => bool) (n2::nat)))
  1.2399 + ((op =::nat => nat => bool) n1 n2)"
  1.2400    by (import hollight INJN_INJ)
  1.2401  
  1.2402 -definition INJA :: "'A => nat => 'A => bool" where 
  1.2403 -  "INJA == %(u::'A::type) (n::nat) b::'A::type. b = u"
  1.2404 -
  1.2405 -lemma DEF_INJA: "INJA = (%(u::'A::type) (n::nat) b::'A::type. b = u)"
  1.2406 +definition
  1.2407 +  INJA :: "'A => nat => 'A => bool"  where
  1.2408 +  "INJA == %(u::'A) (n::nat) b::'A. b = u"
  1.2409 +
  1.2410 +lemma DEF_INJA: "INJA = (%(u::'A) (n::nat) b::'A. b = u)"
  1.2411    by (import hollight DEF_INJA)
  1.2412  
  1.2413 -lemma INJA_INJ: "ALL (a1::'A::type) a2::'A::type. (INJA a1 = INJA a2) = (a1 = a2)"
  1.2414 +lemma INJA_INJ: "(INJA (a1::'A) = INJA (a2::'A)) = (a1 = a2)"
  1.2415    by (import hollight INJA_INJ)
  1.2416  
  1.2417 -definition INJF :: "(nat => nat => 'A => bool) => nat => 'A => bool" where 
  1.2418 -  "INJF == %(u::nat => nat => 'A::type => bool) n::nat. u (NUMFST n) (NUMSND n)"
  1.2419 -
  1.2420 -lemma DEF_INJF: "INJF =
  1.2421 -(%(u::nat => nat => 'A::type => bool) n::nat. u (NUMFST n) (NUMSND n))"
  1.2422 +definition
  1.2423 +  INJF :: "(nat => nat => 'A => bool) => nat => 'A => bool"  where
  1.2424 +  "INJF == %(u::nat => nat => 'A => bool) n::nat. u (NUMFST n) (NUMSND n)"
  1.2425 +
  1.2426 +lemma DEF_INJF: "INJF = (%(u::nat => nat => 'A => bool) n::nat. u (NUMFST n) (NUMSND n))"
  1.2427    by (import hollight DEF_INJF)
  1.2428  
  1.2429 -lemma INJF_INJ: "ALL (f1::nat => nat => 'A::type => bool) f2::nat => nat => 'A::type => bool.
  1.2430 -   (INJF f1 = INJF f2) = (f1 = f2)"
  1.2431 +lemma INJF_INJ: "(INJF (f1::nat => nat => 'A => bool) =
  1.2432 + INJF (f2::nat => nat => 'A => bool)) =
  1.2433 +(f1 = f2)"
  1.2434    by (import hollight INJF_INJ)
  1.2435  
  1.2436 -definition INJP :: "(nat => 'A => bool) => (nat => 'A => bool) => nat => 'A => bool" where 
  1.2437 +definition
  1.2438 +  INJP :: "(nat => 'A => bool) => (nat => 'A => bool) => nat => 'A => bool"  where
  1.2439    "INJP ==
  1.2440 -%(u::nat => 'A::type => bool) (ua::nat => 'A::type => bool) (n::nat)
  1.2441 -   a::'A::type. COND (NUMLEFT n) (u (NUMRIGHT n) a) (ua (NUMRIGHT n) a)"
  1.2442 +%(u::nat => 'A => bool) (ua::nat => 'A => bool) (n::nat) a::'A.
  1.2443 +   if NUMLEFT n then u (NUMRIGHT n) a else ua (NUMRIGHT n) a"
  1.2444  
  1.2445  lemma DEF_INJP: "INJP =
  1.2446 -(%(u::nat => 'A::type => bool) (ua::nat => 'A::type => bool) (n::nat)
  1.2447 -    a::'A::type. COND (NUMLEFT n) (u (NUMRIGHT n) a) (ua (NUMRIGHT n) a))"
  1.2448 +(%(u::nat => 'A => bool) (ua::nat => 'A => bool) (n::nat) a::'A.
  1.2449 +    if NUMLEFT n then u (NUMRIGHT n) a else ua (NUMRIGHT n) a)"
  1.2450    by (import hollight DEF_INJP)
  1.2451  
  1.2452 -lemma INJP_INJ: "ALL (f1::nat => 'A::type => bool) (f1'::nat => 'A::type => bool)
  1.2453 -   (f2::nat => 'A::type => bool) f2'::nat => 'A::type => bool.
  1.2454 -   (INJP f1 f2 = INJP f1' f2') = (f1 = f1' & f2 = f2')"
  1.2455 +lemma INJP_INJ: "(INJP (f1::nat => 'A => bool) (f2::nat => 'A => bool) =
  1.2456 + INJP (f1'::nat => 'A => bool) (f2'::nat => 'A => bool)) =
  1.2457 +(f1 = f1' & f2 = f2')"
  1.2458    by (import hollight INJP_INJ)
  1.2459  
  1.2460 -definition ZCONSTR :: "nat => 'A => (nat => nat => 'A => bool) => nat => 'A => bool" where 
  1.2461 +definition
  1.2462 +  ZCONSTR :: "nat => 'A => (nat => nat => 'A => bool) => nat => 'A => bool"  where
  1.2463    "ZCONSTR ==
  1.2464 -%(u::nat) (ua::'A::type) ub::nat => nat => 'A::type => bool.
  1.2465 +%(u::nat) (ua::'A) ub::nat => nat => 'A => bool.
  1.2466     INJP (INJN (Suc u)) (INJP (INJA ua) (INJF ub))"
  1.2467  
  1.2468  lemma DEF_ZCONSTR: "ZCONSTR =
  1.2469 -(%(u::nat) (ua::'A::type) ub::nat => nat => 'A::type => bool.
  1.2470 +(%(u::nat) (ua::'A) ub::nat => nat => 'A => bool.
  1.2471      INJP (INJN (Suc u)) (INJP (INJA ua) (INJF ub)))"
  1.2472    by (import hollight DEF_ZCONSTR)
  1.2473  
  1.2474 -definition ZBOT :: "nat => 'A => bool" where 
  1.2475 -  "ZBOT == INJP (INJN 0) (SOME z::nat => 'A::type => bool. True)"
  1.2476 -
  1.2477 -lemma DEF_ZBOT: "ZBOT = INJP (INJN 0) (SOME z::nat => 'A::type => bool. True)"
  1.2478 +definition
  1.2479 +  ZBOT :: "nat => 'A => bool"  where
  1.2480 +  "ZBOT == INJP (INJN (0::nat)) (SOME z::nat => 'A => bool. True)"
  1.2481 +
  1.2482 +lemma DEF_ZBOT: "ZBOT = INJP (INJN (0::nat)) (SOME z::nat => 'A => bool. True)"
  1.2483    by (import hollight DEF_ZBOT)
  1.2484  
  1.2485 -lemma ZCONSTR_ZBOT: "ALL (x::nat) (xa::'A::type) xb::nat => nat => 'A::type => bool.
  1.2486 -   ZCONSTR x xa xb ~= ZBOT"
  1.2487 +lemma ZCONSTR_ZBOT: "ZCONSTR (x::nat) (xa::'A) (xb::nat => nat => 'A => bool) ~= ZBOT"
  1.2488    by (import hollight ZCONSTR_ZBOT)
  1.2489  
  1.2490 -definition ZRECSPACE :: "(nat => 'A => bool) => bool" where 
  1.2491 +definition
  1.2492 +  ZRECSPACE :: "(nat => 'A => bool) => bool"  where
  1.2493    "ZRECSPACE ==
  1.2494 -%a::nat => 'A::type => bool.
  1.2495 -   ALL ZRECSPACE'::(nat => 'A::type => bool) => bool.
  1.2496 -      (ALL a::nat => 'A::type => bool.
  1.2497 +%a::nat => 'A => bool.
  1.2498 +   ALL ZRECSPACE'::(nat => 'A => bool) => bool.
  1.2499 +      (ALL a::nat => 'A => bool.
  1.2500            a = ZBOT |
  1.2501 -          (EX (c::nat) (i::'A::type) r::nat => nat => 'A::type => bool.
  1.2502 +          (EX (c::nat) (i::'A) r::nat => nat => 'A => bool.
  1.2503                a = ZCONSTR c i r & (ALL n::nat. ZRECSPACE' (r n))) -->
  1.2504            ZRECSPACE' a) -->
  1.2505        ZRECSPACE' a"
  1.2506  
  1.2507  lemma DEF_ZRECSPACE: "ZRECSPACE =
  1.2508 -(%a::nat => 'A::type => bool.
  1.2509 -    ALL ZRECSPACE'::(nat => 'A::type => bool) => bool.
  1.2510 -       (ALL a::nat => 'A::type => bool.
  1.2511 +(%a::nat => 'A => bool.
  1.2512 +    ALL ZRECSPACE'::(nat => 'A => bool) => bool.
  1.2513 +       (ALL a::nat => 'A => bool.
  1.2514             a = ZBOT |
  1.2515 -           (EX (c::nat) (i::'A::type) r::nat => nat => 'A::type => bool.
  1.2516 +           (EX (c::nat) (i::'A) r::nat => nat => 'A => bool.
  1.2517                 a = ZCONSTR c i r & (ALL n::nat. ZRECSPACE' (r n))) -->
  1.2518             ZRECSPACE' a) -->
  1.2519         ZRECSPACE' a)"
  1.2520    by (import hollight DEF_ZRECSPACE)
  1.2521  
  1.2522 -typedef (open) ('A) recspace = "(Collect::((nat => 'A::type => bool) => bool)
  1.2523 -          => (nat => 'A::type => bool) set)
  1.2524 - (ZRECSPACE::(nat => 'A::type => bool) => bool)"  morphisms "_dest_rec" "_mk_rec"
  1.2525 -  apply (rule light_ex_imp_nonempty[where t="ZBOT::nat => 'A::type => bool"])
  1.2526 +typedef (open) ('A) recspace = "Collect ZRECSPACE"  morphisms "_dest_rec" "_mk_rec"
  1.2527 +  apply (rule light_ex_imp_nonempty[where t="ZBOT"])
  1.2528    by (import hollight TYDEF_recspace)
  1.2529  
  1.2530  syntax
  1.2531 @@ -1779,1315 +1169,236 @@
  1.2532    [where a="a :: 'A recspace" and r=r ,
  1.2533     OF type_definition_recspace]
  1.2534  
  1.2535 -definition BOTTOM :: "'A recspace" where 
  1.2536 -  "(op ==::'A::type recspace => 'A::type recspace => prop)
  1.2537 - (BOTTOM::'A::type recspace)
  1.2538 - ((_mk_rec::(nat => 'A::type => bool) => 'A::type recspace)
  1.2539 -   (ZBOT::nat => 'A::type => bool))"
  1.2540 -
  1.2541 -lemma DEF_BOTTOM: "(op =::'A::type recspace => 'A::type recspace => bool)
  1.2542 - (BOTTOM::'A::type recspace)
  1.2543 - ((_mk_rec::(nat => 'A::type => bool) => 'A::type recspace)
  1.2544 -   (ZBOT::nat => 'A::type => bool))"
  1.2545 +definition
  1.2546 +  BOTTOM :: "'A recspace"  where
  1.2547 +  "BOTTOM == _mk_rec ZBOT"
  1.2548 +
  1.2549 +lemma DEF_BOTTOM: "BOTTOM = _mk_rec ZBOT"
  1.2550    by (import hollight DEF_BOTTOM)
  1.2551  
  1.2552 -definition CONSTR :: "nat => 'A => (nat => 'A recspace) => 'A recspace" where 
  1.2553 -  "(op ==::(nat => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2554 -        => (nat
  1.2555 -            => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2556 -           => prop)
  1.2557 - (CONSTR::nat
  1.2558 -          => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2559 - (%(u::nat) (ua::'A::type) ub::nat => 'A::type recspace.
  1.2560 -     (_mk_rec::(nat => 'A::type => bool) => 'A::type recspace)
  1.2561 -      ((ZCONSTR::nat
  1.2562 -                 => 'A::type
  1.2563 -                    => (nat => nat => 'A::type => bool)
  1.2564 -                       => nat => 'A::type => bool)
  1.2565 -        u ua
  1.2566 -        (%n::nat.
  1.2567 -            (_dest_rec::'A::type recspace => nat => 'A::type => bool)
  1.2568 -             (ub n))))"
  1.2569 -
  1.2570 -lemma DEF_CONSTR: "(op =::(nat => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2571 -       => (nat
  1.2572 -           => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2573 -          => bool)
  1.2574 - (CONSTR::nat
  1.2575 -          => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2576 - (%(u::nat) (ua::'A::type) ub::nat => 'A::type recspace.
  1.2577 -     (_mk_rec::(nat => 'A::type => bool) => 'A::type recspace)
  1.2578 -      ((ZCONSTR::nat
  1.2579 -                 => 'A::type
  1.2580 -                    => (nat => nat => 'A::type => bool)
  1.2581 -                       => nat => 'A::type => bool)
  1.2582 -        u ua
  1.2583 -        (%n::nat.
  1.2584 -            (_dest_rec::'A::type recspace => nat => 'A::type => bool)
  1.2585 -             (ub n))))"
  1.2586 +definition
  1.2587 +  CONSTR :: "nat => 'A => (nat => 'A recspace) => 'A recspace"  where
  1.2588 +  "CONSTR ==
  1.2589 +%(u::nat) (ua::'A::type) ub::nat => 'A::type recspace.
  1.2590 +   _mk_rec (ZCONSTR u ua (%n::nat. _dest_rec (ub n)))"
  1.2591 +
  1.2592 +lemma DEF_CONSTR: "CONSTR =
  1.2593 +(%(u::nat) (ua::'A::type) ub::nat => 'A::type recspace.
  1.2594 +    _mk_rec (ZCONSTR u ua (%n::nat. _dest_rec (ub n))))"
  1.2595    by (import hollight DEF_CONSTR)
  1.2596  
  1.2597 -lemma MK_REC_INJ: "(All::((nat => 'A::type => bool) => bool) => bool)
  1.2598 - (%x::nat => 'A::type => bool.
  1.2599 -     (All::((nat => 'A::type => bool) => bool) => bool)
  1.2600 -      (%y::nat => 'A::type => bool.
  1.2601 -          (op -->::bool => bool => bool)
  1.2602 -           ((op =::'A::type recspace => 'A::type recspace => bool)
  1.2603 -             ((_mk_rec::(nat => 'A::type => bool) => 'A::type recspace) x)
  1.2604 -             ((_mk_rec::(nat => 'A::type => bool) => 'A::type recspace) y))
  1.2605 -           ((op -->::bool => bool => bool)
  1.2606 -             ((op &::bool => bool => bool)
  1.2607 -               ((ZRECSPACE::(nat => 'A::type => bool) => bool) x)
  1.2608 -               ((ZRECSPACE::(nat => 'A::type => bool) => bool) y))
  1.2609 -             ((op =::(nat => 'A::type => bool)
  1.2610 -                     => (nat => 'A::type => bool) => bool)
  1.2611 -               x y))))"
  1.2612 +lemma MK_REC_INJ: "[| _mk_rec (x::nat => 'A::type => bool) =
  1.2613 +   _mk_rec (y::nat => 'A::type => bool);
  1.2614 +   ZRECSPACE x & ZRECSPACE y |]
  1.2615 +==> x = y"
  1.2616    by (import hollight MK_REC_INJ)
  1.2617  
  1.2618 -lemma CONSTR_BOT: "ALL (c::nat) (i::'A::type) r::nat => 'A::type recspace.
  1.2619 -   CONSTR c i r ~= BOTTOM"
  1.2620 +lemma CONSTR_BOT: "CONSTR (c::nat) (i::'A) (r::nat => 'A recspace) ~= BOTTOM"
  1.2621    by (import hollight CONSTR_BOT)
  1.2622  
  1.2623 -lemma CONSTR_INJ: "ALL (c1::nat) (i1::'A::type) (r1::nat => 'A::type recspace) (c2::nat)
  1.2624 -   (i2::'A::type) r2::nat => 'A::type recspace.
  1.2625 -   (CONSTR c1 i1 r1 = CONSTR c2 i2 r2) = (c1 = c2 & i1 = i2 & r1 = r2)"
  1.2626 +lemma CONSTR_INJ: "(CONSTR (c1::nat) (i1::'A) (r1::nat => 'A recspace) =
  1.2627 + CONSTR (c2::nat) (i2::'A) (r2::nat => 'A recspace)) =
  1.2628 +(c1 = c2 & i1 = i2 & r1 = r2)"
  1.2629    by (import hollight CONSTR_INJ)
  1.2630  
  1.2631 -lemma CONSTR_IND: "ALL P::'A::type recspace => bool.
  1.2632 -   P BOTTOM &
  1.2633 -   (ALL (c::nat) (i::'A::type) r::nat => 'A::type recspace.
  1.2634 -       (ALL n::nat. P (r n)) --> P (CONSTR c i r)) -->
  1.2635 -   All P"
  1.2636 +lemma CONSTR_IND: "(P::'A recspace => bool) BOTTOM &
  1.2637 +(ALL (c::nat) (i::'A) r::nat => 'A recspace.
  1.2638 +    (ALL n::nat. P (r n)) --> P (CONSTR c i r))
  1.2639 +==> P (x::'A recspace)"
  1.2640    by (import hollight CONSTR_IND)
  1.2641  
  1.2642 -lemma CONSTR_REC: "ALL Fn::nat
  1.2643 -        => 'A::type
  1.2644 -           => (nat => 'A::type recspace) => (nat => 'B::type) => 'B::type.
  1.2645 -   EX f::'A::type recspace => 'B::type.
  1.2646 -      ALL (c::nat) (i::'A::type) r::nat => 'A::type recspace.
  1.2647 -         f (CONSTR c i r) = Fn c i r (%n::nat. f (r n))"
  1.2648 +lemma CONSTR_REC: "EX f::'A recspace => 'B.
  1.2649 +   ALL (c::nat) (i::'A) r::nat => 'A recspace.
  1.2650 +      f (CONSTR c i r) =
  1.2651 +      (Fn::nat => 'A => (nat => 'A recspace) => (nat => 'B) => 'B) c i r
  1.2652 +       (%n::nat. f (r n))"
  1.2653    by (import hollight CONSTR_REC)
  1.2654  
  1.2655 -definition FCONS :: "'A => (nat => 'A) => nat => 'A" where 
  1.2656 +definition
  1.2657 +  FCONS :: "'A => (nat => 'A) => nat => 'A"  where
  1.2658    "FCONS ==
  1.2659 -SOME FCONS::'A::type => (nat => 'A::type) => nat => 'A::type.
  1.2660 -   (ALL (a::'A::type) f::nat => 'A::type. FCONS a f 0 = a) &
  1.2661 -   (ALL (a::'A::type) (f::nat => 'A::type) n::nat. FCONS a f (Suc n) = f n)"
  1.2662 +SOME FCONS::'A => (nat => 'A) => nat => 'A.
  1.2663 +   (ALL (a::'A) f::nat => 'A. FCONS a f (0::nat) = a) &
  1.2664 +   (ALL (a::'A) (f::nat => 'A) n::nat. FCONS a f (Suc n) = f n)"
  1.2665  
  1.2666  lemma DEF_FCONS: "FCONS =
  1.2667 -(SOME FCONS::'A::type => (nat => 'A::type) => nat => 'A::type.
  1.2668 -    (ALL (a::'A::type) f::nat => 'A::type. FCONS a f 0 = a) &
  1.2669 -    (ALL (a::'A::type) (f::nat => 'A::type) n::nat.
  1.2670 -        FCONS a f (Suc n) = f n))"
  1.2671 +(SOME FCONS::'A => (nat => 'A) => nat => 'A.
  1.2672 +    (ALL (a::'A) f::nat => 'A. FCONS a f (0::nat) = a) &
  1.2673 +    (ALL (a::'A) (f::nat => 'A) n::nat. FCONS a f (Suc n) = f n))"
  1.2674    by (import hollight DEF_FCONS)
  1.2675  
  1.2676 -lemma FCONS_UNDO: "ALL f::nat => 'A::type. f = FCONS (f 0) (f o Suc)"
  1.2677 +lemma FCONS_UNDO: "(f::nat => 'A) = FCONS (f (0::nat)) (f o Suc)"
  1.2678    by (import hollight FCONS_UNDO)
  1.2679  
  1.2680 -definition FNIL :: "nat => 'A" where 
  1.2681 -  "FNIL == %u::nat. SOME x::'A::type. True"
  1.2682 -
  1.2683 -lemma DEF_FNIL: "FNIL = (%u::nat. SOME x::'A::type. True)"
  1.2684 +definition
  1.2685 +  FNIL :: "nat => 'A"  where
  1.2686 +  "FNIL == %u::nat. SOME x::'A. True"
  1.2687 +
  1.2688 +lemma DEF_FNIL: "FNIL = (%u::nat. SOME x::'A. True)"
  1.2689    by (import hollight DEF_FNIL)
  1.2690  
  1.2691 -consts
  1.2692 -  OUTL :: "'A + 'B => 'A" 
  1.2693 -
  1.2694 -defs
  1.2695 -  OUTL_def: "hollight.OUTL ==
  1.2696 -SOME OUTL::'A::type + 'B::type => 'A::type.
  1.2697 -   ALL x::'A::type. OUTL (Inl x) = x"
  1.2698 -
  1.2699 -lemma DEF_OUTL: "hollight.OUTL =
  1.2700 -(SOME OUTL::'A::type + 'B::type => 'A::type.
  1.2701 -    ALL x::'A::type. OUTL (Inl x) = x)"
  1.2702 -  by (import hollight DEF_OUTL)
  1.2703 -
  1.2704 -consts
  1.2705 -  OUTR :: "'A + 'B => 'B" 
  1.2706 -
  1.2707 -defs
  1.2708 -  OUTR_def: "hollight.OUTR ==
  1.2709 -SOME OUTR::'A::type + 'B::type => 'B::type.
  1.2710 -   ALL y::'B::type. OUTR (Inr y) = y"
  1.2711 -
  1.2712 -lemma DEF_OUTR: "hollight.OUTR =
  1.2713 -(SOME OUTR::'A::type + 'B::type => 'B::type.
  1.2714 -    ALL y::'B::type. OUTR (Inr y) = y)"
  1.2715 -  by (import hollight DEF_OUTR)
  1.2716 -
  1.2717 -typedef (open) ('A) option = "(Collect::('A::type recspace => bool) => 'A::type recspace set)
  1.2718 - (%a::'A::type recspace.
  1.2719 -     (All::(('A::type recspace => bool) => bool) => bool)
  1.2720 -      (%option'::'A::type recspace => bool.
  1.2721 -          (op -->::bool => bool => bool)
  1.2722 -           ((All::('A::type recspace => bool) => bool)
  1.2723 -             (%a::'A::type recspace.
  1.2724 -                 (op -->::bool => bool => bool)
  1.2725 -                  ((op |::bool => bool => bool)
  1.2726 -                    ((op =::'A::type recspace => 'A::type recspace => bool)
  1.2727 -                      a ((CONSTR::nat
  1.2728 -                                  => 'A::type
  1.2729 -                                     => (nat => 'A::type recspace)
  1.2730 -  => 'A::type recspace)
  1.2731 -                          ((NUMERAL::nat => nat) (0::nat))
  1.2732 -                          ((Eps::('A::type => bool) => 'A::type)
  1.2733 -                            (%v::'A::type. True::bool))
  1.2734 -                          (%n::nat. BOTTOM::'A::type recspace)))
  1.2735 -                    ((Ex::('A::type => bool) => bool)
  1.2736 -                      (%aa::'A::type.
  1.2737 -                          (op =::'A::type recspace
  1.2738 -                                 => 'A::type recspace => bool)
  1.2739 -                           a ((CONSTR::nat
  1.2740 - => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2741 -                               ((Suc::nat => nat)
  1.2742 -                                 ((NUMERAL::nat => nat) (0::nat)))
  1.2743 -                               aa (%n::nat. BOTTOM::'A::type recspace)))))
  1.2744 -                  (option' a)))
  1.2745 -           (option' a)))"  morphisms "_dest_option" "_mk_option"
  1.2746 -  apply (rule light_ex_imp_nonempty[where t="(CONSTR::nat => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2747 - ((NUMERAL::nat => nat) (0::nat))
  1.2748 - ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2749 - (%n::nat. BOTTOM::'A::type recspace)"])
  1.2750 -  by (import hollight TYDEF_option)
  1.2751 +definition
  1.2752 +  ISO :: "('A => 'B) => ('B => 'A) => bool"  where
  1.2753 +  "ISO ==
  1.2754 +%(u::'A => 'B) ua::'B => 'A.
  1.2755 +   (ALL x::'B. u (ua x) = x) & (ALL y::'A. ua (u y) = y)"
  1.2756 +
  1.2757 +lemma DEF_ISO: "ISO =
  1.2758 +(%(u::'A => 'B) ua::'B => 'A.
  1.2759 +    (ALL x::'B. u (ua x) = x) & (ALL y::'A. ua (u y) = y))"
  1.2760 +  by (import hollight DEF_ISO)
  1.2761 +
  1.2762 +lemma ISO_REFL: "ISO (%x::'A. x) (%x::'A. x)"
  1.2763 +  by (import hollight ISO_REFL)
  1.2764 +
  1.2765 +lemma ISO_FUN: "ISO (f::'A => 'A') (f'::'A' => 'A) & ISO (g::'B => 'B') (g'::'B' => 'B)
  1.2766 +==> ISO (%(h::'A => 'B) a'::'A'. g (h (f' a')))
  1.2767 +     (%(h::'A' => 'B') a::'A. g' (h (f a)))"
  1.2768 +  by (import hollight ISO_FUN)
  1.2769 +
  1.2770 +lemma ISO_USAGE: "ISO (f::'q_17485 => 'q_17482) (g::'q_17482 => 'q_17485)
  1.2771 +==> (ALL P::'q_17485 => bool. All P = (ALL x::'q_17482. P (g x))) &
  1.2772 +    (ALL P::'q_17485 => bool. Ex P = (EX x::'q_17482. P (g x))) &
  1.2773 +    (ALL (a::'q_17485) b::'q_17482. (a = g b) = (f a = b))"
  1.2774 +  by (import hollight ISO_USAGE)
  1.2775 +
  1.2776 +typedef (open) char = "{a. ALL char'.
  1.2777 +       (ALL a.
  1.2778 +           (EX a0 a1 a2 a3 a4 a5 a6 a7.
  1.2779 +               a =
  1.2780 +               CONSTR (NUMERAL 0) (a0, a1, a2, a3, a4, a5, a6, a7)
  1.2781 +                (%n. BOTTOM)) -->
  1.2782 +           char' a) -->
  1.2783 +       char' a}"  morphisms "_dest_char" "_mk_char"
  1.2784 +  apply (rule light_ex_imp_nonempty[where t="CONSTR (NUMERAL 0) (a0, a1, a2, a3, a4, a5, a6, a7) (%n. BOTTOM)"])
  1.2785 +  by (import hollight TYDEF_char)
  1.2786  
  1.2787  syntax
  1.2788 -  "_dest_option" :: _ ("'_dest'_option")
  1.2789 +  "_dest_char" :: _ ("'_dest'_char")
  1.2790  
  1.2791  syntax
  1.2792 -  "_mk_option" :: _ ("'_mk'_option")
  1.2793 -
  1.2794 -lemmas "TYDEF_option_@intern" = typedef_hol2hollight 
  1.2795 -  [where a="a :: 'A hollight.option" and r=r ,
  1.2796 -   OF type_definition_option]
  1.2797 -
  1.2798 -definition NONE :: "'A hollight.option" where 
  1.2799 -  "(op ==::'A::type hollight.option => 'A::type hollight.option => prop)
  1.2800 - (NONE::'A::type hollight.option)
  1.2801 - ((_mk_option::'A::type recspace => 'A::type hollight.option)
  1.2802 -   ((CONSTR::nat
  1.2803 -             => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2804 -     (0::nat)
  1.2805 -     ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2806 -     (%n::nat. BOTTOM::'A::type recspace)))"
  1.2807 -
  1.2808 -lemma DEF_NONE: "(op =::'A::type hollight.option => 'A::type hollight.option => bool)
  1.2809 - (NONE::'A::type hollight.option)
  1.2810 - ((_mk_option::'A::type recspace => 'A::type hollight.option)
  1.2811 -   ((CONSTR::nat
  1.2812 -             => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2813 -     (0::nat)
  1.2814 -     ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2815 -     (%n::nat. BOTTOM::'A::type recspace)))"
  1.2816 -  by (import hollight DEF_NONE)
  1.2817 +  "_mk_char" :: _ ("'_mk'_char")
  1.2818 +
  1.2819 +lemmas "TYDEF_char_@intern" = typedef_hol2hollight 
  1.2820 +  [where a="a :: hollight.char" and r=r ,
  1.2821 +   OF type_definition_char]
  1.2822  
  1.2823  consts
  1.2824 -  SOME :: "'A => 'A hollight.option" ("SOME")
  1.2825 -
  1.2826 -defs
  1.2827 -  SOME_def: "(op ==::('A::type => 'A::type hollight.option)
  1.2828 -        => ('A::type => 'A::type hollight.option) => prop)
  1.2829 - (SOME::'A::type => 'A::type hollight.option)
  1.2830 - (%a::'A::type.
  1.2831 -     (_mk_option::'A::type recspace => 'A::type hollight.option)
  1.2832 -      ((CONSTR::nat
  1.2833 -                => 'A::type
  1.2834 -                   => (nat => 'A::type recspace) => 'A::type recspace)
  1.2835 -        ((Suc::nat => nat) (0::nat)) a
  1.2836 -        (%n::nat. BOTTOM::'A::type recspace)))"
  1.2837 -
  1.2838 -lemma DEF_SOME: "(op =::('A::type => 'A::type hollight.option)
  1.2839 -       => ('A::type => 'A::type hollight.option) => bool)
  1.2840 - (SOME::'A::type => 'A::type hollight.option)
  1.2841 - (%a::'A::type.
  1.2842 -     (_mk_option::'A::type recspace => 'A::type hollight.option)
  1.2843 -      ((CONSTR::nat
  1.2844 -                => 'A::type
  1.2845 -                   => (nat => 'A::type recspace) => 'A::type recspace)
  1.2846 -        ((Suc::nat => nat) (0::nat)) a
  1.2847 -        (%n::nat. BOTTOM::'A::type recspace)))"
  1.2848 -  by (import hollight DEF_SOME)
  1.2849 -
  1.2850 -typedef (open) ('A) list = "(Collect::('A::type recspace => bool) => 'A::type recspace set)
  1.2851 - (%a::'A::type recspace.
  1.2852 -     (All::(('A::type recspace => bool) => bool) => bool)
  1.2853 -      (%list'::'A::type recspace => bool.
  1.2854 -          (op -->::bool => bool => bool)
  1.2855 -           ((All::('A::type recspace => bool) => bool)
  1.2856 -             (%a::'A::type recspace.
  1.2857 -                 (op -->::bool => bool => bool)
  1.2858 -                  ((op |::bool => bool => bool)
  1.2859 -                    ((op =::'A::type recspace => 'A::type recspace => bool)
  1.2860 -                      a ((CONSTR::nat
  1.2861 -                                  => 'A::type
  1.2862 -                                     => (nat => 'A::type recspace)
  1.2863 -  => 'A::type recspace)
  1.2864 -                          ((NUMERAL::nat => nat) (0::nat))
  1.2865 -                          ((Eps::('A::type => bool) => 'A::type)
  1.2866 -                            (%v::'A::type. True::bool))
  1.2867 -                          (%n::nat. BOTTOM::'A::type recspace)))
  1.2868 -                    ((Ex::('A::type => bool) => bool)
  1.2869 -                      (%a0::'A::type.
  1.2870 -                          (Ex::('A::type recspace => bool) => bool)
  1.2871 -                           (%a1::'A::type recspace.
  1.2872 -                               (op &::bool => bool => bool)
  1.2873 -                                ((op =::'A::type recspace
  1.2874 -  => 'A::type recspace => bool)
  1.2875 -                                  a ((CONSTR::nat
  1.2876 -        => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2877 -((Suc::nat => nat) ((NUMERAL::nat => nat) (0::nat))) a0
  1.2878 -((FCONS::'A::type recspace
  1.2879 -         => (nat => 'A::type recspace) => nat => 'A::type recspace)
  1.2880 -  a1 (%n::nat. BOTTOM::'A::type recspace))))
  1.2881 -                                (list' a1)))))
  1.2882 -                  (list' a)))
  1.2883 -           (list' a)))"  morphisms "_dest_list" "_mk_list"
  1.2884 -  apply (rule light_ex_imp_nonempty[where t="(CONSTR::nat => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2885 - ((NUMERAL::nat => nat) (0::nat))
  1.2886 - ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2887 - (%n::nat. BOTTOM::'A::type recspace)"])
  1.2888 -  by (import hollight TYDEF_list)
  1.2889 -
  1.2890 -syntax
  1.2891 -  "_dest_list" :: _ ("'_dest'_list")
  1.2892 -
  1.2893 -syntax
  1.2894 -  "_mk_list" :: _ ("'_mk'_list")
  1.2895 -
  1.2896 -lemmas "TYDEF_list_@intern" = typedef_hol2hollight 
  1.2897 -  [where a="a :: 'A hollight.list" and r=r ,
  1.2898 -   OF type_definition_list]
  1.2899 -
  1.2900 -definition NIL :: "'A hollight.list" where 
  1.2901 -  "(op ==::'A::type hollight.list => 'A::type hollight.list => prop)
  1.2902 - (NIL::'A::type hollight.list)
  1.2903 - ((_mk_list::'A::type recspace => 'A::type hollight.list)
  1.2904 -   ((CONSTR::nat
  1.2905 -             => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2906 -     (0::nat)
  1.2907 -     ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2908 -     (%n::nat. BOTTOM::'A::type recspace)))"
  1.2909 -
  1.2910 -lemma DEF_NIL: "(op =::'A::type hollight.list => 'A::type hollight.list => bool)
  1.2911 - (NIL::'A::type hollight.list)
  1.2912 - ((_mk_list::'A::type recspace => 'A::type hollight.list)
  1.2913 -   ((CONSTR::nat
  1.2914 -             => 'A::type => (nat => 'A::type recspace) => 'A::type recspace)
  1.2915 -     (0::nat)
  1.2916 -     ((Eps::('A::type => bool) => 'A::type) (%v::'A::type. True::bool))
  1.2917 -     (%n::nat. BOTTOM::'A::type recspace)))"
  1.2918 -  by (import hollight DEF_NIL)
  1.2919 -
  1.2920 -definition CONS :: "'A => 'A hollight.list => 'A hollight.list" where 
  1.2921 -  "(op ==::('A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2922 -        => ('A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2923 -           => prop)
  1.2924 - (CONS::'A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2925 - (%(a0::'A::type) a1::'A::type hollight.list.
  1.2926 -     (_mk_list::'A::type recspace => 'A::type hollight.list)
  1.2927 -      ((CONSTR::nat
  1.2928 -                => 'A::type
  1.2929 -                   => (nat => 'A::type recspace) => 'A::type recspace)
  1.2930 -        ((Suc::nat => nat) (0::nat)) a0
  1.2931 -        ((FCONS::'A::type recspace
  1.2932 -                 => (nat => 'A::type recspace) => nat => 'A::type recspace)
  1.2933 -          ((_dest_list::'A::type hollight.list => 'A::type recspace) a1)
  1.2934 -          (%n::nat. BOTTOM::'A::type recspace))))"
  1.2935 -
  1.2936 -lemma DEF_CONS: "(op =::('A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2937 -       => ('A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2938 -          => bool)
  1.2939 - (CONS::'A::type => 'A::type hollight.list => 'A::type hollight.list)
  1.2940 - (%(a0::'A::type) a1::'A::type hollight.list.
  1.2941 -     (_mk_list::'A::type recspace => 'A::type hollight.list)
  1.2942 -      ((CONSTR::nat
  1.2943 -                => 'A::type
  1.2944 -                   => (nat => 'A::type recspace) => 'A::type recspace)
  1.2945 -        ((Suc::nat => nat) (0::nat)) a0
  1.2946 -        ((FCONS::'A::type recspace
  1.2947 -                 => (nat => 'A::type recspace) => nat => 'A::type recspace)
  1.2948 -          ((_dest_list::'A::type hollight.list => 'A::type recspace) a1)
  1.2949 -          (%n::nat. BOTTOM::'A::type recspace))))"
  1.2950 -  by (import hollight DEF_CONS)
  1.2951 -
  1.2952 -lemma pair_RECURSION: "ALL PAIR'::'A::type => 'B::type => 'C::type.
  1.2953 -   EX x::'A::type * 'B::type => 'C::type.
  1.2954 -      ALL (a0::'A::type) a1::'B::type. x (a0, a1) = PAIR' a0 a1"
  1.2955 -  by (import hollight pair_RECURSION)
  1.2956 -
  1.2957 -lemma num_RECURSION_STD: "ALL (e::'Z::type) f::nat => 'Z::type => 'Z::type.
  1.2958 -   EX fn::nat => 'Z::type. fn 0 = e & (ALL n::nat. fn (Suc n) = f n (fn n))"
  1.2959 -  by (import hollight num_RECURSION_STD)
  1.2960 -
  1.2961 -lemma bool_RECURSION: "ALL (a::'A::type) b::'A::type.
  1.2962 -   EX x::bool => 'A::type. x False = a & x True = b"
  1.2963 -  by (import hollight bool_RECURSION)
  1.2964 -
  1.2965 -definition ISO :: "('A => 'B) => ('B => 'A) => bool" where 
  1.2966 -  "ISO ==
  1.2967 -%(u::'A::type => 'B::type) ua::'B::type => 'A::type.
  1.2968 -   (ALL x::'B::type. u (ua x) = x) & (ALL y::'A::type. ua (u y) = y)"
  1.2969 -
  1.2970 -lemma DEF_ISO: "ISO =
  1.2971 -(%(u::'A::type => 'B::type) ua::'B::type => 'A::type.
  1.2972 -    (ALL x::'B::type. u (ua x) = x) & (ALL y::'A::type. ua (u y) = y))"
  1.2973 -  by (import hollight DEF_ISO)
  1.2974 -
  1.2975 -lemma ISO_REFL: "ISO (%x::'A::type. x) (%x::'A::type. x)"
  1.2976 -  by (import hollight ISO_REFL)
  1.2977 -
  1.2978 -lemma ISO_FUN: "ISO (f::'A::type => 'A'::type) (f'::'A'::type => 'A::type) &
  1.2979 -ISO (g::'B::type => 'B'::type) (g'::'B'::type => 'B::type) -->
  1.2980 -ISO (%(h::'A::type => 'B::type) a'::'A'::type. g (h (f' a')))
  1.2981 - (%(h::'A'::type => 'B'::type) a::'A::type. g' (h (f a)))"
  1.2982 -  by (import hollight ISO_FUN)
  1.2983 -
  1.2984 -lemma ISO_USAGE: "ISO (f::'q_16636::type => 'q_16633::type)
  1.2985 - (g::'q_16633::type => 'q_16636::type) -->
  1.2986 -(ALL P::'q_16636::type => bool. All P = (ALL x::'q_16633::type. P (g x))) &
  1.2987 -(ALL P::'q_16636::type => bool. Ex P = (EX x::'q_16633::type. P (g x))) &
  1.2988 -(ALL (a::'q_16636::type) b::'q_16633::type. (a = g b) = (f a = b))"
  1.2989 -  by (import hollight ISO_USAGE)
  1.2990 -
  1.2991 -typedef (open) N_2 = "{a::bool recspace.
  1.2992 - ALL u::bool recspace => bool.
  1.2993 -    (ALL a::bool recspace.
  1.2994 -        a = CONSTR (NUMERAL 0) (SOME x::bool. True) (%n::nat. BOTTOM) |
  1.2995 -        a =
  1.2996 -        CONSTR (Suc (NUMERAL 0)) (SOME x::bool. True) (%n::nat. BOTTOM) -->
  1.2997 -        u a) -->
  1.2998 -    u a}"  morphisms "_dest_2" "_mk_2"
  1.2999 -  apply (rule light_ex_imp_nonempty[where t="CONSTR (NUMERAL 0) (SOME x::bool. True) (%n::nat. BOTTOM)"])
  1.3000 -  by (import hollight TYDEF_2)
  1.3001 -
  1.3002 -syntax
  1.3003 -  "_dest_2" :: _ ("'_dest'_2")
  1.3004 -
  1.3005 -syntax
  1.3006 -  "_mk_2" :: _ ("'_mk'_2")
  1.3007 -
  1.3008 -lemmas "TYDEF_2_@intern" = typedef_hol2hollight 
  1.3009 -  [where a="a :: N_2" and r=r ,
  1.3010 -   OF type_definition_N_2]
  1.3011 -
  1.3012 -consts
  1.3013 -  "_10302" :: "N_2" ("'_10302")
  1.3014 -
  1.3015 -defs
  1.3016 -  "_10302_def": "(op ==::N_2 => N_2 => prop) (_10302::N_2)
  1.3017 - ((_mk_2::bool recspace => N_2)
  1.3018 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3019 -     (0::nat) ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3020 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3021 -
  1.3022 -lemma DEF__10302: "(op =::N_2 => N_2 => bool) (_10302::N_2)
  1.3023 - ((_mk_2::bool recspace => N_2)
  1.3024 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3025 -     (0::nat) ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3026 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3027 -  by (import hollight DEF__10302)
  1.3028 -
  1.3029 -consts
  1.3030 -  "_10303" :: "N_2" ("'_10303")
  1.3031 -
  1.3032 -defs
  1.3033 -  "_10303_def": "(op ==::N_2 => N_2 => prop) (_10303::N_2)
  1.3034 - ((_mk_2::bool recspace => N_2)
  1.3035 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3036 -     ((Suc::nat => nat) (0::nat))
  1.3037 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3038 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3039 -
  1.3040 -lemma DEF__10303: "(op =::N_2 => N_2 => bool) (_10303::N_2)
  1.3041 - ((_mk_2::bool recspace => N_2)
  1.3042 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3043 -     ((Suc::nat => nat) (0::nat))
  1.3044 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3045 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3046 -  by (import hollight DEF__10303)
  1.3047 -
  1.3048 -definition two_1 :: "N_2" where 
  1.3049 -  "two_1 == _10302"
  1.3050 -
  1.3051 -lemma DEF_two_1: "two_1 = _10302"
  1.3052 -  by (import hollight DEF_two_1)
  1.3053 -
  1.3054 -definition two_2 :: "N_2" where 
  1.3055 -  "two_2 == _10303"
  1.3056 -
  1.3057 -lemma DEF_two_2: "two_2 = _10303"
  1.3058 -  by (import hollight DEF_two_2)
  1.3059 -
  1.3060 -typedef (open) N_3 = "{a::bool recspace.
  1.3061 - ALL u::bool recspace => bool.
  1.3062 -    (ALL a::bool recspace.
  1.3063 -        a = CONSTR (NUMERAL 0) (SOME x::bool. True) (%n::nat. BOTTOM) |
  1.3064 -        a =
  1.3065 -        CONSTR (Suc (NUMERAL 0)) (SOME x::bool. True) (%n::nat. BOTTOM) |
  1.3066 -        a =
  1.3067 -        CONSTR (Suc (Suc (NUMERAL 0))) (SOME x::bool. True)
  1.3068 -         (%n::nat. BOTTOM) -->
  1.3069 -        u a) -->
  1.3070 -    u a}"  morphisms "_dest_3" "_mk_3"
  1.3071 -  apply (rule light_ex_imp_nonempty[where t="CONSTR (NUMERAL 0) (SOME x::bool. True) (%n::nat. BOTTOM)"])
  1.3072 -  by (import hollight TYDEF_3)
  1.3073 -
  1.3074 -syntax
  1.3075 -  "_dest_3" :: _ ("'_dest'_3")
  1.3076 -
  1.3077 -syntax
  1.3078 -  "_mk_3" :: _ ("'_mk'_3")
  1.3079 -
  1.3080 -lemmas "TYDEF_3_@intern" = typedef_hol2hollight 
  1.3081 -  [where a="a :: N_3" and r=r ,
  1.3082 -   OF type_definition_N_3]
  1.3083 -
  1.3084 -consts
  1.3085 -  "_10326" :: "N_3" ("'_10326")
  1.3086 -
  1.3087 -defs
  1.3088 -  "_10326_def": "(op ==::N_3 => N_3 => prop) (_10326::N_3)
  1.3089 - ((_mk_3::bool recspace => N_3)
  1.3090 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3091 -     (0::nat) ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3092 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3093 -
  1.3094 -lemma DEF__10326: "(op =::N_3 => N_3 => bool) (_10326::N_3)
  1.3095 - ((_mk_3::bool recspace => N_3)
  1.3096 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3097 -     (0::nat) ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3098 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3099 -  by (import hollight DEF__10326)
  1.3100 -
  1.3101 -consts
  1.3102 -  "_10327" :: "N_3" ("'_10327")
  1.3103 -
  1.3104 -defs
  1.3105 -  "_10327_def": "(op ==::N_3 => N_3 => prop) (_10327::N_3)
  1.3106 - ((_mk_3::bool recspace => N_3)
  1.3107 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3108 -     ((Suc::nat => nat) (0::nat))
  1.3109 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3110 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3111 -
  1.3112 -lemma DEF__10327: "(op =::N_3 => N_3 => bool) (_10327::N_3)
  1.3113 - ((_mk_3::bool recspace => N_3)
  1.3114 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3115 -     ((Suc::nat => nat) (0::nat))
  1.3116 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3117 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3118 -  by (import hollight DEF__10327)
  1.3119 -
  1.3120 -consts
  1.3121 -  "_10328" :: "N_3" ("'_10328")
  1.3122 +  "_11937" :: "bool
  1.3123 +=> bool => bool => bool => bool => bool => bool => bool => hollight.char" ("'_11937")
  1.3124  
  1.3125  defs
  1.3126 -  "_10328_def": "(op ==::N_3 => N_3 => prop) (_10328::N_3)
  1.3127 - ((_mk_3::bool recspace => N_3)
  1.3128 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3129 -     ((Suc::nat => nat) ((Suc::nat => nat) (0::nat)))
  1.3130 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3131 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3132 -
  1.3133 -lemma DEF__10328: "(op =::N_3 => N_3 => bool) (_10328::N_3)
  1.3134 - ((_mk_3::bool recspace => N_3)
  1.3135 -   ((CONSTR::nat => bool => (nat => bool recspace) => bool recspace)
  1.3136 -     ((Suc::nat => nat) ((Suc::nat => nat) (0::nat)))
  1.3137 -     ((Eps::(bool => bool) => bool) (%x::bool. True::bool))
  1.3138 -     (%n::nat. BOTTOM::bool recspace)))"
  1.3139 -  by (import hollight DEF__10328)
  1.3140 -
  1.3141 -definition three_1 :: "N_3" where 
  1.3142 -  "three_1 == _10326"
  1.3143 -
  1.3144 -lemma DEF_three_1: "three_1 = _10326"
  1.3145 -  by (import hollight DEF_three_1)
  1.3146 -
  1.3147 -definition three_2 :: "N_3" where 
  1.3148 -  "three_2 == _10327"
  1.3149 -
  1.3150 -lemma DEF_three_2: "three_2 = _10327"
  1.3151 -  by (import hollight DEF_three_2)
  1.3152 -
  1.3153 -definition three_3 :: "N_3" where 
  1.3154 -  "three_3 == _10328"
  1.3155 -
  1.3156 -lemma DEF_three_3: "three_3 = _10328"
  1.3157 -  by (import hollight DEF_three_3)
  1.3158 -
  1.3159 -lemma list_INDUCT: "ALL P::'A::type hollight.list => bool.
  1.3160 -   P NIL &
  1.3161 -   (ALL (a0::'A::type) a1::'A::type hollight.list.
  1.3162 -       P a1 --> P (CONS a0 a1)) -->
  1.3163 -   All P"
  1.3164 -  by (import hollight list_INDUCT)
  1.3165 -
  1.3166 -definition HD :: "'A hollight.list => 'A" where 
  1.3167 -  "HD ==
  1.3168 -SOME HD::'A::type hollight.list => 'A::type.
  1.3169 -   ALL (t::'A::type hollight.list) h::'A::type. HD (CONS h t) = h"
  1.3170 -
  1.3171 -lemma DEF_HD: "HD =
  1.3172 -(SOME HD::'A::type hollight.list => 'A::type.
  1.3173 -    ALL (t::'A::type hollight.list) h::'A::type. HD (CONS h t) = h)"
  1.3174 -  by (import hollight DEF_HD)
  1.3175 -
  1.3176 -definition TL :: "'A hollight.list => 'A hollight.list" where 
  1.3177 -  "TL ==
  1.3178 -SOME TL::'A::type hollight.list => 'A::type hollight.list.
  1.3179 -   ALL (h::'A::type) t::'A::type hollight.list. TL (CONS h t) = t"
  1.3180 -
  1.3181 -lemma DEF_TL: "TL =
  1.3182 -(SOME TL::'A::type hollight.list => 'A::type hollight.list.
  1.3183 -    ALL (h::'A::type) t::'A::type hollight.list. TL (CONS h t) = t)"
  1.3184 -  by (import hollight DEF_TL)
  1.3185 -
  1.3186 -definition APPEND :: "'A hollight.list => 'A hollight.list => 'A hollight.list" where 
  1.3187 -  "APPEND ==
  1.3188 -SOME APPEND::'A::type hollight.list
  1.3189 -             => 'A::type hollight.list => 'A::type hollight.list.
  1.3190 -   (ALL l::'A::type hollight.list. APPEND NIL l = l) &
  1.3191 -   (ALL (h::'A::type) (t::'A::type hollight.list) l::'A::type hollight.list.
  1.3192 -       APPEND (CONS h t) l = CONS h (APPEND t l))"
  1.3193 -
  1.3194 -lemma DEF_APPEND: "APPEND =
  1.3195 -(SOME APPEND::'A::type hollight.list
  1.3196 -              => 'A::type hollight.list => 'A::type hollight.list.
  1.3197 -    (ALL l::'A::type hollight.list. APPEND NIL l = l) &
  1.3198 -    (ALL (h::'A::type) (t::'A::type hollight.list)
  1.3199 -        l::'A::type hollight.list.
  1.3200 -        APPEND (CONS h t) l = CONS h (APPEND t l)))"
  1.3201 -  by (import hollight DEF_APPEND)
  1.3202 -
  1.3203 -definition REVERSE :: "'A hollight.list => 'A hollight.list" where 
  1.3204 -  "REVERSE ==
  1.3205 -SOME REVERSE::'A::type hollight.list => 'A::type hollight.list.
  1.3206 -   REVERSE NIL = NIL &
  1.3207 -   (ALL (l::'A::type hollight.list) x::'A::type.
  1.3208 -       REVERSE (CONS x l) = APPEND (REVERSE l) (CONS x NIL))"
  1.3209 -
  1.3210 -lemma DEF_REVERSE: "REVERSE =
  1.3211 -(SOME REVERSE::'A::type hollight.list => 'A::type hollight.list.
  1.3212 -    REVERSE NIL = NIL &
  1.3213 -    (ALL (l::'A::type hollight.list) x::'A::type.
  1.3214 -        REVERSE (CONS x l) = APPEND (REVERSE l) (CONS x NIL)))"
  1.3215 -  by (import hollight DEF_REVERSE)
  1.3216 -
  1.3217 -definition LENGTH :: "'A hollight.list => nat" where 
  1.3218 -  "LENGTH ==
  1.3219 -SOME LENGTH::'A::type hollight.list => nat.
  1.3220 -   LENGTH NIL = 0 &
  1.3221 -   (ALL (h::'A::type) t::'A::type hollight.list.
  1.3222 -       LENGTH (CONS h t) = Suc (LENGTH t))"
  1.3223 -
  1.3224 -lemma DEF_LENGTH: "LENGTH =
  1.3225 -(SOME LENGTH::'A::type hollight.list => nat.
  1.3226 -    LENGTH NIL = 0 &
  1.3227 -    (ALL (h::'A::type) t::'A::type hollight.list.
  1.3228 -        LENGTH (CONS h t) = Suc (LENGTH t)))"
  1.3229 -  by (import hollight DEF_LENGTH)
  1.3230 -
  1.3231 -definition MAP :: "('A => 'B) => 'A hollight.list => 'B hollight.list" where 
  1.3232 -  "MAP ==
  1.3233 -SOME MAP::('A::type => 'B::type)
  1.3234 -          => 'A::type hollight.list => 'B::type hollight.list.
  1.3235 -   (ALL f::'A::type => 'B::type. MAP f NIL = NIL) &
  1.3236 -   (ALL (f::'A::type => 'B::type) (h::'A::type) t::'A::type hollight.list.
  1.3237 -       MAP f (CONS h t) = CONS (f h) (MAP f t))"
  1.3238 -
  1.3239 -lemma DEF_MAP: "MAP =
  1.3240 -(SOME MAP::('A::type => 'B::type)
  1.3241 -           => 'A::type hollight.list => 'B::type hollight.list.
  1.3242 -    (ALL f::'A::type => 'B::type. MAP f NIL = NIL) &
  1.3243 -    (ALL (f::'A::type => 'B::type) (h::'A::type) t::'A::type hollight.list.
  1.3244 -        MAP f (CONS h t) = CONS (f h) (MAP f t)))"
  1.3245 -  by (import hollight DEF_MAP)
  1.3246 -
  1.3247 -definition LAST :: "'A hollight.list => 'A" where 
  1.3248 -  "LAST ==
  1.3249 -SOME LAST::'A::type hollight.list => 'A::type.
  1.3250 -   ALL (h::'A::type) t::'A::type hollight.list.
  1.3251 -      LAST (CONS h t) = COND (t = NIL) h (LAST t)"
  1.3252 -
  1.3253 -lemma DEF_LAST: "LAST =
  1.3254 -(SOME LAST::'A::type hollight.list => 'A::type.
  1.3255 -    ALL (h::'A::type) t::'A::type hollight.list.
  1.3256 -       LAST (CONS h t) = COND (t = NIL) h (LAST t))"
  1.3257 -  by (import hollight DEF_LAST)
  1.3258 -
  1.3259 -definition REPLICATE :: "nat => 'q_16860 => 'q_16860 hollight.list" where 
  1.3260 -  "REPLICATE ==
  1.3261 -SOME REPLICATE::nat => 'q_16860::type => 'q_16860::type hollight.list.
  1.3262 -   (ALL x::'q_16860::type. REPLICATE 0 x = NIL) &
  1.3263 -   (ALL (n::nat) x::'q_16860::type.
  1.3264 -       REPLICATE (Suc n) x = CONS x (REPLICATE n x))"
  1.3265 -
  1.3266 -lemma DEF_REPLICATE: "REPLICATE =
  1.3267 -(SOME REPLICATE::nat => 'q_16860::type => 'q_16860::type hollight.list.
  1.3268 -    (ALL x::'q_16860::type. REPLICATE 0 x = NIL) &
  1.3269 -    (ALL (n::nat) x::'q_16860::type.
  1.3270 -        REPLICATE (Suc n) x = CONS x (REPLICATE n x)))"
  1.3271 -  by (import hollight DEF_REPLICATE)
  1.3272 -
  1.3273 -definition NULL :: "'q_16875 hollight.list => bool" where 
  1.3274 -  "NULL ==
  1.3275 -SOME NULL::'q_16875::type hollight.list => bool.
  1.3276 -   NULL NIL = True &
  1.3277 -   (ALL (h::'q_16875::type) t::'q_16875::type hollight.list.
  1.3278 -       NULL (CONS h t) = False)"
  1.3279 -
  1.3280 -lemma DEF_NULL: "NULL =
  1.3281 -(SOME NULL::'q_16875::type hollight.list => bool.
  1.3282 -    NULL NIL = True &
  1.3283 -    (ALL (h::'q_16875::type) t::'q_16875::type hollight.list.
  1.3284 -        NULL (CONS h t) = False))"
  1.3285 -  by (import hollight DEF_NULL)
  1.3286 -
  1.3287 -definition ALL_list :: "('q_16895 => bool) => 'q_16895 hollight.list => bool" where 
  1.3288 -  "ALL_list ==
  1.3289 -SOME u::('q_16895::type => bool) => 'q_16895::type hollight.list => bool.
  1.3290 -   (ALL P::'q_16895::type => bool. u P NIL = True) &
  1.3291 -   (ALL (h::'q_16895::type) (P::'q_16895::type => bool)
  1.3292 -       t::'q_16895::type hollight.list. u P (CONS h t) = (P h & u P t))"
  1.3293 -
  1.3294 -lemma DEF_ALL: "ALL_list =
  1.3295 -(SOME u::('q_16895::type => bool) => 'q_16895::type hollight.list => bool.
  1.3296 -    (ALL P::'q_16895::type => bool. u P NIL = True) &
  1.3297 -    (ALL (h::'q_16895::type) (P::'q_16895::type => bool)
  1.3298 -        t::'q_16895::type hollight.list. u P (CONS h t) = (P h & u P t)))"
  1.3299 -  by (import hollight DEF_ALL)
  1.3300 -
  1.3301 -consts
  1.3302 -  EX :: "('q_16916 => bool) => 'q_16916 hollight.list => bool" ("EX")
  1.3303 -
  1.3304 -defs
  1.3305 -  EX_def: "EX ==
  1.3306 -SOME u::('q_16916::type => bool) => 'q_16916::type hollight.list => bool.
  1.3307 -   (ALL P::'q_16916::type => bool. u P NIL = False) &
  1.3308 -   (ALL (h::'q_16916::type) (P::'q_16916::type => bool)
  1.3309 -       t::'q_16916::type hollight.list. u P (CONS h t) = (P h | u P t))"
  1.3310 -
  1.3311 -lemma DEF_EX: "EX =
  1.3312 -(SOME u::('q_16916::type => bool) => 'q_16916::type hollight.list => bool.
  1.3313 -    (ALL P::'q_16916::type => bool. u P NIL = False) &
  1.3314 -    (ALL (h::'q_16916::type) (P::'q_16916::type => bool)
  1.3315 -        t::'q_16916::type hollight.list. u P (CONS h t) = (P h | u P t)))"
  1.3316 -  by (import hollight DEF_EX)
  1.3317 -
  1.3318 -definition ITLIST :: "('q_16939 => 'q_16938 => 'q_16938)
  1.3319 -=> 'q_16939 hollight.list => 'q_16938 => 'q_16938" where 
  1.3320 -  "ITLIST ==
  1.3321 -SOME ITLIST::('q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3322 -             => 'q_16939::type hollight.list
  1.3323 -                => 'q_16938::type => 'q_16938::type.
  1.3324 -   (ALL (f::'q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3325 -       b::'q_16938::type. ITLIST f NIL b = b) &
  1.3326 -   (ALL (h::'q_16939::type)
  1.3327 -       (f::'q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3328 -       (t::'q_16939::type hollight.list) b::'q_16938::type.
  1.3329 -       ITLIST f (CONS h t) b = f h (ITLIST f t b))"
  1.3330 -
  1.3331 -lemma DEF_ITLIST: "ITLIST =
  1.3332 -(SOME ITLIST::('q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3333 -              => 'q_16939::type hollight.list
  1.3334 -                 => 'q_16938::type => 'q_16938::type.
  1.3335 -    (ALL (f::'q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3336 -        b::'q_16938::type. ITLIST f NIL b = b) &
  1.3337 -    (ALL (h::'q_16939::type)
  1.3338 -        (f::'q_16939::type => 'q_16938::type => 'q_16938::type)
  1.3339 -        (t::'q_16939::type hollight.list) b::'q_16938::type.
  1.3340 -        ITLIST f (CONS h t) b = f h (ITLIST f t b)))"
  1.3341 -  by (import hollight DEF_ITLIST)
  1.3342 -
  1.3343 -definition MEM :: "'q_16964 => 'q_16964 hollight.list => bool" where 
  1.3344 -  "MEM ==
  1.3345 -SOME MEM::'q_16964::type => 'q_16964::type hollight.list => bool.
  1.3346 -   (ALL x::'q_16964::type. MEM x NIL = False) &
  1.3347 -   (ALL (h::'q_16964::type) (x::'q_16964::type)
  1.3348 -       t::'q_16964::type hollight.list.
  1.3349 -       MEM x (CONS h t) = (x = h | MEM x t))"
  1.3350 -
  1.3351 -lemma DEF_MEM: "MEM =
  1.3352 -(SOME MEM::'q_16964::type => 'q_16964::type hollight.list => bool.
  1.3353 -    (ALL x::'q_16964::type. MEM x NIL = False) &
  1.3354 -    (ALL (h::'q_16964::type) (x::'q_16964::type)
  1.3355 -        t::'q_16964::type hollight.list.
  1.3356 -        MEM x (CONS h t) = (x = h | MEM x t)))"
  1.3357 -  by (import hollight DEF_MEM)
  1.3358 -
  1.3359 -definition ALL2 :: "('q_16997 => 'q_17004 => bool)
  1.3360 -=> 'q_16997 hollight.list => 'q_17004 hollight.list => bool" where 
  1.3361 -  "ALL2 ==
  1.3362 -SOME ALL2::('q_16997::type => 'q_17004::type => bool)
  1.3363 -           => 'q_16997::type hollight.list
  1.3364 -              => 'q_17004::type hollight.list => bool.
  1.3365 -   (ALL (P::'q_16997::type => 'q_17004::type => bool)
  1.3366 -       l2::'q_17004::type hollight.list. ALL2 P NIL l2 = (l2 = NIL)) &
  1.3367 -   (ALL (h1::'q_16997::type) (P::'q_16997::type => 'q_17004::type => bool)
  1.3368 -       (t1::'q_16997::type hollight.list) l2::'q_17004::type hollight.list.
  1.3369 -       ALL2 P (CONS h1 t1) l2 =
  1.3370 -       COND (l2 = NIL) False (P h1 (HD l2) & ALL2 P t1 (TL l2)))"
  1.3371 -
  1.3372 -lemma DEF_ALL2: "ALL2 =
  1.3373 -(SOME ALL2::('q_16997::type => 'q_17004::type => bool)
  1.3374 -            => 'q_16997::type hollight.list
  1.3375 -               => 'q_17004::type hollight.list => bool.
  1.3376 -    (ALL (P::'q_16997::type => 'q_17004::type => bool)
  1.3377 -        l2::'q_17004::type hollight.list. ALL2 P NIL l2 = (l2 = NIL)) &
  1.3378 -    (ALL (h1::'q_16997::type) (P::'q_16997::type => 'q_17004::type => bool)
  1.3379 -        (t1::'q_16997::type hollight.list) l2::'q_17004::type hollight.list.
  1.3380 -        ALL2 P (CONS h1 t1) l2 =
  1.3381 -        COND (l2 = NIL) False (P h1 (HD l2) & ALL2 P t1 (TL l2))))"
  1.3382 -  by (import hollight DEF_ALL2)
  1.3383 -
  1.3384 -lemma ALL2: "ALL2 (P::'q_17059::type => 'q_17058::type => bool) NIL NIL = True &
  1.3385 -ALL2 P (CONS (h1::'q_17059::type) (t1::'q_17059::type hollight.list)) NIL =
  1.3386 -False &
  1.3387 -ALL2 P NIL (CONS (h2::'q_17058::type) (t2::'q_17058::type hollight.list)) =
  1.3388 -False &
  1.3389 -ALL2 P (CONS h1 t1) (CONS h2 t2) = (P h1 h2 & ALL2 P t1 t2)"
  1.3390 -  by (import hollight ALL2)
  1.3391 -
  1.3392 -definition MAP2 :: "('q_17089 => 'q_17096 => 'q_17086)
  1.3393 -=> 'q_17089 hollight.list
  1.3394 -   => 'q_17096 hollight.list => 'q_17086 hollight.list" where 
  1.3395 -  "MAP2 ==
  1.3396 -SOME MAP2::('q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3397 -           => 'q_17089::type hollight.list
  1.3398 -              => 'q_17096::type hollight.list
  1.3399 -                 => 'q_17086::type hollight.list.
  1.3400 -   (ALL (f::'q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3401 -       l::'q_17096::type hollight.list. MAP2 f NIL l = NIL) &
  1.3402 -   (ALL (h1::'q_17089::type)
  1.3403 -       (f::'q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3404 -       (t1::'q_17089::type hollight.list) l::'q_17096::type hollight.list.
  1.3405 -       MAP2 f (CONS h1 t1) l = CONS (f h1 (HD l)) (MAP2 f t1 (TL l)))"
  1.3406 -
  1.3407 -lemma DEF_MAP2: "MAP2 =
  1.3408 -(SOME MAP2::('q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3409 -            => 'q_17089::type hollight.list
  1.3410 -               => 'q_17096::type hollight.list
  1.3411 -                  => 'q_17086::type hollight.list.
  1.3412 -    (ALL (f::'q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3413 -        l::'q_17096::type hollight.list. MAP2 f NIL l = NIL) &
  1.3414 -    (ALL (h1::'q_17089::type)
  1.3415 -        (f::'q_17089::type => 'q_17096::type => 'q_17086::type)
  1.3416 -        (t1::'q_17089::type hollight.list) l::'q_17096::type hollight.list.
  1.3417 -        MAP2 f (CONS h1 t1) l = CONS (f h1 (HD l)) (MAP2 f t1 (TL l))))"
  1.3418 -  by (import hollight DEF_MAP2)
  1.3419 -
  1.3420 -lemma MAP2: "MAP2 (f::'q_17131::type => 'q_17130::type => 'q_17137::type) NIL NIL = NIL &
  1.3421 -MAP2 f (CONS (h1::'q_17131::type) (t1::'q_17131::type hollight.list))
  1.3422 - (CONS (h2::'q_17130::type) (t2::'q_17130::type hollight.list)) =
  1.3423 -CONS (f h1 h2) (MAP2 f t1 t2)"
  1.3424 -  by (import hollight MAP2)
  1.3425 -
  1.3426 -definition EL :: "nat => 'q_17157 hollight.list => 'q_17157" where 
  1.3427 -  "EL ==
  1.3428 -SOME EL::nat => 'q_17157::type hollight.list => 'q_17157::type.
  1.3429 -   (ALL l::'q_17157::type hollight.list. EL 0 l = HD l) &
  1.3430 -   (ALL (n::nat) l::'q_17157::type hollight.list.
  1.3431 -       EL (Suc n) l = EL n (TL l))"
  1.3432 -
  1.3433 -lemma DEF_EL: "EL =
  1.3434 -(SOME EL::nat => 'q_17157::type hollight.list => 'q_17157::type.
  1.3435 -    (ALL l::'q_17157::type hollight.list. EL 0 l = HD l) &
  1.3436 -    (ALL (n::nat) l::'q_17157::type hollight.list.
  1.3437 -        EL (Suc n) l = EL n (TL l)))"
  1.3438 -  by (import hollight DEF_EL)
  1.3439 -
  1.3440 -definition FILTER :: "('q_17182 => bool) => 'q_17182 hollight.list => 'q_17182 hollight.list" where 
  1.3441 -  "FILTER ==
  1.3442 -SOME FILTER::('q_17182::type => bool)
  1.3443 -             => 'q_17182::type hollight.list
  1.3444 -                => 'q_17182::type hollight.list.
  1.3445 -   (ALL P::'q_17182::type => bool. FILTER P NIL = NIL) &
  1.3446 -   (ALL (h::'q_17182::type) (P::'q_17182::type => bool)
  1.3447 -       t::'q_17182::type hollight.list.
  1.3448 -       FILTER P (CONS h t) = COND (P h) (CONS h (FILTER P t)) (FILTER P t))"
  1.3449 -
  1.3450 -lemma DEF_FILTER: "FILTER =
  1.3451 -(SOME FILTER::('q_17182::type => bool)
  1.3452 -              => 'q_17182::type hollight.list
  1.3453 -                 => 'q_17182::type hollight.list.
  1.3454 -    (ALL P::'q_17182::type => bool. FILTER P NIL = NIL) &
  1.3455 -    (ALL (h::'q_17182::type) (P::'q_17182::type => bool)
  1.3456 -        t::'q_17182::type hollight.list.
  1.3457 -        FILTER P (CONS h t) =
  1.3458 -        COND (P h) (CONS h (FILTER P t)) (FILTER P t)))"
  1.3459 -  by (import hollight DEF_FILTER)
  1.3460 -
  1.3461 -definition ASSOC :: "'q_17211 => ('q_17211 * 'q_17205) hollight.list => 'q_17205" where 
  1.3462 -  "ASSOC ==
  1.3463 -SOME ASSOC::'q_17211::type
  1.3464 -            => ('q_17211::type * 'q_17205::type) hollight.list
  1.3465 -               => 'q_17205::type.
  1.3466 -   ALL (h::'q_17211::type * 'q_17205::type) (a::'q_17211::type)
  1.3467 -      t::('q_17211::type * 'q_17205::type) hollight.list.
  1.3468 -      ASSOC a (CONS h t) = COND (fst h = a) (snd h) (ASSOC a t)"
  1.3469 -
  1.3470 -lemma DEF_ASSOC: "ASSOC =
  1.3471 -(SOME ASSOC::'q_17211::type
  1.3472 -             => ('q_17211::type * 'q_17205::type) hollight.list
  1.3473 -                => 'q_17205::type.
  1.3474 -    ALL (h::'q_17211::type * 'q_17205::type) (a::'q_17211::type)
  1.3475 -       t::('q_17211::type * 'q_17205::type) hollight.list.
  1.3476 -       ASSOC a (CONS h t) = COND (fst h = a) (snd h) (ASSOC a t))"
  1.3477 -  by (import hollight DEF_ASSOC)
  1.3478 -
  1.3479 -definition ITLIST2 :: "('q_17235 => 'q_17243 => 'q_17233 => 'q_17233)
  1.3480 -=> 'q_17235 hollight.list => 'q_17243 hollight.list => 'q_17233 => 'q_17233" where 
  1.3481 -  "ITLIST2 ==
  1.3482 -SOME ITLIST2::('q_17235::type
  1.3483 -               => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3484 -              => 'q_17235::type hollight.list
  1.3485 -                 => 'q_17243::type hollight.list
  1.3486 -                    => 'q_17233::type => 'q_17233::type.
  1.3487 -   (ALL (f::'q_17235::type
  1.3488 -            => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3489 -       (l2::'q_17243::type hollight.list) b::'q_17233::type.
  1.3490 -       ITLIST2 f NIL l2 b = b) &
  1.3491 -   (ALL (h1::'q_17235::type)
  1.3492 -       (f::'q_17235::type
  1.3493 -           => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3494 -       (t1::'q_17235::type hollight.list) (l2::'q_17243::type hollight.list)
  1.3495 -       b::'q_17233::type.
  1.3496 -       ITLIST2 f (CONS h1 t1) l2 b = f h1 (HD l2) (ITLIST2 f t1 (TL l2) b))"
  1.3497 -
  1.3498 -lemma DEF_ITLIST2: "ITLIST2 =
  1.3499 -(SOME ITLIST2::('q_17235::type
  1.3500 -                => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3501 -               => 'q_17235::type hollight.list
  1.3502 -                  => 'q_17243::type hollight.list
  1.3503 -                     => 'q_17233::type => 'q_17233::type.
  1.3504 -    (ALL (f::'q_17235::type
  1.3505 -             => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3506 -        (l2::'q_17243::type hollight.list) b::'q_17233::type.
  1.3507 -        ITLIST2 f NIL l2 b = b) &
  1.3508 -    (ALL (h1::'q_17235::type)
  1.3509 -        (f::'q_17235::type
  1.3510 -            => 'q_17243::type => 'q_17233::type => 'q_17233::type)
  1.3511 -        (t1::'q_17235::type hollight.list)
  1.3512 -        (l2::'q_17243::type hollight.list) b::'q_17233::type.
  1.3513 -        ITLIST2 f (CONS h1 t1) l2 b =
  1.3514 -        f h1 (HD l2) (ITLIST2 f t1 (TL l2) b)))"
  1.3515 -  by (import hollight DEF_ITLIST2)
  1.3516 -
  1.3517 -lemma ITLIST2: "ITLIST2
  1.3518 - (f::'q_17277::type => 'q_17276::type => 'q_17275::type => 'q_17275::type)
  1.3519 - NIL NIL (b::'q_17275::type) =
  1.3520 -b &
  1.3521 -ITLIST2 f (CONS (h1::'q_17277::type) (t1::'q_17277::type hollight.list))
  1.3522 - (CONS (h2::'q_17276::type) (t2::'q_17276::type hollight.list)) b =
  1.3523 -f h1 h2 (ITLIST2 f t1 t2 b)"
  1.3524 -  by (import hollight ITLIST2)
  1.3525 +  "_11937_def": "_11937 ==
  1.3526 +%(a0::bool) (a1::bool) (a2::bool) (a3::bool) (a4::bool) (a5::bool)
  1.3527 +   (a6::bool) a7::bool.
  1.3528 +   _mk_char
  1.3529 +    (CONSTR (0::nat) (a0, a1, a2, a3, a4, a5, a6, a7) (%n::nat. BOTTOM))"
  1.3530 +
  1.3531 +lemma DEF__11937: "_11937 =
  1.3532 +(%(a0::bool) (a1::bool) (a2::bool) (a3::bool) (a4::bool) (a5::bool)
  1.3533 +    (a6::bool) a7::bool.
  1.3534 +    _mk_char
  1.3535 +     (CONSTR (0::nat) (a0, a1, a2, a3, a4, a5, a6, a7) (%n::nat. BOTTOM)))"
  1.3536 +  by (import hollight DEF__11937)
  1.3537 +
  1.3538 +definition
  1.3539 +  ASCII :: "bool
  1.3540 +=> bool => bool => bool => bool => bool => bool => bool => hollight.char"  where
  1.3541 +  "ASCII == _11937"
  1.3542 +
  1.3543 +lemma DEF_ASCII: "ASCII = _11937"
  1.3544 +  by (import hollight DEF_ASCII)
  1.3545  
  1.3546  consts
  1.3547 -  ZIP :: "'q_17307 hollight.list
  1.3548 -=> 'q_17315 hollight.list => ('q_17307 * 'q_17315) hollight.list" 
  1.3549 +  dist :: "nat * nat => nat" 
  1.3550  
  1.3551  defs
  1.3552 -  ZIP_def: "hollight.ZIP ==
  1.3553 -SOME ZIP::'q_17307::type hollight.list
  1.3554 -          => 'q_17315::type hollight.list
  1.3555 -             => ('q_17307::type * 'q_17315::type) hollight.list.
  1.3556 -   (ALL l2::'q_17315::type hollight.list. ZIP NIL l2 = NIL) &
  1.3557 -   (ALL (h1::'q_17307::type) (t1::'q_17307::type hollight.list)
  1.3558 -       l2::'q_17315::type hollight.list.
  1.3559 -       ZIP (CONS h1 t1) l2 = CONS (h1, HD l2) (ZIP t1 (TL l2)))"
  1.3560 -
  1.3561 -lemma DEF_ZIP: "hollight.ZIP =
  1.3562 -(SOME ZIP::'q_17307::type hollight.list
  1.3563 -           => 'q_17315::type hollight.list
  1.3564 -              => ('q_17307::type * 'q_17315::type) hollight.list.
  1.3565 -    (ALL l2::'q_17315::type hollight.list. ZIP NIL l2 = NIL) &
  1.3566 -    (ALL (h1::'q_17307::type) (t1::'q_17307::type hollight.list)
  1.3567 -        l2::'q_17315::type hollight.list.
  1.3568 -        ZIP (CONS h1 t1) l2 = CONS (h1, HD l2) (ZIP t1 (TL l2))))"
  1.3569 -  by (import hollight DEF_ZIP)
  1.3570 -
  1.3571 -lemma ZIP: "(op &::bool => bool => bool)
  1.3572 - ((op =::('q_17326::type * 'q_17327::type) hollight.list
  1.3573 -         => ('q_17326::type * 'q_17327::type) hollight.list => bool)
  1.3574 -   ((hollight.ZIP::'q_17326::type hollight.list
  1.3575 -                   => 'q_17327::type hollight.list
  1.3576 -                      => ('q_17326::type * 'q_17327::type) hollight.list)
  1.3577 -     (NIL::'q_17326::type hollight.list)
  1.3578 -     (NIL::'q_17327::type hollight.list))
  1.3579 -   (NIL::('q_17326::type * 'q_17327::type) hollight.list))
  1.3580 - ((op =::('q_17351::type * 'q_17352::type) hollight.list
  1.3581 -         => ('q_17351::type * 'q_17352::type) hollight.list => bool)
  1.3582 -   ((hollight.ZIP::'q_17351::type hollight.list
  1.3583 -                   => 'q_17352::type hollight.list
  1.3584 -                      => ('q_17351::type * 'q_17352::type) hollight.list)
  1.3585 -     ((CONS::'q_17351::type
  1.3586 -             => 'q_17351::type hollight.list
  1.3587 -                => 'q_17351::type hollight.list)
  1.3588 -       (h1::'q_17351::type) (t1::'q_17351::type hollight.list))
  1.3589 -     ((CONS::'q_17352::type
  1.3590 -             => 'q_17352::type hollight.list
  1.3591 -                => 'q_17352::type hollight.list)
  1.3592 -       (h2::'q_17352::type) (t2::'q_17352::type hollight.list)))
  1.3593 -   ((CONS::'q_17351::type * 'q_17352::type
  1.3594 -           => ('q_17351::type * 'q_17352::type) hollight.list
  1.3595 -              => ('q_17351::type * 'q_17352::type) hollight.list)
  1.3596 -     ((Pair::'q_17351::type
  1.3597 -             => 'q_17352::type => 'q_17351::type * 'q_17352::type)
  1.3598 -       h1 h2)
  1.3599 -     ((hollight.ZIP::'q_17351::type hollight.list
  1.3600 -                     => 'q_17352::type hollight.list
  1.3601 -                        => ('q_17351::type * 'q_17352::type) hollight.list)
  1.3602 -       t1 t2)))"
  1.3603 -  by (import hollight ZIP)
  1.3604 -
  1.3605 -lemma NOT_CONS_NIL: "ALL (x::'A::type) xa::'A::type hollight.list. CONS x xa ~= NIL"
  1.3606 -  by (import hollight NOT_CONS_NIL)
  1.3607 -
  1.3608 -lemma LAST_CLAUSES: "LAST (CONS (h::'A::type) NIL) = h &
  1.3609 -LAST (CONS h (CONS (k::'A::type) (t::'A::type hollight.list))) =
  1.3610 -LAST (CONS k t)"
  1.3611 -  by (import hollight LAST_CLAUSES)
  1.3612 -
  1.3613 -lemma APPEND_NIL: "ALL l::'A::type hollight.list. APPEND l NIL = l"
  1.3614 -  by (import hollight APPEND_NIL)
  1.3615 -
  1.3616 -lemma APPEND_ASSOC: "ALL (l::'A::type hollight.list) (m::'A::type hollight.list)
  1.3617 -   n::'A::type hollight.list. APPEND l (APPEND m n) = APPEND (APPEND l m) n"
  1.3618 -  by (import hollight APPEND_ASSOC)
  1.3619 -
  1.3620 -lemma REVERSE_APPEND: "ALL (l::'A::type hollight.list) m::'A::type hollight.list.
  1.3621 -   REVERSE (APPEND l m) = APPEND (REVERSE m) (REVERSE l)"
  1.3622 -  by (import hollight REVERSE_APPEND)
  1.3623 -
  1.3624 -lemma REVERSE_REVERSE: "ALL l::'A::type hollight.list. REVERSE (REVERSE l) = l"
  1.3625 -  by (import hollight REVERSE_REVERSE)
  1.3626 -
  1.3627 -lemma CONS_11: "ALL (x::'A::type) (xa::'A::type) (xb::'A::type hollight.list)
  1.3628 -   xc::'A::type hollight.list. (CONS x xb = CONS xa xc) = (x = xa & xb = xc)"
  1.3629 -  by (import hollight CONS_11)
  1.3630 -
  1.3631 -lemma list_CASES: "ALL l::'A::type hollight.list.
  1.3632 -   l = NIL | (EX (h::'A::type) t::'A::type hollight.list. l = CONS h t)"
  1.3633 -  by (import hollight list_CASES)
  1.3634 -
  1.3635 -lemma LENGTH_APPEND: "ALL (l::'A::type hollight.list) m::'A::type hollight.list.
  1.3636 -   LENGTH (APPEND l m) = LENGTH l + LENGTH m"
  1.3637 -  by (import hollight LENGTH_APPEND)
  1.3638 -
  1.3639 -lemma MAP_APPEND: "ALL (f::'A::type => 'B::type) (l1::'A::type hollight.list)
  1.3640 -   l2::'A::type hollight.list.
  1.3641 -   MAP f (APPEND l1 l2) = APPEND (MAP f l1) (MAP f l2)"
  1.3642 -  by (import hollight MAP_APPEND)
  1.3643 -
  1.3644 -lemma LENGTH_MAP: "ALL (l::'A::type hollight.list) f::'A::type => 'B::type.
  1.3645 -   LENGTH (MAP f l) = LENGTH l"
  1.3646 -  by (import hollight LENGTH_MAP)
  1.3647 -
  1.3648 -lemma LENGTH_EQ_NIL: "ALL l::'A::type hollight.list. (LENGTH l = 0) = (l = NIL)"
  1.3649 -  by (import hollight LENGTH_EQ_NIL)
  1.3650 -
  1.3651 -lemma LENGTH_EQ_CONS: "ALL (l::'q_17659::type hollight.list) n::nat.
  1.3652 -   (LENGTH l = Suc n) =
  1.3653 -   (EX (h::'q_17659::type) t::'q_17659::type hollight.list.
  1.3654 -       l = CONS h t & LENGTH t = n)"
  1.3655 -  by (import hollight LENGTH_EQ_CONS)
  1.3656 -
  1.3657 -lemma MAP_o: "ALL (f::'A::type => 'B::type) (g::'B::type => 'C::type)
  1.3658 -   l::'A::type hollight.list. MAP (g o f) l = MAP g (MAP f l)"
  1.3659 -  by (import hollight MAP_o)
  1.3660 -
  1.3661 -lemma MAP_EQ: "ALL (f::'q_17723::type => 'q_17734::type)
  1.3662 -   (g::'q_17723::type => 'q_17734::type) l::'q_17723::type hollight.list.
  1.3663 -   ALL_list (%x::'q_17723::type. f x = g x) l --> MAP f l = MAP g l"
  1.3664 -  by (import hollight MAP_EQ)
  1.3665 -
  1.3666 -lemma ALL_IMP: "ALL (P::'q_17764::type => bool) (Q::'q_17764::type => bool)
  1.3667 -   l::'q_17764::type hollight.list.
  1.3668 -   (ALL x::'q_17764::type. MEM x l & P x --> Q x) & ALL_list P l -->
  1.3669 -   ALL_list Q l"
  1.3670 -  by (import hollight ALL_IMP)
  1.3671 -
  1.3672 -lemma NOT_EX: "ALL (P::'q_17792::type => bool) l::'q_17792::type hollight.list.
  1.3673 -   (~ EX P l) = ALL_list (%x::'q_17792::type. ~ P x) l"
  1.3674 -  by (import hollight NOT_EX)
  1.3675 -
  1.3676 -lemma NOT_ALL: "ALL (P::'q_17814::type => bool) l::'q_17814::type hollight.list.
  1.3677 -   (~ ALL_list P l) = EX (%x::'q_17814::type. ~ P x) l"
  1.3678 -  by (import hollight NOT_ALL)
  1.3679 -
  1.3680 -lemma ALL_MAP: "ALL (P::'q_17836::type => bool) (f::'q_17835::type => 'q_17836::type)
  1.3681 -   l::'q_17835::type hollight.list.
  1.3682 -   ALL_list P (MAP f l) = ALL_list (P o f) l"
  1.3683 -  by (import hollight ALL_MAP)
  1.3684 -
  1.3685 -lemma ALL_T: "All (ALL_list (%x::'q_17854::type. True))"
  1.3686 -  by (import hollight ALL_T)
  1.3687 -
  1.3688 -lemma MAP_EQ_ALL2: "ALL (l::'q_17879::type hollight.list) m::'q_17879::type hollight.list.
  1.3689 -   ALL2
  1.3690 -    (%(x::'q_17879::type) y::'q_17879::type.
  1.3691 -        (f::'q_17879::type => 'q_17890::type) x = f y)
  1.3692 -    l m -->
  1.3693 -   MAP f l = MAP f m"
  1.3694 -  by (import hollight MAP_EQ_ALL2)
  1.3695 -
  1.3696 -lemma ALL2_MAP: "ALL (P::'q_17921::type => 'q_17922::type => bool)
  1.3697 -   (f::'q_17922::type => 'q_17921::type) l::'q_17922::type hollight.list.
  1.3698 -   ALL2 P (MAP f l) l = ALL_list (%a::'q_17922::type. P (f a) a) l"
  1.3699 -  by (import hollight ALL2_MAP)
  1.3700 -
  1.3701 -lemma MAP_EQ_DEGEN: "ALL (l::'q_17939::type hollight.list) f::'q_17939::type => 'q_17939::type.
  1.3702 -   ALL_list (%x::'q_17939::type. f x = x) l --> MAP f l = l"
  1.3703 -  by (import hollight MAP_EQ_DEGEN)
  1.3704 -
  1.3705 -lemma ALL2_AND_RIGHT: "ALL (l::'q_17982::type hollight.list) (m::'q_17981::type hollight.list)
  1.3706 -   (P::'q_17982::type => bool) Q::'q_17982::type => 'q_17981::type => bool.
  1.3707 -   ALL2 (%(x::'q_17982::type) y::'q_17981::type. P x & Q x y) l m =
  1.3708 -   (ALL_list P l & ALL2 Q l m)"
  1.3709 -  by (import hollight ALL2_AND_RIGHT)
  1.3710 -
  1.3711 -lemma ITLIST_EXTRA: "ALL l::'q_18019::type hollight.list.
  1.3712 -   ITLIST (f::'q_18019::type => 'q_18018::type => 'q_18018::type)
  1.3713 -    (APPEND l (CONS (a::'q_18019::type) NIL)) (b::'q_18018::type) =
  1.3714 -   ITLIST f l (f a b)"
  1.3715 -  by (import hollight ITLIST_EXTRA)
  1.3716 -
  1.3717 -lemma ALL_MP: "ALL (P::'q_18045::type => bool) (Q::'q_18045::type => bool)
  1.3718 -   l::'q_18045::type hollight.list.
  1.3719 -   ALL_list (%x::'q_18045::type. P x --> Q x) l & ALL_list P l -->
  1.3720 -   ALL_list Q l"
  1.3721 -  by (import hollight ALL_MP)
  1.3722 -
  1.3723 -lemma AND_ALL: "ALL x::'q_18075::type hollight.list.
  1.3724 -   (ALL_list (P::'q_18075::type => bool) x &
  1.3725 -    ALL_list (Q::'q_18075::type => bool) x) =
  1.3726 -   ALL_list (%x::'q_18075::type. P x & Q x) x"
  1.3727 -  by (import hollight AND_ALL)
  1.3728 -
  1.3729 -lemma EX_IMP: "ALL (P::'q_18105::type => bool) (Q::'q_18105::type => bool)
  1.3730 -   l::'q_18105::type hollight.list.
  1.3731 -   (ALL x::'q_18105::type. MEM x l & P x --> Q x) & EX P l --> EX Q l"
  1.3732 -  by (import hollight EX_IMP)
  1.3733 -
  1.3734 -lemma ALL_MEM: "ALL (P::'q_18132::type => bool) l::'q_18132::type hollight.list.
  1.3735 -   (ALL x::'q_18132::type. MEM x l --> P x) = ALL_list P l"
  1.3736 -  by (import hollight ALL_MEM)
  1.3737 -
  1.3738 -lemma LENGTH_REPLICATE: "ALL (n::nat) x::'q_18150::type. LENGTH (REPLICATE n x) = n"
  1.3739 -  by (import hollight LENGTH_REPLICATE)
  1.3740 -
  1.3741 -lemma EX_MAP: "ALL (P::'q_18174::type => bool) (f::'q_18173::type => 'q_18174::type)
  1.3742 -   l::'q_18173::type hollight.list. EX P (MAP f l) = EX (P o f) l"
  1.3743 -  by (import hollight EX_MAP)
  1.3744 -
  1.3745 -lemma EXISTS_EX: "ALL (P::'q_18212::type => 'q_18211::type => bool)
  1.3746 -   l::'q_18211::type hollight.list.
  1.3747 -   (EX x::'q_18212::type. EX (P x) l) =
  1.3748 -   EX (%s::'q_18211::type. EX x::'q_18212::type. P x s) l"
  1.3749 -  by (import hollight EXISTS_EX)
  1.3750 -
  1.3751 -lemma FORALL_ALL: "ALL (P::'q_18242::type => 'q_18241::type => bool)
  1.3752 -   l::'q_18241::type hollight.list.
  1.3753 -   (ALL x::'q_18242::type. ALL_list (P x) l) =
  1.3754 -   ALL_list (%s::'q_18241::type. ALL x::'q_18242::type. P x s) l"
  1.3755 -  by (import hollight FORALL_ALL)
  1.3756 -
  1.3757 -lemma MEM_APPEND: "ALL (x::'q_18270::type) (l1::'q_18270::type hollight.list)
  1.3758 -   l2::'q_18270::type hollight.list.
  1.3759 -   MEM x (APPEND l1 l2) = (MEM x l1 | MEM x l2)"
  1.3760 -  by (import hollight MEM_APPEND)
  1.3761 -
  1.3762 -lemma MEM_MAP: "ALL (f::'q_18306::type => 'q_18303::type) (y::'q_18303::type)
  1.3763 -   l::'q_18306::type hollight.list.
  1.3764 -   MEM y (MAP f l) = (EX x::'q_18306::type. MEM x l & y = f x)"
  1.3765 -  by (import hollight MEM_MAP)
  1.3766 -
  1.3767 -lemma FILTER_APPEND: "ALL (P::'q_18337::type => bool) (l1::'q_18337::type hollight.list)
  1.3768 -   l2::'q_18337::type hollight.list.
  1.3769 -   FILTER P (APPEND l1 l2) = APPEND (FILTER P l1) (FILTER P l2)"
  1.3770 -  by (import hollight FILTER_APPEND)
  1.3771 -
  1.3772 -lemma FILTER_MAP: "ALL (P::'q_18364::type => bool) (f::'q_18371::type => 'q_18364::type)
  1.3773 -   l::'q_18371::type hollight.list.
  1.3774 -   FILTER P (MAP f l) = MAP f (FILTER (P o f) l)"
  1.3775 -  by (import hollight FILTER_MAP)
  1.3776 -
  1.3777 -lemma MEM_FILTER: "ALL (P::'q_18398::type => bool) (l::'q_18398::type hollight.list)
  1.3778 -   x::'q_18398::type. MEM x (FILTER P l) = (P x & MEM x l)"
  1.3779 -  by (import hollight MEM_FILTER)
  1.3780 -
  1.3781 -lemma EX_MEM: "ALL (P::'q_18419::type => bool) l::'q_18419::type hollight.list.
  1.3782 -   (EX x::'q_18419::type. P x & MEM x l) = EX P l"
  1.3783 -  by (import hollight EX_MEM)
  1.3784 -
  1.3785 -lemma MAP_FST_ZIP: "ALL (l1::'q_18439::type hollight.list) l2::'q_18441::type hollight.list.
  1.3786 -   LENGTH l1 = LENGTH l2 --> MAP fst (hollight.ZIP l1 l2) = l1"
  1.3787 -  by (import hollight MAP_FST_ZIP)
  1.3788 -
  1.3789 -lemma MAP_SND_ZIP: "ALL (l1::'q_18470::type hollight.list) l2::'q_18472::type hollight.list.
  1.3790 -   LENGTH l1 = LENGTH l2 --> MAP snd (hollight.ZIP l1 l2) = l2"
  1.3791 -  by (import hollight MAP_SND_ZIP)
  1.3792 -
  1.3793 -lemma MEM_ASSOC: "ALL (l::('q_18516::type * 'q_18500::type) hollight.list) x::'q_18516::type.
  1.3794 -   MEM (x, ASSOC x l) l = MEM x (MAP fst l)"
  1.3795 -  by (import hollight MEM_ASSOC)
  1.3796 -
  1.3797 -lemma ALL_APPEND: "ALL (P::'q_18537::type => bool) (l1::'q_18537::type hollight.list)
  1.3798 -   l2::'q_18537::type hollight.list.
  1.3799 -   ALL_list P (APPEND l1 l2) = (ALL_list P l1 & ALL_list P l2)"
  1.3800 -  by (import hollight ALL_APPEND)
  1.3801 -
  1.3802 -lemma MEM_EL: "ALL (l::'q_18560::type hollight.list) n::nat.
  1.3803 -   < n (LENGTH l) --> MEM (EL n l) l"
  1.3804 -  by (import hollight MEM_EL)
  1.3805 -
  1.3806 -lemma ALL2_MAP2: "ALL (l::'q_18603::type hollight.list) m::'q_18604::type hollight.list.
  1.3807 -   ALL2 (P::'q_18602::type => 'q_18601::type => bool)
  1.3808 -    (MAP (f::'q_18603::type => 'q_18602::type) l)
  1.3809 -    (MAP (g::'q_18604::type => 'q_18601::type) m) =
  1.3810 -   ALL2 (%(x::'q_18603::type) y::'q_18604::type. P (f x) (g y)) l m"
  1.3811 -  by (import hollight ALL2_MAP2)
  1.3812 -
  1.3813 -lemma AND_ALL2: "ALL (P::'q_18650::type => 'q_18649::type => bool)
  1.3814 -   (Q::'q_18650::type => 'q_18649::type => bool)
  1.3815 -   (x::'q_18650::type hollight.list) xa::'q_18649::type hollight.list.
  1.3816 -   (ALL2 P x xa & ALL2 Q x xa) =
  1.3817 -   ALL2 (%(x::'q_18650::type) y::'q_18649::type. P x y & Q x y) x xa"
  1.3818 -  by (import hollight AND_ALL2)
  1.3819 -
  1.3820 -lemma ALL2_ALL: "ALL (P::'q_18672::type => 'q_18672::type => bool)
  1.3821 -   l::'q_18672::type hollight.list.
  1.3822 -   ALL2 P l l = ALL_list (%x::'q_18672::type. P x x) l"
  1.3823 -  by (import hollight ALL2_ALL)
  1.3824 -
  1.3825 -lemma APPEND_EQ_NIL: "ALL (x::'q_18701::type hollight.list) xa::'q_18701::type hollight.list.
  1.3826 -   (APPEND x xa = NIL) = (x = NIL & xa = NIL)"
  1.3827 -  by (import hollight APPEND_EQ_NIL)
  1.3828 -
  1.3829 -lemma LENGTH_MAP2: "ALL (f::'q_18721::type => 'q_18723::type => 'q_18734::type)
  1.3830 -   (l::'q_18721::type hollight.list) m::'q_18723::type hollight.list.
  1.3831 -   LENGTH l = LENGTH m --> LENGTH (MAP2 f l m) = LENGTH m"
  1.3832 -  by (import hollight LENGTH_MAP2)
  1.3833 -
  1.3834 -lemma MONO_ALL: "(ALL x::'A::type. (P::'A::type => bool) x --> (Q::'A::type => bool) x) -->
  1.3835 -ALL_list P (l::'A::type hollight.list) --> ALL_list Q l"
  1.3836 -  by (import hollight MONO_ALL)
  1.3837 -
  1.3838 -lemma MONO_ALL2: "(ALL (x::'A::type) y::'B::type.
  1.3839 -    (P::'A::type => 'B::type => bool) x y -->
  1.3840 -    (Q::'A::type => 'B::type => bool) x y) -->
  1.3841 -ALL2 P (l::'A::type hollight.list) (l'::'B::type hollight.list) -->
  1.3842 -ALL2 Q l l'"
  1.3843 -  by (import hollight MONO_ALL2)
  1.3844 -
  1.3845 -definition dist :: "nat * nat => nat" where 
  1.3846 -  "dist == %u::nat * nat. fst u - snd u + (snd u - fst u)"
  1.3847 -
  1.3848 -lemma DEF_dist: "dist = (%u::nat * nat. fst u - snd u + (snd u - fst u))"
  1.3849 +  dist_def: "hollight.dist == %u. fst u - snd u + (snd u - fst u)"
  1.3850 +
  1.3851 +lemma DEF_dist: "hollight.dist = (%u. fst u - snd u + (snd u - fst u))"
  1.3852    by (import hollight DEF_dist)
  1.3853  
  1.3854 -lemma DIST_REFL: "ALL x::nat. dist (x, x) = 0"
  1.3855 +lemma DIST_REFL: "hollight.dist (x, x) = 0"
  1.3856    by (import hollight DIST_REFL)
  1.3857  
  1.3858 -lemma DIST_LZERO: "ALL x::nat. dist (0, x) = x"
  1.3859 +lemma DIST_LZERO: "hollight.dist (0, x) = x"
  1.3860    by (import hollight DIST_LZERO)
  1.3861  
  1.3862 -lemma DIST_RZERO: "ALL x::nat. dist (x, 0) = x"
  1.3863 +lemma DIST_RZERO: "hollight.dist (x, 0) = x"
  1.3864    by (import hollight DIST_RZERO)
  1.3865  
  1.3866 -lemma DIST_SYM: "ALL (x::nat) xa::nat. dist (x, xa) = dist (xa, x)"
  1.3867 +lemma DIST_SYM: "hollight.dist (x, xa) = hollight.dist (xa, x)"
  1.3868    by (import hollight DIST_SYM)
  1.3869  
  1.3870 -lemma DIST_LADD: "ALL (x::nat) (xa::nat) xb::nat. dist (x + xb, x + xa) = dist (xb, xa)"
  1.3871 +lemma DIST_LADD: "hollight.dist (x + xb, x + xa) = hollight.dist (xb, xa)"
  1.3872    by (import hollight DIST_LADD)
  1.3873  
  1.3874 -lemma DIST_RADD: "ALL (x::nat) (xa::nat) xb::nat. dist (x + xa, xb + xa) = dist (x, xb)"
  1.3875 +lemma DIST_RADD: "hollight.dist (x + xa, xb + xa) = hollight.dist (x, xb)"
  1.3876    by (import hollight DIST_RADD)
  1.3877  
  1.3878 -lemma DIST_LADD_0: "ALL (x::nat) xa::nat. dist (x + xa, x) = xa"
  1.3879 +lemma DIST_LADD_0: "hollight.dist (x + xa, x) = xa"
  1.3880    by (import hollight DIST_LADD_0)
  1.3881  
  1.3882 -lemma DIST_RADD_0: "ALL (x::nat) xa::nat. dist (x, x + xa) = xa"
  1.3883 +lemma DIST_RADD_0: "hollight.dist (x, x + xa) = xa"
  1.3884    by (import hollight DIST_RADD_0)
  1.3885  
  1.3886 -lemma DIST_LMUL: "ALL (x::nat) (xa::nat) xb::nat. x * dist (xa, xb) = dist (x * xa, x * xb)"
  1.3887 +lemma DIST_LMUL: "x * hollight.dist (xa, xb) = hollight.dist (x * xa, x * xb)"
  1.3888    by (import hollight DIST_LMUL)
  1.3889  
  1.3890 -lemma DIST_RMUL: "ALL (x::nat) (xa::nat) xb::nat. dist (x, xa) * xb = dist (x * xb, xa * xb)"
  1.3891 +lemma DIST_RMUL: "hollight.dist (x, xa) * xb = hollight.dist (x * xb, xa * xb)"
  1.3892    by (import hollight DIST_RMUL)
  1.3893  
  1.3894 -lemma DIST_EQ_0: "ALL (x::nat) xa::nat. (dist (x, xa) = 0) = (x = xa)"
  1.3895 +lemma DIST_EQ_0: "(hollight.dist (x, xa) = 0) = (x = xa)"
  1.3896    by (import hollight DIST_EQ_0)
  1.3897  
  1.3898 -lemma DIST_ELIM_THM: "(P::nat => bool) (dist (x::nat, y::nat)) =
  1.3899 -(ALL d::nat. (x = y + d --> P d) & (y = x + d --> P d))"
  1.3900 +lemma DIST_ELIM_THM: "P (hollight.dist (x, y)) =
  1.3901 +(ALL d. (x = y + d --> P d) & (y = x + d --> P d))"
  1.3902    by (import hollight DIST_ELIM_THM)
  1.3903  
  1.3904 -lemma DIST_LE_CASES: "ALL (m::nat) (n::nat) p::nat.
  1.3905 -   <= (dist (m, n)) p = (<= m (n + p) & <= n (m + p))"
  1.3906 +lemma DIST_LE_CASES: "(hollight.dist (m, n) <= p) = (m <= n + p & n <= m + p)"
  1.3907    by (import hollight DIST_LE_CASES)
  1.3908  
  1.3909 -lemma DIST_ADDBOUND: "ALL (m::nat) n::nat. <= (dist (m, n)) (m + n)"
  1.3910 -  by (import hollight DIST_ADDBOUND)
  1.3911 -
  1.3912 -lemma DIST_TRIANGLE: "ALL (m::nat) (n::nat) p::nat. <= (dist (m, p)) (dist (m, n) + dist (n, p))"
  1.3913 -  by (import hollight DIST_TRIANGLE)
  1.3914 -
  1.3915 -lemma DIST_ADD2: "ALL (m::nat) (n::nat) (p::nat) q::nat.
  1.3916 -   <= (dist (m + n, p + q)) (dist (m, p) + dist (n, q))"
  1.3917 -  by (import hollight DIST_ADD2)
  1.3918 -
  1.3919 -lemma DIST_ADD2_REV: "ALL (m::nat) (n::nat) (p::nat) q::nat.
  1.3920 -   <= (dist (m, p)) (dist (m + n, p + q) + dist (n, q))"
  1.3921 -  by (import hollight DIST_ADD2_REV)
  1.3922 -
  1.3923 -lemma DIST_TRIANGLE_LE: "ALL (m::nat) (n::nat) (p::nat) q::nat.
  1.3924 -   <= (dist (m, n) + dist (n, p)) q --> <= (dist (m, p)) q"
  1.3925 +lemma DIST_TRIANGLE_LE: "hollight.dist (m, n) + hollight.dist (n, p) <= q
  1.3926 +==> hollight.dist (m, p) <= q"
  1.3927    by (import hollight DIST_TRIANGLE_LE)
  1.3928  
  1.3929 -lemma DIST_TRIANGLES_LE: "ALL (m::nat) (n::nat) (p::nat) (q::nat) (r::nat) s::nat.
  1.3930 -   <= (dist (m, n)) r & <= (dist (p, q)) s -->
  1.3931 -   <= (dist (m, p)) (dist (n, q) + (r + s))"
  1.3932 +lemma DIST_TRIANGLES_LE: "hollight.dist (m, n) <= r & hollight.dist (p, q) <= s
  1.3933 +==> hollight.dist (m, p) <= hollight.dist (n, q) + (r + s)"
  1.3934    by (import hollight DIST_TRIANGLES_LE)
  1.3935  
  1.3936 -lemma BOUNDS_LINEAR: "ALL (A::nat) (B::nat) C::nat. (ALL n::nat. <= (A * n) (B * n + C)) = <= A B"
  1.3937 +lemma BOUNDS_LINEAR: "(ALL n::nat. (A::nat) * n <= (B::nat) * n + (C::nat)) = (A <= B)"
  1.3938    by (import hollight BOUNDS_LINEAR)
  1.3939  
  1.3940 -lemma BOUNDS_LINEAR_0: "ALL (A::nat) B::nat. (ALL n::nat. <= (A * n) B) = (A = 0)"
  1.3941 +lemma BOUNDS_LINEAR_0: "(ALL n::nat. (A::nat) * n <= (B::nat)) = (A = (0::nat))"
  1.3942    by (import hollight BOUNDS_LINEAR_0)
  1.3943  
  1.3944 -lemma BOUNDS_DIVIDED: "ALL P::nat => nat.
  1.3945 -   (EX B::nat. ALL n::nat. <= (P n) B) =
  1.3946 -   (EX (x::nat) B::nat. ALL n::nat. <= (n * P n) (x * n + B))"
  1.3947 +lemma BOUNDS_DIVIDED: "(EX B::nat. ALL n::nat. (P::nat => nat) n <= B) =
  1.3948 +(EX (x::nat) B::nat. ALL n::nat. n * P n <= x * n + B)"
  1.3949    by (import hollight BOUNDS_DIVIDED)
  1.3950  
  1.3951 -lemma BOUNDS_NOTZERO: "ALL (P::nat => nat => nat) (A::nat) B::nat.
  1.3952 -   P 0 0 = 0 & (ALL (m::nat) n::nat. <= (P m n) (A * (m + n) + B)) -->
  1.3953 -   (EX x::nat. ALL (m::nat) n::nat. <= (P m n) (x * (m + n)))"
  1.3954 +lemma BOUNDS_NOTZERO: "(P::nat => nat => nat) (0::nat) (0::nat) = (0::nat) &
  1.3955 +(ALL (m::nat) n::nat. P m n <= (A::nat) * (m + n) + (B::nat))
  1.3956 +==> EX x::nat. ALL (m::nat) n::nat. P m n <= x * (m + n)"
  1.3957    by (import hollight BOUNDS_NOTZERO)
  1.3958  
  1.3959 -lemma BOUNDS_IGNORE: "ALL (P::nat => nat) Q::nat => nat.
  1.3960 -   (EX B::nat. ALL i::nat. <= (P i) (Q i + B)) =
  1.3961 -   (EX (x::nat) N::nat. ALL i::nat. <= N i --> <= (P i) (Q i + x))"
  1.3962 +lemma BOUNDS_IGNORE: "(EX B::nat. ALL i::nat. (P::nat => nat) i <= (Q::nat => nat) i + B) =
  1.3963 +(EX (x::nat) N::nat. ALL i>=N. P i <= Q i + x)"
  1.3964    by (import hollight BOUNDS_IGNORE)
  1.3965  
  1.3966 -definition is_nadd :: "(nat => nat) => bool" where 
  1.3967 +definition
  1.3968 +  is_nadd :: "(nat => nat) => bool"  where
  1.3969    "is_nadd ==
  1.3970 -%u::nat => nat.
  1.3971 -   EX B::nat.
  1.3972 -      ALL (m::nat) n::nat. <= (dist (m * u n, n * u m)) (B * (m + n))"
  1.3973 +%u. EX B. ALL m n. hollight.dist (m * u n, n * u m) <= B * (m + n)"
  1.3974  
  1.3975  lemma DEF_is_nadd: "is_nadd =
  1.3976 -(%u::nat => nat.
  1.3977 -    EX B::nat.
  1.3978 -       ALL (m::nat) n::nat. <= (dist (m * u n, n * u m)) (B * (m + n)))"
  1.3979 +(%u. EX B. ALL m n. hollight.dist (m * u n, n * u m) <= B * (m + n))"
  1.3980    by (import hollight DEF_is_nadd)
  1.3981  
  1.3982 -lemma is_nadd_0: "is_nadd (%n::nat. 0)"
  1.3983 +lemma is_nadd_0: "is_nadd (%n. 0)"
  1.3984    by (import hollight is_nadd_0)
  1.3985  
  1.3986  typedef (open) nadd = "Collect is_nadd"  morphisms "dest_nadd" "mk_nadd"
  1.3987 -  apply (rule light_ex_imp_nonempty[where t="%n::nat. NUMERAL 0"])
  1.3988 +  apply (rule light_ex_imp_nonempty[where t="%n. NUMERAL 0"])
  1.3989    by (import hollight TYDEF_nadd)
  1.3990  
  1.3991  syntax
  1.3992 @@ -3100,394 +1411,329 @@
  1.3993    [where a="a :: nadd" and r=r ,
  1.3994     OF type_definition_nadd]
  1.3995  
  1.3996 -lemma NADD_CAUCHY: "ALL x::nadd.
  1.3997 -   EX xa::nat.
  1.3998 -      ALL (xb::nat) xc::nat.
  1.3999 -         <= (dist (xb * dest_nadd x xc, xc * dest_nadd x xb))
  1.4000 -          (xa * (xb + xc))"
  1.4001 +lemma NADD_CAUCHY: "EX xa.
  1.4002 +   ALL xb xc.
  1.4003 +      hollight.dist (xb * dest_nadd x xc, xc * dest_nadd x xb)
  1.4004 +      <= xa * (xb + xc)"
  1.4005    by (import hollight NADD_CAUCHY)
  1.4006  
  1.4007 -lemma NADD_BOUND: "ALL x::nadd.
  1.4008 -   EX (xa::nat) B::nat. ALL n::nat. <= (dest_nadd x n) (xa * n + B)"
  1.4009 +lemma NADD_BOUND: "EX xa B. ALL n. dest_nadd x n <= xa * n + B"
  1.4010    by (import hollight NADD_BOUND)
  1.4011  
  1.4012 -lemma NADD_MULTIPLICATIVE: "ALL x::nadd.
  1.4013 -   EX xa::nat.
  1.4014 -      ALL (m::nat) n::nat.
  1.4015 -         <= (dist (dest_nadd x (m * n), m * dest_nadd x n)) (xa * m + xa)"
  1.4016 +lemma NADD_MULTIPLICATIVE: "EX xa.
  1.4017 +   ALL m n.
  1.4018 +      hollight.dist (dest_nadd x (m * n), m * dest_nadd x n) <= xa * m + xa"
  1.4019    by (import hollight NADD_MULTIPLICATIVE)
  1.4020  
  1.4021 -lemma NADD_ADDITIVE: "ALL x::nadd.
  1.4022 -   EX xa::nat.
  1.4023 -      ALL (m::nat) n::nat.
  1.4024 -         <= (dist (dest_nadd x (m + n), dest_nadd x m + dest_nadd x n)) xa"
  1.4025 +lemma NADD_ADDITIVE: "EX xa.
  1.4026 +   ALL m n.
  1.4027 +      hollight.dist (dest_nadd x (m + n), dest_nadd x m + dest_nadd x n)
  1.4028 +      <= xa"
  1.4029    by (import hollight NADD_ADDITIVE)
  1.4030  
  1.4031 -lemma NADD_SUC: "ALL x::nadd.
  1.4032 -   EX xa::nat. ALL n::nat. <= (dist (dest_nadd x (Suc n), dest_nadd x n)) xa"
  1.4033 +lemma NADD_SUC: "EX xa. ALL n. hollight.dist (dest_nadd x (Suc n), dest_nadd x n) <= xa"
  1.4034    by (import hollight NADD_SUC)
  1.4035  
  1.4036 -lemma NADD_DIST_LEMMA: "ALL x::nadd.
  1.4037 -   EX xa::nat.
  1.4038 -      ALL (m::nat) n::nat.
  1.4039 -         <= (dist (dest_nadd x (m + n), dest_nadd x m)) (xa * n)"
  1.4040 +lemma NADD_DIST_LEMMA: "EX xa. ALL m n. hollight.dist (dest_nadd x (m + n), dest_nadd x m) <= xa * n"
  1.4041    by (import hollight NADD_DIST_LEMMA)
  1.4042  
  1.4043 -lemma NADD_DIST: "ALL x::nadd.
  1.4044 -   EX xa::nat.
  1.4045 -      ALL (m::nat) n::nat.
  1.4046 -         <= (dist (dest_nadd x m, dest_nadd x n)) (xa * dist (m, n))"
  1.4047 +lemma NADD_DIST: "EX xa.
  1.4048 +   ALL m n.
  1.4049 +      hollight.dist (dest_nadd x m, dest_nadd x n)
  1.4050 +      <= xa * hollight.dist (m, n)"
  1.4051    by (import hollight NADD_DIST)
  1.4052  
  1.4053 -lemma NADD_ALTMUL: "ALL (x::nadd) y::nadd.
  1.4054 -   EX (A::nat) B::nat.
  1.4055 -      ALL n::nat.
  1.4056 -         <= (dist
  1.4057 -              (n * dest_nadd x (dest_nadd y n),
  1.4058 -               dest_nadd x n * dest_nadd y n))
  1.4059 -          (A * n + B)"
  1.4060 +lemma NADD_ALTMUL: "EX A B.
  1.4061 +   ALL n.
  1.4062 +      hollight.dist
  1.4063 +       (n * dest_nadd x (dest_nadd y n), dest_nadd x n * dest_nadd y n)
  1.4064 +      <= A * n + B"
  1.4065    by (import hollight NADD_ALTMUL)
  1.4066  
  1.4067 -definition nadd_eq :: "nadd => nadd => bool" where 
  1.4068 +definition
  1.4069 +  nadd_eq :: "nadd => nadd => bool"  where
  1.4070    "nadd_eq ==
  1.4071 -%(u::nadd) ua::nadd.
  1.4072 -   EX B::nat. ALL n::nat. <= (dist (dest_nadd u n, dest_nadd ua n)) B"
  1.4073 +%u ua. EX B. ALL n. hollight.dist (dest_nadd u n, dest_nadd ua n) <= B"
  1.4074  
  1.4075  lemma DEF_nadd_eq: "nadd_eq =
  1.4076 -(%(u::nadd) ua::nadd.
  1.4077 -    EX B::nat. ALL n::nat. <= (dist (dest_nadd u n, dest_nadd ua n)) B)"
  1.4078 +(%u ua. EX B. ALL n. hollight.dist (dest_nadd u n, dest_nadd ua n) <= B)"
  1.4079    by (import hollight DEF_nadd_eq)
  1.4080  
  1.4081 -lemma NADD_EQ_REFL: "ALL x::nadd. nadd_eq x x"
  1.4082 +lemma NADD_EQ_REFL: "nadd_eq x x"
  1.4083    by (import hollight NADD_EQ_REFL)
  1.4084  
  1.4085 -lemma NADD_EQ_SYM: "ALL (x::nadd) y::nadd. nadd_eq x y = nadd_eq y x"
  1.4086 +lemma NADD_EQ_SYM: "nadd_eq x y = nadd_eq y x"
  1.4087    by (import hollight NADD_EQ_SYM)
  1.4088  
  1.4089 -lemma NADD_EQ_TRANS: "ALL (x::nadd) (y::nadd) z::nadd. nadd_eq x y & nadd_eq y z --> nadd_eq x z"
  1.4090 +lemma NADD_EQ_TRANS: "nadd_eq x y & nadd_eq y z ==> nadd_eq x z"
  1.4091    by (import hollight NADD_EQ_TRANS)
  1.4092  
  1.4093 -definition nadd_of_num :: "nat => nadd" where 
  1.4094 -  "nadd_of_num == %u::nat. mk_nadd (op * u)"
  1.4095 -
  1.4096 -lemma DEF_nadd_of_num: "nadd_of_num = (%u::nat. mk_nadd (op * u))"
  1.4097 +definition
  1.4098 +  nadd_of_num :: "nat => nadd"  where
  1.4099 +  "nadd_of_num == %u. mk_nadd (op * u)"
  1.4100 +
  1.4101 +lemma DEF_nadd_of_num: "nadd_of_num = (%u. mk_nadd (op * u))"
  1.4102    by (import hollight DEF_nadd_of_num)
  1.4103  
  1.4104 -lemma NADD_OF_NUM: "ALL x::nat. dest_nadd (nadd_of_num x) = op * x"
  1.4105 +lemma NADD_OF_NUM: "dest_nadd (nadd_of_num x) = op * x"
  1.4106    by (import hollight NADD_OF_NUM)
  1.4107  
  1.4108 -lemma NADD_OF_NUM_WELLDEF: "ALL (m::nat) n::nat. m = n --> nadd_eq (nadd_of_num m) (nadd_of_num n)"
  1.4109 +lemma NADD_OF_NUM_WELLDEF: "m = n ==> nadd_eq (nadd_of_num m) (nadd_of_num n)"
  1.4110    by (import hollight NADD_OF_NUM_WELLDEF)
  1.4111  
  1.4112 -lemma NADD_OF_NUM_EQ: "ALL (m::nat) n::nat. nadd_eq (nadd_of_num m) (nadd_of_num n) = (m = n)"
  1.4113 +lemma NADD_OF_NUM_EQ: "nadd_eq (nadd_of_num m) (nadd_of_num n) = (m = n)"
  1.4114    by (import hollight NADD_OF_NUM_EQ)
  1.4115  
  1.4116 -definition nadd_le :: "nadd => nadd => bool" where 
  1.4117 -  "nadd_le ==
  1.4118 -%(u::nadd) ua::nadd.
  1.4119 -   EX B::nat. ALL n::nat. <= (dest_nadd u n) (dest_nadd ua n + B)"
  1.4120 -
  1.4121 -lemma DEF_nadd_le: "nadd_le =
  1.4122 -(%(u::nadd) ua::nadd.
  1.4123 -    EX B::nat. ALL n::nat. <= (dest_nadd u n) (dest_nadd ua n + B))"
  1.4124 +definition
  1.4125 +  nadd_le :: "nadd => nadd => bool"  where
  1.4126 +  "nadd_le == %u ua. EX B. ALL n. dest_nadd u n <= dest_nadd ua n + B"
  1.4127 +
  1.4128 +lemma DEF_nadd_le: "nadd_le = (%u ua. EX B. ALL n. dest_nadd u n <= dest_nadd ua n + B)"
  1.4129    by (import hollight DEF_nadd_le)
  1.4130  
  1.4131 -lemma NADD_LE_WELLDEF_LEMMA: "ALL (x::nadd) (x'::nadd) (y::nadd) y'::nadd.
  1.4132 -   nadd_eq x x' & nadd_eq y y' & nadd_le x y --> nadd_le x' y'"
  1.4133 +lemma NADD_LE_WELLDEF_LEMMA: "nadd_eq x x' & nadd_eq y y' & nadd_le x y ==> nadd_le x' y'"
  1.4134    by (import hollight NADD_LE_WELLDEF_LEMMA)
  1.4135  
  1.4136 -lemma NADD_LE_WELLDEF: "ALL (x::nadd) (x'::nadd) (y::nadd) y'::nadd.
  1.4137 -   nadd_eq x x' & nadd_eq y y' --> nadd_le x y = nadd_le x' y'"
  1.4138 +lemma NADD_LE_WELLDEF: "nadd_eq x x' & nadd_eq y y' ==> nadd_le x y = nadd_le x' y'"
  1.4139    by (import hollight NADD_LE_WELLDEF)
  1.4140  
  1.4141 -lemma NADD_LE_REFL: "ALL x::nadd. nadd_le x x"
  1.4142 +lemma NADD_LE_REFL: "nadd_le x x"
  1.4143    by (import hollight NADD_LE_REFL)
  1.4144  
  1.4145 -lemma NADD_LE_TRANS: "ALL (x::nadd) (y::nadd) z::nadd. nadd_le x y & nadd_le y z --> nadd_le x z"
  1.4146 +lemma NADD_LE_TRANS: "nadd_le x y & nadd_le y z ==> nadd_le x z"
  1.4147    by (import hollight NADD_LE_TRANS)
  1.4148  
  1.4149 -lemma NADD_LE_ANTISYM: "ALL (x::nadd) y::nadd. (nadd_le x y & nadd_le y x) = nadd_eq x y"
  1.4150 +lemma NADD_LE_ANTISYM: "(nadd_le x y & nadd_le y x) = nadd_eq x y"
  1.4151    by (import hollight NADD_LE_ANTISYM)
  1.4152  
  1.4153 -lemma NADD_LE_TOTAL_LEMMA: "ALL (x::nadd) y::nadd.
  1.4154 -   ~ nadd_le x y -->
  1.4155 -   (ALL B::nat. EX n::nat. n ~= 0 & < (dest_nadd y n + B) (dest_nadd x n))"
  1.4156 +lemma NADD_LE_TOTAL_LEMMA: "~ nadd_le x y ==> EX n. n ~= 0 & dest_nadd y n + B < dest_nadd x n"
  1.4157    by (import hollight NADD_LE_TOTAL_LEMMA)
  1.4158  
  1.4159 -lemma NADD_LE_TOTAL: "ALL (x::nadd) y::nadd. nadd_le x y | nadd_le y x"
  1.4160 +lemma NADD_LE_TOTAL: "nadd_le x y | nadd_le y x"
  1.4161    by (import hollight NADD_LE_TOTAL)
  1.4162  
  1.4163 -lemma NADD_ARCH: "ALL x::nadd. EX xa::nat. nadd_le x (nadd_of_num xa)"
  1.4164 +lemma NADD_ARCH: "EX xa. nadd_le x (nadd_of_num xa)"
  1.4165    by (import hollight NADD_ARCH)
  1.4166  
  1.4167 -lemma NADD_OF_NUM_LE: "ALL (m::nat) n::nat. nadd_le (nadd_of_num m) (nadd_of_num n) = <= m n"
  1.4168 +lemma NADD_OF_NUM_LE: "nadd_le (nadd_of_num m) (nadd_of_num n) = (m <= n)"
  1.4169    by (import hollight NADD_OF_NUM_LE)
  1.4170  
  1.4171 -definition nadd_add :: "nadd => nadd => nadd" where 
  1.4172 -  "nadd_add ==
  1.4173 -%(u::nadd) ua::nadd. mk_nadd (%n::nat. dest_nadd u n + dest_nadd ua n)"
  1.4174 -
  1.4175 -lemma DEF_nadd_add: "nadd_add =
  1.4176 -(%(u::nadd) ua::nadd. mk_nadd (%n::nat. dest_nadd u n + dest_nadd ua n))"
  1.4177 +definition
  1.4178 +  nadd_add :: "nadd => nadd => nadd"  where
  1.4179 +  "nadd_add == %u ua. mk_nadd (%n. dest_nadd u n + dest_nadd ua n)"
  1.4180 +
  1.4181 +lemma DEF_nadd_add: "nadd_add = (%u ua. mk_nadd (%n. dest_nadd u n + dest_nadd ua n))"
  1.4182    by (import hollight DEF_nadd_add)
  1.4183  
  1.4184 -lemma NADD_ADD: "ALL (x::nadd) y::nadd.
  1.4185 -   dest_nadd (nadd_add x y) = (%n::nat. dest_nadd x n + dest_nadd y n)"
  1.4186 +lemma NADD_ADD: "dest_nadd (nadd_add x y) = (%n. dest_nadd x n + dest_nadd y n)"
  1.4187    by (import hollight NADD_ADD)
  1.4188  
  1.4189 -lemma NADD_ADD_WELLDEF: "ALL (x::nadd) (x'::nadd) (y::nadd) y'::nadd.
  1.4190 -   nadd_eq x x' & nadd_eq y y' --> nadd_eq (nadd_add x y) (nadd_add x' y')"
  1.4191 +lemma NADD_ADD_WELLDEF: "nadd_eq x x' & nadd_eq y y' ==> nadd_eq (nadd_add x y) (nadd_add x' y')"
  1.4192    by (import hollight NADD_ADD_WELLDEF)
  1.4193  
  1.4194 -lemma NADD_ADD_SYM: "ALL (x::nadd) y::nadd. nadd_eq (nadd_add x y) (nadd_add y x)"
  1.4195 +lemma NADD_ADD_SYM: "nadd_eq (nadd_add x y) (nadd_add y x)"
  1.4196    by (import hollight NADD_ADD_SYM)
  1.4197  
  1.4198 -lemma NADD_ADD_ASSOC: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4199 -   nadd_eq (nadd_add x (nadd_add y z)) (nadd_add (nadd_add x y) z)"
  1.4200 +lemma NADD_ADD_ASSOC: "nadd_eq (nadd_add x (nadd_add y z)) (nadd_add (nadd_add x y) z)"
  1.4201    by (import hollight NADD_ADD_ASSOC)
  1.4202  
  1.4203 -lemma NADD_ADD_LID: "ALL x::nadd. nadd_eq (nadd_add (nadd_of_num 0) x) x"
  1.4204 +lemma NADD_ADD_LID: "nadd_eq (nadd_add (nadd_of_num 0) x) x"
  1.4205    by (import hollight NADD_ADD_LID)
  1.4206  
  1.4207 -lemma NADD_ADD_LCANCEL: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4208 -   nadd_eq (nadd_add x y) (nadd_add x z) --> nadd_eq y z"
  1.4209 +lemma NADD_ADD_LCANCEL: "nadd_eq (nadd_add x y) (nadd_add x z) ==> nadd_eq y z"
  1.4210    by (import hollight NADD_ADD_LCANCEL)
  1.4211  
  1.4212 -lemma NADD_LE_ADD: "ALL (x::nadd) y::nadd. nadd_le x (nadd_add x y)"
  1.4213 +lemma NADD_LE_ADD: "nadd_le x (nadd_add x y)"
  1.4214    by (import hollight NADD_LE_ADD)
  1.4215  
  1.4216 -lemma NADD_LE_EXISTS: "ALL (x::nadd) y::nadd.
  1.4217 -   nadd_le x y --> (EX d::nadd. nadd_eq y (nadd_add x d))"
  1.4218 +lemma NADD_LE_EXISTS: "nadd_le x y ==> EX d. nadd_eq y (nadd_add x d)"
  1.4219    by (import hollight NADD_LE_EXISTS)
  1.4220  
  1.4221 -lemma NADD_OF_NUM_ADD: "ALL (x::nat) xa::nat.
  1.4222 -   nadd_eq (nadd_add (nadd_of_num x) (nadd_of_num xa))
  1.4223 -    (nadd_of_num (x + xa))"
  1.4224 +lemma NADD_OF_NUM_ADD: "nadd_eq (nadd_add (nadd_of_num x) (nadd_of_num xa)) (nadd_of_num (x + xa))"
  1.4225    by (import hollight NADD_OF_NUM_ADD)
  1.4226  
  1.4227 -definition nadd_mul :: "nadd => nadd => nadd" where 
  1.4228 -  "nadd_mul ==
  1.4229 -%(u::nadd) ua::nadd. mk_nadd (%n::nat. dest_nadd u (dest_nadd ua n))"
  1.4230 -
  1.4231 -lemma DEF_nadd_mul: "nadd_mul =
  1.4232 -(%(u::nadd) ua::nadd. mk_nadd (%n::nat. dest_nadd u (dest_nadd ua n)))"
  1.4233 +definition
  1.4234 +  nadd_mul :: "nadd => nadd => nadd"  where
  1.4235 +  "nadd_mul == %u ua. mk_nadd (%n. dest_nadd u (dest_nadd ua n))"
  1.4236 +
  1.4237 +lemma DEF_nadd_mul: "nadd_mul = (%u ua. mk_nadd (%n. dest_nadd u (dest_nadd ua n)))"
  1.4238    by (import hollight DEF_nadd_mul)
  1.4239  
  1.4240 -lemma NADD_MUL: "ALL (x::nadd) y::nadd.
  1.4241 -   dest_nadd (nadd_mul x y) = (%n::nat. dest_nadd x (dest_nadd y n))"
  1.4242 +lemma NADD_MUL: "dest_nadd (nadd_mul x y) = (%n. dest_nadd x (dest_nadd y n))"
  1.4243    by (import hollight NADD_MUL)
  1.4244  
  1.4245 -lemma NADD_MUL_SYM: "ALL (x::nadd) y::nadd. nadd_eq (nadd_mul x y) (nadd_mul y x)"
  1.4246 +lemma NADD_MUL_SYM: "nadd_eq (nadd_mul x y) (nadd_mul y x)"
  1.4247    by (import hollight NADD_MUL_SYM)
  1.4248  
  1.4249 -lemma NADD_MUL_ASSOC: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4250 -   nadd_eq (nadd_mul x (nadd_mul y z)) (nadd_mul (nadd_mul x y) z)"
  1.4251 +lemma NADD_MUL_ASSOC: "nadd_eq (nadd_mul x (nadd_mul y z)) (nadd_mul (nadd_mul x y) z)"
  1.4252    by (import hollight NADD_MUL_ASSOC)
  1.4253  
  1.4254 -lemma NADD_MUL_LID: "ALL x::nadd. nadd_eq (nadd_mul (nadd_of_num (NUMERAL_BIT1 0)) x) x"
  1.4255 +lemma NADD_MUL_LID: "nadd_eq (nadd_mul (nadd_of_num 1) x) x"
  1.4256    by (import hollight NADD_MUL_LID)
  1.4257  
  1.4258 -lemma NADD_LDISTRIB: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4259 -   nadd_eq (nadd_mul x (nadd_add y z))
  1.4260 -    (nadd_add (nadd_mul x y) (nadd_mul x z))"
  1.4261 +lemma NADD_LDISTRIB: "nadd_eq (nadd_mul x (nadd_add y z)) (nadd_add (nadd_mul x y) (nadd_mul x z))"
  1.4262    by (import hollight NADD_LDISTRIB)
  1.4263  
  1.4264 -lemma NADD_MUL_WELLDEF_LEMMA: "ALL (x::nadd) (y::nadd) y'::nadd.
  1.4265 -   nadd_eq y y' --> nadd_eq (nadd_mul x y) (nadd_mul x y')"
  1.4266 +lemma NADD_MUL_WELLDEF_LEMMA: "nadd_eq y y' ==> nadd_eq (nadd_mul x y) (nadd_mul x y')"
  1.4267    by (import hollight NADD_MUL_WELLDEF_LEMMA)
  1.4268  
  1.4269 -lemma NADD_MUL_WELLDEF: "ALL (x::nadd) (x'::nadd) (y::nadd) y'::nadd.
  1.4270 -   nadd_eq x x' & nadd_eq y y' --> nadd_eq (nadd_mul x y) (nadd_mul x' y')"
  1.4271 +lemma NADD_MUL_WELLDEF: "nadd_eq x x' & nadd_eq y y' ==> nadd_eq (nadd_mul x y) (nadd_mul x' y')"
  1.4272    by (import hollight NADD_MUL_WELLDEF)
  1.4273  
  1.4274 -lemma NADD_OF_NUM_MUL: "ALL (x::nat) xa::nat.
  1.4275 -   nadd_eq (nadd_mul (nadd_of_num x) (nadd_of_num xa))
  1.4276 -    (nadd_of_num (x * xa))"
  1.4277 +lemma NADD_OF_NUM_MUL: "nadd_eq (nadd_mul (nadd_of_num x) (nadd_of_num xa)) (nadd_of_num (x * xa))"
  1.4278    by (import hollight NADD_OF_NUM_MUL)
  1.4279  
  1.4280 -lemma NADD_LE_0: "All (nadd_le (nadd_of_num 0))"
  1.4281 +lemma NADD_LE_0: "nadd_le (nadd_of_num 0) x"
  1.4282    by (import hollight NADD_LE_0)
  1.4283  
  1.4284 -lemma NADD_EQ_IMP_LE: "ALL (x::nadd) y::nadd. nadd_eq x y --> nadd_le x y"
  1.4285 +lemma NADD_EQ_IMP_LE: "nadd_eq x y ==> nadd_le x y"
  1.4286    by (import hollight NADD_EQ_IMP_LE)
  1.4287  
  1.4288 -lemma NADD_LE_LMUL: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4289 -   nadd_le y z --> nadd_le (nadd_mul x y) (nadd_mul x z)"
  1.4290 +lemma NADD_LE_LMUL: "nadd_le y z ==> nadd_le (nadd_mul x y) (nadd_mul x z)"
  1.4291    by (import hollight NADD_LE_LMUL)
  1.4292  
  1.4293 -lemma NADD_LE_RMUL: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4294 -   nadd_le x y --> nadd_le (nadd_mul x z) (nadd_mul y z)"
  1.4295 +lemma NADD_LE_RMUL: "nadd_le x y ==> nadd_le (nadd_mul x z) (nadd_mul y z)"
  1.4296    by (import hollight NADD_LE_RMUL)
  1.4297  
  1.4298 -lemma NADD_LE_RADD: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4299 -   nadd_le (nadd_add x z) (nadd_add y z) = nadd_le x y"
  1.4300 +lemma NADD_LE_RADD: "nadd_le (nadd_add x z) (nadd_add y z) = nadd_le x y"
  1.4301    by (import hollight NADD_LE_RADD)
  1.4302  
  1.4303 -lemma NADD_LE_LADD: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4304 -   nadd_le (nadd_add x y) (nadd_add x z) = nadd_le y z"
  1.4305 +lemma NADD_LE_LADD: "nadd_le (nadd_add x y) (nadd_add x z) = nadd_le y z"
  1.4306    by (import hollight NADD_LE_LADD)
  1.4307  
  1.4308 -lemma NADD_RDISTRIB: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4309 -   nadd_eq (nadd_mul (nadd_add x y) z)
  1.4310 -    (nadd_add (nadd_mul x z) (nadd_mul y z))"
  1.4311 +lemma NADD_RDISTRIB: "nadd_eq (nadd_mul (nadd_add x y) z) (nadd_add (nadd_mul x z) (nadd_mul y z))"
  1.4312    by (import hollight NADD_RDISTRIB)
  1.4313  
  1.4314 -lemma NADD_ARCH_MULT: "ALL (x::nadd) k::nat.
  1.4315 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4316 -   (EX xa::nat. nadd_le (nadd_of_num k) (nadd_mul (nadd_of_num xa) x))"
  1.4317 +lemma NADD_ARCH_MULT: "~ nadd_eq x (nadd_of_num 0)
  1.4318 +==> EX xa. nadd_le (nadd_of_num k) (nadd_mul (nadd_of_num xa) x)"
  1.4319    by (import hollight NADD_ARCH_MULT)
  1.4320  
  1.4321 -lemma NADD_ARCH_ZERO: "ALL (x::nadd) k::nadd.
  1.4322 -   (ALL n::nat. nadd_le (nadd_mul (nadd_of_num n) x) k) -->
  1.4323 -   nadd_eq x (nadd_of_num 0)"
  1.4324 +lemma NADD_ARCH_ZERO: "(!!n. nadd_le (nadd_mul (nadd_of_num n) x) k) ==> nadd_eq x (nadd_of_num 0)"
  1.4325    by (import hollight NADD_ARCH_ZERO)
  1.4326  
  1.4327 -lemma NADD_ARCH_LEMMA: "ALL (x::nadd) (y::nadd) z::nadd.
  1.4328 -   (ALL n::nat.
  1.4329 -       nadd_le (nadd_mul (nadd_of_num n) x)
  1.4330 -        (nadd_add (nadd_mul (nadd_of_num n) y) z)) -->
  1.4331 -   nadd_le x y"
  1.4332 +lemma NADD_ARCH_LEMMA: "(!!n. nadd_le (nadd_mul (nadd_of_num n) x)
  1.4333 +       (nadd_add (nadd_mul (nadd_of_num n) y) z))
  1.4334 +==> nadd_le x y"
  1.4335    by (import hollight NADD_ARCH_LEMMA)
  1.4336  
  1.4337 -lemma NADD_COMPLETE: "ALL P::nadd => bool.
  1.4338 -   Ex P & (EX M::nadd. ALL x::nadd. P x --> nadd_le x M) -->
  1.4339 -   (EX M::nadd.
  1.4340 -       (ALL x::nadd. P x --> nadd_le x M) &
  1.4341 -       (ALL M'::nadd. (ALL x::nadd. P x --> nadd_le x M') --> nadd_le M M'))"
  1.4342 +lemma NADD_COMPLETE: "Ex P & (EX M. ALL x. P x --> nadd_le x M)
  1.4343 +==> EX M. (ALL x. P x --> nadd_le x M) &
  1.4344 +          (ALL M'. (ALL x. P x --> nadd_le x M') --> nadd_le M M')"
  1.4345    by (import hollight NADD_COMPLETE)
  1.4346  
  1.4347 -lemma NADD_UBOUND: "ALL x::nadd.
  1.4348 -   EX (xa::nat) N::nat. ALL n::nat. <= N n --> <= (dest_nadd x n) (xa * n)"
  1.4349 +lemma NADD_UBOUND: "EX xa N. ALL n>=N. dest_nadd x n <= xa * n"
  1.4350    by (import hollight NADD_UBOUND)
  1.4351  
  1.4352 -lemma NADD_NONZERO: "ALL x::nadd.
  1.4353 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4354 -   (EX N::nat. ALL n::nat. <= N n --> dest_nadd x n ~= 0)"
  1.4355 +lemma NADD_NONZERO: "~ nadd_eq x (nadd_of_num 0) ==> EX N. ALL n>=N. dest_nadd x n ~= 0"
  1.4356    by (import hollight NADD_NONZERO)
  1.4357  
  1.4358 -lemma NADD_LBOUND: "ALL x::nadd.
  1.4359 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4360 -   (EX (A::nat) N::nat. ALL n::nat. <= N n --> <= n (A * dest_nadd x n))"
  1.4361 +lemma NADD_LBOUND: "~ nadd_eq x (nadd_of_num 0) ==> EX A N. ALL n>=N. n <= A * dest_nadd x n"
  1.4362    by (import hollight NADD_LBOUND)
  1.4363  
  1.4364 -definition nadd_rinv :: "nadd => nat => nat" where 
  1.4365 -  "nadd_rinv == %(u::nadd) n::nat. DIV (n * n) (dest_nadd u n)"
  1.4366 -
  1.4367 -lemma DEF_nadd_rinv: "nadd_rinv = (%(u::nadd) n::nat. DIV (n * n) (dest_nadd u n))"
  1.4368 +definition
  1.4369 +  nadd_rinv :: "nadd => nat => nat"  where
  1.4370 +  "nadd_rinv == %u n. n * n div dest_nadd u n"
  1.4371 +
  1.4372 +lemma DEF_nadd_rinv: "nadd_rinv = (%u n. n * n div dest_nadd u n)"
  1.4373    by (import hollight DEF_nadd_rinv)
  1.4374  
  1.4375 -lemma NADD_MUL_LINV_LEMMA0: "ALL x::nadd.
  1.4376 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4377 -   (EX (xa::nat) B::nat. ALL i::nat. <= (nadd_rinv x i) (xa * i + B))"
  1.4378 +lemma NADD_MUL_LINV_LEMMA0: "~ nadd_eq x (nadd_of_num 0) ==> EX xa B. ALL i. nadd_rinv x i <= xa * i + B"
  1.4379    by (import hollight NADD_MUL_LINV_LEMMA0)
  1.4380  
  1.4381 -lemma NADD_MUL_LINV_LEMMA1: "ALL (x::nadd) n::nat.
  1.4382 -   dest_nadd x n ~= 0 -->
  1.4383 -   <= (dist (dest_nadd x n * nadd_rinv x n, n * n)) (dest_nadd x n)"
  1.4384 +lemma NADD_MUL_LINV_LEMMA1: "dest_nadd x n ~= 0
  1.4385 +==> hollight.dist (dest_nadd x n * nadd_rinv x n, n * n) <= dest_nadd x n"
  1.4386    by (import hollight NADD_MUL_LINV_LEMMA1)
  1.4387  
  1.4388 -lemma NADD_MUL_LINV_LEMMA2: "ALL x::nadd.
  1.4389 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4390 -   (EX N::nat.
  1.4391 -       ALL n::nat.
  1.4392 -          <= N n -->
  1.4393 -          <= (dist (dest_nadd x n * nadd_rinv x n, n * n)) (dest_nadd x n))"
  1.4394 +lemma NADD_MUL_LINV_LEMMA2: "~ nadd_eq x (nadd_of_num 0)
  1.4395 +==> EX N. ALL n>=N.
  1.4396 +             hollight.dist (dest_nadd x n * nadd_rinv x n, n * n)
  1.4397 +             <= dest_nadd x n"
  1.4398    by (import hollight NADD_MUL_LINV_LEMMA2)
  1.4399  
  1.4400 -lemma NADD_MUL_LINV_LEMMA3: "ALL x::nadd.
  1.4401 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4402 -   (EX N::nat.
  1.4403 -       ALL (m::nat) n::nat.
  1.4404 -          <= N n -->
  1.4405 -          <= (dist
  1.4406 -               (m * (dest_nadd x m * (dest_nadd x n * nadd_rinv x n)),
  1.4407 -                m * (dest_nadd x m * (n * n))))
  1.4408 -           (m * (dest_nadd x m * dest_nadd x n)))"
  1.4409 +lemma NADD_MUL_LINV_LEMMA3: "~ nadd_eq x (nadd_of_num 0)
  1.4410 +==> EX N. ALL m n.
  1.4411 +             N <= n -->
  1.4412 +             hollight.dist
  1.4413 +              (m * (dest_nadd x m * (dest_nadd x n * nadd_rinv x n)),
  1.4414 +               m * (dest_nadd x m * (n * n)))
  1.4415 +             <= m * (dest_nadd x m * dest_nadd x n)"
  1.4416    by (import hollight NADD_MUL_LINV_LEMMA3)
  1.4417  
  1.4418 -lemma NADD_MUL_LINV_LEMMA4: "ALL x::nadd.
  1.4419 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4420 -   (EX N::nat.
  1.4421 -       ALL (m::nat) n::nat.
  1.4422 -          <= N m & <= N n -->
  1.4423 -          <= (dest_nadd x m * dest_nadd x n *
  1.4424 -              dist (m * nadd_rinv x n, n * nadd_rinv x m))
  1.4425 -           (m * n * dist (m * dest_nadd x n, n * dest_nadd x m) +
  1.4426 -            dest_nadd x m * dest_nadd x n * (m + n)))"
  1.4427 +lemma NADD_MUL_LINV_LEMMA4: "~ nadd_eq x (nadd_of_num 0)
  1.4428 +==> EX N. ALL m n.
  1.4429 +             N <= m & N <= n -->
  1.4430 +             dest_nadd x m * dest_nadd x n *
  1.4431 +             hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m)
  1.4432 +             <= m * n *
  1.4433 +                hollight.dist (m * dest_nadd x n, n * dest_nadd x m) +
  1.4434 +                dest_nadd x m * dest_nadd x n * (m + n)"
  1.4435    by (import hollight NADD_MUL_LINV_LEMMA4)
  1.4436  
  1.4437 -lemma NADD_MUL_LINV_LEMMA5: "ALL x::nadd.
  1.4438 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4439 -   (EX (B::nat) N::nat.
  1.4440 -       ALL (m::nat) n::nat.
  1.4441 -          <= N m & <= N n -->
  1.4442 -          <= (dest_nadd x m * dest_nadd x n *
  1.4443 -              dist (m * nadd_rinv x n, n * nadd_rinv x m))
  1.4444 -           (B * (m * n * (m + n))))"
  1.4445 +lemma NADD_MUL_LINV_LEMMA5: "~ nadd_eq x (nadd_of_num 0)
  1.4446 +==> EX B N.
  1.4447 +       ALL m n.
  1.4448 +          N <= m & N <= n -->
  1.4449 +          dest_nadd x m * dest_nadd x n *
  1.4450 +          hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m)
  1.4451 +          <= B * (m * n * (m + n))"
  1.4452    by (import hollight NADD_MUL_LINV_LEMMA5)
  1.4453  
  1.4454 -lemma NADD_MUL_LINV_LEMMA6: "ALL x::nadd.
  1.4455 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4456 -   (EX (B::nat) N::nat.
  1.4457 -       ALL (m::nat) n::nat.
  1.4458 -          <= N m & <= N n -->
  1.4459 -          <= (m * n * dist (m * nadd_rinv x n, n * nadd_rinv x m))
  1.4460 -           (B * (m * n * (m + n))))"
  1.4461 +lemma NADD_MUL_LINV_LEMMA6: "~ nadd_eq x (nadd_of_num 0)
  1.4462 +==> EX B N.
  1.4463 +       ALL m n.
  1.4464 +          N <= m & N <= n -->
  1.4465 +          m * n * hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m)
  1.4466 +          <= B * (m * n * (m + n))"
  1.4467    by (import hollight NADD_MUL_LINV_LEMMA6)
  1.4468  
  1.4469 -lemma NADD_MUL_LINV_LEMMA7: "ALL x::nadd.
  1.4470 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4471 -   (EX (B::nat) N::nat.
  1.4472 -       ALL (m::nat) n::nat.
  1.4473 -          <= N m & <= N n -->
  1.4474 -          <= (dist (m * nadd_rinv x n, n * nadd_rinv x m)) (B * (m + n)))"
  1.4475 +lemma NADD_MUL_LINV_LEMMA7: "~ nadd_eq x (nadd_of_num 0)
  1.4476 +==> EX B N.
  1.4477 +       ALL m n.
  1.4478 +          N <= m & N <= n -->
  1.4479 +          hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m)
  1.4480 +          <= B * (m + n)"
  1.4481    by (import hollight NADD_MUL_LINV_LEMMA7)
  1.4482  
  1.4483 -lemma NADD_MUL_LINV_LEMMA7a: "ALL x::nadd.
  1.4484 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4485 -   (ALL N::nat.
  1.4486 -       EX (A::nat) B::nat.
  1.4487 -          ALL (m::nat) n::nat.
  1.4488 -             <= m N -->
  1.4489 -             <= (dist (m * nadd_rinv x n, n * nadd_rinv x m)) (A * n + B))"
  1.4490 +lemma NADD_MUL_LINV_LEMMA7a: "~ nadd_eq x (nadd_of_num 0)
  1.4491 +==> EX A B.
  1.4492 +       ALL m n.
  1.4493 +          m <= N -->
  1.4494 +          hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m) <= A * n + B"
  1.4495    by (import hollight NADD_MUL_LINV_LEMMA7a)
  1.4496  
  1.4497 -lemma NADD_MUL_LINV_LEMMA8: "ALL x::nadd.
  1.4498 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4499 -   (EX B::nat.
  1.4500 -       ALL (m::nat) n::nat.
  1.4501 -          <= (dist (m * nadd_rinv x n, n * nadd_rinv x m)) (B * (m + n)))"
  1.4502 +lemma NADD_MUL_LINV_LEMMA8: "~ nadd_eq x (nadd_of_num 0)
  1.4503 +==> EX B. ALL m n.
  1.4504 +             hollight.dist (m * nadd_rinv x n, n * nadd_rinv x m)
  1.4505 +             <= B * (m + n)"
  1.4506    by (import hollight NADD_MUL_LINV_LEMMA8)
  1.4507  
  1.4508 -definition nadd_inv :: "nadd => nadd" where 
  1.4509 +definition
  1.4510 +  nadd_inv :: "nadd => nadd"  where
  1.4511    "nadd_inv ==
  1.4512 -%u::nadd.
  1.4513 -   COND (nadd_eq u (nadd_of_num 0)) (nadd_of_num 0) (mk_nadd (nadd_rinv u))"
  1.4514 +%u. if nadd_eq u (nadd_of_num 0) then nadd_of_num 0
  1.4515 +    else mk_nadd (nadd_rinv u)"
  1.4516  
  1.4517  lemma DEF_nadd_inv: "nadd_inv =
  1.4518 -(%u::nadd.
  1.4519 -    COND (nadd_eq u (nadd_of_num 0)) (nadd_of_num 0)
  1.4520 -     (mk_nadd (nadd_rinv u)))"
  1.4521 +(%u. if nadd_eq u (nadd_of_num 0) then nadd_of_num 0
  1.4522 +     else mk_nadd (nadd_rinv u))"
  1.4523    by (import hollight DEF_nadd_inv)
  1.4524  
  1.4525 -lemma NADD_INV: "ALL x::nadd.
  1.4526 -   dest_nadd (nadd_inv x) =
  1.4527 -   COND (nadd_eq x (nadd_of_num 0)) (%n::nat. 0) (nadd_rinv x)"
  1.4528 +lemma NADD_INV: "dest_nadd (nadd_inv x) =
  1.4529 +(if nadd_eq x (nadd_of_num 0) then %n. 0 else nadd_rinv x)"
  1.4530    by (import hollight NADD_INV)
  1.4531  
  1.4532 -lemma NADD_MUL_LINV: "ALL x::nadd.
  1.4533 -   ~ nadd_eq x (nadd_of_num 0) -->
  1.4534 -   nadd_eq (nadd_mul (nadd_inv x) x) (nadd_of_num (NUMERAL_BIT1 0))"
  1.4535 +lemma NADD_MUL_LINV: "~ nadd_eq x (nadd_of_num 0)
  1.4536 +==> nadd_eq (nadd_mul (nadd_inv x) x) (nadd_of_num 1)"
  1.4537    by (import hollight NADD_MUL_LINV)
  1.4538  
  1.4539  lemma NADD_INV_0: "nadd_eq (nadd_inv (nadd_of_num 0)) (nadd_of_num 0)"
  1.4540    by (import hollight NADD_INV_0)
  1.4541  
  1.4542 -lemma NADD_INV_WELLDEF: "ALL (x::nadd) y::nadd. nadd_eq x y --> nadd_eq (nadd_inv x) (nadd_inv y)"
  1.4543 +lemma NADD_INV_WELLDEF: "nadd_eq x y ==> nadd_eq (nadd_inv x) (nadd_inv y)"
  1.4544    by (import hollight NADD_INV_WELLDEF)
  1.4545  
  1.4546 -typedef (open) hreal = "{s::nadd => bool. EX x::nadd. s = nadd_eq x}"  morphisms "dest_hreal" "mk_hreal"
  1.4547 -  apply (rule light_ex_imp_nonempty[where t="nadd_eq (x::nadd)"])
  1.4548 +typedef (open) hreal = "{s. EX x. s = nadd_eq x}"  morphisms "dest_hreal" "mk_hreal"
  1.4549 +  apply (rule light_ex_imp_nonempty[where t="nadd_eq x"])
  1.4550    by (import hollight TYDEF_hreal)
  1.4551  
  1.4552  syntax
  1.4553 @@ -3500,328 +1746,285 @@
  1.4554    [where a="a :: hreal" and r=r ,
  1.4555     OF type_definition_hreal]
  1.4556  
  1.4557 -definition hreal_of_num :: "nat => hreal" where 
  1.4558 -  "hreal_of_num == %m::nat. mk_hreal (nadd_eq (nadd_of_num m))"
  1.4559 -
  1.4560 -lemma DEF_hreal_of_num: "hreal_of_num = (%m::nat. mk_hreal (nadd_eq (nadd_of_num m)))"
  1.4561 +definition
  1.4562 +  hreal_of_num :: "nat => hreal"  where
  1.4563 +  "hreal_of_num == %m. mk_hreal (nadd_eq (nadd_of_num m))"
  1.4564 +
  1.4565 +lemma DEF_hreal_of_num: "hreal_of_num = (%m. mk_hreal (nadd_eq (nadd_of_num m)))"
  1.4566    by (import hollight DEF_hreal_of_num)
  1.4567  
  1.4568 -definition hreal_add :: "hreal => hreal => hreal" where 
  1.4569 +definition
  1.4570 +  hreal_add :: "hreal => hreal => hreal"  where
  1.4571    "hreal_add ==
  1.4572 -%(x::hreal) y::hreal.
  1.4573 -   mk_hreal
  1.4574 -    (%u::nadd.
  1.4575 -        EX (xa::nadd) ya::nadd.
  1.4576 -           nadd_eq (nadd_add xa ya) u & dest_hreal x xa & dest_hreal y ya)"
  1.4577 +%x y. mk_hreal
  1.4578 +       (%u. EX xa ya.
  1.4579 +               nadd_eq (nadd_add xa ya) u &
  1.4580 +               dest_hreal x xa & dest_hreal y ya)"
  1.4581  
  1.4582  lemma DEF_hreal_add: "hreal_add =
  1.4583 -(%(x::hreal) y::hreal.
  1.4584 -    mk_hreal
  1.4585 -     (%u::nadd.
  1.4586 -         EX (xa::nadd) ya::nadd.
  1.4587 -            nadd_eq (nadd_add xa ya) u & dest_hreal x xa & dest_hreal y ya))"
  1.4588 +(%x y. mk_hreal
  1.4589 +        (%u. EX xa ya.
  1.4590 +                nadd_eq (nadd_add xa ya) u &
  1.4591 +                dest_hreal x xa & dest_hreal y ya))"
  1.4592    by (import hollight DEF_hreal_add)
  1.4593  
  1.4594 -definition hreal_mul :: "hreal => hreal => hreal" where 
  1.4595 +definition
  1.4596 +  hreal_mul :: "hreal => hreal => hreal"  where
  1.4597    "hreal_mul ==
  1.4598 -%(x::hreal) y::hreal.
  1.4599 -   mk_hreal
  1.4600 -    (%u::nadd.
  1.4601 -        EX (xa::nadd) ya::nadd.
  1.4602 -           nadd_eq (nadd_mul xa ya) u & dest_hreal x xa & dest_hreal y ya)"
  1.4603 +%x y. mk_hreal
  1.4604 +       (%u. EX xa ya.
  1.4605 +               nadd_eq (nadd_mul xa ya) u &
  1.4606 +               dest_hreal x xa & dest_hreal y ya)"
  1.4607  
  1.4608  lemma DEF_hreal_mul: "hreal_mul =
  1.4609 -(%(x::hreal) y::hreal.
  1.4610 -    mk_hreal
  1.4611 -     (%u::nadd.
  1.4612 -         EX (xa::nadd) ya::nadd.
  1.4613 -            nadd_eq (nadd_mul xa ya) u & dest_hreal x xa & dest_hreal y ya))"
  1.4614 +(%x y. mk_hreal
  1.4615 +        (%u. EX xa ya.
  1.4616 +                nadd_eq (nadd_mul xa ya) u &
  1.4617 +                dest_hreal x xa & dest_hreal y ya))"
  1.4618    by (import hollight DEF_hreal_mul)
  1.4619  
  1.4620 -definition hreal_le :: "hreal => hreal => bool" where 
  1.4621 +definition
  1.4622 +  hreal_le :: "hreal => hreal => bool"  where
  1.4623    "hreal_le ==
  1.4624 -%(x::hreal) y::hreal.
  1.4625 -   SOME u::bool.
  1.4626 -      EX (xa::nadd) ya::nadd.
  1.4627 -         nadd_le xa ya = u & dest_hreal x xa & dest_hreal y ya"
  1.4628 +%x y. SOME u.
  1.4629 +         EX xa ya. nadd_le xa ya = u & dest_hreal x xa & dest_hreal y ya"
  1.4630  
  1.4631  lemma DEF_hreal_le: "hreal_le =
  1.4632 -(%(x::hreal) y::hreal.
  1.4633 -    SOME u::bool.
  1.4634 -       EX (xa::nadd) ya::nadd.
  1.4635 -          nadd_le xa ya = u & dest_hreal x xa & dest_hreal y ya)"
  1.4636 +(%x y. SOME u.
  1.4637 +          EX xa ya. nadd_le xa ya = u & dest_hreal x xa & dest_hreal y ya)"
  1.4638    by (import hollight DEF_hreal_le)
  1.4639  
  1.4640 -definition hreal_inv :: "hreal => hreal" where 
  1.4641 +definition
  1.4642 +  hreal_inv :: "hreal => hreal"  where
  1.4643    "hreal_inv ==
  1.4644 -%x::hreal.
  1.4645 -   mk_hreal
  1.4646 -    (%u::nadd. EX xa::nadd. nadd_eq (nadd_inv xa) u & dest_hreal x xa)"
  1.4647 +%x. mk_hreal (%u. EX xa. nadd_eq (nadd_inv xa) u & dest_hreal x xa)"
  1.4648  
  1.4649  lemma DEF_hreal_inv: "hreal_inv =
  1.4650 -(%x::hreal.
  1.4651 -    mk_hreal
  1.4652 -     (%u::nadd. EX xa::nadd. nadd_eq (nadd_inv xa) u & dest_hreal x xa))"
  1.4653 +(%x. mk_hreal (%u. EX xa. nadd_eq (nadd_inv xa) u & dest_hreal x xa))"
  1.4654    by (import hollight DEF_hreal_inv)
  1.4655  
  1.4656 -lemma HREAL_LE_EXISTS_DEF: "ALL (m::hreal) n::hreal. hreal_le m n = (EX d::hreal. n = hreal_add m d)"
  1.4657 +lemma HREAL_LE_EXISTS_DEF: "hreal_le m n = (EX d. n = hreal_add m d)"
  1.4658    by (import hollight HREAL_LE_EXISTS_DEF)
  1.4659  
  1.4660 -lemma HREAL_EQ_ADD_LCANCEL: "ALL (m::hreal) (n::hreal) p::hreal.
  1.4661 -   (hreal_add m n = hreal_add m p) = (n = p)"
  1.4662 +lemma HREAL_EQ_ADD_LCANCEL: "(hreal_add m n = hreal_add m p) = (n = p)"
  1.4663    by (import hollight HREAL_EQ_ADD_LCANCEL)
  1.4664  
  1.4665 -lemma HREAL_EQ_ADD_RCANCEL: "ALL (x::hreal) (xa::hreal) xb::hreal.
  1.4666 -   (hreal_add x xb = hreal_add xa xb) = (x = xa)"
  1.4667 +lemma HREAL_EQ_ADD_RCANCEL: "(hreal_add x xb = hreal_add xa xb) = (x = xa)"
  1.4668    by (import hollight HREAL_EQ_ADD_RCANCEL)
  1.4669  
  1.4670 -lemma HREAL_LE_ADD_LCANCEL: "ALL (x::hreal) (xa::hreal) xb::hreal.
  1.4671 -   hreal_le (hreal_add x xa) (hreal_add x xb) = hreal_le xa xb"
  1.4672 +lemma HREAL_LE_ADD_LCANCEL: "hreal_le (hreal_add x xa) (hreal_add x xb) = hreal_le xa xb"
  1.4673    by (import hollight HREAL_LE_ADD_LCANCEL)
  1.4674  
  1.4675 -lemma HREAL_LE_ADD_RCANCEL: "ALL (x::hreal) (xa::hreal) xb::hreal.
  1.4676 -   hreal_le (hreal_add x xb) (hreal_add xa xb) = hreal_le x xa"
  1.4677 +lemma HREAL_LE_ADD_RCANCEL: "hreal_le (hreal_add x xb) (hreal_add xa xb) = hreal_le x xa"
  1.4678    by (import hollight HREAL_LE_ADD_RCANCEL)
  1.4679  
  1.4680 -lemma HREAL_ADD_RID: "ALL x::hreal. hreal_add x (hreal_of_num 0) = x"
  1.4681 +lemma HREAL_ADD_RID: "hreal_add x (hreal_of_num 0) = x"
  1.4682    by (import hollight HREAL_ADD_RID)
  1.4683  
  1.4684 -lemma HREAL_ADD_RDISTRIB: "ALL (x::hreal) (xa::hreal) xb::hreal.
  1.4685 -   hreal_mul (hreal_add x xa) xb =
  1.4686 -   hreal_add (hreal_mul x xb) (hreal_mul xa xb)"
  1.4687 +lemma HREAL_ADD_RDISTRIB: "hreal_mul (hreal_add x xa) xb = hreal_add (hreal_mul x xb) (hreal_mul xa xb)"
  1.4688    by (import hollight HREAL_ADD_RDISTRIB)
  1.4689  
  1.4690 -lemma HREAL_MUL_LZERO: "ALL m::hreal. hreal_mul (hreal_of_num 0) m = hreal_of_num 0"
  1.4691 +lemma HREAL_MUL_LZERO: "hreal_mul (hreal_of_num 0) m = hreal_of_num 0"
  1.4692    by (import hollight HREAL_MUL_LZERO)
  1.4693  
  1.4694 -lemma HREAL_MUL_RZERO: "ALL x::hreal. hreal_mul x (hreal_of_num 0) = hreal_of_num 0"
  1.4695 +lemma HREAL_MUL_RZERO: "hreal_mul x (hreal_of_num 0) = hreal_of_num 0"
  1.4696    by (import hollight HREAL_MUL_RZERO)
  1.4697  
  1.4698 -lemma HREAL_ADD_AC: "hreal_add (m::hreal) (n::hreal) = hreal_add n m &
  1.4699 -hreal_add (hreal_add m n) (p::hreal) = hreal_add m (hreal_add n p) &
  1.4700 +lemma HREAL_ADD_AC: "hreal_add m n = hreal_add n m &
  1.4701 +hreal_add (hreal_add m n) p = hreal_add m (hreal_add n p) &
  1.4702  hreal_add m (hreal_add n p) = hreal_add n (hreal_add m p)"
  1.4703    by (import hollight HREAL_ADD_AC)
  1.4704  
  1.4705 -lemma HREAL_LE_ADD2: "ALL (a::hreal) (b::hreal) (c::hreal) d::hreal.
  1.4706 -   hreal_le a b & hreal_le c d --> hreal_le (hreal_add a c) (hreal_add b d)"
  1.4707 +lemma HREAL_LE_ADD2: "hreal_le a b & hreal_le c d ==> hreal_le (hreal_add a c) (hreal_add b d)"
  1.4708    by (import hollight HREAL_LE_ADD2)
  1.4709  
  1.4710 -lemma HREAL_LE_MUL_RCANCEL_IMP: "ALL (a::hreal) (b::hreal) c::hreal.
  1.4711 -   hreal_le a b --> hreal_le (hreal_mul a c) (hreal_mul b c)"
  1.4712 +lemma HREAL_LE_MUL_RCANCEL_IMP: "hreal_le a b ==> hreal_le (hreal_mul a c) (hreal_mul b c)"
  1.4713    by (import hollight HREAL_LE_MUL_RCANCEL_IMP)
  1.4714  
  1.4715 -definition treal_of_num :: "nat => hreal * hreal" where 
  1.4716 -  "treal_of_num == %u::nat. (hreal_of_num u, hreal_of_num 0)"
  1.4717 -
  1.4718 -lemma DEF_treal_of_num: "treal_of_num = (%u::nat. (hreal_of_num u, hreal_of_num 0))"
  1.4719 +definition
  1.4720 +  treal_of_num :: "nat => hreal * hreal"  where
  1.4721 +  "treal_of_num == %u. (hreal_of_num u, hreal_of_num 0)"
  1.4722 +
  1.4723 +lemma DEF_treal_of_num: "treal_of_num = (%u. (hreal_of_num u, hreal_of_num 0))"
  1.4724    by (import hollight DEF_treal_of_num)
  1.4725  
  1.4726 -definition treal_neg :: "hreal * hreal => hreal * hreal" where 
  1.4727 -  "treal_neg == %u::hreal * hreal. (snd u, fst u)"
  1.4728 -
  1.4729 -lemma DEF_treal_neg: "treal_neg = (%u::hreal * hreal. (snd u, fst u))"
  1.4730 +definition
  1.4731 +  treal_neg :: "hreal * hreal => hreal * hreal"  where
  1.4732 +  "treal_neg == %u. (snd u, fst u)"
  1.4733 +
  1.4734 +lemma DEF_treal_neg: "treal_neg = (%u. (snd u, fst u))"
  1.4735    by (import hollight DEF_treal_neg)
  1.4736  
  1.4737 -definition treal_add :: "hreal * hreal => hreal * hreal => hreal * hreal" where 
  1.4738 -  "treal_add ==
  1.4739 -%(u::hreal * hreal) ua::hreal * hreal.
  1.4740 -   (hreal_add (fst u) (fst ua), hreal_add (snd u) (snd ua))"
  1.4741 +definition
  1.4742 +  treal_add :: "hreal * hreal => hreal * hreal => hreal * hreal"  where
  1.4743 +  "treal_add == %u ua. (hreal_add (fst u) (fst ua), hreal_add (snd u) (snd ua))"
  1.4744  
  1.4745  lemma DEF_treal_add: "treal_add =
  1.4746 -(%(u::hreal * hreal) ua::hreal * hreal.
  1.4747 -    (hreal_add (fst u) (fst ua), hreal_add (snd u) (snd ua)))"
  1.4748 +(%u ua. (hreal_add (fst u) (fst ua), hreal_add (snd u) (snd ua)))"
  1.4749    by (import hollight DEF_treal_add)
  1.4750  
  1.4751 -definition treal_mul :: "hreal * hreal => hreal * hreal => hreal * hreal" where 
  1.4752 +definition
  1.4753 +  treal_mul :: "hreal * hreal => hreal * hreal => hreal * hreal"  where
  1.4754    "treal_mul ==
  1.4755 -%(u::hreal * hreal) ua::hreal * hreal.
  1.4756 +%u ua.
  1.4757     (hreal_add (hreal_mul (fst u) (fst ua)) (hreal_mul (snd u) (snd ua)),
  1.4758      hreal_add (hreal_mul (fst u) (snd ua)) (hreal_mul (snd u) (fst ua)))"
  1.4759  
  1.4760  lemma DEF_treal_mul: "treal_mul =
  1.4761 -(%(u::hreal * hreal) ua::hreal * hreal.
  1.4762 +(%u ua.
  1.4763      (hreal_add (hreal_mul (fst u) (fst ua)) (hreal_mul (snd u) (snd ua)),
  1.4764       hreal_add (hreal_mul (fst u) (snd ua)) (hreal_mul (snd u) (fst ua))))"
  1.4765    by (import hollight DEF_treal_mul)
  1.4766  
  1.4767 -definition treal_le :: "hreal * hreal => hreal * hreal => bool" where 
  1.4768 +definition
  1.4769 +  treal_le :: "hreal * hreal => hreal * hreal => bool"  where
  1.4770    "treal_le ==
  1.4771 -%(u::hreal * hreal) ua::hreal * hreal.
  1.4772 -   hreal_le (hreal_add (fst u) (snd ua)) (hreal_add (fst ua) (snd u))"
  1.4773 +%u ua. hreal_le (hreal_add (fst u) (snd ua)) (hreal_add (fst ua) (snd u))"
  1.4774  
  1.4775  lemma DEF_treal_le: "treal_le =
  1.4776 -(%(u::hreal * hreal) ua::hreal * hreal.
  1.4777 -    hreal_le (hreal_add (fst u) (snd ua)) (hreal_add (fst ua) (snd u)))"
  1.4778 +(%u ua. hreal_le (hreal_add (fst u) (snd ua)) (hreal_add (fst ua) (snd u)))"
  1.4779    by (import hollight DEF_treal_le)
  1.4780  
  1.4781 -definition treal_inv :: "hreal * hreal => hreal * hreal" where 
  1.4782 +definition
  1.4783 +  treal_inv :: "hreal * hreal => hreal * hreal"  where
  1.4784    "treal_inv ==
  1.4785 -%u::hreal * hreal.
  1.4786 -   COND (fst u = snd u) (hreal_of_num 0, hreal_of_num 0)
  1.4787 -    (COND (hreal_le (snd u) (fst u))
  1.4788 -      (hreal_inv (SOME d::hreal. fst u = hreal_add (snd u) d),
  1.4789 -       hreal_of_num 0)
  1.4790 -      (hreal_of_num 0,
  1.4791 -       hreal_inv (SOME d::hreal. snd u = hreal_add (fst u) d)))"
  1.4792 +%u. if fst u = snd u then (hreal_of_num 0, hreal_of_num 0)
  1.4793 +    else if hreal_le (snd u) (fst u)
  1.4794 +         then (hreal_inv (SOME d. fst u = hreal_add (snd u) d),
  1.4795 +               hreal_of_num 0)
  1.4796 +         else (hreal_of_num 0,
  1.4797 +               hreal_inv (SOME d. snd u = hreal_add (fst u) d))"
  1.4798  
  1.4799  lemma DEF_treal_inv: "treal_inv =
  1.4800 -(%u::hreal * hreal.
  1.4801 -    COND (fst u = snd u) (hreal_of_num 0, hreal_of_num 0)
  1.4802 -     (COND (hreal_le (snd u) (fst u))
  1.4803 -       (hreal_inv (SOME d::hreal. fst u = hreal_add (snd u) d),
  1.4804 -        hreal_of_num 0)
  1.4805 -       (hreal_of_num 0,
  1.4806 -        hreal_inv (SOME d::hreal. snd u = hreal_add (fst u) d))))"
  1.4807 +(%u. if fst u = snd u then (hreal_of_num 0, hreal_of_num 0)
  1.4808 +     else if hreal_le (snd u) (fst u)
  1.4809 +          then (hreal_inv (SOME d. fst u = hreal_add (snd u) d),
  1.4810 +                hreal_of_num 0)
  1.4811 +          else (hreal_of_num 0,
  1.4812 +                hreal_inv (SOME d. snd u = hreal_add (fst u) d)))"
  1.4813    by (import hollight DEF_treal_inv)
  1.4814  
  1.4815 -definition treal_eq :: "hreal * hreal => hreal * hreal => bool" where 
  1.4816 -  "treal_eq ==
  1.4817 -%(u::hreal * hreal) ua::hreal * hreal.
  1.4818 -   hreal_add (fst u) (snd ua) = hreal_add (fst ua) (snd u)"
  1.4819 -
  1.4820 -lemma DEF_treal_eq: "treal_eq =
  1.4821 -(%(u::hreal * hreal) ua::hreal * hreal.
  1.4822 -    hreal_add (fst u) (snd ua) = hreal_add (fst ua) (snd u))"
  1.4823 +definition
  1.4824 +  treal_eq :: "hreal * hreal => hreal * hreal => bool"  where
  1.4825 +  "treal_eq == %u ua. hreal_add (fst u) (snd ua) = hreal_add (fst ua) (snd u)"
  1.4826 +
  1.4827 +lemma DEF_treal_eq: "treal_eq = (%u ua. hreal_add (fst u) (snd ua) = hreal_add (fst ua) (snd u))"
  1.4828    by (import hollight DEF_treal_eq)
  1.4829  
  1.4830 -lemma TREAL_EQ_REFL: "ALL x::hreal * hreal. treal_eq x x"
  1.4831 +lemma TREAL_EQ_REFL: "treal_eq x x"
  1.4832    by (import hollight TREAL_EQ_REFL)
  1.4833  
  1.4834 -lemma TREAL_EQ_SYM: "ALL (x::hreal * hreal) y::hreal * hreal. treal_eq x y = treal_eq y x"
  1.4835 +lemma TREAL_EQ_SYM: "treal_eq x y = treal_eq y x"
  1.4836    by (import hollight TREAL_EQ_SYM)
  1.4837  
  1.4838 -lemma TREAL_EQ_TRANS: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4839 -   treal_eq x y & treal_eq y z --> treal_eq x z"
  1.4840 +lemma TREAL_EQ_TRANS: "treal_eq x y & treal_eq y z ==> treal_eq x z"
  1.4841    by (import hollight TREAL_EQ_TRANS)
  1.4842  
  1.4843 -lemma TREAL_EQ_AP: "ALL (x::hreal * hreal) y::hreal * hreal. x = y --> treal_eq x y"
  1.4844 +lemma TREAL_EQ_AP: "x = xa ==> treal_eq x xa"
  1.4845    by (import hollight TREAL_EQ_AP)
  1.4846  
  1.4847 -lemma TREAL_OF_NUM_EQ: "ALL (x::nat) xa::nat. treal_eq (treal_of_num x) (treal_of_num xa) = (x = xa)"
  1.4848 +lemma TREAL_OF_NUM_EQ: "treal_eq (treal_of_num x) (treal_of_num xa) = (x = xa)"
  1.4849    by (import hollight TREAL_OF_NUM_EQ)
  1.4850  
  1.4851 -lemma TREAL_OF_NUM_LE: "ALL (x::nat) xa::nat. treal_le (treal_of_num x) (treal_of_num xa) = <= x xa"
  1.4852 +lemma TREAL_OF_NUM_LE: "treal_le (treal_of_num x) (treal_of_num xa) = (x <= xa)"
  1.4853    by (import hollight TREAL_OF_NUM_LE)
  1.4854  
  1.4855 -lemma TREAL_OF_NUM_ADD: "ALL (x::nat) xa::nat.
  1.4856 -   treal_eq (treal_add (treal_of_num x) (treal_of_num xa))
  1.4857 -    (treal_of_num (x + xa))"
  1.4858 +lemma TREAL_OF_NUM_ADD: "treal_eq (treal_add (treal_of_num x) (treal_of_num xa))
  1.4859 + (treal_of_num (x + xa))"
  1.4860    by (import hollight TREAL_OF_NUM_ADD)
  1.4861  
  1.4862 -lemma TREAL_OF_NUM_MUL: "ALL (x::nat) xa::nat.
  1.4863 -   treal_eq (treal_mul (treal_of_num x) (treal_of_num xa))
  1.4864 -    (treal_of_num (x * xa))"
  1.4865 +lemma TREAL_OF_NUM_MUL: "treal_eq (treal_mul (treal_of_num x) (treal_of_num xa))
  1.4866 + (treal_of_num (x * xa))"
  1.4867    by (import hollight TREAL_OF_NUM_MUL)
  1.4868  
  1.4869 -lemma TREAL_ADD_SYM_EQ: "ALL (x::hreal * hreal) y::hreal * hreal. treal_add x y = treal_add y x"
  1.4870 +lemma TREAL_ADD_SYM_EQ: "treal_add x y = treal_add y x"
  1.4871    by (import hollight TREAL_ADD_SYM_EQ)
  1.4872  
  1.4873 -lemma TREAL_MUL_SYM_EQ: "ALL (x::hreal * hreal) y::hreal * hreal. treal_mul x y = treal_mul y x"
  1.4874 +lemma TREAL_MUL_SYM_EQ: "treal_mul x y = treal_mul y x"
  1.4875    by (import hollight TREAL_MUL_SYM_EQ)
  1.4876  
  1.4877 -lemma TREAL_ADD_SYM: "ALL (x::hreal * hreal) y::hreal * hreal.
  1.4878 -   treal_eq (treal_add x y) (treal_add y x)"
  1.4879 +lemma TREAL_ADD_SYM: "treal_eq (treal_add x y) (treal_add y x)"
  1.4880    by (import hollight TREAL_ADD_SYM)
  1.4881  
  1.4882 -lemma TREAL_ADD_ASSOC: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4883 -   treal_eq (treal_add x (treal_add y z)) (treal_add (treal_add x y) z)"
  1.4884 +lemma TREAL_ADD_ASSOC: "treal_eq (treal_add x (treal_add y z)) (treal_add (treal_add x y) z)"
  1.4885    by (import hollight TREAL_ADD_ASSOC)
  1.4886  
  1.4887 -lemma TREAL_ADD_LID: "ALL x::hreal * hreal. treal_eq (treal_add (treal_of_num 0) x) x"
  1.4888 +lemma TREAL_ADD_LID: "treal_eq (treal_add (treal_of_num 0) x) x"
  1.4889    by (import hollight TREAL_ADD_LID)
  1.4890  
  1.4891 -lemma TREAL_ADD_LINV: "ALL x::hreal * hreal. treal_eq (treal_add (treal_neg x) x) (treal_of_num 0)"
  1.4892 +lemma TREAL_ADD_LINV: "treal_eq (treal_add (treal_neg x) x) (treal_of_num 0)"
  1.4893    by (import hollight TREAL_ADD_LINV)
  1.4894  
  1.4895 -lemma TREAL_MUL_SYM: "ALL (x::hreal * hreal) y::hreal * hreal.
  1.4896 -   treal_eq (treal_mul x y) (treal_mul y x)"
  1.4897 +lemma TREAL_MUL_SYM: "treal_eq (treal_mul x xa) (treal_mul xa x)"
  1.4898    by (import hollight TREAL_MUL_SYM)
  1.4899  
  1.4900 -lemma TREAL_MUL_ASSOC: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4901 -   treal_eq (treal_mul x (treal_mul y z)) (treal_mul (treal_mul x y) z)"
  1.4902 +lemma TREAL_MUL_ASSOC: "treal_eq (treal_mul x (treal_mul y z)) (treal_mul (treal_mul x y) z)"
  1.4903    by (import hollight TREAL_MUL_ASSOC)
  1.4904  
  1.4905 -lemma TREAL_MUL_LID: "ALL x::hreal * hreal.
  1.4906 -   treal_eq (treal_mul (treal_of_num (NUMERAL_BIT1 0)) x) x"
  1.4907 +lemma TREAL_MUL_LID: "treal_eq (treal_mul (treal_of_num 1) x) x"
  1.4908    by (import hollight TREAL_MUL_LID)
  1.4909  
  1.4910 -lemma TREAL_ADD_LDISTRIB: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4911 -   treal_eq (treal_mul x (treal_add y z))
  1.4912 -    (treal_add (treal_mul x y) (treal_mul x z))"
  1.4913 +lemma TREAL_ADD_LDISTRIB: "treal_eq (treal_mul x (treal_add y z))
  1.4914 + (treal_add (treal_mul x y) (treal_mul x z))"
  1.4915    by (import hollight TREAL_ADD_LDISTRIB)
  1.4916  
  1.4917 -lemma TREAL_LE_REFL: "ALL x::hreal * hreal. treal_le x x"
  1.4918 +lemma TREAL_LE_REFL: "treal_le x x"
  1.4919    by (import hollight TREAL_LE_REFL)
  1.4920  
  1.4921 -lemma TREAL_LE_ANTISYM: "ALL (x::hreal * hreal) y::hreal * hreal.
  1.4922 -   (treal_le x y & treal_le y x) = treal_eq x y"
  1.4923 +lemma TREAL_LE_ANTISYM: "(treal_le x y & treal_le y x) = treal_eq x y"
  1.4924    by (import hollight TREAL_LE_ANTISYM)
  1.4925  
  1.4926 -lemma TREAL_LE_TRANS: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4927 -   treal_le x y & treal_le y z --> treal_le x z"
  1.4928 +lemma TREAL_LE_TRANS: "treal_le x y & treal_le y z ==> treal_le x z"
  1.4929    by (import hollight TREAL_LE_TRANS)
  1.4930  
  1.4931 -lemma TREAL_LE_TOTAL: "ALL (x::hreal * hreal) y::hreal * hreal. treal_le x y | treal_le y x"
  1.4932 +lemma TREAL_LE_TOTAL: "treal_le x y | treal_le y x"
  1.4933    by (import hollight TREAL_LE_TOTAL)
  1.4934  
  1.4935 -lemma TREAL_LE_LADD_IMP: "ALL (x::hreal * hreal) (y::hreal * hreal) z::hreal * hreal.
  1.4936 -   treal_le y z --> treal_le (treal_add x y) (treal_add x z)"
  1.4937 +lemma TREAL_LE_LADD_IMP: "treal_le y z ==> treal_le (treal_add x y) (treal_add x z)"
  1.4938    by (import hollight TREAL_LE_LADD_IMP)
  1.4939  
  1.4940 -lemma TREAL_LE_MUL: "ALL (x::hreal * hreal) y::hreal * hreal.
  1.4941 -   treal_le (treal_of_num 0) x & treal_le (treal_of_num 0) y -->
  1.4942 -   treal_le (treal_of_num 0) (treal_mul x y)"
  1.4943 +lemma TREAL_LE_MUL: "treal_le (treal_of_num 0) x & treal_le (treal_of_num 0) y
  1.4944 +==> treal_le (treal_of_num 0) (treal_mul x y)"
  1.4945    by (import hollight TREAL_LE_MUL)
  1.4946  
  1.4947  lemma TREAL_INV_0: "treal_eq (treal_inv (treal_of_num 0)) (treal_of_num 0)"
  1.4948    by (import hollight TREAL_INV_0)
  1.4949  
  1.4950 -lemma TREAL_MUL_LINV: "ALL x::hreal * hreal.
  1.4951 -   ~ treal_eq x (treal_of_num 0) -->
  1.4952 -   treal_eq (treal_mul (treal_inv x) x) (treal_of_num (NUMERAL_BIT1 0))"
  1.4953 +lemma TREAL_MUL_LINV: "~ treal_eq x (treal_of_num 0)
  1.4954 +==> treal_eq (treal_mul (treal_inv x) x) (treal_of_num 1)"
  1.4955    by (import hollight TREAL_MUL_LINV)
  1.4956  
  1.4957 -lemma TREAL_OF_NUM_WELLDEF: "ALL (m::nat) n::nat. m = n --> treal_eq (treal_of_num m) (treal_of_num n)"
  1.4958 +lemma TREAL_OF_NUM_WELLDEF: "m = n ==> treal_eq (treal_of_num m) (treal_of_num n)"
  1.4959    by (import hollight TREAL_OF_NUM_WELLDEF)
  1.4960  
  1.4961 -lemma TREAL_NEG_WELLDEF: "ALL (x1::hreal * hreal) x2::hreal * hreal.
  1.4962 -   treal_eq x1 x2 --> treal_eq (treal_neg x1) (treal_neg x2)"
  1.4963 +lemma TREAL_NEG_WELLDEF: "treal_eq x1 x2 ==> treal_eq (treal_neg x1) (treal_neg x2)"
  1.4964    by (import hollight TREAL_NEG_WELLDEF)
  1.4965  
  1.4966 -lemma TREAL_ADD_WELLDEFR: "ALL (x1::hreal * hreal) (x2::hreal * hreal) y::hreal * hreal.
  1.4967 -   treal_eq x1 x2 --> treal_eq (treal_add x1 y) (treal_add x2 y)"
  1.4968 +lemma TREAL_ADD_WELLDEFR: "treal_eq x1 x2 ==> treal_eq (treal_add x1 y) (treal_add x2 y)"
  1.4969    by (import hollight TREAL_ADD_WELLDEFR)
  1.4970  
  1.4971 -lemma TREAL_ADD_WELLDEF: "ALL (x1::hreal * hreal) (x2::hreal * hreal) (y1::hreal * hreal)
  1.4972 -   y2::hreal * hreal.
  1.4973 -   treal_eq x1 x2 & treal_eq y1 y2 -->
  1.4974 -   treal_eq (treal_add x1 y1) (treal_add x2 y2)"
  1.4975 +lemma TREAL_ADD_WELLDEF: "treal_eq x1 x2 & treal_eq y1 y2
  1.4976 +==> treal_eq (treal_add x1 y1) (treal_add x2 y2)"
  1.4977    by (import hollight TREAL_ADD_WELLDEF)
  1.4978  
  1.4979 -lemma TREAL_MUL_WELLDEFR: "ALL (x1::hreal * hreal) (x2::hreal * hreal) y::hreal * hreal.
  1.4980 -   treal_eq x1 x2 --> treal_eq (treal_mul x1 y) (treal_mul x2 y)"
  1.4981 +lemma TREAL_MUL_WELLDEFR: "treal_eq x1 x2 ==> treal_eq (treal_mul x1 y) (treal_mul x2 y)"
  1.4982    by (import hollight TREAL_MUL_WELLDEFR)
  1.4983  
  1.4984 -lemma TREAL_MUL_WELLDEF: "ALL (x1::hreal * hreal) (x2::hreal * hreal) (y1::hreal * hreal)
  1.4985 -   y2::hreal * hreal.
  1.4986 -   treal_eq x1 x2 & treal_eq y1 y2 -->
  1.4987 -   treal_eq (treal_mul x1 y1) (treal_mul x2 y2)"
  1.4988 +lemma TREAL_MUL_WELLDEF: "treal_eq x1 x2 & treal_eq y1 y2
  1.4989 +==> treal_eq (treal_mul x1 y1) (treal_mul x2 y2)"
  1.4990    by (import hollight TREAL_MUL_WELLDEF)
  1.4991  
  1.4992 -lemma TREAL_EQ_IMP_LE: "ALL (x::hreal * hreal) y::hreal * hreal. treal_eq x y --> treal_le x y"
  1.4993 +lemma TREAL_EQ_IMP_LE: "treal_eq x y ==> treal_le x y"
  1.4994    by (import hollight TREAL_EQ_IMP_LE)
  1.4995  
  1.4996 -lemma TREAL_LE_WELLDEF: "ALL (x1::hreal * hreal) (x2::hreal * hreal) (y1::hreal * hreal)
  1.4997 -   y2::hreal * hreal.
  1.4998 -   treal_eq x1 x2 & treal_eq y1 y2 --> treal_le x1 y1 = treal_le x2 y2"
  1.4999 +lemma TREAL_LE_WELLDEF: "treal_eq x1 x2 & treal_eq y1 y2 ==> treal_le x1 y1 = treal_le x2 y2"
  1.5000    by (import hollight TREAL_LE_WELLDEF)
  1.5001  
  1.5002 -lemma TREAL_INV_WELLDEF: "ALL (x::hreal * hreal) y::hreal * hreal.
  1.5003 -   treal_eq x y --> treal_eq (treal_inv x) (treal_inv y)"
  1.5004 +lemma TREAL_INV_WELLDEF: "treal_eq x y ==> treal_eq (treal_inv x) (treal_inv y)"
  1.5005    by (import hollight TREAL_INV_WELLDEF)
  1.5006  
  1.5007 -typedef (open) real = "{s::hreal * hreal => bool. EX x::hreal * hreal. s = treal_eq x}"  morphisms "dest_real" "mk_real"
  1.5008 -  apply (rule light_ex_imp_nonempty[where t="treal_eq (x::hreal * hreal)"])
  1.5009 +typedef (open) real = "{s. EX x. s = treal_eq x}"  morphisms "dest_real" "mk_real"
  1.5010 +  apply (rule light_ex_imp_nonempty[where t="treal_eq x"])
  1.5011    by (import hollight TYDEF_real)
  1.5012  
  1.5013  syntax
  1.5014 @@ -3834,3079 +2037,4606 @@
  1.5015    [where a="a :: hollight.real" and r=r ,
  1.5016     OF type_definition_real]
  1.5017  
  1.5018 -definition real_of_num :: "nat => hollight.real" where 
  1.5019 -  "real_of_num == %m::nat. mk_real (treal_eq (treal_of_num m))"
  1.5020 -
  1.5021 -lemma DEF_real_of_num: "real_of_num = (%m::nat. mk_real (treal_eq (treal_of_num m)))"
  1.5022 +definition
  1.5023 +  real_of_num :: "nat => hollight.real"  where
  1.5024 +  "real_of_num == %m. mk_real (treal_eq (treal_of_num m))"
  1.5025 +
  1.5026 +lemma DEF_real_of_num: "real_of_num = (%m. mk_real (treal_eq (treal_of_num m)))"
  1.5027    by (import hollight DEF_real_of_num)
  1.5028  
  1.5029 -definition real_neg :: "hollight.real => hollight.real" where 
  1.5030 +definition
  1.5031 +  real_neg :: "hollight.real => hollight.real"  where
  1.5032    "real_neg ==
  1.5033 -%x1::hollight.real.
  1.5034 -   mk_real
  1.5035 -    (%u::hreal * hreal.
  1.5036 -        EX x1a::hreal * hreal.
  1.5037 -           treal_eq (treal_neg x1a) u & dest_real x1 x1a)"
  1.5038 +%x1. mk_real (%u. EX x1a. treal_eq (treal_neg x1a) u & dest_real x1 x1a)"
  1.5039  
  1.5040  lemma DEF_real_neg: "real_neg =
  1.5041 -(%x1::hollight.real.
  1.5042 -    mk_real
  1.5043 -     (%u::hreal * hreal.
  1.5044 -         EX x1a::hreal * hreal.
  1.5045 -            treal_eq (treal_neg x1a) u & dest_real x1 x1a))"
  1.5046 +(%x1. mk_real (%u. EX x1a. treal_eq (treal_neg x1a) u & dest_real x1 x1a))"
  1.5047    by (import hollight DEF_real_neg)
  1.5048  
  1.5049 -definition real_add :: "hollight.real => hollight.real => hollight.real" where 
  1.5050 +definition
  1.5051 +  real_add :: "hollight.real => hollight.real => hollight.real"  where
  1.5052    "real_add ==
  1.5053 -%(x1::hollight.real) y1::hollight.real.
  1.5054 +%x1 y1.
  1.5055     mk_real
  1.5056 -    (%u::hreal * hreal.
  1.5057 -        EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5058 -           treal_eq (treal_add x1a y1a) u &
  1.5059 -           dest_real x1 x1a & dest_real y1 y1a)"
  1.5060 +    (%u. EX x1a y1a.
  1.5061 +            treal_eq (treal_add x1a y1a) u &
  1.5062 +            dest_real x1 x1a & dest_real y1 y1a)"
  1.5063  
  1.5064  lemma DEF_real_add: "real_add =
  1.5065 -(%(x1::hollight.real) y1::hollight.real.
  1.5066 +(%x1 y1.
  1.5067      mk_real
  1.5068 -     (%u::hreal * hreal.
  1.5069 -         EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5070 -            treal_eq (treal_add x1a y1a) u &
  1.5071 -            dest_real x1 x1a & dest_real y1 y1a))"
  1.5072 +     (%u. EX x1a y1a.
  1.5073 +             treal_eq (treal_add x1a y1a) u &
  1.5074 +             dest_real x1 x1a & dest_real y1 y1a))"
  1.5075    by (import hollight DEF_real_add)
  1.5076  
  1.5077 -definition real_mul :: "hollight.real => hollight.real => hollight.real" where 
  1.5078 +definition
  1.5079 +  real_mul :: "hollight.real => hollight.real => hollight.real"  where
  1.5080    "real_mul ==
  1.5081 -%(x1::hollight.real) y1::hollight.real.
  1.5082 +%x1 y1.
  1.5083     mk_real
  1.5084 -    (%u::hreal * hreal.
  1.5085 -        EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5086 -           treal_eq (treal_mul x1a y1a) u &
  1.5087 -           dest_real x1 x1a & dest_real y1 y1a)"
  1.5088 +    (%u. EX x1a y1a.
  1.5089 +            treal_eq (treal_mul x1a y1a) u &
  1.5090 +            dest_real x1 x1a & dest_real y1 y1a)"
  1.5091  
  1.5092  lemma DEF_real_mul: "real_mul =
  1.5093 -(%(x1::hollight.real) y1::hollight.real.
  1.5094 +(%x1 y1.
  1.5095      mk_real
  1.5096 -     (%u::hreal * hreal.
  1.5097 -         EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5098 -            treal_eq (treal_mul x1a y1a) u &
  1.5099 -            dest_real x1 x1a & dest_real y1 y1a))"
  1.5100 +     (%u. EX x1a y1a.
  1.5101 +             treal_eq (treal_mul x1a y1a) u &
  1.5102 +             dest_real x1 x1a & dest_real y1 y1a))"
  1.5103    by (import hollight DEF_real_mul)
  1.5104  
  1.5105 -definition real_le :: "hollight.real => hollight.real => bool" where 
  1.5106 +definition
  1.5107 +  real_le :: "hollight.real => hollight.real => bool"  where
  1.5108    "real_le ==
  1.5109 -%(x1::hollight.real) y1::hollight.real.
  1.5110 -   SOME u::bool.
  1.5111 -      EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5112 -         treal_le x1a y1a = u & dest_real x1 x1a & dest_real y1 y1a"
  1.5113 +%x1 y1.
  1.5114 +   SOME u.
  1.5115 +      EX x1a y1a. treal_le x1a y1a = u & dest_real x1 x1a & dest_real y1 y1a"
  1.5116  
  1.5117  lemma DEF_real_le: "real_le =
  1.5118 -(%(x1::hollight.real) y1::hollight.real.
  1.5119 -    SOME u::bool.
  1.5120 -       EX (x1a::hreal * hreal) y1a::hreal * hreal.
  1.5121 +(%x1 y1.
  1.5122 +    SOME u.
  1.5123 +       EX x1a y1a.
  1.5124            treal_le x1a y1a = u & dest_real x1 x1a & dest_real y1 y1a)"
  1.5125    by (import hollight DEF_real_le)
  1.5126  
  1.5127 -definition real_inv :: "hollight.real => hollight.real" where 
  1.5128 +definition
  1.5129 +  real_inv :: "hollight.real => hollight.real"  where
  1.5130    "real_inv ==
  1.5131 -%x::hollight.real.
  1.5132 -   mk_real
  1.5133 -    (%u::hreal * hreal.
  1.5134 -        EX xa::hreal * hreal. treal_eq (treal_inv xa) u & dest_real x xa)"
  1.5135 +%x. mk_real (%u. EX xa. treal_eq (treal_inv xa) u & dest_real x xa)"
  1.5136  
  1.5137  lemma DEF_real_inv: "real_inv =
  1.5138 -(%x::hollight.real.
  1.5139 -    mk_real
  1.5140 -     (%u::hreal * hreal.
  1.5141 -         EX xa::hreal * hreal. treal_eq (treal_inv xa) u & dest_real x xa))"
  1.5142 +(%x. mk_real (%u. EX xa. treal_eq (treal_inv xa) u & dest_real x xa))"
  1.5143    by (import hollight DEF_real_inv)
  1.5144  
  1.5145 -definition real_sub :: "hollight.real => hollight.real => hollight.real" where 
  1.5146 -  "real_sub == %(u::hollight.real) ua::hollight.real. real_add u (real_neg ua)"
  1.5147 -
  1.5148 -lemma DEF_real_sub: "real_sub = (%(u::hollight.real) ua::hollight.real. real_add u (real_neg ua))"
  1.5149 +definition
  1.5150 +  real_sub :: "hollight.real => hollight.real => hollight.real"  where
  1.5151 +  "real_sub == %u ua. real_add u (real_neg ua)"
  1.5152 +
  1.5153 +lemma DEF_real_sub: "real_sub = (%u ua. real_add u (real_neg ua))"
  1.5154    by (import hollight DEF_real_sub)
  1.5155  
  1.5156 -definition real_lt :: "hollight.real => hollight.real => bool" where 
  1.5157 -  "real_lt == %(u::hollight.real) ua::hollight.real. ~ real_le ua u"
  1.5158 -
  1.5159 -lemma DEF_real_lt: "real_lt = (%(u::hollight.real) ua::hollight.real. ~ real_le ua u)"
  1.5160 +definition
  1.5161 +  real_lt :: "hollight.real => hollight.real => bool"  where
  1.5162 +  "real_lt == %u ua. ~ real_le ua u"
  1.5163 +
  1.5164 +lemma DEF_real_lt: "real_lt = (%u ua. ~ real_le ua u)"
  1.5165    by (import hollight DEF_real_lt)
  1.5166  
  1.5167 -consts
  1.5168 -  real_ge :: "hollight.real => hollight.real => bool" 
  1.5169 -
  1.5170 -defs
  1.5171 -  real_ge_def: "hollight.real_ge == %(u::hollight.real) ua::hollight.real. real_le ua u"
  1.5172 -
  1.5173 -lemma DEF_real_ge: "hollight.real_ge = (%(u::hollight.real) ua::hollight.real. real_le ua u)"
  1.5174 +definition
  1.5175 +  real_ge :: "hollight.real => hollight.real => bool"  where
  1.5176 +  "real_ge == %u ua. real_le ua u"
  1.5177 +
  1.5178 +lemma DEF_real_ge: "real_ge = (%u ua. real_le ua u)"
  1.5179    by (import hollight DEF_real_ge)
  1.5180  
  1.5181 -consts
  1.5182 -  real_gt :: "hollight.real => hollight.real => bool" 
  1.5183 -
  1.5184 -defs
  1.5185 -  real_gt_def: "hollight.real_gt == %(u::hollight.real) ua::hollight.real. real_lt ua u"
  1.5186 -
  1.5187 -lemma DEF_real_gt: "hollight.real_gt = (%(u::hollight.real) ua::hollight.real. real_lt ua u)"
  1.5188 +definition
  1.5189 +  real_gt :: "hollight.real => hollight.real => bool"  where
  1.5190 +  "real_gt == %u ua. real_lt ua u"
  1.5191 +
  1.5192 +lemma DEF_real_gt: "real_gt = (%u ua. real_lt ua u)"
  1.5193    by (import hollight DEF_real_gt)
  1.5194  
  1.5195 -definition real_abs :: "hollight.real => hollight.real" where 
  1.5196 -  "real_abs ==
  1.5197 -%u::hollight.real. COND (real_le (real_of_num 0) u) u (real_neg u)"
  1.5198 -
  1.5199 -lemma DEF_real_abs: "real_abs =
  1.5200 -(%u::hollight.real. COND (real_le (real_of_num 0) u) u (real_neg u))"
  1.5201 +definition
  1.5202 +  real_abs :: "hollight.real => hollight.real"  where
  1.5203 +  "real_abs == %u. if real_le (real_of_num 0) u then u else real_neg u"
  1.5204 +
  1.5205 +lemma DEF_real_abs: "real_abs = (%u. if real_le (real_of_num 0) u then u else real_neg u)"
  1.5206    by (import hollight DEF_real_abs)
  1.5207  
  1.5208 -definition real_pow :: "hollight.real => nat => hollight.real" where 
  1.5209 +definition
  1.5210 +  real_pow :: "hollight.real => nat => hollight.real"  where
  1.5211    "real_pow ==
  1.5212 -SOME real_pow::hollight.real => nat => hollight.real.
  1.5213 -   (ALL x::hollight.real. real_pow x 0 = real_of_num (NUMERAL_BIT1 0)) &
  1.5214 -   (ALL (x::hollight.real) n::nat.
  1.5215 -       real_pow x (Suc n) = real_mul x (real_pow x n))"
  1.5216 +SOME real_pow.
  1.5217 +   (ALL x. real_pow x 0 = real_of_num 1) &
  1.5218 +   (ALL x n. real_pow x (Suc n) = real_mul x (real_pow x n))"
  1.5219  
  1.5220  lemma DEF_real_pow: "real_pow =
  1.5221 -(SOME real_pow::hollight.real => nat => hollight.real.
  1.5222 -    (ALL x::hollight.real. real_pow x 0 = real_of_num (NUMERAL_BIT1 0)) &
  1.5223 -    (ALL (x::hollight.real) n::nat.
  1.5224 -        real_pow x (Suc n) = real_mul x (real_pow x n)))"
  1.5225 +(SOME real_pow.
  1.5226 +    (ALL x. real_pow x 0 = real_of_num 1) &
  1.5227 +    (ALL x n. real_pow x (Suc n) = real_mul x (real_pow x n)))"
  1.5228    by (import hollight DEF_real_pow)
  1.5229  
  1.5230 -definition real_div :: "hollight.real => hollight.real => hollight.real" where 
  1.5231 -  "real_div == %(u::hollight.real) ua::hollight.real. real_mul u (real_inv ua)"
  1.5232 -
  1.5233 -lemma DEF_real_div: "real_div = (%(u::hollight.real) ua::hollight.real. real_mul u (real_inv ua))"
  1.5234 +definition
  1.5235 +  real_div :: "hollight.real => hollight.real => hollight.real"  where
  1.5236 +  "real_div == %u ua. real_mul u (real_inv ua)"
  1.5237 +
  1.5238 +lemma DEF_real_div: "real_div = (%u ua. real_mul u (real_inv ua))"
  1.5239    by (import hollight DEF_real_div)
  1.5240  
  1.5241 -definition real_max :: "hollight.real => hollight.real => hollight.real" where 
  1.5242 -  "real_max == %(u::hollight.real) ua::hollight.real. COND (real_le u ua) ua u"
  1.5243 -
  1.5244 -lemma DEF_real_max: "real_max = (%(u::hollight.real) ua::hollight.real. COND (real_le u ua) ua u)"
  1.5245 +definition
  1.5246 +  real_max :: "hollight.real => hollight.real => hollight.real"  where
  1.5247 +  "real_max == %u ua. if real_le u ua then ua else u"
  1.5248 +
  1.5249 +lemma DEF_real_max: "real_max = (%u ua. if real_le u ua then ua else u)"
  1.5250    by (import hollight DEF_real_max)
  1.5251  
  1.5252 -definition real_min :: "hollight.real => hollight.real => hollight.real" where 
  1.5253 -  "real_min == %(u::hollight.real) ua::hollight.real. COND (real_le u ua) u ua"
  1.5254 -
  1.5255 -lemma DEF_real_min: "real_min = (%(u::hollight.real) ua::hollight.real. COND (real_le u ua) u ua)"
  1.5256 +definition
  1.5257 +  real_min :: "hollight.real => hollight.real => hollight.real"  where
  1.5258 +  "real_min == %u ua. if real_le u ua then u else ua"
  1.5259 +
  1.5260 +lemma DEF_real_min: "real_min = (%u ua. if real_le u ua then u else ua)"
  1.5261    by (import hollight DEF_real_min)
  1.5262  
  1.5263 -lemma REAL_HREAL_LEMMA1: "EX x::hreal => hollight.real.
  1.5264 -   (ALL xa::hollight.real.
  1.5265 -       real_le (real_of_num 0) xa = (EX y::hreal. xa = x y)) &
  1.5266 -   (ALL (y::hreal) z::hreal. hreal_le y z = real_le (x y) (x z))"
  1.5267 +lemma REAL_HREAL_LEMMA1: "EX x. (ALL xa. real_le (real_of_num 0) xa = (EX y. xa = x y)) &
  1.5268 +      (ALL y z. hreal_le y z = real_le (x y) (x z))"
  1.5269    by (import hollight REAL_HREAL_LEMMA1)
  1.5270  
  1.5271 -lemma REAL_HREAL_LEMMA2: "EX (x::hollight.real => hreal) r::hreal => hollight.real.
  1.5272 -   (ALL xa::hreal. x (r xa) = xa) &
  1.5273 -   (ALL xa::hollight.real. real_le (real_of_num 0) xa --> r (x xa) = xa) &
  1.5274 -   (ALL x::hreal. real_le (real_of_num 0) (r x)) &
  1.5275 -   (ALL (x::hreal) y::hreal. hreal_le x y = real_le (r x) (r y))"
  1.5276 +lemma REAL_HREAL_LEMMA2: "EX x r.
  1.5277 +   (ALL xa. x (r xa) = xa) &
  1.5278 +   (ALL xa. real_le (real_of_num 0) xa --> r (x xa) = xa) &
  1.5279 +   (ALL x. real_le (real_of_num 0) (r x)) &
  1.5280 +   (ALL x y. hreal_le x y = real_le (r x) (r y))"
  1.5281    by (import hollight REAL_HREAL_LEMMA2)
  1.5282  
  1.5283 -lemma REAL_COMPLETE_SOMEPOS: "ALL P::hollight.real => bool.
  1.5284 -   (EX x::hollight.real. P x & real_le (real_of_num 0) x) &
  1.5285 -   (EX M::hollight.real. ALL x::hollight.real. P x --> real_le x M) -->
  1.5286 -   (EX M::hollight.real.
  1.5287 -       (ALL x::hollight.real. P x --> real_le x M) &
  1.5288 -       (ALL M'::hollight.real.
  1.5289 -           (ALL x::hollight.real. P x --> real_le x M') --> real_le M M'))"
  1.5290 +lemma REAL_COMPLETE_SOMEPOS: "(EX x. P x & real_le (real_of_num 0) x) & (EX M. ALL x. P x --> real_le x M)
  1.5291 +==> EX M. (ALL x. P x --> real_le x M) &
  1.5292 +          (ALL M'. (ALL x. P x --> real_le x M') --> real_le M M')"
  1.5293    by (import hollight REAL_COMPLETE_SOMEPOS)
  1.5294  
  1.5295 -lemma REAL_COMPLETE: "ALL P::hollight.real => bool.
  1.5296 -   Ex P &
  1.5297 -   (EX M::hollight.real. ALL x::hollight.real. P x --> real_le x M) -->
  1.5298 -   (EX M::hollight.real.
  1.5299 -       (ALL x::hollight.real. P x --> real_le x M) &
  1.5300 -       (ALL M'::hollight.real.
  1.5301 -           (ALL x::hollight.real. P x --> real_le x M') --> real_le M M'))"
  1.5302 +lemma REAL_COMPLETE: "Ex P & (EX M. ALL x. P x --> real_le x M)
  1.5303 +==> EX M. (ALL x. P x --> real_le x M) &
  1.5304 +          (ALL M'. (ALL x. P x --> real_le x M') --> real_le M M')"
  1.5305    by (import hollight REAL_COMPLETE)
  1.5306  
  1.5307 -lemma REAL_ADD_AC: "real_add (m::hollight.real) (n::hollight.real) = real_add n m &
  1.5308 -real_add (real_add m n) (p::hollight.real) = real_add m (real_add n p) &
  1.5309 +lemma REAL_ADD_AC: "real_add m n = real_add n m &
  1.5310 +real_add (real_add m n) p = real_add m (real_add n p) &
  1.5311  real_add m (real_add n p) = real_add n (real_add m p)"
  1.5312    by (import hollight REAL_ADD_AC)
  1.5313  
  1.5314 -lemma REAL_ADD_RINV: "ALL x::hollight.real. real_add x (real_neg x) = real_of_num 0"
  1.5315 +lemma REAL_ADD_RINV: "real_add x (real_neg x) = real_of_num 0"
  1.5316    by (import hollight REAL_ADD_RINV)
  1.5317  
  1.5318 -lemma REAL_EQ_ADD_LCANCEL: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5319 -   (real_add x y = real_add x z) = (y = z)"
  1.5320 +lemma REAL_EQ_ADD_LCANCEL: "(real_add x y = real_add x z) = (y = z)"
  1.5321    by (import hollight REAL_EQ_ADD_LCANCEL)
  1.5322  
  1.5323 -lemma REAL_EQ_ADD_RCANCEL: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5324 -   (real_add x z = real_add y z) = (x = y)"
  1.5325 +lemma REAL_EQ_ADD_RCANCEL: "(real_add x z = real_add y z) = (x = y)"
  1.5326    by (import hollight REAL_EQ_ADD_RCANCEL)
  1.5327  
  1.5328 -lemma REAL_MUL_RZERO: "ALL x::hollight.real. real_mul x (real_of_num 0) = real_of_num 0"
  1.5329 +lemma REAL_MUL_RZERO: "real_mul x (real_of_num 0) = real_of_num 0"
  1.5330    by (import hollight REAL_MUL_RZERO)
  1.5331  
  1.5332 -lemma REAL_MUL_LZERO: "ALL x::hollight.real. real_mul (real_of_num 0) x = real_of_num 0"
  1.5333 +lemma REAL_MUL_LZERO: "real_mul (real_of_num 0) x = real_of_num 0"
  1.5334    by (import hollight REAL_MUL_LZERO)
  1.5335  
  1.5336 -lemma REAL_NEG_NEG: "ALL x::hollight.real. real_neg (real_neg x) = x"
  1.5337 +lemma REAL_NEG_NEG: "real_neg (real_neg x) = x"
  1.5338    by (import hollight REAL_NEG_NEG)
  1.5339  
  1.5340 -lemma REAL_MUL_RNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5341 -   real_mul x (real_neg y) = real_neg (real_mul x y)"
  1.5342 +lemma REAL_MUL_RNEG: "real_mul x (real_neg y) = real_neg (real_mul x y)"
  1.5343    by (import hollight REAL_MUL_RNEG)
  1.5344  
  1.5345 -lemma REAL_MUL_LNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5346 -   real_mul (real_neg x) y = real_neg (real_mul x y)"
  1.5347 +lemma REAL_MUL_LNEG: "real_mul (real_neg x) y = real_neg (real_mul x y)"
  1.5348    by (import hollight REAL_MUL_LNEG)
  1.5349  
  1.5350 -lemma REAL_NEG_ADD: "ALL (x::hollight.real) y::hollight.real.
  1.5351 -   real_neg (real_add x y) = real_add (real_neg x) (real_neg y)"
  1.5352 +lemma REAL_NEG_ADD: "real_neg (real_add x y) = real_add (real_neg x) (real_neg y)"
  1.5353    by (import hollight REAL_NEG_ADD)
  1.5354  
  1.5355 -lemma REAL_ADD_RID: "ALL x::hollight.real. real_add x (real_of_num 0) = x"
  1.5356 +lemma REAL_ADD_RID: "real_add x (real_of_num 0) = x"
  1.5357    by (import hollight REAL_ADD_RID)
  1.5358  
  1.5359  lemma REAL_NEG_0: "real_neg (real_of_num 0) = real_of_num 0"
  1.5360    by (import hollight REAL_NEG_0)
  1.5361  
  1.5362 -lemma REAL_LE_LNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5363 -   real_le (real_neg x) y = real_le (real_of_num 0) (real_add x y)"
  1.5364 +lemma REAL_LE_LNEG: "real_le (real_neg x) y = real_le (real_of_num 0) (real_add x y)"
  1.5365    by (import hollight REAL_LE_LNEG)
  1.5366  
  1.5367 -lemma REAL_LE_NEG2: "ALL (x::hollight.real) y::hollight.real.
  1.5368 -   real_le (real_neg x) (real_neg y) = real_le y x"
  1.5369 +lemma REAL_LE_NEG2: "real_le (real_neg x) (real_neg y) = real_le y x"
  1.5370    by (import hollight REAL_LE_NEG2)
  1.5371  
  1.5372 -lemma REAL_LE_RNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5373 -   real_le x (real_neg y) = real_le (real_add x y) (real_of_num 0)"
  1.5374 +lemma REAL_LE_RNEG: "real_le x (real_neg y) = real_le (real_add x y) (real_of_num 0)"
  1.5375    by (import hollight REAL_LE_RNEG)
  1.5376  
  1.5377 -lemma REAL_OF_NUM_POW: "ALL (x::nat) n::nat. real_pow (real_of_num x) n = real_of_num (EXP x n)"
  1.5378 +lemma REAL_OF_NUM_POW: "real_pow (real_of_num x) n = real_of_num (x ^ n)"
  1.5379    by (import hollight REAL_OF_NUM_POW)
  1.5380  
  1.5381 -lemma REAL_POW_NEG: "ALL (x::hollight.real) n::nat.
  1.5382 -   real_pow (real_neg x) n =
  1.5383 -   COND (EVEN n) (real_pow x n) (real_neg (real_pow x n))"
  1.5384 +lemma REAL_POW_NEG: "real_pow (real_neg x) n =
  1.5385 +(if even n then real_pow x n else real_neg (real_pow x n))"
  1.5386    by (import hollight REAL_POW_NEG)
  1.5387  
  1.5388 -lemma REAL_ABS_NUM: "ALL x::nat. real_abs (real_of_num x) = real_of_num x"
  1.5389 +lemma REAL_ABS_NUM: "real_abs (real_of_num x) = real_of_num x"
  1.5390    by (import hollight REAL_ABS_NUM)
  1.5391  
  1.5392 -lemma REAL_ABS_NEG: "ALL x::hollight.real. real_abs (real_neg x) = real_abs x"
  1.5393 +lemma REAL_ABS_NEG: "real_abs (real_neg x) = real_abs x"
  1.5394    by (import hollight REAL_ABS_NEG)
  1.5395  
  1.5396 -lemma REAL_LTE_TOTAL: "ALL (x::hollight.real) xa::hollight.real. real_lt x xa | real_le xa x"
  1.5397 +lemma REAL_LTE_TOTAL: "real_lt x xa | real_le xa x"
  1.5398    by (import hollight REAL_LTE_TOTAL)
  1.5399  
  1.5400 -lemma REAL_LET_TOTAL: "ALL (x::hollight.real) xa::hollight.real. real_le x xa | real_lt xa x"
  1.5401 +lemma REAL_LET_TOTAL: "real_le x xa | real_lt xa x"
  1.5402    by (import hollight REAL_LET_TOTAL)
  1.5403  
  1.5404 -lemma REAL_LT_IMP_LE: "ALL (x::hollight.real) y::hollight.real. real_lt x y --> real_le x y"
  1.5405 +lemma REAL_LT_IMP_LE: "real_lt x y ==> real_le x y"
  1.5406    by (import hollight REAL_LT_IMP_LE)
  1.5407  
  1.5408 -lemma REAL_LTE_TRANS: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5409 -   real_lt x y & real_le y z --> real_lt x z"
  1.5410 +lemma REAL_LTE_TRANS: "real_lt x y & real_le y z ==> real_lt x z"
  1.5411    by (import hollight REAL_LTE_TRANS)
  1.5412  
  1.5413 -lemma REAL_LET_TRANS: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5414 -   real_le x y & real_lt y z --> real_lt x z"
  1.5415 +lemma REAL_LET_TRANS: "real_le x y & real_lt y z ==> real_lt x z"
  1.5416    by (import hollight REAL_LET_TRANS)
  1.5417  
  1.5418 -lemma REAL_LT_TRANS: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5419 -   real_lt x y & real_lt y z --> real_lt x z"
  1.5420 +lemma REAL_LT_TRANS: "real_lt x y & real_lt y z ==> real_lt x z"
  1.5421    by (import hollight REAL_LT_TRANS)
  1.5422  
  1.5423 -lemma REAL_LE_ADD: "ALL (x::hollight.real) y::hollight.real.
  1.5424 -   real_le (real_of_num 0) x & real_le (real_of_num 0) y -->
  1.5425 -   real_le (real_of_num 0) (real_add x y)"
  1.5426 +lemma REAL_LE_ADD: "real_le (real_of_num 0) x & real_le (real_of_num 0) y
  1.5427 +==> real_le (real_of_num 0) (real_add x y)"
  1.5428    by (import hollight REAL_LE_ADD)
  1.5429  
  1.5430 -lemma REAL_LTE_ANTISYM: "ALL (x::hollight.real) y::hollight.real. ~ (real_lt x y & real_le y x)"
  1.5431 +lemma REAL_LTE_ANTISYM: "~ (real_lt x y & real_le y x)"
  1.5432    by (import hollight REAL_LTE_ANTISYM)
  1.5433  
  1.5434 -lemma REAL_SUB_LE: "ALL (x::hollight.real) xa::hollight.real.
  1.5435 -   real_le (real_of_num 0) (real_sub x xa) = real_le xa x"
  1.5436 +lemma REAL_SUB_LE: "real_le (real_of_num 0) (real_sub x xa) = real_le xa x"
  1.5437    by (import hollight REAL_SUB_LE)
  1.5438  
  1.5439 -lemma REAL_NEG_SUB: "ALL (x::hollight.real) xa::hollight.real.
  1.5440 -   real_neg (real_sub x xa) = real_sub xa x"
  1.5441 +lemma REAL_NEG_SUB: "real_neg (real_sub x xa) = real_sub xa x"
  1.5442    by (import hollight REAL_NEG_SUB)
  1.5443  
  1.5444 -lemma REAL_LE_LT: "ALL (x::hollight.real) xa::hollight.real.
  1.5445 -   real_le x xa = (real_lt x xa | x = xa)"
  1.5446 +lemma REAL_LE_LT: "real_le x xa = (real_lt x xa | x = xa)"
  1.5447    by (import hollight REAL_LE_LT)
  1.5448  
  1.5449 -lemma REAL_SUB_LT: "ALL (x::hollight.real) xa::hollight.real.
  1.5450 -   real_lt (real_of_num 0) (real_sub x xa) = real_lt xa x"
  1.5451 +lemma REAL_SUB_LT: "real_lt (real_of_num 0) (real_sub x xa) = real_lt xa x"
  1.5452    by (import hollight REAL_SUB_LT)
  1.5453  
  1.5454 -lemma REAL_NOT_LT: "ALL (x::hollight.real) xa::hollight.real. (~ real_lt x xa) = real_le xa x"
  1.5455 +lemma REAL_NOT_LT: "(~ real_lt x xa) = real_le xa x"
  1.5456    by (import hollight REAL_NOT_LT)
  1.5457  
  1.5458 -lemma REAL_SUB_0: "ALL (x::hollight.real) y::hollight.real.
  1.5459 -   (real_sub x y = real_of_num 0) = (x = y)"
  1.5460 +lemma REAL_SUB_0: "(real_sub x y = real_of_num 0) = (x = y)"
  1.5461    by (import hollight REAL_SUB_0)
  1.5462  
  1.5463 -lemma REAL_LT_LE: "ALL (x::hollight.real) y::hollight.real.
  1.5464 -   real_lt x y = (real_le x y & x ~= y)"
  1.5465 +lemma REAL_LT_LE: "real_lt x y = (real_le x y & x ~= y)"
  1.5466    by (import hollight REAL_LT_LE)
  1.5467  
  1.5468 -lemma REAL_LT_REFL: "ALL x::hollight.real. ~ real_lt x x"
  1.5469 +lemma REAL_LT_REFL: "~ real_lt x x"
  1.5470    by (import hollight REAL_LT_REFL)
  1.5471  
  1.5472 -lemma REAL_LTE_ADD: "ALL (x::hollight.real) y::hollight.real.
  1.5473 -   real_lt (real_of_num 0) x & real_le (real_of_num 0) y -->
  1.5474 -   real_lt (real_of_num 0) (real_add x y)"
  1.5475 +lemma REAL_LTE_ADD: "real_lt (real_of_num 0) x & real_le (real_of_num 0) y
  1.5476 +==> real_lt (real_of_num 0) (real_add x y)"
  1.5477    by (import hollight REAL_LTE_ADD)
  1.5478  
  1.5479 -lemma REAL_LET_ADD: "ALL (x::hollight.real) y::hollight.real.
  1.5480 -   real_le (real_of_num 0) x & real_lt (real_of_num 0) y -->
  1.5481 -   real_lt (real_of_num 0) (real_add x y)"
  1.5482 +lemma REAL_LET_ADD: "real_le (real_of_num 0) x & real_lt (real_of_num 0) y
  1.5483 +==> real_lt (real_of_num 0) (real_add x y)"
  1.5484    by (import hollight REAL_LET_ADD)
  1.5485  
  1.5486 -lemma REAL_LT_ADD: "ALL (x::hollight.real) y::hollight.real.
  1.5487 -   real_lt (real_of_num 0) x & real_lt (real_of_num 0) y -->
  1.5488 -   real_lt (real_of_num 0) (real_add x y)"
  1.5489 +lemma REAL_LT_ADD: "real_lt (real_of_num 0) x & real_lt (real_of_num 0) y
  1.5490 +==> real_lt (real_of_num 0) (real_add x y)"
  1.5491    by (import hollight REAL_LT_ADD)
  1.5492  
  1.5493 -lemma REAL_ENTIRE: "ALL (x::hollight.real) y::hollight.real.
  1.5494 -   (real_mul x y = real_of_num 0) = (x = real_of_num 0 | y = real_of_num 0)"
  1.5495 +lemma REAL_ENTIRE: "(real_mul x y = real_of_num 0) = (x = real_of_num 0 | y = real_of_num 0)"
  1.5496    by (import hollight REAL_ENTIRE)
  1.5497  
  1.5498 -lemma REAL_LE_NEGTOTAL: "ALL x::hollight.real.
  1.5499 -   real_le (real_of_num 0) x | real_le (real_of_num 0) (real_neg x)"
  1.5500 +lemma REAL_LE_NEGTOTAL: "real_le (real_of_num 0) x | real_le (real_of_num 0) (real_neg x)"
  1.5501    by (import hollight REAL_LE_NEGTOTAL)
  1.5502  
  1.5503 -lemma REAL_LE_SQUARE: "ALL x::hollight.real. real_le (real_of_num 0) (real_mul x x)"
  1.5504 +lemma REAL_LE_SQUARE: "real_le (real_of_num 0) (real_mul x x)"
  1.5505    by (import hollight REAL_LE_SQUARE)
  1.5506  
  1.5507 -lemma REAL_MUL_RID: "ALL x::hollight.real. real_mul x (real_of_num (NUMERAL_BIT1 0)) = x"
  1.5508 +lemma REAL_MUL_RID: "real_mul x (real_of_num 1) = x"
  1.5509    by (import hollight REAL_MUL_RID)
  1.5510  
  1.5511 -lemma REAL_POW_2: "ALL x::hollight.real.
  1.5512 -   real_pow x (NUMERAL_BIT0 (NUMERAL_BIT1 0)) = real_mul x x"
  1.5513 +lemma REAL_POW_2: "real_pow x 2 = real_mul x x"
  1.5514    by (import hollight REAL_POW_2)
  1.5515  
  1.5516 -lemma REAL_POLY_CLAUSES: "(ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5517 -    real_add x (real_add y z) = real_add (real_add x y) z) &
  1.5518 -(ALL (x::hollight.real) y::hollight.real. real_add x y = real_add y x) &
  1.5519 -(ALL x::hollight.real. real_add (real_of_num 0) x = x) &
  1.5520 -(ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5521 -    real_mul x (real_mul y z) = real_mul (real_mul x y) z) &
  1.5522 -(ALL (x::hollight.real) y::hollight.real. real_mul x y = real_mul y x) &
  1.5523 -(ALL x::hollight.real. real_mul (real_of_num (NUMERAL_BIT1 0)) x = x) &
  1.5524 -(ALL x::hollight.real. real_mul (real_of_num 0) x = real_of_num 0) &
  1.5525 -(ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.5526 +lemma REAL_POLY_CLAUSES: "(ALL x y z. real_add x (real_add y z) = real_add (real_add x y) z) &
  1.5527 +(ALL x y. real_add x y = real_add y x) &
  1.5528 +(ALL x. real_add (real_of_num 0) x = x) &
  1.5529 +(ALL x y z. real_mul x (real_mul y z) = real_mul (real_mul x y) z) &
  1.5530 +(ALL x y. real_mul x y = real_mul y x) &
  1.5531 +(ALL x. real_mul (real_of_num 1) x = x) &
  1.5532 +(ALL x. real_mul (real_of_num 0) x = real_of_num 0) &
  1.5533 +(ALL x xa xb.
  1.5534      real_mul x (real_add xa xb) =
  1.5535      real_add (real_mul x xa) (real_mul x xb)) &
  1.5536 -(ALL x::hollight.real. real_pow x 0 = real_of_num (NUMERAL_BIT1 0)) &
  1.5537 -(ALL (x::hollight.real) xa::nat.
  1.5538 -    real_pow x (Suc xa) = real_mul x (real_pow x xa))"
  1.5539 +(ALL x. real_pow x 0 = real_of_num 1) &
  1.5540 +(ALL x xa. real_pow x (Suc xa) = real_mul x (real_pow x xa))"
  1.5541    by (import hollight REAL_POLY_CLAUSES)
  1.5542  
  1.5543 -lemma REAL_POLY_NEG_CLAUSES: "(ALL x::hollight.real.
  1.5544 -    real_neg x = real_mul (real_neg (real_of_num (NUMERAL_BIT1 0))) x) &
  1.5545 -(ALL (x::hollight.real) xa::hollight.real.
  1.5546 -    real_sub x xa =
  1.5547 -    real_add x (real_mul (real_neg (real_of_num (NUMERAL_BIT1 0))) xa))"
  1.5548 +lemma REAL_POLY_NEG_CLAUSES: "(ALL x. real_neg x = real_mul (real_neg (real_of_num 1)) x) &
  1.5549 +(ALL x xa.
  1.5550 +    real_sub x xa = real_add x (real_mul (real_neg (real_of_num 1)) xa))"
  1.5551    by (import hollight REAL_POLY_NEG_CLAUSES)
  1.5552  
  1.5553 -lemma REAL_POS: "ALL x::nat. real_le (real_of_num 0) (real_of_num x)"
  1.5554 +lemma REAL_POS: "real_le (real_of_num 0) (real_of_num x)"
  1.5555    by (import hollight REAL_POS)
  1.5556  
  1.5557 -lemma REAL_OF_NUM_LT: "ALL (x::nat) xa::nat. real_lt (real_of_num x) (real_of_num xa) = < x xa"
  1.5558 +lemma REAL_OF_NUM_LT: "real_lt (real_of_num x) (real_of_num xa) = (x < xa)"
  1.5559    by (import hollight REAL_OF_NUM_LT)
  1.5560  
  1.5561 -lemma REAL_OF_NUM_GE: "ALL (x::nat) xa::nat.
  1.5562 -   hollight.real_ge (real_of_num x) (real_of_num xa) = >= x xa"
  1.5563 +lemma REAL_OF_NUM_GE: "real_ge (real_of_num x) (real_of_num xa) = (xa <= x)"
  1.5564    by (import hollight REAL_OF_NUM_GE)
  1.5565  
  1.5566 -lemma REAL_OF_NUM_GT: "ALL (x::nat) xa::nat.
  1.5567 -   hollight.real_gt (real_of_num x) (real_of_num xa) = > x xa"
  1.5568 +lemma REAL_OF_NUM_GT: "real_gt (real_of_num x) (real_of_num xa) = (xa < x)"
  1.5569    by (import hollight REAL_OF_NUM_GT)
  1.5570  
  1.5571 -lemma REAL_OF_NUM_SUC: "ALL x::nat.
  1.5572 -   real_add (real_of_num x) (real_of_num (NUMERAL_BIT1 0)) =
  1.5573 -   real_of_num (Suc x)"
  1.5574 +lemma REAL_OF_NUM_MAX: "real_max (real_of_num x) (real_of_num xa) = real_of_num (max x xa)"
  1.5575 +  by (import hollight REAL_OF_NUM_MAX)
  1.5576 +
  1.5577 +lemma REAL_OF_NUM_MIN: "real_min (real_of_num x) (real_of_num xa) = real_of_num (min x xa)"
  1.5578 +  by (import hollight REAL_OF_NUM_MIN)
  1.5579 +
  1.5580 +lemma REAL_OF_NUM_SUC: "real_add (real_of_num x) (real_of_num 1) = real_of_num (Suc x)"
  1.5581    by (import hollight REAL_OF_NUM_SUC)
  1.5582  
  1.5583 -lemma REAL_OF_NUM_SUB: "ALL (m::nat) n::nat.
  1.5584 -   <= m n --> real_sub (real_of_num n) (real_of_num m) = real_of_num (n - m)"
  1.5585 +lemma REAL_OF_NUM_SUB: "m <= n ==> real_sub (real_of_num n) (real_of_num m) = real_of_num (n - m)"
  1.5586    by (import hollight REAL_OF_NUM_SUB)
  1.5587  
  1.5588 -lemma REAL_MUL_AC: "real_mul (m::hollight.real) (n::hollight.real) = real_mul n m &
  1.5589 -real_mul (real_mul m n) (p::hollight.real) = real_mul m (real_mul n p) &
  1.5590 +lemma REAL_MUL_AC: "real_mul m n = real_mul n m &
  1.5591 +real_mul (real_mul m n) p = real_mul m (real_mul n p) &
  1.5592  real_mul m (real_mul n p) = real_mul n (real_mul m p)"
  1.5593    by (import hollight REAL_MUL_AC)
  1.5594  
  1.5595 -lemma REAL_ADD_RDISTRIB: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5596 -   real_mul (real_add x y) z = real_add (real_mul x z) (real_mul y z)"
  1.5597 +lemma REAL_ADD_RDISTRIB: "real_mul (real_add x y) z = real_add (real_mul x z) (real_mul y z)"
  1.5598    by (import hollight REAL_ADD_RDISTRIB)
  1.5599  
  1.5600 -lemma REAL_LT_LADD_IMP: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5601 -   real_lt y z --> real_lt (real_add x y) (real_add x z)"
  1.5602 +lemma REAL_LT_LADD_IMP: "real_lt y z ==> real_lt (real_add x y) (real_add x z)"
  1.5603    by (import hollight REAL_LT_LADD_IMP)
  1.5604  
  1.5605 -lemma REAL_LT_MUL: "ALL (x::hollight.real) y::hollight.real.
  1.5606 -   real_lt (real_of_num 0) x & real_lt (real_of_num 0) y -->
  1.5607 -   real_lt (real_of_num 0) (real_mul x y)"
  1.5608 +lemma REAL_LT_MUL: "real_lt (real_of_num 0) x & real_lt (real_of_num 0) y
  1.5609 +==> real_lt (real_of_num 0) (real_mul x y)"
  1.5610    by (import hollight REAL_LT_MUL)
  1.5611  
  1.5612 -lemma REAL_EQ_ADD_LCANCEL_0: "ALL (x::hollight.real) y::hollight.real.
  1.5613 -   (real_add x y = x) = (y = real_of_num 0)"
  1.5614 +lemma REAL_EQ_ADD_LCANCEL_0: "(real_add x y = x) = (y = real_of_num 0)"
  1.5615    by (import hollight REAL_EQ_ADD_LCANCEL_0)
  1.5616  
  1.5617 -lemma REAL_EQ_ADD_RCANCEL_0: "ALL (x::hollight.real) y::hollight.real.
  1.5618 -   (real_add x y = y) = (x = real_of_num 0)"
  1.5619 +lemma REAL_EQ_ADD_RCANCEL_0: "(real_add x y = y) = (x = real_of_num 0)"
  1.5620    by (import hollight REAL_EQ_ADD_RCANCEL_0)
  1.5621  
  1.5622 -lemma REAL_LNEG_UNIQ: "ALL (x::hollight.real) y::hollight.real.
  1.5623 -   (real_add x y = real_of_num 0) = (x = real_neg y)"
  1.5624 +lemma REAL_LNEG_UNIQ: "(real_add x y = real_of_num 0) = (x = real_neg y)"
  1.5625    by (import hollight REAL_LNEG_UNIQ)
  1.5626  
  1.5627 -lemma REAL_RNEG_UNIQ: "ALL (x::hollight.real) y::hollight.real.
  1.5628 -   (real_add x y = real_of_num 0) = (y = real_neg x)"
  1.5629 +lemma REAL_RNEG_UNIQ: "(real_add x y = real_of_num 0) = (y = real_neg x)"
  1.5630    by (import hollight REAL_RNEG_UNIQ)
  1.5631  
  1.5632 -lemma REAL_NEG_LMUL: "ALL (x::hollight.real) y::hollight.real.
  1.5633 -   real_neg (real_mul x y) = real_mul (real_neg x) y"
  1.5634 +lemma REAL_NEG_LMUL: "real_neg (real_mul x y) = real_mul (real_neg x) y"
  1.5635    by (import hollight REAL_NEG_LMUL)
  1.5636  
  1.5637 -lemma REAL_NEG_RMUL: "ALL (x::hollight.real) y::hollight.real.
  1.5638 -   real_neg (real_mul x y) = real_mul x (real_neg y)"
  1.5639 +lemma REAL_NEG_RMUL: "real_neg (real_mul x y) = real_mul x (real_neg y)"
  1.5640    by (import hollight REAL_NEG_RMUL)
  1.5641  
  1.5642 -lemma REAL_NEGNEG: "ALL x::hollight.real. real_neg (real_neg x) = x"
  1.5643 +lemma REAL_NEGNEG: "real_neg (real_neg x) = x"
  1.5644    by (import hollight REAL_NEGNEG)
  1.5645  
  1.5646 -lemma REAL_NEG_MUL2: "ALL (x::hollight.real) y::hollight.real.
  1.5647 -   real_mul (real_neg x) (real_neg y) = real_mul x y"
  1.5648 +lemma REAL_NEG_MUL2: "real_mul (real_neg x) (real_neg y) = real_mul x y"
  1.5649    by (import hollight REAL_NEG_MUL2)
  1.5650  
  1.5651 -lemma REAL_LT_LADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5652 -   real_lt (real_add x y) (real_add x z) = real_lt y z"
  1.5653 +lemma REAL_LT_LADD: "real_lt (real_add x y) (real_add x z) = real_lt y z"
  1.5654    by (import hollight REAL_LT_LADD)
  1.5655  
  1.5656 -lemma REAL_LT_RADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5657 -   real_lt (real_add x z) (real_add y z) = real_lt x y"
  1.5658 +lemma REAL_LT_RADD: "real_lt (real_add x z) (real_add y z) = real_lt x y"
  1.5659    by (import hollight REAL_LT_RADD)
  1.5660  
  1.5661 -lemma REAL_LT_ANTISYM: "ALL (x::hollight.real) y::hollight.real. ~ (real_lt x y & real_lt y x)"
  1.5662 +lemma REAL_LT_ANTISYM: "~ (real_lt x y & real_lt y x)"
  1.5663    by (import hollight REAL_LT_ANTISYM)
  1.5664  
  1.5665 -lemma REAL_LT_GT: "ALL (x::hollight.real) y::hollight.real. real_lt x y --> ~ real_lt y x"
  1.5666 +lemma REAL_LT_GT: "real_lt x y ==> ~ real_lt y x"
  1.5667    by (import hollight REAL_LT_GT)
  1.5668  
  1.5669 -lemma REAL_NOT_EQ: "ALL (x::hollight.real) y::hollight.real.
  1.5670 -   (x ~= y) = (real_lt x y | real_lt y x)"
  1.5671 +lemma REAL_NOT_EQ: "(x ~= y) = (real_lt x y | real_lt y x)"
  1.5672    by (import hollight REAL_NOT_EQ)
  1.5673  
  1.5674 -lemma REAL_LE_TOTAL: "ALL (x::hollight.real) y::hollight.real. real_le x y | real_le y x"
  1.5675 -  by (import hollight REAL_LE_TOTAL)
  1.5676 -
  1.5677 -lemma REAL_LE_REFL: "ALL x::hollight.real. real_le x x"
  1.5678 -  by (import hollight REAL_LE_REFL)
  1.5679 -
  1.5680 -lemma REAL_LE_ANTISYM: "ALL (x::hollight.real) y::hollight.real.
  1.5681 -   (real_le x y & real_le y x) = (x = y)"
  1.5682 -  by (import hollight REAL_LE_ANTISYM)
  1.5683 -
  1.5684 -lemma REAL_LET_ANTISYM: "ALL (x::hollight.real) y::hollight.real. ~ (real_le x y & real_lt y x)"
  1.5685 +lemma REAL_LET_ANTISYM: "~ (real_le x y & real_lt y x)"
  1.5686    by (import hollight REAL_LET_ANTISYM)
  1.5687  
  1.5688 -lemma REAL_NEG_LT0: "ALL x::hollight.real.
  1.5689 -   real_lt (real_neg x) (real_of_num 0) = real_lt (real_of_num 0) x"
  1.5690 +lemma REAL_NEG_LT0: "real_lt (real_neg x) (real_of_num 0) = real_lt (real_of_num 0) x"
  1.5691    by (import hollight REAL_NEG_LT0)
  1.5692  
  1.5693 -lemma REAL_NEG_GT0: "ALL x::hollight.real.
  1.5694 -   real_lt (real_of_num 0) (real_neg x) = real_lt x (real_of_num 0)"
  1.5695 +lemma REAL_NEG_GT0: "real_lt (real_of_num 0) (real_neg x) = real_lt x (real_of_num 0)"
  1.5696    by (import hollight REAL_NEG_GT0)
  1.5697  
  1.5698 -lemma REAL_NEG_LE0: "ALL x::hollight.real.
  1.5699 -   real_le (real_neg x) (real_of_num 0) = real_le (real_of_num 0) x"
  1.5700 +lemma REAL_NEG_LE0: "real_le (real_neg x) (real_of_num 0) = real_le (real_of_num 0) x"
  1.5701    by (import hollight REAL_NEG_LE0)
  1.5702  
  1.5703 -lemma REAL_NEG_GE0: "ALL x::hollight.real.
  1.5704 -   real_le (real_of_num 0) (real_neg x) = real_le x (real_of_num 0)"
  1.5705 +lemma REAL_NEG_GE0: "real_le (real_of_num 0) (real_neg x) = real_le x (real_of_num 0)"
  1.5706    by (import hollight REAL_NEG_GE0)
  1.5707  
  1.5708 -lemma REAL_LT_TOTAL: "ALL (x::hollight.real) y::hollight.real. x = y | real_lt x y | real_lt y x"
  1.5709 +lemma REAL_LT_TOTAL: "x = y | real_lt x y | real_lt y x"
  1.5710    by (import hollight REAL_LT_TOTAL)
  1.5711  
  1.5712 -lemma REAL_LT_NEGTOTAL: "ALL x::hollight.real.
  1.5713 -   x = real_of_num 0 |
  1.5714 -   real_lt (real_of_num 0) x | real_lt (real_of_num 0) (real_neg x)"
  1.5715 +lemma REAL_LT_NEGTOTAL: "x = real_of_num 0 |
  1.5716 +real_lt (real_of_num 0) x | real_lt (real_of_num 0) (real_neg x)"
  1.5717    by (import hollight REAL_LT_NEGTOTAL)
  1.5718  
  1.5719 -lemma REAL_LE_01: "real_le (real_of_num 0) (real_of_num (NUMERAL_BIT1 0))"
  1.5720 +lemma REAL_LE_01: "real_le (real_of_num 0) (real_of_num 1)"
  1.5721    by (import hollight REAL_LE_01)
  1.5722  
  1.5723 -lemma REAL_LT_01: "real_lt (real_of_num 0) (real_of_num (NUMERAL_BIT1 0))"
  1.5724 +lemma REAL_LT_01: "real_lt (real_of_num 0) (real_of_num 1)"
  1.5725    by (import hollight REAL_LT_01)
  1.5726  
  1.5727 -lemma REAL_LE_LADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5728 -   real_le (real_add x y) (real_add x z) = real_le y z"
  1.5729 +lemma REAL_LE_LADD: "real_le (real_add x y) (real_add x z) = real_le y z"
  1.5730    by (import hollight REAL_LE_LADD)
  1.5731  
  1.5732 -lemma REAL_LE_RADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5733 -   real_le (real_add x z) (real_add y z) = real_le x y"
  1.5734 +lemma REAL_LE_RADD: "real_le (real_add x z) (real_add y z) = real_le x y"
  1.5735    by (import hollight REAL_LE_RADD)
  1.5736  
  1.5737 -lemma REAL_LT_ADD2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.5738 -   z::hollight.real.
  1.5739 -   real_lt w x & real_lt y z --> real_lt (real_add w y) (real_add x z)"
  1.5740 +lemma REAL_LT_ADD2: "real_lt w x & real_lt y z ==> real_lt (real_add w y) (real_add x z)"
  1.5741    by (import hollight REAL_LT_ADD2)
  1.5742  
  1.5743 -lemma REAL_LE_ADD2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.5744 -   z::hollight.real.
  1.5745 -   real_le w x & real_le y z --> real_le (real_add w y) (real_add x z)"
  1.5746 +lemma REAL_LE_ADD2: "real_le w x & real_le y z ==> real_le (real_add w y) (real_add x z)"
  1.5747    by (import hollight REAL_LE_ADD2)
  1.5748  
  1.5749 -lemma REAL_LT_LNEG: "ALL (x::hollight.real) xa::hollight.real.
  1.5750 -   real_lt (real_neg x) xa = real_lt (real_of_num 0) (real_add x xa)"
  1.5751 +lemma REAL_LT_LNEG: "real_lt (real_neg x) xa = real_lt (real_of_num 0) (real_add x xa)"
  1.5752    by (import hollight REAL_LT_LNEG)
  1.5753  
  1.5754 -lemma REAL_LT_RNEG: "ALL (x::hollight.real) xa::hollight.real.
  1.5755 -   real_lt x (real_neg xa) = real_lt (real_add x xa) (real_of_num 0)"
  1.5756 +lemma REAL_LT_RNEG: "real_lt x (real_neg xa) = real_lt (real_add x xa) (real_of_num 0)"
  1.5757    by (import hollight REAL_LT_RNEG)
  1.5758  
  1.5759 -lemma REAL_LT_ADDNEG: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5760 -   real_lt y (real_add x (real_neg z)) = real_lt (real_add y z) x"
  1.5761 +lemma REAL_LT_ADDNEG: "real_lt y (real_add x (real_neg z)) = real_lt (real_add y z) x"
  1.5762    by (import hollight REAL_LT_ADDNEG)
  1.5763  
  1.5764 -lemma REAL_LT_ADDNEG2: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5765 -   real_lt (real_add x (real_neg y)) z = real_lt x (real_add z y)"
  1.5766 +lemma REAL_LT_ADDNEG2: "real_lt (real_add x (real_neg y)) z = real_lt x (real_add z y)"
  1.5767    by (import hollight REAL_LT_ADDNEG2)
  1.5768  
  1.5769 -lemma REAL_LT_ADD1: "ALL (x::hollight.real) y::hollight.real.
  1.5770 -   real_le x y --> real_lt x (real_add y (real_of_num (NUMERAL_BIT1 0)))"
  1.5771 +lemma REAL_LT_ADD1: "real_le x y ==> real_lt x (real_add y (real_of_num 1))"
  1.5772    by (import hollight REAL_LT_ADD1)
  1.5773  
  1.5774 -lemma REAL_SUB_ADD: "ALL (x::hollight.real) y::hollight.real. real_add (real_sub x y) y = x"
  1.5775 +lemma REAL_SUB_ADD: "real_add (real_sub x y) y = x"
  1.5776    by (import hollight REAL_SUB_ADD)
  1.5777  
  1.5778 -lemma REAL_SUB_ADD2: "ALL (x::hollight.real) y::hollight.real. real_add y (real_sub x y) = x"
  1.5779 +lemma REAL_SUB_ADD2: "real_add y (real_sub x y) = x"
  1.5780    by (import hollight REAL_SUB_ADD2)
  1.5781  
  1.5782 -lemma REAL_SUB_REFL: "ALL x::hollight.real. real_sub x x = real_of_num 0"
  1.5783 +lemma REAL_SUB_REFL: "real_sub x x = real_of_num 0"
  1.5784    by (import hollight REAL_SUB_REFL)
  1.5785  
  1.5786 -lemma REAL_LE_DOUBLE: "ALL x::hollight.real.
  1.5787 -   real_le (real_of_num 0) (real_add x x) = real_le (real_of_num 0) x"
  1.5788 +lemma REAL_LE_DOUBLE: "real_le (real_of_num 0) (real_add x x) = real_le (real_of_num 0) x"
  1.5789    by (import hollight REAL_LE_DOUBLE)
  1.5790  
  1.5791 -lemma REAL_LE_NEGL: "ALL x::hollight.real. real_le (real_neg x) x = real_le (real_of_num 0) x"
  1.5792 +lemma REAL_LE_NEGL: "real_le (real_neg x) x = real_le (real_of_num 0) x"
  1.5793    by (import hollight REAL_LE_NEGL)
  1.5794  
  1.5795 -lemma REAL_LE_NEGR: "ALL x::hollight.real. real_le x (real_neg x) = real_le x (real_of_num 0)"
  1.5796 +lemma REAL_LE_NEGR: "real_le x (real_neg x) = real_le x (real_of_num 0)"
  1.5797    by (import hollight REAL_LE_NEGR)
  1.5798  
  1.5799 -lemma REAL_NEG_EQ_0: "ALL x::hollight.real. (real_neg x = real_of_num 0) = (x = real_of_num 0)"
  1.5800 +lemma REAL_NEG_EQ_0: "(real_neg x = real_of_num 0) = (x = real_of_num 0)"
  1.5801    by (import hollight REAL_NEG_EQ_0)
  1.5802  
  1.5803 -lemma REAL_ADD_SUB: "ALL (x::hollight.real) y::hollight.real. real_sub (real_add x y) x = y"
  1.5804 +lemma REAL_ADD_SUB: "real_sub (real_add x y) x = y"
  1.5805    by (import hollight REAL_ADD_SUB)
  1.5806  
  1.5807 -lemma REAL_NEG_EQ: "ALL (x::hollight.real) y::hollight.real. (real_neg x = y) = (x = real_neg y)"
  1.5808 +lemma REAL_NEG_EQ: "(real_neg x = y) = (x = real_neg y)"
  1.5809    by (import hollight REAL_NEG_EQ)
  1.5810  
  1.5811 -lemma REAL_NEG_MINUS1: "ALL x::hollight.real.
  1.5812 -   real_neg x = real_mul (real_neg (real_of_num (NUMERAL_BIT1 0))) x"
  1.5813 +lemma REAL_NEG_MINUS1: "real_neg x = real_mul (real_neg (real_of_num 1)) x"
  1.5814    by (import hollight REAL_NEG_MINUS1)
  1.5815  
  1.5816 -lemma REAL_LT_IMP_NE: "ALL (x::hollight.real) y::hollight.real. real_lt x y --> x ~= y"
  1.5817 +lemma REAL_LT_IMP_NE: "real_lt x y ==> x ~= y"
  1.5818    by (import hollight REAL_LT_IMP_NE)
  1.5819  
  1.5820 -lemma REAL_LE_ADDR: "ALL (x::hollight.real) y::hollight.real.
  1.5821 -   real_le x (real_add x y) = real_le (real_of_num 0) y"
  1.5822 +lemma REAL_LE_ADDR: "real_le x (real_add x y) = real_le (real_of_num 0) y"
  1.5823    by (import hollight REAL_LE_ADDR)
  1.5824  
  1.5825 -lemma REAL_LE_ADDL: "ALL (x::hollight.real) y::hollight.real.
  1.5826 -   real_le y (real_add x y) = real_le (real_of_num 0) x"
  1.5827 +lemma REAL_LE_ADDL: "real_le y (real_add x y) = real_le (real_of_num 0) x"
  1.5828    by (import hollight REAL_LE_ADDL)
  1.5829  
  1.5830 -lemma REAL_LT_ADDR: "ALL (x::hollight.real) y::hollight.real.
  1.5831 -   real_lt x (real_add x y) = real_lt (real_of_num 0) y"
  1.5832 +lemma REAL_LT_ADDR: "real_lt x (real_add x y) = real_lt (real_of_num 0) y"
  1.5833    by (import hollight REAL_LT_ADDR)
  1.5834  
  1.5835 -lemma REAL_LT_ADDL: "ALL (x::hollight.real) y::hollight.real.
  1.5836 -   real_lt y (real_add x y) = real_lt (real_of_num 0) x"
  1.5837 +lemma REAL_LT_ADDL: "real_lt y (real_add x y) = real_lt (real_of_num 0) x"
  1.5838    by (import hollight REAL_LT_ADDL)
  1.5839  
  1.5840 -lemma REAL_SUB_SUB: "ALL (x::hollight.real) y::hollight.real.
  1.5841 -   real_sub (real_sub x y) x = real_neg y"
  1.5842 +lemma REAL_SUB_SUB: "real_sub (real_sub x y) x = real_neg y"
  1.5843    by (import hollight REAL_SUB_SUB)
  1.5844  
  1.5845 -lemma REAL_LT_ADD_SUB: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5846 -   real_lt (real_add x y) z = real_lt x (real_sub z y)"
  1.5847 +lemma REAL_LT_ADD_SUB: "real_lt (real_add x y) z = real_lt x (real_sub z y)"
  1.5848    by (import hollight REAL_LT_ADD_SUB)
  1.5849  
  1.5850 -lemma REAL_LT_SUB_RADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5851 -   real_lt (real_sub x y) z = real_lt x (real_add z y)"
  1.5852 +lemma REAL_LT_SUB_RADD: "real_lt (real_sub x y) z = real_lt x (real_add z y)"
  1.5853    by (import hollight REAL_LT_SUB_RADD)
  1.5854  
  1.5855 -lemma REAL_LT_SUB_LADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5856 -   real_lt x (real_sub y z) = real_lt (real_add x z) y"
  1.5857 +lemma REAL_LT_SUB_LADD: "real_lt x (real_sub y z) = real_lt (real_add x z) y"
  1.5858    by (import hollight REAL_LT_SUB_LADD)
  1.5859  
  1.5860 -lemma REAL_LE_SUB_LADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5861 -   real_le x (real_sub y z) = real_le (real_add x z) y"
  1.5862 +lemma REAL_LE_SUB_LADD: "real_le x (real_sub y z) = real_le (real_add x z) y"
  1.5863    by (import hollight REAL_LE_SUB_LADD)
  1.5864  
  1.5865 -lemma REAL_LE_SUB_RADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5866 -   real_le (real_sub x y) z = real_le x (real_add z y)"
  1.5867 +lemma REAL_LE_SUB_RADD: "real_le (real_sub x y) z = real_le x (real_add z y)"
  1.5868    by (import hollight REAL_LE_SUB_RADD)
  1.5869  
  1.5870 -lemma REAL_LT_NEG: "ALL (x::hollight.real) y::hollight.real.
  1.5871 -   real_lt (real_neg x) (real_neg y) = real_lt y x"
  1.5872 +lemma REAL_LT_NEG: "real_lt (real_neg x) (real_neg y) = real_lt y x"
  1.5873    by (import hollight REAL_LT_NEG)
  1.5874  
  1.5875 -lemma REAL_LE_NEG: "ALL (x::hollight.real) y::hollight.real.
  1.5876 -   real_le (real_neg x) (real_neg y) = real_le y x"
  1.5877 +lemma REAL_LE_NEG: "real_le (real_neg x) (real_neg y) = real_le y x"
  1.5878    by (import hollight REAL_LE_NEG)
  1.5879  
  1.5880 -lemma REAL_ADD2_SUB2: "ALL (a::hollight.real) (b::hollight.real) (c::hollight.real)
  1.5881 -   d::hollight.real.
  1.5882 -   real_sub (real_add a b) (real_add c d) =
  1.5883 -   real_add (real_sub a c) (real_sub b d)"
  1.5884 +lemma REAL_ADD2_SUB2: "real_sub (real_add a b) (real_add c d) =
  1.5885 +real_add (real_sub a c) (real_sub b d)"
  1.5886    by (import hollight REAL_ADD2_SUB2)
  1.5887  
  1.5888 -lemma REAL_SUB_LZERO: "ALL x::hollight.real. real_sub (real_of_num 0) x = real_neg x"
  1.5889 +lemma REAL_SUB_LZERO: "real_sub (real_of_num 0) x = real_neg x"
  1.5890    by (import hollight REAL_SUB_LZERO)
  1.5891  
  1.5892 -lemma REAL_SUB_RZERO: "ALL x::hollight.real. real_sub x (real_of_num 0) = x"
  1.5893 +lemma REAL_SUB_RZERO: "real_sub x (real_of_num 0) = x"
  1.5894    by (import hollight REAL_SUB_RZERO)
  1.5895  
  1.5896 -lemma REAL_LET_ADD2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.5897 -   z::hollight.real.
  1.5898 -   real_le w x & real_lt y z --> real_lt (real_add w y) (real_add x z)"
  1.5899 +lemma REAL_LET_ADD2: "real_le w x & real_lt y z ==> real_lt (real_add w y) (real_add x z)"
  1.5900    by (import hollight REAL_LET_ADD2)
  1.5901  
  1.5902 -lemma REAL_LTE_ADD2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.5903 -   z::hollight.real.
  1.5904 -   real_lt w x & real_le y z --> real_lt (real_add w y) (real_add x z)"
  1.5905 +lemma REAL_LTE_ADD2: "real_lt w x & real_le y z ==> real_lt (real_add w y) (real_add x z)"
  1.5906    by (import hollight REAL_LTE_ADD2)
  1.5907  
  1.5908 -lemma REAL_SUB_LNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5909 -   real_sub (real_neg x) y = real_neg (real_add x y)"
  1.5910 +lemma REAL_SUB_LNEG: "real_sub (real_neg x) y = real_neg (real_add x y)"
  1.5911    by (import hollight REAL_SUB_LNEG)
  1.5912  
  1.5913 -lemma REAL_SUB_RNEG: "ALL (x::hollight.real) y::hollight.real.
  1.5914 -   real_sub x (real_neg y) = real_add x y"
  1.5915 +lemma REAL_SUB_RNEG: "real_sub x (real_neg y) = real_add x y"
  1.5916    by (import hollight REAL_SUB_RNEG)
  1.5917  
  1.5918 -lemma REAL_SUB_NEG2: "ALL (x::hollight.real) y::hollight.real.
  1.5919 -   real_sub (real_neg x) (real_neg y) = real_sub y x"
  1.5920 +lemma REAL_SUB_NEG2: "real_sub (real_neg x) (real_neg y) = real_sub y x"
  1.5921    by (import hollight REAL_SUB_NEG2)
  1.5922  
  1.5923 -lemma REAL_SUB_TRIANGLE: "ALL (a::hollight.real) (b::hollight.real) c::hollight.real.
  1.5924 -   real_add (real_sub a b) (real_sub b c) = real_sub a c"
  1.5925 +lemma REAL_SUB_TRIANGLE: "real_add (real_sub a b) (real_sub b c) = real_sub a c"
  1.5926    by (import hollight REAL_SUB_TRIANGLE)
  1.5927  
  1.5928 -lemma REAL_EQ_SUB_LADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5929 -   (x = real_sub y z) = (real_add x z = y)"
  1.5930 +lemma REAL_EQ_SUB_LADD: "(x = real_sub y z) = (real_add x z = y)"
  1.5931    by (import hollight REAL_EQ_SUB_LADD)
  1.5932  
  1.5933 -lemma REAL_EQ_SUB_RADD: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5934 -   (real_sub x y = z) = (x = real_add z y)"
  1.5935 +lemma REAL_EQ_SUB_RADD: "(real_sub x y = z) = (x = real_add z y)"
  1.5936    by (import hollight REAL_EQ_SUB_RADD)
  1.5937  
  1.5938 -lemma REAL_SUB_SUB2: "ALL (x::hollight.real) y::hollight.real. real_sub x (real_sub x y) = y"
  1.5939 +lemma REAL_SUB_SUB2: "real_sub x (real_sub x y) = y"
  1.5940    by (import hollight REAL_SUB_SUB2)
  1.5941  
  1.5942 -lemma REAL_ADD_SUB2: "ALL (x::hollight.real) y::hollight.real.
  1.5943 -   real_sub x (real_add x y) = real_neg y"
  1.5944 +lemma REAL_ADD_SUB2: "real_sub x (real_add x y) = real_neg y"
  1.5945    by (import hollight REAL_ADD_SUB2)
  1.5946  
  1.5947 -lemma REAL_EQ_IMP_LE: "ALL (x::hollight.real) y::hollight.real. x = y --> real_le x y"
  1.5948 +lemma REAL_EQ_IMP_LE: "x = y ==> real_le x y"
  1.5949    by (import hollight REAL_EQ_IMP_LE)
  1.5950  
  1.5951 -lemma REAL_POS_NZ: "ALL x::hollight.real. real_lt (real_of_num 0) x --> x ~= real_of_num 0"
  1.5952 +lemma REAL_POS_NZ: "real_lt (real_of_num 0) x ==> x ~= real_of_num 0"
  1.5953    by (import hollight REAL_POS_NZ)
  1.5954  
  1.5955 -lemma REAL_DIFFSQ: "ALL (x::hollight.real) y::hollight.real.
  1.5956 -   real_mul (real_add x y) (real_sub x y) =
  1.5957 -   real_sub (real_mul x x) (real_mul y y)"
  1.5958 +lemma REAL_DIFFSQ: "real_mul (real_add x y) (real_sub x y) =
  1.5959 +real_sub (real_mul x x) (real_mul y y)"
  1.5960    by (import hollight REAL_DIFFSQ)
  1.5961  
  1.5962 -lemma REAL_EQ_NEG2: "ALL (x::hollight.real) y::hollight.real. (real_neg x = real_neg y) = (x = y)"
  1.5963 +lemma REAL_EQ_NEG2: "(real_neg x = real_neg y) = (x = y)"
  1.5964    by (import hollight REAL_EQ_NEG2)
  1.5965  
  1.5966 -lemma REAL_LT_NEG2: "ALL (x::hollight.real) y::hollight.real.
  1.5967 -   real_lt (real_neg x) (real_neg y) = real_lt y x"
  1.5968 +lemma REAL_LT_NEG2: "real_lt (real_neg x) (real_neg y) = real_lt y x"
  1.5969    by (import hollight REAL_LT_NEG2)
  1.5970  
  1.5971 -lemma REAL_SUB_LDISTRIB: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5972 -   real_mul x (real_sub y z) = real_sub (real_mul x y) (real_mul x z)"
  1.5973 +lemma REAL_SUB_LDISTRIB: "real_mul x (real_sub y z) = real_sub (real_mul x y) (real_mul x z)"
  1.5974    by (import hollight REAL_SUB_LDISTRIB)
  1.5975  
  1.5976 -lemma REAL_SUB_RDISTRIB: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5977 -   real_mul (real_sub x y) z = real_sub (real_mul x z) (real_mul y z)"
  1.5978 +lemma REAL_SUB_RDISTRIB: "real_mul (real_sub x y) z = real_sub (real_mul x z) (real_mul y z)"
  1.5979    by (import hollight REAL_SUB_RDISTRIB)
  1.5980  
  1.5981 -lemma REAL_ABS_ZERO: "ALL x::hollight.real. (real_abs x = real_of_num 0) = (x = real_of_num 0)"
  1.5982 +lemma REAL_ABS_ZERO: "(real_abs x = real_of_num 0) = (x = real_of_num 0)"
  1.5983    by (import hollight REAL_ABS_ZERO)
  1.5984  
  1.5985  lemma REAL_ABS_0: "real_abs (real_of_num 0) = real_of_num 0"
  1.5986    by (import hollight REAL_ABS_0)
  1.5987  
  1.5988 -lemma REAL_ABS_1: "real_abs (real_of_num (NUMERAL_BIT1 0)) = real_of_num (NUMERAL_BIT1 0)"
  1.5989 +lemma REAL_ABS_1: "real_abs (real_of_num 1) = real_of_num 1"
  1.5990    by (import hollight REAL_ABS_1)
  1.5991  
  1.5992 -lemma REAL_ABS_TRIANGLE: "ALL (x::hollight.real) y::hollight.real.
  1.5993 -   real_le (real_abs (real_add x y)) (real_add (real_abs x) (real_abs y))"
  1.5994 +lemma REAL_ABS_TRIANGLE: "real_le (real_abs (real_add x y)) (real_add (real_abs x) (real_abs y))"
  1.5995    by (import hollight REAL_ABS_TRIANGLE)
  1.5996  
  1.5997 -lemma REAL_ABS_TRIANGLE_LE: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.5998 -   real_le (real_add (real_abs x) (real_abs (real_sub y x))) z -->
  1.5999 -   real_le (real_abs y) z"
  1.6000 +lemma REAL_ABS_TRIANGLE_LE: "real_le (real_add (real_abs x) (real_abs (real_sub y x))) z
  1.6001 +==> real_le (real_abs y) z"
  1.6002    by (import hollight REAL_ABS_TRIANGLE_LE)
  1.6003  
  1.6004 -lemma REAL_ABS_TRIANGLE_LT: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6005 -   real_lt (real_add (real_abs x) (real_abs (real_sub y x))) z -->
  1.6006 -   real_lt (real_abs y) z"
  1.6007 +lemma REAL_ABS_TRIANGLE_LT: "real_lt (real_add (real_abs x) (real_abs (real_sub y x))) z
  1.6008 +==> real_lt (real_abs y) z"
  1.6009    by (import hollight REAL_ABS_TRIANGLE_LT)
  1.6010  
  1.6011 -lemma REAL_ABS_POS: "ALL x::hollight.real. real_le (real_of_num 0) (real_abs x)"
  1.6012 +lemma REAL_ABS_POS: "real_le (real_of_num 0) (real_abs x)"
  1.6013    by (import hollight REAL_ABS_POS)
  1.6014  
  1.6015 -lemma REAL_ABS_SUB: "ALL (x::hollight.real) y::hollight.real.
  1.6016 -   real_abs (real_sub x y) = real_abs (real_sub y x)"
  1.6017 +lemma REAL_ABS_SUB: "real_abs (real_sub x y) = real_abs (real_sub y x)"
  1.6018    by (import hollight REAL_ABS_SUB)
  1.6019  
  1.6020 -lemma REAL_ABS_NZ: "ALL x::hollight.real.
  1.6021 -   (x ~= real_of_num 0) = real_lt (real_of_num 0) (real_abs x)"
  1.6022 +lemma REAL_ABS_NZ: "(x ~= real_of_num 0) = real_lt (real_of_num 0) (real_abs x)"
  1.6023    by (import hollight REAL_ABS_NZ)
  1.6024  
  1.6025 -lemma REAL_ABS_ABS: "ALL x::hollight.real. real_abs (real_abs x) = real_abs x"
  1.6026 +lemma REAL_ABS_ABS: "real_abs (real_abs x) = real_abs x"
  1.6027    by (import hollight REAL_ABS_ABS)
  1.6028  
  1.6029 -lemma REAL_ABS_LE: "ALL x::hollight.real. real_le x (real_abs x)"
  1.6030 +lemma REAL_ABS_LE: "real_le x (real_abs x)"
  1.6031    by (import hollight REAL_ABS_LE)
  1.6032  
  1.6033 -lemma REAL_ABS_REFL: "ALL x::hollight.real. (real_abs x = x) = real_le (real_of_num 0) x"
  1.6034 +lemma REAL_ABS_REFL: "(real_abs x = x) = real_le (real_of_num 0) x"
  1.6035    by (import hollight REAL_ABS_REFL)
  1.6036  
  1.6037 -lemma REAL_ABS_BETWEEN: "ALL (x::hollight.real) (y::hollight.real) d::hollight.real.
  1.6038 -   (real_lt (real_of_num 0) d &
  1.6039 -    real_lt (real_sub x d) y & real_lt y (real_add x d)) =
  1.6040 -   real_lt (real_abs (real_sub y x)) d"
  1.6041 +lemma REAL_ABS_BETWEEN: "(real_lt (real_of_num 0) d &
  1.6042 + real_lt (real_sub x d) y & real_lt y (real_add x d)) =
  1.6043 +real_lt (real_abs (real_sub y x)) d"
  1.6044    by (import hollight REAL_ABS_BETWEEN)
  1.6045  
  1.6046 -lemma REAL_ABS_BOUND: "ALL (x::hollight.real) (y::hollight.real) d::hollight.real.
  1.6047 -   real_lt (real_abs (real_sub x y)) d --> real_lt y (real_add x d)"
  1.6048 +lemma REAL_ABS_BOUND: "real_lt (real_abs (real_sub x y)) d ==> real_lt y (real_add x d)"
  1.6049    by (import hollight REAL_ABS_BOUND)
  1.6050  
  1.6051 -lemma REAL_ABS_STILLNZ: "ALL (x::hollight.real) y::hollight.real.
  1.6052 -   real_lt (real_abs (real_sub x y)) (real_abs y) --> x ~= real_of_num 0"
  1.6053 +lemma REAL_ABS_STILLNZ: "real_lt (real_abs (real_sub x y)) (real_abs y) ==> x ~= real_of_num 0"
  1.6054    by (import hollight REAL_ABS_STILLNZ)
  1.6055  
  1.6056 -lemma REAL_ABS_CASES: "ALL x::hollight.real.
  1.6057 -   x = real_of_num 0 | real_lt (real_of_num 0) (real_abs x)"
  1.6058 +lemma REAL_ABS_CASES: "x = real_of_num 0 | real_lt (real_of_num 0) (real_abs x)"
  1.6059    by (import hollight REAL_ABS_CASES)
  1.6060  
  1.6061 -lemma REAL_ABS_BETWEEN1: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6062 -   real_lt x z & real_lt (real_abs (real_sub y x)) (real_sub z x) -->
  1.6063 -   real_lt y z"
  1.6064 +lemma REAL_ABS_BETWEEN1: "real_lt x z & real_lt (real_abs (real_sub y x)) (real_sub z x)
  1.6065 +==> real_lt y z"
  1.6066    by (import hollight REAL_ABS_BETWEEN1)
  1.6067  
  1.6068 -lemma REAL_ABS_SIGN: "ALL (x::hollight.real) y::hollight.real.
  1.6069 -   real_lt (real_abs (real_sub x y)) y --> real_lt (real_of_num 0) x"
  1.6070 +lemma REAL_ABS_SIGN: "real_lt (real_abs (real_sub x y)) y ==> real_lt (real_of_num 0) x"
  1.6071    by (import hollight REAL_ABS_SIGN)
  1.6072  
  1.6073 -lemma REAL_ABS_SIGN2: "ALL (x::hollight.real) y::hollight.real.
  1.6074 -   real_lt (real_abs (real_sub x y)) (real_neg y) -->
  1.6075 -   real_lt x (real_of_num 0)"
  1.6076 +lemma REAL_ABS_SIGN2: "real_lt (real_abs (real_sub x y)) (real_neg y) ==> real_lt x (real_of_num 0)"
  1.6077    by (import hollight REAL_ABS_SIGN2)
  1.6078  
  1.6079 -lemma REAL_ABS_CIRCLE: "ALL (x::hollight.real) (y::hollight.real) h::hollight.real.
  1.6080 -   real_lt (real_abs h) (real_sub (real_abs y) (real_abs x)) -->
  1.6081 -   real_lt (real_abs (real_add x h)) (real_abs y)"
  1.6082 +lemma REAL_ABS_CIRCLE: "real_lt (real_abs h) (real_sub (real_abs y) (real_abs x))
  1.6083 +==> real_lt (real_abs (real_add x h)) (real_abs y)"
  1.6084    by (import hollight REAL_ABS_CIRCLE)
  1.6085  
  1.6086 -lemma REAL_SUB_ABS: "ALL (x::hollight.real) y::hollight.real.
  1.6087 -   real_le (real_sub (real_abs x) (real_abs y)) (real_abs (real_sub x y))"
  1.6088 +lemma REAL_SUB_ABS: "real_le (real_sub (real_abs x) (real_abs y)) (real_abs (real_sub x y))"
  1.6089    by (import hollight REAL_SUB_ABS)
  1.6090  
  1.6091 -lemma REAL_ABS_SUB_ABS: "ALL (x::hollight.real) y::hollight.real.
  1.6092 -   real_le (real_abs (real_sub (real_abs x) (real_abs y)))
  1.6093 -    (real_abs (real_sub x y))"
  1.6094 +lemma REAL_ABS_SUB_ABS: "real_le (real_abs (real_sub (real_abs x) (real_abs y)))
  1.6095 + (real_abs (real_sub x y))"
  1.6096    by (import hollight REAL_ABS_SUB_ABS)
  1.6097  
  1.6098 -lemma REAL_ABS_BETWEEN2: "ALL (x0::hollight.real) (x::hollight.real) (y0::hollight.real)
  1.6099 -   y::hollight.real.
  1.6100 -   real_lt x0 y0 &
  1.6101 -   real_lt
  1.6102 -    (real_mul (real_of_num (NUMERAL_BIT0 (NUMERAL_BIT1 0)))
  1.6103 -      (real_abs (real_sub x x0)))
  1.6104 -    (real_sub y0 x0) &
  1.6105 -   real_lt
  1.6106 -    (real_mul (real_of_num (NUMERAL_BIT0 (NUMERAL_BIT1 0)))
  1.6107 -      (real_abs (real_sub y y0)))
  1.6108 -    (real_sub y0 x0) -->
  1.6109 -   real_lt x y"
  1.6110 +lemma REAL_ABS_BETWEEN2: "real_lt x0 y0 &
  1.6111 +real_lt (real_mul (real_of_num 2) (real_abs (real_sub x x0)))
  1.6112 + (real_sub y0 x0) &
  1.6113 +real_lt (real_mul (real_of_num 2) (real_abs (real_sub y y0)))
  1.6114 + (real_sub y0 x0)
  1.6115 +==> real_lt x y"
  1.6116    by (import hollight REAL_ABS_BETWEEN2)
  1.6117  
  1.6118 -lemma REAL_ABS_BOUNDS: "ALL (x::hollight.real) k::hollight.real.
  1.6119 -   real_le (real_abs x) k = (real_le (real_neg k) x & real_le x k)"
  1.6120 +lemma REAL_ABS_BOUNDS: "real_le (real_abs x) k = (real_le (real_neg k) x & real_le x k)"
  1.6121    by (import hollight REAL_ABS_BOUNDS)
  1.6122  
  1.6123 -lemma REAL_MIN_MAX: "ALL (x::hollight.real) y::hollight.real.
  1.6124 -   real_min x y = real_neg (real_max (real_neg x) (real_neg y))"
  1.6125 +lemma REAL_BOUNDS_LE: "(real_le (real_neg k) x & real_le x k) = real_le (real_abs x) k"
  1.6126 +  by (import hollight REAL_BOUNDS_LE)
  1.6127 +
  1.6128 +lemma REAL_BOUNDS_LT: "(real_lt (real_neg k) x & real_lt x k) = real_lt (real_abs x) k"
  1.6129 +  by (import hollight REAL_BOUNDS_LT)
  1.6130 +
  1.6131 +lemma REAL_MIN_MAX: "real_min x y = real_neg (real_max (real_neg x) (real_neg y))"
  1.6132    by (import hollight REAL_MIN_MAX)
  1.6133  
  1.6134 -lemma REAL_MAX_MIN: "ALL (x::hollight.real) y::hollight.real.
  1.6135 -   real_max x y = real_neg (real_min (real_neg x) (real_neg y))"
  1.6136 +lemma REAL_MAX_MIN: "real_max x y = real_neg (real_min (real_neg x) (real_neg y))"
  1.6137    by (import hollight REAL_MAX_MIN)
  1.6138  
  1.6139 -lemma REAL_MAX_MAX: "ALL (x::hollight.real) y::hollight.real.
  1.6140 -   real_le x (real_max x y) & real_le y (real_max x y)"
  1.6141 +lemma REAL_MAX_MAX: "real_le x (real_max x y) & real_le y (real_max x y)"
  1.6142    by (import hollight REAL_MAX_MAX)
  1.6143  
  1.6144 -lemma REAL_MIN_MIN: "ALL (x::hollight.real) y::hollight.real.
  1.6145 -   real_le (real_min x y) x & real_le (real_min x y) y"
  1.6146 +lemma REAL_MIN_MIN: "real_le (real_min x y) x & real_le (real_min x y) y"
  1.6147    by (import hollight REAL_MIN_MIN)
  1.6148  
  1.6149 -lemma REAL_MAX_SYM: "ALL (x::hollight.real) y::hollight.real. real_max x y = real_max y x"
  1.6150 +lemma REAL_MAX_SYM: "real_max x y = real_max y x"
  1.6151    by (import hollight REAL_MAX_SYM)
  1.6152  
  1.6153 -lemma REAL_MIN_SYM: "ALL (x::hollight.real) y::hollight.real. real_min x y = real_min y x"
  1.6154 +lemma REAL_MIN_SYM: "real_min x y = real_min y x"
  1.6155    by (import hollight REAL_MIN_SYM)
  1.6156  
  1.6157 -lemma REAL_LE_MAX: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6158 -   real_le z (real_max x y) = (real_le z x | real_le z y)"
  1.6159 +lemma REAL_LE_MAX: "real_le z (real_max x y) = (real_le z x | real_le z y)"
  1.6160    by (import hollight REAL_LE_MAX)
  1.6161  
  1.6162 -lemma REAL_LE_MIN: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6163 -   real_le z (real_min x y) = (real_le z x & real_le z y)"
  1.6164 +lemma REAL_LE_MIN: "real_le z (real_min x y) = (real_le z x & real_le z y)"
  1.6165    by (import hollight REAL_LE_MIN)
  1.6166  
  1.6167 -lemma REAL_LT_MAX: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6168 -   real_lt z (real_max x y) = (real_lt z x | real_lt z y)"
  1.6169 +lemma REAL_LT_MAX: "real_lt z (real_max x y) = (real_lt z x | real_lt z y)"
  1.6170    by (import hollight REAL_LT_MAX)
  1.6171  
  1.6172 -lemma REAL_LT_MIN: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6173 -   real_lt z (real_min x y) = (real_lt z x & real_lt z y)"
  1.6174 +lemma REAL_LT_MIN: "real_lt z (real_min x y) = (real_lt z x & real_lt z y)"
  1.6175    by (import hollight REAL_LT_MIN)
  1.6176  
  1.6177 -lemma REAL_MAX_LE: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6178 -   real_le (real_max x y) z = (real_le x z & real_le y z)"
  1.6179 +lemma REAL_MAX_LE: "real_le (real_max x y) z = (real_le x z & real_le y z)"
  1.6180    by (import hollight REAL_MAX_LE)
  1.6181  
  1.6182 -lemma REAL_MIN_LE: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6183 -   real_le (real_min x y) z = (real_le x z | real_le y z)"
  1.6184 +lemma REAL_MIN_LE: "real_le (real_min x y) z = (real_le x z | real_le y z)"
  1.6185    by (import hollight REAL_MIN_LE)
  1.6186  
  1.6187 -lemma REAL_MAX_LT: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6188 -   real_lt (real_max x y) z = (real_lt x z & real_lt y z)"
  1.6189 +lemma REAL_MAX_LT: "real_lt (real_max x y) z = (real_lt x z & real_lt y z)"
  1.6190    by (import hollight REAL_MAX_LT)
  1.6191  
  1.6192 -lemma REAL_MIN_LT: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6193 -   real_lt (real_min x y) z = (real_lt x z | real_lt y z)"
  1.6194 +lemma REAL_MIN_LT: "real_lt (real_min x y) z = (real_lt x z | real_lt y z)"
  1.6195    by (import hollight REAL_MIN_LT)
  1.6196  
  1.6197 -lemma REAL_MAX_ASSOC: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6198 -   real_max x (real_max y z) = real_max (real_max x y) z"
  1.6199 +lemma REAL_MAX_ASSOC: "real_max x (real_max y z) = real_max (real_max x y) z"
  1.6200    by (import hollight REAL_MAX_ASSOC)
  1.6201  
  1.6202 -lemma REAL_MIN_ASSOC: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6203 -   real_min x (real_min y z) = real_min (real_min x y) z"
  1.6204 +lemma REAL_MIN_ASSOC: "real_min x (real_min y z) = real_min (real_min x y) z"
  1.6205    by (import hollight REAL_MIN_ASSOC)
  1.6206  
  1.6207 -lemma REAL_MAX_ACI: "real_max (x::hollight.real) (y::hollight.real) = real_max y x &
  1.6208 -real_max (real_max x y) (z::hollight.real) = real_max x (real_max y z) &
  1.6209 +lemma REAL_MAX_ACI: "real_max x y = real_max y x &
  1.6210 +real_max (real_max x y) z = real_max x (real_max y z) &
  1.6211  real_max x (real_max y z) = real_max y (real_max x z) &
  1.6212  real_max x x = x & real_max x (real_max x y) = real_max x y"
  1.6213    by (import hollight REAL_MAX_ACI)
  1.6214  
  1.6215 -lemma REAL_MIN_ACI: "real_min (x::hollight.real) (y::hollight.real) = real_min y x &
  1.6216 -real_min (real_min x y) (z::hollight.real) = real_min x (real_min y z) &
  1.6217 +lemma REAL_MIN_ACI: "real_min x y = real_min y x &
  1.6218 +real_min (real_min x y) z = real_min x (real_min y z) &
  1.6219  real_min x (real_min y z) = real_min y (real_min x z) &
  1.6220  real_min x x = x & real_min x (real_min x y) = real_min x y"
  1.6221    by (import hollight REAL_MIN_ACI)
  1.6222  
  1.6223 -lemma REAL_ABS_MUL: "ALL (x::hollight.real) y::hollight.real.
  1.6224 -   real_abs (real_mul x y) = real_mul (real_abs x) (real_abs y)"
  1.6225 +lemma REAL_ABS_MUL: "real_abs (real_mul x y) = real_mul (real_abs x) (real_abs y)"
  1.6226    by (import hollight REAL_ABS_MUL)
  1.6227  
  1.6228 -lemma REAL_POW_LE: "ALL (x::hollight.real) n::nat.
  1.6229 -   real_le (real_of_num 0) x --> real_le (real_of_num 0) (real_pow x n)"
  1.6230 +lemma REAL_POW_LE: "real_le (real_of_num 0) x ==> real_le (real_of_num 0) (real_pow x n)"
  1.6231    by (import hollight REAL_POW_LE)
  1.6232  
  1.6233 -lemma REAL_POW_LT: "ALL (x::hollight.real) n::nat.
  1.6234 -   real_lt (real_of_num 0) x --> real_lt (real_of_num 0) (real_pow x n)"
  1.6235 +lemma REAL_POW_LT: "real_lt (real_of_num 0) x ==> real_lt (real_of_num 0) (real_pow x n)"
  1.6236    by (import hollight REAL_POW_LT)
  1.6237  
  1.6238 -lemma REAL_ABS_POW: "ALL (x::hollight.real) n::nat.
  1.6239 -   real_abs (real_pow x n) = real_pow (real_abs x) n"
  1.6240 +lemma REAL_ABS_POW: "real_abs (real_pow x n) = real_pow (real_abs x) n"
  1.6241    by (import hollight REAL_ABS_POW)
  1.6242  
  1.6243 -lemma REAL_LE_LMUL: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6244 -   real_le (real_of_num 0) x & real_le xa xb -->
  1.6245 -   real_le (real_mul x xa) (real_mul x xb)"
  1.6246 +lemma REAL_LE_LMUL: "real_le (real_of_num 0) x & real_le xa xb
  1.6247 +==> real_le (real_mul x xa) (real_mul x xb)"
  1.6248    by (import hollight REAL_LE_LMUL)
  1.6249  
  1.6250 -lemma REAL_LE_RMUL: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6251 -   real_le x y & real_le (real_of_num 0) z -->
  1.6252 -   real_le (real_mul x z) (real_mul y z)"
  1.6253 +lemma REAL_LE_RMUL: "real_le x y & real_le (real_of_num 0) z
  1.6254 +==> real_le (real_mul x z) (real_mul y z)"
  1.6255    by (import hollight REAL_LE_RMUL)
  1.6256  
  1.6257 -lemma REAL_LT_LMUL: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6258 -   real_lt (real_of_num 0) x & real_lt xa xb -->
  1.6259 -   real_lt (real_mul x xa) (real_mul x xb)"
  1.6260 +lemma REAL_LT_LMUL: "real_lt (real_of_num 0) x & real_lt xa xb
  1.6261 +==> real_lt (real_mul x xa) (real_mul x xb)"
  1.6262    by (import hollight REAL_LT_LMUL)
  1.6263  
  1.6264 -lemma REAL_LT_RMUL: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6265 -   real_lt x y & real_lt (real_of_num 0) z -->
  1.6266 -   real_lt (real_mul x z) (real_mul y z)"
  1.6267 +lemma REAL_LT_RMUL: "real_lt x y & real_lt (real_of_num 0) z
  1.6268 +==> real_lt (real_mul x z) (real_mul y z)"
  1.6269    by (import hollight REAL_LT_RMUL)
  1.6270  
  1.6271 -lemma REAL_EQ_MUL_LCANCEL: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6272 -   (real_mul x y = real_mul x z) = (x = real_of_num 0 | y = z)"
  1.6273 +lemma REAL_EQ_MUL_LCANCEL: "(real_mul x y = real_mul x z) = (x = real_of_num 0 | y = z)"
  1.6274    by (import hollight REAL_EQ_MUL_LCANCEL)
  1.6275  
  1.6276 -lemma REAL_EQ_MUL_RCANCEL: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6277 -   (real_mul x xb = real_mul xa xb) = (x = xa | xb = real_of_num 0)"
  1.6278 +lemma REAL_EQ_MUL_RCANCEL: "(real_mul x xb = real_mul xa xb) = (x = xa | xb = real_of_num 0)"
  1.6279    by (import hollight REAL_EQ_MUL_RCANCEL)
  1.6280  
  1.6281 -lemma REAL_MUL_LINV_UNIQ: "ALL (x::hollight.real) y::hollight.real.
  1.6282 -   real_mul x y = real_of_num (NUMERAL_BIT1 0) --> real_inv y = x"
  1.6283 +lemma REAL_MUL_LINV_UNIQ: "real_mul x y = real_of_num 1 ==> real_inv y = x"
  1.6284    by (import hollight REAL_MUL_LINV_UNIQ)
  1.6285  
  1.6286 -lemma REAL_MUL_RINV_UNIQ: "ALL (x::hollight.real) xa::hollight.real.
  1.6287 -   real_mul x xa = real_of_num (NUMERAL_BIT1 0) --> real_inv x = xa"
  1.6288 +lemma REAL_MUL_RINV_UNIQ: "real_mul x xa = real_of_num 1 ==> real_inv x = xa"
  1.6289    by (import hollight REAL_MUL_RINV_UNIQ)
  1.6290  
  1.6291 -lemma REAL_INV_INV: "ALL x::hollight.real. real_inv (real_inv x) = x"
  1.6292 +lemma REAL_INV_INV: "real_inv (real_inv x) = x"
  1.6293    by (import hollight REAL_INV_INV)
  1.6294  
  1.6295 -lemma REAL_INV_EQ_0: "ALL x::hollight.real. (real_inv x = real_of_num 0) = (x = real_of_num 0)"
  1.6296 +lemma REAL_EQ_INV2: "(real_inv x = real_inv y) = (x = y)"
  1.6297 +  by (import hollight REAL_EQ_INV2)
  1.6298 +
  1.6299 +lemma REAL_INV_EQ_0: "(real_inv x = real_of_num 0) = (x = real_of_num 0)"
  1.6300    by (import hollight REAL_INV_EQ_0)
  1.6301  
  1.6302 -lemma REAL_LT_INV: "ALL x::hollight.real.
  1.6303 -   real_lt (real_of_num 0) x --> real_lt (real_of_num 0) (real_inv x)"
  1.6304 +lemma REAL_LT_INV: "real_lt (real_of_num 0) x ==> real_lt (real_of_num 0) (real_inv x)"
  1.6305    by (import hollight REAL_LT_INV)
  1.6306  
  1.6307 -lemma REAL_LT_INV_EQ: "ALL x::hollight.real.
  1.6308 -   real_lt (real_of_num 0) (real_inv x) = real_lt (real_of_num 0) x"
  1.6309 +lemma REAL_LT_INV_EQ: "real_lt (real_of_num 0) (real_inv x) = real_lt (real_of_num 0) x"
  1.6310    by (import hollight REAL_LT_INV_EQ)
  1.6311  
  1.6312 -lemma REAL_INV_NEG: "ALL x::hollight.real. real_inv (real_neg x) = real_neg (real_inv x)"
  1.6313 +lemma REAL_INV_NEG: "real_inv (real_neg x) = real_neg (real_inv x)"
  1.6314    by (import hollight REAL_INV_NEG)
  1.6315  
  1.6316 -lemma REAL_LE_INV_EQ: "ALL x::hollight.real.
  1.6317 -   real_le (real_of_num 0) (real_inv x) = real_le (real_of_num 0) x"
  1.6318 +lemma REAL_LE_INV_EQ: "real_le (real_of_num 0) (real_inv x) = real_le (real_of_num 0) x"
  1.6319    by (import hollight REAL_LE_INV_EQ)
  1.6320  
  1.6321 -lemma REAL_LE_INV: "ALL x::hollight.real.
  1.6322 -   real_le (real_of_num 0) x --> real_le (real_of_num 0) (real_inv x)"
  1.6323 +lemma REAL_LE_INV: "real_le (real_of_num 0) x ==> real_le (real_of_num 0) (real_inv x)"
  1.6324    by (import hollight REAL_LE_INV)
  1.6325  
  1.6326 -lemma REAL_MUL_RINV: "ALL x::hollight.real.
  1.6327 -   x ~= real_of_num 0 -->
  1.6328 -   real_mul x (real_inv x) = real_of_num (NUMERAL_BIT1 0)"
  1.6329 +lemma REAL_MUL_RINV: "x ~= real_of_num 0 ==> real_mul x (real_inv x) = real_of_num 1"
  1.6330    by (import hollight REAL_MUL_RINV)
  1.6331  
  1.6332 -lemma REAL_INV_1: "real_inv (real_of_num (NUMERAL_BIT1 0)) = real_of_num (NUMERAL_BIT1 0)"
  1.6333 +lemma REAL_INV_1: "real_inv (real_of_num 1) = real_of_num 1"
  1.6334    by (import hollight REAL_INV_1)
  1.6335  
  1.6336 -lemma REAL_DIV_1: "ALL x::hollight.real. real_div x (real_of_num (NUMERAL_BIT1 0)) = x"
  1.6337 +lemma REAL_INV_EQ_1: "(real_inv x = real_of_num 1) = (x = real_of_num 1)"
  1.6338 +  by (import hollight REAL_INV_EQ_1)
  1.6339 +
  1.6340 +lemma REAL_DIV_1: "real_div x (real_of_num 1) = x"
  1.6341    by (import hollight REAL_DIV_1)
  1.6342  
  1.6343 -lemma REAL_DIV_REFL: "ALL x::hollight.real.
  1.6344 -   x ~= real_of_num 0 --> real_div x x = real_of_num (NUMERAL_BIT1 0)"
  1.6345 +lemma REAL_DIV_REFL: "x ~= real_of_num 0 ==> real_div x x = real_of_num 1"
  1.6346    by (import hollight REAL_DIV_REFL)
  1.6347  
  1.6348 -lemma REAL_DIV_RMUL: "ALL (x::hollight.real) xa::hollight.real.
  1.6349 -   xa ~= real_of_num 0 --> real_mul (real_div x xa) xa = x"
  1.6350 +lemma REAL_DIV_RMUL: "xa ~= real_of_num 0 ==> real_mul (real_div x xa) xa = x"
  1.6351    by (import hollight REAL_DIV_RMUL)
  1.6352  
  1.6353 -lemma REAL_DIV_LMUL: "ALL (x::hollight.real) xa::hollight.real.
  1.6354 -   xa ~= real_of_num 0 --> real_mul xa (real_div x xa) = x"
  1.6355 +lemma REAL_DIV_LMUL: "xa ~= real_of_num 0 ==> real_mul xa (real_div x xa) = x"
  1.6356    by (import hollight REAL_DIV_LMUL)
  1.6357  
  1.6358 -lemma REAL_ABS_INV: "ALL x::hollight.real. real_abs (real_inv x) = real_inv (real_abs x)"
  1.6359 +lemma REAL_ABS_INV: "real_abs (real_inv x) = real_inv (real_abs x)"
  1.6360    by (import hollight REAL_ABS_INV)
  1.6361  
  1.6362 -lemma REAL_ABS_DIV: "ALL (x::hollight.real) xa::hollight.real.
  1.6363 -   real_abs (real_div x xa) = real_div (real_abs x) (real_abs xa)"
  1.6364 +lemma REAL_ABS_DIV: "real_abs (real_div x xa) = real_div (real_abs x) (real_abs xa)"
  1.6365    by (import hollight REAL_ABS_DIV)
  1.6366  
  1.6367 -lemma REAL_INV_MUL: "ALL (x::hollight.real) y::hollight.real.
  1.6368 -   real_inv (real_mul x y) = real_mul (real_inv x) (real_inv y)"
  1.6369 +lemma REAL_INV_MUL: "real_inv (real_mul x y) = real_mul (real_inv x) (real_inv y)"
  1.6370    by (import hollight REAL_INV_MUL)
  1.6371  
  1.6372 -lemma REAL_INV_DIV: "ALL (x::hollight.real) xa::hollight.real.
  1.6373 -   real_inv (real_div x xa) = real_div xa x"
  1.6374 +lemma REAL_INV_DIV: "real_inv (real_div x xa) = real_div xa x"
  1.6375    by (import hollight REAL_INV_DIV)
  1.6376  
  1.6377 -lemma REAL_POW_MUL: "ALL (x::hollight.real) (y::hollight.real) n::nat.
  1.6378 -   real_pow (real_mul x y) n = real_mul (real_pow x n) (real_pow y n)"
  1.6379 +lemma REAL_POW_MUL: "real_pow (real_mul x y) n = real_mul (real_pow x n) (real_pow y n)"
  1.6380    by (import hollight REAL_POW_MUL)
  1.6381  
  1.6382 -lemma REAL_POW_INV: "ALL (x::hollight.real) n::nat.
  1.6383 -   real_pow (real_inv x) n = real_inv (real_pow x n)"
  1.6384 +lemma REAL_POW_INV: "real_pow (real_inv x) n = real_inv (real_pow x n)"
  1.6385    by (import hollight REAL_POW_INV)
  1.6386  
  1.6387 -lemma REAL_POW_DIV: "ALL (x::hollight.real) (xa::hollight.real) xb::nat.
  1.6388 -   real_pow (real_div x xa) xb = real_div (real_pow x xb) (real_pow xa xb)"
  1.6389 +lemma REAL_INV_POW: "real_inv (real_pow x xa) = real_pow (real_inv x) xa"
  1.6390 +  by (import hollight REAL_INV_POW)
  1.6391 +
  1.6392 +lemma REAL_POW_DIV: "real_pow (real_div x xa) xb = real_div (real_pow x xb) (real_pow xa xb)"
  1.6393    by (import hollight REAL_POW_DIV)
  1.6394  
  1.6395 -lemma REAL_POW_ADD: "ALL (x::hollight.real) (m::nat) n::nat.
  1.6396 -   real_pow x (m + n) = real_mul (real_pow x m) (real_pow x n)"
  1.6397 +lemma REAL_POW_ADD: "real_pow x (m + n) = real_mul (real_pow x m) (real_pow x n)"
  1.6398    by (import hollight REAL_POW_ADD)
  1.6399  
  1.6400 -lemma REAL_POW_NZ: "ALL (x::hollight.real) n::nat.
  1.6401 -   x ~= real_of_num 0 --> real_pow x n ~= real_of_num 0"
  1.6402 +lemma REAL_POW_NZ: "x ~= real_of_num 0 ==> real_pow x n ~= real_of_num 0"
  1.6403    by (import hollight REAL_POW_NZ)
  1.6404  
  1.6405 -lemma REAL_POW_SUB: "ALL (x::hollight.real) (m::nat) n::nat.
  1.6406 -   x ~= real_of_num 0 & <= m n -->
  1.6407 -   real_pow x (n - m) = real_div (real_pow x n) (real_pow x m)"
  1.6408 +lemma REAL_POW_SUB: "x ~= real_of_num 0 & m <= n
  1.6409 +==> real_pow x (n - m) = real_div (real_pow x n) (real_pow x m)"
  1.6410    by (import hollight REAL_POW_SUB)
  1.6411  
  1.6412 -lemma REAL_LT_IMP_NZ: "ALL x::hollight.real. real_lt (real_of_num 0) x --> x ~= real_of_num 0"
  1.6413 +lemma REAL_LT_IMP_NZ: "real_lt (real_of_num 0) x ==> x ~= real_of_num 0"
  1.6414    by (import hollight REAL_LT_IMP_NZ)
  1.6415  
  1.6416 -lemma REAL_LT_LCANCEL_IMP: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6417 -   real_lt (real_of_num 0) x & real_lt (real_mul x y) (real_mul x z) -->
  1.6418 -   real_lt y z"
  1.6419 +lemma REAL_LT_LCANCEL_IMP: "real_lt (real_of_num 0) x & real_lt (real_mul x y) (real_mul x z)
  1.6420 +==> real_lt y z"
  1.6421    by (import hollight REAL_LT_LCANCEL_IMP)
  1.6422  
  1.6423 -lemma REAL_LT_RCANCEL_IMP: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6424 -   real_lt (real_of_num 0) xb & real_lt (real_mul x xb) (real_mul xa xb) -->
  1.6425 -   real_lt x xa"
  1.6426 +lemma REAL_LT_RCANCEL_IMP: "real_lt (real_of_num 0) xb & real_lt (real_mul x xb) (real_mul xa xb)
  1.6427 +==> real_lt x xa"
  1.6428    by (import hollight REAL_LT_RCANCEL_IMP)
  1.6429  
  1.6430 -lemma REAL_LE_LCANCEL_IMP: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6431 -   real_lt (real_of_num 0) x & real_le (real_mul x y) (real_mul x z) -->
  1.6432 -   real_le y z"
  1.6433 +lemma REAL_LE_LCANCEL_IMP: "real_lt (real_of_num 0) x & real_le (real_mul x y) (real_mul x z)
  1.6434 +==> real_le y z"
  1.6435    by (import hollight REAL_LE_LCANCEL_IMP)
  1.6436  
  1.6437 -lemma REAL_LE_RCANCEL_IMP: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6438 -   real_lt (real_of_num 0) xb & real_le (real_mul x xb) (real_mul xa xb) -->
  1.6439 -   real_le x xa"
  1.6440 +lemma REAL_LE_RCANCEL_IMP: "real_lt (real_of_num 0) xb & real_le (real_mul x xb) (real_mul xa xb)
  1.6441 +==> real_le x xa"
  1.6442    by (import hollight REAL_LE_RCANCEL_IMP)
  1.6443  
  1.6444 -lemma REAL_LE_RMUL_EQ: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6445 -   real_lt (real_of_num 0) z -->
  1.6446 -   real_le (real_mul x z) (real_mul y z) = real_le x y"
  1.6447 +lemma REAL_LE_RMUL_EQ: "real_lt (real_of_num 0) z
  1.6448 +==> real_le (real_mul x z) (real_mul y z) = real_le x y"
  1.6449    by (import hollight REAL_LE_RMUL_EQ)
  1.6450  
  1.6451 -lemma REAL_LE_LMUL_EQ: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6452 -   real_lt (real_of_num 0) z -->
  1.6453 -   real_le (real_mul z x) (real_mul z y) = real_le x y"
  1.6454 +lemma REAL_LE_LMUL_EQ: "real_lt (real_of_num 0) z
  1.6455 +==> real_le (real_mul z x) (real_mul z y) = real_le x y"
  1.6456    by (import hollight REAL_LE_LMUL_EQ)
  1.6457  
  1.6458 -lemma REAL_LT_RMUL_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6459 -   real_lt (real_of_num 0) xb -->
  1.6460 -   real_lt (real_mul x xb) (real_mul xa xb) = real_lt x xa"
  1.6461 +lemma REAL_LT_RMUL_EQ: "real_lt (real_of_num 0) xb
  1.6462 +==> real_lt (real_mul x xb) (real_mul xa xb) = real_lt x xa"
  1.6463    by (import hollight REAL_LT_RMUL_EQ)
  1.6464  
  1.6465 -lemma REAL_LT_LMUL_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6466 -   real_lt (real_of_num 0) xb -->
  1.6467 -   real_lt (real_mul xb x) (real_mul xb xa) = real_lt x xa"
  1.6468 +lemma REAL_LT_LMUL_EQ: "real_lt (real_of_num 0) xb
  1.6469 +==> real_lt (real_mul xb x) (real_mul xb xa) = real_lt x xa"
  1.6470    by (import hollight REAL_LT_LMUL_EQ)
  1.6471  
  1.6472 -lemma REAL_LE_RDIV_EQ: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6473 -   real_lt (real_of_num 0) z -->
  1.6474 -   real_le x (real_div y z) = real_le (real_mul x z) y"
  1.6475 +lemma REAL_LE_MUL_EQ: "(ALL x y.
  1.6476 +    real_lt (real_of_num 0) x -->
  1.6477 +    real_le (real_of_num 0) (real_mul x y) = real_le (real_of_num 0) y) &
  1.6478 +(ALL x y.
  1.6479 +    real_lt (real_of_num 0) y -->
  1.6480 +    real_le (real_of_num 0) (real_mul x y) = real_le (real_of_num 0) x)"
  1.6481 +  by (import hollight REAL_LE_MUL_EQ)
  1.6482 +
  1.6483 +lemma REAL_LT_MUL_EQ: "(ALL x y.
  1.6484 +    real_lt (real_of_num 0) x -->
  1.6485 +    real_lt (real_of_num 0) (real_mul x y) = real_lt (real_of_num 0) y) &
  1.6486 +(ALL x y.
  1.6487 +    real_lt (real_of_num 0) y -->
  1.6488 +    real_lt (real_of_num 0) (real_mul x y) = real_lt (real_of_num 0) x)"
  1.6489 +  by (import hollight REAL_LT_MUL_EQ)
  1.6490 +
  1.6491 +lemma REAL_MUL_POS_LT: "real_lt (real_of_num 0) (real_mul x y) =
  1.6492 +(real_lt (real_of_num 0) x & real_lt (real_of_num 0) y |
  1.6493 + real_lt x (real_of_num 0) & real_lt y (real_of_num 0))"
  1.6494 +  by (import hollight REAL_MUL_POS_LT)
  1.6495 +
  1.6496 +lemma REAL_MUL_POS_LE: "real_le (real_of_num 0) (real_mul x xa) =
  1.6497 +(x = real_of_num 0 |
  1.6498 + xa = real_of_num 0 |
  1.6499 + real_lt (real_of_num 0) x & real_lt (real_of_num 0) xa |
  1.6500 + real_lt x (real_of_num 0) & real_lt xa (real_of_num 0))"
  1.6501 +  by (import hollight REAL_MUL_POS_LE)
  1.6502 +
  1.6503 +lemma REAL_LE_RDIV_EQ: "real_lt (real_of_num 0) z
  1.6504 +==> real_le x (real_div y z) = real_le (real_mul x z) y"
  1.6505    by (import hollight REAL_LE_RDIV_EQ)
  1.6506  
  1.6507 -lemma REAL_LE_LDIV_EQ: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6508 -   real_lt (real_of_num 0) z -->
  1.6509 -   real_le (real_div x z) y = real_le x (real_mul y z)"
  1.6510 +lemma REAL_LE_LDIV_EQ: "real_lt (real_of_num 0) z
  1.6511 +==> real_le (real_div x z) y = real_le x (real_mul y z)"
  1.6512    by (import hollight REAL_LE_LDIV_EQ)
  1.6513  
  1.6514 -lemma REAL_LT_RDIV_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6515 -   real_lt (real_of_num 0) xb -->
  1.6516 -   real_lt x (real_div xa xb) = real_lt (real_mul x xb) xa"
  1.6517 +lemma REAL_LT_RDIV_EQ: "real_lt (real_of_num 0) xb
  1.6518 +==> real_lt x (real_div xa xb) = real_lt (real_mul x xb) xa"
  1.6519    by (import hollight REAL_LT_RDIV_EQ)
  1.6520  
  1.6521 -lemma REAL_LT_LDIV_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6522 -   real_lt (real_of_num 0) xb -->
  1.6523 -   real_lt (real_div x xb) xa = real_lt x (real_mul xa xb)"
  1.6524 +lemma REAL_LT_LDIV_EQ: "real_lt (real_of_num 0) xb
  1.6525 +==> real_lt (real_div x xb) xa = real_lt x (real_mul xa xb)"
  1.6526    by (import hollight REAL_LT_LDIV_EQ)
  1.6527  
  1.6528 -lemma REAL_EQ_RDIV_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6529 -   real_lt (real_of_num 0) xb -->
  1.6530 -   (x = real_div xa xb) = (real_mul x xb = xa)"
  1.6531 +lemma REAL_EQ_RDIV_EQ: "real_lt (real_of_num 0) xb ==> (x = real_div xa xb) = (real_mul x xb = xa)"
  1.6532    by (import hollight REAL_EQ_RDIV_EQ)
  1.6533  
  1.6534 -lemma REAL_EQ_LDIV_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6535 -   real_lt (real_of_num 0) xb -->
  1.6536 -   (real_div x xb = xa) = (x = real_mul xa xb)"
  1.6537 +lemma REAL_EQ_LDIV_EQ: "real_lt (real_of_num 0) xb ==> (real_div x xb = xa) = (x = real_mul xa xb)"
  1.6538    by (import hollight REAL_EQ_LDIV_EQ)
  1.6539  
  1.6540 -lemma REAL_LT_DIV2_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6541 -   real_lt (real_of_num 0) xb -->
  1.6542 -   real_lt (real_div x xb) (real_div xa xb) = real_lt x xa"
  1.6543 +lemma REAL_LT_DIV2_EQ: "real_lt (real_of_num 0) xb
  1.6544 +==> real_lt (real_div x xb) (real_div xa xb) = real_lt x xa"
  1.6545    by (import hollight REAL_LT_DIV2_EQ)
  1.6546  
  1.6547 -lemma REAL_LE_DIV2_EQ: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6548 -   real_lt (real_of_num 0) xb -->
  1.6549 -   real_le (real_div x xb) (real_div xa xb) = real_le x xa"
  1.6550 +lemma REAL_LE_DIV2_EQ: "real_lt (real_of_num 0) xb
  1.6551 +==> real_le (real_div x xb) (real_div xa xb) = real_le x xa"
  1.6552    by (import hollight REAL_LE_DIV2_EQ)
  1.6553  
  1.6554 -lemma REAL_MUL_2: "ALL x::hollight.real.
  1.6555 -   real_mul (real_of_num (NUMERAL_BIT0 (NUMERAL_BIT1 0))) x = real_add x x"
  1.6556 +lemma REAL_MUL_2: "real_mul (real_of_num 2) x = real_add x x"
  1.6557    by (import hollight REAL_MUL_2)
  1.6558  
  1.6559 -lemma REAL_POW_EQ_0: "ALL (x::hollight.real) n::nat.
  1.6560 -   (real_pow x n = real_of_num 0) = (x = real_of_num 0 & n ~= 0)"
  1.6561 +lemma REAL_POW_EQ_0: "(real_pow x n = real_of_num 0) = (x = real_of_num 0 & n ~= 0)"
  1.6562    by (import hollight REAL_POW_EQ_0)
  1.6563  
  1.6564 -lemma REAL_LE_MUL2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.6565 -   z::hollight.real.
  1.6566 -   real_le (real_of_num 0) w &
  1.6567 -   real_le w x & real_le (real_of_num 0) y & real_le y z -->
  1.6568 -   real_le (real_mul w y) (real_mul x z)"
  1.6569 +lemma REAL_LE_MUL2: "real_le (real_of_num 0) w &
  1.6570 +real_le w x & real_le (real_of_num 0) y & real_le y z
  1.6571 +==> real_le (real_mul w y) (real_mul x z)"
  1.6572    by (import hollight REAL_LE_MUL2)
  1.6573  
  1.6574 -lemma REAL_LT_MUL2: "ALL (w::hollight.real) (x::hollight.real) (y::hollight.real)
  1.6575 -   z::hollight.real.
  1.6576 -   real_le (real_of_num 0) w &
  1.6577 -   real_lt w x & real_le (real_of_num 0) y & real_lt y z -->
  1.6578 -   real_lt (real_mul w y) (real_mul x z)"
  1.6579 +lemma REAL_LT_MUL2: "real_le (real_of_num 0) w &
  1.6580 +real_lt w x & real_le (real_of_num 0) y & real_lt y z
  1.6581 +==> real_lt (real_mul w y) (real_mul x z)"
  1.6582    by (import hollight REAL_LT_MUL2)
  1.6583  
  1.6584 -lemma REAL_LT_SQUARE: "ALL x::hollight.real.
  1.6585 -   real_lt (real_of_num 0) (real_mul x x) = (x ~= real_of_num 0)"
  1.6586 +lemma REAL_LT_SQUARE: "real_lt (real_of_num 0) (real_mul x x) = (x ~= real_of_num 0)"
  1.6587    by (import hollight REAL_LT_SQUARE)
  1.6588  
  1.6589 -lemma REAL_INV_LE_1: "ALL x::hollight.real.
  1.6590 -   real_le (real_of_num (NUMERAL_BIT1 0)) x -->
  1.6591 -   real_le (real_inv x) (real_of_num (NUMERAL_BIT1 0))"
  1.6592 +lemma REAL_POW_1: "real_pow x 1 = x"
  1.6593 +  by (import hollight REAL_POW_1)
  1.6594 +
  1.6595 +lemma REAL_POW_ONE: "real_pow (real_of_num 1) n = real_of_num 1"
  1.6596 +  by (import hollight REAL_POW_ONE)
  1.6597 +
  1.6598 +lemma REAL_LT_INV2: "real_lt (real_of_num 0) x & real_lt x y
  1.6599 +==> real_lt (real_inv y) (real_inv x)"
  1.6600 +  by (import hollight REAL_LT_INV2)
  1.6601 +
  1.6602 +lemma REAL_LE_INV2: "real_lt (real_of_num 0) x & real_le x y
  1.6603 +==> real_le (real_inv y) (real_inv x)"
  1.6604 +  by (import hollight REAL_LE_INV2)
  1.6605 +
  1.6606 +lemma REAL_LT_LINV: "real_lt (real_of_num 0) y & real_lt (real_inv y) x
  1.6607 +==> real_lt (real_inv x) y"
  1.6608 +  by (import hollight REAL_LT_LINV)
  1.6609 +
  1.6610 +lemma REAL_LT_RINV: "real_lt (real_of_num 0) x & real_lt x (real_inv y)
  1.6611 +==> real_lt y (real_inv x)"
  1.6612 +  by (import hollight REAL_LT_RINV)
  1.6613 +
  1.6614 +lemma REAL_LE_LINV: "real_lt (real_of_num 0) y & real_le (real_inv y) x
  1.6615 +==> real_le (real_inv x) y"
  1.6616 +  by (import hollight REAL_LE_LINV)
  1.6617 +
  1.6618 +lemma REAL_LE_RINV: "real_lt (real_of_num 0) x & real_le x (real_inv y)
  1.6619 +==> real_le y (real_inv x)"
  1.6620 +  by (import hollight REAL_LE_RINV)
  1.6621 +
  1.6622 +lemma REAL_INV_LE_1: "real_le (real_of_num 1) x ==> real_le (real_inv x) (real_of_num 1)"
  1.6623    by (import hollight REAL_INV_LE_1)
  1.6624  
  1.6625 -lemma REAL_POW_LE_1: "ALL (n::nat) x::hollight.real.
  1.6626 -   real_le (real_of_num (NUMERAL_BIT1 0)) x -->
  1.6627 -   real_le (real_of_num (NUMERAL_BIT1 0)) (real_pow x n)"
  1.6628 -  by (import hollight REAL_POW_LE_1)
  1.6629 -
  1.6630 -lemma REAL_POW_1_LE: "ALL (n::nat) x::hollight.real.
  1.6631 -   real_le (real_of_num 0) x & real_le x (real_of_num (NUMERAL_BIT1 0)) -->
  1.6632 -   real_le (real_pow x n) (real_of_num (NUMERAL_BIT1 0))"
  1.6633 -  by (import hollight REAL_POW_1_LE)
  1.6634 -
  1.6635 -lemma REAL_POW_1: "ALL x::hollight.real. real_pow x (NUMERAL_BIT1 0) = x"
  1.6636 -  by (import hollight REAL_POW_1)
  1.6637 -
  1.6638 -lemma REAL_POW_ONE: "ALL n::nat.
  1.6639 -   real_pow (real_of_num (NUMERAL_BIT1 0)) n = real_of_num (NUMERAL_BIT1 0)"
  1.6640 -  by (import hollight REAL_POW_ONE)
  1.6641 -
  1.6642 -lemma REAL_LT_INV2: "ALL (x::hollight.real) y::hollight.real.
  1.6643 -   real_lt (real_of_num 0) x & real_lt x y -->
  1.6644 -   real_lt (real_inv y) (real_inv x)"
  1.6645 -  by (import hollight REAL_LT_INV2)
  1.6646 -
  1.6647 -lemma REAL_LE_INV2: "ALL (x::hollight.real) y::hollight.real.
  1.6648 -   real_lt (real_of_num 0) x & real_le x y -->
  1.6649 -   real_le (real_inv y) (real_inv x)"
  1.6650 -  by (import hollight REAL_LE_INV2)
  1.6651 -
  1.6652 -lemma REAL_INV_1_LE: "ALL x::hollight.real.
  1.6653 -   real_lt (real_of_num 0) x & real_le x (real_of_num (NUMERAL_BIT1 0)) -->
  1.6654 -   real_le (real_of_num (NUMERAL_BIT1 0)) (real_inv x)"
  1.6655 +lemma REAL_INV_1_LE: "real_lt (real_of_num 0) x & real_le x (real_of_num 1)
  1.6656 +==> real_le (real_of_num 1) (real_inv x)"
  1.6657    by (import hollight REAL_INV_1_LE)
  1.6658  
  1.6659 -lemma REAL_SUB_INV: "ALL (x::hollight.real) xa::hollight.real.
  1.6660 -   x ~= real_of_num 0 & xa ~= real_of_num 0 -->
  1.6661 -   real_sub (real_inv x) (real_inv xa) =
  1.6662 -   real_div (real_sub xa x) (real_mul x xa)"
  1.6663 +lemma REAL_INV_LT_1: "real_lt (real_of_num 1) x ==> real_lt (real_inv x) (real_of_num 1)"
  1.6664 +  by (import hollight REAL_INV_LT_1)
  1.6665 +
  1.6666 +lemma REAL_INV_1_LT: "real_lt (real_of_num 0) x & real_lt x (real_of_num 1)
  1.6667 +==> real_lt (real_of_num 1) (real_inv x)"
  1.6668 +  by (import hollight REAL_INV_1_LT)
  1.6669 +
  1.6670 +lemma REAL_SUB_INV: "x ~= real_of_num 0 & xa ~= real_of_num 0
  1.6671 +==> real_sub (real_inv x) (real_inv xa) =
  1.6672 +    real_div (real_sub xa x) (real_mul x xa)"
  1.6673    by (import hollight REAL_SUB_INV)
  1.6674  
  1.6675 -lemma REAL_DOWN: "ALL d::hollight.real.
  1.6676 -   real_lt (real_of_num 0) d -->
  1.6677 -   (EX x::hollight.real. real_lt (real_of_num 0) x & real_lt x d)"
  1.6678 +lemma REAL_DOWN: "real_lt (real_of_num 0) d ==> EX x. real_lt (real_of_num 0) x & real_lt x d"
  1.6679    by (import hollight REAL_DOWN)
  1.6680  
  1.6681 -lemma REAL_DOWN2: "ALL (d1::hollight.real) d2::hollight.real.
  1.6682 -   real_lt (real_of_num 0) d1 & real_lt (real_of_num 0) d2 -->
  1.6683 -   (EX e::hollight.real.
  1.6684 -       real_lt (real_of_num 0) e & real_lt e d1 & real_lt e d2)"
  1.6685 +lemma REAL_DOWN2: "real_lt (real_of_num 0) d1 & real_lt (real_of_num 0) d2
  1.6686 +==> EX e. real_lt (real_of_num 0) e & real_lt e d1 & real_lt e d2"
  1.6687    by (import hollight REAL_DOWN2)
  1.6688  
  1.6689 -lemma REAL_POW_LE2: "ALL (n::nat) (x::hollight.real) y::hollight.real.
  1.6690 -   real_le (real_of_num 0) x & real_le x y -->
  1.6691 -   real_le (real_pow x n) (real_pow y n)"
  1.6692 +lemma REAL_POW_LE2: "real_le (real_of_num 0) x & real_le x y
  1.6693 +==> real_le (real_pow x n) (real_pow y n)"
  1.6694    by (import hollight REAL_POW_LE2)
  1.6695  
  1.6696 -lemma REAL_POW_MONO: "ALL (m::nat) (n::nat) x::hollight.real.
  1.6697 -   real_le (real_of_num (NUMERAL_BIT1 0)) x & <= m n -->
  1.6698 -   real_le (real_pow x m) (real_pow x n)"
  1.6699 +lemma REAL_POW_LE_1: "real_le (real_of_num 1) x ==> real_le (real_of_num 1) (real_pow x n)"
  1.6700 +  by (import hollight REAL_POW_LE_1)
  1.6701 +
  1.6702 +lemma REAL_POW_1_LE: "real_le (real_of_num 0) x & real_le x (real_of_num 1)
  1.6703 +==> real_le (real_pow x n) (real_of_num 1)"
  1.6704 +  by (import hollight REAL_POW_1_LE)
  1.6705 +
  1.6706 +lemma REAL_POW_MONO: "real_le (real_of_num 1) x & m <= n ==> real_le (real_pow x m) (real_pow x n)"
  1.6707    by (import hollight REAL_POW_MONO)
  1.6708  
  1.6709 -lemma REAL_POW_LT2: "ALL (n::nat) (x::hollight.real) y::hollight.real.
  1.6710 -   n ~= 0 & real_le (real_of_num 0) x & real_lt x y -->
  1.6711 -   real_lt (real_pow x n) (real_pow y n)"
  1.6712 +lemma REAL_POW_LT2: "n ~= 0 & real_le (real_of_num 0) x & real_lt x y
  1.6713 +==> real_lt (real_pow x n) (real_pow y n)"
  1.6714    by (import hollight REAL_POW_LT2)
  1.6715  
  1.6716 -lemma REAL_POW_MONO_LT: "ALL (m::nat) (n::nat) x::hollight.real.
  1.6717 -   real_lt (real_of_num (NUMERAL_BIT1 0)) x & < m n -->
  1.6718 -   real_lt (real_pow x m) (real_pow x n)"
  1.6719 +lemma REAL_POW_LT_1: "n ~= 0 & real_lt (real_of_num 1) x
  1.6720 +==> real_lt (real_of_num 1) (real_pow x n)"
  1.6721 +  by (import hollight REAL_POW_LT_1)
  1.6722 +
  1.6723 +lemma REAL_POW_1_LT: "n ~= 0 & real_le (real_of_num 0) x & real_lt x (real_of_num 1)
  1.6724 +==> real_lt (real_pow x n) (real_of_num 1)"
  1.6725 +  by (import hollight REAL_POW_1_LT)
  1.6726 +
  1.6727 +lemma REAL_POW_MONO_LT: "real_lt (real_of_num 1) x & m < n ==> real_lt (real_pow x m) (real_pow x n)"
  1.6728    by (import hollight REAL_POW_MONO_LT)
  1.6729  
  1.6730 -lemma REAL_POW_POW: "ALL (x::hollight.real) (m::nat) n::nat.
  1.6731 -   real_pow (real_pow x m) n = real_pow x (m * n)"
  1.6732 +lemma REAL_POW_POW: "real_pow (real_pow x m) n = real_pow x (m * n)"
  1.6733    by (import hollight REAL_POW_POW)
  1.6734  
  1.6735 -lemma REAL_EQ_RCANCEL_IMP: "ALL (x::hollight.real) (y::hollight.real) z::hollight.real.
  1.6736 -   z ~= real_of_num 0 & real_mul x z = real_mul y z --> x = y"
  1.6737 +lemma REAL_EQ_RCANCEL_IMP: "z ~= real_of_num 0 & real_mul x z = real_mul y z ==> x = y"
  1.6738    by (import hollight REAL_EQ_RCANCEL_IMP)
  1.6739  
  1.6740 -lemma REAL_EQ_LCANCEL_IMP: "ALL (x::hollight.real) (xa::hollight.real) xb::hollight.real.
  1.6741 -   xb ~= real_of_num 0 & real_mul xb x = real_mul xb xa --> x = xa"
  1.6742 +lemma REAL_EQ_LCANCEL_IMP: "xb ~= real_of_num 0 & real_mul xb x = real_mul xb xa ==> x = xa"
  1.6743    by (import hollight REAL_EQ_LCANCEL_IMP)
  1.6744  
  1.6745 -lemma REAL_LT_DIV: "ALL (x::hollight.real) xa::hollight.real.
  1.6746 -   real_lt (real_of_num 0) x & real_lt (real_of_num 0) xa -->
  1.6747 -   real_lt (real_of_num 0) (real_div x xa)"
  1.6748 +lemma REAL_LT_DIV: "real_lt (real_of_num 0) x & real_lt (real_of_num 0) xa
  1.6749 +==> real_lt (real_of_num 0) (real_div x xa)"
  1.6750    by (import hollight REAL_LT_DIV)
  1.6751  
  1.6752 -lemma REAL_LE_DIV: "ALL (x::hollight.real) xa::hollight.real.
  1.6753 -   real_le (real_of_num 0) x & real_le (real_of_num 0) xa -->
  1.6754 -   real_le (real_of_num 0) (real_div x xa)"
  1.6755 +lemma REAL_LE_DIV: "real_le (real_of_num 0) x & real_le (real_of_num 0) xa
  1.6756 +==> real_le (real_of_num 0) (real_div x xa)"
  1.6757    by (import hollight REAL_LE_DIV)
  1.6758  
  1.6759 -lemma REAL_DIV_POW2: "ALL (x::hollight.real) (m::nat) n::nat.
  1.6760 -   x ~= real_of_num 0 -->
  1.6761 -   real_div (real_pow x m) (real_pow x n) =
  1.6762 -   COND (<= n m) (real_pow x (m - n)) (real_inv (real_pow x (n - m)))"
  1.6763 +lemma REAL_DIV_POW2: "x ~= real_of_num 0
  1.6764 +==> real_div (real_pow x m) (real_pow x n) =
  1.6765 +    (if n <= m then real_pow x (m - n) else real_inv (real_pow x (n - m)))"
  1.6766    by (import hollight REAL_DIV_POW2)
  1.6767  
  1.6768 -lemma REAL_DIV_POW2_ALT: "ALL (x::hollight.real) (m::nat) n::nat.
  1.6769 -   x ~= real_of_num 0 -->
  1.6770 -   real_div (real_pow x m) (real_pow x n) =
  1.6771 -   COND (< n m) (real_pow x (m - n)) (real_inv (real_pow x (n - m)))"
  1.6772 +lemma REAL_DIV_POW2_ALT: "x ~= real_of_num 0
  1.6773 +==> real_div (real_pow x m) (real_pow x n) =
  1.6774 +    (if n < m then real_pow x (m - n) else real_inv (real_pow x (n - m)))"
  1.6775    by (import hollight REAL_DIV_POW2_ALT)
  1.6776  
  1.6777 -lemma REAL_LT_POW2: "ALL x::nat.
  1.6778 -   real_lt (real_of_num 0)
  1.6779 -    (real_pow (real_of_num (NUMERAL_BIT0 (NUMERAL_BIT1 0))) x)"
  1.6780 +lemma REAL_LT_POW2: "real_lt (real_of_num 0) (real_pow (real_of_num 2) x)"
  1.6781    by (import hollight REAL_LT_POW2)
  1.6782  
  1.6783 -lemma REAL_LE_POW2: "ALL n::nat.
  1.6784 -   real_le (real_of_num (NUMERAL_BIT1 0))
  1.6785 -    (real_pow (real_of_num (NUMERAL_BIT0 (NUMERAL_BIT1 0))) n)"
  1.6786 +lemma REAL_LE_POW2: "real_le (real_of_num 1) (real_pow (real_of_num 2) n)"
  1.6787    by (import hollight REAL_LE_POW2)
  1.6788  
  1.6789 -lemma REAL_POW2_ABS: "ALL x::hollight.real.
  1.6790 -   real_pow (real_abs x) (NUMERAL_BIT0 (NUMERAL_BIT1 0)) =
  1.6791 -   real_pow x (NUMERAL_BIT0 (NUMERAL_BIT1 0))"
  1.6792 +lemma REAL_POW2_ABS: "real_pow (real_abs x) 2 = real_pow x 2"
  1.6793    by (import hollight REAL_POW2_ABS)
  1.6794  
  1.6795 -lemma REAL_LE_SQUARE_ABS: "ALL (x::hollight.real) y::hollight.real.
  1.6796 -   real_le (real_abs x) (real_abs y) =
  1.6797 -   real_le (real_pow x (NUMERAL_BIT0 (NUMERAL_BIT1 0)))
  1.6798 -    (real_pow y (NUMERAL_BIT0 (NUMERAL_BIT1 0)))"
  1.6799 +lemma REAL_LE_SQUARE_ABS: "real_le (real_abs x) (real_abs y) = real_le (real_pow x 2) (real_pow y 2)"
  1.6800    by (import hollight REAL_LE_SQUARE_ABS)
  1.6801  
  1.6802 -lemma REAL_SOS_EQ_0: "ALL (x::hollight.real) y::hollight.real.
  1.6803 -   (real_add (real_pow x (NUMERAL_BIT0 (NUMERAL_BIT1 0)))
  1.6804 -     (real_pow y (NUMERAL_BIT0 (NUMERAL_BIT1 0))) =
  1.6805 -    real_of_num 0) =
  1.6806 -   (x = real_of_num 0 & y = real_of_num 0)"
  1.6807 +lemma REAL_LT_SQUARE_ABS: "real_lt (real_abs x) (real_abs xa) = real_lt (real_pow x 2) (real_pow xa 2)"
  1.6808 +  by (import hollight REAL_LT_SQUARE_ABS)
  1.6809 +
  1.6810 +lemma REAL_EQ_SQUARE_ABS: "(real_abs x = real_abs xa) = (real_pow x 2 = real_pow xa 2)"
  1.6811 +  by (import hollight REAL_EQ_SQUARE_ABS)
  1.6812 +
  1.6813 +lemma REAL_LE_POW_2: "real_le (real_of_num 0) (real_pow x 2)"
  1.6814 +  by (import hollight REAL_LE_POW_2)
  1.6815 +
  1.6816 +lemma REAL_SOS_EQ_0: "(real_add (real_pow x 2) (real_pow y 2) = real_of_num 0) =
  1.6817 +(x = real_of_num 0 & y = real_of_num 0)"
  1.6818    by (import hollight REAL_SOS_EQ_0)
  1.6819  
  1.6820 -lemma REAL_WLOG_LE: "(ALL (x::hollight.real) y::hollight.real.
  1.6821 -    (P::hollight.real => hollight.real => bool) x y = P y x) &
  1.6822 -(ALL (x::hollight.real) y::hollight.real. real_le x y --> P x y) -->
  1.6823 -(ALL x::hollight.real. All (P x))"
  1.6824 +lemma REAL_POW_ZERO: "real_pow (real_of_num 0) n =
  1.6825 +(if n = 0 then real_of_num 1 else real_of_num 0)"
  1.6826 +  by (import hollight REAL_POW_ZERO)
  1.6827 +
  1.6828 +lemma REAL_POW_MONO_INV: "real_le (real_of_num 0) x & real_le x (real_of_num 1) & n <= m
  1.6829 +==> real_le (real_pow x m) (real_pow x n)"
  1.6830 +  by (import hollight REAL_POW_MONO_INV)
  1.6831 +
  1.6832 +lemma REAL_POW_LE2_REV: "n ~= 0 & real_le (real_of_num 0) y & real_le (real_pow x n) (real_pow y n)
  1.6833 +==> real_le x y"
  1.6834 +  by (import hollight REAL_POW_LE2_REV)
  1.6835 +
  1.6836 +lemma REAL_POW_LT2_REV: "real_le (real_of_num 0) y & real_lt (real_pow x n) (real_pow y n)
  1.6837 +==> real_lt x y"
  1.6838 +  by (import hollight REAL_POW_LT2_REV)
  1.6839 +
  1.6840 +lemma REAL_POW_EQ: "x ~= 0 &
  1.6841 +real_le (real_of_num 0) xa &
  1.6842 +real_le (real_of_num 0) xb & real_pow xa x = real_pow xb x
  1.6843 +==> xa = xb"
  1.6844 +  by (import hollight REAL_POW_EQ)
  1.6845 +
  1.6846 +lemma REAL_POW_EQ_ABS: "n ~= 0 & real_pow x n = real_pow y n ==> real_abs x = real_abs y"
  1.6847 +  by (import hollight REAL_POW_EQ_ABS)
  1.6848 +
  1.6849 +lemma REAL_POW_EQ_1_IMP: "n ~= 0 & real_pow x n = real_of_num 1 ==> real_abs x = real_of_num 1"
  1.6850 +  by (import hollight REAL_POW_EQ_1_IMP)
  1.6851 +
  1.6852 +lemma REAL_POW_EQ_1: "(real_pow x n = real_of_num 1) =
  1.6853 +(real_abs x = real_of_num 1 & (real_lt x (real_of_num 0) --> even n) |
  1.6854 + n = 0)"
  1.6855 +  by (import hollight REAL_POW_EQ_1)
  1.6856 +
  1.6857 +lemma REAL_POW_LT2_ODD: "real_lt x y & odd n ==> real_lt (real_pow x n) (real_pow y n)"
  1.6858 +  by (import hollight REAL_POW_LT2_ODD)
  1.6859 +
  1.6860 +lemma REAL_POW_LE2_ODD: "real_le xa xb & odd x ==> real_le (real_pow xa x) (real_pow xb x)"
  1.6861 +  by (import hollight REAL_POW_LE2_ODD)
  1.6862 +
  1.6863 +lemma REAL_POW_LT2_ODD_EQ: "odd n ==> real_lt (real_pow x n) (real_pow y n) = real_lt x y"
  1.6864 +  by (import hollight REAL_POW_LT2_ODD_EQ)
  1.6865 +
  1.6866 +lemma REAL_POW_LE2_ODD_EQ: "odd n ==> real_le (real_pow x n) (real_pow y n) = real_le x y"
  1.6867 +  by (import hollight REAL_POW_LE2_ODD_EQ)
  1.6868 +
  1.6869 +lemma REAL_POW_EQ_ODD_EQ: "odd x ==> (real_pow xa x = real_pow xb x) = (xa = xb)"
  1.6870 +  by (import hollight REAL_POW_EQ_ODD_EQ)
  1.6871 +
  1.6872 +lemma REAL_POW_EQ_ODD: "odd n & real_pow x n = real_pow y n ==> x = y"
  1.6873 +  by (import hollight REAL_POW_EQ_ODD)
  1.6874 +
  1.6875 +lemma REAL_POW_EQ_EQ: "(real_pow x n = real_pow y n) =
  1.6876 +(if even n then n = 0 | real_abs x = real_abs y else x = y)"
  1.6877 +  by (import hollight REAL_POW_EQ_EQ)
  1.6878 +
  1.6879 +definition
  1.6880 +  real_sgn :: "hollight.real => hollight.real"  where
  1.6881 +  "real_sgn ==
  1.6882 +%u. if real_lt (real_of_num 0) u then real_of_num 1
  1.6883 +    else if real_lt u (real_of_num 0) then real_neg (real_of_num 1)
  1.6884 +         else real_of_num 0"
  1.6885 +
  1.6886 +lemma DEF_real_sgn: "real_sgn =
  1.6887 +(%u. if real_lt (real_of_num 0) u then real_of_num 1
  1.6888 +     else if real_lt u (real_of_num 0) then real_neg (real_of_num 1)
  1.6889 +          else real_of_num 0)"
  1.6890 +  by (import hollight DEF_real_sgn)
  1.6891 +
  1.6892 +lemma REAL_SGN_0: "real_sgn (real_of_num 0) = real_of_num 0"
  1.6893 +  by (import hollight REAL_SGN_0)
  1.6894 +
  1.6895 +lemma REAL_SGN_NEG: "real_sgn (real_neg x) = real_neg (real_sgn x)"
  1.6896 +  by (import hollight REAL_SGN_NEG)
  1.6897 +
  1.6898 +lemma REAL_SGN_ABS: "real_mul (real_sgn x) (real_abs x) = x"
  1.6899 +  by (import hollight REAL_SGN_ABS)
  1.6900 +
  1.6901 +lemma REAL_ABS_SGN: "real_abs (real_sgn x) = real_sgn (real_abs x)"
  1.6902 +  by (import hollight REAL_ABS_SGN)
  1.6903 +
  1.6904 +lemma REAL_SGN: "real_sgn x = real_div x (real_abs x)"
  1.6905 +  by (import hollight REAL_SGN)
  1.6906 +
  1.6907 +lemma REAL_SGN_MUL: "real_sgn (real_mul x xa) = real_mul (real_sgn x) (real_sgn xa)"
  1.6908 +  by (import hollight REAL_SGN_MUL)
  1.6909 +
  1.6910 +lemma REAL_SGN_INV: "real_sgn (real_inv x) = real_sgn x"
  1.6911 +  by (import hollight REAL_SGN_INV)
  1.6912 +
  1.6913 +lemma REAL_SGN_DIV: "real_sgn (real_div x xa) = real_div (real_sgn x) (real_sgn xa)"
  1.6914 +  by (import hollight REAL_SGN_DIV)
  1.6915 +
  1.6916 +lemma REAL_WLOG_LE: "(ALL x y. P x y = P y x) & (ALL x y. real_le x y --> P x y) ==> P x xa"
  1.6917    by (import hollight REAL_WLOG_LE)
  1.6918  
  1.6919 -lemma REAL_WLOG_LT: "(ALL x::hollight.real. (P::hollight.real => hollight.real => bool) x x) &
  1.6920 -(ALL (x::hollight.real) y::hollight.real. P x y = P y x) &
  1.6921 -(ALL (x::hollight.real) y::hollight.real. real_lt x y --> P x y) -->
  1.6922 -(ALL x::hollight.real. All (P x))"
  1.6923 +lemma REAL_WLOG_LT: "(ALL x. P x x) & (ALL x y. P x y = P y x) & (ALL x y. real_lt x y --> P x y)
  1.6924 +==> P x xa"
  1.6925    by (import hollight REAL_WLOG_LT)
  1.6926  
  1.6927 -definition mod_real :: "hollight.real => hollight.real => hollight.real => bool" where 
  1.6928 -  "mod_real ==
  1.6929 -%(u::hollight.real) (ua::hollight.real) ub::hollight.real.
  1.6930 -   EX q::hollight.real. real_sub ua ub = real_mul q u"
  1.6931 -
  1.6932 -lemma DEF_mod_real: "mod_real =
  1.6933 -(%(u::hollight.real) (ua::hollight.real) ub::hollight.real.
  1.6934 -    EX q::hollight.real. real_sub ua ub = real_mul q u)"
  1.6935 -  by (import hollight DEF_mod_real)
  1.6936 -
  1.6937 -definition DECIMAL :: "nat => nat => hollight.real" where 
  1.6938 -  "DECIMAL == %(u::nat) ua::nat. real_div (real_of_num u) (real_of_num ua)"
  1.6939 -
  1.6940 -lemma DEF_DECIMAL: "DECIMAL = (%(u::nat) ua::nat. real_div (real_of_num u) (real_of_num ua))"
  1.6941 +definition
  1.6942 +  DECIMAL :: "nat => nat => hollight.real"  where
  1.6943 +  "DECIMAL == %u ua. real_div (real_of_num u) (real_of_num ua)"
  1.6944 +
  1.6945 +lemma DEF_DECIMAL: "DECIMAL = (%u ua. real_div (real_of_num u) (real_of_num ua))"
  1.6946    by (import hollight DEF_DECIMAL)
  1.6947  
  1.6948 -lemma RAT_LEMMA1: "(y1::hollight.real) ~= real_of_num 0 &
  1.6949 -(y2::hollight.real) ~= real_of_num 0 -->
  1.6950 -real_add (real_div (x1::hollight.real) y1)
  1.6951 - (real_div (x2::hollight.real) y2) =
  1.6952 -real_mul (real_add (real_mul x1 y2) (real_mul x2 y1))
  1.6953 - (real_mul (real_inv y1) (real_inv y2))"
  1.6954 +lemma RAT_LEMMA1: "y1 ~= real_of_num 0 & y2 ~= real_of_num 0
  1.6955 +==> real_add (real_div x1 y1) (real_div x2 y2) =
  1.6956 +    real_mul (real_add (real_mul x1 y2) (real_mul x2 y1))
  1.6957 +     (real_mul (real_inv y1) (real_inv y2))"
  1.6958    by (import hollight RAT_LEMMA1)
  1.6959  
  1.6960 -lemma RAT_LEMMA2: "real_lt (real_of_num 0) (y1::hollight.real) &
  1.6961 -real_lt (real_of_num 0) (y2::hollight.real) -->
  1.6962 -real_add (real_div (x1::hollight.real) y1)
  1.6963 - (real_div (x2::hollight.real) y2) =
  1.6964 -real_mul (real_add (real_mul x1 y2) (real_mul x2 y1))
  1.6965 - (real_mul (real_inv y1) (real_inv y2))"
  1.6966 +lemma RAT_LEMMA2: "real_lt (real_of_num 0) y1 & real_lt (real_of_num 0) y2
  1.6967 +==> real_add (real_div x1 y1) (real_div x2 y2) =
  1.6968 +    real_mul (real_add (real_mul x1 y2) (real_mul x2 y1))
  1.6969 +     (real_mul (real_inv y1) (real_inv y2))"
  1.6970    by (import hollight RAT_LEMMA2)
  1.6971  
  1.6972 -lemma RAT_LEMMA3: "real_lt (real_of_num 0) (y1::hollight.real) &
  1.6973 -real_lt (real_of_num 0) (y2::hollight.real) -->
  1.6974 -real_sub (real_div (x1::hollight.real) y1)
  1.6975 - (real_div (x2::hollight.real) y2) =
  1.6976 -real_mul (real_sub (real_mul x1 y2) (real_mul x2 y1))
  1.6977 - (real_mul (real_inv y1) (real_inv y2))"
  1.6978 +lemma RAT_LEMMA3: "real_lt (real_of_num 0) y1 & real_lt (real_of_num 0) y2
  1.6979 +==> real_sub (real_div x1 y1) (real_div x2 y2) =
  1.6980 +    real_mul (real_sub (real_mul x1 y2) (real_mul x2 y1))
  1.6981 +     (real_mul (real_inv y1) (real_inv y2))"
  1.6982    by (import hollight RAT_LEMMA3)
  1.6983  
  1.6984 -lemma RAT_LEMMA4: "real_lt (real_of_num 0) (y1::hollight.real) &
  1.6985 -real_lt (real_of_num 0) (y2::hollight.real) -->
  1.6986 -real_le (real_div (x1::hollight.real) y1)
  1.6987 - (real_div (x2::hollight.real) y2) =
  1.6988 -real_le (real_mul x1 y2) (real_mul x2 y1)"
  1.6989 +lemma RAT_LEMMA4: "real_lt (real_of_num 0) y1 & real_lt (real_of_num 0) y2
  1.6990 +==> real_le (real_div x1 y1) (real_div x2 y2) =
  1.6991 +    real_le (real_mul x1 y2) (real_mul x2 y1)"
  1.6992    by (import hollight RAT_LEMMA4)
  1.6993  
  1.6994 -lemma RAT_LEMMA5: "real_lt (real_of_num 0) (y1::hollight.real) &
  1.6995 -real_lt (real_of_num 0) (y2::hollight.real) -->
  1.6996 -(real_div (x1::hollight.real) y1 = real_div (x2::hollight.real) y2) =
  1.6997 -(real_mul x1 y2 = real_mul x2 y1)"
  1.6998 +lemma RAT_LEMMA5: "real_lt (real_of_num 0) y1 & real_lt (real_of_num 0) y2
  1.6999 +==> (real_div x1 y1 = real_div x2 y2) = (real_mul x1 y2 = real_mul x2 y1)"
  1.7000    by (import hollight RAT_LEMMA5)
  1.7001  
  1.7002 -definition is_int :: "hollight.real => bool" where 
  1.7003 -  "is_int ==
  1.7004 -%u::hollight.real.
  1.7005 -   EX n::nat. u = real_of_num n | u = real_neg (real_of_num n)"
  1.7006 -
  1.7007 -lemma DEF_is_int: "is_int =
  1.7008 -(%u::hollight.real.
  1.7009 -    EX n::nat. u = real_of_num n | u = real_neg (real_of_num n))"
  1.7010 -  by (import hollight DEF_is_int)
  1.7011 -
  1.7012 -typedef (open) int = "Collect is_int"  morphisms "dest_int" "mk_int"
  1.7013 -  apply (rule light_ex_imp_nonempty[where t="real_of_num (NUMERAL 0)"])
  1.7014 +lemma REAL_INTEGRAL: "(ALL x. real_mul (real_of_num 0) x = real_of_num 0) &
  1.7015 +(ALL x y z. (real_add x y = real_add x z) = (y = z)) &
  1.7016 +(ALL w x y z.
  1.7017 +    (real_add (real_mul w y) (real_mul x z) =
  1.7018 +     real_add (real_mul w z) (real_mul x y)) =
  1.7019 +    (w = x | y = z))"
  1.7020 +  by (import hollight REAL_INTEGRAL)
  1.7021 +
  1.7022 +definition
  1.7023 +  integer :: "hollight.real => bool"  where
  1.7024 +  "integer == %u. EX n. real_abs u = real_of_num n"
  1.7025 +
  1.7026 +lemma DEF_integer: "integer = (%u. EX n. real_abs u = real_of_num n)"
  1.7027 +  by (import hollight DEF_integer)
  1.7028 +
  1.7029 +lemma is_int: "integer x = (EX n. x = real_of_num n | x = real_neg (real_of_num n))"
  1.7030 +  by (import hollight is_int)
  1.7031 +
  1.7032 +typedef (open) int = "Collect integer"  morphisms "real_of_int" "int_of_real"
  1.7033 +  apply (rule light_ex_imp_nonempty[where t="Eps integer"])
  1.7034    by (import hollight TYDEF_int)
  1.7035  
  1.7036  syntax
  1.7037 -  dest_int :: _ 
  1.7038 +  real_of_int :: _ 
  1.7039  
  1.7040  syntax
  1.7041 -  mk_int :: _ 
  1.7042 +  int_of_real :: _ 
  1.7043  
  1.7044  lemmas "TYDEF_int_@intern" = typedef_hol2hollight 
  1.7045    [where a="a :: hollight.int" and r=r ,
  1.7046     OF type_definition_int]
  1.7047  
  1.7048 -lemma dest_int_rep: "ALL x::hollight.int.
  1.7049 -   EX n::nat.
  1.7050 -      dest_int x = real_of_num n | dest_int x = real_neg (real_of_num n)"
  1.7051 +lemma dest_int_rep: "EX n. hollight.real_of_int x = real_of_num n |
  1.7052 +      hollight.real_of_int x = real_neg (real_of_num n)"
  1.7053    by (import hollight dest_int_rep)
  1.7054  
  1.7055 -definition int_le :: "hollight.int => hollight.int => bool" where 
  1.7056 -  "int_le ==
  1.7057 -%(u::hollight.int) ua::hollight.int. real_le (dest_int u) (dest_int ua)"
  1.7058 -
  1.7059 -lemma DEF_int_le: "int_le =
  1.7060 -(%(u::hollight.int) ua::hollight.int. real_le (dest_int u) (dest_int ua))"
  1.7061 +definition
  1.7062 +  int_le :: "hollight.int => hollight.int => bool"  where
  1.7063 +  "int_le == %u ua. real_le (hollight.real_of_int u) (hollight.real_of_int ua)"
  1.7064 +
  1.7065 +lemma DEF_int_le: "int_le = (%u ua. real_le (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7066    by (import hollight DEF_int_le)
  1.7067  
  1.7068 -definition int_lt :: "hollight.int => hollight.int => bool" where 
  1.7069 -  "int_lt ==
  1.7070 -%(u::hollight.int) ua::hollight.int. real_lt (dest_int u) (dest_int ua)"
  1.7071 -
  1.7072 -lemma DEF_int_lt: "int_lt =
  1.7073 -(%(u::hollight.int) ua::hollight.int. real_lt (dest_int u) (dest_int ua))"
  1.7074 +definition
  1.7075 +  int_lt :: "hollight.int => hollight.int => bool"  where
  1.7076 +  "int_lt == %u ua. real_lt (hollight.real_of_int u) (hollight.real_of_int ua)"
  1.7077 +
  1.7078 +lemma DEF_int_lt: "int_lt = (%u ua. real_lt (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7079    by (import hollight DEF_int_lt)
  1.7080  
  1.7081 -definition int_ge :: "hollight.int => hollight.int => bool" where 
  1.7082 -  "int_ge ==
  1.7083 -%(u::hollight.int) ua::hollight.int.
  1.7084 -   hollight.real_ge (dest_int u) (dest_int ua)"
  1.7085 -
  1.7086 -lemma DEF_int_ge: "int_ge =
  1.7087 -(%(u::hollight.int) ua::hollight.int.
  1.7088 -    hollight.real_ge (dest_int u) (dest_int ua))"
  1.7089 +definition
  1.7090 +  int_ge :: "hollight.int => hollight.int => bool"  where
  1.7091 +  "int_ge == %u ua. real_ge (hollight.real_of_int u) (hollight.real_of_int ua)"
  1.7092 +
  1.7093 +lemma DEF_int_ge: "int_ge = (%u ua. real_ge (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7094    by (import hollight DEF_int_ge)
  1.7095  
  1.7096 -definition int_gt :: "hollight.int => hollight.int => bool" where 
  1.7097 -  "int_gt ==
  1.7098 -%(u::hollight.int) ua::hollight.int.
  1.7099 -   hollight.real_gt (dest_int u) (dest_int ua)"
  1.7100 -
  1.7101 -lemma DEF_int_gt: "int_gt =
  1.7102 -(%(u::hollight.int) ua::hollight.int.
  1.7103 -    hollight.real_gt (dest_int u) (dest_int ua))"
  1.7104 +definition
  1.7105 +  int_gt :: "hollight.int => hollight.int => bool"  where
  1.7106 +  "int_gt == %u ua. real_gt (hollight.real_of_int u) (hollight.real_of_int ua)"
  1.7107 +
  1.7108 +lemma DEF_int_gt: "int_gt = (%u ua. real_gt (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7109    by (import hollight DEF_int_gt)
  1.7110  
  1.7111 -definition int_of_num :: "nat => hollight.int" where 
  1.7112 -  "int_of_num == %u::nat. mk_int (real_of_num u)"
  1.7113 -
  1.7114 -lemma DEF_int_of_num: "int_of_num = (%u::nat. mk_int (real_of_num u))"
  1.7115 +definition
  1.7116 +  int_of_num :: "nat => hollight.int"  where
  1.7117 +  "int_of_num == %u. int_of_real (real_of_num u)"
  1.7118 +
  1.7119 +lemma DEF_int_of_num: "int_of_num = (%u. int_of_real (real_of_num u))"
  1.7120    by (import hollight DEF_int_of_num)
  1.7121  
  1.7122 -lemma int_of_num_th: "ALL x::nat. dest_int (int_of_num x) = real_of_num x"
  1.7123 +lemma int_of_num_th: "hollight.real_of_int (int_of_num x) = real_of_num x"
  1.7124    by (import hollight int_of_num_th)
  1.7125  
  1.7126 -definition int_neg :: "hollight.int => hollight.int" where 
  1.7127 -  "int_neg == %u::hollight.int. mk_int (real_neg (dest_int u))"
  1.7128 -
  1.7129 -lemma DEF_int_neg: "int_neg = (%u::hollight.int. mk_int (real_neg (dest_int u)))"
  1.7130 +definition
  1.7131 +  int_neg :: "hollight.int => hollight.int"  where
  1.7132 +  "int_neg == %u. int_of_real (real_neg (hollight.real_of_int u))"
  1.7133 +
  1.7134 +lemma DEF_int_neg: "int_neg = (%u. int_of_real (real_neg (hollight.real_of_int u)))"
  1.7135    by (import hollight DEF_int_neg)
  1.7136  
  1.7137 -lemma int_neg_th: "ALL x::hollight.int. dest_int (int_neg x) = real_neg (dest_int x)"
  1.7138 +lemma int_neg_th: "hollight.real_of_int (int_neg x) = real_neg (hollight.real_of_int x)"
  1.7139    by (import hollight int_neg_th)
  1.7140  
  1.7141 -definition int_add :: "hollight.int => hollight.int => hollight.int" where 
  1.7142 +definition
  1.7143 +  int_add :: "hollight.int => hollight.int => hollight.int"  where
  1.7144    "int_add ==
  1.7145 -%(u::hollight.int) ua::hollight.int.
  1.7146 -   mk_int (real_add (dest_int u) (dest_int ua))"
  1.7147 +%u ua.
  1.7148 +   int_of_real (real_add (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7149  
  1.7150  lemma DEF_int_add: "int_add =
  1.7151 -(%(u::hollight.int) ua::hollight.int.
  1.7152 -    mk_int (real_add (dest_int u) (dest_int ua)))"
  1.7153 +(%u ua.
  1.7154 +    int_of_real
  1.7155 +     (real_add (hollight.real_of_int u) (hollight.real_of_int ua)))"
  1.7156    by (import hollight DEF_int_add)
  1.7157  
  1.7158 -lemma int_add_th: "ALL (x::hollight.int) xa::hollight.int.
  1.7159 -   dest_int (int_add x xa) = real_add (dest_int x) (dest_int xa)"
  1.7160 +lemma int_add_th: "hollight.real_of_int (int_add x xa) =
  1.7161 +real_add (hollight.real_of_int x) (hollight.real_of_int xa)"
  1.7162    by (import hollight int_add_th)
  1.7163  
  1.7164 -definition int_sub :: "hollight.int => hollight.int => hollight.int" where 
  1.7165 +definition
  1.7166 +  int_sub :: "hollight.int => hollight.int => hollight.int"  where
  1.7167    "int_sub ==
  1.7168 -%(u::hollight.int) ua::hollight.int.
  1.7169 -   mk_int (real_sub (dest_int u) (dest_int ua))"
  1.7170 +%u ua.
  1.7171 +   int_of_real (real_sub (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7172  
  1.7173  lemma DEF_int_sub: "int_sub =
  1.7174 -(%(u::hollight.int) ua::hollight.int.
  1.7175 -    mk_int (real_sub (dest_int u) (dest_int ua)))"
  1.7176 +(%u ua.
  1.7177 +    int_of_real
  1.7178 +     (real_sub (hollight.real_of_int u) (hollight.real_of_int ua)))"
  1.7179    by (import hollight DEF_int_sub)
  1.7180  
  1.7181 -lemma int_sub_th: "ALL (x::hollight.int) xa::hollight.int.
  1.7182 -   dest_int (int_sub x xa) = real_sub (dest_int x) (dest_int xa)"
  1.7183 +lemma int_sub_th: "hollight.real_of_int (int_sub x xa) =
  1.7184 +real_sub (hollight.real_of_int x) (hollight.real_of_int xa)"
  1.7185    by (import hollight int_sub_th)
  1.7186  
  1.7187 -definition int_mul :: "hollight.int => hollight.int => hollight.int" where 
  1.7188 +definition
  1.7189 +  int_mul :: "hollight.int => hollight.int => hollight.int"  where
  1.7190    "int_mul ==
  1.7191 -%(u::hollight.int) ua::hollight.int.
  1.7192 -   mk_int (real_mul (dest_int u) (dest_int ua))"
  1.7193 +%u ua.
  1.7194 +   int_of_real (real_mul (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7195  
  1.7196  lemma DEF_int_mul: "int_mul =
  1.7197 -(%(u::hollight.int) ua::hollight.int.
  1.7198 -    mk_int (real_mul (dest_int u) (dest_int ua)))"
  1.7199 +(%u ua.
  1.7200 +    int_of_real
  1.7201 +     (real_mul (hollight.real_of_int u) (hollight.real_of_int ua)))"
  1.7202    by (import hollight DEF_int_mul)
  1.7203  
  1.7204 -lemma int_mul_th: "ALL (x::hollight.int) y::hollight.int.
  1.7205 -   dest_int (int_mul x y) = real_mul (dest_int x) (dest_int y)"
  1.7206 +lemma int_mul_th: "hollight.real_of_int (int_mul x y) =
  1.7207 +real_mul (hollight.real_of_int x) (hollight.real_of_int y)"
  1.7208    by (import hollight int_mul_th)
  1.7209  
  1.7210 -definition int_abs :: "hollight.int => hollight.int" where 
  1.7211 -  "int_abs == %u::hollight.int. mk_int (real_abs (dest_int u))"
  1.7212 -
  1.7213 -lemma DEF_int_abs: "int_abs = (%u::hollight.int. mk_int (real_abs (dest_int u)))"
  1.7214 +definition
  1.7215 +  int_abs :: "hollight.int => hollight.int"  where
  1.7216 +  "int_abs == %u. int_of_real (real_abs (hollight.real_of_int u))"
  1.7217 +
  1.7218 +lemma DEF_int_abs: "int_abs = (%u. int_of_real (real_abs (hollight.real_of_int u)))"
  1.7219    by (import hollight DEF_int_abs)
  1.7220  
  1.7221 -lemma int_abs_th: "ALL x::hollight.int. dest_int (int_abs x) = real_abs (dest_int x)"
  1.7222 +lemma int_abs_th: "hollight.real_of_int (int_abs x) = real_abs (hollight.real_of_int x)"
  1.7223    by (import hollight int_abs_th)
  1.7224  
  1.7225 -definition int_max :: "hollight.int => hollight.int => hollight.int" where 
  1.7226 +definition
  1.7227 +  int_sgn :: "hollight.int => hollight.int"  where
  1.7228 +  "int_sgn == %u. int_of_real (real_sgn (hollight.real_of_int u))"
  1.7229 +
  1.7230 +lemma DEF_int_sgn: "int_sgn = (%u. int_of_real (real_sgn (hollight.real_of_int u)))"
  1.7231 +  by (import hollight DEF_int_sgn)
  1.7232 +
  1.7233 +lemma int_sgn_th: "hollight.real_of_int (int_sgn x) = real_sgn (hollight.real_of_int x)"
  1.7234 +  by (import hollight int_sgn_th)
  1.7235 +
  1.7236 +definition
  1.7237 +  int_max :: "hollight.int => hollight.int => hollight.int"  where
  1.7238    "int_max ==
  1.7239 -%(u::hollight.int) ua::hollight.int.
  1.7240 -   mk_int (real_max (dest_int u) (dest_int ua))"
  1.7241 +%u ua.
  1.7242 +   int_of_real (real_max (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7243  
  1.7244  lemma DEF_int_max: "int_max =
  1.7245 -(%(u::hollight.int) ua::hollight.int.
  1.7246 -    mk_int (real_max (dest_int u) (dest_int ua)))"
  1.7247 +(%u ua.
  1.7248 +    int_of_real
  1.7249 +     (real_max (hollight.real_of_int u) (hollight.real_of_int ua)))"
  1.7250    by (import hollight DEF_int_max)
  1.7251  
  1.7252 -lemma int_max_th: "ALL (x::hollight.int) y::hollight.int.
  1.7253 -   dest_int (int_max x y) = real_max (dest_int x) (dest_int y)"
  1.7254 +lemma int_max_th: "hollight.real_of_int (int_max x y) =
  1.7255 +real_max (hollight.real_of_int x) (hollight.real_of_int y)"
  1.7256    by (import hollight int_max_th)
  1.7257  
  1.7258 -definition int_min :: "hollight.int => hollight.int => hollight.int" where 
  1.7259 +definition
  1.7260 +  int_min :: "hollight.int => hollight.int => hollight.int"  where
  1.7261    "int_min ==
  1.7262 -%(u::hollight.int) ua::hollight.int.
  1.7263 -   mk_int (real_min (dest_int u) (dest_int ua))"
  1.7264 +%u ua.
  1.7265 +   int_of_real (real_min (hollight.real_of_int u) (hollight.real_of_int ua))"
  1.7266  
  1.7267  lemma DEF_int_min: "int_min =
  1.7268 -(%(u::hollight.int) ua::hollight.int.
  1.7269 -    mk_int (real_min (dest_int u) (dest_int ua)))"
  1.7270 +(%u ua.
  1.7271 +    int_of_real
  1.7272 +     (real_min (hollight.real_of_int u) (hollight.real_of_int ua)))"
  1.7273    by (import hollight DEF_int_min)
  1.7274  
  1.7275 -lemma int_min_th: "ALL (x::hollight.int) y::hollight.int.
  1.7276 -   dest_int (int_min x y) = real_min (dest_int x) (dest_int y)"
  1.7277 +lemma int_min_th: "hollight.real_of_int (int_min x y) =
  1.7278 +real_min (hollight.real_of_int x) (hollight.real_of_int y)"
  1.7279    by (import hollight int_min_th)
  1.7280  
  1.7281 -definition int_pow :: "hollight.int => nat => hollight.int" where 
  1.7282 -  "int_pow == %(u::hollight.int) ua::nat. mk_int (real_pow (dest_int u) ua)"
  1.7283 -
  1.7284 -lemma DEF_int_pow: "int_pow = (%(u::hollight.int) ua::nat. mk_int (real_pow (dest_int u) ua))"
  1.7285 +definition
  1.7286 +  int_pow :: "hollight.int => nat => hollight.int"  where
  1.7287 +  "int_pow == %u ua. int_of_real (real_pow (hollight.real_of_int u) ua)"
  1.7288 +
  1.7289 +lemma DEF_int_pow: "int_pow = (%u ua. int_of_real (real_pow (hollight.real_of_int u) ua))"
  1.7290    by (import hollight DEF_int_pow)
  1.7291  
  1.7292 -lemma int_pow_th: "ALL (x::hollight.int) xa::nat.
  1.7293 -   dest_int (int_pow x xa) = real_pow (dest_int x) xa"
  1.7294 +lemma int_pow_th: "hollight.real_of_int (int_pow x xa) = real_pow (hollight.real_of_int x) xa"
  1.7295    by (import hollight int_pow_th)
  1.7296  
  1.7297 -lemma INT_IMAGE: "ALL x::hollight.int.
  1.7298 -   (EX n::nat. x = int_of_num n) | (EX n::nat. x = int_neg (int_of_num n))"
  1.7299 +lemma INT_IMAGE: "(EX n. x = int_of_num n) | (EX n. x = int_neg (int_of_num n))"
  1.7300    by (import hollight INT_IMAGE)
  1.7301  
  1.7302 -lemma INT_LT_DISCRETE: "ALL (x::hollight.int) y::hollight.int.
  1.7303 -   int_lt x y = int_le (int_add x (int_of_num (NUMERAL_BIT1 0))) y"
  1.7304 +lemma INT_LT_DISCRETE: "int_lt x y = int_le (int_add x (int_of_num 1)) y"
  1.7305    by (import hollight INT_LT_DISCRETE)
  1.7306  
  1.7307 -lemma INT_GT_DISCRETE: "ALL (x::hollight.int) xa::hollight.int.
  1.7308 -   int_gt x xa = int_ge x (int_add xa (int_of_num (NUMERAL_BIT1 0)))"
  1.7309 +lemma INT_GT_DISCRETE: "int_gt x xa = int_ge x (int_add xa (int_of_num 1))"
  1.7310    by (import hollight INT_GT_DISCRETE)
  1.7311  
  1.7312 -lemma INT_FORALL_POS: "(ALL n::nat. (P::hollight.int => bool) (int_of_num n)) =
  1.7313 -(ALL i::hollight.int. int_le (int_of_num 0) i --> P i)"
  1.7314 +lemma INT_FORALL_POS: "(ALL n. P (int_of_num n)) = (ALL i. int_le (int_of_num 0) i --> P i)"
  1.7315    by (import hollight INT_FORALL_POS)
  1.7316  
  1.7317 -lemma INT_ABS_MUL_1: "ALL (x::hollight.int) y::hollight.int.
  1.7318 -   (int_abs (int_mul x y) = int_of_num (NUMERAL_BIT1 0)) =
  1.7319 -   (int_abs x = int_of_num (NUMERAL_BIT1 0) &
  1.7320 -    int_abs y = int_of_num (NUMERAL_BIT1 0))"
  1.7321 +lemma INT_EXISTS_POS: "(EX n. P (int_of_num n)) = (EX i. int_le (int_of_num 0) i & P i)"
  1.7322 +  by (import hollight INT_EXISTS_POS)
  1.7323 +
  1.7324 +lemma INT_FORALL_ABS: "(ALL n. x (int_of_num n)) = (ALL xa. x (int_abs xa))"
  1.7325 +  by (import hollight INT_FORALL_ABS)
  1.7326 +
  1.7327 +lemma INT_EXISTS_ABS: "(EX n. P (int_of_num n)) = (EX x. P (int_abs x))"
  1.7328 +  by (import hollight INT_EXISTS_ABS)
  1.7329 +
  1.7330 +lemma INT_ABS_MUL_1: "(int_abs (int_mul x y) = int_of_num 1) =
  1.7331 +(int_abs x = int_of_num 1 & int_abs y = int_of_num 1)"
  1.7332    by (import hollight INT_ABS_MUL_1)
  1.7333  
  1.7334 -lemma INT_POW: "int_pow (x::hollight.int) 0 = int_of_num (NUMERAL_BIT1 0) &
  1.7335 -(ALL xa::nat. int_pow x (Suc xa) = int_mul x (int_pow x xa))"
  1.7336 +lemma INT_WOP: "(EX x. int_le (int_of_num 0) x & P x) =
  1.7337 +(EX x. int_le (int_of_num 0) x &
  1.7338 +       P x & (ALL y. int_le (int_of_num 0) y & P y --> int_le x y))"
  1.7339 +  by (import hollight INT_WOP)
  1.7340 +
  1.7341 +lemma INT_POW: "int_pow x 0 = int_of_num 1 &
  1.7342 +(ALL xa. int_pow x (Suc xa) = int_mul x (int_pow x xa))"
  1.7343    by (import hollight INT_POW)
  1.7344  
  1.7345 -lemma INT_ABS: "ALL x::hollight.int.
  1.7346 -   int_abs x = COND (int_le (int_of_num 0) x) x (int_neg x)"
  1.7347 +lemma INT_ABS: "int_abs x = (if int_le (int_of_num 0) x then x else int_neg x)"
  1.7348    by (import hollight INT_ABS)
  1.7349  
  1.7350 -lemma INT_GE: "ALL (x::hollight.int) xa::hollight.int. int_ge x xa = int_le xa x"
  1.7351 +lemma INT_GE: "int_ge x xa = int_le xa x"
  1.7352    by (import hollight INT_GE)
  1.7353  
  1.7354 -lemma INT_GT: "ALL (x::hollight.int) xa::hollight.int. int_gt x xa = int_lt xa x"
  1.7355 +lemma INT_GT: "int_gt x xa = int_lt xa x"
  1.7356    by (import hollight INT_GT)
  1.7357  
  1.7358 -lemma INT_LT: "ALL (x::hollight.int) xa::hollight.int. int_lt x xa = (~ int_le xa x)"
  1.7359 +lemma INT_LT: "int_lt x xa = (~ int_le xa x)"
  1.7360    by (import hollight INT_LT)
  1.7361  
  1.7362 -lemma INT_ARCH: "ALL (x::hollight.int) d::hollight.int.
  1.7363 -   d ~= int_of_num 0 --> (EX c::hollight.int. int_lt x (int_mul c d))"
  1.7364 +lemma INT_ARCH: "d ~= int_of_num 0 ==> EX c. int_lt x (int_mul c d)"
  1.7365    by (import hollight INT_ARCH)
  1.7366  
  1.7367 -definition mod_int :: "hollight.int => hollight.int => hollight.int => bool" where 
  1.7368 -  "mod_int ==
  1.7369 -%(u::hollight.int) (ua::hollight.int) ub::hollight.int.
  1.7370 -   EX q::hollight.int. int_sub ua ub = int_mul q u"
  1.7371 -
  1.7372 -lemma DEF_mod_int: "mod_int =
  1.7373 -(%(u::hollight.int) (ua::hollight.int) ub::hollight.int.
  1.7374 -    EX q::hollight.int. int_sub ua ub = int_mul q u)"
  1.7375 -  by (import hollight DEF_mod_int)
  1.7376 -
  1.7377 -definition IN :: "'A => ('A => bool) => bool" where 
  1.7378 -  "IN == %(u::'A::type) ua::'A::type => bool. ua u"
  1.7379 -
  1.7380 -lemma DEF_IN: "IN = (%(u::'A::type) ua::'A::type => bool. ua u)"
  1.7381 -  by (import hollight DEF_IN)
  1.7382 -
  1.7383 -lemma EXTENSION: "ALL (x::'A::type => bool) xa::'A::type => bool.
  1.7384 -   (x = xa) = (ALL xb::'A::type. IN xb x = IN xb xa)"
  1.7385 -  by (import hollight EXTENSION)
  1.7386 -
  1.7387 -definition GSPEC :: "('A => bool) => 'A => bool" where 
  1.7388 -  "GSPEC == %u::'A::type => bool. u"
  1.7389 -
  1.7390 -lemma DEF_GSPEC: "GSPEC = (%u::'A::type => bool. u)"
  1.7391 -  by (import hollight DEF_GSPEC)
  1.7392 -
  1.7393 -definition SETSPEC :: "'q_37056 => bool => 'q_37056 => bool" where 
  1.7394 -  "SETSPEC == %(u::'q_37056::type) (ua::bool) ub::'q_37056::type. ua & u = ub"
  1.7395 -
  1.7396 -lemma DEF_SETSPEC: "SETSPEC = (%(u::'q_37056::type) (ua::bool) ub::'q_37056::type. ua & u = ub)"
  1.7397 -  by (import hollight DEF_SETSPEC)
  1.7398 -
  1.7399 -lemma IN_ELIM_THM: "(ALL (P::(bool => 'q_37089::type => bool) => bool) x::'q_37089::type.
  1.7400 -    IN x (GSPEC (%v::'q_37089::type. P (SETSPEC v))) =
  1.7401 -    P (%(p::bool) t::'q_37089::type. p & x = t)) &
  1.7402 -(ALL (p::'q_37120::type => bool) x::'q_37120::type.
  1.7403 -    IN x
  1.7404 -     (GSPEC (%v::'q_37120::type. EX y::'q_37120::type. SETSPEC v (p y) y)) =
  1.7405 -    p x) &
  1.7406 -(ALL (P::(bool => 'q_37148::type => bool) => bool) x::'q_37148::type.
  1.7407 -    GSPEC (%v::'q_37148::type. P (SETSPEC v)) x =
  1.7408 -    P (%(p::bool) t::'q_37148::type. p & x = t)) &
  1.7409 -(ALL (p::'q_37177::type => bool) x::'q_37177::type.
  1.7410 -    GSPEC (%v::'q_37177::type. EX y::'q_37177::type. SETSPEC v (p y) y) x =
  1.7411 -    p x) &
  1.7412 -(ALL (p::'q_37194::type => bool) x::'q_37194::type. IN x p = p x)"
  1.7413 -  by (import hollight IN_ELIM_THM)
  1.7414 -
  1.7415 -definition EMPTY :: "'A => bool" where 
  1.7416 -  "EMPTY == %x::'A::type. False"
  1.7417 -
  1.7418 -lemma DEF_EMPTY: "EMPTY = (%x::'A::type. False)"
  1.7419 -  by (import hollight DEF_EMPTY)
  1.7420 -
  1.7421 -definition INSERT :: "'A => ('A => bool) => 'A => bool" where 
  1.7422 -  "INSERT == %(u::'A::type) (ua::'A::type => bool) y::'A::type. IN y ua | y = u"
  1.7423 -
  1.7424 -lemma DEF_INSERT: "INSERT =
  1.7425 -(%(u::'A::type) (ua::'A::type => bool) y::'A::type. IN y ua | y = u)"
  1.7426 -  by (import hollight DEF_INSERT)
  1.7427 +lemma INT_DIVMOD_EXIST_0: "EX x xa.
  1.7428 +   if n = int_of_num 0 then x = int_of_num 0 & xa = m
  1.7429 +   else int_le (int_of_num 0) xa &
  1.7430 +        int_lt xa (int_abs n) & m = int_add (int_mul x n) xa"
  1.7431 +  by (import hollight INT_DIVMOD_EXIST_0)
  1.7432  
  1.7433  consts
  1.7434 -  UNIV :: "'A => bool" 
  1.7435 +  div :: "hollight.int => hollight.int => hollight.int" ("div")
  1.7436  
  1.7437  defs
  1.7438 -  UNIV_def: "hollight.UNIV == %x::'A::type. True"
  1.7439 -
  1.7440 -lemma DEF_UNIV: "hollight.UNIV = (%x::'A::type. True)"
  1.7441 -  by (import hollight DEF_UNIV)
  1.7442 +  div_def: "div ==
  1.7443 +SOME q.
  1.7444 +   EX r. ALL m n.
  1.7445 +            if n = int_of_num 0 then q m n = int_of_num 0 & r m n = m
  1.7446 +            else int_le (int_of_num 0) (r m n) &
  1.7447 +                 int_lt (r m n) (int_abs n) &
  1.7448 +                 m = int_add (int_mul (q m n) n) (r m n)"
  1.7449 +
  1.7450 +lemma DEF_div: "div =
  1.7451 +(SOME q.
  1.7452 +    EX r. ALL m n.
  1.7453 +             if n = int_of_num 0 then q m n = int_of_num 0 & r m n = m
  1.7454 +             else int_le (int_of_num 0) (r m n) &
  1.7455 +                  int_lt (r m n) (int_abs n) &
  1.7456 +                  m = int_add (int_mul (q m n) n) (r m n))"
  1.7457 +  by (import hollight DEF_div)
  1.7458 +
  1.7459 +definition
  1.7460 +  rem :: "hollight.int => hollight.int => hollight.int"  where
  1.7461 +  "rem ==
  1.7462 +SOME r.
  1.7463 +   ALL m n.
  1.7464 +      if n = int_of_num 0 then div m n = int_of_num 0 & r m n = m
  1.7465 +      else int_le (int_of_num 0) (r m n) &
  1.7466 +           int_lt (r m n) (int_abs n) &
  1.7467 +           m = int_add (int_mul (div m n) n) (r m n)"
  1.7468 +
  1.7469 +lemma DEF_rem: "rem =
  1.7470 +(SOME r.
  1.7471 +    ALL m n.
  1.7472 +       if n = int_of_num 0 then div m n = int_of_num 0 & r m n = m
  1.7473 +       else int_le (int_of_num 0) (r m n) &
  1.7474 +            int_lt (r m n) (int_abs n) &
  1.7475 +            m = int_add (int_mul (div m n) n) (r m n))"
  1.7476 +  by (import hollight DEF_rem)
  1.7477 +
  1.7478 +lemma INT_DIVISION: "n ~= int_of_num 0
  1.7479 +==> m = int_add (int_mul (div m n) n) (rem m n) &
  1.7480 +    int_le (int_of_num 0) (rem m n) & int_lt (rem m n) (int_abs n)"
  1.7481 +  by (import hollight INT_DIVISION)
  1.7482 +
  1.7483 +lemma sth: "(ALL x y z. int_add x (int_add y z) = int_add (int_add x y) z) &
  1.7484 +(ALL x y. int_add x y = int_add y x) &
  1.7485 +(ALL x. int_add (int_of_num 0) x = x) &
  1.7486 +(ALL x y z. int_mul x (int_mul y z) = int_mul (int_mul x y) z) &
  1.7487 +(ALL x y. int_mul x y = int_mul y x) &
  1.7488 +(ALL x. int_mul (int_of_num 1) x = x) &
  1.7489 +(ALL x. int_mul (int_of_num 0) x = int_of_num 0) &
  1.7490 +(ALL x y z. int_mul x (int_add y z) = int_add (int_mul x y) (int_mul x z)) &
  1.7491 +(ALL x. int_pow x 0 = int_of_num 1) &
  1.7492 +(ALL x xa. int_pow x (Suc xa) = int_mul x (int_pow x xa))"
  1.7493 +  by (import hollight sth)
  1.7494 +
  1.7495 +lemma INT_INTEGRAL: "(ALL x. int_mul (int_of_num 0) x = int_of_num 0) &
  1.7496 +(ALL x y z. (int_add x y = int_add x z) = (y = z)) &
  1.7497 +(ALL w x y z.
  1.7498 +    (int_add (int_mul w y) (int_mul x z) =
  1.7499 +     int_add (int_mul w z) (int_mul x y)) =
  1.7500 +    (w = x | y = z))"
  1.7501 +  by (import hollight INT_INTEGRAL)
  1.7502 +
  1.7503 +lemma INT_DIVMOD_UNIQ: "m = int_add (int_mul q n) r & int_le (int_of_num 0) r & int_lt r (int_abs n)
  1.7504 +==> div m n = q & rem m n = r"
  1.7505 +  by (import hollight INT_DIVMOD_UNIQ)
  1.7506  
  1.7507  consts
  1.7508 -  UNION :: "('A => bool) => ('A => bool) => 'A => bool" 
  1.7509 +  eqeq :: "'A => 'A => ('A => 'A => bool) => bool" 
  1.7510 +
  1.7511 +defs
  1.7512 +  eqeq_def: "hollight.eqeq == %(u::'A) (ua::'A) ub::'A => 'A => bool. ub u ua"
  1.7513 +
  1.7514 +lemma DEF__equal__equal_: "hollight.eqeq = (%(u::'A) (ua::'A) ub::'A => 'A => bool. ub u ua)"
  1.7515 +  by (import hollight DEF__equal__equal_)
  1.7516 +
  1.7517 +definition
  1.7518 +  real_mod :: "hollight.real => hollight.real => hollight.real => bool"  where
  1.7519 +  "real_mod == %u ua ub. EX q. integer q & real_sub ua ub = real_mul q u"
  1.7520 +
  1.7521 +lemma DEF_real_mod: "real_mod = (%u ua ub. EX q. integer q & real_sub ua ub = real_mul q u)"
  1.7522 +  by (import hollight DEF_real_mod)
  1.7523 +
  1.7524 +definition
  1.7525 +  int_divides :: "hollight.int => hollight.int => bool"  where
  1.7526 +  "int_divides == %u ua. EX x. ua = int_mul u x"
  1.7527 +
  1.7528 +lemma DEF_int_divides: "int_divides = (%u ua. EX x. ua = int_mul u x)"
  1.7529 +  by (import hollight DEF_int_divides)
  1.7530 +
  1.7531 +consts
  1.7532 +  int_mod :: "hollight.int => hollight.int => hollight.int => bool" 
  1.7533  
  1.7534  defs
  1.7535 -  UNION_def: "hollight.UNION ==
  1.7536 -%(u::'A::type => bool) ua::'A::type => bool.
  1.7537 -   GSPEC (%ub::'A::type. EX x::'A::type. SETSPEC ub (IN x u | IN x ua) x)"
  1.7538 -
  1.7539 -lemma DEF_UNION: "hollight.UNION =
  1.7540 -(%(u::'A::type =&