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) 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.Algebra.Order.Group.Indicator import Mathlib.MeasureTheory.OuterMeasure.Basic /-! # Operations on outer measures In this file we defi...
end OuterMeasure
Mathlib/MeasureTheory/OuterMeasure/Operations.lean
361
362
/- Copyright (c) 2024 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Combinatorics.Additive.FreimanHom /-! # Corners This file defines corners, namely triples of the form `(x, y), (x, y + d), (x + d, y)`, and the property ...
lemma isCornerFree_singleton (x : G × G) : IsCornerFree {x} := subsingleton_singleton.isCornerFree /-- Corners are preserved under `2`-Freiman homomorphisms. -/ lemma IsCorner.image (hf : IsAddFreimanHom 2 s t f) (hAs : (A : Set (G × G)) ⊆ s ×ˢ s) (hA : IsCorner A x₁ y₁ x₂ y₂) : IsCorner (Prod.map f f '' A) (f x₁)...
Mathlib/Combinatorics/Additive/Corner/Defs.lean
68
73
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.Algebra.EuclideanDomain.Field import Mathlib.Algebra.Polynomial.Module.Basic import Mathlib.Analysis.Calculus.Co...
use y, hy rw [h] field_simp [n.factorial_ne_zero] ring /-- **Taylor's theorem** with a polynomial bound on the remainder We assume that `f` is `n+1`-times continuously differentiable on the closed set `Icc a b`. The difference of `f` and its `n`-th Taylor polynomial can be estimated by `C * (x - a)^(n+1) / n!...
Mathlib/Analysis/Calculus/Taylor.lean
357
370
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Limits.Shapes.Terminal import Mathlib.CategoryTheory.Limits.Preserves.Basic /-! # Preserving terminal object Constructions to relate the n...
-/ lemma PreservesTerminal.of_iso_comparison [i : IsIso (terminalComparison G)] : PreservesLimit (Functor.empty.{0} C) G := by apply preservesLimit_of_preserves_limit_cone terminalIsTerminal
Mathlib/CategoryTheory/Limits/Preserves/Shapes/Terminal.lean
91
94
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.BoxIntegral.Partition.Basic /-! # Split a box along one or more hyperplanes ## Main definitions A hyperplane `{x : ι → ℝ | x i = a}` spli...
π ⊓ split I i x = π.biUnion fun J => split J i x := biUnion_congr_of_le rfl fun _ hJ => restrict_split hJ i x /-- Split a box along many hyperplanes `{y | y i = x}`; each hyperplane is given by the pair `(i x)`. -/
Mathlib/Analysis/BoxIntegral/Partition/Split.lean
214
218
/- 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.Basic import Mathlib.Data.Finset.Image import Mathlib.Data.Multiset.Fold /-! # The fold operation for a commutative associative operation ...
simp only [Function.comp_apply] theorem fold_disjUnion {s₁ s₂ : Finset α} {b₁ b₂ : β} (h) : (s₁.disjUnion s₂ h).fold op (b₁ * b₂) f = s₁.fold op b₁ f * s₂.fold op b₂ f := (congr_arg _ <| Multiset.map_add _ _ _).trans (Multiset.fold_add _ _ _ _ _) theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁...
Mathlib/Data/Finset/Fold.lean
88
96
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Kappelmann -/ import Mathlib.Algebra.Order.Floor.Defs import Mathlib.Algebra.Order.Floor.Ring import Mathlib.Algebra.Order.Floor.Semiring deprecated_module (sinc...
Mathlib/Algebra/Order/Floor.lean
1,315
1,315
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Chris Hughes, Anne Baanen -/ import Mathlib.Data.Matrix.Basic import Mathlib.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.Data.Matrix.RowCol import Mathli...
@[simp] theorem det_fin_zero {A : Matrix (Fin 0) (Fin 0) R} : det A = 1 := det_isEmpty /-- Determinant of 1x1 matrix -/ theorem det_fin_one (A : Matrix (Fin 1) (Fin 1) R) : det A = A 0 0 :=
Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
795
800
/- 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.NumberTheory.BernoulliPolynomials import Mathlib.MeasureTheory.Integral.IntervalIntegral.Basic import Mathlib.Analysis.Calculus.Deriv.Polynomial import...
have ofReal_two : ((2 : ℝ) : ℂ) = 2 := by norm_cast convert ((hasSum_iff _ _).mp (this.div_const (2 * I))).1 · convert (ofReal_re _).symm rw [ofReal_mul]; rw [← mul_div]; congr · rw [ofReal_div, ofReal_one, ofReal_pow]; rfl · rw [ofReal_sin, ofReal_mul, fourier_coe_apply, fourier_coe_apply, sin, ofRea...
Mathlib/NumberTheory/ZetaValues.lean
288
329
/- 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.QuasiIso import Mathlib.CategoryTheory.Limits.Preserves.Finite import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels /-! ...
comp_id, id_comp] @[reassoc] lemma mapCyclesIso_inv_naturality [S₁.HasLeftHomology] [S₂.HasLeftHomology] [F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂] : F.map (cyclesMap φ) ≫ (S₂.mapCyclesIso F).inv = (S₁.mapCyclesIso F).inv ≫ cyclesMap (F.mapShortComplex.map φ) := by
Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
502
508
/- 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...
variable (s) in /-- Re-index the components of the tensor power by `e`. -/ def reindex (e : ι ≃ ι₂) : (⨂[R] i : ι, s i) ≃ₗ[R] ⨂[R] i : ι₂, s (e.symm i) :=
Mathlib/LinearAlgebra/PiTensorProduct.lean
684
687
/- Copyright (c) 2023 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying, Rémy Degenne -/ import Mathlib.Probability.Kernel.Disintegration.Integral /-! # Uniqueness of the conditional kernel We prove that the conditional kernels `ProbabilityTheor...
The conditional kernel is unique almost everywhere. -/ /-- A finite kernel which satisfies the disintegration property is almost everywhere equal to the disintegration kernel. -/ theorem eq_condKernel_of_kernel_eq_compProd [CountableOrCountablyGenerated α β] {ρ : Kernel α (β × Ω)} [IsFiniteKernel ρ] {κ : Kernel (...
Mathlib/Probability/Kernel/Disintegration/Unique.lean
168
174
/- 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.HomologicalComplexBiprod import Mathlib.Algebra.Homology.Homotopy import Mathlib.CategoryTheory.MorphismProperty.IsInvertedBy /-! The homotopy ...
@[reassoc (attr := simp)] lemma inrCompHomotopy_hom_desc_hom (hc : ∀ j, ∃ i, c.Rel i j) (i j : ι) : (inrCompHomotopy φ hc).hom i j ≫ (desc φ α hα).f j = hα.hom i j := by by_cases hij : c.Rel j i · dsimp simp only [inrCompHomotopy_hom φ hc i j hij, desc_f φ α hα _ _ hij, comp_add, inlX_fstX_assoc, inlX...
Mathlib/Algebra/Homology/HomotopyCofiber.lean
320
327
/- Copyright (c) 2020 Kevin Kappelmann. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Kappelmann -/ import Mathlib.Algebra.ContinuedFractions.ContinuantsRecurrence import Mathlib.Algebra.ContinuedFractions.TerminatedStable import Mathlib.Tactic.FieldSimp import ...
rwa [← IH] intro gp' m m_lt_n s_mth_eq' -- case distinction on m + 1 = n or m + 1 < n rcases m_lt_n with n | succ_m_lt_n · -- the difficult case at the squashed position: we first obtain the values from -- the sequence obtain ⟨gp_succ_m, s_succ_mth_eq⟩ : ∃ gp_...
Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
342
391
/- 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.RootSystem.Defs import Mathlib.LinearAlgebra.RootSystem.Finite.Nondegenerate /-! # Root data and root system...
Formally, the point is that the hypothesis `hc` depends only on the range of the coroot mappings. -/ @[ext] protected lemma ext [CharZero R] [NoZeroSMulDivisors R M] {P₁ P₂ : RootPairing ι R M N} (he : P₁.toPerfectPairing = P₂.toPerfectPairing) (hr : P₁.root = P₂.root) (hc : range P₁.coroot = range P₂.c...
Mathlib/LinearAlgebra/RootSystem/Basic.lean
90
118
/- Copyright (c) 2019 Robert A. Spencer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert A. Spencer, Markus Himmel -/ import Mathlib.Algebra.Category.Grp.Preadditive import Mathlib.Algebra.Module.Equiv.Basic import Mathlib.Algebra.Module.PUnit import Mathlib.Cate...
rfl instance hasForgetToAddCommGroup : HasForget₂ (ModuleCat R) AddCommGrp where forget₂ := { obj := fun M => AddCommGrp.of M map := fun f => AddCommGrp.ofHom f.hom.toAddMonoidHom } @[simp] theorem forget₂_obj (X : ModuleCat R) :
Mathlib/Algebra/Category/ModuleCat/Basic.lean
201
209
/- 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.CategoryTheory.Adjunction.Basic import Mathlib.CategoryTheory.HomCongr /-! # Restricting adjunctions `Adjunction.restrictFullyFaithful` shows that an adj...
lemma restrictFullyFaithful_homEquiv_apply {X : C} {Y : D} (f : L.obj X ⟶ Y) : (adj.restrictFullyFaithful hiC hiD comm1 comm2).homEquiv X Y f = hiC.preimage (adj.unit.app (iC.obj X) ≫ R'.map (comm1.hom.app X) ≫ R'.map (iD.map f) ≫ comm2.hom.app Y) := by
Mathlib/CategoryTheory/Adjunction/Restrict.lean
69
73
/- Copyright (c) 2021 Aaron Anderson, Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Kevin Buzzard, Yaël Dillies, Eric Wieser -/ import Mathlib.Data.Finset.Lattice.Union import Mathlib.Data.Finset.Pairwise import Mathlib.Data.Finset.Prod i...
another independent indexed family. -/ theorem iSupIndep.map_orderIso {ι : Sort*} {α β : Type*} [CompleteLattice α] [CompleteLattice β] (f : α ≃o β) {a : ι → α} (ha : iSupIndep a) : iSupIndep (f ∘ a) := fun i => ((ha i).map_orderIso f).mono_right (f.monotone.le_map_iSup₂ _) @[deprecated (since := "2024-11-24")] ...
Mathlib/Order/SupIndep.lean
445
454
/- 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.MeasurableSpace.MeasurablyGenerated import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.Order.Interval.Set...
Tendsto (μ ∘ s) atTop (𝓝 (μ (⋂ n, s n))) := by refine .of_neBot_imp fun h ↦ ?_ have := (atTop_neBot_iff.1 h).2 rw [hm.measure_iInter hs hf] exact tendsto_atTop_iInf fun n m hnm => measure_mono <| hm hnm /-- Continuity from above: the measure of the intersection of an increasing sequence of measurable
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
600
606
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jalex Stark, Kyle Miller, Lu-Ming Zhang -/ import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Combinatorics.SimpleGraph.Connectivity.WalkCounting import Math...
theorem adjMatrix_mulVec_apply [NonAssocSemiring α] (v : V) (vec : V → α) : (G.adjMatrix α *ᵥ vec) v = ∑ u ∈ G.neighborFinset v, vec u := by rw [mulVec, adjMatrix_dotProduct]
Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean
198
200
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Group.Defs /-! # Invertible elements This file defines a typeclass `Invertible a` for elements `a` with a two-sided multiplicative inverse. The in...
rw [← mul_assoc, mul_invOf_self, one_mul] example {G} [Group G] (a b : G) : a * (a⁻¹ * b) = b := mul_inv_cancel_left a b
Mathlib/Algebra/Group/Invertible/Defs.lean
117
118
/- Copyright (c) 2023 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory....
section H0 /-- When the representation on `A` is trivial, then `H⁰(G, A)` is all of `A.` -/ def H0LequivOfIsTrivial [A.IsTrivial] : H0 A ≃ₗ[k] A := LinearEquiv.ofTop _ (invariants_eq_top A.ρ)
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
731
735
/- Copyright (c) 2021 François Sunatori. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: François Sunatori -/ import Mathlib.Analysis.Complex.Circle import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic /-! # Isometries o...
rw [mul_conj, normSq_eq_norm_sq] at this simp only [sub_sub, sub_right_inj, mul_one, ofReal_pow, RingHom.map_one] at this simp only [add_sub, sub_left_inj] at this rw [add_comm, ← this, add_comm] theorem LinearIsometry.re_apply_eq_re {f : ℂ →ₗᵢ[ℝ] ℂ} (h : f 1 = 1) (z : ℂ) : (f z).re = z.re := by apply Linear...
Mathlib/Analysis/Complex/Isometry.lean
104
116
/- Copyright (c) 2023 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.MeasureTheory.Measure.ProbabilityMeasure import Mathlib.MeasureTheory.Measure.Prod /-! # Products of finite measures and probability measures This file i...
/-- The first marginal of a product probability measure is the first probability measure. -/ @[simp] lemma map_fst_prod : (μ.prod ν).map measurable_fst.aemeasurable = μ := by apply Subtype.ext simp only [val_eq_to_measure, toMeasure_map, toMeasure_prod, Measure.map_fst_prod, measure_univ, one_smul]
Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean
113
117
/- Copyright (c) 2023 Felix Weilacher. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Felix Weilacher, Yury Kudryashov, Rémy Degenne -/ import Mathlib.MeasureTheory.MeasurableSpace.Embedding import Mathlib.Data.Set.MemPartition import Mathlib.Order.Filter.CountableSepa...
@CountablyGenerated α (.comap f m) := by rcases h with ⟨⟨b, hbc, rfl⟩⟩ rw [comap_generateFrom] letI := generateFrom (preimage f '' b) exact ⟨_, hbc.image _, rfl⟩
Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
96
101
/- 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.Analysis.Normed.Group.Int import Mathlib.Analysis.Normed.Group.Subgroup import Mathlib.Analysis.Normed.Group.Uniform /-! # Normed groups homomorphisms...
⟨fun f => (-f.toAddMonoidHom).mkNormedAddGroupHom ‖f‖ fun v => by simp [le_opNorm f v]⟩ @[simp] theorem coe_neg (f : NormedAddGroupHom V₁ V₂) : ⇑(-f) = -f := rfl @[simp] theorem neg_apply (f : NormedAddGroupHom V₁ V₂) (v : V₁) : (-f : NormedAddGroupHom V₁ V₂) v = -f v := rfl
Mathlib/Analysis/Normed/Group/Hom.lean
384
394
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Tape import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Pi import Mathlib.Data.PFun import M...
end section
Mathlib/Computability/TuringMachine.lean
732
735
/- 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.Group.Submonoid.Operations import Mathlib.Algebra.MonoidAlgebra.Defs import Mathlib.Algebra.Order.Mon...
Mathlib/Algebra/Polynomial/Basic.lean
98
98
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Anne Baanen -/ import Mathlib.LinearAlgebra.Dimension.Basic import Mathlib.SetTheory.Cardinal.ToNat /-! # Finite dimension of vector spaces Definition of the rank of a mo...
@[simp]
Mathlib/LinearAlgebra/Dimension/Finrank.lean
127
128
/- 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...
have hgcd : gcd I J = I ⊔ J := by rw [gcd_eq_normalize _ _, normalize_eq] · rw [dvd_iff_le, sup_le_iff, ← dvd_iff_le, ← dvd_iff_le]
Mathlib/RingTheory/DedekindDomain/Ideal.lean
803
805
/- 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...
exact mod_cast hN' theorem lower_bound_le_one (hN : 1 ≤ N) (hN' : N ≤ 4096) : (N : ℝ) * exp (-4 * √(log N)) ≤ 1 := by obtain rfl | hN := hN.eq_or_lt · norm_num · exact lower_bound_le_one' hN hN' theorem roth_lower_bound : (N : ℝ) * exp (-4 * √(log N)) ≤ rothNumberNat N := by obtain rfl | hN := Nat.eq_ze...
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
480
511
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Filippo A. E. Nuccio -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.FractionalIdeal.Basic import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basi...
exact Submodule.smul_mem J.1 _ (h zI hzI)
Mathlib/RingTheory/FractionalIdeal/Operations.lean
805
806
/- 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, Chris Hughes, Anne Baanen -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.LinearAlgebra.Basis.Prod impo...
Cardinal.sum fun i => Module.rank R (φ i) := by cases nonempty_fintype η let B i := chooseBasis R (φ i) let b : Basis _ R (∀ i, φ i) := Pi.basis fun i => B i simp [← b.mk_eq_rank'', fun i => (B i).mk_eq_rank''] variable (R)
Mathlib/LinearAlgebra/Dimension/Constructions.lean
289
295
/- Copyright (c) 2018 Sean Leather. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sean Leather, Mario Carneiro -/ import Mathlib.Data.List.AList import Mathlib.Data.Finset.Sigma import Mathlib.Data.Part /-! # Finite maps over `Multiset` -/ universe u v w open List ...
@[simp] theorem mem_union {a} {s₁ s₂ : Finmap β} : a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ ∨ a ∈ s₂ :=
Mathlib/Data/Finmap.lean
497
498
/- Copyright (c) 2024 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Group.Action.Pi import Mathlib.Algebra.Group.End import Mathlib.Algebra.Module.NatInt import Mathlib.Algebra.Order.Archimedean.Basic /-! # M...
@[scoped simp] theorem map_nat_add' [AddCommMonoidWithOne G] [AddMonoid H] [AddConstMapClass F G H 1 b] (f : F) (n : ℕ) (x : G) : f (↑n + x) = f x + n • b := by
Mathlib/Algebra/AddConstMap/Basic.lean
143
145
/- 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
437
450
/- Copyright (c) 2022 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.Countable.Basic import Mathlib.Data.Finset.Max import Mathlib.Data.Fintype.Pigeonhole import Mathlib.Logic.Enco...
dif_pos hi theorem toZ_of_lt (hi : i < i0) :
Mathlib/Order/SuccPred/LinearLocallyFinite.lean
211
213
/- Copyright (c) 2018 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.RingTheory.Valuation.Basic import Mathlib.NumberTheory.Padics.PadicNorm import Mathlib.Analysis.Normed.Field.Lemmas import Mathlib.Tactic.Peel import...
· by_cases hy : y = 0 · rw [hy, if_pos rfl, min_eq_left, add_zero] exact le_top · rw [if_neg hx, if_neg hy, if_neg hxy, ← WithTop.coe_min, WithTop.coe_le_coe] exact le_valuation_add hxy
Mathlib/NumberTheory/Padics/PadicNumbers.lean
1,064
1,068
/- Copyright (c) 2020 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.CategoryTheory.Monad.Types import Mathlib.CategoryTheory.Monad.Limits import Mathlib.CategoryTheory.Equivalence import Mathlib.Topology.Category.CompHaus.Basic...
intro U F h1 hU exact isOpen_iff_ultrafilter.mp hU _ h1 _ (Ultrafilter.le_nhds_lim _) have c3 : ↑(Ultrafilter.map Ultrafilter.lim FF) ≤ 𝓝 x := by rw [le_nhds_iff] intro U hx hU exact mem_coe.2 (c2 _ _ (by rwa [← c1]) hU) have c4 : ∀ U : Set X, x ∈ U → IsOpen U → { G : Ultrafilter ...
Mathlib/Topology/Category/Compactum.lean
379
385
/- 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 -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Algebra.Order.Star.Basic import Mathlib.Data.C...
exact pow_le_one₀ (norm_nonneg _) hx
Mathlib/Data/Complex/Exponential.lean
391
391
/- Copyright (c) 2022 Rémi Bottinelli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémi Bottinelli, Junyan Xu -/ import Mathlib.Algebra.Group.Subgroup.Defs import Mathlib.CategoryTheory.Groupoid.VertexGroup import Mathlib.CategoryTheory.Groupoid.Basic import Mathlib...
end Thin section Disconnected /-- A subgroupoid `IsTotallyDisconnected` if it has only isotropy arrows. -/ nonrec abbrev IsTotallyDisconnected := IsTotallyDisconnected S.objs theorem isTotallyDisconnected_iff : S.IsTotallyDisconnected ↔ ∀ c d, (S.arrows c d).Nonempty → c = d := by
Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
531
540
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.ModEq import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Algebra.Ring.Periodic import Mathlib.Data.Int.SuccPred import Mathlib.Order.Cir...
theorem modEq_iff_not_forall_mem_Ioo_mod : a ≡ b [PMOD p] ↔ ∀ z : ℤ, b - z • p ∉ Set.Ioo a (a + p) := (tfae_modEq hp a b).out 0 1
Mathlib/Algebra/Order/ToIntervalMod.lean
542
544
/- Copyright (c) 2023 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.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Synonym import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax import Mathlib.Order.Mono...
lemma monovaryOn_inv_left₀ (hf : ∀ i ∈ s, 0 < f i) : MonovaryOn f⁻¹ g s ↔ AntivaryOn f g s := forall₅_congr fun _i hi _j hj _ ↦ inv_le_inv₀ (hf _ hi) (hf _ hj)
Mathlib/Algebra/Order/Monovary.lean
258
260
/- Copyright (c) 2020 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.Algebra.Polynomial.Splits import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.RingTheory.Ro...
fun x _ y _ hne => IsPrimitiveRoot.disjoint hne simp only [X_pow_sub_one_eq_prod hpos h, cyclotomic', ← Finset.prod_biUnion hd, IsPrimitiveRoot.nthRoots_one_eq_biUnion_primitiveRoots]
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
152
155
/- 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, Mario Carneiro -/ import Mathlib.Data.Countable.Defs import Mathlib.Data.Nat.Factors import Mathlib.Data.Nat.Prime.Infinite import Mathlib.Data...
rw [← not_iff_not, Finset.not_nonempty_iff_eq_empty, primeFactors_eq_empty, not_lt, Nat.le_one_iff_eq_zero_or_eq_one] @[simp] protected lemma Prime.primeFactors (hp : p.Prime) : p.primeFactors = {p} := by
Mathlib/Data/Nat/PrimeFin.lean
75
78
/- 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 -/ import Mathlib.Tactic.Attr.Register import Mathlib.Tactic.Basic import Batteries.Logic import Batteries.Tactic.Trans import Batteries.Util.LibraryNot...
Mathlib/Logic/Basic.lean
317
317
/- 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...
lemma diagonal_nonempty [Nonempty α] : (diagonal α).Nonempty := Nonempty.elim ‹_› fun x => ⟨_, mem_diagonal x⟩ instance decidableMemDiagonal [h : DecidableEq α] (x : α × α) : Decidable (x ∈ diagonal α) := h x.1 x.2 theorem preimage_coe_coe_diagonal (s : Set α) : Prod.map (fun x : s => (x : α)) (fun x : s => ...
Mathlib/Data/Set/Prod.lean
411
421
/- 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, Bhavik Mehta -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.Group.Pointwise.Set.Basic import Mathlib.Algebra.G...
· rwa [eq_of_mem_replicate ha] · rw [Multiset.mem_add] at ha obtain ha | ha := ha · exact htA ha · rwa [eq_of_mem_replicate ha] · rw [card_add, card_replicate, hs, Nat.add_sub_cancel' hmn] · rw [card_add, card_replicate, ht, Nat.add_sub_cancel' hmn] · rw [prod_add, prod_add, h]
Mathlib/Combinatorics/Additive/FreimanHom.lean
283
290
/- Copyright (c) 2022 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.Ordinal.FixedPoint /-! # Principal ordinals We define principal or indecomposable ordinals, and we prove the standa...
rw [← Ordinal.pos_iff_ne_zero] at ha rw [← h a ha hao] exact (isNormal_mul_right ha).strictMono hbo theorem principal_mul_omega0 : Principal (· * ·) ω := fun a b ha hb => match a, b, lt_omega0.1 ha, lt_omega0.1 hb with | _, _, ⟨m, rfl⟩, ⟨n, rfl⟩ => by dsimp only; rw [← natCast_mul] apply nat_lt...
Mathlib/SetTheory/Ordinal/Principal.lean
293
302
/- Copyright (c) 2022 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.SpecialFunctions.Gaussian.GaussianIntegral import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.MeasureTheory.Integral.Pi impor...
have h : (-↑π * b).re < 0 := by simpa only [neg_mul, neg_re, re_ofReal_mul, neg_lt_zero] using mul_pos pi_pos hb ext1 t simp_rw [fourierIntegral_real_eq_integral_exp_smul, smul_eq_mul, ← Complex.exp_add, ← add_assoc] have (x : ℝ) : ↑(-2 * π * x * t) * I + -π * b * x ^ 2 + 2 * π * c * x = -π * b * x ^ 2 ...
Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
217
222
/- Copyright (c) 2021 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.RingTheory.Polynomial.Cyclotomic.Roots import Mathlib.NumberTheory.NumberField.Basic import Mathlib.FieldTheory.Galois.Basic /-! # Cyclotomic extens...
exact Module.Finite.trans K _ } /-- A finite cyclotomic extension of an integral noetherian domain is integral -/ theorem integral [IsDomain B] [IsNoetherianRing A] [Finite S] [IsCyclotomicExtension S A B] : Algebra.IsIntegral A B := have := IsCyclotomicExtension.finite S A B ⟨isIntegral_of_noetherian in...
Mathlib/NumberTheory/Cyclotomic/Basic.lean
321
337
/- Copyright (c) 2022 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis /-! # A predicate on adjoining root...
rw [← h.map_repr z, aequiv_map, lift_map, lift_map] @[simp] theorem liftHom_aequiv {U : Type*} [CommRing U] [Algebra R U] (h : IsAdjoinRoot S f) (h' : IsAdjoinRoot T f) (x : U) (hx z) : h'.liftHom x hx (h.aequiv h' z) = h.liftHom x hx z := h.lift_aequiv h' _ _ hx _
Mathlib/RingTheory/IsAdjoinRoot.lean
582
587
/- 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...
hf.trans_eventually_abs_le (Eventually.of_forall hfg) end LinearOrderedCommRing
Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
168
171
/- Copyright (c) 2014 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn, Sabbir Rahman -/ import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Order.Ring.Pow import Mathlib.Algeb...
protected lemma Even.zpow_pos (hn : Even n) (ha : a ≠ 0) : 0 < a ^ n := (hn.zpow_nonneg _).lt_of_ne' (zpow_ne_zero _ ha) lemma zpow_two_pos_of_ne_zero (ha : a ≠ 0) : 0 < a ^ (2 : ℤ) := even_two.zpow_pos ha theorem Even.zpow_pos_iff (hn : Even n) (h : n ≠ 0) : 0 < a ^ n ↔ a ≠ 0 := by obtain ⟨k, rfl⟩ := hn
Mathlib/Algebra/Order/Field/Power.lean
30
37
/- Copyright (c) 2023 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.GroupWithZero.Action.Pi import Mathlib.Algebra.Order.Module.Defs import Mathlib.Algebra.Order.Pi import Mathlib.Data.Finsupp.Order /-! # Flooring,...
@[simp] lemma smul_floorDiv [PosSMulMono α β] [PosSMulReflectLE α β] (ha : 0 < a) (b : β) : a • b ⌊/⌋ a = b :=
Mathlib/Algebra/Order/Floor/Div.lean
139
141
/- 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.Matroid.IndepAxioms /-! # Matroid Duality For a matroid `M` on ground set `E`, the collection of complements of the bases of `M` is the collection o...
exact fun _ ↦ ⟨fun ⟨B, hB, hXB⟩ ↦ ⟨B, hB, hB.subset_ground, hXB.symm⟩, fun ⟨B, hB, _, hBX⟩ ↦ ⟨B, hB, hBX.symm⟩⟩ theorem coindep_iff_exists (hX : X ⊆ M.E := by aesop_mat) :
Mathlib/Data/Matroid/Dual.lean
237
240
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen -/ import Mathlib.Algebra.Algebra.Subalgebra.Tower import Mathlib.Data.Finite.Sum import Mathlib.Data.Matrix.Block import Mathl...
↑(LinearEquiv.funCongrLeft R R e₁.symm) ∘ₗ M.mulVecLin ∘ₗ ↑(LinearEquiv.funCongrLeft R R e₂) := Matrix.mulVecLin_submatrix _ _ _
Mathlib/LinearAlgebra/Matrix/ToLin.lean
239
241
/- Copyright (c) 2023 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll, Ralf Stephan -/ import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Data.Nat.Squarefree /-! # Smooth numbers For `s : Finset ℕ` we define the set `Nat.factoredNum...
/-- The product of the prime factors of `n` that are less than `N` is an `N`-smooth number. -/ lemma prod_mem_smoothNumbers (n N : ℕ) : (n.primeFactorsList.filter (· < N)).prod ∈ smoothNumbers N := by simp only [smoothNumbers_eq_factoredNumbers, ← Finset.mem_range, prod_mem_factoredNumbers]
Mathlib/NumberTheory/SmoothNumbers.lean
343
346
/- Copyright (c) 2021 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.Convex.Hull import Mathlib.LinearAlgebra.AffineSpace.Independent /-! # Simplicial complexes In this file, we define ...
rfl · rw [coe_inter, convexHull_inter_convexHull hs ht] /-- Construct a simplicial complex by removing the empty face for you. -/ @[simps] def ofErase (faces : Set (Finset E)) (indep : ∀ s ∈ faces, AffineIndependent 𝕜 ((↑) : s → E)) (down_closed : ∀ s ∈ faces, ∀ t ⊆ s, t ∈ faces) (inter_subset_convexHul...
Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean
110
119
/- Copyright (c) 2022 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.Martingale.Basic /-! # Centering lemma for stochastic processes Any `ℕ`-indexed stochastic process which is adapted and integrable can be wri...
f 0 + ∑ k ∈ Finset.range j, (μ[f (k + 1) - f k|ℱ i] - μ[μ[f (k + 1) - f k|ℱ k]|ℱ i]) := by rw [martingalePart_eq_sum] refine (condExp_add (hf_int 0) (by fun_prop) _).trans ?_ refine (EventuallyEq.rfl.add (condExp_finset_sum (fun i _ => by fun_prop) _)).trans ?_ refine EventuallyEq.add ?_ ?_
Mathlib/Probability/Martingale/Centering.lean
86
90
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.Topology.Continuous import Mathlib.Topology.Defs.Induced /-! # Ordering on topologies and (co)induced topologies Topologies on a fixe...
(⨅ i, t i).induced g = ⨅ i, (t i).induced g := (gc_coinduced_induced g).u_iInf
Mathlib/Topology/Order.lean
397
399
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Frédéric Dupuis -/ import Mathlib.Analysis.Convex.Hull /-! # Convex cones In a `𝕜`-module `E`, we define a convex cone as a set `s` such that `a • x + b • y ∈ s` w...
Mathlib/Analysis/Convex/Cone/Basic.lean
645
650
/- Copyright (c) 2021 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Data.ENat.Lattice import Mathlib.Data.Nat.Lattice import Mathlib.Data.Setoid.Partition imp...
· exact ⟨_, he⟩ by_cases he' : C (Sum.inr w) = b · exact ⟨_, he'⟩
Mathlib/Combinatorics/SimpleGraph/Coloring.lean
407
409
/- Copyright (c) 2022 Jakob von Raumer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jakob von Raumer, Kevin Klinge, Andrew Yang -/ import Mathlib.Algebra.Group.Submonoid.DistribMulAction import Mathlib.GroupTheory.OreLocalization.Basic import Mathlib.Algebra.GroupWi...
Mathlib/RingTheory/OreLocalization/Basic.lean
725
727
/- Copyright (c) 2019 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard -/ import Mathlib.Data.EReal.Basic deprecated_module (since := "2025-04-13")
Mathlib/Data/Real/EReal.lean
503
507
/- Copyright (c) 2024 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.Density import Mathlib.Probability.Kernel.WithDensity /-! # Radon-Nikodym derivative and Lebesgue decomposition for kern...
split_ifs with hα · exact ENNReal.toReal_nonneg · have := hαγ.countableOrCountablyGenerated.resolve_left hα exact density_nonneg ((fst_map_id_prod _ measurable_const).trans_le hκη) _ _ _ lemma rnDerivAux_le_one [IsFiniteKernel η] (hκη : κ ≤ η) {a : α} :
Mathlib/Probability/Kernel/RadonNikodym.lean
94
99
/- 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, Mario Carneiro -/ import Mathlib.Data.Countable.Defs import Mathlib.Data.Nat.Factors import Mathlib.Data.Nat.Prime.Infinite import Mathlib.Data...
simpa using Prime.ne_one @[simp] lemma primeFactors_eq_empty : n.primeFactors = ∅ ↔ n = 0 ∨ n = 1 := by
Mathlib/Data/Nat/PrimeFin.lean
63
65
/- 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.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs /-! # Witt vecto...
Mathlib/RingTheory/WittVector/Basic.lean
111
111
/- Copyright (c) 2020 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.DirectSum.Module import Mathlib.Algebra.Lie.OfAssociative import Mathlib.Algebra.Lie.Ideal import Mathlib.Algebra.Lie.Basic /-! # Direct sums of Lie...
{ (inferInstance : Module R _) with lie_smul := fun c x y => by ext simp only [zipWith_apply, smul_apply, bracket_apply, lie_smul] }
Mathlib/Algebra/Lie/DirectSum.lean
140
144
/- 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...
| zero => simp | succ k ih => have hmb : 0 < m * b := lt_mul_of_lt_of_one_lt' hm hb let h1 := digits_def' hb hmb have h2 : m = m * b / b := Nat.eq_div_of_mul_eq_left (ne_zero_of_lt hb) rfl simp only [mul_mod_left, ← h2] at h1 rw [List.replicate_succ', List.append_assoc, List.singleton_appe...
Mathlib/Data/Nat/Digits.lean
427
436
/- Copyright (c) 2024 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang -/ import Mathlib.LinearAlgebra.PiTensorProduct import Mathlib.Algebra.Algebra.Bilinear import Mathlib.Algebra.Algebra.Equiv import Mathlib.Data.Finset.NoncommProd /-! # T...
change r • tprod R 1 = _ have : Pi.mulSingle i (algebraMap R' (A i) r) = update (fun i ↦ 1) i (r • 1) := by rw [Algebra.algebraMap_eq_smul_one]; rfl rw [this, ← smul_one_smul R r (1 : A i), MultilinearMap.map_update_smul, update_eq_self, smul_one_smul, Pi.one_def] /--
Mathlib/RingTheory/PiTensorProduct.lean
178
184
/- 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.Ordmap.Invariants /-! # Verification of `Ordnode` This file uses the invariants defined in `Mathlib.Data.Ordmap.Invariants` to construct `Ordset...
∀ {t o₁ o₂}, Valid' o₁ t o₂ → Bounded nil o₁ x →
Mathlib/Data/Ordmap/Ordset.lean
485
487
/- Copyright (c) 2023 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Group.Action.Pointwise.Finset import Mathlib.Algebra.Ring.Nat /-! # e-transforms e-transforms are a family of transformations of pairs of finite ...
(card_inter_add_card_union _ _).trans <| by rw [card_smul_finset, two_mul]
Mathlib/Combinatorics/Additive/ETransform.lean
137
137
/- 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.Data.Fintype.Card import Mathlib.Algebra.Order.BigOperators.Group.Multiset import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.Multiset.OrderedM...
theorem mul_card_image_le_card {f : α → β} (s : Finset α) (n : ℕ) (hn : ∀ b ∈ s.image f, n ≤ #{a ∈ s | f a = b}) : n * #(s.image f) ≤ #s := mul_card_image_le_card_of_maps_to (fun _ ↦ mem_image_of_mem _) n hn end Pigeonhole section DoubleCounting
Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
281
287
/- 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...
@[fun_prop] theorem continuousAt_pi' {f : X → ∀ i, π i} {x : X} (hf : ∀ i, ContinuousAt (fun y => f y i) x) :
Mathlib/Topology/Constructions.lean
637
638
/- 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.EpiMono import Mathlib.CategoryTheory.Limits.Shapes.StrongEpi import Mathlib.CategoryTheory.LiftingProperties.Adjunction /-! # Preservati...
Mathlib/CategoryTheory/Functor/EpiMono.lean
325
334
/- 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...
/-- Composing a `MonoidHom` with an `AddChar` yields another `AddChar`. -/ def _root_.MonoidHom.compAddChar {N : Type*} [Monoid N] (f : M →* N) (φ : AddChar A M) : AddChar A N := toMonoidHomEquiv.symm (f.comp φ.toMonoidHom)
Mathlib/Algebra/Group/AddChar.lean
207
209
/- 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.Data.ENNReal.Holder /-! # Real conjugate exponents This file defines Hölder triple and Hölder conjugate exponents in `ℝ` and `...
lemma lt : r < p := by simpa using inv_strictAnti₀ h.inv_pos h.inv_lt_inv lemma inv_sub_inv_eq_inv : r⁻¹ - q⁻¹ = p⁻¹ := sub_eq_of_eq_add h.inv_eq lemma holderConjugate_div_div : (p / r).HolderConjugate (q / r) where
Mathlib/Data/Real/ConjExponents.lean
115
118
/- 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
2,010
2,012
/- 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, Kevin Buzzard, Yury Kudryashov, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Group.Subgroup.Ker import Mathlib.Algebra.Module.Submodule....
theorem ker_eq_bot' {f : F} : ker f = ⊥ ↔ ∀ m, f m = 0 → m = 0 := by simpa [disjoint_iff_inf_le] using disjoint_ker (f := f) (p := ⊤)
Mathlib/Algebra/Module/Submodule/Ker.lean
103
105
/- 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, Kim Morrison, Adam Topaz -/ import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products import Mathlib.Cat...
`ToType X` is empty. -/ lemma initial_iff_empty_of_preserves_of_reflects [PreservesColimit (Functor.empty.{0} C) (forget C)] [ReflectsColimit (Functor.empty.{0} C) (forget C)] (X : C) : Nonempty (IsInitial X) ↔ IsEmpty (ToType X) := by rw [← Types.initial_iff_empty, (IsInitial.isInitialIffObj (forget C) X).no...
Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean
141
146
/- Copyright (c) 2020 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Antoine Labelle -/ import Mathlib.LinearAlgebra.Dual.Lemmas import Mathlib.LinearAlgebra.Matrix.ToLin /-! # Contractions Given modules $M, N$ over a commutative ring $R$, t...
variable [Module R M] [Module R N] [Module R P] [Module R Q] variable [Free R M] [Module.Finite R M] [Free R N] [Module.Finite R N]
Mathlib/LinearAlgebra/Contraction.lean
193
195
/- 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.Data.Set.Subsingleton import Mathlib.Order.Interval.Set.Defs /-! # Intervals In any pr...
Mathlib/Order/Interval/Set/Basic.lean
1,766
1,768
/- 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 -/ import Mathlib.Algebra.Algebra.Field import Mathlib.Algebra.BigOperators.Balance import Mathlib.Algebra.Order.BigOperators.Expect import Mathlib.Algebra.Order.Star....
section LinearMaps /-- The real part in an `RCLike` field, as a linear map. -/ def reLm : K →ₗ[ℝ] ℝ := { re with map_smul' := smul_re }
Mathlib/Analysis/RCLike/Basic.lean
947
952
/- 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.RingTheory.HahnSeries.Multiplication /-! # Summable families of Hahn Series We introduce a notion of formal summability for families of Hahn series, a...
def lsum : SummableFamily Γ R α →ₗ[HahnSeries Γ R] HahnSeries Γ R where toFun := hsum map_add' _ _ := hsum_add map_smul' _ _ := hsum_smul
Mathlib/RingTheory/HahnSeries/Summable.lean
454
457
/- 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.Polynomial.FieldDivision import Mathlib.Algebra.Polynomial.Lifts import Mathlib.Data.List.Prime import Mathlib.RingTheory.Polynomial.Tower /-! # S...
rw [hs, ← Multiset.prod_toList] at hdp obtain hd | hd := hp.2.2 _ _ hdp · refine (hp.2.1 <| isUnit_of_dvd_unit hd ?_).elim exact isUnit_C.2 ((leadingCoeff_ne_zero.2 hf0).isUnit.map i) · obtain ⟨q, hq, hd⟩ := hp.dvd_prod_iff.1 hd obtain ⟨a, _, rfl⟩ := Multiset.mem_map.1 (Multiset....
Mathlib/Algebra/Polynomial/Splits.lean
469
477
/- Copyright (c) 2019 Neil Strickland. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Neil Strickland -/ import Mathlib.Algebra.BigOperators.Group.Multiset.Basic import Mathlib.Data.PNat.Prime import Mathlib.Data.Nat.Factors import Mathlib.Data.Multiset.OrderedMonoid i...
end PNat namespace PrimeMultiset theorem prod_dvd_iff {u v : PrimeMultiset} : u.prod ∣ v.prod ↔ u ≤ v := by let h := @PNat.factorMultiset_le_iff' u.prod v rw [u.factorMultiset_prod] at h
Mathlib/Data/PNat/Factors.lean
292
299
/- 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.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Polynomial.Inductions import Mathlib.RingTheory.Localizati...
simp [T, single_mul_single]
Mathlib/Algebra/Polynomial/Laurent.lean
163
164
/- 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.Covering.VitaliFamily import Mathlib.MeasureTheory.Function.AEMeasurableOrder import Mathlib.MeasureTheory.Integral.Average import ...
exact stronglyMeasurable_const.indicator (IsOpen.measurableSet (A.set_mem n)) · apply ne_of_lt calc ∫⁻ y, ‖f y - (A.set n).indicator (fun _ : α => c) y‖ₑ ∂μ ≤ ∫⁻ y, ‖f y‖ₑ + ‖(A.set n).indicator (fun _ : α => c) y‖ₑ ∂μ := lintegral_mono fun x ↦ enorm_sub_le _ = ∫⁻ y, ...
Mathlib/MeasureTheory/Covering/Differentiation.lean
795
869
/- 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.Angle import Mathlib.Analysis.SpecialFunctions.T...
· have : z ≠ 0 := by simp [Complex.ext_iff, hre.ne] simp [hre.ne, hre.not_le, hre.not_lt, this] · have : z = 0 ↔ z.im = 0 := by simp [Complex.ext_iff, hre] simp [hre, this, or_comm, le_iff_eq_or_lt] · simp [hre, hre.le, hre.ne'] @[simp] theorem abs_arg_le_pi_div_two_iff {z : ℂ} : |arg z| ≤ π / 2 ↔ 0 ≤ re...
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
374
386
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yaël Dillies -/ import Mathlib.Topology.Sets.Opens import Mathlib.Topology.Clopen /-! # Closed sets We define a few types of closed sets in a topological space. ...
/-- The term of `TopologicalSpace.Closeds α` corresponding to a singleton. -/ @[simps]
Mathlib/Topology/Sets/Closeds.lean
176
177
/- Copyright (c) 2024 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Lie.OfAssociative import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition /-! # The Lie algebra `...
lemma lie_h_e_smul (t : IsSl2Triple h e f) : ⁅h, e⁆ = (2 : R) • e := by simp [t.lie_h_e_nsmul, two_smul]
Mathlib/Algebra/Lie/Sl2.lean
56
57
/- Copyright (c) 2023 Amelia Livingston. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Amelia Livingston, Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory....
variable {G A : Type*} [Mul G] [AddCommGroup A] [SMul G A] /-- A function `f : G → A` satisfies the 1-coboundary condition if there's `x : A` such that `g • x - x = f(g)` for all `g : G`. -/
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
492
495
/- Copyright (c) 2023 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.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace ...
/-- Auxiliary lemma to reduce convergence statements from vector-valued functions to real scalar-valued functions. -/ theorem mellin_convergent_iff_norm [NormedSpace ℂ E] {f : ℝ → E} {T : Set ℝ} (hT : T ⊆ Ioi 0)
Mathlib/Analysis/MellinTransform.lean
174
177
/- 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.MonoidAlgebra.Degree import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Polynomial.Basi...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
1,496
1,502
/- Copyright (c) 2022 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Analysis.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.PolarCoord import Mathlib.Analysis.Complex.Convex import Mathlib.D...
(fun x : ℝ => exp (-b * x ^ 2)) =o[atTop] fun x : ℝ => exp (-x) := by simp_rw [← rpow_two] exact exp_neg_mul_rpow_isLittleO_exp_neg hb one_lt_two
Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
45
48
/- 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...
`whiskerRight`. -/ abbrev ofTensorHom [MonoidalCategoryStruct C]
Mathlib/CategoryTheory/Monoidal/Category.lean
684
686
/- 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.Algebra.Bilinear import Mathlib.LinearAlgebra.Basis.Defs import Mathlib.LinearAlgebra.BilinearForm.Basic import Mathlib.Linear...
variable [AddCommMonoid N₁] [AddCommMonoid N₂] [AddCommMonoid N₃] variable [Module R N₁] [Module R N₂] [Module R N₃] /-- When `N₁` and `N₂` are equivalent, bilinear maps on `M` into `N₁` are equivalent to bilinear
Mathlib/LinearAlgebra/BilinearForm/Hom.lean
240
243
/- Copyright (c) 2020 Jean Lo, Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yury Kudryashov -/ import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set import Mathlib.Algebra.Ring.Action.Pointwise.Set import Mathlib.Topology.Bornology.Basic...
end AddGroup
Mathlib/Topology/Bornology/Absorbs.lean
208
209
/- 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 import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib...
Algebra.algebraMap_eq_smul_one] exact fun m x fx ↦ contractLeftAux_contractLeftAux Q d m x fx
Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
154
156