$\mathcal{H}(2^4)$ Branching Occurs Over Three 2-Torsion Points

This notebook addresses the case where three of the $2$-torsion points have a zero above them. We arrange the surface so that three double zeros descend to $\{(0,0), (1,0)\}$.

We recall that in $\mathcal{H}(2^4)$, $d_{opt} = 9$.

In [1]:
import re

Step 1

In [2]:
#This loads all of the 1-cylinder diagrams in (all connected components of the stratum) H(2,2) formatted as python lists

with open('ST5_data//1-cyl_diags//cyl_diags-2_2_2-c-1', 'r') as file:
    H2_2_2_cyl_diags = eval(file.read())

H2_cyl_diags = [[[[0, 1, 2], [0, 1, 2]]]]


#This loads all of the functions for processing cylinder diagrams

#Only the general cylinder diagram functions are needed in this case
%run ./ST5_fcns/cyl_diag_fcns.ipynb

#In the previous case finding a simple zero sufficed to extract potential odd length saddle connections
#In this case it's the switch from one zero to another that marks an odd saddle connection

def extract_switch(cyl_bot_int):
#    print(cyl_bot_int)
    length = len(cyl_bot_int)
    switch_list = []
    for i in enumerate(cyl_bot_int):
        if i[1] == cyl_bot_int[(i[0]+1)%length]:
            switch_list += [0]
        else:
            switch_list += [1]
    return switch_list

def strat_odd_sc_2t4_3_branch_points(master_list):
    #This is the main function to run to get the processed data
    #The data consists of 
    total = []
    for i in master_list:
        print(i, ' from master')
        cyl_bot = vertex_labels(i)[0][0]
        print(cyl_bot)
        cyl_bot_int = [int(j[1:]) for j in cyl_bot]
        for vertex in range(3):
            fake_labels = []
            for vert_copy in cyl_bot_int:
                if vert_copy == vertex:
                    fake_labels += [0]
                else:
                    fake_labels += [1]
            print(fake_labels)
            total.append((i,[extract_switch(fake_labels)]))
    return total
In [3]:
#This runs instantly and constructs all of the binary lists
#we may have to 

