src/HOL/Library/Nat_Infinity.thy
changeset 29337 450805a4a91f
parent 29023 ef3adebc6d98
child 29652 f4c6e546b7fe
child 29667 53103fc8ffa3
     1.1 --- a/src/HOL/Library/Nat_Infinity.thy	Sat Jan 03 08:36:20 2009 +0100
     1.2 +++ b/src/HOL/Library/Nat_Infinity.thy	Sat Jan 03 08:36:46 2009 +0100
     1.3 @@ -1,5 +1,4 @@
     1.4  (*  Title:      HOL/Library/Nat_Infinity.thy
     1.5 -    ID:         $Id$
     1.6      Author:     David von Oheimb, TU Muenchen;  Florian Haftmann, TU Muenchen
     1.7  *)
     1.8  
     1.9 @@ -9,6 +8,17 @@
    1.10  imports Plain "~~/src/HOL/Presburger"
    1.11  begin
    1.12  
    1.13 +text {* FIXME: move to Nat.thy *}
    1.14 +
    1.15 +instantiation nat :: bot
    1.16 +begin
    1.17 +
    1.18 +definition bot_nat :: nat where
    1.19 +  "bot_nat = 0"
    1.20 +
    1.21 +instance proof
    1.22 +qed (simp add: bot_nat_def)
    1.23 +
    1.24  subsection {* Type definition *}
    1.25  
    1.26  text {*
    1.27 @@ -16,6 +26,8 @@
    1.28    infinity.
    1.29  *}
    1.30  
    1.31 +end
    1.32 +
    1.33  datatype inat = Fin nat | Infty
    1.34  
    1.35  notation (xsymbols)
    1.36 @@ -353,6 +365,20 @@
    1.37  apply (erule (1) le_less_trans)
    1.38  done
    1.39  
    1.40 +instantiation inat :: "{bot, top}"
    1.41 +begin
    1.42 +
    1.43 +definition bot_inat :: inat where
    1.44 +  "bot_inat = 0"
    1.45 +
    1.46 +definition top_inat :: inat where
    1.47 +  "top_inat = \<infinity>"
    1.48 +
    1.49 +instance proof
    1.50 +qed (simp_all add: bot_inat_def top_inat_def)
    1.51 +
    1.52 +end
    1.53 +
    1.54  
    1.55  subsection {* Well-ordering *}
    1.56