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/multiple/fleq.ma".
16 include "basic_2/reduction/fpbu.ma".
17 include "basic_2/computation/fpbs_alt.ma".
19 (* "QRST" PARALLEL COMPUTATION FOR CLOSURES *********************************)
21 (* Properties on extended context-sensitive parallel computation for terms **)
23 lemma fpbs_cpx_trans_neq: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ →
24 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, g] U2 → (T2 = U2 → ⊥) →
25 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ≥[h, g] ⦃G2, L2, U2⦄.
26 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2 elim (fpbs_inv_alt … H) -H
27 #L00 #L0 #T0 #HT10 #H10 #HL00 #HL02 lapply (lleq_cpx_trans … HTU2 … HL02) -HTU2
28 #HTU2 lapply (cpx_lleq_conf_sn … HTU2 … HL02) -HL02
29 #HL02 lapply (lpxs_cpx_trans … HTU2 … HL00) -HTU2
30 #HTU2 elim (fqus_cpxs_trans_neq … H10 … HTU2 HnTU2) -H10 -HTU2 -HnTU2
31 #U0 #HTU0 #HnTU0 #HU02 elim (eq_term_dec T1 T0) #HnT10 destruct
32 [ -HT10 elim (cpxs_neq_inv_step_sn … HTU0 HnTU0) -HTU0 -HnTU0
33 | -HnTU0 elim (cpxs_neq_inv_step_sn … HT10 HnT10) -HT10 -HnT10
35 /4 width=10 by fpbs_intro_alt, cpxs_trans, ex3_intro/
38 (* Properties on "rst" proper parallel reduction on closures ****************)
40 lemma fpbu_fpbs: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ →
41 ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄.
42 /3 width=1 by fpb_fpbs, fpbu_fwd_fpb/ qed.
44 lemma fpbs_fpbu_sn: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ →
45 ⦃G1, L1, T1⦄ ≡[0] ⦃G2, L2, T2⦄ ∨
46 ∃∃G,L,T. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G, L, T⦄ & ⦃G, L, T⦄ ≥[h, g] ⦃G2, L2, T2⦄.
48 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1
49 [ /2 width=1 by or_introl/
50 | #G1 #G #L1 #L #T1 #T #H1 #_ * [ #H2 | * #G0 #L0 #T0 #H0 #H02 ]
51 elim (fpb_fpbu … H1) -H1 #H1
54 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H elim(fpbs_inv_alt … H) -H
55 #L0 #L #T #HT1 #HT2 #HL0 #HL2 elim (eq_term_dec T1 T) #H destruct
56 [ -HT1 elim (fqus_inv_gen … HT2) -HT2
57 [ #H elim (fqup_inv_step_sn … H) -H
58 /4 width=11 by fpbs_intro_alt, fpbu_fqu, ex2_3_intro, or_intror/
59 | * #HG #HL #HT destruct elim (lleq_dec T2 L0 L 0) #H
60 [ /4 width=3 by fleq_intro, lleq_trans, or_introl/
61 | elim (lpxs_nlleq_inv_step_sn … HL0 H) -HL0 -H
62 /5 width=7 by lpxs_lleq_fpbs, fpbu_lpx, lleq_trans, ex2_3_intro, or_intror/
65 | elim (cpxs_neq_inv_step_sn … HT1 H) -HT1 -H
66 /5 width=11 by fpbs_intro_alt, fpbu_cpx, ex2_3_intro, or_intror/