reserve a,b,k,m,n,s for Nat;
reserve c,c1,c2,c3 for Complex;
reserve i,j,z for Integer;
reserve p for Prime;
reserve x for object;
reserve f,g for complex-valued FinSequence;

theorem Th62:
  (f|n)^2 = f^2|n
  proof
A1: len(f^2) = len f by Th54;
    per cases;
    suppose
A2:   n <= len f;
      then
A3:   len(f|n) = n by FINSEQ_1:59;
      dom((f|n)^2) = dom(f|n) by VALUED_1:11
      .= Seg len(f^2|n) by A1,A2,A3,FINSEQ_1:59,FINSEQ_1:def 3
      .= dom(f^2|n) by FINSEQ_1:def 3;
      hence len((f|n)^2) = len((f^2)|n) by FINSEQ_3:29;
      let k be Nat such that
      1 <= k and
A4:   k <= len((f|n)^2);
A5:   len((f|n)^2) = len(f|n) by Th54;
      then (f|n).k = f.k by A3,A4,FINSEQ_3:112;
      hence (f|n)^2.k = (f.k)^2 by VALUED_1:11
      .= f^2.k by VALUED_1:11
      .= (f^2|n).k by A3,A4,A5,FINSEQ_3:112;
    end;
    suppose len f < n;
      then f|n = f & f^2|n = f^2 by A1,FINSEQ_1:58;
      hence thesis;
    end;
  end;
