Uniform field evaluation of a routed gate #
Field elements are coefficient vectors modulo a supplied binary monic polynomial. Gate indices stay binary, including on malformed inputs.
@[reducible, inline]
Circuit-facing zero coefficients, implemented by generic quotient arithmetic.
Instances For
@[reducible, inline]
Circuit-facing one coefficients, implemented by generic quotient arithmetic.
Instances For
@[simp]
@[simp]
@[simp]
theorem
MIPRE.SAT.Circuit.evalBits_oneBits
{R : Type u_1}
[CommRing R]
(z : R)
(p : Cost.BitStr)
(hp : p ≠ [])
:
@[reducible, inline]
Instances For
@[reducible, inline]
Instances For
@[simp]
@[simp]
Gate arithmetic on coefficient vectors. The input reader is supplied separately so that the same arithmetic supports the routed copy links.
Equations
- One or more equations did not get rendered due to their size.
- MIPRE.SAT.Circuit.gateBits p x w (MIPRE.SAT.Gate.input i) = x i
- MIPRE.SAT.Circuit.gateBits p x w (MIPRE.SAT.Gate.const b) = if b = true then MIPRE.SAT.Circuit.oneBits p else MIPRE.SAT.Circuit.zeroBits p
- MIPRE.SAT.Circuit.gateBits p x w (MIPRE.SAT.Gate.and u v) = MIPRE.LowDegree.BinaryPolynomial.mulReduce p (w.getD u []) (w.getD v [])
- MIPRE.SAT.Circuit.gateBits p x w (MIPRE.SAT.Gate.not u) = MIPRE.LowDegree.BinaryPolynomial.xorBits (MIPRE.SAT.Circuit.oneBits p) (w.getD u [])
Instances For
The corresponding field expression in characteristic two.
Equations
- MIPRE.SAT.Circuit.gateValue x w (MIPRE.SAT.Gate.input i) = x i
- MIPRE.SAT.Circuit.gateValue x w (MIPRE.SAT.Gate.const b) = MIPRE.LowDegree.ofBool b
- MIPRE.SAT.Circuit.gateValue x w (MIPRE.SAT.Gate.and u v) = w u * w v
- MIPRE.SAT.Circuit.gateValue x w (MIPRE.SAT.Gate.or u v) = 1 + (1 + w u) * (1 + w v)
- MIPRE.SAT.Circuit.gateValue x w (MIPRE.SAT.Gate.not u) = 1 + w u
Instances For
theorem
MIPRE.SAT.Circuit.length_gateBits
(p : Cost.BitStr)
(x : ℕ → Cost.BitStr)
(w : List Cost.BitStr)
(g : Gate)
(hx : ∀ (i : ℕ), g = Gate.input i → List.length (x i) = List.length p)
(hw : ∀ j ∈ g.refs, List.length (w.getD j []) = List.length p)
:
theorem
MIPRE.SAT.Circuit.evalBits_gateBits
{R : Type u_1}
[CommRing R]
[CharP R 2]
(z : R)
(p : Cost.BitStr)
(hp : p ≠ [])
(hroot : z ^ List.length p = LowDegree.BinaryPolynomial.evalBits z p)
(x : ℕ → Cost.BitStr)
(w : List Cost.BitStr)
(g : Gate)
(hw : ∀ j ∈ g.refs, List.length (w.getD j []) = List.length p)
:
LowDegree.BinaryPolynomial.evalBits z (gateBits p x w g) = gateValue (fun (i : ℕ) => LowDegree.BinaryPolynomial.evalBits z (x i))
(fun (j : ℕ) => LowDegree.BinaryPolynomial.evalBits z (w.getD j [])) g
Correctness of all five gate operations over every characteristic-two ring containing a root of the supplied modulus.
@[reducible, inline]
Modulus, external coordinates, gate coordinates, and preceding gate/value pairs.
Equations
Instances For
Equations
- MIPRE.SAT.Circuit.readInput e i = MIPRE.SAT.Circuit.lastInputValue e.2.2.2 i (e.2.1.getD i [])
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Uniform polynomial-time field evaluation of one routed gate.
Equations
- One or more equations did not get rendered due to their size.