Move method simplifyTop to be a member of class Expression.

I'm not sure if this is exactly what the authors intended to begin with,
but I have something in mind for this code, and we'll see if it works
out or not.
Move the Expression class to its own package.
Add an example of a wildcard pattern match.

The wildcard pattern (_) matches any object, whatsoever.
Add another example of wildcard patterns.

Wildcards can also be used to ignore parts of an object that you do not
care about. For example, here we don't care what the elements of the
binary operation are. It just checks whether it is a binary operation at
all.

Thus the code can just as well use the wildcard pattern for the elements
of the BinaryOperator, as shown here.
Add an example of a match on constant patterns.

A constant pattern matches only itself. Any literal may be used as a
constant. For example, 5, true, and "hello" are all constant patterns.
Also, any val or singleton object can be used as a constant. For
example, Nil, a singleton object, is a pattern that matches only the
empty list.
Add an example of a match on variable patterns.

A variable pattern matches any object, just like a wildcard. Unlike a
wildcard, Scala binds the variable to whatever the object is. You can
then use this variable to act on the object further. For example, this
pattern match has a special case for zero, and a default case for all
other values. The default case uses a variable pattern so that it has
a name for the value, no matter what it is.
Add an example of constant pattern matches that can appear to be variable.

Constant patterns can have symbolic names, just like Nil can be used
as a pattern. Here is a related example, where a pattern match
involves the constants E (2.71828. . . ) and PI (3.14159. . . ).

As expected, E does not match PI, so the "strange math" case is not
used. How does the Scala compiler know that PI is a constant imported
from scala.math, and not a variable that stands for the selector value
itself?

Scala uses a simple lexical rule for disambiguation: a simple name
starting with a lowercase letter is taken to be a pattern variable; all
other references are taken to be constants.
Add an example that demonstrates the power of variable pattern matching.

Sometimes this power can get newer users into trouble.  At first glance,
this code appears to desire a pattern match on the constant object, (at
least for the purposes of the match expression; it won't change it) pi.

In fact, actually, pi inside the match is treated as a variable pattern
that catches all values; the compiler graciously allows you to add an
additional case afterward, but warns you of unreachable code.
Add an example showing how backticks can override a variable pattern.

... to behave like a constant pattern.

As you can see, the back-tick syntax for identifiers is used for two
different purposes in Scala to help you code your way out of unusual
circumstances. Here you see that it can be used to treat a lowercase
identifier as a constant in a pattern match.

It can also be used to treat a keyword as an ordinary identifier,
e.g., writing Thread.`yield`() treats yield as an identifier rather
than a keyword.