Ejemplo n.º 1
0
def abelian_variety_search(info, query):
    parse_ints(info,query,'q',name='base field')
    parse_ints(info,query,'g',name='dimension')
    parse_bool(info,query,'simple',qfield='is_simp')
    parse_bool(info,query,'primitive',qfield='is_prim')
    parse_bool_unknown(info, query, 'jacobian', qfield='is_jac')
    parse_bool_unknown(info, query, 'polarizable', qfield='is_pp')
    parse_ints(info,query,'p_rank')
    parse_ints(info,query,'ang_rank')
    parse_newton_polygon(info,query,'newton_polygon',qfield='slps')
    parse_string_start(info,query,'initial_coefficients',qfield='poly_str',initial_segment=["1"])
    parse_string_start(info,query,'abvar_point_count',qfield='A_cnts_str')
    parse_string_start(info,query,'curve_point_count',qfield='C_cnts_str',first_field='pt_cnt')
    if info.get('simple_quantifier') == 'contained':
        parse_subset(info,query,'simple_factors',qfield='simple_distinct',mode='subsets')
    elif info.get('simple_quantifier') == 'exactly':
        parse_subset(info,query,'simple_factors',qfield='simple_distinct',mode='exact')
    elif info.get('simple_quantifier') == 'include':
        parse_submultiset(info,query,'simple_factors',mode='append')
    for n in range(1,6):
        parse_ints(info,query,'dim%s_factors'%n)
    for n in range(1,4):
        parse_ints(info,query,'dim%s_distinct'%n)
    parse_nf_string(info,query,'number_field',qfield='nf')
    parse_galgrp(info,query,qfield=('galois_n','galois_t'))
Ejemplo n.º 2
0
def number_field_search(info, query):
    parse_ints(info,query,'degree')
    parse_galgrp(info,query, qfield=('degree', 'galt'))
    parse_bracketed_posints(info,query,'signature',qfield=('degree','r2'),exactlength=2,extractor=lambda L: (L[0]+2*L[1],L[1]))
    parse_signed_ints(info,query,'discriminant',qfield=('disc_sign','disc_abs'))
    parse_floats(info, query, 'rd')
    parse_floats(info, query, 'regulator')
    parse_ints(info,query,'class_number')
    parse_ints(info,query,'num_ram')
    parse_bool(info,query,'cm_field',qfield='cm')
    parse_bracketed_posints(info,query,'class_group',check_divisibility='increasing',process=int)
    parse_primes(info,query,'ur_primes',name='Unramified primes',
                 qfield='ramps',mode='complement')
    # modes are now contained (in), exactly, include
    if 'ram_quantifier' in info and str(info['ram_quantifier']) == 'include':
        mode='append'
    elif 'ram_quantifier' in info and str(info['ram_quantifier']) == 'contained':
        mode='subsets'
    else:
        mode='exact'
    parse_primes(info,query,'ram_primes',name='Ramified primes',
                 qfield='ramps',mode=mode,radical='disc_rad')
    ## This seems not to be used
    #if 'lucky' in info:
    #    label = db.nf_fields.lucky(query, 0)
    #    if label:
    #        return redirect(url_for(".by_label", label=clean_input(label)))
    info['wnf'] = WebNumberField.from_data
    info['gg_display'] = group_pretty_and_nTj
Ejemplo n.º 3
0
def artin_representation_search(info, query):
    query['Hide'] = 0
    info['sign_code'] = 0
    parse_primes(info,
                 query,
                 "unramified",
                 name="Unramified primes",
                 qfield="BadPrimes",
                 mode="complement")
    parse_primes(info,
                 query,
                 "ramified",
                 name="Ramified primes",
                 qfield="BadPrimes",
                 mode="append")
    parse_element_of(info, query, "root_number", qfield="GalConjSigns")
    parse_restricted(info,
                     query,
                     "frobenius_schur_indicator",
                     qfield="Indicator",
                     allowed=[1, 0, -1],
                     process=int)
    parse_container(info,
                    query,
                    'container',
                    qfield='Container',
                    name="Smallest permutation representation")
    parse_galgrp(info, query, "group", name="Group", qfield=("Galn", "Galt"))
    parse_ints(info, query, 'dimension', qfield='Dim')
    parse_ints(info, query, 'conductor', qfield='Conductor')
    parse_bool(info, query, 'Is_Even')
