From b40eb1628b85bbf4605fad2222c86ea796425e2a Mon Sep 17 00:00:00 2001 From: Raphaƫl Monat Date: Tue, 3 Oct 2017 16:19:17 +0200 Subject: Add leb_not_le: (n <=? m) = false -> n > m. --- theories/Arith/PeanoNat.v | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'theories') diff --git a/theories/Arith/PeanoNat.v b/theories/Arith/PeanoNat.v index bde6f1bb4..ffa56a6c3 100644 --- a/theories/Arith/PeanoNat.v +++ b/theories/Arith/PeanoNat.v @@ -172,6 +172,17 @@ Proof. apply leb_le. Qed. + +Lemma leb_not_le n m : (n <=? m) = false -> n > m. +Proof. + revert m; induction n; destruct m; simpl; intros H_nm. + - congruence. + - congruence. + - apply lt_succ_r, le_0_n. + - specialize (IHn _ H_nm). + now apply lt_succ_r in IHn. +Qed. + (** ** Decidability of equality over [nat]. *) Lemma eq_dec : forall n m : nat, {n = m} + {n <> m}. -- cgit v1.2.3