
theorem Th11:
  for G being _finite real-weighted WGraph, EL being FF:ELabeling
  of G, source, sink being set, 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, EL being FF:ELabeling of G, source,
  sink be set, V be Subset of the_Vertices_of G;
  assume that
A1: EL has_valid_flow_from source,sink and
A2: source in V and
A3: not sink in V;
  set VG = the_Vertices_of G;
  set n = card (VG \ V);
A4: now
    assume n = 0;
    then
A5: VG \ V = {};
    sink is Vertex of G by A1;
    hence contradiction by A3,A5,XBOOLE_0:def 5;
  end;
  defpred P[Nat] means for V being Subset of VG st card (VG \ V) = $1 & source
in V & not sink in V holds EL.flow(source,sink) = Sum (EL | G.edgesDBetween(V,
  VG \ V)) - Sum (EL | G.edgesDBetween(VG \ V, V));
  set TG = the_Target_of G;
  set SG = the_Source_of G;
A6: now
    let n be non zero Nat;
    assume
A7: P[n];
    now
      let V2 be Subset of VG;
      assume that
A8:   card (VG\V2) = n+1 and
A9:   source in V2 and
A10:  not sink in V2;
      set x = the Element of (VG \ V2) \ {sink};
      set V1 = V2 \/ {x};
      set EV1V1a = G.edgesDBetween(V1, VG \ V1);
      set EV1V1b = G.edgesDBetween(VG \ V1, V1);
      set EXV1c = G.edgesDBetween({x},VG\V1);
      set EV1Xd = G.edgesDBetween(VG\V1,{x});
      sink is Vertex of G by A1;
      then sink in (VG \ V2) by A10,XBOOLE_0:def 5;
      then {sink} c= (VG \ V2) by ZFMISC_1:31;
      then
A11:  card ((VG\V2)\{sink}) = n+1-card {sink} by A8,CARD_2:44
        .= n+1-1 by CARD_1:30
        .= n;
      then
A12:  x in (VG)\V2 by CARD_1:27,XBOOLE_0:def 5;
      then {x} c= VG by ZFMISC_1:31;
      then reconsider V1 as Subset of VG by XBOOLE_1:8;
A13:  VG \ V1 = (VG \ V2) \ {x} by XBOOLE_1:41;
      {x} c= VG \ V2 by A12,ZFMISC_1:31;
      then
A14:  card (VG \ V1) = card (VG \ V2) - card {x} 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 x in {sink} by A11,CARD_1:27,XBOOLE_0:def 5;
      then
A16:  x <> sink by TARSKI:def 1;
      then not sink in {x} by TARSKI:def 1;
      then not sink in V1 by A10,XBOOLE_0:def 3;
      then
A17:  EL.flow(source,sink) = Sum (EL|EV1V1a) - Sum (EL|EV1V1b) by A7,A14,A15;
      set EXXe = G.edgesDBetween({x}, VG \ {x});
      set EXV2 = G.edgesDBetween({x},V2);
      set EV2X = G.edgesDBetween(V2,{x});
      reconsider EA = EV1V1a \/ EV2X as Subset of the_Edges_of G;
      reconsider E1 = EA \ EXV1c as Subset of the_Edges_of G;
      reconsider EB = EA \ EV2X as Subset of the_Edges_of G;
      reconsider EC = EV1V1b \/ EXV2 as Subset of the_Edges_of G;
      reconsider E2 = EC \ EV1Xd as Subset of the_Edges_of G;
      reconsider ED = EC \ EXV2 as Subset of the_Edges_of G;
A18:  dom (EL|EA) = EA by PARTFUN1:def 2;
      now
        set e = the Element of EV1V1b /\ EXV2;
        assume EV1V1b meets EXV2;
        then
A19:    EV1V1b /\ EXV2 <> {} by XBOOLE_0:def 7;
        then e in EV1V1b by XBOOLE_0:def 4;
        then e DSJoins VG\V1,V1,G by GLIB_000:def 31;
        then SG.e in VG \ V1;
        then
A20:    not SG.e in V1 by XBOOLE_0:def 5;
        e in EXV2 by A19,XBOOLE_0:def 4;
        then e DSJoins {x},V2,G by GLIB_000:def 31;
        then SG.e in {x};
        hence contradiction by A20,XBOOLE_0:def 3;
      end;
      then EV1V1b \ EXV2 = EV1V1b by XBOOLE_1:83;
      then
A21:  ED = EV1V1b by XBOOLE_1:40;
      now
        let e be object;
        assume
A22:    e in EXV1c;
        then
A23:    e DSJoins {x},VG \ V1, G by GLIB_000:def 31;
        then SG.e in {x};
        then
A24:    SG.e in V1 by XBOOLE_0:def 3;
        TG.e in VG \ V1 by A23;
        then e DSJoins V1,VG \ V1, G by A22,A24;
        hence e in EV1V1a by GLIB_000:def 31;
      end;
      then
A25:  EXV1c c= EV1V1a;
      now
        set e = the Element of EV1V1a /\ EV2X;
        assume EV1V1a meets EV2X;
        then
A26:    EV1V1a /\ EV2X <> {} by XBOOLE_0:def 7;
        then e in EV1V1a by XBOOLE_0:def 4;
        then e DSJoins V1,VG\V1,G by GLIB_000:def 31;
        then TG.e in VG \ V1;
        then
