let G1 be finite connected real-weighted WGraph; :: thesis: for G2 being inducedWSubgraph of G1,(PRIM:MST G1) `1 ,(PRIM:MST G1) `2 holds G2 is minimumSpanningTree of G1
set PMST = PRIM:MST G1;
set VG1 = the_Vertices_of G1;
set EG1 = the_Edges_of G1;
set WG1 = the_Weight_of G1;
let G2 be inducedWSubgraph of G1,(PRIM:MST G1) `1 ,(PRIM:MST G1) `2 ; :: thesis: G2 is minimumSpanningTree of G1
set PCS = PRIM:CompSeq G1;
A2:
(PRIM:MST G1) `1 = the_Vertices_of G1
by Lm18;
(PRIM:MST G1) `2 in bool (the_Edges_of G1)
by MCART_1:10;
then
(PRIM:MST G1) `2 c= the_Edges_of G1
;
then A3:
(PRIM:MST G1) `2 c= G1 .edgesBetween ((PRIM:MST G1) `1 )
by A2, GLIB_000:37;
(PRIM:MST G1) `1 c= the_Vertices_of G1
by Lm18;
then A4:
( the_Vertices_of G2 = the_Vertices_of G1 & the_Edges_of G2 = (PRIM:MST G1) `2 )
by A2, A3, GLIB_000:def 39;
then A5:
( G2 is Tree-like & G2 is spanning )
by Lm17, GLIB_000:def 35;
reconsider G2' = G2 as Tree-like _Graph by Lm17;
now assume A6:
G2 is not
minimumSpanningTree of
G1
;
:: thesis: contradictionset X =
{ x where x is Element of G1 .allWSubgraphs() : x is minimumSpanningTree of G1 } ;
then reconsider X =
{ x where x is Element of G1 .allWSubgraphs() : x is minimumSpanningTree of G1 } as
finite Subset of
(G1 .allWSubgraphs() ) by TARSKI:def 3;
then reconsider X =
X as non
empty finite Subset of
(G1 .allWSubgraphs() ) ;
defpred S1[
finite _Graph,
Nat]
means ( not
((PRIM:CompSeq G1) . ($2 + 1)) `2 c= the_Edges_of $1 & ( for
n being
Nat st
n <= $2 holds
((PRIM:CompSeq G1) . n) `2 c= the_Edges_of $1 ) );
defpred S2[
finite _Graph,
finite _Graph]
means (
card ((the_Edges_of $1) /\ (the_Edges_of G2)) > card ((the_Edges_of $2) /\ (the_Edges_of G2)) or (
card ((the_Edges_of $1) /\ (the_Edges_of G2)) = card ((the_Edges_of $2) /\ (the_Edges_of G2)) & ( for
k1,
k2 being
Nat st
S1[$1,
k1] &
S1[$2,
k2] holds
k1 >= k2 ) ) );
A21:
(
X is
finite &
X <> {} &
X c= X )
;
then A29:
for
x,
y being
Element of
X holds
(
S2[
x,
y] or
S2[
y,
x] )
;
then A38:
for
x,
y,
z being
Element of
X st
S2[
x,
y] &
S2[
y,
z] holds
S2[
x,
z]
;
consider M being
Element of
X such that A39:
(
M in X & ( for
y being
Element of
X st
y in X holds
S2[
M,
y] ) )
from CQC_SIM1:sch 4(A21, A29, A38);
consider x being
Element of
G1 .allWSubgraphs() such that A40:
(
M = x &
x is
minimumSpanningTree of
G1 )
by A39;
reconsider M =
M as
minimumSpanningTree of
G1 by A40;
A41:
the_Vertices_of G2 = the_Vertices_of M
by A4, GLIB_000:def 35;
defpred S3[
Nat]
means not
((PRIM:CompSeq G1) . $1) `2 c= the_Edges_of M;
then A45:
ex
k being
Nat st
S3[
k]
by A4;
consider k being
Nat such that A46:
(
S3[
k] & ( for
n being
Nat st
S3[
n] holds
k <= n ) )
from NAT_1:sch 5(A45);
then consider k1o being
Nat such that A48:
k = k1o + 1
by NAT_1:6;
set Gk1b =
(PRIM:CompSeq G1) . k1o;
set Gk =
(PRIM:CompSeq G1) . k;
A49:
(PRIM:CompSeq G1) . k = PRIM:Step ((PRIM:CompSeq G1) . k1o)
by A48, Def15;
(k1o + 1) - 1
< k - 0
by A48, XREAL_1:17;
then A50:
((PRIM:CompSeq G1) . k1o) `2 c= the_Edges_of M
by A46;
set Next =
PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o);
set ep =
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o));
A51:
PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o) <> {}
by A46, A49, A50, Def14;
then A52:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)
;
consider v being
Vertex of
G1 such that A53:
( not
v in ((PRIM:CompSeq G1) . k1o) `1 &
(PRIM:CompSeq G1) . k = [((((PRIM:CompSeq G1) . k1o) `1 ) \/ {v}),((((PRIM:CompSeq G1) . k1o) `2 ) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))})] )
by A49, A51, Lm6;
A54:
((PRIM:CompSeq G1) . k) `2 = (((PRIM:CompSeq G1) . k1o) `2 ) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by A53, MCART_1:7;
then A55:
not
{(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} c= the_Edges_of M
by A46, A50, XBOOLE_1:8;
then A56:
not
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in the_Edges_of M
by ZFMISC_1:37;
set V =
((PRIM:CompSeq G1) . k1o) `1 ;
A58:
the_Vertices_of G1 = the_Vertices_of M
by GLIB_000:def 35;
then reconsider V =
((PRIM:CompSeq G1) . k1o) `1 as non
empty Subset of
(the_Vertices_of M) by Lm9;
consider Mep being
inducedWSubgraph of
G1,
the_Vertices_of G1,
(the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))};
set v1 =
(the_Source_of Mep) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)));
set v2 =
(the_Target_of Mep) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)));
(
{(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} c= the_Edges_of G1 &
the_Edges_of M c= the_Edges_of G1 )
by A52, ZFMISC_1:37;
then
(the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} c= the_Edges_of G1
by XBOOLE_1:8;
then
(
the_Vertices_of G1 c= the_Vertices_of G1 &
(the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} c= G1 .edgesBetween (the_Vertices_of G1) )
by GLIB_000:37;
then A59:
(
the_Vertices_of Mep = the_Vertices_of G1 &
the_Edges_of Mep = (the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} )
by GLIB_000:def 39;
then
(
the_Vertices_of M c= the_Vertices_of Mep &
the_Edges_of M c= the_Edges_of Mep )
by XBOOLE_1:7;
then reconsider M' =
M as
connected Subgraph of
Mep by GLIB_000:47;
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by TARSKI:def 1;
then A60:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in the_Edges_of Mep
by A59, XBOOLE_0:def 3;
the_Vertices_of Mep = the_Vertices_of M
by A59, GLIB_000:def 35;
then reconsider v1 =
(the_Source_of Mep) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))),
v2 =
(the_Target_of Mep) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) as
Vertex of
M by A60, FUNCT_2:7;
consider W being
Walk of
M' such that A61:
W is_Walk_from v2,
v1
by GLIB_002:def 1;
consider PW being
Path of
W;
A62:
PW is_Walk_from v2,
v1
by A61, GLIB_001:161;
A63:
PW .edges() c= the_Edges_of M
;
reconsider P =
PW as
Path of
Mep by GLIB_001:176;
A64:
P .edges() c= the_Edges_of M
by A63, GLIB_001:111;
A65:
P is_Walk_from v2,
v1
by A62, GLIB_001:20;
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by TARSKI:def 1;
then A66:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in ((PRIM:CompSeq G1) . k) `2
by A54, XBOOLE_0:def 3;
A67:
((PRIM:CompSeq G1) . k) `2 c= (PRIM:MST G1) `2
by Th52;
then A68:
{(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} /\ (the_Edges_of G2) = {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by A4, A66, ZFMISC_1:52;
A69:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) Joins v1,
v2,
Mep
by A60, GLIB_000:def 15;
then
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) Joins v1,
v2,
G1
by GLIB_000:75;
then A70:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) Joins v1,
v2,
G2'
by A4, A66, A67, GLIB_000:76;
then
( (
(the_Source_of G2) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v1 &
(the_Target_of G2) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v2 ) or (
(the_Target_of G2) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v1 &
(the_Source_of G2) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v2 ) )
by GLIB_000:def 15;
then
v1 <> v2
by A4, A66, A67, A70, GLIB_000:def 20;
then
v1 <> P .first()
by A65, GLIB_001:def 23;
then
P .last() <> P .first()
by A65, GLIB_001:def 23;
then A71:
not
P is
closed
by GLIB_001:def 24;
A72:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) Joins P .last() ,
v2,
Mep
by A65, A69, GLIB_001:def 23;
A73:
not
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) in P .edges()
by A55, A64, ZFMISC_1:37;
then A76:
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) is
Path-like
by A71, A72, A73, GLIB_001:151;
set C =
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)));
A77:
not
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) is
trivial
by A72, GLIB_001:133;
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) is_Walk_from v2,
v2
by A65, A69, GLIB_001:67;
then
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) is
closed
by GLIB_001:120;
then A78:
P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) is
Cycle-like
by A76, A77, GLIB_001:def 31;
A79:
choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) SJoins ((PRIM:CompSeq G1) . k1o) `1 ,
(the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ),
G1
by A51, Def12;
A80:
(
(the_Source_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v1 &
(the_Target_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) = v2 )
by A60, GLIB_000:def 34;
A81:
(
v1 = P . (len P) &
v2 = P . 1 )
by A62, GLIB_001:18;
now per cases
( ( v1 in ((PRIM:CompSeq G1) . k1o) `1 & v2 in (the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ) ) or ( v2 in ((PRIM:CompSeq G1) . k1o) `1 & v1 in (the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ) ) )
by A79, A80, GLIB_000:def 17;
suppose A82:
(
v1 in ((PRIM:CompSeq G1) . k1o) `1 &
v2 in (the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ) )
;
:: thesis: ex em being set st
( em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() & em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )defpred S4[
Nat]
means ( not $1 is
even & $1
<= len P &
P . $1
in ((PRIM:CompSeq G1) . k1o) `1 );
A83:
ex
n being
Nat st
S4[
n]
by A81, A82;
consider m being
Nat such that A84:
(
S4[
m] & ( for
n being
Nat st
S4[
n] holds
m <= n ) )
from NAT_1:sch 5(A83);
reconsider m =
m as
odd Element of
NAT by A84, ORDINAL1:def 13;
A85:
( 1
<= m &
m <= len P )
by A84, HEYTING3:1;
m <> 1
by A81, A82, A84, XBOOLE_0:def 5;
then
1
< m
by A85, XXREAL_0:1;
then
1
+ 1
<= m
by NAT_1:13;
then reconsider m2k =
m - (2 * 1) as
odd Element of
NAT by INT_1:18;
A86:
m2k < m - 0
by XREAL_1:17;
then A87:
m2k < len P
by A84, XXREAL_0:2;
then A88:
not
P . m2k in ((PRIM:CompSeq G1) . k1o) `1
by A84, A86;
A89:
m2k + 2
= m
;
set em =
P . (m2k + 1);
take em =
P . (m2k + 1);
:: thesis: ( em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() & em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )A90:
em in P .edges()
by A87, GLIB_001:101;
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() = (P .edges() ) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by A72, GLIB_001:112;
hence
em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges()
by A90, XBOOLE_0:def 3;
:: thesis: ( em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )consider i being
even Element of
NAT such that A91:
( 1
<= i &
i <= len P &
P . i = em )
by A90, GLIB_001:100;
i in dom P
by A91, FINSEQ_3:27;
then A92:
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) . i = em
by A72, A91, GLIB_001:66;
A93:
len (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) = (len P) + 2
by A72, GLIB_001:65;
A94:
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) . ((len P) + 1) = choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))
by A72, GLIB_001:66;
(len P) + 0 < (len P) + 1
by XREAL_1:10;
then A95:
i < (len P) + 1
by A91, XXREAL_0:2;
(len P) + 1
<= (len P) + 2
by XREAL_1:9;
hence
em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))
by A76, A91, A92, A93, A94, A95, GLIB_001:139;
:: thesis: em SJoins V,(the_Vertices_of M) \ V,MA97:
em Joins PW . m2k,
PW . m,
M
by A87, A89, GLIB_001:def 3;
then
PW . m2k in the_Vertices_of M
by GLIB_000:16;
then
PW . m2k in (the_Vertices_of M) \ (((PRIM:CompSeq G1) . k1o) `1 )
by A88, XBOOLE_0:def 5;
hence
em SJoins V,
(the_Vertices_of M) \ V,
M
by A84, A97, GLIB_000:20;
:: thesis: verum end; suppose A98:
(
v2 in ((PRIM:CompSeq G1) . k1o) `1 &
v1 in (the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ) )
;
:: thesis: ex em being set st
( em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() & em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )defpred S4[
Nat]
means ( not $1 is
even & $1
<= len P &
P . $1
in (the_Vertices_of G1) \ (((PRIM:CompSeq G1) . k1o) `1 ) );
A99:
ex
n being
Nat st
S4[
n]
by A81, A98;
consider m being
Nat such that A100:
(
S4[
m] & ( for
n being
Nat st
S4[
n] holds
m <= n ) )
from NAT_1:sch 5(A99);
reconsider m =
m as
odd Element of
NAT by A100, ORDINAL1:def 13;
A101:
( 1
<= m &
m <= len P )
by A100, HEYTING3:1;
m <> 1
by A81, A98, A100, XBOOLE_0:def 5;
then
1
< m
by A101, XXREAL_0:1;
then
1
+ 1
<= m
by NAT_1:13;
then reconsider m2k =
m - (2 * 1) as
odd Element of
NAT by INT_1:18;
A102:
m2k < m - 0
by XREAL_1:17;
then A103:
m2k < len P
by A100, XXREAL_0:2;
A106:
m2k + 2
= m
;
set em =
P . (m2k + 1);
take em =
P . (m2k + 1);
:: thesis: ( em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() & em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )A107:
em in P .edges()
by A103, GLIB_001:101;
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() = (P .edges() ) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by A72, GLIB_001:112;
hence
em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges()
by A107, XBOOLE_0:def 3;
:: thesis: ( em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) & em SJoins V,(the_Vertices_of M) \ V,M )consider i being
even Element of
NAT such that A108:
( 1
<= i &
i <= len P &
P . i = em )
by A107, GLIB_001:100;
i in dom P
by A108, FINSEQ_3:27;
then A109:
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) . i = em
by A72, A108, GLIB_001:66;
A110:
len (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) = (len P) + 2
by A72, GLIB_001:65;
A111:
(P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) . ((len P) + 1) = choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))
by A72, GLIB_001:66;
(len P) + 0 < (len P) + 1
by XREAL_1:10;
then A112:
i < (len P) + 1
by A108, XXREAL_0:2;
(len P) + 1
<= (len P) + 2
by XREAL_1:9;
hence
em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))
by A76, A108, A109, A110, A111, A112, GLIB_001:139;
:: thesis: em SJoins V,(the_Vertices_of M) \ V,M
em Joins PW . m2k,
PW . m,
M
by A103, A106, GLIB_001:def 3;
hence
em SJoins V,
(the_Vertices_of M) \ V,
M
by A58, A100, A104, GLIB_000:20;
:: thesis: verum end; end; end; then consider em being
set such that A114:
(
em in (P .addEdge (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))) .edges() &
em <> choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)) &
em SJoins V,
(the_Vertices_of M) \ V,
M )
;
A115:
em SJoins V,
(the_Vertices_of G1) \ V,
G1
by A58, A114, GLIB_000:75;
then A116:
(the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))) <= (the_Weight_of G1) . em
by A51, Def12;
consider M2 being
[Weighted] weight-inheriting removeEdge of
Mep,
em;
reconsider M2 =
M2 as
WSubgraph of
G1 by GLIB_003:16;
(
the_Vertices_of M c= the_Vertices_of Mep &
the_Edges_of M c= the_Edges_of Mep )
by A59, XBOOLE_1:7;
then reconsider M' =
M as
connected Subgraph of
Mep by GLIB_000:47;
the_Vertices_of M' = the_Vertices_of Mep
by A59, GLIB_000:def 35;
then
M' is
spanning
by GLIB_000:def 35;
then
Mep is
connected
by GLIB_002:23;
then A117:
M2 is
connected
by A78, A114, GLIB_002:5;
A118:
the_Edges_of M2 = ((the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}) \ {em}
by A59, GLIB_000:54;
then A120:
M2 is
Tree-like
by A117, GLIB_002:47;
set M2' =
M2 .strict WGraphSelectors ;
A121:
(
M2 .strict WGraphSelectors == M2 &
the_Weight_of (M2 .strict WGraphSelectors ) = the_Weight_of M2 )
by Lm2;
then A122:
the_Edges_of (M2 .strict WGraphSelectors ) = ((the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}) \ {em}
by A118, GLIB_000:def 36;
reconsider M2' =
M2 .strict WGraphSelectors as
WSubgraph of
G1 by A121, GLIB_003:15;
then reconsider M2' =
M2' as
spanning Tree-like WSubgraph of
G1 ;
now A123:
G1 .edgesBetween (the_Vertices_of G1) = the_Edges_of G1
by GLIB_000:37;
then A124:
(
the_Edges_of M c= G1 .edgesBetween (the_Vertices_of G1) &
the_Vertices_of G1 c= the_Vertices_of G1 )
;
the_Vertices_of G1 = the_Vertices_of M
by GLIB_000:def 35;
then
M is
inducedWSubgraph of
G1,
the_Vertices_of G1,
the_Edges_of M
by A123, GLIB_000:def 39;
then A126:
Mep .cost() = (M .cost() ) + ((the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))))
by A52, A56, A123, A124, Th34;
(M2 .cost() ) + ((the_Weight_of Mep) . em) = Mep .cost()
by A114, Th33;
then A127:
M2 .cost() = (Mep .cost() ) - ((the_Weight_of Mep) . em)
;
the_Weight_of Mep = (the_Weight_of G1) | (the_Edges_of Mep)
by GLIB_003:def 10;
then
M2 .cost() = ((M .cost() ) + ((the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))))) - ((the_Weight_of G1) . em)
by A114, A126, A127, FUNCT_1:72;
hence
M2' .cost() = ((M .cost() ) + ((the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))))) - ((the_Weight_of G1) . em)
by A121, GLIB_000:def 36;
:: thesis: verum end; then A128:
((M2' .cost() ) + ((the_Weight_of G1) . em)) - ((the_Weight_of G1) . em) <= ((M .cost() ) + ((the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))))) - ((the_Weight_of G1) . (choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o))))
by A116, XREAL_1:15;
then reconsider M2' =
M2' as
minimumSpanningTree of
G1 by Def17;
set MG2' =
(the_Edges_of M2') /\ (the_Edges_of G2);
set MG2 =
(the_Edges_of M) /\ (the_Edges_of G2);
A129:
(the_Edges_of M2') /\ (the_Edges_of G2) = (((the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}) /\ (the_Edges_of G2)) \ ({em} /\ (the_Edges_of G2))
by A122, XBOOLE_1:50;
then A131:
(the_Edges_of M) /\ (the_Edges_of G2) misses {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by XBOOLE_0:def 7;
dom M2' = WGraphSelectors
by Lm3;
then
M2' in G1 .allWSubgraphs()
by Def10;
then A132:
M2' in X
;
A134:
now assume A135:
em in the_Edges_of G2
;
:: thesis: contradictionthen A136:
(the_Edges_of M2') /\ (the_Edges_of G2) = (((the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}) /\ (the_Edges_of G2)) \ {em}
by A129, ZFMISC_1:52;
then
{em} c= ((the_Edges_of M) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}) /\ (the_Edges_of G2)
by TARSKI:def 3;
then A137:
card ((the_Edges_of M2') /\ (the_Edges_of G2)) =
(card ((the_Edges_of Mep) /\ (the_Edges_of G2))) - (card {em})
by A59, A136, CARD_2:63
.=
(card ((the_Edges_of Mep) /\ (the_Edges_of G2))) - 1
by CARD_1:50
.=
(card (((the_Edges_of M) /\ (the_Edges_of G2)) \/ {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))})) - 1
by A59, A68, XBOOLE_1:23
.=
((card ((the_Edges_of M) /\ (the_Edges_of G2))) + (card {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))})) - 1
by A131, CARD_2:53
.=
((card ((the_Edges_of M) /\ (the_Edges_of G2))) + 1) - 1
by CARD_1:50
.=
card ((the_Edges_of M) /\ (the_Edges_of G2))
;
consider k2 being
Nat such that A138:
S1[
M2',
k2]
by A8, A132;
then A146:
((PRIM:CompSeq G1) . k) `2 c= the_Edges_of M2'
by TARSKI:def 3;
A148:
k1o >= k2
by A39, A132, A133, A137, A138;
(k1o + 1) - 1
< k - 0
by A48, XREAL_1:17;
hence
contradiction
by A147, A148, XXREAL_0:2;
:: thesis: verum end; then A150:
(the_Edges_of M2') /\ (the_Edges_of G2) = ((the_Edges_of M) /\ (the_Edges_of G2)) \/ ({(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))} /\ (the_Edges_of G2))
by A129, XBOOLE_1:23;
then
(the_Edges_of M) /\ (the_Edges_of G2) misses {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))}
by XBOOLE_0:def 7;
then card ((the_Edges_of M2') /\ (the_Edges_of G2)) =
(card ((the_Edges_of M) /\ (the_Edges_of G2))) + (card {(choose (PRIM:NextBestEdges ((PRIM:CompSeq G1) . k1o)))})
by A68, A150, CARD_2:53
.=
(card ((the_Edges_of M) /\ (the_Edges_of G2))) + 1
by CARD_1:50
;
then
(card ((the_Edges_of M) /\ (the_Edges_of G2))) + 0 >= (card ((the_Edges_of M) /\ (the_Edges_of G2))) + 1
by A39, A132;
hence
contradiction
by XREAL_1:8;
:: thesis: verum end;
hence
G2 is minimumSpanningTree of G1
; :: thesis: verum