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 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Filippo A. E. Nuccio -/ import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.FractionalIdeal.Basic import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basi...
variable [IsFractionRing R₁ K] [IsDomain R₁]
Mathlib/RingTheory/FractionalIdeal/Operations.lean
350
351
/- 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...
use G ⊔ edge x y, inferInstance, cf.sup_edge x y convert Nat.lt.base #G.edgeFinset convert G.card_edgeFinset_sup_edge _ hn rwa [h.not_adj_iff_part_eq] /-- **Turán's theorem**, forward direction. Any `r + 1`-cliquefree Turán-maximal graph on `n` vertices is isomorphic to `turanGraph n r`. -/ theorem nonempty_i...
Mathlib/Combinatorics/SimpleGraph/Turan.lean
258
270
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Measure.Decomposition.RadonNikodym /-! # Exponentially tilted measures The exponential tilting of a measure `μ` on `α` by a function `f : α...
rw [Pi.add_apply, exp_add] ring simp_rw [this, div_eq_mul_inv] rw [integral_mul_const] lemma tilted_tilted (hf : Integrable (fun x ↦ exp (f x)) μ) (g : α → ℝ) : (μ.tilted f).tilted g = μ.tilted (f + g) := by cases eq_zero_or_neZero μ with | inl h => simp [h] | inr h0 => ext1 s hs ...
Mathlib/MeasureTheory/Measure/Tilted.lean
242
255
/- Copyright (c) 2021 Paul Lezeau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Paul Lezeau -/ import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.IsPrimePow import Mathlib.RingTheory.UniqueFactorizationDomain.Multiplicity import Mathlib.Data.Z...
let c₂ : Fin (s + 1) → Associates N := fun t => d ⟨c₁ t, le_trans (hc₁''.2 ⟨t, by simp⟩) hs'⟩ have c₂_def : ∀ t, c₂ t = d ⟨c₁ t, _⟩ := fun t => rfl rw [← c₂_def] refine (eq_pow_second_of_chain_of_has_chain hs (fun t u h => ?_) (@fun r => ⟨@fun hr => ?_, ?_⟩) ?_).symm · rw [c₂_def, c₂_def, Subtype.coe_lt_c...
Mathlib/RingTheory/ChainOfDivisors.lean
252
281
/- Copyright (c) 2022 Vincent Beffara. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vincent Beffara -/ import Mathlib.Analysis.Analytic.IsolatedZeros import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.Complex.AbsMax import Mathlib.Topology.MetricS...
· push_neg at h refine Or.inr fun s hs1 hs2 => isOpen_iff_mem_nhds.mpr ?_ rintro z ⟨w, hw1, rfl⟩ exact (hg w (hs1 hw1)).eventually_constant_or_nhds_le_map_nhds.resolve_left (h w (hs1 hw1)) (image_mem_map (hs2.mem_nhds hw1))
Mathlib/Analysis/Complex/OpenMapping.lean
163
172
/- Copyright (c) 2020 Alena Gusakov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alena Gusakov, Arthur Paulino, Kyle Miller, Pim Otte -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Combinatorics.SimpleGraph.Connectivity.Subgraph import Mathlib.Com...
⟨s(v, (h v.property).choose), (h v.property).choose_spec.1⟩ theorem IsMatching.toEdge_eq_of_adj (h : M.IsMatching) (hv : v ∈ M.verts) (hvw : M.Adj v w) : h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩ := by simp only [IsMatching.toEdge, Subtype.mk_eq_mk]
Mathlib/Combinatorics/SimpleGraph/Matching.lean
70
74
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
Mathlib/Data/Matrix/Basic.lean
1,758
1,760
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Data.Set.Finite.Lattice /-! # Partitions based on membership of a sequence of sets Let `f : ℕ → Set α` be a sequence of sets. For `n : ℕ`, we can form th...
lemma memPartitionSet_succ (f : ℕ → Set α) (n : ℕ) (a : α) [Decidable (a ∈ f n)] : memPartitionSet f (n + 1) a = if a ∈ f n then memPartitionSet f n a ∩ f n else memPartitionSet f n a \ f n := by simp [memPartitionSet]
Mathlib/Data/Set/MemPartition.lean
117
121
/- Copyright (c) 2023 Scott Carnahan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Carnahan -/ import Mathlib.Algebra.Group.NatPowAssoc import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Eval.SMul /-! # Scalar-multiple polynomial ev...
theorem smeval_X_mul : (X * p).smeval x = x * p.smeval x := by induction p using Polynomial.induction_on' with | add p q ph qh => simp only [smeval_add, ph, qh, mul_add] | monomial n a => rw [← monomial_one_one_eq_X, monomial_mul_monomial, smeval_monomial, one_mul, npow_add, npow_one, ← mul_smul_comm...
Mathlib/Algebra/Polynomial/Smeval.lean
210
216
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll, Thomas Zhu, Mario Carneiro -/ import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity /-! # The Jacobi Symbol We define the Jacobi symbol and prove its main pro...
section FastJacobi /-! ### Fast computation of the Jacobi symbol We follow the implementation as in `Mathlib.Tactic.NormNum.LegendreSymbol`.
Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
486
490
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics import Mathlib.Analysis.As...
rcases eq_or_ne x y with (rfl | h) · exact differentiableWithinAt_insert_self apply differentiableWithinAt_congr_nhds exact nhdsWithin_insert_of_ne h
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
620
623
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.HomologicalComplexBiprod import Mathlib.Algebra.Homology.Homotopy import Mathlib.CategoryTheory.MorphismProperty.IsInvertedBy /-! The homotopy ...
@[reassoc (attr := simp)] lemma inrX_desc_f (i : ι) : inrX φ i ≫ (desc φ α hα).f i = α.f i := by dsimp [desc] split_ifs <;> simp
Mathlib/Algebra/Homology/HomotopyCofiber.lean
310
314
/- 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.Algebra.Algebra.Pi import Mathlib.LinearAlgebra.Finsupp.SumProd import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.LinearIndepe...
Mathlib/LinearAlgebra/StdBasis.lean
278
280
/- Copyright (c) 2021 Ashvni Narayanan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ashvni Narayanan, David Loeffler -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Choose.Cast import Mathlib.Numbe...
have hnp1 : IsUnit ((n + 1)! : ℚ) := IsUnit.mk0 _ (mod_cast factorial_ne_zero (n + 1)) rw [← (hnp1.map (algebraMap ℚ A)).mul_right_inj] -- do trivial rearrangements to make RHS (n+1)*t^n rw [mul_left_comm, ← RingHom.map_mul] change _ = t ^ n * algebraMap ℚ A (((n + 1) * n ! : ℕ) * (1 / n !)) rw [cast_mul, m...
Mathlib/NumberTheory/BernoulliPolynomials.lean
221
259
/- 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,368
1,371
/- 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...
· rw [disjUnion_tag_of_mem_right _ hJ] @[simp] theorem integralSum_add (f g : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F) (π : TaggedPrepartition I) : integralSum (f + g) vol π = integralSum f vol π + integralSum g vol π := by simp only [integralSum, Pi.add_apply, (vol _).map_add, Finset.sum_add_distrib]
Mathlib/Analysis/BoxIntegral/Basic.lean
127
133
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Chris Hughes, Floris van Doorn, Yaël Dillies -/ import Mathlib.Data.Nat.Basic import Mathlib.Tactic.GCongr.CoreAttrs import Mathlib.Tactic.Common import Mathlib.Tactic....
refine ⟨fun h => ?_, congr_arg _⟩ obtain hnm | rfl | hnm := lt_trichotomy n m · rw [← factorial_lt <| lt_of_succ_lt hn, h] at hnm cases lt_irrefl _ hnm · rfl rw [← one_lt_factorial, h, one_lt_factorial] at hn
Mathlib/Data/Nat/Factorial/Basic.lean
113
118
/- Copyright (c) 2014 Microsoft Corporation. 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.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Cast.Order.Basic import Math...
end PosNum
Mathlib/Data/Num/Lemmas.lean
711
711
/- 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.Topology.Homeomorph.Lemmas import Mathlib.Topology.Sets.OpenCover import Mathlib.Topology.LocallyClosed /-! # Properties of maps that are local at the targe...
MapsTo.coe_restrict, restrict_eq, ← Filter.comap_comap] constructor · intro H i x rw [Function.comp_apply, ← H, ← IsInducing.subtypeVal.nhds_eq_comap] · intro H x obtain ⟨i, hi⟩ := Opens.mem_iSup.mp (show f x ∈ iSup U by simp [hU.iSup_eq_top]) simpa [← ((h.1 _ (U i).2).isOpenEmbedding_subtypeVal)....
Mathlib/Topology/LocalAtTarget.lean
148
156
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.Data.Bool.Basic import Mathlib.Order.Monotone.Basic import Mathlib.Order.ULift import Mathlib.Tactic.GCongr.CoreAttrs /-! # (Semi-)lattices Semilatti...
@SemilatticeInf.toPartialOrder _ (SemilatticeInf.mk' inf_comm inf_assoc inf_idem) :=
Mathlib/Order/Lattice.lean
478
478
/- 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.Dual import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.Data.Complex.FiniteDimensional import Mathlib.Da...
@[simp] theorem kahler_rightAngleRotation_left (x y : E) : o.kahler (J x) y = -Complex.I * o.kahler x y := by simp only [o.areaForm_rightAngleRotation_left, o.inner_rightAngleRotation_left, o.kahler_apply_apply, Complex.ofReal_neg, Complex.real_smul] linear_combination ω x y * Complex.I_sq @[simp] theorem...
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
423
438
/- Copyright (c) 2020 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.Topology.Path /-! # Path connectedness Continuing from `Mathlib.Topology.Path`, this file defines path components and path-connected spaces. ## Main...
Mathlib/Topology/Connected/PathConnected.lean
667
670
/- 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 -/ import Mathlib.Algebra.Order.SuccPred import Mathlib.Data.Sum.Order import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.PPWithUniv /-! # ...
Quot.liftOn c F (by suffices ∀ {α β}, α ≈ β → F α ≤ F β from fun α β h => (this h).antisymm (this (Setoid.symm h)) rintro α β ⟨f⟩ refine le_ciInf_iff'.2 fun i => ?_ haveI := @RelEmbedding.isWellOrder _ _ (f ⁻¹'o i.1) _ (↑(RelIso.preimage f i.1)) i.2 exact (ciInf_le' _...
Mathlib/SetTheory/Ordinal/Basic.lean
1,010
1,035
/- 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.Data.Finset.Preimage import Mathlib.Data.Finset.Prod import Mathlib.Order.Hom.WithTopBot import Mathlib.Order.Interval.Set.UnorderedInterval /-! # Locally...
Mathlib/Order/Interval/Finset/Defs.lean
1,350
1,351
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Kim Morrison -/ import Mathlib.Algebra.Group.Ext import Mathlib.CategoryTheory.Simple import Mathlib.CategoryTheory.Linear.Basic import Mathlib.CategoryTheory.Endomorphism...
· rintro ⟨f⟩ have le_one := finrank_hom_simple_simple_le_one 𝕜 X Y have zero_lt : 0 < finrank 𝕜 (X ⟶ Y) := finrank_pos_iff_exists_ne_zero.mpr ⟨f.hom, (isIso_iff_nonzero f.hom).mp inferInstance⟩ omega theorem finrank_hom_simple_simple_eq_zero_iff (X Y : C) [FiniteDimensional 𝕜 (X ⟶ X)] [Finit...
Mathlib/CategoryTheory/Preadditive/Schur.lean
177
190
/- 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 -/ import Mathlib.Data.Fintype.Lattice import Mathlib.Data.Fintype.Sum import Mathlib.Topology.Homeomorph.Lemmas import Mathlib.Topology.MetricSpace.Antilipschitz ...
Mathlib/Topology/MetricSpace/Isometry.lean
631
633
/- Copyright (c) 2020 Kexing Ying and Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying, Kevin Buzzard, Yury Kudryashov -/ import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Algebra.BigOperators.Pi import Mathlib.Algebra.Gro...
theorem one_le_finprod' {M : Type*} [CommMonoid M] [PartialOrder M] [IsOrderedMonoid M] {f : α → M} (hf : ∀ i, 1 ≤ f i) : 1 ≤ ∏ᶠ i, f i := finprod_induction _ le_rfl (fun _ _ => one_le_mul) hf
Mathlib/Algebra/BigOperators/Finprod.lean
258
261
/- 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, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.Deriv.AffineMap import Mathlib.Analysis.Calculus.Deriv.Comp import Mathlib.Analysis.Calculus.Deriv.Mul import ...
Mathlib/Analysis/Calculus/MeanValue.lean
1,050
1,055
/- 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...
attribute [irreducible] preadditive include W in lemma functor_additive_iff {E : Type*} [Category E] [Preadditive E] [Preadditive D] [L.Additive] (G : D ⥤ E) : G.Additive ↔ (L ⋙ G).Additive := by constructor · intro infer_instance · intro h suffices ∀ ⦃X Y : C⦄ (f g : L.obj X ⟶ L.obj Y), G.map (f ...
Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean
320
342
/- 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.Order.Interval.Finset.Basic /-! # Intervals as multisets This file defines intervals as multisets. ## Main declarations In a `LocallyFiniteOrder`, * `M...
theorem Ico_filter_le (a b c : α) : ((Ico a b).filter fun x => c ≤ x) = Ico (max a c) b := by rw [Ico, Ico, ← Finset.filter_val, Finset.Ico_filter_le] @[simp]
Mathlib/Order/Interval/Multiset.lean
287
290
/- 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.Analysis.InnerProductSpace.LinearMap import Mathlib.MeasureTheory.Function.LpSpace.ContinuousFunctions import Mathlib.MeasureTheory.Function.StronglyMeasur...
@[deprecated (since := "2025-02-21")] alias Memℒp.const_inner := MemLp.const_inner
Mathlib/MeasureTheory/Function/L2Space.lean
74
76
/- Copyright (c) 2020 Aaron Anderson, Jalex Stark, Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jalex Stark, Kyle Miller, Alena Gusakov, Hunter Monroe -/ import Mathlib.Combinatorics.SimpleGraph.Init import Mathlib.Data.Finite.Prod import...
Fintype (G₁ ⊓ G₂).edgeSet := by
Mathlib/Combinatorics/SimpleGraph/Basic.lean
544
544
/- 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...
let ⟨n, hn⟩ := hf.exists_zpow_eq hx hy
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
284
284
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Julian Kuelshammer, Heather Macbeth, Mitchell Lee -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Ri...
simpa [pow_two, mul_assoc] using T_add_two R 0
Mathlib/RingTheory/Polynomial/Chebyshev.lean
113
114
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Combinatorics.SimpleGraph.Regularity.Bound import Mathlib.Combinatorics.SimpleGraph.Regularity.Equitabilise import Mathlib.Comb...
card_le_m_add_one_of_mem_chunk_parts <| star_subset_chunk hs
Mathlib/Combinatorics/SimpleGraph/Regularity/Chunk.lean
194
195
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro -/ import Mathlib.MeasureTheory.MeasurableSpace.MeasurablyGenerated import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.Order.Interval.Set...
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
1,388
1,392
/- 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, Eric Wieser -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib...
(q.hasStrictDerivAt_aeval x).hasDerivAt protected theorem hasDerivWithinAt (x : 𝕜) (s : Set 𝕜) : HasDerivWithinAt (fun x => p.eval x) (p.derivative.eval x) s x :=
Mathlib/Analysis/Calculus/Deriv/Polynomial.lean
66
69
/- Copyright (c) 2022 Mario Carneiro, Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Heather Macbeth, Yaël Dillies -/ import Mathlib.Algebra.Order.Group.PosPart import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Data.Int.CharZero im...
rw [max_def]; split_ifs <;> assumption
Mathlib/Tactic/Positivity/Basic.lean
98
99
/- 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.Calculus.ContDiff.RCLike import Mathlib.MeasureTheory.Measure.Hausdorff /-! # Hausdorff dimension The Hausdorff dimension of a set `X` in ...
-/ theorem Isometry.dimH_image (hf : Isometry f) (s : Set X) : dimH (f '' s) = dimH s := le_antisymm (hf.lipschitz.dimH_image_le _) (hf.antilipschitz.le_dimH_image _)
Mathlib/Topology/MetricSpace/HausdorffDimension.lean
371
376
/- Copyright (c) 2019 Minchao Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Minchao Wu, Chris Hughes, Mantas Bakšys -/ import Mathlib.Data.List.Basic import Mathlib.Order.BoundedOrder.Lattice import Mathlib.Data.List.Induction import Mathlib.Order.MinMax import Ma...
/-- The minimum value in a non-empty `List`. -/ def minimum_of_length_pos (h : 0 < l.length) : α := maximum_of_length_pos (α := αᵒᵈ) h
Mathlib/Data/List/MinMax.lean
399
403
/- Copyright (c) 2019 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Data.Fintype.Basic import Mathlib.Data.Fintype.EquivFin import Mathlib.Data.List.ProdSigma import Mathlib.Data.List.Pi /-! Type class for finitely enumerabl...
@[simp] theorem Finset.mem_enum [DecidableEq α] (s : Finset α) (xs : List α) : s ∈ Finset.enum xs ↔ ∀ x ∈ s, x ∈ xs := by induction xs generalizing s with | nil => simp [enum, eq_empty_iff_forall_not_mem] | cons x xs ih => simp only [enum, List.bind_eq_flatMap, List.mem_flatMap, List.mem_cons, List.mem...
Mathlib/Data/FinEnum.lean
132
163
/- 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...
end Stream'
Mathlib/Data/Stream/Init.lean
723
729
/- 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...
map_one' := coeff_one_zero map_mul' := mul_coeff_zero map_zero' := coeff_zero 0 map_add' p q := coeff_add p q 0
Mathlib/Algebra/Polynomial/Coeff.lean
127
131
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Robert Y. Lewis -/ import Mathlib.Algebra.MvPolynomial.Counit import Mathlib.Algebra.MvPolynomial.Invertible import Mathlib.RingTheory.WittVector.Defs /-! # Witt vecto...
private lemma ghostFun_nsmul (m : ℕ) (x : WittVector p R) : ghostFun (m • x) = m • ghostFun x := by
Mathlib/RingTheory/WittVector/Basic.lean
190
191
/- 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.CharP.Defs import Mathlib.Algebra.GeomSum import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.Algebra.P...
Mathlib/RingTheory/Polynomial/Basic.lean
457
457
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Bhavik Mehta, Stuart Presnell -/ import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Defs /-! # Binomial coefficients This file defines binomial coeffic...
theorem choose_eq_zero_iff {n k : ℕ} : n.choose k = 0 ↔ n < k := ⟨fun h => lt_of_not_ge (mt Nat.choose_pos h.symm.not_lt), Nat.choose_eq_zero_of_lt⟩ theorem succ_mul_choose_eq : ∀ n k, succ n * choose n k = choose (succ n) (succ k) * succ k | 0, 0 => by decide | 0, k + 1 => by simp [choose]
Mathlib/Data/Nat/Choose/Basic.lean
116
122
/- 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.DoldKan.Faces import Mathlib.CategoryTheory.Idempotents.Basic /-! # Construction of projections for the Dold-Kan correspondence In this file...
simp only [hnaq, Nat.succ_eq_add_one, add_assoc] rfl) simp only [Fin.succ_mk] at eq simp only [eq, zero_comp]
Mathlib/AlgebraicTopology/DoldKan/Projections.lean
109
113
/- 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,324
1,324
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Algebra.Operations import Mathlib.Algebra.Module.BigOperators import Mathlib.Data.Fintype.Lattice import Mathlib.RingTheory.Coprime.Lemmas import Mathlib...
show f (r • n) ∈ I • N.map f from (f.map_smul r n).symm ▸ smul_mem_smul hr (mem_map_of_mem hn)) <|
Mathlib/RingTheory/Ideal/Operations.lean
99
100
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Algebra.Module.Submodule.Ker import Mathlib.Algebra.Module.Submodul...
variable [Module R M] [Module R₂ M₂] variable (p : Submodule R M) variable {τ₁₂ : R →+* R₂}
Mathlib/Algebra/Module/Submodule/Range.lean
268
270
/- Copyright (c) 2021 Jakob Scholbach. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jakob Scholbach, Joël Riou -/ import Mathlib.CategoryTheory.CommSq import Mathlib.CategoryTheory.Retract /-! # Lifting properties This file defines the lifting property of two morph...
simp only [← h.i_w_assoc, sq'.fac_left, h.retract_left_assoc, Arrow.mk_left, Category.id_comp]}⟩⟩ lemma RetractArrow.rightLiftingProperty
Mathlib/CategoryTheory/LiftingProperties/Basic.lean
141
144
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tim Baumann, Stephen Morgan, Kim Morrison, Floris van Doorn -/ import Mathlib.CategoryTheory.Functor.FullyFaithful import Mathlib.CategoryTheory.ObjectProperty.FullSubcategory import Mat...
simp /-- Composing a functor with both functors of an equivalence yields a naturally isomorphic functor. -/
Mathlib/CategoryTheory/Equivalence.lean
324
327
/- Copyright (c) 2020 Alexander Bentkamp, Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Sébastien Gouëzel, Eric Wieser -/ import Mathlib.Algebra.Algebra.Rat import Mathlib.Data.Complex.Cardinality import Mathlib.Data.Complex.Modu...
as additive groups. -/ theorem Complex.nonempty_linearEquiv_real : Nonempty (ℂ ≃ₗ[ℚ] ℝ) := LinearEquiv.nonempty_equiv_iff_rank_eq.mpr <| by simp
Mathlib/Data/Complex/FiniteDimensional.lean
73
76
/- 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...
Mathlib/Topology/UniformSpace/Basic.lean
1,400
1,405
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Nat.Find import Mathlib.Data.Stream.Init import Mathlib.Tactic.Common /-! # Coinductive formalization of unbounded computations. This fil...
Mathlib/Data/Seq/Computation.lean
1,265
1,267
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.MeanValue /-! # L'Hôpital's rule for 0/0 indeterminate forms In this file, we ...
exact HasDerivAt.lhopital_zero_atTop hdf' hdg' hg' hftop hgtop hdiv /-- **L'Hôpital's rule** for approaching -∞, `deriv` version -/ theorem lhopital_zero_atBot (hdf : ∀ᶠ x : ℝ in atBot, DifferentiableAt ℝ f x) (hg' : ∀ᶠ x : ℝ in atBot, deriv g x ≠ 0) (hfbot : Tendsto f atBot (𝓝 0)) (hgbot : Tendsto g atBot ...
Mathlib/Analysis/Calculus/LHopital.lean
434
445
/- 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, Kim Morrison -/ import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Group.InjSurj import Mathlib.Data.Set.Finite.Basic import Mathlib.Tactic.FastInstance impo...
Mathlib/Data/Finsupp/Defs.lean
645
646
/- 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.Analysis.Normed.Field.Basic import Mathlib.Data.ENNReal.Action import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.MetricSpace.Algebra ...
variable [NormedDivisionRing α] [SeminormedAddGroup β] variable [MulActionWithZero α β] [IsBoundedSMul α β] theorem norm_smul (r : α) (x : β) : ‖r • x‖ = ‖r‖ * ‖x‖ := by by_cases h : r = 0 · simp [h, zero_smul α x] · refine le_antisymm (norm_smul_le r x) ?_
Mathlib/Analysis/Normed/MulAction.lean
90
97
/- Copyright (c) 2022 Antoine Labelle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Labelle -/ import Mathlib.RepresentationTheory.FDRep import Mathlib.LinearAlgebra.Trace import Mathlib.RepresentationTheory.Invariants /-! # Characters of representations Th...
theorem char_tensor (V W : FDRep k G) : (V ⊗ W).character = V.character * W.character := by ext g; convert trace_tensorProduct' (V.ρ g) (W.ρ g)
Mathlib/RepresentationTheory/Character.lean
59
60
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz -/ import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Topology.DiscreteQuotient import Mathlib.Topology.Category.TopCa...
LocallyConstant.ofIsClopen_fiber_zero] exact h open Classical in theorem exists_locallyConstant_finite_aux {α : Type*} [Finite α] (hC : IsLimit C) (f : LocallyConstant C.pt α) : ∃ (j : J) (g : LocallyConstant (F.obj j) (α → Fin 2)), (f.map fun a b => if a = b then (0 : Fin 2) else 1) = g.comap (C.π.app...
Mathlib/Topology/Category/Profinite/CofilteredLimit.lean
116
126
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.RelIso.Set import Mathlib.Order.WellQuasiOrder import Mathlib.Tactic.TFAE /-! # Well-...
exact hmn.ne ((hi.natEmbedding _).injective <| Subtype.val_injective <| ha.eq (hi.natEmbedding _ m).2 (hi.natEmbedding _ n).2 h) section IsRefl variable [IsRefl α r] protected theorem Finite.partiallyWellOrderedOn (hs : s.Finite) : s.PartiallyWellOrderedOn r :=
Mathlib/Order/WellFoundedSet.lean
304
310
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Kim Morrison -/ import Mathlib.CategoryTheory.Subobject.Lattice /-! # Specific subobjects We define `equalizerSubobject`, `kernelSubobject` and `imageSubobject`, which ar...
@[reassoc (attr := simp)] theorem equalizerSubobject_arrow' : (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ι f g := by
Mathlib/CategoryTheory/Subobject/Limits.lean
50
52
/- Copyright (c) 2017 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Mario Carneiro -/ import Mathlib.Algebra.Ring.CharZero import Mathlib.Algebra.Star.Basic import Mathlib.Data.Real.Basic import Mathlib.Order.Interval.Set.UnorderedInterva...
Mathlib/Data/Complex/Basic.lean
701
701
/- 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.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullbac...
variable [LocallySmall.{t} C] [Small.{t} I] instance : Small.{t} (FunctorObjIndex f πX) := by let φ (x : FunctorObjIndex f πX) :
Mathlib/CategoryTheory/SmallObject/Construction.lean
159
163
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot -/ import Mathlib.Algebra.Group.Subgroup.Pointwise import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Order.Filter.Bases.Finit...
-- But this is an elementary calculation. constructor · rintro ⟨y, hyU, hyx⟩ apply Set.mem_iUnion_of_mem (x⁻¹ * y) simp_all · rintro ⟨_, ⟨k, rfl⟩, _, ⟨(hk : φ k = 1), rfl⟩, hx⟩ use x * k, hx rw [map_mul, hk, mul_one]
Mathlib/Topology/Algebra/Group/Basic.lean
804
812
/- 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...
Mathlib/Algebra/Group/Subgroup/Basic.lean
2,245
2,252
/- 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...
theorem dist_add_add_right (n k m : ℕ) : dist (n + k) (m + k) = dist n m :=
Mathlib/Data/Nat/Dist.lean
57
57
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Manuel Candales -/ import Mathlib.Analysis.InnerProductSpace.Subspace import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse /-! # Angles between vectors This fil...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
338
342
/- 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...
Mathlib/Tactic/Ring/Basic.lean
357
357
/- Copyright (c) 2021 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Order.Module.Defs import Mathlib.Data.DFinsupp.Module /-! # Pointwise order on finitely supported dependent functions This file lifts order struc...
theorem support_tsub : (f - g).support ⊆ f.support := by simp +contextual only [subset_iff, tsub_eq_zero_iff_le, mem_support_iff, Ne, coe_tsub, Pi.sub_apply, not_imp_not, zero_le, imp_true_iff]
Mathlib/Data/DFinsupp/Order.lean
265
267
/- Copyright (c) 2021 Stuart Presnell. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Stuart Presnell -/ import Mathlib.Data.Nat.PrimeFin import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Order.Interval.Finset.Nat import...
@[deprecated (since := "2024-10-24")]
Mathlib/Data/Nat/Factorization/Basic.lean
331
332
/- Copyright (c) 2021 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Algebra.GroupWithZero.Action.Defs import Mathlib.Algebra.Order.Interval.Finset.Basic import Mathlib.Combinatorics.Additive.Frei...
variable {k n : ℕ} /-- The Roth number of a natural `N` is the largest integer `m` for which there is a subset of `range N` of size `m` with no arithmetic progression of length 3. Trivially, `rothNumberNat N ≤ N`, but Roth's theorem (proved in 1953) shows that `rothNumberNat N = o(N)` and the construction by Behrend ...
Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
393
405
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Jakob von Raumer -/ import Mathlib.CategoryTheory.Limits.HasLimits import Mathlib.CategoryTheory.Thin /-! # Wide pullbacks We define the category `WidePullbackShape`, (re...
/-- The obvious functor `(WidePullbackShape J)ᵒᵖ ⥤ WidePushoutShape J` -/
Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
434
435
/- Copyright (c) 2022 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.FieldTheory.Minpoly.IsIntegrallyClosed import Mathlib.RingTheory.PowerBasis /-! # A predicate on adjoining root...
rw [eq_comm, ← sub_eq_zero, ← h.map_repr z, ← map_sub, h.map_eq_zero_iff] at hzw obtain ⟨y, hy⟩ := hzw rw [← sub_eq_zero, ← eval₂_sub, hy, eval₂_mul, hx, zero_mul]
Mathlib/RingTheory/IsAdjoinRoot.lean
186
188
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers, Heather Macbeth -/ import Mathlib.Analysis.SpecialFunctions.Complex.Circle import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic /-! # Rotations by oriented angles. This...
· rintro ⟨r, hr, rfl⟩ rw [o.oangle_smul_right_of_pos _ _ hr, o.oangle_rotation_self_right hx]
Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
302
303
/- 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.Card import Mathlib.Data.Finset.Lattice.Fold /-! # Down-compressions This file defines down-compression. Down-compressing `𝒜 : Finset (Fins...
Mathlib/Combinatorics/SetFamily/Compression/Down.lean
283
290
/- Copyright (c) 2023 Wrenna Robson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wrenna Robson -/ import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.Group.Submonoid.Pointwise import Mathlib.Algebra.Group.Subgroup.Lattice /-! # Submonoid of un...
@[to_additive] lemma mem_units_iff_val_mem (H : Subgroup G) (x : Gˣ) : x ∈ H.units ↔ (x : G) ∈ H := by simp_rw [Submonoid.mem_units_iff, mem_toSubmonoid, val_inv_eq_inv_val, inv_mem_iff, and_self]
Mathlib/Algebra/Group/Submonoid/Units.lean
310
312
/- 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.Option.NAry import Mathlib.Data.Seq.Computation import Mathlib.Tactic.ApplyFun import Mathlib.Data.List.Basic /-! # Possibly infinite lists This...
rw [take] cases s.destruct with | none => simp | some v => obtain ⟨x, r⟩ := v simpa using ih theorem length_take_of_le_length {s : Seq α} {n : ℕ} (hle : ∀ h : s.Terminates, n ≤ s.length h) : (s.take n).length = n := by induction n generalizing s with | zero => simp [take] | succ n...
Mathlib/Data/Seq/Seq.lean
782
802
/- Copyright (c) 2022 Jujian Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jujian Zhang, Eric Wieser -/ import Mathlib.Algebra.Group.Submonoid.Finsupp import Mathlib.Order.Filter.AtTopBot.Defs import Mathlib.RingTheory.Adjoin.Basic import Mathlib.RingTheory.Gra...
`𝒜 i` contains both numerator and denominator. -/ def deg (f : HomogeneousLocalization 𝒜 x) : ι := (Quotient.out f).deg
Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
498
500
/- Copyright (c) 2024 Emilie Burgun. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Emilie Burgun -/ import Mathlib.Dynamics.PeriodicPts.Lemmas import Mathlib.GroupTheory.Exponent import Mathlib.GroupTheory.GroupAction.Basic /-! # Period of a group action This modul...
theorem period_dvd_orderOf (m : M) (a : α) : period m a ∣ orderOf m := by rw [← pow_smul_eq_iff_period_dvd, pow_orderOf_eq_one, one_smul]
Mathlib/GroupTheory/GroupAction/Period.lean
87
88
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau -/ import Mathlib.Data.List.Forall2 /-! # Lists with no duplicates `List.Nodup` is defined in `Data/List/Basic`. In this file we prove various properties of...
simp only [Nodup, pairwise_append, disjoint_iff_ne] theorem disjoint_of_nodup_append {l₁ l₂ : List α} (d : Nodup (l₁ ++ l₂)) : Disjoint l₁ l₂ :=
Mathlib/Data/List/Nodup.lean
179
181
/- Copyright (c) 2020 Yury Kudryashov, Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Anne Baanen -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Group.Action.Pi import Mathlib.Data.Fintype.BigOperators import Mat...
· have : i < length (ofFn f) := by rwa [length_ofFn] rw [prod_take_succ _ _ this] have A : ({j | j.val < i + 1} : Finset (Fin n)) = insert ⟨i, h⟩ ({j | Fin.val j < i} : Finset (Fin n)) := by ext ⟨_, _⟩ simp [Nat.lt_succ_iff_lt_or_eq, or_comm] rw [A, prod_insert (by simp),...
Mathlib/Algebra/BigOperators/Fin.lean
441
447
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.Probability.Kernel.MeasurableLIntegral /-! # Measurability of the integral against a kernel Th...
(hf : StronglyMeasurable (uncurry f)) : StronglyMeasurable fun y => ∫ x, f x y ∂κ y := (hf.comp_measurable measurable_swap).integral_kernel_prod_right' theorem StronglyMeasurable.integral_kernel_prod_left' ⦃f : β × α → E⦄ (hf : StronglyMeasurable f) : StronglyMeasurable fun y => ∫ x, f (x, y) ∂κ y := (hf.c...
Mathlib/Probability/Kernel/MeasurableIntegral.lean
136
145
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Degree.Domain import Mathlib.Algebra.Polynomial.Degree.Support import Mathlib.Algebra.Poly...
iterate_derivative_C h @[simp]
Mathlib/Algebra/Polynomial/Derivative.lean
222
224
/- 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.Convex.Topology import Mathlib.Analysis.Normed.Module.Basic import Mathlib.Analysis.Seminorm import Mathlib.Analysis.SpecificLimits.Basi...
apply tendsto_inv_nhdsGT_zero.comp simp only [nhdsWithin, tendsto_inf, tendsto_principal, mem_Ioi, norm_pos_iff, ne_eq,
Mathlib/Analysis/Calculus/TangentCone.lean
393
394
/- 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.Algebra.Group.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Algebra.Notation.Prod import Mathlib.Data.Set.Image /-! # Support of a func...
mulSupport (update f x y) = insert x (mulSupport f) := by ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*] @[to_additive]
Mathlib/Algebra/Group/Support.lean
73
76
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.Analysis.SpecialFunctions.Pow.Continuity import Mathlib.Analysis.Special...
(p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℂ ℂ ℂ) p := by have A : p.1 ≠ 0 := slitPlane_ne_zero hp have : (fun x : ℂ × ℂ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := ((isOpen_ne.preimage continuous_fst).eventually_mem A).mono fun p hp => cpow_def_of_ne_zero hp _ rw [cpow_sub _ _ A...
Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
31
42
/- Copyright (c) 2020 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.Topology.Path /-! # Path connectedness Continuing from `Mathlib.Topology.Path`, this file defines path components and path-connected spaces. ## Main...
Mathlib/Topology/Connected/PathConnected.lean
730
742
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Frédéric Dupuis -/ import Mathlib.Analysis.Convex.Hull /-! # Convex cones In a `𝕜`-module `E`, we define a convex cone as a set `s` such that `a • x + b • y ∈ s` w...
theorem coe_bot : ↑(⊥ : ConvexCone 𝕜 E) = (∅ : Set E) := rfl
Mathlib/Analysis/Convex/Cone/Basic.lean
141
142
/- Copyright (c) 2022 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.NumberTheory.Cyclotomic.Discriminant import Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral import Mathlib.RingTheory.Ideal.Norm.AbsNorm import M...
replace hζ : IsPrimitiveRoot ζ (p ^ (0 + 1)) := by simpa using hζ exact hζ.finite_quotient_span_sub_one /-- In a `p ^ (k + 1)`-th cyclotomic extension of `ℚ`, we have that `ζ - 1` divides `p` in `𝓞 K`. -/ lemma toInteger_sub_one_dvd_prime [hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K] (hζ : IsPrimitiveRo...
Mathlib/NumberTheory/Cyclotomic/Rat.lean
507
513
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.Bochner.Basic import Mathlib.MeasureTheory.Integral.Bochner.L1 import Mathlib.Me...
Mathlib/MeasureTheory/Integral/Bochner.lean
1,657
1,670
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen, Antoine Labelle -/ import Mathlib.LinearAlgebra.Contraction import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib....
lemma trace_lie {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M] (f g : Module.End R M) : trace R M ⁅f, g⁆ = 0 := by rw [Ring.lie_def, map_sub, trace_mul_comm]
Mathlib/LinearAlgebra/Trace.lean
110
112
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Johannes Hölzl -/ import Mathlib.Topology.UniformSpace.AbstractCompletion /-! # Hausdorff completions of uniform spaces The goal is to construct a left-adjoint to the...
rw [lift'_lift'_assoc] · exact monotone_id.compRel monotone_id · exact monotone_gen _ ≤ (𝓤 α).lift' gen := lift'_mono comp_le_uniformity le_rfl instance : UniformSpace (CauchyFilter α) := UniformSpace.ofCore { uniformity := (𝓤 α).lift' gen refl := principal_le_lift'.2 fun _s hs ⟨a, ...
Mathlib/Topology/UniformSpace/Completion.lean
116
129
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.Group.Support import Mathlib.Algebra.Order.Monoid.Unbundled.WithTop import Mathlib.Order.WellFoundedSet /-! # Hahn Series If `Γ` is ordered an...
· rw [h, leadingCoeff_zero, coeff_zero] · rw [leadingCoeff_of_ne h, order_of_ne h]
Mathlib/RingTheory/HahnSeries/Basic.lean
395
397
/- Copyright (c) 2015, 2017 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis, Johannes Hölzl, Mario Carneiro, Sébastien Gouëzel -/ import Mathlib.Topology.Order.Compact import Mathlib.Topology.MetricSpace.ProperSpace import M...
Mathlib/Topology/MetricSpace/Bounded.lean
629
633
/- 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
1,508
1,512
/- 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, Johannes Hölzl, Mario Carneiro -/ import Mathlib.Logic.Pairwise import Mathlib.Data.Set.BooleanAlgebra /-! # The set lattice This file is a collectio...
theorem iUnion_singleton_eq_range (f : α → β) : ⋃ x : α, {f x} = range f := by ext x
Mathlib/Data/Set/Lattice.lean
991
992
/- Copyright (c) 2023 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lorenzo Luccioli, Rémy Degenne, Alexander Bentkamp -/ import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform import Mathlib.Probability.Moments.ComplexMGF /-! # Gaussian dis...
/-- The gaussian distribution pdf integrates to 1 when the variance is not zero. -/ lemma lintegral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (h : v ≠ 0) : ∫⁻ x, ENNReal.ofReal (gaussianPDFReal μ v x) = 1 := by rw [← ENNReal.toReal_eq_one_iff] have hfm : AEStronglyMeasurable (gaussianPDFReal μ v) volume := (...
Mathlib/Probability/Distributions/Gaussian.lean
96
113
/- Copyright (c) 2022 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Shing Tak Lam, Frédéric Dupuis -/ import Mathlib.Algebra.Group.Submonoid.Operations import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.Algebra.Algebra.Spectrum.Basic /-! # Unitar...
Mathlib/Algebra/Star/Unitary.lean
255
259
/- Copyright (c) 2021 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Gabin Kolly -/ import Mathlib.Data.Fintype.Order import Mathlib.Order.Closure import Mathlib.ModelTheory.Semantics import Mathlib.ModelTheory.Encoding /-! # First-Orde...
theorem range_coe (f : M →[L] N) : (range f : Set N) = Set.range f := rfl @[simp] theorem mem_range {f : M →[L] N} {x} : x ∈ range f ↔ ∃ y, f y = x := Iff.rfl
Mathlib/ModelTheory/Substructures.lean
788
795