Documentation

GaudisCrypt.Logic.ECCallOneSided

EasyCrypt's one-sided call of a lossless procedure: call{1} H, call{2} H #

prhlStmt_seq_call_left_lossless    -- `x <- M(e)` at the end of the left side only
prhlStmt_seq_call_right_lossless   -- the mirror

EC's call{1} (H : islossless M) drops a call at the end of one side: the call terminates (H), and the postcondition must hold whatever the call returns and does to M's globals — EC's forall r (gM : glob M), Q. Here what the postcondition may rely on staying put is a frame Fr g g' between the globals before and after the call, which every run of M keeps:

The tactic:

equiv_call{1} H                     -- EC's `call{1} H`, no frame
equiv_call{1} H / x₁, …, glob A     -- with the frame `x₁`, …, `glob A`

H : islossless M may have holes (_, EC's call{1} (S_ll RO _)): they are goals after the judgment's. The frame's side conditions — lenses outside M's footprint, M outside glob A, A finitely supported — are shown by fp_disjoint and fp_finite.

A frame against an arbitrary footprint would not be sound (CounterExamples/FramingNeedsReset.lean).

Fr is a frame of M: every run of M from globals g ends in globals g' with Fr g g'.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem GaudisCrypt.Module.Proc.frame_and {sig : ProcedureSignature} {M : Proc sig} {F₁ F₂ : VariableAssignment → VariableAssignment → Prop} (h₁ : M.Frame F₁) (h₂ : M.Frame F₂) :
    M.Frame fun (g g' : VariableAssignment) => F₁ g g' ∧ F₂ g g'
    theorem GaudisCrypt.Module.Proc.frame_lens {sig : ProcedureSignature} {M : Proc sig} {β : Type} (X : Lens β VariableAssignment) (hX : X.footprint ≤ (FVP.fvP M)ᶜ) :
    M.Frame fun (g g' : VariableAssignment) => X.get g' = X.get g

    A lens outside M's footprint is a frame of M.

    The glob of a finitely supported G that M stays out of is a frame of M.

    A region of variables (X.footprint, X their Lens.pair: EC's glob C of a concrete module) outside M is a frame of M.

    The frame x₁, …, glob A as a proof of M.Frame _: a lens, or the glob of a module.

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

      EC's call{i} H: see the module docstring.

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