Canonical encoding of finite Boolean assignments and tables -- definitions #
Coordinates are listed in their linear order. Boolean assignments to k
coordinates are then indexed by the corresponding little-endian k-bit
vector, giving a computable equivalence with Fin (2^k). This fixes a canonical
order for serializing arbitrary Boolean dependency tables.
Computable little-endian indexing of all Boolean assignments to an ordered finite coordinate set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Boolean assignments equipped with their canonical little-endian order.
- toFun : ↥coordinates → Bool
Underlying assignment.
Instances For
Ordered assignments are canonically equivalent to their little-endian indices.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Complexity.BooleanDependency.OrderedAssignment.instFintype = Fintype.ofEquiv (Fin (2 ^ coordinates.card)) (Complexity.BooleanDependency.OrderedAssignment.indexEquiv coordinates).symm
Encode a Boolean function on any finite linearly ordered domain.
Equations
- Complexity.BooleanDependency.encodeOrderedFunction function = List.ofFn fun (position : Fin (Fintype.card index)) => function ((Fintype.orderIsoFinOfCardEq index ⋯) position)
Instances For
Decode a Boolean function on a finite linearly ordered domain only from a bit string with exactly one entry per domain element.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encode one assignment by listing its coordinate values in increasing coordinate order.
Equations
- Complexity.BooleanDependency.encodeAssignment coordinates assignment = List.ofFn fun (position : Fin coordinates.card) => assignment ((coordinates.orderIsoOfFin ⋯) position)
Instances For
Decode an assignment only from a bit string of the exact required length.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Serialize a Boolean table in the canonical little-endian assignment order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decode a Boolean table only from a bit string with exactly one entry for every assignment.
Equations
- One or more equations did not get rendered due to their size.