]> matita.cs.unibo.it Git - helm.git/commitdiff
partial update in delayed_updating
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Sun, 21 Aug 2022 22:43:28 +0000 (00:43 +0200)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Sun, 21 Aug 2022 22:43:28 +0000 (00:43 +0200)
+ syntax and substitution components updated
+ path_head parked and replaced by path_closed
+ balanced reductions introduced and main theorem proved
+ minor corrections to notation

46 files changed:
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_rmap_head.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_depth_labels.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_depth.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_structure.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_height_labels.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_labels.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_structure_labels.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/head/power_2.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_2.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/circled_times_1.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_1.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/power_2.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/tau_2.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uparrow_2.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uptriangle_1.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_3.ma
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_if_3.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_height.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_structure.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_labels.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_depth.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_height_labels.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_labels.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_labels.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma

diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc
new file mode 100644 (file)
index 0000000..f086d72
--- /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 DELAYED UPDATING ********************************************)
+
+notation "hvbox( ↳[ break term 46 n ] break term 70 p )"
+  non associative with precedence 70
+  for @{ 'DownArrowRight $n $p }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc
new file mode 100644 (file)
index 0000000..21b70c5
--- /dev/null
@@ -0,0 +1,61 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/lift_path.ma".
+include "delayed_updating/syntax/path_head.ma".
+include "ground/relocation/xap.ma".
+
+(* LIFT FOR PATH ************************************************************)
+
+(* Constructions with head for path *****************************************)
+
+lemma lift_path_head_closed (f) (p) (q) (n):
+      q = ↳[n]q →
+      ↳[↑[p●q]f@❨n❩]↑[↑[p]f]q = ↑[↑[p]f]q.
+#f #p #q elim q -q
+[ #n #H0
+  <(eq_inv_path_empty_head … H0) -H0
+  <path_head_zero //
+| #l #q #IH #n @(nat_ind_succ …n) -n [| #n #_ ]
+  [ <path_head_zero #H0 destruct
+  | cases l [ #k ]
+    [ <path_head_d_dx #H0
+      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
+      <lift_rmap_d_dx <lift_path_d_dx
+      <tr_xap_succ_nap <path_head_d_dx
+      <(IH … H0) in ⊢ (???%); -IH -H0 <tr_xap_plus //
+    | <path_head_m_dx #H0
+      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
+      <lift_rmap_m_dx <lift_path_m_dx
+      <tr_xap_succ_nap <path_head_m_dx
+      <(IH … H0) in ⊢ (???%); -IH -H0 //
+    | <path_head_L_dx #H0
+      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
+      <lift_rmap_L_dx <lift_path_L_dx
+      <tr_xap_succ_nap <path_head_L_dx
+      <(IH … H0) in ⊢ (???%); -IH -H0 //
+    | <path_head_A_dx #H0
+      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
+      <lift_rmap_A_dx <lift_path_A_dx
+      <tr_xap_succ_nap <path_head_A_dx
+      <(IH … H0) in ⊢ (???%); -IH -H0 //
+    | <path_head_S_dx #H0
+      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
+      <lift_rmap_S_dx <lift_path_S_dx
+      <tr_xap_succ_nap <path_head_S_dx
+      <(IH … H0) in ⊢ (???%); -IH -H0 //
+    ]
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_rmap_head.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_rmap_head.etc
new file mode 100644 (file)
index 0000000..033a2c1
--- /dev/null
@@ -0,0 +1,57 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/lift_rmap_eq.ma".
+include "delayed_updating/syntax/path_head.ma".
+include "ground/lib/stream_eq_eq.ma".
+
+(* LIFT MAP FOR PATH ********************************************************)
+
+(* Constructions with path_head *********************************************)
+
+lemma tls_plus_lift_rmap_closed (f) (q) (n) (m):
+      q = ↳[n]q →
+      ⇂*[m]f ≗ ⇂*[n+m]↑[q]f.
+#f #q elim q -q
+[ #n #m #Hq
+  <(eq_inv_path_empty_head … Hq) -n //
+| #l #q #IH #n @(nat_ind_succ … n) -n //
+  #n #_ #m cases l [ #k ]
+  [ <path_head_d_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq <nrplus_inj_sn
+    @(stream_eq_trans … (tls_lift_rmap_d_dx …))
+    >nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn <nplus_plus_comm_23
+    >nsucc_unfold /2 width=1 by/
+  | <path_head_m_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    <lift_rmap_m_dx /2 width=1 by/
+  | <path_head_L_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    <lift_rmap_L_dx <nplus_succ_sn /2 width=1 by/
+  | <path_head_A_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    <lift_rmap_A_dx /2 width=2 by/
+  | <path_head_S_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    <lift_rmap_S_dx /2 width=2 by/
+  ]
+]
+qed-.
+
+lemma tls_lift_rmap_closed (f) (q) (n):
+      q = ↳[n]q →
+      f ≗ ⇂*[n]↑[q]f.
+#f #q #n #H0
+/2 width=1 by tls_plus_lift_rmap_closed/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_depth_labels.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_depth_labels.etc
new file mode 100644 (file)
index 0000000..791a09a
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_depth.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* DEPTH FOR PATH ***********************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma depth_labels_L (n):
+      n = ♭(𝗟∗∗n).
+#n @(nat_ind_succ … n) -n //
+#n #IH <labels_succ <depth_L_dx //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc
new file mode 100644 (file)
index 0000000..08054d9
--- /dev/null
@@ -0,0 +1,162 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_labels.ma".
+include "delayed_updating/notation/functions/downarrowright_2.ma".
+include "ground/arith/nat_plus.ma".
+include "ground/arith/nat_pred_succ.ma".
+
+(* HEAD FOR PATH ************************************************************)
+
+rec definition path_head (n) (p) on p: path ≝
+match n with
+[ nzero  ⇒ 𝐞
+| ninj m ⇒
+  match p with
+  [ list_empty     ⇒ 𝗟∗∗n
+  | list_lcons l q ⇒
+    match l with
+    [ label_d k ⇒ (path_head (n+k) q)◖l
+    | label_m   ⇒ (path_head n q)◖l
+    | label_L   ⇒ (path_head (↓m) q)◖l
+    | label_A   ⇒ (path_head n q)◖l
+    | label_S   ⇒ (path_head n q)◖l
+    ]
+  ]
+].
+
+interpretation
+  "head (path)"
+  'DownArrowRight n p = (path_head n p).
+
+(* basic constructions ****************************************************)
+
+lemma path_head_zero (p):
+      (𝐞) = ↳[𝟎]p.
+* // qed.
+
+lemma path_head_empty (n):
+      (𝗟∗∗n) = ↳[n]𝐞.
+* // qed.
+
+lemma path_head_d_dx (p) (n) (k:pnat):
+      (↳[↑n+k]p)◖𝗱k = ↳[↑n](p◖𝗱k).
+// qed.
+
+lemma path_head_m_dx (p) (n):
+      (↳[↑n]p)◖𝗺 = ↳[↑n](p◖𝗺).
+// qed.
+
+lemma path_head_L_dx (p) (n):
+      (↳[n]p)◖𝗟 = ↳[↑n](p◖𝗟).
+#p #n
+whd in ⊢ (???%); //
+qed.
+
+lemma path_head_A_dx (p) (n):
+      (↳[↑n]p)◖𝗔 = ↳[↑n](p◖𝗔).
+// qed.
+
+lemma path_head_S_dx (p) (n):
+      (↳[↑n]p)◖𝗦 = ↳[↑n](p◖𝗦).
+// qed.
+
+(* Basic inversions *********************************************************)
+
+lemma eq_inv_path_head_zero_dx (q) (p):
+      q = ↳[𝟎]p → 𝐞 = q.
+#q * //
+qed-.
+
+lemma eq_inv_path_empty_head (p) (n):
+      (𝐞) = ↳[n]p → 𝟎 = n.
+*
+[ #n <path_head_empty #H0
+  <(eq_inv_empty_labels … H0) -n //
+| * [ #k ] #p #n @(nat_ind_succ … n) -n // #n #_
+  [ <path_head_d_dx
+  | <path_head_m_dx
+  | <path_head_L_dx
+  | <path_head_A_dx
+  | <path_head_S_dx
+  ] #H0 destruct
+]
+qed-.
+
+(* Constructions with path_append *******************************************)
+
+lemma path_head_refl_append_bi (p) (q) (m) (n):
+      p = ↳[m]p → q = ↳[n]q → p●q = ↳[n+m](p●q).
+#p #q elim q -q
+[ #m #n #Hp #H0
+  <(eq_inv_path_empty_head … H0) -n //
+| #l #q #IH #m #n #Hp
+  @(nat_ind_succ … n) -n // #n #_
+  cases l [ #k ]
+  <list_append_lcons_sn <nplus_succ_sn
+  [ <path_head_d_dx <path_head_d_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    >(IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq
+    <nplus_plus_comm_23 //
+  | <path_head_m_dx <path_head_m_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    >(IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq //
+  | <path_head_L_dx <path_head_L_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    >(IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq //
+  | <path_head_A_dx <path_head_A_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    >(IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq //
+  | <path_head_S_dx <path_head_S_dx #Hq
+    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+    >(IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq //
+  ]
+qed.
+
+lemma path_head_refl_append_sn (p) (q) (n):
+      q = ↳[n]q → q = ↳[n](p●q).
+#p #q elim q -q
+[ #n #Hn <(eq_inv_path_empty_head … Hn) -Hn //
+| #l #q #IH #n @(nat_ind_succ … n) -n
+  [ #Hq | #n #_ cases l [ #k ] ]
+  [ lapply (eq_inv_path_head_zero_dx … Hq) -Hq #Hq destruct
+  | <path_head_d_dx <path_head_d_dx
+  | <path_head_m_dx <path_head_m_dx
+  | <path_head_L_dx <path_head_L_dx
+  | <path_head_A_dx <path_head_A_dx
+  | <path_head_S_dx <path_head_S_dx
+  ] #Hq
+  elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+  /3 width=1 by eq_f/
+]
+qed-.
+
+(* Inversions with path_append **********************************************)
+
+lemma eq_inv_path_head_refl_append_sn (p) (q) (n):
+      q = ↳[n](p●q) → q = ↳[n]q.
+#p #q elim q -q
+[ #n #Hn <(eq_inv_path_empty_head … Hn) -p //
+| #l #q #IH #n @(nat_ind_succ … n) -n //
+  #n #_ cases l [ #k ]
+  [ <path_head_d_dx <path_head_d_dx
+  | <path_head_m_dx <path_head_m_dx
+  | <path_head_L_dx <path_head_L_dx
+  | <path_head_A_dx <path_head_A_dx
+  | <path_head_S_dx <path_head_S_dx
+  ] #Hq
+  elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
+  /3 width=1 by eq_f/
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_depth.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_depth.etc
new file mode 100644 (file)
index 0000000..6283e2c
--- /dev/null
@@ -0,0 +1,35 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_head.ma".
+include "delayed_updating/syntax/path_height_labels.ma".
+include "delayed_updating/syntax/path_depth_labels.ma".
+
+(* HEAD FOR PATH ************************************************************)
+
+(* Constructions with depth and height **************************************)
+
+lemma path_head_depth (p) (n):
+      n + ♯(↳[n]p) = ♭↳[n]p.
+#p elim p -p // #l #p #IH
+#n @(nat_ind_succ … n) -n // #n #_
+cases l [ #k ]
+[ <path_head_d_dx <height_d_dx <depth_d_dx <IH //
+| <path_head_m_dx <height_m_dx <depth_m_dx //
+| <path_head_L_dx <height_L_dx <depth_L_dx
+  <nplus_succ_sn //
+| <path_head_A_dx <height_A_dx <depth_A_dx //
+| <path_head_S_dx <height_S_dx <depth_S_dx //
+]
+qed-. (**) (* gets in the way with auto *)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_structure.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_structure.etc
new file mode 100644 (file)
index 0000000..37ca7be
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_head_depth.ma".
+include "delayed_updating/syntax/path_structure_labels.ma".
+
+(* HEAD FOR PATH ************************************************************)
+
+(* Constructions with structure *********************************************)
+
+lemma path_head_structure_height (p) (n):
+      ⊗↳[n]p = ↳[n+♯↳[n]p]⊗p.
+#p elim p -p //
+#l #p #IH #n @(nat_ind_succ … n) -n //
+#n #_ cases l [ #k ]
+[ <height_d_dx <structure_d_dx //
+| <structure_m_dx //
+| <structure_L_dx //
+| <height_A_dx <structure_A_dx <nplus_succ_sn <path_head_A_dx //
+| <height_S_dx <structure_S_dx <nplus_succ_sn <path_head_S_dx //
+]
+qed.
+
+lemma path_head_structure_depth (p) (n):
+      ⊗↳[n]p = ↳[♭↳[n]p]⊗p.
+#p #n
+<path_head_depth //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_height_labels.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_height_labels.etc
new file mode 100644 (file)
index 0000000..fb55c36
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_height.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* HEIGHT FOR PATH **********************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma height_labels_L (n):
+      (𝟎) = ♯(𝗟∗∗n).
+#n @(nat_ind_succ … n) -n //
+#n #IH <labels_succ <height_L_dx //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_labels.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_labels.etc
new file mode 100644 (file)
index 0000000..7f0a71a
--- /dev/null
@@ -0,0 +1,50 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/power_2.ma".
+include "ground/arith/nat_succ_iter.ma".
+
+(* *)
+
+definition labels (l) (n:nat): path ≝
+           ((list_lcons ? l)^n) (𝐞).
+
+interpretation
+  "labels (path)"
+  'Power l n = (labels l n).
+
+(* Basic constructions ******************************************************)
+
+lemma labels_unfold (l) (n):
+      ((list_lcons ? l)^n) (𝐞) = l∗∗n.
+// qed.
+
+lemma labels_zero (l):
+      (𝐞) = l∗∗𝟎.
+// qed.
+
+lemma labels_succ (l) (n):
+      (l∗∗n)◖l = l∗∗(↑n).
+#l #n
+<labels_unfold <labels_unfold <niter_succ //
+qed.
+
+(* Basic inversions *********************************************************)
+
+lemma eq_inv_empty_labels (l) (n):
+      (𝐞) = l∗∗n → 𝟎 = n.
+#l #n @(nat_ind_succ … n) -n //
+#n #_ <labels_succ #H0 destruct
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_structure_labels.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_structure_labels.etc
new file mode 100644 (file)
index 0000000..0dcc367
--- /dev/null
@@ -0,0 +1,25 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* STRUCTURE FOR PATH *******************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma structure_labels_L (n):
+      (𝗟∗∗n) = ⊗(𝗟∗∗n).
+#n @(nat_ind_succ … n) -n //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/power_2.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/power_2.etc
new file mode 100644 (file)
index 0000000..bed0c7f
--- /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 DELAYED UPDATING ********************************************)
+
+notation "hvbox( a ∗∗ break b )"
+  left associative with precedence 65
+  for @{ 'Power $a $b }.
index ddb2bc56dfe94d7ed022a620206f148519980c40..8299e9384d34f6ff4b17167845b53cb3fd76083a 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ▼[ term 46 f ] break term 70 p )"
+notation "hvbox( ▼[ break term 46 f ] break term 70 p )"
   non associative with precedence 70
   for @{ 'BlackDownTriangle $f $p }.
index 90b0758066a3d5fa41346d100d13c75e2aa6cfb1..020fc5538c586dbc58b5739d0aab354c8e49d62c 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ▶[ term 46 f ] break term 70 p )"
+notation "hvbox( ▶[ break term 46 f ] break term 70 p )"
   non associative with precedence 70
   for @{ 'BlackRightTriangle $f $p }.
index 8c39289b57e329bf05983213d4d313d5d589c7bb..a489dc8dad38a99275c857c88ad918a8575ac53b 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ⊗ term 70 p )"
+notation "hvbox( ⊗ break term 70 p )"
   non associative with precedence 70
   for @{ 'CircledTimes $p }.
index 41a736d627b1dc321b309ae7a2eb938b4458b244..352144291a5582e23a0de761d9e271f510a995e9 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( 𝐂❨ term 46 n ❩ )"
+notation "hvbox( 𝐂❨ break term 46 n ❩ )"
   non associative with precedence 70
   for @{ 'ClassC $n }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma
deleted file mode 100644 (file)
index 7531c6b..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 DELAYED UPDATING ********************************************)
-
-notation "hvbox( ↳[ term 46 n ] break term 70 p )"
-  non associative with precedence 70
-  for @{ 'DownArrowRight $n $p }.
index 5d873910b830a867fee3cf0586877d42f901fd18..077255a352c8bcc524c5b46922e796da67fc82e4 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ♭ term 70 p )"
+notation "hvbox( ♭ break term 70 p )"
   non associative with precedence 70
   for @{ 'Flat $p }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/power_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/power_2.ma
deleted file mode 100644 (file)
index bed0c7f..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 DELAYED UPDATING ********************************************)
-
-notation "hvbox( a ∗∗ break b )"
-  left associative with precedence 65
-  for @{ 'Power $a $b }.
index 099360ccedc5fab98be1d2c41f0e6a23dfea21e0..6d4dd88392845b22257b231ef6cb39f5dce9c7dd 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( 𝛕 break term 76 n. break term 70 t )"
+notation "hvbox( 𝛕 break term 76 n . break term 70 t )"
   non associative with precedence 70
   for @{ 'Tau $n $t }.
index 2cbac4b24005e59a87b1c751dd77ae6db6ae4664..b3123df7b7c7637d88d9ad60dc8f1eb2f5f45f81 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ↑[ term 46 t1 ] break term 70 t2  )"
+notation "hvbox( ↑[ break term 46 t1 ] break term 70 t2  )"
   non associative with precedence 70
   for @{ 'UpArrow $t1 $t2 }.
index df2bee52cc7073f705ce74a25ef069ad7781409d..9a3516c7b58e206759b668a3d554fffe328fec3c 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ▵ term 70 t )"
+notation "hvbox( ▵ break term 70 t )"
   non associative with precedence 70
   for @{ 'UpTriangle $t }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma
new file mode 100644 (file)
index 0000000..390aabf
--- /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 DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 ➡𝐝𝐛𝐟[ break term 46 r ] break term 46 t2 )"
+  non associative with precedence 45
+  for @{ 'BlackRightArrowDBF $t1 $r $t2 }.
index f50962063086f16592e82a5f8c1888d553d77c51..1750f335b99ed4001263b7dbdac1efa25673fba1 100644 (file)
@@ -15,5 +15,5 @@
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
 notation "hvbox( t1 ➡𝐝𝐟[ break term 46 r ] break term 46 t2 )"
-   non associative with precedence 45
-   for @{ 'BlackRightArrowDF $t1 $r $t2 }.
+  non associative with precedence 45
+  for @{ 'BlackRightArrowDF $t1 $r $t2 }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma
new file mode 100644 (file)
index 0000000..12a1b0f
--- /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 DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 ➡𝐢𝐛𝐟[ break term 46 r ] break term 46 t2 )"
+  non associative with precedence 45
+  for @{ 'BlackRightArrowIBF $t1 $r $t2 }.
index d2568773ab2c7281cbae90e2b71dd1cbe133c4af..90fe54b75f0b234ffbcb71dc0560eec679cb1c91 100644 (file)
@@ -15,5 +15,5 @@
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
 notation "hvbox( t1 ➡𝐢𝐟[ break term 46 r ] break term 46 t2 )"
-   non associative with precedence 45
-   for @{ 'BlackRightArrowIF $t1 $r $t2 }.
+  non associative with precedence 45
+  for @{ 'BlackRightArrowIF $t1 $r $t2 }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma
new file mode 100644 (file)
index 0000000..349195c
--- /dev/null
@@ -0,0 +1,38 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/syntax/prototerm_constructors.ma".
+include "delayed_updating/syntax/prototerm_eq.ma".
+include "delayed_updating/syntax/path_head.ma".
+include "delayed_updating/syntax/path_balanced.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/notation/relations/black_rightarrow_dbf_3.ma".
+include "ground/arith/nat_rplus.ma".
+include "ground/xoa/ex_6_5.ma".
+
+(* DELAYED BALANCED FOCUSED REDUCTION ***************************************)
+
+(**) (* explicit ninj because we cannot declare the expectd type of k *)
+definition dbfr (r): relation2 prototerm prototerm ≝
+           λt1,t2.
+           ∃∃p,b,q,h,k. p●𝗔◗b●𝗟◗q = r &
+           ⊗b ϵ 𝐁 & b = ↳[h]b &
+           (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 &
+           t1[⋔r←𝛕(k+h).(t1⋔(p◖𝗦))] ⇔ t2
+.
+
+interpretation
+  "balanced focused reduction with delayed updating (prototerm)"
+  'BlackRightArrowDBF t1 r t2 = (dbfr r t1 t2).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma
new file mode 100644 (file)
index 0000000..043f610
--- /dev/null
@@ -0,0 +1,78 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/reduction/dbfr.ma".
+include "delayed_updating/reduction/ibfr.ma".
+
+include "delayed_updating/unwind/unwind2_constructors.ma".
+include "delayed_updating/unwind/unwind2_preterm_fsubst.ma".
+include "delayed_updating/unwind/unwind2_preterm_eq.ma".
+include "delayed_updating/unwind/unwind2_prototerm_lift.ma".
+include "delayed_updating/unwind/unwind2_rmap_head.ma".
+
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_prototerm_eq.ma".
+
+include "delayed_updating/syntax/prototerm_proper_constructors.ma".
+include "delayed_updating/syntax/path_head_structure.ma".
+include "delayed_updating/syntax/path_structure_depth.ma".
+
+(* DELAYED BALANCED FOCUSED REDUCTION ***************************************)
+
+(* Main destructions with ibfr **********************************************)
+
+theorem dbfr_des_ibfr (f) (t1) (t2) (r): t1 ϵ 𝐓 →
+        t1 ➡𝐝𝐛𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐛𝐟[⊗r] ▼[f]t2.
+#f #t1 #t2 #r #H0t1
+* #p #b #q #h #k #Hr #Hb #Hh #H1k #Ht1 #Ht2 destruct
+@(ex6_5_intro … (⊗p) (⊗b) (⊗q) (♭b) (↑♭q))
+[ -H0t1 -Hb -Hh -H1k -Ht1 -Ht2 //
+| -H0t1 -Hh -H1k -Ht1 -Ht2 //
+| -H0t1 -Hb -Ht1 -H1k -Ht2
+  >Hh in ⊢ (??%?); >path_head_structure_depth <Hh -Hh //
+| -H0t1 -Hb -Hh -Ht1 -Ht2
+  >structure_L_sn
+  >H1k in ⊢ (??%?); >path_head_structure_depth <H1k -H1k //
+| lapply (in_comp_unwind2_path_term f … Ht1) -Ht2 -Ht1 -H0t1 -Hb -Hh
+  <unwind2_path_d_dx >list_append_rcons_dx >list_append_assoc
+  lapply (unwind2_rmap_append_pap_closed f … (p●𝗔◗b) … H1k) -H1k
+  <depth_L_sn #H2k
+  lapply (eq_inv_ninj_bi … H2k) -H2k #H2k <H2k -H2k #Ht1 //
+| lapply (unwind2_term_eq_repl_dx f … Ht2) -Ht2 #Ht2
+  lapply (path_head_refl_append_bi … Hh H1k) -Hh -H1k <nrplus_inj_sn #H1k
+  @(subset_eq_trans … Ht2) -t2
+  @(subset_eq_trans … (unwind2_term_fsubst_ppc …))
+  [ @fsubst_eq_repl [ // | // ]
+    @(subset_eq_trans … (unwind2_term_iref …))
+    @(subset_eq_canc_sn … (lift_term_eq_repl_dx …))
+    [ @unwind2_term_grafted_S /2 width=2 by ex_intro/ | skip ] -Ht1
+    @(subset_eq_trans … (lift_unwind2_term_after …))
+    @unwind2_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+    <list_append_rcons_sn
+    @(stream_eq_trans … (tr_compose_uni_dx …))
+    @tr_compose_eq_repl
+    [ <unwind2_rmap_append_pap_closed //
+      <depth_append <depth_L_sn
+      <nplus_comm <nrplus_npsucc_sn <nplus_succ_sn //
+    | >unwind2_rmap_A_dx
+      /2 width=1 by tls_unwind2_rmap_closed/
+    ]
+(* Note: crux of the proof ends *)
+  | //
+  | /2 width=2 by ex_intro/
+  | //
+  ]
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma
new file mode 100644 (file)
index 0000000..f237289
--- /dev/null
@@ -0,0 +1,51 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/reduction/dbfr.ma".
+
+include "delayed_updating/substitution/fsubst_lift.ma".
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_constructors.ma".
+include "delayed_updating/substitution/lift_path_head.ma".
+include "delayed_updating/substitution/lift_rmap_head.ma".
+
+(* DELAYED BALANCED FOCUSED REDUCTION ***************************************)
+
+(* Constructions with lift **************************************************)
+
+theorem dfr_lift_bi (f) (t1) (t2) (r):
+        t1 ➡𝐝𝐛𝐟[r] t2 → ↑[f]t1 ➡𝐝𝐛𝐟[↑[f]r] ↑[f]t2.
+#f #t1 #t2 #r
+* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct
+@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩))
+[ -H1k -Ht1 -Ht2 //
+| -Ht1 -Ht2
+  <lift_rmap_L_dx >lift_path_L_sn
+  <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k //
+| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k
+  <lift_path_d_dx #Ht1 //
+| lapply (lift_term_eq_repl_dx f … Ht2) -Ht2 #Ht2 -Ht1
+  @(subset_eq_trans … Ht2) -t2
+  @(subset_eq_trans … (lift_term_fsubst …))
+  @fsubst_eq_repl [ // | // ]
+  @(subset_eq_trans … (lift_term_iref …))
+  @iref_eq_repl
+  @(subset_eq_canc_sn … (lift_term_grafted_S …))
+  @lift_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+  >list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx
+  /2 width=1 by tls_lift_rmap_closed/
+(* Note: crux of the proof ends *)
+]
+qed.
index a610cd323ed07e5f49c0ec63a2c81ca246facb7d..d0dcf4eee46d82e5b652d446ae486eeac26843b8 100644 (file)
@@ -16,7 +16,6 @@ include "delayed_updating/substitution/fsubst.ma".
 include "delayed_updating/syntax/prototerm_constructors.ma".
 include "delayed_updating/syntax/prototerm_eq.ma".
 include "delayed_updating/syntax/path_head.ma".
-include "delayed_updating/syntax/path_depth.ma".
 include "delayed_updating/notation/relations/black_rightarrow_df_3.ma".
 include "ground/xoa/ex_4_3.ma".
 
index 71a599326aeef8a38fec6578e4382153ff7cca6b..b60bd708c681b172e2f4c4ebbfdc3b403abe2879 100644 (file)
@@ -24,8 +24,6 @@ include "delayed_updating/substitution/lift_rmap_head.ma".
 
 (* Constructions with lift **************************************************)
 
-(* ↑[↑[p◖𝗔◖𝗟]f]q *)
-
 theorem dfr_lift_bi (f) (t1) (t2) (r):
         t1 ➡𝐝𝐟[r] t2 → ↑[f]t1 ➡𝐝𝐟[↑[f]r] ↑[f]t2.
 #f #t1 #t2 #r
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma
new file mode 100644 (file)
index 0000000..b235cb4
--- /dev/null
@@ -0,0 +1,39 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/substitution/lift_prototerm.ma".
+include "delayed_updating/syntax/prototerm_eq.ma".
+include "delayed_updating/syntax/path_head.ma".
+include "delayed_updating/syntax/path_balanced.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/notation/relations/black_rightarrow_ibf_3.ma".
+include "ground/relocation/tr_uni.ma".
+include "ground/arith/nat_rplus.ma".
+include "ground/xoa/ex_6_5.ma".
+
+(* IMMEDIATE BALANCED FOCUSED REDUCTION *************************************)
+
+(**) (* explicit ninj because we cannot declare the expectd type of k *)
+definition ibfr (r): relation2 prototerm prototerm ≝
+           λt1,t2.
+           ∃∃p,b,q,h,k. p●𝗔◗b●𝗟◗q = r &
+           ⊗b ϵ 𝐁 & b = ↳[h]b &
+           (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 &
+           t1[⋔r←↑[𝐮❨k+h❩](t1⋔(p◖𝗦))] ⇔ t2
+.
+
+interpretation
+  "balanced focused reduction with immediate updating (prototerm)"
+  'BlackRightArrowIBF t1 r t2 = (ibfr r t1 t2).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma
new file mode 100644 (file)
index 0000000..b332b84
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/lift_path.ma".
+include "delayed_updating/syntax/path_closed.ma".
+include "ground/relocation/xap.ma".
+
+(* LIFT FOR PATH ************************************************************)
+
+(* Constructions with pcc ***************************************************)
+
+lemma lift_path_closed (f) (q) (n):
+      q ϵ 𝐂❨n❩ → ↑[f]q ϵ 𝐂❨↑[q]f@❨n❩❩.
+#f #q #n #Hq elim Hq -Hq //
+#q #n [ #k ] #_ #IH
+/2 width=1 by pcc_d_dx, pcc_m_dx, pcc_L_dx, pcc_A_dx, pcc_S_dx/
+qed.
+
+lemma lift_path_rmap_closed (f) (p) (q) (n):
+      q ϵ 𝐂❨n❩ → ↑[↑[p]f]q ϵ 𝐂❨↑[p●q]f@❨n❩❩.
+/2 width=1 by lift_path_closed/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma
deleted file mode 100644 (file)
index 21b70c5..0000000
+++ /dev/null
@@ -1,61 +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 "delayed_updating/substitution/lift_path.ma".
-include "delayed_updating/syntax/path_head.ma".
-include "ground/relocation/xap.ma".
-
-(* LIFT FOR PATH ************************************************************)
-
-(* Constructions with head for path *****************************************)
-
-lemma lift_path_head_closed (f) (p) (q) (n):
-      q = ↳[n]q →
-      ↳[↑[p●q]f@❨n❩]↑[↑[p]f]q = ↑[↑[p]f]q.
-#f #p #q elim q -q
-[ #n #H0
-  <(eq_inv_path_empty_head … H0) -H0
-  <path_head_zero //
-| #l #q #IH #n @(nat_ind_succ …n) -n [| #n #_ ]
-  [ <path_head_zero #H0 destruct
-  | cases l [ #k ]
-    [ <path_head_d_dx #H0
-      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
-      <lift_rmap_d_dx <lift_path_d_dx
-      <tr_xap_succ_nap <path_head_d_dx
-      <(IH … H0) in ⊢ (???%); -IH -H0 <tr_xap_plus //
-    | <path_head_m_dx #H0
-      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
-      <lift_rmap_m_dx <lift_path_m_dx
-      <tr_xap_succ_nap <path_head_m_dx
-      <(IH … H0) in ⊢ (???%); -IH -H0 //
-    | <path_head_L_dx #H0
-      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
-      <lift_rmap_L_dx <lift_path_L_dx
-      <tr_xap_succ_nap <path_head_L_dx
-      <(IH … H0) in ⊢ (???%); -IH -H0 //
-    | <path_head_A_dx #H0
-      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
-      <lift_rmap_A_dx <lift_path_A_dx
-      <tr_xap_succ_nap <path_head_A_dx
-      <(IH … H0) in ⊢ (???%); -IH -H0 //
-    | <path_head_S_dx #H0
-      elim (eq_inv_list_lcons_bi ????? H0) -H0 #_ #H0
-      <lift_rmap_S_dx <lift_path_S_dx
-      <tr_xap_succ_nap <path_head_S_dx
-      <(IH … H0) in ⊢ (???%); -IH -H0 //
-    ]
-  ]
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma
new file mode 100644 (file)
index 0000000..58bef81
--- /dev/null
@@ -0,0 +1,36 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/substitution/lift_rmap_eq.ma".
+include "delayed_updating/syntax/path_closed.ma".
+include "ground/lib/stream_eq_eq.ma".
+
+(* LIFT MAP FOR PATH ********************************************************)
+
+(* Destructions with cpp ****************************************************)
+
+lemma tls_plus_lift_rmap_closed (f) (q) (n):
+      q ϵ 𝐂❨n❩ →
+      ∀m. ⇂*[m]f ≗ ⇂*[m+n]↑[q]f.
+#f #q #n #Hq elim Hq -q -n //
+#q #n #_ #IH #m
+<nplus_succ_dx <stream_tls_swap //
+qed-.
+
+lemma tls_lift_rmap_closed (f) (q) (n):
+      q ϵ 𝐂❨n❩ →
+      f ≗ ⇂*[n]↑[q]f.
+#f #q #n #H0
+/2 width=1 by tls_plus_lift_rmap_closed/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma
deleted file mode 100644 (file)
index 033a2c1..0000000
+++ /dev/null
@@ -1,57 +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 "delayed_updating/substitution/lift_rmap_eq.ma".
-include "delayed_updating/syntax/path_head.ma".
-include "ground/lib/stream_eq_eq.ma".
-
-(* LIFT MAP FOR PATH ********************************************************)
-
-(* Constructions with path_head *********************************************)
-
-lemma tls_plus_lift_rmap_closed (f) (q) (n) (m):
-      q = ↳[n]q →
-      ⇂*[m]f ≗ ⇂*[n+m]↑[q]f.
-#f #q elim q -q
-[ #n #m #Hq
-  <(eq_inv_path_empty_head … Hq) -n //
-| #l #q #IH #n @(nat_ind_succ … n) -n //
-  #n #_ #m cases l [ #k ]
-  [ <path_head_d_dx #Hq
-    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq <nrplus_inj_sn
-    @(stream_eq_trans … (tls_lift_rmap_d_dx …))
-    >nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn <nplus_plus_comm_23
-    >nsucc_unfold /2 width=1 by/
-  | <path_head_m_dx #Hq
-    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-    <lift_rmap_m_dx /2 width=1 by/
-  | <path_head_L_dx #Hq
-    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-    <lift_rmap_L_dx <nplus_succ_sn /2 width=1 by/
-  | <path_head_A_dx #Hq
-    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-    <lift_rmap_A_dx /2 width=2 by/
-  | <path_head_S_dx #Hq
-    elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-    <lift_rmap_S_dx /2 width=2 by/
-  ]
-]
-qed-.
-
-lemma tls_lift_rmap_closed (f) (q) (n):
-      q = ↳[n]q →
-      f ≗ ⇂*[n]↑[q]f.
-#f #q #n #H0
-/2 width=1 by tls_plus_lift_rmap_closed/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed.ma
new file mode 100644 (file)
index 0000000..fd7a995
--- /dev/null
@@ -0,0 +1,162 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/class_c_1.ma".
+include "ground/arith/nat_plus.ma".
+include "ground/arith/nat_pred_succ.ma".
+include "ground/lib/subset.ma".
+include "ground/generated/insert_eq_1.ma".
+
+(* CLOSED CONDITION FOR PATH ************************************************)
+
+inductive pcc: relation2 nat path ≝
+| pcc_empty:
+  pcc (𝟎) (𝐞)
+| pcc_d_dx (p) (n) (k):
+  pcc (n+ninj k) p → pcc n (p◖𝗱k)
+| pcc_m_dx (p) (n):
+  pcc n p → pcc n (p◖𝗺)
+| pcc_L_dx (p) (n):
+  pcc n p → pcc (↑n) (p◖𝗟)
+| pcc_A_dx (p) (n):
+  pcc n p → pcc n (p◖𝗔)
+| pcc_S_dx (p) (n):
+  pcc n p → pcc n (p◖𝗦)
+.
+
+interpretation
+  "closed condition (path)"
+  'ClassC n = (pcc n).
+
+(* Basic inversions ********************************************************)
+
+lemma pcc_inv_empty (n):
+      (𝐞) ϵ 𝐂❨n❩ → 𝟎 = n.
+#n @(insert_eq_1 … (𝐞))
+#x * -n //
+#p #n [ #k ] #_ #H0 destruct
+qed-.
+
+lemma pcc_inv_d_dx (p) (n) (k):
+      p◖𝗱k ϵ 𝐂❨n❩ → p ϵ 𝐂❨n+k❩.
+#p #n #h @(insert_eq_1 … (p◖𝗱h))
+#x * -x -n
+[|*: #x #n [ #k ] #Hx ] #H0 destruct //
+qed-.
+
+lemma pcc_inv_m_dx (p) (n):
+      p◖𝗺 ϵ 𝐂❨n❩ → p ϵ 𝐂❨n❩.
+#p #n @(insert_eq_1 … (p◖𝗺))
+#x * -x -n
+[|*: #x #n [ #k ] #Hx ] #H0 destruct //
+qed-.
+
+lemma pcc_inv_L_dx (p) (n):
+      p◖𝗟 ϵ 𝐂❨n❩ →
+      ∧∧ p ϵ 𝐂❨↓n❩ & ↑↓n = n.
+#p #n @(insert_eq_1 … (p◖𝗟))
+#x * -x -n
+[|*: #x #n [ #k ] #Hx ] #H0 destruct
+<npred_succ /2 width=1 by conj/
+qed-.
+
+lemma pcc_inv_A_dx (p) (n):
+      p◖𝗔 ϵ 𝐂❨n❩ → p ϵ 𝐂❨n❩.
+#p #n @(insert_eq_1 … (p◖𝗔))
+#x * -x -n
+[|*: #x #n [ #k ] #Hx ] #H0 destruct //
+qed-.
+
+lemma pcc_inv_S_dx (p) (n):
+      p◖𝗦 ϵ 𝐂❨n❩ → p ϵ 𝐂❨n❩.
+#p #n @(insert_eq_1 … (p◖𝗦))
+#x * -x -n
+[|*: #x #n [ #k ] #Hx ] #H0 destruct //
+qed-.
+
+(* Advanced inversions ******************************************************)
+
+lemma pcc_inv_empty_succ (n):
+      (𝐞) ϵ 𝐂❨↑n❩ → ⊥.
+#n #H0
+lapply (pcc_inv_empty … H0) -H0 #H0
+/2 width=7 by eq_inv_zero_nsucc/
+qed-.
+
+lemma pcc_inv_L_dx_zero (p):
+      p◖𝗟 ϵ 𝐂❨𝟎❩ → ⊥.
+#p #H0
+elim (pcc_inv_L_dx … H0) -H0 #_ #H0
+/2 width=7 by eq_inv_nsucc_zero/
+qed-.
+
+lemma pcc_inv_L_dx_succ (p) (n):
+      p◖𝗟 ϵ 𝐂❨↑n❩ → p ϵ 𝐂❨n❩.
+#p #n #H0
+elim (pcc_inv_L_dx … H0) -H0 //
+qed-.
+
+(* Main constructions with path_append **************************************)
+
+theorem pcc_append_bi (p) (q) (m) (n):
+        p ϵ 𝐂❨m❩ → q ϵ 𝐂❨n❩ → p●q ϵ 𝐂❨m+n❩.
+#p #q #m #n #Hm #Hm elim Hm -Hm // -Hm
+#p #n [ #k ] #_ #IH [3: <nplus_succ_dx ]
+/2 width=1 by pcc_d_dx, pcc_m_dx, pcc_L_dx, pcc_A_dx, pcc_S_dx/
+qed.
+
+(* Main inversions **********************************************************)
+
+theorem ppc_mono (q) (n1):
+        q ϵ 𝐂❨n1❩ → ∀n2. q ϵ 𝐂❨n2❩ → n1 = n2.
+#q1 #n1 #Hn1 elim Hn1 -q1 -n1
+[|*: #q1 #n1 [ #k1 ] #_ #IH ] #n2 #Hn2
+[ <(pcc_inv_empty … Hn2) -n2 //
+| lapply (pcc_inv_d_dx … Hn2) -Hn2 #Hn2
+  lapply (IH … Hn2) -q1 #H0
+  /2 width=2 by eq_inv_nplus_bi_dx/
+| lapply (pcc_inv_m_dx … Hn2) -Hn2 #Hn2
+  <(IH … Hn2) -q1 -n2 //
+| elim (pcc_inv_L_dx … Hn2) -Hn2 #Hn2 #H0
+  >(IH … Hn2) -q1 //
+| lapply (pcc_inv_A_dx … Hn2) -Hn2 #Hn2
+  <(IH … Hn2) -q1 -n2 //
+| lapply (pcc_inv_S_dx … Hn2) -Hn2 #Hn2
+  <(IH … Hn2) -q1 -n2 //
+]
+qed-.
+
+theorem pcc_inj_L_sn (p1) (p2) (q1) (n):
+        q1 ϵ 𝐂❨n❩ → ∀q2. q2 ϵ 𝐂❨n❩ →
+        p1●𝗟◗q1 = p2●𝗟◗q2 → q1 = q2.
+#p1 #p2 #q1 #n #Hq1 elim Hq1 -q1 -n
+[|*: #q1 #n1 [ #k1 ] #_ #IH ] * //
+[1,3,5,7,9,11: #l2 #q2 ] #Hq2
+<list_append_lcons_sn <list_append_lcons_sn #H0
+elim (eq_inv_list_lcons_bi ????? H0) -H0 #H0 #H1 destruct
+[ elim (pcc_inv_L_dx_zero … Hq2)
+| lapply (pcc_inv_d_dx … Hq2) -Hq2 #Hq2
+  <(IH … Hq2) //
+| lapply (pcc_inv_m_dx … Hq2) -Hq2 #Hq2
+  <(IH … Hq2) //
+| lapply (pcc_inv_L_dx_succ … Hq2) -Hq2 #Hq2
+  <(IH … Hq2) //
+| lapply (pcc_inv_A_dx … Hq2) -Hq2 #Hq2
+  <(IH … Hq2) //
+| lapply (pcc_inv_S_dx … Hq2) -Hq2 #Hq2
+  <(IH … Hq2) //
+| elim (pcc_inv_empty_succ … Hq2)
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_height.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_height.ma
new file mode 100644 (file)
index 0000000..88b0e41
--- /dev/null
@@ -0,0 +1,27 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_closed.ma".
+include "delayed_updating/syntax/path_height.ma".
+include "delayed_updating/syntax/path_depth.ma".
+
+(* CLOSED CONDITION FOR PATH ************************************************)
+
+(* Constructions with height and depth **************************************)
+
+lemma path_closed_depth (p) (n):
+      p ϵ 𝐂❨n❩ → ♯p + n = ♭p.
+#p #n #Hn elim Hn -Hn //
+#p #n #_ #IH <nplus_succ_dx //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_structure.ma
new file mode 100644 (file)
index 0000000..90522f9
--- /dev/null
@@ -0,0 +1,33 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "delayed_updating/syntax/path_closed_height.ma".
+include "delayed_updating/syntax/path_structure.ma".
+
+(* CLOSED CONDITION FOR PATH ************************************************)
+
+(* Constructions with structure *********************************************)
+
+lemma path_closed_structure_height (p) (n):
+      p ϵ 𝐂❨n❩ → ⊗p ϵ 𝐂❨♯p+n❩.
+#p #n #Hn elim Hn -Hn //
+#p #n #_ #IH [ <nplus_succ_dx ]
+/2 width=1 by pcc_L_dx, pcc_A_dx, pcc_S_dx/
+qed.
+
+lemma path_closed_structure_depth (p) (n):
+      p ϵ 𝐂❨n❩ → ⊗p ϵ 𝐂❨♭p❩.
+#p #n #Hp <path_closed_depth
+/2 width=3 by path_closed_structure_height/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_labels.ma
deleted file mode 100644 (file)
index 791a09a..0000000
+++ /dev/null
@@ -1,26 +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 "delayed_updating/syntax/path_depth.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* DEPTH FOR PATH ***********************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma depth_labels_L (n):
-      n = ♭(𝗟∗∗n).
-#n @(nat_ind_succ … n) -n //
-#n #IH <labels_succ <depth_L_dx //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma
deleted file mode 100644 (file)
index 4610e4f..0000000
+++ /dev/null
@@ -1,134 +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 "delayed_updating/syntax/path_labels.ma".
-include "delayed_updating/notation/functions/downarrowright_2.ma".
-include "ground/arith/nat_plus.ma".
-include "ground/arith/nat_pred_succ.ma".
-
-(* HEAD FOR PATH ************************************************************)
-
-rec definition path_head (n) (p) on p: path ≝
-match n with
-[ nzero  ⇒ 𝐞
-| ninj m ⇒
-  match p with
-  [ list_empty     ⇒ 𝗟∗∗n
-  | list_lcons l q ⇒
-    match l with
-    [ label_d k ⇒ (path_head (n+k) q)◖l
-    | label_m   ⇒ (path_head n q)◖l
-    | label_L   ⇒ (path_head (↓m) q)◖l
-    | label_A   ⇒ (path_head n q)◖l
-    | label_S   ⇒ (path_head n q)◖l
-    ]
-  ]
-].
-
-interpretation
-  "head (path)"
-  'DownArrowRight n p = (path_head n p).
-
-(* basic constructions ****************************************************)
-
-lemma path_head_zero (p):
-      (𝐞) = ↳[𝟎]p.
-* // qed.
-
-lemma path_head_empty (n):
-      (𝗟∗∗n) = ↳[n]𝐞.
-* // qed.
-
-lemma path_head_d_dx (p) (n) (k:pnat):
-      (↳[↑n+k]p)◖𝗱k = ↳[↑n](p◖𝗱k).
-// qed.
-
-lemma path_head_m_dx (p) (n):
-      (↳[↑n]p)◖𝗺 = ↳[↑n](p◖𝗺).
-// qed.
-
-lemma path_head_L_dx (p) (n):
-      (↳[n]p)◖𝗟 = ↳[↑n](p◖𝗟).
-#p #n
-whd in ⊢ (???%); //
-qed.
-
-lemma path_head_A_dx (p) (n):
-      (↳[↑n]p)◖𝗔 = ↳[↑n](p◖𝗔).
-// qed.
-
-lemma path_head_S_dx (p) (n):
-      (↳[↑n]p)◖𝗦 = ↳[↑n](p◖𝗦).
-// qed.
-
-(* Basic inversions *********************************************************)
-
-lemma eq_inv_path_head_zero_dx (q) (p):
-      q = ↳[𝟎]p → 𝐞 = q.
-#q * //
-qed-.
-
-lemma eq_inv_path_empty_head (p) (n):
-      (𝐞) = ↳[n]p → 𝟎 = n.
-*
-[ #n <path_head_empty #H0
-  <(eq_inv_empty_labels … H0) -n //
-| * [ #k ] #p #n @(nat_ind_succ … n) -n // #n #_
-  [ <path_head_d_dx
-  | <path_head_m_dx
-  | <path_head_L_dx
-  | <path_head_A_dx
-  | <path_head_S_dx
-  ] #H0 destruct
-]
-qed-.
-
-(* Constructions with path_append *******************************************)
-
-lemma path_head_refl_append (p) (q) (n):
-      q = ↳[n]q → q = ↳[n](p●q).
-#p #q elim q -q
-[ #n #Hn <(eq_inv_path_empty_head … Hn) -Hn //
-| #l #q #IH #n @(nat_ind_succ … n) -n
-  [ #Hq | #n #_ cases l [ #k ] ]
-  [ lapply (eq_inv_path_head_zero_dx … Hq) -Hq #Hq destruct
-  | <path_head_d_dx <path_head_d_dx
-  | <path_head_m_dx <path_head_m_dx
-  | <path_head_L_dx <path_head_L_dx
-  | <path_head_A_dx <path_head_A_dx
-  | <path_head_S_dx <path_head_S_dx
-  ] #Hq
-  elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-  /3 width=1 by eq_f/
-]
-qed-.
-
-(* Inversions with path_append **********************************************)
-
-lemma eq_inv_path_head_refl_append (p) (q) (n):
-      q = ↳[n](p●q) → q = ↳[n]q.
-#p #q elim q -q
-[ #n #Hn <(eq_inv_path_empty_head … Hn) -p //
-| #l #q #IH #n @(nat_ind_succ … n) -n //
-  #n #_ cases l [ #k ]
-  [ <path_head_d_dx <path_head_d_dx
-  | <path_head_m_dx <path_head_m_dx
-  | <path_head_L_dx <path_head_L_dx
-  | <path_head_A_dx <path_head_A_dx
-  | <path_head_S_dx <path_head_S_dx
-  ] #Hq
-  elim (eq_inv_list_lcons_bi ????? Hq) -Hq #_ #Hq
-  /3 width=1 by eq_f/
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_depth.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_depth.ma
deleted file mode 100644 (file)
index 6283e2c..0000000
+++ /dev/null
@@ -1,35 +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 "delayed_updating/syntax/path_head.ma".
-include "delayed_updating/syntax/path_height_labels.ma".
-include "delayed_updating/syntax/path_depth_labels.ma".
-
-(* HEAD FOR PATH ************************************************************)
-
-(* Constructions with depth and height **************************************)
-
-lemma path_head_depth (p) (n):
-      n + ♯(↳[n]p) = ♭↳[n]p.
-#p elim p -p // #l #p #IH
-#n @(nat_ind_succ … n) -n // #n #_
-cases l [ #k ]
-[ <path_head_d_dx <height_d_dx <depth_d_dx <IH //
-| <path_head_m_dx <height_m_dx <depth_m_dx //
-| <path_head_L_dx <height_L_dx <depth_L_dx
-  <nplus_succ_sn //
-| <path_head_A_dx <height_A_dx <depth_A_dx //
-| <path_head_S_dx <height_S_dx <depth_S_dx //
-]
-qed-. (**) (* gets in the way with auto *)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma
deleted file mode 100644 (file)
index 37ca7be..0000000
+++ /dev/null
@@ -1,39 +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 "delayed_updating/syntax/path_head_depth.ma".
-include "delayed_updating/syntax/path_structure_labels.ma".
-
-(* HEAD FOR PATH ************************************************************)
-
-(* Constructions with structure *********************************************)
-
-lemma path_head_structure_height (p) (n):
-      ⊗↳[n]p = ↳[n+♯↳[n]p]⊗p.
-#p elim p -p //
-#l #p #IH #n @(nat_ind_succ … n) -n //
-#n #_ cases l [ #k ]
-[ <height_d_dx <structure_d_dx //
-| <structure_m_dx //
-| <structure_L_dx //
-| <height_A_dx <structure_A_dx <nplus_succ_sn <path_head_A_dx //
-| <height_S_dx <structure_S_dx <nplus_succ_sn <path_head_S_dx //
-]
-qed.
-
-lemma path_head_structure_depth (p) (n):
-      ⊗↳[n]p = ↳[♭↳[n]p]⊗p.
-#p #n
-<path_head_depth //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_height_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_height_labels.ma
deleted file mode 100644 (file)
index fb55c36..0000000
+++ /dev/null
@@ -1,26 +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 "delayed_updating/syntax/path_height.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* HEIGHT FOR PATH **********************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma height_labels_L (n):
-      (𝟎) = ♯(𝗟∗∗n).
-#n @(nat_ind_succ … n) -n //
-#n #IH <labels_succ <height_L_dx //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_labels.ma
deleted file mode 100644 (file)
index 7f0a71a..0000000
+++ /dev/null
@@ -1,50 +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 "delayed_updating/syntax/path.ma".
-include "delayed_updating/notation/functions/power_2.ma".
-include "ground/arith/nat_succ_iter.ma".
-
-(* *)
-
-definition labels (l) (n:nat): path ≝
-           ((list_lcons ? l)^n) (𝐞).
-
-interpretation
-  "labels (path)"
-  'Power l n = (labels l n).
-
-(* Basic constructions ******************************************************)
-
-lemma labels_unfold (l) (n):
-      ((list_lcons ? l)^n) (𝐞) = l∗∗n.
-// qed.
-
-lemma labels_zero (l):
-      (𝐞) = l∗∗𝟎.
-// qed.
-
-lemma labels_succ (l) (n):
-      (l∗∗n)◖l = l∗∗(↑n).
-#l #n
-<labels_unfold <labels_unfold <niter_succ //
-qed.
-
-(* Basic inversions *********************************************************)
-
-lemma eq_inv_empty_labels (l) (n):
-      (𝐞) = l∗∗n → 𝟎 = n.
-#l #n @(nat_ind_succ … n) -n //
-#n #_ <labels_succ #H0 destruct
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_labels.ma
deleted file mode 100644 (file)
index 0dcc367..0000000
+++ /dev/null
@@ -1,25 +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 "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* STRUCTURE FOR PATH *******************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma structure_labels_L (n):
-      (𝗟∗∗n) = ⊗(𝗟∗∗n).
-#n @(nat_ind_succ … n) -n //
-qed.
index 7b568dc8681403e78308694f011135ba0dcf6175..416c6e7924650b412ad854cb119265877fe14151 100644 (file)
@@ -93,7 +93,7 @@ lemma unwind2_rmap_append_pap_closed (f) (p) (q) (h:pnat):
       q = ↳[h]q →
       ♭q = ninj (▶[f](p●q)@⧣❨h❩).
 #f #p #q #h #Hh
->tr_xap_ninj >(path_head_refl_append p … Hh) in ⊢ (??%?);
+>tr_xap_ninj >(path_head_refl_append_sn p … Hh) in ⊢ (??%?);
 >(unwind2_rmap_head_xap_closed … Hh) -Hh
 <path_head_depth //
 qed.