id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
18036,I.parent() should not be the symbolic ring,vdelecroix,,"As suggested in #7545, this ticket defines the imaginary unit `I` directly as the generator of `QuadraticField(-1)` instead of wrapping it in a symbolic expression.
**Why?** To allow it to be used in combination with elements of QQbar, CC, etc., without coercion forcing the expression to SR. For example, `1.0 + I` is now an element of CC instead of SR.
**How?** We set `I` in sage.all to the generator of ℚ[i], and deprecate importing it from `sage.symbolic.I`. The symbolic `I` remains available from `sage.symbolic.constants` for library code working with symbolic expressions, and as `SR(I)` or `SR.I()`. We create a dedicated subclass of quadratic number field elements to make it possible to support features similar to those of symbolic expressions of the form `a + I*b` that would not make sense for number field elements (or be too hard to implement, or pollute the namespace).
**Why not ℤ[i]?** Because the class hierarchy of number field and order elements makes it difficult to provide the compatibility features mentioned above for elements of both ℤ[i] and ℚ[i]. Having `I` be an element of ℚ[i] covers almost all use cases (all except working with algebraic integers?), and people who work with orders are sophisticated enough to explicitly ask for I ∈ ℤ[i] when they need that. (This is a debatable choice. We could probably do without the dedicated subclass for elements of ℚ[i], at the price of breaking backward compatibility a bit more.)",defect,closed,major,sage-9.3,number fields,fixed,,wuthrich jdemeyer mmezzarobba behackl rws gh-kliem gh-mwageringel,,Marc Mezzarobba,Vincent Delecroix,N/A,,54a34a7443d373e678c5461e5205ef2cdd7470b1,54a34a7443d373e678c5461e5205ef2cdd7470b1,,