Skip to content
Merged
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
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,7 @@ public import Mathlib.Analysis.Complex.UpperHalfPlane.Metric
public import Mathlib.Analysis.Complex.UpperHalfPlane.MoebiusAction
public import Mathlib.Analysis.Complex.UpperHalfPlane.ProperAction
public import Mathlib.Analysis.Complex.UpperHalfPlane.Topology
public import Mathlib.Analysis.Complex.ValueDistribution.Cartan
public import Mathlib.Analysis.Complex.ValueDistribution.CharacteristicFunction
public import Mathlib.Analysis.Complex.ValueDistribution.FirstMainTheorem
public import Mathlib.Analysis.Complex.ValueDistribution.LogCounting.Asymptotic
Expand Down
12 changes: 12 additions & 0 deletions Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,18 @@ theorem coe_iSup_of_directed [Nonempty ι] {S : ι → NonUnitalSubalgebra R A}
(iSup_le fun i ↦ le_iSup (fun i ↦ (S i : Set A)) i) (Set.iUnion_subset fun _ ↦ le_iSup S _)
this.symm ▸ rfl

theorem isMulCommutative_iSup {ι : Sort*} [Nonempty ι] {S : ι → NonUnitalSubalgebra R A}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : NonUnitalSubalgebra R A) := by
have := NonUnitalSubsemiring.isMulCommutative_iSup dir
simpa [isMulCommutative_iff, ← SetLike.mem_coe, coe_iSup_of_directed dir,
NonUnitalSubsemiring.coe_iSup_of_directed dir]

instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o NonUnitalSubalgebra R A} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : NonUnitalSubalgebra R A) :=
isMulCommutative_iSup S.monotone.directed_le

/-- Define an algebra homomorphism on a directed supremum of non-unital subalgebras by defining
it on each non-unital subalgebra, and proving that it agrees on the intersection of
non-unital subalgebras. -/
Expand Down
11 changes: 11 additions & 0 deletions Mathlib/Algebra/Algebra/Subalgebra/Directed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ theorem coe_iSup_of_directed (dir : Directed (· ≤ ·) K) : ↑(iSup K) = ⋃
(iSup_le fun i ↦ le_iSup (fun i ↦ (K i : Set A)) i) (Set.iUnion_subset fun _ ↦ le_iSup K _)
simp [this, s]

theorem isMulCommutative_iSup {S : ι → Subalgebra R A}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : Subalgebra R A) := by
simpa [isMulCommutative_iff, ← SetLike.mem_coe, coe_iSup_of_directed dir,
Subsemiring.coe_iSup_of_directed dir] using Subsemiring.isMulCommutative_iSup dir

instance instIsMulCommutative_iSup [Preorder ι] [IsDirectedOrder ι]
{S : ι →o Subalgebra R A} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Subalgebra R A) :=
isMulCommutative_iSup S.monotone.directed_le

variable (K)

/-- Define an algebra homomorphism on a directed supremum of subalgebras by defining
Expand Down
17 changes: 17 additions & 0 deletions Mathlib/Algebra/Group/Subgroup/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,23 @@ theorem mem_sSup_of_directedOn {K : Set (Subgroup G)} (Kne : K.Nonempty) (hK : D
haveI : Nonempty K := Kne.to_subtype
simp only [sSup_eq_iSup', mem_iSup_of_directed hK.directed_val, SetCoe.exists, exists_prop]

@[to_additive]
theorem isMulCommutative_iSup {ι : Sort*} [Nonempty ι]
{S : ι → Subgroup G} [hS : ∀ i, IsMulCommutative (S i)]
(dir : Directed (· ≤ ·) S) : IsMulCommutative (⨆ i, S i : Subgroup G) := by
refine .of_setLike_mul_comm ?_
simp_rw [← SetLike.mem_coe, coe_iSup_of_directed dir, Set.mem_iUnion,
SetLike.mem_coe, forall_exists_index]
intro a i ha b j hb
obtain ⟨k, hik, hjk⟩ := dir i j
exact setLike_mul_comm (hik ha) (hjk hb)

@[to_additive]
instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o Subgroup G} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Subgroup G) :=
isMulCommutative_iSup S.monotone.directed_le

