generalize optimality invariant (still unproven)