
theorem Th39: :: TopPath03
  for G being _Graph, W being Walk of G st W is minlength holds
  for m,n being odd Nat st m+2 < n & n <= len W holds
  not ex e being object st e Joins W.m,W.n,G
proof
  let G be _Graph;
  let P be Walk of G such that
A1: P is minlength;
  let m,n be odd Nat such that
A2: m+2 < n and
A3: n <= len P;
A4: len P - n + (m + 2) < len P - n + n by A2,XREAL_1:8;
  m+0 <= m+2 by XREAL_1:7;
  then m <= n by A2,XXREAL_0:2;
  then
A5: m <= len P by A3,XXREAL_0:2;
  set P3 = P.cut(n,len P);
A6: n in NAT by ORDINAL1:def 12;
  then
A7: P3.last() = P.last() by A3,GLIB_001:37;
  set P1 = P.cut(1,m);
  let e be object such that
A8: e Joins P.m,P.n,G;
  set P2 = P1.addEdge(e);
  set P4 = P2.append(P3);
A9: 2*0+1 <= m by ABIAN:12;
A10: m in NAT by ORDINAL1:def 12;
  then
A11: len P1 + 1 = m + 1 by A9,A5,GLIB_001:36;
A12: P1.last() = P.m by A10,A9,A5,GLIB_001:37;
  then
A13: P2.last() = P.n by A8,GLIB_001:63;
  P1.first() = P.first() by A10,A9,A5,GLIB_001:37;
  then
A14: P2.first() = P.first() by A8,A12,GLIB_001:63;
  P3.first() = P.n by A3,A6,GLIB_001:37;
  then
A15: P4 is_Walk_from P.first(),P.last() by A14,A13,A7,GLIB_001:30;
  P3.first() = P.n by A3,A6,GLIB_001:37;
  then
A16: len P4 + 1 = len P2 + len P3 by A13,GLIB_001:28;
  P1.last() = P.m by A10,A9,A5,GLIB_001:37;
  then
A17: len P2 = m + 2 by A8,A11,GLIB_001:64;
  len P3 + n = len P+1 by A3,A6,GLIB_001:36;
  hence contradiction by A1,A17,A15,A16,A4;
end;
