Definition state_lift' {S} {X} (Pre : S -> Prop)(Post : S -> Prop) (P : X -> Prop) : state S X -> Prop :=
fun f => forall s, Pre s -> P (fst(runState f s)) /\ Post (snd (runState f s)).

Lemma bind_lift_lemma' {S} {X Y} (Pre: S -> Prop)(Mid : S -> Prop) (Post : S -> Prop) (P : X -> Prop) (Q : Y -> Prop)
(sx : state S X) (f : X -> state S Y) :
state_lift' Pre Mid P sx ->
(forall x, P x -> state_lift' Mid Post Q (f x)) ->
state_lift' Pre Post Q (bind sx f).