(**************************************************************************) (* ___ *) (* ||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_labels.ma". include "delayed_updating/unwind/unwind2_rmap_eq.ma". include "delayed_updating/syntax/path_head_depth.ma". include "ground/relocation/xap.ma". include "ground/lib/stream_eq_eq.ma". include "ground/arith/nat_le_plus.ma". (* TAILED UNWIND FOR RELOCATION MAP *****************************************) (* Constructions with path_head *********************************************) lemma unwind2_rmap_head_xap_le_closed (f) (p) (q) (n) (m): q = ↳[n]q → m ≤ n → ▶[f](p●q)@❨m❩ = ▶[f]↳[n](p●q)@❨m❩. #f #p #q elim q -q [ #n #m #Hq <(eq_inv_path_empty_head … Hq) -n #Hm <(nle_inv_zero_dx … Hm) -m // | #l #q #IH #n @(nat_ind_succ … n) -n [ #m #_ #Hm <(nle_inv_zero_dx … Hm) -m -IH // | #n #_ #m cases l [ #k ] [ IH -IH tr_xap_ninj >(path_head_refl_append_sn p … Hh) in ⊢ (??%?); >(unwind2_rmap_head_xap_closed … Hh) -Hh nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn