defpred S1[ Nat] means for G2 being _Graph
for V being finite Subset of (the_Vertices_of G2)
for G1 being addLoops of G2,V st card V = $1 holds
ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) );
A1: S1[ 0 ]
proof
let G2 be _Graph; :: thesis: for V being finite Subset of (the_Vertices_of G2)
for G1 being addLoops of G2,V st card V = 0 holds
ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let V be finite Subset of (the_Vertices_of G2); :: thesis: for G1 being addLoops of G2,V st card V = 0 holds
ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let G1 be addLoops of G2,V; :: thesis: ( card V = 0 implies ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) ) )

assume card V = 0 ; :: thesis: ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

then A2: V = {} ;
take p = <*G1*>; :: thesis: ( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

thus p . 1 == G2 by A2, Th21; :: thesis: ( p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

thus p . (len p) = p . 1 by FINSEQ_1:40
.= G1 ; :: thesis: ( len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

thus len p = (card V) + 1 by A2, FINSEQ_1:40; :: thesis: for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) )

let n be Element of dom p; :: thesis: ( n <= (len p) - 1 implies ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) )

A3: 1 <= n by FINSEQ_3:25;
assume n <= (len p) - 1 ; :: thesis: ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) )

then n <= 1 - 1 by FINSEQ_1:40;
hence ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) by A3, XXREAL_0:2; :: thesis: verum
end;
A4: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; :: thesis: ( S1[k] implies S1[k + 1] )
assume A5: S1[k] ; :: thesis: S1[k + 1]
let G2 be _Graph; :: thesis: for V being finite Subset of (the_Vertices_of G2)
for G1 being addLoops of G2,V st card V = k + 1 holds
ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let V be finite Subset of (the_Vertices_of G2); :: thesis: for G1 being addLoops of G2,V st card V = k + 1 holds
ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let G1 be addLoops of G2,V; :: thesis: ( card V = k + 1 implies ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) ) )

assume A6: card V = k + 1 ; :: thesis: ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

then A7: V <> {} ;
set v0 = the Element of V;
the Element of V in V by A7;
then reconsider v0 = the Element of V as Vertex of G2 ;
reconsider V9 = V \ {v0} as finite Subset of (the_Vertices_of G2) ;
A8: V = V9 \/ {v0} by A7, ZFMISC_1:116;
reconsider V0 = {v0} as finite Subset of (the_Vertices_of G2) ;
v0 in {v0} by TARSKI:def 1;
then A9: not v0 in V9 by XBOOLE_0:def 5;
then V9 misses V0 by ZFMISC_1:50;
then consider G9 being addLoops of G2,V9 such that
A10: G1 is addLoops of G9,V0 by A8, Th24;
card V9 = (card V) - (card V0) by A7, ZFMISC_1:31, CARD_2:44
.= (k + 1) - 1 by A6, CARD_1:30 ;
then consider p being non empty Graph-yielding FinSequence such that
A11: ( p . 1 == G2 & p . (len p) = G9 & len p = (card V9) + 1 ) and
A12: for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V9 & not e in the_Edges_of (p . n) ) by A5;
take q = p ^ <*G1*>; :: thesis: ( q . 1 == G2 & q . (len q) = G1 & len q = (card V) + 1 & ( for n being Element of dom q st n <= (len q) - 1 holds
ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) ) ) )

1 <= len p by FINSEQ_1:20;
then 1 in dom p by FINSEQ_3:25;
hence q . 1 == G2 by A11, FINSEQ_1:def 7; :: thesis: ( q . (len q) = G1 & len q = (card V) + 1 & ( for n being Element of dom q st n <= (len q) - 1 holds
ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) ) ) )

A13: len q = (len p) + (len <*G1*>) by FINSEQ_1:22
.= (len p) + 1 by FINSEQ_1:40 ;
hence A14: q . (len q) = G1 by FINSEQ_1:42; :: thesis: ( len q = (card V) + 1 & ( for n being Element of dom q st n <= (len q) - 1 holds
ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) ) ) )

