Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into adomani/slimmer_min…
Browse files Browse the repository at this point in the history
…_imports
  • Loading branch information
adomani committed Nov 5, 2024
2 parents 2c6366b + 426be0c commit 62a792b
Show file tree
Hide file tree
Showing 203 changed files with 4,716 additions and 1,825 deletions.
2 changes: 1 addition & 1 deletion .github/build.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ jobs:
BUILD_OUTCOME: ${{ steps.build.outcome }}
NOISY_OUTCOME: ${{ steps.noisy.outcome }}
ARCHIVE_OUTCOME: ${{ steps.archive.outcome }}
COUNTEREXAMPLE_OUTCOME: ${{ steps.counterexamples.outcome }}
COUNTEREXAMPLES_OUTCOME: ${{ steps.counterexamples.outcome }}
LINT_OUTCOME: ${{ steps.lint.outcome }}
TEST_OUTCOME: ${{ steps.test.outcome }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
BUILD_OUTCOME: ${{ steps.build.outcome }}
NOISY_OUTCOME: ${{ steps.noisy.outcome }}
ARCHIVE_OUTCOME: ${{ steps.archive.outcome }}
COUNTEREXAMPLE_OUTCOME: ${{ steps.counterexamples.outcome }}
COUNTEREXAMPLES_OUTCOME: ${{ steps.counterexamples.outcome }}
LINT_OUTCOME: ${{ steps.lint.outcome }}
TEST_OUTCOME: ${{ steps.test.outcome }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
BUILD_OUTCOME: ${{ steps.build.outcome }}
NOISY_OUTCOME: ${{ steps.noisy.outcome }}
ARCHIVE_OUTCOME: ${{ steps.archive.outcome }}
COUNTEREXAMPLE_OUTCOME: ${{ steps.counterexamples.outcome }}
COUNTEREXAMPLES_OUTCOME: ${{ steps.counterexamples.outcome }}
LINT_OUTCOME: ${{ steps.lint.outcome }}
TEST_OUTCOME: ${{ steps.test.outcome }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
BUILD_OUTCOME: ${{ steps.build.outcome }}
NOISY_OUTCOME: ${{ steps.noisy.outcome }}
ARCHIVE_OUTCOME: ${{ steps.archive.outcome }}
COUNTEREXAMPLE_OUTCOME: ${{ steps.counterexamples.outcome }}
COUNTEREXAMPLES_OUTCOME: ${{ steps.counterexamples.outcome }}
LINT_OUTCOME: ${{ steps.lint.outcome }}
TEST_OUTCOME: ${{ steps.test.outcome }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo2011Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Alain Verberkmoes
-/
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Ring.Divisibility.Basic
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs

/-!
# IMO 2011 Q5
Expand Down
1 change: 1 addition & 0 deletions Cache/IO.lean
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ private def CacheM.getContext : IO CacheM.Context := do
("Mathlib", root),
("Archive", root),
("Counterexamples", root),
("MathlibTest", root),
("Aesop", LAKEPACKAGESDIR / "aesop"),
("Batteries", LAKEPACKAGESDIR / "batteries"),
("Cli", LAKEPACKAGESDIR / "Cli"),
Expand Down
21 changes: 20 additions & 1 deletion Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import Mathlib.Algebra.BigOperators.Ring.List
import Mathlib.Algebra.BigOperators.Ring.Multiset
import Mathlib.Algebra.BigOperators.Ring.Nat
import Mathlib.Algebra.BigOperators.RingEquiv
import Mathlib.Algebra.BigOperators.Sym
import Mathlib.Algebra.BigOperators.WithTop
import Mathlib.Algebra.Category.AlgebraCat.Basic
import Mathlib.Algebra.Category.AlgebraCat.Limits
Expand Down Expand Up @@ -148,6 +149,7 @@ import Mathlib.Algebra.Category.Ring.Constructions
import Mathlib.Algebra.Category.Ring.FilteredColimits
import Mathlib.Algebra.Category.Ring.Instances
import Mathlib.Algebra.Category.Ring.Limits
import Mathlib.Algebra.Category.Ring.LinearAlgebra
import Mathlib.Algebra.Category.Semigrp.Basic
import Mathlib.Algebra.Central.Basic
import Mathlib.Algebra.Central.Defs
Expand Down Expand Up @@ -818,7 +820,9 @@ import Mathlib.Algebra.Ring.Hom.Defs
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.Algebra.Ring.Identities
import Mathlib.Algebra.Ring.InjSurj
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs
import Mathlib.Algebra.Ring.Int.Parity
import Mathlib.Algebra.Ring.Int.Units
import Mathlib.Algebra.Ring.Invertible
import Mathlib.Algebra.Ring.MinimalAxioms
import Mathlib.Algebra.Ring.Nat
Expand All @@ -834,6 +838,7 @@ import Mathlib.Algebra.Ring.Regular
import Mathlib.Algebra.Ring.Semiconj
import Mathlib.Algebra.Ring.Semireal.Defs
import Mathlib.Algebra.Ring.Subring.Basic
import Mathlib.Algebra.Ring.Subring.Defs
import Mathlib.Algebra.Ring.Subring.IntPolynomial
import Mathlib.Algebra.Ring.Subring.MulOpposite
import Mathlib.Algebra.Ring.Subring.Order
Expand Down Expand Up @@ -931,6 +936,7 @@ import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Scheme
import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf
import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Topology
import Mathlib.AlgebraicGeometry.Properties
import Mathlib.AlgebraicGeometry.PullbackCarrier
import Mathlib.AlgebraicGeometry.Pullbacks
import Mathlib.AlgebraicGeometry.RationalMap
import Mathlib.AlgebraicGeometry.ResidueField
Expand Down Expand Up @@ -1054,6 +1060,7 @@ import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.ContDiff.Bounds
import Mathlib.Analysis.Calculus.ContDiff.Defs
import Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries
import Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno
import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension
import Mathlib.Analysis.Calculus.ContDiff.RCLike
import Mathlib.Analysis.Calculus.ContDiff.WithLp
Expand Down Expand Up @@ -2064,6 +2071,7 @@ import Mathlib.Combinatorics.Derangements.Basic
import Mathlib.Combinatorics.Derangements.Exponential
import Mathlib.Combinatorics.Derangements.Finite
import Mathlib.Combinatorics.Digraph.Basic
import Mathlib.Combinatorics.Digraph.Orientation
import Mathlib.Combinatorics.Enumerative.Catalan
import Mathlib.Combinatorics.Enumerative.Composition
import Mathlib.Combinatorics.Enumerative.DoubleCounting
Expand Down Expand Up @@ -2139,6 +2147,7 @@ import Mathlib.Combinatorics.SimpleGraph.Regularity.Lemma
import Mathlib.Combinatorics.SimpleGraph.Regularity.Uniform
import Mathlib.Combinatorics.SimpleGraph.StronglyRegular
import Mathlib.Combinatorics.SimpleGraph.Subgraph
import Mathlib.Combinatorics.SimpleGraph.Sum
import Mathlib.Combinatorics.SimpleGraph.Trails
import Mathlib.Combinatorics.SimpleGraph.Triangle.Basic
import Mathlib.Combinatorics.SimpleGraph.Triangle.Counting
Expand Down Expand Up @@ -2464,6 +2473,7 @@ import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.CharP
import Mathlib.Data.Matrix.ColumnRowPartitioned
import Mathlib.Data.Matrix.Composition
import Mathlib.Data.Matrix.ConjTranspose
import Mathlib.Data.Matrix.DMatrix
import Mathlib.Data.Matrix.DoublyStochastic
import Mathlib.Data.Matrix.DualNumber
Expand Down Expand Up @@ -3186,6 +3196,7 @@ import Mathlib.LinearAlgebra.Matrix.Charpoly.Univ
import Mathlib.LinearAlgebra.Matrix.Circulant
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Matrix.Determinant.Misc
import Mathlib.LinearAlgebra.Matrix.Determinant.TotallyUnimodular
import Mathlib.LinearAlgebra.Matrix.Diagonal
import Mathlib.LinearAlgebra.Matrix.DotProduct
import Mathlib.LinearAlgebra.Matrix.Dual
Expand Down Expand Up @@ -4139,7 +4150,9 @@ import Mathlib.RingTheory.LinearDisjoint
import Mathlib.RingTheory.LittleWedderburn
import Mathlib.RingTheory.LocalProperties.Basic
import Mathlib.RingTheory.LocalProperties.IntegrallyClosed
import Mathlib.RingTheory.LocalProperties.Projective
import Mathlib.RingTheory.LocalProperties.Reduced
import Mathlib.RingTheory.LocalProperties.Submodule
import Mathlib.RingTheory.LocalRing.Basic
import Mathlib.RingTheory.LocalRing.Defs
import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic
Expand Down Expand Up @@ -4175,6 +4188,7 @@ import Mathlib.RingTheory.MatrixAlgebra
import Mathlib.RingTheory.MaximalSpectrum
import Mathlib.RingTheory.Multiplicity
import Mathlib.RingTheory.MvPolynomial.Basic
import Mathlib.RingTheory.MvPolynomial.FreeCommRing
import Mathlib.RingTheory.MvPolynomial.Homogeneous
import Mathlib.RingTheory.MvPolynomial.Ideal
import Mathlib.RingTheory.MvPolynomial.Localization
Expand Down Expand Up @@ -4275,6 +4289,8 @@ import Mathlib.RingTheory.Smooth.StandardSmooth
import Mathlib.RingTheory.Support
import Mathlib.RingTheory.SurjectiveOnStalks
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.RingTheory.TensorProduct.Finite
import Mathlib.RingTheory.TensorProduct.Free
import Mathlib.RingTheory.TensorProduct.MvPolynomial
import Mathlib.RingTheory.Trace.Basic
import Mathlib.RingTheory.Trace.Defs
Expand Down Expand Up @@ -4816,10 +4832,13 @@ import Mathlib.Topology.ContinuousMap.CompactlySupported
import Mathlib.Topology.ContinuousMap.ContinuousMapZero
import Mathlib.Topology.ContinuousMap.Defs
import Mathlib.Topology.ContinuousMap.Ideals
import Mathlib.Topology.ContinuousMap.Lattice
import Mathlib.Topology.ContinuousMap.LocallyConstant
import Mathlib.Topology.ContinuousMap.Ordered
import Mathlib.Topology.ContinuousMap.Periodic
import Mathlib.Topology.ContinuousMap.Polynomial
import Mathlib.Topology.ContinuousMap.Sigma
import Mathlib.Topology.ContinuousMap.Star
import Mathlib.Topology.ContinuousMap.StarOrdered
import Mathlib.Topology.ContinuousMap.StoneWeierstrass
import Mathlib.Topology.ContinuousMap.T0Sierpinski
Expand Down
4 changes: 0 additions & 4 deletions Mathlib/Algebra/Algebra/Operations.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.Algebra.Algebra.Bilinear
import Mathlib.Algebra.Algebra.Equiv
import Mathlib.Algebra.Algebra.Opposite
import Mathlib.Algebra.Group.Pointwise.Finset.Basic
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Module.Opposite
import Mathlib.Algebra.Module.Submodule.Bilinear
import Mathlib.Algebra.Module.Submodule.Pointwise
import Mathlib.Algebra.Order.Kleene
import Mathlib.Data.Set.Pointwise.BigOperators
import Mathlib.Data.Set.Semiring
import Mathlib.GroupTheory.GroupAction.SubMulAction.Pointwise
Expand Down
13 changes: 0 additions & 13 deletions Mathlib/Algebra/BigOperators/Group/Finset.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Authors: Johannes Hölzl
import Mathlib.Algebra.Group.Indicator
import Mathlib.Data.Finset.Piecewise
import Mathlib.Data.Finset.Preimage
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Sym.Sym2.Order

/-!
# Big operators
Expand Down Expand Up @@ -2257,15 +2255,4 @@ theorem toAdd_prod (s : Finset ι) (f : ι → Multiplicative α) :

end AddCommMonoid

theorem Finset.sum_sym2_filter_not_isDiag {ι α} [LinearOrder ι] [AddCommMonoid α]
(s : Finset ι) (p : Sym2 ι → α) :
∑ i ∈ s.sym2 with ¬ i.IsDiag, p i = ∑ i ∈ s.offDiag with i.1 < i.2, p s(i.1, i.2) := by
rw [Finset.offDiag_filter_lt_eq_filter_le]
conv_rhs => rw [← Finset.sum_subtype_eq_sum_filter]
refine (Finset.sum_equiv Sym2.sortEquiv.symm ?_ ?_).symm
· rintro ⟨⟨i₁, j₁⟩, hij₁⟩
simp [and_assoc]
· rintro ⟨⟨i₁, j₁⟩, hij₁⟩
simp

set_option linter.style.longFile 2400
11 changes: 4 additions & 7 deletions Mathlib/Algebra/BigOperators/Group/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ Authors: Johannes Hölzl, Floris van Doorn, Sébastien Gouëzel, Alex J. Best
-/
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.Group.Nat
import Mathlib.Algebra.Group.Opposite
import Mathlib.Algebra.Group.Units.Basic
import Mathlib.Data.List.Dedup
import Mathlib.Data.List.Join
import Mathlib.Data.List.Pairwise
import Mathlib.Data.List.Perm.Basic
import Mathlib.Data.List.ProdSigma
import Mathlib.Data.List.Range
import Mathlib.Data.List.Rotate
import Mathlib.Data.List.Pairwise
import Mathlib.Data.List.Join
import Mathlib.Data.List.Dedup
import Mathlib.Data.List.Perm.Basic

/-!
# Sums and products from lists
Expand Down
23 changes: 23 additions & 0 deletions Mathlib/Algebra/BigOperators/Sym.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/-
Copyright (c) 2024 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Sym.Sym2.Order

/-!
# Lemmas on `Finset.sum` and `Finset.prod` involving `Finset.sym2`
-/

theorem Finset.sum_sym2_filter_not_isDiag {ι α} [LinearOrder ι] [AddCommMonoid α]
(s : Finset ι) (p : Sym2 ι → α) :
∑ i ∈ s.sym2 with ¬ i.IsDiag, p i = ∑ i ∈ s.offDiag with i.1 < i.2, p s(i.1, i.2) := by
rw [Finset.offDiag_filter_lt_eq_filter_le]
conv_rhs => rw [← Finset.sum_subtype_eq_sum_filter]
refine (Finset.sum_equiv Sym2.sortEquiv.symm ?_ ?_).symm
· rintro ⟨⟨i₁, j₁⟩, hij₁⟩
simp [and_assoc]
· rintro ⟨⟨i₁, j₁⟩, hij₁⟩
simp
5 changes: 2 additions & 3 deletions Mathlib/Algebra/Category/Ring/Constructions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ Copyright (c) 2021 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
-/
import Mathlib.RingTheory.TensorProduct.Basic
import Mathlib.Algebra.Category.Ring.Limits
import Mathlib.Algebra.Category.Ring.Instances
import Mathlib.Algebra.Category.Ring.Limits
import Mathlib.CategoryTheory.Limits.Shapes.StrictInitial
import Mathlib.Algebra.Ring.Subring.Basic
import Mathlib.RingTheory.TensorProduct.Basic

/-!
# Constructions of (co)limits in `CommRingCat`
Expand Down
38 changes: 38 additions & 0 deletions Mathlib/Algebra/Category/Ring/LinearAlgebra.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/-
Copyright (c) 2024 Christian Merten. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Christian Merten
-/
import Mathlib.Algebra.Category.Ring.Constructions
import Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.RingTheory.Flat.FaithfullyFlat

/-!
# Results on the category of rings requiring linear algebra
## Results
- `CommRingCat.nontrivial_of_isPushout_of_isField`: the pushout of non-trivial rings over a field
is non-trivial.
-/

universe u

open CategoryTheory Limits TensorProduct

namespace CommRingCat

lemma nontrivial_of_isPushout_of_isField {A B C D : CommRingCat.{u}}
(hA : IsField A) {f : A ⟶ B} {g : A ⟶ C} {inl : B ⟶ D} {inr : C ⟶ D}
[Nontrivial B] [Nontrivial C]
(h : IsPushout f g inl inr) : Nontrivial D := by
letI : Field A := hA.toField
algebraize [RingHomClass.toRingHom f, RingHomClass.toRingHom g]
let e : D ≅ .of (B ⊗[A] C) :=
IsColimit.coconePointUniqueUpToIso h.isColimit (CommRingCat.pushoutCoconeIsColimit A B C)
let e' : D ≃ B ⊗[A] C := e.commRingCatIsoToRingEquiv.toEquiv
exact e'.nontrivial

end CommRingCat
2 changes: 1 addition & 1 deletion Mathlib/Algebra/CharP/Subring.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.Algebra.CharP.Defs
import Mathlib.Algebra.Ring.Subring.Basic
import Mathlib.Algebra.Ring.Subring.Defs

/-!
# Characteristic of subrings
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Algebra/EuclideanDomain/Int.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Authors: Louis Carlin, Mario Carneiro
-/
import Mathlib.Algebra.EuclideanDomain.Defs
import Mathlib.Algebra.Order.Group.Unbundled.Int
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs
import Mathlib.Algebra.Ring.Nat

/-!
# Instances for Euclidean domains
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Field/Power.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Robert Y. Lewis, Leonardo de Moura, Johannes Hölzl, Mario Carneiro
-/
import Mathlib.Algebra.Field.Defs
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Parity

/-!
# Results about powers in fields or division rings.
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/GCDMonoid/Nat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Johannes Hölzl, Jens Wagemaker, Aaron Anderson
-/
import Mathlib.Algebra.GCDMonoid.Basic
import Mathlib.Algebra.Order.Group.Unbundled.Int
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Units
import Mathlib.Data.Int.GCD

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/NatPowAssoc.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Carnahan
-/
import Mathlib.Algebra.Group.Action.Prod
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs
import Mathlib.Data.Nat.Cast.Basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Submonoid/Membership.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Mathlib.Algebra.FreeMonoid.Basic
import Mathlib.Algebra.Group.Submonoid.MulOpposite
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Algebra.GroupWithZero.Divisibility
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs
import Mathlib.Data.Finset.NoncommProd
import Mathlib.Data.Nat.Cast.Basic
import Mathlib.Util.AssertExists
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Homology/Embedding/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Joël Riou
-/
import Mathlib.Algebra.Homology.ComplexShape
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Algebra.Ring.Int
import Mathlib.Algebra.Ring.Int.Defs

/-! # Embeddings of complex shapes
Expand Down
Loading

0 comments on commit 62a792b

Please sign in to comment.