Part A: Jacobi identity for log-canonical brackets
  n=3, symbolic a,b,c: Jacobiator on all coordinate triples == 0: True
  n=4, symbolic l_ij: Jacobiator on all coordinate triples == 0: True
Part B: {f,g} dx^dy^dz = df^dg^kappa with kappa = (b yz, c zx, a xy)
  identity on all coordinate pairs: True
  identity on 5 random integer polynomials: True
Part C: kernel vector and generic rank
  A * (b yz, c zx, a xy)^T == 0: True
  2x2 minor A[0,1] = {x,y} = a*x*y  (nonzero for a != 0, xy != 0 => rank 2 generically)
  det A = 0  (skew 3x3 => rank <= 2)
Part D: degree of Q(sqrt2, sqrt3)
  [Q(sqrt2,sqrt3):Q] = 4  (minimal polynomial of sqrt2+sqrt3: x**4 - 10*x**2 + 1 )
  => 1, sqrt2, sqrt3 (and sqrt6) are linearly independent over Q.
Part E: commuting monomial pairs x^alpha, x^beta with alpha, beta in N^3 independent, |alpha|,|beta| <= 6
  (1, sqrt2, sqrt3)  Q-rank 3          -> Theorem B predicts NO pair: 0 commuting pairs with independent exponents; first 4: []
  (1, 2, 3)          Q-rank 1          -> pairs exist (e.g. x^2y^3z with x): 191 commuting pairs with independent exponents; first 4: [((0, 0, 1), (2, 3, 0)), ((0, 0, 1), (2, 3, 1)), ((0, 0, 2), (2, 3, 0)), ((0, 0, 2), (2, 3, 1))]
  (1, 1, sqrt2)      Q-rank 2, n=(1,0,-1) mixed signs -> pairs exist (e.g. xz, y): 86 commuting pairs with independent exponents; first 4: [((0, 1, 0), (1, 0, 1)), ((0, 1, 0), (1, 1, 1)), ((0, 1, 0), (1, 2, 1)), ((0, 1, 0), (1, 3, 1))]
  (1, sqrt2, -1-sqrt2) Q-rank 2, n=(1,1,1) all positive -> NO pair: 0 commuting pairs with independent exponents; first 4: []
  (sqrt2, -2, 1)     Q-rank 2, n=(1,2,0) one zero, same signs -> NO pair: 0 commuting pairs with independent exponents; first 4: []
Part F: centralizer of f among polynomials of degree <= DMAX (exact rank over Q(sqrt2,sqrt3))
  (1,sqrt2,sqrt3), f = x+y+z, deg <= 6: space dim 84, centralizer dim 7   [0.8s]
  (1,sqrt2,sqrt3), f = xy+z^2+x, deg <= 6: space dim 84, centralizer dim 4   [1.1s]
  (1,2,3), f = x+y+z, deg <= 6: space dim 84, centralizer dim 8   [0.1s]
  (1,1,sqrt2), f = x+y+z, deg <= 6: space dim 84, centralizer dim 7   [0.4s]
  (1,sqrt2,-1-sqrt2), f = x+y+z, deg <= 6: space dim 84, centralizer dim 7   [0.8s]
  (For f = x+y+z the polynomials 1, f, ..., f^DMAX always commute with f: 7 of them.)
Part G: phi * (log-canonical bracket) is Poisson in dimension 3 (symbolic a,b,c; phi = x + 2y - z and phi = x^2 + y*z)
  phi = x + 2*y - z: Jacobiator on all coordinate triples == 0: True  (degree of the bracket: 3)
  phi = x**2 + y*z: Jacobiator on all coordinate triples == 0: True  (degree of the bracket: 4)
total time 4.1s
exit 0
