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 "basic_2/static/ssta_lift.ma".
16 include "basic_2/unwind/sstas.ma".
18 (* ITERATED STRATIFIED STATIC TYPE ASSIGNMENTON TERMS ***********************)
20 (* Advanced properties ******************************************************)
22 lemma sstas_total_S: ∀h,g,L,l,T,U. ⦃h, L⦄ ⊢ T•[g, l + 1]U →
23 ∃∃W. ⦃h, L⦄ ⊢ T •*[g] W & ⦃h, L⦄ ⊢ U •*[g] W.
24 #h #g #L #l @(nat_ind_plus … l) -l
26 elim (ssta_fwd_correct … HTU) /4 width=4/
28 elim (ssta_fwd_correct … HTU) <minus_plus_m_m #V #HUV
29 elim (IHl … HUV) -IHl -HUV /3 width=4/
33 (* Properties on relocation *************************************************)
35 lemma sstas_lift: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
36 ∀L2,d,e. ⇩[d, e] L2 ≡ L1 → ∀T2. ⇧[d, e] T1 ≡ T2 →
37 ∀U2. ⇧[d, e] U1 ≡ U2 → ⦃h, L2⦄ ⊢ T2 •*[g] U2.
38 #h #g #L1 #T1 #U1 #H @(sstas_ind_alt … H) -T1
39 [ #T1 #HUT1 #L2 #d #e #HL21 #X #HX #U2 #HU12
40 >(lift_mono … HX … HU12) -X
41 elim (lift_total T1 d e) /3 width=10/
42 | #T0 #U0 #l0 #HTU0 #_ #IHU01 #L2 #d #e #HL21 #T2 #HT02 #U2 #HU12
43 elim (lift_total U0 d e) /3 width=10/
47 lemma sstas_inv_lift1: ∀h,g,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 →
48 ∀L1,d,e. ⇩[d, e] L2 ≡ L1 → ∀T1. ⇧[d, e] T1 ≡ T2 →
49 ∃∃U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 & ⇧[d, e] U1 ≡ U2.
50 #h #g #L2 #T2 #U2 #H @(sstas_ind_alt … H) -T2
51 [ #T2 #HUT2 #L1 #d #e #HL21 #U1 #HU12
52 elim (ssta_inv_lift1 … HUT2 … HL21 … HU12) -HUT2 -HL21 /3 width=3/
53 | #T0 #U0 #l0 #HTU0 #_ #IHU01 #L1 #d #e #HL21 #U1 #HU12
54 elim (ssta_inv_lift1 … HTU0 … HL21 … HU12) -HTU0 -HU12 #U #HU1 #HU0
55 elim (IHU01 … HL21 … HU0) -IHU01 -HL21 -U0 /3 width=4/