Skip to content

Commit 2b6a6f1

Browse files
committed
chore: rename StarSubalgebra.adjoin to StarAlgebra.adjoin (#11339)
This makes it consistent with all the other `adjoin` in the library
1 parent e69a3c9 commit 2b6a6f1

File tree

5 files changed

+47
-38
lines changed

5 files changed

+47
-38
lines changed

Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ theorem starLift_range_le
328328
| _ r a => simpa using add_mem (algebraMap_mem S r) (h ⟨a, rfl⟩)
329329

330330
theorem starLift_range (f : A →⋆ₙₐ[R] C) :
331-
(starLift f).range = StarSubalgebra.adjoin R (NonUnitalStarAlgHom.range f : Set C) :=
331+
(starLift f).range = StarAlgebra.adjoin R (NonUnitalStarAlgHom.range f : Set C) :=
332332
eq_of_forall_ge_iff fun c ↦ by
333-
rw [starLift_range_le, StarSubalgebra.adjoin_le_iff]
333+
rw [starLift_range_le, StarAlgebra.adjoin_le_iff]
334334
rfl
335335

336336
end Unitization
@@ -351,7 +351,7 @@ def unitization : Unitization R s →⋆ₐ[R] A :=
351351
theorem unitization_apply (x : Unitization R s) : unitization s x = algebraMap R A x.fst + x.snd :=
352352
rfl
353353

354-
theorem unitization_range : (unitization s).range = StarSubalgebra.adjoin R s := by
354+
theorem unitization_range : (unitization s).range = StarAlgebra.adjoin R s := by
355355
rw [unitization, Unitization.starLift_range]
356356
simp only [NonUnitalStarAlgHom.coe_range, NonUnitalStarSubalgebraClass.coeSubtype,
357357
Subtype.range_coe_subtype]
@@ -372,8 +372,8 @@ theorem unitization_injective (h1 : (1 : A) ∉ s) : Function.Injective (unitiza
372372
isomorphic to its `StarSubalgebra.adjoin`. -/
373373
@[simps! apply_coe]
374374
noncomputable def unitizationStarAlgEquiv (h1 : (1 : A) ∉ s) :
375-
Unitization R s ≃⋆ₐ[R] StarSubalgebra.adjoin R (s : Set A) :=
376-
let starAlgHom : Unitization R s →⋆ₐ[R] StarSubalgebra.adjoin R (s : Set A) :=
375+
Unitization R s ≃⋆ₐ[R] StarAlgebra.adjoin R (s : Set A) :=
376+
let starAlgHom : Unitization R s →⋆ₐ[R] StarAlgebra.adjoin R (s : Set A) :=
377377
((unitization s).codRestrict _
378378
fun x ↦ (unitization_range s).le <| Set.mem_range_self x)
379379
StarAlgEquiv.ofBijective starAlgHom <| by

Mathlib/Algebra/Star/Subalgebra.lean

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ end Subalgebra
410410
/-! ### The star subalgebra generated by a set -/
411411

412412

413-
namespace StarSubalgebra
413+
namespace StarAlgebra
414+
415+
open StarSubalgebra
414416

415417
variable {F R A B : Type*} [CommSemiring R] [StarRing R]
416418
variable [Semiring A] [Algebra R A] [StarRing A] [StarModule R A]
@@ -424,35 +426,35 @@ def adjoin (s : Set A) : StarSubalgebra R A :=
424426
star_mem' := fun hx => by
425427
rwa [Subalgebra.mem_carrier, ← Subalgebra.mem_star_iff, Subalgebra.star_adjoin_comm,
426428
Set.union_star, star_star, Set.union_comm] }
427-
#align star_subalgebra.adjoin StarSubalgebra.adjoin
429+
#align star_subalgebra.adjoin StarAlgebra.adjoin
428430

429431
theorem adjoin_eq_starClosure_adjoin (s : Set A) : adjoin R s = (Algebra.adjoin R s).starClosure :=
430432
toSubalgebra_injective <|
431433
show Algebra.adjoin R (s ∪ star s) = Algebra.adjoin R s ⊔ star (Algebra.adjoin R s) from
432434
(Subalgebra.star_adjoin_comm R s).symm ▸ Algebra.adjoin_union s (star s)
433-
#align star_subalgebra.adjoin_eq_star_closure_adjoin StarSubalgebra.adjoin_eq_starClosure_adjoin
435+
#align star_subalgebra.adjoin_eq_star_closure_adjoin StarAlgebra.adjoin_eq_starClosure_adjoin
434436

435437
theorem adjoin_toSubalgebra (s : Set A) :
436438
(adjoin R s).toSubalgebra = Algebra.adjoin R (s ∪ star s) :=
437439
rfl
438-
#align star_subalgebra.adjoin_to_subalgebra StarSubalgebra.adjoin_toSubalgebra
440+
#align star_subalgebra.adjoin_to_subalgebra StarAlgebra.adjoin_toSubalgebra
439441

440442
@[aesop safe 20 apply (rule_sets := [SetLike])]
441443
theorem subset_adjoin (s : Set A) : s ⊆ adjoin R s :=
442444
(Set.subset_union_left s (star s)).trans Algebra.subset_adjoin
443-
#align star_subalgebra.subset_adjoin StarSubalgebra.subset_adjoin
445+
#align star_subalgebra.subset_adjoin StarAlgebra.subset_adjoin
444446

445447
theorem star_subset_adjoin (s : Set A) : star s ⊆ adjoin R s :=
446448
(Set.subset_union_right s (star s)).trans Algebra.subset_adjoin
447-
#align star_subalgebra.star_subset_adjoin StarSubalgebra.star_subset_adjoin
449+
#align star_subalgebra.star_subset_adjoin StarAlgebra.star_subset_adjoin
448450

449451
theorem self_mem_adjoin_singleton (x : A) : x ∈ adjoin R ({x} : Set A) :=
450452
Algebra.subset_adjoin <| Set.mem_union_left _ (Set.mem_singleton x)
451-
#align star_subalgebra.self_mem_adjoin_singleton StarSubalgebra.self_mem_adjoin_singleton
453+
#align star_subalgebra.self_mem_adjoin_singleton StarAlgebra.self_mem_adjoin_singleton
452454

453455
theorem star_self_mem_adjoin_singleton (x : A) : star x ∈ adjoin R ({x} : Set A) :=
454456
star_mem <| self_mem_adjoin_singleton R x
455-
#align star_subalgebra.star_self_mem_adjoin_singleton StarSubalgebra.star_self_mem_adjoin_singleton
457+
#align star_subalgebra.star_self_mem_adjoin_singleton StarAlgebra.star_self_mem_adjoin_singleton
456458

457459
variable {R}
458460

@@ -462,23 +464,23 @@ protected theorem gc : GaloisConnection (adjoin R : Set A → StarSubalgebra R A
462464
exact
463465
fun h => (Set.subset_union_left s _).trans h, fun h =>
464466
Set.union_subset h fun x hx => star_star x ▸ star_mem (show star x ∈ S from h hx)⟩
465-
#align star_subalgebra.gc StarSubalgebra.gc
467+
#align star_subalgebra.gc StarAlgebra.gc
466468

467469
/-- Galois insertion between `adjoin` and `coe`. -/
468470
protected def gi : GaloisInsertion (adjoin R : Set A → StarSubalgebra R A) (↑) where
469-
choice s hs := (adjoin R s).copy s <| le_antisymm (StarSubalgebra.gc.le_u_l s) hs
470-
gc := StarSubalgebra.gc
471-
le_l_u S := (StarSubalgebra.gc (S : Set A) (adjoin R S)).1 <| le_rfl
471+
choice s hs := (adjoin R s).copy s <| le_antisymm (StarAlgebra.gc.le_u_l s) hs
472+
gc := StarAlgebra.gc
473+
le_l_u S := (StarAlgebra.gc (S : Set A) (adjoin R S)).1 <| le_rfl
472474
choice_eq _ _ := StarSubalgebra.copy_eq _ _ _
473-
#align star_subalgebra.gi StarSubalgebra.gi
475+
#align star_subalgebra.gi StarAlgebra.gi
474476

475477
theorem adjoin_le {S : StarSubalgebra R A} {s : Set A} (hs : s ⊆ S) : adjoin R s ≤ S :=
476-
StarSubalgebra.gc.l_le hs
477-
#align star_subalgebra.adjoin_le StarSubalgebra.adjoin_le
478+
StarAlgebra.gc.l_le hs
479+
#align star_subalgebra.adjoin_le StarAlgebra.adjoin_le
478480

479481
theorem adjoin_le_iff {S : StarSubalgebra R A} {s : Set A} : adjoin R s ≤ S ↔ s ⊆ S :=
480-
StarSubalgebra.gc _ _
481-
#align star_subalgebra.adjoin_le_iff StarSubalgebra.adjoin_le_iff
482+
StarAlgebra.gc _ _
483+
#align star_subalgebra.adjoin_le_iff StarAlgebra.adjoin_le_iff
482484

483485
theorem _root_.Subalgebra.starClosure_eq_adjoin (S : Subalgebra R A) :
484486
S.starClosure = adjoin R (S : Set A) :=
@@ -496,7 +498,7 @@ theorem adjoin_induction {s : Set A} {p : A → Prop} {a : A} (h : a ∈ adjoin
496498
Algebra.adjoin_induction h
497499
(fun x hx => hx.elim (fun hx => mem x hx) fun hx => star_star x ▸ star _ (mem _ hx))
498500
algebraMap add mul
499-
#align star_subalgebra.adjoin_induction StarSubalgebra.adjoin_induction
501+
#align star_subalgebra.adjoin_induction StarAlgebra.adjoin_induction
500502

501503
@[elab_as_elim]
502504
theorem adjoin_induction₂ {s : Set A} {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s)
@@ -524,7 +526,7 @@ theorem adjoin_induction₂ {s : Set A} {p : A → A → Prop} {a b : A} (ha : a
524526
· cases' hx with hx hx
525527
· exact Halg_right _ _ hx
526528
· exact star_star x ▸ Hstar_left _ _ (Halg_right r _ hx)
527-
#align star_subalgebra.adjoin_induction₂ StarSubalgebra.adjoin_induction₂
529+
#align star_subalgebra.adjoin_induction₂ StarAlgebra.adjoin_induction₂
528530

529531
/-- The difference with `StarSubalgebra.adjoin_induction` is that this acts on the subtype. -/
530532
@[elab_as_elim]
@@ -541,7 +543,7 @@ theorem adjoin_induction' {s : Set A} {p : adjoin R s → Prop} (a : adjoin R s)
541543
fun x y hx hy =>
542544
Exists.elim hx fun hx' hx => Exists.elim hy fun hy' hy => ⟨mul_mem hx' hy', mul _ _ hx hy⟩,
543545
fun x hx => Exists.elim hx fun hx' hx => ⟨star_mem hx', star _ hx⟩]
544-
#align star_subalgebra.adjoin_induction' StarSubalgebra.adjoin_induction'
546+
#align star_subalgebra.adjoin_induction' StarAlgebra.adjoin_induction'
545547

546548
variable (R)
547549

@@ -567,7 +569,7 @@ def adjoinCommSemiringOfComm {s : Set A} (hcomm : ∀ a : A, a ∈ s → ∀ b :
567569
· exact star_star a ▸ (hcomm_star _ hb _ ha).symm
568570
· simpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha))
569571
exact congr_arg Subtype.val (mul_comm (⟨x, hx⟩ : Algebra.adjoin R (s ∪ star s)) ⟨y, hy⟩) }
570-
#align star_subalgebra.adjoin_comm_semiring_of_comm StarSubalgebra.adjoinCommSemiringOfComm
572+
#align star_subalgebra.adjoin_comm_semiring_of_comm StarAlgebra.adjoinCommSemiringOfComm
571573

572574
/-- If all elements of `s : Set A` commute pairwise and also commute pairwise with elements of
573575
`star s`, then `StarSubalgebra.adjoin R s` is commutative. See note [reducible non-instances]. -/
@@ -577,9 +579,9 @@ def adjoinCommRingOfComm (R : Type u) {A : Type v} [CommRing R] [StarRing R] [Ri
577579
(hcomm : ∀ a : A, a ∈ s → ∀ b : A, b ∈ s → a * b = b * a)
578580
(hcomm_star : ∀ a : A, a ∈ s → ∀ b : A, b ∈ s → a * star b = star b * a) :
579581
CommRing (adjoin R s) :=
580-
{ StarSubalgebra.adjoinCommSemiringOfComm R hcomm hcomm_star,
582+
{ StarAlgebra.adjoinCommSemiringOfComm R hcomm hcomm_star,
581583
(adjoin R s).toSubalgebra.toRing with }
582-
#align star_subalgebra.adjoin_comm_ring_of_comm StarSubalgebra.adjoinCommRingOfComm
584+
#align star_subalgebra.adjoin_comm_ring_of_comm StarAlgebra.adjoinCommRingOfComm
583585

584586
/-- The star subalgebra `StarSubalgebra.adjoin R {x}` generated by a single `x : A` is commutative
585587
if `x` is normal. -/
@@ -592,23 +594,30 @@ instance adjoinCommSemiringOfIsStarNormal (x : A) [IsStarNormal x] :
592594
fun a ha b hb => by
593595
rw [Set.mem_singleton_iff] at ha hb
594596
simpa only [ha, hb] using (star_comm_self' x).symm
595-
#align star_subalgebra.adjoin_comm_semiring_of_is_star_normal StarSubalgebra.adjoinCommSemiringOfIsStarNormal
597+
#align star_subalgebra.adjoin_comm_semiring_of_is_star_normal StarAlgebra.adjoinCommSemiringOfIsStarNormal
596598

597599
/-- The star subalgebra `StarSubalgebra.adjoin R {x}` generated by a single `x : A` is commutative
598600
if `x` is normal. -/
599601
instance adjoinCommRingOfIsStarNormal (R : Type u) {A : Type v} [CommRing R] [StarRing R] [Ring A]
600602
[Algebra R A] [StarRing A] [StarModule R A] (x : A) [IsStarNormal x] :
601603
CommRing (adjoin R ({x} : Set A)) :=
602604
{ (adjoin R ({x} : Set A)).toSubalgebra.toRing with mul_comm := mul_comm }
603-
#align star_subalgebra.adjoin_comm_ring_of_is_star_normal StarSubalgebra.adjoinCommRingOfIsStarNormal
605+
#align star_subalgebra.adjoin_comm_ring_of_is_star_normal StarAlgebra.adjoinCommRingOfIsStarNormal
604606

605607
/-! ### Complete lattice structure -/
606608

609+
end StarAlgebra
607610

608-
variable {R} -- Porting note: redundant binder annotation update
611+
namespace StarSubalgebra
612+
613+
variable {F R A B : Type*} [CommSemiring R] [StarRing R]
614+
615+
variable [Semiring A] [Algebra R A] [StarRing A] [StarModule R A]
616+
617+
variable [Semiring B] [Algebra R B] [StarRing B] [StarModule R B]
609618

610619
instance completeLattice : CompleteLattice (StarSubalgebra R A) where
611-
__ := GaloisInsertion.liftCompleteLattice StarSubalgebra.gi
620+
__ := GaloisInsertion.liftCompleteLattice StarAlgebra.gi
612621
bot := { toSubalgebra := ⊥, star_mem' := fun ⟨r, hr⟩ => ⟨star r, hr ▸ algebraMap_star_comm _⟩ }
613622
bot_le S := (bot_le : ⊥ ≤ S.toSubalgebra)
614623

@@ -718,7 +727,7 @@ end StarSubalgebra
718727

719728
namespace StarAlgHom
720729

721-
open StarSubalgebra
730+
open StarSubalgebra StarAlgebra
722731

723732
variable {F R A B : Type*} [CommSemiring R] [StarRing R]
724733
variable [Semiring A] [Algebra R A] [StarRing A] [StarModule R A]
@@ -747,8 +756,8 @@ theorem ext_of_adjoin_eq_top {s : Set A} (h : adjoin R s = ⊤) ⦃f g : F⦄ (h
747756

748757
theorem map_adjoin (f : A →⋆ₐ[R] B) (s : Set A) :
749758
map f (adjoin R s) = adjoin R (f '' s) :=
750-
GaloisConnection.l_comm_of_u_comm Set.image_preimage (gc_map_comap f) StarSubalgebra.gc
751-
StarSubalgebra.gc fun _ => rfl
759+
GaloisConnection.l_comm_of_u_comm Set.image_preimage (gc_map_comap f) StarAlgebra.gc
760+
StarAlgebra.gc fun _ => rfl
752761
#align star_alg_hom.map_adjoin StarAlgHom.map_adjoin
753762

754763
theorem ext_adjoin {s : Set A} [FunLike F (adjoin R s) B]

Mathlib/Topology/Algebra/StarSubalgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ end StarSubalgebra
185185

186186
section Elemental
187187

188-
open StarSubalgebra
188+
open StarSubalgebra StarAlgebra
189189

190190
variable (R : Type*) {A B : Type*} [CommSemiring R] [StarRing R]
191191
variable [TopologicalSpace A] [Semiring A] [StarRing A] [TopologicalSemiring A]

Mathlib/Topology/ContinuousFunction/Polynomial.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ theorem polynomialFunctions.le_equalizer {A : Type*} [Semiring A] [Algebra R A]
227227
rw [polynomialFunctions.eq_adjoin_X s]
228228
exact φ.adjoin_le_equalizer ψ fun x hx => (Set.mem_singleton_iff.1 hx).symm ▸ h
229229

230-
open StarSubalgebra
230+
open StarAlgebra
231231

232232
theorem polynomialFunctions.starClosure_eq_adjoin_X [StarRing R] [ContinuousStar R] (s : Set R) :
233233
(polynomialFunctions s).starClosure = adjoin R {toContinuousMapOnAlgHom s X} := by

test/set_like.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ example [Ring R] (S : Set R) (hx : x ∈ S) (hy : y ∈ S) (hz : z ∈ S) (n m :
2929

3030
example [CommRing R] [Ring A] [Algebra R A] [StarRing R] [StarRing A] [StarModule R A]
3131
(r : R) (a b c : A) (n : ℕ) :
32-
-b + star (algebraMap R A r) + a ^ n * c ∈ StarSubalgebra.adjoin R {a, b, c} := by
32+
-b + star (algebraMap R A r) + a ^ n * c ∈ StarAlgebra.adjoin R {a, b, c} := by
3333
aesop
3434

3535
example [Monoid M] (x : M) (n : ℕ) : x ^ n ∈ Submonoid.closure {x} := by

0 commit comments

Comments
 (0)