An idealized, two-dimensional Maxwell demon is described which incorpo
rates an irreversible process. The vertex of the device acts as a pure
ly mechanical 'trap door'. This idealized mechanism is found to genera
te a violation of the second law of thermodynamics. These results indi
cate that the second law of thermodynamics is not valid in general for
idealized, irreversible systems.