Documentation

GaudisCrypt.Logic.ReadNorm

The read normal form, and a strict skip #

What a judgment tactic leaves for the logic is a goal about program states σ (one, or two for a relational judgment). The closers work on goals about plain values. The step between the two, generalizing every read of a state to a value, only works when the reads are spelled one way.

The read normal form #

A proposition P is in read normal form for the states σ₁ … σₙ when

ReadNorm.normalize brings a goal to this form with the existing steps, all of them, in one order: relSimpDecls (reads through writes), unfoldReads, normDecideGoal, normInst, globTuples. Until now each path applied its own subset (the Hoare and pHL paths no normDecide: the reads then do not generalize, and the goal silently stays about the states).

ReadNorm.offenders lists the places where a state is used other than by an atom.

ec_skip #

EC's skip on a Hoare triple, a phoare judgment or a relational one whose code is used up: the implication, normalized, with every read generalized to a value. Unlike hoare_skip, phoare_skip and equiv_skip, it fails if a state survives, and says where it is still used. The generalized values are named after their variables (x, or x₁/x₂ by side).

New name, old tactics unchanged: proofs move to it one file at a time (notes/SHA3/TacticReview.md, step 3).

The target of g, a proposition about the states σs (free variables of its context), in read normal form (see the module docstring).

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

    The subterms of e that use a state of σs other than by a read in normal form: an application with a state (or its globals) as an argument that is not a read x.get σ with x free of states. Empty for a proposition in read normal form. Each comes with its printed form, made where it stands (under the binders it is under, so that their variables print by name).

    A goal ∀ σ₁ … σₙ : ProgramState, P (n is 1 or 2): P normalized and every read generalized, ∀ x₁ … xₖ, P'. Fails if a state is still used, naming the places.

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

        EC's skip on a judgment whose code is used up (see the module docstring).

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

          EC's skip, strict: on a Hoare triple, a phoare judgment or a relational judgment whose code is skip, the implication in read normal form with every read a value (Logic/ReadNorm.lean). Fails if a state survives.

          Equations
          Instances For