Documentation

Complexity.Logics.FirstOrder.Ordered.Packing

Native access to fixed tuples of packed words #

The number of words is a syntactic constant. Addressing uses literal multiples and native PLUS; it does not presuppose a multiplication relation. Decoding a field checks all bits, including zeros above its width and zeros at unused addresses.

Main definitions #

Main results #

References #

noncomputable def Cslib.Logic.FO.Ordered.packedBit (L : FirstOrder.Language) {α : Type u_1} {B : ℕ} (h : (language L).Term α) (w : Fin B → (language L).Term α) (a : (language L).Term α) :

Read a bit in a fixed tuple. Each scale is a syntactic literal, independent of the universe.

Instances For
    noncomputable def Cslib.Logic.FO.Ordered.packedField (L : FirstOrder.Language) {α : Type u_1} {B : ℕ} (h : (language L).Term α) (w : Fin B → (language L).Term α) (a s z : (language L).Term α) :

    Decode exactly s bits starting at a, with all higher bits explicitly zero.

    Instances For
      @[simp]
      theorem Cslib.Logic.FO.Ordered.realize_packedBit {L : FirstOrder.Language} {n : ℕ} [Fact (2 ≤ n)] [L.Structure (Fin n)] {α : Type u_1} {B : ℕ} (h : (language L).Term α) (w : Fin B → (language L).Term α) (a : (language L).Term α) (v : α → Fin n) :

      packedBit L h w a holds exactly when position a falls in one of the B words w, of width h, at a set bit.

      theorem Cslib.Logic.FO.Ordered.realize_packedField {L : FirstOrder.Language} {n : ℕ} [Fact (2 ≤ n)] [L.Structure (Fin n)] {α : Type u_1} {B : ℕ} (h : (language L).Term α) (w : Fin B → (language L).Term α) (a s z : (language L).Term α) (v : α → Fin n) (hspace : B * ↑(FirstOrder.Language.Term.realize v h) < n) :

      When B words of width h fit in the universe, packedField L h w a s z holds exactly when z is the field of s bits at position a (BitString.readPackedField).