You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A conjugate, with re, im and arg, as functions #2145
Chapter III of Modenov's Problems in Geometry (#2131) writes every point as a complex number and every statement in z and z̄. Its lines are āz + az̄ = b, a point is on the unit circle when z̄ = 1/z, a slope is (z₂ − z₁)/(z̄₂ − z̄₁), and areas and similarity tests are determinants in z, z̄, 1. Chapter V states the distance, angle, area and collinearity in the same terms. About 150 of the book's rows need a conjugate. Today the parser refuses conjugate by name, so each was written out by hand.
conjugate(z), with conj as an alias, rendered \overline{z}. It is an involution, distributes over +, *, / and integer powers but not across ^(1/2), sends i to -i and fixes real numbers.
re(z), im(z) and arg(z).
The rules above need no assumptions. What makes the book's method work is rewriting conj(a) as 1/a for a point on the unit circle, and as a for a real symbol. That needs facts attached to a symbol, which is a 3.0 sub-issue of #2131.
Until this lands, #2136 refuses these names, which today are read as products.
conjugate(z) (also conj) and arg(z) are functions since #2181. The conjugate is carried through the arithmetic and whole powers, not through roots or logarithms, and fixes what is known to be real. arg is the principal argument in (-pi, pi], exact on numbers, with no value at 0.
Still open here: re(z) and im(z). Making them functions changes how re(x) reads for a variable named re, which MissingFunctionNamesRefusedTest.TheTwoLetterNamesAreLeftAsProducts keeps as a product today. That is the next PR, with a breaking entry. Rewriting conj(a) as 1/a on the unit circle needs facts on a symbol, which is #2148.
SymPy is the outlier, and the register in #2182 had followed it. So the next PR prints Re(z) and Im(z) and draws them upright, \operatorname{Re}\left(z\right), as ISO writes them, rather than with the fraktur \Re. It also accepts re, im, real and imag on input, since a SymPy or MATLAB user types those. ToSympy still emits sympy.re. The register's rows are updated.
arg stays lower case. ISO writes arg z for the argument, SymPy's arg is also the principal value, and Mathematica's Arg is the one capitalised.
Done: conjugate/conj and arg in #2181, Re and Im (also re, im, real, imag) in #2185. Rewriting conj(a) as 1/a on the unit circle needs facts on a symbol, which is #2148.
Activity
A codomain does not decide the argument
The complex conjugate and the principal argument are functions (#2181)
Rafael-SOWNet commentedon Oct 28, 2026
conjugate(z)(alsoconj) andarg(z)are functions since #2181. The conjugate is carried through the arithmetic and whole powers, not through roots or logarithms, and fixes what is known to be real.argis the principal argument in(-pi, pi], exact on numbers, with no value at0.Still open here:
re(z)andim(z). Making them functions changes howre(x)reads for a variable namedre, whichMissingFunctionNamesRefusedTest.TheTwoLetterNamesAreLeftAsProductskeeps as a product today. That is the next PR, with a breaking entry. Rewritingconj(a)as1/aon the unit circle needs facts on a symbol, which is #2148.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Happypig375 commentedon Oct 28, 2026
I feel that the R in
Reis capitalized, same forIm. Consult different sources for how this is written...Though it's also arguable that functions should be consistently lowercase. Do mathematicians upload this though?
Rafael-SOWNet commentedon Oct 28, 2026
You're right. The sources I checked:
Re zIm zRe[z]Im[z]Re(z)Im(z)re(z)im(z)real(z)imag(z)SymPy is the outlier, and the register in #2182 had followed it. So the next PR prints
Re(z)andIm(z)and draws them upright,\operatorname{Re}\left(z\right), as ISO writes them, rather than with the fraktur\Re. It also acceptsre,im,realandimagon input, since a SymPy or MATLAB user types those.ToSympystill emitssympy.re. The register's rows are updated.argstays lower case. ISO writesarg zfor the argument, SymPy'sargis also the principal value, and Mathematica'sArgis the one capitalised.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
The real and the imaginary part are functions, Re and Im (#2185)
Rafael-SOWNet commentedon Oct 28, 2026
Done:
conjugate/conjandargin #2181,ReandIm(alsore,im,real,imag) in #2185. Rewritingconj(a)as1/aon the unit circle needs facts on a symbol, which is #2148.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura