Context
stringlengths
227
76.5k
target
stringlengths
0
11.6k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
16
3.69k
/- Copyright (c) 2023 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.CategoryTheory.Sites.Sieves import Mathlib.CategoryTheory.EffectiveEpi.Basic /-! # Effective epimorphic sieves We define the notion of effective epimorphic (...
lemma Sieve.generateSingleton_eq {X Y : C} (f : Y ⟶ X) : Sieve.generate (Presieve.singleton f) = Sieve.generateSingleton f := by ext Z g constructor · rintro ⟨W,i,p,⟨⟩,rfl⟩ exact ⟨i,rfl⟩ · rintro ⟨g,h⟩ exact ⟨Y,g,f,⟨⟩,h⟩
Mathlib/CategoryTheory/Sites/EffectiveEpimorphic.lean
48
55
/- 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.Data.Nat.Sqrt import Mathlib.Tactic.Common import Mathlib.Data.Int.Init /-! # Square root of integers This file defines the square root function on integers. `...
theorem exists_mul_self (x : ℤ) : (∃ n, n * n = x) ↔ sqrt x * sqrt x = x := ⟨fun ⟨n, hn⟩ => by rw [← hn, sqrt_eq, ← Int.natCast_mul, natAbs_mul_self], fun h => ⟨sqrt x, h⟩⟩
Mathlib/Data/Int/Sqrt.lean
30
31
/- 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.Star.Basic import Mathlib.Algebra.Ring.Pi /-! # `star` on pi types We put a `Star` structure on pi types that operates elementwise, such that it de...
end Function
Mathlib/Algebra/Star/Pi.lean
79
81
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.MeasureTheory.Integral.Lebesgue.Basic import Mathlib.MeasureTheory.Integral.Lebesgue.Countable import Mathlib.MeasureTheory.Integral.Le...
Mathlib/MeasureTheory/Integral/Lebesgue.lean
1,000
1,002
/- 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.Card import Mathlib.Data.Finset.Lattice.Union import Mathlib.Data.Multiset.Powerset import Mathlib.Data.Set.Pairwise.Lattice /-! # The pow...
alias ⟨_, powersetCard_nonempty_of_le⟩ := powersetCard_nonempty
Mathlib/Data/Finset/Powerset.lean
250
251
/- 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.Algebra.BigOperators.Field import Mathlib.Algebra.Order.Chebyshev import Mathlib.Analysis.SpecialFunctions.Pow.Real import Math...
theorem stepBound_mono : Monotone stepBound := fun _ _ h =>
Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean
43
44
/- Copyright (c) 2022 Julian Berman. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Berman -/ import Mathlib.GroupTheory.PGroup import Mathlib.LinearAlgebra.Quotient.Defs /-! # Torsion groups This file defines torsion groups, i.e. groups where all elements hav...
section Module -- A (semi/)ring of scalars and a commutative monoid of elements
Mathlib/GroupTheory/Torsion.lean
130
132
/- 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.Fin.Tuple.Basic /-! # Lists from functions Theorems and lemmas for dealing with `List.ofFn`, which converts a function on `Fin n` to a list of l...
theorem ofFn_mul' {m n} (f : Fin (m * n) → α) : List.ofFn f = List.flatten (List.ofFn fun i : Fin n => List.ofFn fun j : Fin m => f ⟨m * i + j, calc
Mathlib/Data/List/OfFn.lean
86
88
/- 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.Constructions import Mathlib.Data.Set.Notation /-! # Maps between matroids This file defines maps and comaps, which move a matroid on one ty...
inferInstanceAs (M.map f f.injective.injOn).RankPos end mapEmbedding
Mathlib/Data/Matroid/Map.lean
580
582
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel -/ import Mathlib.Topology.Order.Compact import Mathlib.Topology.MetricSpace.ProperSpace import M...
theorem disjoint_nhdsSet_cobounded {s : Set α} (hs : IsCompact s) : Disjoint (𝓝ˢ s) (cobounded α) :=
Mathlib/Topology/MetricSpace/Bounded.lean
223
224
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Ken Lee, Chris Hughes -/ import Mathlib.Algebra.Group.Action.Units import Mathlib.Algebra.Group.Nat.Units import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra...
theorem isCoprime_zero_right : IsCoprime x 0 ↔ IsUnit x := isCoprime_comm.trans isCoprime_zero_left theorem not_isCoprime_zero_zero [Nontrivial R] : ¬IsCoprime (0 : R) 0 :=
Mathlib/RingTheory/Coprime/Basic.lean
62
65
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
Mathlib/Data/List/Basic.lean
1,889
1,892
/- 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.Algebra.BigOperators.Field import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.InnerProductSpace.Defs impor...
Mathlib/Analysis/InnerProductSpace/Basic.lean
1,642
1,652
/- 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...
Mathlib/Topology/MetricSpace/Infsep.lean
509
517
/- 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 -/ import Mathlib.Topology.GDelta.Basic /-! # Baire spaces A topological space is called a *Baire space* if a countable intersection of dense open subsets is den...
/-- Baire theorem: a countable intersection of dense open sets is dense. Formulated here with an index set which is a countable type. -/ theorem dense_iInter_of_isOpen [Countable ι] {f : ι → Set X} (ho : ∀ i, IsOpen (f i))
Mathlib/Topology/Baire/Lemmas.lean
60
63
/- Copyright (c) 2023 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker -/ import Mathlib.Topology.Bases import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Compactness.SigmaCompact /-! # Lindelöf sets and Lindelöf spaces ## Mai...
theorem IsLindelof.compl_mem_sets_of_nhdsWithin (hs : IsLindelof s) {f : Filter X} [CountableInterFilter f] (hf : ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, tᶜ ∈ f) : sᶜ ∈ f := by refine hs.compl_mem_sets fun x hx ↦ ?_ rw [← disjoint_principal_right, disjoint_right_comm, (basis_sets _).disjoint_iff_left] exact hf x hx
Mathlib/Topology/Compactness/Lindelof.lean
60
64
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.BigOperators.Expect import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical import Mathlib.Algebra.O...
Mathlib/Data/NNReal/Basic.lean
721
722
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Mathlib/Data/Matrix/Basic.lean
1,991
1,992
/- Copyright (c) 2017 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Keeley Hoek -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Int.DivMod import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic....
cases hi <| Nat.lt_trans i.castSucc_lt_succ hj · exact succ_injective _ hij
Mathlib/Data/Fin/Basic.lean
1,010
1,011
/- Copyright (c) 2022 Junyan Xu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa, Junyan Xu -/ import Mathlib.Data.DFinsupp.Defs /-! # Locus of unequal values of finitely supported dependent functions Let `N : α → Type*` be a type family, assume that `N ...
theorem nonempty_neLocus_iff {f g : Π₀ a, N a} : (f.neLocus g).Nonempty ↔ f ≠ g := Finset.nonempty_iff_ne_empty.trans neLocus_eq_empty.not theorem neLocus_comm : f.neLocus g = g.neLocus f := by
Mathlib/Data/DFinsupp/NeLocus.lean
56
59
/- 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.Multiset.Dedup import Mathlib.Data.List.Infix /-! # Preparations for defining operations on `Finset`. The operations here ignore multiplicities,...
@[simp] theorem coe_ndunion (l₁ l₂ : List α) : @ndunion α _ l₁ l₂ = (l₁ ∪ l₂ : List α) := rfl
Mathlib/Data/Multiset/FinsetOps.lean
127
129
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Order.Filter.CountablyGenerated import Mathlib.Order.Filter.Prod import Mathlib.Order.Filter.Ultrafilter.Defs /-! # Subsingleton filters We say that...
/-- A filter is a subsingleton iff it is equal to `⊥` or to `pure a` for some `a`. -/ theorem subsingleton_iff_bot_or_pure : l.Subsingleton ↔ l = ⊥ ∨ ∃ a, l = pure a := by refine ⟨fun hl ↦ ?_, ?_⟩ · exact (eq_or_neBot l).imp_right (@Subsingleton.exists_eq_pure _ _ · hl)
Mathlib/Order/Filter/Subsingleton.lean
58
61
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.MeasureTheory.Integral.Lebesgue.Countable import Mathlib.MeasureTheory.Measure.Decomposition.Exhaustion import Mathlib.MeasureTheory.Me...
theorem withDensity_smul_measure (r : ℝ≥0∞) (f : α → ℝ≥0∞) : (r • μ).withDensity f = r • μ.withDensity f := by ext s hs simp [withDensity_apply, hs]
Mathlib/MeasureTheory/Measure/WithDensity.lean
130
135
/- Copyright (c) 2022 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Data.Set.Finite.Lemmas import Mathlib.ModelTheory.Substructures /-! # Finitely Generated First-Order Structures This file defines what it means for a...
theorem FG.cg {N : L.Substructure M} (h : N.FG) : N.CG := by obtain ⟨s, hf, rfl⟩ := fg_def.1 h exact ⟨s, hf.countable, rfl⟩ theorem cg_iff_empty_or_exists_nat_generating_family {N : L.Substructure M} : N.CG ↔ N = (∅ : Set M) ∨ ∃ s : ℕ → M, closure L (range s) = N := by rw [cg_def] constructor · rintro ⟨S...
Mathlib/ModelTheory/FinitelyGenerated.lean
116
135
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Eric Wieser -/ import Mathlib.Algebra.DirectSum.Internal import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolyn...
(X (R := R) i ^ n).IsHomogeneous n := by simpa only [one_mul] using (isHomogeneous_X _ _).pow n
Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
201
203
/- 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.Path import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise import M...
fun t ht hsub => by by_contra hc have fint : Fintype t := ofFinite ↑t have ne : s ≠ t.toFinset := fun a ↦ by subst a; simp_all[Set.coe_toFinset, not_true_eq_false]
Mathlib/Combinatorics/SimpleGraph/Clique.lean
657
660
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Robert Y. Lewis -/ import Mathlib.Algebra.Order.CauSeq.Basic import Mathlib.Algebra.Ring.Action.Rat import Mathlib.Tactic.FastInstance /-! # Cauchy completion This fi...
theorem le_lim {f : CauSeq α abs} {x : α} (h : CauSeq.const abs x ≤ f) : x ≤ lim f := CauSeq.const_le.1 <| CauSeq.le_of_le_of_eq h (equiv_lim f) theorem lt_lim {f : CauSeq α abs} {x : α} (h : CauSeq.const abs x < f) : x < lim f := CauSeq.const_lt.1 <| CauSeq.lt_of_lt_of_eq h (equiv_lim f) theorem lim_lt {f : Cau...
Mathlib/Algebra/Order/CauSeq/Completion.lean
397
405
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Deepro Choudhury, Scott Carnahan -/ import Mathlib.LinearAlgebra.PerfectPairing.Basic import Mathlib.LinearAlgebra.Reflection /-! # Root data and root systems This file con...
Module.bijOn_reflection_of_mapsTo _ <| P.mapsTo_reflection_root i
Mathlib/LinearAlgebra/RootSystem/Defs.lean
288
289
/- 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.Data.PFun import Mathlib.Data.Part /-! # Image of a `Finset α` under a partially defined function In this file we...
Mathlib/Data/Finset/PImage.lean
106
108
/- 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.Topology.UniformSpace.CompleteSeparated import Mathlib.Topology.EMetricSpace.Lipschitz import Mathlib.Topology.MetricSpace.Basic import Mathlib.Topol...
theorem isClosed_range {α β : Type*} [PseudoEMetricSpace α] [EMetricSpace β] [CompleteSpace α] {f : α → β} {K : ℝ≥0} (hf : AntilipschitzWith K f) (hfc : UniformContinuous f) : IsClosed (range f) := (hf.isComplete_range hfc).isClosed
Mathlib/Topology/MetricSpace/Antilipschitz.lean
157
161
/- 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.Logic.Basic import Mathlib.Tactic.Positivity.Basic /-! # Algebraic order homomorphism classes This file defines hom classes for common properties at the ...
extends AddGroupSeminormClass F α β, SubmultiplicativeHomClass F α β /-- `RingNormClass F α` states that `F` is a type of `β`-valued norms on the ring `α`.
Mathlib/Algebra/Order/Hom/Basic.lean
288
291
/- 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, Christopher Hoskin -/ import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Group.Action.Pi import Mathlib.Algebra.Module.Hom import Mathlib.GroupTheory.GroupAction.Ri...
end NonUnitalNonAssocSemiring section NonUnitalNonAssocCommSemiring variable [NonUnitalNonAssocCommSemiring α] /- Left and right multiplication coincide as α is commutative -/ local notation "L" => AddMonoid.End.mulLeft
Mathlib/Algebra/Ring/CentroidHom.lean
499
509
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Group.Action.End import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Action.Prod import Mathlib.Algebra.Group.Subg...
Mathlib/GroupTheory/GroupAction/Basic.lean
391
393
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.InnerProductSpace.Sy...
/-- The orthogonal projection onto a complete subspace. -/ def orthogonalProjection : E →L[𝕜] K := LinearMap.mkContinuous { toFun := fun v => ⟨K.orthogonalProjectionFn v, orthogonalProjectionFn_mem v⟩ map_add' := fun x y => by have hm : K.orthogonalProjectionFn x + K.orthogonalProjectionFn y ∈ K :...
Mathlib/Analysis/InnerProductSpace/Projection.lean
440
447
/- 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.Units.Equiv import Mathlib.Algebra.GroupWithZero.WithZero impo...
lemma zero_eq_bot : (0 : WithZero α) = ⊥ := rfl @[simp, norm_cast] lemma coe_lt_coe : (a : WithZero α) < b ↔ a < b := WithBot.coe_lt_coe
Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
261
264
/- 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.Limits.Constructions.LimitsOfProductsAndEqualizers import Mathlib.CategoryTheory.Limits.FintypeCat import Mathlib.CategoryTheory.Lim...
simp [fiberPullbackEquiv] change ((Types.pullbackIsoPullback _ _).inv ≫ _ ≫ (F ⋙ FintypeCat.incl).map (pullback.snd f g)) _ = _ erw [PreservesPullback.iso_inv_snd, Types.pullbackIsoPullback_inv_snd] /-- The fiber of the binary product is the binary product of the fibers. -/ noncomputable def fiberBinaryProdu...
Mathlib/CategoryTheory/Galois/Basic.lean
273
279
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.Solvable import Mathlib.Algebra.Lie.Quotient import Mathlib.Algebra.Lie.Normalizer import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib....
have h' : (⊤ : LieIdeal R L).map f = ⊤ := by rw [← f.idealRange_eq_map] exact f.idealRange_eq_top_of_surjective h induction k with | zero => simp only [LieModule.lowerCentralSeries_zero]; exact h' | succ k ih => simp only [LieModule.lowerCentralSeries_succ, LieIdeal.map_bracket_eq f h, ih, h']
Mathlib/Algebra/Lie/Nilpotent.lean
835
840
/- 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.AlgebraicTopology.SimplicialObject.Basic import Mathlib.CategoryTheory.Comma.Arrow import Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks import Mathlib.Cat...
Mathlib/AlgebraicTopology/CechNerve.lean
427
430
/- Copyright (c) 2021 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Bhavik Mehta -/ import Mathlib.Analysis.Calculus.Deriv.Support import Mathlib.Analysis.SpecialFunctions.Pow.Deriv import Mathlib.MeasureTheory.Function.Jacobian imp...
Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
1,332
1,349
/- 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 -/ import Mathlib.Data.Finset.BooleanAlgebra import Mathlib.Data.Set.Piecewise import Mathlib.Order.Interval.Set.Basic /-! # Functions defined piecewise on a fins...
lemma piecewise_le_of_le_of_le (hf : f ≤ h) (hg : g ≤ h) : s.piecewise f g ≤ h := fun x => piecewise_cases s f g (· ≤ h x) (hf x) (hg x) lemma le_piecewise_of_le_of_le (hf : h ≤ f) (hg : h ≤ g) : h ≤ s.piecewise f g := fun x =>
Mathlib/Data/Finset/Piecewise.lean
151
155
/- 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.Limits.Constructions.LimitsOfProductsAndEqualizers import Mathlib.CategoryTheory.Limits.FintypeCat import Mathlib.CategoryTheory.Lim...
(PreservesLimitPair.iso (F ⋙ FintypeCat.incl) X Y ≪≫ Types.binaryProductIso (F.obj X) (F.obj Y)).toEquiv @[simp] lemma fiberBinaryProductEquiv_symm_fst_apply {X Y : C} (x : F.obj X) (y : F.obj Y) : F.map prod.fst ((fiberBinaryProductEquiv F X Y).symm (x, y)) = x := by
Mathlib/CategoryTheory/Galois/Basic.lean
281
286
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Orde...
rw [iSup, h.directedOn_range.inf_sSup_eq, iSup_range] protected theorem Directed.iSup_inf_eq (h : Directed (· ≤ ·) f) :
Mathlib/Order/CompactlyGenerated/Basic.lean
399
401
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Floris van Doorn -/ import Mathlib.Algebra.Group.Indicator import Mathlib.Order.Filter.AtTopBot.Basic import Mathlib.Order.Filter.Subsingleton /-! # Functions that ar...
end EventuallyConst lemma eventuallyConst_atTop [SemilatticeSup α] [Nonempty α] : EventuallyConst f atTop ↔ (∃ i, ∀ j, i ≤ j → f j = f i) := (atTop_basis.eventuallyConst_iff' fun _ _ ↦ left_mem_Ici).trans <| by simp only [true_and, mem_Ici]
Mathlib/Order/Filter/EventuallyConst.lean
156
163
/- 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, Violeta Hernández Palacios, Grayson Burton, Floris van Doorn -/ import Mathlib.Order.Antisymmetrization import Mathlib.Order.Hom.WithTopBot import Mathlib.Order.Interval.Se...
/-- If `a < b` then there exist `a' > a` and `b' < b` such that `Set.Iio a'` is strictly to the left
Mathlib/Order/Cover.lean
417
418
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space.Integrable import Mathlib.MeasureTheory.Function.LpSpace.Indicator /-! # Functions integrable on a set an...
Mathlib/MeasureTheory/Integral/IntegrableOn.lean
730
735
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Devon Tuma -/ import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.RingTheory.Coprime.Basic import Mathlib.Tactic....
lemma scaleRoots_zero (p : R[X]) : p.scaleRoots 0 = p.leadingCoeff • X ^ p.natDegree := by ext n simp only [coeff_scaleRoots, ne_eq, tsub_eq_zero_iff_le, not_le, zero_pow_eq, mul_ite,
Mathlib/RingTheory/Polynomial/ScaleRoots.lean
98
101
/- 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 -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Notation.Pi import Mathlib.Data.Set.Lattice import Mathlib.Order.Filter.Defs /-! # Theory of...
Mathlib/Order/Filter/Basic.lean
2,240
2,242
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.Equiv.TransferInstance import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.BigOperators.Ring.Finset...
lemma map_neg_eq_inv (ψ : AddChar A M) (a : A) : ψ (-a) = (ψ a)⁻¹ := by apply eq_inv_of_mul_eq_one_left simp only [← map_add_eq_mul, neg_add_cancel, map_zero_eq_one]
Mathlib/Algebra/Group/AddChar.lean
381
384
/- Copyright (c) 2021 Julian Kuelshammer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Kuelshammer -/ import Mathlib.GroupTheory.OrderOfElement import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Data.Nat.Factorization.B...
exact dvd_trans (Monoid.order_dvd_exponent (g.1)) <| dvd_lcm_left _ _ · rw [Prod.pow_snd, Prod.snd_one, ← orderOf_dvd_iff_pow_eq_one] exact dvd_trans (Monoid.order_dvd_exponent (g.2)) <| dvd_lcm_right _ _ · exact MonoidHom.exponent_dvd (f := MonoidHom.fst M₁ M₂) Prod.fst_surjective · exact MonoidHom...
Mathlib/GroupTheory/Exponent.lean
583
590
/- 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.Algebra.Group.Hom.End import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Group.Subsemigroup.Membership import Mathlib.Algebra.Group...
SetLike.coe_injective <| (coe_srange _).trans Subtype.range_coe variable [NonUnitalNonAssocSemiring S] @[simp] theorem range_fst : NonUnitalRingHom.srange (fst R S) = ⊤ := NonUnitalRingHom.srange_eq_top_of_surjective (fst R S) Prod.fst_surjective @[simp]
Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
695
703
/- 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, Eric Wieser -/ import Mathlib.Data.ENNReal.Holder import Mathlib.MeasureTheory.Function.LpSeminorm.Basic import Mathlib.MeasureTheory.Integral.MeanInequalities import Mathl...
rw [ENNReal.mul_rpow_of_nonneg (hz := hp.le), ENNReal.rpow_inv_rpow hp.ne', ← lintegral_const_mul'' _ (by fun_prop)] simp only [← ENNReal.mul_rpow_of_nonneg (hz := hp.le)] apply lintegral_mono_ae filter_upwards [h, enorm_ae_le_eLpNormEssSup f μ] with x hb hf refine ENNReal.rpow_le_rpow ?_ hp.le gcongr
Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean
199
205
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yaël Dillies -/ import Mathlib.Algebra.Module.BigOperators import Mathlib.GroupTheory.Perm.Basic import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.Lis...
⟨-i, by rw [zpow_neg, ← hi, inv_apply_self]⟩
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
64
64
/- 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, Yury Kudryashov -/ import Mathlib.Order.Filter.Tendsto import Mathlib.Data.Set.Accumulate import Mathlib.Topology.Bornology.Basic import Mathlib.Topolog...
/-- If `X` is a compact topological space, then `Prod.snd : X × Y → Y` is a closed map. -/ theorem isClosedMap_snd_of_compactSpace [CompactSpace X] :
Mathlib/Topology/Compactness/Compact.lean
809
811
/- Copyright (c) 2021 Jordan Brown, Thomas Browning, Patrick Lutz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jordan Brown, Thomas Browning, Patrick Lutz -/ import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.Perm.ViaEmbedding import Mathlib.GroupT...
IsSolvable (G ⧸ H) := solvable_of_surjective (QuotientGroup.mk'_surjective H) instance solvable_prod {G' : Type*} [Group G'] [IsSolvable G] [IsSolvable G'] : IsSolvable (G × G') := solvable_of_ker_le_range (MonoidHom.inl G G') (MonoidHom.snd G G') fun x hx => ⟨x.1, Prod.ext rfl hx.symm⟩ variable (G) i...
Mathlib/GroupTheory/Solvable.lean
135
145
/- 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.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.Probability.Martingale.Upcrossing /-! # Mar...
integrable_condExp.tendsto_eLpNorm_condExp stronglyMeasurable_condExp have heq : ∀ n, ∀ᵐ x ∂μ, (μ[μ[g|⨆ n, ℱ n]|ℱ n]) x = (μ[g|ℱ n]) x := fun n => condExp_condExp_of_le (le_iSup _ n) (iSup_le fun n => ℱ.le n) refine ht.congr fun n => eLpNorm_congr_ae ?_ filter_upwards [heq n] with x hxeq simp only [hxeq...
Mathlib/Probability/Martingale/Convergence.lean
453
461
/- 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.Algebra.Operations import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Lattice import Mathlib.RingTheory.Coprime.Lemmas import Mathlib...
mul_assoc c x (d * y), mul_left_comm x, ← mul_assoc] refine
Mathlib/RingTheory/Ideal/Operations.lean
852
853
/- 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, Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic...
theorem log_ofReal_re (x : ℝ) : (log (x : ℂ)).re = Real.log x := by simp [log_re] theorem log_ofReal_mul {r : ℝ} (hr : 0 < r) {x : ℂ} (hx : x ≠ 0) :
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
70
72
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.Field.IsField import Mathlib.Algebra.GroupWithZero.N...
Mathlib/RingTheory/Localization/Basic.lean
1,371
1,379
/- 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.Probability.Kernel.Disintegration.Unique import Mathlib.Probability.Notation /-! # Regular conditional probability distribution We define the regular con...
@[deprecated (since := "2025-01-24")] alias aestronglyMeasurable'_integral_condDistrib := aestronglyMeasurable_integral_condDistrib end Measurability /-- `condDistrib` is a.e. uniquely defined as the kernel satisfying the defining property of `condKernel`. -/ theorem condDistrib_ae_eq_of_measure_eq_compProd (hX : Mea...
Mathlib/Probability/Kernel/CondDistrib.lean
120
130
/- 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.IntervalIntegral.Basic import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalcul...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
989
995
/- Copyright (c) 2022 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib...
rw [logb, logb, div_lt_div_iff_of_pos_right (log_pos hb)]
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
189
189
/- 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...
@[simp] theorem factorThruKernelSubobject_comp_arrow {W : C} (h : W ⟶ X) (w : h ≫ f = 0) :
Mathlib/CategoryTheory/Subobject/Limits.lean
115
117
/- 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.Limits.Shapes.Pullback.CommSq import Mathlib.CategoryTheory.Limits.Shapes.Diagonal import Mathlib.CategoryTheory.Limits.Final impor...
rw [this] apply P.comp_mem <;> rw [P.cancel_left_of_respectsIso] exacts [baseChange_map _ (Over.homMk _ e₂.symm : Over.mk g ⟶ Over.mk g') h₂, baseChange_map _ (Over.homMk _ e₁.symm : Over.mk f ⟶ Over.mk f') h₁]
Mathlib/CategoryTheory/MorphismProperty/Limits.lean
231
235
/- 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.Function.LpSeminorm.Trim import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Function.StronglyMeasura...
@[elab_as_elim] theorem Lp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : Lp F p μ → Prop) (h_ind : ∀ (c : F) {s : Set α} (hs : MeasurableSet[m] s) (hμs : μ s < ∞), P (Lp.simpleFunc.indicatorConst p (hm s hs) hμs.ne c)) (h_add : ∀ ⦃f g⦄, ∀ hf : MemLp f p μ, ∀ hg : MemLp g p μ, Strongl...
Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
539
549
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Morenikeji Neri -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.EuclideanDomain.Field import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.RingTheor...
simpa only [← mem_iff_generator_dvd S] using is_prime.2⟩ -- Note that the converse may not hold if `ϕ` is not injective. theorem generator_map_dvd_of_mem {N : Submodule R M} (ϕ : M →ₗ[R] R) [(N.map ϕ).IsPrincipal] {x : M}
Mathlib/RingTheory/PrincipalIdealDomain.lean
141
144
/- Copyright (c) 2022 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedd...
_ = (convexBodyLTFactor K) * ∏ w, (f w) ^ (mult w) := by simp_rw [prod_eq_prod_mul_prod, coe_mul, coe_finset_prod, mult_isReal, mult_isComplex, pow_one, ENNReal.coe_pow, ofReal_coe_nnreal] variable {f} /-- This is a technical result: quite often, we want to impose conditions at all infinite places b...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
108
130
/- 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, Kexing Ying -/ import Mathlib.Probability.Notation import Mathlib.Probability.Process.Stopping /-! # Martingales A family of functions `f : ι → Ω → E` is a martingale wit...
Mathlib/Probability/Martingale/Basic.lean
537
560
/- 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.Insert /-! # Subsingleton Defines the predicate `Subsingleton s : Prop`, saying that `s` has at most one element. Also def...
theorem subsingleton_of_univ_subsingleton (h : (univ : Set α).Subsingleton) : Subsingleton α := ⟨fun a b => h (mem_univ a) (mem_univ b)⟩
Mathlib/Data/Set/Subsingleton.lean
68
71
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Yury Kudryashov, Yaël Dillies -/ import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpac...
simp [*] · rintro ⟨a, b, ha, hb, hab, rfl⟩ refine ⟨a / (a + b), b / (a + b), by positivity, by positivity, ?_, rfl⟩
Mathlib/Analysis/Convex/Segment.lean
344
346
/- 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.Analytic.Uniqueness import Mathlib.Analysis.Calculus.DiffContOnCl import Mathlib.Analysis.Calculus.DSlope import Mathlib.Analysis.Calculus.F...
(hd : DifferentiableOn ℂ f (closedBall c R)) (hw : w ∈ ball c R) : (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w := (hd.mono closure_ball_subset_closedBall).diffContOnCl.circleIntegral_sub_inv_smul hw /-- **Cauchy integral formula**: if `f : ℂ → ℂ` is continuous on a closed disc of radius `R` and...
Mathlib/Analysis/Complex/CauchyIntegral.lean
518
525
/- 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, Sébastien Gouëzel -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.MeasureTheory.Function.SimpleFuncDense /-! # Strongly measurable and finitely strongly meas...
[OpensMeasurableSpace α] [TopologicalSpace β] [PseudoMetrizableSpace β] [h : SecondCountableTopologyEither α β] {f : α → β} (hf : Continuous f) : StronglyMeasurable f := by
Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
640
642
/- 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, Johannes Hölzl -/ import Mathlib.Algebra.Order.Group.Unbundled.Basic import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Or...
Mathlib/Algebra/Order/Group/Defs.lean
1,177
1,177
/- 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, Benjamin Davidson -/ import Mathlib.Algebra.Field.NegOnePow import Mathlib.Algebra.Field.Periodic import Mathlib.Algebra.Qua...
(strictAntiOn_cos.le_iff_le ⟨hx₁.trans hxy, hy₂⟩ ⟨hx₁, hxy.trans hy₂⟩).2 hxy
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
558
559
/- 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.Relation import Mathlib.Logic.Unique import Mathlib.Util.Notation3 /-! # Quotient types This module extends the core library's treatment of quo...
/-- Given a class of functions `q : @Quotient (∀ i, α i) _`, returns the class of `i`-th projection `Quotient (S i)`. -/ def Quotient.eval {ι : Type*} {α : ι → Sort*} {S : ∀ i, Setoid (α i)} (q : @Quotient (∀ i, α i) (by infer_instance)) (i : ι) : Quotient (S i) :=
Mathlib/Data/Quot.lean
398
401
/- 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.Group.Indicator import Mathlib.Tactic.FinCases import Mathlib.Topology.Connected.LocallyConnected import Mathlib.Topology.Sets.Closeds /-! # L...
∀ x, ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ ∀ x' ∈ U, f x' = f x] := by tfae_have 1 → 4 := fun h y => h {y} tfae_have 4 → 3 := fun h x => h (f x) tfae_have 3 → 2 := fun h x => IsOpen.mem_nhds (h x) rfl tfae_have 2 → 5 | h, x => by rcases mem_nhds_iff.1 (h x) with ⟨U, eq, hU, hx⟩ exact ⟨U, hU, hx, eq⟩ ...
Mathlib/Topology/LocallyConstant/Basic.lean
42
63
/- 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, Yaël Dillies -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.CompleteLattice.Lemmas import Mathlib.Order.Directed import Mathlib.Order.GaloisConnection.Basic /-...
iInf_sup_le_sup_sInf a s:= sup_sInf_eq.ge
Mathlib/Order/CompleteBooleanAlgebra.lean
222
223
/- 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.Limits.Opposites import Mathlib.CategoryTheory.Limits.Preserves.Limits import Mathlib.CategoryTheory.Limits.Yoneda /-! # Ind- and ...
(colimitHomIsoLimitYoneda F A).hom ≫ limit.π (F.op ⋙ yoneda.obj A) ⟨i⟩ = (coyoneda.map (colimit.ι F i).op).app A := by simp only [colimitHomIsoLimitYoneda, Iso.trans_hom, Iso.app_hom, Category.assoc] erw [limitObjIsoLimitCompEvaluation_hom_π]
Mathlib/CategoryTheory/Limits/IndYoneda.lean
70
73
/- Copyright (c) 2023 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Junyan Xu -/ import Mathlib.Algebra.Category.ModuleCat.Basic import Mathlib.Algebra.Category.Grp.Injective import Mathlib.Topology.Instances.AddCircle import Mathlib.Linea...
lemma exists_character_apply_ne_zero_of_ne_zero {a : A} (ne_zero : a ≠ 0) : ∃ (c : CharacterModule A), c a ≠ 0 :=
Mathlib/Algebra/Module/CharacterModule.lean
211
213
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Morenikeji Neri -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.EuclideanDomain.Field import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.RingTheor...
theorem gcd_dvd_iff_exists (a b : R) {z} : gcd a b ∣ z ↔ ∃ x y, z = a * x + b * y := by simp_rw [mul_comm a, mul_comm b, @eq_comm _ z, ← Ideal.mem_span_pair, ← span_gcd,
Mathlib/RingTheory/PrincipalIdealDomain.lean
437
439
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Mario Carneiro, Isabel Longbottom, Kim Morrison, Apurva Nakade, Yuyang Zhao -/ import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.SetTheory.PGame.Algebra import Mathl...
/-- A small family of games is bounded below. -/ lemma bddBelow_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Game.{u}) : BddBelow (Set.range f) := by obtain ⟨x, hx⟩ := PGame.bddBelow_range_of_small (Quotient.out ∘ f) refine ⟨⟦x⟧, Set.forall_mem_range.2 fun i ↦ ?_⟩ simpa [PGame.le_iff_game_le] using hx <|...
Mathlib/SetTheory/Game/Basic.lean
206
211
/- 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...
lemma iterate_bit1 (hf : Involutive f) (n : ℕ) : f^[2 * n + 1] = f := by
Mathlib/Algebra/Ring/Parity.lean
315
316
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Algebra.GroupWithZero.Action.Defs import Mathlib.Algebra.Order.AddGroupWithTop import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax import Mathlib.Al...
Mathlib/Algebra/Tropical/Basic.lean
569
572
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.ZeroCons /-! # Basic results on multisets -/ -- No algebra should be required assert_not_exists Monoid universe v open List S...
Mathlib/Data/Multiset/Basic.lean
2,954
2,957
/- 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 import Mathlib.Logic.Equiv.Fin.Basic imp...
hasSum hy h'y := hf.hasSum (insert_subset_insert h hy) h'y lemma HasFPowerSeriesOnBall.hasFPowerSeriesWithinOnBall (hf : HasFPowerSeriesOnBall f p x r) : HasFPowerSeriesWithinOnBall f p s x r := by rw [← hasFPowerSeriesWithinOnBall_univ] at hf exact hf.mono (subset_univ _) lemma HasFPowerSeriesWithinAt.mono...
Mathlib/Analysis/Analytic/Basic.lean
645
653
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.TwoDim import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic /-! # Oriented angles. This file defines orie...
angle. -/ @[simp]
Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
247
248
/- 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...
simp_rw [einfsep, iInf_lt_iff, exists_prop] theorem einfsep_ne_top :
Mathlib/Topology/MetricSpace/Infsep.lean
64
66
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Michael Stoll -/ import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic /-! # Legendre symbol This file contains results about Legendre symbols. We define the Le...
theorem sq_one {a : ℤ} (ha : (a : ZMod p) ≠ 0) : legendreSym p a ^ 2 = 1 := quadraticChar_sq_one ha
Mathlib/NumberTheory/LegendreSymbol/Basic.lean
160
161
/- Copyright (c) 2024 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.SetTheory.Cardinal.Arithmetic import Mathlib.SetTheory.Ordinal.Principal /-! # Ordinal arithmetic with cardinals This file co...
Mathlib/SetTheory/Cardinal/Ordinal.lean
277
287
/- Copyright (c) 2023 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Group.Submonoid.BigOperators import Mathlib.GroupTheory.Subsemigroup.Center import Mathlib.RingTheory...
theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t := (NonUnitalSubring.gi R).gc.l_sup
Mathlib/RingTheory/NonUnitalSubring/Basic.lean
523
524
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.Data.List.Basic /-! # Double universal quantification on a list This file provides an API for `List.Forall₂` (definition in `Data.Lis...
theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map | _, _, _, [], [], Forall₂.nil => Forall₂.nil | _, _, h, _ :: _, _ :: _, Forall₂.cons h₁ h₂ => Forall₂.cons (h h₁) (rel_map (@h) h₂) theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) (· ++ ·) (· ++ ·) | [], [], _, _, _, hl => hl | _, _, Forall₂...
Mathlib/Data/List/Forall2.lean
203
216
/- 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, Patrick Massot, Yury Kudryashov, Rémy Degenne -/ import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra....
Mathlib/Algebra/Order/Interval/Set/Group.lean
282
283
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Sébastien Gouëzel, Yury Kudryashov, Dylan MacKenzie, Patrick Massot -/ import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Power import M...
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] variable {b : ℝ} {f : ℕ → ℝ} {z : ℕ → E} /-- **Dirichlet's test** for monotone sequences. -/ theorem Monotone.cauchySeq_series_mul_of_tendsto_zero_of_bounded (hfa : Monotone f) (hf0 : Tendsto f atTop (𝓝 0)) (hgb : ∀ n, ‖∑ i ∈ range n, z i‖ ≤ b) : ...
Mathlib/Analysis/SpecificLimits/Normed.lean
673
689
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Finite.Prod import Mathlib.Data.Matroid.Init import Mathlib.Data.Set.Card import Mathlib.Data.Set.Finite.Powerset import Mathlib.Order.UpperLower.Clos...
rw [ncard_def B₁, hB₁.encard_eq_encard_of_isBase hB₂, ← ncard_def]
Mathlib/Data/Matroid/Basic.lean
427
428
/- 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.Algebra.Pi import Mathlib.Algebra.Algebra.Prod import Mathlib.Algebra.Algebra.Subalgebra.Lattice impo...
theorem aeval_prod_apply (x : A × B) (p : Polynomial R) : p.aeval x = (p.aeval x.1, p.aeval x.2) := by simp [aeval_prod]
Mathlib/Algebra/Polynomial/AlgebraMap.lean
370
372
/- Copyright (c) 2023 Dagur Asgeirsson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Dagur Asgeirsson -/ import Mathlib.Topology.Category.Profinite.Nobeling.Basic import Mathlib.Topology.Category.Profinite.Nobeling.Induction import Mathlib.Topology.Category.Profinite...
Mathlib/Topology/Category/Profinite/Nobeling.lean
129
139
/- 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.PrincipalIdealDomain /-! # Bézout rings A Bézout ring (Bezout ring) is a ring whose finitely generated ideals are principal. Notable examples i...
tfae_have 1 → 2 | _ => inferInstance tfae_have 2 → 3 | _ => inferInstance tfae_have 3 → 4 | _ => inferInstance tfae_have 4 → 1 | ⟨h⟩ => by rw [isNoetherianRing_iff, isNoetherian_iff_fg_wellFounded] refine ⟨RelEmbedding.wellFounded ?_ h⟩ have : ∀ I : { J : Ideal R // J.F...
Mathlib/RingTheory/Bezout.lean
53
78
/- 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, Yury Kudryashov, Sébastien Gouëzel, Chris Hughes -/ import Mathlib.Data.Fin.Rev import Mathlib.Data.Nat.Find /-! # Operation on tuples We interpret maps `∀ i : Fi...
g ∘ snoc q y = snoc (g ∘ q) (g y) := by ext j by_cases h : j.val < n · simp [h, snoc, castSucc_castLT] · rw [eq_last_of_not_lt h] simp
Mathlib/Data/Fin/Tuple/Basic.lean
624
630
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel -/ import Mathlib.Topology.Order.Compact import Mathlib.Topology.MetricSpace.ProperSpace import M...
/-- A totally bounded set is bounded -/ theorem _root_.TotallyBounded.isBounded {s : Set α} (h : TotallyBounded s) : IsBounded s := -- We cover the totally bounded set by finitely many balls of radius 1,
Mathlib/Topology/MetricSpace/Bounded.lean
142
144
/- 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.Finset.Fold import Mathlib.Data.Multiset.Bind import Mathlib.Order.SetNotation /-! # Unions of finite sets This file defines the union of a fami...
obtain ⟨xb, hfb, hgb⟩ := mem_disjiUnion.mp hxb refine disjoint_left.mp (h2 (mem_disjiUnion.mpr ⟨_, a.prop, hfa⟩) (mem_disjiUnion.mpr ⟨_, b.prop, hfb⟩) ?_) hga hgb rintro rfl exact disjoint_left.mp (h1 a.prop b.prop <| Subtype.coe_injective.ne hab) hfa hfb ...
Mathlib/Data/Finset/Union.lean
76
90
/- Copyright (c) 2020 Devon Tuma. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Devon Tuma -/ import Mathlib.Probability.ProbabilityMassFunction.Basic /-! # Monad Operations for Probability Mass Functions This file constructs two operations on `PMF` ...
rw [toPMF_eq_iff_toMeasure_eq, toMeasure_pure]
Mathlib/Probability/ProbabilityMassFunction/Monad.lean
92
93