ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- A functor `G : C ⥤ D` sends cones over `F` to cones over `F ⋙ G` functorially. -/
@[simps]
def functoriality : Cone F ⥤ Cone (F ⋙ G)
-- Mathlib/RingTheory/Generators.lean
@[ext]
lemma Cotangent.ext {x y : P.Cotangent} (e : x.val = y.val) : x = y
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem IntegrableOn.congr_set_ae (h : IntegrableOn f t μ) (hst : s =ᵐ[μ] t) : IntegrableOn f s μ
-- Mathlib/Logic/Basic.lean
/-- Wrapper for adding elementary propositions to the type class systems.
Warning: this can easily be abused. See the rest of this docstring for details.

Certain propositions should not be treated as a class globally,
but sometimes it is very convenient to be able to use the type class system
in specific circumstances.

For example, `ZMod p` is a field if and only if `p` is a prime number.
In order to be able to find this field instance automatically by type class search,
we have to turn `p.prime` into an instance implicit assumption.

On the other hand, making `Nat.prime` a class would require a major refactoring of the library,
and it is questionable whether making `Nat.prime` a class is desirable at all.
The compromise is to add the assumption `[Fact p.prime]` to `ZMod.field`.

In particular, this class is not intended for turning the type class system
into an automated theorem prover for first order logic. -/
class Fact (p : Prop) : Prop where
  /-- `Fact.out` contains the unwrapped witness for the fact represented by the instance of
  `Fact p`. -/
  out : p
-- Mathlib/Topology/Algebra/UniformConvergence.lean
@[to_additive (attr := simp)]
lemma UniformOnFun.one_apply [One β] : ofFun 𝔖 (1 : α → β) = 1
-- Mathlib/CategoryTheory/MorphismProperty/Basic.lean
lemma MorphismProperty.top_eq : (⊤ : MorphismProperty C) = fun _ _ _ => True
-- Mathlib/Data/Set/Pointwise/Basic.lean
theorem Nonempty.zero_mul (hs : s.Nonempty) : 0 * s = 0
-- Mathlib/Data/Num/Lemmas.lean
theorem toZNum_inj {m n : Num} : m.toZNum = n.toZNum ↔ m = n
-- Mathlib/Order/CompleteLattice.lean
@[simp] lemma iInf_ulift {ι : Type*} [InfSet α] (f : ULift ι → α) :
    ⨅ i : ULift ι, f i = ⨅ i, f (.up i)
-- Mathlib/Topology/LocallyConstant/Basic.lean
theorem comap_comp {W : Type*} [TopologicalSpace W] (f : C(W, X)) (g : C(X, Y)) :
    comap (Z := Z) (g.comp f) = comap f ∘ comap g
-- Mathlib/NumberTheory/Harmonic/ZetaAsymp.lean
lemma continuousOn_term (n : ℕ) :
    ContinuousOn (fun x ↦ term (n + 1) x) (Ici 1)
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem length_splitWrtCompositionAux (l : List α) (ns) :
    length (l.splitWrtCompositionAux ns) = ns.length
-- Mathlib/RingTheory/Polynomial/Dickson.lean
@[simp]
theorem dickson_add_two (n : ℕ) :
    dickson k a (n + 2) = X * dickson k a (n + 1) - C a * dickson k a n
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
theorem replicate_succ (a : α) (n) : replicate (n+1) a = a :: replicate n a
-- Mathlib/Data/ZMod/Basic.lean
theorem val_add_le {n : ℕ} (a b : ZMod n) : (a + b).val ≤ a.val + b.val
-- Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean
/-- **Hahn-Banach theorem** for continuous linear functions over `ℝ`.
See also `exists_extension_norm_eq` in the root namespace for a more general version
that works both for `ℝ` and `ℂ`. -/
theorem exists_extension_norm_eq (p : Subspace ℝ E) (f : p →L[ℝ] ℝ) :
    ∃ g : E →L[ℝ] ℝ, (∀ x : p, g x = f x) ∧ ‖g‖ = ‖f‖
