ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
protected lemma comp_id {n : ℤ} (z₁ : Cochain F G n) :
    z₁.comp (Cochain.ofHom (𝟙 G)) (add_zero n) = z₁
-- Mathlib/LinearAlgebra/Basis.lean
@[simp]
theorem coe_repr_symm : ↑b.repr.symm = Finsupp.total ι M R b
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If `f : ℝ → ℝ` is strictly convex on `S` and differentiable within `S` at `y ∈ S`, then the
slope of any secant line with right endpoint at `y` is strictly less than the derivative of `f`
within `S` at `y`.

This is fractionally weaker than `StrictConvexOn.slope_lt_of_hasDerivWithinAt_Iio` but simpler to
apply under a `DifferentiableOn S` hypothesis.-/
lemma slope_lt_of_hasDerivWithinAt (hfc : StrictConvexOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivWithinAt f f' S y) :
    slope f x y < f'
-- Mathlib/Analysis/LocallyConvex/WeakDual.lean
theorem coe_toSeminorm {f : E →ₗ[𝕜] 𝕜} : ⇑f.toSeminorm = fun x => ‖f x‖
-- Mathlib/Topology/Order.lean
protected theorem le_def {α} {t s : TopologicalSpace α} : t ≤ s ↔ IsOpen[s] ≤ IsOpen[t]
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[to_additive Icc_add_Icc_subset]
theorem Icc_mul_Icc_subset' (a b c d : α) : Icc a b * Icc c d ⊆ Icc (a * c) (b * d)
-- Mathlib/Data/Fintype/BigOperators.lean
/-- An uncurried version of `Finset.prod_prod_type`. -/
@[to_additive Fintype.sum_prod_type' "An uncurried version of `Finset.sum_prod_type`"]
theorem Fintype.prod_prod_type' [CommMonoid γ] {f : α₁ → α₂ → γ} :
    ∏ x : α₁ × α₂, f x.1 x.2 = ∏ x, ∏ y, f x y
-- Mathlib/CategoryTheory/Monoidal/Bimod.lean
theorem comp_whiskerLeft_bimod {W X Y Z : Mon_ C} (M : Bimod W X) (N : Bimod X Y)
    {P P' : Bimod Y Z} (f : P ⟶ P') :
    whiskerLeft (M.tensorBimod N) f =
      (associatorBimod M N P).hom ≫
        whiskerLeft M (whiskerLeft N f) ≫ (associatorBimod M N P').inv
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem one_mem_div_iff : (1 : α) ∈ s / t ↔ ¬Disjoint s t
-- Mathlib/Data/Real/Cardinality.lean
theorem cantorFunctionAux_zero (f : ℕ → Bool) : cantorFunctionAux c f 0 = cond (f 0) 1 0
-- Mathlib/GroupTheory/Coset.lean
@[to_additive mem_rightAddCoset_rightAddCoset]
theorem mem_rightCoset_rightCoset {a : α} (ha : op a • (s : Set α) = s) : a ∈ s
-- Mathlib/Data/Set/Function.lean
@[simp] lemma bijOn_singleton : BijOn f {a} {b} ↔ f a = b
-- Mathlib/Data/Num/Lemmas.lean
@[norm_cast]
theorem dvd_to_nat (m n : Num) : (m : ℕ) ∣ n ↔ m ∣ n
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[simp, fun_prop, measurability]
theorem measurable_const {_ : MeasurableSpace α} {_ : MeasurableSpace β} {a : α} :
    Measurable fun _ : β => a
-- Mathlib/Topology/Perfect.lean
/-- Given a perfect nonempty set in a T2.5 space, we can find two disjoint perfect subsets.
This is the main inductive step in the proof of the Cantor-Bendixson Theorem. -/
theorem Perfect.splitting [T25Space α] (hC : Perfect C) (hnonempty : C.Nonempty) :
    ∃ C₀ C₁ : Set α,
    (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C) ∧ (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C) ∧ Disjoint C₀ C₁
-- Mathlib/Data/Finsupp/Defs.lean
theorem zero_apply {a : α} : (0 : α →₀ M) a = 0
-- Mathlib/Data/Finite/Card.lean
theorem card_image_le {s : Set α} [Finite s] (f : α → β) : Nat.card (f '' s) ≤ Nat.card s
-- Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
theorem weightedHomogeneousComponent_mem (w : σ → M) (φ : MvPolynomial σ R) (m : M) :
    weightedHomogeneousComponent w m φ ∈ weightedHomogeneousSubmodule R w m
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive]
theorem mul_comm : ∀ a b : G, a * b = b * a
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
theorem inv_le_one₀ (ha : a ≠ 0) : a⁻¹ ≤ 1 ↔ 1 ≤ a
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem not_le_of_gt {n m : Nat} (h : n > m) : ¬ n ≤ m
-- Mathlib/Order/Interval/Set/OrderEmbedding.lean
@[simp] theorem preimage_Ico : e ⁻¹' Ico (e x) (e y) = Ico x y
-- Mathlib/Data/Int/Bitwise.lean
/-- Compare with `Int.shiftRight_add`, which doesn't have the coercions `ℕ → ℤ`. -/
theorem shiftRight_add' : ∀ (m : ℤ) (n k : ℕ), m >>> (n + k : ℤ) = (m >>> (n : ℤ)) >>> (k : ℤ)
-- Mathlib/CategoryTheory/Sites/IsSheafOneHypercover.lean
@[reassoc]
lemma fac' (i : E.I₀) :
    lift hP hE le F ≫ P.map (E.f i).op =
      F.ι ⟨_, E.f i, le _ (Sieve.ofArrows_mk _ _ _)⟩
-- Mathlib/Topology/Clopen.lean
theorem IsClopen.compl (hs : IsClopen s) : IsClopen sᶜ
-- Mathlib/Analysis/Calculus/Taylor.lean
/-- The Taylor polynomial of order zero evaluates to `f x`. -/
@[simp]
theorem taylor_within_zero_eval (f : ℝ → E) (s : Set ℝ) (x₀ x : ℝ) :
    taylorWithinEval f 0 s x₀ x = f x₀
-- Mathlib/Algebra/Algebra/Equiv.lean
@[deprecated map_neg (since := "2024-06-20")]
protected theorem map_neg (x) : e (-x) = -e x
-- Mathlib/Tactic/CategoryTheory/BicategoryCoherence.lean
/-- Auxiliary simp lemma for the `coherence` tactic:
this move brackets to the left in order to expose a maximal prefix
built out of unitors and associators.
-/
@[nolint unusedArguments]
theorem assoc_liftHom₂ {f g h i : a ⟶ b} [LiftHom f] [LiftHom g] [LiftHom h]
    (η : f ⟶ g) (θ : g ⟶ h) (ι : h ⟶ i) [LiftHom₂ η] [LiftHom₂ θ] : η ≫ θ ≫ ι = (η ≫ θ) ≫ ι
-- Mathlib/Algebra/MvPolynomial/PDeriv.lean
theorem pderiv_monomial_single {i : σ} {n : ℕ} : pderiv i (monomial (single i n) a) =
    monomial (single i (n - 1)) (a * n)
-- Mathlib/Data/Finset/Piecewise.lean
lemma le_piecewise_of_le_of_le (hf : h ≤ f) (hg : h ≤ g) : h ≤ s.piecewise f g
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
@[simp]
theorem thickening_closedBall (hε : 0 < ε) (hδ : 0 ≤ δ) (x : E) :
    thickening ε (closedBall x δ) = ball x (ε + δ)
-- Mathlib/Algebra/Lie/OfAssociative.lean
theorem lie_eq_smul (a : A) (m : M) : ⁅a, m⁆ = a • m
-- Mathlib/Analysis/Matrix.lean
theorem norm_def (A : Matrix m n α) : ‖A‖ = ‖fun i j => A i j‖
-- Mathlib/Order/FixedPoints.lean
theorem isFixedPt_lfp : IsFixedPt f (lfp f)
-- Mathlib/Analysis/Normed/Group/Uniform.lean
@[to_additive (attr := simp)]
theorem dist_self_mul_left (a b : E) : dist (a * b) a = ‖b‖
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem Subsequent.moveLeft {x : PGame} (i : x.LeftMoves) : Subsequent (x.moveLeft i) x
-- Mathlib/Algebra/FreeMonoid/Basic.lean
@[to_additive (attr := simp)]
theorem of_smul (f : α → β → β) (x : α) (y : β) :
    (haveI := mkMulAction f
    of x • y) = f x y
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem bot_mul : ⊥ * I = ⊥
-- Mathlib/CategoryTheory/Preadditive/Basic.lean
theorem comp_zsmul (n : ℤ) : f ≫ (n • g) = n • f ≫ g
-- Mathlib/Data/Nat/Lattice.lean
protected theorem sInf_le {s : Set ℕ} {m : ℕ} (hm : m ∈ s) : sInf s ≤ m
-- Mathlib/Topology/Order/Category/FrameAdjunction.lean
/-- The frame homomorphism from a complete lattice `L` to the complete lattice of sets of
points of `L`. -/
@[simps]
def openOfElementHom : FrameHom L (Set (PT L))
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem hasProd_prod_disjoint {ι} (s : Finset ι) {t : ι → Set β} {a : ι → α}
    (hs : (s : Set ι).Pairwise (Disjoint on t)) (hf : ∀ i ∈ s, HasProd (f ∘ (↑) : t i → α) (a i)) :
    HasProd (f ∘ (↑) : (⋃ i ∈ s, t i) → α) (∏ i ∈ s, a i)
-- Mathlib/Algebra/Lie/Free.lean
theorem Rel.addLeft (a : lib R X) {b c : lib R X} (h : Rel R X b c) : Rel R X (a + b) (a + c)
-- Mathlib/Analysis/NormedSpace/Exponential.lean
@[simp]
theorem _root_.Pi.exp_apply {ι : Type*} {𝔸 : ι → Type*} [Finite ι] [∀ i, NormedRing (𝔸 i)]
    [∀ i, NormedAlgebra 𝕂 (𝔸 i)] [∀ i, CompleteSpace (𝔸 i)] (x : ∀ i, 𝔸 i) (i : ι) :
    exp 𝕂 x i = exp 𝕂 (x i)
-- Mathlib/Algebra/Category/Ring/Colimits.lean
@[simp]
theorem quot_zero : Quot.mk Setoid.r zero = (0 : ColimitType F)
-- Mathlib/Algebra/Lie/Basic.lean
@[norm_cast, simp]
theorem coe_comp (f : N →ₗ⁅R,L⁆ P) (g : M →ₗ⁅R,L⁆ N) : ⇑(f.comp g) = f ∘ g
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isLittleO_neg_left : (fun x => -f' x) =o[l] g ↔ f' =o[l] g
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
@[simp]
theorem DifferentiableAt.div_const (hc : DifferentiableAt 𝕜 c x) (d : 𝕜') :
    DifferentiableAt 𝕜 (fun x => c x / d) x
-- Mathlib/Analysis/Matrix.lean
@[simp]
theorem linfty_opNNNorm_row (v : n → α) : ‖row ι v‖₊ = ∑ i, ‖v i‖₊
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_arrow_eq_zero_iff : #(α → β') = 0 ↔ #α ≠ 0 ∧ #β' = 0
-- Mathlib/Topology/Order/LawsonTopology.lean
/-- Predicate for an ordered topological space to be equipped with its Lawson topology.

The Lawson topology is defined as the meet of `Topology.lower` and the `Topology.scott`.
-/
class IsLawson : Prop where
  topology_eq_lawson : ‹TopologicalSpace α› = lawson α
-- .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean
theorem zoom_fill' (cut : α → Ordering) (t : RBNode α) (path : Path α) :
    fill' (zoom cut t path) = path.fill t
-- Mathlib/GroupTheory/Nilpotent.lean
/-- The preimage of a nilpotent group is nilpotent if the kernel of the homomorphism is contained
in the center -/
theorem isNilpotent_of_ker_le_center {H : Type*} [Group H] (f : G →* H) (hf1 : f.ker ≤ center G)
    (hH : IsNilpotent H) : IsNilpotent G
-- Mathlib/CategoryTheory/Triangulated/Subcategory.lean
lemma zero [ClosedUnderIsomorphisms S.P] : S.P 0
-- Mathlib/Algebra/Ring/Subring/MulOpposite.lean
@[simp, norm_cast]
theorem unop_coe (S : Subring Rᵐᵒᵖ) : S.unop = MulOpposite.op ⁻¹' (S : Set Rᵐᵒᵖ)
-- Mathlib/FieldTheory/SplittingField/IsSplittingField.lean
theorem finiteDimensional (f : K[X]) [IsSplittingField K L f] : FiniteDimensional K L
-- Mathlib/RingTheory/DedekindDomain/Basic.lean
theorem DimensionLEOne.not_lt_lt [Ring.DimensionLEOne R] (p₀ p₁ p₂ : Ideal R) [hp₁ : p₁.IsPrime]
    [hp₂ : p₂.IsPrime] : ¬(p₀ < p₁ ∧ p₁ < p₂)
-- Mathlib/GroupTheory/Order/Min.lean
@[to_additive (attr := simp)]
lemma le_minOrder {n : ℕ∞} :
    n ≤ minOrder α ↔ ∀ ⦃a : α⦄, a ≠ 1 → IsOfFinOrder a → n ≤ orderOf a
-- Mathlib/Algebra/Lie/InvariantForm.lean
lemma restrict_nondegenerate (I : LieIdeal K L) (hI : IsAtom I) :
    (Φ.restrict I).Nondegenerate
-- Mathlib/Data/List/Nodup.lean
theorem nodup_iff_getElem?_ne_getElem? {l : List α} :
    l.Nodup ↔ ∀ i j : ℕ, i < j → j < l.length → l[i]? ≠ l[j]?
-- Mathlib/FieldTheory/KummerExtension.lean
lemma finrank_of_isSplittingField_X_pow_sub_C : FiniteDimensional.finrank K L = n
-- Mathlib/Data/Set/Lattice.lean
theorem image2_iUnion_right (s : Set α) (t : ι → Set β) :
    image2 f s (⋃ i, t i) = ⋃ i, image2 f s (t i)
-- Mathlib/Analysis/Convex/Integral.lean
/-- **Jensen's inequality**, strict version: if an integrable function `f : α → E` takes values in a
convex closed set `s`, and `g : E → ℝ` is continuous and strictly convex on `s`, then
either `f` is a.e. equal to its average value, or `g (⨍ x, f x ∂μ) < ⨍ x, g (f x) ∂μ`. -/
theorem StrictConvexOn.ae_eq_const_or_map_average_lt [IsFiniteMeasure μ] (hg : StrictConvexOn ℝ s g)
    (hgc : ContinuousOn g s) (hsc : IsClosed s) (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ)
    (hgi : Integrable (g ∘ f) μ) :
    f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ g (⨍ x, f x ∂μ) < ⨍ x, g (f x) ∂μ
-- .lake/packages/batteries/Batteries/Classes/Order.lean
theorem cmp_refl [OrientedCmp cmp] : cmp x x = .eq
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
@[simp]
theorem inner_self_ofReal_re (x : E) : (re ⟪x, x⟫ : 𝕜) = ⟪x, x⟫
-- Mathlib/Topology/Separation.lean
/-- In a (possibly non-Hausdorff) locally compact regular space, for every containment `K ⊆ U` of
  a compact set `K` in an open set `U`, there is a compact closed neighborhood `L`
  such that `K ⊆ L ⊆ U`: equivalently, there is a compact closed set `L` such
  that `K ⊆ interior L` and `L ⊆ U`. -/
theorem exists_compact_closed_between [LocallyCompactSpace X] [RegularSpace X]
    {K U : Set X} (hK : IsCompact K) (hU : IsOpen U) (h_KU : K ⊆ U) :
    ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U
-- Mathlib/RingTheory/AdicCompletion/AsTensorProduct.lean
private lemma ofTensorProductInvOfPiFintype_comp_ofTensorProduct :
    ofTensorProductInvOfPiFintype I ι ∘ₗ ofTensorProduct I (ι → R) = LinearMap.id
-- Mathlib/Order/Directed.lean
theorem IsTotal.directed [IsTotal α r] (f : ι → α) : Directed r f
-- Mathlib/NumberTheory/BernoulliPolynomials.lean
theorem bernoulli_def (n : ℕ) : bernoulli n =
    ∑ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i)
-- Mathlib/Algebra/Ring/Divisibility/Lemmas.lean
lemma pow_dvd_sub_pow_of_pow_eq_zero_left (hp : n + m ≤ p + 1) (h_comm : Commute x y)
    (hx : x ^ n = 0) : y ^ m ∣ (x - y) ^ p
-- Mathlib/Topology/UniformSpace/Ascoli.lean
/-- A version of the **Arzela-Ascoli theorem**.

Let `X` be a topological space, `𝔖` a family of compact subsets of `X`, `α` a uniform space,
and `F : ι → (X → α)`. Assume that:
* `F`, viewed as a function `ι → (X →ᵤ[𝔖] α)`, is closed and inducing
* `F` is equicontinuous on each `K ∈ 𝔖`
* For all `x ∈ ⋃₀ 𝔖`, the range of `i ↦ F i x` is contained in some fixed compact subset.

Then `ι` is compact. -/
theorem ArzelaAscoli.compactSpace_of_closed_inducing' [TopologicalSpace ι] {𝔖 : Set (Set X)}
    (𝔖_compact : ∀ K ∈ 𝔖, IsCompact K) (F_ind : Inducing (UniformOnFun.ofFun 𝔖 ∘ F))
    (F_cl : IsClosed <| range <| UniformOnFun.ofFun 𝔖 ∘ F)
    (F_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn F K)
    (F_pointwiseCompact : ∀ K ∈ 𝔖, ∀ x ∈ K, ∃ Q, IsCompact Q ∧ ∀ i, F i x ∈ Q) :
    CompactSpace ι
-- Mathlib/RingTheory/FinitePresentation.lean
theorem comp_surjective {f : A →ₐ[R] B} {g : B →ₐ[R] C} (hf : f.FinitePresentation)
    (hg : Surjective g) (hker : g.toRingHom.ker.FG) : (g.comp f).FinitePresentation
-- Mathlib/Topology/Basic.lean
theorem OrderTop.tendsto_atTop_nhds [PartialOrder α] [OrderTop α] (f : α → X) :
    Tendsto f atTop (𝓝 (f ⊤))
-- Mathlib/Algebra/Order/Interval/Finset.lean
@[simp] lemma map_add_right_Ioo (a b c : α) :
    (Ioo a b).map (addRightEmbedding c) = Ioo (a + c) (b + c)
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
theorem comp_right_fderiv {f : F → G} {x : E} :
    fderiv 𝕜 (f ∘ iso) x = (fderiv 𝕜 f (iso x)).comp (iso : E →L[𝕜] F)
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma eventually_r_ge (C : ℝ) : ∀ᶠ (n : ℕ) in atTop, ∀ i, C ≤ r i n
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem bot_quotient_isMaximal_iff (I : Ideal R) : (⊥ : Ideal (R ⧸ I)).IsMaximal ↔ I.IsMaximal
-- Mathlib/Algebra/Star/StarAlgHom.lean
@[simp]
theorem refl_symm : (StarAlgEquiv.refl : A ≃⋆ₐ[R] A).symm = StarAlgEquiv.refl
-- Mathlib/Data/Rat/Lemmas.lean
protected theorem inv_neg (q : ℚ) : (-q)⁻¹ = -q⁻¹
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
theorem pow_dvd_of_le_of_pow_dvd {p m n k : Nat} (hmn : m ≤ n) (hdiv : p ^ n ∣ k) : p ^ m ∣ k
-- Mathlib/Order/Basic.lean
theorem max_def_lt (x y : α) : max x y = if x < y then y else x
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
protected theorem HasStrictFDerivAt.hasStrictDerivAt {f' : 𝕜 →L[𝕜] F} :
    HasStrictFDerivAt f f' x → HasStrictDerivAt f (f' 1) x
-- Mathlib/Topology/MetricSpace/Isometry.lean
@[simp]
theorem symm_symm (h : α ≃ᵢ β) : h.symm.symm = h
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
theorem HasDerivAtFilter.const_sub (c : F) (hf : HasDerivAtFilter f f' x L) :
    HasDerivAtFilter (fun x => c - f x) (-f') x L
-- Mathlib/Algebra/Homology/ShortComplex/QuasiIso.lean
lemma quasiIso_iff_isIso_homologyMap' (φ : S₁ ⟶ S₂)
    (h₁ : S₁.HomologyData) (h₂ : S₂.HomologyData) :
    QuasiIso φ ↔ IsIso (homologyMap' φ h₁ h₂)
-- Mathlib/Order/Interval/Multiset.lean
theorem Ico_filter_le_of_left_le [DecidablePred (c ≤ ·)] (hac : a ≤ c) :
    ((Ico a b).filter fun x => c ≤ x) = Ico c b
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- The braiding isomorphism is symmetric. -/
@[reassoc]
theorem biprod.symmetry (P Q : C) :
    (biprod.braiding P Q).hom ≫ (biprod.braiding Q P).hom = 𝟙 _
-- Mathlib/CategoryTheory/IsConnected.lean
theorem isPreconnected_of_isPreconnected_op [IsPreconnected Jᵒᵖ] : IsPreconnected J
-- Mathlib/CategoryTheory/GradedObject/Monoidal.lean
@[reassoc (attr := simp)]
lemma ιTensorObj₃_associator_inv
    [HasGoodTensor₁₂Tensor X₁ X₂ X₃] [HasGoodTensorTensor₂₃ X₁ X₂ X₃]
    (i₁ i₂ i₃ j : I) (h : i₁ + i₂ + i₃ = j) :
    ιTensorObj₃ X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ (associator X₁ X₂ X₃).inv j =
      (α_ _ _ _).inv ≫ ιTensorObj₃' X₁ X₂ X₃ i₁ i₂ i₃ j h
-- Mathlib/Data/Multiset/Powerset.lean
@[simp]
theorem mem_powersetCardAux {n} {l : List α} {s} : s ∈ powersetCardAux n l ↔ s ≤ ↑l ∧ card s = n
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
/-- As `x → 0`, `f x` decays faster than any power of `x`. -/
lemma hf_zero' (r : ℝ) : P.f =O[𝓝[>] 0] (· ^ r)
-- Mathlib/Algebra/Group/Submonoid/Basic.lean
@[to_additive (attr := simp)]
theorem coe_top : ((⊤ : Submonoid M) : Set M) = Set.univ
-- Mathlib/Algebra/Homology/HomotopyCategory/Shift.lean
lemma shiftFunctorAdd'_inv_app_f' (K : CochainComplex C ℤ) (a b ab : ℤ) (h : a + b = ab) (n : ℤ) :
    ((CategoryTheory.shiftFunctorAdd' (CochainComplex C ℤ) a b ab h).inv.app K).f n =
      (K.XIsoOfEq (by dsimp; rw [← h, add_assoc, add_comm a])).hom
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem finprod_curry₃ {γ : Type*} (f : α × β × γ → M) (h : (mulSupport f).Finite) :
    ∏ᶠ abc, f abc = ∏ᶠ (a) (b) (c), f (a, b, c)
-- Mathlib/CategoryTheory/Closed/Cartesian.lean
@[simp]
theorem uncurry_curry (f : A ⨯ X ⟶ Y) : uncurry (curry f) = f
-- Mathlib/Analysis/Convex/Function.lean
theorem convexOn_of_convex_epigraph (h : Convex 𝕜 { p : E × β | p.1 ∈ s ∧ f p.1 ≤ p.2 }) :
    ConvexOn 𝕜 s f
-- Mathlib/Analysis/BoxIntegral/Basic.lean
/-- **Henstock-Sacks inequality**. Let `r : ℝⁿ → (0, ∞)` be a function such that for any tagged
*partition* of `I` subordinate to `r`, the integral sum of `f` over this partition differs from the
integral of `f` by at most `ε`. Then for any tagged *prepartition* `π` subordinate to `r`, the
integral sum of `f` over this prepartition differs from the integral of `f` over the part of `I`
covered by `π` by at most `ε`.

The actual statement

- uses `BoxIntegral.Integrable.convergenceR` instead of a predicate assumption on `r`;
- uses `BoxIntegral.IntegrationParams.MemBaseSet` instead of “subordinate to `r`” to
  account for additional requirements like being a Henstock partition or having a bounded
  distortion;
- takes an extra argument `π₀ : prepartition I` and an assumption `π.Union = π₀.Union` instead of
  using `π.to_prepartition`.
-/
theorem dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq (h : Integrable I l f vol)
    (h0 : 0 < ε) (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) {π₀ : Prepartition I}
    (hU : π.iUnion = π₀.iUnion) :
    dist (integralSum f vol π) (∑ J ∈ π₀.boxes, integral J l f vol) ≤ ε
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem map_eq_cons' {f : α → β} {l : List α} :
    map f l = b :: l₂ ↔ ∃ a l₁, l = a :: l₁ ∧ f a = b ∧ map f l₁ = l₂
-- Mathlib/SetTheory/Game/Ordinal.lean
/-- The sum of ordinals as games corresponds to natural addition of ordinals. -/
theorem toPGame_add : ∀ a b : Ordinal.{u}, a.toPGame + b.toPGame ≈ (a ♯ b).toPGame
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
theorem foldl_eq_foldl_list (f : α → Fin n → α) (x) : foldl n f x = (list n).foldl f x
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
with the same Lipschitz constant `K`. Then it is continuous on `s × t`. Moreover, it suffices
to require continuity on vertical fibers for `a` from a subset `s' ⊆ s` that is dense in `s`.

The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
instead of continuity of `f` on subsets of the product space. -/
theorem continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
    [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s s' : Set α} {t : Set β}
    (hs' : s' ⊆ s) (hss' : s ⊆ closure s') (K : ℝ≥0)
    (ha : ∀ a ∈ s', ContinuousOn (fun y => f (a, y)) t)
    (hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t)
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
/-- To construct a groupoid, one may consider classes of partial homeomorphisms such that
both the function and its inverse have some property. If this property is stable under composition,
one gets a groupoid. `Pregroupoid` bundles the properties needed for this construction, with the
groupoid of smooth functions with smooth inverses as an application. -/
structure Pregroupoid (H : Type*) [TopologicalSpace H] where
  /-- Property describing membership in this groupoid: the pregroupoid "contains"
    all functions `H → H` having the pregroupoid property on some `s : Set H` -/
  property : (H → H) → Set H → Prop
  /-- The pregroupoid property is stable under composition -/
  comp : ∀ {f g u v}, property f u → property g v →
    IsOpen u → IsOpen v → IsOpen (u ∩ f ⁻¹' v) → property (g ∘ f) (u ∩ f ⁻¹' v)
  /-- Pregroupoids contain the identity map (on `univ`) -/
  id_mem : property id univ
  /-- The pregroupoid property is "local", in the sense that `f` has the pregroupoid property on `u`
  iff its restriction to each open subset of `u` has it -/
  locality :
    ∀ {f u}, IsOpen u → (∀ x ∈ u, ∃ v, IsOpen v ∧ x ∈ v ∧ property f (u ∩ v)) → property f u
  /-- If `f = g` on `u` and `property f u`, then `property g u` -/
  congr : ∀ {f g : H → H} {u}, IsOpen u → (∀ x ∈ u, g x = f x) → property f u → property g u
-- Mathlib/Data/List/Nodup.lean
theorem nodup_iff_injective_getElem {l : List α} :
    Nodup l ↔ Function.Injective (fun i : Fin l.length => l[i.1])
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem countP_True {s : Multiset α} : countP (fun _ => True) s = card s
-- Mathlib/Data/ENNReal/Real.lean
lemma ofReal_lt_ofReal_iff' {p q : ℝ} : ENNReal.ofReal p < .ofReal q ↔ p < q ∧ 0 < q
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
/-- `Matrix.toLin'` is a particular case of `Matrix.toLin`, for the standard basis
`Pi.basisFun R n`. -/
theorem Matrix.toLin_eq_toLin' : Matrix.toLin (Pi.basisFun R n) (Pi.basisFun R m) = Matrix.toLin'
-- Mathlib/Data/Set/Image.lean
theorem Injective.image_injective (hf : Injective f) : Injective (image f)
-- Mathlib/Data/Finset/Lattice.lean
theorem sup_himp_right (hs : s.Nonempty) (f : ι → α) (a : α) :
    (s.sup fun b => f b ⇨ a) = s.inf f ⇨ a
-- Mathlib/Analysis/Convex/Gauge.lean
theorem gauge_neg_set_neg (x : E) : gauge (-s) (-x) = gauge s x
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem get?_cons_succ : @get? α (a::l) (n+1) = get? l n
-- Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
theorem IsEquivalent.tendsto_nhds {c : β} (huv : u ~[l] v) (hu : Tendsto u l (𝓝 c)) :
    Tendsto v l (𝓝 c)
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
nonrec theorem SmoothAt.div_const (hf : SmoothAt I' I f x) :
    SmoothAt I' I (fun x ↦ f x / c) x
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Negating the second vector passed to `oangle` negates the sign of the angle. -/
@[simp]
theorem oangle_sign_neg_right (x y : V) : (o.oangle x (-y)).sign = -(o.oangle x y).sign
-- Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
theorem exists_measurableSet_of_ne [MeasurableSpace α] [SeparatesPoints α] {x y : α}
    (h : x ≠ y) : ∃ s, MeasurableSet s ∧ x ∈ s ∧ y ∉ s
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem card_ofNat (n : ℕ) [n.AtLeastTwo] :
    card.{u} (no_index (OfNat.ofNat n)) = OfNat.ofNat n
-- Mathlib/Order/Compare.lean
@[simp]
theorem cmp_self_eq_eq : cmp x x = Ordering.eq
-- Mathlib/NumberTheory/Divisors.lean
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d ∈ n.divisors, f (n / d)) = n.divisors.prod f
-- Mathlib/Topology/Order/IsLUB.lean
theorem exists_seq_strictMono_tendsto_nhdsWithin [DenselyOrdered α] [NoMinOrder α]
    [FirstCountableTopology α] (x : α) :
    ∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n < x) ∧ Tendsto u atTop (𝓝[<] x)
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
theorem isUnit_to_basicOpen_self (f : R) : IsUnit (toOpen R (PrimeSpectrum.basicOpen f) f)