Origin Definitions Sections HOLlib Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
hol_num
Nuprl Section: hol_num

Selected Objects
defncompose ncompose(f;n;x) == if n=0 then x else f(ncompose(f;n-1;x)) fi   (recursive)
THMncompose_zero f:('a'a), x:'a. ncompose(f;0;x) = x
THMncompose_pos n:x:'af:('a'a). n>0  ncompose(f;n;x) = f(ncompose(f;n-1;x))
THMdecidable__nat m,n:. Dec(m = n)
THMnat_eq_to_int m,n:m = n  m = n
defhnum hnum == 
defhsuc_rep suc_rep == x:. (@f:. (one_one(;;f) & onto(;;f)))(x)
defhzero_rep zero_rep == @x:. (y:x = suc_rep(y )
defhis_num_rep is_num_rep
== m:P:. ((P(zero_rep))(n:. (P(n))(P(suc_rep(n)))))(P(m))
defhrep_num rep_num == n:. ncompose(suc_rep;n;zero_rep)
defhabs_num abs_num == n:. @m:. (n = rep_num(m )
defhzero zero == 0
defhsuc suc == n:n+1
THMnum_iso iso_pair(;;is_num_rep;rep_num;abs_num)
THMhsuc_rep_def equal(suc_rep,select(f:hind  hind. and(one_one(f),not(onto(f)))))
THMhzero_rep_def equal(zero_rep,select(x:hind. all(y:hind. not(equal(x,suc_rep(y))))))
THMhis_num_rep_wd all
(m:hind. equal
(m:hind. (is_num_rep(m)
(m:hind. ,all
(m:hind. ,(P:hind  hbool. implies
(m:hind. ,(P:hind  hbool. (and
(m:hind. ,(P:hind  hbool. ((P(zero_rep)
(m:hind. ,(P:hind  hbool. (,all(n:hind. implies(P(n),P(suc_rep(n)))))
(m:hind. ,(P:hind  hbool. ,P(m)))))
THMhnum_ty_def exists(rep:hnum  hind. type_definition(is_num_rep,rep))
THMhnum_iso_def and
(all(a:hnum. equal(abs_num(rep_num(a)),a))
,all(r:hind. equal(is_num_rep(r),equal(rep_num(abs_num(r)),r))))
THMhzero_def equal(0,abs_num(zero_rep))
THMhsuc_def all(m:hnum. equal(suc(m),abs_num(suc_rep(rep_num(m)))))
THMhnot_suc all(n:hnum. not(equal(suc(n),0)))
THMhinv_suc all(m:hnum. all(n:hnum. implies(equal(suc(m),suc(n)),equal(m,n))))
THMhinduction all
(P:hnum  hbool. implies
(P:hnum  hbool. (and(P(0),all(n:hnum. implies(P(n),P(suc(n)))))
(P:hnum  hbool. ,all(n:hnum. P(n))))
THMnot_suc n:n+1 = 0  
THMinv_suc m,n:m+1 = n+1    m = n
THMinduction P:(). P(0) & (n:P(n P(n+1))  (n:P(n))
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

Origin Definitions Sections HOLlib Doc