Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
num_lines
int64
1
150
import Mathlib.SetTheory.Cardinal.Finite #align_import data.set.ncard from "leanprover-community/mathlib"@"74c2af38a828107941029b03839882c5c6f87a04" namespace Set variable {Ξ± Ξ² : Type*} {s t : Set Ξ±} noncomputable def encard (s : Set Ξ±) : β„•βˆž := PartENat.withTopEquiv (PartENat.card s) @[simp] theorem encard_uni...
Mathlib/Data/Set/Card.lean
69
71
theorem encard_univ (Ξ± : Type*) : encard (univ : Set Ξ±) = PartENat.withTopEquiv (PartENat.card Ξ±) := by
rw [encard, PartENat.card_congr (Equiv.Set.univ Ξ±)]
1
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
80
83
theorem HasDerivAtFilter.scomp_of_eq (hg : HasDerivAtFilter g₁ g₁' y L') (hh : HasDerivAtFilter h h' x L) (hy : y = h x) (hL : Tendsto h L L') : HasDerivAtFilter (g₁ ∘ h) (h' β€’ g₁') x L := by
rw [hy] at hg; exact hg.scomp x hh hL
1
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.PiL2 #align_import analysis.inner_product_space.adjoint from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RCLike open scoped ComplexConjugate variable {π•œ E F G : Type...
Mathlib/Analysis/InnerProductSpace/Adjoint.lean
85
87
theorem adjointAux_inner_right (A : E β†’L[π•œ] F) (x : E) (y : F) : βŸͺx, adjointAux A y⟫ = βŸͺA x, y⟫ := by
rw [← inner_conj_symm, adjointAux_inner_left, inner_conj_symm]
1
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact import Mathlib.Topology.QuasiSeparated #align_import algebraic_geometry.morphisms.quasi_separated from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc" noncomputable section open CategoryTheory CategoryTheory.Limits Opposite Topolog...
Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean
117
118
theorem quasiSeparated_eq_diagonal_is_quasiCompact : @QuasiSeparated = MorphismProperty.diagonal @QuasiCompact := by
ext; exact quasiSeparated_iff _
1
import Mathlib.Algebra.Algebra.Operations import Mathlib.Data.Fintype.Lattice import Mathlib.RingTheory.Coprime.Lemmas #align_import ring_theory.ideal.operations from "leanprover-community/mathlib"@"e7f0ddbf65bd7181a85edb74b64bdc35ba4bdc74" assert_not_exists Basis -- See `RingTheory.Ideal.Basis` assert_not_exists ...
Mathlib/RingTheory/Ideal/Operations.lean
74
75
theorem mem_annihilator {r} : r ∈ N.annihilator ↔ βˆ€ n ∈ N, r β€’ n = (0 : M) := by
simp_rw [annihilator, Module.mem_annihilator, Subtype.forall, Subtype.ext_iff]; rfl
1
import Mathlib.Data.Finset.Image #align_import data.finset.card from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" assert_not_exists MonoidWithZero -- TODO: After a lot more work, -- assert_not_exists OrderedCommMonoid open Function Multiset Nat variable {Ξ± Ξ² R : Type*} namespace Fin...
Mathlib/Data/Finset/Card.lean
69
69
theorem card_mono : Monotone (@card Ξ±) := by
apply card_le_card
1
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Denumerable import Mathlib.Data.Set.Pointwise.Interval import Mathlib.SetTheory.Cardinal.Continuum #align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Nat Set open Cardinal no...
Mathlib/Data/Real/Cardinality.lean
64
65
theorem cantorFunctionAux_true (h : f n = true) : cantorFunctionAux c f n = c ^ n := by
simp [cantorFunctionAux, h]
1
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars #align_import analysis.calculus.deriv.comp from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Top...
Mathlib/Analysis/Calculus/Deriv/Comp.lean
90
93
theorem HasDerivWithinAt.scomp_hasDerivAt_of_eq (hg : HasDerivWithinAt g₁ g₁' s' y) (hh : HasDerivAt h h' x) (hs : βˆ€ x, h x ∈ s') (hy : y = h x) : HasDerivAt (g₁ ∘ h) (h' β€’ g₁') x := by
rw [hy] at hg; exact hg.scomp_hasDerivAt x hh hs
1
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Fintype.Vector import Mathlib.Data.Multiset.Sym #align_import data.finset.sym from "leanprover-community/mathlib"@"02ba8949f486ebecf93fe7460f1ed0564b5e442c" namespace Finset variable {Ξ± : Type*} @[simps] protected def sym2 (s : Finset Ξ±) : Finset (Sym2 Ξ±) :...
Mathlib/Data/Finset/Sym.lean
96
97
theorem sym2_eq_empty : s.sym2 = βˆ… ↔ s = βˆ… := by
rw [← val_eq_zero, sym2_val, Multiset.sym2_eq_zero_iff, val_eq_zero]
1
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] sectio...
Mathlib/Analysis/NormedSpace/Pointwise.lean
104
106
theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by
simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]
1
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition import Mathlib.LinearAlgebra.FreeModule.Basic import Mathlib.LinearAlgebra.FreeModule.Finite.Basic #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomputable section universe u v v'...
Mathlib/LinearAlgebra/Dimension/Free.lean
88
90
theorem _root_.FiniteDimensional.finrank_eq_card_chooseBasisIndex [Module.Finite R M] : finrank R M = Fintype.card (ChooseBasisIndex R M) := by
simp [finrank, rank_eq_card_chooseBasisIndex]
1
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Dynamics.FixedPoints.Basic open Finset Function section AddCommMonoid variable {Ξ± M : Type*} [AddCommMonoid M] def birkhoffSum (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ M) (n : β„•) (x : Ξ±) : M := βˆ‘ k ∈ range n, g (f^[k] x) theorem birkhoffSum_zero (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ ...
Mathlib/Dynamics/BirkhoffSum/Basic.lean
51
53
theorem birkhoffSum_add (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ M) (m n : β„•) (x : Ξ±) : birkhoffSum f g (m + n) x = birkhoffSum f g m x + birkhoffSum f g n (f^[m] x) := by
simp_rw [birkhoffSum, sum_range_add, add_comm m, iterate_add_apply]
1
import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" variable {Ξ± Ξ² : Type*} namespace Set section Einfsep open ENNReal open Function noncomputable def einfsep [EDist Ξ±] (s : Set Ξ±) : ℝβ‰₯0∞ := β¨… (x...
Mathlib/Topology/MetricSpace/Infsep.lean
74
76
theorem einfsep_ne_top : s.einfsep β‰  ∞ ↔ βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y β‰  ∞ := by
simp_rw [← lt_top_iff_ne_top, einfsep_lt_top]
1
import Mathlib.Algebra.Order.Ring.Nat #align_import data.nat.dist from "leanprover-community/mathlib"@"d50b12ae8e2bd910d08a94823976adae9825718b" namespace Nat def dist (n m : β„•) := n - m + (m - n) #align nat.dist Nat.dist -- Should be aligned to `Nat.dist.eq_def`, but that is generated on demand and isn't pr...
Mathlib/Data/Nat/Dist.lean
49
50
theorem dist_eq_sub_of_le_right {n m : β„•} (h : m ≀ n) : dist n m = n - m := by
rw [dist_comm]; apply dist_eq_sub_of_le h
1
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Sqrt import Mathlib.Analysis.NormedSpace.HomeomorphBall #align_import analysis.inner_product_space.calculus from "leanprover-community/mathlib"@"f9dd3204df14a0749cd456fac1e6849dfe7d2b88" noncomputable section open RCLike Real ...
Mathlib/Analysis/InnerProductSpace/Calculus.lean
109
112
theorem HasDerivWithinAt.inner {f g : ℝ β†’ E} {f' g' : E} {s : Set ℝ} {x : ℝ} (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x) : HasDerivWithinAt (fun t => βŸͺf t, g t⟫) (βŸͺf x, g'⟫ + βŸͺf', g x⟫) s x := by
simpa using (hf.hasFDerivWithinAt.inner π•œ hg.hasFDerivWithinAt).hasDerivWithinAt
1
import Mathlib.Control.Applicative import Mathlib.Control.Traversable.Basic import Mathlib.Data.List.Forall2 import Mathlib.Data.Set.Functor #align_import control.traversable.instances from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" universe u v section Option open Functor variab...
Mathlib/Control/Traversable/Instances.lean
35
38
theorem Option.comp_traverse {Ξ± Ξ² Ξ³} (f : Ξ² β†’ F Ξ³) (g : Ξ± β†’ G Ξ²) (x : Option Ξ±) : Option.traverse (Comp.mk ∘ (f <$> Β·) ∘ g) x = Comp.mk (Option.traverse f <$> Option.traverse g x) := by
cases x <;> simp! [functor_norm] <;> rfl
1
import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Algebra.Order.Interval.Set.Monoid import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax #align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c...
Mathlib/Data/Set/Pointwise/Interval.lean
202
203
theorem preimage_add_const_Ioc : (fun x => x + a) ⁻¹' Ioc b c = Ioc (b - a) (c - a) := by
simp [← Ioi_inter_Iic]
1
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat import Mathlib.RepresentationTheory.GroupCohomology.Basic import Mathlib.RepresentationTheory.Invariants universe v u noncomputable section open CategoryTheory Limits Representation variable {k G : Type u} [CommRing k] [Group G] (A : Rep k G) namespace grou...
Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
528
530
theorem map_one_fst_of_isMulTwoCocycle {f : G Γ— G β†’ M} (hf : IsMulTwoCocycle f) (g : G) : f (1, g) = f (1, 1) := by
simpa only [one_smul, one_mul, mul_one, mul_right_inj] using (hf 1 1 g).symm
1
import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Algebra.Polynomial.Basic import Mathlib.Algebra.Regular.Basic import Mathlib.Data.Nat.Choose.Sum #align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c" set_option linter.uppercaseLean3 false no...
Mathlib/Algebra/Polynomial/Coeff.lean
49
49
theorem coeff_bit0 (p : R[X]) (n : β„•) : coeff (bit0 p) n = bit0 (coeff p n) := by
simp [bit0]
1
import Batteries.Tactic.SeqFocus namespace Batteries class TotalBLE (le : Ξ± β†’ Ξ± β†’ Bool) : Prop where total : le a b ∨ le b a class OrientedCmp (cmp : Ξ± β†’ Ξ± β†’ Ordering) : Prop where symm (x y) : (cmp x y).swap = cmp y x class TransCmp (cmp : Ξ± β†’ Ξ± β†’ Ordering) extends OrientedCmp cmp : Prop where ...
.lake/packages/batteries/Batteries/Classes/Order.lean
121
122
theorem BEqCmp.cmp_iff_eq [BEq Ξ±] [LawfulBEq Ξ±] [BEqCmp (Ξ± := Ξ±) cmp] : cmp x y = .eq ↔ x = y := by
simp [BEqCmp.cmp_iff_beq]
1
import Mathlib.Order.Bounds.Basic import Mathlib.Order.WellFounded import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic import Mathlib.Data.Set.Lattice #align_import order.conditionally_complete_lattice.basic from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" open Func...
Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
127
129
theorem WithTop.coe_iSup [SupSet Ξ±] (f : ΞΉ β†’ Ξ±) (h : BddAbove (Set.range f)) : ↑(⨆ i, f i) = (⨆ i, f i : WithTop Ξ±) := by
rw [iSup, iSup, WithTop.coe_sSup' h, ← range_comp]; rfl
1
import Mathlib.LinearAlgebra.AffineSpace.AffineMap import Mathlib.Tactic.FieldSimp #align_import linear_algebra.affine_space.slope from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open AffineMap variable {k E PE : Type*} [Field k] [AddCommGroup E] [Module k E] [AddTorsor E PE] def ...
Mathlib/LinearAlgebra/AffineSpace/Slope.lean
78
79
theorem eq_of_slope_eq_zero {f : k β†’ PE} {a b : k} (h : slope f a b = (0 : E)) : f a = f b := by
rw [← sub_smul_slope_vadd f a b, h, smul_zero, zero_vadd]
1
import Batteries.Tactic.Alias import Batteries.Data.Nat.Basic namespace Nat @[simp] theorem recAux_zero {motive : Nat β†’ Sort _} (zero : motive 0) (succ : βˆ€ n, motive n β†’ motive (n+1)) : Nat.recAux zero succ 0 = zero := rfl theorem recAux_succ {motive : Nat β†’ Sort _} (zero : motive 0) (succ : βˆ€ n, mo...
.lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean
74
79
theorem recDiag_zero_succ {motive : Nat β†’ Nat β†’ Sort _} (zero_zero : motive 0 0) (zero_succ : βˆ€ n, motive 0 n β†’ motive 0 (n+1)) (succ_zero : βˆ€ m, motive m 0 β†’ motive (m+1) 0) (succ_succ : βˆ€ m n, motive m n β†’ motive (m+1) (n+1)) (n) : Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 (n+1) = zero_s...
simp [Nat.recDiag]; rfl
1
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.Calculus.Deriv.Linear import Mathlib.Analysis.Complex.Conformal import Mathlib.Analysis.Calculus.Conformal.NormedSpace #align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" se...
Mathlib/Analysis/Complex/RealDeriv.lean
118
120
theorem HasStrictDerivAt.complexToReal_fderiv {f : β„‚ β†’ β„‚} {f' x : β„‚} (h : HasStrictDerivAt f f' x) : HasStrictFDerivAt f (f' β€’ (1 : β„‚ β†’L[ℝ] β„‚)) x := by
simpa only [Complex.restrictScalars_one_smulRight] using h.hasStrictFDerivAt.restrictScalars ℝ
1
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Operations namespace Submodule open Pointwise variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M] variable {N N₁ Nβ‚‚ P P₁ Pβ‚‚ : Submodule R M} def colon (N P : Submodule R M) : Ideal R := annihilator (P.map N.mkQ) #align ...
Mathlib/RingTheory/Ideal/Colon.lean
76
78
theorem _root_.Ideal.mem_colon_singleton {I : Ideal R} {x r : R} : r ∈ I.colon (Ideal.span {x}) ↔ r * x ∈ I := by
simp only [← Ideal.submodule_span_eq, Submodule.mem_colon_singleton, smul_eq_mul]
1
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset import Mathlib.Data.Finite.Card import Mathlib.GroupTheory.Finiteness import Mathlib.GroupTheory.GroupAction.Quotient #align_import group_theory.index from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" namespace Subgroup open Ca...
Mathlib/GroupTheory/Index.lean
140
141
theorem inf_relindex_left : (H βŠ“ K).relindex H = K.relindex H := by
rw [inf_comm, inf_relindex_right]
1
import Mathlib.Data.Fintype.Card import Mathlib.Order.UpperLower.Basic #align_import combinatorics.set_family.intersecting from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46" open Finset variable {Ξ± : Type*} namespace Set section SemilatticeInf variable [SemilatticeInf Ξ±] [OrderBot ...
Mathlib/Combinatorics/SetFamily/Intersecting.lean
61
61
theorem intersecting_singleton : ({a} : Set Ξ±).Intersecting ↔ a β‰  βŠ₯ := by
simp [Intersecting]
1
import Mathlib.Tactic.CategoryTheory.Coherence import Mathlib.CategoryTheory.Monoidal.Free.Coherence #align_import category_theory.monoidal.coherence_lemmas from "leanprover-community/mathlib"@"b8b8bf3ea0c625fa1f950034a184e07c67f7bcfe" open CategoryTheory Category Iso namespace CategoryTheory.MonoidalCategory v...
Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean
57
60
theorem pentagon_inv_inv_hom (W X Y Z : C) : (Ξ±_ W (X βŠ— Y) Z).inv ≫ ((Ξ±_ W X Y).inv βŠ— πŸ™ Z) ≫ (Ξ±_ (W βŠ— X) Y Z).hom = (πŸ™ W βŠ— (Ξ±_ X Y Z).hom) ≫ (Ξ±_ W X (Y βŠ— Z)).inv := by
coherence
1
import Mathlib.MeasureTheory.Measure.VectorMeasure import Mathlib.MeasureTheory.Function.AEEqOfIntegral #align_import measure_theory.measure.with_density_vector_measure from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1" noncomputable section open scoped Classical MeasureTheory NNReal ...
Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean
101
103
theorem withDensityα΅₯_sub (hf : Integrable f ΞΌ) (hg : Integrable g ΞΌ) : ΞΌ.withDensityα΅₯ (f - g) = ΞΌ.withDensityα΅₯ f - ΞΌ.withDensityα΅₯ g := by
rw [sub_eq_add_neg, sub_eq_add_neg, withDensityα΅₯_add hf hg.neg, withDensityα΅₯_neg]
1
import Mathlib.Algebra.Polynomial.Eval import Mathlib.RingTheory.Ideal.Quotient #align_import linear_algebra.smodeq from "leanprover-community/mathlib"@"146d3d1fa59c091fedaad8a4afa09d6802886d24" open Submodule open Polynomial variable {R : Type*} [Ring R] variable {A : Type*} [CommRing A] variable {M : Type*} [...
Mathlib/LinearAlgebra/SModEq.lean
44
44
theorem sub_mem : x ≑ y [SMOD U] ↔ x - y ∈ U := by
rw [SModEq.def, Submodule.Quotient.eq]
1
import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Order.Interval.Set.Basic import Mathlib.Logic.Pairwise #align_import data.set.intervals.group from "lean...
Mathlib/Algebra/Order/Interval/Set/Group.lean
226
228
theorem pairwise_disjoint_Ioo_zpow : Pairwise (Disjoint on fun n : β„€ => Ioo (b ^ n) (b ^ (n + 1))) := by
simpa only [one_mul] using pairwise_disjoint_Ioo_mul_zpow 1 b
1
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Nat.Choose.Central import Mathlib.Data.Tree.Basic import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.GCongr import Mathlib...
Mathlib/Combinatorics/Enumerative/Catalan.lean
68
69
theorem catalan_succ (n : β„•) : catalan (n + 1) = βˆ‘ i : Fin n.succ, catalan i * catalan (n - i) := by
rw [catalan]
1
import Mathlib.Data.Finsupp.Encodable import Mathlib.LinearAlgebra.Pi import Mathlib.LinearAlgebra.Span import Mathlib.Data.Set.Countable #align_import linear_algebra.finsupp from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" noncomputable section open Set LinearMap Submodule namespa...
Mathlib/LinearAlgebra/Finsupp.lean
237
238
theorem lapply_comp_lsingle_of_ne (a a' : Ξ±) (h : a β‰  a') : lapply a βˆ˜β‚— lsingle a' = (0 : M β†’β‚—[R] M) := by
ext; simp [h.symm]
1
import Mathlib.Algebra.Module.Submodule.Map #align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" open Function open Pointwise variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {K : Type*} variable {M : Type*} {M₁ : Type*} {Mβ‚‚ : Type*...
Mathlib/Algebra/Module/Submodule/Ker.lean
125
126
theorem ker_codRestrict {τ₂₁ : Rβ‚‚ β†’+* R} (p : Submodule R M) (f : Mβ‚‚ β†’β‚›β‚—[τ₂₁] M) (hf) : ker (codRestrict p f hf) = ker f := by
rw [ker, comap_codRestrict, Submodule.map_bot]; rfl
1
import Mathlib.Order.Interval.Set.Basic import Mathlib.Order.Hom.Set #align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set namespace OrderIso section Preorder variable {Ξ± Ξ² : Type*} [Preorder Ξ±] [Preorder Ξ²] @[simp] theorem preimage_I...
Mathlib/Order/Interval/Set/OrderIso.lean
78
79
theorem image_Iio (e : Ξ± ≃o Ξ²) (a : Ξ±) : e '' Iio a = Iio (e a) := by
rw [e.image_eq_preimage, e.symm.preimage_Iio, e.symm_symm]
1
import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" variable {Ξ± Ξ² : Type*} namespace Set section Einfsep open ENNReal open Function noncomputable def einfsep [EDist Ξ±] (s : Set Ξ±) : ℝβ‰₯0∞ := β¨… (x...
Mathlib/Topology/MetricSpace/Infsep.lean
332
333
theorem infsep_zero : s.infsep = 0 ↔ s.einfsep = 0 ∨ s.einfsep = ∞ := by
rw [infsep, ENNReal.toReal_eq_zero_iff]
1
import Mathlib.Data.List.Cycle import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.GroupTheory.Perm.List #align_import group_theory.perm.cycle.concrete from "leanprover-community/mathlib"@"00638177efd1b2534fc5269363ebf42a7871df9a" open Equiv Equiv.Perm List variable {Ξ± : Type*} namespace Equiv.Perm secti...
Mathlib/GroupTheory/Perm/Cycle/Concrete.lean
248
249
theorem toList_get_zero (h : x ∈ p.support) : (toList p x).get ⟨0, (length_toList_pos_of_mem_support _ _ h)⟩ = x := by
simp [toList]
1
import Mathlib.Algebra.Module.Submodule.Map #align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" open Function open Pointwise variable {R : Type*} {R₁ : Type*} {Rβ‚‚ : Type*} {R₃ : Type*} variable {K : Type*} variable {M : Type*} {M₁ : Type*} {Mβ‚‚ : Type*...
Mathlib/Algebra/Module/Submodule/Ker.lean
112
113
theorem ker_eq_bot' {f : F} : ker f = βŠ₯ ↔ βˆ€ m, f m = 0 β†’ m = 0 := by
simpa [disjoint_iff_inf_le] using disjoint_ker (f := f) (p := ⊀)
1
import Mathlib.Data.Nat.Defs import Mathlib.Tactic.GCongr.Core import Mathlib.Tactic.Common import Mathlib.Tactic.Monotonicity.Attr #align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" namespace Nat def factorial : β„• β†’ β„• | 0 => 1 | succ n => s...
Mathlib/Data/Nat/Factorial/Basic.lean
344
344
theorem descFactorial_one (n : β„•) : n.descFactorial 1 = n := by
simp
1
import Mathlib.Analysis.Normed.Field.Basic import Mathlib.Analysis.SpecialFunctions.Pow.Real #align_import analysis.normed.ring.seminorm from "leanprover-community/mathlib"@"7ea604785a41a0681eac70c5a82372493dbefc68" open NNReal variable {F R S : Type*} (x y : R) (r : ℝ) structure RingSeminorm (R : Type*) [NonU...
Mathlib/Analysis/Normed/Ring/Seminorm.lean
116
116
theorem ne_zero_iff {p : RingSeminorm R} : p β‰  0 ↔ βˆƒ x, p x β‰  0 := by
simp [eq_zero_iff]
1
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
72
73
theorem logb_mul (hx : x β‰  0) (hy : y β‰  0) : logb b (x * y) = logb b x + logb b y := by
simp_rw [logb, log_mul hx hy, add_div]
1
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.Rat.Denumerable import Mathlib.Data.Set.Pointwise.Interval import Mathlib.SetTheory.Cardinal.Continuum #align_import data.real.cardinality from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Nat Set open Cardinal no...
Mathlib/Data/Real/Cardinality.lean
82
83
theorem cantorFunctionAux_zero (f : β„• β†’ Bool) : cantorFunctionAux c f 0 = cond (f 0) 1 0 := by
cases h : f 0 <;> simp [h]
1
import Mathlib.CategoryTheory.Idempotents.Basic import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Equivalence #align_import category_theory.idempotents.karoubi from "leanprover-community/mathlib"@"200eda15d8ff5669854ff6bcc10aaf37cb70498f" noncomputable section open CategoryT...
Mathlib/CategoryTheory/Idempotents/Karoubi.lean
85
85
theorem p_comp {P Q : Karoubi C} (f : Hom P Q) : P.p ≫ f.f = f.f := by
rw [f.comm, ← assoc, P.idem]
1
import Mathlib.Algebra.Group.Indicator import Mathlib.Data.Finset.Piecewise import Mathlib.Data.Finset.Preimage #align_import algebra.big_operators.basic from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83" -- TODO -- assert_not_exists AddCommMonoidWithOne assert_not_exists MonoidWithZero...
Mathlib/Algebra/BigOperators/Group/Finset.lean
67
68
theorem prod_val [CommMonoid Ξ±] (s : Finset Ξ±) : s.1.prod = s.prod id := by
rw [Finset.prod, Multiset.map_id]
1
import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Algebra.Order.Interval.Set.Monoid import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax #align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c...
Mathlib/Data/Set/Pointwise/Interval.lean
674
676
theorem preimage_mul_const_Ico_of_neg (a b : α) {c : α} (h : c < 0) : (fun x => x * c) ⁻¹' Ico a b = Ioc (b / c) (a / c) := by
simp [← Ici_inter_Iio, ← Ioi_inter_Iic, h, inter_comm]
1
import Mathlib.Algebra.Quaternion import Mathlib.Tactic.Ring #align_import algebra.quaternion_basis from "leanprover-community/mathlib"@"3aa5b8a9ed7a7cabd36e6e1d022c9858ab8a8c2d" open Quaternion namespace QuaternionAlgebra structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ cβ‚‚ : R) ...
Mathlib/Algebra/QuaternionBasis.lean
84
85
theorem i_mul_k : q.i * q.k = c₁ β€’ q.j := by
rw [← i_mul_j, ← mul_assoc, i_mul_i, smul_mul_assoc, one_mul]
1
import Mathlib.Data.Analysis.Filter import Mathlib.Topology.Bases import Mathlib.Topology.LocallyFinite #align_import data.analysis.topology from "leanprover-community/mathlib"@"55d771df074d0dd020139ee1cd4b95521422df9f" open Set open Filter hiding Realizer open Topology structure Ctop (Ξ± Οƒ : Type*) where f ...
Mathlib/Data/Analysis/Topology.lean
79
80
theorem ofEquiv_val (E : Οƒ ≃ Ο„) (F : Ctop Ξ± Οƒ) (a : Ο„) : F.ofEquiv E a = F (E.symm a) := by
cases F; rfl
1
import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function open scoped Topology ENNReal Convex variable...
Mathlib/MeasureTheory/Integral/Average.lean
361
362
theorem average_congr {f g : Ξ± β†’ E} (h : f =ᡐ[ΞΌ] g) : ⨍ x, f x βˆ‚ΞΌ = ⨍ x, g x βˆ‚ΞΌ := by
simp only [average_eq, integral_congr_ae h]
1
import Mathlib.Algebra.Group.Prod import Mathlib.Order.Cover #align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" assert_not_exists MonoidWithZero open Set namespace Function variable {Ξ± Ξ² A B M N P G : Type*} section One variable [One M] [One N] [One P] ...
Mathlib/Algebra/Group/Support.lean
93
95
theorem mulSupport_update_one [DecidableEq Ξ±] (f : Ξ± β†’ M) (x : Ξ±) : mulSupport (update f x 1) = mulSupport f \ {x} := by
ext a; rcases eq_or_ne a x with rfl | hne <;> simp [*]
1
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 "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" open Part hiding some def PartENat : Type := Part β„• #align part_enat ...
Mathlib/Data/Nat/PartENat.lean
192
194
theorem coe_add_get {x : β„•} {y : PartENat} (h : ((x : PartENat) + y).Dom) : get ((x : PartENat) + y) h = x + get y h.2 := by
rfl
1
import Mathlib.Data.Finset.Prod import Mathlib.Data.Set.Finite #align_import data.finset.n_ary from "leanprover-community/mathlib"@"eba7871095e834365616b5e43c8c7bb0b37058d0" open Function Set variable {Ξ± Ξ±' Ξ² Ξ²' Ξ³ Ξ³' Ξ΄ Ξ΄' Ξ΅ Ξ΅' ΞΆ ΞΆ' Ξ½ : Type*} namespace Finset variable [DecidableEq Ξ±'] [DecidableEq Ξ²'] [Decidabl...
Mathlib/Data/Finset/NAry.lean
98
100
theorem forall_imageβ‚‚_iff {p : Ξ³ β†’ Prop} : (βˆ€ z ∈ imageβ‚‚ f s t, p z) ↔ βˆ€ x ∈ s, βˆ€ y ∈ t, p (f x y) := by
simp_rw [← mem_coe, coe_imageβ‚‚, forall_image2_iff]
1
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Function Filter Set open scoped Topology name...
Mathlib/Analysis/SpecialFunctions/Arsinh.lean
164
164
theorem arsinh_nonneg_iff : 0 ≀ arsinh x ↔ 0 ≀ x := by
rw [← sinh_le_sinh, sinh_zero, sinh_arsinh]
1
import Mathlib.Algebra.Order.Field.Basic import Mathlib.Combinatorics.SimpleGraph.Basic import Mathlib.Data.Rat.Cast.Order import Mathlib.Order.Partition.Finpartition import Mathlib.Tactic.GCongr import Mathlib.Tactic.NormNum import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring #align_import combinatorics.simp...
Mathlib/Combinatorics/SimpleGraph/Density.lean
57
58
theorem mem_interedges_iff {x : Ξ± Γ— Ξ²} : x ∈ interedges r s t ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ r x.1 x.2 := by
rw [interedges, mem_filter, Finset.mem_product, and_assoc]
1
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.Factorial.Cast #align_import data.nat.choose.cast from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496" open Nat variable (K : Type*) [DivisionRing K] [CharZero K] namespace Nat theorem cast_choose {a b : β„•} (h : a ≀ b) : (b....
Mathlib/Data/Nat/Choose/Cast.lean
31
32
theorem cast_add_choose {a b : β„•} : ((a + b).choose a : K) = (a + b)! / (a ! * b !) := by
rw [cast_choose K (_root_.le_add_right le_rfl), add_tsub_cancel_left]
1
import Mathlib.Data.Nat.Defs import Mathlib.Tactic.GCongr.Core import Mathlib.Tactic.Common import Mathlib.Tactic.Monotonicity.Attr #align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" namespace Nat def factorial : β„• β†’ β„• | 0 => 1 | succ n => s...
Mathlib/Data/Nat/Factorial/Basic.lean
340
341
theorem zero_descFactorial_succ (k : β„•) : (0 : β„•).descFactorial (k + 1) = 0 := by
rw [descFactorial_succ, Nat.zero_sub, Nat.zero_mul]
1
import Mathlib.Algebra.Order.Monoid.Defs import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Util.AssertExists #align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce" open Function universe u variable {Ξ± : Type u} class OrderedAddCommGroup (Ξ± : Ty...
Mathlib/Algebra/Order/Group/Defs.lean
120
121
theorem inv_mul_le_iff_le_mul : b⁻¹ * a ≀ c ↔ a ≀ b * c := by
rw [← mul_le_mul_iff_left b, mul_inv_cancel_left]
1
import Batteries.Data.Sum.Basic import Batteries.Logic open Function namespace Sum @[simp] protected theorem Β«forallΒ» {p : Ξ± βŠ• Ξ² β†’ Prop} : (βˆ€ x, p x) ↔ (βˆ€ a, p (inl a)) ∧ βˆ€ b, p (inr b) := ⟨fun h => ⟨fun _ => h _, fun _ => h _⟩, fun ⟨h₁, hβ‚‚βŸ© => Sum.rec h₁ hβ‚‚βŸ© @[simp] protected theorem Β«existsΒ» {p : Ξ± βŠ• Ξ² ...
.lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
81
81
theorem not_isRight {x : Ξ± βŠ• Ξ²} : Β¬x.isRight ↔ x.isLeft := by
simp
1
import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Computability.Primrec import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import computability.ackermann from "leanprover-community/mathlib"@"9b2660e1b25419042c8da10bf411aa3c67f14383" open Nat def ack : β„• β†’ β„• β†’ β„• | 0, n => n + 1 | m + 1, 0 ...
Mathlib/Computability/Ackermann.lean
74
74
theorem ack_succ_zero (m : β„•) : ack (m + 1) 0 = ack m 1 := by
rw [ack]
1
import Mathlib.Algebra.Group.Prod import Mathlib.Order.Cover #align_import algebra.support from "leanprover-community/mathlib"@"29cb56a7b35f72758b05a30490e1f10bd62c35c1" assert_not_exists MonoidWithZero open Set namespace Function variable {Ξ± Ξ² A B M N P G : Type*} section One variable [One M] [One N] [One P] ...
Mathlib/Algebra/Group/Support.lean
98
100
theorem mulSupport_update_eq_ite [DecidableEq Ξ±] [DecidableEq M] (f : Ξ± β†’ M) (x : Ξ±) (y : M) : mulSupport (update f x y) = if y = 1 then mulSupport f \ {x} else insert x (mulSupport f) := by
rcases eq_or_ne y 1 with rfl | hy <;> simp [mulSupport_update_one, mulSupport_update_of_ne_one, *]
1
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.UniversalEnveloping import Mathlib.GroupTheory.GroupAction.Ring #align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4" universe ...
Mathlib/Algebra/Lie/Free.lean
99
100
theorem Rel.subRight {a b : lib R X} (c : lib R X) (h : Rel R X a b) : Rel R X (a - c) (b - c) := by
simpa only [sub_eq_add_neg] using h.add_right (-c)
1
import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Group.Aut import Mathlib.Data.ZMod.Defs import Mathlib.Tactic.Ring #align_import algebra.quandle from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" open MulOpposite universe u v class Shelf (Ξ± : Type u) where act : ...
Mathlib/Algebra/Quandle.lean
283
283
theorem self_act_act_eq {x y : R} : (x β—ƒ x) β—ƒ y = x β—ƒ y := by
rw [← right_inv x y, ← self_distrib]
1
import Mathlib.Algebra.Algebra.Subalgebra.Pointwise import Mathlib.AlgebraicGeometry.PrimeSpectrum.Maximal import Mathlib.AlgebraicGeometry.PrimeSpectrum.Noetherian import Mathlib.RingTheory.ChainOfDivisors import Mathlib.RingTheory.DedekindDomain.Basic import Mathlib.RingTheory.FractionalIdeal.Operations #align_impo...
Mathlib/RingTheory/DedekindDomain/Ideal.lean
136
137
theorem map_inv (I : FractionalIdeal R₁⁰ K) (h : K ≃ₐ[R₁] K') : I⁻¹.map (h : K →ₐ[R₁] K') = (I.map h)⁻¹ := by
rw [inv_eq, map_div, map_one, inv_eq]
1
import Mathlib.Order.Interval.Set.UnorderedInterval import Mathlib.Algebra.Order.Interval.Set.Monoid import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Group.MinMax #align_import data.set.pointwise.interval from "leanprover-community/mathlib"@"2196ab363eb097c...
Mathlib/Data/Set/Pointwise/Interval.lean
241
242
theorem preimage_neg_Ico : -Ico a b = Ioc (-b) (-a) := by
simp [← Ici_inter_Iio, ← Ioi_inter_Iic, inter_comm]
1
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
64
64
theorem logb_abs (x : ℝ) : logb b |x| = logb b x := by
rw [logb, logb, log_abs]
1
import Mathlib.Control.Monad.Basic import Mathlib.Control.Monad.Writer import Mathlib.Init.Control.Lawful #align_import control.monad.cont from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" universe u v w uβ‚€ u₁ vβ‚€ v₁ structure MonadCont.Label (Ξ± : Type w) (m : Type u β†’ Type v) (Ξ² : Typ...
Mathlib/Control/Monad/Cont.lean
193
194
theorem WriterT.goto_mkLabel {Ξ± Ξ² Ο‰ : Type _} [EmptyCollection Ο‰] (x : Label (Ξ± Γ— Ο‰) m Ξ²) (i : Ξ±) : goto (WriterT.mkLabel x) i = monadLift (goto x (i, βˆ…)) := by
cases x; rfl
1
import Mathlib.CategoryTheory.Subobject.Lattice #align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d" universe v u noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite var...
Mathlib/CategoryTheory/Subobject/Limits.lean
104
106
theorem kernelSubobject_arrow' : (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ΞΉ f := by
simp [kernelSubobjectIso]
1
import Mathlib.Analysis.NormedSpace.Multilinear.Basic import Mathlib.Analysis.NormedSpace.Units import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness import Mathlib.Analysis.NormedSpace.OperatorNorm.Mul #align_import analysis.normed_space.bounded_linear_maps from "leanprover-community/mathlib"@"ce11c3c2a285b...
Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean
293
294
theorem map_smulβ‚›β‚—β‚‚ (f : M β†’SL[ρ₁₂] F β†’SL[σ₁₂] G') (c : R) (x : M) (y : F) : f (c β€’ x) y = ρ₁₂ c β€’ f x y := by
rw [f.map_smulβ‚›β‚—, smul_apply]
1
import Mathlib.Computability.Halting import Mathlib.Computability.TuringMachine import Mathlib.Data.Num.Lemmas import Mathlib.Tactic.DeriveFintype #align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8" open Function (update) open Relation namespa...
Mathlib/Computability/TMToPartrec.lean
183
183
theorem id_eval (v) : id.eval v = pure v := by
simp [id]
1
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots import Mathlib.FieldTheory.Finite.Trace import Mathlib.Algebra.Group.AddChar import Mathlib.Data.ZMod.Units import Mathlib.Analysis.Complex.Polynomial #align_import number_theory.legendre_symbol.add_character from "leanprover-community/mathlib"@"0723536a0522d24fc2...
Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
169
171
theorem zmodChar_apply' {n : β„•+} {ΞΆ : C} (hΞΆ : ΞΆ ^ (n : β„•) = 1) (a : β„•) : zmodChar n hΞΆ a = ΞΆ ^ a := by
rw [pow_eq_pow_mod a hΞΆ, zmodChar_apply, ZMod.val_natCast a]
1
import Mathlib.Topology.MetricSpace.ProperSpace import Mathlib.Topology.MetricSpace.Cauchy open Set Filter Bornology open scoped ENNReal Uniformity Topology Pointwise universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {X ΞΉ : Type*} variable [PseudoMetricSpace Ξ±] namespace Metric #align metric.bounded Bornology.I...
Mathlib/Topology/MetricSpace/Bounded.lean
142
144
theorem tendsto_dist_left_atTop_iff (c : Ξ±) {f : Ξ² β†’ Ξ±} {l : Filter Ξ²} : Tendsto (fun x ↦ dist c (f x)) l atTop ↔ Tendsto f l (cobounded Ξ±) := by
simp only [dist_comm c, tendsto_dist_right_atTop_iff]
1
import Mathlib.Data.Finset.Pointwise #align_import combinatorics.additive.e_transform from "leanprover-community/mathlib"@"207c92594599a06e7c134f8d00a030a83e6c7259" open MulOpposite open Pointwise variable {Ξ± : Type*} [DecidableEq Ξ±] namespace Finset section Group variable [Group Ξ±] (e : Ξ±) (x : Finset...
Mathlib/Combinatorics/Additive/ETransform.lean
137
137
theorem mulETransformRight_one : mulETransformRight 1 x = x := by
simp [mulETransformRight]
1
import Mathlib.Topology.PartialHomeomorph import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Data.Real.Sqrt #align_import analysis.normed_space.basic from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Set Metric Pointwise var...
Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
149
150
theorem continuous_univBall (c : P) (r : ℝ) : Continuous (univBall c r) := by
simpa [continuous_iff_continuousOn_univ] using (univBall c r).continuousOn
1
import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Order.Antisymmetrization #align_import order.cover from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Set OrderDual variable {Ξ± Ξ² : Type*} section WeaklyCovers section LT variable [LT Ξ±] {a b : Ξ±} def CovBy (a b :...
Mathlib/Order/Cover.lean
233
234
theorem not_covBy_iff (h : a < b) : Β¬a β‹– b ↔ βˆƒ c, a < c ∧ c < b := by
simp_rw [CovBy, h, true_and_iff, not_forall, exists_prop, not_not]
1
import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.End from "leanprover-community/mathlib"@"85075bccb68ab7fa49fb05db816233fb790e4fe9" universe v u namespace CategoryTheory variable (C : Type u) [Category.{v} C] def endofunctorMonoidalCategory : MonoidalCategory (C β₯€ C) where...
Mathlib/CategoryTheory/Monoidal/End.lean
129
131
theorem Ξ΅_inv_naturality {X Y : C} (f : X ⟢ Y) : (MonoidalFunctor.Ξ΅Iso F).inv.app X ≫ (πŸ™_ (C β₯€ C)).map f = F.Ξ΅Iso.inv.app X ≫ f := by
aesop_cat
1
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Integral.DominatedConvergence import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable s...
Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
127
129
theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite Ξ½] ⦃f : Ξ± Γ— Ξ² β†’ E⦄ (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) βˆ‚Ξ½ := by
rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
1
import Mathlib.Order.Interval.Finset.Nat #align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" assert_not_exists MonoidWithZero open Finset Fin Function namespace Fin variable (n : β„•) instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) := Orde...
Mathlib/Order/Interval/Finset/Fin.lean
119
120
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
rw [← Nat.card_Ioo, ← map_valEmbedding_Ioo, card_map]
1
import Batteries.Data.Sum.Basic import Batteries.Logic open Function namespace Sum @[simp] protected theorem Β«forallΒ» {p : Ξ± βŠ• Ξ² β†’ Prop} : (βˆ€ x, p x) ↔ (βˆ€ a, p (inl a)) ∧ βˆ€ b, p (inr b) := ⟨fun h => ⟨fun _ => h _, fun _ => h _⟩, fun ⟨h₁, hβ‚‚βŸ© => Sum.rec h₁ hβ‚‚βŸ© @[simp] protected theorem Β«existsΒ» {p : Ξ± βŠ• Ξ² ...
.lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
116
118
theorem elim_eq_iff {u u' : Ξ± β†’ Ξ³} {v v' : Ξ² β†’ Ξ³} : Sum.elim u v = Sum.elim u' v' ↔ u = u' ∧ v = v' := by
simp [funext_iff]
1
import Batteries.Data.List.Basic namespace Batteries inductive AssocList (Ξ± : Type u) (Ξ² : Type v) where | nil | cons (key : Ξ±) (value : Ξ²) (tail : AssocList Ξ± Ξ²) deriving Inhabited namespace AssocList @[simp] def toList : AssocList Ξ± Ξ² β†’ List (Ξ± Γ— Ξ²) | nil => [] | cons a b es => (a, b) :: es.toL...
.lake/packages/batteries/Batteries/Data/AssocList.lean
55
56
theorem length_toList (l : AssocList Ξ± Ξ²) : l.toList.length = l.length := by
induction l <;> simp_all
1
import Mathlib.Algebra.Group.Defs import Mathlib.Algebra.GroupWithZero.Defs import Mathlib.Data.Int.Cast.Defs import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.ring.defs from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f" universe u v w x variable {Ξ± : ...
Mathlib/Algebra/Ring/Defs.lean
164
165
theorem one_add_mul [RightDistribClass Ξ±] (a b : Ξ±) : (1 + a) * b = b + a * b := by
rw [add_mul, one_mul]
1
import Mathlib.Topology.Category.TopCat.Limits.Products #align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open TopologicalSpace open Cat...
Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
126
128
theorem pullbackIsoProdSubtype_hom_fst (f : X ⟢ Z) (g : Y ⟢ Z) : (pullbackIsoProdSubtype f g).hom ≫ pullbackFst f g = pullback.fst := by
rw [← Iso.eq_inv_comp, pullbackIsoProdSubtype_inv_fst]
1
import Mathlib.Order.ConditionallyCompleteLattice.Basic import Mathlib.Order.LatticeIntervals import Mathlib.Order.Interval.Set.OrdConnected #align_import order.complete_lattice_intervals from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open scoped Classical open Set variable {ΞΉ : ...
Mathlib/Order/CompleteLatticeIntervals.lean
102
104
theorem subset_sInf_emptyset [Inhabited s] : sInf (βˆ… : Set s) = default := by
simp [sInf]
1
import Mathlib.Algebra.FreeNonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra import Mathlib.Algebra.Lie.UniversalEnveloping import Mathlib.GroupTheory.GroupAction.Ring #align_import algebra.lie.free from "leanprover-community/mathlib"@"841ac1a3d9162bf51c6327812ecb6e5e71883ac4" universe ...
Mathlib/Algebra/Lie/Free.lean
87
88
theorem Rel.addLeft (a : lib R X) {b c : lib R X} (h : Rel R X b c) : Rel R X (a + b) (a + c) := by
rw [add_comm _ b, add_comm _ c]; exact h.add_right _
1
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [Topologic...
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
290
292
theorem multipliable_iff_nat_tprod_vanishing {f : β„• β†’ G} : Multipliable f ↔ βˆ€ e ∈ 𝓝 1, βˆƒ N : β„•, βˆ€ t βŠ† {n | N ≀ n}, (∏' n : t, f n) ∈ e := by
rw [multipliable_iff_cauchySeq_finset, cauchySeq_finset_iff_nat_tprod_vanishing]
1
import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Finset.Preimage #align_import combinatorics.young.young_diagram from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Function @[ext] structure YoungDiagram where cells : Finset (β„• Γ— β„•) isLowerSet : IsLowerSet (cel...
Mathlib/Combinatorics/Young/YoungDiagram.lean
321
322
theorem rowLen_eq_card (ΞΌ : YoungDiagram) {i : β„•} : ΞΌ.rowLen i = (ΞΌ.row i).card := by
simp [row_eq_prod]
1
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iSup @[simp] theorem iSup_eq_zero {ΞΉ : Sort*} {f : ΞΉ β†’ ℝβ‰₯0∞} : ⨆ i, f i = 0 ↔ βˆ€ i, f i = 0 := iSup_eq_bot #align ennr...
Mathlib/Data/ENNReal/Real.lean
676
676
theorem iSup_zero_eq_zero {ΞΉ : Sort*} : ⨆ _ : ΞΉ, (0 : ℝβ‰₯0∞) = 0 := by
simp
1
import Mathlib.Data.Finset.Lattice import Mathlib.Data.Multiset.Powerset #align_import data.finset.powerset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Finset open Function Multiset variable {Ξ± : Type*} {s t : Finset Ξ±} section Powerset def powerset (s : Finset...
Mathlib/Data/Finset/Powerset.lean
83
84
theorem powerset_eq_singleton_empty : s.powerset = {βˆ…} ↔ s = βˆ… := by
rw [← powerset_empty, powerset_inj]
1
import Mathlib.Data.Int.AbsoluteValue import Mathlib.LinearAlgebra.Matrix.Determinant.Basic #align_import linear_algebra.matrix.absolute_value from "leanprover-community/mathlib"@"ab0a2959c83b06280ef576bc830d4aa5fe8c8e61" open Matrix namespace Matrix open Equiv Finset variable {R S : Type*} [CommRing R] [Nontr...
Mathlib/LinearAlgebra/Matrix/AbsoluteValue.lean
37
49
theorem det_le {A : Matrix n n R} {abv : AbsoluteValue R S} {x : S} (hx : βˆ€ i j, abv (A i j) ≀ x) : abv A.det ≀ Nat.factorial (Fintype.card n) β€’ x ^ Fintype.card n := calc abv A.det = abv (βˆ‘ Οƒ : Perm n, Perm.sign Οƒ β€’ ∏ i, A (Οƒ i) i) := congr_arg abv (det_apply _) _ ≀ βˆ‘ Οƒ : Perm n, abv (Perm.sign Οƒ β€’ ∏ i, ...
rw [sum_const, Finset.card_univ, Fintype.card_perm]
1
import Mathlib.Topology.MetricSpace.PseudoMetric #align_import topology.metric_space.basic from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328" open Set Filter Bornology open scoped NNReal Uniformity universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {X ΞΉ : Type*} variable [PseudoMetricS...
Mathlib/Topology/MetricSpace/Basic.lean
96
97
theorem eq_of_nndist_eq_zero {x y : Ξ³} : nndist x y = 0 β†’ x = y := by
simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero]
1
import Mathlib.Tactic.CategoryTheory.Reassoc #align_import category_theory.isomorphism from "leanprover-community/mathlib"@"8350c34a64b9bc3fc64335df8006bffcadc7baa6" universe v u -- morphism levels before object levels. See note [CategoryTheory universes]. namespace CategoryTheory open Category structure Iso {...
Mathlib/CategoryTheory/Iso.lean
290
291
theorem hom_inv_id_assoc (f : X ⟢ Y) [I : IsIso f] {Z} (g : X ⟢ Z) : f ≫ inv f ≫ g = g := by
simp [← Category.assoc]
1
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 from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" universe u variable {Ξ± : Type u} open Nat Function namespace List theorem rotate...
Mathlib/Data/List/Rotate.lean
132
133
theorem length_rotate (l : List Ξ±) (n : β„•) : (l.rotate n).length = l.length := by
rw [rotate_eq_rotate', length_rotate']
1
import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.Algebra.CharP.Reduced open Function Polynomial class PerfectRing (R : Type*) (p : β„•) [CommSemiring R] [ExpChar R p] : Prop where bijective_frobenius : Bijective <| frobenius R p section PerfectRing va...
Mathlib/FieldTheory/Perfect.lean
151
153
theorem frobeniusEquiv_symm_comp_frobenius : ((frobeniusEquiv R p).symm : R β†’+* R).comp (frobenius R p) = RingHom.id R := by
ext; simp
1
import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Combinatorics.Additive.AP.Three.Defs import Mathlib.Combinatorics.Pigeonhole import Mathlib.Data.Complex.ExponentialBounds #align_import combinatorics.additive.behrend from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open N...
Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean
147
147
theorem map_zero (d : β„•) (a : Fin 0 β†’ β„•) : map d a = 0 := by
simp [map]
1
import Batteries.Tactic.Lint.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Order import Mathlib.Init.Data.Int.Order set_option autoImplicit true namespace Linarith theorem lt_irrefl {Ξ± : Type u} ...
Mathlib/Tactic/Linarith/Lemmas.lean
52
53
theorem mul_eq {Ξ±} [OrderedSemiring Ξ±] {a b : Ξ±} (ha : a = 0) (_ : 0 < b) : b * a = 0 := by
simp [*]
1
import Mathlib.Init.Function #align_import data.option.n_ary from "leanprover-community/mathlib"@"995b47e555f1b6297c7cf16855f1023e355219fb" universe u open Function namespace Option variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {f : Ξ± β†’ Ξ² β†’ Ξ³} {a : Option Ξ±} {b : Option Ξ²} {c : Option Ξ³} def mapβ‚‚ (f : Ξ± β†’ Ξ² β†’ Ξ³) (a : Option Ξ±) ...
Mathlib/Data/Option/NAry.lean
95
96
theorem mapβ‚‚_map_left (f : Ξ³ β†’ Ξ² β†’ Ξ΄) (g : Ξ± β†’ Ξ³) : mapβ‚‚ f (a.map g) b = mapβ‚‚ (fun a b => f (g a) b) a b := by
cases a <;> rfl
1
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Order.Iterate import Mathlib.Order.SemiconjSup import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Order.MonotoneContinuity #align_import dynamics.circle.rotation_number.translation_number from "leanprover-...
Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
218
219
theorem units_apply_inv_apply (f : CircleDeg1LiftΛ£) (x : ℝ) : f ((f⁻¹ : CircleDeg1LiftΛ£) x) = x := by
simp only [← mul_apply, f.mul_inv, coe_one, id]
1
import Mathlib.Algebra.BigOperators.Group.Finset #align_import data.nat.gcd.big_operators from "leanprover-community/mathlib"@"008205aa645b3f194c1da47025c5f110c8406eab" namespace Nat variable {ΞΉ : Type*} theorem coprime_list_prod_left_iff {l : List β„•} {k : β„•} : Coprime l.prod k ↔ βˆ€ n ∈ l, Coprime n k := by ...
Mathlib/Data/Nat/GCD/BigOperators.lean
52
54
theorem coprime_fintype_prod_left_iff [Fintype ΞΉ] {s : ΞΉ β†’ β„•} {x : β„•} : Coprime (∏ i, s i) x ↔ βˆ€ i, Coprime (s i) x := by
simp [coprime_prod_left_iff]
1
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Polynomial.Degree.Lemmas #align_import data.polynomial.erase_lead from "leanprover-community/mathlib"@"fa256f00ce018e7b40e1dc756e403c86680bf448" noncomputable section open Polynomial open Polynomial Finset namespace Polynomial variable {R : Type*}...
Mathlib/Algebra/Polynomial/EraseLead.lean
132
134
theorem card_support_eraseLead' {c : β„•} (fc : f.support.card = c + 1) : f.eraseLead.support.card = c := by
rw [card_support_eraseLead, fc, add_tsub_cancel_right]
1
import Mathlib.Topology.MetricSpace.Algebra import Mathlib.Analysis.Normed.Field.Basic #align_import analysis.normed.mul_action from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" variable {Ξ± Ξ² : Type*} section SeminormedAddGroup variable [SeminormedAddGroup Ξ±] [SeminormedAddGroup Ξ²] ...
Mathlib/Analysis/Normed/MulAction.lean
37
38
theorem dist_smul_le (s : Ξ±) (x y : Ξ²) : dist (s β€’ x) (s β€’ y) ≀ β€–sβ€– * dist x y := by
simpa only [dist_eq_norm, sub_zero] using dist_smul_pair s x y
1
import Mathlib.Analysis.LocallyConvex.Basic #align_import analysis.locally_convex.balanced_core_hull from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Pointwise Topology Filter variable {π•œ E ΞΉ : Type*} section balancedHull section SeminormedRing variable [SeminormedRing ...
Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean
81
82
theorem mem_balancedCore_iff : x ∈ balancedCore π•œ s ↔ βˆƒ t, Balanced π•œ t ∧ t βŠ† s ∧ x ∈ t := by
simp_rw [balancedCore, mem_sUnion, mem_setOf_eq, and_assoc]
1
import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" open scoped LinearAlgebra.Projectivization variable {ΞΉ K V : Type*} [DivisionRing K] [AddCommGroup V] [Module K V] {f : ΞΉ β†’ ...
Mathlib/LinearAlgebra/Projectivization/Independence.lean
103
104
theorem independent_iff_not_dependent : Independent f ↔ Β¬Dependent f := by
rw [dependent_iff_not_independent, Classical.not_not]
1