From 78b1c68fca5f15000588a1e091149a188831977e Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Fri, 13 May 2011 21:19:34 +0000 Subject: [PATCH] ground: some arithmetical properties added lift: some properties proved --- matita/matita/lib/lambda-delta/ground.ma | 32 ++++++++++ .../lib/lambda-delta/substitution/lift.ma | 61 +++++++++++++++++-- 2 files changed, 89 insertions(+), 4 deletions(-) diff --git a/matita/matita/lib/lambda-delta/ground.ma b/matita/matita/lib/lambda-delta/ground.ma index 3a04f0d17..72a1eaf29 100644 --- a/matita/matita/lib/lambda-delta/ground.ma +++ b/matita/matita/lib/lambda-delta/ground.ma @@ -12,3 +12,35 @@ include "basics/list.ma". include "lambda-delta/notation.ma". +(* ARITHMETICAL PROPERTIES **************************************************) + +lemma plus_plus_comm_23: ∀m,n,p. m + n + p = m + p + n. +// qed. + +lemma minus_le: ∀m,n. m - n ≤ m. +/2/ qed. + + +lemma plus_plus_minus_m_m: ∀e1,e2,d. e1 ≤ e2 → d + e1 + (e2 - e1) = d + e2. +/2/ qed. + +lemma le_plus_minus_comm: ∀n,m,p. p ≤ m → (m + n) - p = (m - p) + n. +#n #m #p #lepm @plus_to_minus (commutative_plus p) le_plus_minus_comm [ @lift_lref_ge @(transitive_le … Hd12) -Hd12 /2/ | -Hd12 /2/ ] + | -Hd12 >(plus_minus_m_m i e2) in ⊢ (? ? ? ? %) /3/ + ] + ] + | #I #W1 #W #U1 #U #d1 #e1 #_ #_ #IHW #IHU #d2 #e2 #T2 #H #Hd12 + lapply (lift_inv_con22 … H) -H #H + elim H -H #W2 #H elim H -H #U2 #H elim H -H #H elim H -H #HW2 #HU2 #H (**) (* decompose*) + destruct -T2; + elim (IHW … HW2 ?) // -IHW HW2 #W0 #H + elim H -H #HW2 #HW1 (**) (* decompose*) + >plus_plus_comm_23 in HU2 #HU2 elim (IHU … HU2 ?) /2/ -IHU HU2 Hd12 #U0 #H + elim H -H #HU2 #HU1 (**) (* decompose*) + @(ex_intro … ♭I W0. U0) /3/ (**) (* /4/ *) + ] +qed. + +theorem lift_free: ∀d1,e2,T1,T2. ↑[d1, e2] T1 ≡ T2 → ∀d2,e1. + d1 ≤ d2 → d2 ≤ d1 + e1 → e1 ≤ e2 → + ∃T. ↑[d1, e1] T1 ≡ T ∧ ↑[d2, e2 - e1] T ≡ T2. +#d1 #e2 #T1 #T2 #H elim H -H d1 e2 T1 T2 + [ /3/ + | #i #d1 #e2 #Hid1 #d2 #e1 #Hd12 #_ #_ + lapply (lt_to_le_to_lt … Hid1 Hd12) -Hd12 #Hid2 /4/ + | #i #d1 #e2 #Hid1 #d2 #e1 #_ #Hd21 #He12 + lapply (transitive_le …(i+e1) Hd21 ?) /2/ -Hd21 #Hd21 + <(plus_plus_minus_m_m e1 e2 i) // + @(ex_intro … #(i+e1)) /3/ (**) (* /4/ *) + | #I #V1 #V2 #T1 #T2 #d1 #e2 #_ #_ #IHV #IHT #d2 #e1 #Hd12 #Hd21 #He12 + elim (IHV … Hd12 Hd21 He12) -IHV #V0 #H + elim H -H #HV0a #HV0b (**) (* decompose *) + elim (IHT (d2+1) … ? ? He12) /2/ -IHT Hd12 Hd21 He12 #T0 #H + elim H -H #HT0a #HT0b (**) (* decompose *) + @(ex_intro … ♭I V0.T0) /3/ (**) (* /4/ *) + ] +qed. -- 2.39.2