Documentation

Std.Internal.Do.Triple.Gadget

def Std.Internal.Do.assertGadget {m : Type u → Type v} {Pred EPred : Type u} [Monad m] [Assertion Pred] [Assertion EPred] [WPMonad m Pred EPred] (as : Pred) :

A no-op computation used as a verification gadget to inject assertions into the program.

The as parameter is the assertion to be checked. At runtime, assertGadget is simply pure ⟨⟩.

Equations
Instances For
    theorem Std.Internal.Do.Spec.assertGadget {m : Type u → Type v} {Pred EPred : Type u} [Monad m] [Assertion Pred] [Assertion EPred] [WPMonad m Pred EPred] {post : PUnitPred} {epost : EPred} (as : Pred) [∀ (a : Pred), Lean.Order.PreservesSup (Lean.Order.meet a)] :

    Specification for assertGadget: the precondition requires both the assertion as and the Heyting implication as ⇨ post ⟨⟩, ensuring the assertion holds and the postcondition follows from it.