6-d Anomaly Cancellation / example_SU2_parameter_count.sage

# the toric b=1 SU(2) model
fib = {'index': 0, 'fiber': ((1, 0, 0, 0), (0, 1, 0, 0), (-3, -2, 0, 0)), 'polytope': ((-8, -5, -1, -1), (-1, -1, 1, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 1, 0, 0), (1, 0, 0, 0)), 'h11': 3, 'h21': 231, 'fdg_curves': (((0),), ((0, 2), (2, 0)), ((0),)), 'base_coordinates': [(-8, -5, -1, -1), (-1, -1, 1, 0), (0, 0, 0, 1)], 'GaugeGroup': ('None', ('SU', 2), 'None'), 'flat_over_curve': (True, True, True), 'Kodaira': (('I', 0), ('I', 2), ('I', 0))}


import sys
sys.path.append('/home/vbraun/Sage/ReflexivePolyhedra4d/Hodge4d_fibrations_2d/src')

from toric_elliptic  import fib_to_morphism
from toric_elliptic import WeierstrassForm, WeierstrassData

f = fib_to_morphism(fib)
fm = f.fan_morphism()
fan = fm.domain_fan()


a, b, disc = WeierstrassData(fm)
assert str(disc.factor()[0]) == '(v, 2)'


Avars = [ 'a'+str(i) for i in range(316) ]
R = PolynomialRing(QQ, 'u,v,w,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,' + ','.join(Avars))

bigorbit = [1] * fan.nrays()
for i,n in enumerate(fib['base_coordinates']):
    bigorbit[ fan.rays().index(vector(n)) ] = R.gen(i)

for i,n in enumerate(fm.kernel_fan().rays()):
    bigorbit[ fan.rays().index(vector(n)) ] = R.gen(3+i)



monomials = [ m(bigorbit) for m in (-f.domain().K()).sections_monomials() ]
random_coefficients = dict( (R(variable),randint(-1000000,1000000)) for variable in Avars )
polynomial = sum( R(c)*m for c,m in zip(Avars, monomials) )


base_discriminant = fib['Kodaira'].index(('I',2))
base_smooth = [0,1,2]
base_smooth.remove(base_discriminant)
base = [ R.gen(base_discriminant), R.gen(base_smooth[0]), R.gen(base_smooth[1]) ]

a, b = WeierstrassForm(polynomial, variables=R.gens()[3:13])





def nics3(k, variables=None):
    for a in range(k+1):
        for b in range(k+1):
            for c in range(k+1):
                if a+b+c==k:
                    if variables:
                        m = variables[0]**a * variables[1]**b * variables[2]**c
                        yield (ZZ(a),ZZ(b),ZZ(c)), m
                    else:
                        yield (ZZ(a),ZZ(b),ZZ(c))


Weierstrass_coeffs = [
    a.coefficient(m) for indices,m in nics3(12,base)
    ] + [
    b.coefficient(m) for indices,m in nics3(18,base)
    ] 

assert len(Weierstrass_coeffs) == 281
assert len(Avars) == 316


jacobian = matrix(QQ, len(Weierstrass_coeffs), len(Avars))
for i, coeff in enumerate(Weierstrass_coeffs):
    for j, variable in enumerate(map(R,Avars)):
        jacobian[i,j] = coeff.derivative(variable).subs(random_coefficients)

assert jacobian.rank() == 238


a_res = a.subs(random_coefficients)
b_res = b.subs(random_coefficients)
disc_res = 4*a_res**3 + 27 * b_res**2

disc_uni = R(disc_res/base[0]**2).subs({base[0]:sqrt(2).n()*base[2], base[1]:1}).univariate_polynomial()
roots = disc_uni.roots(ring=ComplexField(5000))
F = ComplexField(400)

for root in set( F(r[0]) for r in roots ):
    print len([r for r in roots if abs(root-r[0])<1e-30]), CDF(root)

from toric_elliptic.VanishingDegrees import WeierstrassCodim2VanishingDegees
WeierstrassCodim2VanishingDegees(a_res, b_res, disc_res, prec=500)






################33

X = f.domain()
aK = -X.K()
Dz = X.divisor(6)
for cone in flatten(f.codomain().fan().cones()):
    fiber_graph = f.fiber_graph(cone)
    for fiber in fiber_graph.get_vertices().values():
        fiber_Dz = fiber.embedding_morphism().pullback_divisor(Dz)
        fiber_aK = fiber.embedding_morphism().pullback_divisor(aK)
        print cone.ambient_ray_indices(), fiber, fiber.integrate(fiber_Dz.cohomology_class() * fiber_aK.cohomology_class())












################33
# the non-toric b=1 SU(2) model

fib = {'index': 1, 'fdg_curves': ((0,), (0,), (0,)), 'fiber': ((1, 0, 0, 0), (0, 1, 0, 0), (-3, -2, 0, 0)), 'polytope': ((-8, -5, -1, -1), (-3, -2, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 1, 0, 0), (1, 0, 0, 0)), 'flat_over_curve': (True, True, True), 'Kodaira': (('I', 0), ('I', 0), ('I', 0)), 'h11': 3, 'GaugeGroup': ('None', 'None', 'None'), 'base_coordinates': [(-8, -5, -1, -1), (0, 0, 1, 0), (0, 0, 0, 1)], 'h21': 231}



import sys
sys.path.append('/home/vbraun/Sage/ReflexivePolyhedra4d/Hodge4d_fibrations_2d/src')

from toric_elliptic  import fib_to_morphism
from toric_elliptic import WeierstrassForm, WeierstrassData

f = fib_to_morphism(fib)
fm = f.fan_morphism()
a, b, disc = WeierstrassData(fm)

disc.parent().inject_variables()

(-18126*u + 602519*v + 380292*w, 2)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.