{
 "status": "missing_lemma",
 "notes": "NOT PROVED from the direct angle. One statement is missing (Hcut below); I have neither a proof of it nor a counterexample.\n\nChecked with the prebuilt Lean 4.36.0 and project, importing Mathlib and PEqualNP.Defs only (scratch files, no error, no sorry; not submitted). Write F for the posted function decide (exists p l, I p l and z (Fin.castAdd N p) = true and z (Fin.natAdd N l) = true).\n\n(1) prime_iff: if circuitFun (N+N) D = F pointwise, then IsPrimeImplicant (N+N) D S <-> exists p l, I p l and S = {Fin.castAdd N p, Fin.natAdd N l}. No plane hypothesis is used.\n(2) setList_pair: ReadK.setList {Fin.castAdd N p, Fin.natAdd N l} = [p.val, N + l.val]. With (1): IsReadK (N+N) D 2 <-> for all p l, I p l -> readsAtMost D (N+N) [p.val, N + l.val] 2 = true.\n(3) reduce_least (Nat.find on sizes): it is enough to treat a C that is least among IsAO2 circuits computing F.\n(4) cut: the posted statement follows from (1)-(3) and the single hypothesis\nHcut: for every C0 with IsAO2 (N+N) C0, computing F, and C0.size <= C'.size for every IsAO2 C' computing F, there is D with IsAO2 (N+N) D, computing F, D.size <= C0.size, and readsAtMost D (N+N) [p.val, N + l.val] 2 = true for all p l with I p l.\n(1)-(4) are about 150 lines and routine to redo: of_decide_eq_true / of_decide_eq_false on the function hypothesis, Finset.mem_ssubsets, List.Pairwise.eq_of_mem_iff with List.pairwise_lt_finRange, Nat.find.\n\nWhy the direct route stops at Hcut.\n\n- D := C does not work, so a real change of circuit is needed. Evaluated in Lean on the Fano plane (q = 2, N = 7, lines 012 034 056 135 146 236 245; both plane hypotheses checked by decide; function compared on all 2^14 inputs): the star circuit OR over lines l of (y_l AND (OR of the x_p on l)) has 27 = N(q+2)-1 gates, is IsAO2, computes F, and readsAtMost .. 1 holds on all 21 incidences. The same circuit with x_0 replaced by AND(AND(x_0,x_0),x_0) (29 gates) is IsAO2, computes F, and readsAtMost .. 2 is false on exactly the three incidences of point 0 (true at 3). So IsReadK 2 is not a consequence of IsAO2 plus computing F.\n\n- Counting gates (N lines, each q ORs and one AND, then N-1 ORs), the star circuit has N(q+2)-1 gates in general. If it is read-1 for every plane (checked here only at q = 2 by evaluation; not proved in general), the step holds for every C with C.size >= N(q+2)-1, and the content is the case C.size < N(q+2)-1: circuits beating the star cover. Hcut would then follow from the bound size >= N(q+2)-1 for IsAO2 circuits computing F, which PEqualNP.Defs does not give and which I could not prove.\n\n- Where a third read comes from (on paper, not in Lean). Set every input but x = x_p and y = y_l to false; every wire then computes 0, x, y, x AND y or x OR y. readVectors takes unions at OR and capped sums at AND, so the reads of a proof tree add at each AND. More than two reads of x are forced only through (i) nested ANDs all of whose inputs are above x (inputs x OR r_i, gate x OR r_1 r_2 ..), or (ii) AND(g, t) with g of type x AND y and t above x or y. Leastness does not exclude either by any argument I found. Removing them is the size-preserving surgery of the desk's sketch (move below-F wires to the top, then charge a non-star block to a star cover of its edges), and it needs facts about rewiring a foldl-defined circuit (replace a wire, delete a gate, renumber, keep circuitFun and IsAO2) that are not in the one project module the file may use: PEqualNP.Defs holds definitions, not these results. I did not attempt that part.\n\nA cut that fits this: (a) items (1)-(4), proved here; (b) Hcut for least circuits, itself split into the top-form move of the sketch and (c) the block-cost statement the sketch calls open. (b) and (c) are untouched by this item.\n\nNo web source was used. Every claim above comes from the pinned PEqualNP.Defs files or from Lean runs on this machine, except the two marked as on paper or not proved in general."
}
