1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "delayed_updating/reduction/dfr.ma".
16 include "delayed_updating/reduction/ifr.ma".
17 include "delayed_updating/unwind1/unwind_fsubst.ma".
18 include "delayed_updating/unwind1/unwind_constructors.ma".
19 include "delayed_updating/unwind1/unwind_preterm_eq.ma".
20 include "delayed_updating/unwind1/unwind_structure_depth.ma".
21 include "delayed_updating/unwind1/unwind_depth.ma".
22 include "delayed_updating/substitution/fsubst_eq.ma".
23 include "delayed_updating/syntax/prototerm_proper_constructors.ma".
24 include "delayed_updating/syntax/path_structure_depth.ma".
25 include "ground/relocation/tr_uni_compose.ma".
26 include "ground/relocation/tr_pap_pushs.ma".
28 (* DELAYED FOCUSED REDUCTION ************************************************)
31 axiom pippo (b) (q) (n):
33 ↑❘q❘+❘b❘= (↑[b●𝗟◗q]𝐢)@❨n+❘b❘❩.
35 lemma unwind_rmap_tls_eq_id (p) (n):
38 #p @(list_ind_rcons … p) -p
39 [ #n <depth_empty #H destruct
41 [ <depth_d_dx <unwind_rmap_pap_d_dx #H0
42 @(stream_eq_trans … (unwind_rmap_tls_d_dx …))
43 @(stream_eq_trans … (IH …)) -IH //
45 | <depth_L_dx <unwind_rmap_L_dx
46 cases n -n [| #n ] #H0
56 (* (↑❘q❘+❘b❘=↑[b●𝗟◗q]𝐢@❨n+❘b❘❩ *)
57 (* [↑[p]𝐢@❨n❩]⫯*[❘p❘]f∘⇂*[n]↑[p]𝐢) *)
58 lemma unwind_rmap_tls_eq (f) (p) (n):
62 @(stream_eq_canc_dx … (stream_tls_eq_repl …))
63 [| @unwind_rmap_decompose | skip ]
66 @(stream_eq_canc_dx) … (unwind_rmap_decompose …))
69 lemma dfr_unwind_id_bi (p) (q) (t1) (t2): t1 ϵ 𝐓 →
70 t1 ➡𝐝𝐟[p,q] t2 → ▼[𝐢]t1 ➡𝐟[⊗p,⊗q] ▼[𝐢]t2.
72 * #b #n * #Hb #Hn #Ht1 #Ht2
73 @(ex1_2_intro … (⊗b) (↑❘⊗q❘)) @and4_intro
76 | lapply (in_comp_unwind_bi (𝐢) … Ht1) -Ht1 -H0t1 -Hb -Ht2
77 <unwind_path_d_empty_dx <depth_structure //
78 | lapply (unwind_term_eq_repl_dx (𝐢) … Ht2) -Ht2 #Ht2
79 @(subset_eq_trans … Ht2) -t2
80 @(subset_eq_trans … (unwind_fsubst …))
81 [ (*<unwind_rmap_append <unwind_rmap_A_sn <unwind_rmap_append <unwind_rmap_L_sn *)
82 <structure_append <structure_A_sn <structure_append <structure_L_sn
83 <depth_append <depth_L_sn <depth_structure <depth_structure
84 @fsubst_eq_repl [ // ]
85 @(subset_eq_trans … (unwind_iref …))
87 @(subset_eq_canc_sn … (unwind_term_eq_repl_dx …))
88 [ @unwind_grafted_S /2 width=2 by ex_intro/ | skip ]
90 @(subset_eq_trans … (unwind_term_after …))
91 @(subset_eq_canc_dx … (unwind_term_after …))
92 @unwind_term_eq_repl_sn -t1
93 @(stream_eq_trans … (tr_compose_uni_dx …))
94 lapply (Hn (𝐢)) -Hn >tr_id_unfold #Hn
95 lapply (pippo … b … Hn) -Hn #Hn
97 [ <unwind_rmap_pap_le //
103 | /2 width=2 by ex_intro/
109 Hn : ↑❘q❘ = ↑[p●𝗔◗b●𝗟◗q]𝐢@❨n❩
110 ---------------------------
111 ↑[𝐮❨↑❘q❘+❘b❘❩] ↑[↑[p]𝐢] t ⇔ ↑[𝐮❨↑[p●𝗔◗b●𝗟◗q]𝐢@❨n+❘b❘❩❩] t