A formal description of a pair of finite simple graphs (G, H), packaged
together with the decidability and finiteness instances needed to manipulate
them constructively. Used as the underlying mathematical object for the graph
isomorphism problem ISO.
- V : Type
- instDecEqV : DecidableEq self.V
- G : SimpleGraph self.V
- instDecRelG : DecidableRel self.G.Adj
- W : Type
- instDecEqW : DecidableEq self.W
- H : SimpleGraph self.W
- instDecRelH : DecidableRel self.H.Adj
Instances For
A faithful encoding of graph-pair descriptions as strings over alphabet Γ,
specified by an injective encode function and a decode function that inverts
it. Used to turn the mathematical object GraphPairDesc into the language
ISO ⊆ List Γ.
- encode : GraphPairDesc → List Γ
- decode : List Γ → Option GraphPairDesc
- encode_injective : Function.Injective self.encode
Instances For
Polynomial Lemma. A non-zero univariate polynomial p : F[X] over a
field has at most deg p roots: the cardinality of its root multiset is bounded
by its degree.
Corollary of the Polynomial Lemma. If p₁, p₂ : F[X] both have degree
≤ d and p₁ ≠ p₂, then they agree on at most d points: equivalently, the
difference p₁ - p₂ has at most d roots.
Over a finite field F, a non-zero polynomial of degree ≤ d has at most
d roots inside F: the cardinality of {r ∈ F ∣ p(r) = 0} is bounded by
d.
Univariate Schwartz-Zippel (probability form). If p ∈ F[X] is non-zero
with degree ≤ d and r is chosen uniformly at random from a finite field F,
then Pr[p(r) = 0] ≤ d / |F|.
Schwartz-Zippel Lemma (Sipser textbook form). If
p(x₁, …, xₘ) ∈ F[x₁, …, xₘ] is a non-zero multivariate polynomial of degree
≤ d in each variable and r₁, …, rₘ are chosen uniformly at random from a
finite field F, then
Pr[p(r₁, …, rₘ) = 0] ≤ dm / |F|.
A language A ⊆ Σ* is in BPP with error ε if some polynomial-time
probabilistic Turing machine M decides A with two-sided error ε: there
exist Q, M, an exponent k, and a runtime bound t' such that M runs in
time t', t' = O(nᵏ), and M.decidesWithError A ε t' holds. The class BPP
itself corresponds to ε = 1/3.
Instances For
Monotonicity of decidesWithError: if a PTM M decides A with error at
most ε₁ and ε₁ ≤ ε₂, then it also decides A with error at most ε₂.
One-step majority vote for BPP. If A ∈ BPP with error ε ∈ (0, 1/2),
then running the original PTM three independent times and taking the majority
yields a new BPP machine with error at most ε² (3 - 2ε) < ε. This is the
inductive step of the Amplification Lemma.
Iterating majority vote: if A ∈ BPP with initial error ε₁ ∈ (0, 1/2),
then for every n there is a BPP machine deciding A with error
iterError ε₁ n.
Convergence of the iterated error to zero: for any target ε₂ > 0 there
exists some iteration count n with iterError ε₁ n ≤ ε₂. The proof bounds
iterError ε₁ n ≤ ε₁ · rⁿ for r = ε₁(3 - 2ε₁) < 1 and uses that geometric
sequences with ratio < 1 shrink below any positive threshold.
Amplification Lemma for BPP (Sipser, Lecture 23). If M₁ is a
polynomial-time PTM deciding A with error ε₁ < 1/2, then for any
0 < ε₂ < 1/2 there is an equivalent polynomial-time PTM M₂ deciding A
with error ε₂. The proof iterates one_step_majority_vote until the error
drops below ε₂.
Strong Amplification Lemma for BPP. Starting from a PTM with error
ε₁ < 1/2, one can produce a polynomial-time PTM whose two-sided error is at
most 2^(-p(n)) for any prescribed polynomial-time-computable polynomial p.
This is the ε₂ < 2^(-poly(n)) strengthening from Sipser's Lecture 23.
A node of a branching program with m input variables and N total nodes.
A node is either a query on variable var : Fin m with two successors zero, one : Fin N (followed depending on whether the bit is 0 or 1), or an
output leaf carrying a Boolean answer.
- query {m N : ℕ} (var : Fin m) (zero one : Fin N) : BPNode m N
- output {m N : ℕ} (val : Bool) : BPNode m N
Instances For
Evaluate a branching program bp on a Boolean assignment. Execution
starts at node 0 and follows query edges according to the assignment; the
recursion is bounded by bp.numNodes units of fuel via the inner go.
Instances For
Instances For
A branching program is read-once if, along any computation path, each
input variable is queried at most once. Formally: for every list of nodes
path along which the program might step, any two indices i, j whose nodes
both query the same variable v must coincide.
Instances For
A description of a pair (B₁, B₂) of read-once branching programs on the
same number of variables, together with proofs that each is read-once. This is
the mathematical object whose equivalence problem is EQ_ROBP.
- numVars : ℕ
- B₁ : BranchingProgram self.numVars
- B₂ : BranchingProgram self.numVars
- B₁_readOnce : self.B₁.isReadOnce
- B₂_readOnce : self.B₂.isReadOnce
Instances For
The semantic equivalence relation on ROBPPairDesc: d.B₁ ≡ d.B₂ as
Boolean functions.
Instances For
A faithful encoding of ROBPPairDesc as strings over alphabet Γ, used
to turn the abstract equivalence problem into a language EQ_ROBP ⊆ List Γ.
- encode : ROBPPairDesc → List Γ
- decode : List Γ → Option ROBPPairDesc
- encode_injective : Function.Injective self.encode
Instances For
The language of equivalent read-once branching programs:
EQ_ROBP = {⟨B₁, B₂⟩ ∣ B₁ ≡ B₂ as ROBPs},
with the pair encoded as a string over Γ using enc. Membership in BPP is
proved in EQ_ROBP_in_BPP.
Instances For
Number of random bits used by the EQ_ROBP BPP decider on inputs of
length n: a polynomial budget of n² + 1 bits, enough to sample a random
field element per variable.
Instances For
The random-bit budget eqROBP_numBits n = n² + 1 is polynomial in n,
specifically O(n²).
Soundness bound for the EQ_ROBP randomized decider. On a no-instance
(B₁, B₂) (with B₁ ≢ B₂), the probability that the verifier accepts is at
most 1/3. This is the Schwartz-Zippel-based bound from Sipser Lecture 24:
when the arithmetizations p₁, p₂ (each of total degree ≤ numVars in every
variable) disagree, Pr[p₁(r) = p₂(r)] ≤ d·m/q ≤ 1/3 for q ≥ 3·numVars.
Existence of the EQ_ROBP random decider. There is a polynomial-time
RandomDecider for EQ_ROBP with two-sided error ≤ 1/3: it samples a random
point r ∈ (ℤ/q)^m (with q prime, q ≥ 3m) using the input random bits,
arithmetizes both branching programs to multivariate polynomials, and accepts
iff the two polynomials agree at r. Completeness follows because equivalent
ROBPs arithmetize to equal polynomials; soundness uses
eqROBP_soundness_bound.
EQ_ROBP ∈ BPP (Sipser, Lecture 23/24, Read-once Branching Programs).
The equivalence problem for read-once branching programs is in BPP: package
the polynomial-time random decider produced by eqROBP_random_decider into a
PTM via InBPP_of_random_decider.
The arithmetization "edge factor" for variable i and bit b: returns the
multivariate polynomial Xᵢ when b = true and 1 - Xᵢ when b = false.
Evaluated at a Boolean point, this factor is 1 iff xᵢ = b.
Instances For
Simp lemma: edgeFactor R i true = Xᵢ.
Simp lemma: edgeFactor R i false = 1 - Xᵢ.
The monomial associated to a Boolean assignment a : Fin m → Bool:
∏ᵢ edgeFactor R i (a i), i.e. the product ∏ᵢ Xᵢ^{aᵢ} (1 - Xᵢ)^{1 - aᵢ}.
Over a Boolean point x, this is the indicator [x = a].
Instances For
Arithmetization of a Boolean function f : 2^m → 2 as a multilinear
polynomial: sum of pathMonomial R a over all assignments a with f a = true. On Boolean inputs this evaluates to 1 iff f a = true.
Instances For
Arithmetization of a branching program bp: the multivariate polynomial
representing the Boolean function bp.eval. Two equivalent ROBPs arithmetize
to equal polynomials, which is the algebraic core of the EQ_ROBP ∈ BPP
proof.
Instances For
The degree of any single variable Xⱼ in the monomial Xᵢ is at most 1
(it is 1 when i = j and 0 otherwise).
Every variable appears with degree at most 1 in the edge factor
edgeFactor R i b (which is Xᵢ or 1 - Xᵢ).
Each path monomial is multilinear: every variable j appears with degree
at most 1 in pathMonomial R a.
The arithmetization of any branching program is multilinear: each variable
appears with degree at most 1 in arithmetize R bp. This is the degree
bound that feeds into Schwartz-Zippel for the EQ_ROBP soundness argument.