src/HOL/Library/Nat_Infinity.thy
changeset 41855 c3b6e69da386
parent 41853 258a489c24b2
child 42993 da014b00d7a4
--- a/src/HOL/Library/Nat_Infinity.thy	Sat Feb 26 20:16:44 2011 +0100
+++ b/src/HOL/Library/Nat_Infinity.thy	Sat Feb 26 20:40:45 2011 +0100
@@ -32,6 +32,10 @@
 by (cases x) auto
 
 
+primrec the_Fin :: "inat \<Rightarrow> nat"
+where "the_Fin (Fin n) = n"
+
+
 subsection {* Constructors and numbers *}
 
 instantiation inat :: "{zero, one, number}"
@@ -283,6 +287,12 @@
 lemma idiff_self[simp]: "n \<noteq> \<infinity> \<Longrightarrow> (n::inat) - n = 0"
 by(auto simp: zero_inat_def)
 
+lemma iSuc_minus_iSuc [simp]: "iSuc n - iSuc m = n - m"
+by(simp add: iSuc_def split: inat.split)
+
+lemma iSuc_minus_1 [simp]: "iSuc n - 1 = n"
+by(simp add: one_inat_def iSuc_Fin[symmetric] zero_inat_def[symmetric])
+
 (*lemmas idiff_self_eq_0_Fin = idiff_self_eq_0[unfolded zero_inat_def]*)
 
 
@@ -488,6 +498,4 @@
 lemmas inat_defs = zero_inat_def one_inat_def number_of_inat_def iSuc_def
   plus_inat_def less_eq_inat_def less_inat_def
 
-lemmas inat_splits = inat.splits
-
 end