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) 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.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.IsometricSMul /-! # Hausdorff distance The Hausdorff distance on subsets of a...
@[continuity] theorem continuous_infDist_pt : Continuous (infDist · s) := (uniformContinuous_infDist_pt s).continuous
Mathlib/Topology/MetricSpace/HausdorffDistance.lean
525
527
/- 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.Calculus.InverseFunctionTheorem.Deriv import Mathlib.Analysis.Calculus.LogDeriv...
(hasStrictFDerivAt_log_real h₂).hasFDerivAt.comp_hasDerivAt x h₁ theorem DifferentiableAt.clog {f : E → ℂ} {x : E} (h₁ : DifferentiableAt ℂ f x)
Mathlib/Analysis/SpecialFunctions/Complex/LogDeriv.lean
105
107
/- Copyright (c) 2018 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Algebra.Category.Grp.Basic import Mathlib.Algebra.Ring.Equiv import Mathlib.Algebra.Ring.PUnit import Mathlib.CategoryTheo...
/-- Build a `RingEquiv` from an isomorphism in the category `SemiRingCat`. -/ def semiRingCatIsoToRingEquiv {R S : SemiRingCat.{u}} (e : R ≅ S) : R ≃+* S := RingEquiv.ofHomInv e.hom.hom e.inv.hom (by ext; simp) (by ext; simp)
Mathlib/Algebra/Category/Ring/Basic.lean
653
656
/- 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...
theorem integrable_martingalePart (hf_int : ∀ n, Integrable (f n) μ) (n : ℕ) : Integrable (martingalePart f ℱ μ n) μ := by rw [martingalePart_eq_sum] fun_prop
Mathlib/Probability/Martingale/Centering.lean
75
79
/- 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.BigOperators.Group.Finset.Piecewise import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Pi import Mathlib.Algebra.O...
distributive. -/ lemma Finset.le_card_infs_mul_card_sups [DecidableEq α] (s t : Finset α) : #s * #t ≤ #(s ⊼ t) * #(s ⊻ t) := by simpa using four_functions_theorem (1 : α → ℕ) 1 1 1 zero_le_one zero_le_one zero_le_one zero_le_one (fun _ _ ↦ le_rfl) s t
Mathlib/Combinatorics/SetFamily/FourFunctions.lean
311
315
/- 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.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs /-! # One-dimensional iterated derivatives We define the `n`-th de...
obtain ⟨r, hpr⟩ := hp ext n u
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
302
303
/- 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 -/ import Mathlib.Data.Finset.Card import Mathlib.Data.Finset.Union import Mathlib.Data.Multiset.Pi import Mathlib.Logic.Function.DependsOn /-! # The cartesian product ...
theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) : Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq => @Multiset.Pi.cons_injective α _ δ a b s.1 hs _ _ <| funext fun e => funext fun h => have : Pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] ...
Mathlib/Data/Finset/Pi.lean
74
83
/- 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.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathlib.Data.Finset.Erase import Mat...
Mathlib/Data/Finset/Basic.lean
3,149
3,150
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Logic.Encodable.Lattice import Mathlib.Order.Filter.AtTopBot.Finset import Mathlib.Topology.Algebra.InfiniteSum.Group /-! # Infinite sums and product...
(he : e ∈ 𝓝 1) : ∃ N : ℕ, ∀ t ⊆ {n | N ≤ n}, (∏' n : t, f n) ∈ e := letI : UniformSpace G := IsTopologicalGroup.toUniformSpace G have : IsUniformGroup G := isUniformGroup_of_commGroup cauchySeq_finset_iff_nat_tprod_vanishing.1 hf.hasProd.cauchySeq e he
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
308
311
/- 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.Data.Finset.NAry import Mathlib.Data.Finset.Slice import Mathlib.Data.Set.Sups /-! # Set family operations This file defines a few binary operations on `...
Mathlib/Data/Finset/Sups.lean
707
708
/- 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.Sites.Over /-! Internal hom of sheaves In this file, given two sheaves `F` and `G` on a site `(C, J)` with values in a category `A`, we define ...
lemma exists_app (hx : x.Compatible) (g : Y ⟶ X) : ∃ (φ : F.obj (op Y) ⟶ G.obj (op Y)), ∀ {Z : C} (p : Z ⟶ Y) (hp : S (p ≫ g)), φ ≫ G.map p.op = F.map p.op ≫ (x (p ≫ g) hp).app ⟨Over.mk (𝟙 Z)⟩ := by let c : Cone ((Presieve.diagram (Sieve.pullback g S).arrows).op ⋙ G) := { pt := F.obj (op Y) ...
Mathlib/CategoryTheory/Sites/SheafHom.lean
127
149
/- 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...
· simpa only [Ne, inv_eq_zero, Polynomial.leadingCoeff_eq_zero] using right_div_gcd_ne_zero hq open scoped Classical in /-- A version of `num_div_dvd` with the LHS in simp normal form -/ @[simp] theorem num_div_dvd' (p : K[X]) {q : K[X]} (hq : q ≠ 0) : C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q) ∣ p := by sim...
Mathlib/FieldTheory/RatFunc/Basic.lean
820
828
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nathaniel Thomas, Jeremy Avigad, Johannes Hölzl, Mario Carneiro, Anne Baanen, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Group.Hom.Instances import Mathlib.Algebra.Modul...
end AddCommGroup end LinearMap
Mathlib/Algebra/Module/LinearMap/Defs.lean
592
595
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Peter Nelson -/ import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.GeomSum import Mathlib.LinearAlgebra.Matrix.Block import Mathlib.LinearAlgebra.Matrix.Determina...
.of fun i j ↦ (v i) ^ j.1 * (w i) ^ j.rev.1 /-- A square matrix with rows all having the form `[b^(n-1), a * b^(n-2), ..., a ^ (n-1)]` -/
Mathlib/LinearAlgebra/Vandermonde.lean
72
74
/- Copyright (c) 2020 Jalex Stark. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jalex Stark, Kim Morrison, Eric Wieser, Oliver Nash, Wen Yang -/ import Mathlib.Data.Matrix.Basic /-! # Matrices with a single non-zero element. This file provides `Matrix.stdBasisMatri...
stdBasisMatrix i j c * stdBasisMatrix j k d = stdBasisMatrix i k (c * d) := by ext a b simp only [mul_apply, stdBasisMatrix, boole_mul] by_cases h₁ : i = a <;> by_cases h₂ : k = b <;> simp [h₁, h₂]
Mathlib/Data/Matrix/Basis.lean
231
234
/- Copyright (c) 2021 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.NatIso /-! # Bicategories In this file we define typeclass for bicategories. A bicategory `B` consists of * objects `a : B`, * 1-morphisms ...
@[reassoc] theorem leftUnitor_comp (f : a ⟶ b) (g : b ⟶ c) :
Mathlib/CategoryTheory/Bicategory/Basic.lean
394
395
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.AlgebraicGeometry.Gluing import Mathlib.CategoryTheory.Limits.Opposites import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.CategoryTheory.Limits.Sh...
· apply pullback.hom_ext · simpa using lift_comp_ι 𝒰 f g i · simp_rw [Category.assoc, pullback.lift_snd, pullback.lift_fst, Category.id_comp] · apply pullback.hom_ext · simp_rw [Category.assoc, pullback.lift_fst, pullback.lift_snd, Category.id_comp] · simp [p2] @[simp, reassoc] theorem pullbackP1I...
Mathlib/AlgebraicGeometry/Pullbacks.lean
361
380
/- Copyright (c) 2022 Eric Rodriguez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Rodriguez -/ import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Fi...
mul_one a := by cases a <;> rfl
Mathlib/Data/Sign.lean
90
90
/- Copyright (c) 2021 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth, Frédéric Dupuis -/ import Mathlib.Analysis.InnerProductSpace.Calculus import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Adjoint...
rayleighQuotient T (c • x) = rayleighQuotient T x := by by_cases hx : x = 0 · simp [hx] field_simp [norm_smul, T.reApplyInnerSelf_smul] ring theorem image_rayleigh_eq_image_rayleigh_sphere {r : ℝ} (hr : 0 < r) : rayleighQuotient T '' {0}ᶜ = rayleighQuotient T '' sphere 0 r := by
Mathlib/Analysis/InnerProductSpace/Rayleigh.lean
57
64
/- 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.Algebra.Order.Ring.Nat import Mathlib.Logic.Encodable.Pi import Mathlib.Logic.Function.Iterate /-! # The primitive recursive functions The primitive ...
(pred.comp₁ _ <| (this _ hf).comp₁ (fun m => Encodable.encode <| (@decode (List.Vector ℕ n) _ m).map f)
Mathlib/Computability/Primrec.lean
1,391
1,392
/- 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.Algebra.BigOperators.Group.Finset.Pi import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.Opposites import Mathlib.Algebra.Ring.Opposite import Ma...
ext j : 1 simp only [ι_additiveObjIsoBiproduct_inv_assoc, isoBiproductEmbedding_inv, biproduct.ι_desc, ← F.map_comp] congr 1 funext ⟨⟩ ⟨⟩ simp [comp_apply, dite_comp, comp_dite] @[reassoc]
Mathlib/CategoryTheory/Preadditive/Mat.lean
383
390
/- 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.Ring.Divisibility.Lemmas import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Engel import Mathlib.LinearAlgebra.Eigenspace.Pi import Math...
/-- This is the Fitting decomposition of the Lie module `M`. -/ lemma isCompl_genWeightSpace_zero_posFittingComp : IsCompl (genWeightSpace M 0) (posFittingComp R L M) := by let P : LieSubmodule R L M → Prop := fun N ↦ IsCompl (genWeightSpace N 0) (posFittingComp R L N)
Mathlib/Algebra/Lie/Weights/Basic.lean
631
635
/- Copyright (c) 2021 Yourong Zang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yourong Zang, Yury Kudryashov -/ import Mathlib.Data.Fintype.Option import Mathlib.Topology.Homeomorph.Lemmas import Mathlib.Topology.Sets.Opens /-! # The OnePoint Compactification We ...
tendsto_nhds_infty'.trans <| by simp only [tendsto_pure_left, hasBasis_coclosedCompact.tendsto_left_iff, forall_and, and_assoc, exists_prop]
Mathlib/Topology/Compactification/OnePoint.lean
359
362
/- 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 -/ import Mathlib.Data.Set.Prod /-! # N-ary images of sets This file defines `Set.image2`, the binary image of sets. This is mostly useful to define pointwise oper...
(image2_nonempty_iff.1 h).1
Mathlib/Data/Set/NAry.lean
122
123
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible impo...
qsmul_def q a := hf <| by rw [qsmul, mul, Rat.smul_def, ratCast]
Mathlib/Algebra/Field/Basic.lean
241
242
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Jujian Zhang, Yongle Hu -/ import Mathlib.Algebra.Colimit.TensorProduct import Mathlib.Algebra.DirectSum.Finsupp import Mathlib.Algebra.DirectSum.Module import Mathlib....
/-- If `M` is a flat module, then `f ⊗ 𝟙 M` is injective for all injective linear maps `f`. -/ theorem rTensor_preserves_injective_linearMap [Flat R M] (f : N →ₗ[R] P) (hf : Function.Injective f) : Function.Injective (f.rTensor M) := by
Mathlib/RingTheory/Flat/Basic.lean
117
119
/- 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, Bryan Gin-ge Chen -/ import Mathlib.Order.Heyting.Basic /-! # (Generalized) Boolean algebras A Boolean algebra is a bounded distributive lattice with a complement ope...
rw [sup_sdiff_cancel_right hx] refine le_trans (sup_le_sup_left sdiff_le z) ?_ rw [sup_eq_right.2 hz]),
Mathlib/Order/BooleanAlgebra.lean
229
231
/- 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 -/ import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Field.Defs /-! # Linear ordered (semi)fields A ...
Mathlib/Algebra/Order/Field/Defs.lean
61
61
/- 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.Algebra.Order.Ring.Nat import Mathlib.Logic.Encodable.Pi import Mathlib.Logic.Function.Iterate /-! # The primitive recursive functions The primitive ...
(fun o m => (@decode α _ m).bind fun a => o.map (List.cons (encode a))) (some []) := list_foldl' H ((list_reverse' H).comp (.ofNat (List ℕ))) (const (some [])) (Primrec.comp₂ (bind_decode_iff.2 <| .swap this) Primrec₂.right) nat_iff.1 <| (encode_iff.2 this).of_eq fun n => by rw...
Mathlib/Computability/Primrec.lean
813
829
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Limits.Final import Mathlib.CategoryTheory.Functor.TwoSquare /-! # Guitart exact squares Given four functors `T`, `L`, `R` and `B`, a 2-square `...
obtain ⟨g, φ, rfl⟩ := CostructuredArrow.mk_surjective f obtain ⟨X₁, a, rfl⟩ := g.mk_surjective obtain ⟨b, hb, rfl⟩ := StructuredArrow.homMk_surjective φ exact ⟨X₁, a, b, by simpa using hb, rfl⟩ end namespace EquivalenceJ
Mathlib/CategoryTheory/GuitartExact/Basic.lean
132
139
/- Copyright (c) 2023 Xavier Roblot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Xavier Roblot -/ import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.RingTheory.LocalRing.RingHom.Basic import Mathlib.GroupTheory.Torsion /-! # Units of a number field ...
rw [← RingOfIntegers.coe_norm, isUnit_iff_norm.mp x.isUnit] theorem pos_at_place (x : (𝓞 K)ˣ) (w : InfinitePlace K) :
Mathlib/NumberTheory/NumberField/Units/Basic.lean
97
99
/- Copyright (c) 2020 Johan Commelin, Robert Y. Lewis. 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.Rename import Mathlib.Algebra.MvPolynomial.Variables /-! # Monad operations on `MvPolynomial` ...
ext1 apply aeval_bind₁ theorem eval₂Hom_comp_bind₂ (f : S →+* T) (g : σ → T) (h : R →+* MvPolynomial σ S) :
Mathlib/Algebra/MvPolynomial/Monad.lean
257
260
/- 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.Data.Matrix.Kronecker import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.TensorProduct.Basis /-! # Connections between `TensorProduct` a...
ext ⟨i, j, k⟩ ⟨⟨i', j'⟩, k'⟩ simp only [toMatrix_apply, Basis.tensorProduct_apply, LinearEquiv.coe_coe, assoc_tmul, Basis.tensorProduct_repr_tmul_apply, Basis.repr_self, Finsupp.single_apply, @eq_comm _ k', @eq_comm _ j', smul_eq_mul, mul_ite, mul_one, mul_zero, ← ite_and, @eq_comm _ i', submatrix_apply...
Mathlib/LinearAlgebra/TensorProduct/Matrix.lean
68
78
/- Copyright (c) 2022 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Joël Riou -/ import Mathlib.CategoryTheory.Comma.Arrow /-! # Commutative squares This file provide an API for commutative squares in categories. If `top`, `left`, `right`...
namespace Functor
Mathlib/CategoryTheory/CommSq.lean
126
127
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Logic.IsEmpty import Mathlib.Tactic.Inhabit /-! # Types with a unique term In this file we define a typeclass `Unique`, which expresses that a type h...
exact he b hb⟩⟩⟩ @[deprecated (since := "2024-12-17")] alias unique_subtype_iff_exists_unique := unique_subtype_iff_existsUnique /-- Given an explicit `a : α` with `Subsingleton α`, we can construct
Mathlib/Logic/Unique.lean
68
73
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Topology.UniformSpace.UniformConvergenceTopology /-! # Equicontinuity of a family of functions Let `X` be a topological space and `α` a `UniformS...
exact hk.mono_left <| inf_le_inf_right _ <| iInf_le _ k theorem Filter.HasBasis.equicontinuousAt_iff_left {p : κ → Prop} {s : κ → Set X} {F : ι → X → α} {x₀ : X} (hX : (𝓝 x₀).HasBasis p s) : EquicontinuousAt F x₀ ↔ ∀ U ∈ 𝓤 α, ∃ k, p k ∧ ∀ x ∈ s k, ∀ i, (F i x₀, F i x) ∈ U := by
Mathlib/Topology/UniformSpace/Equicontinuity.lean
603
607
/- 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.Algebra.Group.Pointwise.Set.Finite import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.GroupTheory.QuotientGroup.Defs /-! # Finitely gene...
Group.FG G ↔ ∃ (n : _) (S : Finset G), S.card = n ∧ Subgroup.closure (S : Set G) = ⊤ := Group.fg_def.trans ⟨fun ⟨S, hS⟩ => ⟨S.card, S, rfl, hS⟩, fun ⟨_n, S, _hn, hS⟩ => ⟨S, hS⟩⟩
Mathlib/GroupTheory/Finiteness.lean
267
269
/- 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, Anne Baanen -/ import Mathlib.Algebra.BigOperators.Finsupp.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.GroupWithZero....
p ∣ (s.map f).prod → ∃ a ∈ s, p ∣ f a := fun h => by simpa only [exists_prop, Multiset.mem_map, exists_exists_and_eq_and] using hp.exists_mem_multiset_dvd h
Mathlib/Algebra/BigOperators/Associated.lean
39
42
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yaël Dillies, Moritz Doll -/ import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Data.Real.Pointwise /...
section SeminormedCommRing variable [SeminormedRing 𝕜] [SeminormedCommRing 𝕜₂] variable {σ₁₂ : 𝕜 →+* 𝕜₂} [RingHomIsometric σ₁₂]
Mathlib/Analysis/Seminorm.lean
397
401
/- 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...
| succ n => rw [coe_zeta_smul_apply] simp only [n.succ_ne_zero, forall_prop_of_true, succ_pos', if_false, ZeroHom.coe_mk] simp only [f', g', coe_mk, succ_ne_zero, ite_false] rw [sum_congr rfl fun x hx => ?_] rw [if_neg (Nat.pos_of_mem_divisors hx).ne']
Mathlib/NumberTheory/ArithmeticFunction.lean
1,129
1,134
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Monoidal.Discrete import Mathlib.CategoryTheory.Monoidal.NaturalTransformation import Mathlib.CategoryTheory.Monoidal.Opposite import Mathli...
simp [← rightUnitor_inv_braiding]
Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
342
343
/- 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.Partrec import Mathlib.Data.Option.Basic /-! # Gödel Numbering for Partial Recursive Functions. This file defines `Nat.Partrec.Code`, a...
section open Primrec namespace Nat.Partrec.Code
Mathlib/Computability/PartrecCode.lean
206
209
/- Copyright (c) 2020 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.GroupWithZero.Basic /-! # Indicator functions and support of a function in groups with z...
section MonoidWithZero
Mathlib/Algebra/GroupWithZero/Indicator.lean
112
113
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Batteries.Tactic.Congr import Mathlib.Data.Option.Basic import Mathlib.Data.Prod.Basic import Mathlib.Data.Set.Subsingleton import Mathlib.Dat...
ext i obtain hi | hi := eq_or_ne (σ i) i
Mathlib/Data/Set/Image.lean
537
538
/- Copyright (c) 2019 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jan-David Salchow, Sébastien Gouëzel, Jean Lo, Yury Kudryashov, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Module.Opposite import Mathlib.Topology.Algebra.Group.Qu...
Mathlib/Topology/Algebra/Module/Basic.lean
2,090
2,093
/- 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...
end Nat
Mathlib/Data/Nat/Totient.lean
349
356
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.FinMeasAdditive /-! # Extension of a linear function from indicators to L1 Give...
theorem setToL1_mono_left' {T T' : Set α → E →L[ℝ] G''} {C C' : ℝ} (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C') (hTT' : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, T s x ≤ T' s x) (f : α →₁[μ] E) : setToL1 hT f ≤ setToL1 hT' f := by induction f using Lp.induction (hp_ne_top := ...
Mathlib/MeasureTheory/Integral/SetToL1.lean
519
525
/- 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.Topology.UniformSpace.Cauchy /-! # Uniform convergence A sequence of functions `Fₙ` (with values in a metric space) converges uniformly on a se...
theorem UniformContinuous₂.tendstoUniformly [UniformSpace α] [UniformSpace γ] {f : α → β → γ} (h : UniformContinuous₂ f) : TendstoUniformly f (f x) (𝓝 x) := UniformContinuousOn.tendstoUniformly univ_mem <| by rwa [univ_prod_univ, uniformContinuousOn_univ]
Mathlib/Topology/UniformSpace/UniformConvergence.lean
349
352
/- Copyright (c) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.Analytic.IsolatedZeros import Mathlib.Analysis.SpecialFunctions.Complex.CircleMap import Mathlib.Analysis.SpecialFunctions.NonIntegrable /-...
theorem circleIntegrable_zero_radius {f : ℂ → E} {c : ℂ} : CircleIntegrable f c 0 := by simp [CircleIntegrable]
Mathlib/MeasureTheory/Integral/CircleIntegral.lean
198
199
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, Amelia Livingston, Yury Kudryashov -/ import Mathlib.Algebra.BigOperators.Group.Multiset.Defs import Mathlib.A...
namespace FreeMonoid variable {α : Type*}
Mathlib/Algebra/Group/Submonoid/Membership.lean
142
146
/- Copyright (c) 2022 Cuma Kökmen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Cuma Kökmen, Yury Kudryashov -/ import Mathlib.MeasureTheory.Integral.CircleIntegral import Mathlib.MeasureTheory.Integral.Prod import Mathlib.Order.Fin.Tuple import Mathlib.Util.Superscr...
/-- If for all `θ : ℝⁿ`, `‖f (torusMap c R θ)‖` is less than or equal to a constant `C : ℝ`, then `‖∯ x in T(c, R), f x‖` is less than or equal to `(2 * π)^n * (∏ i, |R i|) * C` -/ theorem norm_torusIntegral_le_of_norm_le_const {C : ℝ} (hf : ∀ θ, ‖f (torusMap c R θ)‖ ≤ C) : ‖∯ x in T(c, R), f x‖ ≤ ((2 * π) ^ (n : ℕ...
Mathlib/MeasureTheory/Integral/TorusIntegral.lean
170
173
/- Copyright (c) 2018 Rohan Mitta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov, Winston Yin -/ import Mathlib.Algebra.Group.End import Mathlib.Topology.EMetricSpace.Diam /-! # Lipschitz co...
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) f^[n] | 0 => by simpa only [pow_zero] using LipschitzWith.id | n + 1 => by rw [pow_succ]; exact (LipschitzWith.iterate hf n).comp hf
Mathlib/Topology/EMetricSpace/Lipschitz.lean
263
265
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fin.VecNotation import Mathlib.Logic.Small.Basic import Mathlib.SetTheory.ZFC.PSet /-! # A model of ZFC In this file, we model Zermelo-Fraenkel ...
Mathlib/SetTheory/ZFC/Basic.lean
1,698
1,706
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.CharP.Invertible import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Segment import...
⟨0, Set.left_mem_Icc.2 zero_le_one, lineMap_apply_zero _ _⟩ theorem right_mem_affineSegment (x y : P) : y ∈ affineSegment R x y :=
Mathlib/Analysis/Convex/Between.lean
110
112
/- 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.Card import Mathlib.Data.Fintype.Basic /-! # Cardinalities of finite types This file defines the cardinality `Fintype.card α` as the numb...
Mathlib/Data/Fintype/Card.lean
594
595
/- Copyright (c) 2020 Johan Commelin, Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Robert Y. Lewis -/ import Mathlib.Algebra.Field.ZMod import Mathlib.NumberTheory.Padics.PadicIntegers import Mathlib.RingTheory.LocalRing.ResidueField....
have := dvd_add ha hb rwa [sub_eq_add_neg, sub_eq_add_neg, add_assoc, neg_add_cancel_left, ← sub_eq_add_neg, ← Int.cast_sub, pow_p_dvd_int_iff] at this theorem zmod_congr_of_sub_mem_span (n : ℕ) (x : ℤ_[p]) (a b : ℕ) (ha : x - a ∈ (Ideal.span {(p : ℤ_[p]) ^ n})) (hb : x - b ∈ (Ideal.span {(p : ℤ_[p]) ^...
Mathlib/NumberTheory/Padics/RingHoms.lean
142
150
/- 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.Computation.Approximations import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.D...
theorem of_terminates_iff_of_rat_terminates {v : K} {q : ℚ} (v_eq_q : v = (q : K)) : (of v).Terminates ↔ (of q).Terminates := by constructor <;> intro h <;> obtain ⟨n, h⟩ := h <;> use n <;> simp only [Stream'.Seq.TerminatedAt, (coe_of_s_get?_rat_eq v_eq_q n).symm] at h ⊢ <;> cases h' : (of q).s.get? n <;...
Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean
214
220
/- 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 -/ import Mathlib.Algebra.Group.Subgroup.Lattice import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra...
variable (R) @[simp] theorem subsingleton_iff : Subsingleton (Submodule R M) ↔ Subsingleton M :=
Mathlib/Algebra/Module/Submodule/Lattice.lean
312
316
/- 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, Sébastien Gouëzel, Patrick Massot -/ import Mathlib.Topology.UniformSpace.Cauchy import Mathlib.Topology.UniformSpace.Separation import Mathlib.Topology.DenseEmbedding ...
include h_f in theorem uniformContinuous_uniformly_extend [CompleteSpace γ] : UniformContinuous ψ := fun d hd => let ⟨s, hs, hs_comp⟩ := comp3_mem_uniformity hd
Mathlib/Topology/UniformSpace/UniformEmbedding.lean
475
477
/- 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...
@[simp] theorem rpow_one (x : ℝ≥0) : x ^ (1 : ℝ) = x :=
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
57
59
/- 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.Interval import Mathlib.Order.Interval.Set.Pi import Mathlib.Tactic.TFAE import Mathlib.Tactic.NormNum im...
· rcases em (∃ x, ¬(b < f x)) with (⟨x, hx⟩ | hb) · rcases H₁ hb hx with ⟨y, hya, hyb⟩ exact iInf₂_le_of_le y hya (principal_mono.2 fun z hz => hyb.trans_lt (hf.2 hz)) · push_neg at hb exact le_principal_iff.2 (univ_mem' hb) · rcases em (∃ x, ¬(f x < b)) with (⟨x, hx⟩ | hb) · rcases H₂ hb hx...
Mathlib/Topology/Order/Basic.lean
201
208
/- 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.RingTheory.Adjoin.FG /-! # Adjoining elements and being finitely generated in an algebra tower ## Main results * `Algebra.fg_trans'`: if `S` is finitely gene...
exact ⟨s.image (algebraMap S A) ∪ t, by rw [Finset.coe_union, Finset.coe_image, Algebra.adjoin_algebraMap_image_union_eq_adjoin_adjoin, hs, Algebra.adjoin_top, ht, Subalgebra.restrictScalars_top, Subalgebra.restrictScalars_top ] ⟩ end
Mathlib/RingTheory/Adjoin/Tower.lean
67
74
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.List.Sublists import Mathlib.Data.List.Zip import Mathlib.Data.Multiset.Bind import Mathlib.Data.Multiset.Range /-! # The powerset of a multiset ...
exact coe_eq_coe.mpr ((List.range_bind_sublistsLen_perm _).map _) @[simp] theorem nodup_powerset {s : Multiset α} : Nodup (powerset s) ↔ Nodup s :=
Mathlib/Data/Multiset/Powerset.lean
275
278
/- 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...
Mathlib/Data/Complex/Exponential.lean
932
932
/- Copyright (c) 2024 Jeremy Tan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Tan -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Order.Partition.Equipartition /-! # Turán's theorem In this file we prove Turán's theorem, the first importan...
/-- In a Turán-maximal graph, non-adjacency is transitive. -/ lemma not_adj_trans (h : G.IsTuranMaximal r) (hts : ¬G.Adj t s) (hsu : ¬G.Adj s u) : ¬G.Adj t u := by have hst : ¬G.Adj s t := fun a ↦ hts a.symm have dst := h.degree_eq_of_not_adj hst have dsu := h.degree_eq_of_not_adj hsu rw [IsTuranMaximal] at...
Mathlib/Combinatorics/SimpleGraph/Turan.lean
141
166
/- Copyright (c) 2020 Shing Tak Lam. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shing Tak Lam -/ import Mathlib.Data.Finite.Sum import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.GroupAction.CardCommute import Mathlib.Grou...
| ⟨⟨sr i, sr j⟩, _⟩ => Sum.inr (Sum.inr (Sum.inl (i + j))) | ⟨⟨r i, r j⟩, _⟩ => Sum.inr (Sum.inr (Sum.inr ⟨i, j⟩)) invFun := fun | .inl i => ⟨⟨sr i, r 0⟩, congrArg sr ((add_zero i).trans (sub_zero i).symm)⟩ | .inr (.inl j) => ⟨⟨r 0, sr j⟩, congrArg sr ((sub_zero j).trans (add_zero j).symm)⟩ ...
Mathlib/GroupTheory/SpecificGroups/Dihedral.lean
247
252
/- Copyright (c) 2022 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Analysis.Normed.Group.Basic /-! # Hamming spaces The Hamming metric counts the number of places two members of a (finite) Pi type differ. The Hamming n...
instance [Fintype ι] [∀ i, DecidableEq (β i)] : DecidableEq (Hamming β) := Fintype.decidablePiFintype
Mathlib/InformationTheory/Hamming.lean
222
224
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Fin.VecNotation import Mathlib.Logic.Small.Basic import Mathlib.SetTheory.ZFC.PSet /-! # A model of ZFC In this file, we model Zermelo-Fraenkel ...
Mathlib/SetTheory/ZFC/Basic.lean
1,072
1,074
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Ashvni Narayanan -/ import Mathlib.FieldTheory.RatFunc.Degree import Mathlib.RingTheory.DedekindDomain.IntegralClosure import Mathlib.RingTheory.IntegralClosure.IntegrallyClo...
instance : IsFractionRing (ringOfIntegers Fq F) F := integralClosure.isFractionRing_of_finite_extension (RatFunc Fq) F
Mathlib/NumberTheory/FunctionField.lean
123
126
/- Copyright (c) 2022 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts /-! # Limits involving zero objects Binary p...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
207
210
/- Copyright (c) 2023 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.Mul import Mathlib.Analysis.Calculus.Deriv.Comp /-! # Derivatives of `x ↦ x⁻¹` and `f x / g x` In this...
@[simp]
Mathlib/Analysis/Calculus/Deriv/Inv.lean
114
115
/- Copyright (c) 2019 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Sébastien Gouëzel, Yury Kudryashov, Anatole Dedecker -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add /-! # One-dimensional de...
@[simp]
Mathlib/Analysis/Calculus/Deriv/Add.lean
134
135
/- 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
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
543
544
/- Copyright (c) 2020 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Data.Stream.Init import Mathlib.Tactic.ApplyFun import Mathlib.Control.Fix import Mathlib.Order.OmegaCompletePartialOrder /-! # Lawful fixed point operators...
variable {f : (∀ a b, γ a b) → ∀ a b, γ a b} theorem uncurry_curry_ωScottContinuous (hc : ωScottContinuous f) : ωScottContinuous <| (monotoneUncurry α β γ).comp <|
Mathlib/Control/LawfulFix.lean
258
262
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Function.LpSeminorm.Trim import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Function.StronglyMeasura...
alias ae_eq_trim_iff_of_aeStronglyMeasurable' := ae_eq_trim_iff_of_aestronglyMeasurable theorem AEStronglyMeasurable.comp_ae_measurable' {α β γ : Type*} [TopologicalSpace β] {mα : MeasurableSpace α} {_ : MeasurableSpace γ} {f : α → β} {μ : Measure γ} {g : γ → α}
Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
136
139
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Functor.KanExtension.Basic /-! # Pointwise Kan extensions In this file, we define the notion of pointwise (left) Kan extension. Given two functo...
variable {E E'} /-- If two left extensions `E` and `E'` are isomorphic, `E` is a pointwise left Kan extension at `Y` iff `E'` is. -/
Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean
129
132
/- Copyright (c) 2020 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.LinearOrder /-! # Monotone surjective functions are surjective on intervals A monotone surjecti...
· intro p hp rcases eq_left_or_mem_Ioo_of_mem_Ico hp with (rfl | hp') · exact mem_image_of_mem f (left_mem_Ico.mpr hab) · exact image_subset f Ioo_subset_Ico_self <| surjOn_Ioo_of_monotone_surjective h_mono h_surj a b hp' · rw [Ico_eq_empty (h_mono hab).not_lt] exact surjOn_empty f _ theore...
Mathlib/Order/Interval/Set/SurjOn.lean
35
44
/- 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.LinearAlgebra.Eigenspace.Basic import Mathlib.LinearAlgebra.Semisimple /-! # Eigenspaces of semisimple linear endomorphisms This file contains basic result...
refine le_antisymm (fun m hm ↦ mem_eigenspace_iff.mpr ?_) (f.genEigenspace μ |>.mono ?_) · apply apply_eq_of_mem_of_comm_of_isFinitelySemisimple_of_isNil hm rfl hf simp · exact Order.one_le_iff_pos.mpr hk
Mathlib/LinearAlgebra/Eigenspace/Semisimple.lean
55
59
/- 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 -/ import Mathlib.Data.Set.Prod /-! # N-ary images of sets This file defines `Set.image2`, the binary image of sets. This is mostly useful to define pointwise oper...
image2 f s {b} = s := by rw [image2_singleton_right, funext h, image_id'] theorem image2_inter_union_subset_union : image2 f (s ∩ s') (t ∪ t') ⊆ image2 f s t ∪ image2 f s' t' := by rw [image2_union_right]
Mathlib/Data/Set/NAry.lean
308
313
/- 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.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Analysis.Oscillation import Mathlib.Data.B...
h.mono_left <| IntegrationParams.toFilteriUnion_mono _ hl _ protected theorem Integrable.hasIntegral (h : Integrable I l f vol) : HasIntegral I l f vol (integral I l f vol) := by rw [integral, dif_pos h] exact Classical.choose_spec h theorem Integrable.mono {l'} (h : Integrable I l f vol) (hle : l' ≤ l) : I...
Mathlib/Analysis/BoxIntegral/Basic.lean
220
232
/- 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.Support import Mathlib.Algebra.Polynomial.Basic import Mathlib.Data.Nat.Choose.Sum impo...
Mathlib/Algebra/Polynomial/Coeff.lean
157
157
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.ZeroCons /-! # Basic results on multisets -/ -- No algebra should be required assert_not_exists Monoid universe v open List S...
Mathlib/Data/Multiset/Basic.lean
2,537
2,539
/- 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.Filter import Mathlib.Analysis.BoxIntegral.Partition.Measure import Mathlib.Analysis.Oscillation import Mathlib.Data.B...
`I` subordinate to `r`, the integral sum over this partition is `ε`-close to the integral. Then for any tagged prepartition (i.e. a finite collections of pairwise disjoint subboxes of `I` with tagged points) `π`, the integral sum over `π` differs from the integral of `f` over the part of `I` covered by `π` by at most `...
Mathlib/Analysis/BoxIntegral/Basic.lean
364
369
/- 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 -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ord...
Mathlib/Algebra/Order/Field/Basic.lean
827
828
/- 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.Order.Interval.Set.OrderEmbedding import Mathlib.Order.Antichain import Mathlib.Order.SetNotation /-! # Order-connected sets We say that a set `s :...
Mathlib/Order/Interval/Set/OrdConnected.lean
340
345
/- Copyright (c) 2024 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.CategoryTheory.Localization.CalculusOfFractions.Fractions import Mathlib.CategoryTheory.Localization.HasLocalization import Mathlib.CategoryTheory.Preadditive.Ad...
lemma add_eq_add {X'' Y'' : C} (eX' : L.obj X'' ≅ X') (eY' : L.obj Y'' ≅ Y') (f₁ f₂ : X' ⟶ Y') : add W eX eY f₁ f₂ = add W eX' eY' f₁ f₂ := by have h₁ := comp_add W eX' eX eY (𝟙 _) f₁ f₂ have h₂ := add_comp W eX' eY eY' f₁ f₂ (𝟙 _) simp only [id_comp] at h₁ simp only [comp_id] at h₂ rw [h₁, h₂]
Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean
271
278
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Order.Filter.Tendsto import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Algebra.Order.Group.Defs import Mathlib.Data.Finset.Lat...
IsMinFilter.max hf hg theorem IsMaxOn.max (hf : IsMaxOn f s a) (hg : IsMaxOn g s a) :
Mathlib/Order/Filter/Extr.lean
516
518
/- 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.BooleanAlgebra import Mathlib.Tactic.Common /-! # Co-Heyting boundary The boundary of an element of a co-Heyting algebra is the intersection of its...
@[simp]
Mathlib/Order/Heyting/Boundary.lean
132
132
/- 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.GCDMonoid.Finset import Mathlib.Algebra.Polynomial.CancelLeads import Mathlib.Algebra.Polynomial.EraseLead import Mathlib.Algebra.Polynomial.Fi...
suffices h : ∀ (n : ℕ) (p q : R[X]), (p * q).degree < n → (p * q).content = p.content * q.content by apply h apply lt_of_le_of_lt degree_le_natDegree (WithBot.coe_lt_coe.2 (Nat.lt_succ_self _)) intro n induction' n with n ih · intro p q hpq rw [Nat.cast_zero,
Mathlib/RingTheory/Polynomial/Content.lean
321
328
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Finset.Fold import Mathlib.Data.Multiset.Bind import Mathlib.Order.SetNotation /-! # Unions of finite sets This file defines the union of a fami...
theorem image_biUnion [DecidableEq γ] {f : α → β} {s : Finset α} {t : β → Finset γ} : (s.image f).biUnion t = s.biUnion fun a => t (f a) := haveI := Classical.decEq α Finset.induction_on s rfl fun a s _ ih => by simp only [image_insert, biUnion_insert, ih] theorem biUnion_image [DecidableEq γ] {s : Finset α} {...
Mathlib/Data/Finset/Union.lean
257
263
/- Copyright (c) 2022 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.AlgebraicTopology.SimplicialObject.Split import Mathlib.AlgebraicTopology.DoldKan.Degeneracies import Mathlib.AlgebraicTopology.DoldKan.FunctorN /-! # Split si...
erw [comp_id, comp_sum, Finset.sum_eq_single A, cofan_inj_πSummand_eq_id_assoc] · intro B _ h₂ rw [s.cofan_inj_πSummand_eq_zero_assoc _ _ h₂, zero_comp] · simp @[reassoc (attr := simp)] theorem σ_comp_πSummand_id_eq_zero {n : ℕ} (i : Fin (n + 1)) : X.σ i ≫ s.πSummand (IndexSet.id (op ⦋n + 1⦌)) = 0 := by ...
Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean
61
69
/- Copyright (c) 2022 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Junyan Xu, Jack McKoen -/ import Mathlib.RingTheory.Valuation.ValuationRing import Mathlib.RingTheory.Localization.AsSubring import Mathlib.Algebra.Ring.Subring.Pointwise impor...
theorem unitGroup_le_unitGroup {A B : ValuationSubring K} : A.unitGroup ≤ B.unitGroup ↔ A ≤ B := by constructor · intro h x hx rw [← A.valuation_le_one_iff x, le_iff_lt_or_eq] at hx
Mathlib/RingTheory/Valuation/ValuationSubring.lean
446
450
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.ZeroCons /-! # Basic results on multisets -/ -- No algebra should be required assert_not_exists Monoid universe v open List S...
Mathlib/Data/Multiset/Basic.lean
2,818
2,818
/- Copyright (c) 2021 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Combinatorics.SetFamily.Shadow /-! # UV-compressions This file defines UV-compression. It is an operation on a set family that reduces its ...
rw [compress] split_ifs with huvs swap · exact hs rw [mem_shadow_iff] at hs' obtain ⟨t, Ht, a, hat, rfl⟩ := hs'
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
305
310
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib....
refine (natDegree_sum_le _ _).trans ?_ refine Multiset.max_le_of_forall_le _ _ ?_ simp only [forall_apply_eq_imp_iff, true_and, Function.comp_apply, Multiset.map_map, Multiset.mem_map, exists_imp, Finset.mem_univ_val] intro g calc natDegree (sign g • ∏ i : n, (X • A.map C + B.map C : Matrix n n α[X]) ...
Mathlib/LinearAlgebra/Matrix/Polynomial.lean
39
59
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yury Kudryashov, Sébastien Gouëzel, Chris Hughes -/ import Mathlib.Data.Fin.Rev import Mathlib.Data.Nat.Find /-! # Operation on tuples We interpret maps `∀ i : Fi...
| 0, _, _, _, hi => Option.noConfusion hi | n + 1, p, I, i, hi => by rw [find] at hi rcases h : find fun i : Fin n ↦ p (i.castLT (Nat.lt_succ_of_lt i.2)) with - | j · rw [h] at hi
Mathlib/Data/Fin/Tuple/Basic.lean
998
1,002
/- 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,826
1,827
/- Copyright (c) 2022 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.Commutator.Finite import Mathlib.GroupTheory.Transfer import Mathlib.Algebra.Group.Pointwise.Fi...
have h2 := card_commutator_dvd_index_center_pow (closureCommutatorRepresentatives G) refine Nat.finite_of_card_ne_zero fun h => ?_ rw [card_commutator_closureCommutatorRepresentatives, h, zero_dvd_iff] at h2 exact FiniteIndex.index_ne_zero (pow_eq_zero h2) end Subgroup
Mathlib/GroupTheory/Schreier.lean
222
234
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Multiset.Dedup /-! # The fold operation for a commutative associative operation over a multiset. -/ namespace Multiset variable {α β : Type*} ...
rw [map_cons, fold_cons_left, h, map_cons, fold_cons_left, map_cons, fold_cons_right, ha.assoc, ← ha.assoc (g a), hc.comm (g a), ha.assoc, hc.comm (g a), ha.assoc]) theorem fold_hom {op' : β → β → β} [Std.Commutative op'] [Std.Associative op'] {m : α → β}
Mathlib/Data/Multiset/Fold.lean
75
79
/- 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, Julian Kuelshammer -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Algebra.Group.Pointwise.Set.Finite import Mathlib.Alge...
lemma IsOfFinOrder.pow {n : ℕ} : IsOfFinOrder a → IsOfFinOrder (a ^ n) := by simp_rw [isOfFinOrder_iff_pow_eq_one] rintro ⟨m, hm, ha⟩ exact ⟨m, hm, by simp [pow_right_comm _ n, ha]⟩
Mathlib/GroupTheory/OrderOfElement.lean
100
103