--- /dev/null
+(* Constructions with path_append *******************************************)
+
+lemma ppc_append_sn (p2) (p1): Ꝕp2 → Ꝕ(p1●p2).
+#p2 * /2 width=3 by ppc_lcons/
+qed.
+
+lemma ppc_append_dx (p1) (p2): Ꝕp1 → Ꝕ(p1●p2).
+#p1 #p2 #Hp1
+elim (ppc_inv_lcons … Hp1) -Hp1 #l #q1 #H destruct
+/2 width=3 by ppc_lcons/
+qed.
+
+(* Constructions with path_rcons ********************************************)
+
+lemma ppc_rcons (q) (l): Ꝕ(q◖l).
+/2 width=1 by ppc_lcons, ppc_append_sn/
+qed.
(* *)
(**************************************************************************)
-include "delayed_updating/syntax/path_structure.ma".
include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/syntax/path_structure.ma".
+include "delayed_updating/syntax/path_proper.ma".
(* LIFT FOR PATH ***********************************************************)
-(* Constructions with structure ********************************************)
+(* Basic constructions with structure **************************************)
+
+lemma structure_lift (p) (f):
+ ⊗p = ⊗↑[f]p.
+#p @(path_ind_lift … p) -p // #p #IH #f
+<lift_path_L_sn //
+qed.
+
+lemma lift_structure (p) (f):
+ ⊗p = ↑[f]⊗p.
+#p @(path_ind_lift … p) -p //
+qed.
+
+(* Properties with proper condition for path ********************************)
+
+lemma lift_append_proper_dx (p2) (p1) (f): Ꝕp2 →
+ (⊗p1)●(↑[↑[p1]f]p2) = ↑[f](p1●p2).
+#p2 #p1 @(path_ind_lift … p1) -p1 //
+[ #n | #n #l #p1 |*: #p1 ] #IH #f #Hp2
+[ elim (ppc_inv_lcons … Hp2) -Hp2 #l #q #H destruct //
+| <lift_path_d_lcons_sn <IH //
+| <lift_path_L_sn <IH //
+| <lift_path_A_sn <IH //
+| <lift_path_S_sn <IH //
+]
+qed-.
+
+(* Advanced constructions with structure ************************************)
lemma lift_d_empty_dx (n) (p) (f):
(⊗p)◖𝗱((↑[p]f)@❨n❩) = ↑[f](p◖𝗱n).
-#n #p @(path_ind_lift … p) -p // [ #m #l #p |*: #p ] #IH #f
-[ <lift_rmap_d_sn <lift_path_d_lcons_sn //
-| <lift_rmap_L_sn <lift_path_L_sn <IH //
-| <lift_rmap_A_sn <lift_path_A_sn <IH //
-| <lift_rmap_S_sn <lift_path_S_sn <IH //
-]
+/3 width=3 by ppc_lcons, lift_append_proper_dx/
qed.
lemma lift_L_dx (p) (f):
(⊗p)◖𝗟 = ↑[f](p◖𝗟).
-#p @(path_ind_lift … p) -p // #m #l #p #IH #f
-<lift_path_d_lcons_sn //
+/3 width=3 by ppc_lcons, lift_append_proper_dx/
qed.
lemma lift_A_dx (p) (f):
(⊗p)◖𝗔 = ↑[f](p◖𝗔).
-#p @(path_ind_lift … p) -p // #m #l #p #IH #f
-<lift_path_d_lcons_sn //
+/3 width=3 by ppc_lcons, lift_append_proper_dx/
qed.
lemma lift_S_dx (p) (f):
(⊗p)◖𝗦 = ↑[f](p◖𝗦).
-#p @(path_ind_lift … p) -p // #m #l #p #IH #f
-<lift_path_d_lcons_sn //
-qed.
-
-lemma structure_lift (p) (f):
- ⊗p = ⊗↑[f]p.
-#p @(path_ind_lift … p) -p // #p #IH #f
-<lift_path_L_sn //
-qed.
-
-lemma lift_structure (p) (f):
- ⊗p = ↑[f]⊗p.
-#p @(path_ind_lift … p) -p //
+/3 width=3 by ppc_lcons, lift_append_proper_dx/
qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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/syntax/path.ma".
+include "delayed_updating/notation/relations/predicate_p_tail_1.ma".
+include "ground/xoa/ex_1_2.ma".
+
+(* PROPER CONDITION FOR PATH ************************************************)
+
+definition ppc: predicate path ≝
+ λp. 𝐞 = p → ⊥
+.
+
+interpretation
+ "proper condition (path)"
+ 'PredicatePTail p = (ppc p).
+
+(* Basic constructions ******************************************************)
+
+lemma ppc_lcons (l) (q): Ꝕ(l◗q).
+#l #p #H destruct
+qed.
+
+(* Basic inversions ********************************************************)
+
+lemma ppc_inv_lcons (p):
+ Ꝕp → ∃∃l,q. l◗q = p.
+*
+[ #H elim H -H //
+| #l #q #_ /2 width=3 by ex1_2_intro/
+]
+qed-.