ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/SpecificLimits/Normed.lean
/-- The **alternating series test** for antitone sequences. -/
theorem Antitone.tendsto_alternating_series_of_tendsto_zero (hfa : Antitone f)
    (hf0 : Tendsto f atTop (𝓝 0)) :
    ∃ l, Tendsto (fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i) atTop (𝓝 l)
-- Mathlib/Combinatorics/Additive/Dissociation.lean
@[to_additive (attr := simp)]
lemma mem_mulSpan :
    a ∈ mulSpan s ↔ ∃ ε : α → ℤ, (∀ a, ε a = -1 ∨ ε a = 0 ∨ ε a = 1) ∧ ∏ a in s, a ^ ε a = a
-- Mathlib/RingTheory/TwoSidedIdeal/Basic.lean
lemma add_mem {x y} (hx : x ∈ I) (hy : y ∈ I) : x + y ∈ I
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem drop_zero (l : List α) : l.drop 0 = l
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isLittleO_pow_pow {m n : ℕ} (h : m < n) : (fun x : 𝕜 => x ^ n) =o[𝓝 0] fun x => x ^ m
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
/-- If `f : X → Y` is Lipschitz in a neighborhood of each point `x : X`, then the Hausdorff
dimension of `range f` is at most the Hausdorff dimension of `X`. -/
theorem dimH_range_le_of_locally_lipschitzOn [SecondCountableTopology X] {f : X → Y}
    (hf : ∀ x : X, ∃ C : ℝ≥0, ∃ s ∈ 𝓝 x, LipschitzOnWith C f s) :
    dimH (range f) ≤ dimH (univ : Set X)
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem hasFiniteIntegral_iff_edist (f : α → β) :
    HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞
-- Mathlib/RingTheory/Generators.lean
lemma Hom.toAlgHom_monomial (f : Generators.Hom P P') (v r) :
    f.toAlgHom (monomial v r) = r • v.prod (f.val · ^ ·)
-- Mathlib/Data/Prod/Basic.lean
theorem mk.inj_left {α β : Type*} (a : α) : Function.Injective (Prod.mk a : β → α × β)
-- Mathlib/Data/Real/EReal.lean
theorem eq_bot_iff_forall_lt (x : EReal) : x = ⊥ ↔ ∀ y : ℝ, x < (y : EReal)
-- Mathlib/Algebra/Lie/Semisimple/Basic.lean
theorem hasTrivialRadical_of_no_solvable_ideals (h : ∀ I : LieIdeal R L, IsSolvable R I → I = ⊥) :
    HasTrivialRadical R L
-- Mathlib/RingTheory/PowerSeries/Order.lean
/-- The order of the `0` power series is infinite. -/
@[simp]
theorem order_zero : order (0 : R⟦X⟧) = ⊤
-- Mathlib/Order/Lattice.lean
theorem le_sup_inf : ∀ {x y z : α}, (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z
-- Mathlib/Topology/UniformSpace/Equiv.lean
protected theorem bijective (h : α ≃ᵤ β) : Function.Bijective h
-- Mathlib/Computability/RegularExpressions.lean
@[simp]
theorem matches'_add (P Q : RegularExpression α) : (P + Q).matches' = P.matches' + Q.matches'
-- Mathlib/Topology/Algebra/Group/Basic.lean
/-- A typeclass saying that `p : G × G ↦ p.1 - p.2` is a continuous function. This property
automatically holds for topological additive groups but it also holds, e.g., for `ℝ≥0`. -/
class ContinuousSub (G : Type*) [TopologicalSpace G] [Sub G] : Prop where
  continuous_sub : Continuous fun p : G × G => p.1 - p.2
-- Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
lemma unit_map_one {X Y : Cᵒᵖ} (f : X ⟶ Y) : (unit R).map f (1 : R.obj X) = (1 : R.obj Y)
-- Mathlib/Order/Interval/Set/Disjoint.lean
theorem IsLUB.biUnion_Iic_eq_Iic (a_lub : IsLUB s a) (a_mem : a ∈ s) : ⋃ x ∈ s, Iic x = Iic a
-- Mathlib/Data/Nat/Factorial/SuperFactorial.lean
theorem superFactorial_four_mul (n : ℕ) :
    sf (4 * n) = ((∏ i ∈ range (2 * n), (2 * i + 1) !) * 2 ^ n) ^ 2 * (2 * n) !
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
@[reassoc (attr := simp)]
theorem inv_naturality {U V : (Opens X)ᵒᵖ} (i : U ⟶ V) :
    X.presheaf.map i ≫ H.invApp (unop V) =
      H.invApp (unop U) ≫ Y.presheaf.map (opensFunctor f |>.op.map i)
-- Mathlib/Order/Interval/Basic.lean
@[simp, norm_cast]
theorem coe_sup_interval [Lattice α] (s t : NonemptyInterval α) :
    (↑(s ⊔ t) : Interval α) = ↑s ⊔ ↑t
-- Mathlib/CategoryTheory/Preadditive/Basic.lean
theorem mono_iff_cancel_zero {Q R : C} (f : Q ⟶ R) :
    Mono f ↔ ∀ (P : C) (g : P ⟶ Q), g ≫ f = 0 → g = 0
-- Mathlib/Order/Monotone/Basic.lean
protected theorem StrictMono.compares (hf : StrictMono f) {a b : α} {o : Ordering} :
    o.Compares (f a) (f b) ↔ o.Compares a b
-- Mathlib/RingTheory/Algebraic.lean
@[simp]
theorem polynomial_smul_apply' [CommSemiring R'] [Semiring S'] [Algebra R' S'] [SMul S' T']
    (p : R'[X]) (f : S' → T') (x : S') : (p • f) x = aeval x p • f x
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContDiff.restrict_scalars (h : ContDiff 𝕜' n f) : ContDiff 𝕜 n f
-- Mathlib/Algebra/BigOperators/Finsupp.lean
@[simp]
theorem liftAddHom_apply [AddCommMonoid M] [AddCommMonoid N] (F : α → M →+ N) (f : α →₀ M) :
    (liftAddHom (α := α) (M := M) (N := N)) F f = f.sum fun x => F x
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
@[simp] lemma add_left_inj (μ ν₁ ν₂ : Measure α) [SigmaFinite μ] :
    ν₁ + μ = ν₂ + μ ↔ ν₁ = ν₂
-- Mathlib/Data/Set/Image.lean
theorem range_const_subset {c : α} : (range fun _ : ι => c) ⊆ {c}
-- Mathlib/Topology/Semicontinuous.lean
/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with an
explicit continuity assumption on addition, for application to `EReal`. The unprimed version of
the lemma uses `[ContinuousAdd]`. -/
theorem UpperSemicontinuousOn.add' {f g : α → γ} (hf : UpperSemicontinuousOn f s)
    (hg : UpperSemicontinuousOn g s)
    (hcont : ∀ x ∈ s, ContinuousAt (fun p : γ × γ => p.1 + p.2) (f x, g x)) :
    UpperSemicontinuousOn (fun z => f z + g z) s
-- Mathlib/ModelTheory/Syntax.lean
theorem relabel_id (t : L.Term α) : t.relabel id = t
-- Mathlib/Combinatorics/Colex.lean
lemma le_def {s t : Colex α} :
    s ≤ t ↔ ∀ ⦃a⦄, a ∈ ofColex s → a ∉ ofColex t → ∃ b, b ∈ ofColex t ∧ b ∉ ofColex s ∧ a ≤ b
-- Mathlib/Topology/Algebra/GroupWithZero.lean
@[fun_prop]
theorem Continuous.div₀ (hf : Continuous f) (hg : Continuous g) (h₀ : ∀ x, g x ≠ 0) :
    Continuous (fun x => f x / g x)
-- Mathlib/Order/Filter/Partial.lean
@[simp]
theorem mem_rcomap' (r : Rel α β) (l : Filter β) (s : Set α) :
    s ∈ l.rcomap' r ↔ ∃ t ∈ l, r.preimage t ⊆ s
-- Mathlib/Topology/Algebra/Group/Basic.lean
/-- A version of the global `continuous_inv` suitable for dot notation. -/
@[to_additive "A version of the global `continuous_neg` suitable for dot notation."]
theorem continuous_inv' (g : GroupTopology α) :
    haveI := g.toTopologicalSpace
    Continuous (Inv.inv : α → α)
-- Mathlib/Analysis/ODE/Gronwall.lean
theorem gronwallBound_ε0 (δ K x : ℝ) : gronwallBound δ K 0 x = δ * exp (K * x)
-- Mathlib/RingTheory/LaurentSeries.lean
@[simp, norm_cast]
theorem coe_one : ((1 : RatFunc F) : LaurentSeries F) = 1
-- Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean
/-- Precomposition with a linear isometry preserves the operator norm. -/
theorem opNorm_comp_linearIsometryEquiv (f : F →SL[σ₂₃] G) (g : F' ≃ₛₗᵢ[σ₂'] F) :
    ‖f.comp g.toLinearIsometry.toContinuousLinearMap‖ = ‖f‖
-- Mathlib/LinearAlgebra/Quotient.lean
theorem mk_surjective : Function.Surjective (@mk _ _ _ _ _ p)
-- Mathlib/Order/Bounded.lean
theorem bounded_ge_inter_gt [LinearOrder α] (a : α) :
    Bounded (· ≥ ·) (s ∩ { b | b < a }) ↔ Bounded (· ≥ ·) s
-- Mathlib/NumberTheory/SmoothNumbers.lean
@[simp]
lemma equivProdNatSmoothNumbers_apply' {p : ℕ} (hp : p.Prime) (x : ℕ × p.smoothNumbers) :
    equivProdNatSmoothNumbers hp x = p ^ x.1 * x.2
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive (attr := simp)]
theorem unop_bot : (⊥ : Subgroup Gᵐᵒᵖ).unop = ⊥
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
lemma factor_δ_spec {m n : ℕ} (f : ([m] : SimplexCategory) ⟶ [n+1]) (j : Fin (n+2))
    (hj : ∀ (k : Fin (m+1)), f.toOrderHom k ≠ j) :
    factor_δ f j ≫ δ j = f
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem exp_two_pi_mul_I : exp (2 * π * I) = 1
-- Mathlib/Data/List/Dedup.lean
theorem dedup_subset : ∀ l : List α, dedup l ⊆ l
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem den_mul_self_eq_num (I : FractionalIdeal S P) :
    I.den • (I : Submodule R P) = Submodule.map (Algebra.linearMap R P) I.num
-- Mathlib/Algebra/Group/Conj.lean
theorem IsConj.conjugatesOf_eq {a b : α} (ab : IsConj a b) : conjugatesOf a = conjugatesOf b
-- Mathlib/Order/Heyting/Boundary.lean
@[simp]
theorem Coheyting.boundary_eq_bot (a : α) : ∂ a = ⊥
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem eLpNorm_smul_measure_of_ne_top {p : ℝ≥0∞} (hp_ne_top : p ≠ ∞) {f : α → F} (c : ℝ≥0∞) :
    eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive (attr := fun_prop) ContinuousOn.norm]