A27:    not TG.e in V1 by XBOOLE_0:def 5;
        e in EV2X by A26,XBOOLE_0:def 4;
        then e DSJoins V2,{x},G by GLIB_000:def 31;
        then TG.e in {x};
        hence contradiction by A27,XBOOLE_0:def 3;
      end;
      then EV1V1a \ EV2X = EV1V1a by XBOOLE_1:83;
      then
A28:  EB = EV1V1a by XBOOLE_1:40;
A29:  dom (EL|EB) = EB by PARTFUN1:def 2;
A30:  now
        let e be object;
        assume e in dom (EL|EA);
        then
A31:    e in EA;
        now
          per cases;
          suppose
            not e in EV2X;
            then
A32:        e in EB by A31,XBOOLE_0:def 5;
            hence (EL|EV2X +* EL|EB).e = (EL|EB).e by A29,FUNCT_4:13
              .= EL.e by A32,FUNCT_1:49;
          end;
          suppose
A33:        e in EV2X;
            then not e in EB by XBOOLE_0:def 5;
            hence (EL|EV2X +* EL|EB).e = (EL|EV2X).e by A29,FUNCT_4:11
              .= EL.e by A33,FUNCT_1:49;
          end;
        end;
        hence (EL|EA).e = (EL|EV2X +* EL|EB).e by A31,FUNCT_1:49;
      end;
      now
        let e be object;
        hereby
          assume
A34:      e in EXXe \ EXV2;
          then e in EXXe by XBOOLE_0:def 5;
          then
A35:      e DSJoins {x},VG\{x}, G by GLIB_000:def 31;
          then
A36:      SG.e in {x};
A37:      TG.e in VG \ {x } by A35;
          then
A38:      not TG.e in {x } by XBOOLE_0:def 5;
          not e in EXV2 by A34,XBOOLE_0:def 5;
          then not e DSJoins {x},V2,G by GLIB_000:def 31;
          then not TG.e in V2 by A34,A36;
          then not TG.e in V1 by A38,XBOOLE_0:def 3;
          then TG.e in VG \ V1 by A37,XBOOLE_0:def 5;
          then e DSJoins {x}, VG \ V1, G by A34,A36;
          hence e in EXV1c by GLIB_000:def 31;
        end;
        assume
A39:    e in EXV1c;
        then
A40:    e DSJoins {x}, VG \ V1, G by GLIB_000:def 31;
        then
A41:    TG.e in VG \ V1;
        then
A42:    not TG.e in V1 by XBOOLE_0:def 5;
        then not TG.e in {x} by XBOOLE_0:def 3;
        then
A43:    TG.e in VG \ {x} by A41,XBOOLE_0:def 5;
        not TG.e in V2 by A42,XBOOLE_0:def 3;
        then not e DSJoins {x},V2,G;
        then
A44:    not e in EXV2 by GLIB_000:def 31;
        SG.e in {x} by A40;
        then e DSJoins {x}, VG \ {x}, G by A39,A43;
        then e in EXXe by GLIB_000:def 31;
        hence e in EXXe \ EXV2 by A44,XBOOLE_0:def 5;
      end;
      then
A45:  EXXe \ EXV2 = EXV1c by TARSKI:2;
A46:  dom (EL|ED) = ED by PARTFUN1:def 2;
A47:  now
        let e be object;
        assume e in dom (EL|EC);
        then
A48:    e in EC;
        now
          per cases;
          suppose
            not e in EXV2;
            then
A49:        e in ED by A48,XBOOLE_0:def 5;
            hence (EL|EXV2 +* EL|ED).e = (EL|ED).e by A46,FUNCT_4:13
              .= EL.e by A49,FUNCT_1:49;
          end;
          suppose
A50:        e in EXV2;
            then not e in ED by XBOOLE_0:def 5;
            hence (EL|EXV2 +* EL|ED).e = (EL|EXV2).e by A46,FUNCT_4:11
              .= EL.e by A50,FUNCT_1:49;
          end;
        end;
        hence (EL|EC).e = (EL|EXV2 +* EL|ED).e by A48,FUNCT_1:49;
      end;
      reconsider EXV1cb = EXXe \ EXV2 as Subset of the_Edges_of G;
      set EXXf = G.edgesDBetween(VG \ {x}, {x});
A51:  dom (EL|EC) = EC by PARTFUN1:def 2;
      now
        let e be object;
        hereby
          assume
A52:      e in EXXf \ EV2X;
          then e in EXXf by XBOOLE_0:def 5;
          then
A53:      e DSJoins VG \ {x}, {x}, G by GLIB_000:def 31;
          then
A54:      TG.e in {x};
A55:      SG.e in VG \ {x } by A53;
          then
A56:      not SG.e in {x } by XBOOLE_0:def 5;
          not e in EV2X by A52,XBOOLE_0:def 5;
          then not e DSJoins V2, {x}, G by GLIB_000:def 31;
          then not SG.e in V2 by A52,A54;
          then not SG.e in V1 by A56,XBOOLE_0:def 3;
          then SG.e in VG \ V1 by A55,XBOOLE_0:def 5;
          then e DSJoins VG \ V1, {x}, G by A52,A54;
          hence e in EV1Xd by GLIB_000:def 31;
        end;
        assume
