First knot with big signatures. Many fragments are doubled - will be deleted now
This commit is contained in:
parent
8ddb06fdb8
commit
c64382b5c7
@ -632,8 +632,8 @@ class TorusCable(object):
|
|||||||
# print(theta, end=" ")
|
# print(theta, end=" ")
|
||||||
# print(sum)
|
# print(sum)
|
||||||
if sum.is_integer():
|
if sum.is_integer():
|
||||||
print("#" * 100)
|
# print("#" * 100)
|
||||||
print(theta)
|
# print(theta)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
# if self.is_value_for_vector_class_big(vector, sigma_or_sign):
|
# if self.is_value_for_vector_class_big(vector, sigma_or_sign):
|
||||||
|
193
main.sage
193
main.sage
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
attach("cable_signature.sage")
|
attach("cable_signature.sage")
|
||||||
attach("my_signature.sage")
|
# attach("my_signature.sage")
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
@ -35,36 +35,57 @@ def main():
|
|||||||
cable = cab_1 + cab_2
|
cable = cab_1 + cab_2
|
||||||
joined_formula = cable.knot_formula
|
joined_formula = cable.knot_formula
|
||||||
|
|
||||||
def check_all_thetas(cable):
|
def is_big_in_ranges(cable, ranges_list):
|
||||||
upper_bounds = cable.last_k_list[:4]
|
we_have_no_problem = True
|
||||||
# upper_bounds += [0, 0, 0, 0]
|
|
||||||
ranges_list = [range(1, i + 1) for i in upper_bounds]
|
|
||||||
ranges_list += [range(0, 1) for _ in range(4)]
|
|
||||||
|
|
||||||
|
|
||||||
print(ranges_list)
|
|
||||||
for theta in it.product(*ranges_list):
|
for theta in it.product(*ranges_list):
|
||||||
# pass
|
if all(i == 0 for i in theta):
|
||||||
|
continue
|
||||||
|
we_have_a_problem = True
|
||||||
if cable.is_metaboliser(theta):
|
if cable.is_metaboliser(theta):
|
||||||
print("\n" * 10)
|
# print("\n" * 10)
|
||||||
print("!" * 100)
|
|
||||||
for shift in range(1, cable.q_order):
|
for shift in range(1, cable.q_order):
|
||||||
shifted_theta = [(shift * th) % cable.last_q_list[i]
|
shifted_theta = [(shift * th) % cable.last_q_list[i]
|
||||||
for i, th in enumerate(theta)]
|
for i, th in enumerate(theta)]
|
||||||
shifted_theta = [min(th, cable.last_q_list[i] - th)
|
shifted_theta = [min(th, cable.last_q_list[i] - th)
|
||||||
for i, th in enumerate(shifted_theta)]
|
for i, th in enumerate(shifted_theta)]
|
||||||
print(shifted_theta)
|
|
||||||
sf = cable.signature_as_function_of_theta(*shifted_theta)
|
sf = cable.signature_as_function_of_theta(*shifted_theta)
|
||||||
extremum = abs(sf.extremum())
|
extremum = abs(sf.extremum())
|
||||||
print(extremum)
|
if shift > 1:
|
||||||
|
print(shifted_theta, end=" ")
|
||||||
|
print(extremum)
|
||||||
if extremum > 5 + np.count_nonzero(shifted_theta):
|
if extremum > 5 + np.count_nonzero(shifted_theta):
|
||||||
print("ok")
|
# print("ok")
|
||||||
|
we_have_a_problem = False
|
||||||
break
|
break
|
||||||
else:
|
elif shift == 1:
|
||||||
print("hliphlip")
|
print("*" * 10)
|
||||||
print("!" * 100)
|
print(shifted_theta, end=" ")
|
||||||
print("\n" * 10)
|
print(extremum)
|
||||||
return
|
|
||||||
|
if we_have_a_problem:
|
||||||
|
we_have_a_big_problem = True
|
||||||
|
break
|
||||||
|
if not we_have_no_problem:
|
||||||
|
print("we have a big problem")
|
||||||
|
return we_have_no_problem
|
||||||
|
|
||||||
|
def check_all_thetas(cable):
|
||||||
|
upper_bounds = cable.last_k_list[:3]
|
||||||
|
ranges_list = [range(0, i + 1) for i in upper_bounds]
|
||||||
|
ranges_list.append(range(0, 2))
|
||||||
|
ranges_list += [range(0, 1) for _ in range(4)]
|
||||||
|
if not is_big_in_ranges(cable, ranges_list):
|
||||||
|
return False
|
||||||
|
upper_bounds = cable.last_k_list[5:8]
|
||||||
|
ranges_list = [range(0, 1) for _ in range(4)]
|
||||||
|
ranges_list += [range(0, i + 1) for i in upper_bounds]
|
||||||
|
ranges_list.append(range(0, 2))
|
||||||
|
if not is_big_in_ranges(cable, ranges_list):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_q_vector(q_vector_size, lowest_number=1):
|
def get_q_vector(q_vector_size, lowest_number=1):
|
||||||
@ -83,139 +104,9 @@ def get_q_vector(q_vector_size, lowest_number=1):
|
|||||||
q[i] = next_number
|
q[i] = next_number
|
||||||
next_number = P.next(lowest_number)
|
next_number = P.next(lowest_number)
|
||||||
|
|
||||||
q = [P.unrank(i + config.start_shift) for i in c]
|
q = [P.unrank(i) for i in c]
|
||||||
ratio = q[3] > 4 * q[2] and q[2] > 4 * q[1] and q[1] > 4 * q[0]
|
ratio = q[3] > 4 * q[2] and q[2] > 4 * q[1] and q[1] > 4 * q[0]
|
||||||
if not ratio:
|
if not ratio:
|
||||||
# print("Ratio-condition does not hold")
|
# print("Ratio-condition does not hold")
|
||||||
continue
|
continue
|
||||||
print("q = ", q)
|
print("q = ", q)
|
||||||
# cable = TorusCable(knot_formula=knot_formula, q_vector=q)
|
|
||||||
# list_of_ranges = config.get_list_of_ranges(cable.q_order)
|
|
||||||
# if cable.eval_cable_for_large_values(list_of_ranges, SIGMA,
|
|
||||||
# verbose=verbose,
|
|
||||||
# print_results=print_results):
|
|
||||||
# good_knots.append(cable.knot_description)
|
|
||||||
# return good_knots
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# cab_to_update.update(cab_to_add)
|
|
||||||
# cab_to_update.update(cab_to_add)
|
|
||||||
# cab_to_update.update(cab_to_add)
|
|
||||||
# cab_to_update.update(cab_to_add)
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# def get_blanchfield_for_pattern(k_n, theta):
|
|
||||||
# if theta == 0:
|
|
||||||
# sf = TorusCable.get_untwisted_signature_function(k_n)
|
|
||||||
# return sf.square_root() + sf.minus_square_root()
|
|
||||||
#
|
|
||||||
# results = []
|
|
||||||
# k = abs(k_n)
|
|
||||||
# ksi = 1/(2 * k + 1)
|
|
||||||
#
|
|
||||||
# # print("lambda_odd, i.e. (theta + e) % 2 != 0")
|
|
||||||
# for e in range(1, k + 1):
|
|
||||||
# if (theta + e) % 2 != 0:
|
|
||||||
# results.append((e * ksi, 1 * sgn(k_n)))
|
|
||||||
# results.append((1 - e * ksi, -1 * sgn(k_n)))
|
|
||||||
# # print("\nlambda_even")
|
|
||||||
# # print("\nnormal")
|
|
||||||
# results_odd = results
|
|
||||||
# results = []
|
|
||||||
# for e in range(1, theta):
|
|
||||||
# if (theta + e) % 2 == 0:
|
|
||||||
# results.append((e * ksi, 1 * sgn(k_n)))
|
|
||||||
# results.append((1 - e * ksi, -1 * sgn(k_n)))
|
|
||||||
# # print(results)
|
|
||||||
# results_even_small = results
|
|
||||||
# results = []
|
|
||||||
# # print("reversed")
|
|
||||||
# for e in range(theta + 1, k + 1):
|
|
||||||
# if (theta + e) % 2 == 0:
|
|
||||||
# results.append((e * ksi, -1 * sgn(k_n)))
|
|
||||||
# results.append((1 - e * ksi, 1 * sgn(k_n)))
|
|
||||||
# # print(results)
|
|
||||||
# results_even_big = results
|
|
||||||
#
|
|
||||||
# return results_odd, results_even_small, results_even_big
|
|
||||||
# # return SignatureFunction(values=results)
|
|
||||||
#
|
|
||||||
# def main():
|
|
||||||
# prim = 3
|
|
||||||
# P = Primes()
|
|
||||||
# for it in range(20):
|
|
||||||
# prim = P.next(prim)
|
|
||||||
# k_j = (prim - 1)/2
|
|
||||||
# print(60 * "*")
|
|
||||||
# print("k is " + str(k_j))
|
|
||||||
# print(60 * "*")
|
|
||||||
#
|
|
||||||
# for i in range(1, k_j + 1):
|
|
||||||
#
|
|
||||||
# a, j, m = get_blanchfield_for_pattern(k_j, i)
|
|
||||||
# sf_j = SignatureFunction(j)
|
|
||||||
# sf_a = SignatureFunction(a)
|
|
||||||
# sf_m = SignatureFunction(m)
|
|
||||||
# sf_jam = sf_j + sf_a + sf_m
|
|
||||||
# assert TorusCable.get_blanchfield_for_pattern(k_j, i) == sf_jam
|
|
||||||
# af, jf, mf = get_blanchfield_for_pattern(-k_j, prim - i)
|
|
||||||
# print(60 * "*")
|
|
||||||
# print("lists")
|
|
||||||
# print(af)
|
|
||||||
# print(jf)
|
|
||||||
# print(mf)
|
|
||||||
# j = SignatureFunction(jf)
|
|
||||||
# a = SignatureFunction(af)
|
|
||||||
# m = SignatureFunction(mf)
|
|
||||||
# minus_jam = j + a + m
|
|
||||||
# values = cmp_blanchfield_for_pattern(-k_j, prim - i)
|
|
||||||
# print("sum of lists - 3 lists added")
|
|
||||||
# print(sorted(jf + af + mf))
|
|
||||||
#
|
|
||||||
# print("sum of lists - all values from Blanchfield")
|
|
||||||
# print(sorted(values))
|
|
||||||
#
|
|
||||||
# assert values == af + jf + mf
|
|
||||||
# print("not equeles - sf from all values")
|
|
||||||
#
|
|
||||||
# print(SignatureFunction(values))
|
|
||||||
# print("not equeles - sum of sf")
|
|
||||||
# print("sf for each list sep")
|
|
||||||
# print("jf")
|
|
||||||
# print(jf)
|
|
||||||
# print("af")
|
|
||||||
# print(af)
|
|
||||||
# print("mf")
|
|
||||||
# print(mf)
|
|
||||||
# print("sum of abouve sfs")
|
|
||||||
# print(minus_jam)
|
|
||||||
# assert TorusCable.get_blanchfield_for_pattern(-k_j, prim - i) == \
|
|
||||||
# SignatureFunction(values)
|
|
||||||
# assert TorusCable.get_blanchfield_for_pattern(-k_j, prim - i) == \
|
|
||||||
# minus_jam
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # a, j, m = get_blanchfield_for_pattern(k_j, 2 * k_j + 1 - i)
|
|
||||||
# # j = SignatureFunction(j)
|
|
||||||
# # a = SignatureFunction(a)
|
|
||||||
# # m = SignatureFunction(m)
|
|
||||||
#
|
|
||||||
# print("*" * 100)
|
|
||||||
# print("i is " + str(i) + ", q is " + str(2 * k_j + 1), " q - i is " + str(2 * k_j + 1 - i))
|
|
||||||
# print("*" * 100)
|
|
||||||
#
|
|
||||||
# ajm = sf_j + sf_a + sf_m
|
|
||||||
# ajm_minus = a + j + m
|
|
||||||
# print("4 times")
|
|
||||||
# print(ajm + ajm + ajm_minus + ajm_minus)
|
|
||||||
# print("is big")
|
|
||||||
# print((ajm + ajm + ajm_minus + ajm_minus).is_big())
|
|
||||||
# print()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user