Nat Tree Arithmetic
There is up and factorial. Should be all you need to explore the Yendor Tree.

-- factorial must satisfy this
theorem factorial_garbage : is_zero_on_every_branch_it_is_on node -> factorial node = node := by sorry
Consider writing Lean.
For Length (i.e. non-negative real numbers) Trees, use the gamma function. For real numbers, give up; consider it bent instead.