A57:    e in EV1Xd;
        then
A58:    e DSJoins VG \ V1, {x}, G by GLIB_000:def 31;
        then
A59:    SG.e in VG \ V1;
        then
A60:    not SG.e in V1 by XBOOLE_0:def 5;
        then not SG.e in {x} by XBOOLE_0:def 3;
        then
A61:    SG.e in VG \ {x} by A59,XBOOLE_0:def 5;
        not SG.e in V2 by A60,XBOOLE_0:def 3;
        then not e DSJoins V2,{x},G;
        then
A62:    not e in EV2X by GLIB_000:def 31;
        TG.e in {x} by A58;
        then e DSJoins VG \ {x}, {x}, G by A57,A61;
        then e in EXXf by GLIB_000:def 31;
        hence e in EXXf \ EV2X by A62,XBOOLE_0:def 5;
      end;
      then
A63:  EXXf \ EV2X = EV1Xd by TARSKI:2;
      now
        let e be object;
        assume
A64:    e in EV1Xd;
        then
A65:    e DSJoins VG\V1,{x}, G by GLIB_000:def 31;
        then TG.e in {x};
        then
A66:    TG.e in V1 by XBOOLE_0:def 3;
        SG.e in VG \ V1 by A65;
        then e DSJoins VG\V1,V1, G by A64,A66;
        hence e in EV1V1b by GLIB_000:def 31;
      end;
      then
A67:  EV1Xd c= EV1V1b;
A68:  not x in V2 by A12,XBOOLE_0:def 5;
      now
        let e be object;
        assume
A69:    e in EV2X;
        then
A70:    e DSJoins V2,{x},G by GLIB_000:def 31;
        then
A71:    SG.e in V2;
        then not SG.e in {x} by A68,TARSKI:def 1;
        then
A72:    SG.e in VG \ {x} by A71,XBOOLE_0:def 5;
        TG.e in {x} by A70;
        then e DSJoins VG\{x}, {x}, G by A69,A72;
        hence e in EXXf by GLIB_000:def 31;
      end;
      then
A73:  EV2X c= EXXf;
A74:  V2 qua set \ {x} is Subset of V2;
      now
        let e be object;
A75:    EV1V1a \/ EV2X qua set \ EXV1c is Subset of EV1V1a \/ EV2X;
        hereby
          assume
A76:      e in G.edgesDBetween(V2, VG \ V2);
          then
A77:      e DSJoins V2, VG \ V2, G by GLIB_000:def 31;
          then
A78:      SG.e in V2;
A79:      now
            assume e in EXV1c;
            then e DSJoins {x},VG \ V1,G by GLIB_000:def 31;
            then SG.e in {x};
            hence contradiction by A68,A78,TARSKI:def 1;
          end;
A80:      TG.e in VG \ V2 by A77;
A81:      SG.e in V1 by A78,XBOOLE_0:def 3;
          now
            per cases;
            suppose
              TG.e in {x};
              then e DSJoins V2,{x},G by A76,A78;
              then e in EV2X by GLIB_000:def 31;
              then e in EV1V1a \/ EV2X by XBOOLE_0:def 3;
              hence e in EV1V1a \/ EV2X \ EXV1c by A79,XBOOLE_0:def 5;
            end;
            suppose
              not TG.e in {x};
              then TG.e in VG \ V1 by A13,A80,XBOOLE_0:def 5;
              then e DSJoins V1, VG \ V1, G by A76,A81;
              then e in EV1V1a by GLIB_000:def 31;
              then e in EV1V1a \/ EV2X by XBOOLE_0:def 3;
              hence e in EV1V1a \/ EV2X \ EXV1c by A79,XBOOLE_0:def 5;
            end;
          end;
          hence e in EV1V1a \/ EV2X \ EXV1c;
        end;
        assume
A82:    e in EV1V1a \/ EV2X \ EXV1c;
        then not e in EXV1c by XBOOLE_0:def 5;
        then
A83:    not e DSJoins {x}, VG \ V1,G by GLIB_000:def 31;
        now
          per cases by A82,A75,XBOOLE_0:def 3;
          suppose
A84:        e in EV1V1a;
            then
A85:        e DSJoins V1, VG\V1, G by GLIB_000:def 31;
            then
A86:        SG.e in V1;
A87:        TG.e in VG \ V1 by A85;
            then not TG.e in V1 by XBOOLE_0:def 5;
            then not TG.e in V2 by XBOOLE_0:def 3;
            then
A88:        TG.e in VG \ V2 by A87,XBOOLE_0:def 5;
            not SG.e in {x} by A83,A84,A87;
            then SG.e in V1 \ {x} by A86,XBOOLE_0:def 5;
            then SG.e in V2 \ {x} by XBOOLE_1:40;
            hence e DSJoins V2, VG \ V2, G by A74,A84,A88;
          end;
          suppose
A89:        e in EV2X;
            then
A90:        e DSJoins V2, {x}, G by GLIB_000:def 31;
            then
A91:        SG.e in V2;
            TG.e in {x} by A90;
            then
