]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/static/rex_lex.ma
e43cd5459c428d767a8f8596c26c37da0c3dc2fc
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / static / rex_lex.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "static_2/relocation/lex.ma".
16 include "static_2/static/rex_fsle.ma".
17 include "static_2/static/req.ma".
18
19 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
20
21 (* Properties with generic extension of a context-sensitive relation ********)
22
23 lemma rex_lex (R):
24       ∀L1,L2. L1 ⪤[R] L2 → ∀T. L1 ⪤[R,T] L2.
25 #R #L1 #L2 * #f #Hf #HL12 #T
26 elim (frees_total L1 T) #g #Hg
27 /4 width=5 by sex_sdj, sdj_isid_sn, ex2_intro/
28 qed.
29
30 (* Inversion lemmas with generic extension of a context sensitive relation **)
31
32 lemma rex_inv_req_lex (R):
33       c_reflexive … R → f_confluent1_next R ceq →
34       ∀L1,L2,T. L1 ⪤[R,T] L2 →
35       ∃∃L. L1 ≡[T] L & L ⪤[R] L2.
36 #R #H1R #H2R #L1 #L2 #T * #f1 #Hf1 #HL
37 elim (sex_sdj_split_dx … ceq_ext … HL 𝐢) -HL
38 [ #L0 #HL10 #HL02
39   lapply (sex_sdj … HL02 f1 ?) /2 width=1 by sdj_isid_sn/ #H
40   /3 width=5 by (* 2x *) ex2_intro/
41 |*: /2 width=1 by ext2_refl, sdj_isid_dx/
42   #g #I #K #n #HLK #Hg @H2R /width=7 by/ (**) (* no auto with H2R *)
43 ]
44 qed-.
45
46 (* Forward lemmas with generic extension of a context sensitive relation **)
47
48 lemma rex_fwd_lex_req (R):
49       c_reflexive … R → rex_fsge_compatible R →
50       ∀L1,L2,T. L1 ⪤[R,T] L2 →
51       ∃∃L. L1 ⪤[R] L & L ≡[T] L2.
52 #R #H1R #H2R #L1 #L2 #T * #f1 #Hf1 #HL
53 elim (sex_sdj_split_sn … ceq_ext … HL 𝐢 ?) -HL
54 [ #L0 #HL10 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ] -H1R
55 lapply (sex_sdj … HL10 f1 ?) /2 width=1 by sdj_isid_sn/ #H
56 elim (frees_sex_conf_fsge … Hf1 … H) // -H2R -H #f0 #Hf0 #Hf01
57 /4 width=7 by sle_sex_trans, (* 2x *) ex2_intro/
58 qed-.