Ejemplo n.º 4
0
def abelian_variety_search(info, query):
    parse_ints(info,query,'q',name='base field')
    parse_ints(info,query,'g',name='dimension')
    parse_bool(info,query,'simple',qfield='is_simp')
    parse_bool(info,query,'primitive',qfield='is_prim')
    parse_bool_unknown(info, query, 'jacobian', qfield='is_jac')
    parse_bool_unknown(info, query, 'polarizable', qfield='is_pp')
    parse_ints(info,query,'p_rank')
    parse_ints(info,query,'ang_rank')
    parse_newton_polygon(info,query,'newton_polygon',qfield='slps')
    parse_string_start(info,query,'initial_coefficients',qfield='poly_str',initial_segment=["1"])
    parse_string_start(info,query,'abvar_point_count',qfield='A_cnts_str')
    parse_string_start(info,query,'curve_point_count',qfield='C_cnts_str',first_field='pt_cnt')
    if info.get('simple_quantifier') == 'contained':
        parse_subset(info,query,'simple_factors',qfield='simple_distinct',mode='subsets')
    elif info.get('simple_quantifier') == 'exactly':
        parse_subset(info,query,'simple_factors',qfield='simple_distinct',mode='exact')
    elif info.get('simple_quantifier') == 'include':
        parse_submultiset(info,query,'simple_factors',mode='append')
    for n in range(1,6):
        parse_ints(info,query,'dim%s_factors'%n)
    for n in range(1,4):
        parse_ints(info,query,'dim%s_distinct'%n)
    parse_nf_string(info,query,'number_field',qfield='nf')
    parse_galgrp(info,query,qfield=('galois_n','galois_t'))
Ejemplo n.º 5
0
def number_field_search(info, query):
    parse_ints(info,query,'degree')
    parse_galgrp(info,query, qfield=('degree', 'galt'))
    parse_bracketed_posints(info,query,'signature',qfield=('degree','r2'),exactlength=2,extractor=lambda L: (L[0]+2*L[1],L[1]))
    parse_signed_ints(info,query,'discriminant',qfield=('disc_sign','disc_abs'))
    parse_floats(info, query, 'rd')
    parse_ints(info,query,'class_number')
    parse_bool(info,query,'cm_field',qfield='cm')
    parse_bracketed_posints(info,query,'class_group',check_divisibility='increasing',process=int)
    parse_primes(info,query,'ur_primes',name='Unramified primes',
                 qfield='ramps',mode='complement')
    # modes are now contained (in), exactly, include
    if 'ram_quantifier' in info and str(info['ram_quantifier']) == 'include':
        mode='append'
    elif 'ram_quantifier' in info and str(info['ram_quantifier']) == 'contained':
        mode='subsets'
    else:
        mode='exact'
    parse_primes(info,query,'ram_primes',name='Ramified primes',
                 qfield='ramps',mode=mode,radical='disc_rad')
    ## This seems not to be used
    #if 'lucky' in info:
    #    label = db.nf_fields.lucky(query, 0)
    #    if label:
    #        return redirect(url_for(".by_label", label=clean_input(label)))
    info['wnf'] = WebNumberField.from_data
    info['gg_display'] = group_pretty_and_nTj
Ejemplo n.º 6
0
Archivo: main.py Proyecto: LMFDB/lmfdb
def local_field_search(info,query):
    parse_galgrp(info,query,'gal',qfield=('n','galT'))
    parse_ints(info,query,'p',name='Prime p')
    parse_ints(info,query,'n',name='Degree')
    parse_ints(info,query,'c',name='Discriminant exponent c')
    parse_ints(info,query,'e',name='Ramification index e')
    parse_rats(info,query,'topslope',qfield='top_slope',name='Top slope', process=ratproc)
    info['group_display'] = group_pretty_and_nTj
    info['display_poly'] = format_coeffs
    info['slopedisp'] = show_slope_content
Ejemplo n.º 7
0
def local_field_search(info,query):
    parse_ints(info,query,'p',name='Prime p')
    parse_ints(info,query,'n',name='Degree')
    parse_galgrp(info,query,'gal',qfield=('galois_label','n'))
    parse_ints(info,query,'c',name='Discriminant exponent c')
    parse_ints(info,query,'e',name='Ramification index e')
    parse_rats(info,query,'topslope',qfield='top_slope',name='Top slope', process=ratproc)
    info['group_display'] = group_pretty_and_nTj
    info['display_poly'] = format_coeffs
    info['slopedisp'] = show_slope_content
    info['search_array'] = LFSearchArray()