A92:        not TG.e in V2 by A68,TARSKI:def 1;
            TG.e in VG by A89,FUNCT_2:5;
            then TG.e in VG \ V2 by A92,XBOOLE_0:def 5;
            hence e DSJoins V2, VG \ V2, G by A89,A91;
          end;
        end;
        hence e in G.edgesDBetween(V2, VG \ V2) by GLIB_000:def 31;
      end;
      then
A93:  G.edgesDBetween(V2, VG \ V2) = EV1V1a \/ EV2X \ EXV1c by TARSKI:2;
      now
        let e be object;
A94:    EV1V1b \/ EXV2 qua set \ EV1Xd is Subset of EV1V1b \/ EXV2;
        hereby
          assume
A95:      e in G.edgesDBetween(VG \ V2, V2);
          then
A96:      e DSJoins VG\V2, V2, G by GLIB_000:def 31;
          then
A97:      TG.e in V2;
A98:      now
            assume e in EV1Xd;
            then e DSJoins VG \ V1,{x},G by GLIB_000:def 31;
            then TG.e in {x};
            hence contradiction by A68,A97,TARSKI:def 1;
          end;
A99:      SG.e in VG \ V2 by A96;
A100:     TG.e in V1 by A97,XBOOLE_0:def 3;
          now
            per cases;
            suppose
              SG.e in {x};
              then e DSJoins {x},V2,G by A95,A97;
              then e in EXV2 by GLIB_000:def 31;
              then e in EV1V1b \/ EXV2 by XBOOLE_0:def 3;
              hence e in EV1V1b \/ EXV2 \ EV1Xd by A98,XBOOLE_0:def 5;
            end;
            suppose
              not SG.e in {x};
              then SG.e in VG \ V1 by A13,A99,XBOOLE_0:def 5;
              then e DSJoins VG \ V1, V1, G by A95,A100;
              then e in EV1V1b by GLIB_000:def 31;
              then e in EV1V1b \/ EXV2 by XBOOLE_0:def 3;
              hence e in EV1V1b \/ EXV2 \ EV1Xd by A98,XBOOLE_0:def 5;
            end;
          end;
          hence e in EV1V1b \/ EXV2 \ EV1Xd;
        end;
        assume
A101:   e in EV1V1b \/ EXV2 \ EV1Xd;
        then not e in EV1Xd by XBOOLE_0:def 5;
        then
A102:   not e DSJoins VG \ V1, {x}, G by GLIB_000:def 31;
        now
          per cases by A101,A94,XBOOLE_0:def 3;
          suppose
A103:       e in EV1V1b;
            then
A104:       e DSJoins VG\V1, V1, G by GLIB_000:def 31;
            then
A105:       TG.e in V1;
A106:       SG.e in VG \ V1 by A104;
            then not SG.e in V1 by XBOOLE_0:def 5;
            then not SG.e in V2 by XBOOLE_0:def 3;
            then
A107:       SG.e in VG \ V2 by A106,XBOOLE_0:def 5;
            not TG.e in {x} by A102,A103,A106;
            then TG.e in V1 \ {x} by A105,XBOOLE_0:def 5;
            then TG.e in V2 \ {x} by XBOOLE_1:40;
            hence e DSJoins VG \ V2, V2, G by A74,A103,A107;
          end;
          suppose
A108:       e in EXV2;
            then
A109:       e DSJoins {x},V2, G by GLIB_000:def 31;
            then
A110:       TG.e in V2;
            SG.e in {x} by A109;
            then
A111:       not SG.e in V2 by A68,TARSKI:def 1;
            SG.e in VG by A108,FUNCT_2:5;
            then SG.e in VG \ V2 by A111,XBOOLE_0:def 5;
            hence e DSJoins VG \ V2, V2, G by A108,A110;
          end;
        end;
        hence e in G.edgesDBetween(VG\V2,V2) by GLIB_000:def 31;
      end;
      then
A112: G.edgesDBetween(VG \ V2, V2) = E2 by TARSKI:2;
A113: dom (EL|E2)=EC\EV1Xd by PARTFUN1:def 2;
A114: now
        let e be object;
        assume e in dom (EL|EC);
        then
A115:   e in EC;
        now
          per cases;
          suppose
            not e in EV1Xd;
            then
A116:       e in E2 by A115,XBOOLE_0:def 5;
            hence (EL|EV1Xd +* EL|E2).e = (EL|E2).e by A113,FUNCT_4:13
              .= EL.e by A116,FUNCT_1:49;
          end;
          suppose
A117:       e in EV1Xd;
            then not e in E2 by XBOOLE_0:def 5;
            hence (EL|EV1Xd +* EL|E2).e = (EL|EV1Xd).e by A113,FUNCT_4:11
              .= EL.e by A117,FUNCT_1:49;
          end;
        end;
        hence (EL|EC).e = (EL|EV1Xd +* EL|E2).e by A115,FUNCT_1:49;
      end;
      dom (EL|EXV2)=EXV2 by PARTFUN1:def 2;
      then dom (EL|EXV2 +* EL|ED) = EXV2 \/ ED by A46,FUNCT_4:def 1
        .= EXV2 \/ (EV1V1b \/ EXV2) by XBOOLE_1:39
        .= EC by XBOOLE_1:6;
      then
A118: Sum (EL|EC) = Sum (EL|EXV2) + Sum (EL|EV1V1b) by A21,A51,A47,FUNCT_1:2
,GLIB_004:3;
      dom (EL|EV1Xd) = EV1Xd by PARTFUN1:def 2;
      then dom (EL|EV1Xd +* EL|E2) = EV1Xd \/ (EC \ EV1Xd) by A113,
