/2 width=2 by path_closed_structure_depth/
| lapply (in_comp_unwind2_path_term f … Ht1) -H0t1 -Hb -Hm -Ht2 -Ht1
<unwind2_path_d_dx <tr_pap_succ_nap >list_append_rcons_dx >list_append_assoc
- <unwind2_rmap_append_closed_Lq_dx_nap_depth //
+ <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 …))
<list_append_rcons_sn
@(stream_eq_trans … (tr_compose_uni_dx_pap …)) <tr_pap_succ_nap
@tr_compose_eq_repl
- [ <unwind2_rmap_append_closed_bLq_dx_nap_plus //
+ [ <nap_plus_unwind2_rmap_append_closed_bLq_dx_depth //
| >unwind2_rmap_A_dx
/2 width=2 by tls_succ_plus_unwind2_rmap_append_closed_bLq_dx/
]
--- /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/dbfr.ma".
+
+include "delayed_updating/substitution/fsubst_lift.ma".
+include "delayed_updating/substitution/fsubst_eq.ma".
+include "delayed_updating/substitution/lift_constructors.ma".
+include "delayed_updating/substitution/lift_path_structure.ma".
+include "delayed_updating/substitution/lift_path_closed.ma".
+include "delayed_updating/substitution/lift_rmap_closed.ma".
+
+(* DELAYED BALANCED FOCUSED REDUCTION ***************************************)
+
+(* Constructions with lift **************************************************)
+
+theorem dbfr_lift_bi (f) (t1) (t2) (r):
+ t1 ➡𝐝𝐛𝐟[r] t2 → 🠡[f]t1 ➡𝐝𝐛𝐟[🠡[f]r] 🠡[f]t2.
+#f #t1 #t2 #r
+* #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct
+@(ex6_5_intro … (🠡[f]p) (🠡[🠢[f](p◖𝗔)]b) (🠡[🠢[f](p◖𝗔●b◖𝗟)]q) (🠢[f](p●𝗔◗b)@❨m❩) (🠢[f](p●𝗔◗b●𝗟◗q)@§❨n❩))
+[ -Hb -Hm -Hn -Ht1 -Ht2 //
+| -Hm -Hn -Ht1 -Ht2 //
+| -Hb -Hn -Ht1 -Ht2
+ /2 width=1 by lift_path_closed/
+| -Hb -Hm -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 …))
+ <list_append_rcons_sn <list_append_rcons_sn >list_append_assoc
+ >(nap_plus_lift_rmap_append_closed_Lq_dx … Hn)
+ @iref_eq_repl
+ @(subset_eq_canc_sn … (lift_term_grafted_S …))
+ @lift_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+ >lift_rmap_A_dx
+ /2 width=2 by tls_succ_plus_lift_rmap_append_closed_bLq_dx/
+(* Note: crux of the proof ends *)
+]
+qed.
/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
- <unwind2_rmap_append_closed_Lq_dx_nap_depth //
+ <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 …))
<list_append_rcons_sn
@(stream_eq_trans … (tr_compose_uni_dx_pap …)) <tr_pap_succ_nap
@tr_compose_eq_repl
- [ <unwind2_rmap_append_closed_Lq_dx_nap_depth //
+ [ <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 *)
@(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_L_closed_dx/
+ /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/ibfr.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_structure.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 BALANCED FOCUSED REDUCTION *************************************)
+
+(* Constructions with lift **************************************************)
+
+theorem ibfr_lift_bi (f) (t1) (t2) (r):
+ t1 ➡𝐢𝐛𝐟[r] t2 → 🠡[f]t1 ➡𝐢𝐛𝐟[🠡[f]r] 🠡[f]t2.
+#f #t1 #t2 #r
+* #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct
+@(ex6_5_intro … (🠡[f]p) (🠡[🠢[f](p◖𝗔)]b) (🠡[🠢[f](p◖𝗔●b◖𝗟)]q) (🠢[f](p●𝗔◗b)@❨m❩) (🠢[f](p●𝗔◗b●𝗟◗q)@§❨n❩))
+[ -Hb -Hm -Hn -Ht1 -Ht2 //
+| -Hm -Hn -Ht1 -Ht2 //
+| -Hb -Hn -Ht1 -Ht2
+ /2 width=1 by lift_path_closed/
+| -Hb -Hm -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
+ [ <list_append_rcons_sn <list_append_rcons_sn >list_append_assoc
+ >(nap_plus_lift_rmap_append_closed_Lq_dx … Hn) -Hn //
+ | >lift_rmap_A_dx >nsucc_unfold
+ /2 width=2 by tls_succ_plus_lift_rmap_append_closed_bLq_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/ibfr.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 BALANCED FOCUSED REDUCTION *************************************)
+
+(* Constructions with unwind2 ***********************************************)
+
+lemma ibfr_unwind_bi (f) (t1) (t2) (r):
+ t1 ϵ 𝐓 → r ϵ 𝐈 →
+ t1 ➡𝐢𝐛𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐛𝐟[⊗r] ▼[f]t2.
+#f #t1 #t2 #r #H1t1 #H2r
+* #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct
+@(ex6_5_intro … (⊗p) (⊗b) (⊗q) (♭b) (♭q))
+[ -H1t1 -H2r -Hb -Hm -Hn -Ht1 -Ht2 //
+| -H1t1 -H2r -Hm -Hn -Ht1 -Ht2 //
+| -H1t1 -H2r -Hb -Hn -Ht1 -Ht2
+ /2 width=2 by path_closed_structure_depth/
+| -H1t1 -H2r -Hb -Hm -Ht1 -Ht2
+ /2 width=2 by path_closed_structure_depth/
+| lapply (in_comp_unwind2_path_term f … Ht1) -Ht2 -Ht1 -H1t1 -H2r -Hb
+ <unwind2_path_d_dx <tr_pap_succ_nap <list_append_rcons_sn >list_append_assoc
+ <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_plus_unwind2_rmap_append_closed_bLq_dx_depth //
+ | >unwind2_rmap_A_dx
+ /2 width=2 by tls_succ_plus_unwind2_rmap_append_closed_bLq_dx/
+ ]
+(* Note: crux of the proof ends *)
+ | //
+ | /2 width=2 by ex_intro/
+ | //
+ ]
+]
+qed.
(* 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_L_closed_dx/
+ /2 width=2 by tls_succ_lift_rmap_append_closed_Lq_dx/
(* Note: crux of the proof ends *)
]
qed.
/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
- <unwind2_rmap_append_closed_Lq_dx_nap_depth //
+ <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 …))
<list_append_rcons_sn
@(stream_eq_trans … (tr_compose_uni_dx_pap …)) <tr_pap_succ_nap
@tr_compose_eq_repl
- [ <unwind2_rmap_append_closed_Lq_dx_nap_depth //
+ [ <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 *)
include "delayed_updating/substitution/lift_rmap_eq.ma".
include "delayed_updating/syntax/path_closed.ma".
+include "ground/relocation/xap.ma".
include "ground/lib/stream_eq_eq.ma".
(* LIFT MAP FOR PATH ********************************************************)
q ϵ 𝐂❨o,n❩ →
∀m. ⇂*[m]f ≗ ⇂*[m+n]🠢[f]q.
#o #f #q #n #Hq elim Hq -q -n //
-#q #n #_ #IH #m
-<nplus_succ_dx <stream_tls_swap //
qed-.
lemma tls_lift_rmap_closed (o) (f) (q) (n):
/2 width=2 by tls_plus_lift_rmap_closed/
qed-.
-lemma tls_succ_lift_rmap_append_L_closed_dx (o) (f) (p) (q) (n):
+lemma tls_lift_rmap_append_closed_dx (o) (f) (p) (q) (n):
+ q ϵ 𝐂❨o,n❩ →
+ 🠢[f]p ≗ ⇂*[n]🠢[f](p●q).
+#o #f #p #q #n #Hq
+/2 width=2 by tls_lift_rmap_closed/
+qed-.
+
+lemma tls_succ_lift_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
q ϵ 𝐂❨o,n❩ →
🠢[f]p ≗ ⇂*[↑n]🠢[f](p●𝗟◗q).
#o #f #p #q #n #Hq
-/3 width=2 by tls_lift_rmap_closed, pcc_L_sn/
+/3 width=2 by tls_lift_rmap_append_closed_dx, pcc_L_sn/
+qed-.
+
+lemma tls_succ_plus_lift_rmap_append_closed_bLq_dx (o1) (o2) (f) (p) (b) (q) (m) (n):
+ b ϵ 𝐂❨o1,m❩ → q ϵ 𝐂❨o2,n❩ →
+ 🠢[f]p ≗ ⇂*[↑(m+n)]🠢[f](p●b●𝗟◗q).
+#o1 #o2 #f #p #b #q #m #n #Hm #Hn
+>nplus_succ_dx <stream_tls_plus
+@(stream_eq_trans … (tls_lift_rmap_append_closed_dx … Hm))
+/3 width=2 by stream_tls_eq_repl, tls_succ_lift_rmap_append_closed_Lq_dx/
+qed-.
+
+lemma nap_plus_lift_rmap_append_closed_Lq_dx (o) (f) (p) (q) (m) (n):
+ q ϵ 𝐂❨o,n❩ →
+ 🠢[f](p)@❨m❩+🠢[f](p●𝗟◗q)@§❨n❩ = 🠢[f](p●𝗟◗q)@§❨m+n❩.
+#o #f #p #q #m #n #Hq
+/4 width=2 by eq_f2, tr_xap_eq_repl, tls_succ_lift_rmap_append_closed_Lq_dx/
qed-.
(* Destructions with cpp ****************************************************)
-lemma unwind2_rmap_append_closed_dx_xap_le (o) (f) (p) (q) (n):
+lemma xap_le_unwind2_rmap_append_closed_dx (o) (f) (p) (q) (n):
q ϵ 𝐂❨o,n❩ → ∀m. m ≤ n →
▶[f]q@❨m❩ = ▶[f](p●q)@❨m❩.
#o #f #p #q #n #Hq elim Hq -q -n
]
qed-.
-lemma unwind2_rmap_append_closed_Lq_dx_nap (o) (f) (p) (q) (n):
+lemma nap_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
q ϵ 𝐂❨o,n❩ →
▶[f](𝗟◗q)@§❨n❩ = ▶[f](p●𝗟◗q)@§❨n❩.
#o #f #p #q #n #Hq
lapply (pcc_L_sn … Hq) -Hq #Hq
-lapply (unwind2_rmap_append_closed_dx_xap_le o f p … Hq (↑n) ?) -Hq //
+lapply (xap_le_unwind2_rmap_append_closed_dx o f p … Hq (↑n) ?) -Hq //
<tr_xap_succ_nap <tr_xap_succ_nap #Hq
/2 width=1 by eq_inv_nsucc_bi/
qed-.
-lemma unwind2_rmap_push_closed_nap (o) (f) (q) (n):
+lemma nap_unwind2_rmap_push_closed_depth (o) (f) (q) (n):
q ϵ 𝐂❨o,n❩ →
♭q = ▶[⫯f]q@§❨n❩.
#o #f #q #n #Hq elim Hq -q -n
<unwind2_rmap_d_dx <tr_compose_nap //
qed-.
-lemma unwind2_rmap_append_closed_Lq_dx_nap_depth (o) (f) (p) (q) (n):
+lemma nap_unwind2_rmap_append_closed_Lq_dx_depth (o) (f) (p) (q) (n):
q ϵ 𝐂❨o,n❩ →
♭q = ▶[f](p●𝗟◗q)@§❨n❩.
#o #f #p #q #n #Hq
-<unwind2_rmap_append_closed_Lq_dx_nap //
-/2 width=2 by unwind2_rmap_push_closed_nap/
+<nap_unwind2_rmap_append_closed_Lq_dx //
+/2 width=2 by nap_unwind2_rmap_push_closed_depth/
qed-.
-lemma unwind2_rmap_append_closed_true_dx_xap_depth (f) (p) (q) (n):
+lemma xap_unwind2_rmap_append_closed_true_dx_depth (f) (p) (q) (n):
q ϵ 𝐂❨Ⓣ,n❩ → ♭q = ▶[f](p●q)@❨n❩.
#f #p #q #n #Hq elim Hq -q -n //
#q #n #k #Ho #_ #IH
/2 width=1 by tls_plus_unwind2_rmap_closed_true/
qed-.
-lemma unwind2_rmap_append_closed_Lq_dx_nap_plus (o) (f) (p) (q) (m) (n):
+lemma nap_plus_unwind2_rmap_append_closed_Lq_dx_depth (o) (f) (p) (q) (m) (n):
q ϵ 𝐂❨o,n❩ →
▶[f]p@❨m❩+♭q = ▶[f](p●𝗟◗q)@§❨m+n❩.
#o #f #p #q #m #n #Hq
<tr_nap_plus @eq_f2
[ <(tr_xap_eq_repl … (tls_succ_unwind2_rmap_append_closed_Lq_dx …)) //
-| /2 width=2 by unwind2_rmap_append_closed_Lq_dx_nap_depth/
+| /2 width=2 by nap_unwind2_rmap_append_closed_Lq_dx_depth/
]
qed-.
-lemma unwind2_rmap_append_closed_bLq_dx_nap_plus (o) (f) (p) (b) (q) (m) (n):
+lemma nap_plus_unwind2_rmap_append_closed_bLq_dx_depth (o) (f) (p) (b) (q) (m) (n):
b ϵ 𝐂❨Ⓣ,m❩ → q ϵ 𝐂❨o,n❩ →
♭b+♭q = ▶[f](p●b●𝗟◗q)@§❨m+n❩.
#o #f #p #b #q #m #n #Hb #Hq
->(unwind2_rmap_append_closed_true_dx_xap_depth f p … Hb) -Hb
->(unwind2_rmap_append_closed_Lq_dx_nap_plus … Hq) -Hq //
+>(xap_unwind2_rmap_append_closed_true_dx_depth f p … Hb) -Hb
+>(nap_plus_unwind2_rmap_append_closed_Lq_dx_depth … Hq) -Hq //
qed-.
lemma tls_succ_plus_unwind2_rmap_append_closed_bLq_dx (o) (f) (p) (b) (q) (m) (n):
b ϵ 𝐂❨Ⓣ,m❩ → q ϵ 𝐂❨o,n❩ →
▶[f]p ≗ ⇂*[↑(m+n)]▶[f](p●b●𝗟◗q).
#o #f #p #b #q #m #n #Hb #Hq
->nplus_succ_dx <stream_tls_plus
+>nplus_succ_dx <stream_tls_plus >list_append_assoc
@(stream_eq_trans … (tls_unwind2_rmap_append_closed_true_dx … Hb)) -Hb
-@stream_tls_eq_repl
-@(stream_eq_trans … (tls_succ_unwind2_rmap_append_closed_Lq_dx … Hq)) -Hq //
+/3 width=2 by stream_tls_eq_repl, tls_succ_unwind2_rmap_append_closed_Lq_dx/
qed-.