]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed_updating
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 3 May 2022 20:45:16 +0000 (22:45 +0200)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Tue, 3 May 2022 20:45:16 +0000 (22:45 +0200)
+ conflicts solved

104 files changed:
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr_ifr.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst_eq.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/ifr.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_after.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_constructors.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_eq.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_id.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_eq.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_id.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_uni.etc [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_id.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_push.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_uni.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/upspoonverticalbar_2.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/verticalbarat_2.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_constructors.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_depth.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_etc.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_fsubst.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_height.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_preterm_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure_depth.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_after.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_constructors.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_id.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_id.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_uni.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_constructors.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_depth.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_fsubst.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_length.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_lift.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_preterm_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm_eq.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure_depth.etc [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_1.ma [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_1.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/notes.txt
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_after.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_constructors.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_length.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_eq.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_id.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_structure.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_uni.ma
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth.ma
matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_depth.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path_structure.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path_structure.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind1/unwind.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind1/unwind_eq.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind1/unwind_structure.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind1/unwind_structure_depth.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_constructors.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_depth.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_eq.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_fsubst.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_height.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_preterm_eq.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm_eq.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure_depth.ma [deleted file]
matita/matita/contribs/lambdadelta/ground/arith/nat_succ.ma
matita/matita/contribs/lambdadelta/ground/lib/list_rcons.ma
matita/matita/contribs/lambdadelta/ground/relocation/tr_uni_compose.ma
matita/matita/predefined_virtuals.ml

diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr.etc
deleted file mode 100644 (file)
index b568c32..0000000
+++ /dev/null
@@ -1,37 +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/prototerm_constructors.ma".
-include "delayed_updating/syntax/prototerm_equivalence.ma".
-include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/substitution/unwind.ma".
-include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_balanced.ma".
-include "delayed_updating/syntax/path_depth.ma".
-include "delayed_updating/notation/relations/black_rightarrow_df_4.ma".
-include "ground/xoa/ex_1_2.ma".
-include "ground/xoa/and_4.ma".
-
-(* DELAYED FOCUSED REDUCTION ************************************************)
-
-definition dfr (p) (q): relation2 prototerm prototerm ≝
-           λt1,t2. ∃∃b,n.
-           let r ≝ p●𝗔◗b●𝗟◗q in
-           ∧∧ ⊗b ϵ 𝐁 & ∀f. ↑❘q❘ = (↑[q]⫯f)@❨n❩ & r◖𝗱n ϵ t1 &
-              t1[⋔r←𝛗(n+❘b❘).(t1⋔(p◖𝗦))] ⇔ t2
-.
-
-interpretation
-  "focused balanced reduction with delayed updating (prototerm)"
-  'BlackRightArrowDF t1 p q t2 = (dfr p q t1 t2).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr_ifr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/dfr_ifr.etc
deleted file mode 100644 (file)
index 0694154..0000000
+++ /dev/null
@@ -1,106 +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/reduction/dfr.ma".
-include "delayed_updating/reduction/ifr.ma".
-include "delayed_updating/substitution/fsubst_unwind.ma".
-include "delayed_updating/substitution/fsubst_eq.ma".
-include "delayed_updating/substitution/unwind_constructors.ma".
-include "delayed_updating/substitution/unwind_preterm_eq.ma".
-include "delayed_updating/substitution/unwind_structure_depth.ma".
-include "delayed_updating/substitution/unwind_depth.ma".
-include "delayed_updating/syntax/prototerm_proper_constructors.ma".
-include "delayed_updating/syntax/path_structure_depth.ma".
-include "ground/relocation/tr_uni_compose.ma".
-include "ground/relocation/tr_pap_pushs.ma".
-
-(* DELAYED FOCUSED REDUCTION ************************************************)
-
-lemma tr_uni_eq_repl (n1) (n2):
-      n1 = n2 → 𝐮❨n1❩ ≗ 𝐮❨n2❩.
-// qed.
-
-axiom pippo (b) (q) (n):
-      ↑❘q❘ = (↑[q]𝐢)@❨n❩ →
-      ↑❘q❘+❘b❘= (↑[b●𝗟◗q]𝐢)@❨n+❘b❘❩.
-
-lemma unwind_rmap_tls_eq_id (p) (n):
-      ❘p❘ = ↑[p]𝐢@❨n❩ →
-      (𝐢) ≗ ⇂*[n]↑[p]𝐢.
-#p @(list_ind_rcons … p) -p
-[ #n <depth_empty #H destruct
-| #p * [ #m ] #IH #n
-  [ <depth_d_dx <unwind_rmap_pap_d_dx #H0
-    @(stream_eq_trans … (unwind_rmap_tls_d_dx …))
-    @(stream_eq_trans … (IH …)) -IH //
-  | /2 width=1 by/
-  | <depth_L_dx <unwind_rmap_L_dx
-    cases n -n [| #n ] #H0
-    [
-    | 
-    ]
-  | /2 width=1 by/
-  | /2 width=1 by/
-  ]
-]
-
-
-(*  (↑❘q❘+❘b❘=↑[b●𝗟◗q]𝐢@❨n+❘b❘❩ *)
-(* [↑[p]𝐢@❨n❩]⫯*[❘p❘]f∘⇂*[n]↑[p]𝐢) *)
-lemma unwind_rmap_tls_eq (f) (p) (n):
-      ❘p❘ = ↑[p]𝐢@❨n❩ →
-      f ≗ ⇂*[n]↑[p]f.
-#f #p #n #Hp
-@(stream_eq_canc_dx … (stream_tls_eq_repl …))
-[| @unwind_rmap_decompose | skip ]
-<tr_compose_tls <Hp
-
-@(stream_eq_canc_dx) … (unwind_rmap_decompose …)) 
-
-lemma dfr_unwind_bi (f) (p) (q) (t1) (t2): t1 ϵ 𝐓 →
-      t1 ➡𝐝𝐟[p,q] t2 → ↑[f]t1 ➡𝐟[⊗p,⊗q] ↑[f]t2.
-#f #p #q #t1 #t2 #H0t1
-* #b #n * #Hb #Hn  #Ht1 #Ht2
-@(ex1_2_intro … (⊗b) (↑❘⊗q❘)) @and4_intro
-[ //
-| #g <unwind_rmap_structure <depth_structure
-  >tr_pushs_swap <tr_pap_pushs_le //
-| lapply (in_comp_unwind_bi f … Ht1) -Ht1 -H0t1 -Hb -Ht2
-  <unwind_path_d_empty_dx //
-| lapply (unwind_term_eq_repl_dx f … Ht2) -Ht2 #Ht2
-  @(subset_eq_trans … Ht2) -t2
-  @(subset_eq_trans … (unwind_fsubst …))
-  [ <unwind_rmap_append <unwind_rmap_A_sn (* <unwind_rmap_append <unwind_rmap_L_sn *)
-    <structure_append <structure_A_sn <structure_append <structure_L_sn
-    <depth_append <depth_L_sn <depth_structure <depth_structure
-    @fsubst_eq_repl [ // ]
-    @(subset_eq_trans … (unwind_iref …))
-    @(subset_eq_canc_sn … (unwind_term_eq_repl_dx …))
-    [ @unwind_grafted_S /2 width=2 by ex_intro/ | skip ]
-    @(subset_eq_trans … (unwind_term_after …))
-    @(subset_eq_canc_dx … (unwind_term_after …))
-    @unwind_term_eq_repl_sn -t1
-    @(stream_eq_trans … (tr_compose_uni_dx …))
-    lapply (Hn (𝐢)) -Hn >tr_id_unfold #Hn
-    lapply (pippo … b … Hn) -Hn #Hn
-    @tr_compose_eq_repl
-    [ <unwind_rmap_pap_le //
-      <Hn <nrplus_inj_sn //
-    |
-    ]
-  | //
-  | /2 width=2 by ex_intro/
-  | //
-  ]
-]
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst.etc
deleted file mode 100644 (file)
index adbc16c..0000000
+++ /dev/null
@@ -1,28 +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/prototerm.ma".
-include "delayed_updating/notation/functions/pitchforkleftarrow_3.ma".
-
-(* FOCALIZED SUBSTITUTION ***************************************************)
-
-definition fsubst (p) (u): prototerm → prototerm ≝
-           λt,q.
-           ∨∨ ∃∃r. r ϵ u & p●r = q
-            | ∧∧ q ϵ t & (∀r. p●r = q → ⊥)
-.
-
-interpretation
-  "focalized substitution (prototerm)"
-  'PitchforkLeftArrow t p u = (fsubst p u t).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/fsubst_eq.etc
deleted file mode 100644 (file)
index a6681b5..0000000
+++ /dev/null
@@ -1,33 +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/fsubst.ma".
-include "delayed_updating/syntax/prototerm_equivalence.ma".
-
-(* Constructions with subset_equivalence ************************************)
-
-lemma subset_inclusion_fsubst_bi (t1) (t2) (u1) (u2) (p):
-      t1 ⊆ t2 → u1 ⊆ u2 → t1[⋔p←u1] ⊆ t2[⋔p←u2].
-#t1 #t2 #u1 #u2 #p #Ht #Hu #q * *
-[ #r #Hr #H0 destruct
-  /4 width=3 by ex2_intro, or_introl/
-| /4 width=2 by or_intror, conj/
-]
-qed.
-
-lemma fsubst_eq_repl (t1) (t2) (u1) (u2) (p):
-      t1 ⇔ t2 → u1 ⇔ u2 → t1[⋔p←u1] ⇔ t2[⋔p←u2].
-#t1 #t2 #u1 #u2 #p * #H1t #H2t * #H1u #H2u
-/3 width=5 by conj, subset_inclusion_fsubst_bi/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/ifr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/ifr.etc
deleted file mode 100644 (file)
index 054aef5..0000000
+++ /dev/null
@@ -1,36 +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/fsubst.ma".
-include "delayed_updating/substitution/unwind_prototerm.ma".
-include "delayed_updating/syntax/prototerm_equivalence.ma".
-include "delayed_updating/syntax/path_depth.ma".
-include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_balanced.ma".
-include "delayed_updating/notation/relations/black_rightarrow_f_4.ma".
-include "ground/xoa/ex_1_2.ma".
-include "ground/xoa/and_4.ma".
-
-(* IMMEDIATE FOCUSED REDUCTION ************************************************)
-
-definition ifr (p) (q): relation2 prototerm prototerm ≝
-           λt1,t2. ∃∃b,n.
-           let r ≝ p●𝗔◗b●𝗟◗q in
-           ∧∧ ⊗b ϵ 𝐁 & ∀f. ↑❘q❘ = (↑[q]⫯f)@❨n❩ & r◖𝗱n ϵ t1 &
-              t1[⋔r←↑[𝐮❨❘b●𝗟◗q❘❩](t1⋔(p◖𝗦))] ⇔ t2
-.
-
-interpretation
-  "focused balanced reduction with immediate updating (prototerm)"
-  'BlackRightArrowF t1 p q t2 = (ifr p q t1 t2).
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift.etc
deleted file mode 100644 (file)
index a487fcf..0000000
+++ /dev/null
@@ -1,150 +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/notation/functions/uparrow_4.ma".
-include "delayed_updating/notation/functions/uparrow_2.ma".
-include "delayed_updating/syntax/path.ma".
-include "ground/relocation/tr_uni.ma".
-include "ground/relocation/tr_pap_tls.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-definition lift_continuation (A:Type[0]) ≝
-           tr_map → path → A.
-
-rec definition lift_gen (A:Type[0]) (k:lift_continuation A) (f) (p) on p ≝
-match p with
-[ list_empty     ⇒ k f (𝐞)
-| list_lcons l q ⇒
-  match l with
-  [ label_d n ⇒ lift_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (⇂*[n]f) q
-  | label_m   ⇒ lift_gen (A) (λg,p. k g (𝗺◗p)) f q
-  | label_L   ⇒ lift_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
-  | label_A   ⇒ lift_gen (A) (λg,p. k g (𝗔◗p)) f q
-  | label_S   ⇒ lift_gen (A) (λg,p. k g (𝗦◗p)) f q
-  ]
-].
-
-interpretation
-  "lift (gneric)"
-  'UpArrow A k f p = (lift_gen A k f p).
-
-definition proj_path: lift_continuation … ≝
-           λf,p.p.
-
-definition proj_rmap: lift_continuation … ≝
-           λf,p.f.
-
-interpretation
-  "lift (path)"
-  'UpArrow f p = (lift_gen ? proj_path f p).
-
-interpretation
-  "lift (relocation map)"
-  'UpArrow p f = (lift_gen ? proj_rmap f p).
-
-(* Basic constructions ******************************************************)
-
-lemma lift_empty (A) (k) (f):
-      k f (𝐞) = ↑{A}❨k, f, 𝐞❩.
-// qed.
-
-lemma lift_d_sn (A) (k) (p) (n) (f):
-      ↑❨(λg,p. k g (𝗱(f@❨n❩)◗p)), ⇂*[n]f, p❩ = ↑{A}❨k, f, 𝗱n◗p❩.
-// qed.
-
-lemma lift_m_sn (A) (k) (p) (f):
-      ↑❨(λg,p. k g (𝗺◗p)), f, p❩ = ↑{A}❨k, f, 𝗺◗p❩.
-// qed.
-
-lemma lift_L_sn (A) (k) (p) (f):
-      ↑❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ↑{A}❨k, f, 𝗟◗p❩.
-// qed.
-
-lemma lift_A_sn (A) (k) (p) (f):
-      ↑❨(λg,p. k g (𝗔◗p)), f, p❩ = ↑{A}❨k, f, 𝗔◗p❩.
-// qed.
-
-lemma lift_S_sn (A) (k) (p) (f):
-      ↑❨(λg,p. k g (𝗦◗p)), f, p❩ = ↑{A}❨k, f, 𝗦◗p❩.
-// qed.
-
-(* Basic constructions with proj_path ***************************************)
-
-lemma lift_path_empty (f):
-      (𝐞) = ↑[f]𝐞.
-// qed.
-
-(* Basic constructions with proj_rmap ***************************************)
-
-lemma lift_rmap_empty (f):
-      f = ↑[𝐞]f.
-// qed.
-
-lemma lift_rmap_d_sn (f) (p) (n):
-      ↑[p](⇂*[ninj n]f) = ↑[𝗱n◗p]f.
-// qed.
-
-lemma lift_rmap_m_sn (f) (p):
-      ↑[p]f = ↑[𝗺◗p]f.
-// qed.
-
-lemma lift_rmap_L_sn (f) (p):
-      ↑[p](⫯f) = ↑[𝗟◗p]f.
-// qed.
-
-lemma lift_rmap_A_sn (f) (p):
-      ↑[p]f = ↑[𝗔◗p]f.
-// qed.
-
-lemma lift_rmap_S_sn (f) (p):
-      ↑[p]f = ↑[𝗦◗p]f.
-// qed.
-
-(* Advanced constructions with proj_rmap and path_append ********************)
-
-lemma lift_rmap_append (p2) (p1) (f):
-      ↑[p2]↑[p1]f = ↑[p1●p2]f.
-#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
-[ <lift_rmap_m_sn <lift_rmap_m_sn //
-| <lift_rmap_A_sn <lift_rmap_A_sn //
-| <lift_rmap_S_sn <lift_rmap_S_sn //
-]
-qed.
-
-(* Advanced constructions with proj_rmap and path_rcons *********************)
-
-lemma lift_rmap_d_dx (f) (p) (n):
-      ⇂*[ninj n](↑[p]f) = ↑[p◖𝗱n]f.
-// qed.
-
-lemma lift_rmap_m_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗺]f.
-// qed.
-
-lemma lift_rmap_L_dx (f) (p):
-      (⫯↑[p]f) = ↑[p◖𝗟]f.
-// qed.
-
-lemma lift_rmap_A_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗔]f.
-// qed.
-
-lemma lift_rmap_S_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗦]f.
-// qed.
-
-lemma lift_rmap_pap_d_dx (f) (p) (n) (m):
-      ↑[p]f@❨m+n❩ = ↑[p◖𝗱n]f@❨m❩+↑[p]f@❨n❩.
-// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_after.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_after.etc
deleted file mode 100644 (file)
index 756b735..0000000
+++ /dev/null
@@ -1,31 +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_eq.ma".
-include "ground/relocation/tr_compose_pap.ma".
-include "ground/relocation/tr_compose_pn.ma".
-include "ground/relocation/tr_compose_tls.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-(* Constructions with tr_after *********************************************)
-
-lemma lift_path_after (p) (f1) (f2):
-      ↑[f2]↑[f1]p = ↑[f2∘f1]p.
-#p elim p -p [| * ] // [ #n ] #p #IH #f1 #f2
-[ <lift_path_d_sn <lift_path_d_sn <lift_path_d_sn //
-| <lift_path_L_sn <lift_path_L_sn <lift_path_L_sn
-  >tr_compose_push_bi //
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_constructors.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_constructors.etc
deleted file mode 100644 (file)
index 772c837..0000000
+++ /dev/null
@@ -1,51 +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_prototerm_id.ma".
-include "delayed_updating/substitution/lift_uni.ma".
-include "delayed_updating/syntax/prototerm_constructors.ma".
-
-(* LIFT FOR PROTOTERM *******************************************************)
-
-lemma lift_iref_bi (t1) (t2) (n):
-      t1 ⇔ t2 → 𝛗n.t1 ⇔ 𝛗n.t2.
-/2 width=1 by subset_equivalence_ext_f1_bi/
-qed.
-
-lemma lift_iref_sn (f) (t:prototerm) (n:pnat):
-      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⊆ ↑[f](𝛗n.t).
-#f #t #n #p * #q * #r #Hr #H1 #H2 destruct
-@(ex2_intro … (𝗱n◗𝗺◗r))
-/2 width=1 by in_comp_iref/
-qed-.
-
-lemma lift_iref_dx (f) (t) (n:pnat):
-      ↑[f](𝛗n.t) ⊆ 𝛗f@❨n❩.↑[⇂*[n]f]t.
-#f #t #n #p * #q #Hq #H0 destruct
-elim (in_comp_inv_iref … Hq) -Hq #p #H0 #Hp destruct
-/3 width=1 by in_comp_iref, in_comp_lift_bi/
-qed-.
-
-lemma lift_iref (f) (t) (n:pnat):
-      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⇔ ↑[f](𝛗n.t).
-/3 width=1 by conj, lift_iref_sn, lift_iref_dx/
-qed.
-
-lemma lift_iref_uni (t) (m) (n):
-      (𝛗(n+m).t) ⇔ ↑[𝐮❨m❩](𝛗n.t).
-#t #m #n
-@(subset_eq_trans … (lift_iref …))
-<tr_uni_pap >nsucc_pnpred <tr_tls_succ_uni
-/3 width=1 by lift_iref_bi, lift_term_id/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_eq.etc
deleted file mode 100644 (file)
index fad4995..0000000
+++ /dev/null
@@ -1,123 +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.ma".
-(*
-include "ground/relocation/tr_uni_compose.ma".
-include "ground/relocation/tr_compose_compose.ma".
-include "ground/relocation/tr_compose_eq.ma".
-*)
-include "ground/relocation/tr_pap_eq.ma".
-include "ground/relocation/tr_pn_eq.ma".
-include "ground/lib/stream_tls_eq.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-definition lift_exteq (A): relation2 (lift_continuation A) (lift_continuation A) ≝
-           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
-
-interpretation
-  "extensional equivalence (lift continuation)"
-  'RingEq A k1 k2 = (lift_exteq A k1 k2).
-
-(* Constructions with lift_exteq ********************************************)
-
-lemma lift_eq_repl (A) (p) (k1) (k2):
-      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ↑❨k1, f1, p❩ = ↑❨k2, f2, p❩).
-#A #p elim p -p [| * [ #n ] #q #IH ]
-#k1 #k2 #Hk #f1 #f2 #Hf
-[ <lift_empty <lift_empty /2 width=1 by/
-| <lift_d_sn <lift_d_sn <(tr_pap_eq_repl … Hf)
-  /3 width=3 by stream_tls_eq_repl, compose_repl_fwd_sn/
-| /3 width=1 by/
-| /3 width=1 by tr_push_eq_repl/
-| /3 width=1 by/
-| /3 width=1 by/
-]
-qed-.
-
-(* Advanced constructions ***************************************************)
-
-lemma lift_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
-      ↑❨λg,p2. k g (l◗p2), f, p❩ = ↑{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
-#A #k #f #p #l #Hk
-@lift_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
-qed.
-
-lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
-      ↑❨λg,p2. k g (p1●l◗p2), f, p❩ = ↑{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
-#A #k #f #p1 #p #l #Hk
-@lift_eq_repl // #g1 #g2 #p2 #Hg
-<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
-qed.
-
-(* Advanced constructions with proj_path ************************************)
-
-lemma proj_path_proper:
-      proj_path ≗ proj_path.
-// qed.
-
-lemma lift_path_eq_repl (p):
-      stream_eq_repl … (λf1,f2. ↑[f1]p = ↑[f2]p).
-/2 width=1 by lift_eq_repl/ qed.
-
-lemma lift_path_append_sn (p) (f) (q):
-      q●↑[f]p = ↑❨(λg,p. proj_path g (q●p)), f, p❩.
-#p elim p -p // * [ #n ] #p #IH #f #q
-[ <lift_d_sn <lift_d_sn
-| <lift_m_sn <lift_m_sn
-| <lift_L_sn <lift_L_sn
-| <lift_A_sn <lift_A_sn
-| <lift_S_sn <lift_S_sn
-] 
->lift_lcons_alt // >lift_append_rcons_sn //
-<IH <IH -IH <list_append_rcons_sn //
-qed.
-
-lemma lift_path_lcons (f) (p) (l):
-      l◗↑[f]p = ↑❨(λg,p. proj_path g (l◗p)), f, p❩.
-#f #p #l
->lift_lcons_alt <lift_path_append_sn //
-qed.
-
-lemma lift_path_d_sn (f) (p) (n):
-      (𝗱(f@❨n❩)◗↑[⇂*[n]f]p) = ↑[f](𝗱n◗p).
-// qed.
-
-lemma lift_path_m_sn (f) (p):
-      (𝗺◗↑[f]p) = ↑[f](𝗺◗p).
-// qed.
-
-lemma lift_path_L_sn (f) (p):
-      (𝗟◗↑[⫯f]p) = ↑[f](𝗟◗p).
-// qed.
-
-lemma lift_path_A_sn (f) (p):
-      (𝗔◗↑[f]p) = ↑[f](𝗔◗p).
-// qed.
-
-lemma lift_path_S_sn (f) (p):
-      (𝗦◗↑[f]p) = ↑[f](𝗦◗p).
-// qed.
-(* COMMENT 
-
-(* Advanced constructions with proj_rmap and stream_tls *********************)
-
-lemma lift_rmap_tls_d_dx (f) (p) (m) (n):
-      ⇂*[m+n]↑[p]f ≗ ⇂*[m]↑[p◖𝗱n]f.
-#f #p #m #n
-<lift_rmap_d_dx >nrplus_inj_dx
-/2 width=1 by tr_tls_compose_uni_dx/
-qed.
-*)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_id.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_id.etc
deleted file mode 100644 (file)
index 1d8b452..0000000
+++ /dev/null
@@ -1,30 +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_eq.ma".
-include "ground/relocation/tr_id_pap.ma".
-include "ground/relocation/tr_id_tls.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-(* Constructions with tr_id ************************************************)
-
-lemma lift_path_id (p):
-      p = ↑[𝐢]p.
-#p elim p -p //
-* [ #n ] #p #IH //
-[ <lift_path_d_sn //
-| <lift_path_L_sn //
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm.etc
deleted file mode 100644 (file)
index 6555b5d..0000000
+++ /dev/null
@@ -1,30 +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.ma".
-include "delayed_updating/syntax/prototerm.ma".
-include "ground/lib/subset_ext.ma".
-
-(* LIFT FOR PROTOTERM *******************************************************)
-
-interpretation
-  "lift (prototerm)"
-  'UpArrow f t = (subset_ext_f1 ? ? (lift_gen ? proj_path f) t).
-
-(* Basic constructions ******************************************************)
-
-lemma in_comp_lift_bi (f) (p) (t):
-      p ϵ t → ↑[f]p ϵ ↑[f]t.
-/2 width=1 by subset_in_ext_f1_dx/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_eq.etc
deleted file mode 100644 (file)
index fc3fb3f..0000000
+++ /dev/null
@@ -1,40 +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/lib/subset_ext_equivalence.ma".
-include "delayed_updating/substitution/lift_after.ma".
-include "delayed_updating/substitution/lift_prototerm.ma".
-
-(* LIFT FOR PROTOTERM *******************************************************)
-
-(* Constructions with subset_equivalence ************************************)
-
-lemma lift_term_eq_repl_sn (f1) (f2) (t):
-      f1 ≗ f2 → ↑[f1]t ⇔ ↑[f2]t.
-/3 width=1 by subset_equivalence_ext_f1_exteq, lift_path_eq_repl/
-qed.
-
-lemma lift_term_eq_repl_dx (f) (t1) (t2):
-      t1 ⇔ t2 → ↑[f]t1 ⇔ ↑[f]t2.
-/2 width=1 by subset_equivalence_ext_f1_bi/
-qed.
-
-lemma lift_term_after (f1) (f2) (t):
-      ↑[f2]↑[f1]t ⇔ ↑[f2∘f1]t.
-#f1 #f2 #t @subset_eq_trans
-[
-| @subset_inclusion_ext_f1_compose
-| @subset_equivalence_ext_f1_exteq /2 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_id.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_prototerm_id.etc
deleted file mode 100644 (file)
index cc75692..0000000
+++ /dev/null
@@ -1,33 +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_prototerm_eq.ma".
-include "delayed_updating/substitution/lift_id.ma".
-
-lemma lift_term_id_sn (t):
-      t ⊆ ↑[𝐢]t.
-#t #p #Hp
->(lift_path_id p)
-/2 width=1 by in_comp_lift_bi/
-qed-.
-
-lemma lift_term_id_dx (t):
-      ↑[𝐢]t ⊆ t.
-#t #p * #q #Hq #H destruct //
-qed-.
-
-lemma lift_term_id (t):
-      t ⇔ ↑[𝐢]t.
-/3 width=2 by lift_term_id_dx, lift_term_id_sn, conj/      
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_uni.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift/lift_uni.etc
deleted file mode 100644 (file)
index cd6c795..0000000
+++ /dev/null
@@ -1,28 +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_id.ma".
-include "ground/relocation/tr_uni_pap.ma".
-include "ground/relocation/tr_uni_tls.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-(* Constructions with tr_uni ***********************************************)
-
-lemma lift_path_d_sn_uni (p) (m) (n):
-      (𝗱(n+m)◗p) = ↑[𝐮❨m❩](𝗱(n)◗p).
-#p #m #n
-<lift_path_d_sn <tr_uni_pap >nsucc_pnpred
-<tr_tls_succ_uni //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap.etc
new file mode 100644 (file)
index 0000000..c35244d
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/arith/pnat_plus.ma".
+include "ground/relocation/tr_map.ma".
+include "delayed_updating/notation/functions/verticalbarat_2.ma".
+
+(* POSITIVE APPLICATION FOR STACKS OF BASIC RELOCATION MAPS *****************)
+
+rec definition sbr_pap (i: pnat) on i: tr_map → pnat.
+* #p #f cases i -i
+[ @(p)
+| #i cases p -p
+  [ lapply (sbr_pap i f) -sbr_pap -i -f
+    #i @(↑i)
+  | #p @(i+↑p)
+  ]
+]
+defined.
+
+interpretation
+  "functional positive application (stack of relocation maps)"
+  'VerticalBarAt f i = (sbr_pap i f).
+
+(* Basic constructions ******************************************************)
+
+lemma sbr_pap_unfold_unit (f):
+      ∀p. p = (p⨮f)❘@❨𝟏❩.
+// qed.
+
+lemma sbr_pap_unfold_unit_succ (f):
+      ∀i. ↑(f❘@❨i❩) = (𝟏⨮f)❘@❨↑i❩.
+// qed.
+
+lemma sbr_pap_unfold_succ_bi (f):
+      ∀p,i. i+↑p = (↑p⨮f)❘@❨↑i❩.
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_eq.etc
new file mode 100644 (file)
index 0000000..10b0d93
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/sbr_pap.ma".
+include "ground/relocation/tr_eq.ma".
+
+(* POSITIVE APPLICATION FOR STACKS OF BASIC RELOCATION MAPS *****************)
+
+(* Main constructions with stream_eq ****************************************)
+
+theorem sbr_pap_eq_repl_sn (i):
+        stream_eq_repl … (λf1,f2. f1❘@❨i❩ = f2❘@❨i❩).
+#i elim i -i [| #i #IH ]
+* [ #p1 | * [| #p1 ]] #f1
+* #p2 #f2 #H
+elim (stream_eq_inv_cons_bi … H) -H [1,8,15: |*: // ] #Hp #Hf destruct //
+<sbr_pap_unfold_unit_succ <sbr_pap_unfold_unit_succ
+/3 width=1 by eq_f/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_id.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_id.etc
new file mode 100644 (file)
index 0000000..b7e3069
--- /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/relocation/sbr_pap.ma".
+include "ground/relocation/tr_id.ma".
+
+(* POSITIVE APPLICATION FOR STACKS OF BASIC RELOCATION MAPS *****************)
+
+(* Constructions with tr_id *************************************************)
+
+lemma sbr_pap_id (p):
+      p = 𝐢❘@❨p❩.
+#p elim p -p [| #p #IH ] <tr_id_unfold //
+<sbr_pap_unfold_unit_succ //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_push.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_pap_push.etc
new file mode 100644 (file)
index 0000000..bd2988e
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/sbr_pap.ma".
+include "delayed_updating/relocation/sbr_push.ma".
+
+(* POSITIVE APPLICATION FOR BASIC STACKS OF RELOCATION MAPS *****************)
+
+(* constructions with sbr_push **********************************************)
+
+lemma sbr_push_pap_unit (f) (p):
+      ↑p = (p⫯❘f)❘@❨𝟏❩.
+// qed.
+
+lemma sbr_push_pap (f) (q) (p):
+      q + p = (p⫯❘f)❘@❨q❩.
+#f * //
+#q * //
+#p <sbr_pap_unfold_succ_bi //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push.etc
new file mode 100644 (file)
index 0000000..e132918
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/tr_map.ma".
+include "delayed_updating/notation/functions/upspoonverticalbar_2.ma".
+
+(* PUSH FOR STACKS OF BASIC RELOCATION MAPS *********************************)
+
+definition sbr_push (p:pnat) (f): tr_map ≝ (↑p)⨮f.
+
+interpretation
+  "push (stack of basic relocation maps)"
+  'UpSpoonVerticalBar n f = (sbr_push n f).
+
+(* Basic properties *********************************************************)
+
+lemma sbr_push_unfold (p) (f):
+      (↑p)⨮f = p⫯❘f.
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_eq.etc
new file mode 100644 (file)
index 0000000..65c9d38
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/sbr_push.ma".
+include "ground/relocation/tr_eq.ma".
+
+(* PUSH FOR STACKS OF BASIC RELOCATION MAPS *********************************)
+
+(* Main constructions with stream_eq ****************************************)
+
+theorem sbr_push_eq_repl_dx (p):
+        stream_eq_repl … (λf1,f2. p⫯❘f1 ≗ p⫯❘f2).
+/2 width=1 by stream_eq_cons/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_uni.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/sbr_push_uni.etc
new file mode 100644 (file)
index 0000000..edfd82e
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/sbr_push.ma".
+include "ground/relocation/tr_uni.ma".
+
+(* PUSH FOR STACKS OF BASIC RELOCATION MAPS *********************************)
+
+(* Constructions with tr_uni ************************************************)
+
+theorem sbr_push_id (p:pnat):
+        (𝐮❨p❩) = p⫯❘𝐢.
+// qed. 
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/upspoonverticalbar_2.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/upspoonverticalbar_2.etc
new file mode 100644 (file)
index 0000000..4b48665
--- /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                  *)
+(*                                                                        *)
+(**************************************************************************)
+
+(* GROUND NOTATION **********************************************************)
+
+notation "hvbox( hd ⫯❘ break tl )"
+  right associative with precedence 47
+  for @{ 'UpSpoonVerticalBar $hd $tl }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/verticalbarat_2.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/relocation/verticalbarat_2.etc
new file mode 100644 (file)
index 0000000..ce7cd14
--- /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( f ❘@❨ break term 46 a ❩ )"
+  non associative with precedence 60
+  for @{ 'VerticalBarAt $f $a }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind.etc
new file mode 100644 (file)
index 0000000..1713625
--- /dev/null
@@ -0,0 +1,189 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/tr_compose_pap.ma".
+include "ground/relocation/tr_uni_pap.ma".
+include "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/black_downtriangle_4.ma".
+include "delayed_updating/notation/functions/black_downtriangle_2.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+definition unwind_continuation (A:Type[0]) ≝
+tr_map → path → A.
+
+rec definition unwind_gen (A:Type[0]) (k:unwind_continuation A) (f) (p) on p ≝
+match p with
+[ list_empty     ⇒ k f (𝐞)
+| list_lcons l q ⇒
+  match l with
+  [ label_d n ⇒
+    match q with
+    [ list_empty     ⇒ unwind_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (f∘𝐮❨n❩) q
+    | list_lcons _ _ ⇒ unwind_gen (A) k (f∘𝐮❨n❩) q
+    ]
+  | label_m   ⇒ unwind_gen (A) k f q
+  | label_L   ⇒ unwind_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
+  | label_A   ⇒ unwind_gen (A) (λg,p. k g (𝗔◗p)) f q
+  | label_S   ⇒ unwind_gen (A) (λg,p. k g (𝗦◗p)) f q
+  ]
+].
+
+interpretation
+  "unwind (gneric)"
+  'BlackDownTriangle A k f p = (unwind_gen A k f p).
+
+definition proj_path: unwind_continuation … ≝
+           λf,p.p.
+
+definition proj_rmap: unwind_continuation … ≝
+           λf,p.f.
+
+interpretation
+  "unwind (path)"
+  'BlackDownTriangle f p = (unwind_gen ? proj_path f p).
+
+interpretation
+  "unwind (relocation map)"
+  'BlackDownTriangle p f = (unwind_gen ? proj_rmap f p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind_empty (A) (k) (f):
+      k f (𝐞) = ▼{A}❨k, f, 𝐞❩.
+// qed.
+
+lemma unwind_d_empty_sn (A) (k) (n) (f):
+      ▼❨(λg,p. k g (𝗱(f@❨n❩)◗p)), f∘𝐮❨ninj n❩, 𝐞❩ = ▼{A}❨k, f,
+𝗱n◗𝐞❩.
+// qed.
+
+lemma unwind_d_lcons_sn (A) (k) (p) (l) (n) (f):
+      ▼❨k, f∘𝐮❨ninj n❩, l◗p❩ = ▼{A}❨k, f, 𝗱n◗l◗p❩.
+// qed.
+
+lemma unwind_m_sn (A) (k) (p) (f):
+      ▼❨k, f, p❩ = ▼{A}❨k, f, 𝗺◗p❩.
+// qed.
+
+lemma unwind_L_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ▼{A}❨k, f, 𝗟◗p❩.
+// qed.
+
+lemma unwind_A_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗔◗p)), f, p❩ = ▼{A}❨k, f, 𝗔◗p❩.
+// qed.
+
+lemma unwind_S_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗦◗p)), f, p❩ = ▼{A}❨k, f, 𝗦◗p❩.
+// qed.
+
+(* Basic constructions with proj_path ***************************************)
+
+lemma unwind_path_empty (f):
+      (𝐞) = ▼[f]𝐞.
+// qed.
+
+lemma unwind_path_d_empty_sn (f) (n):
+      𝗱(f@❨n❩)◗𝐞 = ▼[f](𝗱n◗𝐞).
+// qed.
+
+lemma unwind_path_d_lcons_sn (f) (p) (l) (n):
+      ▼[f∘𝐮❨ninj n❩](l◗p) = ▼[f](𝗱n◗l◗p).
+// qed.
+
+lemma unwind_path_m_sn (f) (p):
+      ▼[f]p = ▼[f](𝗺◗p).
+// qed.
+
+(* Basic constructions with proj_rmap ***************************************)
+
+lemma unwind_rmap_empty (f):
+      f = ▼[𝐞]f.
+// qed.
+
+lemma unwind_rmap_d_sn (f) (p) (n):
+      ▼[p](f∘𝐮❨ninj n❩) = ▼[𝗱n◗p]f.
+#f * // qed.
+
+lemma unwind_rmap_m_sn (f) (p):
+      ▼[p]f = ▼[𝗺◗p]f.
+// qed.
+
+lemma unwind_rmap_L_sn (f) (p):
+      ▼[p](⫯f) = ▼[𝗟◗p]f.
+// qed.
+
+lemma unwind_rmap_A_sn (f) (p):
+      ▼[p]f = ▼[𝗔◗p]f.
+// qed.
+
+lemma unwind_rmap_S_sn (f) (p):
+      ▼[p]f = ▼[𝗦◗p]f.
+// qed.
+
+(* Advanced constructions with proj_rmap and path_append ********************)
+
+lemma unwind_rmap_append (p2) (p1) (f):
+      ▼[p2]▼[p1]f = ▼[p1●p2]f.
+#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
+[ <unwind_rmap_m_sn <unwind_rmap_m_sn //
+| <unwind_rmap_A_sn <unwind_rmap_A_sn //
+| <unwind_rmap_S_sn <unwind_rmap_S_sn //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and path_rcons *********************)
+
+lemma unwind_rmap_d_dx (f) (p) (n):
+      (▼[p]f)∘𝐮❨ninj n❩ = ▼[p◖𝗱n]f.
+// qed.
+
+lemma unwind_rmap_m_dx (f) (p):
+      ▼[p]f = ▼[p◖𝗺]f.
+// qed.
+
+lemma unwind_rmap_L_dx (f) (p):
+      (⫯▼[p]f) = ▼[p◖𝗟]f.
+// qed.
+
+lemma unwind_rmap_A_dx (f) (p):
+      ▼[p]f = ▼[p◖𝗔]f.
+// qed.
+
+lemma unwind_rmap_S_dx (f) (p):
+▼[p]f = ▼[p◖𝗦]f.
+// qed.
+
+lemma unwind_rmap_pap_d_dx (f) (p) (n) (m):
+      ▼[p]f@❨m+n❩ = ▼[p◖𝗱n]f@❨m❩.
+#f #p #n #m
+<unwind_rmap_d_dx <tr_compose_pap <tr_uni_pap //
+qed.
+
+(* Advanced eliminations with path ******************************************)
+
+lemma path_ind_unwind (Q:predicate …):
+      Q (𝐞) →
+      (∀n. Q (𝐞) → Q (𝗱n◗𝐞)) →
+      (∀n,l,p. Q (l◗p) → Q (𝗱n◗l◗p)) →
+      (∀p. Q p → Q (𝗺◗p)) →
+      (∀p. Q p → Q (𝗟◗p)) →
+      (∀p. Q p → Q (𝗔◗p)) →
+      (∀p. Q p → Q (𝗦◗p)) →
+      ∀p. Q p.
+#Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #p
+elim p -p [| * [ #n * ] ]
+/2 width=1 by/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_constructors.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_constructors.etc
new file mode 100644 (file)
index 0000000..93ddb2e
--- /dev/null
@@ -0,0 +1,42 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind_prototerm_eq.ma".
+include "delayed_updating/syntax/prototerm_constructors.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+lemma unwind_iref_after_sn (f) (t:prototerm) (n:pnat):
+      ▼[f∘𝐮❨n❩]t ⊆ ▼[f](𝛗n.t).
+#f #t #n #p * #q #Hq #H0 destruct
+@(ex2_intro … (𝗱n◗𝗺◗q))
+/2 width=1 by in_comp_iref/
+qed-.
+
+lemma unwind_iref_after_dx (f) (t) (n:pnat):
+      ▼[f](𝛗n.t) ⊆ ▼[f∘𝐮❨n❩]t.
+#f #t #n #p * #q #Hq #H0 destruct
+elim (in_comp_inv_iref … Hq) -Hq #p #Hp #Ht destruct
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_iref_after (f) (t) (n:pnat):
+      ▼[f∘𝐮❨n❩]t ⇔ ▼[f](𝛗n.t).
+/3 width=1 by conj, unwind_iref_after_sn, unwind_iref_after_dx/
+qed.
+
+lemma unwind_iref (f) (t) (n:pnat):
+      ▼[f]▼[𝐮❨n❩]t ⇔ ▼[f](𝛗n.t).
+/3 width=3 by unwind_term_after, subset_eq_trans/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_depth.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_depth.etc
new file mode 100644 (file)
index 0000000..8715fb5
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/relocation/tr_id_compose.ma".
+include "ground/relocation/tr_compose_compose.ma".
+include "ground/relocation/tr_compose_pn.ma".
+include "ground/relocation/tr_compose_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
+include "ground/lib/stream_eq_eq.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Constructions with depth *************************************************)
+
+lemma unwind_rmap_decompose (p) (f):
+      ▼[p]f ≗ (⫯*[❘p❘]f)∘(▼[p]𝐢).
+#p @(list_ind_rcons … p) -p
+[ #f <unwind_rmap_empty <unwind_rmap_empty <tr_pushs_zero //
+| #p * [ #n ] #IH #f //
+  [ <unwind_rmap_d_dx <unwind_rmap_d_dx <depth_d_dx
+    @(stream_eq_trans … (tr_compose_assoc …))
+    /2 width=1 by tr_compose_eq_repl/
+  | <unwind_rmap_L_dx <unwind_rmap_L_dx <depth_L_dx
+    <tr_pushs_succ <tr_compose_push_bi
+    /2 width=1 by tr_push_eq_repl/
+  ]
+]
+qed.
+
+lemma unwind_rmap_pap_le (f) (p) (n):
+      (▼[p]𝐢)@❨n❩ < ↑❘p❘ → (▼[p]𝐢)@❨n❩ = (▼[p]f)@❨n❩.
+#f #p #n #Hn
+>(tr_pap_eq_repl … (▼[p]f) … (unwind_rmap_decompose …))
+<tr_compose_pap @tr_pap_pushs_le //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_eq.etc
new file mode 100644 (file)
index 0000000..b3c0b40
--- /dev/null
@@ -0,0 +1,122 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind.ma".
+include "ground/relocation/tr_uni_compose.ma".
+include "ground/relocation/tr_compose_compose.ma".
+include "ground/relocation/tr_compose_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+definition unwind_exteq (A): relation2 (unwind_continuation A) (unwind_continuation A) ≝
+           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
+
+interpretation
+  "extensional equivalence (unwind continuation)"
+  'RingEq A k1 k2 = (unwind_exteq A k1 k2).
+
+(* Constructions with unwind_exteq ******************************************)
+
+lemma unwind_eq_repl (A) (p) (k1) (k2):
+      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ▼❨k1, f1, p❩ = ▼❨k2, f2, p❩).
+#A #p @(path_ind_unwind … p) -p [| #n #IH | #n #l0 #q #IH |*: #q #IH ]
+#k1 #k2 #Hk #f1 #f2 #Hf
+[ <unwind_empty <unwind_empty /2 width=1 by/
+| <unwind_d_empty_sn <unwind_d_empty_sn <(tr_pap_eq_repl … Hf)
+  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
+| <unwind_d_lcons_sn <unwind_d_lcons_sn
+  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
+| /2 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /3 width=1 by/
+| /3 width=1 by/
+]
+qed-.
+
+(* Advanced constructions ***************************************************)
+
+lemma unwind_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
+      ▼❨λg,p2. k g (l◗p2), f, p❩ = ▼{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
+#A #k #f #p #l #Hk
+@unwind_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
+qed.
+
+lemma unwind_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
+      ▼❨λg,p2. k g (p1●l◗p2), f, p❩ = ▼{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
+#A #k #f #p1 #p #l #Hk
+@unwind_eq_repl // #g1 #g2 #p2 #Hg
+<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
+qed.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma proj_path_proper:
+      proj_path ≗ proj_path.
+// qed.
+
+lemma unwind_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ▼[f1]p = ▼[f2]p).
+/2 width=1 by unwind_eq_repl/ qed.
+
+lemma unwind_path_append_sn (p) (f) (q):
+      q●▼[f]p = ▼❨(λg,p. proj_path g (q●p)), f, p❩.
+#p @(path_ind_unwind … p) -p // [ #n #l #p |*: #p ] #IH #f #q
+[ <unwind_d_lcons_sn <unwind_d_lcons_sn <IH -IH //
+| <unwind_m_sn <unwind_m_sn //
+| <unwind_L_sn <unwind_L_sn >unwind_lcons_alt // >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+| <unwind_A_sn <unwind_A_sn >unwind_lcons_alt >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+| <unwind_S_sn <unwind_S_sn >unwind_lcons_alt >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+]
+qed.
+
+lemma unwind_path_lcons (f) (p) (l):
+      l◗▼[f]p = ▼❨(λg,p. proj_path g (l◗p)), f, p❩.
+#f #p #l
+>unwind_lcons_alt <unwind_path_append_sn //
+qed.
+
+lemma unwind_path_L_sn (f) (p):
+      (𝗟◗▼[⫯f]p) = ▼[f](𝗟◗p).
+// qed.
+
+lemma unwind_path_A_sn (f) (p):
+      (𝗔◗▼[f]p) = ▼[f](𝗔◗p).
+// qed.
+
+lemma unwind_path_S_sn (f) (p):
+      (𝗦◗▼[f]p) = ▼[f](𝗦◗p).
+// qed.
+
+lemma unwind_path_after (p) (f1) (f2):
+      ▼[f2]▼[f1]p = ▼[f2∘f1]p.
+#p @(path_ind_unwind … p) -p // [ #n #l #p | #p ] #IH #f1 #f2
+[ <unwind_path_d_lcons_sn <unwind_path_d_lcons_sn
+  >(unwind_path_eq_repl … (tr_compose_assoc …)) //
+| <unwind_path_L_sn <unwind_path_L_sn <unwind_path_L_sn
+  >tr_compose_push_bi //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and stream_tls *********************)
+
+lemma unwind_rmap_tls_d_dx (f) (p) (m) (n):
+      ⇂*[m+n]▼[p]f ≗ ⇂*[m]▼[p◖𝗱n]f.
+#f #p #m #n
+<unwind_rmap_d_dx >nrplus_inj_dx
+/2 width=1 by tr_tls_compose_uni_dx/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_etc.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_etc.etc
new file mode 100644 (file)
index 0000000..a9e563d
--- /dev/null
@@ -0,0 +1,10 @@
+include "delayed_updating/unwind2/unwind_depth.ma".
+include "ground/relocation/tr_uni_compose.ma".
+
+lemma pippo (q) (p): 
+      ▼[p]𝐢 ≗ ⇂*[↑❘q❘]▼[p●𝗟◗q]𝐢.
+#q @(list_ind_rcons … q) -q //
+#q * [ #n ] #IH #p //
+<depth_d_dx >list_cons_shift <list_append_assoc
+<unwind_rmap_d_dx
+check tr_tls_compose_uni_sn
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_fsubst.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_fsubst.etc
new file mode 100644 (file)
index 0000000..fedc665
--- /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/unwind2/unwind_prototerm_eq.ma".
+include "delayed_updating/unwind2/unwind_structure.ma".
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/syntax/preterm.ma".
+include "delayed_updating/syntax/prototerm_proper.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+(* Constructions with fsubst ************************************************)
+
+lemma unwind_fsubst_sn (f) (t) (u) (p): u ϵ 𝐏 →
+      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⊆ ▼[f](t[⋔p←u]).
+#f #t #u #p #Hu #ql * *
+[ #rl * #r #Hr #H1 #H2 destruct
+  >unwind_append_proper_dx
+  /4 width=5 by in_comp_unwind_bi, in_ppc_comp_trans, or_introl, ex2_intro/
+| * #q #Hq #H1 #H0
+  @(ex2_intro … H1) @or_intror @conj // *
+  [ <list_append_empty_dx #H2 destruct
+    elim (unwind_path_root f q) #r #_ #Hr /2 width=2 by/
+  | #l #r #H2 destruct
+    @H0 -H0 [| <unwind_append_proper_dx /2 width=3 by ppc_lcons/ ]
+  ]
+]
+qed-.
+
+lemma unwind_fsubst_dx (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
+      ▼[f](t[⋔p←u]) ⊆ (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u].
+#f #t #u #p #Hu #H1p #H2p #ql * #q * *
+[ #r #Hu #H1 #H2 destruct
+  @or_introl @ex2_intro
+  [|| <unwind_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
+  /2 width=3 by ex2_intro/
+| #Hq #H0 #H1 destruct
+  @or_intror @conj [ /2 width=1 by in_comp_unwind_bi/ ] *
+  [ <list_append_empty_dx #Hr @(H0 … (𝐞)) -H0
+    <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
+  | #l #r #Hr
+    elim (unwind_inv_append_proper_dx … Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
+    lapply (H2p … Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
+  ]
+]
+qed-.
+
+lemma unwind_fsubst (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⇔ ▼[f](t[⋔p←u]).
+/4 width=3 by unwind_fsubst_sn, conj, unwind_fsubst_dx/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_height.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_height.etc
new file mode 100644 (file)
index 0000000..d2678f6
--- /dev/null
@@ -0,0 +1,83 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind_eq.ma".
+include "delayed_updating/syntax/path_height.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/lib/stream_eq_eq.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Constructions with height ************************************************)
+
+lemma unwind_rmap_pap_le (f1) (f2) (p) (m:pnat) (l:nat):
+      ninj (m+⧣p+l) = ❘p❘ →
+      (▼[p]f1)@❨m❩ = (▼[p]f2)@❨m❩.
+#f1 #f2 #p @(list_ind_rcons … p) -p
+[ #m #l <depth_empty #H0 destruct
+| #p * [ #n ] #IH #m #l
+  [ <height_d_dx <depth_d_dx <unwind_rmap_pap_d_dx <unwind_rmap_pap_d_dx
+    <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
+    #H0 <(IH … l) -IH //
+  | /2 width=2 by/
+  | <height_L_dx <depth_L_dx <unwind_rmap_L_dx <unwind_rmap_L_dx
+    cases m -m // #m
+    <nrplus_succ_sn <nrplus_succ_sn >nsucc_inj #H0
+    <tr_pap_push <tr_pap_push
+    <(IH … l) -IH //
+  | /2 width=2 by/
+  | /2 width=2 by/
+  ]
+]
+qed.
+
+lemma unwind_rmap_pap_gt (f) (p) (m):
+      f@❨m+⧣p❩+❘p❘ = (▼[p]f)@❨m+❘p❘❩.
+#f #p @(list_ind_rcons … p) -p [ // ]
+#p * [ #n ] #IH #m
+[ <height_d_dx <depth_d_dx
+  <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
+  <unwind_rmap_pap_d_dx >IH -IH //
+| //
+| <height_L_dx <depth_L_dx
+  <nrplus_succ_dx <nrplus_succ_dx <unwind_rmap_L_dx <tr_pap_push //
+| //
+| //
+]
+qed.
+
+lemma unwind_rmap_tls_gt (f) (p) (m:pnat):
+      ⇂*[ninj (m+⧣p)]f ≗ ⇂*[ninj (m+❘p❘)]▼[p]f.
+#f #p @(list_ind_rcons … p) -p [ // ]
+#p * [ #n ] #IH #m
+[ <height_d_dx <depth_d_dx
+  <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
+  @(stream_eq_trans … (unwind_rmap_tls_d_dx …))
+  @(stream_eq_canc_dx … (IH …)) -IH //
+| //
+| <height_L_dx <depth_L_dx
+  <nrplus_succ_dx >nsucc_inj //
+| //
+| //
+]
+qed.
+
+lemma unwind_rmap_tls_eq (f) (p):
+      ⇂*[⧣p]f ≗ ⇂*[↑❘p❘]▼[p]⫯f.
+(*
+#f #p @(list_ind_rcons … p) -p //
+#p * [ #n ] #IH //
+<height_d_dx <depth_d_dx <unwind_rmap_d_dx
+@(stream_eq_trans … (tr_tls_compose_uni_dx …))
+*)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_preterm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_preterm_eq.etc
new file mode 100644 (file)
index 0000000..d60c54c
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lib/subset_equivalence.ma".
+include "delayed_updating/syntax/path_structure_inner.ma".
+include "delayed_updating/syntax/preterm.ma".
+include "delayed_updating/unwind2/unwind_structure.ma".
+include "delayed_updating/unwind2/unwind_prototerm.ma".
+
+(* UNWIND FOR PRETERM *******************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma unwind_grafted_sn (f) (t) (p): p ϵ 𝐈 →
+      ▼[▼[p]f](t⋔p) ⊆ (▼[f]t)⋔(⊗p).
+#f #t #p #Hp #q * #r #Hr #H0 destruct
+@(ex2_intro … Hr) -Hr
+<unwind_append_inner_sn //
+qed-.
+
+lemma unwind_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)⋔(⊗p) ⊆ ▼[▼[p]f](t⋔p).
+#f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
+elim (unwind_inv_append_inner_sn … (sym_eq … H0)) -H0 //
+#p0 #q0 #Hp0 #Hq0 #H0 destruct
+<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
+      ▼[▼[p]f](t⋔p) ⇔ (▼[f]t)⋔(⊗p).
+/3 width=1 by unwind_grafted_sn, conj, unwind_grafted_dx/ qed.
+
+
+lemma unwind_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)⋔((⊗p)◖𝗦) ⊆ ▼[▼[p]f](t⋔(p◖𝗦)).
+#f #t #p #Hp #Ht #q * #r #Hr
+<list_append_rcons_sn #H0
+elim (unwind_inv_append_proper_dx … (sym_eq … H0)) -H0 //
+#p0 #q0 #Hp0 #Hq0 #H0 destruct
+<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
+elim (unwind_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
+#r1 #r2 #Hr1 #Hr2 #H0 destruct
+lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
+[ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      ▼[▼[p]f](t⋔(p◖𝗦)) ⇔ (▼[f]t)⋔((⊗p)◖𝗦).
+#f #t #p #Hp #Ht
+@conj
+[ >unwind_rmap_S_dx >structure_S_dx
+  @unwind_grafted_sn //
+| /2 width=1 by unwind_grafted_S_dx/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm.etc
new file mode 100644 (file)
index 0000000..1a5d46b
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind.ma".
+include "delayed_updating/syntax/prototerm.ma".
+include "ground/lib/subset_ext.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+interpretation
+  "unwind (prototerm)"
+  'BlackDownTriangle f t = (subset_ext_f1 ? ? (unwind_gen ? proj_path f) t).
+
+(* Basic constructions ******************************************************)
+
+lemma in_comp_unwind_bi (f) (p) (t):
+      p ϵ t → ▼[f]p ϵ ▼[f]t.
+/2 width=1 by subset_in_ext_f1_dx/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_prototerm_eq.etc
new file mode 100644 (file)
index 0000000..15b8cdb
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lib/subset_ext_equivalence.ma".
+include "delayed_updating/unwind2/unwind_eq.ma".
+include "delayed_updating/unwind2/unwind_prototerm.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma unwind_term_eq_repl_sn (f1) (f2) (t):
+      f1 ≗ f2 → ▼[f1]t ⇔ ▼[f2]t.
+/3 width=1 by subset_equivalence_ext_f1_exteq, unwind_path_eq_repl/
+qed.
+
+lemma unwind_term_eq_repl_dx (f) (t1) (t2):
+      t1 ⇔ t2 → ▼[f]t1 ⇔ ▼[f]t2.
+/2 width=1 by subset_equivalence_ext_f1_bi/
+qed.
+
+lemma unwind_term_after (f1) (f2) (t):
+      ▼[f2]▼[f1]t ⇔ ▼[f2∘f1]t.
+#f1 #f2 #t @subset_eq_trans
+[
+| @subset_inclusion_ext_f1_compose
+| @subset_equivalence_ext_f1_exteq /2 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure.etc
new file mode 100644 (file)
index 0000000..b5d92a5
--- /dev/null
@@ -0,0 +1,269 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind_eq.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_inner.ma".
+include "delayed_updating/syntax/path_proper.ma".
+include "ground/xoa/ex_4_2.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Basic constructions with structure ***************************************)
+
+lemma structure_unwind (p) (f):
+      ⊗p = ⊗▼[f]p.
+#p @(path_ind_unwind … p) -p // #p #IH #f
+<unwind_path_L_sn //
+qed.
+
+lemma unwind_structure (p) (f):
+      ⊗p = ▼[f]⊗p.
+#p @(path_ind_unwind … p) -p //
+qed.
+
+(* Destructions with structure **********************************************)
+
+lemma unwind_des_structure (q) (p) (f):
+      ⊗q = ▼[f]p → ⊗q = ⊗p.
+// qed-.
+
+(* Constructions with proper condition for path *****************************)
+
+lemma unwind_append_proper_dx (p2) (p1) (f): p2 ϵ 𝐏 →
+      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
+#p2 #p1 @(path_ind_unwind … p1) -p1 //
+[ #n | #n #l #p1 |*: #p1 ] #IH #f #Hp2
+[ elim (ppc_inv_lcons … Hp2) -Hp2 #l #q #H destruct //
+| <unwind_path_d_lcons_sn <IH //
+| <unwind_path_m_sn <IH //
+| <unwind_path_L_sn <IH //
+| <unwind_path_A_sn <IH //
+| <unwind_path_S_sn <IH //
+]
+qed-.
+
+(* Constructions with inner condition for path ******************************)
+
+lemma unwind_append_inner_sn (p1) (p2) (f): p1 ϵ 𝐈 →
+      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
+#p1 @(list_ind_rcons … p1) -p1 // #p1 *
+[ #n ] #_ #p2 #f #Hp1
+[ elim (pic_inv_d_dx … Hp1)
+| <list_append_rcons_sn <unwind_append_proper_dx //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_L_dx <list_append_rcons_sn //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_A_dx <list_append_rcons_sn //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_S_dx <list_append_rcons_sn //
+]
+qed-.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma unwind_path_d_empty_dx (n) (p) (f):
+      (⊗p)◖𝗱((▼[p]f)@❨n❩) = ▼[f](p◖𝗱n).
+#n #p #f <unwind_append_proper_dx // 
+qed.
+
+lemma unwind_path_m_dx (p) (f):
+      ⊗p = ▼[f](p◖𝗺).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_L_dx (p) (f):
+      (⊗p)◖𝗟 = ▼[f](p◖𝗟).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_A_dx (p) (f):
+      (⊗p)◖𝗔 = ▼[f](p◖𝗔).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_S_dx (p) (f):
+      (⊗p)◖𝗦 = ▼[f](p◖𝗦).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_root (f) (p):
+      ∃∃r. 𝐞 = ⊗r & ⊗p●r = ▼[f]p.
+#f #p @(list_ind_rcons … p) -p
+[ /2 width=3 by ex2_intro/
+| #p * [ #n ] /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversions with proj_path ***************************************)
+
+lemma unwind_path_inv_d_sn (k) (q) (p) (f):
+      (𝗱k◗q) = ▼[f]p →
+      ∃∃r,h. 𝐞 = ⊗r & (▼[r]f)@❨h❩ = k & 𝐞 = q & r◖𝗱h = p.
+#k #q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct -IH
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_m_sn (q) (p) (f):
+      (𝗺◗q) = ▼[f]p → ⊥.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H /2 width=2 by/
+| <unwind_path_m_sn #H /2 width=2 by/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_L_sn (q) (p) (f):
+      (𝗟◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[⫯▼[r1]f]r2 & r1●𝗟◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_L_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_A_sn (q) (p) (f):
+      (𝗔◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗔◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_S_sn (q) (p) (f):
+      (𝗦◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗦◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Inversions with proper condition for path ********************************)
+
+lemma unwind_inv_append_proper_dx (q2) (q1) (p) (f):
+      q2 ϵ 𝐏 → q1●q2 = ▼[f]p →
+      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
+#q2 #q1 elim q1 -q1
+[ #p #f #Hq2 <list_append_empty_sn #H destruct
+  /2 width=5 by ex3_2_intro/
+| * [ #n1 ] #q1 #IH #p #f #Hq2 <list_append_lcons_sn #H
+  [ elim (unwind_path_inv_d_sn … H) -H #r1 #m1 #_ #_ #H0 #_ -IH
+    elim (eq_inv_list_empty_append … H0) -H0 #_ #H0 destruct
+    elim Hq2 -Hq2 //
+  | elim (unwind_path_inv_m_sn … H)
+  | elim (unwind_path_inv_L_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗟◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  | elim (unwind_path_inv_A_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗔◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  | elim (unwind_path_inv_S_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗦◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  ]
+]
+qed-.
+
+(* Inversions with inner condition for path *********************************)
+
+lemma unwind_inv_append_inner_sn (q1) (q2) (p) (f):
+      q1 ϵ 𝐈 → q1●q2 = ▼[f]p →
+      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
+#q1 @(list_ind_rcons … q1) -q1
+[ #q2 #p #f #Hq1 <list_append_empty_sn #H destruct
+  /2 width=5 by ex3_2_intro/
+| #q1 * [ #n1 ] #_ #q2 #p #f #Hq2
+  [ elim (pic_inv_d_dx … Hq2)
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_m_sn … (sym_eq … H2))
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_L_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗟)) [1,3: // ]
+    [ <structure_append <structure_L_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_A_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗔)) [1,3: // ]
+    [ <structure_append <structure_A_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_S_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗦)) [1,3: // ]
+    [ <structure_append <structure_S_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure_depth.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind2/unwind_structure_depth.etc
new file mode 100644 (file)
index 0000000..577a95b
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind2/unwind.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/arith/nat_pred_succ.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Basic constructions with structure and depth *****************************)
+
+lemma unwind_rmap_structure (p) (f):
+      (⫯*[❘p❘]f) = ▼[⊗p]f.
+#p elim p -p //
+* [ #n ] #p #IH #f //
+[ <unwind_rmap_A_sn //
+| <unwind_rmap_S_sn //
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift.etc
new file mode 100644 (file)
index 0000000..a487fcf
--- /dev/null
@@ -0,0 +1,150 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/notation/functions/uparrow_4.ma".
+include "delayed_updating/notation/functions/uparrow_2.ma".
+include "delayed_updating/syntax/path.ma".
+include "ground/relocation/tr_uni.ma".
+include "ground/relocation/tr_pap_tls.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+definition lift_continuation (A:Type[0]) ≝
+           tr_map → path → A.
+
+rec definition lift_gen (A:Type[0]) (k:lift_continuation A) (f) (p) on p ≝
+match p with
+[ list_empty     ⇒ k f (𝐞)
+| list_lcons l q ⇒
+  match l with
+  [ label_d n ⇒ lift_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (⇂*[n]f) q
+  | label_m   ⇒ lift_gen (A) (λg,p. k g (𝗺◗p)) f q
+  | label_L   ⇒ lift_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
+  | label_A   ⇒ lift_gen (A) (λg,p. k g (𝗔◗p)) f q
+  | label_S   ⇒ lift_gen (A) (λg,p. k g (𝗦◗p)) f q
+  ]
+].
+
+interpretation
+  "lift (gneric)"
+  'UpArrow A k f p = (lift_gen A k f p).
+
+definition proj_path: lift_continuation … ≝
+           λf,p.p.
+
+definition proj_rmap: lift_continuation … ≝
+           λf,p.f.
+
+interpretation
+  "lift (path)"
+  'UpArrow f p = (lift_gen ? proj_path f p).
+
+interpretation
+  "lift (relocation map)"
+  'UpArrow p f = (lift_gen ? proj_rmap f p).
+
+(* Basic constructions ******************************************************)
+
+lemma lift_empty (A) (k) (f):
+      k f (𝐞) = ↑{A}❨k, f, 𝐞❩.
+// qed.
+
+lemma lift_d_sn (A) (k) (p) (n) (f):
+      ↑❨(λg,p. k g (𝗱(f@❨n❩)◗p)), ⇂*[n]f, p❩ = ↑{A}❨k, f, 𝗱n◗p❩.
+// qed.
+
+lemma lift_m_sn (A) (k) (p) (f):
+      ↑❨(λg,p. k g (𝗺◗p)), f, p❩ = ↑{A}❨k, f, 𝗺◗p❩.
+// qed.
+
+lemma lift_L_sn (A) (k) (p) (f):
+      ↑❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ↑{A}❨k, f, 𝗟◗p❩.
+// qed.
+
+lemma lift_A_sn (A) (k) (p) (f):
+      ↑❨(λg,p. k g (𝗔◗p)), f, p❩ = ↑{A}❨k, f, 𝗔◗p❩.
+// qed.
+
+lemma lift_S_sn (A) (k) (p) (f):
+      ↑❨(λg,p. k g (𝗦◗p)), f, p❩ = ↑{A}❨k, f, 𝗦◗p❩.
+// qed.
+
+(* Basic constructions with proj_path ***************************************)
+
+lemma lift_path_empty (f):
+      (𝐞) = ↑[f]𝐞.
+// qed.
+
+(* Basic constructions with proj_rmap ***************************************)
+
+lemma lift_rmap_empty (f):
+      f = ↑[𝐞]f.
+// qed.
+
+lemma lift_rmap_d_sn (f) (p) (n):
+      ↑[p](⇂*[ninj n]f) = ↑[𝗱n◗p]f.
+// qed.
+
+lemma lift_rmap_m_sn (f) (p):
+      ↑[p]f = ↑[𝗺◗p]f.
+// qed.
+
+lemma lift_rmap_L_sn (f) (p):
+      ↑[p](⫯f) = ↑[𝗟◗p]f.
+// qed.
+
+lemma lift_rmap_A_sn (f) (p):
+      ↑[p]f = ↑[𝗔◗p]f.
+// qed.
+
+lemma lift_rmap_S_sn (f) (p):
+      ↑[p]f = ↑[𝗦◗p]f.
+// qed.
+
+(* Advanced constructions with proj_rmap and path_append ********************)
+
+lemma lift_rmap_append (p2) (p1) (f):
+      ↑[p2]↑[p1]f = ↑[p1●p2]f.
+#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
+[ <lift_rmap_m_sn <lift_rmap_m_sn //
+| <lift_rmap_A_sn <lift_rmap_A_sn //
+| <lift_rmap_S_sn <lift_rmap_S_sn //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and path_rcons *********************)
+
+lemma lift_rmap_d_dx (f) (p) (n):
+      ⇂*[ninj n](↑[p]f) = ↑[p◖𝗱n]f.
+// qed.
+
+lemma lift_rmap_m_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗺]f.
+// qed.
+
+lemma lift_rmap_L_dx (f) (p):
+      (⫯↑[p]f) = ↑[p◖𝗟]f.
+// qed.
+
+lemma lift_rmap_A_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗔]f.
+// qed.
+
+lemma lift_rmap_S_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗦]f.
+// qed.
+
+lemma lift_rmap_pap_d_dx (f) (p) (n) (m):
+      ↑[p]f@❨m+n❩ = ↑[p◖𝗱n]f@❨m❩+↑[p]f@❨n❩.
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_after.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_after.etc
new file mode 100644 (file)
index 0000000..756b735
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_eq.ma".
+include "ground/relocation/tr_compose_pap.ma".
+include "ground/relocation/tr_compose_pn.ma".
+include "ground/relocation/tr_compose_tls.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+(* Constructions with tr_after *********************************************)
+
+lemma lift_path_after (p) (f1) (f2):
+      ↑[f2]↑[f1]p = ↑[f2∘f1]p.
+#p elim p -p [| * ] // [ #n ] #p #IH #f1 #f2
+[ <lift_path_d_sn <lift_path_d_sn <lift_path_d_sn //
+| <lift_path_L_sn <lift_path_L_sn <lift_path_L_sn
+  >tr_compose_push_bi //
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_constructors.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_constructors.etc
new file mode 100644 (file)
index 0000000..772c837
--- /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/substitution/lift_prototerm_id.ma".
+include "delayed_updating/substitution/lift_uni.ma".
+include "delayed_updating/syntax/prototerm_constructors.ma".
+
+(* LIFT FOR PROTOTERM *******************************************************)
+
+lemma lift_iref_bi (t1) (t2) (n):
+      t1 ⇔ t2 → 𝛗n.t1 ⇔ 𝛗n.t2.
+/2 width=1 by subset_equivalence_ext_f1_bi/
+qed.
+
+lemma lift_iref_sn (f) (t:prototerm) (n:pnat):
+      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⊆ ↑[f](𝛗n.t).
+#f #t #n #p * #q * #r #Hr #H1 #H2 destruct
+@(ex2_intro … (𝗱n◗𝗺◗r))
+/2 width=1 by in_comp_iref/
+qed-.
+
+lemma lift_iref_dx (f) (t) (n:pnat):
+      ↑[f](𝛗n.t) ⊆ 𝛗f@❨n❩.↑[⇂*[n]f]t.
+#f #t #n #p * #q #Hq #H0 destruct
+elim (in_comp_inv_iref … Hq) -Hq #p #H0 #Hp destruct
+/3 width=1 by in_comp_iref, in_comp_lift_bi/
+qed-.
+
+lemma lift_iref (f) (t) (n:pnat):
+      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⇔ ↑[f](𝛗n.t).
+/3 width=1 by conj, lift_iref_sn, lift_iref_dx/
+qed.
+
+lemma lift_iref_uni (t) (m) (n):
+      (𝛗(n+m).t) ⇔ ↑[𝐮❨m❩](𝛗n.t).
+#t #m #n
+@(subset_eq_trans … (lift_iref …))
+<tr_uni_pap >nsucc_pnpred <tr_tls_succ_uni
+/3 width=1 by lift_iref_bi, lift_term_id/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_eq.etc
new file mode 100644 (file)
index 0000000..fad4995
--- /dev/null
@@ -0,0 +1,123 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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.ma".
+(*
+include "ground/relocation/tr_uni_compose.ma".
+include "ground/relocation/tr_compose_compose.ma".
+include "ground/relocation/tr_compose_eq.ma".
+*)
+include "ground/relocation/tr_pap_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
+include "ground/lib/stream_tls_eq.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+definition lift_exteq (A): relation2 (lift_continuation A) (lift_continuation A) ≝
+           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
+
+interpretation
+  "extensional equivalence (lift continuation)"
+  'RingEq A k1 k2 = (lift_exteq A k1 k2).
+
+(* Constructions with lift_exteq ********************************************)
+
+lemma lift_eq_repl (A) (p) (k1) (k2):
+      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ↑❨k1, f1, p❩ = ↑❨k2, f2, p❩).
+#A #p elim p -p [| * [ #n ] #q #IH ]
+#k1 #k2 #Hk #f1 #f2 #Hf
+[ <lift_empty <lift_empty /2 width=1 by/
+| <lift_d_sn <lift_d_sn <(tr_pap_eq_repl … Hf)
+  /3 width=3 by stream_tls_eq_repl, compose_repl_fwd_sn/
+| /3 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /3 width=1 by/
+| /3 width=1 by/
+]
+qed-.
+
+(* Advanced constructions ***************************************************)
+
+lemma lift_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
+      ↑❨λg,p2. k g (l◗p2), f, p❩ = ↑{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
+#A #k #f #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
+qed.
+
+lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
+      ↑❨λg,p2. k g (p1●l◗p2), f, p❩ = ↑{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
+#A #k #f #p1 #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg
+<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
+qed.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma proj_path_proper:
+      proj_path ≗ proj_path.
+// qed.
+
+lemma lift_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ↑[f1]p = ↑[f2]p).
+/2 width=1 by lift_eq_repl/ qed.
+
+lemma lift_path_append_sn (p) (f) (q):
+      q●↑[f]p = ↑❨(λg,p. proj_path g (q●p)), f, p❩.
+#p elim p -p // * [ #n ] #p #IH #f #q
+[ <lift_d_sn <lift_d_sn
+| <lift_m_sn <lift_m_sn
+| <lift_L_sn <lift_L_sn
+| <lift_A_sn <lift_A_sn
+| <lift_S_sn <lift_S_sn
+] 
+>lift_lcons_alt // >lift_append_rcons_sn //
+<IH <IH -IH <list_append_rcons_sn //
+qed.
+
+lemma lift_path_lcons (f) (p) (l):
+      l◗↑[f]p = ↑❨(λg,p. proj_path g (l◗p)), f, p❩.
+#f #p #l
+>lift_lcons_alt <lift_path_append_sn //
+qed.
+
+lemma lift_path_d_sn (f) (p) (n):
+      (𝗱(f@❨n❩)◗↑[⇂*[n]f]p) = ↑[f](𝗱n◗p).
+// qed.
+
+lemma lift_path_m_sn (f) (p):
+      (𝗺◗↑[f]p) = ↑[f](𝗺◗p).
+// qed.
+
+lemma lift_path_L_sn (f) (p):
+      (𝗟◗↑[⫯f]p) = ↑[f](𝗟◗p).
+// qed.
+
+lemma lift_path_A_sn (f) (p):
+      (𝗔◗↑[f]p) = ↑[f](𝗔◗p).
+// qed.
+
+lemma lift_path_S_sn (f) (p):
+      (𝗦◗↑[f]p) = ↑[f](𝗦◗p).
+// qed.
+(* COMMENT 
+
+(* Advanced constructions with proj_rmap and stream_tls *********************)
+
+lemma lift_rmap_tls_d_dx (f) (p) (m) (n):
+      ⇂*[m+n]↑[p]f ≗ ⇂*[m]↑[p◖𝗱n]f.
+#f #p #m #n
+<lift_rmap_d_dx >nrplus_inj_dx
+/2 width=1 by tr_tls_compose_uni_dx/
+qed.
+*)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_id.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_id.etc
new file mode 100644 (file)
index 0000000..1d8b452
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_eq.ma".
+include "ground/relocation/tr_id_pap.ma".
+include "ground/relocation/tr_id_tls.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+(* Constructions with tr_id ************************************************)
+
+lemma lift_path_id (p):
+      p = ↑[𝐢]p.
+#p elim p -p //
+* [ #n ] #p #IH //
+[ <lift_path_d_sn //
+| <lift_path_L_sn //
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm.etc
new file mode 100644 (file)
index 0000000..6555b5d
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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.ma".
+include "delayed_updating/syntax/prototerm.ma".
+include "ground/lib/subset_ext.ma".
+
+(* LIFT FOR PROTOTERM *******************************************************)
+
+interpretation
+  "lift (prototerm)"
+  'UpArrow f t = (subset_ext_f1 ? ? (lift_gen ? proj_path f) t).
+
+(* Basic constructions ******************************************************)
+
+lemma in_comp_lift_bi (f) (p) (t):
+      p ϵ t → ↑[f]p ϵ ↑[f]t.
+/2 width=1 by subset_in_ext_f1_dx/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_eq.etc
new file mode 100644 (file)
index 0000000..fc3fb3f
--- /dev/null
@@ -0,0 +1,40 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lib/subset_ext_equivalence.ma".
+include "delayed_updating/substitution/lift_after.ma".
+include "delayed_updating/substitution/lift_prototerm.ma".
+
+(* LIFT FOR PROTOTERM *******************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma lift_term_eq_repl_sn (f1) (f2) (t):
+      f1 ≗ f2 → ↑[f1]t ⇔ ↑[f2]t.
+/3 width=1 by subset_equivalence_ext_f1_exteq, lift_path_eq_repl/
+qed.
+
+lemma lift_term_eq_repl_dx (f) (t1) (t2):
+      t1 ⇔ t2 → ↑[f]t1 ⇔ ↑[f]t2.
+/2 width=1 by subset_equivalence_ext_f1_bi/
+qed.
+
+lemma lift_term_after (f1) (f2) (t):
+      ↑[f2]↑[f1]t ⇔ ↑[f2∘f1]t.
+#f1 #f2 #t @subset_eq_trans
+[
+| @subset_inclusion_ext_f1_compose
+| @subset_equivalence_ext_f1_exteq /2 width=5/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_id.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_prototerm_id.etc
new file mode 100644 (file)
index 0000000..cc75692
--- /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_prototerm_eq.ma".
+include "delayed_updating/substitution/lift_id.ma".
+
+lemma lift_term_id_sn (t):
+      t ⊆ ↑[𝐢]t.
+#t #p #Hp
+>(lift_path_id p)
+/2 width=1 by in_comp_lift_bi/
+qed-.
+
+lemma lift_term_id_dx (t):
+      ↑[𝐢]t ⊆ t.
+#t #p * #q #Hq #H destruct //
+qed-.
+
+lemma lift_term_id (t):
+      t ⇔ ↑[𝐢]t.
+/3 width=2 by lift_term_id_dx, lift_term_id_sn, conj/      
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_uni.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/lift_uni.etc
new file mode 100644 (file)
index 0000000..cd6c795
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_id.ma".
+include "ground/relocation/tr_uni_pap.ma".
+include "ground/relocation/tr_uni_tls.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+(* Constructions with tr_uni ***********************************************)
+
+lemma lift_path_d_sn_uni (p) (m) (n):
+      (𝗱(n+m)◗p) = ↑[𝐮❨m❩](𝗱(n)◗p).
+#p #m #n
+<lift_path_d_sn <tr_uni_pap >nsucc_pnpred
+<tr_tls_succ_uni //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind.etc
new file mode 100644 (file)
index 0000000..87790b3
--- /dev/null
@@ -0,0 +1,189 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/relocation/sbr_pap_push.ma".
+include "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/black_downtriangle_4.ma".
+include "delayed_updating/notation/functions/black_downtriangle_2.ma".
+include "ground/relocation/tr_pn.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+definition unwind_continuation (A:Type[0]) ≝
+           tr_map → path → A.
+
+(* Note: f is a stack of update functions *)
+rec definition unwind_gen (A:Type[0]) (k:unwind_continuation A) (f:tr_map) (p) on p ≝
+match p with
+[ list_empty     ⇒ k f (𝐞)
+| list_lcons l q ⇒
+  match l with
+  [ label_d n ⇒
+    match q with
+    [ list_empty     ⇒ unwind_gen (A) (λg,p. k g (𝗱(f❘@❨n❩)◗p)) (f❘@❨n❩⫯❘f) q
+    | list_lcons _ _ ⇒ unwind_gen (A) k (f❘@❨n❩⫯❘f) q
+    ]
+  | label_m   ⇒ unwind_gen (A) k f q
+  | label_L   ⇒ unwind_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
+  | label_A   ⇒ unwind_gen (A) (λg,p. k g (𝗔◗p)) f q
+  | label_S   ⇒ unwind_gen (A) (λg,p. k g (𝗦◗p)) f q
+  ]
+].
+
+interpretation
+  "unwind (gneric)"
+  'BlackDownTriangle A k f p = (unwind_gen A k f p).
+
+definition proj_path: unwind_continuation … ≝
+           λf,p.p.
+
+definition proj_rmap: unwind_continuation … ≝
+           λf,p.f.
+
+interpretation
+  "unwind (path)"
+  'BlackDownTriangle f p = (unwind_gen ? proj_path f p).
+
+interpretation
+  "unwind (relocation map)"
+  'BlackDownTriangle p f = (unwind_gen ? proj_rmap f p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind_empty (A) (k) (f):
+      k f (𝐞) = ▼{A}❨k, f, 𝐞❩.
+// qed.
+
+lemma unwind_d_empty_sn (A) (k) (n) (f):
+      ▼❨(λg,p. k g (𝗱(f❘@❨n❩)◗p)), f❘@❨n❩⫯❘f, 𝐞❩ = ▼{A}❨k, f, 𝗱n◗𝐞❩.
+// qed.
+
+lemma unwind_d_lcons_sn (A) (k) (p) (l) (n) (f):
+      ▼❨k, f❘@❨n❩⫯❘f, l◗p❩ = ▼{A}❨k, f, 𝗱n◗l◗p❩.
+// qed.
+
+lemma unwind_m_sn (A) (k) (p) (f):
+      ▼❨k, f, p❩ = ▼{A}❨k, f, 𝗺◗p❩.
+// qed.
+
+lemma unwind_L_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ▼{A}❨k, f, 𝗟◗p❩.
+// qed.
+
+lemma unwind_A_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗔◗p)), f, p❩ = ▼{A}❨k, f, 𝗔◗p❩.
+// qed.
+
+lemma unwind_S_sn (A) (k) (p) (f):
+      ▼❨(λg,p. k g (𝗦◗p)), f, p❩ = ▼{A}❨k, f, 𝗦◗p❩.
+// qed.
+
+(* Basic constructions with proj_path ***************************************)
+
+lemma unwind_path_empty (f):
+      (𝐞) = ▼[f]𝐞.
+// qed.
+
+lemma unwind_path_d_empty_sn (f) (n):
+      𝗱(f❘@❨n❩)◗𝐞 = ▼[f](𝗱n◗𝐞).
+// qed.
+
+lemma unwind_path_d_lcons_sn (f) (p) (l) (n):
+      ▼[f❘@❨n❩⫯❘f](l◗p) = ▼[f](𝗱n◗l◗p).
+// qed.
+
+lemma unwind_path_m_sn (f) (p):
+      ▼[f]p = ▼[f](𝗺◗p).
+// qed.
+
+(* Basic constructions with proj_rmap ***************************************)
+
+lemma unwind_rmap_empty (f):
+      f = ▼[𝐞]f.
+// qed.
+
+lemma unwind_rmap_d_sn (f) (p) (n):
+      ▼[p](f❘@❨n❩⫯❘f) = ▼[𝗱n◗p]f.
+#f * // qed.
+
+lemma unwind_rmap_m_sn (f) (p):
+      ▼[p]f = ▼[𝗺◗p]f.
+// qed.
+
+lemma unwind_rmap_L_sn (f) (p):
+      ▼[p](⫯f) = ▼[𝗟◗p]f.
+// qed.
+
+lemma unwind_rmap_A_sn (f) (p):
+      ▼[p]f = ▼[𝗔◗p]f.
+// qed.
+
+lemma unwind_rmap_S_sn (f) (p):
+      ▼[p]f = ▼[𝗦◗p]f.
+// qed.
+
+(* Advanced constructions with proj_rmap and path_append ********************)
+
+lemma unwind_rmap_append (p2) (p1) (f):
+      ▼[p2]▼[p1]f = ▼[p1●p2]f.
+#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
+[ <unwind_rmap_m_sn <unwind_rmap_m_sn //
+| <unwind_rmap_A_sn <unwind_rmap_A_sn //
+| <unwind_rmap_S_sn <unwind_rmap_S_sn //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and path_rcons *********************)
+
+lemma unwind_rmap_d_dx (f) (p) (n):
+      (▼[p]f)❘@❨n❩⫯❘▼[p]f = ▼[p◖𝗱n]f.
+// qed.
+
+lemma unwind_rmap_m_dx (f) (p):
+      ▼[p]f = ▼[p◖𝗺]f.
+// qed.
+
+lemma unwind_rmap_L_dx (f) (p):
+      (⫯▼[p]f) = ▼[p◖𝗟]f.
+// qed.
+
+lemma unwind_rmap_A_dx (f) (p):
+      ▼[p]f = ▼[p◖𝗔]f.
+// qed.
+
+lemma unwind_rmap_S_dx (f) (p):
+▼[p]f = ▼[p◖𝗦]f.
+// qed.
+
+lemma unwind_rmap_pap_d_dx (f) (p) (n) (m):
+      m+▼[p]f❘@❨n❩ = ▼[p◖𝗱n]f❘@❨m❩.
+#f #p #n #m
+<unwind_rmap_d_dx <sbr_push_pap //
+qed.
+
+(* Advanced eliminations with path ******************************************)
+
+lemma path_ind_unwind (Q:predicate …):
+      Q (𝐞) →
+      (∀n. Q (𝐞) → Q (𝗱n◗𝐞)) →
+      (∀n,l,p. Q (l◗p) → Q (𝗱n◗l◗p)) →
+      (∀p. Q p → Q (𝗺◗p)) →
+      (∀p. Q p → Q (𝗟◗p)) →
+      (∀p. Q p → Q (𝗔◗p)) →
+      (∀p. Q p → Q (𝗦◗p)) →
+      ∀p. Q p.
+#Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #p
+elim p -p [| * [ #n * ] ]
+/2 width=1 by/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_constructors.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_constructors.etc
new file mode 100644 (file)
index 0000000..4849ecf
--- /dev/null
@@ -0,0 +1,44 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind_prototerm_eq.ma".
+include "delayed_updating/syntax/prototerm_constructors.ma".
+include "delayed_updating/relocation/sbr_push_uni.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+(* Constructions with constructors for prototerm ****************************)
+
+lemma unwind_iref_sn (f) (t:prototerm) (n:pnat):
+      ▼[f❘@❨n❩⫯❘f]t ⊆ ▼[f](𝛗n.t).
+#f #t #n #p * #q #Hq #H0 destruct
+@(ex2_intro … (𝗱n◗𝗺◗q))
+/2 width=1 by in_comp_iref/
+qed-.
+
+lemma unwind_iref_dx (f) (t) (n:pnat):
+      ▼[f](𝛗n.t) ⊆ ▼[f❘@❨n❩⫯❘f]t.
+#f #t #n #p * #q #Hq #H0 destruct
+elim (in_comp_inv_iref … Hq) -Hq #p #Hp #Ht destruct
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_iref (f) (t) (n:pnat):
+      ▼[f❘@❨n❩⫯❘f]t ⇔ ▼[f](𝛗n.t).
+/3 width=1 by conj, unwind_iref_sn, unwind_iref_dx/
+qed.
+
+lemma unwind_iref_id (t) (n:pnat):
+      ▼[𝐮❨n❩]t ⇔ ▼[𝐢](𝛗n.t).
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_depth.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_depth.etc
new file mode 100644 (file)
index 0000000..9200360
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/relocation/tr_uni_compose.ma".
+include "ground/lib/stream_tls_plus.ma".
+include "ground/lib/stream_eq_eq.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Constructions with depth *************************************************)
+
+lemma tls_succ_unwind (q) (p) (f):
+      ▼[p]f ≗ ⇂*[↑❘q❘]▼[p●𝗟◗q]f.
+#q @(list_ind_rcons … q) -q //
+#q * [ #n ] #IH #p #f //
+<depth_d_dx >list_cons_shift <list_append_assoc <unwind_rmap_d_dx
+/3 width=3 by tr_tls_compose_uni_sn, stream_eq_trans/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_eq.etc
new file mode 100644 (file)
index 0000000..78d755b
--- /dev/null
@@ -0,0 +1,124 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind.ma".
+include "delayed_updating/relocation/sbr_pap_id.ma".
+include "delayed_updating/relocation/sbr_pap_eq.ma".
+include "delayed_updating/relocation/sbr_push_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
+(*
+include "ground/lib/stream_tls.ma".
+*)
+
+(* UNWIND FOR PATH **********************************************************)
+
+definition unwind_exteq (A): relation2 (unwind_continuation A) (unwind_continuation A) ≝
+           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
+
+interpretation
+  "extensional equivalence (unwind continuation)"
+  'RingEq A k1 k2 = (unwind_exteq A k1 k2).
+
+(* Constructions with unwind_exteq ******************************************)
+
+lemma unwind_eq_repl (A) (p) (k1) (k2):
+      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ▼❨k1, f1, p❩ = ▼❨k2, f2, p❩).
+#A #p @(path_ind_unwind … p) -p [| #n #IH | #n #l0 #q #IH |*: #q #IH ]
+#k1 #k2 #Hk #f1 #f2 #Hf
+[ <unwind_empty <unwind_empty /2 width=1 by/
+| <unwind_d_empty_sn <unwind_d_empty_sn <(sbr_pap_eq_repl_sn … Hf) 
+  /3 width=1 by sbr_push_eq_repl_dx/
+| <unwind_d_lcons_sn <unwind_d_lcons_sn <(sbr_pap_eq_repl_sn … Hf)
+  /3 width=1 by sbr_push_eq_repl_dx/
+| /2 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /3 width=1 by/
+| /3 width=1 by/
+]
+qed-.
+
+(* Advanced constructions ***************************************************)
+
+lemma unwind_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
+      ▼❨λg,p2. k g (l◗p2), f, p❩ = ▼{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
+#A #k #f #p #l #Hk
+@unwind_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
+qed.
+
+lemma unwind_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
+      ▼❨λg,p2. k g (p1●l◗p2), f, p❩ = ▼{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
+#A #k #f #p1 #p #l #Hk
+@unwind_eq_repl // #g1 #g2 #p2 #Hg
+<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
+qed.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma proj_path_proper:
+      proj_path ≗ proj_path.
+// qed.
+
+lemma unwind_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ▼[f1]p = ▼[f2]p).
+/2 width=1 by unwind_eq_repl/ qed.
+
+lemma unwind_path_append_sn (p) (f) (q):
+      q●▼[f]p = ▼❨(λg,p. proj_path g (q●p)), f, p❩.
+#p @(path_ind_unwind … p) -p // [ #n #l #p |*: #p ] #IH #f #q
+[ <unwind_d_lcons_sn <unwind_d_lcons_sn <IH -IH //
+| <unwind_m_sn <unwind_m_sn //
+| <unwind_L_sn <unwind_L_sn >unwind_lcons_alt // >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+| <unwind_A_sn <unwind_A_sn >unwind_lcons_alt >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+| <unwind_S_sn <unwind_S_sn >unwind_lcons_alt >unwind_append_rcons_sn //
+  <IH <IH -IH <list_append_rcons_sn //
+]
+qed.
+
+lemma unwind_path_lcons (f) (p) (l):
+      l◗▼[f]p = ▼❨(λg,p. proj_path g (l◗p)), f, p❩.
+#f #p #l
+>unwind_lcons_alt <unwind_path_append_sn //
+qed.
+
+lemma unwind_path_L_sn (f) (p):
+      (𝗟◗▼[⫯f]p) = ▼[f](𝗟◗p).
+// qed.
+
+lemma unwind_path_A_sn (f) (p):
+      (𝗔◗▼[f]p) = ▼[f](𝗔◗p).
+// qed.
+
+lemma unwind_path_S_sn (f) (p):
+      (𝗦◗▼[f]p) = ▼[f](𝗦◗p).
+// qed.
+
+lemma unwind_path_after_id_sn (p) (f):
+      ▼[𝐢]▼[f]p = ▼[f]p.
+#p @(path_ind_unwind … p) -p // #p #IH #f
+[ <unwind_path_d_empty_sn <unwind_path_d_empty_sn //
+| <unwind_path_L_sn <unwind_path_L_sn //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and stream_tls *********************)
+(* COMMENT
+lemma unwind_rmap_tls_d_dx (f) (p) (m:pnat) (n):
+      ⇂*[m]▼[p]f ≗ ⇂*[m]▼[p◖𝗱n]f.
+#f #p #m #n
+<unwind_rmap_d_dx
+/2 width=1 by tr_tls_compose_uni_sn/
+qed.
+*)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_fsubst.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_fsubst.etc
new file mode 100644 (file)
index 0000000..411c562
--- /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/unwind3/unwind_prototerm_eq.ma".
+include "delayed_updating/unwind3/unwind_structure.ma".
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/syntax/preterm.ma".
+include "delayed_updating/syntax/prototerm_proper.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+(* Constructions with fsubst ************************************************)
+
+lemma unwind_fsubst_sn (f) (t) (u) (p): u ϵ 𝐏 →
+      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⊆ ▼[f](t[⋔p←u]).
+#f #t #u #p #Hu #ql * *
+[ #rl * #r #Hr #H1 #H2 destruct
+  >unwind_append_proper_dx
+  /4 width=5 by in_comp_unwind_bi, in_ppc_comp_trans, or_introl, ex2_intro/
+| * #q #Hq #H1 #H0
+  @(ex2_intro … H1) @or_intror @conj // *
+  [ <list_append_empty_dx #H2 destruct
+    elim (unwind_path_root f q) #r #_ #Hr /2 width=2 by/
+  | #l #r #H2 destruct
+    @H0 -H0 [| <unwind_append_proper_dx /2 width=3 by ppc_lcons/ ]
+  ]
+]
+qed-.
+
+lemma unwind_fsubst_dx (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
+      ▼[f](t[⋔p←u]) ⊆ (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u].
+#f #t #u #p #Hu #H1p #H2p #ql * #q * *
+[ #r #Hu #H1 #H2 destruct
+  @or_introl @ex2_intro
+  [|| <unwind_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
+  /2 width=3 by ex2_intro/
+| #Hq #H0 #H1 destruct
+  @or_intror @conj [ /2 width=1 by in_comp_unwind_bi/ ] *
+  [ <list_append_empty_dx #Hr @(H0 … (𝐞)) -H0
+    <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
+  | #l #r #Hr
+    elim (unwind_inv_append_proper_dx … Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
+    lapply (H2p … Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
+  ]
+]
+qed-.
+
+lemma unwind_fsubst (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⇔ ▼[f](t[⋔p←u]).
+/4 width=3 by unwind_fsubst_sn, conj, unwind_fsubst_dx/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_length.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_length.etc
new file mode 100644 (file)
index 0000000..7514a68
--- /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/unwind3/unwind.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/lib/stream_tls_plus.ma".
+include "ground/lib/stream_eq.ma".
+(*
+include "ground/relocation/tr_uni_compose.ma".
+include "ground/lib/stream_eq_eq.ma".
+*)
+(* UNWIND FOR PATH **********************************************************)
+
+(* Constructions with list_length ********************************************)
+
+axiom tls_unwind (p) (f):
+      f ≗ ⇂*[❘p❘]▼[p]f.
+(* COMMENT
+#q @(list_ind_rcons … q) -q //
+#q * [ #n ] #IH #f //
+<depth_d_dx >list_cons_shift <list_append_assoc <unwind_rmap_d_dx
+/3 width=3 by tr_tls_compose_uni_sn, stream_eq_trans/
+qed.
+*)
\ No newline at end of file
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_lift.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_lift.etc
new file mode 100644 (file)
index 0000000..9530004
--- /dev/null
@@ -0,0 +1,32 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind_structure.ma".
+include "delayed_updating/substitution/lift_structure.ma".
+
+(* UNWIND FOR PATH **********************************************************)
+
+(* Constructions with lift **************************************************)
+
+lemma pippo (p) (n:pnat) (f):
+      ↑[𝐮❨n❩]▼[⇂*[n]f]p = ▼[𝐮❨n❩∘f]p.
+#p @(list_ind_rcons … p) -p //
+#p * [ #m ] #IH #n #f //
+[
+| <unwind_path_m_dx
+
+ //
+<depth_d_dx >list_cons_shift <list_append_assoc <unwind_rmap_d_dx
+/3 width=3 by tr_tls_compose_uni_sn, stream_eq_trans/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_preterm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_preterm_eq.etc
new file mode 100644 (file)
index 0000000..d245cb1
--- /dev/null
@@ -0,0 +1,68 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lib/subset_equivalence.ma".
+include "delayed_updating/syntax/path_structure_inner.ma".
+include "delayed_updating/syntax/preterm.ma".
+include "delayed_updating/unwind3/unwind_structure.ma".
+include "delayed_updating/unwind3/unwind_prototerm.ma".
+
+(* UNWIND FOR PRETERM *******************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma unwind_grafted_sn (f) (t) (p): p ϵ 𝐈 →
+      ▼[▼[p]f](t⋔p) ⊆ (▼[f]t)⋔(⊗p).
+#f #t #p #Hp #q * #r #Hr #H0 destruct
+@(ex2_intro … Hr) -Hr
+<unwind_append_inner_sn //
+qed-.
+
+lemma unwind_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)⋔(⊗p) ⊆ ▼[▼[p]f](t⋔p).
+#f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
+elim (unwind_inv_append_inner_sn … (sym_eq … H0)) -H0 //
+#p0 #q0 #Hp0 #Hq0 #H0 destruct
+<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
+      ▼[▼[p]f](t⋔p) ⇔ (▼[f]t)⋔(⊗p).
+/3 width=1 by unwind_grafted_sn, conj, unwind_grafted_dx/ qed.
+
+
+lemma unwind_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      (▼[f]t)⋔((⊗p)◖𝗦) ⊆ ▼[▼[p]f](t⋔(p◖𝗦)).
+#f #t #p #Hp #Ht #q * #r #Hr
+<list_append_rcons_sn #H0
+elim (unwind_inv_append_proper_dx … (sym_eq … H0)) -H0 //
+#p0 #q0 #Hp0 #Hq0 #H0 destruct
+<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
+elim (unwind_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
+#r1 #r2 #Hr1 #Hr2 #H0 destruct
+lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
+[ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
+/2 width=1 by in_comp_unwind_bi/
+qed-.
+
+lemma unwind_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
+      ▼[▼[p]f](t⋔(p◖𝗦)) ⇔ (▼[f]t)⋔((⊗p)◖𝗦).
+#f #t #p #Hp #Ht
+@conj
+[ >unwind_rmap_S_dx >structure_S_dx
+  @unwind_grafted_sn //
+| /2 width=1 by unwind_grafted_S_dx/
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm.etc
new file mode 100644 (file)
index 0000000..c4a103b
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind.ma".
+include "delayed_updating/syntax/prototerm.ma".
+include "ground/lib/subset_ext.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+interpretation
+  "unwind (prototerm)"
+  'BlackDownTriangle f t = (subset_ext_f1 ? ? (unwind_gen ? proj_path f) t).
+
+(* Basic constructions ******************************************************)
+
+lemma in_comp_unwind_bi (f) (p) (t):
+      p ϵ t → ▼[f]p ϵ ▼[f]t.
+/2 width=1 by subset_in_ext_f1_dx/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm_eq.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_prototerm_eq.etc
new file mode 100644 (file)
index 0000000..01d302f
--- /dev/null
@@ -0,0 +1,41 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/lib/subset_ext_equivalence.ma".
+include "delayed_updating/unwind3/unwind_eq.ma".
+include "delayed_updating/unwind3/unwind_prototerm.ma".
+
+(* UNWIND FOR PROTOTERM *****************************************************)
+
+(* Constructions with subset_equivalence ************************************)
+
+lemma unwind_term_eq_repl_sn (f1) (f2) (t):
+      f1 ≗ f2 → ▼[f1]t ⇔ ▼[f2]t.
+/3 width=1 by subset_equivalence_ext_f1_exteq, unwind_path_eq_repl/
+qed.
+
+lemma unwind_term_eq_repl_dx (f) (t1) (t2):
+      t1 ⇔ t2 → ▼[f]t1 ⇔ ▼[f]t2.
+/2 width=1 by subset_equivalence_ext_f1_bi/
+qed.
+
+lemma unwind_term_after_id_sn (f) (t):
+      ▼[𝐢]▼[f]t ⇔ ▼[f]t.
+#f #t @subset_eq_trans
+[
+| @subset_inclusion_ext_f1_compose
+| @subset_equivalence_ext_f1_exteq
+  #p @unwind_path_after_id_sn
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure.etc
new file mode 100644 (file)
index 0000000..c52a438
--- /dev/null
@@ -0,0 +1,269 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind_eq.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_inner.ma".
+include "delayed_updating/syntax/path_proper.ma".
+include "ground/xoa/ex_4_2.ma".
+
+(* UNWIND FOR PATH *********************************************************)
+
+(* Basic constructions with structure **************************************)
+
+lemma structure_unwind (p) (f):
+      ⊗p = ⊗▼[f]p.
+#p @(path_ind_unwind … p) -p // #p #IH #f
+<unwind_path_L_sn //
+qed.
+
+lemma unwind_structure (p) (f):
+      ⊗p = ▼[f]⊗p.
+#p @(path_ind_unwind … p) -p //
+qed.
+
+(* Destructions with structure **********************************************)
+
+lemma unwind_des_structure (q) (p) (f):
+      ⊗q = ▼[f]p → ⊗q = ⊗p.
+// qed-.
+
+(* Constructions with proper condition for path *****************************)
+
+lemma unwind_append_proper_dx (p2) (p1) (f): p2 ϵ 𝐏 →
+      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
+#p2 #p1 @(path_ind_unwind … p1) -p1 //
+[ #n | #n #l #p1 |*: #p1 ] #IH #f #Hp2
+[ elim (ppc_inv_lcons … Hp2) -Hp2 #l #q #H destruct //
+| <unwind_path_d_lcons_sn <IH //
+| <unwind_path_m_sn <IH //
+| <unwind_path_L_sn <IH //
+| <unwind_path_A_sn <IH //
+| <unwind_path_S_sn <IH //
+]
+qed-.
+
+(* Constructions with inner condition for path ******************************)
+
+lemma unwind_append_inner_sn (p1) (p2) (f): p1 ϵ 𝐈 →
+      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
+#p1 @(list_ind_rcons … p1) -p1 // #p1 *
+[ #n ] #_ #p2 #f #Hp1
+[ elim (pic_inv_d_dx … Hp1)
+| <list_append_rcons_sn <unwind_append_proper_dx //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_L_dx <list_append_rcons_sn //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_A_dx <list_append_rcons_sn //
+| <list_append_rcons_sn <unwind_append_proper_dx //
+  <structure_S_dx <list_append_rcons_sn //
+]
+qed-.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma unwind_path_d_empty_dx (n) (p) (f):
+      (⊗p)◖𝗱((▼[p]f)❘@❨n❩) = ▼[f](p◖𝗱n).
+#n #p #f <unwind_append_proper_dx // 
+qed.
+
+lemma unwind_path_m_dx (p) (f):
+      ⊗p = ▼[f](p◖𝗺).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_L_dx (p) (f):
+      (⊗p)◖𝗟 = ▼[f](p◖𝗟).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_A_dx (p) (f):
+      (⊗p)◖𝗔 = ▼[f](p◖𝗔).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_S_dx (p) (f):
+      (⊗p)◖𝗦 = ▼[f](p◖𝗦).
+#p #f <unwind_append_proper_dx //
+qed.
+
+lemma unwind_path_root (f) (p):
+      ∃∃r. 𝐞 = ⊗r & ⊗p●r = ▼[f]p.
+#f #p @(list_ind_rcons … p) -p
+[ /2 width=3 by ex2_intro/
+| #p * [ #n ] /2 width=3 by ex2_intro/
+]
+qed-.
+
+(* Advanced inversions with proj_path ***************************************)
+
+lemma unwind_path_inv_d_sn (k) (q) (p) (f):
+      (𝗱k◗q) = ▼[f]p →
+      ∃∃r,h. 𝐞 = ⊗r & (▼[r]f)❘@❨h❩ = k & 𝐞 = q & r◖𝗱h = p.
+#k #q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct -IH
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
+  /2 width=5 by ex4_2_intro/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_m_sn (q) (p) (f):
+      (𝗺◗q) = ▼[f]p → ⊥.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H /2 width=2 by/
+| <unwind_path_m_sn #H /2 width=2 by/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_L_sn (q) (p) (f):
+      (𝗟◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[⫯▼[r1]f]r2 & r1●𝗟◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_L_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_A_sn (q) (p) (f):
+      (𝗔◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗔◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_S_sn #H destruct
+]
+qed-.
+
+lemma unwind_path_inv_S_sn (q) (p) (f):
+      (𝗦◗q) = ▼[f]p →
+      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗦◗r2 = p.
+#q #p @(path_ind_unwind … p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <unwind_path_empty #H destruct
+| <unwind_path_d_empty_sn #H destruct
+| <unwind_path_d_lcons_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/
+| <unwind_path_m_sn #H
+  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+  /2 width=5 by ex3_2_intro/| <unwind_path_L_sn #H destruct
+| <unwind_path_A_sn #H destruct
+| <unwind_path_S_sn #H destruct -IH
+  /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Inversions with proper condition for path ********************************)
+
+lemma unwind_inv_append_proper_dx (q2) (q1) (p) (f):
+      q2 ϵ 𝐏 → q1●q2 = ▼[f]p →
+      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
+#q2 #q1 elim q1 -q1
+[ #p #f #Hq2 <list_append_empty_sn #H destruct
+  /2 width=5 by ex3_2_intro/
+| * [ #n1 ] #q1 #IH #p #f #Hq2 <list_append_lcons_sn #H
+  [ elim (unwind_path_inv_d_sn … H) -H #r1 #m1 #_ #_ #H0 #_ -IH
+    elim (eq_inv_list_empty_append … H0) -H0 #_ #H0 destruct
+    elim Hq2 -Hq2 //
+  | elim (unwind_path_inv_m_sn … H)
+  | elim (unwind_path_inv_L_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗟◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  | elim (unwind_path_inv_A_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗔◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  | elim (unwind_path_inv_S_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
+    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
+    @(ex3_2_intro … (r1●𝗦◗p1)) //
+    <structure_append <Hr1 -Hr1 //
+  ]
+]
+qed-.
+
+(* Inversions with inner condition for path *********************************)
+
+lemma unwind_inv_append_inner_sn (q1) (q2) (p) (f):
+      q1 ϵ 𝐈 → q1●q2 = ▼[f]p →
+      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
+#q1 @(list_ind_rcons … q1) -q1
+[ #q2 #p #f #Hq1 <list_append_empty_sn #H destruct
+  /2 width=5 by ex3_2_intro/
+| #q1 * [ #n1 ] #_ #q2 #p #f #Hq2
+  [ elim (pic_inv_d_dx … Hq2)
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_m_sn … (sym_eq … H2))
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_L_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗟)) [1,3: // ]
+    [ <structure_append <structure_L_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_A_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗔)) [1,3: // ]
+    [ <structure_append <structure_A_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  | <list_append_rcons_sn #H0
+    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
+    elim (unwind_path_inv_S_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
+    @(ex3_2_intro … (p1●r2◖𝗦)) [1,3: // ]
+    [ <structure_append <structure_S_dx <Hr2 -Hr2 //
+    | <list_append_assoc <list_append_rcons_sn //
+    ]
+  ]
+]
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure_depth.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/unwind3/unwind_structure_depth.etc
new file mode 100644 (file)
index 0000000..fdb7d78
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind3/unwind.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_depth.ma".
+include "ground/arith/nat_pred_succ.ma".
+
+(* UNWIND FOR PATH *********************************************************)
+
+(* Basic constructions with structure and depth ****************************)
+
+lemma unwind_rmap_structure (p) (f):
+      (⫯*[❘p❘]f) = ▼[⊗p]f.
+#p elim p -p //
+* [ #n ] #p #IH #f //
+[ <unwind_rmap_A_sn //
+| <unwind_rmap_S_sn //
+]
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_1.ma
new file mode 100644 (file)
index 0000000..9094d13
--- /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( ▼ term 70 p )"
+  non associative with precedence 70
+  for @{ 'BlackDownTriangle $p }.
index 73cccf6053cc55883584785a02ff7f4e3d9b2933..ddb2bc56dfe94d7ed022a620206f148519980c40 100644 (file)
@@ -14,6 +14,6 @@
 
 (* NOTATION FOR DELAYED UPDATING ********************************************)
 
-notation "hvbox( ▼[ term 46 t1 ] break term 70 t2  )"
+notation "hvbox( ▼[ term 46 f ] break term 70 p )"
   non associative with precedence 70
-  for @{ 'BlackDownTriangle $t1 $t2 }.
+  for @{ 'BlackDownTriangle $f $p }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_1.ma
new file mode 100644 (file)
index 0000000..93965f7
--- /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( ▶ term 70 p )"
+  non associative with precedence 70
+  for @{ 'BlackRightTriangle $p }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma
new file mode 100644 (file)
index 0000000..90b0758
--- /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( ▶[ term 46 f ] break term 70 p )"
+  non associative with precedence 70
+  for @{ 'BlackRightTriangle $f $p }.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma
new file mode 100644 (file)
index 0000000..5d87391
--- /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( ♭ term 70 p )"
+  non associative with precedence 70
+  for @{ 'Flat $p }.
index d48321729ceae07665dce634c2f57643d04871d2..47d6b3600521b427315fbef0aa2734f241798dbd 100644 (file)
@@ -9,3 +9,7 @@ lemma pr_pat_after_uni_tls (i2) (i1):
 
 . replace.sh . "/substitution/" "/unwind/"
 . replace.sh . ↑ ▼ 
+
+266D;MUSIC FLAT SIGN;So;0;ON;;;;;N;FLAT;;;;
+266E;MUSIC NATURAL SIGN;So;0;ON;;;;;N;NATURAL;;;;
+266F;MUSIC SHARP SIGN;Sm;0;ON;;;;;N;SHARP;;;;
index 576df6ec6fdb3aef007ed612584b132914b9654b..849c5f32dfd76fa5b3d257c2936d118dad9612fd 100644 (file)
@@ -28,8 +28,8 @@ include "ground/xoa/and_4.ma".
 definition dfr (p) (q): relation2 prototerm prototerm ≝
            λt1,t2. ∃∃b,n.
            let r ≝ p●𝗔◗b●𝗟◗q in
-           â\88§â\88§ (â\8a\97b Ïµ ð\9d\90\81 â\88§ ð\9d\9f\8e = â\9d\98\9d\98) & â\86\91â\9d\98\9d\98 = (▼[r]𝐢)@❨n❩ & r◖𝗱n ϵ t1 &
-              t1[â\8b\94\86\90ð\9d\9b\97(n+â\9d\98\9d\98).(t1⋔(p◖𝗦))] ⇔ t2
+           â\88§â\88§ (â\8a\97b Ïµ ð\9d\90\81 â\88§ ð\9d\9f\8e = â\99­b) & â\86\91â\99­q = (▼[r]𝐢)@❨n❩ & r◖𝗱n ϵ t1 &
+              t1[â\8b\94\86\90ð\9d\9b\97(n+â\99­b).(t1⋔(p◖𝗦))] ⇔ t2
 .
 
 interpretation
index dd24f856863792f367b106e4354464ede5961645..2d3fdbdf596f7e405e1a29725db9c922314e6f56 100644 (file)
 
 include "delayed_updating/reduction/dfr.ma".
 include "delayed_updating/reduction/ifr.ma".
+
 include "delayed_updating/unwind1/unwind_fsubst.ma".
 include "delayed_updating/unwind1/unwind_constructors.ma".
 include "delayed_updating/unwind1/unwind_preterm_eq.ma".
 include "delayed_updating/unwind1/unwind_structure_depth.ma".
 include "delayed_updating/unwind1/unwind_depth.ma".
+
 include "delayed_updating/substitution/fsubst_eq.ma".
 include "delayed_updating/substitution/lift_prototerm_eq.ma".
 include "delayed_updating/syntax/prototerm_proper_constructors.ma".
@@ -71,9 +73,9 @@ lemma dfr_unwind_id_bi (p) (q) (t1) (t2): t1 ϵ 𝐓 →
       t1 ➡𝐝𝐟[p,q] t2 → ▼[𝐢]t1 ➡𝐟[⊗p,⊗q] ▼[𝐢]t2.
 #p #q #t1 #t2 #H0t1
 * #b #n * #Hb #Hn #Ht1 #Ht2
-@(ex1_2_intro â\80¦ (â\8a\97b) (â\86\91â\9d\98â\8a\97\9d\98)) @and4_intro
+@(ex1_2_intro â\80¦ (â\8a\97b) (â\86\91â\99­â\8a\97q)) @and4_intro
 [ //
-| //
+| (*//*)
 | lapply (in_comp_unwind_bi (𝐢) … Ht1) -Ht1 -H0t1 -Hb -Ht2
   <unwind_path_d_empty_dx <depth_structure //
 | lapply (unwind_term_eq_repl_dx (𝐢) … Ht2) -Ht2 #Ht2
@@ -85,11 +87,21 @@ lemma dfr_unwind_id_bi (p) (q) (t1) (t2): t1 ϵ 𝐓 →
     @fsubst_eq_repl [ // ]
     @(subset_eq_trans … (unwind_iref …))
 
-    elim Hb -Hb #Hb #H0 <H0 -H0 <nrplus_zero_dx <nplus_zero_dx <Hn
+    elim Hb -Hb #Hb #H0 <H0 -H0 <nrplus_zero_dx <nplus_zero_dx <nsucc_unfold
+    >Hn
     @(subset_eq_canc_sn … (lift_term_eq_repl_dx …))
     [ @unwind_grafted_S /2 width=2 by ex_intro/ | skip ]
-
+    <Hn <Hn
+(*    
+    @(subset_eq_trans … (lift_term_eq_repl_dx …))
+    [ @(unwind_term_eq_repl_sn … (tls_succ_unwind q …)) | skip ]
+*)
 (*
+    
+    @subset_eq_trans
+    [2: @unwind_term_eq_repl_dx
+    @(subset_eq_canc_sn … (unwind_term_eq_repl_dx …))
+
     @(subset_eq_canc_sn … (unwind_term_eq_repl_dx …))
     [ @unwind_grafted_S /2 width=2 by ex_intro/ | skip ]
 
@@ -116,3 +128,6 @@ Hn : ↑❘q❘ = ↑[p●𝗔◗b●𝗟◗q]𝐢@❨n❩
 ---------------------------
 ↑[𝐮❨↑❘q❘+❘b❘❩] ↑[↑[p]𝐢] t ⇔ ↑[𝐮❨↑[p●𝗔◗b●𝗟◗q]𝐢@❨n+❘b❘❩❩] t
 *)
+(*
+(↑[𝐮❨↑❘q❘❩]▼[⇂*[↑❘q❘]▼[p●𝗟◗q]𝐢](t1⋔(p◖𝗦))⇔▼[𝐮❨↑❘q❘❩∘▼[p●𝗔◗b●𝗟◗q]𝐢](t1⋔(p◖𝗦))
+*)
index 8d0cfc52dc46aca4d628c8e85381e1a8249543e6..d2a33afc211f1bb60396108e33a1362e6a6fb5b6 100644 (file)
@@ -28,8 +28,8 @@ include "ground/xoa/and_4.ma".
 definition ifr (p) (q): relation2 prototerm prototerm ≝
            λt1,t2. ∃∃b,n.
            let r ≝ p●𝗔◗b●𝗟◗q in
-           â\88§â\88§ (â\8a\97b Ïµ ð\9d\90\81 â\88§ ð\9d\9f\8e = â\9d\98\9d\98) & â\86\91â\9d\98\9d\98 = (▼[r]𝐢)@❨n❩ & r◖𝗱n ϵ t1 &
-              t1[â\8b\94\86\90â\86\91\9d\90®â\9d¨â\9d\98\97\8fð\9d\97\9fâ\97\97\9d\98❩](t1⋔(p◖𝗦))] ⇔ t2
+           â\88§â\88§ (â\8a\97b Ïµ ð\9d\90\81 â\88§ ð\9d\9f\8e = â\99­b) & â\86\91â\99­q = (▼[r]𝐢)@❨n❩ & r◖𝗱n ϵ t1 &
+              t1[â\8b\94\86\90â\86\91\9d\90®â\9d¨â\99­(bâ\97\8fð\9d\97\9fâ\97\97q)❩](t1⋔(p◖𝗦))] ⇔ t2
 .
 
 interpretation
index a487fcf5a0af45b15d4e07c72db723c80e340e81..e6e1e661eb2a3374f97999cd9ab0218495bdd594 100644 (file)
@@ -15,8 +15,7 @@
 include "delayed_updating/notation/functions/uparrow_4.ma".
 include "delayed_updating/notation/functions/uparrow_2.ma".
 include "delayed_updating/syntax/path.ma".
-include "ground/relocation/tr_uni.ma".
-include "ground/relocation/tr_pap_tls.ma".
+include "ground/relocation/tr_id_pap.ma".
 
 (* LIFT FOR PATH ***********************************************************)
 
@@ -28,7 +27,7 @@ match p with
 [ list_empty     ⇒ k f (𝐞)
 | list_lcons l q ⇒
   match l with
-  [ label_d n ⇒ lift_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (⇂*[n]f) q
+  [ label_d n ⇒ lift_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (𝐢) q
   | label_m   ⇒ lift_gen (A) (λg,p. k g (𝗺◗p)) f q
   | label_L   ⇒ lift_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
   | label_A   ⇒ lift_gen (A) (λg,p. k g (𝗔◗p)) f q
@@ -61,7 +60,7 @@ lemma lift_empty (A) (k) (f):
 // qed.
 
 lemma lift_d_sn (A) (k) (p) (n) (f):
-      ↑❨(λg,p. k g (𝗱(f@❨n❩)◗p)), ⇂*[n]f, p❩ = ↑{A}❨k, f, 𝗱n◗p❩.
+      ↑❨(λg,p. k g (𝗱(f@❨n❩)◗p)), 𝐢, p❩ = ↑{A}❨k, f, 𝗱n◗p❩.
 // qed.
 
 lemma lift_m_sn (A) (k) (p) (f):
@@ -93,7 +92,7 @@ lemma lift_rmap_empty (f):
 // qed.
 
 lemma lift_rmap_d_sn (f) (p) (n):
-      ↑[p](⇂*[ninj n]f) = ↑[𝗱n◗p]f.
+      ↑[p]𝐢 = ↑[𝗱n◗p]f.
 // qed.
 
 lemma lift_rmap_m_sn (f) (p):
@@ -112,12 +111,21 @@ lemma lift_rmap_S_sn (f) (p):
       ↑[p]f = ↑[𝗦◗p]f.
 // qed.
 
+(* Advanced cinstructionswith proj_rmap and tr_id ***************************)
+
+lemma lift_rmap_id (p):
+      (𝐢) = ↑[p]𝐢.
+#p elim p -p //
+* [ #n ] #p #IH //
+qed.
+
 (* Advanced constructions with proj_rmap and path_append ********************)
 
 lemma lift_rmap_append (p2) (p1) (f):
       ↑[p2]↑[p1]f = ↑[p1●p2]f.
 #p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
-[ <lift_rmap_m_sn <lift_rmap_m_sn //
+[ <lift_rmap_d_sn <lift_rmap_d_sn //
+| <lift_rmap_m_sn <lift_rmap_m_sn //
 | <lift_rmap_A_sn <lift_rmap_A_sn //
 | <lift_rmap_S_sn <lift_rmap_S_sn //
 ]
@@ -126,7 +134,7 @@ qed.
 (* Advanced constructions with proj_rmap and path_rcons *********************)
 
 lemma lift_rmap_d_dx (f) (p) (n):
-      ⇂*[ninj n](↑[p]f) = ↑[p◖𝗱n]f.
+      (𝐢) = ↑[p◖𝗱n]f.
 // qed.
 
 lemma lift_rmap_m_dx (f) (p):
@@ -146,5 +154,5 @@ lemma lift_rmap_S_dx (f) (p):
 // qed.
 
 lemma lift_rmap_pap_d_dx (f) (p) (n) (m):
-      ↑[p]f@❨m+n❩ = ↑[p◖𝗱n]f@❨m❩+↑[p]f@❨n❩.
+      m = ↑[p◖𝗱n]f@❨m❩.
 // qed.
index 756b73587517f11161c639663beb027f74154be6..02b2c6ee10b5e332e2f0004535111f426929d944 100644 (file)
@@ -15,7 +15,6 @@
 include "delayed_updating/substitution/lift_eq.ma".
 include "ground/relocation/tr_compose_pap.ma".
 include "ground/relocation/tr_compose_pn.ma".
-include "ground/relocation/tr_compose_tls.ma".
 
 (* LIFT FOR PATH ***********************************************************)
 
@@ -23,9 +22,7 @@ include "ground/relocation/tr_compose_tls.ma".
 
 lemma lift_path_after (p) (f1) (f2):
       ↑[f2]↑[f1]p = ↑[f2∘f1]p.
-#p elim p -p [| * ] // [ #n ] #p #IH #f1 #f2
-[ <lift_path_d_sn <lift_path_d_sn <lift_path_d_sn //
-| <lift_path_L_sn <lift_path_L_sn <lift_path_L_sn
-  >tr_compose_push_bi //
-]
+#p elim p -p [| * ] // #p #IH #f1 #f2
+<lift_path_L_sn <lift_path_L_sn <lift_path_L_sn
+>tr_compose_push_bi //
 qed.
index 772c837fb2866bfc1d3f3c7b9c80fefd2c7114cc..3bd7b43bc02bf7ce5d7e162a11305e6419ce66b3 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_prototerm_id.ma".
+include "delayed_updating/substitution/lift_prototerm_eq.ma".
 include "delayed_updating/substitution/lift_uni.ma".
 include "delayed_updating/syntax/prototerm_constructors.ma".
 
@@ -24,28 +24,24 @@ lemma lift_iref_bi (t1) (t2) (n):
 qed.
 
 lemma lift_iref_sn (f) (t:prototerm) (n:pnat):
-      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⊆ ↑[f](𝛗n.t).
-#f #t #n #p * #q * #r #Hr #H1 #H2 destruct
-@(ex2_intro … (𝗱n◗𝗺◗r))
+      (𝛗f@❨n❩.t) ⊆ ↑[f](𝛗n.t).
+#f #t #n #p * #q #Hq #H0 destruct
+@(ex2_intro … (𝗱n◗𝗺◗q))
 /2 width=1 by in_comp_iref/
 qed-.
 
 lemma lift_iref_dx (f) (t) (n:pnat):
-      ↑[f](𝛗n.t) ⊆ 𝛗f@❨n❩.↑[⇂*[n]f]t.
+      ↑[f](𝛗n.t) ⊆ 𝛗f@❨n❩.t.
 #f #t #n #p * #q #Hq #H0 destruct
 elim (in_comp_inv_iref … Hq) -Hq #p #H0 #Hp destruct
-/3 width=1 by in_comp_iref, in_comp_lift_bi/
+/2 width=1 by in_comp_iref/
 qed-.
 
 lemma lift_iref (f) (t) (n:pnat):
-      (𝛗f@❨n❩.↑[⇂*[n]f]t) ⇔ ↑[f](𝛗n.t).
+      (𝛗f@❨n❩.t) ⇔ ↑[f](𝛗n.t).
 /3 width=1 by conj, lift_iref_sn, lift_iref_dx/
 qed.
 
 lemma lift_iref_uni (t) (m) (n):
       (𝛗(n+m).t) ⇔ ↑[𝐮❨m❩](𝛗n.t).
-#t #m #n
-@(subset_eq_trans … (lift_iref …))
-<tr_uni_pap >nsucc_pnpred <tr_tls_succ_uni
-/3 width=1 by lift_iref_bi, lift_term_id/
-qed.
+// qed.
index fad4995de2f7f7af8fa789a1cfb7308d4c8a7396..1e9b2789b04c77be715ef401927c95ea33b91567 100644 (file)
 (**************************************************************************)
 
 include "delayed_updating/substitution/lift.ma".
-(*
-include "ground/relocation/tr_uni_compose.ma".
-include "ground/relocation/tr_compose_compose.ma".
-include "ground/relocation/tr_compose_eq.ma".
-*)
 include "ground/relocation/tr_pap_eq.ma".
 include "ground/relocation/tr_pn_eq.ma".
-include "ground/lib/stream_tls_eq.ma".
 
 (* LIFT FOR PATH ***********************************************************)
 
@@ -39,7 +33,7 @@ lemma lift_eq_repl (A) (p) (k1) (k2):
 #k1 #k2 #Hk #f1 #f2 #Hf
 [ <lift_empty <lift_empty /2 width=1 by/
 | <lift_d_sn <lift_d_sn <(tr_pap_eq_repl … Hf)
-  /3 width=3 by stream_tls_eq_repl, compose_repl_fwd_sn/
+  /3 width=1 by stream_eq_refl/
 | /3 width=1 by/
 | /3 width=1 by tr_push_eq_repl/
 | /3 width=1 by/
@@ -92,7 +86,7 @@ lemma lift_path_lcons (f) (p) (l):
 qed.
 
 lemma lift_path_d_sn (f) (p) (n):
-      (𝗱(f@❨n❩)◗↑[⇂*[n]f]p) = ↑[f](𝗱n◗p).
+      (𝗱(f@❨n❩)◗↑[𝐢]p) = ↑[f](𝗱n◗p).
 // qed.
 
 lemma lift_path_m_sn (f) (p):
@@ -110,6 +104,53 @@ lemma lift_path_A_sn (f) (p):
 lemma lift_path_S_sn (f) (p):
       (𝗦◗↑[f]p) = ↑[f](𝗦◗p).
 // qed.
+
+lemma lift_path_id (p):
+      p = ↑[𝐢]p.
+#p elim p -p //
+* [ #n ] #p #IH //
+[ <lift_path_d_sn //
+| <lift_path_L_sn //
+]
+qed.
+
+lemma lift_path_append (p2) (p1) (f):
+      (↑[f]p1)●(↑[↑[p1]f]p2) = ↑[f](p1●p2).
+#p2 #p1 elim p1 -p1 //
+* [ #n1 ] #p1 #IH #f
+[ <lift_path_d_sn <lift_path_d_sn <IH //
+| <lift_path_m_sn <lift_path_m_sn <IH //
+| <lift_path_L_sn <lift_path_L_sn <IH //
+| <lift_path_A_sn <lift_path_A_sn <IH //
+| <lift_path_S_sn <lift_path_S_sn <IH //
+]
+qed.
+
+lemma lift_path_d_dx (n) (p) (f):
+      (↑[f]p)◖𝗱((↑[p]f)@❨n❩) = ↑[f](p◖𝗱n).
+#n #p #f <lift_path_append //
+qed.
+
+lemma lift_path_m_dx (p) (f):
+      (↑[f]p)◖𝗺 = ↑[f](p◖𝗺).
+#p #f <lift_path_append //
+qed.
+
+lemma lift_path_L_dx (p) (f):
+      (↑[f]p)◖𝗟 = ↑[f](p◖𝗟).
+#p #f <lift_path_append //
+qed.
+
+lemma lift_path_A_dx (p) (f):
+      (↑[f]p)◖𝗔 = ↑[f](p◖𝗔).
+#p #f <lift_path_append //
+qed.
+
+lemma lift_path_S_dx (p) (f):
+      (↑[f]p)◖𝗦 = ↑[f](p◖𝗦).
+#p #f <lift_path_append //
+qed.
+
 (* COMMENT 
 
 (* Advanced constructions with proj_rmap and stream_tls *********************)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma
deleted file mode 100644 (file)
index 1d8b452..0000000
+++ /dev/null
@@ -1,30 +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_eq.ma".
-include "ground/relocation/tr_id_pap.ma".
-include "ground/relocation/tr_id_tls.ma".
-
-(* LIFT FOR PATH ***********************************************************)
-
-(* Constructions with tr_id ************************************************)
-
-lemma lift_path_id (p):
-      p = ↑[𝐢]p.
-#p elim p -p //
-* [ #n ] #p #IH //
-[ <lift_path_d_sn //
-| <lift_path_L_sn //
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_length.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_length.ma
new file mode 100644 (file)
index 0000000..0576799
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_eq.ma".
+include "ground/lib/list_length.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+(* Constructions with list_length ******************************************)
+
+lemma lift_path_length (p) (f):
+      ❘p❘ = ❘↑[f]p❘.
+#p elim p -p // * [ #n ] #p #IH #f //
+[ <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+]
+>list_length_lcons >list_length_lcons //
+qed.
index fc3fb3fcf254e39abd1b194cb285f9a545c780a7..55b271f8bfdb3bc77938b0c86a7860e7234455d7 100644 (file)
@@ -38,3 +38,20 @@ lemma lift_term_after (f1) (f2) (t):
 | @subset_equivalence_ext_f1_exteq /2 width=5/
 ]
 qed.
+
+lemma lift_term_id_sn (t):
+      t ⊆ ↑[𝐢]t.
+#t #p #Hp
+>(lift_path_id p)
+/2 width=1 by in_comp_lift_bi/
+qed-.
+
+lemma lift_term_id_dx (t):
+      ↑[𝐢]t ⊆ t.
+#t #p * #q #Hq #H destruct //
+qed-.
+
+lemma lift_term_id (t):
+      t ⇔ ↑[𝐢]t.
+/3 width=2 by lift_term_id_dx, lift_term_id_sn, conj/
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_id.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_id.ma
deleted file mode 100644 (file)
index cc75692..0000000
+++ /dev/null
@@ -1,33 +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_prototerm_eq.ma".
-include "delayed_updating/substitution/lift_id.ma".
-
-lemma lift_term_id_sn (t):
-      t ⊆ ↑[𝐢]t.
-#t #p #Hp
->(lift_path_id p)
-/2 width=1 by in_comp_lift_bi/
-qed-.
-
-lemma lift_term_id_dx (t):
-      ↑[𝐢]t ⊆ t.
-#t #p * #q #Hq #H destruct //
-qed-.
-
-lemma lift_term_id (t):
-      t ⇔ ↑[𝐢]t.
-/3 width=2 by lift_term_id_dx, lift_term_id_sn, conj/      
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_structure.ma
new file mode 100644 (file)
index 0000000..86a4259
--- /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/substitution/lift_eq.ma".
+include "delayed_updating/syntax/path_structure.ma".
+
+(* LIFT FOR PATH ***********************************************************)
+
+(* Constructions with structure ********************************************)
+
+lemma structure_lift (p) (f):
+      ⊗p = ⊗↑[f]p.
+#p elim p -p //
+* [ #n ] #p #IH #f //
+[ <lift_path_m_sn <structure_m_sn <structure_m_sn //
+| <lift_path_L_sn <structure_L_sn <structure_L_sn //
+]
+qed.
+
+lemma lift_structure (p) (f):
+      ⊗p = ↑[f]⊗p.
+#p elim p -p //
+* [ #n ] #p #IH #f //
+qed.
index cd6c7953363ca780dbb679311046184b8a508652..c0b04d975244ad638a255e73d17d3917cc0a0875 100644 (file)
@@ -12,9 +12,8 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_id.ma".
+include "delayed_updating/substitution/lift_eq.ma".
 include "ground/relocation/tr_uni_pap.ma".
-include "ground/relocation/tr_uni_tls.ma".
 
 (* LIFT FOR PATH ***********************************************************)
 
@@ -22,7 +21,4 @@ include "ground/relocation/tr_uni_tls.ma".
 
 lemma lift_path_d_sn_uni (p) (m) (n):
       (𝗱(n+m)◗p) = ↑[𝐮❨m❩](𝗱(n)◗p).
-#p #m #n
-<lift_path_d_sn <tr_uni_pap >nsucc_pnpred
-<tr_tls_succ_uni //
-qed.
+// qed.
index cdf24943af922c8a47c74990fb79e92acf803231..474bbcbda501f43dd5de91697dd321d58ca33c7f 100644 (file)
@@ -13,8 +13,8 @@
 (**************************************************************************)
 
 include "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/flat_1.ma".
 include "ground/arith/nat_plus.ma".
-include "ground/notation/functions/verticalbars_1.ma".
 
 (* DEPTH FOR PATH ***********************************************************)
 
@@ -33,32 +33,32 @@ match p with
 
 interpretation
   "depth (path)"
-  'VerticalBars p = (depth p).
+  'Flat p = (depth p).
 
 (* Basic constructions ******************************************************)
 
-lemma depth_empty: ð\9d\9f\8e = â\9d\98ð\9d\90\9eâ\9d\98.
+lemma depth_empty: ð\9d\9f\8e = â\99­ð\9d\90\9e.
 // qed.
 
-lemma depth_d_sn (q) (n): â\9d\98\9d\98 = â\9d\98ð\9d\97±nâ\97\97\9d\98.
+lemma depth_d_sn (q) (n): â\99­q = â\99­(ð\9d\97±nâ\97\97q).
 // qed.
 
-lemma depth_m_sn (q): â\9d\98\9d\98 = â\9d\98ð\9d\97ºâ\97\97\9d\98.
+lemma depth_m_sn (q): â\99­q = â\99­(ð\9d\97ºâ\97\97q).
 // qed.
 
-lemma depth_L_sn (q): â\86\91â\9d\98\9d\98 = â\9d\98ð\9d\97\9fâ\97\97\9d\98.
+lemma depth_L_sn (q): â\86\91â\99­q = â\99­(ð\9d\97\9fâ\97\97q).
 // qed.
 
-lemma depth_A_sn (q): â\9d\98\9d\98 = â\9d\98ð\9d\97\94â\97\97\9d\98.
+lemma depth_A_sn (q): â\99­q = â\99­(ð\9d\97\94â\97\97q).
 // qed.
 
-lemma depth_S_sn (q): â\9d\98\9d\98 = â\9d\98ð\9d\97¦â\97\97\9d\98.
+lemma depth_S_sn (q): â\99­q = â\99­(ð\9d\97¦â\97\97q).
 // qed.
 
 (* Main constructions *******************************************************)
 
 theorem depth_append (p1) (p2):
-        ❘p2❘+❘p1❘ = ❘p1●p2❘.
+        (♭p2)+(♭p1) = ♭(p1●p2).
 #p1 elim p1 -p1 //
 * [ #n ] #p1 #IH #p2 <list_append_lcons_sn
 [ <depth_d_sn <depth_d_sn //
@@ -72,21 +72,21 @@ qed.
 (* Constructions with list_rcons ********************************************)
 
 lemma depth_d_dx (p) (n):
-      â\9d\98\9d\98 = â\9d\98\97\96ð\9d\97±nâ\9d\98.
+      â\99­p = â\99­(pâ\97\96ð\9d\97±n).
 // qed.
 
 lemma depth_m_dx (p):
-      â\9d\98\9d\98 = â\9d\98\97\96ð\9d\97ºâ\9d\98.
+      â\99­p = â\99­(pâ\97\96ð\9d\97º).
 // qed.
 
 lemma depth_L_dx (p):
-      â\86\91â\9d\98\9d\98 = â\9d\98\97\96ð\9d\97\9fâ\9d\98.
+      â\86\91â\99­p = â\99­(pâ\97\96ð\9d\97\9f).
 // qed.
 
 lemma depth_A_dx (p):
-      â\9d\98\9d\98 = â\9d\98\97\96ð\9d\97\94â\9d\98.
+      â\99­p = â\99­(pâ\97\96ð\9d\97\94).
 // qed.
 
 lemma depth_S_dx (p):
-      â\9d\98\9d\98 = â\9d\98\97\96ð\9d\97¦â\9d\98.
+      â\99­p = â\99­(pâ\97\96ð\9d\97¦).
 // qed.
index 700da6a46e26d3c6e5f8c6b4b3ac0be0425a571c..4648217932fcd1d310c88dc807afa8f64f622b45 100644 (file)
@@ -20,7 +20,7 @@ include "delayed_updating/syntax/path_depth.ma".
 (* Constructions with depth *************************************************)
 
 lemma depth_structure (p):
-      â\9d\98\9d\98 = â\9d\98â\8a\97\9d\98.
+      â\99­p = â\99­â\8a\97p.
 #p elim p -p //
 * [ #n ] #p #IH //
 [ <structure_L_sn <depth_L_sn <depth_L_sn //
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma
new file mode 100644 (file)
index 0000000..b23db01
--- /dev/null
@@ -0,0 +1,108 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_length.ma".
+include "delayed_updating/notation/functions/black_downtriangle_1.ma".
+include "ground/relocation/tr_uni.ma".
+
+(* BASIC UNWIND FOR PATH ****************************************************)
+
+rec definition unwind1_path_pnat (n) (p) on n ≝
+match n with
+[ punit   ⇒ p
+| psucc m ⇒
+  match p with
+  [ list_empty     ⇒ 𝐞
+  | list_lcons l q ⇒
+    match l with
+    [ label_d n ⇒
+      match q with
+      [ list_empty     ⇒ l◗(unwind1_path_pnat m q)
+      | list_lcons _ _ ⇒ unwind1_path_pnat m (↑[𝐮❨n❩]q)
+      ]
+    | label_m   ⇒ unwind1_path_pnat m q
+    | label_L   ⇒ 𝗟◗(unwind1_path_pnat m q)
+    | label_A   ⇒ 𝗔◗(unwind1_path_pnat m q)
+    | label_S   ⇒ 𝗦◗(unwind1_path_pnat m q)
+    ]
+  ]
+].
+
+definition unwind1_path (p) ≝
+           unwind1_path_pnat (↑❘p❘) p.
+
+interpretation
+  "basic unwind (path)"
+  'BlackDownTriangle p = (unwind1_path p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind1_path_unfold (p):
+      unwind1_path_pnat (↑❘p❘) p = ▼p.
+// qed-.
+
+lemma unwind1_path_empty:
+      (𝐞) = ▼𝐞.
+// qed.
+
+lemma unwind1_path_d_empty (n):
+      (𝗱n◗𝐞) = ▼(𝗱n◗𝐞).
+// qed.
+
+lemma unwind1_path_d_lcons (p) (l) (n:pnat):
+      ▼(↑[𝐮❨n❩](l◗p)) = ▼(𝗱n◗l◗p).
+#p #l #n
+<unwind1_path_unfold <lift_path_length //
+qed.
+
+lemma unwind1_path_m_sn (p):
+      ▼p = ▼(𝗺◗p).
+// qed.
+
+lemma unwind1_path_L_sn (p):
+      (𝗟◗▼p) = ▼(𝗟◗p).
+// qed.
+
+lemma unwind1_path_A_sn (p):
+      (𝗔◗▼p) = ▼(𝗔◗p).
+// qed.
+
+lemma unwind1_path_S_sn (p):
+      (𝗦◗▼p) = ▼(𝗦◗p).
+// qed.
+
+(* Main constructions *******************************************************)
+
+fact unwind1_path_fix_aux (k) (p):
+     k = ❘p❘ → ▼p = ▼▼p.
+#k @(nat_ind_succ … k) -k
+[ #p #H0 >(list_length_inv_zero_sn … H0) -p //
+| #k #IH *
+  [ #H0 elim (eq_inv_nsucc_zero … H0)
+  | * [ #n ] #p #H0
+    lapply (eq_inv_nsucc_bi … H0) -H0
+    [ cases p -p [ -IH | #l #p ] #H0 destruct //
+      <unwind1_path_d_lcons <IH -IH //
+    | #H0 destruct <unwind1_path_m_sn <IH -IH //
+    | #H0 destruct <unwind1_path_L_sn <unwind1_path_L_sn <IH -IH //
+    | #H0 destruct <unwind1_path_A_sn <unwind1_path_A_sn <IH -IH //
+    | #H0 destruct <unwind1_path_S_sn <unwind1_path_S_sn <IH -IH //
+    ]
+  ]
+]
+qed-.
+
+theorem unwind1_path_fix (p):
+        ▼p = ▼▼p.
+/2 width=2 by unwind1_path_fix_aux/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path_structure.ma
new file mode 100644 (file)
index 0000000..3a838eb
--- /dev/null
@@ -0,0 +1,48 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind0/unwind1_rmap_eq.ma".
+include "delayed_updating/unwind0/unwind1_path.ma".
+include "delayed_updating/substitution/lift_structure.ma".
+
+(* BASIC UNWIND FOR PATH ****************************************************)
+
+(* Constructions with structure *********************************************)
+
+fact unwind1_path_d_dx_aux (k) (p) (n):
+     k = ❘p❘ → (⊗p)◖𝗱((▶p)@❨n❩) = ▼(p◖𝗱n).
+#k @(nat_ind_succ … k) -k
+[ #p #n #H0 >(list_length_inv_zero_sn … H0) -p //
+| #k #IH *
+  [ #n #H0 elim (eq_inv_nsucc_zero … H0)
+  | * [ #m ] #p #n #H0
+    lapply (eq_inv_nsucc_bi … H0) -H0
+    [ cases p -p [ -IH | #l #p ] #H0 destruct <unwind1_path_d_lcons
+      [ <lift_path_d_sn <lift_path_empty <unwind1_path_d_empty
+        <list_cons_comm <(tr_pap_eq_repl … (unwind1_rmap_d_empty …)) //
+      | >list_cons_shift <lift_path_d_dx <IH -IH //
+        <structure_lift <structure_d_sn /3 width=1 by eq_f2/
+      ]
+    | #H0 destruct <unwind1_path_m_sn <IH -IH //
+    | #H0 destruct <unwind1_path_L_sn <IH -IH //
+    | #H0 destruct <unwind1_path_A_sn <IH -IH //
+    | #H0 destruct <unwind1_path_S_sn <IH -IH //
+    ]
+  ]
+]
+qed-.
+
+lemma unwind1_path_d_dx (p) (n):
+      (⊗p)◖𝗱((▶p)@❨n❩) = ▼(p◖𝗱n).
+/2 width=2 by unwind1_path_d_dx_aux/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap.ma
new file mode 100644 (file)
index 0000000..66a77d1
--- /dev/null
@@ -0,0 +1,76 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_length.ma".
+include "delayed_updating/notation/functions/black_righttriangle_1.ma".
+include "ground/relocation/tr_uni.ma".
+include "ground/relocation/tr_compose.ma".
+
+(* BASIC UNWIND FOR RELOCATION MAP ******************************************)
+
+rec definition unwind1_rmap_pnat (n) (p) on n ≝
+match n with
+[ punit   ⇒ 𝐢
+| psucc m ⇒
+  match p with
+  [ list_empty     ⇒ 𝐢
+  | list_lcons l q ⇒
+    match l with
+    [ label_d n ⇒ (unwind1_rmap_pnat m (↑[𝐮❨n❩]q))∘(↑[q]𝐮❨n❩)
+    | label_m   ⇒ unwind1_rmap_pnat m q
+    | label_L   ⇒ unwind1_rmap_pnat m q
+    | label_A   ⇒ unwind1_rmap_pnat m q
+    | label_S   ⇒ unwind1_rmap_pnat m q
+    ]
+  ]
+].
+
+definition unwind1_rmap (p) ≝
+           unwind1_rmap_pnat (↑❘p❘) p.
+
+interpretation
+  "basic unwind (relocation map)"
+  'BlackRightTriangle p = (unwind1_rmap p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind1_rmap_unfold (p):
+      unwind1_rmap_pnat (↑❘p❘) p = ▶p.
+// qed-.
+
+lemma unwind1_rmap_empty:
+      (𝐢) = ▶(𝐞).
+// qed.
+
+lemma unwind1_rmap_d_sn (p) (n:pnat):
+      (▶(↑[𝐮❨n❩]p))∘(↑[p]𝐮❨n❩) = ▶(𝗱n◗p).
+#p #n
+<unwind1_rmap_unfold <lift_path_length //
+qed.
+
+lemma unwind1_rmap_m_sn (p):
+      ▶p = ▶(𝗺◗p).
+// qed.
+
+lemma unwind1_rmap_L_sn (p):
+      ▶p = ▶(𝗟◗p).
+// qed.
+
+lemma unwind1_rmap_A_sn (p):
+      ▶p = ▶(𝗔◗p).
+// qed.
+
+lemma unwind1_rmap_S_sn (p):
+      ▶p = ▶(𝗦◗p).
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_rmap_eq.ma
new file mode 100644 (file)
index 0000000..113e0cc
--- /dev/null
@@ -0,0 +1,24 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind0/unwind1_rmap.ma".
+include "ground/relocation/tr_id_compose.ma".
+
+(* BASIC UNWIND FOR RELOCATION MAP ******************************************)
+
+(* Constructions with stream_eq *********************************************)
+
+lemma unwind1_rmap_d_empty (n:pnat):
+      (𝐮❨n❩) ≗ ▶(𝗱n◗𝐞).
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path.ma
new file mode 100644 (file)
index 0000000..859c1b8
--- /dev/null
@@ -0,0 +1,109 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind0/unwind1_path.ma".
+include "delayed_updating/notation/functions/black_downtriangle_2.ma".
+
+(* EXTENDED UNWIND FOR PATH *************************************************)
+
+definition unwind2_path (f) (p) ≝
+           ▼↑[f]p.
+
+interpretation
+  "extended unwind (path)"
+  'BlackDownTriangle f p = (unwind2_path f p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind2_path_unfold (f) (p):
+      ▼↑[f]p = ▼[f]p.
+// qed.
+
+lemma unwind2_path_id (p):
+      ▼p = ▼[𝐢]p.
+// qed.
+
+lemma unwind2_path_empty (f):
+      (𝐞) = ▼[f]𝐞.
+// qed.
+
+lemma unwind2_path_d_empty (f) (n):
+      (𝗱(f@❨n❩)◗𝐞) = ▼[f](𝗱n◗𝐞).
+// qed.
+
+lemma unwind2_path_d_lcons (f) (p) (l) (n:pnat):
+      ▼[𝐮❨f@❨n❩❩](l◗p) = ▼[f](𝗱n◗l◗p).
+#f #p #l #n
+<unwind2_path_unfold in ⊢ (???%);
+<lift_path_d_sn <lift_path_id <unwind1_path_d_lcons //
+qed.
+
+lemma unwind2_path_m_sn (f) (p):
+      ▼[f]p = ▼[f](𝗺◗p).
+#f #p
+<unwind2_path_unfold in ⊢ (???%);
+<lift_path_m_sn //
+qed.
+
+lemma unwind2_path_L_sn (f) (p):
+      (𝗟◗▼[⫯f]p) = ▼[f](𝗟◗p).
+#f #p
+<unwind2_path_unfold in ⊢ (???%);
+<lift_path_L_sn //
+qed.
+
+lemma unwind2_path_A_sn (f) (p):
+      (𝗔◗▼[f]p) = ▼[f](𝗔◗p).
+#f #p
+<unwind2_path_unfold in ⊢ (???%);
+<lift_path_A_sn //
+qed.
+
+lemma unwind2_path_S_sn (f) (p):
+      (𝗦◗▼[f]p) = ▼[f](𝗦◗p).
+#f #p
+<unwind2_path_unfold in ⊢ (???%);
+<lift_path_S_sn //
+qed.
+
+(* Main constructions *******************************************************)
+
+theorem unwind2_path_after_id_sn (p) (f):
+        ▼[f]p = ▼▼[f]p.
+// qed.
+
+(* Constructions with stream_eq *********************************************)
+
+lemma unwind2_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ▼[f1]p = ▼[f2]p).
+#p #f1 #f2 #Hf
+<unwind2_path_unfold <unwind2_path_unfold
+<(lift_path_eq_repl … Hf) -Hf //
+qed.
+
+(* Advanced eliminations with path ******************************************)
+
+lemma path_ind_unwind2 (Q:predicate …):
+      Q (𝐞) →
+      (∀n. Q (𝐞) → Q (𝗱n◗𝐞)) →
+      (∀n,l,p. Q (l◗p) → Q (𝗱n◗l◗p)) →
+      (∀p. Q p → Q (𝗺◗p)) →
+      (∀p. Q p → Q (𝗟◗p)) →
+      (∀p. Q p → Q (𝗔◗p)) →
+      (∀p. Q p → Q (𝗦◗p)) →
+      ∀p. Q p.
+#Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #p
+elim p -p [| * [ #n * ] ]
+/2 width=1 by/
+qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_path_structure.ma
new file mode 100644 (file)
index 0000000..3ed2406
--- /dev/null
@@ -0,0 +1,28 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind0/unwind2_rmap.ma".
+include "delayed_updating/unwind0/unwind2_path.ma".
+include "delayed_updating/unwind0/unwind1_path_structure.ma".
+
+(* EXTENDED UNWIND FOR PATH *************************************************)
+
+(* Constructions with structure *********************************************)
+
+lemma unwind2_path_d_dx (f) (p) (n):
+      (⊗p)◖𝗱((▶[f]p)@❨n❩) = ▼[f](p◖𝗱n).
+#f #p #n
+<unwind2_path_unfold <lift_path_d_dx <unwind1_path_d_dx
+<structure_lift >tr_compose_pap //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma
new file mode 100644 (file)
index 0000000..9bb2675
--- /dev/null
@@ -0,0 +1,59 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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/unwind0/unwind1_rmap.ma".
+include "delayed_updating/notation/functions/black_righttriangle_2.ma".
+
+(* EXTENDED UNWIND FOR RELOCATION MAP ***************************************)
+
+definition unwind2_rmap (f) (p): tr_map ≝
+           (▶↑[f]p)∘(↑[p]f).
+
+interpretation
+  "extended unwind (relocation map)"
+  'BlackRightTriangle f p = (unwind2_rmap f p).
+
+(* Basic constructions ******************************************************)
+
+lemma unwind2_rmap_unfold (f) (p):
+      (▶↑[f]p)∘(↑[p]f) = ▶[f]p.
+// qed.
+
+lemma unwind2_rmap_m_sn (f) (p):
+      ▶[f]p = ▶[f](𝗺◗p).
+#f #p
+<unwind2_rmap_unfold in ⊢ (???%);
+<lift_rmap_m_sn <lift_path_m_sn //
+qed.
+
+lemma unwind2_rmap_L_sn (f) (p):
+      ▶[⫯f]p = ▶[f](𝗟◗p).
+#f #p
+<unwind2_rmap_unfold in ⊢ (???%);
+<lift_rmap_L_sn <lift_path_L_sn //
+qed.
+
+lemma unwind2_rmap_A_sn (f) (p):
+      ▶[f]p = ▶[f](𝗔◗p).
+#f #p
+<unwind2_rmap_unfold in ⊢ (???%);
+<lift_rmap_A_sn <lift_path_A_sn //
+qed.
+
+lemma unwind2_rmap_S_sn (f) (p):
+      ▶[f]p = ▶[f](𝗦◗p).
+#f #p
+<unwind2_rmap_unfold in ⊢ (???%);
+<lift_rmap_S_sn <lift_path_S_sn //
+qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap_eq.ma
new file mode 100644 (file)
index 0000000..7666c1c
--- /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/unwind0/unwind2_rmap.ma".
+include "ground/relocation/tr_id_compose.ma".
+
+(* EXTENDED UNWIND FOR RELOCATION MAP ***************************************)
+
+(* Advanced constructions ***************************************************)
+
+lemma unwind2_rmap_id (p):
+      ▶p ≗ ▶[𝐢]p.
+// qed.
+
+lemma unwind2_rmap_empty (f):
+      f ≗ ▶[f]𝐞.
+// qed.
+
+lemma unwind2_rmap_d_sn (f) (p) (n):
+      ▶[𝐮❨f@❨n❩❩]p ≗ ▶[f](𝗱n◗p).
+#f #p #n
+<unwind2_rmap_unfold <unwind2_rmap_unfold
+<lift_rmap_d_sn <lift_rmap_id
+<lift_path_d_sn <lift_path_id <unwind1_rmap_d_sn //
+qed.
index 43e634114db60fd29c22830f179bbef666cd96b1..e5a6ea13f100fee50a70a3d77c110baffafcb45d 100644 (file)
@@ -63,11 +63,11 @@ lemma unwind_empty (A) (k) (f):
       k f (𝐞) = ▼{A}❨k, f, 𝐞❩.
 // qed.
 
-lemma unwind_d_empty_sn (A) (k) (n) (f):
+lemma unwind_d_empty (A) (k) (n) (f):
       ▼❨(λg,p. k g (𝗱(f@❨n❩)◗p)), 𝐮❨f@❨n❩❩, 𝐞❩ = ▼{A}❨k, f, 𝗱n◗𝐞❩.
 // qed.
 
-lemma unwind_d_lcons_sn (A) (k) (p) (l) (n) (f):
+lemma unwind_d_lcons (A) (k) (p) (l) (n) (f):
       ▼❨k, 𝐮❨f@❨n❩❩, l◗p❩ = ▼{A}❨k, f, 𝗱n◗l◗p❩.
 // qed.
 
@@ -93,11 +93,11 @@ lemma unwind_path_empty (f):
       (𝐞) = ▼[f]𝐞.
 // qed.
 
-lemma unwind_path_d_empty_sn (f) (n):
+lemma unwind_path_d_empty (f) (n):
       𝗱(f@❨n❩)◗𝐞 = ▼[f](𝗱n◗𝐞).
 // qed.
 
-lemma unwind_path_d_lcons_sn (f) (p) (l) (n):
+lemma unwind_path_d_lcons (f) (p) (l) (n):
       ▼[𝐮❨f@❨n❩❩](l◗p) = ▼[f](𝗱n◗l◗p).
 // qed.
 
index 2a03b6831017a561d87df6584247590d426b82b7..8943b733565e233f12bf5e57561ec885b4511d1e 100644 (file)
@@ -33,9 +33,9 @@ lemma unwind_eq_repl (A) (p) (k1) (k2):
 #A #p @(path_ind_unwind … p) -p [| #n #IH | #n #l0 #q #IH |*: #q #IH ]
 #k1 #k2 #Hk #f1 #f2 #Hf
 [ <unwind_empty <unwind_empty /2 width=1 by/
-| <unwind_d_empty_sn <unwind_d_empty_sn <(tr_pap_eq_repl … Hf)
+| <unwind_d_empty <unwind_d_empty <(tr_pap_eq_repl … Hf)
   /2 width=1 by stream_eq_refl/
-| <unwind_d_lcons_sn <unwind_d_lcons_sn
+| <unwind_d_lcons <unwind_d_lcons
   /5 width=1 by tr_uni_eq_repl, tr_pap_eq_repl, eq_f/ 
 | /2 width=1 by/
 | /3 width=1 by tr_push_eq_repl/
@@ -72,7 +72,7 @@ lemma unwind_path_eq_repl (p):
 lemma unwind_path_append_sn (p) (f) (q):
       q●▼[f]p = ▼❨(λg,p. proj_path g (q●p)), f, p❩.
 #p @(path_ind_unwind … p) -p // [ #n #l #p |*: #p ] #IH #f #q
-[ <unwind_d_lcons_sn <unwind_d_lcons_sn <IH -IH //
+[ <unwind_d_lcons <unwind_d_lcons <IH -IH //
 | <unwind_m_sn <unwind_m_sn //
 | <unwind_L_sn <unwind_L_sn >unwind_lcons_alt // >unwind_append_rcons_sn //
   <IH <IH -IH <list_append_rcons_sn //
@@ -104,8 +104,8 @@ lemma unwind_path_S_sn (f) (p):
 lemma unwind_path_after_id_sn (p) (f):
       ▼[𝐢]▼[f]p = ▼[f]p.
 #p @(path_ind_unwind … p) -p // [ #n | #n #l #p | #p ] #IH #f
-[ <unwind_path_d_empty_sn //
-| <unwind_path_d_lcons_sn //
+[ <unwind_path_d_empty //
+| <unwind_path_d_lcons //
 | <unwind_path_L_sn <unwind_path_L_sn //
 ]
 qed.
index 27d369219a13a255fb86a6a36c450ebe5918ecbc..ed025110a54db56bbb60b7f7b96d59fc0ba0d6d7 100644 (file)
@@ -46,7 +46,7 @@ lemma unwind_append_proper_dx (p2) (p1) (f): p2 ϵ 𝐏 →
 #p2 #p1 @(path_ind_unwind … p1) -p1 //
 [ #n | #n #l #p1 |*: #p1 ] #IH #f #Hp2
 [ elim (ppc_inv_lcons … Hp2) -Hp2 #l #q #H destruct //
-| <unwind_path_d_lcons_sn <IH //
+| <unwind_path_d_lcons <IH //
 | <unwind_path_m_sn <IH //
 | <unwind_path_L_sn <IH //
 | <unwind_path_A_sn <IH //
@@ -114,9 +114,9 @@ lemma unwind_path_inv_d_sn (k) (q) (p) (f):
 #k #q #p @(path_ind_unwind … p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct -IH
+| <unwind_path_d_empty #H destruct -IH
   /2 width=5 by ex4_2_intro/
-| <unwind_path_d_lcons_sn #H
+| <unwind_path_d_lcons #H
   elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
   /2 width=5 by ex4_2_intro/
 | <unwind_path_m_sn #H
@@ -133,8 +133,8 @@ lemma unwind_path_inv_m_sn (q) (p) (f):
 #q #p @(path_ind_unwind … p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H /2 width=2 by/
+| <unwind_path_d_empty #H destruct
+| <unwind_path_d_lcons #H /2 width=2 by/
 | <unwind_path_m_sn #H /2 width=2 by/
 | <unwind_path_L_sn #H destruct
 | <unwind_path_A_sn #H destruct
@@ -148,8 +148,8 @@ lemma unwind_path_inv_L_sn (q) (p) (f):
 #q #p @(path_ind_unwind … p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
+| <unwind_path_d_empty #H destruct
+| <unwind_path_d_lcons #H
   elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
   /2 width=5 by ex3_2_intro/
 | <unwind_path_m_sn #H
@@ -168,8 +168,8 @@ lemma unwind_path_inv_A_sn (q) (p) (f):
 #q #p @(path_ind_unwind … p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
+| <unwind_path_d_empty #H destruct
+| <unwind_path_d_lcons #H
   elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
   /2 width=5 by ex3_2_intro/
 | <unwind_path_m_sn #H
@@ -188,8 +188,8 @@ lemma unwind_path_inv_S_sn (q) (p) (f):
 #q #p @(path_ind_unwind … p) -p
 [| #n | #n #l #p |*: #p ] [|*: #IH ] #f
 [ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
+| <unwind_path_d_empty #H destruct
+| <unwind_path_d_lcons #H
   elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
   /2 width=5 by ex3_2_intro/
 | <unwind_path_m_sn #H
index c13471e810765e89fa3ff41384172ff8da11fd30..df3423e164aa3107f8d5c2407ccc6581b315e20b 100644 (file)
@@ -22,7 +22,7 @@ include "ground/arith/nat_pred_succ.ma".
 (* Basic constructions with structure and depth ****************************)
 
 lemma unwind_rmap_structure (p) (f):
-      (⫯*[â\9d\98\9d\98]f) = ▼[⊗p]f.
+      (⫯*[â\99­p]f) = ▼[⊗p]f.
 #p elim p -p //
 * [ #n ] #p #IH #f //
 [ <unwind_rmap_A_sn //
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind.ma
deleted file mode 100644 (file)
index 1713625..0000000
+++ /dev/null
@@ -1,189 +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/relocation/tr_compose_pap.ma".
-include "ground/relocation/tr_uni_pap.ma".
-include "delayed_updating/syntax/path.ma".
-include "delayed_updating/notation/functions/black_downtriangle_4.ma".
-include "delayed_updating/notation/functions/black_downtriangle_2.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-definition unwind_continuation (A:Type[0]) ≝
-tr_map → path → A.
-
-rec definition unwind_gen (A:Type[0]) (k:unwind_continuation A) (f) (p) on p ≝
-match p with
-[ list_empty     ⇒ k f (𝐞)
-| list_lcons l q ⇒
-  match l with
-  [ label_d n ⇒
-    match q with
-    [ list_empty     ⇒ unwind_gen (A) (λg,p. k g (𝗱(f@❨n❩)◗p)) (f∘𝐮❨n❩) q
-    | list_lcons _ _ ⇒ unwind_gen (A) k (f∘𝐮❨n❩) q
-    ]
-  | label_m   ⇒ unwind_gen (A) k f q
-  | label_L   ⇒ unwind_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q
-  | label_A   ⇒ unwind_gen (A) (λg,p. k g (𝗔◗p)) f q
-  | label_S   ⇒ unwind_gen (A) (λg,p. k g (𝗦◗p)) f q
-  ]
-].
-
-interpretation
-  "unwind (gneric)"
-  'BlackDownTriangle A k f p = (unwind_gen A k f p).
-
-definition proj_path: unwind_continuation … ≝
-           λf,p.p.
-
-definition proj_rmap: unwind_continuation … ≝
-           λf,p.f.
-
-interpretation
-  "unwind (path)"
-  'BlackDownTriangle f p = (unwind_gen ? proj_path f p).
-
-interpretation
-  "unwind (relocation map)"
-  'BlackDownTriangle p f = (unwind_gen ? proj_rmap f p).
-
-(* Basic constructions ******************************************************)
-
-lemma unwind_empty (A) (k) (f):
-      k f (𝐞) = ▼{A}❨k, f, 𝐞❩.
-// qed.
-
-lemma unwind_d_empty_sn (A) (k) (n) (f):
-      ▼❨(λg,p. k g (𝗱(f@❨n❩)◗p)), f∘𝐮❨ninj n❩, 𝐞❩ = ▼{A}❨k, f,
-𝗱n◗𝐞❩.
-// qed.
-
-lemma unwind_d_lcons_sn (A) (k) (p) (l) (n) (f):
-      ▼❨k, f∘𝐮❨ninj n❩, l◗p❩ = ▼{A}❨k, f, 𝗱n◗l◗p❩.
-// qed.
-
-lemma unwind_m_sn (A) (k) (p) (f):
-      ▼❨k, f, p❩ = ▼{A}❨k, f, 𝗺◗p❩.
-// qed.
-
-lemma unwind_L_sn (A) (k) (p) (f):
-      ▼❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ▼{A}❨k, f, 𝗟◗p❩.
-// qed.
-
-lemma unwind_A_sn (A) (k) (p) (f):
-      ▼❨(λg,p. k g (𝗔◗p)), f, p❩ = ▼{A}❨k, f, 𝗔◗p❩.
-// qed.
-
-lemma unwind_S_sn (A) (k) (p) (f):
-      ▼❨(λg,p. k g (𝗦◗p)), f, p❩ = ▼{A}❨k, f, 𝗦◗p❩.
-// qed.
-
-(* Basic constructions with proj_path ***************************************)
-
-lemma unwind_path_empty (f):
-      (𝐞) = ▼[f]𝐞.
-// qed.
-
-lemma unwind_path_d_empty_sn (f) (n):
-      𝗱(f@❨n❩)◗𝐞 = ▼[f](𝗱n◗𝐞).
-// qed.
-
-lemma unwind_path_d_lcons_sn (f) (p) (l) (n):
-      ▼[f∘𝐮❨ninj n❩](l◗p) = ▼[f](𝗱n◗l◗p).
-// qed.
-
-lemma unwind_path_m_sn (f) (p):
-      ▼[f]p = ▼[f](𝗺◗p).
-// qed.
-
-(* Basic constructions with proj_rmap ***************************************)
-
-lemma unwind_rmap_empty (f):
-      f = ▼[𝐞]f.
-// qed.
-
-lemma unwind_rmap_d_sn (f) (p) (n):
-      ▼[p](f∘𝐮❨ninj n❩) = ▼[𝗱n◗p]f.
-#f * // qed.
-
-lemma unwind_rmap_m_sn (f) (p):
-      ▼[p]f = ▼[𝗺◗p]f.
-// qed.
-
-lemma unwind_rmap_L_sn (f) (p):
-      ▼[p](⫯f) = ▼[𝗟◗p]f.
-// qed.
-
-lemma unwind_rmap_A_sn (f) (p):
-      ▼[p]f = ▼[𝗔◗p]f.
-// qed.
-
-lemma unwind_rmap_S_sn (f) (p):
-      ▼[p]f = ▼[𝗦◗p]f.
-// qed.
-
-(* Advanced constructions with proj_rmap and path_append ********************)
-
-lemma unwind_rmap_append (p2) (p1) (f):
-      ▼[p2]▼[p1]f = ▼[p1●p2]f.
-#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f //
-[ <unwind_rmap_m_sn <unwind_rmap_m_sn //
-| <unwind_rmap_A_sn <unwind_rmap_A_sn //
-| <unwind_rmap_S_sn <unwind_rmap_S_sn //
-]
-qed.
-
-(* Advanced constructions with proj_rmap and path_rcons *********************)
-
-lemma unwind_rmap_d_dx (f) (p) (n):
-      (▼[p]f)∘𝐮❨ninj n❩ = ▼[p◖𝗱n]f.
-// qed.
-
-lemma unwind_rmap_m_dx (f) (p):
-      ▼[p]f = ▼[p◖𝗺]f.
-// qed.
-
-lemma unwind_rmap_L_dx (f) (p):
-      (⫯▼[p]f) = ▼[p◖𝗟]f.
-// qed.
-
-lemma unwind_rmap_A_dx (f) (p):
-      ▼[p]f = ▼[p◖𝗔]f.
-// qed.
-
-lemma unwind_rmap_S_dx (f) (p):
-▼[p]f = ▼[p◖𝗦]f.
-// qed.
-
-lemma unwind_rmap_pap_d_dx (f) (p) (n) (m):
-      ▼[p]f@❨m+n❩ = ▼[p◖𝗱n]f@❨m❩.
-#f #p #n #m
-<unwind_rmap_d_dx <tr_compose_pap <tr_uni_pap //
-qed.
-
-(* Advanced eliminations with path ******************************************)
-
-lemma path_ind_unwind (Q:predicate …):
-      Q (𝐞) →
-      (∀n. Q (𝐞) → Q (𝗱n◗𝐞)) →
-      (∀n,l,p. Q (l◗p) → Q (𝗱n◗l◗p)) →
-      (∀p. Q p → Q (𝗺◗p)) →
-      (∀p. Q p → Q (𝗟◗p)) →
-      (∀p. Q p → Q (𝗔◗p)) →
-      (∀p. Q p → Q (𝗦◗p)) →
-      ∀p. Q p.
-#Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #p
-elim p -p [| * [ #n * ] ]
-/2 width=1 by/
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_constructors.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_constructors.ma
deleted file mode 100644 (file)
index 93ddb2e..0000000
+++ /dev/null
@@ -1,42 +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/unwind2/unwind_prototerm_eq.ma".
-include "delayed_updating/syntax/prototerm_constructors.ma".
-
-(* UNWIND FOR PROTOTERM *****************************************************)
-
-lemma unwind_iref_after_sn (f) (t:prototerm) (n:pnat):
-      ▼[f∘𝐮❨n❩]t ⊆ ▼[f](𝛗n.t).
-#f #t #n #p * #q #Hq #H0 destruct
-@(ex2_intro … (𝗱n◗𝗺◗q))
-/2 width=1 by in_comp_iref/
-qed-.
-
-lemma unwind_iref_after_dx (f) (t) (n:pnat):
-      ▼[f](𝛗n.t) ⊆ ▼[f∘𝐮❨n❩]t.
-#f #t #n #p * #q #Hq #H0 destruct
-elim (in_comp_inv_iref … Hq) -Hq #p #Hp #Ht destruct
-/2 width=1 by in_comp_unwind_bi/
-qed-.
-
-lemma unwind_iref_after (f) (t) (n:pnat):
-      ▼[f∘𝐮❨n❩]t ⇔ ▼[f](𝛗n.t).
-/3 width=1 by conj, unwind_iref_after_sn, unwind_iref_after_dx/
-qed.
-
-lemma unwind_iref (f) (t) (n:pnat):
-      ▼[f]▼[𝐮❨n❩]t ⇔ ▼[f](𝛗n.t).
-/3 width=3 by unwind_term_after, subset_eq_trans/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_depth.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_depth.ma
deleted file mode 100644 (file)
index 8715fb5..0000000
+++ /dev/null
@@ -1,48 +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/unwind2/unwind.ma".
-include "delayed_updating/syntax/path_depth.ma".
-include "ground/relocation/tr_id_compose.ma".
-include "ground/relocation/tr_compose_compose.ma".
-include "ground/relocation/tr_compose_pn.ma".
-include "ground/relocation/tr_compose_eq.ma".
-include "ground/relocation/tr_pn_eq.ma".
-include "ground/lib/stream_eq_eq.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-(* Constructions with depth *************************************************)
-
-lemma unwind_rmap_decompose (p) (f):
-      ▼[p]f ≗ (⫯*[❘p❘]f)∘(▼[p]𝐢).
-#p @(list_ind_rcons … p) -p
-[ #f <unwind_rmap_empty <unwind_rmap_empty <tr_pushs_zero //
-| #p * [ #n ] #IH #f //
-  [ <unwind_rmap_d_dx <unwind_rmap_d_dx <depth_d_dx
-    @(stream_eq_trans … (tr_compose_assoc …))
-    /2 width=1 by tr_compose_eq_repl/
-  | <unwind_rmap_L_dx <unwind_rmap_L_dx <depth_L_dx
-    <tr_pushs_succ <tr_compose_push_bi
-    /2 width=1 by tr_push_eq_repl/
-  ]
-]
-qed.
-
-lemma unwind_rmap_pap_le (f) (p) (n):
-      (▼[p]𝐢)@❨n❩ < ↑❘p❘ → (▼[p]𝐢)@❨n❩ = (▼[p]f)@❨n❩.
-#f #p #n #Hn
->(tr_pap_eq_repl … (▼[p]f) … (unwind_rmap_decompose …))
-<tr_compose_pap @tr_pap_pushs_le //
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_eq.ma
deleted file mode 100644 (file)
index b3c0b40..0000000
+++ /dev/null
@@ -1,122 +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/unwind2/unwind.ma".
-include "ground/relocation/tr_uni_compose.ma".
-include "ground/relocation/tr_compose_compose.ma".
-include "ground/relocation/tr_compose_eq.ma".
-include "ground/relocation/tr_pn_eq.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-definition unwind_exteq (A): relation2 (unwind_continuation A) (unwind_continuation A) ≝
-           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
-
-interpretation
-  "extensional equivalence (unwind continuation)"
-  'RingEq A k1 k2 = (unwind_exteq A k1 k2).
-
-(* Constructions with unwind_exteq ******************************************)
-
-lemma unwind_eq_repl (A) (p) (k1) (k2):
-      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ▼❨k1, f1, p❩ = ▼❨k2, f2, p❩).
-#A #p @(path_ind_unwind … p) -p [| #n #IH | #n #l0 #q #IH |*: #q #IH ]
-#k1 #k2 #Hk #f1 #f2 #Hf
-[ <unwind_empty <unwind_empty /2 width=1 by/
-| <unwind_d_empty_sn <unwind_d_empty_sn <(tr_pap_eq_repl … Hf)
-  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
-| <unwind_d_lcons_sn <unwind_d_lcons_sn
-  /3 width=1 by tr_compose_eq_repl, stream_eq_refl/
-| /2 width=1 by/
-| /3 width=1 by tr_push_eq_repl/
-| /3 width=1 by/
-| /3 width=1 by/
-]
-qed-.
-
-(* Advanced constructions ***************************************************)
-
-lemma unwind_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
-      ▼❨λg,p2. k g (l◗p2), f, p❩ = ▼{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
-#A #k #f #p #l #Hk
-@unwind_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
-qed.
-
-lemma unwind_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
-      ▼❨λg,p2. k g (p1●l◗p2), f, p❩ = ▼{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
-#A #k #f #p1 #p #l #Hk
-@unwind_eq_repl // #g1 #g2 #p2 #Hg
-<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
-qed.
-
-(* Advanced constructions with proj_path ************************************)
-
-lemma proj_path_proper:
-      proj_path ≗ proj_path.
-// qed.
-
-lemma unwind_path_eq_repl (p):
-      stream_eq_repl … (λf1,f2. ▼[f1]p = ▼[f2]p).
-/2 width=1 by unwind_eq_repl/ qed.
-
-lemma unwind_path_append_sn (p) (f) (q):
-      q●▼[f]p = ▼❨(λg,p. proj_path g (q●p)), f, p❩.
-#p @(path_ind_unwind … p) -p // [ #n #l #p |*: #p ] #IH #f #q
-[ <unwind_d_lcons_sn <unwind_d_lcons_sn <IH -IH //
-| <unwind_m_sn <unwind_m_sn //
-| <unwind_L_sn <unwind_L_sn >unwind_lcons_alt // >unwind_append_rcons_sn //
-  <IH <IH -IH <list_append_rcons_sn //
-| <unwind_A_sn <unwind_A_sn >unwind_lcons_alt >unwind_append_rcons_sn //
-  <IH <IH -IH <list_append_rcons_sn //
-| <unwind_S_sn <unwind_S_sn >unwind_lcons_alt >unwind_append_rcons_sn //
-  <IH <IH -IH <list_append_rcons_sn //
-]
-qed.
-
-lemma unwind_path_lcons (f) (p) (l):
-      l◗▼[f]p = ▼❨(λg,p. proj_path g (l◗p)), f, p❩.
-#f #p #l
->unwind_lcons_alt <unwind_path_append_sn //
-qed.
-
-lemma unwind_path_L_sn (f) (p):
-      (𝗟◗▼[⫯f]p) = ▼[f](𝗟◗p).
-// qed.
-
-lemma unwind_path_A_sn (f) (p):
-      (𝗔◗▼[f]p) = ▼[f](𝗔◗p).
-// qed.
-
-lemma unwind_path_S_sn (f) (p):
-      (𝗦◗▼[f]p) = ▼[f](𝗦◗p).
-// qed.
-
-lemma unwind_path_after (p) (f1) (f2):
-      ▼[f2]▼[f1]p = ▼[f2∘f1]p.
-#p @(path_ind_unwind … p) -p // [ #n #l #p | #p ] #IH #f1 #f2
-[ <unwind_path_d_lcons_sn <unwind_path_d_lcons_sn
-  >(unwind_path_eq_repl … (tr_compose_assoc …)) //
-| <unwind_path_L_sn <unwind_path_L_sn <unwind_path_L_sn
-  >tr_compose_push_bi //
-]
-qed.
-
-(* Advanced constructions with proj_rmap and stream_tls *********************)
-
-lemma unwind_rmap_tls_d_dx (f) (p) (m) (n):
-      ⇂*[m+n]▼[p]f ≗ ⇂*[m]▼[p◖𝗱n]f.
-#f #p #m #n
-<unwind_rmap_d_dx >nrplus_inj_dx
-/2 width=1 by tr_tls_compose_uni_dx/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_fsubst.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_fsubst.ma
deleted file mode 100644 (file)
index fedc665..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/unwind2/unwind_prototerm_eq.ma".
-include "delayed_updating/unwind2/unwind_structure.ma".
-include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/syntax/preterm.ma".
-include "delayed_updating/syntax/prototerm_proper.ma".
-
-(* UNWIND FOR PROTOTERM *****************************************************)
-
-(* Constructions with fsubst ************************************************)
-
-lemma unwind_fsubst_sn (f) (t) (u) (p): u ϵ 𝐏 →
-      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⊆ ▼[f](t[⋔p←u]).
-#f #t #u #p #Hu #ql * *
-[ #rl * #r #Hr #H1 #H2 destruct
-  >unwind_append_proper_dx
-  /4 width=5 by in_comp_unwind_bi, in_ppc_comp_trans, or_introl, ex2_intro/
-| * #q #Hq #H1 #H0
-  @(ex2_intro … H1) @or_intror @conj // *
-  [ <list_append_empty_dx #H2 destruct
-    elim (unwind_path_root f q) #r #_ #Hr /2 width=2 by/
-  | #l #r #H2 destruct
-    @H0 -H0 [| <unwind_append_proper_dx /2 width=3 by ppc_lcons/ ]
-  ]
-]
-qed-.
-
-lemma unwind_fsubst_dx (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
-      ▼[f](t[⋔p←u]) ⊆ (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u].
-#f #t #u #p #Hu #H1p #H2p #ql * #q * *
-[ #r #Hu #H1 #H2 destruct
-  @or_introl @ex2_intro
-  [|| <unwind_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
-  /2 width=3 by ex2_intro/
-| #Hq #H0 #H1 destruct
-  @or_intror @conj [ /2 width=1 by in_comp_unwind_bi/ ] *
-  [ <list_append_empty_dx #Hr @(H0 … (𝐞)) -H0
-    <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
-  | #l #r #Hr
-    elim (unwind_inv_append_proper_dx … Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
-    lapply (H2p … Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
-  ]
-]
-qed-.
-
-lemma unwind_fsubst (f) (t) (u) (p): u ϵ 𝐏 → p ϵ ▵t → t ϵ 𝐓 →
-      (▼[f]t)[⋔(⊗p)←▼[▼[p]f]u] ⇔ ▼[f](t[⋔p←u]).
-/4 width=3 by unwind_fsubst_sn, conj, unwind_fsubst_dx/ qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_height.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_height.ma
deleted file mode 100644 (file)
index d2678f6..0000000
+++ /dev/null
@@ -1,83 +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/unwind2/unwind_eq.ma".
-include "delayed_updating/syntax/path_height.ma".
-include "delayed_updating/syntax/path_depth.ma".
-include "ground/lib/stream_eq_eq.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-(* Constructions with height ************************************************)
-
-lemma unwind_rmap_pap_le (f1) (f2) (p) (m:pnat) (l:nat):
-      ninj (m+⧣p+l) = ❘p❘ →
-      (▼[p]f1)@❨m❩ = (▼[p]f2)@❨m❩.
-#f1 #f2 #p @(list_ind_rcons … p) -p
-[ #m #l <depth_empty #H0 destruct
-| #p * [ #n ] #IH #m #l
-  [ <height_d_dx <depth_d_dx <unwind_rmap_pap_d_dx <unwind_rmap_pap_d_dx
-    <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
-    #H0 <(IH … l) -IH //
-  | /2 width=2 by/
-  | <height_L_dx <depth_L_dx <unwind_rmap_L_dx <unwind_rmap_L_dx
-    cases m -m // #m
-    <nrplus_succ_sn <nrplus_succ_sn >nsucc_inj #H0
-    <tr_pap_push <tr_pap_push
-    <(IH … l) -IH //
-  | /2 width=2 by/
-  | /2 width=2 by/
-  ]
-]
-qed.
-
-lemma unwind_rmap_pap_gt (f) (p) (m):
-      f@❨m+⧣p❩+❘p❘ = (▼[p]f)@❨m+❘p❘❩.
-#f #p @(list_ind_rcons … p) -p [ // ]
-#p * [ #n ] #IH #m
-[ <height_d_dx <depth_d_dx
-  <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
-  <unwind_rmap_pap_d_dx >IH -IH //
-| //
-| <height_L_dx <depth_L_dx
-  <nrplus_succ_dx <nrplus_succ_dx <unwind_rmap_L_dx <tr_pap_push //
-| //
-| //
-]
-qed.
-
-lemma unwind_rmap_tls_gt (f) (p) (m:pnat):
-      ⇂*[ninj (m+⧣p)]f ≗ ⇂*[ninj (m+❘p❘)]▼[p]f.
-#f #p @(list_ind_rcons … p) -p [ // ]
-#p * [ #n ] #IH #m
-[ <height_d_dx <depth_d_dx
-  <nplus_comm <nrplus_inj_sn <nrplus_inj_dx <nrplus_pplus_assoc
-  @(stream_eq_trans … (unwind_rmap_tls_d_dx …))
-  @(stream_eq_canc_dx … (IH …)) -IH //
-| //
-| <height_L_dx <depth_L_dx
-  <nrplus_succ_dx >nsucc_inj //
-| //
-| //
-]
-qed.
-
-lemma unwind_rmap_tls_eq (f) (p):
-      ⇂*[⧣p]f ≗ ⇂*[↑❘p❘]▼[p]⫯f.
-(*
-#f #p @(list_ind_rcons … p) -p //
-#p * [ #n ] #IH //
-<height_d_dx <depth_d_dx <unwind_rmap_d_dx
-@(stream_eq_trans … (tr_tls_compose_uni_dx …))
-*)
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_preterm_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_preterm_eq.ma
deleted file mode 100644 (file)
index d60c54c..0000000
+++ /dev/null
@@ -1,68 +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/lib/subset_equivalence.ma".
-include "delayed_updating/syntax/path_structure_inner.ma".
-include "delayed_updating/syntax/preterm.ma".
-include "delayed_updating/unwind2/unwind_structure.ma".
-include "delayed_updating/unwind2/unwind_prototerm.ma".
-
-(* UNWIND FOR PRETERM *******************************************************)
-
-(* Constructions with subset_equivalence ************************************)
-
-lemma unwind_grafted_sn (f) (t) (p): p ϵ 𝐈 →
-      ▼[▼[p]f](t⋔p) ⊆ (▼[f]t)⋔(⊗p).
-#f #t #p #Hp #q * #r #Hr #H0 destruct
-@(ex2_intro … Hr) -Hr
-<unwind_append_inner_sn //
-qed-.
-
-lemma unwind_grafted_dx (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
-      (▼[f]t)⋔(⊗p) ⊆ ▼[▼[p]f](t⋔p).
-#f #t #p #H1p #H2p #Ht #q * #r #Hr #H0
-elim (unwind_inv_append_inner_sn … (sym_eq … H0)) -H0 //
-#p0 #q0 #Hp0 #Hq0 #H0 destruct
-<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
-/2 width=1 by in_comp_unwind_bi/
-qed-.
-
-lemma unwind_grafted (f) (t) (p): p ϵ 𝐈 → p ϵ ▵t → t ϵ 𝐓 →
-      ▼[▼[p]f](t⋔p) ⇔ (▼[f]t)⋔(⊗p).
-/3 width=1 by unwind_grafted_sn, conj, unwind_grafted_dx/ qed.
-
-
-lemma unwind_grafted_S_dx (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
-      (▼[f]t)⋔((⊗p)◖𝗦) ⊆ ▼[▼[p]f](t⋔(p◖𝗦)).
-#f #t #p #Hp #Ht #q * #r #Hr
-<list_append_rcons_sn #H0
-elim (unwind_inv_append_proper_dx … (sym_eq … H0)) -H0 //
-#p0 #q0 #Hp0 #Hq0 #H0 destruct
-<(Ht … Hp0) [|*: /2 width=2 by ex_intro/ ] -p
-elim (unwind_path_inv_S_sn … (sym_eq … Hq0)) -Hq0
-#r1 #r2 #Hr1 #Hr2 #H0 destruct
-lapply (preterm_in_root_append_inv_structure_empty_dx … p0 … Ht Hr1)
-[ /2 width=2 by ex_intro/ ] -Hr1 #Hr1 destruct
-/2 width=1 by in_comp_unwind_bi/
-qed-.
-
-lemma unwind_grafted_S (f) (t) (p): p ϵ ▵t → t ϵ 𝐓 →
-      ▼[▼[p]f](t⋔(p◖𝗦)) ⇔ (▼[f]t)⋔((⊗p)◖𝗦).
-#f #t #p #Hp #Ht
-@conj
-[ >unwind_rmap_S_dx >structure_S_dx
-  @unwind_grafted_sn //
-| /2 width=1 by unwind_grafted_S_dx/
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm.ma
deleted file mode 100644 (file)
index 1a5d46b..0000000
+++ /dev/null
@@ -1,30 +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/unwind2/unwind.ma".
-include "delayed_updating/syntax/prototerm.ma".
-include "ground/lib/subset_ext.ma".
-
-(* UNWIND FOR PROTOTERM *****************************************************)
-
-interpretation
-  "unwind (prototerm)"
-  'BlackDownTriangle f t = (subset_ext_f1 ? ? (unwind_gen ? proj_path f) t).
-
-(* Basic constructions ******************************************************)
-
-lemma in_comp_unwind_bi (f) (p) (t):
-      p ϵ t → ▼[f]p ϵ ▼[f]t.
-/2 width=1 by subset_in_ext_f1_dx/
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_prototerm_eq.ma
deleted file mode 100644 (file)
index 15b8cdb..0000000
+++ /dev/null
@@ -1,40 +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/lib/subset_ext_equivalence.ma".
-include "delayed_updating/unwind2/unwind_eq.ma".
-include "delayed_updating/unwind2/unwind_prototerm.ma".
-
-(* UNWIND FOR PROTOTERM *****************************************************)
-
-(* Constructions with subset_equivalence ************************************)
-
-lemma unwind_term_eq_repl_sn (f1) (f2) (t):
-      f1 ≗ f2 → ▼[f1]t ⇔ ▼[f2]t.
-/3 width=1 by subset_equivalence_ext_f1_exteq, unwind_path_eq_repl/
-qed.
-
-lemma unwind_term_eq_repl_dx (f) (t1) (t2):
-      t1 ⇔ t2 → ▼[f]t1 ⇔ ▼[f]t2.
-/2 width=1 by subset_equivalence_ext_f1_bi/
-qed.
-
-lemma unwind_term_after (f1) (f2) (t):
-      ▼[f2]▼[f1]t ⇔ ▼[f2∘f1]t.
-#f1 #f2 #t @subset_eq_trans
-[
-| @subset_inclusion_ext_f1_compose
-| @subset_equivalence_ext_f1_exteq /2 width=5/
-]
-qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure.ma
deleted file mode 100644 (file)
index b5d92a5..0000000
+++ /dev/null
@@ -1,269 +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/unwind2/unwind_eq.ma".
-include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_inner.ma".
-include "delayed_updating/syntax/path_proper.ma".
-include "ground/xoa/ex_4_2.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-(* Basic constructions with structure ***************************************)
-
-lemma structure_unwind (p) (f):
-      ⊗p = ⊗▼[f]p.
-#p @(path_ind_unwind … p) -p // #p #IH #f
-<unwind_path_L_sn //
-qed.
-
-lemma unwind_structure (p) (f):
-      ⊗p = ▼[f]⊗p.
-#p @(path_ind_unwind … p) -p //
-qed.
-
-(* Destructions with structure **********************************************)
-
-lemma unwind_des_structure (q) (p) (f):
-      ⊗q = ▼[f]p → ⊗q = ⊗p.
-// qed-.
-
-(* Constructions with proper condition for path *****************************)
-
-lemma unwind_append_proper_dx (p2) (p1) (f): p2 ϵ 𝐏 →
-      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
-#p2 #p1 @(path_ind_unwind … p1) -p1 //
-[ #n | #n #l #p1 |*: #p1 ] #IH #f #Hp2
-[ elim (ppc_inv_lcons … Hp2) -Hp2 #l #q #H destruct //
-| <unwind_path_d_lcons_sn <IH //
-| <unwind_path_m_sn <IH //
-| <unwind_path_L_sn <IH //
-| <unwind_path_A_sn <IH //
-| <unwind_path_S_sn <IH //
-]
-qed-.
-
-(* Constructions with inner condition for path ******************************)
-
-lemma unwind_append_inner_sn (p1) (p2) (f): p1 ϵ 𝐈 →
-      (⊗p1)●(▼[▼[p1]f]p2) = ▼[f](p1●p2).
-#p1 @(list_ind_rcons … p1) -p1 // #p1 *
-[ #n ] #_ #p2 #f #Hp1
-[ elim (pic_inv_d_dx … Hp1)
-| <list_append_rcons_sn <unwind_append_proper_dx //
-| <list_append_rcons_sn <unwind_append_proper_dx //
-  <structure_L_dx <list_append_rcons_sn //
-| <list_append_rcons_sn <unwind_append_proper_dx //
-  <structure_A_dx <list_append_rcons_sn //
-| <list_append_rcons_sn <unwind_append_proper_dx //
-  <structure_S_dx <list_append_rcons_sn //
-]
-qed-.
-
-(* Advanced constructions with proj_path ************************************)
-
-lemma unwind_path_d_empty_dx (n) (p) (f):
-      (⊗p)◖𝗱((▼[p]f)@❨n❩) = ▼[f](p◖𝗱n).
-#n #p #f <unwind_append_proper_dx // 
-qed.
-
-lemma unwind_path_m_dx (p) (f):
-      ⊗p = ▼[f](p◖𝗺).
-#p #f <unwind_append_proper_dx //
-qed.
-
-lemma unwind_path_L_dx (p) (f):
-      (⊗p)◖𝗟 = ▼[f](p◖𝗟).
-#p #f <unwind_append_proper_dx //
-qed.
-
-lemma unwind_path_A_dx (p) (f):
-      (⊗p)◖𝗔 = ▼[f](p◖𝗔).
-#p #f <unwind_append_proper_dx //
-qed.
-
-lemma unwind_path_S_dx (p) (f):
-      (⊗p)◖𝗦 = ▼[f](p◖𝗦).
-#p #f <unwind_append_proper_dx //
-qed.
-
-lemma unwind_path_root (f) (p):
-      ∃∃r. 𝐞 = ⊗r & ⊗p●r = ▼[f]p.
-#f #p @(list_ind_rcons … p) -p
-[ /2 width=3 by ex2_intro/
-| #p * [ #n ] /2 width=3 by ex2_intro/
-]
-qed-.
-
-(* Advanced inversions with proj_path ***************************************)
-
-lemma unwind_path_inv_d_sn (k) (q) (p) (f):
-      (𝗱k◗q) = ▼[f]p →
-      ∃∃r,h. 𝐞 = ⊗r & (▼[r]f)@❨h❩ = k & 𝐞 = q & r◖𝗱h = p.
-#k #q #p @(path_ind_unwind … p) -p
-[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
-[ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct -IH
-  /2 width=5 by ex4_2_intro/
-| <unwind_path_d_lcons_sn #H
-  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
-  /2 width=5 by ex4_2_intro/
-| <unwind_path_m_sn #H
-  elim (IH … H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
-  /2 width=5 by ex4_2_intro/
-| <unwind_path_L_sn #H destruct
-| <unwind_path_A_sn #H destruct
-| <unwind_path_S_sn #H destruct
-]
-qed-.
-
-lemma unwind_path_inv_m_sn (q) (p) (f):
-      (𝗺◗q) = ▼[f]p → ⊥.
-#q #p @(path_ind_unwind … p) -p
-[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
-[ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H /2 width=2 by/
-| <unwind_path_m_sn #H /2 width=2 by/
-| <unwind_path_L_sn #H destruct
-| <unwind_path_A_sn #H destruct
-| <unwind_path_S_sn #H destruct
-]
-qed-.
-
-lemma unwind_path_inv_L_sn (q) (p) (f):
-      (𝗟◗q) = ▼[f]p →
-      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[⫯▼[r1]f]r2 & r1●𝗟◗r2 = p.
-#q #p @(path_ind_unwind … p) -p
-[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
-[ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_m_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_L_sn #H destruct -IH
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_A_sn #H destruct
-| <unwind_path_S_sn #H destruct
-]
-qed-.
-
-lemma unwind_path_inv_A_sn (q) (p) (f):
-      (𝗔◗q) = ▼[f]p →
-      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗔◗r2 = p.
-#q #p @(path_ind_unwind … p) -p
-[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
-[ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_m_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_L_sn #H destruct
-| <unwind_path_A_sn #H destruct -IH
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_S_sn #H destruct
-]
-qed-.
-
-lemma unwind_path_inv_S_sn (q) (p) (f):
-      (𝗦◗q) = ▼[f]p →
-      ∃∃r1,r2. 𝐞 = ⊗r1 & q = ▼[▼[r1]f]r2 & r1●𝗦◗r2 = p.
-#q #p @(path_ind_unwind … p) -p
-[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
-[ <unwind_path_empty #H destruct
-| <unwind_path_d_empty_sn #H destruct
-| <unwind_path_d_lcons_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/
-| <unwind_path_m_sn #H
-  elim (IH … H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
-  /2 width=5 by ex3_2_intro/| <unwind_path_L_sn #H destruct
-| <unwind_path_A_sn #H destruct
-| <unwind_path_S_sn #H destruct -IH
-  /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-(* Inversions with proper condition for path ********************************)
-
-lemma unwind_inv_append_proper_dx (q2) (q1) (p) (f):
-      q2 ϵ 𝐏 → q1●q2 = ▼[f]p →
-      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
-#q2 #q1 elim q1 -q1
-[ #p #f #Hq2 <list_append_empty_sn #H destruct
-  /2 width=5 by ex3_2_intro/
-| * [ #n1 ] #q1 #IH #p #f #Hq2 <list_append_lcons_sn #H
-  [ elim (unwind_path_inv_d_sn … H) -H #r1 #m1 #_ #_ #H0 #_ -IH
-    elim (eq_inv_list_empty_append … H0) -H0 #_ #H0 destruct
-    elim Hq2 -Hq2 //
-  | elim (unwind_path_inv_m_sn … H)
-  | elim (unwind_path_inv_L_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
-    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
-    @(ex3_2_intro … (r1●𝗟◗p1)) //
-    <structure_append <Hr1 -Hr1 //
-  | elim (unwind_path_inv_A_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
-    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
-    @(ex3_2_intro … (r1●𝗔◗p1)) //
-    <structure_append <Hr1 -Hr1 //
-  | elim (unwind_path_inv_S_sn … H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
-    elim (IH … Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
-    @(ex3_2_intro … (r1●𝗦◗p1)) //
-    <structure_append <Hr1 -Hr1 //
-  ]
-]
-qed-.
-
-(* Inversions with inner condition for path *********************************)
-
-lemma unwind_inv_append_inner_sn (q1) (q2) (p) (f):
-      q1 ϵ 𝐈 → q1●q2 = ▼[f]p →
-      ∃∃p1,p2. ⊗p1 = q1 & ▼[▼[p1]f]p2 = q2 & p1●p2 = p.
-#q1 @(list_ind_rcons … q1) -q1
-[ #q2 #p #f #Hq1 <list_append_empty_sn #H destruct
-  /2 width=5 by ex3_2_intro/
-| #q1 * [ #n1 ] #_ #q2 #p #f #Hq2
-  [ elim (pic_inv_d_dx … Hq2)
-  | <list_append_rcons_sn #H0
-    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
-    elim (unwind_path_inv_m_sn … (sym_eq … H2))
-  | <list_append_rcons_sn #H0
-    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
-    elim (unwind_path_inv_L_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
-    @(ex3_2_intro … (p1●r2◖𝗟)) [1,3: // ]
-    [ <structure_append <structure_L_dx <Hr2 -Hr2 //
-    | <list_append_assoc <list_append_rcons_sn //
-    ]
-  | <list_append_rcons_sn #H0
-    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
-    elim (unwind_path_inv_A_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
-    @(ex3_2_intro … (p1●r2◖𝗔)) [1,3: // ]
-    [ <structure_append <structure_A_dx <Hr2 -Hr2 //
-    | <list_append_assoc <list_append_rcons_sn //
-    ]
-  | <list_append_rcons_sn #H0
-    elim (unwind_inv_append_proper_dx … H0) -H0 // #p1 #p2 #H1 #H2 #H3 destruct
-    elim (unwind_path_inv_S_sn … (sym_eq … H2)) -H2 #r2 #s2 #Hr2 #Hs2 #H0 destruct
-    @(ex3_2_intro … (p1●r2◖𝗦)) [1,3: // ]
-    [ <structure_append <structure_S_dx <Hr2 -Hr2 //
-    | <list_append_assoc <list_append_rcons_sn //
-    ]
-  ]
-]
-qed-.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure_depth.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind2/unwind_structure_depth.ma
deleted file mode 100644 (file)
index 577a95b..0000000
+++ /dev/null
@@ -1,31 +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/unwind2/unwind.ma".
-include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_depth.ma".
-include "ground/arith/nat_pred_succ.ma".
-
-(* UNWIND FOR PATH **********************************************************)
-
-(* Basic constructions with structure and depth *****************************)
-
-lemma unwind_rmap_structure (p) (f):
-      (⫯*[❘p❘]f) = ▼[⊗p]f.
-#p elim p -p //
-* [ #n ] #p #IH #f //
-[ <unwind_rmap_A_sn //
-| <unwind_rmap_S_sn //
-]
-qed.
index 742c6b25776f397bfddd57541f8a007ad5a0b4cc..660d4147a4fbb9a0cd317617de3b82fea6bba6bd 100644 (file)
@@ -41,6 +41,9 @@ lemma npsucc_zero: (𝟏) = ↑𝟎.
 lemma npsucc_inj (p): (↑p) = ↑(ninj p).
 // qed.
 
+lemma nsucc_unfold (n): ninj (↑n) = ↑n.
+// qed-.
+
 lemma nsucc_zero: ninj (𝟏) = ↑𝟎.
 // qed.
 
index 322235e7a15cc326f44a5c4d9c5873851f1a5612..00faad83dc2af5462773b9ef7ba0fc592ed623c1 100644 (file)
@@ -40,7 +40,7 @@ lemma list_append_rcons_sn (A):
 // qed.
 
 lemma list_append_rcons_dx (A):
-      ∀l1,l2,a. l1 ⨁ l2 ⨭ a = l1 ⨁{A} (l2 ⨭ a).
+      ∀l1,l2,a. (l1 ⨁ l2) ⨭ a = l1 ⨁{A} (l2 ⨭ a).
 // qed.
 
 (* Basic inversions *********************************************************)
index 54cf97875272b3995f5bea6b84279ae21f3ec9d4..d278582f214984c06fb1f6579f15331151c28bce 100644 (file)
@@ -29,6 +29,12 @@ qed.
 
 (* Constructions with tr_compose and tr_tls *********************************)
 
+lemma tr_tls_compose_uni_sn (f) (n) (p:pnat):
+      ⇂*[p]f ≗ ⇂*[p](𝐮❨n❩∘f).
+#f #n #p elim p -p //
+#p #IH /2 width=1 by stream_tl_eq_repl/
+qed.
+
 lemma tr_tl_compose_uni_dx (f) (n):
       ⇂*[↑n]f ≗ ⇂(f∘𝐮❨n❩).
 // qed.
index 2ec69e63f23b7b0e55cbc6ea927b3c9e871e8d44..92cb18cfac13d75ee81c0660b959b9ac473f1786 100644 (file)
@@ -1537,7 +1537,7 @@ let predefined_classes = [
  ["∨"; "⩖"; "∪"; "∩"; "⋓"; "⋒" ] ;
  ["a"; "α"; "𝕒"; "𝐚"; "𝛂"; "ⓐ"; ] ;
  ["A"; "ℵ"; "𝔸"; "𝐀"; "Ⓐ"; "𝗔"; ] ;
- ["b"; "β"; "ß"; "𝕓"; "𝐛"; "𝛃"; "ⓑ"; ] ;
+ ["b"; "β"; "ß"; "𝕓"; "𝐛"; "𝛃"; "ⓑ"; "♭"; ] ;
  ["B"; "ℶ"; "ℬ"; "𝔹"; "𝐁"; "Ⓑ"; ] ;
  ["c"; "𝕔"; "𝐜"; "ⓒ"; ] ;
  ["C"; "ℭ"; "∁"; "𝐂"; "ℂ"; "Ⓒ"; ] ;