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.MeasureTheory.Constructions.Pi import Mathlib.MeasureTheory.Constructions.Prod.Integral open Fintype MeasureTheory MeasureTheory.Measure variable {π•œ : Type*} [RCLike π•œ] namespace MeasureTheory theorem Integrable.fin_nat_prod {n : β„•} {E : Fin n β†’ Type*} [βˆ€ i, MeasureSpace (E i)] [βˆ€ i, SigmaF...
Mathlib/MeasureTheory/Integral/Pi.lean
95
98
theorem integral_fintype_prod_eq_pow {E : Type*} (ΞΉ : Type*) [Fintype ΞΉ] (f : E β†’ π•œ) [MeasureSpace E] [SigmaFinite (volume : Measure E)] : ∫ x : ΞΉ β†’ E, ∏ i, f (x i) = (∫ x, f x) ^ (card ΞΉ) := by
rw [integral_fintype_prod_eq_prod, Finset.prod_const, card]
1
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic #align_import analysis.calculus.fderiv_...
Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
144
145
theorem isOpen_B {K : Set (E β†’L[π•œ] F)} {r s Ξ΅ : ℝ} : IsOpen (B f K r s Ξ΅) := by
simp [B, isOpen_biUnion, IsOpen.inter, isOpen_A]
1
import Mathlib.Data.Bundle import Mathlib.Data.Set.Image import Mathlib.Topology.PartialHomeomorph import Mathlib.Topology.Order.Basic #align_import topology.fiber_bundle.trivialization from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open TopologicalSpace Filter Set Bundle Function ...
Mathlib/Topology/FiberBundle/Trivialization.lean
141
142
theorem mem_target {x : B Γ— F} : x ∈ e.target ↔ x.1 ∈ e.baseSet := by
rw [e.target_eq, prod_univ, mem_preimage]
1
import Mathlib.Algebra.Polynomial.Splits #align_import algebra.cubic_discriminant from "leanprover-community/mathlib"@"930133160e24036d5242039fe4972407cd4f1222" noncomputable section @[ext] structure Cubic (R : Type*) where (a b c d : R) #align cubic Cubic namespace Cubic open Cubic Polynomial open Polynom...
Mathlib/Algebra/CubicDiscriminant.lean
458
459
theorem map_toPoly : (map Ο† P).toPoly = Polynomial.map Ο† P.toPoly := by
simp only [map, toPoly, map_C, map_X, Polynomial.map_add, Polynomial.map_mul, Polynomial.map_pow]
1
import Mathlib.Algebra.Algebra.Spectrum import Mathlib.LinearAlgebra.GeneralLinearGroup import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.RingTheory.Nilpotent.Basic #align_import linear_algebra.eigenspace.basic from "leanprover-community/mathlib"@"6b0169218d01f2837d79ea2784882009a0da1aa1" universe u v...
Mathlib/LinearAlgebra/Eigenspace/Basic.lean
69
69
theorem eigenspace_zero (f : End R M) : f.eigenspace 0 = LinearMap.ker f := by
simp [eigenspace]
1
import Mathlib.Algebra.BigOperators.Fin import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Finset.Sort import Mathlib.Data.Set.Subsingleton #align_import combinatorics.composition from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7" open List variable {n : β„•} ...
Mathlib/Combinatorics/Enumerative/Composition.lean
252
252
theorem boundary_zero : c.boundary 0 = 0 := by
simp [boundary, Fin.ext_iff]
1
import Mathlib.Algebra.Polynomial.Degree.Definitions #align_import ring_theory.polynomial.opposites from "leanprover-community/mathlib"@"63417e01fbc711beaf25fa73b6edb395c0cfddd0" open Polynomial open Polynomial MulOpposite variable {R : Type*} [Semiring R] noncomputable section namespace Polynomial def opRi...
Mathlib/RingTheory/Polynomial/Opposites.lean
57
59
theorem opRingEquiv_op_C_mul_X_pow (r : R) (n : β„•) : opRingEquiv R (op (C r * X ^ n : R[X])) = C (op r) * X ^ n := by
simp only [X_pow_mul, op_mul, op_pow, map_mul, map_pow, opRingEquiv_op_X, opRingEquiv_op_C]
1
import Mathlib.Algebra.Order.Invertible import Mathlib.Algebra.Order.Module.OrderedSMul import Mathlib.LinearAlgebra.AffineSpace.Midpoint import Mathlib.LinearAlgebra.Ray import Mathlib.Tactic.GCongr #align_import analysis.convex.segment from "leanprover-community/mathlib"@"c5773405394e073885e2a144c9ca14637e8eb963" ...
Mathlib/Analysis/Convex/Segment.lean
68
71
theorem openSegment_eq_imageβ‚‚ (x y : E) : openSegment π•œ x y = (fun p : π•œ Γ— π•œ => p.1 β€’ x + p.2 β€’ y) '' { p | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 = 1 } := by
simp only [openSegment, image, Prod.exists, mem_setOf_eq, exists_prop, and_assoc]
1
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps import Mathlib.Topology.FiberBundle.Basic #align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" noncomputable section open scoped Classical open Bundle Set open scoped Topology variable (R : ...
Mathlib/Topology/VectorBundle/Basic.lean
126
128
theorem coe_linearMapAt_of_mem (e : Pretrivialization F (Ο€ F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2 := by
simp_rw [coe_linearMapAt, if_pos hb]
1
import Mathlib.Algebra.DirectSum.Module import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Convex.Uniform import Mathlib.Analysis.NormedSpace.Completion import Mathlib.Analysis.NormedSpace.BoundedLinearMaps #align_import analysis.inner_product_space.basic from "leanprover-community/mathlib"@"3f655f5297b030...
Mathlib/Analysis/InnerProductSpace/Basic.lean
220
221
theorem inner_add_right (x y z : F) : βŸͺx, y + z⟫ = βŸͺx, y⟫ + βŸͺx, z⟫ := by
rw [← inner_conj_symm, inner_add_left, RingHom.map_add]; simp only [inner_conj_symm]
1
import Mathlib.Algebra.Field.Defs import Mathlib.Algebra.GroupWithZero.Units.Lemmas import Mathlib.Algebra.Ring.Commute import Mathlib.Algebra.Ring.Invertible import Mathlib.Order.Synonym #align_import algebra.field.basic from "leanprover-community/mathlib"@"05101c3df9d9cfe9430edc205860c79b6d660102" open Function ...
Mathlib/Algebra/Field/Basic.lean
129
129
theorem neg_inv : -a⁻¹ = (-a)⁻¹ := by
rw [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
1
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.SetTheory.Ordinal.Basic import Mathlib.Topology.ContinuousFunction.Algebra import Mathlib.Topology.Compactness.Paracompact import Mathlib.Topology.ShrinkingLemma import Mathlib.Topology.UrysohnsLemma #align_import topology.partition_of_unity from "leanprover-...
Mathlib/Topology/PartitionOfUnity.lean
188
190
theorem mem_finsupport (xβ‚€ : X) {i} : i ∈ ρ.finsupport xβ‚€ ↔ i ∈ support fun i ↦ ρ i xβ‚€ := by
simp only [finsupport, mem_support, Finite.mem_toFinset, mem_setOf_eq]
1
import Mathlib.CategoryTheory.Monoidal.Mon_ #align_import category_theory.monoidal.Mod_ from "leanprover-community/mathlib"@"33085c9739c41428651ac461a323fde9a2688d9b" universe v₁ vβ‚‚ u₁ uβ‚‚ open CategoryTheory MonoidalCategory variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] variable {C} struc...
Mathlib/CategoryTheory/Monoidal/Mod_.lean
81
82
theorem id_hom' (M : Mod_ A) : (πŸ™ M : M ⟢ M).hom = πŸ™ M.X := by
rfl
1
import Mathlib.Order.Filter.Bases import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.filter.lift from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" open Set Classical Filter Function namespace Filter variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} section lift protect...
Mathlib/Order/Filter/Lift.lean
106
108
theorem tendsto_lift {m : Ξ³ β†’ Ξ²} {l : Filter Ξ³} : Tendsto m l (f.lift g) ↔ βˆ€ s ∈ f, Tendsto m l (g s) := by
simp only [Filter.lift, tendsto_iInf]
1
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Log import Mathlib.Data.List.Indexes import Mathlib.Data.List.Palindrome import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith impo...
Mathlib/Data/Nat/Digits.lean
119
121
theorem digits_add_two_add_one (b n : β„•) : digits (b + 2) (n + 1) = ((n + 1) % (b + 2)) :: digits (b + 2) ((n + 1) / (b + 2)) := by
simp [digits, digitsAux_def]
1
import Mathlib.Topology.Order #align_import topology.maps from "leanprover-community/mathlib"@"d91e7f7a7f1c7e9f0e18fdb6bde4f652004c735d" open Set Filter Function open TopologicalSpace Topology Filter variable {X : Type*} {Y : Type*} {Z : Type*} {ΞΉ : Type*} {f : X β†’ Y} {g : Y β†’ Z} section Inducing variable [To...
Mathlib/Topology/Maps.lean
152
153
theorem isClosed_iff (hf : Inducing f) {s : Set X} : IsClosed s ↔ βˆƒ t, IsClosed t ∧ f ⁻¹' t = s := by
rw [hf.induced, isClosed_induced_iff]
1
import Mathlib.LinearAlgebra.ExteriorAlgebra.Basic import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.CliffordAlgebra.Conjugation import Mathlib.LinearAlgebra.Dual #align_import linear_algebra.clifford_algebra.contraction from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2...
Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
149
151
theorem contractLeft_mul_algebraMap (a : CliffordAlgebra Q) (r : R) : dβŒ‹(a * algebraMap _ _ r) = dβŒ‹a * algebraMap _ _ r := by
rw [← Algebra.commutes, contractLeft_algebraMap_mul, Algebra.commutes]
1
import Mathlib.Data.Nat.Count import Mathlib.Data.Nat.SuccPred import Mathlib.Order.Interval.Set.Monotone import Mathlib.Order.OrderIsoNat #align_import data.nat.nth from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0" open Finset namespace Nat variable (p : β„• β†’ Prop) noncomputable d...
Mathlib/Data/Nat/Nth.lean
71
73
theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : β„•} (hn : n < hf.toFinset.card) : nth p n = hf.toFinset.orderEmbOfFin rfl ⟨n, hn⟩ := by
rw [nth_eq_getD_sort hf, Finset.orderEmbOfFin_apply, List.getD_eq_get]
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
45
45
theorem rotate_zero (l : List Ξ±) : l.rotate 0 = l := by
simp [rotate]
1
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ΞΉ : Sort*} {π•œ E : Type*} section OrderedSemiring variable (π•œ) [OrderedSemiring π•œ] [AddCommMonoid E] [Module π•œ E] {s t s₁ sβ‚‚ t₁ tβ‚‚ u : Set ...
Mathlib/Analysis/Convex/Join.lean
75
75
theorem convexJoin_singletons (x : E) : convexJoin π•œ {x} {y} = segment π•œ x y := by
simp
1
import Mathlib.Control.Functor.Multivariate import Mathlib.Data.PFunctor.Univariate.Basic #align_import data.pfunctor.multivariate.basic from "leanprover-community/mathlib"@"e3d9ab8faa9dea8f78155c6c27d62a621f4c152d" universe u v open MvFunctor @[pp_with_univ] structure MvPFunctor (n : β„•) where A : Type u ...
Mathlib/Data/PFunctor/Multivariate/Basic.lean
148
149
theorem comp.get_mk (x : P (fun i => Q i Ξ±)) : comp.get (comp.mk x) = x := by
rfl
1
import Mathlib.Geometry.Euclidean.Sphere.Basic #align_import geometry.euclidean.sphere.second_inter from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open RealInnerProductSpace namespace EuclideanGeometry variable {V : Type*} {P : Type*} [NormedAddCommGroup V]...
Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
54
55
theorem Sphere.secondInter_mem {s : Sphere P} {p : P} (v : V) : s.secondInter p v ∈ s ↔ p ∈ s := by
simp_rw [mem_sphere, Sphere.secondInter_dist]
1
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ΞΉ M : Type*} [DecidableEq ΞΉ] theorem List.support_sum_subset [Add...
Mathlib/Data/Finsupp/BigOperators.lean
55
57
theorem Finset.support_sum_subset [AddCommMonoid M] (s : Finset (ΞΉ β†’β‚€ M)) : (s.sum id).support βŠ† Finset.sup s Finsupp.support := by
classical convert Multiset.support_sum_subset s.1; simp
1
import Mathlib.Algebra.EuclideanDomain.Defs import Mathlib.Algebra.Ring.Divisibility.Basic import Mathlib.Algebra.Ring.Regular import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Ring.Basic #align_import algebra.euclidean_domain.basic from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d0...
Mathlib/Algebra/EuclideanDomain/Basic.lean
63
64
theorem dvd_mod_iff {a b c : R} (h : c ∣ b) : c ∣ a % b ↔ c ∣ a := by
rw [← dvd_add_right (h.mul_right _), div_add_mod]
1
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring.List import Mathlib.Data.Int.ModEq import Mathlib.Data.Nat.Bits import Mathlib.Data.Nat.Log import Mathlib.Data.List.Indexes import Mathlib.Data.List.Palindrome import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.Linarith impo...
Mathlib/Data/Nat/Digits.lean
60
60
theorem digitsAux_zero (b : β„•) (h : 2 ≀ b) : digitsAux b h 0 = [] := by
rw [digitsAux]
1
import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.NormedSpace.Pointwise import Mathlib.Analysis.Seminorm import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Analysis.RCLike.Basic #align_import analysis.convex.gauge from "leanprover-community/mathlib"@"373b03b5b9d0486534edbe94747f23cb3712f93d" ...
Mathlib/Analysis/Convex/Gauge.lean
134
135
theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x := by
simp_rw [gauge_def', smul_neg, neg_mem_neg]
1
import Mathlib.Algebra.Algebra.Subalgebra.Operations import Mathlib.Algebra.Ring.Fin import Mathlib.RingTheory.Ideal.Quotient #align_import ring_theory.ideal.quotient_operations from "leanprover-community/mathlib"@"b88d81c84530450a8989e918608e5960f015e6c8" universe u v w namespace Ideal open Function RingHom var...
Mathlib/RingTheory/Ideal/QuotientOperations.lean
189
191
theorem mem_quotient_iff_mem {I J : Ideal R} (hIJ : I ≀ J) {x : R} : Quotient.mk I x ∈ J.map (Quotient.mk I) ↔ x ∈ J := by
rw [mem_quotient_iff_mem_sup, sup_eq_left.mpr hIJ]
1
import Mathlib.Analysis.Calculus.ContDiff.Bounds import Mathlib.Analysis.Calculus.IteratedDeriv.Defs import Mathlib.Analysis.Calculus.LineDeriv.Basic import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.Normed.Group.ZeroAtInfty import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Ana...
Mathlib/Analysis/Distribution/SchwartzSpace.lean
203
205
theorem decay_neg_aux (k n : β„•) (f : 𝓒(E, F)) (x : E) : β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n (-f : E β†’ F) xβ€– = β€–xβ€– ^ k * β€–iteratedFDeriv ℝ n f xβ€– := by
rw [iteratedFDeriv_neg_apply, norm_neg]
1
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.Module.Pi #align_import data.holor from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" universe u open List def HolorIndex (ds : List β„•) : Type := { is : List β„• // Forallβ‚‚ (Β· < Β·) is ds } #align holor_index Hol...
Mathlib/Data/Holor.lean
58
59
theorem cast_type (is : List β„•) (eq : ds₁ = dsβ‚‚) (h : Forallβ‚‚ (Β· < Β·) is ds₁) : (cast (congr_arg HolorIndex eq) ⟨is, h⟩).val = is := by
subst eq; rfl
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
60
60
theorem eraseLead_zero : eraseLead (0 : R[X]) = 0 := by
simp only [eraseLead, erase_zero]
1
import Mathlib.Data.List.Infix #align_import data.list.rdrop from "leanprover-community/mathlib"@"26f081a2fb920140ed5bc5cc5344e84bcc7cb2b2" -- Make sure we don't import algebra assert_not_exists Monoid variable {Ξ± : Type*} (p : Ξ± β†’ Bool) (l : List Ξ±) (n : β„•) namespace List def rdrop : List Ξ± := l.take (l.leng...
Mathlib/Data/List/DropRight.lean
91
92
theorem rtake_concat_succ (x : Ξ±) : rtake (l ++ [x]) (n + 1) = rtake l n ++ [x] := by
simp [rtake_eq_reverse_take_reverse]
1
import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.normed_space.enorm from "leanprover-community/mathlib"@"57ac39bd365c2f80589a700f9fbb664d3a1a30c2" noncomputable section attribute [local instance] Classical.propDecidable open ENNReal structure ENorm (π•œ : Type*) (V : Type*) [NormedField π•œ] [Ad...
Mathlib/Analysis/NormedSpace/ENorm.lean
113
113
theorem map_sub_rev (x y : V) : e (x - y) = e (y - x) := by
rw [← neg_sub, e.map_neg]
1
import Mathlib.RepresentationTheory.Rep import Mathlib.Algebra.Category.FGModuleCat.Limits import Mathlib.CategoryTheory.Preadditive.Schur import Mathlib.RepresentationTheory.Basic #align_import representation_theory.fdRep from "leanprover-community/mathlib"@"19a70dceb9dff0994b92d2dd049de7d84d28112b" suppress_comp...
Mathlib/RepresentationTheory/FdRep.lean
113
114
theorem forgetβ‚‚_ρ (V : FdRep k G) : ((forgetβ‚‚ (FdRep k G) (Rep k G)).obj V).ρ = V.ρ := by
ext g v; rfl
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
532
534
theorem map_one_snd_of_isMulTwoCocycle {f : G Γ— G β†’ M} (hf : IsMulTwoCocycle f) (g : G) : f (g, 1) = g β€’ f (1, 1) := by
simpa only [mul_one, mul_left_inj] using hf g 1 1
1
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} @[simp] theorem reduceOption_cons_of_some (x : Ξ±) (l : List (Option Ξ±)) : reduceOption (some x :: l) = x :: l.reduceOption := by simp only [reduceOption, filterMap, id, eq_self_iff_true, and_self_iff] #align list.reduce_option_cons_of_some...
Mathlib/Data/List/ReduceOption.lean
25
26
theorem reduceOption_cons_of_none (l : List (Option Ξ±)) : reduceOption (none :: l) = l.reduceOption := by
simp only [reduceOption, filterMap, id]
1
import Mathlib.Analysis.RCLike.Lemmas import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad" set_option linter.uppercaseLean3 false...
Mathlib/MeasureTheory/Function/L2Space.lean
104
106
theorem _root_.integral_eq_zero_of_forall_integral_inner_eq_zero (f : Ξ± β†’ E) (hf : Integrable f ΞΌ) (hf_int : βˆ€ c : E, ∫ x, βŸͺc, f x⟫ βˆ‚ΞΌ = 0) : ∫ x, f x βˆ‚ΞΌ = 0 := by
specialize hf_int (∫ x, f x βˆ‚ΞΌ); rwa [integral_inner hf, inner_self_eq_zero] at hf_int
1
import Mathlib.Data.Fin.Fin2 import Mathlib.Data.PFun import Mathlib.Data.Vector3 import Mathlib.NumberTheory.PellMatiyasevic #align_import number_theory.dioph from "leanprover-community/mathlib"@"a66d07e27d5b5b8ac1147cacfe353478e5c14002" open Fin2 Function Nat Sum local infixr:67 " ::β‚’ " => Option.elim' local ...
Mathlib/NumberTheory/Dioph.lean
85
86
theorem IsPoly.neg {f : (Ξ± β†’ β„•) β†’ β„€} : IsPoly f β†’ IsPoly (-f) := by
rw [← zero_sub]; exact (IsPoly.const 0).sub
1
import Batteries.Tactic.Init import Batteries.Tactic.Alias import Batteries.Tactic.Lint.Misc instance {f : Ξ± β†’ Ξ²} [DecidablePred p] : DecidablePred (p ∘ f) := inferInstanceAs <| DecidablePred fun x => p (f x) @[deprecated] alias proofIrrel := proof_irrel theorem Function.id_def : @id Ξ± = fun x => x := rfl al...
.lake/packages/batteries/Batteries/Logic.lean
72
72
theorem Eq.congr_left {x y z : Ξ±} (h : x = y) : x = z ↔ y = z := by
rw [h]
1
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Order.Bounds.OrderIso import Mathlib.Tactic.Positivity.Core #align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477...
Mathlib/Algebra/Order/Field/Basic.lean
104
104
theorem inv_mul_le_iff' (h : 0 < b) : b⁻¹ * a ≀ c ↔ a ≀ c * b := by
rw [inv_mul_le_iff h, mul_comm]
1
import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.ne_locus from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" variable {Ξ± M N P : Type*} namespace Finsupp variable [DecidableEq Ξ±] section NHasZero variable [DecidableEq N] [Zero N] (f g : Ξ± β†’β‚€ N) def neLocus (f g : Ξ± β†’β‚€ ...
Mathlib/Data/Finsupp/NeLocus.lean
69
70
theorem neLocus_comm : f.neLocus g = g.neLocus f := by
simp_rw [neLocus, Finset.union_comm, ne_comm]
1
import Mathlib.Data.Stream.Defs import Mathlib.Logic.Function.Basic import Mathlib.Init.Data.List.Basic import Mathlib.Data.List.Basic #align_import data.stream.init from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" set_option autoImplicit true open Nat Function Option namespace Stre...
Mathlib/Data/Stream/Init.lean
162
163
theorem map_eq (s : Stream' Ξ±) : map f s = f (head s)::map f (tail s) := by
rw [← Stream'.eta (map f s), tail_map, head_map]
1
import Mathlib.Algebra.Order.Group.Defs import Mathlib.Algebra.Order.Monoid.WithTop #align_import algebra.order.group.with_top from "leanprover-community/mathlib"@"f178c0e25af359f6cbc72a96a243efd3b12423a3" namespace WithTop variable {Ξ± : Type*} namespace LinearOrderedAddCommGroup variable [LinearOrderedAddCommG...
Mathlib/Algebra/Order/Group/WithTop.lean
61
62
theorem top_sub {a : WithTop α} : (⊀ : WithTop α) - a = ⊀ := by
cases a <;> rfl
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
30
31
theorem le_of_eq_of_le {Ξ±} [OrderedSemiring Ξ±] {a b : Ξ±} (ha : a = 0) (hb : b ≀ 0) : a + b ≀ 0 := by
simp [*]
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
98
100
theorem le_einfsep_image_iff {d} {f : Ξ² β†’ Ξ±} {s : Set Ξ²} : d ≀ einfsep (f '' s) ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, f x β‰  f y β†’ d ≀ edist (f x) (f y) := by
simp_rw [le_einfsep_iff, forall_mem_image]
1
import Mathlib.LinearAlgebra.Dimension.Constructions import Mathlib.LinearAlgebra.Dimension.Finite universe u v open Function Set Cardinal variable {R} {M M₁ Mβ‚‚ M₃ : Type u} {M' : Type v} [Ring R] variable [AddCommGroup M] [AddCommGroup M₁] [AddCommGroup Mβ‚‚] [AddCommGroup M₃] [AddCommGroup M'] variable [Module R M...
Mathlib/LinearAlgebra/Dimension/RankNullity.lean
86
88
theorem rank_eq_of_surjective {f : M β†’β‚—[R] M₁} (h : Surjective f) : Module.rank R M = Module.rank R M₁ + Module.rank R (LinearMap.ker f) := by
rw [← rank_range_add_rank_ker f, ← rank_range_of_surjective f h]
1
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Normed.Group.AddTorsor import Mathlib.Geometry.Euclidean.Angle.Unoriented.Basic import Mathlib.Analysis.NormedSpace.AffineIsometry #align_import geometry.euclidean.angle.unoriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f...
Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
125
126
theorem angle_neg (v₁ vβ‚‚ v₃ : V) : ∠ (-v₁) (-vβ‚‚) (-v₃) = ∠ v₁ vβ‚‚ v₃ := by
simpa only [zero_sub] using angle_const_sub 0 v₁ vβ‚‚ v₃
1
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.Order.Ring.Int import Mathlib.Data.Int.GCD instance : GCDMonoid β„• where gcd := Nat.gcd lcm := Nat.lcm gcd_dvd_left := Nat.gcd_dvd_left gcd_dvd_right := Nat.gcd_dvd_right dvd_gcd := Nat.dvd_gcd gcd_mul_lcm a b := by rw [Nat.gcd_mul_lcm]; rfl ...
Mathlib/Algebra/GCDMonoid/Nat.lean
82
83
theorem abs_eq_normalize (z : β„€) : |z| = normalize z := by
cases le_total 0 z <;> simp [-normalize_apply, normalize_of_nonneg, normalize_of_nonpos, *]
1
import Mathlib.Data.List.Lattice import Mathlib.Data.List.Range import Mathlib.Data.Bool.Basic #align_import data.list.intervals from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open Nat namespace List def Ico (n m : β„•) : List β„• := range' n (m - n) #align list.Ico List.Ico names...
Mathlib/Data/List/Intervals.lean
76
77
theorem map_add (n m k : β„•) : (Ico n m).map (k + Β·) = Ico (n + k) (m + k) := by
rw [Ico, Ico, map_add_range', Nat.add_sub_add_right m k, Nat.add_comm n k]
1
import Mathlib.Data.Matrix.Invertible import Mathlib.LinearAlgebra.Matrix.Adjugate import Mathlib.LinearAlgebra.FiniteDimensional #align_import linear_algebra.matrix.nonsingular_inverse from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422" namespace Matrix universe u u' v variable {l : ...
Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
225
226
theorem nonsing_inv_apply (h : IsUnit A.det) : A⁻¹ = (↑h.unit⁻¹ : Ξ±) β€’ A.adjugate := by
rw [inv_def, ← Ring.inverse_unit h.unit, IsUnit.unit_spec]
1
import Mathlib.Geometry.Manifold.MFDeriv.FDeriv noncomputable section open scoped Manifold open Bundle Set Topology section SpecificFunctions variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners π•œ E H)...
Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
164
164
theorem tangentMap_id : tangentMap I I (id : M β†’ M) = id := by
ext1 ⟨x, v⟩; simp [tangentMap]
1
import Mathlib.Order.Filter.Partial import Mathlib.Topology.Basic #align_import topology.partial from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter open Topology variable {X Y : Type*} [TopologicalSpace X] theorem rtendsto_nhds {r : Rel Y X} {l : Filter Y} {x : X} : ...
Mathlib/Topology/Partial.lean
57
58
theorem open_dom_of_pcontinuous {f : X β†’. Y} (h : PContinuous f) : IsOpen f.Dom := by
rw [← PFun.preimage_univ]; exact h _ isOpen_univ
1
import Mathlib.Data.Multiset.Dedup #align_import data.multiset.finset_ops from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" namespace Multiset open List variable {Ξ± : Type*} [DecidableEq Ξ±] {s : Multiset Ξ±} def ndinsert (a : Ξ±) (s : Multiset Ξ±) : Multiset Ξ± := Quot.liftOn s (...
Mathlib/Data/Multiset/FinsetOps.lean
74
75
theorem length_ndinsert_of_mem {a : α} {s : Multiset α} (h : a ∈ s) : card (ndinsert a s) = card s := by
simp [h]
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
94
95
theorem distrib_three_right [Mul R] [Add R] [RightDistribClass R] (a b c d : R) : (a + b + c) * d = a * d + b * d + c * d := by
simp [right_distrib]
1
import Mathlib.Data.Complex.Module import Mathlib.Data.Complex.Order import Mathlib.Data.Complex.Exponential import Mathlib.Analysis.RCLike.Basic import Mathlib.Topology.Algebra.InfiniteSum.Module import Mathlib.Topology.Instances.RealVectorSpace #align_import analysis.complex.basic from "leanprover-community/mathlib...
Mathlib/Analysis/Complex/Basic.lean
121
122
theorem edist_of_re_eq {z w : β„‚} (h : z.re = w.re) : edist z w = edist z.im w.im := by
rw [edist_nndist, edist_nndist, nndist_of_re_eq h]
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
69
71
theorem einfsep_lt_top : s.einfsep < ∞ ↔ βˆƒ x ∈ s, βˆƒ y ∈ s, x β‰  y ∧ edist x y < ∞ := by
simp_rw [einfsep, iInf_lt_iff, exists_prop]
1
import Mathlib.Algebra.Group.Units.Equiv import Mathlib.CategoryTheory.Endomorphism #align_import category_theory.conj from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u namespace CategoryTheory namespace Iso variable {C : Type u} [Category.{v} C] def homCongr {X Y X₁...
Mathlib/CategoryTheory/Conj.lean
60
60
theorem homCongr_refl {X Y : C} (f : X ⟢ Y) : (Iso.refl X).homCongr (Iso.refl Y) f = f := by
simp
1
import Mathlib.Data.List.Basic namespace List variable {Ξ± Ξ² : Type*} #align list.length_enum_from List.enumFrom_length #align list.length_enum List.enum_length @[simp] theorem get?_enumFrom : βˆ€ n (l : List Ξ±) m, get? (enumFrom n l) m = (get? l m).map fun a => (n + m, a) | n, [], m => rfl | n, a :: l, 0 =...
Mathlib/Data/List/Enum.lean
132
133
theorem enum_append (xs ys : List Ξ±) : enum (xs ++ ys) = enum xs ++ enumFrom xs.length ys := by
simp [enum, enumFrom_append]
1
import Mathlib.Data.Finset.Card #align_import data.finset.option from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0" variable {Ξ± Ξ² : Type*} open Function namespace Finset def insertNone : Finset Ξ± β†ͺo Finset (Option Ξ±) := (OrderEmbedding.ofMapLEIff fun s => cons none (s.map Embeddi...
Mathlib/Data/Finset/Option.lean
78
78
theorem some_mem_insertNone {s : Finset Ξ±} {a : Ξ±} : some a ∈ insertNone s ↔ a ∈ s := by
simp
1
import Mathlib.LinearAlgebra.Basis.VectorSpace import Mathlib.LinearAlgebra.Dimension.Finite import Mathlib.SetTheory.Cardinal.Subfield import Mathlib.LinearAlgebra.Dimension.RankNullity #align_import linear_algebra.dimension from "leanprover-community/mathlib"@"47a5f8186becdbc826190ced4312f8199f9db6a5" noncomput...
Mathlib/LinearAlgebra/Dimension/DivisionRing.lean
196
198
theorem linearIndependent_iff_card_le_finrank_span {ΞΉ : Type*} [Fintype ΞΉ] {b : ΞΉ β†’ V} : LinearIndependent K b ↔ Fintype.card ΞΉ ≀ (Set.range b).finrank K := by
rw [linearIndependent_iff_card_eq_finrank_span, (finrank_range_le_card _).le_iff_eq]
1
import Mathlib.Algebra.CharP.ExpChar import Mathlib.GroupTheory.OrderOfElement #align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450" variable {R ΞΉ : Type*} namespace CharTwo section Semiring variable [Semiring R] [CharP R 2] theorem two_eq_zero : (2 : ...
Mathlib/Algebra/CharP/Two.lean
55
55
theorem bit1_apply_eq_one (x : R) : (bit1 x : R) = 1 := by
simp
1
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
73
73
theorem symm : PythagoreanTriple y x z := by
rwa [pythagoreanTriple_comm]
1
import Mathlib.Algebra.Order.Field.Canonical.Defs #align_import algebra.order.field.canonical.basic from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" variable {Ξ± : Type*} section CanonicallyLinearOrderedSemifield variable [CanonicallyLinearOrderedSemifield Ξ±] [Sub Ξ±] [OrderedSub Ξ±] ...
Mathlib/Algebra/Order/Field/Canonical/Basic.lean
22
22
theorem tsub_div (a b c : Ξ±) : (a - b) / c = a / c - b / c := by
simp_rw [div_eq_mul_inv, tsub_mul]
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
64
66
theorem einfsep_top : s.einfsep = ∞ ↔ βˆ€ x ∈ s, βˆ€ y ∈ s, x β‰  y β†’ edist x y = ∞ := by
simp_rw [einfsep, iInf_eq_top]
1
import Mathlib.Data.Set.Lattice import Mathlib.Data.Set.Pairwise.Basic #align_import data.set.pairwise.lattice from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Set Order variable {Ξ± Ξ² Ξ³ ΞΉ ΞΉ' : Type*} {ΞΊ : Sort*} {r p q : Ξ± β†’ Ξ± β†’ Prop} section Pairwise variable {f g : ...
Mathlib/Data/Set/Pairwise/Lattice.lean
39
41
theorem pairwise_sUnion {r : Ξ± β†’ Ξ± β†’ Prop} {s : Set (Set Ξ±)} (h : DirectedOn (Β· βŠ† Β·) s) : (⋃₀ s).Pairwise r ↔ βˆ€ a ∈ s, Set.Pairwise a r := by
rw [sUnion_eq_iUnion, pairwise_iUnion h.directed_val, SetCoe.forall]
1
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Algebra.Lie.Quotient #align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" variable {R L M M' : Type*} variable [CommRing R] [LieRing L] [LieAlgebra R L] varia...
Mathlib/Algebra/Lie/Normalizer.lean
70
71
theorem normalizer_inf : (N₁ βŠ“ Nβ‚‚).normalizer = N₁.normalizer βŠ“ Nβ‚‚.normalizer := by
ext; simp [← forall_and]
1
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N Ξ± E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace Ξ±] [NormedAddCommGroup E] {ΞΌ : Me...
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
70
71
theorem smul_Lp_add (c : Mα΅ˆα΅α΅ƒ) : βˆ€ f g : Lp E p ΞΌ, c β€’ (f + g) = c β€’ f + c β€’ g := by
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl
1
import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.PSub import Mathlib.Data.Nat.Size import Mathlib.Data.Num.Bitwise #align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" set_opti...
Mathlib/Data/Num/Lemmas.lean
712
712
theorem bit_to_nat (b n) : (bit b n : β„•) = Nat.bit b n := by
cases b <;> cases n <;> rfl
1
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Order.Bounds.OrderIso import Mathlib.Tactic.Positivity.Core #align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477...
Mathlib/Algebra/Order/Field/Basic.lean
58
58
theorem le_div_iff' (hc : 0 < c) : a ≀ b / c ↔ c * a ≀ b := by
rw [mul_comm, le_div_iff hc]
1
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055" noncomputable section open scoped Classical namespace CategoryTheory open Cat...
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
113
115
theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟢ Q) (g : J β†’ (R ⟢ S)) : (f βŠ— βˆ‘ j ∈ s, g j) = βˆ‘ j ∈ s, f βŠ— g j := by
simp only [tensorHom_def, whiskerLeft_sum, Preadditive.comp_sum]
1
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.HasseDeriv #align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace Polynomial open Polynomial...
Mathlib/Algebra/Polynomial/Taylor.lean
121
123
theorem taylor_eval {R} [CommSemiring R] (r : R) (f : R[X]) (s : R) : (taylor r f).eval s = f.eval (s + r) := by
simp only [taylor_apply, eval_comp, eval_C, eval_X, eval_add]
1
import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Tactic.LinearCombination #align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946" namespace Polynomial.Chebyshev set_option linter.uppercaseLean3 false -- `T` `U` `X` open Polynomial v...
Mathlib/RingTheory/Polynomial/Chebyshev.lean
90
91
theorem T_add_one (n : β„€) : T R (n + 1) = 2 * X * T R n - T R (n - 1) := by
linear_combination (norm := ring_nf) T_add_two R (n - 1)
1
import Mathlib.SetTheory.Game.Basic import Mathlib.Tactic.NthRewrite #align_import set_theory.game.impartial from "leanprover-community/mathlib"@"2e0975f6a25dd3fbfb9e41556a77f075f6269748" universe u namespace SetTheory open scoped PGame namespace PGame def ImpartialAux : PGame β†’ Prop | G => (G β‰ˆ -G) ∧ (βˆ€ i...
Mathlib/SetTheory/Game/Impartial.lean
50
52
theorem impartial_def {G : PGame} : G.Impartial ↔ (G β‰ˆ -G) ∧ (βˆ€ i, Impartial (G.moveLeft i)) ∧ βˆ€ j, Impartial (G.moveRight j) := by
simpa only [impartial_iff_aux] using impartialAux_def
1
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
153
155
theorem ite_one_mul {P : Prop} [Decidable P] {a b : M} : ite P 1 (a * b) = ite P 1 a * ite P 1 b := by
by_cases h:P <;> simp [h]
1
import Mathlib.Order.Filter.Basic import Mathlib.Algebra.Module.Pi #align_import order.filter.germ from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" namespace Filter variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} {l : Filter Ξ±} {f g h : Ξ± β†’ Ξ²} theorem const_eventuallyEq' [NeBot l] {a b : Ξ²} : (βˆ€αΆ  _ in ...
Mathlib/Order/Filter/Germ.lean
132
133
theorem isConstant_coe_const {l : Filter Ξ±} {b : Ξ²} : (fun _ : Ξ± ↦ b : Germ l Ξ²).IsConstant := by
use b
1
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
97
99
theorem birthday_eq_zero {x : PGame} : birthday x = 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves := by
rw [birthday_def, max_eq_zero, lsub_eq_zero_iff, lsub_eq_zero_iff]
1
import Mathlib.Data.Finsupp.ToDFinsupp import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent #align_import linear_algebra.dfinsupp from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" variable {ΞΉ : Type*} {R : Type*} {S : Type*} {M : ΞΉ β†’ Type*} {N : Type*} n...
Mathlib/LinearAlgebra/DFinsupp.lean
170
172
theorem lsum_single [Semiring S] [Module S N] [SMulCommClass R S N] (F : βˆ€ i, M i β†’β‚—[R] N) (i) (x : M i) : lsum S (M := M) F (single i x) = F i x := by
simp
1
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import data.nat.choose.central from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Nat def centralBinom (n : β„•) := (2 * n).choose n #alig...
Mathlib/Data/Nat/Choose/Central.lean
105
115
theorem four_pow_le_two_mul_self_mul_centralBinom : βˆ€ (n : β„•) (_ : 0 < n), 4 ^ n ≀ 2 * n * centralBinom n | 0, pr => (Nat.not_lt_zero _ pr).elim | 1, _ => by norm_num [centralBinom, choose] | 2, _ => by norm_num [centralBinom, choose] | 3, _ => by norm_num [centralBinom, choose] | n + 4, _ => calc ...
rw [mul_assoc]; refine Nat.le_mul_of_pos_left _ zero_lt_two
1
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {π•œ...
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
84
86
theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv π•œ (Fin n) F).symm ∘ iteratedFDerivWithin π•œ n f s := by
ext x; rfl
1
import Mathlib.Analysis.SpecialFunctions.JapaneseBracket import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.IntegralEqImproper import Mathlib.MeasureTheory.Measure.Lebesgue.Integral #align_import analysis.special_functions.improper_inte...
Mathlib/Analysis/SpecialFunctions/ImproperIntegrals.lean
57
58
theorem integral_exp_neg_Ioi_zero : (∫ x : ℝ in Ioi 0, exp (-x)) = 1 := by
simpa only [neg_zero, exp_zero] using integral_exp_neg_Ioi 0
1
import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Analysis.Convex.Hull import Mathlib.LinearAlgebra.AffineSpace.Basis #align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set Function open scoped Classical open Pointwise ...
Mathlib/Analysis/Convex/Combination.lean
54
56
theorem Finset.centerMass_pair (hne : i β‰  j) : ({i, j} : Finset ΞΉ).centerMass w z = (w i / (w i + w j)) β€’ z i + (w j / (w i + w j)) β€’ z j := by
simp only [centerMass, sum_pair hne, smul_add, (mul_smul _ _ _).symm, div_eq_inv_mul]
1
import Mathlib.Topology.Separation open Topology Filter Set TopologicalSpace section Basic variable {Ξ± : Type*} [TopologicalSpace Ξ±] {C : Set Ξ±} theorem AccPt.nhds_inter {x : Ξ±} {U : Set Ξ±} (h_acc : AccPt x (π“Ÿ C)) (hU : U ∈ 𝓝 x) : AccPt x (π“Ÿ (U ∩ C)) := by have : 𝓝[β‰ ] x ≀ π“Ÿ U := by rw [le_princ...
Mathlib/Topology/Perfect.lean
87
88
theorem preperfect_iff_nhds : Preperfect C ↔ βˆ€ x ∈ C, βˆ€ U ∈ 𝓝 x, βˆƒ y ∈ U ∩ C, y β‰  x := by
simp only [Preperfect, accPt_iff_nhds]
1
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Projection import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.RingTheory.I...
Mathlib/LinearAlgebra/Dual.lean
333
334
theorem toDual_apply_right (i : ΞΉ) (m : M) : b.toDual (b i) m = b.repr m i := by
rw [← b.toDual_total_right, b.total_repr]
1
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing import Mathlib.AlgebraicGeometry.OpenImmersion #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" set_option linter.uppercaseLean3 false noncomputable section universe u open Topologica...
Mathlib/AlgebraicGeometry/Gluing.lean
314
316
theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) : gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst := by
delta gluedCoverT'; simp
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
168
171
theorem kernelSubobjectMap_comp {X'' Y'' : C} {f'' : X'' ⟢ Y''} [HasKernel f''] (sq : Arrow.mk f ⟢ Arrow.mk f') (sq' : Arrow.mk f' ⟢ Arrow.mk f'') : kernelSubobjectMap (sq ≫ sq') = kernelSubobjectMap sq ≫ kernelSubobjectMap sq' := by
aesop_cat
1
import Mathlib.Data.Finset.Grade import Mathlib.Order.Interval.Finset.Basic #align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" variable {Ξ± Ξ² : Type*} namespace Finset section Decidable variable [DecidableEq Ξ±] (s t : Finset Ξ±) instance instLocally...
Mathlib/Data/Finset/Interval.lean
125
125
theorem card_Iic_finset : (Iic s).card = 2 ^ s.card := by
rw [Iic_eq_powerset, card_powerset]
1
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
202
203
theorem mul_rotate (a b c : G) : a * b * c = b * c * a := by
simp only [mul_left_comm, mul_comm]
1
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (Ξ± Ξ² : Type*) := Ξ± β†’ Part Ξ² #align pfun PFun infixr:25 " β†’. " => PFun namespace PFun variable {Ξ± Ξ² Ξ³ Ξ΄ Ξ΅ ΞΉ : Type*} instance inhab...
Mathlib/Data/PFun.lean
80
80
theorem mem_dom (f : Ξ± β†’. Ξ²) (x : Ξ±) : x ∈ Dom f ↔ βˆƒ y, y ∈ f x := by
simp [Dom, Part.dom_iff_mem]
1
import Mathlib.Data.DFinsupp.Interval import Mathlib.Data.DFinsupp.Multiset import Mathlib.Order.Interval.Finset.Nat #align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset DFinsupp Function open Pointwise variable {Ξ± : Type*} namespace Mu...
Mathlib/Data/Multiset/Interval.lean
72
74
theorem card_Ioo : (Finset.Ioo s t).card = ∏ i ∈ s.toFinset βˆͺ t.toFinset, (t.count i + 1 - s.count i) - 2 := by
rw [Finset.card_Ioo_eq_card_Icc_sub_two, card_Icc]
1
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
92
93
theorem wellFoundedOn_univ : (univ : Set Ξ±).WellFoundedOn r ↔ WellFounded r := by
simp [wellFoundedOn_iff]
1
import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" universe u v noncompu...
Mathlib/FieldTheory/RatFunc/Basic.lean
164
166
theorem ofFractionRing_div (p q : FractionRing K[X]) : ofFractionRing (p / q) = ofFractionRing p / ofFractionRing q := by
simp only [Div.div, HDiv.hDiv, RatFunc.div]
1
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.GroupWithZero.Units.Equiv import Mathlib.Algebra.Order.Field.Defs import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Order.Bounds.OrderIso import Mathlib.Tactic.Positivity.Core #align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477...
Mathlib/Algebra/Order/Field/Basic.lean
107
107
theorem mul_inv_le_iff (h : 0 < b) : a * b⁻¹ ≀ c ↔ a ≀ b * c := by
rw [mul_comm, inv_mul_le_iff h]
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
68
69
theorem logb_neg_eq_logb (x : ℝ) : logb b (-x) = logb b x := by
rw [← logb_abs x, ← logb_abs (-x), abs_neg]
1
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
140
141
theorem finite_of_encard_le_coe {k : β„•} (h : s.encard ≀ k) : s.Finite := by
rw [← encard_lt_top_iff]; exact h.trans_lt (WithTop.coe_lt_top _)
1
import Batteries.Data.UInt @[ext] theorem Char.ext : {a b : Char} β†’ a.val = b.val β†’ a = b | ⟨_,_⟩, ⟨_,_⟩, rfl => rfl theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val := ⟨congrArg _, Char.ext⟩ theorem Char.le_antisymm_iff {x y : Char} : x = y ↔ x ≀ y ∧ y ≀ x := Char.ext_iff.trans UInt32.le_antisymm_iff ...
.lake/packages/batteries/Batteries/Data/Char.lean
30
31
theorem csize_pos (c) : 0 < csize c := by
rcases csize_eq c with _|_|_|_ <;> simp_all (config := {decide := true})
1
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ΞΉ : Sort*} {f g : ΞΉ β†’ ℝβ‰₯0∞} variable {a b c d : ℝβ‰₯0∞} {r p q : ℝβ‰₯0} theorem toNNReal_iInf (hf : βˆ€ i, f ...
Mathlib/Data/ENNReal/Real.lean
609
610
theorem add_iInf {a : ℝβ‰₯0∞} : a + iInf f = β¨… b, a + f b := by
rw [add_comm, iInf_add]; simp [add_comm]
1
import Mathlib.Algebra.Group.Units import Mathlib.Algebra.GroupWithZero.Basic import Mathlib.Logic.Equiv.Defs import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Nontriviality import Mathlib.Tactic.Spread import Mathlib.Util.AssertExists #align_import algebra.group_with_zero.units.basic from "leanprover-community/...
Mathlib/Algebra/GroupWithZero/Units/Basic.lean
118
119
theorem mul_inverse_cancel_right (x y : Mβ‚€) (h : IsUnit x) : y * x * inverse x = y := by
rw [mul_assoc, mul_inverse_cancel x h, mul_one]
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
119
120
theorem logb_pow {k : β„•} (hx : 0 < x) : logb b (x ^ k) = k * logb b x := by
rw [← rpow_natCast, logb_rpow_eq_mul_logb_of_pos hx]
1
import Mathlib.Algebra.Order.Hom.Monoid import Mathlib.SetTheory.Game.Ordinal #align_import set_theory.surreal.basic from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" universe u namespace SetTheory open scoped PGame namespace PGame def Numeric : PGame β†’ Prop | ⟨_, _, L, R⟩ => (...
Mathlib/SetTheory/Surreal/Basic.lean
71
75
theorem numeric_def {x : PGame} : Numeric x ↔ (βˆ€ i j, x.moveLeft i < x.moveRight j) ∧ (βˆ€ i, Numeric (x.moveLeft i)) ∧ βˆ€ j, Numeric (x.moveRight j) := by
cases x; rfl
1
import Mathlib.Data.Finset.Fold import Mathlib.Algebra.GCDMonoid.Multiset #align_import algebra.gcd_monoid.finset from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" #align_import algebra.gcd_monoid.div from "leanprover-community/mathlib"@"b537794f8409bc9598febb79cd510b1df5f4539d" variab...
Mathlib/Algebra/GCDMonoid/Finset.lean
181
181
theorem normalize_gcd : normalize (s.gcd f) = s.gcd f := by
simp [gcd_def]
1
import Mathlib.Init.Function import Mathlib.Logic.Function.Basic #align_import data.sigma.basic from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" open Function section Sigma variable {Ξ± α₁ Ξ±β‚‚ : Type*} {Ξ² : Ξ± β†’ Type*} {β₁ : α₁ β†’ Type*} {Ξ²β‚‚ : Ξ±β‚‚ β†’ Type*} namespace Sigma instance inst...
Mathlib/Data/Sigma/Basic.lean
70
71
theorem ext_iff {xβ‚€ x₁ : Sigma Ξ²} : xβ‚€ = x₁ ↔ xβ‚€.1 = x₁.1 ∧ HEq xβ‚€.2 x₁.2 := by
cases xβ‚€; cases x₁; exact Sigma.mk.inj_iff
1