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 Th8:
  q1,w1-leads_to q2 implies (q1,w1^w2)-admissible = Del((q1,w1)
  -admissible,(len w1 + 1))^(q2,w2)-admissible
proof
  set q1w = (q1,w1^w2)-admissible;
  set q1w1 = (q1,w1)-admissible;
  set q2w2 = (q2,w2)-admissible;
  set Dw1 = Del ((q1,w1)-admissible,(len w1+1));
A1: len q1w1 = len w1 + 1 by Def2;
  len q1w1 = len w1 + 1 & dom q1w1 = Seg (len q1w1) by Def2,FINSEQ_1:def 3;
  then len w1+1 in dom q1w1 by FINSEQ_1:3;
  then
A2: ex m be Nat st len q1w1 = m + 1 & len Dw1 = m by FINSEQ_3:104;
A3: len q1w = len (w1^w2) +1 by Def2
    .= len w1 + len w2 +1 by FINSEQ_1:22
    .= len Dw1 +(len w2 +1) by A2,A1
    .=len Dw1 + len q2w2 by Def2
    .= len (Dw1^q2w2) by FINSEQ_1:22;
  assume
A4: q1,w1-leads_to q2;
  now
    let k be Nat;
    assume
A5: 1 <= k & k <= len q1w;
    per cases by A5,NAT_1:13;
    suppose
A6:   1 <= k & k <= len w1;
      then
A7:   k < len w1 + 1 by NAT_1:13;
A8:   k in dom Dw1 by A2,A1,A6,FINSEQ_3:25;
      thus q1w.k = q1w1.k by A6,Th5
        .= Dw1.k by A7,FINSEQ_3:110
        .= (Dw1^q2w2).k by A8,FINSEQ_1:def 7;
    end;
    suppose
A9:  len w1+1 <= k & k <= len q1w;
      then k <= len Dw1 + len q2w2 by A3,FINSEQ_1:22;
      then
A10:  (Dw1^q2w2).k = q2w2.(k - len w1) by A2,A1,A9,FINSEQ_1:23;
      len w1 + 1 - len w1 <= k - len w1 by A9,XREAL_1:9;
      then reconsider i = k - len w1 as Element of NAT by INT_1:3;
A11:  k = len w1 + i;
      len q1w = len (w1^w2) + 1 by Def2;
      then k <= len w1 + len w2 +1 by A9,FINSEQ_1:22;
      then k <= len w1 + (len w2 +1);
      then
A12:  i <= len w2 +1 by A11,XREAL_1:6;
      1 <= i by A9,A11,XREAL_1:6;
      hence q1w.k = (Dw1^q2w2).k by A4,A11,A12,A10,Th7;
    end;
  end;
  hence thesis by A3,FINSEQ_1:14;
end;
