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/substitution/fsubst_lift.ma".
18 include "delayed_updating/substitution/fsubst_eq.ma".
19 include "delayed_updating/substitution/lift_constructors.ma".
20 include "delayed_updating/substitution/lift_preterm_eq.ma".
21 include "delayed_updating/substitution/lift_structure_depth.ma".
22 include "delayed_updating/substitution/lift_depth.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 ************************************************)
30 lemma tr_uni_eq_repl (n1) (n2):
31 n1 = n2 → 𝐮❨n1❩ ≗ 𝐮❨n2❩.
34 axiom pippo (b) (q) (n):
36 ↑❘q❘+❘b❘= (↑[b●𝗟◗q]𝐢)@❨n+❘b❘❩.
38 lemma lift_rmap_tls_eq_id (p) (n):
41 #p @(list_ind_rcons … p) -p
42 [ #n <depth_empty #H destruct
44 [ <depth_d_dx <lift_rmap_pap_d_dx #H0
45 @(stream_eq_trans … (lift_rmap_tls_d_dx …))
46 @(stream_eq_trans … (IH …)) -IH //
48 | <depth_L_dx <lift_rmap_L_dx
49 cases n -n [| #n ] #H0
59 (* (↑❘q❘+❘b❘=↑[b●𝗟◗q]𝐢@❨n+❘b❘❩ *)
60 (* [↑[p]𝐢@❨n❩]⫯*[❘p❘]f∘⇂*[n]↑[p]𝐢) *)
61 lemma lift_rmap_tls_eq (f) (p) (n):
65 @(stream_eq_canc_dx … (stream_tls_eq_repl …))
66 [| @lift_rmap_decompose | skip ]
69 @(stream_eq_canc_dx) … (lift_rmap_decompose …))
71 lemma dfr_lift_bi (f) (p) (q) (t1) (t2): t1 ϵ 𝐓 →
72 t1 ➡𝐝𝐟[p,q] t2 → ↑[f]t1 ➡𝐟[⊗p,⊗q] ↑[f]t2.
73 #f #p #q #t1 #t2 #H0t1
74 * #b #n * #Hb #Hn #Ht1 #Ht2
75 @(ex1_2_intro … (⊗b) (↑❘⊗q❘)) @and4_intro
77 | #g <lift_rmap_structure <depth_structure
78 >tr_pushs_swap <tr_pap_pushs_le //
79 | lapply (in_comp_lift_bi f … Ht1) -Ht1 -H0t1 -Hb -Ht2
80 <lift_path_d_empty_dx //
81 | lapply (lift_term_eq_repl_dx f … Ht2) -Ht2 #Ht2
82 @(subset_eq_trans … Ht2) -t2
83 @(subset_eq_trans … (lift_fsubst …))
84 [ <lift_rmap_append <lift_rmap_A_sn (* <lift_rmap_append <lift_rmap_L_sn *)
85 <structure_append <structure_A_sn <structure_append <structure_L_sn
86 <depth_append <depth_L_sn <depth_structure <depth_structure
87 @fsubst_eq_repl [ // ]
88 @(subset_eq_trans … (lift_iref …))
89 @(subset_eq_canc_sn … (lift_term_eq_repl_dx …))
90 [ @lift_grafted_S /2 width=2 by ex_intro/ | skip ]
91 @(subset_eq_trans … (lift_term_after …))
92 @(subset_eq_canc_dx … (lift_term_after …))
93 @lift_term_eq_repl_sn -t1
94 @(stream_eq_trans … (tr_compose_uni_dx …))
95 lapply (Hn (𝐢)) -Hn >tr_id_unfold #Hn
96 lapply (pippo … b … Hn) -Hn #Hn
98 [ <lift_rmap_pap_le //
103 | /2 width=2 by ex_intro/