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/rt_transition/cpr_tdeq.ma".
16 include "basic_2/rt_transition/cwhx_drops.ma".
17 include "basic_2/rt_transition/cwhx_rdeq.ma".
18 include "basic_2/rt_computation/fsb_aaa.ma".
19 include "basic_2/rt_computation/cpms_cpms.ma".
20 include "basic_2/rt_computation/cpms_fpbg.ma".
22 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
24 (* Properties with whd normality for unbound rt-transition ******************)
26 lemma aaa_cpms_cwhx (h) (G) (L):
27 ∀T1,A. ⦃G,L⦄ ⊢ T1 ⁝ A →
28 ∃∃n,T2. ⦃G,L⦄ ⊢ T1 ➡*[n,h] T2 & ⦃G,L⦄ ⊢ ⬈[h] 𝐖𝐇⦃T2⦄.
30 @(aaa_ind_fpbg h … H) -G -L -T1 -A
31 #G #L #T1 #A * -G -L -T1 -A
32 [ #G #L #s #_ /2 width=4 by cwhx_sort, ex2_2_intro/
33 | * #G #K #V1 #A #_ #IH -A
34 elim (IH … G K V1) [2,4: /3 width=1 by fpb_fpbg, fpb_fqu, fqu_lref_O/ ] -IH #n #V2 #HV12 #HV2
35 elim (lifts_total … V2 (𝐔❴1❵)) #T2 #HVT2
36 /5 width=10 by cpms_ell, cpms_delta, cwhx_lifts, drops_refl, drops_drop, ex2_2_intro/
37 | #I #G #K #A #i #_ #IH -A
38 elim (IH … G K (#i)) [| /3 width=1 by fpb_fpbg, fpb_fqu/ ] -IH #n #V2 #HV12 #HV2
39 elim (lifts_total … V2 (𝐔❴1❵)) #T2 #HVT2
40 /5 width=10 by cpms_lref, cwhx_lifts, drops_refl, drops_drop, ex2_2_intro/
41 | * #G #L #V #T1 #B #A #_ #_ #IH -B -A
42 [ elim (cpr_abbr_pos h G L V T1) #T0 #HT10 #HnT10
43 elim (IH G L T0) -IH [| /4 width=2 by fpb_fpbg, cpm_fpb/ ] -HnT10 #n #T2 #HT02 #HT2
44 /3 width=5 by cpms_step_sn, ex2_2_intro/
45 | elim (IH … G (L.ⓓV) T1) -IH [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_bind_dx/ ] #n #T2 #HT12 #HT2
46 /3 width=5 by cwhx_ldef, cpms_bind_dx, ex2_2_intro/
48 | #p #G #L #W #T1 #B #A #_ #_ #_ -B -A
49 /2 width=5 by cwhx_abst, ex2_2_intro/
50 | #G #L #V #T1 #B #A #_ #HT1 #IH
51 elim (IH … G L T1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #n1 #T2 #HT12 #HT2
52 elim (tdeq_dec T1 T2) [ -n1 #HT12 | -HT2 #HnT12 ]
53 [ lapply (tdeq_cwhx_trans … HT2 … HT12) -T2
54 @(insert_eq_0 … L) #Y @(insert_eq_0 … T1) #X * -Y -X
55 [ #L0 #s0 #H1 #H2 destruct -IH
56 lapply (aaa_inv_sort … HT1) -HT1 #H destruct
57 | #p #L0 #W0 #T0 #H1 #H2 destruct -HT1
58 elim (IH G L0 (ⓓ{p}ⓝW0.V.T0)) -IH [ /4 width=5 by cpms_step_sn, cpm_beta, ex2_2_intro/ ]
59 @fpb_fpbg @fpb_cpx [ /2 width=1 by cpx_beta/ ] #H
60 elim (tdeq_inv_pair … H) -H #H #_ #_ destruct
61 | #L0 #V0 #T0 #_ #H1 #H2 destruct -HT1
62 elim (lifts_total V (𝐔❴1❵)) #W #HVW
63 elim (IH G L0 (-ⓓV0.ⓐW.T0)) -IH [ /4 width=5 by cpms_step_sn, cpm_theta, ex2_2_intro/ ]
64 @fpb_fpbg @fpb_cpx [ /2 width=3 by cpx_theta/ ] #H
65 elim (tdeq_inv_pair … H) -H #H #_ #_ destruct
67 | elim (IH G L (ⓐV.T2)) -IH [ /4 width=5 by cpms_trans, cpms_appl_dx, ex2_2_intro/ ]
68 @(cpms_tdneq_fwd_fpbg … n1) [ /2 width=3 by cpms_appl_dx/ ] #H
69 elim (tdeq_inv_pair … H) -H #_ #_ #H /2 width=1 by/
71 | #G #L #U #T1 #A #_ #_ #IH -A
72 elim (IH … G L T1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #n #T2 #HT12 #HT2
73 /3 width=4 by cpms_eps, ex2_2_intro/