theorem Th17:
  p in rng f & len(f:-p) <= i & i <= len f implies
    (Rotate(f,p))/.i = f/.(i + p..f -' len f)
proof
  assume that
A1: p in rng f and
A2: len(f:-p) <= i and
A3: i <= len f;
A4: p..f <= len f by A1,FINSEQ_4:21; then
A5: len f - p..f = len f -' p..f by XREAL_1:233;
  per cases by A2,XXREAL_0:1;
  suppose
A6: i = len(f:-p); then
A7: i = len f - p..f + 1 by A1,FINSEQ_5:50;
    then i >= 1 by A5,NAT_1:11;
    hence (Rotate(f,p))/.i = f/.(i -' 1 + p..f) by A1,A6,Th9
      .= f/.(len f -' p..f + p..f) by A5,A7,NAT_D:34
      .= f/.len f by A4,XREAL_1:235
      .= f/.1 by Def1A
      .= f/.(len f + 1 -' len f) by NAT_D:34
      .= f/.(i + p..f -' len f) by A7;
  end;
  suppose
    i > len(f:-p);
    hence thesis by A1,A3,Th12;
  end;
end;
