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⦄.
31 @(aaa_ind_fpbg … o … H) -G -L -T1 -A
32 #G #L #T1 #A * -G -L -T1 -A
33 [ #G #L #s #_ /2 width=4 by cwhx_sort, ex2_2_intro/
34 | * #G #K #V1 #A #_ #IH -A
35 elim (IH … G K V1) [2,4: /3 width=1 by fpb_fpbg, fpb_fqu, fqu_lref_O/ ] -IH #n #V2 #HV12 #HV2
36 elim (lifts_total … V2 (𝐔❴1❵)) #T2 #HVT2
37 /5 width=10 by cpms_ell, cpms_delta, cwhx_lifts, drops_refl, drops_drop, ex2_2_intro/
38 | #I #G #K #A #i #_ #IH -A
39 elim (IH … G K (#i)) [| /3 width=1 by fpb_fpbg, fpb_fqu/ ] -IH #n #V2 #HV12 #HV2
40 elim (lifts_total … V2 (𝐔❴1❵)) #T2 #HVT2
41 /5 width=10 by cpms_lref, cwhx_lifts, drops_refl, drops_drop, ex2_2_intro/
42 | * #G #L #V #T1 #B #A #_ #_ #IH -B -A
43 [ elim (cpr_abbr_pos h o G L V T1) #T0 #HT10 #HnT10
44 elim (IH G L T0) -IH [| /4 width=2 by fpb_fpbg, cpm_fpb/ ] -HnT10 #n #T2 #HT02 #HT2
45 /3 width=5 by cpms_step_sn, ex2_2_intro/
46 | elim (IH … G (L.ⓓV) T1) -IH [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_bind_dx/ ] #n #T2 #HT12 #HT2
47 /3 width=5 by cwhx_ldef, cpms_bind_dx, ex2_2_intro/
49 | #p #G #L #W #T1 #B #A #_ #_ #_ -B -A
50 /2 width=5 by cwhx_abst, ex2_2_intro/
51 | #G #L #V #T1 #B #A #_ #HT1 #IH
52 elim (IH … G L T1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #n1 #T2 #HT12 #HT2
53 elim (tdeq_dec h o T1 T2) [ -n1 #HT12 | -HT2 #HnT12 ]
54 [ lapply (tdeq_cwhx_trans … HT2 … HT12) -T2
55 @(insert_eq_0 … L) #Y @(insert_eq_0 … T1) #X * -Y -X
56 [ #L0 #s0 #H1 #H2 destruct -IH
57 lapply (aaa_inv_sort … HT1) -HT1 #H destruct
58 | #p #L0 #W0 #T0 #H1 #H2 destruct -HT1
59 elim (IH G L0 (ⓓ{p}ⓝW0.V.T0)) -IH [ /4 width=5 by cpms_step_sn, cpm_beta, ex2_2_intro/ ]
60 @fpb_fpbg @fpb_cpx [ /2 width=1 by cpx_beta/ ] #H
61 elim (tdeq_inv_pair … H) -H #H #_ #_ destruct
62 | #L0 #V0 #T0 #_ #H1 #H2 destruct -HT1
63 elim (lifts_total V (𝐔❴1❵)) #W #HVW
64 elim (IH G L0 (-ⓓV0.ⓐW.T0)) -IH [ /4 width=5 by cpms_step_sn, cpm_theta, ex2_2_intro/ ]
65 @fpb_fpbg @fpb_cpx [ /2 width=3 by cpx_theta/ ] #H
66 elim (tdeq_inv_pair … H) -H #H #_ #_ destruct
68 | elim (IH G L (ⓐV.T2)) -IH [ /4 width=5 by cpms_trans, cpms_appl_dx, ex2_2_intro/ ]
69 @(cpms_tdneq_fwd_fpbg … n1) [ /2 width=3 by cpms_appl_dx/ ] #H
70 elim (tdeq_inv_pair … H) -H #_ #_ #H /2 width=1 by/
72 | #G #L #U #T1 #A #_ #_ #IH -A
73 elim (IH … G L T1) [| /3 width=1 by fpb_fpbg, fpb_fqu, fqu_flat_dx/ ] #n #T2 #HT12 #HT2
74 /3 width=4 by cpms_eps, ex2_2_intro/