]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/computation/csn_lcpr_vector.ma
fc8901950c8a8fe0589f5b5a14fbd613f9abddcf
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / computation / csn_lcpr_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/computation/acp_cr.ma".
16 include "basic_2/computation/cprs_tstc_vector.ma".
17 include "basic_2/computation/csn_lcpr.ma".
18 include "basic_2/computation/csn_vector.ma".
19
20 (* CONTEXT-SENSITIVE STRONGLY NORMALIZING TERM VECTORS **********************)
21
22 (* Advanced properties ******************************************************)
23 (*
24 (* Basic_1: was only: sn3_appl_appls *)
25 lemma csn_appl_appls_simple_tstc: ∀L,Vs,V,T1. L ⊢ ⬇* V → L ⊢ ⬇* T1 →
26                                   (∀T2. L ⊢ ⒶVs.T1 ➡* T2 → (ⒶVs.T1 ≃ T2 → False) → L ⊢ ⬇* ⓐV. T2) →
27                                   𝐒[T1] → L ⊢ ⬇* ⓐV. ⒶVs. T1.
28 #L *
29 [ #V #T1 #HV
30   @csn_appl_simple_tstc //
31 | #V0 #Vs #V #T1 #HV #H1T1 #H2T1 #H3T1
32   @csn_appl_simple_tstc // -HV
33   [ @H2T1
34 ]
35 qed.
36 *)
37 lemma csn_applv_theta: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
38                        ∀V,T. L ⊢ ⬇* ⓓV. ⒶV2s. T → L ⊢ ⬇* V →
39                        L ⊢ ⬇* ⒶV1s. ⓓV. T.
40 #L #V1s #V2s * -V1s -V2s /2 width=1/
41 #V1s #V2s #V1 #V2 #HV12 #H 
42 generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
43 elim H -V1s -V2s /2 width=3/
44 #V1s #V2s #V1 #V2 #HV12 #HV12s #IHV12s #W1 #W2 #HW12 #V #T #H #HV
45 lapply (csn_appl_theta … HW12 … H) -H -HW12 #H
46 lapply (csn_fwd_pair_sn … H) #HW1
47 lapply (csn_fwd_flat_dx … H) #H1
48 @csn_appl_simple_tstc // -HW1 /2 width=3/ -IHV12s -HV -H1 #X #H1 #H2
49 elim (cprs_fwd_theta_vector … (V2::V2s) … H1) -H1 /2 width=1/ -HV12s -HV12
50 [ -H #H elim (H2 ?) -H2 //
51 | -H2 #H1 @(csn_cprs_trans … H) -H /2 width=1/
52 ]
53 qed.
54
55 lemma csn_applv_tau: ∀L,W. L ⊢ ⬇* W →
56                      ∀Vs,T. L ⊢ ⬇* ⒶVs. T →
57                      L ⊢ ⬇* ⒶVs. ⓣW. T.
58 #L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
59 #V #Vs #IHV #T #H1T
60 lapply (csn_fwd_pair_sn … H1T) #HV
61 lapply (csn_fwd_flat_dx … H1T) #H2T
62 @csn_appl_simple_tstc // -HV /2 width=1/ -IHV -H2T
63 [ #X #H #H0
64   elim (cprs_fwd_tau_vector … H) -H #H
65   [ -H1T elim (H0 ?) -H0 //
66   | -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
67   ]
68 | -H1T elim Vs -Vs //
69 ]
70 qed.
71 (*
72 theorem csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬇* T).
73 @mk_acr //
74 [
75 |
76 |
77 | #L #V1 #V2 #HV12 #V #T #H #HVT
78   @(csn_applv_theta … HV12) -HV12 //
79   @(csn_abbr) //
80 | /2 width=1/
81 | @csn_lift
82 ]
83 qed.
84 *)
85 axiom csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬇* T).