let P be _finite non _trivial Path-like _Graph; for v1, v2 being Element of Endvertices P
for e being object
for C being addEdge of P,v1,e,v2 st v1 <> v2 & not e in the_Edges_of P holds
C is Cycle-like
let v1, v2 be Element of Endvertices P; for e being object
for C being addEdge of P,v1,e,v2 st v1 <> v2 & not e in the_Edges_of P holds
C is Cycle-like
let e be object ; for C being addEdge of P,v1,e,v2 st v1 <> v2 & not e in the_Edges_of P holds
C is Cycle-like
let C be addEdge of P,v1,e,v2; ( v1 <> v2 & not e in the_Edges_of P implies C is Cycle-like )
assume A1:
( v1 <> v2 & not e in the_Edges_of P )
; C is Cycle-like
A2:
card (Endvertices P) = 2
by Th37;
then A3:
Endvertices P <> {}
;
then reconsider v1 = v1, v2 = v2 as Vertex of P by TARSKI:def 3;
A4:
C is addEdge of P,v1,e,v2
;
A5:
( v1 is endvertex & v2 is endvertex )
by A3, GLIB_006:56;
now for v being Vertex of C holds v .degree() = 2let v be
Vertex of
C;
b1 .degree() = 2reconsider w =
v as
Vertex of
P by A4, GLIB_006:102;
per cases
( ( w <> v1 & w <> v2 ) or w = v1 or w = v2 )
;
suppose A6:
(
w <> v1 &
w <> v2 )
;
b1 .degree() = 2A7:
not
w is
endvertex
proof
assume
w is
endvertex
;
contradiction
then
(
w in Endvertices P &
v1 in Endvertices P &
v2 in Endvertices P )
by A3, GLIB_006:def 8;
then
card {w,v1,v2} c= card (Endvertices P)
by NOMIN_2:1, CARD_1:11;
then
3
c= card (Endvertices P)
by A1, A6, CARD_2:58;
then A8:
{0,1,2} c= 2
by Th37, CARD_1:51;
2
in {0,1,2}
by ENUMSET1:def 1;
then
2
in 2
by A8;
hence
contradiction
;
verum
end; thus v .degree() =
w .degree()
by A6, GLIBPRE0:46
.=
2
by A7, Th35
;
verum end; end; end;
then A9:
C is 2 -regular
by GLIB_016:def 4;
A10:
e DJoins v1,v2,C
by A1, GLIB_006:105;
now ex C0 being Walk of C st C0 is Cycle-like consider P0 being
vertex-distinct Path of
P such that
(
P0 .vertices() = the_Vertices_of P &
P0 .edges() = the_Edges_of P )
and A11:
(
Endvertices P = {(P0 .first()),(P0 .last())} iff not
P is
_trivial )
and A12:
(
P0 is
trivial iff
P is
_trivial )
and A13:
(
P0 is
closed iff
P is
_trivial )
and
P0 is
minlength
by Th31;
reconsider P9 =
P0 as
Walk of
C by GLIB_006:75;
take C0 =
P9 .addEdge e;
b1 is Cycle-like A14:
e Joins P9 .last() ,
P9 .first() ,
C
3
<= len P9
by A12, GLIB_001:125;
per cases then
( 3 < len P9 or 3 = len P9 )
by XXREAL_0:1;
suppose A17:
3
= len P9
;
b1 is Cycle-like then consider e0 being
object such that A18:
e0 Joins P0 .first() ,
P0 .last() ,
P
and A19:
P0 = P .walkOf (
(P0 .first()),
e0,
(P0 .last()))
by GLIBPRE1:28;
C0 .first() =
P9 .first()
by A14, GLIB_001:63
.=
C0 .last()
by A14, GLIB_001:63
;
then A21:
C0 is
closed
by GLIB_001:def 24;
A22:
len C0 =
(len P9) + 2
by A14, GLIB_001:64
.=
5
by A17
;
then A23:
C0 is
trivial
by GLIB_001:126;
A24:
C0 is
Trail-like
for
m,
n being
odd Element of
NAT st
m < n &
n <= len C0 &
C0 . m = C0 . n holds
(
m = 1 &
n = len C0 )
proof
let m,
n be
odd Element of
NAT ;
( m < n & n <= len C0 & C0 . m = C0 . n implies ( m = 1 & n = len C0 ) )
A26:
( 1
in dom P9 & 3
in dom P9 )
by A17, FINSEQ_3:25;
then A27:
C0 . 1
= P0 .first()
by A14, GLIB_001:65;
A28:
C0 . 3 =
P9 . 3
by A14, A26, GLIB_001:65
.=
<*(P0 .first()),e0,(P0 .last())*> . 3
by A18, A19, GLIB_001:def 5
.=
P0 .last()
;
A29:
C0 . 5 =
C0 . ((len P9) + 2)
by A17
.=
P0 .first()
by A14, GLIB_001:65
;
A30:
P0 .first() <> P0 .last()
assume A31:
(
m < n &
n <= len C0 &
C0 . m = C0 . n )
;
( m = 1 & n = len C0 )
then
not not
n = 0 & ... & not
n = 5
by A22;
per cases then
( n = 0 or n = 1 or n = 2 or n = 3 or n = 4 or n = 5 )
;
end;
end; then
C0 is
Path-like
by A24, GLIB_001:def 28;
hence
C0 is
Cycle-like
by A21, A23;
verum end; end; end;
hence
C is Cycle-like
by A9; verum