FUNCT_4:def 1
        .= EV1Xd \/ (EV1V1b \/ EXV2) by XBOOLE_1:39
        .= EC by A67,XBOOLE_1:10,12;
      then
A119: Sum (EL|EC) = Sum (EL|E2) + Sum (EL|EV1Xd) by A51,A114,FUNCT_1:2
,GLIB_004:3;
      dom (EL|EV2X)=EV2X by PARTFUN1:def 2;
      then dom (EL|EV2X +* EL|EB) = EV2X \/ EB by A29,FUNCT_4:def 1
        .= EV2X \/ (EV1V1a \/ EV2X) by XBOOLE_1:39
        .= EA by XBOOLE_1:6;
      then
A120: Sum (EL|EA) = Sum (EL|EV2X) + Sum (EL|EV1V1a) by A28,A18,A30,FUNCT_1:2
,GLIB_004:3;
      reconsider EV1Xdb = EXXf \ EV2X as Subset of the_Edges_of G;
A121: dom (EL|EV1Xdb) = EXXf \ EV2X by PARTFUN1:def 2;
      now
        let e be object;
        assume
A122:   e in EXV2;
        then
A123:   e DSJoins {x},V2,G by GLIB_000:def 31;
        then
A124:   TG.e in V2;
        then not TG.e in {x} by A68,TARSKI:def 1;
        then
A125:   TG.e in VG \ {x} by A124,XBOOLE_0:def 5;
        SG.e in {x} by A123;
        then e DSJoins {x},VG\{x}, G by A122,A125;
        hence e in EXXe by GLIB_000:def 31;
      end;
      then
A126: EXV2 c= EXXe;
A127: dom (EL|E1)=EA \ EXV1c by PARTFUN1:def 2;
A128: now
        let e be object;
        assume e in dom (EL|EA);
        then
A129:   e in EA;
        now
          per cases;
          suppose
            not e in EXV1c;
            then
A130:       e in E1 by A129,XBOOLE_0:def 5;
            hence (EL|EXV1c +* EL|E1).e = (EL|E1).e by A127,FUNCT_4:13
              .= EL.e by A130,FUNCT_1:49;
          end;
          suppose
A131:       e in EXV1c;
            then not e in E1 by XBOOLE_0:def 5;
            hence (EL|EXV1c +* EL|E1).e = (EL|EXV1c).e by A127,FUNCT_4:11
              .= EL.e by A131,FUNCT_1:49;
          end;
        end;
        hence (EL|EA).e = (EL|EXV1c +* EL|E1).e by A129,FUNCT_1:49;
      end;
A132: dom (EL|EXXf) = EXXf by PARTFUN1:def 2;
A133: now
        let e be object;
        assume
A134:   e in dom (EL|EXXf);
        then
A135:   e in EXXf;
        now
          per cases;
          suppose
A136:       e in EV2X;
            then not e in EV1Xdb by XBOOLE_0:def 5;
            hence (EL|EV2X +* EL|EV1Xdb).e=(EL|EV2X).e by A121,FUNCT_4:11
              .=EL.e by A136,FUNCT_1:49;
          end;
          suppose
            not e in EV2X;
            then
A137:       e in EV1Xdb by A135,XBOOLE_0:def 5;
            hence (EL|EV2X +* EL|EV1Xdb).e = (EL|EV1Xdb).e by A121,FUNCT_4:13
              .= EL.e by A137,FUNCT_1:49;
          end;
        end;
        hence (EL|EXXf).e = (EL|EV2X +* EL|EV1Xdb).e by A134,FUNCT_1:49;
      end;
      dom (EL|EV2X) = EV2X by PARTFUN1:def 2;
      then dom (EL|EV2X +* EL|(EXXf \ EV2X)) = EV2X \/ (EXXf \ EV2X) by A121,
FUNCT_4:def 1
        .= EV2X \/ EXXf by XBOOLE_1:39
        .= EXXf by A73,XBOOLE_1:12;
      then
A138: Sum (EL|EV2X) + Sum (EL|EV1Xd) = Sum (EL|EXXf) by A63,A132,A133,FUNCT_1:2
,GLIB_004:3;
      dom (EL|EXV1c) = EXV1c by PARTFUN1:def 2;
      then dom (EL|EXV1c +* EL|E1) = EXV1c \/ (EA \ EXV1c) by A127,
FUNCT_4:def 1
        .= EXV1c \/ (EV1V1a \/ EV2X) by XBOOLE_1:39
        .= EA by A25,XBOOLE_1:10,12;
      then
A139: Sum (EL|EA) = Sum (EL|E1) + Sum (EL|EXV1c) by A18,A128,FUNCT_1:2
,GLIB_004:3;
A140: dom (EL|EXV1cb) = EXXe \ EXV2 by PARTFUN1:def 2;
A141: dom (EL|EXXe) = EXXe by PARTFUN1:def 2;
A142: now
        let e be object;
        assume
A143:   e in dom (EL|EXXe);
        then
A144:   e in EXXe;
        now
          per cases;
          suppose
