reserve x,y,z for set;
reserve f,f1,f2,f3 for FinSequence,
  p,p1,p2,p3 for set,
  i,k for Nat;
reserve D for non empty set,
  p,p1,p2,p3 for Element of D,
  f,f1,f2 for FinSequence of D;
reserve D for non empty set;
reserve p, q for FinSequence,
  X, Y, x, y for set,
  D for non empty set,
  i, j, k, l, m, n, r for Nat;

theorem Th15:
  1<=k & k<len q implies (p^'q).(len p +k) = q.(k+1)
proof
  set qc = (2,len q)-cut q;
  assume that
A1: 1<=k and
A2: k<len q;
  per cases;
  suppose
    q={};
    hence thesis by A2;
  end;
  suppose
    q<>{};
    then 0+1<=len q by NAT_1:13;
    then
A3: 1+1<=len q +1 by XREAL_1:7;
    then len qc +(1+1) = len q + 1 by Lm2;
    then len qc +1+1 = len q + 1;
    then
A4: k<=len qc by A2,NAT_1:13;
    0+1<=k by A1;
    then consider i being Nat such that
    0<=i and
A5: i<len qc and
A6: k=i+1 by A4,Th1;
    k in dom qc by A1,A4,FINSEQ_3:25;
    hence (p^'q).(len p +k) = qc.k by FINSEQ_1:def 7
      .= q.(1+1+i) by A3,A5,A6,Lm2
      .= q.(k+1) by A6;
  end;
end;