-- Mathlib/LinearAlgebra/Pi.lean
theorem iInf_comap_proj :
    ⨅ i, comap (proj i : ((i : ι) → φ i) →ₗ[R] φ i) (p i) = pi Set.univ p
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem SurjectiveOnWith.exists_pos {f : NormedAddGroupHom V₁ V₂} {K : AddSubgroup V₂} {C : ℝ}
    (h : f.SurjectiveOnWith K C) : ∃ C' > 0, f.SurjectiveOnWith K C'
-- Mathlib/CategoryTheory/Sites/IsSheafOneHypercover.lean
lemma isSheaf_iff :
    Presheaf.IsSheaf J P ↔ ∀ ⦃X : C⦄ (E : J.OneHypercover X)
      (_ : H E), Nonempty (IsLimit (E.multifork P))
-- Mathlib/Order/Height.lean
@[simp] -- porting note: new `simp`
theorem nil_mem_subchain : [] ∈ s.subchain
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
@[simp]
theorem weightedVSubVSubWeights_apply_right [DecidableEq ι] {i j : ι} (h : i ≠ j) :
    weightedVSubVSubWeights k i j j = -1
-- Mathlib/Algebra/Order/Monovary.lean
@[to_additive (attr := simp)]
lemma antivaryOn_inv_right : AntivaryOn f g⁻¹ s ↔ MonovaryOn f g s
-- Mathlib/Analysis/SpecialFunctions/Complex/Arctan.lean
/-- `cos z` is nonzero when the bounds in `arctan_tan` are met (`z` lies in the vertical strip
`-π / 2 < z.re < π / 2` and `z ≠ π / 2`). -/
lemma cos_ne_zero_of_arctan_bounds {z : ℂ} (h₀ : z ≠ π / 2) (h₁ : -(π / 2) < z.re)
    (h₂ : z.re ≤ π / 2) : cos z ≠ 0
-- .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean
protected theorem Balanced.ins {path : Path α}
    (hp : path.Balanced c₀ n₀ c n) (ht : t.RedRed (c = red) n) :
    ∃ n, (path.ins t).Balanced black n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem tan_sub_int_mul_pi (x : ℂ) (n : ℤ) : tan (x - n * π) = tan x
-- Mathlib/Algebra/Polynomial/Derivative.lean
@[simp]
theorem iterate_derivative_C {k} (h : 0 < k) : derivative^[k] (C a : R[X]) = 0
-- Mathlib/RingTheory/Coalgebra/Equiv.lean
@[simp]
theorem coe_toCoalgHom : ⇑(e : A →ₗc[R] B) = e
-- Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean
/-- Continuous algebra homomorphisms from `C(s, ℝ)` into an `ℝ`-algebra `A` which agree
at `X : 𝕜[X]` (interpreted as a continuous map) are, in fact, equal. -/
@[ext]
theorem ContinuousMap.algHom_ext_map_X {A : Type*} [Ring A]
    [Algebra ℝ A] [TopologicalSpace A] [T2Space A] {s : Set ℝ} [CompactSpace s]
    {φ ψ : C(s, ℝ) →ₐ[ℝ] A} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h : φ (toContinuousMapOnAlgHom s X) = ψ (toContinuousMapOnAlgHom s X)) : φ = ψ
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive]
theorem isCyclic_of_surjective {H G F : Type*} [Group H] [Group G] [hH : IsCyclic H]
    [FunLike F H G] [MonoidHomClass F H G] (f : F) (hf : Function.Surjective f) :
    IsCyclic G
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
theorem comap_injective_of_surjective (f : R →+* S) (hf : Function.Surjective f) :
    Function.Injective (comap f)
-- Mathlib/NumberTheory/LegendreSymbol/Basic.lean
/-- The Legendre symbol `legendreSym p a = 1` if there is a solution in `ℤ/pℤ`
of the equation `x^2 - a*y^2 = 0` with `x ≠ 0`. -/
theorem eq_one_of_sq_sub_mul_sq_eq_zero' {p : ℕ} [Fact p.Prime] {a : ℤ} (ha : (a : ZMod p) ≠ 0)
    {x y : ZMod p} (hx : x ≠ 0) (hxy : x ^ 2 - a * y ^ 2 = 0) : legendreSym p a = 1
