Skip to content

Commit

Permalink
chore(algebra/star/basic): split out big_operators import (#17792)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrmacbeth committed Dec 3, 2022
1 parent 9114ddf commit 6f6739f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
1 change: 1 addition & 0 deletions archive/100-theorems-list/42_inverse_triangle_sum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2020. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jalex Stark, Yury Kudryashov
-/
import algebra.big_operators.basic
import data.real.basic

/-!
Expand Down
23 changes: 2 additions & 21 deletions src/algebra/star/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2020 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import algebra.big_operators.basic
import algebra.ring.aut
import algebra.ring.comp_typeclasses
import data.rat.cast
Expand Down Expand Up @@ -39,6 +38,8 @@ positive cone which is the closure of the sums of elements `star r * r`. A weake
advantage of not requiring a topology.
-/

assert_not_exists finset
assert_not_exists subgroup

universes u v

Expand Down Expand Up @@ -165,16 +166,6 @@ op_injective $
star (x / y) = star x / star y :=
map_div (star_mul_aut : R ≃* R) _ _

section
open_locale big_operators

@[simp] lemma star_prod [comm_monoid R] [star_semigroup R] {α : Type*}
(s : finset α) (f : α → R):
star (∏ x in s, f x) = ∏ x in s, star (f x) :=
map_prod (star_mul_aut : R ≃* R) _ _

end

/--
Any commutative monoid admits the trivial `*`-structure.
Expand Down Expand Up @@ -240,16 +231,6 @@ star_eq_zero.not
star (n • x) = n • star x :=
(star_add_equiv : R ≃+ R).to_add_monoid_hom.map_zsmul _ _

section
open_locale big_operators

@[simp] lemma star_sum [add_comm_monoid R] [star_add_monoid R] {α : Type*}
(s : finset α) (f : α → R):
star (∑ x in s, f x) = ∑ x in s, star (f x) :=
(star_add_equiv : R ≃+ R).map_sum _ _

end

/--
A `*`-ring `R` is a (semi)ring with an involutive `star` operation which is additive
which makes `R` with its multiplicative structure into a `*`-semigroup
Expand Down
26 changes: 26 additions & 0 deletions src/algebra/star/big_operators.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/-
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
import algebra.big_operators.basic
import algebra.star.basic

/-! # Big-operators lemmas about `star` algebraic operations
These results are kept separate from `algebra.star.basic` to avoid it needing to import `finset`.
-/

variables {R : Type*}

open_locale big_operators

@[simp] lemma star_prod [comm_monoid R] [star_semigroup R] {α : Type*}
(s : finset α) (f : α → R):
star (∏ x in s, f x) = ∏ x in s, star (f x) :=
map_prod (star_mul_aut : R ≃* R) _ _

@[simp] lemma star_sum [add_comm_monoid R] [star_add_monoid R] {α : Type*}
(s : finset α) (f : α → R):
star (∑ x in s, f x) = ∑ x in s, star (f x) :=
(star_add_equiv : R ≃+ R).map_sum _ _
1 change: 1 addition & 0 deletions src/data/matrix/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import algebra.big_operators.ring
import algebra.big_operators.ring_equiv
import algebra.module.linear_map
import algebra.module.pi
import algebra.star.big_operators
import algebra.star.module
import algebra.star.pi
import data.fintype.big_operators
Expand Down

0 comments on commit 6f6739f

Please sign in to comment.