reserve n,m,k for Nat,
  x,y for set,
  r for Real;
reserve C,D for non empty finite set,
  a for FinSequence of bool D;

theorem
  for F be PartFunc of D,REAL, A be RearrangmentGen of C st F is total &
card C = card D holds max+(Rlor(F,A) - r), max+(F - r) are_fiberwise_equipotent
& FinS(max+(Rlor(F,A) - r), C) = FinS(max+(F - r), D) & Sum (max+(Rlor(F,A) - r
  ), C) = Sum (max+(F - r), D)
proof
  let F be PartFunc of D,REAL, B be RearrangmentGen of C;
  assume that
A1: F is total and
A2: card C = card D;
  set mp = max+(Rlor(F,B)-r), mf = max+(F-r);
A3: dom F = D by A1,PARTFUN1:def 2;
  then F|D = F by RELAT_1:68;
  then
A4: FinS(F,D), F are_fiberwise_equipotent by A3,RFUNCT_3:def 13;
  Rlor(F,B), FinS(F,D) are_fiberwise_equipotent by A1,A2,Th23;
  then Rlor(F,B), F are_fiberwise_equipotent by A4,CLASSES1:76;
  then Rlor(F,B)-r, F-r are_fiberwise_equipotent by RFUNCT_3:51;
  hence
A5: mp, mf are_fiberwise_equipotent by RFUNCT_3:41;
A6: dom mp = dom (Rlor(F,B)-r) by RFUNCT_3:def 10;
  then mp|C = mp by RELAT_1:68;
  then FinS(mp, C), mp are_fiberwise_equipotent by A6,RFUNCT_3:def 13;
  then
A7: FinS(mp, C), mf are_fiberwise_equipotent by A5,CLASSES1:76;
A8: dom mf=dom(F-r) by RFUNCT_3:def 10;
  then mf|D = mf by RELAT_1:68;
  hence FinS(mp,C) = FinS(mf,D) by A8,A7,RFUNCT_3:def 13;
  hence Sum(mp,C) = Sum FinS(mf,D) by RFUNCT_3:def 14
    .= Sum (mf,D) by RFUNCT_3:def 14;
end;
