:: LEXBFS semantic presentation
begin
Lm1: for F being Function
for x, y being set holds dom (F +* (x .--> y)) = (dom F) \/ {x}
proof
let F be Function; ::_thesis: for x, y being set holds dom (F +* (x .--> y)) = (dom F) \/ {x}
let x, y be set ; ::_thesis: dom (F +* (x .--> y)) = (dom F) \/ {x}
thus dom (F +* (x .--> y)) = (dom F) \/ (dom (x .--> y)) by FUNCT_4:def_1
.= (dom F) \/ {x} by FUNCOP_1:13 ; ::_thesis: verum
end;
Lm2: for f being one-to-one Function
for X, Y being set st X c= Y holds
for x being set st x in dom ((f | X) ") holds
((f | X) ") . x = ((f | Y) ") . x
proof
let f be one-to-one Function; ::_thesis: for X, Y being set st X c= Y holds
for x being set st x in dom ((f | X) ") holds
((f | X) ") . x = ((f | Y) ") . x
let X, Y be set ; ::_thesis: ( X c= Y implies for x being set st x in dom ((f | X) ") holds
((f | X) ") . x = ((f | Y) ") . x )
assume X c= Y ; ::_thesis: for x being set st x in dom ((f | X) ") holds
((f | X) ") . x = ((f | Y) ") . x
then f | X c= f | Y by RELAT_1:75;
then A1: (f | X) ~ c= (f | Y) ~ by SYSREL:11;
f | X is one-to-one by FUNCT_1:52;
then A2: (f | X) ~ = (f | X) " by FUNCT_1:def_5;
f | Y is one-to-one by FUNCT_1:52;
then A3: (f | Y) ~ = (f | Y) " by FUNCT_1:def_5;
let x be set ; ::_thesis: ( x in dom ((f | X) ") implies ((f | X) ") . x = ((f | Y) ") . x )
assume x in dom ((f | X) ") ; ::_thesis: ((f | X) ") . x = ((f | Y) ") . x
hence ((f | X) ") . x = ((f | Y) ") . x by A1, A2, A3, GRFUNC_1:2; ::_thesis: verum
end;
theorem :: LEXBFS:1
for A, B being Element of NAT
for X being non empty set
for F being Function of NAT,X st F is one-to-one holds
card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1
proof
let A, B be Element of NAT ; ::_thesis: for X being non empty set
for F being Function of NAT,X st F is one-to-one holds
card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1
let X be non empty set ; ::_thesis: for F being Function of NAT,X st F is one-to-one holds
card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1
let F be Function of NAT,X; ::_thesis: ( F is one-to-one implies card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1 )
assume A1: F is one-to-one ; ::_thesis: card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1
defpred S1[ Element of NAT ] means card { (F . w) where w is Element of NAT : ( A <= w & w <= A + $1 ) } = $1 + 1;
A2: dom F = NAT by FUNCT_2:def_1;
A3: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A4: S1[k] ; ::_thesis: S1[k + 1]
set Fwk = { (F . w) where w is Element of NAT : ( A <= w & w <= A + k ) } ;
reconsider Fwk = { (F . w) where w is Element of NAT : ( A <= w & w <= A + k ) } as finite set by A4;
set Fwk1 = { (F . w) where w is Element of NAT : ( A <= w & w <= (A + k) + 1 ) } ;
A5: now__::_thesis:_for_x_being_set_holds_
(_(_x_in__{__(F_._w)_where_w_is_Element_of_NAT_:_(_A_<=_w_&_w_<=_(A_+_k)_+_1_)__}__implies_x_in_Fwk_\/_{(F_._((A_+_k)_+_1))}_)_&_(_x_in_Fwk_\/_{(F_._((A_+_k)_+_1))}_implies_x_in__{__(F_._w)_where_w_is_Element_of_NAT_:_(_A_<=_w_&_w_<=_(A_+_k)_+_1_)__}__)_)
let x be set ; ::_thesis: ( ( x in { (F . w) where w is Element of NAT : ( A <= w & w <= (A + k) + 1 ) } implies x in Fwk \/ {(F . ((A + k) + 1))} ) & ( x in Fwk \/ {(F . ((A + k) + 1))} implies b1 in { (F . b2) where w is Element of NAT : ( A <= b2 & b2 <= (A + k) + 1 ) } ) )
hereby ::_thesis: ( x in Fwk \/ {(F . ((A + k) + 1))} implies b1 in { (F . b2) where w is Element of NAT : ( A <= b2 & b2 <= (A + k) + 1 ) } )
assume x in { (F . w) where w is Element of NAT : ( A <= w & w <= (A + k) + 1 ) } ; ::_thesis: x in Fwk \/ {(F . ((A + k) + 1))}
then consider w being Element of NAT such that
A6: x = F . w and
A7: A <= w and
A8: w <= (A + k) + 1 ;
A9: ( w = (A + k) + 1 or w < (A + k) + 1 ) by A8, XXREAL_0:1;
percases ( w = (A + k) + 1 or w <= A + k ) by A9, NAT_1:13;
suppose w = (A + k) + 1 ; ::_thesis: x in Fwk \/ {(F . ((A + k) + 1))}
then x in {(F . ((A + k) + 1))} by A6, TARSKI:def_1;
hence x in Fwk \/ {(F . ((A + k) + 1))} by XBOOLE_0:def_3; ::_thesis: verum
end;
suppose w <= A + k ; ::_thesis: x in Fwk \/ {(F . ((A + k) + 1))}
then x in Fwk by A6, A7;
hence x in Fwk \/ {(F . ((A + k) + 1))} by XBOOLE_0:def_3; ::_thesis: verum
end;
end;
end;
assume A10: x in Fwk \/ {(F . ((A + k) + 1))} ; ::_thesis: b1 in { (F . b2) where w is Element of NAT : ( A <= b2 & b2 <= (A + k) + 1 ) }
percases ( x in Fwk or x in {(F . ((A + k) + 1))} ) by A10, XBOOLE_0:def_3;
suppose x in Fwk ; ::_thesis: b1 in { (F . b2) where w is Element of NAT : ( A <= b2 & b2 <= (A + k) + 1 ) }
then consider w being Element of NAT such that
A11: x = F . w and
A12: A <= w and
A13: w <= A + k ;
w <= (A + k) + 1 by A13, NAT_1:13;
hence x in { (F . w) where w is Element of NAT : ( A <= w & w <= (A + k) + 1 ) } by A11, A12; ::_thesis: verum
end;
supposeA14: x in {(F . ((A + k) + 1))} ; ::_thesis: b1 in { (F . b2) where w is Element of NAT : ( A <= b2 & b2 <= (A + k) + 1 ) }
A15: A <= A + (k + 1) by NAT_1:11;
x = F . ((A + k) + 1) by A14, TARSKI:def_1;
hence x in { (F . w) where w is Element of NAT : ( A <= w & w <= (A + k) + 1 ) } by A15; ::_thesis: verum
end;
end;
end;
now__::_thesis:_not_F_._((A_+_k)_+_1)_in_Fwk
assume F . ((A + k) + 1) in Fwk ; ::_thesis: contradiction
then consider w being Element of NAT such that
A16: F . ((A + k) + 1) = F . w and
A <= w and
A17: w <= A + k ;
(A + k) + 1 = w by A1, A2, A16, FUNCT_1:def_4;
hence contradiction by A17, NAT_1:13; ::_thesis: verum
end;
then card (Fwk \/ {(F . ((A + k) + 1))}) = (k + 1) + 1 by A4, CARD_2:41;
hence S1[k + 1] by A5, TARSKI:1; ::_thesis: verum
end;
now__::_thesis:_for_x_being_set_holds_
(_(_x_in__{__(F_._w)_where_w_is_Element_of_NAT_:_(_A_<=_w_&_w_<=_A_+_0_)__}__implies_x_in_{(F_._A)}_)_&_(_x_in_{(F_._A)}_implies_x_in__{__(F_._w)_where_w_is_Element_of_NAT_:_(_A_<=_w_&_w_<=_A_+_0_)__}__)_)
let x be set ; ::_thesis: ( ( x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } implies x in {(F . A)} ) & ( x in {(F . A)} implies x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } ) )
hereby ::_thesis: ( x in {(F . A)} implies x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } )
assume x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } ; ::_thesis: x in {(F . A)}
then consider w being Element of NAT such that
A18: F . w = x and
A19: A <= w and
A20: w <= A + 0 ;
w = A by A19, A20, XXREAL_0:1;
hence x in {(F . A)} by A18, TARSKI:def_1; ::_thesis: verum
end;
assume x in {(F . A)} ; ::_thesis: x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) }
then x = F . A by TARSKI:def_1;
hence x in { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } ; ::_thesis: verum
end;
then { (F . w) where w is Element of NAT : ( A <= w & w <= A + 0 ) } = {(F . A)} by TARSKI:1;
then A21: S1[ 0 ] by CARD_1:30;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A21, A3);
hence card { (F . w) where w is Element of NAT : ( A <= w & w <= A + B ) } = B + 1 ; ::_thesis: verum
end;
Lm3: for a, b, c being real number st a < b holds
(c - b) + 1 < (c - a) + 1
proof
let a, b, c be real number ; ::_thesis: ( a < b implies (c - b) + 1 < (c - a) + 1 )
assume a < b ; ::_thesis: (c - b) + 1 < (c - a) + 1
then c - b < c - a by XREAL_1:10;
hence (c - b) + 1 < (c - a) + 1 by XREAL_1:6; ::_thesis: verum
end;
theorem Th2: :: LEXBFS:2
for n, m, k being Nat st m <= k & n < m holds
k -' m < k -' n
proof
let n, m, k be Nat; ::_thesis: ( m <= k & n < m implies k -' m < k -' n )
assume that
A1: m <= k and
A2: n < m ; ::_thesis: k -' m < k -' n
A3: k - m < k - n by A2, XREAL_1:15;
k -' n = k - n by A1, A2, XREAL_1:233, XXREAL_0:2;
hence k -' m < k -' n by A1, A3, XREAL_1:233; ::_thesis: verum
end;
notation
let S be set ;
synonym with_finite-elements S for finite-membered ;
end;
registration
cluster non empty finite with_finite-elements for Element of bool (bool NAT);
existence
ex b1 being Subset of (bool NAT) st
( not b1 is empty & b1 is finite & b1 is with_finite-elements )
proof
set x = {{1}};
reconsider x = {{1}} as Subset of (bool NAT) ;
take x ; ::_thesis: ( not x is empty & x is finite & x is with_finite-elements )
thus not x is empty ; ::_thesis: ( x is finite & x is with_finite-elements )
thus x is finite ; ::_thesis: x is with_finite-elements
thus x is with_finite-elements ; ::_thesis: verum
end;
end;
definition
canceled;
let f, g be Function;
funcf .\/ g -> Function means :Def2: :: LEXBFS:def 2
( dom it = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
it . x = (f . x) \/ (g . x) ) );
existence
ex b1 being Function st
( dom b1 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
b1 . x = (f . x) \/ (g . x) ) )
proof
defpred S1[ set , set ] means (f . $1) \/ (g . $1) = $2;
set A = (dom f) \/ (dom g);
A1: for x being set st x in (dom f) \/ (dom g) holds
ex y being set st S1[x,y] ;
ex f being Function st
( dom f = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
S1[x,f . x] ) ) from CLASSES1:sch_1(A1);
then consider IT being Function such that
A2: dom IT = (dom f) \/ (dom g) and
A3: for x being set st x in (dom f) \/ (dom g) holds
S1[x,IT . x] ;
take IT ; ::_thesis: ( dom IT = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
IT . x = (f . x) \/ (g . x) ) )
thus dom IT = (dom f) \/ (dom g) by A2; ::_thesis: for x being set st x in (dom f) \/ (dom g) holds
IT . x = (f . x) \/ (g . x)
thus for x being set st x in (dom f) \/ (dom g) holds
IT . x = (f . x) \/ (g . x) by A3; ::_thesis: verum
end;
uniqueness
for b1, b2 being Function st dom b1 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
b1 . x = (f . x) \/ (g . x) ) & dom b2 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
b2 . x = (f . x) \/ (g . x) ) holds
b1 = b2
proof
let IT1, IT2 be Function; ::_thesis: ( dom IT1 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
IT1 . x = (f . x) \/ (g . x) ) & dom IT2 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
IT2 . x = (f . x) \/ (g . x) ) implies IT1 = IT2 )
assume that
A4: dom IT1 = (dom f) \/ (dom g) and
A5: for x being set st x in (dom f) \/ (dom g) holds
IT1 . x = (f . x) \/ (g . x) and
A6: dom IT2 = (dom f) \/ (dom g) and
A7: for x being set st x in (dom f) \/ (dom g) holds
IT2 . x = (f . x) \/ (g . x) ; ::_thesis: IT1 = IT2
now__::_thesis:_for_x_being_set_st_x_in_dom_IT1_holds_
IT1_._x_=_IT2_._x
let x be set ; ::_thesis: ( x in dom IT1 implies IT1 . x = IT2 . x )
assume A8: x in dom IT1 ; ::_thesis: IT1 . x = IT2 . x
IT1 . x = (f . x) \/ (g . x) by A4, A5, A8;
hence IT1 . x = IT2 . x by A4, A7, A8; ::_thesis: verum
end;
hence IT1 = IT2 by A4, A6, FUNCT_1:2; ::_thesis: verum
end;
end;
:: deftheorem LEXBFS:def_1_:_
canceled;
:: deftheorem Def2 defines .\/ LEXBFS:def_2_:_
for f, g, b3 being Function holds
( b3 = f .\/ g iff ( dom b3 = (dom f) \/ (dom g) & ( for x being set st x in (dom f) \/ (dom g) holds
b3 . x = (f . x) \/ (g . x) ) ) );
theorem Th3: :: LEXBFS:3
for m, n, k being Nat holds
( m in (Seg k) \ (Seg (k -' n)) iff ( k -' n < m & m <= k ) )
proof
let m, n, k be Nat; ::_thesis: ( m in (Seg k) \ (Seg (k -' n)) iff ( k -' n < m & m <= k ) )
hereby ::_thesis: ( k -' n < m & m <= k implies m in (Seg k) \ (Seg (k -' n)) )
assume A1: m in (Seg k) \ (Seg (k -' n)) ; ::_thesis: ( k -' n < m & m <= k )
then A2: not m in Seg (k -' n) by XBOOLE_0:def_5;
A3: m in Seg k by A1, XBOOLE_0:def_5;
then 1 <= m by FINSEQ_1:1;
hence ( k -' n < m & m <= k ) by A3, A2, FINSEQ_1:1; ::_thesis: verum
end;
assume that
A4: k -' n < m and
A5: m <= k ; ::_thesis: m in (Seg k) \ (Seg (k -' n))
0 + 1 <= m by A4, NAT_1:13;
then A6: m in Seg k by A5, FINSEQ_1:1;
not m in Seg (k -' n) by A4, FINSEQ_1:1;
hence m in (Seg k) \ (Seg (k -' n)) by A6, XBOOLE_0:def_5; ::_thesis: verum
end;
theorem Th4: :: LEXBFS:4
for n, k, m being Nat st n <= m holds
(Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m))
proof
let n, k, m be Nat; ::_thesis: ( n <= m implies (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m)) )
assume A1: n <= m ; ::_thesis: (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m))
percases ( k < m or m <= k ) ;
supposeA2: k < m ; ::_thesis: (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m))
A3: for x being set st x in (Seg k) \ (Seg (k -' n)) holds
x in Seg k by XBOOLE_0:def_5;
k -' m = 0 by A2, NAT_2:8;
then Seg (k -' m) = {} ;
hence (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m)) by A3, TARSKI:def_3; ::_thesis: verum
end;
supposeA4: m <= k ; ::_thesis: (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m))
now__::_thesis:_for_x_being_set_st_x_in_(Seg_k)_\_(Seg_(k_-'_n))_holds_
x_in_(Seg_k)_\_(Seg_(k_-'_m))
let x be set ; ::_thesis: ( x in (Seg k) \ (Seg (k -' n)) implies b1 in (Seg k) \ (Seg (k -' m)) )
assume A5: x in (Seg k) \ (Seg (k -' n)) ; ::_thesis: b1 in (Seg k) \ (Seg (k -' m))
reconsider y = x as Element of NAT by A5;
A6: k -' n < y by A5, Th3;
percases ( m = n or n < m ) by A1, XXREAL_0:1;
suppose m = n ; ::_thesis: b1 in (Seg k) \ (Seg (k -' m))
hence x in (Seg k) \ (Seg (k -' m)) by A5; ::_thesis: verum
end;
suppose n < m ; ::_thesis: b1 in (Seg k) \ (Seg (k -' m))
then k -' m < k -' n by A4, Th2;
then A7: k -' m < y by A6, XXREAL_0:2;
y <= k by A5, Th3;
hence x in (Seg k) \ (Seg (k -' m)) by A7, Th3; ::_thesis: verum
end;
end;
end;
hence (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' m)) by TARSKI:def_3; ::_thesis: verum
end;
end;
end;
theorem Th5: :: LEXBFS:5
for n, k being Nat st n < k holds
((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} = (Seg k) \ (Seg (k -' (n + 1)))
proof
let n, k be Nat; ::_thesis: ( n < k implies ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} = (Seg k) \ (Seg (k -' (n + 1))) )
assume A1: n < k ; ::_thesis: ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} = (Seg k) \ (Seg (k -' (n + 1)))
set Sn1 = (Seg k) \ (Seg (k -' (n + 1)));
set Sn = (Seg k) \ (Seg (k -' n));
now__::_thesis:_for_x_being_set_st_x_in_((Seg_k)_\_(Seg_(k_-'_n)))_\/_{(k_-'_n)}_holds_
x_in_(Seg_k)_\_(Seg_(k_-'_(n_+_1)))
let x be set ; ::_thesis: ( x in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} implies b1 in (Seg k) \ (Seg (k -' (n + 1))) )
assume A2: x in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} ; ::_thesis: b1 in (Seg k) \ (Seg (k -' (n + 1)))
percases ( x in (Seg k) \ (Seg (k -' n)) or x in {(k -' n)} ) by A2, XBOOLE_0:def_3;
supposeA3: x in (Seg k) \ (Seg (k -' n)) ; ::_thesis: b1 in (Seg k) \ (Seg (k -' (n + 1)))
n <= n + 1 by NAT_1:13;
then (Seg k) \ (Seg (k -' n)) c= (Seg k) \ (Seg (k -' (n + 1))) by Th4;
hence x in (Seg k) \ (Seg (k -' (n + 1))) by A3; ::_thesis: verum
end;
supposeA4: x in {(k -' n)} ; ::_thesis: b1 in (Seg k) \ (Seg (k -' (n + 1)))
then reconsider y = x as Nat ;
A5: n < n + 1 by NAT_1:13;
n + 1 <= k by A1, NAT_1:13;
then A6: k -' (n + 1) < k -' n by A5, Th2;
A7: x = k -' n by A4, TARSKI:def_1;
then y <= k by NAT_D:35;
hence x in (Seg k) \ (Seg (k -' (n + 1))) by A7, A6, Th3; ::_thesis: verum
end;
end;
end;
then A8: ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} c= (Seg k) \ (Seg (k -' (n + 1))) by TARSKI:def_3;
now__::_thesis:_for_x_being_set_st_x_in_(Seg_k)_\_(Seg_(k_-'_(n_+_1)))_holds_
x_in_((Seg_k)_\_(Seg_(k_-'_n)))_\/_{(k_-'_n)}
let x be set ; ::_thesis: ( x in (Seg k) \ (Seg (k -' (n + 1))) implies b1 in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} )
assume A9: x in (Seg k) \ (Seg (k -' (n + 1))) ; ::_thesis: b1 in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)}
reconsider y = x as Element of NAT by A9;
A10: y <= k by A9, Th3;
A11: (k -' (n + 1)) + 1 = k -' n by A1, NAT_D:59;
k -' (n + 1) < y by A9, Th3;
then A12: k -' n <= y by A11, NAT_1:13;
percases ( k -' n = y or k -' n < y ) by A12, XXREAL_0:1;
suppose k -' n = y ; ::_thesis: b1 in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)}
then y in {(k -' n)} by TARSKI:def_1;
hence x in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} by XBOOLE_0:def_3; ::_thesis: verum
end;
suppose k -' n < y ; ::_thesis: b1 in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)}
then y in (Seg k) \ (Seg (k -' n)) by A10, Th3;
hence x in ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} by XBOOLE_0:def_3; ::_thesis: verum
end;
end;
end;
then (Seg k) \ (Seg (k -' (n + 1))) c= ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} by TARSKI:def_3;
hence ((Seg k) \ (Seg (k -' n))) \/ {(k -' n)} = (Seg k) \ (Seg (k -' (n + 1))) by A8, XBOOLE_0:def_10; ::_thesis: verum
end;
definition
let f be Relation;
attrf is natsubset-yielding means :Def3: :: LEXBFS:def 3
rng f c= bool NAT;
end;
:: deftheorem Def3 defines natsubset-yielding LEXBFS:def_3_:_
for f being Relation holds
( f is natsubset-yielding iff rng f c= bool NAT );
registration
cluster Relation-like Function-like finite-yielding natsubset-yielding for set ;
existence
ex b1 being Function st
( b1 is finite-yielding & b1 is natsubset-yielding )
proof
set F = NAT --> {};
take NAT --> {} ; ::_thesis: ( NAT --> {} is finite-yielding & NAT --> {} is natsubset-yielding )
for x being set st x in rng (NAT --> {}) holds
x is finite ;
hence NAT --> {} is V45() by FINSET_1:def_2; ::_thesis: NAT --> {} is natsubset-yielding
now__::_thesis:_for_x_being_set_st_x_in_rng_(NAT_-->_{})_holds_
x_in_bool_NAT
let x be set ; ::_thesis: ( x in rng (NAT --> {}) implies x in bool NAT )
assume x in rng (NAT --> {}) ; ::_thesis: x in bool NAT
then x = {} by TARSKI:def_1;
then x c= NAT by XBOOLE_1:2;
hence x in bool NAT ; ::_thesis: verum
end;
then rng (NAT --> {}) c= bool NAT by TARSKI:def_3;
hence NAT --> {} is natsubset-yielding by Def3; ::_thesis: verum
end;
end;
definition
let f be finite-yielding natsubset-yielding Function;
let x be set ;
:: original: .
redefine funcf . x -> finite Subset of NAT;
coherence
f . x is finite Subset of NAT
proof
percases ( x in dom f or not x in dom f ) ;
supposeA1: x in dom f ; ::_thesis: f . x is finite Subset of NAT
A2: rng f c= bool NAT by Def3;
f . x in rng f by A1, FUNCT_1:3;
hence f . x is finite Subset of NAT by A2; ::_thesis: verum
end;
suppose not x in dom f ; ::_thesis: f . x is finite Subset of NAT
then f . x = {} by FUNCT_1:def_2;
hence f . x is finite Subset of NAT by XBOOLE_1:2; ::_thesis: verum
end;
end;
end;
end;
theorem Th6: :: LEXBFS:6
for X being Ordinal
for a, b being finite Subset of X st a <> b holds
(a,1) -bag <> (b,1) -bag
proof
let X be Ordinal; ::_thesis: for a, b being finite Subset of X st a <> b holds
(a,1) -bag <> (b,1) -bag
let a, b be finite Subset of X; ::_thesis: ( a <> b implies (a,1) -bag <> (b,1) -bag )
assume A1: a <> b ; ::_thesis: (a,1) -bag <> (b,1) -bag
assume A2: (a,1) -bag = (b,1) -bag ; ::_thesis: contradiction
now__::_thesis:_for_x_being_set_holds_
(_x_in_a_iff_x_in_b_)
let x be set ; ::_thesis: ( x in a iff x in b )
( x in a iff ((b,1) -bag) . x = 1 ) by A2, UPROOTS:6, UPROOTS:7;
hence ( x in a iff x in b ) by UPROOTS:6, UPROOTS:7; ::_thesis: verum
end;
hence contradiction by A1, TARSKI:1; ::_thesis: verum
end;
definition
let F be natural-valued Function;
let S be set ;
let k be Nat;
funcF .incSubset (S,k) -> natural-valued Function means :Def4: :: LEXBFS:def 4
( dom it = dom F & ( for y being set holds
( ( y in S & y in dom F implies it . y = (F . y) + k ) & ( not y in S implies it . y = F . y ) ) ) );
existence
ex b1 being natural-valued Function st
( dom b1 = dom F & ( for y being set holds
( ( y in S & y in dom F implies b1 . y = (F . y) + k ) & ( not y in S implies b1 . y = F . y ) ) ) )
proof
deffunc H1( set ) -> Element of NAT = (F . $1) + k;
consider H being Function such that
A1: dom H = S /\ (dom F) and
A2: for x being set st x in S /\ (dom F) holds
H . x = H1(x) from FUNCT_1:sch_3();
now__::_thesis:_for_x_being_set_st_x_in_rng_H_holds_
x_in_NAT
let x be set ; ::_thesis: ( x in rng H implies x in NAT )
assume x in rng H ; ::_thesis: x in NAT
then consider y being set such that
A3: y in dom H and
A4: H . y = x by FUNCT_1:def_3;
H . y = (F . y) + k by A1, A2, A3;
hence x in NAT by A4; ::_thesis: verum
end;
then A5: rng H c= NAT by TARSKI:def_3;
A6: rng (F +* H) c= (rng F) \/ (rng H) by FUNCT_4:17;
rng F c= NAT by VALUED_0:def_6;
then (rng F) \/ (rng H) c= NAT by A5, XBOOLE_1:8;
then rng (F +* H) c= NAT by A6, XBOOLE_1:1;
then reconsider IT = F +* H as natural-valued Function by VALUED_0:def_6;
take IT ; ::_thesis: ( dom IT = dom F & ( for y being set holds
( ( y in S & y in dom F implies IT . y = (F . y) + k ) & ( not y in S implies IT . y = F . y ) ) ) )
dom IT = (dom F) \/ (S /\ (dom F)) by A1, FUNCT_4:def_1;
hence dom IT = dom F by XBOOLE_1:22; ::_thesis: for y being set holds
( ( y in S & y in dom F implies IT . y = (F . y) + k ) & ( not y in S implies IT . y = F . y ) )
now__::_thesis:_for_y_being_set_holds_
(_(_y_in_S_&_y_in_dom_F_implies_IT_._y_=_(F_._y)_+_k_)_&_(_not_y_in_S_implies_IT_._y_=_F_._y_)_)
let y be set ; ::_thesis: ( ( y in S & y in dom F implies IT . y = (F . y) + k ) & ( not y in S implies IT . y = F . y ) )
A7: now__::_thesis:_(_y_in_S_&_y_in_dom_F_implies_IT_._y_=_(F_._y)_+_k_)
assume that
A8: y in S and
A9: y in dom F ; ::_thesis: IT . y = (F . y) + k
y in dom H by A1, A8, A9, XBOOLE_0:def_4;
then A10: IT . y = H . y by FUNCT_4:13;
y in S /\ (dom F) by A8, A9, XBOOLE_0:def_4;
hence IT . y = (F . y) + k by A2, A10; ::_thesis: verum
end;
now__::_thesis:_(_not_y_in_S_implies_IT_._y_=_F_._y_)
assume not y in S ; ::_thesis: IT . y = F . y
then not y in dom H by A1, XBOOLE_0:def_4;
hence IT . y = F . y by FUNCT_4:11; ::_thesis: verum
end;
hence ( ( y in S & y in dom F implies IT . y = (F . y) + k ) & ( not y in S implies IT . y = F . y ) ) by A7; ::_thesis: verum
end;
hence for y being set holds
( ( y in S & y in dom F implies IT . y = (F . y) + k ) & ( not y in S implies IT . y = F . y ) ) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being natural-valued Function st dom b1 = dom F & ( for y being set holds
( ( y in S & y in dom F implies b1 . y = (F . y) + k ) & ( not y in S implies b1 . y = F . y ) ) ) & dom b2 = dom F & ( for y being set holds
( ( y in S & y in dom F implies b2 . y = (F . y) + k ) & ( not y in S implies b2 . y = F . y ) ) ) holds
b1 = b2
proof
let IT1, IT2 be natural-valued Function; ::_thesis: ( dom IT1 = dom F & ( for y being set holds
( ( y in S & y in dom F implies IT1 . y = (F . y) + k ) & ( not y in S implies IT1 . y = F . y ) ) ) & dom IT2 = dom F & ( for y being set holds
( ( y in S & y in dom F implies IT2 . y = (F . y) + k ) & ( not y in S implies IT2 . y = F . y ) ) ) implies IT1 = IT2 )
assume that
A11: dom IT1 = dom F and
A12: for y being set holds
( ( y in S & y in dom F implies IT1 . y = (F . y) + k ) & ( not y in S implies IT1 . y = F . y ) ) and
A13: dom IT2 = dom F and
A14: for y being set holds
( ( y in S & y in dom F implies IT2 . y = (F . y) + k ) & ( not y in S implies IT2 . y = F . y ) ) ; ::_thesis: IT1 = IT2
now__::_thesis:_for_x_being_set_st_x_in_dom_IT1_holds_
IT1_._x_=_IT2_._x
let x be set ; ::_thesis: ( x in dom IT1 implies IT1 . b1 = IT2 . b1 )
assume A15: x in dom IT1 ; ::_thesis: IT1 . b1 = IT2 . b1
percases ( ( x in S & x in dom F ) or not x in S ) by A11, A15;
supposeA16: ( x in S & x in dom F ) ; ::_thesis: IT1 . b1 = IT2 . b1
then IT1 . x = (F . x) + k by A12;
hence IT1 . x = IT2 . x by A14, A16; ::_thesis: verum
end;
supposeA17: not x in S ; ::_thesis: IT1 . b1 = IT2 . b1
then IT1 . x = F . x by A12;
hence IT1 . x = IT2 . x by A14, A17; ::_thesis: verum
end;
end;
end;
hence IT1 = IT2 by A11, A13, FUNCT_1:2; ::_thesis: verum
end;
end;
:: deftheorem Def4 defines .incSubset LEXBFS:def_4_:_
for F being natural-valued Function
for S being set
for k being Nat
for b4 being natural-valued Function holds
( b4 = F .incSubset (S,k) iff ( dom b4 = dom F & ( for y being set holds
( ( y in S & y in dom F implies b4 . y = (F . y) + k ) & ( not y in S implies b4 . y = F . y ) ) ) ) );
definition
let n be Ordinal;
let T be connected TermOrder of n;
let B be non empty finite Subset of (Bags n);
func max (B,T) -> bag of n means :Def5: :: LEXBFS:def 5
( it in B & ( for x being bag of n st x in B holds
x <= it,T ) );
existence
ex b1 being bag of n st
( b1 in B & ( for x being bag of n st x in B holds
x <= b1,T ) )
proof
consider p being FinSequence such that
A1: rng p = B by FINSEQ_1:52;
defpred S1[ Nat] means ( $1 <= len p implies ex a being Nat ex A being bag of n st
( a in dom p & a <= $1 & p . a = A & ( for c being Nat
for C being bag of n st c in dom p & c <= $1 & p . c = C holds
C <= A,T ) ) );
A2: for k being non empty Nat st S1[k] holds
S1[k + 1]
proof
let k be non empty Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
percases ( k < len p or k >= len p ) ;
supposeA4: k < len p ; ::_thesis: S1[k + 1]
A5: 1 <= k + 1 by CHORD:1;
k + 1 <= len p by A4, NAT_1:13;
then A6: k + 1 in dom p by A5, FINSEQ_3:25;
then p . (k + 1) in B by A1, FUNCT_1:def_3;
then reconsider Ck = p . (k + 1) as bag of n ;
consider a being Nat, A being bag of n such that
A7: a in dom p and
A8: a <= k and
A9: p . a = A and
A10: for c being Nat
for C being bag of n st c in dom p & c <= k & p . c = C holds
C <= A,T by A3, A4;
set m = max (A,Ck,T);
A11: A <= max (A,Ck,T),T by TERMORD:14;
percases ( max (A,Ck,T) = A or max (A,Ck,T) = Ck ) by TERMORD:12;
supposeA12: max (A,Ck,T) = A ; ::_thesis: S1[k + 1]
A13: now__::_thesis:_for_c_being_Nat
for_C_being_bag_of_n_st_c_in_dom_p_&_c_<=_k_+_1_&_p_._c_=_C_holds_
C_<=_max_(A,Ck,T),T
let c be Nat; ::_thesis: for C being bag of n st c in dom p & c <= k + 1 & p . c = C holds
b3 <= max (A,Ck,T),T
let C be bag of n; ::_thesis: ( c in dom p & c <= k + 1 & p . c = C implies b2 <= max (A,Ck,T),T )
assume that
A14: c in dom p and
A15: c <= k + 1 and
A16: p . c = C ; ::_thesis: b2 <= max (A,Ck,T),T
percases ( c = k + 1 or c < k + 1 ) by A15, XXREAL_0:1;
suppose c = k + 1 ; ::_thesis: b2 <= max (A,Ck,T),T
hence C <= max (A,Ck,T),T by A16, TERMORD:14; ::_thesis: verum
end;
suppose c < k + 1 ; ::_thesis: b2 <= max (A,Ck,T),T
then c <= k by NAT_1:13;
then C <= A,T by A10, A14, A16;
hence C <= max (A,Ck,T),T by A11, TERMORD:8; ::_thesis: verum
end;
end;
end;
a <= k + 1 by A8, NAT_1:13;
hence S1[k + 1] by A7, A9, A12, A13; ::_thesis: verum
end;
supposeA17: max (A,Ck,T) = Ck ; ::_thesis: S1[k + 1]
now__::_thesis:_for_c_being_Nat
for_C_being_bag_of_n_st_c_in_dom_p_&_c_<=_k_+_1_&_p_._c_=_C_holds_
C_<=_max_(A,Ck,T),T
let c be Nat; ::_thesis: for C being bag of n st c in dom p & c <= k + 1 & p . c = C holds
b3 <= max (A,Ck,T),T
let C be bag of n; ::_thesis: ( c in dom p & c <= k + 1 & p . c = C implies b2 <= max (A,Ck,T),T )
assume that
A18: c in dom p and
A19: c <= k + 1 and
A20: p . c = C ; ::_thesis: b2 <= max (A,Ck,T),T
percases ( c = k + 1 or c < k + 1 ) by A19, XXREAL_0:1;
suppose c = k + 1 ; ::_thesis: b2 <= max (A,Ck,T),T
hence C <= max (A,Ck,T),T by A20, TERMORD:14; ::_thesis: verum
end;
suppose c < k + 1 ; ::_thesis: b2 <= max (A,Ck,T),T
then c <= k by NAT_1:13;
then C <= A,T by A10, A18, A20;
hence C <= max (A,Ck,T),T by A11, TERMORD:8; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] by A6, A17; ::_thesis: verum
end;
end;
end;
suppose k >= len p ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:13; ::_thesis: verum
end;
end;
end;
A21: p <> {} by A1;
A22: S1[1]
proof
A23: 1 in dom p by A1, FINSEQ_3:32;
then p . 1 in B by A1, FUNCT_1:def_3;
then reconsider A = p . 1 as bag of n ;
now__::_thesis:_for_c_being_Nat
for_C_being_bag_of_n_st_c_in_dom_p_&_c_<=_1_&_p_._c_=_C_holds_
C_<=_A,T
let c be Nat; ::_thesis: for C being bag of n st c in dom p & c <= 1 & p . c = C holds
C <= A,T
let C be bag of n; ::_thesis: ( c in dom p & c <= 1 & p . c = C implies C <= A,T )
assume that
A24: c in dom p and
A25: c <= 1 and
A26: p . c = C ; ::_thesis: C <= A,T
1 <= c by A24, FINSEQ_3:25;
then C = A by A25, A26, XXREAL_0:1;
hence C <= A,T by TERMORD:6; ::_thesis: verum
end;
hence S1[1] by A23; ::_thesis: verum
end;
for k being non empty Nat holds S1[k] from NAT_1:sch_10(A22, A2);
then consider a being Nat, A being bag of n such that
A27: a in dom p and
a <= len p and
A28: p . a = A and
A29: for c being Nat
for C being bag of n st c in dom p & c <= len p & p . c = C holds
C <= A,T by A21;
take A ; ::_thesis: ( A in B & ( for x being bag of n st x in B holds
x <= A,T ) )
thus A in B by A1, A27, A28, FUNCT_1:def_3; ::_thesis: for x being bag of n st x in B holds
x <= A,T
now__::_thesis:_for_x_being_bag_of_n_st_x_in_B_holds_
x_<=_A,T
let x be bag of n; ::_thesis: ( x in B implies x <= A,T )
assume x in B ; ::_thesis: x <= A,T
then consider y being Nat such that
A30: y in dom p and
A31: p . y = x by A1, FINSEQ_2:10;
y <= len p by A30, FINSEQ_3:25;
hence x <= A,T by A29, A30, A31; ::_thesis: verum
end;
hence for x being bag of n st x in B holds
x <= A,T ; ::_thesis: verum
end;
uniqueness
for b1, b2 being bag of n st b1 in B & ( for x being bag of n st x in B holds
x <= b1,T ) & b2 in B & ( for x being bag of n st x in B holds
x <= b2,T ) holds
b1 = b2
proof
let IT1, IT2 be bag of n; ::_thesis: ( IT1 in B & ( for x being bag of n st x in B holds
x <= IT1,T ) & IT2 in B & ( for x being bag of n st x in B holds
x <= IT2,T ) implies IT1 = IT2 )
assume that
A32: IT1 in B and
A33: for x being bag of n st x in B holds
x <= IT1,T and
A34: IT2 in B and
A35: for x being bag of n st x in B holds
x <= IT2,T ; ::_thesis: IT1 = IT2
A36: IT1 <= IT2,T by A32, A35;
IT2 <= IT1,T by A33, A34;
hence IT1 = IT2 by A36, TERMORD:7; ::_thesis: verum
end;
end;
:: deftheorem Def5 defines max LEXBFS:def_5_:_
for n being Ordinal
for T being connected TermOrder of n
for B being non empty finite Subset of (Bags n)
for b4 being bag of n holds
( b4 = max (B,T) iff ( b4 in B & ( for x being bag of n st x in B holds
x <= b4,T ) ) );
registration
let O be Ordinal;
cluster InvLexOrder O -> connected ;
coherence
InvLexOrder O is connected
proof
InvLexOrder O is well-ordering by BAGORDER:25;
hence InvLexOrder O is connected by WELLORD1:def_4; ::_thesis: verum
end;
end;
Lm4: for G being _Graph
for W being Walk of G
for e, v being set st e Joins W .last() ,v,G holds
(W .addEdge e) .length() = (W .length()) + 1
proof
let G be _Graph; ::_thesis: for W being Walk of G
for e, v being set st e Joins W .last() ,v,G holds
(W .addEdge e) .length() = (W .length()) + 1
let W be Walk of G; ::_thesis: for e, v being set st e Joins W .last() ,v,G holds
(W .addEdge e) .length() = (W .length()) + 1
let e, v be set ; ::_thesis: ( e Joins W .last() ,v,G implies (W .addEdge e) .length() = (W .length()) + 1 )
assume e Joins W .last() ,v,G ; ::_thesis: (W .addEdge e) .length() = (W .length()) + 1
then A1: (W .addEdge e) .edgeSeq() = (W .edgeSeq()) ^ <*e*> by GLIB_001:82;
len <*e*> = 1 by FINSEQ_1:39;
hence (W .addEdge e) .length() = (W .length()) + 1 by A1, FINSEQ_1:22; ::_thesis: verum
end;
Lm5: for G being _Graph
for W being Walk of G holds W .length() = (W .reverse()) .length()
proof
let G be _Graph; ::_thesis: for W being Walk of G holds W .length() = (W .reverse()) .length()
let W be Walk of G; ::_thesis: W .length() = (W .reverse()) .length()
A1: len W = (2 * (W .length())) + 1 by GLIB_001:112;
len W = len (W .reverse()) by GLIB_001:21;
then ((2 * (W .length())) + 1) - 1 = ((2 * ((W .reverse()) .length())) + 1) - 1 by A1, GLIB_001:112;
hence W .length() = (W .reverse()) .length() ; ::_thesis: verum
end;
Lm6: for G being _Graph
for W being Walk of G
for e, x being set st e Joins W .last() ,x,G holds
for n being Nat st n in dom W holds
( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) )
proof
let G be _Graph; ::_thesis: for W being Walk of G
for e, x being set st e Joins W .last() ,x,G holds
for n being Nat st n in dom W holds
( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) )
let W be Walk of G; ::_thesis: for e, x being set st e Joins W .last() ,x,G holds
for n being Nat st n in dom W holds
( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) )
let e, x be set ; ::_thesis: ( e Joins W .last() ,x,G implies for n being Nat st n in dom W holds
( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) ) )
assume A1: e Joins W .last() ,x,G ; ::_thesis: for n being Nat st n in dom W holds
( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) )
let n be Nat; ::_thesis: ( n in dom W implies ( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) ) )
assume A2: n in dom W ; ::_thesis: ( (W .addEdge e) . n = W . n & n in dom (W .addEdge e) )
thus (W .addEdge e) . n = W . n by A1, A2, GLIB_001:65; ::_thesis: n in dom (W .addEdge e)
A3: 1 <= n by A2, FINSEQ_3:25;
A4: len W < (len W) + 2 by XREAL_1:29;
n <= len W by A2, FINSEQ_3:25;
then A5: n <= (len W) + 2 by A4, XXREAL_0:2;
len (W .addEdge e) = (len W) + 2 by A1, GLIB_001:64;
hence n in dom (W .addEdge e) by A3, A5, FINSEQ_3:25; ::_thesis: verum
end;
begin
definition
let s be ManySortedSet of NAT ;
attrs is iterative means :Def6: :: LEXBFS:def 6
for k, n being Nat st s . k = s . n holds
s . (k + 1) = s . (n + 1);
end;
:: deftheorem Def6 defines iterative LEXBFS:def_6_:_
for s being ManySortedSet of NAT holds
( s is iterative iff for k, n being Nat st s . k = s . n holds
s . (k + 1) = s . (n + 1) );
definition
let S be ManySortedSet of NAT ;
attrS is eventually-constant means :Def7: :: LEXBFS:def 7
ex n being Nat st
for m being Nat st n <= m holds
S . n = S . m;
end;
:: deftheorem Def7 defines eventually-constant LEXBFS:def_7_:_
for S being ManySortedSet of NAT holds
( S is eventually-constant iff ex n being Nat st
for m being Nat st n <= m holds
S . n = S . m );
registration
cluster Relation-like NAT -defined Function-like total halting iterative eventually-constant for set ;
existence
ex b1 being ManySortedSet of NAT st
( b1 is halting & b1 is iterative & b1 is eventually-constant )
proof
set Fa = NAT --> 1;
reconsider F = NAT --> 1 as ManySortedSet of NAT ;
take F ; ::_thesis: ( F is halting & F is iterative & F is eventually-constant )
F . 0 = 1 by FUNCOP_1:7;
then F . 0 = F . (0 + 1) by FUNCOP_1:7;
hence F is halting by GLIB_000:def_54; ::_thesis: ( F is iterative & F is eventually-constant )
now__::_thesis:_for_n,_k_being_Nat_st_F_._n_=_F_._k_holds_
F_._(n_+_1)_=_F_._(k_+_1)
let n, k be Nat; ::_thesis: ( F . n = F . k implies F . (n + 1) = F . (k + 1) )
assume F . n = F . k ; ::_thesis: F . (n + 1) = F . (k + 1)
F . (n + 1) = 1 by FUNCOP_1:7;
hence F . (n + 1) = F . (k + 1) by FUNCOP_1:7; ::_thesis: verum
end;
hence F is iterative by Def6; ::_thesis: F is eventually-constant
now__::_thesis:_for_n_being_Nat_st_0_<=_n_holds_
F_._0_=_F_._n
let n be Nat; ::_thesis: ( 0 <= n implies F . 0 = F . n )
assume 0 <= n ; ::_thesis: F . 0 = F . n
A1: F . 0 = 1 by FUNCOP_1:7;
n in NAT by ORDINAL1:def_12;
hence F . 0 = F . n by A1, FUNCOP_1:7; ::_thesis: verum
end;
hence F is eventually-constant by Def7; ::_thesis: verum
end;
end;
theorem Th7: :: LEXBFS:7
for Gs being ManySortedSet of NAT st Gs is halting & Gs is iterative holds
Gs is eventually-constant
proof
let Gs be ManySortedSet of NAT ; ::_thesis: ( Gs is halting & Gs is iterative implies Gs is eventually-constant )
assume that
A1: Gs is halting and
A2: Gs is iterative ; ::_thesis: Gs is eventually-constant
set GL = Gs .Lifespan() ;
defpred S1[ Nat] means Gs . (Gs .Lifespan()) = Gs . ((Gs .Lifespan()) + $1);
A3: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume S1[k] ; ::_thesis: S1[k + 1]
then Gs . ((Gs .Lifespan()) + 1) = Gs . (((Gs .Lifespan()) + k) + 1) by A2, Def6;
hence S1[k + 1] by A1, GLIB_000:def_55; ::_thesis: verum
end;
A4: S1[ 0 ] ;
A5: for k being Nat holds S1[k] from NAT_1:sch_2(A4, A3);
now__::_thesis:_for_n_being_Nat_st_Gs_.Lifespan()_<=_n_holds_
Gs_._(Gs_.Lifespan())_=_Gs_._n
let n be Nat; ::_thesis: ( Gs .Lifespan() <= n implies Gs . (Gs .Lifespan()) = Gs . n )
assume Gs .Lifespan() <= n ; ::_thesis: Gs . (Gs .Lifespan()) = Gs . n
then ex i being Nat st (Gs .Lifespan()) + i = n by NAT_1:10;
hence Gs . (Gs .Lifespan()) = Gs . n by A5; ::_thesis: verum
end;
hence Gs is eventually-constant by Def7; ::_thesis: verum
end;
registration
cluster Relation-like NAT -defined Function-like total halting iterative -> eventually-constant for set ;
coherence
for b1 being ManySortedSet of NAT st b1 is halting & b1 is iterative holds
b1 is eventually-constant by Th7;
end;
theorem Th8: :: LEXBFS:8
for Gs being ManySortedSet of NAT st Gs is eventually-constant holds
Gs is halting
proof
let Gs be ManySortedSet of NAT ; ::_thesis: ( Gs is eventually-constant implies Gs is halting )
assume Gs is eventually-constant ; ::_thesis: Gs is halting
then consider n being Nat such that
A1: for m being Nat st n <= m holds
Gs . n = Gs . m by Def7;
n <= n + 1 by NAT_1:13;
then Gs . n = Gs . (n + 1) by A1;
hence Gs is halting by GLIB_000:def_54; ::_thesis: verum
end;
registration
cluster Relation-like NAT -defined Function-like total eventually-constant -> halting for set ;
coherence
for b1 being ManySortedSet of NAT st b1 is eventually-constant holds
b1 is halting by Th8;
end;
theorem Th9: :: LEXBFS:9
for Gs being iterative eventually-constant ManySortedSet of NAT
for n being Nat st Gs .Lifespan() <= n holds
Gs . (Gs .Lifespan()) = Gs . n
proof
let Gs be iterative eventually-constant ManySortedSet of NAT ; ::_thesis: for n being Nat st Gs .Lifespan() <= n holds
Gs . (Gs .Lifespan()) = Gs . n
set GL = Gs .Lifespan() ;
defpred S1[ Nat] means Gs . (Gs .Lifespan()) = Gs . ((Gs .Lifespan()) + $1);
let n be Nat; ::_thesis: ( Gs .Lifespan() <= n implies Gs . (Gs .Lifespan()) = Gs . n )
assume Gs .Lifespan() <= n ; ::_thesis: Gs . (Gs .Lifespan()) = Gs . n
then A1: ex i being Nat st (Gs .Lifespan()) + i = n by NAT_1:10;
A2: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume S1[k] ; ::_thesis: S1[k + 1]
then Gs . ((Gs .Lifespan()) + 1) = Gs . (((Gs .Lifespan()) + k) + 1) by Def6;
hence S1[k + 1] by GLIB_000:def_55; ::_thesis: verum
end;
A3: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A3, A2);
hence Gs . (Gs .Lifespan()) = Gs . n by A1; ::_thesis: verum
end;
theorem Th10: :: LEXBFS:10
for Gs being iterative eventually-constant ManySortedSet of NAT
for n, m being Nat st Gs .Lifespan() <= n & n <= m holds
Gs . m = Gs . n
proof
let Gs be iterative eventually-constant ManySortedSet of NAT ; ::_thesis: for n, m being Nat st Gs .Lifespan() <= n & n <= m holds
Gs . m = Gs . n
let n, m be Nat; ::_thesis: ( Gs .Lifespan() <= n & n <= m implies Gs . m = Gs . n )
assume that
A1: Gs .Lifespan() <= n and
A2: n <= m ; ::_thesis: Gs . m = Gs . n
Gs . (Gs .Lifespan()) = Gs . m by A1, A2, Th9, XXREAL_0:2;
hence Gs . m = Gs . n by A1, Th9; ::_thesis: verum
end;
begin
definition
let G be finite _Graph;
mode preVNumberingSeq of G -> ManySortedSet of NAT means :Def8: :: LEXBFS:def 8
for i being Nat holds it . i is PartFunc of (the_Vertices_of G),NAT;
existence
ex b1 being ManySortedSet of NAT st
for i being Nat holds b1 . i is PartFunc of (the_Vertices_of G),NAT
proof
deffunc H1( set ) -> set = {} ;
consider f being ManySortedSet of NAT such that
A1: for i being set st i in NAT holds
f . i = H1(i) from PBOOLE:sch_4();
take f ; ::_thesis: for i being Nat holds f . i is PartFunc of (the_Vertices_of G),NAT
let i be Nat; ::_thesis: f . i is PartFunc of (the_Vertices_of G),NAT
i in NAT by ORDINAL1:def_12;
then f . i = {} by A1;
hence f . i is PartFunc of (the_Vertices_of G),NAT by RELSET_1:12; ::_thesis: verum
end;
end;
:: deftheorem Def8 defines preVNumberingSeq LEXBFS:def_8_:_
for G being finite _Graph
for b2 being ManySortedSet of NAT holds
( b2 is preVNumberingSeq of G iff for i being Nat holds b2 . i is PartFunc of (the_Vertices_of G),NAT );
definition
let G be finite _Graph;
let S be preVNumberingSeq of G;
let n be Nat;
:: original: .
redefine funcS . n -> PartFunc of (the_Vertices_of G),NAT;
coherence
S . n is PartFunc of (the_Vertices_of G),NAT by Def8;
end;
definition
let G be finite _Graph;
let S be preVNumberingSeq of G;
attrS is vertex-numbering means :Def9: :: LEXBFS:def 9
( S . 0 = {} & S is iterative & S is halting & S .Lifespan() = G .order() & ( for n being Nat st n < S .Lifespan() holds
ex w being Vertex of G st
( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan()) -' n)) ) ) );
end;
:: deftheorem Def9 defines vertex-numbering LEXBFS:def_9_:_
for G being finite _Graph
for S being preVNumberingSeq of G holds
( S is vertex-numbering iff ( S . 0 = {} & S is iterative & S is halting & S .Lifespan() = G .order() & ( for n being Nat st n < S .Lifespan() holds
ex w being Vertex of G st
( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan()) -' n)) ) ) ) );
registration
let G be finite _Graph;
cluster Relation-like NAT -defined Function-like total vertex-numbering for preVNumberingSeq of G;
existence
ex b1 being preVNumberingSeq of G st b1 is vertex-numbering
proof
set N = card (the_Vertices_of G);
set vs = canFS (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
A1: for n being Element of NAT holds s . n = H1(n) from FUNCT_2:sch_4();
defpred S1[ set , set ] means ex n being Nat st
( G = n & c2 = s * (((canFS (the_Vertices_of G)) | (Seg n)) ") );
A2: for n being set st n in NAT holds
ex j being set st S1[n,j]
proof
let n be set ; ::_thesis: ( n in NAT implies ex j being set st S1[n,j] )
assume n in NAT ; ::_thesis: ex j being set st S1[n,j]
then reconsider n9 = n as Nat ;
take s * (((canFS (the_Vertices_of G)) | (Seg n9)) ") ; ::_thesis: S1[n,s * (((canFS (the_Vertices_of G)) | (Seg n9)) ")]
thus S1[n,s * (((canFS (the_Vertices_of G)) | (Seg n9)) ")] ; ::_thesis: verum
end;
consider S being ManySortedSet of NAT such that
A3: for n being set st n in NAT holds
S1[n,S . n] from PBOOLE:sch_3(A2);
A4: for n being Nat holds S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) ")
proof
let n be Nat; ::_thesis: S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) ")
n in NAT by ORDINAL1:def_12;
then ex i9 being Nat st
( n = i9 & S . n = s * (((canFS (the_Vertices_of G)) | (Seg i9)) ") ) by A3;
hence S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) ") ; ::_thesis: verum
end;
A5: for n being Nat st n >= len (canFS (the_Vertices_of G)) holds
S . n = s * ((canFS (the_Vertices_of G)) ")
proof
A6: dom (canFS (the_Vertices_of G)) = Seg (len (canFS (the_Vertices_of G))) by FINSEQ_1:def_3;
let n be Nat; ::_thesis: ( n >= len (canFS (the_Vertices_of G)) implies S . n = s * ((canFS (the_Vertices_of G)) ") )
assume n >= len (canFS (the_Vertices_of G)) ; ::_thesis: S . n = s * ((canFS (the_Vertices_of G)) ")
then dom (canFS (the_Vertices_of G)) c= Seg n by A6, FINSEQ_1:5;
then (canFS (the_Vertices_of G)) | (Seg n) = canFS (the_Vertices_of G) by RELAT_1:68;
hence S . n = s * ((canFS (the_Vertices_of G)) ") by A4; ::_thesis: verum
end;
A7: now__::_thesis:_for_i_being_Nat_holds_S_._i_is_PartFunc_of_(the_Vertices_of_G),NAT
let i be Nat; ::_thesis: S . i is PartFunc of (the_Vertices_of G),NAT
set Si = s * (((canFS (the_Vertices_of G)) | (Seg i)) ");
now__::_thesis:_for_x_being_set_st_x_in_rng_(s_*_(((canFS_(the_Vertices_of_G))_|_(Seg_i))_"))_holds_
x_in_NAT
let x be set ; ::_thesis: ( x in rng (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) implies x in NAT )
assume x in rng (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) ; ::_thesis: x in NAT
then x in rng s by FUNCT_1:14;
hence x in NAT ; ::_thesis: verum
end;
then A8: rng (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) c= NAT by TARSKI:def_3;
(canFS (the_Vertices_of G)) | (Seg i) is one-to-one by FUNCT_1:52;
then A9: ((canFS (the_Vertices_of G)) | (Seg i)) ~ = ((canFS (the_Vertices_of G)) | (Seg i)) " by FUNCT_1:def_5;
now__::_thesis:_for_x_being_set_st_x_in_dom_(s_*_(((canFS_(the_Vertices_of_G))_|_(Seg_i))_"))_holds_
x_in_the_Vertices_of_G
let x be set ; ::_thesis: ( x in dom (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) implies x in the_Vertices_of G )
assume x in dom (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) ; ::_thesis: x in the_Vertices_of G
then x in dom (((canFS (the_Vertices_of G)) | (Seg i)) ") by FUNCT_1:11;
then x in rng ((canFS (the_Vertices_of G)) | (Seg i)) by A9, RELAT_1:20;
hence x in the_Vertices_of G ; ::_thesis: verum
end;
then A10: dom (s * (((canFS (the_Vertices_of G)) | (Seg i)) ")) c= the_Vertices_of G by TARSKI:def_3;
S . i = s * (((canFS (the_Vertices_of G)) | (Seg i)) ") by A4;
hence S . i is PartFunc of (the_Vertices_of G),NAT by A10, A8, RELSET_1:4; ::_thesis: verum
end;
A11: dom s = NAT by FUNCT_2:def_1;
A12: for n being Nat st n <= len (canFS (the_Vertices_of G)) holds
card (S . n) = n
proof
let n be Nat; ::_thesis: ( n <= len (canFS (the_Vertices_of G)) implies card (S . n) = n )
assume n <= len (canFS (the_Vertices_of G)) ; ::_thesis: card (S . n) = n
then A13: Seg n c= Seg (len (canFS (the_Vertices_of G))) by FINSEQ_1:5;
A14: (canFS (the_Vertices_of G)) | (Seg n) is one-to-one by FUNCT_1:52;
A15: S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) ") by A4;
A16: card (Seg n) = n by FINSEQ_1:57;
dom (canFS (the_Vertices_of G)) = Seg (len (canFS (the_Vertices_of G))) by FINSEQ_1:def_3;
then A17: dom ((canFS (the_Vertices_of G)) | (Seg n)) = Seg n by A13, RELAT_1:62;
then rng (((canFS (the_Vertices_of G)) | (Seg n)) ") = Seg n by A14, FUNCT_1:33;
then dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) ")) = dom (((canFS (the_Vertices_of G)) | (Seg n)) ") by A11, RELAT_1:27
.= rng ((canFS (the_Vertices_of G)) | (Seg n)) by A14, FUNCT_1:33 ;
then card (dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) "))) = n by A14, A17, A16, CARD_1:70;
hence card (S . n) = n by A15, CARD_1:62; ::_thesis: verum
end;
reconsider S = S as preVNumberingSeq of G by A7, Def8;
A18: len (canFS (the_Vertices_of G)) = card (the_Vertices_of G) by UPROOTS:3;
A19: S is iterative
proof
A20: for k, n being Nat st k < n & S . k = S . n holds
S . (k + 1) = S . (n + 1)
proof
let k, n be Nat; ::_thesis: ( k < n & S . k = S . n implies S . (k + 1) = S . (n + 1) )
assume that
A21: k < n and
A22: S . k = S . n ; ::_thesis: S . (k + 1) = S . (n + 1)
percases ( n < card (the_Vertices_of G) or card (the_Vertices_of G) <= n ) ;
supposeA23: n < card (the_Vertices_of G) ; ::_thesis: S . (k + 1) = S . (n + 1)
then card (S . n) = n by A18, A12;
hence S . (k + 1) = S . (n + 1) by A18, A12, A21, A22, A23, XXREAL_0:2; ::_thesis: verum
end;
supposeA24: card (the_Vertices_of G) <= n ; ::_thesis: S . (k + 1) = S . (n + 1)
percases ( k < card (the_Vertices_of G) or k >= card (the_Vertices_of G) ) ;
supposeA25: k < card (the_Vertices_of G) ; ::_thesis: S . (k + 1) = S . (n + 1)
A26: rng ((canFS (the_Vertices_of G)) ") c= dom s
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng ((canFS (the_Vertices_of G)) ") or x in dom s )
assume x in rng ((canFS (the_Vertices_of G)) ") ; ::_thesis: x in dom s
then x in rng ((canFS (the_Vertices_of G)) ~) by FUNCT_1:def_5;
then x in dom (canFS (the_Vertices_of G)) by RELAT_1:20;
then x in NAT ;
hence x in dom s by FUNCT_2:def_1; ::_thesis: verum
end;
A27: S . n = ((canFS (the_Vertices_of G)) ") * s by A18, A5, A24;
card (S . n) = card (dom (S . n)) by CARD_1:62
.= card (dom ((canFS (the_Vertices_of G)) ")) by A27, A26, RELAT_1:27
.= card (rng (canFS (the_Vertices_of G))) by FUNCT_1:33
.= card (dom (canFS (the_Vertices_of G))) by CARD_1:70
.= len (canFS (the_Vertices_of G)) by CARD_1:62 ;
hence S . (k + 1) = S . (n + 1) by A18, A12, A22, A25; ::_thesis: verum
end;
supposeA28: k >= card (the_Vertices_of G) ; ::_thesis: S . (k + 1) = S . (n + 1)
A29: n + 1 >= card (the_Vertices_of G) by A24, NAT_1:13;
k + 1 >= card (the_Vertices_of G) by A28, NAT_1:13;
hence S . (k + 1) = s * ((canFS (the_Vertices_of G)) ") by A18, A5
.= S . (n + 1) by A18, A5, A29 ;
::_thesis: verum
end;
end;
end;
end;
end;
let k, n be Nat; :: according to LEXBFS:def_6 ::_thesis: ( S . k = S . n implies S . (k + 1) = S . (n + 1) )
assume A30: S . k = S . n ; ::_thesis: S . (k + 1) = S . (n + 1)
percases ( k < n or k > n or k = n ) by XXREAL_0:1;
suppose k < n ; ::_thesis: S . (k + 1) = S . (n + 1)
hence S . (k + 1) = S . (n + 1) by A20, A30; ::_thesis: verum
end;
suppose k > n ; ::_thesis: S . (k + 1) = S . (n + 1)
hence S . (k + 1) = S . (n + 1) by A20, A30; ::_thesis: verum
end;
suppose k = n ; ::_thesis: S . (k + 1) = S . (n + 1)
hence S . (k + 1) = S . (n + 1) ; ::_thesis: verum
end;
end;
end;
reconsider N = card (the_Vertices_of G) as Element of NAT ;
A31: N <= N + 1 by NAT_1:11;
A32: N >= len (canFS (the_Vertices_of G)) by UPROOTS:3;
then A33: S . N = s * ((canFS (the_Vertices_of G)) ") by A5
.= S . (N + 1) by A5, A32, A31, XXREAL_0:2 ;
then A34: S is halting by GLIB_000:def_54;
A35: for n being Nat st S . n = S . (n + 1) holds
N <= n
proof
let n be Nat; ::_thesis: ( S . n = S . (n + 1) implies N <= n )
assume that
A36: S . n = S . (n + 1) and
A37: N > n ; ::_thesis: contradiction
A38: n + 1 <= N by A37, NAT_1:13;
n = card (S . (n + 1)) by A18, A12, A36, A37
.= n + 1 by A18, A12, A38 ;
hence contradiction ; ::_thesis: verum
end;
then A39: S .Lifespan() = G .order() by A33, A34, GLIB_000:def_55;
A40: now__::_thesis:_for_n_being_Nat_st_n_<_S_.Lifespan()_holds_
ex_w_being_Vertex_of_G_st_
(_not_w_in_dom_(S_._n)_&_S_._(n_+_1)_=_(S_._n)_+*_(w_.-->_((S_.Lifespan())_-'_n))_)
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 A41: 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)) )
n < N by A33, A34, A35, A41, GLIB_000:def_55;
then A42: n + 1 <= N by NAT_1:13;
set w = (canFS (the_Vertices_of G)) . (n + 1);
A43: 0 + 1 <= n + 1 by NAT_1:13;
n + 1 <= len (canFS (the_Vertices_of G)) by A42, UPROOTS:3;
then A44: n + 1 in dom (canFS (the_Vertices_of G)) by A43, FINSEQ_3:25;
then (canFS (the_Vertices_of G)) . (n + 1) in rng (canFS (the_Vertices_of G)) by FUNCT_1:3;
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)) )
A45: (canFS (the_Vertices_of G)) | (Seg n) is one-to-one by FUNCT_1:52;
hereby ::_thesis: S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan()) -' n))
assume w in dom (S . n) ; ::_thesis: contradiction
then w in dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) ")) by A4;
then w in dom (((canFS (the_Vertices_of G)) | (Seg n)) ") by FUNCT_1:11;
then w in rng ((canFS (the_Vertices_of G)) | (Seg n)) by A45, FUNCT_1:33;
then consider x being set such that
A46: x in dom ((canFS (the_Vertices_of G)) | (Seg n)) and
A47: w = ((canFS (the_Vertices_of G)) | (Seg n)) . x by FUNCT_1:def_3;
A48: w = (canFS (the_Vertices_of G)) . x by A46, A47, FUNCT_1:47;
A49: x in Seg n by A46, RELAT_1:57;
A50: x in dom (canFS (the_Vertices_of G)) by A46, RELAT_1:57;
reconsider x = x as Nat by A46;
x <= n by A49, FINSEQ_1:1;
then x <> n + 1 by NAT_1:13;
hence contradiction by A44, A48, A50, FUNCT_1:def_4; ::_thesis: verum
end;
A51: (canFS (the_Vertices_of G)) | (Seg (n + 1)) is one-to-one by FUNCT_1:52;
n <= n + 1 by NAT_1:11;
then A52: Seg n c= Seg (n + 1) by FINSEQ_1:5;
now__::_thesis:_(_dom_(S_._(n_+_1))_=_dom_((S_._n)_+*_(w_.-->_((S_.Lifespan())_-'_n)))_&_(_for_x_being_set_st_x_in_dom_(S_._(n_+_1))_holds_
(S_._(n_+_1))_._x_=_((S_._n)_+*_(w_.-->_((S_.Lifespan())_-'_n)))_._x_)_)
now__::_thesis:_for_x_being_set_holds_
(_(_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_x_in_dom_(S_._(n_+_1))_)_)
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 A4;
then x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by FUNCT_1:11;
then x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A51, FUNCT_1:33;
then consider a being set such that
A53: a in dom ((canFS (the_Vertices_of G)) | (Seg (n + 1))) and
A54: x = ((canFS (the_Vertices_of G)) | (Seg (n + 1))) . a by FUNCT_1:def_3;
A55: a in Seg (n + 1) by A53, RELAT_1:57;
A56: dom ((S . n) +* (w .--> ((S .Lifespan()) -' n))) = (dom (S . n)) \/ (dom (w .--> ((S .Lifespan()) -' n))) by FUNCT_4:def_1;
reconsider a = a as Nat by A53;
A57: a in dom (canFS (the_Vertices_of G)) by A53, RELAT_1:57;
A58: a <= n + 1 by A55, FINSEQ_1:1;
A59: 1 <= a by A55, FINSEQ_1:1;
percases ( a <= n or a = n + 1 ) by A58, NAT_1:8;
suppose a <= n ; ::_thesis: x in dom ((S . n) +* (w .--> ((S .Lifespan()) -' n)))
then A60: a in Seg n by A59, FINSEQ_1:1;
then A61: a in dom ((canFS (the_Vertices_of G)) | (Seg n)) by A57, RELAT_1:57;
A62: ((canFS (the_Vertices_of G)) | (Seg n)) . a = (canFS (the_Vertices_of G)) . a by A60, FUNCT_1:49
.= x by A54, A55, FUNCT_1:49 ;
then x in rng ((canFS (the_Vertices_of G)) | (Seg n)) by A61, FUNCT_1:3;
then A63: x in dom (((canFS (the_Vertices_of G)) | (Seg n)) ") by A45, FUNCT_1:33;
(((canFS (the_Vertices_of G)) | (Seg n)) ") . x = a by A45, A61, A62, FUNCT_1:32;
then (((canFS (the_Vertices_of G)) | (Seg n)) ") . x in dom s by A11, ORDINAL1:def_12;
then x in dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) ")) by A63, FUNCT_1:11;
then x in dom (S . n) by A4;
hence x in dom ((S . n) +* (w .--> ((S .Lifespan()) -' n))) by A56, XBOOLE_0:def_3; ::_thesis: verum
end;
suppose a = n + 1 ; ::_thesis: x in dom ((S . n) +* (w .--> ((S .Lifespan()) -' n)))
then x = w by A53, A54, FUNCT_1:47;
then x in dom (w .--> ((S .Lifespan()) -' n)) by FUNCOP_1:74;
hence x in dom ((S . n) +* (w .--> ((S .Lifespan()) -' n))) by A56, 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 A64: x in (dom (S . n)) \/ (dom (w .--> ((S .Lifespan()) -' n))) by FUNCT_4:def_1;
percases ( x in dom (S . n) or x in dom (w .--> ((S .Lifespan()) -' n)) ) by A64, XBOOLE_0:def_3;
supposeA65: x in dom (S . n) ; ::_thesis: b1 in dom (S . (n + 1))
(canFS (the_Vertices_of G)) | (Seg n) c= (canFS (the_Vertices_of G)) | (Seg (n + 1)) by A52, RELAT_1:75;
then A66: rng ((canFS (the_Vertices_of G)) | (Seg n)) c= rng ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by RELAT_1:11;
A67: x in dom (s * (((canFS (the_Vertices_of G)) | (Seg n)) ")) by A4, A65;
then A68: x in dom (((canFS (the_Vertices_of G)) | (Seg n)) ") by FUNCT_1:11;
then x in rng ((canFS (the_Vertices_of G)) | (Seg n)) by A45, FUNCT_1:33;
then x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A66;
then A69: x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by A51, FUNCT_1:33;
A70: (((canFS (the_Vertices_of G)) | (Seg n)) ") . x in dom s by A67, FUNCT_1:11;
(((canFS (the_Vertices_of G)) | (Seg n)) ") . x = (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") . x by A52, A68, Lm2;
then x in dom (s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ")) by A70, A69, FUNCT_1:11;
hence x in dom (S . (n + 1)) by A4; ::_thesis: verum
end;
supposeA71: x in dom (w .--> ((S .Lifespan()) -' n)) ; ::_thesis: b1 in dom (S . (n + 1))
A72: rng (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") = dom ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A51, FUNCT_1:33;
x = w by A71, FUNCOP_1:75;
then x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A44, FINSEQ_1:4, FUNCT_1:50;
then A73: x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by A51, FUNCT_1:33;
then (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") . x in rng (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by FUNCT_1:3;
then x in dom (s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ")) by A11, A73, A72, FUNCT_1:11;
hence x in dom (S . (n + 1)) by A4; ::_thesis: verum
end;
end;
end;
hence A74: dom (S . (n + 1)) = dom ((S . n) +* (w .--> ((S .Lifespan()) -' n))) by TARSKI:1; ::_thesis: for x being set st x in dom (S . (n + 1)) holds
(S . (n + 1)) . b2 = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . b2
let x be set ; ::_thesis: ( x in dom (S . (n + 1)) implies (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . b1 )
assume A75: x in dom (S . (n + 1)) ; ::_thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . b1
A76: x in (dom (S . n)) \/ (dom (w .--> ((S .Lifespan()) -' n))) by A74, A75, FUNCT_4:def_1;
A77: S . (n + 1) = s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by A4;
A78: S . n = s * (((canFS (the_Vertices_of G)) | (Seg n)) ") by A4;
percases ( x in dom (S . n) or x in dom (w .--> ((S .Lifespan()) -' n)) ) by A76, XBOOLE_0:def_3;
supposeA79: x in dom (S . n) ; ::_thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . b1
then A80: x in dom (((canFS (the_Vertices_of G)) | (Seg n)) ") by A78, FUNCT_1:11;
then x in rng ((canFS (the_Vertices_of G)) | (Seg n)) by A45, FUNCT_1:33;
then consider m being set such that
A81: m in dom ((canFS (the_Vertices_of G)) | (Seg n)) and
A82: ((canFS (the_Vertices_of G)) | (Seg n)) . m = x by FUNCT_1:def_3;
A83: m in Seg n by A81, RELAT_1:57;
reconsider m = m as Nat by A81;
A84: m in dom (canFS (the_Vertices_of G)) by A81, RELAT_1:57;
m <= n by A83, FINSEQ_1:1;
then A85: m < n + 1 by NAT_1:13;
(canFS (the_Vertices_of G)) . m = x by A81, A82, FUNCT_1:47;
then A86: x <> w by A44, A84, A85, FUNCT_1:def_4;
thus (S . (n + 1)) . x = s . ((((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") . x) by A75, A77, FUNCT_1:12
.= s . ((((canFS (the_Vertices_of G)) | (Seg n)) ") . x) by A52, A80, Lm2
.= (S . n) . x by A78, A79, FUNCT_1:12
.= ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . x by A86, FUNCT_4:83 ; ::_thesis: verum
end;
supposeA87: x in dom (w .--> ((S .Lifespan()) -' n)) ; ::_thesis: (S . (n + 1)) . b1 = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . b1
n + 1 in Seg (n + 1) by FINSEQ_1:4;
then A88: n + 1 in dom ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A44, RELAT_1:57;
then A89: ((canFS (the_Vertices_of G)) | (Seg (n + 1))) . (n + 1) = w by FUNCT_1:47;
A90: x = w by A87, FUNCOP_1:75;
then x in rng ((canFS (the_Vertices_of G)) | (Seg (n + 1))) by A44, FINSEQ_1:4, FUNCT_1:50;
then A91: x in dom (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") by A51, FUNCT_1:33;
A92: ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . x = (w .--> ((S .Lifespan()) -' n)) . x by A87, FUNCT_4:13
.= (S .Lifespan()) -' n by A90, FUNCOP_1:72 ;
(S . (n + 1)) . x = (s * (((canFS (the_Vertices_of G)) | (Seg (n + 1))) ")) . x by A4
.= s . ((((canFS (the_Vertices_of G)) | (Seg (n + 1))) ") . x) by A91, FUNCT_1:13
.= s . (n + 1) by A51, A90, A88, A89, FUNCT_1:32
.= (N -' (n + 1)) + 1 by A1
.= (N - (n + 1)) + 1 by A42, XREAL_1:233
.= N - n
.= (S .Lifespan()) -' n by A39, A41, XREAL_1:233 ;
hence (S . (n + 1)) . x = ((S . n) +* (w .--> ((S .Lifespan()) -' n))) . x by A92; ::_thesis: verum
end;
end;
end;
hence S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan()) -' n)) by FUNCT_1:2; ::_thesis: verum
end;
take S ; ::_thesis: S is vertex-numbering
card (S . 0) = 0 by A12;
then S . 0 = {} ;
hence S is vertex-numbering by A19, A34, A39, A40, Def9; ::_thesis: verum
end;
end;
registration
let G be finite _Graph;
cluster vertex-numbering -> halting iterative for preVNumberingSeq of G;
correctness
coherence
for b1 being preVNumberingSeq of G st b1 is vertex-numbering holds
( b1 is halting & b1 is iterative );
by Def9;
end;
definition
let G be finite _Graph;
mode VNumberingSeq of G is vertex-numbering preVNumberingSeq of G;
end;
definition
let G be finite _Graph;
let S be VNumberingSeq of G;
let n be Nat;
funcS .PickedAt n -> set means :Def10: :: LEXBFS:def 10
it = choose (the_Vertices_of G) if n >= S .Lifespan()
otherwise ( not it in dom (S . n) & S . (n + 1) = (S . n) +* (it .--> ((S .Lifespan()) -' n)) );
existence
( ( n >= S .Lifespan() implies ex b1 being set st b1 = choose (the_Vertices_of G) ) & ( not n >= S .Lifespan() implies ex b1 being set st
( not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) ) ) )
proof
percases ( n >= S .Lifespan() or n < S .Lifespan() ) ;
suppose n >= S .Lifespan() ; ::_thesis: ( ( n >= S .Lifespan() implies ex b1 being set st b1 = choose (the_Vertices_of G) ) & ( not n >= S .Lifespan() implies ex b1 being set st
( not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) ) ) )
hence ( ( n >= S .Lifespan() implies ex b1 being set st b1 = choose (the_Vertices_of G) ) & ( not n >= S .Lifespan() implies ex b1 being set st
( not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) ) ) ) ; ::_thesis: verum
end;
suppose n < S .Lifespan() ; ::_thesis: ( ( n >= S .Lifespan() implies ex b1 being set st b1 = choose (the_Vertices_of G) ) & ( not n >= S .Lifespan() implies ex b1 being set st
( not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) ) ) )
then ex w being Vertex of G st
( not w in dom (S . n) & S . (n + 1) = (S . n) +* (w .--> ((S .Lifespan()) -' n)) ) by Def9;
hence ( ( n >= S .Lifespan() implies ex b1 being set st b1 = choose (the_Vertices_of G) ) & ( not n >= S .Lifespan() implies ex b1 being set st
( not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) ) ) ) ; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being set holds
( ( n >= S .Lifespan() & b1 = choose (the_Vertices_of G) & b2 = choose (the_Vertices_of G) implies b1 = b2 ) & ( not n >= S .Lifespan() & not b1 in dom (S . n) & S . (n + 1) = (S . n) +* (b1 .--> ((S .Lifespan()) -' n)) & not b2 in dom (S . n) & S . (n + 1) = (S . n) +* (b2 .--> ((S .Lifespan()) -' n)) implies b1 = b2 ) )
proof
set VL1 = S . (n + 1);
set VLN = S . n;
let IT1, IT2 be set ; ::_thesis: ( ( n >= S .Lifespan() & IT1 = choose (the_Vertices_of G) & IT2 = choose (the_Vertices_of G) implies IT1 = IT2 ) & ( not n >= S .Lifespan() & not IT1 in dom (S . n) & S . (n + 1) = (S . n) +* (IT1 .--> ((S .Lifespan()) -' n)) & not IT2 in dom (S . n) & S . (n + 1) = (S . n) +* (IT2 .--> ((S .Lifespan()) -' n)) implies IT1 = IT2 ) )
thus ( n >= S .Lifespan() & IT1 = choose (the_Vertices_of G) & IT2 = choose (the_Vertices_of G) implies IT1 = IT2 ) ; ::_thesis: ( not n >= S .Lifespan() & not IT1 in dom (S . n) & S . (n + 1) = (S . n) +* (IT1 .--> ((S .Lifespan()) -' n)) & not IT2 in dom (S . n) & S . (n + 1) = (S . n) +* (IT2 .--> ((S .Lifespan()) -' n)) implies IT1 = IT2 )
assume n < S .Lifespan() ; ::_thesis: ( IT1 in dom (S . n) or not S . (n + 1) = (S . n) +* (IT1 .--> ((S .Lifespan()) -' n)) or IT2 in dom (S . n) or not S . (n + 1) = (S . n) +* (IT2 .--> ((S .Lifespan()) -' n)) or IT1 = IT2 )
assume that
A1: not IT1 in dom (S . n) and
A2: S . (n + 1) = (S . n) +* (IT1 .--> ((S .Lifespan()) -' n)) ; ::_thesis: ( IT2 in dom (S . n) or not S . (n + 1) = (S . n) +* (IT2 .--> ((S .Lifespan()) -' n)) or IT1 = IT2 )
set f2 = IT2 .--> ((S .Lifespan()) -' n);
set f1 = IT1 .--> ((S .Lifespan()) -' n);
assume that
not IT2 in dom (S . n) and
A3: S . (n + 1) = (S . n) +* (IT2 .--> ((S .Lifespan()) -' n)) ; ::_thesis: IT1 = IT2
dom (IT2 .--> ((S .Lifespan()) -' n)) = {IT2} by FUNCOP_1:13;
then A4: dom (S . (n + 1)) = (dom (S . n)) \/ {IT2} by A3, FUNCT_4:def_1;
dom (IT1 .--> ((S .Lifespan()) -' n)) = {IT1} by FUNCOP_1:13;
then A5: dom (S . (n + 1)) = (dom (S . n)) \/ {IT1} by A2, FUNCT_4:def_1;
now__::_thesis:_not_IT1_<>_IT2
assume IT1 <> IT2 ; ::_thesis: contradiction
then not IT1 in {IT2} by TARSKI:def_1;
then A6: not IT1 in dom (S . (n + 1)) by A1, A4, XBOOLE_0:def_3;
IT1 in {IT1} by TARSKI:def_1;
hence contradiction by A5, A6, XBOOLE_0:def_3; ::_thesis: verum
end;
hence IT1 = IT2 ; ::_thesis: verum
end;
consistency
for b1 being set holds verum ;
end;
:: deftheorem Def10 defines .PickedAt LEXBFS:def_10_:_
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat
for b4 being set holds
( ( n >= S .Lifespan() implies ( b4 = S .PickedAt n iff b4 = choose (the_Vertices_of G) ) ) & ( not n >= S .Lifespan() implies ( b4 = S .PickedAt n iff ( not b4 in dom (S . n) & S . (n + 1) = (S . n) +* (b4 .--> ((S .Lifespan()) -' n)) ) ) ) );
theorem Th11: :: LEXBFS:11
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat st n < S .Lifespan() holds
( S .PickedAt n in dom (S . (n + 1)) & dom (S . (n + 1)) = (dom (S . n)) \/ {(S .PickedAt n)} )
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat st n < S .Lifespan() holds
( S .PickedAt n in dom (S . (n + 1)) & dom (S . (n + 1)) = (dom (S . n)) \/ {(S .PickedAt n)} )
let GS be VNumberingSeq of G; ::_thesis: for n being Nat st n < GS .Lifespan() holds
( GS .PickedAt n in dom (GS . (n + 1)) & dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)} )
let n be Nat; ::_thesis: ( n < GS .Lifespan() implies ( GS .PickedAt n in dom (GS . (n + 1)) & dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)} ) )
assume A1: n < GS .Lifespan() ; ::_thesis: ( GS .PickedAt n in dom (GS . (n + 1)) & dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)} )
set f = (GS .PickedAt n) .--> ((GS .Lifespan()) -' n);
set CN1 = GS . (n + 1);
set CSN = GS . n;
set VLN = GS . n;
set VN1 = GS . (n + 1);
A2: dom ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) = {(GS .PickedAt n)} by FUNCOP_1:13;
A3: GS .PickedAt n in {(GS .PickedAt n)} by TARSKI:def_1;
A4: GS . (n + 1) = (GS . n) +* ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) by A1, Def10;
then dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)} by A2, FUNCT_4:def_1;
hence GS .PickedAt n in dom (GS . (n + 1)) by A3, XBOOLE_0:def_3; ::_thesis: dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)}
thus dom (GS . (n + 1)) = (dom (GS . n)) \/ {(GS .PickedAt n)} by A4, A2, FUNCT_4:def_1; ::_thesis: verum
end;
theorem Th12: :: LEXBFS:12
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat st n < S .Lifespan() holds
(S . (n + 1)) . (S .PickedAt n) = (S .Lifespan()) -' n
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat st n < S .Lifespan() holds
(S . (n + 1)) . (S .PickedAt n) = (S .Lifespan()) -' n
let GS be VNumberingSeq of G; ::_thesis: for n being Nat st n < GS .Lifespan() holds
(GS . (n + 1)) . (GS .PickedAt n) = (GS .Lifespan()) -' n
let n be Nat; ::_thesis: ( n < GS .Lifespan() implies (GS . (n + 1)) . (GS .PickedAt n) = (GS .Lifespan()) -' n )
assume A1: n < GS .Lifespan() ; ::_thesis: (GS . (n + 1)) . (GS .PickedAt n) = (GS .Lifespan()) -' n
set w = GS .PickedAt n;
set CN1 = GS . (n + 1);
set CSN = GS . n;
set VLN = GS . n;
set VN1 = GS . (n + 1);
set f = (GS .PickedAt n) .--> ((GS .Lifespan()) -' n);
A2: ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) . (GS .PickedAt n) = (GS .Lifespan()) -' n by FUNCOP_1:72;
dom ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) = {(GS .PickedAt n)} by FUNCOP_1:13;
then A3: GS .PickedAt n in dom ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) by TARSKI:def_1;
GS . (n + 1) = (GS . n) +* ((GS .PickedAt n) .--> ((GS .Lifespan()) -' n)) by A1, Def10;
hence (GS . (n + 1)) . (GS .PickedAt n) = (GS .Lifespan()) -' n by A3, A2, FUNCT_4:13; ::_thesis: verum
end;
theorem :: LEXBFS:13
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat st n <= S .Lifespan() holds
card (dom (S . n)) = n
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat st n <= S .Lifespan() holds
card (dom (S . n)) = n
let S be VNumberingSeq of G; ::_thesis: for n being Nat st n <= S .Lifespan() holds
card (dom (S . n)) = n
let n be Nat; ::_thesis: ( n <= S .Lifespan() implies card (dom (S . n)) = n )
assume A1: n <= S .Lifespan() ; ::_thesis: card (dom (S . n)) = n
defpred S1[ Nat] means ( $1 <= S .Lifespan() implies card (dom (S . $1)) = $1 );
A2: for k being Nat st k < S .Lifespan() & card (dom (S . k)) = k holds
card (dom (S . (k + 1))) = k + 1
proof
let k be Nat; ::_thesis: ( k < S .Lifespan() & card (dom (S . k)) = k implies card (dom (S . (k + 1))) = k + 1 )
assume that
A3: k < S .Lifespan() and
A4: card (dom (S . k)) = k ; ::_thesis: card (dom (S . (k + 1))) = k + 1
set w = S .PickedAt k;
set CK1 = S . (k + 1);
set CSK = S . k;
set VLK = S . k;
set VK1 = S . (k + 1);
set wf = (S .PickedAt k) .--> ((S .Lifespan()) -' k);
A5: dom ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) = {(S .PickedAt k)} by FUNCOP_1:13;
S . (k + 1) = (S . k) +* ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) by A3, Def10;
then A6: dom (S . (k + 1)) = (dom (S . k)) \/ {(S .PickedAt k)} by A5, FUNCT_4:def_1;
not S .PickedAt k in dom (S . k) by A3, Def10;
hence card (dom (S . (k + 1))) = k + 1 by A4, A6, CARD_2:41; ::_thesis: verum
end;
A7: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A8: S1[k] ; ::_thesis: S1[k + 1]
percases ( k < S .Lifespan() or k >= S .Lifespan() ) ;
suppose k < S .Lifespan() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by A2, A8; ::_thesis: verum
end;
suppose k >= S .Lifespan() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:13; ::_thesis: verum
end;
end;
end;
A9: S1[ 0 ] by Def9, CARD_1:27, RELAT_1:38;
for k being Nat holds S1[k] from NAT_1:sch_2(A9, A7);
hence card (dom (S . n)) = n by A1; ::_thesis: verum
end;
theorem Th14: :: LEXBFS:14
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat holds rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat holds rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
let S be VNumberingSeq of G; ::_thesis: for n being Nat holds rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
let n be Nat; ::_thesis: rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
set CSN = S . n;
set CSO = S . (S .Lifespan());
set GN = S .Lifespan() ;
defpred S1[ Nat] means ( $1 <= S .Lifespan() implies rng (S . $1) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' $1)) );
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
set CK1 = S . (k + 1);
set CSK = S . k;
set VLK = S . k;
set VK1 = S . (k + 1);
percases ( k + 1 <= S .Lifespan() or S .Lifespan() < k + 1 ) ;
supposeA3: k + 1 <= S .Lifespan() ; ::_thesis: S1[k + 1]
set w = S .PickedAt k;
set wf = (S .PickedAt k) .--> ((S .Lifespan()) -' k);
A4: dom ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) = {(S .PickedAt k)} by FUNCOP_1:13;
A5: k < S .Lifespan() by A3, NAT_1:13;
then not S .PickedAt k in dom (S . k) by Def10;
then A6: dom ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) misses dom (S . k) by A4, ZFMISC_1:50;
A7: rng ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) = {((S .Lifespan()) -' k)} by FUNCOP_1:8;
S . (k + 1) = (S . k) +* ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) by A5, Def10;
then rng (S . (k + 1)) = (rng (S . k)) \/ {((S .Lifespan()) -' k)} by A7, A6, NECKLACE:6;
hence S1[k + 1] by A2, A5, Th5; ::_thesis: verum
end;
suppose S .Lifespan() < k + 1 ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
A8: S1[ 0 ]
proof
set CS0 = S . 0;
set VL0 = S . 0;
A9: (S .Lifespan()) -' 0 = (S .Lifespan()) - 0 by XREAL_1:233;
rng (S . 0) = {} by Def9, RELAT_1:38;
hence S1[ 0 ] by A9, XBOOLE_1:37; ::_thesis: verum
end;
A10: for k being Nat holds S1[k] from NAT_1:sch_2(A8, A1);
percases ( n <= S .Lifespan() or S .Lifespan() < n ) ;
suppose n <= S .Lifespan() ; ::_thesis: rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
hence rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n)) by A10; ::_thesis: verum
end;
supposeA11: S .Lifespan() < n ; ::_thesis: rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n))
then (S .Lifespan()) - n < n - n by XREAL_1:9;
then (S .Lifespan()) -' n = 0 by XREAL_0:def_2;
then A12: (S .Lifespan()) -' (S .Lifespan()) = (S .Lifespan()) -' n by XREAL_1:232;
S . (S .Lifespan()) = S . n by A11, Th9;
hence rng (S . n) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n)) by A10, A12; ::_thesis: verum
end;
end;
end;
theorem Th15: :: LEXBFS:15
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat
for x being set holds
( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) )
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat
for x being set holds
( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) )
let S be VNumberingSeq of G; ::_thesis: for n being Nat
for x being set holds
( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) )
let n be Nat; ::_thesis: for x being set holds
( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) )
let x be set ; ::_thesis: ( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) )
set CSN = S . n;
set VLN = S . n;
A1: now__::_thesis:_(S_._n)_._x_<=_S_.Lifespan()
percases ( not x in dom (S . n) or x in dom (S . n) ) ;
suppose not x in dom (S . n) ; ::_thesis: (S . n) . x <= S .Lifespan()
hence (S . n) . x <= S .Lifespan() by FUNCT_1:def_2; ::_thesis: verum
end;
suppose x in dom (S . n) ; ::_thesis: (S . n) . x <= S .Lifespan()
then (S . n) . x in rng (S . n) by FUNCT_1:def_3;
then (S . n) . x in (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n)) by Th14;
hence (S . n) . x <= S .Lifespan() by Th3; ::_thesis: verum
end;
end;
end;
now__::_thesis:_(_x_in_dom_(S_._n)_implies_1_<=_(S_._n)_._x_)
assume x in dom (S . n) ; ::_thesis: 1 <= (S . n) . x
then (S . n) . x in rng (S . n) by FUNCT_1:def_3;
then (S . n) . x in (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n)) by Th14;
then (S .Lifespan()) -' n < (S . n) . x by Th3;
then 0 + 1 <= (S . n) . x by NAT_1:13;
hence 1 <= (S . n) . x ; ::_thesis: verum
end;
hence ( (S . n) . x <= S .Lifespan() & ( x in dom (S . n) implies 1 <= (S . n) . x ) ) by A1; ::_thesis: verum
end;
theorem Th16: :: LEXBFS:16
for G being finite _Graph
for S being VNumberingSeq of G
for n, m being Nat st (S .Lifespan()) -' n < m & m <= S .Lifespan() holds
ex v being Vertex of G st
( v in dom (S . n) & (S . n) . v = m )
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n, m being Nat st (S .Lifespan()) -' n < m & m <= S .Lifespan() holds
ex v being Vertex of G st
( v in dom (S . n) & (S . n) . v = m )
let S be VNumberingSeq of G; ::_thesis: for n, m being Nat st (S .Lifespan()) -' n < m & m <= S .Lifespan() holds
ex v being Vertex of G st
( v in dom (S . n) & (S . n) . v = m )
let n, m be Nat; ::_thesis: ( (S .Lifespan()) -' n < m & m <= S .Lifespan() implies ex v being Vertex of G st
( v in dom (S . n) & (S . n) . v = m ) )
assume that
A1: (S .Lifespan()) -' n < m and
A2: m <= S .Lifespan() ; ::_thesis: ex v being Vertex of G st
( v in dom (S . n) & (S . n) . v = m )
set CSN = S . n;
set VLN = S . n;
m in (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' n)) by A1, A2, Th3;
then m in rng (S . n) by Th14;
then consider v being set such that
A3: v in dom (S . n) and
A4: m = (S . n) . v by FUNCT_1:def_3;
take v ; ::_thesis: ( v is Vertex of G & v in dom (S . n) & (S . n) . v = m )
thus v is Vertex of G by A3; ::_thesis: ( v in dom (S . n) & (S . n) . v = m )
thus v in dom (S . n) by A3; ::_thesis: (S . n) . v = m
thus (S . n) . v = m by A4; ::_thesis: verum
end;
theorem Th17: :: LEXBFS:17
for G being finite _Graph
for S being VNumberingSeq of G
for m, n being Nat st m <= n holds
S . m c= S . n
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for m, n being Nat st m <= n holds
S . m c= S . n
let S be VNumberingSeq of G; ::_thesis: for m, n being Nat st m <= n holds
S . m c= S . n
let m, n be Nat; ::_thesis: ( m <= n implies S . m c= S . n )
assume m <= n ; ::_thesis: S . m c= S . n
then A1: ex j being Nat st n = m + j by NAT_1:10;
set CSM = S . m;
set VLM = S . m;
defpred S1[ Nat] means S . m c= S . (m + $1);
A2: now__::_thesis:_for_k_being_Nat_holds_S_._k_c=_S_._(k_+_1)
let k be Nat; ::_thesis: S . b1 c= S . (b1 + 1)
set CSK = S . k;
set VLK = S . k;
set CK1 = S . (k + 1);
set VK1 = S . (k + 1);
percases ( k < S .Lifespan() or S .Lifespan() <= k ) ;
supposeA3: k < S .Lifespan() ; ::_thesis: S . b1 c= S . (b1 + 1)
set w = S .PickedAt k;
set wf = (S .PickedAt k) .--> ((S .Lifespan()) -' k);
A4: dom ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) = {(S .PickedAt k)} by FUNCOP_1:13;
not S .PickedAt k in dom (S . k) by A3, Def10;
then A5: dom ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) misses dom (S . k) by A4, ZFMISC_1:50;
S . (k + 1) = (S . k) +* ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) by A3, Def10;
hence S . k c= S . (k + 1) by A5, FUNCT_4:32; ::_thesis: verum
end;
supposeA6: S .Lifespan() <= k ; ::_thesis: S . b1 c= S . (b1 + 1)
k <= k + 1 by NAT_1:13;
hence S . k c= S . (k + 1) by A6, Th10; ::_thesis: verum
end;
end;
end;
A7: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A8: S1[k] ; ::_thesis: S1[k + 1]
S . (m + k) c= S . ((m + k) + 1) by A2;
hence S1[k + 1] by A8, XBOOLE_1:1; ::_thesis: verum
end;
A9: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A9, A7);
hence S . m c= S . n by A1; ::_thesis: verum
end;
theorem Th18: :: LEXBFS:18
for G being finite _Graph
for S being VNumberingSeq of G
for n being Nat holds S . n is one-to-one
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for n being Nat holds S . n is one-to-one
let S be VNumberingSeq of G; ::_thesis: for n being Nat holds S . n is one-to-one
let n be Nat; ::_thesis: S . n is one-to-one
defpred S1[ Nat] means S . $1 is one-to-one ;
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
set GN = S .Lifespan() ;
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
set w = S .PickedAt k;
set CK1 = S . (k + 1);
set CSK = S . k;
set VLK = S . k;
set VL1 = S . (k + 1);
percases ( k < S .Lifespan() or k >= S .Lifespan() ) ;
supposeA3: k < S .Lifespan() ; ::_thesis: S1[k + 1]
set wf = (S .PickedAt k) .--> ((S .Lifespan()) -' k);
A4: now__::_thesis:_not_(S_.Lifespan())_-'_k_in_rng_(S_._k)
assume A5: (S .Lifespan()) -' k in rng (S . k) ; ::_thesis: contradiction
rng (S . k) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' k)) by Th14;
hence contradiction by A5, Th3; ::_thesis: verum
end;
rng ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) = {((S .Lifespan()) -' k)} by FUNCOP_1:8;
then A6: rng ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) misses rng (S . k) by A4, ZFMISC_1:50;
S . (k + 1) = (S . k) +* ((S .PickedAt k) .--> ((S .Lifespan()) -' k)) by A3, Def10;
hence S1[k + 1] by A2, A6, FUNCT_4:92; ::_thesis: verum
end;
supposeA7: k >= S .Lifespan() ; ::_thesis: S1[k + 1]
k <= k + 1 by NAT_1:13;
hence S1[k + 1] by A2, A7, Th10; ::_thesis: verum
end;
end;
end;
A8: S1[ 0 ] by Def9;
for k being Nat holds S1[k] from NAT_1:sch_2(A8, A1);
hence S . n is one-to-one ; ::_thesis: verum
end;
theorem Th19: :: LEXBFS:19
for G being finite _Graph
for S being VNumberingSeq of G
for m, n being Nat
for v being set st v in dom (S . m) & v in dom (S . n) holds
(S . m) . v = (S . n) . v
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for m, n being Nat
for v being set st v in dom (S . m) & v in dom (S . n) holds
(S . m) . v = (S . n) . v
let S be VNumberingSeq of G; ::_thesis: for m, n being Nat
for v being set st v in dom (S . m) & v in dom (S . n) holds
(S . m) . v = (S . n) . v
let m, n be Nat; ::_thesis: for v being set st v in dom (S . m) & v in dom (S . n) holds
(S . m) . v = (S . n) . v
let v be set ; ::_thesis: ( v in dom (S . m) & v in dom (S . n) implies (S . m) . v = (S . n) . v )
assume that
A1: v in dom (S . m) and
A2: v in dom (S . n) ; ::_thesis: (S . m) . v = (S . n) . v
set VLM = S . m;
A3: [v,((S . m) . v)] in S . m by A1, FUNCT_1:def_2;
set VLN = S . n;
A4: [v,((S . n) . v)] in S . n by A2, FUNCT_1:def_2;
percases ( m <= n or m > n ) ;
suppose m <= n ; ::_thesis: (S . m) . v = (S . n) . v
then S . m c= S . n by Th17;
hence (S . m) . v = (S . n) . v by A2, A3, FUNCT_1:def_2; ::_thesis: verum
end;
suppose m > n ; ::_thesis: (S . m) . v = (S . n) . v
then S . n c= S . m by Th17;
hence (S . m) . v = (S . n) . v by A1, A4, FUNCT_1:def_2; ::_thesis: verum
end;
end;
end;
theorem Th20: :: LEXBFS:20
for G being finite _Graph
for S being VNumberingSeq of G
for m, n being Nat
for v being set st v in dom (S . m) & (S . m) . v = n holds
S .PickedAt ((S .Lifespan()) -' n) = v
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for m, n being Nat
for v being set st v in dom (S . m) & (S . m) . v = n holds
S .PickedAt ((S .Lifespan()) -' n) = v
let S be VNumberingSeq of G; ::_thesis: for m, n being Nat
for v being set st v in dom (S . m) & (S . m) . v = n holds
S .PickedAt ((S .Lifespan()) -' n) = v
let m, n be Nat; ::_thesis: for v being set st v in dom (S . m) & (S . m) . v = n holds
S .PickedAt ((S .Lifespan()) -' n) = v
let v be set ; ::_thesis: ( v in dom (S . m) & (S . m) . v = n implies S .PickedAt ((S .Lifespan()) -' n) = v )
set CSM = S . m;
set VLM = S . m;
set j = (S .Lifespan()) -' n;
set CJ1 = S . (((S .Lifespan()) -' n) + 1);
set VJ1 = S . (((S .Lifespan()) -' n) + 1);
assume that
A1: v in dom (S . m) and
A2: (S . m) . v = n ; ::_thesis: S .PickedAt ((S .Lifespan()) -' n) = v
set w = S .PickedAt ((S .Lifespan()) -' n);
n <= S .Lifespan() by A2, Th15;
then A3: (S .Lifespan()) -' n = (S .Lifespan()) - n by XREAL_1:233;
A4: 0 < n by A1, A2, Th15;
then A5: (S .Lifespan()) -' n < S .Lifespan() by A3, XREAL_1:44;
then (S .Lifespan()) -' ((S .Lifespan()) -' n) = (S .Lifespan()) - ((S .Lifespan()) - n) by A3, XREAL_1:233;
then A6: (S . (((S .Lifespan()) -' n) + 1)) . (S .PickedAt ((S .Lifespan()) -' n)) = n by A4, A3, Th12, XREAL_1:44;
A7: S . m is one-to-one by Th18;
A8: S .PickedAt ((S .Lifespan()) -' n) in dom (S . (((S .Lifespan()) -' n) + 1)) by A5, Th11;
percases ( m <= (S .Lifespan()) -' n or (S .Lifespan()) -' n < m ) ;
supposeA9: m <= (S .Lifespan()) -' n ; ::_thesis: S .PickedAt ((S .Lifespan()) -' n) = v
then m + n <= ((S .Lifespan()) - n) + n by A3, XREAL_1:6;
then A10: (n + m) - m <= (S .Lifespan()) - m by XREAL_1:9;
A11: rng (S . m) = (Seg (S .Lifespan())) \ (Seg ((S .Lifespan()) -' m)) by Th14;
A12: n in rng (S . m) by A1, A2, FUNCT_1:def_3;
(S .Lifespan()) - m = (S .Lifespan()) -' m by A5, A9, XREAL_1:233, XXREAL_0:2;
hence S .PickedAt ((S .Lifespan()) -' n) = v by A10, A12, A11, Th3; ::_thesis: verum
end;
suppose (S .Lifespan()) -' n < m ; ::_thesis: S .PickedAt ((S .Lifespan()) -' n) = v
then ((S .Lifespan()) -' n) + 1 <= m by NAT_1:13;
then A13: S . (((S .Lifespan()) -' n) + 1) c= S . m by Th17;
then A14: dom (S . (((S .Lifespan()) -' n) + 1)) c= dom (S . m) by RELAT_1:11;
[(S .PickedAt ((S .Lifespan()) -' n)),n] in S . (((S .Lifespan()) -' n) + 1) by A8, A6, FUNCT_1:def_2;
then (S . m) . (S .PickedAt ((S .Lifespan()) -' n)) = n by A8, A13, A14, FUNCT_1:def_2;
hence S .PickedAt ((S .Lifespan()) -' n) = v by A1, A2, A8, A7, A14, FUNCT_1:def_4; ::_thesis: verum
end;
end;
end;
theorem Th21: :: LEXBFS:21
for G being finite _Graph
for S being VNumberingSeq of G
for m, n being Nat st n < S .Lifespan() & n < m holds
( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n )
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for m, n being Nat st n < S .Lifespan() & n < m holds
( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n )
let S be VNumberingSeq of G; ::_thesis: for m, n being Nat st n < S .Lifespan() & n < m holds
( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n )
let m, n be Nat; ::_thesis: ( n < S .Lifespan() & n < m implies ( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n ) )
assume that
A1: n < S .Lifespan() and
A2: n < m ; ::_thesis: ( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n )
set CN1 = S . (n + 1);
set VN1 = S . (n + 1);
set v = S .PickedAt n;
A3: (S . (n + 1)) . (S .PickedAt n) = (S .Lifespan()) -' n by A1, Th12;
set CSM = S . m;
set VLM = S . m;
n + 1 <= m by A2, NAT_1:13;
then S . (n + 1) c= S . m by Th17;
then A4: dom (S . (n + 1)) c= dom (S . m) by RELAT_1:11;
S .PickedAt n in dom (S . (n + 1)) by A1, Th11;
hence ( S .PickedAt n in dom (S . m) & (S . m) . (S .PickedAt n) = (S .Lifespan()) -' n ) by A3, A4, Th19; ::_thesis: verum
end;
theorem Th22: :: LEXBFS:22
for G being finite _Graph
for S being VNumberingSeq of G
for m being Nat
for v being set st v in dom (S . m) holds
( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v )
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for m being Nat
for v being set st v in dom (S . m) holds
( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v )
let S be VNumberingSeq of G; ::_thesis: for m being Nat
for v being set st v in dom (S . m) holds
( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v )
let m be Nat; ::_thesis: for v being set st v in dom (S . m) holds
( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v )
let v be set ; ::_thesis: ( v in dom (S . m) implies ( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v ) )
set VLM = S . m;
set j = (S .Lifespan()) -' ((S . m) . v);
set VLJ = S . ((S .Lifespan()) -' ((S . m) . v));
assume A1: v in dom (S . m) ; ::_thesis: ( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v )
then A2: S .PickedAt ((S .Lifespan()) -' ((S . m) . v)) = v by Th20;
A3: 0 < (S . m) . v by A1, Th15;
A4: (S . m) . v <= S .Lifespan() by Th15;
then (S .Lifespan()) -' ((S . m) . v) = (S .Lifespan()) - ((S . m) . v) by XREAL_1:233;
then A5: (S .Lifespan()) -' ((S . m) . v) < S .Lifespan() by A3, XREAL_1:44;
A6: now__::_thesis:_(S_.Lifespan())_-'_((S_._m)_._v)_<_m
percases ( m <= (S .Lifespan()) -' ((S . m) . v) or m > (S .Lifespan()) -' ((S . m) . v) ) ;
suppose m <= (S .Lifespan()) -' ((S . m) . v) ; ::_thesis: (S .Lifespan()) -' ((S . m) . v) < m
then S . m c= S . ((S .Lifespan()) -' ((S . m) . v)) by Th17;
then dom (S . m) c= dom (S . ((S .Lifespan()) -' ((S . m) . v))) by RELAT_1:11;
hence (S .Lifespan()) -' ((S . m) . v) < m by A1, A2, A5, Def10; ::_thesis: verum
end;
suppose m > (S .Lifespan()) -' ((S . m) . v) ; ::_thesis: (S .Lifespan()) -' ((S . m) . v) < m
hence (S .Lifespan()) -' ((S . m) . v) < m ; ::_thesis: verum
end;
end;
end;
now__::_thesis:_(S_.Lifespan())_-'_m_<_(S_._m)_._v
percases ( (S .Lifespan()) - m >= 0 or (S .Lifespan()) - m < 0 ) ;
supposeA7: (S .Lifespan()) - m >= 0 ; ::_thesis: (S .Lifespan()) -' m < (S . m) . v
(S .Lifespan()) - ((S . m) . v) < m by A4, A6, XREAL_1:233;
then ((S .Lifespan()) - ((S . m) . v)) + ((S . m) . v) < m + ((S . m) . v) by XREAL_1:6;
then (S .Lifespan()) - m < (((S . m) . v) + m) - m by XREAL_1:9;
hence (S .Lifespan()) -' m < (S . m) . v by A7, XREAL_0:def_2; ::_thesis: verum
end;
suppose (S .Lifespan()) - m < 0 ; ::_thesis: (S .Lifespan()) -' m < (S . m) . v
hence (S .Lifespan()) -' m < (S . m) . v by A3, XREAL_0:def_2; ::_thesis: verum
end;
end;
end;
hence ( (S .Lifespan()) -' ((S . m) . v) < m & (S .Lifespan()) -' m < (S . m) . v ) by A6; ::_thesis: verum
end;
theorem Th23: :: LEXBFS:23
for G being finite _Graph
for S being VNumberingSeq of G
for i being Nat
for a, b being set st a in dom (S . i) & b in dom (S . i) & (S . i) . a < (S . i) . b holds
b in dom (S . ((S .Lifespan()) -' ((S . i) . a)))
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for i being Nat
for a, b being set st a in dom (S . i) & b in dom (S . i) & (S . i) . a < (S . i) . b holds
b in dom (S . ((S .Lifespan()) -' ((S . i) . a)))
let S be VNumberingSeq of G; ::_thesis: for i being Nat
for a, b being set st a in dom (S . i) & b in dom (S . i) & (S . i) . a < (S . i) . b holds
b in dom (S . ((S .Lifespan()) -' ((S . i) . a)))
let i be Nat; ::_thesis: for a, b being set st a in dom (S . i) & b in dom (S . i) & (S . i) . a < (S . i) . b holds
b in dom (S . ((S .Lifespan()) -' ((S . i) . a)))
let a, b be set ; ::_thesis: ( a in dom (S . i) & b in dom (S . i) & (S . i) . a < (S . i) . b implies b in dom (S . ((S .Lifespan()) -' ((S . i) . a))) )
assume that
A1: a in dom (S . i) and
A2: b in dom (S . i) and
A3: (S . i) . a < (S . i) . b ; ::_thesis: b in dom (S . ((S .Lifespan()) -' ((S . i) . a)))
set GN = S .Lifespan() ;
set CSI = S . i;
set VLI = S . i;
set j = (S .Lifespan()) -' ((S . i) . a);
set CSJ = S . ((S .Lifespan()) -' ((S . i) . a));
set VLJ = S . ((S .Lifespan()) -' ((S . i) . a));
(S . i) . a <= S .Lifespan() by Th15;
then A4: (S .Lifespan()) -' ((S . i) . a) = (S .Lifespan()) - ((S . i) . a) by XREAL_1:233;
then (S .Lifespan()) -' ((S .Lifespan()) -' ((S . i) . a)) = (S .Lifespan()) - ((S .Lifespan()) - ((S . i) . a)) by NAT_D:35, XREAL_1:233;
then consider w being Vertex of G such that
A5: w in dom (S . ((S .Lifespan()) -' ((S . i) . a))) and
A6: (S . ((S .Lifespan()) -' ((S . i) . a))) . w = (S . i) . b by A3, Th15, Th16;
now__::_thesis:_not_(S_.Lifespan())_-'_((S_._i)_._a)_>=_i
assume (S .Lifespan()) -' ((S . i) . a) >= i ; ::_thesis: contradiction
then S . i c= S . ((S .Lifespan()) -' ((S . i) . a)) by Th17;
then A7: dom (S . i) c= dom (S . ((S .Lifespan()) -' ((S . i) . a))) by RELAT_1:11;
0 < (S . i) . a by A1, Th15;
then A8: (S .Lifespan()) -' ((S . i) . a) < S .Lifespan() by A4, XREAL_1:44;
a = S .PickedAt ((S .Lifespan()) -' ((S . i) . a)) by A1, Th20;
hence contradiction by A1, A7, A8, Def10; ::_thesis: verum
end;
then A9: S . ((S .Lifespan()) -' ((S . i) . a)) c= S . i by Th17;
A10: [w,((S . i) . b)] in S . ((S .Lifespan()) -' ((S . i) . a)) by A5, A6, FUNCT_1:1;
then A11: (S . i) . w = (S . i) . b by A9, FUNCT_1:1;
A12: S . i is one-to-one by Th18;
w in dom (S . i) by A9, A10, FUNCT_1:1;
hence b in dom (S . ((S .Lifespan()) -' ((S . i) . a))) by A2, A5, A11, A12, FUNCT_1:def_4; ::_thesis: verum
end;
theorem Th24: :: LEXBFS:24
for G being finite _Graph
for S being VNumberingSeq of G
for i being Nat
for a, b being set st a in dom (S . i) & (S . i) . a < (S . i) . b holds
not a in dom (S . ((S .Lifespan()) -' ((S . i) . b)))
proof
let G be finite _Graph; ::_thesis: for S being VNumberingSeq of G
for i being Nat
for a, b being set st a in dom (S . i) & (S . i) . a < (S . i) . b holds
not a in dom (S . ((S .Lifespan()) -' ((S . i) . b)))
let S be VNumberingSeq of G; ::_thesis: for i being Nat
for a, b being set st a in dom (S . i) & (S . i) . a < (S . i) . b holds
not a in dom (S . ((S .Lifespan()) -' ((S . i) . b)))
let i be Nat; ::_thesis: for a, b being set st a in dom (S . i) & (S . i) . a < (S . i) . b holds
not a in dom (S . ((S .Lifespan()) -' ((S . i) . b)))
let a, b be set ; ::_thesis: ( a in dom (S . i) & (S . i) . a < (S . i) . b implies not a in dom (S . ((S .Lifespan()) -' ((S . i) . b))) )
assume that
A1: a in dom (S . i) and
A2: (S . i) . a < (S . i) . b ; ::_thesis: not a in dom (S . ((S .Lifespan()) -' ((S . i) . b)))
set GN = S .Lifespan() ;
set CSI = S . i;
set VLI = S . i;
set k = (S .Lifespan()) -' ((S . i) . a);
(S . i) . a <= S .Lifespan() by Th15;
then A3: (S .Lifespan()) -' ((S . i) . a) = (S .Lifespan()) - ((S . i) . a) by XREAL_1:233;
set CSK = S . ((S .Lifespan()) -' ((S . i) . a));
set j = (S .Lifespan()) -' ((S . i) . b);
set CSJ = S . ((S .Lifespan()) -' ((S . i) . b));
set VLJ = S . ((S .Lifespan()) -' ((S . i) . b));
set VLK = S . ((S .Lifespan()) -' ((S . i) . a));
(S . i) . b <= S .Lifespan() by Th15;
then (S .Lifespan()) -' ((S . i) . b) = (S .Lifespan()) - ((S . i) . b) by XREAL_1:233;
then (S .Lifespan()) -' ((S . i) . b) < (S .Lifespan()) -' ((S . i) . a) by A2, A3, XREAL_1:15;
then S . ((S .Lifespan()) -' ((S . i) . b)) c= S . ((S .Lifespan()) -' ((S . i) . a)) by Th17;
then A4: dom (S . ((S .Lifespan()) -' ((S . i) . b))) c= dom (S . ((S .Lifespan()) -' ((S . i) . a))) by RELAT_1:11;
assume A5: a in dom (S . ((S .Lifespan()) -' ((S . i) . b))) ; ::_thesis: contradiction
1 <= (S . i) . a by A1, Th15;
then A6: (S .Lifespan()) -' ((S . i) . a) < S .Lifespan() by A3, XREAL_1:44;
S .PickedAt ((S .Lifespan()) -' ((S . i) . a)) = a by A1, Th20;
hence contradiction by A6, A5, A4, Def10; ::_thesis: verum
end;
begin
definition
let X1, X3 be set ;
let X2 be non empty set ;
let x be Element of [:(PFuncs (X1,X3)),X2:];
:: original: `1
redefine funcx `1 -> Element of PFuncs (X1,X3);
coherence
x `1 is Element of PFuncs (X1,X3) by MCART_1:10;
end;
definition
let X1, X3 be non empty set ;
let X2 be set ;
let x be Element of [:X1,(Funcs (X2,X3)):];
:: original: `2
redefine funcx `2 -> Element of Funcs (X2,X3);
coherence
x `2 is Element of Funcs (X2,X3) by MCART_1:10;
end;
definition
let G be _Graph;
mode LexBFS:Labeling of G is Element of [:(PFuncs ((the_Vertices_of G),NAT)),(Funcs ((the_Vertices_of G),(Fin NAT))):];
end;
registration
let G be finite _Graph;
let L be LexBFS:Labeling of G;
clusterL `1 -> finite ;
coherence
L `1 is finite
proof
dom (L `1) c= the_Vertices_of G ;
hence L `1 is finite by FINSET_1:10; ::_thesis: verum
end;
clusterL `2 -> finite ;
coherence
L `2 is finite ;
end;
definition
let G be _Graph;
func LexBFS:Init G -> LexBFS:Labeling of G equals :: LEXBFS:def 11
[{},((the_Vertices_of G) --> {})];
coherence
[{},((the_Vertices_of G) --> {})] is LexBFS:Labeling of G
proof
set f = (the_Vertices_of G) --> {};
A1: rng {} c= NAT ;
{} c= NAT ;
then {} in Fin NAT by FINSUB_1:def_5;
then {{}} c= Fin NAT by ZFMISC_1:31;
then A2: rng ((the_Vertices_of G) --> {}) c= Fin NAT by XBOOLE_1:1;
dom ((the_Vertices_of G) --> {}) = the_Vertices_of G by FUNCOP_1:13;
then A3: (the_Vertices_of G) --> {} in Funcs ((the_Vertices_of G),(Fin NAT)) by A2, FUNCT_2:def_2;
dom {} c= the_Vertices_of G by XBOOLE_1:2;
then {} in PFuncs ((the_Vertices_of G),NAT) by A1, PARTFUN1:def_3;
hence [{},((the_Vertices_of G) --> {})] is LexBFS:Labeling of G by A3, ZFMISC_1:def_2; ::_thesis: verum
end;
end;
:: deftheorem defines LexBFS:Init LEXBFS:def_11_:_
for G being _Graph holds LexBFS:Init G = [{},((the_Vertices_of G) --> {})];
definition
let G be finite _Graph;
let L be LexBFS:Labeling of G;
func LexBFS:PickUnnumbered L -> Vertex of G means :Def12: :: LEXBFS:def 12
it = choose (the_Vertices_of G) if dom (L `1) = the_Vertices_of G
otherwise ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & it = choose (F " {(support (max (B,(InvLexOrder NAT))))}) );
existence
( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) )
proof
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set F = (L `2) | ((the_Vertices_of G) \ (dom (L `1)));
set S = rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1))));
A1: ex f being Function st
( L `2 = f & dom f = the_Vertices_of G & rng f c= Fin NAT ) by FUNCT_2:def_2;
percases ( dom (L `1) = the_Vertices_of G or dom (L `1) <> the_Vertices_of G ) ;
suppose dom (L `1) = the_Vertices_of G ; ::_thesis: ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) )
hence ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) ) ; ::_thesis: verum
end;
supposeA2: dom (L `1) <> the_Vertices_of G ; ::_thesis: ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) )
dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by RELAT_1:61;
then A3: dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = ((the_Vertices_of G) /\ (the_Vertices_of G)) \ (dom (L `1)) by A1, XBOOLE_1:49;
A4: now__::_thesis:_not_dom_((L_`2)_|_((the_Vertices_of_G)_\_(dom_(L_`1))))_=_{}
assume dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = {} ; ::_thesis: contradiction
then the_Vertices_of G c= dom (L `1) by A3, XBOOLE_1:37;
hence contradiction by A2, XBOOLE_0:def_10; ::_thesis: verum
end;
A5: for x being set st x in rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) holds
x is finite ;
A6: rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) c= rng (L `2) by RELAT_1:70;
now__::_thesis:_for_x_being_set_st_x_in_rng_((L_`2)_|_((the_Vertices_of_G)_\_(dom_(L_`1))))_holds_
(_x_in_bool_NAT_&_x_is_finite_)
A7: rng (L `2) c= bool NAT
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng (L `2) or x in bool NAT )
assume x in rng (L `2) ; ::_thesis: x in bool NAT
then x c= NAT by FINSUB_1:def_5;
hence x in bool NAT ; ::_thesis: verum
end;
let x be set ; ::_thesis: ( x in rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) implies ( x in bool NAT & x is finite ) )
assume A8: x in rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) ; ::_thesis: ( x in bool NAT & x is finite )
x in rng (L `2) by A6, A8;
hence x in bool NAT by A7; ::_thesis: x is finite
thus x is finite by A8; ::_thesis: verum
end;
then for x being set st x in rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) holds
x in bool NAT ;
then reconsider S = rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) as non empty finite with_finite-elements Subset of (bool NAT) by A4, A5, FINSET_1:def_6, RELAT_1:42, TARSKI:def_3;
deffunc H1( finite Subset of NAT) -> Element of Bags NAT = ($1,1) -bag ;
set B = { H1(x) where x is Element of S : x in S } ;
consider z being set such that
A9: z in S by XBOOLE_0:def_1;
reconsider z = z as finite Subset of NAT by A9;
A10: (z,1) -bag in { H1(x) where x is Element of S : x in S } by A9;
A11: S is finite ;
A12: { H1(x) where x is Element of S : x in S } is finite from FRAENKEL:sch_21(A11);
now__::_thesis:_for_x_being_set_st_x_in__{__H1(x)_where_x_is_Element_of_S_:_x_in_S__}__holds_
x_in_Bags_NAT
let x be set ; ::_thesis: ( x in { H1(x) where x is Element of S : x in S } implies x in Bags NAT )
assume x in { H1(x) where x is Element of S : x in S } ; ::_thesis: x in Bags NAT
then ex y being Element of S st
( x = (y,1) -bag & y in S ) ;
hence x in Bags NAT ; ::_thesis: verum
end;
then reconsider B = { H1(x) where x is Element of S : x in S } as non empty finite Subset of (Bags NAT) by A12, A10, TARSKI:def_3;
A13: for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag )
proof
let x be set ; ::_thesis: ( x in B implies ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) )
assume x in B ; ::_thesis: ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag )
then ex y being Element of S st
( x = (y,1) -bag & y in S ) ;
hence ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ; ::_thesis: verum
end;
set mw = max (B,(InvLexOrder NAT));
max (B,(InvLexOrder NAT)) in B by Def5;
then consider y being finite Subset of NAT such that
A14: y in S and
A15: max (B,(InvLexOrder NAT)) = (y,1) -bag by A13;
set IT = choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(support (max (B,(InvLexOrder NAT))))});
y = support (max (B,(InvLexOrder NAT))) by A15, UPROOTS:8;
then not ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(support (max (B,(InvLexOrder NAT))))} is empty by A14, FUNCT_1:72;
then choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(support (max (B,(InvLexOrder NAT))))}) in dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) by FUNCT_1:def_7;
then choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(support (max (B,(InvLexOrder NAT))))}) in dom (L `2) by RELAT_1:57;
then reconsider IT = choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(support (max (B,(InvLexOrder NAT))))}) as Vertex of G ;
for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ;
then ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & IT = choose (F " {(support (max (B,(InvLexOrder NAT))))}) & IT is Vertex of G ) by A13;
hence ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) ) ; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being Vertex of G holds
( ( dom (L `1) = the_Vertices_of G & b1 = choose (the_Vertices_of G) & b2 = choose (the_Vertices_of G) implies b1 = b2 ) & ( not dom (L `1) = the_Vertices_of G & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b2 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) implies b1 = b2 ) )
proof
let IT1, IT2 be Vertex of G; ::_thesis: ( ( dom (L `1) = the_Vertices_of G & IT1 = choose (the_Vertices_of G) & IT2 = choose (the_Vertices_of G) implies IT1 = IT2 ) & ( not dom (L `1) = the_Vertices_of G & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & IT1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & IT2 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) implies IT1 = IT2 ) )
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
thus ( dom (L `1) = the_Vertices_of G & IT1 = choose (the_Vertices_of G) & IT2 = choose (the_Vertices_of G) implies IT1 = IT2 ) ; ::_thesis: ( not dom (L `1) = the_Vertices_of G & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & IT1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) & ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & IT2 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) implies IT1 = IT2 )
assume dom (L `1) <> the_Vertices_of G ; ::_thesis: ( for S being non empty finite Subset of (bool NAT)
for B being non empty finite Subset of (Bags NAT)
for F being Function holds
( not S = rng F or not F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) or ex x being finite Subset of NAT st
( x in S & not (x,1) -bag in B ) or ex x being set st
( x in B & ( for y being finite Subset of NAT holds
( not y in S or not x = (y,1) -bag ) ) ) or not IT1 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) or for S being non empty finite Subset of (bool NAT)
for B being non empty finite Subset of (Bags NAT)
for F being Function holds
( not S = rng F or not F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) or ex x being finite Subset of NAT st
( x in S & not (x,1) -bag in B ) or ex x being set st
( x in B & ( for y being finite Subset of NAT holds
( not y in S or not x = (y,1) -bag ) ) ) or not IT2 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) or IT1 = IT2 )
assume ex S1 being non empty finite Subset of (bool NAT) ex B1 being non empty finite Subset of (Bags NAT) ex F1 being Function st
( S1 = rng F1 & F1 = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S1 holds
(x,1) -bag in B1 ) & ( for x being set st x in B1 holds
ex y being finite Subset of NAT st
( y in S1 & x = (y,1) -bag ) ) & IT1 = choose (F1 " {(support (max (B1,(InvLexOrder NAT))))}) ) ; ::_thesis: ( for S being non empty finite Subset of (bool NAT)
for B being non empty finite Subset of (Bags NAT)
for F being Function holds
( not S = rng F or not F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) or ex x being finite Subset of NAT st
( x in S & not (x,1) -bag in B ) or ex x being set st
( x in B & ( for y being finite Subset of NAT holds
( not y in S or not x = (y,1) -bag ) ) ) or not IT2 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) or IT1 = IT2 )
then consider S1 being non empty finite Subset of (bool NAT), B1 being non empty finite Subset of (Bags NAT), F1 being Function such that
A16: S1 = rng F1 and
A17: F1 = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
A18: for x being finite Subset of NAT st x in S1 holds
(x,1) -bag in B1 and
A19: for x being set st x in B1 holds
ex y being finite Subset of NAT st
( y in S1 & x = (y,1) -bag ) and
A20: IT1 = choose (F1 " {(support (max (B1,(InvLexOrder NAT))))}) ;
assume ex S2 being non empty finite Subset of (bool NAT) ex B2 being non empty finite Subset of (Bags NAT) ex F2 being Function st
( S2 = rng F2 & F2 = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S2 holds
(x,1) -bag in B2 ) & ( for x being set st x in B2 holds
ex y being finite Subset of NAT st
( y in S2 & x = (y,1) -bag ) ) & IT2 = choose (F2 " {(support (max (B2,(InvLexOrder NAT))))}) ) ; ::_thesis: IT1 = IT2
then consider S2 being non empty finite Subset of (bool NAT), B2 being non empty finite Subset of (Bags NAT), F2 being Function such that
A21: S2 = rng F2 and
A22: F2 = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
A23: for x being finite Subset of NAT st x in S2 holds
(x,1) -bag in B2 and
A24: for x being set st x in B2 holds
ex y being finite Subset of NAT st
( y in S2 & x = (y,1) -bag ) and
A25: IT2 = choose (F2 " {(support (max (B2,(InvLexOrder NAT))))}) ;
now__::_thesis:_for_x_being_set_st_x_in_B2_holds_
x_in_B1
let x be set ; ::_thesis: ( x in B2 implies x in B1 )
assume x in B2 ; ::_thesis: x in B1
then ex y being finite Subset of NAT st
( y in S2 & x = (y,1) -bag ) by A24;
hence x in B1 by A16, A17, A18, A21, A22; ::_thesis: verum
end;
then A26: B2 c= B1 by TARSKI:def_3;
now__::_thesis:_for_x_being_set_st_x_in_B1_holds_
x_in_B2
let x be set ; ::_thesis: ( x in B1 implies x in B2 )
assume x in B1 ; ::_thesis: x in B2
then ex y being finite Subset of NAT st
( y in S1 & x = (y,1) -bag ) by A19;
hence x in B2 by A16, A17, A21, A22, A23; ::_thesis: verum
end;
then B1 c= B2 by TARSKI:def_3;
hence IT1 = IT2 by A17, A20, A22, A25, A26, XBOOLE_0:def_10; ::_thesis: verum
end;
consistency
for b1 being Vertex of G holds verum ;
end;
:: deftheorem Def12 defines LexBFS:PickUnnumbered LEXBFS:def_12_:_
for G being finite _Graph
for L being LexBFS:Labeling of G
for b3 being Vertex of G holds
( ( dom (L `1) = the_Vertices_of G implies ( b3 = LexBFS:PickUnnumbered L iff b3 = choose (the_Vertices_of G) ) ) & ( not dom (L `1) = the_Vertices_of G implies ( b3 = LexBFS:PickUnnumbered L iff ex S being non empty finite Subset of (bool NAT) ex B being non empty finite Subset of (Bags NAT) ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & ( for x being finite Subset of NAT st x in S holds
(x,1) -bag in B ) & ( for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) ) & b3 = choose (F " {(support (max (B,(InvLexOrder NAT))))}) ) ) ) );
definition
let G be finite _Graph;
let L be LexBFS:Labeling of G;
let v be Vertex of G;
let n be Nat;
func LexBFS:Update (L,v,n) -> LexBFS:Labeling of G equals :: LEXBFS:def 13
[((L `1) +* (v .--> ((G .order()) -' n))),((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}))];
coherence
[((L `1) +* (v .--> ((G .order()) -' n))),((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}))] is LexBFS:Labeling of G
proof
set F = ((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)};
reconsider nn = (G .order()) -' n as Element of NAT ;
set L2 = (L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)});
set f = v .--> ((G .order()) -' n);
set L1 = (L `1) +* (v .--> ((G .order()) -' n));
A1: dom (v .--> ((G .order()) -' n)) = {v} by FUNCOP_1:13;
rng (v .--> ((G .order()) -' n)) c= {((G .order()) -' n)} by FUNCOP_1:13;
then rng (v .--> ((G .order()) -' n)) c= NAT by XBOOLE_1:1;
then A2: (rng (L `1)) \/ (rng (v .--> ((G .order()) -' n))) c= NAT by XBOOLE_1:8;
rng ((L `1) +* (v .--> ((G .order()) -' n))) c= (rng (L `1)) \/ (rng (v .--> ((G .order()) -' n))) by FUNCT_4:17;
then A3: rng ((L `1) +* (v .--> ((G .order()) -' n))) c= NAT by A2, XBOOLE_1:1;
dom ((L `1) +* (v .--> ((G .order()) -' n))) = (dom (L `1)) \/ (dom (v .--> ((G .order()) -' n))) by FUNCT_4:def_1;
then dom ((L `1) +* (v .--> ((G .order()) -' n))) c= the_Vertices_of G by A1, XBOOLE_1:8;
then A4: (L `1) +* (v .--> ((G .order()) -' n)) in PFuncs ((the_Vertices_of G),NAT) by A3, PARTFUN1:def_3;
{nn} in Fin NAT by FINSUB_1:def_5;
then A5: {{nn}} c= Fin NAT by ZFMISC_1:31;
consider f being Function such that
A6: L `2 = f and
A7: dom f = the_Vertices_of G and
A8: rng f c= Fin NAT by FUNCT_2:def_2;
rng (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) c= {{nn}} by FUNCOP_1:13;
then A9: rng (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) c= Fin NAT by A5, XBOOLE_1:1;
A10: dom ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) = (dom f) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) by A6, Def2;
A11: rng ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) c= Fin NAT
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) or y in Fin NAT )
assume y in rng ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) ; ::_thesis: y in Fin NAT
then consider x being set such that
A12: x in dom ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) and
A13: y = ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) . x by FUNCT_1:def_3;
A14: y = (f . x) \/ ((((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) . x) by A6, A12, A13, Def2, A10;
percases ( ( x in dom f & not x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ) or ( not x in dom f & x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ) or ( x in dom f & x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ) ) by A12, A10, XBOOLE_0:def_3;
supposethat A15: x in dom f and
A16: not x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ; ::_thesis: y in Fin NAT
A17: (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) . x = {} by A16, FUNCT_1:def_2;
f . x in rng f by A15, FUNCT_1:3;
hence y in Fin NAT by A8, A14, A17; ::_thesis: verum
end;
supposethat A18: not x in dom f and
A19: x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ; ::_thesis: y in Fin NAT
A20: f . x = {} by A18, FUNCT_1:def_2;
(((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) . x in rng (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) by A19, FUNCT_1:3;
hence y in Fin NAT by A9, A14, A20; ::_thesis: verum
end;
supposethat A21: x in dom f and
A22: x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) ; ::_thesis: y in Fin NAT
A23: (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) . x in rng (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) by A22, FUNCT_1:3;
f . x in rng f by A21, FUNCT_1:3;
hence y in Fin NAT by A8, A9, A14, A23, FINSUB_1:def_1; ::_thesis: verum
end;
end;
end;
dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) = (G .AdjacentSet {v}) \ (dom (L `1)) by FUNCOP_1:13;
then A24: dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) c= the_Vertices_of G ;
dom ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) = (dom f) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) by A10;
then dom ((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)})) = the_Vertices_of G by A7, A24, XBOOLE_1:12;
then (L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}) in Funcs ((the_Vertices_of G),(Fin NAT)) by A11, FUNCT_2:def_2;
hence [((L `1) +* (v .--> ((G .order()) -' n))),((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}))] is LexBFS:Labeling of G by A4, ZFMISC_1:def_2; ::_thesis: verum
end;
end;
:: deftheorem defines LexBFS:Update LEXBFS:def_13_:_
for G being finite _Graph
for L being LexBFS:Labeling of G
for v being Vertex of G
for n being Nat holds LexBFS:Update (L,v,n) = [((L `1) +* (v .--> ((G .order()) -' n))),((L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' n)}))];
theorem Th25: :: LEXBFS:25
for G being finite _Graph
for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st not x in G .AdjacentSet {v} holds
(L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
proof
let G be finite _Graph; ::_thesis: for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st not x in G .AdjacentSet {v} holds
(L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
let L be LexBFS:Labeling of G; ::_thesis: for v being Vertex of G
for x being set
for k being Nat st not x in G .AdjacentSet {v} holds
(L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
let v be Vertex of G; ::_thesis: for x being set
for k being Nat st not x in G .AdjacentSet {v} holds
(L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
let x be set ; ::_thesis: for k being Nat st not x in G .AdjacentSet {v} holds
(L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
let k be Nat; ::_thesis: ( not x in G .AdjacentSet {v} implies (L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x )
assume A1: not x in G .AdjacentSet {v} ; ::_thesis: (L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
set F = ((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)};
A2: not x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by A1, XBOOLE_0:def_5;
then A3: (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) . x = {} by FUNCT_1:def_2;
set L2 = (LexBFS:Update (L,v,k)) `2 ;
A4: (LexBFS:Update (L,v,k)) `2 = (L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by MCART_1:7;
percases ( x in dom (L `2) or not x in dom (L `2) ) ;
suppose x in dom (L `2) ; ::_thesis: (L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
then x in (dom (L `2)) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)})) by XBOOLE_0:def_3;
hence ((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ ((((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) . x) by A4, Def2
.= (L `2) . x by A3 ;
::_thesis: verum
end;
supposeA5: not x in dom (L `2) ; ::_thesis: (L `2) . x = ((LexBFS:Update (L,v,k)) `2) . x
then not x in (dom (L `2)) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)})) by A2, XBOOLE_0:def_3;
then not x in dom ((LexBFS:Update (L,v,k)) `2) by A4, Def2;
hence ((LexBFS:Update (L,v,k)) `2) . x = {} by FUNCT_1:def_2
.= (L `2) . x by A5, FUNCT_1:def_2 ;
::_thesis: verum
end;
end;
end;
theorem Th26: :: LEXBFS:26
for G being finite _Graph
for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
proof
let G be finite _Graph; ::_thesis: for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
let L be LexBFS:Labeling of G; ::_thesis: for v being Vertex of G
for x being set
for k being Nat st x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
let v be Vertex of G; ::_thesis: for x being set
for k being Nat st x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
let x be set ; ::_thesis: for k being Nat st x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
let k be Nat; ::_thesis: ( x in dom (L `1) implies ((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x )
assume A1: x in dom (L `1) ; ::_thesis: ((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
set F = ((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)};
A2: not x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by A1, XBOOLE_0:def_5;
then A3: (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) . x = {} by FUNCT_1:def_2;
set L2 = (LexBFS:Update (L,v,k)) `2 ;
A4: (LexBFS:Update (L,v,k)) `2 = (L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by MCART_1:7;
percases ( x in dom (L `2) or not x in dom (L `2) ) ;
suppose x in dom (L `2) ; ::_thesis: ((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
then x in (dom (L `2)) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)})) by XBOOLE_0:def_3;
hence ((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ ((((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) . x) by A4, Def2
.= (L `2) . x by A3 ;
::_thesis: verum
end;
supposeA5: not x in dom (L `2) ; ::_thesis: ((LexBFS:Update (L,v,k)) `2) . x = (L `2) . x
then not x in (dom (L `2)) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)})) by A2, XBOOLE_0:def_3;
then not x in dom ((LexBFS:Update (L,v,k)) `2) by A4, Def2;
hence ((LexBFS:Update (L,v,k)) `2) . x = {} by FUNCT_1:def_2
.= (L `2) . x by A5, FUNCT_1:def_2 ;
::_thesis: verum
end;
end;
end;
theorem Th27: :: LEXBFS:27
for G being finite _Graph
for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st x in G .AdjacentSet {v} & not x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
proof
let G be finite _Graph; ::_thesis: for L being LexBFS:Labeling of G
for v being Vertex of G
for x being set
for k being Nat st x in G .AdjacentSet {v} & not x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
let L be LexBFS:Labeling of G; ::_thesis: for v being Vertex of G
for x being set
for k being Nat st x in G .AdjacentSet {v} & not x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
let v be Vertex of G; ::_thesis: for x being set
for k being Nat st x in G .AdjacentSet {v} & not x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
let x be set ; ::_thesis: for k being Nat st x in G .AdjacentSet {v} & not x in dom (L `1) holds
((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
let k be Nat; ::_thesis: ( x in G .AdjacentSet {v} & not x in dom (L `1) implies ((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)} )
assume that
A1: x in G .AdjacentSet {v} and
A2: not x in dom (L `1) ; ::_thesis: ((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)}
A3: x in (G .AdjacentSet {v}) \ (dom (L `1)) by A1, A2, XBOOLE_0:def_5;
then x in dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by FUNCOP_1:13;
then A4: x in (dom (L `2)) \/ (dom (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)})) by XBOOLE_0:def_3;
set L2 = (LexBFS:Update (L,v,k)) `2 ;
A5: (LexBFS:Update (L,v,k)) `2 = (L `2) .\/ (((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) by MCART_1:7;
(((G .AdjacentSet {v}) \ (dom (L `1))) --> {((G .order()) -' k)}) . x = {((G .order()) -' k)} by A3, FUNCOP_1:7;
hence ((LexBFS:Update (L,v,k)) `2) . x = ((L `2) . x) \/ {((G .order()) -' k)} by A5, A4, Def2; ::_thesis: verum
end;
definition
let G be finite _Graph;
let L be LexBFS:Labeling of G;
func LexBFS:Step L -> LexBFS:Labeling of G equals :Def14: :: LEXBFS:def 14
L if G .order() <= card (dom (L `1))
otherwise LexBFS:Update (L,(LexBFS:PickUnnumbered L),(card (dom (L `1))));
coherence
( ( G .order() <= card (dom (L `1)) implies L is LexBFS:Labeling of G ) & ( not G .order() <= card (dom (L `1)) implies LexBFS:Update (L,(LexBFS:PickUnnumbered L),(card (dom (L `1)))) is LexBFS:Labeling of G ) ) ;
consistency
for b1 being LexBFS:Labeling of G holds verum ;
end;
:: deftheorem Def14 defines LexBFS:Step LEXBFS:def_14_:_
for G being finite _Graph
for L being LexBFS:Labeling of G holds
( ( G .order() <= card (dom (L `1)) implies LexBFS:Step L = L ) & ( not G .order() <= card (dom (L `1)) implies LexBFS:Step L = LexBFS:Update (L,(LexBFS:PickUnnumbered L),(card (dom (L `1)))) ) );
definition
let G be _Graph;
mode LexBFS:LabelingSeq of G -> ManySortedSet of NAT means :Def15: :: LEXBFS:def 15
for n being Nat holds it . n is LexBFS:Labeling of G;
existence
ex b1 being ManySortedSet of NAT st
for n being Nat holds b1 . n is LexBFS:Labeling of G
proof
set L = the LexBFS:Labeling of G;
deffunc H1( set ) -> LexBFS:Labeling of G = the LexBFS:Labeling of G;
consider f being ManySortedSet of NAT such that
A1: for i being set st i in NAT holds
f . i = H1(i) from PBOOLE:sch_4();
take f ; ::_thesis: for n being Nat holds f . n is LexBFS:Labeling of G
let n be Nat; ::_thesis: f . n is LexBFS:Labeling of G
n in NAT by ORDINAL1:def_12;
hence f . n is LexBFS:Labeling of G by A1; ::_thesis: verum
end;
end;
:: deftheorem Def15 defines LexBFS:LabelingSeq LEXBFS:def_15_:_
for G being _Graph
for b2 being ManySortedSet of NAT holds
( b2 is LexBFS:LabelingSeq of G iff for n being Nat holds b2 . n is LexBFS:Labeling of G );
definition
let G be _Graph;
let S be LexBFS:LabelingSeq of G;
let n be Nat;
:: original: .
redefine funcS . n -> LexBFS:Labeling of G;
coherence
S . n is LexBFS:Labeling of G by Def15;
end;
definition
let G be _Graph;
let S be LexBFS:LabelingSeq of G;
:: original: .Result()
redefine funcS .Result() -> LexBFS:Labeling of G;
coherence
S .Result() is LexBFS:Labeling of G by Def15;
end;
definition
let G be finite _Graph;
let S be LexBFS:LabelingSeq of G;
funcS ``1 -> preVNumberingSeq of G means :Def16: :: LEXBFS:def 16
for n being Nat holds it . n = (S . n) `1 ;
existence
ex b1 being preVNumberingSeq of G st
for n being Nat holds b1 . n = (S . n) `1
proof
deffunc H1( set ) -> set = (S . $1) `1 ;
consider f being ManySortedSet of NAT such that
A1: for i being set st i in NAT holds
f . i = H1(i) from PBOOLE:sch_4();
now__::_thesis:_for_i_being_Nat_holds_f_._i_is_PartFunc_of_(the_Vertices_of_G),NAT
let i be Nat; ::_thesis: f . i is PartFunc of (the_Vertices_of G),NAT
i in NAT by ORDINAL1:def_12;
then f . i = (S . i) `1 by A1;
hence f . i is PartFunc of (the_Vertices_of G),NAT ; ::_thesis: verum
end;
then reconsider f = f as preVNumberingSeq of G by Def8;
take f ; ::_thesis: for n being Nat holds f . n = (S . n) `1
let n be Nat; ::_thesis: f . n = (S . n) `1
n in NAT by ORDINAL1:def_12;
hence f . n = (S . n) `1 by A1; ::_thesis: verum
end;
uniqueness
for b1, b2 being preVNumberingSeq of G st ( for n being Nat holds b1 . n = (S . n) `1 ) & ( for n being Nat holds b2 . n = (S . n) `1 ) holds
b1 = b2
proof
let it1, it2 be preVNumberingSeq of G; ::_thesis: ( ( for n being Nat holds it1 . n = (S . n) `1 ) & ( for n being Nat holds it2 . n = (S . n) `1 ) implies it1 = it2 )
assume that
A2: for n being Nat holds it1 . n = (S . n) `1 and
A3: for n being Nat holds it2 . n = (S . n) `1 ; ::_thesis: it1 = it2
now__::_thesis:_for_i_being_set_st_i_in_NAT_holds_
it1_._i_=_it2_._i
let i be set ; ::_thesis: ( i in NAT implies it1 . i = it2 . i )
assume i in NAT ; ::_thesis: it1 . i = it2 . i
then reconsider i9 = i as Nat ;
thus it1 . i = (S . i9) `1 by A2
.= it2 . i by A3 ; ::_thesis: verum
end;
hence it1 = it2 by PBOOLE:3; ::_thesis: verum
end;
end;
:: deftheorem Def16 defines ``1 LEXBFS:def_16_:_
for G being finite _Graph
for S being LexBFS:LabelingSeq of G
for b3 being preVNumberingSeq of G holds
( b3 = S ``1 iff for n being Nat holds b3 . n = (S . n) `1 );
definition
let G be finite _Graph;
func LexBFS:CSeq G -> LexBFS:LabelingSeq of G means :Def17: :: LEXBFS:def 17
( it . 0 = LexBFS:Init G & ( for n being Nat holds it . (n + 1) = LexBFS:Step (it . n) ) );
existence
ex b1 being LexBFS:LabelingSeq of G st
( b1 . 0 = LexBFS:Init G & ( for n being Nat holds b1 . (n + 1) = LexBFS:Step (b1 . n) ) )
proof
defpred S1[ Element of NAT , set , set ] means ( ( $2 is LexBFS:Labeling of G implies ex L being LexBFS:Labeling of G st
( $2 = L & $3 = LexBFS:Step L ) ) & ( $2 is not LexBFS:Labeling of G implies $3 = $2 ) );
now__::_thesis:_for_n_being_Element_of_NAT_
for_x_being_set_ex_y_being_set_st_S1[n,x,y]
let n be Element of NAT ; ::_thesis: for x being set ex y being set st S1[n,x,y]
let x be set ; ::_thesis: ex y being set st S1[n,x,y]
now__::_thesis:_ex_y_being_set_st_S1[n,x,y]
percases ( x is LexBFS:Labeling of G or not x is LexBFS:Labeling of G ) ;
suppose x is LexBFS:Labeling of G ; ::_thesis: ex y being set st S1[n,x,y]
then reconsider L = x as LexBFS:Labeling of G ;
LexBFS:Step L = LexBFS:Step L ;
hence ex y being set st S1[n,x,y] ; ::_thesis: verum
end;
suppose x is not LexBFS:Labeling of G ; ::_thesis: ex y being set st S1[n,x,y]
hence ex y being set st S1[n,x,y] ; ::_thesis: verum
end;
end;
end;
hence ex y being set st S1[n,x,y] ; ::_thesis: verum
end;
then A1: for n being Element of NAT
for x being set ex y being set st S1[n,x,y] ;
consider IT being Function such that
A2: ( dom IT = NAT & IT . 0 = LexBFS:Init G & ( for n being Element of NAT holds S1[n,IT . n,IT . (n + 1)] ) ) from RECDEF_1:sch_1(A1);
reconsider IT = IT as ManySortedSet of NAT by A2, PARTFUN1:def_2, RELAT_1:def_18;
defpred S2[ Nat] means IT . $1 is LexBFS:Labeling of G;
A3: now__::_thesis:_for_n_being_Nat_st_S2[n]_holds_
S2[n_+_1]
let n be Nat; ::_thesis: ( S2[n] implies S2[n + 1] )
assume A4: S2[n] ; ::_thesis: S2[n + 1]
n in NAT by ORDINAL1:def_12;
then ex Gn being LexBFS:Labeling of G st
( IT . n = Gn & IT . (n + 1) = LexBFS:Step Gn ) by A2, A4;
hence S2[n + 1] ; ::_thesis: verum
end;
A5: S2[ 0 ] by A2;
for n being Nat holds S2[n] from NAT_1:sch_2(A5, A3);
then reconsider IT = IT as LexBFS:LabelingSeq of G by Def15;
take IT ; ::_thesis: ( IT . 0 = LexBFS:Init G & ( for n being Nat holds IT . (n + 1) = LexBFS:Step (IT . n) ) )
thus IT . 0 = LexBFS:Init G by A2; ::_thesis: for n being Nat holds IT . (n + 1) = LexBFS:Step (IT . n)
let n be Nat; ::_thesis: IT . (n + 1) = LexBFS:Step (IT . n)
n in NAT by ORDINAL1:def_12;
then ex Gn being LexBFS:Labeling of G st
( IT . n = Gn & IT . (n + 1) = LexBFS:Step Gn ) by A2;
hence IT . (n + 1) = LexBFS:Step (IT . n) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being LexBFS:LabelingSeq of G st b1 . 0 = LexBFS:Init G & ( for n being Nat holds b1 . (n + 1) = LexBFS:Step (b1 . n) ) & b2 . 0 = LexBFS:Init G & ( for n being Nat holds b2 . (n + 1) = LexBFS:Step (b2 . n) ) holds
b1 = b2
proof
let IT1, IT2 be LexBFS:LabelingSeq of G; ::_thesis: ( IT1 . 0 = LexBFS:Init G & ( for n being Nat holds IT1 . (n + 1) = LexBFS:Step (IT1 . n) ) & IT2 . 0 = LexBFS:Init G & ( for n being Nat holds IT2 . (n + 1) = LexBFS:Step (IT2 . n) ) implies IT1 = IT2 )
assume that
A6: IT1 . 0 = LexBFS:Init G and
A7: for n being Nat holds IT1 . (n + 1) = LexBFS:Step (IT1 . n) and
A8: IT2 . 0 = LexBFS:Init G and
A9: for n being Nat holds IT2 . (n + 1) = LexBFS:Step (IT2 . n) ; ::_thesis: IT1 = IT2
defpred S1[ Nat] means IT1 . $1 = IT2 . $1;
now__::_thesis:_for_n_being_Nat_st_S1[n]_holds_
S1[n_+_1]
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume S1[n] ; ::_thesis: S1[n + 1]
then IT1 . (n + 1) = LexBFS:Step (IT2 . n) by A7
.= IT2 . (n + 1) by A9 ;
hence S1[n + 1] ; ::_thesis: verum
end;
then A10: for n being Element of NAT st S1[n] holds
S1[n + 1] ;
A11: S1[ 0 ] by A6, A8;
for n being Element of NAT holds S1[n] from NAT_1:sch_1(A11, A10);
then for n being set st n in NAT holds
IT1 . n = IT2 . n ;
hence IT1 = IT2 by PBOOLE:3; ::_thesis: verum
end;
end;
:: deftheorem Def17 defines LexBFS:CSeq LEXBFS:def_17_:_
for G being finite _Graph
for b2 being LexBFS:LabelingSeq of G holds
( b2 = LexBFS:CSeq G iff ( b2 . 0 = LexBFS:Init G & ( for n being Nat holds b2 . (n + 1) = LexBFS:Step (b2 . n) ) ) );
theorem Th28: :: LEXBFS:28
for G being finite _Graph holds LexBFS:CSeq G is iterative
proof
let G be finite _Graph; ::_thesis: LexBFS:CSeq G is iterative
set CS = LexBFS:CSeq G;
let k, n be Nat; :: according to LEXBFS:def_6 ::_thesis: ( (LexBFS:CSeq G) . k = (LexBFS:CSeq G) . n implies (LexBFS:CSeq G) . (k + 1) = (LexBFS:CSeq G) . (n + 1) )
assume A1: (LexBFS:CSeq G) . k = (LexBFS:CSeq G) . n ; ::_thesis: (LexBFS:CSeq G) . (k + 1) = (LexBFS:CSeq G) . (n + 1)
(LexBFS:CSeq G) . (k + 1) = LexBFS:Step ((LexBFS:CSeq G) . k) by Def17;
hence (LexBFS:CSeq G) . (k + 1) = (LexBFS:CSeq G) . (n + 1) by A1, Def17; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster LexBFS:CSeq G -> iterative ;
coherence
LexBFS:CSeq G is iterative by Th28;
end;
Lm7: for G being _Graph
for v being set holds
( dom ((LexBFS:Init G) `2) = the_Vertices_of G & ((LexBFS:Init G) `2) . v = {} )
proof
let G be _Graph; ::_thesis: for v being set holds
( dom ((LexBFS:Init G) `2) = the_Vertices_of G & ((LexBFS:Init G) `2) . v = {} )
let v be set ; ::_thesis: ( dom ((LexBFS:Init G) `2) = the_Vertices_of G & ((LexBFS:Init G) `2) . v = {} )
set g = (the_Vertices_of G) --> {};
set f = (the_Vertices_of G) --> {};
thus dom ((LexBFS:Init G) `2) = the_Vertices_of G by FUNCT_2:def_1; ::_thesis: ((LexBFS:Init G) `2) . v = {}
A1: now__::_thesis:_for_x_being_set_holds_((the_Vertices_of_G)_-->_{})_._x_=_{}
let x be set ; ::_thesis: ((the_Vertices_of G) --> {}) . b1 = {}
percases ( x in dom ((the_Vertices_of G) --> {}) or not x in dom ((the_Vertices_of G) --> {}) ) ;
suppose x in dom ((the_Vertices_of G) --> {}) ; ::_thesis: ((the_Vertices_of G) --> {}) . b1 = {}
hence ((the_Vertices_of G) --> {}) . x = {} by FUNCOP_1:7; ::_thesis: verum
end;
suppose not x in dom ((the_Vertices_of G) --> {}) ; ::_thesis: ((the_Vertices_of G) --> {}) . b1 = {}
hence ((the_Vertices_of G) --> {}) . x = {} by FUNCT_1:def_2; ::_thesis: verum
end;
end;
end;
(LexBFS:Init G) `2 = (the_Vertices_of G) --> {} by MCART_1:7;
hence ((LexBFS:Init G) `2) . v = {} by A1; ::_thesis: verum
end;
definition
let X, Y be set ;
let f be Function of X,(Fin Y);
let x be set ;
:: original: .
redefine funcf . x -> finite Subset of Y;
coherence
f . x is finite Subset of Y
proof
A1: dom f = X by FUNCT_2:def_1;
percases ( x in X or not x in X ) ;
suppose x in X ; ::_thesis: f . x is finite Subset of Y
then f . x in Fin Y by FUNCT_2:5;
hence f . x is finite Subset of Y by FINSUB_1:def_5; ::_thesis: verum
end;
suppose not x in X ; ::_thesis: f . x is finite Subset of Y
then f . x = {} by A1, FUNCT_1:def_2;
hence f . x is finite Subset of Y by XBOOLE_1:2; ::_thesis: verum
end;
end;
end;
end;
theorem Th29: :: LEXBFS:29
for G being finite _Graph
for L being LexBFS:Labeling of G
for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
proof
let G be finite _Graph; ::_thesis: for L being LexBFS:Labeling of G
for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
let L be LexBFS:Labeling of G; ::_thesis: for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
let x be set ; ::_thesis: ( not x in dom (L `1) & dom (L `1) <> the_Vertices_of G implies (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT )
assume that
A1: not x in dom (L `1) and
A2: dom (L `1) <> the_Vertices_of G ; ::_thesis: (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set w = LexBFS:PickUnnumbered L;
consider S being non empty finite Subset of (bool NAT), B being non empty finite Subset of (Bags NAT), F being Function such that
A3: S = rng F and
A4: F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
A5: for x being finite Subset of NAT st x in S holds
(x,1) -bag in B and
A6: for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) and
A7: LexBFS:PickUnnumbered L = choose (F " {(support (max (B,(InvLexOrder NAT))))}) by A2, Def12;
A8: dom F = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by A4, RELAT_1:61;
set mw = max (B,(InvLexOrder NAT));
max (B,(InvLexOrder NAT)) in B by Def5;
then consider y being finite Subset of NAT such that
A9: y in S and
A10: max (B,(InvLexOrder NAT)) = (y,1) -bag by A6;
A11: y = support (max (B,(InvLexOrder NAT))) by A10, UPROOTS:8;
then A12: not F " {(support (max (B,(InvLexOrder NAT))))} is empty by A3, A9, FUNCT_1:72;
then LexBFS:PickUnnumbered L in dom F by A7, FUNCT_1:def_7;
then A13: (L `2) . (LexBFS:PickUnnumbered L) = F . (LexBFS:PickUnnumbered L) by A4, FUNCT_1:47;
F . (LexBFS:PickUnnumbered L) in {(support (max (B,(InvLexOrder NAT))))} by A7, A12, FUNCT_1:def_7;
then A14: (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag = max (B,(InvLexOrder NAT)) by A10, A11, A13, TARSKI:def_1;
A15: dom (L `2) = the_Vertices_of G by FUNCT_2:def_1;
percases ( x in the_Vertices_of G or not x in the_Vertices_of G ) ;
suppose x in the_Vertices_of G ; ::_thesis: (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
then x in (the_Vertices_of G) \ (dom (L `1)) by A1, XBOOLE_0:def_5;
then A16: x in dom F by A15, A8, XBOOLE_0:def_4;
then A17: F . x in S by A3, FUNCT_1:def_3;
F . x = (L `2) . x by A4, A16, FUNCT_1:47;
then (((L `2) . x),1) -bag in B by A5, A17;
hence (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT by A14, Def5; ::_thesis: verum
end;
suppose not x in the_Vertices_of G ; ::_thesis: (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT
then (L `2) . x = {} by A15, FUNCT_1:def_2;
then (((L `2) . x),1) -bag = EmptyBag NAT by UPROOTS:9;
hence (((L `2) . x),1) -bag <= (((L `2) . (LexBFS:PickUnnumbered L)),1) -bag , InvLexOrder NAT by TERMORD:9; ::_thesis: verum
end;
end;
end;
theorem Th30: :: LEXBFS:30
for G being finite _Graph
for L being LexBFS:Labeling of G st dom (L `1) <> the_Vertices_of G holds
not LexBFS:PickUnnumbered L in dom (L `1)
proof
let G be finite _Graph; ::_thesis: for L being LexBFS:Labeling of G st dom (L `1) <> the_Vertices_of G holds
not LexBFS:PickUnnumbered L in dom (L `1)
let L be LexBFS:Labeling of G; ::_thesis: ( dom (L `1) <> the_Vertices_of G implies not LexBFS:PickUnnumbered L in dom (L `1) )
assume A1: dom (L `1) <> the_Vertices_of G ; ::_thesis: not LexBFS:PickUnnumbered L in dom (L `1)
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set w = LexBFS:PickUnnumbered L;
consider S being non empty finite Subset of (bool NAT), B being non empty finite Subset of (Bags NAT), F being Function such that
A2: S = rng F and
A3: F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
for x being finite Subset of NAT st x in S holds
(x,1) -bag in B and
A4: for x being set st x in B holds
ex y being finite Subset of NAT st
( y in S & x = (y,1) -bag ) and
A5: LexBFS:PickUnnumbered L = choose (F " {(support (max (B,(InvLexOrder NAT))))}) by A1, Def12;
set mw = max (B,(InvLexOrder NAT));
max (B,(InvLexOrder NAT)) in B by Def5;
then consider y being finite Subset of NAT such that
A6: y in S and
A7: max (B,(InvLexOrder NAT)) = (y,1) -bag by A4;
y = support (max (B,(InvLexOrder NAT))) by A7, UPROOTS:8;
then not F " {(support (max (B,(InvLexOrder NAT))))} is empty by A2, A6, FUNCT_1:72;
then A8: LexBFS:PickUnnumbered L in dom F by A5, FUNCT_1:def_7;
assume LexBFS:PickUnnumbered L in dom (L `1) ; ::_thesis: contradiction
then A9: not LexBFS:PickUnnumbered L in (the_Vertices_of G) \ (dom (L `1)) by XBOOLE_0:def_5;
dom F = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by A3, RELAT_1:61;
hence contradiction by A8, A9, XBOOLE_0:def_4; ::_thesis: verum
end;
theorem Th31: :: LEXBFS:31
for G being finite _Graph
for n being Nat st card (dom (((LexBFS:CSeq G) . n) `1)) < G .order() holds
((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1)))))
proof
let G be finite _Graph; ::_thesis: for n being Nat st card (dom (((LexBFS:CSeq G) . n) `1)) < G .order() holds
((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1)))))
let n be Nat; ::_thesis: ( card (dom (((LexBFS:CSeq G) . n) `1)) < G .order() implies ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1))))) )
set CS = LexBFS:CSeq G;
assume A1: card (dom (((LexBFS:CSeq G) . n) `1)) < G .order() ; ::_thesis: ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1)))))
set CN1 = (LexBFS:CSeq G) . (n + 1);
set CSN = (LexBFS:CSeq G) . n;
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n);
(LexBFS:CSeq G) . (n + 1) = LexBFS:Step ((LexBFS:CSeq G) . n) by Def17;
then (LexBFS:CSeq G) . (n + 1) = LexBFS:Update (((LexBFS:CSeq G) . n),(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)),(card (dom (((LexBFS:CSeq G) . n) `1)))) by A1, Def14;
hence ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1))))) by MCART_1:7; ::_thesis: verum
end;
theorem Th32: :: LEXBFS:32
for G being finite _Graph
for n being Nat st n <= G .order() holds
card (dom (((LexBFS:CSeq G) . n) `1)) = n
proof
let G be finite _Graph; ::_thesis: for n being Nat st n <= G .order() holds
card (dom (((LexBFS:CSeq G) . n) `1)) = n
let n be Nat; ::_thesis: ( n <= G .order() implies card (dom (((LexBFS:CSeq G) . n) `1)) = n )
assume A1: n <= G .order() ; ::_thesis: card (dom (((LexBFS:CSeq G) . n) `1)) = n
set CS = LexBFS:CSeq G;
defpred S1[ Nat] means ( $1 <= G .order() implies card (dom (((LexBFS:CSeq G) . $1) `1)) = $1 );
A2: for k being Nat st k < G .order() & card (dom (((LexBFS:CSeq G) . k) `1)) = k holds
card (dom (((LexBFS:CSeq G) . (k + 1)) `1)) = k + 1
proof
let k be Nat; ::_thesis: ( k < G .order() & card (dom (((LexBFS:CSeq G) . k) `1)) = k implies card (dom (((LexBFS:CSeq G) . (k + 1)) `1)) = k + 1 )
assume that
A3: k < G .order() and
A4: card (dom (((LexBFS:CSeq G) . k) `1)) = k ; ::_thesis: card (dom (((LexBFS:CSeq G) . (k + 1)) `1)) = k + 1
set CK1 = (LexBFS:CSeq G) . (k + 1);
set CSK = (LexBFS:CSeq G) . k;
set VLK = ((LexBFS:CSeq G) . k) `1 ;
set VK1 = ((LexBFS:CSeq G) . (k + 1)) `1 ;
set w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k);
set wf = (LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k)) .--> ((G .order()) -' k);
A5: dom ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k)) .--> ((G .order()) -' k)) = {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k))} by FUNCOP_1:13;
((LexBFS:CSeq G) . (k + 1)) `1 = (((LexBFS:CSeq G) . k) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k)) .--> ((G .order()) -' k)) by A3, A4, Th31;
then dom (((LexBFS:CSeq G) . (k + 1)) `1) = (dom (((LexBFS:CSeq G) . k) `1)) \/ {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k))} by A5, FUNCT_4:def_1;
hence card (dom (((LexBFS:CSeq G) . (k + 1)) `1)) = k + 1 by A3, A4, Th30, CARD_2:41; ::_thesis: verum
end;
A6: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A7: S1[k] ; ::_thesis: S1[k + 1]
percases ( k < G .order() or k >= G .order() ) ;
suppose k < G .order() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by A2, A7; ::_thesis: verum
end;
suppose k >= G .order() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:13; ::_thesis: verum
end;
end;
end;
(LexBFS:CSeq G) . 0 = LexBFS:Init G by Def17;
then A8: S1[ 0 ] by CARD_1:27, MCART_1:7, RELAT_1:38;
for k being Nat holds S1[k] from NAT_1:sch_2(A8, A6);
hence card (dom (((LexBFS:CSeq G) . n) `1)) = n by A1; ::_thesis: verum
end;
theorem Th33: :: LEXBFS:33
for G being finite _Graph
for n being Nat st G .order() <= n holds
(LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . n
proof
let G be finite _Graph; ::_thesis: for n being Nat st G .order() <= n holds
(LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . n
let n be Nat; ::_thesis: ( G .order() <= n implies (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . n )
assume G .order() <= n ; ::_thesis: (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . n
then A1: ex i being Nat st (G .order()) + i = n by NAT_1:10;
set CS = LexBFS:CSeq G;
defpred S1[ Nat] means G .order() = card (dom (((LexBFS:CSeq G) . ((G .order()) + $1)) `1));
defpred S2[ Nat] means (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . ((G .order()) + $1);
A2: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
set CK1 = (LexBFS:CSeq G) . (((G .order()) + k) + 1);
set CSK = (LexBFS:CSeq G) . ((G .order()) + k);
(LexBFS:CSeq G) . (((G .order()) + k) + 1) = LexBFS:Step ((LexBFS:CSeq G) . ((G .order()) + k)) by Def17;
hence S1[k + 1] by A3, Def14; ::_thesis: verum
end;
A4: S1[ 0 ] by Th32;
A5: for k being Nat holds S1[k] from NAT_1:sch_2(A4, A2);
A6: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A7: S2[k] ; ::_thesis: S2[k + 1]
set CK1 = (LexBFS:CSeq G) . (((G .order()) + k) + 1);
set CSK = (LexBFS:CSeq G) . ((G .order()) + k);
set VLK = ((LexBFS:CSeq G) . ((G .order()) + k)) `1 ;
A8: (LexBFS:CSeq G) . (((G .order()) + k) + 1) = LexBFS:Step ((LexBFS:CSeq G) . ((G .order()) + k)) by Def17;
card (dom (((LexBFS:CSeq G) . ((G .order()) + k)) `1)) = G .order() by A5;
hence S2[k + 1] by A7, A8, Def14; ::_thesis: verum
end;
A9: S2[ 0 ] ;
for k being Nat holds S2[k] from NAT_1:sch_2(A9, A6);
hence (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . n by A1; ::_thesis: verum
end;
theorem Th34: :: LEXBFS:34
for G being finite _Graph
for m, n being Nat st G .order() <= m & m <= n holds
(LexBFS:CSeq G) . m = (LexBFS:CSeq G) . n
proof
let G be finite _Graph; ::_thesis: for m, n being Nat st G .order() <= m & m <= n holds
(LexBFS:CSeq G) . m = (LexBFS:CSeq G) . n
let m, n be Nat; ::_thesis: ( G .order() <= m & m <= n implies (LexBFS:CSeq G) . m = (LexBFS:CSeq G) . n )
assume that
A1: G .order() <= m and
A2: m <= n ; ::_thesis: (LexBFS:CSeq G) . m = (LexBFS:CSeq G) . n
(LexBFS:CSeq G) . m = (LexBFS:CSeq G) . (G .order()) by A1, Th33;
hence (LexBFS:CSeq G) . m = (LexBFS:CSeq G) . n by A1, A2, Th33, XXREAL_0:2; ::_thesis: verum
end;
theorem Th35: :: LEXBFS:35
for G being finite _Graph holds LexBFS:CSeq G is eventually-constant
proof
let G be finite _Graph; ::_thesis: LexBFS:CSeq G is eventually-constant
take G .order() ; :: according to LEXBFS:def_7 ::_thesis: for m being Nat st G .order() <= m holds
(LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . m
let m be Nat; ::_thesis: ( G .order() <= m implies (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . m )
assume G .order() <= m ; ::_thesis: (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . m
hence (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . m by Th33; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster LexBFS:CSeq G -> eventually-constant ;
coherence
LexBFS:CSeq G is eventually-constant by Th35;
end;
theorem Th36: :: LEXBFS:36
for G being finite _Graph
for n being Nat holds
( dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
proof
let G be finite _Graph; ::_thesis: for n being Nat holds
( dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
let n be Nat; ::_thesis: ( dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
set CS = LexBFS:CSeq G;
set CSN = (LexBFS:CSeq G) . n;
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set CSO = (LexBFS:CSeq G) . (G .order());
set VLO = ((LexBFS:CSeq G) . (G .order())) `1 ;
thus ( not dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G or not n < G .order() ) by Th32; ::_thesis: ( G .order() <= n implies dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G )
card (dom (((LexBFS:CSeq G) . (G .order())) `1)) = card (the_Vertices_of G) by Th32;
then A1: dom (((LexBFS:CSeq G) . (G .order())) `1) = the_Vertices_of G by CARD_FIN:1;
assume G .order() <= n ; ::_thesis: dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G
hence dom (((LexBFS:CSeq G) . n) `1) = the_Vertices_of G by A1, Th34; ::_thesis: verum
end;
theorem Th37: :: LEXBFS:37
for G being finite _Graph holds (LexBFS:CSeq G) .Lifespan() = G .order()
proof
let G be finite _Graph; ::_thesis: (LexBFS:CSeq G) .Lifespan() = G .order()
set CS = LexBFS:CSeq G;
A1: for n being Nat st (LexBFS:CSeq G) . n = (LexBFS:CSeq G) . (n + 1) holds
G .order() <= n
proof
let n be Nat; ::_thesis: ( (LexBFS:CSeq G) . n = (LexBFS:CSeq G) . (n + 1) implies G .order() <= n )
assume A2: (LexBFS:CSeq G) . n = (LexBFS:CSeq G) . (n + 1) ; ::_thesis: G .order() <= n
set w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n);
set VN1 = ((LexBFS:CSeq G) . (n + 1)) `1 ;
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set j = card (dom (((LexBFS:CSeq G) . n) `1));
set wf = (LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1))));
assume A3: n < G .order() ; ::_thesis: contradiction
then dom (((LexBFS:CSeq G) . n) `1) <> the_Vertices_of G by Th36;
then A4: not LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) in dom (((LexBFS:CSeq G) . n) `1) by Th30;
card (dom (((LexBFS:CSeq G) . n) `1)) < G .order() by A3, Th32;
then A5: ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1))))) by Th31;
dom ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((LexBFS:CSeq G) . n) `1))))) = {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by FUNCOP_1:13;
then A6: dom (((LexBFS:CSeq G) . (n + 1)) `1) = (dom (((LexBFS:CSeq G) . n) `1)) \/ {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by A5, FUNCT_4:def_1;
LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) in {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by TARSKI:def_1;
hence contradiction by A2, A4, A6, XBOOLE_0:def_3; ::_thesis: verum
end;
G .order() <= (G .order()) + 1 by NAT_1:13;
then (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) . ((G .order()) + 1) by Th33;
hence (LexBFS:CSeq G) .Lifespan() = G .order() by A1, GLIB_000:def_55; ::_thesis: verum
end;
theorem Th38: :: LEXBFS:38
for G being finite _Graph holds (LexBFS:CSeq G) ``1 is eventually-constant
proof
let G be finite _Graph; ::_thesis: (LexBFS:CSeq G) ``1 is eventually-constant
set CS = LexBFS:CSeq G;
set S = (LexBFS:CSeq G) ``1 ;
now__::_thesis:_ex_n_being_Nat_st_
for_m_being_Nat_st_n_<=_m_holds_
((LexBFS:CSeq_G)_``1)_._n_=_((LexBFS:CSeq_G)_``1)_._m
consider n being Nat such that
A1: for m being Nat st n <= m holds
(LexBFS:CSeq G) . n = (LexBFS:CSeq G) . m by Def7;
take n = n; ::_thesis: for m being Nat st n <= m holds
((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) ``1) . m
let m be Nat; ::_thesis: ( n <= m implies ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) ``1) . m )
assume A2: n <= m ; ::_thesis: ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) ``1) . m
thus ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) . n) `1 by Def16
.= ((LexBFS:CSeq G) . m) `1 by A1, A2
.= ((LexBFS:CSeq G) ``1) . m by Def16 ; ::_thesis: verum
end;
hence (LexBFS:CSeq G) ``1 is eventually-constant by Def7; ::_thesis: verum
end;
theorem Th39: :: LEXBFS:39
for G being finite _Graph holds ((LexBFS:CSeq G) ``1) .Lifespan() = (LexBFS:CSeq G) .Lifespan()
proof
let G be finite _Graph; ::_thesis: ((LexBFS:CSeq G) ``1) .Lifespan() = (LexBFS:CSeq G) .Lifespan()
set S = LexBFS:CSeq G;
set VN = (LexBFS:CSeq G) ``1 ;
set ls = G .order() ;
A1: (LexBFS:CSeq G) ``1 is eventually-constant by Th38;
A2: ((LexBFS:CSeq G) . ((G .order()) + 1)) `1 = ((LexBFS:CSeq G) ``1) . ((G .order()) + 1) by Def16;
A3: now__::_thesis:_for_n_being_Nat_st_((LexBFS:CSeq_G)_``1)_._n_=_((LexBFS:CSeq_G)_``1)_._(n_+_1)_holds_
not_G_.order()_>_n
let n be Nat; ::_thesis: ( ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) ``1) . (n + 1) implies not G .order() > n )
assume that
A4: ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) ``1) . (n + 1) and
A5: G .order() > n ; ::_thesis: contradiction
n + 1 <= G .order() by A5, NAT_1:13;
then A6: card (dom (((LexBFS:CSeq G) . (n + 1)) `1)) = n + 1 by Th32;
A7: ((LexBFS:CSeq G) . (n + 1)) `1 = ((LexBFS:CSeq G) ``1) . (n + 1) by Def16;
A8: ((LexBFS:CSeq G) . n) `1 = ((LexBFS:CSeq G) ``1) . n by Def16;
card (dom (((LexBFS:CSeq G) . n) `1)) = n by A5, Th32;
hence contradiction by A4, A6, A8, A7; ::_thesis: verum
end;
((LexBFS:CSeq G) . (G .order())) `1 = ((LexBFS:CSeq G) ``1) . (G .order()) by Def16;
then A9: ((LexBFS:CSeq G) ``1) . (G .order()) = ((LexBFS:CSeq G) ``1) . ((G .order()) + 1) by A2, Th33, NAT_1:11;
(LexBFS:CSeq G) .Lifespan() = G .order() by Th37;
hence ((LexBFS:CSeq G) ``1) .Lifespan() = (LexBFS:CSeq G) .Lifespan() by A1, A9, A3, GLIB_000:def_55; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster(LexBFS:CSeq G) ``1 -> vertex-numbering ;
correctness
coherence
(LexBFS:CSeq G) ``1 is vertex-numbering ;
proof
set S = (LexBFS:CSeq G) ``1 ;
set CS = LexBFS:CSeq G;
A1: ((LexBFS:CSeq G) ``1) .Lifespan() = (LexBFS:CSeq G) .Lifespan() by Th39;
thus ((LexBFS:CSeq G) ``1) . 0 = ((LexBFS:CSeq G) . 0) `1 by Def16
.= (LexBFS:Init G) `1 by Def17
.= {} by MCART_1:7 ; :: according to LEXBFS:def_9 ::_thesis: ( (LexBFS:CSeq G) ``1 is iterative & (LexBFS:CSeq G) ``1 is halting & ((LexBFS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((LexBFS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
now__::_thesis:_for_k,_n_being_Nat_st_((LexBFS:CSeq_G)_``1)_._k_=_((LexBFS:CSeq_G)_``1)_._n_holds_
((LexBFS:CSeq_G)_``1)_._(k_+_1)_=_((LexBFS:CSeq_G)_``1)_._(n_+_1)
let k, n be Nat; ::_thesis: ( ((LexBFS:CSeq G) ``1) . k = ((LexBFS:CSeq G) ``1) . n implies ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1) )
assume A2: ((LexBFS:CSeq G) ``1) . k = ((LexBFS:CSeq G) ``1) . n ; ::_thesis: ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1)
A3: ((LexBFS:CSeq G) ``1) . (k + 1) = ((LexBFS:CSeq G) . (k + 1)) `1 by Def16;
A4: ((LexBFS:CSeq G) ``1) . k = ((LexBFS:CSeq G) . k) `1 by Def16;
A5: ((LexBFS:CSeq G) ``1) . (n + 1) = ((LexBFS:CSeq G) . (n + 1)) `1 by Def16;
A6: ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) . n) `1 by Def16;
percases ( ( k <= G .order() & n <= G .order() ) or ( k <= G .order() & n >= G .order() ) or ( k >= G .order() & n <= G .order() ) or ( k >= G .order() & n >= G .order() ) ) ;
supposeA7: ( k <= G .order() & n <= G .order() ) ; ::_thesis: ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1)
then card (dom (((LexBFS:CSeq G) . n) `1)) = n by Th32;
hence ((LexBFS:CSeq G) ``1) . (k + 1) = ((LexBFS:CSeq G) ``1) . (n + 1) by A2, A4, A6, A7, Th32; ::_thesis: verum
end;
supposeA8: ( k <= G .order() & n >= G .order() ) ; ::_thesis: ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1)
then A9: (LexBFS:CSeq G) . n = (LexBFS:CSeq G) . (G .order()) by Th33;
A10: card (dom (((LexBFS:CSeq G) . (G .order())) `1)) = G .order() by Th32;
A11: n + 1 >= G .order() by A8, NAT_1:13;
card (dom (((LexBFS:CSeq G) . k) `1)) = k by A8, Th32;
then k + 1 >= G .order() by A2, A4, A6, A9, A10, NAT_1:13;
hence ((LexBFS:CSeq G) ``1) . (k + 1) = ((LexBFS:CSeq G) . (G .order())) `1 by A3, Th33
.= ((LexBFS:CSeq G) ``1) . (n + 1) by A5, A11, Th33 ;
::_thesis: verum
end;
supposeA12: ( k >= G .order() & n <= G .order() ) ; ::_thesis: ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1)
then A13: (LexBFS:CSeq G) . k = (LexBFS:CSeq G) . (G .order()) by Th33;
A14: card (dom (((LexBFS:CSeq G) . (G .order())) `1)) = G .order() by Th32;
card (dom (((LexBFS:CSeq G) . n) `1)) = n by A12, Th32;
then A15: n + 1 >= G .order() by A2, A4, A6, A13, A14, NAT_1:13;
k + 1 >= G .order() by A12, NAT_1:13;
hence ((LexBFS:CSeq G) ``1) . (k + 1) = ((LexBFS:CSeq G) . (G .order())) `1 by A3, Th33
.= ((LexBFS:CSeq G) ``1) . (n + 1) by A5, A15, Th33 ;
::_thesis: verum
end;
supposeA16: ( k >= G .order() & n >= G .order() ) ; ::_thesis: ((LexBFS:CSeq G) ``1) . (b1 + 1) = ((LexBFS:CSeq G) ``1) . (b2 + 1)
then A17: n + 1 >= G .order() by NAT_1:13;
A18: k + 1 >= G .order() by A16, NAT_1:13;
thus ((LexBFS:CSeq G) ``1) . (k + 1) = ((LexBFS:CSeq G) . (k + 1)) `1 by Def16
.= ((LexBFS:CSeq G) . (G .order())) `1 by A18, Th33
.= ((LexBFS:CSeq G) . (n + 1)) `1 by A17, Th33
.= ((LexBFS:CSeq G) ``1) . (n + 1) by Def16 ; ::_thesis: verum
end;
end;
end;
hence (LexBFS:CSeq G) ``1 is iterative by Def6; ::_thesis: ( (LexBFS:CSeq G) ``1 is halting & ((LexBFS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((LexBFS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
(LexBFS:CSeq G) ``1 is eventually-constant by Th38;
hence (LexBFS:CSeq G) ``1 is halting ; ::_thesis: ( ((LexBFS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((LexBFS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
A19: (LexBFS:CSeq G) .Lifespan() = G .order() by Th37;
hence ((LexBFS:CSeq G) ``1) .Lifespan() = G .order() by Th39; ::_thesis: for n being Nat st n < ((LexBFS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) )
let n be Nat; ::_thesis: ( n < ((LexBFS:CSeq G) ``1) .Lifespan() implies ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) ) )
assume A20: n < ((LexBFS:CSeq G) ``1) .Lifespan() ; ::_thesis: ex w being Vertex of G st
( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) )
A21: n < G .order() by A19, A20, Th39;
take w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n); ::_thesis: ( not w in dom (((LexBFS:CSeq G) ``1) . n) & ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) )
A22: ((LexBFS:CSeq G) ``1) . n = ((LexBFS:CSeq G) . n) `1 by Def16;
A23: card (dom (((LexBFS:CSeq G) . n) `1)) = n by A21, Th32;
hence not w in dom (((LexBFS:CSeq G) ``1) . n) by A21, A22, Th30; ::_thesis: ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n))
((LexBFS:CSeq G) ``1) . (n + 1) = ((LexBFS:CSeq G) . (n + 1)) `1 by Def16;
hence ((LexBFS:CSeq G) ``1) . (n + 1) = (((LexBFS:CSeq G) ``1) . n) +* (w .--> ((((LexBFS:CSeq G) ``1) .Lifespan()) -' n)) by A1, A19, A20, A22, A23, Th31; ::_thesis: verum
end;
end;
theorem Th40: :: LEXBFS:40
for G being finite _Graph holds ((LexBFS:CSeq G) ``1) .Result() = ((LexBFS:CSeq G) .Result()) `1
proof
let G be finite _Graph; ::_thesis: ((LexBFS:CSeq G) ``1) .Result() = ((LexBFS:CSeq G) .Result()) `1
set S = LexBFS:CSeq G;
thus ((LexBFS:CSeq G) ``1) .Result() = ((LexBFS:CSeq G) ``1) . ((LexBFS:CSeq G) .Lifespan()) by Th39
.= ((LexBFS:CSeq G) .Result()) `1 by Def16 ; ::_thesis: verum
end;
theorem Th41: :: LEXBFS:41
for G being finite _Graph
for n being Nat st n < G .order() holds
((LexBFS:CSeq G) ``1) .PickedAt n = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)
proof
let G be finite _Graph; ::_thesis: for n being Nat st n < G .order() holds
((LexBFS:CSeq G) ``1) .PickedAt n = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)
let n be Nat; ::_thesis: ( n < G .order() implies ((LexBFS:CSeq G) ``1) .PickedAt n = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) )
assume A1: n < G .order() ; ::_thesis: ((LexBFS:CSeq G) ``1) .PickedAt n = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)
set CS = LexBFS:CSeq G;
set CSN = (LexBFS:CSeq G) . n;
set CS1 = (LexBFS:CSeq G) . (n + 1);
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set VL1 = ((LexBFS:CSeq G) . (n + 1)) `1 ;
A2: (LexBFS:CSeq G) .Lifespan() = G .order() by Th37;
set PU = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n);
set f2 = (LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> (((LexBFS:CSeq G) .Lifespan()) -' n);
A3: dom ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> (((LexBFS:CSeq G) .Lifespan()) -' n)) = {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by FUNCOP_1:13;
n = card (dom (((LexBFS:CSeq G) . n) `1)) by A1, Th32;
then ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)) .--> (((LexBFS:CSeq G) .Lifespan()) -' n)) by A1, A2, Th31;
then A4: dom (((LexBFS:CSeq G) . (n + 1)) `1) = (dom (((LexBFS:CSeq G) . n) `1)) \/ {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by A3, FUNCT_4:def_1;
A5: ((LexBFS:CSeq G) . n) `1 = ((LexBFS:CSeq G) ``1) . n by Def16;
set PA = ((LexBFS:CSeq G) ``1) .PickedAt n;
set f1 = (((LexBFS:CSeq G) ``1) .PickedAt n) .--> (((LexBFS:CSeq G) .Lifespan()) -' n);
A6: dom ((((LexBFS:CSeq G) ``1) .PickedAt n) .--> (((LexBFS:CSeq G) .Lifespan()) -' n)) = {(((LexBFS:CSeq G) ``1) .PickedAt n)} by FUNCOP_1:13;
A7: (LexBFS:CSeq G) .Lifespan() = ((LexBFS:CSeq G) ``1) .Lifespan() by Th39;
((LexBFS:CSeq G) . (n + 1)) `1 = ((LexBFS:CSeq G) ``1) . (n + 1) by Def16;
then ((LexBFS:CSeq G) . (n + 1)) `1 = (((LexBFS:CSeq G) . n) `1) +* ((((LexBFS:CSeq G) ``1) .PickedAt n) .--> (((LexBFS:CSeq G) .Lifespan()) -' n)) by A1, A2, A7, A5, Def10;
then A8: dom (((LexBFS:CSeq G) . (n + 1)) `1) = (dom (((LexBFS:CSeq G) . n) `1)) \/ {(((LexBFS:CSeq G) ``1) .PickedAt n)} by A6, FUNCT_4:def_1;
A9: not ((LexBFS:CSeq G) ``1) .PickedAt n in dom (((LexBFS:CSeq G) . n) `1) by A1, A2, A7, A5, Def10;
now__::_thesis:_not_((LexBFS:CSeq_G)_``1)_.PickedAt_n_<>_LexBFS:PickUnnumbered_((LexBFS:CSeq_G)_._n)
assume ((LexBFS:CSeq G) ``1) .PickedAt n <> LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) ; ::_thesis: contradiction
then not ((LexBFS:CSeq G) ``1) .PickedAt n in {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} by TARSKI:def_1;
then A10: not ((LexBFS:CSeq G) ``1) .PickedAt n in dom (((LexBFS:CSeq G) . (n + 1)) `1) by A9, A4, XBOOLE_0:def_3;
((LexBFS:CSeq G) ``1) .PickedAt n in {(((LexBFS:CSeq G) ``1) .PickedAt n)} by TARSKI:def_1;
hence contradiction by A8, A10, XBOOLE_0:def_3; ::_thesis: verum
end;
hence ((LexBFS:CSeq G) ``1) .PickedAt n = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) ; ::_thesis: verum
end;
theorem Th42: :: LEXBFS:42
for G being finite _Graph
for n being Nat st n < G .order() holds
ex w being Vertex of G st
( w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) )
proof
let G be finite _Graph; ::_thesis: for n being Nat st n < G .order() holds
ex w being Vertex of G st
( w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) )
let n be Nat; ::_thesis: ( n < G .order() implies ex w being Vertex of G st
( w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) ) )
assume A1: n < G .order() ; ::_thesis: ex w being Vertex of G st
( w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) )
set CS = LexBFS:CSeq G;
set CSN = (LexBFS:CSeq G) . n;
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set V2N = ((LexBFS:CSeq G) . n) `2 ;
set CN1 = (LexBFS:CSeq G) . (n + 1);
set V21 = ((LexBFS:CSeq G) . (n + 1)) `2 ;
set w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n);
take LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) ; ::_thesis: ( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) )
A2: (LexBFS:CSeq G) . (n + 1) = LexBFS:Step ((LexBFS:CSeq G) . n) by Def17;
card (dom (((LexBFS:CSeq G) . n) `1)) = n by A1, Th32;
then A3: (LexBFS:CSeq G) . (n + 1) = LexBFS:Update (((LexBFS:CSeq G) . n),(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n)),n) by A1, A2, Def14;
now__::_thesis:_for_v_being_set_st_(_not_v_in_G_.AdjacentSet_{(LexBFS:PickUnnumbered_((LexBFS:CSeq_G)_._n))}_or_v_in_dom_(((LexBFS:CSeq_G)_._n)_`1)_)_holds_
(((LexBFS:CSeq_G)_._(n_+_1))_`2)_._v_=_(((LexBFS:CSeq_G)_._n)_`2)_._v
let v be set ; ::_thesis: ( ( not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . b1 = (((LexBFS:CSeq G) . n) `2) . b1 )
assume A4: ( not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} or v in dom (((LexBFS:CSeq G) . n) `1) ) ; ::_thesis: (((LexBFS:CSeq G) . (n + 1)) `2) . b1 = (((LexBFS:CSeq G) . n) `2) . b1
percases ( not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} or v in dom (((LexBFS:CSeq G) . n) `1) ) by A4;
suppose not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} ; ::_thesis: (((LexBFS:CSeq G) . (n + 1)) `2) . b1 = (((LexBFS:CSeq G) . n) `2) . b1
hence (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v by A3, Th25; ::_thesis: verum
end;
suppose v in dom (((LexBFS:CSeq G) . n) `1) ; ::_thesis: (((LexBFS:CSeq G) . (n + 1)) `2) . b1 = (((LexBFS:CSeq G) . n) `2) . b1
hence (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v by A3, Th26; ::_thesis: verum
end;
end;
end;
hence ( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {(LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n))} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) ) by A3, Th27; ::_thesis: verum
end;
theorem Th43: :: LEXBFS:43
for G being finite _Graph
for i being Nat
for v being set holds (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
proof
let G be finite _Graph; ::_thesis: for i being Nat
for v being set holds (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
let i be Nat; ::_thesis: for v being set holds (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
let v be set ; ::_thesis: (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
set CS = LexBFS:CSeq G;
set CSI = (LexBFS:CSeq G) . i;
set V2I = ((LexBFS:CSeq G) . i) `2 ;
set CSO = (LexBFS:CSeq G) . (G .order());
set V2O = ((LexBFS:CSeq G) . (G .order())) `2 ;
defpred S1[ Nat] means ( $1 <= G .order() implies (((LexBFS:CSeq G) . $1) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' $1)) );
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
set CK1 = (LexBFS:CSeq G) . (k + 1);
set CSK = (LexBFS:CSeq G) . k;
set V2K = ((LexBFS:CSeq G) . k) `2 ;
set VLK = ((LexBFS:CSeq G) . k) `1 ;
set V21 = ((LexBFS:CSeq G) . (k + 1)) `2 ;
percases ( k + 1 <= G .order() or G .order() < k + 1 ) ;
suppose k + 1 <= G .order() ; ::_thesis: S1[k + 1]
then A3: k < G .order() by NAT_1:13;
then consider w being Vertex of G such that
w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . k) and
A4: for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . k) `1) implies (((LexBFS:CSeq G) . (k + 1)) `2) . v = ((((LexBFS:CSeq G) . k) `2) . v) \/ {((G .order()) -' k)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . k) `1) ) implies (((LexBFS:CSeq G) . (k + 1)) `2) . v = (((LexBFS:CSeq G) . k) `2) . v ) ) by Th42;
percases ( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . k) `1) ) or not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . k) `1) ) ;
supposeA5: ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . k) `1) ) ; ::_thesis: S1[k + 1]
A6: ((Seg (G .order())) \ (Seg ((G .order()) -' k))) \/ {((G .order()) -' k)} = (Seg (G .order())) \ (Seg ((G .order()) -' (k + 1))) by A3, Th5;
(((LexBFS:CSeq G) . (k + 1)) `2) . v = ((((LexBFS:CSeq G) . k) `2) . v) \/ {((G .order()) -' k)} by A4, A5;
hence S1[k + 1] by A2, A6, NAT_1:13, XBOOLE_1:9; ::_thesis: verum
end;
supposeA7: ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . k) `1) ) ; ::_thesis: S1[k + 1]
k <= k + 1 by NAT_1:13;
then A8: (Seg (G .order())) \ (Seg ((G .order()) -' k)) c= (Seg (G .order())) \ (Seg ((G .order()) -' (k + 1))) by Th4;
(((LexBFS:CSeq G) . (k + 1)) `2) . v = (((LexBFS:CSeq G) . k) `2) . v by A4, A7;
hence S1[k + 1] by A2, A8, NAT_1:13, XBOOLE_1:1; ::_thesis: verum
end;
end;
end;
suppose G .order() < k + 1 ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
(LexBFS:CSeq G) . 0 = LexBFS:Init G by Def17;
then (((LexBFS:CSeq G) . 0) `2) . v = {} by Lm7;
then A9: S1[ 0 ] by XBOOLE_1:2;
A10: for k being Nat holds S1[k] from NAT_1:sch_2(A9, A1);
percases ( i <= G .order() or i > G .order() ) ;
suppose i <= G .order() ; ::_thesis: (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
hence (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i)) by A10; ::_thesis: verum
end;
supposeA11: i > G .order() ; ::_thesis: (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i))
then (G .order()) - i < i - i by XREAL_1:9;
then (G .order()) -' i = 0 by XREAL_0:def_2;
then A12: (G .order()) -' (G .order()) = (G .order()) -' i by XREAL_1:232;
((LexBFS:CSeq G) . (G .order())) `2 = ((LexBFS:CSeq G) . i) `2 by A11, Th34;
hence (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i)) by A10, A12; ::_thesis: verum
end;
end;
end;
theorem Th44: :: LEXBFS:44
for G being finite _Graph
for x being set
for i, j being Nat st i <= j holds
(((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x
proof
let G be finite _Graph; ::_thesis: for x being set
for i, j being Nat st i <= j holds
(((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x
let x be set ; ::_thesis: for i, j being Nat st i <= j holds
(((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x
let i, j be Nat; ::_thesis: ( i <= j implies (((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x )
assume i <= j ; ::_thesis: (((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x
then A1: ex k being Nat st j = i + k by NAT_1:10;
set CS = LexBFS:CSeq G;
set CSI = (LexBFS:CSeq G) . i;
set V2I = ((LexBFS:CSeq G) . i) `2 ;
defpred S1[ Nat] means (((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . (i + $1)) `2) . x;
A2: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
set CK1 = (LexBFS:CSeq G) . ((i + k) + 1);
set CSK = (LexBFS:CSeq G) . (i + k);
set V2K = ((LexBFS:CSeq G) . (i + k)) `2 ;
set VLK = ((LexBFS:CSeq G) . (i + k)) `1 ;
set V21 = ((LexBFS:CSeq G) . ((i + k) + 1)) `2 ;
percases ( (i + k) + 1 <= G .order() or G .order() < (i + k) + 1 ) ;
suppose (i + k) + 1 <= G .order() ; ::_thesis: S1[k + 1]
then i + k < G .order() by NAT_1:13;
then consider w being Vertex of G such that
w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . (i + k)) and
A4: for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . (i + k)) `1) implies (((LexBFS:CSeq G) . ((i + k) + 1)) `2) . v = ((((LexBFS:CSeq G) . (i + k)) `2) . v) \/ {((G .order()) -' (i + k))} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . (i + k)) `1) ) implies (((LexBFS:CSeq G) . ((i + k) + 1)) `2) . v = (((LexBFS:CSeq G) . (i + k)) `2) . v ) ) by Th42;
percases ( ( x in G .AdjacentSet {w} & not x in dom (((LexBFS:CSeq G) . (i + k)) `1) ) or not x in G .AdjacentSet {w} or x in dom (((LexBFS:CSeq G) . (i + k)) `1) ) ;
suppose ( x in G .AdjacentSet {w} & not x in dom (((LexBFS:CSeq G) . (i + k)) `1) ) ; ::_thesis: S1[k + 1]
then (((LexBFS:CSeq G) . ((i + k) + 1)) `2) . x = ((((LexBFS:CSeq G) . (i + k)) `2) . x) \/ {((G .order()) -' (i + k))} by A4;
then (((LexBFS:CSeq G) . (i + k)) `2) . x c= (((LexBFS:CSeq G) . ((i + k) + 1)) `2) . x by XBOOLE_1:7;
hence S1[k + 1] by A3, XBOOLE_1:1; ::_thesis: verum
end;
suppose ( not x in G .AdjacentSet {w} or x in dom (((LexBFS:CSeq G) . (i + k)) `1) ) ; ::_thesis: S1[k + 1]
hence S1[k + 1] by A3, A4; ::_thesis: verum
end;
end;
end;
supposeA5: G .order() < (i + k) + 1 ; ::_thesis: S1[k + 1]
A6: i + k <= (i + k) + 1 by NAT_1:13;
G .order() <= i + k by A5, NAT_1:13;
hence S1[k + 1] by A3, A6, Th34; ::_thesis: verum
end;
end;
end;
A7: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A7, A2);
hence (((LexBFS:CSeq G) . i) `2) . x c= (((LexBFS:CSeq G) . j) `2) . x by A1; ::_thesis: verum
end;
theorem Th45: :: LEXBFS:45
for G being finite _Graph
for m, n being Nat
for x, y being set st n < G .order() & n < m & y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & not x in dom (((LexBFS:CSeq G) . n) `1) & x in G .AdjacentSet {y} holds
(G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x
proof
let G be finite _Graph; ::_thesis: for m, n being Nat
for x, y being set st n < G .order() & n < m & y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & not x in dom (((LexBFS:CSeq G) . n) `1) & x in G .AdjacentSet {y} holds
(G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x
let m, n be Nat; ::_thesis: for x, y being set st n < G .order() & n < m & y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & not x in dom (((LexBFS:CSeq G) . n) `1) & x in G .AdjacentSet {y} holds
(G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x
let x, y be set ; ::_thesis: ( n < G .order() & n < m & y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & not x in dom (((LexBFS:CSeq G) . n) `1) & x in G .AdjacentSet {y} implies (G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x )
assume that
A1: n < G .order() and
A2: n < m ; ::_thesis: ( not y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) or x in dom (((LexBFS:CSeq G) . n) `1) or not x in G .AdjacentSet {y} or (G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x )
set CS = LexBFS:CSeq G;
set CSM = (LexBFS:CSeq G) . m;
set V2M = ((LexBFS:CSeq G) . m) `2 ;
set CN1 = (LexBFS:CSeq G) . (n + 1);
set V21 = ((LexBFS:CSeq G) . (n + 1)) `2 ;
n + 1 <= m by A2, NAT_1:13;
then A3: (((LexBFS:CSeq G) . (n + 1)) `2) . x c= (((LexBFS:CSeq G) . m) `2) . x by Th44;
A4: (G .order()) -' n in {((G .order()) -' n)} by TARSKI:def_1;
set CSN = (LexBFS:CSeq G) . n;
set VLN = ((LexBFS:CSeq G) . n) `1 ;
set V2N = ((LexBFS:CSeq G) . n) `2 ;
assume that
A5: y = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) and
A6: not x in dom (((LexBFS:CSeq G) . n) `1) and
A7: x in G .AdjacentSet {y} ; ::_thesis: (G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x
ex w being Vertex of G st
( w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . n) `1) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = ((((LexBFS:CSeq G) . n) `2) . v) \/ {((G .order()) -' n)} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . n) `1) ) implies (((LexBFS:CSeq G) . (n + 1)) `2) . v = (((LexBFS:CSeq G) . n) `2) . v ) ) ) ) by A1, Th42;
then (((LexBFS:CSeq G) . (n + 1)) `2) . x = ((((LexBFS:CSeq G) . n) `2) . x) \/ {((G .order()) -' n)} by A5, A6, A7;
then (G .order()) -' n in (((LexBFS:CSeq G) . (n + 1)) `2) . x by A4, XBOOLE_0:def_3;
hence (G .order()) -' n in (((LexBFS:CSeq G) . m) `2) . x by A3; ::_thesis: verum
end;
theorem Th46: :: LEXBFS:46
for G being finite _Graph
for m, n being Nat st m < n holds
for x being set st not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x holds
not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x
proof
let G be finite _Graph; ::_thesis: for m, n being Nat st m < n holds
for x being set st not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x holds
not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x
let m, n be Nat; ::_thesis: ( m < n implies for x being set st not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x holds
not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x )
assume m < n ; ::_thesis: for x being set st not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x holds
not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x
then m + 1 <= n by NAT_1:13;
then A1: ex j being Nat st (m + 1) + j = n by NAT_1:10;
set CS = LexBFS:CSeq G;
set CSM = (LexBFS:CSeq G) . (m + 1);
set V2M = ((LexBFS:CSeq G) . (m + 1)) `2 ;
let x be set ; ::_thesis: ( not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x implies not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x )
assume A2: not (G .order()) -' m in (((LexBFS:CSeq G) . (m + 1)) `2) . x ; ::_thesis: not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x
defpred S1[ Nat] means not (G .order()) -' m in (((LexBFS:CSeq G) . ((m + 1) + $1)) `2) . x;
A3: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A4: S1[k] ; ::_thesis: S1[k + 1]
set CSK = (LexBFS:CSeq G) . ((m + 1) + k);
set VLK = ((LexBFS:CSeq G) . ((m + 1) + k)) `1 ;
set V2K = ((LexBFS:CSeq G) . ((m + 1) + k)) `2 ;
set CK1 = (LexBFS:CSeq G) . (((m + 1) + k) + 1);
set V21 = ((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2 ;
now__::_thesis:_not_(G_.order())_-'_m_in_(((LexBFS:CSeq_G)_._(((m_+_1)_+_k)_+_1))_`2)_._x
percases ( (m + 1) + k < G .order() or G .order() <= (m + 1) + k ) ;
supposeA5: (m + 1) + k < G .order() ; ::_thesis: not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x
then consider w being Vertex of G such that
w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((m + 1) + k)) and
A6: for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) implies (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . v = ((((LexBFS:CSeq G) . ((m + 1) + k)) `2) . v) \/ {((G .order()) -' ((m + 1) + k))} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) ) implies (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . v = (((LexBFS:CSeq G) . ((m + 1) + k)) `2) . v ) ) by Th42;
percases ( ( x in G .AdjacentSet {w} & not x in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) ) or not x in G .AdjacentSet {w} or x in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) ) ;
supposeA7: ( x in G .AdjacentSet {w} & not x in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) ) ; ::_thesis: not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x
m + 1 <= (m + 1) + k by NAT_1:11;
then m < (m + 1) + k by XREAL_1:39;
then (G .order()) -' m > (G .order()) -' ((m + 1) + k) by A5, Th2;
then A8: not (G .order()) -' m in {((G .order()) -' ((m + 1) + k))} by TARSKI:def_1;
(((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x = ((((LexBFS:CSeq G) . ((m + 1) + k)) `2) . x) \/ {((G .order()) -' ((m + 1) + k))} by A6, A7;
hence not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x by A4, A8, XBOOLE_0:def_3; ::_thesis: verum
end;
suppose ( not x in G .AdjacentSet {w} or x in dom (((LexBFS:CSeq G) . ((m + 1) + k)) `1) ) ; ::_thesis: not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x
hence not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x by A4, A6; ::_thesis: verum
end;
end;
end;
supposeA9: G .order() <= (m + 1) + k ; ::_thesis: not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x
(m + 1) + k <= ((m + 1) + k) + 1 by NAT_1:13;
hence not (G .order()) -' m in (((LexBFS:CSeq G) . (((m + 1) + k) + 1)) `2) . x by A4, A9, Th34; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
A10: S1[ 0 ] by A2;
for k being Nat holds S1[k] from NAT_1:sch_2(A10, A3);
hence not (G .order()) -' m in (((LexBFS:CSeq G) . n) `2) . x by A1; ::_thesis: verum
end;
theorem Th47: :: LEXBFS:47
for G being finite _Graph
for m, n, k being Nat st k < n & n <= m holds
for x being set st not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x holds
not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x
proof
let G be finite _Graph; ::_thesis: for m, n, k being Nat st k < n & n <= m holds
for x being set st not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x holds
not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x
let m, n, k be Nat; ::_thesis: ( k < n & n <= m implies for x being set st not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x holds
not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x )
assume that
A1: k < n and
A2: n <= m ; ::_thesis: for x being set st not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x holds
not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x
set CS = LexBFS:CSeq G;
set CSN = (LexBFS:CSeq G) . n;
set V2N = ((LexBFS:CSeq G) . n) `2 ;
let x be set ; ::_thesis: ( not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x implies not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x )
assume A3: not (G .order()) -' k in (((LexBFS:CSeq G) . n) `2) . x ; ::_thesis: not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x
set CK1 = (LexBFS:CSeq G) . (k + 1);
set V21 = ((LexBFS:CSeq G) . (k + 1)) `2 ;
k + 1 <= n by A1, NAT_1:13;
then (((LexBFS:CSeq G) . (k + 1)) `2) . x c= (((LexBFS:CSeq G) . n) `2) . x by Th44;
then A4: not (G .order()) -' k in (((LexBFS:CSeq G) . (k + 1)) `2) . x by A3;
k < m by A1, A2, XXREAL_0:2;
hence not (G .order()) -' k in (((LexBFS:CSeq G) . m) `2) . x by A4, Th46; ::_thesis: verum
end;
theorem Th48: :: LEXBFS:48
for G being finite _Graph
for m, n being Nat
for x being Vertex of G st n in (((LexBFS:CSeq G) . m) `2) . x holds
ex y being Vertex of G st
( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y & not y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) & x in G .AdjacentSet {y} )
proof
let G be finite _Graph; ::_thesis: for m, n being Nat
for x being Vertex of G st n in (((LexBFS:CSeq G) . m) `2) . x holds
ex y being Vertex of G st
( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y & not y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) & x in G .AdjacentSet {y} )
let m, n be Nat; ::_thesis: for x being Vertex of G st n in (((LexBFS:CSeq G) . m) `2) . x holds
ex y being Vertex of G st
( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y & not y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) & x in G .AdjacentSet {y} )
set CS = LexBFS:CSeq G;
set CSM = (LexBFS:CSeq G) . m;
set V2M = ((LexBFS:CSeq G) . m) `2 ;
set CSN = (LexBFS:CSeq G) . ((G .order()) -' n);
set VLN = ((LexBFS:CSeq G) . ((G .order()) -' n)) `1 ;
set V2N = ((LexBFS:CSeq G) . ((G .order()) -' n)) `2 ;
set on1 = ((G .order()) -' n) + 1;
set CN1 = (LexBFS:CSeq G) . (((G .order()) -' n) + 1);
set V21 = ((LexBFS:CSeq G) . (((G .order()) -' n) + 1)) `2 ;
let x be Vertex of G; ::_thesis: ( n in (((LexBFS:CSeq G) . m) `2) . x implies ex y being Vertex of G st
( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y & not y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) & x in G .AdjacentSet {y} ) )
assume A1: n in (((LexBFS:CSeq G) . m) `2) . x ; ::_thesis: ex y being Vertex of G st
( LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y & not y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) & x in G .AdjacentSet {y} )
A2: (((LexBFS:CSeq G) . m) `2) . x c= (Seg (G .order())) \ (Seg ((G .order()) -' m)) by Th43;
then A3: (G .order()) -' m < n by A1, Th3;
n <= G .order() by A1, A2, Th3;
then A4: (G .order()) -' n = (G .order()) - n by XREAL_1:233;
then A5: (G .order()) -' n < G .order() by A3, XREAL_1:44;
then A6: (G .order()) -' ((G .order()) -' n) = (G .order()) - ((G .order()) - n) by A4, XREAL_1:233;
then consider w being Vertex of G such that
A7: w = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) and
A8: for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) implies (((LexBFS:CSeq G) . (((G .order()) -' n) + 1)) `2) . v = ((((LexBFS:CSeq G) . ((G .order()) -' n)) `2) . v) \/ {n} ) & ( ( not v in G .AdjacentSet {w} or v in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) ) implies (((LexBFS:CSeq G) . (((G .order()) -' n) + 1)) `2) . v = (((LexBFS:CSeq G) . ((G .order()) -' n)) `2) . v ) ) by A3, A4, Th42, XREAL_1:44;
(((LexBFS:CSeq G) . ((G .order()) -' n)) `2) . x c= (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' n))) by Th43;
then A9: not n in (((LexBFS:CSeq G) . ((G .order()) -' n)) `2) . x by A6, Th3;
A10: now__::_thesis:_((G_.order())_-'_n)_+_1_<=_m
percases ( m <= G .order() or G .order() < m ) ;
suppose m <= G .order() ; ::_thesis: ((G .order()) -' n) + 1 <= m
then (G .order()) -' m = (G .order()) - m by XREAL_1:233;
then ((G .order()) - m) + m < n + m by A3, XREAL_1:6;
then (G .order()) - n < (m + n) - n by XREAL_1:9;
hence ((G .order()) -' n) + 1 <= m by A4, NAT_1:13; ::_thesis: verum
end;
suppose G .order() < m ; ::_thesis: ((G .order()) -' n) + 1 <= m
then (G .order()) -' n < m by A5, XXREAL_0:2;
hence ((G .order()) -' n) + 1 <= m by NAT_1:13; ::_thesis: verum
end;
end;
end;
A11: (G .order()) -' n < ((G .order()) -' n) + 1 by XREAL_1:39;
assume A12: for y being Vertex of G holds
( not LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' n)) = y or y in dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) or not x in G .AdjacentSet {y} ) ; ::_thesis: contradiction
dom (((LexBFS:CSeq G) . ((G .order()) -' n)) `1) <> the_Vertices_of G by A5, Th36;
then not x in G .AdjacentSet {w} by A12, A7, Th30;
then not n in (((LexBFS:CSeq G) . (((G .order()) -' n) + 1)) `2) . x by A9, A8;
hence contradiction by A1, A6, A10, A11, Th47; ::_thesis: verum
end;
theorem Th49: :: LEXBFS:49
for G being finite _Graph holds dom (((LexBFS:CSeq G) .Result()) `1) = the_Vertices_of G
proof
let G be finite _Graph; ::_thesis: dom (((LexBFS:CSeq G) .Result()) `1) = the_Vertices_of G
set CS = LexBFS:CSeq G;
set CSO = (LexBFS:CSeq G) . (G .order());
(LexBFS:CSeq G) .Result() = (LexBFS:CSeq G) . (G .order()) by Th37;
hence dom (((LexBFS:CSeq G) .Result()) `1) = the_Vertices_of G by Th36; ::_thesis: verum
end;
theorem Th50: :: LEXBFS:50
for G being finite _Graph holds (((LexBFS:CSeq G) .Result()) `1) " is VertexScheme of G
proof
let G be finite _Graph; ::_thesis: (((LexBFS:CSeq G) .Result()) `1) " is VertexScheme of G
set CS = LexBFS:CSeq G;
set CSO = (LexBFS:CSeq G) . (G .order());
set VLO = ((LexBFS:CSeq G) . (G .order())) `1 ;
set VL = (LexBFS:CSeq G) ``1 ;
A1: (LexBFS:CSeq G) . (G .order()) = (LexBFS:CSeq G) .Result() by Th37;
A2: (LexBFS:CSeq G) .Lifespan() = G .order() by Th37;
A3: ((LexBFS:CSeq G) . (G .order())) `1 = ((LexBFS:CSeq G) ``1) . (G .order()) by Def16;
then A4: ((LexBFS:CSeq G) . (G .order())) `1 is one-to-one by Th18;
dom (((LexBFS:CSeq G) . (G .order())) `1) = the_Vertices_of G by Th36;
then A5: rng ((((LexBFS:CSeq G) . (G .order())) `1) ") = the_Vertices_of G by A4, FUNCT_1:33;
(LexBFS:CSeq G) .Lifespan() = ((LexBFS:CSeq G) ``1) .Lifespan() by Th39;
then rng (((LexBFS:CSeq G) ``1) . (G .order())) = (Seg (G .order())) \ (Seg ((G .order()) -' (G .order()))) by A2, Th14
.= (Seg (G .order())) \ (Seg 0) by XREAL_1:232
.= Seg (G .order()) ;
then dom ((((LexBFS:CSeq G) . (G .order())) `1) ") = Seg (G .order()) by A3, A4, FUNCT_1:33;
then (((LexBFS:CSeq G) . (G .order())) `1) " is FinSequence by FINSEQ_1:def_2;
then (((LexBFS:CSeq G) . (G .order())) `1) " is FinSequence of the_Vertices_of G by A5, FINSEQ_1:def_4;
hence (((LexBFS:CSeq G) .Result()) `1) " is VertexScheme of G by A1, A4, A5, CHORD:def_12; ::_thesis: verum
end;
theorem Th51: :: LEXBFS:51
for G being finite _Graph
for i, j being Nat
for a, b being Vertex of G st a in dom (((LexBFS:CSeq G) . i) `1) & b in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . a < (((LexBFS:CSeq G) . i) `1) . b & j = (G .order()) -' ((((LexBFS:CSeq G) . i) `1) . b) holds
(((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT
proof
let G be finite _Graph; ::_thesis: for i, j being Nat
for a, b being Vertex of G st a in dom (((LexBFS:CSeq G) . i) `1) & b in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . a < (((LexBFS:CSeq G) . i) `1) . b & j = (G .order()) -' ((((LexBFS:CSeq G) . i) `1) . b) holds
(((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT
let i, j be Nat; ::_thesis: for a, b being Vertex of G st a in dom (((LexBFS:CSeq G) . i) `1) & b in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . a < (((LexBFS:CSeq G) . i) `1) . b & j = (G .order()) -' ((((LexBFS:CSeq G) . i) `1) . b) holds
(((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT
let a, b be Vertex of G; ::_thesis: ( a in dom (((LexBFS:CSeq G) . i) `1) & b in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . a < (((LexBFS:CSeq G) . i) `1) . b & j = (G .order()) -' ((((LexBFS:CSeq G) . i) `1) . b) implies (((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT )
assume that
A1: a in dom (((LexBFS:CSeq G) . i) `1) and
A2: b in dom (((LexBFS:CSeq G) . i) `1) and
A3: (((LexBFS:CSeq G) . i) `1) . a < (((LexBFS:CSeq G) . i) `1) . b and
A4: j = (G .order()) -' ((((LexBFS:CSeq G) . i) `1) . b) ; ::_thesis: (((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT
set VL = (LexBFS:CSeq G) ``1 ;
set CSJ = (LexBFS:CSeq G) . j;
set VLI = ((LexBFS:CSeq G) ``1) . i;
set VLJ = ((LexBFS:CSeq G) ``1) . j;
A5: (((LexBFS:CSeq G) . i) `1) . b = (((LexBFS:CSeq G) ``1) . i) . b by Def16;
A6: a in the_Vertices_of G ;
A7: ((LexBFS:CSeq G) . i) `1 = ((LexBFS:CSeq G) ``1) . i by Def16;
A8: (LexBFS:CSeq G) .Lifespan() = ((LexBFS:CSeq G) ``1) .Lifespan() by Th39;
A9: G .order() = (LexBFS:CSeq G) .Lifespan() by Th37;
then (((LexBFS:CSeq G) ``1) . i) . b <= G .order() by A8, Th15;
then A10: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b) = (G .order()) - ((((LexBFS:CSeq G) ``1) . i) . b) by XREAL_1:233;
then A11: (G .order()) -' j = (G .order()) - ((G .order()) - ((((LexBFS:CSeq G) ``1) . i) . b)) by A4, A5, NAT_D:35, XREAL_1:233;
A12: now__::_thesis:_not_a_in_dom_(((LexBFS:CSeq_G)_._j)_`1)
assume a in dom (((LexBFS:CSeq G) . j) `1) ; ::_thesis: contradiction
then A13: a in dom (((LexBFS:CSeq G) ``1) . j) by Def16;
then (((LexBFS:CSeq G) ``1) . i) . b < (((LexBFS:CSeq G) ``1) . j) . a by A9, A8, A11, Th22;
hence contradiction by A1, A3, A7, A13, Th19; ::_thesis: verum
end;
((LexBFS:CSeq G) ``1) .PickedAt j = b by A2, A4, A7, A9, A8, Th20;
then LexBFS:PickUnnumbered ((LexBFS:CSeq G) . j) = b by A3, A4, A5, A10, Th41, XREAL_1:44;
hence (((((LexBFS:CSeq G) . j) `2) . a),1) -bag <= (((((LexBFS:CSeq G) . j) `2) . b),1) -bag , InvLexOrder NAT by A6, A12, Th29; ::_thesis: verum
end;
theorem Th52: :: LEXBFS:52
for G being finite _Graph
for i, j being Nat
for v being Vertex of G st j in (((LexBFS:CSeq G) . i) `2) . v holds
ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} )
proof
let G be finite _Graph; ::_thesis: for i, j being Nat
for v being Vertex of G st j in (((LexBFS:CSeq G) . i) `2) . v holds
ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} )
let i, j be Nat; ::_thesis: for v being Vertex of G st j in (((LexBFS:CSeq G) . i) `2) . v holds
ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} )
let v be Vertex of G; ::_thesis: ( j in (((LexBFS:CSeq G) . i) `2) . v implies ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} ) )
set CSI = (LexBFS:CSeq G) . i;
set VLI = ((LexBFS:CSeq G) ``1) . i;
set V2I = ((LexBFS:CSeq G) . i) `2 ;
set n = (G .order()) -' j;
set CSN = (LexBFS:CSeq G) . ((G .order()) -' j);
set VLN = ((LexBFS:CSeq G) . ((G .order()) -' j)) `1 ;
A1: G .order() = (LexBFS:CSeq G) .Lifespan() by Th37;
A2: (LexBFS:CSeq G) .Lifespan() = ((LexBFS:CSeq G) ``1) .Lifespan() by Th39;
assume A3: j in (((LexBFS:CSeq G) . i) `2) . v ; ::_thesis: ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} )
then consider w being Vertex of G such that
A4: LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' j)) = w and
not w in dom (((LexBFS:CSeq G) . ((G .order()) -' j)) `1) and
A5: v in G .AdjacentSet {w} by Th48;
A6: (((LexBFS:CSeq G) . i) `2) . v c= (Seg (G .order())) \ (Seg ((G .order()) -' i)) by Th43;
then A7: (G .order()) -' i < j by A3, Th3;
A8: j <= G .order() by A3, A6, Th3;
then A9: (G .order()) -' j = (G .order()) - j by XREAL_1:233;
then A10: (G .order()) -' j < G .order() by A7, XREAL_1:44;
A11: (G .order()) - ((G .order()) -' j) = (G .order()) - ((G .order()) - j) by A8, XREAL_1:233;
then (G .order()) - i < (G .order()) - ((G .order()) -' j) by A7, XREAL_0:def_2;
then ((G .order()) - i) + i < ((G .order()) - ((G .order()) -' j)) + i by XREAL_1:6;
then (G .order()) + ((G .order()) -' j) < (((G .order()) + i) - ((G .order()) -' j)) + ((G .order()) -' j) by XREAL_1:6;
then A12: (((G .order()) -' j) + (G .order())) - (G .order()) < (i + (G .order())) - (G .order()) by XREAL_1:9;
A13: w = ((LexBFS:CSeq G) ``1) .PickedAt ((G .order()) -' j) by A4, A7, A9, Th41, XREAL_1:44;
then A14: (((LexBFS:CSeq G) ``1) . i) . w = (G .order()) -' ((G .order()) -' j) by A10, A1, A2, A12, Th21;
A15: ((LexBFS:CSeq G) . i) `1 = ((LexBFS:CSeq G) ``1) . i by Def16;
then w in dom (((LexBFS:CSeq G) . i) `1) by A10, A1, A2, A13, A12, Th21;
hence ex w being Vertex of G st
( w in dom (((LexBFS:CSeq G) . i) `1) & (((LexBFS:CSeq G) . i) `1) . w = j & v in G .AdjacentSet {w} ) by A15, A5, A10, A11, A14, XREAL_1:233; ::_thesis: verum
end;
definition
let G be _Graph;
let F be PartFunc of (the_Vertices_of G),NAT;
attrF is with_property_L3 means :Def18: :: LEXBFS:def 18
for a, b, c being Vertex of G st a in dom F & b in dom F & c in dom F & F . a < F . b & F . b < F . c & a,c are_adjacent & not b,c are_adjacent holds
ex d being Vertex of G st
( d in dom F & F . c < F . d & b,d are_adjacent & not a,d are_adjacent & ( for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
F . e < F . d ) );
end;
:: deftheorem Def18 defines with_property_L3 LEXBFS:def_18_:_
for G being _Graph
for F being PartFunc of (the_Vertices_of G),NAT holds
( F is with_property_L3 iff for a, b, c being Vertex of G st a in dom F & b in dom F & c in dom F & F . a < F . b & F . b < F . c & a,c are_adjacent & not b,c are_adjacent holds
ex d being Vertex of G st
( d in dom F & F . c < F . d & b,d are_adjacent & not a,d are_adjacent & ( for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
F . e < F . d ) ) );
theorem Th53: :: LEXBFS:53
for G being finite _Graph
for n being Nat holds ((LexBFS:CSeq G) . n) `1 is with_property_L3
proof
let G be finite _Graph; ::_thesis: for n being Nat holds ((LexBFS:CSeq G) . n) `1 is with_property_L3
let i be Nat; ::_thesis: ((LexBFS:CSeq G) . i) `1 is with_property_L3
set CSi = (LexBFS:CSeq G) . i;
set VLi = ((LexBFS:CSeq G) ``1) . i;
A1: ((LexBFS:CSeq G) . i) `1 = ((LexBFS:CSeq G) ``1) . i by Def16;
now__::_thesis:_for_a,_b,_c_being_Vertex_of_G_st_a_in_dom_(((LexBFS:CSeq_G)_``1)_._i)_&_b_in_dom_(((LexBFS:CSeq_G)_``1)_._i)_&_c_in_dom_(((LexBFS:CSeq_G)_``1)_._i)_&_(((LexBFS:CSeq_G)_``1)_._i)_._a_<_(((LexBFS:CSeq_G)_``1)_._i)_._b_&_(((LexBFS:CSeq_G)_``1)_._i)_._b_<_(((LexBFS:CSeq_G)_``1)_._i)_._c_&_a,c_are_adjacent_&_not_b,c_are_adjacent_holds_
ex_d_being_Vertex_of_G_st_
(_d_in_dom_(((LexBFS:CSeq_G)_``1)_._i)_&_(((LexBFS:CSeq_G)_``1)_._i)_._c_<_(((LexBFS:CSeq_G)_``1)_._i)_._d_&_b,d_are_adjacent_&_not_a,d_are_adjacent_&_(_for_e_being_Vertex_of_G_st_e_<>_d_&_e,b_are_adjacent_&_not_e,a_are_adjacent_holds_
(((LexBFS:CSeq_G)_``1)_._i)_._e_<_(((LexBFS:CSeq_G)_``1)_._i)_._d_)_)
A2: (LexBFS:CSeq G) .Lifespan() = ((LexBFS:CSeq G) ``1) .Lifespan() by Th39;
A3: (LexBFS:CSeq G) .Lifespan() = G .order() by Th37;
let a, b, c be Vertex of G; ::_thesis: ( a in dom (((LexBFS:CSeq G) ``1) . i) & b in dom (((LexBFS:CSeq G) ``1) . i) & c in dom (((LexBFS:CSeq G) ``1) . i) & (((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . b & (((LexBFS:CSeq G) ``1) . i) . b < (((LexBFS:CSeq G) ``1) . i) . c & a,c are_adjacent & not b,c are_adjacent implies ex d being Vertex of G st
( d in dom (((LexBFS:CSeq G) ``1) . i) & (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d & b,d are_adjacent & not a,d are_adjacent & ( for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
(((LexBFS:CSeq G) ``1) . i) . e < (((LexBFS:CSeq G) ``1) . i) . d ) ) )
assume that
A4: a in dom (((LexBFS:CSeq G) ``1) . i) and
A5: b in dom (((LexBFS:CSeq G) ``1) . i) and
A6: c in dom (((LexBFS:CSeq G) ``1) . i) and
A7: (((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . b and
A8: (((LexBFS:CSeq G) ``1) . i) . b < (((LexBFS:CSeq G) ``1) . i) . c and
A9: a,c are_adjacent and
A10: not b,c are_adjacent ; ::_thesis: ex d being Vertex of G st
( d in dom (((LexBFS:CSeq G) ``1) . i) & (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d & b,d are_adjacent & not a,d are_adjacent & ( for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
(((LexBFS:CSeq G) ``1) . i) . e < (((LexBFS:CSeq G) ``1) . i) . d ) )
defpred S1[ Nat] means ex v being Vertex of G st
( v in dom (((LexBFS:CSeq G) ``1) . i) & b,v are_adjacent & not a,v are_adjacent & (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . v & (((LexBFS:CSeq G) ``1) . i) . v = $1 );
A11: (((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . c by A7, A8, XXREAL_0:2;
now__::_thesis:_ex_d_being_Vertex_of_G_st_
(_d_in_dom_(((LexBFS:CSeq_G)_``1)_._i)_&_(((LexBFS:CSeq_G)_``1)_._i)_._c_<_(((LexBFS:CSeq_G)_``1)_._i)_._d_&_d,b_are_adjacent_&_not_d,a_are_adjacent_)
set kc = (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c);
set k = (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b);
assume A12: for d being Vertex of G st d in dom (((LexBFS:CSeq G) ``1) . i) & (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d & d,b are_adjacent holds
d,a are_adjacent ; ::_thesis: contradiction
set VLc = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c));
set CSc = (LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c));
set VLb = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b));
set CSb = (LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b));
reconsider sb = (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `2) . b, sa = (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `2) . a as finite Subset of NAT ;
A13: (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b)))) c= Seg (G .order()) by XBOOLE_1:36;
sb c= (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b)))) by Th43;
then A14: sb c= Seg (G .order()) by A13, XBOOLE_1:1;
A15: ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) `1 = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c)) by Def16;
sa c= (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b)))) by Th43;
then A16: sa c= Seg (G .order()) by A13, XBOOLE_1:1;
A17: c in dom (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) by A5, A6, A8, A3, A2, Th23;
A18: (((LexBFS:CSeq G) ``1) . i) . c <= G .order() by A3, A2, Th15;
then A19: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c) = (G .order()) - ((((LexBFS:CSeq G) ``1) . i) . c) by XREAL_1:233;
then A20: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c) < G .order() by A8, XREAL_1:44;
then A21: (G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c)) = (G .order()) - ((G .order()) - ((((LexBFS:CSeq G) ``1) . i) . c)) by A19, XREAL_1:233;
A22: now__::_thesis:_not_a_in_dom_(((LexBFS:CSeq_G)_``1)_._((G_.order())_-'_((((LexBFS:CSeq_G)_``1)_._i)_._c)))
A23: rng (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) = (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c)))) by A3, A2, Th14;
A24: (((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . c by A7, A8, XXREAL_0:2;
assume A25: a in dom (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) ; ::_thesis: contradiction
then (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) . a in rng (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) by FUNCT_1:def_3;
then (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) . a by A21, A23, Th3;
hence contradiction by A4, A25, A24, Th19; ::_thesis: verum
end;
((LexBFS:CSeq G) ``1) .PickedAt ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c)) = c by A6, A3, A2, Th20;
then A26: c = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c))) by A8, A19, Th41, XREAL_1:44;
A27: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . c) < (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b) by A8, A18, Th2;
set j = (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c;
A28: ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1 = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b)) by Def16;
a in G .AdjacentSet {c} by A7, A8, A9, CHORD:52;
then (((LexBFS:CSeq G) ``1) . i) . c in sa by A15, A20, A27, A26, A21, A22, Th45;
then A29: (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in sa by A6, A17, Th19;
A30: not b in G .AdjacentSet {c} by A10, CHORD:52;
A31: now__::_thesis:_not_(((LexBFS:CSeq_G)_``1)_._((G_.order())_-'_((((LexBFS:CSeq_G)_``1)_._i)_._b)))_._c_in_sb
assume (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in sb ; ::_thesis: contradiction
then A32: ex z being Vertex of G st
( z in dom (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) & (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . z = (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c & b in G .AdjacentSet {z} ) by A28, Th52;
((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b)) is one-to-one by Th18;
hence contradiction by A30, A17, A32, FUNCT_1:def_4; ::_thesis: verum
end;
then ((sb,1) -bag) . ((((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c) = 0 by UPROOTS:6;
then A33: ((sb,1) -bag) . ((((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c) < ((sa,1) -bag) . ((((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c) by A29, UPROOTS:7;
[((sb,1) -bag),((sa,1) -bag)] in InvLexOrder NAT
proof
percases ( for k being Ordinal st (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in k & k in NAT holds
((sb,1) -bag) . k = ((sa,1) -bag) . k or ex k being Ordinal st
( (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in k & k in NAT & not ((sb,1) -bag) . k = ((sa,1) -bag) . k ) ) ;
suppose for k being Ordinal st (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in k & k in NAT holds
((sb,1) -bag) . k = ((sa,1) -bag) . k ; ::_thesis: [((sb,1) -bag),((sa,1) -bag)] in InvLexOrder NAT
hence [((sb,1) -bag),((sa,1) -bag)] in InvLexOrder NAT by A33, BAGORDER:def_6; ::_thesis: verum
end;
supposeA34: ex k being Ordinal st
( (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in k & k in NAT & not ((sb,1) -bag) . k = ((sa,1) -bag) . k ) ; ::_thesis: [((sb,1) -bag),((sa,1) -bag)] in InvLexOrder NAT
defpred S2[ Nat] means ( (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in $1 & ((sb,1) -bag) . $1 <> ((sa,1) -bag) . $1 );
A35: for k being Nat st S2[k] holds
k <= G .order()
proof
let k be Nat; ::_thesis: ( S2[k] implies k <= G .order() )
assume A36: S2[k] ; ::_thesis: k <= G .order()
A37: ( ((sa,1) -bag) . k = 1 or ((sa,1) -bag) . k = 0 ) by UPROOTS:6, UPROOTS:7;
k in NAT by ORDINAL1:def_12;
then consider ok being Ordinal such that
A38: ok = k and
(((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in ok and
ok in NAT and
A39: ((sb,1) -bag) . ok <> ((sa,1) -bag) . ok by A36;
percases ( not ok in sb or ok in sb ) ;
suppose not ok in sb ; ::_thesis: k <= G .order()
then ok in sa by A38, A39, A37, UPROOTS:6;
hence k <= G .order() by A16, A38, FINSEQ_1:1; ::_thesis: verum
end;
suppose ok in sb ; ::_thesis: k <= G .order()
hence k <= G .order() by A14, A38, FINSEQ_1:1; ::_thesis: verum
end;
end;
end;
A40: ex k being Nat st S2[k] by A34;
consider mm being Nat such that
A41: S2[mm] and
A42: for i being Nat st S2[i] holds
i <= mm from NAT_1:sch_6(A35, A40);
reconsider mm = mm as Element of NAT by ORDINAL1:def_12;
A43: now__::_thesis:_for_k_being_Ordinal_st_mm_in_k_&_k_in_NAT_holds_
not_((sb,1)_-bag)_._k_<>_((sa,1)_-bag)_._k
let k be Ordinal; ::_thesis: ( mm in k & k in NAT implies not ((sb,1) -bag) . k <> ((sa,1) -bag) . k )
assume that
A44: mm in k and
A45: k in NAT ; ::_thesis: not ((sb,1) -bag) . k <> ((sa,1) -bag) . k
reconsider kk = k as Element of NAT by A45;
mm in { y where y is Element of NAT : y < kk } by A44, AXIOMS:4;
then A46: ex mmy being Element of NAT st
( mmy = mm & mmy < kk ) ;
assume ((sb,1) -bag) . k <> ((sa,1) -bag) . k ; ::_thesis: contradiction
hence contradiction by A41, A42, A44, A46, ORDINAL1:10; ::_thesis: verum
end;
(((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c in { y where y is Element of NAT : y < mm } by A41, AXIOMS:4;
then A47: ex jy being Element of NAT st
( jy = (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c & jy < mm ) ;
A48: now__::_thesis:_not_((sb,1)_-bag)_._mm_=_1
assume A49: ((sb,1) -bag) . mm = 1 ; ::_thesis: contradiction
then mm in sb by UPROOTS:6;
then consider z being Vertex of G such that
A50: z in dom (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1) and
A51: (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1) . z = mm and
A52: b in G .AdjacentSet {z} by Th52;
set kc = (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z);
A53: (((LexBFS:CSeq G) ``1) . i) . z <= G .order() by A3, A2, Th15;
then A54: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z) = (G .order()) - ((((LexBFS:CSeq G) ``1) . i) . z) by XREAL_1:233;
(G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b) < i by A5, A3, A2, Th22;
then A55: ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1 c= ((LexBFS:CSeq G) . i) `1 by A1, A28, Th17;
then A56: dom (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1) c= dom (((LexBFS:CSeq G) . i) `1) by RELAT_1:11;
then A57: 0 < (((LexBFS:CSeq G) ``1) . i) . z by A1, A50, Th15;
then A58: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z) < G .order() by A54, XREAL_1:44;
then A59: (G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z)) = (G .order()) - ((G .order()) - ((((LexBFS:CSeq G) ``1) . i) . z)) by A54, XREAL_1:233;
set VLc = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z));
set CSc = (LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z));
z = ((LexBFS:CSeq G) ``1) .PickedAt ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z)) by A1, A3, A2, A50, A56, Th20;
then A60: z = LexBFS:PickUnnumbered ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) by A57, A54, Th41, XREAL_1:44;
A61: [z,mm] in ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1 by A50, A51, FUNCT_1:def_2;
then A62: (((LexBFS:CSeq G) ``1) . i) . z = mm by A1, A50, A55, A56, FUNCT_1:def_2;
A63: [c,((((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c)] in ((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `1 by A28, A17, FUNCT_1:def_2;
then A64: (((LexBFS:CSeq G) ``1) . i) . c = (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) . c by A1, A6, A55, FUNCT_1:def_2;
then (((LexBFS:CSeq G) ``1) . i) . b < (((LexBFS:CSeq G) ``1) . i) . z by A8, A47, A62, XXREAL_0:2;
then A65: (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z) < (G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b) by A53, Th2;
A66: (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . z by A1, A47, A50, A55, A56, A61, A64, FUNCT_1:def_2;
A67: now__::_thesis:_not_a_in_dom_(((LexBFS:CSeq_G)_``1)_._((G_.order())_-'_((((LexBFS:CSeq_G)_``1)_._i)_._z)))
(((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . c by A7, A8, XXREAL_0:2;
then A68: (((LexBFS:CSeq G) ``1) . i) . a < (((LexBFS:CSeq G) ``1) . i) . z by A66, XXREAL_0:2;
A69: rng (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) = (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z)))) by A3, A2, Th14;
assume A70: a in dom (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) ; ::_thesis: contradiction
then (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) . a in rng (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) by FUNCT_1:def_3;
then (((LexBFS:CSeq G) ``1) . i) . z < (((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) . a by A59, A69, Th3;
hence contradiction by A4, A70, A68, Th19; ::_thesis: verum
end;
A71: (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . z by A1, A6, A47, A55, A62, A63, FUNCT_1:def_2;
b,z are_adjacent by A52, CHORD:52;
then z,a are_adjacent by A1, A12, A47, A50, A56, A62, A64;
then A72: a in G .AdjacentSet {z} by A11, A71, CHORD:52;
((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z))) `1 = ((LexBFS:CSeq G) ``1) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z)) by Def16;
then (G .order()) -' ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . z)) in (((LexBFS:CSeq G) . ((G .order()) -' ((((LexBFS:CSeq G) ``1) . i) . b))) `2) . a by A72, A58, A65, A60, A67, Th45;
hence contradiction by A41, A49, A62, A59, UPROOTS:7; ::_thesis: verum
end;
( ((sb,1) -bag) . mm = 0 or ((sb,1) -bag) . mm = 1 ) by UPROOTS:6, UPROOTS:7;
hence [((sb,1) -bag),((sa,1) -bag)] in InvLexOrder NAT by A41, A48, A43, BAGORDER:def_6; ::_thesis: verum
end;
end;
end;
then A73: (sb,1) -bag <= (sa,1) -bag , InvLexOrder NAT by TERMORD:def_2;
(sb,1) -bag <> (sa,1) -bag by A29, A31, Th6;
then A74: (sb,1) -bag < (sa,1) -bag , InvLexOrder NAT by A73, TERMORD:def_3;
(sa,1) -bag <= (sb,1) -bag , InvLexOrder NAT by A1, A4, A5, A7, Th51;
hence contradiction by A74, TERMORD:5; ::_thesis: verum
end;
then A75: ex k being Nat st S1[k] ;
A76: for k being Nat st S1[k] holds
k <= G .order()
proof
let k be Nat; ::_thesis: ( S1[k] implies k <= G .order() )
assume S1[k] ; ::_thesis: k <= G .order()
then k in rng (((LexBFS:CSeq G) ``1) . i) by FUNCT_1:def_3;
then A77: k in (Seg (G .order())) \ (Seg ((G .order()) -' i)) by A3, A2, Th14;
(Seg (G .order())) \ (Seg ((G .order()) -' i)) c= Seg (G .order()) by XBOOLE_1:36;
hence k <= G .order() by A77, FINSEQ_1:1; ::_thesis: verum
end;
ex k being Nat st
( S1[k] & ( for n being Nat st S1[n] holds
n <= k ) ) from NAT_1:sch_6(A76, A75);
then consider k being Nat such that
A78: S1[k] and
A79: for n being Nat st S1[n] holds
n <= k ;
consider v being Vertex of G such that
A80: v in dom (((LexBFS:CSeq G) ``1) . i) and
A81: b,v are_adjacent and
A82: not a,v are_adjacent and
A83: (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . v and
A84: (((LexBFS:CSeq G) ``1) . i) . v = k by A78;
for d being Vertex of G st d <> v & d,b are_adjacent & not d,a are_adjacent holds
(((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v
proof
let d be Vertex of G; ::_thesis: ( d <> v & d,b are_adjacent & not d,a are_adjacent implies (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v )
assume that
A85: d <> v and
A86: d,b are_adjacent and
A87: not d,a are_adjacent ; ::_thesis: (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v
percases ( (((LexBFS:CSeq G) ``1) . i) . d <= (((LexBFS:CSeq G) ``1) . i) . c or (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d ) ;
suppose (((LexBFS:CSeq G) ``1) . i) . d <= (((LexBFS:CSeq G) ``1) . i) . c ; ::_thesis: (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v
hence (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v by A83, XXREAL_0:2; ::_thesis: verum
end;
supposeA88: (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d ; ::_thesis: (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v
then A89: d in dom (((LexBFS:CSeq G) ``1) . i) by FUNCT_1:def_2;
((LexBFS:CSeq G) ``1) . i is one-to-one by Th18;
then A90: (((LexBFS:CSeq G) ``1) . i) . d <> (((LexBFS:CSeq G) ``1) . i) . v by A80, A85, A89, FUNCT_1:def_4;
(((LexBFS:CSeq G) ``1) . i) . d <= k by A79, A86, A87, A88, A89;
hence (((LexBFS:CSeq G) ``1) . i) . d < (((LexBFS:CSeq G) ``1) . i) . v by A84, A90, XXREAL_0:1; ::_thesis: verum
end;
end;
end;
hence ex d being Vertex of G st
( d in dom (((LexBFS:CSeq G) ``1) . i) & (((LexBFS:CSeq G) ``1) . i) . c < (((LexBFS:CSeq G) ``1) . i) . d & b,d are_adjacent & not a,d are_adjacent & ( for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
(((LexBFS:CSeq G) ``1) . i) . e < (((LexBFS:CSeq G) ``1) . i) . d ) ) by A80, A81, A82, A83; ::_thesis: verum
end;
hence ((LexBFS:CSeq G) . i) `1 is with_property_L3 by A1, Def18; ::_thesis: verum
end;
theorem Th54: :: LEXBFS:54
for G being finite chordal _Graph
for L being PartFunc of (the_Vertices_of G),NAT st L is with_property_L3 & dom L = the_Vertices_of G holds
for V being VertexScheme of G st V " = L holds
V is perfect
proof
let G be finite chordal _Graph; ::_thesis: for L being PartFunc of (the_Vertices_of G),NAT st L is with_property_L3 & dom L = the_Vertices_of G holds
for V being VertexScheme of G st V " = L holds
V is perfect
let L be PartFunc of (the_Vertices_of G),NAT; ::_thesis: ( L is with_property_L3 & dom L = the_Vertices_of G implies for V being VertexScheme of G st V " = L holds
V is perfect )
assume that
A1: L is with_property_L3 and
A2: dom L = the_Vertices_of G ; ::_thesis: for V being VertexScheme of G st V " = L holds
V is perfect
let V be VertexScheme of G; ::_thesis: ( V " = L implies V is perfect )
assume A3: V " = L ; ::_thesis: V is perfect
A4: V is one-to-one by CHORD:def_12;
A5: for x, y being Vertex of G
for i, j being Nat st i in dom V & j in dom V & V /. i = x & V /. j = y holds
( i < j iff L . x < L . y )
proof
let x, y be Vertex of G; ::_thesis: for i, j being Nat st i in dom V & j in dom V & V /. i = x & V /. j = y holds
( i < j iff L . x < L . y )
let i, j be Nat; ::_thesis: ( i in dom V & j in dom V & V /. i = x & V /. j = y implies ( i < j iff L . x < L . y ) )
assume that
A6: i in dom V and
A7: j in dom V and
A8: V /. i = x and
A9: V /. j = y ; ::_thesis: ( i < j iff L . x < L . y )
V . j = y by A7, A9, PARTFUN1:def_6;
then A10: L . y = j by A3, A4, A7, FUNCT_1:34;
A11: V . i = x by A6, A8, PARTFUN1:def_6;
hence ( i < j implies L . x < L . y ) by A3, A4, A6, A10, FUNCT_1:34; ::_thesis: ( L . x < L . y implies i < j )
thus ( L . x < L . y implies i < j ) by A3, A4, A6, A11, A10, FUNCT_1:34; ::_thesis: verum
end;
defpred S1[ Nat] means ex P being Walk of G ex v1, v2, v3, v4 being Vertex of G st
( P is Path-like & P is open & P is chordless & P .length() = $1 - 1 & v1 = P . ((len P) - 2) & v2 = P . 3 & v3 = P .last() & v4 = P .first() & L . v4 > L . v3 & L . v3 > L . v2 & L . v2 > L . v1 & ( for x being set st x in P .vertices() holds
L . x <= L . v4 ) & ( for x being Vertex of G st x <> v4 & x,v2 are_adjacent & not x,v1 are_adjacent holds
L . x < L . v4 ) );
A12: for k being Nat st 4 <= k & S1[k] holds
S1[k + 1]
proof
A13: (2 * 0) + 1 < (2 * 1) + 1 ;
let kk be Nat; ::_thesis: ( 4 <= kk & S1[kk] implies S1[kk + 1] )
assume that
A14: 4 <= kk and
A15: S1[kk] ; ::_thesis: S1[kk + 1]
reconsider k = kk as non empty Nat by A14;
consider P being Walk of G, v1, v2, v3, v4 being Vertex of G such that
A16: P is Path-like and
A17: P is open and
A18: P is chordless and
A19: P .length() = k - 1 and
A20: v1 = P . ((len P) - 2) and
A21: v2 = P . 3 and
A22: v3 = P .last() and
A23: v4 = P .first() and
A24: L . v4 > L . v3 and
A25: L . v3 > L . v2 and
A26: L . v2 > L . v1 and
A27: for x being set st x in P .vertices() holds
L . x <= L . v4 and
A28: for x being Vertex of G st x <> v4 & x,v2 are_adjacent & not x,v1 are_adjacent holds
L . x < L . v4 by A15;
A29: len P = (2 * (k - 1)) + 1 by A19, GLIB_001:112;
2 * k >= 2 * 4 by A14, XREAL_1:64;
then A30: (2 * k) - 1 >= 8 - 1 by XREAL_1:9;
then 1 <= len P by A29, XXREAL_0:2;
then A31: len P in dom P by FINSEQ_3:25;
now__::_thesis:_for_e_being_set_holds_not_e_Joins_v4,v3,G
A32: (2 * 0) + 1 < len P by A29, A30, XXREAL_0:2;
let e be set ; ::_thesis: not e Joins v4,v3,G
assume e Joins v4,v3,G ; ::_thesis: contradiction
then 1 + 2 = len P by A16, A17, A18, A22, A23, A32, CHORD:92;
hence contradiction by A14, A29; ::_thesis: verum
end;
then A33: not v4,v3 are_adjacent by CHORD:def_3;
3 < len P by A29, A30, XXREAL_0:2;
then ex ez being set st ez Joins P . 1,P . 3,G by A16, A17, A18, A13, CHORD:92;
then v4,v2 are_adjacent by A21, A23, CHORD:def_3;
then consider v5 being Vertex of G such that
v5 in dom L and
A34: L . v4 < L . v5 and
A35: v5,v3 are_adjacent and
A36: not v5,v2 are_adjacent and
A37: for x being Vertex of G st x <> v5 & x,v3 are_adjacent & not x,v2 are_adjacent holds
L . x < L . v5 by A1, A2, A24, A25, A33, Def18;
consider e being set such that
A38: e Joins P .last() ,v5,G by A22, A35, CHORD:def_3;
now__::_thesis:_not_v5,v1_are_adjacent
L . v2 < L . v4 by A24, A25, XXREAL_0:2;
then A39: L . v2 < L . v5 by A34, XXREAL_0:2;
assume v5,v1 are_adjacent ; ::_thesis: contradiction
then consider v6 being Vertex of G such that
v6 in dom L and
A40: L . v5 < L . v6 and
A41: v6,v2 are_adjacent and
A42: not v6,v1 are_adjacent and
for x being Vertex of G st x <> v6 & x,v2 are_adjacent & not x,v1 are_adjacent holds
L . x < L . v6 by A1, A2, A26, A36, A39, Def18;
thus contradiction by A28, A34, A40, A41, A42, XXREAL_0:2; ::_thesis: verum
end;
then A43: for e being set holds not e Joins P . ((len P) - 2),v5,G by A20, CHORD:def_3;
set Qr = P .addEdge e;
set Q = (P .addEdge e) .reverse() ;
A44: len ((P .addEdge e) .reverse()) = len (P .addEdge e) by GLIB_001:21;
A45: not v5 in P .vertices() by A27, A34;
then P .addEdge e is open by A16, A17, A18, A38, A43, CHORD:97;
then A46: (P .addEdge e) .reverse() is open by GLIB_001:120;
3 <= len P by A29, A30, XXREAL_0:2;
then A47: 3 in dom P by FINSEQ_3:25;
then A48: 3 in dom (P .addEdge e) by A38, Lm6;
v2 = (P .addEdge e) . 3 by A21, A38, A47, Lm6;
then A49: v2 = ((P .addEdge e) .reverse()) . (((len ((P .addEdge e) .reverse())) - 3) + 1) by A48, A44, GLIB_001:24;
v4 = (P .addEdge e) .first() by A23, A38, GLIB_001:63;
then A50: v4 = ((P .addEdge e) .reverse()) .last() by GLIB_001:22;
A51: len (P .addEdge e) = (len P) + 2 by A38, GLIB_001:64;
then A52: (len (P .addEdge e)) - 2 in dom (P .addEdge e) by A38, A31, Lm6;
v3 = (P .addEdge e) . ((len (P .addEdge e)) - 2) by A22, A38, A51, A31, Lm6;
then A53: v3 = ((P .addEdge e) .reverse()) . (((len ((P .addEdge e) .reverse())) - ((len (P .addEdge e)) - 2)) + 1) by A52, A44, GLIB_001:24;
v5 = (P .addEdge e) .last() by A38, GLIB_001:63;
then A54: v5 = ((P .addEdge e) .reverse()) .first() by GLIB_001:22;
P .addEdge e is chordless by A16, A17, A18, A38, A45, A43, CHORD:97;
then A55: (P .addEdge e) .reverse() is chordless by CHORD:91;
(P .addEdge e) .length() = (k - 1) + 1 by A19, A38, Lm4;
then A56: ((P .addEdge e) .reverse()) .length() = (k + 1) - 1 by Lm5;
A57: now__::_thesis:_for_x_being_set_st_x_in_((P_.addEdge_e)_.reverse())_.vertices()_holds_
L_._x_<=_L_._v5
let x be set ; ::_thesis: ( x in ((P .addEdge e) .reverse()) .vertices() implies L . b1 <= L . v5 )
assume x in ((P .addEdge e) .reverse()) .vertices() ; ::_thesis: L . b1 <= L . v5
then x in (P .addEdge e) .vertices() by GLIB_001:92;
then A58: x in (P .vertices()) \/ {v5} by A38, GLIB_001:95;
percases ( x in P .vertices() or x in {v5} ) by A58, XBOOLE_0:def_3;
suppose x in P .vertices() ; ::_thesis: L . b1 <= L . v5
then L . x <= L . v4 by A27;
hence L . x <= L . v5 by A34, XXREAL_0:2; ::_thesis: verum
end;
suppose x in {v5} ; ::_thesis: L . b1 <= L . v5
hence L . x <= L . v5 by TARSKI:def_1; ::_thesis: verum
end;
end;
end;
P .addEdge e is Path-like by A16, A17, A18, A38, A45, A43, CHORD:97;
hence S1[kk + 1] by A24, A25, A34, A37, A46, A55, A56, A44, A49, A53, A50, A54, A57; ::_thesis: verum
end;
A59: 11 <= 11 + (G .order()) by NAT_1:11;
assume not V is perfect ; ::_thesis: contradiction
then consider k being non empty Nat such that
A60: k <= len V and
A61: ex H being inducedSubgraph of G,(V .followSet k) ex v being Vertex of H st
( v = V . k & not v is simplicial ) by CHORD:def_13;
consider HH being inducedSubgraph of G,(V .followSet k), hv being Vertex of HH such that
A62: hv = V . k and
A63: not hv is simplicial by A61;
consider ha, hb being Vertex of HH such that
A64: ha <> hb and
hv <> ha and
hv <> hb and
A65: hv,ha are_adjacent and
A66: hv,hb are_adjacent and
A67: not ha,hb are_adjacent by A63, CHORD:69;
A68: hv in the_Vertices_of HH ;
A69: hb in the_Vertices_of HH ;
ha in the_Vertices_of HH ;
then reconsider v = hv, aa = ha, bb = hb as Vertex of G by A68, A69;
A70: V .followSet k is non empty Subset of (the_Vertices_of G) by A60, CHORD:107;
then A71: the_Vertices_of HH = V .followSet k by GLIB_000:def_37;
now__::_thesis:_ex_aa,_bb_being_Vertex_of_G_st_
(_aa_in_V_.followSet_k_&_L_._aa_<_L_._bb_&_v,aa_are_adjacent_&_v,bb_are_adjacent_&_not_aa,bb_are_adjacent_)
A72: L . aa <> L . bb by A2, A3, A4, A64, FUNCT_1:def_4;
percases ( L . aa < L . bb or L . aa > L . bb ) by A72, XXREAL_0:1;
supposeA73: L . aa < L . bb ; ::_thesis: ex aa, bb being Vertex of G st
( aa in V .followSet k & L . aa < L . bb & v,aa are_adjacent & v,bb are_adjacent & not aa,bb are_adjacent )
take aa = aa; ::_thesis: ex bb being Vertex of G st
( aa in V .followSet k & L . aa < L . bb & v,aa are_adjacent & v,bb are_adjacent & not aa,bb are_adjacent )
take bb = bb; ::_thesis: ( aa in V .followSet k & L . aa < L . bb & v,aa are_adjacent & v,bb are_adjacent & not aa,bb are_adjacent )
thus aa in V .followSet k by A71; ::_thesis: ( L . aa < L . bb & v,aa are_adjacent & v,bb are_adjacent & not aa,bb are_adjacent )
thus L . aa < L . bb by A73; ::_thesis: ( v,aa are_adjacent & v,bb are_adjacent & not aa,bb are_adjacent )
thus v,aa are_adjacent by A65, A70, CHORD:45; ::_thesis: ( v,bb are_adjacent & not aa,bb are_adjacent )
thus v,bb are_adjacent by A66, A70, CHORD:45; ::_thesis: not aa,bb are_adjacent
thus not aa,bb are_adjacent by A67, A70, CHORD:45; ::_thesis: verum
end;
supposeA74: L . aa > L . bb ; ::_thesis: ex bb, aa being Vertex of G st
( bb in V .followSet k & L . aa > L . bb & v,bb are_adjacent & v,aa are_adjacent & not bb,aa are_adjacent )
take bb = bb; ::_thesis: ex aa being Vertex of G st
( bb in V .followSet k & L . aa > L . bb & v,bb are_adjacent & v,aa are_adjacent & not bb,aa are_adjacent )
take aa = aa; ::_thesis: ( bb in V .followSet k & L . aa > L . bb & v,bb are_adjacent & v,aa are_adjacent & not bb,aa are_adjacent )
thus bb in V .followSet k by A71; ::_thesis: ( L . aa > L . bb & v,bb are_adjacent & v,aa are_adjacent & not bb,aa are_adjacent )
thus L . aa > L . bb by A74; ::_thesis: ( v,bb are_adjacent & v,aa are_adjacent & not bb,aa are_adjacent )
thus v,bb are_adjacent by A66, A70, CHORD:45; ::_thesis: ( v,aa are_adjacent & not bb,aa are_adjacent )
thus v,aa are_adjacent by A65, A70, CHORD:45; ::_thesis: not bb,aa are_adjacent
thus not bb,aa are_adjacent by A67, A70, CHORD:45; ::_thesis: verum
end;
end;
end;
then consider a, bb being Vertex of G such that
A75: a in V .followSet k and
A76: L . a < L . bb and
A77: v,a are_adjacent and
A78: v,bb are_adjacent and
A79: not a,bb are_adjacent ;
defpred S2[ Nat] means ( $1 in dom V & L . a < L . (V /. $1) & a <> V /. $1 & v,V /. $1 are_adjacent & not a,V /. $1 are_adjacent );
A80: rng V = the_Vertices_of G by CHORD:def_12;
A81: ex k being Nat st S2[k]
proof
consider mbb being set such that
A82: mbb in dom V and
A83: bb = V . mbb by A80, FUNCT_1:def_3;
reconsider mbb = mbb as Element of NAT by A82;
take mbb ; ::_thesis: S2[mbb]
thus mbb in dom V by A82; ::_thesis: ( L . a < L . (V /. mbb) & a <> V /. mbb & v,V /. mbb are_adjacent & not a,V /. mbb are_adjacent )
thus L . a < L . (V /. mbb) by A76, A82, A83, PARTFUN1:def_6; ::_thesis: ( a <> V /. mbb & v,V /. mbb are_adjacent & not a,V /. mbb are_adjacent )
thus a <> V /. mbb by A76, A82, A83, PARTFUN1:def_6; ::_thesis: ( v,V /. mbb are_adjacent & not a,V /. mbb are_adjacent )
thus v,V /. mbb are_adjacent by A78, A82, A83, PARTFUN1:def_6; ::_thesis: not a,V /. mbb are_adjacent
thus not a,V /. mbb are_adjacent by A79, A82, A83, PARTFUN1:def_6; ::_thesis: verum
end;
A84: for k being Nat st S2[k] holds
k <= len V by FINSEQ_3:25;
consider mb being Nat such that
A85: S2[mb] and
for n being Nat st S2[n] holds
n <= mb from NAT_1:sch_6(A84, A81);
reconsider v = v, a = a, b = V /. mb as Vertex of G ;
consider ma being set such that
A86: ma in dom V and
A87: a = V . ma by A80, FUNCT_1:def_3;
reconsider ma = ma as Element of NAT by A86;
A88: a = V /. ma by A86, A87, PARTFUN1:def_6;
0 + 1 <= k by NAT_1:13;
then A89: k in dom V by A60, FINSEQ_3:25;
A90: now__::_thesis:_not_ma_<=_k
assume ma <= k ; ::_thesis: contradiction
then A91: ma < k by A62, A78, A79, A87, XXREAL_0:1;
a in the_Vertices_of G ;
then A92: a in rng V by CHORD:def_12;
V is one-to-one by CHORD:def_12;
then a .. V >= k by A75, A89, A92, CHORD:16;
then a .. V > ma by A91, XXREAL_0:2;
hence contradiction by A86, A87, FINSEQ_4:24; ::_thesis: verum
end;
A93: v = V /. k by A62, A89, PARTFUN1:def_6;
then A94: L . v < L . a by A5, A89, A86, A88, A90;
A95: v <> b by A77, A85;
A96: S1[4]
proof
A97: L . a > L . v by A5, A89, A93, A86, A88, A90;
consider c being Vertex of G such that
c in dom L and
A98: L . b < L . c and
A99: c,a are_adjacent and
A100: not c,v are_adjacent and
A101: for x being Vertex of G st x <> c & x,a are_adjacent & not x,v are_adjacent holds
L . x < L . c by A1, A2, A85, A94, Def18;
consider P being Path of G, e1, e2 being set such that
A102: P is open and
A103: len P = 5 and
A104: P .length() = 2 and
e1 Joins b,v,G and
e2 Joins v,a,G and
P .edges() = {e1,e2} and
A105: P .vertices() = {b,v,a} and
A106: P . 1 = b and
A107: P . 3 = v and
A108: P . 5 = a by A77, A85, A95, CHORD:47;
consider e being set such that
A109: e Joins P .last() ,c,G by A99, A103, A108, CHORD:def_3;
set Qr = P .addEdge e;
set Q = (P .addEdge e) .reverse() ;
A110: (P .addEdge e) .last() = c by A109, GLIB_001:63;
A111: len (P .addEdge e) = 5 + 2 by A103, A109, GLIB_001:64;
then A112: 1 in dom (P .addEdge e) by FINSEQ_3:25;
5 in dom P by A103, FINSEQ_3:25;
then A113: (P .addEdge e) . 5 = a by A108, A109, GLIB_001:65;
5 in dom (P .addEdge e) by A111, FINSEQ_3:25;
then A114: a = ((P .addEdge e) .reverse()) . ((7 - 5) + 1) by A111, A113, GLIB_001:24;
7 in dom (P .addEdge e) by A111, FINSEQ_3:25;
then c = ((P .addEdge e) .reverse()) . ((7 - 7) + 1) by A111, A110, GLIB_001:24;
then A115: c = ((P .addEdge e) .reverse()) .first() ;
3 in dom P by A103, FINSEQ_3:25;
then A116: (P .addEdge e) . 3 = v by A107, A109, GLIB_001:65;
(P .addEdge e) .length() = 2 + 1 by A104, A109, Lm4;
then A117: ((P .addEdge e) .reverse()) .length() = (3 + 1) - 1 by Lm5;
1 in dom P by A103, FINSEQ_3:25;
then (P .addEdge e) . 1 = b by A106, A109, GLIB_001:65;
then b = ((P .addEdge e) .reverse()) . (((len (P .addEdge e)) - 1) + 1) by A112, GLIB_001:24;
then A118: b = ((P .addEdge e) .reverse()) .last() by GLIB_001:21;
A119: len ((P .addEdge e) .reverse()) = len (P .addEdge e) by GLIB_001:21;
A120: P .first() = b by A106;
P .last() = a by A103, A108;
then A121: P is chordless by A85, A103, A120, CHORD:90;
A122: now__::_thesis:_for_x_being_set_st_x_in_P_.vertices()_holds_
L_._x_<=_L_._b
let x be set ; ::_thesis: ( x in P .vertices() implies L . b1 <= L . b )
assume A123: x in P .vertices() ; ::_thesis: L . b1 <= L . b
percases ( x = b or x = v or x = a ) by A105, A123, ENUMSET1:def_1;
suppose x = b ; ::_thesis: L . b1 <= L . b
hence L . x <= L . b ; ::_thesis: verum
end;
suppose x = v ; ::_thesis: L . b1 <= L . b
hence L . x <= L . b by A85, A94, XXREAL_0:2; ::_thesis: verum
end;
suppose x = a ; ::_thesis: L . b1 <= L . b
hence L . x <= L . b by A85; ::_thesis: verum
end;
end;
end;
then A124: not c in P .vertices() by A98;
A125: for e being set holds not e Joins P . ((len P) - 2),c,G by A100, A103, A107, CHORD:def_3;
then P .addEdge e is open by A102, A121, A109, A124, CHORD:97;
then A126: (P .addEdge e) .reverse() is open by GLIB_001:120;
A127: now__::_thesis:_for_x_being_set_st_x_in_((P_.addEdge_e)_.reverse())_.vertices()_holds_
L_._x_<=_L_._c
let x be set ; ::_thesis: ( x in ((P .addEdge e) .reverse()) .vertices() implies L . b1 <= L . c )
assume x in ((P .addEdge e) .reverse()) .vertices() ; ::_thesis: L . b1 <= L . c
then x in (P .addEdge e) .vertices() by GLIB_001:92;
then A128: x in (P .vertices()) \/ {c} by A109, GLIB_001:95;
percases ( x in P .vertices() or x in {c} ) by A128, XBOOLE_0:def_3;
suppose x in P .vertices() ; ::_thesis: L . b1 <= L . c
then L . x <= L . b by A122;
hence L . x <= L . c by A98, XXREAL_0:2; ::_thesis: verum
end;
suppose x in {c} ; ::_thesis: L . b1 <= L . c
hence L . x <= L . c by TARSKI:def_1; ::_thesis: verum
end;
end;
end;
3 in dom (P .addEdge e) by A111, FINSEQ_3:25;
then v = ((P .addEdge e) .reverse()) . ((7 - 3) + 1) by A111, A116, GLIB_001:24;
then A129: v = ((P .addEdge e) .reverse()) . ((len ((P .addEdge e) .reverse())) - 2) by A111, A119;
P .addEdge e is chordless by A102, A121, A109, A124, A125, CHORD:97;
then A130: (P .addEdge e) .reverse() is chordless by CHORD:91;
P .addEdge e is Path-like by A102, A121, A109, A124, A125, CHORD:97;
hence S1[4] by A85, A98, A101, A126, A130, A117, A114, A129, A118, A115, A97, A127; ::_thesis: verum
end;
for i being Nat st 4 <= i holds
S1[i] from NAT_1:sch_8(A96, A12);
then S1[(G .order()) + 11] by A59, XXREAL_0:2;
then consider P being Walk of G, v1, v2, v3, v4 being Vertex of G such that
A131: P is Path-like and
P is open and
P is chordless and
A132: P .length() = ((G .order()) + 11) - 1 and
v1 = P . ((len P) - 2) and
v2 = P . 3 and
v3 = P .last() and
v4 = P .first() and
L . v4 > L . v3 and
L . v3 > L . v2 and
L . v2 > L . v1 and
for x being Vertex of G st x <> v4 & x,v2 are_adjacent & not x,v1 are_adjacent holds
L . x < L . v4 ;
len P = (2 * ((G .order()) + 10)) + 1 by A132, GLIB_001:112;
then ((2 * (G .order())) + 21) + 1 = 2 * (len (P .vertexSeq())) by GLIB_001:def_14;
then (G .order()) + 11 <= (G .order()) + 1 by A131, GLIB_001:154;
hence contradiction by XREAL_1:8; ::_thesis: verum
end;
theorem :: LEXBFS:55
for G being finite chordal _Graph holds (((LexBFS:CSeq G) .Result()) `1) " is perfect VertexScheme of G
proof
let G be finite chordal _Graph; ::_thesis: (((LexBFS:CSeq G) .Result()) `1) " is perfect VertexScheme of G
set Hh = ((LexBFS:CSeq G) .Result()) `1 ;
reconsider V = (((LexBFS:CSeq G) .Result()) `1) " as VertexScheme of G by Th50;
A1: dom (((LexBFS:CSeq G) .Result()) `1) = the_Vertices_of G by Th49;
((LexBFS:CSeq G) .Result()) `1 = ((LexBFS:CSeq G) ``1) .Result() by Th40;
then ((LexBFS:CSeq G) .Result()) `1 is one-to-one by Th18;
then A2: V " = ((LexBFS:CSeq G) .Result()) `1 by FUNCT_1:43;
((LexBFS:CSeq G) .Result()) `1 is with_property_L3 by Th53;
hence (((LexBFS:CSeq G) .Result()) `1) " is perfect VertexScheme of G by A1, A2, Th54; ::_thesis: verum
end;
begin
definition
let G be _Graph;
mode MCS:Labeling of G is Element of [:(PFuncs ((the_Vertices_of G),NAT)),(Funcs ((the_Vertices_of G),NAT)):];
end;
definition
let G be finite _Graph;
func MCS:Init G -> MCS:Labeling of G equals :: LEXBFS:def 19
[{},((the_Vertices_of G) --> 0)];
coherence
[{},((the_Vertices_of G) --> 0)] is MCS:Labeling of G
proof
set f = (the_Vertices_of G) --> 0;
A1: rng {} c= NAT ;
A2: rng ((the_Vertices_of G) --> 0) c= NAT by RELAT_1:def_19;
dom ((the_Vertices_of G) --> 0) = the_Vertices_of G by FUNCOP_1:13;
then A3: (the_Vertices_of G) --> 0 in Funcs ((the_Vertices_of G),NAT) by A2, FUNCT_2:def_2;
dom {} c= the_Vertices_of G by XBOOLE_1:2;
then {} in PFuncs ((the_Vertices_of G),NAT) by A1, PARTFUN1:def_3;
hence [{},((the_Vertices_of G) --> 0)] is MCS:Labeling of G by A3, ZFMISC_1:def_2; ::_thesis: verum
end;
end;
:: deftheorem defines MCS:Init LEXBFS:def_19_:_
for G being finite _Graph holds MCS:Init G = [{},((the_Vertices_of G) --> 0)];
definition
let G be finite _Graph;
let L be MCS:Labeling of G;
func MCS:PickUnnumbered L -> Vertex of G means :Def20: :: LEXBFS:def 20
it = choose (the_Vertices_of G) if dom (L `1) = the_Vertices_of G
otherwise ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & it = choose (F " {(max S)}) );
existence
( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) ) )
proof
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set F = (L `2) | ((the_Vertices_of G) \ (dom (L `1)));
set S = rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1))));
percases ( dom (L `1) = the_Vertices_of G or dom (L `1) <> the_Vertices_of G ) ;
suppose dom (L `1) = the_Vertices_of G ; ::_thesis: ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) ) )
hence ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) ) ) ; ::_thesis: verum
end;
supposeA1: dom (L `1) <> the_Vertices_of G ; ::_thesis: ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) ) )
A2: dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by RELAT_1:61;
dom (L `2) = the_Vertices_of G by FUNCT_2:def_1;
then A3: dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = ((the_Vertices_of G) /\ (the_Vertices_of G)) \ (dom (L `1)) by A2, XBOOLE_1:49;
now__::_thesis:_not_dom_((L_`2)_|_((the_Vertices_of_G)_\_(dom_(L_`1))))_=_{}
assume dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) = {} ; ::_thesis: contradiction
then the_Vertices_of G c= dom (L `1) by A3, XBOOLE_1:37;
hence contradiction by A1, XBOOLE_0:def_10; ::_thesis: verum
end;
then reconsider S = rng ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) as non empty natural-membered finite set by RELAT_1:42;
set y = max S;
set IT = choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(max S)});
max S in S by XXREAL_2:def_8;
then not ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(max S)} is empty by FUNCT_1:72;
then choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(max S)}) in dom ((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) by FUNCT_1:def_7;
then choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(max S)}) in dom (L `2) by RELAT_1:57;
then reconsider IT = choose (((L `2) | ((the_Vertices_of G) \ (dom (L `1)))) " {(max S)}) as Vertex of G ;
ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & IT = choose (F " {(max S)}) & IT is Vertex of G ) ;
hence ( ( dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G st b1 = choose (the_Vertices_of G) ) & ( not dom (L `1) = the_Vertices_of G implies ex b1 being Vertex of G ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) ) ) ; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being Vertex of G holds
( ( dom (L `1) = the_Vertices_of G & b1 = choose (the_Vertices_of G) & b2 = choose (the_Vertices_of G) implies b1 = b2 ) & ( not dom (L `1) = the_Vertices_of G & ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b1 = choose (F " {(max S)}) ) & ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b2 = choose (F " {(max S)}) ) implies b1 = b2 ) ) ;
consistency
for b1 being Vertex of G holds verum ;
end;
:: deftheorem Def20 defines MCS:PickUnnumbered LEXBFS:def_20_:_
for G being finite _Graph
for L being MCS:Labeling of G
for b3 being Vertex of G holds
( ( dom (L `1) = the_Vertices_of G implies ( b3 = MCS:PickUnnumbered L iff b3 = choose (the_Vertices_of G) ) ) & ( not dom (L `1) = the_Vertices_of G implies ( b3 = MCS:PickUnnumbered L iff ex S being non empty natural-membered finite set ex F being Function st
( S = rng F & F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) & b3 = choose (F " {(max S)}) ) ) ) );
definition
let G be finite _Graph;
let L be MCS:Labeling of G;
let v be set ;
func MCS:LabelAdjacent (L,v) -> MCS:Labeling of G equals :: LEXBFS:def 21
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))];
coherence
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] is MCS:Labeling of G
proof
set V2G = L `2 ;
set VLG = L `1 ;
set f = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1);
now__::_thesis:_for_x_being_set_st_x_in_rng_((L_`2)_.incSubset_(((G_.AdjacentSet_{v})_\_(dom_(L_`1))),1))_holds_
x_in_NAT
let x be set ; ::_thesis: ( x in rng ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) implies x in NAT )
assume x in rng ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) ; ::_thesis: x in NAT
then ex y being set st
( y in dom ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) & ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) . y = x ) by FUNCT_1:def_3;
hence x in NAT ; ::_thesis: verum
end;
then A1: rng ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) c= NAT by TARSKI:def_3;
dom ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) = dom (L `2) by Def4;
then dom ((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1)) = the_Vertices_of G by FUNCT_2:def_1;
then (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) is Function of (the_Vertices_of G),NAT by A1, FUNCT_2:2;
then (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) in Funcs ((the_Vertices_of G),NAT) by FUNCT_2:8;
hence [(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] is MCS:Labeling of G by ZFMISC_1:87; ::_thesis: verum
end;
end;
:: deftheorem defines MCS:LabelAdjacent LEXBFS:def_21_:_
for G being finite _Graph
for L being MCS:Labeling of G
for v being set holds MCS:LabelAdjacent (L,v) = [(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))];
definition
let G be finite _Graph;
let L be MCS:Labeling of G;
let v be Vertex of G;
let n be Nat;
func MCS:Update (L,v,n) -> MCS:Labeling of G means :Def22: :: LEXBFS:def 22
ex M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & it = MCS:LabelAdjacent (M,v) );
existence
ex b1, M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & b1 = MCS:LabelAdjacent (M,v) )
proof
set k = (G .order()) -' n;
set L1 = (L `1) +* (v .--> ((G .order()) -' n));
A1: dom ((L `1) +* (v .--> ((G .order()) -' n))) = (dom (L `1)) \/ {v} by Lm1;
rng (v .--> ((G .order()) -' n)) c= {((G .order()) -' n)} by FUNCOP_1:13;
then rng (v .--> ((G .order()) -' n)) c= NAT by XBOOLE_1:1;
then A2: (rng (L `1)) \/ (rng (v .--> ((G .order()) -' n))) c= NAT by XBOOLE_1:8;
rng ((L `1) +* (v .--> ((G .order()) -' n))) c= (rng (L `1)) \/ (rng (v .--> ((G .order()) -' n))) by FUNCT_4:17;
then rng ((L `1) +* (v .--> ((G .order()) -' n))) c= NAT by A2, XBOOLE_1:1;
then (L `1) +* (v .--> ((G .order()) -' n)) in PFuncs ((the_Vertices_of G),NAT) by A1, PARTFUN1:def_3;
then reconsider M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] as MCS:Labeling of G by ZFMISC_1:87;
MCS:LabelAdjacent (M,v) is MCS:Labeling of G ;
hence ex b1, M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & b1 = MCS:LabelAdjacent (M,v) ) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being MCS:Labeling of G st ex M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & b1 = MCS:LabelAdjacent (M,v) ) & ex M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & b2 = MCS:LabelAdjacent (M,v) ) holds
b1 = b2 ;
end;
:: deftheorem Def22 defines MCS:Update LEXBFS:def_22_:_
for G being finite _Graph
for L being MCS:Labeling of G
for v being Vertex of G
for n being Nat
for b5 being MCS:Labeling of G holds
( b5 = MCS:Update (L,v,n) iff ex M being MCS:Labeling of G st
( M = [((L `1) +* (v .--> ((G .order()) -' n))),(L `2)] & b5 = MCS:LabelAdjacent (M,v) ) );
definition
let G be finite _Graph;
let L be MCS:Labeling of G;
func MCS:Step L -> MCS:Labeling of G equals :Def23: :: LEXBFS:def 23
L if G .order() <= card (dom (L `1))
otherwise MCS:Update (L,(MCS:PickUnnumbered L),(card (dom (L `1))));
coherence
( ( G .order() <= card (dom (L `1)) implies L is MCS:Labeling of G ) & ( not G .order() <= card (dom (L `1)) implies MCS:Update (L,(MCS:PickUnnumbered L),(card (dom (L `1)))) is MCS:Labeling of G ) ) ;
consistency
for b1 being MCS:Labeling of G holds verum ;
end;
:: deftheorem Def23 defines MCS:Step LEXBFS:def_23_:_
for G being finite _Graph
for L being MCS:Labeling of G holds
( ( G .order() <= card (dom (L `1)) implies MCS:Step L = L ) & ( not G .order() <= card (dom (L `1)) implies MCS:Step L = MCS:Update (L,(MCS:PickUnnumbered L),(card (dom (L `1)))) ) );
definition
let G be _Graph;
mode MCS:LabelingSeq of G -> ManySortedSet of NAT means :Def24: :: LEXBFS:def 24
for n being Nat holds it . n is MCS:Labeling of G;
existence
ex b1 being ManySortedSet of NAT st
for n being Nat holds b1 . n is MCS:Labeling of G
proof
set L = the MCS:Labeling of G;
deffunc H1( set ) -> MCS:Labeling of G = the MCS:Labeling of G;
consider f being ManySortedSet of NAT such that
A1: for i being set st i in NAT holds
f . i = H1(i) from PBOOLE:sch_4();
take f ; ::_thesis: for n being Nat holds f . n is MCS:Labeling of G
let n be Nat; ::_thesis: f . n is MCS:Labeling of G
n in NAT by ORDINAL1:def_12;
hence f . n is MCS:Labeling of G by A1; ::_thesis: verum
end;
end;
:: deftheorem Def24 defines MCS:LabelingSeq LEXBFS:def_24_:_
for G being _Graph
for b2 being ManySortedSet of NAT holds
( b2 is MCS:LabelingSeq of G iff for n being Nat holds b2 . n is MCS:Labeling of G );
definition
let G be _Graph;
let S be MCS:LabelingSeq of G;
let n be Nat;
:: original: .
redefine funcS . n -> MCS:Labeling of G;
coherence
S . n is MCS:Labeling of G by Def24;
end;
definition
let G be _Graph;
let S be MCS:LabelingSeq of G;
:: original: .Result()
redefine funcS .Result() -> MCS:Labeling of G;
coherence
S .Result() is MCS:Labeling of G by Def24;
end;
definition
let G be finite _Graph;
let S be MCS:LabelingSeq of G;
funcS ``1 -> preVNumberingSeq of G means :Def25: :: LEXBFS:def 25
for n being Nat holds it . n = (S . n) `1 ;
existence
ex b1 being preVNumberingSeq of G st
for n being Nat holds b1 . n = (S . n) `1
proof
deffunc H1( set ) -> set = (S . $1) `1 ;
consider f being ManySortedSet of NAT such that
A1: for i being set st i in NAT holds
f . i = H1(i) from PBOOLE:sch_4();
now__::_thesis:_for_i_being_Nat_holds_f_._i_is_PartFunc_of_(the_Vertices_of_G),NAT
let i be Nat; ::_thesis: f . i is PartFunc of (the_Vertices_of G),NAT
i in NAT by ORDINAL1:def_12;
then f . i = (S . i) `1 by A1;
hence f . i is PartFunc of (the_Vertices_of G),NAT ; ::_thesis: verum
end;
then reconsider f = f as preVNumberingSeq of G by Def8;
take f ; ::_thesis: for n being Nat holds f . n = (S . n) `1
let n be Nat; ::_thesis: f . n = (S . n) `1
n in NAT by ORDINAL1:def_12;
hence f . n = (S . n) `1 by A1; ::_thesis: verum
end;
uniqueness
for b1, b2 being preVNumberingSeq of G st ( for n being Nat holds b1 . n = (S . n) `1 ) & ( for n being Nat holds b2 . n = (S . n) `1 ) holds
b1 = b2
proof
let it1, it2 be preVNumberingSeq of G; ::_thesis: ( ( for n being Nat holds it1 . n = (S . n) `1 ) & ( for n being Nat holds it2 . n = (S . n) `1 ) implies it1 = it2 )
assume that
A2: for n being Nat holds it1 . n = (S . n) `1 and
A3: for n being Nat holds it2 . n = (S . n) `1 ; ::_thesis: it1 = it2
now__::_thesis:_for_i_being_set_st_i_in_NAT_holds_
it1_._i_=_it2_._i
let i be set ; ::_thesis: ( i in NAT implies it1 . i = it2 . i )
assume i in NAT ; ::_thesis: it1 . i = it2 . i
then reconsider i9 = i as Nat ;
thus it1 . i = (S . i9) `1 by A2
.= it2 . i by A3 ; ::_thesis: verum
end;
hence it1 = it2 by PBOOLE:3; ::_thesis: verum
end;
end;
:: deftheorem Def25 defines ``1 LEXBFS:def_25_:_
for G being finite _Graph
for S being MCS:LabelingSeq of G
for b3 being preVNumberingSeq of G holds
( b3 = S ``1 iff for n being Nat holds b3 . n = (S . n) `1 );
definition
let G be finite _Graph;
func MCS:CSeq G -> MCS:LabelingSeq of G means :Def26: :: LEXBFS:def 26
( it . 0 = MCS:Init G & ( for n being Nat holds it . (n + 1) = MCS:Step (it . n) ) );
existence
ex b1 being MCS:LabelingSeq of G st
( b1 . 0 = MCS:Init G & ( for n being Nat holds b1 . (n + 1) = MCS:Step (b1 . n) ) )
proof
defpred S1[ set , set , set ] means ( ( $2 is MCS:Labeling of G & $1 is Nat & ex nn being Nat ex Gn, Gn1 being MCS:Labeling of G st
( $1 = nn & $2 = Gn & $3 = Gn1 & Gn1 = MCS:Step Gn ) ) or ( ( not $2 is MCS:Labeling of G or not $1 is Nat ) & $2 = $3 ) );
now__::_thesis:_for_n,_x_being_set_ex_y_being_set_st_S1[n,x,y]
let n, x be set ; ::_thesis: ex y being set st S1[n,x,y]
now__::_thesis:_ex_y_being_set_st_S1[n,x,y]
percases ( ( x is MCS:Labeling of G & n is Nat ) or not x is MCS:Labeling of G or not n is Nat ) ;
supposeA1: ( x is MCS:Labeling of G & n is Nat ) ; ::_thesis: ex y being set st S1[n,x,y]
then reconsider Gn = x as MCS:Labeling of G ;
ex SGn being MCS:Labeling of G st SGn = MCS:Step Gn ;
hence ex y being set st S1[n,x,y] by A1; ::_thesis: verum
end;
suppose ( not x is MCS:Labeling of G or not n is Nat ) ; ::_thesis: ex y being set st S1[n,x,y]
hence ex y being set st S1[n,x,y] ; ::_thesis: verum
end;
end;
end;
hence ex y being set st S1[n,x,y] ; ::_thesis: verum
end;
then A2: for n being Element of NAT
for x being set ex y being set st S1[n,x,y] ;
consider IT being Function such that
A3: ( dom IT = NAT & IT . 0 = MCS:Init G & ( for n being Element of NAT holds S1[n,IT . n,IT . (n + 1)] ) ) from RECDEF_1:sch_1(A2);
reconsider IT = IT as ManySortedSet of NAT by A3, PARTFUN1:def_2, RELAT_1:def_18;
defpred S2[ Nat] means IT . $1 is MCS:Labeling of G;
A4: now__::_thesis:_for_n_being_Nat_st_S2[n]_holds_
S2[n_+_1]
let n be Nat; ::_thesis: ( S2[n] implies S2[n + 1] )
assume A5: S2[n] ; ::_thesis: S2[n + 1]
n in NAT by ORDINAL1:def_12;
then ex nn being Nat ex Gn, Gn1 being MCS:Labeling of G st
( n = nn & IT . n = Gn & IT . (n + 1) = Gn1 & Gn1 = MCS:Step Gn ) by A3, A5;
hence S2[n + 1] ; ::_thesis: verum
end;
A6: S2[ 0 ] by A3;
for n being Nat holds S2[n] from NAT_1:sch_2(A6, A4);
then reconsider IT = IT as MCS:LabelingSeq of G by Def24;
take IT ; ::_thesis: ( IT . 0 = MCS:Init G & ( for n being Nat holds IT . (n + 1) = MCS:Step (IT . n) ) )
thus IT . 0 = MCS:Init G by A3; ::_thesis: for n being Nat holds IT . (n + 1) = MCS:Step (IT . n)
let n be Nat; ::_thesis: IT . (n + 1) = MCS:Step (IT . n)
n in NAT by ORDINAL1:def_12;
then ex nn being Nat ex Gn, Gn1 being MCS:Labeling of G st
( n = nn & IT . n = Gn & IT . (n + 1) = Gn1 & Gn1 = MCS:Step Gn ) by A3;
hence IT . (n + 1) = MCS:Step (IT . n) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being MCS:LabelingSeq of G st b1 . 0 = MCS:Init G & ( for n being Nat holds b1 . (n + 1) = MCS:Step (b1 . n) ) & b2 . 0 = MCS:Init G & ( for n being Nat holds b2 . (n + 1) = MCS:Step (b2 . n) ) holds
b1 = b2
proof
let IT1, IT2 be MCS:LabelingSeq of G; ::_thesis: ( IT1 . 0 = MCS:Init G & ( for n being Nat holds IT1 . (n + 1) = MCS:Step (IT1 . n) ) & IT2 . 0 = MCS:Init G & ( for n being Nat holds IT2 . (n + 1) = MCS:Step (IT2 . n) ) implies IT1 = IT2 )
assume that
A7: IT1 . 0 = MCS:Init G and
A8: for n being Nat holds IT1 . (n + 1) = MCS:Step (IT1 . n) and
A9: IT2 . 0 = MCS:Init G and
A10: for n being Nat holds IT2 . (n + 1) = MCS:Step (IT2 . n) ; ::_thesis: IT1 = IT2
defpred S1[ Nat] means IT1 . $1 = IT2 . $1;
now__::_thesis:_for_n_being_Nat_st_S1[n]_holds_
S1[n_+_1]
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume S1[n] ; ::_thesis: S1[n + 1]
then IT1 . (n + 1) = MCS:Step (IT2 . n) by A8
.= IT2 . (n + 1) by A10 ;
hence S1[n + 1] ; ::_thesis: verum
end;
then A11: for n being Element of NAT st S1[n] holds
S1[n + 1] ;
A12: S1[ 0 ] by A7, A9;
for n being Element of NAT holds S1[n] from NAT_1:sch_1(A12, A11);
then for n being set st n in NAT holds
IT1 . n = IT2 . n ;
hence IT1 = IT2 by PBOOLE:3; ::_thesis: verum
end;
end;
:: deftheorem Def26 defines MCS:CSeq LEXBFS:def_26_:_
for G being finite _Graph
for b2 being MCS:LabelingSeq of G holds
( b2 = MCS:CSeq G iff ( b2 . 0 = MCS:Init G & ( for n being Nat holds b2 . (n + 1) = MCS:Step (b2 . n) ) ) );
theorem Th56: :: LEXBFS:56
for G being finite _Graph holds MCS:CSeq G is iterative
proof
let G be finite _Graph; ::_thesis: MCS:CSeq G is iterative
set CS = MCS:CSeq G;
let k, n be Nat; :: according to LEXBFS:def_6 ::_thesis: ( (MCS:CSeq G) . k = (MCS:CSeq G) . n implies (MCS:CSeq G) . (k + 1) = (MCS:CSeq G) . (n + 1) )
(MCS:CSeq G) . (k + 1) = MCS:Step ((MCS:CSeq G) . k) by Def26;
hence ( (MCS:CSeq G) . k = (MCS:CSeq G) . n implies (MCS:CSeq G) . (k + 1) = (MCS:CSeq G) . (n + 1) ) by Def26; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster MCS:CSeq G -> iterative ;
coherence
MCS:CSeq G is iterative by Th56;
end;
theorem Th57: :: LEXBFS:57
for G being finite _Graph
for v being set holds ((MCS:Init G) `2) . v = 0
proof
let G be finite _Graph; ::_thesis: for v being set holds ((MCS:Init G) `2) . v = 0
let v be set ; ::_thesis: ((MCS:Init G) `2) . v = 0
set g = (the_Vertices_of G) --> {};
[{},((the_Vertices_of G) --> {})] `2 = (the_Vertices_of G) --> {} ;
then A1: (MCS:Init G) `2 = (the_Vertices_of G) --> {} ;
then dom ((MCS:Init G) `2) = the_Vertices_of G by FUNCOP_1:13;
then reconsider f = (the_Vertices_of G) --> {} as PartFunc of (the_Vertices_of G),(rng ((the_Vertices_of G) --> {})) by A1, RELSET_1:4;
now__::_thesis:_for_x_being_set_holds_f_._x_=_{}
let x be set ; ::_thesis: f . b1 = {}
percases ( x in dom f or not x in dom f ) ;
suppose x in dom f ; ::_thesis: f . b1 = {}
hence f . x = {} by FUNCOP_1:7; ::_thesis: verum
end;
suppose not x in dom f ; ::_thesis: f . b1 = {}
hence f . x = {} by FUNCT_1:def_2; ::_thesis: verum
end;
end;
end;
hence ((MCS:Init G) `2) . v = 0 by A1; ::_thesis: verum
end;
theorem Th58: :: LEXBFS:58
for G being finite _Graph
for L being MCS:Labeling of G
for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G
for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
let L be MCS:Labeling of G; ::_thesis: for x being set st not x in dom (L `1) & dom (L `1) <> the_Vertices_of G holds
(L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
let x be set ; ::_thesis: ( not x in dom (L `1) & dom (L `1) <> the_Vertices_of G implies (L `2) . x <= (L `2) . (MCS:PickUnnumbered L) )
assume that
A1: not x in dom (L `1) and
A2: dom (L `1) <> the_Vertices_of G ; ::_thesis: (L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set w = MCS:PickUnnumbered L;
consider S being non empty natural-membered finite set , F being Function such that
A3: S = rng F and
A4: F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
A5: MCS:PickUnnumbered L = choose (F " {(max S)}) by A2, Def20;
A6: dom F = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by A4, RELAT_1:61;
set y = max S;
max S in rng F by A3, XXREAL_2:def_8;
then A7: not F " {(max S)} is empty by FUNCT_1:72;
then MCS:PickUnnumbered L in dom F by A5, FUNCT_1:def_7;
then A8: (L `2) . (MCS:PickUnnumbered L) = F . (MCS:PickUnnumbered L) by A4, FUNCT_1:47;
F . (MCS:PickUnnumbered L) in {(max S)} by A5, A7, FUNCT_1:def_7;
then A9: (L `2) . (MCS:PickUnnumbered L) = max S by A8, TARSKI:def_1;
A10: dom (L `2) = the_Vertices_of G by FUNCT_2:def_1;
percases ( x in the_Vertices_of G or not x in the_Vertices_of G ) ;
suppose x in the_Vertices_of G ; ::_thesis: (L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
then x in (the_Vertices_of G) \ (dom (L `1)) by A1, XBOOLE_0:def_5;
then A11: x in dom F by A10, A6, XBOOLE_0:def_4;
then A12: F . x in S by A3, FUNCT_1:def_3;
F . x = (L `2) . x by A4, A11, FUNCT_1:47;
hence (L `2) . x <= (L `2) . (MCS:PickUnnumbered L) by A9, A12, XXREAL_2:def_8; ::_thesis: verum
end;
suppose not x in the_Vertices_of G ; ::_thesis: (L `2) . x <= (L `2) . (MCS:PickUnnumbered L)
hence (L `2) . x <= (L `2) . (MCS:PickUnnumbered L) by A10, FUNCT_1:def_2; ::_thesis: verum
end;
end;
end;
theorem Th59: :: LEXBFS:59
for G being finite _Graph
for L being MCS:Labeling of G st dom (L `1) <> the_Vertices_of G holds
not MCS:PickUnnumbered L in dom (L `1)
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G st dom (L `1) <> the_Vertices_of G holds
not MCS:PickUnnumbered L in dom (L `1)
let L be MCS:Labeling of G; ::_thesis: ( dom (L `1) <> the_Vertices_of G implies not MCS:PickUnnumbered L in dom (L `1) )
assume A1: dom (L `1) <> the_Vertices_of G ; ::_thesis: not MCS:PickUnnumbered L in dom (L `1)
set VG = the_Vertices_of G;
set V2G = L `2 ;
set VLG = L `1 ;
set w = MCS:PickUnnumbered L;
consider S being non empty natural-membered finite set , F being Function such that
A2: S = rng F and
A3: F = (L `2) | ((the_Vertices_of G) \ (dom (L `1))) and
A4: MCS:PickUnnumbered L = choose (F " {(max S)}) by A1, Def20;
set y = max S;
max S in rng F by A2, XXREAL_2:def_8;
then not F " {(max S)} is empty by FUNCT_1:72;
then A5: MCS:PickUnnumbered L in dom F by A4, FUNCT_1:def_7;
assume MCS:PickUnnumbered L in dom (L `1) ; ::_thesis: contradiction
then A6: not MCS:PickUnnumbered L in (the_Vertices_of G) \ (dom (L `1)) by XBOOLE_0:def_5;
dom F = (dom (L `2)) /\ ((the_Vertices_of G) \ (dom (L `1))) by A3, RELAT_1:61;
hence contradiction by A5, A6, XBOOLE_0:def_4; ::_thesis: verum
end;
theorem Th60: :: LEXBFS:60
for G being finite _Graph
for L being MCS:Labeling of G
for v, x being set st not x in G .AdjacentSet {v} holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G
for v, x being set st not x in G .AdjacentSet {v} holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
let L be MCS:Labeling of G; ::_thesis: for v, x being set st not x in G .AdjacentSet {v} holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
let v, x be set ; ::_thesis: ( not x in G .AdjacentSet {v} implies (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x )
assume A1: not x in G .AdjacentSet {v} ; ::_thesis: (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
set V2G = L `2 ;
set VLG = L `1 ;
set GL = MCS:LabelAdjacent (L,v);
set V2 = (MCS:LabelAdjacent (L,v)) `2 ;
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
then A2: (MCS:LabelAdjacent (L,v)) `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
not x in (G .AdjacentSet {v}) \ (dom (L `1)) by A1, XBOOLE_0:def_5;
hence (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x by A2, Def4; ::_thesis: verum
end;
theorem Th61: :: LEXBFS:61
for G being finite _Graph
for L being MCS:Labeling of G
for v, x being set st x in dom (L `1) holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G
for v, x being set st x in dom (L `1) holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
let L be MCS:Labeling of G; ::_thesis: for v, x being set st x in dom (L `1) holds
(L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
let v, x be set ; ::_thesis: ( x in dom (L `1) implies (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x )
assume A1: x in dom (L `1) ; ::_thesis: (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x
set V2G = L `2 ;
set VLG = L `1 ;
set GL = MCS:LabelAdjacent (L,v);
set V2 = (MCS:LabelAdjacent (L,v)) `2 ;
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
then A2: (MCS:LabelAdjacent (L,v)) `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
not x in (G .AdjacentSet {v}) \ (dom (L `1)) by A1, XBOOLE_0:def_5;
hence (L `2) . x = ((MCS:LabelAdjacent (L,v)) `2) . x by A2, Def4; ::_thesis: verum
end;
theorem Th62: :: LEXBFS:62
for G being finite _Graph
for L being MCS:Labeling of G
for v, x being set st x in dom (L `2) & x in G .AdjacentSet {v} & not x in dom (L `1) holds
((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G
for v, x being set st x in dom (L `2) & x in G .AdjacentSet {v} & not x in dom (L `1) holds
((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1
let L be MCS:Labeling of G; ::_thesis: for v, x being set st x in dom (L `2) & x in G .AdjacentSet {v} & not x in dom (L `1) holds
((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1
let v, x be set ; ::_thesis: ( x in dom (L `2) & x in G .AdjacentSet {v} & not x in dom (L `1) implies ((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1 )
assume that
A1: x in dom (L `2) and
A2: x in G .AdjacentSet {v} and
A3: not x in dom (L `1) ; ::_thesis: ((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1
set V2G = L `2 ;
set VLG = L `1 ;
set GL = MCS:LabelAdjacent (L,v);
set V2 = (MCS:LabelAdjacent (L,v)) `2 ;
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
then A4: (MCS:LabelAdjacent (L,v)) `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
x in (G .AdjacentSet {v}) \ (dom (L `1)) by A2, A3, XBOOLE_0:def_5;
hence ((MCS:LabelAdjacent (L,v)) `2) . x = ((L `2) . x) + 1 by A1, A4, Def4; ::_thesis: verum
end;
theorem :: LEXBFS:63
for G being finite _Graph
for L being MCS:Labeling of G
for v being set st dom (L `2) = the_Vertices_of G holds
dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G
proof
let G be finite _Graph; ::_thesis: for L being MCS:Labeling of G
for v being set st dom (L `2) = the_Vertices_of G holds
dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G
let L be MCS:Labeling of G; ::_thesis: for v being set st dom (L `2) = the_Vertices_of G holds
dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G
let v be set ; ::_thesis: ( dom (L `2) = the_Vertices_of G implies dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G )
assume A1: dom (L `2) = the_Vertices_of G ; ::_thesis: dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G
set V2G = L `2 ;
set VLG = L `1 ;
set GL = MCS:LabelAdjacent (L,v);
set V2 = (MCS:LabelAdjacent (L,v)) `2 ;
[(L `1),((L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1))] `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
then (MCS:LabelAdjacent (L,v)) `2 = (L `2) .incSubset (((G .AdjacentSet {v}) \ (dom (L `1))),1) ;
hence dom ((MCS:LabelAdjacent (L,v)) `2) = the_Vertices_of G by A1, Def4; ::_thesis: verum
end;
theorem Th64: :: LEXBFS:64
for G being finite _Graph
for n being Nat st card (dom (((MCS:CSeq G) . n) `1)) < G .order() holds
((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)))))
proof
let G be finite _Graph; ::_thesis: for n being Nat st card (dom (((MCS:CSeq G) . n) `1)) < G .order() holds
((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)))))
let n be Nat; ::_thesis: ( card (dom (((MCS:CSeq G) . n) `1)) < G .order() implies ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1))))) )
assume A1: card (dom (((MCS:CSeq G) . n) `1)) < G .order() ; ::_thesis: ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)))))
set CN1 = (MCS:CSeq G) . (n + 1);
set CSN = (MCS:CSeq G) . n;
set VLN = ((MCS:CSeq G) . n) `1 ;
set w = MCS:PickUnnumbered ((MCS:CSeq G) . n);
set k = (G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)));
(MCS:CSeq G) . (n + 1) = MCS:Step ((MCS:CSeq G) . n) by Def26;
then (MCS:CSeq G) . (n + 1) = MCS:Update (((MCS:CSeq G) . n),(MCS:PickUnnumbered ((MCS:CSeq G) . n)),(card (dom (((MCS:CSeq G) . n) `1)))) by A1, Def23;
then consider L being MCS:Labeling of G such that
A2: L = [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)))))),(((MCS:CSeq G) . n) `2)] and
A3: (MCS:CSeq G) . (n + 1) = MCS:LabelAdjacent (L,(MCS:PickUnnumbered ((MCS:CSeq G) . n))) by Def22;
[(L `1),((L `2) .incSubset (((G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))}) \ (dom (L `1))),1))] `1 = L `1 ;
then ((MCS:CSeq G) . (n + 1)) `1 = [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1)))))),(((MCS:CSeq G) . n) `2)] `1 by A3, A2;
hence ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1))))) ; ::_thesis: verum
end;
theorem Th65: :: LEXBFS:65
for G being finite _Graph
for n being Nat st n <= G .order() holds
card (dom (((MCS:CSeq G) . n) `1)) = n
proof
let G be finite _Graph; ::_thesis: for n being Nat st n <= G .order() holds
card (dom (((MCS:CSeq G) . n) `1)) = n
let n be Nat; ::_thesis: ( n <= G .order() implies card (dom (((MCS:CSeq G) . n) `1)) = n )
assume A1: n <= G .order() ; ::_thesis: card (dom (((MCS:CSeq G) . n) `1)) = n
defpred S1[ Nat] means ( $1 <= G .order() implies card (dom (((MCS:CSeq G) . $1) `1)) = $1 );
A2: for k being Element of NAT st k < G .order() & card (dom (((MCS:CSeq G) . k) `1)) = k holds
card (dom (((MCS:CSeq G) . (k + 1)) `1)) = k + 1
proof
let k be Element of NAT ; ::_thesis: ( k < G .order() & card (dom (((MCS:CSeq G) . k) `1)) = k implies card (dom (((MCS:CSeq G) . (k + 1)) `1)) = k + 1 )
assume that
A3: k < G .order() and
A4: card (dom (((MCS:CSeq G) . k) `1)) = k ; ::_thesis: card (dom (((MCS:CSeq G) . (k + 1)) `1)) = k + 1
set CK1 = (MCS:CSeq G) . (k + 1);
set CSK = (MCS:CSeq G) . k;
set VLK = ((MCS:CSeq G) . k) `1 ;
set VK1 = ((MCS:CSeq G) . (k + 1)) `1 ;
set w = MCS:PickUnnumbered ((MCS:CSeq G) . k);
set wf = (MCS:PickUnnumbered ((MCS:CSeq G) . k)) .--> ((G .order()) -' k);
A5: dom ((MCS:PickUnnumbered ((MCS:CSeq G) . k)) .--> ((G .order()) -' k)) = {(MCS:PickUnnumbered ((MCS:CSeq G) . k))} by FUNCOP_1:13;
((MCS:CSeq G) . (k + 1)) `1 = (((MCS:CSeq G) . k) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . k)) .--> ((G .order()) -' k)) by A3, A4, Th64;
then dom (((MCS:CSeq G) . (k + 1)) `1) = (dom (((MCS:CSeq G) . k) `1)) \/ {(MCS:PickUnnumbered ((MCS:CSeq G) . k))} by A5, FUNCT_4:def_1;
hence card (dom (((MCS:CSeq G) . (k + 1)) `1)) = k + 1 by A3, A4, Th59, CARD_2:41; ::_thesis: verum
end;
A6: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A7: S1[k] ; ::_thesis: S1[k + 1]
percases ( k < G .order() or k >= G .order() ) ;
suppose k < G .order() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by A2, A7; ::_thesis: verum
end;
suppose k >= G .order() ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:13; ::_thesis: verum
end;
end;
end;
A8: [{},((the_Vertices_of G) --> 0)] `1 = {} ;
(MCS:CSeq G) . 0 = MCS:Init G by Def26;
then A9: S1[ 0 ] by A8;
for k being Nat holds S1[k] from NAT_1:sch_2(A9, A6);
hence card (dom (((MCS:CSeq G) . n) `1)) = n by A1; ::_thesis: verum
end;
theorem Th66: :: LEXBFS:66
for G being finite _Graph
for n being Nat st G .order() <= n holds
(MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . n
proof
let G be finite _Graph; ::_thesis: for n being Nat st G .order() <= n holds
(MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . n
let n be Nat; ::_thesis: ( G .order() <= n implies (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . n )
assume G .order() <= n ; ::_thesis: (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . n
then A1: ex i being Nat st (G .order()) + i = n by NAT_1:10;
set CS = MCS:CSeq G;
defpred S1[ Nat] means G .order() = card (dom (((MCS:CSeq G) . ((G .order()) + $1)) `1));
defpred S2[ Nat] means (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . ((G .order()) + $1);
A2: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
set CK1 = (MCS:CSeq G) . (((G .order()) + k) + 1);
set CSK = (MCS:CSeq G) . ((G .order()) + k);
(MCS:CSeq G) . (((G .order()) + k) + 1) = MCS:Step ((MCS:CSeq G) . ((G .order()) + k)) by Def26;
hence S1[k + 1] by A3, Def23; ::_thesis: verum
end;
A4: S1[ 0 ] by Th65;
A5: for k being Nat holds S1[k] from NAT_1:sch_2(A4, A2);
A6: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A7: S2[k] ; ::_thesis: S2[k + 1]
set CK1 = (MCS:CSeq G) . (((G .order()) + k) + 1);
set CSK = (MCS:CSeq G) . ((G .order()) + k);
set VLK = ((MCS:CSeq G) . ((G .order()) + k)) `1 ;
A8: (MCS:CSeq G) . (((G .order()) + k) + 1) = MCS:Step ((MCS:CSeq G) . ((G .order()) + k)) by Def26;
card (dom (((MCS:CSeq G) . ((G .order()) + k)) `1)) = G .order() by A5;
hence S2[k + 1] by A7, A8, Def23; ::_thesis: verum
end;
A9: S2[ 0 ] ;
for k being Nat holds S2[k] from NAT_1:sch_2(A9, A6);
hence (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . n by A1; ::_thesis: verum
end;
theorem Th67: :: LEXBFS:67
for G being finite _Graph
for m, n being Nat st G .order() <= m & m <= n holds
(MCS:CSeq G) . m = (MCS:CSeq G) . n
proof
let G be finite _Graph; ::_thesis: for m, n being Nat st G .order() <= m & m <= n holds
(MCS:CSeq G) . m = (MCS:CSeq G) . n
let m, n be Nat; ::_thesis: ( G .order() <= m & m <= n implies (MCS:CSeq G) . m = (MCS:CSeq G) . n )
assume that
A1: G .order() <= m and
A2: m <= n ; ::_thesis: (MCS:CSeq G) . m = (MCS:CSeq G) . n
(MCS:CSeq G) . m = (MCS:CSeq G) . (G .order()) by A1, Th66;
hence (MCS:CSeq G) . m = (MCS:CSeq G) . n by A1, A2, Th66, XXREAL_0:2; ::_thesis: verum
end;
theorem Th68: :: LEXBFS:68
for G being finite _Graph holds MCS:CSeq G is eventually-constant
proof
let G be finite _Graph; ::_thesis: MCS:CSeq G is eventually-constant
take G .order() ; :: according to LEXBFS:def_7 ::_thesis: for m being Nat st G .order() <= m holds
(MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . m
let m be Nat; ::_thesis: ( G .order() <= m implies (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . m )
assume G .order() <= m ; ::_thesis: (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . m
hence (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . m by Th66; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster MCS:CSeq G -> eventually-constant ;
coherence
MCS:CSeq G is eventually-constant by Th68;
end;
theorem Th69: :: LEXBFS:69
for G being finite _Graph
for n being Nat holds
( dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
proof
let G be finite _Graph; ::_thesis: for n being Nat holds
( dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
let n be Nat; ::_thesis: ( dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G iff G .order() <= n )
set VLN = ((MCS:CSeq G) . n) `1 ;
set CSO = (MCS:CSeq G) . (G .order());
set VLO = ((MCS:CSeq G) . (G .order())) `1 ;
thus ( dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G implies not n < G .order() ) by Th65; ::_thesis: ( G .order() <= n implies dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G )
card (dom (((MCS:CSeq G) . (G .order())) `1)) = card (the_Vertices_of G) by Th65;
then A1: dom (((MCS:CSeq G) . (G .order())) `1) = the_Vertices_of G by CARD_FIN:1;
assume G .order() <= n ; ::_thesis: dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G
hence dom (((MCS:CSeq G) . n) `1) = the_Vertices_of G by A1, Th67; ::_thesis: verum
end;
theorem Th70: :: LEXBFS:70
for G being finite _Graph holds (MCS:CSeq G) .Lifespan() = G .order()
proof
let G be finite _Graph; ::_thesis: (MCS:CSeq G) .Lifespan() = G .order()
set CS = MCS:CSeq G;
A1: for n being Nat st (MCS:CSeq G) . n = (MCS:CSeq G) . (n + 1) holds
G .order() <= n
proof
let n be Nat; ::_thesis: ( (MCS:CSeq G) . n = (MCS:CSeq G) . (n + 1) implies G .order() <= n )
assume A2: (MCS:CSeq G) . n = (MCS:CSeq G) . (n + 1) ; ::_thesis: G .order() <= n
set w = MCS:PickUnnumbered ((MCS:CSeq G) . n);
set VN1 = ((MCS:CSeq G) . (n + 1)) `1 ;
set VLN = ((MCS:CSeq G) . n) `1 ;
set j = card (dom (((MCS:CSeq G) . n) `1));
set wf = (MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1))));
assume A3: n < G .order() ; ::_thesis: contradiction
then dom (((MCS:CSeq G) . n) `1) <> the_Vertices_of G by Th69;
then A4: not MCS:PickUnnumbered ((MCS:CSeq G) . n) in dom (((MCS:CSeq G) . n) `1) by Th59;
card (dom (((MCS:CSeq G) . n) `1)) < G .order() by A3, Th65;
then A5: ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1))))) by Th64;
dom ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' (card (dom (((MCS:CSeq G) . n) `1))))) = {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by FUNCOP_1:13;
then A6: dom (((MCS:CSeq G) . (n + 1)) `1) = (dom (((MCS:CSeq G) . n) `1)) \/ {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by A5, FUNCT_4:def_1;
MCS:PickUnnumbered ((MCS:CSeq G) . n) in {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by TARSKI:def_1;
hence contradiction by A2, A4, A6, XBOOLE_0:def_3; ::_thesis: verum
end;
G .order() <= (G .order()) + 1 by NAT_1:13;
then (MCS:CSeq G) . (G .order()) = (MCS:CSeq G) . ((G .order()) + 1) by Th66;
hence (MCS:CSeq G) .Lifespan() = G .order() by A1, GLIB_000:def_55; ::_thesis: verum
end;
theorem Th71: :: LEXBFS:71
for G being finite _Graph holds (MCS:CSeq G) ``1 is eventually-constant
proof
let G be finite _Graph; ::_thesis: (MCS:CSeq G) ``1 is eventually-constant
set CS = MCS:CSeq G;
set S = (MCS:CSeq G) ``1 ;
now__::_thesis:_ex_n_being_Nat_st_
for_m_being_Nat_st_n_<=_m_holds_
((MCS:CSeq_G)_``1)_._n_=_((MCS:CSeq_G)_``1)_._m
consider n being Nat such that
A1: for m being Nat st n <= m holds
(MCS:CSeq G) . n = (MCS:CSeq G) . m by Def7;
take n = n; ::_thesis: for m being Nat st n <= m holds
((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) ``1) . m
let m be Nat; ::_thesis: ( n <= m implies ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) ``1) . m )
assume A2: n <= m ; ::_thesis: ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) ``1) . m
thus ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) . n) `1 by Def25
.= ((MCS:CSeq G) . m) `1 by A1, A2
.= ((MCS:CSeq G) ``1) . m by Def25 ; ::_thesis: verum
end;
hence (MCS:CSeq G) ``1 is eventually-constant by Def7; ::_thesis: verum
end;
theorem Th72: :: LEXBFS:72
for G being finite _Graph holds ((MCS:CSeq G) ``1) .Lifespan() = (MCS:CSeq G) .Lifespan()
proof
let G be finite _Graph; ::_thesis: ((MCS:CSeq G) ``1) .Lifespan() = (MCS:CSeq G) .Lifespan()
set S = MCS:CSeq G;
set VN = (MCS:CSeq G) ``1 ;
set ls = G .order() ;
A1: (MCS:CSeq G) ``1 is eventually-constant by Th71;
A2: ((MCS:CSeq G) . ((G .order()) + 1)) `1 = ((MCS:CSeq G) ``1) . ((G .order()) + 1) by Def25;
A3: now__::_thesis:_for_n_being_Nat_st_((MCS:CSeq_G)_``1)_._n_=_((MCS:CSeq_G)_``1)_._(n_+_1)_holds_
not_G_.order()_>_n
let n be Nat; ::_thesis: ( ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) ``1) . (n + 1) implies not G .order() > n )
assume that
A4: ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) ``1) . (n + 1) and
A5: G .order() > n ; ::_thesis: contradiction
n + 1 <= G .order() by A5, NAT_1:13;
then A6: card (dom (((MCS:CSeq G) . (n + 1)) `1)) = n + 1 by Th65;
A7: ((MCS:CSeq G) . (n + 1)) `1 = ((MCS:CSeq G) ``1) . (n + 1) by Def25;
A8: ((MCS:CSeq G) . n) `1 = ((MCS:CSeq G) ``1) . n by Def25;
card (dom (((MCS:CSeq G) . n) `1)) = n by A5, Th65;
hence contradiction by A4, A6, A8, A7; ::_thesis: verum
end;
((MCS:CSeq G) . (G .order())) `1 = ((MCS:CSeq G) ``1) . (G .order()) by Def25;
then A9: ((MCS:CSeq G) ``1) . (G .order()) = ((MCS:CSeq G) ``1) . ((G .order()) + 1) by A2, Th66, NAT_1:11;
(MCS:CSeq G) .Lifespan() = G .order() by Th70;
hence ((MCS:CSeq G) ``1) .Lifespan() = (MCS:CSeq G) .Lifespan() by A1, A9, A3, GLIB_000:def_55; ::_thesis: verum
end;
theorem Th73: :: LEXBFS:73
for G being finite _Graph holds (MCS:CSeq G) ``1 is vertex-numbering
proof
let G be finite _Graph; ::_thesis: (MCS:CSeq G) ``1 is vertex-numbering
set GS = MCS:CSeq G;
set S = (MCS:CSeq G) ``1 ;
A1: (MCS:CSeq G) . 0 = MCS:Init G by Def26;
A2: [{},((the_Vertices_of G) --> 0)] `1 = {} ;
((MCS:CSeq G) ``1) . 0 = ((MCS:CSeq G) . 0) `1 by Def25;
hence ((MCS:CSeq G) ``1) . 0 = {} by A1, A2; :: according to LEXBFS:def_9 ::_thesis: ( (MCS:CSeq G) ``1 is iterative & (MCS:CSeq G) ``1 is halting & ((MCS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((MCS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
now__::_thesis:_for_k,_n_being_Nat_st_((MCS:CSeq_G)_``1)_._k_=_((MCS:CSeq_G)_``1)_._n_holds_
((MCS:CSeq_G)_``1)_._(k_+_1)_=_((MCS:CSeq_G)_``1)_._(n_+_1)
let k, n be Nat; ::_thesis: ( ((MCS:CSeq G) ``1) . k = ((MCS:CSeq G) ``1) . n implies ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1) )
assume A3: ((MCS:CSeq G) ``1) . k = ((MCS:CSeq G) ``1) . n ; ::_thesis: ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1)
A4: ((MCS:CSeq G) ``1) . (k + 1) = ((MCS:CSeq G) . (k + 1)) `1 by Def25;
A5: ((MCS:CSeq G) ``1) . k = ((MCS:CSeq G) . k) `1 by Def25;
A6: ((MCS:CSeq G) ``1) . (n + 1) = ((MCS:CSeq G) . (n + 1)) `1 by Def25;
A7: ((MCS:CSeq G) ``1) . n = ((MCS:CSeq G) . n) `1 by Def25;
percases ( ( k <= G .order() & n <= G .order() ) or ( k <= G .order() & n >= G .order() ) or ( k >= G .order() & n <= G .order() ) or ( k >= G .order() & n >= G .order() ) ) ;
supposeA8: ( k <= G .order() & n <= G .order() ) ; ::_thesis: ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1)
then card (dom (((MCS:CSeq G) . n) `1)) = n by Th65;
hence ((MCS:CSeq G) ``1) . (k + 1) = ((MCS:CSeq G) ``1) . (n + 1) by A3, A5, A7, A8, Th65; ::_thesis: verum
end;
supposeA9: ( k <= G .order() & n >= G .order() ) ; ::_thesis: ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1)
then A10: (MCS:CSeq G) . n = (MCS:CSeq G) . (G .order()) by Th66;
A11: card (dom (((MCS:CSeq G) . (G .order())) `1)) = G .order() by Th65;
A12: n + 1 >= G .order() by A9, NAT_1:13;
card (dom (((MCS:CSeq G) . k) `1)) = k by A9, Th65;
then k + 1 >= G .order() by A3, A5, A7, A10, A11, NAT_1:13;
hence ((MCS:CSeq G) ``1) . (k + 1) = ((MCS:CSeq G) . (G .order())) `1 by A4, Th66
.= ((MCS:CSeq G) ``1) . (n + 1) by A6, A12, Th66 ;
::_thesis: verum
end;
supposeA13: ( k >= G .order() & n <= G .order() ) ; ::_thesis: ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1)
then A14: (MCS:CSeq G) . k = (MCS:CSeq G) . (G .order()) by Th66;
A15: card (dom (((MCS:CSeq G) . (G .order())) `1)) = G .order() by Th65;
card (dom (((MCS:CSeq G) . n) `1)) = n by A13, Th65;
then A16: n + 1 >= G .order() by A3, A5, A7, A14, A15, NAT_1:13;
k + 1 >= G .order() by A13, NAT_1:13;
hence ((MCS:CSeq G) ``1) . (k + 1) = ((MCS:CSeq G) . (G .order())) `1 by A4, Th66
.= ((MCS:CSeq G) ``1) . (n + 1) by A6, A16, Th66 ;
::_thesis: verum
end;
supposeA17: ( k >= G .order() & n >= G .order() ) ; ::_thesis: ((MCS:CSeq G) ``1) . (b1 + 1) = ((MCS:CSeq G) ``1) . (b2 + 1)
then A18: n + 1 >= G .order() by NAT_1:13;
A19: k + 1 >= G .order() by A17, NAT_1:13;
thus ((MCS:CSeq G) ``1) . (k + 1) = ((MCS:CSeq G) . (k + 1)) `1 by Def25
.= ((MCS:CSeq G) . (G .order())) `1 by A19, Th66
.= ((MCS:CSeq G) . (n + 1)) `1 by A18, Th66
.= ((MCS:CSeq G) ``1) . (n + 1) by Def25 ; ::_thesis: verum
end;
end;
end;
hence (MCS:CSeq G) ``1 is iterative by Def6; ::_thesis: ( (MCS:CSeq G) ``1 is halting & ((MCS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((MCS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
(MCS:CSeq G) ``1 is eventually-constant by Th71;
hence (MCS:CSeq G) ``1 is halting ; ::_thesis: ( ((MCS:CSeq G) ``1) .Lifespan() = G .order() & ( for n being Nat st n < ((MCS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) ) ) )
(MCS:CSeq G) .Lifespan() = ((MCS:CSeq G) ``1) .Lifespan() by Th72;
hence A20: ((MCS:CSeq G) ``1) .Lifespan() = G .order() by Th70; ::_thesis: for n being Nat st n < ((MCS:CSeq G) ``1) .Lifespan() holds
ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) )
let n be Nat; ::_thesis: ( n < ((MCS:CSeq G) ``1) .Lifespan() implies ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) ) )
assume A21: n < ((MCS:CSeq G) ``1) .Lifespan() ; ::_thesis: ex w being Vertex of G st
( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) )
take w = MCS:PickUnnumbered ((MCS:CSeq G) . n); ::_thesis: ( not w in dom (((MCS:CSeq G) ``1) . n) & ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) )
A22: ((MCS:CSeq G) . n) `1 = ((MCS:CSeq G) ``1) . n by Def25;
then dom (((MCS:CSeq G) ``1) . n) <> the_Vertices_of G by A20, A21, Th69;
hence not w in dom (((MCS:CSeq G) ``1) . n) by A22, Th59; ::_thesis: ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n))
A23: ((MCS:CSeq G) . (n + 1)) `1 = ((MCS:CSeq G) ``1) . (n + 1) by Def25;
n = card (dom (((MCS:CSeq G) ``1) . n)) by A20, A21, A22, Th65;
hence ((MCS:CSeq G) ``1) . (n + 1) = (((MCS:CSeq G) ``1) . n) +* (w .--> ((((MCS:CSeq G) ``1) .Lifespan()) -' n)) by A20, A21, A22, A23, Th64; ::_thesis: verum
end;
registration
let G be finite _Graph;
cluster(MCS:CSeq G) ``1 -> vertex-numbering ;
coherence
(MCS:CSeq G) ``1 is vertex-numbering by Th73;
end;
theorem Th74: :: LEXBFS:74
for G being finite _Graph
for n being Nat st n < G .order() holds
((MCS:CSeq G) ``1) .PickedAt n = MCS:PickUnnumbered ((MCS:CSeq G) . n)
proof
let G be finite _Graph; ::_thesis: for n being Nat st n < G .order() holds
((MCS:CSeq G) ``1) .PickedAt n = MCS:PickUnnumbered ((MCS:CSeq G) . n)
let n be Nat; ::_thesis: ( n < G .order() implies ((MCS:CSeq G) ``1) .PickedAt n = MCS:PickUnnumbered ((MCS:CSeq G) . n) )
assume A1: n < G .order() ; ::_thesis: ((MCS:CSeq G) ``1) .PickedAt n = MCS:PickUnnumbered ((MCS:CSeq G) . n)
set GS = MCS:CSeq G;
set CSN = (MCS:CSeq G) . n;
set CS1 = (MCS:CSeq G) . (n + 1);
set VLN = ((MCS:CSeq G) . n) `1 ;
set VL1 = ((MCS:CSeq G) . (n + 1)) `1 ;
A2: (MCS:CSeq G) .Lifespan() = G .order() by Th70;
set PU = MCS:PickUnnumbered ((MCS:CSeq G) . n);
set f2 = (MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> (((MCS:CSeq G) .Lifespan()) -' n);
A3: dom ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> (((MCS:CSeq G) .Lifespan()) -' n)) = {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by FUNCOP_1:13;
n = card (dom (((MCS:CSeq G) . n) `1)) by A1, Th65;
then ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> (((MCS:CSeq G) .Lifespan()) -' n)) by A1, A2, Th64;
then A4: dom (((MCS:CSeq G) . (n + 1)) `1) = (dom (((MCS:CSeq G) . n) `1)) \/ {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by A3, FUNCT_4:def_1;
A5: ((MCS:CSeq G) ``1) .Lifespan() = (MCS:CSeq G) .Lifespan() by Th72;
set PA = ((MCS:CSeq G) ``1) .PickedAt n;
set f1 = (((MCS:CSeq G) ``1) .PickedAt n) .--> (((MCS:CSeq G) .Lifespan()) -' n);
A6: dom ((((MCS:CSeq G) ``1) .PickedAt n) .--> (((MCS:CSeq G) .Lifespan()) -' n)) = {(((MCS:CSeq G) ``1) .PickedAt n)} by FUNCOP_1:13;
A7: ((MCS:CSeq G) . n) `1 = ((MCS:CSeq G) ``1) . n by Def25;
((MCS:CSeq G) . (n + 1)) `1 = ((MCS:CSeq G) ``1) . (n + 1) by Def25;
then ((MCS:CSeq G) . (n + 1)) `1 = (((MCS:CSeq G) . n) `1) +* ((((MCS:CSeq G) ``1) .PickedAt n) .--> (((MCS:CSeq G) .Lifespan()) -' n)) by A1, A2, A7, A5, Def10;
then A8: dom (((MCS:CSeq G) . (n + 1)) `1) = (dom (((MCS:CSeq G) . n) `1)) \/ {(((MCS:CSeq G) ``1) .PickedAt n)} by A6, FUNCT_4:def_1;
A9: not ((MCS:CSeq G) ``1) .PickedAt n in dom (((MCS:CSeq G) . n) `1) by A1, A2, A7, A5, Def10;
now__::_thesis:_not_((MCS:CSeq_G)_``1)_.PickedAt_n_<>_MCS:PickUnnumbered_((MCS:CSeq_G)_._n)
assume ((MCS:CSeq G) ``1) .PickedAt n <> MCS:PickUnnumbered ((MCS:CSeq G) . n) ; ::_thesis: contradiction
then not ((MCS:CSeq G) ``1) .PickedAt n in {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by TARSKI:def_1;
then A10: not ((MCS:CSeq G) ``1) .PickedAt n in dom (((MCS:CSeq G) . (n + 1)) `1) by A9, A4, XBOOLE_0:def_3;
((MCS:CSeq G) ``1) .PickedAt n in {(((MCS:CSeq G) ``1) .PickedAt n)} by TARSKI:def_1;
hence contradiction by A8, A10, XBOOLE_0:def_3; ::_thesis: verum
end;
hence ((MCS:CSeq G) ``1) .PickedAt n = MCS:PickUnnumbered ((MCS:CSeq G) . n) ; ::_thesis: verum
end;
theorem Th75: :: LEXBFS:75
for G being finite _Graph
for n being Nat st n < G .order() holds
ex w being Vertex of G st
( w = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {w} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) )
proof
let G be finite _Graph; ::_thesis: for n being Nat st n < G .order() holds
ex w being Vertex of G st
( w = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {w} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) )
let n be Nat; ::_thesis: ( n < G .order() implies ex w being Vertex of G st
( w = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {w} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) ) )
assume A1: n < G .order() ; ::_thesis: ex w being Vertex of G st
( w = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {w} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) )
set CSN = (MCS:CSeq G) . n;
set VLN = ((MCS:CSeq G) . n) `1 ;
A2: n = card (dom (((MCS:CSeq G) . n) `1)) by A1, Th65;
set k = (G .order()) -' n;
set w = MCS:PickUnnumbered ((MCS:CSeq G) . n);
set CN1 = (MCS:CSeq G) . (n + 1);
set CSlv = [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))),(((MCS:CSeq G) . n) `2)];
set CSlv1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n));
A3: dom ((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))) = (dom (((MCS:CSeq G) . n) `1)) \/ {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by Lm1;
rng ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n)) = {((G .order()) -' n)} by FUNCOP_1:8;
then A4: (rng (((MCS:CSeq G) . n) `1)) \/ (rng ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))) c= NAT by XBOOLE_1:8;
rng ((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))) c= (rng (((MCS:CSeq G) . n) `1)) \/ (rng ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))) by FUNCT_4:17;
then rng ((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))) c= NAT by A4, XBOOLE_1:1;
then (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n)) in PFuncs ((the_Vertices_of G),NAT) by A3, PARTFUN1:def_3;
then reconsider CSlv = [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))),(((MCS:CSeq G) . n) `2)] as MCS:Labeling of G by ZFMISC_1:def_2;
A5: (MCS:CSeq G) . (n + 1) = MCS:Step ((MCS:CSeq G) . n) by Def26
.= MCS:Update (((MCS:CSeq G) . n),(MCS:PickUnnumbered ((MCS:CSeq G) . n)),n) by A1, A2, Def23
.= MCS:LabelAdjacent (CSlv,(MCS:PickUnnumbered ((MCS:CSeq G) . n))) by Def22 ;
take MCS:PickUnnumbered ((MCS:CSeq G) . n) ; ::_thesis: ( MCS:PickUnnumbered ((MCS:CSeq G) . n) = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) )
set V2v = CSlv `2 ;
set VLv = CSlv `1 ;
set V21 = ((MCS:CSeq G) . (n + 1)) `2 ;
set V2N = ((MCS:CSeq G) . n) `2 ;
A6: ( [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))),(((MCS:CSeq G) . n) `2)] `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n)) & [((((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n))),(((MCS:CSeq G) . n) `2)] `2 = ((MCS:CSeq G) . n) `2 ) ;
A7: CSlv `2 = ((MCS:CSeq G) . n) `2 by A6;
CSlv `1 = (((MCS:CSeq G) . n) `1) +* ((MCS:PickUnnumbered ((MCS:CSeq G) . n)) .--> ((G .order()) -' n)) by A6;
then A8: dom (CSlv `1) = (dom (((MCS:CSeq G) . n) `1)) \/ {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by Lm1;
then A9: dom (((MCS:CSeq G) . n) `1) c= dom (CSlv `1) by XBOOLE_1:7;
A10: now__::_thesis:_for_v_being_set_st_(_not_v_in_G_.AdjacentSet_{(MCS:PickUnnumbered_((MCS:CSeq_G)_._n))}_or_v_in_dom_(((MCS:CSeq_G)_._n)_`1)_)_holds_
(((MCS:CSeq_G)_._(n_+_1))_`2)_._v_=_(((MCS:CSeq_G)_._n)_`2)_._v
let v be set ; ::_thesis: ( ( not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . b1 = (((MCS:CSeq G) . n) `2) . b1 )
assume A11: ( not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} or v in dom (((MCS:CSeq G) . n) `1) ) ; ::_thesis: (((MCS:CSeq G) . (n + 1)) `2) . b1 = (((MCS:CSeq G) . n) `2) . b1
percases ( not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} or v in dom (((MCS:CSeq G) . n) `1) ) by A11;
suppose not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} ; ::_thesis: (((MCS:CSeq G) . (n + 1)) `2) . b1 = (((MCS:CSeq G) . n) `2) . b1
hence (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v by A5, A7, Th60; ::_thesis: verum
end;
suppose v in dom (((MCS:CSeq G) . n) `1) ; ::_thesis: (((MCS:CSeq G) . (n + 1)) `2) . b1 = (((MCS:CSeq G) . n) `2) . b1
hence (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v by A5, A7, A9, Th61; ::_thesis: verum
end;
end;
end;
A12: dom (((MCS:CSeq G) . n) `2) = the_Vertices_of G by FUNCT_2:def_1;
now__::_thesis:_for_v_being_set_st_v_in_G_.AdjacentSet_{(MCS:PickUnnumbered_((MCS:CSeq_G)_._n))}_&_not_v_in_dom_(((MCS:CSeq_G)_._n)_`1)_holds_
(((MCS:CSeq_G)_._(n_+_1))_`2)_._v_=_((((MCS:CSeq_G)_._n)_`2)_._v)_+_1
let v be set ; ::_thesis: ( v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 )
assume that
A13: v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} and
A14: not v in dom (((MCS:CSeq G) . n) `1) ; ::_thesis: (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1
not v in {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} by A13, CHORD:49;
then not v in dom (CSlv `1) by A8, A14, XBOOLE_0:def_3;
hence (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 by A5, A7, A12, A13, Th62; ::_thesis: verum
end;
hence ( MCS:PickUnnumbered ((MCS:CSeq G) . n) = MCS:PickUnnumbered ((MCS:CSeq G) . n) & ( for v being set holds
( ( v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} & not v in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . (n + 1)) `2) . v = ((((MCS:CSeq G) . n) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {(MCS:PickUnnumbered ((MCS:CSeq G) . n))} or v in dom (((MCS:CSeq G) . n) `1) ) implies (((MCS:CSeq G) . (n + 1)) `2) . v = (((MCS:CSeq G) . n) `2) . v ) ) ) ) by A10; ::_thesis: verum
end;
theorem Th76: :: LEXBFS:76
for G being finite _Graph
for n being Nat
for x being set st not x in dom (((MCS:CSeq G) . n) `1) holds
(((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1)))
proof
let G be finite _Graph; ::_thesis: for n being Nat
for x being set st not x in dom (((MCS:CSeq G) . n) `1) holds
(((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1)))
let n be Nat; ::_thesis: for x being set st not x in dom (((MCS:CSeq G) . n) `1) holds
(((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1)))
set CN = (MCS:CSeq G) . n;
set VLN = ((MCS:CSeq G) . n) `1 ;
defpred S1[ Nat] means for x being set st not x in dom (((MCS:CSeq G) . $1) `1) holds
(((MCS:CSeq G) . $1) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . $1) `1)));
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
set CS1 = (MCS:CSeq G) . (k + 1);
set CSK = (MCS:CSeq G) . k;
set VLK = ((MCS:CSeq G) . k) `1 ;
set VK2 = ((MCS:CSeq G) . k) `2 ;
set VL1 = ((MCS:CSeq G) . (k + 1)) `1 ;
set V12 = ((MCS:CSeq G) . (k + 1)) `2 ;
A3: k <= k + 1 by XREAL_1:38;
percases ( G .order() <= k or k < G .order() ) ;
supposeA4: G .order() <= k ; ::_thesis: S1[k + 1]
then A5: ((MCS:CSeq G) . k) `2 = ((MCS:CSeq G) . (k + 1)) `2 by A3, Th67;
((MCS:CSeq G) . k) `1 = ((MCS:CSeq G) . (k + 1)) `1 by A3, A4, Th67;
hence S1[k + 1] by A2, A5; ::_thesis: verum
end;
supposeA6: k < G .order() ; ::_thesis: S1[k + 1]
set VL = (MCS:CSeq G) ``1 ;
A7: G .order() = (MCS:CSeq G) .Lifespan() by Th70;
A8: ((MCS:CSeq G) . k) `1 = ((MCS:CSeq G) ``1) . k by Def25;
A9: (MCS:CSeq G) .Lifespan() = ((MCS:CSeq G) ``1) .Lifespan() by Th72;
A10: ((MCS:CSeq G) . (k + 1)) `1 = ((MCS:CSeq G) ``1) . (k + 1) by Def25;
consider w being Vertex of G such that
A11: w = MCS:PickUnnumbered ((MCS:CSeq G) . k) and
A12: for v being set holds
( ( v in G .AdjacentSet {w} & not v in dom (((MCS:CSeq G) . k) `1) implies (((MCS:CSeq G) . (k + 1)) `2) . v = ((((MCS:CSeq G) . k) `2) . v) + 1 ) & ( ( not v in G .AdjacentSet {w} or v in dom (((MCS:CSeq G) . k) `1) ) implies (((MCS:CSeq G) . (k + 1)) `2) . v = (((MCS:CSeq G) . k) `2) . v ) ) by A6, Th75;
w = ((MCS:CSeq G) ``1) .PickedAt k by A6, A11, Th74;
then A13: dom (((MCS:CSeq G) . (k + 1)) `1) = (dom (((MCS:CSeq G) . k) `1)) \/ {w} by A6, A7, A8, A10, A9, Th11;
now__::_thesis:_for_x_being_set_st_not_x_in_dom_(((MCS:CSeq_G)_._(k_+_1))_`1)_holds_
card_((G_.AdjacentSet_{x})_/\_(dom_(((MCS:CSeq_G)_._(k_+_1))_`1)))_=_(((MCS:CSeq_G)_._(k_+_1))_`2)_._x
let x be set ; ::_thesis: ( not x in dom (((MCS:CSeq G) . (k + 1)) `1) implies card ((G .AdjacentSet {b1}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . b1 )
assume A14: not x in dom (((MCS:CSeq G) . (k + 1)) `1) ; ::_thesis: card ((G .AdjacentSet {b1}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . b1
A15: not x in dom (((MCS:CSeq G) . k) `1) by A13, A14, XBOOLE_0:def_3;
then A16: card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1))) = (((MCS:CSeq G) . k) `2) . x by A2;
percases ( ( x in G .AdjacentSet {w} & not x in dom (((MCS:CSeq G) . k) `1) ) or not x in G .AdjacentSet {w} or x in dom (((MCS:CSeq G) . k) `1) ) ;
supposeA17: ( x in G .AdjacentSet {w} & not x in dom (((MCS:CSeq G) . k) `1) ) ; ::_thesis: card ((G .AdjacentSet {b1}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . b1
set GAS = G .AdjacentSet {x};
w in G .AdjacentSet {x} by A17, CHORD:53;
then A18: {w} c= G .AdjacentSet {x} by ZFMISC_1:31;
A19: (G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1)) = ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1))) \/ ((G .AdjacentSet {x}) /\ {w}) by A13, XBOOLE_1:23
.= ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1))) \/ {w} by A18, XBOOLE_1:28 ;
dom (((MCS:CSeq G) . k) `1) <> the_Vertices_of G by A6, Th69;
then not w in dom (((MCS:CSeq G) . k) `1) by A11, Th59;
then A20: not w in (G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1)) by XBOOLE_0:def_4;
(((MCS:CSeq G) . (k + 1)) `2) . x = ((((MCS:CSeq G) . k) `2) . x) + 1 by A12, A17;
hence card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . x by A16, A20, A19, CARD_2:41; ::_thesis: verum
end;
supposeA21: ( not x in G .AdjacentSet {w} or x in dom (((MCS:CSeq G) . k) `1) ) ; ::_thesis: card ((G .AdjacentSet {b1}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . b1
set GAS = G .AdjacentSet {x};
A22: not w in G .AdjacentSet {x} by A13, A14, A21, CHORD:53, XBOOLE_0:def_3;
A23: now__::_thesis:_not_(G_.AdjacentSet_{x})_/\_{w}_=_{w}
assume (G .AdjacentSet {x}) /\ {w} = {w} ; ::_thesis: contradiction
then w in (G .AdjacentSet {x}) /\ {w} by TARSKI:def_1;
hence contradiction by A22, XBOOLE_0:def_4; ::_thesis: verum
end;
(G .AdjacentSet {x}) /\ {w} c= {w} by XBOOLE_1:17;
then (G .AdjacentSet {x}) /\ {w} in bool {w} ;
then A24: (G .AdjacentSet {x}) /\ {w} in {{},{w}} by ZFMISC_1:24;
A25: (((MCS:CSeq G) . (k + 1)) `2) . x = (((MCS:CSeq G) . k) `2) . x by A12, A21;
(G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1)) = ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1))) \/ ((G .AdjacentSet {x}) /\ {w}) by A13, XBOOLE_1:23
.= ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1))) \/ {} by A24, A23, TARSKI:def_2
.= (G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . k) `1)) ;
hence card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . (k + 1)) `1))) = (((MCS:CSeq G) . (k + 1)) `2) . x by A2, A15, A25; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
now__::_thesis:_for_x_being_set_st_not_x_in_dom_(((MCS:CSeq_G)_._0)_`1)_holds_
(((MCS:CSeq_G)_._0)_`2)_._x_=_card_((G_.AdjacentSet_{x})_/\_(dom_(((MCS:CSeq_G)_._0)_`1)))
set C0 = (MCS:CSeq G) . 0;
let x be set ; ::_thesis: ( not x in dom (((MCS:CSeq G) . 0) `1) implies (((MCS:CSeq G) . 0) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . 0) `1))) )
set VL0 = ((MCS:CSeq G) . 0) `1 ;
set V20 = ((MCS:CSeq G) . 0) `2 ;
assume not x in dom (((MCS:CSeq G) . 0) `1) ; ::_thesis: (((MCS:CSeq G) . 0) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . 0) `1)))
A26: (MCS:CSeq G) . 0 = MCS:Init G by Def26;
[{},((the_Vertices_of G) --> 0)] `1 = {} ;
then dom (((MCS:CSeq G) . 0) `1) = {} by A26;
hence (((MCS:CSeq G) . 0) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . 0) `1))) by A26, Th57, CARD_1:27; ::_thesis: verum
end;
then A27: S1[ 0 ] ;
A28: for k being Nat holds S1[k] from NAT_1:sch_2(A27, A1);
let x be set ; ::_thesis: ( not x in dom (((MCS:CSeq G) . n) `1) implies (((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1))) )
assume not x in dom (((MCS:CSeq G) . n) `1) ; ::_thesis: (((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1)))
hence (((MCS:CSeq G) . n) `2) . x = card ((G .AdjacentSet {x}) /\ (dom (((MCS:CSeq G) . n) `1))) by A28; ::_thesis: verum
end;
definition
let G be _Graph;
let F be PartFunc of (the_Vertices_of G),NAT;
attrF is with_property_T means :Def27: :: LEXBFS:def 27
for a, b, c being Vertex of G st a in dom F & b in dom F & c in dom F & F . a < F . b & F . b < F . c & a,c are_adjacent & not b,c are_adjacent holds
ex d being Vertex of G st
( d in dom F & F . b < F . d & b,d are_adjacent & not a,d are_adjacent );
end;
:: deftheorem Def27 defines with_property_T LEXBFS:def_27_:_
for G being _Graph
for F being PartFunc of (the_Vertices_of G),NAT holds
( F is with_property_T iff for a, b, c being Vertex of G st a in dom F & b in dom F & c in dom F & F . a < F . b & F . b < F . c & a,c are_adjacent & not b,c are_adjacent holds
ex d being Vertex of G st
( d in dom F & F . b < F . d & b,d are_adjacent & not a,d are_adjacent ) );
theorem :: LEXBFS:77
for G being finite _Graph
for n being Nat holds ((MCS:CSeq G) . n) `1 is with_property_T
proof
let G be finite _Graph; ::_thesis: for n being Nat holds ((MCS:CSeq G) . n) `1 is with_property_T
let n be Nat; ::_thesis: ((MCS:CSeq G) . n) `1 is with_property_T
set CN = (MCS:CSeq G) . n;
set VLN = ((MCS:CSeq G) . n) `1 ;
set VL = (MCS:CSeq G) ``1 ;
now__::_thesis:_for_a,_b,_c_being_Vertex_of_G_st_a_in_dom_(((MCS:CSeq_G)_._n)_`1)_&_b_in_dom_(((MCS:CSeq_G)_._n)_`1)_&_c_in_dom_(((MCS:CSeq_G)_._n)_`1)_&_(((MCS:CSeq_G)_._n)_`1)_._a_<_(((MCS:CSeq_G)_._n)_`1)_._b_&_(((MCS:CSeq_G)_._n)_`1)_._b_<_(((MCS:CSeq_G)_._n)_`1)_._c_&_a,c_are_adjacent_&_not_b,c_are_adjacent_holds_
ex_d_being_Vertex_of_G_st_
(_d_in_dom_(((MCS:CSeq_G)_._n)_`1)_&_(((MCS:CSeq_G)_._n)_`1)_._b_<_(((MCS:CSeq_G)_._n)_`1)_._d_&_b,d_are_adjacent_&_not_a,d_are_adjacent_)
A1: (MCS:CSeq G) .Lifespan() = ((MCS:CSeq G) ``1) .Lifespan() by Th72;
A2: ((MCS:CSeq G) . n) `1 = ((MCS:CSeq G) ``1) . n by Def25;
let a, b, c be Vertex of G; ::_thesis: ( a in dom (((MCS:CSeq G) . n) `1) & b in dom (((MCS:CSeq G) . n) `1) & c in dom (((MCS:CSeq G) . n) `1) & (((MCS:CSeq G) . n) `1) . a < (((MCS:CSeq G) . n) `1) . b & (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . c & a,c are_adjacent & not b,c are_adjacent implies ex d being Vertex of G st
( d in dom (((MCS:CSeq G) . n) `1) & (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . d & b,d are_adjacent & not a,d are_adjacent ) )
assume that
A3: a in dom (((MCS:CSeq G) . n) `1) and
A4: b in dom (((MCS:CSeq G) . n) `1) and
A5: c in dom (((MCS:CSeq G) . n) `1) and
A6: (((MCS:CSeq G) . n) `1) . a < (((MCS:CSeq G) . n) `1) . b and
A7: (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . c and
A8: a,c are_adjacent and
A9: not b,c are_adjacent ; ::_thesis: ex d being Vertex of G st
( d in dom (((MCS:CSeq G) . n) `1) & (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . d & b,d are_adjacent & not a,d are_adjacent )
A10: G .order() = (MCS:CSeq G) .Lifespan() by Th70;
now__::_thesis:_ex_d_being_Vertex_of_G_st_
(_d_in_dom_(((MCS:CSeq_G)_._n)_`1)_&_(((MCS:CSeq_G)_._n)_`1)_._b_<_(((MCS:CSeq_G)_._n)_`1)_._d_&_b,d_are_adjacent_&_not_a,d_are_adjacent_)
set bn = (G .order()) -' ((((MCS:CSeq G) . n) `1) . b);
set CSB = (MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b));
set VLB = ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1 ;
set VL2 = ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `2 ;
not c in G .AdjacentSet {b} by A9, CHORD:52;
then A11: not c in (G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) by XBOOLE_0:def_4;
A12: b = ((MCS:CSeq G) ``1) .PickedAt ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) by A4, A10, A2, A1, Th20;
A13: c in G .AdjacentSet {a} by A6, A7, A8, CHORD:52;
A14: ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1 = ((MCS:CSeq G) ``1) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) by Def25;
then not a in dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) by A3, A6, A10, A2, A1, Th24;
then A15: (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `2) . a = card ((G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1))) by Th76;
(G .order()) -' ((((MCS:CSeq G) . n) `1) . b) < n by A4, A10, A2, A1, Th22;
then ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1 c= ((MCS:CSeq G) . n) `1 by A2, A14, Th17;
then A16: dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) c= dom (((MCS:CSeq G) . n) `1) by RELAT_1:11;
(((MCS:CSeq G) . n) `1) . b <= G .order() by A10, A2, A1, Th15;
then A17: (G .order()) -' ((((MCS:CSeq G) . n) `1) . b) = (G .order()) - ((((MCS:CSeq G) . n) `1) . b) by XREAL_1:233;
then (((MCS:CSeq G) . n) `1) . b = (G .order()) - ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) ;
then A18: (((MCS:CSeq G) . n) `1) . b = (G .order()) -' ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) by NAT_D:35, XREAL_1:233;
A19: now__::_thesis:_not_a_in_dom_(((MCS:CSeq_G)_._((G_.order())_-'_((((MCS:CSeq_G)_._n)_`1)_._b)))_`1)
assume A20: a in dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) ; ::_thesis: contradiction
then (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) . a by A10, A1, A14, A18, Th22;
hence contradiction by A3, A6, A2, A14, A20, Th19; ::_thesis: verum
end;
A21: 1 <= (((MCS:CSeq G) . n) `1) . b by A4, A2, Th15;
then A22: (G .order()) -' ((((MCS:CSeq G) . n) `1) . b) < G .order() by A17, XREAL_1:44;
then A23: dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) <> the_Vertices_of G by Th69;
assume A24: for d being Vertex of G st d in dom (((MCS:CSeq G) . n) `1) & (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . d & b,d are_adjacent holds
a,d are_adjacent ; ::_thesis: contradiction
now__::_thesis:_for_x_being_set_st_x_in_(G_.AdjacentSet_{b})_/\_(dom_(((MCS:CSeq_G)_._((G_.order())_-'_((((MCS:CSeq_G)_._n)_`1)_._b)))_`1))_holds_
x_in_(G_.AdjacentSet_{a})_/\_(dom_(((MCS:CSeq_G)_._((G_.order())_-'_((((MCS:CSeq_G)_._n)_`1)_._b)))_`1))
set CSB1 = (MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1);
set VLB1 = ((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1 ;
let x be set ; ::_thesis: ( x in (G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) implies x in (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) )
assume A25: x in (G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) ; ::_thesis: x in (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1))
reconsider d = x as Vertex of G by A25;
A26: x in dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) by A25, XBOOLE_0:def_4;
x in dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) by A25, XBOOLE_0:def_4;
then A27: (((MCS:CSeq G) . n) `1) . d = (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) . d by A2, A14, A16, Th19;
A28: ((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1 = ((MCS:CSeq G) ``1) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1) by Def25;
then b in dom (((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1) by A10, A1, A22, A12, Th11;
then A29: (((MCS:CSeq G) . n) `1) . b = (((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1) . b by A4, A2, A28, Th19;
(G .order()) -' ((((MCS:CSeq G) . n) `1) . b) < ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1 by XREAL_1:39;
then ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1 c= ((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1 by A14, A28, Th17;
then dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) c= dom (((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1) by RELAT_1:11;
then A30: (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) . d = (((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1) . d by A14, A26, A28, Th19;
(((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) . d in rng (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) by A26, FUNCT_1:def_3;
then (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) . d in (Seg (G .order())) \ (Seg ((G .order()) -' ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)))) by A10, A1, A14, Th14;
then (G .order()) -' ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) < (((MCS:CSeq G) . (((G .order()) -' ((((MCS:CSeq G) . n) `1) . b)) + 1)) `1) . d by A30, Th3;
then A31: (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . d by A10, A1, A17, A21, A12, A28, A29, A27, A30, Th12, XREAL_1:44;
d in G .AdjacentSet {b} by A25, XBOOLE_0:def_4;
then b,d are_adjacent by CHORD:52;
then a,d are_adjacent by A24, A16, A26, A31;
then d in G .AdjacentSet {a} by A6, A31, CHORD:52;
hence x in (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) by A26, XBOOLE_0:def_4; ::_thesis: verum
end;
then A32: (G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) c= (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) by TARSKI:def_3;
c in dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1) by A4, A5, A7, A10, A2, A1, A14, Th23;
then c in (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) by A13, XBOOLE_0:def_4;
then A33: (G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) c< (G .AdjacentSet {a}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1)) by A11, A32, XBOOLE_0:def_8;
A34: b = MCS:PickUnnumbered ((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) by A17, A21, A12, Th74, XREAL_1:44;
then (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `2) . b = card ((G .AdjacentSet {b}) /\ (dom (((MCS:CSeq G) . ((G .order()) -' ((((MCS:CSeq G) . n) `1) . b))) `1))) by A23, Th59, Th76;
hence contradiction by A23, A34, A19, A15, A33, Th58, TREES_1:6; ::_thesis: verum
end;
hence ex d being Vertex of G st
( d in dom (((MCS:CSeq G) . n) `1) & (((MCS:CSeq G) . n) `1) . b < (((MCS:CSeq G) . n) `1) . d & b,d are_adjacent & not a,d are_adjacent ) ; ::_thesis: verum
end;
hence ((MCS:CSeq G) . n) `1 is with_property_T by Def27; ::_thesis: verum
end;
theorem :: LEXBFS:78
for G being finite _Graph holds ((LexBFS:CSeq G) .Result()) `1 is with_property_T
proof
let G be finite _Graph; ::_thesis: ((LexBFS:CSeq G) .Result()) `1 is with_property_T
set CS = LexBFS:CSeq G;
set L = ((LexBFS:CSeq G) .Result()) `1 ;
A1: ((LexBFS:CSeq G) .Result()) `1 is with_property_L3 by Th53;
now__::_thesis:_for_a,_b,_c_being_Vertex_of_G_st_a_in_dom_(((LexBFS:CSeq_G)_.Result())_`1)_&_b_in_dom_(((LexBFS:CSeq_G)_.Result())_`1)_&_c_in_dom_(((LexBFS:CSeq_G)_.Result())_`1)_&_(((LexBFS:CSeq_G)_.Result())_`1)_._a_<_(((LexBFS:CSeq_G)_.Result())_`1)_._b_&_(((LexBFS:CSeq_G)_.Result())_`1)_._b_<_(((LexBFS:CSeq_G)_.Result())_`1)_._c_&_a,c_are_adjacent_&_not_b,c_are_adjacent_holds_
ex_d_being_Vertex_of_G_st_
(_d_in_dom_(((LexBFS:CSeq_G)_.Result())_`1)_&_(((LexBFS:CSeq_G)_.Result())_`1)_._b_<_(((LexBFS:CSeq_G)_.Result())_`1)_._d_&_b,d_are_adjacent_&_not_a,d_are_adjacent_)
let a, b, c be Vertex of G; ::_thesis: ( a in dom (((LexBFS:CSeq G) .Result()) `1) & b in dom (((LexBFS:CSeq G) .Result()) `1) & c in dom (((LexBFS:CSeq G) .Result()) `1) & (((LexBFS:CSeq G) .Result()) `1) . a < (((LexBFS:CSeq G) .Result()) `1) . b & (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . c & a,c are_adjacent & not b,c are_adjacent implies ex d being Vertex of G st
( d in dom (((LexBFS:CSeq G) .Result()) `1) & (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . d & b,d are_adjacent & not a,d are_adjacent ) )
assume that
A2: a in dom (((LexBFS:CSeq G) .Result()) `1) and
A3: b in dom (((LexBFS:CSeq G) .Result()) `1) and
A4: c in dom (((LexBFS:CSeq G) .Result()) `1) and
A5: (((LexBFS:CSeq G) .Result()) `1) . a < (((LexBFS:CSeq G) .Result()) `1) . b and
A6: (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . c and
A7: a,c are_adjacent and
A8: not b,c are_adjacent ; ::_thesis: ex d being Vertex of G st
( d in dom (((LexBFS:CSeq G) .Result()) `1) & (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . d & b,d are_adjacent & not a,d are_adjacent )
consider d being Vertex of G such that
A9: d in dom (((LexBFS:CSeq G) .Result()) `1) and
A10: (((LexBFS:CSeq G) .Result()) `1) . c < (((LexBFS:CSeq G) .Result()) `1) . d and
A11: b,d are_adjacent and
A12: not a,d are_adjacent and
for e being Vertex of G st e <> d & e,b are_adjacent & not e,a are_adjacent holds
(((LexBFS:CSeq G) .Result()) `1) . e < (((LexBFS:CSeq G) .Result()) `1) . d by A1, A2, A3, A4, A5, A6, A7, A8, Def18;
take d = d; ::_thesis: ( d in dom (((LexBFS:CSeq G) .Result()) `1) & (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . d & b,d are_adjacent & not a,d are_adjacent )
thus d in dom (((LexBFS:CSeq G) .Result()) `1) by A9; ::_thesis: ( (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . d & b,d are_adjacent & not a,d are_adjacent )
thus (((LexBFS:CSeq G) .Result()) `1) . b < (((LexBFS:CSeq G) .Result()) `1) . d by A6, A10, XXREAL_0:2; ::_thesis: ( b,d are_adjacent & not a,d are_adjacent )
thus b,d are_adjacent by A11; ::_thesis: not a,d are_adjacent
thus not a,d are_adjacent by A12; ::_thesis: verum
end;
hence ((LexBFS:CSeq G) .Result()) `1 is with_property_T by Def27; ::_thesis: verum
end;
theorem :: LEXBFS:79
for G being finite chordal _Graph
for L being PartFunc of (the_Vertices_of G),NAT st L is with_property_T & dom L = the_Vertices_of G holds
for V being VertexScheme of G st V " = L holds
V is perfect
proof
let G be finite chordal _Graph; ::_thesis: for L being PartFunc of (the_Vertices_of G),NAT st L is with_property_T & dom L = the_Vertices_of G holds
for V being VertexScheme of G st V " = L holds
V is perfect
let L be PartFunc of (the_Vertices_of G),NAT; ::_thesis: ( L is with_property_T & dom L = the_Vertices_of G implies for V being VertexScheme of G st V " = L holds
V is perfect )
assume that
A1: L is with_property_T and
A2: dom L = the_Vertices_of G ; ::_thesis: for V being VertexScheme of G st V " = L holds
V is perfect
defpred S1[ Path of G] means ( len $1 >= 5 & $1 is open & $1 is chordless & L . ($1 .first()) > L . ($1 .last()) & L . ($1 .last()) > L . ($1 . 3) & ex i being odd Element of NAT st
( 1 < i & i < len $1 & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len $1 holds
L . ($1 . j) < L . ($1 . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . ($1 . j) > L . ($1 . k) ) ) );
let V be VertexScheme of G; ::_thesis: ( V " = L implies V is perfect )
assume A3: V " = L ; ::_thesis: V is perfect
A4: V is one-to-one by CHORD:def_12;
len V = card (the_Vertices_of G) by CHORD:104;
then dom V = Seg (G .order()) by FINSEQ_1:def_3;
then A5: rng L = Seg (G .order()) by A3, A4, FUNCT_1:33;
A6: now__::_thesis:_for_R_being_Path_of_G_holds_not_S1[R]
defpred S2[ Nat] means ex P being Path of G st
( S1[P] & L . (P .last()) = $1 );
A7: for k being Nat st S2[k] holds
k <= G .order()
proof
let k be Nat; ::_thesis: ( S2[k] implies k <= G .order() )
assume S2[k] ; ::_thesis: k <= G .order()
then consider P being Path of G such that
S1[P] and
A8: L . (P .last()) = k ;
L . (P .last()) in Seg (G .order()) by A2, A5, FUNCT_1:def_3;
hence k <= G .order() by A8, FINSEQ_1:1; ::_thesis: verum
end;
let R be Path of G; ::_thesis: not S1[R]
assume S1[R] ; ::_thesis: contradiction
then A9: ex k being Nat st S2[k] ;
consider k being Nat such that
A10: S2[k] and
A11: for n being Nat st S2[n] holds
n <= k from NAT_1:sch_6(A7, A9);
consider P being Path of G such that
A12: S1[P] and
A13: L . (P .last()) = k by A10;
3 <= len P by A12, XXREAL_0:2;
then P . 3 = P .vertexAt ((2 * 1) + 1) by GLIB_001:def_8;
then reconsider a = P . 3 as Vertex of G ;
A14: 3 < len P by A12, XXREAL_0:2;
reconsider b = P .last() as Vertex of G ;
reconsider c = P .first() as Vertex of G ;
A15: now__::_thesis:_for_e_being_set_holds_not_e_Joins_c,b,G
(2 * 0) + 1 < len P by A12, XXREAL_0:2;
then A16: ( ex e being set st e Joins P . 1,P . (len P),G iff 1 + 2 = len P ) by A12, CHORD:92;
let e be set ; ::_thesis: not e Joins c,b,G
assume e Joins c,b,G ; ::_thesis: contradiction
hence contradiction by A12, A16; ::_thesis: verum
end;
then A17: not b,c are_adjacent by CHORD:def_3;
(2 * 0) + 1 < (2 * 1) + 1 ;
then ex ez being set st ez Joins P . 1,P . 3,G by A12, A14, CHORD:92;
then c,a are_adjacent by CHORD:def_3;
then consider d being Vertex of G such that
d in dom L and
A18: L . b < L . d and
A19: b,d are_adjacent and
A20: not a,d are_adjacent by A1, A2, A12, A17, Def27;
A21: L . d <> L . c by A2, A3, A4, A17, A19, FUNCT_1:def_4;
consider i being odd Element of NAT such that
A22: 1 < i and
i < len P and
A23: for j, k being odd Element of NAT st i <= j & j < k & k <= len P holds
L . (P . j) < L . (P . k) and
A24: for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (P . j) > L . (P . k) by A12;
A25: L . a < L . d by A12, A18, XXREAL_0:2;
A26: now__::_thesis:_not_d_in_P_.vertices()
assume d in P .vertices() ; ::_thesis: contradiction
then consider dn being odd Element of NAT such that
A27: dn <= len P and
A28: P . dn = d by GLIB_001:87;
A29: 1 <= dn by CHORD:2;
dn <> 1 by A15, A19, A28, CHORD:def_3;
then (2 * 0) + 1 < dn by A29, XXREAL_0:1;
then 1 + 2 <= dn by CHORD:4;
then A30: (2 * 1) + 1 < dn by A12, A18, A28, XXREAL_0:1;
A31: dn < len P by A18, A27, A28, XXREAL_0:1;
percases ( i <= dn or dn < i ) ;
suppose i <= dn ; ::_thesis: contradiction
hence contradiction by A23, A18, A28, A31; ::_thesis: verum
end;
suppose dn < i ; ::_thesis: contradiction
hence contradiction by A24, A25, A28, A30; ::_thesis: verum
end;
end;
end;
defpred S3[ Nat] means ( $1 is odd & 3 < $1 & $1 <= len P & ex e being set st e Joins P . $1,d,G );
ex el being set st el Joins P .last() ,d,G by A19, CHORD:def_3;
then A32: ex k being Nat st S3[k] by A14;
ex j being Nat st
( S3[j] & ( for n being Nat st S3[n] holds
j <= n ) ) from NAT_1:sch_5(A32);
then consider j being Nat such that
A33: j is odd and
A34: 3 < j and
A35: j <= len P and
A36: ex e being set st e Joins P . j,d,G and
A37: for i being Nat st S3[i] holds
j <= i ;
reconsider j = j as odd Element of NAT by A33, ORDINAL1:def_12;
reconsider C = P .cut (1,j) as Path of G ;
consider e being set such that
A38: e Joins P . j,d,G by A36;
(2 * 0) + 1 < j by A34, XXREAL_0:2;
then A39: ( C is open & C is chordless ) by A12, A35, CHORD:93;
A40: (2 * 0) + 1 <= j by CHORD:2;
then A41: (len C) + 1 = j + 1 by A35, GLIB_001:36;
A42: now__::_thesis:_for_n_being_odd_Element_of_NAT_st_n_<=_j_holds_
C_._n_=_P_._n
let n be odd Element of NAT ; ::_thesis: ( n <= j implies C . n = P . n )
assume A43: n <= j ; ::_thesis: C . n = P . n
1 <= n by CHORD:2;
then n in dom C by A41, A43, FINSEQ_3:25;
then C . n = P . ((1 + n) - 1) by A35, A40, GLIB_001:47;
hence C . n = P . n ; ::_thesis: verum
end;
(2 * 1) + 1 < j by A34;
then A44: C . 3 = a by A42;
A45: now__::_thesis:_for_f_being_set_holds_not_f_Joins_C_._((len_C)_-_2),d,G
len C > (2 * 1) + 1 by A34, A41;
then A46: len C >= 3 + 2 by CHORD:4;
let f be set ; ::_thesis: not f Joins C . ((len C) - 2),d,G
assume A47: f Joins C . ((len C) - 2),d,G ; ::_thesis: contradiction
len C <> 5 by A20, A44, A47, CHORD:def_3;
then len C > 5 by A46, XXREAL_0:1;
then A48: (3 + 2) - 2 < (len C) - 2 by XREAL_1:9;
then 0 < (len C) - (2 * 1) ;
then reconsider cc = (len C) - 2 as odd Element of NAT by INT_1:3;
A49: cc < len C by XREAL_1:44;
then A50: cc < len P by A35, A41, XXREAL_0:2;
f Joins P . cc,d,G by A41, A42, A47, A49;
hence contradiction by A37, A41, A48, A49, A50; ::_thesis: verum
end;
A51: e Joins C .last() ,d,G by A35, A38, A40, GLIB_001:37;
C .vertices() c= P .vertices() by A35, A40, GLIB_001:94;
then A52: not d in C .vertices() by A26;
then reconsider D = C .addEdge e as Path of G by A51, A39, A45, CHORD:97;
reconsider R = D .reverse() as Path of G ;
A53: C .last() = P . j by A35, A40, GLIB_001:37;
then A54: len D = (len C) + 2 by A38, GLIB_001:64;
A55: now__::_thesis:_L_._(P_._j)_<_L_._c
percases ( i < j or i >= j ) ;
supposeA56: i < j ; ::_thesis: L . (P . j) < L . c
now__::_thesis:_L_._(P_._j)_<=_L_._b
percases ( j = len P or j < len P ) by A35, XXREAL_0:1;
suppose j = len P ; ::_thesis: L . (P . j) <= L . b
hence L . (P . j) <= L . b ; ::_thesis: verum
end;
suppose j < len P ; ::_thesis: L . (P . j) <= L . b
hence L . (P . j) <= L . b by A23, A56; ::_thesis: verum
end;
end;
end;
hence L . (P . j) < L . c by A12, XXREAL_0:2; ::_thesis: verum
end;
supposeA57: i >= j ; ::_thesis: L . (P . j) < L . c
1 < (2 * 1) + 1 ;
then L . (P . j) < L . (P . 3) by A24, A34, A57;
then L . (P . j) < L . b by A12, XXREAL_0:2;
hence L . (P . j) < L . c by A12, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
C .first() = P .first() by A35, A40, GLIB_001:37;
then A58: D .first() = c by A38, A53, GLIB_001:63;
then A59: R .last() = c by GLIB_001:22;
3 in dom C by A34, A41, FINSEQ_3:25;
then A60: D . 3 = a by A38, A53, A44, GLIB_001:65;
A61: D is chordless by A52, A51, A39, A45, CHORD:97;
A62: D .last() = d by A38, A53, GLIB_001:63;
then A63: R .first() = d by GLIB_001:22;
A64: for n being odd Element of NAT st n <= len R holds
( R . n = D . (((len D) - n) + 1) & ((len D) - n) + 1 is Element of NAT )
proof
let n be odd Element of NAT ; ::_thesis: ( n <= len R implies ( R . n = D . (((len D) - n) + 1) & ((len D) - n) + 1 is Element of NAT ) )
assume A65: n <= len R ; ::_thesis: ( R . n = D . (((len D) - n) + 1) & ((len D) - n) + 1 is Element of NAT )
1 <= n by CHORD:2;
then A66: n in dom R by A65, FINSEQ_3:25;
hence R . n = D . (((len D) - n) + 1) by GLIB_001:25; ::_thesis: ((len D) - n) + 1 is Element of NAT
((len D) - n) + 1 in dom D by A66, GLIB_001:25;
hence ((len D) - n) + 1 is Element of NAT ; ::_thesis: verum
end;
A67: now__::_thesis:_for_n_being_odd_Nat_st_n_<=_j_holds_
C_._n_=_D_._n
let n be odd Nat; ::_thesis: ( n <= j implies C . n = D . n )
assume A68: n <= j ; ::_thesis: C . n = D . n
1 <= n by CHORD:2;
then n in dom C by A41, A68, FINSEQ_3:25;
hence C . n = D . n by A51, GLIB_001:65; ::_thesis: verum
end;
A69: ex i being odd Element of NAT st
( 1 < i & i < len D & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) ) )
proof
percases ( j <= i or i < j ) ;
supposeA70: j <= i ; ::_thesis: ex i being odd Element of NAT st
( 1 < i & i < len D & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) ) )
A71: now__::_thesis:_for_e,_f_being_odd_Element_of_NAT_st_j_<=_e_&_e_<_f_&_f_<=_len_D_holds_
L_._(D_._e)_<_L_._(D_._f)
1 < (2 * 1) + 1 ;
then A72: L . (P . 3) > L . (P . j) by A24, A34, A70;
let e, f be odd Element of NAT ; ::_thesis: ( j <= e & e < f & f <= len D implies L . (D . e) < L . (D . f) )
assume that
A73: j <= e and
A74: e < f and
A75: f <= len D ; ::_thesis: L . (D . e) < L . (D . f)
e < j + (2 * 1) by A41, A54, A74, A75, XXREAL_0:2;
then e <= (j + 2) - 2 by CHORD:3;
then A76: e = j by A73, XXREAL_0:1;
then D . e = C . j by A67;
then A77: D . e = P . j by A42;
(len C) + 2 <= f by A41, A74, A76, CHORD:4;
then D . f = d by A54, A62, A75, XXREAL_0:1;
hence L . (D . e) < L . (D . f) by A25, A77, A72, XXREAL_0:2; ::_thesis: verum
end;
take j ; ::_thesis: ( 1 < j & j < len D & ( for j, k being odd Element of NAT st j <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= j holds
L . (D . j) > L . (D . k) ) )
now__::_thesis:_for_e,_f_being_odd_Element_of_NAT_st_1_<=_e_&_e_<_f_&_f_<=_j_holds_
L_._(D_._e)_>_L_._(D_._f)
let e, f be odd Element of NAT ; ::_thesis: ( 1 <= e & e < f & f <= j implies L . (D . e) > L . (D . f) )
assume that
A78: 1 <= e and
A79: e < f and
A80: f <= j ; ::_thesis: L . (D . e) > L . (D . f)
D . e = C . e by A67, A79, A80, XXREAL_0:2;
then A81: D . e = P . e by A42, A79, A80, XXREAL_0:2;
D . f = C . f by A67, A80;
then A82: D . f = P . f by A42, A80;
f <= i by A70, A80, XXREAL_0:2;
hence L . (D . e) > L . (D . f) by A24, A78, A79, A81, A82; ::_thesis: verum
end;
hence ( 1 < j & j < len D & ( for j, k being odd Element of NAT st j <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= j holds
L . (D . j) > L . (D . k) ) ) by A34, A41, A54, A71, XREAL_1:29, XXREAL_0:2; ::_thesis: verum
end;
supposeA83: i < j ; ::_thesis: ex i being odd Element of NAT st
( 1 < i & i < len D & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) ) )
take i ; ::_thesis: ( 1 < i & i < len D & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) ) )
A84: now__::_thesis:_for_e,_f_being_odd_Element_of_NAT_st_i_<=_e_&_e_<_f_&_f_<=_len_D_holds_
L_._(D_._e)_<_L_._(D_._f)
let e, f be odd Element of NAT ; ::_thesis: ( i <= e & e < f & f <= len D implies L . (D . b1) < L . (D . b2) )
assume that
A85: i <= e and
A86: e < f and
A87: f <= len D ; ::_thesis: L . (D . b1) < L . (D . b2)
e < j + (2 * 1) by A41, A54, A86, A87, XXREAL_0:2;
then A88: e <= (j + 2) - 2 by CHORD:3;
then A89: e <= len P by A35, XXREAL_0:2;
A90: D . e = C . e by A67, A88;
then A91: D . e = P . e by A42, A88;
percases ( f = len D or f < len D ) by A87, XXREAL_0:1;
supposeA92: f = len D ; ::_thesis: L . (D . b1) < L . (D . b2)
now__::_thesis:_L_._(D_._e)_<=_L_._b
percases ( e = len P or e < len P ) by A89, XXREAL_0:1;
suppose e = len P ; ::_thesis: L . (D . e) <= L . b
hence L . (D . e) <= L . b by A42, A88, A90; ::_thesis: verum
end;
suppose e < len P ; ::_thesis: L . (D . e) <= L . b
hence L . (D . e) <= L . b by A23, A85, A91; ::_thesis: verum
end;
end;
end;
hence L . (D . e) < L . (D . f) by A18, A62, A92, XXREAL_0:2; ::_thesis: verum
end;
suppose f < len D ; ::_thesis: L . (D . b1) < L . (D . b2)
then A93: f <= (j + 2) - 2 by A41, A54, CHORD:3;
then D . f = C . f by A67;
then A94: D . f = P . f by A42, A93;
f <= len P by A35, A93, XXREAL_0:2;
hence L . (D . e) < L . (D . f) by A23, A85, A86, A91, A94; ::_thesis: verum
end;
end;
end;
A95: now__::_thesis:_for_e,_f_being_odd_Element_of_NAT_st_1_<=_e_&_e_<_f_&_f_<=_i_holds_
L_._(D_._e)_>_L_._(D_._f)
let e, f be odd Element of NAT ; ::_thesis: ( 1 <= e & e < f & f <= i implies L . (D . e) > L . (D . f) )
assume that
A96: 1 <= e and
A97: e < f and
A98: f <= i ; ::_thesis: L . (D . e) > L . (D . f)
D . f = C . f by A67, A83, A98, XXREAL_0:2;
then A99: D . f = P . f by A42, A83, A98, XXREAL_0:2;
A100: e <= i by A97, A98, XXREAL_0:2;
then D . e = C . e by A67, A83, XXREAL_0:2;
then D . e = P . e by A42, A83, A100, XXREAL_0:2;
hence L . (D . e) > L . (D . f) by A24, A96, A97, A98, A99; ::_thesis: verum
end;
len D > j by A41, A54, XREAL_1:29;
hence ( 1 < i & i < len D & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) ) ) by A22, A83, A84, A95, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
A101: ex i being odd Element of NAT st
( 1 < i & i < len R & ( for j, k being odd Element of NAT st i <= j & j < k & k <= len R holds
L . (R . j) < L . (R . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (R . j) > L . (R . k) ) )
proof
consider i being odd Element of NAT such that
A102: 1 < i and
A103: i < len D and
A104: for j, k being odd Element of NAT st i <= j & j < k & k <= len D holds
L . (D . j) < L . (D . k) and
A105: for j, k being odd Element of NAT st 1 <= j & j < k & k <= i holds
L . (D . j) > L . (D . k) by A69;
set ir = ((len D) - i) + 1;
(len D) - 1 > (len D) - i by A102, XREAL_1:15;
then A106: ((len D) - 1) + 1 > ((len D) - i) + 1 by XREAL_1:8;
then A107: ((len D) - i) + 1 < len R by GLIB_001:21;
A108: (len D) - (len D) < (len D) - i by A103, XREAL_1:15;
then reconsider ir = ((len D) - i) + 1 as odd Element of NAT by INT_1:3;
A109: now__::_thesis:_for_ja,_k_being_odd_Element_of_NAT_st_1_<=_ja_&_ja_<_k_&_k_<=_ir_holds_
L_._(R_._ja)_>_L_._(R_._k)
let ja, k be odd Element of NAT ; ::_thesis: ( 1 <= ja & ja < k & k <= ir implies L . (R . ja) > L . (R . k) )
assume that
A110: 1 <= ja and
A111: ja < k and
A112: k <= ir ; ::_thesis: L . (R . ja) > L . (R . k)
set jr = ((len D) - ja) + 1;
A113: k <= len R by A107, A112, XXREAL_0:2;
then A114: ja <= len R by A111, XXREAL_0:2;
then A115: R . ja = D . (((len D) - ja) + 1) by A64;
i + k <= (((len D) - i) + 1) + i by A112, XREAL_1:7;
then A116: (i + k) - k <= ((len D) + 1) - k by XREAL_1:9;
set kr = ((len D) - k) + 1;
A117: ((len D) - k) + 1 < ((len D) - ja) + 1 by A111, Lm3;
reconsider jr = ((len D) - ja) + 1 as odd Element of NAT by A64, A114;
reconsider kr = ((len D) - k) + 1 as odd Element of NAT by A64, A113;
(len D) - ja <= (len D) - 1 by A110, XREAL_1:10;
then jr <= ((len D) - 1) + 1 by XREAL_1:7;
then L . (D . kr) < L . (D . jr) by A104, A116, A117;
hence L . (R . ja) > L . (R . k) by A64, A113, A115; ::_thesis: verum
end;
take ir ; ::_thesis: ( 1 < ir & ir < len R & ( for j, k being odd Element of NAT st ir <= j & j < k & k <= len R holds
L . (R . j) < L . (R . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= ir holds
L . (R . j) > L . (R . k) ) )
A118: now__::_thesis:_for_j,_k_being_odd_Element_of_NAT_st_ir_<=_j_&_j_<_k_&_k_<=_len_R_holds_
L_._(R_._j)_<_L_._(R_._k)
let j, k be odd Element of NAT ; ::_thesis: ( ir <= j & j < k & k <= len R implies L . (R . j) < L . (R . k) )
assume that
A119: ir <= j and
A120: j < k and
A121: k <= len R ; ::_thesis: L . (R . j) < L . (R . k)
set kr = ((len D) - k) + 1;
A122: R . k = D . (((len D) - k) + 1) by A64, A121;
set jr = ((len D) - j) + 1;
A123: j <= len R by A120, A121, XXREAL_0:2;
then A124: R . j = D . (((len D) - j) + 1) by A64;
reconsider kr = ((len D) - k) + 1 as odd Element of NAT by A64, A121;
i + j >= (((len D) - i) + 1) + i by A119, XREAL_1:7;
then A125: (i + j) - j >= ((len D) + 1) - j by XREAL_1:9;
reconsider jr = ((len D) - j) + 1 as odd Element of NAT by A64, A123;
kr < jr by A120, Lm3;
hence L . (R . j) < L . (R . k) by A105, A124, A122, A125, CHORD:2; ::_thesis: verum
end;
0 + 1 < ((len D) - i) + 1 by A108, XREAL_1:8;
hence ( 1 < ir & ir < len R & ( for j, k being odd Element of NAT st ir <= j & j < k & k <= len R holds
L . (R . j) < L . (R . k) ) & ( for j, k being odd Element of NAT st 1 <= j & j < k & k <= ir holds
L . (R . j) > L . (R . k) ) ) by A106, A118, A109, GLIB_001:21; ::_thesis: verum
end;
A126: len D >= 3 + 2 by A34, A41, A54, XREAL_1:7;
then A127: len R >= 3 + 2 by GLIB_001:21;
then 3 <= len R by XXREAL_0:2;
then 3 in dom R by FINSEQ_3:25;
then R . 3 = D . (((len D) - 3) + 1) by GLIB_001:25;
then R . 3 = C . j by A41, A54, A67;
then A128: L . (R .last()) > L . (R . 3) by A42, A59, A55;
d <> c by A15, A19, CHORD:def_3;
then A129: R is open by A63, A59, GLIB_001:def_24;
D is open by A52, A51, A39, A45, CHORD:97;
then L . c <= L . d by A11, A13, A18, A25, A61, A126, A58, A62, A60, A69;
then A130: L . c < L . d by A21, XXREAL_0:1;
R is chordless by A61, CHORD:91;
hence contradiction by A11, A12, A13, A130, A63, A59, A129, A127, A128, A101; ::_thesis: verum
end;
A131: L " = V by A3, A4, FUNCT_1:43;
now__::_thesis:_for_a,_b,_c_being_Vertex_of_G_st_b_<>_c_&_a,b_are_adjacent_&_a,c_are_adjacent_holds_
for_va,_vb,_vc_being_Nat_st_va_in_dom_V_&_vb_in_dom_V_&_vc_in_dom_V_&_V_._va_=_a_&_V_._vb_=_b_&_V_._vc_=_c_&_va_<_vb_&_va_<_vc_holds_
b,c_are_adjacent
let a, b, c be Vertex of G; ::_thesis: ( b <> c & a,b are_adjacent & a,c are_adjacent implies for va, vb, vc being Nat st va in dom V & vb in dom V & vc in dom V & V . va = a & V . vb = b & V . vc = c & va < vb & va < vc holds
b,c are_adjacent )
assume that
A132: b <> c and
A133: a,b are_adjacent and
A134: a,c are_adjacent ; ::_thesis: for va, vb, vc being Nat st va in dom V & vb in dom V & vc in dom V & V . va = a & V . vb = b & V . vc = c & va < vb & va < vc holds
b,c are_adjacent
let va, vb, vc be Nat; ::_thesis: ( va in dom V & vb in dom V & vc in dom V & V . va = a & V . vb = b & V . vc = c & va < vb & va < vc implies b,c are_adjacent )
assume that
A135: va in dom V and
A136: vb in dom V and
A137: vc in dom V and
A138: V . va = a and
A139: V . vb = b and
A140: V . vc = c and
A141: va < vb and
A142: va < vc ; ::_thesis: b,c are_adjacent
A143: L . a = va by A3, A4, A135, A138, FUNCT_1:34;
A144: c = V . (L . c) by A2, A3, A4, A131, FUNCT_1:34;
A145: b = V . (L . b) by A2, A3, A4, A131, FUNCT_1:34;
assume A146: not b,c are_adjacent ; ::_thesis: contradiction
A147: L . b = vb by A3, A4, A136, A139, FUNCT_1:34;
A148: L . c = vc by A3, A4, A137, A140, FUNCT_1:34;
percases ( L . b < L . c or L . c < L . b ) by A132, A145, A144, XXREAL_0:1;
supposeA149: L . b < L . c ; ::_thesis: contradiction
A150: (2 * 1) + 1 is odd ;
consider P being Path of G, e1, e2 being set such that
A151: P is open and
A152: len P = 5 and
P .length() = 2 and
e1 Joins c,a,G and
e2 Joins a,b,G and
P .edges() = {e1,e2} and
P .vertices() = {c,a,b} and
A153: P . 1 = c and
A154: P . 3 = a and
A155: P . 5 = b by A132, A133, A134, A141, A142, A143, A147, A148, CHORD:47;
A156: P .first() = c by A153;
A157: now__::_thesis:_for_j,_k_being_odd_Element_of_NAT_st_1_<=_j_&_j_<_k_&_k_<=_3_holds_
L_._(P_._j)_>_L_._(P_._k)
let j, k be odd Element of NAT ; ::_thesis: ( 1 <= j & j < k & k <= 3 implies L . (P . j) > L . (P . k) )
assume that
1 <= j and
A158: j < k and
A159: k <= 3 ; ::_thesis: L . (P . j) > L . (P . k)
j < 3 by A158, A159, XXREAL_0:2;
then j = 1 by CHORD:7, XXREAL_0:2;
hence L . (P . j) > L . (P . k) by A142, A143, A148, A153, A154, A158, A159, CHORD:7, XXREAL_0:2; ::_thesis: verum
end;
A160: now__::_thesis:_for_j,_k_being_odd_Element_of_NAT_st_3_<=_j_&_j_<_k_&_k_<=_len_P_holds_
L_._(P_._j)_<_L_._(P_._k)
let j, k be odd Element of NAT ; ::_thesis: ( 3 <= j & j < k & k <= len P implies L . (P . j) < L . (P . k) )
assume that
A161: 3 <= j and
A162: j < k and
A163: k <= len P ; ::_thesis: L . (P . j) < L . (P . k)
j < 5 by A152, A162, A163, XXREAL_0:2;
then ( j = 1 or j = 3 or j = 5 ) by CHORD:8, XXREAL_0:2;
hence L . (P . j) < L . (P . k) by A141, A142, A143, A147, A148, A152, A153, A154, A155, A161, A162, A163, CHORD:8, XXREAL_0:2; ::_thesis: verum
end;
P .last() = b by A152, A155;
then S1[P] by A146, A149, A151, A152, A156, A160, A157, A150, CHORD:90;
hence contradiction by A6; ::_thesis: verum
end;
supposeA164: L . c < L . b ; ::_thesis: contradiction
A165: (2 * 1) + 1 is odd ;
consider P being Path of G, e1, e2 being set such that
A166: P is open and
A167: len P = 5 and
P .length() = 2 and
e1 Joins b,a,G and
e2 Joins a,c,G and
P .edges() = {e1,e2} and
P .vertices() = {b,a,c} and
A168: P . 1 = b and
A169: P . 3 = a and
A170: P . 5 = c by A132, A133, A134, A141, A142, A143, A147, A148, CHORD:47;
A171: P .first() = b by A168;
A172: now__::_thesis:_for_j,_k_being_odd_Element_of_NAT_st_1_<=_j_&_j_<_k_&_k_<=_3_holds_
L_._(P_._j)_>_L_._(P_._k)
let j, k be odd Element of NAT ; ::_thesis: ( 1 <= j & j < k & k <= 3 implies L . (P . j) > L . (P . k) )
assume that
1 <= j and
A173: j < k and
A174: k <= 3 ; ::_thesis: L . (P . j) > L . (P . k)
j < 3 by A173, A174, XXREAL_0:2;
then j = 1 by CHORD:7, XXREAL_0:2;
hence L . (P . j) > L . (P . k) by A141, A143, A147, A168, A169, A173, A174, CHORD:7, XXREAL_0:2; ::_thesis: verum
end;
A175: now__::_thesis:_for_j,_k_being_odd_Element_of_NAT_st_3_<=_j_&_j_<_k_&_k_<=_len_P_holds_
L_._(P_._j)_<_L_._(P_._k)
let j, k be odd Element of NAT ; ::_thesis: ( 3 <= j & j < k & k <= len P implies L . (P . j) < L . (P . k) )
assume that
A176: 3 <= j and
A177: j < k and
A178: k <= len P ; ::_thesis: L . (P . j) < L . (P . k)
j < 5 by A167, A177, A178, XXREAL_0:2;
then ( j = 1 or j = 3 or j = 5 ) by CHORD:8, XXREAL_0:2;
hence L . (P . j) < L . (P . k) by A141, A142, A143, A147, A148, A167, A168, A169, A170, A176, A177, A178, CHORD:8, XXREAL_0:2; ::_thesis: verum
end;
P .last() = c by A167, A170;
then S1[P] by A146, A164, A166, A167, A171, A175, A172, A165, CHORD:90;
hence contradiction by A6; ::_thesis: verum
end;
end;
end;
hence V is perfect by CHORD:109; ::_thesis: verum
end;