reserve i,j,k,m,n for Nat,
  D for non empty set,
  p for Element of D,
  f for FinSequence of D;
reserve D for non empty set,
  p for Element of D,
  f for FinSequence of D;
reserve f for circular FinSequence of D;
reserve f,g for FinSequence of TOP-REAL 2;
reserve p for Point of TOP-REAL 2,
  f for FinSequence of TOP-REAL 2;
reserve f for circular FinSequence of TOP-REAL 2;

theorem Th33:
  L~Rotate(f,p) = L~f
proof
  per cases;
  suppose
    not p in rng f;
    hence thesis by FINSEQ_6:def 2;
  end;
  suppose
A1: p in rng f;
    set B = { LSeg(f,i) : 1 <= i & i+1 <= len f };
    set A = { LSeg(Rotate(f,p),i) : 1 <= i & i+1 <= len f };
A2: A = B
    proof
A3:   p..f <= len f by A1,FINSEQ_4:21;
      thus A c= B
      proof
A4:     1 <= p..f by A1,FINSEQ_4:21;
        let x be object;
        assume x in A;
        then consider i such that
A5:     x = LSeg(Rotate(f,p),i) and
A6:     1 <= i and
A7:     i+1 <= len f;
A8:     i < len f by A7,NAT_1:13;
        per cases;
        suppose
A9:       i < len(f:-p);
          then i < len f - p..f + 1 by A1,FINSEQ_5:50;
          then i < len f -' p..f + 1 by A3,XREAL_1:233;
          then i -' 1 < len f -' p..f by A6,NAT_D:54;
          then i -' 1 + p..f < len f by NAT_D:53;
          then
A10:      i -' 1 + p..f + 1 <= len f by NAT_1:13;
          1 + 1 <= i + p..f by A6,A4,XREAL_1:7;
          then 1 <= i + p..f -' 1 by NAT_D:55;
          then
A11:      1 <= i -' 1 + p..f by A6,NAT_D:38;
          LSeg(Rotate(f,p),i) = LSeg(f,i -' 1 + p..f) by A1,A6,A9,Th24;
          hence thesis by A5,A11,A10;
        end;
        suppose
A12:      i >= len(f:-p);
          then len f - p..f + 1 <= i by A1,FINSEQ_5:50;
          then len f -' p..f + 1 <= i by A3,XREAL_1:233;
          then 1 + len f -' p..f <= i by A3,NAT_D:38;
          then
A13:      1 + len f <= i + p..f by NAT_D:52;
          then
A14:      1 <= i + p..f -' len f by NAT_D:55;
          i + 1 + p..f <= len f + len f by A3,A7,XREAL_1:7;
          then len f <= len f + 1 & i + p..f + 1 -' len f <= len f by NAT_1:11
,NAT_D:53;
          then
A15:      i + p..f -' len f + 1 <= len f by A13,NAT_D:38,XXREAL_0:2;
          LSeg(Rotate(f,p),i) = LSeg(f,i + p..f -' len f) by A1,A8,A12,Th31;
          hence thesis by A5,A14,A15;
        end;
      end;
      let x be object;
      assume x in B;
      then consider i such that
A16:  x = LSeg(f,i) and
A17:  1 <= i and
A18:  i+1 <= len f;
A19:  i < len f by A18,NAT_1:13;
      per cases;
      suppose
A20:    p..f <= i;
        i <= i+1 by NAT_1:11;
        then
A21:    p..f <= i+1 by A20,XXREAL_0:2;
        1 <= p..f by A1,FINSEQ_4:21;
        then i + 1 < len f + p..f by A19,XREAL_1:8;
        then i + 1 -' p..f < len f by A21,NAT_D:54;
        then i -' p..f+1 < len f by A20,NAT_D:38;
        then
A22:    i -' p..f+1 +1 <= len f by NAT_1:13;
        1 + p..f <= i+1 by A20,XREAL_1:6;
        then 1 <= i+1 -' p..f by NAT_D:55;
        then
A23:    1 <= i -' p..f+1 by A20,NAT_D:38;
        LSeg(f,i) = LSeg(Rotate(f,p),i -' p..f+1) by A1,A19,A20,Th25;
        hence thesis by A16,A23,A22;
      end;
      suppose
A24:    i < p..f;
        then i + 1 <= p..f by NAT_1:13;
        then i + 1 + len f <= len f + p..f by XREAL_1:6;
        then
A25:    i + len f + 1 -' p..f <= len f by NAT_D:53;
        p..f <= len f & len f <= i + len f by A1,FINSEQ_4:21,NAT_1:11;
        then
A26:    i + len f -' p..f + 1 <= len f by A25,NAT_D:38,XXREAL_0:2;
        1 + p..f <= i + len f by A3,A17,XREAL_1:7;
        then
A27:    1 <= i + len f -' p..f by NAT_D:55;
        LSeg(f,i) = LSeg(Rotate(f,p),i + len f -' p..f) by A1,A17,A24,Th32;
        hence thesis by A16,A27,A26;
      end;
    end;
    len Rotate(f,p) = len f by Th14;
    hence thesis by A2;
  end;
end;
