Attachment 'ram.sage'
Download 1 # Compute the ramified primes in a quadratic number field
2 def RamifiedPrimes(K):
3 """
4 Compute the list of (finite) ramified primes of K.
5
6 Verify that K is a quadratic field.
7 Compute discriminant
8 Return a list of prime factors of discriminant.
9 """
10 import sage.rings.number_field.number_field as NF
11 if not isinstance(K,NF.NumberField_quadratic):
12 return -1
13 D = K.discriminant()
14 FL = D.factor()
15 PL = [FL[i][0] for i in xrange(len(FL))]
16 return PL
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.