Documentation

GaudisCrypt.Language.Granularity

Instances
    Equations
    Instances For
      @[implicit_reducible]
      Equations
      theorem GaudisCrypt.GranularFootprint.le_iff_subset [spec : GranularProgramSpec] {f g : GranularFootprint} :
      f ≤ g ↔ (have this := f; this) ⊆ have this := g; this
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]

      GranularFootprint is a generalized Boolean algebra (a distributive lattice with ⊥ and a relative complement \), inherited from Finset spec.grains via the identity injection toFinset. There is no ⊤/ᶜ in general: complementing a finite grain family need not stay finite when the granularity is infinite, so this does not extend to a BooleanAlgebra.

      Equations
      @[implicit_reducible]

      Infimum of a family of grain-sets: the intersection (grains common to every member). Only meaningful when the family is nonempty; empty family reduces to ⊥ (junk, unconstrained by the conditional axioms).

      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]

      Supremum of a family of grain-sets: the union (grains touched by some member), which stays finite exactly when the family is bounded above. Unbounded families reduce to ⊥ (junk); the empty family also gives ⊥, so sSup ∅ = ⊥.

      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]

      GranularFootprint is a conditionally complete lattice: any nonempty family of grain-sets that is bounded below has a greatest lower bound (its intersection), and any nonempty family bounded above has a least upper bound (its union — finite because contained in the bound). It is not a CompleteLattice: there is no ⊤ when the granularity is infinite. Combined with the existing OrderBot, sSup ∅ = ⊥ holds by construction.

      Equations

      A minimal granular cover of a sub-granular footprint: the sub-family of the grains of exactly the atoms footprint genuinely touches. It is the least granular footprint containing footprint — that every touched atom is needed is immediate, and that these atoms already cover footprint is the product-corner argument inlined into Footprint.IsSubGranular.granularCover_ge.

      Equations
      Instances For

        A granular footprint is a join of finitely many pairwise-disjoint lens footprints, hence itself lens-derived.

        The minimal granular cover's footprint is the join of exactly the grains that f touches.

        theorem GaudisCrypt.lens_pair_isSubGranular {a b : Type} [GranularProgramSpec] {lens1 : Lens a State} {lens2 : Lens b State} [disjoint lens1 lens2] (h1 : lens1.footprint.IsSubGranular) (h2 : lens2.footprint.IsSubGranular) :