Added hash and equals function for select n.
Create constant set vars when card equals env.
More partial evaluation.
Reify sum.