The MAX-XOROR Gap-Hardness Hypothesis on
DefinitionPNPMission_HypothesesThe hypothesis stated in the paper's section on the MAX-XOROR Gap-Hardness Hypothesis. It asserts the existence of rational constants with and a polynomial-time computable function red on bit strings such that, for every CNF formula , the string red(encoding of ) is the encoding of an instance of the family , where has clauses, each on three distinct variables, and:
- if is satisfiable, then ;
- if is unsatisfiable, then .
Here and is the maximum number of satisfied clauses. The condition excludes the trivial map to the empty instance.
import Mathlib
import Definitions.Def_PNP_ThmMain_Defs
import Definitions.Def_PNPMission_Complexity
import Definitions.Def_PNPMission_Instances
namespace PNPMission
open PNP.Gadget PNP.Semantics
/-- The MAX-XOROR Gap-Hardness Hypothesis on the family `𝓕` of instances `Ξ(Φ)`: there are rational
constants `0 ≤ n < y ≤ 1` with `n < 0.977 y` and a function `red` on bit strings, computable in
polynomial time, that maps (the encoding of) every CNF formula `φ` to (the encoding of) an
instance `Ξ(Φ)` with `m > 0` clauses in `Φ`, all on three distinct variables, such that the optimum
of `Ξ(Φ)` is at least `y·4m` if `φ` is satisfiable and at most `n·4m` otherwise. -/
def GapHardness : Prop :=
∃ (y n : ℚ), 0 ≤ n ∧ n < y ∧ y ≤ 1 ∧ n < 977 / 1000 * y ∧
∃ red : List Bool → List Bool, PolyTimeComputable red ∧
∀ φ : List (List (ℕ × Bool)),
∃ (m : ℕ) (Φ : Fin m → Clause ℕ) (sg : Fin m → Fin 3 → Bool),
0 < m ∧ (∀ i, Distinct (Φ i)) ∧
red (formulaBits φ) = instanceBits (xiList Φ sg) ∧
(SatCNF φ → ∀ O : ℕ, XiOpt Φ sg O → y * ((4 * m : ℕ) : ℚ) ≤ (O : ℚ)) ∧
(¬ SatCNF φ → ∀ O : ℕ, XiOpt Φ sg O → (O : ℚ) ≤ n * ((4 * m : ℕ) : ℚ))
end PNPMission
Read-back
What the Lean code literally says, in plain math · claude-sonnet-5-5 (independent blind auditor)
GapHardness (a proposition, defined but not asserted). There exist rationals with , , , , and a function on bit strings computed in polynomial time by a Mathlib TM2ComputableInPolyTime machine (identity encodings), such that for every CNF formula (finite list of clauses of literals ; empty clauses and empty formulas allowed) there exist , clauses and signs with:
- and every is a triple of literals on three pairwise different variables;
- ;
- if is satisfiable, every optimum of satisfies ;
- if is unsatisfiable, every optimum satisfies .
The quantifier order is . is the list of clauses made of the blocks ( = with flipped sign), where a clause is satisfied iff , literal having value ; its value under is the number of satisfied clauses and its optimum is the greatest value over all assignments. The encodings write naturals as binary digits (least significant first, each as , terminated by ), a literal as , code of , , a clause as its literals followed by , a formula as the concatenation of clauses; in a variable of is renamed and the fresh variable is renamed .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.