ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Sigma/Interval.lean
@[simp]
theorem Ioo_mk_mk : Ioo (⟨i, a⟩ : Sigma α) ⟨i, b⟩ = (Ioo a b).map (Embedding.sigmaMk i)
-- Mathlib/Data/Ordmap/Ordset.lean
@[simp]
theorem merge_nil_right (t : Ordnode α) : merge nil t = t
-- Mathlib/Algebra/Polynomial/Module/Basic.lean
/-- `comp p q` is the composition of `p : R[X]` and `q : M[X]` as `q(p(x))`.  -/
@[simps!]
noncomputable def comp (p : R[X]) : PolynomialModule R M →ₗ[R] PolynomialModule R M
-- Mathlib/Algebra/Polynomial/Coeff.lean
theorem support_binomial {k m : ℕ} (hkm : k ≠ m) {x y : R} (hx : x ≠ 0) (hy : y ≠ 0) :
    support (C x * X ^ k + C y * X ^ m) = {k, m}
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma algebraMap_le_of_le_spectrum {r : R} {a : A} (h : ∀ x ∈ spectrum R a, r ≤ x)
    (ha : p a := by cfc_tac) : algebraMap R A r ≤ a
-- Mathlib/Algebra/Algebra/Operations.lean
@[simp]
theorem mul_bot : M * ⊥ = ⊥
-- Mathlib/Data/ENNReal/Real.lean
theorem toReal_max (hr : a ≠ ∞) (hp : b ≠ ∞) :
    ENNReal.toReal (max a b) = max (ENNReal.toReal a) (ENNReal.toReal b)