A145:       e in EXV2;
            then not e in EXV1cb by XBOOLE_0:def 5;
            hence (EL|EXV2 +* EL|EXV1cb).e=(EL|EXV2).e by A140,FUNCT_4:11
              .=EL.e by A145,FUNCT_1:49;
          end;
          suppose
            not e in EXV2;
            then
A146:       e in EXV1cb by A144,XBOOLE_0:def 5;
            hence (EL|EXV2 +* EL|EXV1cb).e = (EL|EXV1cb).e by A140,FUNCT_4:13
              .= EL.e by A146,FUNCT_1:49;
          end;
        end;
        hence (EL|EXXe).e = (EL|EXV2 +* EL|EXV1cb).e by A143,FUNCT_1:49;
      end;
      dom (EL|EXV2) = EXV2 by PARTFUN1:def 2;
      then dom (EL|EXV2 +* EL|(EXXe \ EXV2)) = EXV2 \/ (EXXe \ EXV2) by A140,
FUNCT_4:def 1
        .= EXV2 \/ EXXe by XBOOLE_1:39
        .= EXXe by A126,XBOOLE_1:12;
      then
A147: Sum (EL|EXV2) + Sum (EL|EXV1c) = Sum (EL|EXXe) by A45,A141,A142,FUNCT_1:2
,GLIB_004:3;
      reconsider x as Vertex of G by A12;
A148: x.edgesOut() = G.edgesDBetween({x},VG) by GLIB_000:39;
      reconsider EXXeb = G.edgesDBetween({x},VG)\G.edgesDBetween({x},{x}) as
      Subset of the_Edges_of G;
      reconsider EXXfb = G.edgesDBetween(VG,{x})\G.edgesDBetween({x},{x}) as
      Subset of the_Edges_of G;
A149: dom (EL|G.edgesDBetween(VG,{x})) = G.edgesDBetween(VG,{x}) by
PARTFUN1:def 2;
      now
        let e be object;
        hereby
          assume
A150:     e in G.edgesDBetween(VG,{x}) \ G.edgesDBetween({x},{x});
          then e in G.edgesDBetween(VG,{x}) by XBOOLE_0:def 5;
          then
A151:     e DSJoins VG,{x},G by GLIB_000:def 31;
          then
A152:     SG.e in VG;
A153:     TG.e in {x} by A151;
          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 SG.e in {x} by A150,A153;
          then SG.e in VG\{x} by A152,XBOOLE_0:def 5;
          then e DSJoins VG\{x},{x},G by A150,A153;
          hence e in EXXf by GLIB_000:def 31;
        end;
        assume
A154:   e in EXXf;
        then
A155:   e DSJoins VG \{x}, {x}, G by GLIB_000:def 31;
        then
A156:   SG.e in VG \ {x};
        then not SG.e in {x} by XBOOLE_0:def 5;
        then not e DSJoins {x},{x},G;
        then
A157:   not e in G.edgesDBetween({x},{x}) by GLIB_000:def 31;
        TG.e in {x} by A155;
        then e DSJoins VG,{x},G by A154,A156;
        then e in G.edgesDBetween(VG,{x}) by GLIB_000:def 31;
        hence e in G.edgesDBetween(VG,{x}) \ G.edgesDBetween({x},{x}) by A157,
XBOOLE_0:def 5;
      end;
      then
A158: G.edgesDBetween(VG,{x}) \ G.edgesDBetween({x},{x}) = EXXf by TARSKI:2;
A159: dom (EL|EXXfb) = EXXfb by PARTFUN1:def 2;
A160: now
        let e be object;
        assume e in dom (EL|G.edgesDBetween(VG,{x}));
        then
A161:   e in G.edgesDBetween(VG,{x});
        now
          per cases;
          suppose
A162:       e in G.edgesDBetween({x},{x});
            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;
          end;
          suppose
            not e in G.edgesDBetween({x},{x});
            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;
          end;
        end;
        hence (EL|G.edgesDBetween(VG,{x})).e = (EL|G.edgesDBetween({x},{x}) +*
        EL|EXXfb).e by A161,FUNCT_1:49;
      end;
      now
        let e be object;
        hereby
          assume
A164:     e in G.edgesDBetween({x},VG) \ G.edgesDBetween({x},{x});
          then e in G.edgesDBetween({x},VG) by XBOOLE_0:def 5;
          then
A165:     e DSJoins {x},VG,G by GLIB_000:def 31;
          then
A166:     TG.e in VG;
A167:     SG.e in {x} by A165;
          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 TG.e in {x} by A164,A167;
          then TG.e in VG\{x} by A166,XBOOLE_0:def 5;
          then e DSJoins {x},VG\{x},G by A164,A167;
          hence e in EXXe by GLIB_000:def 31;
        end;
        assume
A168:   e in EXXe;
        then
A169:   e DSJoins {x}, VG \{x}, G by GLIB_000:def 31;
        then
A170:   TG.e in VG \ {x};
        then not TG.e in {x} by XBOOLE_0:def 5;
        then not e DSJoins {x},{x},G;
        then
A171:   not e in G.edgesDBetween({x},{x}) by GLIB_000:def 31;
        SG.e in {x} by A169;
        then e DSJoins {x},VG,G by A168,A170;
        then e in G.edgesDBetween({x},VG) by GLIB_000:def 31;
        hence e in G.edgesDBetween({x},VG) \ G.edgesDBetween({x},{x}) by A171,
