Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ lemma convexOn_cfcₙ_of_convexOn_cfc {f : ℝ → ℝ} {s : Set A}
refine convexOn_of_convexOn_inr_comp (fun _ => IsSelfAdjoint.cfcₙ) ?_
have h₁ : inr (R := ℂ) ∘ (cfcₙ f) = fun x : A => ((cfcₙ f x : A) : A⁺¹) := rfl
have h₂ : (fun x : A => ((cfcₙ f x : A) : A⁺¹))
= fun x : A => cfc f (x : A⁺¹) := by ext1; rw [real_cfcₙ_eq_cfc_inr ..]; rfl
= fun x : A => cfc f (x : A⁺¹) := by ext1; rw [real_cfcₙ_eq_cfc_inr ..]
rw [h₁, h₂]
have h₃ : ConvexOn ℝ (inrl ⁻¹' inrl '' s) ((cfc f) ∘ inrl) :=
ConvexOn.comp_linearMap (g := inrl) hf
Expand Down
4 changes: 4 additions & 0 deletions Mathlib/Analysis/InnerProductSpace/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -996,3 +996,7 @@ lemma isPosSemidef_inner : LinearMap.IsPosSemidef (innerₗ E) where
isNonneg := isNonneg_inner

end IsPosSemidef

example : (instInnerProductSpaceRealComplex.toSMul : SMul ℝ ℂ) =
Complex.instRCLike.toSMul := by
with_reducible_and_instances rfl
5 changes: 3 additions & 2 deletions Mathlib/Data/Complex/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ theorem range_im : range im = univ :=
im_surjective.range_eq

/-- The natural inclusion of the real numbers into the complex numbers. -/
@[coe]
@[coe, implicit_reducible]
def ofReal (r : ℝ) : ℂ :=
⟨r, 0⟩
instance : Coe ℝ ℂ :=
Expand Down Expand Up @@ -197,7 +197,7 @@ instance : Sub ℂ :=
/--
`mulAux` is an auxiliary definition for defining multiplication and scalar multiplication on `ℂ`
in such a way that `real_smul {x : ℝ} {z : ℂ} : x • z = x * z` holds definitionally.
This makes sure that `Module.restrictScalars ℝ ℂ ℂ = Complex.module` definitionally.
This makes sure that `Module.restrictScalars ℝ ℂ ℂ = Complex.instModule` definitionally.
-/
@[no_expose]
def mulAux {R : Type*} [SMul R ℝ] (re : R) (im : ℝ) (z : ℂ) : ℂ :=
Expand Down Expand Up @@ -568,6 +568,7 @@ theorem add_conj (z : ℂ) : z + conj z = (2 * z.re : ℝ) :=
Complex.ext_iff.2 <| by simp [two_mul, ofReal]

/-- The coercion `ℝ → ℂ` as a `RingHom`. -/
@[implicit_reducible]
def ofRealHom : ℝ →+* ℂ where
toFun x := (x : ℂ)
map_one' := ofReal_one
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Data/Int/Cast/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ variable [NonAssocRing α]

variable (α) in
/-- `coe : ℤ → α` as a `RingHom`. -/
@[implicit_reducible]
def castRingHom : ℤ →+* α where
toFun := Int.cast
map_zero' := cast_zero
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Data/Nat/Cast/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ variable [NonAssocSemiring α]

variable (α) in
/-- `Nat.cast : ℕ → α` as a `RingHom` -/
@[implicit_reducible]
def castRingHom : ℕ →+* α :=
{ castAddMonoidHom α with toFun := Nat.cast, map_one' := cast_one, map_mul' := cast_mul }

Expand Down
9 changes: 9 additions & 0 deletions Mathlib/LinearAlgebra/Complex/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ instance : StarModule ℝ ℂ :=
theorem coe_algebraMap : (algebraMap ℝ ℂ : ℝ → ℂ) = ((↑) : ℝ → ℂ) :=
rfl

example : (Semiring.toNatAlgebra : Algebra ℕ ℂ) = Complex.instAlgebraOfReal := by
with_reducible_and_instances rfl

example : (Ring.toIntAlgebra ℂ : Algebra ℤ ℂ) = Complex.instAlgebraOfReal := by
with_reducible_and_instances rfl

example : Module.restrictScalars ℝ ℂ ℂ = Complex.instModule := by
with_reducible_and_instances rfl

section

variable {A : Type*} [Semiring A] [Algebra ℝ A]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ notation:25 E' " →Lᵤ[" R ", " 𝔖 "] " F => UniformConvergenceCLM (RingHom.

namespace UniformConvergenceCLM

/-- Reinterpret `f : E →SL[σ] F` as an element of `E →SLᵤ[σ, 𝔖] F`. -/
@[implicit_reducible]
def ofFun [TopologicalSpace F] (𝔖 : Set (Set E)) : (E →SL[σ] F) ≃ (E →SLᵤ[σ, 𝔖] F) :=
⟨fun x => x, fun x => x, fun _ => rfl, fun _ => rfl⟩

instance instFunLike [TopologicalSpace F] (𝔖 : Set (Set E)) :
FunLike (E →SLᵤ[σ, 𝔖] F) E F :=
inferInstanceAs <| FunLike (E →SL[σ] F) E F
Expand Down Expand Up @@ -215,8 +220,9 @@ theorem t2Space [TopologicalSpace F] [IsTopologicalAddGroup F] [T2Space F]

instance instDistribMulAction (M : Type*) [Monoid M] [DistribMulAction M F] [SMulCommClass 𝕜₂ M F]
[TopologicalSpace F] [IsTopologicalAddGroup F] [ContinuousConstSMul M F] (𝔖 : Set (Set E)) :
DistribMulAction M (E →SLᵤ[σ, 𝔖] F) :=
inferInstanceAs <| DistribMulAction M (E →SL[σ] F)
DistribMulAction M (E →SLᵤ[σ, 𝔖] F) where
smul c f := (ofFun σ F 𝔖) (c • (ofFun σ F 𝔖).symm f)
__ : DistribMulAction M (E →SLᵤ[σ, 𝔖] F) := inferInstanceAs <| DistribMulAction M (E →SL[σ] F)

@[simp]
theorem smul_apply {M : Type*} [Monoid M] [DistribMulAction M F] [SMulCommClass 𝕜₂ M F]
Expand Down
Loading