-- Mathlib/FieldTheory/Laurent.lean
@[simp]
theorem laurent_at_zero : laurent 0 f = f
-- Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
lemma copy {P P'} {Q Q'} [HasAffineProperty P Q]
    (e : P = P') (e' : Q = Q') : HasAffineProperty P' Q'
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem?_replicate : (replicate n a)[m]? = if m < n then some a else none
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
lemma mem_inv' : a ∈ s⁻¹ ↔ a⁻¹ ∈ s
-- Mathlib/Analysis/Convex/Star.lean
theorem StarConvex.segment_subset (h : StarConvex 𝕜 x s) {y : E} (hy : y ∈ s) : [x -[𝕜] y] ⊆ s
-- Mathlib/CategoryTheory/GuitartExact/VerticalComposition.lean
lemma vComp'_iff_of_equivalences (E : C₂ ≌ C₃) (E' : D₂ ≌ D₃)
    (w' : H₂ ⋙ E'.functor ≅ E.functor ⋙ H₃) {L₁₂ : C₁ ⥤ C₃}
    {R₁₂ : D₁ ⥤ D₃} (eL : L₁ ⋙ E.functor ≅ L₁₂)
    (eR : R₁ ⋙ E'.functor ≅ R₁₂) :
    (w.vComp' w'.hom eL eR).GuitartExact ↔ w.GuitartExact
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem disjoint_nil_left (l : List α) : Disjoint [] l
-- Mathlib/Analysis/Convex/Deriv.lean
/-- Reformulation of `ConvexOn.slope_le_of_hasDerivWithinAt_Iio` using `derivWithin`. -/
lemma slope_le_left_deriv (hfc : ConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f (Iio y) y) :
    slope f x y ≤ derivWithin f (Iio y) y
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.eventually_iff (hl : l.HasBasis p s) {q : α → Prop} :
    (∀ᶠ x in l, q x) ↔ ∃ i, p i ∧ ∀ ⦃x⦄, x ∈ s i → q x
-- Mathlib/LinearAlgebra/Determinant.lean
@[simp]
theorem det_toLin (b : Basis ι R M) (f : Matrix ι ι R) :
    LinearMap.det (Matrix.toLin b b f) = f.det
-- Mathlib/Algebra/Star/Basic.lean
@[simp]
theorem star_nsmul [AddMonoid R] [StarAddMonoid R] (x : R) (n : ℕ) : star (n • x) = n • star x
-- Mathlib/RepresentationTheory/Maschke.lean
theorem equivariantProjection_apply (v : W) :
    π.equivariantProjection G v = ⅟(Fintype.card G : k) • ∑ g : G, π.conjugate g v
-- Mathlib/Data/Pi/Interval.lean
theorem card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card
-- Mathlib/NumberTheory/Dioph.lean
theorem le_dioph : Dioph {v | f v ≤ g v}
-- Mathlib/NumberTheory/Harmonic/EulerMascheroni.lean
lemma eulerMascheroniSeq'_one : eulerMascheroniSeq' 1 = 1
-- Mathlib/Order/Monotone/Basic.lean
protected theorem StrictAnti.ite' (hf : StrictAnti f) (hg : StrictAnti g) {p : α → Prop}
    [DecidablePred p]
    (hp : ∀ ⦃x y⦄, x < y → p y → p x) (hfg : ∀ ⦃x y⦄, p x → ¬p y → x < y → g y < f x) :
    StrictAnti fun x ↦ if p x then f x else g x
-- Mathlib/Algebra/Star/Pi.lean
theorem single_star [∀ i, AddMonoid (f i)] [∀ i, StarAddMonoid (f i)] [DecidableEq I] (i : I)
    (a : f i) : Pi.single i (star a) = star (Pi.single i a)
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
@[simp]
theorem isOrtho_iSup_right {ι : Sort*} {U : Submodule 𝕜 E} {V : ι → Submodule 𝕜 E} :
    U ⟂ iSup V ↔ ∀ i, U ⟂ V i
-- Mathlib/MeasureTheory/Function/SpecialFunctions/RCLike.lean
@[measurability]
theorem AEMeasurable.re (hf : AEMeasurable f μ) : AEMeasurable (fun x => RCLike.re (f x)) μ
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] protected theorem le_refl (a : Fin n) : a ≤ a
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
theorem tendstoUniformlyOn_of_seq_tendstoUniformlyOn {l : Filter ι} [l.IsCountablyGenerated]
    (h : ∀ u : ℕ → ι, Tendsto u atTop l → TendstoUniformlyOn (fun n => F (u n)) f atTop s) :
    TendstoUniformlyOn F f l s
