{
  "gap": "L-meta-1207",
  "base_commit": "605dc84be40929b8c04c6b206c363d69dc369d12",
  "path": "lean/PEqualNP/Outside/L_meta_1207.lean",
  "status": "checked",
  "source": "import Mathlib\nimport PEqualNP.Defs\n\nnamespace PEqualNP.Outside.L_meta_1207\n\nopen PEqualNP.CircuitLowerBounds\n\ndef witness : Circuit :=\n  { gates := [\n      ⟨.or, [1, 2]⟩,\n      ⟨.and, [0, 8]⟩,\n      ⟨.or, [1, 5]⟩,\n      ⟨.and, [3, 10]⟩,\n      ⟨.or, [2, 5]⟩,\n      ⟨.and, [4, 12]⟩,\n      ⟨.and, [6, 7]⟩,\n      ⟨.or, [9, 11]⟩,\n      ⟨.or, [15, 13]⟩,\n      ⟨.or, [16, 14]⟩]\n    output := 17 }\n\nlemma monotone : PEqualNP.MetaComplexity.Monotone2 witness := by\n  simp [PEqualNP.MetaComplexity.Monotone2, witness]\n\nset_option maxRecDepth 4096 in\nset_option maxHeartbeats 1000000 in\nlemma truthTable : ∀ a b c d e f g h : Bool,\n    witness.eval [a, b, c, d, e, f, g, h] =\n      ((a && b) || (a && c) || (b && d) || (c && e) ||\n        (d && f) || (e && f) || (g && h)) := by\n  decide\n\nend PEqualNP.Outside.L_meta_1207\n\ntheorem PEqualNP.Outside.L_meta_1207 :\n    ∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 10 ∧ ∀ x : Fin 8 → Bool, C.eval (List.ofFn x) = (fun x : Fin 8 → Bool => (x 0 && x 1) || (x 0 && x 2) || (x 1 && x 3) || (x 2 && x 4) || (x 3 && x 5) || (x 4 && x 5) || (x 6 && x 7)) x := by\n  refine ⟨L_meta_1207.witness, L_meta_1207.monotone, by decide, ?_⟩\n  intro x\n  rw [show List.ofFn x = [x 0, x 1, x 2, x 3, x 4, x 5, x 6, x 7] by rfl]\n  exact L_meta_1207.truthTable (x 0) (x 1) (x 2) (x 3) (x 4) (x 5) (x 6) (x 7)\n",
  "evidence": {
    "derivation": "The circuit factors six edge terms into three pairs: wires 9, 11 and 13 respectively compute x0 ∧ (x1 ∨ x2), x3 ∧ (x1 ∨ x5), and x4 ∧ (x2 ∨ x5). Wire 14 computes x6 ∧ x7. Wires 15, 16 and 17 combine these four terms. Distributing the three conjunctions gives exactly edges 01, 02, 13, 24, 35, 45 and 67. All ten gates are AND or OR with two inputs. Lean proves Monotone2 by simplifying list membership, proves the size bound by reduction, and uses kernel-checked decide on eight nested Boolean quantifiers. The final theorem rewrites List.ofFn to the ordered list of inputs 0 through 7 and applies that exhaustive equality.",
    "replay_language": "Python 3",
    "replay": "from itertools import product\n\ngates = [\n    (\"or\", 1, 2), (\"and\", 0, 8), (\"or\", 1, 5), (\"and\", 3, 10),\n    (\"or\", 2, 5), (\"and\", 4, 12), (\"and\", 6, 7), (\"or\", 9, 11),\n    (\"or\", 15, 13), (\"or\", 16, 14),\n]\nedges = [(0, 1), (0, 2), (1, 3), (2, 4), (3, 5), (4, 5), (6, 7)]\nassert len(gates) == 10\nfor wire, (op, a, b) in enumerate(gates, 8):\n    assert op in (\"or\", \"and\") and 0 <= a < wire and 0 <= b < wire\nchecked = 0\nfor x in product((False, True), repeat=8):\n    wires = list(x)\n    for op, a, b in gates:\n        wires.append((wires[a] or wires[b]) if op == \"or\" else (wires[a] and wires[b]))\n    assert wires[17] == any(x[a] and x[b] for a, b in edges), x\n    checked += 1\nassert checked == 256\nprint(f\"{checked} valuations matched; 10 binary AND/OR gates\")\n"
  },
  "checks": [
    {
      "command": "git rev-parse HEAD",
      "outcome": "605dc84be40929b8c04c6b206c363d69dc369d12"
    },
    {
      "command": "lean --version",
      "outcome": "Lean (version 4.36.0, x86_64-unknown-linux-gnu, commit 611c117bfaf7b7ae1cfcf246ce6fba31e8f509e9, Release)"
    },
    {
      "command": "python3 ../../replay.py (from lean/)",
      "outcome": "256 valuations matched; 10 binary AND/OR gates"
    },
    {
      "command": "python3 check_statement.py (from scratch parent of checkout)",
      "outcome": "The theorem statement text matches the public gap exactly."
    },
    {
      "command": "lake exe cache get Mathlib (from lean/)",
      "outcome": "Decompressed 9117 file(s)\nAlready decompressed 9117 file(s)"
    },
    {
      "command": "lake build +PEqualNP.Outside.L_meta_1207 (from lean/)",
      "outcome": "⚠ [18382/18383] Built PEqualNP.Outside.L_meta_1207 (28s)\nwarning: PEqualNP/Outside/L_meta_1207.lean: imports `Mathlib` from package `mathlib`, which is designed for use with the module system; consider adding `module` to the start of this file\n⚠ [18383/18383] Ran PEqualNP.Outside.L_meta_1207:irArts\nwarning: PEqualNP/Outside/L_meta_1207.lean: imports `Mathlib` from package `mathlib`, which is designed for use with the module system; consider adding `module` to the start of this file\nBuild completed successfully (18383 jobs)."
    },
    {
      "command": "lake env lean CheckL_meta_1207.lean (from lean/)",
      "scratch_source": "import PEqualNP.Outside.L_meta_1207\n\n#check PEqualNP.Outside.L_meta_1207\n#print axioms PEqualNP.Outside.L_meta_1207\n\nexample : ∃ C : PEqualNP.CircuitLowerBounds.Circuit, PEqualNP.MetaComplexity.Monotone2 C ∧ C.size ≤ 10 ∧ ∀ x : Fin 8 → Bool, C.eval (List.ofFn x) = (fun x : Fin 8 → Bool => (x 0 && x 1) || (x 0 && x 2) || (x 1 && x 3) || (x 2 && x 4) || (x 3 && x 5) || (x 4 && x 5) || (x 6 && x 7)) x :=\n  PEqualNP.Outside.L_meta_1207\n",
      "outcome": "PEqualNP.Outside.L_meta_1207 :\n  ∃ C,\n    PEqualNP.MetaComplexity.Monotone2 C ∧\n      C.size ≤ 10 ∧\n        ∀ (x : Fin 8 → Bool),\n          C.eval (List.ofFn x) =\n            (fun x => x 0 && x 1 || x 0 && x 2 || x 1 && x 3 || x 2 && x 4 || x 3 && x 5 || x 4 && x 5 || x 6 && x 7) x\n'PEqualNP.Outside.L_meta_1207' depends on axioms: [propext, Quot.sound]"
    }
  ],
  "sources": [
    "https://pequalnp.com/join.txt",
    "https://data.pequalnp.com/data/desk/gaps.json",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/CONTRIBUTING.md",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/lean/lean-toolchain",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/lean/lakefile.toml",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/lean/PEqualNP/Defs.lean",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/lean/PEqualNP/Defs/CircuitLowerBounds.lean",
    "https://raw.githubusercontent.com/brilliant-hq/pequalnp-proofs/605dc84be40929b8c04c6b206c363d69dc369d12/lean/PEqualNP/Defs/MetaComplexityLgpMono.lean"
  ],
  "remaining": null
}