Ejemplo n.º 8
0
def number_field_search(info, query):
    parse_ints(info, query, 'degree')
    parse_galgrp(info, query, qfield=('galois_label', 'degree'))
    parse_bracketed_posints(info,
                            query,
                            'signature',
                            qfield=('degree', 'r2'),
                            exactlength=2,
                            allow0=True,
                            extractor=lambda L: (L[0] + 2 * L[1], L[1]))
    parse_signed_ints(info,
                      query,
                      'discriminant',
                      qfield=('disc_sign', 'disc_abs'))
    parse_floats(info, query, 'rd')
    parse_floats(info, query, 'regulator')
    parse_ints(info, query, 'class_number')
    parse_ints(info, query, 'num_ram')
    parse_bool(info, query, 'cm_field', qfield='cm')
    parse_bool(info, query, 'is_galois')
    parse_bracketed_posints(info,
                            query,
                            'class_group',
                            check_divisibility='increasing',
                            process=int)
    parse_primes(info,
                 query,
                 'ur_primes',
                 name='Unramified primes',
                 qfield='ramps',
                 mode='exclude')
    parse_primes(info,
                 query,
                 'ram_primes',
                 name='Ramified primes',
                 qfield='ramps',
                 mode=info.get('ram_quantifier'),
                 radical='disc_rad')
    parse_subfield(info,
                   query,
                   'subfield',
                   qfield='subfields',
                   name='Intermediate field')
    parse_padicfields(info,
                      query,
                      'completions',
                      qfield='local_algs',
                      name='$p$-adic completions')
    info['wnf'] = WebNumberField.from_data
    info['gg_display'] = group_pretty_and_nTj
Ejemplo n.º 9
0
def artin_representation_search(info, query):
    query['Hide'] = 0
    info['sign_code'] = 0
    parse_primes(info,query,"unramified",name="Unramified primes",
                 qfield="BadPrimes",mode="complement")
    parse_primes(info,query,"ramified",name="Ramified primes",
                 qfield="BadPrimes",mode="append")
    parse_element_of(info,query,"root_number",qfield="GalConjSigns")
    parse_restricted(info,query,"frobenius_schur_indicator",qfield="Indicator",
                     allowed=[1,0,-1],process=int)
    parse_container(info,query, 'container',qfield='Container', name="Smallest permutation representation")
    parse_galgrp(info,query,"group",name="Group",qfield=("Galn","Galt"))
    parse_ints(info,query,'dimension',qfield='Dim')
    parse_ints(info,query,'conductor',qfield='Conductor')
Ejemplo n.º 10
0
def artin_representation_search(info, query):
    query['Hide'] = 0
    info['sign_code'] = 0
    parse_primes(info,
                 query,
                 "unramified",
                 name="Unramified primes",
                 qfield="BadPrimes",
                 mode="exclude")
    parse_primes(info,
                 query,
                 "ramified",
                 name="Ramified primes",
                 qfield="BadPrimes",
                 mode=info.get("ram_quantifier"))
    parse_restricted(info,
                     query,
                     "root_number",
                     qfield="GalConjSigns",
                     allowed=[-1, 1],
                     process=lambda x: {"$contains": [int(x)]})
    parse_restricted(info,
                     query,
                     "frobenius_schur_indicator",
                     qfield="Indicator",
                     allowed=[1, 0, -1],
                     process=int)
    parse_container(info,
                    query,
                    'container',
                    qfield='Container',
                    name="Smallest permutation representation")
    parse_galgrp(info,
                 query,
                 "group",
                 name="Group",
                 qfield=("GaloisLabel", None))
    parse_ints(info, query, 'dimension', qfield='Dim')
    parse_ints(info, query, 'conductor', qfield='Conductor')
    parse_ints(info, query, 'num_ram', qfield='NumBadPrimes')
    parse_projective_group(info, query, 'projective_image', qfield='Proj_GAP')
    parse_projective_type(info,
                          query,
                          'projective_image_type',
                          qfield='Proj_GAP')
    # Backward support for old URLs
    if 'Is_Even' in info:
        info['parity'] = info.pop('Is_Even')
    parse_bool(info, query, 'parity', qfield='Is_Even')
Ejemplo n.º 11
0
def local_field_search(info, query):
    parse_ints(info, query, 'p', name='Prime p')
    parse_ints(info, query, 'n', name='Degree')
    parse_ints(info, query, 'u', name='Unramified degree')
    parse_ints(info, query, 't', name='Tame degree')
    parse_galgrp(info, query, 'gal', qfield=('galois_label', 'n'))
    parse_ints(info, query, 'c', name='Discriminant exponent c')
    parse_ints(info, query, 'e', name='Ramification index e')
    parse_rats(info,
               query,
               'topslope',
               qfield='top_slope',
               name='Top slope',
               process=ratproc)
    parse_inertia(info, query, qfield=('inertia_gap', 'inertia'))
    parse_inertia(info,
                  query,
                  qfield=('wild_gap', 'wild_gap'),
                  field='wild_gap')
    info['search_array'] = LFSearchArray()
