Context
stringlengths
285
157k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
18
3.69k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir -/ import Mathlib.Algebra.Order.CauSeq.BigOperators import Mathlib.Data.Complex.Abs import Mathlib.Data.Complex.BigOperators import Mathlib.Data.Na...
Mathlib/Data/Complex/Exponential.lean
1,476
1,486
theorem exp_approx_succ {n} {x a₁ b₁ : ℝ} (m : β„•) (e₁ : n + 1 = m) (aβ‚‚ bβ‚‚ : ℝ) (e : |1 + x / m * aβ‚‚ - a₁| ≀ b₁ - |x| / m * bβ‚‚) (h : |exp x - expNear m x aβ‚‚| ≀ |x| ^ m / m.factorial * bβ‚‚) : |exp x - expNear n x a₁| ≀ |x| ^ n / n.factorial * b₁ := by
refine (abs_sub_le _ _ _).trans ((add_le_add_right h _).trans ?_) subst e₁; rw [expNear_succ, expNear_sub, abs_mul] convert mul_le_mul_of_nonneg_left (a := |x| ^ n / ↑(Nat.factorial n)) (le_sub_iff_add_le'.1 e) ?_ using 1 Β· simp [mul_add, pow_succ', div_eq_mul_inv, abs_mul, abs_inv, ← pow_abs, mul_inv, N...
/- 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.GroupWithZero.Hom import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Ring.Defs import Mathlib.Data.Nat.Lattice #align_import ri...
Mathlib/RingTheory/Nilpotent/Defs.lean
81
85
theorem IsNilpotent.map [MonoidWithZero R] [MonoidWithZero S] {r : R} {F : Type*} [FunLike F R S] [MonoidWithZeroHomClass F R S] (hr : IsNilpotent r) (f : F) : IsNilpotent (f r) := by
use hr.choose rw [← map_pow, hr.choose_spec, map_zero]
/- Copyright (c) 2021 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Patrick Massot, Riccardo Brasca -/ import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.Quot...
Mathlib/Analysis/Normed/Group/Quotient.lean
380
389
theorem IsQuotient.norm_lift {f : NormedAddGroupHom M N} (hquot : IsQuotient f) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) (n : N) : βˆƒ m : M, f m = n ∧ β€–mβ€– < β€–nβ€– + Ξ΅ := by
obtain ⟨m, rfl⟩ := hquot.surjective n have nonemp : ((fun m' => β€–m + m'β€–) '' f.ker).Nonempty := by rw [Set.image_nonempty] exact ⟨0, f.ker.zero_mem⟩ rcases Real.lt_sInf_add_pos nonemp hΞ΅ with ⟨_, ⟨⟨x, hx, rfl⟩, H : β€–m + xβ€– < sInf ((fun m' : M => β€–m + m'β€–) '' f.ker) + Ρ⟩⟩ exact ⟨m + x, by rw [map_ad...
/- 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, Scott Morrison -/ import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.Module.Basic import Mathlib.Algebra.Regular.SMul import Mathlib.Data.Finset.Preimag...
Mathlib/Data/Finsupp/Basic.lean
347
348
theorem equivMapDomain_zero {f : Ξ± ≃ Ξ²} : equivMapDomain f (0 : Ξ± β†’β‚€ M) = (0 : Ξ² β†’β‚€ M) := by
ext; simp only [equivMapDomain_apply, coe_zero, Pi.zero_apply]
/- 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, Kenny Lau, Johan Commelin, Mario Carneiro, Kevin Buzzard, Amelia Livingston, Yury Kudryashov -/ import Mathlib.Algebra.FreeMonoid.Basic import Mathlib.Algebra.Group.Sub...
Mathlib/Algebra/Group/Submonoid/Membership.lean
620
628
theorem SMulCommClass.of_mclosure_eq_top {N Ξ±} [Monoid M] [SMul N Ξ±] [MulAction M Ξ±] {s : Set M} (htop : Submonoid.closure s = ⊀) (hs : βˆ€ x ∈ s, βˆ€ (y : N) (z : Ξ±), x β€’ y β€’ z = y β€’ x β€’ z) : SMulCommClass M N Ξ± := by
refine ⟨fun x => Submonoid.induction_of_closure_eq_top_left htop x ?_ ?_⟩ · intro y z rw [one_smul, one_smul] · clear x intro x hx x' hx' y z rw [mul_smul, mul_smul, hx', hs x hx]
/- Copyright (c) 2021 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Interval.Set.IsoIoo import Mathlib.Topology.Order.MonotoneContinuity import Mathlib.Topology...
Mathlib/Topology/TietzeExtension.lean
269
272
theorem exists_extension_norm_eq_of_closedEmbedding (f : X →ᡇ ℝ) {e : X β†’ Y} (he : ClosedEmbedding e) : βˆƒ g : Y →ᡇ ℝ, β€–gβ€– = β€–fβ€– ∧ g ∘ e = f := by
rcases exists_extension_norm_eq_of_closedEmbedding' f ⟨e, he.continuous⟩ he with ⟨g, hg, rfl⟩ exact ⟨g, hg, rfl⟩
/- Copyright (c) 2022 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.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Equiv import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.C...
Mathlib/Analysis/BoundedVariation.lean
133
136
theorem mono (f : Ξ± β†’ E) {s t : Set Ξ±} (hst : t βŠ† s) : eVariationOn f t ≀ eVariationOn f s := by
apply iSup_le _ rintro ⟨n, ⟨u, hu, ut⟩⟩ exact sum_le f n hu fun i => hst (ut i)
/- 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.LinearAlgebra.AffineSpace.AffineEquiv #align_import linear_algebra.affine_space.midpoint from "leanprover-community/mathlib"@"2196ab363eb097c008d449...
Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
83
85
theorem Equiv.pointReflection_midpoint_right (x y : P) : (Equiv.pointReflection (midpoint R x y)) y = x := by
rw [midpoint_comm, Equiv.pointReflection_midpoint_left]
/- 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, Mario Carneiro -/ import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Data.Rat.Cast.Defs #align_import data.rat.cast from "leanprover-community/mathlib"@"...
Mathlib/Data/Rat/Cast/CharZero.lean
119
120
theorem cast_mk (a b : β„€) : (a /. b : Ξ±) = a / b := by
simp only [divInt_eq_div, cast_div, cast_intCast]
/- 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.Analysis.SpecialFunctions.Trigonometric.Arctan import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.unoriented...
Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
116
119
theorem angle_add_le_pi_div_two_of_inner_eq_zero {x y : V} (h : βŸͺx, y⟫ = 0) : angle x (x + y) ≀ Ο€ / 2 := by
rw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_le_pi_div_two] exact div_nonneg (norm_nonneg _) (norm_nonneg _)
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, SΓ©bastien GouΓ«zel, Yury Kudryashov -/ import Mathlib.Analysis.Calculus.TangentCone import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics #align_import analysis.ca...
Mathlib/Analysis/Calculus/FDeriv/Basic.lean
746
749
theorem Asymptotics.IsBigO.hasFDerivAt {xβ‚€ : E} {n : β„•} (h : f =O[𝓝 xβ‚€] fun x => β€–x - xβ‚€β€– ^ n) (hn : 1 < n) : HasFDerivAt f (0 : E β†’L[π•œ] F) xβ‚€ := by
rw [← nhdsWithin_univ] at h exact (h.hasFDerivWithinAt (mem_univ _) hn).hasFDerivAt_of_univ
/- Copyright (c) 2018 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad -/ import Mathlib.Order.CompleteLattice import Mathlib.Order.GaloisConnection import Mathlib.Data.Set.Lattice import Mathlib.Tactic.AdaptationNote #align_import data.rel ...
Mathlib/Data/Rel.lean
119
122
theorem comp_left_id (r : Rel Ξ± Ξ²) : @Eq Ξ± β€’ r = r := by
unfold comp ext x simp
/- Copyright (c) 2020 Anatole Dedecker. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anatole Dedecker -/ import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.Asymptotics.Theta import Mathlib.Analysis.Normed.Order.Basic #align_import analysis.asymp...
Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
294
300
theorem IsEquivalent.inv (huv : u ~[l] v) : (fun x ↦ (u x)⁻¹) ~[l] fun x ↦ (v x)⁻¹ := by
rw [isEquivalent_iff_exists_eq_mul] at * rcases huv with βŸ¨Ο†, hΟ†, h⟩ rw [← inv_one] refine ⟨fun x ↦ (Ο† x)⁻¹, Tendsto.invβ‚€ hΟ† (by norm_num), ?_⟩ convert h.inv simp [mul_comm]
/- Copyright (c) 2022 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.Probability.IdentDistrib import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.Analysis.SpecificLimits.FloorPow import Mathli...
Mathlib/Probability/StrongLaw.lean
178
180
theorem integral_truncation_eq_intervalIntegral (hf : AEStronglyMeasurable f ΞΌ) {A : ℝ} (hA : 0 ≀ A) : ∫ x, truncation f A x βˆ‚ΞΌ = ∫ y in -A..A, y βˆ‚Measure.map f ΞΌ := by
simpa using moment_truncation_eq_intervalIntegral hf hA one_ne_zero
/- Copyright (c) 2021 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Data.ENat.Lattice import Mathlib.Data.Nat.Lattice import Mathlib.Data.Setoid.Partition imp...
Mathlib/Combinatorics/SimpleGraph/Coloring.lean
466
472
theorem IsClique.card_le_of_coloring {s : Finset V} (h : G.IsClique s) [Fintype Ξ±] (C : G.Coloring Ξ±) : s.card ≀ Fintype.card Ξ± := by
rw [isClique_iff_induce_eq] at h have f : G.induce ↑s β†ͺg G := Embedding.comap (Function.Embedding.subtype fun x => x ∈ ↑s) G rw [h] at f convert Fintype.card_le_of_injective _ (C.comp f.toHom).injective_of_top_hom using 1 simp
/- Copyright (c) 2018 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Markus Himmel, Bhavik Mehta, Andrew Yang, Emily Riehl -/ import Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks import Mathlib.CategoryTheory.Limits.Shapes.BinaryPro...
Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean
627
632
theorem mono_snd_of_is_pullback_of_mono {t : PullbackCone f g} (ht : IsLimit t) [Mono f] : Mono t.snd := by
refine ⟨fun {W} h k i => IsLimit.hom_ext ht ?_ i⟩ rw [← cancel_mono f, Category.assoc, Category.assoc, condition] have := congrArg (Β· ≫ g) i; dsimp at this rwa [Category.assoc, Category.assoc] at this
/- Copyright (c) 2021 Adam Topaz. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle SΓΆnne, Adam Topaz -/ import Mathlib.Data.Setoid.Partition import Mathlib.Topology.Separation import Mathlib.Topology.LocallyConstant.Basic #align_import topology.discrete_quotient f...
Mathlib/Topology/DiscreteQuotient.lean
337
340
theorem ofLE_map (cond : LEComap f A B) (h : B ≀ B') (a : A) : ofLE h (map f cond a) = map f (cond.mono le_rfl h) a := by
rcases a with ⟨⟩ rfl
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Algebra.Order.Field.Canonical.Basic import Mathlib.Algebra.Or...
Mathlib/Data/Real/NNReal.lean
1,022
1,026
theorem _root_.Real.toNNReal_inv {x : ℝ} : Real.toNNReal x⁻¹ = (Real.toNNReal x)⁻¹ := by
rcases le_total 0 x with hx | hx Β· nth_rw 1 [← Real.coe_toNNReal x hx] rw [← NNReal.coe_inv, Real.toNNReal_coe] Β· rw [toNNReal_eq_zero.mpr hx, inv_zero, toNNReal_eq_zero.mpr (inv_nonpos.mpr hx)]
/- 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.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanpro...
Mathlib/Data/Sym/Sym2.lean
407
410
theorem mem_map {f : Ξ± β†’ Ξ²} {b : Ξ²} {z : Sym2 Ξ±} : b ∈ Sym2.map f z ↔ βˆƒ a, a ∈ z ∧ f a = b := by
induction' z using Sym2.ind with x y simp only [map_pair_eq, mem_iff, exists_eq_or_imp, exists_eq_left] aesop
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Kexing Ying -/ import Mathlib.LinearAlgebra.Matrix.Basis import Mathlib.LinearAlgebra.Matrix.Nondegenerate import Mathlib.LinearAlgebra.Matrix.NonsingularInverse import Mathl...
Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
483
485
theorem nondegenerate_toBilin'_iff_det_ne_zero {M : Matrix ΞΉ ΞΉ A} : M.toBilin'.Nondegenerate ↔ M.det β‰  0 := by
rw [Matrix.nondegenerate_toBilin'_iff, Matrix.nondegenerate_iff_det_ne_zero]
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.GroupTheory.GroupAction.Hom import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib....
Mathlib/MeasureTheory/Group/Measure.lean
193
200
theorem forall_measure_preimage_mul_right_iff (ΞΌ : Measure G) : (βˆ€ (g : G) (A : Set G), MeasurableSet A β†’ ΞΌ ((fun h => h * g) ⁻¹' A) = ΞΌ A) ↔ IsMulRightInvariant ΞΌ := by
trans βˆ€ g, map (Β· * g) ΞΌ = ΞΌ Β· simp_rw [Measure.ext_iff] refine forall_congr' fun g => forall_congr' fun A => forall_congr' fun hA => ?_ rw [map_apply (measurable_mul_const g) hA] exact ⟨fun h => ⟨h⟩, fun h => h.1⟩
/- Copyright (c) 2022 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.Analysis.Convex.Cone.Extension import Mathlib.Analysis.Convex.Gauge import Mathlib.Topology.Algebra.Module.FiniteDimension import Mathlib.Top...
Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
207
214
theorem iInter_halfspaces_eq (hs₁ : Convex ℝ s) (hsβ‚‚ : IsClosed s) : β‹‚ l : E β†’L[ℝ] ℝ, { x | βˆƒ y ∈ s, l x ≀ l y } = s := by
rw [Set.iInter_setOf] refine Set.Subset.antisymm (fun x hx => ?_) fun x hx l => ⟨x, hx, le_rfl⟩ by_contra h obtain ⟨l, s, hlA, hl⟩ := geometric_hahn_banach_closed_point hs₁ hsβ‚‚ h obtain ⟨y, hy, hxy⟩ := hx l exact ((hxy.trans_lt (hlA y hy)).trans hl).not_le le_rfl
/- Copyright (c) 2022 Andrew Yang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Andrew Yang -/ import Mathlib.Topology.Sets.Opens #align_import topology.local_at_target from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" /-! # Properties ...
Mathlib/Topology/LocalAtTarget.lean
159
166
theorem openEmbedding_iff_openEmbedding_of_iSup_eq_top (h : Continuous f) : OpenEmbedding f ↔ βˆ€ i, OpenEmbedding ((U i).1.restrictPreimage f) := by
simp_rw [openEmbedding_iff] rw [forall_and] apply and_congr Β· apply embedding_iff_embedding_of_iSup_eq_top <;> assumption Β· simp_rw [Set.range_restrictPreimage] apply isOpen_iff_coe_preimage_of_iSup_eq_top hU
/- 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.Algebra.BigOperators.Group.Finset import Mathlib.Data.Fintype.Card #align_import data.multiset.fintype from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f...
Mathlib/Data/Multiset/Fintype.lean
248
251
theorem Multiset.prod_eq_prod_coe [CommMonoid α] (m : Multiset α) : m.prod = ∏ x : m, (x : α) := by
congr -- Porting note: `simp` fails with "maximum recursion depth has been reached" erw [map_univ_coe]
/- Copyright (c) 2023 Luke Mantle. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Luke Mantle -/ import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Data.Nat.Factorial.DoubleFactorial #align_import ring_theory.polynomial.h...
Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
55
56
theorem hermite_succ (n : β„•) : hermite (n + 1) = X * hermite n - derivative (hermite n) := by
rw [hermite]
/- Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: SΓ©bastien GouΓ«zel -/ import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Topology.MetricSpace.IsometricSMul #align_import topology.metric_space.hausdorff_distance from "lea...
Mathlib/Topology/MetricSpace/HausdorffDistance.lean
610
611
theorem mem_closure_iff_infDist_zero (h : s.Nonempty) : x ∈ closure s ↔ infDist x s = 0 := by
simp [mem_closure_iff_infEdist_zero, infDist, ENNReal.toReal_eq_zero_iff, infEdist_ne_top h]
/- Copyright (c) 2022 Bolton Bailey. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Bolton Bailey, Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle SΓΆnne -/ import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.spec...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
408
418
theorem floor_logb_natCast {b : β„•} {r : ℝ} (hb : 1 < b) (hr : 0 ≀ r) : ⌊logb b rβŒ‹ = Int.log b r := by
obtain rfl | hr := hr.eq_or_lt Β· rw [logb_zero, Int.log_zero_right, Int.floor_zero] have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb apply le_antisymm Β· rw [← Int.zpow_le_iff_le_log hb hr, ← rpow_intCast b] refine le_of_le_of_eq ?_ (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr) exact rpow_le_rpow_...
/- 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.Fintype.Basic import Mathlib.Data.Finset.Card import Mathlib.Data.List.NodupEquivFin import Mathlib.Data.Set.Image #align_import data.fintype.car...
Mathlib/Data/Fintype/Card.lean
151
152
theorem card_congr {Ξ± Ξ²} [Fintype Ξ±] [Fintype Ξ²] (f : Ξ± ≃ Ξ²) : card Ξ± = card Ξ² := by
rw [← ofEquiv_card f]; congr; apply Subsingleton.elim
/- 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.Zip import Mathlib.Data.Nat.Defs import Mathlib.Data.List.Infix #align_import data.list.rotate f...
Mathlib/Data/List/Rotate.lean
93
100
theorem rotate'_length_mul (l : List Ξ±) : βˆ€ n : β„•, l.rotate' (l.length * n) = l | 0 => by simp | n + 1 => calc l.rotate' (l.length * (n + 1)) = (l.rotate' (l.length * n)).rotate' (l.rotate' (l.length * n)).length := by
simp [-rotate'_length, Nat.mul_succ, rotate'_rotate'] _ = l := by rw [rotate'_length, rotate'_length_mul l n]
/- 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
569
570
theorem arg_coe_angle_eq_iff {x y : β„‚} : (arg x : Real.Angle) = arg y ↔ arg x = arg y := by
simp_rw [← Real.Angle.toReal_inj, arg_coe_angle_toReal_eq_arg]
/- 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.SetTheory.Ordinal.Basic import Mathlib.Data.Nat.SuccPred #align_import set_theory.ordinal.arithmetic fro...
Mathlib/SetTheory/Ordinal/Arithmetic.lean
1,039
1,039
theorem zero_mod (b : Ordinal) : 0 % b = 0 := by
simp only [mod_def, zero_div, mul_zero, sub_self]
/- Copyright (c) 2017 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Keeley Hoek -/ import Mathlib.Algebra.NeZero import Mathlib.Data.Nat.Defs import Mathlib.Logic.Embedding.Basic import Mathlib.Logic.Equiv.Set import Mathlib.Tactic.Co...
Mathlib/Data/Fin/Basic.lean
1,004
1,006
theorem coe_eq_castSucc {a : Fin n} : (a : Fin (n + 1)) = castSucc a := by
ext exact val_cast_of_lt (Nat.lt.step a.is_lt)
/- 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.SetTheory.Cardinal.Basic import Mathlib.Topology.MetricSpace.Closeds import Mathlib.Topology.MetricSpace.Completion import Mathlib.Topology.Metri...
Mathlib/Topology/MetricSpace/GromovHausdorff.lean
790
956
theorem totallyBounded {t : Set GHSpace} {C : ℝ} {u : β„• β†’ ℝ} {K : β„• β†’ β„•} (ulim : Tendsto u atTop (𝓝 0)) (hdiam : βˆ€ p ∈ t, diam (univ : Set (GHSpace.Rep p)) ≀ C) (hcov : βˆ€ p ∈ t, βˆ€ n : β„•, βˆƒ s : Set (GHSpace.Rep p), (#s) ≀ K n ∧ univ βŠ† ⋃ x ∈ s, ball x (u n)) : TotallyBounded t := by
/- Let `Ξ΄>0`, and `Ξ΅ = Ξ΄/5`. For each `p`, we construct a finite subset `s p` of `p`, which is `Ξ΅`-dense and has cardinality at most `K n`. Encoding the mutual distances of points in `s p`, up to `Ξ΅`, we will get a map `F` associating to `p` finitely many data, and making it possible to reconstruct `p` u...
/- 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.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.LinearAlgebra.StdBasis import Mathlib.Ri...
Mathlib/LinearAlgebra/Matrix/ToLin.lean
593
602
theorem LinearMap.toMatrix_apply (f : M₁ β†’β‚—[R] Mβ‚‚) (i : m) (j : n) : LinearMap.toMatrix v₁ vβ‚‚ f i j = vβ‚‚.repr (f (v₁ j)) i := by
rw [LinearMap.toMatrix, LinearEquiv.trans_apply, LinearMap.toMatrix'_apply, LinearEquiv.arrowCongr_apply, Basis.equivFun_symm_apply, Finset.sum_eq_single j, if_pos rfl, one_smul, Basis.equivFun_apply] Β· intro j' _ hj' rw [if_neg hj', zero_smul] Β· intro hj have := Finset.mem_univ j contradicti...
/- Copyright (c) 2023 Peter Nelson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Peter Nelson -/ import Mathlib.Data.Matroid.Basic /-! # Matroid Independence and Basis axioms Matroids in mathlib are defined axiomatically in terms of bases, but can be described just...
Mathlib/Data/Matroid/IndepAxioms.lean
265
281
theorem _root_.Matroid.existsMaximalSubsetProperty_of_bdd {P : Set Ξ± β†’ Prop} (hP : βˆƒ (n : β„•), βˆ€ Y, P Y β†’ Y.encard ≀ n) (X : Set Ξ±) : ExistsMaximalSubsetProperty P X := by
obtain ⟨n, hP⟩ := hP rintro I hI hIX have hfin : Set.Finite (ncard '' {Y | P Y ∧ I βŠ† Y ∧ Y βŠ† X}) := by rw [finite_iff_bddAbove, bddAbove_def] simp_rw [ENat.le_coe_iff] at hP use n rintro x ⟨Y, ⟨hY,-,-⟩, rfl⟩ obtain ⟨nβ‚€, heq, hle⟩ := hP Y hY rwa [ncard_def, heq, ENat.toNat_coe] -- have...
/- 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.Analytic.Basic import Mathlib.Analysis.Analytic.CPolynomial import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Co...
Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
469
474
theorem iteratedFDeriv_zero_apply_diag : iteratedFDeriv π•œ 0 f x = p 0 := by
ext convert (h.hasSum <| EMetric.mem_ball_self h.r_pos).tsum_eq.symm Β· rw [iteratedFDeriv_zero_apply, add_zero] Β· rw [tsum_eq_single 0 fun n hn ↦ by haveI := NeZero.mk hn; exact (p n).map_zero] exact congr(p 0 $(Subsingleton.elim _ _))
/- Copyright (c) 2022 Zhouhang Zhou. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Zhouhang Zhou, Yury Kudryashov, Heather Macbeth -/ import Mathlib.MeasureTheory.Function.L1Space import Mathlib.MeasureTheory.Function.SimpleFuncDense #align_import measure_theory.func...
Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
797
798
theorem coeFn_le (f g : Lp.simpleFunc G p ΞΌ) : (f : Ξ± β†’ G) ≀ᡐ[ΞΌ] g ↔ f ≀ g := by
rw [← Subtype.coe_le_coe, ← Lp.coeFn_le]
/- Copyright (c) 2020 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial....
Mathlib/RingTheory/Polynomial/Pochhammer.lean
331
339
theorem descPochhammer_succ_comp_X_sub_one (n : β„•) : (descPochhammer R (n + 1)).comp (X - 1) = descPochhammer R (n + 1) - (n + (1 : R[X])) β€’ (descPochhammer R n).comp (X - 1) := by
suffices (descPochhammer β„€ (n + 1)).comp (X - 1) = descPochhammer β„€ (n + 1) - (n + 1) * (descPochhammer β„€ n).comp (X - 1) by simpa [map_comp] using congr_arg (Polynomial.map (Int.castRingHom R)) this nth_rw 2 [descPochhammer_succ_left] rw [← sub_mul, descPochhammer_succ_right β„€ n, mul_comp, mul_comm, s...
/- Copyright (c) 2021 Kexing Ying. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kexing Ying -/ import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.Analysis.Complex.Basic #align_import measure_theory.measure.vector_measure from "leanprover-community/mathl...
Mathlib/MeasureTheory/Measure/VectorMeasure.lean
1,369
1,372
theorem toMeasureOfLEZero_toSignedMeasure (hs : s ≀[Set.univ] 0) : (s.toMeasureOfLEZero Set.univ MeasurableSet.univ hs).toSignedMeasure = -s := by
ext i hi simp [hi, toMeasureOfLEZero_apply _ _ _ hi]
/- Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: SΓ©bastien GouΓ«zel, Floris van Doorn -/ import Mathlib.Geometry.Manifold.ChartedSpace #align_import geometry.manifold.local_invariant_properties from "leanprover-community/mathlib"@...
Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
121
136
theorem left_invariance {s : Set H} {x : H} {f : H β†’ H'} {e' : PartialHomeomorph H' H'} (he' : e' ∈ G') (hfs : ContinuousWithinAt f s x) (hxe' : f x ∈ e'.source) : P (e' ∘ f) s x ↔ P f s x := by
have h2f := hfs.preimage_mem_nhdsWithin (e'.open_source.mem_nhds hxe') have h3f := ((e'.continuousAt hxe').comp_continuousWithinAt hfs).preimage_mem_nhdsWithin <| e'.symm.open_source.mem_nhds <| e'.mapsTo hxe' constructor Β· intro h rw [hG.is_local_nhds h3f] at h have h2 := hG.left_invariance'...
/- Copyright (c) 2023 Junyan Xu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Junyan Xu -/ import Mathlib.LinearAlgebra.FreeModule.IdealQuotient import Mathlib.RingTheory.Norm #align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"90b0d53...
Mathlib/LinearAlgebra/FreeModule/Norm.lean
74
84
theorem finrank_quotient_span_eq_natDegree_norm [Algebra F S] [IsScalarTower F F[X] S] (b : Basis ΞΉ F[X] S) {f : S} (hf : f β‰  0) : FiniteDimensional.finrank F (S β§Έ span ({f} : Set S)) = (Algebra.norm F[X] f).natDegree := by
haveI := Fintype.ofFinite ΞΉ have h := span_singleton_eq_bot.not.2 hf rw [natDegree_eq_of_degree_eq (degree_eq_degree_of_associated <| associated_norm_prod_smith b hf)] rw [natDegree_prod _ _ fun i _ => smithCoeffs_ne_zero b _ h i, finrank_quotient_eq_sum F h b] -- finrank_quotient_eq_sum slow congr w...
/- 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.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
156
165
theorem exp_eq_one_iff {x : β„‚} : exp x = 1 ↔ βˆƒ n : β„€, x = n * (2 * Ο€ * I) := by
constructor Β· intro h rcases existsUnique_add_zsmul_mem_Ioc Real.two_pi_pos x.im (-Ο€) with ⟨n, hn, -⟩ use -n rw [Int.cast_neg, neg_mul, eq_neg_iff_add_eq_zero] have : (x + n * (2 * Ο€ * I)).im ∈ Set.Ioc (-Ο€) Ο€ := by simpa [two_mul, mul_add] using hn rw [← log_exp this.1 this.2, exp_periodic.int_...
/- 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 #align_import order.disjoint from "leanprover-community/mathlib"@"22c4d2ff43714b6ff724b2745ccfdc0f236a4a76" /-! # Dis...
Mathlib/Order/Disjoint.lean
147
148
theorem disjoint_assoc : Disjoint (a βŠ“ b) c ↔ Disjoint a (b βŠ“ c) := by
rw [disjoint_iff_inf_le, disjoint_iff_inf_le, inf_assoc]
/- 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.Data.Finset.Prod import Mathlib.Data.Sym.Basic import Mathlib.Data.Sym.Sym2.Init import Mathlib.Data.SetLike.Basic #align_import data.sym.sym2 from "leanpro...
Mathlib/Data/Sym/Sym2.lean
192
195
theorem mk_eq_mk_iff {p q : Ξ± Γ— Ξ±} : Sym2.mk p = Sym2.mk q ↔ p = q ∨ p = q.swap := by
cases p cases q simp only [eq_iff, Prod.mk.inj_iff, Prod.swap_prod_mk]
/- 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.FiniteDimensional import Mathlib.LinearAlgebra.GeneralLinearGroup import Mathlib.LinearAlgebra....
Mathlib/LinearAlgebra/Determinant.lean
293
302
theorem det_eq_one_of_finrank_eq_zero {π•œ : Type*} [Field π•œ] {M : Type*} [AddCommGroup M] [Module π•œ M] (h : FiniteDimensional.finrank π•œ M = 0) (f : M β†’β‚—[π•œ] M) : LinearMap.det (f : M β†’β‚—[π•œ] M) = 1 := by
classical refine @LinearMap.det_cases M _ π•œ _ _ _ (fun t => t = 1) f ?_ rfl intro s b have : IsEmpty s := by rw [← Fintype.card_eq_zero_iff] exact (FiniteDimensional.finrank_eq_card_basis b).symm.trans h exact Matrix.det_isEmpty
/- 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.RingTheory.TensorProduct.Basic import Mathlib.Algebra.Module.ULift #align_import ring_theory.is_tensor_product from "leanprover-community/mathlib"@"c4926d76...
Mathlib/RingTheory/IsTensorProduct.lean
60
65
theorem TensorProduct.isTensorProduct : IsTensorProduct (TensorProduct.mk R M N) := by
delta IsTensorProduct convert_to Function.Bijective (LinearMap.id : M βŠ—[R] N β†’β‚—[R] M βŠ—[R] N) using 2 Β· apply TensorProduct.ext' simp Β· exact Function.bijective_id
/- 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, Scott Morrison, Jens Wagemaker, Johan Commelin -/ import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.BigOperators import Mathlib...
Mathlib/Algebra/Polynomial/RingDivision.lean
553
556
theorem le_rootMultiplicity_mul {p q : R[X]} (x : R) (hpq : p * q β‰  0) : rootMultiplicity x p + rootMultiplicity x q ≀ rootMultiplicity x (p * q) := by
rw [le_rootMultiplicity_iff hpq, pow_add] exact mul_dvd_mul (pow_rootMultiplicity_dvd p x) (pow_rootMultiplicity_dvd q x)
/- Copyright (c) 2016 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.Logic.Nonempty import Mathlib.Init.Set import Mathlib.Logic.Basic #align_import logic.function.basic from "leanprover-community/mathli...
Mathlib/Logic/Function/Basic.lean
89
91
theorem Injective.beq_eq {Ξ± Ξ² : Type*} [BEq Ξ±] [LawfulBEq Ξ±] [BEq Ξ²] [LawfulBEq Ξ²] {f : Ξ± β†’ Ξ²} (I : Injective f) {a b : Ξ±} : (f a == f b) = (a == b) := by
by_cases h : a == b <;> simp [h] <;> simpa [I.eq_iff] using h
/- Copyright (c) 2019 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard -/ import Mathlib.Data.Real.Basic import Mathlib.Data.ENNReal.Real import Mathlib.Data.Sign #align_import data.real.ereal from "leanprover-community/mathlib"@"2196ab363eb...
Mathlib/Data/Real/EReal.lean
1,225
1,225
theorem abs_zero : (0 : EReal).abs = 0 := by
rw [abs_eq_zero_iff]
/- Copyright (c) 2020 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import comp...
Mathlib/Computability/TMToPartrec.lean
1,923
1,925
theorem supports_biUnion {K : Option Ξ“' β†’ Finset Ξ›'} {S} : Supports (Finset.univ.biUnion K) S ↔ βˆ€ a, Supports (K a) S := by
simp [Supports]; apply forall_swap
/- Copyright (c) 2017 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Mario Carneiro, Patrick Massot -/ import Mathlib.Topology.Maps import Mathlib.Topology.NhdsSet #align_import topology.constructions from "leanprover-community/mathlib"...
Mathlib/Topology/Constructions.lean
1,478
1,481
theorem set_pi_mem_nhds {i : Set ΞΉ} {s : βˆ€ a, Set (Ο€ a)} {x : βˆ€ a, Ο€ a} (hi : i.Finite) (hs : βˆ€ a ∈ i, s a ∈ 𝓝 (x a)) : pi i s ∈ 𝓝 x := by
rw [pi_def, biInter_mem hi] exact fun a ha => (continuous_apply a).continuousAt (hs a ha)
/- Copyright (c) 2019 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: SΓ©bastien GouΓ«zel -/ import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Normed.Group.Lemmas import Mathlib.Analysis.NormedSpace.AddTorsor import Mathli...
Mathlib/Analysis/NormedSpace/FiniteDimension.lean
404
424
theorem exists_norm_le_le_norm_sub_of_finset {c : π•œ} (hc : 1 < β€–cβ€–) {R : ℝ} (hR : β€–cβ€– < R) (h : Β¬FiniteDimensional π•œ E) (s : Finset E) : βˆƒ x : E, β€–xβ€– ≀ R ∧ βˆ€ y ∈ s, 1 ≀ β€–y - xβ€– := by
let F := Submodule.span π•œ (s : Set E) haveI : FiniteDimensional π•œ F := Module.finite_def.2 ((Submodule.fg_top _).2 (Submodule.fg_def.2 ⟨s, Finset.finite_toSet _, rfl⟩)) have Fclosed : IsClosed (F : Set E) := Submodule.closed_of_finiteDimensional _ have : βˆƒ x, x βˆ‰ F := by contrapose! h have ...
/- 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.Equiv.Basic import Mathlib.Data.ENat.Lattice import Mathlib.Data.Part import Mathlib.Tactic.NormNum #align_import data.nat.part_enat from "l...
Mathlib/Data/Nat/PartENat.lean
513
515
theorem lt_add_one {x : PartENat} (hx : x β‰  ⊀) : x < x + 1 := by
rw [PartENat.lt_add_iff_pos_right hx] norm_cast
/- Copyright (c) 2020 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov, Patrick Massot, SΓ©bastien GouΓ«zel -/ import Mathlib.Order.Interval.Set.Disjoint import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.M...
Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
303
305
theorem div_const {π•œ : Type*} {f : ℝ β†’ π•œ} [NormedField π•œ] (h : IntervalIntegrable f ΞΌ a b) (c : π•œ) : IntervalIntegrable (fun x => f x / c) ΞΌ a b := by
simpa only [div_eq_mul_inv] using mul_const h c⁻¹
/- Copyright (c) 2020 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov -/ import Mathlib.Analysis.Convex.Function import Mathlib.Analysis.Convex.StrictConvexSpace import Mathlib.MeasureTheory.Function.AEEqOfIntegral import Mathlib.M...
Mathlib/Analysis/Convex/Integral.lean
326
339
theorem ae_eq_const_or_norm_average_lt_of_norm_le_const [StrictConvexSpace ℝ E] (h_le : βˆ€α΅ x βˆ‚ΞΌ, β€–f xβ€– ≀ C) : f =ᡐ[ΞΌ] const Ξ± (⨍ x, f x βˆ‚ΞΌ) ∨ ‖⨍ x, f x βˆ‚ΞΌβ€– < C := by
rcases le_or_lt C 0 with hC0 | hC0 · have : f =ᡐ[μ] 0 := h_le.mono fun x hx => norm_le_zero_iff.1 (hx.trans hC0) simp only [average_congr this, Pi.zero_apply, average_zero] exact Or.inl this by_cases hfi : Integrable f μ; swap · simp [average_eq, integral_undef hfi, hC0, ENNReal.toReal_pos_iff] rcase...
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import Mathlib.Algebra.Polynomial.Expand import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Matrix.Charpoly.LinearMap import Mathlib.RingTheory.Adjoin....
Mathlib/RingTheory/IntegralClosure.lean
623
637
theorem leadingCoeff_smul_normalizeScaleRoots (p : R[X]) : p.leadingCoeff β€’ normalizeScaleRoots p = scaleRoots p p.leadingCoeff := by
ext simp only [coeff_scaleRoots, normalizeScaleRoots, coeff_monomial, coeff_smul, Finset.smul_sum, Ne, Finset.sum_ite_eq', finset_sum_coeff, smul_ite, smul_zero, mem_support_iff] -- Porting note: added the following `simp only` simp only [ge_iff_le, tsub_le_iff_right, smul_eq_mul, mul_ite, mul_one, mul_zer...
/- 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.Opposites #align_import linear_algebra.clifford_algebra.conjugation from "leanprover-com...
Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
345
351
theorem involute_eq_of_mem_odd {x : CliffordAlgebra Q} (h : x ∈ evenOdd Q 1) : involute x = -x := by
induction x, h using odd_induction with | ΞΉ m => exact involute_ΞΉ _ | add x y _hx _hy ihx ihy => rw [map_add, ihx, ihy, neg_add] | ΞΉ_mul_ΞΉ_mul m₁ mβ‚‚ x _hx ihx => rw [map_mul, map_mul, involute_ΞΉ, involute_ΞΉ, ihx, neg_mul_neg, mul_neg]
/- Copyright (c) 2020 Kevin Buzzard, Bhavik Mehta. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Bhavik Mehta -/ import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Equalizers import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products import Mathl...
Mathlib/CategoryTheory/Sites/Sheaf.lean
650
656
theorem w : forkMap R P ≫ firstMap R P = forkMap R P ≫ secondMap R P := by
apply limit.hom_ext rintro ⟨⟨Y, f, hf⟩, ⟨Z, g, hg⟩⟩ simp only [firstMap, secondMap, forkMap, limit.lift_Ο€, limit.lift_Ο€_assoc, assoc, Fan.mk_Ο€_app, Subtype.coe_mk] rw [← P.map_comp, ← op_comp, pullback.condition] simp
/- Copyright (c) 2022 Joseph Myers. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Myers -/ import Mathlib.Algebra.ModEq import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Periodic import Mathlib.Data.Int.SuccPred ...
Mathlib/Algebra/Order/ToIntervalMod.lean
1,002
1,006
theorem toIcoDiv_eq_floor (a b : Ξ±) : toIcoDiv hp a b = ⌊(b - a) / pβŒ‹ := by
refine toIcoDiv_eq_of_sub_zsmul_mem_Ico hp ?_ rw [Set.mem_Ico, zsmul_eq_mul, ← sub_nonneg, add_comm, sub_right_comm, ← sub_lt_iff_lt_add, sub_right_comm _ _ a] exact ⟨Int.sub_floor_div_mul_nonneg _ hp, Int.sub_floor_div_mul_lt _ hp⟩
/- 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.Sites.Sieves #align_import category_theory.sites.sheaf_of_types from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e622...
Mathlib/CategoryTheory/Sites/IsSheafFor.lean
766
776
theorem isSheafFor_arrows_iff : (ofArrows X Ο€).IsSheafFor P ↔ (βˆ€ (x : (i : I) β†’ P.obj (op (X i))), Arrows.Compatible P Ο€ x β†’ βˆƒ! t, βˆ€ i, P.map (Ο€ i).op t = x i) := by
refine ⟨fun h x hx ↦ ?_, fun h x hx ↦ ?_⟩ Β· obtain ⟨t, ht₁, htβ‚‚βŸ© := h _ hx.familyOfElements_compatible refine ⟨t, fun i ↦ ?_, fun t' ht' ↦ htβ‚‚ _ fun _ _ ⟨i⟩ ↦ ?_⟩ Β· rw [ht₁ _ (ofArrows.mk i), hx.familyOfElements_ofArrows_mk] Β· rw [ht', hx.familyOfElements_ofArrows_mk] Β· obtain ⟨t, hA, ht⟩ := h (fun i...
/- Copyright (c) 2021 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.Algebra.Homology.Linear import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex import Mathlib.Tactic.Abel #align_import algebra.homology.homo...
Mathlib/Algebra/Homology/Homotopy.lean
343
353
theorem map_nullHomotopicMap' {W : Type*} [Category W] [Preadditive W] (G : V β₯€ W) [G.Additive] (hom : βˆ€ i j, c.Rel j i β†’ (C.X i ⟢ D.X j)) : (G.mapHomologicalComplex c).map (nullHomotopicMap' hom) = nullHomotopicMap' fun i j hij => by exact G.map (hom i j hij) := by
ext n erw [map_nullHomotopicMap] congr ext i j split_ifs Β· rfl Β· rw [G.map_zero]
/- Copyright (c) 2021 Eric Wieser. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eric Wieser -/ import Mathlib.Algebra.GradedMonoid import Mathlib.Algebra.DirectSum.Basic #align_import algebra.direct_sum.ring from "leanprover-community/mathlib"@"70fd9563a21e7b963887c...
Mathlib/Algebra/DirectSum/Ring.lean
291
299
theorem ofList_dProd {Ξ±} (l : List Ξ±) (fΞΉ : Ξ± β†’ ΞΉ) (fA : βˆ€ a, A (fΞΉ a)) : of A _ (l.dProd fΞΉ fA) = (l.map fun a => of A (fΞΉ a) (fA a)).prod := by
induction' l with head tail Β· simp only [List.map_nil, List.prod_nil, List.dProd_nil] rfl Β· rename_i ih simp only [List.map_cons, List.prod_cons, List.dProd_cons, ← ih] rw [DirectSum.of_mul_of (fA head)] rfl
/- Copyright (c) 2019 Calle SΓΆnne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle SΓΆnne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
637
639
theorem neg_pi_div_two_ne_zero : ((-Ο€ / 2 : ℝ) : Angle) β‰  0 := by
rw [← toReal_injective.ne_iff, toReal_neg_pi_div_two, toReal_zero] exact div_ne_zero (neg_ne_zero.2 Real.pi_ne_zero) two_ne_zero
/- Copyright (c) 2021 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino, Kyle Miller -/ import Mathlib.Combinatorics.SimpleGraph.Clique import Mathlib.Data.ENat.Lattice import Mathlib.Data.Nat.Lattice import Mathlib.Data.Setoid.Partition imp...
Mathlib/Combinatorics/SimpleGraph/Coloring.lean
283
288
theorem chromaticNumber_ne_top_iff_exists : G.chromaticNumber β‰  ⊀ ↔ βˆƒ n, G.Colorable n := by
rw [chromaticNumber] convert_to β¨… n : {m | G.Colorable m}, (n : β„•βˆž) β‰  ⊀ ↔ _ Β· rw [iInf_subtype] rw [← lt_top_iff_ne_top, ENat.iInf_coe_lt_top] simp
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Devon Tuma, Oliver Nash -/ import Mathlib.Algebra.Associated import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Ring.Opposite import Mathlib.GroupTheory.Gro...
Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
182
191
theorem mul_mem_nonZeroDivisors {a b : M₁} : a * b ∈ M₁⁰ ↔ a ∈ M₁⁰ ∧ b ∈ M₁⁰ := by
constructor Β· intro h constructor <;> intro x h' <;> apply h Β· rw [← mul_assoc, h', zero_mul] Β· rw [mul_comm a b, ← mul_assoc, h', zero_mul] Β· rintro ⟨ha, hb⟩ x hx apply ha apply hb rw [mul_assoc, hx]
/- Copyright (c) 2022 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.SpecialFunctions.Gamma.Basic import Mathlib.Analysis.SpecialFunctions.PolarCoord import Mathlib.Analysis.Convex.Complex #align_import a...
Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
252
269
theorem continuousAt_gaussian_integral (b : β„‚) (hb : 0 < re b) : ContinuousAt (fun c : β„‚ => ∫ x : ℝ, cexp (-c * (x : β„‚) ^ 2)) b := by
let f : β„‚ β†’ ℝ β†’ β„‚ := fun (c : β„‚) (x : ℝ) => cexp (-c * (x : β„‚) ^ 2) obtain ⟨d, hd, hd'⟩ := exists_between hb have f_meas : βˆ€ c : β„‚, AEStronglyMeasurable (f c) volume := fun c => by apply Continuous.aestronglyMeasurable exact Complex.continuous_exp.comp (continuous_const.mul (continuous_ofReal.pow 2)) h...
/- Copyright (c) 2021 Kevin Buzzard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kevin Buzzard, Ines Wright, Joachim Breitner -/ import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Solvable import Mathlib.GroupTheory.PGroup import Mathlib.GroupTheory...
Mathlib/GroupTheory/Nilpotent.lean
491
501
theorem lowerCentralSeries.map {H : Type*} [Group H] (f : G β†’* H) (n : β„•) : Subgroup.map f (lowerCentralSeries G n) ≀ lowerCentralSeries H n := by
induction' n with d hd · simp [Nat.zero_eq] · rintro a ⟨x, hx : x ∈ lowerCentralSeries G d.succ, rfl⟩ refine closure_induction hx ?_ (by simp [f.map_one, Subgroup.one_mem _]) (fun y z hy hz => by simp [MonoidHom.map_mul, Subgroup.mul_mem _ hy hz]) (fun y hy => by rw [f.map_inv]; exact Subgroup....
/- 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, Scott Morrison, Jens Wagemaker -/ import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Induction #align_import data.polyn...
Mathlib/Algebra/Polynomial/Eval.lean
153
161
theorem evalβ‚‚_sum (p : T[X]) (g : β„• β†’ T β†’ R[X]) (x : S) : (p.sum g).evalβ‚‚ f x = p.sum fun n a => (g n a).evalβ‚‚ f x := by
let T : R[X] β†’+ S := { toFun := evalβ‚‚ f x map_zero' := evalβ‚‚_zero _ _ map_add' := fun p q => evalβ‚‚_add _ _ } have A : βˆ€ y, evalβ‚‚ f x y = T y := fun y => rfl simp only [A] rw [sum, map_sum, sum]
/- 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.Order.Ring.Defs import Mathlib.Data.Set.Finite #align_import order.filter.basic from "leanprover-community/mathlib"@"d4f691b9e5...
Mathlib/Order/Filter/Basic.lean
1,741
1,743
theorem eventuallyLE_antisymm_iff [PartialOrder Ξ²] {l : Filter Ξ±} {f g : Ξ± β†’ Ξ²} : f =αΆ [l] g ↔ f ≀ᢠ[l] g ∧ g ≀ᢠ[l] f := by
simp only [EventuallyEq, EventuallyLE, le_antisymm_iff, eventually_and]
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Data.Set.Lattice import Mathlib.Logic.Small.Basic import Mathlib.Logic.Function.OfArity import Mathlib.Order.WellFounded #align_import set_theory.zfc....
Mathlib/SetTheory/ZFC/Basic.lean
1,272
1,291
theorem pair_injective : Function.Injective2 pair := fun x x' y y' H => by have ae := ext_iff.1 H simp only [pair, mem_pair] at ae obtain rfl : x = x' := by
cases' (ae {x}).1 (by simp) with h h Β· exact singleton_injective h Β· have m : x' ∈ ({x} : ZFSet) := by simp [h] rw [mem_singleton.mp m] have he : x = y β†’ y = y' := by rintro rfl cases' (ae {x, y'}).2 (by simp only [eq_self_iff_true, or_true_iff]) with xy'x xy'xx Β· rw [eq_comm, ← mem_sin...
/- Copyright (c) 2020 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import Mathlib.Data.Matrix.Basis import Mathlib.Data.Matrix.DMatrix import Mathlib.Algebra.Lie.Abelian import Mathlib.LinearAlgebra.Matrix.Trace import Mathlib.Algebra.Lie....
Mathlib/Algebra/Lie/Classical.lean
122
130
theorem sl_non_abelian [Fintype n] [Nontrivial R] (h : 1 < Fintype.card n) : Β¬IsLieAbelian (sl n R) := by
rcases Fintype.exists_pair_of_one_lt_card h with ⟨j, i, hij⟩ let A := Eb R i j hij let B := Eb R j i hij.symm intro c have c' : A.val * B.val = B.val * A.val := by rw [← sub_eq_zero, ← sl_bracket, c.trivial, ZeroMemClass.coe_zero] simpa [A, B, stdBasisMatrix, Matrix.mul_apply, hij] using congr_fun (con...
/- Copyright (c) 2017 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl -/ import Mathlib.Algebra.Group.Indicator import Mathlib.Data.Finset.Piecewise import Mathlib.Data.Finset.Preimage #align_import algebra.big_operators.basic from "leanp...
Mathlib/Algebra/BigOperators/Group/Finset.lean
607
608
theorem prod_sum_elim (s : Finset Ξ±) (t : Finset Ξ³) (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ²) : ∏ x ∈ s.disjSum t, Sum.elim f g x = (∏ x ∈ s, f x) * ∏ x ∈ t, g x := by
simp
/- Copyright (c) 2024 Lawrence Wu. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Lawrence Wu -/ import Mathlib.Analysis.Fourier.Inversion /-! # Mellin inversion formula We derive the Mellin inversion formula as a consequence of the Fourier inversion formula. ## Mai...
Mathlib/Analysis/MellinInversion.lean
89
121
theorem mellin_inversion (Οƒ : ℝ) (f : ℝ β†’ E) {x : ℝ} (hx : 0 < x) (hf : MellinConvergent f Οƒ) (hFf : VerticalIntegrable (mellin f) Οƒ) (hfx : ContinuousAt f x) : mellinInv Οƒ (mellin f) x = f x := by
let g := fun (u : ℝ) => Real.exp (-Οƒ * u) β€’ f (Real.exp (-u)) replace hf : Integrable g := by rw [MellinConvergent, ← rexp_neg_image_aux, integrableOn_image_iff_integrableOn_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] at hf replace hf : Integrable fun (x : ℝ) ↦ cexp (-↑σ ...
/- 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.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Tactic.NthRewrite #align_import data.nat.gcd....
Mathlib/Data/Nat/GCD/Basic.lean
40
41
theorem gcd_add_mul_left_right (m n k : β„•) : gcd m (n + m * k) = gcd m n := by
simp [gcd_rec m (n + m * k), gcd_rec m n]
/- Copyright (c) 2019 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Kenny Lau -/ import Mathlib.RingTheory.DiscreteValuationRing.Basic import Mathlib.RingTheory.MvPowerSeries.Inverse import Mathlib.RingTheory.PowerSeries.Basic import M...
Mathlib/RingTheory/PowerSeries/Inverse.lean
253
256
theorem Inv_divided_by_X_pow_order_leftInv {f : k⟦X⟧} (hf : f β‰  0) : (Inv_divided_by_X_pow_order hf) * (divided_by_X_pow_order hf) = 1 := by
rw [mul_comm] exact mul_invOfUnit (divided_by_X_pow_order hf) (firstUnitCoeff hf) rfl
/- Copyright (c) 2021 Vladimir Goryachev. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: YaΓ«l Dillies, Vladimir Goryachev, Kyle Miller, Scott Morrison, Eric Rodriguez -/ import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.SuccPred import Mathlib.Order.Interval.Set.Mo...
Mathlib/Data/Nat/Nth.lean
354
355
theorem count_nth_succ {n : β„•} (hn : βˆ€ hf : (setOf p).Finite, n < hf.toFinset.card) : count p (nth p n + 1) = n + 1 := by
rw [count_succ, count_nth hn, if_pos (nth_mem _ hn)]
/- Copyright (c) 2020 Devon Tuma. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Devon Tuma -/ import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Ideal.Over import Mathlib.RingTheory.JacobsonIdeal #align_import ring_theory.jacobson from "leanp...
Mathlib/RingTheory/Jacobson.lean
426
452
theorem isJacobson_polynomial_of_isJacobson (hR : IsJacobson R) : IsJacobson R[X] := by
rw [isJacobson_iff_prime_eq] intro I hI let R' : Subring (R[X] β§Έ I) := ((Quotient.mk I).comp C).range let i : R β†’+* R' := ((Quotient.mk I).comp C).rangeRestrict have hi : Function.Surjective ↑i := ((Quotient.mk I).comp C).rangeRestrict_surjective have hi' : RingHom.ker (mapRingHom i) ≀ I := by intro f ...
/- 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, Mario Carneiro, Johan Commelin -/ import Mathlib.NumberTheory.Padics.PadicNumbers import Mathlib.RingTheory.DiscreteValuationRing.Basic #align_import number_theory.p...
Mathlib/NumberTheory/Padics/PadicIntegers.lean
385
388
theorem norm_eq_pow_val {x : β„€_[p]} (hx : x β‰  0) : β€–xβ€– = (p : ℝ) ^ (-x.valuation) := by
refine @Padic.norm_eq_pow_val p hp x ?_ contrapose! hx exact Subtype.val_injective hx
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Data.Int.Range import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.MulChar.Basic #align_import number_theory.legendre_symbol.zmod_char from "lean...
Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
125
128
theorem neg_one_pow_div_two_of_three_mod_four {n : β„•} (hn : n % 4 = 3) : (-1 : β„€) ^ (n / 2) = -1 := by
rw [← Ο‡β‚„_eq_neg_one_pow (Nat.odd_of_mod_four_eq_three hn), ← natCast_mod, hn] rfl
/- Copyright (c) 2020 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Mathlib.Logic.Encodable.Basic import Mathlib.Logic.Pairwise import Mathlib.Data.Set.Subsingleton #align_import logic.encodable.lattice from "leanprover-co...
Mathlib/Logic/Encodable/Lattice.lean
30
33
theorem iSup_decodeβ‚‚ [CompleteLattice Ξ±] (f : Ξ² β†’ Ξ±) : ⨆ (i : β„•) (b ∈ decodeβ‚‚ Ξ² i), f b = (⨆ b, f b) := by
rw [iSup_comm] simp only [mem_decodeβ‚‚, iSup_iSup_eq_right]
/- Copyright (c) 2022 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov, YaΓ«l Dillies -/ import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde9...
Mathlib/MeasureTheory/Integral/Average.lean
573
576
theorem measure_average_le_pos (hΞΌ : ΞΌ β‰  0) (hf : Integrable f ΞΌ) : 0 < ΞΌ {x | ⨍ a, f a βˆ‚ΞΌ ≀ f x} := by
simpa using measure_setAverage_le_pos (Measure.measure_univ_ne_zero.2 hΞΌ) (measure_ne_top _ _) hf.integrableOn
/- Copyright (c) 2022 Yury G. Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury G. Kudryashov, YaΓ«l Dillies -/ import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde9...
Mathlib/MeasureTheory/Integral/Average.lean
640
643
theorem exists_not_mem_null_le_integral (hf : Integrable f ΞΌ) (hN : ΞΌ N = 0) : βˆƒ x, x βˆ‰ N ∧ f x ≀ ∫ a, f a βˆ‚ΞΌ := by
simpa only [average_eq_integral] using exists_not_mem_null_le_average (IsProbabilityMeasure.ne_zero ΞΌ) hf hN
/- 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, Yury Kudryashov, Patrick Massot -/ import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order....
Mathlib/Order/Filter/AtTopBot.lean
1,601
1,605
theorem Tendsto.prod_atTop [SemilatticeSup Ξ±] [SemilatticeSup Ξ³] {f g : Ξ± β†’ Ξ³} (hf : Tendsto f atTop atTop) (hg : Tendsto g atTop atTop) : Tendsto (Prod.map f g) atTop atTop := by
rw [← prod_atTop_atTop_eq] exact hf.prod_map_prod_atTop hg
/- 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.Hom.Basic import Mathlib.Logic.Relation #align_import order.antisymmetrization from "leanprover-community/mathlib"@"3353f661228bd27f632c600cd1a58b87...
Mathlib/Order/Antisymmetrization.lean
153
156
theorem antisymmetrization_fibration : Relation.Fibration (Β· < Β·) (Β· < Β·) (@toAntisymmetrization Ξ± (Β· ≀ Β·) _) := by
rintro a ⟨b⟩ h exact ⟨b, h, rfl⟩
/- Copyright (c) 2017 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Mario Carneiro, Floris van Doorn -/ import Mathlib.Data.Finsupp.Multiset import Mathlib.Order.Bounded import Mathlib.SetTheory.Cardinal.PartENat import Mathlib.SetTheor...
Mathlib/SetTheory/Cardinal/Ordinal.lean
1,085
1,086
theorem mk_arrow_eq_zero_iff : #(Ξ± β†’ Ξ²') = 0 ↔ #Ξ± β‰  0 ∧ #Ξ²' = 0 := by
simp_rw [mk_eq_zero_iff, mk_ne_zero_iff, isEmpty_fun]
/- 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.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Tactic.ComputeDegree #align_import data.polynomia...
Mathlib/Algebra/Polynomial/CancelLeads.lean
52
71
theorem natDegree_cancelLeads_lt_of_natDegree_le_natDegree_of_comm (comm : p.leadingCoeff * q.leadingCoeff = q.leadingCoeff * p.leadingCoeff) (h : p.natDegree ≀ q.natDegree) (hq : 0 < q.natDegree) : (p.cancelLeads q).natDegree < q.natDegree := by
by_cases hp : p = 0 Β· convert hq simp [hp, cancelLeads] rw [cancelLeads, sub_eq_add_neg, tsub_eq_zero_iff_le.mpr h, pow_zero, mul_one] by_cases h0 : C p.leadingCoeff * q + -(C q.leadingCoeff * X ^ (q.natDegree - p.natDegree) * p) = 0 Β· exact (le_of_eq (by simp only [h0, natDegree_zero])).trans_lt hq ...
/- Copyright (c) 2019 Calle SΓΆnne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle SΓΆnne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
628
629
theorem toReal_eq_neg_pi_div_two_iff {ΞΈ : Angle} : ΞΈ.toReal = -Ο€ / 2 ↔ ΞΈ = (-Ο€ / 2 : ℝ) := by
rw [← toReal_inj, toReal_neg_pi_div_two]
/- 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, Alexander Bentkamp -/ import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators i...
Mathlib/LinearAlgebra/Basis.lean
1,533
1,589
theorem union_support_maximal_linearIndependent_eq_range_basis {ΞΉ : Type w} (b : Basis ΞΉ R M) {ΞΊ : Type w'} (v : ΞΊ β†’ M) (i : LinearIndependent R v) (m : i.Maximal) : ⋃ k, ((b.repr (v k)).support : Set ΞΉ) = Set.univ := by
-- If that's not the case, by_contra h simp only [← Ne.eq_def, ne_univ_iff_exists_not_mem, mem_iUnion, not_exists_not, Finsupp.mem_support_iff, Finset.mem_coe] at h -- We have some basis element `b b'` which is not in the support of any of the `v i`. obtain ⟨b', w⟩ := h -- Using this, we'll construct a...
/- Copyright (c) 2019 Calle SΓΆnne. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Calle SΓΆnne -/ import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic import Mathlib.Analysis.Normed.Group.AddCircle import Mathlib.Algebra.CharZero.Quotient import Mathlib.Topology...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
604
604
theorem toReal_eq_pi_iff {ΞΈ : Angle} : ΞΈ.toReal = Ο€ ↔ ΞΈ = Ο€ := by
rw [← toReal_inj, toReal_pi]
/- 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.Comma.Basic #align_import category_theory.arrow from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" /-! # The...
Mathlib/CategoryTheory/Comma/Arrow.lean
86
88
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f := by
cases f rfl
/- 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.Asymptotics #align_import...
Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
193
199
theorem rpow_eq_nhds_of_pos {p : ℝ Γ— ℝ} (hp_fst : 0 < p.fst) : (fun x : ℝ Γ— ℝ => x.1 ^ x.2) =αΆ [𝓝 p] fun x => exp (log x.1 * x.2) := by
suffices βˆ€αΆ  x : ℝ Γ— ℝ in 𝓝 p, 0 < x.1 from this.mono fun x hx ↦ by dsimp only rw [rpow_def_of_pos hx] exact IsOpen.eventually_mem (isOpen_lt continuous_const continuous_fst) hp_fst
/- Copyright (c) 2019 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Yury Kudryashov -/ import Mathlib.Analysis.Normed.Group.InfiniteSum import Mathlib.Analysis.Normed.MulAction import Mathlib.Topology.Algebra.Order.LiminfLimsup import Mat...
Mathlib/Analysis/Asymptotics/Asymptotics.lean
210
210
theorem IsBigOWith.isBigO (h : IsBigOWith c l f g) : f =O[l] g := by
rw [IsBigO_def]; exact ⟨c, h⟩
/- 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.Defs import Mathlib.Data.Int.Defs import Mathlib....
Mathlib/Algebra/Group/Basic.lean
1,316
1,316
theorem eq_div_iff_mul_eq'' : a = b / c ↔ c * a = b := by
rw [eq_div_iff_mul_eq', mul_comm]
/- 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.Subsemigroup.Operations import Mathlib.Algebra.Group.Submonoid.Operati...
Mathlib/Algebra/Group/Subgroup/Basic.lean
2,961
2,966
theorem comap_map_eq (H : Subgroup G) : comap f (map f H) = H βŠ” f.ker := by
refine le_antisymm ?_ (sup_le (le_comap_map _ _) (ker_le_comap _ _)) intro x hx; simp only [exists_prop, mem_map, mem_comap] at hx rcases hx with ⟨y, hy, hy'⟩ rw [← mul_inv_cancel_left y x] exact mul_mem_sup hy (by simp [mem_ker, hy'])
/- Copyright (c) 2021 Thomas Browning. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Thomas Browning -/ import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Finiteness import Mathlib.GroupTheory.GroupActio...
Mathlib/GroupTheory/Index.lean
265
265
theorem relindex_bot_right : H.relindex βŠ₯ = 1 := by
rw [relindex, subgroupOf_bot_eq_top, index_top]
/- 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, Scott Morrison, Jens Wagemaker -/ import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Polynomial.Eval import Mathlib.GroupTheory.GroupAction...
Mathlib/Algebra/Polynomial/Derivative.lean
457
458
theorem derivative_sq (p : R[X]) : derivative (p ^ 2) = C 2 * p * derivative p := by
rw [derivative_pow_succ, Nat.cast_one, one_add_one_eq_two, pow_one]
/- 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 Batteries.Control.ForInStep.Lemmas import Batteries.Data.List.Basic import Batteries.Ta...
.lake/packages/batteries/Batteries/Data/List/Lemmas.lean
28
29
theorem zipWith_distrib_tail : (zipWith f l l').tail = zipWith f l.tail l'.tail := by
rw [← drop_one]; simp [zipWith_distrib_drop]
/- Copyright (c) 2022 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller, Vincent Beffara -/ import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Data.Nat.Lattice #align_import combinatorics.simple_graph.metric from "leanprover-com...
Mathlib/Combinatorics/SimpleGraph/Metric.lean
70
71
theorem dist_eq_zero_iff_eq_or_not_reachable {u v : V} : G.dist u v = 0 ↔ u = v ∨ Β¬G.Reachable u v := by
simp [dist, Nat.sInf_eq_zero, Reachable]
/- 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, Scott Morrison, Jens Wagemaker -/ import Mathlib.Algebra.MonoidAlgebra.Degree import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Mono...
Mathlib/Algebra/Polynomial/Degree/Definitions.lean
262
262
theorem degree_one_le : degree (1 : R[X]) ≀ (0 : WithBot β„•) := by
rw [← C_1]; exact degree_C_le
/- 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.Order.Lattice import Mathlib.Order.ULift import Mathlib.Tactic.PushNeg #align_import order.bounded_order from "leanprover-community/mathlib"@"70d50ecf...
Mathlib/Order/BoundedOrder.lean
192
197
theorem OrderTop.ext_top {Ξ±} {hA : PartialOrder Ξ±} (A : OrderTop Ξ±) {hB : PartialOrder Ξ±} (B : OrderTop Ξ±) (H : βˆ€ x y : Ξ±, (haveI := hA; x ≀ y) ↔ x ≀ y) : (@Top.top Ξ± (@OrderTop.toTop Ξ± hA.toLE A)) = (@Top.top Ξ± (@OrderTop.toTop Ξ± hB.toLE B)) := by
cases PartialOrder.ext H apply top_unique exact @le_top _ _ A _