This function tests local conditions. The inputs are: a number field A, a prime p, a uniformizer u for p, and an element a of A. The output is a list of two booleans: the first is true when a is unramified, and the second is true when a is transverse.

{{{id=1| def local_conditions(A, p, u, a): F=A.residue_field(p) vp=a.valuation(p) b=F(a/u^vp) unramified=(vp%3==0) transverse=(b.nth_root(3, all=True)!=[]) return [unramified, transverse] /// }}}

One random example.

{{{id=2| A.=NumberField(x^2+1); A /// Number Field in i with defining polynomial x^2 + 1 }}} {{{id=11| p=A.ideal(3*i+8); p /// Fractional ideal (3*i + 8) }}} {{{id=25| F=A.residue_field(p); F /// Residue field of Fractional ideal (3*i + 8) }}} {{{id=13| a=A(18); a /// 18 }}} {{{id=21| u=A.uniformizer(p); u /// i + 27 }}} {{{id=10| local_conditions(A, p, u, a) /// [True, False] }}} {{{id=26| /// }}} {{{id=29| /// }}} {{{id=27| /// }}}