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) 2023 Frédéric Dupuis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Frédéric Dupuis -/ import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Algebra.Order.ToIntervalMod import Mathli...
lemma GrowsPolynomially.of_isTheta {f g : ℝ → ℝ} (hg : GrowsPolynomially g) (hf : f =Θ[atTop] g) (hf' : ∀ᶠ x in atTop, 0 ≤ f x) : GrowsPolynomially f := by intro b hb have hb_pos := hb.1 have hf_lb := isBigO_iff''.mp hf.isBigO_symm have hf_ub := isBigO_iff'.mp hf.isBigO obtain ⟨c₁, hc₁_pos : 0 < c₁, hf_l...
Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean
662
708
/- 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.Nat.ModEq import Mathlib.Data.Nat.Prime.Basic import Mathlib.NumberTheory.Zsqrtd.Basic /-! # Pell's equation and Matiyasevic's theorem This file...
Mathlib/NumberTheory/PellMatiyasevic.lean
220
220
/- Copyright (c) 2020 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov -/ import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Normed.Group.Basic /-! # Indicator function and (...
variable {α E : Type*} [SeminormedAddGroup E] {s t : Set α} (f : α → E) (a : α)
Mathlib/Analysis/NormedSpace/IndicatorFunction.lean
44
46
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Algebra.ZMod import Mathlib.Data.Nat.Multiplicity import Mathlib.FieldTheory.Perfect import Mathlib.RingTheory.WittVector.Basic import Mathlib....
/-- If `R` has characteristic `p`, then there is a ring endomorphism that raises `r : R` to the power `p`.
Mathlib/RingTheory/WittVector/Frobenius.lean
218
220
/- Copyright (c) 2020 David Wärn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Wärn -/ import Mathlib.CategoryTheory.Elements import Mathlib.CategoryTheory.IsConnected import Mathlib.CategoryTheory.SingleObj import Mathlib.GroupTheory.GroupAction.Quotient impor...
right_inv := back_coe
Mathlib/CategoryTheory/Action.lean
89
89
/- Copyright (c) 2020 Ashvni Narayanan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ashvni Narayanan -/ import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Ring.Subring.Defs import Mathlib.Algebra.Ring.Subsemiring.Bas...
Mathlib/Algebra/Ring/Subring/Basic.lean
1,127
1,129
/- 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...
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
217
217
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Yury Kudryashov, Neil Strickland -/ import Mathlib.Algebra.Ring.InjSurj import Mathlib.Algebra.Group.Units.Hom import Mathlib.Algebra...
@[field_simps]
Mathlib/Algebra/Ring/Units.lean
67
68
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Initial...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
2,201
2,204
/- 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.Algebra.Homology.HomotopyCategory.Shift import Mathlib.Algebra.Homology.TotalComplex /-! # Behaviour of the total complex with respect to shifts There are two ...
by_cases h : (up ℤ).Rel n₀ n₁ · apply total.hom_ext intro p q hpq dsimp at h hpq dsimp [totalShift₁XIso] rw [ι_D₂_assoc, Linear.comp_units_smul, ι_totalDesc_assoc, ι_D₂, ((shiftFunctor₁ C x).obj K).d₂_eq _ _ rfl _ (by dsimp; omega), K.d₂_eq _ _ rfl _ (by dsimp; omega), smul_smul, L...
Mathlib/Algebra/Homology/TotalComplexShift.lean
161
181
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Yaël Dillies -/ import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap /-! # Integral average of a function In this file we define `MeasureTheory.average...
theorem setLAverage_one (hs₀ : μ s ≠ 0) (hs : μ s ≠ ∞) : ⨍⁻ _x in s, (1 : ℝ≥0∞) ∂μ = 1 := setLAverage_const hs₀ hs _
Mathlib/MeasureTheory/Integral/Average.lean
227
229
/- 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.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Dynamics.PeriodicPts.Defs import Mathlib.GroupTheory.G...
then `fixedBy α m = Set.univ` implies that `m = 1`."] theorem fixedBy_eq_univ_iff_eq_one {m : M} : fixedBy α m = Set.univ ↔ m = 1 := by rw [← (smul_left_injective' (M := M) (α := α)).eq_iff, Set.eq_univ_iff_forall]
Mathlib/GroupTheory/GroupAction/FixedPoints.lean
238
240
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Sean Leather -/ import Batteries.Data.List.Perm import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Nodup import Mathlib.Data.List.Lookmap import Mathlib.Data.Si...
Mathlib/Data/List/Sigma.lean
767
771
/- 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,253
1,258
/- Copyright (c) 2020 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.MvPolynomial.Expand import Mathlib.FieldTheory.Finite.Basic import Mathlib.LinearAlgebra.Dual.Lemmas import Mathlib.LinearAlgebra.FiniteDimensi...
exact IsNoetherian.iff_fg.1 (IsNoetherian.iff_rank_lt_aleph0.mpr <| by simpa only [rank_R] using Cardinal.nat_lt_aleph0 (Fintype.card (σ → K))) open Classical in theorem finrank_R [Fintype σ] : Module.finrank K (R σ K) = Fintype.card (σ → K) := Module.finrank_eq_of_rank_eq (rank_R σ K) theorem r...
Mathlib/FieldTheory/Finite/Polynomial.lean
204
220
/- Copyright (c) 2024 Antoine Chambert-Loir. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Antoine Chambert-Loir -/ import Mathlib.Algebra.Pointwise.Stabilizer import Mathlib.Data.Setoid.Partition import Mathlib.GroupTheory.GroupAction.Pointwise import Mathlib.GroupTh...
simp_rw [isBlock_iff_disjoint_smul_of_ne, ← not_disjoint_iff_nonempty_inter, not_imp_comm] @[to_additive] lemma isBlock_iff_smul_eq_or_disjoint : IsBlock G B ↔ ∀ g : G, g • B = B ∨ Disjoint (g • B) B := isBlock_iff_disjoint_smul_of_ne.trans <| forall_congr' fun _ ↦ or_iff_not_imp_left.symm @[to_additive] lemm...
Mathlib/GroupTheory/GroupAction/Blocks.lean
264
277
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Kim Morrison -/ import Mathlib.CategoryTheory.Subobject.MonoOver import Mathlib.CategoryTheory.Skeletal import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib....
intro a apply Quotient.sound apply ThinSkeleton.equiv_of_both_ways · refine MonoOver.homMk (pullback.lift (pullback.fst _ _) _ ?_) (pullback.lift_snd _ _ _) change _ ≫ a.arrow ≫ h = (pullback.snd _ _ ≫ g) ≫ _ rw [assoc, ← comm, pullback.condition_assoc] · refine MonoOver.homMk (pullback.lift (pullback...
Mathlib/CategoryTheory/Subobject/Basic.lean
644
662
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash, Deepro Choudhury, Scott Carnahan -/ import Mathlib.LinearAlgebra.PerfectPairing.Basic import Mathlib.LinearAlgebra.Reflection /-! # Root data and root systems This file con...
simp @[simp] lemma pairing_same : P.pairing i i = 2 := P.root_coroot_two i
Mathlib/LinearAlgebra/RootSystem/Defs.lean
211
214
/- Copyright (c) 2024 Josha Dekker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Josha Dekker -/ import Mathlib.Probability.Notation import Mathlib.Probability.CDF import Mathlib.Analysis.SpecialFunctions.Gamma.Basic /-! # Gamma distributions over ℝ Define the gamm...
lemma isProbabilityMeasureGamma {a r : ℝ} (ha : 0 < a) (hr : 0 < r) : IsProbabilityMeasure (gammaMeasure a r) where
Mathlib/Probability/Distributions/Gamma.lean
128
130
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mitchell Lee -/ import Mathlib.Algebra.BigOperators.Group.Finset.Indicator import Mathlib.Data.Fintype.BigOperators import Mathlib.Topology.Algebra.InfiniteSum.Defs imp...
theorem Function.Injective.hasProd_range_iff {g : γ → β} (hg : Injective g) : HasProd (fun x : Set.range g ↦ f x) a ↔ HasProd (f ∘ g) a := (Equiv.ofInjective g hg).hasProd_iff.symm
Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
153
156
/- 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.RingTheory.WittVector.InitTail /-! # Truncated Witt vectors The ring of truncated Witt vectors (of length `n`) is a quotient of the...
(truncateFun_add n) (truncateFun_mul n) (truncateFun_neg n) (truncateFun_sub n) (truncateFun_nsmul n) (truncateFun_zsmul n) (truncateFun_pow n) (truncateFun_natCast n) (truncateFun_intCast n)
Mathlib/RingTheory/WittVector/Truncated.lean
268
270
/- 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.Algebra.Field.Subfield.Defs import Mathlib.Algebra.Order.Group.Pointwise.Interval import Mathlib.Analysis.Normed.Ring.Basic /-! # Norm...
Mathlib/Analysis/Normed/Field/Basic.lean
975
977
/- 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...
Mathlib/Order/Lattice.lean
219
219
/- 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, Jeremy Avigad -/ import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Notation.Pi import Mathlib.Data.Set.Lattice import Mathlib.Order.Filter.Defs /-! # Theory of...
Mathlib/Order/Filter/Basic.lean
2,143
2,144
/- 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, Joachim Breitner -/ import Mathlib.Algebra.Group.Action.End import Mathlib.Algebra.Group.Action.Pointwise.Set.Basic import Mathlib.Algebra.Group.Submonoid.Membership import Mat...
theorem mclosure_iUnion_range_of : Submonoid.closure (⋃ i, Set.range (of : M i →* CoprodI M)) = ⊤ := by
Mathlib/GroupTheory/CoprodI.lean
199
200
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Bhavik Mehta, Yaël Dillies -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.Convex.Hull import Mathlib.Analysis.Normed.Module.Basic import Mathlib.Topology.Bornology.A...
a • s = b • (b⁻¹ • a) • s := by rw [smul_assoc, smul_inv_smul₀ hb] _ ⊆ b • s := smul_set_mono <| hs _ <| by rw [norm_smul, norm_inv, ← div_eq_inv_mul] exact div_le_one_of_le₀ h (norm_nonneg _) theorem Balanced.smul_mem_mono [SMulCommClass 𝕝 𝕜 E] (hs : Balanced 𝕝 s) {b : 𝕝} (ha : a •...
Mathlib/Analysis/LocallyConvex/Basic.lean
197
205
/- Copyright (c) 2020 Markus Himmel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ import Mathlib.CategoryTheory.Abelian.Exact import Mathlib.CategoryTheory.Comma.Over.Basic import Mathlib.Algebra.Category.ModuleCat.EpiMono /-! # Pseudoelements in ab...
rw [Category.id_comp, ← pullback.condition, app_hom, Over.coe_hom]⟩⟩
Mathlib/CategoryTheory/Abelian/Pseudoelements.lean
297
298
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Sébastien Gouëzel, Rémy Degenne, David Loeffler -/ import Mathlib.Analysis.SpecialFunctions.Pow.Complex import Qq /-! # P...
theorem one_le_rpow {x z : ℝ} (hx : 1 ≤ x) (hz : 0 ≤ z) : 1 ≤ x ^ z := by
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
670
671
/- 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.Set.Piecewise import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Core import Mathlib.Tactic.Attr.Core /-! # Partial equivalences This f...
/-- `Function.const` as a `PartialEquiv`. It consists of two constant maps in opposite directions. -/ @[simps] def single (a : α) (b : β) : PartialEquiv α β where toFun := Function.const α b invFun := Function.const β a source := {a} target := {b} map_source' _ _ := rfl map_target' _ _ := rfl left_inv' a'...
Mathlib/Logic/Equiv/PartialEquiv.lean
557
569
/- Copyright (c) 2020 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Combinatorics.SimpleGraph.Dart import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Data.ZMod.Basic...
theorem Dart.edge_fiber [DecidableEq V] (d : G.Dart) : ({d' : G.Dart | d'.edge = d.edge} : Finset _) = {d, d.symm} := Finset.ext fun d' => by simpa using dart_edge_eq_iff d' d
Mathlib/Combinatorics/SimpleGraph/DegreeSum.lean
73
76
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Eric Wieser -/ import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.Composition import Mathlib.Data.Matrix.Kronecker import Mathlib.RingTheory.TensorProduct.Basic ...
variable [DecidableEq n] [Fintype n] /-- The function `(A ⊗[R] Matrix n n R) →ₐ[R] Matrix n n A`, as an algebra homomorphism. -/ def toFunAlgHom : A ⊗[R] Matrix n n R →ₐ[R] Matrix n n A := algHomOfLinearMapTensorProduct (toFunLinear n R A) (by intros simp_rw [toFunLinear, lift.tmul, toFunBilinear_app...
Mathlib/RingTheory/MatrixAlgebra.lean
113
121
/- Copyright (c) 2019 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.InnerProductSpace.Sy...
end Dense namespace Submodule variable {K} /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/ theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [K.HasOrthogonalProjection] {v : E} (hv : v ∈ K) : Kᗮ.reflection v = -v :=
Mathlib/Analysis/InnerProductSpace/Projection.lean
949
957
/- Copyright (c) 2021 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Measure.AbsolutelyContinuous /-! # Vitali families On a metric space `X` with a measure `μ`, consider for each `x : X` a family o...
Mathlib/MeasureTheory/Covering/VitaliFamily.lean
278
283
/- Copyright (c) 2021 Noam Atar. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Noam Atar -/ import Mathlib.Order.Ideal import Mathlib.Order.PFilter /-! # Prime ideals ## Main definitions Throughout this file, `P` is at least a preorder, but some sections require mo...
IF.isCompl_I_F.sup_eq_top theorem F_union_I : (IF.F : Set P) ∪ IF.I = Set.univ := IF.isCompl_I_F.symm.sup_eq_top
Mathlib/Order/PrimeIdeal.lean
68
71
/- Copyright (c) 2024 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémy Degenne -/ import Mathlib.Probability.Kernel.Composition.MapComap import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Process.PartitionFiltration /-! # Ker...
lemma measurable_densityProcess_aux (κ : Kernel α (γ × β)) (ν : Kernel α γ) (n : ℕ) {s : Set β} (hs : MeasurableSet s) : Measurable (fun (p : α × γ) ↦ κ p.1 (countablePartitionSet n p.2 ×ˢ s) / ν p.1 (countablePartitionSet n p.2)) := by refine Measurable.mono (measurable_densityProcess_countableFiltrati...
Mathlib/Probability/Kernel/Disintegration/Density.lean
122
127
/- 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 -/ import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Defs import Mathlib.Analysis.NormedSpac...
replace := log_le_sub_one_of_pos this replace : log (1 / x) < 1 / x := by linarith rw [log_div one_ne_zero h1.ne', log_one, zero_sub, lt_div_iff₀ h1] at this have aux : 0 ≤ -log x * x := by
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
309
312
/- 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.Arrow import Mathlib.Order.CompleteBooleanAlgebra /-! # Properties of morphisms We provide the basic framework for talking about prope...
P.isoClosure.map F = P.map F := by apply le_antisymm · rw [map_le_iff] intro X Y f ⟨X', Y', f', hf', ⟨e⟩⟩ exact ⟨_, _, f', hf', ⟨F.mapArrow.mapIso e⟩⟩ · exact monotone_map _ (le_isoClosure P)
Mathlib/CategoryTheory/MorphismProperty/Basic.lean
338
343
/- 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.LocalizerMorphism import Mathlib.CategoryTheory.HomCongr /-! # Bijections between morphisms in two localized categories Given two ...
@[simp] lemma homEquiv_map (f : X ⟶ Y) : homEquiv W L₁ L₂ (L₁.map f) = L₂.map f := by simp [homEquiv_apply]
Mathlib/CategoryTheory/Localization/HomEquiv.lean
151
153
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Johannes Hölzl, Yury Kudryashov, Patrick Massot -/ import Mathlib.Algebra.GeomSum import Mathlib.Order.Filter.AtTopBot.Archimedean import Mathlib.Order.Iterate impor...
theorem tsum_geometric_two : (∑' n : ℕ, ((1 : ℝ) / 2) ^ n) = 2 := hasSum_geometric_two.tsum_eq theorem sum_geometric_two_le (n : ℕ) : (∑ i ∈ range n, (1 / (2 : ℝ)) ^ i) ≤ 2 := by have : ∀ i, 0 ≤ (1 / (2 : ℝ)) ^ i := by intro i apply pow_nonneg norm_num convert summable_geometric_two.sum_le_tsum (ran...
Mathlib/Analysis/SpecificLimits/Basic.lean
317
326
/- 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, Yaël Dillies, Yuyang Zhao -/ import Mathlib.Algebra.Order.Ring.Unbundled.Basic import Mathlib.Algebra.CharZero.Defs import Mathlib.Alge...
Mathlib/Algebra/Order/Ring/Defs.lean
889
891
/- Copyright (c) 2024 Violeta Hernández Palacios. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios -/ import Mathlib.SetTheory.Cardinal.Arithmetic import Mathlib.SetTheory.Ordinal.Principal /-! # Ordinal arithmetic with cardinals This file co...
Mathlib/SetTheory/Cardinal/Ordinal.lean
204
207
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Emilie Uthaiwat, Oliver Nash -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Div import Mathlib.Algebra.Polynomial.Identities import Mathlib.RingTheory.I...
@[simp] lemma isNilpotent_monomial_iff {n : ℕ} : IsNilpotent (monomial (R := R) n r) ↔ IsNilpotent r := exists_congr fun k ↦ by simp
Mathlib/RingTheory/Polynomial/Nilpotent.lean
45
47
/- Copyright (c) 2024 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Riccardo Brasca, Pietro Monticone -/ import Mathlib.NumberTheory.Cyclotomic.Embeddings import Mathlib.NumberTheory.Cyclotomic.Rat import Mathlib.NumberTheory.NumberField.Units.Dirich...
· exact dvd_mul_of_dvd_left (dvd_mul_of_dvd_right h _) _ · refine dvd_mul_of_dvd_right ?_ _ rw [show x - (η + 1) = x + 1 - (η - 1 + 3) by ring] exact dvd_sub h <| dvd_add dvd_rfl hζ.toInteger_sub_one_dvd_prime' /-- If `λ` divides `x - 1`, then `λ ^ 4` divides `x ^ 3 - 1`. -/ lemma lambda_pow_four_dvd_cube_...
Mathlib/NumberTheory/Cyclotomic/Three.lean
168
177
/- Copyright (c) 2024 Jz Pan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jz Pan -/ import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.LinearAlgebra.Dimension.Constructions /-! # Some results on free modules over rings satisfying strong rank condition T...
haveI : Finite s := by obtain ⟨t, ht⟩ := ‹Module.Finite K V› exact basis_finite_of_finite_spans t.finite_toSet ht hs
Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
223
225
/- 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
547
551
/- Copyright (c) 2023 Iván Renison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Iván Renison -/ import Mathlib.Combinatorics.SimpleGraph.Circulant import Mathlib.Combinatorics.SimpleGraph.Coloring import Mathlib.Combinatorics.SimpleGraph.Hasse import Mathlib.Data.Fi...
/-- Embedding of `pathGraph 2` into the first two elements of `pathGraph n` for `2 ≤ n` -/ def pathGraph_two_embedding (n : ℕ) (h : 2 ≤ n) : pathGraph 2 ↪g pathGraph n where toFun v := ⟨v, trans v.2 h⟩ inj' := by rintro v w rw [Fin.mk.injEq]
Mathlib/Combinatorics/SimpleGraph/ConcreteColorings.lean
41
47
/- 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...
end Lattice
Mathlib/Data/Finsupp/Interval.lean
113
114
/- 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,741
1,744
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kim Morrison -/ import Mathlib.Algebra.Category.Ring.Colimits import Mathlib.Algebra.Category.Ring.Instances import Mathlib.Algebra.Category.Ring.Limits import Mathlib.Al...
Mathlib/AlgebraicGeometry/StructureSheaf.lean
1,147
1,156
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura -/ import Mathlib.Data.Set.Operations import Mathlib.Order.Basic import Mathlib.Order.BooleanAlgebra import Mathlib.Tactic.Tauto import Mathlib.Tactic.B...
Mathlib/Data/Set/Basic.lean
1,775
1,775
/- Copyright (c) 2020 Nicolò Cavalleri. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Nicolò Cavalleri, Sébastien Gouëzel, Heather Macbeth, Patrick Massot, Floris van Doorn -/ import Mathlib.Analysis.Normed.Operator.BoundedLinearMaps import Mathlib.Topology.FiberBundl...
continuous_toFun := by by_cases hb : b ∈ e.baseSet ∩ e'.baseSet · rw [dif_pos hb]
Mathlib/Topology/VectorBundle/Basic.lean
245
247
/- 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, Kim Morrison -/ import Mathlib.Data.List.Chain /-! # Ranges of naturals as lists This file shows basic results about `List.iota`, `List.range`, `List.range...
Mathlib/Data/List/Range.lean
147
151
/- Copyright (c) 2020 Kenji Nakagawa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenji Nakagawa, Anne Baanen, Filippo A. E. Nuccio -/ import Mathlib.Algebra.Algebra.Subalgebra.Pointwise import Mathlib.Algebra.Polynomial.FieldDivision import Mathlib.RingTheory.Spect...
IsCoprime I J := by rw [isCoprime_iff_sup_eq] by_contra hIJ obtain ⟨P, hP, hIJ⟩ := Ideal.exists_le_maximal _ hIJ exact h P (le_trans le_sup_left hIJ) (le_trans le_sup_right hIJ) hP.isPrime section DedekindDomain
Mathlib/RingTheory/DedekindDomain/Ideal.lean
1,149
1,156
/- Copyright (c) 2014 Parikshit Khanna. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Parikshit Khanna, Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Mario Carneiro -/ import Mathlib.Control.Basic import Mathlib.Data.Nat.Basic import Mathlib.Data.Option.Basic im...
Mathlib/Data/List/Basic.lean
1,381
1,382
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Jireh Loreaux -/ import Mathlib.Algebra.Group.Commute.Units import Mathlib.Algebra.Group.Invertible.Basic import Mathlib.Logic.Basic import Mathlib.Data.Set.Basic /-! # Cent...
_ = a * ((b * z₁) * z₂) := by rw [hz₂.right_assoc] _ = a * (b * (z₁ * z₂)) := by rw [hz₁.mid_assoc] @[to_additive addCenter_subset_addCentralizer]
Mathlib/Algebra/Group/Center.lean
131
134
/- 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.BumpFunction.FiniteDimension import Mathlib.Geometry.Manifold.ContMDiff.Atlas import Mathlib.Geometry.Manifold.ContMDiff.NormedSpac...
theorem support_mem_nhds : support f ∈ 𝓝 c :=
Mathlib/Geometry/Manifold/BumpFunction.lean
170
171
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen -/ import Mathlib.LinearAlgebra.Basis.Submodule import Mathlib.LinearAlgebra.Matrix.Reindex import Mathlib.LinearAlgebra.Matrix...
Matrix.toLin v e (e.toMatrix v) = LinearMap.id := v.ext fun i => by cases nonempty_fintype ι; rw [toLin_self, id_apply, e.sum_toMatrix_smul_self] /-- From a basis `e : ι → M`, build a linear equivalence between families of vectors `v : ι → M`, and matrices, making the matrix whose columns are the vectors `v i` w...
Mathlib/LinearAlgebra/Matrix/Basis.lean
124
128
/- Copyright (c) 2022 Apurva Nakade. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Apurva Nakade -/ import Mathlib.Analysis.Convex.Cone.Closure import Mathlib.Analysis.InnerProductSpace.Adjoint /-! # Proper cones We define a *proper cone* as a closed, pointed cone. ...
let C := PointedCone.toConvexCone (𝕜 := ℝ) (E := F) (K.map f) obtain ⟨y, hxy, hyb⟩ := @ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem _ _ _ _ C (K.map f).nonempty (K.map f).isClosed b h -- the rest of the proof is a straightforward algebraic manipulation refin...
Mathlib/Analysis/Convex/Cone/Proper.lean
243
283
/- 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.Data.Set.Countable import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Tactic.FunProp.Attr import Mathlib.Tactic.Mea...
exact .iUnion (Bool.forall_bool.2 ⟨h₂, h₁⟩) @[simp, measurability]
Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
162
164
/- 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.Lattice.Prod import Mathlib.Data.Finite.Prod import Mathlib.Data.Set.Lattice.Image /-! # N-ary images of finsets This file defines `Finset.im...
theorem image₂_inter_singleton [DecidableEq α] (s₁ s₂ : Finset α) (hf : Injective fun a => f a b) : image₂ f (s₁ ∩ s₂) {b} = image₂ f s₁ {b} ∩ image₂ f s₂ {b} := by simp_rw [image₂_singleton_right, image_inter _ _ hf]
Mathlib/Data/Finset/NAry.lean
215
219
/- Copyright (c) 2022 Hanting Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Hanting Zhang -/ import Mathlib.Topology.MetricSpace.Antilipschitz import Mathlib.Topology.MetricSpace.Isometry import Mathlib.Topology.MetricSpace.Lipschitz import Mathlib.Data.FunLike...
See also `Dilation.ratio_comp'` for a version that works for more general spaces. -/ @[simp] theorem ratio_comp [MetricSpace α] [Nontrivial α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ] {g : β →ᵈ γ} {f : α →ᵈ β} : ratio (g.comp f) = ratio g * ratio f :=
Mathlib/Topology/MetricSpace/Dilation.lean
440
444
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Logic.Encodable.Pi import Mathlib.Logic.Function.Iterate /-! # The primitive recursive functions The primitive ...
Mathlib/Computability/Primrec.lean
1,571
1,574
/- Copyright (c) 2022 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Analysis.Calculus.Deriv.Basic /-! # Support of the derivative of a function In this file we prove that the (topological) support of a function in...
rw [← not_imp_not] intro h2x rw [not_mem_tsupport_iff_eventuallyEq] at h2x exact nmem_support.mpr (h2x.deriv_eq.trans (deriv_const x 0)) protected theorem HasCompactSupport.deriv (hf : HasCompactSupport f) :
Mathlib/Analysis/Calculus/Deriv/Support.lean
36
41
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison, Joël Riou -/ import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.Shift.Basic import Mathlib.Data.Set.Subsingleton import Mathlib.Algebra.Grou...
section
Mathlib/CategoryTheory/GradedObject.lean
437
438
/- Copyright (c) 2020 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Grading import Mathlib.Algebra.Module.Opposite /-! # Conjugations This file defines the grade reversal and grade involution f...
TODO: show that these are `iff`s when `Invertible (2 : R)`. -/
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
295
298
/- 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...
(x y : α) :
Mathlib/Order/Lattice.lean
242
242
/- 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.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion /-! # Completion of normed group homs Given two (semi) normed groups `G` an...
‖f g‖ ≤ ‖f‖ * ‖hatg - g‖ := by simpa [map_sub, hatg_in] using f.completion.le_opNorm (hatg - g) _ ≤ ‖f‖ * δ := by gcongr calc ‖hatg - ↑(g - g')‖ = ‖hatg - g + g'‖ := by rw [Completion.coe_sub, sub_add]
Mathlib/Analysis/Normed/Group/HomCompletion.lean
165
168
/- Copyright (c) 2019 Johannes Hölzl, Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Zhouhang Zhou -/ import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.MeasureTheory.Function.StronglyMeasurable.AEStronglyMeasurable import M...
rwa [← f.mk_coeFn, ← g.mk_coeFn, mk_eq_mk]
Mathlib/MeasureTheory/Function/AEEqFun.lean
170
171
/- 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...
(Ideal.span {a}).toAddSubgroup = AddSubgroup.zmultiples a := Submodule.span_singleton_toAddSubgroup_eq_zmultiples _
Mathlib/RingTheory/Ideal/Operations.lean
50
52
/- Copyright (c) 2022 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Constructions.BinaryProducts /-! # Limits involving zero objects Binary p...
Mathlib/CategoryTheory/Limits/Constructions/ZeroObjects.lean
226
227
/- 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 dimH_of_hausdorffMeasure_ne_zero_ne_top {d : ℝ≥0} {s : Set X} (h : μH[d] s ≠ 0) (h' : μH[d] s ≠ ∞) : dimH s = d := le_antisymm (dimH_le_of_hausdorffMeasure_ne_top h') (le_dimH_of_hausdorffMeasure_ne_zero h) end Measurable
Mathlib/Topology/MetricSpace/HausdorffDimension.lean
139
144
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.Algebra.BigOperators.Group.Finset.Powerset import Mathlib.Algebra.NoZeroSMulDivisors.Pi import Mathlib.Data.Finset.Sort import Mathlib.Data.Finty...
Mathlib/LinearAlgebra/Multilinear/Basic.lean
1,847
1,853
/- 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.Lattice.Prod import Mathlib.Data.Finite.Prod import Mathlib.Data.Set.Lattice.Image /-! # N-ary images of finsets This file defines `Finset.im...
`Finset.image₂ f`. -/ theorem image₂_left_identity {f : α → γ → γ} {a : α} (h : ∀ b, f a b = b) (t : Finset γ) : image₂ f {a} t = t := coe_injective <| by rw [coe_image₂, coe_singleton, Set.image2_left_identity h] /-- If `b` is a right identity for `f : α → β → α`, then `{b}` is a right identity for `Finset.imag...
Mathlib/Data/Finset/NAry.lean
427
433
/- Copyright (c) 2021 Gabriel Moise. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Moise, Yaël Dillies, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Data.Finset.Sym import Mathlib.Data.Matrix.Mul /-! # Incidence matrix of a si...
theorem sum_incMatrix_apply_of_not_mem_edgeSet [Fintype α] (h : e ∉ G.edgeSet) : ∑ a, G.incMatrix R a e = 0 := sum_eq_zero fun _ _ => G.incMatrix_of_not_mem_incidenceSet fun he => h he.1 theorem incMatrix_transpose_mul_diag [Fintype α] [Decidable (e ∈ G.edgeSet)] :
Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean
126
131
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Patrick Massot, Eric Wieser, Yaël Dillies -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.LinearAlgebra.Basis.VectorSpace /-! # Basic facts about real ...
calc dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖ := by simp_rw [dist_eq_norm', ← norm_smul, sub_smul, one_smul, smul_sub, ← sub_sub, ← sub_add, sub_right_comm] _ = (1 - r) * dist y x := by rw [Real.norm_eq_abs, abs_eq_self.mpr (sub_nonneg.mpr h.2), dist_eq_norm'] _ ≤ (1 - 0) * dis...
Mathlib/Analysis/NormedSpace/Real.lean
50
59
/- 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.Field.IsField import Mathlib.Algebra.Polynomial.Inductions import Mathlib.Algebra.Polynomial.Monic im...
theorem rootMultiplicity_eq_nat_find_of_nonzero [DecidableEq R] {p : R[X]} (p0 : p ≠ 0) {a : R} : letI : DecidablePred fun n : ℕ => ¬(X - C a) ^ (n + 1) ∣ p := fun n => have := decidableDvdMonic p ((monic_X_sub_C a).pow (n + 1)) inferInstanceAs (Decidable ¬_) rootMultiplicity a p = Nat.find (finiteM...
Mathlib/Algebra/Polynomial/Div.lean
511
515
/- Copyright (c) 2022 Riccardo Brasca. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Riccardo Brasca, Eric Rodriguez -/ import Mathlib.Data.PNat.Prime import Mathlib.NumberTheory.Cyclotomic.Basic import Mathlib.RingTheory.Adjoin.PowerBasis import Mathlib...
rw [Nat.pow_div (le_succ k) zero_lt_two, Nat.succ_sub (le_refl k), Nat.sub_self, pow_one] at this have H : (-1 : L) - (1 : L) = algebraMap K L (-2) := by simp only [map_neg, map_ofNat] ring
Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
484
487
/- 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...
/-- If two cyclic permutations agree on all terms in their intersection, and that intersection is not empty, then the two cyclic permutations must be equal. -/ theorem IsCycle.eq_on_support_inter_nonempty_congr (hf : IsCycle f) (hg : IsCycle g) (h : ∀ x ∈ f.support ∩ g.support, f x = g x) (hx : f x = g x) (hx'...
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
499
510
/- 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...
Subobject.eq_of_comm (imageSubobjectIso _ ≪≫ imageZero ≪≫ Subobject.botCoeIsoZero.symm) (by simp)
Mathlib/CategoryTheory/Subobject/Limits.lean
328
329
/- Copyright (c) 2018 Michael Jendrusch. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Jendrusch, Kim Morrison, Bhavik Mehta, Jakob von Raumer -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Functor.Trifunctor import Mathlib.CategoryTheo...
aesop_cat) : MonoidalCategory C where tensorHom_def := by intros; simp [← id_tensorHom, ← tensorHom_id, ← tensor_comp]
Mathlib/CategoryTheory/Monoidal/Category.lean
720
722
/- Copyright (c) 2019 Minchao Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Minchao Wu, Mario Carneiro -/ import Mathlib.Computability.Halting /-! # Strong reducibility and degrees. This file defines the notions of computable many-one reduction and one-one reduc...
sets in `d₂`.
Mathlib/Computability/Reduce.lean
348
348
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Initial...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
1,424
1,428
/- Copyright (c) 2019 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Lu-Ming Zhang -/ import Mathlib.Data.Matrix.Invertible import Mathlib.Data.Matrix.Kronecker import Mathlib.LinearAlgebra.FiniteDimensional.Basic import Mathlib.LinearAlgebra....
theorem inv_smul' (k : αˣ) (h : IsUnit A.det) : (k • A)⁻¹ = k⁻¹ • A⁻¹ :=
Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
505
506
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Floris van Doorn, Violeta Hernández Palacios -/ import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Data.Nat.SuccPred import Mathlib.Order.SuccPred.Initial...
theorem lift_is_succ {o : Ordinal.{v}} : (∃ a, lift.{u} o = succ a) ↔ ∃ a, o = succ a := ⟨fun ⟨a, h⟩ => let ⟨b, e⟩ := mem_range_lift_of_le <| show a ≤ lift.{u} o from le_of_lt <| h.symm ▸ lt_succ a ⟨b, (lift_inj.{u,v}).1 <| by rw [h, ← e, lift_succ]⟩, fun ⟨a, h⟩ => ⟨lift.{u} a, by simp only [h, lift_succ]...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
180
184
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Kim Morrison, Mario Carneiro, Andrew Yang -/ import Mathlib.Topology.Category.TopCat.EpiMono import Mathlib.Topology.Category.TopCat.Limits.Basic import Mathlib.CategoryT...
/-- The constructed cofan is indeed a colimit -/ def sigmaCofanIsColimit {ι : Type v} (β : ι → TopCat.{max v u}) : IsColimit (sigmaCofan β) where desc S := ofHom { toFun := fun (s : of (Σ i, β i)) => S.ι.app ⟨s.1⟩ s.2 continuous_toFun := by continuity }
Mathlib/Topology/Category/TopCat/Limits/Products.lean
81
85
/- 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.Group.Subgroup.Ker import Mathlib.Algebra.BigOperators.Group.List.Basic /-! # Free groups This file defines free groups over a type. Furthermore, it is...
theorem cons_cons {p} : Red L₁ L₂ → Red (p :: L₁) (p :: L₂) := ReflTransGen.lift (List.cons p) fun _ _ => Step.cons @[to_additive] theorem cons_cons_iff (p) : Red (p :: L₁) (p :: L₂) ↔ Red L₁ L₂ := Iff.intro (by generalize eq₁ : (p :: L₁ : List _) = LL₁ generalize eq₂ : (p :: L₂ : List _) = LL₂ ...
Mathlib/GroupTheory/FreeGroup/Basic.lean
197
212
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kevin Kappelmann -/ import Mathlib.Algebra.Order.Floor.Defs import Mathlib.Algebra.Order.Floor.Ring import Mathlib.Algebra.Order.Floor.Semiring deprecated_module (sinc...
Mathlib/Algebra/Order/Floor.lean
802
803
/- 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.Order.Group.Abs import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Nat.Cast.Order.Ring /-! # Order properties of cast of integers This...
lemma cast_mono : Monotone (Int.cast : ℤ → R) := by intro m n h rw [← sub_nonneg] at h lift n - m to ℕ using h with k hk rw [← sub_nonneg, ← cast_sub, ← hk, cast_natCast]
Mathlib/Algebra/Order/Ring/Cast.lean
32
37
/- Copyright (c) 2024 Paul Reichert. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ import Mathlib.CategoryTheory.Limits.Types.Colimits import Mathlib.CategoryTheory.IsConnected import Mathlib.CategoryTheory.Limits.Final import Mathlib.CategoryTheory.H...
/-- An index category is connected iff the colimit of the constant singleton-valued functor is a singleton. -/ theorem isConnected_iff_colimit_constPUnitFunctor_iso_pUnit [HasColimit (constPUnitFunctor.{w} C)] : IsConnected C ↔ Nonempty (colimit (constPUnitFunctor.{w} C) ≅ PUnit) := by refine ⟨fun _ => ⟨colim...
Mathlib/CategoryTheory/Limits/IsConnected.lean
97
104
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Module.BigOperators import Mathlib.NumberTheory.Divisors import Mathlib.Data.Nat.Squarefree imp...
@[simp] theorem pow_apply {k n : ℕ} : pow k n = if k = 0 ∧ n = 0 then 0 else n ^ k := by cases k <;> simp [pow] theorem pow_zero_eq_zeta : pow 0 = ζ := by ext n simp
Mathlib/NumberTheory/ArithmeticFunction.lean
788
796
/- 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...
s ×ˢ s = ⋃ n : ℤ, (fun a => (a, (f ^ n) a)) '' s := by ext ⟨a, b⟩ simp only [Set.mem_prod, Set.mem_iUnion, Set.mem_image] refine ⟨fun hx => ?_, ?_⟩ · obtain ⟨n, rfl⟩ := hf.2 hx.1 hx.2 exact ⟨_, _, hx.1, rfl⟩
Mathlib/GroupTheory/Perm/Cycle/Basic.lean
900
905
/- Copyright (c) 2022 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.Normed.Lp.lpSpace import Mathlib.Analysis.InnerProductSpace.PiL2 /-! # Hilbert sum of ...
⟪f, lp.single 2 i a⟫ = ⟪f i, a⟫ := by simpa [inner_conj_symm] using congr_arg conj (inner_single_left (𝕜 := 𝕜) i a f) end lp /-! ### Identification of a general Hilbert space `E` with a Hilbert sum -/
Mathlib/Analysis/InnerProductSpace/l2Space.lean
164
171
/- Copyright (c) 2021 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.NatIso /-! # Bicategories In this file we define typeclass for bicategories. A bicategory `B` consists of * objects `a : B`, * 1-morphisms ...
@[simps] def postcomp (a : B) (f : b ⟶ c) : (a ⟶ b) ⥤ (a ⟶ c) where obj := (· ≫ f) map := (· ▷ f) /-- Postcomposition of a 1-morphism as a functor from the category of 1-morphisms `b ⟶ c` into the
Mathlib/CategoryTheory/Bicategory/Basic.lean
436
441
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Mario Carneiro -/ import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Nat.GCD.Basic import Mathlib.Data.Nat.Prime.Basic import Ma...
· rw [h₁] refine (prod_primeFactorsList ?_).symm
Mathlib/Data/Nat/Factors.lean
163
164
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Algebra.Module.LinearMap.End import Mathlib.Algebra.Module.Submodule.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Defs /-! # Linear maps in...
(hf : ∀ x ∈ p, f x ∈ q) : q.subtype.comp (f.restrict hf) = f.domRestrict p := rfl theorem restrict_eq_codRestrict_domRestrict {f : M →ₗ[R] M₁} {p : Submodule R M} {q : Submodule R M₁} (hf : ∀ x ∈ p, f x ∈ q) : f.restrict hf = (f.domRestrict p).codRestrict q fun x => hf x.1 x.2 := rfl
Mathlib/Algebra/Module/Submodule/LinearMap.lean
243
249
/- Copyright (c) 2023 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.DirectSum.LinearMap import Mathlib.Algebra.Lie.InvariantForm import Mathlib.Algebra.Lie.Weights.Cartan import Mathlib.Algebra.Lie.Weights.Linear impo...
-- This is barely worth having: it usually follows from `LieModule.traceForm_eq_zero_of_isNilpotent` @[simp] lemma traceForm_eq_zero_of_isTrivial [IsTrivial L M] : traceForm R L M = 0 := by ext x y suffices φ x ∘ₗ φ y = 0 by simp [traceForm_apply_apply, this]
Mathlib/Algebra/Lie/TraceForm.lean
151
156
/- Copyright (c) 2018 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Chris Hughes, Daniel Weber -/ import Batteries.Data.Nat.Gcd import Mathlib.Algebra.GroupWithZero.Associated import Mathlib.Algebra.Ring.Divisibility.Basic import Math...
cases hm : min (emultiplicity p a) (emultiplicity p b) · simp only [top_le_iff, min_eq_top, emultiplicity_eq_top] at hm ⊢ contrapose hm
Mathlib/RingTheory/Multiplicity.lean
612
614
/- 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.Unbundled.Basic import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Or...
Mathlib/Algebra/Order/Group/Defs.lean
343
345
/- Copyright (c) 2020 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhangir Azerbayev, Adam Topaz, Eric Wieser -/ import Mathlib.LinearAlgebra.CliffordAlgebra.Basic import Mathlib.LinearAlgebra.Alternating.Basic /-! # Exterior Algebras We construct the e...
variable {K E F : Type*} [Field K] [AddCommGroup E] [Module K E] [AddCommGroup F] [Module K F] /-- An injective morphism of vector spaces induces an injective morphism of exterior algebras. -/ lemma map_injective_field {f : E →ₗ[K] F} (hf : LinearMap.ker f = ⊥) : Function.Injective (map f) := map_injective (L...
Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
440
449
/- 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...
instance instCharZero : CharZero ℂ :=
Mathlib/Data/Complex/Basic.lean
752
753