1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/relocation/lexs_lexs.ma".
16 include "basic_2/static/frees_fqup.ma".
17 include "basic_2/static/frees_frees.ma".
18 include "basic_2/static/lfxs.ma".
20 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
22 (* Main properties **********************************************************)
24 theorem lfxs_bind: ∀R,p,I,L1,L2,V1,V2,T.
25 L1 ⦻*[R, V1] L2 → L1.ⓑ{I}V1 ⦻*[R, T] L2.ⓑ{I}V2 →
26 L1 ⦻*[R, ⓑ{p,I}V1.T] L2.
27 #R #p #I #L1 #L2 #V1 #V2 #T * #f1 #HV #Hf1 * #f2 #HT #Hf2
28 elim (lexs_fwd_pair … Hf2) -Hf2 #Hf2 #_ elim (sor_isfin_ex f1 (⫱f2))
29 /3 width=7 by frees_fwd_isfin, frees_bind, lexs_join, isfin_tl, ex2_intro/
32 theorem lfxs_flat: ∀R,I,L1,L2,V,T.
33 L1 ⦻*[R, V] L2 → L1 ⦻*[R, T] L2 →
35 #R #I #L1 #L2 #V #T * #f1 #HV #Hf1 * #f2 #HT #Hf2 elim (sor_isfin_ex f1 f2)
36 /3 width=7 by frees_fwd_isfin, frees_flat, lexs_join, ex2_intro/
39 theorem lfxs_conf: ∀R1,R2.
40 lexs_frees_confluent R1 cfull →
41 lexs_frees_confluent R2 cfull →
42 R_confluent2_lfxs R1 R2 R1 R2 →
43 ∀T. confluent2 … (lfxs R1 T) (lfxs R2 T).
44 #R1 #R2 #HR1 #HR2 #HR12 #T #L0 #L1 * #f1 #Hf1 #HL01 #L2 * #f #Hf #HL02
45 lapply (frees_mono … Hf1 … Hf) -Hf1 #Hf12
46 lapply (lexs_eq_repl_back … HL01 … Hf12) -f1 #HL01
47 elim (lexs_conf … HL01 … HL02) /2 width=3 by ex2_intro/ [ | -HL01 -HL02 ]
49 elim (HR1 … Hf … HL01) -HL01 #f1 #Hf1 #H1
50 elim (HR2 … Hf … HL02) -HL02 #f2 #Hf2 #H2
51 lapply (sle_lexs_trans … HL1 … H1) // -HL1 -H1 #HL1
52 lapply (sle_lexs_trans … HL2 … H2) // -HL2 -H2 #HL2
53 /3 width=5 by ex2_intro/
54 | #g #I #K0 #V0 #n #HLK0 #Hgf #V1 #HV01 #V2 #HV02 #K1 #HK01 #K2 #HK02
55 elim (frees_drops_next … Hf … HLK0 … Hgf) -Hf -HLK0 -Hgf #g0 #Hg0 #H0
56 lapply (sle_lexs_trans … HK01 … H0) // -HK01 #HK01
57 lapply (sle_lexs_trans … HK02 … H0) // -HK02 #HK02
58 elim (HR12 … HV01 … HV02 K1 … K2) /2 width=3 by ex2_intro/