:: GLIB_005 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 Function for x, y being set holds x in dom (F +* (x .--> y)) proof let F be Function; ::_thesis: for x, y being set holds x in dom (F +* (x .--> y)) let x, y be set ; ::_thesis: x in dom (F +* (x .--> y)) dom (x .--> y) = {x} by FUNCOP_1:13; then A1: x in dom (x .--> y) by TARSKI:def_1; dom (x .--> y) c= dom (F +* (x .--> y)) by FUNCT_4:10; hence x in dom (F +* (x .--> y)) by A1; ::_thesis: verum end; Lm3: for F being Function for x, y being set holds (F +* (x .--> y)) . x = y proof let F be Function; ::_thesis: for x, y being set holds (F +* (x .--> y)) . x = y let x, y be set ; ::_thesis: (F +* (x .--> y)) . x = y dom (x .--> y) = {x} by FUNCOP_1:13; then x in dom (x .--> y) by TARSKI:def_1; hence (F +* (x .--> y)) . x = (x .--> y) . x by FUNCT_4:13 .= y by FUNCOP_1:72 ; ::_thesis: verum end; Lm4: for F being Function for x, y, z being set st x <> z holds (F +* (x .--> y)) . z = F . z proof let F be Function; ::_thesis: for x, y, z being set st x <> z holds (F +* (x .--> y)) . z = F . z let x, y, z be set ; ::_thesis: ( x <> z implies (F +* (x .--> y)) . z = F . z ) assume x <> z ; ::_thesis: (F +* (x .--> y)) . z = F . z then not z in dom (x .--> y) by TARSKI:def_1; hence (F +* (x .--> y)) . z = F . z by FUNCT_4:11; ::_thesis: verum end; begin definition let G be WGraph; attrG is natural-weighted means :Def1: :: GLIB_005:def 1 the_Weight_of G is natural-valued ; end; :: deftheorem Def1 defines natural-weighted GLIB_005:def_1_:_ for G being WGraph holds ( G is natural-weighted iff the_Weight_of G is natural-valued ); registration cluster Relation-like NAT -defined Function-like finite [Graph-like] [Weighted] natural-weighted -> nonnegative-weighted for set ; coherence for b1 being WGraph st b1 is natural-weighted holds b1 is nonnegative-weighted proof let G be WGraph; ::_thesis: ( G is natural-weighted implies G is nonnegative-weighted ) assume G is natural-weighted ; ::_thesis: G is nonnegative-weighted then A1: the_Weight_of G is natural-valued by Def1; now__::_thesis:_for_y_being_set_st_y_in_rng_(the_Weight_of_G)_holds_ y_in_Real>=0 let y be set ; ::_thesis: ( y in rng (the_Weight_of G) implies y in Real>=0 ) assume A2: y in rng (the_Weight_of G) ; ::_thesis: y in Real>=0 rng (the_Weight_of G) c= NAT by A1, VALUED_0:def_6; then reconsider y9 = y as Element of NAT by A2; y9 is Real ; hence y in Real>=0 by GRAPH_5:def_12; ::_thesis: verum end; then rng (the_Weight_of G) c= Real>=0 by TARSKI:def_3; hence G is nonnegative-weighted by GLIB_003:def_14; ::_thesis: verum end; end; registration cluster Relation-like NAT -defined Function-like finite finite-support [Graph-like] finite trivial Tree-like [Weighted] natural-weighted for set ; existence ex b1 being WGraph st ( b1 is finite & b1 is trivial & b1 is Tree-like & b1 is natural-weighted ) proof set E = {} ; set V = {1}; reconsider S = {} as Function of {},{1} by RELSET_1:12; set G1 = createGraph ({1},{},S,S); set WL = the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT; set G2 = (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT); take (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) ; ::_thesis: ( (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is finite & (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is trivial & (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is Tree-like & (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is natural-weighted ) thus ( (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is finite & (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is trivial & (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is Tree-like ) ; ::_thesis: (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is natural-weighted the_Weight_of ((createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT)) = the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT by GLIB_000:8; hence (createGraph ({1},{},S,S)) .set (WeightSelector, the Function of (the_Edges_of (createGraph ({1},{},S,S))),NAT) is natural-weighted by Def1; ::_thesis: verum end; end; registration let G be natural-weighted WGraph; cluster the_Weight_of G -> natural-valued ; coherence the_Weight_of G is natural-valued by Def1; end; definition let G be _Graph; mode FF:ELabeling of G is natural-valued ManySortedSet of the_Edges_of G; end; definition let G be finite real-weighted WGraph; let EL be FF:ELabeling of G; let source, sink be set ; predEL has_valid_flow_from source,sink means :Def2: :: GLIB_005:def 2 ( source is Vertex of G & sink is Vertex of G & ( for e being set st e in the_Edges_of G holds ( 0 <= EL . e & EL . e <= (the_Weight_of G) . e ) ) & ( for v being Vertex of G st v <> source & v <> sink holds Sum (EL | (v .edgesIn())) = Sum (EL | (v .edgesOut())) ) ); end; :: deftheorem Def2 defines has_valid_flow_from GLIB_005:def_2_:_ for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being set holds ( EL has_valid_flow_from source,sink iff ( source is Vertex of G & sink is Vertex of G & ( for e being set st e in the_Edges_of G holds ( 0 <= EL . e & EL . e <= (the_Weight_of G) . e ) ) & ( for v being Vertex of G st v <> source & v <> sink holds Sum (EL | (v .edgesIn())) = Sum (EL | (v .edgesOut())) ) ) ); definition let G be finite real-weighted WGraph; let EL be FF:ELabeling of G; let source, sink be set ; funcEL .flow (source,sink) -> real number equals :: GLIB_005:def 3 (Sum (EL | (G .edgesInto {sink}))) - (Sum (EL | (G .edgesOutOf {sink}))); coherence (Sum (EL | (G .edgesInto {sink}))) - (Sum (EL | (G .edgesOutOf {sink}))) is real number ; end; :: deftheorem defines .flow GLIB_005:def_3_:_ for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being set holds EL .flow (source,sink) = (Sum (EL | (G .edgesInto {sink}))) - (Sum (EL | (G .edgesOutOf {sink}))); definition let G be finite real-weighted WGraph; let EL be FF:ELabeling of G; let source, sink be set ; predEL has_maximum_flow_from source,sink means :Def4: :: GLIB_005:def 4 ( EL has_valid_flow_from source,sink & ( for E2 being FF:ELabeling of G st E2 has_valid_flow_from source,sink holds E2 .flow (source,sink) <= EL .flow (source,sink) ) ); end; :: deftheorem Def4 defines has_maximum_flow_from GLIB_005:def_4_:_ for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being set holds ( EL has_maximum_flow_from source,sink iff ( EL has_valid_flow_from source,sink & ( for E2 being FF:ELabeling of G st E2 has_valid_flow_from source,sink holds E2 .flow (source,sink) <= EL .flow (source,sink) ) ) ); definition let G be _Graph; let EL be FF:ELabeling of G; mode AP:VLabeling of EL -> PartFunc of (the_Vertices_of G),({1} \/ (the_Edges_of G)) means :Def5: :: GLIB_005:def 5 verum; existence ex b1 being PartFunc of (the_Vertices_of G),({1} \/ (the_Edges_of G)) st verum ; end; :: deftheorem Def5 defines AP:VLabeling GLIB_005:def_5_:_ for G being _Graph for EL being FF:ELabeling of G for b3 being PartFunc of (the_Vertices_of G),({1} \/ (the_Edges_of G)) holds ( b3 is AP:VLabeling of EL iff verum ); definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let VL be AP:VLabeling of EL; let e be set ; prede is_forward_edge_wrt VL means :Def6: :: GLIB_005:def 6 ( e in the_Edges_of G & (the_Source_of G) . e in dom VL & not (the_Target_of G) . e in dom VL & EL . e < (the_Weight_of G) . e ); end; :: deftheorem Def6 defines is_forward_edge_wrt GLIB_005:def_6_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for VL being AP:VLabeling of EL for e being set holds ( e is_forward_edge_wrt VL iff ( e in the_Edges_of G & (the_Source_of G) . e in dom VL & not (the_Target_of G) . e in dom VL & EL . e < (the_Weight_of G) . e ) ); definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let VL be AP:VLabeling of EL; let e be set ; prede is_backward_edge_wrt VL means :Def7: :: GLIB_005:def 7 ( e in the_Edges_of G & (the_Target_of G) . e in dom VL & not (the_Source_of G) . e in dom VL & 0 < EL . e ); end; :: deftheorem Def7 defines is_backward_edge_wrt GLIB_005:def_7_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for VL being AP:VLabeling of EL for e being set holds ( e is_backward_edge_wrt VL iff ( e in the_Edges_of G & (the_Target_of G) . e in dom VL & not (the_Source_of G) . e in dom VL & 0 < EL . e ) ); definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let W be Walk of G; predW is_augmenting_wrt EL means :Def8: :: GLIB_005:def 8 for n being odd Nat st n < len W holds ( ( W . (n + 1) DJoins W . n,W . (n + 2),G implies EL . (W . (n + 1)) < (the_Weight_of G) . (W . (n + 1)) ) & ( not W . (n + 1) DJoins W . n,W . (n + 2),G implies 0 < EL . (W . (n + 1)) ) ); end; :: deftheorem Def8 defines is_augmenting_wrt GLIB_005:def_8_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G holds ( W is_augmenting_wrt EL iff for n being odd Nat st n < len W holds ( ( W . (n + 1) DJoins W . n,W . (n + 2),G implies EL . (W . (n + 1)) < (the_Weight_of G) . (W . (n + 1)) ) & ( not W . (n + 1) DJoins W . n,W . (n + 2),G implies 0 < EL . (W . (n + 1)) ) ) ); theorem Th1: :: GLIB_005:1 for G being real-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G st W is trivial holds W is_augmenting_wrt EL proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for W being Walk of G st W is trivial holds W is_augmenting_wrt EL let EL be FF:ELabeling of G; ::_thesis: for W being Walk of G st W is trivial holds W is_augmenting_wrt EL let W be Walk of G; ::_thesis: ( W is trivial implies W is_augmenting_wrt EL ) assume A1: W is trivial ; ::_thesis: W is_augmenting_wrt EL now__::_thesis:_for_n_being_odd_Nat_st_n_<_len_W_holds_ (_(_W_._(n_+_1)_DJoins_W_._n,W_._(n_+_2),G_implies_EL_._(W_._(n_+_1))_<_(the_Weight_of_G)_._(W_._(n_+_1))_)_&_(_not_W_._(n_+_1)_DJoins_W_._n,W_._(n_+_2),G_implies_0_<_EL_._(W_._(n_+_1))_)_) let n be odd Nat; ::_thesis: ( n < len W implies ( ( W . (n + 1) DJoins W . n,W . (n + 2),G implies EL . (W . (n + 1)) < (the_Weight_of G) . (W . (n + 1)) ) & ( not W . (n + 1) DJoins W . n,W . (n + 2),G implies 0 < EL . (W . (n + 1)) ) ) ) assume n < len W ; ::_thesis: ( ( W . (n + 1) DJoins W . n,W . (n + 2),G implies EL . (W . (n + 1)) < (the_Weight_of G) . (W . (n + 1)) ) & ( not W . (n + 1) DJoins W . n,W . (n + 2),G implies 0 < EL . (W . (n + 1)) ) ) then n < 1 by A1, GLIB_001:126; hence ( ( W . (n + 1) DJoins W . n,W . (n + 2),G implies EL . (W . (n + 1)) < (the_Weight_of G) . (W . (n + 1)) ) & ( not W . (n + 1) DJoins W . n,W . (n + 2),G implies 0 < EL . (W . (n + 1)) ) ) by ABIAN:12; ::_thesis: verum end; hence W is_augmenting_wrt EL by Def8; ::_thesis: verum end; theorem Th2: :: GLIB_005:2 for G being real-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G for m, n being Nat st W is_augmenting_wrt EL holds W .cut (m,n) is_augmenting_wrt EL proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for W being Walk of G for m, n being Nat st W is_augmenting_wrt EL holds W .cut (m,n) is_augmenting_wrt EL let EL be FF:ELabeling of G; ::_thesis: for W being Walk of G for m, n being Nat st W is_augmenting_wrt EL holds W .cut (m,n) is_augmenting_wrt EL let W be Walk of G; ::_thesis: for m, n being Nat st W is_augmenting_wrt EL holds W .cut (m,n) is_augmenting_wrt EL let m, n be Nat; ::_thesis: ( W is_augmenting_wrt EL implies W .cut (m,n) is_augmenting_wrt EL ) set W2 = W .cut (m,n); assume A1: W is_augmenting_wrt EL ; ::_thesis: W .cut (m,n) is_augmenting_wrt EL now__::_thesis:_W_.cut_(m,n)_is_augmenting_wrt_EL percases ( ( m is odd & n is odd & m <= n & n <= len W ) or not m is odd or not n is odd or not m <= n or not n <= len W ) ; supposeA2: ( m is odd & n is odd & m <= n & n <= len W ) ; ::_thesis: W .cut (m,n) is_augmenting_wrt EL then reconsider m9 = m, n9 = n as odd Element of NAT by ORDINAL1:def_12; now__::_thesis:_for_x_being_odd_Nat_st_x_<_len_(W_.cut_(m,n))_holds_ (_(_(W_.cut_(m,n))_._(x_+_1)_DJoins_(W_.cut_(m,n))_._x,(W_.cut_(m,n))_._(x_+_2),G_implies_EL_._((W_.cut_(m,n))_._(x_+_1))_<_(the_Weight_of_G)_._((W_.cut_(m,n))_._(x_+_1))_)_&_(_not_(W_.cut_(m,n))_._(x_+_1)_DJoins_(W_.cut_(m,n))_._x,(W_.cut_(m,n))_._(x_+_2),G_implies_0_<_EL_._((W_.cut_(m,n))_._(x_+_1))_)_) let x be odd Nat; ::_thesis: ( x < len (W .cut (m,n)) implies ( ( (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G implies EL . ((W .cut (m,n)) . (x + 1)) < (the_Weight_of G) . ((W .cut (m,n)) . (x + 1)) ) & ( not (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G implies 0 < EL . ((W .cut (m,n)) . (x + 1)) ) ) ) reconsider x9 = x as Element of NAT by ORDINAL1:def_12; set v1b = (W .cut (m,n)) . x; set eb = (W .cut (m,n)) . (x + 1); set v2b = (W .cut (m,n)) . (x + 2); assume A3: x < len (W .cut (m,n)) ; ::_thesis: ( ( (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G implies EL . ((W .cut (m,n)) . (x + 1)) < (the_Weight_of G) . ((W .cut (m,n)) . (x + 1)) ) & ( not (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G implies 0 < EL . ((W .cut (m,n)) . (x + 1)) ) ) then A4: x9 in dom (W .cut (m,n)) by GLIB_001:12; A5: m9 <= n9 by A2; A6: x9 + 2 in dom (W .cut (m,n)) by A3, GLIB_001:12; then A7: (W .cut (m,n)) . (x9 + 2) = W . ((m9 + (x9 + 2)) - 1) by A2, A5, GLIB_001:47; x9 + 1 in dom (W .cut (m,n)) by A3, GLIB_001:12; then A8: (W .cut (m,n)) . (x9 + 1) = W . ((m9 + (x9 + 1)) - 1) by A2, A5, GLIB_001:47; (m9 + x9) - 1 in dom W by A2, A4, A5, GLIB_001:47; then reconsider a = (m9 + x) - 1, a2 = (m + (x + 2)) - 1 as Element of NAT by A8; reconsider a = a as odd Element of NAT ; set v1a = W . a; set ea = W . (a + 1); set v2a = W . (a + 2); (m9 + (x9 + 2)) - 1 in dom W by A2, A6, A5, GLIB_001:47; then a2 <= len W by FINSEQ_3:25; then A9: ((m + (x + 2)) - 1) - 2 < (len W) - 0 by XREAL_1:15; hereby ::_thesis: ( not (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G implies 0 < EL . ((W .cut (m,n)) . (x + 1)) ) assume (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G ; ::_thesis: EL . ((W .cut (m,n)) . (x + 1)) < (the_Weight_of G) . ((W .cut (m,n)) . (x + 1)) then W . (a + 1) DJoins W . a,W . (a + 2),G by A2, A4, A5, A8, A7, GLIB_001:47; hence EL . ((W .cut (m,n)) . (x + 1)) < (the_Weight_of G) . ((W .cut (m,n)) . (x + 1)) by A1, A8, A9, Def8; ::_thesis: verum end; assume not (W .cut (m,n)) . (x + 1) DJoins (W .cut (m,n)) . x,(W .cut (m,n)) . (x + 2),G ; ::_thesis: 0 < EL . ((W .cut (m,n)) . (x + 1)) then not W . (a + 1) DJoins W . a,W . (a + 2),G by A2, A4, A5, A8, A7, GLIB_001:47; hence 0 < EL . ((W .cut (m,n)) . (x + 1)) by A1, A8, A9, Def8; ::_thesis: verum end; hence W .cut (m,n) is_augmenting_wrt EL by Def8; ::_thesis: verum end; suppose ( not m is odd or not n is odd or not m <= n or not n <= len W ) ; ::_thesis: W .cut (m,n) is_augmenting_wrt EL hence W .cut (m,n) is_augmenting_wrt EL by A1, GLIB_001:def_11; ::_thesis: verum end; end; end; hence W .cut (m,n) is_augmenting_wrt EL ; ::_thesis: verum end; theorem Th3: :: GLIB_005:3 for G being real-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G for e, v being set st W is_augmenting_wrt EL & not v in W .vertices() & ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) holds W .addEdge e is_augmenting_wrt EL proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for W being Walk of G for e, v being set st W is_augmenting_wrt EL & not v in W .vertices() & ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) holds W .addEdge e is_augmenting_wrt EL let EL be FF:ELabeling of G; ::_thesis: for W being Walk of G for e, v being set st W is_augmenting_wrt EL & not v in W .vertices() & ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) holds W .addEdge e is_augmenting_wrt EL let W be Walk of G; ::_thesis: for e, v being set st W is_augmenting_wrt EL & not v in W .vertices() & ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) holds W .addEdge e is_augmenting_wrt EL let e, v be set ; ::_thesis: ( W is_augmenting_wrt EL & not v in W .vertices() & ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) implies W .addEdge e is_augmenting_wrt EL ) assume A1: W is_augmenting_wrt EL ; ::_thesis: ( v in W .vertices() or ( not ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) & not ( e DJoins v,W .last() ,G & 0 < EL . e ) ) or W .addEdge e is_augmenting_wrt EL ) set W2 = W .addEdge e; assume that A2: not v in W .vertices() and A3: ( ( e DJoins W .last() ,v,G & EL . e < (the_Weight_of G) . e ) or ( e DJoins v,W .last() ,G & 0 < EL . e ) ) ; ::_thesis: W .addEdge e is_augmenting_wrt EL let n be odd Nat; :: according to GLIB_005:def_8 ::_thesis: ( n < len (W .addEdge e) implies ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) ) A4: e Joins W .last() ,v,G by A3, GLIB_000:16; assume A5: n < len (W .addEdge e) ; ::_thesis: ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) now__::_thesis:_(_(_(W_.addEdge_e)_._(n_+_1)_DJoins_(W_.addEdge_e)_._n,(W_.addEdge_e)_._(n_+_2),G_implies_EL_._((W_.addEdge_e)_._(n_+_1))_<_(the_Weight_of_G)_._((W_.addEdge_e)_._(n_+_1))_)_&_(_not_(W_.addEdge_e)_._(n_+_1)_DJoins_(W_.addEdge_e)_._n,(W_.addEdge_e)_._(n_+_2),G_implies_0_<_EL_._((W_.addEdge_e)_._(n_+_1))_)_) percases ( n < len W or n >= len W ) ; supposeA6: n < len W ; ::_thesis: ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) reconsider n9 = n as Element of NAT by ORDINAL1:def_12; n9 + 1 in dom W by A6, GLIB_001:12; then A7: W . (n + 1) = (W .addEdge e) . (n + 1) by A4, GLIB_001:65; n9 + 2 in dom W by A6, GLIB_001:12; then A8: W . (n + 2) = (W .addEdge e) . (n + 2) by A4, GLIB_001:65; n9 in dom W by A6, GLIB_001:12; then W . n = (W .addEdge e) . n by A4, GLIB_001:65; hence ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) by A1, A6, A7, A8, Def8; ::_thesis: verum end; supposeA9: n >= len W ; ::_thesis: ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) n + 1 <= len (W .addEdge e) by A5, NAT_1:13; then n + 1 <= (len W) + (2 * 1) by A4, GLIB_001:64; then n + 1 < ((len W) + 1) + 1 by XXREAL_0:1; then n + 1 <= (len W) + 1 by NAT_1:13; then A10: n <= len W by XREAL_1:6; then A11: n = len W by A9, XXREAL_0:1; then A12: (W .addEdge e) . (n + 1) = e by A4, GLIB_001:65; 1 <= n by ABIAN:12; then n in dom W by A10, FINSEQ_3:25; then A13: (W .addEdge e) . n = W . n by A4, GLIB_001:65 .= W .last() by A11, GLIB_001:def_7 ; now__::_thesis:_(_e_DJoins_W_.last()_,v,G_implies_not_e_DJoins_v,W_.last()_,G_) assume that A14: e DJoins W .last() ,v,G and A15: e DJoins v,W .last() ,G ; ::_thesis: contradiction A16: (the_Source_of G) . e = v by A15, GLIB_000:def_14; (the_Source_of G) . e = W .last() by A14, GLIB_000:def_14; hence contradiction by A2, A16, GLIB_001:88; ::_thesis: verum end; hence ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) by A3, A4, A11, A13, A12, GLIB_001:65; ::_thesis: ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) assume not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G ; ::_thesis: 0 < EL . ((W .addEdge e) . (n + 1)) hence 0 < EL . ((W .addEdge e) . (n + 1)) by A3, A4, A11, A13, A12, GLIB_001:65; ::_thesis: verum end; end; end; hence ( ( (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies EL . ((W .addEdge e) . (n + 1)) < (the_Weight_of G) . ((W .addEdge e) . (n + 1)) ) & ( not (W .addEdge e) . (n + 1) DJoins (W .addEdge e) . n,(W .addEdge e) . (n + 2),G implies 0 < EL . ((W .addEdge e) . (n + 1)) ) ) ; ::_thesis: verum end; begin definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let VL be AP:VLabeling of EL; func AP:NextBestEdges VL -> Subset of (the_Edges_of G) means :Def9: :: GLIB_005:def 9 for e being set holds ( e in it iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ); existence ex b1 being Subset of (the_Edges_of G) st for e being set holds ( e in b1 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) proof defpred S1[ set ] means ( $1 is_forward_edge_wrt VL or $1 is_backward_edge_wrt VL ); consider IT being Subset of (the_Edges_of G) such that A1: for e being set holds ( e in IT iff ( e in the_Edges_of G & S1[e] ) ) from SUBSET_1:sch_1(); take IT ; ::_thesis: for e being set holds ( e in IT iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) let e be set ; ::_thesis: ( e in IT iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) thus ( e in IT implies S1[e] ) by A1; ::_thesis: ( ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) implies e in IT ) assume A2: S1[e] ; ::_thesis: e in IT then e in the_Edges_of G by Def6, Def7; hence e in IT by A1, A2; ::_thesis: verum end; uniqueness for b1, b2 being Subset of (the_Edges_of G) st ( for e being set holds ( e in b1 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ) & ( for e being set holds ( e in b2 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ) holds b1 = b2 proof let IT1, IT2 be Subset of (the_Edges_of G); ::_thesis: ( ( for e being set holds ( e in IT1 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ) & ( for e being set holds ( e in IT2 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ) implies IT1 = IT2 ) assume that A3: for e being set holds ( e in IT1 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) and A4: for e being set holds ( e in IT2 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ; ::_thesis: IT1 = IT2 now__::_thesis:_for_e_being_set_holds_ (_(_e_in_IT1_implies_e_in_IT2_)_&_(_e_in_IT2_implies_e_in_IT1_)_) let e be set ; ::_thesis: ( ( e in IT1 implies e in IT2 ) & ( e in IT2 implies e in IT1 ) ) hereby ::_thesis: ( e in IT2 implies e in IT1 ) assume e in IT1 ; ::_thesis: e in IT2 then ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) by A3; hence e in IT2 by A4; ::_thesis: verum end; assume e in IT2 ; ::_thesis: e in IT1 then ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) by A4; hence e in IT1 by A3; ::_thesis: verum end; hence IT1 = IT2 by TARSKI:1; ::_thesis: verum end; end; :: deftheorem Def9 defines AP:NextBestEdges GLIB_005:def_9_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for VL being AP:VLabeling of EL for b4 being Subset of (the_Edges_of G) holds ( b4 = AP:NextBestEdges VL iff for e being set holds ( e in b4 iff ( e is_forward_edge_wrt VL or e is_backward_edge_wrt VL ) ) ); definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let VL be AP:VLabeling of EL; func AP:Step VL -> AP:VLabeling of EL equals :Def10: :: GLIB_005:def 10 VL if AP:NextBestEdges VL = {} VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) if ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) otherwise VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))); coherence ( ( AP:NextBestEdges VL = {} implies VL is AP:VLabeling of EL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) ) proof set cNB = choose (AP:NextBestEdges VL); set SG = the_Source_of G; set TG = the_Target_of G; set VG = the_Vertices_of G; set EG = the_Edges_of G; set NB = AP:NextBestEdges VL; percases ( AP:NextBestEdges VL = {} or AP:NextBestEdges VL <> {} ) ; suppose AP:NextBestEdges VL = {} ; ::_thesis: ( ( AP:NextBestEdges VL = {} implies VL is AP:VLabeling of EL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) ) hence ( ( AP:NextBestEdges VL = {} implies VL is AP:VLabeling of EL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) ) ; ::_thesis: verum end; suppose AP:NextBestEdges VL <> {} ; ::_thesis: ( ( AP:NextBestEdges VL = {} implies VL is AP:VLabeling of EL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) ) then A1: choose (AP:NextBestEdges VL) in AP:NextBestEdges VL ; A2: {((the_Source_of G) . (choose (AP:NextBestEdges VL)))} c= the_Vertices_of G proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {((the_Source_of G) . (choose (AP:NextBestEdges VL)))} or x in the_Vertices_of G ) assume x in {((the_Source_of G) . (choose (AP:NextBestEdges VL)))} ; ::_thesis: x in the_Vertices_of G then x = (the_Source_of G) . (choose (AP:NextBestEdges VL)) by TARSKI:def_1; hence x in the_Vertices_of G by A1, FUNCT_2:5; ::_thesis: verum end; {(choose (AP:NextBestEdges VL))} c= the_Edges_of G proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {(choose (AP:NextBestEdges VL))} or x in the_Edges_of G ) assume x in {(choose (AP:NextBestEdges VL))} ; ::_thesis: x in the_Edges_of G then x = choose (AP:NextBestEdges VL) by TARSKI:def_1; hence x in the_Edges_of G by A1; ::_thesis: verum end; then A3: {(choose (AP:NextBestEdges VL))} c= {1} \/ (the_Edges_of G) by XBOOLE_1:10; rng (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) c= {(choose (AP:NextBestEdges VL))} by FUNCOP_1:13; then rng (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) c= {1} \/ (the_Edges_of G) by A3, XBOOLE_1:1; then A4: (rng VL) \/ (rng (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= {1} \/ (the_Edges_of G) by XBOOLE_1:8; rng (VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= (rng VL) \/ (rng (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) by FUNCT_4:17; then A5: rng (VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= {1} \/ (the_Edges_of G) by A4, XBOOLE_1:1; {(choose (AP:NextBestEdges VL))} c= the_Edges_of G proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {(choose (AP:NextBestEdges VL))} or x in the_Edges_of G ) assume x in {(choose (AP:NextBestEdges VL))} ; ::_thesis: x in the_Edges_of G then x = choose (AP:NextBestEdges VL) by TARSKI:def_1; hence x in the_Edges_of G by A1; ::_thesis: verum end; then A6: {(choose (AP:NextBestEdges VL))} c= {1} \/ (the_Edges_of G) by XBOOLE_1:10; rng (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) c= {(choose (AP:NextBestEdges VL))} by FUNCOP_1:13; then rng (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) c= {1} \/ (the_Edges_of G) by A6, XBOOLE_1:1; then A7: (rng VL) \/ (rng (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= {1} \/ (the_Edges_of G) by XBOOLE_1:8; rng (VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= (rng VL) \/ (rng (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) by FUNCT_4:17; then A8: rng (VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) c= {1} \/ (the_Edges_of G) by A7, XBOOLE_1:1; A9: {((the_Target_of G) . (choose (AP:NextBestEdges VL)))} c= the_Vertices_of G proof let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in {((the_Target_of G) . (choose (AP:NextBestEdges VL)))} or x in the_Vertices_of G ) assume x in {((the_Target_of G) . (choose (AP:NextBestEdges VL)))} ; ::_thesis: x in the_Vertices_of G then x = (the_Target_of G) . (choose (AP:NextBestEdges VL)) by TARSKI:def_1; hence x in the_Vertices_of G by A1, FUNCT_2:5; ::_thesis: verum end; dom (VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) = (dom VL) \/ (dom (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) by FUNCT_4:def_1 .= (dom VL) \/ {((the_Target_of G) . (choose (AP:NextBestEdges VL)))} by FUNCOP_1:13 ; then A10: VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is Relation of (the_Vertices_of G),({1} \/ (the_Edges_of G)) by A9, A5, RELSET_1:4, XBOOLE_1:8; dom (VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) = (dom VL) \/ (dom (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL)))) by FUNCT_4:def_1 .= (dom VL) \/ {((the_Source_of G) . (choose (AP:NextBestEdges VL)))} by FUNCOP_1:13 ; then VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is Relation of (the_Vertices_of G),({1} \/ (the_Edges_of G)) by A2, A8, RELSET_1:4, XBOOLE_1:8; hence ( ( AP:NextBestEdges VL = {} implies VL is AP:VLabeling of EL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) is AP:VLabeling of EL ) ) by A10, Def5; ::_thesis: verum end; end; end; consistency for b1 being AP:VLabeling of EL st AP:NextBestEdges VL = {} & AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL holds ( b1 = VL iff b1 = VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) ) ; end; :: deftheorem Def10 defines AP:Step GLIB_005:def_10_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for VL being AP:VLabeling of EL holds ( ( AP:NextBestEdges VL = {} implies AP:Step VL = VL ) & ( AP:NextBestEdges VL <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL implies AP:Step VL = VL +* (((the_Source_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) ) & ( not AP:NextBestEdges VL = {} & ( not AP:NextBestEdges VL <> {} or (the_Source_of G) . (choose (AP:NextBestEdges VL)) in dom VL ) implies AP:Step VL = VL +* (((the_Target_of G) . (choose (AP:NextBestEdges VL))) .--> (choose (AP:NextBestEdges VL))) ) ); definition let G be _Graph; let EL be FF:ELabeling of G; mode AP:VLabelingSeq of EL -> ManySortedSet of NAT means :Def11: :: GLIB_005:def 11 for n being Nat holds it . n is AP:VLabeling of EL; existence ex b1 being ManySortedSet of NAT st for n being Nat holds b1 . n is AP:VLabeling of EL proof set f = NAT --> {}; reconsider f = NAT --> {} as ManySortedSet of NAT ; take f ; ::_thesis: for n being Nat holds f . n is AP:VLabeling of EL let n be Nat; ::_thesis: f . n is AP:VLabeling of EL n in NAT by ORDINAL1:def_12; then f . n = {} by FUNCOP_1:7; then f . n is PartFunc of (the_Vertices_of G),({1} \/ (the_Edges_of G)) by RELSET_1:12; hence f . n is AP:VLabeling of EL by Def5; ::_thesis: verum end; end; :: deftheorem Def11 defines AP:VLabelingSeq GLIB_005:def_11_:_ for G being _Graph for EL being FF:ELabeling of G for b3 being ManySortedSet of NAT holds ( b3 is AP:VLabelingSeq of EL iff for n being Nat holds b3 . n is AP:VLabeling of EL ); definition let G be _Graph; let EL be FF:ELabeling of G; let VS be AP:VLabelingSeq of EL; let n be Nat; :: original: . redefine funcVS . n -> AP:VLabeling of EL; coherence VS . n is AP:VLabeling of EL by Def11; end; definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let source be Vertex of G; func AP:CompSeq (EL,source) -> AP:VLabelingSeq of EL means :Def12: :: GLIB_005:def 12 ( it . 0 = source .--> 1 & ( for n being Nat holds it . (n + 1) = AP:Step (it . n) ) ); existence ex b1 being AP:VLabelingSeq of EL st ( b1 . 0 = source .--> 1 & ( for n being Nat holds b1 . (n + 1) = AP:Step (b1 . n) ) ) proof defpred S1[ set , set , set ] means ( ( $2 is AP:VLabeling of EL & ex Gn, Gn1 being AP:VLabeling of EL st ( $2 = Gn & $3 = Gn1 & Gn1 = AP:Step Gn ) ) or ( $2 is not AP:VLabeling of EL & $2 = $3 ) ); A1: rng (source .--> 1) = {1} by FUNCOP_1:8; 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 AP:VLabeling of EL or not x is AP:VLabeling of EL ) ; suppose x is AP:VLabeling of EL ; ::_thesis: ex y being set st S1[n,x,y] then reconsider Gn = x as AP:VLabeling of EL ; S1[n,x, AP:Step Gn] ; hence ex y being set st S1[n,x,y] ; ::_thesis: verum end; suppose x is not AP:VLabeling of EL ; ::_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 = source .--> 1 & ( 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 AP:VLabeling of EL; 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 Gn, Gn1 being AP:VLabeling of EL st ( IT . n = Gn & IT . (n + 1) = Gn1 & Gn1 = AP:Step Gn ) by A3, A5; hence S2[n + 1] ; ::_thesis: verum end; dom (source .--> 1) = {source} by FUNCOP_1:13; then source .--> 1 is Relation of (the_Vertices_of G),({1} \/ (the_Edges_of G)) by A1, RELSET_1:4, XBOOLE_1:7; then A6: S2[ 0 ] by A3, Def5; for n being Nat holds S2[n] from NAT_1:sch_2(A6, A4); then reconsider IT = IT as AP:VLabelingSeq of EL by Def11; take IT ; ::_thesis: ( IT . 0 = source .--> 1 & ( for n being Nat holds IT . (n + 1) = AP:Step (IT . n) ) ) thus IT . 0 = source .--> 1 by A3; ::_thesis: for n being Nat holds IT . (n + 1) = AP:Step (IT . n) let n be Nat; ::_thesis: IT . (n + 1) = AP:Step (IT . n) n is Element of NAT by ORDINAL1:def_12; then ex Gn, Gn1 being AP:VLabeling of EL st ( IT . n = Gn & IT . (n + 1) = Gn1 & Gn1 = AP:Step Gn ) by A3; hence IT . (n + 1) = AP:Step (IT . n) ; ::_thesis: verum end; uniqueness for b1, b2 being AP:VLabelingSeq of EL st b1 . 0 = source .--> 1 & ( for n being Nat holds b1 . (n + 1) = AP:Step (b1 . n) ) & b2 . 0 = source .--> 1 & ( for n being Nat holds b2 . (n + 1) = AP:Step (b2 . n) ) holds b1 = b2 proof let IT1, IT2 be AP:VLabelingSeq of EL; ::_thesis: ( IT1 . 0 = source .--> 1 & ( for n being Nat holds IT1 . (n + 1) = AP:Step (IT1 . n) ) & IT2 . 0 = source .--> 1 & ( for n being Nat holds IT2 . (n + 1) = AP:Step (IT2 . n) ) implies IT1 = IT2 ) assume that A7: IT1 . 0 = source .--> 1 and A8: for n being Nat holds IT1 . (n + 1) = AP:Step (IT1 . n) and A9: IT2 . 0 = source .--> 1 and A10: for n being Nat holds IT2 . (n + 1) = AP: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) = AP:Step (IT2 . n) by A8 .= IT2 . (n + 1) by A10 ; hence S1[n + 1] ; ::_thesis: verum end; then A11: for n being Nat st S1[n] holds S1[n + 1] ; A12: S1[ 0 ] by A7, A9; for n being Nat holds S1[n] from NAT_1:sch_2(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 Def12 defines AP:CompSeq GLIB_005:def_12_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G for b4 being AP:VLabelingSeq of EL holds ( b4 = AP:CompSeq (EL,source) iff ( b4 . 0 = source .--> 1 & ( for n being Nat holds b4 . (n + 1) = AP:Step (b4 . n) ) ) ); theorem Th4: :: GLIB_005:4 for G being real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G holds dom ((AP:CompSeq (EL,source)) . 0) = {source} proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G holds dom ((AP:CompSeq (EL,source)) . 0) = {source} let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G holds dom ((AP:CompSeq (EL,source)) . 0) = {source} let source be Vertex of G; ::_thesis: dom ((AP:CompSeq (EL,source)) . 0) = {source} (AP:CompSeq (EL,source)) . 0 = source .--> 1 by Def12; hence dom ((AP:CompSeq (EL,source)) . 0) = {source} by FUNCOP_1:13; ::_thesis: verum end; theorem Th5: :: GLIB_005:5 for G being real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G for i, j being Nat st i <= j holds dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G for i, j being Nat st i <= j holds dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G for i, j being Nat st i <= j holds dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) let source be Vertex of G; ::_thesis: for i, j being Nat st i <= j holds dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) let i, j be Nat; ::_thesis: ( i <= j implies dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) ) set CS = AP:CompSeq (EL,source); defpred S1[ Element of NAT ] means dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . (i + $1)); assume i <= j ; ::_thesis: dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) then consider k being Nat such that A1: j = i + k by NAT_1:10; A2: now__::_thesis:_for_n_being_Element_of_NAT_st_S1[n]_holds_ S1[n_+_1] let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) set Gn = (AP:CompSeq (EL,source)) . (i + n); set Gn1 = (AP:CompSeq (EL,source)) . (i + (n + 1)); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n))); (AP:CompSeq (EL,source)) . (i + (n + 1)) = (AP:CompSeq (EL,source)) . ((i + n) + 1) ; then A3: (AP:CompSeq (EL,source)) . (i + (n + 1)) = AP:Step ((AP:CompSeq (EL,source)) . (i + n)) by Def12; assume A4: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_S1[n_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) = {} or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)))) in dom ((AP:CompSeq (EL,source)) . (i + n)) ) or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)))) in dom ((AP:CompSeq (EL,source)) . (i + n)) ) ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) = {} ; ::_thesis: S1[n + 1] hence S1[n + 1] by A4, A3, Def10; ::_thesis: verum end; suppose ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)))) in dom ((AP:CompSeq (EL,source)) . (i + n)) ) ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (i + (n + 1)) = ((AP:CompSeq (EL,source)) . (i + n)) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n))))) by A3, Def10; then dom ((AP:CompSeq (EL,source)) . (i + n)) c= dom ((AP:CompSeq (EL,source)) . (i + (n + 1))) by FUNCT_4:10; hence S1[n + 1] by A4, XBOOLE_1:1; ::_thesis: verum end; suppose ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n)))) in dom ((AP:CompSeq (EL,source)) . (i + n)) ) ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (i + (n + 1)) = ((AP:CompSeq (EL,source)) . (i + n)) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (i + n))))) by A3, Def10; then dom ((AP:CompSeq (EL,source)) . (i + n)) c= dom ((AP:CompSeq (EL,source)) . (i + (n + 1))) by FUNCT_4:10; hence S1[n + 1] by A4, XBOOLE_1:1; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; A5: S1[ 0 ] ; A6: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A5, A2); k in NAT by ORDINAL1:def_12; hence dom ((AP:CompSeq (EL,source)) . i) c= dom ((AP:CompSeq (EL,source)) . j) by A6, A1; ::_thesis: verum end; definition let G be real-weighted WGraph; let EL be FF:ELabeling of G; let source be Vertex of G; func AP:FindAugPath (EL,source) -> AP:VLabeling of EL equals :: GLIB_005:def 13 (AP:CompSeq (EL,source)) .Result() ; coherence (AP:CompSeq (EL,source)) .Result() is AP:VLabeling of EL proof set CS = AP:CompSeq (EL,source); (AP:CompSeq (EL,source)) .Result() = (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) ; hence (AP:CompSeq (EL,source)) .Result() is AP:VLabeling of EL ; ::_thesis: verum end; end; :: deftheorem defines AP:FindAugPath GLIB_005:def_13_:_ for G being real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G holds AP:FindAugPath (EL,source) = (AP:CompSeq (EL,source)) .Result() ; theorem Th6: :: GLIB_005:6 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G holds AP:CompSeq (EL,source) is halting proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G holds AP:CompSeq (EL,source) is halting let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G holds AP:CompSeq (EL,source) is halting let source be Vertex of G; ::_thesis: AP:CompSeq (EL,source) is halting set CS = AP:CompSeq (EL,source); now__::_thesis:_not__for_n_being_Element_of_NAT_holds_(AP:CompSeq_(EL,source))_._n_<>_(AP:CompSeq_(EL,source))_._(n_+_1) set x = card (the_Vertices_of G); defpred S1[ Element of NAT ] means card (dom ((AP:CompSeq (EL,source)) . $1)) = $1 + 1; assume A1: for n being Element of NAT holds (AP:CompSeq (EL,source)) . n <> (AP:CompSeq (EL,source)) . (n + 1) ; ::_thesis: contradiction A2: now__::_thesis:_for_n_being_Element_of_NAT_st_S1[n]_holds_ S1[n_+_1] let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) set Gn = (AP:CompSeq (EL,source)) . n; set Gn1 = (AP:CompSeq (EL,source)) . (n + 1); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . n); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)); A3: (AP:CompSeq (EL,source)) . (n + 1) = AP:Step ((AP:CompSeq (EL,source)) . n) by Def12; assume A4: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_S1[n_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . n = (AP:CompSeq (EL,source)) . (n + 1) by A3, Def10; hence S1[n + 1] by A1; ::_thesis: verum end; supposeA5: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A3, Def10; then dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; hence S1[n + 1] by A4, A5, CARD_2:41; ::_thesis: verum end; supposeA6: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A3, Def10; then A7: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by A6, Def9; then not (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A6, Def6, Def7; hence S1[n + 1] by A4, A7, CARD_2:41; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; dom ((AP:CompSeq (EL,source)) . 0) = {source} by Th4; then A8: S1[ 0 ] by CARD_1:30; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A8, A2); then card (dom ((AP:CompSeq (EL,source)) . (card (the_Vertices_of G)))) = (card (the_Vertices_of G)) + 1 ; then 1 + (card (the_Vertices_of G)) <= (card (the_Vertices_of G)) + 0 by NAT_1:43; hence contradiction by XREAL_1:6; ::_thesis: verum end; hence AP:CompSeq (EL,source) is halting by GLIB_000:def_54; ::_thesis: verum end; theorem Th7: :: GLIB_005:7 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v let source be Vertex of G; ::_thesis: for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v let n be Nat; ::_thesis: for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . n) implies ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v ) set SG = the_Source_of G; set TG = the_Target_of G; set CS = AP:CompSeq (EL,source); set L = (AP:CompSeq (EL,source)) .Lifespan() ; set GL = (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()); set GL1 = (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + 1); defpred S1[ Element of NAT ] means for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . (n + $1)) . v; defpred S2[ Element of NAT ] means (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) = (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + $1); A1: AP:CompSeq (EL,source) is halting by Th6; A2: now__::_thesis:_for_k_being_Element_of_NAT_st_S2[k]_holds_ S2[k_+_1] let k be Element of NAT ; ::_thesis: ( S2[k] implies S2[k + 1] ) set Gn1 = (AP:CompSeq (EL,source)) . ((((AP:CompSeq (EL,source)) .Lifespan()) + k) + 1); assume S2[k] ; ::_thesis: S2[k + 1] then (AP:CompSeq (EL,source)) . ((((AP:CompSeq (EL,source)) .Lifespan()) + k) + 1) = AP:Step ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by Def12 .= (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + 1) by Def12 ; hence S2[k + 1] by A1, GLIB_000:def_55; ::_thesis: verum end; A3: S2[ 0 ] ; A4: for k being Element of NAT holds S2[k] from NAT_1:sch_1(A3, A2); now__::_thesis:_for_k_being_Element_of_NAT_st_S1[k]_holds_ S1[k_+_1] let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A5: S1[k] ; ::_thesis: S1[k + 1] set Gn = (AP:CompSeq (EL,source)) . (n + k); set Gn1 = (AP:CompSeq (EL,source)) . ((n + k) + 1); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))); A6: (AP:CompSeq (EL,source)) . ((n + k) + 1) = AP:Step ((AP:CompSeq (EL,source)) . (n + k)) by Def12; now__::_thesis:_S1[k_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) = {} or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) in dom ((AP:CompSeq (EL,source)) . (n + k)) ) or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) in dom ((AP:CompSeq (EL,source)) . (n + k)) ) ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) = {} ; ::_thesis: S1[k + 1] then (AP:CompSeq (EL,source)) . ((n + k) + 1) = (AP:CompSeq (EL,source)) . (n + k) by A6, Def10; hence S1[k + 1] by A5; ::_thesis: verum end; supposeA7: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) in dom ((AP:CompSeq (EL,source)) . (n + k)) ) ; ::_thesis: S1[k + 1] then A8: (AP:CompSeq (EL,source)) . ((n + k) + 1) = ((AP:CompSeq (EL,source)) . (n + k)) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))))) by A6, Def10; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._n)_holds_ ((AP:CompSeq_(EL,source))_._n)_._v_=_((AP:CompSeq_(EL,source))_._((n_+_k)_+_1))_._v let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . n) implies ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v ) assume A9: v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v then A10: ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . (n + k)) . v by A5; dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + k)) by Th5, NAT_1:11; then v <> (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) by A7, A9; hence ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v by A8, A10, Lm4; ::_thesis: verum end; hence S1[k + 1] ; ::_thesis: verum end; supposeA11: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) in dom ((AP:CompSeq (EL,source)) . (n + k)) ) ; ::_thesis: S1[k + 1] then A12: ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))) is_forward_edge_wrt (AP:CompSeq (EL,source)) . (n + k) or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))) is_backward_edge_wrt (AP:CompSeq (EL,source)) . (n + k) ) by Def9; A13: (AP:CompSeq (EL,source)) . ((n + k) + 1) = ((AP:CompSeq (EL,source)) . (n + k)) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k))))) by A6, A11, Def10; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._n)_holds_ ((AP:CompSeq_(EL,source))_._n)_._v_=_((AP:CompSeq_(EL,source))_._((n_+_k)_+_1))_._v let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . n) implies ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v ) assume A14: v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v then A15: ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . (n + k)) . v by A5; dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + k)) by Th5, NAT_1:11; then v <> (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . (n + k)))) by A11, A12, A14, Def6, Def7; hence ((AP:CompSeq (EL,source)) . n) . v = ((AP:CompSeq (EL,source)) . ((n + k) + 1)) . v by A13, A15, Lm4; ::_thesis: verum end; hence S1[k + 1] ; ::_thesis: verum end; end; end; hence S1[k + 1] ; ::_thesis: verum end; then A16: for k being Element of NAT st S1[k] holds S1[k + 1] ; A17: S1[ 0 ] ; A18: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A17, A16); assume A19: v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v now__::_thesis:_((AP:CompSeq_(EL,source))_._n)_._v_=_(AP:FindAugPath_(EL,source))_._v percases ( n <= (AP:CompSeq (EL,source)) .Lifespan() or (AP:CompSeq (EL,source)) .Lifespan() < n ) ; suppose n <= (AP:CompSeq (EL,source)) .Lifespan() ; ::_thesis: ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v then consider k being Nat such that A20: n + k = (AP:CompSeq (EL,source)) .Lifespan() by NAT_1:10; reconsider k = k as Element of NAT by ORDINAL1:def_12; n + k = (AP:CompSeq (EL,source)) .Lifespan() by A20; hence ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v by A19, A18; ::_thesis: verum end; suppose (AP:CompSeq (EL,source)) .Lifespan() < n ; ::_thesis: ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v then consider k being Nat such that A21: ((AP:CompSeq (EL,source)) .Lifespan()) + k = n by NAT_1:10; reconsider k = k as Element of NAT by ORDINAL1:def_12; ((AP:CompSeq (EL,source)) .Lifespan()) + k = n by A21; hence ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v by A4; ::_thesis: verum end; end; end; hence ((AP:CompSeq (EL,source)) . n) . v = (AP:FindAugPath (EL,source)) . v ; ::_thesis: verum end; definition let G be finite real-weighted WGraph; let EL be FF:ELabeling of G; let source, sink be Vertex of G; func AP:GetAugPath (EL,source,sink) -> vertex-distinct Path of G means :Def14: :: GLIB_005:def 14 ( it is_Walk_from source,sink & it is_augmenting_wrt EL & ( for n being even Nat st n in dom it holds it . n = (AP:FindAugPath (EL,source)) . (it . (n + 1)) ) ) if sink in dom (AP:FindAugPath (EL,source)) otherwise it = G .walkOf source; existence ( ( sink in dom (AP:FindAugPath (EL,source)) implies ex b1 being vertex-distinct Path of G st ( b1 is_Walk_from source,sink & b1 is_augmenting_wrt EL & ( for n being even Nat st n in dom b1 holds b1 . n = (AP:FindAugPath (EL,source)) . (b1 . (n + 1)) ) ) ) & ( not sink in dom (AP:FindAugPath (EL,source)) implies ex b1 being vertex-distinct Path of G st b1 = G .walkOf source ) ) proof set CS = AP:CompSeq (EL,source); set FAP = AP:FindAugPath (EL,source); defpred S1[ Nat] means for v being set st v in dom ((AP:CompSeq (EL,source)) . $1) holds ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . $1) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 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 A1: S1[n] ; ::_thesis: S1[n + 1] set Gn = (AP:CompSeq (EL,source)) . n; set Gn1 = (AP:CompSeq (EL,source)) . (n + 1); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . n); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)); A2: (AP:CompSeq (EL,source)) . (n + 1) = AP:Step ((AP:CompSeq (EL,source)) . n) by Def12; now__::_thesis:_S1[n_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (n + 1) = (AP:CompSeq (EL,source)) . n by A2, Def10; hence S1[n + 1] by A1; ::_thesis: verum end; supposeA3: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] then A4: ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by Def9; then A5: 0 < EL . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A3, Def6, Def7; A6: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) in AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) by A3; A7: (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A2, A3, Def10; then A8: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; A9: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A3, A4, Def6, Def7; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_holds_ ex_P_being_vertex-distinct_Path_of_G_st_ (_P_is_Walk_from_source,v_&_P_is_augmenting_wrt_EL_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_P_holds_ P_._n_=_(AP:FindAugPath_(EL,source))_._(P_._(n_+_1))_)_) let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) implies ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ) assume A10: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) now__::_thesis:_ex_P_being_vertex-distinct_Path_of_G_st_ (_P_is_Walk_from_source,v_&_P_is_augmenting_wrt_EL_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_P_holds_ P_._n_=_(AP:FindAugPath_(EL,source))_._(P_._(n_+_1))_)_) percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A8, A10, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) then consider P being vertex-distinct Path of G such that A11: P is_Walk_from source,v and A12: P is_augmenting_wrt EL and A13: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) and A14: for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) by A1; take P = P; ::_thesis: ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by Th5, NAT_1:11; hence ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) by A11, A12, A13, A14, XBOOLE_1:1; ::_thesis: verum end; supposeA15: v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) then A16: v = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; now__::_thesis:_ex_W2_being_vertex-distinct_Walk_of_G_st_ (_W2_is_Walk_from_source,v_&_W2_is_augmenting_wrt_EL_&_W2_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_W2_holds_ W2_._n_=_(AP:FindAugPath_(EL,source))_._(W2_._(n_+_1))_)_) consider W being vertex-distinct Path of G such that A17: W is_Walk_from source,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) and A18: W is_augmenting_wrt EL and A19: W .vertices() c= dom ((AP:CompSeq (EL,source)) . n) and A20: for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) by A1, A9; set W2 = W .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); A21: W .last() = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A17, GLIB_001:def_23; then A22: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins W .last() ,(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by A6, GLIB_000:def_13; A23: not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in W .vertices() by A3, A19; then reconsider W2 = W .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) as vertex-distinct Walk of G by A22, GLIB_001:155; take W2 = W2; ::_thesis: ( W2 is_Walk_from source,v & W2 is_augmenting_wrt EL & W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) W .first() = source by A17, GLIB_001:def_23; hence W2 is_Walk_from source,v by A16, A22, GLIB_001:63; ::_thesis: ( W2 is_augmenting_wrt EL & W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) DJoins (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),W .last() ,G by A6, A21, GLIB_000:def_14; hence W2 is_augmenting_wrt EL by A5, A18, A23, Th3; ::_thesis: ( W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) A24: W2 .vertices() = (W .vertices()) \/ {v} by A16, A22, GLIB_001:95; now__::_thesis:_for_x_being_set_st_x_in_W2_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in W2 .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume A25: x in W2 .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) percases ( x in W .vertices() or x in {v} ) by A24, A25, XBOOLE_0:def_3; supposeA26: x in W .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) A27: dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by Th5, NAT_1:11; x in dom ((AP:CompSeq (EL,source)) . n) by A19, A26; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A27; ::_thesis: verum end; suppose x in {v} ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A8, A16, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: verum end; hence W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) let n be even Nat; ::_thesis: ( n in dom W2 implies W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) assume A28: n in dom W2 ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) then A29: n <= len W2 by FINSEQ_3:25; A30: 1 <= n by A28, FINSEQ_3:25; now__::_thesis:_W2_._n_=_(AP:FindAugPath_(EL,source))_._(W2_._(n_+_1)) percases ( n <= len W or n > len W ) ; supposeA31: n <= len W ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) then n < len W by XXREAL_0:1; then A32: n + 1 <= len W by NAT_1:13; 1 <= 1 + n by NAT_1:11; then n + 1 in dom W by A32, FINSEQ_3:25; then A33: W2 . (n + 1) = W . (n + 1) by A22, GLIB_001:65; A34: n in dom W by A30, A31, FINSEQ_3:25; then W2 . n = W . n by A22, GLIB_001:65; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) by A20, A34, A33; ::_thesis: verum end; supposeA35: n > len W ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) n <= (len W) + (2 * 1) by A22, A29, GLIB_001:64; then n < ((len W) + 1) + 1 by XXREAL_0:1; then A36: n <= (len W) + 1 by NAT_1:13; (len W) + 1 <= n by A35, NAT_1:13; then A37: n = (len W) + 1 by A36, XXREAL_0:1; then A38: W2 . n = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A22, GLIB_001:65; n + 1 = (len W) + (1 + 1) by A37; then A39: W2 . (n + 1) = v by A16, A22, GLIB_001:65; A40: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A8, A15, XBOOLE_0:def_3; ((AP:CompSeq (EL,source)) . (n + 1)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A7, A16, Lm3; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) by A38, A39, A40, Th7; ::_thesis: verum end; end; end; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ; ::_thesis: verum end; hence ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ; ::_thesis: verum end; end; end; hence ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; supposeA41: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] then A42: (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A2, Def10; then A43: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; A44: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) in AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) by A41; A45: ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by A41, Def9; then A46: EL . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) < (the_Weight_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A41, Def6, Def7; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_holds_ ex_P_being_vertex-distinct_Path_of_G_st_ (_P_is_Walk_from_source,v_&_P_is_augmenting_wrt_EL_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_P_holds_ P_._n_=_(AP:FindAugPath_(EL,source))_._(P_._(n_+_1))_)_) let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) implies ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ) assume A47: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) now__::_thesis:_ex_P_being_vertex-distinct_Path_of_G_st_ (_P_is_Walk_from_source,v_&_P_is_augmenting_wrt_EL_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_P_holds_ P_._n_=_(AP:FindAugPath_(EL,source))_._(P_._(n_+_1))_)_) percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A43, A47, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) then consider P being vertex-distinct Path of G such that A48: P is_Walk_from source,v and A49: P is_augmenting_wrt EL and A50: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) and A51: for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) by A1; take P = P; ::_thesis: ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by Th5, NAT_1:11; hence ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) by A48, A49, A50, A51, XBOOLE_1:1; ::_thesis: verum end; supposeA52: v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) then A53: v = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; now__::_thesis:_ex_W2_being_vertex-distinct_Walk_of_G_st_ (_W2_is_Walk_from_source,v_&_W2_is_augmenting_wrt_EL_&_W2_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_(_for_n_being_even_Nat_st_n_in_dom_W2_holds_ W2_._n_=_(AP:FindAugPath_(EL,source))_._(W2_._(n_+_1))_)_) consider W being vertex-distinct Path of G such that A54: W is_Walk_from source,(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) and A55: W is_augmenting_wrt EL and A56: W .vertices() c= dom ((AP:CompSeq (EL,source)) . n) and A57: for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) by A1, A41; set W2 = W .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); A58: W .last() = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A54, GLIB_001:def_23; then A59: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins W .last() ,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by A44, GLIB_000:def_13; A60: not (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in W .vertices() by A41, A45, A56, Def6, Def7; then reconsider W2 = W .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) as vertex-distinct Walk of G by A59, GLIB_001:155; take W2 = W2; ::_thesis: ( W2 is_Walk_from source,v & W2 is_augmenting_wrt EL & W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) W .first() = source by A54, GLIB_001:def_23; hence W2 is_Walk_from source,v by A53, A59, GLIB_001:63; ::_thesis: ( W2 is_augmenting_wrt EL & W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) DJoins W .last() ,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by A44, A58, GLIB_000:def_14; hence W2 is_augmenting_wrt EL by A46, A55, A60, Th3; ::_thesis: ( W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) ) A61: W2 .vertices() = (W .vertices()) \/ {v} by A53, A59, GLIB_001:95; now__::_thesis:_for_x_being_set_st_x_in_W2_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in W2 .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume A62: x in W2 .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) percases ( x in W .vertices() or x in {v} ) by A61, A62, XBOOLE_0:def_3; supposeA63: x in W .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) A64: dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by Th5, NAT_1:11; x in dom ((AP:CompSeq (EL,source)) . n) by A56, A63; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A64; ::_thesis: verum end; suppose x in {v} ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A43, A53, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: verum end; hence W2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: for n being even Nat st n in dom W2 holds W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) let n be even Nat; ::_thesis: ( n in dom W2 implies W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ) assume A65: n in dom W2 ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) then A66: n <= len W2 by FINSEQ_3:25; A67: 1 <= n by A65, FINSEQ_3:25; now__::_thesis:_W2_._n_=_(AP:FindAugPath_(EL,source))_._(W2_._(n_+_1)) percases ( n <= len W or n > len W ) ; supposeA68: n <= len W ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) then n < len W by XXREAL_0:1; then A69: n + 1 <= len W by NAT_1:13; 1 <= 1 + n by NAT_1:11; then n + 1 in dom W by A69, FINSEQ_3:25; then A70: W2 . (n + 1) = W . (n + 1) by A59, GLIB_001:65; A71: n in dom W by A67, A68, FINSEQ_3:25; then W2 . n = W . n by A59, GLIB_001:65; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) by A57, A71, A70; ::_thesis: verum end; supposeA72: n > len W ; ::_thesis: W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) n <= (len W) + (2 * 1) by A59, A66, GLIB_001:64; then n < ((len W) + 1) + 1 by XXREAL_0:1; then A73: n <= (len W) + 1 by NAT_1:13; (len W) + 1 <= n by A72, NAT_1:13; then A74: n = (len W) + 1 by A73, XXREAL_0:1; then A75: W2 . n = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A59, GLIB_001:65; n + 1 = (len W) + (1 + 1) by A74; then A76: W2 . (n + 1) = v by A53, A59, GLIB_001:65; A77: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A43, A52, XBOOLE_0:def_3; ((AP:CompSeq (EL,source)) . (n + 1)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A42, A53, Lm3; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) by A75, A76, A77, Th7; ::_thesis: verum end; end; end; hence W2 . n = (AP:FindAugPath (EL,source)) . (W2 . (n + 1)) ; ::_thesis: verum end; hence ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ; ::_thesis: verum end; end; end; hence ex P being vertex-distinct Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; then A78: for n being Nat st S1[n] holds S1[n + 1] ; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._0)_holds_ ex_P_being_Walk_of_G_st_ (_P_is_Walk_from_source,v_&_P_is_augmenting_wrt_EL_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._0)_&_(_for_n_being_even_Nat_st_n_in_dom_P_holds_ P_._n_=_(AP:FindAugPath_(EL,source))_._(P_._(n_+_1))_)_) set P = G .walkOf source; let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . 0) implies ex P being Walk of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) ) assume A79: v in dom ((AP:CompSeq (EL,source)) . 0) ; ::_thesis: ex P being Walk of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) take P = G .walkOf source; ::_thesis: ( P is_Walk_from source,v & P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) v in {source} by A79, Th4; then v = source by TARSKI:def_1; hence P is_Walk_from source,v by GLIB_001:13; ::_thesis: ( P is_augmenting_wrt EL & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) thus P is_augmenting_wrt EL by Th1; ::_thesis: ( P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) & ( for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) ) P .vertices() = {source} by GLIB_001:90; hence P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) by Th4; ::_thesis: for n being even Nat st n in dom P holds P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) let n be even Nat; ::_thesis: ( n in dom P implies P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) ) assume A80: n in dom P ; ::_thesis: P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) then n <= len P by FINSEQ_3:25; then A81: n < len P by XXREAL_0:1; 1 <= n by A80, FINSEQ_3:25; hence P . n = (AP:FindAugPath (EL,source)) . (P . (n + 1)) by A81, GLIB_001:13; ::_thesis: verum end; then A82: S1[ 0 ] ; A83: for n being Nat holds S1[n] from NAT_1:sch_2(A82, A78); hereby ::_thesis: ( not sink in dom (AP:FindAugPath (EL,source)) implies ex b1 being vertex-distinct Path of G st b1 = G .walkOf source ) assume sink in dom (AP:FindAugPath (EL,source)) ; ::_thesis: ex W being vertex-distinct Path of G st ( W is_Walk_from source,sink & W is_augmenting_wrt EL & ( for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) ) ) then consider W being vertex-distinct Path of G such that A84: W is_Walk_from source,sink and A85: W is_augmenting_wrt EL and W .vertices() c= dom (AP:FindAugPath (EL,source)) and A86: for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) by A83; take W = W; ::_thesis: ( W is_Walk_from source,sink & W is_augmenting_wrt EL & ( for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) ) ) thus ( W is_Walk_from source,sink & W is_augmenting_wrt EL & ( for n being even Nat st n in dom W holds W . n = (AP:FindAugPath (EL,source)) . (W . (n + 1)) ) ) by A84, A85, A86; ::_thesis: verum end; thus ( not sink in dom (AP:FindAugPath (EL,source)) implies ex b1 being vertex-distinct Path of G st b1 = G .walkOf source ) ; ::_thesis: verum end; uniqueness for b1, b2 being vertex-distinct Path of G holds ( ( sink in dom (AP:FindAugPath (EL,source)) & b1 is_Walk_from source,sink & b1 is_augmenting_wrt EL & ( for n being even Nat st n in dom b1 holds b1 . n = (AP:FindAugPath (EL,source)) . (b1 . (n + 1)) ) & b2 is_Walk_from source,sink & b2 is_augmenting_wrt EL & ( for n being even Nat st n in dom b2 holds b2 . n = (AP:FindAugPath (EL,source)) . (b2 . (n + 1)) ) implies b1 = b2 ) & ( not sink in dom (AP:FindAugPath (EL,source)) & b1 = G .walkOf source & b2 = G .walkOf source implies b1 = b2 ) ) proof set FAP = AP:FindAugPath (EL,source); set CS = AP:CompSeq (EL,source); let IT1, IT2 be vertex-distinct Path of G; ::_thesis: ( ( sink in dom (AP:FindAugPath (EL,source)) & IT1 is_Walk_from source,sink & IT1 is_augmenting_wrt EL & ( for n being even Nat st n in dom IT1 holds IT1 . n = (AP:FindAugPath (EL,source)) . (IT1 . (n + 1)) ) & IT2 is_Walk_from source,sink & IT2 is_augmenting_wrt EL & ( for n being even Nat st n in dom IT2 holds IT2 . n = (AP:FindAugPath (EL,source)) . (IT2 . (n + 1)) ) implies IT1 = IT2 ) & ( not sink in dom (AP:FindAugPath (EL,source)) & IT1 = G .walkOf source & IT2 = G .walkOf source implies IT1 = IT2 ) ) defpred S1[ Nat] means for v being set for P1, P2 being vertex-distinct Path of G st v in dom ((AP:CompSeq (EL,source)) . $1) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) holds P1 = P2; set G0 = (AP:CompSeq (EL,source)) . 0; 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 A87: S1[n] ; ::_thesis: S1[n + 1] set Gn = (AP:CompSeq (EL,source)) . n; set Gn1 = (AP:CompSeq (EL,source)) . (n + 1); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . n); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)); A88: (AP:CompSeq (EL,source)) . (n + 1) = AP:Step ((AP:CompSeq (EL,source)) . n) by Def12; now__::_thesis:_S1[n_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) or ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (n + 1) = (AP:CompSeq (EL,source)) . n by A88, Def10; hence S1[n + 1] by A87; ::_thesis: verum end; supposeA89: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] source in {source} by TARSKI:def_1; then A90: source in dom ((AP:CompSeq (EL,source)) . 0) by Th4; dom ((AP:CompSeq (EL,source)) . 0) c= dom ((AP:CompSeq (EL,source)) . n) by Th5; then A91: source in dom ((AP:CompSeq (EL,source)) . n) by A90; ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by A89, Def9; then A92: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A89, Def6, Def7; A93: (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A88, A89, Def10; then A94: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; now__::_thesis:_for_v_being_set_ for_P1,_P2_being_vertex-distinct_Path_of_G_st_v_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_P1_is_Walk_from_source,v_&_P1_is_augmenting_wrt_EL_&_P2_is_Walk_from_source,v_&_P2_is_augmenting_wrt_EL_&_(_for_n_being_even_Nat_st_n_in_dom_P1_holds_ P1_._n_=_(AP:FindAugPath_(EL,source))_._(P1_._(n_+_1))_)_&_(_for_n_being_even_Nat_st_n_in_dom_P2_holds_ P2_._n_=_(AP:FindAugPath_(EL,source))_._(P2_._(n_+_1))_)_holds_ P1_=_P2 let v be set ; ::_thesis: for P1, P2 being vertex-distinct Path of G st v in dom ((AP:CompSeq (EL,source)) . (n + 1)) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) holds P1 = P2 let P1, P2 be vertex-distinct Path of G; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) implies P1 = P2 ) assume that A95: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) and A96: P1 is_Walk_from source,v and A97: P1 is_augmenting_wrt EL and A98: P2 is_Walk_from source,v and A99: P2 is_augmenting_wrt EL and A100: for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) and A101: for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ; ::_thesis: P1 = P2 A102: P1 . (len P1) = v by A96, GLIB_001:17; A103: P2 . 1 = source by A98, GLIB_001:17; A104: P2 . (len P2) = v by A98, GLIB_001:17; A105: P1 . 1 = source by A96, GLIB_001:17; now__::_thesis:_P1_=_P2 percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A94, A95, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: P1 = P2 hence P1 = P2 by A87, A96, A97, A98, A99, A100, A101; ::_thesis: verum end; supposeA106: v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: P1 = P2 then A107: v = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; then ((AP:CompSeq (EL,source)) . (n + 1)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A93, Lm3; then A108: (AP:FindAugPath (EL,source)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A95, Th7; A109: v <> source by A89, A91, A106, TARSKI:def_1; then P1 . 1 <> P1 .last() by A105, A102, GLIB_001:def_7; then P1 .first() <> P1 .last() by GLIB_001:def_6; then not P1 is trivial by GLIB_001:127; then A110: 3 <= len P1 by GLIB_001:125; P2 . 1 <> P2 .last() by A103, A104, A109, GLIB_001:def_7; then P2 .first() <> P2 .last() by GLIB_001:def_6; then not P2 is trivial by GLIB_001:127; then A111: 3 <= len P2 by GLIB_001:125; then A112: 3 - 2 < (len P2) - 0 by XREAL_1:15; 3 - 2 < (len P1) - 0 by A110, XREAL_1:15; then reconsider lenP11 = (len P1) - 1, lenP21 = (len P2) - 1 as even Element of NAT by A112, INT_1:5; A113: lenP11 < (len P1) - 0 by XREAL_1:15; 3 - 2 <= lenP11 by A110, XREAL_1:15; then A114: lenP11 in dom P1 by A113, FINSEQ_3:25; lenP11 + 1 = len P1 ; then A115: P1 . lenP11 = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A100, A102, A114, A108; then consider lenP12 being odd Element of NAT such that A116: lenP12 = lenP11 - 1 and lenP11 - 1 in dom P1 and lenP11 + 1 in dom P1 and A117: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins P1 . lenP12,v,G by A102, A114, GLIB_001:9; A118: P1 . lenP12 = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A89, A92, A107, A117, GLIB_000:def_13; set P1A = P1 .cut (((2 * 0) + 1),lenP12); A119: lenP12 < len P1 by A113, A116, XREAL_1:15; A120: now__::_thesis:_for_n_being_even_Nat_st_n_in_dom_(P1_.cut_(((2_*_0)_+_1),lenP12))_holds_ (P1_.cut_(((2_*_0)_+_1),lenP12))_._n_=_(AP:FindAugPath_(EL,source))_._((P1_.cut_(((2_*_0)_+_1),lenP12))_._(n_+_1)) let n be even Nat; ::_thesis: ( n in dom (P1 .cut (((2 * 0) + 1),lenP12)) implies (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) ) assume A121: n in dom (P1 .cut (((2 * 0) + 1),lenP12)) ; ::_thesis: (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) then A122: 1 <= n by FINSEQ_3:25; A123: n <= len (P1 .cut (((2 * 0) + 1),lenP12)) by A121, FINSEQ_3:25; then n < len (P1 .cut (((2 * 0) + 1),lenP12)) by XXREAL_0:1; then A124: n + 1 <= len (P1 .cut (((2 * 0) + 1),lenP12)) by NAT_1:13; 1 <= n + 1 by A121, NAT_1:13; then n + 1 in dom (P1 .cut (((2 * 0) + 1),lenP12)) by A124, FINSEQ_3:25; then A125: (P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1) = P1 . (n + 1) by A119, GLIB_001:46; len (P1 .cut (((2 * 0) + 1),lenP12)) = lenP12 by A119, GLIB_001:45; then n <= len P1 by A119, A123, XXREAL_0:2; then A126: n in dom P1 by A122, FINSEQ_3:25; (P1 .cut (((2 * 0) + 1),lenP12)) . n = P1 . n by A119, A121, GLIB_001:46; hence (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) by A100, A125, A126; ::_thesis: verum end; A127: lenP12 + (1 + 1) = len P1 by A116; lenP12 + 1 = lenP11 by A116; then A128: P1 .cut (lenP12,(len P1)) = G .walkOf (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v) by A102, A115, A118, A119, A127, GLIB_001:40; A129: P1 .cut (((2 * 0) + 1),lenP12) is_augmenting_wrt EL by A97, Th2; A130: 1 <= lenP12 by ABIAN:12; then A131: (P1 .cut (((2 * 0) + 1),lenP12)) .append (P1 .cut (lenP12,(len P1))) = P1 .cut (((2 * 0) + 1),(len P1)) by A119, GLIB_001:38 .= P1 by GLIB_001:39 ; A132: lenP21 < (len P2) - 0 by XREAL_1:15; 3 - 2 <= lenP21 by A111, XREAL_1:15; then A133: lenP21 in dom P2 by A132, FINSEQ_3:25; lenP21 + 1 = len P2 ; then A134: P2 . lenP21 = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A101, A104, A133, A108; then consider lenP22 being odd Element of NAT such that A135: lenP22 = lenP21 - 1 and lenP21 - 1 in dom P2 and lenP21 + 1 in dom P2 and A136: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins P2 . lenP22,v,G by A104, A133, GLIB_001:9; A137: lenP22 + (1 + 1) = len P2 by A135; set P2A = P2 .cut (((2 * 0) + 1),lenP22); A138: lenP22 < len P2 by A132, A135, XREAL_1:15; A139: now__::_thesis:_for_n_being_even_Nat_st_n_in_dom_(P2_.cut_(((2_*_0)_+_1),lenP22))_holds_ (P2_.cut_(((2_*_0)_+_1),lenP22))_._n_=_(AP:FindAugPath_(EL,source))_._((P2_.cut_(((2_*_0)_+_1),lenP22))_._(n_+_1)) let n be even Nat; ::_thesis: ( n in dom (P2 .cut (((2 * 0) + 1),lenP22)) implies (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) ) assume A140: n in dom (P2 .cut (((2 * 0) + 1),lenP22)) ; ::_thesis: (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) then A141: 1 <= n by FINSEQ_3:25; A142: n <= len (P2 .cut (((2 * 0) + 1),lenP22)) by A140, FINSEQ_3:25; then n < len (P2 .cut (((2 * 0) + 1),lenP22)) by XXREAL_0:1; then A143: n + 1 <= len (P2 .cut (((2 * 0) + 1),lenP22)) by NAT_1:13; 1 <= n + 1 by A140, NAT_1:13; then n + 1 in dom (P2 .cut (((2 * 0) + 1),lenP22)) by A143, FINSEQ_3:25; then A144: (P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1) = P2 . (n + 1) by A138, GLIB_001:46; len (P2 .cut (((2 * 0) + 1),lenP22)) = lenP22 by A138, GLIB_001:45; then n <= len P2 by A138, A142, XXREAL_0:2; then A145: n in dom P2 by A141, FINSEQ_3:25; (P2 .cut (((2 * 0) + 1),lenP22)) . n = P2 . n by A138, A140, GLIB_001:46; hence (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) by A101, A144, A145; ::_thesis: verum end; A146: 1 <= lenP22 by ABIAN:12; then A147: (P2 .cut (((2 * 0) + 1),lenP22)) .append (P2 .cut (lenP22,(len P2))) = P2 .cut (((2 * 0) + 1),(len P2)) by A138, GLIB_001:38 .= P2 by GLIB_001:39 ; A148: P2 . lenP22 = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A89, A92, A107, A136, GLIB_000:def_13; then A149: P2 .cut (((2 * 0) + 1),lenP22) is_Walk_from source,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A103, A146, A138, GLIB_001:37; lenP22 + 1 = lenP21 by A135; then A150: P2 .cut (lenP22,(len P2)) = G .walkOf (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v) by A104, A134, A148, A138, A137, GLIB_001:40; A151: P2 .cut (((2 * 0) + 1),lenP22) is_augmenting_wrt EL by A99, Th2; P1 .cut (((2 * 0) + 1),lenP12) is_Walk_from source,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A105, A118, A130, A119, GLIB_001:37; hence P1 = P2 by A87, A92, A149, A129, A151, A120, A139, A128, A150, A131, A147; ::_thesis: verum end; end; end; hence P1 = P2 ; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; supposeA152: ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} & (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: S1[n + 1] source in {source} by TARSKI:def_1; then A153: source in dom ((AP:CompSeq (EL,source)) . 0) by Th4; dom ((AP:CompSeq (EL,source)) . 0) c= dom ((AP:CompSeq (EL,source)) . n) by Th5; then A154: source in dom ((AP:CompSeq (EL,source)) . n) by A153; ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by A152, Def9; then A155: not (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A152, Def6, Def7; A156: (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A88, A152, Def10; then A157: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; now__::_thesis:_for_v_being_set_ for_P1,_P2_being_vertex-distinct_Path_of_G_st_v_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_&_P1_is_Walk_from_source,v_&_P1_is_augmenting_wrt_EL_&_P2_is_Walk_from_source,v_&_P2_is_augmenting_wrt_EL_&_(_for_n_being_even_Nat_st_n_in_dom_P1_holds_ P1_._n_=_(AP:FindAugPath_(EL,source))_._(P1_._(n_+_1))_)_&_(_for_n_being_even_Nat_st_n_in_dom_P2_holds_ P2_._n_=_(AP:FindAugPath_(EL,source))_._(P2_._(n_+_1))_)_holds_ P1_=_P2 let v be set ; ::_thesis: for P1, P2 being vertex-distinct Path of G st v in dom ((AP:CompSeq (EL,source)) . (n + 1)) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) holds P1 = P2 let P1, P2 be vertex-distinct Path of G; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) implies P1 = P2 ) assume that A158: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) and A159: P1 is_Walk_from source,v and A160: P1 is_augmenting_wrt EL and A161: P2 is_Walk_from source,v and A162: P2 is_augmenting_wrt EL and A163: for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) and A164: for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ; ::_thesis: P1 = P2 A165: P1 . (len P1) = v by A159, GLIB_001:17; A166: P2 . 1 = source by A161, GLIB_001:17; A167: P2 . (len P2) = v by A161, GLIB_001:17; A168: P1 . 1 = source by A159, GLIB_001:17; now__::_thesis:_P1_=_P2 percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A157, A158, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: P1 = P2 hence P1 = P2 by A87, A159, A160, A161, A162, A163, A164; ::_thesis: verum end; supposeA169: v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: P1 = P2 then A170: v = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; then ((AP:CompSeq (EL,source)) . (n + 1)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A156, Lm3; then A171: (AP:FindAugPath (EL,source)) . v = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A158, Th7; A172: v <> source by A155, A154, A169, TARSKI:def_1; then P1 . 1 <> P1 .last() by A168, A165, GLIB_001:def_7; then P1 .first() <> P1 .last() by GLIB_001:def_6; then not P1 is trivial by GLIB_001:127; then A173: 3 <= len P1 by GLIB_001:125; P2 . 1 <> P2 .last() by A166, A167, A172, GLIB_001:def_7; then P2 .first() <> P2 .last() by GLIB_001:def_6; then not P2 is trivial by GLIB_001:127; then A174: 3 <= len P2 by GLIB_001:125; then A175: 3 - 2 < (len P2) - 0 by XREAL_1:15; 3 - 2 < (len P1) - 0 by A173, XREAL_1:15; then reconsider lenP11 = (len P1) - 1, lenP21 = (len P2) - 1 as even Element of NAT by A175, INT_1:5; A176: lenP11 < (len P1) - 0 by XREAL_1:15; 3 - 2 <= lenP11 by A173, XREAL_1:15; then A177: lenP11 in dom P1 by A176, FINSEQ_3:25; lenP11 + 1 = len P1 ; then A178: P1 . lenP11 = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A163, A165, A177, A171; then consider lenP12 being odd Element of NAT such that A179: lenP12 = lenP11 - 1 and lenP11 - 1 in dom P1 and lenP11 + 1 in dom P1 and A180: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins P1 . lenP12,v,G by A165, A177, GLIB_001:9; A181: P1 . lenP12 = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A152, A155, A170, A180, GLIB_000:def_13; set P1A = P1 .cut (((2 * 0) + 1),lenP12); A182: lenP12 < len P1 by A176, A179, XREAL_1:15; A183: now__::_thesis:_for_n_being_even_Nat_st_n_in_dom_(P1_.cut_(((2_*_0)_+_1),lenP12))_holds_ (P1_.cut_(((2_*_0)_+_1),lenP12))_._n_=_(AP:FindAugPath_(EL,source))_._((P1_.cut_(((2_*_0)_+_1),lenP12))_._(n_+_1)) let n be even Nat; ::_thesis: ( n in dom (P1 .cut (((2 * 0) + 1),lenP12)) implies (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) ) assume A184: n in dom (P1 .cut (((2 * 0) + 1),lenP12)) ; ::_thesis: (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) then A185: 1 <= n by FINSEQ_3:25; A186: n <= len (P1 .cut (((2 * 0) + 1),lenP12)) by A184, FINSEQ_3:25; then n < len (P1 .cut (((2 * 0) + 1),lenP12)) by XXREAL_0:1; then A187: n + 1 <= len (P1 .cut (((2 * 0) + 1),lenP12)) by NAT_1:13; 1 <= n + 1 by A184, NAT_1:13; then n + 1 in dom (P1 .cut (((2 * 0) + 1),lenP12)) by A187, FINSEQ_3:25; then A188: (P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1) = P1 . (n + 1) by A182, GLIB_001:46; len (P1 .cut (((2 * 0) + 1),lenP12)) = lenP12 by A182, GLIB_001:45; then n <= len P1 by A182, A186, XXREAL_0:2; then A189: n in dom P1 by A185, FINSEQ_3:25; (P1 .cut (((2 * 0) + 1),lenP12)) . n = P1 . n by A182, A184, GLIB_001:46; hence (P1 .cut (((2 * 0) + 1),lenP12)) . n = (AP:FindAugPath (EL,source)) . ((P1 .cut (((2 * 0) + 1),lenP12)) . (n + 1)) by A163, A188, A189; ::_thesis: verum end; A190: lenP12 + (1 + 1) = len P1 by A179; lenP12 + 1 = lenP11 by A179; then A191: P1 .cut (lenP12,(len P1)) = G .walkOf (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v) by A165, A178, A181, A182, A190, GLIB_001:40; A192: P1 .cut (((2 * 0) + 1),lenP12) is_augmenting_wrt EL by A160, Th2; A193: 1 <= lenP12 by ABIAN:12; then A194: (P1 .cut (((2 * 0) + 1),lenP12)) .append (P1 .cut (lenP12,(len P1))) = P1 .cut (((2 * 0) + 1),(len P1)) by A182, GLIB_001:38 .= P1 by GLIB_001:39 ; A195: lenP21 < (len P2) - 0 by XREAL_1:15; 3 - 2 <= lenP21 by A174, XREAL_1:15; then A196: lenP21 in dom P2 by A195, FINSEQ_3:25; lenP21 + 1 = len P2 ; then A197: P2 . lenP21 = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A164, A167, A196, A171; then consider lenP22 being odd Element of NAT such that A198: lenP22 = lenP21 - 1 and lenP21 - 1 in dom P2 and lenP21 + 1 in dom P2 and A199: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins P2 . lenP22,v,G by A167, A196, GLIB_001:9; A200: lenP22 + (1 + 1) = len P2 by A198; set P2A = P2 .cut (((2 * 0) + 1),lenP22); A201: lenP22 < len P2 by A195, A198, XREAL_1:15; A202: now__::_thesis:_for_n_being_even_Nat_st_n_in_dom_(P2_.cut_(((2_*_0)_+_1),lenP22))_holds_ (P2_.cut_(((2_*_0)_+_1),lenP22))_._n_=_(AP:FindAugPath_(EL,source))_._((P2_.cut_(((2_*_0)_+_1),lenP22))_._(n_+_1)) let n be even Nat; ::_thesis: ( n in dom (P2 .cut (((2 * 0) + 1),lenP22)) implies (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) ) assume A203: n in dom (P2 .cut (((2 * 0) + 1),lenP22)) ; ::_thesis: (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) then A204: 1 <= n by FINSEQ_3:25; A205: n <= len (P2 .cut (((2 * 0) + 1),lenP22)) by A203, FINSEQ_3:25; then n < len (P2 .cut (((2 * 0) + 1),lenP22)) by XXREAL_0:1; then A206: n + 1 <= len (P2 .cut (((2 * 0) + 1),lenP22)) by NAT_1:13; 1 <= n + 1 by A203, NAT_1:13; then n + 1 in dom (P2 .cut (((2 * 0) + 1),lenP22)) by A206, FINSEQ_3:25; then A207: (P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1) = P2 . (n + 1) by A201, GLIB_001:46; len (P2 .cut (((2 * 0) + 1),lenP22)) = lenP22 by A201, GLIB_001:45; then n <= len P2 by A201, A205, XXREAL_0:2; then A208: n in dom P2 by A204, FINSEQ_3:25; (P2 .cut (((2 * 0) + 1),lenP22)) . n = P2 . n by A201, A203, GLIB_001:46; hence (P2 .cut (((2 * 0) + 1),lenP22)) . n = (AP:FindAugPath (EL,source)) . ((P2 .cut (((2 * 0) + 1),lenP22)) . (n + 1)) by A164, A207, A208; ::_thesis: verum end; A209: 1 <= lenP22 by ABIAN:12; then A210: (P2 .cut (((2 * 0) + 1),lenP22)) .append (P2 .cut (lenP22,(len P2))) = P2 .cut (((2 * 0) + 1),(len P2)) by A201, GLIB_001:38 .= P2 by GLIB_001:39 ; A211: P2 . lenP22 = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A152, A155, A170, A199, GLIB_000:def_13; then A212: P2 .cut (((2 * 0) + 1),lenP22) is_Walk_from source,(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A166, A209, A201, GLIB_001:37; lenP22 + 1 = lenP21 by A198; then A213: P2 .cut (lenP22,(len P2)) = G .walkOf (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v) by A167, A197, A211, A201, A200, GLIB_001:40; A214: P2 .cut (((2 * 0) + 1),lenP22) is_augmenting_wrt EL by A162, Th2; P1 .cut (((2 * 0) + 1),lenP12) is_Walk_from source,(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A168, A181, A193, A182, GLIB_001:37; hence P1 = P2 by A87, A152, A212, A192, A214, A183, A202, A191, A213, A194, A210; ::_thesis: verum end; end; end; hence P1 = P2 ; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; then A215: for n being Nat st S1[n] holds S1[n + 1] ; now__::_thesis:_for_v_being_set_ for_P1,_P2_being_vertex-distinct_Path_of_G_st_v_in_dom_((AP:CompSeq_(EL,source))_._0)_&_P1_is_Walk_from_source,v_&_P1_is_augmenting_wrt_EL_&_P2_is_Walk_from_source,v_&_P2_is_augmenting_wrt_EL_&_(_for_n_being_even_Nat_st_n_in_dom_P1_holds_ P1_._n_=_(AP:FindAugPath_(EL,source))_._(P1_._(n_+_1))_)_&_(_for_n_being_even_Nat_st_n_in_dom_P2_holds_ P2_._n_=_(AP:FindAugPath_(EL,source))_._(P2_._(n_+_1))_)_holds_ P1_=_P2 let v be set ; ::_thesis: for P1, P2 being vertex-distinct Path of G st v in dom ((AP:CompSeq (EL,source)) . 0) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) holds P1 = P2 let P1, P2 be vertex-distinct Path of G; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . 0) & P1 is_Walk_from source,v & P1 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 is_augmenting_wrt EL & ( for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) ) & ( for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ) implies P1 = P2 ) assume that A216: v in dom ((AP:CompSeq (EL,source)) . 0) and A217: P1 is_Walk_from source,v and P1 is_augmenting_wrt EL and A218: P2 is_Walk_from source,v and P2 is_augmenting_wrt EL and for n being even Nat st n in dom P1 holds P1 . n = (AP:FindAugPath (EL,source)) . (P1 . (n + 1)) and for n being even Nat st n in dom P2 holds P2 . n = (AP:FindAugPath (EL,source)) . (P2 . (n + 1)) ; ::_thesis: P1 = P2 v in {source} by A216, Th4; then A219: v = source by TARSKI:def_1; then A220: P1 . ((2 * 0) + 1) = v by A217, GLIB_001:17; A221: P2 . ((2 * 0) + 1) = v by A218, A219, GLIB_001:17; A222: 1 <= len P1 by ABIAN:12; P1 . (len P1) = v by A217, GLIB_001:17; then len P1 = 1 by A220, A222, GLIB_001:def_29; then A223: P1 = <*v*> by A220, FINSEQ_1:40; A224: 1 <= len P2 by ABIAN:12; P2 . (len P2) = v by A218, GLIB_001:17; then len P2 = 1 by A221, A224, GLIB_001:def_29; hence P1 = P2 by A221, A223, FINSEQ_1:40; ::_thesis: verum end; then A225: S1[ 0 ] ; for n being Nat holds S1[n] from NAT_1:sch_2(A225, A215); hence ( sink in dom (AP:FindAugPath (EL,source)) & IT1 is_Walk_from source,sink & IT1 is_augmenting_wrt EL & ( for n being even Nat st n in dom IT1 holds IT1 . n = (AP:FindAugPath (EL,source)) . (IT1 . (n + 1)) ) & IT2 is_Walk_from source,sink & IT2 is_augmenting_wrt EL & ( for n being even Nat st n in dom IT2 holds IT2 . n = (AP:FindAugPath (EL,source)) . (IT2 . (n + 1)) ) implies IT1 = IT2 ) ; ::_thesis: ( not sink in dom (AP:FindAugPath (EL,source)) & IT1 = G .walkOf source & IT2 = G .walkOf source implies IT1 = IT2 ) thus ( not sink in dom (AP:FindAugPath (EL,source)) & IT1 = G .walkOf source & IT2 = G .walkOf source implies IT1 = IT2 ) ; ::_thesis: verum end; consistency for b1 being vertex-distinct Path of G holds verum ; end; :: deftheorem Def14 defines AP:GetAugPath GLIB_005:def_14_:_ for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being Vertex of G for b5 being vertex-distinct Path of G holds ( ( sink in dom (AP:FindAugPath (EL,source)) implies ( b5 = AP:GetAugPath (EL,source,sink) iff ( b5 is_Walk_from source,sink & b5 is_augmenting_wrt EL & ( for n being even Nat st n in dom b5 holds b5 . n = (AP:FindAugPath (EL,source)) . (b5 . (n + 1)) ) ) ) ) & ( not sink in dom (AP:FindAugPath (EL,source)) implies ( b5 = AP:GetAugPath (EL,source,sink) iff b5 = G .walkOf source ) ) ); theorem Th8: :: GLIB_005:8 for G being real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) ) proof let G be real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) ) let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) ) let source be Vertex of G; ::_thesis: for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) ) set CS = AP:CompSeq (EL,source); set G0 = (AP:CompSeq (EL,source)) . 0; defpred S1[ Nat] means for v being set st v in dom ((AP:CompSeq (EL,source)) . $1) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . $1) ); A1: now__::_thesis:_for_n_being_Nat_st_S1[n]_holds_ S1[n_+_1] let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) set Gn = (AP:CompSeq (EL,source)) . n; set Gn1 = (AP:CompSeq (EL,source)) . (n + 1); set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . n); set e = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)); assume A2: S1[n] ; ::_thesis: S1[n + 1] A3: (AP:CompSeq (EL,source)) . (n + 1) = AP:Step ((AP:CompSeq (EL,source)) . n) by Def12; now__::_thesis:_S1[n_+_1] percases ( AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} or AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} ) ; suppose AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) = {} ; ::_thesis: S1[n + 1] then (AP:CompSeq (EL,source)) . (n + 1) = (AP:CompSeq (EL,source)) . n by A3, Def10; hence S1[n + 1] by A2; ::_thesis: verum end; supposeA4: AP:NextBestEdges ((AP:CompSeq (EL,source)) . n) <> {} ; ::_thesis: S1[n + 1] set se = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); set te = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_holds_ ex_P_being_Path_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_) percases ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ) by A4, Def9; supposeA5: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_forward_edge_wrt (AP:CompSeq (EL,source)) . n ; ::_thesis: for v being set st v in dom ((AP:CompSeq (EL,source)) . (n + 1)) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then A6: EL . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) < (the_Weight_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by Def6; let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) implies ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ) assume A7: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A8: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) in the_Edges_of G by A5, Def6; then A9: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) DJoins (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by GLIB_000:def_14; A10: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A5, Def6; then (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A3, A4, Def10; then A11: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by TARSKI:def_1; then A12: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A11, XBOOLE_0:def_3; A13: dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by A11, XBOOLE_1:7; then A14: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A10; now__::_thesis:_ex_P_being_Path_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_) percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A11, A7, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then consider P being Path of G such that A15: P is_augmenting_wrt EL and A16: P is_Walk_from source,v and A17: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) by A2; take P = P; ::_thesis: ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) by A13, A15, A16, A17, XBOOLE_1:1; ::_thesis: verum end; suppose v in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then A18: v = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; now__::_thesis:_ex_P_being_Walk_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_) percases ( (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = source or (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) <> source ) ; supposeA19: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = source ; ::_thesis: ex P being Walk of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) set P = G .walkOf (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))); take P = G .walkOf (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))); ::_thesis: ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A20: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by A8, GLIB_000:def_13; now__::_thesis:_for_n_being_odd_Nat_st_n_<_len_P_holds_ (_(_P_._(n_+_1)_DJoins_P_._n,P_._(n_+_2),G_implies_EL_._(P_._(n_+_1))_<_(the_Weight_of_G)_._(P_._(n_+_1))_)_&_(_not_P_._(n_+_1)_DJoins_P_._n,P_._(n_+_2),G_implies_0_<_EL_._(P_._(n_+_1))_)_) let n be odd Nat; ::_thesis: ( n < len P implies ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) ) ) assume n < len P ; ::_thesis: ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) ) then n < 2 + 1 by A20, GLIB_001:14; then n <= 2 * 1 by NAT_1:13; then n < 1 + 1 by XXREAL_0:1; then A21: n <= 1 by NAT_1:13; 1 <= n by ABIAN:12; then A22: n = 1 by A21, XXREAL_0:1; A23: P = <*((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))*> by A20, GLIB_001:def_5; then A24: P . n = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A22, FINSEQ_1:45; A25: P . (n + 2) = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A22, A23, FINSEQ_1:45; A26: P . (n + 1) = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A22, A23, FINSEQ_1:45; hence ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) by A5, Def6; ::_thesis: ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) assume not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: 0 < EL . (P . (n + 1)) hence 0 < EL . (P . (n + 1)) by A8, A24, A26, A25, GLIB_000:def_14; ::_thesis: verum end; hence P is_augmenting_wrt EL by Def8; ::_thesis: ( P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P is_Walk_from source,v by A18, A19, A20, GLIB_001:15; ::_thesis: P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_for_x_being_set_st_x_in_P_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in P .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume x in P .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then x in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by A20, GLIB_001:91; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A12, A14, TARSKI:def_2; ::_thesis: verum end; hence P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: verum end; supposeA27: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) <> source ; ::_thesis: ex P2 being Path of G st ( P2 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A28: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v,G by A8, A18, GLIB_000:def_13; consider P being Path of G such that A29: P is_augmenting_wrt EL and A30: P is_Walk_from source,(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) and A31: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) by A2, A10; set P2 = P .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); A32: not v in P .vertices() by A5, A18, A31, Def6; A33: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = P .last() by A30, GLIB_001:def_23; then P .first() <> P .last() by A27, A30, GLIB_001:def_23; then P is open by GLIB_001:def_24; then reconsider P2 = P .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) as Path of G by A28, A33, A32, GLIB_001:151; take P2 = P2; ::_thesis: ( P2 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P2 is_augmenting_wrt EL by A6, A9, A18, A29, A33, A32, Th3; ::_thesis: ( P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P2 is_Walk_from source,v by A30, A28, GLIB_001:66; ::_thesis: P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_for_x_being_set_st_x_in_P2_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in P2 .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume x in P2 .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then A34: x in (P .vertices()) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by A18, A28, A33, GLIB_001:95; now__::_thesis:_x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) percases ( x in P .vertices() or x in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A34, XBOOLE_0:def_3; suppose x in P .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then x in dom ((AP:CompSeq (EL,source)) . n) by A31; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A13; ::_thesis: verum end; suppose x in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A11, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: verum end; hence P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: verum end; end; end; hence ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ; ::_thesis: verum end; end; end; hence ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ; ::_thesis: verum end; supposeA35: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) is_backward_edge_wrt (AP:CompSeq (EL,source)) . n ; ::_thesis: for v being set st v in dom ((AP:CompSeq (EL,source)) . (n + 1)) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then A36: 0 < EL . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by Def7; let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . (n + 1)) implies ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ) assume A37: v in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A38: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) in the_Edges_of G by A35, Def7; then A39: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) DJoins (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by GLIB_000:def_14; A40: not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A35, Def7; then (AP:CompSeq (EL,source)) . (n + 1) = ((AP:CompSeq (EL,source)) . n) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))) by A3, A4, Def10; then A41: dom ((AP:CompSeq (EL,source)) . (n + 1)) = (dom ((AP:CompSeq (EL,source)) . n)) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by Lm1; (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by TARSKI:def_1; then A42: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A41, XBOOLE_0:def_3; A43: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . n) by A35, Def7; A44: dom ((AP:CompSeq (EL,source)) . n) c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by A41, XBOOLE_1:7; then A45: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A43; now__::_thesis:_ex_P_being_Path_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_) percases ( v in dom ((AP:CompSeq (EL,source)) . n) or v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A41, A37, XBOOLE_0:def_3; suppose v in dom ((AP:CompSeq (EL,source)) . n) ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then consider P being Path of G such that A46: P is_augmenting_wrt EL and A47: P is_Walk_from source,v and A48: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) by A2; take P = P; ::_thesis: ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) by A44, A46, A47, A48, XBOOLE_1:1; ::_thesis: verum end; suppose v in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) then A49: v = (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by TARSKI:def_1; now__::_thesis:_ex_P_being_Walk_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._(n_+_1))_) percases ( (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = source or (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) <> source ) ; supposeA50: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = source ; ::_thesis: ex P being Walk of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) set P = G .walkOf (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))); take P = G .walkOf (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))); ::_thesis: ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A51: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),(the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),G by A38, GLIB_000:def_13; now__::_thesis:_for_n_being_odd_Nat_st_n_<_len_P_holds_ (_(_P_._(n_+_1)_DJoins_P_._n,P_._(n_+_2),G_implies_EL_._(P_._(n_+_1))_<_(the_Weight_of_G)_._(P_._(n_+_1))_)_&_(_not_P_._(n_+_1)_DJoins_P_._n,P_._(n_+_2),G_implies_0_<_EL_._(P_._(n_+_1))_)_) let n be odd Nat; ::_thesis: ( n < len P implies ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) ) ) assume n < len P ; ::_thesis: ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) ) then n < 2 + 1 by A51, GLIB_001:14; then n <= 2 * 1 by NAT_1:13; then n < 1 + 1 by XXREAL_0:1; then A52: n <= 1 by NAT_1:13; 1 <= n by ABIAN:12; then A53: n = 1 by A52, XXREAL_0:1; A54: P = <*((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),(choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))*> by A51, GLIB_001:def_5; then A55: P . (n + 1) = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) by A53, FINSEQ_1:45; P . n = (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) by A53, A54, FINSEQ_1:45; hence ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . (P . (n + 1)) < (the_Weight_of G) . (P . (n + 1)) ) by A43, A40, A55, GLIB_000:def_14; ::_thesis: ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies 0 < EL . (P . (n + 1)) ) assume not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: 0 < EL . (P . (n + 1)) thus 0 < EL . (P . (n + 1)) by A35, A55, Def7; ::_thesis: verum end; hence P is_augmenting_wrt EL by Def8; ::_thesis: ( P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P is_Walk_from source,v by A49, A50, A51, GLIB_001:15; ::_thesis: P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_for_x_being_set_st_x_in_P_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in P .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume x in P .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then x in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)))),((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by A51, GLIB_001:91; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A42, A45, TARSKI:def_2; ::_thesis: verum end; hence P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: verum end; supposeA56: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) <> source ; ::_thesis: ex P2 being Path of G st ( P2 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) A57: choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n)) Joins (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))),v,G by A38, A49, GLIB_000:def_13; consider P being Path of G such that A58: P is_augmenting_wrt EL and A59: P is_Walk_from source,(the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) and A60: P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) by A2, A43; set P2 = P .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))); A61: not v in P .vertices() by A35, A49, A60, Def7; A62: (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) = P .last() by A59, GLIB_001:def_23; then P .first() <> P .last() by A56, A59, GLIB_001:def_23; then P is open by GLIB_001:def_24; then reconsider P2 = P .addEdge (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))) as Path of G by A57, A62, A61, GLIB_001:151; take P2 = P2; ::_thesis: ( P2 is_augmenting_wrt EL & P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P2 is_augmenting_wrt EL by A36, A39, A49, A58, A62, A61, Th3; ::_thesis: ( P2 is_Walk_from source,v & P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) thus P2 is_Walk_from source,v by A59, A57, GLIB_001:66; ::_thesis: P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) now__::_thesis:_for_x_being_set_st_x_in_P2_.vertices()_holds_ x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) let x be set ; ::_thesis: ( x in P2 .vertices() implies x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ) assume x in P2 .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then A63: x in (P .vertices()) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} by A49, A57, A62, GLIB_001:95; now__::_thesis:_x_in_dom_((AP:CompSeq_(EL,source))_._(n_+_1)) percases ( x in P .vertices() or x in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ) by A63, XBOOLE_0:def_3; suppose x in P .vertices() ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) then x in dom ((AP:CompSeq (EL,source)) . n) by A60; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A44; ::_thesis: verum end; suppose x in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . n))))} ; ::_thesis: x in dom ((AP:CompSeq (EL,source)) . (n + 1)) hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) by A41, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence x in dom ((AP:CompSeq (EL,source)) . (n + 1)) ; ::_thesis: verum end; hence P2 .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) by TARSKI:def_3; ::_thesis: verum end; end; end; hence ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ; ::_thesis: verum end; end; end; hence ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . (n + 1)) ) ; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; now__::_thesis:_for_v_being_set_st_v_in_dom_((AP:CompSeq_(EL,source))_._0)_holds_ ex_P_being_Walk_of_G_st_ (_P_is_augmenting_wrt_EL_&_P_is_Walk_from_source,v_&_P_.vertices()_c=_dom_((AP:CompSeq_(EL,source))_._0)_) let v be set ; ::_thesis: ( v in dom ((AP:CompSeq (EL,source)) . 0) implies ex P being Walk of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) ) ) assume A64: v in dom ((AP:CompSeq (EL,source)) . 0) ; ::_thesis: ex P being Walk of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) ) then reconsider v9 = v as Vertex of G ; set P = G .walkOf v9; take P = G .walkOf v9; ::_thesis: ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) ) thus P is_augmenting_wrt EL by Th1; ::_thesis: ( P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) ) v in {source} by A64, Th4; then v = source by TARSKI:def_1; hence P is_Walk_from source,v by GLIB_001:13; ::_thesis: P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) P .vertices() = {v9} by GLIB_001:90; hence P .vertices() c= dom ((AP:CompSeq (EL,source)) . 0) by A64, ZFMISC_1:31; ::_thesis: verum end; then A65: S1[ 0 ] ; for n being Nat holds S1[n] from NAT_1:sch_2(A65, A1); hence for n being Nat for v being set st v in dom ((AP:CompSeq (EL,source)) . n) holds ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom ((AP:CompSeq (EL,source)) . n) ) ; ::_thesis: verum end; theorem Th9: :: GLIB_005:9 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G for v being set holds ( v in dom (AP:FindAugPath (EL,source)) iff ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ) proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G for v being set holds ( v in dom (AP:FindAugPath (EL,source)) iff ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ) let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G for v being set holds ( v in dom (AP:FindAugPath (EL,source)) iff ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ) let source be Vertex of G; ::_thesis: for v being set holds ( v in dom (AP:FindAugPath (EL,source)) iff ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ) let v be set ; ::_thesis: ( v in dom (AP:FindAugPath (EL,source)) iff ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ) set CS = AP:CompSeq (EL,source); set V = dom (AP:FindAugPath (EL,source)); hereby ::_thesis: ( ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) implies v in dom (AP:FindAugPath (EL,source)) ) assume v in dom (AP:FindAugPath (EL,source)) ; ::_thesis: ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) then ex P being Path of G st ( P is_augmenting_wrt EL & P is_Walk_from source,v & P .vertices() c= dom (AP:FindAugPath (EL,source)) ) by Th8; hence ex P being Path of G st ( P is_Walk_from source,v & P is_augmenting_wrt EL ) ; ::_thesis: verum end; given P being Path of G such that A1: P is_Walk_from source,v and A2: P is_augmenting_wrt EL ; ::_thesis: v in dom (AP:FindAugPath (EL,source)) now__::_thesis:_v_in_dom_(AP:FindAugPath_(EL,source)) P . ((2 * 0) + 1) = source by A1, GLIB_001:17; then P . ((2 * 0) + 1) in {source} by TARSKI:def_1; then A3: P . ((2 * 0) + 1) in dom ((AP:CompSeq (EL,source)) . 0) by Th4; set Gn = (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()); set Gn1 = (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + 1); defpred S1[ Nat] means ( $1 is odd & $1 <= len P & not P . $1 in dom (AP:FindAugPath (EL,source)) ); assume A4: not v in dom (AP:FindAugPath (EL,source)) ; ::_thesis: contradiction P . (len P) = v by A1, GLIB_001:17; then A5: ex n being Nat st S1[n] by A4; consider n being Nat such that A6: ( S1[n] & ( for k being Nat st S1[k] holds n <= k ) ) from NAT_1:sch_5(A5); reconsider n9 = n as odd Element of NAT by A6, ORDINAL1:def_12; A7: 1 <= n by A6, ABIAN:12; dom ((AP:CompSeq (EL,source)) . 0) c= dom (AP:FindAugPath (EL,source)) by Th5; then n <> 1 by A6, A3; then 1 < n by A7, XXREAL_0:1; then 1 + 1 <= n by NAT_1:13; then reconsider n2 = n9 - (2 * 1) as odd Element of NAT by INT_1:5; A8: n2 < n - 0 by XREAL_1:15; then A9: n2 < len P by A6, XXREAL_0:2; then A10: P . n2 in dom (AP:FindAugPath (EL,source)) by A6, A8; set Next = AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())); set en = choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))); AP:CompSeq (EL,source) is halting by Th6; then A11: (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) = (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + 1) by GLIB_000:def_55; set e = P . (n2 + 1); A12: P . (n2 + 2) = P . n ; then A13: P . (n2 + 1) Joins P . n2,P . n,G by A9, GLIB_001:def_3; A14: now__::_thesis:_AP:NextBestEdges_((AP:CompSeq_(EL,source))_._((AP:CompSeq_(EL,source))_.Lifespan()))_<>_{} percases ( P . (n2 + 1) DJoins P . n2,P . n,G or not P . (n2 + 1) DJoins P . n2,P . n,G ) ; supposeA15: P . (n2 + 1) DJoins P . n2,P . n,G ; ::_thesis: AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) <> {} then A16: (the_Source_of G) . (P . (n2 + 1)) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by A10, GLIB_000:def_14; A17: P . (n2 + 1) in the_Edges_of G by A15, GLIB_000:def_14; A18: not (the_Target_of G) . (P . (n2 + 1)) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by A6, A15, GLIB_000:def_14; EL . (P . (n2 + 1)) < (the_Weight_of G) . (P . (n2 + 1)) by A2, A9, A12, A15, Def8; then P . (n2 + 1) is_forward_edge_wrt (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) by A17, A16, A18, Def6; hence AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) <> {} by Def9; ::_thesis: verum end; supposeA19: not P . (n2 + 1) DJoins P . n2,P . n,G ; ::_thesis: AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) <> {} then A20: P . (n2 + 1) DJoins P . n,P . n2,G by A13, GLIB_000:16; then A21: P . (n2 + 1) in the_Edges_of G by GLIB_000:def_14; A22: (the_Target_of G) . (P . (n2 + 1)) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by A10, A20, GLIB_000:def_14; A23: not (the_Source_of G) . (P . (n2 + 1)) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by A6, A20, GLIB_000:def_14; 0 < EL . (P . (n2 + 1)) by A2, A9, A12, A19, Def8; then P . (n2 + 1) is_backward_edge_wrt (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) by A21, A23, A22, Def7; hence AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) <> {} by Def9; ::_thesis: verum end; end; end; A24: (AP:CompSeq (EL,source)) . (((AP:CompSeq (EL,source)) .Lifespan()) + 1) = AP:Step ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by Def12; now__::_thesis:_contradiction percases ( not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) or (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) ) ; supposeA25: not (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) ; ::_thesis: contradiction then (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) = ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) +* (((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))))) by A24, A11, A14, Def10; then A26: dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) = (dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))) \/ {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))))} by Lm1; (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in {((the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))))} by TARSKI:def_1; hence contradiction by A25, A26, XBOOLE_0:def_3; ::_thesis: verum end; supposeA27: (the_Source_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) ; ::_thesis: contradiction ( choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))) is_forward_edge_wrt (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) or choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))) is_backward_edge_wrt (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) ) by A14, Def9; then A28: not (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) by A27, Def6, Def7; (AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()) = ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) +* (((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))))) .--> (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))))) by A24, A11, A14, A27, Def10; then A29: dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())) = (dom ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan()))) \/ {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))))} by Lm1; (the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))) in {((the_Target_of G) . (choose (AP:NextBestEdges ((AP:CompSeq (EL,source)) . ((AP:CompSeq (EL,source)) .Lifespan())))))} by TARSKI:def_1; hence contradiction by A28, A29, XBOOLE_0:def_3; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; hence v in dom (AP:FindAugPath (EL,source)) ; ::_thesis: verum end; theorem Th10: :: GLIB_005:10 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source being Vertex of G holds source in dom (AP:FindAugPath (EL,source)) proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source being Vertex of G holds source in dom (AP:FindAugPath (EL,source)) let EL be FF:ELabeling of G; ::_thesis: for source being Vertex of G holds source in dom (AP:FindAugPath (EL,source)) let source be Vertex of G; ::_thesis: source in dom (AP:FindAugPath (EL,source)) set CS = AP:CompSeq (EL,source); dom ((AP:CompSeq (EL,source)) . 0) = {source} by Th4; then A1: source in dom ((AP:CompSeq (EL,source)) . 0) by TARSKI:def_1; dom ((AP:CompSeq (EL,source)) . 0) c= dom (AP:FindAugPath (EL,source)) by Th5; hence source in dom (AP:FindAugPath (EL,source)) by A1; ::_thesis: verum end; begin definition let G be natural-weighted WGraph; let EL be FF:ELabeling of G; let W be Walk of G; assume A1: W is_augmenting_wrt EL ; defpred S1[ Nat, set ] means ( ( W . (2 * $1) DJoins W . ((2 * $1) - 1),W . ((2 * $1) + 1),G implies $2 = ((the_Weight_of G) . (W . (2 * $1))) - (EL . (W . (2 * $1))) ) & ( not W . (2 * $1) DJoins W . ((2 * $1) - 1),W . ((2 * $1) + 1),G implies $2 = EL . (W . (2 * $1)) ) ); funcW .flowSeq EL -> FinSequence of NAT means :Def15: :: GLIB_005:def 15 ( dom it = dom (W .edgeSeq()) & ( for n being Nat st n in dom it holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies it . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies it . n = EL . (W . (2 * n)) ) ) ) ); existence ex b1 being FinSequence of NAT st ( dom b1 = dom (W .edgeSeq()) & ( for n being Nat st n in dom b1 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b1 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b1 . n = EL . (W . (2 * n)) ) ) ) ) proof now__::_thesis:_for_k_being_Nat_st_k_in_Seg_(len_(W_.edgeSeq()))_holds_ ex_x_being_set_st_S1[k,x] let k be Nat; ::_thesis: ( k in Seg (len (W .edgeSeq())) implies ex x being set st S1[k,x] ) assume k in Seg (len (W .edgeSeq())) ; ::_thesis: ex x being set st S1[k,x] now__::_thesis:_ex_x_being_set_st_S1[k,x] percases ( W . (2 * k) DJoins W . ((2 * k) - 1),W . ((2 * k) + 1),G or not W . (2 * k) DJoins W . ((2 * k) - 1),W . ((2 * k) + 1),G ) ; suppose W . (2 * k) DJoins W . ((2 * k) - 1),W . ((2 * k) + 1),G ; ::_thesis: ex x being set st S1[k,x] hence ex x being set st S1[k,x] ; ::_thesis: verum end; suppose not W . (2 * k) DJoins W . ((2 * k) - 1),W . ((2 * k) + 1),G ; ::_thesis: ex x being set st S1[k,x] hence ex x being set st S1[k,x] ; ::_thesis: verum end; end; end; hence ex x being set st S1[k,x] ; ::_thesis: verum end; then A2: for k being Nat st k in Seg (len (W .edgeSeq())) holds ex x being set st S1[k,x] ; consider IT being FinSequence such that A3: dom IT = Seg (len (W .edgeSeq())) and A4: for k being Nat st k in Seg (len (W .edgeSeq())) holds S1[k,IT . k] from FINSEQ_1:sch_1(A2); now__::_thesis:_for_y_being_set_st_y_in_rng_IT_holds_ y_in_NAT let y be set ; ::_thesis: ( y in rng IT implies b1 in NAT ) assume y in rng IT ; ::_thesis: b1 in NAT then consider x being set such that A5: x in dom IT and A6: IT . x = y by FUNCT_1:def_3; reconsider n = x as Element of NAT by A5; percases ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G or not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ) ; supposeA7: W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ; ::_thesis: b1 in NAT n in dom (W .edgeSeq()) by A3, A5, FINSEQ_1:def_3; then A8: 2 * n in dom W by GLIB_001:78; then 1 <= 2 * n by FINSEQ_3:25; then reconsider 2n1 = (2 * n) - 1 as odd Element of NAT by INT_1:5; 2 * n <= len W by A8, FINSEQ_3:25; then A9: 2n1 < (len W) - 0 by XREAL_1:15; A10: 2n1 + (1 + 1) = (2 * n) + 1 ; A11: IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) by A3, A4, A5, A7; 2n1 + 1 = 2 * n ; then EL . (W . (2 * n)) < (the_Weight_of G) . (W . (2 * n)) by A1, A7, A9, A10, Def8; hence y in NAT by A6, A11, INT_1:5; ::_thesis: verum end; suppose not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ; ::_thesis: b1 in NAT then IT . n = EL . (W . (2 * n)) by A3, A4, A5; hence y in NAT by A6, ORDINAL1:def_12; ::_thesis: verum end; end; end; then rng IT c= NAT by TARSKI:def_3; then reconsider IT = IT as FinSequence of NAT by FINSEQ_1:def_4; take IT ; ::_thesis: ( dom IT = dom (W .edgeSeq()) & ( for n being Nat st n in dom IT holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = EL . (W . (2 * n)) ) ) ) ) thus dom IT = dom (W .edgeSeq()) by A3, FINSEQ_1:def_3; ::_thesis: for n being Nat st n in dom IT holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = EL . (W . (2 * n)) ) ) let n be Nat; ::_thesis: ( n in dom IT implies ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = EL . (W . (2 * n)) ) ) ) assume n in dom IT ; ::_thesis: ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = EL . (W . (2 * n)) ) ) hence ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT . n = EL . (W . (2 * n)) ) ) by A3, A4; ::_thesis: verum end; uniqueness for b1, b2 being FinSequence of NAT st dom b1 = dom (W .edgeSeq()) & ( for n being Nat st n in dom b1 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b1 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b1 . n = EL . (W . (2 * n)) ) ) ) & dom b2 = dom (W .edgeSeq()) & ( for n being Nat st n in dom b2 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b2 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b2 . n = EL . (W . (2 * n)) ) ) ) holds b1 = b2 proof let IT1, IT2 be FinSequence of NAT ; ::_thesis: ( dom IT1 = dom (W .edgeSeq()) & ( for n being Nat st n in dom IT1 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT1 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT1 . n = EL . (W . (2 * n)) ) ) ) & dom IT2 = dom (W .edgeSeq()) & ( for n being Nat st n in dom IT2 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT2 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies IT2 . n = EL . (W . (2 * n)) ) ) ) implies IT1 = IT2 ) assume that A12: dom IT1 = dom (W .edgeSeq()) and A13: for n being Nat st n in dom IT1 holds S1[n,IT1 . n] and A14: dom IT2 = dom (W .edgeSeq()) and A15: for n being Nat st n in dom IT2 holds S1[n,IT2 . n] ; ::_thesis: IT1 = IT2 now__::_thesis:_for_n_being_Nat_st_n_in_dom_IT1_holds_ IT1_._n_=_IT2_._n let n be Nat; ::_thesis: ( n in dom IT1 implies IT1 . n = IT2 . n ) assume A16: n in dom IT1 ; ::_thesis: IT1 . n = IT2 . n now__::_thesis:_IT1_._n_=_IT2_._n percases ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G or not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ) ; supposeA17: W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ; ::_thesis: IT1 . n = IT2 . n then IT1 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) by A13, A16; hence IT1 . n = IT2 . n by A12, A14, A15, A16, A17; ::_thesis: verum end; supposeA18: not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G ; ::_thesis: IT1 . n = IT2 . n then IT1 . n = EL . (W . (2 * n)) by A13, A16; hence IT1 . n = IT2 . n by A12, A14, A15, A16, A18; ::_thesis: verum end; end; end; hence IT1 . n = IT2 . n ; ::_thesis: verum end; hence IT1 = IT2 by A12, A14, FINSEQ_1:13; ::_thesis: verum end; end; :: deftheorem Def15 defines .flowSeq GLIB_005:def_15_:_ for G being natural-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G st W is_augmenting_wrt EL holds for b4 being FinSequence of NAT holds ( b4 = W .flowSeq EL iff ( dom b4 = dom (W .edgeSeq()) & ( for n being Nat st n in dom b4 holds ( ( W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b4 . n = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) ) & ( not W . (2 * n) DJoins W . ((2 * n) - 1),W . ((2 * n) + 1),G implies b4 . n = EL . (W . (2 * n)) ) ) ) ) ); definition let G be natural-weighted WGraph; let EL be FF:ELabeling of G; let W be Walk of G; assume A1: W is_augmenting_wrt EL ; funcW .tolerance EL -> Nat means :Def16: :: GLIB_005:def 16 ( it in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds it <= k ) ) if not W is trivial otherwise it = 0 ; existence ( ( not W is trivial implies ex b1 being Nat st ( b1 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds b1 <= k ) ) ) & ( W is trivial implies ex b1 being Nat st b1 = 0 ) ) proof set D = rng (W .flowSeq EL); now__::_thesis:_(_not_W_is_trivial_implies_ex_IT_being_Nat_st_ (_IT_in_rng_(W_.flowSeq_EL)_&_(_for_k_being_real_number_st_k_in_rng_(W_.flowSeq_EL)_holds_ IT_<=_k_)_)_) assume not W is trivial ; ::_thesis: ex IT being Nat st ( IT in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT <= k ) ) then W .edges() <> {} by GLIB_001:136; then rng (W .edgeSeq()) <> {} by GLIB_001:def_17; then consider y being set such that A2: y in rng (W .edgeSeq()) by XBOOLE_0:def_1; consider x being set such that A3: x in dom (W .edgeSeq()) and y = (W .edgeSeq()) . x by A2, FUNCT_1:def_3; x in dom (W .flowSeq EL) by A1, A3, Def15; then (W .flowSeq EL) . x in rng (W .flowSeq EL) by FUNCT_1:def_3; then reconsider D = rng (W .flowSeq EL) as non empty finite Subset of NAT ; deffunc H1( Nat) -> Nat = $1; consider IT being Element of D such that A4: for k being Element of D holds H1(IT) <= H1(k) from GRAPH_5:sch_2(); reconsider IT = IT as Nat ; take IT = IT; ::_thesis: ( IT in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT <= k ) ) thus IT in rng (W .flowSeq EL) ; ::_thesis: for k being real number st k in rng (W .flowSeq EL) holds IT <= k let k be real number ; ::_thesis: ( k in rng (W .flowSeq EL) implies IT <= k ) assume k in rng (W .flowSeq EL) ; ::_thesis: IT <= k hence IT <= k by A4; ::_thesis: verum end; hence ( ( not W is trivial implies ex b1 being Nat st ( b1 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds b1 <= k ) ) ) & ( W is trivial implies ex b1 being Nat st b1 = 0 ) ) ; ::_thesis: verum end; uniqueness for b1, b2 being Nat holds ( ( not W is trivial & b1 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds b1 <= k ) & b2 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds b2 <= k ) implies b1 = b2 ) & ( W is trivial & b1 = 0 & b2 = 0 implies b1 = b2 ) ) proof let IT1, IT2 be Nat; ::_thesis: ( ( not W is trivial & IT1 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT1 <= k ) & IT2 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT2 <= k ) implies IT1 = IT2 ) & ( W is trivial & IT1 = 0 & IT2 = 0 implies IT1 = IT2 ) ) hereby ::_thesis: ( W is trivial & IT1 = 0 & IT2 = 0 implies IT1 = IT2 ) assume not W is trivial ; ::_thesis: ( IT1 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT1 <= k ) & IT2 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT2 <= k ) implies IT1 = IT2 ) assume that A5: IT1 in rng (W .flowSeq EL) and A6: for k being real number st k in rng (W .flowSeq EL) holds IT1 <= k ; ::_thesis: ( IT2 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds IT2 <= k ) implies IT1 = IT2 ) assume that A7: IT2 in rng (W .flowSeq EL) and A8: for k being real number st k in rng (W .flowSeq EL) holds IT2 <= k ; ::_thesis: IT1 = IT2 A9: IT2 <= IT1 by A5, A8; IT1 <= IT2 by A6, A7; hence IT1 = IT2 by A9, XXREAL_0:1; ::_thesis: verum end; thus ( W is trivial & IT1 = 0 & IT2 = 0 implies IT1 = IT2 ) ; ::_thesis: verum end; consistency for b1 being Nat holds verum ; end; :: deftheorem Def16 defines .tolerance GLIB_005:def_16_:_ for G being natural-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G st W is_augmenting_wrt EL holds for b4 being Nat holds ( ( not W is trivial implies ( b4 = W .tolerance EL iff ( b4 in rng (W .flowSeq EL) & ( for k being real number st k in rng (W .flowSeq EL) holds b4 <= k ) ) ) ) & ( W is trivial implies ( b4 = W .tolerance EL iff b4 = 0 ) ) ); definition let G be natural-weighted WGraph; let EL be FF:ELabeling of G; let P be Path of G; assume A1: P is_augmenting_wrt EL ; func FF:PushFlow (EL,P) -> FF:ELabeling of G means :Def17: :: GLIB_005:def 17 ( ( for e being set st e in the_Edges_of G & not e in P .edges() holds it . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies it . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies it . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) ); existence ex b1 being FF:ELabeling of G st ( ( for e being set st e in the_Edges_of G & not e in P .edges() holds b1 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies b1 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies b1 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) ) proof defpred S1[ set , set ] means ( ( $1 in the_Edges_of G & not $1 in P .edges() implies $2 = EL . $1 ) & ( for n being odd Element of NAT st n < len P & $1 = P . (n + 1) holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies $2 = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies $2 = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) ); now__::_thesis:_for_x_being_set_st_x_in_the_Edges_of_G_holds_ ex_y_being_set_st_S1[x,y] let x be set ; ::_thesis: ( x in the_Edges_of G implies ex y being set st S1[x,y] ) assume x in the_Edges_of G ; ::_thesis: ex y being set st S1[x,y] now__::_thesis:_ex_y_being_set_st_S1[x,y] percases ( not x in P .edges() or x in P .edges() ) ; supposeA2: not x in P .edges() ; ::_thesis: ex y being set st S1[x,y] set y = EL . x; for n being odd Element of NAT st n < len P & x = P . (n + 1) holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . x = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies EL . x = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) by A2, GLIB_001:100; hence ex y being set st S1[x,y] ; ::_thesis: verum end; supposeA3: x in P .edges() ; ::_thesis: ex y being set st S1[x,y] then consider n being odd Element of NAT such that A4: n < len P and A5: P . (n + 1) = x by GLIB_001:100; A6: 1 <= n + 1 by NAT_1:11; A7: n + 1 <= len P by A4, NAT_1:13; now__::_thesis:_ex_y_being_set_st_S1[x,y] percases ( P . (n + 1) DJoins P . n,P . (n + 2),G or not P . (n + 1) DJoins P . n,P . (n + 2),G ) ; supposeA8: P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: ex y being set st S1[x,y] set y = (EL . (P . (n + 1))) + (P .tolerance EL); now__::_thesis:_(_(_x_in_the_Edges_of_G_&_not_x_in_P_.edges()_implies_(EL_._(P_._(n_+_1)))_+_(P_.tolerance_EL)_=_EL_._x_)_&_(_for_m_being_odd_Element_of_NAT_st_m_<_len_P_&_P_._(m_+_1)_=_x_holds_ (_(_P_._(m_+_1)_DJoins_P_._m,P_._(m_+_2),G_implies_(EL_._(P_._(n_+_1)))_+_(P_.tolerance_EL)_=_(EL_._(P_._(n_+_1)))_+_(P_.tolerance_EL)_)_&_(_not_P_._(m_+_1)_DJoins_P_._m,P_._(m_+_2),G_implies_(EL_._(P_._(n_+_1)))_+_(P_.tolerance_EL)_=_(EL_._(P_._(m_+_1)))_-_(P_.tolerance_EL)_)_)_)_) thus ( x in the_Edges_of G & not x in P .edges() implies (EL . (P . (n + 1))) + (P .tolerance EL) = EL . x ) by A3; ::_thesis: for m being odd Element of NAT st m < len P & P . (m + 1) = x holds ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) ) ) let m be odd Element of NAT ; ::_thesis: ( m < len P & P . (m + 1) = x implies ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) ) ) ) assume that A9: m < len P and A10: P . (m + 1) = x ; ::_thesis: ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) ) ) 1 <= m + 1 by NAT_1:11; then A11: n + 1 <= m + 1 by A5, A7, A10, GLIB_001:138; thus ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) ; ::_thesis: ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) ) assume A12: not P . (m + 1) DJoins P . m,P . (m + 2),G ; ::_thesis: (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) m + 1 <= len P by A9, NAT_1:13; then m + 1 <= n + 1 by A5, A6, A10, GLIB_001:138; then m + 1 = n + 1 by A11, XXREAL_0:1; hence (EL . (P . (n + 1))) + (P .tolerance EL) = (EL . (P . (m + 1))) - (P .tolerance EL) by A8, A12; ::_thesis: verum end; then S1[x,(EL . (P . (n + 1))) + (P .tolerance EL)] by A5; hence ex y being set st S1[x,y] ; ::_thesis: verum end; supposeA13: not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: ex y being set st S1[x,y] set y = (EL . (P . (n + 1))) - (P .tolerance EL); now__::_thesis:_(_(_x_in_the_Edges_of_G_&_not_x_in_P_.edges()_implies_(EL_._(P_._(n_+_1)))_-_(P_.tolerance_EL)_=_EL_._x_)_&_(_for_m_being_odd_Element_of_NAT_st_m_<_len_P_&_P_._(m_+_1)_=_x_holds_ (_(_P_._(m_+_1)_DJoins_P_._m,P_._(m_+_2),G_implies_(EL_._(P_._(n_+_1)))_-_(P_.tolerance_EL)_=_(EL_._(P_._(n_+_1)))_+_(P_.tolerance_EL)_)_&_(_not_P_._(m_+_1)_DJoins_P_._m,P_._(m_+_2),G_implies_(EL_._(P_._(n_+_1)))_-_(P_.tolerance_EL)_=_(EL_._(P_._(n_+_1)))_-_(P_.tolerance_EL)_)_)_)_) thus ( x in the_Edges_of G & not x in P .edges() implies (EL . (P . (n + 1))) - (P .tolerance EL) = EL . x ) by A3; ::_thesis: for m being odd Element of NAT st m < len P & P . (m + 1) = x holds ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) let m be odd Element of NAT ; ::_thesis: ( m < len P & P . (m + 1) = x implies ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) assume that A14: m < len P and A15: P . (m + 1) = x ; ::_thesis: ( ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) 1 <= m + 1 by NAT_1:11; then A16: n + 1 <= m + 1 by A5, A7, A15, GLIB_001:138; m + 1 <= len P by A14, NAT_1:13; then m + 1 <= n + 1 by A5, A6, A15, GLIB_001:138; then m + 1 = n + 1 by A16, XXREAL_0:1; hence ( P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) + (P .tolerance EL) ) by A13; ::_thesis: ( not P . (m + 1) DJoins P . m,P . (m + 2),G implies (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) ) assume not P . (m + 1) DJoins P . m,P . (m + 2),G ; ::_thesis: (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) thus (EL . (P . (n + 1))) - (P .tolerance EL) = (EL . (P . (n + 1))) - (P .tolerance EL) ; ::_thesis: verum end; then S1[x,(EL . (P . (n + 1))) - (P .tolerance EL)] by A5; hence ex y being set st S1[x,y] ; ::_thesis: verum end; end; end; hence ex y being set st S1[x,y] ; ::_thesis: verum end; end; end; hence ex y being set st S1[x,y] ; ::_thesis: verum end; then A17: for x being set st x in the_Edges_of G holds ex y being set st S1[x,y] ; consider IT being Function such that A18: dom IT = the_Edges_of G and A19: for e being set st e in the_Edges_of G holds S1[e,IT . e] from CLASSES1:sch_1(A17); rng IT c= NAT proof let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng IT or y in NAT ) assume y in rng IT ; ::_thesis: y in NAT then consider e being set such that A20: e in dom IT and A21: IT . e = y by FUNCT_1:def_3; now__::_thesis:_y_in_NAT percases ( not e in P .edges() or e in P .edges() ) ; suppose not e in P .edges() ; ::_thesis: y in NAT then y = EL . e by A18, A19, A20, A21; hence y in NAT by ORDINAL1:def_12; ::_thesis: verum end; supposeA22: e in P .edges() ; ::_thesis: y in NAT then consider n being odd Element of NAT such that A23: n < len P and A24: P . (n + 1) = e by GLIB_001:100; A25: not P is trivial by A22, GLIB_001:136; now__::_thesis:_y_in_NAT percases ( P . (n + 1) DJoins P . n,P . (n + 2),G or not P . (n + 1) DJoins P . n,P . (n + 2),G ) ; suppose P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: y in NAT then y = (EL . (P . (n + 1))) + (P .tolerance EL) by A18, A19, A20, A21, A23, A24; hence y in NAT by ORDINAL1:def_12; ::_thesis: verum end; supposeA26: not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: y in NAT set n1div2 = (n + 1) div 2; A27: 1 <= n + 1 by NAT_1:11; n + 1 <= len P by A23, NAT_1:13; then (n + 1) div 2 in dom (P .edgeSeq()) by A27, GLIB_001:77; then A28: (n + 1) div 2 in dom (P .flowSeq EL) by A1, Def15; 2 divides n + 1 by PEPIN:22; then A29: 2 * ((n + 1) div 2) = n + 1 by NAT_D:3; then A30: (2 * ((n + 1) div 2)) + 1 = n + (1 + 1) ; (2 * ((n + 1) div 2)) - 1 = n by A29; then (P .flowSeq EL) . ((n + 1) div 2) = EL . e by A1, A24, A26, A28, A30, Def15; then EL . e in rng (P .flowSeq EL) by A28, FUNCT_1:def_3; then A31: P .tolerance EL <= EL . e by A1, A25, Def16; y = (EL . e) - (P .tolerance EL) by A18, A19, A20, A21, A23, A24, A26; hence y in NAT by A31, INT_1:5; ::_thesis: verum end; end; end; hence y in NAT ; ::_thesis: verum end; end; end; hence y in NAT ; ::_thesis: verum end; then reconsider IT = IT as natural-valued ManySortedSet of the_Edges_of G by A18, PARTFUN1:def_2, RELAT_1:def_18, VALUED_0:def_6; take IT ; ::_thesis: ( ( for e being set st e in the_Edges_of G & not e in P .edges() holds IT . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) ) thus for e being set st e in the_Edges_of G & not e in P .edges() holds IT . e = EL . e by A19; ::_thesis: for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) let n be odd Nat; ::_thesis: ( n < len P implies ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) reconsider n9 = n as odd Element of NAT by ORDINAL1:def_12; A32: n9 = n ; assume A33: n < len P ; ::_thesis: ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) then P . (n + 1) Joins P . n,P . (n9 + 2),G by GLIB_001:def_3; then A34: P . (n + 1) in the_Edges_of G by GLIB_000:def_13; hence ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) by A19, A32, A33; ::_thesis: ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) assume not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) hence IT . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) by A19, A32, A33, A34; ::_thesis: verum end; uniqueness for b1, b2 being FF:ELabeling of G st ( for e being set st e in the_Edges_of G & not e in P .edges() holds b1 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies b1 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies b1 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) & ( for e being set st e in the_Edges_of G & not e in P .edges() holds b2 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies b2 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies b2 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) holds b1 = b2 proof let IT1, IT2 be FF:ELabeling of G; ::_thesis: ( ( for e being set st e in the_Edges_of G & not e in P .edges() holds IT1 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT1 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT1 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) & ( for e being set st e in the_Edges_of G & not e in P .edges() holds IT2 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT2 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT2 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) implies IT1 = IT2 ) assume that A35: for e being set st e in the_Edges_of G & not e in P .edges() holds IT1 . e = EL . e and A36: for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT1 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT1 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) and A37: for e being set st e in the_Edges_of G & not e in P .edges() holds IT2 . e = EL . e and A38: for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies IT2 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies IT2 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ; ::_thesis: IT1 = IT2 now__::_thesis:_for_e_being_set_st_e_in_the_Edges_of_G_holds_ IT1_._e_=_IT2_._e let e be set ; ::_thesis: ( e in the_Edges_of G implies IT1 . e = IT2 . e ) assume A39: e in the_Edges_of G ; ::_thesis: IT1 . e = IT2 . e now__::_thesis:_IT1_._e_=_IT2_._e percases ( not e in P .edges() or e in P .edges() ) ; supposeA40: not e in P .edges() ; ::_thesis: IT1 . e = IT2 . e then IT1 . e = EL . e by A35, A39; hence IT1 . e = IT2 . e by A37, A39, A40; ::_thesis: verum end; suppose e in P .edges() ; ::_thesis: IT1 . e = IT2 . e then consider n being odd Element of NAT such that A41: n < len P and A42: P . (n + 1) = e by GLIB_001:100; now__::_thesis:_IT1_._e_=_IT2_._e percases ( P . (n + 1) DJoins P . n,P . (n + 2),G or not P . (n + 1) DJoins P . n,P . (n + 2),G ) ; supposeA43: P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: IT1 . e = IT2 . e then IT1 . e = (EL . (P . (n + 1))) + (P .tolerance EL) by A36, A41, A42; hence IT1 . e = IT2 . e by A38, A41, A42, A43; ::_thesis: verum end; supposeA44: not P . (n + 1) DJoins P . n,P . (n + 2),G ; ::_thesis: IT1 . e = IT2 . e then IT1 . e = (EL . (P . (n + 1))) - (P .tolerance EL) by A36, A41, A42; hence IT1 . e = IT2 . e by A38, A41, A42, A44; ::_thesis: verum end; end; end; hence IT1 . e = IT2 . e ; ::_thesis: verum end; end; end; hence IT1 . e = IT2 . e ; ::_thesis: verum end; hence IT1 = IT2 by PBOOLE:3; ::_thesis: verum end; end; :: deftheorem Def17 defines FF:PushFlow GLIB_005:def_17_:_ for G being natural-weighted WGraph for EL being FF:ELabeling of G for P being Path of G st P is_augmenting_wrt EL holds for b4 being FF:ELabeling of G holds ( b4 = FF:PushFlow (EL,P) iff ( ( for e being set st e in the_Edges_of G & not e in P .edges() holds b4 . e = EL . e ) & ( for n being odd Nat st n < len P holds ( ( P . (n + 1) DJoins P . n,P . (n + 2),G implies b4 . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) ) & ( not P . (n + 1) DJoins P . n,P . (n + 2),G implies b4 . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) ) ) ) ) ); definition let G be finite natural-weighted WGraph; let EL be FF:ELabeling of G; let sink, source be Vertex of G; func FF:Step (EL,source,sink) -> FF:ELabeling of G equals :Def18: :: GLIB_005:def 18 FF:PushFlow (EL,(AP:GetAugPath (EL,source,sink))) if sink in dom (AP:FindAugPath (EL,source)) otherwise EL; correctness coherence ( ( sink in dom (AP:FindAugPath (EL,source)) implies FF:PushFlow (EL,(AP:GetAugPath (EL,source,sink))) is FF:ELabeling of G ) & ( not sink in dom (AP:FindAugPath (EL,source)) implies EL is FF:ELabeling of G ) ); consistency for b1 being FF:ELabeling of G holds verum; ; end; :: deftheorem Def18 defines FF:Step GLIB_005:def_18_:_ for G being finite natural-weighted WGraph for EL being FF:ELabeling of G for sink, source being Vertex of G holds ( ( sink in dom (AP:FindAugPath (EL,source)) implies FF:Step (EL,source,sink) = FF:PushFlow (EL,(AP:GetAugPath (EL,source,sink))) ) & ( not sink in dom (AP:FindAugPath (EL,source)) implies FF:Step (EL,source,sink) = EL ) ); definition let G be _Graph; mode FF:ELabelingSeq of G -> ManySortedSet of NAT means :Def19: :: GLIB_005:def 19 for n being Nat holds it . n is FF:ELabeling of G; existence ex b1 being ManySortedSet of NAT st for n being Nat holds b1 . n is FF:ELabeling of G proof take NAT --> ((the_Edges_of G) --> 0) ; ::_thesis: for n being Nat holds (NAT --> ((the_Edges_of G) --> 0)) . n is FF:ELabeling of G let n be Nat; ::_thesis: (NAT --> ((the_Edges_of G) --> 0)) . n is FF:ELabeling of G n in NAT by ORDINAL1:def_12; hence (NAT --> ((the_Edges_of G) --> 0)) . n is FF:ELabeling of G by FUNCOP_1:7; ::_thesis: verum end; end; :: deftheorem Def19 defines FF:ELabelingSeq GLIB_005:def_19_:_ for G being _Graph for b2 being ManySortedSet of NAT holds ( b2 is FF:ELabelingSeq of G iff for n being Nat holds b2 . n is FF:ELabeling of G ); registration let G be _Graph; let ES be FF:ELabelingSeq of G; let n be Nat; clusterES . n -> Relation-like Function-like ; coherence ( ES . n is Function-like & ES . n is Relation-like ) by Def19; end; registration let G be _Graph; let ES be FF:ELabelingSeq of G; let n be Nat; clusterES . n -> the_Edges_of G -defined ; coherence ES . n is the_Edges_of G -defined by Def19; end; registration let G be _Graph; let ES be FF:ELabelingSeq of G; let n be Nat; clusterES . n -> total natural-valued ; coherence ( ES . n is natural-valued & ES . n is total ) by Def19; end; definition let G be finite natural-weighted WGraph; let source, sink be Vertex of G; func FF:CompSeq (G,source,sink) -> FF:ELabelingSeq of G means :Def20: :: GLIB_005:def 20 ( it . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds it . (n + 1) = FF:Step ((it . n),source,sink) ) ); existence ex b1 being FF:ELabelingSeq of G st ( b1 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds b1 . (n + 1) = FF:Step ((b1 . n),source,sink) ) ) proof defpred S1[ set , set , set ] means ( ex e being FF:ELabeling of G st ( e = $2 & $3 = FF:Step (e,source,sink) ) or ( ( for e being FF:ELabeling of G holds not e = $2 ) & $3 = $2 ) ); 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 ( ex e being FF:ELabeling of G st e = x or for e being FF:ELabeling of G holds not e = x ) ; suppose ex e being FF:ELabeling of G st e = x ; ::_thesis: ex y being set st S1[n,x,y] then consider e being FF:ELabeling of G such that A1: e = x ; set y = FF:Step (e,source,sink); S1[n,x, FF:Step (e,source,sink)] by A1; hence ex y being set st S1[n,x,y] ; ::_thesis: verum end; suppose for e being FF:ELabeling of G holds not e = x ; ::_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 = (the_Edges_of G) --> 0 & ( 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 ex Gn being FF:ELabeling of G st IT . $1 = Gn; 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 S2[n] ; ::_thesis: S2[n + 1] then consider Gn being FF:ELabeling of G such that A5: IT . n = Gn ; n in NAT by ORDINAL1:def_12; then S1[n,Gn,IT . (n + 1)] by A3, A5; hence S2[n + 1] ; ::_thesis: verum end; A6: S2[ 0 ] by A3; A7: for n being Nat holds S2[n] from NAT_1:sch_2(A6, A4); now__::_thesis:_for_n_being_Nat_holds_IT_._n_is_FF:ELabeling_of_G let n be Nat; ::_thesis: IT . n is FF:ELabeling of G ex Gn being FF:ELabeling of G st IT . n = Gn by A7; hence IT . n is FF:ELabeling of G ; ::_thesis: verum end; then reconsider IT = IT as FF:ELabelingSeq of G by Def19; take IT ; ::_thesis: ( IT . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds IT . (n + 1) = FF:Step ((IT . n),source,sink) ) ) thus IT . 0 = (the_Edges_of G) --> 0 by A3; ::_thesis: for n being Nat holds IT . (n + 1) = FF:Step ((IT . n),source,sink) let n be Nat; ::_thesis: IT . (n + 1) = FF:Step ((IT . n),source,sink) reconsider n9 = n as Element of NAT by ORDINAL1:def_12; ex X being FF:ELabeling of G st ( X = IT . n & IT . (n9 + 1) = FF:Step (X,source,sink) ) by A3; hence IT . (n + 1) = FF:Step ((IT . n),source,sink) ; ::_thesis: verum end; uniqueness for b1, b2 being FF:ELabelingSeq of G st b1 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds b1 . (n + 1) = FF:Step ((b1 . n),source,sink) ) & b2 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds b2 . (n + 1) = FF:Step ((b2 . n),source,sink) ) holds b1 = b2 proof let IT1, IT2 be FF:ELabelingSeq of G; ::_thesis: ( IT1 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds IT1 . (n + 1) = FF:Step ((IT1 . n),source,sink) ) & IT2 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds IT2 . (n + 1) = FF:Step ((IT2 . n),source,sink) ) implies IT1 = IT2 ) assume that A8: IT1 . 0 = (the_Edges_of G) --> 0 and A9: for n being Nat holds IT1 . (n + 1) = FF:Step ((IT1 . n),source,sink) and A10: IT2 . 0 = (the_Edges_of G) --> 0 and A11: for n being Nat holds IT2 . (n + 1) = FF:Step ((IT2 . n),source,sink) ; ::_thesis: IT1 = IT2 defpred S1[ Nat] means IT1 . $1 = IT2 . $1; A12: now__::_thesis:_for_n_being_Element_of_NAT_st_S1[n]_holds_ S1[n_+_1] let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A13: S1[n] ; ::_thesis: S1[n + 1] IT2 . (n + 1) = FF:Step ((IT2 . n),source,sink) by A11; hence S1[n + 1] by A9, A13; ::_thesis: verum end; A14: S1[ 0 ] by A8, A10; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A14, A12); 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 Def20 defines FF:CompSeq GLIB_005:def_20_:_ for G being finite natural-weighted WGraph for source, sink being Vertex of G for b4 being FF:ELabelingSeq of G holds ( b4 = FF:CompSeq (G,source,sink) iff ( b4 . 0 = (the_Edges_of G) --> 0 & ( for n being Nat holds b4 . (n + 1) = FF:Step ((b4 . n),source,sink) ) ) ); definition let G be finite natural-weighted WGraph; let sink, source be Vertex of G; func FF:MaxFlow (G,source,sink) -> FF:ELabeling of G equals :: GLIB_005:def 21 (FF:CompSeq (G,source,sink)) .Result() ; coherence (FF:CompSeq (G,source,sink)) .Result() is FF:ELabeling of G ; end; :: deftheorem defines FF:MaxFlow GLIB_005:def_21_:_ for G being finite natural-weighted WGraph for sink, source being Vertex of G holds FF:MaxFlow (G,source,sink) = (FF:CompSeq (G,source,sink)) .Result() ; begin theorem Th11: :: GLIB_005:11 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) let EL be FF:ELabeling of G; ::_thesis: for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) let source, sink be set ; ::_thesis: for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) let V be Subset of (the_Vertices_of G); ::_thesis: ( EL has_valid_flow_from source,sink & source in V & not sink in V implies EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) ) assume that A1: EL has_valid_flow_from source,sink and A2: source in V and A3: not sink in V ; ::_thesis: EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) set VG = the_Vertices_of G; set n = card ((the_Vertices_of G) \ V); A4: now__::_thesis:_not_card_((the_Vertices_of_G)_\_V)_=_0 assume card ((the_Vertices_of G) \ V) = 0 ; ::_thesis: contradiction then A5: (the_Vertices_of G) \ V = {} ; sink is Vertex of G by A1, Def2; hence contradiction by A3, A5, XBOOLE_0:def_5; ::_thesis: verum end; defpred S1[ Nat] means for V being Subset of (the_Vertices_of G) st card ((the_Vertices_of G) \ V) = $1 & source in V & not sink in V holds EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))); set TG = the_Target_of G; set SG = the_Source_of G; A6: now__::_thesis:_for_n_being_non_empty_Nat_st_S1[n]_holds_ S1[n_+_1] let n be non empty Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A7: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_for_V2_being_Subset_of_(the_Vertices_of_G)_st_card_((the_Vertices_of_G)_\_V2)_=_n_+_1_&_source_in_V2_&_not_sink_in_V2_holds_ EL_.flow_(source,sink)_=_(Sum_(EL_|_(G_.edgesDBetween_(V2,((the_Vertices_of_G)_\_V2)))))_-_(Sum_(EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V2),V2)))) let V2 be Subset of (the_Vertices_of G); ::_thesis: ( card ((the_Vertices_of G) \ V2) = n + 1 & source in V2 & not sink in V2 implies EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V2,((the_Vertices_of G) \ V2))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V2),V2)))) ) assume that A8: card ((the_Vertices_of G) \ V2) = n + 1 and A9: source in V2 and A10: not sink in V2 ; ::_thesis: EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V2,((the_Vertices_of G) \ V2))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V2),V2)))) set x = choose (((the_Vertices_of G) \ V2) \ {sink}); set V1 = V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}; set EV1V1a = G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))); set EV1V1b = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})); set EXV1c = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))); set EV1Xd = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}); sink is Vertex of G by A1, Def2; then sink in (the_Vertices_of G) \ V2 by A10, XBOOLE_0:def_5; then {sink} c= (the_Vertices_of G) \ V2 by ZFMISC_1:31; then A11: card (((the_Vertices_of G) \ V2) \ {sink}) = (n + 1) - (card {sink}) by A8, CARD_2:44 .= (n + 1) - 1 by CARD_1:30 .= n ; then A12: choose (((the_Vertices_of G) \ V2) \ {sink}) in (the_Vertices_of G) \ V2 by CARD_1:27, XBOOLE_0:def_5; then {(choose (((the_Vertices_of G) \ V2) \ {sink}))} c= the_Vertices_of G by ZFMISC_1:31; then reconsider V1 = V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} as Subset of (the_Vertices_of G) by XBOOLE_1:8; A13: (the_Vertices_of G) \ V1 = ((the_Vertices_of G) \ V2) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_1:41; {(choose (((the_Vertices_of G) \ V2) \ {sink}))} c= (the_Vertices_of G) \ V2 by A12, ZFMISC_1:31; then A14: card ((the_Vertices_of G) \ V1) = (card ((the_Vertices_of G) \ V2)) - (card {(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by A13, CARD_2:44 .= (n + 1) - 1 by A8, CARD_1:30 .= n ; A15: source in V1 by A9, XBOOLE_0:def_3; not choose (((the_Vertices_of G) \ V2) \ {sink}) in {sink} by A11, CARD_1:27, XBOOLE_0:def_5; then A16: choose (((the_Vertices_of G) \ V2) \ {sink}) <> sink by TARSKI:def_1; then not sink in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by TARSKI:def_1; then not sink in V1 by A10, XBOOLE_0:def_3; then A17: EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) by A7, A14, A15; set EXXe = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})); set EXV2 = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2); set EV2X = G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}); reconsider EA = (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) as Subset of (the_Edges_of G) ; reconsider E1 = EA \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) as Subset of (the_Edges_of G) ; reconsider EB = EA \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) as Subset of (the_Edges_of G) ; reconsider EC = (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) as Subset of (the_Edges_of G) ; reconsider E2 = EC \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) as Subset of (the_Edges_of G) ; reconsider ED = EC \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) as Subset of (the_Edges_of G) ; A18: dom (EL | EA) = EA by PARTFUN1:def_2; now__::_thesis:_not_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_meets_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2) set e = choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))); assume G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) meets G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: contradiction then A19: (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) <> {} by XBOOLE_0:def_7; then choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_0:def_4; then choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) DSJoins (the_Vertices_of G) \ V1,V1,G by GLIB_000:def_31; then (the_Source_of G) . (choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)))) in (the_Vertices_of G) \ V1 by GLIB_000:def_16; then A20: not (the_Source_of G) . (choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)))) in V1 by XBOOLE_0:def_5; choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by A19, XBOOLE_0:def_4; then choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by GLIB_000:def_31; then (the_Source_of G) . (choose ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) /\ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)))) in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; hence contradiction by A20, XBOOLE_0:def_3; ::_thesis: verum end; then (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_1:83; then A21: ED = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_1:40; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_holds_ e_in_G_.edgesDBetween_((V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))) let e be set ; ::_thesis: ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) implies e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ) assume A22: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) then A23: e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ V1,G by GLIB_000:def_31; then (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; then A24: (the_Source_of G) . e in V1 by XBOOLE_0:def_3; (the_Target_of G) . e in (the_Vertices_of G) \ V1 by A23, GLIB_000:def_16; then e DSJoins V1,(the_Vertices_of G) \ V1,G by A22, A24, GLIB_000:def_16; hence e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by GLIB_000:def_31; ::_thesis: verum end; then A25: G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) c= G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by TARSKI:def_3; now__::_thesis:_not_G_.edgesDBetween_((V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_meets_G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}) set e = choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))); assume G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) meets G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: contradiction then A26: (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) <> {} by XBOOLE_0:def_7; then choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_0:def_4; then choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) DSJoins V1,(the_Vertices_of G) \ V1,G by GLIB_000:def_31; then (the_Target_of G) . (choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) in (the_Vertices_of G) \ V1 by GLIB_000:def_16; then A27: not (the_Target_of G) . (choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) in V1 by XBOOLE_0:def_5; choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by A26, XBOOLE_0:def_4; then choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then (the_Target_of G) . (choose ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) /\ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; hence contradiction by A27, XBOOLE_0:def_3; ::_thesis: verum end; then (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) = G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_1:83; then A28: EB = G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_1:40; A29: dom (EL | EB) = EB by PARTFUN1:def_2; A30: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_EA)_holds_ (EL_|_EA)_._e_=_((EL_|_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_EB))_._e let e be set ; ::_thesis: ( e in dom (EL | EA) implies (EL | EA) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e ) assume e in dom (EL | EA) ; ::_thesis: (EL | EA) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e then A31: e in EA ; now__::_thesis:_((EL_|_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_EB))_._e_=_EL_._e percases ( not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) or e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) ; suppose not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e = EL . e then A32: e in EB by A31, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e = (EL | EB) . e by A29, FUNCT_4:13 .= EL . e by A32, FUNCT_1:49 ; ::_thesis: verum end; supposeA33: e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e = EL . e then not e in EB by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e = (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e by A29, FUNCT_4:11 .= EL . e by A33, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | EA) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) . e by A31, FUNCT_1:49; ::_thesis: verum end; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2))_implies_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_)_&_(_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_implies_e_in_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2))_)_) let e be set ; ::_thesis: ( ( e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) implies e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ) & ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) implies e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) ) ) hereby ::_thesis: ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) implies e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) ) assume A34: e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) ; ::_thesis: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) then e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_0:def_5; then A35: e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then A36: (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; A37: (the_Target_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A35, GLIB_000:def_16; then A38: not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_0:def_5; not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by A34, XBOOLE_0:def_5; then not e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by GLIB_000:def_31; then not (the_Target_of G) . e in V2 by A34, A36, GLIB_000:def_16; then not (the_Target_of G) . e in V1 by A38, XBOOLE_0:def_3; then (the_Target_of G) . e in (the_Vertices_of G) \ V1 by A37, XBOOLE_0:def_5; then e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ V1,G by A34, A36, GLIB_000:def_16; hence e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by GLIB_000:def_31; ::_thesis: verum end; assume A39: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) then A40: e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ V1,G by GLIB_000:def_31; then A41: (the_Target_of G) . e in (the_Vertices_of G) \ V1 by GLIB_000:def_16; then A42: not (the_Target_of G) . e in V1 by XBOOLE_0:def_5; then not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_0:def_3; then A43: (the_Target_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A41, XBOOLE_0:def_5; not (the_Target_of G) . e in V2 by A42, XBOOLE_0:def_3; then not e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by GLIB_000:def_16; then A44: not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by GLIB_000:def_31; (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A40, GLIB_000:def_16; then e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A39, A43, GLIB_000:def_16; then e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by GLIB_000:def_31; hence e in (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) by A44, XBOOLE_0:def_5; ::_thesis: verum end; then A45: (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by TARSKI:1; A46: dom (EL | ED) = ED by PARTFUN1:def_2; A47: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_EC)_holds_ (EL_|_EC)_._e_=_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_+*_(EL_|_ED))_._e let e be set ; ::_thesis: ( e in dom (EL | EC) implies (EL | EC) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e ) assume e in dom (EL | EC) ; ::_thesis: (EL | EC) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e then A48: e in EC ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_+*_(EL_|_ED))_._e_=_EL_._e percases ( not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) or e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ) ; suppose not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e = EL . e then A49: e in ED by A48, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e = (EL | ED) . e by A46, FUNCT_4:13 .= EL . e by A49, FUNCT_1:49 ; ::_thesis: verum end; supposeA50: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e = EL . e then not e in ED by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e = (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) . e by A46, FUNCT_4:11 .= EL . e by A50, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | EC) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) . e by A48, FUNCT_1:49; ::_thesis: verum end; reconsider EXV1cb = (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) as Subset of (the_Edges_of G) ; set EXXf = G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}); A51: dom (EL | EC) = EC by PARTFUN1:def_2; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_(G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_\_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_implies_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_)_&_(_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_implies_e_in_(G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_\_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_)_) let e be set ; ::_thesis: ( ( e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) implies e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) & ( e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) ) hereby ::_thesis: ( e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) assume A52: e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) then e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by XBOOLE_0:def_5; then A53: e DSJoins (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then A54: (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; A55: (the_Source_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A53, GLIB_000:def_16; then A56: not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_0:def_5; not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by A52, XBOOLE_0:def_5; then not e DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then not (the_Source_of G) . e in V2 by A52, A54, GLIB_000:def_16; then not (the_Source_of G) . e in V1 by A56, XBOOLE_0:def_3; then (the_Source_of G) . e in (the_Vertices_of G) \ V1 by A55, XBOOLE_0:def_5; then e DSJoins (the_Vertices_of G) \ V1,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A52, A54, GLIB_000:def_16; hence e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; ::_thesis: verum end; assume A57: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then A58: e DSJoins (the_Vertices_of G) \ V1,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then A59: (the_Source_of G) . e in (the_Vertices_of G) \ V1 by GLIB_000:def_16; then A60: not (the_Source_of G) . e in V1 by XBOOLE_0:def_5; then not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_0:def_3; then A61: (the_Source_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A59, XBOOLE_0:def_5; not (the_Source_of G) . e in V2 by A60, XBOOLE_0:def_3; then not e DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_16; then A62: not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A58, GLIB_000:def_16; then e DSJoins (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A57, A61, GLIB_000:def_16; then e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; hence e in (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by A62, XBOOLE_0:def_5; ::_thesis: verum end; then A63: (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by TARSKI:1; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_holds_ e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})) let e be set ; ::_thesis: ( e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) assume A64: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then A65: e DSJoins (the_Vertices_of G) \ V1,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; then A66: (the_Target_of G) . e in V1 by XBOOLE_0:def_3; (the_Source_of G) . e in (the_Vertices_of G) \ V1 by A65, GLIB_000:def_16; then e DSJoins (the_Vertices_of G) \ V1,V1,G by A64, A66, GLIB_000:def_16; hence e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by GLIB_000:def_31; ::_thesis: verum end; then A67: G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) c= G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by TARSKI:def_3; A68: not choose (((the_Vertices_of G) \ V2) \ {sink}) in V2 by A12, XBOOLE_0:def_5; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_holds_ e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}) let e be set ; ::_thesis: ( e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) assume A69: e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) then A70: e DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then A71: (the_Source_of G) . e in V2 by GLIB_000:def_16; then not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A68, TARSKI:def_1; then A72: (the_Source_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A71, XBOOLE_0:def_5; (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A70, GLIB_000:def_16; then e DSJoins (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A69, A72, GLIB_000:def_16; hence e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; ::_thesis: verum end; then A73: G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) c= G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by TARSKI:def_3; A74: V2 \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} is Subset of V2 ; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_G_.edgesDBetween_(V2,((the_Vertices_of_G)_\_V2))_implies_e_in_((G_.edgesDBetween_((V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_\/_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_)_&_(_e_in_((G_.edgesDBetween_((V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_\/_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_implies_e_in_G_.edgesDBetween_(V2,((the_Vertices_of_G)_\_V2))_)_) let e be set ; ::_thesis: ( ( e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) implies e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) ) & ( e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) implies e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) ) ) A75: ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) is Subset of ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; hereby ::_thesis: ( e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) implies e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) ) assume A76: e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) ; ::_thesis: e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) then A77: e DSJoins V2,(the_Vertices_of G) \ V2,G by GLIB_000:def_31; then A78: (the_Source_of G) . e in V2 by GLIB_000:def_16; A79: now__::_thesis:_not_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))) assume e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: contradiction then e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ V1,G by GLIB_000:def_31; then (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; hence contradiction by A68, A78, TARSKI:def_1; ::_thesis: verum end; A80: (the_Target_of G) . e in (the_Vertices_of G) \ V2 by A77, GLIB_000:def_16; A81: (the_Source_of G) . e in V1 by A78, XBOOLE_0:def_3; now__::_thesis:_e_in_((G_.edgesDBetween_((V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_\/_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))) percases ( (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} or not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ) ; suppose (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ; ::_thesis: e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) then e DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A76, A78, GLIB_000:def_16; then e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; then e in (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_0:def_3; hence e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by A79, XBOOLE_0:def_5; ::_thesis: verum end; suppose not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ; ::_thesis: e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) then (the_Target_of G) . e in (the_Vertices_of G) \ V1 by A13, A80, XBOOLE_0:def_5; then e DSJoins V1,(the_Vertices_of G) \ V1,G by A76, A81, GLIB_000:def_16; then e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by GLIB_000:def_31; then e in (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_0:def_3; hence e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by A79, XBOOLE_0:def_5; ::_thesis: verum end; end; end; hence e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) ; ::_thesis: verum end; assume A82: e in ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) ; ::_thesis: e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) then not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_0:def_5; then A83: not e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ V1,G by GLIB_000:def_31; now__::_thesis:_e_DSJoins_V2,(the_Vertices_of_G)_\_V2,G percases ( e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) or e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) by A82, A75, XBOOLE_0:def_3; supposeA84: e in G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: e DSJoins V2,(the_Vertices_of G) \ V2,G then A85: e DSJoins V1,(the_Vertices_of G) \ V1,G by GLIB_000:def_31; then A86: (the_Source_of G) . e in V1 by GLIB_000:def_16; A87: (the_Target_of G) . e in (the_Vertices_of G) \ V1 by A85, GLIB_000:def_16; then not (the_Target_of G) . e in V1 by XBOOLE_0:def_5; then not (the_Target_of G) . e in V2 by XBOOLE_0:def_3; then A88: (the_Target_of G) . e in (the_Vertices_of G) \ V2 by A87, XBOOLE_0:def_5; not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A83, A84, A87, GLIB_000:def_16; then (the_Source_of G) . e in V1 \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A86, XBOOLE_0:def_5; then (the_Source_of G) . e in V2 \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_1:40; hence e DSJoins V2,(the_Vertices_of G) \ V2,G by A74, A84, A88, GLIB_000:def_16; ::_thesis: verum end; supposeA89: e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: e DSJoins V2,(the_Vertices_of G) \ V2,G then A90: e DSJoins V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then A91: (the_Source_of G) . e in V2 by GLIB_000:def_16; (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A90, GLIB_000:def_16; then A92: not (the_Target_of G) . e in V2 by A68, TARSKI:def_1; (the_Target_of G) . e in the_Vertices_of G by A89, FUNCT_2:5; then (the_Target_of G) . e in (the_Vertices_of G) \ V2 by A92, XBOOLE_0:def_5; hence e DSJoins V2,(the_Vertices_of G) \ V2,G by A89, A91, GLIB_000:def_16; ::_thesis: verum end; end; end; hence e in G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) by GLIB_000:def_31; ::_thesis: verum end; then A93: G .edgesDBetween (V2,((the_Vertices_of G) \ V2)) = ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by TARSKI:1; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V2),V2)_implies_e_in_((G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\/_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_\_(G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_)_&_(_e_in_((G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\/_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_\_(G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_implies_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V2),V2)_)_) let e be set ; ::_thesis: ( ( e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) implies e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) & ( e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) implies e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) ) ) A94: ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) is Subset of ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) ; hereby ::_thesis: ( e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) implies e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) ) assume A95: e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) ; ::_thesis: e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then A96: e DSJoins (the_Vertices_of G) \ V2,V2,G by GLIB_000:def_31; then A97: (the_Target_of G) . e in V2 by GLIB_000:def_16; A98: now__::_thesis:_not_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}) assume e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: contradiction then e DSJoins (the_Vertices_of G) \ V1,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; then (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by GLIB_000:def_16; hence contradiction by A68, A97, TARSKI:def_1; ::_thesis: verum end; A99: (the_Source_of G) . e in (the_Vertices_of G) \ V2 by A96, GLIB_000:def_16; A100: (the_Target_of G) . e in V1 by A97, XBOOLE_0:def_3; now__::_thesis:_e_in_((G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_\/_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_\_(G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})) percases ( (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} or not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ) ; suppose (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ; ::_thesis: e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by A95, A97, GLIB_000:def_16; then e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by GLIB_000:def_31; then e in (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) by XBOOLE_0:def_3; hence e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by A98, XBOOLE_0:def_5; ::_thesis: verum end; suppose not (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} ; ::_thesis: e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then (the_Source_of G) . e in (the_Vertices_of G) \ V1 by A13, A99, XBOOLE_0:def_5; then e DSJoins (the_Vertices_of G) \ V1,V1,G by A95, A100, GLIB_000:def_16; then e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by GLIB_000:def_31; then e in (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) by XBOOLE_0:def_3; hence e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by A98, XBOOLE_0:def_5; ::_thesis: verum end; end; end; hence e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; ::_thesis: verum end; assume A101: e in ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) then not e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by XBOOLE_0:def_5; then A102: not e DSJoins (the_Vertices_of G) \ V1,{(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by GLIB_000:def_31; now__::_thesis:_e_DSJoins_(the_Vertices_of_G)_\_V2,V2,G percases ( e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) or e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ) by A101, A94, XBOOLE_0:def_3; supposeA103: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; ::_thesis: e DSJoins (the_Vertices_of G) \ V2,V2,G then A104: e DSJoins (the_Vertices_of G) \ V1,V1,G by GLIB_000:def_31; then A105: (the_Target_of G) . e in V1 by GLIB_000:def_16; A106: (the_Source_of G) . e in (the_Vertices_of G) \ V1 by A104, GLIB_000:def_16; then not (the_Source_of G) . e in V1 by XBOOLE_0:def_5; then not (the_Source_of G) . e in V2 by XBOOLE_0:def_3; then A107: (the_Source_of G) . e in (the_Vertices_of G) \ V2 by A106, XBOOLE_0:def_5; not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A102, A103, A106, GLIB_000:def_16; then (the_Target_of G) . e in V1 \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A105, XBOOLE_0:def_5; then (the_Target_of G) . e in V2 \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by XBOOLE_1:40; hence e DSJoins (the_Vertices_of G) \ V2,V2,G by A74, A103, A107, GLIB_000:def_16; ::_thesis: verum end; supposeA108: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: e DSJoins (the_Vertices_of G) \ V2,V2,G then A109: e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by GLIB_000:def_31; then A110: (the_Target_of G) . e in V2 by GLIB_000:def_16; (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A109, GLIB_000:def_16; then A111: not (the_Source_of G) . e in V2 by A68, TARSKI:def_1; (the_Source_of G) . e in the_Vertices_of G by A108, FUNCT_2:5; then (the_Source_of G) . e in (the_Vertices_of G) \ V2 by A111, XBOOLE_0:def_5; hence e DSJoins (the_Vertices_of G) \ V2,V2,G by A108, A110, GLIB_000:def_16; ::_thesis: verum end; end; end; hence e in G .edgesDBetween (((the_Vertices_of G) \ V2),V2) by GLIB_000:def_31; ::_thesis: verum end; then A112: G .edgesDBetween (((the_Vertices_of G) \ V2),V2) = E2 by TARSKI:1; A113: dom (EL | E2) = EC \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by PARTFUN1:def_2; A114: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_EC)_holds_ (EL_|_EC)_._e_=_((EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_E2))_._e let e be set ; ::_thesis: ( e in dom (EL | EC) implies (EL | EC) . e = ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e ) assume e in dom (EL | EC) ; ::_thesis: (EL | EC) . e = ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e then A115: e in EC ; now__::_thesis:_((EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_E2))_._e_=_EL_._e percases ( not e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) or e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) ; suppose not e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e = EL . e then A116: e in E2 by A115, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e = (EL | E2) . e by A113, FUNCT_4:13 .= EL . e by A116, FUNCT_1:49 ; ::_thesis: verum end; supposeA117: e in G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e = EL . e then not e in E2 by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e = (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e by A113, FUNCT_4:11 .= EL . e by A117, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | EC) . e = ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) . e by A115, FUNCT_1:49; ::_thesis: verum end; dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ED)) = (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) \/ ED by A46, FUNCT_4:def_1 .= (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) \/ ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) by XBOOLE_1:39 .= EC by XBOOLE_1:6 ; then A118: Sum (EL | EC) = (Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)))) + (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) by A21, A51, A47, FUNCT_1:2, GLIB_004:3; dom (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) = G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | E2)) = (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ (EC \ (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by A113, FUNCT_4:def_1 .= (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ ((G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),(V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) by XBOOLE_1:39 .= EC by A67, XBOOLE_1:10, XBOOLE_1:12 ; then A119: Sum (EL | EC) = (Sum (EL | E2)) + (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by A51, A114, FUNCT_1:2, GLIB_004:3; dom (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) = G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EB)) = (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ EB by A29, FUNCT_4:def_1 .= (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_1:39 .= EA by XBOOLE_1:6 ; then A120: Sum (EL | EA) = (Sum (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) + (Sum (EL | (G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))))) by A28, A18, A30, FUNCT_1:2, GLIB_004:3; reconsider EV1Xdb = (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) as Subset of (the_Edges_of G) ; A121: dom (EL | EV1Xdb) = (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by PARTFUN1:def_2; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)_holds_ e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})) let e be set ; ::_thesis: ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) implies e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) assume A122: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then A123: e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2,G by GLIB_000:def_31; then A124: (the_Target_of G) . e in V2 by GLIB_000:def_16; then not (the_Target_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A68, TARSKI:def_1; then A125: (the_Target_of G) . e in (the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A124, XBOOLE_0:def_5; (the_Source_of G) . e in {(choose (((the_Vertices_of G) \ V2) \ {sink}))} by A123, GLIB_000:def_16; then e DSJoins {(choose (((the_Vertices_of G) \ V2) \ {sink}))},(the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))},G by A122, A125, GLIB_000:def_16; hence e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by GLIB_000:def_31; ::_thesis: verum end; then A126: G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) c= G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by TARSKI:def_3; A127: dom (EL | E1) = EA \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by PARTFUN1:def_2; A128: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_EA)_holds_ (EL_|_EA)_._e_=_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))))_+*_(EL_|_E1))_._e let e be set ; ::_thesis: ( e in dom (EL | EA) implies (EL | EA) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e ) assume e in dom (EL | EA) ; ::_thesis: (EL | EA) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e then A129: e in EA ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_(V2_\/_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))))_+*_(EL_|_E1))_._e_=_EL_._e percases ( not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) or e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ) ; suppose not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e = EL . e then A130: e in E1 by A129, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e = (EL | E1) . e by A127, FUNCT_4:13 .= EL . e by A130, FUNCT_1:49 ; ::_thesis: verum end; supposeA131: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e = EL . e then not e in E1 by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e = (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) . e by A127, FUNCT_4:11 .= EL . e by A131, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | EA) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) . e by A129, FUNCT_1:49; ::_thesis: verum end; A132: dom (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) = G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by PARTFUN1:def_2; A133: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_holds_ (EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_._e_=_((EL_|_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_EV1Xdb))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) implies (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e ) assume A134: e in dom (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) ; ::_thesis: (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e then A135: e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; now__::_thesis:_((EL_|_(G_.edgesDBetween_(V2,{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})))_+*_(EL_|_EV1Xdb))_._e_=_EL_._e percases ( e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) or not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) ; supposeA136: e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e = EL . e then not e in EV1Xdb by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e = (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e by A121, FUNCT_4:11 .= EL . e by A136, FUNCT_1:49 ; ::_thesis: verum end; suppose not e in G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e = EL . e then A137: e in EV1Xdb by A135, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e = (EL | EV1Xdb) . e by A121, FUNCT_4:13 .= EL . e by A137, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) . e = ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | EV1Xdb)) . e by A134, FUNCT_1:49; ::_thesis: verum end; dom (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) = G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) +* (EL | ((G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) = (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ ((G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by A121, FUNCT_4:def_1 .= (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) \/ (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by XBOOLE_1:39 .= G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by A73, XBOOLE_1:12 ; then A138: (Sum (EL | (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) + (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) = Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by A63, A132, A133, FUNCT_1:2, GLIB_004:3; dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) +* (EL | E1)) = (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (EA \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) by A127, FUNCT_4:def_1 .= (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ ((G .edgesDBetween ((V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) \/ (G .edgesDBetween (V2,{(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_1:39 .= EA by A25, XBOOLE_1:10, XBOOLE_1:12 ; then A139: Sum (EL | EA) = (Sum (EL | E1)) + (Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))))) by A18, A128, FUNCT_1:2, GLIB_004:3; A140: dom (EL | EXV1cb) = (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) by PARTFUN1:def_2; A141: dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by PARTFUN1:def_2; A142: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_holds_ (EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))))_._e_=_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_+*_(EL_|_EXV1cb))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) implies (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e ) assume A143: e in dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) ; ::_thesis: (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e then A144: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},V2)))_+*_(EL_|_EXV1cb))_._e_=_EL_._e percases ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) or not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ) ; supposeA145: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e = EL . e then not e in EXV1cb by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e = (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) . e by A140, FUNCT_4:11 .= EL . e by A145, FUNCT_1:49 ; ::_thesis: verum end; suppose not e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) ; ::_thesis: ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e = EL . e then A146: e in EXV1cb by A144, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e = (EL | EXV1cb) . e by A140, FUNCT_4:13 .= EL . e by A146, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) . e = ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | EXV1cb)) . e by A143, FUNCT_1:49; ::_thesis: verum end; dom (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) +* (EL | ((G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))))) = (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) \/ ((G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) \ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2))) by A140, FUNCT_4:def_1 .= (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)) \/ (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))) by XBOOLE_1:39 .= G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by A126, XBOOLE_1:12 ; then A147: (Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},V2)))) + (Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ (V2 \/ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))))) = Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) by A45, A141, A142, FUNCT_1:2, GLIB_004:3; reconsider x = choose (((the_Vertices_of G) \ V2) \ {sink}) as Vertex of G by A12; A148: x .edgesOut() = G .edgesDBetween ({x},(the_Vertices_of G)) by GLIB_000:39; reconsider EXXeb = (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) as Subset of (the_Edges_of G) ; reconsider EXXfb = (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) as Subset of (the_Edges_of G) ; A149: dom (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) = G .edgesDBetween ((the_Vertices_of G),{x}) by PARTFUN1:def_2; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_(G_.edgesDBetween_((the_Vertices_of_G),{x}))_\_(G_.edgesDBetween_({x},{x}))_implies_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_)_&_(_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}),{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))})_implies_e_in_(G_.edgesDBetween_((the_Vertices_of_G),{x}))_\_(G_.edgesDBetween_({x},{x}))_)_) let e be set ; ::_thesis: ( ( e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) implies e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ) & ( e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) ) ) hereby ::_thesis: ( e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) implies e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) ) assume A150: e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) then e in G .edgesDBetween ((the_Vertices_of G),{x}) by XBOOLE_0:def_5; then A151: e DSJoins the_Vertices_of G,{x},G by GLIB_000:def_31; then A152: (the_Source_of G) . e in the_Vertices_of G by GLIB_000:def_16; A153: (the_Target_of G) . e in {x} by A151, GLIB_000:def_16; not e in G .edgesDBetween ({x},{x}) by A150, XBOOLE_0:def_5; then not e DSJoins {x},{x},G by GLIB_000:def_31; then not (the_Source_of G) . e in {x} by A150, A153, GLIB_000:def_16; then (the_Source_of G) . e in (the_Vertices_of G) \ {x} by A152, XBOOLE_0:def_5; then e DSJoins (the_Vertices_of G) \ {x},{x},G by A150, A153, GLIB_000:def_16; hence e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by GLIB_000:def_31; ::_thesis: verum end; assume A154: e in G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) ; ::_thesis: e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) then A155: e DSJoins (the_Vertices_of G) \ {x},{x},G by GLIB_000:def_31; then A156: (the_Source_of G) . e in (the_Vertices_of G) \ {x} by GLIB_000:def_16; then not (the_Source_of G) . e in {x} by XBOOLE_0:def_5; then not e DSJoins {x},{x},G by GLIB_000:def_16; then A157: not e in G .edgesDBetween ({x},{x}) by GLIB_000:def_31; (the_Target_of G) . e in {x} by A155, GLIB_000:def_16; then e DSJoins the_Vertices_of G,{x},G by A154, A156, GLIB_000:def_16; then e in G .edgesDBetween ((the_Vertices_of G),{x}) by GLIB_000:def_31; hence e in (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) by A157, XBOOLE_0:def_5; ::_thesis: verum end; then A158: (G .edgesDBetween ((the_Vertices_of G),{x})) \ (G .edgesDBetween ({x},{x})) = G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))}) by TARSKI:1; A159: dom (EL | EXXfb) = EXXfb by PARTFUN1:def_2; A160: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesDBetween_((the_Vertices_of_G),{x})))_holds_ (EL_|_(G_.edgesDBetween_((the_Vertices_of_G),{x})))_._e_=_((EL_|_(G_.edgesDBetween_({x},{x})))_+*_(EL_|_EXXfb))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) implies (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e ) assume e in dom (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) ; ::_thesis: (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e then A161: e in G .edgesDBetween ((the_Vertices_of G),{x}) ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({x},{x})))_+*_(EL_|_EXXfb))_._e_=_EL_._e percases ( e in G .edgesDBetween ({x},{x}) or not e in G .edgesDBetween ({x},{x}) ) ; supposeA162: e in G .edgesDBetween ({x},{x}) ; ::_thesis: ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e = EL . e then not e in EXXfb by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e = (EL | (G .edgesDBetween ({x},{x}))) . e by A159, FUNCT_4:11 .= EL . e by A162, FUNCT_1:49 ; ::_thesis: verum end; suppose not e in G .edgesDBetween ({x},{x}) ; ::_thesis: ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e = EL . e then A163: e in EXXfb by A161, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e = (EL | EXXfb) . e by A159, FUNCT_4:13 .= EL . e by A163, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) . e by A161, FUNCT_1:49; ::_thesis: verum end; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_(G_.edgesDBetween_({x},(the_Vertices_of_G)))_\_(G_.edgesDBetween_({x},{x}))_implies_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_)_&_(_e_in_G_.edgesDBetween_({(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))},((the_Vertices_of_G)_\_{(choose_(((the_Vertices_of_G)_\_V2)_\_{sink}))}))_implies_e_in_(G_.edgesDBetween_({x},(the_Vertices_of_G)))_\_(G_.edgesDBetween_({x},{x}))_)_) let e be set ; ::_thesis: ( ( e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) implies e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ) & ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) implies e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) ) ) hereby ::_thesis: ( e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) implies e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) ) assume A164: e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) ; ::_thesis: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) then e in G .edgesDBetween ({x},(the_Vertices_of G)) by XBOOLE_0:def_5; then A165: e DSJoins {x}, the_Vertices_of G,G by GLIB_000:def_31; then A166: (the_Target_of G) . e in the_Vertices_of G by GLIB_000:def_16; A167: (the_Source_of G) . e in {x} by A165, GLIB_000:def_16; not e in G .edgesDBetween ({x},{x}) by A164, XBOOLE_0:def_5; then not e DSJoins {x},{x},G by GLIB_000:def_31; then not (the_Target_of G) . e in {x} by A164, A167, GLIB_000:def_16; then (the_Target_of G) . e in (the_Vertices_of G) \ {x} by A166, XBOOLE_0:def_5; then e DSJoins {x},(the_Vertices_of G) \ {x},G by A164, A167, GLIB_000:def_16; hence e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by GLIB_000:def_31; ::_thesis: verum end; assume A168: e in G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) ; ::_thesis: e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) then A169: e DSJoins {x},(the_Vertices_of G) \ {x},G by GLIB_000:def_31; then A170: (the_Target_of G) . e in (the_Vertices_of G) \ {x} by GLIB_000:def_16; then not (the_Target_of G) . e in {x} by XBOOLE_0:def_5; then not e DSJoins {x},{x},G by GLIB_000:def_16; then A171: not e in G .edgesDBetween ({x},{x}) by GLIB_000:def_31; (the_Source_of G) . e in {x} by A169, GLIB_000:def_16; then e DSJoins {x}, the_Vertices_of G,G by A168, A170, GLIB_000:def_16; then e in G .edgesDBetween ({x},(the_Vertices_of G)) by GLIB_000:def_31; hence e in (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) by A171, XBOOLE_0:def_5; ::_thesis: verum end; then A172: (G .edgesDBetween ({x},(the_Vertices_of G))) \ (G .edgesDBetween ({x},{x})) = G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))})) by TARSKI:1; A173: dom (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) = G .edgesDBetween ({x},(the_Vertices_of G)) by PARTFUN1:def_2; A174: dom (EL | EXXeb) = EXXeb by PARTFUN1:def_2; A175: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesDBetween_({x},(the_Vertices_of_G))))_holds_ (EL_|_(G_.edgesDBetween_({x},(the_Vertices_of_G))))_._e_=_((EL_|_(G_.edgesDBetween_({x},{x})))_+*_(EL_|_EXXeb))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) implies (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e ) assume e in dom (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) ; ::_thesis: (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e then A176: e in G .edgesDBetween ({x},(the_Vertices_of G)) ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({x},{x})))_+*_(EL_|_EXXeb))_._e_=_EL_._e percases ( e in G .edgesDBetween ({x},{x}) or not e in G .edgesDBetween ({x},{x}) ) ; supposeA177: e in G .edgesDBetween ({x},{x}) ; ::_thesis: ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e = EL . e then not e in EXXeb by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e = (EL | (G .edgesDBetween ({x},{x}))) . e by A174, FUNCT_4:11 .= EL . e by A177, FUNCT_1:49 ; ::_thesis: verum end; suppose not e in G .edgesDBetween ({x},{x}) ; ::_thesis: ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e = EL . e then A178: e in EXXeb by A176, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e = (EL | EXXeb) . e by A174, FUNCT_4:13 .= EL . e by A178, FUNCT_1:49 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) . e = ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) . e by A176, FUNCT_1:49; ::_thesis: verum end; A179: dom (EL | (G .edgesDBetween ({x},{x}))) = G .edgesDBetween ({x},{x}) by PARTFUN1:def_2; then dom ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXfb)) = (G .edgesDBetween ({x},{x})) \/ EXXfb by A159, FUNCT_4:def_1 .= (G .edgesDBetween ({x},{x})) \/ (G .edgesDBetween ((the_Vertices_of G),{x})) by XBOOLE_1:39 .= G .edgesDBetween ((the_Vertices_of G),{x}) by GLIB_000:38, XBOOLE_1:12 ; then A180: Sum (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) = (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}),{(choose (((the_Vertices_of G) \ V2) \ {sink}))})))) + (Sum (EL | (G .edgesDBetween ({x},{x})))) by A158, A149, A160, FUNCT_1:2, GLIB_004:3; dom ((EL | (G .edgesDBetween ({x},{x}))) +* (EL | EXXeb)) = (G .edgesDBetween ({x},{x})) \/ EXXeb by A179, A174, FUNCT_4:def_1 .= (G .edgesDBetween ({x},{x})) \/ (G .edgesDBetween ({x},(the_Vertices_of G))) by XBOOLE_1:39 .= G .edgesDBetween ({x},(the_Vertices_of G)) by GLIB_000:38, XBOOLE_1:12 ; then A181: Sum (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) = (Sum (EL | (G .edgesDBetween ({(choose (((the_Vertices_of G) \ V2) \ {sink}))},((the_Vertices_of G) \ {(choose (((the_Vertices_of G) \ V2) \ {sink}))}))))) + (Sum (EL | (G .edgesDBetween ({x},{x})))) by A172, A173, A175, FUNCT_1:2, GLIB_004:3; x .edgesIn() = G .edgesDBetween ((the_Vertices_of G),{x}) by GLIB_000:39; then Sum (EL | (G .edgesDBetween ((the_Vertices_of G),{x}))) = Sum (EL | (G .edgesDBetween ({x},(the_Vertices_of G)))) by A1, A9, A68, A16, A148, Def2; hence EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V2,((the_Vertices_of G) \ V2))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V2),V2)))) by A17, A93, A139, A120, A112, A119, A118, A138, A147, A180, A181; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; now__::_thesis:_for_V_being_Subset_of_(the_Vertices_of_G)_st_card_((the_Vertices_of_G)_\_V)_=_1_&_source_in_V_&_not_sink_in_V_holds_ EL_.flow_(source,sink)_=_(Sum_(EL_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V)))))_-_(Sum_(EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))) set ESS = G .edgesDBetween ({sink},{sink}); let V be Subset of (the_Vertices_of G); ::_thesis: ( card ((the_Vertices_of G) \ V) = 1 & source in V & not sink in V implies EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) ) assume that A182: card ((the_Vertices_of G) \ V) = 1 and source in V and A183: not sink in V ; ::_thesis: EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) reconsider EOUT = (G .edgesOutOf {sink}) \ (G .edgesDBetween ({sink},{sink})) as Subset of (the_Edges_of G) ; consider v being set such that A184: (the_Vertices_of G) \ V = {v} by A182, CARD_2:42; sink is Vertex of G by A1, Def2; then sink in (the_Vertices_of G) \ V by A183, XBOOLE_0:def_5; then A185: v = sink by A184, TARSKI:def_1; A186: now__::_thesis:_for_x_being_set_holds_ (_(_x_in_(the_Vertices_of_G)_\_{sink}_implies_x_in_V_)_&_(_x_in_V_implies_x_in_(the_Vertices_of_G)_\_{sink}_)_) let x be set ; ::_thesis: ( ( x in (the_Vertices_of G) \ {sink} implies x in V ) & ( x in V implies x in (the_Vertices_of G) \ {sink} ) ) hereby ::_thesis: ( x in V implies x in (the_Vertices_of G) \ {sink} ) assume A187: x in (the_Vertices_of G) \ {sink} ; ::_thesis: x in V then not x in {sink} by XBOOLE_0:def_5; hence x in V by A184, A185, A187, XBOOLE_0:def_5; ::_thesis: verum end; assume A188: x in V ; ::_thesis: x in (the_Vertices_of G) \ {sink} then not x in {sink} by A183, TARSKI:def_1; hence x in (the_Vertices_of G) \ {sink} by A188, XBOOLE_0:def_5; ::_thesis: verum end; then A189: V = (the_Vertices_of G) \ {sink} by TARSKI:1; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)_implies_e_in_EOUT_)_&_(_e_in_EOUT_implies_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)_)_) let e be set ; ::_thesis: ( ( e in G .edgesDBetween (((the_Vertices_of G) \ V),V) implies e in EOUT ) & ( e in EOUT implies e in G .edgesDBetween (((the_Vertices_of G) \ V),V) ) ) hereby ::_thesis: ( e in EOUT implies e in G .edgesDBetween (((the_Vertices_of G) \ V),V) ) assume A190: e in G .edgesDBetween (((the_Vertices_of G) \ V),V) ; ::_thesis: e in EOUT then A191: e DSJoins {sink},(the_Vertices_of G) \ {sink},G by A184, A185, A189, GLIB_000:def_31; then A192: (the_Target_of G) . e in (the_Vertices_of G) \ {sink} by GLIB_000:def_16; A193: now__::_thesis:_not_e_in_G_.edgesDBetween_({sink},{sink}) assume e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: contradiction then e DSJoins {sink},{sink},G by GLIB_000:def_31; then (the_Target_of G) . e in {sink} by GLIB_000:def_16; hence contradiction by A192, XBOOLE_0:def_5; ::_thesis: verum end; (the_Source_of G) . e in {sink} by A191, GLIB_000:def_16; then e in G .edgesOutOf {sink} by A190, GLIB_000:def_27; hence e in EOUT by A193, XBOOLE_0:def_5; ::_thesis: verum end; assume A194: e in EOUT ; ::_thesis: e in G .edgesDBetween (((the_Vertices_of G) \ V),V) (G .edgesOutOf {sink}) \ (G .edgesDBetween ({sink},{sink})) is Subset of (G .edgesOutOf {sink}) ; then A195: (the_Source_of G) . e in {sink} by A194, GLIB_000:def_27; A196: not e in G .edgesDBetween ({sink},{sink}) by A194, XBOOLE_0:def_5; now__::_thesis:_(the_Target_of_G)_._e_in_V assume A197: not (the_Target_of G) . e in V ; ::_thesis: contradiction (the_Target_of G) . e in the_Vertices_of G by A194, FUNCT_2:5; then (the_Target_of G) . e in {sink} by A189, A197, XBOOLE_0:def_5; then e DSJoins {sink},{sink},G by A194, A195, GLIB_000:def_16; hence contradiction by A196, GLIB_000:def_31; ::_thesis: verum end; then e DSJoins (the_Vertices_of G) \ V,V,G by A184, A185, A194, A195, GLIB_000:def_16; hence e in G .edgesDBetween (((the_Vertices_of G) \ V),V) by GLIB_000:def_31; ::_thesis: verum end; then A198: G .edgesDBetween (((the_Vertices_of G) \ V),V) = EOUT by TARSKI:1; set EESS = EL | (G .edgesDBetween ({sink},{sink})); reconsider EIN = (G .edgesInto {sink}) \ (G .edgesDBetween ({sink},{sink})) as Subset of (the_Edges_of G) ; A199: dom (EL | (G .edgesInto {sink})) = G .edgesInto {sink} by PARTFUN1:def_2; now__::_thesis:_for_e_being_set_holds_ (_(_e_in_G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))_implies_e_in_EIN_)_&_(_e_in_EIN_implies_e_in_G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))_)_) let e be set ; ::_thesis: ( ( e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) implies e in EIN ) & ( e in EIN implies e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) ) ) hereby ::_thesis: ( e in EIN implies e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) ) assume A200: e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) ; ::_thesis: e in EIN then A201: e DSJoins (the_Vertices_of G) \ {sink},{sink},G by A184, A185, A189, GLIB_000:def_31; then A202: (the_Source_of G) . e in (the_Vertices_of G) \ {sink} by GLIB_000:def_16; A203: now__::_thesis:_not_e_in_G_.edgesDBetween_({sink},{sink}) assume e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: contradiction then e DSJoins {sink},{sink},G by GLIB_000:def_31; then (the_Source_of G) . e in {sink} by GLIB_000:def_16; hence contradiction by A202, XBOOLE_0:def_5; ::_thesis: verum end; (the_Target_of G) . e in {sink} by A201, GLIB_000:def_16; then e in G .edgesInto {sink} by A200, GLIB_000:def_26; hence e in EIN by A203, XBOOLE_0:def_5; ::_thesis: verum end; assume A204: e in EIN ; ::_thesis: e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) (G .edgesInto {sink}) \ (G .edgesDBetween ({sink},{sink})) is Subset of (G .edgesInto {sink}) ; then A205: (the_Target_of G) . e in {sink} by A204, GLIB_000:def_26; A206: not e in G .edgesDBetween ({sink},{sink}) by A204, XBOOLE_0:def_5; now__::_thesis:_(the_Source_of_G)_._e_in_V assume not (the_Source_of G) . e in V ; ::_thesis: contradiction then A207: not (the_Source_of G) . e in (the_Vertices_of G) \ {sink} by A186; (the_Source_of G) . e in the_Vertices_of G by A204, FUNCT_2:5; then (the_Source_of G) . e in {sink} by A207, XBOOLE_0:def_5; then e DSJoins {sink},{sink},G by A204, A205, GLIB_000:def_16; hence contradiction by A206, GLIB_000:def_31; ::_thesis: verum end; then e DSJoins V,{sink},G by A204, A205, GLIB_000:def_16; hence e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) by A184, A185, GLIB_000:def_31; ::_thesis: verum end; then A208: G .edgesDBetween (V,((the_Vertices_of G) \ V)) = EIN by TARSKI:1; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_({sink},{sink})_holds_ e_in_G_.edgesOutOf_{sink} let e be set ; ::_thesis: ( e in G .edgesDBetween ({sink},{sink}) implies e in G .edgesOutOf {sink} ) assume A209: e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: e in G .edgesOutOf {sink} then e DSJoins {sink},{sink},G by GLIB_000:def_31; then (the_Source_of G) . e in {sink} by GLIB_000:def_16; hence e in G .edgesOutOf {sink} by A209, GLIB_000:def_27; ::_thesis: verum end; then A210: G .edgesDBetween ({sink},{sink}) c= G .edgesOutOf {sink} by TARSKI:def_3; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_({sink},{sink})_holds_ e_in_G_.edgesInto_{sink} let e be set ; ::_thesis: ( e in G .edgesDBetween ({sink},{sink}) implies e in G .edgesInto {sink} ) assume A211: e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: e in G .edgesInto {sink} then e DSJoins {sink},{sink},G by GLIB_000:def_31; then (the_Target_of G) . e in {sink} by GLIB_000:def_16; hence e in G .edgesInto {sink} by A211, GLIB_000:def_26; ::_thesis: verum end; then A212: G .edgesDBetween ({sink},{sink}) c= G .edgesInto {sink} by TARSKI:def_3; A213: dom (EL | (G .edgesDBetween ({sink},{sink}))) = G .edgesDBetween ({sink},{sink}) by PARTFUN1:def_2; A214: dom (EL | EOUT) = EOUT by PARTFUN1:def_2; A215: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesOutOf_{sink}))_holds_ (EL_|_(G_.edgesOutOf_{sink}))_._e_=_((EL_|_(G_.edgesDBetween_({sink},{sink})))_+*_(EL_|_EOUT))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesOutOf {sink})) implies (EL | (G .edgesOutOf {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e ) assume A216: e in dom (EL | (G .edgesOutOf {sink})) ; ::_thesis: (EL | (G .edgesOutOf {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e then A217: e in G .edgesOutOf {sink} ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({sink},{sink})))_+*_(EL_|_EOUT))_._e_=_EL_._e percases ( e in G .edgesDBetween ({sink},{sink}) or not e in G .edgesDBetween ({sink},{sink}) ) ; supposeA218: e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e = EL . e then not e in EOUT by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e = (EL | (G .edgesDBetween ({sink},{sink}))) . e by A214, FUNCT_4:11 .= EL . e by A213, A218, FUNCT_1:47 ; ::_thesis: verum end; suppose not e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e = EL . e then A219: e in EOUT by A217, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e = (EL | EOUT) . e by A214, FUNCT_4:13 .= EL . e by A214, A219, FUNCT_1:47 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesOutOf {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) . e by A216, FUNCT_1:47; ::_thesis: verum end; A220: dom (EL | EIN) = EIN by PARTFUN1:def_2; A221: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(G_.edgesInto_{sink}))_holds_ (EL_|_(G_.edgesInto_{sink}))_._e_=_((EL_|_(G_.edgesDBetween_({sink},{sink})))_+*_(EL_|_EIN))_._e let e be set ; ::_thesis: ( e in dom (EL | (G .edgesInto {sink})) implies (EL | (G .edgesInto {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e ) assume A222: e in dom (EL | (G .edgesInto {sink})) ; ::_thesis: (EL | (G .edgesInto {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e then A223: e in G .edgesInto {sink} ; now__::_thesis:_((EL_|_(G_.edgesDBetween_({sink},{sink})))_+*_(EL_|_EIN))_._e_=_EL_._e percases ( e in G .edgesDBetween ({sink},{sink}) or not e in G .edgesDBetween ({sink},{sink}) ) ; supposeA224: e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e = EL . e then not e in EIN by XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e = (EL | (G .edgesDBetween ({sink},{sink}))) . e by A220, FUNCT_4:11 .= EL . e by A213, A224, FUNCT_1:47 ; ::_thesis: verum end; suppose not e in G .edgesDBetween ({sink},{sink}) ; ::_thesis: ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e = EL . e then A225: e in EIN by A223, XBOOLE_0:def_5; hence ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e = (EL | EIN) . e by A220, FUNCT_4:13 .= EL . e by A220, A225, FUNCT_1:47 ; ::_thesis: verum end; end; end; hence (EL | (G .edgesInto {sink})) . e = ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) . e by A222, FUNCT_1:47; ::_thesis: verum end; A226: (G .edgesDBetween ({sink},{sink})) \/ EIN = (G .edgesInto {sink}) \/ (G .edgesDBetween ({sink},{sink})) by XBOOLE_1:39 .= G .edgesInto {sink} by A212, XBOOLE_1:12 ; dom ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EIN)) = (G .edgesDBetween ({sink},{sink})) \/ EIN by A213, A220, FUNCT_4:def_1; then A227: Sum (EL | (G .edgesInto {sink})) = (Sum (EL | EIN)) + (Sum (EL | (G .edgesDBetween ({sink},{sink})))) by A226, A199, A221, FUNCT_1:2, GLIB_004:3; (G .edgesDBetween ({sink},{sink})) \/ EOUT = (G .edgesOutOf {sink}) \/ (G .edgesDBetween ({sink},{sink})) by XBOOLE_1:39 .= G .edgesOutOf {sink} by A210, XBOOLE_1:12 ; then A228: dom ((EL | (G .edgesDBetween ({sink},{sink}))) +* (EL | EOUT)) = G .edgesOutOf {sink} by A213, A214, FUNCT_4:def_1; dom (EL | (G .edgesOutOf {sink})) = G .edgesOutOf {sink} by PARTFUN1:def_2; then EL .flow (source,sink) = ((Sum (EL | EIN)) + (Sum (EL | (G .edgesDBetween ({sink},{sink}))))) - ((Sum (EL | (G .edgesDBetween ({sink},{sink})))) + (Sum (EL | EOUT))) by A227, A228, A215, FUNCT_1:2, GLIB_004:3 .= (Sum (EL | EIN)) - (Sum (EL | EOUT)) ; hence EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) by A208, A198; ::_thesis: verum end; then A229: S1[1] ; for n being non empty Nat holds S1[n] from NAT_1:sch_10(A229, A6); hence EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) by A2, A3, A4; ::_thesis: verum end; theorem Th12: :: GLIB_005:12 for G being finite real-weighted WGraph for EL being FF:ELabeling of G for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) proof let G be finite real-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) let EL be FF:ELabeling of G; ::_thesis: for source, sink being set for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) let source, sink be set ; ::_thesis: for V being Subset of (the_Vertices_of G) st EL has_valid_flow_from source,sink & source in V & not sink in V holds EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) let V be Subset of (the_Vertices_of G); ::_thesis: ( EL has_valid_flow_from source,sink & source in V & not sink in V implies EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) ) assume that A1: EL has_valid_flow_from source,sink and A2: source in V and A3: not sink in V ; ::_thesis: EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) set W1 = (the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V))); set E2 = EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)); set E1 = EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))); now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))_holds_ (EL_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._e_<=_((the_Weight_of_G)_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._e let e be set ; ::_thesis: ( e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) implies (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e <= ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e ) assume A4: e in G .edgesDBetween (V,((the_Vertices_of G) \ V)) ; ::_thesis: (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e <= ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e then A5: ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e = (the_Weight_of G) . e by FUNCT_1:49; (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e = EL . e by A4, FUNCT_1:49; hence (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e <= ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . e by A1, A4, A5, Def2; ::_thesis: verum end; then Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) by GLIB_004:5; then A6: (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) <= (Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) by XREAL_1:9; set B1 = EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V)); A7: now__::_thesis:_for_e_being_set_st_e_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)_holds_ (EmptyBag_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))_._e_<=_(EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))_._e let e be set ; ::_thesis: ( e in G .edgesDBetween (((the_Vertices_of G) \ V),V) implies (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e <= (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e ) A8: EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V)) = (G .edgesDBetween (((the_Vertices_of G) \ V),V)) --> 0 by PRE_POLY:def_13; assume e in G .edgesDBetween (((the_Vertices_of G) \ V),V) ; ::_thesis: (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e <= (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e hence (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e <= (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . e by A8, FUNCOP_1:7; ::_thesis: verum end; Sum (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) = 0 by UPROOTS:11; then 0 <= Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) by A7, GLIB_004:5; then A9: (Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) <= (Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - 0 by XREAL_1:13; EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) by A1, A2, A3, Th11; hence EL .flow (source,sink) <= Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) by A9, A6, XXREAL_0:2; ::_thesis: verum end; theorem Th13: :: GLIB_005:13 for G being finite natural-weighted WGraph for EL being FF:ELabeling of G for W being Walk of G st not W is trivial & W is_augmenting_wrt EL holds 0 < W .tolerance EL proof let G be finite natural-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for W being Walk of G st not W is trivial & W is_augmenting_wrt EL holds 0 < W .tolerance EL let EL be FF:ELabeling of G; ::_thesis: for W being Walk of G st not W is trivial & W is_augmenting_wrt EL holds 0 < W .tolerance EL let W be Walk of G; ::_thesis: ( not W is trivial & W is_augmenting_wrt EL implies 0 < W .tolerance EL ) assume that A1: not W is trivial and A2: W is_augmenting_wrt EL ; ::_thesis: 0 < W .tolerance EL set T = W .tolerance EL; W .tolerance EL in rng (W .flowSeq EL) by A1, A2, Def16; then consider n being Nat such that A3: n in dom (W .flowSeq EL) and A4: W .tolerance EL = (W .flowSeq EL) . n by FINSEQ_2:10; reconsider n = n as Element of NAT by ORDINAL1:def_12; dom (W .flowSeq EL) = dom (W .edgeSeq()) by A2, Def15; then A5: 2 * n in dom W by A3, GLIB_001:78; then 1 <= 2 * n by FINSEQ_3:25; then reconsider 2n1 = (2 * n) - 1 as odd Element of NAT by INT_1:5; 2 * n <= len W by A5, FINSEQ_3:25; then A6: (2 * n) - 1 < (len W) - 0 by XREAL_1:15; set v1 = W . 2n1; set e = W . (2 * n); set v2 = W . ((2 * n) + 1); A7: ((2 * n) - 1) + 2 = (2 * n) + 1 ; A8: ((2 * n) - 1) + 1 = 2 * n ; now__::_thesis:_0_<_W_.tolerance_EL percases ( W . (2 * n) DJoins W . 2n1,W . ((2 * n) + 1),G or not W . (2 * n) DJoins W . 2n1,W . ((2 * n) + 1),G ) ; supposeA9: W . (2 * n) DJoins W . 2n1,W . ((2 * n) + 1),G ; ::_thesis: 0 < W .tolerance EL then A10: W .tolerance EL = ((the_Weight_of G) . (W . (2 * n))) - (EL . (W . (2 * n))) by A2, A3, A4, Def15; EL . (W . (2 * n)) < (the_Weight_of G) . (W . (2 * n)) by A2, A6, A8, A7, A9, Def8; then (EL . (W . (2 * n))) - (EL . (W . (2 * n))) < W .tolerance EL by A10, XREAL_1:14; hence 0 < W .tolerance EL ; ::_thesis: verum end; supposeA11: not W . (2 * n) DJoins W . 2n1,W . ((2 * n) + 1),G ; ::_thesis: 0 < W .tolerance EL then W .tolerance EL = EL . (W . (2 * n)) by A2, A3, A4, Def15; hence 0 < W .tolerance EL by A2, A6, A8, A7, A11, Def8; ::_thesis: verum end; end; end; hence 0 < W .tolerance EL ; ::_thesis: verum end; theorem Th14: :: GLIB_005:14 for G being finite natural-weighted WGraph for EL being FF:ELabeling of G for source, sink being set for P being Path of G st source <> sink & EL has_valid_flow_from source,sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds FF:PushFlow (EL,P) has_valid_flow_from source,sink proof let G be finite natural-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source, sink being set for P being Path of G st source <> sink & EL has_valid_flow_from source,sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds FF:PushFlow (EL,P) has_valid_flow_from source,sink let EL be FF:ELabeling of G; ::_thesis: for source, sink being set for P being Path of G st source <> sink & EL has_valid_flow_from source,sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds FF:PushFlow (EL,P) has_valid_flow_from source,sink let source, sink be set ; ::_thesis: for P being Path of G st source <> sink & EL has_valid_flow_from source,sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds FF:PushFlow (EL,P) has_valid_flow_from source,sink let P be Path of G; ::_thesis: ( source <> sink & EL has_valid_flow_from source,sink & P is_Walk_from source,sink & P is_augmenting_wrt EL implies FF:PushFlow (EL,P) has_valid_flow_from source,sink ) assume that A1: source <> sink and A2: EL has_valid_flow_from source,sink and A3: P is_Walk_from source,sink and A4: P is_augmenting_wrt EL ; ::_thesis: FF:PushFlow (EL,P) has_valid_flow_from source,sink set EL2 = FF:PushFlow (EL,P); now__::_thesis:_(_source_is_Vertex_of_G_&_sink_is_Vertex_of_G_&_(_for_e_being_set_st_e_in_the_Edges_of_G_holds_ (_0_<=_(FF:PushFlow_(EL,P))_._e_&_(FF:PushFlow_(EL,P))_._e_<=_(the_Weight_of_G)_._e_)_)_&_(_for_v_being_Vertex_of_G_st_v_<>_source_&_v_<>_sink_holds_ Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_=_Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_)_) thus ( source is Vertex of G & sink is Vertex of G ) by A2, Def2; ::_thesis: ( ( for e being set st e in the_Edges_of G holds ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) ) & ( for v being Vertex of G st v <> source & v <> sink holds Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) ) ) now__::_thesis:_for_e_being_set_st_e_in_the_Edges_of_G_holds_ (_0_<=_(FF:PushFlow_(EL,P))_._e_&_(FF:PushFlow_(EL,P))_._e_<=_(the_Weight_of_G)_._e_) let e be set ; ::_thesis: ( e in the_Edges_of G implies ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) ) assume A5: e in the_Edges_of G ; ::_thesis: ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) then A6: EL . e <= (the_Weight_of G) . e by A2, Def2; now__::_thesis:_(_0_<=_(FF:PushFlow_(EL,P))_._e_&_(FF:PushFlow_(EL,P))_._e_<=_(the_Weight_of_G)_._e_) percases ( not e in P .edges() or e in P .edges() ) ; suppose not e in P .edges() ; ::_thesis: ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) hence ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) by A4, A5, A6, Def17; ::_thesis: verum end; suppose e in P .edges() ; ::_thesis: ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) then consider n being odd Element of NAT such that A7: n < len P and A8: P . (n + 1) = e by GLIB_001:100; set PFS = P .flowSeq EL; set n1div2 = (n + 1) div 2; A9: 1 <= n + 1 by NAT_1:11; n + 1 <= len P by A7, NAT_1:13; then (n + 1) div 2 in dom (P .edgeSeq()) by A9, GLIB_001:77; then A10: (n + 1) div 2 in dom (P .flowSeq EL) by A4, Def15; A11: now__::_thesis:_(_e_DJoins_P_._n,P_._(n_+_2),G_implies_not_e_DJoins_P_._(n_+_2),P_._n,G_) A12: n + 0 < n + 2 by XREAL_1:8; assume that A13: e DJoins P . n,P . (n + 2),G and A14: e DJoins P . (n + 2),P . n,G ; ::_thesis: contradiction A15: (the_Source_of G) . e = P . n by A13, GLIB_000:def_14; A16: (the_Source_of G) . e = P . (n + 2) by A14, GLIB_000:def_14; A17: n + 2 <= len P by A7, GLIB_001:1; then n = 1 by A15, A16, A12, GLIB_001:def_28; then A18: P . n = source by A3, GLIB_001:17; n + 2 = len P by A15, A16, A12, A17, GLIB_001:def_28; hence contradiction by A1, A3, A15, A16, A18, GLIB_001:17; ::_thesis: verum end; A19: P .last() = sink by A3, GLIB_001:def_23; P .first() = source by A3, GLIB_001:def_23; then A20: not P is trivial by A1, A19, GLIB_001:127; 2 divides n + 1 by PEPIN:22; then A21: 2 * ((n + 1) div 2) = n + 1 by NAT_D:3; then A22: (2 * ((n + 1) div 2)) - 1 = n ; A23: (2 * ((n + 1) div 2)) + 1 = n + 2 by A21; A24: e Joins P . n,P . (n + 2),G by A7, A8, GLIB_001:def_3; now__::_thesis:_(_0_<=_(FF:PushFlow_(EL,P))_._e_&_(FF:PushFlow_(EL,P))_._e_<=_(the_Weight_of_G)_._e_) percases ( e DJoins P . n,P . (n + 2),G or e DJoins P . (n + 2),P . n,G ) by A24, GLIB_000:16; supposeA25: e DJoins P . n,P . (n + 2),G ; ::_thesis: ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) then (P .flowSeq EL) . ((n + 1) div 2) = ((the_Weight_of G) . e) - (EL . e) by A4, A8, A10, A22, A23, Def15; then ((the_Weight_of G) . e) - (EL . e) in rng (P .flowSeq EL) by A10, FUNCT_1:def_3; then A26: P .tolerance EL <= ((the_Weight_of G) . e) - (EL . e) by A4, A20, Def16; thus 0 <= (FF:PushFlow (EL,P)) . e ; ::_thesis: (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e (EL . e) + (P .tolerance EL) = (FF:PushFlow (EL,P)) . e by A4, A7, A8, A25, Def17; then (FF:PushFlow (EL,P)) . e <= (((the_Weight_of G) . e) - (EL . e)) + (EL . e) by A26, XREAL_1:7; hence (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ; ::_thesis: verum end; supposeA27: e DJoins P . (n + 2),P . n,G ; ::_thesis: ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) thus 0 <= (FF:PushFlow (EL,P)) . e ; ::_thesis: (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e (FF:PushFlow (EL,P)) . e = (EL . e) - (P .tolerance EL) by A4, A7, A8, A11, A27, Def17; then (FF:PushFlow (EL,P)) . e <= (EL . e) - 0 by XREAL_1:13; hence (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e by A6, XXREAL_0:2; ::_thesis: verum end; end; end; hence ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) ; ::_thesis: verum end; end; end; hence ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) ; ::_thesis: verum end; hence for e being set st e in the_Edges_of G holds ( 0 <= (FF:PushFlow (EL,P)) . e & (FF:PushFlow (EL,P)) . e <= (the_Weight_of G) . e ) ; ::_thesis: for v being Vertex of G st v <> source & v <> sink holds Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) let v be Vertex of G; ::_thesis: ( v <> source & v <> sink implies Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) ) assume that A28: v <> source and A29: v <> sink ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) A30: Sum (EL | (v .edgesIn())) = Sum (EL | (v .edgesOut())) by A2, A28, A29, Def2; now__::_thesis:_Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_=_Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesOut())) percases ( v in P .vertices() or not v in P .vertices() ) ; suppose v in P .vertices() ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) then consider n being odd Element of NAT such that A31: n <= len P and A32: P . n = v by GLIB_001:87; A33: now__::_thesis:_not_n_=_len_P assume n = len P ; ::_thesis: contradiction then v = P .last() by A32, GLIB_001:def_7 .= sink by A3, GLIB_001:def_23 ; hence contradiction by A29; ::_thesis: verum end; then A34: n < len P by A31, XXREAL_0:1; A35: now__::_thesis:_not_n_=_1 assume n = 1 ; ::_thesis: contradiction then v = P .first() by A32, GLIB_001:def_6 .= source by A3, GLIB_001:def_23 ; hence contradiction by A28; ::_thesis: verum end; A36: now__::_thesis:_not_v_=_P_._(n_+_2) A37: n + 0 < n + 2 by XREAL_1:8; assume A38: v = P . (n + 2) ; ::_thesis: contradiction n + 2 <= len P by A34, GLIB_001:1; hence contradiction by A32, A35, A38, A37, GLIB_001:def_28; ::_thesis: verum end; 1 <= n by ABIAN:12; then 1 < n by A35, XXREAL_0:1; then 1 + 1 <= n by NAT_1:13; then reconsider n2 = n - (2 * 1) as odd Element of NAT by INT_1:5; set e1 = P . (n2 + 1); set e2 = P . (n + 1); set T = P .tolerance EL; A39: 1 <= n2 + 1 by NAT_1:11; A40: P . (n2 + 2) = v by A32; A41: now__::_thesis:_for_e_being_set_st_(_e_in_v_.edgesIn()_or_e_in_v_.edgesOut()_)_&_e_<>_P_._(n2_+_1)_&_e_<>_P_._(n_+_1)_holds_ not_e_in_P_.edges() let e be set ; ::_thesis: ( ( e in v .edgesIn() or e in v .edgesOut() ) & e <> P . (n2 + 1) & e <> P . (n + 1) implies not e in P .edges() ) assume that A42: ( e in v .edgesIn() or e in v .edgesOut() ) and A43: e <> P . (n2 + 1) and A44: e <> P . (n + 1) ; ::_thesis: not e in P .edges() now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A45: m + 2 <= len P and A46: v1 = P . m and A47: e = P . (m + 1) and A48: v2 = P . (m + 2) and A49: e Joins v1,v2,G by GLIB_001:103; A50: now__::_thesis:_(_v1_=_v_or_v2_=_v_) percases ( e in v .edgesIn() or e in v .edgesOut() ) by A42; suppose e in v .edgesIn() ; ::_thesis: ( v1 = v or v2 = v ) then (the_Target_of G) . e = v by GLIB_000:56; hence ( v1 = v or v2 = v ) by A49, GLIB_000:def_13; ::_thesis: verum end; suppose e in v .edgesOut() ; ::_thesis: ( v1 = v or v2 = v ) then (the_Source_of G) . e = v by GLIB_000:58; hence ( v1 = v or v2 = v ) by A49, GLIB_000:def_13; ::_thesis: verum end; end; end; A51: (m + 2) - 2 < (len P) - 0 by A45, XREAL_1:15; now__::_thesis:_contradiction percases ( v1 = v or v2 = v ) by A50; supposeA52: v1 = v ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m < n or m = n or n < m ) by XXREAL_0:1; suppose m < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A46, A52, GLIB_001:def_28; ::_thesis: verum end; suppose m = n ; ::_thesis: contradiction hence contradiction by A44, A47; ::_thesis: verum end; suppose n < m ; ::_thesis: contradiction hence contradiction by A32, A46, A51, A52, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; supposeA53: v2 = v ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m + 2 < n or m + 2 = n or n < m + 2 ) by XXREAL_0:1; suppose m + 2 < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A48, A53, GLIB_001:def_28; ::_thesis: verum end; suppose m + 2 = n ; ::_thesis: contradiction hence contradiction by A43, A47; ::_thesis: verum end; suppose n < m + 2 ; ::_thesis: contradiction hence contradiction by A32, A35, A45, A48, A53, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; hence not e in P .edges() ; ::_thesis: verum end; A54: now__::_thesis:_(_P_._(n_+_1)_DJoins_v,P_._(n_+_2),G_implies_not_P_._(n_+_1)_DJoins_P_._(n_+_2),v,G_) A55: n + 2 <= len P by A34, GLIB_001:1; A56: n + 0 < n + 2 by XREAL_1:8; assume that A57: P . (n + 1) DJoins v,P . (n + 2),G and A58: P . (n + 1) DJoins P . (n + 2),v,G ; ::_thesis: contradiction P . n = (the_Source_of G) . (P . (n + 1)) by A32, A57, GLIB_000:def_14 .= P . (n + 2) by A58, GLIB_000:def_14 ; hence contradiction by A35, A56, A55, GLIB_001:def_28; ::_thesis: verum end; n2 < n - 0 by XREAL_1:15; then A59: n2 + 1 < n + 1 by XREAL_1:8; n + 1 <= len P by A34, NAT_1:13; then A60: P . (n2 + 1) <> P . (n + 1) by A39, A59, GLIB_001:138; A61: now__::_thesis:_not_P_._n2_=_v A62: n2 < n - 0 by XREAL_1:15; assume P . n2 = v ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A62, GLIB_001:def_28; ::_thesis: verum end; A63: now__::_thesis:_(_P_._(n2_+_1)_DJoins_P_._n2,v,G_implies_not_P_._(n2_+_1)_DJoins_v,P_._n2,G_) assume that A64: P . (n2 + 1) DJoins P . n2,v,G and A65: P . (n2 + 1) DJoins v,P . n2,G ; ::_thesis: contradiction P . n2 = (the_Source_of G) . (P . (n2 + 1)) by A64, GLIB_000:def_14 .= v by A65, GLIB_000:def_14 ; hence contradiction by A61; ::_thesis: verum end; A66: n2 < (len P) - 0 by A31, XREAL_1:15; then A67: P . (n2 + 1) Joins P . n2,P . (n2 + 2),G by GLIB_001:def_3; A68: P . (n + 1) Joins v,P . (n + 2),G by A32, A34, GLIB_001:def_3; now__::_thesis:_Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_=_Sum_((FF:PushFlow_(EL,P))_|_(v_.edgesOut())) percases ( ( P . (n2 + 1) DJoins P . n2,v,G & P . (n + 1) DJoins v,P . (n + 2),G ) or ( P . (n2 + 1) DJoins P . n2,v,G & P . (n + 1) DJoins P . (n + 2),v,G ) or ( P . (n2 + 1) DJoins v,P . n2,G & P . (n + 1) DJoins v,P . (n + 2),G ) or ( P . (n2 + 1) DJoins v,P . n2,G & P . (n + 1) DJoins P . (n + 2),v,G ) ) by A32, A67, A68, GLIB_000:16; supposeA69: ( P . (n2 + 1) DJoins P . n2,v,G & P . (n + 1) DJoins v,P . (n + 2),G ) ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) set XIN = (EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))); A70: P . (n2 + 1) in v .edgesIn() by A69, GLIB_000:57; A71: dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) = {(P . (n2 + 1))} by FUNCOP_1:13; then A72: dom ((EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) = (dom (EL | (v .edgesIn()))) \/ {(P . (n2 + 1))} by FUNCT_4:def_1 .= (v .edgesIn()) \/ {(P . (n2 + 1))} by PARTFUN1:def_2 .= v .edgesIn() by A70, ZFMISC_1:40 ; then reconsider XIN = (EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) as Rbag of v .edgesIn() by PARTFUN1:def_2, RELAT_1:def_18; A73: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e_=_XIN_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) implies ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN . e ) assume e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN . e then A74: e in v .edgesIn() ; then A75: (the_Target_of G) . e = v by GLIB_000:56; now__::_thesis:_XIN_._e_=_(FF:PushFlow_(EL,P))_._e percases ( e = P . (n2 + 1) or e <> P . (n2 + 1) ) ; supposeA76: e = P . (n2 + 1) ; ::_thesis: XIN . e = (FF:PushFlow (EL,P)) . e then e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) by A71, TARSKI:def_1; hence XIN . e = ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) . (P . (n2 + 1)) by A76, FUNCT_4:13 .= (EL . (P . (n2 + 1))) + (P .tolerance EL) by FUNCOP_1:72 .= (FF:PushFlow (EL,P)) . e by A4, A66, A40, A69, A76, Def17 ; ::_thesis: verum end; supposeA77: e <> P . (n2 + 1) ; ::_thesis: (FF:PushFlow (EL,P)) . e = XIN . e A78: now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A79: m + 2 <= len P and A80: v1 = P . m and A81: e = P . (m + 1) and A82: v2 = P . (m + 2) and A83: e Joins v1,v2,G by GLIB_001:103; A84: (m + 2) - 2 < (len P) - 0 by A79, XREAL_1:15; now__::_thesis:_contradiction percases ( v = v1 or v = v2 ) by A75, A83, GLIB_000:def_13; supposeA85: v = v1 ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m < n or m = n or n < m ) by XXREAL_0:1; suppose m < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A80, A85, GLIB_001:def_28; ::_thesis: verum end; supposeA86: m = n ; ::_thesis: contradiction A87: (n + 2) - 2 < (n + 2) - 0 by XREAL_1:15; A88: n + 2 <= len P by A34, GLIB_001:1; P . (n + 2) = P . n by A32, A69, A75, A81, A86, GLIB_000:def_14; hence contradiction by A35, A87, A88, GLIB_001:def_28; ::_thesis: verum end; suppose n < m ; ::_thesis: contradiction hence contradiction by A32, A80, A84, A85, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; supposeA89: v = v2 ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m + 2 < n or m + 2 = n or n < m + 2 ) by XXREAL_0:1; suppose m + 2 < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A82, A89, GLIB_001:def_28; ::_thesis: verum end; suppose m + 2 = n ; ::_thesis: contradiction hence contradiction by A77, A81; ::_thesis: verum end; suppose n < m + 2 ; ::_thesis: contradiction hence contradiction by A32, A35, A79, A82, A89, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; not e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) by A77, TARSKI:def_1; then XIN . e = (EL | (v .edgesIn())) . e by FUNCT_4:11 .= EL . e by A74, FUNCT_1:49 ; hence (FF:PushFlow (EL,P)) . e = XIN . e by A4, A74, A78, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN . e by A74, FUNCT_1:49; ::_thesis: verum end; dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; then A90: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum XIN by A72, A73, FUNCT_1:2; A91: dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; set XOUT = (EL | (v .edgesOut())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))); A92: P . (n + 1) in v .edgesOut() by A69, GLIB_000:59; A93: dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) = {(P . (n + 1))} by FUNCOP_1:13; then A94: dom ((EL | (v .edgesOut())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL)))) = (dom (EL | (v .edgesOut()))) \/ {(P . (n + 1))} by FUNCT_4:def_1 .= (v .edgesOut()) \/ {(P . (n + 1))} by PARTFUN1:def_2 .= v .edgesOut() by A92, ZFMISC_1:40 ; then reconsider XOUT = (EL | (v .edgesOut())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) as Rbag of v .edgesOut() by PARTFUN1:def_2, RELAT_1:def_18; A95: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e_=_XOUT_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) implies ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT . e ) assume e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT . e then A96: e in v .edgesOut() ; then A97: (the_Source_of G) . e = v by GLIB_000:58; now__::_thesis:_XOUT_._e_=_(FF:PushFlow_(EL,P))_._e percases ( e = P . (n + 1) or e <> P . (n + 1) ) ; supposeA98: e = P . (n + 1) ; ::_thesis: XOUT . e = (FF:PushFlow (EL,P)) . e then e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) by A93, TARSKI:def_1; hence XOUT . e = ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) . (P . (n + 1)) by A98, FUNCT_4:13 .= (EL . (P . (n + 1))) + (P .tolerance EL) by FUNCOP_1:72 .= (FF:PushFlow (EL,P)) . e by A4, A32, A34, A69, A98, Def17 ; ::_thesis: verum end; supposeA99: e <> P . (n + 1) ; ::_thesis: (FF:PushFlow (EL,P)) . e = XOUT . e A100: now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A101: m + 2 <= len P and A102: v1 = P . m and A103: e = P . (m + 1) and A104: v2 = P . (m + 2) and A105: e Joins v1,v2,G by GLIB_001:103; A106: (m + 2) - 2 < (len P) - 0 by A101, XREAL_1:15; now__::_thesis:_contradiction percases ( v = v1 or v = v2 ) by A97, A105, GLIB_000:def_13; supposeA107: v = v1 ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m < n or m = n or n < m ) by XXREAL_0:1; suppose m < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A102, A107, GLIB_001:def_28; ::_thesis: verum end; suppose m = n ; ::_thesis: contradiction hence contradiction by A99, A103; ::_thesis: verum end; suppose n < m ; ::_thesis: contradiction hence contradiction by A32, A102, A106, A107, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; supposeA108: v = v2 ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( m + 2 < n or m + 2 = n or n < m + 2 ) by XXREAL_0:1; suppose m + 2 < n ; ::_thesis: contradiction hence contradiction by A31, A32, A33, A104, A108, GLIB_001:def_28; ::_thesis: verum end; supposeA109: m + 2 = n ; ::_thesis: contradiction A110: n2 < n - 0 by XREAL_1:15; P . n2 = P . n by A32, A69, A97, A103, A109, GLIB_000:def_14; hence contradiction by A31, A33, A110, GLIB_001:def_28; ::_thesis: verum end; suppose n < m + 2 ; ::_thesis: contradiction hence contradiction by A32, A35, A101, A104, A108, GLIB_001:def_28; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) by A99, TARSKI:def_1; then XOUT . e = (EL | (v .edgesOut())) . e by FUNCT_4:11 .= EL . e by A96, FUNCT_1:49 ; hence (FF:PushFlow (EL,P)) . e = XOUT . e by A4, A96, A100, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT . e by A96, FUNCT_1:49; ::_thesis: verum end; Sum XIN = ((Sum (EL | (v .edgesIn()))) + ((P .tolerance EL) + (EL . (P . (n2 + 1))))) - ((EL | (v .edgesIn())) . (P . (n2 + 1))) by GLIB_004:9 .= (((Sum (EL | (v .edgesOut()))) + (P .tolerance EL)) + (EL . (P . (n2 + 1)))) - (EL . (P . (n2 + 1))) by A30, A70, FUNCT_1:49 .= (((Sum (EL | (v .edgesOut()))) + (P .tolerance EL)) + (EL . (P . (n + 1)))) - (EL . (P . (n + 1))) .= ((Sum (EL | (v .edgesOut()))) + ((P .tolerance EL) + (EL . (P . (n + 1))))) - ((EL | (v .edgesOut())) . (P . (n + 1))) by A92, FUNCT_1:49 .= Sum XOUT by GLIB_004:9 ; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) by A94, A90, A91, A95, FUNCT_1:2; ::_thesis: verum end; supposeA111: ( P . (n2 + 1) DJoins P . n2,v,G & P . (n + 1) DJoins P . (n + 2),v,G ) ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) A112: dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; A113: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e_=_(EL_|_(v_.edgesOut()))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) implies ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (EL | (v .edgesOut())) . e ) assume A114: e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (EL | (v .edgesOut())) . e then A115: (EL | (v .edgesOut())) . e = EL . e by FUNCT_1:49; A116: e in v .edgesOut() by A114; then A117: (the_Source_of G) . e = v by GLIB_000:58; then A118: e <> P . (n + 1) by A36, A111, GLIB_000:def_14; e <> P . (n2 + 1) by A61, A111, A117, GLIB_000:def_14; then A119: not e in P .edges() by A41, A116, A118; ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (FF:PushFlow (EL,P)) . e by A114, FUNCT_1:49; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (EL | (v .edgesOut())) . e by A4, A116, A115, A119, Def17; ::_thesis: verum end; dom (EL | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; then A120: (FF:PushFlow (EL,P)) | (v .edgesOut()) = EL | (v .edgesOut()) by A112, A113, FUNCT_1:2; set XIN1 = (EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))); set XIN2 = ((EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))); A121: dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; A122: P . (n + 1) in v .edgesIn() by A111, GLIB_000:57; A123: P . (n2 + 1) in v .edgesIn() by A111, GLIB_000:57; A124: (FF:PushFlow (EL,P)) . (P . (n2 + 1)) = (EL . (P . (n2 + 1))) + (P .tolerance EL) by A4, A66, A40, A111, Def17; A125: dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) = {(P . (n + 1))} by FUNCOP_1:13; A126: dom ((EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) = (dom (EL | (v .edgesIn()))) \/ (dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) by FUNCT_4:def_1 .= (dom (EL | (v .edgesIn()))) \/ {(P . (n2 + 1))} by FUNCOP_1:13 .= (v .edgesIn()) \/ {(P . (n2 + 1))} by PARTFUN1:def_2 .= v .edgesIn() by A123, ZFMISC_1:40 ; then reconsider XIN1 = (EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) as Rbag of v .edgesIn() by PARTFUN1:def_2, RELAT_1:def_18; A127: dom (((EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL)))) = (dom XIN1) \/ (dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL)))) by FUNCT_4:def_1 .= (v .edgesIn()) \/ {(P . (n + 1))} by A126, FUNCOP_1:13 .= v .edgesIn() by A122, ZFMISC_1:40 ; then reconsider XIN2 = ((EL | (v .edgesIn())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) as Rbag of v .edgesIn() by PARTFUN1:def_2, RELAT_1:def_18; A128: dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) = {(P . (n2 + 1))} by FUNCOP_1:13; A129: (FF:PushFlow (EL,P)) . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) by A4, A32, A34, A54, A111, Def17; A130: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e_=_XIN2_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) implies ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e ) assume A131: e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e then A132: e in v .edgesIn() ; A133: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (FF:PushFlow (EL,P)) . e by A131, FUNCT_1:49; now__::_thesis:_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e_=_XIN2_._e percases ( e = P . (n2 + 1) or e = P . (n + 1) or ( e <> P . (n2 + 1) & e <> P . (n + 1) ) ) ; supposeA134: e = P . (n2 + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e then A135: e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) by A128, TARSKI:def_1; not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) by A60, A134, TARSKI:def_1; then XIN2 . e = XIN1 . e by FUNCT_4:11 .= ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) . e by A135, FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A124, A134, FUNCOP_1:72 ; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e by A131, FUNCT_1:49; ::_thesis: verum end; supposeA136: e = P . (n + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e then e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) by A125, TARSKI:def_1; then XIN2 . e = ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) . (P . (n + 1)) by A136, FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A129, A136, FUNCOP_1:72 ; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e by A131, FUNCT_1:49; ::_thesis: verum end; supposeA137: ( e <> P . (n2 + 1) & e <> P . (n + 1) ) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e then A138: not e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) by TARSKI:def_1; A139: not e in P .edges() by A41, A132, A137; not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) by A137, TARSKI:def_1; then XIN2 . e = XIN1 . e by FUNCT_4:11 .= (EL | (v .edgesIn())) . e by A138, FUNCT_4:11 .= EL . e by A132, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e by A4, A132, A133, A139, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = XIN2 . e ; ::_thesis: verum end; not P . (n + 1) in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) + (P .tolerance EL))) by A60, TARSKI:def_1; then XIN1 . (P . (n + 1)) = (EL | (v .edgesIn())) . (P . (n + 1)) by FUNCT_4:11 .= EL . (P . (n + 1)) by A122, FUNCT_1:49 ; then Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = ((Sum XIN1) + ((EL . (P . (n + 1))) - (P .tolerance EL))) - (EL . (P . (n + 1))) by A127, A121, A130, FUNCT_1:2, GLIB_004:9 .= (Sum XIN1) - ((EL . (P . (n + 1))) - ((EL . (P . (n + 1))) - (P .tolerance EL))) .= (((Sum (EL | (v .edgesIn()))) + ((EL . (P . (n2 + 1))) + (P .tolerance EL))) - ((EL | (v .edgesIn())) . (P . (n2 + 1)))) - (P .tolerance EL) by GLIB_004:9 .= ((((Sum (EL | (v .edgesIn()))) + (P .tolerance EL)) + (EL . (P . (n2 + 1)))) - (EL . (P . (n2 + 1)))) - (P .tolerance EL) by A123, FUNCT_1:49 .= Sum (EL | (v .edgesIn())) ; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) by A2, A28, A29, A120, Def2; ::_thesis: verum end; supposeA140: ( P . (n2 + 1) DJoins v,P . n2,G & P . (n + 1) DJoins v,P . (n + 2),G ) ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) A141: dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; A142: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e_=_(EL_|_(v_.edgesIn()))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) implies ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (EL | (v .edgesIn())) . e ) assume A143: e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (EL | (v .edgesIn())) . e then A144: (EL | (v .edgesIn())) . e = EL . e by FUNCT_1:49; A145: e in v .edgesIn() by A143; then A146: (the_Target_of G) . e = v by GLIB_000:56; then A147: e <> P . (n + 1) by A36, A140, GLIB_000:def_14; e <> P . (n2 + 1) by A61, A140, A146, GLIB_000:def_14; then A148: not e in P .edges() by A41, A145, A147; ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (FF:PushFlow (EL,P)) . e by A143, FUNCT_1:49; hence ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (EL | (v .edgesIn())) . e by A4, A145, A144, A148, Def17; ::_thesis: verum end; set XOUT1 = (EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))); set XOUT2 = ((EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))); A149: dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; A150: P . (n + 1) in v .edgesOut() by A140, GLIB_000:59; A151: dom (EL | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; A152: P . (n2 + 1) in v .edgesOut() by A140, GLIB_000:59; A153: (FF:PushFlow (EL,P)) . (P . (n + 1)) = (EL . (P . (n + 1))) + (P .tolerance EL) by A4, A32, A34, A140, Def17; A154: dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) = {(P . (n + 1))} by FUNCOP_1:13; A155: dom ((EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) = (dom (EL | (v .edgesOut()))) \/ (dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) by FUNCT_4:def_1 .= (dom (EL | (v .edgesOut()))) \/ {(P . (n2 + 1))} by FUNCOP_1:13 .= (v .edgesOut()) \/ {(P . (n2 + 1))} by PARTFUN1:def_2 .= v .edgesOut() by A152, ZFMISC_1:40 ; then reconsider XOUT1 = (EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) as Rbag of v .edgesOut() by PARTFUN1:def_2, RELAT_1:def_18; A156: dom (((EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL)))) = (dom XOUT1) \/ (dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL)))) by FUNCT_4:def_1 .= (v .edgesOut()) \/ {(P . (n + 1))} by A155, FUNCOP_1:13 .= v .edgesOut() by A150, ZFMISC_1:40 ; then reconsider XOUT2 = ((EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) as Rbag of v .edgesOut() by PARTFUN1:def_2, RELAT_1:def_18; A157: dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) = {(P . (n2 + 1))} by FUNCOP_1:13; A158: (FF:PushFlow (EL,P)) . (P . (n2 + 1)) = (EL . (P . (n2 + 1))) - (P .tolerance EL) by A4, A66, A40, A63, A140, Def17; A159: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_holds_ ((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e_=_XOUT2_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) implies ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e ) assume A160: e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e then A161: e in v .edgesOut() ; A162: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (FF:PushFlow (EL,P)) . e by A160, FUNCT_1:49; now__::_thesis:_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e_=_XOUT2_._e percases ( e = P . (n2 + 1) or e = P . (n + 1) or ( e <> P . (n2 + 1) & e <> P . (n + 1) ) ) ; supposeA163: e = P . (n2 + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e then A164: e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) by A157, TARSKI:def_1; not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) by A60, A163, TARSKI:def_1; then XOUT2 . e = XOUT1 . e by FUNCT_4:11 .= ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) . e by A164, FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A158, A163, FUNCOP_1:72 ; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e by A160, FUNCT_1:49; ::_thesis: verum end; supposeA165: e = P . (n + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e then e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) by A154, TARSKI:def_1; then XOUT2 . e = ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) . e by FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A153, A165, FUNCOP_1:72 ; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e by A160, FUNCT_1:49; ::_thesis: verum end; supposeA166: ( e <> P . (n2 + 1) & e <> P . (n + 1) ) ; ::_thesis: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e then A167: not e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) by TARSKI:def_1; A168: not e in P .edges() by A41, A161, A166; not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) + (P .tolerance EL))) by A166, TARSKI:def_1; then XOUT2 . e = XOUT1 . e by FUNCT_4:11 .= (EL | (v .edgesOut())) . e by A167, FUNCT_4:11 .= EL . e by A161, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e by A4, A161, A162, A168, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = XOUT2 . e ; ::_thesis: verum end; not P . (n + 1) in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) by A60, TARSKI:def_1; then XOUT1 . (P . (n + 1)) = (EL | (v .edgesOut())) . (P . (n + 1)) by FUNCT_4:11 .= EL . (P . (n + 1)) by A150, FUNCT_1:49 ; then Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) = ((Sum XOUT1) + ((EL . (P . (n + 1))) + (P .tolerance EL))) - (EL . (P . (n + 1))) by A156, A149, A159, FUNCT_1:2, GLIB_004:9 .= (((Sum XOUT1) - (EL . (P . (n + 1)))) + (EL . (P . (n + 1)))) + (P .tolerance EL) .= (((Sum (EL | (v .edgesOut()))) + ((EL . (P . (n2 + 1))) - (P .tolerance EL))) - ((EL | (v .edgesOut())) . (P . (n2 + 1)))) + (P .tolerance EL) by GLIB_004:9 .= ((((Sum (EL | (v .edgesOut()))) + (EL . (P . (n2 + 1)))) - (P .tolerance EL)) - (EL . (P . (n2 + 1)))) + (P .tolerance EL) by A152, FUNCT_1:49 .= Sum (EL | (v .edgesOut())) ; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) by A30, A141, A151, A142, FUNCT_1:2; ::_thesis: verum end; supposeA169: ( P . (n2 + 1) DJoins v,P . n2,G & P . (n + 1) DJoins P . (n + 2),v,G ) ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) set XIN = (EL | (v .edgesIn())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))); A170: P . (n + 1) in v .edgesIn() by A169, GLIB_000:57; A171: dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) = {(P . (n + 1))} by FUNCOP_1:13; then A172: dom ((EL | (v .edgesIn())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL)))) = (dom (EL | (v .edgesIn()))) \/ {(P . (n + 1))} by FUNCT_4:def_1 .= (v .edgesIn()) \/ {(P . (n + 1))} by PARTFUN1:def_2 .= v .edgesIn() by A170, ZFMISC_1:40 ; then reconsider XIN = (EL | (v .edgesIn())) +* ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) as Rbag of v .edgesIn() by PARTFUN1:def_2, RELAT_1:def_18; A173: (FF:PushFlow (EL,P)) . (P . (n + 1)) = (EL . (P . (n + 1))) - (P .tolerance EL) by A4, A32, A34, A54, A169, Def17; A174: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_holds_ XIN_._e_=_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) implies XIN . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e ) assume e in dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) ; ::_thesis: XIN . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e then A175: e in v .edgesIn() ; then A176: (the_Target_of G) . e = v by GLIB_000:56; now__::_thesis:_XIN_._e_=_(FF:PushFlow_(EL,P))_._e percases ( e = P . (n + 1) or e <> P . (n + 1) ) ; supposeA177: e = P . (n + 1) ; ::_thesis: XIN . e = (FF:PushFlow (EL,P)) . e then e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) by A171, TARSKI:def_1; hence XIN . e = ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) . (P . (n + 1)) by A177, FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A173, A177, FUNCOP_1:72 ; ::_thesis: verum end; supposeA178: e <> P . (n + 1) ; ::_thesis: (FF:PushFlow (EL,P)) . e = XIN . e then not e in dom ((P . (n + 1)) .--> ((EL . (P . (n + 1))) - (P .tolerance EL))) by TARSKI:def_1; then A179: XIN . e = (EL | (v .edgesIn())) . e by FUNCT_4:11 .= EL . e by A175, FUNCT_1:49 ; e <> P . (n2 + 1) by A61, A169, A176, GLIB_000:def_14; then not e in P .edges() by A41, A175, A178; hence (FF:PushFlow (EL,P)) . e = XIN . e by A4, A175, A179, Def17; ::_thesis: verum end; end; end; hence XIN . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e by A175, FUNCT_1:49; ::_thesis: verum end; dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; then A180: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = ((Sum (EL | (v .edgesIn()))) + ((EL . (P . (n + 1))) - (P .tolerance EL))) - ((EL | (v .edgesIn())) . (P . (n + 1))) by A172, A174, FUNCT_1:2, GLIB_004:9 .= (((Sum (EL | (v .edgesIn()))) + (EL . (P . (n + 1)))) - (P .tolerance EL)) - (EL . (P . (n + 1))) by A170, FUNCT_1:49 .= (Sum (EL | (v .edgesIn()))) - (P .tolerance EL) ; set XOUT = (EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))); A181: P . (n2 + 1) in v .edgesOut() by A169, GLIB_000:59; A182: dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) = {(P . (n2 + 1))} by FUNCOP_1:13; then A183: dom ((EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL)))) = (dom (EL | (v .edgesOut()))) \/ {(P . (n2 + 1))} by FUNCT_4:def_1 .= (v .edgesOut()) \/ {(P . (n2 + 1))} by PARTFUN1:def_2 .= v .edgesOut() by A181, ZFMISC_1:40 ; then reconsider XOUT = (EL | (v .edgesOut())) +* ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) as Rbag of v .edgesOut() by PARTFUN1:def_2, RELAT_1:def_18; A184: (FF:PushFlow (EL,P)) . (P . (n2 + 1)) = (EL . (P . (n2 + 1))) - (P .tolerance EL) by A4, A66, A40, A63, A169, Def17; A185: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_holds_ XOUT_._e_=_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) implies XOUT . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e ) assume e in dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: XOUT . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e then A186: e in v .edgesOut() ; then A187: (the_Source_of G) . e = v by GLIB_000:58; now__::_thesis:_XOUT_._e_=_(FF:PushFlow_(EL,P))_._e percases ( e = P . (n2 + 1) or e <> P . (n2 + 1) ) ; supposeA188: e = P . (n2 + 1) ; ::_thesis: XOUT . e = (FF:PushFlow (EL,P)) . e then e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) by A182, TARSKI:def_1; hence XOUT . e = ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) . (P . (n2 + 1)) by A188, FUNCT_4:13 .= (FF:PushFlow (EL,P)) . e by A184, A188, FUNCOP_1:72 ; ::_thesis: verum end; supposeA189: e <> P . (n2 + 1) ; ::_thesis: (FF:PushFlow (EL,P)) . e = XOUT . e then not e in dom ((P . (n2 + 1)) .--> ((EL . (P . (n2 + 1))) - (P .tolerance EL))) by TARSKI:def_1; then A190: XOUT . e = (EL | (v .edgesOut())) . e by FUNCT_4:11 .= EL . e by A186, FUNCT_1:49 ; e <> P . (n + 1) by A36, A169, A187, GLIB_000:def_14; then not e in P .edges() by A41, A186, A189; hence (FF:PushFlow (EL,P)) . e = XOUT . e by A4, A186, A190, Def17; ::_thesis: verum end; end; end; hence XOUT . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e by A186, FUNCT_1:49; ::_thesis: verum end; dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; then Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) = ((Sum (EL | (v .edgesOut()))) + ((EL . (P . (n2 + 1))) - (P .tolerance EL))) - ((EL | (v .edgesOut())) . (P . (n2 + 1))) by A183, A185, FUNCT_1:2, GLIB_004:9 .= (((Sum (EL | (v .edgesOut()))) + (EL . (P . (n2 + 1)))) - (P .tolerance EL)) - (EL . (P . (n2 + 1))) by A181, FUNCT_1:49 .= (Sum (EL | (v .edgesIn()))) - (P .tolerance EL) by A30 ; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) by A180; ::_thesis: verum end; end; end; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: verum end; supposeA191: not v in P .vertices() ; ::_thesis: Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) A192: dom (EL | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; A193: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(v_.edgesOut()))_holds_ (EL_|_(v_.edgesOut()))_._e_=_((FF:PushFlow_(EL,P))_|_(v_.edgesOut()))_._e let e be set ; ::_thesis: ( e in dom (EL | (v .edgesOut())) implies (EL | (v .edgesOut())) . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e ) assume A194: e in dom (EL | (v .edgesOut())) ; ::_thesis: (EL | (v .edgesOut())) . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e then A195: ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e = (FF:PushFlow (EL,P)) . e by FUNCT_1:49; A196: e in v .edgesOut() by A194; A197: now__::_thesis:_not_e_in_P_.edges() consider x being set such that A198: e DJoins v,x,G by A196, GLIB_000:59; assume A199: e in P .edges() ; ::_thesis: contradiction e Joins v,x,G by A198, GLIB_000:16; hence contradiction by A191, A199, GLIB_001:105; ::_thesis: verum end; (EL | (v .edgesOut())) . e = EL . e by A194, FUNCT_1:49; hence (EL | (v .edgesOut())) . e = ((FF:PushFlow (EL,P)) | (v .edgesOut())) . e by A4, A196, A195, A197, Def17; ::_thesis: verum end; A200: dom (EL | (v .edgesIn())) = v .edgesIn() by PARTFUN1:def_2; A201: now__::_thesis:_for_e_being_set_st_e_in_dom_(EL_|_(v_.edgesIn()))_holds_ (EL_|_(v_.edgesIn()))_._e_=_((FF:PushFlow_(EL,P))_|_(v_.edgesIn()))_._e let e be set ; ::_thesis: ( e in dom (EL | (v .edgesIn())) implies (EL | (v .edgesIn())) . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e ) assume A202: e in dom (EL | (v .edgesIn())) ; ::_thesis: (EL | (v .edgesIn())) . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e then A203: ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e = (FF:PushFlow (EL,P)) . e by FUNCT_1:49; A204: now__::_thesis:_not_e_in_P_.edges() consider x being set such that A205: e DJoins x,v,G by A202, GLIB_000:57; assume A206: e in P .edges() ; ::_thesis: contradiction e Joins x,v,G by A205, GLIB_000:16; hence contradiction by A191, A206, GLIB_001:105; ::_thesis: verum end; (EL | (v .edgesIn())) . e = EL . e by A202, FUNCT_1:49; hence (EL | (v .edgesIn())) . e = ((FF:PushFlow (EL,P)) | (v .edgesIn())) . e by A4, A200, A202, A203, A204, Def17; ::_thesis: verum end; dom ((FF:PushFlow (EL,P)) | (v .edgesOut())) = v .edgesOut() by PARTFUN1:def_2; then A207: EL | (v .edgesOut()) = (FF:PushFlow (EL,P)) | (v .edgesOut()) by A192, A193, FUNCT_1:2; dom (EL | (v .edgesIn())) = dom ((FF:PushFlow (EL,P)) | (v .edgesIn())) by A200, PARTFUN1:def_2; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum (EL | (v .edgesIn())) by A201, FUNCT_1:2 .= Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) by A2, A28, A29, A207, Def2 ; ::_thesis: verum end; end; end; hence Sum ((FF:PushFlow (EL,P)) | (v .edgesIn())) = Sum ((FF:PushFlow (EL,P)) | (v .edgesOut())) ; ::_thesis: verum end; hence FF:PushFlow (EL,P) has_valid_flow_from source,sink by Def2; ::_thesis: verum end; theorem Th15: :: GLIB_005:15 for G being finite natural-weighted WGraph for EL being FF:ELabeling of G for source, sink being set for P being Path of G st source <> sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) proof let G be finite natural-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source, sink being set for P being Path of G st source <> sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) let EL be FF:ELabeling of G; ::_thesis: for source, sink being set for P being Path of G st source <> sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) let source, sink be set ; ::_thesis: for P being Path of G st source <> sink & P is_Walk_from source,sink & P is_augmenting_wrt EL holds (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) let P be Path of G; ::_thesis: ( source <> sink & P is_Walk_from source,sink & P is_augmenting_wrt EL implies (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) ) assume that A1: source <> sink and A2: P is_Walk_from source,sink and A3: P is_augmenting_wrt EL ; ::_thesis: (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) A4: P .last() = sink by A2, GLIB_001:def_23; P .first() = source by A2, GLIB_001:def_23; then not P is trivial by A1, A4, GLIB_001:127; then 3 <= len P by GLIB_001:125; then reconsider lenP2g = (len P) - (2 * 1) as odd Element of NAT by INT_1:5, XXREAL_0:2; set e1 = P . (lenP2g + 1); set EI1 = EL | (G .edgesInto {sink}); set EO1 = EL | (G .edgesOutOf {sink}); set EL2 = FF:PushFlow (EL,P); set T = P .tolerance EL; A5: P . (len P) = sink by A2, GLIB_001:17; A6: lenP2g < (len P) - 0 by XREAL_1:15; then A7: P . (lenP2g + 1) Joins P . lenP2g,P . (lenP2g + 2),G by GLIB_001:def_3; then A8: P . (lenP2g + 1) in the_Edges_of G by GLIB_000:def_13; now__::_thesis:_(FF:PushFlow_(EL,P))_.flow_(source,sink)_=_(EL_.flow_(source,sink))_+_(P_.tolerance_EL) percases ( P . (lenP2g + 1) DJoins P . lenP2g,P . (lenP2g + 2),G or not P . (lenP2g + 1) DJoins P . lenP2g,P . (lenP2g + 2),G ) ; supposeA9: P . (lenP2g + 1) DJoins P . lenP2g,P . (lenP2g + 2),G ; ::_thesis: (FF:PushFlow (EL,P)) .flow (source,sink) = (EL .flow (source,sink)) + (P .tolerance EL) then (the_Target_of G) . (P . (lenP2g + 1)) = P . (lenP2g + 2) by GLIB_000:def_14 .= sink by A2, GLIB_001:17 ; then (the_Target_of G) . (P . (lenP2g + 1)) in {sink} by TARSKI:def_1; then A10: P . (lenP2g + 1) in G .edgesInto {sink} by A8, GLIB_000:def_26; set EI2 = (EL | (G .edgesInto {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL))); A11: dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) = G .edgesInto {sink} by PARTFUN1:def_2; A12: dom ((EL | (G .edgesInto {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL)))) = (dom (EL | (G .edgesInto {sink}))) \/ (dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL)))) by FUNCT_4:def_1 .= (dom (EL | (G .edgesInto {sink}))) \/ {(P . (lenP2g + 1))} by FUNCOP_1:13 .= (G .edgesInto {sink}) \/ {(P . (lenP2g + 1))} by PARTFUN1:def_2 .= G .edgesInto {sink} by A10, ZFMISC_1:40 ; then reconsider EI2 = (EL | (G .edgesInto {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL))) as Rbag of G .edgesInto {sink} by PARTFUN1:def_2, RELAT_1:def_18; A13: (FF:PushFlow (EL,P)) . (P . (lenP2g + 1)) = (EL . (P . (lenP2g + 1))) + (P .tolerance EL) by A3, A6, A9, Def17; now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(G_.edgesInto_{sink}))_holds_ ((FF:PushFlow_(EL,P))_|_(G_.edgesInto_{sink}))_._e_=_EI2_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) implies ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e ) assume A14: e in dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e then A15: e in G .edgesInto {sink} ; A16: ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = (FF:PushFlow (EL,P)) . e by A14, FUNCT_1:49; (the_Target_of G) . e in {sink} by A15, GLIB_000:def_26; then A17: (the_Target_of G) . e = sink by TARSKI:def_1; now__::_thesis:_((FF:PushFlow_(EL,P))_|_(G_.edgesInto_{sink}))_._e_=_EI2_._e percases ( e = P . (lenP2g + 1) or e <> P . (lenP2g + 1) ) ; supposeA18: e = P . (lenP2g + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e then e in {(P . (lenP2g + 1))} by TARSKI:def_1; then e in dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL))) by FUNCOP_1:13; then EI2 . e = ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL))) . (P . (lenP2g + 1)) by A18, FUNCT_4:13 .= ((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL) by FUNCOP_1:72 .= (FF:PushFlow (EL,P)) . (P . (lenP2g + 1)) by A13, A15, A18, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e by A14, A18, FUNCT_1:49; ::_thesis: verum end; supposeA19: e <> P . (lenP2g + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e A20: now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A21: m + 2 <= len P and A22: v1 = P . m and A23: e = P . (m + 1) and A24: v2 = P . (m + 2) and A25: e Joins v1,v2,G by GLIB_001:103; now__::_thesis:_contradiction percases ( v1 = sink or v2 = sink ) by A17, A25, GLIB_000:def_13; supposeA26: v1 = sink ; ::_thesis: contradiction A27: (m + 2) - 2 < (len P) - 0 by A21, XREAL_1:15; P . m = P . (len P) by A2, A22, A26, GLIB_001:17; then m = 1 by A27, GLIB_001:def_28; hence contradiction by A1, A2, A22, A26, GLIB_001:17; ::_thesis: verum end; suppose v2 = sink ; ::_thesis: contradiction then A28: P . (m + 2) = P . (len P) by A2, A24, GLIB_001:17; now__::_thesis:_not_m_+_2_<_len_P assume m + 2 < len P ; ::_thesis: contradiction then m + 2 = 1 by A28, GLIB_001:def_28; then m = 1 - 2 ; hence contradiction by ABIAN:12; ::_thesis: verum end; then m + 2 = len P by A21, XXREAL_0:1; hence contradiction by A19, A23; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; not e in {(P . (lenP2g + 1))} by A19, TARSKI:def_1; then not e in dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) + (P .tolerance EL))) ; then EI2 . e = (EL | (G .edgesInto {sink})) . e by FUNCT_4:11 .= EL . e by A15, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e by A3, A15, A16, A20, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = EI2 . e ; ::_thesis: verum end; then A29: Sum ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) = ((Sum (EL | (G .edgesInto {sink}))) + ((P .tolerance EL) + ((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))))) - ((EL | (G .edgesInto {sink})) . (P . (lenP2g + 1))) by A12, A11, FUNCT_1:2, GLIB_004:9 .= (Sum (EL | (G .edgesInto {sink}))) + (P .tolerance EL) ; A30: dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) = G .edgesOutOf {sink} by PARTFUN1:def_2; A31: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(G_.edgesOutOf_{sink}))_holds_ ((FF:PushFlow_(EL,P))_|_(G_.edgesOutOf_{sink}))_._e_=_(EL_|_(G_.edgesOutOf_{sink}))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) implies ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = (EL | (G .edgesOutOf {sink})) . e ) assume A32: e in dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = (EL | (G .edgesOutOf {sink})) . e then A33: e in G .edgesOutOf {sink} ; then (the_Source_of G) . e in {sink} by GLIB_000:def_27; then A34: (the_Source_of G) . e = sink by TARSKI:def_1; now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A35: m + 2 <= len P and A36: v1 = P . m and A37: e = P . (m + 1) and A38: v2 = P . (m + 2) and A39: e Joins v1,v2,G by GLIB_001:103; now__::_thesis:_contradiction percases ( v1 = sink or v2 = sink ) by A34, A39, GLIB_000:def_13; supposeA40: v1 = sink ; ::_thesis: contradiction A41: (m + 2) - 2 < (len P) - 0 by A35, XREAL_1:15; P . m = P . (len P) by A2, A36, A40, GLIB_001:17; then m = 1 by A41, GLIB_001:def_28; hence contradiction by A1, A2, A36, A40, GLIB_001:17; ::_thesis: verum end; suppose v2 = sink ; ::_thesis: contradiction then A42: P . (m + 2) = P . (len P) by A2, A38, GLIB_001:17; now__::_thesis:_not_m_+_2_<_len_P assume m + 2 < len P ; ::_thesis: contradiction then m + 2 = 1 by A42, GLIB_001:def_28; then 1 <= 1 - 2 by ABIAN:12; hence contradiction ; ::_thesis: verum end; then m + 2 = len P by A35, XXREAL_0:1; then A43: P . lenP2g = sink by A9, A34, A37, GLIB_000:def_14; then lenP2g = 1 by A6, A5, GLIB_001:def_28; hence contradiction by A1, A2, A43, GLIB_001:17; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; then (FF:PushFlow (EL,P)) . e = EL . e by A3, A33, Def17 .= (EL | (G .edgesOutOf {sink})) . e by A33, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = (EL | (G .edgesOutOf {sink})) . e by A32, FUNCT_1:49; ::_thesis: verum end; dom (EL | (G .edgesOutOf {sink})) = G .edgesOutOf {sink} by PARTFUN1:def_2; hence (FF:PushFlow (EL,P)) .flow (source,sink) = ((Sum (EL | (G .edgesInto {sink}))) + (P .tolerance EL)) - (Sum (EL | (G .edgesOutOf {sink}))) by A29, A30, A31, FUNCT_1:2 .= ((Sum (EL | (G .edgesInto {sink}))) - (Sum (EL | (G .edgesOutOf {sink})))) + (P .tolerance EL) .= (EL .flow (source,sink)) + (P .tolerance EL) ; ::_thesis: verum end; supposeA44: not P . (lenP2g + 1) DJoins P . lenP2g,P . (lenP2g + 2),G ; ::_thesis: (FF:PushFlow (EL,P)) .flow (source,sink) = (EL .flow (source,sink)) + (P .tolerance EL) then A45: P . (lenP2g + 1) DJoins P . (lenP2g + 2),P . lenP2g,G by A7, GLIB_000:16; then (the_Source_of G) . (P . (lenP2g + 1)) = P . (lenP2g + 2) by GLIB_000:def_14 .= sink by A2, GLIB_001:17 ; then (the_Source_of G) . (P . (lenP2g + 1)) in {sink} by TARSKI:def_1; then A46: P . (lenP2g + 1) in G .edgesOutOf {sink} by A8, GLIB_000:def_27; set EO2 = (EL | (G .edgesOutOf {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))); A47: dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) = G .edgesOutOf {sink} by PARTFUN1:def_2; A48: dom ((EL | (G .edgesOutOf {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL)))) = (dom (EL | (G .edgesOutOf {sink}))) \/ (dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL)))) by FUNCT_4:def_1 .= (dom (EL | (G .edgesOutOf {sink}))) \/ {(P . (lenP2g + 1))} by FUNCOP_1:13 .= (G .edgesOutOf {sink}) \/ {(P . (lenP2g + 1))} by PARTFUN1:def_2 .= G .edgesOutOf {sink} by A46, ZFMISC_1:40 ; then reconsider EO2 = (EL | (G .edgesOutOf {sink})) +* ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))) as Rbag of G .edgesOutOf {sink} by PARTFUN1:def_2, RELAT_1:def_18; A49: (FF:PushFlow (EL,P)) . (P . (lenP2g + 1)) = (EL . (P . (lenP2g + 1))) - (P .tolerance EL) by A3, A6, A44, Def17; now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(G_.edgesOutOf_{sink}))_holds_ ((FF:PushFlow_(EL,P))_|_(G_.edgesOutOf_{sink}))_._e_=_EO2_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) implies ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e ) assume A50: e in dom ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e then A51: e in G .edgesOutOf {sink} ; A52: ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = (FF:PushFlow (EL,P)) . e by A50, FUNCT_1:49; (the_Source_of G) . e in {sink} by A51, GLIB_000:def_27; then A53: (the_Source_of G) . e = sink by TARSKI:def_1; now__::_thesis:_((FF:PushFlow_(EL,P))_|_(G_.edgesOutOf_{sink}))_._e_=_EO2_._e percases ( e = P . (lenP2g + 1) or e <> P . (lenP2g + 1) ) ; supposeA54: e = P . (lenP2g + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e then e in {(P . (lenP2g + 1))} by TARSKI:def_1; then e in dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))) by FUNCOP_1:13; then EO2 . e = ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))) . (P . (lenP2g + 1)) by A54, FUNCT_4:13 .= ((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL) by FUNCOP_1:72 .= (FF:PushFlow (EL,P)) . e by A49, A51, A54, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e by A50, FUNCT_1:49; ::_thesis: verum end; supposeA55: e <> P . (lenP2g + 1) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e A56: now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A57: m + 2 <= len P and A58: v1 = P . m and A59: e = P . (m + 1) and A60: v2 = P . (m + 2) and A61: e Joins v1,v2,G by GLIB_001:103; now__::_thesis:_contradiction percases ( v1 = sink or v2 = sink ) by A53, A61, GLIB_000:def_13; supposeA62: v1 = sink ; ::_thesis: contradiction A63: (m + 2) - 2 < (len P) - 0 by A57, XREAL_1:15; P . m = P . (len P) by A2, A58, A62, GLIB_001:17; then m = 1 by A63, GLIB_001:def_28; hence contradiction by A1, A2, A58, A62, GLIB_001:17; ::_thesis: verum end; suppose v2 = sink ; ::_thesis: contradiction then A64: P . (m + 2) = P . (len P) by A2, A60, GLIB_001:17; now__::_thesis:_not_m_+_2_<_len_P assume m + 2 < len P ; ::_thesis: contradiction then m + 2 = 1 by A64, GLIB_001:def_28; then 1 <= 1 - 2 by ABIAN:12; hence contradiction ; ::_thesis: verum end; then m + 2 = len P by A57, XXREAL_0:1; hence contradiction by A55, A59; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; not e in {(P . (lenP2g + 1))} by A55, TARSKI:def_1; then not e in dom ((P . (lenP2g + 1)) .--> (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))) ; then EO2 . e = (EL | (G .edgesOutOf {sink})) . e by FUNCT_4:11 .= EL . e by A51, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e by A3, A51, A52, A56, Def17; ::_thesis: verum end; end; end; hence ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) . e = EO2 . e ; ::_thesis: verum end; then A65: Sum ((FF:PushFlow (EL,P)) | (G .edgesOutOf {sink})) = ((Sum (EL | (G .edgesOutOf {sink}))) + (((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) - (P .tolerance EL))) - ((EL | (G .edgesOutOf {sink})) . (P . (lenP2g + 1))) by A48, A47, FUNCT_1:2, GLIB_004:9 .= (Sum (EL | (G .edgesOutOf {sink}))) - (P .tolerance EL) ; A66: dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) = G .edgesInto {sink} by PARTFUN1:def_2; A67: now__::_thesis:_for_e_being_set_st_e_in_dom_((FF:PushFlow_(EL,P))_|_(G_.edgesInto_{sink}))_holds_ ((FF:PushFlow_(EL,P))_|_(G_.edgesInto_{sink}))_._e_=_(EL_|_(G_.edgesInto_{sink}))_._e let e be set ; ::_thesis: ( e in dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) implies ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = (EL | (G .edgesInto {sink})) . e ) assume A68: e in dom ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) ; ::_thesis: ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = (EL | (G .edgesInto {sink})) . e then A69: e in G .edgesInto {sink} ; then (the_Target_of G) . e in {sink} by GLIB_000:def_26; then A70: (the_Target_of G) . e = sink by TARSKI:def_1; now__::_thesis:_not_e_in_P_.edges() assume e in P .edges() ; ::_thesis: contradiction then consider v1, v2 being Vertex of G, m being odd Element of NAT such that A71: m + 2 <= len P and A72: v1 = P . m and A73: e = P . (m + 1) and A74: v2 = P . (m + 2) and A75: e Joins v1,v2,G by GLIB_001:103; now__::_thesis:_contradiction percases ( v1 = sink or v2 = sink ) by A70, A75, GLIB_000:def_13; supposeA76: v1 = sink ; ::_thesis: contradiction A77: (m + 2) - 2 < (len P) - 0 by A71, XREAL_1:15; P . m = P . (len P) by A2, A72, A76, GLIB_001:17; then m = 1 by A77, GLIB_001:def_28; hence contradiction by A1, A2, A72, A76, GLIB_001:17; ::_thesis: verum end; suppose v2 = sink ; ::_thesis: contradiction then A78: P . (m + 2) = P . (len P) by A2, A74, GLIB_001:17; now__::_thesis:_not_m_+_2_<_len_P assume m + 2 < len P ; ::_thesis: contradiction then m + 2 = 1 by A78, GLIB_001:def_28; then 1 <= 1 - 2 by ABIAN:12; hence contradiction ; ::_thesis: verum end; then m + 2 = len P by A71, XXREAL_0:1; then A79: P . lenP2g = sink by A45, A70, A73, GLIB_000:def_14; then lenP2g = 1 by A6, A5, GLIB_001:def_28; hence contradiction by A1, A2, A79, GLIB_001:17; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; then (FF:PushFlow (EL,P)) . e = EL . e by A3, A69, Def17 .= (EL | (G .edgesInto {sink})) . e by A69, FUNCT_1:49 ; hence ((FF:PushFlow (EL,P)) | (G .edgesInto {sink})) . e = (EL | (G .edgesInto {sink})) . e by A68, FUNCT_1:49; ::_thesis: verum end; dom (EL | (G .edgesInto {sink})) = G .edgesInto {sink} by PARTFUN1:def_2; hence (FF:PushFlow (EL,P)) .flow (source,sink) = (Sum (EL | (G .edgesInto {sink}))) - ((Sum (EL | (G .edgesOutOf {sink}))) - (P .tolerance EL)) by A65, A66, A67, FUNCT_1:2 .= ((Sum (EL | (G .edgesInto {sink}))) - (Sum (EL | (G .edgesOutOf {sink})))) + (P .tolerance EL) .= (EL .flow (source,sink)) + (P .tolerance EL) ; ::_thesis: verum end; end; end; hence (EL .flow (source,sink)) + (P .tolerance EL) = (FF:PushFlow (EL,P)) .flow (source,sink) ; ::_thesis: verum end; theorem Th16: :: GLIB_005:16 for G being finite natural-weighted WGraph for source, sink being Vertex of G for n being Nat st source <> sink holds (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink proof let G be finite natural-weighted WGraph; ::_thesis: for source, sink being Vertex of G for n being Nat st source <> sink holds (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink let source, sink be Vertex of G; ::_thesis: for n being Nat st source <> sink holds (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink let n be Nat; ::_thesis: ( source <> sink implies (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink ) set CS = FF:CompSeq (G,source,sink); defpred S1[ Nat] means (FF:CompSeq (G,source,sink)) . $1 has_valid_flow_from source,sink; now__::_thesis:_(_(_for_e_being_set_st_e_in_the_Edges_of_G_holds_ (_0_<=_((FF:CompSeq_(G,source,sink))_._0)_._e_&_((FF:CompSeq_(G,source,sink))_._0)_._e_<=_(the_Weight_of_G)_._e_)_)_&_(_for_v_being_Vertex_of_G_st_v_<>_source_&_v_<>_sink_holds_ Sum_(((FF:CompSeq_(G,source,sink))_._0)_|_(v_.edgesIn()))_=_Sum_(((FF:CompSeq_(G,source,sink))_._0)_|_(v_.edgesOut()))_)_) set G0 = (FF:CompSeq (G,source,sink)) . 0; A1: (FF:CompSeq (G,source,sink)) . 0 = (the_Edges_of G) --> 0 by Def20; hence for e being set st e in the_Edges_of G holds ( 0 <= ((FF:CompSeq (G,source,sink)) . 0) . e & ((FF:CompSeq (G,source,sink)) . 0) . e <= (the_Weight_of G) . e ) by FUNCOP_1:7; ::_thesis: for v being Vertex of G st v <> source & v <> sink holds Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) = Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) let v be Vertex of G; ::_thesis: ( v <> source & v <> sink implies Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) = Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) ) set B1 = EmptyBag (v .edgesIn()); set B2 = EmptyBag (v .edgesOut()); set E1 = ((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn()); set E2 = ((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut()); now__::_thesis:_for_e_being_set_st_e_in_v_.edgesOut()_holds_ (EmptyBag_(v_.edgesOut()))_._e_=_(((FF:CompSeq_(G,source,sink))_._0)_|_(v_.edgesOut()))_._e let e be set ; ::_thesis: ( e in v .edgesOut() implies (EmptyBag (v .edgesOut())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) . e ) assume A2: e in v .edgesOut() ; ::_thesis: (EmptyBag (v .edgesOut())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) . e then (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) . e = ((FF:CompSeq (G,source,sink)) . 0) . e by FUNCT_1:49 .= 0 by A1, A2, FUNCOP_1:7 ; hence (EmptyBag (v .edgesOut())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) . e by PRE_POLY:52; ::_thesis: verum end; then A3: Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) = Sum (EmptyBag (v .edgesOut())) by GLIB_004:6 .= 0 by UPROOTS:11 ; assume that v <> source and v <> sink ; ::_thesis: Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) = Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) now__::_thesis:_for_e_being_set_st_e_in_v_.edgesIn()_holds_ (EmptyBag_(v_.edgesIn()))_._e_=_(((FF:CompSeq_(G,source,sink))_._0)_|_(v_.edgesIn()))_._e let e be set ; ::_thesis: ( e in v .edgesIn() implies (EmptyBag (v .edgesIn())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) . e ) assume A4: e in v .edgesIn() ; ::_thesis: (EmptyBag (v .edgesIn())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) . e then (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) . e = ((FF:CompSeq (G,source,sink)) . 0) . e by FUNCT_1:49 .= 0 by A1, A4, FUNCOP_1:7 ; hence (EmptyBag (v .edgesIn())) . e = (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) . e by PRE_POLY:52; ::_thesis: verum end; then Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) = Sum (EmptyBag (v .edgesIn())) by GLIB_004:6 .= 0 by UPROOTS:11 ; hence Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesIn())) = Sum (((FF:CompSeq (G,source,sink)) . 0) | (v .edgesOut())) by A3; ::_thesis: verum end; then A5: S1[ 0 ] by Def2; assume A6: source <> sink ; ::_thesis: (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink now__::_thesis:_for_n_being_Nat_st_(FF:CompSeq_(G,source,sink))_._n_has_valid_flow_from_source,sink_holds_ S1[n_+_1] let n be Nat; ::_thesis: ( (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink implies S1[n + 1] ) set Gn = (FF:CompSeq (G,source,sink)) . n; set Gn1 = (FF:CompSeq (G,source,sink)) . (n + 1); assume A7: (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink ; ::_thesis: S1[n + 1] A8: (FF:CompSeq (G,source,sink)) . (n + 1) = FF:Step (((FF:CompSeq (G,source,sink)) . n),source,sink) by Def20; now__::_thesis:_S1[n_+_1] percases ( sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . n),source)) or not sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . n),source)) ) ; supposeA9: sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . n),source)) ; ::_thesis: S1[n + 1] set P = AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink); A10: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink) is_Walk_from source,sink by A9, Def14; A11: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink) is_augmenting_wrt (FF:CompSeq (G,source,sink)) . n by A9, Def14; (FF:CompSeq (G,source,sink)) . (n + 1) = FF:PushFlow (((FF:CompSeq (G,source,sink)) . n),(AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink))) by A8, A9, Def18; hence S1[n + 1] by A6, A7, A10, A11, Th14; ::_thesis: verum end; suppose not sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . n),source)) ; ::_thesis: S1[n + 1] hence S1[n + 1] by A7, A8, Def18; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; then A12: for n being Nat st S1[n] holds S1[n + 1] ; for n being Nat holds S1[n] from NAT_1:sch_2(A5, A12); hence (FF:CompSeq (G,source,sink)) . n has_valid_flow_from source,sink ; ::_thesis: verum end; theorem Th17: :: GLIB_005:17 for G being finite natural-weighted WGraph for source, sink being Vertex of G st source <> sink holds FF:CompSeq (G,source,sink) is halting proof let G be finite natural-weighted WGraph; ::_thesis: for source, sink being Vertex of G st source <> sink holds FF:CompSeq (G,source,sink) is halting let source, sink be Vertex of G; ::_thesis: ( source <> sink implies FF:CompSeq (G,source,sink) is halting ) set CS = FF:CompSeq (G,source,sink); assume A1: source <> sink ; ::_thesis: FF:CompSeq (G,source,sink) is halting now__::_thesis:_not__for_n_being_Element_of_NAT_holds_(FF:CompSeq_(G,source,sink))_._n_<>_(FF:CompSeq_(G,source,sink))_._(n_+_1) set V = {source}; defpred S1[ Element of NAT ] means ( $1 <= ((FF:CompSeq (G,source,sink)) . $1) .flow (source,sink) & ((FF:CompSeq (G,source,sink)) . $1) .flow (source,sink) is Element of NAT ); A2: source in {source} by TARSKI:def_1; set W1 = (the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source}))); degree ((the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source})))) = Sum ((the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source})))) ; then reconsider N = Sum ((the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source})))) as Element of NAT ; set Gn1 = (FF:CompSeq (G,source,sink)) . (N + 1); assume A3: for n being Element of NAT holds (FF:CompSeq (G,source,sink)) . n <> (FF:CompSeq (G,source,sink)) . (n + 1) ; ::_thesis: contradiction now__::_thesis:_for_n_being_Element_of_NAT_st_n_<=_((FF:CompSeq_(G,source,sink))_._n)_.flow_(source,sink)_&_((FF:CompSeq_(G,source,sink))_._n)_.flow_(source,sink)_is_Element_of_NAT_holds_ (_n_+_1_<=_((FF:CompSeq_(G,source,sink))_._(n_+_1))_.flow_(source,sink)_&_((FF:CompSeq_(G,source,sink))_._(n_+_1))_.flow_(source,sink)_is_Element_of_NAT_) let n be Element of NAT ; ::_thesis: ( n <= ((FF:CompSeq (G,source,sink)) . n) .flow (source,sink) & ((FF:CompSeq (G,source,sink)) . n) .flow (source,sink) is Element of NAT implies ( n + 1 <= ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) & ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) is Element of NAT ) ) set Gn = (FF:CompSeq (G,source,sink)) . n; set Gn1 = (FF:CompSeq (G,source,sink)) . (n + 1); assume that A4: n <= ((FF:CompSeq (G,source,sink)) . n) .flow (source,sink) and A5: ((FF:CompSeq (G,source,sink)) . n) .flow (source,sink) is Element of NAT ; ::_thesis: ( n + 1 <= ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) & ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) is Element of NAT ) reconsider GnF = ((FF:CompSeq (G,source,sink)) . n) .flow (source,sink) as Element of NAT by A5; set P = AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink); A6: (FF:CompSeq (G,source,sink)) . (n + 1) = FF:Step (((FF:CompSeq (G,source,sink)) . n),source,sink) by Def20; A7: now__::_thesis:_sink_in_dom_(AP:FindAugPath_(((FF:CompSeq_(G,source,sink))_._n),source)) assume not sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . n),source)) ; ::_thesis: contradiction then (FF:CompSeq (G,source,sink)) . (n + 1) = (FF:CompSeq (G,source,sink)) . n by A6, Def18; hence contradiction by A3; ::_thesis: verum end; then A8: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink) is_augmenting_wrt (FF:CompSeq (G,source,sink)) . n by Def14; A9: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink) is_Walk_from source,sink by A7, Def14; then A10: (AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .last() = sink by GLIB_001:def_23; (FF:CompSeq (G,source,sink)) . (n + 1) = FF:PushFlow (((FF:CompSeq (G,source,sink)) . n),(AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink))) by A6, A7, Def18; then A11: GnF + ((AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .tolerance ((FF:CompSeq (G,source,sink)) . n)) = ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) by A1, A8, A9, Th15; then reconsider Gn1F = ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) as Element of NAT ; (AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .first() = source by A9, GLIB_001:def_23; then 0 < (AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .tolerance ((FF:CompSeq (G,source,sink)) . n) by A1, A8, A10, Th13, GLIB_001:127; then (GnF + ((AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .tolerance ((FF:CompSeq (G,source,sink)) . n))) - ((AP:GetAugPath (((FF:CompSeq (G,source,sink)) . n),source,sink)) .tolerance ((FF:CompSeq (G,source,sink)) . n)) < Gn1F - 0 by A11, XREAL_1:15; then n < Gn1F by A4, XXREAL_0:2; hence n + 1 <= ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) by NAT_1:13; ::_thesis: ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) is Element of NAT thus ((FF:CompSeq (G,source,sink)) . (n + 1)) .flow (source,sink) is Element of NAT by A11; ::_thesis: verum end; then A12: for n being Element of NAT st S1[n] holds S1[n + 1] ; now__::_thesis:_(_((FF:CompSeq_(G,source,sink))_._0)_.flow_(source,sink)_=_0_-_0_&_((FF:CompSeq_(G,source,sink))_._0)_.flow_(source,sink)_is_Element_of_NAT_) set B1 = EmptyBag (G .edgesInto {sink}); set B2 = EmptyBag (G .edgesOutOf {sink}); set G0 = (FF:CompSeq (G,source,sink)) . 0; set E1 = ((FF:CompSeq (G,source,sink)) . 0) | (G .edgesInto {sink}); set E2 = ((FF:CompSeq (G,source,sink)) . 0) | (G .edgesOutOf {sink}); A13: (FF:CompSeq (G,source,sink)) . 0 = (the_Edges_of G) --> 0 by Def20; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesInto_{sink}_holds_ (((FF:CompSeq_(G,source,sink))_._0)_|_(G_.edgesInto_{sink}))_._e_=_(EmptyBag_(G_.edgesInto_{sink}))_._e let e be set ; ::_thesis: ( e in G .edgesInto {sink} implies (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesInto {sink})) . e = (EmptyBag (G .edgesInto {sink})) . e ) assume A14: e in G .edgesInto {sink} ; ::_thesis: (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesInto {sink})) . e = (EmptyBag (G .edgesInto {sink})) . e hence (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesInto {sink})) . e = ((FF:CompSeq (G,source,sink)) . 0) . e by FUNCT_1:49 .= 0 by A13, A14, FUNCOP_1:7 .= (EmptyBag (G .edgesInto {sink})) . e by PRE_POLY:52 ; ::_thesis: verum end; then A15: Sum (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesInto {sink})) = Sum (EmptyBag (G .edgesInto {sink})) by GLIB_004:6 .= 0 by UPROOTS:11 ; now__::_thesis:_for_e_being_set_st_e_in_G_.edgesOutOf_{sink}_holds_ (((FF:CompSeq_(G,source,sink))_._0)_|_(G_.edgesOutOf_{sink}))_._e_=_(EmptyBag_(G_.edgesOutOf_{sink}))_._e let e be set ; ::_thesis: ( e in G .edgesOutOf {sink} implies (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesOutOf {sink})) . e = (EmptyBag (G .edgesOutOf {sink})) . e ) assume A16: e in G .edgesOutOf {sink} ; ::_thesis: (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesOutOf {sink})) . e = (EmptyBag (G .edgesOutOf {sink})) . e hence (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesOutOf {sink})) . e = ((FF:CompSeq (G,source,sink)) . 0) . e by FUNCT_1:49 .= 0 by A13, A16, FUNCOP_1:7 .= (EmptyBag (G .edgesOutOf {sink})) . e by PRE_POLY:52 ; ::_thesis: verum end; then A17: Sum (((FF:CompSeq (G,source,sink)) . 0) | (G .edgesOutOf {sink})) = Sum (EmptyBag (G .edgesOutOf {sink})) by GLIB_004:6 .= 0 by UPROOTS:11 ; hence ((FF:CompSeq (G,source,sink)) . 0) .flow (source,sink) = 0 - 0 by A15; ::_thesis: ((FF:CompSeq (G,source,sink)) . 0) .flow (source,sink) is Element of NAT thus ((FF:CompSeq (G,source,sink)) . 0) .flow (source,sink) is Element of NAT by A15, A17; ::_thesis: verum end; then A18: S1[ 0 ] ; A19: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A18, A12); then reconsider Gn1F = ((FF:CompSeq (G,source,sink)) . (N + 1)) .flow (source,sink) as Element of NAT ; (Sum ((the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source}))))) + 1 <= Gn1F by A19; then A20: Sum ((the_Weight_of G) | (G .edgesDBetween ({source},((the_Vertices_of G) \ {source})))) < ((FF:CompSeq (G,source,sink)) . (N + 1)) .flow (source,sink) by NAT_1:13; not sink in {source} by A1, TARSKI:def_1; hence contradiction by A2, A20, Th12, Th16; ::_thesis: verum end; hence FF:CompSeq (G,source,sink) is halting by GLIB_000:def_54; ::_thesis: verum end; theorem Th18: :: GLIB_005:18 for G being finite natural-weighted WGraph for EL being FF:ELabeling of G for source, sink being set st EL has_valid_flow_from source,sink & ( for P being Path of G holds ( not P is_Walk_from source,sink or not P is_augmenting_wrt EL ) ) holds EL has_maximum_flow_from source,sink proof let G be finite natural-weighted WGraph; ::_thesis: for EL being FF:ELabeling of G for source, sink being set st EL has_valid_flow_from source,sink & ( for P being Path of G holds ( not P is_Walk_from source,sink or not P is_augmenting_wrt EL ) ) holds EL has_maximum_flow_from source,sink let EL be FF:ELabeling of G; ::_thesis: for source, sink being set st EL has_valid_flow_from source,sink & ( for P being Path of G holds ( not P is_Walk_from source,sink or not P is_augmenting_wrt EL ) ) holds EL has_maximum_flow_from source,sink let source, sink be set ; ::_thesis: ( EL has_valid_flow_from source,sink & ( for P being Path of G holds ( not P is_Walk_from source,sink or not P is_augmenting_wrt EL ) ) implies EL has_maximum_flow_from source,sink ) assume that A1: EL has_valid_flow_from source,sink and A2: for P being Path of G holds ( not P is_Walk_from source,sink or not P is_augmenting_wrt EL ) ; ::_thesis: EL has_maximum_flow_from source,sink reconsider src = source as Vertex of G by A1, Def2; set CS = AP:CompSeq (EL,src); set Gn = AP:FindAugPath (EL,src); set Gn1 = (AP:CompSeq (EL,src)) . (((AP:CompSeq (EL,src)) .Lifespan()) + 1); reconsider V = dom (AP:FindAugPath (EL,src)) as Subset of (the_Vertices_of G) ; set E1 = G .edgesDBetween (V,((the_Vertices_of G) \ V)); set A1 = EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))); set B1 = (the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V))); set e = choose (AP:NextBestEdges (AP:FindAugPath (EL,src))); AP:CompSeq (EL,src) is halting by Th6; then A3: (AP:CompSeq (EL,src)) . (((AP:CompSeq (EL,src)) .Lifespan()) + 1) = AP:FindAugPath (EL,src) by GLIB_000:def_55; A4: (AP:CompSeq (EL,src)) . (((AP:CompSeq (EL,src)) .Lifespan()) + 1) = AP:Step (AP:FindAugPath (EL,src)) by Def12; A5: now__::_thesis:_not_AP:NextBestEdges_(AP:FindAugPath_(EL,src))_<>_{} assume A6: AP:NextBestEdges (AP:FindAugPath (EL,src)) <> {} ; ::_thesis: contradiction now__::_thesis:_contradiction percases ( choose (AP:NextBestEdges (AP:FindAugPath (EL,src))) is_forward_edge_wrt AP:FindAugPath (EL,src) or choose (AP:NextBestEdges (AP:FindAugPath (EL,src))) is_backward_edge_wrt AP:FindAugPath (EL,src) ) by A6, Def9; supposeA7: choose (AP:NextBestEdges (AP:FindAugPath (EL,src))) is_forward_edge_wrt AP:FindAugPath (EL,src) ; ::_thesis: contradiction then (the_Source_of G) . (choose (AP:NextBestEdges (AP:FindAugPath (EL,src)))) in V by Def6; then A8: AP:FindAugPath (EL,src) = (AP:FindAugPath (EL,src)) +* (((the_Target_of G) . (choose (AP:NextBestEdges (AP:FindAugPath (EL,src))))) .--> (choose (AP:NextBestEdges (AP:FindAugPath (EL,src))))) by A4, A3, A6, Def10; not (the_Target_of G) . (choose (AP:NextBestEdges (AP:FindAugPath (EL,src)))) in V by A7, Def6; hence contradiction by A8, Lm2; ::_thesis: verum end; suppose choose (AP:NextBestEdges (AP:FindAugPath (EL,src))) is_backward_edge_wrt AP:FindAugPath (EL,src) ; ::_thesis: contradiction then A9: not (the_Source_of G) . (choose (AP:NextBestEdges (AP:FindAugPath (EL,src)))) in V by Def7; then AP:FindAugPath (EL,src) = (AP:FindAugPath (EL,src)) +* (((the_Source_of G) . (choose (AP:NextBestEdges (AP:FindAugPath (EL,src))))) .--> (choose (AP:NextBestEdges (AP:FindAugPath (EL,src))))) by A4, A3, A6, Def10; hence contradiction by A9, Lm2; ::_thesis: verum end; end; end; hence contradiction ; ::_thesis: verum end; A10: now__::_thesis:_for_x_being_set_st_x_in_G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))_holds_ (EL_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._x_=_((the_Weight_of_G)_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._x let x be set ; ::_thesis: ( x in G .edgesDBetween (V,((the_Vertices_of G) \ V)) implies (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x = ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x ) assume A11: x in G .edgesDBetween (V,((the_Vertices_of G) \ V)) ; ::_thesis: (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x = ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x then A12: (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x = EL . x by FUNCT_1:49; A13: x DSJoins V,(the_Vertices_of G) \ V,G by A11, GLIB_000:def_31; then (the_Target_of G) . x in (the_Vertices_of G) \ V by GLIB_000:def_16; then A14: not (the_Target_of G) . x in V by XBOOLE_0:def_5; A15: ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x = (the_Weight_of G) . x by A11, FUNCT_1:49; A16: (the_Source_of G) . x in V by A13, GLIB_000:def_16; A17: now__::_thesis:_not_(EL_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._x_<_((the_Weight_of_G)_|_(G_.edgesDBetween_(V,((the_Vertices_of_G)_\_V))))_._x assume (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x < ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x ; ::_thesis: contradiction then x is_forward_edge_wrt AP:FindAugPath (EL,src) by A11, A12, A15, A16, A14, Def6; hence contradiction by A5, Def9; ::_thesis: verum end; (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x <= ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x by A1, A11, A12, A15, Def2; hence (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x = ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) . x by A17, XXREAL_0:1; ::_thesis: verum end; set E2 = G .edgesDBetween (((the_Vertices_of G) \ V),V); set A2 = EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)); set B2 = EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V)); now__::_thesis:_for_x_being_set_st_x_in_G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)_holds_ (EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))_._x_=_(EmptyBag_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))_._x let x be set ; ::_thesis: ( x in G .edgesDBetween (((the_Vertices_of G) \ V),V) implies (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x = (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x ) assume A18: x in G .edgesDBetween (((the_Vertices_of G) \ V),V) ; ::_thesis: (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x = (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x then A19: x DSJoins (the_Vertices_of G) \ V,V,G by GLIB_000:def_31; then A20: (the_Target_of G) . x in V by GLIB_000:def_16; (the_Source_of G) . x in (the_Vertices_of G) \ V by A19, GLIB_000:def_16; then A21: not (the_Source_of G) . x in V by XBOOLE_0:def_5; A22: (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x = EL . x by A18, FUNCT_1:49; A23: now__::_thesis:_not_0_<_(EL_|_(G_.edgesDBetween_(((the_Vertices_of_G)_\_V),V)))_._x assume 0 < (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x ; ::_thesis: contradiction then x is_backward_edge_wrt AP:FindAugPath (EL,src) by A18, A22, A20, A21, Def7; hence contradiction by A5, Def9; ::_thesis: verum end; EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V)) = (G .edgesDBetween (((the_Vertices_of G) \ V),V)) --> 0 by PRE_POLY:def_13; then (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x = 0 by A18, FUNCOP_1:7; hence (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x = (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) . x by A23; ::_thesis: verum end; then Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) = Sum (EmptyBag (G .edgesDBetween (((the_Vertices_of G) \ V),V))) by GLIB_004:6; then A24: Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V))) = 0 by UPROOTS:11; A25: not sink in dom (AP:FindAugPath (EL,src)) by A2, Th9; then EL .flow (source,sink) = (Sum (EL | (G .edgesDBetween (V,((the_Vertices_of G) \ V))))) - (Sum (EL | (G .edgesDBetween (((the_Vertices_of G) \ V),V)))) by A1, Th10, Th11; then EL .flow (source,sink) = Sum ((the_Weight_of G) | (G .edgesDBetween (V,((the_Vertices_of G) \ V)))) by A10, A24, GLIB_004:6; then for X being FF:ELabeling of G st X has_valid_flow_from source,sink holds X .flow (source,sink) <= EL .flow (source,sink) by A25, Th10, Th12; hence EL has_maximum_flow_from source,sink by A1, Def4; ::_thesis: verum end; theorem :: GLIB_005:19 for G being finite natural-weighted WGraph for source, sink being Vertex of G st sink <> source holds FF:MaxFlow (G,source,sink) has_maximum_flow_from source,sink proof let G be finite natural-weighted WGraph; ::_thesis: for source, sink being Vertex of G st sink <> source holds FF:MaxFlow (G,source,sink) has_maximum_flow_from source,sink let source, sink be Vertex of G; ::_thesis: ( sink <> source implies FF:MaxFlow (G,source,sink) has_maximum_flow_from source,sink ) set CS = FF:CompSeq (G,source,sink); set n = (FF:CompSeq (G,source,sink)) .Lifespan() ; set Gn = (FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan()); set Gn1 = (FF:CompSeq (G,source,sink)) . (((FF:CompSeq (G,source,sink)) .Lifespan()) + 1); A1: (FF:CompSeq (G,source,sink)) . (((FF:CompSeq (G,source,sink)) .Lifespan()) + 1) = FF:Step (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink) by Def20; assume A2: sink <> source ; ::_thesis: FF:MaxFlow (G,source,sink) has_maximum_flow_from source,sink then FF:CompSeq (G,source,sink) is halting by Th17; then A3: (FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan()) = (FF:CompSeq (G,source,sink)) . (((FF:CompSeq (G,source,sink)) .Lifespan()) + 1) by GLIB_000:def_55; now__::_thesis:_for_P_being_Path_of_G_holds_ (_not_P_is_Walk_from_source,sink_or_not_P_is_augmenting_wrt_(FF:CompSeq_(G,source,sink))_._((FF:CompSeq_(G,source,sink))_.Lifespan())_) given P being Path of G such that A4: P is_Walk_from source,sink and A5: P is_augmenting_wrt (FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan()) ; ::_thesis: contradiction set P = AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink); A6: sink in dom (AP:FindAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source)) by A4, A5, Th9; then A7: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink) is_Walk_from source,sink by Def14; then A8: (AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink)) .first() = source by GLIB_001:def_23; A9: (AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink)) .last() = sink by A7, GLIB_001:def_23; A10: AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink) is_augmenting_wrt (FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan()) by A6, Def14; (FF:CompSeq (G,source,sink)) . (((FF:CompSeq (G,source,sink)) .Lifespan()) + 1) = FF:PushFlow (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),(AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink))) by A1, A6, Def18; then (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())) .flow (source,sink)) + ((AP:GetAugPath (((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan())),source,sink)) .tolerance ((FF:CompSeq (G,source,sink)) . ((FF:CompSeq (G,source,sink)) .Lifespan()))) = ((FF:CompSeq (G,source,sink)) . (((FF:CompSeq (G,source,sink)) .Lifespan()) + 1)) .flow (source,sink) by A2, A7, A10, Th15; hence contradiction by A2, A3, A8, A9, A10, Th13, GLIB_001:127; ::_thesis: verum end; hence FF:MaxFlow (G,source,sink) has_maximum_flow_from source,sink by A2, Th16, Th18; ::_thesis: verum end;