Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 Counterexamples/Girard.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.Basic.Logic.Basic
import Mathlib.Data.Set.Defs

/-!
Expand Down
24 changes: 12 additions & 12 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,18 @@ public import Mathlib.Analysis.SumIntegralComparisons
public import Mathlib.Analysis.SumIntegralExpDecay
public import Mathlib.Analysis.SumOverResidueClass
public import Mathlib.Analysis.VonNeumannAlgebra.Basic
public import Mathlib.Basic.Denumerable
public import Mathlib.Basic.ExistsUnique
public import Mathlib.Basic.IsEmpty
public import Mathlib.Basic.IsEmpty.Basic
public import Mathlib.Basic.IsEmpty.Defs
public import Mathlib.Basic.Logic.Basic
public import Mathlib.Basic.Logic.Lemmas
public import Mathlib.Basic.Nonempty
public import Mathlib.Basic.Nontrivial.Basic
public import Mathlib.Basic.Nontrivial.Defs
public import Mathlib.Basic.Unique
public import Mathlib.Basic.UnivLE
public import Mathlib.CategoryTheory.Abelian.Basic
public import Mathlib.CategoryTheory.Abelian.CommSq
public import Mathlib.CategoryTheory.Abelian.DiagramLemmas.Four
Expand Down Expand Up @@ -5300,8 +5312,6 @@ public import Mathlib.LinearAlgebra.Transvection.Basic
public import Mathlib.LinearAlgebra.Transvection.Generation
public import Mathlib.LinearAlgebra.UnitaryGroup
public import Mathlib.LinearAlgebra.Vandermonde
public import Mathlib.Logic.Basic
public import Mathlib.Logic.Denumerable
public import Mathlib.Logic.Embedding.Basic
public import Mathlib.Logic.Embedding.Set
public import Mathlib.Logic.Encodable.Basic
Expand All @@ -5326,7 +5336,6 @@ public import Mathlib.Logic.Equiv.PartialEquiv
public import Mathlib.Logic.Equiv.Prod
public import Mathlib.Logic.Equiv.Set
public import Mathlib.Logic.Equiv.Sum
public import Mathlib.Logic.ExistsUnique
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.Function.Coequalizer
public import Mathlib.Logic.Function.CompTypeclasses
Expand All @@ -5340,13 +5349,6 @@ public import Mathlib.Logic.Function.OfArity
public import Mathlib.Logic.Function.ULift
public import Mathlib.Logic.Godel.GodelBetaFunction
public import Mathlib.Logic.Hydra
public import Mathlib.Logic.IsEmpty
public import Mathlib.Logic.IsEmpty.Basic
public import Mathlib.Logic.IsEmpty.Defs
public import Mathlib.Logic.Lemmas
public import Mathlib.Logic.Nonempty
public import Mathlib.Logic.Nontrivial.Basic
public import Mathlib.Logic.Nontrivial.Defs
public import Mathlib.Logic.OpClass
public import Mathlib.Logic.Pairwise
public import Mathlib.Logic.Relation
Expand All @@ -5355,8 +5357,6 @@ public import Mathlib.Logic.Small.Basic
public import Mathlib.Logic.Small.Defs
public import Mathlib.Logic.Small.List
public import Mathlib.Logic.Small.Set
public import Mathlib.Logic.Unique
public import Mathlib.Logic.UnivLE
public import Mathlib.MeasureTheory.Category.MeasCat
public import Mathlib.MeasureTheory.Constructions.AddChar
public import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/CharZero/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: Mario Carneiro
-/
module

public import Mathlib.Basic.Logic.Basic
public import Mathlib.Data.Int.Cast.Defs
public import Mathlib.Logic.Basic

/-!

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Irreducible/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors: Johannes Hölzl, Jens Wagemaker, Yaël Dillies
module

public import Mathlib.Algebra.Group.Units.Defs
public import Mathlib.Logic.Basic
public import Mathlib.Basic.Logic.Basic

/-!
# Irreducible elements in a monoid
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Nat/Units.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module

public import Mathlib.Algebra.Group.Nat.Defs
public import Mathlib.Algebra.Group.Units.Defs
public import Mathlib.Logic.Unique
public import Mathlib.Basic.Unique

/-!
# The unit of the natural numbers
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Pi/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module

public import Mathlib.Algebra.Group.Defs
public import Mathlib.Algebra.Notation.Pi.Basic
public import Mathlib.Basic.Unique
public import Mathlib.Data.Sum.Basic
public import Mathlib.Logic.Unique
public import Mathlib.Tactic.Spread

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/Units/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Group.Commute.Defs
public import Mathlib.Algebra.Group.Units.Defs
public import Mathlib.Logic.Unique
public import Mathlib.Basic.Unique
public import Mathlib.Tactic.Lift
public import Mathlib.Tactic.Subsingleton
public import Mathlib.Tactic.Attr.Core
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Group/WithOne/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Authors: Mario Carneiro, Johan Commelin
module

