set vs = canFS (the_Vertices_of G);
set N = card (the_Vertices_of G);
deffunc H1( Element of NAT ) -> Element of NAT = ((card (the_Vertices_of G)) -' G) + 1;
consider s being Function of NAT , NAT such that
A:
for n being Element of NAT holds s . n = H1(n)
from FUNCT_2:sch 4();
Ad:
dom s = NAT
by FUNCT_2:def 1;
defpred S1[ set , set ] means ex n being Nat st
( G = n & c2 = s * (((canFS (the_Vertices_of G)) | (Seg n)) " ) );
P:
for n being set st n in NAT holds
ex j being set st S1[n,j]
consider S being ManySortedSet of NAT such that
B:
for n being set st n in NAT holds
S1[n,S . n]
from PBOOLE:sch 3(P);
BB:
for n being Nat holds S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) " )
BE:
len (canFS (the_Vertices_of G)) = card (the_Vertices_of G)
by UPROOTS:5;
BC:
for n being Nat st n <= len (canFS (the_Vertices_of G)) holds
card (S . n) = n
BD:
for n being Nat st n >= len (canFS (the_Vertices_of G)) holds
S . n = s * ((canFS (the_Vertices_of G)) " )
then reconsider S = S as preVNumberingSeq of G by dpVNumSeq;
take
S
; :: thesis: S is vertex-numbering
card (S . 0 ) = 0
by BC;
then P:
S . 0 = {}
;
Q:
S is iterative
reconsider N = card (the_Vertices_of G) as Element of NAT ;
L1a:
N >= len (canFS (the_Vertices_of G))
by UPROOTS:5;
L1c:
N <= N + 1
by NAT_1:11;
L1: S . N =
s * ((canFS (the_Vertices_of G)) " )
by L1a, BD
.=
S . (N + 1)
by L1a, L1c, XXREAL_0:2, BD
;
L0:
S is halting
by L1, GLIB_000:def 56;
L2:
for n being Nat st S . n = S . (n + 1) holds
N <= n
S:
S .Lifespan() = G .order()
by L0, L1, L2, GLIB_000:def 57;
now let n be
Nat;
:: thesis: ( n < S .Lifespan() implies ex w being Vertex of G st
( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan() ) -' n)) ) )assume A1:
n < S .Lifespan()
;
:: thesis: ex w being Vertex of G st
( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan() ) -' n)) )set w =
(canFS (the_Vertices_of G)) . (n + 1);
(
0 <= n &
n < N )
by A1, L0, L1, L2, GLIB_000:def 57;
then A1c:
(
0 + 1
<= n + 1 &
n + 1
<= N )
by NAT_1:13;
( 1
<= n + 1 &
n + 1
<= len (canFS (the_Vertices_of G)) )
by A1c, UPROOTS:5;
then A1a:
n + 1
in dom (canFS (the_Vertices_of G))
by FINSEQ_3:27;
then
(canFS (the_Vertices_of G)) . (n + 1) in rng (canFS (the_Vertices_of G))
by FUNCT_1:12;
then reconsider w =
(canFS (the_Vertices_of G)) . (n + 1) as
Vertex of
G ;
take w =
w;
:: thesis: ( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan() ) -' n)) )B1:
(canFS (the_Vertices_of G)) | (Seg n) is
one-to-one
by FUNCT_1:84;
C1:
(canFS (the_Vertices_of G)) | (Seg (n + 1)) is
one-to-one
by FUNCT_1:84;
n <= n + 1
by NAT_1:11;
then K5aa:
Seg n c= Seg (n + 1)
by FINSEQ_1:7;
now now let x be
set ;
:: thesis: ( ( x in dom (S . (n + 1)) implies x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) ) & ( x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) implies b1 in dom (S . (n + 1)) ) )hereby :: thesis: ( x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) implies b1 in dom (S . (n + 1)) )
assume
x in dom (S . (n + 1))
;
:: thesis: x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n)))then
x in dom (s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " ))
by BB;
then
x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " )
by FUNCT_1:21;
then
x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
by C1, FUNCT_1:55;
then consider a being
set such that A4:
a in dom ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
and B4:
x = ((canFS (the_Vertices_of G)) | (Seg (n + 1))) . a
by FUNCT_1:def 5;
C4:
a in Seg (n + 1)
by A4, RELAT_1:86;
reconsider a =
a as
Nat by A4;
D4:
a in dom (canFS (the_Vertices_of G))
by A4, RELAT_1:86;
E4:
dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) = (dom (S . n)) \/ (dom (w .--> ((S .Lifespan() ) -' n)))
by FUNCT_4:def 1;
F4:
a <= n + 1
by C4, FINSEQ_1:3;
C4a:
1
<= a
by C4, FINSEQ_1:3;
per cases
( a <= n or a = n + 1 )
by F4, NAT_1:8;
suppose
a <= n
;
:: thesis: x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n)))then B5:
a in Seg n
by C4a, FINSEQ_1:3;
then A5:
a in dom ((canFS (the_Vertices_of G)) | (Seg n))
by D4, RELAT_1:86;
C5:
((canFS (the_Vertices_of G)) | (Seg n)) . a =
(canFS (the_Vertices_of G)) . a
by B5, FUNCT_1:72
.=
x
by C4, B4, FUNCT_1:72
;
then
(((canFS (the_Vertices_of G)) | (Seg n)) " ) . x = a
by B1, A5, FUNCT_1:54;
then D5:
(((canFS (the_Vertices_of G)) | (Seg n)) " ) . x in dom s
by Ad, ORDINAL1:def 13;
x in rng ((canFS (the_Vertices_of G)) | (Seg n))
by A5, C5, FUNCT_1:12;
then
x in dom (((canFS (the_Vertices_of G)) | (Seg n)) " )
by B1, FUNCT_1:55;
then
x in dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) " ))
by D5, FUNCT_1:21;
then
x in dom (S . n)
by BB;
hence
x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n)))
by E4, XBOOLE_0:def 3;
:: thesis: verum end; end;
end; assume
x in dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n)))
;
:: thesis: b1 in dom (S . (n + 1))then A4:
x in (dom (S . n)) \/ (dom (w .--> ((S .Lifespan() ) -' n)))
by FUNCT_4:def 1;
per cases
( x in dom (S . n) or x in dom (w .--> ((S .Lifespan() ) -' n)) )
by A4, XBOOLE_0:def 3;
suppose
x in dom (S . n)
;
:: thesis: b1 in dom (S . (n + 1))then A5:
x in dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) " ))
by BB;
then B5:
x in dom (((canFS (the_Vertices_of G)) | (Seg n)) " )
by FUNCT_1:21;
C5:
(((canFS (the_Vertices_of G)) | (Seg n)) " ) . x in dom s
by A5, FUNCT_1:21;
J5:
(((canFS (the_Vertices_of G)) | (Seg n)) " ) . x = (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " ) . x
by K5aa, B5, invrngrestr;
K5a:
(canFS (the_Vertices_of G)) | (Seg n) c= (canFS (the_Vertices_of G)) | (Seg (n + 1))
by K5aa, RELAT_1:104;
K5:
rng ((canFS (the_Vertices_of G)) | (Seg n)) c= rng ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
by K5a, RELAT_1:25;
x in rng ((canFS (the_Vertices_of G)) | (Seg n))
by B5, B1, FUNCT_1:55;
then
x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
by K5;
then
x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " )
by C1, FUNCT_1:55;
then
x in dom (s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " ))
by C5, J5, FUNCT_1:21;
hence
x in dom (S . (n + 1))
by BB;
:: thesis: verum end; end; end; hence K3a:
dom (S . (n + 1)) = dom ((S . n) +* (w .--> ((S .Lifespan() ) -' n)))
by TARSKI:2;
:: thesis: for x being set st x in dom (S . (n + 1)) holds
(S . (n + 1)) . b2 = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . b2let x be
set ;
:: thesis: ( x in dom (S . (n + 1)) implies (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . b1 )assume K3:
x in dom (S . (n + 1))
;
:: thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . b1L3:
x in (dom (S . n)) \/ (dom (w .--> ((S .Lifespan() ) -' n)))
by K3, K3a, FUNCT_4:def 1;
M3:
S . (n + 1) = s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " )
by BB;
N3:
S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) " )
by BB;
per cases
( x in dom (S . n) or x in dom (w .--> ((S .Lifespan() ) -' n)) )
by L3, XBOOLE_0:def 3;
suppose S4:
x in dom (S . n)
;
:: thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . b1A5:
(
x in dom (((canFS (the_Vertices_of G)) | (Seg n)) " ) &
(((canFS (the_Vertices_of G)) | (Seg n)) " ) . x in dom s )
by N3, S4, FUNCT_1:21;
x in rng ((canFS (the_Vertices_of G)) | (Seg n))
by A5, B1, FUNCT_1:55;
then consider m being
set such that L5:
m in dom ((canFS (the_Vertices_of G)) | (Seg n))
and M5:
((canFS (the_Vertices_of G)) | (Seg n)) . m = x
by FUNCT_1:def 5;
N5:
m in Seg n
by L5, RELAT_1:86;
reconsider m =
m as
Nat by L5;
O5:
m <= n
by N5, FINSEQ_1:3;
P5:
(canFS (the_Vertices_of G)) . m = x
by L5, M5, FUNCT_1:70;
R5:
m in dom (canFS (the_Vertices_of G))
by L5, RELAT_1:86;
m < n + 1
by O5, NAT_1:13;
then S5:
x <> w
by A1a, P5, R5, FUNCT_1:def 8;
thus (S . (n + 1)) . x =
s . ((((canFS (the_Vertices_of G)) | (Seg (n + 1))) " ) . x)
by M3, K3, FUNCT_1:22
.=
s . ((((canFS (the_Vertices_of G)) | (Seg n)) " ) . x)
by A5, K5aa, invrngrestr
.=
(S . n) . x
by N3, S4, FUNCT_1:22
.=
((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . x
by S5, FUNCT_4:88
;
:: thesis: verum end; suppose S4:
x in dom (w .--> ((S .Lifespan() ) -' n))
;
:: thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . b1then A5:
x = w
by FUNCOP_1:90;
A5a:
n + 1
in Seg (n + 1)
by FINSEQ_1:6;
x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
by FINSEQ_1:6, A1a, A5, FUNCT_1:73;
then B5:
x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " )
by C1, FUNCT_1:55;
J5:
n + 1
in dom ((canFS (the_Vertices_of G)) | (Seg (n + 1)))
by A5a, A1a, RELAT_1:86;
K5a:
((canFS (the_Vertices_of G)) | (Seg (n + 1))) . (n + 1) = w
by J5, FUNCT_1:70;
Z5:
((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . x =
(w .--> ((S .Lifespan() ) -' n)) . x
by S4, FUNCT_4:14
.=
(S .Lifespan() ) -' n
by A5, FUNCOP_1:87
;
(S . (n + 1)) . x =
(s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) " )) . x
by BB
.=
s . ((((canFS (the_Vertices_of G)) | (Seg (n + 1))) " ) . x)
by B5, FUNCT_1:23
.=
s . (n + 1)
by A5, J5, C1, K5a, FUNCT_1:54
.=
(N -' (n + 1)) + 1
by A
.=
(N - (n + 1)) + 1
by A1c, XREAL_1:235
.=
N - n
.=
(S .Lifespan() ) -' n
by S, A1, XREAL_1:235
;
hence
(S . (n + 1)) . x = ((S . n) +* (w .--> ((S .Lifespan() ) -' n))) . x
by Z5;
:: thesis: verum end; end; end; hence
S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan() ) -' n))
by FUNCT_1:9;
:: thesis: verum end;
hence
S is vertex-numbering
by P, Q, L0, S, dVNumSeq; :: thesis: verum