X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambda%2Fpaths%2Flabeled_st_reduction.ma;fp=matita%2Fmatita%2Fcontribs%2Flambda%2Fpaths%2Flabeled_st_reduction.ma;h=0000000000000000000000000000000000000000;hb=aa9654656f7d0aeb9345e0b86a9e35f861687580;hp=2f93b35afda99911f8c82f7df482c457e1b18e07;hpb=637ff9311e16f1d58e03d873f84c354e1cf1e716;p=helm.git diff --git a/matita/matita/contribs/lambda/paths/labeled_st_reduction.ma b/matita/matita/contribs/lambda/paths/labeled_st_reduction.ma deleted file mode 100644 index 2f93b35af..000000000 --- a/matita/matita/contribs/lambda/paths/labeled_st_reduction.ma +++ /dev/null @@ -1,217 +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 "subterms/booleanized.ma". -include "paths/labeled_sequential_reduction.ma". -include "paths/standard_order.ma". - -(* PATH-LABELED STANDARD REDUCTION ON SUBTERMS (SINGLE STEP) ****************) - -(* Note: this is standard reduction on marked redexes, - left residuals are unmarked in the reductum -*) -inductive pl_st: path → relation subterms ≝ -| pl_st_beta : ∀V,T. pl_st (◊) ({⊤}@V.{⊤}𝛌.T) ([↙V]T) -| pl_st_abst : ∀b,p,T1,T2. pl_st p T1 T2 → pl_st (rc::p) ({b}𝛌.T1) ({⊥}𝛌.T2) -| pl_st_appl_sn: ∀b,p,V1,V2,T. pl_st p V1 V2 → pl_st (sn::p) ({b}@V1.T) ({⊥}@V2.{⊥}⇕T) -| pl_st_appl_dx: ∀b,p,V,T1,T2. pl_st p T1 T2 → pl_st (dx::p) ({b}@V.T1) ({b}@V.T2) -. - -interpretation "path-labeled standard reduction" - 'Std F p G = (pl_st p F G). - -notation "hvbox( F break Ⓡ ↦ [ term 46 p ] break term 46 G )" - non associative with precedence 45 - for @{ 'Std $F $p $G }. - -lemma pl_st_fwd_pl_sred: ∀p,F1,F2. F1 Ⓡ↦[p] F2 → ⇓F1 ↦[p] ⇓F2. -#p #F1 #F2 #H elim H -p -F1 -F2 normalize /2 width=1/ -qed-. - -lemma pl_st_inv_vref: ∀p,F,G. F Ⓡ↦[p] G → ∀b,i. {b}#i = F → ⊥. -#p #F #G #HFG #b #i #H -lapply (pl_st_fwd_pl_sred … HFG) -HFG #HFG -lapply (eq_f … carrier … H) -H normalize #H -/2 width=6 by pl_sred_inv_vref/ -qed-. - -lemma pl_st_inv_abst: ∀p,F,G. F Ⓡ↦[p] G → ∀c,U1. {c}𝛌.U1 = F → - ∃∃q,U2. U1 Ⓡ↦[q] U2 & rc::q = p & {⊥}𝛌.U2 = G. -#p #F #G * -p -F -G -[ #V #T #c #U1 #H destruct -| #b #p #T1 #T2 #HT12 #c #U1 #H destruct /2 width=5/ -| #b #p #V1 #V2 #T #_ #c #U1 #H destruct -| #b #p #V #T1 #T2 #_ #c #U1 #H destruct -] -qed-. - -lemma pl_st_inv_appl: ∀p,F,G. F Ⓡ↦[p] G → ∀c,W,U. {c}@W.U = F → - ∨∨ (∃∃U0. ⊤ = c & ◊ = p & {⊤}𝛌.U0 = U & [↙W] U0 = G) - | (∃∃q,W0. sn::q = p & W Ⓡ↦[q] W0 & {⊥}@W0.{⊥}⇕U = G) - | (∃∃q,U0. dx::q = p & U Ⓡ↦[q] U0 & {c}@W.U0 = G). -#p #F #G * -p -F -G -[ #V #T #c #W #U #H destruct /3 width=3/ -| #b #p #T1 #T2 #_ #c #W #U #H destruct -| #b #p #V1 #V2 #T #HV12 #c #W #U #H destruct /3 width=5/ -| #b #p #V #T1 #T2 #HT12 #c #W #U #H destruct /3 width=5/ -] -qed-. - -lemma pl_st_fwd_abst: ∀p,F,G. F Ⓡ↦[p] G → ∀c,U2. {c}𝛌.U2 = G → - ◊ = p ∨ ∃q. rc::q = p. -#p #F #G * -p -F -G -[ /2 width=1/ -| /3 width=2/ -| #b #p #V1 #V2 #T #_ #c #U2 #H destruct -| #b #p #V #T1 #T2 #_ #c #U2 #H destruct -] -qed-. - -lemma pl_st_inv_nil: ∀p,F,G. F Ⓡ↦[p] G → ◊ = p → - ∃∃V,T. {⊤}@V.{⊤} 𝛌.T = F & [↙V] T = G. -#p #F #G * -p -F -G -[ #V #T #_ destruct /2 width=4/ -| #b #p #T1 #T2 #_ #H destruct -| #b #p #V1 #V2 #T #_ #H destruct -| #b #p #V #T1 #T2 #_ #H destruct -] -qed-. - -lemma pl_st_inv_rc: ∀p,F,G. F Ⓡ↦[p] G → ∀q. rc::q = p → - ∃∃b,T1,T2. T1 Ⓡ↦[q] T2 & {b}𝛌.T1 = F & {⊥}𝛌.T2 = G. -#p #F #G * -p -F -G -[ #V #T #q #H destruct -| #b #p #T1 #T2 #HT12 #q #H destruct /2 width=6/ -| #b #p #V1 #V2 #T #_ #q #H destruct -| #b #p #V #T1 #T2 #_ #q #H destruct -] -qed-. - -lemma pl_st_inv_sn: ∀p,F,G. F Ⓡ↦[p] G → ∀q. sn::q = p → - ∃∃b,V1,V2,T. V1 Ⓡ↦[q] V2 & {b}@V1.T = F & {⊥}@V2.{⊥}⇕T = G. -#p #F #G * -p -F -G -[ #V #T #q #H destruct -| #b #p #T1 #T2 #_ #q #H destruct -| #b #p #V1 #V2 #T #HV12 #q #H destruct /2 width=7/ -| #b #p #V #T1 #T2 #_ #q #H destruct -] -qed-. - -lemma pl_st_inv_dx: ∀p,F,G. F Ⓡ↦[p] G → ∀q. dx::q = p → - ∃∃b,V,T1,T2. T1 Ⓡ↦[q] T2 & {b}@V.T1 = F & {b}@V.T2 = G. -#p #F #G * -p -F -G -[ #V #T #q #H destruct -| #b #p #T1 #T2 #_ #q #H destruct -| #b #p #V1 #V2 #T #_ #q #H destruct -| #b #p #V #T1 #T2 #HT12 #q #H destruct /2 width=7/ -] -qed-. - -lemma pl_st_inv_pl_sred: ∀p. in_whd p → ∀M1,F2. {⊤}⇑M1 Ⓡ↦[p] F2 → - ∃∃M2. M1 ↦[p] M2 & {⊤}⇑M2 = F2. -#p @(in_whd_ind … p) -p -[ #M1 #F2 #H - elim (pl_st_inv_nil … H …) -H // #V #T #HM1 #H - elim (boolean_inv_appl … (sym_eq … HM1)) -HM1 #B #N #_ #HB #HN #HM1 - elim (boolean_inv_abst … HN) -HN #A #_ #HA #HN destruct /2 width=3/ -| #p #_ #IHp #M1 #F2 #H - elim (pl_st_inv_dx … H …) -H [3: // |2:skip ] #b #V #T1 #T2 #HT12 #HM1 #H (**) (* simplify line *) - elim (boolean_inv_appl … (sym_eq … HM1)) -HM1 #B #A #Hb #HB #HA #HM1 destruct - elim (IHp … HT12) -IHp -HT12 #C #HAC #H destruct - @(ex2_intro … (@B.C)) // /2 width=1/ (**) (* auto needs some help here *) -] -qed-. - -lemma pl_st_lift: ∀p. sliftable (pl_st p). -#p #h #F1 #F2 #H elim H -p -F1 -F2 /2 width=1/ -[ #V #T #d normalize sdsubst_sdsubst_ge // -| #b #p #V1 #V2 #T #_ #IHV12 #d - whd in ⊢ (??%%); <(booleanized_booleanized ⊥) in ⊢ (???(???%));