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;

theorem Th7:
  q1,w1-leads_to q2 implies for k st 1 <= k & k <= len w2 + 1
  holds (q1,w1^w2)-admissible.(len w1 + k) = (q2,w2)-admissible.k
proof
  set q1w = (q1,w1^w2)-admissible;
  set q2w2 = (q2,w2)-admissible;
  defpred P[Nat] means 1 <= $1 & $1 <= len w2 + 1 implies q1w.(len
  w1 + $1) = q2w2.$1;
  assume
A1: q1,w1-leads_to q2;
A2: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat;
    assume
A3: 1 <= k & k <= len w2 + 1 implies q1w.(len w1 + k) = q2w2.k;
    assume that
    1 <= k+1 and
A4: k+1 <= len w2 + 1;
    per cases;
    suppose
A5:   k = 0;
      hence q1w.(len w1 + (k+1)) = q2 by A1,Th6
        .= q2w2.(k+1) by A5,Def2;
    end;
    suppose
A6:   0 < k;
A7:   k <= len w2 by A4,XREAL_1:6;
A8:   0+1 = 1;
      then 1 <= k by A6,NAT_1:13;
      then
A9:   (ex w2i being Element of IAlph,q2i,q2i1 being State of fsm st w2i =
w2.k & q2i = q2w2.k & q2i1 = q2w2.(k+1) & w2i-succ_of q2i = q2i1 )& k in dom w2
      by A7,Def2,FINSEQ_3:25;
      len (w1^w2) = len w1 + len w2 by FINSEQ_1:22;
      then
A10:  len w1 + k <= len (w1^w2) by A7,XREAL_1:7;
      1 <= len w1 + k by A6,A8,NAT_1:13;
      then
      ex wi being Element of IAlph, qi,qi1 being State of fsm st wi = (w1^
w2).(len w1 + k) & qi = q1w.(len w1 + k) & qi1 = q1w.((len w1 + k)+1 ) & wi
      -succ_of qi = qi1 by A10,Def2;
      hence thesis by A3,A4,A6,A8,A9,FINSEQ_1:def 7,NAT_1:13;
    end;
  end;
A11: P[0];
  thus for n being Nat holds P[n] from NAT_1:sch 2(A11,A2);
end;
