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_trans: ∀R. lexs_frees_confluent R cfull →
40 ∀T. Transitive … (lfxs R T).
41 #R #H1R #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
42 elim (H1R … Hf1 … HL1) #f #H0 #H1
43 lapply (frees_mono … Hf2 … H0) -Hf2 -H0 #Hf2
44 lapply (lexs_eq_repl_back … HL2 … Hf2) -f2 #HL2
45 lapply (sle_lexs_trans … HL1 … H1) -HL1 // #Hl1
48 /4 width=7 by lreq_trans, lexs_eq_repl_back, ex2_intro/
51 theorem lfxs_conf: ∀R. lexs_frees_confluent R cfull →
52 R_confluent2_lfxs R R R R →
53 ∀T. confluent … (lfxs R T).
54 #R #H1R #H2R #T #L0 #L1 * #f1 #Hf1 #HL01 #L2 * #f #Hf #HL02
55 lapply (frees_mono … Hf1 … Hf) -Hf1 #Hf12
56 lapply (lexs_eq_repl_back … HL01 … Hf12) -f1 #HL01
57 elim (lexs_conf … HL01 … HL02) /2 width=3 by ex2_intro/ [ | -HL01 -HL02 ]
59 elim (H1R … Hf … HL01) -HL01 #f1 #Hf1 #H1
60 elim (H1R … Hf … HL02) -HL02 #f2 #Hf2 #H2
61 lapply (sle_lexs_trans … HL1 … H1) // -HL1 -H1 #HL1
62 lapply (sle_lexs_trans … HL2 … H2) // -HL2 -H2 #HL2
63 /3 width=5 by ex2_intro/
64 | #g #I #K0 #V0 #n #HLK0 #Hgf #V1 #HV01 #V2 #HV02 #K1 #HK01 #K2 #HK02
65 elim (frees_drops_next … Hf … HLK0 … Hgf) -Hf -HLK0 -Hgf #g0 #Hg0 #H0
66 lapply (sle_lexs_trans … HK01 … H0) // -HK01 #HK01
67 lapply (sle_lexs_trans … HK02 … H0) // -HK02 #HK02
68 elim (H2R … HV01 … HV02 K1 … K2) /2 width=3 by ex2_intro/