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) 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.Data.Set.SymmDiff import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Irreducible /-! # Connected subsets ...
Mathlib/Topology/Connected/Basic.lean
866
868
/- Copyright (c) 2022 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Topology.Coherent import Mathlib.Topology.UniformSpace.Equiv import Mathlib.Topology.UniformSpace.Pi import Mathlib.Topology.UniformSpace.UniformAp...
((UniformOnFun.ofFun 𝔖).symm.trans <| (Equiv.arrowProdEquivProdArrow _ _ _).trans <| (UniformOnFun.ofFun 𝔖).prodCongr (UniformOnFun.ofFun 𝔖)).toUniformEquivOfIsUniformInducing <| by constructor rw [uniformity_prod, comap_inf, comap_comap, comap_comap] have H := @UniformOnFun.inf_eq α (β × γ) ...
Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
1,008
1,014
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll, Kalle Kytölä -/ import Mathlib.Analysis.Normed.Module.Basic import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.Topology.Algebra.Module.WeakBilin /-! # Polar set I...
variable [NontriviallyNormedField 𝕜] [AddCommMonoid E] [AddCommMonoid F] variable [Module 𝕜 E] [Module 𝕜 F] variable (B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜) theorem polar_univ (h : SeparatingRight B) : B.polar Set.univ = {(0 : F)} := by rw [Set.eq_singleton_iff_unique_mem] refine ⟨by simp only [zero_mem_polar], fun y hy ...
Mathlib/Analysis/LocallyConvex/Polar.lean
140
150
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Johan Commelin, Mario Carneiro -/ import Mathlib.Algebra.Algebra.Subalgebra.Lattice import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibili...
Mathlib/Algebra/MvPolynomial/Basic.lean
1,411
1,413
/- Copyright (c) 2020 Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bhavik Mehta, Yaël Dillies -/ import Mathlib.Data.Set.BooleanAlgebra import Mathlib.Data.SetLike.Basic import Mathlib.Order.Hom.Basic /-! # Closure operators between preorders We defin...
end ClosureOperator
Mathlib/Order/Closure.lean
277
278
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Group.Submonoid.BigOperators import Mathlib.Algebra.Ring.Action.Subobjects import Mathlib.Algebra.Ring.Equiv import Mathlib.Algebra.Ring.Prod...
These are just copies of the definitions about `Submonoid` starting from `Submonoid.mulAction`. The only new result is `Subsemiring.module`. When `R` is commutative, `Algebra.ofSubsemiring` provides a stronger result than those found in this file, which uses the same scalar action. -/
Mathlib/Algebra/Ring/Subsemiring/Basic.lean
847
855
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathli...
ext fun _ => by simp only [mem_filterMap, Option.some.injEq, exists_eq_right] theorem filterMap_mono (h : s ⊆ t) : filterMap f s f_inj ⊆ filterMap f t f_inj := by rw [← val_le_iff] at h ⊢
Mathlib/Data/Finset/Image.lean
552
556
/- Copyright (c) 2017 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.CategoryTheory.EqToHom import Mathlib.CategoryTheory.Products.Basic /-! # Curry and uncurry, as functors. We define `curry : ((C × D) ⥤ E) ⥤ (C ⥤ (D ⥤ E)...
namespace Functor variable {B C D E}
Mathlib/CategoryTheory/Functor/Currying.lean
132
134
/- Copyright (c) 2018 Ellen Arlt. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ellen Arlt, Blair Shi, Sean Leather, Mario Carneiro, Johan Commelin, Lu-Ming Zhang -/ import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.Algebra.Pi import Mathlib.Algebra.BigOp...
diag s.sum = (s.map diag).sum := map_multiset_sum (diagAddMonoidHom n α) s @[simp]
Mathlib/Data/Matrix/Basic.lean
141
144
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Topology.Order.MonotoneContinuity import M...
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
1,003
1,010
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Order.PropInstances import Mathlib.Order.GaloisConnection.Defs /-! # Heyting algebras This file defines Heyting, co-Heyting and bi-Heyting algebras. A H...
theorem sdiff_sdiff_le : a \ (a \ b) ≤ b := sdiff_le_iff.2 le_sdiff_sup
Mathlib/Order/Heyting/Basic.lean
546
549
/- Copyright (c) 2019 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.Algebra.BigOperators.Expect import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.Convex.Jensen import M...
∏ i ∈ s, z i ^ w i = x := calc ∏ i ∈ s, z i ^ w i = ∏ i ∈ s, x ^ w i := by refine prod_congr rfl fun i hi => ?_ rcases eq_or_ne (w i) 0 with h₀ | h₀ · rw [h₀, rpow_zero, rpow_zero] · rw [hx i hi h₀] _ = x := by rw [← rpow_sum_of_nonneg _ hw, hw', rpow_one] have : (∑ i ∈...
Mathlib/Analysis/MeanInequalities.lean
164
180
/- Copyright (c) 2023 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies -/ import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.Algebra.Order.Module.Synonym import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax import Mathlib.Order.Mono...
Monovary f g ↔ ∀ i j, f i • g j + f j • g i ≤ f i • g i + f j • g j := monovaryOn_univ.symm.trans <| monovaryOn_iff_smul_rearrangement.trans <| by
Mathlib/Algebra/Order/Monovary.lean
396
397
/- 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.Complex.Log /-! # Power funct...
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
111
111
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.AlgebraicGeometry.Cover.Open import Mathlib.AlgebraicGeometry.GammaSpecAdjunction import Mathlib.AlgebraicGeometry.Restrict import Mathlib.CategoryTheory.Lim...
theorem fromSpec_preimage_basicOpen : hU.fromSpec ⁻¹ᵁ X.basicOpen f = PrimeSpectrum.basicOpen f := by rw [fromSpec_preimage_basicOpen', ← basicOpen_eq_of_affine] theorem fromSpec_image_basicOpen : hU.fromSpec ''ᵁ (PrimeSpectrum.basicOpen f) = X.basicOpen f := by rw [← hU.fromSpec_preimage_basicOpen] ext1...
Mathlib/AlgebraicGeometry/AffineScheme.lean
521
529
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Combinatorics.Enumerative.DoubleCounting import ...
variable [Nonempty α] lemma FarFromTriangleFree.lt_half (hG : G.FarFromTriangleFree ε) : ε < 2⁻¹ := by classical by_contra! hε refine lt_irrefl (ε * card α ^ 2) ?_ have hε₀ : 0 < ε := hε.trans_lt' (by norm_num) rw [inv_le_iff_one_le_mul₀ (zero_lt_two' 𝕜)] at hε calc _ ≤ (#G.edgeFinset : 𝕜) := by ...
Mathlib/Combinatorics/SimpleGraph/Triangle/Basic.lean
253
274
/- Copyright (c) 2023 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel -/ import Mathlib.MeasureTheory.Function.LocallyIntegrable import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.Prod import Mathlib.Me...
@[to_additive addHaarScalarFactor_eq_integral_div] lemma haarScalarFactor_eq_integral_div (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] {f : G → ℝ} (hf : Continuous f) (h'f : HasCompactSupport f) (int_nonzero : ∫ x, f x ∂μ ≠ 0) : haarScalarFactor μ' μ = (∫ x, f ...
Mathlib/MeasureTheory/Measure/Haar/Unique.lean
320
327
/- 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...
/-- Let `M` be an `R`-module, and `f` an `R`-linear endomorphism of `M`. For `k : ℕ∞`, we define `UnifEigenvalues f k` to be the type of all `μ : R` that satisfy `f.HasUnifEigenvalue μ k`. For `k = 1` this is the type of all eigenvalues of `f`. -/ def UnifEigenvalues (f : End R M) (k : ℕ∞) : Type _ := { μ : R // f.H...
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
155
164
/- 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...
@[aesop apply safe (rule_sets := [CategoryTheory])]
Mathlib/CategoryTheory/Iso.lean
306
307
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Eric Wieser -/ import Mathlib.Data.Fin.Tuple.Basic /-! # Matrix and vector notation This file defines notation for vectors and matrices. Given `a b c d : α`, the notation a...
ext i simp_rw [vecAlt1]
Mathlib/Data/Fin/VecNotation.lean
405
406
/- 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...
IsPeriodicPt.minimalPeriod_le hn (by rwa [isPeriodicPt_mul_iff_pow_eq_one])
Mathlib/GroupTheory/OrderOfElement.lean
221
222
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Kevin Buzzard, Yury Kudryashov, Eric Wieser -/ import Mathlib.Algebra.Group.Fin.Tuple import Mathlib.Algebra.BigOperators.GroupWithZero.Action import Ma...
surjective_eval i theorem iInf_ker_proj : (⨅ i, ker (proj i : ((i : ι) → φ i) →ₗ[R] φ i) : Submodule R ((i : ι) → φ i)) = ⊥ := bot_unique <| SetLike.le_def.2 fun a h => by
Mathlib/LinearAlgebra/Pi.lean
100
105
/- 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.LeftHomology import Mathlib.CategoryTheory.Limits.Opposites /-! # Right Homology of short complexes In this file, we define the ...
(γ : RightHomologyMapData φ h₁ h₂) lemma rightHomologyMap_eq [S₁.HasRightHomology] [S₂.HasRightHomology] : rightHomologyMap φ = h₁.rightHomologyIso.hom ≫ γ.φH ≫ h₂.rightHomologyIso.inv := by dsimp [RightHomologyData.rightHomologyIso, rightHomologyMapIso'] rw [← γ.rightHomologyMap'_eq, ← rightHomologyMap'_com...
Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
828
833
/- 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...
{ ArithmeticFunction.zero R, ArithmeticFunction.add with add_assoc := fun _ _ _ => ext fun _ => add_assoc _ _ _ zero_add := fun _ => ext fun _ => zero_add _
Mathlib/NumberTheory/ArithmeticFunction.lean
209
212
/- Copyright (c) 2021 Rémy Degenne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Sébastien Gouëzel, Rémy Degenne -/ import Mathlib.MeasureTheory.Integral.FinMeasAdditive /-! # Extension of a linear function from indicators to L1 Give...
Mathlib/MeasureTheory/Integral/SetToL1.lean
1,336
1,337
/- Copyright (c) 2021 Martin Zinkevich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Martin Zinkevich, Rémy Degenne -/ import Mathlib.Logic.Encodable.Lattice import Mathlib.MeasureTheory.MeasurableSpace.Defs import Mathlib.Order.Disjointed /-! # Indu...
isPiSystem_Ixx_mem (Ixx := Ioo) (fun ⟨_, hax, hxb⟩ => hax.trans hxb) Ioo_inter_Ioo s t theorem isPiSystem_Ioo (f : ι → α) (g : ι' → α) : @IsPiSystem α { S | ∃ l u, f l < g u ∧ Ioo (f l) (g u) = S } := isPiSystem_Ixx (Ixx := Ioo) (fun ⟨_, hax, hxb⟩ => hax.trans hxb) Ioo_inter_Ioo f g
Mathlib/MeasureTheory/PiSystem.lean
173
177
/- 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.Covering.VitaliFamily import Mathlib.MeasureTheory.Function.AEMeasurableOrder import Mathlib.MeasureTheory.Integral.Average import ...
intro x hx have I : ∀ᶠ a in v.filterAt x, (q : ℝ≥0∞) < ρ a / μ a := (tendsto_order.1 hx.2).1 _ (h hx.1) apply I.frequently.mono fun a ha => ?_ rw [coe_nnreal_smul_apply] exact ENNReal.mul_le_of_le_div ha.le /-- The points with `v.limRatioMeas hρ x = ∞` have measure `0` for `μ`. -/ theorem measure_limRatioMea...
Mathlib/MeasureTheory/Covering/Differentiation.lean
465
480
/- 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 ...
associator_inv_naturality_right]
Mathlib/CategoryTheory/Bicategory/Basic.lean
379
380
/- Copyright (c) 2022 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Data.Matrix.Notation import Mathlib.Data.Fin.Tuple.Reflection /-! # Lemmas for concrete matrices `Matrix (Fin m) (Fin n) α` This file contains alternative ...
def mulVecᵣ [Mul α] [Add α] [Zero α] (A : Matrix (Fin l) (Fin m) α) (v : Fin m → α) : Fin l → α := FinVec.map (fun a => dotProductᵣ a v) A /-- This can be used to prove
Mathlib/Data/Matrix/Reflection.lean
159
162
/- 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.Basic import Mathlib.CategoryTheory.Category.Preorder import Mathlib.CategoryTheory.IsomorphismClasses import Mathlib.CategoryThe...
variable (C) /-- An inverse to `fromSkeleton C` that forms an equivalence with it. -/ @[simps] noncomputable def toSkeletonFunctor : C ⥤ Skeleton C where
Mathlib/CategoryTheory/Skeletal.lean
108
111
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Data.Set.BooleanAlgebra import Mathlib.Data.Set.Piecewise import Mathlib.Order.Interval.Set.Basic import Mathli...
Mathlib/Order/Interval/Set/Pi.lean
335
340
/- 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, Johan Commelin -/ import Mathlib.Algebra.Ring.Int.Parity import Mathlib.Algebra.Ring.Int.Units import Mathlib.Data.ZMod.IntUnitsPower /-! # Integer powers of (-1) This file def...
@[simp] theorem abs_negOnePow (n : ℤ) : |(n.negOnePow : ℤ)| = 1 := by rw [abs_eq_natAbs, Int.units_natAbs, Nat.cast_one]
Mathlib/Algebra/Ring/NegOnePow.lean
77
80
/- Copyright (c) 2021 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Complex.Circle import Mathlib.Analysis.NormedSpace.BallAction import Mathlib.Analysis.SpecialFunc...
convert ((hasFDerivAt_const (4 : ℝ) 0).smul (hasFDerivAt_id 0)).add ((h₀.sub (hasFDerivAt_const (4 : ℝ) 0)).smul (hasFDerivAt_const v 0)) using 1 ext w simp convert h₁.smul h₂ using 1 ext w simp theorem hasFDerivAt_stereoInvFunAux_comp_coe (v : E) : HasFDerivAt (stereoInvFunAux v ∘ ((↑) : (...
Mathlib/Geometry/Manifold/Instances/Sphere.lean
145
160
/- 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.Analysis.Analytic.IteratedFDeriv import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.Ca...
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {s : Set E} (s_conv : Convex ℝ s) {f : E → F} {f' : E → E →L[ℝ] F} {f'' : E →L[ℝ] E →L[ℝ] F} (hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x) {x : E} (xs : x ∈ s) (hx : HasFDerivWithinAt f' f'' (interior s) x) ...
Mathlib/Analysis/Calculus/FDeriv/Symmetric.lean
179
227
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Topology.Order.MonotoneContinuity import M...
∃ F : CircleDeg1Lift, ∀ g, Semiconj F (f₁ g) (f₂ g) := by -- Equality of translation number guarantees that for each `x` -- the set `{f₂ g⁻¹ (f₁ g x) | g : G}` is bounded above. have : ∀ x, BddAbove (range fun g => f₂ g⁻¹ (f₁ g x)) := by
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
833
836
/- 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,610
1,611
/- 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...
· rw [LinearPMap.mem_graph_iff] at hx rcases hx with ⟨y, hx1, hx2⟩ convert g.mem_graph_toLinearPMap hg y using 1 exact Prod.ext hx1.symm hx2.symm rw [LinearPMap.mem_graph_iff] have hx_fst : x_fst ∈ g.map (LinearMap.fst R E F) := by simp only [mem_map, LinearMap.fst_apply, Prod.exists, exists_and_r...
Mathlib/LinearAlgebra/LinearPMap.lean
936
944
/- Copyright (c) 2020 Kim Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Morrison -/ import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise import Mathlib.Algebra.Group.Ext import Mathlib.CategoryTheory.Limits.Preserves.Shapes.BinaryProducts import Ma...
classical cases j simp [sum_comp, b.ι_π, comp_dite] /-- In a preadditive category, we can construct a biproduct for `f : J → C` from
Mathlib/CategoryTheory/Preadditive/Biproducts.lean
119
123
/- Copyright (c) 2015 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Jeremy Avigad, Minchao Wu, Mario Carneiro -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Finset.Attach import Mathlib.Data.Finset.Disjoint import Mathli...
Mathlib/Data/Finset/Image.lean
734
736
/- Copyright (c) 2022 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Adam Topaz, Junyan Xu, Jack McKoen -/ import Mathlib.RingTheory.Valuation.ValuationRing import Mathlib.RingTheory.Localization.AsSubring import Mathlib.Algebra.Ring.Subring.Pointwise impor...
le_sup_right := fun R S _ hx => (le_sup_right : S.toSubring ≤ R.toSubring ⊔ S.toSubring) hx sup_le := fun R S T hR hT _ hx => (sup_le hR hT : R.toSubring ⊔ S.toSubring ≤ T.toSubring) hx } /-- The ring homomorphism induced by the partial order. -/
Mathlib/RingTheory/Valuation/ValuationSubring.lean
218
221
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.GeomSum import Mathlib.Algebra.GroupWithZero.Action.Defs import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.NoZeroSMulDiviso...
rintro ⟨i, j⟩ hij suffices x ^ i * y ^ j = 0 by simp only [this, nsmul_eq_mul, mul_zero] by_cases hi : m ≤ i · rw [pow_eq_zero_of_le hi hx, zero_mul]
Mathlib/RingTheory/Nilpotent/Basic.lean
134
137
/- 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
1,876
1,878
/- 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.Shift.InducedShiftSequence import Mathlib.CategoryTheory.Shift.Localization import Mathlib.Algebra.Homology.HomotopyCategory.Shift import Mathlib....
variable {C} lemma shiftShortComplexFunctorIso_zero_add_hom_app (a : ℤ) (K : CochainComplex C ℤ) : (shiftShortComplexFunctorIso C 0 a a (zero_add a)).hom.app K = (shortComplexFunctor C (ComplexShape.up ℤ) a).map
Mathlib/Algebra/Homology/HomotopyCategory/ShiftSequence.lean
54
58
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Analysis.SpecialFunctions.ExpDeriv /-! # Grönwall's inequality The main technical result of this file is the Grönwall-like inequality `norm_le_gron...
simp only [id, mul_add, (mul_assoc _ _ _).symm, mul_comm _ K, mul_div_cancel₀ _ hK] ring theorem hasDerivAt_gronwallBound_shift (δ K ε x a : ℝ) : HasDerivAt (fun y => gronwallBound δ K ε (y - a)) (K * gronwallBound δ K ε (x - a) + ε) x := by convert (hasDerivAt_gronwallBound δ K ε _).comp x ((hasDerivAt_...
Mathlib/Analysis/ODE/Gronwall.lean
59
70
/- Copyright (c) 2024 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff import Mathlib.RingTheory.MvPolynomial.Homogeneous /-! # The universal c...
MvPolynomial.eval₂Hom f M ((univ R n).coeff i) = (charpoly (Matrix.of M.curry)).coeff i := by rw [← univ_map_eval₂Hom n f M, Polynomial.coeff_map] variable (R)
Mathlib/LinearAlgebra/Matrix/Charpoly/Univ.lean
64
68
/- Copyright (c) 2020 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Algebra.Star.SelfAdjoint import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.LinearAlgebra.FreeModule.Finite.Basic /-! # Quate...
/-- `QuaternionAlgebra.re` as a `LinearMap` -/
Mathlib/Algebra/Quaternion.lean
515
515
/- 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
1,423
1,429
/- Copyright (c) 2014 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Leonardo de Moura, Mario Carneiro, Floris van Doorn -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ord...
rcases lt_trichotomy b 0 with (hb | rfl | hb) · simp [hb, hb.not_lt, hb.ne, div_lt_one_of_neg] · simp [zero_lt_one]
Mathlib/Algebra/Order/Field/Basic.lean
486
488
/- Copyright (c) 2019 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Yakov Pechersky -/ import Mathlib.Data.List.Nodup import Mathlib.Data.List.Infix import Mathlib.Data.Quot /-! # List rotation This file proves basic results about `List.r...
theorem rotate_nil (n : ℕ) : ([] : List α).rotate n = [] := by simp [rotate]
Mathlib/Data/List/Rotate.lean
37
37
/- 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.Data.Set.SymmDiff import Mathlib.Order.SuccPred.Relation import Mathlib.Topology.Irreducible /-! # Connected subsets ...
Mathlib/Topology/Connected/Basic.lean
941
943
/- Copyright (c) 2021 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker, Bhavik Mehta -/ import Mathlib.Analysis.Calculus.Deriv.Support import Mathlib.Analysis.SpecialFunctions.Pow.Deriv import Mathlib.MeasureTheory.Function.Jacobian imp...
apply intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hx (hcont.mono Icc_subset_Iic_self) fun y hy => hderiv y hy.2 rw [intervalIntegrable_iff_integrableOn_Ioc_of_le hx] exact f'int.mono (fun y hy => hy.2) le_rfl /-- **Fundamental theorem of calculus-2**, on semi-infinite intervals `(-∞, a)`. When a fun...
Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
933
948
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Logic.Equiv.Fin.Basic imp...
exact ⟨C, fun y ys hy z zs hz ↦ hC y z hy hz ys zs⟩ /-- If `f` has formal power series `∑ n, pₙ` on a ball of radius `r`, then for `y, z` in any smaller
Mathlib/Analysis/Analytic/Basic.lean
1,137
1,139
/- 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...
Mathlib/Topology/MetricSpace/Dilation.lean
519
520
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Data.Fintype.Card import Mathlib.Algebra.BigOperators.Group.Finset.Basic /-! # Multiset coercion to type This module defines a `CoeSort` instance for multi...
· rw [← m.toEnumFinset.prod_coe_sort fun x ↦ f x.1 x.2] · intro x rfl
Mathlib/Data/Multiset/Fintype.lean
228
230
/- Copyright (c) 2021 Justus Springer. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Justus Springer -/ import Mathlib.CategoryTheory.Limits.Preserves.Filtered import Mathlib.CategoryTheory.ConcreteCategory.Elementwise import Mathlib.CategoryTheory.Limits.Types.Filter...
exact h } /-- Multiplication in the colimit is independent of the chosen "maximum" in the filtered category. In particular, this lemma allows us to "unfold" the definition of the multiplication of `x` and `y`, using a custom object `k` and morphisms `f : x.1 ⟶ k` and `g : y.1 ⟶ k`. -/ @[to_additive "Additi...
Mathlib/Algebra/Category/MonCat/FilteredColimits.lean
143
162
/- 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....
a ^ (if p then b else c) = if p then a ^ b else a ^ c := pow_dite _ _ _ _ @[to_additive (attr := simp) smul_ite]
Mathlib/Algebra/Group/Basic.lean
41
43
/- Copyright (c) 2022 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Algebra.Order.ToIntervalMod import Mathlib.Algebra.Ring.AddAut import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.Divisible import Mathlib.Topology.C...
rw [addOrderOf_coe_rat] at h exact q.den_ne_zero h · rw [addOrderOf_eq_zero_iff'] intro h n hn han simp only [← coe_nsmul, coe_eq_zero_iff, nsmul_eq_mul, zsmul_eq_mul] at han rcases han with ⟨m, hm⟩ apply h (m / n) field_simp [hm] variable (p) /-- The natural bijection between points of ...
Mathlib/Topology/Instances/AddCircle.lean
451
475
/- 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.Order.AbsoluteValue.Basic import Mathlib.Algebra.Ring.Opposite import Mathlib.Algebra.Ring.Prod import Mathlib.Algebra.Ring.Sub...
abbrev nonUnitalCommRingTopologicalClosure [T2Space R] (s : NonUnitalSubring R) (hs : ∀ x y : s, x * y = y * x) : NonUnitalCommRing s.topologicalClosure := { s.topologicalClosure.toNonUnitalRing, s.toSubsemigroup.commSemigroupTopologicalClosure hs with }
Mathlib/Topology/Algebra/Ring/Basic.lean
314
316
/- 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, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Continuity import Mathlib.Topology.Algebra.IsUniformGroup.Basic import Mathlib.Topology.MetricSpace...
@[to_additive] lemma LipschitzOnWith.mul (hf : LipschitzOnWith Kf f s) (hg : LipschitzOnWith Kg g s) :
Mathlib/Analysis/Normed/Group/Uniform.lean
270
271
/- Copyright (c) 2020 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.Algebra.Group.Conj import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Group.Subgroup.Ker /-! # Basic results on subgroups We prove basic results...
Mathlib/Algebra/Group/Subgroup/Basic.lean
1,440
1,443
/- Copyright (c) 2022 Matej Penciak. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matej Penciak, Moritz Doll, Fabien Clery -/ import Mathlib.LinearAlgebra.Matrix.NonsingularInverse /-! # The Symplectic Group This file defines the symplectic group and proves element...
rw [J_inv] simp _ = (-Aᵀ) * (A * J l R * Aᵀ)⁻¹ * A := by rw [hA]
Mathlib/LinearAlgebra/SymplecticGroup.lean
137
139
/- 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, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Seminorm import Mathlib.Data.NNReal.Basic import Mathlib.Topology.Algebra.Support import Mathlib.To...
continuous_enorm := continuous_id enorm_eq_zero := by simp enorm_add_le := by simp
Mathlib/Analysis/Normed/Group/Basic.lean
944
946
/- Copyright (c) 2018 Louis Carlin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Louis Carlin, Mario Carneiro -/ import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.Grou...
@[simp] theorem xgcdAux_fst (x y : R) : ∀ s t s' t', (xgcdAux x s t y s' t').1 = gcd x y := GCD.induction x y
Mathlib/Algebra/EuclideanDomain/Basic.lean
170
173
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.Module.End import Mathlib.Algebra.Ring.Prod import Mathlib.Data.Fintype.Units import Mathlib.GroupTheory.GroupAc...
Mathlib/Data/ZMod/Basic.lean
1,467
1,479
/- 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...
`cyclotomic n R = (X ^ k - 1) /ₘ (∏ i ∈ Nat.properDivisors k, cyclotomic i K)`. -/ theorem cyclotomic_eq_X_pow_sub_one_div {R : Type*} [CommRing R] {n : ℕ} (hpos : 0 < n) : cyclotomic n R = (X ^ n - 1) /ₘ ∏ i ∈ Nat.properDivisors n, cyclotomic i R := by nontriviality R rw [← prod_cyclotomic_eq_X_pow_sub_one hpo...
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
432
439
/- Copyright (c) 2019 Jean Lo. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jean Lo, Yaël Dillies, Moritz Doll -/ import Mathlib.Algebra.Order.Pi import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.LocallyConvex.Basic import Mathlib.Data.Real.Pointwise /...
/-- We define the supremum of an arbitrary subset of `Seminorm 𝕜 E` as follows: * if `s` is `BddAbove` *as a set of functions `E → ℝ`* (that is, if `s` is pointwise bounded above), we take the pointwise supremum of all elements of `s`, and we prove that it is indeed a seminorm.
Mathlib/Analysis/Seminorm.lean
470
473
/- Copyright (c) 2022 Yaël Dillies, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Bhavik Mehta -/ import Mathlib.Algebra.BigOperators.Field import Mathlib.Algebra.Order.Chebyshev import Mathlib.Analysis.SpecialFunctions.Pow.Real import Math...
open Lean.Meta Qq /-- Extension for the `positivity` tactic: `SzemerediRegularity.initialBound` is always positive. -/ @[positivity SzemerediRegularity.initialBound _ _] def evalInitialBound : PositivityExt where eval {u α} _ _ e := do match u, α, e with | 0, ~q(ℕ), ~q(SzemerediRegularity.initialBound $ε $l) => ...
Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean
237
263
/- 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, Violeta Hernández Palacios, Grayson Burton, Floris van Doorn -/ import Mathlib.Order.Antisymmetrization import Mathlib.Order.Hom.WithTopBot import Mathlib.Order.Interval.Se...
theorem WCovBy.image (f : α ↪o β) (hab : a ⩿ b) (h : (range f).OrdConnected) : f a ⩿ f b := by refine ⟨f.monotone hab.le, fun c ha hb => ?_⟩
Mathlib/Order/Cover.lean
96
97
/- Copyright (c) 2021 Martin Zinkevich. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Martin Zinkevich, Rémy Degenne -/ import Mathlib.Logic.Encodable.Lattice import Mathlib.MeasureTheory.MeasurableSpace.Defs import Mathlib.Order.Disjointed /-! # Indu...
rcases hs with hs | hs · simp [hs] · rcases ht with ht | ht · simp [ht] · exact Set.mem_insert_of_mem _ (h_pi s hs t ht hst) theorem IsPiSystem.insert_univ {S : Set (Set α)} (h_pi : IsPiSystem S) : IsPiSystem (insert Set.univ S) := by
Mathlib/MeasureTheory/PiSystem.lean
85
92
/- Copyright (c) 2021 Lu-Ming Zhang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lu-Ming Zhang -/ import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker /-! # Diagonal matrices This file co...
theorem IsDiag.fromBlocks_of_isSymm [Zero α] {A : Matrix m m α} {C : Matrix n m α} {D : Matrix n n α} (h : (A.fromBlocks 0 C D).IsSymm) (ha : A.IsDiag) (hd : D.IsDiag) : (A.fromBlocks 0 C D).IsDiag := by rw [← (isSymm_fromBlocks_iff.1 h).2.1] exact ha.fromBlocks hd theorem mul_transpose_self_isDiag_iff_has...
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
159
165
/- 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 Aesop import Mathlib.Order.BoundedOrder.Lattice /-! # Disjointness and complements This file defines `Disjoint`, `Codisjoint`, and the `IsCompl` predicate. ...
theorem Codisjoint.sup_right' (h : Codisjoint a b) : Codisjoint a (c ⊔ b) :=
Mathlib/Order/Disjoint.lean
313
314
/- 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...
section miscellaneous open Finset variable {R : Type*} [CommRing R] {ζ : R} {n : ℕ} (x y : R) lemma dvd_C_mul_X_sub_one_pow_add_one {p : ℕ} (hpri : p.Prime) (hp : p ≠ 2) (a r : R) (h₁ : r ∣ a ^ p) (h₂ : r ∣ p * a) : C r ∣ (C a * X - 1) ^ p + 1 := by have := hpri.dvd_add_pow_sub_pow_of_dvd (C a * X) (-1) (r := ...
Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
587
614
/- 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 norm_cpow_of_ne_zero {z : ℂ} (hz : z ≠ 0) (w : ℂ) : ‖z ^ w‖ = ‖z‖ ^ w.re / Real.exp (arg z * im w) := by
Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
279
281
/- Copyright (c) 2021 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Thomas Murrills -/ import Mathlib.Algebra.GroupWithZero.Invertible import Mathlib.Algebra.Ring.Int.Defs import Mathlib.Data.Nat.Cast.Basic import Mathlib.Data.Nat.Cast....
/-- Helper function to synthesize a typed `DivisionRing α` expression. -/ def inferDivisionRing {u : Level} (α : Q(Type u)) : MetaM Q(DivisionRing $α) := return ← synthInstanceQ q(DivisionRing $α) <|> throwError "not a division ring"
Mathlib/Tactic/NormNum/Basic.lean
435
437
/- 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.LeftHomology import Mathlib.CategoryTheory.Limits.Opposites /-! # Right Homology of short complexes In this file, we define the ...
S.rightHomologyι ≫ S.descOpcycles k hk @[reassoc] lemma rightHomologyι_descOpcycles_π_eq_zero_of_boundary (x : S.X₃ ⟶ A) (hx : k = S.g ≫ x) : S.rightHomologyι ≫ S.descOpcycles k (by rw [hx, S.zero_assoc, zero_comp]) = 0 := RightHomologyData.ι_descQ_eq_zero_of_boundary _ k x hx @[reassoc (attr := simp)] lemma ...
Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
1,242
1,250
/- 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, Yaël Dillies -/ import Mathlib.Analysis.Normed.Group.Bounded import Mathlib.Analysis.Normed.Group.Uniform import Mathlib.Topology.MetricSpace.Thickening /-! # P...
Mathlib/Analysis/Normed/Group/Pointwise.lean
313
314
/- Copyright (c) 2023 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Analysis.Normed.Field.Basic import Mathlib.Data.ENNReal.Action import Mathlib.Topology.Algebra.UniformMulAction import Mathlib.Topology.MetricSpace.Algebra ...
@[bound] lemma enorm_smul_le : ‖r • x‖ₑ ≤ ‖r‖ₑ * ‖x‖ₑ := by
Mathlib/Analysis/Normed/MulAction.lean
37
38
/- 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
1,020
1,024
/- Copyright (c) 2021 Aaron Anderson, Jesse Michael Han, Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson, Jesse Michael Han, Floris van Doorn -/ import Mathlib.Data.Set.Prod import Mathlib.Logic.Equiv.Fin.Basic import Mathlib.ModelTheory...
Mathlib/ModelTheory/Syntax.lean
887
896
/- 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...
rw [← RingHom.map_mul, ← mul_assoc, h.mul_inv_eq_one M'_ne, one_mul] at zy_mem obtain ⟨zy, hzy, zy_eq⟩ := (mem_coeIdeal A⁰).mp zy_mem rw [IsFractionRing.injective A (FractionRing A) zy_eq] at hzy -- But `P` is a prime ideal, so `z ∉ P` implies `y ∈ P`, as desired. exact mem_coeIdeal_of_mem A⁰ (Or.resolve_left...
Mathlib/RingTheory/DedekindDomain/Ideal.lean
328
361
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Johannes Hölzl, Kim Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Eval.Degree import Mathlib.Algebra.Prime.Lemmas /-! # Theory of degrees of polynomials S...
theorem natDegree_iterate_comp (k : ℕ) : (p.comp^[k] q).natDegree = p.natDegree ^ k * q.natDegree := by
Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
361
362
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, François Dupuis -/ import Mathlib.Analysis.Convex.Basic import Mathlib.Order.Filter.Extr import Mathlib.Tactic.NormNum /-! # Convex and concave functions This...
hf.dual.add hg theorem StrictConvexOn.add_const {γ : Type*} {f : E → γ} [AddCommMonoid γ] [PartialOrder γ] [IsOrderedCancelAddMonoid γ] [Module 𝕜 γ] (hf : StrictConvexOn 𝕜 s f) (b : γ) : StrictConvexOn 𝕜 s (f + fun _ => b) := hf.add_convexOn (convexOn_const _ hf.1)
Mathlib/Analysis/Convex/Function.lean
506
512
/- 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.Ring.Divisibility.Basic import Mathlib.Data.Ordering.Lemmas import Mathlib.Data.PNat.Basic import Mathlib.SetTheory.Ordinal.Principal import Ma...
section -- Porting note: `R'` is used in the proof but marked as an unused variable. set_option linter.unusedVariables false in theorem repr_opow_aux₂ {a0 a'} [N0 : NF a0] [Na' : NF a'] (m : ℕ) (d : ω ∣ repr a')
Mathlib/SetTheory/Ordinal/Notation.lean
795
799
/- Copyright (c) 2020 Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Logic.Equiv.Fin.Basic imp...
rintro ⟨n, z⟩ hz h'z hkn simp only [dist_eq_norm, sub_zero] at hz ⊢
Mathlib/Analysis/Analytic/Basic.lean
909
910
/- 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 tendsto_densityProcess_atTop_empty_of_antitone (κ : Kernel α (γ × β)) (ν : Kernel α γ) [IsFiniteKernel κ] (n : ℕ) (a : α) (x : γ) (seq : ℕ → Set β) (hseq : Antitone seq) (hseq_iInter : ⋂ i, seq i = ∅) (hseq_meas : ∀ m, MeasurableSet (seq m)) : Tendsto (fun m ↦ densityProcess κ ν n a x (seq m)) at...
Mathlib/Probability/Kernel/Disintegration/Density.lean
342
359
/- Copyright (c) 2022 Yakov Pechersky. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yakov Pechersky, Floris van Doorn -/ import Mathlib.Data.Nat.Find import Mathlib.Data.PNat.Basic /-! # Explicit least witnesses to existentials on positive natural numbers Implement...
simp only [← add_one_le_iff, le_find_iff, add_le_add_iff_right]
Mathlib/Data/PNat/Find.lean
86
87
/- Copyright (c) 2022 Yuyang Zhao. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuyang Zhao -/ import Mathlib.Algebra.Algebra.Subalgebra.Tower import Mathlib.Algebra.MvPolynomial.Eval /-! # Algebra towers for multivariate polynomial This file proves some basic resu...
Mathlib/RingTheory/MvPolynomial/Tower.lean
81
82
/- 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...
nontriviality R have h : (p %ₘ (X - C a)).eval a = p.eval a := by rw [modByMonic_eq_sub_mul_div _ (monic_X_sub_C a), eval_sub, eval_mul, eval_sub, eval_X, eval_C, sub_self, zero_mul, sub_zero] have : degree (p %ₘ (X - C a)) < 1 := degree_X_sub_C a ▸ degree_modByMonic_lt p (monic_X_sub_C a) have : ...
Mathlib/Algebra/Polynomial/Div.lean
578
584
/- Copyright (c) 2022 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Constructions.Polish.Basic import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.Probability.Martingale.Upcrossing /-! # Mar...
· rw [isBoundedUnder_le_abs] at h refine tendsto_of_no_upcrossings Rat.denseRange_cast ?_ h.1 h.2 rintro _ ⟨a, rfl⟩ _ ⟨b, rfl⟩ hab exact not_frequently_of_upcrossings_lt_top hab (hf₂ a b (Rat.cast_lt.1 hab)).ne · obtain ⟨a, b, hab, h₁, h₂⟩ := ENNReal.exists_upcrossings_of_not_bounded_under hf₁.ne h ...
Mathlib/Probability/Martingale/Convergence.lean
141
152
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes -/ import Mathlib.Algebra.CharP.Basic import Mathlib.Algebra.Module.End import Mathlib.Algebra.Ring.Prod import Mathlib.Data.Fintype.Units import Mathlib.GroupTheory.GroupAc...
rw [Nat.cast_add, natCast_zmod_val, Nat.cast_mul, natCast_self, zero_mul, add_zero] theorem intCast_eq_iff (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p] :
Mathlib/Data/ZMod/Basic.lean
556
559
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser, Kevin Buzzard, Jujian Zhang, Fangming Li -/ import Mathlib.Algebra.Algebra.Operations import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Algebra.DirectSum.Algebra...
simp_rw [DFinsupp.sum, H, Finset.sum_ite_eq'] split_ifs with h · rfl rw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, mul_zero] theorem coe_mul_of_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] (r : ⨁ i, A i) {i : ι} (r' : A i) {j n : ι} (H : ∀ x : ι, x + i = n ↔ x = j) : ((r * o...
Mathlib/Algebra/DirectSum/Internal.lean
180
192
/- 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, Yury Kudryashov -/ import Mathlib.Data.List.Forall2 import Mathlib.Data.List.Lex import Mathlib.Logic.Function.Iterate import Mathlib.Logic.Relation /-! # R...
· intro c d e _ ih obtain ⟨l, hl₁, hl₂⟩ := ih refine ⟨d :: l, Chain.cons e hl₁, ?_⟩ rwa [getLast_cons_cons]
Mathlib/Data/List/Chain.lean
364
367
/- Copyright (c) 2018 Violeta Hernández Palacios, Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Violeta Hernández Palacios, Mario Carneiro -/ import Mathlib.Logic.Small.List import Mathlib.SetTheory.Ordinal.Enum import Mathlib.SetTheory.Ordinal.Exponen...
Mathlib/SetTheory/Ordinal/FixedPoint.lean
689
692
/- Copyright (c) 2024 Geoffrey Irving. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Geoffrey Irving -/ import Mathlib.Analysis.Analytic.Composition import Mathlib.Analysis.Analytic.Constructions import Mathlib.Analysis.Complex.CauchyIntegral import Mathlib.Analysis.S...
/-- `log` is analytic away from nonpositive reals -/ theorem AnalyticOnNhd.clog (fs : AnalyticOnNhd ℂ f s) (m : ∀ z ∈ s, f z ∈ slitPlane) : AnalyticOnNhd ℂ (fun z ↦ log (f z)) s := fun z n ↦ (analyticAt_clog (m z n)).comp (fs z n)
Mathlib/Analysis/SpecialFunctions/Complex/Analytic.lean
40
44
/- 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.Geometry.Euclidean.Projection import Mathlib.Geometry.Euclidean.Sphere.Basic import Mathlib.LinearAlgebra.AffineSpace.FiniteDimensional import Mathlib.Tact...
/-- `circumcenterWeightsWithCircumcenter` sums to 1. -/ @[simp] theorem sum_circumcenterWeightsWithCircumcenter (n : ℕ) : ∑ i, circumcenterWeightsWithCircumcenter n i = 1 := by classical convert sum_ite_eq' univ circumcenterIndex (Function.const _ (1 : ℝ)) with j · cases j <;> simp [circumcenterWeightsWithCir...
Mathlib/Geometry/Euclidean/Circumcenter.lean
533
546
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Yury Kudryashov, Yaël Dillies -/ import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpac...
refine EqOn.image_eq fun a ha ↦ ?_ simp [Convex.combo_self ha.2.2] end Prod namespace Pi variable [Semiring 𝕜] [PartialOrder 𝕜] [∀ i, AddCommMonoid (M i)] [∀ i, Module 𝕜 (M i)] {s : Set ι} theorem segment_subset (x y : ∀ i, M i) : segment 𝕜 x y ⊆ s.pi fun i => segment 𝕜 (x i) (y i) := by rintro z ⟨a, b, ...
Mathlib/Analysis/Convex/Segment.lean
595
608
/- 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.Abs import Mathlib.Algebra.Order.Monoid.Unbundled.MinMax /-! # `min` and `max` in...
theorem abs_max_sub_max_le_abs (a b c : α) : |max a c - max b c| ≤ |a - b| := by simpa only [sub_self, abs_zero, max_eq_left (abs_nonneg (a - b))] using abs_max_sub_max_le_max a c b c end LinearOrderedAddCommGroup
Mathlib/Algebra/Order/Group/MinMax.lean
86
93
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.SetTheory.Cardinal.Finite /-! # Cardinality of finite types The cardinality of a finite type `α` is given by `Nat.card α`. This function has the "junk val...
simp only [this, *, Nat.card_eq_fintype_card, dif_pos] · simp only [*, card_eq_zero_of_infinite, not_finite_iff_infinite.mpr, dite_false] theorem Finite.card_pos_iff [Finite α] : 0 < Nat.card α ↔ Nonempty α := by haveI := Fintype.ofFinite α rw [Nat.card_eq_fintype_card, Fintype.card_pos_iff]
Mathlib/Data/Finite/Card.lean
49
54
/- 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.Probability.Independence.Kernel import Mathlib.MeasureTheory.Constructions.Pi /-! # Independence of sets of sets and measure spaces (σ-algebras) * A fami...
lemma iIndepFun.indepFun_prodMk₀ (hf_Indep : iIndepFun f μ) (hf_meas : ∀ i, AEMeasurable (f i) μ) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) : IndepFun (fun a => (f i a, f j a)) (f k) μ := Kernel.iIndepFun.indepFun_prodMk₀ hf_Indep (by simp [hf_meas]) i j k hik hjk lemma iIndepFun.indepFun_prodMk_prodMk (h_ind...
Mathlib/Probability/Independence/Basic.lean
707
720
/- 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...
h.1 @[simp]
Mathlib/NumberTheory/ArithmeticFunction.lean
544
546