Invariant generation working (it seems)