(* Constructions with proper condition for path *****************************)
-lemma lift_append_proper_dx (p2) (p1) (f): źp2 ā
+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_m_sn <IH //
| <lift_path_L_sn <IH //
| <lift_path_A_sn <IH //
| <lift_path_S_sn <IH //
#n #p #f <lift_append_proper_dx //
qed.
+lemma lift_m_dx (p) (f):
+ āp = ā[f](pāšŗ).
+#p #f <lift_append_proper_dx //
+qed.
+
lemma lift_L_dx (p) (f):
(āp)āš = ā[f](pāš).
#p #f <lift_append_proper_dx //
| <lift_path_d_lcons_sn #H
elim (IH ā¦ H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
/2 width=5 by ex4_2_intro/
+| <lift_path_m_sn #H
+ elim (IH ā¦ H) -IH -H #r #h #Hr #Hh #Hq #Hp destruct
+ /2 width=5 by ex4_2_intro/
+| <lift_path_L_sn #H destruct
+| <lift_path_A_sn #H destruct
+| <lift_path_S_sn #H destruct
+]
+qed-.
+
+lemma lift_path_inv_m_sn (q) (p) (f):
+ (šŗāq) = ā[f]p ā ā„.
+#q #p @(path_ind_lift ā¦ p) -p
+[| #n | #n #l #p |*: #p ] [|*: #IH ] #f
+[ <lift_path_empty #H destruct
+| <lift_path_d_empty_sn #H destruct
+| <lift_path_d_lcons_sn #H /2 width=2 by/
+| <lift_path_m_sn #H /2 width=2 by/
| <lift_path_L_sn #H destruct
| <lift_path_A_sn #H destruct
| <lift_path_S_sn #H destruct
| <lift_path_d_lcons_sn #H
elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
/2 width=5 by ex3_2_intro/
+| <lift_path_m_sn #H
+ elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+ /2 width=5 by ex3_2_intro/
| <lift_path_L_sn #H destruct -IH
/2 width=5 by ex3_2_intro/
| <lift_path_A_sn #H destruct
| <lift_path_d_lcons_sn #H
elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
/2 width=5 by ex3_2_intro/
+| <lift_path_m_sn #H
+ elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+ /2 width=5 by ex3_2_intro/
| <lift_path_L_sn #H destruct
| <lift_path_A_sn #H destruct -IH
/2 width=5 by ex3_2_intro/
| <lift_path_d_lcons_sn #H
elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
/2 width=5 by ex3_2_intro/
-| <lift_path_L_sn #H destruct
+| <lift_path_m_sn #H
+ elim (IH ā¦ H) -IH -H #r1 #r2 #Hr1 #Hq #Hp destruct
+ /2 width=5 by ex3_2_intro/| <lift_path_L_sn #H destruct
| <lift_path_A_sn #H destruct
| <lift_path_S_sn #H destruct -IH
/2 width=5 by ex3_2_intro/
(* Inversions with proper condition for path ********************************)
-lemma lift_inv_append_proper_dx (q2) (q1) (p) (f): źq2 ā
- q1āq2 = ā[f]p ā
+lemma lift_inv_append_proper_dx (q2) (q1) (p) (f):
+ q2 Ļµ š ā q1āq2 = ā[f]p ā
āāp1,p2. āp1 = q1 & ā[ā[p1]f]p2 = q2 & p1āp2 = p.
#q2 #q1 elim q1 -q1
[ #p #f #Hq2 <list_append_empty_sn #H destruct
[ elim (lift_path_inv_d_sn ā¦ H) -H #r1 #m1 #_ #_ #H0 #_ -IH
elim (eq_inv_list_empty_append ā¦ H0) -H0 #_ #H0 destruct
elim Hq2 -Hq2 //
+ | elim (lift_path_inv_m_sn ā¦ H)
| elim (lift_path_inv_L_sn ā¦ H) -H #r1 #s1 #Hr1 #Hs1 #H0 destruct
elim (IH ā¦ Hs1) -IH -Hs1 // -Hq2 #p1 #p2 #H1 #H2 #H3 destruct
@(ex3_2_intro ā¦ (r1āšāp1)) //