Path: blob/master/sage/quadratic_forms/quadratic_form__mass.py
4100 views
"""1Shimura Mass2"""3######################################################4## Routines to compute the mass of a quadratic form ##5######################################################67## Import all general mass finding routines8from sage.quadratic_forms.quadratic_form__mass__Siegel_densities import \9mass__by_Siegel_densities, \10Pall_mass_density_at_odd_prime, \11Watson_mass_at_2, \12Kitaoka_mass_at_2, \13mass_at_two_by_counting_mod_power14from sage.quadratic_forms.quadratic_form__mass__Conway_Sloane_masses import \15parity, \16is_even, \17is_odd, \18conway_species_list_at_odd_prime, \19conway_species_list_at_2, \20conway_octane_of_this_unimodular_Jordan_block_at_2, \21conway_diagonal_factor, \22conway_cross_product_doubled_power, \23conway_type_factor, \24conway_p_mass, \25conway_standard_p_mass, \26conway_standard_mass, \27conway_mass28# conway_generic_mass, \29# conway_p_mass_adjustment3031###################################################323334def shimura_mass__maximal(self,):35"""36Use Shimura's exact mass formula to compute the mass of a maximal37quadratic lattice. This works for any totally real number field,38but has a small technical restriction when `n` is odd.3940INPUT:41none4243OUTPUT:44a rational number4546EXAMPLE::4748sage: Q = DiagonalQuadraticForm(ZZ, [1,1,1])49sage: Q.shimura_mass__maximal()5051"""52pass53545556def GHY_mass__maximal(self):57"""58Use the GHY formula to compute the mass of a (maximal?) quadratic59lattice. This works for any number field.6061Reference: See [GHY, Prop 7.4 and 7.5, p121] and [GY, Thrm 10.20, p25].6263INPUT:64none6566OUTPUT:67a rational number6869EXAMPLE::7071sage: Q = DiagonalQuadraticForm(ZZ, [1,1,1])72sage: Q.GHY_mass__maximal()7374"""75pass767778