Proposition 4: recovering every weighted path parity under a list cutoff and finite fair coins
ProvedDirectedHamiltonicity.Main.finite_coin_weighted_parity_cutoffLet be a normalized directed multigraph, with distinct endpoints , and nonnegative weights with at most incoming weights per vertex. Write and take trials, where the natural exponent is truncated at zero. An outcome in consists of one common random augmentation and independent nonzero-coefficient tuples. At least of the outcomes both report at most subsets with multiplicity and recover the parity for every integer target weight simultaneously by summing determinants over distinct reported subsets. For every with , one can use fair bits to choose an outcome: each subset has at least preimages, and the probability of success is at least . This theorem establishes finite sampling and algebraic correctness; the machine implementation and its runtime are a separate obligation.
import Mathlib import Definitions.Def_DirectedHamiltonicity_Main_DetSum open Finset DirectedHamiltonicity.Main DirectedHamiltonicity.Main.Multidigraph Polynomial
open Classical in
theorem DirectedHamiltonicity.Main.finite_coin_weighted_parity_cutoff {V E : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
(H : Multidigraph V E) (w : E → ℕ) (s t : V) (hst : s ≠ t) (hn : H.IsNormalized w s t)
(d : ℕ) (hd : 1 ≤ d) (deg : ∀ v, (H.incomingWeights w v).card ≤ d) :
let n := Fintype.card V
let M := ⌈(2-(1/2:ℝ)^d)^(n-2)⌉₊ * (n+4)
let R := (i : Internal s t) → Finset (H.incomingWeights w i.1)
let A := H.NonzeroCoeffs w s t
let S := fun (r : R) (a : A) => H.sampled w s t (fun i => (a i).1) r
let Ω := R × (Fin M → A)
let good := univ.filter (fun q : R × (Fin M → A) =>
(∑ j, (S q.1 (q.2 j)).card) ≤ 12*M ∧
∀ B : ℤ,
(if B < 0 then (0 : ZMod 2) else
(∑ x ∈ univ.biUnion (fun j => S q.1 (q.2 j)),
(H.augLaplacian w s t x q.1).det).coeff B.toNat) =
(H.weightedPathCount w s t B : ZMod 2))
(41*Fintype.card Ω ≤ 48*good.card) ∧
∀ L : ℕ, 40*Fintype.card Ω ≤ 2^L →
∃ draw : (Fin L → Bool) → Ω,
(∀ U : Finset Ω, (2^L/Fintype.card Ω)*U.card ≤
(univ.filter (fun c => draw c ∈ U)).card) ∧
5*2^L ≤ 6*(univ.filter (fun c => draw c ∈ good)).card := by sorry