Synth-mode resolution: resolve e and synthesize its HighType,
written Γ ⊢ e ⇒ T. Each constructor with a synthesis rule delegates
to its rule's helper. Statement-shaped constructs (While, Exit,
Return, Assert, Assume, Var-Declare) synthesize TVoid.
Synthesis returns a type inferred from the expression itself;
checking (Check.resolveStmtExpr) verifies that the expression has
a given expected type. The two functions are mutually recursive,
with termination on a lexicographic measure (exprMd, tag) — tag
2 for synth, 3 for check, helpers smaller — so that subsumption
(which calls synth on the same expression) can decrease via
Prod.Lex.right.