{"summary":"CD05 verified two supporting results for L-meta-17390 in pinned Lean: a Monotone2 circuit computes the matching predicate iff it agrees on six minimal true and fifteen maximal false inputs, and any correct circuit has at least eight gates. The same module proves a one-step monotone substitution lemma for the SAT pruning rule. Incremental SAT ruled out canonical minimum candidates of sizes 1–9 at the solver level. The capsule’s 14-gate witness passed a 512-input positive control, including after canonicalization. Neither a 13-gate witness nor a kernel-checked exclusion of all circuits of size at most 13 was obtained. The additional checker replays ended without a verdict. No submission or lease.","agentId":"CD05","strategyId":"incremental-sat","status":"supporting-lemma","target":{"id":"L-meta-17390","title":"Perfect matching in a 3 by 3 bipartite graph, on its 9 edge bits: some circuit of at most 13 AND and OR gates only (no NOT), fan-in at most two, computes it","exact statement":"∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 13 ∧ ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) || (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))","statementUtf8Sha256":"3a6b7a3a820272375169fb191a04fd1ac8594fdc1849ed746eaaf0eefe286e6a","bytes":286,"kind":"helper","allowedImports":["PEqualNP.Defs (plus Mathlib, as in sibling files)"],"module":"PEqualNP.Outside.L_meta_17390","file":"lean/PEqualNP/Outside/L_meta_17390.lean","parent":null,"unlocks":[],"sources":["https://data.pequalnp.com/data/lemma/L-meta-17390.626422f1ae76.json","https://pequalnp.com/desk/step?gap=L-meta-17390","https://data.pequalnp.com/data/map/program/meta_complexity.51bcec2655ff.json"],"status":"open (desk); public status conjecture; depends_on [] and used_by [] in the record","observedAt":"2026-11-26T03:44:01Z (desk), 2026-11-26T04:12:16Z (desk, again)"},"env":{"commit":"8dec1cacf8aab169f12858fff3a2e945fea7a880","pins":{"lean":"v4.36.0 (asset sha256 2b7ab1ed8b92d2e6abfaf41344823b510064dbc9c0260cac73eb496ab2dea6eb, 607649028 bytes)","archive sha256":"cd80eb8ab2449a0cccb22ebae597d1211ef508b48cf63a23c732c518a1aea3d9","mathlib":"fc4f59e577feb1a4956671bc04ac18aaaf8cd842","plausible":"054b228ce0ac61d767c6e71ba73a24728f191b72","LeanSearchClient":"4fb58e749ef3fc0395fe274f6cab70c2ea85f1c9","importGraph":"8370c640afcd1cc3fb1cb9bf1560cc66eafee5e0","proofwidgets":"2f0f3520daeac2d9310ff25b7a877a0e5cdaa203","aesop":"66ff77cf0c4c898799e4b94d14db55f7a02d0c5a","Qq":"ff055a2fcc835935e0ae607339b455a5f5896b4b","batteries":"b4b25a3886a16daacaf6615c2eea7170a6e8f458","Cli":"50810f72af7618bee62fe9800dc26e806c188703","keyFileHashes":{"tools/check-lean.mjs":"c8fc4b209e678f76adc3cf4e988be55675ef9384e44cd388203c95c6afb68846","tools/check-lean-memory.mjs":"830f1cd590480fee8ee79157d1e3c3f275159e7d826d8bc726917cecebd42da8",".github/scripts/outside-guard.mjs":"738adeb889cb829a2dc359d970249e7723d5698d87ccd6819b2f82c6a83bf535","lean/PEqualNP/Defs/CircuitLowerBounds.lean":"695e454d3e424e2cae4fa4677741681eac11de0462d0d9bc087a0e6a6ba03f69","lean/PEqualNP/Defs/MetaComplexityLgpMono.lean":"dfecf7726cea5a2adbf2976c6e4aac2a4fe5c968713ba6ec84b267753b55c969"}},"statementBytes":286,"capsuleSha256":"6063abcf25b0ece8209fd6a47d5d78a7df697fbdd937474081d3f19b54e10e53","repositoryArchiveReceivedSha256":"cd80eb8ab2449a0cccb22ebae597d1211ef508b48cf63a23c732c518a1aea3d9","upstreamDiffExitCode":0,"archiveAudit":"The codeload gzip SHA-256 differs from the capsule archive SHA-256. The unpacked tracked tree was independently checked with git against a shallow fetch of the exact pinned commit before adding any local proof. The pinned Lean asset and the quoted definition and checker hashes match.","clean-run source":"#!/bin/sh\nset -eu\nbase=$(CDPATH= cd -- \"$(dirname -- \"$0\")\" && pwd)\nexec env -i HTTPS_PROXY=\"${HTTPS_PROXY-}\" HTTP_PROXY=\"${HTTP_PROXY-}\" ALL_PROXY=\"${ALL_PROXY-}\" NO_PROXY=\"${NO_PROXY-}\" PATH=\"$base/runtime/bin:/usr/bin:/bin\" HOME=\"$base/home\" TMPDIR=\"$base/tmp\" XDG_CACHE_HOME=\"$base/cache\" MATHLIB_CACHE_DIR=\"$base/cache/mathlib\" GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 GIT_TERMINAL_PROMPT=0 LAKE_ARTIFACT_CACHE=false PEQUALNP_REAL_LAKE=\"$base/runtime/bin/lake\" \"$@\"\n","packageSetupSource":"import concurrent.futures,json,pathlib,subprocess\nroot=pathlib.Path('repo/lean').resolve()\ndef fetch(p):\n    d=root/'.lake/packages'/p['name']\n    d.mkdir(parents=True,exist_ok=True)\n    def git(*args):\n        return subprocess.check_output(['git','-C',str(d),*args],text=True).strip()\n    git('init','-q'); git('remote','add','origin',p['url'])\n    git('fetch','--depth=1','origin',p['rev'])\n    git('checkout','--detach',p['rev'])\n    assert git('rev-parse','HEAD') == p['rev']\n    print(p['name'],p['rev'],flush=True)\nwith concurrent.futures.ThreadPoolExecutor(5) as pool:\n    list(pool.map(fetch,json.loads((root/'lake-manifest.json').read_text())['packages']))\n","directLeanSource":"#!/bin/sh\nset -eu\nbase=$(CDPATH= cd -- \"$(dirname -- \"$0\")\" && pwd)\nlean_dir=\"$base/repo/lean\"\npaths=\"$lean_dir/.lake/build/lib/lean\"\nfor p in \"$lean_dir\"/.lake/packages/*; do paths=\"$paths:$p/.lake/build/lib/lean\"; done\nexec \"$base/clean-run\" env LEAN_PATH=\"$paths\" LEAN_NUM_THREADS=1 \"$base/runtime/bin/lean\" \"$@\"\n","replayTransferSource":"#!/bin/sh\nset -u\nbase=$(CDPATH= cd -- \"$(dirname -- \"$0\")\" && pwd)\nlean_dir=\"$base/repo/lean\"\nmkdir -p \"$base/manual/PEqualNP/Outside\"\ncd \"$lean_dir\"\nm=PEqualNP/Outside/L_meta_17390_mask_transfer\n../../direct-lean -R . -o \"$base/manual/$m.olean\" \"$m.lean\" > \"$base/manual-build.log\" 2>&1\ncode=$?\nprintf '%s\\n' \"$code\" > \"$base/manual-build.exit\"\n[ \"$code\" -eq 0 ] || exit \"$code\"\npaths=\"$base/manual:$lean_dir/.lake/build/lib/lean\"\nfor p in \"$lean_dir\"/.lake/packages/*; do paths=\"$paths:$p/.lake/build/lib/lean\"; done\n\"$base/clean-run\" env LEAN_PATH=\"$paths\" LEAN_SYSROOT=\"$base/runtime\" LEAN_NUM_THREADS=1 \\\n  \"$lean_dir/.lake/build/bin/checklemma\" PEqualNP.Outside.L_meta_17390_mask_transfer \\\n  \"$base/mask-transfer.statement\" check > \"$base/manual-replay.log\" 2>&1\nprintf '%s\\n' \"$?\" > \"$base/manual-replay.exit\"\n","replayBuiltSource":"#!/bin/sh\nset -eu\nbase=$(CDPATH= cd -- \"$(dirname -- \"$0\")\" && pwd)\nlean_dir=\"$base/repo/lean\"\npaths=\"$lean_dir/.lake/build/lib/lean\"\nfor p in \"$lean_dir\"/.lake/packages/*; do paths=\"$paths:$p/.lake/build/lib/lean\"; done\nexec \"$base/clean-run\" env LEAN_PATH=\"$paths\" LEAN_SYSROOT=\"$base/runtime\" LEAN_NUM_THREADS=1 \\\n  \"$lean_dir/.lake/build/bin/checklemma\" PEqualNP.Outside.L_meta_17390_mask_transfer \\\n  \"$base/mask-transfer.statement\" check\n","axiomsHarness":"Append #print axioms with the fully-qualified theorem name to a scratch copy of the mask lemma source.","commands run":["curl -fLsS https://codeload.github.com/open-goat/pequalnp-proofs/tar.gz/8dec1cacf8aab169f12858fff3a2e945fea7a880 -o repo.tgz","curl -fLsS https://github.com/leanprover/lean4/releases/download/v4.36.0/lean-4.36.0-linux.tar.zst -o lean.tar.zst","sha256sum repo.tgz lean.tar.zst fetched.json","tar xzf repo.tgz --strip-components=1 -C repo","tar --zstd -xf lean.tar.zst --strip-components=1 -C runtime","runtime/bin/lean --version","git -C repo init -q; git -C repo fetch --depth=1 https://github.com/open-goat/pequalnp-proofs.git 8dec1cacf8aab169f12858fff3a2e945fea7a880; git -C repo reset --mixed FETCH_HEAD; git -C repo status --short","env -u GIT_CONFIG_COUNT GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 GIT_TERMINAL_PROMPT=0 python3 packages.py","(cd repo/lean && ../../clean-run lake exe cache get), exit 0 after restoring the proxy variables. Log ends with Decompressed 9117 file(s) and Already decompressed 9117 file(s).","printf '[\"PEqualNP.Defs\"]\\n' > allowed.json; mkdir -p guard"],"solver":{"package":"python-sat 1.8.dev24","wheelURL":"https://files.pythonhosted.org/packages/34/83/9b121b63d8f21b647e38afe053123c9dd44efff6db7710e1d1d886b0f7a3/python_sat-1.8.dev24-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl","sha256":"1740a962d94101b9ad59b2040e80815284b2b133e7e3ee9f315bcdfe6782491f","installation":"Fetched the CPython 3.14 x86_64 wheel using the PyPI JSON version record, verified its SHA-256, and unpacked it via Python zipfile into solver/. Only the optional SAT reproduction uses this scratch install."}},"artifacts":[{"path":"statement.txt","content":"∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 13 ∧ ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) || (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))","sha256":"3a6b7a3a820272375169fb191a04fd1ac8594fdc1849ed746eaaf0eefe286e6a","statement":"∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 13 ∧ ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) || (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))","statementSha256":"3a6b7a3a820272375169fb191a04fd1ac8594fdc1849ed746eaaf0eefe286e6a","role":"Pinned input statement","relationToTarget":"Exact 286 UTF-8 bytes of the original gap, no trailing newline."},{"path":"lean/PEqualNP/Outside/L_meta_17390_boundary.lean","content":"import Mathlib.Data.Finset.Card\nimport Mathlib.Data.List.GetD\nimport Mathlib.Data.Fin.VecNotation\nimport Mathlib.Tactic.FinCases\nimport PEqualNP.Defs\n\nnamespace PEqualNP.Outside.L_meta_17390_boundary\n\nopen PEqualNP.CircuitLowerBounds\nopen PEqualNP.MetaComplexity\n\ndef matching (x : Fin 9 → Bool) : Bool :=\n  ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) ||\n    (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))\n\ndef bits (m : ℕ) (i : Fin 9) : Bool := m.testBit i.val\n\n/-- The six permutation matrices, encoded by their edge masks. -/\ndef positives : List ℕ := [273, 161, 266, 98, 140, 84]\n\n/-- The fifteen maximal edge masks with no perfect matching. -/\ndef negatives : List ℕ :=\n  [63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n\nprivate theorem boolLe {a b : Bool} : a ≤ b ↔ (a = true → b = true) := by\n  cases a <;> cases b <;> decide\n\nprivate theorem gate_mono (g : Gate) (hg : g.op ∈ ({GateOp.and, GateOp.or} : Set GateOp))\n    (x y : List Bool) (h : ∀ i, x.getD i false ≤ y.getD i false) :\n    g.op.eval (g.inputs.map fun i => x.getD i false) ≤\n      g.op.eval (g.inputs.map fun i => y.getD i false) := by\n  have hop : g.op = .and ∨ g.op = .or := by simpa using hg\n  rcases hop with ha | ho\n  · simp only [ha, GateOp.eval, boolLe, List.all_eq_true, List.mem_map, id_eq]\n    intro hx _ hy\n    obtain ⟨i, hi, rfl⟩ := hy\n    exact boolLe.mp (h i) (hx _ ⟨i, hi, rfl⟩)\n  · simp only [ho, GateOp.eval, boolLe, List.any_eq_true, List.mem_map, id_eq]\n    intro hx\n    obtain ⟨_, ⟨i, hi, rfl⟩, hit⟩ := hx\n    exact ⟨_, ⟨i, hi, rfl⟩, boolLe.mp (h i) hit⟩\n\nprivate theorem append_mono (x y : List Bool) (a b : Bool) (hlen : x.length = y.length)\n    (h : ∀ i, x.getD i false ≤ y.getD i false) (hab : a ≤ b) (i : ℕ) :\n    (x ++ [a]).getD i false ≤ (y ++ [b]).getD i false := by\n  by_cases hi : i < x.length\n  · rw [List.getD_append _ _ _ _ hi, List.getD_append _ _ _ _ (hlen ▸ hi)]\n    exact h i\n  · rw [List.getD_append_right _ _ _ _ (Nat.le_of_not_gt hi),\n        List.getD_append_right _ _ _ _ (hlen ▸ Nat.le_of_not_gt hi), hlen]\n    cases i - y.length with\n    | zero => exact hab\n    | succ n => simp\n\nprivate theorem fold_mono (gs : List Gate)\n    (hg : ∀ g ∈ gs, g.op ∈ ({GateOp.and, GateOp.or} : Set GateOp))\n    (x y : List Bool) (hlen : x.length = y.length)\n    (h : ∀ i, x.getD i false ≤ y.getD i false) (o : ℕ) :\n    (gs.foldl (fun w g => w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]) x).getD o false ≤\n      (gs.foldl (fun w g => w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]) y).getD o false := by\n  induction gs generalizing x y with\n  | nil => exact h o\n  | cons g gs ih =>\n    simp only [List.foldl_cons]\n    apply ih (fun j hj => hg j (List.mem_cons_of_mem _ hj)) _ _\n    · simp [hlen]\n    · exact append_mono _ _ _ _ hlen h (gate_mono g (hg g (by simp)) x y h)\n\ndef suffixValue (gs : List Gate) (w : List Bool) (a : Bool) (out : ℕ) : Bool :=\n  (gs.foldl (fun acc g => acc ++ [g.op.eval (g.inputs.map fun j => acc.getD j false)])\n    (w ++ [a])).getD out false\n\n/-- A change toward the required output value preserves correctness through an AND/OR suffix. -/\ntheorem suffix_substitution (gs : List Gate)\n    (hg : ∀ g ∈ gs, g.op ∈ ({GateOp.and, GateOp.or} : Set GateOp))\n    (w : List Bool) (a b target : Bool) (out : ℕ)\n    (improves : if target then a ≤ b else b ≤ a)\n    (correct : suffixValue gs w a out = target) :\n    suffixValue gs w b out = target := by\n  have mono (c d : Bool) (hcd : c ≤ d) : suffixValue gs w c out ≤ suffixValue gs w d out :=\n    fold_mono gs hg _ _ (by simp) (append_mono _ _ _ _ rfl (fun _ => Bool.le_refl _) hcd) out\n  cases target with\n  | true =>\n    exact boolLe.mp (mono a b (by simpa using improves)) correct\n  | false =>\n    have h := mono b a (by simpa using improves)\n    rw [correct] at h\n    exact Bool.le_antisymm h (Bool.false_le _)\n\nprivate theorem getD_ofFn (x : Fin 9 → Bool) (i : ℕ) (hi : i < 9) :\n    (List.ofFn x).getD i false = x ⟨i, hi⟩ := by\n  simp only [List.getD_eq_getElem?_getD, List.getElem?_ofFn, dite_eq_left hi, Option.getD_some]\n\ntheorem eval_mono (C : Circuit) (hc : Monotone2 C) {x y : Fin 9 → Bool}\n    (h : ∀ i, x i ≤ y i) : C.eval (List.ofFn x) ≤ C.eval (List.ofFn y) := by\n  apply fold_mono C.gates (fun g hg => (hc g hg).1) _ _ (by simp)\n  intro i\n  by_cases hi : i < 9\n  · rw [getD_ofFn x i hi, getD_ofFn y i hi]\n    exact h ⟨i, hi⟩\n  · rw [List.getD_eq_default (List.ofFn x) false (by simpa only [List.length_ofFn] using Nat.le_of_not_gt hi),\n        List.getD_eq_default (List.ofFn y) false (by simpa only [List.length_ofFn] using Nat.le_of_not_gt hi)]\n\nprivate theorem cover (a b c d e f g h i : Bool) :\n    let x : Fin 9 → Bool := ![a,b,c,d,e,f,g,h,i]\n    if matching x then\n      positives.any (fun m => decide (∀ j, bits m j ≤ x j)) = true\n    else\n      negatives.any (fun m => decide (∀ j, x j ≤ bits m j)) = true := by\n  revert a b c d e f g h i\n  decide +kernel\n\ntheorem boundary (C : Circuit) (hc : Monotone2 C) :\n    (∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = matching x) ↔\n      (∀ m ∈ positives, C.eval (List.ofFn (bits m)) = true) ∧\n      (∀ m ∈ negatives, C.eval (List.ofFn (bits m)) = false) := by\n  constructor\n  · intro hall\n    have hp : positives.all (fun m => matching (bits m)) = true := by decide +kernel\n    have hn : negatives.all (fun m => !(matching (bits m))) = true := by decide +kernel\n    exact ⟨fun m hm => (hall _).trans (List.all_eq_true.mp hp m hm),\n      fun m hm => (hall _).trans (by simpa using List.all_eq_true.mp hn m hm)⟩\n  · rintro ⟨hp, hn⟩ x\n    have hx : ![x 0,x 1,x 2,x 3,x 4,x 5,x 6,x 7,x 8] = x := by\n      funext j\n      fin_cases j <;> rfl\n    have cov := cover (x 0) (x 1) (x 2) (x 3) (x 4) (x 5) (x 6) (x 7) (x 8)\n    change (if matching ![x 0,x 1,x 2,x 3,x 4,x 5,x 6,x 7,x 8] then _ else _) at cov\n    rw [hx] at cov\n    cases he : matching x with\n    | true =>\n      rw [ite_eq_left he] at cov\n      obtain ⟨m, hm, hmx⟩ := List.any_eq_true.mp cov\n      exact boolLe.mp (eval_mono C hc (of_decide_eq_true hmx)) (hp m hm)\n    | false =>\n      rw [ite_eq_right (by simp [he])] at cov\n      obtain ⟨m, hm, hxm⟩ := List.any_eq_true.mp cov\n      have hle := eval_mono C hc (of_decide_eq_true hxm)\n      rw [hn m hm] at hle\n      exact Bool.le_antisymm hle (Bool.false_le _)\n\n/-- Pull the output demand backwards across the remaining gate list. -/\ndef demand : List Gate → ℕ → ℕ → Finset ℕ\n  | [], _, output => {output}\n  | g :: gs, n, output =>\n    let later := demand gs (n + 1) output\n    if n ∈ later then later.erase n ∪ g.inputs.toFinset else later\n\nprivate theorem demand_bound (gs : List Gate) (n output : ℕ)\n    (arity : ∀ g ∈ gs, g.inputs.length ≤ 2) :\n    (demand gs n output).card ≤ gs.length + 1 := by\n  induction gs generalizing n with\n  | nil => simp [demand]\n  | cons g gs ih =>\n    have hb := ih (n + 1) (fun g' hg' => arity g' (List.mem_cons_of_mem _ hg'))\n    have ha : g.inputs.toFinset.card ≤ 2 :=\n      (List.toFinset_card_le g.inputs).trans (arity g (by simp))\n    simp only [demand, List.length_cons]\n    split\n    · rename_i hm\n      have hc := Finset.card_union_le (demand gs (n + 1) output |>.erase n) g.inputs.toFinset\n      rw [Finset.card_erase_of_mem hm] at hc\n      have hp := Finset.card_pos.mpr ⟨n, hm⟩\n      omega\n    · omega\n\nprivate theorem demand_sound (gs : List Gate) (x y : List Bool) (o : ℕ)\n    (hlen : x.length = y.length)\n    (agree : ∀ i ∈ demand gs x.length o, x.getD i false = y.getD i false) :\n    (gs.foldl (fun w g => w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]) x).getD o false =\n      (gs.foldl (fun w g => w ++ [g.op.eval (g.inputs.map fun i => w.getD i false)]) y).getD o false := by\n  induction gs generalizing x y with\n  | nil => exact agree o (by simp [demand])\n  | cons g gs ih =>\n    simp only [List.foldl_cons]\n    apply ih _ _ (by simp [hlen])\n    intro i hi\n    simp only [List.length_append, List.length_singleton] at hi\n    have hprev (hne : i ≠ x.length) : x.getD i false = y.getD i false := by\n      apply agree\n      simp only [demand]\n      split\n      · exact Finset.mem_union_left _ (Finset.mem_erase.mpr ⟨hne, hi⟩)\n      · exact hi\n    rcases lt_trichotomy i x.length with hlt | rfl | hgt\n    · rw [List.getD_append _ _ _ _ hlt, List.getD_append _ _ _ _ (hlen ▸ hlt)]\n      exact hprev hlt.ne\n    · rw [List.getD_append_right _ _ _ _ (Nat.le_refl _),\n          List.getD_append_right _ _ _ _ (hlen ▸ Nat.le_refl x.length)]\n      simp only [← hlen, Nat.sub_self, List.getD_cons_zero]\n      congr 1\n      apply List.map_congr_left\n      intro j hj\n      apply agree\n      simp only [demand, ite_eq_left hi]\n      exact Finset.mem_union_right _ (List.mem_toFinset.mpr hj)\n    · rw [List.getD_eq_default _ _ (by\n            simpa only [List.length_append, List.length_singleton] using Nat.succ_le_of_lt hgt),\n          List.getD_eq_default _ _ (by\n            simpa only [List.length_append, List.length_singleton, ← hlen] using Nat.succ_le_of_lt hgt)]\n\ndef witnessingMask (i : Fin 9) : ℕ := ![273, 266, 140, 266, 273, 98, 98, 140, 273] i\n\nprivate theorem essential (i : Fin 9) :\n    matching (bits (witnessingMask i)) ≠\n      matching (fun j => if j = i then false else bits (witnessingMask i) j) := by\n  fin_cases i <;> decide +kernel\n\ntheorem size_lower_bound (C : Circuit) (hc : Monotone2 C)\n    (correct : ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = matching x) :\n    8 ≤ C.size := by\n  have allInputs : Finset.range 9 ⊆ demand C.gates 9 C.output := by\n    intro i hi\n    have hlt := Finset.mem_range.mp hi\n    let k : Fin 9 := ⟨i, hlt⟩\n    let x := bits (witnessingMask k)\n    let y : Fin 9 → Bool := fun j => if j = k then false else x j\n    by_contra missing\n    have hagree : ∀ j ∈ demand C.gates (List.ofFn x).length C.output,\n        (List.ofFn x).getD j false = (List.ofFn y).getD j false := by\n      intro j hj\n      by_cases hj' : j < 9\n      · have hne : (⟨j, hj'⟩ : Fin 9) ≠ k := by\n          intro he\n          have hv := congrArg Fin.val he\n          simp [k] at hv\n          exact missing (by simpa [hv] using hj)\n        rw [getD_ofFn x j hj', getD_ofFn y j hj']\n        exact (ite_eq_right hne).symm\n      · rw [List.getD_eq_default (List.ofFn x) false (by simpa only [List.length_ofFn] using Nat.le_of_not_gt hj'),\n            List.getD_eq_default (List.ofFn y) false (by simpa only [List.length_ofFn] using Nat.le_of_not_gt hj')]\n    have he : C.eval (List.ofFn x) = C.eval (List.ofFn y) :=\n      demand_sound C.gates _ _ _ (by simp) hagree\n    exact essential k ((correct x).symm.trans (he.trans (correct y)))\n  have hc1 := Finset.card_le_card allInputs\n  have hc2 := demand_bound C.gates 9 C.output (fun g hg => (hc g hg).2)\n  simp only [Finset.card_range] at hc1\n  exact Nat.le_of_succ_le_succ (hc1.trans hc2)\n\nend PEqualNP.Outside.L_meta_17390_boundary\n\ntheorem PEqualNP.Outside.L_meta_17390_boundary : ∀ (C : PEqualNP.CircuitLowerBounds.Circuit), PEqualNP.MetaComplexity.Monotone2 C →\n  let f := fun x : Fin 9 → Bool =>\n    ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) ||\n      (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))\n  let correct := ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = f x\n  (correct ↔\n    (∀ m ∈ ([273, 161, 266, 98, 140, 84] : List ℕ),\n      C.eval (List.ofFn (fun i : Fin 9 => m.testBit i.val)) = true) ∧\n    (∀ m ∈ ([63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504] : List ℕ),\n      C.eval (List.ofFn (fun i : Fin 9 => m.testBit i.val)) = false)) ∧\n  (correct → 8 ≤ C.size) := by\n  intro C hc\n  exact ⟨PEqualNP.Outside.L_meta_17390_boundary.boundary C hc, PEqualNP.Outside.L_meta_17390_boundary.size_lower_bound C hc⟩\n","sha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","statement":"∀ (C : PEqualNP.CircuitLowerBounds.Circuit), PEqualNP.MetaComplexity.Monotone2 C →\n  let f := fun x : Fin 9 → Bool =>\n    ((x 0 && x 4 && x 8) || (x 0 && x 5 && x 7) || (x 1 && x 3 && x 8) ||\n      (x 1 && x 5 && x 6) || (x 2 && x 3 && x 7) || (x 2 && x 4 && x 6))\n  let correct := ∀ x : Fin 9 → Bool, C.eval (List.ofFn x) = f x\n  (correct ↔\n    (∀ m ∈ ([273, 161, 266, 98, 140, 84] : List ℕ),\n      C.eval (List.ofFn (fun i : Fin 9 => m.testBit i.val)) = true) ∧\n    (∀ m ∈ ([63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504] : List ℕ),\n      C.eval (List.ofFn (fun i : Fin 9 => m.testBit i.val)) = false)) ∧\n  (correct → 8 ≤ C.size)","statementSha256":"084b7511c1fc85971af3d48142fdaf67593769c66da14a79ee882ad1ab6ec417","role":"Kernel-checked supporting theorem with full module source","relationToTarget":"For the same matching predicate, 21 boundary rows suffice for every Monotone2 circuit, and correctness requires at least eight gates. The helper suffix_substitution proves the pointwise monotonicity used in the SAT dominance prune."},{"path":"lean/PEqualNP/Outside/L_meta_17390_mask_transfer.lean","content":"namespace PEqualNP.Outside.L_meta_17390_mask_transfer\n\ndef positives : List Nat := [273, 161, 266, 98, 140, 84]\n\ndef negatives : List Nat :=\n  [63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n\ndef positive (m : Nat) : Bool := positives.any (fun p => (p &&& m) == p)\n\ndef negative (m : Nat) : Bool := negatives.any (fun n => (m &&& n) == m)\n\nset_option maxRecDepth 5000 in\nprivate theorem partition :\n    (List.range 512).all (fun m => positive m != negative m) = true := by\n  decide +kernel\n\ntheorem propagate (f : Nat → Bool)\n    (mono : ∀ a b, a &&& b = a → f a = true → f b = true)\n    (hp : ∀ p ∈ positives, f p = true)\n    (hn : ∀ n ∈ negatives, f n = false)\n    (m : Nat) (hm : m < 512) : f m = positive m := by\n  have hpart : (positive m != negative m) = true :=\n    List.all_eq_true.mp partition m (List.mem_range.mpr hm)\n  cases hpos : positive m with\n  | true =>\n    obtain ⟨p, hpMem, hpm⟩ := List.any_eq_true.mp hpos\n    exact mono p m (by simpa using hpm) (hp p hpMem)\n  | false =>\n    have hneg : negative m = true := by simpa [hpos] using hpart\n    obtain ⟨n, hnMem, hmn⟩ := List.any_eq_true.mp hneg\n    cases he : f m with\n    | false => rfl\n    | true =>\n      have hnTrue := mono m n (by simpa using hmn) he\n      rw [hn n hnMem] at hnTrue\n      contradiction\n\nend PEqualNP.Outside.L_meta_17390_mask_transfer\n\ntheorem PEqualNP.Outside.L_meta_17390_mask_transfer :\n    let positives : List Nat := [273, 161, 266, 98, 140, 84]\n    let negatives : List Nat :=\n      [63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n    ∀ f : Nat → Bool,\n      (∀ a b, a &&& b = a → f a = true → f b = true) →\n      (∀ p ∈ positives, f p = true) →\n      (∀ n ∈ negatives, f n = false) →\n      ∀ m < 512, f m = positives.any (fun p => (p &&& m) == p) := by\n  exact PEqualNP.Outside.L_meta_17390_mask_transfer.propagate\n","sha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","statement":"let positives : List Nat := [273, 161, 266, 98, 140, 84]\n    let negatives : List Nat :=\n      [63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n    ∀ f : Nat → Bool,\n      (∀ a b, a &&& b = a → f a = true → f b = true) →\n      (∀ p ∈ positives, f p = true) →\n      (∀ n ∈ negatives, f n = false) →\n      ∀ m < 512, f m = positives.any (fun p => (p &&& m) == p)","statementSha256":"a5f3ad920dc1ab4b6aa76658ab58a619e196a0ea5c292db65c2e3304776484c1","role":"Kernel-checked boundary transfer for monotone Boolean functions on masks","relationToTarget":"Agreement on the twenty-one labelled masks determines the value of any Boolean function monotone under bit inclusion. A correct circuit would require a separate proof of monotonicity in the project circuit semantics."},{"path":"lean/PEqualNP/Outside/L_meta_17390_mask_truth.lean","content":"set_option maxRecDepth 3000 in\ntheorem PEqualNP.Outside.L_meta_17390_mask_truth :\n    ∀ a b c d e f g h i : Bool,\n      let m := [a, b, c, d, e, f, g, h, i].foldr\n        (fun bit acc => (if bit then 1 else 0) + 2 * acc) 0\n      let matching := ((a && e && i) || (a && f && h) || (b && d && i) ||\n        (b && f && g) || (c && d && h) || (c && e && g))\n      ([273, 161, 266, 98, 140, 84].any (fun p => (p &&& m) == p) = matching) ∧\n      (!([63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504].any\n        (fun n => (m &&& n) == m)) = matching) := by\n  decide +kernel\n","sha256":"1ccc534d844ef8246bca056cc1d2365459e53b9e8ffb25897b2a55e1d8035ebf","statement":"∀ a b c d e f g h i : Bool,\n      let m := [a, b, c, d, e, f, g, h, i].foldr\n        (fun bit acc => (if bit then 1 else 0) + 2 * acc) 0\n      let matching := ((a && e && i) || (a && f && h) || (b && d && i) ||\n        (b && f && g) || (c && d && h) || (c && e && g))\n      ([273, 161, 266, 98, 140, 84].any (fun p => (p &&& m) == p) = matching) ∧\n      (!([63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504].any\n        (fun n => (m &&& n) == m)) = matching)","statementSha256":"0bb746caa7301bb525a921aeb58729a5fe476fd9614e0ce4c80610242e9cce49","role":"Kernel-checked matching boundary identity","relationToTarget":"Over all nine Boolean edge values, the exact matching formula equals containment of some positive mask and also equals the absence of any containing negative mask."}],"verification":[{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"./clean-run lean -j 1 MaskTransferAxioms.lean","exitCode":0,"verdict":"Lean completed","logExcerpt":"'PEqualNP.Outside.L_meta_17390_mask_transfer' depends on axioms: [propext, Classical.choice, Quot.sound]"},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"(cd repo && node .github/scripts/outside-guard.mjs imports lean/PEqualNP/Outside/L_meta_17390_mask_transfer.lean ../mask-allowed.json lean/PEqualNP/Outside/L_meta_17390_mask_transfer.lean check)","exitCode":0,"verdict":"imports allowed: (none)","logExcerpt":"imports allowed: (none)"},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"(cd repo && node .github/scripts/outside-guard.mjs closure . ../mask-allowed.json lean/PEqualNP/Outside/L_meta_17390_mask_transfer.lean ../transfer-guard check)","exitCode":0,"verdict":"outside-written, built only in the locked step: (none)","logExcerpt":"built before the locked step: (none)\noutside-written, built only in the locked step: (none)"},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"./replay-transfer.sh (direct lean -R . -o compile phase)","exitCode":0,"verdict":"Lean completed","logExcerpt":""},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"./replay-built.sh (pinned checklemma on the Lake-built transfer module)","exitCode":130,"verdict":"Interrupted before a verdict","logExcerpt":""},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"./replay-transfer.sh (pinned checklemma replay phase)","exitCode":3,"verdict":"checker fault: object file '<scratch>/manual/PEqualNP/Defs.olean' of module PEqualNP.Defs does not exist","logExcerpt":"checker fault: object file '<scratch>/manual/PEqualNP/Defs.olean' of module PEqualNP.Defs does not exist"},{"artifactSha256":"0d5984d71a43d54fcaf40d8aed58bd7f8655fe7dc8f10f26a93fc2f8d789ddee","command":"(cd repo/lean && ../../clean-run env LEAN_NUM_THREADS=1 lake build +PEqualNP.Outside.L_meta_17390_mask_transfer)","exitCode":0,"verdict":"Build completed successfully (3 jobs).","logExcerpt":"✔ [2/3] Built PEqualNP.Outside.L_meta_17390_mask_transfer (220s)\nBuild completed successfully (3 jobs)."},{"artifactSha256":"1ccc534d844ef8246bca056cc1d2365459e53b9e8ffb25897b2a55e1d8035ebf","command":"./clean-run lean -j 1 MaskTruthAxioms.lean","exitCode":0,"verdict":"Lean completed","logExcerpt":"'PEqualNP.Outside.L_meta_17390_mask_truth' depends on axioms: [propext]"},{"artifactSha256":"1ccc534d844ef8246bca056cc1d2365459e53b9e8ffb25897b2a55e1d8035ebf","command":"(cd repo && node .github/scripts/outside-guard.mjs imports lean/PEqualNP/Outside/L_meta_17390_mask_truth.lean ../mask-allowed.json lean/PEqualNP/Outside/L_meta_17390_mask_truth.lean check)","exitCode":0,"verdict":"imports allowed: (none)","logExcerpt":"imports allowed: (none)"},{"artifactSha256":"1ccc534d844ef8246bca056cc1d2365459e53b9e8ffb25897b2a55e1d8035ebf","command":"(cd repo && node .github/scripts/outside-guard.mjs closure . ../mask-allowed.json lean/PEqualNP/Outside/L_meta_17390_mask_truth.lean ../mask-guard check)","exitCode":0,"verdict":"outside-written, built only in the locked step: (none)","logExcerpt":"built before the locked step: (none)\noutside-written, built only in the locked step: (none)"},{"artifactSha256":"1ccc534d844ef8246bca056cc1d2365459e53b9e8ffb25897b2a55e1d8035ebf","command":"(cd repo && ../clean-run \"$(command -v node)\" tools/check-lean.mjs lean/PEqualNP/Outside/L_meta_17390_mask_truth.lean ../mask-truth.statement check)","exitCode":130,"verdict":"Interrupted before a verdict","logExcerpt":"checker stage: started t=0s\nchecker stage: build lock taken t=0s\nchecker stage: building the verifier t=0s\nchecker stage: building the file and the definitions root t=419s\nchecker stage: verifier reading the built file t=1367s"},{"artifactSha256":null,"command":"(cd repo/lean && ../../clean-run env LEAN_NUM_THREADS=3 lake build PEqualNP.Defs)","exitCode":0,"verdict":"Build completed successfully (5149 jobs).","logExcerpt":"om package `mathlib`, which is designed for use with the module system; consider adding `module` to the start of this file\n✔ [5142/5149] Built PEqualNP.Defs.TopFormNames (39s)\n✔ [5144/5149] Built PEqualNP.Defs.ReadTwo (46s)\n✔ [5146/5149] Built PEqualNP.Defs.Core (32s)\n✔ [5148/5149] Built PEqualNP.Defs (70s)\nBuild completed successfully (5149 jobs)."},{"artifactSha256":"3a6b7a3a820272375169fb191a04fd1ac8594fdc1849ed746eaaf0eefe286e6a","command":"(cd repo/lean && ../../clean-run lake env lean ../../Elab.lean)","exitCode":null,"verdict":"No completed command recorded","logExcerpt":""},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo/lean && ../../clean-run env LEAN_NUM_THREADS=3 lake build +PEqualNP.Outside.L_meta_17390_boundary)","exitCode":0,"verdict":"Build completed successfully (5151 jobs).","logExcerpt":" is designed for use with the module system; consider adding `module` to the start of this file\nwarning: PEqualNP/Outside/L_meta_17390_boundary.lean: imports `Mathlib.Tactic.FinCases` from package `mathlib`, which is designed for use with the module system; consider adding `module` to the start of this file\nBuild completed successfully (5151 jobs)."},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"timeout 65 ./direct-lean Axioms.lean","exitCode":124,"verdict":"Lean or checker failed","logExcerpt":""},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo && node .github/scripts/outside-guard.mjs imports lean/PEqualNP/Outside/L_meta_17390_boundary.lean ../allowed.json lean/PEqualNP/Outside/L_meta_17390_boundary.lean check)","exitCode":0,"verdict":"imports allowed: Mathlib.Data.Finset.Card Mathlib.Data.List.GetD Mathlib.Data.Fin.VecNotation Mathlib.Tactic.FinCases PEqualNP.Defs","logExcerpt":"imports allowed: Mathlib.Data.Finset.Card Mathlib.Data.List.GetD Mathlib.Data.Fin.VecNotation Mathlib.Tactic.FinCases PEqualNP.Defs"},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo && node .github/scripts/outside-guard.mjs closure . ../allowed.json lean/PEqualNP/Outside/L_meta_17390_boundary.lean ../guard check)","exitCode":0,"verdict":"outside-written, built only in the locked step: (none)","logExcerpt":"ndCountCircuit PEqualNP.Defs.Base PEqualNP.Defs.BicliqueBlockCost PEqualNP.Defs.BinaryCircuit PEqualNP.Defs.BlindGate PEqualNP.Defs.BorrowedCoverCircuit PEqualNP.Defs.BranchingProgram PEqualNP.Defs.CarriedProduct PEqualNP.Defs.CircuitLowerBounds PEqualNP.Defs.CircuitMoves PEqualNP.Defs.Clas ...\noutside-written, built only in the locked step: (none)"},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo && ../clean-run \"$(command -v node)\" tools/check-lean.mjs lean/PEqualNP/Outside/L_meta_17390_boundary.lean ../statement.txt helper)","exitCode":3,"verdict":"CHECKER FAULT: kind must be check, refute or reduce, got \"helper\"","logExcerpt":"CHECKER FAULT: kind must be check, refute or reduce, got \"helper\""},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo && ../clean-run \"$(command -v node)\" tools/check-lean.mjs lean/PEqualNP/Outside/L_meta_17390_boundary.lean ../supporting.statement check)","exitCode":null,"verdict":"No completed command recorded","logExcerpt":""},{"artifactSha256":"9fbcd7a4505334a88869a7d158636d14b3a875bc174cf4decde47f4fbffe1df1","command":"(cd repo && ../clean-run \"$(command -v node)\" tools/check-lean.mjs lean/PEqualNP/Outside/L_meta_17390_boundary.lean ../statement.txt check)","exitCode":null,"verdict":"No completed command recorded","logExcerpt":""}],"experiments":[{"program":"\"\"\"Incremental exact synthesis on minimal true and maximal false rows.\"\"\"\nimport argparse\nimport itertools\nimport time\n\nfrom pysat.solvers import Solver\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"maximum\", type=int)\nparser.add_argument(\"conflicts\", type=int, help=\"per call; -1 means unlimited\")\nparser.add_argument(\"--distinct\", action=\"store_true\")\nparser.add_argument(\"--irredundant\", action=\"store_true\")\nparser.add_argument(\"--critical\", action=\"store_true\")\nparser.add_argument(\"--last-operation\", choices=(\"and\", \"or\"))\nparser.add_argument(\"--solver\", default=\"cadical195\")\nparser.add_argument(\"--first\", type=int, default=1)\nparser.add_argument(\"--neighborhood\", choices=(\"control\", \"repair\"))\nparser.add_argument(\"--radius\", type=int, default=1)\n\nargs = parser.parse_args()\nif args.neighborhood:\n    assert args.first == args.maximum == (14 if args.neighborhood == \"control\" else 13)\n\n\nterms = (0x111, 0x0a1, 0x10a, 0x062, 0x08c, 0x054)\n\ndef target(mask):\n    return any(mask & term == term for term in terms)\n\nnegative = [\n    m for m in range(512)\n    if not target(m) and all(target(m | (1 << b)) for b in range(9) if not m & (1 << b))\n]\nrows = list(terms) + negative\nprint(\"rows:\", rows, flush=True)\nsolver = Solver(name=args.solver)\nvariables = itertools.count(1)\nfresh = lambda: next(variables)\n\ndef add(*literals):\n    if True not in [x for x in literals if type(x) is bool]:\n        solver.add_clause([x for x in literals if type(x) is not bool])\n\ndef neg(literal):\n    return not literal if type(literal) is bool else -literal\n\ndef multiplexer(selectors, candidates):\n    value = fresh()\n    for selector, wire in zip(selectors, candidates):\n        add(-selector, -value, wire)\n        add(-selector, value, neg(wire))\n    return value\n\ndef combine(op, x, y):\n    z = fresh()\n    add(-op, -z, x)\n    add(-op, -z, y)\n    add(-op, z, -x, -y)\n    add(op, z, -x)\n    add(op, z, -y)\n    add(op, -z, x, y)\n    return z\n\ndef onehot(n):\n    values = [fresh() for _ in range(n)]\n    add(*values)\n    for a, b in itertools.combinations(values, 2):\n        add(-a, -b)\n    return values\n\ndef different(signature, previous):\n    witnesses = []\n    for a, b in zip(signature, previous):\n        if type(b) is bool:\n            witnesses.append(neg(a) if b else a)\n        else:\n            witness = fresh()\n            add(-witness, a, b)\n            add(-witness, -a, -b)\n            witnesses.append(witness)\n    add(*witnesses)\n\ndef improves(signature, earlier):\n    # At least one target row on which the new signal is closer to the label\n    # than the earlier signal. Otherwise substituting the earlier signal can\n    # only improve all downstream signals, so the new gate is dispensable.\n    witnesses = []\n    for row, z, e in zip(rows, signature, earlier):\n        a, b = (z, neg(e)) if target(row) else (neg(z), e)\n        if b is True:\n            witnesses.append(a)\n        elif b is not False:\n            witness = fresh()\n            add(-witness, a)\n            add(-witness, b)\n            witnesses.append(witness)\n    add(*witnesses)\n\n# Positive control and local repair seed from the cited capsule.\nseed = [\n    (True, 1, 5), (True, 2, 4), (True, 0, 5), (False, 9, 10),\n    (True, 2, 3), (True, 0, 4), (True, 1, 3), (False, 14, 15),\n    (True, 6, 12), (True, 8, 16), (False, 11, 13), (True, 7, 19),\n    (False, 18, 20), (False, 17, 21),\n]\n\ndef fixed_literals(omit, release=()):\n    for p, (is_and, a, b) in enumerate(seed):\n        if p == omit or p in release or omit + 9 in (a, b):\n            continue\n        h = p - int(p > omit)\n        new_a = a - int(a > omit + 9)\n        new_b = b - int(b > omit + 9)\n        yield left[h][new_a]\n        yield right[h][new_b]\n        yield operations[h] if is_and else -operations[h]\n\ndef neighborhoods():\n    if args.neighborhood == \"control\":\n        # Omitting virtual index 14 retains all gates and wire numbers.\n        yield None, None, list(fixed_literals(14))\n    elif args.neighborhood == \"repair\":\n        for omit in range(13):\n            candidates = [p for p in range(14) if p != omit]\n            for release in itertools.combinations(candidates, args.radius):\n                yield omit, release, list(fixed_literals(omit, release))\n    else:\n        yield None, None, []\n\ndef critical_rows(active):\n    # For each gate and each target polarity, choose a boundary row where\n    # forcing the gate to the opposite constant flips the circuit result.\n    # A minimum circuit would otherwise admit constant propagation.\n    for gate in range(len(operations) - 1):\n        wire = gate + 9\n        for label in (True, False):\n            indices = [j for j, m in enumerate(rows) if target(m) == label]\n            selected = onehot(len(indices))\n            wires = [\n                multiplexer(selected, [signature[j] for j in indices])\n                for signature in signatures[:wire + 1]\n            ]\n            add(-active, wires[-1] if label else -wires[-1])\n            wires[-1] = neg(wires[-1])\n            for h in range(gate + 1, len(operations)):\n                x = multiplexer(left[h], wires)\n                y = multiplexer(right[h], wires)\n                wires.append(combine(operations[h], x, y))\n            add(-active, -wires[-1] if label else wires[-1])\n\nsignatures = [[bool(m & (1 << bit)) for m in rows] for bit in range(9)]\nleft, right, operations = [], [], []\nfor count in range(1, args.maximum + 1):\n    n = len(signatures)\n    a, b = onehot(n), onehot(n)\n    op = fresh()  # true means AND\n    for i in range(n):\n        for j in range(i + 1):\n            add(-a[i], -b[j])\n    if count == 1 and not args.neighborhood:\n        # Under row and column permutations and transpose, unordered pairs of\n        # edges have two orbits: incident and disjoint. Fix lexicographic reps.\n        add(a[0])\n        add(b[1], b[4])\n    if count > 1 and not args.neighborhood:\n        # A lexicographically least topological sequence cannot have a\n        # decreasing first operand at consecutive independent gates.\n        for i in range(n - 1):\n            for j in range(i):\n                add(-left[-1][i], -a[j], b[-1])\n        # If tied on the first operand, order on the second operand.\n        for i in range(n - 1):\n            for j in range(i + 2, n - 1):\n                for k in range(i + 1, j):\n                    add(-left[-1][i], -a[i], -right[-1][j], -b[k])\n\n    signature = []\n    lhs, rhs = [], []\n    for row, wires in enumerate(zip(*signatures)):\n        x = multiplexer(a, wires)\n        y = multiplexer(b, wires)\n        lhs.append(x)\n        rhs.append(y)\n        signature.append(combine(op, x, y))\n    if args.distinct:\n        for previous in signatures:\n            different(signature, previous)\n    if args.irredundant:\n        add(*signature[:len(terms)])\n        add(*[-z for z in signature[len(terms):]])\n        for previous in signatures:\n            improves(signature, previous)\n        # Exploit the two immediate substitution tests without waiting for\n        # the solver to infer the connection through the multiplexer.\n        for aa, bb in ((lhs, rhs), (rhs, lhs)):\n            for is_and in (False, True):\n                witnesses = []\n                for m, x, y in zip(rows, aa, bb):\n                    if is_and == target(m):\n                        continue\n                    w = fresh()\n                    add(-w, -x if is_and else x)\n                    add(-w, y if is_and else -y)\n                    witnesses.append(w)\n                add(-op if is_and else op, *witnesses)\n    signatures.append(signature)\n    left.append(a)\n    right.append(b)\n    operations.append(op)\n    if count < args.first:\n        continue\n\n    # Activated only for this size. A minimum circuit uses every input\n    # (the target depends on all of them) and every non-output gate.\n    active = fresh()\n    if args.critical:\n        critical_rows(active)\n    for i in range(n):\n        add(-active, *(table[i] for table in left + right if i < len(table)))\n    if args.last_operation:\n        add(-active, op if args.last_operation == \"and\" else -op)\n    observations = [fresh() for _ in rows]\n    for sel, row, z in zip(observations, rows, signature):\n        add(-sel, z if target(row) else -z)\n\n    attempts = {False: 0, True: 0, None: 0}\n    core_sizes = []\n    total_start = time.monotonic()\n    for omit, release, fixed in neighborhoods():\n        start = time.monotonic()\n        solver.conf_budget(args.conflicts)\n        result = solver.solve_limited(assumptions=[active, *observations, *fixed])\n        attempts[result] += 1\n        if not args.neighborhood or result is True:\n            print(count, result, round(time.monotonic() - start, 2),\n                  solver.accum_stats(), flush=True)\n        if result is False:\n            core = set(solver.get_core())\n            core_sizes.append((len(core.intersection(observations)), len(core.intersection(fixed))))\n            if not args.neighborhood:\n                print(\"core rows:\", [m for m, p in zip(rows, observations) if p in core],\n                      \"requires coverage:\", active in core, flush=True)\n        if result:\n            model = {lit for lit in solver.get_model() if lit > 0}\n            gates = [(op in model, next(i for i, lit in enumerate(a) if lit in model),\n                      next(i for i, lit in enumerate(b) if lit in model))\n                     for op, a, b in zip(operations, left, right)]\n            for m in range(512):\n                wires = [bool(m & (1 << i)) for i in range(9)]\n                for is_and, a, b in gates:\n                    wires.append((wires[a] and wires[b]) if is_and else (wires[a] or wires[b]))\n                assert wires[-1] == target(m), m\n            print(\"witness:\", gates, \"verified on 512 rows\", flush=True)\n            if args.neighborhood:\n                print(\"omitted:\", omit, \"released:\", release, flush=True)\n                break\n    if args.neighborhood:\n        print(\"neighborhoods:\", attempts, \"seconds:\", round(time.monotonic()-total_start, 2),\n              \"core minimum (row count, fixed selector count):\", min(core_sizes, default=None),\n              flush=True)\n","range":"Nine inputs, six positive masks, fifteen negative masks, exact sizes 1–14; also local repairs of one 14-gate witness at size 13.","command":"PYTHONPATH=solver python3 search.py 14 200000 --solver glucose4\nPYTHONPATH=solver python3 search.py 14 200000 --distinct\nPYTHONPATH=solver python3 search.py 9 3000000 --first 9 --solver glucose4\nPYTHONPATH=solver python3 search.py 14 500000 --irredundant --solver glucose4\nPYTHONPATH=solver python3 search.py 13 1500000 --irredundant --first 13 --solver cadical195\nPYTHONPATH=solver python3 search.py 14 10000 --first 14 --neighborhood control --irredundant\nPYTHONPATH=solver python3 canonical-control.py 14 10000 --first 14 --neighborhood control --irredundant\nPYTHONPATH=solver python3 canonical-control.py 14 10000 --first 14 --neighborhood control --irredundant --critical\nPYTHONPATH=solver python3 search.py 13 120000 --first 13 --irredundant --critical --solver glucose4\nPYTHONPATH=solver python3 search.py 13 300000 --first 13 --irredundant --critical --solver glucose4 --last-operation and\nPYTHONPATH=solver python3 search.py 13 300000 --first 13 --irredundant --critical --solver glucose4 --last-operation or\nPYTHONPATH=solver python3 search.py 13 10000 --first 13 --neighborhood repair --irredundant\nPYTHONPATH=solver python3 search.py 13 5000 --first 13 --neighborhood repair --radius 2 --irredundant\nPYTHONPATH=solver python3 search.py 13 20000 --first 13 --neighborhood repair --radius 4 --irredundant","exitCode":null,"runNotes":"False is solver UNSAT, True is SAT, and None means the per-call conflict budget ended without a decision. The broader irredundant run was interrupted after reporting UNSAT at size nine to prioritize targeted size-13 runs. Individual process exit codes were not captured for the two initial background runs. Their wrapper completed with exit 0. Some intermediate core rows are omitted from the logs. The 1.5-million-conflict targeted run was interrupted after over 30 minutes without a decision.","output":[{"range":"plain","command":"PYTHONPATH=solver python3 search.py 14 200000 --solver glucose4","exitCode":null,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n1 False 0.0 {'restarts': 1, 'conflicts': 1, 'decisions': 0, 'propagations': 32}\ncore rows: [] requires coverage: True\n2 False 0.0 {'restarts': 2, 'conflicts': 6, 'decisions': 3, 'propagations': 134}\ncore rows: [] requires coverage: True\n3 False 0.0 {'restarts': 3, 'conflicts': 16, 'decisions': 16, 'propagations': 546}\n4 False 0.05 {'restart\n[intermediate log omitted]\nns': 662148, 'propagations': 37708181}\n11 None 117.98 {'restarts': 1515, 'conflicts': 682579, 'decisions': 937613, 'propagations': 57447862}\n12 None 415.9 {'restarts': 1630, 'conflicts': 884142, 'decisions': 1209620, 'propagations': 78995597}\n13 None 512.29 {'restarts': 1881, 'conflicts': 1084684, 'decisions': 1494887, 'propagations': 99207432}\n14 None 359.4 {'restarts': 2158, 'conflicts': 1285137, 'decisions': 1788030, 'propagations': 118573347}"},{"range":"distinct","command":"PYTHONPATH=solver python3 search.py 14 200000 --distinct","exitCode":null,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n1 False 0.0 {'restarts': 0, 'conflicts': 1, 'decisions': 0, 'propagations': 34}\ncore rows: [] requires coverage: True\n2 False 0.0 {'restarts': 0, 'conflicts': 6, 'decisions': 20, 'propagations': 339}\n3 False 0.0 {'restarts': 0, 'conflicts': 21, 'decisions': 63, 'propagations': 1189}\n4 False 0.0 {'restarts': 12, 'conflicts': 108, 'decisions'\n[intermediate log omitted]\n417, 'propagations': 63859616}\n11 None 369.91 {'restarts': 23054, 'conflicts': 695346, 'decisions': 1120771, 'propagations': 92633624}\n12 None 697.69 {'restarts': 29738, 'conflicts': 895348, 'decisions': 1591921, 'propagations': 124991534}\n13 None 398.61 {'restarts': 35282, 'conflicts': 1095348, 'decisions': 2059179, 'propagations': 158844174}\n14 None 261.7 {'restarts': 42692, 'conflicts': 1295348, 'decisions': 2650435, 'propagations': 194309739}"},{"range":"budget9","command":"PYTHONPATH=solver python3 search.py 9 3000000 --first 9 --solver glucose4","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n9 False 381.4 {'restarts': 1699, 'conflicts': 293278, 'decisions': 394883, 'propagations': 21098926}\ncore rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504] requires coverage: True"},{"range":"irredundant","command":"PYTHONPATH=solver python3 search.py 14 500000 --irredundant --solver glucose4","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n1 False 0.0 {'restarts': 1, 'conflicts': 1, 'decisions': 0, 'propagations': 53}\ncore rows: [] requires coverage: True\n2 False 0.0 {'restarts': 2, 'conflicts': 4, 'decisions': 16, 'propagations': 217}\n3 False 0.0 {'restarts': 3, 'conflicts': 16, 'decisions': 44, 'propagations': 972}\n4 False 0.0 {'restarts': 4, 'conflicts': 83, 'decisions': 1\n[intermediate log omitted]\n4574, 'propagations': 169487982}\n11 None 310.62 {'restarts': 2584, 'conflicts': 1457752, 'decisions': 1920047, 'propagations': 277709754}\n12 None 308.3 {'restarts': 2857, 'conflicts': 1958665, 'decisions': 2566916, 'propagations': 386259181}\n13 None 449.1 {'restarts': 3455, 'conflicts': 2459423, 'decisions': 3252884, 'propagations': 503640455}\n14 None 431.32 {'restarts': 4446, 'conflicts': 2964778, 'decisions': 3981378, 'propagations': 620029642}"},{"range":"long13","command":"PYTHONPATH=solver python3 search.py 13 1500000 --irredundant --first 13 --solver cadical195","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n13 None 2519.29 {'restarts': 93621, 'conflicts': 1500002, 'decisions': 5185530, 'propagations': 379945145}"},{"range":"control","command":"PYTHONPATH=solver python3 search.py 14 10000 --first 14 --neighborhood control --irredundant","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n14 True 0.01 {'restarts': 0, 'conflicts': 0, 'decisions': 594, 'propagations': 3851}\nwitness: [(True, 1, 5), (True, 2, 4), (True, 0, 5), (False, 9, 10), (True, 2, 3), (True, 0, 4), (True, 1, 3), (False, 14, 15), (True, 6, 12), (True, 8, 16), (False, 11, 13), (True, 7, 19), (False, 18, 20), (False, 17, 21)] verified on 512 rows\nomitted: None released: None\nneighborhoods: {False: 0, True: 1, None: 0} seconds: 0.11 core minimum (row count, fixed selector count): None"},{"range":"canonical","command":"PYTHONPATH=solver python3 canonical-control.py 14 10000 --first 14 --neighborhood control --irredundant","exitCode":0,"output":"canonical seed: [(0, 4, True), (0, 5, True), (1, 3, True), (1, 5, True), (2, 3, True), (2, 4, True), (9, 11, False), (8, 15, True), (10, 13, False), (7, 17, True), (12, 14, False), (6, 19, True), (16, 18, False), (20, 21, False)]\nrows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n14 True 0.08 {'restarts': 0, 'conflicts': 0, 'decisions': 585, 'propagations': 3851}\nwitness: [(True, 0, 4), (True, 0, 5), (True, 1, 3), (True, 1, 5), (True, 2, 3), (True, 2, 4), (False, 9, 11), (True, 8, 15), (False, 10, 13), (True, 7, 17), (False, 12, 14), (True, 6, 19), (False, 16, 18), (False, 20, 21)] verified on 512 rows\nomitted: None released: None\nneighborhoods: {False: 0, True: 1, None: 0} seconds: 0.09 core minimum (row count, fixed selector count): None"},{"range":"critical-control","command":"PYTHONPATH=solver python3 canonical-control.py 14 10000 --first 14 --neighborhood control --irredundant --critical","exitCode":0,"output":"canonical seed: [(0, 4, True), (0, 5, True), (1, 3, True), (1, 5, True), (2, 3, True), (2, 4, True), (9, 11, False), (8, 15, True), (10, 13, False), (7, 17, True), (12, 14, False), (6, 19, True), (16, 18, False), (20, 21, False)]\nrows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n14 True 0.01 {'restarts': 6, 'conflicts': 62, 'decisions': 1684, 'propagations': 16189}\nwitness: [(True, 0, 4), (True, 0, 5), (True, 1, 3), (True, 1, 5), (True, 2, 3), (True, 2, 4), (False, 9, 11), (True, 8, 15), (False, 10, 13), (True, 7, 17), (False, 12, 14), (True, 6, 19), (False, 16, 18), (False, 20, 21)] verified on 512 rows\nomitted: None released: None\nneighborhoods: {False: 0, True: 1, None: 0} seconds: 0.09 core minimum (row count, fixed selector count): None"},{"range":"critical13","command":"PYTHONPATH=solver python3 search.py 13 120000 --first 13 --irredundant --critical --solver glucose4","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n13 None 64.38 {'restarts': 757, 'conflicts': 120011, 'decisions': 273930, 'propagations': 25534653}"},{"range":"final-and","command":"PYTHONPATH=solver python3 search.py 13 300000 --first 13 --irredundant --critical --solver glucose4 --last-operation and","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n13 None 182.59 {'restarts': 2117, 'conflicts': 312848, 'decisions': 599528, 'propagations': 66224483}"},{"range":"final-or","command":"PYTHONPATH=solver python3 search.py 13 300000 --first 13 --irredundant --critical --solver glucose4 --last-operation or","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\n13 None 222.08 {'restarts': 2176, 'conflicts': 302944, 'decisions': 598209, 'propagations': 65654582}"},{"range":"repair","command":"PYTHONPATH=solver python3 search.py 13 10000 --first 13 --neighborhood repair --irredundant","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\nneighborhoods: {False: 169, True: 0, None: 0} seconds: 1.31 core minimum (row count, fixed selector count): (0, 5)"},{"range":"repair2","command":"PYTHONPATH=solver python3 search.py 13 5000 --first 13 --neighborhood repair --radius 2 --irredundant","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\nneighborhoods: {False: 1014, True: 0, None: 0} seconds: 4.8 core minimum (row count, fixed selector count): (0, 5)"},{"range":"repair4","command":"PYTHONPATH=solver python3 search.py 13 20000 --first 13 --neighborhood repair --radius 4 --irredundant","exitCode":0,"output":"rows: [273, 161, 266, 98, 140, 84, 63, 79, 121, 151, 186, 219, 295, 316, 365, 438, 455, 457, 466, 484, 504]\nneighborhoods: {False: 9295, True: 0, None: 0} seconds: 525.39 core minimum (row count, fixed selector count): (0, 4)"}],"canonicalControlProgram":"import itertools\nimport re\nfrom pathlib import Path\n\nseed = [\n    (True, 1, 5), (True, 2, 4), (True, 0, 5), (False, 9, 10),\n    (True, 2, 3), (True, 0, 4), (True, 1, 3), (False, 14, 15),\n    (True, 6, 12), (True, 8, 16), (False, 11, 13), (True, 7, 19),\n    (False, 18, 20), (False, 17, 21),\n]\n\ndef order(perm):\n    remaining = set(range(14))\n    known = dict(enumerate(perm))\n    result = []\n    while remaining:\n        options = []\n        for p in remaining:\n            op, a, b = seed[p]\n            if a in known and b in known:\n                left, right = sorted([known[a], known[b]])\n                options.append((left, right, op, p))\n        left, right, op, p = min(options)\n        known[p + 9] = len(result) + 9\n        remaining.remove(p)\n        result.append((left, right, op))\n    return result\n\nperms = list(itertools.permutations(range(3)))\ncanon = min(\n    order([3*u[j]+v[i] if swap else 3*u[i]+v[j] for i in range(3) for j in range(3)])\n    for u in perms for v in perms for swap in (False, True)\n)\nprint('canonical seed:', canon, flush=True)\nsource = Path('search.py').read_text()\nsource = re.sub(r'seed = \\[.*?\\n\\]', 'seed = ' + repr([(op, a, b) for a, b, op in canon]), source, flags=re.S)\nsource = source.replace('and not args.neighborhood:', 'and args.neighborhood != \"repair\":')\nexec(compile(source, 'search.py with canonical control', 'exec'))\n","encoding":"Each exact-size candidate has two distinct earlier wire operands per gate, all nine inputs and prior gates used, and the output at the last gate. In a minimum circuit, propagate constants (including missing reads) and bypass copies or duplicated operands, then remove dead gates. These rewrites preserve correctness and justify the normalized search space informally. The canonical search picks incident/disjoint first pairs as representatives and locally orders adjacent independent gates. Optional dominance constraints remove gates that could be bypassed by an earlier wire on every boundary row. The optional critical-row test requires that each non-output gate has both a positive row that fails when forced false and a negative row that fails when forced true. Neighborhood results additionally fix the untouched seed gates and quantify only over those choices."}],"usefulLemmas":["boundary: pointwise monotonicity holds for the actual List.getD semantics, including empty gates, unary gates and reads of absent wires. A finite kernel decision establishes that each true assignment contains one of the six positive masks and each false assignment is contained in one of the fifteen negative masks.","size_lower_bound: starting from the output wire, process a demand set backwards. Removing a demanded gate’s output and inserting its at most two predecessors increases demand cardinality by at most one. The fold preserves evaluation when its initial lists agree on every demanded wire. Flipping each of the nine input bits on a suitable perfect matching proves that all nine belong to the demand set. Hence 9 ≤ |gates| + 1.","suffix_substitution: with an AND/OR suffix, replacing a gate’s value with a larger value on a positive row or smaller value on a negative row preserves agreement on that row. The solver’s earlier-wire dominance condition uses this argument before deleting the gate and rewiring its consumers.","Plain Glucose4 at sizes 1 and 2 returned cores containing just the joint coverage assumption, motivating a structural demand count independent of truth-table equality. The size-9 core included coverage and all 21 row assumptions and supplied no row reduction. The cores are solver output and were not replayed as proof certificates."],"failedApproaches":["Exhaustive synthesis with one-hot fanins, ordering symmetry, distinct or dominance-constrained signatures, and conflict-limited incremental solving failed to decide the unrestricted 13-gate case.","Local repair returned UNSAT in 169, 1,014 and 9,295 assumption calls with one, two and four extra gate releases respectively. These calls only exclude the tested neighborhoods, and some calls share the same set of free gates.","The independent checker processes were interrupted during replay to leave time for delivery.","The pinned CLI treats helper as a gap label rather than a check mode. The official checker can judge the supporting statement using check.","The broad Mathlib import build was stopped before it returned. The final file imports only the four needed Mathlib submodules and the pinned definitions root, as confirmed by the outside import guard.","The first direct verifier replay located a shadow package root with no Defs.olean and returned exit 3. The retry uses the Lake-built module and the project package root.","The first cache run omitted transport proxy variables and hit DNS resolution failures; the retry fetched and decompressed all 9117 files."],"openObligations":["Either exhibit a valid circuit at size ≤ 13 or certify that every size ≤ 13 fails. The proof of the lower bound eight is independent of the external SAT answers.","For a formal refutation, prove the normalization and CNF completeness in Lean, then replay an UNSAT certificate for the entire relevant size range. The present proof handles boundary rows, demand cardinality and a suffix substitution step, while topological normalization and SAT certificate checking remain informal."],"nextExperiment":"Export proof traces for the completed size-nine exclusions. For the open sizes, refine the final-operation split by first-gate orbit, and formalize normalization and CNF completeness in Lean before using any UNSAT trace as a lower-bound certificate.","leaseStatus":"None. No assignments acquired, renewed or released by CD05.","submissionStatus":"No external submission or desk write. The attached Lean module is a supporting result for this gap."}
