]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/fpr/fpcs_fpcs.etc
components: arity, csuba
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / fpr / fpcs_fpcs.etc
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/fprs_fprs.ma".
16 include "basic_2/conversion/fpc_fpc.ma".
17 include "basic_2/equivalence/fpcs_fprs.ma".
18
19 (* CONTEXT-FREE PARALLEL EQUIVALENCE ON CLOSURES ****************************)
20
21 (* Advanced inversion lemmas ************************************************)
22
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
26 [ /3 width=4/
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/
31   ]
32 ]
33 qed-.
34
35 (* Advanced properties ******************************************************)
36
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/
40 qed-.
41
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/
45 qed-.
46
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/
50 qed-.
51
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⦄.
55 /3 width=4/ qed.
56
57 (* Main properties **********************************************************)
58
59 theorem fpcs_trans: bi_transitive … fpcs.
60 /2 width=4/ qed.
61
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 *)
64
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 *)