{
 "agent": "MP08",
 "group": "mathematical proofs",
 "gap": "L-meta-18647",
 "strategy": "invariant: find a per-step measure raised by at most 1 per gate and needed at >=19 by the Petersen edge function, using forbidden gates and the forced head x_i OR (x0 AND x1); test on small graphs, then prove",
 "status": "evidence-only",
 "summary": "Desk read shows the gap open (not settled upstream). Observation (mathematical, by case check of the premises): the head gate must be x_i OR (x0 AND x1) with i in 2..9, since OR with false/true or with x0/x1 is not new and OR of two distinct inputs is forbidden. Exact minimum-size searches (IDDFS, program mincirc.py) over small graphs under the same rules show the natural invariant candidates fail: the bound |E|+tau(G)-1 is violated by K4 (exact min 6 with free edge+head, formula 8) and the 'edges already separated below f' count jumps by 2 in an optimal P5 circuit (y5=(x3|x1&(x2|x0x1))&(x4|x2|x0x1) adds edges 23 and 34 at once). Optimal small circuits also use the head pattern x2|(x0&x1) productively, so the head is not automatically a wasted gate. No invariant proved, no Lean proof file produced, no counterexample found. A bounded search is not a proof.",
 "desk": {
  "state": "open",
  "time": "2026-11-26T06:57:38Z",
  "url": "https://pequalnp.com/desk/step?gap=L-meta-18647"
 },
 "statementSha256": "d6b0ea1cb0acf29a540e253aee4295d896fe42286ed3f9e266a956da19cc971e",
 "statementSha256Recorded": "d6b0ea1cb0acf29a540e253aee4295d896fe42286ed3f9e266a956da19cc971e",
 "claims": [
  {
   "statement": "The first entry of any x2 satisfying the premises is (fun x => x i || (x 0 && x 1)) for some i in {2,...,9}.",
   "kind": "evidence",
   "path": null,
   "sha256": null,
   "elaboration": "not-run",
   "guard": "not-run",
   "checkLean": {
    "mode": null,
    "exit": null
   },
   "axioms": "not-run",
   "note": "hand argument from the premises only; not formalized"
  },
  {
   "statement": "Exact minimum gate counts under the gap's rules (plain / with free first-edge gate / free gate + OR head): P3 3/2/2, K3 5/4/4, P4 5/4/4, C4 7/6/6, K1,3 4/3/3, 2K2 3/2/3, P5 6/5/5, K4 7/6/6, 3K2 5/4/5.",
   "kind": "evidence",
   "path": "test/scratch/mincirc.py (not delivered; content below)",
   "sha256": "6488d9b71dec956eeb109ea5221e3ca9f29bf4aff68e192bfd703f48cdb4ac2f",
   "elaboration": "not-run",
   "guard": "not-run",
   "checkLean": {
    "mode": null,
    "exit": null
   },
   "axioms": "not-run"
  }
 ],
 "artifacts": [
  {
   "path": "test/scratch/mincirc.py",
   "sha256": "6488d9b71dec956eeb109ea5221e3ca9f29bf4aff68e192bfd703f48cdb4ac2f",
   "content": "# exact min monotone (AND/OR fan-in 2) straight-line program for graph edge function,\n# with forbidden gates: AND of two nonadjacent inputs, OR of two distinct inputs.\nimport sys, itertools\ndef run(n, E, free=None, head=False, maxk=12):\n    N=1<<n; full=(1<<N)-1\n    X=[sum(1<<a for a in range(N) if a>>i&1) for i in range(n)]\n    adj=set(); [adj.update({(u,v),(v,u)}) for u,v in E]\n    f=0\n    for u,v in E: f|=X[u]&X[v]\n    forb=set()\n    for u in range(n):\n        for v in range(n):\n            if u!=v:\n                forb.add(X[u]|X[v])\n                if (u,v) not in adj: forb.add(X[u]&X[v])\n    base=[0,full]+X+([X[free[0]]&X[free[1]]] if free else [])\n    def dfs(L,k,used):\n        if f in L: return True\n        if k==0: return False\n        # every gate after base must eventually be used; need unused<=k (last produces f)\n        nb=len(base); unused=sum(1 for i in range(nb,len(L)) if not used[i])\n        if unused>k+1: return False\n        S=set(L); m=len(L)\n        for i in range(m):\n            for j in range(i,m):\n                a,b=L[i],L[j]\n                for g in (a&b,a|b):\n                    if g in S or g in forb: continue\n                    if head and m==nb and g!=(a|b): continue\n                    if k==1 and g!=f: continue\n                    used2=used+[False]; ou=(used[i],used[j]); used2[i]=used2[j]=True\n                    L.append(g)\n                    if dfs(L,k-1,used2): L.pop(); return True\n                    L.pop()\n        return False\n    for k in range(0,maxk+1):\n        if dfs(list(base),k,[True]*len(base)): return k\n    return None\ndef tau(n,E):\n    for c in range(n+1):\n        for C in itertools.combinations(range(n),c):\n            if all(u in C or v in C for u,v in E): return c\nif __name__==\"__main__\":\n    tests={'P3':(3,[(0,1),(1,2)]),'K3':(3,[(0,1),(1,2),(0,2)]),'P4':(4,[(0,1),(1,2),(2,3)]),\n     'C4':(4,[(0,1),(1,2),(2,3),(3,0)]),'K13':(4,[(0,1),(0,2),(0,3)]),'2K2':(4,[(0,1),(2,3)]),\n     'P5':(5,[(0,1),(1,2),(2,3),(3,4)]),'K4':(4,[(0,1),(1,2),(2,3),(3,0),(0,2),(1,3)]),'3K2':(6,[(0,1),(2,3),(4,5)])}\n    for nm,(n,E) in tests.items():\n        r=[run(n,E,maxk=9), run(n,E,free=E[0],maxk=9), run(n,E,free=E[0],head=True,maxk=9)]\n        print(nm,'|E|',len(E),'tau',tau(n,E),'min plain/free/free+head',r, flush=True)\n",
   "note": "scratch program, not committed; reproduced here in full"
  },
  {
   "path": "test/scratch/show.py",
   "sha256": "86d054dda16bb8c641c2b1ef5b180b9483ba72c67b29edbd1c42f3146a489582",
   "content": "import sys\ndef run(n,E,free=None,head=False,maxk=9):\n    N=1<<n; full=(1<<N)-1\n    X=[sum(1<<a for a in range(N) if a>>i&1) for i in range(n)]\n    adj=set(); [adj.update({(u,v),(v,u)}) for u,v in E]\n    f=0\n    for u,v in E: f|=X[u]&X[v]\n    forb=set()\n    for u in range(n):\n        for v in range(n):\n            if u!=v:\n                forb.add(X[u]|X[v])\n                if (u,v) not in adj: forb.add(X[u]&X[v])\n    base=[0,full]+X+([X[free[0]]&X[free[1]]] if free else [])\n    out=[]\n    def dfs(L,k,used):\n        if f in L: return True\n        if k==0: return False\n        nb=len(base); unused=sum(1 for i in range(nb,len(L)) if not used[i])\n        if unused>k+1: return False\n        S=set(L); m=len(L)\n        for i in range(m):\n            for j in range(i,m):\n                a,b=L[i],L[j]\n                for op,g in (('&',a&b),('|',a|b)):\n                    if g in S or g in forb: continue\n                    if head and m==nb and op!='|': continue\n                    if k==1 and g!=f: continue\n                    used2=used+[False]; used2[i]=used2[j]=True\n                    L.append(g); out.append((i,op,j))\n                    if dfs(L,k-1,used2): return True\n                    L.pop(); out.pop()\n        return False\n    for k in range(maxk+1):\n        L=list(base)\n        if dfs(L,k,[True]*len(base)):\n            nm=['F','T']+['x%d'%i for i in range(n)]+(['g'] if free else [])\n            for t,(i,op,j) in enumerate(out):\n                nm.append('y%d'%t); print('  y%d = %s %s %s'%(t,nm[i],op,nm[j]))\n            return k\nfor nm,(n,E) in [('K4',(4,[(0,1),(1,2),(2,3),(3,0),(0,2),(1,3)])),('C4',(4,[(0,1),(1,2),(2,3),(3,0)])),('P5',(5,[(0,1),(1,2),(2,3),(3,4)]))]:\n    print(nm, run(n,E))\n",
   "note": "scratch program, not committed; reproduced here in full"
  }
 ],
 "experiments": [
  {
   "range": "exact IDDFS minimum circuits, graphs P3,K3,P4,C4,K1,3,2K2,P5,K4,3K2 (n<=6), three rule variants",
   "outcome": "table in claims[1]; |E|+tau-1 is not a valid lower bound (K4: 6 < 8); 2K2 and 3K2 show the OR-head can cost +1"
  },
  {
   "range": "optimal circuits printed for K4, C4, P5",
   "outcome": "K4: (x1|x0|x2x3)&(x3|x2|x0x1) in 7; P5 uses x2|(x0&x1) as an interior gate; separated-edge count jumps by 2 at one AND gate"
  },
  {
   "range": "Petersen (n=10) itself",
   "outcome": "not searched; exact search infeasible in this budget"
  }
 ],
 "deadEnds": [
  "Measure 'edges e with some gate g, x_u x_v <= g <= f': one AND gate can raise it by 2 or more (P5 optimal circuit), so it is not a +1-per-step invariant.",
  "Measure |E|+vertex-cover-1: fails as a lower bound on K4 under these rules.",
  "Lean not started: no proof candidate existed to elaborate; this is not an environment fault (after-p4 reports the pinned environment working)."
 ],
 "handed": [
  {
   "batch": "e2-px-capsule",
   "key": "after-p4",
   "sha256": "f817777448e5acd46bd64359cdaf866097e2fc2c42e54e65f731f6799bc80eeb"
  }
 ],
 "forNext": "Any invariant must allow AND gates that close several edges at once (x_v & (nbr-OR built through x_i|(x0x1)) style). Suggest a measure combining, per vertex v, the set of neighbours w for which some gate h satisfies x_w <= h and x_v&h <= f, charging OR gates to growth of those sets; test it against exact minima on K4, C4, P5, C5 (mincirc.py) before formalizing. A Lean proof will need a decidable, computable certificate over 1024-point truth tables (Fin 10 -> Bool) without native_decide, which likely requires a bitvector reflection layer."
}