Zulip Chat Archive

Stream: Is there code for X?

Topic: complex conjugation


Kevin Buzzard (Nov 19 2025 at 17:07):

I assume we have complex conjugation as an R\R-algebra map on C\mathbb{C}? I don't know how to search for this; #loogle ℂ →ₐ[ℝ] ℂ gives no results (am I using it correctly?) and by exact? gives me the identity map. I actually want a more abstract complex conjugation but I can get it from the one on the complexes.

import Mathlib

-- is this missing?
instance : IsAlgClosure   where
  isAlgClosed := Complex.isAlgClosed
  isAlgebraic := Algebra.IsAlgebraic.of_finite  

-- is this something to do with `star`?
example :  →ₐ[]  := sorry

#loogle  →ₐ[] 

-- Not hard to make this if we have the above.
def Complex.complex_conjugation : Gal( / ) := sorry

open Field

-- what I actually want
noncomputable def Real.absoluteGaloisGroup_complex_conjugation :
    absoluteGaloisGroup  :=
  (IsAlgClosure.equiv   (AlgebraicClosure )).autCongr Complex.complex_conjugation

-- I also want that it has order 2, but let's get a definition first :-)

Riccardo Brasca (Nov 19 2025 at 17:19):

Complex.conjAe

Riccardo Brasca (Nov 19 2025 at 17:20):

This is why I wanted a CM-field instance (that doesn't hold unfortunately) on .

Riccardo Brasca (Nov 19 2025 at 17:23):

Anyway, the point is that is a StarSomething

Riccardo Brasca (Nov 19 2025 at 17:29):

Note that we have a good API for "complex conjugations" as in NumberField.ComplexEmbedding.IsConj

Kevin Buzzard (Nov 19 2025 at 17:59):

Annoyingly #loogle ℂ ≃ₐ[ℝ] ℂ doesn't find docs#Complex.conjAe either :-( (and neither does #loogle Gal(ℂ/ℝ)).

Ha ha example : Gal(ℂ/ℝ) := by exact? finds it :-)

Thanks anyway! Yeah we have IsComplexConjugate but sometimes it's useful to have complexConjugate as well (in some stupid generality).

Jireh Loreaux (Nov 19 2025 at 18:08):

@loogle ⊢ ?k ≃ₐ[ℝ] ?k

loogle (Nov 19 2025 at 18:08):

:search: RCLike.conjAe, Complex.conjAe

Jireh Loreaux (Nov 19 2025 at 18:08):

I can't explain why instantiating with ?k with fails.

Eric Wieser (Nov 19 2025 at 18:18):

It looks like it's doing a syntactic match on the found instance

Jireh Loreaux (Nov 19 2025 at 18:19):

ouch, that seems like a big paper cut.

Eric Wieser (Nov 19 2025 at 18:20):

@loogle @AlgEquiv ℝ ℂ ℂ

loogle (Nov 19 2025 at 18:20):

:search: Complex.conjAe, Complex.conjAe_coe, and 2 more

Kevin Buzzard (Nov 19 2025 at 18:34):

Remark: Loogle discovering RCLike.conjAe makes me want to comment that this is a situation where we could have the more general IsROrC.conjAe where we don't choose a square root of -1. I used to bang on about this a lot but I've since realised that actually I don't want IsROrC for Langlands, I want IsC, and we have this now: it's IsAlgClosure \R K (which ironically we don't seem to have for C\mathbb{C} ;-) )

Eric Wieser (Nov 19 2025 at 18:36):

I think your proposed IsROrC for Real probably ought to choose a square root of -1 (as 0 to match Real.sqrt)

Kenny Lau (Nov 19 2025 at 18:39):

we only have 33 lemmas on IsAlgClosure, but we have the components already:

import Mathlib

instance : IsAlgClosure   := .mk inferInstance inferInstance

#min_imports

(and I suppose in practice it's the components that you want to use)

Kevin Buzzard (Nov 19 2025 at 18:42):

Well, I wanted to use IsAlgClosure.equiv (as you can see) which needed the instance.

Kevin Buzzard (Nov 19 2025 at 18:44):

Eric Wieser said:

I think your proposed IsROrC for Real probably ought to choose a square root of -1 (as 0 to match Real.sqrt)

The point about IsROrC is that it is a Prop (we used to have one which wasn't a Prop, which drove me nuts, but now it's RCLike). But I since realised that I only want it for R\R-algebras and actually I know exactly when they're R\R and when they're isomorphic to C\mathbb{C} which is why IsAlgClosure is perfect (I really just want IsR and IsC so that they can be applied to completions of number fields).


Last updated: Dec 20 2025 at 21:32 UTC