
theorem Th12:
  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 ((the_Weight_of G) | G.edgesDBetween(V,the_Vertices_of G \
  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 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
    let e be set;
    assume
A4: e in G.edgesDBetween(V, the_Vertices_of G\V);
    then
A5: W1.e = (the_Weight_of G).e by FUNCT_1:49;
    E1.e = EL.e by A4,FUNCT_1:49;
    hence E1.e <= W1.e by A1,A4,A5;
  end;
  then Sum E1 <= Sum W1 by GLIB_004:5;
  then
A6: Sum E1 - Sum E2 <= Sum W1 - Sum E2 by XREAL_1:9;
  set B1 = EmptyBag G.edgesDBetween(the_Vertices_of G \ V, V);
A7: now
    let e be set;
A8: B1 = G.edgesDBetween(the_Vertices_of G \ V, V)-->0 by PBOOLE:def 3;
    assume e in G.edgesDBetween(the_Vertices_of G \ V, V);
    hence B1.e <= E2.e by A8,FUNCOP_1:7;
  end;
  Sum B1 = 0 by UPROOTS:11;
  then 0 <= Sum E2 by A7,GLIB_004:5;
  then
A9: Sum W1 - Sum E2 <= Sum W1 - 0 by XREAL_1:13;
  EL.flow(source,sink) = Sum E1 - Sum E2 by A1,A2,A3,Th11;
  hence thesis by A9,A6,XXREAL_0:2;
end;
