Skip to content

Commit 68ba6c0

Browse files
committed
style(RingTheory/Bialgebra/Primitive): compact add, golf ne_one
1 parent fb784ab commit 68ba6c0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Mathlib/RingTheory/Bialgebra/Primitive.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ attribute [simp] IsPrimitiveElem.counit_eq_zero IsPrimitiveElem.comul_eq_tmul_ad
5353
/-- In a bialgebra, `0` is a primitive element. -/
5454
lemma IsPrimitiveElem.zero : IsPrimitiveElem R (0 : A) := by simp [isPrimitiveElem_iff]
5555

56-
lemma IsPrimitiveElem.ne_one [Nontrivial R] (ha : IsPrimitiveElem R a) : a ≠ 1 := by
57-
rintro rfl; simpa using ha.counit_eq_zero
56+
/-- In a bialgebra over a nontrivial semiring, primitive elements are not `1`. -/
57+
lemma IsPrimitiveElem.ne_one [Nontrivial R] (ha : IsPrimitiveElem R a) : a ≠ 1 :=
58+
ne_of_apply_ne (counit (R := R)) (by simp [ha])
5859

5960
/-- Primitive elements in a bialgebra are stable under addition. -/
6061
lemma IsPrimitiveElem.add (ha : IsPrimitiveElem R a) (hb : IsPrimitiveElem R b) :
61-
IsPrimitiveElem R (a + b) :=
62-
by simp [ha, hb], by simp [ha, hb, add_tmul, tmul_add]; abel⟩
62+
IsPrimitiveElem R (a + b) := ⟨by simp [ha, hb], by simp [ha, hb, add_tmul, tmul_add]; abel⟩
6363

6464
/-- Primitive elements in a bialgebra are stable under scalar multiplication. -/
6565
lemma IsPrimitiveElem.smul (ha : IsPrimitiveElem R a) (r : R) : IsPrimitiveElem R (r • a) :=

0 commit comments

Comments
 (0)