ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
theorem Orthonormal.exists_orthonormalBasis_extension_of_card_eq {ι : Type*} [Fintype ι]
    (card_ι : finrank 𝕜 E = Fintype.card ι) {v : ι → E} {s : Set ι}
    (hv : Orthonormal 𝕜 (s.restrict v)) : ∃ b : OrthonormalBasis ι 𝕜 E, ∀ i ∈ s, b i = v i
-- Mathlib/Algebra/Order/Monovary.lean
lemma antivary_iff_forall_mul_nonpos : Antivary f g ↔ ∀ i j, (f j - f i) * (g j - g i) ≤ 0
-- Mathlib/Computability/TuringMachine.lean
@[simp]
theorem Tape.mk'_left {Γ} [Inhabited Γ] (L R : ListBlank Γ) : (Tape.mk' L R).left = L
-- Mathlib/RingTheory/Perfection.lean
theorem coeff_map (φ : R →+* S) (f : Ring.Perfection R p) (n : ℕ) :
    coeff S p n (map p φ f) = φ (coeff R p n f)
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem homogeneousComponent_eq_zero'
    (h : ∀ d : σ →₀ ℕ, d ∈ φ.support → d.degree ≠ n) :
    homogeneousComponent n φ = 0
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem default_bool : default = false
-- Mathlib/Data/List/Lemmas.lean
theorem foldl_range_subset_of_range_subset {f : α → β → α} {g : α → γ → α}
    (hfg : (Set.range fun a c => f c a) ⊆ Set.range fun b c => g c b) (a : α) :
    Set.range (foldl f a) ⊆ Set.range (foldl g a)
