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) 2021 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Reid Barton -/ import Mathlib.Topology.Separation.Regular /-! # The shrinking lemma In this file we prove a few versions of the shrinking lemma. The lemma says that...
rcases normal_exists_closure_subset C (v.isOpen i) I with ⟨vi, ovi, hvi, cvi⟩ classical refine ⟨⟨update v i vi, insert i v.carrier, ?_, ?_, ?_, ?_, ?_⟩, ?_, ?_⟩ · intro j rcases eq_or_ne j i with (rfl| hne) <;> simp [*, v.isOpen] · refine fun x hx => mem_iUnion.2 ?_ rcases em (∃ j ≠ i, x ∈ v j) with (...
Mathlib/Topology/ShrinkingLemma.lean
174
204
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Floris van Doorn -/ import Mathlib.Data.Countable.Small import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Powerset import Mathlib.Dat...
Mathlib/SetTheory/Cardinal/Basic.lean
1,063
1,065
/- 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...
theorem pow_eq_npowRec {n : ℕ} : M ^ n = npowRec n M := rfl protected theorem pow_zero : M ^ 0 = 1 := rfl protected theorem pow_succ {n : ℕ} : M ^ (n + 1) = M ^ n * M := rfl protected theorem pow_add {m n : ℕ} (h : n ≠ 0) : M ^ (m + n) = M ^ m * M ^ n := npowRec_add m n h _ M.one_mul
Mathlib/Algebra/Algebra/Operations.lean
298
306
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Group.Action.End import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Action.Prod import Mathlib.Algebra.Group.Subg...
Mathlib/GroupTheory/GroupAction/Basic.lean
850
853
/- Copyright (c) 2022 Richard M. Hill. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Richard M. Hill -/ import Mathlib.Algebra.Module.Submodule.Invariant import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.LinearAlgebra.DFinsupp import Mathlib.RingTheory.Finit...
p ≃ₗ[R] mapSubmodule R M a ⟨p, hp⟩ where toFun x := ⟨of R M a x, by simp⟩ invFun x := ⟨((of R M _).symm (x : AEval R M a)), by obtain ⟨x, hx⟩ := x; simpa using hx⟩ left_inv x := rfl
Mathlib/Algebra/Polynomial/Module/AEval.lean
157
160
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.InnerProductSpace.Defs impor...
Mathlib/Analysis/InnerProductSpace/Basic.lean
1,678
1,687
/- Copyright (c) 2021 Julian Kuelshammer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Kuelshammer -/ import Mathlib.GroupTheory.OrderOfElement import Mathlib.Algebra.GCDMonoid.Finset import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Data.Nat.Factorization.B...
Mathlib/GroupTheory/Exponent.lean
693
698
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Analysis.Convex.Hull import Mathlib.LinearAlgebra.AffineSpace.Basis /-! # Convex combinations ...
corresponding barycentric coordinates. -/ theorem AffineBasis.convexHull_eq_nonneg_coord {ι : Type*} (b : AffineBasis ι R E) : convexHull R (range b) = { x | ∀ i, 0 ≤ b.coord i x } := by rw [convexHull_range_eq_exists_affineCombination] ext x refine ⟨?_, fun hx => ?_⟩ · rintro ⟨s, w, hw₀, hw₁, rfl⟩ i by...
Mathlib/Analysis/Convex/Combination.lean
502
510
/- 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.Complex.Circle import Mathlib.Analysis.SpecialFunctions.Complex.Log /-! # Maps on the unit circle In this file we prove some basic lemmas ...
/-- `Complex.arg ∘ (↑)` and `expMapCircle` define a partial equivalence between `circle` and `ℝ`
Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
37
38
/- 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.Data.PNat.Basic import Mathlib.Algebra.Notation.Prod /-! # Typeclasses for power-associative structures In this file we define power-associativity f...
theorem ppow_eq_pow [Monoid M] [Pow M ℕ+] [PNatPowAssoc M] (x : M) (n : ℕ+) : x ^ n = x ^ (n : ℕ) := by induction n with | one => rw [ppow_one, PNat.one_coe, pow_one]
Mathlib/Algebra/Group/PNatPowAssoc.lean
88
92
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.MeasureTheory.MeasurableSpace.EventuallyMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.M...
protected theorem union (hs : NullMeasurableSet s μ) (ht : NullMeasurableSet t μ) : NullMeasurableSet (s ∪ t) μ := MeasurableSet.union hs ht
Mathlib/MeasureTheory/Measure/NullMeasurable.lean
152
155
/- Copyright (c) 2024 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Data.List.Defs import Mathlib.Data.Option.Basic import Mathlib.Util...
| inr h => rw [getD_eq_default _ _ h, getElem?_eq_none_iff.mpr h, Option.getD_none] @[deprecated (since := "2025-02-14")] alias getD_eq_getD_get? := getD_eq_getD_getElem? end getD section getI variable [Inhabited α] @[simp] theorem getI_nil : getI ([] : List α) n = default :=
Mathlib/Data/List/GetD.lean
89
100
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.T...
@[simp] theorem norm_mul_cos_add_sin_mul_I (x : ℂ) : (‖x‖ * (cos (arg x) + sin (arg x) * I) : ℂ) = x := by rw [← exp_mul_I, norm_mul_exp_arg_mul_I] @[simp]
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
54
58
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.RingTheory.Localization.Integral import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed impo...
rcases con with (con | con) · apply h0 con · apply Units.ne_zero _ con /-- **Gauss's Lemma** for GCD domains states that a primitive polynomial is irreducible iff it is irreducible in the fraction field. -/ theorem IsPrimitive.irreducible_iff_irreducible_map_fraction_map {p : R[X]} (hp : p.IsPrimitive) : I...
Mathlib/RingTheory/Polynomial/GaussLemma.lean
229
244
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon -/ import Batteries.WF import Mathlib.Data.Part import Mathlib.Data.Rel import Mathlib.Tactic.GeneralizeProofs /-! # Partial functions This...
/-- The monad `map` function, pointwise `Part.map` -/ def map (f : β → γ) (g : α →. β) : α →. γ := fun a => (g a).map f
Mathlib/Data/PFun.lean
189
190
/- 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
772
774
/- Copyright (c) 2022 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.Data.Complex.Basic import Mathlib.MeasureTheory.Integral.CircleIntegral /-! # Circle integral transform In this file we define the circle integral tr...
intro x simp_rw [circleTransformDeriv, this] congr 2 simp [this] theorem circleTransformDeriv_eq (f : ℂ → E) : circleTransformDeriv R z w f = fun θ => (circleMap z R θ - w)⁻¹ • circleTransform R z w f θ := by ext
Mathlib/MeasureTheory/Integral/CircleTransform.lean
48
55
/- 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...
Mathlib/Data/Rel.lean
420
421
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Moritz Doll -/ import Mathlib.LinearAlgebra.Prod /-! # Partially defined linear maps A `LinearPMap R E F` or `E →ₗ.[R] F` is a linear map from a submodule of `E` to...
noncomputable def valFromGraph {g : Submodule R (E × F)} (hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) {a : E} (ha : a ∈ g.map (LinearMap.fst R E F)) : F := (ExistsUnique.exists (existsUnique_from_graph @hg ha)).choose theorem valFromGraph_mem {g : Submodule R (E × F)} (hg : ∀ (x : E ×...
Mathlib/LinearAlgebra/LinearPMap.lean
871
880
/- 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.Tactic.CategoryTheory.Reassoc /-! # Isomorphisms This file defines isomorphisms between objects of a categ...
open IsIso
Mathlib/CategoryTheory/Iso.lean
411
413
/- Copyright (c) 2021 David Wärn,. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Wärn, Kim Morrison -/ import Mathlib.Combinatorics.Quiver.Prefunctor import Mathlib.Logic.Lemmas import Batteries.Data.List.Basic /-! # Paths in quivers Given a quiver `V`, we def...
fun _ _ h => ((comp_inj' rfl).1 h).2 @[simp] theorem comp_inj_left {p₁ p₂ : Path a b} {q : Path b c} : p₁.comp q = p₂.comp q ↔ p₁ = p₂ :=
Mathlib/Combinatorics/Quiver/Path.lean
137
140
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Sébastien Gouëzel, Frédéric Dupuis -/ import Mathlib.Analysis.InnerProductSpace.Subspace import Mathlib.LinearAlgebra.SesquilinearForm /-! # Orthogonal complements of su...
rw [inner_sub_right, sub_eq_zero] exact h ⟨u, hu⟩ variable (K)
Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
86
90
/- 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.Bounds.Basic import Mathlib.Order.Preorder.Chain /-! # Antichains This file defines antichains. An antichain is a set where any two distinct elemen...
theorem IsGreatest.antichain_iff (hs : IsGreatest s a) : IsAntichain (· ≤ ·) s ↔ s = {a} := (and_iff_left hs).symm.trans isAntichain_and_greatest_iff
Mathlib/Order/Antichain.lean
221
224
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Sébastien Gouëzel, Yury Kudryashov, Dylan MacKenzie, Patrick Massot -/ import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Power import M...
(div_nonneg h₁ (h₁.trans h₂.le)) ((div_lt_one H).2 h₂)).congr fun _ ↦ div_pow _ _ _ theorem isBigO_pow_pow_of_le_left {r₁ r₂ : ℝ} (h₁ : 0 ≤ r₁) (h₂ : r₁ ≤ r₂) : (fun n : ℕ ↦ r₁ ^ n) =O[atTop] fun n ↦ r₂ ^ n := h₂.eq_or_lt.elim (fun h ↦ h ▸ isBigO_refl _ _) fun h ↦ (isLittleO_pow_pow_of_lt_left h₁ h).isBigO...
Mathlib/Analysis/SpecificLimits/Normed.lean
39
44
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Ken Lee, Chris Hughes -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic /-...
theorem pow (H : IsRelPrime x y) : IsRelPrime (x ^ m) (y ^ n) := H.pow_left.pow_right theorem pow_left_iff (hm : 0 < m) : IsRelPrime (x ^ m) y ↔ IsRelPrime x y := by refine ⟨fun h ↦ ?_, IsRelPrime.pow_left⟩ rw [← Finset.card_range m, ← Finset.prod_const] at h exact h.of_prod_left 0 (Finset.mem_range.mpr hm) t...
Mathlib/RingTheory/Coprime/Lemmas.lean
281
289
/- 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...
open Lean.Meta Qq
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
169
170
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Moritz Doll -/ import Mathlib.LinearAlgebra.Prod /-! # Partially defined linear maps A `LinearPMap R E F` or `E →ₗ.[R] F` is a linear map from a submodule of `E` to...
theorem mem_domain_iff {f : E →ₗ.[R] F} {x : E} : x ∈ f.domain ↔ ∃ y : F, (x, y) ∈ f.graph := by constructor <;> intro h · use f ⟨x, h⟩ exact f.mem_graph ⟨x, h⟩
Mathlib/LinearAlgebra/LinearPMap.lean
772
775
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Bryan Gin-ge Chen -/ import Mathlib.Order.Heyting.Basic /-! # (Generalized) Boolean algebras A Boolean algebra is a bounded distributive lattice with a complement ope...
@[simp] lemma sdiff_eq_right : x \ y = y ↔ x = ⊥ ∧ y = ⊥ := by rw [disjoint_sdiff_self_left.eq_iff]; aesop
Mathlib/Order/BooleanAlgebra.lean
302
305
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Yaël Dillies, Bhavik Mehta -/ import Mathlib.Data.Finset.Lattice.Fold import Mathlib.Data.Set.Sigma import Mathlib.Order.CompleteLattice.Finset /-! # Finite sets in a ...
simp_rw [sigmaLift] split_ifs with h · simp [h, forall_prop_of_true h] · simp [h, forall_prop_of_false h]
Mathlib/Data/Finset/Sigma.lean
190
193
/- 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.Projection import Mathlib.MeasureTheory.Function.ConditionalExpectation.Unique import Mathlib.MeasureTheory.Function.L2Space /-...
rw [indicatorConstLp_eq_toSpanSingleton_compLp hs hμs x] have h_comp := condExpL2_comp_continuousLinearMap ℝ 𝕜 hm (toSpanSingleton ℝ x) (indicatorConstLp 2 hs hμs (1 : ℝ)) refine h_comp.trans ?_ exact (toSpanSingleton ℝ x).coeFn_compLp _ @[deprecated (since := "2025-01-21")] alias condexpL2_indicato...
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
337
351
/- Copyright (c) 2022 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryTheory.Limits.Shapes.StrongEpi import Mathlib.CategoryTheory.LiftingProperties.Adjunction /-! # Preservati...
⟨fun _ => preservesEpimorphisms.of_iso α, fun _ => preservesEpimorphisms.of_iso α.symm⟩ theorem reflectsMonomorphisms.of_iso {F G : C ⥤ D} [ReflectsMonomorphisms F] (α : F ≅ G) : ReflectsMonomorphisms G := { reflects := fun {X} {Y} f h => by apply F.mono_of_mono_map
Mathlib/CategoryTheory/Functor/EpiMono.lean
121
126
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.Measure.Typeclasses...
end Measure open Measure
Mathlib/MeasureTheory/Measure/Dirac.lean
127
129
/- 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.MeasureTheory.Integral.Lebesgue.Countable import Mathlib.MeasureTheory.Measure.Decomposition.Exhaustion import Mathlib.MeasureTheory.Me...
theorem prod_withDensity_right₀ {g : β → ℝ≥0∞} (hg : AEMeasurable g ν) : μ.prod (ν.withDensity g) = (μ.prod ν).withDensity (fun z ↦ g z.2) := by refine ext_of_lintegral _ fun φ hφ ↦ ?_ rw [lintegral_prod _ hφ.aemeasurable, lintegral_withDensity_eq_lintegral_mul₀ _ hφ.aemeasurable, lintegral_prod] · refine...
Mathlib/MeasureTheory/Measure/WithDensity.lean
651
658
/- Copyright (c) 2019 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton, Mario Carneiro, Isabel Longbottom, Kim Morrison, Apurva Nakade, Yuyang Zhao -/ import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.SetTheory.PGame.Algebra import Mathl...
unfold One.one unfold instOnePGame change mk _ _ _ _ * mk _ _ _ _ ≡r _
Mathlib/SetTheory/Game/Basic.lean
629
631
/- Copyright (c) 2018 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.Topology.Algebra.Ring.Basic import Mathlib.Topology.Algebra.Group.Quotient import Mathlib.RingTheory.Ideal.Quotient.Defs /-! # Ideals and quotients of...
instance topologicalRing_quotient : IsTopologicalRing (R ⧸ N) where __ := QuotientAddGroup.instIsTopologicalAddGroup _ continuous_mul := (QuotientRing.isQuotientMap_coe_coe N).continuous_iff.2 <| continuous_quot_mk.comp continuous_mul
Mathlib/Topology/Algebra/Ring/Ideal.lean
68
71
/- 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.Order.Bounds.Defs import Mathlib.Order.Directed import Mathlib.Order.BoundedOrder.Monotone import Mathlib.Order.Interval.Set.Basic /-...
variable [LinearOrder α] {s : Set α} {a b : α}
Mathlib/Order/Bounds/Basic.lean
892
893
/- Copyright (c) 2018 Reid Barton. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Reid Barton -/ import Mathlib.Topology.Bases import Mathlib.Topology.DenseEmbedding import Mathlib.Topology.Connected.TotallyDisconnected /-! # Stone-Čech compactification Construction ...
-- The following refined version will never be used /-- `pure : α → Ultrafilter α` defines a dense embedding of `α` in `Ultrafilter α`. -/ theorem isDenseEmbedding_pure : @IsDenseEmbedding _ _ ⊥ _ (pure : α → Ultrafilter α) := letI : TopologicalSpace α := ⊥ { isDenseInducing_pure with injective := ultrafilter_pure_...
Mathlib/Topology/StoneCech.lean
156
161
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Sébastien Gouëzel, Yury Kudryashov, Dylan MacKenzie, Patrick Massot -/ import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Power import M...
(fun n ↦ ?_) rw [norm_mul, norm_pow, div_pow, ← mul_comm_div] conv at hC => enter [n]; rw [norm_mul, norm_pow, ← _root_.le_div_iff₀ (by positivity)] exact mul_le_mul_of_nonneg_right (hC n) (pow_nonneg (norm_nonneg z) n)
Mathlib/Analysis/SpecificLimits/Normed.lean
657
660
/- 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.Ordering.Basic import Mathlib.Order.Synonym /-! # Comparison This file provides basic results about orderings and comparison in linear orders. ...
| eq, _, _, h₁, h₂ => h₁.eq_eq.2 h₂ | gt, _, _, h₁, h₂ => h₁.eq_gt.2 h₂ theorem compares_iff_of_compares_impl [LinearOrder α] [Preorder β] {a b : α} {a' b' : β}
Mathlib/Order/Compare.lean
88
91
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Tactic.NormNum.Inv /-! # `norm_num` extension for equalities -/ variable {α : Type*} open Lean Meta Qq namespace Mathlib.Meta.NormNum
theorem isNat_eq_false [AddMonoidWithOne α] [CharZero α] : {a b : α} → {a' b' : ℕ} → IsNat a a' → IsNat b b' → Nat.beq a' b' = false → ¬a = b | _, _, _, _, ⟨rfl⟩, ⟨rfl⟩, h => by simpa using Nat.ne_of_beq_eq_false h
Mathlib/Tactic/NormNum/Eq.lean
18
20
/- Copyright (c) 2024 Mitchell Lee. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mitchell Lee -/ import Mathlib.Data.ZMod.Basic import Mathlib.GroupTheory.Coxeter.Basic import Mathlib.Tactic.Linarith import Mathlib.Tactic.Zify /-! # The length function, reduced word...
cs.IsRightDescent w i ↔ ℓ (w * s i) + 1 = ℓ w := by unfold IsRightDescent constructor · intro _ exact (cs.length_mul_simple w i).resolve_left (by omega) · omega theorem not_isRightDescent_iff {w : W} {i : B} :
Mathlib/GroupTheory/Coxeter/Length.lean
323
330
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro -/ import Mathlib.Data.Sum.Basic import Mathlib.Logic.Equiv.Option import Mathlib.Logic.Equiv.Sum import Mathlib.Logic.Function.Conjugate impor...
Mathlib/Logic/Equiv/Basic.lean
1,651
1,652
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.Group.Action.End import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Action.Prod import Mathlib.Algebra.Group.Subg...
Mathlib/GroupTheory/GroupAction/Basic.lean
347
351
/- 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.Data.List.Iterate import Mathlib.GroupTheory.Perm.Cycle.Basic import Mathlib.GroupTheory.NoncommPiCoprod import Mathlib.Tactic.Group /-! # ...
split_ifs at hy <;> tauto)) (by rw [hfg hx] intro y hy simp [inv_eq_iff_eq, cycleOf_apply, eq_comm (a := g y)] at hy rw [hfg (Ne.symm hy.right), ← mul_inv_eq_one (a := g.cycleOf y), cycleOf_inv] simp_rw [mul_inv_rev] rw [i...
Mathlib/GroupTheory/Perm/Cycle/Factors.lean
386
411
/- Copyright (c) 2021 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot -/ import Mathlib.RingTheory.Ideal.Maps import Mathlib.Topology.Algebra.Nonarchimedean.Bases import Mathlib.Topology.Algebra.UniformRing /-! # Adic topology Given a co...
suffices ∀ i j : ℕ, ∃ k, I ^ k ≤ I ^ i ∧ I ^ k ≤ I ^ j by simpa only [smul_eq_mul, mul_top, Algebra.id.map_eq_id, map_id, le_inf_iff] using this intro i j exact ⟨max i j, pow_le_pow_right (le_max_left i j), pow_le_pow_right (le_max_right i j)⟩ leftMul := by suffices ∀ (a : R) (i : ℕ)...
Mathlib/Topology/Algebra/Nonarchimedean/AdicTopology.lean
54
73
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Limits.Preserves.Finite import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Preserves....
haveI := hasProduct_fin n HasLimit.mk ⟨_, extendFanIsLimit f (limit.isLimit _) (limit.isLimit _)⟩ /-- If `C` has a terminal object and binary products, then it has finite products. -/ theorem hasFiniteProducts_of_has_binary_and_terminal : HasFiniteProducts C := ⟨fun n => ⟨fun K => by let that : (Discrete...
Mathlib/CategoryTheory/Limits/Constructions/FiniteProductsOfBinaryProducts.lean
96
103
/- 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, Floris van Doorn -/ import Mathlib.Geometry.Manifold.MFDeriv.FDeriv /-! # Differentiability of specific functions In this file, we establish differentiability r...
theorem mdifferentiableWithinAt_prod_module_iff (f : M → F₁ × F₂) : MDifferentiableWithinAt I 𝓘(𝕜, F₁ × F₂) f s x ↔ MDifferentiableWithinAt I 𝓘(𝕜, F₁) (Prod.fst ∘ f) s x ∧
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
357
360
/- Copyright (c) 2018 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.GeomSum import Mathlib.Algebra.Order.Archimedean.Basic import Mathlib.Algebra.Order.CauSeq.Basic /-! # Cauchy sequences and big oper...
abv ((∑ k ∈ range j, f k) * ∑ k ∈ range j, g k - ∑ n ∈ range j, ∑ m ∈ range (n + 1), f m * g (n - m)) < ε := by let ⟨P, hP⟩ := ha.bounded let ⟨Q, hQ⟩ := hb.bounded have hP0 : 0 < P := lt_of_le_of_lt (abs_nonneg _) (hP 0) have hPε0 : 0 < ε / (2 * P) := div_pos ε0 (mul_pos (show (2 : α) > 0 by norm_...
Mathlib/Algebra/Order/CauSeq/BigOperators.lean
57
141
/- Copyright (c) 2019 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Bhavik Mehta -/ import Mathlib.CategoryTheory.Comma.Over.Basic import Mathlib.CategoryTheory.Discrete.Basic import Mathlib.CategoryTheory.EpiMono import Mathlib.CategoryThe...
Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
1,387
1,388
/- 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.Algebra.AddTorsor.Defs import Mathlib.GroupTheory.GroupAction.SubMulAction import Mathlib.Topology.Algebra.Constructions import Mathlib.Topology.Alge...
end AddTorsor
Mathlib/Topology/Algebra/MulAction.lean
293
299
/- Copyright (c) 2016 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Mario Carneiro, Johannes Hölzl -/ import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Group.Unbundled.Abs import Mathlib.Algebra.Order...
Mathlib/Algebra/Order/Group/Abs.lean
382
382
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.BigOperators.Expect import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical import Mathlib.Algebra.O...
Mathlib/Data/NNReal/Basic.lean
791
793
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Log import Mathlib.Data.Nat.Pri...
(add_comm n k ▸ hnb)), multiplicity_choose_aux hp (le_add_left k n)] simp [add_comm] refine WithTop.add_right_cancel ?_ h₁ apply finiteMultiplicity_iff_emultiplicity_ne_top.1 exact Nat.finiteMultiplicity_iff.2 ⟨hp.ne_one, mul_pos (factorial_pos k) (factorial_pos n)⟩ /-- The multiplicity of `p` in `choo...
Mathlib/Data/Nat/Multiplicity.lean
201
217
/- 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...
variable {T : Type*} [CommRing T] [Algebra R T] /-- Adjoining a root gives a unique ring up to algebra isomorphism. This is the converse of `IsAdjoinRoot.ofEquiv`: this turns an `IsAdjoinRoot` into an `AlgEquiv`, and `IsAdjoinRoot.ofEquiv` turns an `AlgEquiv` into an `IsAdjoinRoot`. -/ def aequiv (h : IsAdjoinRoot S ...
Mathlib/RingTheory/IsAdjoinRoot.lean
547
562
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.IsPrimePow import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Algebra.Order.Ring.Int import Mathlib.Algebra.Ring.CharZero im...
/-- `Nat.swap_mem_divisorsAntidiagonal` with the LHS in simp normal form. -/ @[deprecated swap_mem_divisorsAntidiagonal (since := "2025-02-17")]
Mathlib/NumberTheory/Divisors.lean
314
316
/- 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.Analytic.Within import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries /-! # Higher d...
DifferentiableWithinAt 𝕜 f (insert x s) x := by rcases contDiffWithinAt_nat.1 (h.of_le hn) with ⟨u, hu, p, H⟩ rcases mem_nhdsWithin.1 hu with ⟨t, t_open, xt, tu⟩ rw [inter_comm] at tu exact (differentiableWithinAt_inter (IsOpen.mem_nhds t_open xt)).1 <| ((H.mono tu).differentiableOn le_rfl) x ⟨mem_inse...
Mathlib/Analysis/Calculus/ContDiff/Defs.lean
344
367
/- 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...
simp only [equivRealProd_apply, singleton_prod, mem_image, Prod.mk.injEq, exists_eq_right_right, mem_preimage] at hx obtain ⟨x₁, hx₁, hx₁', hx₁''⟩ := hx
Mathlib/Data/Complex/Basic.lean
835
837
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Order.Ring.WithTop import Mathlib.Algebra.Polynomial.Basi...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
870
871
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Johan Commelin, Patrick Massot -/ import Mathlib.Algebra.GroupWithZero.InjSurj import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.GroupWithZero.WithZero impo...
set_option linter.deprecated false in @[deprecated OrderIso.mulLeft₀_symm (since := "2024-11-18")] theorem OrderIso.mulLeft₀'_symm {a : α} (ha : a ≠ 0) :
Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
186
188
/- 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.Grade import Mathlib.Data.Finset.Powerset import Mathlib.Order.Interval.Finset.Basic /-! # Intervals of finsets as finsets This file provides...
/-- Cardinality of a non-empty `Icc` of finsets. -/ theorem card_Icc_finset (h : s ⊆ t) : (Icc s t).card = 2 ^ (t.card - s.card) := by rw [← card_sdiff h, ← card_powerset, Icc_eq_image_powerset h, Finset.card_image_iff] rintro u hu v hv (huv : s ⊔ u = s ⊔ v) rw [mem_coe, mem_powerset] at hu hv rw [← (disjoint_...
Mathlib/Data/Finset/Interval.lean
90
97
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Justus Springer -/ import Mathlib.Geometry.RingedSpace.LocallyRingedSpace import Mathlib.AlgebraicGeometry.StructureSheaf import Mathlib.RingTheory.Localization.Localizatio...
lemma Spec.locallyRingedSpaceObj_sheaf' (R : Type u) [CommRing R] : (Spec.locallyRingedSpaceObj <| CommRingCat.of R).sheaf = structureSheaf R := rfl lemma Spec.locallyRingedSpaceObj_presheaf_map (R : CommRingCat.{u}) {U V} (i : U ⟶ V) : (Spec.locallyRingedSpaceObj R).presheaf.map i = (structureSheaf R).1.m...
Mathlib/AlgebraicGeometry/Spec.lean
184
197
/- 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.Finsupp import Mathlib.Data.Finsupp.Order import Mathlib.Order.Interval.Finset.Basic /-! # Finite intervals of finitely supported functions T...
Mathlib/Data/Finsupp/Interval.lean
145
147
/- 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, Simon Hudon, Mario Carneiro -/ import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Init import Mathlib.Data.Int.Init import Mathlib....
Mathlib/Algebra/Group/Basic.lean
1,135
1,136
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Primrec import Mathlib.Data.Nat.PSub import Mathlib.Data.PFun /-! # The partial recursive functions The partial recursive functions are...
(∃ n : ℕ, ((∃ b' : σ, Sum.inl b' ∈ F a n) ∧ ∀ {m : ℕ}, m < n → ∃ b : α, Sum.inr b ∈ F a m) ∧ Sum.inl b ∈ F a n) ↔ b ∈ PFun.fix f a := by intro F; refine ⟨fun h => ?_, fun h => ?_⟩ · rcases h with ⟨n, ⟨_x, h₁⟩, h₂⟩ have : ∀ m a', Sum.inr a' ∈ F a m → b ∈ PFun.fix f a' → b ∈ PFun.fix f...
Mathlib/Computability/Partrec.lean
723
738
/- 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.Combinatorics.SetFamily.Compression.Down import Mathlib.Data.Fintype.Powerset import Mathlib.Order.Interval.Finset.Nat import Mathlib.Algebra.BigOperators....
Mathlib/Combinatorics/SetFamily/Shatter.lean
98
98
/- Copyright (c) 2024 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler -/ import Mathlib.NumberTheory.LSeries.RiemannZeta import Mathlib.NumberTheory.Harmonic.GammaDeriv /-! # Asymptotics of `ζ s` as `s → 1` The goal of this file is to ev...
ring_nf /-- Formula for `ζ 1`. Note that mathematically `ζ 1` is undefined, but our construction ascribes this particular value to it. -/ lemma _root_.riemannZeta_one : riemannZeta 1 = (γ - Complex.log (4 * ↑π)) / 2 := by have := (HurwitzZeta.tendsto_hurwitzZetaEven_sub_one_div_nhds_one 0).mono_left <| nhdsWit...
Mathlib/NumberTheory/Harmonic/ZetaAsymp.lean
383
389
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow, Kexing Ying -/ import Mathlib.Algebra.Algebra.Bilinear import Mathlib.LinearAlgebra.Basis.Defs import Mathlib.LinearAlgebra.BilinearForm.Basic import Mathlib.Linear...
LinearEquiv.congrRight₂ (.refl R N₁) = .refl R (BilinMap R M N₁) := rfl @[simp]
Mathlib/LinearAlgebra/BilinearForm/Hom.lean
254
256
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Ring.Associated import Mathlib.Algebra.Star.Unitary import Mathlib.RingTheory.PrincipalIdealDomain import Mathlib.Tactic.Ring import Mathlib.Al...
Mathlib/NumberTheory/Zsqrtd/Basic.lean
996
1,011
/- Copyright (c) 2020 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca -/ import Mathlib.Algebra.Polynomial.Splits import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.NumberTheory.ArithmeticFunction import Mathlib.RingTheory.Ro...
rw [(div_modByMonic_unique (cyclotomic' n K) 0 prod_monic _).1] simp only [degree_zero, zero_add] refine ⟨by rw [mul_comm], ?_⟩ rw [bot_lt_iff_ne_bot] intro h exact Monic.ne_zero prod_monic (degree_eq_bot.1 h) /-- If there is a primitive `n`-th root of unity in `K`, then `cyclotomic' n K` comes from a
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
167
174
/- Copyright (c) 2020 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.FieldTheory.Finiteness import Mathlib.LinearAlgebra.AffineSpace.Basis import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas /-! # Finite-dimensional subsp...
obtain ⟨r, hr⟩ := hv (p -ᵥ p₀) (vsub_mem_vectorSpan k hp h) use r rw [eq_vadd_iff_vsub_eq]
Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
426
428
/- Copyright (c) 2019 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn, Yury Kudryashov -/ import Mathlib.Data.Set.Lattice.Image import Mathlib.Order.Interval.Set.LinearOrder /-! # Extra lemmas about intervals This file contains lemma...
theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂) (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂ := by rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
Mathlib/Order/Interval/Set/Disjoint.lean
143
145
/- Copyright (c) 2018 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Iso import Mathlib.CategoryTheory.Functor.Category import Mathlib.CategoryTheory.Functor.FullyFaithful /-! # Whiskering Given a functor `F...
@[simp] theorem isoWhiskerLeft_twice (F : B ⥤ C) (G : C ⥤ D) {H K : D ⥤ E} (α : H ≅ K) : isoWhiskerLeft F (isoWhiskerLeft G α) = (Functor.associator _ _ _).symm ≪≫ isoWhiskerLeft (F ⋙ G) α ≪≫ Functor.associator _ _ _ := by
Mathlib/CategoryTheory/Whiskering.lean
301
304
/- Copyright (c) 2023 Joël Riou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joël Riou -/ import Mathlib.Algebra.Homology.ShortComplex.Exact import Mathlib.CategoryTheory.ComposableArrows /-! # Exact sequences A sequence of `n` composable arrows `S : ComposableArr...
/-- The isomorphism `S₁.sc _ i ≅ S₂.sc _ i` induced by an isomorphism `S₁ ≅ S₂` in `ComposableArrows C n`. -/
Mathlib/Algebra/Homology/ExactSequence.lean
164
166
/- 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.Data.Bundle import Mathlib.Data.Set.Image import Mathlib.Topology.CompactOpen import Mathlib.Topology.PartialHomeomorph import Mathlib.Topology.O...
theorem proj_symm_apply {x : B × F} (hx : x ∈ e.target) : proj (e.toPartialHomeomorph.symm x) = x.1 := e.toPretrivialization.proj_symm_apply hx theorem proj_symm_apply' {b : B} {x : F} (hx : b ∈ e.baseSet) :
Mathlib/Topology/FiberBundle/Trivialization.lean
339
343
/- 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.WSeq.Basic import Mathlib.Data.WSeq.Defs import Mathlib.Data.WSeq.Productive import Mathlib.Data.WSeq.Relation deprecated_module (since :=...
Mathlib/Data/Seq/WSeq.lean
1,529
1,540
/- 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...
(kernelSubobject g).arrow ≫ inv f := by simp [kernelSubobjectIsoComp]
Mathlib/CategoryTheory/Subobject/Limits.lean
190
191
/- Copyright (c) 2015 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Robert Y. Lewis -/ import Mathlib.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Ring.Parity import Mathlib.Tactic.Bound...
rw [pow_succ] calc _ ≤ 2 ^ n * (a ^ (n + 1) + b ^ (n + 1)) * (a + b) := mul_le_mul_of_nonneg_right (add_pow_le ha hb (n + 1)) <| add_nonneg ha hb
Mathlib/Algebra/Order/Ring/Basic.lean
208
211
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Simon Hudon -/ import Mathlib.Control.Functor.Multivariate import Mathlib.Data.PFunctor.Univariate.Basic /-! # Multivariate polynomial functors. Multivariate polynomial...
end Const
Mathlib/Data/PFunctor/Multivariate/Basic.lean
106
108
/- 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.Divisibility.Basic import Mathlib.Algeb...
apply Units.mul_left_dvd end CommMonoid
Mathlib/Algebra/Divisibility/Units.lean
110
112
/- 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...
Mathlib/Data/Num/Lemmas.lean
1,193
1,194
/- 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...
private local instance {m} [Pure m] : MonadLift Option (OptionT m) where monadLift f := .mk <| pure f
Mathlib/Tactic/Ring/Basic.lean
316
318
/- 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, Yaël Dillies -/ import Mathlib.Logic.Equiv.Set import Mathlib.Order.CompleteLattice.Lemmas import Mathlib.Order.Directed import Mathlib.Order.GaloisConnection.Basic /-...
/-- A complete distributive lattice is a complete lattice whose `⊔` and `⊓` respectively distribute over `⨅` and `⨆`. -/ class CompleteDistribLattice (α : Type*) extends Frame α, Coframe α, BiheytingAlgebra α /-- Structure containing the minimal axioms required to check that an order is a completely distributive. Do ...
Mathlib/Order/CompleteBooleanAlgebra.lean
107
120
/- Copyright (c) 2021 Roberto Alvarez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Roberto Alvarez -/ import Mathlib.AlgebraicTopology.FundamentalGroupoid.FundamentalGroup import Mathlib.GroupTheory.EckmannHilton import Mathlib.Algebra.Equiv.TransferInstance import ...
theorem fromLoop_apply (i : N) {p : Ω (Ω^ { j // j ≠ i } X x) const} {t : I^N} : fromLoop i p t = p (t i) (Cube.splitAt i t).snd := rfl
Mathlib/Topology/Homotopy/HomotopyGroup.lean
242
245
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andreas Swerdlow -/ import Mathlib.LinearAlgebra.Basis.Basic import Mathlib.LinearAlgebra.BilinearMap import Mathlib.LinearAlgebra.LinearIndependent.Lemmas /-! # Sesquilinear maps ...
simpa only [← two_mul] using this end OrthogonalMap
Mathlib/LinearAlgebra/SesquilinearForm.lean
494
496
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Vladimir Goryachev, Kyle Miller, Kim Morrison, Eric Rodriguez -/ import Mathlib.Algebra.Group.Nat.Range import Mathlib.Data.Set.Finite.Basic /-! # Counting on ℕ Thi...
theorem count_le_card (hp : (setOf p).Finite) (n : ℕ) : count p n ≤ #hp.toFinset := by rw [count_eq_card_filter_range] exact Finset.card_mono fun x hx ↦ hp.mem_toFinset.2 (mem_filter.1 hx).2
Mathlib/Data/Nat/Count.lean
120
122
/- Copyright (c) 2022 Julian Kuelshammer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Julian Kuelshammer -/ import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Data.Nat.Choose.Central import Mathlib.Tactic.Field...
Mathlib/Combinatorics/Enumerative/Catalan.lean
202
204
/- Copyright (c) 2020 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp -/ import Mathlib.Algebra.Algebra.Spectrum.Basic import Mathlib.Algebra.Module.LinearMap.Basic import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas import Mathl...
`(f - μ • id) ^ k` for some `k`. -/ lemma genEigenspace_top_eq_maxUnifEigenspaceIndex [IsNoetherian R M] (f : End R M) (μ : R) : genEigenspace f μ ⊤ = f.genEigenspace μ (maxUnifEigenspaceIndex f μ) := by have := WellFoundedGT.iSup_eq_monotonicSequenceLimit <| (f.genEigenspace μ).comp <| WithTop.coeOrderHom.to...
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
265
269
/- 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...
section
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
710
711
/- 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.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp /-! # Additive operations on derivative...
theorem HasStrictFDerivAt.sub (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x) : HasStrictFDerivAt (fun x => f x - g x) (f' - g') x := by
Mathlib/Analysis/Calculus/FDeriv/Add.lean
464
465
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kenny Lau -/ import Mathlib.Algebra.Group.Units.Basic import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.RingTheory.MvPowerSeries.NoZeroDivisors import Mathl...
φ⁻¹ * φ = 1 := by rw [mul_comm, φ.mul_inv_cancel h] protected theorem eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : MvPowerSeries σ k} (h : constantCoeff σ k φ₃ ≠ 0) : φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂ :=
Mathlib/RingTheory/MvPowerSeries/Inverse.lean
247
250
/- Copyright (c) 2018 Mario Carneiro, Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Buzzard -/ import Mathlib.Algebra.Ring.Idempotent import Mathlib.Order.Basic import Mathlib.RingTheory.Finiteness.Nakayama /-! ## Lemmas on idempo...
constructor · intro e obtain ⟨r, hr, hr'⟩ := Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h (by rw [smul_eq_mul] exact e.ge) simp_rw [smul_eq_mul] at hr' refine ⟨r, hr' r hr, antisymm ?_ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩ intro x hx ...
Mathlib/RingTheory/Ideal/IdempotentFG.lean
20
35
/- 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...
/-- Auxiliary tactic for showing that `mapFun` respects the ring operations. -/ -- porting note: a very crude port. macro "map_fun_tac" : tactic => `(tactic| (
Mathlib/RingTheory/WittVector/Basic.lean
79
81
/- 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 /-! # zip & unzip This file provides results about `List.zipWith`, `List.zip` and `List.unzip` (definitions are in core ...
use tl', tail simp_all end List
Mathlib/Data/List/Zip.lean
137
140
/- 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
739
749
/- 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.CategoryTheory.Comma.Over.Pullback import Mathlib.CategoryTheory.Limits.Shapes.KernelPair import Mathlib.CategoryTheory.Limits.Shapes.Pullback.CommSq import ...
@[reassoc (attr := simp)] theorem pullbackDiagonalMapIdIso_inv_fst : (pullbackDiagonalMapIdIso f g i).inv ≫ pullback.fst _ _ = pullback.fst _ _ ≫ f := by rw [Iso.inv_comp_eq, ← Category.comp_id (pullback.fst _ _), ← diagonal_fst i,
Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean
259
262
/- Copyright (c) 2018 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Julian Kuelshammer -/ import Mathlib.Algebra.CharP.Defs import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Algebra.Group.Pointwise.Set.Finite import Mathlib.Alge...
theorem exists_pow_eq_self_of_coprime (h : n.Coprime (orderOf x)) : ∃ m : ℕ, (x ^ n) ^ m = x := by by_cases h0 : orderOf x = 0
Mathlib/GroupTheory/OrderOfElement.lean
279
280
/- 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.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.Analysis.Convex.Deriv /-! # The function `x ↦ ...
@[simp] lemma deriv_mul_log {x : ℝ} (hx : x ≠ 0) : deriv (fun x ↦ x * log x) x = log x + 1 := by rw [deriv_mul differentiableAt_id' (differentiableAt_log hx)] simp only [deriv_id'', one_mul, deriv_log', ne_eq, add_right_inj]
Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
50
53
/- 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_one : (1 : R[X]).smeval x = 1 • x ^ 0 := by rw [← C_1, smeval_C] simp only [Nat.cast_one, one_smul]
Mathlib/Algebra/Polynomial/Smeval.lean
83
85
/- Copyright (c) 2019 Calle Sönne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle Sönne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
rw [coe_nsmul, two_nsmul_eq_iff] -- Porting note: `congr` didn't simplify the goal of iff of `Or`s convert Iff.rfl rw [add_comm, ← coe_add, ← sub_eq_zero, ← coe_sub, neg_div, ← neg_sub, sub_neg_eq_add, add_assoc, add_halves, ← two_mul, coe_neg, coe_two_pi, neg_zero]
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
186
191
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta -/ import Mathlib.CategoryTheory.Adjunction.FullyFaithful import Mathlib.CategoryTheory.Functor.EpiMono import Mathlib.CategoryTheory.HomCongr /-! # Reflective functors Ba...
Mathlib/CategoryTheory/Adjunction/Reflective.lean
263
265