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 "static_2/syntax/teqg.ma".
16 include "static_2/relocation/lifts_lifts.ma".
18 (* GENERIC RELOCATION FOR TERMS *********************************************)
20 (* Properties with generic equivalence for terms ****************************)
22 lemma teqg_lifts_sn (S):
23 liftable2_sn (teqg S).
24 #S #T1 #T2 #H elim H -T1 -T2 [||| * ]
25 [ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort1 … H) -H
26 /3 width=3 by lifts_sort, teqg_sort, ex2_intro/
27 | #i #f #X #H elim (lifts_inv_lref1 … H) -H
28 /3 width=3 by lifts_lref, teqg_lref, ex2_intro/
29 | #l #f #X #H >(lifts_inv_gref1 … H) -H
30 /2 width=3 by lifts_gref, teqg_gref, ex2_intro/
31 | #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H
32 #W1 #U1 #HVW1 #HTU1 #H destruct
33 elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
34 /3 width=5 by lifts_bind, teqg_pair, ex2_intro/
35 | #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H
36 #W1 #U1 #HVW1 #HTU1 #H destruct
37 elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
38 /3 width=5 by lifts_flat, teqg_pair, ex2_intro/
42 (**) (* symmetry not needed *)
43 lemma teqg_lifts_dx (S):
44 symmetric … S → liftable2_dx (teqg S).
45 /3 width=3 by teqg_lifts_sn, liftable2_sn_dx, teqg_sym/ qed-.
47 lemma teqg_lifts_bi (S):
48 liftable2_bi (teqg S).
49 /3 width=6 by teqg_lifts_sn, liftable2_sn_bi/ qed-.
51 (* Inversion lemmas with sort-irrelevant equivalence for terms **************)
53 lemma teqg_inv_lifts_sn (S):
54 deliftable2_sn (teqg S).
55 #S #U1 #U2 #H elim H -U1 -U2 [||| * ]
56 [ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort2 … H) -H
57 /3 width=3 by lifts_sort, teqg_sort, ex2_intro/
58 | #i #f #X #H elim (lifts_inv_lref2 … H) -H
59 /3 width=3 by lifts_lref, teqg_lref, ex2_intro/
60 | #l #f #X #H >(lifts_inv_gref2 … H) -H
61 /2 width=3 by lifts_gref, teqg_gref, ex2_intro/
62 | #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H
63 #V1 #T1 #HVW1 #HTU1 #H destruct
64 elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
65 /3 width=5 by lifts_bind, teqg_pair, ex2_intro/
66 | #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H
67 #V1 #T1 #HVW1 #HTU1 #H destruct
68 elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
69 /3 width=5 by lifts_flat, teqg_pair, ex2_intro/
73 (**) (* symmetry not needed *)
74 lemma teqg_inv_lifts_dx (S):
75 symmetric … S → deliftable2_dx (teqg S).
76 /3 width=3 by teqg_inv_lifts_sn, deliftable2_sn_dx, teqg_sym/ qed-.
78 lemma teqg_inv_lifts_bi (S):
79 deliftable2_bi (teqg S).
80 /3 width=6 by teqg_inv_lifts_sn, deliftable2_sn_bi/ qed-.
82 lemma teqg_lifts_inv_pair_sn (S) (I) (f):
83 ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛[S] X → ⊥.
84 #S #I #f #X #T #H elim H -f -X -T
86 elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
88 elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
90 elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
91 | #f #p #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
92 elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct
94 | #f #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
95 elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct