theorem Th13:
  (v.Val_S(v,Sub_P(P,ll,Sub)))*'ll = v*'(CQC_Subst(ll,Sub))
proof
  set S9 = Sub_P(P,ll,Sub);
  set ll9 = CQC_Subst(ll,Sub);
A1: len ll = k by CARD_1:def 7;
  S9 = [P!ll,Sub] by SUBSTUT1:9;
  then
A2: (S9)`2 = Sub;
A3: len ((v.Val_S(v,S9))*'ll) = k by VALUAT_1:def 3;
  then
A4: dom ((v.Val_S(v,S9))*'ll) = Seg k by FINSEQ_1:def 3;
A5: for j be Nat st j in dom
  ((v.Val_S(v,S9))*'ll) holds (v.Val_S(v,S9))*'ll
  .j = v*'(CQC_Subst(ll,Sub)).j
  proof
    let j be Nat such that
A6: j in dom ((v.Val_S(v,S9))*'ll);
A7: 1 <= j & j <= k by A4,A6,FINSEQ_1:1;
    reconsider j as Nat;
    j in Seg (len ll) by A4,A6,CARD_1:def 7;
    then j in dom ll by FINSEQ_1:def 3;
    then reconsider x = ll.j as bound_QC-variable of Al by Th5;
A8: now
      assume
A9:   ll.j in dom Sub;
      then
      (v.Val_S(v,S9)).(ll.j) = Val_S(v,S9).x & ll.j in dom @(S9)`2 by A2,Th12,
SUBSTUT1:def 2;
      then (v.Val_S(v,S9)).(ll.j) = v.((@(S9)`2).(ll.j)) by FUNCT_1:13;
      then
A10:  (v.Val_S(v,S9)).(ll.j) = v.(((S9)`2).(ll.j)) by SUBSTUT1:def 2;
A11:  ((v.Val_S(v,S9))*'ll).j = (v.Val_S(v,S9)).(ll.j) by A7,VALUAT_1:def 3;
      v.(ll9.j) = v.(((S9)`2).(ll.j)) by A2,A1,A7,A9,SUBSTUT1:def 3;
      hence thesis by A7,A10,A11,VALUAT_1:def 3;
    end;
    now
      assume not ll.j in dom Sub;
      then
A12:  v.(ll9.j) = v.(ll.j) & (v.Val_S(v,S9)).(ll.j) = v.x by A2,A1,A7,Th11,
SUBSTUT1:def 3;
      (v*'ll9).j = v.(ll9.j) by A7,VALUAT_1:def 3;
      hence thesis by A7,A12,VALUAT_1:def 3;
    end;
    hence thesis by A8;
  end;
  len (v*'ll9) = k by VALUAT_1:def 3;
  hence thesis by A3,A5,FINSEQ_2:9;
end;
