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_ssta.ma".
16 include "basic_2/unfold/lsstas_lift.ma".
18 (* NAT-ITERATED STRATIFIED STATIC TYPE ASSIGNMENT FOR TERMS *****************)
20 (* Main properties **********************************************************)
22 theorem lsstas_trans: ∀h,g,G,L. ltransitive … (lsstas h g G L).
23 /2 width=3 by lstar_ltransitive/ qed-.
25 theorem lsstas_mono: ∀h,g,G,L,l. singlevalued … (lsstas h g G L l).
26 /3 width=7 by ssta_mono, lstar_singlevalued/ qed-.
28 theorem lsstas_conf_le: ∀h,g,G,L,T,U1,l1. ⦃G, L⦄ ⊢ T •*[h, g, l1] U1 →
29 ∀U2,l2. l1 ≤ l2 → ⦃G, L⦄ ⊢ T •*[h, g, l2] U2 →
30 ⦃G, L⦄ ⊢ U1 •*[h, g, l2 - l1] U2.
31 #h #g #G #L #T #U1 #l1 #HTU1 #U2 #l2 #Hl12
32 >(plus_minus_m_m … Hl12) in ⊢ (%→?); -Hl12 >commutative_plus #H
33 elim (lsstas_split … H) -H #U #HTU
34 >(lsstas_mono … HTU … HTU1) -T //
37 (* Advanced properties ******************************************************)
39 lemma lsstas_ssta_conf_pos: ∀h,g,G,L,T,U1. ⦃G, L⦄ ⊢ T •[h, g] U1 →
40 ∀U2,l. ⦃G, L⦄ ⊢ T •*[h, g, l+1] U2 → ⦃G, L⦄ ⊢ U1 •*[h, g, l] U2.
41 #h #g #G #L #T #U1 #HTU1 #U2 #l #HTU2
42 lapply (lsstas_conf_le … T U1 1 … HTU2) -HTU2 // /2 width=1/
45 lemma lsstas_strip_pos: ∀h,g,G,L,T1,U1. ⦃G, L⦄ ⊢ T1 •[h, g] U1 →
46 ∀T2,l. ⦃G, L⦄ ⊢ T1 •*[h, g, l+1] T2 →
47 ∃∃U2. ⦃G, L⦄ ⊢ T2 •[h, g] U2 & ⦃G, L⦄ ⊢ U1 •*[h, g, l+1] U2.
48 #h #g #G #L #T1 #U1 #HTU1 #T2 #l #HT12
49 elim (lsstas_fwd_correct … HTU1 … HT12)
50 lapply (lsstas_ssta_conf_pos … HTU1 … HT12) -T1 /3 width=5/