public import Mathlib.Algebra.Group.Defs
public import Mathlib.Basic.Nontrivial.Basic
public import Mathlib.Data.Option.Basic
public import Mathlib.Logic.Nontrivial.Basic
public import Mathlib.Tactic.Common

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/GroupWithZero/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module

public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.GroupWithZero.NeZero
public import Mathlib.Logic.Unique
public import Mathlib.Basic.Unique
public import Mathlib.Tactic.Conv
public import Batteries.Tactic.SeqFocus

Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/GroupWithZero/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Authors: Johan Commelin
module

public import Mathlib.Algebra.Group.Defs
public import Mathlib.Logic.Nontrivial.Defs
public import Mathlib.Logic.Basic
public import Mathlib.Basic.Nontrivial.Defs
public import Mathlib.Basic.Logic.Basic
public import Batteries.Tactic.SeqFocus

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/Presentation/Free.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Authors: Joël Riou
module

public import Mathlib.Algebra.Module.Presentation.Basic
public import Mathlib.Basic.UnivLE
public import Mathlib.LinearAlgebra.Finsupp.VectorSpace
public import Mathlib.LinearAlgebra.FreeModule.Basic
public import Mathlib.Logic.UnivLE

/-!
# Presentation of free modules
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/Projective.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Authors: Kevin Buzzard, Antoine Labelle
module

public import Mathlib.Algebra.Module.Shrink
public import Mathlib.Basic.UnivLE
public import Mathlib.LinearAlgebra.TensorProduct.Basis
public import Mathlib.Logic.UnivLE

/-!

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/NeZero.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Eric Rodriguez
-/
module

public import Mathlib.Logic.Basic
public import Mathlib.Basic.Logic.Basic
public import Mathlib.Order.Defs.PartialOrder

/-!
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Mathlib/Logic/IsEmpty.lean → Mathlib/Basic/IsEmpty.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ module
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.Relator

deprecated_module "import Mathlib.Logic.IsEmpty.Basic instead" (since := "2026-02-11")
deprecated_module "import Mathlib.Basic.IsEmpty.Basic instead" (since := "2026-02-11")
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: Floris van Doorn
-/
module

public import Mathlib.Basic.IsEmpty.Defs
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.IsEmpty.Defs
public import Mathlib.Logic.Relator

/-!
Expand Down
File renamed without changes.
Comment thread
YaelDillies marked this conversation as resolved.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Yaël Dillies
-/
module

public import Mathlib.Logic.Basic
public import Mathlib.Basic.Logic.Basic
public import Mathlib.Tactic.Convert
public import Mathlib.Tactic.SplitIfs
public import Mathlib.Tactic.Tauto
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Authors: Sébastien Gouëzel
-/
module

public import Mathlib.Basic.Nontrivial.Defs
public import Mathlib.Basic.Unique
public import Mathlib.Data.Prod.Basic
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.Nontrivial.Defs
public import Mathlib.Logic.Unique
public import Mathlib.Order.Defs.LinearOrder

import Mathlib.Tactic.Attr.Register
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions Mathlib/Basic/README.md
Comment thread
YaelDillies marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Basic mathematical properties and objects

This folder is intended to host definitions that are used throughout mathematics without necessarily
belonging to a specific area, such as the notion of a non-empty type or the complex numbers.

Note that results about the reals/complex numbers do not necessarily belong here.
For example, the normed group structure on them belongs in `Analysis` instead.
The order on the real numbers however belongs here because it is used to define the nonnegative real
numbers.

The imports are meant to stay comparatively minimal.
2 changes: 1 addition & 1 deletion Mathlib/Logic/Unique.lean → Mathlib/Basic/Unique.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: Johan Commelin
-/
module

public import Mathlib.Basic.IsEmpty.Defs
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.IsEmpty.Defs
public import Mathlib.Tactic.Inhabit

/-!
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Mathlib/CategoryTheory/EssentiallySmall.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Authors: Kim Morrison
-/
module

public import Mathlib.Basic.UnivLE
public import Mathlib.CategoryTheory.Category.ULift
public import Mathlib.CategoryTheory.Skeletal
public import Mathlib.Logic.UnivLE
public import Mathlib.Logic.Small.Basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/CategoryTheory/Limits/Types/Colimits.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Kim Morrison, Reid Barton, Joël Riou
-/
module

public import Mathlib.Logic.UnivLE
public import Mathlib.Basic.UnivLE
public import Mathlib.CategoryTheory.Limits.HasLimits
public import Mathlib.CategoryTheory.Limits.Types.ColimitType
public import Mathlib.CategoryTheory.ConcreteCategory.Elementwise
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/CategoryTheory/Limits/Types/Limits.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Kim Morrison, Reid Barton
-/
module