thus len q = (card V) + 1 by A8, A9, A11, A13, CARD_2:41; :: thesis: for n being Element of dom q st n <= (len q) - 1 holds
ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )

let n be Element of dom q; :: thesis: ( n <= (len q) - 1 implies ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) ) )

assume n <= (len q) - 1 ; :: thesis: ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )

per cases then ( n = (len q) - 1 or n <= (len p) - 1 ) by Lm2;
suppose A15: n = (len q) - 1 ; :: thesis: ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )

then A16: q . (n + 1) = G1 by A14;
A17: 1 <= n by FINSEQ_3:25;
A18: n = len p by A13, A15;
then n in dom p by A17, FINSEQ_3:25;
then A19: q . n = G9 by A11, A18, FINSEQ_1:def 7;
v0 is Vertex of G9 by Th15;
then consider e being object such that
A20: ( not e in the_Edges_of G9 & G1 is addEdge of G9,v0,e,v0 ) by A10, Th27;
reconsider v0 = v0 as Vertex of G2 ;
take v0 ; :: thesis: ex e being object st
( q . (n + 1) is addEdge of q . n,v0,e,v0 & v0 in V & not e in the_Edges_of (q . n) )

take e ; :: thesis: ( q . (n + 1) is addEdge of q . n,v0,e,v0 & v0 in V & not e in the_Edges_of (q . n) )
thus q . (n + 1) is addEdge of q . n,v0,e,v0 by A16, A19, A20; :: thesis: ( v0 in V & not e in the_Edges_of (q . n) )
thus v0 in V by A7; :: thesis: not e in the_Edges_of (q . n)
thus not e in the_Edges_of (q . n) by A19, A20; :: thesis: verum
end;
suppose A21: n <= (len p) - 1 ; :: thesis: ex v being Vertex of G2 ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )

then A22: n + 0 <= ((len p) - 1) + 1 by XREAL_1:7;
1 <= n by FINSEQ_3:25;
then reconsider m = n as Element of dom p by A22, FINSEQ_3:25;
consider v being Vertex of G2, e being object such that
A23: ( p . (m + 1) is addEdge of p . m,v,e,v & v in V9 & not e in the_Edges_of (p . m) ) by A12, A21;
( 1 + 0 <= n + 1 & n + 1 <= ((len p) - 1) + 1 ) by A21, XREAL_1:6;
then n + 1 in dom p by FINSEQ_3:25;
then A24: q . (n + 1) = p . (m + 1) by FINSEQ_1:def 7;
A25: q . n = p . m by FINSEQ_1:def 7;
take v ; :: thesis: ex e being object st
( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )

take e ; :: thesis: ( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) )
v in V by A23, XBOOLE_1:36, TARSKI:def 3;
hence ( q . (n + 1) is addEdge of q . n,v,e,v & v in V & not e in the_Edges_of (q . n) ) by A23, A24, A25; :: thesis: verum
end;
end;
end;
A26: for k being Nat holds S1[k] from NAT_1:sch 2(A1, A4);
let G2 be _Graph; :: thesis: for V being finite Subset of (the_Vertices_of G2)
for G1 being addLoops of G2,V ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let V be finite Subset of (the_Vertices_of G2); :: thesis: for G1 being addLoops of G2,V ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

let G1 be addLoops of G2,V; :: thesis: ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) )

thus ex p being non empty Graph-yielding FinSequence st
( p . 1 == G2 & p . (len p) = G1 & len p = (card V) + 1 & ( for n being Element of dom p st n <= (len p) - 1 holds
ex v being Vertex of G2 ex e being object st
( p . (n + 1) is addEdge of p . n,v,e,v & v in V & not e in the_Edges_of (p . n) ) ) ) by A26; :: thesis: verum