File: Mathlib/Analysis/CstarAlgebra/GelfandDuality.lean

full_name: Ideal.toCharacterSpace
code: /-- Every maximal ideal in a commutative complex Banach algebra gives rise to a character on that
algebra. In particular, the character, which may be identified as an algebra homomorphism due to
`WeakDual.CharacterSpace.equivAlgHom`, is given by the composition of the quotient map and
the Gelfand-Mazur isomorphism `NormedRing.algEquivComplexOfComplete`. -/
noncomputable def Ideal.toCharacterSpace : characterSpace ℂ A 
goal: ↑(WeakDual.characterSpace ℂ A)

full_name: Ideal.toCharacterSpace_apply_eq_zero_of_mem
code: theorem Ideal.toCharacterSpace_apply_eq_zero_of_mem {a : A} (ha : a ∈ I) :
    I.toCharacterSpace a = 0 
goal: I.toCharacterSpace a = 0

full_name: WeakDual.CharacterSpace.exists_apply_eq_zero
code: /-- If `a : A` is not a unit, then some character takes the value zero at `a`. This is equivalent
to `gelfandTransform ℂ A a` takes the value zero at some character. -/
theorem WeakDual.CharacterSpace.exists_apply_eq_zero {a : A} (ha : ¬IsUnit a) :
    ∃ f : characterSpace ℂ A, f a = 0 
goal: ∃ f, f a = 0

full_name: WeakDual.CharacterSpace.mem_spectrum_iff_exists
code: theorem WeakDual.CharacterSpace.mem_spectrum_iff_exists {a : A} {z : ℂ} :
    z ∈ spectrum ℂ a ↔ ∃ f : characterSpace ℂ A, f a = z 
goal: z ∈ spectrum ℂ a ↔ ∃ f, f a = z

full_name: spectrum.gelfandTransform_eq
code: /-- The Gelfand transform is spectrum-preserving. -/
theorem spectrum.gelfandTransform_eq (a : A) :
    spectrum ℂ (gelfandTransform ℂ A a) = spectrum ℂ a 
goal: spectrum ℂ ((WeakDual.gelfandTransform ℂ A) a) = spectrum ℂ a

full_name: instNonemptyElemWeakDualComplexCharacterSpaceOfNontrivial
code: instance [Nontrivial A] : Nonempty (characterSpace ℂ A) 
goal: Nonempty ↑(WeakDual.characterSpace ℂ A)

full_name: gelfandTransform_map_star
code: theorem gelfandTransform_map_star (a : A) :
    gelfandTransform ℂ A (star a) = star (gelfandTransform ℂ A a) 
goal: (WeakDual.gelfandTransform ℂ A) (star a) = star ((WeakDual.gelfandTransform ℂ A) a)

full_name: gelfandTransform_isometry
code: /-- The Gelfand transform is an isometry when the algebra is a C⋆-algebra over `ℂ`. -/
theorem gelfandTransform_isometry : Isometry (gelfandTransform ℂ A) 
goal: Isometry ⇑(WeakDual.gelfandTransform ℂ A)

full_name: gelfandTransform_bijective
code: /-- The Gelfand transform is bijective when the algebra is a C⋆-algebra over `ℂ`. -/
theorem gelfandTransform_bijective : Function.Bijective (gelfandTransform ℂ A) 
goal: Function.Bijective ⇑(WeakDual.gelfandTransform ℂ A)

