]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/etc/sta/sta_sta.etc
cfbb192fab6df68598cc6dd149e0a55da4686a1d
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / etc / sta / sta_sta.etc
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/sta.ma".
17
18 (* STATIC TYPE ASSIGNMENT ON TERMS ******************************************)
19
20 (* Main properties **********************************************************)
21
22 (* Note: apparently this was missing in basic_1 *)
23 theorem sta_mono: ∀h,L,T,U1. ⦃h, L⦄ ⊢ T • U1 →
24                   ∀U2. ⦃h, L⦄ ⊢ T • U2 → U1 = U2.
25 #h #L #T #U1 #H elim H -L -T -U1
26 [ #L #k #X #H >(sta_inv_sort1 … H) -X //
27 | #L #K #V #W #U1 #i #HLK #_ #HWU1 #IHVW #U2 #H
28   elim (sta_inv_lref1 … H) -H * #K0 #V0 #W0 #HLK0 #HVW0 #HW0U2
29   lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
30   lapply (IHVW … HVW0) -IHVW -HVW0 #H destruct
31   >(lift_mono … HWU1 … HW0U2) -W0 -U1 //
32 | #L #K #W #V #U1 #i #HLK #_ #HWU1 #IHWV #U2 #H
33   elim (sta_inv_lref1 … H) -H * #K0 #W0 #V0 #HLK0 #HWV0 #HV0U2
34   lapply (ldrop_mono … HLK0 … HLK) -HLK -HLK0 #H destruct
35   lapply (IHWV … HWV0) -IHWV -HWV0 #H destruct
36   >(lift_mono … HWU1 … HV0U2) -W -U1 //
37 | #I #L #V #T #U1 #_ #IHTU1 #X #H
38   elim (sta_inv_bind1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
39 | #L #V #T #U1 #_ #IHTU1 #X #H
40   elim (sta_inv_appl1 … H) -H #U2 #HTU2 #H destruct /3 width=1/
41 | #L #W #T #U1 #_ #IHTU1 #U2 #H
42   lapply (sta_inv_cast1 … H) -H /2 width=1/
43 ]
44 qed-.