
theorem Th91: :: CPath03
  for G being _Graph, P being Path of G st
    P is open & P is chordless
  for m,n being odd Nat st m < n & n <= len P holds
    (ex e being object st e Joins P.m,P.n,G) iff m+2 = n
proof
  let G be _Graph, P be Path of G such that
A1: P is open and
A2: P is chordless;
A3: P is vertex-distinct by A1,Th32;
  let m,n be odd Nat such that
A4: m < n and
A5: n <= len P;
A6: m <= len P by A4,A5,XXREAL_0:2;
A7: m in NAT by ORDINAL1:def 12;
A8: n in NAT by ORDINAL1:def 12;
  then
A9: P.m <> P.n by A1,A4,A5,A7,GLIB_001:147;
  hereby
    assume
A10: ex e being object st e Joins P.m,P.n,G;
A11: now
      assume
A12:  m+2 < n;
      now
        let f be object;
        assume f in P.edges();
        then consider k being odd Element of NAT such that
A13:    k < len P and
A14:    P.(k+1) = f by GLIB_001:100;
A15:    f Joins P.k,P.(k+2),G by A13,A14,GLIB_001:def 3;
A16:    k+2 <= len P by A13,Th4;
        assume
A17:    f Joins P.m,P.n,G;
        per cases by A15,A17;
        suppose
A18:      P.m = P.k & P.n = P.(k+2);
          then m = k by A7,A3,A6,A13;
          hence contradiction by A5,A8,A3,A12,A16,A18;
        end;
        suppose
A19:      P.m = P.(k+2) & P.n = P.k;
          then
A20:      n = k by A5,A8,A3,A13;
          m = k+2*1 by A7,A3,A6,A16,A19;
          then
A21:      m > n by A20,XREAL_1:29;
          m+2 > m by XREAL_1:29;
          hence contradiction by A12,A21,XXREAL_0:2;
        end;
      end;
      hence contradiction by A2,A5,A9,A10,A12;
    end;
    m+2 <= n by A4,Th4;
    hence m+2 = n by A11,XXREAL_0:1;
  end;
  assume
A22: m+2 = n;
  take P.(m+1);
  m < len P by A4,A5,XXREAL_0:2;
  hence thesis by A7,A22,GLIB_001:def 3;
end;