variable {C : Type*} [CommGroup C] {s t : Subgroup C} {x : C}

@[to_additive]
Expand Down
17 changes: 17 additions & 0 deletions Mathlib/Algebra/Group/Submonoid/Membership.lean
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ theorem coe_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
(hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set M) = ⋃ s ∈ S, ↑s :=
Set.ext fun x => by simp [mem_sSup_of_directedOn Sne hS]

@[to_additive]
theorem isMulCommutative_iSup {ι : Sort*} [Nonempty ι]
{S : ι → Submonoid M} [hS : ∀ i, IsMulCommutative (S i)]
(dir : Directed (· ≤ ·) S) : IsMulCommutative (⨆ i, S i : Submonoid M) := by
refine .of_setLike_mul_comm ?_
simp_rw [← SetLike.mem_coe, coe_iSup_of_directed dir, Set.mem_iUnion,
SetLike.mem_coe, forall_exists_index]
intro a i ha b j hb
obtain ⟨k, hik, hjk⟩ := dir i j
exact setLike_mul_comm (hik ha) (hjk hb)

@[to_additive]
instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι]
[IsDirectedOrder ι] {S : ι →o Submonoid M} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Submonoid M) :=
Submonoid.isMulCommutative_iSup S.monotone.directed_le

@[to_additive]
theorem mem_sup_left {S T : Submonoid M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T := by
rw [← SetLike.le_def]
Expand Down
19 changes: 19 additions & 0 deletions Mathlib/Algebra/Group/Subsemigroup/Membership.lean
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,25 @@ theorem coe_iSup_of_directed {S : ι → Subsemigroup M} (hS : Directed (· ≤
((⨆ i, S i : Subsemigroup M) : Set M) = ⋃ i, S i :=
Set.ext fun x => by simp [mem_iSup_of_directed hS]

/-- The supremum of a directed family of commutative subsemigroups is commutative. -/
@[to_additive]
theorem isMulCommutative_iSup {S : ι → Subsemigroup M}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : Subsemigroup M) := by
refine .of_setLike_mul_comm ?_
simp_rw [← SetLike.mem_coe, coe_iSup_of_directed dir, Set.mem_iUnion,
SetLike.mem_coe, forall_exists_index]
intro a i ha b j hb
obtain ⟨k, hik, hjk⟩ := dir i j
exact setLike_mul_comm (hik ha) (hjk hb)

/-- The supremum of a directed family of commutative subsemigroups is commutative. -/
@[to_additive]
instance instIsMulCommutative_iSup {ι : Type*} [Preorder ι] [IsDirectedOrder ι]
(S : ι →o Subsemigroup M) [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Subsemigroup M) :=
isMulCommutative_iSup S.monotone.directed_le

@[to_additive]
theorem mem_sSup_of_directed_on {S : Set (Subsemigroup M)} (hS : DirectedOn (· ≤ ·) S) {x : M} :
x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s := by
Expand Down
19 changes: 9 additions & 10 deletions Mathlib/Algebra/Order/BigOperators/Expect.lean
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,12 @@ end OrderedAddCommMonoid

section OrderedCancelAddCommMonoid
variable [AddCommMonoid α] [PartialOrder α] [IsOrderedCancelAddMonoid α] [Module ℚ≥0 α]
{a : α} {s : Finset ι} {f g : ι → α}
section PosSMulStrictMono
variable [PosSMulStrictMono ℚ≥0 α]
[PosSMulStrictMono ℚ≥0 α] {s : Finset ι} {f g : ι → α} {a : α}

lemma expect_lt_expect (hle : ∀ i ∈ s, f i ≤ g i) (hlt : ∃ i ∈ s, f i < g i) :
𝔼 i ∈ s, f i < 𝔼 i ∈ s, g i := by
apply smul_lt_smul_of_pos_left (sum_lt_sum hle hlt)
rw [inv_pos, Nat.cast_pos, card_pos]
exact hlt.imp (fun _ => And.left)
lemma expect_lt_expect (hfg : ∀ i ∈ s, f i ≤ g i) (hfg' : ∃ i ∈ s, f i < g i) :
𝔼 i ∈ s, f i < 𝔼 i ∈ s, g i :=
smul_lt_smul_of_pos_left (sum_lt_sum hfg hfg')
(by obtain ⟨i, hi, -⟩ := hfg'; have : s.Nonempty := ⟨i, hi⟩; simpa)

lemma expect_lt (hle : ∀ x ∈ s, f x ≤ a) (hlt : ∃ x ∈ s, f x < a) :
𝔼 i ∈ s, f i < a := by
Expand All @@ -130,10 +127,12 @@ lemma lt_expect (hle : ∀ x ∈ s, a ≤ f x) (hlt : ∃ x ∈ s, a < f x) :
rw [← expect_const (hlt.imp (fun _ => And.left)) a]
exact expect_lt_expect hle hlt

lemma expect_pos' (h : ∀ i ∈ s, 0 ≤ f i) (hs : ∃ i ∈ s, 0 < f i) : 0 < 𝔼 i ∈ s, f i :=
(expect_const_zero _).symm.trans_lt <| expect_lt_expect h hs

lemma expect_pos (hf : ∀ i ∈ s, 0 < f i) (hs : s.Nonempty) : 0 < 𝔼 i ∈ s, f i :=
smul_pos (inv_pos.2 <| mod_cast hs.card_pos) <| sum_pos hf hs

end PosSMulStrictMono
end OrderedCancelAddCommMonoid

section LinearOrderedAddCommMonoid
Expand Down Expand Up @@ -235,7 +234,7 @@ meta def evalFinsetExpect : PositivityExt where eval {u α} zα pα e := do
assumeInstancesCommute
let pr : Q(∀ i, 0 < $f i) ← mkLambdaFVars #[i] pbody
return some
q(@expect_pos $ι $α $instα $pα $pα' $instmod $s $f $instαordsmul (fun i _ ↦ $pr i) $ps))
q(@expect_pos $ι $α $instα $pα $pα' $instmod $instαordsmul $s $f (fun i _ ↦ $pr i) $ps))
-- Try to show that the sum is positive
if let some p_pos := p_pos then
return .positive p_pos
Expand Down
11 changes: 11 additions & 0 deletions Mathlib/Algebra/Ring/Subring/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,17 @@ theorem coe_sSup_of_directedOn {S : Set (Subring R)} (Sne : S.Nonempty)
(hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set R) = ⋃ s ∈ S, ↑s :=
Set.ext fun x => by simp [mem_sSup_of_directedOn Sne hS]

theorem isMulCommutative_iSup {ι : Sort*} [Nonempty ι] {S : ι → Subring R}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : Subring R) := by
simpa [isMulCommutative_iff, ← SetLike.mem_coe, coe_iSup_of_directed dir,
Subsemigroup.coe_iSup_of_directed dir] using Subsemigroup.isMulCommutative_iSup dir

instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o Subring R} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Subring R) :=
Subring.isMulCommutative_iSup S.monotone.directed_le

theorem mem_map_equiv {f : R ≃+* S} {K : Subring R} {x : S} :
x ∈ K.map (f : R →+* S) ↔ f.symm x ∈ K :=
@Set.mem_image_equiv _ _ (K : Set R) f.toEquiv x
Expand Down
11 changes: 11 additions & 0 deletions Mathlib/Algebra/Ring/Subsemiring/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,17 @@ theorem coe_sSup_of_directedOn {S : Set (Subsemiring R)} (Sne : S.Nonempty)
(hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set R) = ⋃ s ∈ S, ↑s :=
Set.ext fun x => by simp [mem_sSup_of_directedOn Sne hS]

theorem isMulCommutative_iSup {ι : Sort*} [Nonempty ι]
{S : ι → Subsemiring R} [hS : ∀ i, IsMulCommutative (S i)]
(dir : Directed (· ≤ ·) S) : IsMulCommutative (⨆ i, S i : Subsemiring R) := by
simpa [isMulCommutative_iff, ← SetLike.mem_coe, coe_iSup_of_directed dir,
Subsemigroup.coe_iSup_of_directed dir] using Subsemigroup.isMulCommutative_iSup dir

instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o Subsemiring R} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : Subsemiring R) :=
isMulCommutative_iSup S.monotone.directed_le

end Subsemiring

namespace RingHom
Expand Down
11 changes: 11 additions & 0 deletions Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,17 @@ theorem coe_iSup_of_directed [Nonempty ι] {S : ι → NonUnitalStarSubalgebra R
(Set.iUnion_subset fun _ ↦ le_iSup S _)
this.symm ▸ rfl

theorem isMulCommutative_iSup [Nonempty ι] {S : ι → NonUnitalStarSubalgebra R A}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : NonUnitalStarSubalgebra R A) := by
simpa [isMulCommutative_iff, ← SetLike.mem_coe, NonUnitalSubsemiring.coe_iSup_of_directed dir,
coe_iSup_of_directed dir] using NonUnitalSubsemiring.isMulCommutative_iSup dir

instance instIsMulCommutative_iSup [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o NonUnitalStarSubalgebra R A} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : NonUnitalStarSubalgebra R A) :=
isMulCommutative_iSup S.monotone.directed_le

/-- Define a non-unital star algebra homomorphism on a directed supremum of non-unital star
subalgebras by defining it on each non-unital star subalgebra, and proving that it agrees on the
intersection of non-unital star subalgebras. -/
Expand Down
35 changes: 34 additions & 1 deletion Mathlib/Algebra/Star/Subalgebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Kim Morrison, Jireh Loreaux
-/
module

public import Mathlib.Algebra.Algebra.Subalgebra.Lattice
public import Mathlib.Algebra.Algebra.Subalgebra.Directed
public import Mathlib.Algebra.Algebra.Tower
public import Mathlib.Algebra.Star.Module
public import Mathlib.Algebra.Star.NonUnitalSubalgebra
Expand Down Expand Up @@ -926,3 +926,36 @@ lemma StarAlgebra.adjoin_nonUnitalStarSubalgebra (s : Set A) :
le_antisymm
(adjoin_le <| NonUnitalStarAlgebra.adjoin_le_starAlgebra_adjoin R s)
(adjoin_le <| (NonUnitalStarAlgebra.subset_adjoin R s).trans <| subset_adjoin R _)

namespace StarSubalgebra

section directed

variable {R}

theorem coe_iSup_of_directed {ι : Type*} [Nonempty ι] {S : ι → StarSubalgebra R A}
(dir : Directed (· ≤ ·) S) : ↑(iSup S) = ⋃ i, (S i : Set A) :=
let K : StarSubalgebra R A :=
{ __ := NonUnitalStarSubalgebra.copy _ _ (NonUnitalStarSubalgebra.coe_iSup_of_directed
(S := fun i ↦ (S i).toNonUnitalStarSubalgebra) dir).symm
algebraMap_mem' x :=
let ⟨i⟩ := ‹Nonempty ι›
Set.mem_iUnion.mpr ⟨i, algebraMap_mem (S i) x⟩ }
have : iSup S = K := le_antisymm (iSup_le fun i ↦ le_iSup (fun i ↦ (S i : Set A)) i)
(Set.iUnion_subset fun _ ↦ le_iSup S _)
this.symm ▸ rfl

theorem isMulCommutative_iSup {ι : Type*} [Nonempty ι] {S : ι → StarSubalgebra R A}
[hS : ∀ i, IsMulCommutative (S i)] (dir : Directed (· ≤ ·) S) :
IsMulCommutative (⨆ i, S i : StarSubalgebra R A) := by
simpa [isMulCommutative_iff, ← SetLike.mem_coe, coe_iSup_of_directed dir,
Subalgebra.coe_iSup_of_directed dir] using Subalgebra.isMulCommutative_iSup dir

instance instIsMulCommutative_iSup {ι : Type*} [Nonempty ι] [Preorder ι] [IsDirectedOrder ι]
{S : ι →o StarSubalgebra R A} [hS : ∀ i, IsMulCommutative (S i)] :
IsMulCommutative (⨆ i, S i : StarSubalgebra R A) :=
isMulCommutative_iSup S.monotone.directed_le

end directed

end StarSubalgebra
23 changes: 23 additions & 0 deletions Mathlib/Analysis/CStarAlgebra/Spectrum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ we can still establish a form of spectral permanence.
to its norm.
+ `IsStarNormal.spectralRadius_eq_nnnorm`: The spectral radius of a normal element is equal to
its norm.
+ `spectralRadius_toReal_star_self_mul_self_eq_normSq`: The spectral radius of `a⋆ * a` is equal to
the square of the norm of `a`.
+ `IsSelfAdjoint.mem_spectrum_eq_re`: Any element of the spectrum of a selfadjoint element is real.
* `StarSubalgebra.coe_isUnit`: for `x : S` in a C⋆-Subalgebra `S` of `A`, then `↑x : A` is a Unit
if and only if `x` is a unit.
Expand Down Expand Up @@ -149,6 +151,27 @@ theorem IsStarNormal.spectralRadius_eq_nnnorm (a : A) [IsStarNormal a] :
convert tendsto_nhds_unique h₂ (pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a⋆ * a))
rw [(IsSelfAdjoint.star_mul_self a).spectralRadius_eq_nnnorm, sq, nnnorm_star_mul_self, coe_mul]

