From 5d9f7ae4bad2b5926f615141c12942b9a8eb23fb Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Wed, 6 Oct 2021 00:47:56 +0200 Subject: [PATCH] update in ground + one lemma was missing --- .../lambdadelta/ground/arith/nat_lt_minus.ma | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma index 5a6c4674b..61ab9b544 100644 --- a/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma +++ b/matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma @@ -12,6 +12,7 @@ (* *) (**************************************************************************) +include "ground/generated/pull_2.ma". include "ground/arith/nat_le_minus.ma". include "ground/arith/nat_lt_pred.ma". @@ -61,3 +62,21 @@ lemma nlt_des_minus_dx (o) (m) (n): m < n - o → o < n. /3 width=2 by nlt_inv_pred_dx/ ] qed-. + +(* Advanced eliminators for nle with nlt and nminus *************************) + +(*** nat_elim_le_sn *) +lemma nle_ind_sn (Q:relation …): + (∀m1,m2. (∀m. m < m2-m1 → Q (m2-m) m2) → m1 ≤ m2 → Q m1 m2) → + ∀n1,n2. n1 ≤ n2 → Q n1 n2. +#Q #IH #n1 #n2 #Hn +>(nminus_minus_dx_refl_sn … Hn) -Hn +lapply (nle_minus_sn_refl_sn n2 n1) +let d ≝ (n2-n1) +@(nat_ind_lt … d) -d -n1 #d +@pull_2 #Hd +>(nminus_minus_dx_refl_sn … Hd) in ⊢ (%→?); -Hd +let n1 ≝ (n2-d) #IHd +@IH -IH [| // ] #m #Hn +/4 width=3 by nlt_des_le, nlt_nle_trans/ +qed-. -- 2.39.2