Documentation

CslibFrontier.Computability.PCP.Encoded.Amplification.Iteration

Iterating executable amplification rounds #

Normalized constraint tables keep the alphabet and representation fixed across rounds. A fixed round multiplies the sum of vertices and edges by a constant and creates well-formed endpoints; every stored constraint has the same bounded table encoding. The existing iteration calculus therefore certifies any efficiently computed schedule of at most logarithmically many complete rounds, charging all intermediate states. The edge count grows by an exact factor each round.

The degree, walk length and killing rate are fixed before the runtime graph, and every round enumerates its finite parameters completely, so the rounds need no completeness hypotheses.

Main definitions #

Main results #

References #

@[irreducible]

Iterate the same normalized round over its fixed answer alphabet. Irreducibility keeps failed certificate search from unfolding the complete loop; clients use its resource and semantic contracts, or unfold the definition explicitly when reasoning about the program.

theorem Cslib.PCP.Encoded.Graph.length_edges_amplifyIter {D : Type} [FinEnum D] (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (rotate : ℕ × ℕ × D → ℕ × D) (T q : ℕ) [NeZero q] (k : ℕ) (g : Graph (SelectedAlphabet → SelectedAlphabet → Bool)) :

Each round multiplies the number of edges by the same factor, including for empty graphs.

theorem Cslib.PCP.Encoded.Graph.isPolyTime_amplifyIter {D : Type} [FinEnum D] {Input : Type} {input : Input ↪ List Bool} {graph : Input → Graph (SelectedAlphabet → SelectedAlphabet → Bool)} {rounds : Input → ℕ} {labelEncoding : D ↪ List Bool} (hgraph : Turing.MultiTapeTM.ComputableInPolyTime graph input (encoding encConstraintTable)) (hwellFormed : ∀ (x : Input), (graph x).WellFormed) (hrounds : Turing.MultiTapeTM.ComputableInPolyTime rounds input Turing.MultiTapeTM.encUnary) (hrounds_le : ∀ (x : Input), rounds x ≤ Nat.clog 2 (graph x).edges.length) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (hcost : Turing.MultiTapeTM.ComputableInPolyTime rotate (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary labelEncoding)) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary labelEncoding)) (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (T q : ℕ) [NeZero q] :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : Input) => amplifyIter fallback rotate T q (rounds x) (graph x)) input (encoding encConstraintTable)

A polynomial-time schedule of at most ⌈log₂ |E|⌉ normalized rounds has polynomial cost in the original input encoding. Well-formed endpoints and the full table bound supply the loop's size invariant.

theorem Cslib.PCP.Encoded.Graph.isPolyTime_amplifyIter_clog {D : Type} [FinEnum D] {Input : Type} {input : Input ↪ List Bool} {graph : Input → Graph (SelectedAlphabet → SelectedAlphabet → Bool)} {labelEncoding : D ↪ List Bool} (hgraph : Turing.MultiTapeTM.ComputableInPolyTime graph input (encoding encConstraintTable)) (hwellFormed : ∀ (x : Input), (graph x).WellFormed) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (hcost : Turing.MultiTapeTM.ComputableInPolyTime rotate (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary labelEncoding)) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary labelEncoding)) (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (T q : ℕ) [NeZero q] :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : Input) => amplifyIter fallback rotate T q (Nat.clog 2 (graph x).edges.length) (graph x)) input (encoding encConstraintTable)

The full ceiling-log schedule is inferred automatically from the graph certificate.

theorem Cslib.PCP.Encoded.Graph.satisfiable_amplifyIter_iff {D : Type} [FinEnum D] [Nonempty D] (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (T q : ℕ) [NeZero q] (μ : ℝ) (hgap : ∀ (n : ℕ), (family n).spectralExpansion ≤ μ) (hμ : μ < 1) (hT : 1 ≤ T) (hq : 2 ≤ q) (k : ℕ) (g : Graph (SelectedAlphabet → SelectedAlphabet → Bool)) :
((amplifyIter fallback rotate T q k g).toGraph id).Satisfiable ↔ (g.toGraph id).Satisfiable

Every round preserves satisfiability, hence so does their iteration.

theorem Cslib.PCP.Encoded.Graph.min_le_unsatVal_amplifyIter {D : Type} [FinEnum D] [Nonempty D] (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (T q : ℕ) [NeZero q] (μ : ℝ) (hgap : ∀ (n : ℕ), (family n).spectralExpansion ≤ μ) (hμ : μ < 1) (hq : 2 ≤ q) (hT : T = 4 * Fintype.card SelectedAlphabet * (q - 1)) {γ : ℝ} (hγ : 0 ≤ γ) (hgain : 2 ≤ ConstraintGraph.Amplification.gain 840 (Fintype.card SelectedAlphabet) (Fintype.card D) T q μ γ) (k : ℕ) (g : Graph (SelectedAlphabet → SelectedAlphabet → Bool)) :
min (2 ^ k * (g.toGraph id).unsatVal) γ ≤ ((amplifyIter fallback rotate T q k g).toGraph id).unsatVal

The rounds double the value until the fixed threshold is reached.

theorem Cslib.PCP.Encoded.Graph.gap_le_unsatVal_amplifyIter {D : Type} [FinEnum D] [Nonempty D] (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (T q : ℕ) [NeZero q] (μ : ℝ) (hgap : ∀ (n : ℕ), (family n).spectralExpansion ≤ μ) (hμ : μ < 1) (hq : 2 ≤ q) (hT : T = 4 * Fintype.card SelectedAlphabet * (q - 1)) {γ : ℝ} (hγ : 0 ≤ γ) (hγ₁ : γ ≤ 1) (hgain : 2 ≤ ConstraintGraph.Amplification.gain 840 (Fintype.card SelectedAlphabet) (Fintype.card D) T q μ γ) {g : Graph (SelectedAlphabet → SelectedAlphabet → Bool)} (hunsat : ¬(g.toGraph id).Satisfiable) {k : ℕ} (hk : g.edges.length ≤ 2 ^ k) :
γ ≤ ((amplifyIter fallback rotate T q k g).toGraph id).unsatVal

Enough rounds turn every unsatisfiable input into a graph above the fixed gap.

theorem Cslib.PCP.Encoded.Graph.gap_le_unsatVal_amplifyIter_clog {D : Type} [FinEnum D] [Nonempty D] (fallback : SelectedAlphabet → SelectedAlphabet → Bool) (family : (n : ℕ) → RotationMap (Fin n) D) (rotate : ℕ × ℕ × D → ℕ × D) (hrotate : ∀ (n : ℕ) (v : Fin n) (d : D), rotate (n, ↑v, d) = (↑((family n).rot (v, d)).1, ((family n).rot (v, d)).2)) (T q : ℕ) [NeZero q] (μ : ℝ) (hgap : ∀ (n : ℕ), (family n).spectralExpansion ≤ μ) (hμ : μ < 1) (hq : 2 ≤ q) (hT : T = 4 * Fintype.card SelectedAlphabet * (q - 1)) {γ : ℝ} (hγ : 0 ≤ γ) (hγ₁ : γ ≤ 1) (hgain : 2 ≤ ConstraintGraph.Amplification.gain 840 (Fintype.card SelectedAlphabet) (Fintype.card D) T q μ γ) {g : Graph (SelectedAlphabet → SelectedAlphabet → Bool)} (hunsat : ¬(g.toGraph id).Satisfiable) :
γ ≤ ((amplifyIter fallback rotate T q (Nat.clog 2 g.edges.length) g).toGraph id).unsatVal

The logarithmic program has a constant soundness gap on every unsatisfiable input.