-- Mathlib/Analysis/Convex/GaugeRescale.lean
theorem gauge_gaugeRescale' (s : Set E) {t : Set E} {x : E} (hx : gauge t x ≠ 0) :
    gauge t (gaugeRescale s t x) = gauge s x
-- Mathlib/RingTheory/DedekindDomain/Factorization.lean
/-- `val_v(I)` does not depend on the choice of `a` and `J` used to represent `I`. -/
theorem count_well_defined {I : FractionalIdeal R⁰ K} (hI : I ≠ 0) {a : R}
    {J : Ideal R} (h_aJ : I = spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J) :
    count K v I = ((Associates.mk v.asIdeal).count (Associates.mk J).factors -
      (Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {a})).factors : ℤ)
-- Mathlib/GroupTheory/Divisible.lean
theorem smul_top_eq_top_of_divisibleBy_int [DivisibleBy A ℤ] {n : ℤ} (hn : n ≠ 0) :
    n • (⊤ : AddSubgroup A) = ⊤
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem snoc_comp_rev {α n} (a : α) (f : Fin n → α) :
    Fin.snoc f a ∘ Fin.rev = Fin.cons a (f ∘ Fin.rev)
-- Mathlib/Algebra/DirectSum/Internal.lean
theorem coe_of_mul_apply_of_not_le {i : ι} (r : A i) (r' : ⨁ i, A i) (n : ι) (h : ¬i ≤ n) :
    ((of (fun i => A i) i r * r') n : R) = 0
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
theorem le_seminormAux (k n : ℕ) (f : 𝓢(E, F)) (x : E) :
    ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ f.seminormAux k n
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
@[simp]
theorem finrank_bot : finrank R (⊥ : Submodule R M) = 0
-- Mathlib/Topology/Algebra/Module/FiniteDimension.lean
/-- Two finite-dimensional topological vector spaces over a complete normed field are continuously
linearly equivalent if they have the same (finite) dimension. -/
theorem FiniteDimensional.nonempty_continuousLinearEquiv_of_finrank_eq
    (cond : finrank 𝕜 E = finrank 𝕜 F) : Nonempty (E ≃L[𝕜] F)
-- Mathlib/RingTheory/HahnSeries/Addition.lean
theorem neg_coeff {x : HahnSeries Γ R} {a : Γ} : (-x).coeff a = -x.coeff a
-- Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean
protected lemma GrowsPolynomially.div {f g : ℝ → ℝ} (hf : GrowsPolynomially f)
    (hg : GrowsPolynomially g) : GrowsPolynomially fun x => f x / g x
-- Mathlib/Data/String/Lemmas.lean
lemma leftpad_prefix (n : ℕ) (c : Char) : ∀ s, IsPrefix (replicate (n - length s) c) (leftpad n c s)
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
@[simp]
theorem coe_restrictScalarsIsometry :
    ⇑(restrictScalarsIsometry 𝕜 E Fₗ 𝕜' 𝕜'') = restrictScalars 𝕜'
-- Mathlib/Data/Int/Lemmas.lean
theorem injOn_natAbs_Iic : InjOn natAbs (Iic 0)
-- Mathlib/Algebra/Free.lean
@[to_additive]
theorem toFreeSemigroup_comp_map (f : α → β) :
    toFreeSemigroup.comp (map f) = (FreeSemigroup.map f).comp toFreeSemigroup
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
theorem map_swap [DecidableEq ι] {i j : ι} (hij : i ≠ j) : g (v ∘ Equiv.swap i j) = -g v
-- Mathlib/SetTheory/Cardinal/ToNat.lean
@[simp]
theorem mk_toNat_of_infinite [h : Infinite α] : toNat #α = 0
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
/-- Given `R`-module X and `S`-module Y, any `g : (restrictScalars f).obj Y ⟶ X`
corresponds to `Y ⟶ (coextendScalars f).obj X` by sending `y ↦ (s ↦ g (s • y))`
-/
@[simps apply_apply]
def HomEquiv.fromRestriction {X : ModuleCat R} {Y : ModuleCat S}
    (g : (restrictScalars f).obj Y ⟶ X) : Y ⟶ (coextendScalars f).obj X
-- Mathlib/NumberTheory/LucasLehmer.lean
@[simp]
theorem one_lt_mersenne {p : ℕ} : 1 < mersenne p ↔ 1 < p
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast]
theorem natCast_im (n : ℕ) : (n : ℍ[R,c₁,c₂]).im = 0
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- A category `IsFilteredOrEmpty` if
1. for every pair of objects there exists another object "to the right", and
2. for every pair of parallel morphisms there exists a morphism to the right so the compositions
   are equal.
-/
class IsFilteredOrEmpty : Prop where
  /-- for every pair of objects there exists another object "to the right" -/
  cocone_objs : ∀ X Y : C, ∃ (Z : _) (_ : X ⟶ Z) (_ : Y ⟶ Z), True
  /-- for every pair of parallel morphisms there exists a morphism to the right
    so the compositions are equal -/
  cocone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (Z : _) (h : Y ⟶ Z), f ≫ h = g ≫ h
-- Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
theorem comap_boundedBy {β} (f : β → α)
    (h : (Monotone fun s : { s : Set α // s.Nonempty } => m s) ∨ Surjective f) :
    comap f (boundedBy m) = boundedBy fun s => m (f '' s)
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem const_smul [SMul 𝕜 β] [ContinuousConstSMul 𝕜 β] (c : 𝕜) (hf : AEStronglyMeasurable' m f μ) :
    AEStronglyMeasurable' m (c • f) μ
-- Mathlib/FieldTheory/PerfectClosure.lean
theorem mk_surjective : Function.Surjective (mk K p)
-- Mathlib/Topology/Algebra/Polynomial.lean
theorem coeff_le_of_roots_le {p : F[X]} {f : F →+* K} {B : ℝ} (i : ℕ) (h1 : p.Monic)
    (h2 : Splits f p) (h3 : ∀ z ∈ (map f p).roots, ‖z‖ ≤ B) :
    ‖(map f p).coeff i‖ ≤ B ^ (p.natDegree - i) * p.natDegree.choose i
-- Mathlib/NumberTheory/Divisors.lean
theorem properDivisors_eq_singleton_one_iff_prime : n.properDivisors = {1} ↔ n.Prime
-- Mathlib/GroupTheory/Coxeter/Inversion.lean
theorem getD_leftInvSeq (ω : List B) (j : ℕ) :
    (lis ω).getD j 1 =
      π (ω.take j)
        * (Option.map (cs.simple) (ω.get? j)).getD 1
        * (π (ω.take j))⁻¹
-- Mathlib/Algebra/Squarefree/Basic.lean
theorem squarefree_iff_multiplicity_le_one (r : R) :
    Squarefree r ↔ ∀ x : R, multiplicity x r ≤ 1 ∨ IsUnit x
-- Mathlib/RingTheory/PrimeSpectrum.lean
@[simp]
theorem zeroLocus_radical (I : Ideal R) : zeroLocus (I.radical : Set R) = zeroLocus I
-- Mathlib/Data/List/Sigma.lean
theorem kreplace_of_forall_not (a : α) (b : β a) {l : List (Sigma β)}
    (H : ∀ b : β a, Sigma.mk a b ∉ l) : kreplace a b l = l
-- Mathlib/SetTheory/Game/PGame.lean
theorem IsOption.mk_right {xl xr : Type u} (xL : xl → PGame) (xR : xr → PGame) (i : xr) :
    (xR i).IsOption (mk xl xr xL xR)
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean
@[reassoc]
theorem PreservesPushout.inl_iso_hom :
    pushout.inl _ _ ≫ (PreservesPushout.iso G f g).hom = G.map (pushout.inl _ _)
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
@[simp]
theorem lineMap_eq_left_iff [NoZeroSMulDivisors k V1] {p₀ p₁ : P1} {c : k} :
    lineMap p₀ p₁ c = p₀ ↔ p₀ = p₁ ∨ c = 0
-- Mathlib/CategoryTheory/Endofunctor/Algebra.lean
/-- The structure map of the initial algebra is an isomorphism,
hence endofunctors preserve their initial algebras
-/
theorem str_isIso (h : Limits.IsInitial A) : IsIso A.str
-- Mathlib/CategoryTheory/Preadditive/Schur.lean
theorem finrank_hom_simple_simple (X Y : C) [∀ X Y : C, FiniteDimensional 𝕜 (X ⟶ Y)] [Simple X]
    [Simple Y] : finrank 𝕜 (X ⟶ Y) = if Nonempty (X ≅ Y) then 1 else 0
-- Mathlib/Analysis/InnerProductSpace/TwoDim.lean
@[simp]
theorem inner_rightAngleRotation_left (x y : E) : ⟪J x, y⟫ = ω x y
-- Mathlib/RingTheory/LaurentSeries.lean
theorem coe_injective : Function.Injective ((↑) : RatFunc F → LaurentSeries F)
-- Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
theorem restrict_ofFunction (s : Set α) (hm : Monotone m) :
    restrict s (OuterMeasure.ofFunction m m_empty) =
      OuterMeasure.ofFunction (fun t => m (t ∩ s)) (by simp; simp [m_empty])
-- Mathlib/Data/NNReal/Basic.lean
theorem finset_sup_mul {α} (s : Finset α) (f : α → ℝ≥0) (r : ℝ≥0) :
    s.sup f * r = s.sup fun a => f a * r
-- Mathlib/Algebra/Lie/Derivation/Basic.lean
@[ext]
theorem ext (H : ∀ a, D1 a = D2 a) : D1 = D2
-- Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean
lemma measurable_toRatCDF (hf : Measurable f) : Measurable (toRatCDF f)
-- Mathlib/Data/TypeVec.lean
@[simp]
theorem toSubtype_of_subtype_assoc
    {α β : TypeVec n} (p : α ⟹ «repeat» n Prop) (f : β ⟹ Subtype_ p) :
    @toSubtype n _ p ⊚ ofSubtype _ ⊚ f = f
-- Mathlib/AlgebraicGeometry/Scheme.lean
theorem basicOpen_eq_of_affine {R : CommRingCat} (f : R) :
    (Spec R).basicOpen ((Scheme.ΓSpecIso R).inv f) = PrimeSpectrum.basicOpen f
-- Mathlib/Probability/Martingale/OptionalSampling.lean
theorem condexp_stopping_time_ae_eq_restrict_eq_const
    [(Filter.atTop : Filter ι).IsCountablyGenerated] (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) [SigmaFinite (μ.trim hτ.measurableSpace_le)] (hin : i ≤ n) :
    μ[f n|hτ.measurableSpace] =ᵐ[μ.restrict {x | τ x = i}] f i
-- Mathlib/Deprecated/Subgroup.lean
theorem Additive.isNormalAddSubgroup [Group G] {s : Set G} (hs : IsNormalSubgroup s) :
    @IsNormalAddSubgroup (Additive G) _ s
-- Mathlib/Order/Filter/AtTopBot.lean
theorem Monotone.piecewise_eventually_eq_iUnion {β : α → Type*} [Preorder ι] {s : ι → Set α}
    [∀ i, DecidablePred (· ∈ s i)] [DecidablePred (· ∈ ⋃ i, s i)]
    (hs : Monotone s) (f g : (a : α) → β a) (a : α) :
    ∀ᶠ i in atTop, (s i).piecewise f g a = (⋃ i, s i).piecewise f g a
-- Mathlib/Algebra/Order/Monoid/Defs.lean
/-- An ordered cancellative commutative monoid is a partially ordered commutative monoid in which
multiplication is cancellative and monotone. -/
@[to_additive OrderedCancelAddCommMonoid]
class OrderedCancelCommMonoid (α : Type*) extends OrderedCommMonoid α where
  protected le_of_mul_le_mul_left : ∀ a b c : α, a * b ≤ a * c → b ≤ c
-- Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean
@[simp]
theorem comm_trans_lTensorBot :
    (Algebra.TensorProduct.comm R _ _).trans A.lTensorBot = A.rTensorBot
-- Mathlib/Data/String/Lemmas.lean
/-- The length of the String returned by `String.leftpad n a c` is equal
  to the larger of `n` and `s.length` -/
@[simp] lemma leftpad_length (n : ℕ) (c : Char) :
    ∀ (s : String), (leftpad n c s).length = max n s.length
-- Mathlib/Computability/Partrec.lean
theorem const (s : σ) : Computable fun _ : α => s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem sinh_le_self_iff : sinh x ≤ x ↔ x ≤ 0
-- Mathlib/Data/Nat/Factorial/Basic.lean
@[simp]
theorem factorial_eq_one : n ! = 1 ↔ n ≤ 1
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem Monotone.Ioc (hf : Monotone f) (hg : Antitone g) :
    Antitone fun x => Ioc (f x) (g x)
-- Mathlib/AlgebraicGeometry/Morphisms/Separated.lean
/-- A morphism is separated if the diagonal map is a closed immersion. -/
@[mk_iff]
class IsSeparated : Prop where
  /-- A morphism is separated if the diagonal map is a closed immersion. -/
  diagonal_isClosedImmersion : IsClosedImmersion (pullback.diagonal f) := by infer_instance
-- Mathlib/CategoryTheory/Sites/Over.lean
lemma overEquiv_symm_mem_over {X : C} (Y : Over X) (S : Sieve Y.left) (hS : S ∈ J Y.left) :
    (Sieve.overEquiv Y).symm S ∈ (J.over X) Y
-- Mathlib/RingTheory/WittVector/Truncated.lean
theorem truncateFun_surjective : Surjective (@truncateFun p n R)
-- Mathlib/Data/Nat/Find.lean
@[simp] lemma find_le_iff (h : ∃ n : ℕ, p n) (n : ℕ) : Nat.find h ≤ n ↔ ∃ m ≤ n, p m
-- Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
theorem gradedComm_one_tmul (b : ⨁ i, ℬ i) : gradedComm R 𝒜 ℬ (1 ⊗ₜ b) = b ⊗ₜ 1
-- Mathlib/CategoryTheory/Limits/Final.lean
/-- If a functor `R : D ⥤ C` is a right adjoint, it is final. -/
theorem final_of_adjunction {L : C ⥤ D} {R : D ⥤ C} (adj : L ⊣ R) : Final R
-- Mathlib/Order/WithBot.lean
@[simp, norm_cast] lemma coe_bot [Bot α] : ((⊥ : α) : WithTop α) = ⊥
-- Mathlib/Topology/Order/Basic.lean
theorem pi_Ioc_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Ioc a' b' ∈ 𝓝 x'
-- Mathlib/Data/Bool/Basic.lean
theorem bne_eq_xor : bne = xor
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
/-- The restriction of a symmetric bilinear form on a submodule is also symmetric. -/
theorem restrict {B : BilinForm R M} (b : B.IsSymm) (W : Submodule R M) :
    (B.restrict W).IsSymm
-- Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean
/-- Pi-types are measurably equivalent to iterated products. -/
@[simps! (config := .asFn)]
def piMeasurableEquivTProd [DecidableEq δ'] {l : List δ'} (hnd : l.Nodup) (h : ∀ i, i ∈ l) :
    (∀ i, π i) ≃ᵐ List.TProd π l
-- Mathlib/Combinatorics/Enumerative/Composition.lean
/-- The `i`-th sublist in the splitting of a list `l` along a composition `c`, is the slice of `l`
between the indices `c.sizeUpTo i` and `c.sizeUpTo (i+1)`, i.e., the indices in the `i`-th
block of the composition. -/
theorem getElem_splitWrtComposition' (l : List α) (c : Composition n) {i : ℕ}
    (hi : i < (l.splitWrtComposition c).length) :
    (l.splitWrtComposition c)[i] = (l.take (c.sizeUpTo (i + 1))).drop (c.sizeUpTo i)
-- Mathlib/NumberTheory/ArithmeticFunction.lean
theorem cardDistinctFactors_eq_cardFactors_iff_squarefree {n : ℕ} (h0 : n ≠ 0) :
    ω n = Ω n ↔ Squarefree n
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_foldr_inf (l : List (L.BoundedFormula α n)) (v : α → M) (xs : Fin n → M) :
    (l.foldr (· ⊓ ·) ⊤).Realize v xs ↔ ∀ φ ∈ l, BoundedFormula.Realize φ v xs
-- Mathlib/Analysis/NormedSpace/RCLike.lean
theorem RCLike.norm_coe_norm {z : E} : ‖(‖z‖ : 𝕜)‖ = ‖z‖
-- Mathlib/Data/Set/Defs.lean
theorem mem_prod_eq : (p ∈ s ×ˢ t) = (p.1 ∈ s ∧ p.2 ∈ t)
-- Mathlib/Data/TypeVec.lean
theorem appendFun_inj {α α' : TypeVec n} {β β' : Type*} {f f' : α ⟹ α'} {g g' : β → β'} :
    (f ::: g : (α ::: β) ⟹ _) = (f' ::: g' : (α ::: β) ⟹ _)
    → f = f' ∧ g = g'
-- Mathlib/Topology/Bornology/Absorbs.lean
@[simp]
lemma _root_.absorbs_zero_iff [NeBot (cobounded G₀)] {E : Type*} [AddMonoid E]
    [DistribMulAction G₀ E] {s : Set E} : Absorbs G₀ s 0 ↔ 0 ∈ s
-- Mathlib/Order/Filter/Bases.lean
theorem isCountablyGenerated_seq [Countable ι'] (x : ι' → Set α) :
    IsCountablyGenerated (⨅ i, 𝓟 (x i))
-- Mathlib/GroupTheory/CoprodI.lean
theorem lift_mrange_le {N} [Monoid N] (f : ∀ i, M i →* N) {s : Submonoid N} :
    MonoidHom.mrange (lift f) ≤ s ↔ ∀ i, MonoidHom.mrange (f i) ≤ s
-- Mathlib/SetTheory/Surreal/Multiplication.lean
/-- The main chunk of Theorem 8 in [Conway2001] / Theorem 3.8 in [SchleicherStoll]. -/
theorem main (a : Args) : a.Numeric → P124 a
-- Mathlib/Order/Interval/Finset/Nat.lean
theorem Ico_image_const_sub_eq_Ico (hac : a ≤ c) :
    ((Ico a b).image fun x => c - x) = Ico (c + 1 - b) (c + 1 - a)
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- A compact set in a pseudo emetric space is separable, i.e., it is a subset of the closure of a
countable set.  -/
theorem subset_countable_closure_of_compact {s : Set α} (hs : IsCompact s) :
    ∃ t, t ⊆ s ∧ t.Countable ∧ s ⊆ closure t