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/computation/fprs_fprs.ma".
16 include "basic_2/conversion/fpc_fpc.ma".
17 include "basic_2/equivalence/fpcs_fprs.ma".
19 (* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
21 (* Advanced inversion lemmas ************************************************)
23 lemma fpcs_inv_fprs: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄ →
24 ∃∃L,T. ⦃L1, T1⦄ ➡* ⦃L, T⦄ & ⦃L2, T2⦄ ➡* ⦃L, T⦄.
25 #L1 #L2 #T1 #T2 #H @(fpcs_ind … H) -L2 -T2
27 | #L #L2 #T #T2 #_ #HT2 * #L0 #T0 #HT10 elim HT2 -HT2 #HT2 #HT0
28 [ elim (fprs_strip … HT2 … HT0) -L -T #L #T #HT2 #HT0
29 lapply (fprs_strap1 … HT10 … HT0) -L0 -T0 /2 width=4/
30 | lapply (fprs_strap2 … HT2 … HT0) -L -T /2 width=4/
35 (* Advanced properties ******************************************************)
37 lemma fpr_fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
38 #L #L1 #L2 #T #T1 #T2 #HT1 #HT2
39 elim (fprs_strip … HT2 … HT1) /2 width=4 by fpr_fprs_div/
42 lemma fprs_fpr_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡ ⦃L2, T2⦄ → ⦃L2, T2⦄ ⬌* ⦃L1, T1⦄.
43 #L #L1 #L2 #T #T1 #T2 #HT1 #HT2
44 elim (fprs_strip … HT2 … HT1) /2 width=4 by fprs_fpr_div/
47 lemma fprs_conf: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ➡* ⦃L1, T1⦄ → ⦃L, T⦄ ➡* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
48 #L #L1 #L2 #T #T1 #T2 #HT1 #HT2
49 elim (fprs_conf … HT1 … HT2) /2 width=4/
52 lemma fpcs_strip: ∀L0,L1,T0,T1. ⦃L0, T0⦄ ⬌ ⦃L1, T1⦄ →
53 ∀L2,T2. ⦃L0, T0⦄ ⬌* ⦃L2, T2⦄ →
54 ∃∃L,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ & ⦃L2, T2⦄ ⬌ ⦃L, T⦄.
57 (* Main properties **********************************************************)
59 theorem fpcs_trans: bi_transitive … fpcs.
62 theorem fpcs_canc_sn: ∀L,L1,L2,T,T1,T2. ⦃L, T⦄ ⬌* ⦃L1, T1⦄ → ⦃L, T⦄ ⬌* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
63 /3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)
65 theorem fpcs_canc_dx: ∀L1,L2,L,T1,T2,T. ⦃L1, T1⦄ ⬌* ⦃L, T⦄ → ⦃L2, T2⦄ ⬌* ⦃L, T⦄ → ⦃L1, T1⦄ ⬌* ⦃L2, T2⦄.
66 /3 width=4 by fpcs_trans, fpcs_sym/ qed. (**) (* /3 width=3/ is too slow *)