Documentation

CslibFrontier.Computability.Complexity.Classes.TFNP.Subclasses.PotentialLineNormalization

Promised-source normalization for EOPL and SOPL #

Fearnley, Gordon, Mehta and Savani, Definition 9 defines End-of-Potential-Line on {0, 1} ^ n under two syntactic conditions at the distinguished source 0 ^ n:

  1. P (0 ^ n) = 0 ^ n ≠ S (0 ^ n) (LineSourcePromise); and
  2. V (0 ^ n) = 0, with potentials in {0, …, 2 ^ m - 1},

asking for a vertex x of type

without any fallback clause at 0 ^ n for a failed source promise.

In CslibFrontier.Computability.Complexity.Classes.TFNP.Subclasses.PotentialLine, the relations endOfPotentialLineViolationRel and sinkOfPotentialLineViolationRel make (R1) ∨ (R2) total on arbitrary raw families by also accepting 0 ^ n when LineSourcePromise fails, and omit V (0 ^ n) = 0. This module formalizes the uniform polynomial-time (n + 1)-bit normalization to the exact promised convention (PromisedPotentialLine, endOfPotentialLinePromisedRel, and sinkOfPotentialLinePromisedRel):

Canonical Boolean-circuit completeness of End-of-Potential-Line, UEOPL, and CLS are not formalized here.

Main definitions #

Main results #

References #

Promised convention and pure (R1)/(R2) solution relations #

def Cslib.Complexity.PromisedPotentialLine {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) :

Full syntactic source promise of Fearnley et al., Definition 9: P (0 ^ n) = 0 ^ n ≠ S (0 ^ n) (LineSourcePromise) together with V (0 ^ n) = 0.

