# Fwd: [sage-devel] Possible bug in NumberField's valuation()

29 views

### Dima Pasechnik

Jan 8, 2020, 4:38:40 AM1/8/20
to sage-nt
---------- Forwarded message ---------
From: 'Benjamin Matschke' via sage-devel <sage-...@googlegroups.com>
Date: Wed, Jan 8, 2020 at 9:12 AM
Subject: [sage-devel] Possible bug in NumberField's valuation()

Dear all,

The following code raises an unexpected AssertionError:

R.<x> = QQ[]
K.<theta_K> = NumberField(x^6 - 18*x^4 - 24*x^3 + 27*x^2 + 36*x - 6)
fp = K.fractional_ideal((2, -7/44*theta_K^5 + 19/44*theta_K^4 +
87/44*theta_K^3 - 87/44*theta_K^2 - 5/2*theta_K + 39/22))
print(fp.norm()) # yields 2
print(fp in K.primes_above(2)) # yields True
v = K.valuation(fp) # raises AssertionError

... coming from the following assert():

--> 303 assert(len(candidates_for_I) > 0) # This should not be
possible, unless I contains a unit

Am I missing something? This was run on Sage 9.0, Linux Mint 19.2, 64 bit.

Thanks,
Benjamin

--
Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit

### John Cremona

Jan 8, 2020, 7:29:08 AM1/8/20
to sage-nt
The p-adic valuation code is fairly new, and this needs to be looked at by someone who knows it.

If you set P1,P2,P3 = K.primes_above(2) then K.valuation(P1) and K.valuation(P2) are OK while K.valuation(P3) gives this error.  All the primes have norm 2 and are ramified with ramification index 2.

John

You received this message because you are subscribed to the Google Groups "sage-nt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-nt+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-nt/CAAWYfq0Li_OPU%2Bw97AgAsRniZAk0geS-cn%3DBCYGX1i6s0vud0w%40mail.gmail.com.

### Alex J Best

Jan 8, 2020, 9:03:41 AM1/8/20
to sage-nt
I don't know the code well, for that we need Julian Rüth I guess, but I think that changing the line of create_key_and_extra_args_for_number_field_from_ideal in padic_valuation.py from

candidates = vK.mac_lane_approximants(G, require_incomparability=True)

to

candidates = vK.mac_lane_approximants(G, require_incomparability=True, required_precision=2)

causes this example to work.