# python3 majorant_k3_exact.py 3 20   (exact: python-flint rationals for k <= 3, integer arithmetic for k = 4; time output from bash time)
rep10 [rep10maj]: h' = h + 1_++-, 2h' = [-1, 0, 0, 0, 1, -1, -1, 0], Fourier {(): -1/8, (0, 1): -1/8, (0, 2): -1/8, (1, 2): 1/8, (0, 1, 2): -1/4}
  k=0 nu=(): max E h'(Y) = 0 (~0.000000)  at Fp = ['-1'], Fs = [-1]  [0 s]
  k=1 nu=+: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1'], Fs = [-1, -1]  [0 s]
  k=1 nu=-: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1'], Fs = [-1, -1]  [0 s]
  k=2 nu=++: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1]  [0 s]
  k=2 nu=+-: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1]  [0 s]
  k=2 nu=--: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1]  [0 s]
  k=3 nu=+++: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1, -1, -1, -1, -1]  [17 s]
  k=3 nu=++-: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1, -1, -1, -1, -1]  [18 s]
  k=3 nu=+--: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1, -1, -1, -1, -1]  [20 s]
  k=3 nu=---: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [-1, -1, -1, -1, -1, -1, -1, -1]  [28 s]
  rep10 [rep10maj]: max E h'(Y) over all [-1,1]-valued class-wise decoders with k <= 3: 0
rep5 [R5]: h' = h + 1_-+-, 2h' = [-2, -1, -1, 0, 1, 0, 0, -1], Fourier {(): -1/4, (0,): -1/4, (0, 1): -1/4, (0, 2): -1/4}
  k=0 nu=(): max E h'(Y) = 0 (~0.000000)  at Fp = ['-1'], Fs = [1]  [0 s]
  k=1 nu=+: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '-1'], Fs = [1, -1]  [0 s]
  k=1 nu=-: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1'], Fs = [1, 1]  [0 s]
  k=2 nu=++: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '-1', '1', '-1'], Fs = [1, -1, 1, -1]  [0 s]
  k=2 nu=+-: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '1', '-1', '-1'], Fs = [1, 1, -1, -1]  [0 s]
  k=2 nu=--: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1]  [0 s]
  k=3 nu=+++: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '-1', '1', '-1', '1', '-1', '1', '-1'], Fs = [1, -1, 1, -1, 1, -1, 1, -1]  [14 s]
  k=3 nu=++-: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '1', '-1', '-1', '1', '1', '-1', '-1'], Fs = [1, 1, -1, -1, 1, 1, -1, -1]  [15 s]
  k=3 nu=+--: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '1', '1', '1', '-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1, -1, -1, -1, -1]  [15 s]
  k=3 nu=---: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1, 1, 1, 1, 1]  [18 s]
  rep5 [R5]: max E h'(Y) over all [-1,1]-valued class-wise decoders with k <= 3: 0
rep5 [control]: h' = h + 1_+++, 2h' = [0, -1, -1, 0, 1, -2, 0, -1], Fourier {(): -1/4, (2,): 1/4, (0, 2): -1/4, (1, 2): 1/4}
  k=0 nu=(): max E h'(Y) = 0 (~0.000000)  at Fp = ['-1'], Fs = [1]  [0 s]
  k=1 nu=+: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '-1'], Fs = [1, -1]  [0 s]
  k=1 nu=-: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1'], Fs = [1, 1]  [0 s]
  k=2 nu=++: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '-1', '1', '-1'], Fs = [1, -1, 1, -1]  [0 s]
  k=2 nu=+-: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '1', '-1', '-1'], Fs = [1, 1, -1, -1]  [0 s]
  k=2 nu=--: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1]  [0 s]
  k=3 nu=+++: max E h'(Y) = 3/250 (~0.012000)  at Fp = ['1', '-1', '-1', '-1', '1', '1', '1', '-1'], Fs = [1, 1, 1, -1, 1, 1, 1, 1]  [3 s]
  k=3 nu=++-: max E h'(Y) = 3/550 (~0.005455)  at Fp = ['1', '1', '1', '-1', '1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1, 1, 1, -1, 1]  [4 s]
  k=3 nu=+--: max E h'(Y) = 0 (~0.000000)  at Fp = ['1', '1', '1', '1', '-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1, -1, -1, -1, -1]  [5 s]
  k=3 nu=---: max E h'(Y) = 0 (~0.000000)  at Fp = ['-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1'], Fs = [1, 1, 1, 1, 1, 1, 1, 1]  [5 s]
  rep5 [control]: max E h'(Y) over all [-1,1]-valued class-wise decoders with k <= 3: 3/250
(rep10maj) and (R5) hold for every k <= 3, every nu and all [0,1]-valued P, B (exact; maximum 0)
control h + 1_+++ for rep5: maximum 3/250 > 0 at k <= 3, as reported
(R5) k=4 nu=(+4,-0): D = 10000; max (LHS - RHS) = 0; LHS = RHS for 23 of 65536 P; largest negative value -0.0002
   equality cases: 0, z1=z2=1, z1=z3=1, z1=z4=1, (z1,z4)=(1,-1), (z1,z3)=(1,-1), (z1,z2)=(1,-1), z1=1, z2=z3=1, z2=z4=1, (z2,z4)=(1,-1), (z2,z3)=(1,-1), (z2,z1)=(1,-1), z2=1, z3=z4=1, (z3,z4)=(1,-1), (z3,z2)=(1,-1), (z3,z1)=(1,-1), z3=1, (z4,z3)=(1,-1), (z4,z2)=(1,-1), (z4,z1)=(1,-1), z4=1
(R5) k=4 nu=(+3,-1): D = 22000; max (LHS - RHS) = 0; LHS = RHS for 13 of 65536 P; largest negative value -0.000454545
   equality cases: 0, z1=z2=1, z1=z3=1, (z1,z3)=(1,-1), (z1,z2)=(1,-1), z1=1, z2=z3=1, (z2,z3)=(1,-1), (z2,z1)=(1,-1), z2=1, (z3,z2)=(1,-1), (z3,z1)=(1,-1), z3=1
(R5) k=4 nu=(+2,-2): D = 48400; max (LHS - RHS) = 0; LHS = RHS for 6 of 65536 P; largest negative value -0.00103306
   equality cases: 0, z1=z2=1, (z1,z2)=(1,-1), z1=1, (z2,z1)=(1,-1), z2=1
(R5) k=4 nu=(+1,-3): D = 106480; max (LHS - RHS) = 0; LHS = RHS for 2 of 65536 P; largest negative value -0.00234786
   equality cases: 0, z1=1
(R5) k=4 nu=(+0,-4): D = 234256; max (LHS - RHS) = 0; LHS = RHS for 1 of 65536 P; largest negative value -0.00533604
   equality cases: 0
(R5) holds for every {0,1}-valued P with k = 4 and every nu (max LHS - RHS = 0; exact integers); 20 Fraction cross-checks per nu agree
[163 s]

real	2m42.683s
user	2m47.252s
sys	0m0.124s