namespace CStarAlgebra

theorem toReal_spectralRadius_star_mul_self_eq_norm_sq (a : A) :
(spectralRadius ℂ (a⋆ * a)).toReal = ‖a‖ ^ 2 := by
rw [(IsSelfAdjoint.star_mul_self a).toReal_spectralRadius_complex_eq_norm,
CStarRing.norm_star_mul_self, ← pow_two]

theorem toReal_spectralRadius_self_mul_star_eq_norm_sq (a : A) :
(spectralRadius ℂ (a * a⋆)).toReal = ‖a‖ ^ 2 := by
rw [← norm_star a, ← toReal_spectralRadius_star_mul_self_eq_norm_sq, star_star]

theorem sqrt_toReal_spectralRadius_star_mul_self_eq_norm (a : A) :
(spectralRadius ℂ (a⋆ * a)).toReal.sqrt = ‖a‖ := by
simp [toReal_spectralRadius_star_mul_self_eq_norm_sq]

theorem sqrt_toReal_spectralRadius_self_mul_star_eq_norm (a : A) :
(spectralRadius ℂ (a * a⋆)).toReal.sqrt = ‖a‖ := by
simp [toReal_spectralRadius_self_mul_star_eq_norm_sq]

end CStarAlgebra

variable [StarModule ℂ A]

/-- Any element of the spectrum of a selfadjoint is real. -/
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/Implicit.lean
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ theorem to_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' :
swap
· ext
simp only [Classical.choose_spec hker, implicitFunctionDataOfComplemented,
ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL', Submodule.coe_subtype,
ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL, Submodule.coe_subtype,
ContinuousLinearMap.id_apply]
swap
· ext
simp only [ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL', Submodule.coe_subtype,
simp only [ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL, Submodule.coe_subtype,
ContinuousLinearMap.apply_val_ker, ContinuousLinearMap.zero_apply]
simp only [implicitFunctionDataOfComplemented, map_sub, sub_self]

Expand Down
Loading
Loading