reserve x,y for set,
  n,m for Nat,
  r,s for Real;

theorem Th18:
  for R be real-valued FinSequence st len R = 0 or len R = 1 holds
  R is non-increasing
proof
  let R be real-valued FinSequence;
  assume
A1: len R = 0 or len R = 1;
  now
    per cases by A1;
    case
      len R = 0;
      then R = <*>REAL;
      then for n st n in dom R & n+1 in dom R holds R.n>=R.(n+1);
      hence thesis;
    end;
    case
      len R = 1;
      then
A2:   dom R = {1} by FINSEQ_1:2,def 3;
      now
        let n;
        assume that
A3:     n in dom R and
A4:     n+1 in dom R;
        n = 1 by A2,A3,TARSKI:def 1;
        hence R.n>=R.(n+1) by A2,A4,TARSKI:def 1;
      end;
      hence thesis;
    end;
  end;
  hence thesis;
end;