XBOOLE_0:def 5;
      end;
      then
A172: G.edgesDBetween({x},VG) \ G.edgesDBetween({x},{x}) = EXXe by TARSKI:2;
A173: dom (EL|G.edgesDBetween({x},VG)) = G.edgesDBetween({x},VG) by
PARTFUN1:def 2;
A174: dom (EL|EXXeb) = EXXeb by PARTFUN1:def 2;
A175: now
        let e be object;
        assume e in dom (EL|G.edgesDBetween({x},VG));
        then
A176:   e in G.edgesDBetween({x},VG);
        now
          per cases;
          suppose
A177:       e in G.edgesDBetween({x},{x});
            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;
          end;
          suppose
            not e in G.edgesDBetween({x},{x});
            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;
          end;
        end;
        hence (EL|G.edgesDBetween({x},VG)).e = (EL|G.edgesDBetween({x},{x}) +*
        EL|EXXeb).e by A176,FUNCT_1:49;
      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(VG,{x}) by XBOOLE_1:39
        .= G.edgesDBetween(VG,{x}) by GLIB_000:38,XBOOLE_1:12;
      then
A180: Sum (EL|G.edgesDBetween(VG,{x})) = Sum (EL|EXXf) + 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},VG) by XBOOLE_1:39
        .= G.edgesDBetween({x},VG) by GLIB_000:38,XBOOLE_1:12;
      then
A181: Sum (EL|G.edgesDBetween({x},VG)) = Sum (EL|EXXe) + Sum (EL|G
      .edgesDBetween({x},{x})) by A172,A173,A175,FUNCT_1:2,GLIB_004:3;
      x.edgesIn() = G.edgesDBetween(VG,{x}) by GLIB_000:39;
      then Sum (EL|G.edgesDBetween(VG,{x}))= Sum (EL|G.edgesDBetween({x } ,VG
      ) ) by A1,A9,A68,A16,A148;
      hence
      EL.flow(source,sink) = Sum(EL | G.edgesDBetween(V2, VG \ V2)) - Sum
(EL | G.edgesDBetween(VG \ V2, V2)) by A17,A93,A139,A120,A112,A119,A118,A138
,A147,A180,A181;
    end;
    hence P[n+1];
  end;
  now
    set ESS = G.edgesDBetween({sink},{sink});
    let V be Subset of VG;
    assume that
A182: card (VG \ V) = 1 and
    source in V and
A183: not sink in V;
    reconsider EOUT= G.edgesOutOf({sink})\ ESS as Subset of the_Edges_of G;
    consider v being object such that
A184: VG \ V = {v} by A182,CARD_2:42;
    sink is Vertex of G by A1;
    then sink in VG \ V by A183,XBOOLE_0:def 5;
    then
A185: v = sink by A184,TARSKI:def 1;
A186: now
      let x be object;
      hereby
        assume
A187:   x in VG \ {sink};
        then not x in {sink} by XBOOLE_0:def 5;
        hence x in V by A184,A185,A187,XBOOLE_0:def 5;
      end;
      assume
A188: x in V;
      then not x in {sink} by A183,TARSKI:def 1;
      hence x in VG \ {sink} by A188,XBOOLE_0:def 5;
    end;
    then
A189: V = VG \ {sink} by TARSKI:2;
    now
      let e be object;
      hereby
        assume
A190:   e in G.edgesDBetween(VG \ V, V);
        then
A191:   e DSJoins {sink},(VG \ {sink}),G by A184,A185,A189,GLIB_000:def 31;
        then
A192:   TG.e in (VG \ {sink});
A193:   now
          assume e in ESS;
          then e DSJoins {sink},{sink},G by GLIB_000:def 31;
          then TG.e in {sink};
          hence contradiction by A192,XBOOLE_0:def 5;
        end;
        SG.e in {sink} by A191;
        then e in G.edgesOutOf({sink}) by A190,GLIB_000:def 27;
        hence e in EOUT by A193,XBOOLE_0:def 5;
      end;
      assume
A194: e in EOUT;
      G.edgesOutOf({sink}) qua set \ ESS is Subset of G.edgesOutOf({sink} );
      then
A195: SG.e in {sink} by A194,GLIB_000:def 27;
A196: not e in ESS by A194,XBOOLE_0:def 5;
      now
        assume
A197:   not TG.e in V;
        TG.e in VG by A194,FUNCT_2:5;
        then TG.e in {sink} by A189,A197,XBOOLE_0:def 5;
        then e DSJoins {sink},{sink},G by A194,A195;
        hence contradiction by A196,GLIB_000:def 31;
      end;
      then e DSJoins (VG \ V),V,G by A184,A185,A194,A195;
      hence e in G.edgesDBetween(VG \ V, V) by GLIB_000:def 31;
    end;
    then
A198: G.edgesDBetween(VG \ V, V) = EOUT by TARSKI:2;
    set EESS = EL|ESS;
    reconsider EIN = G.edgesInto({sink}) \ ESS as Subset of the_Edges_of G;
A199: dom (EL|G.edgesInto({sink})) = G.edgesInto({sink}) by PARTFUN1:def 2;
    now
      let e be object;
      hereby
        assume
A200:   e in G.edgesDBetween(V, VG \ V);
        then
