X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fstatic_2%2Frelocation%2Fsex.ma;h=47912ace088d171406a07842e3ed6c36bcb6cb69;hp=2a6946fcab7ac6441c2109b34fbdfa422e9b625c;hb=98e786e1a6bd7b621e37ba7cd4098d4a0a6f8278;hpb=5d9f7ae4bad2b5926f615141c12942b9a8eb23fb diff --git a/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma b/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma index 2a6946fca..47912ace0 100644 --- a/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma +++ b/matita/matita/contribs/lambdadelta/static_2/relocation/sex.ma @@ -19,7 +19,7 @@ include "static_2/syntax/lenv.ma". (* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****) -inductive sex (RN,RP:relation3 lenv bind bind): rtmap → relation lenv ≝ +inductive sex (RN,RP:relation3 lenv bind bind): pr_map → relation lenv ≝ | sex_atom: ∀f. sex RN RP f (⋆) (⋆) | sex_next: ∀f,I1,I2,L1,L2. sex RN RP f L1 L2 → RN L1 I1 I2 → @@ -37,7 +37,7 @@ definition R_pw_transitive_sex: relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ + relation3 pr_map lenv bind ≝ λR1,R2,R3,RN,RP,f,L1,I1. ∀I. R1 L1 I1 I → ∀L2. L1 ⪤[RN,RP,f] L2 → ∀I2. R2 L2 I I2 → R3 L1 I1 I2. @@ -45,7 +45,7 @@ definition R_pw_transitive_sex: definition R_pw_confluent1_sex: relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ + relation3 pr_map lenv bind ≝ λR1,R2,RN,RP,f,L1,I1. ∀I2. R1 L1 I1 I2 → ∀L2. L1 ⪤[RN,RP,f] L2 → R2 L2 I1 I2. @@ -53,7 +53,7 @@ definition R_pw_confluent2_sex: relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ + relation3 pr_map lenv bind ≝ λR1,R2,RN1,RP1,RN2,RP2,f,L0,I0. ∀I1. R1 L0 I0 I1 → ∀I2. R2 L0 I0 I2 → ∀L1. L0 ⪤[RN1,RP1,f] L1 → ∀L2. L0 ⪤[RN2,RP2,f] L2 → @@ -63,7 +63,7 @@ definition R_pw_replace3_sex: relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → relation3 lenv bind bind → - relation3 rtmap lenv bind ≝ + relation3 pr_map lenv bind ≝ λR1,R2,RN1,RP1,RN2,RP2,f,L0,I0. ∀I1. R1 L0 I0 I1 → ∀I2. R2 L0 I0 I2 → ∀L1. L0 ⪤[RN1,RP1,f] L1 → ∀L2. L0 ⪤[RN2,RP2,f] L2 → @@ -87,9 +87,9 @@ fact sex_inv_next1_aux (RN) (RP): ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & Y = K2.ⓘ[J2]. #RN #RP #f #X #Y * -f -X -Y [ #f #g #J1 #K1 #H destruct -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_next … H2) -g destruct +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(eq_inv_pr_next_bi … H2) -g destruct /2 width=5 by ex3_2_intro/ -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_push_next … H) +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (eq_inv_pr_push_next … H) ] qed-. @@ -104,8 +104,8 @@ fact sex_inv_push1_aux (RN) (RP): ∃∃J2,K2. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & Y = K2.ⓘ[J2]. #RN #RP #f #X #Y * -f -X -Y [ #f #g #J1 #K1 #H destruct -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (discr_next_push … H) -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(injective_push … H2) -g destruct +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J1 #K1 #_ #H elim (eq_inv_pr_next_push … H) +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J1 #K1 #H1 #H2 <(eq_inv_pr_push_bi … H2) -g destruct /2 width=5 by ex3_2_intro/ ] qed-. @@ -131,9 +131,9 @@ fact sex_inv_next2_aux (RN) (RP): ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RN K1 J1 J2 & X = K1.ⓘ[J1]. #RN #RP #f #X #Y * -f -X -Y [ #f #g #J2 #K2 #H destruct -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_next … H2) -g destruct +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(eq_inv_pr_next_bi … H2) -g destruct /2 width=5 by ex3_2_intro/ -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_push_next … H) +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (eq_inv_pr_push_next … H) ] qed-. @@ -148,8 +148,8 @@ fact sex_inv_push2_aux (RN) (RP): ∃∃J1,K1. K1 ⪤[RN,RP,g] K2 & RP K1 J1 J2 & X = K1.ⓘ[J1]. #RN #RP #f #X #Y * -f -X -Y [ #f #J2 #K2 #g #H destruct -| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (discr_next_push … H) -| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(injective_push … H2) -g destruct +| #f #I1 #I2 #L1 #L2 #_ #_ #g #J2 #K2 #_ #H elim (eq_inv_pr_next_push … H) +| #f #I1 #I2 #L1 #L2 #HL #HI #g #J2 #K2 #H1 #H2 <(eq_inv_pr_push_bi … H2) -g destruct /2 width=5 by ex3_2_intro/ ] qed-. @@ -180,7 +180,7 @@ lemma sex_inv_tl (RN) (RP): ∀f,I1,I2,L1,L2. L1 ⪤[RN,RP,⫰f] L2 → RN L1 I1 I2 → RP L1 I1 I2 → L1.ⓘ[I1] ⪤[RN,RP,f] L2.ⓘ[I2]. -#RN #RP #f #I1 #I2 #L2 #L2 elim (pn_split f) * +#RN #RP #f #I1 #I2 #L2 #L2 elim (pr_map_split_tl f) * /2 width=1 by sex_next, sex_push/ qed-. @@ -190,14 +190,14 @@ lemma sex_fwd_bind (RN) (RP): ∀f,I1,I2,L1,L2. L1.ⓘ[I1] ⪤[RN,RP,f] L2.ⓘ[I2] → L1 ⪤[RN,RP,⫰f] L2. #RN #RP #f #I1 #I2 #L1 #L2 #Hf -elim (pn_split f) * #g #H destruct +elim (pr_map_split_tl f) * #g #H destruct [ elim (sex_inv_push … Hf) | elim (sex_inv_next … Hf) ] -Hf // qed-. (* Basic properties *********************************************************) lemma sex_eq_repl_back (RN) (RP): - ∀L1,L2. eq_repl_back … (λf. L1 ⪤[RN,RP,f] L2). + ∀L1,L2. pr_eq_repl_back … (λf. L1 ⪤[RN,RP,f] L2). #RN #RP #L1 #L2 #f1 #H elim H -f1 -L1 -L2 // #f1 #I1 #I2 #L1 #L2 #_ #HI #IH #f2 #H [ elim (eq_inv_nx … H) -H /3 width=3 by sex_next/ @@ -206,15 +206,15 @@ lemma sex_eq_repl_back (RN) (RP): qed-. lemma sex_eq_repl_fwd (RN) (RP): - ∀L1,L2. eq_repl_fwd … (λf. L1 ⪤[RN,RP,f] L2). -#RN #RP #L1 #L2 @eq_repl_sym /2 width=3 by sex_eq_repl_back/ (**) (* full auto fails *) + ∀L1,L2. pr_eq_repl_fwd … (λf. L1 ⪤[RN,RP,f] L2). +#RN #RP #L1 #L2 @pr_eq_repl_sym /2 width=3 by sex_eq_repl_back/ (**) (* full auto fails *) qed-. lemma sex_refl (RN) (RP): c_reflexive … RN → c_reflexive … RP → ∀f.reflexive … (sex RN RP f). #RN #RP #HRN #HRP #f #L generalize in match f; -f elim L -L // -#L #I #IH #f elim (pn_split f) * +#L #I #IH #f elim (pr_map_split_tl f) * #g #H destruct /2 width=1 by sex_next, sex_push/ qed. @@ -246,8 +246,8 @@ lemma sex_co_isid (RN1) (RP1) (RN2) (RP2): L1 ⪤[RN2,RP2,f] L2. #RN1 #RP1 #RN2 #RP2 #HR #f #L1 #L2 #H elim H -f -L1 -L2 // #f #I1 #I2 #K1 #K2 #_ #HI12 #IH #H -[ elim (isid_inv_next … H) -H // -| /4 width=3 by sex_push, isid_inv_push/ +[ elim (pr_isi_inv_next … H) -H // +| /4 width=3 by sex_push, pr_isi_inv_push/ ] qed-. @@ -257,9 +257,9 @@ lemma sex_sdj (RN) (RP): ∀f2. f1 ∥ f2 → L1 ⪤[RP,RN,f2] L2. #RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 -[ elim (sdj_inv_nx … H12) -H12 [2,3: // ] +[ elim (pr_sdj_inv_next_sn … H12) -H12 [2,3: // ] #g2 #H #H2 destruct /3 width=1 by sex_push/ -| elim (sdj_inv_px … H12) -H12 [2,4: // ] * +| elim (pr_sdj_inv_push_sn … H12) -H12 [2,4: // ] * #g2 #H #H2 destruct /3 width=1 by sex_next, sex_push/ ] qed-. @@ -270,10 +270,10 @@ lemma sle_sex_trans (RN) (RP): ∀f1. f1 ⊆ f2 → L1 ⪤[RN,RP,f1] L2. #RN #RP #HR #f2 #L1 #L2 #H elim H -f2 -L1 -L2 // #f2 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f1 #H12 -[ elim (pn_split f1) * ] -[ /4 width=5 by sex_push, sle_inv_pn/ -| /4 width=5 by sex_next, sle_inv_nn/ -| elim (sle_inv_xp … H12) -H12 [2,3: // ] +[ elim (pr_map_split_tl f1) * ] +[ /4 width=5 by sex_push, pr_sle_inv_push_next/ +| /4 width=5 by sex_next, pr_sle_inv_next_bi/ +| elim (pr_sle_inv_push_dx … H12) -H12 [2,3: // ] #g1 #H #H1 destruct /3 width=5 by sex_push/ ] qed-. @@ -284,10 +284,10 @@ lemma sle_sex_conf (RN) (RP): ∀f2. f1 ⊆ f2 → L1 ⪤[RN,RP,f2] L2. #RN #RP #HR #f1 #L1 #L2 #H elim H -f1 -L1 -L2 // #f1 #I1 #I2 #L1 #L2 #_ #HI12 #IH #f2 #H12 -[2: elim (pn_split f2) * ] -[ /4 width=5 by sex_push, sle_inv_pp/ -| /4 width=5 by sex_next, sle_inv_pn/ -| elim (sle_inv_nx … H12) -H12 [2,3: // ] +[2: elim (pr_map_split_tl f2) * ] +[ /4 width=5 by sex_push, pr_sle_inv_push_bi/ +| /4 width=5 by sex_next, pr_sle_inv_push_next/ +| elim (pr_sle_inv_next_sn … H12) -H12 [2,3: // ] #g2 #H #H2 destruct /3 width=5 by sex_next/ ] qed-. @@ -299,9 +299,9 @@ lemma sex_sle_split_sn (R1) (R2) (RP): #R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 [ /2 width=3 by sex_atom, ex2_intro/ ] #f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H -[ elim (sle_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct +[ elim (pr_sle_inv_next_sn … H ??) -H [ |*: // ] #g #Hfg #H destruct elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, ex2_intro/ -| elim (sle_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct +| elim (pr_sle_inv_push_sn … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ ] qed-. @@ -313,9 +313,9 @@ lemma sex_sdj_split_sn (R1) (R2) (RP): #R1 #R2 #RP #HR1 #HR2 #f #L1 #L2 #H elim H -f -L1 -L2 [ /2 width=3 by sex_atom, ex2_intro/ ] #f #I1 #I2 #L1 #L2 #_ #HI12 #IH #y #H -[ elim (sdj_inv_nx … H ??) -H [ |*: // ] #g #Hfg #H destruct +[ elim (pr_sdj_inv_next_sn … H ??) -H [ |*: // ] #g #Hfg #H destruct elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ -| elim (sdj_inv_px … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct +| elim (pr_sdj_inv_push_sn … H ??) -H [1,3: * |*: // ] #g #Hfg #H destruct elim (IH … Hfg) -IH -Hfg /3 width=5 by sex_next, sex_push, ex2_intro/ ] qed-. @@ -332,7 +332,7 @@ lemma sex_dec (RN) (RP): lapply (sex_inv_atom2 … H) -H #H destruct | #L2 #I2 #f elim (IH L2 (⫰f)) -IH #HL12 [2: /4 width=3 by sex_fwd_bind, or_intror/ ] - elim (pn_split f) * #g #H destruct + elim (pr_map_split_tl f) * #g #H destruct [ elim (HRP L1 I1 I2) | elim (HRN L1 I1 I2) ] -HRP -HRN #HV12 [1,3: /3 width=1 by sex_push, sex_next, or_introl/ ] @or_intror #H