
theorem Th14:
  for G being _finite natural-weighted WGraph, EL being
FF:ELabeling of G, source,sink being set, 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, EL being FF:ELabeling of G, source,
  sink be set, P be Path of G;
  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;
  set EL2 = FF:PushFlow(EL,P);
  now
    thus source is Vertex of G & sink is Vertex of G by A2;
    now
      let e be set;
      assume
A5:   e in the_Edges_of G;
      then
A6:   EL.e <= (the_Weight_of G).e by A2;
      now
        per cases;
        suppose
          not e in P.edges();
          hence 0 <= EL2.e & EL2.e <= (the_Weight_of G).e by A4,A5,A6,Def17;
        end;
        suppose
          e in P.edges();
          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), n1div2 = (n+1) div 2;
A9:       1 <= n+1 by NAT_1:11;
          n+1 <= len P by A7,NAT_1:13;
          then n1div2 in dom P.edgeSeq() by A9,GLIB_001:77;
          then
A10:      n1div2 in dom PFS by A4,Def15;
A11:      now
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;
A15:        (the_Source_of G).e = P.n by A13;
A16:        (the_Source_of G).e = P.(n+2) by A14;
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;
          end;
A19:      P.last() = sink by A3,GLIB_001:def 23;
          P.first() = source by A3,GLIB_001:def 23;
          then
A20:      P is non trivial by A1,A19,GLIB_001:127;
          2 divides n+1 by PEPIN:22;
          then
A21:      2 * n1div2 = n+1 by NAT_D:3;
          then
A22:      2 * n1div2 - 1 = n;
A23:      2 * n1div2 + 1 = n + 2 by A21;
A24:      e Joins P.n,P.(n+2),G by A7,A8,GLIB_001:def 3;
          now
            per cases by A24;
            suppose
A25:          e DJoins P.n,P.(n+2),G;
              then PFS.n1div2 = (the_Weight_of G).e - EL.e by A4,A8,A10,A22,A23
,Def15;
              then (the_Weight_of G).e - EL.e in rng PFS by A10,FUNCT_1:def 3;
              then
A26:          P.tolerance(EL) <= (the_Weight_of G).e-EL.e by A4,A20,Def16;
              thus 0 <= EL2.e;
              EL.e + P.tolerance(EL) = EL2.e by A4,A7,A8,A25,Def17;
              then EL2.e <= (the_Weight_of G).e - EL.e + EL.e by A26,XREAL_1:7;
              hence EL2.e <= (the_Weight_of G).e;
            end;
            suppose
A27:          e DJoins P.(n+2),P.n,G;
              thus 0 <= EL2.e;
              EL2.e = EL.e - P.tolerance(EL) by A4,A7,A8,A11,A27,Def17;
              then EL2.e <= EL.e - 0 by XREAL_1:13;
              hence EL2.e <= (the_Weight_of G).e by A6,XXREAL_0:2;
            end;
          end;
          hence 0 <= EL2.e & EL2.e <= (the_Weight_of G).e;
        end;
      end;
      hence 0 <= EL2.e & EL2.e <= (the_Weight_of G).e;
    end;
    hence for e being set st e in the_Edges_of G holds 0 <= EL2.e & EL2.e <= (
    the_Weight_of G).e;
    let v be Vertex of G;
    assume that
A28: v <> source and
A29: v <> sink;
A30: Sum (EL | v.edgesIn()) = Sum (EL | v.edgesOut()) by A2,A28,A29;
    now
      per cases;
      suppose
        v in P.vertices();
        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
          assume n = len P;
          then v = P.last() by A32,GLIB_001:def 7
            .= sink by A3,GLIB_001:def 23;
          hence contradiction by A29;
        end;
        then
A34:    n < len P by A31,XXREAL_0:1;
A35:    now
          assume n = 1;
          then v = P.first() by A32,GLIB_001:def 6
            .= source by A3,GLIB_001:def 23;
          hence contradiction by A28;
        end;
A36:    now
A37:      n+0 < n+2 by XREAL_1:8;
          assume
A38:      v = P.(n+2);
          n+2 <= len P by A34,GLIB_001:1;
          hence contradiction by A32,A35,A38,A37,GLIB_001:def 28;
        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), e2 = P.(n+1), T = P.tolerance(EL);
