Opened 5 years ago

Closed 6 months ago

#19657 closed defect (duplicate)

latex names

Reported by: fwclarke Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: number fields Keywords: latex_name
Cc: tscrim, gh-kliem Merged in:
Authors: Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #30372 Stopgaps:

Status badges

Description (last modified by fwclarke)

As pointed out in http://ask.sagemath.org/question/31223, there are various problems with defining latex_name for the generators of number fields. For example

sage: K.<a> = NumberField(x^3 - 5, latex_name='alpha')
sage: latex(a), K.latex_variable_name()
(alpha, 'alpha')
sage: y = polygen(K, 'y')
sage: L.<b> = K.extension(y^3 + a - 1, latex_name='beta')
sage: latex(b), L.latex_variable_name()
(b, 'beta')
sage: M.<c> = NumberField(y^3 + a - 1, latex_name='gamma')
sage: latex(c), M.latex_variable_name()
(c, 'c')

These, and some other, inconsistencies need ironing out.

Change History (16)

comment:1 Changed 5 years ago by fwclarke

  • Component changed from PLEASE CHANGE to number fields
  • Description modified (diff)
  • Keywords latex_name added
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 5 years ago by fwclarke

  • Branch set to u/fwclarke/latex_names

comment:3 Changed 5 years ago by git

  • Commit set to 65fb4a27977c6ebb53b34eb5e34a4a79c6383e09

Branch pushed to git repo; I updated commit sha1. New commits:

65fb4a2fix NumberFieldFactory

comment:4 Changed 5 years ago by fwclarke

First we ensure that NumberFieldFactory passes latex_name on in every case. Now

sage: K.<a> = NumberField(x^3 - 5)
sage: y = polygen(K, 'y')
sage: M.<c> = NumberField(y^3 + a - 1, latex_name='gamma')
sage: latex(c), M.latex_variable_name()
(c, 'gamma')

comment:5 Changed 5 years ago by git

  • Commit changed from 65fb4a27977c6ebb53b34eb5e34a4a79c6383e09 to 807b378cb5a744195ab8b5099ac0749916524944

Branch pushed to git repo; I updated commit sha1. New commits:

807b378fix latex_name for variable fields and latex_variable_names

comment:6 Changed 5 years ago by fwclarke

Now require that the extension method passes on latex_name, that the NumberField_generic class defines the _latex_names attribute so that the latex_variable_names method works as it should, and similarly that the NumberField_relative class defines that attribute appropriately. This gives

sage: K.<a> = NumberField(x^3 - 6, latex_name='alpha')
sage: K.latex_variable_names()
['alpha']
sage: L.<b> = K.extension(x^2 - 5, latex_name='beta')
sage: L.latex_variable_names()
['beta', 'alpha']

comment:7 Changed 5 years ago by git

  • Commit changed from 807b378cb5a744195ab8b5099ac0749916524944 to 71bfd965f5f257321ddebc4e11689547818fc640

Branch pushed to git repo; I updated commit sha1. New commits:

71bfd96adjust _latex for elements of relative number fields

comment:8 Changed 5 years ago by git

  • Commit changed from 71bfd965f5f257321ddebc4e11689547818fc640 to f0abaf35de14494429aba16c60c6aea2161da875

Branch pushed to git repo; I updated commit sha1. New commits:

f0abaf3Treat latex_names in a similar manner to names

comment:9 Changed 5 years ago by git

  • Commit changed from f0abaf35de14494429aba16c60c6aea2161da875 to 794f6bb08b41622767d31c0b05ee7a74d45e1434

Branch pushed to git repo; I updated commit sha1. New commits:

794f6bbdoctests

comment:10 Changed 5 years ago by fwclarke

  • Authors set to Francis Clarke
  • Description modified (diff)
  • Priority changed from major to minor
  • Status changed from new to needs_review

comment:11 Changed 5 years ago by rws

  • Status changed from needs_review to needs_work
  • Work issues set to merge conflict

comment:12 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-6.10 to sage-9.2

See also #30372 - Replace NumberField_generic.__latex_variable_name by ._latex_names

comment:13 Changed 8 months ago by mkoeppe

  • Dependencies set to #30372
  • Work issues changed from merge conflict to merge with #30372

comment:14 Changed 8 months ago by mkoeppe

  • Cc tscrim gh-kliem added
  • Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
  • Status changed from needs_work to needs_review

I have taken some of the commits here and merged/reworked them in #30360, where I did similar work. This ticket can be closed.

comment:15 Changed 8 months ago by tscrim

  • Authors Francis Clarke deleted
  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review
  • Work issues merge with #30372 deleted

comment:16 Changed 6 months ago by slelievre

  • Branch u/fwclarke/latex_names deleted
  • Commit 794f6bb08b41622767d31c0b05ee7a74d45e1434 deleted
  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.