src/HOL/Hyperreal/HyperNat.thy
changeset 27435 b3f8e9bdf9a7
parent 27105 5f139027c365
equal deleted inserted replaced
27434:8a7100d33960 27435:b3f8e9bdf9a7
    17   hypnat_of_nat :: "nat => nat star" where
    17   hypnat_of_nat :: "nat => nat star" where
    18   "hypnat_of_nat == star_of"
    18   "hypnat_of_nat == star_of"
    19 
    19 
    20 definition
    20 definition
    21   hSuc :: "hypnat => hypnat" where
    21   hSuc :: "hypnat => hypnat" where
    22   hSuc_def [transfer_unfold]: "hSuc = *f* Suc"
    22   hSuc_def [transfer_unfold, code func del]: "hSuc = *f* Suc"
    23 
    23 
    24 subsection{*Properties Transferred from Naturals*}
    24 subsection{*Properties Transferred from Naturals*}
    25 
    25 
    26 lemma hSuc_not_zero [iff]: "\<And>m. hSuc m \<noteq> 0"
    26 lemma hSuc_not_zero [iff]: "\<And>m. hSuc m \<noteq> 0"
    27 by transfer (rule Suc_not_Zero)
    27 by transfer (rule Suc_not_Zero)
   365 
   365 
   366 subsection {* Embedding of the Hypernaturals into other types *}
   366 subsection {* Embedding of the Hypernaturals into other types *}
   367 
   367 
   368 definition
   368 definition
   369   of_hypnat :: "hypnat \<Rightarrow> 'a::semiring_1_cancel star" where
   369   of_hypnat :: "hypnat \<Rightarrow> 'a::semiring_1_cancel star" where
   370   of_hypnat_def [transfer_unfold]: "of_hypnat = *f* of_nat"
   370   of_hypnat_def [transfer_unfold, code func del]: "of_hypnat = *f* of_nat"
   371 
   371 
   372 lemma of_hypnat_0 [simp]: "of_hypnat 0 = 0"
   372 lemma of_hypnat_0 [simp]: "of_hypnat 0 = 0"
   373 by transfer (rule of_nat_0)
   373 by transfer (rule of_nat_0)
   374 
   374 
   375 lemma of_hypnat_1 [simp]: "of_hypnat 1 = 1"
   375 lemma of_hypnat_1 [simp]: "of_hypnat 1 = 1"