-- Mathlib/LinearAlgebra/Dimension/LinearMap.lean
theorem rank_comp_le_left (g : V →ₗ[K] V') (f : V' →ₗ[K] V'') : rank (f.comp g) ≤ rank f
-- Mathlib/CategoryTheory/Adjunction/Basic.lean
@[simp, nolint simpNF]
theorem homEquiv_naturality_left_symm (f : X' ⟶ X) (g : X ⟶ G.obj Y) :
    (adj.homEquiv X' Y).symm (f ≫ g) = F.map f ≫ (adj.homEquiv X Y).symm g
-- Mathlib/Order/Interval/Set/Image.lean
lemma MonotoneOn.mapsTo_Ici (h : MonotoneOn f (Ici a)) : MapsTo f (Ici a) (Ici (f a))
-- Mathlib/Order/WellFoundedSet.lean
protected theorem WellFoundedOn.insert (h : WellFoundedOn s r) (a : α) :
    WellFoundedOn (insert a s) r
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- If `f` has finite integral, then `∫⁻ x in s, f x ∂μ` is absolutely continuous in `s`: it tends
to zero as `μ s` tends to zero. This lemma states this fact in terms of `ε` and `δ`. -/
theorem exists_pos_setLIntegral_lt_of_measure_lt {f : α → ℝ≥0∞} (h : ∫⁻ x, f x ∂μ ≠ ∞) {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ δ > 0, ∀ s, μ s < δ → ∫⁻ x in s, f x ∂μ < ε
-- Mathlib/Data/Nat/Digits.lean
lemma toDigitsCore_lens_eq_aux (b f : Nat) :
    ∀ (n : Nat) (l1 l2 : List Char), l1.length = l2.length →
    (Nat.toDigitsCore b f n l1).length = (Nat.toDigitsCore b f n l2).length
-- Mathlib/Analysis/Normed/Module/FiniteDimension.lean
theorem AffineEquiv.continuous_of_finiteDimensional (f : PE ≃ᵃ[𝕜] PF) : Continuous f
-- Mathlib/RingTheory/Perfection.lean
theorem coeff_pthRoot (f : Ring.Perfection R p) (n : ℕ) :
    coeff R p n (pthRoot R p f) = coeff R p (n + 1) f
-- Mathlib/LinearAlgebra/Dual.lean
theorem dualDistrib_dualDistribInvOfBasis_left_inverse (b : Basis ι R M) (c : Basis κ R N) :
    comp (dualDistrib R M N) (dualDistribInvOfBasis b c) = LinearMap.id
-- Mathlib/Algebra/Polynomial/Module/AEval.lean
@[simp] lemma mapSubmodule_comapSubmodule (h := comapSubmodule_le_comap a) :
    mapSubmodule a (p := comapSubmodule R M a q) h = q
-- Mathlib/Analysis/Seminorm.lean
theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul 𝕜 E] {p : Seminorm 𝕜 E}
    {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0
-- Mathlib/FieldTheory/Adjoin.lean
/-- If `F⟮x⟯` has dimension `1` over `F` for every `x ∈ E` then `F = E`. -/
theorem bot_eq_top_of_rank_adjoin_eq_one (h : ∀ x : E, Module.rank F F⟮x⟯ = 1) :
    (⊥ : IntermediateField F E) = ⊤
-- Mathlib/Algebra/BigOperators/Finsupp.lean
theorem support_finset_sum [DecidableEq β] [AddCommMonoid M] {s : Finset α} {f : α → β →₀ M} :
    (Finset.sum s f).support ⊆ s.biUnion fun x => (f x).support
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIcoMod_add_right_eq_add (a b c : α) :
    toIcoMod hp a (b + c) = toIcoMod hp (a - c) b + c
-- Mathlib/Data/DFinsupp/Basic.lean
theorem mk_of_not_mem (hi : i ∉ s) : (mk s x : ∀ i, β i) i = 0
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If a function `f` is continuous and `f'` is strictly antitone on `ℝ` then `f` is strictly
concave. Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict antitonicity of `f'`. -/
theorem StrictAnti.strictConcaveOn_univ_of_deriv {f : ℝ → ℝ} (hf : Continuous f)
    (hf'_anti : StrictAnti (deriv f)) : StrictConcaveOn ℝ univ f
-- Mathlib/RingTheory/Polynomial/Content.lean
@[simp]
theorem content_monomial {r : R} {k : ℕ} : content (monomial k r) = normalize r
-- Mathlib/Data/Set/Function.lean
@[symm]
theorem EqOn.symm (h : EqOn f₁ f₂ s) : EqOn f₂ f₁ s
-- Mathlib/Combinatorics/Schnirelmann.lean
lemma schnirelmannDensity_le_iff_forall {x : ℝ} :
    schnirelmannDensity A ≤ x ↔
      ∀ ε : ℝ, 0 < ε → ∃ n : ℕ, 0 < n ∧ ((Ioc 0 n).filter (· ∈ A)).card / n < x + ε
-- Mathlib/Topology/Algebra/Module/FiniteDimension.lean
@[simp]
theorem constrL_apply {ι : Type*} [Fintype ι] (v : Basis ι 𝕜 E) (f : ι → F) (e : E) :
    v.constrL f e = ∑ i, v.equivFun e i • f i
-- Mathlib/Dynamics/PeriodicPts.lean
protected theorem map (hx : IsPeriodicPt fa n x) {g : α → β} (hg : Semiconj g fa fb) :
    IsPeriodicPt fb n (g x)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
@[simp] theorem dite_true {α : Sort u} {t : True → α} {e : ¬ True → α} : (dite True t e) = t True.intro
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem power_eq_two_power {c₁ c₂ : Cardinal} (h₁ : ℵ₀ ≤ c₁) (h₂ : 2 ≤ c₂) (h₂' : c₂ ≤ c₁) :
    c₂ ^ c₁ = 2 ^ c₁
-- Mathlib/MeasureTheory/Measure/OpenPos.lean
/-- See also `Metric.measure_closedBall_pos_iff`. -/
theorem measure_closedBall_pos (x : X) {r : ℝ} (hr : 0 < r) : 0 < μ (closedBall x r)
-- Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
theorem lt_dist_iff_lt_dist_coe_center :
    r < dist z w ↔ w.im * Real.sinh r < dist (z : ℂ) (w.center r)
-- Mathlib/Combinatorics/SimpleGraph/Coloring.lean
theorem IsClique.card_le_of_colorable {s : Finset V} (h : G.IsClique s) {n : ℕ}
    (hc : G.Colorable n) : s.card ≤ n
-- Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean
theorem toFun_spec'' (g : L ≃+* L) {n : ℕ+} {t : L} (ht : IsPrimitiveRoot t n) :
    g t = t ^ (χ₀ n g).val
-- Mathlib/Topology/Category/LightProfinite/Limits.lean
@[reassoc (attr := simp)]
lemma finiteCoproduct.ι_desc {B : LightProfinite.{max u w}} (e : (a : α) → (X a ⟶ B)) (a : α) :
    finiteCoproduct.ι X a ≫ finiteCoproduct.desc X e = e a
-- Mathlib/Probability/Distributions/Uniform.lean
lemma IsUniform.cond {s : Set E} :
    IsUniform (id : E → E) s (ProbabilityTheory.cond μ s) μ
-- Mathlib/Data/Matroid/Constructions.lean
@[simp] theorem loopyOn_restrict (E R : Set α) : (loopyOn E) ↾ R = loopyOn R
-- Mathlib/Combinatorics/Young/YoungDiagram.lean
@[mono]
theorem colLen_anti (μ : YoungDiagram) (j1 j2 : ℕ) (hj : j1 ≤ j2) : μ.colLen j2 ≤ μ.colLen j1
-- Mathlib/NumberTheory/Divisors.lean
theorem Prime.divisors {p : ℕ} (pp : p.Prime) : divisors p = {1, p}
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
theorem one_def : (1 : FreeAbelianGroup α) = of 1
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
theorem biprod.map_eq [HasBinaryBiproducts C] {W X Y Z : C} {f : W ⟶ Y} {g : X ⟶ Z} :
    biprod.map f g = biprod.fst ≫ f ≫ biprod.inl + biprod.snd ≫ g ≫ biprod.inr
-- Mathlib/Topology/Constructions.lean
theorem tendsto_subtype_rng {Y : Type*} {p : X → Prop} {l : Filter Y} {f : Y → Subtype p} :
    ∀ {x : Subtype p}, Tendsto f l (𝓝 x) ↔ Tendsto (fun x => (f x : X)) l (𝓝 (x : X))
-- Mathlib/Analysis/NormedSpace/QuaternionExponential.lean
/-- Auxiliary result; if the power series corresponding to `Real.cos` and `Real.sin` evaluated
at `‖q‖` tend to `c` and `s`, then the exponential series tends to `c + (s / ‖q‖)`. -/
theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s : ℝ}
    (hc : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / (2 * n)!) c)
    (hs : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n + 1) / (2 * n + 1)!) s) :
    HasSum (fun n => expSeries ℝ (Quaternion ℝ) n fun _ => q) (↑c + (s / ‖q‖) • q)
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
theorem liftPropOn_indep_chart [HasGroupoid M G] [HasGroupoid M' G'] (he : e ∈ G.maximalAtlas M)
    (hf : f ∈ G'.maximalAtlas M') (h : LiftPropOn P g s) {y : H}
    (hy : y ∈ e.target ∩ e.symm ⁻¹' (s ∩ g ⁻¹' f.source)) :
    P (f ∘ g ∘ e.symm) (e.symm ⁻¹' s) y
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem reverse_bijective {u v : V} : Function.Bijective (reverse : G.Walk u v → _)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma Z_eq_zero_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : P z = 0 ↔ Q z = 0
-- Mathlib/FieldTheory/IsPerfectClosure.lean
/-- If `i : K →+* L` is a ring homomorphism of exponential characteristic `p` rings, such that `L`
is perfect, then the `p`-nilradical of `K` is contained in the kernel of `i`. -/
theorem RingHom.pNilradical_le_ker_of_perfectRing [PerfectRing L p] :
    pNilradical K p ≤ RingHom.ker i
-- Mathlib/CategoryTheory/Iso.lean
theorem hom_eq_inv (α : X ≅ Y) (β : Y ≅ X) : α.hom = β.inv ↔ β.hom = α.inv
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem atEnd : ∀ {it}, ValidFor l r it → (it.atEnd ↔ r = [])
-- Mathlib/Analysis/Normed/Field/Basic.lean
/-- If `α` is a seminormed ring, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n` for `n > 0`.
See also `nnnorm_pow_le`. -/
theorem nnnorm_pow_le' (a : α) : ∀ {n : ℕ}, 0 < n → ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n
-- Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (a ^ ·) b
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
@[simp] protected theorem sub_add_cancel {n m : Nat} (h : m ≤ n) : n - m + m = n
-- Mathlib/Algebra/Group/Invertible/Basic.lean
theorem isUnit_of_invertible [Monoid α] (a : α) [Invertible a] : IsUnit a
-- Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
theorem const_mul_cancel (f g₁ g₂ : R) (U hu₁ hu₂) :
    const R f g₁ U hu₁ * const R g₁ g₂ U hu₂ = const R f g₂ U hu₂
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
@[simp] lemma ofNat_ne_bot (n : ℕ) [n.AtLeastTwo] : no_index (OfNat.ofNat n : WithBot α) ≠ ⊥
-- Mathlib/Order/Filter/Lift.lean
theorem lift_assoc {h : Set β → Filter γ} (hg : Monotone g) :
    (f.lift g).lift h = f.lift fun s => (g s).lift h
-- Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
theorem measurable_fderiv_with_param (hf : Continuous f.uncurry) :
    Measurable (fun (p : α × E) ↦ fderiv 𝕜 (f p.1) p.2)
-- Mathlib/Analysis/LocallyConvex/AbsConvex.lean
theorem coe_isOpen (s : AbsConvexOpenSets 𝕜 E) : IsOpen (s : Set E)
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
@[simp]
theorem im_inner_adjoint_mul_self_eq_zero (T : E →ₗ[𝕜] E) (x : E) :
    im ⟪x, LinearMap.adjoint T (T x)⟫ = 0
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem sumAssoc_symm_apply_inl {α β γ} (a) : (sumAssoc α β γ).symm (inl a) = inl (inl a)
-- Mathlib/Probability/Independence/Conditional.lean
lemma iCondIndepSets_iff (π : ι → Set (Set Ω)) (hπ : ∀ i s (_hs : s ∈ π i), MeasurableSet s)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' π μ ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → f i ∈ π i),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i ∈ s, (μ⟦f i | m'⟧)
-- Mathlib/Analysis/PSeries.lean
theorem le_tsum_condensed (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) :
    ∑' k, f k ≤ f 0 + ∑' k : ℕ, 2 ^ k * f (2 ^ k)
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem WithSeminorms.topologicalAddGroup (hp : WithSeminorms p) : TopologicalAddGroup E
-- Mathlib/Analysis/Normed/Operator/BoundedLinearMaps.lean
theorem smul (c : 𝕜) (hf : IsBoundedLinearMap 𝕜 f) : IsBoundedLinearMap 𝕜 (c • f)
-- Mathlib/Probability/Kernel/Disintegration/CondCdf.lean
theorem setLIntegral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) {s : Set α} (hs : MeasurableSet s)
    [IsFiniteMeasure ρ] : ∫⁻ x in s, preCDF ρ r x ∂ρ.fst = ρ.IicSnd r s
-- Mathlib/MeasureTheory/Measure/Trim.lean
lemma Measure.AbsolutelyContinuous.trim {ν : Measure α} (hμν : μ ≪ ν) (hm : m ≤ m0) :
    μ.trim hm ≪ ν.trim hm
-- Mathlib/Logic/IsEmpty.lean
@[simp]
theorem isEmpty_pprod : IsEmpty (PProd α β) ↔ IsEmpty α ∨ IsEmpty β
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem symm_dual_comp (g : BotHom βᵒᵈ γᵒᵈ) (f : BotHom αᵒᵈ βᵒᵈ) :
    TopHom.dual.symm (g.comp f) = (TopHom.dual.symm g).comp (TopHom.dual.symm f)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- A special case of `f ∘ id = f`, `f` a Localization map. -/
@[to_additive (attr := simp) "A special case of `f ∘ id = f`, `f` a Localization map."]
theorem ofMulEquivOfDom_id :
    f.ofMulEquivOfDom
        (show S.map (MulEquiv.refl M).toMonoidHom = S from
          Submonoid.ext fun x ↦ ⟨fun ⟨_, hy, h⟩ ↦ h ▸ hy, fun h ↦ ⟨x, h, rfl⟩⟩) = f
-- Mathlib/Order/WithBot.lean
@[simp]
theorem ofDual_apply_top : WithTop.ofDual (⊤ : WithTop α) = ⊥
-- Mathlib/Topology/MetricSpace/MetricSeparated.lean
protected theorem disjoint (h : IsMetricSeparated s t) : Disjoint s t
-- Mathlib/Probability/Density.lean
theorem hasFiniteIntegral_mul {f : ℝ → ℝ} {g : ℝ → ℝ≥0∞} (hg : pdf X ℙ =ᵐ[volume] g)
    (hgi : ∫⁻ x, ‖f x‖₊ * g x ≠ ∞) :
    HasFiniteIntegral fun x => f x * (pdf X ℙ volume x).toReal
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
theorem interedges_disjoint_right (s : Finset α) (ht : Disjoint t₁ t₂) :
    Disjoint (G.interedges s t₁) (G.interedges s t₂)
-- Mathlib/Data/Nat/Defs.lean
lemma div_le_iff_le_mul_add_pred (hb : 0 < b) : a / b ≤ c ↔ a ≤ b * c + (b - 1)
-- Mathlib/Order/Monotone/Basic.lean
theorem strictAnti_dual_iff : StrictAnti (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ) ↔ StrictAnti f
-- Mathlib/Probability/Martingale/Convergence.lean
/-- An L¹-bounded submartingale has bounded upcrossings almost everywhere. -/
theorem Submartingale.upcrossings_ae_lt_top' [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) (hab : a < b) : ∀ᵐ ω ∂μ, upcrossings a b f ω < ∞
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- If `R` and `ι` lie in the same universe, the rank of `(ι →₀ R)` is `# ι`. -/
theorem rank_finsupp_self' {ι : Type u} : Module.rank R (ι →₀ R) = #ι
-- .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean
theorem eraseIdx_subset (l : List α) (k : Nat) : eraseIdx l k ⊆ l
-- Mathlib/Analysis/Analytic/CPolynomial.lean
theorem CPolynomialAt.sub (hf : CPolynomialAt 𝕜 f x) (hg : CPolynomialAt 𝕜 g x) :
    CPolynomialAt 𝕜 (f - g) x
-- Mathlib/Geometry/Euclidean/MongePoint.lean
/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁
-- Mathlib/Order/Max.lean
theorem Prod.isMax_iff : IsMax x ↔ IsMax x.1 ∧ IsMax x.2
-- Mathlib/Analysis/Normed/Group/Quotient.lean
theorem lift_norm_le {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M)
    (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) {c : ℝ≥0} (fb : ‖f‖ ≤ c) :
    ‖lift S f hf‖ ≤ c
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem IsLimit.aleph0_le {c : Cardinal} (h : IsLimit c) : ℵ₀ ≤ c
-- Mathlib/Topology/MetricSpace/DilationEquiv.lean
@[simp] theorem ratio_refl : ratio (refl X) = 1
-- Mathlib/Order/Filter/AtTopBot.lean
theorem Tendsto.atTop_mul_atTop (hf : Tendsto f l atTop) (hg : Tendsto g l atTop) :
    Tendsto (fun x => f x * g x) l atTop
-- Mathlib/Analysis/SpecialFunctions/Sqrt.lean
theorem ContDiffAt.sqrt (hf : ContDiffAt ℝ n f x) (hx : f x ≠ 0) :
    ContDiffAt ℝ n (fun y => √(f y)) x
-- Mathlib/Data/List/Perm.lean
theorem Perm.bagInter_left (l : List α) {t₁ t₂ : List α} (p : t₁ ~ t₂) :
    l.bagInter t₁ = l.bagInter t₂
-- Mathlib/Logic/Embedding/Basic.lean
/-- Embedding into `Option α` using `some`. -/
@[simps (config := .asFn)]
protected def some {α} : α ↪ Option α
-- Mathlib/Order/SupClosed.lean
@[simp] lemma infClosure_singleton : infClosure {a} = {a}
-- Mathlib/RingTheory/Localization/NumDen.lean
theorem eq_zero_of_num_eq_zero {x : K} (h : num A x = 0) : x = 0
-- Mathlib/Analysis/Convex/Jensen.lean
/-- **Maximum principle** for convex functions on a segment. If a function `f` is convex on the
segment `[x, y]`, then the eventual maximum of `f` on `[x, y]` is at `x` or `y`. -/
lemma ConvexOn.le_max_of_mem_segment (hf : ConvexOn 𝕜 [x -[𝕜] y] f) (hz : z ∈ [x -[𝕜] y]) :
    f z ≤ max (f x) (f y)
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem derivative_natCast_mul {n : ℕ} {f : R[X]} :
    derivative ((n : R[X]) * f) = n * derivative f
-- Mathlib/Data/Set/Basic.lean
theorem diff_subset_iff {s t u : Set α} : s \ t ⊆ u ↔ s ⊆ t ∪ u
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean
/-- If `f₁ = f₂` and `g₁ = g₂`, we may construct a canonical
isomorphism `pushout f₁ g₁ ≅ pullback f₂ g₂` -/
@[simps! hom]
def pushout.congrHom {X Y Z : C} {f₁ f₂ : X ⟶ Y} {g₁ g₂ : X ⟶ Z} (h₁ : f₁ = f₂) (h₂ : g₁ = g₂)
    [HasPushout f₁ g₁] [HasPushout f₂ g₂] : pushout f₁ g₁ ≅ pushout f₂ g₂
-- Mathlib/Topology/Order/Hom/Esakia.lean
@[simp]
theorem comp_apply (g : EsakiaHom β γ) (f : EsakiaHom α β) (a : α) : (g.comp f) a = g (f a)
-- Mathlib/Data/Real/Pi/Wallis.lean
theorem W_pos (k : ℕ) : 0 < W k
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem midpoint_le_midpoint (ha : a ≤ a') (hb : b ≤ b') : midpoint k a b ≤ midpoint k a' b'
-- Mathlib/Order/Heyting/Hom.lean
@[simp]
theorem comp_assoc (f : HeytingHom γ δ) (g : HeytingHom β γ) (h : HeytingHom α β) :
    (f.comp g).comp h = f.comp (g.comp h)
-- Mathlib/RingTheory/SimpleModule.lean
theorem LinearMap.isSimpleModule_iff_of_bijective [Module S N] {σ : R →+* S} [RingHomSurjective σ]
    (l : M →ₛₗ[σ] N) (hl : Function.Bijective l) : IsSimpleModule R M ↔ IsSimpleModule S N
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
protected theorem le_of_add_le_add_right [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (ha : a ≠ ⊥) (h : b + a ≤ c + a) : b ≤ c
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem sublist_of_cons_sublist : a :: l₁ <+ l₂ → l₁ <+ l₂
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem gc_map_comap (f : A →⋆ₐ[R] B) : GaloisConnection (map f) (comap f)
-- Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean
@[simp]
theorem Finsupp.toFreeAbelianGroup_comp_singleAddHom (x : X) :
    Finsupp.toFreeAbelianGroup.comp (Finsupp.singleAddHom x) =
      (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)
-- Mathlib/Order/Category/PartOrd.lean
/-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β
-- Mathlib/LinearAlgebra/CrossProduct.lean
/-- The cross product satisfies the Leibniz lie property. -/
theorem leibniz_cross (u v w : Fin 3 → R) : u ×₃ (v ×₃ w) = u ×₃ v ×₃ w + v ×₃ (u ×₃ w)
-- Mathlib/Topology/Algebra/Module/Simple.lean
/-- The kernel of a linear map taking values in a simple module over the base ring is closed or
dense. Applies, e.g., to the case when `R = N` is a division ring. -/
theorem LinearMap.isClosed_or_dense_ker (l : M →ₗ[R] N) :
    IsClosed (LinearMap.ker l : Set M) ∨ Dense (LinearMap.ker l : Set M)
-- Mathlib/Data/Part.lean
@[simp]
theorem not_mem_none (a : α) : a ∉ @none α
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
@[simp]
theorem cycleOf_self_apply (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
    cycleOf f (f x) = cycleOf f x
-- Mathlib/Logic/Equiv/Fin.lean
@[simp]
theorem finSuccEquivLast_castSucc (i : Fin n) : finSuccEquivLast (Fin.castSucc i) = some i
-- Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
theorem tmul_of_gradedMul_of_tmul (j₁ i₂ : ι)
    (a₁ : ⨁ i, 𝒜 i) (b₁ : ℬ j₁) (a₂ : 𝒜 i₂) (b₂ : ⨁ i, ℬ i) :
    gradedMul R 𝒜 ℬ (a₁ ⊗ₜ lof R _ ℬ j₁ b₁) (lof R _ 𝒜 i₂ a₂ ⊗ₜ b₂) =
      (-1 : ℤˣ)^(j₁ * i₂) • ((a₁ * lof R _ 𝒜 _ a₂) ⊗ₜ (lof R _ ℬ _ b₁ * b₂))
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem iUnion_of_empty [IsEmpty ι] (s : ι → Set α) : ⋃ i, s i = ∅
-- Mathlib/Order/Filter/Cofinite.lean
theorem coprodᵢ_cofinite {α : ι → Type*} [Finite ι] :
    (Filter.coprodᵢ fun i => (cofinite : Filter (α i))) = cofinite
-- Mathlib/Topology/Sober.lean
theorem mem_closed_set_iff (h : IsGenericPoint x S) (hZ : IsClosed Z) : x ∈ Z ↔ S ⊆ Z
-- Mathlib/Data/PNat/Defs.lean
@[simp]
theorem ne_zero (n : ℕ+) : (n : ℕ) ≠ 0
-- Mathlib/Data/Real/EReal.lean
@[simp]
theorem zero_ne_top : (0 : EReal) ≠ ⊤
-- Mathlib/RingTheory/HahnSeries/Summable.lean
@[simp]
theorem coe_ofFinsupp {f : α →₀ HahnSeries Γ R} : ⇑(SummableFamily.ofFinsupp f) = f
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
/-- For any `p`, the power of `p` in `x^n` is `n` times the power in `x` -/
theorem factorization_pow {x : α} {n : ℕ} : factorization (x ^ n) = n • factorization x
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometry.norm_iteratedFDeriv_comp_left {f : E → F} (g : F →ₗᵢ[𝕜] G)
    (hf : ContDiff 𝕜 n f) (x : E) {i : ℕ} (hi : (i : ℕ∞) ≤ n) :
    ‖iteratedFDeriv 𝕜 i (g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
lemma prod_attach (s : Finset α) (f : α → β) : ∏ x ∈ s.attach, f x = ∏ x ∈ s, f x
-- Mathlib/Algebra/DirectSum/Internal.lean
theorem SetLike.intCast_mem_graded [Zero ι] [AddGroupWithOne R] [SetLike σ R]
    [AddSubgroupClass σ R] (A : ι → σ) [SetLike.GradedOne A] (z : ℤ) : (z : R) ∈ A 0
-- Mathlib/Topology/Compactness/Compact.lean
/-- A closed subset of a compact set is a compact set. -/
theorem IsCompact.of_isClosed_subset (hs : IsCompact s) (ht : IsClosed t) (h : t ⊆ s) :
    IsCompact t
-- Mathlib/Analysis/Convex/Integral.lean
/-- If `μ` is a probability measure on `α`, `s` is a convex closed set in `E`, and `f` is an
integrable function sending `μ`-a.e. points to `s`, then the expected value of `f` belongs to `s`:
`∫ x, f x ∂μ ∈ s`. See also `Convex.sum_mem` for a finite sum version of this lemma. -/
theorem Convex.integral_mem [IsProbabilityMeasure μ] (hs : Convex ℝ s) (hsc : IsClosed s)
    (hf : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) : (∫ x, f x ∂μ) ∈ s
-- Mathlib/SetTheory/Ordinal/Principal.lean
@[simp]
theorem principal_one_iff {op : Ordinal → Ordinal → Ordinal} : Principal op 1 ↔ op 0 0 = 0
-- Mathlib/Topology/Sheaves/LocallySurjective.lean
theorem isLocallySurjective_iff (T : ℱ ⟶ 𝒢) :
    IsLocallySurjective T ↔
      ∀ (U t), ∀ x ∈ U, ∃ (V : _) (ι : V ⟶ U), (∃ s, T.app _ s = t |_ₕ ι) ∧ x ∈ V
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean
@[simp]
theorem aeval_T (x : A) (n : ℤ) : aeval x (T R n) = (T A n).eval x
-- Mathlib/Data/Complex/Exponential.lean
theorem exp_list_sum (l : List ℂ) : exp l.sum = (l.map exp).prod
-- Mathlib/Data/Nat/Squarefree.lean
theorem _root_.Squarefree.natFactorization_le_one {n : ℕ} (p : ℕ) (hn : Squarefree n) :
    n.factorization p ≤ 1
-- Mathlib/Data/Set/Image.lean
theorem preimage_eq_iff_eq_image {f : α → β} (hf : Bijective f) {s t} :
    f ⁻¹' s = t ↔ s = f '' t
-- Mathlib/Order/Grade.lean
@[simp]
theorem grade_le_grade_iff : grade 𝕆 a ≤ grade 𝕆 b ↔ a ≤ b
-- Mathlib/Data/Int/Cast/Field.lean
@[simp]
theorem cast_div [DivisionRing α] {m n : ℤ} (n_dvd : n ∣ m) (hn : (n : α) ≠ 0) :
    ((m / n : ℤ) : α) = m / n
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
theorem inv_mul {z : ℤ_[p]} (hz : ‖z‖ = 1) : z.inv * z = 1
-- Mathlib/GroupTheory/Subsemigroup/Centralizer.lean
@[to_additive (attr := simp)]
theorem centralizer_univ : centralizer Set.univ = center M
-- Mathlib/Algebra/Category/CoalgebraCat/Basic.lean
@[simp]
theorem forget₂_map (X Y : CoalgebraCat R) (f : X ⟶ Y) :
    (forget₂ (CoalgebraCat R) (ModuleCat R)).map f = (f.toCoalgHom : X →ₗ[R] Y)
-- Mathlib/Data/Multiset/Basic.lean
@[ext]
theorem addHom_ext [AddZeroClass β] ⦃f g : Multiset α →+ β⦄ (h : ∀ x, f {x} = g {x}) : f = g
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem powers_le_nonZeroDivisors_of_noZeroDivisors [NoZeroDivisors M] {a : M} (ha : a ≠ 0) :
    Submonoid.powers a ≤ M⁰
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
@[simp] theorem Bool.not_eq_false (b : Bool) : (¬(b = false)) = (b = true)
-- Mathlib/Analysis/Normed/Module/WeakDual.lean
theorem polar_def (s : Set E) : polar 𝕜 s = { f : WeakDual 𝕜 E | ∀ x ∈ s, ‖f x‖ ≤ 1 }