Lexical scope
¥LS(w) = LSt(t(w))
¥LSt(t(w)) = 1 if t is a leaf
¥LSt(t(w)) = (LS(t1) + LS(t2))
/(2-sin(D(t(w)))
¥otherwise
¥n(w) = nt(t(w))
¥nt(t(w)) = n(w)if t is a leaf
¥nt(t(w)) = LS(t1)nt(t1) + LS(t2)nt(t2)
¥otherwise

1:D(3,4), n(3+2)
2:n4
7:n2
6:n1
4:n3
5:D(6,7), n(6+7)
3:D(4,5), n(4+5)

Can handle duplicated definitions
t(w) =