Theorem: All expressions contain a constant or variable.
Proof #1 (induction on height):
By induction on the height of an arbitrary expression e.
Base case: Height h = 0
If an expression has height 0, it's a variable or a constant.
Therefore it contains one.
Inductive case: Height h > 0
If an expression e has height h > 0, then it is either
e1+e2 or e1*e2 for some e1 and e2. In either case, e1 has
height at most h-1. So by induction e1 has a constant or
variable. So so does e.
Proof #2 (structural induction):
By induction on the structure of an arbitrary expression e.
There are four cases:
If e is a variable, then it contains a variable or constant.
If e is a constant, then it contains a variable or constant.
If e is e1+e2 for some e1, then by induction e1
contains a variable or constant. So so does e.
If e is e1*e2 for some e1, then by induction e1
contains a variable or constant. So so does e.