  We give an algorithm for testing the extremality of minimal valid functions
for Gomory and Johnson's infinite group problem that are piecewise linear
(possibly discontinuous) with rational breakpoints. This is the first set of
necessary and sufficient conditions that can be tested algorithmically for
deciding extremality in this important class of minimal valid functions. We
also present an extreme function that is a piecewise linear function with some
irrational breakpoints, whose extremality follows from a new principle.
