reserve m, n, i, k for Nat;
reserve IAlph, OAlph for non empty set,
  fsm for non empty FSM over IAlph,
  s for Element of IAlph,
  w, w1, w2 for FinSequence of IAlph,
  q, q9, q1, q2 for State of fsm;
reserve tfsm, tfsm1, tfsm2, tfsm3 for non empty Mealy-FSM over IAlph, OAlph,
  sfsm for non empty Moore-FSM over IAlph, OAlph,
  qs for State of sfsm,
  q, q1, q2 , q3, qa, qb, qc, qa9, qt, q1t, q2t for State of tfsm,
  q11, q12 for State of tfsm1,
  q21, q22 for State of tfsm2;
reserve OAlphf for finite non empty set,
  tfsmf for finite non empty Mealy-FSM over IAlph, OAlphf,
  sfsmf for finite non empty Moore-FSM over IAlph, OAlphf;

theorem Th17:
  qa9 = (the Tran of tfsm).[qa, s] implies for i st i in Seg (len
  w + 1) holds (qa, <*s*>^w)-admissible.(i+1) = (qa9, w)-admissible.i
proof
  set sw = (<*s*>^w);
A1: len sw = len <*s*> + len w by FINSEQ_1:22
    .= len w + 1 by FINSEQ_1:40;
  defpred P[Nat] means $1 in Seg (len w + 1) implies (qa, <*s*>^w)
  -admissible.($1+1) = (qa9, w)-admissible.$1;
A2: sw.1 = s by FINSEQ_1:41;
  assume
A3: qa9 = (the Tran of tfsm).[qa, s];
A4: for j being Nat st P[j] holds P[j+1]
  proof
    let j be Nat;
    assume
A5: j in Seg (len w + 1) implies (qa, <*s*>^w)-admissible.(j+1) = (qa9
    , w)-admissible.j;
    assume
A6: j+1 in Seg (len w + 1);
    per cases;
    suppose
A7:   j = 0;
      set aadm = (qa, sw)-admissible;
      1 <= len sw by A1,A6,A7,FINSEQ_1:1;
      then
A8:   ex swi1 being Element of IAlph, a1, a11 being Element of tfsm st
      swi1 = sw.1 & a1 = aadm.1 & a11 = aadm.(1+1) & swi1-succ_of a1 = a11 by
Def2;
      (qa9, w)-admissible.1 = qa9 by Def2;
      hence thesis by A3,A2,A7,A8,Def2;
    end;
    suppose
A9:   j <> 0;
      set aadm = (qa, sw)-admissible, aadm9 = (qa9, w)-admissible;
A10:  j in Seg len w by A6,A9,FINSEQ_1:61;
      then
A11:  j <= len w by FINSEQ_1:1;
      then 1 <= j+1 & j+1 <= len sw by A1,NAT_1:12,XREAL_1:7;
      then
A12:  ex swj1 being Element of IAlph, aj1, aj11 being Element of tfsm st
swj1 = sw.(j+1) & aj1 = aadm.(j+1) & aj11 = aadm.(j+1+1) & swj1 -succ_of aj1 =
      aj11 by Def2;
      1 <= j by A10,FINSEQ_1:1;
      then
A13:  ex wj being Element of IAlph, aj9, aj19 being Element of tfsm st wj
= w.j & aj9 = aadm9.j & aj19 = aadm9.(j+1) & wj-succ_of aj9 = aj19 by A11,Def2;
      j in dom w by A10,FINSEQ_1:def 3;
      hence thesis by A5,A6,A9,A12,A13,FINSEQ_1:61,FINSEQ_3:103;
    end;
  end;
A14: P[0] by FINSEQ_1:1;
  thus for i being Nat holds P[i] from NAT_1:sch 2(A14,A4);
end;
