
theorem
  for P being _finite non _trivial Path-like _Graph, v being object
  for C being addAdjVertexAll of P,v,Endvertices P
  st not v in the_Vertices_of P holds C is simple Cycle-like
proof
  let P be _finite non _trivial Path-like _Graph, v be object;
  let C be addAdjVertexAll of P,v,Endvertices P;
  assume A1: not v in the_Vertices_of P;
  thus C is simple;
  card Endvertices P <> 0 by Th37;
  then Endvertices P <> {};
  hence C is connected;
  consider w1,w2 being Vertex of P such that
    A2: w1 <> w2 & Endvertices P = {w1,w2} by Th36;
  ex G3 being Component of P, w1, w2 being Vertex of G3
    st w1 in Endvertices P & w2 in Endvertices P & w1 <> w2
  proof
    reconsider G3 = P as Component of P by GLIB_002:30;
    reconsider w1,w2 as Vertex of G3;
    take G3,w1,w2;
    thus thesis by A2, TARSKI:def 2;
  end;
  hence C is non acyclic by A1, GLIB_007:71;
  now
    let u be Vertex of C;
    A3: w1 in Endvertices P & w2 in Endvertices P by A2, TARSKI:def 2;
    per cases;
    suppose u = w1;
      hence u.degree() = w1.degree() +` 1 by A1, A3, GLIBPRE0:57
        .= 1 +` 1 by A3, GLIB_000:def 52, GLIB_006:56
        .= 2;
    end;
    suppose u = w2;
      hence u.degree() = w2.degree() +` 1 by A1, A3, GLIBPRE0:57
        .= 1 +` 1 by A3, GLIB_000:def 52, GLIB_006:56
        .= 2;
    end;
    suppose u = v;
      hence u.degree() = card Endvertices P by A1, GLIBPRE0:55
        .= 2 by A2, CARD_2:57;
    end;
    suppose A4: u <> w1 & u <> w2 & u <> v;
      then A5: not u in Endvertices P by A2, TARSKI:def 2;
      A6: the_Vertices_of C = the_Vertices_of P \/ {v} by A1, GLIB_007:def 4;
      not u in {v} by A4, TARSKI:def 1;
      then reconsider u9 = u as Vertex of P by A6, XBOOLE_0:def 3;
      A7: u9 is non endvertex by A5, GLIB_006:56;
      thus u.degree() = u9.degree() by A5, GLIBPRE0:56
        .= 2 by A7, Th35;
    end;
  end;
  hence thesis by GLIB_016:def 4;
end;
