
theorem Th5:
  for f being complex-valued FinSequence, i being Nat st
  i+1 <= len f holds f|i ^ <*f.(i+1)*> = f|(i+1)
proof
  let f be complex-valued FinSequence, i be Nat;
  assume
A1: i + 1 <= len f;
  set f1 = f|i ^ <*f.(i+1)*>, f2 = f|(i+1);
A2: i <= i + 1 by NAT_1:11;
  reconsider f1 as complex-valued FinSequence;
A3: len f1 = len(f|i) + len(<*f.(i+1)*>) by FINSEQ_1:22
    .= len(f|i) + 1 by FINSEQ_1:39
    .= i + 1 by A1,A2,FINSEQ_1:59,XXREAL_0:2
    .= len f2 by A1,FINSEQ_1:59;
  then
A4: dom f1 = Seg(len f2) by FINSEQ_1:def 3
    .= dom f2 by FINSEQ_1:def 3;
A5: i <= len f by A1,A2,XXREAL_0:2;
  now
    let x9 be object;
    assume
A6: x9 in dom f1;
    then reconsider x = x9 as Element of NAT;
A7: dom f1 = Seg(len f1) by FINSEQ_1:def 3;
    then
A8: 1 <= x by A6,FINSEQ_1:1;
    x <= len f1 by A6,A7,FINSEQ_1:1;
    then
A9: x <= i + 1 by A1,A3,FINSEQ_1:59;
    per cases by A9,XXREAL_0:1;
    suppose
A10:  x = i + 1;
      then x in Seg(i+1) by A8;
      then
A11:  x in dom f2 by A1,FINSEQ_1:17;
      dom <*f.(i+1)*> = {1} by FINSEQ_1:2,38;
      then
A12:  1 in dom <*f.(i+1)*> by TARSKI:def 1;
      len(f|i) = i by A1,A2,FINSEQ_1:59,XXREAL_0:2;
      hence f1.x9 = <*f.(i+1)*>.1 by A10,A12,FINSEQ_1:def 7
        .= f.(i+1)
        .= f2.x9 by A10,A11,FUNCT_1:47;
    end;
    suppose
      x < i + 1;
      then
A13:  x <= i by NAT_1:13;
      1 <= x by A6,A7,FINSEQ_1:1;
      then x in Seg i by A13;
      then
A14:  x in dom(f|i) by A5,FINSEQ_1:17;
      hence f1.x9 = (f|i).x by FINSEQ_1:def 7
        .= f.x by A14,FUNCT_1:47
        .= f2.x9 by A4,A6,FUNCT_1:47;
    end;
  end;
  hence thesis by A4;
end;
