theorem Th22:
  deg t <> 0 iff ex o,p st t = o-term p
  proof
    defpred P[Element of Free(S,X)] means
    deg $1 <> 0 iff ex o,p st $1 = o-term p;
A1: P[x-term] by Th21;
A2: now
      let o,p; assume for t st t in rng p holds P[t];
      [o,the carrier of S] in [:the carrier' of S, {the carrier of S}:] &
      {} in dom (o-term p) & (o-term p).{} = [o,the carrier of S]
      by TREES_1:22,ZFMISC_1:106,TREES_4:def 4;
      then {} in (o-term p)"[:the carrier' of S, {the carrier of S}:]
      by FUNCT_1:def 7;
      then {{}} c= (o-term p)"[:the carrier' of S, {the carrier of S}:];
      then 1 = card{{}} = Segm card{{}} c= Segm deg (o-term p) by CARD_1:11,30;
      hence P[o-term p];
    end;
    thus P[t] from TermInd(A1,A2);
  end;