A39:    1 <= n2+1 by NAT_1:11;
A40:    P.(n2+2) = v by A32;
A41:    now
          let e be set;
          assume that
A42:      e in v.edgesIn() or e in v.edgesOut() and
A43:      e <> e1 and
A44:      e <> e2;
          now
            assume e in P.edges();
            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
              per cases by A42;
              suppose
                e in v.edgesIn();
                then (the_Target_of G).e = v by GLIB_000:56;
                hence v1 = v or v2 = v by A49;
              end;
              suppose
                e in v.edgesOut();
                then (the_Source_of G).e = v by GLIB_000:58;
                hence v1 = v or v2 = v by A49;
              end;
            end;
A51:        m+2-2 < len P - 0 by A45,XREAL_1:15;
            now
              per cases by A50;
              suppose
A52:            v1 = v;
                now
                  per cases by XXREAL_0:1;
                  suppose
                    m < n;
                    hence contradiction by A31,A32,A33,A46,A52,GLIB_001:def 28;
                  end;
                  suppose
                    m = n;
                    hence contradiction by A44,A47;
                  end;
                  suppose
                    n < m;
                    hence contradiction by A32,A46,A51,A52,GLIB_001:def 28;
                  end;
                end;
                hence contradiction;
              end;
              suppose
A53:            v2 = v;
                now
                  per cases by XXREAL_0:1;
                  suppose
                    m+2 < n;
                    hence contradiction by A31,A32,A33,A48,A53,GLIB_001:def 28;
                  end;
                  suppose
                    m+2 = n;
                    hence contradiction by A43,A47;
                  end;
                  suppose
                    n < m+2;
                    hence contradiction by A32,A35,A45,A48,A53,GLIB_001:def 28;
                  end;
                end;
                hence contradiction;
              end;
            end;
            hence contradiction;
          end;
          hence not e in P.edges();
        end;
A54:    now
A55:      n+2 <= len P by A34,GLIB_001:1;
A56:      n + 0 < n+2 by XREAL_1:8;
          assume that
A57:      e2 DJoins v,P.(n+2),G and
A58:      e2 DJoins P.(n+2),v,G;
          P.n = (the_Source_of G).e2 by A32,A57
            .= P.(n+2) by A58;
          hence contradiction by A35,A56,A55,GLIB_001:def 28;
        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:    e1 <> e2 by A39,A59,GLIB_001:138;
A61:    now
          n2 < n - 0 by XREAL_1:15;
          hence P.n2 <> v by A31,A32,A33,GLIB_001:def 28;
        end;
A62:    not e1 DJoins P.n2,v,G or not e1 DJoins v,P.n2,G by A61;
A63:    n2 < len P - 0 by A31,XREAL_1:15;
        then
A64:    e1 Joins P.n2,P.(n2+2),G by GLIB_001:def 3;
A65:    e2 Joins v,P.(n+2),G by A32,A34,GLIB_001:def 3;
        now
          per cases by A32,A64,A65;
          suppose
A66:        e1 DJoins P.n2,v,G & e2 DJoins v,P.(n+2),G;
            set XIN = (EL|v.edgesIn()) +* (e1.-->(EL.e1 + T));
A67:        e1 in v.edgesIn() by A66,GLIB_000:57;
        dom (e1.-->(EL.e1+T)) = {e1};
            then
A69:        dom XIN = dom (EL|v.edgesIn()) \/ {e1} by FUNCT_4:def 1
              .= v.edgesIn() \/ {e1} by PARTFUN1:def 2
              .= v.edgesIn() by A67,ZFMISC_1:40;
            then reconsider XIN as Rbag of v.edgesIn() by PARTFUN1:def 2
,RELAT_1:def 18;
A70:        now
              let e be object;
              assume e in dom (EL2|v.edgesIn());
              then
A71:          e in v.edgesIn();
              then
A72:          (the_Target_of G).e = v by GLIB_000:56;
              now
                per cases;
                suppose
