]> matita.cs.unibo.it Git - helm.git/commitdiff
work in progress on a new definition of voids ...
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Fri, 1 Dec 2017 14:00:04 +0000 (14:00 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Fri, 1 Dec 2017 14:00:04 +0000 (14:00 +0000)
matita/matita/contribs/lambdadelta/basic_2/notation/functions/voidstar_2.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/notation/relations/rvoidstar_4.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/static/fle.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/voids_length.ma

diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/functions/voidstar_2.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/functions/voidstar_2.ma
deleted file mode 100644 (file)
index 4c95b41..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-(**************************************************************************)
-(*       ___                                                              *)
-(*      ||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 FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ⓧ* [ term 46 n ] term 46 L )"
-   non associative with precedence 46
-   for @{ 'VoidStar $n $L }.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rvoidstar_4.ma b/matita/matita/contribs/lambdadelta/basic_2/notation/relations/rvoidstar_4.ma
new file mode 100644 (file)
index 0000000..f9b03f6
--- /dev/null
@@ -0,0 +1,19 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ⓧ* [ term 46 n1 ] term 46 L1 ≋ ⓧ* [ term 46 n2 ] term 46 L2 )"
+   non associative with precedence 45
+   for @{ 'RVoidStar $n1 $L1 $n2 $L2 }.
index 1a0a83d6b9abafe62323a51cc84437b0d13a2d43..7340a8abc5b8ee924dc7a1809128481f13f46003 100644 (file)
@@ -19,13 +19,13 @@ include "basic_2/static/frees.ma".
 
 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
 
-inductive fle (T2) (L2) (T1): predicate lenv ≝
-| fle_intro: ∀f1,f2,L1,n. ⓧ*[n]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 → L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 →
-             |L1| = |L2| → ⫱*[n]f1 ⊆ f2 → fle T2 L2 T1 (ⓧ*[n]L1)
+inductive fle (T1) (T2): relation lenv ≝
+| fle_intro: ∀f1,f2,L1,L2,n1,n2. ⓧ*[n1]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 → ⓧ*[n2]L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 →
+             |L1| = |L2| → ⫱*[n1]f1 ⊆ ⫱*[n2]f2 → fle T1 T2 (ⓧ*[n1]L1) (ⓧ*[n2]L2)
 .
 
 interpretation "free variables inclusion (restricted closure)"
-   'SubSetEq L1 T1 L2 T2 = (fle T2 L2 T1 L1).
+   'SubSetEq L1 T1 L2 T2 = (fle T1 T2 L1 L2).
 
 (* Basic properties *********************************************************)
 
@@ -37,11 +37,15 @@ lemma fle_gref: ∀L1,L2. |L1| = |L2| → ∀l1,l2. ⦃L1, §l1⦄ ⊆ ⦃L2, §
 
 (* Basic inversion lemmas ***************************************************)
 
-fact fle_inv_voids_sn_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                           ∀K1,n. |K1| = |L2| → L1 = ⓧ*[n]K1 →
-                           ∃∃f1,f2. ⓧ*[n]K1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n]f1 ⊆ f2.
-#L1 #L2 #T1 #T2 * -L1 #f1 #f2 #L1 #n #Hf1 #Hf2 #HL12 #Hf12 #Y #x #HY #H destruct
-elim (voids_inj_length … H) // -H -HL12 -HY #H1 #H2 destruct
+fact fle_inv_voids_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
+                        ∀K1,K2,n1,n2. |K1| = |K2| → L1 = ⓧ*[n1]K1 → L2 = ⓧ*[n2]K2 →
+                        ∃∃f1,f2. ⓧ*[n1]K1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & ⓧ*[n2]K2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
+#L1 #L2 #T1 #T2 * -L1 -L2
+#f1 #f2 #L1 #L2 #n1 #n2 #Hf1 #Hf2 #HL12 #Hf12 #Y1 #Y2 #x1 #x2 #HY12 #H1 #H2 destruct
+>H1 in Hf1; >H2 in Hf2; #Hf2 #Hf1
+@(ex3_2_intro … Hf1 Hf2) -Hf1 -Hf2
+
+elim (voids_inj_length … H1) // -H -HL12 -HY #H1 #H2 destruct
 /2 width=5 by ex3_2_intro/
 qed-.
 
index 766eefd5c2ccfa8c1027b62cfb4b7ded9bffc94e..8c58fd478cb203bfebee9ad77a523b30994162b6 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/functions/voidstar_2.ma".
+include "basic_2/notation/relations/rvoidstar_4.ma".
 include "basic_2/syntax/lenv.ma".
 
-(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
+(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
 
-rec definition voids (L:lenv) (n:nat) on n: lenv ≝ match n with
-[ O ⇒ L | S m ⇒ (voids L m).ⓧ ].
+inductive voids: bi_relation nat lenv ≝
+| voids_atom   : voids 0 (⋆) 0 (⋆)
+| voids_pair_sn: ∀I1,I2,K1,K2,V1,n. voids n K1 n K2 →
+                 voids 0 (K1.ⓑ{I1}V1) 0 (K2.ⓘ{I2})
+| voids_pair_dx: ∀I1,I2,K1,K2,V2,n. voids n K1 n K2 →
+                 voids 0 (K1.ⓘ{I1}) 0 (K2.ⓑ{I2}V2)
+| voids_void_sn: ∀K1,K2,n1,n2. voids n1 K1 n2 K2 →
+                 voids (⫯n1) (K1.ⓧ) n2 K2
+| voids_void_dx: ∀K1,K2,n1,n2. voids n1 K1 n2 K2 →
+                 voids n1 K1 (⫯n2) (K2.ⓧ)
+.
 
-interpretation "extension with exclusion binders (local environment)"
-   'VoidStar n L = (voids L n).
+interpretation "equivalence up to exclusion binders (local environment)"
+   'RVoidStar n1 L1 n2 L2 = (voids n1 L1 n2 L2).
 
 (* Basic properties *********************************************************)
 
+lemma voids_refl: ∀L. ∃n. ⓧ*[n]L ≋ ⓧ*[n]L.
+#L elim L -L /2 width=2 by ex_intro, voids_atom/
+#L #I * #n #IH cases I -I /3 width=2 by ex_intro, voids_pair_dx/
+* /4 width=2 by ex_intro, voids_void_sn, voids_void_dx/
+qed-.
+
+lemma voids_sym: bi_symmetric … voids.
+#n1 #n2 #L1 #L2 #H elim H -L1 -L2 -n1 -n2
+/2 width=2 by voids_atom, voids_pair_sn, voids_pair_dx, voids_void_sn, voids_void_dx/
+qed-.
+
+(*
+
+
+
+
 lemma voids_zero: ∀L. L = ⓧ*[0]L.
 // qed.
 
@@ -46,3 +71,4 @@ theorem voids_inj: ∀n. injective … (λL. ⓧ*[n]L).
 elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
 /2 width=1 by/
 qed-.
+*)
\ No newline at end of file
index 510a05f681ad39fddbccb2a69f165bad68914d3c..30738ee24709f3b42e7ddb6d41bf41de4c0b1e42 100644 (file)
 include "basic_2/syntax/lenv_length.ma".
 include "basic_2/syntax/voids.ma".
 
-(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
+(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
 
-(* Properties with length for local environments ****************************)
+(* Forward lemmas with length for local environments ************************)
 
-lemma length_void: ∀L,n. n+|L| = |ⓧ*[n]L|.
-#L #n elim n -n //
-#n #IH <voids_succ >length_bind <IH -IH //
-qed.
+lemma voids_fwd_length: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 →
+                        |L1| + n2 = |L2| + n1.
+#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize //
+#I1 #I2 #K1 #K2 #V #n #_ #IH 
 
 (* Main forward properties with length for local environments ***************)