ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/RelClasses.lean
theorem IsStrictOrder.swap (r) [IsStrictOrder α r] : IsStrictOrder α (swap r)
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- If `s` is a measurable set in a standard Borel space, there is a compatible Polish topology
making `s` clopen. -/
theorem _root_.MeasurableSet.isClopenable' {s : Set α} (hs : MeasurableSet s) :
    ∃ _ : TopologicalSpace α, BorelSpace α ∧ PolishSpace α ∧ IsClosed s ∧ IsOpen s
-- Mathlib/Order/Filter/Extr.lean
theorem IsMaxOn.max (hf : IsMaxOn f s a) (hg : IsMaxOn g s a) :
    IsMaxOn (fun x => max (f x) (g x)) s a
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem IsPrime.inf_le' {s : Finset ι} {f : ι → Ideal R} {P : Ideal R} (hp : IsPrime P) :
    s.inf f ≤ P ↔ ∃ i ∈ s, f i ≤ P
-- Mathlib/Logic/Hydra.lean
lemma cutExpand_double {a a₁ a₂} (h₁ : r a₁ a) (h₂ : r a₂ a) : CutExpand r {a₁, a₂} {a}
-- Mathlib/Tactic/NormNum/Basic.lean
theorem ne_of_true_of_false {a b : Prop} (ha : a) (hb : ¬b) : a ≠ b
-- Mathlib/Analysis/ConstantSpeed.lean
theorem edist_naturalParameterization_eq_zero {f : α → E} {s : Set α}
    (hf : LocallyBoundedVariationOn f s) {a : α} (as : a ∈ s) {b : α} (bs : b ∈ s) :
    edist (naturalParameterization f s a (variationOnFromTo f s a b)) (f b) = 0
-- Mathlib/Data/Finmap.lean
@[simp]
theorem mem_singleton (x y : α) (b : β y) : x ∈ singleton y b ↔ x = y
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem type_cardinal : @type Cardinal (· < ·) _ = Ordinal.univ.{u, u + 1}
-- Mathlib/Analysis/Calculus/Deriv/Support.lean
theorem support_deriv_subset : support (deriv f) ⊆ tsupport f
-- Mathlib/Order/Interval/Finset/Fin.lean
@[simp]
theorem map_valEmbedding_Iic : (Iic b).map Fin.valEmbedding = Iic ↑b
-- Mathlib/Topology/Hom/Open.lean
@[simp]
theorem id_apply (a : α) : ContinuousOpenMap.id α a = a
-- Mathlib/Data/Finset/Basic.lean
@[simp, norm_cast]
theorem coe_singleton (a : α) : (({a} : Finset α) : Set α) = {a}
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
lemma EquicontinuousOn.mono {F : ι → X → α} {S T : Set X}
    (H : EquicontinuousOn F T) (hST : S ⊆ T) : EquicontinuousOn F S
-- Mathlib/CategoryTheory/Localization/Construction.lean
theorem _root_.CategoryTheory.MorphismProperty.Q_inverts : W.IsInvertedBy W.Q
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem measurable_find {p : α → ℕ → Prop} [∀ x, DecidablePred (p x)] (hp : ∀ x, ∃ N, p x N)
    (hm : ∀ k, MeasurableSet { x | p x k }) : Measurable fun x => Nat.find (hp x)
-- Mathlib/Algebra/CharP/Defs.lean
lemma ringChar_of_prime_eq_zero [Nontrivial R] {p : ℕ} (hprime : Nat.Prime p)
    (hp0 : (p : R) = 0) : ringChar R = p
-- Mathlib/Topology/Order/ScottTopology.lean
/-- Predicate for an ordered topological space to be equipped with its Scott topology.

The Scott topology is defined as the join of the topology of upper sets and the Scott Hausdorff
topology. -/
class IsScott : Prop where
  topology_eq_scott : ‹TopologicalSpace α› = scott α