A201:   e DSJoins VG \ {sink}, {sink},G by A184,A185,A189,GLIB_000:def 31;
        then
A202:   SG.e in VG \ {sink};
A203:   now
          assume e in ESS;
          then e DSJoins {sink},{sink},G by GLIB_000:def 31;
          then SG.e in {sink};
          hence contradiction by A202,XBOOLE_0:def 5;
        end;
        TG.e in {sink} by A201;
        then e in G.edgesInto({sink}) by A200,GLIB_000:def 26;
        hence e in EIN by A203,XBOOLE_0:def 5;
      end;
      assume
A204: e in EIN;
      G.edgesInto({sink}) qua set \ ESS is Subset of G.edgesInto({sink});
      then
A205: TG.e in {sink} by A204,GLIB_000:def 26;
A206: not e in ESS by A204,XBOOLE_0:def 5;
      now
        assume not SG.e in V;
        then
A207:   not SG.e in VG \ {sink} by A186;
        SG.e in VG by A204,FUNCT_2:5;
        then SG.e in {sink} by A207,XBOOLE_0:def 5;
        then e DSJoins {sink},{sink},G by A204,A205;
        hence contradiction by A206,GLIB_000:def 31;
      end;
      then e DSJoins V, {sink}, G by A204,A205;
      hence e in G.edgesDBetween(V, VG \ V) by A184,A185,GLIB_000:def 31;
    end;
    then
A208: G.edgesDBetween(V, VG \ V) = EIN by TARSKI:2;
    now
      let e be object;
      assume
A209: e in ESS;
      then e DSJoins {sink},{sink},G by GLIB_000:def 31;
      then SG.e in {sink};
      hence e in G.edgesOutOf({sink}) by A209,GLIB_000:def 27;
    end;
    then
A210: ESS c= G.edgesOutOf({sink});
    now
      let e be object;
      assume
A211: e in ESS;
      then e DSJoins {sink},{sink},G by GLIB_000:def 31;
      then TG.e in {sink};
      hence e in G.edgesInto({sink}) by A211,GLIB_000:def 26;
    end;
    then
A212: ESS c= G.edgesInto({sink});
A213: dom (EL|ESS)=ESS by PARTFUN1:def 2;
A214: dom (EL|EOUT)=EOUT by PARTFUN1:def 2;
A215: now
      let e be object;
      assume
A216: e in dom (EL|G.edgesOutOf({sink}));
      then
A217: e in G.edgesOutOf({sink});
      now
        per cases;
        suppose
A218:     e in ESS;
          then not e in EOUT by XBOOLE_0:def 5;
          hence (EL|ESS +* EL|EOUT).e = (EL|ESS).e by A214,FUNCT_4:11
            .= EL.e by A213,A218,FUNCT_1:47;
        end;
        suppose
          not e in ESS;
          then
A219:     e in EOUT by A217,XBOOLE_0:def 5;
          hence (EL|ESS +* EL|EOUT).e = (EL|EOUT).e by A214,FUNCT_4:13
            .= EL.e by A214,A219,FUNCT_1:47;
        end;
      end;
      hence EL|G.edgesOutOf({sink}).e = (EL|ESS +* EL|EOUT).e by A216,
FUNCT_1:47;
    end;
A220: dom (EL|EIN)=EIN by PARTFUN1:def 2;
A221: now
      let e be object;
      assume
A222: e in dom (EL|G.edgesInto({sink}));
      then
A223: e in G.edgesInto({sink});
      now
        per cases;
        suppose
A224:     e in ESS;
          then not e in EIN by XBOOLE_0:def 5;
          hence (EL|ESS +* EL|EIN).e = (EL|ESS).e by A220,FUNCT_4:11
            .= EL.e by A213,A224,FUNCT_1:47;
        end;
        suppose
          not e in ESS;
          then
A225:     e in EIN by A223,XBOOLE_0:def 5;
          hence (EL|ESS +* EL|EIN).e = (EL|EIN).e by A220,FUNCT_4:13
            .= EL.e by A220,A225,FUNCT_1:47;
        end;
      end;
      hence EL|G.edgesInto({sink}).e = (EL|ESS +* EL|EIN).e by A222,FUNCT_1:47;
    end;
A226: ESS \/ EIN = G.edgesInto({sink}) \/ ESS by XBOOLE_1:39
      .= G.edgesInto({sink}) by A212,XBOOLE_1:12;
    dom (EL|ESS +* EL|EIN) = ESS \/ EIN by A213,A220,FUNCT_4:def 1;
    then
A227: Sum (EL|G.edgesInto({sink})) = Sum (EL|EIN) + Sum EESS by A226,A199,A221,
FUNCT_1:2,GLIB_004:3;
    ESS \/ EOUT = G.edgesOutOf({sink}) \/ ESS by XBOOLE_1:39
      .= G.edgesOutOf({sink}) by A210,XBOOLE_1:12;
    then
A228: dom (EL|ESS +* 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 EESS -(Sum EESS + 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, VG \ V)) - Sum (
    EL | G.edgesDBetween(VG \ V, V)) by A208,A198;
  end;
  then
A229: P[1];
  for n being non zero Nat holds P[n] from NAT_1:sch 10(A229,A6);
  hence thesis by A2,A3,A4;
end;
