reserve x,y,X for set,
  i,j,k,m,n for Nat,
  p for FinSequence of X,
  ii for Integer;
reserve G for Graph,
  pe,qe for FinSequence of the carrier' of G,
  p,q for oriented Chain of G,
  W for Function,
  U,V,e,ee for set,
  v1,v2,v3,v4 for Vertex of G;
reserve G for finite Graph,
  P,Q for oriented Chain of G,
  v1,v2,v3 for Vertex of G;
reserve G for finite oriented Graph,
  P,Q for oriented Chain of G,
  W for Function of (the carrier' of G), Real>=0,
  v1,v2,v3,v4 for Vertex of G;
reserve f,g,h for Element of REAL*,
  r for Real;
reserve G for oriented Graph,
  v1,v2 for Vertex of G,
  W for Function of (the carrier' of G), Real>=0;

theorem Th39:
  g=(repeat(Relax(n)*findmin(n))).i.f & h=(repeat(Relax(n)*findmin
(n))).(i+1).f & k=Argmin(OuterVx(g,n),g,n) & OuterVx(g,n) <> {} implies UsedVx(
  h,n)=UsedVx(g,n) \/ {k} & not k in UsedVx(g,n)
proof
  set R=Relax(n), M=findmin(n), ff=(repeat (R*M)).i.f, Fi1=(repeat (R*M)).(i+1
  ).f, mi=n*n+3*n+1;
  assume that
A1: g=ff and
A2: h=Fi1 and
A3: k=Argmin(OuterVx(g,n),g,n) and
A4: OuterVx(g,n) <> {};
A5: M.ff = (ff,mi):=(k,-jj) by A1,A3,Def11;
A6: dom h = dom ff by A2,Th37;
A7: dom g=dom (M.ff) by A1,Th33;
A8: now
    let x be object;
    assume
A9: x in (UsedVx(g,n) \/ {k});
    per cases by A9,XBOOLE_0:def 3;
    suppose
A10:  x in UsedVx(g,n);
A11:  n < mi by Lm7;
      consider m such that
A12:  x=m and
A13:  m in dom g and
A14:  1 <= m and
A15:  m <= n and
A16:  g.m = -1 by A10;
      h.m=(R.(M.ff)).m by A2,Th22
        .=(M.ff).m by A7,A13,A15,Th36
        .=-1 by A1,A13,A15,A16,A11,Th32;
      hence x in UsedVx(h,n) by A1,A6,A12,A13,A14,A15;
    end;
    suppose
      x in {k};
      then
A17:  x = k by TARSKI:def 1;
A18:  k in dom g by A3,A4,Th29;
A19:  1 <= k by A3,A4,Th29;
A20:  k <= n by A3,A4,Th29;
      h.k=(R.(M.ff)).k by A2,Th22
        .=(M.ff).k by A7,A18,A20,Th36
        .=-jj by A1,A5,A18,Th19;
      hence x in UsedVx(h,n) by A1,A6,A17,A18,A19,A20;
    end;
  end;
A21: dom h = dom (M.ff) by A6,Th33;
  now
    let x be object;
    assume x in UsedVx(h,n);
    then consider m such that
A22: x=m and
A23: m in dom h and
A24: 1 <= m and
A25: m <= n and
A26: h.m = -1;
    per cases;
    suppose
      m=k;
      then x in {k} by A22,TARSKI:def 1;
      hence x in (UsedVx(g,n) \/ {k}) by XBOOLE_0:def 3;
    end;
    suppose
A27:  m<>k;
A28:  n < mi by Lm7;
      -1=(R.(M.ff)).m by A2,A26,Th22
        .=(M.ff).m by A21,A23,A25,Th36
        .=ff.m by A5,A25,A27,A28,Th18;
      then
      m in {j: j in dom ff & 1 <= j & j <= n & ff.j=-1} by A6,A23,A24,A25;
      hence x in (UsedVx(g,n) \/ {k}) by A1,A22,XBOOLE_0:def 3;
    end;
  end;
  hence UsedVx(h,n)=UsedVx(g,n) \/ {k} by A8,TARSKI:2;
  assume k in UsedVx(g,n);
  then ex j st j=k & j in dom g & 1 <= j & j <= n & g.j=-1;
  hence contradiction by A3,A4,Th29;
end;
