reserve G for non empty DTConstrStr,
  s for Symbol of G,
  n,m for String of G;
reserve n1,n2,n3 for String of G;
reserve a,b,c for set,
  D for non empty set,
  d for Element of D;

theorem
  a <> b implies Lang IterGrammar(a,b) = {b}*
proof
  set T = IterGrammar(a,b);
  set I = <*the InitialSym of T*>;
  defpred X[Nat] means for p being String of T st len p = $1 & p in
  {b}* holds p^I is_derivable_from I;
A1: the carrier of T = {a,b} by Def9;
  assume a <> b;
  then
A2: Terminals T = {b} by Th14;
  thus Lang T c= {b}*
  proof
    let a be object;
    assume a in Lang T;
    then consider p being String of T such that
A3: a = p and
A4: rng p c= Terminals T and
    p is_derivable_from <*the InitialSym of T*>;
    p is FinSequence of {b} by A2,A4,FINSEQ_1:def 4;
    hence thesis by A3,FINSEQ_1:def 11;
  end;
A5: the InitialSym of T = a by Def9;
A6: the Rules of T = {[a,<*b,a*>],[a,{}]} by Def9;
  then [a,{}] in the Rules of T by TARSKI:def 2;
  then the InitialSym of T ==> <*> the carrier of T by A5;
  then
A7: I ==> <*> the carrier of T by Th3;
A8: for k being Nat st X[k] holds X[k+1]
  proof
    let k be Nat such that
A9: for p being String of T st len p = k & p in {b}* holds p^I
    is_derivable_from I;
    let p be String of T;
    assume that
A10: len p = k+1 and
A11: p in {b}*;
    consider q being FinSequence, c such that
A12: p = q^<*c*> and
A13: len q = k by A10,TREES_2:3;
A14: rng <*c*> = {c} by FINSEQ_1:38;
A15: p is FinSequence of {b} by A11,FINSEQ_1:def 11;
    then
A16: q is FinSequence of {b} by A12,FINSEQ_1:36;
    <*c*> is FinSequence of the carrier of T by A12,FINSEQ_1:36;
    then
A17: {c} c= the carrier of T by A14,FINSEQ_1:def 4;
    <*c*> is FinSequence of {b} by A12,A15,FINSEQ_1:36;
    then {c} c= {b} by A14,FINSEQ_1:def 4;
    then reconsider c as Element of {b} by ZFMISC_1:31;
    reconsider x = c as Symbol of T by A17,ZFMISC_1:31;
A18: q is FinSequence of the carrier of T by A12,FINSEQ_1:36;
A19: [a,<*b,a*>] in the Rules of T by A6,TARSKI:def 2;
    reconsider q as String of T by A18,FINSEQ_1:def 11;
    c = b by TARSKI:def 1;
    then the InitialSym of T ==> <*x,the InitialSym of T*> by A5,A19;
    then I ==> <*x,the InitialSym of T*> by Th3;
    then
A20: q^I ==> q^<*x,the InitialSym of T*> by Th5;
    <*x,the InitialSym of T*> = <*x*>^I by FINSEQ_1:def 9;
    then q^I ==> p^I by A12,A20,FINSEQ_1:32;
    then
A21: p^I is_derivable_from q^I by Th7;
    q in {b}* by A16,FINSEQ_1:def 11;
    then q^I is_derivable_from I by A9,A13;
    hence thesis by A21,Th8;
  end;
  let c be object;
  assume
A22: c in {b}*;
  then reconsider c as FinSequence of {b} by FINSEQ_1:def 11;
  {b} c= {a,b} by ZFMISC_1:7;
  then rng c c= {a,b};
  then c is FinSequence of the carrier of T by A1,FINSEQ_1:def 4;
  then reconsider n = c as String of T by FINSEQ_1:def 11;
  n^{} = n by FINSEQ_1:34;
  then n^I ==> n by A7,Th5;
  then
A23: n is_derivable_from n^I by Th7;
A24: X[0]
  proof
    let p be String of T;
    assume len p = 0;
    then p = {};
    then p^I = I by FINSEQ_1:34;
    hence thesis by Th6;
  end;
A25: for k being Nat holds X[k] from NAT_1:sch 2(A24,A8);
  len n = len n;
  then n^I is_derivable_from I by A25,A22;
  then
A26: n is_derivable_from I by A23,Th8;
  rng c c= {b};
  hence thesis by A2,A26;
end;
