File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1721,6 +1721,7 @@ theorem eq_one_of_prod_eq_one {s : Finset α} {f : α → β} {a : α} (hp : ∏
17211721#align finset.eq_one_of_prod_eq_one Finset.eq_one_of_prod_eq_one
17221722#align finset.eq_zero_of_sum_eq_zero Finset.eq_zero_of_sum_eq_zero
17231723
1724+ @ [to_additive sum_boole_nsmul]
17241725theorem prod_pow_boole [DecidableEq α] (s : Finset α) (f : α → β) (a : α) :
17251726 (∏ x in s, f x ^ ite (a = x) 1 0 ) = ite (a ∈ s) (f a) 1 := by simp
17261727#align finset.prod_pow_boole Finset.prod_pow_boole
Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ section Pow
4848
4949variable [Pow M ℕ]
5050
51- @[simp]
51+ @ [to_additive (attr := simp) ite_nsmul ]
5252theorem pow_ite (P : Prop ) [Decidable P] (a : M) (b c : ℕ) :
5353 (a ^ if P then b else c) = if P then a ^ b else a ^ c := by split_ifs <;> rfl
5454#align pow_ite pow_ite
5555
56- @[simp]
56+ @ [to_additive (attr := simp) nsmul_ite ]
5757theorem ite_pow (P : Prop ) [Decidable P] (a b : M) (c : ℕ) :
5858 (if P then a else b) ^ c = if P then a ^ c else b ^ c := by split_ifs <;> rfl
5959#align ite_pow ite_pow
@@ -106,9 +106,11 @@ theorem pow_two (a : M) : a ^ 2 = a * a := by rw [pow_succ, pow_one]
106106alias pow_two ← sq
107107#align sq sq
108108
109+ @ [to_additive three'_nsmul]
109110theorem pow_three' (a : M) : a ^ 3 = a * a * a := by rw [pow_succ', pow_two]
110111#align pow_three' pow_three'
111112
113+ @ [to_additive three_nsmul]
112114theorem pow_three (a : M) : a ^ 3 = a * (a * a) := by rw [pow_succ, pow_two]
113115#align pow_three pow_three
114116
@@ -148,6 +150,7 @@ theorem pow_mul_comm' (a : M) (n : ℕ) : a ^ n * a = a * a ^ n :=
148150#align pow_mul_comm' pow_mul_comm'
149151#align nsmul_add_comm' nsmul_add_comm'
150152
153+ @ [to_additive boole_nsmul]
151154theorem pow_boole (P : Prop ) [Decidable P] (a : M) :
152155 (a ^ if P then 1 else 0 ) = if P then a else 1 := by simp
153156#align pow_boole pow_boole
You can’t perform that action at this time.
0 commit comments