A73:              e = e1;
                  then e in dom (e1.-->(EL.e1+T)) by TARSKI:def 1;
                  hence XIN.e = (e1.-->(EL.e1+T)).e1 by A73,FUNCT_4:13
                    .= EL.e1 + T by FUNCOP_1:72
                    .= EL2.e by A4,A63,A40,A66,A73,Def17;
                end;
                suppose
A74:              e <> e1;
A75:              now
                    assume e in P.edges();
                    then consider
                    v1,v2 being Vertex of G,m being odd Element of
                    NAT such that
A76:                m+2 <= len P and
A77:                v1 = P.m and
A78:                e = P.(m+1) and
A79:                v2=P.(m+2) and
A80:                e Joins v1,v2,G by GLIB_001:103;
A81:                m+2-2 < len P - 0 by A76,XREAL_1:15;
                    now
                      per cases by A72,A80;
                      suppose
A82:                    v = v1;
                        now
                          per cases by XXREAL_0:1;
                          suppose
                            m < n;
                            hence contradiction by A31,A32,A33,A77,A82,
GLIB_001:def 28;
                          end;
                          suppose
A83:                        m = n;
A84:                        n+2-2 < n+2-0 by XREAL_1:15;
A85:                        n+2 <= len P by A34,GLIB_001:1;
                            P.(n+2) = P.n by A32,A66,A72,A78,A83;
                            hence contradiction by A35,A84,A85,GLIB_001:def 28;
                          end;
                          suppose
                            n < m;
                            hence contradiction by A32,A77,A81,A82,
GLIB_001:def 28;
                          end;
                        end;
                        hence contradiction;
                      end;
                      suppose
A86:                    v = v2;
                        now
                          per cases by XXREAL_0:1;
                          suppose
                            m+2 < n;
                            hence contradiction by A31,A32,A33,A79,A86,
GLIB_001:def 28;
                          end;
                          suppose
                            m+2 = n;
                            hence contradiction by A74,A78;
                          end;
                          suppose
                            n < m+2;
                            hence contradiction by A32,A35,A76,A79,A86,
