Opened 10 years ago

Last modified 5 years ago

#8252 needs_work defect

names parameter in optimized_representation is tweaked,

Reported by: syazdani Owned by: davidloeffler
Priority: minor Milestone: sage-6.4
Component: number fields Keywords: number fields
Cc: Merged in:
Authors: Alex Ghitza Reviewers:
Report Upstream: N/A Work issues:
Branch: u/AlexGhitza/ticket/8252 (Commits) Commit: e7db903ad58aecb2224f5eb9608ce08f12b8c703
Dependencies: Stopgaps:


Here is a bit of annoyance:

sage: K.<a>=NumberField(x^2+1)
sage: L.<b>=K.extension(x^2+5)
sage: Labs.<tau> = L.absolute_field()
sage: Lnice = Labs.optimized_representation(names='t')
sage: Lnice[0]
Number Field in t3 with defining polynomial x^4 + 3*x^2 + 1

While the more reasonable output should be

Number Field in t with defining polynomial x^4 + 3*x^2 + 1

I've looked at the code, and the problem is that the helper function that finds the optimized number field calculates all sorts of other fields, and needs to make sure the names don't conflict with each other, so the output makes sense in that front. However, the output is still unexpected for the user.

There is an obvious hack that can solve this problem (edit Lnice._names before returning from optimized_representation), but I'm not sure if that's the best approach (side effects scare me).

Change History (5)

comment:1 Changed 6 years ago by AlexGhitza

  • Branch set to u/AlexGhitza/ticket/8252

comment:2 Changed 6 years ago by AlexGhitza

  • Authors set to Alex Ghitza
  • Commit set to e7db903ad58aecb2224f5eb9608ce08f12b8c703
  • Milestone set to sage-6.2
  • Status changed from new to needs_review

New commits:

e7db903fix variable name in optimized_representation

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 6 years ago by rws

  • Status changed from needs_review to needs_work
sage -t --long src/sage/schemes/elliptic_curves/  # 2 doctests failed

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.