File: Mathlib/Data/Complex/Module.lean

full_name: Complex.instSMulCommClassOfReal
code: instance (priority := 90) [SMul R ℝ] [SMul S ℝ] [SMulCommClass R S ℝ] : SMulCommClass R S ℂ 
goal: SMulCommClass R S ℂ

full_name: Complex.instIsScalarTowerOfReal
code: instance (priority := 90) [SMul R S] [SMul R ℝ] [SMul S ℝ] [IsScalarTower R S ℝ] :
    IsScalarTower R S ℂ 
goal: IsScalarTower R S ℂ

full_name: Complex.instIsCentralScalarOfReal
code: instance (priority := 90) [SMul R ℝ] [SMul Rᵐᵒᵖ ℝ] [IsCentralScalar R ℝ] :
    IsCentralScalar R ℂ 
goal: IsCentralScalar R ℂ

full_name: Complex.mulAction
code: instance (priority := 90) mulAction [Monoid R] [MulAction R ℝ] : MulAction R ℂ 
goal: MulAction R ℂ

full_name: Complex.distribSMul
code: instance (priority := 90) distribSMul [DistribSMul R ℝ] : DistribSMul R ℂ 
goal: DistribSMul R ℂ

full_name: Complex.instDistribMulActionOfReal
code: instance (priority := 90) [Semiring R] [DistribMulAction R ℝ] : DistribMulAction R ℂ 
goal: DistribMulAction R ℂ

full_name: Complex.instModule
code: instance (priority := 100) instModule [Semiring R] [Module R ℝ] : Module R ℂ 
goal: Module R ℂ

full_name: Complex.instAlgebraOfReal
code: instance (priority := 95) instAlgebraOfReal [CommSemiring R] [Algebra R ℝ] : Algebra R ℂ 
goal: Algebra R ℂ

full_name: Complex.instStarModuleReal
code: instance : StarModule ℝ ℂ 
goal: StarModule ℝ ℂ

full_name: Complex.coe_algebraMap
code: @[simp]
theorem coe_algebraMap : (algebraMap ℝ ℂ : ℝ → ℂ) = ((↑) : ℝ → ℂ) 
goal: ⇑(algebraMap ℝ ℂ) = Complex.ofReal'

full_name: AlgHom.map_coe_real_complex
code: /-- We need this lemma since `Complex.coe_algebraMap` diverts the simp-normal form away from
`AlgHom.commutes`. -/
@[simp]
theorem _root_.AlgHom.map_coe_real_complex (f : ℂ →ₐ[ℝ] A) (x : ℝ) : f x = algebraMap ℝ A x 
goal: f ↑x = (algebraMap ℝ A) x

full_name: Complex.algHom_ext
code: /-- Two `ℝ`-algebra homomorphisms from `ℂ` are equal if they agree on `Complex.I`. -/
@[ext]
theorem algHom_ext ⦃f g : ℂ →ₐ[ℝ] A⦄ (h : f I = g I) : f = g 
goal: f = g

full_name: Complex.basisOneI
code: /-- `ℂ` has a basis over `ℝ` given by `1` and `I`. -/
noncomputable def basisOneI : Basis (Fin 2) ℝ ℂ 
goal: Basis (Fin 2) ℝ ℂ

full_name: Complex.coe_basisOneI_repr
code: @[simp]
theorem coe_basisOneI_repr (z : ℂ) : ⇑(basisOneI.repr z) = ![z.re, z.im] 
goal: ⇑(Complex.basisOneI.repr z) = ![z.re, z.im]

full_name: Complex.coe_basisOneI
code: @[simp]
theorem coe_basisOneI : ⇑basisOneI = ![1, I] 
goal: ⇑Complex.basisOneI = ![1, Complex.I]

full_name: Module.complexToReal
code: instance (priority := 900) Module.complexToReal (E : Type*) [AddCommGroup E] [Module ℂ E] :
    Module ℝ E 
goal: Module ℝ E

