Documentation

Std.Do.WP.Adequate

WP Adequacy #

WPAdequate m ps provides a soundness bridge: if wp x proves a postcondition P, then x is Internal.Ensures-witnessed at P. Combined with Internal.MayReturn x a, this yields P a for any value a that x may classically return.

class Std.Do.WPAdequate (m : Type u → Type v) (ps : outParam PostShape) [Monad m] [WP m ps] :

A small adequacy principle: a wp-provable postcondition is Internal.Ensures-witnessed.

Instances
    instance Std.Do.instWPAdequateReaderTArg {m : Type u_1 → Type u_2} {ps : PostShape} {ρ : Type u_1} [Monad m] [WP m ps] [WPAdequate m ps] :
    instance Std.Do.instWPAdequateStateTArgOfLawfulMonad {m : Type u_1 → Type u_2} {ps : PostShape} {σ : Type u_1} [Monad m] [LawfulMonad m] [WP m ps] [WPAdequate m ps] :