Skip to content

Instantly share code, notes, and snippets.

@Spacerat
Last active July 20, 2026 05:45
Show Gist options
  • Select an option

  • Save Spacerat/a74a73d16e9433e12c456c816c8f1d19 to your computer and use it in GitHub Desktop.

Select an option

Save Spacerat/a74a73d16e9433e12c456c816c8f1d19 to your computer and use it in GitHub Desktop.
ChatGPT Order 3 jacobian conjecture counter example
#!/usr/bin/env python3
r"""
================================================================================
CREDITS, PROVENANCE, AND SOURCES
================================================================================
This file combines an explicit cubic reduction with an exact-arithmetic
verification program. It does not claim discovery of the original
three-variable counterexample or of the degree-reduction theorem.
1. ORIGINAL X/TWITTER POST
The starting degree-7 counterexample was posted publicly by Levent Alpöge
(@__alpoge__) in the X/Twitter post linked below:
https://x.com/__alpoge__/status/2079028340955197566
This document treats that post as the source of the displayed
three-variable map. It makes no independent claim about priority or
authorship beyond acknowledging the public post.
2. REDDIT SUGGESTION
The prompt to construct an explicit cubic counterexample came from the
following comment by Reddit user u/zongshu in r/math:
https://www.reddit.com/r/math/s/gtTu8JkLsS
Resolved permalink:
https://www.reddit.com/r/math/comments/1v1aix1/comment/oym4g4l/
The comment links the Garland paper below and observes that any
counterexample implies the existence of one of degree 3.
3. EXPOSITORY PAPER
William Garland,
"An Introduction to the Jacobian Conjecture"
University of Chicago Mathematics REU paper, September 26, 2018:
https://math.uchicago.edu/~may/REU2018/REUPapers/Garland.pdf
The relevant statement is Theorem 3.3, which paraphrases the
Bass-Connell-Wright reduction: if the Jacobian conjecture holds for every
polynomial map of degree at most 3, then it holds in general. By
contraposition, any counterexample yields a counterexample of degree at
most 3. Since the degree-2 case is known, a reduced counterexample has
degree exactly 3.
4. ORIGINAL DEGREE-REDUCTION RESULT
Hyman Bass, Edwin H. Connell, and David Wright,
"The Jacobian Conjecture: Reduction of Degree and Formal Expansion of the
Inverse", Bulletin of the American Mathematical Society 7(2), 287-330
(1982):
https://doi.org/10.1090/S0273-0979-1982-15032-7
5. CHATGPT / OPENAI
The explicit 39-variable cubic construction, the reduction certificate,
the lifted collision points, and the exact-arithmetic verification program
in this file were generated by ChatGPT (OpenAI), using the
Bass-Connell-Wright degree-reduction method and the starting counterexample
cited above.
ChatGPT also checked the resulting map computationally for dimension,
degree, term count, and the stated three-way collision. The determinant
claim is certified compositionally by the determinant-one elementary
transformations used at every reduction step.
6. THIS FILE
This is a computational certificate assembled from the cited starting map,
the cited reduction theorem, the Reddit suggestion to apply that theorem,
and ChatGPT's explicit construction and verification. It is not a
peer-reviewed publication.
================================================================================
# An explicit cubic Jacobian counterexample in 39 variables
## Result
The resulting polynomial map
\[
\Phi:\mathbb C^{39}\longrightarrow\mathbb C^{39}
\]
has:
- total degree exactly 3;
- 124 nonzero monomial terms across its 39 coordinate polynomials;
- constant Jacobian determinant \(\det J\Phi=-2\);
- three distinct inputs with the same output.
This is explicit, but not aesthetically simpler than the original map: the
degree falls from 7 to 3 while the dimension rises from 3 to 39.
## Why the determinant and collision are preserved
At each step, choose a term `c P Q` of degree greater than 3 in coordinate
`i`, append variables `u,v`, and set
```text
new_i = old_i - c P Q - u Q - c P v - u v
new_u = u + c P
new_v = v + Q.
```
This is the composition
\[
G\circ(F\times\operatorname{id}_{\mathbb C^2})\circ H,
\]
where `H(...,u,v)=(...,u+cP,v+Q)` and `G` subtracts `uv` from
coordinate `i`. Both are triangular polynomial automorphisms with
Jacobian determinant 1. Therefore every step preserves the constant
Jacobian determinant. A collision lifts by applying `H^{-1}` to each
old input with the two new coordinates initially zero.
## Reduction certificate
| Step | Target coordinate | Removed term `c P Q` | `P` | `Q` |
|---:|---:|---|---|---|
| 1 | 1 | `1 x^3 y^3 z` | `x^3` | `y^3 z` |
| 2 | 1 | `3 x^2 y^4` | `y^3` | `x^2 y` |
| 3 | 2 | `3 x^3 y^2 z` | `x^3` | `y^2 z` |
| 4 | 1 | `3 x^2 y^2 z` | `x^2` | `y^2 z` |
| 5 | 1 | `-1 y^3 z u1` | `y^2` | `y z u1` |
| 6 | 2 | `9 x^2 y^3` | `y^2` | `x^2 y` |
| 7 | 1 | `7 x y^3` | `y^2` | `x y` |
| 8 | 1 | `-1 x^3 v1` | `x^2` | `x v1` |
| 9 | 1 | `-1 x^2 y u2` | `x^2` | `y u2` |
| 10 | 1 | `-3 y^3 v2` | `y^2` | `y v2` |
| 11 | 1 | `-1 y^2 z u4` | `y^2` | `z u4` |
| 12 | 1 | `-1 y z u1 u5` | `y z` | `u1 u5` |
| 13 | 2 | `6 x^2 y z` | `x^2` | `y z` |
| 14 | 2 | `-1 y^2 z u3` | `y^2` | `z u3` |
| 15 | 2 | `-3 x^3 v3` | `x^2` | `x v3` |
| 16 | 2 | `-1 x^2 y u6` | `x^2` | `y u6` |
| 17 | 3 | `-1 x^3 z` | `x^2` | `x z` |
| 18 | 5 | `1 y^3 z` | `y^2` | `y z` |
## Variables
`x, y, z, u1, v1, u2, v2, u3, v3, u4, v4, u5, v5, u6, v6, u7, v7, u8, v8, u9, v9, u10, v10, u11, v11, u12, v12, u13, v13, u14, v14, u15, v15, u16, v16, u17, v17, u18, v18`
## The 39 coordinate polynomials
### Phi_1
```text
-3 x^2 v4 + x^2 v8 + x^2 v9 + 3 x y z - x y u7 - x v1 u8 + y^2 v5 - 7 y^2 v7 + 3 y^2 v10 + y^2 v11 + y z v12 - y u2 u9 - y v2 u10 - z u4 u11 - u1 u5 u12 + 4 y^2 - u1 v1 - u2 v2 - u4 v4 - u5 v5 - u7 v7 - u8 v8 - u9 v9 - u10 v10 - u11 v11 - u12 v12 + z
```
### Phi_2
```text
-6 x^2 v13 + 3 x^2 v15 + x^2 v16 + 12 x y^2 - x v3 u15 - 9 y^2 v6 + y^2 v14 - y z u13 - y u6 u16 - z u3 u14 + 3 x z - u3 v3 - u6 v6 - u13 v13 - u14 v14 - u15 v15 - u16 v16 + y
```
### Phi_3
```text
-3 x^2 y + x^2 v17 - x z u17 - u17 v17 + 2 x
```
### Phi_4
```text
x^3 + u1
```
### Phi_5
```text
-y^2 v18 - y z u18 - u18 v18 + v1
```
### Phi_6
```text
3 y^3 + u2
```
### Phi_7
```text
x^2 y + v2
```
### Phi_8
```text
3 x^3 + u3
```
### Phi_9
```text
y^2 z + v3
```
### Phi_10
```text
3 x^2 + u4
```
### Phi_11
```text
y^2 z + v4
```
### Phi_12
```text
-y^2 + u5
```
### Phi_13
```text
y z u1 + v5
```
### Phi_14
```text
9 y^2 + u6
```
### Phi_15
```text
x^2 y + v6
```
### Phi_16
```text
7 y^2 + u7
```
### Phi_17
```text
x y + v7
```
### Phi_18
```text
-x^2 + u8
```
### Phi_19
```text
x v1 + v8
```
### Phi_20
```text
-x^2 + u9
```
### Phi_21
```text
y u2 + v9
```
### Phi_22
```text
-3 y^2 + u10
```
### Phi_23
```text
y v2 + v10
```
### Phi_24
```text
-y^2 + u11
```
### Phi_25
```text
z u4 + v11
```
### Phi_26
```text
-y z + u12
```
### Phi_27
```text
u1 u5 + v12
```
### Phi_28
```text
6 x^2 + u13
```
### Phi_29
```text
y z + v13
```
### Phi_30
```text
-y^2 + u14
```
### Phi_31
```text
z u3 + v14
```
### Phi_32
```text
-3 x^2 + u15
```
### Phi_33
```text
x v3 + v15
```
### Phi_34
```text
-x^2 + u16
```
### Phi_35
```text
y u6 + v16
```
### Phi_36
```text
-x^2 + u17
```
### Phi_37
```text
x z + v17
```
### Phi_38
```text
y^2 + u18
```
### Phi_39
```text
y z + v18
```
## Three colliding inputs
All three points below are distinct, and each maps to
```text
(-1/4, 0, 0, ..., 0).
```
### p1
```text
(0, 0, -1/4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
```
### p2
```text
(1, -3/2, 13/2, -1, 351/16, 81/8, 3/2, -3, -117/8, -3, -117/8, 9/4, -39/4, -81/4, 3/2, -63/4, 3/2, 1, -351/16, 1, 243/16, 27/4, 9/4, 9/4, 39/2, -39/4, 9/4, -6, 39/4, 9/4, 39/2, 3, 117/8, 1, -243/8, 1, -13/2, -9/4, 39/4)
```
### p3
```text
(-1, 3/2, 13/2, 1, -351/16, -81/8, -3/2, 3, -117/8, -3, -117/8, 9/4, -39/4, -81/4, -3/2, -63/4, 3/2, 1, -351/16, 1, 243/16, 27/4, 9/4, 9/4, 39/2, 39/4, -9/4, -6, -39/4, 9/4, -39/2, 3, -117/8, 1, 243/8, 1, 13/2, -9/4, -39/4)
```
## Exact checks performed while generating this file
```text
dimension = 39
reduction steps = 18
maximum coordinate degree = 3
total nonzero monomial terms = 124
Phi(p1) = Phi(p2) = Phi(p3) = (-1/4, 0, ..., 0)
```
The determinant claim is certified compositionally: the starting map has
constant determinant -2, and each of the 18 displayed transformations is
a composition with determinant-one elementary automorphisms.
## Executable verification
Everything above is the human-readable certificate. The Python program below
reconstructs the same cubic map using exact rational arithmetic and verifies
its dimension, degree, term count, and three-way collision.
Requirements:
Python 3.9+
sympy
Run:
python cubic_jacobian_counterexample_all_in_one.py
"""
from fractions import Fraction
from functools import lru_cache
import sympy as sp
Exponent = tuple[int, ...]
Polynomial = dict[Exponent, Fraction]
x, y, z = sp.symbols("x y z")
F = [
(1 + x*y)**3*z + y**2*(1 + x*y)*(4 + 3*x*y),
y + 3*x*(1 + x*y)**2*z + 3*x*y**2*(4 + 3*x*y),
2*x - 3*x**2*y - x**3*z,
]
def from_sympy(expr, variables):
p = sp.Poly(sp.expand(expr), *variables, domain=sp.QQ)
return {
tuple(m): Fraction(int(c.p), int(c.q))
for m, c in p.terms()
}
def degree(poly):
return max((sum(e) for e in poly), default=-1)
def add(poly, exponent, coefficient):
if not coefficient:
return
poly[exponent] = poly.get(exponent, Fraction(0)) + coefficient
if not poly[exponent]:
del poly[exponent]
def extend(polys, count):
return [
{e + (0,) * count: c for e, c in poly.items()}
for poly in polys
]
def evaluate(poly, point):
answer = Fraction(0)
for exponent, coefficient in poly.items():
term = coefficient
for value, power in zip(point, exponent):
if power:
term *= value**power
answer += term
return answer
@lru_cache(None)
def cost(d):
if d <= 3:
return 0
return min(
1 + cost(q + 1) + cost(p + 1) + cost(p) + cost(q)
for p in range(2, d - 1)
for q in [d - p]
if q >= 2
)
def split_degree(d):
return min(
(
1 + cost(q + 1) + cost(p + 1) + cost(p) + cost(q),
p,
)
for p in range(2, d - 1)
for q in [d - p]
if q >= 2
)[1]
def split_exponent(exponent, p_degree):
remaining = p_degree
p = [0] * len(exponent)
for i in sorted(range(len(exponent)), key=lambda i: (-exponent[i], i)):
take = min(exponent[i], remaining)
p[i] = take
remaining -= take
if remaining == 0:
break
assert remaining == 0
return tuple(p), tuple(e - a for e, a in zip(exponent, p))
def reduce_step(polys, points):
n = len(next(iter(polys[0])))
d = max(degree(poly) for poly in polys)
target = next(i for i, poly in enumerate(polys) if degree(poly) == d)
monomial = next(e for e in polys[target] if sum(e) == d)
c = polys[target][monomial]
p, q = split_exponent(monomial, split_degree(d))
polys = extend(polys, 2)
monomial2, p2, q2 = monomial + (0, 0), p + (0, 0), q + (0, 0)
u, v = n, n + 1
add(polys[target], monomial2, -c)
uq = list(q2)
uq[u] += 1
add(polys[target], tuple(uq), Fraction(-1))
pv = list(p2)
pv[v] += 1
add(polys[target], tuple(pv), -c)
uv = [0] * (n + 2)
uv[u] = uv[v] = 1
add(polys[target], tuple(uv), Fraction(-1))
new_u = {}
e = [0] * (n + 2)
e[u] = 1
add(new_u, tuple(e), Fraction(1))
add(new_u, p2, c)
new_v = {}
e = [0] * (n + 2)
e[v] = 1
add(new_v, tuple(e), Fraction(1))
add(new_v, q2, Fraction(1))
polys += [new_u, new_v]
lifted = []
for point in points:
P = c
for value, power in zip(point, p):
if power:
P *= value**power
Q = Fraction(1)
for value, power in zip(point, q):
if power:
Q *= value**power
lifted.append(tuple(point) + (-P, -Q))
return polys, lifted
polys = [from_sympy(expr, (x, y, z)) for expr in F]
points = [
(Fraction(0), Fraction(0), Fraction(-1, 4)),
(Fraction(1), Fraction(-3, 2), Fraction(13, 2)),
(Fraction(-1), Fraction(3, 2), Fraction(13, 2)),
]
steps = 0
while max(degree(poly) for poly in polys) > 3:
polys, points = reduce_step(polys, points)
steps += 1
images = [
tuple(evaluate(poly, point) for poly in polys)
for point in points
]
assert len(polys) == 39
assert steps == 18
assert max(degree(poly) for poly in polys) == 3
assert sum(len(poly) for poly in polys) == 124
assert len(set(points)) == 3
assert images[0] == images[1] == images[2]
assert images[0] == (Fraction(-1, 4),) + (Fraction(0),) * 38
print("Verified:")
print(" dimension:", len(polys))
print(" steps:", steps)
print(" maximum degree:", max(degree(poly) for poly in polys))
print(" nonzero terms:", sum(len(poly) for poly in polys))
print(" common image:", images[0])
print(" determinant: -2 (preserved by 18 determinant-one BCW steps)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment