]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/relocation/lifts_teqo.ma
partial commit in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / relocation / lifts_teqo.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/syntax/teqo.ma".
16 include "static_2/relocation/lifts_lifts.ma".
17
18 (* GENERIC RELOCATION FOR TERMS *********************************************)
19
20 (* Properties with sort-irrelevant outer equivalence for terms **************)
21
22 lemma teqo_lifts_sn: liftable2_sn teqo.
23 #T1 #T2 #H elim H -T1 -T2 [||| * ]
24 [ #s1 #s2 #f #X #H
25   >(lifts_inv_sort1 … H) -H
26   /2 width=3 by teqo_sort, ex2_intro/
27 | #i #f #X #H
28   elim (lifts_inv_lref1 … H) -H #j #Hj #H destruct
29   /3 width=3 by teqo_lref, lifts_lref, ex2_intro/
30 | #l #f #X #H
31   >(lifts_inv_gref1 … H) -H
32   /2 width=3 by teqo_gref, ex2_intro/
33 | #p #I #V1 #V2 #T1 #T2 #f #X #H
34   elim (lifts_inv_bind1 … H) -H #W1 #U1 #_ #_ #H destruct -V1 -T1
35   elim (lifts_total V2 f) #W2 #HVW2
36   elim (lifts_total T2 (⫯f)) #U2 #HTU2
37   /3 width=3 by teqo_pair, lifts_bind, ex2_intro/
38 | #I #V1 #V2 #T1 #T2 #f #X #H
39   elim (lifts_inv_flat1 … H) -H #W1 #U1 #_ #_ #H destruct -V1 -T1
40   elim (lifts_total V2 f) #W2 #HVW2
41   elim (lifts_total T2 f) #U2 #HTU2
42   /3 width=3 by teqo_pair, lifts_flat, ex2_intro/
43 ]
44 qed-.
45
46 lemma teqo_lifts_dx: liftable2_dx teqo.
47 /3 width=3 by teqo_lifts_sn, liftable2_sn_dx, teqo_sym/ qed-.
48
49 lemma teqo_lifts_bi: liftable2_bi teqo.
50 /3 width=6 by teqo_lifts_sn, liftable2_sn_bi/ qed-.
51
52 (* Inversion lemmas with sort-irrelevant outer equivalence for terms ********)
53
54 lemma teqo_inv_lifts_bi: deliftable2_bi teqo.
55 #U1 #U2 #H elim H -U1 -U2 [||| * ]
56 [ #s1 #s2 #f #X1 #H1 #X2 #H2
57   >(lifts_inv_sort2 … H1) -H1 >(lifts_inv_sort2 … H2) -H2
58   /1 width=1 by teqo_sort/
59 | #j #f #X1 #H1 #X2 #H2
60   elim (lifts_inv_lref2 … H1) -H1 #i1 #Hj1 #H destruct
61   elim (lifts_inv_lref2 … H2) -H2 #i2 #Hj2 #H destruct
62   <(pr_pat_inj … Hj2 … Hj1) -j -f -i1
63   /1 width=1 by teqo_lref/
64 | #l #f #X1 #H1 #X2 #H2
65   >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2
66   /1 width=1 by teqo_gref/
67 | #p #I #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2
68   elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1
69   elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2
70   /1 width=1 by teqo_pair/
71 | #I #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2
72   elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1
73   elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2
74   /1 width=1 by teqo_pair/
75 ]
76 qed-.