reserve x,X for set,
        r,r1,r2,s for Real,
        i,j,k,m,n for Nat;
reserve p,q for Point of TOP-REAL n;

theorem Th16:
  1 <= i & i < j & j <= n implies
    @p"*"Col(Rotation(i,j,n,r),j) = p.i*(sin r)+p.j*(cos r)
proof
  assume that
  A1: 1<=i and
  A2: i<j and
  A3: j<=n;
  set O=Rotation(i,j,n,r),C=Col(O,j);
  set S=Seg n;
  1<=j by A1,A2,XXREAL_0:2;
  then A4: j in S by A3;
  A5: len O=n by MATRIX_0:25;
  then A6: dom O=S by FINSEQ_1:def 3;
  then A7: C.j=O*(j,j) by A4,MATRIX_0:def 8;
  A8: i<=n by A2,A3,XXREAL_0:2;
  then A9: i in S by A1;
  then A10: C.i=O*(i,j) by A6,MATRIX_0:def 8;
  len p=n & len C=n by A5,CARD_1:def 7;
  then len mlt(@p,C)=n by MATRIX_3:6;
  then A11: dom mlt(@p,C)=S by FINSEQ_1:def 3;
  then A12: i in dom mlt(@p,C) by A1,A8;
  A13: Indices O=[:S,S:] by MATRIX_0:24;
  for k st k in dom mlt(@p,C) & k<>i & k<>j holds mlt(@p,C).k=0.F_Real
  proof
    let k;
    assume that
    A14: k in dom mlt(@p,C) and
    A15: k<>i and
    A16: k<>j;
    not k in {i,j} by A15,A16,TARSKI:def 2;
    then A17: {k,j}<>{i,j} by TARSKI:def 2;
    reconsider pk=@p.k as Element of F_Real by XREAL_0:def 1;
    A18: [k,j] in Indices O by A4,A11,A13,A14,ZFMISC_1:87;
    C.k=O*(k,j) by A6,A11,A14,MATRIX_0:def 8;
    hence mlt(@p,C).k=pk*(O*(k,j)) by A14,FVSUM_1:60
    .=pk*0.F_Real by A1,A2,A3,A16,A17,A18,Def3
    .=0.F_Real;
  end;
  then A19: Sum mlt(@p,C)=mlt(@p,C)/.i+mlt(@p,C)/.j
    by A2,A4,A9,A11,MATRIX15:7;
  reconsider pii=@p.i,pj=@p.j as Element of F_Real by XREAL_0:def 1;
  A20: mlt(@p,C)/.i=mlt(@p,C).i by A9,A11,PARTFUN1:def 6
  .=pii*(O*(i,j)) by A10,A12,FVSUM_1:60
  .=(p.i)*(sin r) by A1,A2,A3,Def3;
  mlt(@p,C)/.j=mlt(@p,C).j by A4,A11,PARTFUN1:def 6
  .=pj*(O*(j,j)) by A4,A7,A11,FVSUM_1:60
  .=(p.j)*(cos r) by A1,A2,A3,Def3;
  hence thesis by A19,A20;
end;
