reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;
reserve x,y,z for set, i,j for Nat;
reserve
  A0 for (X,S)-terms non-empty MSAlgebra over S,
  A1 for all_vars_including (X,S)-terms MSAlgebra over S,
  A2 for all_vars_including inheriting_operations (X,S)-terms MSAlgebra over S,
  A for all_vars_including inheriting_operations free_in_itself
  (X,S)-terms MSAlgebra over S;
reserve X0 for non-empty countable ManySortedSet of S;
reserve A0 for all_vars_including inheriting_operations free_in_itself
  (X0,S)-terms MSAlgebra over S;

theorem Th84:
  for p being FinSequence, i being Nat st i+1 <= len p
  holds p/^i = <*p.(i+1)*>^(p/^(i+1))
  proof
    let p be FinSequence;
    let i be Nat;
    assume A1: i+1 <= len p;
    then
A2: i < len p by NAT_1:13;
    then
A3: len(p/^i) = len p-i by RFINSEQ:def 1;
    len(<*p.(i+1)*>^(p/^(i+1))) = len <*p.(i+1)*>+len(p/^(i+1)) by FINSEQ_1:22
    .= 1+len(p/^(i+1)) by FINSEQ_1:40 .= 1+(len p-(i+1)) by A1,RFINSEQ:def 1
    .= len p-i;
    hence len(p/^i) = len(<*p.(i+1)*>^(p/^(i+1))) by A2,RFINSEQ:def 1;
    let j be Nat;
    assume
A4: 1 <= j & j <= len(p/^i);
    then
A5: j in dom(p/^i) by FINSEQ_3:25;
    per cases by A4,XXREAL_0:1;
    suppose
A6:   j = 1;
      hence (p/^i).j = p.(i+1) by A2,A5,RFINSEQ:def 1
      .= (<*p.(i+1)*>^(p/^(i+1))).j by A6,FINSEQ_1:41;
    end;
    suppose
      j > 1;
      then j >= 1+1 by NAT_1:13;
      then consider k being Nat such that
A7:   j = 1+1+k by NAT_1:10;
A8:   len <*p.(i+1)*> = 1 by FINSEQ_1:40;
A9:   len(p/^(i+1)) = len p-(i+1) & len p-(i+1)+1 = len p-i & j = 1+k+1
      by A1,A7,RFINSEQ:def 1;
      then
      1 <= 1+k & 1+k <= len(p/^(i+1)) by A3,A4,XREAL_1:6,NAT_1:11;
      then
A10:   1+k in dom(p/^(i+1)) by FINSEQ_3:25;
      thus (p/^i).j = p.(i+j) by A2,A5,RFINSEQ:def 1 .= p.(i+1+(1+k)) by A7
      .= (p/^(i+1)).(1+k) by A1,A10,RFINSEQ:def 1
      .= (<*p.(i+1)*>^(p/^(i+1))).j by A8,A10,A9,FINSEQ_1:def 7;
    end;

  end;
