I'm looking to formally define a tree and then extract the leaves from it in a concise way. Does this look ok? What is the best way of doing this?
$ Y = \{a,b,c,d,e,f,g\} \\ R = \{a \mapsto b, a \mapsto d, d \mapsto e, d \mapsto f, f \mapsto g\} \ \text{, where R is a relation on Y.} \\ R^+ = \{a \mapsto b, a \mapsto d, d \mapsto e, d \mapsto f, a \mapsto e, a \mapsto f, a \mapsto g\} \ \text{, where $R^+$ is the transitive closure of R.} \\ leaves = \{x \in range(R^+) \mid \ x \notin dom(R^+) \} $