Skip to content

Commit 9a88ee1

Browse files
committed
style(RingTheory/Bialgebra/Primitive): dotted lemma names, golf map
1 parent c7e5960 commit 9a88ee1

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

Mathlib/RingTheory/Bialgebra/Primitive.lean

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,22 @@ structure IsPrimitiveElem (a : A) : Prop where
4545

4646
attribute [simp] IsPrimitiveElem.counit_eq_zero IsPrimitiveElem.comul_eq_tmul_add_tmul
4747

48-
namespace IsPrimitiveElem
49-
5048
/-- In a bialgebra, `0` is a primitive element. -/
51-
lemma zero : IsPrimitiveElem R (0 : A) := by simp [isPrimitiveElem_iff]
49+
lemma IsPrimitiveElem.zero : IsPrimitiveElem R (0 : A) := by simp [isPrimitiveElem_iff]
5250

5351
/-- Primitive elements in a bialgebra are stable under addition. -/
54-
lemma add (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) : IsPrimitiveElem R (a + b) :=
52+
lemma IsPrimitiveElem.add (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
53+
IsPrimitiveElem R (a + b) :=
5554
by simp [ha, hb], by simp [ha, hb, add_tmul, tmul_add]; abel⟩
5655

5756
/-- Primitive elements in a bialgebra are stable under scalar multiplication. -/
58-
lemma smul (ha : IsPrimitiveElem R a) (r : R) : IsPrimitiveElem R (r • a) :=
57+
lemma IsPrimitiveElem.smul (ha : IsPrimitiveElem R a) (r : R) : IsPrimitiveElem R (r • a) :=
5958
by simp [ha], by simp [ha, smul_add, smul_tmul']⟩
6059

6160
/-- A bialgebra homomorphism sends primitive elements to primitive elements. -/
62-
lemma map [FunLike F A B] [BialgHomClass F R A B] (f : F) (ha : IsPrimitiveElem R a) :
63-
IsPrimitiveElem R (f a) :=
64-
by simp [ha], by rw [← CoalgHomClass.map_comp_comul_apply]; simp [ha]⟩
65-
66-
end IsPrimitiveElem
61+
lemma IsPrimitiveElem.map [FunLike F A B] [BialgHomClass F R A B] (f : F)
62+
(ha : IsPrimitiveElem R a) : IsPrimitiveElem R (f a) :=
63+
by simp [ha], by simp [ha, ← CoalgHomClass.map_comp_comul_apply]⟩
6764

6865
variable (R A) in
6966
/-- The primitive elements form a submodule. -/
@@ -80,23 +77,20 @@ end Semiring
8077
section Ring
8178
variable [CommSemiring R] [Ring A] [Bialgebra R A] {a b : A}
8279

83-
namespace IsPrimitiveElem
84-
8580
/-- Primitive elements in a bialgebra are stable under negation. -/
86-
lemma neg (ha : IsPrimitiveElem R a) : IsPrimitiveElem R (-a) :=
81+
lemma IsPrimitiveElem.neg (ha : IsPrimitiveElem R a) : IsPrimitiveElem R (-a) :=
8782
by simpa [ha] using (map_add (counit (R := R)) (-a) a).symm,
8883
by rw [map_neg, ha.comul_eq_tmul_add_tmul, neg_add, neg_tmul, tmul_neg]⟩
8984

9085
/-- Primitive elements in a bialgebra are stable under subtraction. -/
91-
lemma sub (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) : IsPrimitiveElem R (a - b) :=
86+
lemma IsPrimitiveElem.sub (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
87+
IsPrimitiveElem R (a - b) :=
9288
sub_eq_add_neg a b ▸ ha.add hb.neg
9389

9490
/-- The commutator `[a, b] = a * b - b * a` of two primitive elements is primitive. -/
95-
lemma commutator (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
91+
lemma IsPrimitiveElem.commutator (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
9692
IsPrimitiveElem R (a * b - b * a) :=
9793
by simpa [ha] using (map_add (counit (R := R)) (a * b - b * a) (b * a)).symm,
9894
by simp [ha, hb, add_mul, mul_add, sub_tmul, tmul_sub]; abel⟩
9995

100-
end IsPrimitiveElem
101-
10296
end Ring

0 commit comments

Comments
 (0)