From: Ferruccio Guidi Date: Sun, 17 Mar 2013 23:31:36 +0000 (+0000) Subject: sfr renamed as lbotr and its symbol changed according to lsubr X-Git-Tag: make_still_working~1209 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6ac78e984f3ddee01251ef0ce13a692f062d7d5f;p=helm.git sfr renamed as lbotr and its symbol changed according to lsubr --- diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation.ma b/matita/matita/contribs/lambdadelta/basic_2/notation.ma index de8221468..4aa5cd88a 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/notation.ma +++ b/matita/matita/contribs/lambdadelta/basic_2/notation.ma @@ -146,13 +146,13 @@ notation "hvbox( ⇧ [ term 46 d , break term 46 e ] break term 46 T1 ≡ break non associative with precedence 45 for @{ 'RLift $d $e $T1 $T2 }. -notation "hvbox( T1 break ⊑ [ term 46 d , break term 46 e ] break term 46 T2 )" +notation "hvbox( L1 break ⊑ [ term 46 d , break term 46 e ] break term 46 L2 )" non associative with precedence 45 - for @{ 'SubEq $T1 $d $e $T2 }. + for @{ 'SubEq $L1 $d $e $L2 }. -notation "hvbox( ≽ [ term 46 d , break term 46 e ] break term 46 T2 )" +notation "hvbox( ⊒ [ term 46 d , break term 46 e ] break term 46 L2 )" non associative with precedence 45 - for @{ 'SubEqBottom $d $e $T2 }. + for @{ 'SubEqBottom $d $e $L2 }. notation "hvbox( ⇩ [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )" non associative with precedence 45 diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lbotr.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lbotr.ma new file mode 100644 index 000000000..1ff849657 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_lbotr.ma @@ -0,0 +1,94 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/substitution/lsubr_lbotr.ma". +include "basic_2/substitution/ldrop_ldrop.ma". + +(* DROPPING *****************************************************************) + +(* Inversion lemmas about local env. full refinement for substitution *******) + +(* Note: ldrop_ldrop not needed *) +lemma lbotr_inv_ldrop: ∀I,L,K,V,i. ⇩[0, i] L ≡ K. ⓑ{I}V → ∀d,e. ⊒[d, e] L → + d ≤ i → i < d + e → I = Abbr. +#I #L elim L -L +[ #K #V #i #H + lapply (ldrop_inv_atom1 … H) -H #H destruct +| #L #J #W #IHL #K #V #i #H + elim (ldrop_inv_O1 … H) -H * + [ -IHL #H1 #H2 #d #e #HL #Hdi #Hide destruct + lapply (le_n_O_to_eq … Hdi) -Hdi #H destruct + lapply (HL … (L.ⓓW) ?) -HL /2 width=1/ #H + elim (lsubr_inv_abbr2 … H ?) -H // -Hide #K #_ #H destruct // + | #Hi #HLK #d @(nat_ind_plus … d) -d + [ #e #H #_ #Hide + elim (lbotr_inv_bind … H ?) -H [2: /2 width=2/ ] #HL #H destruct + @(IHL … HLK … HL) -IHL -HLK -HL // /2 width=1/ + | #d #_ #e #H #Hdi #Hide + lapply (lbotr_inv_skip … H ?) -H // #HL + @(IHL … HLK … HL) -IHL -HLK -HL /2 width=1/ + ] + ] +] +qed-. + +(* Properties about local env. full refinement for substitution *************) + +(* Note: ldrop_ldrop not needed *) +lemma lbotr_ldrop: ∀L,d,e. + (∀I,K,V,i. d ≤ i → i < d + e → ⇩[0, i] L ≡ K. ⓑ{I}V → I = Abbr) → + ⊒[d, e] L. +#L elim L -L // +#L #I #V #IHL #d @(nat_ind_plus … d) -d +[ #e @(nat_ind_plus … e) -e // + #e #_ #H0 + >(H0 I L V 0 ? ? ?) // + /5 width=6 by lbotr_abbr, ldrop_ldrop, lt_minus_to_plus_r/ (**) (* auto now too slow without trace *) +| #d #_ #e #H0 + /5 width=6 by lbotr_skip, ldrop_ldrop, le_S_S, lt_minus_to_plus_r/ (**) (* auto now too slow without trace *) +] +qed. + +lemma lbotr_ldrop_trans_le: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ⊒[dd, ee] L1 → + dd + ee ≤ d → ⊒[dd, ee] L2. +#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee +@lbotr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2 +lapply (lt_to_le_to_lt … Hiddee Hddee) -Hddee #Hid +elim (ldrop_trans_le … HL12 … HLK2 ?) -L2 /2 width=2/ #X #HLK1 #H +elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K1 #V1 #HK12 #HV21 #H destruct +@(lbotr_inv_ldrop … HLK1 … HL1) -L1 -K1 -V1 // +qed. + +lemma lbotr_ldrop_trans_be_up: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → + ∀dd,ee. ⊒[dd, ee] L1 → + dd ≤ d + e → d + e ≤ dd + ee → + ⊒[d, dd + ee - d - e] L2. +#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hdde #Hddee +@lbotr_ldrop #I #K2 #V2 #i #Hdi #Hiddee #HLK2 +lapply (transitive_le ? ? (i+e)… Hdde ?) -Hdde /2 width=1/ #Hddie +>commutative_plus in Hiddee; >minus_minus_comm commutative_plus // -Hddie /2 width=1/ +qed. + +lemma lbotr_ldrop_trans_ge: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ⊒[dd, ee] L1 → + d + e ≤ dd → ⊒[dd - e, ee] L2. +#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee +@lbotr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2 +elim (le_inv_plus_l … Hddee) -Hddee #Hdde #Hedd +>plus_minus in Hiddee; // #Hiddee +lapply (transitive_le … Hdde Hddi) -Hdde #Hid +lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hid #HL1K2 +@(lbotr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus /2 width=1/ +qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma deleted file mode 100644 index 9d4cc3108..000000000 --- a/matita/matita/contribs/lambdadelta/basic_2/substitution/ldrop_sfr.ma +++ /dev/null @@ -1,94 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "basic_2/substitution/lsubr_sfr.ma". -include "basic_2/substitution/ldrop_ldrop.ma". - -(* DROPPING *****************************************************************) - -(* Inversion lemmas about local env. full refinement for substitution *******) - -(* Note: ldrop_ldrop not needed *) -lemma sfr_inv_ldrop: ∀I,L,K,V,i. ⇩[0, i] L ≡ K. ⓑ{I}V → ∀d,e. ≽ [d, e] L → - d ≤ i → i < d + e → I = Abbr. -#I #L elim L -L -[ #K #V #i #H - lapply (ldrop_inv_atom1 … H) -H #H destruct -| #L #J #W #IHL #K #V #i #H - elim (ldrop_inv_O1 … H) -H * - [ -IHL #H1 #H2 #d #e #HL #Hdi #Hide destruct - lapply (le_n_O_to_eq … Hdi) -Hdi #H destruct - lapply (HL … (L.ⓓW) ?) -HL /2 width=1/ #H - elim (lsubr_inv_abbr2 … H ?) -H // -Hide #K #_ #H destruct // - | #Hi #HLK #d @(nat_ind_plus … d) -d - [ #e #H #_ #Hide - elim (sfr_inv_bind … H ?) -H [2: /2 width=2/ ] #HL #H destruct - @(IHL … HLK … HL) -IHL -HLK -HL // /2 width=1/ - | #d #_ #e #H #Hdi #Hide - lapply (sfr_inv_skip … H ?) -H // #HL - @(IHL … HLK … HL) -IHL -HLK -HL /2 width=1/ - ] - ] -] -qed-. - -(* Properties about local env. full refinement for substitution *************) - -(* Note: ldrop_ldrop not needed *) -lemma sfr_ldrop: ∀L,d,e. - (∀I,K,V,i. d ≤ i → i < d + e → ⇩[0, i] L ≡ K. ⓑ{I}V → I = Abbr) → - ≽ [d, e] L. -#L elim L -L // -#L #I #V #IHL #d @(nat_ind_plus … d) -d -[ #e @(nat_ind_plus … e) -e // - #e #_ #H0 - >(H0 I L V 0 ? ? ?) // - /5 width=6 by sfr_abbr, ldrop_ldrop, lt_minus_to_plus_r/ (**) (* auto now too slow without trace *) -| #d #_ #e #H0 - /5 width=6 by sfr_skip, ldrop_ldrop, le_S_S, lt_minus_to_plus_r/ (**) (* auto now too slow without trace *) -] -qed. - -lemma sfr_ldrop_trans_le: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → - dd + ee ≤ d → ≽ [dd, ee] L2. -#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee -@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2 -lapply (lt_to_le_to_lt … Hiddee Hddee) -Hddee #Hid -elim (ldrop_trans_le … HL12 … HLK2 ?) -L2 /2 width=2/ #X #HLK1 #H -elim (ldrop_inv_skip2 … H ?) -H /2 width=1/ -Hid #K1 #V1 #HK12 #HV21 #H destruct -@(sfr_inv_ldrop … HLK1 … HL1) -L1 -K1 -V1 // -qed. - -lemma sfr_ldrop_trans_be_up: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → - ∀dd,ee. ≽ [dd, ee] L1 → - dd ≤ d + e → d + e ≤ dd + ee → - ≽ [d, dd + ee - d - e] L2. -#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hdde #Hddee -@sfr_ldrop #I #K2 #V2 #i #Hdi #Hiddee #HLK2 -lapply (transitive_le ? ? (i+e)… Hdde ?) -Hdde /2 width=1/ #Hddie ->commutative_plus in Hiddee; >minus_minus_comm commutative_plus // -Hddie /2 width=1/ -qed. - -lemma sfr_ldrop_trans_ge: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ∀dd,ee. ≽ [dd, ee] L1 → - d + e ≤ dd → ≽ [dd - e, ee] L2. -#L1 #L2 #d #e #HL12 #dd #ee #HL1 #Hddee -@sfr_ldrop #I #K2 #V2 #i #Hddi #Hiddee #HLK2 -elim (le_inv_plus_l … Hddee) -Hddee #Hdde #Hedd ->plus_minus in Hiddee; // #Hiddee -lapply (transitive_le … Hdde Hddi) -Hdde #Hid -lapply (ldrop_trans_ge … HL12 … HLK2 ?) -L2 // -Hid #HL1K2 -@(sfr_inv_ldrop … HL1K2 … HL1) -L1 >commutative_plus /2 width=1/ -qed. diff --git a/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubr_lbotr.ma b/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubr_lbotr.ma new file mode 100644 index 000000000..92593a2ad --- /dev/null +++ b/matita/matita/contribs/lambdadelta/basic_2/substitution/lsubr_lbotr.ma @@ -0,0 +1,73 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "basic_2/substitution/lsubr.ma". + +(* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************) + +(* bottom element of the refinement *) +definition lbotr: nat → nat → predicate lenv ≝ + λd,e. NF_sn … (lsubr d e) (lsubr d e …). + +interpretation + "local environment full refinement (substitution)" + 'SubEqBottom d e L = (lbotr d e L). + +(* Basic properties *********************************************************) + +lemma lbotr_atom: ∀d,e. ⊒[d, e] ⋆. +#d #e #L #H +elim (lsubr_inv_atom2 … H) -H +[ #H destruct // +| * #H1 #H2 destruct // +] +qed. + +lemma lbotr_OO: ∀L. ⊒[0, 0] L. +// qed. + +lemma lbotr_abbr: ∀L,V,e. ⊒[0, e] L → ⊒[0, e + 1] L.ⓓV. +#L #V #e #HL #K #H +elim (lsubr_inv_abbr2 … H ?) -H // commutative_plus in ⊢ (??%??→?); H -H /2 width=1/ ] -Hde -H #V2 #V12 (**) (* H erased two times *) diff --git a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl index 7ebbbca7f..2b88582a7 100644 --- a/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl +++ b/matita/matita/contribs/lambdadelta/basic_2/web/basic_2_src.tbl @@ -235,11 +235,11 @@ table { } ] [ { "basic local env. slicing" * } { - [ "ldrop ( ⇩[?,?] ? ≡ ? )" "ldrop_append" + "ldrop_lpx" + "ldrop_sfr" + "ldrop_ldrop" * ] + [ "ldrop ( ⇩[?,?] ? ≡ ? )" "ldrop_append" + "ldrop_lpx" + "ldrop_lbotr" + "ldrop_ldrop" * ] } ] [ { "local env. ref. for substitution" * } { - [ "lsubr ( ? ⊑[?,?] ? )" "(lsubr_lsubr)" "lsubr_sfr ( ≽[?,?] ? )" * ] + [ "lsubr ( ? ⊑[?,?] ? )" "(lsubr_lsubr)" "lsubr_lbotr ( ⊒[?,?] ? )" * ] } ] [ { "restricted structural predecessor for closures" * } {