reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a,a1,a2 for Element of K,
  D for non empty set,
  d,d1,d2 for Element of D,
  M,M1,M2 for (Matrix of D),
  A,A1,A2,B1,B2 for (Matrix of K),
  f,g for FinSequence of NAT;

theorem Th7:
  i in Seg (Sum f) implies min(f,i)-'1 = min(f,i) - 1 & Sum(f| (min(
  f,i)-'1))<i
proof
  set F=min(f,i);
  assume
A1: i in Seg (Sum f);
  then F in dom f by Def1;
  then 1<=F by FINSEQ_3:25;
  hence
A2: F-'1=F-1 by XREAL_1:233;
  assume Sum(f| (F-'1))>=i;
  then F-'1>=F-0 by A1,Def1;
  hence thesis by A2,XREAL_1:10;
end;