-- Mathlib/Algebra/MonoidAlgebra/Division.lean
@[simp]
theorem modOf_apply_of_exists_add (x : k[G]) (g : G) (g' : G)
    (h : ∃ d, g' = g + d) : (x %ᵒᶠ g) g' = 0
-- Mathlib/Probability/Independence/Basic.lean
lemma IndepFun_iff {β γ} [mβ : MeasurableSpace β] [mγ : MeasurableSpace γ]
    (f : Ω → β) (g : Ω → γ) (μ : Measure Ω) :
    IndepFun f g μ ↔ ∀ t1 t2, MeasurableSet[MeasurableSpace.comap f mβ] t1
      → MeasurableSet[MeasurableSpace.comap g mγ] t2 → μ (t1 ∩ t2) = μ t1 * μ t2
-- Mathlib/RingTheory/OreLocalization/Basic.lean
@[to_additive (attr := simp)]
protected theorem div_eq_one {s : S} : (s : R) /ₒ s = 1
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem mem_span_singleton {x y : α} : x ∈ span ({y} : Set α) ↔ y ∣ x
-- Mathlib/Topology/ContinuousFunction/ZeroAtInfty.lean
theorem neg_apply : (-f) x = -f x
-- Mathlib/Topology/MetricSpace/Closeds.lean
/-- Subsets of a given closed subset form a closed set -/
theorem isClosed_subsets_of_isClosed (hs : IsClosed s) :
    IsClosed { t : Closeds α | (t : Set α) ⊆ s }
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- A side of a right-angled triangle divided by the tangent of the opposite angle equals the
adjacent side, version subtracting vectors. -/
theorem norm_div_tan_angle_sub_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
    ‖y‖ / Real.tan (angle x (x - y)) = ‖x‖
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem ae_eq_trim_iff_of_aeStronglyMeasurable' {α β} [TopologicalSpace β] [MetrizableSpace β]
    {m m0 : MeasurableSpace α} {μ : Measure α} {f g : α → β} (hm : m ≤ m0)
    (hfm : AEStronglyMeasurable' m f μ) (hgm : AEStronglyMeasurable' m g μ) :
    hfm.mk f =ᵐ[μ.trim hm] hgm.mk g ↔ f =ᵐ[μ] g
-- Mathlib/Combinatorics/Additive/Dissociation.lean
@[to_additive (attr := simp)]
lemma not_mulDissociated :
    ¬ MulDissociated s ↔
      ∃ t : Finset α, ↑t ⊆ s ∧ ∃ u : Finset α, ↑u ⊆ s ∧ t ≠ u ∧ ∏ x in t, x = ∏ x in u, x
-- Mathlib/Topology/Bases.lean
theorem IsTopologicalBasis.iInf_induced {β : Type*} {ι : Type*} {X : ι → Type*}
    [t : Π i, TopologicalSpace (X i)] {T : Π i, Set (Set (X i))}
    (cond : ∀ i, IsTopologicalBasis (T i)) (f : Π i, β → X i) :
    IsTopologicalBasis (t := ⨅ i, induced (f i) (t i))
      { S | ∃ (U : ∀ i, Set (X i)) (F : Finset ι),
        (∀ i, i ∈ F → U i ∈ T i) ∧ S = ⋂ (i) (_ : i ∈ F), f i ⁻¹' U i }
-- Mathlib/Order/Monotone/Basic.lean
/-- A function between linear orders which is neither monotone nor antitone makes a dent upright or
downright. -/
lemma not_monotone_not_antitone_iff_exists_lt_lt :
    ¬ Monotone f ∧ ¬ Antitone f ↔ ∃ a b c, a < b ∧ b < c ∧
    (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `F` is of exponential characteristic `q`, then `F⟮x⟯ / F` is a purely inseparable extension
if and only if `x ^ (q ^ n)` is contained in `F` for some `n : ℕ`. -/
theorem isPurelyInseparable_adjoin_simple_iff_pow_mem (q : ℕ) [hF : ExpChar F q] {x : E} :
    IsPurelyInseparable F F⟮x⟯ ↔ ∃ n : ℕ, x ^ q ^ n ∈ (algebraMap F E).range
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem irreducible_of_normalized_factor {a : α} :
    ∀ x : α, x ∈ normalizedFactors a → Irreducible x
-- Mathlib/Data/Multiset/Bind.lean
theorem le_bind {α β : Type*} {f : α → Multiset β} (S : Multiset α) {x : α} (hx : x ∈ S) :
    f x ≤ S.bind f
-- Mathlib/Algebra/Polynomial/Taylor.lean
@[simp]
theorem taylor_X : taylor r X = X + C r
-- Mathlib/Algebra/Algebra/Subalgebra/Directed.lean
theorem coe_iSup_of_directed (dir : Directed (· ≤ ·) K) : ↑(iSup K) = ⋃ i, (K i : Set A)
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem ContinuousLinearMap.contMDiffWithinAt (L : E →L[𝕜] F) {s x} :
    ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, F) n L s x
-- Mathlib/Data/List/Forall2.lean
theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
-- Mathlib/Data/Fin/Basic.lean
lemma succAbove_eq_zero_iff [NeZero n] {a : Fin (n + 1)} {b : Fin n} (ha : a ≠ 0) :
    a.succAbove b = 0 ↔ b = 0
-- Mathlib/Data/Nat/Bits.lean
lemma mod_two_of_bodd (n : ℕ) : n % 2 = cond (bodd n) 1 0
-- Mathlib/Order/Lattice.lean
theorem of_map_sup [SemilatticeSup α] [SemilatticeSup β]
    (h : ∀ x ∈ s, ∀ y ∈ s, f (x ⊔ y) = f x ⊔ f y) : MonotoneOn f s
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem isAdjointPair_inner (A : E →ₗ[𝕜] F) :
    IsAdjointPair (sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜) (sesqFormOfInner : F →ₗ[𝕜] F →ₗ⋆[𝕜] 𝕜) A
      (LinearMap.adjoint A)
-- Mathlib/Order/Bounds/Basic.lean
theorem image2_upperBounds_lowerBounds_subset_lowerBounds_image2 :
    image2 f (upperBounds s) (lowerBounds t) ⊆ lowerBounds (image2 f s t)
-- Mathlib/Data/Complex/Module.lean
lemma Complex.coe_realPart (z : ℂ) : (ℜ z : ℂ) = z.re
-- Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
theorem pullbackIsoProdSubtype_inv_fst_apply (f : X ⟶ Z) (g : Y ⟶ Z)
    (x : { p : X × Y // f p.1 = g p.2 }) :
    pullback.fst f g ((pullbackIsoProdSubtype f g).inv x) = (x : X × Y).fst
-- Mathlib/Analysis/Normed/Group/Int.lean
theorem _root_.NNReal.natCast_natAbs (n : ℤ) : (n.natAbs : ℝ≥0) = ‖n‖₊
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
theorem norm_lt_one_add {z1 z2 : ℤ_[p]} (hz1 : ‖z1‖ < 1) (hz2 : ‖z2‖ < 1) : ‖z1 + z2‖ < 1
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
lemma mul_mul_conjTranspose_same {A : Matrix n n R} (hA : PosSemidef A)
    {m : Type*} [Fintype m] (B : Matrix m n R) :
    PosSemidef (B * A * Bᴴ)
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive (attr := simp) negPart_pos] lemma one_lt_ltOnePart (ha : a < 1) : 1 < a⁻ᵐ
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
theorem midpoint_eq_iff {x y z : P} : midpoint R x y = z ↔ pointReflection R z x = y
-- Mathlib/Data/Part.lean
@[simp]
theorem mem_mk_iff {p : Prop} {o : p → α} {a : α} : a ∈ Part.mk p o ↔ ∃ h, o h = a
-- Mathlib/Algebra/Order/Nonneg/Field.lean
@[simp]
theorem mk_div_mk (hx : 0 ≤ x) (hy : 0 ≤ y) :
    (⟨x, hx⟩ : { x : α // 0 ≤ x }) / ⟨y, hy⟩ = ⟨x / y, div_nonneg hx hy⟩
-- Mathlib/NumberTheory/Harmonic/Defs.lean
lemma harmonic_pos {n : ℕ} (Hn : n ≠ 0) : 0 < harmonic n
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- If `Y` is a zero object, `X ≅ X ⊞ Y` for any `X`. -/
@[simps!]
def isoBiprodZero {X Y : C} [HasBinaryBiproduct X Y] (hY : IsZero Y) : X ≅ X ⊞ Y
-- Mathlib/Tactic/Ring/Basic.lean
theorem pow_congr {b b' : ℕ} (_ : a = a') (_ : b = b')
    (_ : a' ^ b' = c) : (a ^ b : R) = c
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem lcm_eq_of_associated_right [NormalizedGCDMonoid α] {m n : α} (h : Associated m n) (k : α) :
    lcm k m = lcm k n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem fderivWithin_csinh (hf : DifferentiableWithinAt ℂ f s x) (hxs : UniqueDiffWithinAt ℂ s x) :
    fderivWithin ℂ (fun x => Complex.sinh (f x)) s x = Complex.cosh (f x) • fderivWithin ℂ f s x
-- Mathlib/AlgebraicGeometry/Limits.lean
/-- The map from the empty scheme. -/
@[simps]
def Scheme.emptyTo (X : Scheme.{u}) : ∅ ⟶ X
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem sup_not_succ_of_ne_sup {ι : Type u} {f : ι → Ordinal.{max u v}}
    (hf : ∀ i, f i ≠ sup.{_, v} f) {a} (hao : a < sup.{_, v} f) : succ a < sup.{_, v} f
-- Mathlib/Algebra/Algebra/Defs.lean
@[norm_cast]
theorem coe_natCast (a : ℕ) : (↑(a : R) : A) = a
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem IsPrime.mem_or_mem_of_mul_eq_zero {I : Ideal α} (hI : I.IsPrime) {x y : α} (h : x * y = 0) :
    x ∈ I ∨ y ∈ I
-- Mathlib/RingTheory/Generators.lean
/-- The composition of two homs. -/
@[simps]
noncomputable def Hom.comp (f : Hom P' P'') (g : Hom P P') : Hom P P''
-- Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
@[simp]
theorem toAffineEquiv_refl : (refl k P₁).toAffineEquiv = AffineEquiv.refl k P₁
-- Mathlib/Topology/Compactness/Compact.lean
theorem IsClosed.isCompact [CompactSpace X] (h : IsClosed s) : IsCompact s
-- Mathlib/Order/CompleteLattice.lean
theorem sSup_inter_le {s t : Set α} : sSup (s ∩ t) ≤ sSup s ⊓ sSup t
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
/-- In a finite-dimensional space, if linear maps are inverse to each other on one side then they
are also inverse to each other on the other side. -/
theorem mul_eq_one_of_mul_eq_one [FiniteDimensional K V] {f g : V →ₗ[K] V} (hfg : f * g = 1) :
    g * f = 1
-- Mathlib/CategoryTheory/Adjunction/Evaluation.lean
/-- The adjunction showing that evaluation is a right adjoint. -/
@[simps! unit_app counit_app_app]
def evaluationAdjunctionRight (c : C) : evaluationLeftAdjoint D c ⊣ (evaluation _ _).obj c
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigO_const_mul_left_iff {f : α → 𝕜} {c : 𝕜} (hc : c ≠ 0) :
    (fun x => c * f x) =O[l] g ↔ f =O[l] g
-- Mathlib/NumberTheory/ModularForms/Basic.lean
/-- `CuspFormClass F Γ k` says that `F` is a type of bundled functions that extend
`SlashInvariantFormClass` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass (F : Type*) (Γ : outParam <| Subgroup (SL(2, ℤ))) (k : outParam ℤ)
    [FunLike F ℍ ℂ] extends SlashInvariantFormClass F Γ k : Prop where
  holo : ∀ f : F, MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (f : ℍ → ℂ)
  zero_at_infty : ∀ (f : F) (A : SL(2, ℤ)), IsZeroAtImInfty (f ∣[k] A)
-- Mathlib/Logic/Equiv/Set.lean
@[simp]
theorem prod_assoc_symm_preimage {α β γ} {s : Set α} {t : Set β} {u : Set γ} :
    (Equiv.prodAssoc α β γ).symm ⁻¹' (s ×ˢ t) ×ˢ u = s ×ˢ t ×ˢ u
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
theorem nndist_coe_le_nndist (x : α) : nndist (f x) (g x) ≤ nndist f g
-- Mathlib/FieldTheory/Separable.lean
theorem isUnit_of_self_mul_dvd_separable {p q : R[X]} (hp : p.Separable) (hq : q * q ∣ p) :
    IsUnit q
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- Being filtered is preserved by equivalence of categories. -/
theorem of_equivalence (h : C ≌ D) : IsFiltered D
-- Mathlib/RingTheory/Algebraic.lean
/-- If A is an algebraic algebra over R, then A is algebraic over S when S is an extension of R,
  and the map from `R` to `S` is injective. -/
theorem Algebra.IsAlgebraic.tower_top_of_injective (hinj : Function.Injective (algebraMap R S))
    [Algebra.IsAlgebraic R A] : Algebra.IsAlgebraic S A
-- Mathlib/RingTheory/TensorProduct/Basic.lean
@[simp]
theorem lid_symm_apply (a : A) : (TensorProduct.lid R A).symm a = 1 ⊗ₜ a
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma posSMulStrictMono_iff_PosSMulReflectLE : PosSMulStrictMono α β ↔ PosSMulReflectLE α β
-- Mathlib/MeasureTheory/Measure/Regular.lean
/-- Given a weakly regular measure, any measurable set of finite mass can be approximated from
inside by closed sets. -/
theorem _root_.MeasurableSet.exists_lt_isClosed_of_ne_top [WeaklyRegular μ] ⦃A : Set α⦄
    (hA : MeasurableSet A) (h'A : μ A ≠ ∞) {r : ℝ≥0∞} (hr : r < μ A) :
    ∃ K, K ⊆ A ∧ IsClosed K ∧ r < μ K
-- Mathlib/Algebra/ContinuedFractions/TerminatedStable.lean
theorem convs'Aux_stable_step_of_terminated {s : Stream'.Seq <| Pair K}
    (terminatedAt_n : s.TerminatedAt n) : convs'Aux s (n + 1) = convs'Aux s n
-- Mathlib/Data/Matrix/Notation.lean
@[simp]
theorem mul_empty [Fintype n'] (A : Matrix m' n' α) (B : Matrix n' (Fin 0) α) :
    A * B = of fun _ => ![]
-- Mathlib/Algebra/Group/Pi/Lemmas.lean
@[to_additive (attr := simp)]
theorem OneHom.mulSingle_apply [∀ i, One <| f i] (i : I) (x : f i) :
    mulSingle f i x = Pi.mulSingle i x
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem discrete_isNormal : (@discrete C _).IsNormal
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem span_pair_comm {x y : α} : (span {x, y} : Ideal α) = span {y, x}
-- Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
/-- **Harris-Kleitman inequality**: Any two lower sets of finsets correlate. -/
theorem IsLowerSet.le_card_inter_finset' (h𝒜 : IsLowerSet (𝒜 : Set (Finset α)))
    (hℬ : IsLowerSet (ℬ : Set (Finset α))) (h𝒜s : ∀ t ∈ 𝒜, t ⊆ s) (hℬs : ∀ t ∈ ℬ, t ⊆ s) :
    𝒜.card * ℬ.card ≤ 2 ^ s.card * (𝒜 ∩ ℬ).card
-- Mathlib/Order/Filter/Prod.lean
theorem prod_iInf_left [Nonempty ι] {f : ι → Filter α} {g : Filter β} :
    (⨅ i, f i) ×ˢ g = ⨅ i, f i ×ˢ g
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Bilinear.lean
@[simp]
theorem coe_flipₗᵢ : ⇑(flipₗᵢ 𝕜 E Fₗ Gₗ) = flip
-- Mathlib/Analysis/Normed/Field/Basic.lean
/-- `norm` as a `MonoidWithZeroHom`. -/
@[simps]
def normHom : α →*₀ ℝ
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem Subsequent.mk_left {xl xr} (xL : xl → PGame) (xR : xr → PGame) (i : xl) :
    Subsequent (xL i) (mk xl xr xL xR)
-- Mathlib/Order/UpperLower/Basic.lean
theorem Ioi_le_Ici (a : α) : Ioi a ≤ Ici a
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
@[simp]
theorem basicOpen_eq_zeroLocus_compl (r : R) :
    (basicOpen r : Set (PrimeSpectrum R)) = (zeroLocus {r})ᶜ
-- Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
theorem parallelepiped_basis_eq (b : Basis ι ℝ E) :
    parallelepiped b = {x | ∀ i, b.repr x i ∈ Set.Icc 0 1}
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
@[simp]
theorem coe_mk' (f : P1 → P2) (f' : V1 →ₗ[k] V2) (p h) : ⇑(mk' f f' p h) = f
-- Mathlib/Data/Set/Function.lean
theorem eq_restrict_iff {s : Set α} {f : ∀ a : s, π a} {g : ∀ a, π a} :
    f = restrict s g ↔ ∀ (a) (ha : a ∈ s), f ⟨a, ha⟩ = g a
-- Mathlib/Topology/Constructions.lean
theorem mem_nhds_of_pi_mem_nhds {I : Set ι} {s : ∀ i, Set (π i)} (a : ∀ i, π i) (hs : I.pi s ∈ 𝓝 a)
    {i : ι} (hi : i ∈ I) : s i ∈ 𝓝 (a i)
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[deprecated getElem?_range (since := "2024-06-12")]
theorem get?_range {m n : Nat} (h : m < n) : get? (range n) m = some m
-- Mathlib/Geometry/RingedSpace/Stalks.lean
theorem congr_point {X Y : PresheafedSpace.{_, _, v} C}
    (α : X ⟶ Y) (x x' : X) (h : x = x') :
    α.stalkMap x ≫ eqToHom (show X.presheaf.stalk x = X.presheaf.stalk x' by rw [h]) =
      eqToHom (show Y.presheaf.stalk (α.base x) =
        Y.presheaf.stalk (α.base x') by rw [h]) ≫ α.stalkMap x'
-- Mathlib/Data/Set/Finite.lean
@[simp]
protected theorem coe_toFinset : (hs.toFinset : Set α) = s
-- Mathlib/Topology/Inseparable.lean
theorem specializes_iff_pure : x ⤳ y ↔ pure x ≤ 𝓝 y
-- Mathlib/Analysis/Convex/Between.lean
theorem Sbtw.right_mem_image_Ioi {x y z : P} (h : Sbtw R x y z) :
    z ∈ lineMap x y '' Set.Ioi (1 : R)
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
@[simp]
theorem deriv_sum (h : ∀ i ∈ u, DifferentiableAt 𝕜 (A i) x) :
    deriv (fun y => ∑ i ∈ u, A i y) x = ∑ i ∈ u, deriv (A i) x
-- Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean
theorem singletonSubgraph_connected {v : V} : (G.singletonSubgraph v).Connected
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem coe_mk (f : M →ₗ[R] N) (h) : ((⟨f, h⟩ : M →ₗ⁅R,L⁆ N) : M → N) = f
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem sInf_empty : sInf (∅ : Set Ordinal) = 0
-- Mathlib/Data/Fintype/Basic.lean
theorem codisjoint_right : Codisjoint s t ↔ ∀ ⦃a⦄, a ∉ t → a ∈ s
-- Mathlib/Data/List/GetD.lean
theorem getD_append (l l' : List α) (d : α) (n : ℕ) (h : n < l.length) :
    (l ++ l').getD n d = l.getD n d
-- Mathlib/LinearAlgebra/Prod.lean
theorem coprod_zero_right (f : M →ₗ[R] M₃) : f.coprod (0 : M₂ →ₗ[R] M₃) = f.comp (fst R M M₂)
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp] lemma sum_comp (s : Finset ι) (p : ι → R[X]) (q : R[X]) :
    (∑ i ∈ s, p i).comp q = ∑ i ∈ s, (p i).comp q
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem eval_eq (l : Products I) (x : C) :
    l.eval C x = if ∀ i, i ∈ l.val → (x.val i = true) then 1 else 0
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
/-- The product comparison morphism from `F(A ⨯ -)` to `FA ⨯ F-`, whose components are given by
`prodComparison`.
-/
@[simps]
def prodComparisonNatTrans [HasBinaryProducts C] [HasBinaryProducts D] (F : C ⥤ D) (A : C) :
    prod.functor.obj A ⋙ F ⟶ F ⋙ prod.functor.obj (F.obj A)
-- Mathlib/Data/NNRat/Lemmas.lean
lemma toNNRat_div (hp : 0 ≤ p) : toNNRat (p / q) = toNNRat p / toNNRat q
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem ofNat_mod_ofNat (m n : Nat) : (m % n : Int) = ↑(m % n)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
lemma cosh_eq_tsum (z : ℂ) : cosh z = ∑' n, z ^ (2 * n) / ↑(2 * n)!
-- Mathlib/Algebra/Star/Basic.lean
@[simp]
theorem star_ofNat [NonAssocSemiring R] [StarRing R] (n : ℕ) [n.AtLeastTwo] :
    star (no_index (OfNat.ofNat n) : R) = OfNat.ofNat n
-- Mathlib/Data/Set/Accumulate.lean
theorem accumulate_def [LE α] {x : α} : Accumulate s x = ⋃ y ≤ x, s y
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem length_eq_zero : length l = 0 ↔ l = []
-- Mathlib/Topology/Category/Compactum.lean
/-- The structure map of a compactum actually computes limits. -/
theorem lim_eq_str {X : Compactum} (F : Ultrafilter X) : F.lim = X.str F
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem zero_not_mem_nonZeroDivisors [Nontrivial M] : 0 ∉ M⁰
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem adjointAux_adjointAux (A : E →L[𝕜] F) : adjointAux (adjointAux A) = A
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem eq_insertNth_iff {p : Fin (n + 1)} {a : α p} {f : ∀ i, α (p.succAbove i)} {g : ∀ j, α j} :
    g = insertNth p a f ↔ g p = a ∧ removeNth p g = f
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive]
protected theorem map_list_prod (f : M →* N) (l : List M) : f l.prod = (l.map f).prod
-- Mathlib/Data/Real/Hyperreal.lean
@[norm_cast]
theorem coe_ne_zero {x : ℝ} : (x : ℝ*) ≠ 0 ↔ x ≠ 0
-- Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
/-- Definition for a primitive additive character on a finite ring `R` into a cyclotomic extension
of a field `R'`. It records which cyclotomic extension it is, the character, and the
fact that the character is primitive. -/
-- Porting note(#5171): this linter isn't ported yet.
-- can't prove that they always exist (referring to providing an `Inhabited` instance)
-- @[nolint has_nonempty_instance]
structure PrimitiveAddChar (R : Type u) [CommRing R] (R' : Type v) [Field R'] where
  /-- The first projection from `PrimitiveAddChar`, giving the cyclotomic field. -/
  n : ℕ+
  /-- The second projection from `PrimitiveAddChar`, giving the character. -/
  char : AddChar R (CyclotomicField n R')
  /-- The third projection from `PrimitiveAddChar`, showing that `χ.char` is primitive. -/
  prim : IsPrimitive char
-- Mathlib/Algebra/Order/Field/Basic.lean
lemma div_lt_comm₀ (hb : 0 < b) (hc : 0 < c) : a / b < c ↔ a / c < b
-- Mathlib/RingTheory/MvPowerSeries/Basic.lean
theorem coeff_mul_monomial (a : R) :
    coeff R m (φ * monomial R n a) = if n ≤ m then coeff R (m - n) φ * a else 0
-- Mathlib/Data/Finset/Pointwise.lean
@[simp]
theorem vsub_eq_empty : s -ᵥ t = ∅ ↔ s = ∅ ∨ t = ∅
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem inf_coe_to_submodule :
    (↑(K ⊓ K') : Submodule R L) = (K : Submodule R L) ⊓ (K' : Submodule R L)
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp]
theorem Ioo_eq_empty_iff [DenselyOrdered α] : Ioo a b = ∅ ↔ ¬a < b
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- A function on `[a, b]` with the norm of the derivative within `[a, b]`
bounded by `C` satisfies `‖f x - f a‖ ≤ C * (x - a)`, `HasDerivWithinAt`
version. -/
theorem norm_image_sub_le_of_norm_deriv_le_segment' {f' : ℝ → E} {C : ℝ}
    (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x)
    (bound : ∀ x ∈ Ico a b, ‖f' x‖ ≤ C) : ∀ x ∈ Icc a b, ‖f x - f a‖ ≤ C * (x - a)
-- Mathlib/RingTheory/QuotSMulTop.lean
lemma equivQuotTensor_naturality_mk (f : M →ₗ[R] M') (x : M) :
    equivQuotTensor r M' (map r f (Submodule.Quotient.mk x)) =
      f.lTensor (R ⧸ Ideal.span {r})
        (equivQuotTensor r M (Submodule.Quotient.mk x))
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_eq_top {a b : α} : a ⇔ b = ⊤ ↔ a = b
-- Mathlib/Data/Matrix/RowCol.lean
@[simp]
theorem conjTranspose_col [Star α] (v : m → α) : (col ι v)ᴴ = row ι (star v)
-- Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean
theorem MeasurableSpace.comap_compl {m' : MeasurableSpace β} [BooleanAlgebra β]
    (h : Measurable (compl : β → β)) (f : α → β) :
    MeasurableSpace.comap (fun a => (f a)ᶜ) inferInstance =
      MeasurableSpace.comap f inferInstance
-- Mathlib/Topology/Bornology/BoundedOperation.lean
lemma boundedSub_of_lipschitzWith_sub [PseudoMetricSpace R] [Sub R] {K : NNReal}
    (lip : LipschitzWith K (fun (p : R × R) ↦ p.1 - p.2)) :
    BoundedSub R
-- Mathlib/Algebra/DirectSum/Basic.lean
theorem fromAddMonoid_of_apply (i : ι) (f : γ →+ β i) (x : γ) :
    fromAddMonoid (of _ i f) x = of _ i (f x)
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem type_lt (o : Ordinal) : type ((· < ·) : o.out.α → o.out.α → Prop) = o
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive mod_addOrderOf_zsmul]
lemma zpow_mod_orderOf (x : G) (z : ℤ) : x ^ (z % (orderOf x : ℤ)) = x ^ z
-- Mathlib/Topology/Basic.lean
theorem Continuous.tendsto (hf : Continuous f) (x) : Tendsto f (𝓝 x) (𝓝 (f x))
-- Mathlib/Analysis/Complex/PhragmenLindelof.lean
/-- **Phragmen-Lindelöf principle** in the fourth quadrant. Let `f g : ℂ → E` be functions such that

* `f` and `g` are differentiable in the open fourth quadrant and are continuous on its closure;
* `‖f z‖` and `‖g z‖` are bounded from above by `A * exp(B * (abs z) ^ c)` on the open fourth
  quadrant for some `A`, `B`, and `c < 2`;
* `f` is equal to `g` on the boundary of the fourth quadrant.

Then `f` is equal to `g` on the closed fourth quadrant. -/
theorem eqOn_quadrant_IV (hdf : DiffContOnCl ℂ f (Ioi 0 ×ℂ Iio 0))
    (hBf : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * abs z ^ c))
    (hdg : DiffContOnCl ℂ g (Ioi 0 ×ℂ Iio 0))
    (hBg : ∃ c < (2 : ℝ), ∃ B,
      g =O[cobounded ℂ ⊓ 𝓟 (Ioi 0 ×ℂ Iio 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, 0 ≤ x → f x = g x) (him : ∀ x : ℝ, x ≤ 0 → f (x * I) = g (x * I)) :
    EqOn f g {z | 0 ≤ z.re ∧ z.im ≤ 0}
-- Mathlib/Topology/FiberBundle/Basic.lean
/-- This structure permits to define a fiber bundle when trivializations are given as local
equivalences but there is not yet a topology on the total space. The total space is hence given a
topology in such a way that there is a fiber bundle structure for which the partial equivalences
are also partial homeomorphisms and hence local trivializations. -/
-- Porting note (#5171): was @[nolint has_nonempty_instance]
structure FiberPrebundle where
  pretrivializationAtlas : Set (Pretrivialization F (π F E))
  pretrivializationAt : B → Pretrivialization F (π F E)
  mem_base_pretrivializationAt : ∀ x : B, x ∈ (pretrivializationAt x).baseSet
  pretrivialization_mem_atlas : ∀ x : B, pretrivializationAt x ∈ pretrivializationAtlas
  continuous_trivChange : ∀ e, e ∈ pretrivializationAtlas → ∀ e', e' ∈ pretrivializationAtlas →
    ContinuousOn (e ∘ e'.toPartialEquiv.symm) (e'.target ∩ e'.toPartialEquiv.symm ⁻¹' e.source)
  totalSpaceMk_inducing : ∀ b : B, Inducing (pretrivializationAt b ∘ TotalSpace.mk b)
-- Mathlib/Topology/Algebra/Constructions.lean
@[to_additive (attr := simp)]
theorem comap_unop_nhds (x : M) : comap (unop : Mᵐᵒᵖ → M) (𝓝 x) = 𝓝 (op x)
-- Mathlib/Logic/Function/Iterate.lean
theorem Bijective.iterate (Hbij : Bijective f) (n : ℕ) : Bijective f^[n]
-- Mathlib/Algebra/Order/Interval/Set/Group.lean
theorem sub_mem_Icc_iff_right : a - b ∈ Set.Icc c d ↔ b ∈ Set.Icc (a - d) (a - c)
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem diam_subsingleton (hs : s.Subsingleton) : diam s = 0