Instances For
    def Cslib.Complexity.endOfPotentialLinePromisedRel {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (x : List Bool) :

    Exact (R1) ∨ (R2) solution relation of Fearnley et al., Definition 9, without the failed-promise fallback at 0 ^ (n a):

    • (R1) S (P x) ≠ x ≠ 0 ^ (n a) or P (S x) ≠ x; or
    • (R2) x ≠ S x, P (S x) = x, and V (S x) ≤ V x.
    Instances For
      def Cslib.Complexity.sinkOfPotentialLinePromisedRel {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (x : List Bool) :

      Exact sink-only (R1) ∨ (R2) solution relation, dropping both the start-of-line clause S (P x) ≠ x ≠ 0 ^ (n a) and the failed-promise fallback at 0 ^ (n a).

      Instances For
        @[instance_reducible]
        instance Cslib.Complexity.instDecidableLineSourcePromise {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (a : α) :
        @[instance_reducible]
        instance Cslib.Complexity.instDecidablePromisedPotentialLine {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) :
        @[instance_reducible]
        instance Cslib.Complexity.instDecidableEndOfPotentialLinePromisedRel {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (x : List Bool) :
        @[instance_reducible]
        instance Cslib.Complexity.instDecidableSinkOfPotentialLinePromisedRel {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (x : List Bool) :
        theorem Cslib.Complexity.PromisedPotentialLine.lineSourcePromise {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} (h : PromisedPotentialLine n P S V a) :
        theorem Cslib.Complexity.PromisedPotentialLine.potential_zeroVertex {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} (h : PromisedPotentialLine n P S V a) :
        V (a, zeroVertex (n a)) = 0
        theorem Cslib.Complexity.endOfPotentialLinePromisedRel_of_sink {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {x : List Bool} (h : sinkOfPotentialLinePromisedRel n P S V a x) :
        theorem Cslib.Complexity.endOfPotentialLineViolationRel_of_promised {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {x : List Bool} (h : endOfPotentialLinePromisedRel n P S V a x) :
        theorem Cslib.Complexity.sinkOfPotentialLineViolationRel_of_promised {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {x : List Bool} (h : sinkOfPotentialLinePromisedRel n P S V a x) :

        endOfPotentialLineViolationRel is endOfPotentialLinePromisedRel together with the fallback witness 0 ^ (n a) when LineSourcePromise fails.

        sinkOfPotentialLineViolationRel is sinkOfPotentialLinePromisedRel together with the fallback witness 0 ^ (n a) when LineSourcePromise fails.

        Under LineSourcePromise, the totalized violation relation coincides with the pure (R1)/(R2) relation of Fearnley et al., Definition 9.

        Under LineSourcePromise, the totalized sink violation relation coincides with the pure sink-only (R1)/(R2) relation.

        theorem Cslib.Complexity.isTotalSearch_endOfPotentialLinePromisedRel {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} (hprom : ∀ (a : α), LineSourcePromise n P S a) (hP_len : PreservesWidth n P) (hS_len : PreservesWidth n S) :

        Any length-preserving family satisfying LineSourcePromise is total for the pure (R1)/(R2) relation endOfPotentialLinePromisedRel.

        theorem Cslib.Complexity.isTotalSearch_sinkOfPotentialLinePromisedRel {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} (hprom : ∀ (a : α), LineSourcePromise n P S a) (hS_len : PreservesWidth n S) :

        Any successor-length-preserving family satisfying LineSourcePromise is total for the pure sink-only relation sinkOfPotentialLinePromisedRel.

        Uniform (n + 1)-bit promised-source normalization #

        def Cslib.Complexity.normalizedPotentialWidth {α : Type} (n : α → ℕ) (a : α) :

        Padded vertex bit-width n a + 1 of the promised-source normalization.

        def Cslib.Complexity.normalizedPotentialPred {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (p : α × List Bool) :

        Normalized predecessor map on b :: u of length n a + 1: fixes false :: u (in particular 0 ^ (n a + 1)), steps true :: 0 ^ (n a) back to 0 ^ (n a + 1), and follows the pruned predecessor true :: potentialPred n P S V (a, u) on true :: u for u ≠ 0 ^ (n a).

        def Cslib.Complexity.normalizedPotentialSucc {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (p : α × List Bool) :

        Normalized successor map on b :: u of length n a + 1: steps 0 ^ (n a + 1) to true :: 0 ^ (n a), fixes every other false :: u, and follows the pruned successor true :: potentialSucc n P S V (a, u) on {true} × {0, 1} ^ (n a).

        Normalized potential on b :: u: V (a, u) + 1 on {true} × {0, 1} ^ (n a) and 0 on {false} × {0, 1} ^ (n a) (so V' (0 ^ (n a + 1)) = 0 and the source edge 0 ^ (n a + 1) → true :: 0 ^ (n a) strictly increases the potential from 0 to V (0 ^ (n a)) + 1).

        def Cslib.Complexity.normalizedViolationBack {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (p : α × List Bool) :

        Witness back-map from normalized promised solutions w to raw circuit-style violations of (n, P, S, V): projects w.tail and applies potentialLineBack (which returns 0 ^ (n a) when LineSourcePromise n P S a fails).

        @[simp]
        @[simp]
        theorem Cslib.Complexity.normalizedPotentialPred_false {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (u : List Bool) :
        theorem Cslib.Complexity.normalizedPotentialPred_true {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (u : List Bool) :
        theorem Cslib.Complexity.normalizedPotentialPred_true_of_ne {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {u : List Bool} (hu : u ≠ zeroVertex (n a)) :
        @[simp]
        theorem Cslib.Complexity.normalizedPotentialSucc_true {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (u : List Bool) :
        theorem Cslib.Complexity.normalizedPotentialSucc_false {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) (u : List Bool) :
        theorem Cslib.Complexity.normalizedPotentialSucc_false_of_ne {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {u : List Bool} (hu : u ≠ zeroVertex (n a)) :
        @[simp]
        @[simp]
        theorem Cslib.Complexity.normalizedPotential_true {α : Type} (V : α × List Bool → ℕ) (a : α) (u : List Bool) :
        @[simp]
        theorem Cslib.Complexity.normalizedPotentialSucc_false_zeroVertex {α : Type} (n : α → ℕ) (P S : α × List Bool → List Bool) (V : α × List Bool → ℕ) (a : α) :

        The normalized family satisfies LineSourcePromise on every instance a, regardless of whether the original family satisfies LineSourcePromise or has width n a = 0.

        The normalized family satisfies the full syntactic promise PromisedPotentialLine of Fearnley et al., Definition 9 (P' (0 ^ (n + 1)) = 0 ^ (n + 1) ≠ S' (0 ^ (n + 1)) and V' (0 ^ (n + 1)) = 0) on every instance a.

        On the normalized family, endOfPotentialLineViolationRel coincides with the pure (R1)/(R2) relation endOfPotentialLinePromisedRel.

        On the normalized family, sinkOfPotentialLineViolationRel coincides with the pure sink-only relation sinkOfPotentialLinePromisedRel.

        theorem Cslib.Complexity.length_normalizedPotentialPred {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {w : List Bool} (hP : ∀ (u : List Bool), u.length = n a → (P (a, u)).length = n a) (hw : w.length = normalizedPotentialWidth n a) :

        normalizedPotentialPred preserves the vertex bit-length n a + 1.

        theorem Cslib.Complexity.length_normalizedPotentialSucc {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {w : List Bool} (hS : ∀ (u : List Bool), u.length = n a → (S (a, u)).length = n a) (hw : w.length = normalizedPotentialWidth n a) :

        normalizedPotentialSucc preserves the vertex bit-length n a + 1.

        theorem Cslib.Complexity.size_normalizedPotential_le {α : Type} (V : α × List Bool → ℕ) (a : α) (w : List Bool) :

        Binary length growth of normalizedPotential: incrementing V (a, w.tail) adds at most 1 bit to its binary representation.

        theorem Cslib.Complexity.normalizedPotential_lt_succ {α : Type} {n : α → ℕ} {V : α × List Bool → ℕ} {a : α} {w : List Bool} {B : ℕ} (hB : ∀ (u : List Bool), u.length = n a → V (a, u) < B) (hw : w.length = normalizedPotentialWidth n a) :

        If V lies below B on {0, 1} ^ (n a), then normalizedPotential V lies below B + 1 on {0, 1} ^ (n a + 1).

        theorem Cslib.Complexity.normalizedPotential_lt_two_pow_succ {α : Type} {n : α → ℕ} {V : α × List Bool → ℕ} {a : α} {w : List Bool} {m : ℕ} (hm : ∀ (u : List Bool), u.length = n a → V (a, u) < 2 ^ m) (hw : w.length = normalizedPotentialWidth n a) :
        normalizedPotential V (a, w) < 2 ^ (m + 1)

        If V fits in m bits (< 2 ^ m) on {0, 1} ^ (n a), then normalizedPotential V fits in m + 1 bits (< 2 ^ (m + 1)) on {0, 1} ^ (n a + 1).

        Active edges and exact witness bijection #

        No active edge of the normalized family is pruned: potentialPred agrees with normalizedPotentialPred on every non-empty bit string b :: u.

        No active edge of the normalized family is pruned: potentialSucc agrees with normalizedPotentialSucc on every non-empty bit string b :: u.

        Ends of the normalized potential line are precisely true :: u for ends u of (n, P, S, V).

        Sinks of the normalized potential line are precisely true :: u for sinks u of (n, P, S, V).

        Exact (R1)/(R2) solution characterization (EOPL). Pure (R1)/(R2) solutions of the normalized family (with no failed-promise fallback) are precisely the strings true :: u with u an end of (n, P, S, V).

        Exact sink-only (R1)/(R2) solution characterization (SOPL). Pure sink-only (R1)/(R2) solutions of the normalized family are precisely the strings true :: u with u a sink of (n, P, S, V).

        Forward witness embedding (EOPL): every end u of (n, P, S, V) embeds as true :: u.

        Backward witness projection (EOPL): the tail w.tail of any normalized promised solution w is an end of (n, P, S, V).

        Forward witness embedding (SOPL): every sink u of (n, P, S, V) embeds as true :: u.

        Backward witness projection (SOPL): the tail w.tail of any normalized promised sink solution w is a sink of (n, P, S, V).

        theorem Cslib.Complexity.normalizedViolationBack_of_not_promise {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {w : List Bool} (h : ¬LineSourcePromise n P S a) :

        When LineSourcePromise n P S a fails, normalizedViolationBack returns the raw violation witness 0 ^ (n a).

        theorem Cslib.Complexity.normalizedViolationBack_of_promise {α : Type} {n : α → ℕ} {P S : α × List Bool → List Bool} {V : α × List Bool → ℕ} {a : α} {w : List Bool} (h : LineSourcePromise n P S a) :
        normalizedViolationBack n P S V (a, w) = if (hasIn n P S a w.tail && decide (V (a, w.tail) ≤ V (a, P (a, w.tail)))) = true then P (a, w.tail) else w.tail

        Under LineSourcePromise n P S a, normalizedViolationBack steps back to P (a, w.tail) on non-increasing incoming active edges and returns w.tail otherwise.

        Normalized promised solutions map back to raw EOPL violations (handling both promised and failed-promise instances of (n, P, S, V)).

        Normalized promised sink solutions map back to raw SOPL violations (handling both promised and failed-promise instances of (n, P, S, V)).

        The normalized family is total for endOfPotentialLinePromisedRel whenever S preserves length n a (no length hypothesis on P is needed because normalizedPotentialPred uses pruned potentialPred only on active potential-increasing edges).

        Polynomial-time computability and FNP membership #

        Explicit unary bit-width bound for normalizedPotential V: if V is polynomial-time computable in binary, some unary polynomial-time m' (m a + 1) bounds normalizedPotential V (a, w) < 2 ^ m' a on {0, 1} ^ (n a + 1).

        SearchReducible equivalences and EOPL / SOPL characterizations #

        endOfPotentialLineRel search-reduces to the pure (R1)/(R2) relation of its promised-source normalization via w ↦ w.tail.

        The pure (R1)/(R2) relation of the promised-source normalization search-reduces back to endOfPotentialLineRel via u ↦ true :: u.

        sinkOfPotentialLineRel search-reduces to the pure sink-only (R1)/(R2) relation of its promised-source normalization via w ↦ w.tail.

        The pure sink-only (R1)/(R2) relation of the promised-source normalization search-reduces back to sinkOfPotentialLineRel via u ↦ true :: u.

        EOPL under the exact promised convention of Fearnley et al., Definition 9. A search problem R lies in EOPL iff it lies in FNP and search-reduces to the pure (R1)/(R2) relation endOfPotentialLinePromisedRel of a uniform polynomial-time family satisfying PromisedPotentialLine (P (0 ^ n) = 0 ^ n ≠ S (0 ^ n) and V (0 ^ n) = 0) on every instance.