
theorem
  for G being _Graph, P being Path of G st P is open for a,e,b being set
  st not a in P.vertices() & b = P.first() & e Joins a,b,G holds
    G.walkOf(a,e,b).append(P) is Path-like
proof
  let G be _Graph, P be Path of G such that
A1: P is open;
  let a,e,b be set such that
A2: not a in P.vertices() and
A3: b = P.first() and
A4: e Joins a,b,G;
  set T = G.walkOf(a,e,b);
A5: T.last() = P.first() by A3,A4,GLIB_001:15;
  set J = T.append(P);
  3 in Seg 3 by FINSEQ_1:3;
  then 3 in Seg (len T) by A4,GLIB_001:14;
  then 3 in dom T by FINSEQ_1:def 3;
  then J.3 = T.3 by GLIB_001:32;
  then
A6: J.3 = T.last() by A4,GLIB_001:14;
  then
A7: J.3 = b by A4,GLIB_001:15;
A8: now
    let m,n be odd Nat such that
A9: m < n and
A10: n <= len J;
    assume
A11: J.m = J.n;
A12: 1 <= m by ABIAN:12;
    then 2*0+1 < n by A9,XXREAL_0:2;
    then
A13: 1+2 <= n by Th4;
    now
      assume m = 1;
      then J.m = J.first();
      then J.m = T.first() by A5,GLIB_001:30;
      then
A14:  not J.m in P.vertices() by A2,A4,GLIB_001:15;
      per cases by A13,XXREAL_0:1;
      suppose
        n=3;
        hence contradiction by A3,A7,A11,A14,GLIB_001:88;
      end;
      suppose
A15:    n > 3;
        then not n in Seg 3 by FINSEQ_1:1;
        then not n in Seg (len T) by A4,GLIB_001:14;
        then
A16:    not n in dom T by FINSEQ_1:def 3;
        1 <= n by A15,XXREAL_0:2;
        then n in dom J by A10,FINSEQ_3:25;
        then consider j being Element of NAT such that
A17:    j < len P and
A18:    n = len T + j by A16,GLIB_001:34;
        reconsider jj=j as even Nat by A18;
        reconsider j1=jj+1 as odd Nat;
        j+1 <= len P by A17,NAT_1:13;
        then P.j1 in P.vertices() by GLIB_001:87;
        hence contradiction by A5,A11,A14,A17,A18,GLIB_001:33;
      end;
    end;
    then 2*0+1 < m by A12,XXREAL_0:1;
    then
A19: 1+2 <= m by Th4;
    then 3 <= n by A9,XXREAL_0:2;
    then 1 <= n by XXREAL_0:2;
    then n in Seg (len J) by A10,FINSEQ_1:1;
    then
A20: n in dom J by FINSEQ_1:def 3;
    3 < n by A9,A19,XXREAL_0:2;
    then not n in Seg 3 by FINSEQ_1:1;
    then not n in Seg (len T) by A4,GLIB_001:14;
    then not n in dom T by FINSEQ_1:def 3;
    then consider j being Element of NAT such that
A21: j < len P and
A22: n = len T + j by A20,GLIB_001:34;
    reconsider jj=j as even Nat by A22;
    reconsider j1=jj+1 as odd Nat;
A23: j1 <= len P by A21,NAT_1:13;
    m < len J by A9,A10,XXREAL_0:2;
    then
A24: m in dom J by A12,FINSEQ_3:25;
A25: J.n = P.(j+1) by A5,A21,A22,GLIB_001:33;
    now
      assume m = 3;
      then
A26:  J.m = P.1 by A3,A4,A6,GLIB_001:15;
      0 <> j by A4,A9,A19,A22,GLIB_001:14;
      then 2*0+1 < j1 by XREAL_1:8;
      hence contradiction by A1,A11,A25,A23,A26,GLIB_001:147;
    end;
    then 3 < m by A19,XXREAL_0:1;
    then not m in Seg 3 by FINSEQ_1:1;
    then not m in Seg (len T) by A4,GLIB_001:14;
    then not m in dom T by FINSEQ_1:def 3;
    then consider k being Element of NAT such that
A27: k < len P and
A28: m = len T + k by A24,GLIB_001:34;
    reconsider kk=k as even Nat by A28;
    reconsider k1=kk+1 as odd Nat;
    k < j by A9,A22,A28,XREAL_1:7;
    then
A29: k1 < j1 by XREAL_1:8;
    J.m = P.(k+1) by A5,A27,A28,GLIB_001:33;
    hence contradiction by A1,A11,A25,A23,A29,GLIB_001:147;
  end;
  now
    let m,n be odd Element of NAT such that
A30: m <= len J and
A31: n <= len J;
    assume
A32: J.m = J.n;
    then
A33: not n < m by A8,A30;
    m >= n by A8,A31,A32;
    hence n = m by A33,XXREAL_0:1;
  end;
  hence thesis by GLIB_001:146;
end;