full_name: Algebra.complexToReal
code: instance (priority := 900) Algebra.complexToReal {A : Type*} [Semiring A] [Algebra ℂ A] :
    Algebra ℝ A 
goal: Algebra ℝ A

full_name: Complex.coe_smul
code: @[simp, norm_cast]
theorem Complex.coe_smul {E : Type*} [AddCommGroup E] [Module ℂ E] (x : ℝ) (y : E) :
    (x : ℂ) • y = x • y 
goal: ↑x • y = x • y

full_name: SMulCommClass.complexToReal
code: /-- The scalar action of `ℝ` on a `ℂ`-module `E` induced by `Module.complexToReal` commutes with
another scalar action of `M` on `E` whenever the action of `ℂ` commutes with the action of `M`. -/
instance (priority := 900) SMulCommClass.complexToReal {M E : Type*} [AddCommGroup E] [Module ℂ E]
    [SMul M E] [SMulCommClass ℂ M E] : SMulCommClass ℝ M E 
goal: SMulCommClass ℝ M E

full_name: IsScalarTower.complexToReal
code: /-- The scalar action of `ℝ` on a `ℂ`-module `E` induced by `Module.complexToReal` associates with
another scalar action of `M` on `E` whenever the action of `ℂ` associates with the action of `M`. -/
instance IsScalarTower.complexToReal {M E : Type*} [AddCommGroup M] [Module ℂ M] [AddCommGroup E]
    [Module ℂ E] [SMul M E] [IsScalarTower ℂ M E] : IsScalarTower ℝ M E 
goal: IsScalarTower ℝ M E

full_name: StarModule.complexToReal
code: instance (priority := 900) StarModule.complexToReal {E : Type*} [AddCommGroup E] [Star E]
    [Module ℂ E] [StarModule ℂ E] : StarModule ℝ E 
goal: StarModule ℝ E

full_name: Complex.reLm
code: /-- Linear map version of the real part function, from `ℂ` to `ℝ`. -/
def reLm : ℂ →ₗ[ℝ] ℝ 
goal: ℂ →ₗ[ℝ] ℝ

full_name: Complex.reLm_coe
code: @[simp]
theorem reLm_coe : ⇑reLm = re 
goal: ⇑Complex.reLm = Complex.re

full_name: Complex.imLm
code: /-- Linear map version of the imaginary part function, from `ℂ` to `ℝ`. -/
def imLm : ℂ →ₗ[ℝ] ℝ 
goal: ℂ →ₗ[ℝ] ℝ

full_name: Complex.imLm_coe
code: @[simp]
theorem imLm_coe : ⇑imLm = im 
goal: ⇑Complex.imLm = Complex.im

full_name: Complex.ofRealAm
code: /-- `ℝ`-algebra morphism version of the canonical embedding of `ℝ` in `ℂ`. -/
def ofRealAm : ℝ →ₐ[ℝ] ℂ 
goal: ℝ →ₐ[ℝ] ℂ

full_name: Complex.ofRealAm_coe
code: @[simp]
theorem ofRealAm_coe : ⇑ofRealAm = ((↑) : ℝ → ℂ) 
goal: ⇑Complex.ofRealAm = Complex.ofReal'

full_name: Complex.conjAe
code: /-- `ℝ`-algebra isomorphism version of the complex conjugation function from `ℂ` to `ℂ` -/
def conjAe : ℂ ≃ₐ[ℝ] ℂ 
goal: ℂ ≃ₐ[ℝ] ℂ

full_name: Complex.conjAe_coe
code: @[simp]
theorem conjAe_coe : ⇑conjAe = conj 
goal: ⇑Complex.conjAe = ⇑(starRingEnd ℂ)

full_name: Complex.toMatrix_conjAe
code: /-- The matrix representation of `conjAe`. -/
@[simp]
theorem toMatrix_conjAe :
    LinearMap.toMatrix basisOneI basisOneI conjAe.toLinearMap = !![1, 0; 0, -1] 
