theorem Th12:
  T height<= 0 = (the set of all x-term) \/
  {o-term p: o-term p in T & the_arity_of o = {}}
  proof set I = the set of all x-term;
    set J = {o-term p: o-term p in T & the_arity_of o = {}};
    thus T height<= 0 c= I \/ J
    proof let a;
      assume a in T height<= 0;
      then consider t such that
A1:   a = t & t in T & height t <= 0;
      per cases by Th16;
      suppose ex s,x st t = x-term;
        then t in I;
        hence thesis by A1,XBOOLE_0:def 3;
      end;
      suppose ex o,p st t = o-term p;
        then consider o,p such that
A2:     t = o-term p;
        reconsider n = union {height t1: t1 in rng p} as Nat by Th25;
        per cases;
        suppose the_arity_of o = {};
          then t in J by A1,A2;
          hence thesis by A1,XBOOLE_0:def 3;
        end;
        suppose the_arity_of o <> {};
          then height t = n+1 by A2,Th26;
          hence thesis by A1;
        end;
      end;
    end;
    let a; assume a in I \/ J;
    then per cases by XBOOLE_0:def 3;
    suppose a in I;
      then consider s,x such that
A3:   a = x-term;
      height (x-term) = 0 & x-term in T by Th24,TREES_1:42;
      hence thesis by A3;
    end;
    suppose a in J;
      then consider o,p such that
A4:   a = o-term p & o-term p in T & the_arity_of o = {};
      height (o-term p) = 0 by A4,Th20;
      hence thesis by A4;
    end;
  end;
