Documentation

GaudisCrypt.Logic.ECElim

EasyCrypt's elim * on a judgment's precondition #

equiv_elim* => a b      -- EC's `elim * => a b` (pRHL)
hoare_elim* => a        -- the same on a Hoare triple

EC's sp over x <- e with e reading x leaves exists x0, P[x0/x] /\ x = e[x0/x] in the precondition; elim * takes the existentials out, as universally quantified names. Here: the existentials of the precondition moved outward over its conjunctions, then introduced one by one (prhlStmt_exists_pre of Logic/PRHLStmt.lean, hoareStmt_exists_pre), named as written (_ for an anonymous one). The names go as EC's: sp nests the right side's existentials outside the left side's, so a relational judgment's are named from the innermost.

theorem GaudisCrypt.ECElim.and_ex_l {α : Sort u_1} {p : α → Prop} {q : Prop} :
((∃ (x : α), p x) ∧ q) = ∃ (x : α), p x ∧ q
theorem GaudisCrypt.ECElim.and_ex_r {α : Sort u_1} {p : α → Prop} {q : Prop} :
(q ∧ ∃ (x : α), p x) = ∃ (x : α), q ∧ p x
theorem GaudisCrypt.hoareStmt_exists_pre {ι : Sort u_1} {P : ι → ProgramState → Prop} {s : Stmt} {B : ProgramState → Prop} (h : ∀ (v : ι), hoare[ P v CurrentState.state ==> B CurrentState.state ] { stmt s; }) :
hoare[ ∃ (v : ι), P v CurrentState.state ==> B CurrentState.state ] { stmt s; }

An existential in a Hoare precondition, out as a universally quantified value.

elim * with the rule lem (prhlStmt_exists_pre / hoareStmt_exists_pre).

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

    EC's elim * => a b on a relational judgment (see the module docstring).

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

      EC's elim * => a on a Hoare triple (see the module docstring).

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

        The names of => a b _.

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