goal: (LinearMap.toMatrix Complex.basisOneI Complex.basisOneI) Complex.conjAe.toLinearMap = !![1, 0; 0, -1]

full_name: Complex.real_algHom_eq_id_or_conj
code: /-- The identity and the complex conjugation are the only two `ℝ`-algebra homomorphisms of `ℂ`. -/
theorem real_algHom_eq_id_or_conj (f : ℂ →ₐ[ℝ] ℂ) : f = AlgHom.id ℝ ℂ ∨ f = conjAe 
goal: f = AlgHom.id ℝ ℂ ∨ f = ↑Complex.conjAe

full_name: Complex.equivRealProdLm
code: /-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ 
goal: ℂ ≃ₗ[ℝ] ℝ × ℝ

full_name: Complex.equivRealProdLm_symm_apply_im
code: /-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ 
goal: ∀ (a : ℝ × ℝ), (Complex.equivRealProdLm.symm a).im = a.2

full_name: Complex.equivRealProdLm_symm_apply_re
code: /-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ 
goal: ∀ (a : ℝ × ℝ), (Complex.equivRealProdLm.symm a).re = a.1

full_name: Complex.equivRealProdLm_apply
code: /-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ 
goal: ∀ (a : ℂ), Complex.equivRealProdLm a = (a.re, a.im)

full_name: Complex.equivRealProdLm_symm_apply
code: theorem equivRealProdLm_symm_apply (p : ℝ × ℝ) :
    Complex.equivRealProdLm.symm p = p.1 + p.2 * Complex.I 
goal: Complex.equivRealProdLm.symm p = ↑p.1 + ↑p.2 * Complex.I

full_name: Complex.liftAux
code: /-- There is an alg_hom from `ℂ` to any `ℝ`-algebra with an element that squares to `-1`.

