(**************************************************************************) (* ___ *) (* ||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/substitution/lift_length.ma". include "delayed_updating/notation/functions/black_downtriangle_1.ma". include "ground/relocation/tr_uni.ma". (* BASIC UNWIND FOR PATH ****************************************************) rec definition unwind1_path_pnat (n) (p) on n ā‰ match n with [ punit ā‡’ p | psucc m ā‡’ match p with [ list_empty ā‡’ šž | list_lcons l q ā‡’ match l with [ label_d n ā‡’ match q with [ list_empty ā‡’ lā——(unwind1_path_pnat m q) | list_lcons _ _ ā‡’ unwind1_path_pnat m (ā†‘[š®āØnā©]q) ] | label_m ā‡’ unwind1_path_pnat m q | label_L ā‡’ š—Ÿā——(unwind1_path_pnat m q) | label_A ā‡’ š—”ā——(unwind1_path_pnat m q) | label_S ā‡’ š—¦ā——(unwind1_path_pnat m q) ] ] ]. definition unwind1_path (p) ā‰ unwind1_path_pnat (ā†‘ā˜pā˜) p. interpretation "basic unwind (path)" 'BlackDownTriangle p = (unwind1_path p). (* Basic constructions ******************************************************) lemma unwind1_path_unfold (p): unwind1_path_pnat (ā†‘ā˜pā˜) p = ā–¼p. // qed-. lemma unwind1_path_empty: (šž) = ā–¼šž. // qed. lemma unwind1_path_d_empty (n): (š—±nā——šž) = ā–¼(š—±nā——šž). // qed. lemma unwind1_path_d_lcons (p) (l) (n:pnat): ā–¼(ā†‘[š®āØnā©](lā——p)) = ā–¼(š—±nā——lā——p). #p #l #n (list_length_inv_zero_sn ā€¦ H0) -p // | #k #IH * [ #H0 elim (eq_inv_nsucc_zero ā€¦ H0) | * [ #n ] #p #H0 lapply (eq_inv_nsucc_bi ā€¦ H0) -H0 [ cases p -p [ -IH | #l #p ] #H0 destruct //