Skip to content

Commit

Permalink
refactor(data/fintype/basic): split file (#17578)
Browse files Browse the repository at this point in the history


Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
  • Loading branch information
semorrison and semorrison committed Nov 18, 2022
1 parent 7f96363 commit c3019c7
Show file tree
Hide file tree
Showing 90 changed files with 2,122 additions and 1,796 deletions.
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2020 Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bhavik Mehta
-/
import data.fintype.basic
import data.fintype.powerset

/-!
# Erdős–Szekeres theorem
Expand Down
4 changes: 3 additions & 1 deletion archive/imo/imo1987_q1.lean
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import data.fintype.card
import data.fintype.big_operators
import data.fintype.perm
import data.fintype.prod
import dynamics.fixed_points.basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion archive/imo/imo1994_q1.lean
Expand Up @@ -5,7 +5,7 @@ Authors: Antoine Labelle
-/
import algebra.big_operators.basic
import algebra.big_operators.order
import data.fintype.card
import data.fintype.big_operators
import data.finset.sort
import data.fin.interval
import tactic.linarith
Expand Down
14 changes: 11 additions & 3 deletions src/algebra/big_operators/basic.lean
Expand Up @@ -7,9 +7,11 @@ Authors: Johannes Hölzl
import algebra.group.pi
import algebra.hom.equiv.basic
import algebra.ring.opposite
import data.finset.fold
import data.fintype.basic
import data.set.pairwise
import data.finset.sum
import data.fintype.basic
import data.finset.sigma
import algebra.group_power.lemmas

/-!
# Big operators
Expand Down Expand Up @@ -1414,7 +1416,13 @@ end
@[simp]
lemma sum_boole {s : finset α} {p : α → Prop} [non_assoc_semiring β] {hp : decidable_pred p} :
(∑ x in s, if p x then (1 : β) else (0 : β)) = (s.filter p).card :=
by simp [sum_ite]
by simp only [add_zero,
mul_one,
finset.sum_const,
nsmul_eq_mul,
eq_self_iff_true,
finset.sum_const_zero,
finset.sum_ite]

lemma _root_.commute.sum_right [non_unital_non_assoc_semiring β] (s : finset α)
(f : α → β) (b : β) (h : ∀ i ∈ s, commute b (f i)) :
Expand Down
2 changes: 1 addition & 1 deletion src/algebra/big_operators/fin.lean
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2020 Yury Kudryashov, Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov, Anne Baanen
-/
import data.fintype.card
import data.fintype.big_operators
import data.fintype.fin
import logic.equiv.fin

Expand Down
2 changes: 2 additions & 0 deletions src/algebra/big_operators/pi.lean
Expand Up @@ -3,6 +3,8 @@ 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 data.fintype.card
import algebra.group.prod
import algebra.big_operators.basic
import algebra.ring.pi

Expand Down
3 changes: 2 additions & 1 deletion src/algebra/char_zero.lean
Expand Up @@ -5,7 +5,8 @@ Authors: Mario Carneiro
-/

import data.nat.cast.field
import data.fintype.basic
import data.fintype.lattice
import algebra.group_power.lemmas

/-!
# Characteristic zero (additional theorems)
Expand Down
1 change: 1 addition & 0 deletions src/algebra/group/conj.lean
Expand Up @@ -8,6 +8,7 @@ import algebra.group_with_zero.basic
import algebra.hom.aut
import algebra.hom.group
import data.finite.basic
import data.fintype.units

/-!
# Conjugacy of group elements
Expand Down
2 changes: 1 addition & 1 deletion src/algebra/order/field/pi.lean
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import algebra.order.field.basic
import data.fintype.basic
import data.fintype.lattice

/-!
# Lemmas about (finite domain) functions into fields.
Expand Down
1 change: 1 addition & 0 deletions src/algebra/order/field/power.lean
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2014 Robert Lewis. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn
-/
import algebra.parity
import algebra.char_zero
import algebra.group_with_zero.power
import algebra.order.field.basic
Expand Down
1 change: 1 addition & 0 deletions src/algebra/order/nonneg/ring.lean
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2021 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
-/
import data.nat.cast.basic
import algebra.order.ring.defs
import algebra.order.ring.inj_surj
import order.complete_lattice_intervals
Expand Down
1 change: 1 addition & 0 deletions src/algebra/ring/fin.lean
Expand Up @@ -5,6 +5,7 @@ Authors: Anne Baanen
-/
import logic.equiv.fin
import algebra.ring.equiv
import algebra.group.prod

/-!
# Rings and `fin`
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/complex/upper_half_plane/basic.lean
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2021 Alex Kontorovich and Heather Macbeth and Marc Masdeu. All rig
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Alex Kontorovich, Heather Macbeth, Marc Masdeu
-/

import data.fintype.parity
import linear_algebra.special_linear_group
import analysis.complex.basic
import group_theory.group_action.defs
Expand Down
2 changes: 1 addition & 1 deletion src/category_theory/Fintype.lean
Expand Up @@ -8,7 +8,7 @@ import category_theory.concrete_category.basic
import category_theory.full_subcategory
import category_theory.skeletal
import category_theory.elementwise
import data.fintype.basic
import data.fintype.card

/-!
# The category of finite types.
Expand Down
1 change: 1 addition & 0 deletions src/category_theory/enriched/basic.lean
Expand Up @@ -5,6 +5,7 @@ Authors: Scott Morrison
-/
import category_theory.monoidal.types
import category_theory.monoidal.center
import tactic.apply_fun

/-!
# Enriched categories
Expand Down
2 changes: 1 addition & 1 deletion src/category_theory/fin_category.lean
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
import data.fintype.basic
import data.fintype.card
import category_theory.discrete_category
import category_theory.opposites
import category_theory.category.ulift
Expand Down
1 change: 1 addition & 0 deletions src/category_theory/limits/concrete_category.lean
Expand Up @@ -9,6 +9,7 @@ import category_theory.limits.shapes.wide_pullbacks
import category_theory.limits.shapes.multiequalizer
import category_theory.concrete_category.basic
import category_theory.limits.shapes.kernels
import tactic.apply_fun

/-!
# Facts about (co)limits of functors into concrete categories
Expand Down
Expand Up @@ -3,6 +3,8 @@ Copyright (c) 2020 Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bhavik Mehta, Scott Morrison
-/
import data.fintype.prod
import data.fintype.sigma
import category_theory.limits.shapes.equalizers
import category_theory.limits.shapes.finite_products
import category_theory.limits.preserves.shapes.products
Expand Down
1 change: 1 addition & 0 deletions src/category_theory/limits/lattice.lean
Expand Up @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison, Justus Springer
-/
import order.complete_lattice
import data.fintype.lattice
import category_theory.limits.shapes.pullbacks
import category_theory.category.preorder
import category_theory.limits.shapes.products
Expand Down
2 changes: 1 addition & 1 deletion src/category_theory/limits/shapes/finite_limits.lean
Expand Up @@ -8,7 +8,7 @@ import category_theory.limits.shapes.binary_products
import category_theory.limits.shapes.equalizers
import category_theory.limits.shapes.wide_pullbacks
import category_theory.limits.shapes.pullbacks
import data.fintype.basic
import data.fintype.option

/-!
# Categories with finite limits.
Expand Down
2 changes: 1 addition & 1 deletion src/combinatorics/configuration.lean
Expand Up @@ -5,7 +5,7 @@ Authors: Thomas Browning
-/
import algebra.big_operators.order
import combinatorics.hall.basic
import data.fintype.card
import data.fintype.big_operators
import set_theory.cardinal.finite

/-!
Expand Down
2 changes: 1 addition & 1 deletion src/combinatorics/derangements/finite.lean
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Henry Swanson
-/
import combinatorics.derangements.basic
import data.fintype.card
import data.fintype.big_operators
import tactic.delta_instance
import tactic.ring

Expand Down
4 changes: 3 additions & 1 deletion src/combinatorics/hales_jewett.lean
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2021 David Wärn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Wärn
-/
import data.fintype.basic
import data.fintype.option
import data.fintype.pi
import data.fintype.sum
import algebra.big_operators.basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion src/combinatorics/set_family/harris_kleitman.lean
Expand Up @@ -5,7 +5,7 @@ Authors: Yaël Dillies
-/
import combinatorics.set_family.compression.down
import order.upper_lower
import data.fintype.card
import data.fintype.big_operators

/-!
# Harris-Kleitman inequality
Expand Down
2 changes: 1 addition & 1 deletion src/combinatorics/set_family/intersecting.lean
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import data.fintype.basic
import data.fintype.card
import order.upper_lower

/-!
Expand Down
2 changes: 1 addition & 1 deletion src/computability/DFA.lean
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fox Thomson
-/

import data.fintype.basic
import data.fintype.card
import computability.language
import tactic.norm_num

Expand Down
1 change: 1 addition & 0 deletions src/computability/NFA.lean
Expand Up @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fox Thomson
-/
import computability.DFA
import data.fintype.powerset

/-!
# Nondeterministic Finite Automata
Expand Down
5 changes: 4 additions & 1 deletion src/computability/turing_machine.lean
Expand Up @@ -3,7 +3,10 @@ Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import data.fintype.basic
import data.fintype.option
import data.fintype.prod
import data.fintype.pi
import data.vector.basic
import data.pfun
import logic.function.iterate
import order.basic
Expand Down
2 changes: 1 addition & 1 deletion src/data/dfinsupp/interval.lean
Expand Up @@ -5,7 +5,7 @@ Authors: Yaël Dillies
-/
import data.finset.locally_finite
import data.finset.pointwise
import data.fintype.card
import data.fintype.big_operators
import data.dfinsupp.order

/-!
Expand Down
1 change: 1 addition & 0 deletions src/data/fin/tuple/bubble_sort_induction.lean
Expand Up @@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Michael Stoll
-/
import data.fin.tuple.sort
import data.fintype.perm
import order.well_founded

/-!
Expand Down
1 change: 1 addition & 0 deletions src/data/fin/tuple/sort.lean
Expand Up @@ -7,6 +7,7 @@ Authors: Kyle Miller
import data.fin.basic
import data.finset.sort
import data.prod.lex
import group_theory.perm.basic

/-!
Expand Down
6 changes: 5 additions & 1 deletion src/data/finite/basic.lean
Expand Up @@ -3,7 +3,11 @@ Copyright (c) 2022 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
import data.fintype.basic
import data.fintype.powerset
import data.fintype.prod
import data.fintype.sigma
import data.fintype.sum
import data.fintype.vector

/-!
# Finite types
Expand Down
2 changes: 1 addition & 1 deletion src/data/finite/set.lean
Expand Up @@ -3,7 +3,7 @@ Copyright (c) 2022 Kyle Miller. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kyle Miller
-/
import data.fintype.basic
import data.fintype.card

/-!
# Lemmas about `finite` and `set`s
Expand Down
2 changes: 1 addition & 1 deletion src/data/finset/finsupp.lean
Expand Up @@ -6,7 +6,7 @@ Authors: Yaël Dillies
import algebra.big_operators.finsupp
import data.finset.pointwise
import data.finsupp.indicator
import data.fintype.card
import data.fintype.big_operators

/-!
# Finitely supported product of finsets
Expand Down
1 change: 1 addition & 0 deletions src/data/finset/noncomm_prod.lean
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2021 Yakov Pechersky. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yakov Pechersky
-/
import data.fintype.card
import algebra.hom.commute
import algebra.big_operators.basic

Expand Down
3 changes: 2 additions & 1 deletion src/data/finset/pi_induction.lean
Expand Up @@ -3,7 +3,8 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import data.fintype.basic
import data.fintype.lattice
import data.finset.sigma

/-!
# Induction principles for `Π i, finset (α i)`
Expand Down
2 changes: 1 addition & 1 deletion src/data/finset/sort.lean
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import order.rel_iso.set
import data.fintype.basic
import data.fintype.lattice
import data.multiset.sort
import data.list.nodup_equiv_fin

Expand Down
3 changes: 2 additions & 1 deletion src/data/finset/sym.lean
Expand Up @@ -3,7 +3,8 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import data.finset.prod
import data.fintype.prod
import data.fintype.vector
import data.sym.sym2

/-!
Expand Down

0 comments on commit c3019c7

Please sign in to comment.