signature_function/notebooks/tests.ipynb
2021-07-22 23:24:13 +02:00

15 KiB

%matplotlib inline
%load_ext pycodestyle_magic

# display full output, not only last result, except ended with semicolon
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all';
from IPython.display import Image, SVG
import logging
logging.basicConfig(level=logging.INFO)
import path
from gaknot import import_sage
cs = import_sage('cable_signature', package='gaknot', path=path.module_path)
sg = import_sage('signature', package='gaknot', path=path.module_path)
m = import_sage('main', package='gaknot', path=path.module_path)
m.prove_lemma(verbose=True)

Other cables

# knot_formula = "[[k[0], k[1], k[3]]," + \
#                " [-k[1], -k[3]]," + \
#                " [k[2], k[3]]," + \
#                " [-k[0], -k[2], -k[3]]]"
# # q_vector = (3, 5, 7, 13)
# q_vector = (3, 5, 7, 11)

# template = cs.CableTemplate(knot_formula, q_vector=q_vector, verbose=True)
# cable = template.cable
# # cable.plot_all_summands()
# cable.is_function_big_for_all_metabolizers(invariant=cs.SIGMA)

Cables with 8 direct summands

formula_1 = "[[k[0], k[5], k[3]], " + \
                  "[-k[1], -k[3]], " + \
                   "[k[2], k[3]], " + \
           "[-k[0], -k[2], -k[3]]]"
formula_2 = "[[k[4], k[1], k[7]], " + \
                  "[-k[5], -k[7]], " + \
                   "[k[6], k[7]], " + \
           "[-k[4], -k[6], -k[7]]]"



# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2
# cable_template.knot_formula

Relatively small cables

# q_vector = (5, 13, 19, 41,\
#             7, 17, 23, 43)
# cable_template.fill_q_vector(q_vector=q_vector)
# cable = cable_template.cable
# print(cable.knot_description)

# q_vector_small = (3, 7, 13, 19,\
#                   5, 11, 17, 23)
# cable_template.fill_q_vector(q_vector=q_vector)
# cable = cable_template.cable
# print(cable.knot_description)
# cable.is_signature_big_for_all_metabolizers()

Slice candidate


# cable_template.fill_q_vector()
# # print(cable_template.q_vector)
# # print(cable_template.knot_formula)

# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)
# sf = slice_canidate(4,4,4,4,0,0,0,0)
# sf = slice_canidate(4,1,1,4,0,0,0,0)


# cable.is_signature_big_for_all_metabolizers()


# knot_formula = "[[k[0], k[1], k[4]], [-k[1], -k[3]],\
#                  [k[2], k[3]], [-k[0], -k[2], -k[4]]]"

# knot_formula = "[[k[3]], [-k[3]],\
#                 [k[3]], [-k[3]] ]"

# knot_formula = "[[k[3], k[2], k[0]], [-k[2], -k[0]],\
#                  [k[1], k[0]], [-k[3], -k[1], -k[0]]]"

# knot_formula = "[[k[0], k[1], k[2]], [k[3], k[4]],\
#                  [-k[0], -k[3], -k[4]], [-k[1], -k[2]]]"

# knot_formula = "[[k[0], k[1], k[2]], [k[3]],\
#                  [-k[0], -k[1], -k[3]], [-k[2]]]"
formula_1 = "[[k[0], k[5], k[3]], " + \
                  "[-k[1], -k[3]], " + \
                   "[k[2], k[3]], " + \
           "[-k[0], -k[2], -k[3]]]"
formula_2 = "[[k[4], k[1], k[7]], " + \
                  "[-k[5], -k[7]], " + \
                   "[k[6], k[7]], " + \
           "[-k[4], -k[6], -k[7]]]"



# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2

# cable_template.fill_q_vector()
# # print(cable_template.q_vector)
# # print(cable_template.knot_formula)

# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)
# sf = slice_canidate(4,4,4,4,0,0,0,0)
# sf = slice_canidate(4,1,1,4,0,0,0,0)


# slice_canidate.q_order
# # slice_canidate.is_signature_big_for_all_metabolizers()
formula_1 = "[[k[0], k[5], k[3]], " + \
                  "[-k[5], -k[3]], " + \
                   "[k[2], k[3]], " + \
            "[-k[4], -k[2], -k[3]]]"
