Skip to content
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

Two versions of QQ(sqrt{-1}) upon startup #15298

Closed
nbruin opened this issue Oct 16, 2013 · 15 comments
Closed

Two versions of QQ(sqrt{-1}) upon startup #15298

nbruin opened this issue Oct 16, 2013 · 15 comments

Comments

@nbruin
Copy link
Contributor

nbruin commented Oct 16, 2013

We have two copies upon startup:

sage: import gc
sage: Ks=[K for K in gc.get_objects() if
....: isinstance(K,sage.rings.number_field.number_field.NumberField_quadratic)]
sage: [latex(k.0) for k in Ks]
[i, \sqrt{-1}]

I suspect they are coming from
symbolic/pynac.pyx:2046 (in init_pynac_I)

    K = QuadraticField(-1, 'I', embedding=CC.gen(), latex_name='i')

and from rings/qqbar.py:7699 (in _init_qqbar)

    QQbar_I_nf = QuadraticField(-1, 'I', embedding=CC.gen())

Should we perhaps both give them the same latex name so that these can be the same field?

Component: interfaces

Author: Frédéric Chapoton

Branch/Commit: 5aa64be

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/15298

@nbruin nbruin added this to the sage-6.1 milestone Oct 16, 2013
@nbruin
Copy link
Contributor Author

nbruin commented Oct 17, 2013

comment:1

A preliminary test shows that changing rings/qqbar.py:7699 to

QQbar_I_nf = QuadraticField(-1, 'I', embedding=CC.gen(), latex_name='i')

works fine and ensures that there's only one field created upon startup.
Note that:

sage: latex(QQbar.0)
\text{\texttt{1*I}}

so it looks like the latex printing will not be affected by this change either.

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst rwst modified the milestones: sage-6.4, sage-8.1 Sep 11, 2017
@fchapoton
Copy link
Contributor

comment:6

done


New commits:

8aee254trac 15298 only one field for I

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Branch: u/chapoton/15298

@fchapoton
Copy link
Contributor

Commit: 8aee254

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

cf4d4f8trac 15298 only one field for I

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

Changed commit from 8aee254 to cf4d4f8

@rwst
Copy link

rwst commented Sep 11, 2017

comment:8

Doctest fails in qqbar.py which are logical. You can set to positive after adaptation.

@rwst
Copy link

rwst commented Sep 11, 2017

Reviewer: Ralf Stephan

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

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

5aa64betrac 15928 fixing doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 11, 2017

Changed commit from cf4d4f8 to 5aa64be

@fchapoton
Copy link
Contributor

comment:10

Thanks. This introduces a non-uniform behaviour for the latex of QQbar elements. Sometimes "i" will still be displayed as sqrt{-1}. I propose to keep that issue for another ticket. Objection ?

@rwst
Copy link

rwst commented Sep 11, 2017

comment:11

Replying to @fchapoton:

Objection ?

None. Please go ahead.

@fchapoton
Copy link
Contributor

comment:12

then let it be positive

@vbraun
Copy link
Member

vbraun commented Sep 24, 2017

Changed branch from u/chapoton/15298 to 5aa64be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants