
theorem Th20:
  for G being _Graph for P1, P2 being Path of G st P1.last() = P2
.first() & P2.last() = P1.first() & P1 is open & P2 is open & P1.edges() misses
P2.edges() & P1.vertices() /\ P2.vertices() = {P1.last(), P1.first()} holds P1
  .append(P2) is Cycle-like
proof
  let G be _Graph, P1, P2 be Path of G such that
A1: P1.last() = P2.first() and
A2: P2.last() = P1.first() and
A3: P1 is open and
A4: P2 is open & P1.edges() misses P2.edges() & P1.vertices() /\ P2
  .vertices() = {P1.last(), P1.first()};
  set P = P1.append(P2);
  P.first() = P1.first() & P.last() = P2.last() by A1,GLIB_001:30;
  hence P is closed by A2;
  thus P is Path-like by A1,A2,A3,A4,Th18;
  P1.first() <> P1.last() by A3;
  then P1 is non trivial by GLIB_001:127;
  then
A5: len P1 >= 3 by GLIB_001:125;
  len P >= len P1 by A1,GLIB_001:29;
  then len P >= 3 by A5,XXREAL_0:2;
  hence thesis by GLIB_001:125;
end;
