]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/relocation/lex_lex.ma
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / relocation / lex_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
17 (* GENERIC ENTRYWISE EXTENSION OF CONTEXT-SENSITIVE REALTIONS FOR TERMS *****)
18
19 (* Main properties **********************************************************)
20
21 (* Basic_2A1: was: lpx_sn_trans *)
22 theorem lex_trans (R): lex_transitive R R → Transitive … (lex R).
23 #R #HR #L1 #L #H @(lex_ind … H) -L1 -L //
24 [ #I #K1 #K #HK1 #IH #Y #H
25   elim (lex_inv_unit_sn … H) -H #K2 #K2 #H destruct
26   /3 width=1 by lex_unit/
27 | #I #K1 #L #V1 #V #HK1 #IH #HV1 #X #H
28   elim (lex_inv_pair_sn … H) -H #K2 #V2 #HK2 #HV2 #H destruct
29   /3 width=5 by lex_pair/
30 ]
31 qed-.
32
33 (* Basic_2A1: was: lpx_sn_conf *)
34 theorem lex_conf (R1) (R2): lex_confluent R1 R2 → confluent2 … (lex R1) (lex R2).
35 #R1 #R2 #HR12 #L0 elim L0 -L0 [| #K0 * ]
36 [ #Y1 #H1 #Y2 #H2
37   >(lex_inv_atom_sn … H1) -Y1
38   >(lex_inv_atom_sn … H2) -Y2
39   /2 width=3 by lex_atom, ex2_intro/
40 | #I #IH #Y1 #H1 #Y2 #H2
41   elim (lex_inv_unit_sn … H1) -H1 #K1 #HK01 #H destruct
42   elim (lex_inv_unit_sn … H2) -H2 #K2 #HK02 #H destruct
43   elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2
44   /3 width=3 by lex_unit, ex2_intro/
45 | #I #V0 #IH #Y1 #H1 #Y2 #H2
46   elim (lex_inv_pair_sn … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
47   elim (lex_inv_pair_sn … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct
48   elim (HR12 … HV01 … HV02 … HK01 … HK02) -V0 #V #HV1 #HV2
49   elim (IH … HK01 … HK02) -K0 #K #HK1 #HK2
50   /3 width=5 by lex_pair, ex2_intro/
51 ]
52 qed-.