]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/i_static/rexs_lex.ma
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / i_static / rexs_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_tc.ma".
16 include "static_2/static/req_fqup.ma".
17 include "static_2/static/req_fsle.ma".
18 include "static_2/i_static/rexs_fqup.ma".
19
20 (* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***)
21
22 (* Properties with generic extension of a context sensitive relation ********)
23
24 lemma rexs_lex: ∀R. c_reflexive … R →
25                 ∀L1,L2,T. L1 ⪤[CTC … R] L2 → L1 ⪤*[R, T] L2.
26 #R #HR #L1 #L2 #T *
27 /5 width=7 by rexs_tc, sex_inv_tc_dx, sex_co, ext2_inv_tc, ext2_refl/
28 qed.
29
30 lemma rexs_lex_req: ∀R. c_reflexive … R →
31                     ∀L1,L. L1 ⪤[CTC … R] L → ∀L2,T. L ≡[T] L2 →
32                     L1 ⪤*[R, T] L2.
33 /3 width=3 by rexs_lex, rexs_step_dx, req_fwd_rex/ qed.
34
35 (* Inversion lemmas with generic extension of a context sensitive relation **)
36
37 (* Note: s_rs_transitive_lex_inv_isid could be invoked in the last auto but makes it too slow *)
38 lemma rexs_inv_lex_req: ∀R. c_reflexive … R →
39                         rex_fsge_compatible R →
40                         s_rs_transitive … R (λ_.lex R) →
41                         req_transitive R →
42                         ∀L1,L2,T. L1 ⪤*[R, T] L2 →
43                         ∃∃L. L1 ⪤[CTC … R] L & L ≡[T] L2.
44 #R #H1R #H2R #H3R #H4R #L1 #L2 #T #H
45 lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R
46 @(rexs_ind_sn … H1R … H) -H -L2
47 [ /4 width=3 by req_refl, lex_refl, inj, ex2_intro/
48 | #L0 #L2 #_ #HL02 * #L * #f0 #Hf0 #HL1 #HL0
49   lapply (req_rex_trans … HL0 … HL02) -L0 // * #f1 #Hf1 #HL2
50   elim (sex_sdj_split … ceq_ext … HL2 f0 ?) -HL2
51   [ #L0 #HL0 #HL02 |*: /2 width=1 by ext2_refl, sdj_isid_dx/ ]
52   lapply (sex_sdj … HL0 f1 ?) /2 width=1 by sdj_isid_sn/ #H
53   elim (frees_sex_conf … Hf1 … H) // -H2R -H #f2 #Hf2 #Hf21
54   lapply (sle_sex_trans … HL02 … Hf21) -f1 // #HL02
55   lapply (sex_co ?? cfull (CTC … (cext2 R)) … HL1) -HL1 /2 width=1 by ext2_inv_tc/ #HL1
56   /8 width=11 by sex_inv_tc_dx, sex_tc_dx, sex_co, ext2_tc, ext2_refl, step, ex2_intro/ (**) (* full auto too slow *)
57 ]
58 qed-.