public import Mathlib.Logic.UnivLE
public import Mathlib.Basic.UnivLE
public import Mathlib.CategoryTheory.Limits.HasLimits
public import Mathlib.CategoryTheory.ConcreteCategory.Elementwise

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/CategoryTheory/UnivLE.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Authors: Kim Morrison
-/
module

public import Mathlib.Basic.UnivLE
public import Mathlib.CategoryTheory.EssentialImage
public import Mathlib.CategoryTheory.Types.Basic
public import Mathlib.Logic.UnivLE

/-!
# Universe inequalities and essential surjectivity of `uliftFunctor`.
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Combinatorics/Quiver/Path.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: David Wärn, Kim Morrison, Matteo Cipollina
-/
module

public import Mathlib.Basic.Logic.Lemmas
public import Mathlib.Combinatorics.Quiver.Prefunctor
public import Mathlib.Logic.Lemmas
public import Batteries.Data.List.Basic

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Computability/Primrec/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Authors: Mario Carneiro
module

public import Mathlib.Algebra.Order.Ring.Nat
public import Mathlib.Basic.Denumerable
public import Mathlib.Logic.Function.Iterate
public import Mathlib.Logic.Denumerable

/-!
# The primitive recursive functions
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Bool/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Authors: Leonardo de Moura, Jeremy Avigad
-/
module

public import Mathlib.Logic.Basic
public import Mathlib.Basic.Logic.Basic
public import Mathlib.Order.Defs.LinearOrder

/-!
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Data/FunLike/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Authors: Anne Baanen
module

public meta import Lean.Meta.CoeAttr

public import Mathlib.Basic.Unique
public import Mathlib.Logic.Function.Basic
public import Mathlib.Logic.Unique
public import Mathlib.Util.CompileInductive
public import Mathlib.Tactic.Simps.NotationClass
public import Mathlib.Tactic.SplitIfs
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/List/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, M
-/
module

public import Mathlib.Basic.Unique
public import Mathlib.Data.List.Defs
public import Mathlib.Data.List.Monad
public import Mathlib.Logic.OpClass
public import Mathlib.Logic.Unique
public import Mathlib.Tactic.Common
public import Batteries.Data.List.Lemmas
public import Batteries.Tactic.Lint.Simp
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/List/GetD.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Mario Carneiro
-/
module

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

/-! # getD and getI

Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Data/Nat/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Authors: Floris van Doorn, Leonardo de Moura, Jeremy Avigad, Mario Carneiro
-/
module

public import Mathlib.Basic.Logic.Basic
public import Mathlib.Basic.Nontrivial.Defs
public import Mathlib.Data.Nat.Init
public import Mathlib.Logic.Basic
public import Mathlib.Logic.Nontrivial.Defs
public import Mathlib.Order.Defs.LinearOrder
public import Mathlib.Tactic.GCongr.Core

Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Data/Nat/MaxPowDiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Authors: Matthew Robert Ballard, Yury Kudryashov
-/
module

public import Mathlib.Logic.Basic
public import Mathlib.Basic.Logic.Basic

import Mathlib.Data.Nat.Notation

/-!
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Option/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Authors: Mario Carneiro
-/
module

public import Mathlib.Basic.IsEmpty.Basic
public import Mathlib.Control.Combinators
public import Mathlib.Data.Option.Defs
public import Mathlib.Logic.IsEmpty.Basic
public import Mathlib.Logic.Relator
public import Mathlib.Util.CompileInductive
public import Aesop
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Quot.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Authors: Johannes Hölzl
-/
module

public import Mathlib.Basic.Unique
public import Mathlib.Logic.Relation
public import Mathlib.Logic.Unique
public import Mathlib.Util.Notation3

/-!
Expand Down
10 changes: 10 additions & 0 deletions Mathlib/Data/README.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reviewer: Here is the vision for the new folder. If unclear or incomplete, this README should be extended

@joneugster joneugster May 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(there are also READMEs for Logic and Basic)

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Data structures

This folder contains results about data structures such as `List`, `Bool` or `Option`.
In an ideal world, this folder wouldn't exist as its content could reasonably be upstreamed
to either Core or Batteries.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I agree with this sentence. I think that there is a small set of data structures which are only relevant for mathlib and hence not suitable for inclusion in core or batteries. I think the differentiation should be more about the material appearing in this folder being supporting material for making mathlib possible, but not really mathematics itself.

@YaelDillies YaelDillies Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My opinion would be for this material to be in Basic instead, otherwise we might end up with Data.List for the basic List material that's "not mathematics" and Basic.List for the one that is (leading to bikesheddy discussions on what is mathematics and what is not, etc...). Would you be happy with that?


## TODO

Currently this folder contains a lot of non-data structures that should move to either `Basic`,
`Algebra` or `Order`.
Loading
Loading