ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
theorem isUnit_of_coeff_zero_ne_zero (x : 𝕎 k) (hx : x.coeff 0 ≠ 0) : IsUnit x
-- Mathlib/ModelTheory/Substructures.lean
@[simp]
theorem realize_formula_top {α : Type*} {φ : L.Formula α} {v : α → (⊤ : L.Substructure M)} :
    φ.Realize v ↔ φ.Realize (((↑) : (⊤ : L.Substructure M) → M) ∘ v)
-- Mathlib/Topology/FiberBundle/Basic.lean
/-- The projection on the base of a fiber bundle created from core is an open map -/
nonrec theorem isOpenMap_proj : IsOpenMap Z.proj
-- Mathlib/Analysis/Analytic/Composition.lean
/-- Only `0`-th coefficient of `q.comp p` depends on `q 0`. -/
theorem removeZero_comp_of_pos (q : FormalMultilinearSeries 𝕜 F G)
    (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (hn : 0 < n) :
    q.removeZero.comp p n = q.comp p n
-- Mathlib/SetTheory/Cardinal/Finite.lean
lemma card_eq_zero : Nat.card α = 0 ↔ IsEmpty α ∨ Infinite α
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop [Preorder β] {m : α → β} {f : Filter α} :
    Tendsto m f atTop ↔ ∀ b, ∀ᶠ a in f, b ≤ m a
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem coeFn_compLp (L : E →L[𝕜] F) (f : Lp E p μ) : ∀ᵐ a ∂μ, (L.compLp f) a = L (f a)
-- Mathlib/Topology/MetricSpace/Thickening.lean
theorem thickening_subset_interior_cthickening (δ : ℝ) (E : Set α) :
    thickening δ E ⊆ interior (cthickening δ E)
-- Mathlib/Algebra/Group/Even.lean
@[to_additive]
lemma isSquare_unop_iff {a : αᵐᵒᵖ} : IsSquare (unop a) ↔ IsSquare a
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[norm_cast]
theorem natCast_lt {m n : ℕ} : (m : Cardinal) < n ↔ m < n
-- Mathlib/Algebra/Lie/TraceForm.lean
@[simp] lemma traceForm_eq_zero_of_isNilpotent [IsReduced R] [IsNilpotent R L M] :
    traceForm R L M = 0
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
theorem mono_set {s t} (h : s ⊆ t) (ht : AEMeasurable f (μ.restrict t)) :
    AEMeasurable f (μ.restrict s)
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
@[reassoc]
theorem Cotrident.condition (j₁ j₂ : J) (t : Cotrident f) : f j₁ ≫ t.π = f j₂ ≫ t.π
-- Mathlib/Data/Finsupp/Basic.lean
theorem mapRange_multiset_sum (f : F) (m : Multiset (α →₀ M)) :
    mapRange f (map_zero f) m.sum = (m.map fun x => mapRange f (map_zero f) x).sum
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem symm_apply_apply (e : R ≃+* S) : ∀ x, e.symm (e x) = x
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
@[simp, reassoc]
theorem t_fst_fst (i j : 𝒰.J) : t 𝒰 f g i j ≫ pullback.fst _ _ ≫ pullback.fst _ _ =
    pullback.snd _ _
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp]
theorem top_smul : (⊤ : Ideal R) • N = N
-- Mathlib/CategoryTheory/SmallObject/Construction.lean
@[reassoc (attr := simp)]
lemma functorMap_π : functorMap f πX πY φ hφ ≫ πFunctorObj f πY = πFunctorObj f πX
-- Mathlib/Order/Lattice.lean
@[simp]
theorem lt_inf_iff : a < b ⊓ c ↔ a < b ∧ a < c
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiag'_smul {R : Type*} [Monoid R] [AddMonoid α] [DistribMulAction R α] (x : R)
    (M : Matrix (Σi, m' i) (Σi, n' i) α) : blockDiag' (x • M) = x • blockDiag' M
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_C_mul_X_le (a : R) : degree (C a * X) ≤ 1
-- Mathlib/Analysis/Convex/Between.lean
@[simp]
theorem AffineEquiv.wbtw_map_iff {x y z : P} (f : P ≃ᵃ[R] P') :
    Wbtw R (f x) (f y) (f z) ↔ Wbtw R x y z
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem newton_seq_succ_dist (n : ℕ) :
    ‖newton_seq (n + 1) - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
-- Mathlib/Order/Atoms.lean
theorem isCoatom_of_l_top [OrderTop α] [OrderTop β] {l : α → β} {u : β → α}
    (gi : GaloisCoinsertion l u) (hbot : l ⊤ = ⊤) {a : α} (hb : IsCoatom (l a)) : IsCoatom a
-- Mathlib/Data/Nat/Set.lean
theorem range_of_succ (f : ℕ → α) : {f 0} ∪ range (f ∘ succ) = range f
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem mem_coe_basicOpen (f : A) (x : ProjectiveSpectrum 𝒜) :
    x ∈ (↑(basicOpen 𝒜 f) : Set (ProjectiveSpectrum 𝒜)) ↔ f ∉ x.asHomogeneousIdeal
-- Mathlib/Data/Sym/Basic.lean
@[simp]
theorem mem_mk (a : α) (s : Multiset α) (h : Multiset.card s = n) : a ∈ mk s h ↔ a ∈ s
-- Mathlib/Data/Set/Lattice.lean
lemma iUnion_const (s : Set β) : ⋃ _ : ι, s = s
-- Mathlib/Data/Sum/Basic.lean
theorem elim_update_right [DecidableEq α] [DecidableEq β] (f : α → γ) (g : β → γ) (i : β) (c : γ) :
    Sum.elim f (Function.update g i c) = Function.update (Sum.elim f g) (inr i) c
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem forall₅_congr {p q : ∀ a b c d, ε a b c d → Prop}
    (h : ∀ a b c d e, p a b c d e ↔ q a b c d e) :
    (∀ a b c d e, p a b c d e) ↔ ∀ a b c d e, q a b c d e
-- Mathlib/Analysis/SumIntegralComparisons.lean
theorem AntitoneOn.integral_le_sum (hf : AntitoneOn f (Icc x₀ (x₀ + a))) :
    (∫ x in x₀..x₀ + a, f x) ≤ ∑ i ∈ Finset.range a, f (x₀ + i)
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
theorem HasDerivWithinAt.sum (h : ∀ i ∈ u, HasDerivWithinAt (A i) (A' i) s x) :
    HasDerivWithinAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) s x
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem eval₂_X_mul : eval₂ f x (X * p) = eval₂ f x p * x
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem Adapted.isStoppingTime_lowerCrossingTime (hf : Adapted ℱ f) :
    IsStoppingTime ℱ (lowerCrossingTime a b f N n)
-- Mathlib/CategoryTheory/Monoidal/NaturalTransformation.lean
@[simp]
theorem ofComponents.inv_app (app : ∀ X : C, F.obj X ≅ G.obj X) (naturality) (unit) (tensor) (X) :
    (ofComponents app naturality unit tensor).inv.app X = (app X).inv
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma monotone_smul_right_of_nonneg [SMulPosMono α β] (hb : 0 ≤ b) : Monotone ((· • b) : α → β)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem centralizer_toSubsemiring (s : Set R) :
    (centralizer s).toSubsemiring = Subsemiring.centralizer s
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
@[simp]
theorem ι_inj (x y : M) : ι R x = ι R y ↔ x = y
-- Mathlib/Data/Complex/Exponential.lean
theorem exp_injective : Function.Injective exp
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem pow_apply {k n : ℕ} : pow k n = if k = 0 ∧ n = 0 then 0 else n ^ k
-- Mathlib/Data/List/MinMax.lean
@[simp]
theorem foldr_min_of_ne_nil (h : l ≠ []) : ↑(l.foldr min ⊤) = l.minimum
-- Mathlib/Topology/Algebra/Module/LocallyConvex.lean
theorem locallyConvexSpace_iInf {ts' : ι → TopologicalSpace E}
    (h' : ∀ i, @LocallyConvexSpace 𝕜 E _ _ _ (ts' i)) :
    @LocallyConvexSpace 𝕜 E _ _ _ (⨅ i, ts' i)
-- Mathlib/Data/Matroid/Basic.lean
theorem exists_basis_disjoint_basis_of_subset (M : Matroid α) {X Y : Set α} (hXY : X ⊆ Y)
    (hY : Y ⊆ M.E := by aesop_mat) : ∃ I J, M.Basis I X ∧ M.Basis (I ∪ J) Y ∧ Disjoint X J
-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem suppPreservation_iff_uniform : q.SuppPreservation ↔ q.IsUniform
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[continuity]
theorem continuous_sin : Continuous sin
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
theorem ball_sub_ball (hε : 0 < ε) (hδ : 0 < δ) (a b : E) :
    ball a ε - ball b δ = ball (a - b) (ε + δ)
-- Mathlib/Data/Complex/BigOperators.lean
@[simp, norm_cast]
theorem ofReal_prod (f : α → ℝ) : ((∏ i ∈ s, f i : ℝ) : ℂ) = ∏ i ∈ s, (f i : ℂ)
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma HomologyData.exact_iff' (h : S.HomologyData) :
    S.Exact ↔ IsZero h.right.H
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem Real.closedBall_eq_Icc {x r : ℝ} : closedBall x r = Icc (x - r) (x + r)
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Ici_inter_Ici {a b : α} : Ici a ∩ Ici b = Ici (a ⊔ b)
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem cast_bit1 [Semiring α] (n : Num) : (n.bit1 : α) = 2 * (n : α) + 1
-- Mathlib/Order/Booleanisation.lean
@[simp] lemma compl_lift (a : α) : (lift a)ᶜ = comp a
-- Mathlib/FieldTheory/Minpoly/Basic.lean
theorem map_ne_one [Nontrivial B] {R : Type*} [Semiring R] [Nontrivial R] (f : A →+* R) :
    (minpoly A x).map f ≠ 1
-- Mathlib/Topology/Instances/ENNReal.lean
theorem diam_Ioo {a b : ℝ} (h : a ≤ b) : Metric.diam (Ioo a b) = b - a
-- Mathlib/Order/Interval/Set/Pi.lean
theorem image_update_Icc_right (f : ∀ i, α i) (i : ι) (b : α i) :
    update f i '' Icc (f i) b = Icc f (update f i b)
-- Mathlib/Topology/ShrinkingLemma.lean
/-- If two partial refinements `v₁`, `v₂` belong to a chain (hence, they are comparable)
and `i` belongs to the carriers of both partial refinements, then `v₁ i = v₂ i`. -/
theorem apply_eq_of_chain {c : Set (PartialRefinement u s)} (hc : IsChain (· ≤ ·) c) {v₁ v₂}
    (h₁ : v₁ ∈ c) (h₂ : v₂ ∈ c) {i} (hi₁ : i ∈ v₁.carrier) (hi₂ : i ∈ v₂.carrier) :
    v₁ i = v₂ i
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
/-- Let `M` be a smooth σ-compact manifold with extended distance. Let `K : ι → Set M` be a locally
finite family of closed sets, let `U : ι → Set M` be a family of open sets such that `K i ⊆ U i` for
all `i`. Then there exists a positive smooth function `δ : M → ℝ≥0` such that for any `i` and
`x ∈ K i`, we have `EMetric.closedBall x (δ x) ⊆ U i`. -/
theorem Emetric.exists_smooth_forall_closedBall_subset {M} [EMetricSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] [SigmaCompactSpace M] {K : ι → Set M} {U : ι → Set M}
    (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i)
    (hfin : LocallyFinite K) :
    ∃ δ : C^∞⟮I, M; 𝓘(ℝ, ℝ), ℝ⟯,
      (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, EMetric.closedBall x (ENNReal.ofReal (δ x)) ⊆ U i
-- Mathlib/NumberTheory/SumTwoSquares.lean
/-- A natural number `n` is a sum of two squares if and only if `n = a^2 * b` with natural
numbers `a` and `b` such that `-1` is a square modulo `b`. -/
theorem Nat.eq_sq_add_sq_iff_eq_sq_mul {n : ℕ} :
    (∃ x y : ℕ, n = x ^ 2 + y ^ 2) ↔ ∃ a b : ℕ, n = a ^ 2 * b ∧ IsSquare (-1 : ZMod b)
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem mul_smul_left {i : Int} {xs ys : IntList} : (i * xs) * ys = i * (xs * ys)
-- Mathlib/Analysis/Normed/Field/Basic.lean
/-- A mixin class with the axiom `‖1‖ = 1`. Many `NormedRing`s and all `NormedField`s satisfy this
axiom. -/
class NormOneClass (α : Type*) [Norm α] [One α] : Prop where
  /-- The norm of the multiplicative identity is 1. -/
  norm_one : ‖(1 : α)‖ = 1
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
theorem midpoint_eq_midpoint_iff_vsub_eq_vsub {x x' y y' : P} :
    midpoint R x y = midpoint R x' y' ↔ x -ᵥ x' = y' -ᵥ y
-- Mathlib/Combinatorics/Enumerative/Partition.lean
@[simp] lemma partition_one_parts (p : Partition 1) : p.parts = {1}
-- Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean
theorem diagonal_pullback_fst {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    diagonal (pullback.fst f g) =
      (pullbackSymmetry _ _).hom ≫
        ((Over.pullback f).map
              (Over.homMk (diagonal g) : Over.mk g ⟶ Over.mk (pullback.snd _ _ ≫ g))).left ≫
          (diagonalObjPullbackFstIso f g).inv
-- Mathlib/GroupTheory/PGroup.lean
theorem nontrivial_iff_card [Finite G] : Nontrivial G ↔ ∃ n > 0, Nat.card G = p ^ n
-- Mathlib/NumberTheory/Padics/PadicVal.lean
/-- The `p`-adic value of an integer `z ≠ 0` is its `p`-adic value as a rational. -/
@[simp]
theorem of_nat {n : ℕ} : padicValRat p n = padicValNat p n
-- Mathlib/Analysis/SpecialFunctions/ContinuousFunctionalCalculus/ExpLog.lean
@[simp] lemma log_one : log (1 : A) = 0
-- Mathlib/RingTheory/MvPowerSeries/Basic.lean
theorem coeff_X_pow [DecidableEq σ] (m : σ →₀ ℕ) (s : σ) (n : ℕ) :
    coeff R m ((X s : MvPowerSeries σ R) ^ n) = if m = single s n then 1 else 0
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem map_comap_le (f : P₁ →ᵃ[k] P₂) (s : AffineSubspace k P₂) : (s.comap f).map f ≤ s
-- Mathlib/Data/Rel.lean
theorem preimage_comp (s : Rel β γ) (t : Set γ) :
    preimage (r • s) t = preimage r (preimage s t)
-- Mathlib/Topology/Compactness/Compact.lean
theorem IsCompact.finite_of_discrete [DiscreteTopology X] (hs : IsCompact s) : s.Finite
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem range_val (n : ℕ) : (range n).1 = Multiset.range n
-- Mathlib/LinearAlgebra/Dimension/Finrank.lean
theorem finrank_lt_of_rank_lt {n : ℕ} (h : Module.rank R M < ↑n) : finrank R M < n
-- Mathlib/Order/Filter/AtTopBot.lean
theorem Frequently.forall_exists_of_atBot [SemilatticeInf α] [Nonempty α] {p : α → Prop}
    (h : ∃ᶠ x in atBot, p x) : ∀ a, ∃ b ≤ a, p b
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem div_nonpos_iff : a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem beth_le {o₁ o₂ : Ordinal} : beth o₁ ≤ beth o₂ ↔ o₁ ≤ o₂
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem comap_coe_eq_uniformity :
    ((𝓤 _).comap fun p : α × α => ((p.1 : Completion α), (p.2 : Completion α))) = 𝓤 α
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
@[simp]
theorem μ_hom_inv_id (X Y : C) : F.μ X Y ≫ (F.μIso X Y).inv = 𝟙 _
-- Mathlib/RingTheory/DedekindDomain/SelmerGroup.lean
@[simp]
theorem valuation_of_unit_mod_eq (n : ℕ) (x : Rˣ) :
    v.valuationOfNeZeroMod n (Units.map (algebraMap R K : R →* K) x : K/n) = 1
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
@[simp] theorem forall_eq_or_imp : (∀ a, a = a' ∨ q a → p a) ↔ p a' ∧ ∀ a, q a → p a
-- Mathlib/RingTheory/Congruence/Basic.lean
@[simp, norm_cast]
theorem coe_bot : ⇑(⊥ : RingCon R) = Eq
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Defs.lean
/-- `IsIntegralClosure A R B` is the characteristic predicate stating `A` is
the integral closure of `R` in `B`,
i.e. that an element of `B` is integral over `R` iff it is an element of (the image of) `A`.
-/
class IsIntegralClosure (A R B : Type*) [CommRing R] [CommSemiring A] [CommRing B] [Algebra R B]
  [Algebra A B] : Prop where
  algebraMap_injective' : Function.Injective (algebraMap A B)
  isIntegral_iff : ∀ {x : B}, IsIntegral R x ↔ ∃ y, algebraMap A B y = x
-- Mathlib/Order/Monotone/Monovary.lean
theorem antivaryOn_const_left (g : ι → β) (a : α) (s : Set ι) : AntivaryOn (const ι a) g s
-- Mathlib/LinearAlgebra/Finsupp.lean
theorem lmapDomain_total (f : α → α') (g : M →ₗ[R] M') (h : ∀ i, g (v i) = v' (f i)) :
    (Finsupp.total α' M' R v').comp (lmapDomain R R f) = g.comp (Finsupp.total α M R v)
-- .lake/packages/batteries/Batteries/Data/UInt.lean
@[simp] theorem UInt16.toUInt32_toNat (x : UInt16) : x.toUInt32.toNat = x.toNat
-- Mathlib/Topology/MetricSpace/Dilation.lean
@[simp]
theorem coe_one : ⇑(1 : α →ᵈ α) = id
-- Mathlib/Algebra/Order/Monovary.lean
@[simp]
lemma monovaryOn_inv_right₀ (hg : ∀ i ∈ s, 0 < g i) : MonovaryOn f g⁻¹ s ↔ AntivaryOn f g s
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoDiv_add_left' (a b : α) : toIcoDiv hp (p + a) b = toIcoDiv hp a b - 1
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp] theorem coe_map : (N.map f : Set M') = f '' N
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
@[simp]
theorem Matrix.toLin_one : Matrix.toLin v₁ v₁ 1 = LinearMap.id
-- Mathlib/Analysis/Analytic/Basic.lean
/-- Power series terms are analytic as we vary the origin -/
theorem analyticAt_changeOrigin (p : FormalMultilinearSeries 𝕜 E F) (rp : p.radius > 0) (n : ℕ) :
    AnalyticAt 𝕜 (fun x ↦ p.changeOrigin x n) 0
-- Mathlib/Algebra/RingQuot.lean
/-- Any ring homomorphism `f : R →+* T` which respects a relation `r : R → R → Prop`
factors uniquely through a morphism `RingQuot r →+* T`.
-/
irreducible_def lift {r : R → R → Prop} :
  { f : R →+* T // ∀ ⦃x y⦄, r x y → f x = f y } ≃ (RingQuot r →+* T)
-- Mathlib/Logic/Equiv/TransferInstance.lean
@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
    letI := Equiv.mul e
    (mulEquiv e).symm b = e.symm b
-- Mathlib/Analysis/SpecialFunctions/Stirling.lean
/-- **Stirling's Formula**, formulated in terms of `Asymptotics.IsEquivalent`. -/
lemma factorial_isEquivalent_stirling :
    (fun n ↦ n ! : ℕ → ℝ) ~[atTop] fun n ↦ Real.sqrt (2 * n * π) * (n / exp 1) ^ n
-- Mathlib/MeasureTheory/Integral/Bochner.lean
/-- Monotone convergence theorem for real-valued functions and Bochner integrals -/
lemma integral_tendsto_of_tendsto_of_monotone {μ : Measure α} {f : ℕ → α → ℝ} {F : α → ℝ}
    (hf : ∀ n, Integrable (f n) μ) (hF : Integrable F μ) (h_mono : ∀ᵐ x ∂μ, Monotone fun n ↦ f n x)
    (h_tendsto : ∀ᵐ x ∂μ, Tendsto (fun n ↦ f n x) atTop (𝓝 (F x))) :
    Tendsto (fun n ↦ ∫ x, f n x ∂μ) atTop (𝓝 (∫ x, F x ∂μ))
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem map_empty (f : α ↪ β) : (∅ : Finset α).map f = ∅
-- Mathlib/Data/Finset/Lattice.lean
theorem sup'_product_left {t : Finset γ} (h : (s ×ˢ t).Nonempty) (f : β × γ → α) :
    (s ×ˢ t).sup' h f = s.sup' h.fst fun i => t.sup' h.snd fun i' => f ⟨i, i'⟩
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- The image of an open set under a continuous map is analytic. -/
theorem _root_.IsOpen.analyticSet_image {β : Type*} [TopologicalSpace β] [PolishSpace β]
    {s : Set β} (hs : IsOpen s) {f : β → α} (f_cont : Continuous f) : AnalyticSet (f '' s)
-- Mathlib/Data/Finmap.lean
theorem mem_iff {a : α} {s : Finmap β} : a ∈ s ↔ ∃ b, s.lookup a = some b
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval₂_map [Semiring T] (g : S →+* T) (x : T) :
    (p.map f).eval₂ g x = p.eval₂ (g.comp f) x
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem of_eq : ∀ s,
    s.str.1 = l ++ m ++ r →
    s.startPos.1 = utf8Len l →
    s.stopPos.1 = utf8Len l + utf8Len m →
    ValidFor l m r s
-- Mathlib/Topology/IsLocalHomeomorph.lean
theorem isLocalHomeomorph_iff_openEmbedding_restrict {f : X → Y} :
    IsLocalHomeomorph f ↔ ∀ x : X, ∃ U ∈ 𝓝 x, OpenEmbedding (U.restrict f)
-- Mathlib/Data/Int/Lemmas.lean
theorem natAbs_lt_iff_sq_lt {a b : ℤ} : a.natAbs < b.natAbs ↔ a ^ 2 < b ^ 2
-- Mathlib/Topology/Connected/LocallyConnected.lean
theorem isClopen_connectedComponent [LocallyConnectedSpace α] {x : α} :
    IsClopen (connectedComponent x)
-- Mathlib/Topology/Homeomorph.lean
lemma toHomeomorph_apply (e : X ≃ Y) (he) (x : X) : e.toHomeomorph he x = e x
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem sup_le_lsub {ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} f ≤ lsub.{_, v} f
-- Mathlib/CategoryTheory/DiscreteCategory.lean
/-- For functors out of a discrete category,
a natural transformation is just a collection of maps,
as the naturality squares are trivial.
-/
@[simps]
def natTrans {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ⟶ G.obj i) :
    F ⟶ G
-- Mathlib/Algebra/Homology/Homotopy.lean
/-- Homotopy to zero for maps constructed with `nullHomotopicMap'` -/
@[simps!]
def nullHomotopy' (h : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) : Homotopy (nullHomotopicMap' h) 0
-- Mathlib/Data/Finset/Basic.lean
theorem Subset.antisymm {s₁ s₂ : Finset α} (H₁ : s₁ ⊆ s₂) (H₂ : s₂ ⊆ s₁) : s₁ = s₂
-- Mathlib/Topology/Compactness/Compact.lean
@[deprecated mem_coclosedCompact_iff (since := "2024-02-16")]
theorem mem_coclosed_compact' : s ∈ coclosedCompact X ↔ ∃ t, IsClosed t ∧ IsCompact t ∧ sᶜ ⊆ t
-- Mathlib/Deprecated/Subfield.lean
theorem closure.isSubfield : IsSubfield (closure S)
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
theorem AffineEquiv.pointReflection_midpoint_right (x y : P) :
    pointReflection R (midpoint R x y) y = x
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem splits_prod {ι : Type u} {s : ι → K[X]} {t : Finset ι} :
    (∀ j ∈ t, (s j).Splits i) → (∏ x ∈ t, s x).Splits i
-- Mathlib/Analysis/Normed/Group/Tannery.lean
/-- **Tannery's theorem**: topological sums commute with termwise limits, when the norms of the
summands are eventually uniformly bounded by a summable function.

(This is the special case of the Lebesgue dominated convergence theorem for the counting measure
on a discrete set. However, we prove it under somewhat weaker assumptions than the general
measure-theoretic result, e.g. `G` is not assumed to be an `ℝ`-vector space or second countable,
and the limit is along an arbitrary filter rather than `atTop ℕ`.)

See also:
* `MeasureTheory.tendsto_integral_of_dominated_convergence` (for general integrals, but
  with more assumptions on `G`)
* `continuous_tsum` (continuity of infinite sums in a parameter)
-/
lemma tendsto_tsum_of_dominated_convergence {α β G : Type*} {𝓕 : Filter α}
    [NormedAddCommGroup G] [CompleteSpace G]
    {f : α → β → G} {g : β → G} {bound : β → ℝ} (h_sum : Summable bound)
    (hab : ∀ k : β, Tendsto (f · k) 𝓕 (𝓝 (g k)))
    (h_bound : ∀ᶠ n in 𝓕, ∀ k, ‖f n k‖ ≤ bound k) :
    Tendsto (∑' k, f · k) 𝓕 (𝓝 (∑' k, g k))
-- Mathlib/Order/Interval/Set/OrdConnected.lean
@[instance]
theorem ordConnected_Ioo {a b : α} : OrdConnected (Ioo a b)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
protected theorem mul_div_mul_right {m : Nat} (n k : Nat) (H : 0 < m) :
    n * m / (k * m) = n / k
-- .lake/packages/batteries/Batteries/Classes/SatisfiesM.lean
/-- `SatisfiesM` distributes over `<*`, general version. -/
protected theorem seqLeft [Applicative m] [LawfulApplicative m] {x : m α}
    (hx : SatisfiesM p₁ x) (hy : SatisfiesM p₂ y)
    (H : ∀ {a b}, p₁ a → p₂ b → q a) : SatisfiesM q (x <* y)
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
lemma coe_toLinearMap_mul {e₁ e₂ : M ≃ₗ[R] M} :
    (↑(e₁ * e₂) : M →ₗ[R] M) = (e₁ : M →ₗ[R] M) * (e₂ : M →ₗ[R] M)
-- Mathlib/NumberTheory/EulerProduct/Basic.lean
/-- A version of `EulerProduct.summable_and_hasSum_factoredNumbers_prod_filter_prime_geometric`
in terms of the value of the series. -/
lemma prod_filter_prime_geometric_eq_tsum_factoredNumbers {f : ℕ →* F} (hsum : Summable f)
    (s : Finset ℕ) :
    ∏ p ∈ s.filter Nat.Prime, (1 - f p)⁻¹ = ∑' m : factoredNumbers s, f m
-- Mathlib/Algebra/Order/Floor.lean
theorem floor_add_one (ha : 0 ≤ a) : ⌊a + 1⌋₊ = ⌊a⌋₊ + 1
-- Mathlib/Topology/ContinuousFunction/Algebra.lean
/-- Composition on the left by a (continuous) homomorphism of topological `R`-algebras, as an
`AlgHom`. Similar to `AlgHom.compLeft`. -/
@[simps!]
protected def AlgHom.compLeftContinuous {α : Type*} [TopologicalSpace α] (g : A →ₐ[R] A₂)
    (hg : Continuous g) : C(α, A) →ₐ[R] C(α, A₂)
-- Mathlib/FieldTheory/Normal.lean
@[simp]
theorem AlgHom.restrict_liftNormal (ϕ : K₁ →ₐ[F] K₁) [Normal F K₁] [Normal F E] :
    (ϕ.liftNormal E).restrictNormal K₁ = ϕ
-- Mathlib/Tactic/CC/Lemmas.lean
theorem or_eq_of_eq_true_left {a b : Prop} (h : a = True) : (a ∨ b) = True
-- Mathlib/Data/List/Basic.lean
theorem zipLeft_cons_nil :
    zipLeft (a :: as) ([] : List β) = (a, none) :: as.map fun a => (a, none)
-- Mathlib/Order/Filter/AtTopBot.lean
theorem disjoint_atTop_atBot [PartialOrder α] [Nontrivial α] : Disjoint (atTop : Filter α) atBot
-- Mathlib/Order/Hom/Lattice.lean
theorem IsCompl.map (h : IsCompl a b) : IsCompl (f a) (f b)
-- Mathlib/Algebra/Ring/Subsemiring/Pointwise.lean
@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : M} {S T : Subsemiring R} :
    a • S ≤ a • T ↔ S ≤ T
-- Mathlib/CategoryTheory/GlueData.lean
@[simp]
theorem diagramIso_hom_app_left (i : D.J × D.J) :
    (D.diagramIso F).hom.app (WalkingMultispan.left i) = 𝟙 _
-- Mathlib/Computability/TuringMachine.lean
theorem tr_respects :
    Respects (TM1.step M) (TM0.step (tr M)) fun (c₁ : Cfg₁) (c₂ : Cfg₁₀) ↦ trCfg M c₁ = c₂
-- Mathlib/Data/List/Sublists.lean
@[simp]
theorem sublists_concat (l : List α) (a : α) :
    sublists (l ++ [a]) = sublists l ++ map (fun x => x ++ [a]) (sublists l)
-- Mathlib/Order/Heyting/Basic.lean
/-- A generalized co-Heyting algebra is a lattice with an additional binary
difference operation `\` such that `\ a` is right adjoint to `⊔ a`.

This generalizes `CoheytingAlgebra` by not requiring a top element. -/
class GeneralizedCoheytingAlgebra (α : Type*) extends Lattice α, OrderBot α, SDiff α where
  /-- `\ a` is right adjoint to `⊔ a` -/
  sdiff_le_iff (a b c : α) : a \ b ≤ c ↔ a ≤ b ⊔ c
-- Mathlib/Probability/Kernel/RadonNikodym.lean
lemma singularPart_compl_mutuallySingularSetSlice (κ η : Kernel α γ) [IsSFiniteKernel κ]
    [IsSFiniteKernel η] (a : α) :
    singularPart κ η a (mutuallySingularSetSlice κ η a)ᶜ = 0
-- Mathlib/RingTheory/Ideal/Norm.lean
@[simp]
theorem spanNorm_bot [Nontrivial S] [Module.Free R S] [Module.Finite R S] :
    spanNorm R (⊥ : Ideal S) = ⊥
-- Mathlib/Combinatorics/Quiver/Cast.lean
theorem Path.cast_eq_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (p : Path u v)
    (p' : Path u' v') : p.cast hu hv = p' ↔ HEq p p'
-- Mathlib/Data/Finset/Density.lean
@[simp] lemma dens_pos : 0 < dens s ↔ s.Nonempty