]> matita.cs.unibo.it Git - helm.git/commitdiff
update in ground_2 and basic_2
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Sat, 13 Jan 2018 21:24:16 +0000 (22:24 +0100)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Sat, 13 Jan 2018 21:24:16 +0000 (22:24 +0100)
- new version of lveq completed: allows to prove all six main properties of fle, but lfxs_fle fails :(
- voids parked for now
- more ignores for the web site

22 files changed:
.gitignore
matita/matita/contribs/lambdadelta/basic_2/etc/lveq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/voids/lveq_voids.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids_length.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/etc/voids/voidstar_2.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/basic_2/notation/functions/voidstar_2.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/static/fle.ma
matita/matita/contribs/lambdadelta/basic_2/static/fle_drops.ma
matita/matita/contribs/lambdadelta/basic_2/static/fle_fle.ma
matita/matita/contribs/lambdadelta/basic_2/static/fle_fqup.ma
matita/matita/contribs/lambdadelta/basic_2/static/lfxs_fle.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/lveq.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_length.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_lveq.ma
matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_voids.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma [deleted file]
matita/matita/contribs/lambdadelta/basic_2/syntax/voids_length.ma [deleted file]
matita/matita/contribs/lambdadelta/etc2ma.sh
matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_sle.ma
matita/matita/contribs/lambdadelta/ground_2/xoa2.conf.xml
matita/matita/contribs/lambdadelta/ma2etc.sh

index 29933ad99c4040da057373003d860a9c8366fb4e..7ab34bb92666be35cb819c59392ed1dbd537008c 100644 (file)
@@ -45,14 +45,18 @@ helm/www/lambdadelta/etc/BTM
 helm/www/lambdadelta/etc/lambdadelta
 helm/www/lambdadelta/etc/coq-contribs
 helm/www/lambdadelta/xslt/apps_2_src.xsl
+helm/www/lambdadelta/xslt/apps_2_sum.xsl
 helm/www/lambdadelta/xslt/basic_2_blk.xsl
 helm/www/lambdadelta/xslt/basic_2_src.xsl
+helm/www/lambdadelta/xslt/basic_2_sum.xsl
 helm/www/lambdadelta/xslt/ground_2_src.xsl
+helm/www/lambdadelta/xslt/ground_2_sum.xsl
 helm/www/lambdadelta/xslt/basic_1_blk.xsl
 helm/www/lambdadelta/xslt/basic_1_src.xsl
 helm/www/lambdadelta/xslt/basic_1_sum.xsl
 helm/www/lambdadelta/xslt/ground_1_src.xsl
 helm/www/lambdadelta/xslt/ground_1_sum.xsl
+helm/www/lambdadelta/xslt/alpha_1_sum.xsl
 helm/www/lambdadelta/xslt/documentation_1.xsl
 helm/www/lambdadelta/xslt/documentation_2.xsl
 helm/www/lambdadelta/xslt/documentation_3.xsl
@@ -68,3 +72,5 @@ matita/matita/contribs/lambdadelta/apps_2/notation
 matita/matita/contribs/lambdadelta/apps_2/models
 matita/matita/contribs/lambdadelta/ground_2/xoa/xoa2.ma
 matita/matita/contribs/lambdadelta/ground_2/notation/xoa/notation2.ma
+matita/matita/contribs/lambdadelta/*/*_probe.txt
+matita/matita/contribs/lambdadelta/*/web/*_sum.tbl
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/lveq.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/lveq.etc
new file mode 100644 (file)
index 0000000..e355449
--- /dev/null
@@ -0,0 +1,36 @@
+fact lveq_inv_pair_bind_aux: ∀L1,L2,n1,n2. L1 ≋ ⓧ*[n1, n2] L2 →
+                             ∀I1,I2,K1,K2,V1. K1.ⓑ{I1}V1 = L1 → K2.ⓘ{I2} = L2 →
+                             ∨∨ ∃∃m. K1 ≋ ⓧ*[m, m] K2 & 0 = n1 & 0 = n2
+                              | ∃∃m1,m2. K1 ≋ ⓧ*[m1, m2] K2 &
+                                         BUnit Void = I2 & ⫯m2 = n2.
+#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2
+[ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
+|2,3: #I1 #I2 #K1 #K2 #V #n #HK #_ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct /3 width=2 by or_introl, ex3_intro/
+|4,5: #K1 #K2 #n1 #n2 #HK #IH #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
+ /3 width=4 by _/
+]
+qed-.
+
+lemma voids_inv_pair_bind: ∀I1,I2,K1,K2,V1,n1,n2. ⓧ*[n1]K1.ⓑ{I1}V1 ≋ ⓧ*[n2]K2.ⓘ{I2} →
+                           ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
+                            | ∃∃m2. ⓧ*[n1]K1.ⓑ{I1}V1 ≋ ⓧ*[m2]K2 &
+                                    BUnit Void = I2 & ⫯m2 = n2.
+/2 width=5 by voids_inv_pair_bind_aux/ qed-.
+
+fact voids_inv_bind_pair_aux: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 →
+                              ∀I1,I2,K1,K2,V2. K1.ⓘ{I1} = L1 → K2.ⓑ{I2}V2 = L2 →
+                              ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
+                               | ∃∃m1. ⓧ*[m1]K1 ≋ ⓧ*[n2]K2.ⓑ{I2}V2 &
+                                       BUnit Void = I1 & ⫯m1 = n1.
+#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
+[ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
+|2,3: #I1 #I2 #K1 #K2 #V #n #HK #J1 #J2 #L1 #L2 #V2 #H1 #H2 destruct /3 width=2 by or_introl, ex3_intro/
+|4,5: #K1 #K2 #n1 #n2 #HK #J1 #J2 #L1 #L2 #V2 #H1 #H2 destruct /3 width=3 by or_intror, ex3_intro/
+]
+qed-.
+
+lemma voids_inv_bind_pair: ∀I1,I2,K1,K2,V2,n1,n2. ⓧ*[n1]K1.ⓘ{I1} ≋ ⓧ*[n2]K2.ⓑ{I2}V2 →
+                           ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
+                            | ∃∃m1. ⓧ*[m1]K1 ≋ ⓧ*[n2]K2.ⓑ{I2}V2 &
+                                    BUnit Void = I1 & ⫯m1 = n1.
+/2 width=5 by voids_inv_bind_pair_aux/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/voids/lveq_voids.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/voids/lveq_voids.etc
new file mode 100644 (file)
index 0000000..38b2076
--- /dev/null
@@ -0,0 +1,99 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* requires <key name="ex">3 6</key> *)
+include "ground_2/xoa/xoa2.ma".
+include "basic_2/syntax/voids_length.ma".
+include "basic_2/syntax/lveq.ma".
+
+(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
+
+(* Inversion lemmas with extension with exclusion binders *******************)
+
+lemma lveq_inv_voids: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                      ∨∨ ∧∧ ⓧ*[n1]⋆ = L1 & ⓧ*[n2]⋆ = L2
+                       | ∃∃I1,I2,K1,K2,V1,n. K1 ≋ⓧ*[n, n] K2 & ⓧ*[n1](K1.ⓑ{I1}V1) = L1 & ⓧ*[n2](K2.ⓘ{I2}) = L2
+                       | ∃∃I1,I2,K1,K2,V2,n. K1 ≋ⓧ*[n, n] K2 & ⓧ*[n1](K1.ⓘ{I1}) = L1 & ⓧ*[n2](K2.ⓑ{I2}V2) = L2.
+#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2
+[ /3 width=1 by conj, or3_intro0/
+|2,3: /3 width=9 by or3_intro1, or3_intro2, ex3_6_intro/
+|4,5: #K1 #K2 #n1 #n2 #HK12 * *
+   /3 width=9 by conj, or3_intro0, or3_intro1, or3_intro2, ex3_6_intro/
+]
+qed-.
+
+(* Eliminators with extension with exclusion binders ************************)
+
+lemma lveq_ind_voids: ∀R:bi_relation lenv nat. (
+                         ∀n1,n2. R (ⓧ*[n1]⋆) n1 (ⓧ*[n2]⋆) n2
+                      ) → (
+                         ∀I1,I2,K1,K2,V1,n1,n2,n. K1 ≋ⓧ*[n, n] K2 → R K1 n K2 n →
+                         R (ⓧ*[n1]K1.ⓑ{I1}V1) n1 (ⓧ*[n2]K2.ⓘ{I2}) n2
+                      ) → (
+                         ∀I1,I2,K1,K2,V2,n1,n2,n. K1 ≋ⓧ*[n, n] K2 → R K1 n K2 n →
+                         R (ⓧ*[n1]K1.ⓘ{I1}) n1 (ⓧ*[n2]K2.ⓑ{I2}V2) n2
+                      ) →
+                      ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → R L1 n1 L2 n2.
+#R #IH1 #IH2 #IH3 #L1 #L2 @(f2_ind ?? length2 ?? L1 L2) -L1 -L2
+#m #IH #L1 #L2 #Hm #n1 #n2 #H destruct
+elim (lveq_inv_voids … H) -H * //
+#I1 #I2 #K1 #K2 #V #n #HK #H1 #H2 destruct
+/4 width=3 by lt_plus/
+qed-.
+
+(*
+
+(* Properties with extension with exclusion binders *************************)
+
+lemma lveq_voids_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                     ∀m1. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, n2] L2.
+#L1 #L2 #n1 #n2 #HL12 #m1 elim m1 -m1 /2 width=1 by lveq_void_sn/
+qed-.
+
+lemma lveq_voids_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                     ∀m2. L1 ≋ⓧ*[n1, m2+n2] ⓧ*[m2]L2.
+#L1 #L2 #n1 #n2 #HL12 #m2 elim m2 -m2 /2 width=1 by lveq_void_dx/
+qed-.
+
+lemma lveq_voids: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                  ∀m1,m2. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, m2+n2] ⓧ*[m2]L2.
+/3 width=1 by lveq_voids_dx, lveq_voids_sn/ qed-.
+
+lemma lveq_voids_zero: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 →
+                       ∀n1,n2. ⓧ*[n1]L1 ≋ⓧ*[n1, n2] ⓧ*[n2]L2.
+#L1 #L2 #HL12 #n1 #n2
+>(plus_n_O … n1) in ⊢ (?%???); >(plus_n_O … n2) in ⊢ (???%?);
+/2 width=1 by lveq_voids/ qed-.
+
+(* Inversion lemmas with extension with exclusion binders *******************)
+
+lemma lveq_inv_voids_sn: ∀L1,L2,n1,n2,m1. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, n2] L2 →
+                         L1 ≋ⓧ*[n1, n2] L2.
+#L1 #L2 #n1 #n2 #m1 elim m1 -m1 /3 width=1 by lveq_inv_void_sn/
+qed-.
+
+lemma lveq_inv_voids_dx: ∀L1,L2,n1,n2,m2. L1 ≋ⓧ*[n1, m2+n2] ⓧ*[m2]L2 →
+                         L1 ≋ⓧ*[n1, n2] L2.
+#L1 #L2 #n1 #n2 #m2 elim m2 -m2 /3 width=1 by lveq_inv_void_dx/
+qed-.
+
+lemma lveq_inv_voids: ∀L1,L2,n1,n2,m1,m2. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, m2+n2] ⓧ*[m2]L2 →
+                      L1 ≋ⓧ*[n1, n2] L2.
+/3 width=3 by lveq_inv_voids_dx, lveq_inv_voids_sn/ qed-.
+
+lemma lveq_inv_voids_zero: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ⓧ*[n1, n2] ⓧ*[n2]L2 →
+                           L1 ≋ⓧ*[0, 0] L2.
+/2 width=3 by lveq_inv_voids/ qed-.
+
+*)
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids.etc
new file mode 100644 (file)
index 0000000..854737b
--- /dev/null
@@ -0,0 +1,91 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/notation/functions/voidstar_2.ma".
+include "basic_2/syntax/lenv.ma".
+
+(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
+
+rec definition voids (L:lenv) (n:nat) on n: lenv ≝ match n with
+[ O ⇒ L | S m ⇒ (voids L m).ⓧ ].
+
+interpretation "extension with exclusion binders (local environment)"
+   'VoidStar n L = (voids L n).
+
+(* Basic properties *********************************************************)
+
+lemma voids_zero: ∀L. L = ⓧ*[0]L.
+// qed.
+
+lemma voids_succ: ∀L,n. (ⓧ*[n]L).ⓧ = ⓧ*[⫯n]L.
+// qed.
+
+(* Advanced properties ******************************************************)
+
+lemma voids_next: ∀n,L. ⓧ*[n](L.ⓧ) = ⓧ*[⫯n]L.
+#n elim n -n //
+qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma voids_atom_inv: ∀K,n. ⓧ*[n]K = ⋆ → ∧∧ ⋆ = K & 0 = n.
+#K * /2 width=1 by conj/
+#n <voids_succ #H destruct
+qed-.
+
+lemma voids_pair_inv: ∀I,K1,K2,V,n. ⓧ*[n]K1 = K2.ⓑ{I}V →
+                      ∧∧ K2.ⓑ{I}V = K1 & 0 = n.
+#I #K1 #K2 #V * /2 width=1 by conj/
+#n <voids_succ #H destruct
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma voids_inv_atom_sn: ∀n1,K2,n2. ⓧ*[n1]⋆ = ⓧ*[n2]K2 →
+                         ∧∧ ⓧ*[n1-n2]⋆ = K2 & n2 ≤ n1.
+#n1 elim n1 -n1
+[ #K2 <voids_zero * /2 width=1 by conj/
+  #n1 <voids_succ #H destruct
+| #n1 #IH #K2 *
+  [ <voids_zero #H destruct /2 width=1 by conj/
+  | #n2 <voids_succ <voids_succ >minus_S_S #H
+    elim (destruct_lbind_lbind_aux … H) -H #HK #_ (**) (* destruct lemma needed *)
+    elim (IH … HK) -IH -HK #H #Hn destruct /3 width=1 by conj, le_S_S/
+  ]
+]
+qed-.
+
+lemma voids_inv_pair_sn: ∀I,V,n1,K1,K2,n2. ⓧ*[n1]K1.ⓑ{I}V = ⓧ*[n2]K2 →
+                         ∧∧ ⓧ*[n1-n2]K1.ⓑ{I}V = K2 & n2 ≤ n1.
+#I #V #n1 elim n1 -n1
+[ #K1 #K2 <voids_zero * /2 width=1 by conj/
+  #n1 <voids_succ #H destruct
+| #n1 #IH #K1 #K2 *
+  [ <voids_zero #H destruct /2 width=1 by conj/
+  | #n2 <voids_succ <voids_succ >minus_S_S #H
+    elim (destruct_lbind_lbind_aux … H) -H #HK #_ (**) (* destruct lemma needed *)
+    elim (IH … HK) -IH -HK #H #Hn destruct /3 width=1 by conj, le_S_S/
+  ]
+]
+qed-.
+
+(* Main inversion properties ************************************************)
+
+theorem voids_inj: ∀n. injective … (λL. ⓧ*[n]L).
+#n elim n -n //
+#n #IH #L1 #L2
+<voids_succ <voids_succ #H
+elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
+/2 width=1 by/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids_length.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voids_length.etc
new file mode 100644 (file)
index 0000000..c280cee
--- /dev/null
@@ -0,0 +1,46 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+include "basic_2/syntax/lenv_length.ma".
+include "basic_2/syntax/voids.ma".
+
+(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
+
+(* Properties 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 length_void_le: ∀L,n. |L| ≤ |ⓧ*[n]L|.
+// qed.
+
+(* Main forward properties with length for local environments ***************)
+
+theorem voids_inj_length: ∀n1,n2,L1,L2. ⓧ*[n1]L1 = ⓧ*[n2]L2 →
+                          |L1| = |L2| → n1 = n2 ∧ L1 = L2.
+#n1 elim n1 -n1
+[ * /2 width=1 by conj/ #n2 #L1 #L2 | #n1 #IH * [ | #n2 ] #L1 #L2 ]
+[ <voids_zero #H destruct
+  <length_void <commutative_plus #H
+  elim (plus_xSy_x_false … H)
+| <voids_zero #H destruct
+  <length_void <commutative_plus #H
+  elim (plus_xSy_x_false … (sym_eq … H))
+| <voids_succ <voids_succ #H #HL12
+  elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
+  #H #_ elim (IH … H HL12) -IH -H -HL12 /2 width=1 by conj/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voidstar_2.etc b/matita/matita/contribs/lambdadelta/basic_2/etc/voids/voidstar_2.etc
new file mode 100644 (file)
index 0000000..4c95b41
--- /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 n ] term 46 L )"
+   non associative with precedence 46
+   for @{ 'VoidStar $n $L }.
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 }.
index 02d3ecdb118d27724e6bbd33c2a3f7be4ede17d5..fdc03a5e2388869cc71ec99515f35d0ece4c1017 100644 (file)
 
 include "ground_2/relocation/rtmap_id.ma".
 include "basic_2/notation/relations/subseteq_4.ma".
-include "basic_2/syntax/voids.ma".
+include "basic_2/syntax/lveq.ma".
 include "basic_2/static/frees.ma".
 
 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
 
 definition fle: bi_relation lenv term ≝ λL1,T1,L2,T2.
                 ∃∃n1,n2,f1,f2. L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 &
-                               ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
+                               L1 ≋ⓧ*[n1, n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
 
 interpretation "free variables inclusion (restricted closure)"
    'SubSetEq L1 T1 L2 T2 = (fle L1 T1 L2 T2).
@@ -29,12 +29,12 @@ interpretation "free variables inclusion (restricted closure)"
 (* Basic properties *********************************************************)
 
 lemma fle_sort: ∀L,s1,s2. ⦃L, ⋆s1⦄ ⊆ ⦃L, ⋆s2⦄.
-#L elim (voids_refl L)
+#L elim (lveq_refl L)
 /3 width=8 by frees_sort, sle_refl, ex4_4_intro/
 qed.
 
 lemma fle_gref: ∀L,l1,l2. ⦃L, §l1⦄ ⊆ ⦃L, §l2⦄.
-#L elim (voids_refl L)
+#L elim (lveq_refl L)
 /3 width=8 by frees_gref, sle_refl, ex4_4_intro/
 qed.
 
index ca9549a06d087851d1ff3e96e636613a85a8c5b9..ff0b8872d6f403b0a2e7e8c6295e3734c57aee63 100644 (file)
@@ -24,8 +24,8 @@ lemma fle_bind_dx: ∀T,U. ⬆*[1] T ≡ U →
 #T #U #HTU #p #I #L #V
 elim (frees_total L V) #f1 #Hf1
 elim (frees_total L T) #f2 #Hf2
-elim (sor_isfin_ex f1 f2) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #H #_
-lapply (sor_inv_sle_dx … H) #Hf0
->(tl_push_rew f) in H; #Hf
-/6 width=6 by frees_lifts_SO, frees_bind, drops_refl, drops_drop, ex3_2_intro/
+elim (sor_isfin_ex f1 f2) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #Hf #_
+lapply (sor_inv_sle_dx … Hf) #Hf0
+elim (lveq_refl L) #n #HL
+/6 width=8 by frees_lifts_SO, frees_bind, drops_refl, drops_drop, sle_tls, ex4_4_intro/
 qed.
index e756b43f773e1d873c3f67fc8a583d7f481abe65..42c403412849db378d75a32747c5a0a34bd6052e 100644 (file)
@@ -12,6 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
+include "basic_2/syntax/lveq_lveq.ma".
 include "basic_2/static/frees_frees.ma".
 include "basic_2/static/fle_fqup.ma".
 
@@ -19,14 +20,15 @@ include "basic_2/static/fle_fqup.ma".
 
 (* Advanced inversion lemmas ************************************************)
 
-lemma fle_inv_voids_sn_frees_dx: ∀L1,L2,T1,T2,n. ⦃ⓧ*[n]L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                                 |L1| = |L2| → ∀f2. L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 →
-                                 ∃∃f1. ⓧ*[n]L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 & ⫱*[n]f1 ⊆ f2.
-#L1 #L2 #T1 #T2 #n #H #HL12 #f2 #Hf2
-elim (fle_inv_voids_sn … H HL12) -H -HL12 #f1 #g2 #Hf1 #Hg2 #Hfg
-lapply (frees_mono … Hg2 … Hf2) -Hg2 -Hf2 #Hfg2
-lapply (sle_eq_repl_back2 … Hfg … Hfg2) -g2
-/2 width=3 by ex2_intro/
+lemma fle_frees_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
+                       ∀f2. L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 →
+                       ∃∃n1,n2,f1. L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 &
+                                   L1 ≋ⓧ*[n1, n2] L2 & ⫱*[n1]f1 ⊆ ⫱*[n2]f2.
+#L1 #L2 #T1 #T2 * #n1 #n2 #f1 #g2 #Hf1 #Hg2 #HL #Hn #f2 #Hf2
+lapply (frees_mono … Hg2 … Hf2) -Hg2 -Hf2 #Hgf2
+lapply (tls_eq_repl n2 … Hgf2) -Hgf2 #Hgf2
+lapply (sle_eq_repl_back2 … Hn … Hgf2) -g2
+/2 width=6 by ex3_3_intro/
 qed-.
 
 (* Main properties **********************************************************)
@@ -38,37 +40,38 @@ qed-.
 *)
 theorem fle_bind_sn: ∀L1,L2,V1,T1,T. ⦃L1, V1⦄ ⊆ ⦃L2, T⦄ → ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2, T⦄ →
                      ∀p,I. ⦃L1, ⓑ{p,I}V1.T1⦄ ⊆ ⦃L2, T⦄.
-#L1 #L2 #V1 #T1 #T * -L1 #f1 #x #L1 #n1 #Hf1 #Hx #HL12 #Hf1x
->voids_succ #H #p #I
-elim (fle_inv_voids_sn_frees_dx … H … Hx) -H // #f2 #Hf2
-<tls_xn #Hf2x
+#L1 #L2 #V1 #T1 #T * #n1 #x #f1 #g #Hf1 #Hg #H1n1 #H2n1 #H #p #I
+elim (fle_frees_trans … H … Hg) -H #n2 #n #f2 #Hf2 #H1n2 #H2n2
+elim (lveq_inj_void_sn … H1n1 … H1n2) -H1n2 #H1 #H2 destruct
 elim (sor_isfin_ex f1 (⫱f2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #Hf #_
-/4 width=9 by fle_intro, frees_bind_void, sor_inv_sle, sor_tls/
+<tls_xn in H2n2; #H2n2
+/4 width=12 by frees_bind_void, sor_inv_sle, sor_tls, ex4_4_intro/
 qed.
 
 theorem fle_flat_sn: ∀L1,L2,V1,T1,T. ⦃L1, V1⦄ ⊆ ⦃L2, T⦄ → ⦃L1, T1⦄ ⊆ ⦃L2, T⦄ →
                      ∀I. ⦃L1, ⓕ{I}V1.T1⦄ ⊆ ⦃L2, T⦄.
-#L1 #L2 #V1 #T1 #T * -L1 #f1 #x #L1 #n1 #Hf1 #Hx #HL12 #Hf1x #H #I
-elim (fle_inv_voids_sn_frees_dx … H … Hx) -H // #f2 #Hf2 #Hf2x
+#L1 #L2 #V1 #T1 #T * #n1 #x #f1 #g #Hf1 #Hg #H1n1 #H2n1 #H #I
+elim (fle_frees_trans … H … Hg) -H #n2 #n #f2 #Hf2 #H1n2 #H2n2
+elim (lveq_inj … H1n1 … H1n2) -H1n2 #H1 #H2 destruct
 elim (sor_isfin_ex f1 f2) /2 width=3 by frees_fwd_isfin/ #f #Hf #_
-/4 width=9 by fle_intro, frees_flat, sor_inv_sle, sor_tls/
+/4 width=12 by frees_flat, sor_inv_sle, sor_tls, ex4_4_intro/
 qed.
 (*
-lemma fle_bind: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                ∀I1,I2,T1,T2. ⦃L1.ⓑ{I1}V1, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
-                ∀p. ⦃L1, ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.T2⦄.
-#L1 #L2 #V1 #V2 * #f1 #g1 #HV1 #HV2 #Hfg1 #I1 #I2 #T1 #T2 * #f2 #g2 #Hf2 #Hg2 #Hfg2 #p
+theorem fle_bind: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
+                  ∀I1,I2,T1,T2. ⦃L1.ⓑ{I1}V1, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
+                  ∀p. ⦃L1, ⓑ{p,I1}V1.T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.T2⦄.
+#L1 #L2 #V1 #V2 #HV #I1 #I2 #T1 #T2 #HT #p
+@fle_bind_sn
+[ @fle_bind_dx_sn //
+| @fle_bind_dx_dx
+
+
 elim (sor_isfin_ex f1 (⫱f2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #f #Hf #_
 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
 /4 width=12 by frees_bind, monotonic_sle_sor, sle_tl, ex3_2_intro/
 qed.
-
-lemma fle_flat: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
-                ∀T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
-                ∀I1,I2. ⦃L1, ⓕ{I1}V1.T1⦄ ⊆ ⦃L2, ⓕ{I2}V2.T2⦄.
-#L1 #L2 #V1 #V2 * #f1 #g1 #HV1 #HV2 #Hfg1 #T1 #T2 * #f2 #g2 #Hf2 #Hg2 #Hfg2 #I1 #I2
-elim (sor_isfin_ex f1 f2) /2 width=3 by frees_fwd_isfin/ #f #Hf #_
-elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
-/3 width=12 by frees_flat, monotonic_sle_sor, ex3_2_intro/
-qed.
 *)
+theorem fle_flat: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
+                  ∀T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
+                  ∀I1,I2. ⦃L1, ⓕ{I1}V1.T1⦄ ⊆ ⦃L2, ⓕ{I2}V2.T2⦄.
+/3 width=1 by fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn/ qed-.
index 6ecf55f0a83a0d703783e6dcc3aeaa36c5e28a73..4db4e617c829dcb7bd408e653e294c5391915088 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/syntax/voids_length.ma".
+include "basic_2/syntax/lveq_length.ma".
 include "basic_2/static/frees_fqup.ma".
 include "basic_2/static/fle.ma".
 
@@ -22,7 +22,7 @@ include "basic_2/static/fle.ma".
 
 lemma fle_refl: bi_reflexive … fle.
 #L #T
-elim (voids_refl L) #n #Hn
+elim (lveq_refl L) #n #Hn
 elim (frees_total L T) #f #Hf
 /2 width=8 by sle_refl, ex4_4_intro/
 qed.
@@ -39,7 +39,7 @@ qed.
 lemma fle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2.ⓧ, T2⦄ → |L1| ≤ |L2| →
                       ∀p,I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
 #L1 #L2 #T1 #T2 * #n1 #x1 #f2 #g2 #Hf2 #Hg2 #H #Hfg2 #HL12 #p #I #V2
-elim (voids_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H #_ destruct
+elim (lveq_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H #_ destruct
 <tls_xn in Hfg2; #Hfg2
 elim (frees_total L2 V2) #g1 #Hg1
 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
index 0d851ce6a9626a29052fcff4fd86c4657296d642..c13c4dcec51a08fc69547ddd29755f30cc2e7286 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
+(* include "basic_2/syntax/lveq_length.ma". *)
 include "basic_2/static/fle.ma".
 include "basic_2/static/lfxs_lfxs.ma".
 
 (* GENERIC EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ****)
-
+(*
+lemma pippo: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+             ∀T,f. L1 ⊢ 𝐅*⦃T⦄ ≡ f → ∃g. ↑*[n1]g = f. 
+*)
 (* Properties with free variables inclusion for restricted closures *********)
-
+(*
 lemma fle_lfxs_trans: ∀R,L1,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L1, T2⦄ →
                       ∀L2. L1 ⪤*[R, T2] L2 → L1 ⪤*[R, T1] L2.
-#R #L1 #T1 #T2 * #f1 #f2 #Hf1 #Hf2 #Hf12 #L2 #HL12
+#R #L1 #T1 #T2 * #x #n #f1 #f2 #Hf1 #Hf2 #Hn #Hf #L2 #HL12
+lapply (lveq_inj_length … Hn ?) // #H destruct
+
+
+ Hn : (L1≋ⓧ*[n,n]L1) (L1⊢𝐅*⦃T1⦄≡f1) → 
+
+lapply (lfxs_inv_frees … HL12 … Hf2) -HL12 -Hf2 #HL12
+@(ex2_intro … Hf1) -Hf1
+@(sle_lexs_trans … HL12) -HL12 //
+
 /4 width=5 by lfxs_inv_frees, sle_lexs_trans, ex2_intro/
 qed-.
+*)
\ No newline at end of file
index 8cd00ab86a4d4b9fc84c13c6b447eef91cd52554..c9300df18d65ed40df140f5c58cb6a068f512b54 100644 (file)
@@ -47,8 +47,8 @@ qed-.
 
 (* Basic inversion lemmas ***************************************************)
 
-fact lveq_inv_atom_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                        ⋆ = L1 → ⋆ = L2 → ∧∧ 0 = n1 & 0 = n2.
+fact lveq_inv_atom_atom_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                             ⋆ = L1 → ⋆ = L2 → ∧∧ 0 = n1 & 0 = n2.
 #L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
 [ /2 width=1 by conj/
 |2,3: #I1 #I2 #K1 #K2 #V #n #_ #H1 #H2 destruct
@@ -56,10 +56,46 @@ fact lveq_inv_atom_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
 ]
 qed-.
 
-(* Advanced inversion lemmas ************************************************)
+lemma lveq_inv_atom_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → 0 = n1 ∧ 0 = n2.
+/2 width=5 by lveq_inv_atom_atom_aux/ qed-.
+
+fact lveq_inv_bind_atom_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                             ∀I1,K1. K1.ⓘ{I1} = L1 → ⋆ = L2 →
+                             ∃∃m1. K1 ≋ⓧ*[m1, n2] ⋆ & BUnit Void = I1 & ⫯m1 = n1.
+#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
+[ #Z1 #Y1 #H destruct
+|2,3: #I1 #I2 #K1 #K2 #V #n #_ #Z1 #Y1 #_ #H2 destruct
+|4,5: #K1 #K2 #n1 #n2 #HK #Z1 #Y1 #H1 #H2 destruct /2 width=3 by ex3_intro/
+]
+qed-.
 
-lemma lveq_inv_atom: ∀n1,n2. ⋆ ≋ⓧ*[n1, n2] ⋆ → 0 = n1 ∧ 0 = n2.
-/2 width=5 by lveq_inv_atom_aux/ qed-.
+lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ →
+                          ∃∃m1. K1 ≋ⓧ*[m1, n2] ⋆ & BUnit Void = I1 & ⫯m1 = n1.
+/2 width=5 by lveq_inv_bind_atom_aux/ qed-.
+
+lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1, n2] K2.ⓘ{I2} →
+                          ∃∃m2. ⋆ ≋ⓧ*[n1, m2] K2 & BUnit Void = I2 & ⫯m2 = n2.
+#I2 #K2 #n1 #n2 #H
+lapply (lveq_sym … H) -H #H
+elim (lveq_inv_bind_atom … H) -H
+/3 width=3 by lveq_sym, ex3_intro/
+qed-.
+
+fact lveq_inv_pair_pair_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
+                             ∀I1,I2,K1,K2,V1,V2. K1.ⓑ{I1}V1 = L1 → K2.ⓑ{I2}V2 = L2 →
+                             ∃∃n. K1 ≋ⓧ*[n, n] K2 & 0 = n1 & 0 = n2.
+#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
+[ #Z1 #Z2 #Y1 #Y2 #X1 #X2 #H1 #H2 destruct
+|2,3: #I1 #I2 #K1 #K2 #V #n #HK #Z1 #Z2 #Y1 #Y2 #X1 #X2 #H1 #H2 destruct /2 width=2 by ex3_intro/
+|4,5: #K1 #K2 #n1 #n2 #_ #Z1 #Z2 #Y1 #Y2 #X1 #X2 #H1 #H2 destruct
+]
+qed-.
+
+lemma lveq_inv_pair_pair: ∀I1,I2,K1,K2,V1,V2,m1,m2. K1.ⓑ{I1}V1 ≋ⓧ*[m1, m2] K2.ⓑ{I2}V2 →
+                          ∃∃n. K1 ≋ⓧ*[n, n] K2 & 0 = m1 & 0 = m2.
+/2 width=9 by lveq_inv_pair_pair_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
 
 fact lveq_inv_void_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
                                 ∀K1,m1. L1 = K1.ⓧ → n1 = ⫯m1 → K1 ≋ ⓧ*[m1, n2] L2.
@@ -79,6 +115,22 @@ lemma lveq_inv_void_succ_sn: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[⫯n1, n2] L2 → L1
 lemma lveq_inv_void_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, ⫯n2] L2.ⓧ → L1 ≋ ⓧ*[n1, n2] L2.
 /4 width=5 by lveq_inv_void_succ_sn_aux, lveq_sym/ qed-.
 
+(* Basic forward lemmas *****************************************************)
+
+fact lveq_fwd_void_void_aux: ∀L1,L2,m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
+                             ∀K1,K2. K1.ⓧ = L1 → K2.ⓧ = L2 →
+                             ∨∨ ∃n. ⫯n = m1 | ∃n. ⫯n = m2.
+#L1 #L2 #m1 #m2 * -L1 -L2 -m1 -m2
+[ #Y1 #Y2 #H1 #H2 destruct
+|2,3: #I1 #I2 #K1 #K2 #V #n #_ #Y1 #Y2 #H1 #H2 destruct
+|4,5: #K1 #K2 #n1 #n2 #_ #Y1 #Y2 #H1 #H2 destruct /3 width=2 by ex_intro, or_introl, or_intror/
+]
+qed-.
+
+lemma lveq_fwd_void_void: ∀K1,K2,m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2.ⓧ →
+                          ∨∨ ∃n. ⫯n = m1 | ∃n. ⫯n = m2.
+/2 width=7 by lveq_fwd_void_void_aux/ qed-.
+
 (* Advanced forward lemmas **************************************************)
 
 fact lveq_fwd_pair_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
index 006f680205161ee537dec7cef751550e5e216ef0..3695d2a7cc9fa073213cb55d448da5c9990c3e4f 100644 (file)
@@ -58,15 +58,34 @@ lemma lveq_inj_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
 lapply (lveq_fwd_length … H) -H #H
 /2 width=2 by injective_plus_l/
 qed-.
-(*
+
+lemma lveq_fwd_abst_bind_length_le: ∀I1,I2,L1,L2,V1,n1,n2.
+                                    L1.ⓑ{I1}V1 ≋ⓧ*[n1, n2] L2.ⓘ{I2} → |L1| ≤ |L2|.
+#I1 #I2 #L1 #L2 #V1 #n1 #n2 #HL
+lapply (lveq_fwd_pair_sn … HL) #H destruct
+lapply (lveq_fwd_length … HL) -HL >length_bind >length_bind #H
+/2 width=1 by monotonic_pred/
+qed-.
+
+lemma lveq_fwd_bind_abst_length_le: ∀I1,I2,L1,L2,V2,n1,n2.
+                                    L1.ⓘ{I1} ≋ⓧ*[n1, n2] L2.ⓑ{I2}V2 → |L2| ≤ |L1|.
+/3 width=6 by lveq_fwd_abst_bind_length_le, lveq_sym/ qed-.
+
 (* Inversion lemmas with length for local environments **********************)
-                   
+
 lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2.ⓧ → |L1| ≤ |L2| →
                                ∃∃m2. L1 ≋ ⓧ*[n1, m2] L2 & n2 = ⫯m2 & n1 ≤ m2.
 #L1 #L2 #n1 #n2 #H #HL12
 lapply (lveq_fwd_length … H) normalize >plus_n_Sm #H0
 lapply (plus2_inv_le_sn … H0 HL12) -H0 -HL12 #H0
 elim (le_inv_S1 … H0) -H0 #m2 #Hm2 #H0 destruct
-/3 width=4 by lveq_inv_void_dx, ex3_intro/
+/3 width=4 by lveq_inv_void_succ_dx, ex3_intro/
+qed-.
+
+lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| →
+                               ∃∃m1. L1 ≋ ⓧ*[m1, n2] L2 & n1 = ⫯m1 & n2 ≤ m1.
+#L1 #L2 #n1 #n2 #H #HL
+lapply (lveq_sym … H) -H #H
+elim (lveq_inv_void_dx_length … H HL) -H -HL
+/3 width=4 by lveq_sym, ex3_intro/
 qed-.
-*)
\ No newline at end of file
index 12b6f0cb65d81d21d5f0f5f8a5e967298ab0f81b..3f64c33b02d7ee4b753a04bcea7a060b5770dce5 100644 (file)
@@ -16,6 +16,33 @@ include "basic_2/syntax/lveq_length.ma".
 
 (* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
 
+(* Main forward lemmas ******************************************************)
+
+theorem lveq_fwd_inj_succ_zero: ∀L1,L2,n1. L1 ≋ⓧ*[⫯n1, 0] L2 →
+                                ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 → ∃x1. ⫯x1 = m1.
+#L1 #L2 #n1 #Hn #m1 #m2 #Hm
+lapply (lveq_fwd_length … Hn) -Hn <plus_n_O #Hn
+lapply (lveq_fwd_length … Hm) -Hm >Hn >associative_plus -Hn #Hm
+lapply (injective_plus_r … Hm) -Hm
+<plus_S1 /2 width=2 by ex_intro/
+qed-.
+
+theorem lveq_fwd_inj_zero_succ: ∀L1,L2,n2. L1 ≋ⓧ*[0, ⫯n2] L2 →
+                                ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 → ∃x2. ⫯x2 = m2.
+/4 width=6 by lveq_fwd_inj_succ_zero, lveq_sym/ qed-. (* auto: 2x lveq_sym *)
+
+theorem lveq_fwd_inj_succ_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[⫯n1, n2] L2 →
+                              ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
+                              ∨∨ ∃x. ⫯x = n2 | ∃x. ⫯x = m1.
+#L1 #L2 #n1 * [2: #n2 ] /3 width=2 by ex_intro, or_introl/
+#Hn #m1 #m2 #Hm @or_intror @lveq_fwd_inj_succ_zero /width=6 by/ (**) (* auto fails *)
+qed-.
+
+theorem lveq_fwd_inj_succ_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, ⫯n2] L2 →
+                              ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
+                              ∨∨ ∃x. ⫯x = n1 | ∃x. ⫯x = m2.
+/4 width=6 by lveq_fwd_inj_succ_sn, lveq_sym/ qed-. (* auto: 2x lveq_sym *) 
+
 (* Main inversion lemmas ****************************************************)
 
 theorem lveq_inv_pair_sn: ∀K1,K2,n. K1 ≋ⓧ*[n, n] K2 →
@@ -31,97 +58,89 @@ theorem lveq_inv_pair_dx: ∀K1,K2,n. K1 ≋ⓧ*[n, n] K2 →
                           ∀I1,I2,V,m1,m2. K1.ⓘ{I1} ≋ⓧ*[m1, m2] K2.ⓑ{I2}V →
                           ∧∧ 0 = m1 & 0 = m2.
 /4 width=8 by lveq_inv_pair_sn, lveq_sym, commutative_and/ qed-.
-(*
-theorem lveq_inv_void_sn: ∀K1,K2,n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
-                          ∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 →
-                          0 < m1. 
-*)
-(*
-theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                  ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
-                  ∧∧ n1 = m1 & n2 = m2.
-#L1 #L2 @(f2_ind ?? length2 ?? L1 L2) -L1 -L2
-#x #IH #L1 #L2 #Hx #n1 #n2 #H
-generalize in match Hx; -Hx
-cases H -L1 -L2 -n1 -n2
-/2 width=8 by lveq_inv_pair_dx, lveq_inv_pair_sn, lveq_inv_atom/
-#K1 #K2 #n1 #n2 #HK #Hx #m1 #m2 #H destruct
-
-
-
-[ #_ #m1 #m2 #HL -x /2 width=1 by lveq_inv_atom/
-| #I1 #I2 #K1 #K2 #V1 #n #HK #_ #m1 #m2 #H -x     
-  
-
 
 theorem lveq_inj: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
                   ∀m1,m2. L1 ≋ⓧ*[m1, m2] L2 →
                   ∧∧ n1 = m1 & n2 = m2.
-#L1 #L2 #n1 #n2 #H @(lveq_ind_voids … H) -H -L1 -L2 -n1 -n2
-[ #n1 #n2 #m1 #m2 #H elim (lveq_inv_voids … H) -H *
-  [ /3 width=1 by voids_inj, conj/ ]
-  #J1 #J2 #K1 #K2 #W #m #_ [ #H #_ | #_ #H ]
-  elim (voids_inv_pair_sn … H) -H #H #_
-  elim (voids_atom_inv … H) -H #H #_ destruct
-]
-#I1 #I2 #L1 #L2 #V #n1 #n2 #n #HL #IH #m1 #m2 #H
-elim (lveq_inv_voids … H) -H *
-[1,4: [ #H #_ | #_ #H ]
-  elim (voids_inv_atom_sn … H) -H #H #_
-  elim (voids_pair_inv … H) -H #H #_ destruct
-]
-#J1 #J2 #K1 #K2 #W #m #HK [1,3: #H1 #H2 |*: #H2 #H1 ]
-elim (voids_inv_pair_sn … H1) -H1 #H #Hnm
-[1,4: -IH -Hnm elim (voids_pair_inv … H) -H #H1 #H2 destruct
-|2,3: elim (voids_inv_pair_dx … H2) -H2 #H2 #_
-  elim (IH … HK)    
-
-
-(*
-/3 width=3 by lveq_inv_atom, lveq_inv_voids/
-| 
-  lapply (lveq_inv_voids … H) -H #H
-  elim (lveq_inv_pair_sn … H) -H * /2 width=1 by conj/
-  #Y2 #y2 #HY2 #H1 #H2 #H3 destruct 
-*)
-
-(*
-fact lveq_inv_pair_bind_aux: ∀L1,L2,n1,n2. L1 ≋ ⓧ*[n1, n2] L2 →
-                             ∀I1,I2,K1,K2,V1. K1.ⓑ{I1}V1 = L1 → K2.ⓘ{I2} = L2 →
-                             ∨∨ ∃∃m. K1 ≋ ⓧ*[m, m] K2 & 0 = n1 & 0 = n2
-                              | ∃∃m1,m2. K1 ≋ ⓧ*[m1, m2] K2 &
-                                         BUnit Void = I2 & ⫯m2 = n2.
-#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2
-[ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
-|2,3: #I1 #I2 #K1 #K2 #V #n #HK #_ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct /3 width=2 by or_introl, ex3_intro/
-|4,5: #K1 #K2 #n1 #n2 #HK #IH #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
- /3 width=4 by _/
+#L1 #L2 @(f2_ind ?? length2 ?? L1 L2) -L1 -L2
+#x #IH * [2: #L1 #I1 ] * [2,4: #L2 #I2 ]
+[ cases I1 -I1 [ * | #I1 #V1 ] cases I2 -I2 [1,3: * |*: #I2 #V2 ] ]
+#Hx #n1 #n2 #Hn #m1 #m2 #Hm destruct
+[ elim (lveq_fwd_void_void … Hn) * #x #H destruct
+  elim (lveq_fwd_void_void … Hm) * #y #H destruct
+  [ lapply (lveq_inv_void_succ_sn … Hn) -Hn #Hn
+    lapply (lveq_inv_void_succ_sn … Hm) -Hm #Hm
+    elim (IH … Hn … Hm) -IH -Hn -Hm // #H1 #H2 destruct
+    /2 width=1 by conj/
+  | elim (lveq_fwd_inj_succ_sn … Hn … Hm) * #z #H destruct
+    [ lapply (lveq_inv_void_succ_dx … Hn) -Hn #Hn
+      lapply (lveq_inv_void_succ_dx … Hm) -Hm #Hm
+      elim (IH … Hn … Hm) -IH -Hn -Hm [2: normalize // ] #H1 #H2 destruct (**) (* avoid normalize *)
+      /2 width=1 by conj/
+    | lapply (lveq_inv_void_succ_sn … Hn) -Hn #Hn
+      lapply (lveq_inv_void_succ_sn … Hm) -Hm #Hm
+      elim (IH … Hn … Hm) -IH -Hn -Hm // #H1 #H2 destruct
+      /2 width=1 by conj/
+    ]
+  | elim (lveq_fwd_inj_succ_dx … Hn … Hm) * #z #H destruct
+    [ lapply (lveq_inv_void_succ_sn … Hn) -Hn #Hn
+      lapply (lveq_inv_void_succ_sn … Hm) -Hm #Hm
+      elim (IH … Hn … Hm) -IH -Hn -Hm // #H1 #H2 destruct
+      /2 width=1 by conj/
+    | lapply (lveq_inv_void_succ_dx … Hn) -Hn #Hn
+      lapply (lveq_inv_void_succ_dx … Hm) -Hm #Hm
+      elim (IH … Hn … Hm) -IH -Hn -Hm [2: normalize // ] #H1 #H2 destruct (**) (* avoid normalize *)
+      /2 width=1 by conj/
+    ]
+  | lapply (lveq_inv_void_succ_dx … Hn) -Hn #Hn
+    lapply (lveq_inv_void_succ_dx … Hm) -Hm #Hm
+    elim (IH … Hn … Hm) -IH -Hn -Hm [2: normalize // ] #H1 #H2 destruct (**) (* avoid normalize *)
+    /2 width=1 by conj/
+  ]
+| lapply (lveq_fwd_abst_bind_length_le … Hn) #HL
+  elim (le_to_or_lt_eq … HL) -HL #HL
+  [ elim (lveq_inv_void_dx_length … Hn) -Hn // #x1 #Hn #H #_ destruct
+    elim (lveq_inv_void_dx_length … Hm) -Hm // #y1 #Hm #H #_ destruct
+    elim (IH … Hn … Hm) -IH -Hn -Hm -HL [2: normalize // ] #H1 #H2 destruct (**) (* avoid normalize *)
+    /2 width=1 by conj/
+  | elim (lveq_eq_ex … HL) -HL #x #HL
+    elim (lveq_inv_pair_sn … HL … Hn) -Hn #H1 #H2 destruct
+    elim (lveq_inv_pair_sn … HL … Hm) -Hm #H1 #H2 destruct
+    /2 width=1 by conj/
+  ]
+| lapply (lveq_fwd_bind_abst_length_le … Hn) #HL
+  elim (le_to_or_lt_eq … HL) -HL #HL
+  [ elim (lveq_inv_void_sn_length … Hn) -Hn // #x1 #Hn #H #_ destruct
+    elim (lveq_inv_void_sn_length … Hm) -Hm // #y1 #Hm #H #_ destruct
+    elim (IH … Hn … Hm) -IH -Hn -Hm -HL // #H1 #H2 destruct
+    /2 width=1 by conj/
+  | lapply (sym_eq ??? HL) -HL #HL
+    elim (lveq_eq_ex … HL) -HL #x #HL
+    elim (lveq_inv_pair_dx … HL … Hn) -Hn #H1 #H2 destruct
+    elim (lveq_inv_pair_dx … HL … Hm) -Hm #H1 #H2 destruct
+    /2 width=1 by conj/
+  ]
+| elim (lveq_inv_pair_pair… Hn) -Hn #x #_ #H1 #H2 destruct
+  elim (lveq_inv_pair_pair… Hm) -Hm #y #_ #H1 #H2 destruct
+  /2 width=1 by conj/
+| elim (lveq_inv_atom_bind … Hn) -Hn #x #Hn #H1 #H2 destruct
+  elim (lveq_inv_atom_bind … Hm) -Hm #y #Hm #H1 #H2 destruct
+  elim (IH … Hn … Hm) -IH -Hn -Hm /2 width=1 by conj/
+| elim (lveq_inv_bind_atom … Hn) -Hn #x #Hn #H1 #H2 destruct
+  elim (lveq_inv_bind_atom … Hm) -Hm #y #Hm #H1 #H2 destruct
+  elim (IH … Hn … Hm) -IH -Hn -Hm /2 width=1 by conj/
+| elim (lveq_inv_atom_atom … Hn) -Hn #H1 #H2 destruct
+  elim (lveq_inv_atom_atom … Hm) -Hm #H1 #H2 destruct
+  /2 width=1 by conj/
 ]
 qed-.
 
-lemma voids_inv_pair_bind: ∀I1,I2,K1,K2,V1,n1,n2. ⓧ*[n1]K1.ⓑ{I1}V1 ≋ ⓧ*[n2]K2.ⓘ{I2} →
-                           ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
-                            | ∃∃m2. ⓧ*[n1]K1.ⓑ{I1}V1 ≋ ⓧ*[m2]K2 &
-                                    BUnit Void = I2 & ⫯m2 = n2.
-/2 width=5 by voids_inv_pair_bind_aux/ qed-.
-
-fact voids_inv_bind_pair_aux: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 →
-                              ∀I1,I2,K1,K2,V2. K1.ⓘ{I1} = L1 → K2.ⓑ{I2}V2 = L2 →
-                              ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
-                               | ∃∃m1. ⓧ*[m1]K1 ≋ ⓧ*[n2]K2.ⓑ{I2}V2 &
-                                       BUnit Void = I1 & ⫯m1 = n1.
-#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
-[ #J1 #J2 #L1 #L2 #V1 #H1 #H2 destruct
-|2,3: #I1 #I2 #K1 #K2 #V #n #HK #J1 #J2 #L1 #L2 #V2 #H1 #H2 destruct /3 width=2 by or_introl, ex3_intro/
-|4,5: #K1 #K2 #n1 #n2 #HK #J1 #J2 #L1 #L2 #V2 #H1 #H2 destruct /3 width=3 by or_intror, ex3_intro/
-]
-qed-.
+theorem lveq_inj_void_sn: ∀K1,K2,n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
+                          ∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 →
+                          ∧∧ ⫯n1 = m1 & n2 = m2.
+/3 width=4 by lveq_inj, lveq_void_sn/ qed-.
 
-lemma voids_inv_bind_pair: ∀I1,I2,K1,K2,V2,n1,n2. ⓧ*[n1]K1.ⓘ{I1} ≋ ⓧ*[n2]K2.ⓑ{I2}V2 →
-                           ∨∨ ∃∃n. ⓧ*[n]K1 ≋ ⓧ*[n]K2 & 0 = n1 & 0 = n2
-                            | ∃∃m1. ⓧ*[m1]K1 ≋ ⓧ*[n2]K2.ⓑ{I2}V2 &
-                                    BUnit Void = I1 & ⫯m1 = n1.
-/2 width=5 by voids_inv_bind_pair_aux/ qed-.
-*)
-*)
\ No newline at end of file
+theorem lveq_inj_void_dx: ∀K1,K2,n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
+                          ∀m1,m2. K1 ≋ⓧ*[m1, m2] K2.ⓧ →
+                          ∧∧ n1 = m1 & ⫯n2 = m2.
+/3 width=4 by lveq_inj, lveq_void_dx/ qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_voids.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/lveq_voids.ma
deleted file mode 100644 (file)
index 88b7f77..0000000
+++ /dev/null
@@ -1,98 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "ground_2/xoa/xoa2.ma".
-include "basic_2/syntax/voids_length.ma".
-include "basic_2/syntax/lveq.ma".
-
-(* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
-
-(* Inversion lemmas with extension with exclusion binders *******************)
-
-lemma lveq_inv_voids: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                      ∨∨ ∧∧ ⓧ*[n1]⋆ = L1 & ⓧ*[n2]⋆ = L2
-                       | ∃∃I1,I2,K1,K2,V1,n. K1 ≋ⓧ*[n, n] K2 & ⓧ*[n1](K1.ⓑ{I1}V1) = L1 & ⓧ*[n2](K2.ⓘ{I2}) = L2
-                       | ∃∃I1,I2,K1,K2,V2,n. K1 ≋ⓧ*[n, n] K2 & ⓧ*[n1](K1.ⓘ{I1}) = L1 & ⓧ*[n2](K2.ⓑ{I2}V2) = L2.
-#L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2
-[ /3 width=1 by conj, or3_intro0/
-|2,3: /3 width=9 by or3_intro1, or3_intro2, ex3_6_intro/
-|4,5: #K1 #K2 #n1 #n2 #HK12 * *
-   /3 width=9 by conj, or3_intro0, or3_intro1, or3_intro2, ex3_6_intro/
-]
-qed-.
-
-(* Eliminators with extension with exclusion binders ************************)
-
-lemma lveq_ind_voids: ∀R:bi_relation lenv nat. (
-                         ∀n1,n2. R (ⓧ*[n1]⋆) n1 (ⓧ*[n2]⋆) n2
-                      ) → (
-                         ∀I1,I2,K1,K2,V1,n1,n2,n. K1 ≋ⓧ*[n, n] K2 → R K1 n K2 n →
-                         R (ⓧ*[n1]K1.ⓑ{I1}V1) n1 (ⓧ*[n2]K2.ⓘ{I2}) n2
-                      ) → (
-                         ∀I1,I2,K1,K2,V2,n1,n2,n. K1 ≋ⓧ*[n, n] K2 → R K1 n K2 n →
-                         R (ⓧ*[n1]K1.ⓘ{I1}) n1 (ⓧ*[n2]K2.ⓑ{I2}V2) n2
-                      ) →
-                      ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 → R L1 n1 L2 n2.
-#R #IH1 #IH2 #IH3 #L1 #L2 @(f2_ind ?? length2 ?? L1 L2) -L1 -L2
-#m #IH #L1 #L2 #Hm #n1 #n2 #H destruct
-elim (lveq_inv_voids … H) -H * //
-#I1 #I2 #K1 #K2 #V #n #HK #H1 #H2 destruct
-/4 width=3 by lt_plus/
-qed-.
-
-(*
-
-(* Properties with extension with exclusion binders *************************)
-
-lemma lveq_voids_sn: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                     ∀m1. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, n2] L2.
-#L1 #L2 #n1 #n2 #HL12 #m1 elim m1 -m1 /2 width=1 by lveq_void_sn/
-qed-.
-
-lemma lveq_voids_dx: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                     ∀m2. L1 ≋ⓧ*[n1, m2+n2] ⓧ*[m2]L2.
-#L1 #L2 #n1 #n2 #HL12 #m2 elim m2 -m2 /2 width=1 by lveq_void_dx/
-qed-.
-
-lemma lveq_voids: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
-                  ∀m1,m2. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, m2+n2] ⓧ*[m2]L2.
-/3 width=1 by lveq_voids_dx, lveq_voids_sn/ qed-.
-
-lemma lveq_voids_zero: ∀L1,L2. L1 ≋ⓧ*[0, 0] L2 →
-                       ∀n1,n2. ⓧ*[n1]L1 ≋ⓧ*[n1, n2] ⓧ*[n2]L2.
-#L1 #L2 #HL12 #n1 #n2
->(plus_n_O … n1) in ⊢ (?%???); >(plus_n_O … n2) in ⊢ (???%?);
-/2 width=1 by lveq_voids/ qed-.
-
-(* Inversion lemmas with extension with exclusion binders *******************)
-
-lemma lveq_inv_voids_sn: ∀L1,L2,n1,n2,m1. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, n2] L2 →
-                         L1 ≋ⓧ*[n1, n2] L2.
-#L1 #L2 #n1 #n2 #m1 elim m1 -m1 /3 width=1 by lveq_inv_void_sn/
-qed-.
-
-lemma lveq_inv_voids_dx: ∀L1,L2,n1,n2,m2. L1 ≋ⓧ*[n1, m2+n2] ⓧ*[m2]L2 →
-                         L1 ≋ⓧ*[n1, n2] L2.
-#L1 #L2 #n1 #n2 #m2 elim m2 -m2 /3 width=1 by lveq_inv_void_dx/
-qed-.
-
-lemma lveq_inv_voids: ∀L1,L2,n1,n2,m1,m2. ⓧ*[m1]L1 ≋ⓧ*[m1+n1, m2+n2] ⓧ*[m2]L2 →
-                      L1 ≋ⓧ*[n1, n2] L2.
-/3 width=3 by lveq_inv_voids_dx, lveq_inv_voids_sn/ qed-.
-
-lemma lveq_inv_voids_zero: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ⓧ*[n1, n2] ⓧ*[n2]L2 →
-                           L1 ≋ⓧ*[0, 0] L2.
-/2 width=3 by lveq_inv_voids/ qed-.
-
-*)
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma
deleted file mode 100644 (file)
index 854737b..0000000
+++ /dev/null
@@ -1,91 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/notation/functions/voidstar_2.ma".
-include "basic_2/syntax/lenv.ma".
-
-(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
-
-rec definition voids (L:lenv) (n:nat) on n: lenv ≝ match n with
-[ O ⇒ L | S m ⇒ (voids L m).ⓧ ].
-
-interpretation "extension with exclusion binders (local environment)"
-   'VoidStar n L = (voids L n).
-
-(* Basic properties *********************************************************)
-
-lemma voids_zero: ∀L. L = ⓧ*[0]L.
-// qed.
-
-lemma voids_succ: ∀L,n. (ⓧ*[n]L).ⓧ = ⓧ*[⫯n]L.
-// qed.
-
-(* Advanced properties ******************************************************)
-
-lemma voids_next: ∀n,L. ⓧ*[n](L.ⓧ) = ⓧ*[⫯n]L.
-#n elim n -n //
-qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma voids_atom_inv: ∀K,n. ⓧ*[n]K = ⋆ → ∧∧ ⋆ = K & 0 = n.
-#K * /2 width=1 by conj/
-#n <voids_succ #H destruct
-qed-.
-
-lemma voids_pair_inv: ∀I,K1,K2,V,n. ⓧ*[n]K1 = K2.ⓑ{I}V →
-                      ∧∧ K2.ⓑ{I}V = K1 & 0 = n.
-#I #K1 #K2 #V * /2 width=1 by conj/
-#n <voids_succ #H destruct
-qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma voids_inv_atom_sn: ∀n1,K2,n2. ⓧ*[n1]⋆ = ⓧ*[n2]K2 →
-                         ∧∧ ⓧ*[n1-n2]⋆ = K2 & n2 ≤ n1.
-#n1 elim n1 -n1
-[ #K2 <voids_zero * /2 width=1 by conj/
-  #n1 <voids_succ #H destruct
-| #n1 #IH #K2 *
-  [ <voids_zero #H destruct /2 width=1 by conj/
-  | #n2 <voids_succ <voids_succ >minus_S_S #H
-    elim (destruct_lbind_lbind_aux … H) -H #HK #_ (**) (* destruct lemma needed *)
-    elim (IH … HK) -IH -HK #H #Hn destruct /3 width=1 by conj, le_S_S/
-  ]
-]
-qed-.
-
-lemma voids_inv_pair_sn: ∀I,V,n1,K1,K2,n2. ⓧ*[n1]K1.ⓑ{I}V = ⓧ*[n2]K2 →
-                         ∧∧ ⓧ*[n1-n2]K1.ⓑ{I}V = K2 & n2 ≤ n1.
-#I #V #n1 elim n1 -n1
-[ #K1 #K2 <voids_zero * /2 width=1 by conj/
-  #n1 <voids_succ #H destruct
-| #n1 #IH #K1 #K2 *
-  [ <voids_zero #H destruct /2 width=1 by conj/
-  | #n2 <voids_succ <voids_succ >minus_S_S #H
-    elim (destruct_lbind_lbind_aux … H) -H #HK #_ (**) (* destruct lemma needed *)
-    elim (IH … HK) -IH -HK #H #Hn destruct /3 width=1 by conj, le_S_S/
-  ]
-]
-qed-.
-
-(* Main inversion properties ************************************************)
-
-theorem voids_inj: ∀n. injective … (λL. ⓧ*[n]L).
-#n elim n -n //
-#n #IH #L1 #L2
-<voids_succ <voids_succ #H
-elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
-/2 width=1 by/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/basic_2/syntax/voids_length.ma b/matita/matita/contribs/lambdadelta/basic_2/syntax/voids_length.ma
deleted file mode 100644 (file)
index c280cee..0000000
+++ /dev/null
@@ -1,46 +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                  *)
-(*                                                                        *)
-(**************************************************************************)
-
-include "basic_2/syntax/lenv_length.ma".
-include "basic_2/syntax/voids.ma".
-
-(* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
-
-(* Properties 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 length_void_le: ∀L,n. |L| ≤ |ⓧ*[n]L|.
-// qed.
-
-(* Main forward properties with length for local environments ***************)
-
-theorem voids_inj_length: ∀n1,n2,L1,L2. ⓧ*[n1]L1 = ⓧ*[n2]L2 →
-                          |L1| = |L2| → n1 = n2 ∧ L1 = L2.
-#n1 elim n1 -n1
-[ * /2 width=1 by conj/ #n2 #L1 #L2 | #n1 #IH * [ | #n2 ] #L1 #L2 ]
-[ <voids_zero #H destruct
-  <length_void <commutative_plus #H
-  elim (plus_xSy_x_false … H)
-| <voids_zero #H destruct
-  <length_void <commutative_plus #H
-  elim (plus_xSy_x_false … (sym_eq … H))
-| <voids_succ <voids_succ #H #HL12
-  elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
-  #H #_ elim (IH … H HL12) -IH -H -HL12 /2 width=1 by conj/
-]
-qed-.
index c2d6481efe72c9c048661d652a9e5e9a027ca703..b0f7fe2151bf0b6895bb312b3bba54072281cbba 100644 (file)
@@ -1 +1 @@
-for FILE in `find $1 -name "*.etc"`; do svn mv $FILE ${FILE/%.etc/.ma} ; done
+for FILE in `find $1 -name "*.etc"`; do git mv $FILE ${FILE/%.etc/.ma} ; done
index c357babf95089d5ebc22eb8918770c6b843ff0d2..fb59fcb786e84c360886d3642fdf2843e9ae6660 100644 (file)
@@ -146,6 +146,12 @@ lemma sle_inv_tl_dx: ∀f1,f2. f1 ⊆ ⫱f2 → ↑f1 ⊆ f2.
 /2 width=5 by sle_push, sle_weak/
 qed-.
 
+(* Properties with iteraded tail ********************************************)
+
+lemma sle_tls: ∀f1,f2. f1 ⊆ f2 → ∀i. ⫱*[i] f1 ⊆ ⫱*[i] f2.
+#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_tl/
+qed.
+
 (* Properties with isid *****************************************************)
 
 corec lemma sle_isid_sn: ∀f1. 𝐈⦃f1⦄ → ∀f2. f1 ⊆ f2.
index 27e0709039e19d1bf298ae7d7c407f258d900065..593d918735af0155cd9bdf77ec2c7ae58bd658f4 100644 (file)
@@ -5,6 +5,5 @@
     <key name="objects">ground_2/xoa/xoa2</key>
     <key name="notations">ground_2/notation/xoa/notation2</key>
     <key name="include">basics/pts.ma</key>
-    <key name="ex">3 6</key>
   </section>
 </helm_registry>
index e546af7763582629fa1f849439ffa711d60239b0..b135f45b4d71da5ff2835455f10fb210a2aa17a4 100644 (file)
@@ -1 +1 @@
-for FILE in `find $1 -name "*.ma"`; do svn mv $FILE ${FILE/%.ma/.etc} ; done
+for FILE in `find $1 -name "*.ma"`; do git mv $FILE ${FILE/%.ma/.etc} ; done