Executable routing of detyped queries #
The fixed finite graph is compiled into a table. The variable content is processed by list operations and at most one call to the original typed sampler. Padding follows the supplied content vector, so malformed queries never cause an unbounded dimension allocation.
@[reducible, inline]
Equations
- MIPRE.CL.Detyping.Program.GraphArgs T = (Bool × Bool × (Fin (MIPRE.CL.Detyping.graphDim T) → MIPRE.CL.𝔽₂) × (Fin (MIPRE.CL.Detyping.graphDim T) → MIPRE.CL.𝔽₂))
Instances For
@[reducible, inline]
Equations
Instances For
noncomputable def
MIPRE.CL.Detyping.Program.graphResult
{T : Type u_1}
[Fintype T]
[DecidableEq T]
[Cost.SizedEncoding T]
(E : T → T → Prop)
[DecidableRel E]
(a : GraphArgs T)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
MIPRE.CL.Detyping.Program.graphAction
{T : Type u_1}
[Fintype T]
[DecidableEq T]
[Cost.SizedEncoding T]
(E : T → T → Prop)
[DecidableRel E]
:
Equations
Instances For
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Equations
Instances For
Equations
Instances For
Equations
- MIPRE.CL.Detyping.Program.pad b u = List.map (fun (x : Bool) => b) u
Instances For
Equations
Instances For
Equations
- MIPRE.CL.Detyping.Program.withPrefix preBits = MIPRE.Cost.Data.nil.cons (MIPRE.Cost.encode preBits)
Instances For
def
MIPRE.CL.Detyping.Program.typedRequest
(n typ : Cost.Data)
(kind : ℕ)
(w : Bool)
(j : ℕ)
(u y : Cost.BitStr)
:
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- MIPRE.CL.Detyping.Program.callP arg ctx = (MIPRE.Cost.PolyTimeFun.const true).pair (MIPRE.Cost.PolyTimeFun.treePair.ap₂ arg ctx)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
noncomputable def
MIPRE.CL.Detyping.Program.route
{T : Type u_1}
[Fintype T]
[DecidableEq T]
[Cost.SizedEncoding T]
(E : T → T → Prop)
[DecidableRel E]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MIPRE.CL.Detyping.Program.route_preserves
{T : Type u_1}
[Fintype T]
[DecidableEq T]
[Cost.SizedEncoding T]
(E : T → T → Prop)
[DecidableRel E]
(n : ℕ)
(q payload : Cost.Data)
(h : (route E).toFun ((Cost.encode n).cons q) = (true, payload))
: