(* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
definition lfxs (R) (T): relation lenv ≝
- λL1,L2. â\88\83â\88\83f. L1 â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89¡ f & L1 ⪤*[cext2 R, cfull, f] L2.
+ λL1,L2. â\88\83â\88\83f. L1 â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f & L1 ⪤*[cext2 R, cfull, f] L2.
interpretation "generic extension on referred entries (local environment)"
'RelationStar R T L1 L2 = (lfxs R T L1 L2).
-definition R_frees_confluent: predicate (relation3 …) ≝
- λRN.
- ∀f1,L,T1. L ⊢ 𝐅*⦃T1⦄ ≡ f1 → ∀T2. RN L T1 T2 →
- ∃∃f2. L ⊢ 𝐅*⦃T2⦄ ≡ f2 & f2 ⊆ f1.
-
-definition lexs_frees_confluent: relation (relation3 …) ≝
- λRN,RP.
- ∀f1,L1,T. L1 ⊢ 𝐅*⦃T⦄ ≡ f1 →
- ∀L2. L1 ⪤*[RN, RP, f1] L2 →
- ∃∃f2. L2 ⊢ 𝐅*⦃T⦄ ≡ f2 & f2 ⊆ f1.
-
definition R_confluent2_lfxs: relation4 (relation3 lenv term term)
(relation3 lenv term term) … ≝
λR1,R2,RP1,RP2.
∀K1,K,V1. K1 ⪤*[R1, V1] K → ∀V. R1 K1 V1 V →
∀K2. K ⪤*[R2, V] K2 → K ⪤*[R2, V1] K2.
-definition lfxs_transitive: relation3 ? (relation3 ?? term) ? ≝
+definition lfxs_transitive: relation3 ? (relation3 ?? term) … ≝
λR1,R2,R3.
∀K1,K,V1. K1 ⪤*[R1, V1] K →
∀V. R1 K1 V1 V → ∀V2. R2 K V V2 → R3 K1 V1 V2.
]
qed-.
-lemma lfxs_inv_lref: â\88\80R,Y1,Y2,i. Y1 ⪤*[R, #⫯i] Y2 →
+lemma lfxs_inv_lref: â\88\80R,Y1,Y2,i. Y1 ⪤*[R, #â\86\91i] Y2 →
∨∨ Y1 = ⋆ ∧ Y2 = ⋆
| ∃∃I1,I2,L1,L2. L1 ⪤*[R, #i] L2 &
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
]
qed-.
-lemma lfxs_inv_lref_bind_sn: â\88\80R,I1,K1,L2,i. K1.â\93\98{I1} ⪤*[R, #⫯i] L2 →
+lemma lfxs_inv_lref_bind_sn: â\88\80R,I1,K1,L2,i. K1.â\93\98{I1} ⪤*[R, #â\86\91i] L2 →
∃∃I2,K2. K1 ⪤*[R, #i] K2 & L2 = K2.ⓘ{I2}.
#R #I1 #K1 #L2 #i #H elim (lfxs_inv_lref … H) -H *
[ #H destruct
]
qed-.
-lemma lfxs_inv_lref_bind_dx: â\88\80R,I2,K2,L1,i. L1 ⪤*[R, #⫯i] K2.ⓘ{I2} →
+lemma lfxs_inv_lref_bind_dx: â\88\80R,I2,K2,L1,i. L1 ⪤*[R, #â\86\91i] K2.ⓘ{I2} →
∃∃I1,K1. K1 ⪤*[R, #i] K2 & L1 = K1.ⓘ{I1}.
#R #I2 #K2 #L1 #i #H elim (lfxs_inv_lref … H) -H *
[ #_ #H destruct
/4 width=3 by frees_unit, lexs_next, ext2_unit, ex2_intro/ qed.
lemma lfxs_lref: ∀R,I1,I2,L1,L2,i.
- L1 ⪤*[R, #i] L2 â\86\92 L1.â\93\98{I1} ⪤*[R, #⫯i] L2.ⓘ{I2}.
+ L1 ⪤*[R, #i] L2 â\86\92 L1.â\93\98{I1} ⪤*[R, #â\86\91i] L2.ⓘ{I2}.
#R #I1 #I2 #L1 #L2 #i * /3 width=3 by lexs_push, frees_lref, ex2_intro/
qed.
/3 width=5 by lexs_pair_repl, ex2_intro/
qed-.
-lemma lfxs_sym: ∀R. lexs_frees_confluent (cext2 R) cfull →
- (∀L1,L2,T1,T2. R L1 T1 T2 → R L2 T2 T1) →
- ∀T. symmetric … (lfxs R T).
-#R #H1R #H2R #T #L1 #L2 * #f1 #Hf1 #HL12 elim (H1R … Hf1 … HL12) -Hf1
-/5 width=5 by sle_lexs_trans, lexs_sym, cext2_sym, ex2_intro/
-qed-.
-
(* Basic_2A1: uses: llpx_sn_co *)
lemma lfxs_co: ∀R1,R2. (∀L,T1,T2. R1 L T1 T2 → R2 L T1 T2) →
∀L1,L2,T. L1 ⪤*[R1, T] L2 → L1 ⪤*[R2, T] L2.
qed-.
lemma lfxs_isid: ∀R1,R2,L1,L2,T1,T2.
- (â\88\80f. L1 â\8a¢ ð\9d\90\85*â¦\83T1â¦\84 â\89¡ f → 𝐈⦃f⦄) →
- (â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 L1 â\8a¢ ð\9d\90\85*â¦\83T2â¦\84 â\89¡ f) →
+ (â\88\80f. L1 â\8a¢ ð\9d\90\85*â¦\83T1â¦\84 â\89\98 f → 𝐈⦃f⦄) →
+ (â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 L1 â\8a¢ ð\9d\90\85*â¦\83T2â¦\84 â\89\98 f) →
L1 ⪤*[R1, T1] L2 → L1 ⪤*[R2, T2] L2.
#R1 #R2 #L1 #L2 #T1 #T2 #H1 #H2 *
/4 width=7 by lexs_co_isid, ex2_intro/