Context
stringlengths
57
92.3k
file_name
stringlengths
21
79
start
int64
14
3.67k
end
int64
18
3.69k
theorem
stringlengths
25
2.71k
proof
stringlengths
5
10.6k
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
357
359
theorem embedding_comp_inv (j : Fin n) : c.embedding (c.index j) (c.invEmbedding j) = j := by
rw [Fin.ext_iff] apply add_tsub_cancel_of_le (c.sizeUpTo_index_le j)
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
218
225
theorem isClassified_of_normalize_isPrimitiveClassified (hc : h.normalize.IsPrimitiveClassified) : h.IsClassified := by
convert h.normalize.mul_isClassified (Int.gcd x y) (isClassified_of_isPrimitiveClassified h.normalize hc) <;> rw [Int.mul_ediv_cancel'] Β· exact Int.gcd_dvd_left Β· exact Int.gcd_dvd_right Β· exact h.gcd_dvd
import Mathlib.MeasureTheory.Integral.FundThmCalculus import Mathlib.Analysis.SpecialFunctions.Trigonometric.ArctanDeriv import Mathlib.Analysis.SpecialFunctions.NonIntegrable import Mathlib.Analysis.SpecialFunctions.Pow.Deriv #align_import analysis.special_functions.integrals from "leanprover-community/mathlib"@"011...
Mathlib/Analysis/SpecialFunctions/Integrals.lean
348
377
theorem integral_cpow {r : β„‚} (h : -1 < r.re ∨ r β‰  -1 ∧ (0 : ℝ) βˆ‰ [[a, b]]) : (∫ x : ℝ in a..b, (x : β„‚) ^ r) = ((b:β„‚) ^ (r + 1) - (a:β„‚) ^ (r + 1)) / (r + 1) := by
rw [sub_div] have hr : r + 1 β‰  0 := by cases' h with h h Β· apply_fun Complex.re rw [Complex.add_re, Complex.one_re, Complex.zero_re, Ne, add_eq_zero_iff_eq_neg] exact h.ne' Β· rw [Ne, ← add_eq_zero_iff_eq_neg] at h; exact h.1 by_cases hab : (0 : ℝ) βˆ‰ [[a, b]] Β· apply integral_eq_sub_of_h...
import Mathlib.RingTheory.Ideal.Basic import Mathlib.RingTheory.Ideal.Maps import Mathlib.LinearAlgebra.Finsupp import Mathlib.RingTheory.GradedAlgebra.Basic #align_import ring_theory.graded_algebra.homogeneous_ideal from "leanprover-community/mathlib"@"4e861f25ba5ceef42ba0712d8ffeb32f38ad6441" open SetLike Direc...
Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
456
461
theorem Ideal.IsHomogeneous.mul {I J : Ideal A} (HI : I.IsHomogeneous π’œ) (HJ : J.IsHomogeneous π’œ) : (I * J).IsHomogeneous π’œ := by
rw [Ideal.IsHomogeneous.iff_exists] at HI HJ ⊒ obtain ⟨⟨s₁, rfl⟩, ⟨sβ‚‚, rfl⟩⟩ := HI, HJ rw [Ideal.span_mul_span'] exact ⟨s₁ * sβ‚‚, congr_arg _ <| (Set.image_mul (homogeneousSubmonoid π’œ).subtype).symm⟩
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
164
173
theorem lfpApprox_ord_mem_fixedPoint (h_init : x ≀ f x) : lfpApprox f x (ord <| succ #Ξ±) ∈ fixedPoints f := by
let ⟨a, h_a, b, h_b, h_nab, h_fab⟩ := exists_lfpApprox_eq_lfpApprox f x cases le_total a b with | inl h_ab => exact lfpApprox_mem_fixedPoints_of_eq f x h_init (h_nab.lt_of_le h_ab) (le_of_lt h_a) h_fab | inr h_ba => exact lfpApprox_mem_fixedPoints_of_eq f x h_init (h_nab.symm.lt_of_le h_ba)...
import Mathlib.Analysis.Calculus.FDeriv.Linear import Mathlib.Analysis.Calculus.FDeriv.Comp #align_import analysis.calculus.fderiv.add from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal F...
Mathlib/Analysis/Calculus/FDeriv/Add.lean
593
595
theorem differentiableWithinAt_sub_const_iff (c : F) : DifferentiableWithinAt π•œ (fun y => f y - c) s x ↔ DifferentiableWithinAt π•œ f s x := by
simp only [sub_eq_add_neg, differentiableWithinAt_add_const_iff]
import Mathlib.Analysis.BoxIntegral.Partition.Basic #align_import analysis.box_integral.partition.split from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" noncomputable section open scoped Classical open Filter open Function Set Filter namespace BoxIntegral variable {ΞΉ M : Type*} {...
Mathlib/Analysis/BoxIntegral/Partition/Split.lean
106
112
theorem coe_splitUpper : (splitUpper I i x : Set (ΞΉ β†’ ℝ)) = ↑I ∩ { y | x < y i } := by
rw [splitUpper, coe_mk'] ext y simp only [mem_univ_pi, mem_Ioc, mem_inter_iff, mem_coe, mem_setOf_eq, forall_and, forall_update_iff I.lower fun j z => z < y j, max_lt_iff, and_assoc (a := x < y i), and_forall_ne (p := fun j => lower I j < y j) i, mem_def] exact and_comm
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 variable {s s₁ sβ‚‚ : Set Ξ±} {t ...
Mathlib/Data/Set/Function.lean
884
885
theorem SurjOn.congr (h : SurjOn f₁ s t) (H : EqOn f₁ fβ‚‚ s) : SurjOn fβ‚‚ s t := by
rwa [SurjOn, ← H.image_eq]
import Mathlib.LinearAlgebra.TensorProduct.Graded.External import Mathlib.RingTheory.GradedAlgebra.Basic import Mathlib.GroupTheory.GroupAction.Ring suppress_compilation open scoped TensorProduct variable {R ΞΉ A B : Type*} variable [CommSemiring ΞΉ] [Module ΞΉ (Additive β„€Λ£)] [DecidableEq ΞΉ] variable [CommRing R] [R...
Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
212
215
theorem tmul_one_mul_coe_tmul {iβ‚‚ : ΞΉ} (a₁ : A) (aβ‚‚ : π’œ iβ‚‚) (bβ‚‚ : B) : (a₁ α΅βŠ—β‚œ[R] (1 : B) * (aβ‚‚ : A) α΅βŠ—β‚œ[R] bβ‚‚ : π’œ α΅βŠ—[R] ℬ) = (a₁ * aβ‚‚ : A) α΅βŠ—β‚œ (bβ‚‚ : B) := by
convert tmul_zero_coe_mul_coe_tmul π’œ ℬ a₁ (@GradedMonoid.GOne.one _ (ℬ Β·) _ _) aβ‚‚ bβ‚‚ rw [SetLike.coe_gOne, one_mul]
import Mathlib.MeasureTheory.Function.LpOrder #align_import measure_theory.function.l1_space from "leanprover-community/mathlib"@"ccdbfb6e5614667af5aa3ab2d50885e0ef44a46f" noncomputable section open scoped Classical open Topology ENNReal MeasureTheory NNReal open Set Filter TopologicalSpace ENNReal EMetric Meas...
Mathlib/MeasureTheory/Function/L1Space.lean
934
938
theorem coe_toNNReal_ae_eq {f : Ξ± β†’ ℝβ‰₯0∞} (hf : βˆ€α΅ x βˆ‚ΞΌ, f x < ∞) : (fun x => ((f x).toNNReal : ℝβ‰₯0∞)) =ᡐ[ΞΌ] f := by
filter_upwards [hf] intro x hx simp only [hx.ne, Ne, not_false_iff, coe_toNNReal]
import Mathlib.Algebra.Order.ZeroLEOne import Mathlib.Data.List.InsertNth import Mathlib.Logic.Relation import Mathlib.Logic.Small.Defs import Mathlib.Order.GameAdd #align_import set_theory.game.pgame from "leanprover-community/mathlib"@"8900d545017cd21961daa2a1734bb658ef52c618" set_option autoImplicit true names...
Mathlib/SetTheory/Game/PGame.lean
307
309
theorem Subsequent.mk_right' (xL : xl β†’ PGame) (xR : xr β†’ PGame) (j : RightMoves (mk xl xr xL xR)) : Subsequent (xR j) (mk xl xr xL xR) := by
pgame_wf_tac
import Mathlib.Data.Int.Defs import Mathlib.Data.Nat.Defs import Mathlib.Tactic.Common #align_import data.int.sqrt from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6" namespace Int -- @[pp_nodot] porting note: unknown attribute def sqrt (z : β„€) : β„€ := Nat.sqrt <| Int.toNat z #align ...
Mathlib/Data/Int/Sqrt.lean
30
31
theorem sqrt_eq (n : β„€) : sqrt (n * n) = n.natAbs := by
rw [sqrt, ← natAbs_mul_self, toNat_natCast, Nat.sqrt_eq]
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
274
282
theorem cycleType_extendDomain {Ξ² : Type*} [Fintype Ξ²] [DecidableEq Ξ²] {p : Ξ² β†’ Prop} [DecidablePred p] (f : Ξ± ≃ Subtype p) {g : Perm Ξ±} : cycleType (g.extendDomain f) = cycleType g := by
induction g using cycle_induction_on with | base_one => rw [extendDomain_one, cycleType_one, cycleType_one] | base_cycles Οƒ hΟƒ => rw [(hΟƒ.extendDomain f).cycleType, hΟƒ.cycleType, card_support_extend_domain] | induction_disjoint Οƒ Ο„ hd _ hΟƒ hΟ„ => rw [hd.cycleType, ← extendDomain_mul, (hd.extendDomain f)...
import Mathlib.Algebra.GroupWithZero.Indicator import Mathlib.Algebra.Module.Basic import Mathlib.Topology.Separation #align_import topology.support from "leanprover-community/mathlib"@"d90e4e186f1d18e375dcd4e5b5f6364b01cb3e46" open Function Set Filter Topology variable {X Ξ± Ξ±' Ξ² Ξ³ Ξ΄ M E R : Type*} theorem tsup...
Mathlib/Topology/Support.lean
336
338
theorem HasCompactSupport.smul_left (hf : HasCompactSupport f') : HasCompactSupport (f β€’ f') := by
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊒ exact hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]
import Mathlib.Analysis.SpecialFunctions.Complex.Log #align_import analysis.special_functions.pow.complex from "leanprover-community/mathlib"@"4fa54b337f7d52805480306db1b1439c741848c8" open scoped Classical open Real Topology Filter ComplexConjugate Finset Set namespace Complex noncomputable def cpow (x y : β„‚) ...
Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
263
264
theorem conj_cpow (x : β„‚) (n : β„‚) (hx : x.arg β‰  Ο€) : conj x ^ n = conj (x ^ conj n) := by
rw [conj_cpow_eq_ite, if_neg hx]
import Mathlib.CategoryTheory.Limits.Shapes.FiniteProducts import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.Limits.Shapes.Kernels #align_import category_theory.limits.shapes.biproducts from "leanprover-community/mathlib"@"ac3ae212f394f508df43e37aa093722fa9b65d31" noncomputab...
Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
1,081
1,086
theorem biproduct.conePointUniqueUpToIso_inv (f : J β†’ C) [HasBiproduct f] {b : Bicone f} (hb : b.IsBilimit) : (hb.isLimit.conePointUniqueUpToIso (biproduct.isLimit _)).inv = biproduct.desc b.ΞΉ := by
refine biproduct.hom_ext' _ _ fun j => hb.isLimit.hom_ext fun j' => ?_ rw [Category.assoc, IsLimit.conePointUniqueUpToIso_inv_comp, Bicone.toCone_Ο€_app, biproduct.bicone_Ο€, biproduct.ΞΉ_desc, biproduct.ΞΉ_Ο€, b.toCone_Ο€_app, b.ΞΉ_Ο€]
import Mathlib.Data.Real.Sqrt import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Analysis.NormedSpace.Basic #align_import data.is_R_or_C.basic from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb" section local notation "οΏ½...
Mathlib/Analysis/RCLike/Basic.lean
699
701
theorem norm_natCast (n : β„•) : β€–(n : K)β€– = n := by
rw [← ofReal_natCast] exact norm_of_nonneg (Nat.cast_nonneg n)
import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.MeasureTheory.Function.SimpleFunc import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.Measure.Count import Mathlib.Topology.IndicatorConstPointwise import Mathlib.MeasureTheory.Constructions.BorelSpace.Real #align_import m...
Mathlib/MeasureTheory/Integral/Lebesgue.lean
1,821
1,838
theorem lintegral_trim {ΞΌ : Measure Ξ±} (hm : m ≀ m0) {f : Ξ± β†’ ℝβ‰₯0∞} (hf : Measurable[m] f) : ∫⁻ a, f a βˆ‚ΞΌ.trim hm = ∫⁻ a, f a βˆ‚ΞΌ := by
refine @Measurable.ennreal_induction Ξ± m (fun f => ∫⁻ a, f a βˆ‚ΞΌ.trim hm = ∫⁻ a, f a βˆ‚ΞΌ) ?_ ?_ ?_ f hf Β· intro c s hs rw [lintegral_indicator _ hs, lintegral_indicator _ (hm s hs), set_lintegral_const, set_lintegral_const] suffices h_trim_s : ΞΌ.trim hm s = ΞΌ s by rw [h_trim_s] exact trim_measu...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Dynamics.FixedPoints.Basic open Finset Function section AddCommMonoid variable {Ξ± M : Type*} [AddCommMonoid M] def birkhoffSum (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ M) (n : β„•) (x : Ξ±) : M := βˆ‘ k ∈ range n, g (f^[k] x) theorem birkhoffSum_zero (f : Ξ± β†’ Ξ±) (g : Ξ± β†’ ...
Mathlib/Dynamics/BirkhoffSum/Basic.lean
55
57
theorem Function.IsFixedPt.birkhoffSum_eq {f : Ξ± β†’ Ξ±} {x : Ξ±} (h : IsFixedPt f x) (g : Ξ± β†’ M) (n : β„•) : birkhoffSum f g n x = n β€’ g x := by
simp [birkhoffSum, (h.iterate _).eq]
import Mathlib.NumberTheory.BernoulliPolynomials import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Analysis.Calculus.Deriv.Polynomial import Mathlib.Analysis.Fourier.AddCircle import Mathlib.Analysis.PSeries #align_import number_theory.zeta_values from "leanprover-community/mathlib"@"f0c8bf9245297...
Mathlib/NumberTheory/ZetaValues.lean
361
365
theorem hasSum_zeta_four : HasSum (fun n : β„• => (1 : ℝ) / (n : ℝ) ^ 4) (Ο€ ^ 4 / 90) := by
convert hasSum_zeta_nat two_ne_zero using 1; norm_num rw [bernoulli_eq_bernoulli'_of_ne_one, bernoulli'_four] Β· norm_num [Nat.factorial]; field_simp; ring Β· decide
import Mathlib.Data.SetLike.Basic import Mathlib.Order.Interval.Set.OrdConnected import Mathlib.Order.Interval.Set.OrderIso import Mathlib.Data.Set.Lattice #align_import order.upper_lower.basic from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c" open Function OrderDual Set variable {Ξ± Ξ²...
Mathlib/Order/UpperLower/Basic.lean
790
791
theorem coe_iInfβ‚‚ (f : βˆ€ i, ΞΊ i β†’ LowerSet Ξ±) : (↑(β¨… (i) (j), f i j) : Set Ξ±) = β‹‚ (i) (j), f i j := by
simp_rw [coe_iInf]
import Mathlib.Data.Set.Function import Mathlib.Analysis.BoundedVariation #align_import analysis.constant_speed from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" open scoped NNReal ENNReal open Set MeasureTheory Classical variable {Ξ± : Type*} [LinearOrder Ξ±] {E : Type*} [PseudoEMetr...
Mathlib/Analysis/ConstantSpeed.lean
156
173
theorem hasConstantSpeedOnWith_zero_iff : HasConstantSpeedOnWith f s 0 ↔ βˆ€α΅‰ (x ∈ s) (y ∈ s), edist (f x) (f y) = 0 := by
dsimp [HasConstantSpeedOnWith] simp only [zero_mul, ENNReal.ofReal_zero, ← eVariationOn.eq_zero_iff] constructor Β· by_contra! obtain ⟨h, hfs⟩ := this simp_rw [ne_eq, eVariationOn.eq_zero_iff] at hfs h push_neg at hfs obtain ⟨x, xs, y, ys, hxy⟩ := hfs rcases le_total x y with (xy | yx) Β·...
import Mathlib.Order.Lattice #align_import order.min_max from "leanprover-community/mathlib"@"70d50ecfd4900dd6d328da39ab7ebd516abe4025" universe u v variable {Ξ± : Type u} {Ξ² : Type v} attribute [simp] max_eq_left max_eq_right min_eq_left min_eq_right section variable [LinearOrder Ξ±] [LinearOrder Ξ²] {f : Ξ± β†’ Ξ²...
Mathlib/Order/MinMax.lean
245
248
theorem MonotoneOn.map_max (hf : MonotoneOn f s) (ha : a ∈ s) (hb : b ∈ s) : f (max a b) = max (f a) (f b) := by
rcases le_total a b with h | h <;> simp only [max_eq_right, max_eq_left, hf ha hb, hf hb ha, h]
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
1,266
1,267
theorem div_eq_of_eq_mul' {a b c : G} (h : a = b * c) : a / b = c := by
rw [h, div_eq_mul_inv, mul_comm, inv_mul_cancel_left]
import Mathlib.Algebra.Algebra.Tower import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.Regular.Pow import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Data.Finsupp.Antidiagonal import Mathlib.Order.SymmDiff import Mathlib.RingTheory.Adjoin.Basic #align_import data.mv_polynomial.basic fr...
Mathlib/Algebra/MvPolynomial/Basic.lean
394
395
theorem monomial_eq : monomial s a = C a * (s.prod fun n e => X n ^ e : MvPolynomial Οƒ R) := by
simp only [X_pow_eq_monomial, ← monomial_finsupp_sum_index, Finsupp.sum_single]
import Mathlib.Order.CompleteLattice import Mathlib.Order.Cover import Mathlib.Order.Iterate import Mathlib.Order.WellFounded #align_import order.succ_pred.basic from "leanprover-community/mathlib"@"0111834459f5d7400215223ea95ae38a1265a907" open Function OrderDual Set variable {Ξ± Ξ² : Type*} @[ext] class SuccOr...
Mathlib/Order/SuccPred/Basic.lean
279
281
theorem succ_lt_succ_iff_of_not_isMax (ha : Β¬IsMax a) (hb : Β¬IsMax b) : succ a < succ b ↔ a < b := by
rw [lt_succ_iff_of_not_isMax hb, succ_le_iff_of_not_isMax ha]
import Mathlib.MeasureTheory.Integral.ExpDecay import Mathlib.Analysis.MellinTransform #align_import analysis.special_functions.gamma.basic from "leanprover-community/mathlib"@"cca40788df1b8755d5baf17ab2f27dacc2e17acb" noncomputable section set_option linter.uppercaseLean3 false open Filter intervalIntegral Set...
Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
362
363
theorem Gamma_zero : Gamma 0 = 0 := by
simp_rw [Gamma, zero_re, sub_zero, Nat.floor_one, GammaAux, div_zero]
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Analysis.NormedSpace.FiniteDimension #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section universe uD uE uF uG variable {π•œ : Type*} [NontriviallyNormedField ...
Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean
71
75
theorem contDiffOn_succ_iff_fderiv_apply [FiniteDimensional π•œ E] {n : β„•} {f : E β†’ F} {s : Set E} (hs : UniqueDiffOn π•œ s) : ContDiffOn π•œ (n + 1 : β„•) f s ↔ DifferentiableOn π•œ f s ∧ βˆ€ y, ContDiffOn π•œ n (fun x => fderivWithin π•œ f s x y) s := by
rw [contDiffOn_succ_iff_fderivWithin hs, contDiffOn_clm_apply]
import Mathlib.Analysis.Normed.Group.Basic #align_import analysis.normed.group.hom from "leanprover-community/mathlib"@"3c4225288b55380a90df078ebae0991080b12393" noncomputable section open NNReal -- TODO: migrate to the new morphism / morphism_class style structure NormedAddGroupHom (V W : Type*) [SeminormedAd...
Mathlib/Analysis/Normed/Group/Hom.lean
99
100
theorem coe_inj (H : (f : V₁ β†’ Vβ‚‚) = g) : f = g := by
cases f; cases g; congr
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.List.Perm import Mathlib.Data.List.Range #align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6" universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {Ξ³ : Type w} open Nat namespace List @[simp] theo...
Mathlib/Data/List/Sublists.lean
325
334
theorem mem_sublistsLen_self {l l' : List α} (h : l' <+ l) : l' ∈ sublistsLen (length l') l := by
induction' h with l₁ lβ‚‚ a s IH l₁ lβ‚‚ a s IH Β· simp Β· cases' l₁ with b l₁ Β· simp Β· rw [length, sublistsLen_succ_cons] exact mem_append_left _ IH Β· rw [length, sublistsLen_succ_cons] exact mem_append_right _ (mem_map.2 ⟨_, IH, rfl⟩)
import Mathlib.Analysis.Complex.Basic import Mathlib.Topology.FiberBundle.IsHomeomorphicTrivialBundle #align_import analysis.complex.re_im_topology from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" open Set noncomputable section namespace Complex theorem isHomeomorphicTrivialFiber...
Mathlib/Analysis/Complex/ReImTopology.lean
104
105
theorem interior_setOf_le_re (a : ℝ) : interior { z : β„‚ | a ≀ z.re } = { z | a < z.re } := by
simpa only [interior_Ici] using interior_preimage_re (Ici a)
import Mathlib.CategoryTheory.Functor.Trifunctor import Mathlib.CategoryTheory.Products.Basic #align_import category_theory.monoidal.category from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" universe v u open CategoryTheory.Category open CategoryTheory.Iso namespace CategoryTheory ...
Mathlib/CategoryTheory/Monoidal/Category.lean
690
692
theorem tensor_hom_inv_id {V W X Y Z : C} (f : V β‰… W) (g : X ⟢ Y) (h : Y ⟢ Z) : (g βŠ— f.hom) ≫ (h βŠ— f.inv) = (g βŠ— πŸ™ V) ≫ (h βŠ— πŸ™ V) := by
rw [← tensor_comp, f.hom_inv_id]; simp [tensorHom_id]
import Mathlib.Init.ZeroOne import Mathlib.Data.Set.Defs import Mathlib.Order.Basic import Mathlib.Order.SymmDiff import Mathlib.Tactic.Tauto import Mathlib.Tactic.ByContra import Mathlib.Util.Delaborators #align_import data.set.basic from "leanprover-community/mathlib"@"001ffdc42920050657fd45bd2b8bfbec8eaaeb29" ...
Mathlib/Data/Set/Basic.lean
2,405
2,410
theorem not_monotoneOn_not_antitoneOn_iff_exists_lt_lt : Β¬MonotoneOn f s ∧ Β¬AntitoneOn f s ↔ βˆƒα΅‰ (a ∈ s) (b ∈ s) (c ∈ s), a < b ∧ b < c ∧ (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c) := by
simp [monotoneOn_iff_monotone, antitoneOn_iff_antitone, and_assoc, exists_and_left, not_monotone_not_antitone_iff_exists_lt_lt, @and_left_comm (_ ∈ s)]
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.SetTheory.Cardinal.Cofinality #align_import linear_algebra.basis from "leanprover-communit...
Mathlib/LinearAlgebra/Basis.lean
197
199
theorem self_mem_span_image [Nontrivial R] {i : ΞΉ} {s : Set ΞΉ} : b i ∈ span R (b '' s) ↔ i ∈ s := by
simp [mem_span_image, Finsupp.support_single_ne_zero]
import Mathlib.AlgebraicGeometry.AffineScheme import Mathlib.RingTheory.Nilpotent.Lemmas import Mathlib.Topology.Sheaves.SheafCondition.Sites import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.RingTheory.LocalProperties #align_import algebraic_geometry.properties from "leanprover-community/mathlib"@"88...
Mathlib/AlgebraicGeometry/Properties.lean
105
112
theorem affine_isReduced_iff (R : CommRingCat) : IsReduced (Scheme.Spec.obj <| op R) ↔ _root_.IsReduced R := by
refine ⟨?_, fun h => inferInstance⟩ intro h have : _root_.IsReduced (LocallyRingedSpace.Ξ“.obj (op <| Spec.toLocallyRingedSpace.obj <| op R)) := by change _root_.IsReduced ((Scheme.Spec.obj <| op R).presheaf.obj <| op ⊀); infer_instance exact isReduced_of_injective (toSpecΞ“ R) (asIso <| toSpecΞ“ R).com...
import Mathlib.Data.Finsupp.Multiset import Mathlib.Data.Nat.GCD.BigOperators import Mathlib.Data.Nat.PrimeFin import Mathlib.NumberTheory.Padics.PadicVal import Mathlib.Order.Interval.Finset.Nat #align_import data.nat.factorization.basic from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e" ...
Mathlib/Data/Nat/Factorization/Basic.lean
621
643
theorem factorization_gcd {a b : β„•} (ha_pos : a β‰  0) (hb_pos : b β‰  0) : (gcd a b).factorization = a.factorization βŠ“ b.factorization := by
let dfac := a.factorization βŠ“ b.factorization let d := dfac.prod (Β· ^ Β·) have dfac_prime : βˆ€ p : β„•, p ∈ dfac.support β†’ Prime p := by intro p hp have : p ∈ a.factors ∧ p ∈ b.factors := by simpa [dfac] using hp exact prime_of_mem_factors this.1 have h1 : d.factorization = dfac := prod_pow_factorizati...
import Mathlib.Algebra.Associated import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Algebra.SMulWithZero import Mathlib.Data.Nat.PartENat import Mathlib.Tactic.Linarith #align_import ring_theory.multiplicity from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" variable {Ξ± Ξ²...
Mathlib/RingTheory/Multiplicity.lean
65
73
theorem Int.natCast_multiplicity (a b : β„•) : multiplicity (a : β„€) (b : β„€) = multiplicity a b := by
apply Part.ext' Β· rw [← @finite_iff_dom β„•, @finite_def β„•, ← @finite_iff_dom β„€, @finite_def β„€] norm_cast Β· intro h1 h2 apply _root_.le_antisymm <;> Β· apply Nat.find_mono norm_cast simp
import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics import Mathlib.NumberTheory.Liouville.Basic import Mathlib.Topology.Instances.Irrational #align_import number_theory.liouville.liouville_with from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8" open Filter Metric Real Set open sc...
Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
54
66
theorem liouvilleWith_one (x : ℝ) : LiouvilleWith 1 x := by
use 2 refine ((eventually_gt_atTop 0).mono fun n hn => ?_).frequently have hn' : (0 : ℝ) < n := by simpa have : x < ↑(⌊x * ↑nβŒ‹ + 1) / ↑n := by rw [lt_div_iff hn', Int.cast_add, Int.cast_one]; exact Int.lt_floor_add_one _ refine ⟨⌊x * nβŒ‹ + 1, this.ne, ?_⟩ rw [abs_sub_comm, abs_of_pos (sub_pos.2 this...
import Mathlib.Dynamics.Flow import Mathlib.Tactic.Monotonicity #align_import dynamics.omega_limit from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function Filter Topology section omegaLimit variable {Ο„ : Type*} {Ξ± : Type*} {Ξ² : Type*} {ΞΉ : Type*} def omegaLimit [Topol...
Mathlib/Dynamics/OmegaLimit.lean
226
258
theorem eventually_closure_subset_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset' {c : Set Ξ²} (hc₁ : IsCompact c) (hcβ‚‚ : βˆƒ v ∈ f, closure (image2 Ο• v s) βŠ† c) {n : Set Ξ²} (hn₁ : IsOpen n) (hnβ‚‚ : Ο‰ f Ο• s βŠ† n) : βˆƒ u ∈ f, closure (image2 Ο• u s) βŠ† n := by
rcases hcβ‚‚ with ⟨v, hv₁, hvβ‚‚βŸ© let k := closure (image2 Ο• v s) have hk : IsCompact (k \ n) := (hc₁.of_isClosed_subset isClosed_closure hvβ‚‚).diff hn₁ let j u := (closure (image2 Ο• (u ∩ v) s))ᢜ have hj₁ : βˆ€ u ∈ f, IsOpen (j u) := fun _ _ ↦ isOpen_compl_iff.mpr isClosed_closure have hjβ‚‚ : k \ n βŠ† ⋃ u ∈ f, ...
import Mathlib.Algebra.Algebra.Bilinear import Mathlib.Algebra.Algebra.Equiv import Mathlib.Algebra.Algebra.Opposite import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Module.Opposites import Mathlib.Algebra.Module.Submodule.Bilinear import Mathlib.Algebra.Module.Submodule.Pointwise import Mat...
Mathlib/Algebra/Algebra/Operations.lean
406
418
theorem mul_smul_mul_eq_smul_mul_smul (x y : R) : (x * y) β€’ (M * N) = (x β€’ M) * (y β€’ N) := by
ext refine ⟨?_, fun hx ↦ Submodule.mul_induction_on hx ?_ fun _ _ hx hy ↦ Submodule.add_mem _ hx hy⟩ Β· rintro ⟨_, hx, rfl⟩ rw [DistribMulAction.toLinearMap_apply] refine Submodule.mul_induction_on hx (fun m hm n hn ↦ ?_) (fun _ _ hn hm ↦ ?_) Β· rw [← smul_mul_smul x y m n] exact mul_mem_mul (smu...
import Mathlib.Order.Filter.Bases import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.filter_basis from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Set TopologicalSpace Function open Topology Filter Pointwise universe u class GroupFilterBasis (...
Mathlib/Topology/Algebra/FilterBasis.lean
149
150
theorem N_one (B : GroupFilterBasis G) : B.N 1 = B.toFilterBasis.filter := by
simp only [N, one_mul, map_id']
import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Martingale.OptionalStopping import Mathlib.Probability.Martingale.Centering #align_import probability.martingale.borel_cantelli from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open Filter open scoped NNRea...
Mathlib/Probability/Martingale/BorelCantelli.lean
93
98
theorem stoppedValue_stoppedValue_leastGE (f : β„• β†’ Ξ© β†’ ℝ) (Ο€ : Ξ© β†’ β„•) (r : ℝ) {n : β„•} (hΟ€n : βˆ€ Ο‰, Ο€ Ο‰ ≀ n) : stoppedValue (fun i => stoppedValue f (leastGE f r i)) Ο€ = stoppedValue (stoppedProcess f (leastGE f r n)) Ο€ := by
ext1 Ο‰ simp (config := { unfoldPartialApp := true }) only [stoppedProcess, stoppedValue] rw [leastGE_eq_min _ _ _ hΟ€n]
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
257
261
theorem expand_contract' [NoZeroDivisors R] {f : R[X]} (hf : Polynomial.derivative f = 0) : expand R p (contract p f) = f := by
obtain _ | @⟨_, hprime, hchar⟩ := β€ΉExpChar R pβ€Ί Β· rw [expand_one, contract_one] Β· haveI := Fact.mk hchar; exact expand_contract p hf hprime.ne_zero
import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Order.Interval.Finset.Basic #align_import data.int.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset Int namespace Int instance instLocallyFiniteOrder : LocallyFiniteOrder β„€ where finsetIcc a b := (Fins...
Mathlib/Data/Int/Interval.lean
165
166
theorem card_fintype_Ioo : Fintype.card (Set.Ioo a b) = (b - a - 1).toNat := by
rw [← card_Ioo, Fintype.card_ofFinset]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic import Mathlib.Dynamics.Ergodic.MeasurePreserving import Mathlib.Combinatorics.Pigeonhole #align_import dynamics.ergodic.conservative from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" noncomputable section open scoped Classi...
Mathlib/Dynamics/Ergodic/Conservative.lean
83
106
theorem frequently_measure_inter_ne_zero (hf : Conservative f ΞΌ) (hs : MeasurableSet s) (h0 : ΞΌ s β‰  0) : βˆƒαΆ  m in atTop, ΞΌ (s ∩ f^[m] ⁻¹' s) β‰  0 := by
by_contra H simp only [not_frequently, eventually_atTop, Ne, Classical.not_not] at H rcases H with ⟨N, hN⟩ induction' N with N ihN Β· apply h0 simpa using hN 0 le_rfl rw [imp_false] at ihN push_neg at ihN rcases ihN with ⟨n, hn, hΞΌn⟩ set T := s ∩ ⋃ n β‰₯ N + 1, f^[n] ⁻¹' s have hT : MeasurableSet ...
import Mathlib.Topology.Algebra.Ring.Basic import Mathlib.Topology.Algebra.MulAction import Mathlib.Topology.Algebra.UniformGroup import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Topology.UniformSpace.UniformEmbedding import Mathlib.Algebra.Algebra.Defs import Mathlib.LinearAlgebra.Projection import Mat...
Mathlib/Topology/Algebra/Module/Basic.lean
571
578
theorem _root_.DenseRange.topologicalClosure_map_submodule [RingHomSurjective σ₁₂] [TopologicalSpace R₁] [TopologicalSpace Rβ‚‚] [ContinuousSMul R₁ M₁] [ContinuousAdd M₁] [ContinuousSMul Rβ‚‚ Mβ‚‚] [ContinuousAdd Mβ‚‚] {f : M₁ β†’SL[σ₁₂] Mβ‚‚} (hf' : DenseRange f) {s : Submodule R₁ M₁} (hs : s.topologicalClosure = ⊀) :...
rw [SetLike.ext'_iff] at hs ⊒ simp only [Submodule.topologicalClosure_coe, Submodule.top_coe, ← dense_iff_closure_eq] at hs ⊒ exact hf'.dense_image f.continuous hs
import Mathlib.Algebra.Group.Basic import Mathlib.Algebra.Group.Pi.Basic import Mathlib.Order.Fin import Mathlib.Order.PiLex import Mathlib.Order.Interval.Set.Basic #align_import data.fin.tuple.basic from "leanprover-community/mathlib"@"ef997baa41b5c428be3fb50089a7139bf4ee886b" assert_not_exists MonoidWithZero un...
Mathlib/Data/Fin/Tuple/Basic.lean
626
642
theorem cons_snoc_eq_snoc_cons {Ξ² : Type*} (a : Ξ²) (q : Fin n β†’ Ξ²) (b : Ξ²) : @cons n.succ (fun _ ↦ Ξ²) a (snoc q b) = snoc (cons a q) b := by
ext i by_cases h : i = 0 Β· rw [h] -- Porting note: `refl` finished it here in Lean 3, but I had to add more. simp [snoc, castLT] set j := pred i h with ji have : i = j.succ := by rw [ji, succ_pred] rw [this, cons_succ] by_cases h' : j.val < n Β· set k := castLT j h' with jk have : j = castSu...
import Mathlib.Order.Atoms import Mathlib.Order.OrderIsoNat import Mathlib.Order.RelIso.Set import Mathlib.Order.SupClosed import Mathlib.Order.SupIndep import Mathlib.Order.Zorn import Mathlib.Data.Finset.Order import Mathlib.Order.Interval.Set.OrderIso import Mathlib.Data.Finite.Set import Mathlib.Tactic.TFAE #alig...
Mathlib/Order/CompactlyGenerated/Basic.lean
227
245
theorem IsSupClosedCompact.wellFounded (h : IsSupClosedCompact Ξ±) : WellFounded ((Β· > Β·) : Ξ± β†’ Ξ± β†’ Prop) := by
refine RelEmbedding.wellFounded_iff_no_descending_seq.mpr ⟨fun a => ?_⟩ suffices sSup (Set.range a) ∈ Set.range a by obtain ⟨n, hn⟩ := Set.mem_range.mp this have h' : sSup (Set.range a) < a (n + 1) := by change _ > _ simp [← hn, a.map_rel_iff] apply lt_irrefl (a (n + 1)) apply lt_of_le_...
import Mathlib.Algebra.Order.Ring.Rat import Mathlib.Tactic.NormNum.Inv import Mathlib.Tactic.NormNum.Pow import Mathlib.Util.AtomM set_option autoImplicit true namespace Mathlib.Tactic namespace Ring open Mathlib.Meta Qq NormNum Lean.Meta AtomM open Lean (MetaM Expr mkRawNatLit) def instCommSemiringNat : CommSe...
Mathlib/Tactic/Ring/Basic.lean
772
773
theorem pow_nat (_ : b = c * k) (_ : a ^ c = d) (_ : d ^ k = e) : (a : R) ^ b = e := by
subst_vars; simp [pow_mul]
import Mathlib.RingTheory.Valuation.ValuationRing import Mathlib.RingTheory.Localization.AsSubring import Mathlib.Algebra.Ring.Subring.Pointwise import Mathlib.AlgebraicGeometry.PrimeSpectrum.Basic #align_import ring_theory.valuation.valuation_subring from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0d...
Mathlib/RingTheory/Valuation/ValuationSubring.lean
200
201
theorem valuation_unit (a : AΛ£) : A.valuation a = 1 := by
rw [← A.valuation.map_one, valuation_eq_iff]; use a; simp
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Module.Defs import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.FreeGroup.Basic #align_import group_theory.free_abelian_group from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v variable (Ξ± : Ty...
Mathlib/GroupTheory/FreeAbelianGroup.lean
378
380
theorem map_id_apply (x : FreeAbelianGroup Ξ±) : map id x = x := by
rw [map_id] rfl
import Mathlib.Algebra.Regular.Basic import Mathlib.LinearAlgebra.Matrix.MvPolynomial import Mathlib.LinearAlgebra.Matrix.Polynomial import Mathlib.RingTheory.Polynomial.Basic #align_import linear_algebra.matrix.adjugate from "leanprover-community/mathlib"@"a99f85220eaf38f14f94e04699943e185a5e1d1a" namespace Matr...
Mathlib/LinearAlgebra/Matrix/Adjugate.lean
106
116
theorem cramer_transpose_row_self (i : n) : Aα΅€.cramer (A i) = Pi.single i A.det := by
ext j rw [cramer_apply, Pi.single_apply] split_ifs with h Β· -- i = j: this entry should be `A.det` subst h simp only [updateColumn_transpose, det_transpose, updateRow_eq_self] Β· -- i β‰  j: this entry should be 0 rw [updateColumn_transpose, det_transpose] apply det_zero_of_row_eq h rw [upda...
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator import Mathlib.MeasureTheory.Function.UniformIntegrable import Mathlib.MeasureTheory.Decomposition.RadonNikodym #align_import measure_theory.function.conditional_expectation.real from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean
146
179
theorem ae_bdd_condexp_of_ae_bdd {R : ℝβ‰₯0} {f : Ξ± β†’ ℝ} (hbdd : βˆ€α΅ x βˆ‚ΞΌ, |f x| ≀ R) : βˆ€α΅ x βˆ‚ΞΌ, |(ΞΌ[f|m]) x| ≀ R := by
by_cases hnm : m ≀ m0 swap Β· simp_rw [condexp_of_not_le hnm, Pi.zero_apply, abs_zero] exact eventually_of_forall fun _ => R.coe_nonneg by_cases hfint : Integrable f ΞΌ swap Β· simp_rw [condexp_undef hfint] filter_upwards [hbdd] with x hx rw [Pi.zero_apply, abs_zero] exact (abs_nonneg _).trans...
import Mathlib.Algebra.ModEq import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Periodic import Mathlib.Data.Int.SuccPred import Mathlib.GroupTheory.QuotientGroup import Mathlib.Order.Circular import Mathlib.Data.List.TFAE import Mathlib.Data.Set.Lattice #align_import a...
Mathlib/Algebra/Order/ToIntervalMod.lean
728
730
theorem toIocMod_eq_self : toIocMod hp a b = b ↔ b ∈ Set.Ioc a (a + p) := by
rw [toIocMod_eq_iff, and_iff_left] exact ⟨0, by simp⟩
import Mathlib.Algebra.CharP.ExpChar import Mathlib.Algebra.GeomSum import Mathlib.Algebra.MvPolynomial.CommRing import Mathlib.Algebra.MvPolynomial.Equiv import Mathlib.RingTheory.Polynomial.Content import Mathlib.RingTheory.UniqueFactorizationDomain #align_import ring_theory.polynomial.basic from "leanprover-commun...
Mathlib/RingTheory/Polynomial/Basic.lean
1,147
1,150
theorem isNoetherianRing_fin_0 [IsNoetherianRing R] : IsNoetherianRing (MvPolynomial (Fin 0) R) := by
apply isNoetherianRing_of_ringEquiv R symm; apply MvPolynomial.isEmptyRingEquiv R (Fin 0)
import Mathlib.Algebra.GroupWithZero.Divisibility import Mathlib.Algebra.MonoidAlgebra.Basic import Mathlib.Data.Finset.Sort #align_import data.polynomial.basic from "leanprover-community/mathlib"@"949dc57e616a621462062668c9f39e4e17b64b69" set_option linter.uppercaseLean3 false noncomputable section structure ...
Mathlib/Algebra/Polynomial/Basic.lean
1,210
1,214
theorem coeff_sub (p q : R[X]) (n : β„•) : coeff (p - q) n = coeff p n - coeff q n := by
rcases p with ⟨⟩ rcases q with ⟨⟩ -- Porting note: The last rule should be `apply`ed. rw [← ofFinsupp_sub, coeff, coeff, coeff]; apply Finsupp.sub_apply
import Mathlib.Data.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign
Mathlib/Data/Real/Sign.lean
36
36
theorem sign_of_neg {r : ℝ} (hr : r < 0) : sign r = -1 := by
rw [sign, if_pos hr]
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Order.SupIndep import Mathlib.Order.Atoms #align_import order.partition.finpartition from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" open Finset Function variable {Ξ± : Type*} @[ext] structure Finpartition [Lattice Ξ±]...
Mathlib/Order/Partition/Finpartition.lean
661
665
theorem mem_atomise : t ∈ (atomise s F).parts ↔ t.Nonempty ∧ βˆƒ Q βŠ† F, (s.filter fun i ↦ βˆ€ u ∈ F, u ∈ Q ↔ i ∈ u) = t := by
simp only [atomise, ofErase, bot_eq_empty, mem_erase, mem_image, nonempty_iff_ne_empty, mem_singleton, and_comm, mem_powerset, exists_prop]
import Mathlib.Algebra.Algebra.Defs import Mathlib.Algebra.Algebra.NonUnitalHom import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.LinearAlgebra.TensorProduct.Basic #align_import algebra.algebra.bilinear from "leanprover-community/mathlib"@"657df4339ae6ceada048c8a2980fb10e393143ec" open TensorProduct Modu...
Mathlib/Algebra/Algebra/Bilinear.lean
206
211
theorem mulLeft_eq_zero_iff (a : A) : mulLeft R a = 0 ↔ a = 0 := by
constructor <;> intro h -- Porting note: had to supply `R` explicitly in `@mulLeft_apply` below Β· rw [← mul_one a, ← @mulLeft_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply] Β· rw [h] exact mulLeft_zero_eq_zero
import Mathlib.Algebra.Order.Monoid.Unbundled.Basic #align_import algebra.order.monoid.min_max from "leanprover-community/mathlib"@"de87d5053a9fe5cbde723172c0fb7e27e7436473" open Function variable {Ξ± Ξ² : Type*} section CovariantClassMulLe variable [LinearOrder Ξ±] section Mul variable [Mul Ξ±] @[to_additive...
Mathlib/Algebra/Order/Monoid/Unbundled/MinMax.lean
90
94
theorem lt_or_lt_of_mul_lt_mul [CovariantClass Ξ± Ξ± (Β· * Β·) (Β· ≀ Β·)] [CovariantClass Ξ± Ξ± (Function.swap (Β· * Β·)) (Β· ≀ Β·)] {a₁ aβ‚‚ b₁ bβ‚‚ : Ξ±} : a₁ * b₁ < aβ‚‚ * bβ‚‚ β†’ a₁ < aβ‚‚ ∨ b₁ < bβ‚‚ := by
contrapose! exact fun h => mul_le_mul' h.1 h.2
import Mathlib.Algebra.IsPrimePow import Mathlib.Data.Nat.Factorization.Basic #align_import data.nat.factorization.prime_pow from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" variable {R : Type*} [CommMonoidWithZero R] (n p : R) (k : β„•) theorem IsPrimePow.minFac_pow_factorization_eq ...
Mathlib/Data/Nat/Factorization/PrimePow.lean
76
84
theorem exists_ord_compl_eq_one_iff_isPrimePow {n : β„•} (hn : n β‰  1) : IsPrimePow n ↔ βˆƒ p : β„•, p.Prime ∧ ord_compl[p] n = 1 := by
refine ⟨fun h => IsPrimePow.exists_ord_compl_eq_one h, fun h => ?_⟩ rcases h with ⟨p, pp, h⟩ rw [isPrimePow_nat_iff] rw [← Nat.eq_of_dvd_of_div_eq_one (Nat.ord_proj_dvd n p) h] at hn ⊒ refine ⟨p, n.factorization p, pp, ?_, by simp⟩ contrapose! hn simp [Nat.le_zero.1 hn]
import Mathlib.Algebra.TrivSqZeroExt #align_import algebra.dual_number from "leanprover-community/mathlib"@"b8d2eaa69d69ce8f03179a5cda774fc0cde984e4" variable {R A B : Type*} abbrev DualNumber (R : Type*) : Type _ := TrivSqZeroExt R R #align dual_number DualNumber def DualNumber.eps [Zero R] [One R] : DualN...
Mathlib/Algebra/DualNumber.lean
96
97
theorem commute_eps_left [Semiring R] (x : DualNumber R) : Commute Ξ΅ x := by
ext <;> simp
import Mathlib.CategoryTheory.Comma.StructuredArrow import Mathlib.CategoryTheory.PUnit import Mathlib.CategoryTheory.Functor.ReflectsIso import Mathlib.CategoryTheory.Functor.EpiMono #align_import category_theory.over from "leanprover-community/mathlib"@"8a318021995877a44630c898d0b2bc376fceef3b" namespace Catego...
Mathlib/CategoryTheory/Comma/Over.lean
376
376
theorem w {A B : Under X} (f : A ⟢ B) : A.hom ≫ f.right = B.hom := by
have := f.w; aesop_cat
import Mathlib.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adjunction.Evaluation import Mathlib.Tactic.CategoryTheory.Elementwise import Mathlib.CategoryTheory.Adhesive import Mathlib.CategoryTheory.Sites.ConcreteSheafification #align_import category_theory.sites.subsheaf from "leanprover-community/mathl...
Mathlib/CategoryTheory/Sites/Subsheaf.lean
312
321
theorem Subpresheaf.to_sheafify_lift_unique (h : Presieve.IsSheaf J F') (l₁ lβ‚‚ : (G.sheafify J).toPresheaf ⟢ F') (e : Subpresheaf.homOfLe (G.le_sheafify J) ≫ l₁ = Subpresheaf.homOfLe (G.le_sheafify J) ≫ lβ‚‚) : l₁ = lβ‚‚ := by
ext U ⟨s, hs⟩ apply (h _ hs).isSeparatedFor.ext rintro V i hi dsimp at hi erw [← FunctorToTypes.naturality, ← FunctorToTypes.naturality] exact (congr_fun (congr_app e <| op V) ⟨_, hi⟩ : _)
import Batteries.Data.Char import Batteries.Data.List.Lemmas import Batteries.Data.String.Basic import Batteries.Tactic.Lint.Misc import Batteries.Tactic.SeqFocus namespace String attribute [ext] ext theorem lt_trans {s₁ sβ‚‚ s₃ : String} : s₁ < sβ‚‚ β†’ sβ‚‚ < s₃ β†’ s₁ < s₃ := List.lt_trans' (Ξ± := Char) Nat.lt_trans ...
.lake/packages/batteries/Batteries/Data/String/Lemmas.lean
376
379
theorem extract_cons_addChar (c : Char) (cs : List Char) (b e : Pos) : extract ⟨c :: cs⟩ (b + c) (e + c) = extract ⟨cs⟩ b e := by
simp [extract, Nat.add_le_add_iff_right] split <;> [rfl; rw [extract.go₁_cons_addChar]]
import Mathlib.Data.Vector.Basic #align_import data.vector.mem from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" namespace Vector variable {Ξ± Ξ² : Type*} {n : β„•} (a a' : Ξ±) @[simp] theorem get_mem (i : Fin n) (v : Vector Ξ± n) : v.get i ∈ v.toList := by rw [get_eq_get] exact List....
Mathlib/Data/Vector/Mem.lean
38
41
theorem not_mem_nil : a βˆ‰ (Vector.nil : Vector Ξ± 0).toList := by
unfold Vector.nil dsimp simp
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
750
763
theorem integral_eq_norm_posPart_sub (f : Ξ± →₁[ΞΌ] ℝ) : integral f = β€–Lp.posPart fβ€– - β€–Lp.negPart fβ€– := by
-- Use `isClosed_property` and `isClosed_eq` refine @isClosed_property _ _ _ ((↑) : (Ξ± →₁ₛ[ΞΌ] ℝ) β†’ Ξ± →₁[ΞΌ] ℝ) (fun f : Ξ± →₁[ΞΌ] ℝ => integral f = β€–Lp.posPart fβ€– - β€–Lp.negPart fβ€–) (simpleFunc.denseRange one_ne_top) (isClosed_eq ?_ ?_) ?_ f Β· simp only [integral] exact cont _ Β· refine Continuous.s...
import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.Topology.MetricSpace.Contracting #align_import analysis.ODE.picard_lindelof from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Filter Function Set Metric TopologicalSpace intervalIntegral MeasureTheory open MeasureTh...
Mathlib/Analysis/ODE/PicardLindelof.lean
381
389
theorem IsPicardLindelof.exists_forall_hasDerivWithinAt_Icc_eq [CompleteSpace E] {v : ℝ β†’ E β†’ E} {tMin tβ‚€ tMax : ℝ} (xβ‚€ : E) {C R : ℝ} {L : ℝβ‰₯0} (hpl : IsPicardLindelof v tMin tβ‚€ tMax xβ‚€ L R C) : βˆƒ f : ℝ β†’ E, f tβ‚€ = xβ‚€ ∧ βˆ€ t ∈ Icc tMin tMax, HasDerivWithinAt f (v t (f t)) (Icc tMin tMax) t := by
lift C to ℝβ‰₯0 using (norm_nonneg _).trans hpl.norm_leβ‚€ lift tβ‚€ to Icc tMin tMax using hpl.htβ‚€ exact PicardLindelof.exists_solution ⟨v, tMin, tMax, tβ‚€, xβ‚€, C, ⟨R, hpl.hR⟩, L, { hpl with htβ‚€ := tβ‚€.property }⟩
import Mathlib.Order.MinMax import Mathlib.Data.Set.Subsingleton import Mathlib.Tactic.Says #align_import data.set.intervals.basic from "leanprover-community/mathlib"@"3ba15165bd6927679be7c22d6091a87337e3cd0c" open Function open OrderDual (toDual ofDual) variable {Ξ± Ξ² : Type*} namespace Set theorem Icc_bot_top...
Mathlib/Order/Interval/Set/Basic.lean
1,128
1,128
theorem Ioi_diff_Ici : Ioi a \ Ici b = Ioo a b := by
rw [diff_eq, compl_Ici, Ioi_inter_Iio]
import Mathlib.Analysis.Calculus.ContDiff.Defs import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.Deriv.Inverse #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputab...
Mathlib/Analysis/Calculus/ContDiff/Basic.lean
1,833
1,836
theorem ContDiff.div [CompleteSpace π•œ] {f g : E β†’ π•œ} {n} (hf : ContDiff π•œ n f) (hg : ContDiff π•œ n g) (h0 : βˆ€ x, g x β‰  0) : ContDiff π•œ n fun x => f x / g x := by
simp only [contDiff_iff_contDiffAt] at * exact fun x => (hf x).div (hg x) (h0 x)
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
558
562
theorem mem_compPartialSumSource_iff (m M N : β„•) (i : Ξ£ n, Fin n β†’ β„•) : i ∈ compPartialSumSource m M N ↔ (m ≀ i.1 ∧ i.1 < M) ∧ βˆ€ a : Fin i.1, 1 ≀ i.2 a ∧ i.2 a < N := by
simp only [compPartialSumSource, Finset.mem_Ico, Fintype.mem_piFinset, Finset.mem_sigma, iff_self_iff]
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic #align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" universe u v section RelPrime variable {Ξ± I} [Comm...
Mathlib/RingTheory/Coprime/Lemmas.lean
299
301
theorem pow_right (H : IsRelPrime x y) : IsRelPrime x (y ^ n) := by
rw [← Finset.card_range n, ← Finset.prod_const] exact IsRelPrime.prod_right fun _ _ ↦ H
import Mathlib.Algebra.Polynomial.Reverse import Mathlib.Algebra.Regular.SMul #align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5" noncomputable section open Finset open Polynomial namespace Polynomial universe u v y variable {R : Type u} {S : Typ...
Mathlib/Algebra/Polynomial/Monic.lean
278
284
theorem monic_multiset_prod_of_monic (t : Multiset ΞΉ) (f : ΞΉ β†’ R[X]) (ht : βˆ€ i ∈ t, Monic (f i)) : Monic (t.map f).prod := by
revert ht refine t.induction_on ?_ ?_; Β· simp intro a t ih ht rw [Multiset.map_cons, Multiset.prod_cons] exact (ht _ (Multiset.mem_cons_self _ _)).mul (ih fun _ hi => ht _ (Multiset.mem_cons_of_mem hi))
import Mathlib.Data.Int.GCD import Mathlib.Tactic.NormNum namespace Tactic namespace NormNum theorem int_gcd_helper' {d : β„•} {x y : β„€} (a b : β„€) (h₁ : (d : β„€) ∣ x) (hβ‚‚ : (d : β„€) ∣ y) (h₃ : x * a + y * b = d) : Int.gcd x y = d := by refine Nat.dvd_antisymm ?_ (Int.natCast_dvd_natCast.1 (Int.dvd_gcd h₁ hβ‚‚)) ...
Mathlib/Tactic/NormNum/GCD.lean
36
43
theorem nat_gcd_helper_2 (d x y a b : β„•) (hu : x % d = 0) (hv : y % d = 0) (h : x * a = y * b + d) : Nat.gcd x y = d := by
rw [← Int.gcd_natCast_natCast] apply int_gcd_helper' a (-b) (Int.natCast_dvd_natCast.mpr (Nat.dvd_of_mod_eq_zero hu)) (Int.natCast_dvd_natCast.mpr (Nat.dvd_of_mod_eq_zero hv)) rw [mul_neg, ← sub_eq_add_neg, sub_eq_iff_eq_add'] exact mod_cast h
import Mathlib.Order.Filter.SmallSets import Mathlib.Tactic.Monotonicity import Mathlib.Topology.Compactness.Compact import Mathlib.Topology.NhdsSet import Mathlib.Algebra.Group.Defs #align_import topology.uniform_space.basic from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c" open Set F...
Mathlib/Topology/UniformSpace/Basic.lean
1,585
1,588
theorem mem_uniform_prod [t₁ : UniformSpace Ξ±] [tβ‚‚ : UniformSpace Ξ²] {a : Set (Ξ± Γ— Ξ±)} {b : Set (Ξ² Γ— Ξ²)} (ha : a ∈ 𝓀 Ξ±) (hb : b ∈ 𝓀 Ξ²) : { p : (Ξ± Γ— Ξ²) Γ— Ξ± Γ— Ξ² | (p.1.1, p.2.1) ∈ a ∧ (p.1.2, p.2.2) ∈ b } ∈ 𝓀 (Ξ± Γ— Ξ²) := by
rw [uniformity_prod]; exact inter_mem_inf (preimage_mem_comap ha) (preimage_mem_comap hb)
import Mathlib.AlgebraicTopology.DoldKan.EquivalenceAdditive import Mathlib.AlgebraicTopology.DoldKan.Compatibility import Mathlib.CategoryTheory.Idempotents.SimplicialObject #align_import algebraic_topology.dold_kan.equivalence_pseudoabelian from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b5...
Mathlib/AlgebraicTopology/DoldKan/EquivalencePseudoabelian.lean
108
114
theorem hΞ· : Compatibility.Ο„β‚€ = Compatibility.τ₁ isoN₁ isoΞ“β‚€ (N₁Γ₀ : Ξ“ β‹™ N₁ β‰… (toKaroubiEquivalence (ChainComplex C β„•)).functor) := by
ext K : 3 simp only [Compatibility.Ο„β‚€_hom_app, Compatibility.τ₁_hom_app] exact (Nβ‚‚Ξ“β‚‚_compatible_with_N₁Γ₀ K).trans (by simp )
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
377
389
theorem fst_iso_of_right_embedding_range_subset {X Y S : TopCat} (f : X ⟢ S) {g : Y ⟢ S} (hg : Embedding g) (H : Set.range f βŠ† Set.range g) : IsIso (pullback.fst : pullback f g ⟢ X) := by
let esto : (pullback f g : TopCat) β‰ƒβ‚œ X := (Homeomorph.ofEmbedding _ (fst_embedding_of_right_embedding f hg)).trans { toFun := Subtype.val invFun := fun x => ⟨x, by rw [pullback_fst_range] exact ⟨_, (H (Set.mem_range_self x)).choose_spec.symm⟩⟩ left_inv := ...
import Mathlib.Algebra.Group.Equiv.Basic import Mathlib.Algebra.Group.Aut import Mathlib.Data.ZMod.Defs import Mathlib.Tactic.Ring #align_import algebra.quandle from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33" open MulOpposite universe u v class Shelf (Ξ± : Type u) where act : ...
Mathlib/Algebra/Quandle.lean
225
229
theorem left_cancel (x : R) {y y' : R} : x β—ƒ y = x β—ƒ y' ↔ y = y' := by
constructor Β· apply (act' x).injective rintro rfl rfl
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
119
121
theorem isBounded_convexHull {s : Set E} : Bornology.IsBounded (convexHull ℝ s) ↔ Bornology.IsBounded s := by
simp only [Metric.isBounded_iff_ediam_ne_top, convexHull_ediam]
import Mathlib.Algebra.Group.Pi.Lemmas import Mathlib.Algebra.Module.Defs import Mathlib.GroupTheory.Abelianization import Mathlib.GroupTheory.FreeGroup.Basic #align_import group_theory.free_abelian_group from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v variable (Ξ± : Ty...
Mathlib/GroupTheory/FreeAbelianGroup.lean
416
417
theorem of_mul_of (x y : Ξ±) : of x * of y = of (x * y) := by
rw [mul_def, lift.of, lift.of]
import Mathlib.Algebra.Group.Pi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Products import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.IsomorphismClasses import Mathlib.CategoryTheory.Limits.Shapes.ZeroObjects #align_import category_theory.limits.shapes.zero_morphisms from "leanpr...
Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
140
142
theorem zero_of_comp_mono {X Y Z : C} {f : X ⟢ Y} (g : Y ⟢ Z) [Mono g] (h : f ≫ g = 0) : f = 0 := by
rw [← zero_comp, cancel_mono] at h exact h
import Mathlib.Data.Fintype.Option import Mathlib.Topology.Separation import Mathlib.Topology.Sets.Opens #align_import topology.alexandroff from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" open Set Filter Topology variable {X : Type*} def OnePoint (X : Type*) := Option X #ali...
Mathlib/Topology/Compactification/OnePoint.lean
236
237
theorem isOpen_image_coe {s : Set X} : IsOpen ((↑) '' s : Set (OnePoint X)) ↔ IsOpen s := by
rw [isOpen_iff_of_not_mem infty_not_mem_image_coe, preimage_image_eq _ coe_injective]
import Mathlib.Algebra.BigOperators.Module import Mathlib.Algebra.Order.Field.Basic import Mathlib.Order.Filter.ModEq import Mathlib.Analysis.Asymptotics.Asymptotics import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Data.List.TFAE import Mathlib.Analysis.NormedSpace.Basic #align_import analysis.specific_lim...
Mathlib/Analysis/SpecificLimits/Normed.lean
62
68
theorem tendsto_norm_zpow_nhdsWithin_0_atTop {π•œ : Type*} [NormedDivisionRing π•œ] {m : β„€} (hm : m < 0) : Tendsto (fun x : π•œ ↦ β€–x ^ mβ€–) (𝓝[β‰ ] 0) atTop := by
rcases neg_surjective m with ⟨m, rfl⟩ rw [neg_lt_zero] at hm; lift m to β„• using hm.le; rw [Int.natCast_pos] at hm simp only [norm_pow, zpow_neg, zpow_natCast, ← inv_pow] exact (tendsto_pow_atTop hm.ne').comp NormedField.tendsto_norm_inverse_nhdsWithin_0_atTop
import Mathlib.Algebra.Algebra.Operations import Mathlib.Algebra.Algebra.Subalgebra.Basic import Mathlib.Algebra.DirectSum.Algebra #align_import algebra.direct_sum.internal from "leanprover-community/mathlib"@"9936c3dfc04e5876f4368aeb2e60f8d8358d095a" open DirectSum variable {ΞΉ : Type*} {Οƒ S R : Type*} instance...
Mathlib/Algebra/DirectSum/Internal.lean
170
182
theorem coe_mul_apply_eq_dfinsupp_sum [AddMonoid ΞΉ] [SetLike.GradedMonoid A] [βˆ€ (i : ΞΉ) (x : A i), Decidable (x β‰  0)] (r r' : ⨁ i, A i) (n : ΞΉ) : ((r * r') n : R) = r.sum fun i ri => r'.sum fun j rj => if i + j = n then (ri * rj : R) else 0 := by
rw [mul_eq_dfinsupp_sum] iterate 2 rw [DFinsupp.sum_apply, DFinsupp.sum, AddSubmonoidClass.coe_finset_sum]; congr; ext dsimp only split_ifs with h Β· subst h rw [of_eq_same] rfl Β· rw [of_eq_of_ne _ _ _ _ h] rfl
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
106
107
theorem taylor_mul {R} [CommSemiring R] (r : R) (p q : R[X]) : taylor r (p * q) = taylor r p * taylor r q := by
simp only [taylor_apply, mul_comp]
import Mathlib.Algebra.Group.Semiconj.Defs import Mathlib.Algebra.Group.Units #align_import algebra.group.semiconj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered open scoped Int variable {M G : Type*} namespace Sem...
Mathlib/Algebra/Group/Semiconj/Units.lean
64
67
theorem units_inv_symm_left {a : MΛ£} {x y : M} (h : SemiconjBy (↑a) x y) : SemiconjBy (↑a⁻¹) y x := calc ↑a⁻¹ * y = ↑a⁻¹ * (y * a * ↑a⁻¹) := by
rw [Units.mul_inv_cancel_right] _ = x * ↑a⁻¹ := by rw [← h.eq, ← mul_assoc, Units.inv_mul_cancel_left]
import Mathlib.Data.Set.Finite import Mathlib.Order.Partition.Finpartition #align_import data.setoid.partition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" namespace Setoid variable {Ξ± : Type*} theorem eq_of_mem_eqv_class {c : Set (Set Ξ±)} (H : βˆ€ a, βˆƒ! b ∈ c, a ∈ b) {x b b'} ...
Mathlib/Data/Setoid/Partition.lean
503
513
theorem piecewise_inj {Ξ² : Type*} {f : ΞΉ β†’ Ξ± β†’ Ξ²} (h_injOn : βˆ€ i, InjOn (f i) (s i)) (h_disjoint : PairwiseDisjoint (univ : Set ΞΉ) fun i => (f i) '' (s i)) : Injective (piecewise hs f) := by
intro x y h suffices hs.index x = hs.index y by apply h_injOn (hs.index x) (hs.mem_index x) (this β–Έ hs.mem_index y) simpa only [piecewise_apply, this] using h apply h_disjoint.elim trivial trivial contrapose! h exact h.ne_of_mem (mem_image_of_mem _ (hs.mem_index x)) (mem_image_of_mem _ (hs.mem_index ...
import Mathlib.Combinatorics.SetFamily.Shadow #align_import combinatorics.set_family.compression.uv from "leanprover-community/mathlib"@"6f8ab7de1c4b78a68ab8cf7dd83d549eb78a68a1" open Finset variable {Ξ± : Type*} theorem sup_sdiff_injOn [GeneralizedBooleanAlgebra Ξ±] (u v : Ξ±) : { x | Disjoint u x ∧ v ≀ x }....
Mathlib/Combinatorics/SetFamily/Compression/UV.lean
115
120
theorem compress_idem (u v a : Ξ±) : compress u v (compress u v a) = compress u v a := by
unfold compress split_ifs with h h' Β· rw [le_sdiff_iff.1 h'.2, sdiff_bot, sdiff_bot, sup_assoc, sup_idem] Β· rfl Β· rfl
import Mathlib.CategoryTheory.Limits.Shapes.Terminal #align_import category_theory.endofunctor.algebra from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" universe v u namespace CategoryTheory namespace Endofunctor variable {C : Type u} [Category.{v} C] structure Algebra (F : C β₯€ C...
Mathlib/CategoryTheory/Endofunctor/Algebra.lean
363
367
theorem iso_of_iso (f : Vβ‚€ ⟢ V₁) [IsIso f.1] : IsIso f := ⟨⟨{ f := inv f.1 h := by
rw [IsIso.eq_inv_comp f.1, ← Category.assoc, ← f.h, Category.assoc] simp }, by aesop_cat, by aesop_cat⟩⟩
import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import topology.metric_space.hausdorff_distance from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" noncomputable section open NNReal ENNReal Topology Set Filter Bornology universe u v w variable {ΞΉ : Sort*} {Ξ± : Type u} {Ξ² :...
Mathlib/Topology/MetricSpace/Thickening.lean
605
617
theorem _root_.IsCompact.cthickening_eq_biUnion_closedBall {Ξ± : Type*} [PseudoMetricSpace Ξ±] {Ξ΄ : ℝ} {E : Set Ξ±} (hE : IsCompact E) (hΞ΄ : 0 ≀ Ξ΄) : cthickening Ξ΄ E = ⋃ x ∈ E, closedBall x Ξ΄ := by
rcases eq_empty_or_nonempty E with (rfl | hne) Β· simp only [cthickening_empty, biUnion_empty] refine Subset.antisymm (fun x hx ↦ ?_) (iUnionβ‚‚_subset fun x hx ↦ closedBall_subset_cthickening hx _) obtain ⟨y, yE, hy⟩ : βˆƒ y ∈ E, infEdist x E = edist x y := hE.exists_infEdist_eq_edist hne _ have D1 : edist x...
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
545
546
theorem inner_zero_left (x : E) : βŸͺ0, x⟫ = 0 := by
rw [← zero_smul π•œ (0 : E), inner_smul_left, RingHom.map_zero, zero_mul]
import Mathlib.Data.Finset.Image import Mathlib.Data.List.FinRange #align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf" assert_not_exists MonoidWithZero assert_not_exists MulAction open Function open Nat universe u v variable {Ξ± Ξ² Ξ³ : Type*} class Fi...
Mathlib/Data/Fintype/Basic.lean
641
642
theorem toFinset_subset_toFinset [Fintype s] [Fintype t] : s.toFinset βŠ† t.toFinset ↔ s βŠ† t := by
simp [Finset.subset_iff, Set.subset_def]
import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Nat.Factors import Mathlib.Order.Interval.Finset.Nat #align_import number_theory.divisors from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3" open scoped Classical open Finset namespace Nat variable (n : β„•) d...
Mathlib/NumberTheory/Divisors.lean
84
86
theorem insert_self_properDivisors (h : n β‰  0) : insert n (properDivisors n) = divisors n := by
rw [divisors, properDivisors, Ico_succ_right_eq_insert_Ico (one_le_iff_ne_zero.2 h), Finset.filter_insert, if_pos (dvd_refl n)]
import Mathlib.Analysis.Seminorm import Mathlib.Topology.Algebra.Equicontinuity import Mathlib.Topology.MetricSpace.Equicontinuity import Mathlib.Topology.Algebra.FilterBasis import Mathlib.Topology.Algebra.Module.LocallyConvex #align_import analysis.locally_convex.with_seminorms from "leanprover-community/mathlib"@"...
Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
280
282
theorem WithSeminorms.topologicalAddGroup (hp : WithSeminorms p) : TopologicalAddGroup E := by
rw [hp.withSeminorms_eq] exact AddGroupFilterBasis.isTopologicalAddGroup _
import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Algebra.Order.Interval.Set.Group import Mathlib.Algebra.Group.Int import Mathlib.Data.Int.Lemmas import Mathlib.Data.Set.Subsingleton import Mathlib.Init.Data.Nat.Lemmas import Mathlib.Order.GaloisConnection import Mathlib.Tactic.Abel import Mathlib.Tactic.Linarith...
Mathlib/Algebra/Order/Floor.lean
448
450
theorem preimage_Iic {a : Ξ±} (ha : 0 ≀ a) : (Nat.cast : β„• β†’ Ξ±) ⁻¹' Set.Iic a = Set.Iic ⌊aβŒ‹β‚Š := by
ext simp [le_floor_iff, ha]
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Tactic.Positivity.Core import Mathlib.Algebra.Ring.NegOnePow #align_import analysis.special_functions.trigonometric.basic from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" noncomputable section open scoped Classical open Top...
Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
142
144
theorem cos_pi_div_two : cos (Ο€ / 2) = 0 := by
rw [Real.pi, mul_div_cancel_leftβ‚€ _ (two_ne_zero' ℝ)] exact (Classical.choose_spec exists_cos_eq_zero).2
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Group.Measure import Mathlib.Topology.Constructions #align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" noncomputable section open Function Set MeasureTheory...
Mathlib/MeasureTheory/Constructions/Pi.lean
409
411
theorem pi_closedBall [βˆ€ i, MetricSpace (Ξ± i)] (x : βˆ€ i, Ξ± i) {r : ℝ} (hr : 0 ≀ r) : Measure.pi ΞΌ (Metric.closedBall x r) = ∏ i, ΞΌ i (Metric.closedBall (x i) r) := by
rw [closedBall_pi _ hr, pi_pi]
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
121
123
theorem coeff_expand_mul {p : β„•} (hp : 0 < p) (f : R[X]) (n : β„•) : (expand R p f).coeff (n * p) = f.coeff n := by
rw [coeff_expand hp, if_pos (dvd_mul_left _ _), Nat.mul_div_cancel _ hp]
import Mathlib.Order.Filter.Bases #align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Set Function open scoped Classical open Filter namespace Filter variable {ΞΉ : Type*} {Ξ± : ΞΉ β†’ Type*} {f f₁ fβ‚‚ : (i : ΞΉ) β†’ Filter (Ξ± i)} {s : (i : ΞΉ) β†’ Set (Ξ± i)} ...
Mathlib/Order/Filter/Pi.lean
186
186
theorem pi_neBot : NeBot (pi f) ↔ βˆ€ i, NeBot (f i) := by
simp [neBot_iff]
import Mathlib.Init.Align import Mathlib.Topology.PartialHomeomorph #align_import geometry.manifold.charted_space from "leanprover-community/mathlib"@"431589bce478b2229eba14b14a283250428217db" noncomputable section open TopologicalSpace Topology universe u variable {H : Type u} {H' : Type*} {M : Type*} {M' : Ty...
Mathlib/Geometry/Manifold/ChartedSpace.lean
1,098
1,101
theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : PartialHomeomorph H H} (hf : f ∈ G) : f ∈ G.maximalAtlas H := by
rintro e (rfl : e = PartialHomeomorph.refl H) exact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