On this page, we collect supporting code and data for the paper exploring the space filling curves on P^1 x P^1. The data and codes on this page were created by Mehnaz Ahammed.
We proved that for any homogeneous polynomial g of degree q+1 without any F_q-root, a majority of homogeneous polynomials f of the same degree defines a smooth space filling curve C_{f,g}. For q = 4, 5, we made the list of all such pairs. Since most of pairs give a smooth curve, we listed pairs that are not smooth.
The following Macaulay2 code was used to construct 1,000 random pairs $(f, g)$ of polynomials without $\mathbb{F}_q$-roots, and checked if $C_{f,g}$ is smooth or not. We summarized the result in Section 4.3 of the paper.
needsPackage "MultiprojectiveVarieties" -- This is a nice package when working with P^1 x P^1
p = 3--prime
q = p^3 -- change prime power here.
K = GF(q) -- field
R = K[x_0,x_1,y_0,y_1, Degrees=>{2:{1,0}, 2:{0,1}}] -- defines the polynomial rings with the proper bidegrees.
-- generator
a = K_0
-- If p = 2 and prime power = 2, uncomment this.
-- Fq = {0, 1, a, a+1}
-- If p = 2 and prime power = 3, uncomment this.
--Fq = {0, 1, a, a+1, a^2, a^2+1, a^2+a, a^2+a+1}
-- If p = 3 and prime power = 2, uncomment this.
--Fq = {0, 1, -1, a, a + 1, a - 1, -a, -a + 1, -a - 1}
-- If p = 2 and prime power = 4, uncomment this.
--Fq = {0, 1, a^5, a^10, a, a+1, a+a^5, a+a^10, a^6, a^6+1, a^6+a^5, a^6+a^10, a^11, a^11+1, a^11+a^5, a^11+a^10 }
-- If p = 5 and prime power = 2, uncomment this.
--Fq = {0, 1, 2, -2, -1, a, a+1, a+2, a-2, a-1, 2*a, 2*a+1,
-- 2*a+2, 2*a-2, 2*a-1, -2*a, -2*a+1, -2*a+2, -2*a-2, -2*a-1, -a, -a+1, -a+2, -a-2, -a-1}
Fq = {0, 1, -1, a, a+1, a-1, -a, -a+1, -a-1, a^2, a^2+1, a^2-1, a^2+a, a^2+a+1, a^2+a-1, a^2-a,
a^2-a+1, a^2-a-1, -a^2, -a^2+1, -a^2-1, -a^2+a, -a^2+a+1, -a^2+a-1, -a^2-a, -a^2-a+1,
-a^2-a-1}
points = {};
for i in Fq do{
for j in Fq do{
pnt = {i,j};
points = points | {pnt};
}
}
hasFqRootf = (f) -> (
for i from 1 to q^2 - 1 do
{
if(substitute(f,{y_0 => points#i#0, y_1 => points#i#1}) == 0) then{
return true;
};
};
return false;
);
hasFqRootg = (g) -> (
for i from 1 to q^2 - 1 do
{
if(substitute(g,{x_0 => points#i#0, x_1 => points#i#1}) == 0) then{
return true;
};
};
return false;
);
isSmoothCharts = (F) -> (
try (
charts = {{x_0, y_0},{x_0, y_1},{x_1, y_0},{x_1, y_1}};
for chart in charts list (
S = K[u,v];
xSub = if chart#0 == x_0 then {x_0 => 1, x_1 => u} else {x_0 => u, x_1 => 1};
ySub = if chart#1 == y_0 then {y_0 => 1, y_1 => v} else {y_0 => v, y_1 => 1};
Fchart = substitute(F, xSub | ySub);
Fs = substitute(Fchart, S);
J = jacobian matrix{{Fs}};
singI = ideal(Fs) + minors(1, J);
if dim singI >= 0 then return false;
);
return true;
)
else {
false
}
);
-- The two space filling polynomials
s_0 = x_0^q*x_1 - x_0*x_1^q
s_1 = y_0^q*y_1 - y_0*y_1^q
d = q+1
monomialsx = basis({d,0},R) --generates the monomials in the x variables
monomialsy = basis({0,d},R) -- generates the monomials in the y variables
count_smooth = 0;
trials = 0;
---Randomly generate two p+1 homogeneous polynomials without Fq-roots and check if they are smooth. 1000 Trials.
f = 0;
g = 0;
while (trials < 1000) do {
f = random({0,d}, R);
g = random({d,0}, R);
while (hasFqRootf(f) or hasFqRootg(g)) do {
f = random({0,d}, R);
g = random({d,0}, R);
};
trials = trials + 1;
F = f*s_0+ g*s_1;
if isSmoothCharts(F) then {
count_smooth = count_smooth + 1;
};
print("Trials: " | trials);
print("Smooth curves: " | count_smooth);
}