filename
stringlengths
5
42
content
stringlengths
15
319k
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.CoalgCat.Basic import Mathlib.Algebra.Category.AlgCat.Basic import Mathlib.RingTheory.Bialgebra.Equiv /-! # The category of bia...
ApplyWith.lean
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Init import Lean.Elab.Eval import Lean.Elab.Tactic.ElabTerm /-! # The `applyWith` tactic The `applyWith` tactic is like `apply`, but allows passing a ...
presentation.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. From mathcomp Require Import fintype finset fingroup morphism. (**********************...
Find.lean
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Floris van Doorn -/ import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Basic /-! # Explicit least witnesses to existentials on positive natural numbers Implement...
Regular.lean
/- Copyright (c) 2021 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Floris van Doorn, Yury Kudryashov -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Group.MeasurableEquiv /-! # Regular...
DomCoprod.lean
/- 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.Group.Subgroup.Finite import Mathlib.GroupTheory.Coset.Card import Mathlib.GroupTheory.GroupAction.Quotient import Mathlib.GroupTheory.Perm.Basic imp...
Pi.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.Data.Finset.Lattice.Prod import Mathlib.Data.Finset.Pi /-! # Lattice operations on finsets of functions This file is concerned with folding binary la...
Core.lean
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Mario Carneiro -/ import Qq.MetaM import Mathlib.Logic.Nontrivial.Basic import Mathlib.Tactic.Attr.Core /-! # The `nontriviality` tactic. -/ universe u namespa...
Topology.lean
/- Copyright (c) 2020 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Johan Commelin -/ import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Ideal import Mathlib.Topology.Category.TopCat.Basic import Mathlib.Topology.Sets.Opens import Mathlib....
PairwiseIntersections.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.CategoryTheory.Category.Pairwise import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts import Mathlib.CategoryTheory.Limits.Final import Mathli...
Topology.lean
/- Copyright (c) 2020 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.Idempotent import Mathlib.Order.Heyting.Hom import Mathlib.RingTheory.Finiteness.Ideal import Mathlib.RingTheory.Ideal.MinimalPrime....
ChangeOfRings.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.Category.ModuleCat.ChangeOfRings import Mathlib.Algebra.Category.ModuleCat.Presheaf /-! # Change of presheaf of rings In this file, we define the restr...
CountHeartbeats.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.Init import Lean.Util.Heartbeats import Lean.Meta.Tactic.TryThis /-! Defines a command wrapper that prints the number of heartbeats used in the enclosed c...
choice.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. (**************************************************...
fingroup.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 fintype div path...
Normalize.lean
/- Copyright (c) 2024 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.Tactic.CategoryTheory.Coherence.Normalize import Mathlib.Tactic.CategoryTheory.Monoidal.Datatypes /-! # Normalization of morphisms in monoidal categories T...
Abs.lean
/- Copyright (c) 2024 Etienne Marion. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Etienne Marion -/ import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.InnerProductSpace.Calculus /-! # Derivative of the absolute value This file compiles basic deriva...
Between.lean
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Segment import...
ProjIcc.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 -/ import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.OrdConnected /-! # Projection of a line onto a closed interval Given a linearly...
choose_reduction.lean
import Mathlib.Data.Finset.Basic /-! Tests that `List.choose` and friends all reduce appropriately. Previously this was blocked by reducibility issues with `And.rec` (https://leanprover.zulipchat.com/#narrow/stream/236446-Type-theory/topic/And.2Erec/near/398483665). -/ namespace List lemma foo : ∃ x, x ∈ ([0,3] : Li...
Bounds.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.Basic import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Group.Unbundled.Basic /-! # Least upper boun...
Prod.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.Algebra.Order.Monoid.Prod import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Ring.Prod /-! # Products of ordered rings -/ variable {α β : Type...
Preimmersion.lean
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.AlgebraicGeometry.Morphisms.UnderlyingMap import Mathlib.AlgebraicGeometry.Morphisms.SurjectiveOnStalks /-! # Preimmersions of schemes A morphism of schem...
OpenPos.lean
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms import Mathlib.MeasureTheory.Measure.Typeclasse...
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...
qfpoly.v
From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice. From mathcomp Require Import fintype tuple div bigop binomial finset finfun. From mathcomp Require Import ssralg countalg finalg poly polydiv qpoly perm. From mathcomp Require Import fingroup falgebra fiel...
test_guard.v
From mathcomp Require Import all_boot. Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive. Inductive tree := Node { children : seq tree }. Inductive ptree (T : Type) := singleton of T | branch of list (ptree T). (* has *) Fixpoint tree_has (T : Type) (p : pred T) (t : ptree T) : bool :...
Vector.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fintype.Pi import Mathlib.Data.Sym.Basic /-! # `Vector α n` and `Sym α n` are fintypes when `α` is. -/ open List (Vector) variable {α : Type*} ...
OverClass.lean
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Tactic.CategoryTheory.Reassoc import Mathlib.CategoryTheory.Comma.Over.Basic /-! # Typeclasses for `S`-objects and `S`-morphisms **Warning**: This is not u...
FlexibleLinter.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.Tactic.Linter.Header /-! # The "flexible" linter The "flexible" linter makes sure that a "rigid" tactic (such as `rw`) does n...
Basic.lean
/- Copyright (c) 2025 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.OfAssociative import Mathlib.LinearAlgebra.RootSystem.CartanMatrix /-! # Geck's construction of a Lie algebra associated to a root system This ...
Vitali.lean
/- Copyright (c) 2021 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.Constructions.BorelSpace.Basic import Mathlib.MeasureTheory.Covering.VitaliFamily import Mathlib.Data.Set.Pairwise.Lattice /-! # V...
ModEq.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.Algebra.Order.Group.Nat import Mathlib.Algebra.Order.GroupWithZero.Canonical import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Ring.Divi...
Core.lean
/- Copyright (c) 2024 Tomáš Skřivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomáš Skřivan -/ import Mathlib.Tactic.FunProp.Theorems import Mathlib.Tactic.FunProp.ToBatteries import Mathlib.Tactic.FunProp.Types import Mathlib.Lean.Expr.Basic import Batteries.Tac...
interval_inference.v
(* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *) From HB Require Import structures. From mathcomp Require Import ssreflect ssrfun ssrbool ssrnat eqtype choice. From mathcomp Require Import order ssralg ssrnum ssrint interval. (**md********************************************************...
Basic.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.Algebra.GroupWithZero.Hom import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Ring.Defs /-! # Algebraic order homomorphism classes This file de...
SuccPred.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 -/ import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.SuccPred /-! # Successors and predecessors of integers In this file, we show that `ℤ` is both an archimede...
Fractions.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.Homology.DerivedCategory.HomologySequence import Mathlib.Algebra.Homology.Embedding.CochainComplex /-! # Calculus of fractions in the derived category ...
Composition.lean
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang, Joël Riou -/ import Mathlib.CategoryTheory.MorphismProperty.Basic /-! # Compatibilities of properties of morphisms with respect to composition Given `P : MorphismProperty C...
CompleteMetrizable.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, Yury Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Tactic.Finiteness import Mathlib.Topology.Metrizable.Uniformity /-! # First Baire ...
Grothendieck.lean
/- Copyright (c) 2025 Calle Sönne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle Sönne, Fernando Chu, Christian Merten -/ import Mathlib.CategoryTheory.Bicategory.Grothendieck import Mathlib.CategoryTheory.FiberedCategory.HasFibers /-! # The Grothendieck const...
FinRange.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, Kim Morrison, Alex Keizer -/ import Mathlib.Data.List.OfFn import Batteries.Data.List.Perm import Mathlib.Data.List.Nodup /-! # Lists of elements of `Fin n`...
ULift.lean
/- Copyright (c) 2025 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.Group.ULift import Mathlib.Algebra.Regular.SMul /-! # Results about `IsRegular` and `ULift` -/ universe u v variable {α} {R : Type v} namespace U...
Monoid.lean
/- Copyright (c) 2020 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri -/ import Mathlib.Geometry.Manifold.ContMDiffMap import Mathlib.Geometry.Manifold.MFDeriv.Basic /-! # `C^n` monoid A `C^n` monoid is a monoid that is also a `C^n` m...
SpreadingOut.lean
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.AlgebraicGeometry.Morphisms.FiniteType import Mathlib.AlgebraicGeometry.Noetherian import Mathlib.AlgebraicGeometry.Stalk import Mathlib.AlgebraicGeometry.Pr...
Flat.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.AlgebraicGeometry.Morphisms.RingHomProperties import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact import Mathlib.AlgebraicGeometry.Morphisms.Af...
Tilde.lean
/- Copyright (c) 2024 Weihong Xu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Johan Commelin, Amelia Livingston, Sophie Morel, Jujian Zhang, Weihong Xu -/ import Mathlib.Algebra.Module.LocalizedModule.Basic import Mathlib.AlgebraicGeometry.StructureS...
ssrAC.v
From HB Require Import structures. From Corelib Require Import PosDef. (* use #[warning="-hiding-delimiting-key"] attribute once we require Coq 8.18 *) (* (the warning was completely removed in 9.0) *) Set Warnings "-hiding-delimiting-key". From mathcomp Require Import ssreflect ssrbool ssrfun ssrnat eqtype seq bigop. ...
ComputeDegree.lean
/- Copyright (c) 2023 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Polynomial.Degree.Lemmas /-! # `compute_degree` and `monicity`: tactics for explicit polynomials This file defines two related tactics: `comp...
Minpoly.lean
/- Copyright (c) 2020 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.FieldTheory.Minpoly.Field /-! # Eigenvalues are the roots of the minimal polynomial. ## Tags e...
NatFactorial.lean
/- Copyright (c) 2023 Sebastian Zimmer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sebastian Zimmer -/ import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Tactic.NormNum /-! # `norm_num` extensions for factorials Extensions for `norm_num` that compute `Nat.fac...
classfun.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...
Basic.lean
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.FieldTheory.Galois.Basic import Mathlib.FieldTheory.Minpoly.MinpolyDiv import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure import Mathlib.FieldTheory.Pur...
primitive_action.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. From mathcomp Require Import div seq fintype tuple finset. From mathcomp Require Import fin...
Basic.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.Option.Defs import Mathlib.Control.Functor import Batteries.Data.List.Basic import Mathlib.Control.Basic /-! # Traversable type class Type classes for...
Exact.lean
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Adam Topaz, Johan Commelin, Jakob von Raumer -/ import Mathlib.Algebra.Homology.ImageToKernel import Mathlib.Algebra.Homology.ShortComplex.Exact import Mathlib.CategoryTh...
Algebra.lean
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Bhavik Mehta -/ import Mathlib.CategoryTheory.Monad.Basic import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.Functor.EpiMono /-! # Eilenberg-Moor...
IsPrincipal.lean
/- Copyright (c) 2024 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.RingTheory.PrincipalIdealDomain /-! # Principal Ideals This file deals with the set of principal ideals of a `CommRing R`. ## Main definitions and res...
CircleAddChar.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.SpecialFunctions.Complex.Circle import Mathlib.NumberTheory.LegendreSymbol.AddCharacter import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyCl...
Chebyshev.lean
/- Copyright (c) 2023 Mantas Bakšys, Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mantas Bakšys, Yaël Dillies -/ import Mathlib.Algebra.Order.Monovary import Mathlib.Algebra.Order.Rearrangement import Mathlib.GroupTheory.Perm.Cycle.Basic import Mathlib....
EGauge.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.Analysis.Seminorm import Mathlib.GroupTheory.GroupAction.Pointwise /-! # The Minkowski functional, normed field version In this file we define `(eg...
ConvergenceRadius.lean
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed /-! # Radius of convergence of a power ...
algnum.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...
Lemmas.lean
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl -/ import Mathlib.Algebra.Order.GroupWithZero.Finset import Mathlib.Analysis.Normed.Group.Bounded import Mathlib.Analysis.Normed.Group.Int import Mathlib...
Infsep.lean
/- Copyright (c) 2022 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Topology.MetricSpace.Basic /-! # Infimum separation This file defines the extended infimum separation of a set. This is approximately dual to the diame...
prime.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 path. From mathcomp Require Import choice fintype div bigop. (*************************...
Basic.lean
/- Copyright (c) 2017 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Mario Carneiro -/ import Mathlib.Algebra.Ring.CharZero import Mathlib.Algebra.Star.Basic import Mathlib.Data.Real.Basic import Mathlib.Order.Interval.Set.UnorderedInterva...
Functor.lean
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Simon Hudon, Kim Morrison -/ import Mathlib.Control.Bifunctor import Mathlib.Logic.Equiv.Defs /-! # Functor and bifunctors can be applied to `Equiv`s. We define ```le...
DeriveTraversable.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.Control.Traversable.Lemmas import Lean.Elab.Match import Lean.Elab.Deriving.Basic import Lean.Elab.PreDefinition.Main /-! # Deriving handler for `Traversabl...
ApplyAt.lean
import Mathlib.Tactic.ApplyAt import Mathlib.Algebra.Group.Basic import Mathlib.Data.Real.Basic example {α β : Type*} (f : α → β) (a : α) : β := by apply f at a guard_hyp a :ₛ β exact a /-- `apply at` cannot clear mvarid if still used. -/ example {α : Type} (γ : α → Type) (a : α) (f : α → γ a) : γ a := by app...
Orzech.lean
/- Copyright (c) 2018 Mario Carneiro, Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Buzzard -/ import Mathlib.Algebra.Module.Submodule.IterateMapComap import Mathlib.Order.PartialSups import Mathlib.RingTheory.Noetherian.Basic impo...
Clique.lean
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Combinatorics.SimpleGraph.Paths import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise import ...
Ext.lean
/- Copyright (c) 2024 Raghuram Sundararajan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Raghuram Sundararajan -/ import Mathlib.Algebra.Ring.Defs import Mathlib.Algebra.Group.Ext /-! # Extensionality lemmas for rings and similar structures In this file we prove e...
Lat.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.PartOrd import Mathlib.Order.Hom.Lattice /-! # The category of lattices This defines `Lat`, the category of lattices. Note that `Lat` doe...
Map.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.Subgroup.Lattice import Mathlib.Algebra.Group.TypeTags.Hom /-! # `map` and `comap` for subgroups We prove results about images and preimages ...
Nat.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 -/ import Mathlib.Algebra.Group.Embedding import Mathlib.Order.Interval.Finset.SuccPred import Mathlib.Order.Interval.Multiset /-! # Finite intervals of naturals This file...
Deligne.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.SpecialFunctions.Gamma.Beta /-! # Deligne's archimedean Gamma-factors In the theory of L-series one frequently encounters the following fun...
Unitor.lean
/- Copyright (c) 2024 Shanghe Chen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shanghe Chen -/ import Mathlib.CategoryTheory.Products.Basic import Mathlib.CategoryTheory.Discrete.Basic /-! # The left/right unitor equivalences `1 × C ≌ C` and `C × 1 ≌ C`. -/ unive...
Inclusion.lean
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Basic /-! # Lemmas about `inclusion`, the injection of subtypes induced by `⊆` -/ open Function namespace Set variable {α...
EilenbergMoore.lean
/- Copyright (c) 2022 Julian Kuelshammer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Kuelshammer -/ import Mathlib.CategoryTheory.Preadditive.Basic import Mathlib.CategoryTheory.Monad.Algebra import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor /-! # P...
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...
LawsonTopology.lean
/- Copyright (c) 2023 Christopher Hoskin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Christopher Hoskin -/ import Mathlib.Topology.Order.LowerUpperTopology import Mathlib.Topology.Order.ScottTopology /-! # Lawson topology This file introduces the Lawson topology...
Basic.lean
/- Copyright (c) 2023 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.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Add import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calcul...
MonoidalComp.lean
/- Copyright (c) 2022. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Yuma Mizuno, Oleksandr Manzyuk -/ import Mathlib.CategoryTheory.Monoidal.Category /-! # Monoidal composition `⊗≫` (composition up to associators) We provide `f ⊗≫ g`, the `monoidalCom...
InitialSeg.lean
/- Copyright (c) 2025 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Order.InitialSeg /-! # Intervals as initial segments We show that `Set.Iic` and `Set.Iio` are respectively initial and principal segments, and that any princip...
Lex.lean
/- Copyright (c) 2025 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.Data.Prod.Lex import Mathlib.Data.Sum.Order import Mathlib.Order.Hom.Set import Mathlib.Order.RelIso.Set /-! # Lexicographic o...
Retract.lean
/- Copyright (c) 2024 Jack McKoen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jack McKoen -/ import Mathlib.CategoryTheory.Comma.Arrow import Mathlib.CategoryTheory.EpiMono /-! # Retracts Defines retracts of objects and morphisms. -/ universe v v' u u' namespa...
IntermediateField.lean
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.Algebra.CharP.Algebra import Mathlib.FieldTheory.IntermediateField.Basic /-! # Characteristic of intermediate fields This file contains some convenient instances fo...
Basic.lean
/- Copyright (c) 2024 Elliot Dean Young and Jiazhen Xia. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jiazhen Xia, Elliot Dean Young, Joël Riou -/ import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.Topology.Category.TopCat.Sphere import Mathlib.Algeb...
Defs.lean
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Ring.Subring.Defs import Mathlib.Algebra.Order.Ring.Unbundled.Rat /-! # Subfields Let `K` be a division ring, fo...
Augmented.lean
/- Copyright (c) 2025 Robin Carlier. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Carlier -/ import Mathlib.CategoryTheory.WithTerminal.Basic import Mathlib.AlgebraicTopology.SimplexCategory.Basic import Mathlib.AlgebraicTopology.SimplicialObject.Basic /-! # T...
FundamentalCone.lean
/- Copyright (c) 2024 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.RingTheory.Ideal.IsPrincipal import Mathlib.NumberTheory.NumberField.Units.DirichletTheorem import Mathlib.RingTheory.ClassGroup /-! # Fundamental Cone ...
Products.lean
/- Copyright (c) 2021 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Comma.Over.Basic import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.Monad.Algebra /-! # Algebras for ...
NegMulLog.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.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.Convex.Deriv /-! # The function `x ↦ ...
abelian.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 choice div fintype finfun bigop finset prime. From ma...
CoherentTopology.lean
/- Copyright (c) 2023 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Nikolas Kuhn -/ import Mathlib.CategoryTheory.Sites.Coherent.CoherentSheaves /-! # Description of the covering sieves of the coherent topology This file characterises the cov...
Option.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.Data.Finset.Option import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Lemmas about products and sums over finite sets in `Option α` In th...
Encodable.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, Mario Carneiro -/ import Mathlib.Logic.Encodable.Basic import Mathlib.Data.Rat.Init /-! # The rationals are `Encodable`. As a consequence we also get the instance `Co...
ssrmatching.v
From Corelib Require Export ssrmatching.
antidiagonal.lean
import Mathlib.Algebra.Order.Antidiag.Finsupp import Mathlib.Data.Finset.Sort import Mathlib.Data.Finsupp.Notation import Mathlib.Data.Fin.Tuple.NatAntidiagonal /-! # Testing computability (and runtime) of antidiagonal -/ open Finset section -- set_option trace.profiler true set_option linter.style.commandStart fal...