Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Proof of Lemma 3 in the paper "On a simple quartic family of Thue equations over imaginary quadratic number fields" by Benjamin Earp-Lynch, Eva G. Goedhart, Ingrid Vukusic and Daniel P. Wisniewski.

28 views
unlisted
ubuntu2004
Kernel: SageMath 9.7

Proof of Lemma 3

import time # function that generates list of possible d's for quadratic integers # |a + b*omgega| <= m # where omega = sqrt(-d) if -d = 2 or 3 mod 4 # and omega = (1 + sqrt(-d))/2 if -d = 1 mod 4 def makedlist(m): dlist=[] for d in range(1, floor(4 * m^2 - 1) +1): if mod(-d,4)==2 or mod(-d,4)==3: if sqrt(d) <= m: if is_squarefree(d): dlist.append(d) elif mod(-d,4)==1: if is_squarefree(d): dlist.append(d) return dlist #preparations to list all x = a + b*omega with |x| < m # and either Re(x)>0; or x in Z and x>0 # define omega for give d def defomega(d,s): # s = sqrt(-d) inputted if mod(-d,4)==1: return (1 + s)/2 else: return s # compute upper bound for b depending on m and d def bmax(m,d): if mod(-d,4)==1: return floor(2*m/sqrt(d)) else: return floor(m/sqrt(d)) # compute lower bound for a depending on m, d, b def amin(m,d,b): if mod(-d,4)==1: return - floor(sqrt(m^2 - d*b^2/4) + b/2) else: return - floor(sqrt(m^2 - d*b^2)) # compute upper bound for a depending on m, d, b def amax(m,d,b): if mod(-d,4)==1: return floor(sqrt(m^2 - d*b^2/4) - b/2) else: return floor(sqrt(m^2 - d*b^2)) # function that checks if (x,y) can be a solution in field Q(sqrt(-d)) # d = 0 means that x,y are both rational integers def checksol(d, x, y, s): if d == 0: tempvar = polygen(QQ) K.<s3> = QQ.extension(tempvar^2 + 3) mulist = [1, (1 + s3) / 2, (-1 + s3) / 2, -1, (1 - s3) / 2, (-1 - s3) / 2, - I, I] elif d == 1: mulist = [-1, 1, -s , s] elif d == 3: mulist = [1, (1 + s) / 2, (-1 + s) / 2, -1, (1 - s) / 2,(-1 - s) / 2] else: mulist = [-1,1] for mu in mulist: denom = x^3*y - x*y^3 if denom != 0: t = (x^4 - 6* x^2 * y^2 + y^4 - mu) / denom if t.is_integral(): print(" d=", d, ", t =", t, ", [x, y] =", [x, y]) #computations mx = 3 start=time.time() # rational x print("rational x:") for x in range(1, mx - 1 + 1): # |x| < mx print("x =", x) m = max(1 + x^4, 6.86) print("checking rational y's ...") for y in range(x, floor(m) + 1): checksol(0, x, y, 1) dlist = makedlist(m) print("now non-rational y's:") print("dlist =", dlist) for d in dlist: tempvar = polygen(QQ) K.<s> = QQ.extension(tempvar^2 + d) omega = defomega(d,s) for b in range(1, bmax(m,d) + 1): for a in range(amin(m,d,b), amax(m,d,b) + 1): y = a + omega*b if x^2 <= y.norm(): checksol(d,x,y,s) print("-----------------------------") # non rational x print("non-rational x:") dlist = makedlist(mx) print("dlist =", dlist) for d in dlist: print("d =", d) tempvar = polygen(QQ) K.<s> = QQ.extension(tempvar^2 + d) omega = defomega(d,s) for bx in range(1, bmax(mx,d) + 1): for ax in range(amin(mx,d,bx), amax(mx,d,bx) + 1): x = ax + omega*bx my = max(1 + x.norm()^2, 6.86) for y in range(ceil(sqrt(x.norm())),floor(my) + 1): # rational y's checksol(d,x,y,s) for by in range(1, bmax(my,d) + 1): # non-rational y's for ay in range(amin(my,d,by), amax(my,d,by) + 1): y = ay + omega*by if x.norm() <= y.norm(): checksol(d,x,y,s) print("time:", time.time()-start)
rational x: x = 1 checking rational y's ... d= 0 , t = 1 , [x, y] = [1, 2] now non-rational y's: dlist = [1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 51, 55, 59, 67, 71, 79, 83, 87, 91, 95, 103, 107, 111, 115, 119, 123, 127, 131, 139, 143, 151, 155, 159, 163, 167, 179, 183, 187] d= 1 , t = -4*s , [x, y] = [1, s - 1] d= 1 , t = -4*s , [x, y] = [1, s + 1] d= 1 , t = -4*s , [x, y] = [1, 2*s] d= 2 , t = -3*s , [x, y] = [1, s] d= 3 , t = -2*s , [x, y] = [1, 1/2*s - 1/2] d= 3 , t = -5/2*s - 1/2 , [x, y] = [1, 1/2*s - 1/2] d= 3 , t = -5/2*s + 1/2 , [x, y] = [1, 1/2*s - 1/2] d= 3 , t = -5/2*s - 1/2 , [x, y] = [1, 1/2*s + 1/2] d= 3 , t = -5/2*s + 1/2 , [x, y] = [1, 1/2*s + 1/2] d= 3 , t = -2*s , [x, y] = [1, 1/2*s + 1/2] x = 2 checking rational y's ... d= 0 , t = 4 , [x, y] = [2, 3] now non-rational y's: dlist = [1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 118, 119, 122, 123, 127, 129, 130, 131, 133, 134, 137, 138, 139, 141, 142, 143, 145, 146, 149, 151, 154, 155, 157, 158, 159, 161, 163, 165, 166, 167, 170, 173, 174, 177, 178, 179, 181, 182, 183, 185, 186, 187, 190, 191, 193, 194, 195, 197, 199, 201, 202, 203, 205, 206, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 223, 226, 227, 229, 230, 231, 233, 235, 237, 238, 239, 241, 246, 247, 249, 251, 253, 254, 255, 257, 258, 259, 262, 263, 265, 266, 267, 269, 271, 273, 274, 277, 278, 281, 282, 283, 285, 286, 287, 291, 295, 299, 303, 307, 311, 319, 323, 327, 331, 335, 339, 347, 355, 359, 367, 371, 379, 383, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, 443, 447, 451, 455, 463, 467, 471, 479, 483, 487, 491, 499, 503, 511, 515, 519, 523, 527, 535, 543, 547, 551, 555, 559, 563, 571, 579, 583, 587, 591, 595, 599, 607, 611, 615, 619, 623, 627, 631, 635, 643, 647, 651, 655, 659, 663, 667, 671, 679, 683, 687, 691, 695, 699, 703, 707, 715, 719, 723, 727, 731, 739, 743, 751, 755, 759, 763, 767, 771, 779, 787, 791, 795, 799, 803, 807, 811, 815, 823, 827, 831, 835, 839, 843, 851, 859, 863, 871, 879, 883, 887, 895, 899, 903, 907, 911, 915, 919, 923, 935, 939, 943, 947, 951, 955, 959, 967, 971, 979, 983, 987, 991, 995, 1003, 1007, 1011, 1015, 1019, 1023, 1027, 1031, 1039, 1043, 1047, 1051, 1055, 1059, 1063, 1067, 1079, 1087, 1091, 1095, 1099, 1103, 1111, 1115, 1119, 1123, 1131, 1135, 1139, 1147, 1151, 1155] d= 1 , t = -4*s , [x, y] = [2, 2*s - 1] d= 1 , t = -4*s , [x, y] = [2, 2*s + 1] d= 1 , t = -4*s , [x, y] = [2, 3*s] d= 17 , t = -s , [x, y] = [2, s] ----------------------------- non-rational x: dlist = [1, 2, 3, 5, 6, 7, 11, 15, 19, 23, 31, 35] d = 1 d= 1 , t = 4*s , [x, y] = [s - 2, 2*s + 2] d= 1 , t = 4*s , [x, y] = [s - 2, 3*s + 1] d= 1 , t = 4*s , [x, y] = [s - 1, s + 2] d= 1 , t = 4*s , [x, y] = [s - 1, 2*s + 1] d= 1 , t = 4*s , [x, y] = [s, 2] d= 1 , t = -4*s , [x, y] = [s, s - 1] d= 1 , t = 4*s , [x, y] = [s, s + 1] d= 1 , t = 1 , [x, y] = [s, 2*s] d= 1 , t = -4*s , [x, y] = [s + 1, s - 2] d= 1 , t = -4*s , [x, y] = [s + 1, 2*s - 1] d= 1 , t = -4*s , [x, y] = [s + 2, 2*s - 2] d= 1 , t = -4*s , [x, y] = [s + 2, 3*s - 1] d= 1 , t = 4*s , [x, y] = [2*s - 2, 2*s + 3] d= 1 , t = 4*s , [x, y] = [2*s - 2, 3*s + 2] d= 1 , t = 4*s , [x, y] = [2*s - 1, s + 3] d= 1 , t = 4*s , [x, y] = [2*s - 1, 2*s + 2] d= 1 , t = 4*s , [x, y] = [2*s, 3] d= 1 , t = -4*s , [x, y] = [2*s, s - 2] d= 1 , t = 4*s , [x, y] = [2*s, s + 2] d= 1 , t = 4 , [x, y] = [2*s, 3*s] d= 1 , t = -4*s , [x, y] = [2*s + 1, s - 3] d= 1 , t = -4*s , [x, y] = [2*s + 1, 2*s - 2] d= 1 , t = -4*s , [x, y] = [2*s + 2, 2*s - 3] d= 1 , t = -4*s , [x, y] = [2*s + 2, 3*s - 2] d= 1 , t = 4*s , [x, y] = [3*s, 4] d= 1 , t = -4*s , [x, y] = [3*s, s - 3] d= 1 , t = 4*s , [x, y] = [3*s, s + 3] d = 2 d = 3 d= 3 , t = 2*s , [x, y] = [1/2*s - 1/2, 1] d= 3 , t = 5/2*s + 1/2 , [x, y] = [1/2*s - 1/2, 1] d= 3 , t = 5/2*s - 1/2 , [x, y] = [1/2*s - 1/2, 1] d= 3 , t = 5/2*s - 1/2 , [x, y] = [1/2*s - 1/2, 1/2*s + 1/2] d= 3 , t = 2*s , [x, y] = [1/2*s - 1/2, 1/2*s + 1/2] d= 3 , t = 5/2*s + 1/2 , [x, y] = [1/2*s - 1/2, 1/2*s + 1/2] d= 3 , t = 1 , [x, y] = [1/2*s - 1/2, s - 1] d= 3 , t = 5/2*s + 1/2 , [x, y] = [1/2*s + 1/2, 1] d= 3 , t = 5/2*s - 1/2 , [x, y] = [1/2*s + 1/2, 1] d= 3 , t = 2*s , [x, y] = [1/2*s + 1/2, 1] d= 3 , t = -5/2*s + 1/2 , [x, y] = [1/2*s + 1/2, 1/2*s - 1/2] d= 3 , t = -2*s , [x, y] = [1/2*s + 1/2, 1/2*s - 1/2] d= 3 , t = -5/2*s - 1/2 , [x, y] = [1/2*s + 1/2, 1/2*s - 1/2] d= 3 , t = 1 , [x, y] = [1/2*s + 1/2, s + 1] d= 3 , t = 4 , [x, y] = [s - 1, 3/2*s - 3/2] d= 3 , t = 4 , [x, y] = [s + 1, 3/2*s + 3/2] d = 5 d = 6 d = 7 d = 11 d = 15 d = 19 d = 23 d = 31 d = 35 time: 6.366098642349243