
theorem Th4:
  for t being DecoratedTree holds t is root iff {} in Leaves dom t
proof
  let t be DecoratedTree;
  reconsider e = {} as Node of t by TREES_1:22;
  hereby
    assume t is root;
    then dom t = elementary_tree 0;
    then not e^<*0*> in dom t by TARSKI:def 1,TREES_1:29;
    hence {} in Leaves dom t by TREES_1:54;
  end;
  assume
A1: {} in Leaves dom t;
  let p be FinSequence of NAT;
  hereby
    assume that
A2: p in dom t and
A3: not p in elementary_tree 0;
    p <> {} by A3,TARSKI:def 1,TREES_1:29;
    then consider q being FinSequence of NAT,
    n being Element of NAT such that
A4: p = <*n*>^q by FINSEQ_2:130;
A5: e^<*n*> = <*n*> by FINSEQ_1:34;
    <*n*> in dom t by A2,A4,TREES_1:21;
    hence contradiction by A1,A5,TREES_1:55;
  end;
  assume p in elementary_tree 0;
  then p = {} by TARSKI:def 1,TREES_1:29;
  hence thesis by TREES_1:22;
end;