full_name: gelfandStarTransform_symm_apply
code: /-- The Gelfand transform as a `StarAlgEquiv` between a commutative unital C⋆-algebra over `ℂ`
and the continuous functions on its `characterSpace`. -/
@[simps!]
noncomputable def gelfandStarTransform : A ≃⋆ₐ[ℂ] C(characterSpace ℂ A, ℂ) 
goal: ∀ (a : C(↑(WeakDual.characterSpace ℂ A), ℂ)),
  (gelfandStarTransform A).symm a =
    (↑(RingEquiv.ofBijective { toAlgHom := WeakDual.gelfandTransform ℂ A, map_star' := ⋯ } ⋯)).symm a

full_name: gelfandStarTransform
code: /-- The Gelfand transform as a `StarAlgEquiv` between a commutative unital C⋆-algebra over `ℂ`
and the continuous functions on its `characterSpace`. -/
@[simps!]
noncomputable def gelfandStarTransform : A ≃⋆ₐ[ℂ] C(characterSpace ℂ A, ℂ) 
goal: A ≃⋆ₐ[ℂ] C(↑(WeakDual.characterSpace ℂ A), ℂ)

full_name: gelfandStarTransform_apply_apply
code: /-- The Gelfand transform as a `StarAlgEquiv` between a commutative unital C⋆-algebra over `ℂ`
and the continuous functions on its `characterSpace`. -/
@[simps!]
noncomputable def gelfandStarTransform : A ≃⋆ₐ[ℂ] C(characterSpace ℂ A, ℂ) 
goal: ((gelfandStarTransform A) a) φ = φ a

full_name: WeakDual.CharacterSpace.compContinuousMap
code: /-- The functorial map taking `ψ : A →⋆ₐ[ℂ] B` to a continuous function
`characterSpace ℂ B → characterSpace ℂ A` obtained by pre-composition with `ψ`. -/
@[simps]
noncomputable def compContinuousMap (ψ : A →⋆ₐ[𝕜] B) :
    C(characterSpace 𝕜 B, characterSpace 𝕜 A) 
goal: C(↑(WeakDual.characterSpace 𝕜 B), ↑(WeakDual.characterSpace 𝕜 A))

full_name: WeakDual.CharacterSpace.compContinuousMap_apply
code: /-- The functorial map taking `ψ : A →⋆ₐ[ℂ] B` to a continuous function
`characterSpace ℂ B → characterSpace ℂ A` obtained by pre-composition with `ψ`. -/
@[simps]
noncomputable def compContinuousMap (ψ : A →⋆ₐ[𝕜] B) :
    C(characterSpace 𝕜 B, characterSpace 𝕜 A) 
goal: (WeakDual.CharacterSpace.compContinuousMap ψ) φ =
  WeakDual.CharacterSpace.equivAlgHom.symm ((WeakDual.CharacterSpace.equivAlgHom φ).comp ψ.toAlgHom)

full_name: WeakDual.CharacterSpace.compContinuousMap_id
code: /-- `WeakDual.CharacterSpace.compContinuousMap` sends the identity to the identity. -/
@[simp]
theorem compContinuousMap_id :
    compContinuousMap (StarAlgHom.id 𝕜 A) = ContinuousMap.id (characterSpace 𝕜 A) 
goal: WeakDual.CharacterSpace.compContinuousMap (StarAlgHom.id 𝕜 A) = ContinuousMap.id ↑(WeakDual.characterSpace 𝕜 A)

full_name: WeakDual.CharacterSpace.compContinuousMap_comp
code: /-- `WeakDual.CharacterSpace.compContinuousMap` is functorial. -/
@[simp]
theorem compContinuousMap_comp (ψ₂ : B →⋆ₐ[𝕜] C) (ψ₁ : A →⋆ₐ[𝕜] B) :
    compContinuousMap (ψ₂.comp ψ₁) = (compContinuousMap ψ₁).comp (compContinuousMap ψ₂) 
goal: WeakDual.CharacterSpace.compContinuousMap (ψ₂.comp ψ₁) =
  (WeakDual.CharacterSpace.compContinuousMap ψ₁).comp (WeakDual.CharacterSpace.compContinuousMap ψ₂)

full_name: gelfandStarTransform_naturality
code: /--
Consider the contravariant functors between compact Hausdorff spaces and commutative unital
C⋆algebras `F : Cpct → CommCStarAlg := X ↦ C(X, ℂ)` and
`G : CommCStarAlg → Cpct := A → characterSpace ℂ A` whose actions on morphisms are given by
`WeakDual.CharacterSpace.compContinuousMap` and `ContinuousMap.compStarAlgHom'`, respectively.

Then `η : id → F ∘ G := gelfandStarTransform` is a natural isomorphism implementing (half of)
the duality between these categories. That is, for commutative unital C⋆-algebras `A` and `B` and
`φ : A →⋆ₐ[ℂ] B` the following diagram commutes:

```
A  --- η A ---> C(characterSpace ℂ A, ℂ)

|                     |

φ                  (F ∘ G) φ

|                     |
V                     V

B  --- η B ---> C(characterSpace ℂ B, ℂ)
```
-/
theorem gelfandStarTransform_naturality {A B : Type*} [NormedCommRing A] [NormedAlgebra ℂ A]
    [CompleteSpace A] [StarRing A] [CstarRing A] [StarModule ℂ A] [NormedCommRing B]
    [NormedAlgebra ℂ B] [CompleteSpace B] [StarRing B] [CstarRing B] [StarModule ℂ B]
    (φ : A →⋆ₐ[ℂ] B) :
    (gelfandStarTransform B : _ →⋆ₐ[ℂ] _).comp φ =
      (compContinuousMap φ |>.compStarAlgHom' ℂ ℂ).comp (gelfandStarTransform A : _ →⋆ₐ[ℂ] _) 
goal: (↑(gelfandStarTransform B)).comp φ =
  (ContinuousMap.compStarAlgHom' ℂ ℂ (WeakDual.CharacterSpace.compContinuousMap φ)).comp ↑(gelfandStarTransform A)

full_name: WeakDual.CharacterSpace.homeoEval_naturality
code: /--
Consider the contravariant functors between compact Hausdorff spaces and commutative unital
C⋆algebras `F : Cpct → CommCStarAlg := X ↦ C(X, ℂ)` and
`G : CommCStarAlg → Cpct := A → characterSpace ℂ A` whose actions on morphisms are given by
`WeakDual.CharacterSpace.compContinuousMap` and `ContinuousMap.compStarAlgHom'`, respectively.

Then `η : id → G ∘ F := WeakDual.CharacterSpace.homeoEval` is a natural isomorphism implementing
(half of) the duality between these categories. That is, for compact Hausdorff spaces `X` and `Y`,
`f : C(X, Y)` the following diagram commutes:

```
X  --- η X ---> characterSpace ℂ C(X, ℂ)

|                     |

f                  (G ∘ F) f

|                     |
V                     V

Y  --- η Y ---> characterSpace ℂ C(Y, ℂ)
```
-/
lemma WeakDual.CharacterSpace.homeoEval_naturality {X Y 𝕜 : Type*} [RCLike 𝕜] [TopologicalSpace X]
    [CompactSpace X] [T2Space X] [TopologicalSpace Y] [CompactSpace Y] [T2Space Y] (f : C(X, Y)) :
    (homeoEval Y 𝕜 : C(_, _)).comp f =
      (f.compStarAlgHom' 𝕜 𝕜 |> compContinuousMap).comp (homeoEval X 𝕜 : C(_, _)) 
goal: (WeakDual.CharacterSpace.homeoEval Y 𝕜).toContinuousMap.comp f =
  (WeakDual.CharacterSpace.compContinuousMap (ContinuousMap.compStarAlgHom' 𝕜 𝕜 f)).comp
    (WeakDual.CharacterSpace.homeoEval X 𝕜).toContinuousMap