{
 "summary": "Bounded search only; P1 is neither proved nor refuted. SAT encoding (kissat 4.0.4) of 'an AND/OR fan-in-2 backward-reading circuit with exactly k gates, output = last gate, all non-output gates used, operands i<=j allowed equal, agrees with f on CT01's 32 boundary points': UNSAT for k=4,5,6,7 (1.5s,4.1s,10.3s,101.5s); timeout (545s) for every k=8..19; k=8 also timed out under 4 other configs, k=9 under 2. The encoding admits a superset of minimal IsAO2 circuits and is padding-monotone, so UNSAT at k=7 means (by CT01's boundary equivalence) no IsAO2 circuit of size <=7 computes f, an unformalized solver result (no DRAT proof checked) extending CD01's <=3. Sanity: the encoding is SAT with the 19-gate star circuit fixed. Stochastic local search (simulated annealing on 32-bit wire words) for k=18 (8 runs x ~520s) and k=17 (2 runs) found no hit: best mismatch 1 of 32 points. No counterexample, so no Lean refute witness was written. Largest k proved UNSAT: 7 (bounded, not a proof of 19).",
 "agentId": "CD02",
 "strategyId": "CD02-sat-and-local-search-refutation",
 "status": "no-progress",
 "env": {
  "workspaceCommit": "0243d7da4a4337ae8b16bcdf15bb4ead736fd68f",
  "upstreamPins": "from inputs: open-goat/pequalnp-proofs 8dec1cacf8aab169f12858fff3a2e945fea7a880, leanprover/lean4:v4.36.0, mathlib fc4f59e577feb1a4956671bc04ac18aaaf8cd842 (not built here: no Lean artifact was needed since no hit)",
  "target": {
   "id": "L-meta-18367",
   "statement": "let x1 : SimpleGraph (Fin (11 : ℕ)) := PEqualNP.EdgeOwnership.edgeGraph (11 : ℕ) [((0 : ℕ), (9 : ℕ)), ((0 : ℕ), (10 : ℕ)), ((1 : ℕ), (4 : ℕ)), ((1 : ℕ), (8 : ℕ)), ((2 : ℕ), (5 : ℕ)), ((2 : ℕ), (10 : ℕ)), ((3 : ℕ), (6 : ℕ)), ((3 : ℕ), (7 : ℕ)), ((4 : ℕ), (8 : ℕ)), ((4 : ℕ), (10 : ℕ)), ((5 : ℕ), (8 : ℕ)), ((5 : ℕ), (9 : ℕ)), ((6 : ℕ), (7 : ℕ)), ((6 : ℕ), (10 : ℕ)), ((7 : ℕ), (9 : ℕ)), ((8 : ℕ), (9 : ℕ))]; ∀ (x2 : PEqualNP.CircuitLowerBounds.Circuit), PEqualNP.TopForm.IsAO2 (10 : ℕ) x2 → (∀ (x4 : Fin (10 : ℕ) → Bool), PEqualNP.MetaComplexity.circuitFun (10 : ℕ) x2 x4 = PEqualNP.MetaComplexity.NestedCover.graphFun x1 ∅ (Fin.insertNth (0 : Fin (11 : ℕ)) Bool.false x4)) → (19 : ℕ) ≤ x2.size",
   "statementSha256": "9c8662943df407b07492b78a3ba2d6d036b1c592694d93afce0f264b602535b2",
   "bytes": 785,
   "kind": "check",
   "imports": [
    "PEqualNP.Defs"
   ]
  },
  "cleanRunSource": "inputs after-mp01/after-ct01/after-cd01 (capsule recipe); not exercised: no Lean build was run",
  "solver": "kissat 4.0.4 binary from https://github.com/arminbiere/kissat/releases/download/rel-4.0.4/kissat-4.0.4-linux-amd64.zip (zip sha256 63282e5168ca040a2018edfba0726bf893a7a6bcdb1db87feb67857e2da697a7, binary sha256 21da5d984e38b74f620f14c62442f834f27b9158decdb722540d97f98aac93a1), unpacked in test/scratch/bin; machine 16 cores, no C compiler or pip",
  "commands": [
   "python3 -I -c 'import enc; [enc.encode(k,f\"run/k{k}.cnf\") for k in range(4,21)]'",
   "timeout 545 bin/kissat -q --seed=0 run/kK.cnf   (K=4..19, in parallel)",
   "timeout 540 bin/kissat -q <cfg> run/k8.cnf | run/k9.cnf",
   "python3 ls.py K 520 SEED  (K=18 seeds 7,8,11-16; K=17 seeds 21,22)",
   "python3 -I star.py; bin/kissat -q star.cnf"
  ],
  "cnfHashes": {
   "k7.cnf": "c6f658109670f72a4e85713e105bb20e28f81e461749d25084186b6c621322eb (861 vars, 9124 clauses)",
   "k18.cnf": "5ba726773b635612a37ebf5b5fc8bafa19f76b37da28808f5bfd95f3fef16c81 (2412 vars, 37801 clauses)"
  }
 },
 "artifacts": [],
 "verification": [
  {
   "artifactSha256": null,
   "command": "python3 assert: f(mask)==(index<14) for CT01's 32 boundary masks; star circuit checked on all 1024 inputs",
   "exitCode": 0,
   "verdict": "masks consistent with H (14 positives, 18 negatives); star circuit computes f on 1024 inputs",
   "logExcerpt": "masks ok / (0, 2, 4, 6, 7, 9) 19 True / s SATISFIABLE"
  }
 ],
 "experiments": [
  {
   "program": "import sys, itertools\nE0=[(0,3),(0,7),(1,4),(1,9),(2,5),(2,6),(3,7),(3,9),(4,7),(4,8),(5,6),(5,9),(6,8),(7,8)]\nN=10\ndef f(x): return any((x>>a)&1 and (x>>b)&1 for a,b in E0)\nmasks=[9,129,18,514,36,68,136,520,144,272,96,544,320,384,28,49,56,67,74,88,134,162,194,263,270,291,298,533,593,644,704,773]\nP=len(masks)\ndef encode(k,out):\n    nv=[0]; cl=[]\n    def new():\n        nv[0]+=1; return nv[0]\n    val={}\n    for w in range(N):\n        for p,m in enumerate(masks): val[w,p]=bool((m>>w)&1)  # constants\n    L={};R={};T={}\n    for g in range(k):\n        W=N+g\n        T[g]=new()\n        for w in range(W): L[g,w]=new(); R[g,w]=new()\n        A=[new() for p in range(P)]; B=[new() for p in range(P)]\n        V=[new() for p in range(P)]\n        for p in range(P): val[W,p]=V[p]\n        cl.append([L[g,w] for w in range(W)]); cl.append([R[g,w] for w in range(W)])\n        for w in range(W):\n            for w2 in range(w): cl.append([-L[g,w],-R[g,w2]])\n        for w in range(W):\n            for p in range(P):\n                for (X,S_) in ((A,L),(B,R)):\n                    x=val[w,p]; s=S_[g,w]\n                    if x is False: cl.append([-s,-X[p]])\n                    elif x is True: cl.append([-s,X[p]])\n                    else: cl.append([-s,-X[p],x]); cl.append([-s,X[p],-x])\n        t=T[g]\n        for p in range(P):\n            a,b,v=A[p],B[p],V[p]\n            # AND when t\n            cl+= [[-t,-v,a],[-t,-v,b],[-t,v,-a,-b]]\n            cl+= [[t,v,-a],[t,v,-b],[t,-v,a,b]]\n    for p,m in enumerate(masks):\n        v=val[N+k-1,p]; cl.append([v] if f(m) else [-v])\n    for g in range(k-1):\n        W=N+g; cl.append([L[h,W] for h in range(g+1,k)]+[R[h,W] for h in range(g+1,k)])\n    with open(out,'w') as fh:\n        fh.write(f\"p cnf {nv[0]} {len(cl)}\\n\")\n        for c in cl: fh.write(\" \".join(map(str,c))+\" 0\\n\")\n    return L,R,T\ndef decode(k,L,R,T,model):\n    pos=set(x for x in model if x>0); gates=[]\n    for g in range(k):\n        W=N+g\n        l=min(w for w in range(W) if L[g,w] in pos); r=max(w for w in range(W) if R[g,w] in pos)\n        gates.append(('AND' if T[g] in pos else 'OR',l,r))\n    return gates\ndef evalc(gates,x):\n    v=[(x>>i)&1 for i in range(N)]\n    for op,a,b in gates: v.append(v[a]&v[b] if op=='AND' else v[a]|v[b])\n    return v[-1]\nif __name__=='__main__':\n    k=int(sys.argv[1]); encode(k,sys.argv[2])\n",
   "programSha256": "c7c0438d3cdffbe5e81b4ae4b36328725ab8454f02bdc415c5888470858a597f",
   "range": "k=4..19 gates, 32 boundary points",
   "command": "timeout 545 kissat -q --seed=0 kK.cnf",
   "exitCode": "20 for k=4..7; 124 (timeout) for k=8..19",
   "output": [
    {
     "k": 4,
     "verdict": "UNSAT",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 1.47
    },
    {
     "k": 5,
     "verdict": "UNSAT",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 4.06
    },
    {
     "k": 6,
     "verdict": "UNSAT",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 10.26
    },
    {
     "k": 7,
     "verdict": "UNSAT",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 101.46
    },
    {
     "k": 8,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 9,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 10,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 11,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 12,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 13,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 14,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 15,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 16,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 17,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 18,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 19,
     "verdict": "timeout",
     "solver": "kissat 4.0.4 (-q --seed=0)",
     "seconds": 545
    },
    {
     "k": 8,
     "verdict": "timeout",
     "solver": "kissat 4.0.4, configs --seed=1, --seed=2, --unsat, --seed=3 --unsat",
     "seconds": 540
    },
    {
     "k": 9,
     "verdict": "timeout",
     "solver": "kissat 4.0.4, configs --unsat, --seed=4",
     "seconds": 540
    },
    {
     "k": 19,
     "verdict": "SAT (sanity: encoding + unit clauses fixing the known 19-gate star circuit; 6 AND, 13 OR, cover {1,3,5,7,8,10} original numbering)",
     "solver": "kissat 4.0.4",
     "seconds": "<1"
    }
   ]
  },
  {
   "program": "import random,sys,time\nsys.path.insert(0,'.')\nimport enc\nk=int(sys.argv[1]); secs=float(sys.argv[2]); seed=int(sys.argv[3]); random.seed(seed)\nN=10; FULL=(1<<32)-1\ninp=[sum(((m>>w)&1)<<p for p,m in enumerate(enc.masks)) for w in range(N)]\ntgt=sum(1<<p for p in range(14))\ndef ev(G):\n    v=inp[:]\n    for op,a,b in G: v.append(v[a]&v[b] if op else v[a]|v[b])\n    return bin(v[-1]^tgt).count('1')\ndef rg(g): W=N+g; return (random.randint(0,1),random.randrange(W),random.randrange(W))\nbest=None;bestc=99;t0=time.time();it=0;restarts=0\nwhile time.time()-t0<secs:\n    G=[rg(g) for g in range(k)]; c=ev(G); T=2.0; restarts+=1\n    for step in range(200000):\n        g=random.randrange(k); old=G[g]\n        r=random.random(); op,a,b=old\n        if r<0.2: G[g]=(1-op,a,b)\n        elif r<0.6: G[g]=(op,random.randrange(N+g),b)\n        else: G[g]=(op,a,random.randrange(N+g))\n        c2=ev(G); it+=1\n        if c2<=c or random.random()<pow(2.718,(c-c2)/T): c=c2\n        else: G[g]=old\n        T=max(0.05,T*0.99997)\n        if c<bestc: bestc=c;best=list(G)\n        if c==0: break\n    if bestc==0: break\nfull=None\nif bestc==0: full=all(enc.evalc([('AND' if o else 'OR',a,b) for o,a,b in best],x)==enc.f(x) for x in range(1024))\nprint(f\"k={k} seed={seed} secs={time.time()-t0:.0f} iters={it} restarts={restarts} best_mismatch={bestc} full1024={full} best={best if bestc==0 else ''}\")\n",
   "programSha256": "272455e340c13938357fa2799e77d9f0a1ebe187df0cb5467830129472fe2429",
   "range": "k=18 (seeds 7,8,11,12,13,14,15,16), k=17 (seeds 21,22), ~520s each, ~4-5M moves each",
   "command": "python3 ls.py 18 520 SEED",
   "exitCode": 0,
   "output": "best mismatch on 32 points: k=18 seeds 7:2, 8:1, 11:2, 12:1, 13:1, 14:2, 15:1, 16:1; k=17 seeds 21:1, 22:1; no zero-mismatch circuit (calibration: k=25 found a correct circuit in 1s and it was rechecked on all 1024 inputs)"
  },
  {
   "program": "import sys,itertools; sys.path.insert(0,'..'); import enc\nE0=enc.E0\nfor C in itertools.combinations(range(10),6):\n    if all(a in C or b in C for a,b in E0): break\nG=[];outs=[];used=set()\nfor c in C:\n    nb=[b if a==c else a for a,b in E0 if c in (a,b) and (a,b) not in used]\n    for e in E0:\n        if c in e: used.add(e)\n    if not nb: continue\n    w=nb[0]\n    for u in nb[1:]: G.append(('OR',w,u)); w=10+len(G)-1\n    G.append(('AND',c,w)); outs.append(10+len(G)-1)\nw=outs[0]\nfor o in outs[1:]: G.append(('OR',w,o)); w=10+len(G)-1\nprint(C,len(G), all(enc.evalc(G,x)==enc.f(x) for x in range(1024)))\nk=len(G); L,R,T=enc.encode(k,'star.cnf')\nunits=[]\nfor g,(op,a,b) in enumerate(G):\n    a,b=min(a,b),max(a,b); units+= [L[g,a],R[g,b], T[g] if op=='AND' else -T[g]]\nwith open('star.cnf') as fh: lines=fh.read().split('\\n',1)\nh=lines[0].split(); open('star.cnf','w').write(f\"p cnf {h[2]} {int(h[3])+len(units)}\\n\"+lines[1]+\"\".join(f\"{u} 0\\n\" for u in units))\n",
   "programSha256": "8f2b7cefd4cd28476245eef35329c5834ac0c6387f496cf252a00c512e79cee5",
   "range": "k=19 with units fixing the star circuit",
   "command": "python3 -I star.py; kissat -q star.cnf",
   "exitCode": 10,
   "output": "s SATISFIABLE"
  }
 ],
 "usefulLemmas": [
  "Bounded (solver, unformalized): no IsAO2 circuit with <=7 gates agrees with f on the 32 boundary points, hence none computes f.",
  "SA landscape: 17- and 18-gate circuits reach 31/32 boundary points routinely."
 ],
 "failedApproaches": [
  "Plain kissat on the direct encoding without gate-order symmetry breaking does not finish k>=8 within 545s.",
  "Simulated annealing at k=17,18: stuck at 1 mismatch."
 ],
 "openObligations": [
  "P1 (>=19) remains open.",
  "UNSAT for k<=7 has no checked DRAT certificate and no Lean formalization.",
  "k=8..18 undecided."
 ],
 "nextExperiment": "Add sound symmetry breaking (canonical topological order of independent adjacent gates, distinct gate functions, no gate equal to an input, AND/OR alternation normal forms), emit DRAT with kissat and check with drat-trim; use cube-and-conquer over the output gate's type and operands to push k=8..12; for k=18 restrict to normalized circuits (no constant/duplicate wires).",
 "leaseStatus": "not-acquired (no pnp.sh/gh/desk use)",
 "submissionStatus": "not-submitted; nothing to submit (no proof, no counterexample)",
 "notes": [
  "A naming slip made the k=8 --seed=1 and --seed=2 runs write the same log file; both ran 540s, and the surviving log records a timeout with no 's' result line."
 ]
}