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 set "baseuri" "cic:/matita/LAMBDA-TYPES/Unified-Sub/Lift/props".
17 include "Lift/inv.ma".
19 theorem lift_conf: \forall l,i,t,x. Lift l i t x \to
20 \forall y. Lift l i t y \to
22 intros 5. elim H; clear H i t x;
23 [ lapply linear lift_inv_sort_1 to H1.
25 | lapply linear lift_inv_lref_1 to H2.
27 [ auto | lapply nle_false to H2, H1. decompose ]
28 | lapply linear lift_inv_lref_1 to H3.
30 [ lapply linear nle_false to H1, H3. decompose
31 | lapply linear nplus_conf to H2, H4. subst. auto
33 | lapply linear lift_inv_bind_1 to H5.
34 decompose. subst. auto.
35 | lapply linear lift_inv_flat_1 to H5.
36 decompose. subst. auto.
40 theorem lift_comp_le: \forall l1,i1,t,y. (Lift l1 i1 t y) \to
41 \forall l2,i2,x. (Lift l2 i2 t x) \to
42 \forall z. (Lift l2 i2 y z) \to
43 i2 <= i1 \to \forall i. (l2 + i1 == i) \to
45 intros 5. elim H; clear H i1 t y;
46 [ lapply lift_conf to H1, H2. clear H2. subst.
47 lapply linear lift_inv_sort_1 to H1.
49 | lapply lift_conf to H2, H3. clear H3. subst.
50 lapply linear lift_inv_lref_1 to H2.
51 decompose; subst; clear H2 H4 i2;
52 [ lapply linear nle_nplus to H5 as H0. clear l2. (**)
53 lapply linear nle_trans to H1, H0.
55 | lapply nle_nplus_comp_lt_2 to H3, H5; auto.
57 | lapply linear lift_inv_lref_1 to H3.
59 [ clear H2 H4 H6 n3 l2.
60 lapply linear nle_trans to H3, H5 as H0.
61 lapply linear nle_false to H1, H0. decompose
62 | lapply linear lift_inv_lref_1 to H4.
64 [ clear H1 H5 H6 H7 n1.
65 lapply linear nle_nplus to H2 as H0. (**)
66 lapply linear nle_trans to H3, H0 as H2.
67 lapply linear nle_false to H2, H4. decompose
69 lapply nle_nplus_comp to H6, H7; auto.