Skip to content

Commit

Permalink
chore(algebra/*, data/polynomial/*): remove unnecessary imports (#8578)
Browse files Browse the repository at this point in the history
I cleaned up all of `data.polynomial`, and the files in `algebra` it imports.
  • Loading branch information
YaelDillies committed Aug 8, 2021
1 parent 87e9bec commit 3788cbf
Show file tree
Hide file tree
Showing 32 changed files with 34 additions and 74 deletions.
6 changes: 2 additions & 4 deletions src/algebra/algebra/basic.lean
Expand Up @@ -3,12 +3,10 @@ Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Yury Kudryashov
-/
import tactic.nth_rewrite
import algebra.iterate_hom
import data.equiv.ring_aut
import linear_algebra.tensor_product
import ring_theory.subring
import algebra.opposites
import algebra.iterate_hom
import tactic.nth_rewrite

/-!
# Algebra over Commutative Semiring
Expand Down
5 changes: 2 additions & 3 deletions src/algebra/big_operators/pi.lean
Expand Up @@ -3,10 +3,9 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot
-/
import algebra.ring.pi
import algebra.big_operators.basic
import data.fintype.basic
import algebra.group.prod
import algebra.ring.pi

/-!
# Big operators for Pi Types
Expand Down
3 changes: 0 additions & 3 deletions src/algebra/group/prod.lean
Expand Up @@ -3,9 +3,6 @@ Copyright (c) 2020 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot, Yury Kudryashov
-/
import algebra.group.hom
import data.equiv.mul_add
import data.prod
import algebra.opposites

/-!
Expand Down
22 changes: 11 additions & 11 deletions src/algebra/module/basic.lean
Expand Up @@ -4,9 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Nathaniel Thomas, Jeremy Avigad, Johannes Hölzl, Mario Carneiro
-/
import algebra.big_operators.basic
import algebra.group.hom
import group_theory.group_action.group
import algebra.smul_with_zero
import group_theory.group_action.group

/-!
# Modules over a ring
Expand All @@ -18,16 +17,17 @@ In this file we define
the operation `•` satisfies some natural associativity and distributivity axioms similar to those
on a ring.
## Implementation notes
In typical mathematical usage, our definition of `module` corresponds to "semimodule", and the
word "module" is reserved for `module R M` where `R` is a `ring` and `M` an `add_comm_group`.
If `R` is a `field` and `M` an `add_comm_group`, `M` would be called an `R`-vector space.
Since those assumptions can be made by changing the typeclasses applied to `R` and `M`,
without changing the axioms in `module`, mathlib calls everything a `module`.
## Implementation notes
In typical mathematical usage, our definition of `module` corresponds to "semimodule", and the
word "module" is reserved for `module R M` where `R` is a `ring` and `M` an `add_comm_group`.
If `R` is a `field` and `M` an `add_comm_group`, `M` would be called an `R`-vector space.
Since those assumptions can be made by changing the typeclasses applied to `R` and `M`,
without changing the axioms in `module`, mathlib calls everything a `module`.
In older versions of mathlib, we had separate `semimodule` and `vector_space` abbreviations.
This caused inference issues in some cases, while not providing any real advantages, so we decided
to use a canonical `module` typeclass throughout.
In older versions of mathlib, we had separate `semimodule` and `vector_space` abbreviations.
This caused inference issues in some cases, while not providing any real advantages, so we decided
to use a canonical `module` typeclass throughout.
## Tags
Expand Down
1 change: 1 addition & 0 deletions src/algebra/module/prod.lean
Expand Up @@ -5,6 +5,7 @@ Authors: Simon Hudon, Patrick Massot, Eric Wieser
-/
import algebra.module.basic
import group_theory.group_action.prod

/-!
# Prod instances for module and multiplicative actions
Expand Down
1 change: 0 additions & 1 deletion src/algebra/module/submodule_lattice.lean
Expand Up @@ -5,7 +5,6 @@ Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov
-/
import algebra.module.submodule
import algebra.punit_instances
import algebra.module.prod

/-!
# The lattice structure on `submodule`s
Expand Down
1 change: 0 additions & 1 deletion src/algebra/monoid_algebra.lean
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2017 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Yury G. Kudryashov, Scott Morrison
-/
import algebra.algebra.basic
import algebra.big_operators.finsupp
import linear_algebra.finsupp
import algebra.non_unital_alg_hom
Expand Down
1 change: 0 additions & 1 deletion src/algebra/smul_with_zero.lean
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import group_theory.group_action.defs
import algebra.group_power.basic

/-!
Expand Down
2 changes: 0 additions & 2 deletions src/data/equiv/mul_add.lean
Expand Up @@ -3,9 +3,7 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Callum Sutton, Yury Kudryashov
-/
import algebra.group.hom
import algebra.group.type_tags
import algebra.group.units_hom
import algebra.group_with_zero

/-!
Expand Down
1 change: 0 additions & 1 deletion src/data/equiv/mul_add_aut.lean
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Callum Sutton, Yury Kudryashov
-/
import data.equiv.mul_add
import group_theory.perm.basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion src/data/equiv/ring_aut.lean
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Callum Sutton, Yury Kudryashov
-/
import data.equiv.ring
import data.equiv.mul_add_aut
import data.equiv.ring

/-!
# Ring automorphisms
Expand Down
3 changes: 1 addition & 2 deletions src/data/polynomial/algebra_map.lean
Expand Up @@ -3,9 +3,8 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/

import data.polynomial.eval
import algebra.algebra.tower
import data.polynomial.eval

/-!
# Theory of univariate polynomials
Expand Down
4 changes: 0 additions & 4 deletions src/data/polynomial/basic.lean
Expand Up @@ -3,11 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import tactic.ring_exp
import tactic.chain
import algebra.monoid_algebra
import data.finset.sort
import tactic.ring

/-!
# Theory of univariate polynomials
Expand Down
2 changes: 1 addition & 1 deletion src/data/polynomial/coeff.lean
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.basic
import data.finset.nat_antidiagonal
import data.polynomial.basic

/-!
# Theory of univariate polynomials
Expand Down
2 changes: 1 addition & 1 deletion src/data/polynomial/degree/definitions.lean
Expand Up @@ -3,9 +3,9 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.monomial
import data.nat.with_bot
import data.polynomial.induction
import data.polynomial.monomial

/-!
# Theory of univariate polynomials
Expand Down
1 change: 0 additions & 1 deletion src/data/polynomial/derivative.lean
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.eval
import algebra.iterate_hom

/-!
# The derivative map on polynomials
Expand Down
1 change: 0 additions & 1 deletion src/data/polynomial/div.lean
Expand Up @@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.monic
import ring_theory.euclidean_domain
import ring_theory.multiplicity

/-!
Expand Down
1 change: 0 additions & 1 deletion src/data/polynomial/eval.lean
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.induction
import data.polynomial.degree.definitions

/-!
Expand Down
5 changes: 3 additions & 2 deletions src/data/polynomial/field_division.lean
Expand Up @@ -3,9 +3,10 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.ring_division
import data.polynomial.derivative
import algebra.gcd_monoid
import data.polynomial.derivative
import data.polynomial.ring_division
import ring_theory.euclidean_domain

/-!
# Theory of univariate polynomials
Expand Down
1 change: 1 addition & 0 deletions src/data/polynomial/identities.lean
Expand Up @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker
-/
import data.polynomial.derivative
import tactic.ring_exp

/-!
# Theory of univariate polynomials
Expand Down
2 changes: 1 addition & 1 deletion src/data/polynomial/inductions.lean
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Damiano Testa, Jens Wagemaker
-/
import data.polynomial.degree.definitions
import data.finset.intervals
import data.polynomial.degree.definitions

/-!
# Induction on polynomials
Expand Down
4 changes: 1 addition & 3 deletions src/data/polynomial/iterated_deriv.lean
Expand Up @@ -4,10 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jujian Zhang
-/

import data.polynomial.derivative
import logic.function.iterate
import data.finset.intervals
import tactic.ring
import data.polynomial.derivative
import tactic.linarith

/-!
Expand Down
5 changes: 1 addition & 4 deletions src/data/polynomial/lifts.lean
Expand Up @@ -3,11 +3,8 @@ Copyright (c) 2020 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/

import data.polynomial.algebra_map
import algebra.algebra.subalgebra
import algebra.polynomial.big_operators
import data.polynomial.erase_lead
import data.polynomial.div

/-!
# Polynomials that lift
Expand Down
1 change: 0 additions & 1 deletion src/data/polynomial/mirror.lean
Expand Up @@ -5,7 +5,6 @@ Authors: Thomas Browning
-/

import data.polynomial.ring_division
import algebra.big_operators.nat_antidiagonal

/-!
# "Mirror" of a univariate polynomial
Expand Down
2 changes: 1 addition & 1 deletion src/data/polynomial/reverse.lean
Expand Up @@ -12,7 +12,7 @@ import data.polynomial.eval
The main definition is `reverse`. Applying `reverse` to a polynomial `f : polynomial R` produces
the polynomial with a reversed list of coefficients, equivalent to `X^f.nat_degree * f(1/X)`.
The main result is that `reverse (f * g) = reverse (f) * reverse (g)`, provided the leading
The main result is that `reverse (f * g) = reverse f * reverse g`, provided the leading
coefficients of `f` and `g` do not multiply to zero.
-/

Expand Down
3 changes: 1 addition & 2 deletions src/data/polynomial/ring_division.lean
Expand Up @@ -3,10 +3,9 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker, Johan Commelin
-/

import data.polynomial.div
import data.polynomial.algebra_map
import data.polynomial.degree.lemmas
import data.polynomial.div

/-!
# Theory of univariate polynomials
Expand Down
5 changes: 0 additions & 5 deletions src/group_theory/group_action/group.lean
Expand Up @@ -3,12 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes
-/
import group_theory.group_action.defs
import algebra.group.units
import algebra.group_with_zero
import data.equiv.mul_add
import data.equiv.mul_add_aut
import group_theory.perm.basic
import group_theory.group_action.units

/-!
Expand Down
1 change: 0 additions & 1 deletion src/group_theory/group_action/prod.lean
Expand Up @@ -3,7 +3,6 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Simon Hudon, Patrick Massot, Eric Wieser
-/
import group_theory.group_action.defs
import algebra.group.prod

/-!
Expand Down
7 changes: 1 addition & 6 deletions src/linear_algebra/basic.lean
Expand Up @@ -4,15 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov
-/
import algebra.big_operators.pi
import algebra.module.hom
import algebra.module.pi
import algebra.module.prod
import algebra.module.submodule
import algebra.module.submodule_lattice
import algebra.group.prod
import data.finsupp.basic
import data.dfinsupp
import algebra.pointwise
import data.finsupp.basic
import order.compactly_generated
import order.omega_complete_partial_order

Expand Down
4 changes: 1 addition & 3 deletions src/order/compactly_generated.lean
Expand Up @@ -3,11 +3,9 @@ Copyright (c) 2021 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Oliver Nash
-/
import data.set.finite
import data.finset.order
import order.well_founded
import order.order_iso_nat
import order.atoms
import order.order_iso_nat
import order.zorn
import tactic.tfae

Expand Down
7 changes: 2 additions & 5 deletions src/ring_theory/int/basic.lean
Expand Up @@ -3,11 +3,8 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Jens Wagemaker, Aaron Anderson
-/

import data.int.basic
import data.int.gcd
import ring_theory.multiplicity
import ring_theory.principal_ideal_domain
import ring_theory.coprime
import ring_theory.unique_factorization_domain

/-!
# Divisibility over ℕ and ℤ
Expand Down
2 changes: 1 addition & 1 deletion src/ring_theory/principal_ideal_domain.lean
Expand Up @@ -3,8 +3,8 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Morenikeji Neri
-/
import ring_theory.noetherian
import ring_theory.unique_factorization_domain

/-!
# Principal ideal rings and principal ideal domains
Expand Down

0 comments on commit 3788cbf

Please sign in to comment.