formula_2 = "[[k[4], k[1], k[7]], " + \
                  "[-k[1], -k[7]], " + \
                   "[k[6], k[7]], " + \
            "[-k[0], -k[6], -k[7]]]"




# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2
# cable_template.fill_q_vector()

# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)

# slice_canidate.q_order
# # slice_canidate.is_signature_big_for_all_metabolizers()
# sigma = slice_canidate.get_sigma_as_function_of_theta()
# # sigma((0, 6, 6, 0, 0,0,0,0))
# # 13450/83
# sigma((9, 9, 9, 9, 0,0,0,0))




formula_1 = "[[k[0], k[5], k[3]], " + \
                  "[-k[1], -k[3]], " + \
                         "[ k[3]], " + \
            "[-k[4], -k[6], -k[3]]]"

formula_2 = "[[k[4], k[1], k[7]], " + \
                       "[ -k[7]], " + \
                   "[k[6], k[7]], " + \
            "[-k[0], -k[5], -k[7]]]"




# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2

# cable_template.fill_q_vector()
# # print(cable_template.q_vector)
# # print(cable_template.knot_formula)

# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)
# sf = slice_canidate(4,4,4,4,0,0,0,0)
# sf = slice_canidate(4,1,1,4,0,0,0,0)
# slice_canidate.is_signature_big_for_all_metabolizers()
formula_1 = "       [ [k[5],  k[3]], " + \
            "       [ -k[1], -k[3]], " + \
                   "       [  k[3]], " + \
            "[-k[4],  -k[6], -k[3]]]"

formula_2 = "[[k[4],   k[1],  k[7]], " + \
                       "[    -k[7]], " + \
                     "[k[6],  k[7]], " + \
                    "[-k[5], -k[7]]]"




# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2

# cable_template.fill_q_vector()
# # print(cable_template.q_vector)
# # print(cable_template.knot_formula)

# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)
# sf = slice_canidate(4,4,4,4,0,0,0,0)
# sf = slice_canidate(4,1,1,4,0,0,0,0)
# slice_canidate.q_order
# # slice_canidate.is_signature_big_for_all_metabolizers()
# sf = slice_canidate()
# sf = sf[2]
# sf.plot()
formula_1 = "[ [k[5],  k[3]], " + \
            "[ -k[1], -k[3]], " + \
            "[         k[3]], " + \
            "[ -k[6], -k[3]]]"

formula_2 = "[[ k[1],   k[7]], " + \
             "[        -k[7]], " + \
             "[  k[6],  k[7]], " + \
             "[ -k[5], -k[7]]]"
# cable_template_1 = cs.CableTemplate(knot_formula=formula_1)
# cable_template_2 = cs.CableTemplate(knot_formula=formula_2)
# cable_template = cable_template_1 + cable_template_2
# cable_template.knot_formula
# cable_template.fill_q_vector()
# print(cable_template.q_vector)
# print(cable_template.knot_formula)
# cable_template.fill_q_vector()
# print(cable_template.q_vector)
# print(cable_template.knot_formula)
# slice_canidate = cable_template.cable
# print(slice_canidate.knot_description)
# sf = slice_canidate(4,4,4,4,0,0,0,0)
# sf = slice_canidate(4,1,1,4,0,0,0,0)
# slice_canidate.q_order
# slice_canidate.is_sigma_big_for_all_metabolizers()
# slice_canidate.is_signature_big_for_all_metabolizers()
# slice_canidate.is_function_big_for_all_metabolizers()
# slice_canidate.is_function_big_for_all_metabolizers(invariant=cs.SIGMA)
# slice_canidate.is_function_big_for_all_metabolizers(invariant=cs.SIGNATURE)
# sigma = slice_canidate.get_sigma_as_function_of_theta()
# sigma((0, 6, 6, 0, 0,0,0,0))
# # 13450/83
# sigma((9, 0, 0, 9, 0,0,0,0))
# _, _, sf = slice_canidate((1, 1, 0, 0, 0,0,0,0))
# sf
# sg.SignaturePloter.plot(sf)

# slice_canidate.plot_sum_for_theta_vector([0r,4r,0r,4r,0r,0r,0r,0r], save_to_dir=True)
# sf.plot()
# help(cs.CableTemplate.get_q_vector)