Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.57k
proof
stringlengths
5
7.36k
hint
bool
2 classes
import Mathlib.Data.List.Chain #align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" variable {Ξ± : Type*} (l : List Ξ±) (R : Ξ± β†’ Ξ± β†’ Prop) [DecidableRel R] {a b : Ξ±} namespace List @[simp] theorem destutter'_nil : destutter' R a [] = [a] := rfl #align ...
Mathlib/Data/List/Destutter.lean
101
105
theorem destutter'_of_chain (h : l.Chain R a) : l.destutter' R a = a :: l := by induction' l with b l hb generalizing a
induction' l with b l hb generalizing a · simp obtain ⟨h, hc⟩ := chain_cons.mp h rw [l.destutter'_cons_pos h, hb hc]
true
import Mathlib.Data.List.Basic #align_import data.list.join from "leanprover-community/mathlib"@"18a5306c091183ac90884daa9373fa3b178e8607" -- Make sure we don't import algebra assert_not_exists Monoid variable {Ξ± Ξ² : Type*} namespace List attribute [simp] join -- Porting note (#10618): simp can prove this -- @...
Mathlib/Data/List/Join.lean
44
44
theorem join_concat (L : List (List Ξ±)) (l : List Ξ±) : join (L.concat l) = join L ++ l := by
simp
true
set_option autoImplicit true namespace Array @[simp] theorem extract_eq_nil_of_start_eq_end {a : Array Ξ±} : a.extract i i = #[] := by refine extract_empty_of_stop_le_start a ?h exact Nat.le_refl i theorem extract_append_left {a b : Array Ξ±} {i j : Nat} (h : j ≀ a.size) : (a ++ b).extract i j = a.extrac...
Mathlib/Data/Array/ExtractLemmas.lean
44
50
theorem extract_extract {a : Array Ξ±} (h : s1 + e2 ≀ e1) : (a.extract s1 e1).extract s2 e2 = a.extract (s1 + s2) (s1 + e2) := by apply ext
apply ext Β· simp only [size_extract] omega Β· intro i h1 h2 simp only [get_extract, Nat.add_assoc]
true
import Mathlib.Algebra.Module.Card import Mathlib.SetTheory.Cardinal.CountableCover import Mathlib.SetTheory.Cardinal.Continuum import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Topology.MetricSpace.Perfect universe u v open Filter Pointwise Set Function Cardinal open scoped Cardinal Topology theorem c...
Mathlib/Topology/Algebra/Module/Cardinality.lean
97
106
theorem cardinal_eq_of_mem_nhds {E : Type*} (π•œ : Type*) [NontriviallyNormedField π•œ] [AddCommGroup E] [Module π•œ E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul π•œ E] {s : Set E} {x : E} (hs : s ∈ 𝓝 x) : #s = #E := by let g := Homeomorph.addLeft x
let g := Homeomorph.addLeft x let t := g ⁻¹' s have : t ∈ 𝓝 0 := g.continuous.continuousAt.preimage_mem_nhds (by simpa [g] using hs) have A : #t = #E := cardinal_eq_of_mem_nhds_zero π•œ this have B : #t = #s := Cardinal.mk_subtype_of_equiv s g.toEquiv rwa [B] at A
true
import Mathlib.Algebra.ContinuedFractions.Computation.CorrectnessTerminating import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.Data.Nat.Fib.Basic import Mathlib.Tactic.Monotonicity #align_import algebra.continued_fractions.computation.approximations from "leanprover-commu...
Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean
96
107
theorem one_le_succ_nth_stream_b {ifp_succ_n : IntFractPair K} (succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n) : 1 ≀ ifp_succ_n.b := by obtain ⟨ifp_n, nth_stream_eq, stream_nth_fr_ne_zero, ⟨-⟩⟩ :
obtain ⟨ifp_n, nth_stream_eq, stream_nth_fr_ne_zero, ⟨-⟩⟩ : βˆƒ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr β‰  0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n := succ_nth_stream_eq_some_iff.1 succ_nth_stream_eq suffices 1 ≀ ifp_n.fr⁻¹ by rwa [IntFractPair.of, le_floor, cast_one] suffices if...
true
import Mathlib.Algebra.Group.Equiv.TypeTags import Mathlib.GroupTheory.FreeAbelianGroup import Mathlib.GroupTheory.FreeGroup.IsFreeGroup import Mathlib.LinearAlgebra.Dimension.StrongRankCondition #align_import group_theory.free_abelian_group_finsupp from "leanprover-community/mathlib"@"47b51515e69f59bca5cf34ef456e600...
Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean
45
50
theorem Finsupp.toFreeAbelianGroup_comp_singleAddHom (x : X) : Finsupp.toFreeAbelianGroup.comp (Finsupp.singleAddHom x) = (smulAddHom β„€ (FreeAbelianGroup X)).flip (of x) := by ext
ext simp only [AddMonoidHom.coe_comp, Finsupp.singleAddHom_apply, Function.comp_apply, one_smul, toFreeAbelianGroup, Finsupp.liftAddHom_apply_single]
true
import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.complex.log from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section namespace Complex open Set Filter Bornology open scop...
Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
93
94
theorem log_mul_ofReal (r : ℝ) (hr : 0 < r) (x : β„‚) (hx : x β‰  0) : log (x * r) = Real.log r + log x := by
rw [mul_comm, log_ofReal_mul hr hx]
true
import Mathlib.Algebra.Polynomial.BigOperators import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.LinearAlgebra.Matrix.Determinant.Basic import Mathlib.Tactic.ComputeDegree #align_import linear_algebra.matrix.polynomial from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" set_...
Mathlib/LinearAlgebra/Matrix/Polynomial.lean
62
70
theorem coeff_det_X_add_C_zero (A B : Matrix n n Ξ±) : coeff (det ((X : Ξ±[X]) β€’ A.map C + B.map C)) 0 = det B := by rw [det_apply, finset_sum_coeff, det_apply]
rw [det_apply, finset_sum_coeff, det_apply] refine Finset.sum_congr rfl ?_ rintro g - convert coeff_smul (R := Ξ±) (sign g) _ 0 rw [coeff_zero_prod] refine Finset.prod_congr rfl ?_ simp
true
import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Preadditive.Opposite import Mathlib.CategoryTheory.Limits.Opposites #align_import category_theory.abelian.opposite from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section namespace CategoryTheor...
Mathlib/CategoryTheory/Abelian/Opposite.lean
101
103
theorem kernel.ΞΉ_op : (kernel.ΞΉ f.op).unop = eqToHom (Opposite.unop_op _) ≫ cokernel.Ο€ f ≫ (kernelOpUnop f).inv := by
simp [kernelOpUnop]
true
import Mathlib.Analysis.Calculus.FormalMultilinearSeries import Mathlib.Analysis.SpecificLimits.Normed import Mathlib.Logic.Equiv.Fin import Mathlib.Topology.Algebra.InfiniteSum.Module #align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" noncomputable...
Mathlib/Analysis/Analytic/Basic.lean
187
202
theorem isLittleO_of_lt_radius (h : ↑r < p.radius) : βˆƒ a ∈ Ioo (0 : ℝ) 1, (fun n => β€–p nβ€– * (r : ℝ) ^ n) =o[atTop] (a ^ Β·) := by have := (TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * (r : ℝ) ^ n) 1).out 1 4
have := (TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * (r : ℝ) ^ n) 1).out 1 4 rw [this] -- Porting note: was -- rw [(TFAE_exists_lt_isLittleO_pow (fun n => β€–p nβ€– * (r : ℝ) ^ n) 1).out 1 4] simp only [radius, lt_iSup_iff] at h rcases h with ⟨t, C, hC, rt⟩ rw [ENNReal.coe_lt_coe, ← NNReal.coe_lt_coe] at ...
true
import Mathlib.Algebra.MvPolynomial.Basic import Mathlib.Data.Finset.PiAntidiagonal import Mathlib.LinearAlgebra.StdBasis import Mathlib.Tactic.Linarith #align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60" noncomputable section open Finset (...
Mathlib/RingTheory/MvPowerSeries/Basic.lean
127
131
theorem monomial_def [DecidableEq Οƒ] (n : Οƒ β†’β‚€ β„•) : (monomial R n) = LinearMap.stdBasis R (fun _ ↦ R) n := by rw [monomial]
rw [monomial] -- unify the `Decidable` arguments convert rfl
true
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.MvPolynomial.Basic #align_import ring_theory.mv_polynomial.tower from "leanprover-community/mathlib"@"bb168510ef455e9280a152e7f31673cabd3d7496" variable (R A B : Type*) {Οƒ : Type*} namespace MvPolynomial section CommSemiring variable [CommSemiring R] ...
Mathlib/RingTheory/MvPolynomial/Tower.lean
62
65
theorem aeval_algebraMap_eq_zero_iff_of_injective {x : Οƒ β†’ A} {p : MvPolynomial Οƒ R} (h : Function.Injective (algebraMap A B)) : aeval (algebraMap A B ∘ x) p = 0 ↔ aeval x p = 0 := by
rw [aeval_algebraMap_apply, ← (algebraMap A B).map_zero, h.eq_iff]
true
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.Monic #align_import data.polynomial.integral_normalization from "leanprover-community/mathlib"@"6f401acf4faec3ab9ab13a42789c4f68064a61cd" open Polynomial namespace Polynomial universe u...
Mathlib/RingTheory/Polynomial/IntegralNormalization.lean
56
59
theorem integralNormalization_support {f : R[X]} : (integralNormalization f).support βŠ† f.support := by intro
intro simp (config := { contextual := true }) [integralNormalization, coeff_monomial, mem_support_iff]
true
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Algebra.GeomSum import Mathlib.Data.Fintype.BigOperators import Mathlib.RingTheory.PowerSeries.Inverse import Mathlib.RingTheory.PowerSeries.WellKnown import Mathlib.Tactic.FieldSimp #align_import number_theory.bernoulli from "leanprover-community/mat...
Mathlib/NumberTheory/Bernoulli.lean
181
196
theorem bernoulli'_odd_eq_zero {n : β„•} (h_odd : Odd n) (hlt : 1 < n) : bernoulli' n = 0 := by let B := mk fun n => bernoulli' n / (n ! : β„š)
let B := mk fun n => bernoulli' n / (n ! : β„š) suffices (B - evalNegHom B) * (exp β„š - 1) = X * (exp β„š - 1) by cases' mul_eq_mul_right_iff.mp this with h h <;> simp only [PowerSeries.ext_iff, evalNegHom, coeff_X] at h Β· apply eq_zero_of_neg_eq specialize h n split_ifs at h <;> simp_all [B, ...
true
import Mathlib.Combinatorics.Quiver.Basic import Mathlib.Combinatorics.Quiver.Path #align_import combinatorics.quiver.cast from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e" universe v v₁ vβ‚‚ u u₁ uβ‚‚ variable {U : Type*} [Quiver.{u + 1} U] namespace Quiver def Hom.cast {u v u' v...
Mathlib/Combinatorics/Quiver/Cast.lean
99
103
theorem Path.cast_cast {u v u' v' u'' v'' : U} (p : Path u v) (hu : u = u') (hv : v = v') (hu' : u' = u'') (hv' : v' = v'') : (p.cast hu hv).cast hu' hv' = p.cast (hu.trans hu') (hv.trans hv') := by subst_vars
subst_vars rfl
true
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
319
322
theorem glued_cover_cocycle_fst (x y z : 𝒰.J) : gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.fst = pullback.fst := by
apply pullback.hom_ext <;> simp
true
import Mathlib.RingTheory.AdjoinRoot import Mathlib.FieldTheory.Minpoly.Field import Mathlib.RingTheory.Polynomial.GaussLemma #align_import field_theory.minpoly.is_integrally_closed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped Classical Polynomial open Polynomial Set...
Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
114
118
theorem IsIntegrallyClosed.degree_le_of_ne_zero {s : S} (hs : IsIntegral R s) {p : R[X]} (hp0 : p β‰  0) (hp : Polynomial.aeval s p = 0) : degree (minpoly R s) ≀ degree p := by rw [degree_eq_natDegree (minpoly.ne_zero hs), degree_eq_natDegree hp0]
rw [degree_eq_natDegree (minpoly.ne_zero hs), degree_eq_natDegree hp0] norm_cast exact natDegree_le_of_dvd ((isIntegrallyClosed_dvd_iff hs _).mp hp) hp0
true
import Mathlib.LinearAlgebra.LinearPMap import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.module.linear_pmap from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Topology variable {R E F : Type*} variable [CommRing R] [AddCommGroup E] [AddCommGroup F] vari...
Mathlib/Topology/Algebra/Module/LinearPMap.lean
119
124
theorem le_closure (f : E β†’β‚—.[R] F) : f ≀ f.closure := by by_cases hf : f.IsClosable
by_cases hf : f.IsClosable Β· refine le_of_le_graph ?_ rw [← hf.graph_closure_eq_closure_graph] exact (graph f).le_topologicalClosure rw [closure_def' hf]
true
import Mathlib.Algebra.CharZero.Defs import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Defs import Mathlib.Order.WithBot #align_import algebra.order.monoid.with_top ...
Mathlib/Algebra/Order/Monoid/WithTop.lean
143
144
theorem add_lt_top [LT Ξ±] {a b : WithTop Ξ±} : a + b < ⊀ ↔ a < ⊀ ∧ b < ⊀ := by
simp_rw [WithTop.lt_top_iff_ne_top, add_ne_top]
true
import Mathlib.MeasureTheory.PiSystem import Mathlib.Order.OmegaCompletePartialOrder import Mathlib.Topology.Constructions import Mathlib.MeasureTheory.MeasurableSpace.Basic open Set namespace MeasureTheory variable {ΞΉ : Type _} {Ξ± : ΞΉ β†’ Type _} section squareCylinders def squareCylinders (C : βˆ€ i, Set (Set (Ξ±...
Mathlib/MeasureTheory/Constructions/Cylinders.lean
129
144
theorem generateFrom_squareCylinders [βˆ€ i, MeasurableSpace (Ξ± i)] : MeasurableSpace.generateFrom (squareCylinders fun i ↦ {s : Set (Ξ± i) | MeasurableSet s}) = MeasurableSpace.pi := by apply le_antisymm
apply le_antisymm Β· rw [MeasurableSpace.generateFrom_le_iff] rintro S ⟨s, t, h, rfl⟩ simp only [mem_univ_pi, mem_setOf_eq] at h exact MeasurableSet.pi (Finset.countable_toSet _) (fun i _ ↦ h i) Β· refine iSup_le fun i ↦ ?_ refine (comap_eval_le_generateFrom_squareCylinders_singleton Ξ± i).trans ?_ ...
true
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical...
Mathlib/Analysis/Calculus/Deriv/Mul.lean
346
349
theorem HasStrictDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasStrictDerivAt (f i) (f' i) x) : HasStrictDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasStrictFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasStrictFDerivAt)).hasStrictDerivAt
true
import Mathlib.Algebra.Order.Sub.Defs import Mathlib.Algebra.Order.Monoid.WithTop #align_import algebra.order.sub.with_top from "leanprover-community/mathlib"@"afdb4fa3b32d41106a4a09b371ce549ad7958abd" variable {Ξ± Ξ² : Type*} namespace WithTop section variable [Sub Ξ±] [Bot Ξ±] protected def sub : βˆ€ _ _ : WithTo...
Mathlib/Algebra/Order/Sub/WithTop.lean
55
55
theorem sub_top {a : WithTop Ξ±} : a - ⊀ = (βŠ₯ : Ξ±) := by
cases a <;> rfl
true
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
264
282
theorem exists_code.comp {m n} {f : Vector β„• n β†’. β„•} {g : Fin n β†’ Vector β„• m β†’. β„•} (hf : βˆƒ c : Code, βˆ€ v : Vector β„• n, c.eval v.1 = pure <$> f v) (hg : βˆ€ i, βˆƒ c : Code, βˆ€ v : Vector β„• m, c.eval v.1 = pure <$> g i v) : βˆƒ c : Code, βˆ€ v : Vector β„• m, c.eval v.1 = pure <$> ((Vector.mOfFn fun i => g i v) >>= f) ...
rsuffices ⟨cg, hg⟩ : βˆƒ c : Code, βˆ€ v : Vector β„• m, c.eval v.1 = Subtype.val <$> Vector.mOfFn fun i => g i v Β· obtain ⟨cf, hf⟩ := hf exact ⟨cf.comp cg, fun v => by simp [hg, hf, map_bind, seq_bind_eq, Function.comp] rfl⟩ clear hf f; induction' n with n IH Β· exact ⟨nil, fun v => by ...
true
import Mathlib.Data.DFinsupp.Basic import Mathlib.Data.Finset.Pointwise import Mathlib.LinearAlgebra.Basis.VectorSpace #align_import algebra.group.unique_prods from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" @[to_additive "Let `G` be a Type with addition, let `A B : Finset G` ...
Mathlib/Algebra/Group/UniqueProds.lean
95
101
theorem set_subsingleton (h : UniqueMul A B a0 b0) : Set.Subsingleton { ab : G Γ— G | ab.1 ∈ A ∧ ab.2 ∈ B ∧ ab.1 * ab.2 = a0 * b0 } := by rintro ⟨x1, y1⟩ (hx : x1 ∈ A ∧ y1 ∈ B ∧ x1 * y1 = a0 * b0) ⟨x2, y2⟩
rintro ⟨x1, y1⟩ (hx : x1 ∈ A ∧ y1 ∈ B ∧ x1 * y1 = a0 * b0) ⟨x2, y2⟩ (hy : x2 ∈ A ∧ y2 ∈ B ∧ x2 * y2 = a0 * b0) rcases h hx.1 hx.2.1 hx.2.2 with ⟨rfl, rfl⟩ rcases h hy.1 hy.2.1 hy.2.2 with ⟨rfl, rfl⟩ rfl
true
import Mathlib.Algebra.Group.Submonoid.Membership import Mathlib.Algebra.Group.Units import Mathlib.Algebra.Regular.Basic import Mathlib.GroupTheory.Congruence.Basic import Mathlib.Init.Data.Prod import Mathlib.RingTheory.OreLocalization.Basic #align_import group_theory.monoid_localization from "leanprover-community/...
Mathlib/GroupTheory/MonoidLocalization.lean
206
207
theorem r_iff_exists {x y : M Γ— S} : r S x y ↔ βˆƒ c : S, ↑c * (↑y.2 * x.1) = c * (x.2 * y.1) := by
rw [r_eq_r' S]; rfl
true
import Mathlib.SetTheory.Ordinal.Arithmetic namespace OrdinalApprox universe u variable {Ξ± : Type u} variable [CompleteLattice Ξ±] (f : Ξ± β†’o Ξ±) (x : Ξ±) open Function fixedPoints Cardinal Order OrderHom set_option linter.unusedVariables false in def lfpApprox (a : Ordinal.{u}) : Ξ± := sSup ({ f (lfpApprox b) | ...
Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean
92
112
theorem lfpApprox_add_one (h : x ≀ f x) (a : Ordinal) : lfpApprox f x (a+1) = f (lfpApprox f x a) := by apply le_antisymm
apply le_antisymm Β· conv => left; unfold lfpApprox apply sSup_le simp only [Ordinal.add_one_eq_succ, lt_succ_iff, exists_prop, Set.union_singleton, Set.mem_insert_iff, Set.mem_setOf_eq, forall_eq_or_imp, forall_exists_index, and_imp, forall_apply_eq_imp_iffβ‚‚] apply And.intro Β· apply le_...
true
import Mathlib.Data.TypeMax import Mathlib.Logic.UnivLE import Mathlib.CategoryTheory.Limits.Shapes.Images #align_import category_theory.limits.types from "leanprover-community/mathlib"@"4aa2a2e17940311e47007f087c9df229e7f12942" open CategoryTheory CategoryTheory.Limits universe v u w namespace CategoryTheory.L...
Mathlib/CategoryTheory/Limits/Types.lean
83
87
theorem isLimitEquivSections_symm_apply {c : Cone F} (t : IsLimit c) (x : F.sections) (j : J) : c.Ο€.app j ((isLimitEquivSections t).symm x) = (x : βˆ€ j, F.obj j) j := by conv_rhs => rw [← (isLimitEquivSections t).right_inv x]
conv_rhs => rw [← (isLimitEquivSections t).right_inv x] rfl
true
import Mathlib.Topology.Category.Profinite.Basic universe u namespace Profinite variable {ΞΉ : Type u} {X : ΞΉ β†’ Type} [βˆ€ i, TopologicalSpace (X i)] (C : Set ((i : ΞΉ) β†’ X i)) (J K : ΞΉ β†’ Prop) namespace IndexFunctor open ContinuousMap def obj : Set ((i : {i : ΞΉ // J i}) β†’ X i) := ContinuousMap.precomp (Subty...
Mathlib/Topology/Category/Profinite/Product.lean
58
62
theorem surjective_Ο€_app : Function.Surjective (Ο€_app C J) := by intro x
intro x obtain ⟨y, hy⟩ := x.prop exact ⟨⟨y, hy.1⟩, Subtype.ext hy.2⟩
true
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
95
101
theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y
ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r]
true
import Mathlib.Analysis.NormedSpace.OperatorNorm.Basic suppress_compilation open Bornology open Filter hiding map_smul open scoped Classical NNReal Topology Uniformity -- the `β‚—` subscript variables are for special cases about linear (as opposed to semilinear) maps variable {π•œ π•œβ‚‚ π•œβ‚ƒ E Eβ‚— F Fβ‚— G Gβ‚— 𝓕 : Type*} ...
Mathlib/Analysis/NormedSpace/OperatorNorm/NNNorm.lean
49
53
theorem nnnorm_def (f : E β†’SL[σ₁₂] F) : β€–fβ€–β‚Š = sInf { c | βˆ€ x, β€–f xβ€–β‚Š ≀ c * β€–xβ€–β‚Š } := by ext
ext rw [NNReal.coe_sInf, coe_nnnorm, norm_def, NNReal.coe_image] simp_rw [← NNReal.coe_le_coe, NNReal.coe_mul, coe_nnnorm, mem_setOf_eq, NNReal.coe_mk, exists_prop]
true
import Mathlib.Analysis.Calculus.BumpFunction.Basic import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open F...
Mathlib/Analysis/Calculus/BumpFunction/Normed.lean
49
50
theorem normed_sub (x : E) : f.normed ΞΌ (c - x) = f.normed ΞΌ (c + x) := by
simp_rw [f.normed_def, f.sub]
true
import Mathlib.Algebra.Order.Floor import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Nat.Log #align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R] namespace Int def log (b : β„•) (r : ...
Mathlib/Data/Int/Log.lean
87
90
theorem log_of_left_le_one {b : β„•} (hb : b ≀ 1) (r : R) : log b r = 0 := by rcases le_total 1 r with h | h
rcases le_total 1 r with h | h Β· rw [log_of_one_le_right _ h, Nat.log_of_left_le_one hb, Int.ofNat_zero] Β· rw [log_of_right_le_one _ h, Nat.clog_of_left_le_one hb, Int.ofNat_zero, neg_zero]
true
import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.Limits.Preserves.Basic import Mathlib.CategoryTheory.Limits.TypesFiltered import Mathlib.CategoryTheory.Limits.Yoneda import Mathlib.Tactic.ApplyFun #align_import category_theory.limits.concrete_category from "leanprover-community/math...
Mathlib/CategoryTheory/Limits/ConcreteCategory.lean
122
127
theorem Concrete.isColimit_exists_of_rep_eq {D : Cocone F} {i j : J} (hD : IsColimit D) (x : F.obj i) (y : F.obj j) (h : D.ΞΉ.app _ x = D.ΞΉ.app _ y) : βˆƒ (k : _) (f : i ⟢ k) (g : j ⟢ k), F.map f x = F.map g y := by let E := (forget C).mapCocone D
let E := (forget C).mapCocone D let hE : IsColimit E := isColimitOfPreserves _ hD exact (Types.FilteredColimit.isColimit_eq_iff (F β‹™ forget C) hE).mp h
true
import Mathlib.Algebra.Ring.Int import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Size #align_import data.int.bitwise from "leanprover-community/mathlib"@"0743cc5d9d86bcd1bba10f480e948a257d65056f" #align_import init.data.int.bitwise from "leanprover-community/lean"@"855e5b74e3a52a40552e8f067169d747d48743fd" ...
Mathlib/Data/Int/Bitwise.lean
145
149
theorem bodd_subNatNat (m n : β„•) : bodd (subNatNat m n) = xor m.bodd n.bodd := by apply subNatNat_elim m n fun m n i => bodd i = xor m.bodd n.bodd <;>
apply subNatNat_elim m n fun m n i => bodd i = xor m.bodd n.bodd <;> intros i j <;> simp only [Int.bodd, Int.bodd_coe, Nat.bodd_add] <;> cases Nat.bodd i <;> simp
true
import Mathlib.Algebra.BigOperators.Fin import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.Prod import Mathlib.SetTheory.Cardinal.Basic import Mathlib.Tactic.FinCases import Mathlib.Tactic.LinearCombination import Mathlib.Lean.Expr.ExtraRecognizers import Mathlib.Data.Set.Subsingleton #align_import lin...
Mathlib/LinearAlgebra/LinearIndependent.lean
186
189
theorem Fintype.linearIndependent_iff' [Fintype ΞΉ] [DecidableEq ΞΉ] : LinearIndependent R v ↔ LinearMap.ker (LinearMap.lsum R (fun _ ↦ R) β„• fun i ↦ LinearMap.id.smulRight (v i)) = βŠ₯ := by
simp [Fintype.linearIndependent_iff, LinearMap.ker_eq_bot', funext_iff]
true
import Mathlib.Algebra.Group.Subgroup.Finite import Mathlib.Data.Finset.Fin import Mathlib.Data.Finset.Sort import Mathlib.Data.Int.Order.Units import Mathlib.GroupTheory.Perm.Support import Mathlib.Logic.Equiv.Fin import Mathlib.Tactic.NormNum.Ineq #align_import group_theory.perm.sign from "leanprover-community/math...
Mathlib/GroupTheory/Perm/Sign.lean
99
110
theorem swap_induction_on [Finite Ξ±] {P : Perm Ξ± β†’ Prop} (f : Perm Ξ±) : P 1 β†’ (βˆ€ f x y, x β‰  y β†’ P f β†’ P (swap x y * f)) β†’ P f := by cases nonempty_fintype Ξ±
cases nonempty_fintype Ξ± cases' (truncSwapFactors f).out with l hl induction' l with g l ih generalizing f Β· simp (config := { contextual := true }) only [hl.left.symm, List.prod_nil, forall_true_iff] Β· intro h1 hmul_swap rcases hl.2 g (by simp) with ⟨x, y, hxy⟩ rw [← hl.1, List.prod_cons, hxy.2] ...
true
def SatisfiesM {m : Type u β†’ Type v} [Functor m] (p : Ξ± β†’ Prop) (x : m Ξ±) : Prop := βˆƒ x' : m {a // p a}, Subtype.val <$> x' = x @[simp] theorem SatisfiesM_Id_eq : SatisfiesM (m := Id) p x ↔ p x := ⟨fun ⟨y, eq⟩ => eq β–Έ y.2, fun h => ⟨⟨_, h⟩, rfl⟩⟩ @[simp] theorem SatisfiesM_Option_eq : SatisfiesM (m := Option...
.lake/packages/batteries/Batteries/Classes/SatisfiesM.lean
165
166
theorem SatisfiesM_StateRefT_eq [Monad m] : SatisfiesM (m := StateRefT' Ο‰ Οƒ m) p x ↔ βˆ€ s, SatisfiesM p (x s) := by
simp
true
import Mathlib.MeasureTheory.Function.LpSeminorm.Basic #align_import measure_theory.function.lp_seminorm from "leanprover-community/mathlib"@"c4015acc0a223449d44061e27ddac1835a3852b9" namespace MeasureTheory open Filter open scoped ENNReal variable {Ξ± E : Type*} {m m0 : MeasurableSpace Ξ±} {p : ℝβ‰₯0∞} {q : ℝ} {ΞΌ :...
Mathlib/MeasureTheory/Function/LpSeminorm/Trim.lean
48
51
theorem essSup_trim (hm : m ≀ m0) {f : Ξ± β†’ ℝβ‰₯0∞} (hf : Measurable[m] f) : essSup f (ΞΌ.trim hm) = essSup f ΞΌ := by simp_rw [essSup]
simp_rw [essSup] exact limsup_trim hm hf
true
import Mathlib.Data.Int.Bitwise import Mathlib.Data.Int.Order.Lemmas import Mathlib.Data.Set.Function import Mathlib.Order.Interval.Set.Basic #align_import data.int.lemmas from "leanprover-community/mathlib"@"09597669f02422ed388036273d8848119699c22f" open Nat namespace Int theorem le_natCast_sub (m n : β„•) : (m ...
Mathlib/Data/Int/Lemmas.lean
75
77
theorem natAbs_inj_of_nonpos_of_nonneg {a b : β„€} (ha : a ≀ 0) (hb : 0 ≀ b) : natAbs a = natAbs b ↔ -a = b := by
simpa only [Int.natAbs_neg] using natAbs_inj_of_nonneg_of_nonneg (neg_nonneg_of_nonpos ha) hb
true
import Mathlib.Data.Nat.Totient import Mathlib.Data.Nat.Nth import Mathlib.NumberTheory.SmoothNumbers #align_import number_theory.prime_counting from "leanprover-community/mathlib"@"7fdd4f3746cb059edfdb5d52cba98f66fce418c0" namespace Nat open Finset def primeCounting' : β„• β†’ β„• := Nat.count Prime #align nat.pr...
Mathlib/NumberTheory/PrimeCounting.lean
83
102
theorem primeCounting'_add_le {a k : β„•} (h0 : 0 < a) (h1 : a < k) (n : β„•) : Ο€' (k + n) ≀ Ο€' k + Nat.totient a * (n / a + 1) := calc Ο€' (k + n) ≀ ((range k).filter Prime).card + ((Ico k (k + n)).filter Prime).card := by rw [primeCounting', count_eq_card_filter_range, range_eq_Ico, ←
rw [primeCounting', count_eq_card_filter_range, range_eq_Ico, ← Ico_union_Ico_eq_Ico (zero_le k) le_self_add, filter_union] apply card_union_le _ ≀ Ο€' k + ((Ico k (k + n)).filter Prime).card := by rw [primeCounting', count_eq_card_filter_range] _ ≀ Ο€' k + ((Ico k (k + n)).filter (Copr...
true
import Mathlib.Data.Set.Pointwise.Basic import Mathlib.Data.Set.MulAntidiagonal #align_import data.finset.mul_antidiagonal from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Finset open Pointwise variable {Ξ± : Type*} variable [OrderedCancelCommMonoid Ξ±] {s t : Set Ξ±} (hs : ...
Mathlib/Data/Finset/MulAntidiagonal.lean
72
73
theorem mem_mulAntidiagonal : x ∈ mulAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 * x.2 = a := by
simp only [mulAntidiagonal, Set.Finite.mem_toFinset, Set.mem_mulAntidiagonal]
true
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace #align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb" open MeasureTheory Set Filter A...
Mathlib/Analysis/MellinTransform.lean
64
75
theorem MellinConvergent.comp_mul_left {f : ℝ β†’ E} {s : β„‚} {a : ℝ} (ha : 0 < a) : MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s := by have := integrableOn_Ioi_comp_mul_left_iff (fun t : ℝ => (t : β„‚) ^ (s - 1) β€’ f t) 0 ha
have := integrableOn_Ioi_comp_mul_left_iff (fun t : ℝ => (t : β„‚) ^ (s - 1) β€’ f t) 0 ha rw [mul_zero] at this have h1 : EqOn (fun t : ℝ => (↑(a * t) : β„‚) ^ (s - 1) β€’ f (a * t)) ((a : β„‚) ^ (s - 1) β€’ fun t : ℝ => (t : β„‚) ^ (s - 1) β€’ f (a * t)) (Ioi 0) := fun t ht ↦ by simp only [ofReal_mul, mul_cpow_ofRea...
true
import Mathlib.RingTheory.HahnSeries.Multiplication import Mathlib.RingTheory.PowerSeries.Basic import Mathlib.Data.Finsupp.PWO #align_import ring_theory.hahn_series from "leanprover-community/mathlib"@"a484a7d0eade4e1268f4fb402859b6686037f965" set_option linter.uppercaseLean3 false open Finset Function open sco...
Mathlib/RingTheory/HahnSeries/PowerSeries.lean
132
142
theorem ofPowerSeries_X : ofPowerSeries Ξ“ R PowerSeries.X = single 1 1 := by ext n
ext n simp only [single_coeff, ofPowerSeries_apply, RingHom.coe_mk] split_ifs with hn Β· rw [hn] convert @embDomain_coeff β„• R _ _ Ξ“ _ _ _ 1 <;> simp Β· rw [embDomain_notin_image_support] simp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support, PowerSeries.coeff_X] in...
true
import Mathlib.Analysis.Complex.Basic import Mathlib.FieldTheory.IntermediateField import Mathlib.Topology.Algebra.Field import Mathlib.Topology.Algebra.UniformRing #align_import topology.instances.complex from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" section ComplexSubfield open...
Mathlib/Topology/Instances/Complex.lean
50
116
theorem Complex.uniformContinuous_ringHom_eq_id_or_conj (K : Subfield β„‚) {ψ : K β†’+* β„‚} (hc : UniformContinuous ψ) : ψ.toFun = K.subtype ∨ ψ.toFun = conj ∘ K.subtype := by letI : TopologicalDivisionRing β„‚ := TopologicalDivisionRing.mk
letI : TopologicalDivisionRing β„‚ := TopologicalDivisionRing.mk letI : TopologicalRing K.topologicalClosure := Subring.instTopologicalRing K.topologicalClosure.toSubring set ΞΉ : K β†’ K.topologicalClosure := ⇑(Subfield.inclusion K.le_topologicalClosure) have ui : UniformInducing ΞΉ := ⟨by erw [unifor...
true
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
65
65
theorem oangle_self_right (p₁ pβ‚‚ : P) : ∑ p₁ pβ‚‚ pβ‚‚ = 0 := by
simp [oangle]
true
import Mathlib.Algebra.MvPolynomial.Derivation import Mathlib.Algebra.MvPolynomial.Variables #align_import data.mv_polynomial.pderiv from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section universe u v namespace MvPolynomial open Set Function Finsupp variable {R : ...
Mathlib/Algebra/MvPolynomial/PDeriv.lean
111
112
theorem pderiv_monomial_single {i : Οƒ} {n : β„•} : pderiv i (monomial (single i n) a) = monomial (single i (n - 1)) (a * n) := by
simp
true
import Mathlib.Data.Set.Prod import Mathlib.Logic.Function.Conjugate #align_import data.set.function from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207" variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ : Sort*} {Ο€ : Ξ± β†’ Type*} open Equiv Equiv.Perm Function namespace Set section Order variable {s : Se...
Mathlib/Data/Set/Function.lean
264
267
theorem _root_.MonotoneOn.congr (h₁ : MonotoneOn f₁ s) (h : s.EqOn f₁ fβ‚‚) : MonotoneOn fβ‚‚ s := by intro a ha b hb hab
intro a ha b hb hab rw [← h ha, ← h hb] exact h₁ ha hb hab
true
import Mathlib.Data.Finset.Fin import Mathlib.Data.Int.Order.Units import Mathlib.GroupTheory.OrderOfElement import Mathlib.GroupTheory.Perm.Support import Mathlib.Logic.Equiv.Fintype #align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" universe u v o...
Mathlib/GroupTheory/Perm/Finite.lean
111
129
theorem perm_mapsTo_inl_iff_mapsTo_inr {m n : Type*} [Finite m] [Finite n] (Οƒ : Perm (Sum m n)) : Set.MapsTo Οƒ (Set.range Sum.inl) (Set.range Sum.inl) ↔ Set.MapsTo Οƒ (Set.range Sum.inr) (Set.range Sum.inr) := by constructor <;>
constructor <;> ( intro h classical rw [← perm_inv_mapsTo_iff_mapsTo] at h intro x cases' hx : Οƒ x with l r) Β· rintro ⟨a, rfl⟩ obtain ⟨y, hy⟩ := h ⟨l, rfl⟩ rw [← hx, Οƒ.inv_apply_self] at hy exact absurd hy Sum.inl_ne_inr Β· rintro _; exact ⟨r, rfl⟩ Β· rintro _; exact...
true
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Geometry.Euclidean.PerpBisector import Mathlib.Algebra.QuadraticDiscriminant #align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" noncomputable section open scoped Classical open ...
Mathlib/Geometry/Euclidean/Basic.lean
122
134
theorem dist_smul_vadd_eq_dist {v : V} (p₁ pβ‚‚ : P) (hv : v β‰  0) (r : ℝ) : dist (r β€’ v +α΅₯ p₁) pβ‚‚ = dist p₁ pβ‚‚ ↔ r = 0 ∨ r = -2 * βŸͺv, p₁ -α΅₯ pβ‚‚βŸ« / βŸͺv, v⟫ := by conv_lhs =>
conv_lhs => rw [← mul_self_inj_of_nonneg dist_nonneg dist_nonneg, dist_smul_vadd_sq, ← sub_eq_zero, add_sub_assoc, dist_eq_norm_vsub V p₁ pβ‚‚, ← real_inner_self_eq_norm_mul_norm, sub_self] have hvi : βŸͺv, v⟫ β‰  0 := by simpa using hv have hd : discrim βŸͺv, v⟫ (2 * βŸͺv, p₁ -α΅₯ pβ‚‚βŸ«) 0 = 2 * βŸͺv, p₁ -α΅₯ pβ‚‚βŸ« * (2 ...
true
import Mathlib.Analysis.Calculus.Deriv.Inv import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.PolynomialExp #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9...
Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean
58
61
theorem nonneg (x : ℝ) : 0 ≀ expNegInvGlue x := by cases le_or_gt x 0 with
cases le_or_gt x 0 with | inl h => exact ge_of_eq (zero_of_nonpos h) | inr h => exact le_of_lt (pos_of_pos h)
true
import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Orientation import Mathlib.Data.Complex.Orientation import Mathlib.Tactic.LinearCombination #align_import analysis.inner_product_space.two_dim from "leanprover-community/mathlib"@"cd8fafa2fac98e1a67097e8a91ad9901cfde48af" non...
Mathlib/Analysis/InnerProductSpace/TwoDim.lean
105
105
theorem areaForm_to_volumeForm (x y : E) : Ο‰ x y = o.volumeForm ![x, y] := by
simp [areaForm]
true
import Mathlib.Algebra.Polynomial.Roots import Mathlib.Analysis.Asymptotics.AsymptoticEquivalent import Mathlib.Analysis.Asymptotics.SpecificAsymptotics #align_import analysis.special_functions.polynomials from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Finset Asymptotic...
Mathlib/Analysis/SpecialFunctions/Polynomials.lean
84
88
theorem abs_tendsto_atTop (hdeg : 0 < P.degree) : Tendsto (fun x => abs <| eval x P) atTop atTop := by rcases le_total 0 P.leadingCoeff with hP | hP
rcases le_total 0 P.leadingCoeff with hP | hP Β· exact tendsto_abs_atTop_atTop.comp (P.tendsto_atTop_of_leadingCoeff_nonneg hdeg hP) Β· exact tendsto_abs_atBot_atTop.comp (P.tendsto_atBot_of_leadingCoeff_nonpos hdeg hP)
true
import Mathlib.RingTheory.Valuation.Basic import Mathlib.NumberTheory.Padics.PadicNorm import Mathlib.Analysis.Normed.Field.Basic #align_import number_theory.padics.padic_numbers from "leanprover-community/mathlib"@"b9b2114f7711fec1c1e055d507f082f8ceb2c3b7" noncomputable section open scoped Classical open Nat m...
Mathlib/NumberTheory/Padics/PadicNumbers.lean
176
181
theorem lift_index_left_left {f : PadicSeq p} (hf : Β¬f β‰ˆ 0) (v2 v3 : β„•) : padicNorm p (f (stationaryPoint hf)) = padicNorm p (f (max (stationaryPoint hf) (max v2 v3))) := by apply stationaryPoint_spec hf
apply stationaryPoint_spec hf Β· apply le_max_left Β· exact le_rfl
true
import Mathlib.Algebra.Order.Floor import Mathlib.Algebra.Order.Field.Power import Mathlib.Data.Nat.Log #align_import data.int.log from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" variable {R : Type*} [LinearOrderedSemifield R] [FloorSemiring R] namespace Int def log (b : β„•) (r : ...
Mathlib/Data/Int/Log.lean
138
145
theorem log_zpow {b : β„•} (hb : 1 < b) (z : β„€) : log b ((b : R) ^ z : R) = z := by obtain ⟨n, rfl | rfl⟩ := Int.eq_nat_or_neg z
obtain ⟨n, rfl | rfl⟩ := Int.eq_nat_or_neg z Β· rw [log_of_one_le_right _ (one_le_zpow_of_nonneg _ <| Int.natCast_nonneg _), zpow_natCast, ← Nat.cast_pow, Nat.floor_natCast, Nat.log_pow hb] exact mod_cast hb.le Β· rw [log_of_right_le_one _ (zpow_le_one_of_nonpos _ <| neg_nonpos.mpr (Int.natCast_nonneg _)...
true
import Mathlib.NumberTheory.NumberField.Basic import Mathlib.RingTheory.FractionalIdeal.Norm import Mathlib.RingTheory.FractionalIdeal.Operations variable (K : Type*) [Field K] [NumberField K] namespace NumberField open scoped nonZeroDivisors section Basis open Module -- This is necessary to avoid several time...
Mathlib/NumberTheory/NumberField/FractionalIdeal.lean
87
90
theorem mem_span_basisOfFractionalIdeal {I : (FractionalIdeal (π“ž K)⁰ K)Λ£} {x : K} : x ∈ Submodule.span β„€ (Set.range (basisOfFractionalIdeal K I)) ↔ x ∈ (I : Set K) := by rw [basisOfFractionalIdeal, (fractionalIdealBasis K I.1).ofIsLocalizedModule_span β„š ℀⁰ _]
rw [basisOfFractionalIdeal, (fractionalIdealBasis K I.1).ofIsLocalizedModule_span β„š ℀⁰ _] simp
true
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
206
211
theorem prev_nat_zero : (ComplexShape.up β„•).prev 0 = 0 := by classical
classical refine dif_neg ?_ push_neg intro apply Nat.noConfusion
true
import Mathlib.LinearAlgebra.Contraction #align_import linear_algebra.coevaluation from "leanprover-community/mathlib"@"d6814c584384ddf2825ff038e868451a7c956f31" noncomputable section section coevaluation open TensorProduct FiniteDimensional open TensorProduct universe u v variable (K : Type u) [Field K] var...
Mathlib/LinearAlgebra/Coevaluation.lean
47
54
theorem coevaluation_apply_one : (coevaluation K V) (1 : K) = let bV := Basis.ofVectorSpace K V βˆ‘ i : Basis.ofVectorSpaceIndex K V, bV i βŠ—β‚œ[K] bV.coord i := by simp only [coevaluation, id]
simp only [coevaluation, id] rw [(Basis.singleton Unit K).constr_apply_fintype K] simp only [Fintype.univ_punit, Finset.sum_const, one_smul, Basis.singleton_repr, Basis.equivFun_apply, Basis.coe_ofVectorSpace, one_nsmul, Finset.card_singleton]
true
import Mathlib.Order.Cover import Mathlib.Order.Interval.Finset.Defs #align_import data.finset.locally_finite from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" assert_not_exists MonoidWithZero assert_not_exists Finset.sum open Function OrderDual open FinsetInterval variable {ΞΉ Ξ± : T...
Mathlib/Order/Interval/Finset/Basic.lean
67
68
theorem nonempty_Ioc : (Ioc a b).Nonempty ↔ a < b := by
rw [← coe_nonempty, coe_Ioc, Set.nonempty_Ioc]
true
import Mathlib.Algebra.Order.ToIntervalMod import Mathlib.Algebra.Ring.AddAut import Mathlib.Data.Nat.Totient import Mathlib.GroupTheory.Divisible import Mathlib.Topology.Connected.PathConnected import Mathlib.Topology.IsLocalHomeomorph #align_import topology.instances.add_circle from "leanprover-community/mathlib"@"...
Mathlib/Topology/Instances/AddCircle.lean
152
153
theorem coe_eq_zero_iff {x : π•œ} : (x : AddCircle p) = 0 ↔ βˆƒ n : β„€, n β€’ p = x := by
simp [AddSubgroup.mem_zmultiples_iff]
true
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals import Mathlib.Analysis.Calculus.ParametricIntegral import Mathlib.MeasureTheory.Measure.Haar.NormedSpace #align_import analysis.mellin_transform from "leanprover-community/mathlib"@"917c3c072e487b3cccdbfeff17e75b40e45f66cb" open MeasureTheory Set Filter A...
Mathlib/Analysis/MellinTransform.lean
237
264
theorem mellin_convergent_zero_of_isBigO {b : ℝ} {f : ℝ β†’ ℝ} (hfc : AEStronglyMeasurable f <| volume.restrict (Ioi 0)) (hf : f =O[𝓝[>] 0] (Β· ^ (-b))) {s : ℝ} (hs : b < s) : βˆƒ c : ℝ, 0 < c ∧ IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioc 0 c) := by obtain ⟨d, _, hd'⟩ := hf.exists_pos
obtain ⟨d, _, hd'⟩ := hf.exists_pos simp_rw [IsBigOWith, eventually_nhdsWithin_iff, Metric.eventually_nhds_iff, gt_iff_lt] at hd' obtain ⟨Ρ, hΡ, hΡ'⟩ := hd' refine ⟨Ρ, hΡ, integrableOn_Ioc_iff_integrableOn_Ioo.mpr ⟨?_, ?_⟩⟩ · refine AEStronglyMeasurable.mul ?_ (hfc.mono_set Ioo_subset_Ioi_self) refine (C...
true
import Mathlib.Probability.Kernel.MeasurableIntegral #align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b" open MeasureTheory open scoped ENNReal namespace ProbabilityTheory namespace kernel variable {Ξ± Ξ² ΞΉ : Type*} {mΞ± : MeasurableSpace Ξ±}...
Mathlib/Probability/Kernel/Composition.lean
93
96
theorem compProdFun_empty (ΞΊ : kernel Ξ± Ξ²) (Ξ· : kernel (Ξ± Γ— Ξ²) Ξ³) (a : Ξ±) : compProdFun ΞΊ Ξ· a βˆ… = 0 := by simp only [compProdFun, Set.mem_empty_iff_false, Set.setOf_false, measure_empty,
simp only [compProdFun, Set.mem_empty_iff_false, Set.setOf_false, measure_empty, MeasureTheory.lintegral_const, zero_mul]
true
import Mathlib.Algebra.CharZero.Defs import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Order.Monoid.Canonical.Defs import Mathlib.Algebra.Order.Monoid.OrderDual import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.Nat.Cast.Defs import Mathlib.Order.WithBot #align_import algebra.order.monoid.with_top ...
Mathlib/Algebra/Order/Monoid/WithTop.lean
156
156
theorem add_coe_eq_top_iff {x : WithTop Ξ±} {y : Ξ±} : x + y = ⊀ ↔ x = ⊀ := by
simp
true
import Mathlib.CategoryTheory.Sites.Grothendieck import Mathlib.CategoryTheory.Sites.Pretopology import Mathlib.CategoryTheory.Limits.Lattice import Mathlib.Topology.Sets.Opens #align_import category_theory.sites.spaces from "leanprover-community/mathlib"@"b6fa3beb29f035598cf0434d919694c5e98091eb" universe u nam...
Mathlib/CategoryTheory/Sites/Spaces.lean
92
95
theorem pretopology_toGrothendieck : Pretopology.toGrothendieck _ (Opens.pretopology T) = Opens.grothendieckTopology T := by rw [← pretopology_ofGrothendieck]
rw [← pretopology_ofGrothendieck] apply (Pretopology.gi (Opens T)).l_u_eq
true
import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {Ξ± : Type*} namespace WithTop @[simp] theorem preimage_coe_top : (some : Ξ± β†’ WithTop Ξ±) ⁻¹' {⊀} =...
Mathlib/Order/Interval/Set/WithBotTop.lean
33
35
theorem range_coe : range (some : Ξ± β†’ WithTop Ξ±) = Iio ⊀ := by ext x
ext x rw [mem_Iio, WithTop.lt_top_iff_ne_top, mem_range, ne_top_iff_exists]
true
import Mathlib.Algebra.Polynomial.Eval #align_import data.polynomial.degree.lemmas from "leanprover-community/mathlib"@"728baa2f54e6062c5879a3e397ac6bac323e506f" noncomputable section open Polynomial open Finsupp Finset namespace Polynomial universe u v w variable {R : Type u} {S : Type v} {ΞΉ : Type w} {a b ...
Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
366
367
theorem natDegree_mul_C (a0 : a β‰  0) : (p * C a).natDegree = p.natDegree := by
simp only [natDegree, degree_mul_C a0]
true
import Mathlib.LinearAlgebra.Eigenspace.Basic import Mathlib.FieldTheory.Minpoly.Field #align_import linear_algebra.eigenspace.minpoly from "leanprover-community/mathlib"@"c3216069e5f9369e6be586ccbfcde2592b3cec92" universe u v w namespace Module namespace End open Polynomial FiniteDimensional open scoped Poly...
Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
46
51
theorem ker_aeval_ring_hom'_unit_polynomial (f : End K V) (c : K[X]Λ£) : LinearMap.ker (aeval f (c : K[X])) = βŠ₯ := by rw [Polynomial.eq_C_of_degree_eq_zero (degree_coe_units c)]
rw [Polynomial.eq_C_of_degree_eq_zero (degree_coe_units c)] simp only [aeval_def, evalβ‚‚_C] apply ker_algebraMap_end apply coeff_coe_units_zero_ne_zero c
true
import Mathlib.Algebra.Group.Hom.Defs import Mathlib.Algebra.Group.Units #align_import algebra.hom.units from "leanprover-community/mathlib"@"a07d750983b94c530ab69a726862c2ab6802b38c" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open Function universe u v w namespace Units variable {Ξ± : Ty...
Mathlib/Algebra/Group/Units/Hom.lean
94
94
theorem map_id : map (MonoidHom.id M) = MonoidHom.id MΛ£ := by
ext; rfl
true
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic #align_import measure_theory.function.egorov from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open scoped Classical open MeasureTheory NNReal ENNReal Topology namespace MeasureTheory open Set Filt...
Mathlib/MeasureTheory/Function/Egorov.lean
50
52
theorem mem_notConvergentSeq_iff [Preorder ΞΉ] {x : Ξ±} : x ∈ notConvergentSeq f g n j ↔ βˆƒ k β‰₯ j, 1 / (n + 1 : ℝ) < dist (f k x) (g x) := by
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop, mem_setOf]
true
import Mathlib.MeasureTheory.Integral.SetToL1 #align_import measure_theory.integral.bochner from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4" assert_not_exists Differentiable noncomputable section open scoped Topology NNReal ENNReal MeasureTheory open Set Filter TopologicalSpace EN...
Mathlib/MeasureTheory/Integral/Bochner.lean
181
182
theorem weightedSMul_empty {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) : weightedSMul ΞΌ βˆ… = (0 : F β†’L[ℝ] F) := by
ext1 x; rw [weightedSMul_apply]; simp
true
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.Data.Fintype.Card import Mathlib.GroupTheory.Perm.Basic #align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Equiv Finset namespace Equiv.Perm variable {Ξ± : Type*} section IsSwap va...
Mathlib/GroupTheory/Perm/Support.lean
248
253
theorem ne_and_ne_of_swap_mul_apply_ne_self {f : Perm Ξ±} {x y : Ξ±} (hy : (swap x (f x) * f) y β‰  y) : f y β‰  y ∧ y β‰  x := by simp only [swap_apply_def, mul_apply, f.injective.eq_iff] at *
simp only [swap_apply_def, mul_apply, f.injective.eq_iff] at * by_cases h : f y = x Β· constructor <;> intro <;> simp_all only [if_true, eq_self_iff_true, not_true, Ne] Β· split_ifs at hy with h h <;> try { simp [*] at * }
true
import Mathlib.Data.Rat.Cast.Defs import Mathlib.Algebra.Field.Basic #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441" namespace Rat variable {Ξ± : Type*} [DivisionRing Ξ±] -- Porting note: rewrote proof @[simp] theorem cast_inv_nat (n : β„•) : ((n⁻¹ : β„š) : Ξ±...
Mathlib/Data/Rat/Cast/Lemmas.lean
55
57
theorem cast_ofScientific {K} [DivisionRing K] (m : β„•) (s : Bool) (e : β„•) : (OfScientific.ofScientific m s e : β„š) = (OfScientific.ofScientific m s e : K) := by
rw [← NNRat.cast_ofScientific (K := K), ← NNRat.cast_ofScientific, cast_nnratCast]
true
import Mathlib.Analysis.Calculus.BumpFunction.Basic import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar #align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open F...
Mathlib/Analysis/Calculus/BumpFunction/Normed.lean
117
123
theorem normed_le_div_measure_closedBall_rIn (x : E) : f.normed ΞΌ x ≀ 1 / (ΞΌ (closedBall c f.rIn)).toReal := by rw [normed_def]
rw [normed_def] gcongr Β· exact ENNReal.toReal_pos (measure_closedBall_pos _ _ f.rIn_pos).ne' measure_closedBall_lt_top.ne Β· exact f.le_one Β· exact f.measure_closedBall_le_integral ΞΌ
true
import Mathlib.Data.Fintype.Option import Mathlib.Data.Fintype.Perm import Mathlib.Data.Fintype.Prod import Mathlib.GroupTheory.Perm.Sign import Mathlib.Logic.Equiv.Option #align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395" open Equiv @[simp] theo...
Mathlib/GroupTheory/Perm/Option.lean
76
77
theorem Equiv.Perm.decomposeOption_symm_of_none_apply {Ξ± : Type*} [DecidableEq Ξ±] (e : Perm Ξ±) (i : Option Ξ±) : Equiv.Perm.decomposeOption.symm (none, e) i = i.map e := by
simp
true
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
103
105
theorem pullbackIsoProdSubtype_inv_fst (f : X ⟢ Z) (g : Y ⟢ Z) : (pullbackIsoProdSubtype f g).inv ≫ pullback.fst = pullbackFst f g := by
simp [pullbackCone, pullbackIsoProdSubtype]
true
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.Finsupp.Order #align_import data.finsupp.multiset from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" open Finset variable {Ξ± Ξ² ΞΉ : Type*} namespace Finsupp def toMultiset : (Ξ± β†’β‚€ β„•) β†’+ Multiset Ξ± where toFun f := Finsupp.sum f...
Mathlib/Data/Finsupp/Multiset.lean
71
79
theorem toMultiset_map (f : Ξ± β†’β‚€ β„•) (g : Ξ± β†’ Ξ²) : f.toMultiset.map g = toMultiset (f.mapDomain g) := by refine f.induction ?_ ?_
refine f.induction ?_ ?_ Β· rw [toMultiset_zero, Multiset.map_zero, mapDomain_zero, toMultiset_zero] Β· intro a n f _ _ ih rw [toMultiset_add, Multiset.map_add, ih, mapDomain_add, mapDomain_single, toMultiset_single, toMultiset_add, toMultiset_single, ← Multiset.coe_mapAddMonoidHom, (Multiset.mapAd...
true
import Mathlib.Data.Real.NNReal import Mathlib.Tactic.GCongr.Core #align_import analysis.normed.group.seminorm from "leanprover-community/mathlib"@"09079525fd01b3dda35e96adaa08d2f943e1648c" open Set open NNReal variable {ΞΉ R R' E F G : Type*} structure AddGroupSeminorm (G : Type*) [AddGroup G] where -- Port...
Mathlib/Analysis/Normed/Group/Seminorm.lean
148
150
theorem map_sub_le_max : f (x - y) ≀ max (f x) (f y) := by rw [sub_eq_add_neg, ← NonarchAddGroupSeminormClass.map_neg_eq_map' f y]
rw [sub_eq_add_neg, ← NonarchAddGroupSeminormClass.map_neg_eq_map' f y] exact map_add_le_max _ _ _
true
import Mathlib.Data.Complex.Module import Mathlib.LinearAlgebra.Determinant #align_import data.complex.determinant from "leanprover-community/mathlib"@"65ec59902eb17e4ab7da8d7e3d0bd9774d1b8b99" namespace Complex @[simp]
Mathlib/Data/Complex/Determinant.lean
24
26
theorem det_conjAe : LinearMap.det conjAe.toLinearMap = -1 := by rw [← LinearMap.det_toMatrix basisOneI, toMatrix_conjAe, Matrix.det_fin_two_of]
rw [← LinearMap.det_toMatrix basisOneI, toMatrix_conjAe, Matrix.det_fin_two_of] simp
true
import Mathlib.Algebra.Associated import Mathlib.Algebra.Order.Monoid.Unbundled.Pow import Mathlib.Algebra.Ring.Int import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Order.Bounds.Basic #align_import data.nat.prime from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82...
Mathlib/Data/Nat/Prime.lean
147
153
theorem prime_of_coprime (n : β„•) (h1 : 1 < n) (h : βˆ€ m < n, m β‰  0 β†’ n.Coprime m) : Prime n := by refine prime_def_lt.mpr ⟨h1, fun m mlt mdvd => ?_⟩
refine prime_def_lt.mpr ⟨h1, fun m mlt mdvd => ?_⟩ have hm : m β‰  0 := by rintro rfl rw [zero_dvd_iff] at mdvd exact mlt.ne' mdvd exact (h m mlt hm).symm.eq_one_of_dvd mdvd
true
import Mathlib.Analysis.Analytic.Basic import Mathlib.Analysis.Complex.Basic import Mathlib.Analysis.Normed.Field.InfiniteSum import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Finset.NoncommProd import Mathlib.Topology.Algebra.Algebra #align_import analysis.normed_space.exponential from "leanprover-community/ma...
Mathlib/Analysis/NormedSpace/Exponential.lean
155
157
theorem exp_unop [T2Space 𝔸] (x : 𝔸ᡐᡒᡖ) : exp 𝕂 (MulOpposite.unop x) = MulOpposite.unop (exp 𝕂 x) := by
simp_rw [exp, expSeries_sum_eq, ← MulOpposite.unop_pow, ← MulOpposite.unop_smul, tsum_unop]
true
import Mathlib.LinearAlgebra.TensorProduct.Basic import Mathlib.RingTheory.Finiteness open scoped TensorProduct open Submodule variable {R M N : Type*} variable [CommSemiring R] [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] variable {M₁ Mβ‚‚ : Submodule R M} {N₁ Nβ‚‚ : Submodule R N} namespace Tens...
Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
52
60
theorem exists_multiset (x : M βŠ—[R] N) : βˆƒ S : Multiset (M Γ— N), x = (S.map fun i ↦ i.1 βŠ—β‚œ[R] i.2).sum := by induction x using TensorProduct.induction_on with
induction x using TensorProduct.induction_on with | zero => exact ⟨0, by simp⟩ | tmul x y => exact ⟨{(x, y)}, by simp⟩ | add x y hx hy => obtain ⟨Sx, hx⟩ := hx obtain ⟨Sy, hy⟩ := hy exact ⟨Sx + Sy, by rw [Multiset.map_add, Multiset.sum_add, hx, hy]⟩
true
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
132
144
theorem preperfect_iff_perfect_closure [T1Space Ξ±] : Preperfect C ↔ Perfect (closure C) := by constructor <;> intro h
constructor <;> intro h Β· exact h.perfect_closure intro x xC have H : AccPt x (π“Ÿ (closure C)) := h.acc _ (subset_closure xC) rw [accPt_iff_frequently] at * have : βˆ€ y, y β‰  x ∧ y ∈ closure C β†’ βˆƒαΆ  z in 𝓝 y, z β‰  x ∧ z ∈ C := by rintro y ⟨hyx, yC⟩ simp only [← mem_compl_singleton_iff, and_comm, ← fre...
true
import Mathlib.Algebra.Polynomial.Degree.Lemmas open Polynomial namespace Mathlib.Tactic.ComputeDegree section recursion_lemmas variable {R : Type*} section semiring variable [Semiring R] theorem natDegree_C_le (a : R) : natDegree (C a) ≀ 0 := (natDegree_C a).le theorem natDegree_natCast_le (n : β„•) : natDeg...
Mathlib/Tactic/ComputeDegree.lean
101
103
theorem coeff_add_of_eq {n : β„•} {a b : R} {f g : R[X]} (h_add_left : f.coeff n = a) (h_add_right : g.coeff n = b) : (f + g).coeff n = a + b := by
subst β€Ή_β€Ί β€Ή_β€Ί; apply coeff_add
true
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]
true
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]
true
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
326
329
theorem descPochhammer_succ_eval {S : Type*} [Ring S] (n : β„•) (k : S) : (descPochhammer S (n + 1)).eval k = (descPochhammer S n).eval k * (k - n) := by rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_natCast,
rw [descPochhammer_succ_right, mul_sub, eval_sub, eval_mul_X, ← Nat.cast_comm, ← C_eq_natCast, eval_C_mul, Nat.cast_comm, ← mul_sub]
true
import Mathlib.Data.Fintype.Basic import Mathlib.Data.Finset.Card import Mathlib.Data.List.NodupEquivFin import Mathlib.Data.Set.Image #align_import data.fintype.card from "leanprover-community/mathlib"@"bf2428c9486c407ca38b5b3fb10b87dad0bc99fa" assert_not_exists MonoidWithZero assert_not_exists MulAction open Fu...
Mathlib/Data/Fintype/Card.lean
126
130
theorem card_of_subtype {p : Ξ± β†’ Prop} (s : Finset Ξ±) (H : βˆ€ x : Ξ±, x ∈ s ↔ p x) [Fintype { x // p x }] : card { x // p x } = s.card := by rw [← subtype_card s H]
rw [← subtype_card s H] congr apply Subsingleton.elim
true
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic import Mathlib.NumberTheory.GaussSum #align_import number_theory.legendre_symbol.quadratic_char.gauss_sum from "leanprover-community/mathlib"@"5b2fe80501ff327b9109fb09b7cc8c325cd0d7d9" section SpecialValues open ZMod MulChar variable {F : Type*} ...
Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean
119
125
theorem quadraticChar_odd_prime [DecidableEq F] (hF : ringChar F β‰  2) {p : β„•} [Fact p.Prime] (hp₁ : p β‰  2) (hpβ‚‚ : ringChar F β‰  p) : quadraticChar F p = quadraticChar (ZMod p) (Ο‡β‚„ (Fintype.card F) * Fintype.card F) := by rw [← quadraticChar_neg_one hF]
rw [← quadraticChar_neg_one hF] have h := quadraticChar_card_card hF (ne_of_eq_of_ne (ringChar_zmod_n p) hp₁) (ne_of_eq_of_ne (ringChar_zmod_n p) hpβ‚‚.symm) rwa [card p] at h
true
import Mathlib.MeasureTheory.Integral.Lebesgue import Mathlib.Topology.MetricSpace.ThickenedIndicator open MeasureTheory Topology Metric Filter Set ENNReal NNReal open scoped Topology ENNReal NNReal BoundedContinuousFunction section auxiliary namespace MeasureTheory variable {Ξ© : Type*} [TopologicalSpace Ξ©] [Mea...
Mathlib/MeasureTheory/Measure/HasOuterApproxClosed.lean
95
105
theorem measure_of_cont_bdd_of_tendsto_indicator [OpensMeasurableSpace Ξ©] (ΞΌ : Measure Ξ©) [IsFiniteMeasure ΞΌ] {c : ℝβ‰₯0} {E : Set Ξ©} (E_mble : MeasurableSet E) (fs : β„• β†’ Ξ© →ᡇ ℝβ‰₯0) (fs_bdd : βˆ€ n Ο‰, fs n Ο‰ ≀ c) (fs_lim : Tendsto (fun n Ο‰ ↦ fs n Ο‰) atTop (𝓝 (indicator E fun _ ↦ (1 : ℝβ‰₯0)))) : Tendsto (fun ...
have fs_lim' : βˆ€ Ο‰, Tendsto (fun n : β„• ↦ (fs n Ο‰ : ℝβ‰₯0)) atTop (𝓝 (indicator E (fun _ ↦ (1 : ℝβ‰₯0)) Ο‰)) := by rw [tendsto_pi_nhds] at fs_lim exact fun Ο‰ ↦ fs_lim Ο‰ apply measure_of_cont_bdd_of_tendsto_filter_indicator ΞΌ E_mble fs (eventually_of_forall fun n ↦ eventually_of_forall (fs_bdd n)) (event...
true
import Mathlib.Order.Interval.Finset.Nat import Mathlib.Data.PNat.Defs #align_import data.pnat.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Function PNat namespace PNat variable (a b : β„•+) instance instLocallyFiniteOrder : LocallyFiniteOrder β„•+ := Subtype....
Mathlib/Data/PNat/Interval.lean
94
99
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by rw [← Nat.card_Ioo]
rw [← Nat.card_Ioo] -- Porting note: I had to change this to `erw` *and* provide the proof, yuck. -- https://github.com/leanprover-community/mathlib4/issues/5164 erw [← Finset.map_subtype_embedding_Ioo _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)] rw [card_map]
true
import Mathlib.RepresentationTheory.Action.Limits import Mathlib.RepresentationTheory.Action.Concrete import Mathlib.CategoryTheory.Monoidal.FunctorCategory import Mathlib.CategoryTheory.Monoidal.Transport import Mathlib.CategoryTheory.Monoidal.Rigid.OfEquivalence import Mathlib.CategoryTheory.Monoidal.Rigid.FunctorCa...
Mathlib/RepresentationTheory/Action/Monoidal.lean
82
85
theorem associator_hom_hom {X Y Z : Action V G} : Hom.hom (Ξ±_ X Y Z).hom = (Ξ±_ X.V Y.V Z.V).hom := by dsimp
dsimp simp
true
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]
true
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]
true
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]
true
import Mathlib.Algebra.Polynomial.Monic #align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722" open Finset open Multiset open Polynomial universe u w variable {R : Type u} {ΞΉ : Type w} namespace Polynomial variable (s : Finset ΞΉ) sectio...
Mathlib/Algebra/Polynomial/BigOperators.lean
92
111
theorem coeff_list_prod_of_natDegree_le (l : List S[X]) (n : β„•) (hl : βˆ€ p ∈ l, natDegree p ≀ n) : coeff (List.prod l) (l.length * n) = (l.map fun p => coeff p n).prod := by induction' l with hd tl IH
induction' l with hd tl IH Β· simp Β· have hl' : βˆ€ p ∈ tl, natDegree p ≀ n := fun p hp => hl p (List.mem_cons_of_mem _ hp) simp only [List.prod_cons, List.map, List.length] rw [add_mul, one_mul, add_comm, ← IH hl', mul_comm tl.length] have h : natDegree tl.prod ≀ n * tl.length := by refine (natDe...
true
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]
true
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]
true
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {π•œ : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
131
134
theorem removeZero_applyComposition (p : FormalMultilinearSeries π•œ E F) {n : β„•} (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c := by ext v i
ext v i simp [applyComposition, zero_lt_one.trans_le (c.one_le_blocksFun i), removeZero_of_pos]
true
import Mathlib.CategoryTheory.Sites.Sheaf #align_import category_theory.sites.canonical from "leanprover-community/mathlib"@"9e7c80f638149bfb3504ba8ff48dfdbfc949fb1a" universe v u namespace CategoryTheory open scoped Classical open CategoryTheory Category Limits Sieve variable {C : Type u} [Category.{v} C] na...
Mathlib/CategoryTheory/Sites/Canonical.lean
125
150
theorem isSheafFor_trans (P : Cα΅’α΅– β₯€ Type v) (R S : Sieve X) (hR : Presieve.IsSheafFor P (R : Presieve X)) (hR' : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (_ : S f), Presieve.IsSeparatedFor P (R.pullback f : Presieve Y)) (hS : βˆ€ ⦃Y⦄ ⦃f : Y ⟢ X⦄ (_ : R f), Presieve.IsSheafFor P (S.pullback f : Presieve Y)) : Presieve.IsSheafFor...
have : (bind R fun Y f _ => S.pullback f : Presieve X) ≀ S := by rintro Z f ⟨W, f, g, hg, hf : S _, rfl⟩ apply hf apply Presieve.isSheafFor_subsieve_aux P this Β· apply isSheafFor_bind _ _ _ hR hS intro Y f hf Z g rw [← pullback_comp] apply (hS (R.downward_closed hf _)).isSeparatedFor Β· intr...
true
import Mathlib.Algebra.Module.Zlattice.Basic import Mathlib.NumberTheory.NumberField.Embeddings import Mathlib.NumberTheory.NumberField.FractionalIdeal #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" variable (K : Type*) [F...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
290
293
theorem normAtPlace_apply_isComplex {w : InfinitePlace K} (hw : IsComplex w) (x : E K) : normAtPlace w x = β€–x.2 ⟨w, hwβŸ©β€– := by rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk,
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_neg (not_isReal_iff_isComplex.mpr hw)]
true
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finset.NatAntidiagonal import Mathlib.Data.Nat.GCD.Basic import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Logic.Function.Iterate import Mathlib.Tactic.Ring import Mathlib.Tactic.Zify #align_import data.nat.fib from "leanprover-community/mathlib"@"...
Mathlib/Data/Nat/Fib/Basic.lean
121
124
theorem fib_add_two_strictMono : StrictMono fun n => fib (n + 2) := by refine strictMono_nat_of_lt_succ fun n => ?_
refine strictMono_nat_of_lt_succ fun n => ?_ rw [add_right_comm] exact fib_lt_fib_succ (self_le_add_left _ _)
true