some work on type inference
added congruence rules for reduction