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) 2020 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Algebra.Group.Conj import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Group.Subgroup.Ker /-! # Basic results on subgroups We prove basic results...
namespace IsConj
Mathlib/Algebra/Group/Subgroup/Basic.lean
923
925
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.MeasureTheory.Constructions.BorelSpace.Order import Mathlib.MeasureTheory.MeasurableSpace.Prod import Mathlib.MeasureTheory.Measure.Ty...
Measurable fun x => (f x : EReal) := measurable_coe_ennreal_ereal.comp hf @[measurability, fun_prop] theorem AEMeasurable.coe_ereal_ennreal {f : α → ℝ≥0∞} {μ : Measure α} (hf : AEMeasurable f μ) :
Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
425
429
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Kexing Ying, Moritz Doll -/ import Mathlib.Algebra.GroupWithZero.Action.Opposite import Mathlib.LinearAlgebra.Finsupp.VectorSpace import Mathlib.LinearAlgebra.Matrix.Basis im...
theorem _root_.Matrix.separatingLeft_toLinearMap₂'_iff {M : Matrix ι ι R₁} : (Matrix.toLinearMap₂' R₁ M).SeparatingLeft (R := R₁) ↔ M.Nondegenerate := ⟨fun h v hv => h v fun w => (M.toLinearMap₂'_apply' _ _).trans <| hv w, Matrix.Nondegenerate.toLinearMap₂'⟩
Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
631
634
/- Copyright (c) 2021 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies -/ import Mathlib.Data.Finset.Grade import Mathlib.Data.Finset.Sups import Mathlib.Logic.Function.Iterate /-! # Shadows This file defines shad...
refine ⟨fun h𝒜 s hs => ?_, Set.Sized.shadow⟩ obtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 (ne_of_mem_of_not_mem hs h) rw [← h𝒜 (erase_mem_shadow hs ha), card_erase_add_one ha] /-- Being in the shadow of `𝒜` means we have a superset in `𝒜`. -/ lemma exists_subset_of_mem_shadow (hs : t ∈ ∂ 𝒜) : ∃ s ∈ 𝒜, t ⊆ s :...
Mathlib/Combinatorics/SetFamily/Shadow.lean
163
168
/- 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, Floris van Doorn, Amelia Livingston, Yury Kudryashov, Neil Strickland, Aaron Anderson -/ import Mathlib.Algebra.Group.Basic import Mathlib.Tactic.Commo...
Mathlib/Algebra/Divisibility/Basic.lean
221
222
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov -/ import Mathlib.Algebra.Algebra.Rat import Mathlib.Data.Nat.Prime.Int import Mathlib.Data.Rat.Sqrt imp...
Mathlib/Data/Real/Irrational.lean
692
693
/- Copyright (c) 2021 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Paul Lezeau -/ import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.IsAdjoinRoot /-! # Kummer-Dedekind theorem This file proves the monogenic version of...
open IsLocalization in
Mathlib/NumberTheory/KummerDedekind.lean
85
86
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Order.Field.Pi import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Normed.Field.Basic import Mathlib.Analysis.Normed.Group.Pointwise import Mat...
/-! #### Note The closure and frontier of an antichain might not be antichains. Take for example the union of the open segments from `(0, 2)` to `(1, 1)` and from `(2, 1)` to `(3, 0)`. `(1, 1)` and `(2, 1)` are comparable and both in the closure/frontier. -/ protected lemma IsClosed.upperClosure_pi (hs : IsClosed s) ...
Mathlib/Analysis/Normed/Order/UpperLower.lean
189
205
/- 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...
lift x to ℝ≥0 using ne_of_lt (lt_of_le_of_lt hx coe_lt_top) simp only [coe_le_one_iff] at hx simp [← coe_rpow_of_nonneg _ hz, NNReal.rpow_le_one hx hz] theorem rpow_lt_one_of_one_lt_of_neg {x : ℝ≥0∞} {z : ℝ} (hx : 1 < x) (hz : z < 0) : x ^ z < 1 := by cases x
Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
827
832
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Algebra.Order.Chebyshev import Mathlib.Analysis.SpecialFunctions.Pow.Real import Math...
(Odd.pow_pos_iff (by decide)).mp (eps_pow_five_pos hPε)
Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean
115
115
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.MeasureTheory.Function.L1Space.Integrable import Mathlib.MeasureTheory.Function.LpSpace.Indicator /-! # Functions integrable on a set an...
Mathlib/MeasureTheory/Integral/IntegrableOn.lean
738
740
/- 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, Peter Nelson -/ import Mathlib.Order.Antichain /-! # Minimality and Maximality This file proves basic facts about minimality and maximality of an element with respect to ...
variable {f : α → β} theorem minimal_mem_image_monotone (hf : ∀ ⦃x y⦄, x ∈ s → y ∈ s → (f x ≤ f y ↔ x ≤ y)) (hx : Minimal (· ∈ s) x) : Minimal (· ∈ f '' s) (f x) := by refine ⟨mem_image_of_mem f hx.prop, ?_⟩
Mathlib/Order/Minimal.lean
425
429
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Data.Set.BooleanAlgebra import Mathlib.Tactic.AdaptationNote /-! # Relations This file defines bundled relations. A relation between `α` and `β` is a f...
theorem dom_mono {r s : Rel α β} (h : r ≤ s) : dom r ⊆ dom s := fun a ⟨b, hx⟩ => ⟨b, h a b hx⟩ /-- Codomain aka range of a relation -/
Mathlib/Data/Rel.lean
70
72
/- 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.MeasureTheory.Measure.Content import Mathlib.MeasureTheory.Group.Prod import Mathlib.Topology.Algebra.Group.Compact /-! # Haar measure In this fi...
simp only [mem_iUnion]; use g₀; constructor; swap · simp only [Finset.mem_filter, h1g₀, true_and]; use g simp [hg, h2g₀] exact h2g₀
Mathlib/MeasureTheory/Measure/Haar/Basic.lean
214
217
/- Copyright (c) 2021 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Order.Lattice /-! # Ordered Subtraction This file proves l...
variable [AddCommMonoid α] [Sub α] [OrderedSub α] {a b : α}
Mathlib/Algebra/Order/Sub/Defs.lean
213
214
/- 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.Order.Filter.SmallSets import Mathlib.Topology.UniformSpace.Defs import Mathlib.Topology.ContinuousOn /-! # Basic resu...
choose! t t_open xt ht using A refine ⟨⋃ x ∈ s, t x, isOpen_biUnion t_open, fun x hx ↦ mem_biUnion hx (xt x hx), ?_⟩
Mathlib/Topology/UniformSpace/Basic.lean
978
979
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Markus Himmel -/ import Mathlib.CategoryTheory.Limits.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.Shapes.Pullback.Mono import Mathlib.CategoryTheory.Limits.Shape...
(m : ImageMap sq) : HasImageMap sq := ⟨Nonempty.intro m⟩ theorem HasImageMap.transport {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] (sq : f ⟶ g)
Mathlib/CategoryTheory/Limits/Shapes/Images.lean
641
644
/- 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 :...
lemma not_ordConnected_inter_Icc_iff (hx : x ∈ s) (hy : y ∈ s) : ¬ OrdConnected (s ∩ Icc x y) ↔ ∃ z ∉ s, z ∈ Ioo x y := by simp_rw [ordConnected_inter_Icc_iff hx hy, subset_def, not_forall, exists_prop, and_comm]
Mathlib/Order/Interval/Set/OrdConnected.lean
257
260
/- 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 ...
variable {G' : G.Subgraph} {s : Set V}
Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
1,212
1,213
/- Copyright (c) 2021 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.Topology.MetricSpace.HausdorffDistance /-! # Thickenings in pseudo-metric spaces ## Main definitions * `Metric.thickening δ s`, the open thickening by ra...
theorem cthickening_singleton {α : Type*} [PseudoMetricSpace α] (x : α) {δ : ℝ} (hδ : 0 ≤ δ) : cthickening δ ({x} : Set α) = closedBall x δ := by
Mathlib/Topology/MetricSpace/Thickening.lean
237
238
/- 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
371
373
/- Copyright (c) 2022 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno, Junyan Xu -/ import Mathlib.CategoryTheory.PathCategory.Basic import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.CategoryTheory.Bicategory.Free import Mathlib...
slice_lhs 1 2 => rw [ihf] simp -- p ≠ nil required! See the docstring of `normalizeAux`. | whisker_left _ _ ih => dsimp rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih] simp | whisker_right h η' ih => dsimp rw [associator_inv_naturality_middle_assoc, ← comp_whiske...
Mathlib/CategoryTheory/Bicategory/Coherence.lean
161
183
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Kexing Ying -/ import Mathlib.Probability.Notation import Mathlib.Probability.Process.Stopping /-! # Martingales A family of functions `f : ι → Ω → E` is a martingale wit...
Submartingale f ℱ μ := by refine ⟨hadp, fun i j hij => ?_, hint⟩ suffices f i ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] by exact ae_le_of_ae_le_trim this suffices 0 ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] - f i by filter_upwards [this] with x hx
Mathlib/Probability/Martingale/Basic.lean
256
260
/- Copyright (c) 2022 María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: María Inés de Frutos-Fernández -/ import Mathlib.Order.Filter.Cofinite import Mathlib.RingTheory.DedekindDomain.Ideal import Mathlib.RingTheory.UniqueFactorizationDomai...
open Classical in /-- `val_v(I)` does not depend on the choice of `a` and `J` used to represent `I`. -/ theorem count_well_defined {I : FractionalIdeal R⁰ K} (hI : I ≠ 0) {a : R} {J : Ideal R} (h_aJ : I = spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J) : count K v I = ((Associates.mk v.asIdeal).count (Associates...
Mathlib/RingTheory/DedekindDomain/Factorization.lean
293
325
/- 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.Interval.Set.Basic import Mathlib.Data.Set.Lattice.Image import Mathlib.Data.SetLike.Basic /-! # Order intervals This file defines (nonempty) close...
Mathlib/Order/Interval/Basic.lean
765
766
/- 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.Algebra.BigOperators.Group.Finset.Piecewise import Mathlib.Algebra.Group.Ext import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Ma...
end
Mathlib/CategoryTheory/Preadditive/Biproducts.lean
647
648
/- Copyright (c) 2021 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.MeasureTheory.Measure.Regular import Mathlib.MeasureTheory.Function.SimpleFuncDenseLp import Mathlib.Topology.UrysohnsLemma import Mathlib.MeasureThe...
∃ g : α → E, eLpNorm (f - g) p μ ≤ ε ∧ Continuous g ∧ MemLp g p μ ∧ HasCompactSupport g by rcases H with ⟨g, hg, g_cont, g_mem, g_support⟩ exact ⟨g, g_support, hg, g_cont, g_mem⟩ -- It suffices to check that the set of functions we consider approximates characteristic -- functions, is stable under add...
Mathlib/MeasureTheory/Function/ContinuousMapDense.lean
139
188
/- 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.Combinatorics.SimpleGraph.Acyclic import Mathlib.Data.ENat.Lattice /-! # Girth of a simple graph This file defines the girth and the extended girth of a ...
Mathlib/Combinatorics/SimpleGraph/Girth.lean
27
27
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Order.Ring.Canonical import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Combinatorics.SetFamily.Compression.Down import Mathlib.Data.Fintype.Powe...
/-- **Harris-Kleitman inequality**: Any two upper sets of finsets correlate. -/ theorem IsUpperSet.le_card_inter_finset (h𝒜 : IsUpperSet (𝒜 : Set (Finset α))) (hℬ : IsUpperSet (ℬ : Set (Finset α))) : #𝒜 * #ℬ ≤ 2 ^ Fintype.card α * #(𝒜 ∩ ℬ) := by
Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
114
118
/- Copyright (c) 2024 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Algebra.Module.LocalizedModule.Submodule import Mathlib.LinearAlgebra.Dimension.DivisionRing import Mathlib.RingTheory.IsTensorProduct import Mathlib.RingThe...
universe w in instance IsDomain.hasRankNullity [IsDomain R] : HasRankNullity.{w} R where rank_quotient_add_rank := rank_quotient_add_rank_of_isDomain exists_set_linearIndependent M := exists_set_linearIndependent_of_isDomain R M namespace IsBaseChange
Mathlib/LinearAlgebra/Dimension/Localization.lean
96
102
/- 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.Complex import Qq /-! # P...
MonotoneOn (fun (x : ℝ) => x ^ r) (Set.Ici 0) := fun _ ha _ _ hab => rpow_le_rpow ha hab hr
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
531
532
/- 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....
dsimp rw [Fin.sum_univ_three] simp only [sub_eq_add_neg, add_assoc, Fin.val_zero, zero_add, pow_one, neg_smul, one_smul, Fin.val_one, Fin.val_two, pow_succ' (-1 : k) 2, neg_sq, Nat.one_add, one_pow, mul_one] rcongr i <;> fin_cases i <;> rfl
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
198
202
/- 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, Floris van Doorn, Yury Kudryashov, Neil Strickland -/ import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.I...
Mathlib/Algebra/Ring/Defs.lean
419
419
/- 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.Order.SupClosed /-! # Sublattices This file defines sublattices. ## TODO Subsemilattices, if people care about them. ## Tags sublattice -/ open Func...
comap f L ⊔ comap f M ≤ comap f (L ⊔ M) := comap_mono.le_map_sup _ _ lemma le_comap_iSup (f : LatticeHom α β) (L : ι → Sublattice β) : ⨆ i, (L i).comap f ≤ (⨆ i, L i).comap f := comap_mono.le_map_iSup
Mathlib/Order/Sublattice.lean
283
286
/- 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.Topology.MetricSpace.Basic /-! # Metrizability of a T₃ topological space with second countable topology In this file we define metrizable topologic...
Mathlib/Topology/Metrizable/Basic.lean
133
137
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.Normed.Operator.BoundedLinear...
· rw [← dist_eq_norm] change dist (f.uncurry (a', z)) (f.uncurry (a, z)) ≤ ε apply (hu _ _ _).le · exact ha'x'.1 · simp [dzx] · rw [← dist_eq_norm'] change dist (f.uncurry (a', y)) (f.uncurry (a, y)) ≤ ε apply (hu _ _ _).le · exact ha'x'.1 · si...
Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
846
910
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.Option import Mathlib.Logic.Equiv.Fin.Rotate import Mathlib.Logic.Equiv.Fintype /-! # Permutatio...
· simp [Equiv.Perm.decomposeFin, EquivFunctor.map] · intro i
Mathlib/GroupTheory/Perm/Fin.lean
44
45
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Alena Gusakov, Yaël Dillies -/ import Mathlib.Algebra.GeomSum import Mathlib.Data.Finset.Slice import Mathlib.Data.Nat.BitIndices import Mathlib.Order.SupClosed import Math...
have hau : a ∈ u := mem_u.2 ⟨hat, has, fun b hbs hbt ↦ (hm _ hbs hbt).trans hma⟩ exact hma.not_le <| le_max' _ _ hau
Mathlib/Combinatorics/Colex.lean
354
355
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Michael Stoll -/ import Mathlib.Data.Nat.Squarefree import Mathlib.NumberTheory.Zsqrtd.QuadraticReciprocity import Mathlib.NumberTheory.Padics.PadicVal.Basic /-! # Sums of...
have ha := mt sq_eq_zero_iff.mpr ha₂ have hb := right_ne_zero_of_mul hab haveI hqi : Fact q.Prime := ⟨hq⟩ simp_rw [h₁, padicValNat.mul ha₂ hb, padicValNat.pow 2 ha, hqb, add_zero] exact even_two_mul _ · obtain ⟨b, a, hb₀, ha₀, hab, hb⟩ := Nat.sq_mul_squarefree_of_pos hn₀ refine ⟨a, b, hab.symm...
Mathlib/NumberTheory/SumTwoSquares.lean
214
240
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
Mathlib/Data/List/Basic.lean
3,108
3,110
/- 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 -/ import Mathlib.MeasureTheory.Integral.Lebesgue.Countable /-! # The Giry monad Let X be a measurable space. The collection of all measures on X again forms a measura...
@[simp] theorem join_smul {R : Type*} [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] (c : R) (m : Measure (Measure α)) : (c • m).join = c • m.join := by ext s hs simp [hs] @[simp] theorem join_dirac (μ : Measure α) : join (dirac μ) = μ := by ext s hs simp [hs, lintegral_dirac', measurable_coe] theorem le_ae_j...
Mathlib/MeasureTheory/Measure/GiryMonad.lean
128
149
/- 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...
suffices t j ≤ ⨆ (k) (_ : k ≠ i), t k by replace ht := (ht i).mono_right this rwa [h, disjoint_self] at ht replace contra : j ≠ i := Ne.symm contra -- Porting note: needs explicit `f` exact le_iSup₂ (f := fun x _ ↦ t x) j contra @[deprecated (since := "2024-11-24")] alias CompleteLattice.Independent.in...
Mathlib/Order/SupIndep.lean
415
427
/- Copyright (c) 2018 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Rémy Degenne -/ import Mathlib.Order.ConditionallyCompleteLattice.Indexed import Mathlib.Order.Filter.IsBounded import Mathlib.Order.Hom.CompleteL...
cofinite.blimsup_set_eq] rfl /-- In other words, `limsup cofinite s` is the set of elements lying inside the family `s`
Mathlib/Order/LiminfLimsup.lean
714
717
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Ines Wright, Joachim Breitner -/ import Mathlib.GroupTheory.Solvable import Mathlib.GroupTheory.Sylow import Mathlib.Algebra.Group.Subgroup.Order import Mathlib.GroupTheo...
Mathlib/GroupTheory/Nilpotent.lean
890
906
/- Copyright (c) 2021 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.GroupTheory.Index /-! # Complements In this file we define the complement of a subgroup. ## Main definitions - `Subgroup.IsComplement S T` where ...
obtain ⟨S, cmem, -⟩ := H''.exists_isComplement_right 1 refine ⟨H.subtype '' S, ?_, ?_⟩ · have : H.subtype '' (H'' * S) = H''.map H.subtype * H.subtype '' S := image_mul H.subtype rw [← this, cmem.mul_eq]
Mathlib/GroupTheory/Complement.lean
431
434
/- 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.BigOperators.Group.Finset.Basic import Mathlib.Algebra.Group.Commute.Hom import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Data.Fintype.B...
ih (comm_ff.mono fun _ => mem_cons_of_mem) (comm_gg.mono fun _ => mem_cons_of_mem) (comm_gf.mono fun _ => mem_cons_of_mem), (noncommProd_commute _ _ _ _ fun y hy => ?_).mul_mul_mul_comm] exact comm_gf (mem_cons_self x s) (mem_cons_of_mem hy) (ne_of_mem_of_not_mem hy hnmem).symm section FinitePi
Mathlib/Data/Finset/NoncommProd.lean
393
398
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel -/ import Mathlib.Topology.Bornology.Constructions import Mathlib.Topology.MetricSpace.Pseudo.Def...
lemma dist_eq (x y : ULift β) : dist x y = dist x.down y.down := rfl
Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
133
134
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Dimension.Constructions /-! # Some results on free modules over rings satisfying strong rank condition T...
constructor · rw [rank_submodule_le_one_iff] rintro ⟨v₀, _, h⟩ exact ⟨v₀, h⟩ · rintro ⟨v₀, h⟩ obtain ⟨κ, b⟩ := Module.Free.exists_basis (R := K) (M := s) simpa [b.mk_eq_rank''] using b.linearIndependent.map' _ (ker_inclusion _ _ h) |>.cardinal_le_rank.trans (rank_span_le {v₀}) theorem Submo...
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
158
168
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne, Sébastien Gouëzel -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.MeasureTheory.Function.SimpleFuncDense /-! # Strongly measurable and finitely strongly meas...
Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
1,761
1,774
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Kenny Lau -/ import Mathlib.Data.DFinsupp.Submonoid import Mathlib.Data.Finsupp.ToDFinsupp import Mathlib.LinearAlgebra.Finsupp.SumProd import Mathlib.LinearAlgebra.LinearIn...
iSupIndep. -/ theorem iSupIndep_of_dfinsupp_lsum_injective (p : ι → Submodule R N) (h : Function.Injective (lsum ℕ fun i => (p i).subtype)) : iSupIndep p := by rw [iSupIndep_iff_forall_dfinsupp] intro i x v hv replace hv : lsum ℕ (fun i => (p i).subtype) (erase i v) = lsum ℕ (fun i => (p i).subtype)...
Mathlib/LinearAlgebra/DFinsupp.lean
463
471
/- Copyright (c) 2021 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Mathlib.Algebra.Group.Commute.Defs import Mathlib.Algebra.Group.Units.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Algebra.Order.Monoid.Unbundle...
end MulZeroClass section MulOneClass variable [MulOneClass R]
Mathlib/Algebra/Regular/Basic.lean
254
258
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
Mathlib/Data/List/Basic.lean
2,134
2,137
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Data.Set.Image /-! ### Recursion on the natural numbers and `Set.range` -/ namespace Nat section Set open Set theorem zero_union_range_succ : {...
rename_i n induction n with | zero => rfl | succ n ihn => dsimp at ihn ⊢; rw [ihn] theorem range_casesOn {α : Type*} (x : α) (f : ℕ → α) : (Set.range fun n => Nat.casesOn n x f : Set α) = {x} ∪ Set.range f := (range_of_succ _).symm end Set
Mathlib/Data/Nat/Set.lean
37
46
/- Copyright (c) 2023 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Analysis.Normed.Ring.InfiniteSum import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.NumberTheory...
include hf₁ hmul in /-- A version of `EulerProduct.summable_and_hasSum_smoothNumbers_prod_primesBelow_tsum` in terms of the value of the series. -/ lemma prod_primesBelow_tsum_eq_tsum_smoothNumbers (hsum : Summable (‖f ·‖)) (N : ℕ) : ∏ p ∈ N.primesBelow, ∑' n : ℕ, f (p ^ n) = ∑' m : N.smoothNumbers, f m := (summ...
Mathlib/NumberTheory/EulerProduct/Basic.lean
143
152
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Simon Hudon -/ import Mathlib.Data.PFunctor.Multivariate.Basic import Mathlib.Data.PFunctor.Univariate.M /-! # The M construction as a multivariate polyn...
rw [MvPFunctor.map_eq]; congr conv_rhs => rw [← split_dropFun_lastFun f, appendFun_comp_splitFun] rfl
Mathlib/Data/PFunctor/Multivariate/M.lean
195
198
/- 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.CategoryTheory.Abelian.LeftDerived import Mathlib.CategoryTheory.Monoidal.Preadditive /-! # Tor, the left-derived functor of tensor product We define `To...
Mathlib/CategoryTheory/Monoidal/Tor.lean
68
71
/- 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, Yuyang Zhao -/ import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calcu...
nonrec theorem HasDerivAt.comp (hh₂ : HasDerivAt h₂ h₂' (h x)) (hh : HasDerivAt h h' x) : HasDerivAt (h₂ ∘ h) (h₂' * h') x := hh₂.comp x hh hh.continuousAt /-- The chain rule.
Mathlib/Analysis/Calculus/Deriv/Comp.lean
237
241
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Johannes Hölzl -/ import Mathlib.Algebra.Order.Pi import Mathlib.MeasureTheory.Constructions.BorelSpace.Order /-! # Simple functions A function `f` from a measurable ...
protected theorem mul {β} [MulZeroClass β] {f g : α →ₛ β} (hf : f.FinMeasSupp μ) (hg : g.FinMeasSupp μ) : (f * g).FinMeasSupp μ := by rw [mul_eq_map₂] exact hf.map₂ hg (zero_mul 0) theorem lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hm : f.FinMeasSupp μ) (hf : ∀ᵐ a ∂μ, f a ≠ ∞) : f.lintegral μ < ∞ := by refine su...
Mathlib/MeasureTheory/Function/SimpleFunc.lean
1,103
1,113
/- 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
936
937
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Data.ENNReal.Operations /-! # Results about division in extended non-negative reals This file establishes basic properties related t...
induction' a with a · replace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)
Mathlib/Data/ENNReal/Inv.lean
229
230
/- 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...
constructor <;> exact fun h a b ha hb => h hb ha theorem not_principal_iff : ¬ Principal op o ↔ ∃ a < o, ∃ b < o, o ≤ op a b := by
Mathlib/SetTheory/Ordinal/Principal.lean
52
54
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Algebra.Order.Group.Pointwise.Bounds import Mathlib.Data.Real.Basic import Mathlib.Ord...
theorem sInf_le_sSup (s : Set ℝ) (h₁ : BddBelow s) (h₂ : BddAbove s) : sInf s ≤ sSup s := by rcases s.eq_empty_or_nonempty with (rfl | hne) · rw [sInf_empty, sSup_empty] · exact csInf_le_csSup h₁ h₂ hne
Mathlib/Data/Real/Archimedean.lean
296
299
/- Copyright (c) 2021 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.Combinatorics.Hall.Basic import Mathlib.Data.Matrix.Rank import Mathlib.LinearAlgebra.Projectivization.Constructions /-! # Configurations of Points ...
theorem HasLines.pointCount_le_lineCount [HasLines P L] {p : P} {l : L} (h : p ∉ l) [Finite { l : L // p ∈ l }] : pointCount P l ≤ lineCount L p := by by_cases hf : Infinite { p : P // p ∈ l } · exact (le_of_eq Nat.card_eq_zero_of_infinite).trans (zero_le (lineCount L p)) haveI := fintypeOfNotInfinite hf ca...
Mathlib/Combinatorics/Configuration.lean
186
195
/- Copyright (c) 2021 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.MvPolynomial.Variables /-! # Polynomials supported by a set of variables This file contains the definition and lemmas about `MvPolynomial.support...
Mathlib/Algebra/MvPolynomial/Supported.lean
135
141
/- Copyright (c) 2014 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Jeremy Avigad -/ import Mathlib.Algebra.Order.Group.Nat import Mathlib.Algebra.Order.Ring.Canonical /-! # Distance function on ℕ This file defines a simple dista...
Mathlib/Data/Nat/Dist.lean
103
104
/- Copyright (c) 2021 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky -/ import Mathlib.Data.List.MinMax import Mathlib.Algebra.Tropical.Basic import Mathlib.Order.ConditionallyCompleteLattice.Finset import Mathlib.Algebra.BigOperators.G...
trop l.minimum = List.sum (l.map (trop ∘ WithTop.some)) := by induction' l with hd tl IH · simp · simp [List.minimum_cons, ← IH]
Mathlib/Algebra/Tropical/BigOperators.lean
70
74
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.FieldTheory.PurelyInseparable.Basic import Mathlib.FieldTheory.PerfectClosure /-! # `IsPerfectClosure` predicate This file contains `IsPerfectClosure` which asserts...
theorem lift_comp_lift_apply_eq_self [PerfectRing L p] (x : L) : lift j i p (lift i j p x) = x := by
Mathlib/FieldTheory/IsPerfectClosure.lean
398
400
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.Field.NegOnePow import Mathlib.Algebra.Field.Periodic import Mathlib.Algebra.Qua...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
1,287
1,288
/- Copyright (c) 2021 Aaron Anderson, Jesse Michael Han, Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn -/ import Mathlib.Data.Fin.VecNotation import Mathlib.SetTheory.Cardinal.Basic /-! # Basics on...
/-- The cardinality of a language is the cardinality of its type of symbols. -/ def card : Cardinal := #L.Symbols variable {L} {L' : Language.{u', v'}}
Mathlib/ModelTheory/Basic.lean
90
95
/- Copyright (c) 2022 Julian Berman. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Berman -/ import Mathlib.GroupTheory.PGroup import Mathlib.LinearAlgebra.Quotient.Defs /-! # Torsion groups This file defines torsion groups, i.e. groups where all elements hav...
/-- Elements of the `p`-primary component have order `p^n` for some `n`. -/ @[to_additive primaryComponent.exists_orderOf_eq_prime_nsmul "Elements of the `p`-primary component have additive order `p^n` for some `n`"] theorem primaryComponent.exists_orderOf_eq_prime_pow (g : CommMonoid.primaryComponent G p) : ∃ n ...
Mathlib/GroupTheory/Torsion.lean
201
208
/- Copyright (c) 2021 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.Process.Adapted import Mathlib.MeasureTheory.Constructions.BorelSpace.Order /-! # Stopping times, stopped processes and stopped va...
section MeasurableSet
Mathlib/Probability/Process/Stopping.lean
57
58
/- 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.Order.Monotone.Odd import Mathlib.Analysis.Calculus.LogDeriv import Mathlib.Analysis.Spe...
theorem differentiable_cosh : Differentiable ℂ cosh := fun x => (hasDerivAt_cosh x).differentiableAt @[simp] theorem differentiableAt_cosh {x : ℂ} : DifferentiableAt ℂ cosh x := differentiable_cosh x
Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
134
138
/- Copyright (c) 2024 Kalle Kytölä. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kalle Kytölä -/ import Mathlib.Topology.Separation.CompletelyRegular import Mathlib.MeasureTheory.Measure.ProbabilityMeasure /-! # Dirac deltas as probability measures and embedding of ...
funext μ; simp [diracProbaEquiv] lemma tendsto_diracProbaEquivSymm_iff_tendsto [T0Space X] [CompletelyRegularSpace X] {μ : range (diracProba (X := X))} (F : Filter (range (diracProba (X := X)))) : Tendsto diracProbaEquiv.symm F (𝓝 (diracProbaEquiv.symm μ)) ↔ Tendsto id F (𝓝 μ) := by have key := tends...
Mathlib/MeasureTheory/Measure/DiracProba.lean
148
157
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ import Mathlib.Data.Stream.Defs import Mathlib.Logic.Function.Basic import Mathlib.Data.List.Defs import Mathlib.Data.Nat.Basic import Mathlib.Tactic.Common...
-- Take theorem reduces a proof of equality of infinite streams to an -- induction over all their finite approximations. theorem take_theorem (s₁ s₂ : Stream' α) : (∀ n : ℕ, take n s₁ = take n s₂) → s₁ = s₂ := by
Mathlib/Data/Stream/Init.lean
599
601
/- 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, Mitchell Lee -/ import Mathlib.Algebra.BigOperators.Group.Finset.Indicator import Mathlib.Data.Fintype.BigOperators import Mathlib.Topology.Algebra.InfiniteSum.Defs imp...
@[to_additive] theorem tprod_bool (f : Bool → α) : ∏' i : Bool, f i = f false * f true := by rw [tprod_fintype, Fintype.prod_bool, mul_comm]
Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
405
407
/- Copyright (c) 2022 Yaël Dillies, Sara Rousta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Sara Rousta -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.Interval.Set.OrderEmbedding import Mathlib.Order.SetNotation /-! # Properties of unbundled ...
Mathlib/Order/UpperLower/Basic.lean
688
689
/- 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...
(hextr : IsMaxOn T.reApplyInnerSelf (sphere (0 : E) ‖x₀‖) x₀) : HasEigenvector (T : E →ₗ[𝕜] E) (↑(⨆ x : { x : E // x ≠ 0 }, T.rayleighQuotient x)) x₀ := by convert hT.hasEigenvector_of_isLocalExtrOn hx₀ (Or.inr hextr.localize) have hx₀' : 0 < ‖x₀‖ := by simp [hx₀] have hx₀'' : x₀ ∈ sphere (0 : E) ‖x₀‖ :=...
Mathlib/Analysis/InnerProductSpace/Rayleigh.lean
180
185
/- Copyright (c) 2023 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir -/ import Mathlib.Algebra.Exact import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Ideal.Quotient.Defs import Mathlib.RingTheory.TensorProduct...
{f : M →ₗ[R] N} (g : N →ₗ[R] P) lemma le_comap_range_lTensor (q : Q) : LinearMap.range g ≤ (LinearMap.range (lTensor Q g)).comap (TensorProduct.mk R Q P q) := by
Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean
96
99
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yaël Dillies -/ import Mathlib.Algebra.Module.BigOperators import Mathlib.GroupTheory.Perm.Basic import Mathlib.GroupTheory.Perm.Finite import Mathlib.GroupTheory.Perm.Lis...
subtypePerm c fun _ : α => apply_mem_support.symm /-- Restrict a permutation to a Finset containing its support -/ def subtypePerm_of_support_le (c : Perm α) {s : Finset α} (hcs : c.support ⊆ s) : Equiv.Perm s := subtypePerm c (isInvariant_of_support_le hcs) /-- Support of a cycle is nonempty -/ theorem IsCyc...
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
989
997
/- 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...
theorem range_inl_union_range_inr : range (Sum.inl : α → α ⊕ β) ∪ range Sum.inr = univ := isCompl_range_inl_range_inr.sup_eq_top
Mathlib/Data/Set/Image.lean
777
778
/- 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.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set /-! # Lemmas about images of inte...
Mathlib/Order/Interval/Set/OrderIso.lean
103
104
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Mario Carneiro, Yaël Dillies -/ import Mathlib.Data.Nat.Basic import Mathlib.Data.Int.Order.Basic import Mathlib.Logic.Function.Iterate import Mathlib.Order.Compare impor...
Mathlib/Order/Monotone/Basic.lean
1,167
1,170
/- Copyright (c) 2024 David Kurniadi Angdinata. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Kurniadi Angdinata -/ import Mathlib.AlgebraicGeometry.EllipticCurve.DivisionPolynomial.Basic import Mathlib.Tactic.ComputeDegree /-! # Division polynomials of Weierst...
private lemma expCoeff_rec (m : ℕ) : (expCoeff (2 * (m + 3)) = expCoeff (m + 2) ^ 2 * expCoeff (m + 3) * expCoeff (m + 5) - expCoeff (m + 1) * expCoeff (m + 3) * expCoeff (m + 4) ^ 2) ∧ (expCoeff (2 * (m + 2) + 1) = expCoeff (m + 4) * expCoeff (m + 2) ^ 3 * (if Even m then 4 ^ 2 else 1) - ...
Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean
183
192
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Yury Kudryashov -/ import Mathlib.Data.ENNReal.Operations /-! # Results about division in extended non-negative reals This file establishes basic properties related t...
@[simp]
Mathlib/Data/ENNReal/Inv.lean
304
305
/- 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...
generateFrom (⋂ i, { s | IsOpen[f i] s }) = ⨆ i, f i := (gciGenerateFrom α).u_iSup_l _
Mathlib/Topology/Order.lean
869
870
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Algebra.Bilinear import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Group.Pointwise.Finset.Basic import Mathlib.Algebra.Group.Pointwise.Set.B...
@[simp] theorem map_op_one : map (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) (1 : Submodule R A) = 1 := by ext x
Mathlib/Algebra/Algebra/Operations.lean
370
373
/- 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.Algebra.Polynomial.Module.AEval /-! # Polynomial module In this file, we define the polynomial module for an `R`-module `M`, i.e. the `R[X]`-module `M[X]`....
theorem comp_smul (p p' : R[X]) (q : PolynomialModule R M) : comp p (p' • q) = p'.comp p • comp p q := by rw [comp_apply, map_smul, eval_smul, Polynomial.comp, Polynomial.eval_map, comp_apply] rfl end PolynomialModule
Mathlib/Algebra/Polynomial/Module/Basic.lean
324
333
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Yury Kudryashov -/ import Mathlib.Algebra.Algebra.NonUnitalHom import Mathlib.LinearAlgebra.TensorProduct.Basic /-! # Facts about algebras involving bilinear maps and tensor pro...
end one_side
Mathlib/Algebra/Algebra/Bilinear.lean
134
136
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Initial...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
2,249
2,254
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.SetTheory.Game.State /-! # Domineering as a combinatorial game. We define the game of Domineering, played on a chessboard of arbitrary shape (possibly ev...
l s := (left s).image (moveLeft s) r s := (right s).image (moveRight s) left_bound m := by simp only [Finset.mem_image, Prod.exists] at m rcases m with ⟨_, _, ⟨h, rfl⟩⟩ exact moveLeft_smaller h
Mathlib/SetTheory/Game/Domineering.lean
117
122
/- 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.Coherent import Mathlib.Topology.UniformSpace.Equiv import Mathlib.Topology.UniformSpace.Pi import Mathlib.Topology.UniformSpace.UniformAp...
exact he' hs uniformContinuous_invFun := UniformOnFun.precomp_uniformContinuous he } /-- If `𝔖` covers `α`, then the topology of `𝔖`-convergence is T₂. -/ theorem t2Space_of_covering [T2Space β] (h : ⋃₀ 𝔖 = univ) : T2Space (α →ᵤ[𝔖] β) where t2 f g hfg := by obtain ⟨x, hx⟩ := not_forall.mp (mt funex...
Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
915
924
/- 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...
by_cases h₁ : x.1 ∈ s₁ <;> by_cases h₂ : x.2 ∈ t₁ <;> simp [*]
Mathlib/Data/Set/Prod.lean
330
331
/- 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.Algebra.BigOperators.Fin import Mathlib.Data.Nat.Cast.Field import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.GroupAction.CardComm...
fun x => ⟨⟨⟨x.1.1.1, x.2.1.1⟩, ⟨x.1.1.2, x.2.1.2⟩⟩, ⟨x.1.2, x.2.2⟩⟩, fun x => rfl, fun x => rfl⟩ theorem commProb_pi {α : Type*} (i : α → Type*) [Fintype α] [∀ a, Mul (i a)] : commProb (∀ a, i a) = ∏ a, commProb (i a) := by simp_rw [commProb_def, Finset.prod_div_distrib, Finset.prod_pow, ← Nat.cast_prod, ...
Mathlib/GroupTheory/CommutingProbability.lean
47
52
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Aurélien Saue, Anne Baanen -/ import Mathlib.Tactic.NormNum.Inv import Mathlib.Tactic.NormNum.Pow import Mathlib.Util.AtomM /-! # `ring` tactic A tactic for solving e...
/-- Embed `ExProd` in `ExSum` by adding 0. -/ def ExProd.toSum {sα : Q(CommSemiring $α)} {e : Q($α)} (v : ExProd sα e) : ExSum sα q($e + 0) := .add v .zero
Mathlib/Tactic/Ring/Basic.lean
283
285
/- Copyright (c) 2022 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.Normed.Lp.lpSpace import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Hilbert sum of ...
rw [SetLike.mem_coe] refine sum_mem ?_ intro i _
Mathlib/Analysis/InnerProductSpace/l2Space.lean
237
239
/- Copyright (c) 2017 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Keeley Hoek -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Int.DivMod import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic....
theorem lt_castPred_iff {j : Fin n} {i : Fin (n + 1)} (hi : i ≠ last n) : j < castPred i hi ↔ castSucc j < i := by
Mathlib/Data/Fin/Basic.lean
843
845
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.LinearAlgebra.DFinsupp import Mathlib.RingTheory.Finiteness.Basic import Mathlib.LinearAlgebra.TensorProduct.Basic /-! # Some finiteness results of tensor product T...
of `M × N`, such that `x` is equal to the sum of `m_i ⊗ₜ[R] n_i`. -/ theorem exists_multiset (x : M ⊗[R] N) : ∃ S : Multiset (M × N), x = (S.map fun i ↦ i.1 ⊗ₜ[R] i.2).sum := by induction x with | zero => exact ⟨0, by simp⟩ | tmul x y => exact ⟨{(x, y)}, by simp⟩ | add x y hx hy => obtain ⟨Sx, hx⟩ := hx...
Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
52
60
/- Copyright (c) 2021 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.GroupWithZero.Action.Pointwise.Set import Mathlib.Algebra.Module.LinearMap.Prod import Mathlib.Algebra.Order.Module.Synonym import Mathlib.Analysis...
obtain ⟨y', hy', rfl⟩ := hy refine ⟨a • x + b • y', hs hy' ha hb hab, ?_⟩ match_scalars <;> simp [hab]
Mathlib/Analysis/Convex/Star.lean
228
231
/- Copyright (c) 2020 Jannis Limperg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jannis Limperg -/ import Mathlib.Data.List.Induction /-! # Lemmas about List.*Idx functions. Some specification lemmas for `List.mapIdx`, `List.mapIdxM`, `List.foldlIdx` and `List.fo...
-- Note: `traverse` the class method would require a less universe-polymorphic -- `m : Type u → Type u`. set_option linter.deprecated false in @[deprecated "Deprecated without replacement." (since := "2025-01-29")]
Mathlib/Data/List/Indexes.lean
190
194
/- 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...
inhabit α exact ⟨Unique.mk' α⟩
Mathlib/Logic/Unique.lean
146
147