Succinct MCSP -- definitions #
SuccinctMCSP replaces a complete truth table by a finite list of sampled
input/output constraints. The list may repeat an input, so contradictory
constraints are represented rather than ruled out by syntax. An instance is
accepted exactly when one circuit within its threshold matches every sample.
The codec is total and canonical. Each typed sample is framed separately, the sample count is explicit, and decoding rejects wrong-width inputs, non-singleton outputs, missing samples, trailing samples, noncanonical natural fields, and malformed pairing.
Positive arities use Basis.andOr2. Since the circuit type has no zero-input
member, a zero-arity witness is an explicitly chosen constant bit of size zero.
Thus contradictory zero-arity samples are rejected while every consistent list
is accepted at every natural threshold.
Package one evaluation of a Boolean function as a sample.
Equations
- Complexity.SuccinctMCSP.Sample.ofFunction f input = { input := input, output := f input }
Instances For
Canonically encode a list of samples as a right-nested sequence of pairs.
Equations
- Complexity.SuccinctMCSP.encodeSamples [] = []
- Complexity.SuccinctMCSP.encodeSamples (sample :: samples) = Complexity.pair sample.encode (Complexity.SuccinctMCSP.encodeSamples samples)
Instances For
Decode exactly count right-nested samples and reject all trailing data.
Equations
Instances For
Build the sampled constraints induced by a function on a chosen input list.
Equations
- Complexity.SuccinctMCSP.Instance.ofInputs threshold f inputs = { arity := arity, samples := List.map (Complexity.SuccinctMCSP.Sample.ofFunction f) inputs, threshold := threshold }
Instances For
Every sample in the instance is satisfied by the supplied function.
Equations
- inst.SamplesFunction f = ∀ sample ∈ inst.samples, sample.MatchesFunction f
Instances For
Canonically encode arity, threshold, count, and the framed sample payload.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A direct typed witness formulation of sampled circuit minimization.
At positive arity the witness is a fan-in-two circuit matching every listed constraint. At arity zero the witness is an explicit constant output bit of size zero.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Total succinct MCSP over canonical sampled-instance codes.
Malformed strings are no-instances.
Equations
- Complexity.SuccinctMCSP = {bits : List Bool | match Complexity.SuccinctMCSP.Instance.decode? bits with | some inst => inst.HasCircuitAtMost | none => False}