]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/etc_2A1/fpr/lfpr_alt.etc
- degree-based equivalene for terms
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc_2A1 / fpr / lfpr_alt.etc
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/fpr/lfpr_alt.etc b/matita/matita/contribs/lambdadelta/basic_2/etc_2A1/fpr/lfpr_alt.etc
new file mode 100644 (file)
index 0000000..95ec60b
--- /dev/null
@@ -0,0 +1,87 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||M||                                                             *)
+(*      ||A||       A project by Andrea Asperti                           *)
+(*      ||T||                                                             *)
+(*      ||I||       Developers:                                           *)
+(*      ||T||         The HELM team.                                      *)
+(*      ||A||         http://helm.cs.unibo.it                             *)
+(*      \   /                                                             *)
+(*       \ /        This file is distributed under the terms of the       *)
+(*        v         GNU General Public License Version 2                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+notation "hvbox( L1 ⊢ ➡ ➡ break term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'PRedSnAlt $L1 $L2 }.
+
+notation "hvbox( ⦃ term 46 L1 ⦄ ➡ ➡ break ⦃ term 46 L2 ⦄ )"
+   non associative with precedence 45
+   for @{ 'FocalizedPRedAlt $L1 $L2 }.
+
+include "basic_2/grammar/lenv_px_bi.ma".
+include "basic_2/reducibility/fpr_cpr.ma".
+include "basic_2/reducibility/lfpr_fpr.ma".
+
+(* FOCALIZED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS **********************)
+
+(* alternative definition *)
+definition lfpra: relation lenv ≝ lpx_bi fpr.
+
+interpretation
+  "focalized parallel reduction (environment) alternative"
+  'FocalizedPRedAlt L1 L2 = (lfpra L1 L2).
+
+(* Basic properties *********************************************************)
+
+lemma lfpra_refl: reflexive … lfpra.
+/2 width=1/ qed.
+
+lemma fpr_lfpra: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ➡ ⦃L2, T2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
+#L1 elim L1 -L1
+[ #L2 #T1 #T2 #H
+  elim (fpr_inv_atom1 … H) -H #_ #H destruct //
+| #L1 #I #V1 #IH #L2 #T1 #T2 #H
+  elim (fpr_inv_pair1 … H) -H #L #V #HV1 #HL1 #H destruct /3 width=3/
+]
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma lfpra_inv_atom1: ∀L2. ⦃⋆⦄ ➡➡ ⦃L2⦄ → L2 = ⋆.
+/2 width=2 by lpx_bi_inv_atom1/ qed-.
+
+lemma lfpra_inv_pair1: ∀K1,I,V1,L2. ⦃K1. ⓑ{I} V1⦄ ➡➡ ⦃L2⦄ →
+                       ∃∃K2,V2. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
+                                L2 = K2. ⓑ{I} V2.
+/2 width=1 by lpx_bi_inv_pair1/ qed-.
+
+lemma lfpra_inv_atom2: ∀L1. ⦃L1⦄ ➡➡ ⦃⋆⦄ → L1 = ⋆.
+/2 width=2 by lpx_bi_inv_atom2/ qed-.
+
+lemma lfpra_inv_pair2: ∀L1,K2,I,V2. ⦃L1⦄ ➡➡ ⦃K2. ⓑ{I} V2⦄ →
+                       ∃∃K1,V1. ⦃K1⦄ ➡➡ ⦃K2⦄ & ⦃K1, V1⦄ ➡ ⦃K2, V2⦄ &
+                                L1 = K1. ⓑ{I} V1.
+/2 width=1 by lpx_bi_inv_pair2/ qed-.
+
+lemma lfpra_inv_fpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ∀T.⦃L1, T⦄ ➡ ⦃L2, T⦄.
+#L1 #L2 * -L1 -L2 // /3 width=1/
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma lfpra_fwd_length: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → |L1| = |L2|.
+/2 width=2 by lpx_bi_fwd_length/ qed-.
+
+(* Main properties **********************************************************)
+
+theorem lfpr_lfpra: ∀L1,L2. ⦃L1⦄ ➡ ⦃L2⦄ → ⦃L1⦄ ➡➡ ⦃L2⦄.
+#L1 #L2 #H
+lapply (lfpr_inv_fpr … H (⋆0)) -H /2 width=3/
+qed.
+
+theorem lfpra_lfpr: ∀L1,L2. ⦃L1⦄ ➡➡ ⦃L2⦄ → ⦃L1⦄ ➡ ⦃L2⦄.
+#L1 #L2 #H
+lapply (lfpra_inv_fpr … H (⋆0)) -H /2 width=3/
+qed-.