GLIB_001:def 28;
                          end;
                        end;
                        hence contradiction;
                      end;
                    end;
                    hence contradiction;
                  end;
                  not e in dom (e1.-->(EL.e1+T)) by A74,TARSKI:def 1;
                  then XIN.e = (EL|v.edgesIn()).e by FUNCT_4:11
                    .= EL.e by A71,FUNCT_1:49;
                  hence EL2.e = XIN.e by A4,A71,A75,Def17;
                end;
              end;
              hence (EL2|v.edgesIn()).e = XIN.e by A71,FUNCT_1:49;
            end;
            dom (EL2|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
            then
A87:        Sum (EL2|v.edgesIn())=Sum XIN by A69,A70,FUNCT_1:2;
A88:        dom (EL2|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
            set XOUT= (EL|v.edgesOut())+* (e2.-->(EL.e2 + T));
A89:        e2 in v.edgesOut() by A66,GLIB_000:59;
        dom (e2.-->(EL.e2+T)) = {e2};
            then
A91:        dom XOUT = dom (EL|v.edgesOut())\/{e2} by FUNCT_4:def 1
              .= v.edgesOut() \/ {e2} by PARTFUN1:def 2
              .= v.edgesOut() by A89,ZFMISC_1:40;
            then reconsider XOUT as Rbag of v.edgesOut() by PARTFUN1:def 2
,RELAT_1:def 18;
A92:        now
              let e be object;
              assume e in dom (EL2|v.edgesOut());
              then
A93:          e in v.edgesOut();
              then
A94:          (the_Source_of G).e = v by GLIB_000:58;
              now
                per cases;
                suppose
A95:              e = e2;
                  then e in dom (e2.-->(EL.e2+T)) by TARSKI:def 1;
                  hence XOUT.e = (e2.-->(EL.e2+T)).e2 by A95,FUNCT_4:13
                    .= EL.e2 + T by FUNCOP_1:72
                    .= EL2.e by A4,A32,A34,A66,A95,Def17;
                end;
                suppose
A96:              e <> e2;
A97:             now
                    assume e in P.edges();
                    then consider
                    v1,v2 being Vertex of G,m being odd Element of
                    NAT such that
A98:               m+2 <= len P and
A99:               v1 = P.m and
A100:               e = P.(m+1) and
A101:               v2=P.(m+2) and
A102:               e Joins v1,v2,G by GLIB_001:103;
A103:               m+2-2 < len P - 0 by A98,XREAL_1:15;
                    now
                      per cases by A94,A102;
                      suppose
A104:                   v = v1;
                        now
                          per cases by XXREAL_0:1;
                          suppose
                            m < n;
                            hence contradiction by A31,A32,A33,A99,A104,
GLIB_001:def 28;
                          end;
                          suppose
                            m = n;
                            hence contradiction by A96,A100;
                          end;
                          suppose
                            n < m;
                            hence contradiction by A32,A99,A103,A104,
GLIB_001:def 28;
                          end;
                        end;
                        hence contradiction;
                      end;
                      suppose
A105:                   v = v2;
                        now
                          per cases by XXREAL_0:1;
                          suppose
                            m+2 < n;
                            hence contradiction by A31,A32,A33,A101,A105,
GLIB_001:def 28;
                          end;
                          suppose
A106:                       m+2 = n;
A107:                       n2 < n - 0 by XREAL_1:15;
                            P.n2 = P.n by A32,A66,A94,A100,A106;
                            hence contradiction by A31,A33,A107,GLIB_001:def 28
;
                          end;
                          suppose
                            n < m+2;
                            hence contradiction by A32,A35,A98,A101,A105,
GLIB_001:def 28;
                          end;
                        end;
                        hence contradiction;
                      end;
                    end;
                    hence contradiction;
                  end;
                  not e in dom (e2.-->(EL.e2+T)) by A96,TARSKI:def 1;
                  then XOUT.e = (EL|v.edgesOut()).e by FUNCT_4:11
                    .= EL.e by A93,FUNCT_1:49;
                  hence EL2.e = XOUT.e by A4,A93,A97,Def17;
                end;
              end;
              hence (EL2|v.edgesOut()).e = XOUT.e by A93,FUNCT_1:49;
            end;
            Sum XIN = Sum (EL|v.edgesIn()) + (T + EL.e1) - (EL|v
            .edgesIn()).e1 by GLIB_004:9
              .= Sum (EL|v.edgesOut()) + T + EL.e1 - EL.e1 by A30,A67,
FUNCT_1:49
              .= Sum (EL|v.edgesOut()) + T + EL.e2 - EL.e2
              .= Sum (EL|v.edgesOut()) + (T + EL.e2) - (EL|v.edgesOut()).e2
            by A89,FUNCT_1:49
              .= Sum XOUT by GLIB_004:9;
            hence Sum (EL2 | v.edgesIn()) = Sum (EL2 | v.edgesOut()) by A91,A87
,A88,A92,FUNCT_1:2;
          end;
          suppose
A108:       e1 DJoins P.n2,v,G & e2 DJoins P.(n+2),v,G;
A109:       dom (EL2|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
A110:       now
              let e be object;
              assume
A111:         e in dom (EL2|v.edgesOut());
              then
A112:         (EL|v.edgesOut()).e = EL.e by FUNCT_1:49;
A113:         e in v.edgesOut() by A111;
              then
A114:         (the_Source_of G).e = v by GLIB_000:58;
              then
A115:         e <> e2 by A36,A108;
              e <> e1 by A61,A108,A114;
              then
A116:         not e in P.edges() by A41,A113,A115;
              (EL2|v.edgesOut()).e = EL2.e by A111,FUNCT_1:49;
              hence (EL2|v.edgesOut()).e = (EL|v.edgesOut()).e by A4,A113,A112
,A116,Def17;
            end;
            dom (EL|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
            then
A117:       EL2|v.edgesOut() = EL|v.edgesOut() by A109,A110,FUNCT_1:2;
            set XIN1 = (EL|v.edgesIn())+*(e1.-->(EL.e1+T));
            set XIN2 = XIN1 +* (e2.-->(EL.e2-T));
A118:       dom (EL2|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
A119:       e2 in v.edgesIn() by A108,GLIB_000:57;
A120:       e1 in v.edgesIn() by A108,GLIB_000:57;
A121:       EL2.e1 = EL.e1 + T by A4,A63,A40,A108,Def17;
A123:       dom XIN1 = dom (EL|v.edgesIn()) \/ dom (e1.-->(EL.e1+T)) by
FUNCT_4:def 1
              .= dom (EL|v.edgesIn()) \/ {e1}
              .= v.edgesIn() \/ {e1} by PARTFUN1:def 2
              .= v.edgesIn() by A120,ZFMISC_1:40;
            then reconsider XIN1 as Rbag of v.edgesIn() by PARTFUN1:def 2
,RELAT_1:def 18;
A124:       dom XIN2 = dom XIN1 \/ dom (e2.-->(EL.e2-T)) by FUNCT_4:def 1
              .= v.edgesIn() \/ {e2} by A123
              .= v.edgesIn() by A119,ZFMISC_1:40;
            then reconsider XIN2 as Rbag of v.edgesIn() by PARTFUN1:def 2
,RELAT_1:def 18;
A126:       EL2.e2 = EL.e2 - T by A4,A32,A34,A54,A108,Def17;
A127:       now
              let e be object;
              assume
A128:         e in dom (EL2|v.edgesIn());
              then
A129:         e in v.edgesIn();
A130:         (EL2|v.edgesIn()).e = EL2.e by A128,FUNCT_1:49;
              now
                per cases;
                suppose
A131:             e = e1;
                  then
A132:             e in dom (e1.-->(EL.e1+T)) by TARSKI:def 1;
                  not e in dom (e2.-->(EL.e2-T)) by A60,A131,TARSKI:def 1;
                  then XIN2.e = XIN1.e by FUNCT_4:11
                    .= (e1.-->(EL.e1+T)).e by A132,FUNCT_4:13
                    .= EL2.e by A121,A131,FUNCOP_1:72;
                  hence (EL2|v.edgesIn()).e = XIN2.e by A128,FUNCT_1:49;
                end;
                suppose
A133:             e = e2;
                  then e in dom (e2.-->(EL.e2-T)) by TARSKI:def 1;
                  then XIN2.e = (e2.-->(EL.e2-T)).e2 by A133,FUNCT_4:13
                    .= EL2.e by A126,A133,FUNCOP_1:72;
                  hence (EL2|v.edgesIn()).e = XIN2.e by A128,FUNCT_1:49;
                end;
                suppose
A134:             e <> e1 & e <> e2;
                  then
A135:             not e in dom (e1.-->(EL.e1+T)) by TARSKI:def 1;
A136:             not e in P.edges() by A41,A129,A134;
                  not e in dom (e2.-->(EL.e2-T)) by A134,TARSKI:def 1;
                  then XIN2.e = XIN1.e by FUNCT_4:11
                    .= (EL|v.edgesIn()).e by A135,FUNCT_4:11
                    .= EL.e by A129,FUNCT_1:49;
                  hence (EL2|v.edgesIn()).e = XIN2.e by A4,A129,A130,A136,Def17
;
                end;
              end;
              hence (EL2|v.edgesIn()).e = XIN2.e;
            end;
            not e2 in dom (e1.-->(EL.e1+T)) by A60,TARSKI:def 1;
            then XIN1.e2 = (EL|v.edgesIn()).e2 by FUNCT_4:11
              .= EL.e2 by A119,FUNCT_1:49;
            then Sum (EL2|v.edgesIn()) = Sum XIN1 + (EL.e2-T) - EL.e2 by A124
,A118,A127,FUNCT_1:2,GLIB_004:9
              .= Sum XIN1 - (EL.e2 - (EL.e2 - T))
              .= Sum (EL|v.edgesIn())+(EL.e1+T)-(EL|v.edgesIn()).e1-T by
GLIB_004:9
              .= Sum (EL|v.edgesIn())+T+EL.e1-EL.e1-T by A120,FUNCT_1:49
              .= Sum (EL|v.edgesIn());
            hence
            Sum (EL2|v.edgesIn()) = Sum (EL2|v.edgesOut()) by A2,A28,A29,A117;
          end;
          suppose
A137:       e1 DJoins v,P.n2,G & e2 DJoins v,P.(n+2),G;
A138:       dom (EL2|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
A139:       now
              let e be object;
              assume
A140:         e in dom (EL2|v.edgesIn());
              then
A141:         (EL|v.edgesIn()).e = EL.e by FUNCT_1:49;
A142:         e in v.edgesIn() by A140;
              then
A143:         (the_Target_of G).e = v by GLIB_000:56;
              then
A144:         e <> e2 by A36,A137;
              e <> e1 by A61,A137,A143;
              then
A145:         not e in P.edges() by A41,A142,A144;
              (EL2|v.edgesIn()).e = EL2.e by A140,FUNCT_1:49;
              hence (EL2|v.edgesIn()).e = (EL|v.edgesIn()).e by A4,A142,A141
,A145,Def17;
            end;
            set XOUT1 = (EL|v.edgesOut())+*(e1.-->(EL.e1-T));
            set XOUT2 = XOUT1 +* (e2.-->(EL.e2+T));
A146:       dom (EL2|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
A147:       e2 in v.edgesOut() by A137,GLIB_000:59;
A148:       dom (EL|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
A149:       e1 in v.edgesOut() by A137,GLIB_000:59;
A150:       EL2.e2 = EL.e2 + T by A4,A32,A34,A137,Def17;
A152:       dom XOUT1 = dom (EL|v.edgesOut()) \/ dom (e1.-->(EL.e1-T))
            by FUNCT_4:def 1
              .= dom (EL|v.edgesOut()) \/ {e1}
              .= v.edgesOut() \/ {e1} by PARTFUN1:def 2
              .= v.edgesOut() by A149,ZFMISC_1:40;
            then reconsider XOUT1 as Rbag of v.edgesOut() by PARTFUN1:def 2
,RELAT_1:def 18;
A153:       dom XOUT2 = dom XOUT1\/dom (e2.-->(EL.e2+T)) by FUNCT_4:def 1
              .= v.edgesOut() \/ {e2} by A152
              .= v.edgesOut() by A147,ZFMISC_1:40;
            then reconsider XOUT2 as Rbag of v.edgesOut() by PARTFUN1:def 2
,RELAT_1:def 18;
A155:       EL2.e1 = EL.e1 - T by A4,A63,A40,A62,A137,Def17;
A156:       now
              let e be object;
              assume
A157:         e in dom (EL2|v.edgesOut());
              then
A158:         e in v.edgesOut();
A159:         (EL2|v.edgesOut()).e = EL2.e by A157,FUNCT_1:49;
              now
                per cases;
                suppose
A160:             e = e1;
                  then
A161:             e in dom (e1.-->(EL.e1-T)) by TARSKI:def 1;
                  not e in dom (e2.-->(EL.e2+T)) by A60,A160,TARSKI:def 1;
                  then XOUT2.e = XOUT1.e by FUNCT_4:11
                    .= (e1.-->(EL.e1-T)).e by A161,FUNCT_4:13
                    .= EL2.e by A155,A160,FUNCOP_1:72;
                  hence (EL2|v.edgesOut()).e=XOUT2.e by A157,FUNCT_1:49;
                end;
                suppose
A162:             e = e2;
                  then e in dom (e2.-->(EL.e2+T)) by TARSKI:def 1;
                  then XOUT2.e = (e2.-->(EL.e2+T)).e by FUNCT_4:13
                    .= EL2.e by A150,A162,FUNCOP_1:72;
                  hence (EL2|v.edgesOut()).e=XOUT2.e by A157,FUNCT_1:49;
                end;
                suppose
A163:             e <> e1 & e <> e2;
                  then
A164:             not e in dom (e1.-->(EL.e1-T)) by TARSKI:def 1;
A165:             not e in P.edges() by A41,A158,A163;
                  not e in dom (e2.-->(EL.e2+T)) by A163,TARSKI:def 1;
                  then XOUT2.e = XOUT1.e by FUNCT_4:11
                    .= (EL|v.edgesOut()).e by A164,FUNCT_4:11
                    .= EL.e by A158,FUNCT_1:49;
                  hence (EL2|v.edgesOut()).e = XOUT2.e by A4,A158,A159,A165
,Def17;
                end;
              end;
              hence (EL2|v.edgesOut()).e = XOUT2.e;
            end;
            not e2 in dom (e1.-->(EL.e1-T)) by A60,TARSKI:def 1;
            then XOUT1.e2 = (EL|v.edgesOut()).e2 by FUNCT_4:11
              .= EL.e2 by A147,FUNCT_1:49;
            then Sum (EL2|v.edgesOut()) = Sum XOUT1 + (EL.e2+T) - EL.e2 by A153
,A146,A156,FUNCT_1:2,GLIB_004:9
              .= Sum XOUT1 - EL.e2 + EL.e2 + T
              .= Sum (EL|v.edgesOut()) + (EL.e1 - T) - (EL|v.edgesOut()).e1
            + T by GLIB_004:9
              .= Sum (EL|v.edgesOut()) + EL.e1 - T - EL.e1 + T by A149,
FUNCT_1:49
              .= Sum (EL|v.edgesOut());
            hence Sum (EL2|v.edgesIn()) = Sum (EL2|v.edgesOut()) by A30,A138
,A148,A139,FUNCT_1:2;
          end;
          suppose
A166:       e1 DJoins v,P.n2,G & e2 DJoins P.(n+2),v,G;
            set XIN = (EL|v.edgesIn())+*(e2.-->(EL.e2-T));
A167:       e2 in v.edgesIn() by A166,GLIB_000:57;
       dom (e2.-->(EL.e2-T)) = {e2};
            then
A169:       dom XIN = dom (EL|v.edgesIn()) \/ {e2} by FUNCT_4:def 1
              .= v.edgesIn() \/ {e2} by PARTFUN1:def 2
              .= v.edgesIn() by A167,ZFMISC_1:40;
            then reconsider XIN as Rbag of v.edgesIn() by PARTFUN1:def 2
,RELAT_1:def 18;
A170:       EL2.e2 = EL.e2 - T by A4,A32,A34,A54,A166,Def17;
A171:       now
              let e be object;
              assume e in dom (EL2|v.edgesIn());
              then
A172:         e in v.edgesIn();
              then
A173:         (the_Target_of G).e = v by GLIB_000:56;
              now
                per cases;
                suppose
A174:             e = e2;
                  then e in dom (e2.-->(EL.e2-T)) by TARSKI:def 1;
                  hence XIN.e = (e2.-->(EL.e2-T)).e2 by A174,FUNCT_4:13
                    .= EL2.e by A170,A174,FUNCOP_1:72;
                end;
                suppose
A175:             e <> e2;
                  then not e in dom (e2.-->(EL.e2-T)) by TARSKI:def 1;
                  then
A176:             XIN.e = (EL|v.edgesIn()).e by FUNCT_4:11
                    .= EL.e by A172,FUNCT_1:49;
                  e <> e1 by A61,A166,A173;
                  then not e in P.edges() by A41,A172,A175;
                  hence EL2.e = XIN.e by A4,A172,A176,Def17;
                end;
              end;
              hence XIN.e = (EL2|v.edgesIn()).e by A172,FUNCT_1:49;
            end;
            dom (EL2|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
            then
A177:       Sum (EL2|v.edgesIn()) = Sum (EL|v.edgesIn()) + (EL.e2-T) - (
            EL|v.edgesIn()).e2 by A169,A171,FUNCT_1:2,GLIB_004:9
              .= Sum (EL|v.edgesIn()) + EL.e2 - T - EL.e2 by A167,FUNCT_1:49
              .= Sum (EL|v.edgesIn()) - T;
            set XOUT= (EL|v.edgesOut())+*(e1.-->(EL.e1-T));
A178:       e1 in v.edgesOut() by A166,GLIB_000:59;
       dom (e1.-->(EL.e1-T)) = {e1};
            then
A180:       dom XOUT = dom (EL|v.edgesOut())\/{e1} by FUNCT_4:def 1
              .= v.edgesOut() \/ {e1} by PARTFUN1:def 2
              .= v.edgesOut() by A178,ZFMISC_1:40;
            then reconsider XOUT as Rbag of v.edgesOut() by PARTFUN1:def 2
,RELAT_1:def 18;
A181:       EL2.e1 = EL.e1 - T by A4,A63,A40,A62,A166,Def17;
A182:       now
              let e be object;
              assume e in dom (EL2|v.edgesOut());
              then
A183:         e in v.edgesOut();
              then
A184:         (the_Source_of G).e = v by GLIB_000:58;
              now
                per cases;
                suppose
A185:             e = e1;
                  then e in dom (e1.-->(EL.e1-T)) by TARSKI:def 1;
                  hence XOUT.e = (e1.-->(EL.e1-T)).e1 by A185,FUNCT_4:13
                    .= EL2.e by A181,A185,FUNCOP_1:72;
                end;
                suppose
A186:             e <> e1;
                  then not e in dom (e1.-->(EL.e1-T)) by TARSKI:def 1;
                  then
A187:             XOUT.e = (EL|v.edgesOut()).e by FUNCT_4:11
                    .= EL.e by A183,FUNCT_1:49;
                  e <> e2 by A36,A166,A184;
                  then not e in P.edges() by A41,A183,A186;
                  hence EL2.e = XOUT.e by A4,A183,A187,Def17;
                end;
              end;
              hence XOUT.e = (EL2|v.edgesOut()).e by A183,FUNCT_1:49;
            end;
            dom (EL2|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
            then Sum (EL2|v.edgesOut()) = Sum (EL|v.edgesOut()) + (EL.e1-T)-(
            EL|v.edgesOut()).e1 by A180,A182,FUNCT_1:2,GLIB_004:9
              .= Sum (EL|v.edgesOut()) + EL.e1 - T - EL.e1 by A178,FUNCT_1:49
              .= Sum (EL|v.edgesIn()) - T by A30;
            hence Sum (EL2 | v.edgesIn()) = Sum (EL2 | v.edgesOut()) by A177;
          end;
        end;
        hence Sum (EL2 | v.edgesIn()) = Sum (EL2 | v.edgesOut());
      end;
      suppose
A188:   not v in P.vertices();
A189:   dom (EL|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
A190:   now
          let e be object;
          assume
A191:     e in dom (EL|v.edgesOut());
          then
A192:     (EL2|v.edgesOut()).e = EL2.e by FUNCT_1:49;
A193:     e in v.edgesOut() by A191;
A194:     now
            consider x being set such that
A195:       e DJoins v,x,G by A193,GLIB_000:59;
            assume
A196:       e in P.edges();
            e Joins v,x,G by A195;
            hence contradiction by A188,A196,GLIB_001:105;
          end;
          (EL|v.edgesOut()).e = EL.e by A191,FUNCT_1:49;
          hence (EL|v.edgesOut()).e = (EL2|v.edgesOut()).e by A4,A193,A192,A194
,Def17;
        end;
A197:   dom (EL|v.edgesIn()) = v.edgesIn() by PARTFUN1:def 2;
A198:   now
          let e be object;
          assume
A199:     e in dom (EL|v.edgesIn());
          then
A200:     (EL2|v.edgesIn()).e = EL2.e by FUNCT_1:49;
A201:     now
            consider x being set such that
A202:       e DJoins x,v,G by A199,GLIB_000:57;
            assume
A203:       e in P.edges();
            e Joins x,v,G by A202;
            hence contradiction by A188,A203,GLIB_001:105;
          end;
          (EL|v.edgesIn()).e = EL.e by A199,FUNCT_1:49;
          hence (EL|v.edgesIn()).e = (EL2|v.edgesIn()).e by A4,A197,A199,A200
,A201,Def17;
        end;
        dom (EL2|v.edgesOut()) = v.edgesOut() by PARTFUN1:def 2;
        then
A204:   EL | v.edgesOut() = EL2 | v.edgesOut() by A189,A190,FUNCT_1:2;
        dom (EL|v.edgesIn()) = dom (EL2|v.edgesIn()) by A197,PARTFUN1:def 2;
        hence Sum (EL2|v.edgesIn()) = Sum (EL|v.edgesIn()) by A198,FUNCT_1:2
          .= Sum (EL2|v.edgesOut()) by A2,A28,A29,A204;
      end;
    end;
    hence Sum (EL2 | v.edgesIn()) = Sum (EL2 | v.edgesOut());
  end;
  hence thesis;
end;
