def isogeny_primes(coeffs, **kwargs):
    del kwargs["label"]
    f = R(coeffs)
    K = QQ.extension(f, "a")
    kwargs = {**LMFDB_DEFAULTS, **kwargs}
    primes, _ = get_isogeny_primes(K, **kwargs)
    return sorted(EC_Q_ISOGENY_PRIMES) + sorted(primes.difference(EC_Q_ISOGENY_PRIMES))
    def several_d(self):
        """Table 1 from the introduction"""

        output_str = r"${d}$ & ${Delta_K}$ & {lmfdb_link_latex} & {possible_isogeny_primes} & ${time_s:.2f}$\\"
        latex_output = []
        for d in range(2, self.range + 1):
            Delta_K, _, K, Klabel = get_smallest_good_number_field(d)
            t_start = perf_counter()
            candidates, _ = get_isogeny_primes(K, ice_filter=True, appendix_bound=200)
            t_end = perf_counter()
            time_taken = t_end - t_start
            candidates = [c for c in candidates if c not in EC_Q_ISOGENY_PRIMES]
            candidates.sort()
            possible_isogeny_primes = ", ".join(map(str, candidates))
            lmfdb_link = LMFDB_NF_URL_TRUNK.format(Klabel)
            lmfdb_link_latex = r"\href{{{the_link}}}{{{my_text}}}".format(
                the_link=lmfdb_link, my_text=Klabel
            )
            output_here = output_str.format(
                d=d,
                Delta_K=Delta_K,
                lmfdb_link_latex=lmfdb_link_latex,
                possible_isogeny_primes=possible_isogeny_primes,
                time_s=time_taken,
            )
            print(output_here)
            latex_output.append(output_here)
Beispiel #3
0
def test_interval(D):
    K = QuadraticField(D)
    if not K.discriminant() in CLASS_NUMBER_ONE_DISCS:
        superset, _ = get_isogeny_primes(K, **TEST_SETTINGS)
        # test that there are not too many primes left over
        todo = set(superset).difference(EC_Q_ISOGENY_PRIMES)
        assert len(todo) == 0 or max(todo) <= 109
        assert len(todo) <= 2 or max(todo) <= 31
Beispiel #4
0
def test_rational_isogeny_primes():
    x = polygen(QQ)
    K = QQ.extension(x - 1, "D")

    superset, _ = get_isogeny_primes(K, **TEST_SETTINGS)
    improperly_ruled_out = EC_Q_ISOGENY_PRIMES.difference(superset)
    assert improperly_ruled_out == set()
    todo = set(superset).difference(EC_Q_ISOGENY_PRIMES)
    # would be nice if we could automatically do QQ
    # i.e. we could rule out 23 as well.
    assert todo == set([23])
Beispiel #5
0
def test_galois(f, extra_isogenies, potenial_isogenies):
    K = NumberField(f, "a")

    superset, _ = get_isogeny_primes(K, **TEST_SETTINGS)
    assert set(EC_Q_ISOGENY_PRIMES).difference(superset) == set()
    assert (
        extra_isogenies.difference(superset) == set()
    ), "Known isogenies are filtered out!"
    upperbound = potenial_isogenies.union(EC_Q_ISOGENY_PRIMES).union(extra_isogenies)
    unlisted_potential_isogenies = superset.difference(upperbound)
    assert unlisted_potential_isogenies == set(), "We got worse at filtering"
    assert set(upperbound.difference(superset)) == set(), "We got better at filtering"
Beispiel #6
0
def test_from_literature(D, extra_isogeny, appendix_bound, potenial_isogenies):
    K = QuadraticField(D)
    upperbound = potenial_isogenies.union(EC_Q_ISOGENY_PRIMES).union(
        {extra_isogeny})
    superset, _ = get_isogeny_primes(K,
                                     appendix_bound=appendix_bound,
                                     **TEST_SETTINGS)
    assert set(EC_Q_ISOGENY_PRIMES).difference(superset) == set()
    assert extra_isogeny in superset
    assert set(
        superset.difference(upperbound)) == set(), "We got worse at filtering"
    assert set(
        upperbound.difference(superset)) == set(), "We got better at filtering"
Beispiel #7
0
def main():
    for D in square_free_D:
        K = QuadraticField(D)
        if not K.discriminant() in CLASS_NUMBER_ONE_DISCS:
            superset, _ = get_isogeny_primes(
                K,
                bound=1000,
                ice_filter=True,
                appendix_bound=1000,
                norm_bound=50,
                auto_stop_strategy=True,
                repeat_bound=4,
            )
            possible_new_isog_primes = superset - EC_Q_ISOGENY_PRIMES
            possible_new_isog_primes_list = list(possible_new_isog_primes)
            possible_new_isog_primes_list.sort()
            if possible_new_isog_primes_list:
                print(f"D = {D} possible isogenies = {possible_new_isog_primes_list}")
def test_cm_type_2(f, extra_isogenies, potenial_isogenies):
    K = NumberField(f, "a")

    superset, _ = get_isogeny_primes(K, **TEST_SETTINGS)
    assert set(EC_Q_ISOGENY_PRIMES).difference(superset) == set()
    # for p in extra_isogenies:
    #     assert satisfies_condition_CC(K, p), "Not of type 2"
    pnip = sorted(superset.difference(set(EC_Q_ISOGENY_PRIMES)))
    print("f = {}  disc = {} pnip = {}".format(f, K.discriminant(), pnip))
    assert (extra_isogenies.difference(superset) == set()
            ), "Known CM isogenies are filtered out!"
    upperbound = potenial_isogenies.union(EC_Q_ISOGENY_PRIMES).union(
        extra_isogenies)
    upperbound = upperbound.union(bad_cubic_formal_immersion_primes)
    unlisted_potential_isogenies = superset.difference(upperbound)
    assert len(unlisted_potential_isogenies) <= 2, "We got worse at filtering"
    if unlisted_potential_isogenies:
        assert max(
            unlisted_potential_isogenies) <= 109, "We got worse at filtering"
def main(is_galois, class_number):
    the_url = URL_TRUNK.format(str(is_galois).lower(), str(class_number))
    payload = requests.get(url=the_url).json()["data"]
    for dat in payload[:10]:
        poly = R(dat["coeffs"])
        label = dat["label"]
        print(label)

        K = NumberField(poly, name="a")
        superset, _ = get_isogeny_primes(
            K,
            bound=1000,
            ice_filter=True,
            appendix_bound=1000,
            norm_bound=50,
            auto_stop_strategy=True,
            repeat_bound=4,
        )
        possible_new_isog_primes = superset - EC_Q_ISOGENY_PRIMES
        possible_new_isog_primes_list = list(possible_new_isog_primes)
        possible_new_isog_primes_list.sort()
        msg = "poly = {} ; label = {} ; possible isogenies = {}"
        print(msg.format(poly, label, possible_new_isog_primes_list))
Beispiel #10
0
def test_get_isogeny_primes(coeffs):
    f = R(coeffs)
    K = QQ.extension(f, "a")
    _, _ = get_isogeny_primes(K, **TEST_SETTINGS)