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 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.TensorProduct.Graded.External import Mathlib.RingTheory.GradedAlgebra.Basic /-! # Graded tensor products over graded algebras The graded tens...
convert tmul_coe_mul_zero_coe_tmul 𝒜 ℬ a₁ (GradedMonoid.GOne.one (A := (ℬ ·))) (GradedMonoid.GOne.one (A := (𝒜 ·))) b₂ · rw [SetLike.coe_gOne, mul_one] · rw [SetLike.coe_gOne, one_mul] /-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
222
227
/- Copyright (c) 2020 Kenji Nakagawa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenji Nakagawa, Anne Baanen, Filippo A. E. Nuccio -/ import Mathlib.Algebra.Algebra.Subalgebra.Pointwise import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.RingTheory.Spect...
end PID section primesOverFinset open UniqueFactorizationMonoid Ideal open scoped Classical in /-- The finite set of all prime factors of the pushforward of `p`. -/ noncomputable abbrev primesOverFinset {A : Type*} [CommRing A] (p : Ideal A) (B : Type*) [CommRing B] [IsDedekindDomain B] [Algebra A B] : Finset (...
Mathlib/RingTheory/DedekindDomain/Ideal.lean
1,451
1,468
/- 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, Jens Wagemaker, Aaron Anderson -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.EuclideanDomain.Int import Mathlib.Algebra.GCDMonoid.Nat import Ma...
@[deprecated "use `isCoprime_iff_gcd_eq_one.symm` instead" (since := "2025-01-23")] theorem gcd_eq_one_iff_coprime {a b : ℤ} : Int.gcd a b = 1 ↔ IsCoprime a b := isCoprime_iff_gcd_eq_one.symm theorem isCoprime_iff_nat_coprime {a b : ℤ} : IsCoprime a b ↔ Nat.Coprime a.natAbs b.natAbs := by rw [isCoprime_iff_gcd_eq...
Mathlib/RingTheory/Int/Basic.lean
33
46
/- 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.Data.List.Duplicate import Mathlib.Data.List.Sort /-! # Equivalence between `Fin (length l)` and elements of a list Given a list `l`, * if `l` has...
rw [Nat.sub_le_sub_iff_right, OrderEmbedding.le_iff_le, Nat.succ_le_succ_iff] rw [Nat.succ_le_iff, OrderEmbedding.lt_iff_lt] exact b.succ_pos have : ∀ ix, tl[ix]? = (l'.drop (f 0 + 1))[f' ix]? := by intro ix rw [List.getElem?_drop, OrderEmbedding.coe_ofMapLEIff, Nat.add_sub_cancel', ← hf] ...
Mathlib/Data/List/NodupEquivFin.lean
116
140
/- Copyright (c) 2019 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.Cover import Mathlib.Order.Interval.Finset.Defs /-! # Intervals as finsets This file provides basic results about all the `Finset.Ixx...
classical rw [cons_eq_insert, Ioi_insert]
Mathlib/Order/Interval/Finset/Basic.lean
742
743
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Aurélien Saue, Anne Baanen -/ import Mathlib.Tactic.NormNum.Inv import Mathlib.Tactic.NormNum.Pow import Mathlib.Util.AtomM /-! # `ring` tactic A tactic for solving e...
theorem pow_add {b₁ b₂ : ℕ} {d : R}
Mathlib/Tactic/Ring/Basic.lean
870
871
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Justus Springer -/ import Mathlib.Topology.Category.TopCat.OpenNhds import Mathlib.Topology.Sheaves.SheafCondition.UniqueGluing /-! # Stalks For a presheaf `F` on a topol...
F.stalkSpecializes h' ≫ F.stalkSpecializes h = F.stalkSpecializes (h.trans h') := by ext simp @[reassoc (attr := simp), elementwise (attr := simp)]
Mathlib/Topology/Sheaves/Stalks.lean
354
358
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Zero /-! # Short complexes This file defines the category `ShortComplex C` of diagrams `X₁ ⟶ X₂ ⟶ X₃` such that the com...
/-- The short complex in `D` obtained by applying a functor `F : C ⥤ D` to a
Mathlib/Algebra/Homology/ShortComplex/Basic.lean
162
163
/- 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.Group.Abs import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Algebra.Order.Ring.Int import Mathlib.A...
Mathlib/Algebra/Order/Ring/Abs.lean
275
278
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies -/ import Mathlib.Algebra.GeomSum import Mathlib.Data.Finset.Slice import Mathlib.Data.Nat.BitIndices import Mathlib.Order.SupClosed import Math...
rintro b hb by_cases b ∈ t · exact ht _ ‹_› · obtain ⟨c, hct, -, hbc⟩ := hst hb ‹_› exact hbc.trans_lt <| ht _ hct /-- `s ≤ {a}` in colex iff all elements of `s` are strictly less than `a`, except possibly `a` in
Mathlib/Combinatorics/Colex.lean
181
187
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Degree.Domain import Mathlib.Algebra.Polynomial.Degree.Support import Mathlib.Algebra.Poly...
rw [derivative_pow, derivative_X_sub_C, mul_one] theorem derivative_X_sub_C_sq (c : R) : derivative ((X - C c) ^ 2) = C 2 * (X - C c) := by
Mathlib/Algebra/Polynomial/Derivative.lean
620
622
/- Copyright (c) 2020 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis, Eric Wieser -/ import Mathlib.LinearAlgebra.Multilinear.TensorProduct import Mathlib.Tactic.AdaptationNote import Mathlib.LinearAlgebra.Multilinear.Curry /-! # Tenso...
open Function in protected theorem map_update_smul [DecidableEq ι] (i : ι) (c : R) (u : s i →ₗ[R] t i) :
Mathlib/LinearAlgebra/PiTensorProduct.lean
560
562
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.MeasureTheory.OuterMeasure.Operations import Mathlib.Analysis.SpecificLimits.Basic /-! # Outer measures from functions Given an arbit...
rw [boundedBy , le_ofFunction, forall_congr']; intro s rcases s.eq_empty_or_nonempty with h | h <;> simp [h, Set.not_nonempty_empty] theorem le_boundedBy' {μ : OuterMeasure α} : μ ≤ boundedBy m ↔ ∀ s : Set α, s.Nonempty → μ s ≤ m s := by
Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
275
279
/- Copyright (c) 2018 Louis Carlin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Louis Carlin, Mario Carneiro -/ import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.Grou...
rw [xgcd_zero_left, gcd_zero_left]) fun x y h IH s t s' t' => by simp only [xgcdAux_rec h, if_neg h, IH] rw [← gcd_val]
Mathlib/Algebra/EuclideanDomain/Basic.lean
176
179
/- Copyright (c) 2021 Devon Tuma. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Devon Tuma -/ import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Analysis.Asymptotics.Lemmas /-! # Super-Polynomial Function Decay This file defines a predicate `Asymptotics.Supe...
⟨fun h z => Tendsto.isBoundedUnder_le (Tendsto.abs (h z)), fun h => (superpolynomialDecay_iff_abs_tendsto_zero l k f).2 fun z => ?_⟩ obtain ⟨m, hm⟩ := h (z + 1) have h1 : Tendsto (fun _ : α => (0 : β)) l (𝓝 0) := tendsto_const_nhds
Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
199
202
/- Copyright (c) 2023 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir -/ import Mathlib.Algebra.Exact import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Ideal.Quotient.Defs import Mathlib.RingTheory.TensorProduct...
{N' P' : Type*} [AddCommMonoid N'] [AddCommMonoid P'] [Module R N'] [Module R P'] {g' : N' →ₗ[R] P'} (hg' : Function.Surjective g')
Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean
169
171
/- Copyright (c) 2018 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Mario Carneiro, Kim Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.Limits.Cones import Batteries.Tactic.Congr /-...
right_inv := by aesop_cat @[simp]
Mathlib/CategoryTheory/Limits/IsLimit.lean
165
167
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Kevin Buzzard, Jujian Zhang, Fangming Li -/ import Mathlib.Algebra.DirectSum.Algebra import Mathlib.Algebra.DirectSum.Decomposition import Mathlib.Algebra.DirectSum.Internal ...
variable {ι : Type*} [DecidableEq ι] [AddMonoid ι] variable {M : ι → Submodule R A} [SetLike.GradedMonoid M] -- The following lines were given on Zulip by Adam Topaz
Mathlib/RingTheory/GradedAlgebra/Basic.lean
352
355
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow, Kexing Ying -/ import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.LinearAlgebra.BilinearForm.Properties /-! # Bilinear form This file defines ort...
intro s w hs i hi have : B (s.sum fun i : n => w i • v i) (v i) = 0 := by rw [hs, zero_left] have hsum : (s.sum fun j : n => w j * B (v j) (v i)) = w i * B (v i) (v i) := by apply Finset.sum_eq_single_of_mem i hi intro j _ hij rw [iIsOrtho_def.1 hv₁ _ _ hij, mul_zero]
Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
109
114
/- 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.Hom.Basic /-! # Bounded order homomorphisms This file defines (bounded) order homomorphisms. We use the `DFunLike` design, so each type of morphis...
@[coe] def TopHomClass.toTopHom [Top α] [Top β] [TopHomClass F α β] (f : F) : TopHom α β := ⟨f, map_top f⟩
Mathlib/Order/Hom/Bounded.lean
146
149
/- 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....
Mathlib/Data/Fin/Basic.lean
1,749
1,751
/- 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.GeomSum import Mathlib.Algebra.GroupWithZero.Action.Defs import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.NoZeroSMulDiviso...
alias IsNilpotent.eq_zero_of_isIdempotentElem := IsIdempotentElem.eq_zero_of_isNilpotent instance [Zero R] [Pow R ℕ] [Zero S] [Pow S ℕ] [IsReduced R] [IsReduced S] : IsReduced (R × S) where
Mathlib/RingTheory/Nilpotent/Basic.lean
100
102
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, François Dupuis -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Filter.Extr import Mathlib.Tactic.NormNum /-! # Convex and concave functions This...
(hz : z ∈ openSegment 𝕜 x y) (hyz : f z < f y) : f x < f z := hf.dual.lt_left_of_right_lt hx hy hz hyz theorem ConvexOn.lt_right_of_left_lt (hf : ConvexOn 𝕜 s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s)
Mathlib/Analysis/Convex/Function.lean
756
759
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kim Morrison -/ import Mathlib.Algebra.Category.Ring.Colimits import Mathlib.Algebra.Category.Ring.Instances import Mathlib.Algebra.Category.Ring.Limits import Mathlib.Al...
/-- The ring homomorphism that takes a section of the structure sheaf of `R` on the open set `U`, implemented as a subtype of dependent functions to localizations at prime ideals, and evaluates
Mathlib/AlgebraicGeometry/StructureSheaf.lean
449
451
/- 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`...
@[simp] theorem finRange_map_getElem (l : List α) : (finRange l.length).map (l[·.1]) = l := finRange_map_get l @[simp] theorem idxOf_finRange {k : ℕ} (i : Fin k) : (finRange k).idxOf i = i := by simpa using idxOf_getElem (nodup_finRange k) i @[deprecated (since := "2025-01-30")] alias indexOf_finRange := idxOf_ge...
Mathlib/Data/List/FinRange.lean
64
72
/- 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, Floris van Doorn -/ import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset import Mathlib.Dat...
refine ⟨fun H s hs ↦ by simpa using (mk_le_mk_of_subset hs).trans H, fun H ↦ ?_⟩ apply card_le_of (fun s ↦ ?_) classical
Mathlib/SetTheory/Cardinal/Basic.lean
809
811
/- 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.Hom import Mathlib.Algebra.Ring.Action.Group /-! # Isomorphisms of `R`-algebras This file defines bundled isomorphisms of `R`-...
@[simp] theorem toAlgHom_toLinearMap : (e : A₁ →ₐ[R] A₂).toLinearMap = e.toLinearMap :=
Mathlib/Algebra/Algebra/Equiv.lean
512
514
/- 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.LinearAlgebra.DirectSum.Finsupp import Mathlib.Algebra.MvPolynomial.Eval import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.Al...
(e : σ →₀ ℕ) (s : S) (n : N) (d : σ →₀ ℕ) : coeff d (rTensorAlgHom (monomial e s ⊗ₜ[R] n)) = if e = d then s ⊗ₜ[R] n else 0 := by simp [ite_tmul] lemma rTensorAlgHom_toLinearMap : (rTensorAlgHom : MvPolynomial σ S ⊗[R] N →ₐ[S] MvPolynomial σ (S ⊗[R] N)).toLinearMap = rTensor.toLinearMap...
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
150
161
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Data.Int.Bitwise import Mathlib.Data.Int.Order.Lemmas import Mathlib.Data.Set.Function import Mathlib.Data.Set.Monotone import Mathlib.Order.Interval.Set...
exact natAbs_lt_iff_mul_self_lt theorem natAbs_le_iff_sq_le {a b : ℤ} : a.natAbs ≤ b.natAbs ↔ a ^ 2 ≤ b ^ 2 := by
Mathlib/Data/Int/Lemmas.lean
45
47
/- 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 -/ import Mathlib.Algebra.Group.TypeTags.Basic import Mathlib.Data.Fin.VecNotation import Mathlib.Data.Finset.Piecewise import Mathlib.Or...
@[deprecated (since := "2025-02-10")] alias continuous_uLift_down := continuous_uliftDown @[deprecated (since := "2025-02-10")] alias continuous_uLift_up := continuous_uliftUp
Mathlib/Topology/Constructions.lean
1,158
1,160
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Robert Y. Lewis -/ import Mathlib.RingTheory.WittVector.InitTail /-! # Truncated Witt vectors The ring of truncated Witt vectors (of length `n`) is a quotient of the...
theorem truncateFun_intCast (m : ℤ) : truncateFun n (m : 𝕎 R) = m := rfl
Mathlib/RingTheory/WittVector/Truncated.lean
253
255
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul /-! # Theory of monic polynomials We give se...
natDegree_smul_of_smul_regular p h] theorem monic_of_isUnit_leadingCoeff_inv_smul (h : IsUnit p.leadingCoeff) : Monic (h.unit⁻¹ • p) := by rw [Monic.def, leadingCoeff_smul_of_smul_regular _ (isSMulRegular_of_group _), Units.smul_def] obtain ⟨k, hk⟩ := h simp only [← hk, smul_eq_mul, ← Units.val_mul, Unit...
Mathlib/Algebra/Polynomial/Monic.lean
551
561
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl, Patrick Massot -/ import Mathlib.Data.Set.Image import Mathlib.Data.SProd /-! # Sets in product and pi types This file proves basic properties of prod...
simpa (config := { contextual := true }) [(ne_of_mem_of_not_mem · hi)] @[simp] theorem eval_image_univ_pi (ht : (pi univ t).Nonempty) :
Mathlib/Data/Set/Prod.lean
807
810
/- 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, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics /-! # Continu...
rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)] refine ContinuousAt.mul ?_ (continuous_cos.continuousAt.comp ?_) · refine continuous_exp.continuousAt.comp (ContinuousAt.mul ?_ continuous_snd.continuousAt) refine (continuousAt_log ?_).comp continuous_fst.continuousAt exact hp.ne · exact cont...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
184
190
/- Copyright (c) 2022 Praneeth Kolichala. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Praneeth Kolichala -/ import Mathlib.Data.Nat.Basic import Mathlib.Data.Nat.BinaryRec import Mathlib.Data.List.Defs import Mathlib.Tactic.Convert import Mathlib.Tactic.GeneralizePr...
Mathlib/Data/Nat/Bits.lean
389
390
/- 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.Analysis.InnerProductSpace.Convex import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Combinatorics.Additive.AP.Three...
sphere containing many integer points by the pigeonhole principle. This gives us an implicit bound that we then optimize by tweaking the parameters. The (almost) optimal parameters are `Behrend.nValue` and `Behrend.dValue`. -/
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
226
229
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Alex Keizer -/ import Mathlib.Algebra.Group.Nat.Even import Mathlib.Algebra.NeZero import Mathlib.Algebra.Ring.Nat import Mathlib.Data.List.GetD import Mathlib.Data.Nat.B...
Mathlib/Data/Nat/Bitwise.lean
403
405
/- 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, Sander Dahmen, Kim Morrison -/ import Mathlib.Algebra.Algebra.Tower import Mathlib.LinearAlgebra.LinearIndependent.Basic import Mathlib.Data.Set.Card /...
(i : R' → R) (j : M →+ M₁) (hi : ∀ r, i r = 0 → r = 0) (hj : Injective j) (hc : ∀ (r : R') (m : M), j (i r • m) = r • j m) : Module.rank R M ≤ Module.rank R' M₁ := by simpa only [lift_id] using lift_rank_le_of_injective_injective i j hi hj hc end Ring namespace Algebra
Mathlib/LinearAlgebra/Dimension/Basic.lean
198
205
/- Copyright (c) 2023 Yaël Dillies, Chenyi Li. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chenyi Li, Ziyu Wang, Yaël Dillies -/ import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.InnerProductSpace.Basic /-! # Uniformly and strongly convex functions I...
lemma UniformConvexOn.add (hf : UniformConvexOn s φ f) (hg : UniformConvexOn s ψ g) : UniformConvexOn s (φ + ψ) (f + g) := by refine ⟨hf.1, fun x hx y hy a b ha hb hab ↦ ?_⟩ simpa [mul_add, add_add_add_comm, sub_add_sub_comm]
Mathlib/Analysis/Convex/Strong.lean
85
89
/- 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.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List /-! # Properties of cyclic permutations constructed...
theorem IsCycle.existsUnique_cycle {f : Perm α} (hf : IsCycle f) : ∃! s : Cycle α, ∃ h : s.Nodup, s.formPerm h = f := by cases nonempty_fintype α obtain ⟨x, hx, hy⟩ := id hf
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
416
420
/- 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.Trigonometric.Basic import Mathlib.Topology.Order.ProjIcc /-!...
@[simp]
Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
346
346
/- 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, Floris van Doorn -/ import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset import Mathlib.Dat...
Mathlib/SetTheory/Cardinal/Basic.lean
1,523
1,524
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree imp...
Mathlib/NumberTheory/ArithmeticFunction.lean
1,398
1,402
/- 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.Algebra.Ring.Associated import Mathlib.Algebra.Star.Unitary import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Tactic.Ring import Mathlib.Al...
theorem norm_def (n : ℤ√d) : n.norm = n.re * n.re - d * n.im * n.im := rfl @[simp] theorem norm_zero : norm (0 : ℤ√d) = 0 := by simp [norm] @[simp] theorem norm_one : norm (1 : ℤ√d) = 1 := by simp [norm] @[simp]
Mathlib/NumberTheory/Zsqrtd/Basic.lean
429
439
/- Copyright (c) 2020 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.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower /-! # Subalgebras in towers of algebras In this file we prove facts about ...
end Semiring
Mathlib/Algebra/Algebra/Subalgebra/Tower.lean
112
114
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, François Dupuis -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Filter.Extr import Mathlib.Tactic.NormNum /-! # Convex and concave functions This...
Mathlib/Analysis/Convex/Function.lean
1,108
1,115
/- Copyright (c) 2020 Fox Thomson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Fox Thomson -/ import Mathlib.Computability.Language import Mathlib.Tactic.AdaptationNote /-! # Regular Expressions This file contains the formal definition for regular expressions and ...
Mathlib/Computability/RegularExpressions.lean
400
406
/- Copyright (c) 2018 Michael Jendrusch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Jendrusch, Kim Morrison, Bhavik Mehta, Jakob von Raumer -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Functor.Trifunctor import Mathlib.CategoryTheo...
rw [← comp_whiskerRight, inv_hom_id, id_whiskerRight] @[reassoc (attr := simp)]
Mathlib/CategoryTheory/Monoidal/Category.lean
297
299
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kim Morrison -/ import Mathlib.Algebra.Category.Ring.Colimits import Mathlib.Algebra.Category.Ring.Instances import Mathlib.Algebra.Category.Ring.Limits import Mathlib.Al...
at `U` to the structure sheaf of `S` at `V`. Explicitly, this map is given as follows: For a point `p : V`, if the section `s` evaluates on `p` to the fraction `a / b`, its image on `V` evaluates on `p` to the fraction `f(a) / f(b)`. -/ def comap (f : R →+* S) (U : Opens (PrimeSpectrum.Top R)) (V : Opens (PrimeSpectru...
Mathlib/AlgebraicGeometry/StructureSheaf.lean
985
995
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, David Kurniadi Angdinata -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.CubicDiscriminant import Mathlib.RingTheory.Nilpotent.Defs import Mathlib.Tactic.Fiel...
noncomputable def j : R := W.Δ'⁻¹ * W.c₄ ^ 3 /-- A variant of `WeierstrassCurve.j_eq_zero_iff` without assuming a reduced ring. -/
Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
378
381
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.MeasureTheory.Integral.Bochner.L1 import Mathlib.Me...
Mathlib/MeasureTheory/Integral/Bochner.lean
1,743
1,747
/- Copyright (c) 2021 Hunter Monroe. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hunter Monroe, Kyle Miller, Alena Gusakov -/ import Mathlib.Combinatorics.SimpleGraph.DeleteEdges import Mathlib.Data.Fintype.Powerset /-! # Subgraphs of a simple graph A subgraph of ...
@[simp] theorem deleteVerts_inter_verts_set_right_eq :
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
1,252
1,254
/- Copyright (c) 2021 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym import Mathlib.MeasureTheory.Measure.Haar.OfBasis import Mathlib.Probability.Independence.Basic /-! # Proba...
(fun x => ENNReal.ofReal (pdf X ℙ μ x).toReal) =ᵐ[μ] pdf X ℙ μ := ofReal_toReal_ae_eq ae_lt_top
Mathlib/Probability/Density.lean
205
206
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Shing Tak Lam, Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Da...
Nat.succ_le_succ_iff, ih] /-- The core implementation of `Nat.toDigits` returns a String with length less than or equal to the number of digits in the base-`b` number (represented by `e`). For example, the string representation of any number less than `b ^ 3` has a length less than or equal to 3. -/ lemma ...
Mathlib/Data/Nat/Digits.lean
800
814
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.C...
theorem liftMonoidWithZeroHom_apply_ofFractionRing_mk (φ : R[X] →*₀ G₀) (hφ : R[X]⁰ ≤ G₀⁰.comap φ) (n : R[X]) (d : R[X]⁰) : liftMonoidWithZeroHom φ hφ (ofFractionRing (Localization.mk n d)) = φ n / φ d := liftOn_ofFractionRing_mk _ _ _ _ theorem liftMonoidWithZeroHom_injective [Nontrivial R] (φ : R[X] →*₀ G₀...
Mathlib/FieldTheory/RatFunc/Basic.lean
421
429
/- Copyright (c) 2018 Michael Jendrusch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Jendrusch, Kim Morrison, Bhavik Mehta, Jakob von Raumer -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Functor.Trifunctor import Mathlib.CategoryTheo...
theorem associator_conjugation {X X' Y Y' Z Z' : C} (f : X ⟶ X') (g : Y ⟶ Y') (h : Z ⟶ Z') : (f ⊗ g) ⊗ h = (α_ X Y Z).hom ≫ (f ⊗ g ⊗ h) ≫ (α_ X' Y' Z').inv := by rw [associator_inv_naturality, hom_inv_id_assoc]
Mathlib/CategoryTheory/Monoidal/Category.lean
621
623
/- Copyright (c) 2021 Bryan Gin-ge Chen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Bryan Gin-ge Chen, Yaël Dillies -/ import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic /-! # Symmetric difference and bi-implication This file defines...
Mathlib/Order/SymmDiff.lean
343
343
/- 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.Fin.Fin2 import Mathlib.Data.PFun import Mathlib.Data.Vector3 import Mathlib.NumberTheory.PellMatiyasevic /-! # Diophantine functions and Matiyas...
section variable {α : Type} {n : ℕ} open Vector3 open scoped Vector3 theorem diophFn_vec_comp1 {S : Set (Vector3 ℕ (succ n))} (d : Dioph S) {f : Vector3 ℕ n → ℕ} (df : DiophFn f) : Dioph {v : Vector3 ℕ n | (f v::v) ∈ S} := Dioph.ext (diophFn_comp1 (reindex_dioph _ (none::some) d) df) (fun v => by dsimp ...
Mathlib/NumberTheory/Dioph.lean
429
445
/- 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.ShortComplex.Basic import Mathlib.CategoryTheory.Limits.Shapes.Kernels /-! # Left Homology of short complexes Given a short complex `S : Shor...
@[simp] lemma ofZeros_f' (hf : S.f = 0) (hg : S.g = 0) : (ofZeros S hf hg).f' = 0 := by rw [← cancel_mono ((ofZeros S hf hg).i), zero_comp, f'_i, hf]
Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
209
211
/- 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, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Real /-! # Power function...
@[simps] def rpowMonoidHom (r : ℝ) : ℝ≥0 →* ℝ≥0 where toFun := (· ^ r) map_one' := one_rpow _ map_mul' _x _y := mul_rpow /-- `rpow` variant of `List.prod_map_pow` for `ℝ≥0` -/
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
185
191
/- 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.Data.ENNReal.Real import Mathlib.Tactic.Bound.Attribute import Mathlib.Topology...
/-- In a pseudometric space, an open ball of infinite radius is the whole space -/ theorem Metric.eball_top_eq_univ (x : α) : EMetric.ball x ∞ = Set.univ := Set.eq_univ_iff_forall.mpr fun y => edist_lt_top y x /-- Balls defined using the distance or the edistance coincide -/
Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
917
921
/- 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.Monoid.Unbundled.WithTop import Mathlib.Algebra.Order.Monoid.Canonical.Defs /-! # Adjoi...
Mathlib/Algebra/Order/Monoid/WithTop.lean
143
144
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Module.Submodule.Map import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.RingTheory.Ideal.Quotient.Defs /-! # modular equivalence for submodule -...
theorem top : x ≡ y [SMOD (⊤ : Submodule R M)] :=
Mathlib/LinearAlgebra/SModEq.lean
42
42
/- 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, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.Special...
(f' * g x * f x ^ (g x - 1) + g' * f x ^ g x * Real.log (f x)) s x := by convert (hf.hasFDerivWithinAt.rpow hg.hasFDerivWithinAt h).hasDerivWithinAt using 1 dsimp; ring theorem HasDerivAt.rpow (hf : HasDerivAt f f' x) (hg : HasDerivAt g g' x) (h : 0 < f x) :
Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
592
596
/- 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.SetTheory.Game.Short /-! # Games described via "the state of the board". We provide a simple mechanism for constructing combinatorial (pre-)games, by des...
intro h have t := right_bound m rw [h] at t exact Nat.not_succ_le_zero _ t
Mathlib/SetTheory/Game/State.lean
57
61
/- 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.PartialHomeomorph import Mathlib.Topology.Connected.LocPathConnected /-! # Charted spaces A smooth manifold is a topological space `M`...
notation. -/ theorem StructureGroupoid.compatible {H : Type*} [TopologicalSpace H] (G : StructureGroupoid H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G] {e e' : PartialHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G := HasGroupoid.compatible he he' the...
Mathlib/Geometry/Manifold/ChartedSpace.lean
1,082
1,088
/- 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.Order.Ring.Canonical import Mathlib.Order.Partition.Equipartition /-! # Equitabilising a partition This file allows t...
∃ Q : Finpartition s, (∀ x : Finset α, x ∈ Q.parts → #x = m ∨ #x = m + 1) ∧ (∀ x, x ∈ P.parts → #(x \ {y ∈ Q.parts | y ⊆ x}.biUnion id) ≤ m) ∧ #{i ∈ Q.parts | #i = m + 1} = b := by -- Get rid of the easy case `m = 0` obtain rfl | m_pos := m.eq_zero_or_pos · refine ⟨⊥, by simp, ?_, by s...
Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean
42
139
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation /-! # Star structure on `CliffordAlgebra` This file defines the "clifford conjugation", equal to `reverse (involu...
star (algebraMap R (CliffordAlgebra Q) r) = algebraMap R (CliffordAlgebra Q) r := by rw [star_def, involute.commutes, reverse.commutes]
Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
57
58
/- 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.Algebra.Ring.Associated import Mathlib.Algebra.Star.Unitary import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Tactic.Ring import Mathlib.Al...
toDecidableEq := inferInstance } protected theorem eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : ℤ√d}, a * b = 0 → a = 0 ∨ b = 0 | ⟨x, y⟩, ⟨z, w⟩, h => by injection h with h1 h2
Mathlib/NumberTheory/Zsqrtd/Basic.lean
806
810
/- Copyright (c) 2022 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.CategoryTheory.Limits.Shapes.BinaryBiproducts import Mathlib.GroupTheory.EckmannHilton import Mathlib.Tactic.CategoryTheory.Reassoc /-! # Constructing a ...
· simp · simp [biprod.lift_fst, Category.assoc, biprod.inr_fst, comp_zero] have hl : ∀ f : X ⟶ Y, biprod.lift f (0 : X ⟶ Y) = f ≫ biprod.inl := by intro f ext · simp · simp [biprod.lift_snd, Category.assoc, biprod.inl_snd, comp_zero] exact { left_id := fun f => by simp [hr f, leftAdd, Ca...
Mathlib/CategoryTheory/Preadditive/OfBiproducts.lean
54
68
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lorenzo Luccioli, Rémy Degenne, Alexander Bentkamp -/ import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Probability.Moments.ComplexMGF /-! # Gaussian dis...
lemma gaussianReal_map_add_const (y : ℝ) : (gaussianReal μ v).map (· + y) = gaussianReal (μ + y) v := by by_cases hv : v = 0 · simp only [hv, ne_eq, not_true, gaussianReal_zero_var] exact Measure.map_dirac (measurable_id'.add_const _) _
Mathlib/Probability/Distributions/Gaussian.lean
269
273
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathli...
@[simp] lemma image_nonempty : (s.image f).Nonempty ↔ s.Nonempty :=
Mathlib/Data/Finset/Image.lean
327
329
/- 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 -/ import Mathlib.Algebra.Module.Submodule.Bilinear import Mathlib.Algebra.Module.Equiv.Basic import Mathlib.GroupTheory.Congruence.Hom import Mathlib.Tactic.Abel ...
lTensor_comp M f g theorem rTensor_mul (f g : Module.End R N) : (f * g).rTensor M = f.rTensor M * g.rTensor M := rTensor_comp M f g
Mathlib/LinearAlgebra/TensorProduct/Basic.lean
1,055
1,059
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.EuclideanDomain.Int import Mathlib.Algebra.MvPolynomial.Eval import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.Polynomial.Basic import Mat...
obtain ⟨t, rfl⟩ := S.fg_of_noetherian refine Finset.induction_on t ?_ ?_ · simpa using base intro x t _ h rw [Finset.coe_insert] simpa only [Algebra.adjoin_insert_adjoin] using ih _ x h
Mathlib/RingTheory/Adjoin/FG.lean
161
167
/- 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.Interval.Finset.Basic import Mathlib.Order.Interval.Multiset /-! # Algebraic properties of multiset intervals This file provides results ab...
lemma map_add_right_Icc (a b c : α) : ((Icc a b).map fun x => x + c) = Icc (a + c) (b + c) := by simp_rw [add_comm _ c] exact map_add_left_Icc _ _ _
Mathlib/Algebra/Order/Interval/Multiset.lean
37
39
/- Copyright (c) 2022 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.MeasureTheory.Integral.IntegrableOn /-! # Locally integrable functions A function is called *locally integrable* (`MeasureTheory.LocallyIntegrabl...
integrableOn_Iio_iff_integrableAtFilter_atBot_nhdsWithin (X := Xᵒᵈ) end MeasureTheory open MeasureTheory section borel
Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
413
419
/- Copyright (c) 2022 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.MeasureTheory.Integral.ExpDecay /-! # The Gamma function This file defines the `Γ` functio...
irreducible_def Gamma (s : ℂ) : ℂ := GammaAux ⌊1 - s.re⌋₊ s theorem Gamma_eq_GammaAux (s : ℂ) (n : ℕ) (h1 : -s.re < ↑n) : Gamma s = GammaAux n s := by have u : ∀ k : ℕ, GammaAux (⌊1 - s.re⌋₊ + k) s = Gamma s := by intro k; induction' k with k hk · simp [Gamma] · rw [← hk, ← add_assoc] refine (Gam...
Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
287
302
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johan Commelin -/ import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic /-! # Minimal polynomials This file defines the minimal polynomial of an element `x` of an `A...
/-- A minimal polynomial is irreducible. -/ theorem irreducible (hx : IsIntegral A x) : Irreducible (minpoly A x) := by refine (irreducible_of_monic (monic hx) <| ne_one A x).2 fun f g hf hg he => ?_ rw [← hf.isUnit_iff, ← hg.isUnit_iff] by_contra! h have heval := congr_arg (Polynomial.aeval x) he rw [aeval A...
Mathlib/FieldTheory/Minpoly/Basic.lean
258
269
/- 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.ShortComplex.Basic import Mathlib.CategoryTheory.Limits.Shapes.Kernels /-! # Left Homology of short complexes Given a short complex `S : Shor...
rw [← leftHomologyπ_naturality'] @[reassoc (attr := simp)] lemma π_comp_leftHomologyIso_inv : h.π ≫ h.leftHomologyIso.inv = h.cyclesIso.inv ≫ S.leftHomologyπ := by simp only [← cancel_epi h.cyclesIso.hom, ← cancel_mono h.leftHomologyIso.hom, assoc,
Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
721
726
/- 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,338
2,339
/- 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.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort /-! # Compositions A compositio...
congr ext1 exact H /-! ### The composition `Composition.ones` -/ /-- The composition made of blocks all of size `1`. -/
Mathlib/Combinatorics/Enumerative/Composition.lean
443
450
/- 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
278
281
/- Copyright (c) 2021 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Logic.Function.Basic import Mathlib.Logic.Relator /-! # Types that are empty In this file we define a typeclass `IsEmpty`, which expresses that a...
@[simp] theorem isEmpty_pprod : IsEmpty (PProd α β) ↔ IsEmpty α ∨ IsEmpty β := by
Mathlib/Logic/IsEmpty.lean
171
172
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.SetTheory.Cardinal.ENat /-! # Projection from cardinal numbers to natural numbers In this file we define `Cardinal.toNat` to be the natural projectio...
rw [← toNat_toENat, ENat.toNat_eq_zero, toENat_eq_zero, toENat_eq_top] lemma toNat_ne_zero : toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀ := by simp [not_or]
Mathlib/SetTheory/Cardinal/ToNat.lean
40
42
/- Copyright (c) 2023 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Analysis.Normed.Ring.InfiniteSum import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.NumberTheory...
exact fun {_} hp ↦ hsum.norm_lt_one hp.one_lt /-- Given a (completely) multiplicative function `f : ℕ → F`, where `F` is a normed field, such that `‖f p‖ < 1` for all primes `p`, we can express the sum of `f n` over all `N`-smooth positive integers `n` as a product of `(1 - f p)⁻¹` over the primes `p < N`. At the sa...
Mathlib/NumberTheory/EulerProduct/Basic.lean
317
322
/- 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.Measure.Trim import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated /-! # Almost everywhere measurable functions A funct...
AEMeasurable (s.indicator f) μ := (aemeasurable_indicator_iff₀ hs).mpr hfm.restrict end Zero theorem MeasureTheory.Measure.restrict_map_of_aemeasurable {f : α → δ} (hf : AEMeasurable f μ) {s : Set δ} (hs : MeasurableSet s) : (μ.map f).restrict s = (μ.restrict <| f ⁻¹' s).map f := calc (μ.map f).restri...
Mathlib/MeasureTheory/Measure/AEMeasurable.lean
338
349
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Andrew Yang -/ import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf import Mathlib.AlgebraicGeometry.GammaSpecAdjunction import Mathlib.RingTheory.GradedAlgeb...
· have := degree_eq_of_mem_mem 𝒜 (SetLike.pow_mem_graded n f_deg) (hn.symm ▸ z.den.2) this rw [← smul_eq_mul, this]; exact z.num.2 theorem carrier.add_mem (q : Spec.T A⁰_ f) {a b : A} (ha : a ∈ carrier f_deg q) (hb : b ∈ carrier f_deg q) : a + b ∈ carrier f_deg q := by refine fun i => (q.2.mem_or_mem ?_)....
Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
325
335
/- 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.Group.Basic import Mathlib.Algebra.GroupWithZero.NeZero import Mathlib.Logic.Unique import Mathlib.Tactic.Conv /-! # Groups with an adjoined z...
simpa only [one_div] using inv_ne_zero h @[simp] theorem inv_eq_zero {a : G₀} : a⁻¹ = 0 ↔ a = 0 := by rw [inv_eq_iff_eq_inv, inv_zero]
Mathlib/Algebra/GroupWithZero/Basic.lean
367
370
/- 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...
theorem isCompact_iff_ultrafilter_le_nhds' : IsCompact s ↔ ∀ f : Ultrafilter X, s ∈ f → ∃ x ∈ s, ↑f ≤ 𝓝 x := by simp only [isCompact_iff_ultrafilter_le_nhds, le_principal_iff, Ultrafilter.mem_coe] alias ⟨IsCompact.ultrafilter_le_nhds', _⟩ := isCompact_iff_ultrafilter_le_nhds'
Mathlib/Topology/Compactness/Compact.lean
134
139
/- 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.CharP.Reduced import Mathlib.RingTheory.IntegralDomain -- TODO: remove Mathlib.Algebra.CharP.Reduced and move the last two lemmas to Lemmas /-...
Mathlib/RingTheory/RootsOfUnity/Basic.lean
1,018
1,022
/- Copyright (c) 2021 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.LinearAlgebra.Dimension.LinearMap import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Matrix.ToLin /-! # Finite...
rw [lift_id, Module.rank_linearMap_self] @[deprecated (since := "2024-11-10")] alias cardinal_mk_algHom_le_rank := cardinalMk_algHom_le_rank @[stacks 09HS]
Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean
85
89
/- 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.Algebra.Order.BigOperators.Group.Finset import Mathlib.Order.Interval.Finset.Na...
refine ⟨fun H ε hε => H _ (edist_mem_uniformity hε), fun H u hu x hx => ?_⟩ rcases mem_uniformity_edist.1 hu with ⟨ε, εpos, hε⟩
Mathlib/Topology/EMetricSpace/Basic.lean
114
115
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov -/ import Mathlib.Algebra.Algebra.Rat import Mathlib.Data.Nat.Prime.Int import Mathlib.Data.Rat.Sqrt imp...
/-!
Mathlib/Data/Real/Irrational.lean
329
330
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Alexander Bentkamp -/ import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.LinearIndependent.Lemmas import Mathlib.LinearAlgebra.L...
/-- The atoms of the lattice of submodules of a module over a division ring are the submodules equal to the span of a nonzero element of the module. -/ theorem atom_iff_nonzero_span (W : Submodule K V) : IsAtom W ↔ ∃ v ≠ 0, W = span K {v} := by refine ⟨fun h => ?_, fun h => ?_⟩ · obtain ⟨hbot, h⟩ := h rcas...
Mathlib/LinearAlgebra/Basis/VectorSpace.lean
206
226
/- Copyright (c) 2020 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Yury Kudryashov -/ import Mathlib.Topology.Instances.NNReal.Lemmas import Mathlib.Topology.Order.MonotoneContinuity /-! # Square root of a real numbe...
· exact sqrt_le_sqrt_iff hy @[simp] lemma one_le_sqrt : 1 ≤ √x ↔ 1 ≤ x := by
Mathlib/Data/Real/Sqrt.lean
257
259
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow, Kexing Ying -/ import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.LinearAlgebra.BilinearForm.Properties /-! # Bilinear form This file defines ort...
rw [← Finset.coe_singleton]
Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
162
162
/- Copyright (c) 2022 Yaël Dillies, Ella Yu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Ella Yu -/ import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Data.Finset.Prod import Mathlib.Data.Fintype.Prod import Mathlib.Algebra.Group.Poin...
Mathlib/Combinatorics/Additive/Energy.lean
218
220
/- Copyright (c) 2022 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup /-! # Congruence subgroups This defines congruence subgroups of `SL(2, ℤ)` such as `Γ(N)`, `Γ₀(N)` and `Γ₁(N)...
theorem Gamma_normal : Subgroup.Normal (Gamma N) := SLMOD(N).normal_ker theorem Gamma_one_top : Gamma 1 = ⊤ := by ext simp [eq_iff_true_of_subsingleton] lemma mem_Gamma_one (γ : SL(2, ℤ)) : γ ∈ Γ(1) := by simp only [Gamma_one_top, Subgroup.mem_top]
Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean
56
66
/- Copyright (c) 2021 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Data.Complex.Norm /-! # The partial order on the complex numbers This order is defined by `z ≤ w ↔ z.re ≤ w.re ∧ z.im = w.im`. This is a natural order o...
intro x y hxy simp only [ofRealHom_eq_coe, real_le_real, hxy]
Mathlib/Data/Complex/Order.lean
118
119
/- 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.CharP.Two import Mathlib.Data.Nat.Cast.Field import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Factorization.Induction import Mat...
rw [Finsupp.mem_support_iff, ← zero_lt_iff] at hp rw [mul_comm, ← mul_assoc, ← pow_succ', Nat.sub_one, Nat.succ_pred_eq_of_pos hp]
Mathlib/Data/Nat/Totient.lean
275
276