]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/ssta_ssta.ma
- lambda_delta: programmed renaming to lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / ssta_ssta.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 "basic_2/substitution/ldrop_ldrop.ma".
16 include "basic_2/static/ssta.ma".
17
18 (* STRATIFIED STATIC TYPE ASSIGNMENT ON TERMS *******************************)
19
20 (* Main properties **********************************************************)
21
22 (* Note: apparently this was missing in basic_1 *)
23 theorem ssta_mono: ∀h,g,L,T,U1,l1. ⦃h, L⦄ ⊢ T •[g, l1] U1 →
24                    ∀U2,l2. ⦃h, L⦄ ⊢ T •[g, l2] U2 → l1 = l2 ∧ U1 = U2.
25 #h #g #L #T #U1 #l1 #H elim H -L -T -U1 -l1
26 [ #L #k #l #Hkl #X #l2 #H
27   elim (ssta_inv_sort1 … H) -H #Hkl2 #H destruct
28   >(deg_mono … Hkl2 … Hkl) -g -L -l2 /2 width=1/
29 | #L #K #V #W #U1 #i #l1 #HLK #_ #HWU1 #IHVW #U2 #l2 #H
30   elim (ssta_inv_lref1 … H) -H * #K0 #V0 #W0 [2: #l0] #HLK0 #HVW0 #HW0U2
31   lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
32   lapply (IHVW … HVW0) -IHVW -HVW0 * #H1 #H2 destruct
33   >(lift_mono … HWU1 … HW0U2) -W0 -U1 /2 width=1/
34 | #L #K #W #V #U1 #i #l1 #HLK #_ #HWU1 #IHWV #U2 #l2 #H
35   elim (ssta_inv_lref1 … H) -H * #K0 #W0 #V0 [2: #l0 ] #HLK0 #HWV0 #HV0U2
36   lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
37   lapply (IHWV … HWV0) -IHWV -HWV0 * #H1 #H2 destruct
38   >(lift_mono … HWU1 … HV0U2) -W -U1 /2 width=1/
39 | #a #I #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
40   elim (ssta_inv_bind1 … H) -H #U2 #HTU2 #H destruct
41   elim (IHTU1 … HTU2) -T /3 width=1/
42 | #L #V #T #U1 #l1 #_ #IHTU1 #X #l2 #H
43   elim (ssta_inv_appl1 … H) -H #U2 #HTU2 #H destruct
44   elim (IHTU1 … HTU2) -T /3 width=1/
45 | #L #W1 #T #U1 #l1 #_ #IHTU1 #U2 #l2 #H
46   lapply (ssta_inv_cast1 … H) -H #HTU2
47   elim (IHTU1 … HTU2) -T /2 width=1/
48 ]
49 qed-.