filename
stringlengths
5
42
content
stringlengths
15
319k
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, Filippo A. E. Nuccio, Riccardo Brasca -/ import Mathlib.Topology.Category.CompHausLike.Limits import Mathlib.Topology.Category.Stonean.Basic /-! # Explicit l...
Basic.lean
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Jujian Zhang -/ import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.Module.TransferInstance import Mathlib.RingTheory.Localization.Defs /-! # Localized Module Give...
Functor.lean
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Closed.Cartesian import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Adjunction.FullyFaithful...
RegularSheaves.lean
/- Copyright (c) 2023 Dagur Asgeirsson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dagur Asgeirsson, Filippo A. E. Nuccio, Riccardo Brasca -/ import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.Limits.Final.ParallelPair import Mathlib...
MulOpposite.lean
/- Copyright (c) 2025 Monica Omar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Monica Omar -/ import Mathlib.LinearAlgebra.FiniteDimensional.Defs /-! # Basis of an opposite space This file defines the basis of an opposite space and shows that the opposite space is...
Prod.lean
/- Copyright (c) 2022 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Yury Kudryashov, Kevin H. Wilson, Heather Macbeth -/ import Mathlib.Order.Filter.Tendsto /-! # Product and coproduct filters In this file we define `F...
ssrnotations.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) (******************************************************************************) (* - Reserved notation for various arithmetic and algebraic operations: ...
Hermitian.lean
/- Copyright (c) 2022 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.LinearAlgebra.Matrix.ZPow import Mathlib.Data.Matrix.ConjTranspose /-! # Hermitian matrices Th...
FactorThru.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.Basic import Mathlib.CategoryTheory.Preadditive.Basic /-! # Factoring through subobjects The predicate `h : P.Fact...
Center.lean
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Jireh Loreaux -/ import Mathlib.Algebra.Group.Center import Mathlib.Data.Int.Cast.Lemmas /-! # Centers of rings -/ assert_not_exists RelIso Finset Subsemigroup Field vari...
LebesgueNormedSpace.lean
/- Copyright (c) 2022 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Measure.WithDensity import Mathlib.Analysis.Normed.Module.Basic /-! # A lemma about measurability with density under scalar multip...
countalg.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 fintype bigop ss...
all_boot.v
Require Export ssreflect. Require Export ssrbool. Require Export ssrfun. Require Export eqtype. Require Export ssrnat. Require Export seq. Require Export choice. Require Export monoid. Require Export nmodule. Require Export path. Require Export div. Require Export fintype. Require Export fingraph. Require Export tuple....
perm.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 tup...
MeanInequalities.lean
/- Copyright (c) 2020 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Analysis.MeanInequalities import Mathlib.Analysis.MeanInequalitiesPow import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic import Mathlib.MeasureTh...
ADEInequality.lean
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Data.Multiset.Sort import Mathlib.Data.PNat.Basic import Mathlib.Data.PNat.Interval import Mathlib.Tactic.NormNum...
TotallyDisconnected.lean
/- Copyright (c) 2024 Jou Glasheen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jou Glasheen, Kevin Buzzard, David Loeffler, Yongle Hu, Johan Commelin -/ import Mathlib.Topology.Algebra.Nonarchimedean.Basic /-! # Total separatedness of nonarchimedean groups In th...
Basic.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.ContinuousFunctionalCalculus.Isometric import Mathlib.Analysis.CStarAlgebra.GelfandDuality import Mathlib.Analysis.CStarAlgebra.Uni...
Bilinear.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.NonUnitalHom import Mathlib.LinearAlgebra.TensorProduct.Basic /-! # Facts about algebras involving bilinear maps and tensor pro...
Triangulated.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.Algebra.Homology.HomotopyCategory.Pretriangulated import Mathlib.CategoryTheory.Triangulated.Triangulated import Mathlib.CategoryTheory.ComposableArrows /-! The...
Inductions.lean
/- Copyright (c) 2021 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Damiano Testa, Jens Wagemaker -/ import Mathlib.Algebra.MonoidAlgebra.Division import Mathlib.Algebra.Polynomial.Degree.Operations import Mat...
Canonical.lean
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Johan Commelin, Patrick Massot -/ import Mathlib.Algebra.GroupWithZero.InjSurj import Mathlib.Algebra.GroupWithZero.WithZero import Mathlib.Algebra.Order.AddGroupWithTop import M...
Partial.lean
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Order.Filter.Tendsto import Mathlib.Data.PFun /-! # `Tendsto` for relations and partial functions This file generalizes `Filter` definitions from funct...
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...
PPWithUniv.lean
/- Copyright (c) 2023 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner -/ import Mathlib.Init /-! # Attribute to pretty-print universe level parameters by default This module contains the `pp_with_univ` attribute, which enables pret...
StructuredArrow.lean
/- Copyright (c) 2024 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.Localization.HomEquiv import Mathlib.CategoryTheory.Localization.Opposite import Mathlib.CategoryTheory.Comma.StructuredArrow.Basic /-! # Inducti...
MapDomain.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, Yury Kudryashov, Kim Morrison -/ import Mathlib.Algebra.MonoidAlgebra.Defs import Mathlib.Data.Finsupp.SMul /-! # MonoidAlgebra.mapDomain -/ assert_not_exists NonUni...
Arithmetic.lean
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.IsNormal import ...
DirectedInverseSystem.lean
/- Copyright (c) 2024 Junyan Xu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junyan Xu -/ import Mathlib.Order.SuccPred.Limit import Mathlib.Order.UpperLower.Basic /-! # Definition of direct systems, inverse systems, and cardinalities in specific inverse systems T...
galois.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...
Orthogonal.lean
/- Copyright (c) 2021 Lu-Ming Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lu-Ming Zhang -/ import Mathlib.Data.Matrix.Mul /-! # Orthogonal This file contains definitions and properties concerning orthogonality of rows and columns. ## Main results - `matri...
inertia.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...
LexOrder.lean
/- Copyright (c) 2024 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir -/ import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.Data.Finsupp.WellFounded /-! LexOrder of multivariate power series Given an ordering of ...
measurability.lean
/- Copyright (c) 2021 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.MeasurableSpace.Basic import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Function.SpecialFunctions.Basi...
Bounds.lean
/- Copyright (c) 2022 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler, Yaël Dillies, Bhavik Mehta -/ import Mathlib.Analysis.Convex.SpecificFunctions.Deriv import Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv /-! # Polynomia...
Polynomial.lean
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Eric Wieser -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib...
Even.lean
/- Copyright (c) 2024 Artie Khovanov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Artie Khovanov -/ import Mathlib.Algebra.Group.Even import Mathlib.Algebra.Group.Subgroup.Defs /-! # Squares and even elements This file defines the subgroup of squares / even elemen...
Basic.lean
/- Copyright (c) 2018 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Johannes Hölzl, Reid Barton, Sean Leather, Yury Kudryashov -/ import Mathlib.CategoryTheory.Types /-! # Concrete categories A concrete category is a category `C` where th...
PPRoundtrip.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 Mathlib.Init /-! # The "ppRoundtrip" linter The "ppRoundtrip" linter emits a warning when the syntax of a command differs substantia...
Zorn.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.Order.CompleteLattice.Chain import Mathlib.Order.Minimal /-! # Zorn's lemmas This file proves several formulations of Zorn's Lemma. ## Variants The...
CountablyGenerated.lean
/- Copyright (c) 2019 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Yury Kudryashov, Patrick Massot -/ import Mathlib.Data.Set.Countable import Mathlib.Order.Filter.Bases.Finite /-! # Countably generated filters In this file we define a...
Nth.lean
/- Copyright (c) 2024 Ralf Stephan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ralf Stephan -/ import Mathlib.Data.Nat.Prime.Defs import Mathlib.Data.Nat.Nth /-! # The Nth primes -/ namespace Nat @[simp] theorem nth_prime_zero_eq_two : nth Prime 0 = 2 := nth_cou...
Simp.lean
/- Copyright (c) 2025 Paul Lezeau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Lezeau -/ import Lean.Meta.Tactic.Simp.Types import Mathlib.Init import Qq /-! # Additional simp utilities This file adds additional tools for metaprogramming with the `simp` tacti...
MeasurePreserving.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.MeasureTheory.Measure.AEMeasurable import Mathlib.Order.Filter.EventuallyConst /-! # Measure preserving maps We say that `f : α → β` is a measure p...
Cyclic.lean
/- Copyright (c) 2025 María Inés de Frutos-Fernández, Filippo A. E. Nuccio. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: María Inés de Frutos-Fernández, Filippo A. E. Nuccio -/ import Mathlib.Algebra.Order.Group.Basic import Mathlib.GroupTheory.SpecificGroups.Cyclic ...
Equiv.lean
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.AddConstMap.Basic /-! # Equivalences conjugating `(· + a)` to `(· + b)` In this file we define `AddConstEquiv G H a b` (notation: `G ≃+c[a,...
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.Algebra.Exact import Mathlib.LinearAlgebra.Span.Basic import Mathlib.RingTheory.Ideal.IsPrimary import Mathlib.RingTheory.Ideal.Quotient.Operations import Ma...
Basic.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, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, Amelia Livingston, Yury Kudryashov -/ import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Algebra.Ring...
polydiv.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice. From mathcomp Require Import fintype bigop ssralg poly. (**********************...
commutator.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat fintype. From mathcomp Require Import bigop finset binomial fingroup morphism. From mathcomp...
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...
Exp.lean
/- Copyright (c) 2024 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Complex.Periodic import Mathlib.Analysis.Complex.UpperHalfPlane.Basic /-! # Exp ...
mxred.v
(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. *) (* Distributed under the terms of CeCILL-B. *) From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq div. From mathcomp Require Import choice fintype finfun bigop fingroup perm order. From ...
Polynomial.lean
/- Copyright (c) 2023 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.MvPolynomial.Equiv /-! # Some lemmas relating polynomials and multivariable polynomials. -/ namespace MvPolynomial variable {R S σ : Type*} the...
SimplicialObject.lean
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.AlgebraicTopology.SimplicialCategory.Basic import Mathlib.CategoryTheory.Functor.FunctorHom /-! # The category of simplicial objects is simplicial In `Category...
Basic.lean
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Patrick Massot, Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap import Mathlib.MeasureTheory.Measure.Lebesgue.Basic import Math...
Synonym.lean
/- Copyright (c) 2024 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Mathlib.RingTheory.Finiteness.Defs import Mathlib.Topology.Bornology.Constructions import Mathlib.Topology.UniformSpace.Equiv import Mathlib.Topology.Algebra.Mod...
Units.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.Normed.Ring.Units import Mathlib.Algebra.Algebra.Spectrum.Basic import Mathlib.Topology.ContinuousMap.Algebra /-! # Units of continuous functio...
countalg.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 fintype bigop ss...
JapaneseBracket.lean
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll -/ import Mathlib.Analysis.SpecialFunctions.Integrability.Basic import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar import Mathlib.MeasureTheory.Integral.Layercake /-! # Jap...
Basic.lean
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Bhavik Mehta, Yaël Dillies -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Hull import Mathlib.Analysis.Normed.Module.Basic import Mathlib.Topology.Bornology.A...
ChangeOfRings.lean
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Category.ModuleCat.Colimits import Mathlib.Algebra.Category.ModuleCat.Limits import Mathlib.Algeb...
Image.lean
/- Copyright (c) 2023 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Yaël Dillies -/ import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.Function import Mathlib.Order.Directed /-! # Monotone functions on intervals This file sho...
zmodp.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 choice eqtype ssrnat seq. From mathcomp Require Import div fintype bigo...
gseries.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 path. From mathcomp Require Import fintype bigop finset fingroup morphism. From mathcomp...
Upcrossing.lean
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Order.Interval.Set.Monotone import Mathlib.Probability.Process.HittingTime import Mathlib.Probability.Martingale.Basic import Mathlib.Tactic.AdaptationNote ...
alt.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 choice. From mathcomp Require Import div fintype tupl...
Stalk.lean
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Fangming Li -/ import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.AlgebraicGeometry.Morphisms.Preimmersion /-! # Stalks of a Scheme ## Main definitions and result...
Canonical.lean
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro -/ import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.Sub.Basic impo...
Basic.lean
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Bhavik Mehta, Stuart Presnell -/ import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Defs /-! # Binomial coefficients This file defines binomial coeffic...
bigop.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 fintype tuple ...
Yoneda.lean
/- Copyright (c) 2025 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.Algebra.Category.Grp.Abelian import Mathlib.CategoryTheory.Abelian.DiagramLemmas.Four import Mathlib.CategoryTheory.Abelian.Projective.Basic import Mathl...
ToSquareZero.lean
/- Copyright (c) 2020 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri, Andrew Yang -/ import Mathlib.RingTheory.Derivation.Basic import Mathlib.RingTheory.Ideal.Quotient.Operations /-! # Results - `derivationToSquareZeroOfLift`: The ...
M.lean
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic import Mathlib.Data.PFunctor.Univariate.M /-! # The M construction as a multivariate polyn...
Cokernel.lean
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Module.Presentation.Basic /-! # Presentation of a cokernel If `f : M₁ →ₗ[A] M₂` is a linear map between modules, `pres₂` is a presentation of `M₂` and ...
Basic.lean
import Mathlib.Tactic.RewriteSearch set_option autoImplicit true -- You can enable tracing of the `rw_search` algorithm using -- set_option trace.rw_search true -- You can get timing information (very useful if tweaking the search algorithm!) using -- set_option profiler true /-- info: Try this: rw [List.length_ap...
Flatten.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn, Mario Carneiro, Martin Dvorak -/ import Mathlib.Tactic.GCongr.Core import Mathlib.Util.AssertExists /-! # Join of a list of lists This file prove...
levenshtein.lean
import Mathlib.Data.List.EditDistance.Defs import Mathlib.Algebra.Group.Nat.Defs #guard (suffixLevenshtein Levenshtein.defaultCost "kitten".toList "sitting".toList).1 = [3, 3, 4, 5, 6, 6, 7] #guard levenshtein Levenshtein.defaultCost "but our fish said, 'no! no!'".toList "'put me down!' said the fish.".toLi...
Finite.lean
/- Copyright (c) 2025 Sophie Morel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sophie Morel -/ import Mathlib.Algebra.DirectSum.Module import Mathlib.RingTheory.Finiteness.Basic /-! # A finite direct sum of finite modules is finite This file defines a `Module.Fin...
Orthonormal.lean
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis -/ import Mathlib.Analysis.InnerProductSpace.LinearMap import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathlib.RingTheory...
finfield.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 fintype div tupl...
ssrnum.v
From mathcomp Require Export orderedzmod. From mathcomp Require Export numdomain. From mathcomp Require Export numfield. Module Num. Export orderedzmod.Num. Export numdomain.Num. Export numfield.Num. Module Theory. Export orderedzmod.Num.Theory. Export numdomain.Num.Theory. Export numfield.Num.Theory. End Theory. Mo...
Factorization.lean
/- Copyright (c) 2024 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.MorphismProperty.Basic /-! # The factorization axiom In this file, we introduce a type-class `HasFactorization W₁ W₂`, which, given two classes ...
FourierMotzkin.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Std.Data.HashMap import Batteries.Lean.HashMap import Mathlib.Tactic.Linarith.Datatypes /-! # The Fourier-Motzkin elimination procedure The Fourier...
field.lean
import Mathlib example (x y : ℝ) (h : x ≠ y) : (x^2 - y^2)/(x - y) = x + y := by grind example (x y : ℝ) (h : (x + y)^2 ≠ 0) : (x^2 - y^2)/(x + y) = x - y := by grind
Defs.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.Module.LinearMap.Defs /-! # Algebras over commutative semirings In this file we define associative unital `Algebra`s over commutative ...
Asymptotics.lean
/- Copyright (c) 2019 Jan-David Salchow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo -/ import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic import Mathlib.Analysis.Asymptotics.Defs /-! # Asymptotic statements about th...
OrderIso.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, Yury Kudryashov -/ import Mathlib.Order.Bounds.Image import Mathlib.Order.Hom.Set /-! # Order isomorphisms and bounds. -/ open Set namespace OrderIso variable {α β ...
Parity.lean
/- Copyright (c) 2022 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Group.Nat.Even import Mathlib.Data.Nat.Cast.Basic import Mathlib.Data.Nat.Cast.Commute import Mathlib.Data.Set.Operations import Mathlib.Logic.Fu...
Ideal.lean
/- Copyright (c) 2024 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Wojciech Nawrocki -/ import Mathlib.Data.Matrix.Basis import Mathlib.GroupTheory.Congruence.BigOperators import Mathlib.RingTheory.Ideal.Lattice import Mathlib.RingTheory.T...
Paracompact.lean
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Yury Kudryashov -/ import Mathlib.Data.Option.Basic import Mathlib.Topology.Separation.Regular /-! # Paracompact topological spaces A topological space `X` is said to b...
AbelRuffini.lean
/- Copyright (c) 2021 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.Analysis.Calculus.LocalExtr.Polynomial import Mathlib.Analysis.Complex.Polynomial.Basic import Mathlib.FieldTheory.AbelRuffini import Mathlib.RingThe...
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...
Matrix.lean
/- Copyright (c) 2025 Bryan Wang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bryan Wang -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Diagonal import Mathlib.Algebra.Algebra.Subalgebra.Basic /-! # Matrix subalgebras In this file we define the sub...
Kernels.lean
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca, Johan Commelin, Kim Morrison -/ import Mathlib.Analysis.Normed.Group.SemiNormedGrp import Mathlib.Analysis.Normed.Group.Quotient import Mathlib.CategoryTheory.Limits.Sha...
ConstMulAction.lean
/- Copyright (c) 2021 Alex Kontorovich, Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex Kontorovich, Heather Macbeth -/ import Mathlib.Algebra.Group.Pointwise.Set.Lattice import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set import Mathlib.Alge...
StronglyRegular.lean
/- Copyright (c) 2021 Alena Gusakov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alena Gusakov, Jeremy Tan -/ import Mathlib.Combinatorics.Enumerative.DoubleCounting import Mathlib.Combinatorics.SimpleGraph.AdjMatrix /-! # Strongly regular graphs ## Main definitio...
TopCommRingCat.lean
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.Category.Ring.Basic import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Algebra.Ring.Basic /-! # Category of topological commuta...
sylow.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 prime bigop finset fingroup morphism. From mat...
Basic.lean
/- Copyright (c) 2025 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Anne Baanen -/ import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.LinearAlgebra.Matrix.Determinant.Basic /-! # Resultant of two polynomials This file contains...