reserve D for non empty set,
  f for FinSequence of D,
  g for circular FinSequence of D,
  p,p1,p2,p3,q for Element of D;

theorem Th5:
  p1 in rng f & p2 in rng f & p3 in rng f & p1..f <= p2..f & p2..f
  < p3..f implies p2..Rotate(f,p1) < p3..Rotate(f,p1)
proof
  assume that
A1: p1 in rng f & p2 in rng f & p3 in rng f & p1..f <= p2..f and
A2: p2..f < p3..f;
A3: p2..f - p1..f < p3..f - p1..f by A2,XREAL_1:9;
  p2..Rotate(f,p1) = p2..f - p1..f + 1 & p3..Rotate(f,p1) = p3..f - p1..f
  + 1 by A1,A2,Th4,XXREAL_0:2;
  hence thesis by A3,XREAL_1:6;
end;
