Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 1930601

Browse files
feat(algebra/group_power): lemmas relating pow in multiplicative int with multiplication in int (#3706)
Co-authored-by: Vierkantor <Vierkantor@users.noreply.github.com>
1 parent 35ecc7b commit 1930601

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/algebra/group_power.lean

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,33 @@ theorem self_cast_int_mul_cast_int_mul : commute ((m : R) * a) (n * a) :=
920920

921921
end commute
922922

923+
section multiplicative
924+
925+
open multiplicative
926+
927+
@[simp] lemma nat.to_add_pow (a : multiplicative ℕ) (b : ℕ) : to_add (a ^ b) = to_add a * b :=
928+
begin
929+
induction b with b ih,
930+
{ erw [pow_zero, to_add_one, mul_zero] },
931+
{ simp [*, pow_succ, add_comm, nat.mul_succ] }
932+
end
933+
934+
@[simp] lemma nat.of_add_mul (a b : ℕ) : of_add (a * b) = of_add a ^ b :=
935+
(nat.to_add_pow _ _).symm
936+
937+
@[simp] lemma int.to_add_pow (a : multiplicative ℤ) (b : ℕ) : to_add (a ^ b) = to_add a * b :=
938+
by induction b; simp [*, mul_add, pow_succ, add_comm]
939+
940+
@[simp] lemma int.to_add_gpow (a : multiplicative ℤ) (b : ℤ) : to_add (a ^ b) = to_add a * b :=
941+
int.induction_on b (by simp)
942+
(by simp [gpow_add, mul_add] {contextual := tt})
943+
(by simp [gpow_add, mul_add, sub_eq_add_neg] {contextual := tt})
944+
945+
@[simp] lemma int.of_add_mul (a b : ℤ) : of_add (a * b) = of_add a ^ b :=
946+
(int.to_add_gpow _ _).symm
947+
948+
end multiplicative
949+
923950
namespace units
924951

925952
variables [monoid M]

0 commit comments

Comments
 (0)