filename
stringlengths
5
42
content
stringlengths
15
319k
falgebra.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path. From mathcomp Require Import choice fintype div...
numfield.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice. From mathcomp Require Import ssrAC div fintyp...
monoid.v
From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype choice ssrnat seq. From mathcomp Require Import bigop fintype finfun. (******************************************************************************) (* Group-like structures ...
Sigma.lean
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic import Mathlib.Data.QPF.Multivariate.Basic /-! # Dependent product and sum of QPFs are QPFs -/ universe u namespace MvQP...
FixedPoint.lean
/- Copyright (c) 2018 Violeta Hernández Palacios, Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios, Mario Carneiro -/ import Mathlib.Logic.Small.List import Mathlib.SetTheory.Ordinal.Enum import Mathlib.SetTheory.Ordinal.Exponen...
UnitsCyclic.lean
/- Copyright (c) 2025 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir, Junyan Xu -/ import Mathlib.Algebra.Order.Star.Basic import Mathlib.Analysis.Normed.Ring.Lemmas import Mathlib.Data.Nat.Choose.Dvd import Mathlib.Data.ZMo...
Limits.lean
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Kim Morrison -/ import Mathlib.CategoryTheory.Subobject.Lattice /-! # Specific subobjects We define `equalizerSubobject`, `kernelSubobject` and `imageSubobject`, which ar...
Length.lean
/- Copyright (c) 2025 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Exact import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.Order.KrullDimension import Mathlib...
ExpDeriv.lean
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne -/ import Mathlib.Analysis.Calculus.ContDiff.RCLike import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas import Mathlib.Anal...
Basic.lean
/- Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ import Batteries.Tactic.Alias import Mathlib.Tactic.Lemma import Mathlib.Tactic.TypeStar /-! # Helper definitions and instances for `Ordering` -/ universe...
ChainOfFn.lean
/- Copyright (c) 2024 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Data.List.Chain import Mathlib.Data.List.OfFn /-! # Lemmas about `Chain'` and `OfFn` This file provides lemmas involving both `List.Chain'` and `List.OfF...
TensorProduct.lean
/- Copyright (c) 2024 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Andrew Yang -/ import Mathlib.LinearAlgebra.TensorProduct.Tower import Mathlib.RingTheory.Coalgebra.Equiv /-! # Tensor products of coalgebras Suppose `S` is an ...
Nodup.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau -/ import Mathlib.Data.List.Forall2 /-! # Lists with no duplicates `List.Nodup` is defined in `Data/List/Basic`. In this file we prove various properties of...
Order.lean
/- Copyright (c) 2019 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston -/ import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.GroupTheory.MonoidLocalization.Basic /-! # Ordered structures on localizations of commutative monoids ...
KreinMilman.lean
/- 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 Mathlib.Analysis.Convex.Exposed import Mathlib.Analysis.NormedSpace.HahnBanach.Separation import Mathlib.Topology.Algebra.ContinuousAffineMap /-! # The Krein-Milm...
Finset.lean
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Order.AbsoluteValue.Basic import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mat...
Bases.lean
/- 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, Mario Carneiro -/ import Mathlib.Data.Set.Constructions import Mathlib.Order.Filter.AtTopBot.CountablyGenerated import Mathlib.Topology.Constructions import Mathlib.Top...
PartrecCode.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Partrec import Mathlib.Data.Option.Basic /-! # Gödel Numbering for Partial Recursive Functions. This file defines `Nat.Partrec.Code`, a...
Parity.lean
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Iván Renison -/ import Mathlib.Algebra.Ring.Parity import Mathlib.Data.Fin.Basic import Mathlib.Data.ZMod.Defs /-! # Parity in `Fin n` In this file we prove that an...
Limits.lean
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.CategoryTheory.Limits.Creates import Mathlib.CategoryTheory.Sites.Sheafification import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts /-! # Limits and ...
ssralg.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq. From mathcomp Require Import choice fintype finf...
Imo2011Q3.lean
/- Copyright (c) 2021 David Renshaw. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Renshaw -/ import Mathlib.Data.Real.Basic import Mathlib.Tactic.Linarith /-! # IMO 2011 Q3 Let f : ℝ → ℝ be a function that satisfies f(x + y) ≤ y * f(x) + f(f(x)) for all ...
OpenSubgroup.lean
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Nailin Guan, Yi Song, Xuchun Li -/ import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.RingTheory.Ideal.Defs import Mathlib.Topology.Algebra.Group.Quotient i...
Fin.lean
/- 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 Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Group.Action.Pi import Mathlib.Data.Fintype.BigOperators import Mat...
GDelta.lean
/- 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, Mario Carneiro -/ import Mathlib.Topology.Compactness.Lindelof import Mathlib.Topology.Compactness.SigmaCompact import Mathlib.Topology.Connected.TotallyDisconnected im...
Basic.lean
/- 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 -/ import Mathlib.Logic.Function.Defs import Mathlib.Logic.Function.Basic /-! # Sigma types This file proves basic results about sigma types. A sigma type is a depend...
Types.lean
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.CategoryTheory.Sites.Canonical /-! # Grothendieck Topology and Sheaves on the Category of Types In this file we define a Grothendieck topology on the category ...
LHopital.lean
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.MeanValue /-! # L'Hôpital's rule for 0/0 indeterminate forms In this file, we ...
PSeriesComplex.lean
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.PSeries import Mathlib.Analysis.Normed.Module.FiniteDimension import Mathlib.Data.Complex.FiniteDimensional /-! # Convergence of `p`-series ...
PartialTraj.lean
/- Copyright (c) 2025 Etienne Marion. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Etienne Marion -/ import Mathlib.MeasureTheory.MeasurableSpace.PreorderRestrict import Mathlib.Probability.Kernel.Composition.Prod import Mathlib.Probability.Kernel.IonescuTulcea.Maps ...
Trails.lean
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Algebra.Ring.Parity import Mathlib.Combinatorics.SimpleGraph.Paths /-! # Trails and Eulerian trails This module contains additional theory about trails, i...
CatEnriched.lean
/- Copyright (c) 2025 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Emily Riehl -/ import Mathlib.CategoryTheory.Monoidal.Cartesian.Cat import Mathlib.CategoryTheory.Enriched.Basic import Mathlib.CategoryTheory.Enriched.Ordinary.Basic ...
Comma.lean
/- 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.CategoryTheory.Comma.Over.Basic import Mathlib.CategoryTheory.MorphismProperty.Composition /-! # Subcategories of comma categories defined by morp...
HashCommandLinter.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Lean.Elab.Command -- Import this linter explicitly to ensure that -- this file has a valid copyright header and module docstring. import Mathlib.Tactic.Linter.H...
Integrability.lean
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.BoxIntegral.Basic import Mathlib.MeasureTheory.Integral.Bochner.Set import Mathlib.Tactic.Generalize /-! # McShane integrability vs Bochner...
CoversTop.lean
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Sites.Sheaf /-! Objects which cover the terminal object In this file, given a site `(C, J)`, we introduce the notion of a family of objects `Y :...
sesquilinear.v
From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq div. From mathcomp Require Import choice fintype tuple bigop ssralg finset fingroup. From mathcomp Require Import zmodp poly order ssrnum matrix mxalgebra vector. (************************************************...
test_rat.v
From mathcomp Require Import all_boot all_order all_algebra. Local Open Scope ring_scope. Goal 2%:Q + 2%:Q = 4%:Q. Proof. reflexivity. Qed. Goal - 2%:Q = -1 * 2%:Q. Proof. reflexivity. Qed. Goal 2%:Q ^+ 2 = 4%:Q. Proof. reflexivity. Qed. Goal (-1)^-1 = -1 :> rat. Proof. reflexivity. Qed. Local Open Scope rat_scop...
burnside_app.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div. From mathcomp Require Import choice fintype tupl...
Pochhammer.lean
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Algebra.Basic import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Eval.Algebra impo...
Locally.lean
/- 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.RingTheory.LocalProperties.Basic import Mathlib.RingTheory.Localization.BaseChange import Mathlib.RingTheory.Localization.Away.Lemmas /-! # Target...
Defs.lean
/- 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, Mario Carneiro, Alexander Bentkamp -/ import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp.LinearCombination /-! # Bases This file defines ba...
Matrix.lean
/- Copyright (c) 2024 Jon Bannon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jon Bannon, Jireh Loreaux -/ import Mathlib.LinearAlgebra.Eigenspace.Basic /-! # Eigenvalues, Eigenvectors and Spectrum for Matrices This file collects results about eigenvectors, eige...
fraction.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat div seq. From mathcomp Require Import ssrAC choice tuple ...
Pow.lean
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Data.Nat.Cast.Commute import Mathlib.Data.Nat.Cast.Order.Ring /-! # Bernoulli's inequality -/ variable {R : Type*} section OrderedSemiring variabl...
Sum.lean
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Data.Fintype.Sum /-! # Finiteness of sum types -/ variable {α β : Type*} namespace Finite instance [Finite α] [Finite β] : Finite (α ⊕ β) := by haveI :...
order.v
(* (c) Copyright 2006-2019 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat choice seq. From mathcomp Require Import path fintype tup...
finmodule.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq path. From mathcomp Require Import div choice fintype...
morphism.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice. From mathcomp Require Import fintype finfun bigop finset fingroup. (***********...
Arctan.lean
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic /-! # Measurability of arctan -/ names...
MfldSetTac.lean
/- Copyright (c) 2022 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth, Frédéric Dupuis -/ import Mathlib.Logic.Equiv.PartialEquiv private axiom test_sorry : ∀ {α}, α /-! This is a test file for the tactic `mfld_set_tac`. Because this t...
Count.lean
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Vladimir Goryachev, Kyle Miller, Kim Morrison, Eric Rodriguez -/ import Mathlib.Algebra.Group.Nat.Range import Mathlib.Data.Set.Finite.Basic /-! # Counting on ℕ Thi...
Free.lean
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Johan Commelin -/ import Mathlib.LinearAlgebra.DirectSum.Finsupp import Mathlib.LinearAlgebra.Finsupp.Pi import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.Linear...
Topology.lean
/- 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.CategoryTheory.Galois.Prorepresentability import Mathlib.Topology.Algebra.ContinuousMonoidHom import Mathlib.Topology.Algebra.Group.Basic /-! # T...
TransferInstance.lean
/- 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 -/ import Mathlib.Algebra.Group.TransferInstance import Mathlib.Algebra.GroupWithZero.InjSurj /-! # Transfer algebraic structures across `Equiv`s This continues the pa...
DFA.lean
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson, Chris Wong -/ import Mathlib.Computability.Language import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.Pigeonhole import Mathlib.Tactic.NormNum /-! # Determinis...
Finsupp.lean
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Algebra.DirectSum.Module import Mathlib.Data.Finsupp.ToDFinsupp /-! # Results on direct sums and finitely supported functions. 1. The linear equivale...
Functoriality.lean
/- Copyright (c) 2025 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston -/ import Mathlib.RepresentationTheory.Homological.GroupCohomology.Functoriality deprecated_module (since := "2025-06-14")
CompleteLat.lean
/- 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 Mathlib.Order.Category.BddLat import Mathlib.Order.Hom.CompleteLattice /-! # The category of complete lattices This file defines `CompleteLat`, the category of c...
Complex.lean
/- Copyright (c) 2025 Miyahara Kō. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Miyahara Kō -/ import Mathlib.Analysis.CStarAlgebra.Classes import Mathlib.Analysis.Meromorphic.NormalForm import Mathlib.Analysis.SpecialFunctions.Gamma.Beta /-! # The Gamma function i...
Basic.lean
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.BigOperators.Group.List.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Algebra.Group.Subgroup.Ker import Mathlib.Data.List.Chain /-! # Free ...
Sigma.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Sean Leather -/ import Batteries.Data.List.Perm import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lookmap import Mathlib.Data.Si...
TriangleShift.lean
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Linear.LinearFunctor import Mathlib.CategoryTheory.Triangulated.Rotate import Mathlib.Algebra.Ring.NegOnePow /-! # The shift on the category of t...
AddTorsor.lean
/- Copyright (c) 2024 Scott Carnahan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Carnahan -/ import Mathlib.Algebra.Group.Action.Defs import Mathlib.Algebra.Order.Monoid.Defs /-! # Ordered scalar multiplication and vector addition This file defines ordered s...
FinCategory.lean
/- Copyright (c) 2025 Moisés Herradón Cueto. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moisés Herradón Cueto -/ import Mathlib.CategoryTheory.FinCategory.Basic import Mathlib.CategoryTheory.WithTerminal.Basic import Mathlib.Data.Fintype.Option /-! # `WithTermina...
DomMulAct.lean
/- Copyright (c) 2023 Junyan Xu, Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junyan Xu, Antoine Chambert-Loir -/ import Mathlib.Algebra.Group.Action.End import Mathlib.Data.Fintype.Perm import Mathlib.Data.Set.Card import Mathlib.GroupTheory.G...
Rep.lean
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Category.ModuleCat.Adjunctions import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Category.ModuleCat.Limits import Mathlib.Al...
Pointwise.lean
/- 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, Eric Wieser -/ import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Pointwise impor...
LogLikelihoodRatio.lean
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Measure.Tilted /-! # Log-likelihood Ratio The likelihood ratio between two measures `μ` and `ν` is their Radon-Nikodym derivative `μ.rnDeri...
Pointwise.lean
/- Copyright (c) 2022 Hanting Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hanting Zhang -/ import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic /-! # Pointwise instances on `AffineSubspace`s This file provides the additive action `AffineSubspace.po...
SMul.lean
/- 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, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Degree.Support import Mathlib.Algebra.Polynomial.Eval.Defs /-! # Evaluating polynomials a...
Basic.lean
/- Copyright (c) 2024 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston -/ import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.RingTheory.Coalgebra.Equiv /-! # The category of coalgebras over a commutative ring We introduc...
Spectrum.lean
/- Copyright (c) 2022 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Mathlib.Analysis.CStarAlgebra.Unitization import Mathlib.Analysis.Complex.Convex import Mathlib.Analysis.Normed.Algebra.Spectrum import Mathlib.Analysis.SpecialF...
Constructions.lean
/- Copyright (c) 2024 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Minor.Restrict /-! # Some constructions of matroids This file defines some very elementary examples of matroids, namely those with at most o...
Prod.lean
/- Copyright (c) 2023 Antoine Chambert-Loir and María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir, María Inés de Frutos-Fernández, Bhavik Mehta, Eric Wieser -/ import Mathlib.Algebra.Order.Monoid.Canonical.Defs import ...
Units.lean
/- Copyright (c) 2014 Floris van Doorn (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Leonardo de Moura, Jeremy Avigad, Mario Carneiro -/ import Mathlib.Algebra.Group.Nat.Defs import Mathlib.Algebra.Group.Units.Defs imp...
Basic.lean
/- 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.Roots import Mathlib.NumberTheory.NumberField.Basic import Mathlib.FieldTheory.SeparableClosure /-! # Cyclotomic ex...
finset.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat div seq. From mathcomp Require Import choice fintype finf...
Basis.lean
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.TensorAlgebra.Basic import Mathlib.LinearAlgebra.FreeAlgebra /-! # A basis for `TensorAlgebra R M` ## Main definitions * `TensorAlgebra.equi...
Basic.lean
/- 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, Jeremy Avigad, Yury Kudryashov, Patrick Massot -/ import Mathlib.Order.Filter.Bases.Basic import Mathlib.Order.Filter.AtTopBot.Tendsto import Mathlib.Order.Nat import M...
Fiber.lean
/- Copyright (c) 2024 Calle Sönne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle Sönne, Paul Lezeau -/ import Mathlib.CategoryTheory.FiberedCategory.HomLift import Mathlib.CategoryTheory.Functor.Const /-! # Fibers of a functors In this file we define, for a ...
Imo2019Q1.lean
/- Copyright (c) 2020 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard -/ import Mathlib.Tactic.Linarith import Mathlib.Tactic.Ring /-! # IMO 2019 Q1 Determine all functions `f : ℤ → ℤ` such that, for all integers `a` and `b`, `f(2a) + 2f(b...
Yoneda.lean
/- Copyright (c) 2025 Yaël Dillies, Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Andrew Yang -/ import Mathlib.Algebra.Category.Grp.Basic import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.CategoryTheory.Yoneda /-! # Yoneda embeddings ...
Sheaf.lean
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Topology.Sheaves.Presheaf import Mathlib.CategoryTheory.Sites.Sheaf import Mathlib.CategoryTheory.Sites.Spaces /-! # Sheaves We define sheaves on a topol...
Conjugate.lean
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Logic.Function.Basic /-! # Semiconjugate and commuting maps We define the following predicates: * `Function.Semiconj`: `f : α → β` semiconjugates ...
Basic.lean
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.RingTheory.Ideal.Quotient.Nilpotent import Mathlib.RingTheory.Smooth.Basic import Mathlib.RingTheory.Unramified.Basic /-! # Etale morphisms An `R`-algebra...
Limits.lean
/- Copyright (c) 2023 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Dagur Asgeirsson -/ import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Topology.Category.CompHausLike.Limits /-! # Explicit limits and colimits This file applies...
Basic.lean
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stephen Morgan, Kim Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Pi.Basic import Mathlib.Data.ULift /-! # Discrete categories We de...
Pow.lean
/- Copyright (c) 2021 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Thomas Murrills -/ import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Tactic.NormNum.Basic /-! ## `norm_num` plugin for `^`. -/ assert_not_exists RelIso namespace Ma...
Defs.lean
/- Copyright (c) 2020 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Submonoid.Defs import Mathlib.Data.Set.Inclusion import Mathlib.Tactic.Common import Mathlib.Tactic.FastInst...
List.lean
/- 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, Mario Carneiro, Kyle Miller -/ import Mathlib.Data.Set.Finite.Basic import Mathlib.Data.Set.Finite.Lattice import Mathlib.Data.Set.Finite.Range import Mathlib.Data.Set....
Quiv.lean
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Emily Riehl, Joël Riou -/ import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.Category.Cat import Mathlib.CategoryTheory.PathCategory.MorphismPrope...
Basic.lean
/- 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 Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Module.Equiv.Basic import Mathlib.Algebra.Module.Submodule.Ker import Mathlib.Algebra.Module.Submodu...
Cofinite.lean
/- 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, Jeremy Avigad, Yury Kudryashov -/ import Mathlib.Data.Finite.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.Set.Finite.Lemmas import Mathlib.Order.Conditionall...
ULift.lean
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Control.ULift import Mathlib.Logic.Equiv.Basic /-! # Extra lemmas about `ULift` and `PLift` In this file we provide `Subsingleton`, `Unique`, `Deci...
FiniteField.lean
/- Copyright (c) 2020 Aaron Anderson, Jalex Stark. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jalex Stark -/ import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib.FieldTheory.Finite.Basic import Mathlib.Data.Matrix.CharP /-! # Results o...
pgroup.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq div. From mathcomp Require Import fintype bigop finset prime fingroup morphism. From mat...
InclusionExclusion.lean
/- Copyright (c) 2024 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators /-! # Inclusion-exclusion principle Th...
ChainOfDivisors.lean
/- Copyright (c) 2021 Paul Lezeau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Paul Lezeau -/ import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.IsPrimePow import Mathlib.RingTheory.UniqueFactorizationDomain.Multiplicity import Mathlib.Order....
test_rat.v
From mathcomp Require Import all_boot all_order all_algebra. Local Open Scope ring_scope. Goal 2%:Q + 2%:Q = 4%:Q. Proof. reflexivity. Qed. Goal - 2%:Q = -1 * 2%:Q. Proof. reflexivity. Qed. Goal 2%:Q ^+ 2 = 4%:Q. Proof. reflexivity. Qed. Goal (-1)^-1 = -1 :> rat. Proof. reflexivity. Qed. Local Open Scope rat_scop...