Ejemplo n.º 12
0
Archivo: main.py Proyecto: cscmnu/lmfdb
def galois_group_search(info, query):
    def includes_composite(s):
        s = s.replace(' ', '').replace('..', '-')
        for interval in s.split(','):
            if '-' in interval[1:]:
                ix = interval.index('-', 1)
                a, b = int(interval[:ix]), int(interval[ix + 1:])
                if b == a:
                    if a != 1 and not a.is_prime():
                        return True
                if b > a and b > 3:
                    return True
            else:
                a = ZZ(interval)
                if a != 1 and not a.is_prime():
                    return True

    if info.get('jump', '').strip():
        jump_list = [
            "1T1", "2T1", "3T1", "4T1", "4T2", "5T1", "6T1", "7T1", "8T1",
            "8T2", "8T3", "8T5", "9T1", "9T2", "10T1", "11T1", "12T1", "12T2",
            "12T5", "13T1", "14T1", "15T1", "16T1", "16T2", "16T3", "16T4",
            "16T5", "16T7", "16T8", "16T14", "17T1", "18T1", "18T2", "19T1",
            "20T1", "20T2", "20T3", "21T1", "22T1", "23T1", "24T1", "24T2",
            "24T3", "24T4", "24T5", "24T6", "24T8", "25T1", "25T2", "26T1",
            "27T1", "27T2", "27T4", "28T1", "28T2", "28T3", "29T1", "30T1",
            "31T1", "32T32", "32T33", "32T34", "32T35", "32T36", "32T37",
            "32T38", "32T39", "32T40", "32T41", "32T42", "32T43", "32T44",
            "32T45", "32T46", "32T47", "32T48", "32T49", "32T50", "32T51",
            "33T1", "34T1", "35T1", "36T1", "36T2", "36T3", "36T4", "36T7",
            "36T9", "37T1", "38T1", "39T1", "40T1", "40T2", "40T3", "40T4",
            "40T5", "40T7", "40T8", "40T13", "41T1", "42T1", "43T1", "44T1",
            "44T2", "44T3", "45T1", "45T2", "46T1", "47T1"
        ]
        strip_label = info.get('jump', '').strip().upper()
        # If the user entered a simple label
        if re.match(r'^\d+T\d+$', strip_label):
            return redirect(url_for('.by_label', label=strip_label), 301)
        try:
            parse_galgrp(
                info,
                query,
                qfield=['label', 'n'],
                name='a Galois group label',
                field='jump',
                list_ok=False,
                err_msg=
                "It needs to be a transitive group in nTj notation, such as 5T1, a GAP id, such as [4,1], or a <a title = 'Galois group labels' knowl='nf.galois_group.name'>group label</a>"
            )
        except ValueError:
            return redirect(url_for('.index'))

        if query.get('label', '') in jump_list:
            return redirect(url_for('.by_label', label=query['label']), 301)

        else:  # convert this to a regular search
            info['gal'] = info['jump']
    parse_ints(info, query, 'n', 'degree')
    parse_ints(info, query, 't')
    parse_ints(info, query, 'order')
    parse_ints(info, query, 'arith_equiv')
    parse_ints(info, query, 'nilpotency')
    parse_galgrp(info,
                 query,
                 qfield=['label', 'n'],
                 name='Galois group',
                 field='gal')
    for param in ('cyc', 'solv', 'prim'):
        parse_bool(info, query, param, process=int, blank=['0', 'Any'])
    if info.get("parity") == "even":
        query["parity"] = 1
    elif info.get("parity") == "odd":
        query["parity"] = -1
    #parse_restricted(info,query,'parity',allowed=[1,-1],process=int,blank=['0','Any'])
    if 'order' in query and 'n' not in query:
        query['__sort__'] = ['order', 'gapid', 'n', 't']

    degree_str = prep_ranges(info.get('n'))
    info['show_subs'] = degree_str is None or (LIST_RE.match(degree_str) and
                                               includes_composite(degree_str))
    info['group_display'] = group_display_short
    info['yesno'] = yesno
    info['wgg'] = WebGaloisGroup.from_data