theorem ContinuousOn.norm' {s : Set α} (h : ContinuousOn f s) : ContinuousOn (fun x => ‖f x‖) s
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
theorem mem_iInf {ι : Sort*} {S : ι → NonUnitalSubring R} {x : R} :
    (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i
-- Mathlib/Analysis/Calculus/FDeriv/Extend.lean
/-- If a function `f` is differentiable in a convex open set and continuous on its closure, and its
derivative converges to a limit `f'` at a point on the boundary, then `f` is differentiable there
with derivative `f'`. -/
theorem hasFDerivWithinAt_closure_of_tendsto_fderiv {f : E → F} {s : Set E} {x : E} {f' : E →L[ℝ] F}
    (f_diff : DifferentiableOn ℝ f s) (s_conv : Convex ℝ s) (s_open : IsOpen s)
    (f_cont : ∀ y ∈ closure s, ContinuousWithinAt f s y)
    (h : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')) :
    HasFDerivWithinAt f f' (closure s) x
-- Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
lemma LocalRing.finrank_CotangentSpace_eq_one_iff [IsNoetherianRing R] [LocalRing R] [IsDomain R] :
    finrank (ResidueField R) (CotangentSpace R) = 1 ↔ DiscreteValuationRing R
-- Mathlib/Data/List/Nodup.lean
protected theorem Nodup.filterMap {f : α → Option β} (h : ∀ a a' b, b ∈ f a → b ∈ f a' → a = a') :
    Nodup l → Nodup (filterMap f l)
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
theorem HasFDerivAtFilter.const_add (hf : HasFDerivAtFilter f f' x L) (c : F) :
    HasFDerivAtFilter (fun y => c + f y) f' x L
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
/-- Symmetric version of **Fubini's Theorem**: For integrable functions on `α × β`,
  the Bochner integral of `f` is equal to the iterated Bochner integral.
  This version has the integrals on the right-hand side in the other order. -/
theorem integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
    ∫ z, f z ∂μ.prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν
-- Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
theorem cpow_conj (x : ℂ) (n : ℂ) (hx : x.arg ≠ π) : x ^ conj n = conj (conj x ^ n)
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- To construct an isomorphism between forks,
it suffices to give an isomorphism between the cone points
and check that it commutes with the `ι` morphisms.
-/
@[simps]
def Fork.ext {s t : Fork f g} (i : s.pt ≅ t.pt) (w : i.hom ≫ t.ι = s.ι := by aesop_cat) :
    s ≅ t
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem coe_inf : ⇑(f ⊓ g) = ⇑f ⊓ ⇑g
-- Mathlib/Algebra/Polynomial/RingDivision.lean
theorem isCoprime_X_sub_C_of_isUnit_sub {R} [CommRing R] {a b : R} (h : IsUnit (a - b)) :
    IsCoprime (X - C a) (X - C b)
-- Mathlib/RepresentationTheory/Character.lean
@[simp]
theorem char_tensor' (V W : FDRep k G) :
    character (Action.FunctorCategoryEquivalence.inverse.obj
    (Action.FunctorCategoryEquivalence.functor.obj V ⊗
     Action.FunctorCategoryEquivalence.functor.obj W)) = V.character * W.character
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma PosSMulReflectLE_iff_posSMulReflectLT : PosSMulReflectLE α β ↔ PosSMulReflectLT α β
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem blsub_le {o : Ordinal} {f : ∀ b < o, Ordinal} {a} : (∀ i h, f i h < a) → blsub o f ≤ a
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem Real.nndist_eq (x y : ℝ) : nndist x y = Real.nnabs (x - y)
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
/-- When `S₁.g` and `S₂.g` are zero and we have chosen colimit cokernel coforks `c₁` and `c₂`
for `S₁.f` and `S₂.f` respectively, the action on left homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`φ.τ₂ ≫ c₂.π = c₁.π ≫ f`. -/
@[simps]
def ofIsColimitCokernelCofork (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (c₁ : CokernelCofork S₁.f) (hc₁ : IsColimit c₁)
    (hg₂ : S₂.g = 0) (c₂ : CokernelCofork S₂.f) (hc₂ : IsColimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : φ.τ₂ ≫ c₂.π = c₁.π ≫ f) :
    LeftHomologyMapData φ (LeftHomologyData.ofIsColimitCokernelCofork S₁ hg₁ c₁ hc₁)
      (LeftHomologyData.ofIsColimitCokernelCofork S₂ hg₂ c₂ hc₂)