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 Th47:
  1<=n & 1 in dom f & f.(n+1) <> -1 & (for i st 1<=i & i<=n holds
f.i=1) & (for i st 2<=i & i<=n holds f.(n+i)=-1) implies 1 = Argmin(OuterVx(f,n
  ),f,n) & UsedVx(f,n)={} & {1} = UsedVx((repeat(Relax(n)*findmin(n))).1.f,n)
proof
  set R=Relax(n), M=findmin(n), f0=(repeat (R*M)).0 .f, RT=repeat (R*M);
  assume that
A1: 1<=n and
A2: 1 in dom f & f.(n+1) <> -1 and
A3: for i st 1<=i & i<=n holds f.i=1 and
A4: for i st 2<=i & i<=n holds f.(n+i)=-1;
  set k=Argmin(OuterVx(f,n),f,n);
  f.1=1 by A1,A3;
  then
A5: 1 in {j: j in dom f & 1 <= j & j <= n & f.j <> -1 & f.(n+j) <> -1 } by A1
,A2;
  thus
A6: k=1
  proof
    assume
A7: k<>1;
    1<=k by A5,Th29;
    then 1 < k by A7,XXREAL_0:1;
    then
A8: 1+1 <= k by INT_1:7;
    k<=n & f.(n+k) <> -1 by A5,Th29;
    hence contradiction by A4,A8;
  end;
  thus
A9: UsedVx(f,n)={}
  proof
    assume UsedVx(f,n)<>{};
    then consider x being object such that
A10: x in UsedVx(f,n) by XBOOLE_0:def 1;
    ex j st x=j & j in dom f & 1 <= j & j <= n & f.j = -1 by A10;
    hence contradiction by A3;
  end;
  OuterVx(f,n) <> {} by A5;
  then
A11: OuterVx(f0,n) <> {} by Th21;
A12: Argmin(OuterVx(f0,n),f0,n) = Argmin(OuterVx(f,n),f0,n) by Th21
    .=1 by A6,Th21;
  thus UsedVx(RT.1.f,n) = UsedVx(RT.(0+1).f,n)
    .=UsedVx(f0,n) \/ {1} by A11,A12,Th39
    .= UsedVx(f,n) \/ {1} by Th21
    .={1} by A9;
end;
