{
  "agent": "CD10",
  "group": "counterexample discovery",
  "gap": "L-meta-16092",
  "strategy": "Adversarial semantics tests using a bit-parallel evaluator differential-tested against the pinned Lean circuit evaluator.",
  "status": "companion-checked",
  "summary": "All handed witness topologies compute the target at wire 14 in Lean. The nine-gate circuits lack a NOT and the padded variants count ten gates. Lean and the independent evaluator agreed on 697,408 output rows and 10,057,664 individual wire values. The closest legal one-edit circuit with a unary NOT differs on two rows. Both Lean companion proofs elaborate. Their official checker exit codes are 0 and 0. The first reduces the unary condition to the presence of a NOT of any legal arity. The second reduces the trailing-marker branch to unrestricted size at most eight. The exact gap remains unresolved in this attempt.",
  "desk": {
    "state": "leased",
    "time": "2026-11-26T08:15:32Z",
    "timeMeaning": "Local file timestamp of the one GET response, truncated to seconds",
    "serverSince": "2026-11-26T03:49:16.355Z",
    "holders": 1,
    "url": "https://pequalnp.com/desk/step?gap=L-meta-16092",
    "calls": 1,
    "method": "GET"
  },
  "statementSha256": "7cc1640866f80728668dd740e9659a3d45d1c6e31636f679571155dfa7684829",
  "statementSource": "https://data.pequalnp.com/data/lemma/L-meta-16092.a529404eadbd.json",
  "upstream": {
    "mainCommits": [
      "2125655de888db55a20bdc5e42347c30ae2fe0ce",
      "a844198383588f0551fa1f6978a2a697a419ed8f"
    ],
    "completeTree": true,
    "gapFileFound": false,
    "mainTreeSource": "https://api.github.com/repos/open-goat/pequalnp-proofs/git/trees/a844198383588f0551fa1f6978a2a697a419ed8f?recursive=1",
    "publicRecordStatus": "conjecture",
    "fullTextCheck": "No match on either observed main commit for the gap identifier, Lean module identifier or lower 32-bit table word."
  },
  "claims": [
    {
      "statement": "(∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0))",
      "kind": "companion",
      "path": "lean/PEqualNP/Outside/L_cd10_not_arity.lean",
      "sha256": "1ec434fc74af083969dd5f3709b639dd8b8d970d2eef033c6d76b05f79eceaa6",
      "elaboration": "pass",
      "guard": "pass",
      "check-lean": {
        "mode": "check",
        "exitCode": 0,
        "verdict": "ACCEPTED (check): PEqualNP.Outside.L_cd10_not_arity; axioms [propext, Quot.sound, Classical.choice]",
        "logSha256": "67dda4771cf281ec8ffb18192cfc85b92bbe70d20a23a1cf25d4b02b0ba70cfa",
        "proofManifest": [
          {
            "module": "PEqualNP.Outside.L_cd10_not_arity",
            "sha256": "1ec434fc74af083969dd5f3709b639dd8b8d970d2eef033c6d76b05f79eceaa6"
          }
        ],
        "definitionsManifestSha256": "ee3fa8dba556a55d53caa6c9d8a82f3da93c0ea8ea8526da388881db89899ee2",
        "stages": [
          "checker stage: started t=0s",
          "checker stage: build lock taken t=0s",
          "checker stage: building the verifier t=0s",
          "checker stage: building the file and the definitions root t=3s",
          "checker stage: verifier reading the built file t=7s"
        ]
      },
      "axioms": "pass",
      "theorem": "PEqualNP.Outside.L_cd10_not_arity",
      "statementSha256": "2ff18657aed95af83567b1633b3e53c84b326dccde3d9dbebb66e1b5286da92e",
      "guardExitCodes": {
        "imports": 0,
        "closure": 0
      },
      "axiomNames": [
        "propext",
        "Classical.choice",
        "Quot.sound"
      ],
      "leancheckerExitCode": 0
    },
    {
      "statement": "(∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      C.size ≤ 8 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ j : Fin C.gates.length, (C.gates.get j).op = PEqualNP.CircuitLowerBounds.GateOp.not ∧\n        (C.gates.get j).inputs.length = 1 ∧ C.output < 6 + j.val) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0))",
      "kind": "companion",
      "path": "lean/PEqualNP/Outside/L_cd10_suffix.lean",
      "sha256": "70a90c2552ebcd2b16cf1eb603f703f4d037d9c0aa4c79bace4533f079d1884d",
      "elaboration": "pass",
      "guard": "pass",
      "check-lean": {
        "mode": "check",
        "exitCode": 0,
        "verdict": "ACCEPTED (check): PEqualNP.Outside.L_cd10_suffix; axioms [propext, Quot.sound, Classical.choice]",
        "logSha256": "45732f516eed533f171372efb71c1237d8e20222b5fb23fe9fce3a90b0199fa4",
        "proofManifest": [
          {
            "module": "PEqualNP.Outside.L_cd10_suffix",
            "sha256": "70a90c2552ebcd2b16cf1eb603f703f4d037d9c0aa4c79bace4533f079d1884d"
          }
        ],
        "definitionsManifestSha256": "ee3fa8dba556a55d53caa6c9d8a82f3da93c0ea8ea8526da388881db89899ee2",
        "stages": [
          "checker stage: started t=0s",
          "checker stage: build lock taken t=0s",
          "checker stage: building the verifier t=0s",
          "checker stage: building the file and the definitions root t=2s",
          "checker stage: verifier reading the built file t=10s"
        ]
      },
      "axioms": "pass",
      "theorem": "PEqualNP.Outside.L_cd10_suffix",
      "statementSha256": "f0c9e2d7f59c0dfcf45754fb4ef364ae69aa81c69eeb4afd1716dd8bcbda773e",
      "guardExitCodes": {
        "imports": 0,
        "closure": 0
      },
      "axiomNames": [
        "propext",
        "Classical.choice",
        "Quot.sound"
      ],
      "leancheckerExitCode": 0
    },
    {
      "statement": "For the delivered corpus, the Python evaluator and Lean agree on the output truth table, all wire truth tables, gate count, fan-in predicate and occurrence of unary NOT. No tested circuit satisfies the complete gap predicate.",
      "kind": "evidence",
      "path": "differential.py",
      "sha256": "647656234fed00d8d3209c3daba0344a7cbaaa26a5e03574850d501659eeb853",
      "elaboration": "not-run",
      "guard": "not-run",
      "check-lean": {
        "mode": null,
        "exitCode": null
      },
      "axioms": "not-run",
      "leanProgram": "Differential.lean",
      "leanProgramSha256": "557e1ccee604312fef5577da32b1ad071ade9b88079ce366c537ed7c4ddf9268",
      "runExitCode": 0
    },
    {
      "statement": "For each r : Fin 64, the sum in the gap on the Boolean input decoded from bit i of r equals r. The Boolean gate-list tests used by the differential harness are equivalent to the pinned FanInTwo and unary marker predicates.",
      "kind": "helper",
      "path": "Differential.lean",
      "sha256": "557e1ccee604312fef5577da32b1ad071ade9b88079ce366c537ed7c4ddf9268",
      "elaboration": "pass",
      "guard": "not-run",
      "check-lean": {
        "mode": null,
        "exitCode": null
      },
      "axioms": "not-run",
      "theorems": [
        "row_index",
        "legal_spec",
        "unary_spec"
      ]
    }
  ],
  "artifacts": [
    {
      "path": "lean/PEqualNP/Outside/L_cd10_not_arity.lean",
      "sha256": "1ec434fc74af083969dd5f3709b639dd8b8d970d2eef033c6d76b05f79eceaa6",
      "content": "import PEqualNP.Defs\n\nopen PEqualNP.CircuitLowerBounds PEqualNP.MetaComplexity\n\nnamespace PEqualNP.Outside.L_cd10_not_arity\n\ndef unary (missing : ℕ) (g : Gate) : Gate :=\n  match g.op with\n  | .not => ⟨.not, [g.inputs.headD missing]⟩\n  | _ => g\n\ndef step (w : List Bool) (g : Gate) : List Bool :=\n  w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]\n\ntheorem step_unary (k : ℕ) (w : List Bool) (g : Gate) (hk : w.length ≤ k) :\n    step w (unary k g) = step w g := by\n  rcases g with ⟨op, xs⟩\n  cases op <;> try rfl\n  cases xs with\n  | nil =>\n    change w ++ [!(w.getD k false)] = w ++ [true]\n    rw [List.getD_eq_default _ _ hk]\n    rfl\n  | cons a xs => rfl\n\ntheorem fold_unary (k : ℕ) (gs : List Gate) (w : List Bool)\n    (hk : w.length + gs.length ≤ k) :\n    (gs.map (unary k)).foldl step w = gs.foldl step w := by\n  induction gs generalizing w with\n  | nil => rfl\n  | cons g gs ih =>\n    rw [List.map_cons, List.foldl_cons, List.foldl_cons, step_unary _ _ _ (by simp at hk; omega)]\n    apply ih\n    simp only [step, List.length_append, List.length_cons, List.length_nil] at *\n    omega\n\ntheorem unary_op (k : ℕ) (g : Gate) : (unary k g).op = g.op := by\n  cases g with\n  | mk op xs => cases op <;> rfl\n\ntheorem unary_fanin (k : ℕ) (g : Gate) (h : g.inputs.length ≤ 2) :\n    (unary k g).inputs.length ≤ 2 := by\n  cases g with\n  | mk op xs => cases op <;> first | exact h | exact (by change 1 ≤ 2; decide)\n\ntheorem unary_marker (k : ℕ) (g : Gate) (h : g.op = GateOp.not) :\n    (unary k g).inputs.length = 1 := by\n  cases g with\n  | mk op xs => cases op <;> simp_all [unary]\n\nend PEqualNP.Outside.L_cd10_not_arity\n\nopen PEqualNP.Outside.L_cd10_not_arity in\ntheorem PEqualNP.Outside.L_cd10_not_arity :\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) := by\n  constructor\n  · rintro ⟨C, hf, ⟨g, hg, hop⟩, hs, he⟩\n    let k := 6 + C.size\n    refine ⟨⟨C.gates.map (unary k), C.output⟩, ?_, ?_, ?_, ?_⟩\n    · intro q hq\n      obtain ⟨p, hp, rfl⟩ := List.mem_map.mp hq\n      exact ⟨by simpa only [unary_op] using (hf p hp).1, unary_fanin k p (hf p hp).2⟩\n    · exact ⟨unary k g, List.mem_map.mpr ⟨g, hg, rfl⟩, (unary_op k g).trans hop, unary_marker k g hop⟩\n    · simpa [Circuit.size] using hs\n    · intro x\n      change ((C.gates.map (unary k)).foldl step (List.ofFn x)).getD C.output false = _\n      rw [fold_unary k C.gates (List.ofFn x) (by simp [k, Circuit.size])]\n      exact he x\n  · rintro ⟨C, hf, ⟨g, hg, hop, _⟩, hs, he⟩\n    exact ⟨C, hf, ⟨g, hg, hop⟩, hs, he⟩\n"
    },
    {
      "path": "L_cd10_not_arity.statement",
      "sha256": "2ff18657aed95af83567b1633b3e53c84b326dccde3d9dbebb66e1b5286da92e",
      "content": "(∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0))"
    },
    {
      "path": "lean/PEqualNP/Outside/L_cd10_suffix.lean",
      "sha256": "70a90c2552ebcd2b16cf1eb603f703f4d037d9c0aa4c79bace4533f079d1884d",
      "content": "import PEqualNP.Defs\n\nopen PEqualNP.CircuitLowerBounds PEqualNP.MetaComplexity\n\nnamespace PEqualNP.Outside.L_cd10_suffix\n\ndef wireStep (w : List Bool) (g : Gate) : List Bool :=\n  w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]\n\ntheorem length_fold (gs : List Gate) (w : List Bool) :\n    (gs.foldl wireStep w).length = w.length + gs.length := by\n  induction gs generalizing w with\n  | nil => simp\n  | cons g gs ih =>\n    rw [List.foldl_cons, ih]\n    simp [wireStep]\n    omega\n\ntheorem read_fold (gs : List Gate) (w : List Bool) (i : ℕ) (hi : i < w.length) :\n    (gs.foldl wireStep w).getD i false = w.getD i false := by\n  induction gs generalizing w with\n  | nil => rfl\n  | cons g gs ih =>\n    rw [List.foldl_cons, ih _ (by simp [wireStep]; omega)]\n    exact List.getD_append _ _ _ _ hi\n\ntheorem read_append (pre post : List Gate) (out : ℕ) (w : List Bool)\n    (h : out < w.length + pre.length) :\n    (Circuit.mk (pre ++ post) out).eval w = (Circuit.mk pre out).eval w := by\n  change ((pre ++ post).foldl wireStep w).getD out false =\n    (pre.foldl wireStep w).getD out false\n  rw [List.foldl_append]\n  exact read_fold post _ out (by rwa [length_fold])\n\ntheorem allTrue :\n    Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n      (∑ i : Fin 6, if (fun _ : Fin 6 => true) i then 2 ^ (i : ℕ) else 0) = true := by\n  decide\n\nend PEqualNP.Outside.L_cd10_suffix\n\nopen PEqualNP.Outside.L_cd10_suffix in\ntheorem PEqualNP.Outside.L_cd10_suffix :\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      C.size ≤ 8 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ j : Fin C.gates.length, (C.gates.get j).op = PEqualNP.CircuitLowerBounds.GateOp.not ∧\n        (C.gates.get j).inputs.length = 1 ∧ C.output < 6 + j.val) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) := by\n  constructor\n  · rintro ⟨C, hf, hs, he⟩\n    have hv : C.output < 6 + C.gates.length := by\n      by_contra! h\n      have e := he (fun _ => true)\n      change (C.gates.foldl wireStep (List.ofFn (fun _ : Fin 6 => true))).getD C.output false = _ at e\n      rw [List.getD_eq_default _ _ (by simpa [length_fold] using h), allTrue] at e\n      contradiction\n    let marker : Gate := ⟨.not, [0]⟩\n    let D : Circuit := ⟨C.gates ++ [marker], C.output⟩\n    refine ⟨D, ?_, ?_, ?_, ?_⟩\n    · intro g hg\n      simp only [D, List.mem_append, List.mem_singleton] at hg\n      rcases hg with hg | rfl\n      · exact hf g hg\n      · simp [marker]\n    · refine ⟨⟨C.gates.length, by simp [D]⟩, ?_, ?_, hv⟩\n      all_goals\n        have hlast : (C.gates ++ [marker])[C.gates.length] = marker := by simp\n        simp [D, List.get_eq_getElem, hlast, marker]\n    · simpa [D, Circuit.size] using Nat.add_le_add_right hs 1\n    · intro x\n      exact (read_append C.gates [marker] C.output _ (by simpa using hv)).trans (he x)\n  · rintro ⟨C, hf, ⟨j, _, _, hj⟩, hs, he⟩\n    let pre := C.gates.take j.val\n    let post := C.gates.drop j.val\n    have hjl : j.val < C.gates.length := j.isLt\n    have hl : pre.length = j.val := by simp [pre]\n    have hsplit : pre ++ post = C.gates := List.take_append_drop _ _\n    refine ⟨⟨pre, C.output⟩, ?_, ?_, ?_⟩\n    · intro g hg\n      exact hf g ((List.take_subset _ _) hg)\n    · change pre.length ≤ 8\n      rw [hl]\n      change C.gates.length ≤ 9 at hs\n      omega\n    · intro x\n      have e := read_append pre post C.output (List.ofFn x) (by simpa [hl] using hj)\n      rw [hsplit] at e\n      exact e.symm.trans (he x)\n"
    },
    {
      "path": "L_cd10_suffix.statement",
      "sha256": "f0c9e2d7f59c0dfcf45754fb4ef364ae69aa81c69eeb4afd1716dd8bcbda773e",
      "content": "(∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      C.size ≤ 8 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ↔\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ j : Fin C.gates.length, (C.gates.get j).op = PEqualNP.CircuitLowerBounds.GateOp.not ∧\n        (C.gates.get j).inputs.length = 1 ∧ C.output < 6 + j.val) ∧\n      C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0))"
    },
    {
      "path": "target.statement",
      "sha256": "7cc1640866f80728668dd740e9659a3d45d1c6e31636f679571155dfa7684829",
      "content": "∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧ (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧ C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) = Nat.testBit (3937069192 * 2 ^ 32 + 3901227008) (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)"
    },
    {
      "path": "Differential.lean",
      "sha256": "557e1ccee604312fef5577da32b1ad071ade9b88079ce366c537ed7c4ddf9268",
      "content": "import PEqualNP.Defs\nimport Lean\n\nopen PEqualNP.CircuitLowerBounds\nopen PEqualNP.MetaComplexity\n\n-- The decidable predicates are written pointwise using the pinned gate types.\ndef legal (g : Gate) : Bool :=\n  (match g.op with\n    | .and | .or | .not => true\n    | _ => false) && decide (g.inputs.length ≤ 2)\n\ndef unaryNot (g : Gate) : Bool :=\n  match g.op with\n  | .not => decide (g.inputs.length = 1)\n  | _ => false\n\nset_option linter.unnecessarySimpa false in\ntheorem legal_spec (C : Circuit) :\n    C.gates.all legal = true ↔ FanInTwo C := by\n  simp only [List.all_eq_true, FanInTwo]\n  constructor <;> intro h g hg <;> specialize h g hg <;>\n    cases g with\n    | mk op inputs => cases op <;> simpa [legal] using h\n\nset_option linter.unnecessarySimpa false in\ntheorem unary_spec (C : Circuit) :\n    C.gates.any unaryNot = true ↔\n      ∃ g ∈ C.gates, g.op = GateOp.not ∧ g.inputs.length = 1 := by\n  simp only [List.any_eq_true]\n  constructor <;> rintro ⟨⟨op, inputs⟩, hg, hh⟩ <;>\n    exact ⟨⟨op, inputs⟩, hg, by cases op <;> simpa [unaryNot] using hh⟩\n\ndef row (n : Nat) : Fin 6 → Bool := fun i => n.testBit i.val\n\n-- Checks the input-to-table convention against the sum in the gap.\nset_option maxRecDepth 10000 in\ntheorem row_index : ∀ n : Fin 64, (∑ i : Fin 6, if row n.val i then 2 ^ (i : ℕ) else 0) = n.val := by\n  decide +kernel\n\ndef report (C : Circuit) : IO Unit := do\n  let mut mask := 0\n  let mut wireMasks := List.replicate (6 + C.size) 0\n  for r in List.range 64 do\n    let x := List.ofFn (row r)\n    if C.eval x then mask := mask + 2^r\n    wireMasks := List.zipWith (fun acc v => acc + if v then 2^r else 0) wireMasks (C.wires x)\n  IO.println s!\"[{mask},{C.size},{(C.gates.all legal).toNat},{(C.gates.any unaryNot).toNat},{wireMasks}]\"\n\ndef decodeOp : Nat → GateOp\n  | 0 => .and\n  | 1 => .or\n  | 2 => .not\n  | 3 => .mod 0\n  | 4 => .mod 2\n  | _ => .maj\n\ndef main : IO Unit := do\n  let input ← IO.getStdin\n  repeat\n    let bytes ← input.getLine\n    if bytes.isEmpty then break\n    let decoded : Except String (List (List (Nat × List Nat) × Nat)) :=\n      (Lean.Json.parse bytes).bind Lean.fromJson?\n    let cases ← IO.ofExcept decoded\n    for (gs, out) in cases do\n      report ⟨gs.map (fun (op, wires) => ⟨decodeOp op, wires⟩), out⟩\n"
    },
    {
      "path": "differential.py",
      "sha256": "647656234fed00d8d3209c3daba0344a7cbaaa26a5e03574850d501659eeb853",
      "content": "\"\"\"Run with pinned project environment: python3 differential.py /path/to/lean.\"\"\"\nimport hashlib\nimport json\nfrom pathlib import Path\nimport random\nimport subprocess\nimport sys\n\nLA09 = (('and',(2,3)), ('and',(1,6)), ('or',(0,7)), ('or',(4,5)),\n        ('or',(1,6)), ('and',(4,5)), ('or',(10,11)), ('and',(8,9)), ('and',(13,12)))\nMP09 = (('and',(2,3)), ('or',(4,5)), ('and',(4,5)), ('or',(1,6)),\n        ('and',(1,6)), ('or',(9,8)), ('or',(0,10)), ('and',(7,11)), ('and',(12,13)))\nCD09 = (('and',(4,5)), ('or',(4,5)), ('and',(2,3)), ('or',(1,0)),\n        ('or',(1,6)), ('and',(7,9)), ('and',(0,10)), ('or',(8,12)), ('and',(11,13)))\nMARKER = ('not',(0,))\nTARGET = (3937069192 << 32) + 3901227008\nOPS = ('and', 'or', 'not', 'mod 0', 'mod 2', 'maj')\nFULL = (1 << 64) - 1\nINPUTS = tuple(sum(((r >> i) & 1) << r for r in range(64)) for i in range(6))\n\ndef wire_masks(gates):\n    wires = list(INPUTS)\n    for op, indices in gates:\n        values = [wires[i] if i < len(wires) else 0 for i in indices]\n        if op == 'and':\n            value = FULL\n            for x in values:\n                value &= x\n        elif op == 'or':\n            value = 0\n            for x in values:\n                value |= x\n        elif op == 'not':\n            value = FULL ^ (values[0] if values else 0)\n        else:\n            value = 0\n            for row in range(64):\n                count = sum((x >> row) & 1 for x in values)\n                accepted = {'mod 0': count == 0, 'mod 2': count % 2 == 0,\n                            'maj': 2 * count >= len(values)}[op]\n                value |= int(accepted) << row\n        wires.append(value)\n    return wires\n\ndef truth(gates, out):\n    wires = wire_masks(gates)\n    return wires[out] if out < len(wires) else 0\n\ndef signature(case):\n    gates, out = case\n    wires = wire_masks(gates)\n    return [wires[out] if out < len(wires) else 0, len(gates),\n            int(all(op in OPS[:3] and len(xs) <= 2 for op, xs in gates)),\n            int(any(op == 'not' and len(xs) == 1 for op, xs in gates)), wires]\n\ndef deleted(gates, out, j, substitute):\n    # A missing wire remains missing. Renumber current/future references too.\n    def shift(i):\n        return substitute if i == j + 6 else i - int(i > j + 6)\n    return (tuple((op, tuple(map(shift, xs))) for k, (op, xs) in enumerate(gates) if k != j),\n            shift(out))\n\ndef run(lean):\n    rng = random.Random(16092)\n    named = {\n        'LA09 via CD09': (LA09, 14), 'CD09/CT09 padded': (LA09 + (MARKER,), 14),\n        'CD09 enumerator hit': (CD09, 14), 'CD09 enumerator hit padded': (CD09 + (MARKER,), 14),\n        'MP09 upper': (MP09 + (MARKER,), 14), 'MP09 without padding': (MP09, 14),\n        'padding accidentally selected as output': (LA09 + (MARKER,), 15),\n        'missing output': (LA09, 15), 'append creates formerly missing output': ((('not', (6,)),), 6),\n        'input output': (LA09, 0),\n        'unused NOT before output': ((('not',(0,)), ('and',(1,2))), 7), 'forward reference': ((('not',(7,)), ('or',(0,1))), 6),\n        'two-input NOT whose first wire is missing': ((('not',(6,0)),), 6),\n        'two-input NOT whose second wire is missing': ((('not',(0,6)),), 6),\n        'empty AND': ((('and',()),), 6), 'empty OR': ((('or',()),), 6),\n        'empty NOT': ((('not',()),), 6),\n    }\n    one_edit = set()\n    for gates in (LA09, MP09, CD09):\n        gates += (MARKER,)\n        # Delete any gate and substitute any surviving input or earlier wire,\n        # or a large index missing at every original fanout.\n        for j in range(len(gates)):\n            for sub in (*range(6+j), 10**30):\n                pruned, _ = deleted(gates, 14, j, sub)\n                for out in range(16):\n                    one_edit.add((pruned, out))\n        # Replace one gate of the unpadded circuit by a unary NOT.\n        base = gates[:-1]\n        for j in range(len(base)):\n            for wire in range(7+j):\n                updated = base[:j] + (('not',(wire,)),) + base[j+1:]\n                for out in range(16):\n                    one_edit.add((updated, out))\n    fuzz = []\n    for _ in range(1024):\n        n = rng.randrange(13)\n        gates = []\n        basis = OPS[:3] if rng.randrange(2) else OPS\n        for j in range(n):\n            wires = list(range(8+j)) + [10**30]\n            gates.append((rng.choice(basis), tuple(rng.choice(wires) for _ in range(rng.choice((0,1,2,2,3))))))\n        fuzz.append((tuple(gates), rng.choice((*range(8+n), 10**30))))\n    edited = sorted(one_edit)\n    cases = list(named.values()) + fuzz + edited\n    # Probe the normalization proved in the companion.\n    repaired = [(tuple((op, (xs[0] if xs else 6+len(gs),)) if op == 'not'\n                       else (op, xs) for op, xs in gs), out) for gs, out in fuzz]\n    assert all(truth(*a) == truth(*b) for a, b in zip(fuzz, repaired))\n    cases += repaired\n    expected = [signature(case) for case in cases]\n    hits = [i for i, (mask, size, legal, unary, _) in enumerate(expected)\n            if mask == TARGET and size <= 9 and legal and unary]\n    harness = Path(__file__).with_name('Differential.lean')\n    payload = '\\n'.join(json.dumps([[[[OPS.index(op), xs] for op, xs in gs], out]\n                                     for gs, out in cases[start:start+128]])\n                        for start in range(0, len(cases), 128))\n    raw = subprocess.run([lean, '--run', str(harness)], input=payload+'\\n', check=True,\n                         encoding='utf-8', stdout=subprocess.PIPE)\n    actual = [json.loads(line) for line in raw.stdout.splitlines()]\n    assert len(actual) == len(expected)\n    for i, (left, right) in enumerate(zip(actual, expected)):\n        assert left == right, (i, cases[i], left, right)\n    qualified = [case for case in edited if signature(case)[2:4] == [1, 1]]\n    distance = lambda case: (truth(*case) ^ TARGET).bit_count()\n    closest = min(qualified, key=distance)\n    differing = truth(*closest) ^ TARGET\n    print(json.dumps({'named': dict(zip(named, (item[:4] for item in expected))), 'target': TARGET,\n                      'exactHits': hits, 'fuzz': len(fuzz), 'arityRepaired': len(repaired), 'oneEdit': len(edited),\n                      'totalRows': len(cases) * 64, 'wireRowChecks': 64 * sum(len(item[4]) for item in expected), 'mismatches': 0,\n                      'reversedInputMismatchRows': [i for i in range(64)\n                          if (TARGET >> i ^ TARGET >> int(f'{i:06b}'[::-1], 2)) & 1],\n                      'qualifiedEdits': len(qualified),\n                      'closestEdit': {'gates': closest[0], 'output': closest[1],\n                                      'differentRows': [i for i in range(64) if (differing >> i) & 1],\n                                      'mask': truth(*closest)},\n                      'leanOutputSha256': hashlib.sha256(raw.stdout.encode()).hexdigest()}))\n\nif __name__ == '__main__':\n    run(sys.argv[1])\n"
    },
    {
      "path": "Axioms.lean",
      "sha256": "5a1847508b6fbc5182979508aaa5d5f51116fdfdc379366ca13f5fbdcf15ad25",
      "content": "import PEqualNP.Outside.L_cd10_not_arity\nimport PEqualNP.Outside.L_cd10_suffix\n\n#print axioms PEqualNP.Outside.L_cd10_not_arity\n#print axioms PEqualNP.Outside.L_cd10_suffix\n"
    },
    {
      "path": "prepare.py",
      "sha256": "2cbd66de4188f4b269b03654ae4718c53178dadd2c15f586cb3f2f6a8ee3d9fc",
      "content": "from concurrent.futures import ThreadPoolExecutor\nfrom pathlib import Path\nimport json\nimport subprocess\n\nroot = Path('repo/lean')\ndef check(package):\n    directory = root / '.lake' / 'packages' / package['name']\n    def git(*args):\n        return subprocess.check_output(['git', '-c', 'credential.helper=', '-C', str(directory), *args], text=True).strip()\n    git('init', '-q')\n    git('remote', 'add', 'origin', package['url'])\n    git('fetch', '--quiet', '--depth=1', '--no-tags', 'origin', package['rev'])\n    git('reset', '--quiet', '--mixed', 'FETCH_HEAD')\n    assert git('rev-parse', 'HEAD') == package['rev']\n    git('diff', '--exit-code', 'HEAD', '--')\n    print(package['name'], package['rev'], flush=True)\n\nwith ThreadPoolExecutor(4) as pool:\n    list(pool.map(check, json.loads((root/'lake-manifest.json').read_text())['packages']))\n"
    },
    {
      "path": "handed/mp09/L_mp09_upper.lean",
      "sha256": "e60c466f28e059bb74d473e69eb3109270b4c8351e95cd06c7e60b82143fa494",
      "content": "import PEqualNP.Defs\n\nnamespace PEqualNP.Outside.L_mp09_upper\n\nset_option maxRecDepth 10000 in\ntheorem factorization : ∀ x : Fin 6 → Bool,\n    let c := x 2 && x 3\n    ((x 4 || x 5) && (x 0 || (x 1 && c)) && ((x 1 || c) || (x 4 && x 5))) =\n      Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n        (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0) := by\n  decide +kernel\n\nset_option maxRecDepth 10000 in\ntheorem noPairCompression (enc : Bool → Bool → Bool)\n    (read : Bool → Bool → Bool → Bool → Bool → Bool) :\n    ¬ ∀ x : Fin 6 → Bool,\n      read (x 0) (x 1) (x 2) (x 3) (enc (x 4) (x 5)) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0) := by\n  intro h\n  have h00 := h ![true, true, false, false, false, false]\n  have h01 := h ![true, true, false, false, false, true]\n  have h11 := h ![true, true, false, false, true, true]\n  have h01' := h ![true, false, false, false, false, true]\n  have h11' := h ![true, false, false, false, true, true]\n  rw [← factorization] at h00 h01 h11 h01' h11'\n  change read true true false false (enc false false) = false at h00\n  change read true true false false (enc false true) = true at h01\n  change read true true false false (enc true true) = true at h11\n  change read true false false false (enc false true) = false at h01'\n  change read true false false false (enc true true) = true at h11'\n  have sep1 : enc false false ≠ enc false true := by\n    intro eq\n    rw [eq] at h00\n    exact Bool.false_ne_true (h00.symm.trans h01)\n  have sep2 : enc false false ≠ enc true true := by\n    intro eq\n    rw [eq] at h00\n    exact Bool.false_ne_true (h00.symm.trans h11)\n  have sep3 : enc false true ≠ enc true true := by\n    intro eq\n    rw [eq] at h01'\n    exact Bool.false_ne_true (h01'.symm.trans h11')\n  cases e00 : enc false false <;> cases e01 : enc false true <;>\n    cases e11 : enc true true <;> simp_all\n\nend PEqualNP.Outside.L_mp09_upper\n\nset_option maxRecDepth 10000 in\ntheorem PEqualNP.Outside.L_mp09_upper : ∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧ (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧ C.size ≤ 10 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) = Nat.testBit (3937069192 * 2 ^ 32 + 3901227008) (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0) := by\n  refine ⟨⟨[\n    ⟨.and, [2, 3]⟩,\n    ⟨.or, [4, 5]⟩,\n    ⟨.and, [4, 5]⟩,\n    ⟨.or, [1, 6]⟩,\n    ⟨.and, [1, 6]⟩,\n    ⟨.or, [9, 8]⟩,\n    ⟨.or, [0, 10]⟩,\n    ⟨.and, [7, 11]⟩,\n    ⟨.and, [12, 13]⟩,\n    ⟨.not, [0]⟩\n  ], 14⟩, ?_, ?_, by decide, ?_⟩\n  · simp [PEqualNP.MetaComplexity.FanInTwo]\n  · exact ⟨⟨.not, [0]⟩, by simp, rfl, rfl⟩\n  · decide +kernel\n"
    },
    {
      "path": "handed/ct09/L_meta_16092_padding.lean",
      "sha256": "bb8ddcd48090917ecafb7a57fd4a91c2a8bdba59b4f3552b67efb2c921ea43aa",
      "content": "import Mathlib\nimport PEqualNP.Defs\n\nnamespace PEqualNP.Outside.L_meta_16092_padding\n\nopen PEqualNP.CircuitLowerBounds\n\ndef withNot (C : Circuit) : Circuit :=\n  ⟨C.gates ++ [⟨.not, [0]⟩], C.output⟩\n\ntheorem wireLength (gs : List Gate) (x : List Bool) :\n    (gs.foldl (fun w g => w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)])\n      x).length = x.length + gs.length := by\n  induction gs generalizing x with\n  | nil => simp\n  | cons g gs ih =>\n    rw [List.foldl_cons, ih]\n    simp only [List.length_append, List.length_cons, List.length_nil]\n    omega\n\ntheorem sameEval (C : Circuit) (x : List Bool)\n    (h : C.output < x.length + C.size) :\n    (withNot C).eval x = C.eval x := by\n  have hl : C.output < (C.wires x).length := by\n    have hw : (C.wires x).length = x.length + C.size := wireLength C.gates x\n    rw [hw]\n    exact h\n  simp only [Circuit.eval, withNot, Circuit.wires, List.foldl_append,\n             List.foldl_cons, List.foldl_nil]\n  exact List.getD_append _ _ _ _ hl\n\nend PEqualNP.Outside.L_meta_16092_padding\n\ntheorem PEqualNP.Outside.L_meta_16092_padding :\n    (∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧ C.size ≤ 8 ∧\n      ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) →\n    ∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧\n        g.inputs.length = 1) ∧ C.size ≤ 9 ∧\n      ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0) := by\n  intro ⟨C, hf, hs, he⟩\n  have hv : C.output < 6 + C.size := by\n    by_contra hn\n    have he' := he (fun _ => true)\n    have ht : Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n        (∑ i : Fin 6, if (fun _ : Fin 6 => true) i then 2 ^ (i : ℕ) else 0) = true := by\n      decide\n    have hl : (C.wires (List.ofFn (fun _ : Fin 6 => true))).length ≤ C.output := by\n      simp only [PEqualNP.CircuitLowerBounds.Circuit.wires,\n        PEqualNP.Outside.L_meta_16092_padding.wireLength, List.length_ofFn]\n      exact Nat.le_of_not_gt hn\n    rw [PEqualNP.CircuitLowerBounds.Circuit.eval, List.getD_eq_default _ _ hl, ht] at he'\n    contradiction\n  refine ⟨PEqualNP.Outside.L_meta_16092_padding.withNot C, ?_, ?_, ?_, ?_⟩\n  · intro g hg\n    simp only [PEqualNP.Outside.L_meta_16092_padding.withNot,\n      List.mem_append, List.mem_singleton] at hg\n    rcases hg with hg | rfl\n    · exact hf g hg\n    · simp\n  · exact ⟨⟨.not, [0]⟩, by simp [PEqualNP.Outside.L_meta_16092_padding.withNot],\n      rfl, rfl⟩\n  · simpa [PEqualNP.Outside.L_meta_16092_padding.withNot,\n      PEqualNP.CircuitLowerBounds.Circuit.size] using Nat.add_le_add_right hs 1\n  · intro x\n    rw [PEqualNP.Outside.L_meta_16092_padding.sameEval C (List.ofFn x)]\n    · exact he x\n    · simpa using hv\n"
    },
    {
      "path": "handed/ct09/L_meta_16092_ten.lean",
      "sha256": "6196dcc23da547a3033c23421bd697e6a4eadf2c5d029bdb42dc8308e25d2253",
      "content": "import Mathlib\nimport PEqualNP.Defs\n\nset_option maxRecDepth 10000 in\ntheorem PEqualNP.Outside.L_meta_16092_ten :\n    ∃ C : PEqualNP.CircuitLowerBounds.Circuit,\n      PEqualNP.MetaComplexity.FanInTwo C ∧\n      (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧\n        g.inputs.length = 1) ∧ C.size ≤ 10 ∧\n      ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) =\n        Nat.testBit (3937069192 * 2 ^ 32 + 3901227008)\n          (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0) := by\n  refine ⟨⟨[\n    ⟨.and, [2, 3]⟩,\n    ⟨.and, [1, 6]⟩,\n    ⟨.or, [0, 7]⟩,\n    ⟨.or, [4, 5]⟩,\n    ⟨.or, [1, 6]⟩,\n    ⟨.and, [4, 5]⟩,\n    ⟨.or, [10, 11]⟩,\n    ⟨.and, [8, 9]⟩,\n    ⟨.and, [13, 12]⟩,\n    ⟨.not, [0]⟩\n  ], 14⟩, ?_, ?_, by decide, ?_⟩\n  · simp [PEqualNP.MetaComplexity.FanInTwo]\n  · simp\n  · decide +kernel\n"
    },
    {
      "path": "handed/cd09/L_cd09_upper.lean",
      "sha256": "09a8b79237b67bb743790e46d130e8417d5dbaf4e2ee784456ff0d4f5eb5c19a",
      "content": "import PEqualNP.Defs\n\nopen PEqualNP.CircuitLowerBounds\n\nnamespace PEqualNP.Outside.L_cd09_upper\n\ndef la09 : List Gate :=\n  [⟨.and, [2, 3]⟩, ⟨.and, [1, 6]⟩, ⟨.or, [0, 7]⟩,\n   ⟨.or, [4, 5]⟩, ⟨.or, [1, 6]⟩, ⟨.and, [4, 5]⟩,\n   ⟨.or, [10, 11]⟩, ⟨.and, [8, 9]⟩, ⟨.and, [13, 12]⟩]\n\nend PEqualNP.Outside.L_cd09_upper\n\nopen PEqualNP.Outside.L_cd09_upper in\nset_option maxRecDepth 10000 in\ntheorem PEqualNP.Outside.L_cd09_upper :\n  (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 9 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) = Nat.testBit (3937069192 * 2 ^ 32 + 3901227008) (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) ∧\n  (∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.FanInTwo C ∧ (∃ g ∈ C.gates, g.op = PEqualNP.CircuitLowerBounds.GateOp.not ∧ g.inputs.length = 1) ∧ C.size ≤ 10 ∧ ∀ x : Fin 6 → Bool, C.eval (List.ofFn x) = Nat.testBit (3937069192 * 2 ^ 32 + 3901227008) (∑ i : Fin 6, if x i then 2 ^ (i : ℕ) else 0)) := by\n  constructor\n  · refine ⟨⟨la09, 14⟩, ?_, by decide, ?_⟩\n    · simp [PEqualNP.MetaComplexity.Monotone2, la09]\n    · decide +kernel\n  · refine ⟨⟨la09 ++ [⟨.not, [0]⟩], 14⟩, ?_, ?_, by decide, ?_⟩\n    · simp [PEqualNP.MetaComplexity.FanInTwo, la09]\n    · exact ⟨⟨.not, [0]⟩, by simp, rfl, rfl⟩\n    · decide +kernel\n"
    }
  ],
  "experiments": [
    {
      "range": "All 64 rows per witness and each of 17 named cases, 1024 seeded random circuits and their 1024 arity repairs, and 8832 unique one-edit circuits.",
      "outcome": {
        "named": {
          "LA09 via CD09": [
            "0xeaaae888e8880000",
            9,
            1,
            0
          ],
          "CD09/CT09 padded": [
            "0xeaaae888e8880000",
            10,
            1,
            1
          ],
          "CD09 enumerator hit": [
            "0xeaaae888e8880000",
            9,
            1,
            0
          ],
          "CD09 enumerator hit padded": [
            "0xeaaae888e8880000",
            10,
            1,
            1
          ],
          "MP09 upper": [
            "0xeaaae888e8880000",
            10,
            1,
            1
          ],
          "MP09 without padding": [
            "0xeaaae888e8880000",
            9,
            1,
            0
          ],
          "padding accidentally selected as output": [
            "0x5555555555555555",
            10,
            1,
            1
          ],
          "missing output": [
            "0x0000000000000000",
            9,
            1,
            0
          ],
          "append creates formerly missing output": [
            "0xffffffffffffffff",
            1,
            1,
            1
          ],
          "input output": [
            "0xaaaaaaaaaaaaaaaa",
            9,
            1,
            0
          ],
          "unused NOT before output": [
            "0xc0c0c0c0c0c0c0c0",
            2,
            1,
            1
          ],
          "forward reference": [
            "0xffffffffffffffff",
            2,
            1,
            1
          ],
          "two-input NOT whose first wire is missing": [
            "0xffffffffffffffff",
            1,
            1,
            0
          ],
          "two-input NOT whose second wire is missing": [
            "0x5555555555555555",
            1,
            1,
            0
          ],
          "empty AND": [
            "0xffffffffffffffff",
            1,
            1,
            0
          ],
          "empty OR": [
            "0x0000000000000000",
            1,
            1,
            0
          ],
          "empty NOT": [
            "0xffffffffffffffff",
            1,
            1,
            0
          ]
        },
        "target": "0xeaaae888e8880000",
        "exactHits": [],
        "fuzz": 1024,
        "arityRepaired": 1024,
        "oneEdit": 8832,
        "totalRows": 697408,
        "wireRowChecks": 10057664,
        "mismatches": 0,
        "reversedInputMismatchRows": [
          19,
          23,
          27,
          50,
          54,
          58
        ],
        "qualifiedEdits": 8784,
        "closestEdit": {
          "gates": [
            [
              "and",
              [
                2,
                3
              ]
            ],
            [
              "and",
              [
                1,
                6
              ]
            ],
            [
              "or",
              [
                0,
                7
              ]
            ],
            [
              "or",
              [
                4,
                5
              ]
            ],
            [
              "and",
              [
                4,
                5
              ]
            ],
            [
              "or",
              [
                1,
                10
              ]
            ],
            [
              "and",
              [
                8,
                9
              ]
            ],
            [
              "and",
              [
                12,
                11
              ]
            ],
            [
              "not",
              [
                0
              ]
            ]
          ],
          "output": 13,
          "differentRows": [
            29,
            45
          ],
          "mask": "0xeaaac888c8880000"
        },
        "leanOutputSha256": "ff55be274263a2f3153f4397eb03cbc65208f08be7194ae1b8cfa3c2f75c45b6"
      },
      "signature": [
        "output mask as a hexadecimal string",
        "gate count",
        "FanInTwo as 0 or 1",
        "some unary NOT as 0 or 1"
      ],
      "targetHex": "0xeaaae888e8880000",
      "seed": 16092,
      "edits": "For each of the three unpadded circuits, replace one gate by unary NOT of any input, previous wire, or its own missing wire. For each padded circuit, delete one gate and redirect its fanouts uniformly to any input, any earlier gate wire, or a permanently missing wire. Renumber surviving wires. Try output indices 0 through 15 in all cases.",
      "fuzzCoverage": "Gate counts span 0 through 12 and arities span 0 through 3. Indices include self, forward, repeated and huge values. Outputs include primary, gate and missing wires. Operations include AND, OR, NOT, MOD 0, MOD 2 and MAJ. Out-of-basis and over-arity cases test the evaluator and are ruled out by the independent Lean-backed FanInTwo predicate.",
      "closestCounterexample": "The closest circuit drops x1 OR (x2 AND x3) and redirects its fanout to x1. It loses rows 29 and 45, where x0, x2 and x3 are true, x1 is false, and exactly one of x4 and x5 is true. Row bits put x0 at the least significant position."
    },
    {
      "range": "Lean proof and checker tests on the two companion statements.",
      "outcome": [
        {
          "theorem": "PEqualNP.Outside.L_cd10_not_arity",
          "check-lean": {
            "mode": "check",
            "exitCode": 0,
            "verdict": "ACCEPTED (check): PEqualNP.Outside.L_cd10_not_arity; axioms [propext, Quot.sound, Classical.choice]",
            "logSha256": "67dda4771cf281ec8ffb18192cfc85b92bbe70d20a23a1cf25d4b02b0ba70cfa",
            "proofManifest": [
              {
                "module": "PEqualNP.Outside.L_cd10_not_arity",
                "sha256": "1ec434fc74af083969dd5f3709b639dd8b8d970d2eef033c6d76b05f79eceaa6"
              }
            ],
            "definitionsManifestSha256": "ee3fa8dba556a55d53caa6c9d8a82f3da93c0ea8ea8526da388881db89899ee2",
            "stages": [
              "checker stage: started t=0s",
              "checker stage: build lock taken t=0s",
              "checker stage: building the verifier t=0s",
              "checker stage: building the file and the definitions root t=3s",
              "checker stage: verifier reading the built file t=7s"
            ]
          },
          "axiomNames": [
            "propext",
            "Classical.choice",
            "Quot.sound"
          ],
          "leancheckerExitCode": 0
        },
        {
          "theorem": "PEqualNP.Outside.L_cd10_suffix",
          "check-lean": {
            "mode": "check",
            "exitCode": 0,
            "verdict": "ACCEPTED (check): PEqualNP.Outside.L_cd10_suffix; axioms [propext, Quot.sound, Classical.choice]",
            "logSha256": "45732f516eed533f171372efb71c1237d8e20222b5fb23fe9fce3a90b0199fa4",
            "proofManifest": [
              {
                "module": "PEqualNP.Outside.L_cd10_suffix",
                "sha256": "70a90c2552ebcd2b16cf1eb603f703f4d037d9c0aa4c79bace4533f079d1884d"
              }
            ],
            "definitionsManifestSha256": "ee3fa8dba556a55d53caa6c9d8a82f3da93c0ea8ea8526da388881db89899ee2",
            "stages": [
              "checker stage: started t=0s",
              "checker stage: build lock taken t=0s",
              "checker stage: building the verifier t=0s",
              "checker stage: building the file and the definitions root t=2s",
              "checker stage: verifier reading the built file t=10s"
            ]
          },
          "axiomNames": [
            "propext",
            "Classical.choice",
            "Quot.sound"
          ],
          "leancheckerExitCode": 0
        }
      ]
    }
  ],
  "semantics": {
    "sources": [
      "https://raw.githubusercontent.com/open-goat/pequalnp-proofs/8dec1cacf8aab169f12858fff3a2e945fea7a880/lean/PEqualNP/Defs/CircuitLowerBounds.lean",
      "https://raw.githubusercontent.com/open-goat/pequalnp-proofs/8dec1cacf8aab169f12858fff3a2e945fea7a880/lean/PEqualNP/Defs/MetaComplexity.lean",
      "https://data.pequalnp.com/data/lemma/L-meta-16092.a529404eadbd.json"
    ],
    "bitOrder": "Row index is the sum of 2^i for true coordinates. Reversing all input bits changes target rows 19, 23, 27, 50, 54 and 58.",
    "wires": "Gate j reads only the currently available list. Self and future reads are false even if a later step eventually creates that wire. Missing output is false after the fold.",
    "gateArity": "Empty AND and NOT are true and empty OR is false. A two-input NOT is legal but reads only its first operand and does not itself satisfy the unary marker.",
    "unusedNot": "A unary NOT may occur before or after an output it does not affect. Every gate counts. Appending a gate may change a formerly missing output if the output points exactly at the new gate.",
    "arityProof": "Map each NOT to one input. Keep its first wire when present and use index 6+C.size when empty. That index lies outside every read prefix. The fold stays identical, the gate count and each op stay the same, and all NOTs become unary.",
    "suffixProof": "For the forward direction, an all-true evaluation rules out a missing output and permits stable NOT padding. For the reverse, take the prefix strictly before a trailing unary NOT. It retains the already existing output and has at most eight gates. A disconnected NOT at or before the output requires a separate cone argument."
  },
  "deadEnds": [
    "Padding a handed circuit exceeds the bound. Selecting the appended NOT as output changes the truth table.",
    "The bounded one-edit search and seeded corpus provide evidence only. Their scope is the stated mutation family and random sample.",
    "CT09 reported DRAT-checked exclusions for reduced encodings and CD09 reported normalized enumeration evidence. Those exclusions remain prior external evidence here. The exact statement remains unresolved in Lean.",
    "The first proof-build iteration exposed a missing-wire simp goal and two suffix proof obligations. They were corrected before the final checks. The first differential output parser saw Lean linter warnings on stdout. Per-theorem linter settings kept stdout in the line protocol and the full corpus was rerun."
  ],
  "handed": [
    {
      "batch": "e4-p5-a",
      "key": "after-mp09",
      "sha256": "7fe1c79d9140759cf59ade5ac31e2c2c68ddc42e711f2a18c9bb87f448b71cf2",
      "used": "Used its alternate gate ordering from the explicit upper witness and verified its padded and unpadded evaluations.",
      "capsule": {
        "batch": "e2-px-capsule",
        "key": "after-p5",
        "sha256": "61f551d37e52b20f7b29c1b66087675de769373463191e9a3ca478d775ea6289",
        "access": "indirect through the handed result"
      }
    },
    {
      "batch": "e4-p5-a",
      "key": "after-ct09",
      "sha256": "427e798d204d079a3d8a275e446dd7a989bf2c3ce30a359ee41a60a3254157d9",
      "used": "Used its concrete ten-gate witness and its append-side condition. Its eight-to-nine implication motivated the forward direction of the trailing-NOT equivalence.",
      "capsule": {
        "batch": "e2-px-capsule",
        "key": "after-p5",
        "sha256": "61f551d37e52b20f7b29c1b66087675de769373463191e9a3ca478d775ea6289",
        "access": "indirect through the handed result"
      }
    },
    {
      "batch": "e4-p5-a",
      "key": "after-cd09",
      "sha256": "38f159342edce0f218d16894db7a31766208b4f1a79950cfefd82e3cf539fcf4",
      "used": "Used the LA09 capsule circuit, the representative normalized enumeration hit, and the public record URL and toolchain hashes.",
      "capsule": {
        "batch": "e2-px-capsule",
        "key": "after-p5",
        "sha256": "61f551d37e52b20f7b29c1b66087675de769373463191e9a3ca478d775ea6289",
        "access": "indirect through the handed result"
      }
    }
  ],
  "forNext": [
    "To refute the target, formalize and verify the unrestricted <=8 exclusion. The suffix equivalence then discharges every case with a unary marker after the output.",
    "Account separately for disconnected or redundant gates at or before the output by proving cone compaction and constant/alias elimination. The unary-arity equivalence handles malformed NOT arities without assuming every marker is live.",
    "Connect a kernel-checkable certificate to the remaining normalized size-nine circuits with a live NOT. Use the named cases and wire-by-wire differential harness as regression checks for the finite encoding."
  ],
  "environment": {
    "repositoryCommit": "8dec1cacf8aab169f12858fff3a2e945fea7a880",
    "lean": "4.36.0",
    "mathlib": "fc4f59e577feb1a4956671bc04ac18aaaf8cd842",
    "sourceArchiveSha256": "cd80eb8ab2449a0cccb22ebae597d1211ef508b48cf63a23c732c518a1aea3d9",
    "bundleManifestSource": "https://github.com/Identity-md/lean-bundles/releases/download/pequalnp-e125f04d0dc6/fetch.json",
    "bundleHashes": {
      "lean": "2b7ab1ed8b92d2e6abfaf41344823b510064dbc9c0260cac73eb496ab2dea6eb",
      "lean-packages": "69b68c745d0bd8dba3ab21966f8cdb14f9373bd4f1df1d17680f4b80dad98a88"
    },
    "packagePins": [
      "LeanSearchClient 4fb58e749ef3fc0395fe274f6cab70c2ea85f1c9",
      "plausible 054b228ce0ac61d767c6e71ba73a24728f191b72",
      "importGraph 8370c640afcd1cc3fb1cb9bf1560cc66eafee5e0",
      "Qq ff055a2fcc835935e0ae607339b455a5f5896b4b",
      "aesop 66ff77cf0c4c898799e4b94d14db55f7a02d0c5a",
      "proofwidgets 2f0f3520daeac2d9310ff25b7a877a0e5cdaa203",
      "Cli 50810f72af7618bee62fe9800dc26e806c188703",
      "batteries b4b25a3886a16daacaf6615c2eea7170a6e8f458",
      "mathlib fc4f59e577feb1a4956671bc04ac18aaaf8cd842"
    ],
    "pinnedConfigDiffExitCode": 0
  },
  "commands": [
    "lake build +PEqualNP.Defs checklemma +PEqualNP.Outside.L_cd10_not_arity (initial run built the pinned definitions and checker, but proof elaboration failed before repair)",
    "lake build +PEqualNP.Outside.L_cd10_not_arity +PEqualNP.Outside.L_cd10_suffix (arity module built, suffix needed two repairs)",
    "lake env python3 differential.py /path/to/pinned/lean (run from lean/ in the pinned project, with absolute harness paths)",
    "node .github/scripts/outside-guard.mjs imports <proof> <imports.json> <proof>",
    "node .github/scripts/outside-guard.mjs closure . <imports.json> <proof> <scratch-dir>",
    "node tools/check-lean.mjs <proof> <companion-statement> check",
    "lake env lean Axioms.lean",
    "lake env leanchecker -v PEqualNP.Outside.L_cd10_not_arity",
    "lake env leanchecker -v PEqualNP.Outside.L_cd10_suffix"
  ],
  "contributions": {
    "CD10": "Independent evaluator, adversarial mutations and two Lean equivalences.",
    "MP09": "Factorization and alternative circuit ordering.",
    "CT09": "Concrete padded witness and safe-append direction.",
    "CD09": "LA09 witness provenance and representative enumerated circuit."
  },
  "submission": {
    "status": "not submitted",
    "reason": "Read-only assignment, with no checked proof of the exact gap. Companion sources are embedded for replay."
  }
}
