
theorem Th10:
  for G1 being _finite real-weighted WGraph, e being set, G2 being
weight-inheriting [Weighted] removeEdge of G1,e st e in the_Edges_of G1 holds
  G1.cost() = G2.cost() + (the_Weight_of G1).e
proof
  let G1 be _finite real-weighted WGraph, e be set, G2 be weight-inheriting
  [Weighted] removeEdge of G1,e;
  set EG1 = the_Edges_of G1, EG2 = the_Edges_of G2;
  assume
A1: e in EG1;
A2: dom the_Weight_of G1 = EG1 by PARTFUN1:def 2;
  set b2 = (e .--> (the_Weight_of G1).e);
A3: dom b2 = {e};
A4: EG2 = EG1 \ {e} by GLIB_000:51;
  then EG1 \ EG2 = EG1 /\ {e} by XBOOLE_1:48
    .= {e} by A1,ZFMISC_1:46;
  then reconsider b2 as ManySortedSet of EG1 \ EG2;
  reconsider b2 as Rbag of EG1 \ EG2;
A5: the_Weight_of G2 = (the_Weight_of G1) | (EG2) by GLIB_003:def 10;
A6: now
    let x be object;
    assume x in dom the_Weight_of G1;
    then
A7: x in EG1;
    now
      per cases;
      suppose
A8:     x in {e};
        then
A9:     x = e by TARSKI:def 1;
        hence (the_Weight_of G2 +* b2).x = b2.e by A3,A8,FUNCT_4:13
          .= (the_Weight_of G1).x by A9,FUNCOP_1:72;
      end;
      suppose
        not x in {e};
        then
        (the_Weight_of G2 +* b2).x = (the_Weight_of G2).x & x in EG1 \ {e
        } by A3,A7,FUNCT_4:11,XBOOLE_0:def 5;
        hence (the_Weight_of G2 +* b2).x = (the_Weight_of G1).x by A4,A5,
FUNCT_1:49;
      end;
    end;
    hence (the_Weight_of G1).x = (the_Weight_of G2 +* b2).x;
  end;
  dom (the_Weight_of G2 +* b2) = dom the_Weight_of G2 \/ {e} by A3,
FUNCT_4:def 1
    .= (EG1 \ {e}) \/ {e} by A4,PARTFUN1:def 2
    .= EG1 \/ {e} by XBOOLE_1:39
    .= EG1 by A1,ZFMISC_1:40;
  hence G1.cost() = G2.cost() + Sum b2 by A2,A6,Th3,FUNCT_1:2
    .= G2.cost() + b2.e by A3,Th4
    .= G2.cost() + (the_Weight_of G1).e by FUNCOP_1:72;
end;