See `Complex.lift` for this as an equiv. -/
def liftAux (I' : A) (hf : I' * I' = -1) : ℂ →ₐ[ℝ] A 
goal: ℂ →ₐ[ℝ] A

full_name: Complex.liftAux_apply
code: @[simp]
theorem liftAux_apply (I' : A) (hI') (z : ℂ) : liftAux I' hI' z = algebraMap ℝ A z.re + z.im • I' 
goal: (Complex.liftAux I' hI') z = (algebraMap ℝ A) z.re + z.im • I'

full_name: Complex.liftAux_apply_I
code: theorem liftAux_apply_I (I' : A) (hI') : liftAux I' hI' I = I' 
goal: (Complex.liftAux I' hI') Complex.I = I'

full_name: Complex.lift
code: /-- A universal property of the complex numbers, providing a unique `ℂ →ₐ[ℝ] A` for every element
of `A` which squares to `-1`.

This can be used to embed the complex numbers in the `Quaternion`s.

This isomorphism is named to match the very similar `Zsqrtd.lift`. -/
@[simps (config := { simpRhs := true })]
def lift : { I' : A // I' * I' = -1 } ≃ (ℂ →ₐ[ℝ] A) 
goal: { I' // I' * I' = -1 } ≃ (ℂ →ₐ[ℝ] A)

full_name: Complex.lift_symm_apply_coe
code: /-- A universal property of the complex numbers, providing a unique `ℂ →ₐ[ℝ] A` for every element
of `A` which squares to `-1`.

This can be used to embed the complex numbers in the `Quaternion`s.

This isomorphism is named to match the very similar `Zsqrtd.lift`. -/
@[simps (config := { simpRhs := true })]
def lift : { I' : A // I' * I' = -1 } ≃ (ℂ →ₐ[ℝ] A) 
goal: ↑(Complex.lift.symm F) = F Complex.I

full_name: Complex.lift_apply
code: /-- A universal property of the complex numbers, providing a unique `ℂ →ₐ[ℝ] A` for every element
of `A` which squares to `-1`.

This can be used to embed the complex numbers in the `Quaternion`s.

This isomorphism is named to match the very similar `Zsqrtd.lift`. -/
@[simps (config := { simpRhs := true })]
def lift : { I' : A // I' * I' = -1 } ≃ (ℂ →ₐ[ℝ] A) 
goal: Complex.lift I' = Complex.liftAux ↑I' ⋯

full_name: Complex.liftAux_I
code: @[simp]
theorem liftAux_I : liftAux I I_mul_I = AlgHom.id ℝ ℂ 
goal: Complex.liftAux Complex.I Complex.I_mul_I = AlgHom.id ℝ ℂ

full_name: Complex.liftAux_neg_I
code: @[simp]
theorem liftAux_neg_I : liftAux (-I) ((neg_mul_neg _ _).trans I_mul_I) = conjAe 
goal: Complex.liftAux (-Complex.I) ⋯ = ↑Complex.conjAe

full_name: skewAdjoint.negISMul_apply_coe
code: /-- Create a `selfAdjoint` element from a `skewAdjoint` element by multiplying by the scalar
`-Complex.I`. -/
@[simps]
def skewAdjoint.negISMul : skewAdjoint A →ₗ[ℝ] selfAdjoint A 
goal: ↑(skewAdjoint.negISMul a) = -Complex.I • ↑a

full_name: skewAdjoint.negISMul
code: /-- Create a `selfAdjoint` element from a `skewAdjoint` element by multiplying by the scalar
`-Complex.I`. -/
@[simps]
def skewAdjoint.negISMul : skewAdjoint A →ₗ[ℝ] selfAdjoint A 
goal: ↥(skewAdjoint A) →ₗ[ℝ] ↥(selfAdjoint A)

full_name: skewAdjoint.I_smul_neg_I
code: theorem skewAdjoint.I_smul_neg_I (a : skewAdjoint A) : I • (skewAdjoint.negISMul a : A) = a 
goal: Complex.I • ↑(skewAdjoint.negISMul a) = ↑a

full_name: realPart
code: /-- The real part `ℜ a` of an element `a` of a star module over `ℂ`, as a linear map. This is just
`selfAdjointPart ℝ`, but we provide it as a separate definition in order to link it with lemmas
concerning the `imaginaryPart`, which doesn't exist in star modules over other rings. -/
noncomputable def realPart : A →ₗ[ℝ] selfAdjoint A 
goal: A →ₗ[ℝ] ↥(selfAdjoint A)

full_name: imaginaryPart
code: /-- The imaginary part `ℑ a` of an element `a` of a star module over `ℂ`, as a linear map into the
self adjoint elements. In a general star module, we have a decomposition into the `selfAdjoint`
and `skewAdjoint` parts, but in a star module over `ℂ` we have
`realPart_add_I_smul_imaginaryPart`, which allows us to decompose into a linear combination of
`selfAdjoint`s. -/
noncomputable def imaginaryPart : A →ₗ[ℝ] selfAdjoint A 
goal: A →ₗ[ℝ] ↥(selfAdjoint A)

full_name: ComplexStarModule._aux_Mathlib_Data_Complex_Module___macroRules_ComplexStarModule_termℜ_1
code: @[inherit_doc]
scoped[ComplexStarModule] notation "ℜ" => realPart
goal: Lean.Macro

full_name: ComplexStarModule._aux_Mathlib_Data_Complex_Module___unexpand_realPart_1
code: @[inherit_doc]
scoped[ComplexStarModule] notation "ℜ" => realPart
goal: Lean.PrettyPrinter.Unexpander

full_name: ComplexStarModule._aux_Mathlib_Data_Complex_Module___unexpand_imaginaryPart_1
code: @[inherit_doc]
scoped[ComplexStarModule] notation "ℑ" => imaginaryPart
goal: Lean.PrettyPrinter.Unexpander

full_name: ComplexStarModule._aux_Mathlib_Data_Complex_Module___macroRules_ComplexStarModule_termℑ_1
code: @[inherit_doc]
scoped[ComplexStarModule] notation "ℑ" => imaginaryPart
goal: Lean.Macro

full_name: realPart_apply_coe
code: theorem realPart_apply_coe (a : A) : (ℜ a : A) = (2 : ℝ)⁻¹ • (a + star a) 
goal: ↑(realPart a) = 2⁻¹ • (a + star a)

full_name: imaginaryPart_apply_coe
code: theorem imaginaryPart_apply_coe (a : A) : (ℑ a : A) = -I • (2 : ℝ)⁻¹ • (a - star a) 
goal: ↑(imaginaryPart a) = -Complex.I • 2⁻¹ • (a - star a)

full_name: realPart_add_I_smul_imaginaryPart
code: /-- The standard decomposition of `ℜ a + Complex.I • ℑ a = a` of an element of a star module over
`ℂ` into a linear combination of self adjoint elements. -/
theorem realPart_add_I_smul_imaginaryPart (a : A) : (ℜ a : A) + I • (ℑ a : A) = a 
goal: ↑(realPart a) + Complex.I • ↑(imaginaryPart a) = a

full_name: realPart_I_smul
code: @[simp]
theorem realPart_I_smul (a : A) : ℜ (I • a) = -ℑ a 
goal: realPart (Complex.I • a) = -imaginaryPart a

full_name: imaginaryPart_I_smul
code: @[simp]
theorem imaginaryPart_I_smul (a : A) : ℑ (I • a) = ℜ a 
goal: imaginaryPart (Complex.I • a) = realPart a

full_name: realPart_smul
code: theorem realPart_smul (z : ℂ) (a : A) : ℜ (z • a) = z.re • ℜ a - z.im • ℑ a 
goal: realPart (z • a) = z.re • realPart a - z.im • imaginaryPart a

full_name: imaginaryPart_smul
code: theorem imaginaryPart_smul (z : ℂ) (a : A) : ℑ (z • a) = z.re • ℑ a + z.im • ℜ a 
goal: imaginaryPart (z • a) = z.re • imaginaryPart a + z.im • realPart a

full_name: skewAdjointPart_eq_I_smul_imaginaryPart
code: lemma skewAdjointPart_eq_I_smul_imaginaryPart (x : A) :
    (skewAdjointPart ℝ x : A) = I • (imaginaryPart x : A) 
goal: ↑((skewAdjointPart ℝ) x) = Complex.I • ↑(imaginaryPart x)

full_name: imaginaryPart_eq_neg_I_smul_skewAdjointPart
code: lemma imaginaryPart_eq_neg_I_smul_skewAdjointPart (x : A) :
    (imaginaryPart x : A) = -I • (skewAdjointPart ℝ x : A) 
goal: ↑(imaginaryPart x) = -Complex.I • ↑((skewAdjointPart ℝ) x)

full_name: IsSelfAdjoint.coe_realPart
code: lemma IsSelfAdjoint.coe_realPart {x : A} (hx : IsSelfAdjoint x) :
    (ℜ x : A) = x 
goal: ↑(realPart x) = x

full_name: IsSelfAdjoint.imaginaryPart
code: nonrec lemma IsSelfAdjoint.imaginaryPart {x : A} (hx : IsSelfAdjoint x) :
    ℑ x = 0 
goal: imaginaryPart x = 0

full_name: realPart_comp_subtype_selfAdjoint
code: lemma realPart_comp_subtype_selfAdjoint :
    realPart.comp (selfAdjoint.submodule ℝ A).subtype = LinearMap.id 
goal: realPart ∘ₗ (selfAdjoint.submodule ℝ A).subtype = LinearMap.id

full_name: imaginaryPart_comp_subtype_selfAdjoint
code: lemma imaginaryPart_comp_subtype_selfAdjoint :
    imaginaryPart.comp (selfAdjoint.submodule ℝ A).subtype = 0 
goal: imaginaryPart ∘ₗ (selfAdjoint.submodule ℝ A).subtype = 0

full_name: imaginaryPart_realPart
code: @[simp]
lemma imaginaryPart_realPart {x : A} : ℑ (ℜ x : A) = 0 
goal: imaginaryPart ↑(realPart x) = 0

full_name: imaginaryPart_imaginaryPart
code: @[simp]
lemma imaginaryPart_imaginaryPart {x : A} : ℑ (ℑ x : A) = 0 
goal: imaginaryPart ↑(imaginaryPart x) = 0

full_name: realPart_idem
code: @[simp]
lemma realPart_idem {x : A} : ℜ (ℜ x : A) = ℜ x 
goal: realPart ↑(realPart x) = realPart x

full_name: realPart_imaginaryPart
code: @[simp]
lemma realPart_imaginaryPart {x : A} : ℜ (ℑ x : A) = ℑ x 
goal: realPart ↑(imaginaryPart x) = imaginaryPart x

full_name: realPart_surjective
code: lemma realPart_surjective : Function.Surjective (realPart (A := A)) 
goal: Function.Surjective ⇑realPart

full_name: imaginaryPart_surjective
code: lemma imaginaryPart_surjective : Function.Surjective (imaginaryPart (A := A)) 
goal: Function.Surjective ⇑imaginaryPart

full_name: span_selfAdjoint
code: lemma span_selfAdjoint : span ℂ (selfAdjoint A : Set A) = ⊤ 
goal: Submodule.span ℂ ↑(selfAdjoint A) = ⊤

full_name: Complex.selfAdjointEquiv_apply
code: /-- The natural `ℝ`-linear equivalence between `selfAdjoint ℂ` and `ℝ`. -/
@[simps apply symm_apply]
def Complex.selfAdjointEquiv : selfAdjoint ℂ ≃ₗ[ℝ] ℝ 
goal: Complex.selfAdjointEquiv z = (↑z).re

full_name: Complex.selfAdjointEquiv
code: /-- The natural `ℝ`-linear equivalence between `selfAdjoint ℂ` and `ℝ`. -/
@[simps apply symm_apply]
def Complex.selfAdjointEquiv : selfAdjoint ℂ ≃ₗ[ℝ] ℝ 
goal: ↥(selfAdjoint ℂ) ≃ₗ[ℝ] ℝ

full_name: Complex.selfAdjointEquiv_symm_apply
code: /-- The natural `ℝ`-linear equivalence between `selfAdjoint ℂ` and `ℝ`. -/
@[simps apply symm_apply]
def Complex.selfAdjointEquiv : selfAdjoint ℂ ≃ₗ[ℝ] ℝ 
goal: Complex.selfAdjointEquiv.symm x = ⟨↑x, ⋯⟩

full_name: Complex.coe_selfAdjointEquiv
code: lemma Complex.coe_selfAdjointEquiv (z : selfAdjoint ℂ) :
    (selfAdjointEquiv z : ℂ) = z 
goal: ↑(Complex.selfAdjointEquiv z) = ↑z

full_name: realPart_ofReal
code: @[simp]
lemma realPart_ofReal (r : ℝ) : (ℜ (r : ℂ) : ℂ) = r 
goal: ↑(realPart ↑r) = ↑r

full_name: imaginaryPart_ofReal
code: @[simp]
lemma imaginaryPart_ofReal (r : ℝ) : ℑ (r : ℂ) = 0 
goal: imaginaryPart ↑r = 0

full_name: Complex.coe_realPart
code: lemma Complex.coe_realPart (z : ℂ) : (ℜ z : ℂ) = z.re 
goal: ↑(realPart z) = ↑z.re

full_name: star_mul_self_add_self_mul_star
code: lemma star_mul_self_add_self_mul_star {A : Type*} [NonUnitalRing A] [StarRing A]
    [Module ℂ A] [IsScalarTower ℂ A A] [SMulCommClass ℂ A A] [StarModule ℂ A] (a : A) :
    star a * a + a * star a = 2 • (ℜ a * ℜ a + ℑ a * ℑ a) 
goal: star a * a + a * star a = 2 • (↑(realPart a) * ↑(realPart a) + ↑(imaginaryPart a) * ↑(imaginaryPart a))