Skip to content

Improve construction of narrow class groups #40395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add narrow_class_group
  • Loading branch information
Eloitor committed Jul 10, 2025
commit 13cd6bde26b774d0b732780fae98b8322897a101
21 changes: 17 additions & 4 deletions src/sage/rings/number_field/number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6706,7 +6706,7 @@ def _positive_integral_elements_with_trace(self, C):
return S

@cached_method
def narrow_class_group(self, proof=None):
def narrow_class_group(self, proof=None, names='c'):
r"""
Return the narrow class group of this field.

Expand All @@ -6726,12 +6726,25 @@ def narrow_class_group(self, proof=None):
sage: QuadraticField(3, 'a').narrow_class_group()
Multiplicative Abelian group isomorphic to C2
"""
from sage.groups.abelian_gps.abelian_group import AbelianGroup
from .class_group import NarrowClassGroup

proof = proof_flag(proof)
try:
return self.__narrow_class_group[proof, names]
except KeyError:
pass
except AttributeError:
self.__narrow_class_group = {}
k = self.pari_bnf(proof)
s = k.bnfnarrow().sage()
return AbelianGroup(s[1])
s = k.bnfnarrow()
cycle_structure = tuple(s[1].sage())

# Gens is a list of ideals (the generators)
gens = tuple(self.ideal(hnf) for hnf in s[2])

G = NarrowClassGroup(cycle_structure, names, self, gens, proof=proof)
self.__narrow_class_group[proof, names] = G
return G

def ngens(self):
"""
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy