merged
authorpaulson
Thu, 22 Feb 2018 22:58:38 +0000
changeset 67690 3c02b0522e23
parent 67687 34e0e0d5ea7c (current diff)
parent 67689 2c38ffd6ec71 (diff)
child 67691 db202a00a29c
merged
--- a/src/HOL/Library/Extended_Nat.thy	Thu Feb 22 20:05:30 2018 +0100
+++ b/src/HOL/Library/Extended_Nat.thy	Thu Feb 22 22:58:38 2018 +0000
@@ -383,6 +383,8 @@
     by (simp split: enat.splits)
   show "a < b \<Longrightarrow> c < d \<Longrightarrow> a + c < b + d" for a b c d :: enat
     by (cases a b c d rule: enat2_cases[case_product enat2_cases]) auto
+  show "a < b \<Longrightarrow> a + 1 < b + 1"
+    by (metis add_right_mono eSuc_minus_1 eSuc_plus_1 less_le)
 qed (simp add: zero_enat_def one_enat_def)
 
 (* BH: These equations are already proven generally for any type in
--- a/src/HOL/Rings.thy	Thu Feb 22 20:05:30 2018 +0100
+++ b/src/HOL/Rings.thy	Thu Feb 22 22:58:38 2018 +0000
@@ -2245,7 +2245,8 @@
 
 end
 
-class linordered_nonzero_semiring = ordered_comm_semiring + monoid_mult + linorder + zero_less_one
+class linordered_nonzero_semiring = ordered_comm_semiring + monoid_mult + linorder + zero_less_one +
+  assumes add_mono1: "a < b \<Longrightarrow> a + 1 < b + 1"
 begin
 
 subclass zero_neq_one
@@ -2278,7 +2279,15 @@
   assumes le_add_diff_inverse2 [simp]: "b \<le> a \<Longrightarrow> a - b + b = a"
 begin
 
-subclass linordered_nonzero_semiring ..
+subclass linordered_nonzero_semiring 
+proof
+  show "a + 1 < b + 1" if "a < b" for a b
+  proof (rule ccontr, simp add: not_less)
+    assume "b \<le> a"
+    with that show False
+      by (simp add: )
+  qed
+qed
 
 text \<open>Addition is the inverse of subtraction.\<close>