H2_2_2_vertex_data = strat_odd_sc_2t4_3_branch_points(H2_2_2_cyl_diags)
([[[0, 1, 4, 7, 5, 3, 8, 6, 2], [0, 1, 4, 8, 5, 3, 7, 6, 2]]], ' from master')
['V0', 'V1', 'V0', 'V1', 'V2', 'V2', 'V2', 'V0', 'V1']
[0, 1, 0, 1, 1, 1, 1, 0, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 0, 0, 0, 1, 1]
([[[0, 1, 8, 3, 5, 4, 6, 7, 2], [0, 1, 3, 6, 8, 5, 7, 4, 2]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V1', 'V0', 'V2', 'V2', 'V1']
[0, 1, 0, 1, 1, 0, 1, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 0, 1, 1, 0, 0, 1]
([[[0, 2, 8, 4, 5, 6, 7, 3, 1], [0, 2, 4, 6, 8, 7, 5, 3, 1]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V1', 'V2', 'V2', 'V0', 'V1']
[0, 1, 0, 1, 1, 1, 1, 0, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 0, 1, 0, 0, 1, 1]
([[[0, 3, 8, 5, 2, 4, 1, 7, 6], [0, 3, 5, 2, 7, 8, 4, 1, 6]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V1', 'V2', 'V0', 'V2', 'V1']
[0, 1, 0, 1, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1]
([[[0, 7, 4, 5, 6, 2, 1, 8, 3], [0, 4, 6, 8, 7, 5, 2, 1, 3]]], ' from master')
['V0', 'V1', 'V2', 'V0', 'V1', 'V2', 'V0', 'V2', 'V1']
[0, 1, 1, 0, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 0, 1, 1, 0, 1, 0, 1]
([[[0, 8, 1, 3, 4, 6, 5, 2, 7], [0, 1, 4, 5, 7, 8, 3, 6, 2]]], ' from master')
['V0', 'V1', 'V2', 'V0', 'V1', 'V2', 'V0', 'V1', 'V2']
[0, 1, 1, 0, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 0, 1]
[1, 1, 0, 1, 1, 0, 1, 1, 0]
([[[0, 8, 6, 5, 3, 1, 7, 4, 2], [0, 5, 8, 3, 1, 4, 6, 7, 2]]], ' from master')
['V0', 'V1', 'V2', 'V2', 'V0', 'V1', 'V0', 'V2', 'V1']
[0, 1, 1, 1, 0, 1, 0, 1, 1]
[1, 0, 1, 1, 1, 0, 1, 1, 0]
[1, 1, 0, 0, 1, 1, 1, 0, 1]
([[[0, 2, 1, 8, 4, 5, 6, 7, 3], [0, 4, 6, 8, 7, 5, 2, 1, 3]]], ' from master')
['V0', 'V1', 'V0', 'V1', 'V2', 'V0', 'V2', 'V2', 'V1']
[0, 1, 0, 1, 1, 0, 1, 1, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 0, 1, 0, 0, 1]
([[[0, 2, 1, 8, 6, 4, 5, 7, 3], [0, 5, 8, 7, 6, 2, 1, 4, 3]]], ' from master')
['V0', 'V1', 'V2', 'V1', 'V2', 'V0', 'V2', 'V0', 'V1']
[0, 1, 1, 1, 1, 0, 1, 0, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 0, 1, 0, 1, 1]
([[[0, 4, 1, 8, 6, 3, 2, 7, 5], [0, 3, 2, 8, 7, 4, 1, 6, 5]]], ' from master')
['V0', 'V1', 'V2', 'V1', 'V0', 'V2', 'V0', 'V2', 'V1']
[0, 1, 1, 1, 0, 1, 0, 1, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 1, 0, 1, 0, 1]
([[[0, 4, 1, 8, 6, 5, 2, 7, 3], [0, 8, 7, 5, 2, 6, 4, 1, 3]]], ' from master')
['V0', 'V1', 'V0', 'V1', 'V0', 'V2', 'V2', 'V2', 'V1']
[0, 1, 0, 1, 0, 1, 1, 1, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 1, 0, 0, 0, 1]
([[[0, 5, 7, 2, 3, 6, 1, 4, 8], [0, 5, 6, 1, 4, 7, 2, 3, 8]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V0', 'V2', 'V1', 'V2', 'V1']
[0, 1, 0, 1, 0, 1, 1, 1, 1]
[1, 0, 1, 1, 1, 1, 0, 1, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1]
([[[0, 7, 4, 2, 1, 8, 6, 5, 3], [0, 5, 8, 2, 1, 4, 6, 7, 3]]], ' from master')
['V0', 'V0', 'V1', 'V2', 'V2', 'V2', 'V1', 'V1', 'V0']
[0, 0, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 1, 1, 0, 0, 1]
[1, 1, 1, 0, 0, 0, 1, 1, 1]
([[[0, 8, 3, 4, 2, 5, 6, 7, 1], [0, 2, 7, 5, 8, 4, 6, 3, 1]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V1', 'V0', 'V2', 'V2', 'V1']
[0, 1, 0, 1, 1, 0, 1, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 0, 1, 1, 0, 0, 1]
([[[0, 8, 3, 6, 4, 2, 5, 7, 1], [0, 2, 7, 6, 5, 8, 4, 3, 1]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V2', 'V1', 'V0', 'V2', 'V1']
[0, 1, 0, 1, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 1, 0, 1, 1, 0]
[1, 1, 1, 0, 0, 1, 1, 0, 1]
([[[0, 8, 4, 1, 7, 3, 2, 6, 5], [0, 6, 3, 2, 7, 4, 1, 8, 5]]], ' from master')
['V0', 'V0', 'V1', 'V1', 'V1', 'V2', 'V2', 'V2', 'V0']
[0, 0, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 0, 0, 0, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 0, 0, 0, 1]
([[[0, 8, 6, 1, 5, 2, 4, 3, 7], [0, 1, 7, 4, 5, 6, 3, 8, 2]]], ' from master')
['V0', 'V1', 'V2', 'V0', 'V0', 'V1', 'V1', 'V2', 'V2']
[0, 1, 1, 0, 0, 1, 1, 1, 1]
[1, 0, 1, 1, 1, 0, 0, 1, 1]
[1, 1, 0, 1, 1, 1, 1, 0, 0]
([[[0, 8, 6, 2, 4, 1, 5, 3, 7], [0, 1, 7, 5, 4, 6, 3, 8, 2]]], ' from master')
['V0', 'V1', 'V2', 'V1', 'V1', 'V0', 'V0', 'V2', 'V2']
[0, 1, 1, 1, 1, 0, 0, 1, 1]
[1, 0, 1, 0, 0, 1, 1, 1, 1]
[1, 1, 0, 1, 1, 1, 1, 0, 0]
([[[0, 8, 6, 2, 4, 5, 1, 3, 7], [0, 1, 7, 6, 4, 8, 3, 5, 2]]], ' from master')
['V0', 'V1', 'V2', 'V1', 'V2', 'V2', 'V0', 'V0', 'V1']
[0, 1, 1, 1, 1, 1, 0, 0, 1]
[1, 0, 1, 0, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 0, 0, 1, 1, 1]
([[[0, 8, 6, 2, 4, 5, 3, 1, 7], [0, 1, 6, 4, 8, 3, 7, 5, 2]]], ' from master')
['V0', 'V1', 'V2', 'V1', 'V2', 'V2', 'V0', 'V1', 'V0']
[0, 1, 1, 1, 1, 1, 0, 1, 0]
[1, 0, 1, 0, 1, 1, 1, 0, 1]
[1, 1, 0, 1, 0, 0, 1, 1, 1]
([[[0, 8, 6, 3, 1, 2, 4, 5, 7], [0, 1, 4, 3, 8, 7, 6, 5, 2]]], ' from master')
['V0', 'V0', 'V1', 'V1', 'V2', 'V0', 'V2', 'V2', 'V1']
[0, 0, 1, 1, 1, 0, 1, 1, 1]
[1, 1, 0, 0, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 0, 1, 0, 0, 1]
([[[0, 8, 6, 3, 2, 5, 4, 7, 1], [0, 2, 7, 5, 6, 4, 8, 3, 1]]], ' from master')
['V0', 'V1', 'V2', 'V0', 'V1', 'V0', 'V2', 'V2', 'V1']
[0, 1, 1, 0, 1, 0, 1, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 0, 1, 1, 1, 0, 0, 1]
([[[0, 8, 6, 3, 4, 1, 5, 2, 7], [0, 1, 8, 3, 7, 4, 5, 6, 2]]], ' from master')
['V0', 'V1', 'V2', 'V0', 'V1', 'V2', 'V0', 'V1', 'V2']
[0, 1, 1, 0, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 0, 1]
[1, 1, 0, 1, 1, 0, 1, 1, 0]
([[[0, 8, 6, 3, 5, 1, 4, 2, 7], [0, 1, 6, 7, 5, 4, 8, 3, 2]]], ' from master')
['V0', 'V1', 'V0', 'V2', 'V1', 'V2', 'V0', 'V1', 'V2']
[0, 1, 0, 1, 1, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1, 1, 0, 1]
[1, 1, 1, 0, 1, 0, 1, 1, 0]
([[[0, 8, 6, 4, 2, 5, 1, 3, 7], [0, 1, 6, 5, 7, 4, 8, 3, 2]]], ' from master')
['V0', 'V1', 'V2', 'V2', 'V1', 'V0', 'V2', 'V0', 'V1']
[0, 1, 1, 1, 1, 0, 1, 0, 1]
[1, 0, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 0, 0, 1, 1, 0, 1, 1]
([[[0, 8, 6, 4, 2, 5, 3, 1, 7], [0, 1, 4, 8, 3, 7, 5, 6, 2]]], ' from master')
['V0', 'V1', 'V2', 'V2', 'V1', 'V2', 'V0', 'V1', 'V0']
[0, 1, 1, 1, 1, 1, 0, 1, 0]
[1, 0, 1, 1, 0, 1, 1, 0, 1]
[1, 1, 0, 0, 1, 0, 1, 1, 1]
([[[0, 8, 6, 5, 1, 2, 3, 4, 7], [0, 1, 6, 3, 8, 7, 5, 4, 2]]], ' from master')
['V0', 'V0', 'V1', 'V2', 'V2', 'V0', 'V1', 'V1', 'V2']
[0, 0, 1, 1, 1, 0, 1, 1, 1]
[1, 1, 0, 1, 1, 1, 0, 0, 1]
[1, 1, 1, 0, 0, 1, 1, 1, 0]
([[[0, 8, 7, 3, 5, 4, 6, 2, 1], [0, 2, 4, 7, 5, 6, 3, 8, 1]]], ' from master')
['V0', 'V0', 'V1', 'V1', 'V2', 'V1', 'V2', 'V2', 'V0']
[0, 0, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 0, 0, 1, 0, 1, 1, 1]
[1, 1, 1, 1, 0, 1, 0, 0, 1]
([[[0, 8, 7, 4, 3, 5, 6, 2, 1], [0, 2, 4, 5, 7, 6, 3, 8, 1]]], ' from master')
['V0', 'V0', 'V1', 'V2', 'V1', 'V2', 'V2', 'V1', 'V0']
[0, 0, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 0, 1, 1, 0, 1]
[1, 1, 1, 0, 1, 0, 0, 1, 1]
([[[0, 8, 7, 5, 3, 4, 6, 2, 1], [0, 2, 4, 5, 6, 7, 3, 8, 1]]], ' from master')
['V0', 'V0', 'V1', 'V2', 'V1', 'V1', 'V2', 'V2', 'V0']
[0, 0, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 0, 1, 0, 0, 1, 1, 1]
[1, 1, 1, 0, 1, 1, 0, 0, 1]

Among partitions of $18$ into $9$ numbers the minimum of the maximum numbers among all partitions is $\lceil 2d_{opt}/9 \rceil = 2$, which is $2$ in this case.

For the partition of $18$ into $3$ numbers, we have that the minimum is given by the round up of $18/3$, which is $6$. In fact, all three numbers must be even because there is no branching over the other $2$-torsion point in the boundary of the horizontal cylinder. In fact, $t_0 = 2$ is impossible because there is a unique partition of $18$ in that case and there are no odd numbers, which is impossible because there are at least two saddle connections with odd length.

Solving $18 - 2(6) - 2t_0 \geq 0$ implies that the largest value of $t_0$ is $3$.

Solving $18 - 2s_0 - 2(2) \geq 0$ implies that the largest value of $s_0$ is $7$. Since the number must be even, the largest value of $s_0$ is in fact $6$.

In summary:

$$s_0 = 6 \text{ and } t_0 = 3.$$

Step 2

Unlike the cases where $d_{opt}$ was even, this case has very few restrictions on the partitions. There must be at least two odd numbers in the partitions, but any positive even number is permissible. Therefore, we rewrite the usual partition functions without the usual restrictions.

In [4]:
def partition_pre(n, d, t_max = None, depth=0):
    #Function pulled from https://stackoverflow.com/questions/10035752/elegant-python-code-for-integer-partitioning
    #Written by Nico Schlömer
    if t_max == None:
        t_max = n+1
    if d == depth:
        return [[]]
    return [
        item + [i]
        for i in range(1,min(n+1,t_max+1))
        for item in partition_pre(n-i, d, t_max = t_max, depth=depth+1)
        ]

def t_max_check(part, t_max):
    for j in part:
        if j > t_max:
            return False
    return True

def partition(n, d, t_max):
    #Function pulled from https://stackoverflow.com/questions/10035752/elegant-python-code-for-integer-partitioning
    #Written by Nico Schlömer
    #Key in the if statement below is that the functions are sorted in terms of computational complexity
    #The fastest check is performed first and the most intensive last
    return [[n-sum(p)] + p for p in partition_pre(n-1, d-1, t_max = t_max) 
            if t_max_check([n-sum(p)] + p, t_max)]

def odd_number_count_check(part):
    if sum([j%2 for j in part]) >= 2:
        return True
    else:
        return False

def create_sc_partition_file_big_tuple(t_tuple_begin, d_opt, part_length, filename_root):
    width = 2*d_opt
    t_list_begin = list(t_tuple_begin)
    n = width - sum(t_list_begin)
    d = part_length-len(t_list_begin)
    end_part_list = partition(n, d, t_max = t_list_begin[0])
    part_list = [tuple(t_list_begin + part) for part in end_part_list 
                 if odd_number_count_check(t_list_begin + part)]
    file_tag = ''
    for t in t_list_begin:
        file_tag += str(t) + '_'
    file_tag = file_tag[:-1]
    filename = filename_root + file_tag
    with open(filename, 'w') as file:
        file.write(str(part_list))
    print(filename + ' written')
    return 'done'

def create_sc_partition_file(t_tuple_begin, d_opt, part_length, filename_root, t0_range):
    width = 2*d_opt
    try:
        t_tuple_begin_list = list(t_tuple_begin)
    except:
        t_tuple_begin_list = [int(t_tuple_begin)]
    if len(t_tuple_begin_list) > 0:
        return create_sc_partition_file_big_tuple(t_tuple_begin_list, width, part_length, filename_root)
    else:
        total = []
        for t0 in t0_range:
            t_list_begin = [t0]
            n = width - t0
            d = part_length - 1
            end_part_list = partition(n, d, t_max = t_list_begin[0])
            part_list = [tuple(t_list_begin + part) for part in end_part_list 
                         if odd_number_count_check(t_list_begin + part)]
            total += part_list
        with open(filename_root, 'w') as file:
            file.write(str(total))
        print(filename_root + ' written')
        return 'done'
In [5]:
if True:
    create_sc_partition_file((), part_length = 9, t0_range = [3], d_opt = 9,
                             filename_root = 'ST5_data//H_2t4//3_branch_point//partitions//H2_2_2_part')

#Load the partitions

if True:
    with open('ST5_data//H_2t4//3_branch_point//partitions//H2_2_2_part', 'r') as file:
        H2_2_2_part = eval(file.read())

H2_part = [(6, 6, 6)]
ST5_data//H_2t4//3_branch_point//partitions//H2_2_2_part written

Step 3

In [6]:
#This loads all of the align_list functions needed for nearly every case
#This includes the align_list evaluate function

%run ./ST5_fcns/align_list_fcns.ipynb

if True:
    for t in [3]:
        align_list_write_file(H2_2_2_part, H2_2_2_vertex_data, 
                              'ST5_data//H_2t4//3_branch_point//align_list//H_2_2_2_align_list', 
                              t0 = t)

if True:
    align_list = [(H2_part[0], H2_cyl_diags[0])]
    with open('ST5_data//H_2t4//3_branch_point//align_list//H_2_align_list_6', 'w') as file:
        file.write(str(align_list))
1016 partitions to search

Step 4

In [7]:
#This loads all of the visible_align_list functions needed for nearly every case

%run ./ST5_fcns/align_list_visible_fcns.ipynb

if True:
    generate_all_align_list_visible_files([6], [3], 9, 
                                          'ST5_data//H_2t4//3_branch_point//', 
                                          'align_list//H_2_2_2_align_list_', 
                                          'align_list_visible//H_2_2_2_align_list_')

if True:
    generate_all_align_list_visible_files([3], [6], 9, 
                                          'ST5_data//H_2t4//3_branch_point//', 
                                          'align_list//H_2_align_list_', 
                                          'align_list_visible//H_2_align_list_')
total_list generated
ST5_data//H_2t4//3_branch_point//align_list//H_2_2_2_align_list_3 read
2924 configurations to search
ST5_data//H_2t4//3_branch_point//align_list_visible//H_2_2_2_align_list_3_visible_6 written
total_list generated
ST5_data//H_2t4//3_branch_point//align_list//H_2_align_list_6 read
1 configurations to search
ST5_data//H_2t4//3_branch_point//align_list_visible//H_2_align_list_6_visible_3 written

Step 5

In [8]:
#At this point, none of the files above need to be loaded for this to run.
#Once the files above are generated, the file sizes are small enough that these can be loaded on the fly.

#This loads all of the visible_align_list functions needed for nearly every case

%run ./ST5_fcns/combine_align_list_visible_fcns.ipynb

if True:
    combine_align_list_visible_write_file(s_range = [6], 
                                          s_filename_root = 'align_list_visible//H_2_align_list_', 
                                          t_range = [3], 
                                          t_filename_root = 'align_list_visible//H_2_2_2_align_list_',
                                          d_opt = 9, 
                                          root_dir = 'ST5_data//H_2t4//3_branch_point//')
ST5_data//H_2t4//3_branch_point//align_list_visible//H_2_2_2_align_list_3_visible_6 read
ST5_data//H_2t4//3_branch_point//align_list_visible//H_2_align_list_6_visible_3 read
empty list
admissible_list written with 0 elements