
theorem
  for p being non empty Graph-yielding FinSequence
  st p.1 is non _trivial Path-like &
    for n being Element of dom p st n <= len p - 1
    ex v1,e,v2 being object st p.(n+1) is addAdjVertex of p.n,v1,e,v2 &
      (v1 in Endvertices(p.n) or v2 in Endvertices(p.n))
  holds p.len p is Path-like
proof
  let p be non empty Graph-yielding FinSequence;
  assume that
    A1: p.1 is non _trivial Path-like and
    A2: for n being Element of dom p st n <= len p - 1
      ex v1,e,v2 being object st p.(n+1) is addAdjVertex of p.n,v1,e,v2 &
        (v1 in Endvertices(p.n) or v2 in Endvertices(p.n));
  defpred P[Nat] means $1 <= len p - 1 implies p.($1+1) is Path-like _Graph;
  A3: P[0] by A1;
  A4: for n being Nat st P[n] holds P[n+1]
  proof
    let n be Nat;
    assume A5: P[n];
    assume A6: n+1 <= len p - 1;
    n+0 <= n+1 by XREAL_1:6;
    then reconsider G2 = p.(n+1) as Path-like _Graph by A5, A6, XXREAL_0:2;
    len p - 1 <= len p - 0 by XREAL_1:10;
    then A7: n+1 <= len p by A6, XXREAL_0:2;
    0+1 <= n+1 by XREAL_1:6;
    then reconsider n1 = n+1 as Element of dom p by A7, FINSEQ_3:25;
    consider v1,e,v2 being object such that
      A8: p.(n1+1) is addAdjVertex of p.n1,v1,e,v2 and
      A9: v1 in Endvertices(p.n1) or v2 in Endvertices(p.n1) by A2, A6;
    per cases by A9;
    suppose A10: v1 in Endvertices(p.n1);
      then reconsider v1 as Vertex of G2;
      v1 is endvertex by A10, GLIB_006:56;
      hence thesis by A8, Th18;
    end;
    suppose A11: v2 in Endvertices(p.n1);
      then reconsider v2 as Vertex of G2;
      v2 is endvertex by A11, GLIB_006:56;
      hence thesis by A8, Th19;
    end;
  end;
  A12: for n being Nat holds P[n] from NAT_1:sch 2(A3, A4);
  len p - 1 >= 1 - 1 by FINSEQ_1:20, XREAL_1:9;
  then len p - 1 in NAT by INT_1:3;
  then reconsider k = len p - 1 as Nat;
  P[k] by A12;
  hence thesis;
end;
