Documentation

GaudisCrypt.Logic.PRHL.Tactics

pRHL tactic layer (v1) #

Lightweight sugar for the recurring proof moves observed in the validation clients:

Peel lemmas #

theorem ProgramDenotation.wp_set_seq {s γ α : Type} (L : GaudisCrypt.Lens γ s) (v : γ) (P : GaudisCrypt.ProgramDenotation s α) (F : α × s → ENNReal) (σ : s) :
(do GaudisCrypt.ProgramDenotation.set L v P).wp F σ = P.wp F (L.set v σ)
theorem ProgramDenotation.wp_get_seq {s γ α : Type} (L : GaudisCrypt.Lens γ s) (k : γ → GaudisCrypt.ProgramDenotation s α) (F : α × s → ENNReal) (σ : s) :
(GaudisCrypt.ProgramDenotation.get L >>= k).wp F σ = (k (L.get σ)).wp F σ
theorem ProgramDenotation.wp_pure_seq {s α β : Type} (x : α) (k : α → GaudisCrypt.ProgramDenotation s β) (F : β × s → ENNReal) (σ : s) :
(pure x >>= k).wp F σ = (k x).wp F σ
theorem ProgramDenotation.wp_uniform_seq {s α β : Type} [Fintype α] [Nonempty α] (k : α → GaudisCrypt.ProgramDenotation s β) (F : β × s → ENNReal) (σ : s) :
(GaudisCrypt.ProgramDenotation.uniform >>= k).wp F σ = ∑ v : α, (k v).wp F σ / ↑(Fintype.card α)

Tactics #

Strip leading set/get/pure/uniform steps off wp goals.

Equations
Instances For

    Cut a relE goal at the leading bind, with the given intermediate relation (EasyCrypt's seq). Produces the prefix judgment and the ∀-quantified continuation judgment as goals.

    Equations
    Instances For

      Like rel_bind, for one-sided rel goals.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Try the structural/leaf relational rules; side conditions are left as goals. Runs at reducible transparency so failed candidates fail fast instead of unfolding program semantics.

        Equations
        Instances For

          Smoke tests #