]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/computation/csn_vector.ma
bddaaa89de3028d51c17d46f3910054d6a18c488
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / computation / csn_vector.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/grammar/term_vector.ma".
16 include "Basic_2/computation/csn.ma".
17
18 (* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
19
20 inductive csnv (L:lenv): predicate (list term) ≝
21 | csnv_nil: csnv L ◊
22 | csn_cons: ∀Ts,T. L  ⊢ ⬇* T → csnv L Ts → csnv L (T :: Ts)
23 .
24
25 interpretation
26    "context-sensitive strong normalization (term vector)"
27    'SN L Ts = (csnv L Ts).
28
29 (* Basic inversion lemmas ***************************************************)
30
31 fact csnv_inv_cons_aux: ∀L,Ts. L ⊢ ⬇* Ts → ∀U,Us. Ts = U :: Us →
32                         L ⊢ ⬇* U ∧ L ⊢ ⬇* Us.
33 #L #Ts * -Ts
34 [ #U #Us #H destruct
35 | #Ts #T #HT #HTs #U #Us #H destruct /2 width=1/
36 ]
37 qed.
38
39 lemma csnv_inv_cons: ∀L,T,Ts. L ⊢ ⬇* T :: Ts → L ⊢ ⬇* T ∧ L ⊢ ⬇* Ts.
40 /2 width=3/ qed-.
41
42 include "Basic_2/computation/csn_cpr.ma".
43
44 lemma csn_fwd_applv: ∀L,T,Vs. L ⊢ ⬇* Ⓐ Vs. T → L ⊢ ⬇* Vs ∧ L ⊢ ⬇* T.
45 #L #T #Vs elim Vs -Vs /2 width=1/
46 #V #Vs #IHVs #HVs
47 lapply (csn_fwd_pair_sn … HVs) #HV
48 lapply (csn_fwd_flat_dx … HVs) -HVs #HVs
49 elim (IHVs HVs) -IHVs -HVs /3 width=1/
50 qed-.