--- a/src/HOL/IntArith.thy Mon Jun 11 00:53:18 2007 +0200
+++ b/src/HOL/IntArith.thy Mon Jun 11 01:22:29 2007 +0200
@@ -196,6 +196,24 @@
z is an integer literal.*}
lemmas int_eq_iff_number_of [simp] = int_eq_iff [of _ "number_of v", standard]
+lemmas int_of_nat_eq_iff_number_of [simp] =
+ int_of_nat_eq_iff [of _ "number_of v", standard]
+
+lemma split_nat':
+ "P(nat(i::int)) = ((\<forall>n. i = int_of_nat n \<longrightarrow> P n) & (i < 0 \<longrightarrow> P 0))"
+ (is "?P = (?L & ?R)")
+proof (cases "i < 0")
+ case True thus ?thesis by simp
+next
+ case False
+ have "?P = ?L"
+ proof
+ assume ?P thus ?L using False by clarsimp
+ next
+ assume ?L thus ?P using False by simp
+ qed
+ with False show ?thesis by simp
+qed
lemma split_nat [arith_split]:
"P(nat(i::int)) = ((\<forall>n. i = int n \<longrightarrow> P n) & (i < 0 \<longrightarrow> P 0))"