-- Mathlib/Algebra/Module/Torsion.lean
theorem isTorsionBy_quotient_iff (N : Submodule R M) (r : R) :
    IsTorsionBy R (M⧸N) r ↔ ∀ x, r • x ∈ N
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_smul_le (a : R) (p : R[X]) : degree (a • p) ≤ degree p
-- Mathlib/Order/CompactlyGenerated/Basic.lean
theorem IsSupFiniteCompact.isSupClosedCompact (h : IsSupFiniteCompact α) :
    IsSupClosedCompact α
-- Mathlib/Data/Finsupp/Basic.lean
/-- See note [partially-applied ext lemmas]. -/
@[ext]
theorem distribMulActionHom_ext' {f g : (α →₀ M) →+[R] N}
    (h : ∀ a : α, f.comp (DistribMulActionHom.single a) = g.comp (DistribMulActionHom.single a)) :
    f = g
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem Integrable.simpleFunc_mul' (hm : m ≤ m0) (g : @SimpleFunc X m ℝ) (hf : Integrable f μ) :
    Integrable (⇑g * f) μ
-- Mathlib/Data/Nat/Defs.lean
lemma pred_add_self (n : ℕ) : pred n + n = (2 * n).pred
-- Mathlib/Algebra/Homology/Embedding/Restriction.lean
@[reassoc]
lemma restriction_d_eq {i j : ι} {i' j' : ι'} (hi : e.f i = i') (hj : e.f j = j') :
    (K.restriction e).d i j = (K.restrictionXIso e hi).hom ≫ K.d i' j' ≫
      (K.restrictionXIso e hj).inv
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigOWith.sub (h₁ : IsBigOWith c₁ l f₁ g) (h₂ : IsBigOWith c₂ l f₂ g) :
    IsBigOWith (c₁ + c₂) l (fun x => f₁ x - f₂ x) g
-- Mathlib/SetTheory/Game/Basic.lean
@[simp]
theorem quot_right_distrib_sub (x y z : PGame) : (⟦(y - z) * x⟧ : Game) = ⟦y * x⟧ - ⟦z * x⟧
-- Mathlib/CategoryTheory/Abelian/DiagramLemmas/Four.lean
theorem epi_of_epi_of_epi_of_mono (hR₁ : R₁.Exact) (hR₂ : R₂.Exact)
    (h₀ : Epi (app' φ 0)) (h₂ : Epi (app' φ 2)) (h₃ : Mono (app' φ 3)) :
    Epi (app' φ 1)
-- Mathlib/Analysis/Convex/Combination.lean
theorem convexHull_multiset_sum (s : Multiset (Set E)) :
    convexHull R s.sum = (s.map <| convexHull R).sum
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem Iso.symm_apply_reachable {G : SimpleGraph V} {G' : SimpleGraph V'} {φ : G ≃g G'} {u : V}
    {v : V'} : G.Reachable (φ.symm v) u ↔ G'.Reachable v (φ u)
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem cons_merge_cons (s : α → α → Bool) (a b l r) :
  merge s (a::l) (b::r) = if s a b then a :: merge s l (b::r) else b :: merge s (a::l) r
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[deprecated getElem_set_ne (since := "2024-06-12")]
theorem get_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}
    (hj : j < (l.set i a).length) :
    (l.set i a).get ⟨j, hj⟩ = l.get ⟨j, by simp at hj; exact hj⟩
-- Mathlib/Analysis/Convex/Extreme.lean
theorem extremePoints_convexHull_subset : (convexHull 𝕜 A).extremePoints 𝕜 ⊆ A
-- Mathlib/Order/Filter/AtTopBot.lean
theorem not_tendsto_const_atBot [Preorder α] [NoMinOrder α] (x : α) (l : Filter β) [l.NeBot] :
    ¬Tendsto (fun _ => x) l atBot
-- Mathlib/RingTheory/Ideal/Basic.lean
@[simp]
theorem span_pair_add_mul_left {R : Type u} [CommRing R] {x y : R} (z : R) :
    (span {x + y * z, y} : Ideal R) = span {x, y}
-- Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean
theorem hasStrictDerivAt_const_cpow {x y : ℂ} (h : x ≠ 0 ∨ y ≠ 0) :
    HasStrictDerivAt (fun y => x ^ y) (x ^ y * log x) y
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z
-- Mathlib/Algebra/Homology/SingleHomology.lean
lemma isZero_single_obj_homology (A : C) (i : ι) (hi : i ≠ j) :
    IsZero (((single C c j).obj A).homology i)
-- Mathlib/Data/Set/Pointwise/Interval.lean
theorem image_neg_Ici : Neg.neg '' Ici a = Iic (-a)
-- Mathlib/Geometry/Euclidean/Sphere/Basic.lean
/-- A set of points is cospherical if and only if they lie in some sphere. -/
theorem cospherical_iff_exists_sphere {ps : Set P} :
    Cospherical ps ↔ ∃ s : Sphere P, ps ⊆ (s : Set P)
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
@[simp, norm_cast]
lemma rpow_intCast (x : ℝ≥0∞) (n : ℤ) : x ^ (n : ℝ) = x ^ n
-- Mathlib/Order/PartialSups.lean
lemma partialSups_apply {ι : Type*} {π : ι → Type*} [(i : ι) → SemilatticeSup (π i)]
    (f : ℕ → (i : ι) → π i) (n : ℕ) (i : ι) : partialSups f n i = partialSups (f · i) n
-- Mathlib/Order/ConditionallyCompleteLattice/Finset.lean
theorem sup'_id_eq_csSup (s : Finset α) (hs) : s.sup' hs id = sSup s
-- Mathlib/Order/PrimeIdeal.lean
theorem F_union_I : (IF.F : Set P) ∪ IF.I = Set.univ
-- Mathlib/Data/Real/Hyperreal.lean
theorem infinite_iff_not_exists_st {x : ℝ*} : Infinite x ↔ ¬∃ r : ℝ, IsSt x r
-- Mathlib/Order/Filter/Basic.lean
theorem HasSubset.Subset.eventuallyLE {α} {l : Filter α} {s t : Set α} (h : s ⊆ t) : s ≤ᶠ[l] t
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Ioo_insert_left (h : a < b) : insert a (Ioo a b) = Ico a b
-- Mathlib/Order/Monotone/Basic.lean
@[simp]
theorem strictMono_toDual_comp_iff : StrictMono (toDual ∘ f : α → βᵒᵈ) ↔ StrictAnti f
-- Mathlib/MeasureTheory/MeasurableSpace/Card.lean
theorem compl_mem_generateMeasurableRec {s : Set (Set α)} {i j : ω₁} (h : j < i) {t : Set α}
    (ht : t ∈ generateMeasurableRec s j) : tᶜ ∈ generateMeasurableRec s i
-- Mathlib/SetTheory/Ordinal/Principal.lean
theorem opow_omega {a : Ordinal} (a1 : 1 < a) (h : a < omega) : (a^omega) = omega
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem one_mem_inv_coe_ideal [IsDomain A] {I : Ideal A} (hI : I ≠ ⊥) :
    (1 : K) ∈ (I : FractionalIdeal A⁰ K)⁻¹
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
theorem uniq_cocone_morphism {s t : Cocone F} (h : IsColimit t) {f f' : t ⟶ s} : f = f'
-- Mathlib/Algebra/Ring/BooleanRing.lean
@[simp]
theorem ofBoolAlg_symm_eq : (@ofBoolAlg α).symm = toBoolAlg
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem lebesgue_number_lemma_of_metric_sUnion {s : Set α} {c : Set (Set α)} (hs : IsCompact s)
    (hc₁ : ∀ t ∈ c, IsOpen t) (hc₂ : s ⊆ ⋃₀ c) : ∃ δ > 0, ∀ x ∈ s, ∃ t ∈ c, ball x δ ⊆ t
-- Mathlib/Algebra/Algebra/Hom.lean
@[deprecated map_pow (since := "2024-06-26")]
protected theorem map_pow (x : A) (n : ℕ) : φ (x ^ n) = φ x ^ n
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem le_minFac' {m n : ℕ} : n = 1 ∨ m ≤ minFac n ↔ ∀ p, 2 ≤ p → p ∣ n → m ≤ p
-- Mathlib/Order/CompleteLattice.lean
theorem sInf_lt_iff : sInf s < b ↔ ∃ a ∈ s, a < b
-- Mathlib/Algebra/Ring/Subring/Pointwise.lean
@[simp]
theorem pointwise_smul_toSubsemiring (m : M) (S : Subring R) :
    (m • S).toSubsemiring = m • S.toSubsemiring
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem hasDerivAtFilter_iff_tendsto :
    HasDerivAtFilter f f' x L ↔
      Tendsto (fun x' : 𝕜 => ‖x' - x‖⁻¹ * ‖f x' - f x - (x' - x) • f'‖) L (𝓝 0)
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
@[reassoc (attr := simp)]
theorem Subpresheaf.homOfLe_ι {G G' : Subpresheaf F} (h : G ≤ G') :
    Subpresheaf.homOfLe h ≫ G'.ι = G.ι
-- Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean
lemma ShortExact.moduleCat_exact_iff_function_exact :
    S.Exact ↔ Function.Exact S.f S.g
-- Mathlib/Data/List/MinMax.lean
@[simp]
theorem argmin_nil (f : α → β) : argmin f [] = none
-- Mathlib/Analysis/Convex/Topology.lean
/-- If `s` is a convex set, then `a • interior s + b • s ⊆ interior s` for all `0 < a`, `0 ≤ b`,
`a + b = 1`. See also `Convex.combo_interior_closure_subset_interior` for a stronger version. -/
theorem Convex.combo_interior_self_subset_interior {s : Set E} (hs : Convex 𝕜 s) {a b : 𝕜}
    (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) : a • interior s + b • s ⊆ interior s
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_one_eq_id : (· * (1 : M)) = id
-- Mathlib/RingTheory/Finiteness.lean
/-- If 0 → M' → M → M'' → 0 is exact and M' and M'' are
finitely generated then so is M. -/
theorem fg_of_fg_map_of_fg_inf_ker {R M P : Type*} [Ring R] [AddCommGroup M] [Module R M]
    [AddCommGroup P] [Module R P] (f : M →ₗ[R] P) {s : Submodule R M}
    (hs1 : (s.map f).FG)
    (hs2 : (s ⊓ LinearMap.ker f).FG) : s.FG
-- Mathlib/Data/Vector/Basic.lean
theorem eraseIdx_insertNth {v : Vector α n} {i : Fin (n + 1)} :
    eraseIdx i (insertNth a i v) = v
-- Mathlib/CategoryTheory/Galois/Decomposition.lean
/-- Any connected object admits a hom from a Galois object. -/
lemma exists_hom_from_galois_of_connected (X : C) [IsConnected X] :
    ∃ (A : C) (_ : A ⟶ X), IsGalois A
-- Mathlib/Data/Nat/Factorization/Root.lean
@[simp] lemma ceilRoot_pow_self (hn : n ≠ 0) (a : ℕ) : ceilRoot n (a ^ n) = a
-- Mathlib/Control/Traversable/Instances.lean
protected theorem map_traverse {α β γ} (g : α → G β) (f : β → γ) (x : σ ⊕ α) :
    (f <$> ·) <$> Sum.traverse g x = Sum.traverse (f <$> g ·) x
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp, norm_cast]
theorem coe_inter (x y : ZFSet.{u}) : ↑(x ∩ y) = (x : Class.{u}) ∩ y
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem withTop_comp (f : SupHom β γ) (g : SupHom α β) :
    (f.comp g).withTop = f.withTop.comp g.withTop
-- Mathlib/NumberTheory/NumberField/House.lean
private theorem asiegel_ne_0 : asiegel K a ≠ 0
-- Mathlib/Probability/Kernel/Condexp.lean
lemma condexpKernel_apply_eq_condDistrib {ω : Ω} :
    condexpKernel μ m ω = @condDistrib Ω Ω Ω mΩ _ _ mΩ (m ⊓ mΩ) id id μ _ (id ω)
-- Mathlib/Topology/Maps/Basic.lean
theorem continuousAt_iff (hg : Inducing g) {x : X} :
    ContinuousAt f x ↔ ContinuousAt (g ∘ f) x
-- Mathlib/Logic/Function/FromTypes.lean
theorem fromTypes_cons {n} (α : Type u) (p : Fin n → Type u) (τ : Type u) :
    FromTypes (vecCons α p) τ = (α → FromTypes p τ)
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem DifferentiableAt.add_const (hf : DifferentiableAt 𝕜 f x) (c : F) :
    DifferentiableAt 𝕜 (fun y => f y + c) x
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp, norm_cast]
theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem exists_prime_factors (a : α) :
    a ≠ 0 → ∃ f : Multiset α, (∀ b ∈ f, Prime b) ∧ f.prod ~ᵤ a
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem zero_smul_subset (t : Set β) : (0 : Set α) • t ⊆ 0
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
/-- The power series expansion of `Complex.sinh`. -/
lemma hasSum_sinh (z : ℂ) : HasSum (fun n ↦ z ^ (2 * n + 1) / ↑(2 * n + 1)!) (sinh z)
-- Mathlib/CategoryTheory/Iso.lean
@[simp]
theorem inv_hom_id_assoc (f : X ⟶ Y) [I : IsIso f] {Z} (g : Y ⟶ Z) : inv f ≫ f ≫ g = g
-- Mathlib/CategoryTheory/Localization/SmallShiftedHom.lean
lemma equiv_shift {a : M} [HasSmallLocalizedShiftedHom.{w} W M X Y]
    [HasSmallLocalizedShiftedHom.{w} W M Y Y]
    (f : SmallShiftedHom.{w} W X Y a) (n a' : M) (h : a + n = a') :
    equiv W L (f.shift n a' h) = (L.commShiftIso n).hom.app X ≫ (equiv W L f)⟦n⟧' ≫
      (shiftFunctorAdd' D a n a' h).inv.app (L.obj Y)
-- Mathlib/NumberTheory/NumberField/Basic.lean
lemma mk_eq_mk (x y : K) (hx hy) : (⟨x, hx⟩ : 𝓞 K) = ⟨y, hy⟩ ↔ x = y
-- Mathlib/Algebra/TrivSqZeroExt.lean
theorem lift_def (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r • x) = f r * g x)
    (hgf : ∀ r x, g (op r • x) = g x * f r) (x : tsze R M) :
    lift f g hg hfg hgf x = f x.fst + g x.snd
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem coeff_eq_zero (hφ : IsHomogeneous φ n) {d : σ →₀ ℕ} (hd : d.degree ≠ n) :
    coeff d φ = 0
-- Mathlib/Logic/Equiv/Basic.lean
theorem swap_apply_of_ne_of_ne {a b x : α} : x ≠ a → x ≠ b → swap a b x = x
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem radical_top : (radical ⊤ : Ideal R) = ⊤
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
/-- Distance between the images of any two points is at most twice the norm of the function. -/
theorem dist_le_two_norm (x y : α) : dist (f x) (f y) ≤ 2 * ‖f‖
-- Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean
lemma mono₂ (h : T.mor₁ = 0) : Mono T.mor₂
-- Mathlib/Order/Basic.lean
protected theorem GE.ge.le [LE α] {x y : α} (h : x ≥ y) : y ≤ x
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean
theorem quadraticChar_zero : quadraticChar F 0 = 0
-- Mathlib/GroupTheory/Nilpotent.lean
theorem nilpotencyClass_zero_iff_subsingleton [IsNilpotent G] :
    Group.nilpotencyClass G = 0 ↔ Subsingleton G
-- Mathlib/Combinatorics/Hindman.lean
@[to_additive]
theorem FP.singleton {M} [Semigroup M] (a : Stream' M) (i : ℕ) : a.get i ∈ FP a
-- Mathlib/Algebra/MvPolynomial/Monad.lean
theorem aeval_id_rename (f : σ → MvPolynomial τ R) (p : MvPolynomial σ R) :
    aeval id (rename f p) = aeval f p
-- Mathlib/Order/Irreducible.lean
theorem IsMin.not_supPrime (ha : IsMin a) : ¬SupPrime a
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem map_mul : map f (I * J) = map f I * map f J
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean
/-- If a Cauchy sequence of continuous linear map converges to a continuous linear map pointwise,
then it converges to the same map in norm. This lemma is used to prove that the space of continuous
linear maps is complete provided that the codomain is a complete space. -/
theorem tendsto_of_tendsto_pointwise_of_cauchySeq {f : ℕ → E' →SL[σ₁₂] F} {g : E' →SL[σ₁₂] F}
    (hg : Tendsto (fun n x => f n x) atTop (𝓝 g)) (hf : CauchySeq f) : Tendsto f atTop (𝓝 g)
-- Mathlib/Order/SuccPred/Limit.lean
theorem not_isSuccLimit [NoMinOrder α] : ¬IsSuccLimit a
-- Mathlib/MeasureTheory/Measure/Restrict.lean
@[simp]
theorem restrict_smul {_m0 : MeasurableSpace α} (c : ℝ≥0∞) (μ : Measure α) (s : Set α) :
    (c • μ).restrict s = c • μ.restrict s
-- Mathlib/Topology/Homotopy/Equiv.lean
/--
If `X` is homotopy equivalent to `Y`, and `Y` is homotopy equivalent to `Z`, then `X` is homotopy
equivalent to `Z`.
-/
@[simps!]
def trans (h₁ : X ≃ₕ Y) (h₂ : Y ≃ₕ Z) : X ≃ₕ Z
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- General fencing theorem for continuous functions with an estimate on the norm of the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `‖f a‖ ≤ B a`;
* `f` and `B` have right derivatives `f'` and `B'` respectively at every point of `[a, b)`;
* the norm of `f'` is strictly less than `B'` whenever `‖f x‖ = B x`.

Then `‖f x‖ ≤ B x` everywhere on `[a, b]`. We use one-sided derivatives in the assumptions
to make this theorem work for piecewise differentiable functions.
-/
theorem image_norm_le_of_norm_deriv_right_lt_deriv_boundary' {f' : ℝ → E}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    {B B' : ℝ → ℝ} (ha : ‖f a‖ ≤ B a) (hB : ContinuousOn B (Icc a b))
    (hB' : ∀ x ∈ Ico a b, HasDerivWithinAt B (B' x) (Ici x) x)
    (bound : ∀ x ∈ Ico a b, ‖f x‖ = B x → ‖f' x‖ < B' x) : ∀ ⦃x⦄, x ∈ Icc a b → ‖f x‖ ≤ B x
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem factors_prime_pow [Nontrivial α] {p : Associates α} (hp : Irreducible p) (k : ℕ) :
    factors (p ^ k) = WithTop.some (Multiset.replicate k ⟨p, hp⟩)
-- Mathlib/RingTheory/IntegralClosure/IntegrallyClosed.lean
/-- Being integrally closed is preserved under injective algebra homomorphisms. -/
theorem AlgHom.isIntegrallyClosedIn (f : A →ₐ[R] B) (hf : Function.Injective f) :
    IsIntegrallyClosedIn R B → IsIntegrallyClosedIn R A
-- Mathlib/Order/GaloisConnection.lean
theorem l_u_le_trans {x y z : β} (hxy : l (u x) ≤ y) (hyz : l (u y) ≤ z) : l (u x) ≤ z
-- Mathlib/Order/Interval/Multiset.lean
theorem nodup_Icc : (Icc a b).Nodup
-- Mathlib/Probability/Independence/Conditional.lean
theorem iCondIndepFun_iff_condexp_inter_preimage_eq_mul {β : ι → Type*}
    (m : ∀ x, MeasurableSpace (β x)) (f : ∀ i, Ω → β i) (hf : ∀ i, Measurable (f i)) :
    iCondIndepFun m' hm' m f μ ↔
      ∀ (S : Finset ι) {sets : ∀ i : ι, Set (β i)} (_H : ∀ i, i ∈ S → MeasurableSet[m i] (sets i)),
        (μ⟦⋂ i ∈ S, f i ⁻¹' sets i| m'⟧) =ᵐ[μ] ∏ i ∈ S, (μ⟦f i ⁻¹' sets i | m'⟧)
-- Mathlib/Order/Category/BddDistLat.lean
theorem bddDistLat_dual_comp_forget_to_distLat :
    BddDistLat.dual ⋙ forget₂ BddDistLat DistLat =
      forget₂ BddDistLat DistLat ⋙ DistLat.dual
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
/-- A constructor for chain maps between `α`-indexed chain complexes built using `ChainComplex.of`,
from a dependently typed collection of morphisms.
-/
@[simps]
def ofHom (f : ∀ i : α, X i ⟶ Y i) (comm : ∀ i : α, f (i + 1) ≫ d_Y i = d_X i ≫ f i) :
    of X d_X sq_X ⟶ of Y d_Y sq_Y
-- Mathlib/Data/List/AList.lean
@[simp]
theorem lookup_erase_ne {a a'} {s : AList β} (h : a ≠ a') : lookup a (erase a' s) = lookup a s
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem mdifferentiableWithinAt_univ :
    MDifferentiableWithinAt I I' f univ x ↔ MDifferentiableAt I I' f x
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem smul_get (xs : IntList) (a : Int) (i : Nat) : (a * xs).get i = a * xs.get i
-- Mathlib/Logic/Equiv/List.lean
@[simp]
theorem length_sortedUniv (α) [Fintype α] [Encodable α] : (sortedUniv α).length = Fintype.card α
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- The property satisfied by the circumsphere. -/
theorem circumsphere_unique_dist_eq {n : ℕ} (s : Simplex ℝ P n) :
    (s.circumsphere.center ∈ affineSpan ℝ (Set.range s.points) ∧
        Set.range s.points ⊆ s.circumsphere) ∧
      ∀ cs : Sphere P,
        cs.center ∈ affineSpan ℝ (Set.range s.points) ∧ Set.range s.points ⊆ cs →
          cs = s.circumsphere
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem SemiconjBy.zpow_right {A X Y : M} (hx : IsUnit X.det) (hy : IsUnit Y.det)
    (h : SemiconjBy A X Y) : ∀ m : ℤ, SemiconjBy A (X ^ m) (Y ^ m)
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem _root_.Set.Subsingleton.measure_zero (hs : s.Subsingleton) (μ : Measure α) [NoAtoms μ] :
    μ s = 0
-- Mathlib/Data/Int/Bitwise.lean
@[simp]
theorem testBit_land (m n k) : testBit (land m n) k = (testBit m k && testBit n k)
-- Mathlib/Analysis/Analytic/Linear.lean
theorem fpowerSeriesBilinear_apply_zero (f : E →L[𝕜] F →L[𝕜] G) (x : E × F) :
    fpowerSeriesBilinear f x 0 = ContinuousMultilinearMap.curry0 𝕜 _ (f x.1 x.2)
-- Mathlib/Data/Set/Function.lean
theorem EqOn.union (h₁ : EqOn f₁ f₂ s₁) (h₂ : EqOn f₁ f₂ s₂) : EqOn f₁ f₂ (s₁ ∪ s₂)
-- Mathlib/Data/Fintype/Basic.lean
theorem invOfMemRange_surjective : Function.Surjective f.invOfMemRange
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem diam_eq_sSup (s : Set α) : diam s = sSup (image2 edist s s)
-- Mathlib/Data/Nat/Factorization/Basic.lean
/-- There are exactly `⌊N/n⌋` positive multiples of `n` that are `≤ N`.
See `Nat.card_multiples` for a "shifted-by-one" version. -/
lemma card_multiples' (N n : ℕ) :
    ((Finset.range N.succ).filter (fun k ↦ k ≠ 0 ∧ n ∣ k)).card = N / n
-- .lake/packages/lean4/src/lean/Init/Omega/Logic.lean
theorem Decidable.or_not_not_of_not_and [Decidable p] [Decidable q]
    (h : ¬ (p ∧ q)) : ¬ p ∨ ¬ q
-- Mathlib/Order/Monotone/Basic.lean
protected theorem Antitone.comp (hg : Antitone g) (hf : Antitone f) : Monotone (g ∘ f)
-- Mathlib/Computability/TMToPartrec.lean
@[simp]
theorem K'.elim_update_stack {a b c d d'} :
    update (K'.elim a b c d) stack d' = K'.elim a b c d'
-- Mathlib/Probability/Martingale/BorelCantelli.lean
theorem martingalePart_process_ae_eq (ℱ : Filtration ℕ m0) (μ : Measure Ω) (s : ℕ → Set Ω) (n : ℕ) :
    martingalePart (process s) ℱ μ n =
      ∑ k ∈ Finset.range n, ((s (k + 1)).indicator 1 - μ[(s (k + 1)).indicator 1|ℱ k])
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem quotientEquivAlgOfEq_mk {I J : Ideal A} (h : I = J) (x : A) :
    quotientEquivAlgOfEq R₁ h (Ideal.Quotient.mk I x) = Ideal.Quotient.mk J x
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1SCLM_smul_left' (c : ℝ) (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C')
    (h_smul : ∀ s, MeasurableSet s → μ s < ∞ → T' s = c • T s) (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ hT' f = c • setToL1SCLM α E μ hT f
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
theorem SpecΓIdentity_hom_app_fromSpec :
    (Scheme.ΓSpecIso Γ(X, U)).hom ≫ hU.fromSpec.app U =
      (Spec Γ(X, U)).presheaf.map (eqToHom hU.fromSpec_preimage_self).op
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem HasFTaylorSeriesUpToOn.differentiableOn (h : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n) :
    DifferentiableOn 𝕜 f s
-- Mathlib/Data/Set/Function.lean
@[simp]
theorem injective_codRestrict {f : ι → α} {s : Set α} (h : ∀ x, f x ∈ s) :
    Injective (codRestrict f s h) ↔ Injective f
-- Mathlib/Probability/Independence/Conditional.lean
theorem CondIndepSets.inter {s₁ s' : Set (Set Ω)} (s₂ : Set (Set Ω))
    (h₁ : CondIndepSets m' hm' s₁ s' μ) :
    CondIndepSets m' hm' (s₁ ∩ s₂) s' μ
-- Mathlib/Data/PFun.lean
theorem core_res (f : α → β) (s : Set α) (t : Set β) : (res f s).core t = sᶜ ∪ f ⁻¹' t
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
@[reassoc (attr := simp)]
lemma homologyπ_naturality (φ : S₁ ⟶ S₂) [S₁.HasHomology] [S₂.HasHomology] :
    S₁.homologyπ ≫ homologyMap φ = cyclesMap φ ≫ S₂.homologyπ
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem foldr_join (f : α → β → β) :
    ∀ (b : β) (L : List (List α)), foldr f b (join L) = foldr (fun l b => foldr f b l) b L
-- Mathlib/Data/Matrix/PEquiv.lean
theorem single_mul_single_of_ne [Fintype n] [DecidableEq n] [DecidableEq k] [DecidableEq m]
    [Semiring α] {b₁ b₂ : n} (hb : b₁ ≠ b₂) (a : m) (c : k) :
    (single a b₁).toMatrix * (single b₂ c).toMatrix = (0 : Matrix _ _ α)
-- Mathlib/Data/PNat/Prime.lean
@[norm_cast]
theorem coe_pnat_inj (p q : Nat.Primes) : (p : ℕ+) = (q : ℕ+) ↔ p = q
-- Mathlib/GroupTheory/SpecificGroups/Alternating.lean
theorem nontrivial_of_three_le_card (h3 : 3 ≤ card α) : Nontrivial (alternatingGroup α)