(**************************************************************************) (* ___ *) (* ||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_lcons_alt // >unwind_append_rcons_sn // unwind_lcons_alt >unwind_append_rcons_sn // unwind_lcons_alt >unwind_append_rcons_sn // unwind_lcons_alt (unwind_path_eq_repl … (tr_compose_assoc …)) // | 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 nrplus_inj_dx /2 width=1 by tr_tls_compose_uni_dx/ qed.