--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 โก๐๐[ break term 46 r ] break term 46 t2 )"
+ non associative with precedence 45
+ for @{ 'BlackRightArrowDF $t1 $r $t2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR DELAYED UPDATING ********************************************)
+
+notation "hvbox( t1 โก๐ข๐[ break term 46 r ] break term 46 t2 )"
+ non associative with precedence 45
+ for @{ 'BlackRightArrowIF $t1 $r $t2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/syntax/prototerm_constructors.ma".
+include "delayed_updating/syntax/prototerm_eq.ma".
+include "delayed_updating/syntax/path_closed.ma".
+include "delayed_updating/notation/relations/black_rightarrow_df_3.ma".
+include "ground/xoa/ex_4_3.ma".
+
+(* DELAYED FOCUSED REDUCTION ************************************************)
+
+definition dfr (r): relation2 prototerm prototerm โ
+ ฮปt1,t2.
+ โโp,q,n. pโ๐โ๐โq = r &
+ q ฯต ๐โจโป,nโฉ & rโ๐ฑโn ฯต t1 &
+ t1[โrโ๐โn.(t1โ(pโ๐ฆ))] โ t2
+.
+
+interpretation
+ "focused reduction with delayed updating (prototerm)"
+ 'BlackRightArrowDF t1 r t2 = (dfr r t1 t2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/unwind/unwind2_constructors.ma".
+include "delayed_updating/unwind/unwind2_preterm_fsubst.ma".
+include "delayed_updating/unwind/unwind2_preterm_eq.ma".
+include "delayed_updating/unwind/unwind2_prototerm_lift.ma".
+include "delayed_updating/unwind/unwind2_rmap_closed.ma".
+
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_prototerm_eq.ma".
+
+include "delayed_updating/syntax/prototerm_proper_constructors.ma".
+include "delayed_updating/syntax/path_closed_structure.ma".
+include "delayed_updating/syntax/path_structure_depth.ma".
+
+(* DELAYED FOCUSED REDUCTION ************************************************)
+
+(* Main destructions with ifr ***********************************************)
+
+theorem dfr_des_ifr (f) (t1) (t2) (r): t1 ฯต ๐ โ
+ t1 โก๐๐[r] t2 โ โผ[f]t1 โก๐ข๐[โr] โผ[f]t2.
+#f #t1 #t2 #r #H0t1
+* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
+@(ex4_3_intro โฆ (โp) (โq) (โญq))
+[ -H0t1 -Hn -Ht1 -Ht2 //
+| -H0t1 -Ht1 -Ht2
+ /2 width=2 by path_closed_structure_depth/
+| lapply (in_comp_unwind2_path_term f โฆ Ht1) -Ht2 -Ht1 -H0t1
+ <unwind2_path_d_dx <tr_pap_succ_nap <list_append_rcons_sn
+ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
+| lapply (unwind2_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2
+ @(subset_eq_trans โฆ Ht2) -t2
+ @(subset_eq_trans โฆ (unwind2_term_fsubst_ppc โฆ))
+ [ @fsubst_eq_repl [ // | // ]
+ @(subset_eq_trans โฆ (unwind2_term_irefโฆ))
+ @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
+ [ @unwind2_term_grafted_S /2 width=2 by ex_intro/ | skip ] -Ht1
+ @(subset_eq_trans โฆ (lift_unwind2_term_after โฆ))
+ @unwind2_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+ <list_append_rcons_sn
+ @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
+ @tr_compose_eq_repl
+ [ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
+ | /2 width=2 by tls_succ_unwind2_rmap_append_closed_Lq_dx/
+ ]
+(* Note: crux of the proof ends *)
+ | //
+ | /2 width=2 by ex_intro/
+ | //
+ ]
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/substitution/fsubst_lift.ma".
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_constructors.ma".
+include "delayed_updating/substitution/lift_path_closed.ma".
+include "delayed_updating/substitution/lift_rmap_closed.ma".
+
+(* DELAYED FOCUSED REDUCTION ************************************************)
+
+(* Constructions with lift **************************************************)
+
+theorem dfr_lift_bi (f) (t1) (t2) (r):
+ t1 โก๐๐[r] t2 โ ๐ ก[f]t1 โก๐๐[๐ ก[f]r] ๐ ก[f]t2.
+#f #t1 #t2 #r
+* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
+@(ex4_3_intro โฆ (๐ ก[f]p) (๐ ก[๐ ข[f](pโ๐โ๐)]q) (๐ ข[f](pโ๐โ๐โq)๏ผ ยงโจnโฉ))
+[ -Hn -Ht1 -Ht2 //
+| -Ht1 -Ht2
+ /2 width=1 by lift_path_rmap_closed_L/
+| lapply (in_comp_lift_path_term f โฆ Ht1) -Ht2 -Ht1 -Hn
+ <lift_path_d_dx #Ht1 //
+| lapply (lift_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2 -Ht1
+ @(subset_eq_trans โฆ Ht2) -t2
+ @(subset_eq_trans โฆ (lift_term_fsubst โฆ))
+ @fsubst_eq_repl [ // | // ]
+ @(subset_eq_trans โฆ (lift_term_iref_nap โฆ))
+ @iref_eq_repl
+ @(subset_eq_canc_sn โฆ (lift_term_grafted_S โฆ))
+ @lift_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+ /2 width=2 by tls_succ_lift_rmap_append_closed_Lq_dx/
+(* Note: crux of the proof ends *)
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/substitution/fsubst.ma".
+include "delayed_updating/substitution/lift_prototerm.ma".
+include "delayed_updating/syntax/prototerm_eq.ma".
+include "delayed_updating/syntax/path_closed.ma".
+include "delayed_updating/notation/relations/black_rightarrow_if_3.ma".
+include "ground/relocation/tr_uni.ma".
+include "ground/xoa/ex_4_3.ma".
+
+(* IMMEDIATE FOCUSED REDUCTION ************************************************)
+
+definition ifr (r): relation2 prototerm prototerm โ
+ ฮปt1,t2.
+ โโp,q,n. pโ๐โ๐โq = r &
+ q ฯต ๐โจโป,nโฉ & rโ๐ฑโn ฯต t1 &
+ t1[โrโ๐ ก[๐ฎโจโnโฉ](t1โ(pโ๐ฆ))] โ t2
+.
+
+interpretation
+ "focused reduction with immediate updating (prototerm)"
+ 'BlackRightArrowIF t1 r t2 = (ifr r t1 t2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/ifr.ma".
+
+include "delayed_updating/substitution/fsubst_lift.ma".
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_prototerm_after.ma".
+include "delayed_updating/substitution/lift_path_closed.ma".
+include "delayed_updating/substitution/lift_rmap_closed.ma".
+
+include "ground/relocation/tr_uni_compose.ma".
+include "ground/relocation/tr_compose_eq.ma".
+
+(* IMMEDIATE FOCUSED REDUCTION **********************************************)
+
+(* Constructions with lift **************************************************)
+
+theorem ifr_lift_bi (f) (t1) (t2) (r):
+ t1 โก๐ข๐[r] t2 โ ๐ ก[f]t1 โก๐ข๐[๐ ก[f]r] ๐ ก[f]t2.
+#f #t1 #t2 #r
+* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
+@(ex4_3_intro โฆ (๐ ก[f]p) (๐ ก[๐ ข[f](pโ๐โ๐)]q) (๐ ข[f](pโ๐โ๐โq)๏ผ ยงโจnโฉ))
+[ -Hn -Ht1 -Ht2 //
+| -Ht1 -Ht2
+ /2 width=1 by lift_path_rmap_closed_L/
+| lapply (in_comp_lift_path_term f โฆ Ht1) -Ht2 -Ht1 -Hn
+ <lift_path_d_dx #Ht1 //
+| lapply (lift_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2 -Ht1
+ @(subset_eq_trans โฆ Ht2) -t2
+ @(subset_eq_trans โฆ (lift_term_fsubst โฆ))
+ @fsubst_eq_repl [ // | <lift_path_append // ]
+ @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
+ [ @lift_term_grafted_S | skip ]
+ @(subset_eq_trans โฆ (lift_term_after โฆ))
+ @(subset_eq_canc_dx โฆ (lift_term_after โฆ))
+ @lift_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+ @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
+ @tr_compose_eq_repl // >nsucc_unfold
+ /2 width=2 by tls_succ_lift_rmap_append_closed_Lq_dx/
+(* Note: crux of the proof ends *)
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/ifr.ma".
+
+include "delayed_updating/unwind/unwind2_preterm_fsubst.ma".
+include "delayed_updating/unwind/unwind2_preterm_eq.ma".
+include "delayed_updating/unwind/unwind2_prototerm_lift.ma".
+include "delayed_updating/unwind/unwind2_rmap_closed.ma".
+
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_prototerm_eq.ma".
+
+include "delayed_updating/syntax/path_closed_structure.ma".
+include "delayed_updating/syntax/path_structure_depth.ma".
+
+(* IMMEDIATE FOCUSED REDUCTION **********************************************)
+
+(* Constructions with unwind2 ***********************************************)
+
+lemma ifr_unwind_bi (f) (t1) (t2) (r):
+ t1 ฯต ๐ โ r ฯต ๐ โ
+ t1 โก๐ข๐[r] t2 โ โผ[f]t1 โก๐ข๐[โr] โผ[f]t2.
+#f #t1 #t2 #r #H1t1 #H2r
+* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
+@(ex4_3_intro โฆ (โp) (โq) (โญq))
+[ -H1t1 -H2r -Hn -Ht1 -Ht2 //
+| -H1t1 -H2r -Ht1 -Ht2
+ /2 width=2 by path_closed_structure_depth/
+| lapply (in_comp_unwind2_path_term f โฆ Ht1) -Ht2 -Ht1 -H1t1 -H2r
+ <unwind2_path_d_dx <tr_pap_succ_nap <list_append_rcons_sn
+ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
+| lapply (unwind2_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2
+ @(subset_eq_trans โฆ Ht2) -t2
+ @(subset_eq_trans โฆ (unwind2_term_fsubst_pic โฆ))
+ [ @fsubst_eq_repl [ // | // ]
+ @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
+ [ @unwind2_term_grafted_S /2 width=2 by ex_intro/ | skip ] -Ht1
+ @(subset_eq_trans โฆ (lift_unwind2_term_after โฆ))
+ @(subset_eq_canc_dx โฆ (unwind2_lift_term_after โฆ))
+ @unwind2_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+ <list_append_rcons_sn
+ @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
+ @tr_compose_eq_repl
+ [ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
+ | /2 width=2 by tls_succ_unwind2_rmap_append_closed_Lq_dx/
+ ]
+(* Note: crux of the proof ends *)
+ | //
+ | /2 width=2 by ex_intro/
+ | //
+ ]
+]
+qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/syntax/path_depth.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* DEPTH FOR PATH ***********************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma depth_labels_L (n):
- n = โญ(๐โโn).
-#n @(nat_ind_succ โฆ n) -n //
-#n #IH <labels_succ <depth_L_dx //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/syntax/path_height.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* HEIGHT FOR PATH **********************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma height_labels_L (n):
- (๐) = โฏ(๐โโn).
-#n @(nat_ind_succ โฆ n) -n //
-#n #IH <labels_succ <height_L_dx //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/syntax/path.ma".
-include "delayed_updating/notation/functions/power_2.ma".
-include "ground/arith/nat_succ_iter.ma".
-
-(* *)
-
-definition labels (l) (n:nat): path โ
- ((list_lcons ? l)^n) (๐).
-
-interpretation
- "labels (path)"
- 'Power l n = (labels l n).
-
-(* Basic constructions ******************************************************)
-
-lemma labels_unfold (l) (n):
- ((list_lcons ? l)^n) (๐) = lโโn.
-// qed.
-
-lemma labels_zero (l):
- (๐) = lโโ๐.
-// qed.
-
-lemma labels_succ (l) (n):
- (lโโn)โl = lโโ(โn).
-#l #n
-<labels_unfold <labels_unfold <niter_succ //
-qed.
-
-(* Basic inversions *********************************************************)
-
-lemma eq_inv_empty_labels (l) (n):
- (๐) = lโโn โ ๐ = n.
-#l #n @(nat_ind_succ โฆ n) -n //
-#n #_ <labels_succ #H0 destruct
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/syntax/path_structure.ma".
-include "delayed_updating/syntax/path_labels.ma".
-
-(* STRUCTURE FOR PATH *******************************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma structure_labels_L (n):
- (๐โโn) = โ(๐โโn).
-#n @(nat_ind_succ โฆ n) -n //
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR DELAYED UPDATING ********************************************)
-
-notation "hvbox( a โโ break b )"
- left associative with precedence 65
- for @{ 'Power $a $b }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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/unwind/unwind2_rmap.ma".
-include "delayed_updating/syntax/path_labels.ma".
-include "ground/relocation/tr_pushs.ma".
-
-(* TAILED UNWIND FOR RELOCATION MAP *****************************************)
-
-(* Constructions with labels ************************************************)
-
-lemma unwind2_rmap_labels_L (f) (n):
- (โซฏ*[n]f) = โถ[f](๐โโn).
-#f #n @(nat_ind_succ โฆ n) -n //
-#n #IH
-<labels_succ <unwind2_rmap_L_dx //
-qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/syntax/path_height.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* HEIGHT FOR PATH **********************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma height_labels_L (n):
+ (๐) = โฏ(๐โโn).
+#n @(nat_ind_succ โฆ n) -n //
+#n #IH <labels_succ <height_L_dx //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/syntax/path_depth.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* DEPTH FOR PATH ***********************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma depth_labels_L (n):
+ n = โญ(๐โโn).
+#n @(nat_ind_succ โฆ n) -n //
+#n #IH <labels_succ <depth_L_dx //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_labels.ma".
+
+(* STRUCTURE FOR PATH *******************************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma structure_labels_L (n):
+ (๐โโn) = โ(๐โโn).
+#n @(nat_ind_succ โฆ n) -n //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/unwind/unwind2_rmap.ma".
+include "delayed_updating/syntax/path_labels.ma".
+include "ground/relocation/tr_pushs.ma".
+
+(* TAILED UNWIND FOR RELOCATION MAP *****************************************)
+
+(* Constructions with labels ************************************************)
+
+lemma unwind2_rmap_labels_L (f) (n):
+ (โซฏ*[n]f) = โถ[f](๐โโn).
+#f #n @(nat_ind_succ โฆ n) -n //
+#n #IH
+<labels_succ <unwind2_rmap_L_dx //
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR DELAYED UPDATING ********************************************)
+
+notation "hvbox( a โโ break b )"
+ left associative with precedence 65
+ for @{ 'Power $a $b }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR DELAYED UPDATING ********************************************)
-
-notation "hvbox( t1 โก๐๐[ break term 46 r ] break term 46 t2 )"
- non associative with precedence 45
- for @{ 'BlackRightArrowDF $t1 $r $t2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR DELAYED UPDATING ********************************************)
-
-notation "hvbox( t1 โก๐ข๐[ break term 46 r ] break term 46 t2 )"
- non associative with precedence 45
- for @{ 'BlackRightArrowIF $t1 $r $t2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/syntax/prototerm_constructors.ma".
-include "delayed_updating/syntax/prototerm_eq.ma".
-include "delayed_updating/syntax/path_closed.ma".
-include "delayed_updating/notation/relations/black_rightarrow_df_3.ma".
-include "ground/xoa/ex_4_3.ma".
-
-(* DELAYED FOCUSED REDUCTION ************************************************)
-
-definition dfr (r): relation2 prototerm prototerm โ
- ฮปt1,t2.
- โโp,q,n. pโ๐โ๐โq = r &
- q ฯต ๐โจโป,nโฉ & rโ๐ฑโn ฯต t1 &
- t1[โrโ๐โn.(t1โ(pโ๐ฆ))] โ t2
-.
-
-interpretation
- "focused reduction with delayed updating (prototerm)"
- 'BlackRightArrowDF t1 r t2 = (dfr r t1 t2).
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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/unwind/unwind2_constructors.ma".
-include "delayed_updating/unwind/unwind2_preterm_fsubst.ma".
-include "delayed_updating/unwind/unwind2_preterm_eq.ma".
-include "delayed_updating/unwind/unwind2_prototerm_lift.ma".
-include "delayed_updating/unwind/unwind2_rmap_closed.ma".
-
-include "delayed_updating/substitution/fsubst_eq.ma".
-include "delayed_updating/substitution/lift_prototerm_eq.ma".
-
-include "delayed_updating/syntax/prototerm_proper_constructors.ma".
-include "delayed_updating/syntax/path_closed_structure.ma".
-include "delayed_updating/syntax/path_structure_depth.ma".
-
-(* DELAYED FOCUSED REDUCTION ************************************************)
-
-(* Main destructions with ifr ***********************************************)
-
-theorem dfr_des_ifr (f) (t1) (t2) (r): t1 ฯต ๐ โ
- t1 โก๐๐[r] t2 โ โผ[f]t1 โก๐ข๐[โr] โผ[f]t2.
-#f #t1 #t2 #r #H0t1
-* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
-@(ex4_3_intro โฆ (โp) (โq) (โญq))
-[ -H0t1 -Hn -Ht1 -Ht2 //
-| -H0t1 -Ht1 -Ht2
- /2 width=2 by path_closed_structure_depth/
-| lapply (in_comp_unwind2_path_term f โฆ Ht1) -Ht2 -Ht1 -H0t1
- <unwind2_path_d_dx <tr_pap_succ_nap <list_append_rcons_sn
- <nap_unwind2_rmap_append_closed_Lq_dx_depth //
-| lapply (unwind2_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2
- @(subset_eq_trans โฆ Ht2) -t2
- @(subset_eq_trans โฆ (unwind2_term_fsubst_ppc โฆ))
- [ @fsubst_eq_repl [ // | // ]
- @(subset_eq_trans โฆ (unwind2_term_irefโฆ))
- @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
- [ @unwind2_term_grafted_S /2 width=2 by ex_intro/ | skip ] -Ht1
- @(subset_eq_trans โฆ (lift_unwind2_term_after โฆ))
- @unwind2_term_eq_repl_sn
-(* Note: crux of the proof begins *)
- <list_append_rcons_sn
- @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
- @tr_compose_eq_repl
- [ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
- | /2 width=2 by tls_succ_unwind2_rmap_append_closed_Lq_dx/
- ]
-(* Note: crux of the proof ends *)
- | //
- | /2 width=2 by ex_intro/
- | //
- ]
-]
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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/substitution/fsubst_lift.ma".
-include "delayed_updating/substitution/fsubst_eq.ma".
-include "delayed_updating/substitution/lift_constructors.ma".
-include "delayed_updating/substitution/lift_path_closed.ma".
-include "delayed_updating/substitution/lift_rmap_closed.ma".
-
-(* DELAYED FOCUSED REDUCTION ************************************************)
-
-(* Constructions with lift **************************************************)
-
-theorem dfr_lift_bi (f) (t1) (t2) (r):
- t1 โก๐๐[r] t2 โ ๐ ก[f]t1 โก๐๐[๐ ก[f]r] ๐ ก[f]t2.
-#f #t1 #t2 #r
-* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
-@(ex4_3_intro โฆ (๐ ก[f]p) (๐ ก[๐ ข[f](pโ๐โ๐)]q) (๐ ข[f](pโ๐โ๐โq)๏ผ ยงโจnโฉ))
-[ -Hn -Ht1 -Ht2 //
-| -Ht1 -Ht2
- /2 width=1 by lift_path_rmap_closed_L/
-| lapply (in_comp_lift_path_term f โฆ Ht1) -Ht2 -Ht1 -Hn
- <lift_path_d_dx #Ht1 //
-| lapply (lift_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2 -Ht1
- @(subset_eq_trans โฆ Ht2) -t2
- @(subset_eq_trans โฆ (lift_term_fsubst โฆ))
- @fsubst_eq_repl [ // | // ]
- @(subset_eq_trans โฆ (lift_term_iref_nap โฆ))
- @iref_eq_repl
- @(subset_eq_canc_sn โฆ (lift_term_grafted_S โฆ))
- @lift_term_eq_repl_sn
-(* Note: crux of the proof begins *)
- /2 width=2 by tls_succ_lift_rmap_append_closed_Lq_dx/
-(* Note: crux of the proof ends *)
-]
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/substitution/lift_prototerm.ma".
-include "delayed_updating/syntax/prototerm_eq.ma".
-include "delayed_updating/syntax/path_closed.ma".
-include "delayed_updating/notation/relations/black_rightarrow_if_3.ma".
-include "ground/relocation/tr_uni.ma".
-include "ground/xoa/ex_4_3.ma".
-
-(* IMMEDIATE FOCUSED REDUCTION ************************************************)
-
-definition ifr (r): relation2 prototerm prototerm โ
- ฮปt1,t2.
- โโp,q,n. pโ๐โ๐โq = r &
- q ฯต ๐โจโป,nโฉ & rโ๐ฑโn ฯต t1 &
- t1[โrโ๐ ก[๐ฎโจโnโฉ](t1โ(pโ๐ฆ))] โ t2
-.
-
-interpretation
- "focused reduction with immediate updating (prototerm)"
- 'BlackRightArrowIF t1 r t2 = (ifr r t1 t2).
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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/ifr.ma".
-
-include "delayed_updating/substitution/fsubst_lift.ma".
-include "delayed_updating/substitution/fsubst_eq.ma".
-include "delayed_updating/substitution/lift_prototerm_after.ma".
-include "delayed_updating/substitution/lift_path_closed.ma".
-include "delayed_updating/substitution/lift_rmap_closed.ma".
-
-include "ground/relocation/tr_uni_compose.ma".
-include "ground/relocation/tr_compose_eq.ma".
-
-(* IMMEDIATE FOCUSED REDUCTION **********************************************)
-
-(* Constructions with lift **************************************************)
-
-theorem ifr_lift_bi (f) (t1) (t2) (r):
- t1 โก๐ข๐[r] t2 โ ๐ ก[f]t1 โก๐ข๐[๐ ก[f]r] ๐ ก[f]t2.
-#f #t1 #t2 #r
-* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
-@(ex4_3_intro โฆ (๐ ก[f]p) (๐ ก[๐ ข[f](pโ๐โ๐)]q) (๐ ข[f](pโ๐โ๐โq)๏ผ ยงโจnโฉ))
-[ -Hn -Ht1 -Ht2 //
-| -Ht1 -Ht2
- /2 width=1 by lift_path_rmap_closed_L/
-| lapply (in_comp_lift_path_term f โฆ Ht1) -Ht2 -Ht1 -Hn
- <lift_path_d_dx #Ht1 //
-| lapply (lift_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2 -Ht1
- @(subset_eq_trans โฆ Ht2) -t2
- @(subset_eq_trans โฆ (lift_term_fsubst โฆ))
- @fsubst_eq_repl [ // | <lift_path_append // ]
- @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
- [ @lift_term_grafted_S | skip ]
- @(subset_eq_trans โฆ (lift_term_after โฆ))
- @(subset_eq_canc_dx โฆ (lift_term_after โฆ))
- @lift_term_eq_repl_sn
-(* Note: crux of the proof begins *)
- @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
- @tr_compose_eq_repl // >nsucc_unfold
- /2 width=2 by tls_succ_lift_rmap_append_closed_Lq_dx/
-(* Note: crux of the proof ends *)
-]
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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/ifr.ma".
-
-include "delayed_updating/unwind/unwind2_preterm_fsubst.ma".
-include "delayed_updating/unwind/unwind2_preterm_eq.ma".
-include "delayed_updating/unwind/unwind2_prototerm_lift.ma".
-include "delayed_updating/unwind/unwind2_rmap_closed.ma".
-
-include "delayed_updating/substitution/fsubst_eq.ma".
-include "delayed_updating/substitution/lift_prototerm_eq.ma".
-
-include "delayed_updating/syntax/path_closed_structure.ma".
-include "delayed_updating/syntax/path_structure_depth.ma".
-
-(* IMMEDIATE FOCUSED REDUCTION **********************************************)
-
-(* Constructions with unwind2 ***********************************************)
-
-lemma ifr_unwind_bi (f) (t1) (t2) (r):
- t1 ฯต ๐ โ r ฯต ๐ โ
- t1 โก๐ข๐[r] t2 โ โผ[f]t1 โก๐ข๐[โr] โผ[f]t2.
-#f #t1 #t2 #r #H1t1 #H2r
-* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
-@(ex4_3_intro โฆ (โp) (โq) (โญq))
-[ -H1t1 -H2r -Hn -Ht1 -Ht2 //
-| -H1t1 -H2r -Ht1 -Ht2
- /2 width=2 by path_closed_structure_depth/
-| lapply (in_comp_unwind2_path_term f โฆ Ht1) -Ht2 -Ht1 -H1t1 -H2r
- <unwind2_path_d_dx <tr_pap_succ_nap <list_append_rcons_sn
- <nap_unwind2_rmap_append_closed_Lq_dx_depth //
-| lapply (unwind2_term_eq_repl_dx f โฆ Ht2) -Ht2 #Ht2
- @(subset_eq_trans โฆ Ht2) -t2
- @(subset_eq_trans โฆ (unwind2_term_fsubst_pic โฆ))
- [ @fsubst_eq_repl [ // | // ]
- @(subset_eq_canc_sn โฆ (lift_term_eq_repl_dx โฆ))
- [ @unwind2_term_grafted_S /2 width=2 by ex_intro/ | skip ] -Ht1
- @(subset_eq_trans โฆ (lift_unwind2_term_after โฆ))
- @(subset_eq_canc_dx โฆ (unwind2_lift_term_after โฆ))
- @unwind2_term_eq_repl_sn
-(* Note: crux of the proof begins *)
- <list_append_rcons_sn
- @(stream_eq_trans โฆ (tr_compose_uni_dx_pap โฆ)) <tr_pap_succ_nap
- @tr_compose_eq_repl
- [ <nap_unwind2_rmap_append_closed_Lq_dx_depth //
- | /2 width=2 by tls_succ_unwind2_rmap_append_closed_Lq_dx/
- ]
-(* Note: crux of the proof ends *)
- | //
- | /2 width=2 by ex_intro/
- | //
- ]
-]
-qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "delayed_updating/syntax/path.ma".
+include "delayed_updating/notation/functions/power_2.ma".
+include "ground/arith/nat_succ_iter.ma".
+
+(* *)
+
+definition labels (l) (n:nat): path โ
+ ((list_lcons ? l)^n) (๐).
+
+interpretation
+ "labels (path)"
+ 'Power l n = (labels l n).
+
+(* Basic constructions ******************************************************)
+
+lemma labels_unfold (l) (n):
+ ((list_lcons ? l)^n) (๐) = lโโn.
+// qed.
+
+lemma labels_zero (l):
+ (๐) = lโโ๐.
+// qed.
+
+lemma labels_succ (l) (n):
+ (lโโn)โl = lโโ(โn).
+#l #n
+<labels_unfold <labels_unfold <niter_succ //
+qed.
+
+(* Basic inversions *********************************************************)
+
+lemma eq_inv_empty_labels (l) (n):
+ (๐) = lโโn โ ๐ = n.
+#l #n @(nat_ind_succ โฆ n) -n //
+#n #_ <labels_succ #H0 destruct
+qed-.