Skip to content

Commit

Permalink
feat(ring_theory/algebra): some lemmas about numerals in algebras (#4327
Browse files Browse the repository at this point in the history
)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
  • Loading branch information
3 people committed Sep 30, 2020
1 parent 5fd2037 commit 05038da
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/algebra/group_power/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -546,4 +546,3 @@ variables (a) (m n : ℕ)
@[simp] theorem gpow_gpow_self : commute (a ^ m) (a ^ n) := (commute.refl a).gpow_gpow m n

end commute

18 changes: 18 additions & 0 deletions src/ring_theory/algebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,24 @@ by rw [smul_def, smul_def, left_comm]
(r • x) * y = r • (x * y) :=
by rw [smul_def, smul_def, mul_assoc]

section
variables (r : R) (a : A)

@[simp] lemma bit0_smul_one : bit0 r • (1 : A) = r • 2 :=
by simp [bit0, add_smul, smul_add]
@[simp] lemma bit0_smul_bit0 : bit0 r • bit0 a = r • (bit0 (bit0 a)) :=
by simp [bit0, add_smul, smul_add]
@[simp] lemma bit0_smul_bit1 : bit0 r • bit1 a = r • (bit0 (bit1 a)) :=
by simp [bit0, add_smul, smul_add]
@[simp] lemma bit1_smul_one : bit1 r • (1 : A) = r • 2 + 1 :=
by simp [bit1, add_smul, smul_add]
@[simp] lemma bit1_smul_bit0 : bit1 r • bit0 a = r • (bit0 (bit0 a)) + bit0 a :=
by simp [bit1, add_smul, smul_add]
@[simp] lemma bit1_smul_bit1 : bit1 r • bit1 a = r • (bit0 (bit1 a)) + bit1 a :=
by { simp only [bit0, bit1, add_smul, smul_add, one_smul], abel }

end

variables (R A)

/--
Expand Down

0 comments on commit 05038da

Please sign in to comment.