
theorem Th10:
  for G being with_terminals with_nonterminals non empty DTConstrStr,
  tsg being Element of TS G, nt being NonTerminal of G st tsg.{} = nt
  ex ts being FinSequence of TS G st tsg = nt-tree ts & nt ==> roots ts
proof
  let G be with_terminals with_nonterminals non empty DTConstrStr;
  defpred P[DecoratedTree of the carrier of G] means
  for nt being NonTerminal of G st $1.{} = nt ex ts being FinSequence of TS G
  st $1 = nt-tree ts & nt ==> roots ts;
A1: now
    let s be Symbol of G;
    assume
A2: s in Terminals G;
    thus P[root-tree s]
    proof
      let nt be NonTerminal of G;
      assume (root-tree s).{} = nt;
      then
A3:   s = nt by TREES_4:3;
      Terminals G = { t where t is Symbol of G :
      not ex tnt being FinSequence st t ==> tnt } by LANG1:def 2;
      then
A4:   ex t being Symbol of G st s = t &
      not ex tnt being FinSequence st t ==> tnt by A2;
A5:   nt in NonTerminals G;
      NonTerminals G = { t where t is Symbol of G : ex tnt being FinSequence
      st t ==> tnt } by LANG1:def 3;
      then ex t being Symbol of G st nt = t &
      ex tnt being FinSequence st t ==> tnt by A5;
      hence thesis by A3,A4;
    end;
  end;
A6: now
    let nnt be Symbol of G, tts be FinSequence of TS G;
    assume that
A7: nnt ==> roots tts
    and for t being DecoratedTree of the carrier of G st t in rng tts holds
    P[t];
    thus P[nnt-tree tts]
    proof
      let nt be NonTerminal of G;
      assume
A8:   (nnt-tree tts).{} = nt;
      take ts = tts;
      thus thesis by A7,A8,TREES_4:def 4;
    end;
  end;
A9: for t being DecoratedTree of the carrier of G st t in TS G holds P[t]
  from DTConstrInd (A1,A6);
  let tsg be Element of TS G, nt be NonTerminal of G;
  assume tsg.{} = nt;
  hence thesis by A9;
end;
