solution without invariants as proofs