Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
21da9fc
feat: notation for adele rings (#40535)
smmercuri Jul 29, 2026
be4fe8f
fix(LinearAlgebra/Matrix): make accidental private instance public (#…
wwylele Jul 29, 2026
6953887
feat(SetTheory/Cardinal): strong induction on Nat.card for finite typ…
rosborn Jul 29, 2026
e91869b
feat: lemmas about the `smallInductiveDimension` (#40879)
vihdzp Jul 29, 2026
6d8afdb
chore: remove some (triple) underscore soup (#42208)
felixpernegger Jul 29, 2026
7630dcd
chore(AlgebraicTopology/SimplexCategory): delete synthesizable instan…
YaelDillies Jul 29, 2026
53a560f
chore: rename `QuotientAddGroup.mk_out_eq_mul` to `mk_out_eq_add` (#4…
adomani Jul 29, 2026
d160677
chore(Archive): convert to the module system (#42010)
grunweg Jul 29, 2026
e631b64
chore(Combinatorics/SimpleGraph/StronglyRegular): fix statement of `c…
tb65536 Jul 29, 2026
edc39bf
chore(NumberTheory/RamificationInertia/Basic): deprecate file (#41248)
tb65536 Jul 29, 2026
3edb3c0
feat(Algebra/GroupWithZero/WithZero): `toAdd_unzero_eq_log` and simpl…
fbarroero Jul 29, 2026
077102e
feat(LinearAlgebra/Dimension/Free): isomorphic to base ring iff rank …
artie2000 Jul 29, 2026
af3493f
feat(MeasureTheory): prove regular measures have conull support (#41473)
CoolRmal Jul 29, 2026
3069656
feat: `haveI`/`letI` tactic linter (#41657)
JovanGerb Jul 29, 2026
8f845ad
chore: update Mathlib dependencies 2026-07-29 (#42259)
mathlib-update-dependencies[bot] Jul 29, 2026
80a3b5d
chore: address comments from #42114 (#42257)
NoahW314 Jul 29, 2026
ad7bd8f
chore(Analysis/Convex/Continuous): fix proof wanted (#42234)
tb65536 Jul 29, 2026
481daa6
feat(RingTheory/Algebraic): tower law for Module.finrank over domains…
xroblot Jul 30, 2026
ccedd50
chore(CategoryTheory/Monoidal/Cartesian/Over): remove most backward o…
JovanGerb Jul 30, 2026
60af718
fix: increase priority of show elaboration (#42264)
chenson2018 Jul 30, 2026
a765b90
Merge upstream/master@60af7185ec (2026-07-30)
github-actions[bot] Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Archive/Imo/Imo2008Q3.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Imo2008Q3

theorem p_lemma (p : ℕ) (hpp : Nat.Prime p) (hp_mod_4_eq_1 : p ≡ 1 [MOD 4]) (hp_gt_20 : p > 20) :
∃ n : ℕ, p ∣ n ^ 2 + 1 ∧ (p : ℝ) > 2 * n + sqrt (2 * n) := by
haveI := Fact.mk hpp
have := Fact.mk hpp
have hp_mod_4_ne_3 : p % 4 ≠ 3 := by linarith [show p % 4 = 1 from hp_mod_4_eq_1]
obtain ⟨y, hy⟩ := ZMod.exists_sq_eq_neg_one_iff.mpr hp_mod_4_ne_3
let m := ZMod.valMinAbs y
Expand Down
8 changes: 4 additions & 4 deletions Archive/Imo/Imo2019Q2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ theorem A₁_ne_B : cfg.A₁ ≠ cfg.B := by
rw [AffineSubspace.eq_iff_direction_eq_of_mem (left_mem_affineSpan_pair _ _ _)
hwbtw.mem_affineSpan]
exact cfg.PQ_parallel_AB.direction_eq
haveI := someOrientation V
have := someOrientation V
have haQ : (2 : ℤ) • ∡ cfg.C cfg.B cfg.Q = (2 : ℤ) • ∡ cfg.C cfg.B cfg.A := by
rw [Collinear.two_zsmul_oangle_eq_right _ cfg.A_ne_B cfg.Q_ne_B]
rw [Set.pair_comm, Set.insert_comm]
Expand Down Expand Up @@ -389,7 +389,7 @@ end Oriented


theorem not_collinear_QPA₂ : ¬Collinear ℝ ({cfg.Q, cfg.P, cfg.A₂} : Set Pt) := by
haveI := someOrientation V
have := someOrientation V
rw [collinear_iff_of_two_zsmul_oangle_eq cfg.two_zsmul_oangle_QPA₂_eq_two_zsmul_oangle_BAA₂, ←
affineIndependent_iff_not_collinear_set]
have h : Cospherical ({cfg.B, cfg.A, cfg.A₂} : Set Pt) := by
Expand Down Expand Up @@ -515,13 +515,13 @@ end Oriented


theorem not_collinear_CA₂A₁ : ¬Collinear ℝ ({cfg.C, cfg.A₂, cfg.A₁} : Set Pt) := by
haveI := someOrientation V
have := someOrientation V
rw [collinear_iff_of_two_zsmul_oangle_eq cfg.two_zsmul_oangle_CA₂A₁_eq_two_zsmul_oangle_CBA,
Set.pair_comm, Set.insert_comm, Set.pair_comm]
exact cfg.not_collinear_ABC

theorem cospherical_A₁Q₁CA₂ : Cospherical ({cfg.A₁, cfg.Q₁, cfg.C, cfg.A₂} : Set Pt) := by
haveI := someOrientation V
have := someOrientation V
rw [Set.insert_comm cfg.Q₁, Set.insert_comm cfg.A₁, Set.pair_comm, Set.insert_comm cfg.A₁,
Set.pair_comm]
exact cospherical_of_two_zsmul_oangle_eq_of_not_collinear
Expand Down
6 changes: 3 additions & 3 deletions Archive/Wiedijk100Theorems/BallotProblem.lean
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ theorem ballot_problem' :
rw [div_self]
exact Nat.cast_add_one_ne_zero p
· intro q p qp h₁ h₂
haveI := isProbabilityMeasure_uniformOn
have := isProbabilityMeasure_uniformOn
(countedSequence_finite p (q + 1)) (countedSequence_nonempty _ _)
haveI := isProbabilityMeasure_uniformOn
have := isProbabilityMeasure_uniformOn
(countedSequence_finite (p + 1) q) (countedSequence_nonempty _ _)
have h₃ : 0 < p + 1 + (q + 1) := Nat.add_pos_left (Nat.succ_pos _) _
rw [← uniformOn_add_compl_eq {l : List ℤ | l.headI = 1} _ (countedSequence_finite _ _),
Expand All @@ -344,7 +344,7 @@ theorem ballot_problem' :
theorem ballot_problem :
∀ q p, q < p → uniformOn (countedSequence p q) staysPositive = (p - q) / (p + q) := by
intro q p qp
haveI :=
have :=
isProbabilityMeasure_uniformOn (countedSequence_finite p q) (countedSequence_nonempty _ _)
have :
(uniformOn (countedSequence p q) staysPositive).toReal =
Expand Down
2 changes: 1 addition & 1 deletion Archive/Wiedijk100Theorems/CubingACube.lean
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ variable (h v)
direction will intersect one of the neighbouring cubes on the same boundary as `mi`. -/
theorem mi_not_onBoundary (j : Fin n) : ¬OnBoundary (mi_mem_bcubes : mi h v ∈ _) j := by
let i := mi h v; have hi : i ∈ bcubes cs c := mi_mem_bcubes
haveI := h.nontrivial_fin
have := h.nontrivial_fin
rcases exists_ne j with ⟨j', hj'⟩
intro hj
rcases smallest_onBoundary hj with ⟨x, ⟨hx, h2x⟩, h3x⟩
Expand Down
2 changes: 1 addition & 1 deletion Archive/Wiedijk100Theorems/FriendshipGraphs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ theorem false_of_three_le_degree (hd : G.IsRegularOfDegree d) (h : 3 ≤ d) : Fa
have p_dvd_d_pred := (ZMod.natCast_eq_zero_iff _ _).mpr (d - 1).minFac_dvd
have dpos : 1 ≤ d := by lia
have d_cast : ↑(d - 1) = (d : ℤ) - 1 := by norm_cast
haveI : Fact p.Prime := ⟨Nat.minFac_prime (by lia)⟩
have : Fact p.Prime := ⟨Nat.minFac_prime (by lia)⟩
have hp2 : 2 ≤ p := (Fact.out (p := p.Prime)).two_le
have dmod : (d : ZMod p) = 1 := by
rw [← Nat.succ_pred_eq_of_pos dpos, Nat.succ_eq_add_one, Nat.pred_eq_sub_one]
Expand Down
60 changes: 31 additions & 29 deletions Counterexamples.lean
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import Counterexamples.AharoniKorman
import Counterexamples.CanonicallyOrderedCommSemiringTwoMul
import Counterexamples.CharPZeroNeCharZero
import Counterexamples.CliffordAlgebraNotInjective
import Counterexamples.Cyclotomic105
import Counterexamples.DimensionPolynomial
import Counterexamples.DirectSumIsInternal
import Counterexamples.DiscreteTopologyNonDiscreteUniformity
import Counterexamples.EulerSumOfPowers
import Counterexamples.Girard
import Counterexamples.HeawoodUnitDistance
import Counterexamples.HomogeneousPrimeNotPrime
import Counterexamples.InvertibleModuleNotIdeal
import Counterexamples.IrrationalPowerOfIrrational
import Counterexamples.MapFloor
import Counterexamples.MonicNonRegular
import Counterexamples.Motzkin
import Counterexamples.NowhereDifferentiable
import Counterexamples.OrderedCancelAddCommMonoidWithBounds
import Counterexamples.PeanoCurve
import Counterexamples.Phillips
import Counterexamples.PolynomialIsDomain
import Counterexamples.Pseudoelement
import Counterexamples.QuadraticForm
import Counterexamples.SeminormLatticeNotDistrib
import Counterexamples.SeparableNotSecondCountable
import Counterexamples.SorgenfreyLine
import Counterexamples.TopologistsSineCurve
import Counterexamples.ZeroDivisorsInAddMonoidAlgebras
module -- shake: keep-all --deprecated_module: ignore

public import Counterexamples.AharoniKorman
public import Counterexamples.CanonicallyOrderedCommSemiringTwoMul
public import Counterexamples.CharPZeroNeCharZero
public import Counterexamples.CliffordAlgebraNotInjective
public import Counterexamples.Cyclotomic105
public import Counterexamples.DimensionPolynomial
public import Counterexamples.DirectSumIsInternal
public import Counterexamples.DiscreteTopologyNonDiscreteUniformity
public import Counterexamples.EulerSumOfPowers
public import Counterexamples.Girard
public import Counterexamples.HeawoodUnitDistance
public import Counterexamples.HomogeneousPrimeNotPrime
public import Counterexamples.InvertibleModuleNotIdeal
public import Counterexamples.IrrationalPowerOfIrrational
public import Counterexamples.MapFloor
public import Counterexamples.MonicNonRegular
public import Counterexamples.Motzkin
public import Counterexamples.NowhereDifferentiable
public import Counterexamples.OrderedCancelAddCommMonoidWithBounds
public import Counterexamples.PeanoCurve
public import Counterexamples.Phillips
public import Counterexamples.PolynomialIsDomain
public import Counterexamples.Pseudoelement
public import Counterexamples.QuadraticForm
public import Counterexamples.SeminormLatticeNotDistrib
public import Counterexamples.SeparableNotSecondCountable
public import Counterexamples.SorgenfreyLine
public import Counterexamples.TopologistsSineCurve
public import Counterexamples.ZeroDivisorsInAddMonoidAlgebras
16 changes: 10 additions & 6 deletions Counterexamples/AharoniKorman.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ Copyright (c) 2024 Bhavik Mehta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bhavik Mehta
-/
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Field.Rat
import Mathlib.Data.Setoid.Partition
import Mathlib.Order.Filter.AtTopBot.Basic
import Mathlib.Order.Interval.Set.Infinite
import Mathlib.Order.WellFoundedSet
module

public import Mathlib.Algebra.Order.Field.Basic
public import Mathlib.Algebra.Order.Field.Rat
public import Mathlib.Data.Setoid.Partition
public import Mathlib.Order.Filter.AtTopBot.Basic
public import Mathlib.Order.Interval.Set.Infinite
public import Mathlib.Order.WellFoundedSet

/-!
# Disproof of the Aharoni–Korman conjecture
Expand Down Expand Up @@ -67,6 +69,8 @@ aim of reaching a contradiction (as then, no such partition can exist). We may f
we have a contradiction (`no_spinalMap`), and therefore show that no spinal map exists.
-/

@[expose] public section

attribute [aesop 2 simp] Set.subset_def Finset.subset_iff

/-- A type synonym on ℕ³ on which we will construct Hollom's partial order P_5. -/
Expand Down
8 changes: 5 additions & 3 deletions Counterexamples/CanonicallyOrderedCommSemiringTwoMul.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2021 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import Mathlib.Algebra.Ring.Subsemiring.Order
import Mathlib.Data.ZMod.Basic
module

public import Mathlib.Algebra.Ring.Subsemiring.Order
public import Mathlib.Data.ZMod.Basic

/-!
# A canonically ordered commutative semiring where multiplication by 2 is not injective
Expand All @@ -24,7 +26,7 @@ Reference:
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/canonically_ordered.20pathology
-/


@[expose] public section

namespace Counterexample

Expand Down
7 changes: 5 additions & 2 deletions Counterexamples/CharPZeroNeCharZero.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa, Eric Wieser
-/
import Mathlib.Algebra.CharP.Lemmas
import Mathlib.Algebra.Ring.PUnit
module

public import Mathlib.Algebra.CharP.Lemmas
public import Mathlib.Algebra.Ring.PUnit

/-! # `CharP R 0` and `CharZero R` need not coincide for semirings

Expand All @@ -19,6 +21,7 @@ This file shows that there are semirings `R` for which `CharP R 0` holds and `Ch
The example is `{0, 1}` with saturating addition.
-/

@[expose] public section

namespace Counterexample

Expand Down
21 changes: 11 additions & 10 deletions Counterexamples/CliffordAlgebraNotInjective.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
import Mathlib.Algebra.CharP.Pi
import Mathlib.Algebra.CharP.Quotient
import Mathlib.LinearAlgebra.CliffordAlgebra.Contraction
import Mathlib.RingTheory.MvPolynomial.Basic
import Mathlib.RingTheory.MvPolynomial.Ideal
import Mathlib.Tactic.Ring.NamePolyVars
module

public import Mathlib.Algebra.CharP.Pi
public import Mathlib.Algebra.CharP.Quotient
public import Mathlib.LinearAlgebra.CliffordAlgebra.Contraction
public import Mathlib.RingTheory.MvPolynomial.Basic
public import Mathlib.RingTheory.MvPolynomial.Ideal
public import Mathlib.Tactic.Ring.NamePolyVars

/-! # `algebraMap R (CliffordAlgebra Q)` is not always injective.

Expand All @@ -30,10 +32,9 @@ As a bonus result, we also show `BilinMap.not_forall_toQuadraticMap_surjective`:
are quadratic forms that cannot be expressed via even non-symmetric bilinear forms.
-/

noncomputable section
@[expose] public noncomputable section

open LinearMap (BilinForm)
open LinearMap (BilinMap)
open LinearMap (BilinForm BilinMap)

name_poly_vars X, Y, Z over ZMod 2

Expand Down Expand Up @@ -154,7 +155,7 @@ theorem sq_map_add_char_two {ι R : Type*} [CommRing R] [CharP R 2] (i : ι) (a

theorem sq_map_sub_char_two {ι R : Type*} [CommRing R] [CharP R 2] (i : ι) (a b : ι → R) :
sq i (a - b) = sq i a - sq i b := by
haveI : Nonempty ι := ⟨i⟩
have : Nonempty ι := ⟨i⟩
rw [CharTwo.sub_eq_add, CharTwo.sub_eq_add, sq_map_add_char_two]

/-- The quadratic form (metric) is just Euclidean -/
Expand Down
8 changes: 5 additions & 3 deletions Counterexamples/Cyclotomic105.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
import Mathlib.Tactic.NormNum.Prime
module

public import Mathlib.RingTheory.Polynomial.Cyclotomic.Basic
public import Mathlib.Tactic.NormNum.Prime

/-!
# Not all coefficients of cyclotomic polynomials are -1, 0, or 1
Expand All @@ -14,9 +16,9 @@ theorem `not_forall_coeff_cyclotomic_neg_one_zero_one`. We prove this with the c
`coeff_cyclotomic_105 : coeff (cyclotomic 105 ℤ) 7 = -2`.
-/

@[expose] public section

open Nat (properDivisors)

open Finset

namespace Counterexample
Expand Down
12 changes: 8 additions & 4 deletions Counterexamples/DimensionPolynomial.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Copyright (c) 2025 Jingting Wang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jingting Wang
-/
import Mathlib.RingTheory.KrullDimension.Polynomial
import Mathlib.RingTheory.KrullDimension.LocalRing
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.PowerSeries.Inverse
module

public import Mathlib.RingTheory.KrullDimension.Polynomial
public import Mathlib.RingTheory.KrullDimension.LocalRing
public import Mathlib.FieldTheory.RatFunc.AsPolynomial
public import Mathlib.RingTheory.PowerSeries.Inverse

/-!
# Krull dimension of polynomial ring
Expand All @@ -22,6 +24,8 @@ We define the commutative ring `A` as `{f ∈ k(t)⟦Y⟧ | f(0) ∈ k}` for a f
<https://math.stackexchange.com/questions/1267419/examples-of-rings-whose-polynomial-rings-have-large-dimension>
-/

@[expose] public section

namespace Counterexample

namespace DimensionPolynomial
Expand Down
12 changes: 8 additions & 4 deletions Counterexamples/DirectSumIsInternal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser, Kevin Buzzard
-/
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Group.ConjFinite
import Mathlib.Data.Fintype.Lattice
import Mathlib.Tactic.FinCases
module

public import Mathlib.Algebra.DirectSum.Module
public import Mathlib.Algebra.Group.ConjFinite
public import Mathlib.Data.Fintype.Lattice
public import Mathlib.Tactic.FinCases

/-!
# Not all complementary decompositions of a module over a semiring make up a direct sum
Expand All @@ -19,6 +21,8 @@ This file demonstrates why `DirectSum.isInternal_submodule_of_iSupIndep_of_iSup_
take `Ring R` and not `Semiring R`.
-/

public section

namespace Counterexample

theorem UnitsInt.one_ne_neg_one : (1 : ℤˣ) ≠ -1 := by decide
Expand Down
6 changes: 5 additions & 1 deletion Counterexamples/DiscreteTopologyNonDiscreteUniformity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2024 Filippo A. E. Nuccio. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Filippo A. E. Nuccio
-/
import Mathlib.Analysis.SpecificLimits.Basic
module

public import Mathlib.Analysis.SpecificLimits.Basic

/-!
# Discrete uniformities and discrete topology
Expand Down Expand Up @@ -75,6 +77,8 @@ inequality) to explicit subsets, many proofs are easily closed by `aesop` or `om
* [N. Bourbaki, *General Topology*, Chapter II][bourbaki1966]
-/

@[expose] public section

open Set Function Filter Metric

/- We remove the "usual" instances of (discrete) topological space and of (discrete) uniform space
Expand Down
5 changes: 4 additions & 1 deletion Counterexamples/EulerSumOfPowers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Copyright (c) 2025 Snir Broshi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Snir Broshi, Michael Stoll
-/
import Mathlib.NumberTheory.FLT.Three
module

public import Mathlib.NumberTheory.FLT.Three

/-!
# Euler's sum of powers conjecture
Expand All @@ -27,6 +29,7 @@ http://euler.free.fr/
https://www.ams.org/journals/mcom/1988-51-184/S0025-5718-1988-0930224-9/S0025-5718-1988-0930224-9.pdf
-/

@[expose] public section

namespace Counterexample

Expand Down
7 changes: 5 additions & 2 deletions Counterexamples/Girard.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Copyright (c) 2021 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Logic.Basic
import Mathlib.Data.Set.Defs
module

public import Mathlib.Logic.Basic
public import Mathlib.Data.Set.Defs

/-!
# Girard's paradox
Expand All @@ -25,6 +27,7 @@ Based on Watkins' LF implementation of Hurkens' simplification of Girard's parad
* `girard`: there are no Girard universes.
-/

@[expose] public section

namespace Counterexample

Expand Down
Loading
Loading