reserve p, q for FinSequence,
  X, Y, x, y, e for set,
  D for non empty set,
  i, j, k, l, m, n, r for Nat;
reserve G for Graph;
reserve v, v1, v2, v3, v4 for Element of G;
reserve vs, vs1, vs2 for FinSequence of the carrier of G,
  c, c1, c2 for Chain of G;
reserve sc for simple Chain of G;

theorem
  2<len sc implies sc is Path of G
proof
  assume
A1: 2 < len sc;
  assume not sc is Path of G;
  then consider m, n such that
A2: 1<=m and
A3: m<n and
A4: n<=len sc and
A5: sc.m = sc.n by GRAPH_1:def 16;
  consider vs such that
A6: vs is_vertex_seq_of sc and
A7: for n, m st 1<=n & n<m & m<=len vs & vs.n=vs.m holds n=1 & m=len vs
  by Def9;
A8: len vs = len sc + 1 by A6;
  then
A9: n+1<=len vs by A4,XREAL_1:6;
  set v29 = vs/.(n+1);
  set v19 = vs/.n;
A10: 1<=n by A2,A3,XXREAL_0:2;
  then
A11: sc.n joins v19, v29 by A4,A6;
A12: n<=len vs by A4,A8,NAT_1:12;
  then
A13: v19=vs.n by A10,FINSEQ_4:15;
  set v1 = vs/.m;
  set v2 = vs/.(m+1);
  m<=len sc by A3,A4,XXREAL_0:2;
  then
A14: sc.m joins v1, v2 by A2,A6;
A15: n+1<=len vs by A4,A8,XREAL_1:6;
  then
A16: v29=vs.(n+1) by FINSEQ_4:15,NAT_1:12;
A17: m+1<n+1 by A3,XREAL_1:6;
  then
A18: m<n+1 by NAT_1:12;
  then m<=len vs by A15,XXREAL_0:2;
  then
A19: v1=vs.m by A2,FINSEQ_4:15;
  m+1<=len vs by A17,A15,XXREAL_0:2;
  then
A20: v2=vs.(m+1) by FINSEQ_4:15,NAT_1:12;
  per cases by A5,A14,A11;
  suppose
A21: v1=v19 & v2=v29;
    then m=1 by A2,A3,A7,A12,A19,A13;
    hence contradiction by A7,A17,A15,A20,A16,A21;
  end;
  suppose
A22: v1=v29 & v2=v19;
    then
A23: n+1=len vs by A2,A7,A18,A9,A19,A16;
    m=1 by A2,A7,A18,A9,A19,A16,A22;
    hence contradiction by A1,A7,A8,A12,A20,A13,A22,A23;
  end;
end;
