ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Lie/Weights/Linear.lean
@[simp] lemma coe_toLinear_eq_zero_iff : (χ : L →ₗ[R] R) = 0 ↔ χ.IsZero
-- Mathlib/Topology/DiscreteQuotient.lean
theorem proj_bot_injective [DiscreteTopology X] : Injective (⊥ : DiscreteQuotient X).proj
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem finprod_eq_prod_plift_of_mulSupport_toFinset_subset {f : α → M}
    (hf : (mulSupport (f ∘ PLift.down)).Finite) {s : Finset (PLift α)} (hs : hf.toFinset ⊆ s) :
    ∏ᶠ i, f i = ∏ i ∈ s, f i.down
-- Mathlib/Probability/Process/Stopping.lean
theorem stoppedValue_eq' [Preorder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] {N : ι}
    (hbdd : ∀ ω, τ ω ≤ N) :
    stoppedValue u τ = ∑ i ∈ Finset.Iic N, Set.indicator {ω | τ ω = i} (u i)
-- Mathlib/Algebra/Group/Invertible/Defs.lean
theorem invOf_one [Monoid α] [Invertible (1 : α)] : ⅟ (1 : α) = 1
-- Mathlib/Data/Fintype/Order.lean
theorem Finite.bddAbove_range [IsDirected α (· ≤ ·)] (f : β → α) : BddAbove (Set.range f)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem darts_toPath_subset {u v : V} (p : G.Walk u v) : (p.toPath : G.Walk u v).darts ⊆ p.darts
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
@[norm_cast] theorem ofNat_mul (n m : Nat) : (↑(n * m) : Int) = n * m
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem ofNat_lt_ofNat {n} (x y : Nat) : BitVec.ofNat n x < BitVec.ofNat n y ↔ x % 2^n < y % 2^n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sin_eq_zero_iff {x : ℝ} : sin x = 0 ↔ ∃ n : ℤ, (n : ℝ) * π = x
-- Mathlib/Analysis/Quaternion.lean
@[simp, norm_cast]
theorem coeComplex_imK (z : ℂ) : (z : ℍ).imK = 0
-- Mathlib/CategoryTheory/Shift/Localization.lean
/-- A morphism property `W` on a category `C` is compatible with the shift by a
monoid `A` when for all `a : A`, a morphism `f` belongs to `W`
if and only if `f⟦a⟧'` does. -/
class IsCompatibleWithShift : Prop :=
  /-- the condition that for all `a : A`, the morphism property `W` is not changed when
  we take its inverse image by the shift functor by `a` -/
  condition : ∀ (a : A), W.inverseImage (shiftFunctor C a) = W
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] theorem fmod_self {a : Int} : a.fmod a = 0
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem lie_skew : -⁅y, x⁆ = ⁅x, y⁆
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem le_sub_one_iff_lt (h : 0 < m) : n ≤ m - 1 ↔ n < m
-- Mathlib/Data/NNRat/Defs.lean
lemma divNat_mul_divNat (n₁ n₂ : ℕ) {d₁ d₂} (hd₁ : d₁ ≠ 0) (hd₂ : d₂ ≠ 0) :
    divNat n₁ d₁ * divNat n₂ d₂ = divNat (n₁ * n₂) (d₁ * d₂)
-- Mathlib/Analysis/Convex/Function.lean
theorem convexOn_id {s : Set β} (hs : Convex 𝕜 s) : ConvexOn 𝕜 s _root_.id
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
/-- If a submodule is contained in a finite-dimensional
submodule with the same or smaller dimension, they are equal. -/
theorem eq_of_le_of_finrank_le {S₁ S₂ : Submodule K V} [FiniteDimensional K S₂] (hle : S₁ ≤ S₂)
    (hd : finrank K S₂ ≤ finrank K S₁) : S₁ = S₂
-- Mathlib/Data/Finset/Card.lean
/-- Reorder a finset.

The difference with `Finset.card_nbij'` is that the bijection is specified as a surjective
injection, rather than by an inverse function.

The difference with `Finset.card_bij` is that the bijection is a non-dependent function, rather than
being allowed to use membership of the domain. -/
lemma card_nbij (i : α → β) (hi : ∀ a ∈ s, i a ∈ t) (i_inj : (s : Set α).InjOn i)
    (i_surj : (s : Set α).SurjOn i t) : s.card = t.card
-- Mathlib/Tactic/Positivity/Basic.lean
private lemma int_div_nonneg_of_pos_of_pos {a b : ℤ} (ha : 0 < a) (hb : 0 < b) : 0 ≤ a / b
-- Mathlib/LinearAlgebra/InvariantBasisNumber.lean
/-- A ring satisfies the strong rank condition if and only if, for all `n : ℕ`, any linear map
`(Fin (n + 1) → R) →ₗ[R] (Fin n → R)` is not injective. -/
theorem strongRankCondition_iff_succ :
    StrongRankCondition R ↔
      ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Function.Injective f
-- Mathlib/CategoryTheory/Abelian/NonPreadditive.lean
@[reassoc]
theorem lift_map {X Y : C} (f : X ⟶ Y) :
    prod.lift (𝟙 X) 0 ≫ Limits.prod.map f f = f ≫ prod.lift (𝟙 Y) 0
-- Mathlib/LinearAlgebra/Ray.lean
/-- The images of two vectors under a linear equivalence are on the same ray if and only if the
original vectors are on the same ray. -/
@[simp]
theorem sameRay_map_iff (e : M ≃ₗ[R] N) : SameRay R (e x) (e y) ↔ SameRay R x y
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
@[reassoc (attr := simp)]
lemma stalkMap_inv_hom (e : X ≅ Y) (x : X) :
    e.inv.stalkMap (e.hom.val.base x) ≫ e.hom.stalkMap x =
      X.presheaf.stalkSpecializes (specializes_of_eq <| by simp)
-- Mathlib/Algebra/Polynomial/Laurent.lean
@[simp] lemma invert_T (n : ℤ) : invert (T n : R[T;T⁻¹]) = T (-n)
-- Mathlib/MeasureTheory/Integral/Bochner.lean
/-- Calculate the integral of `g ∘ f : α →ₛ F`, where `f` is an integrable function from `α` to `E`
    and `g` is a function from `E` to `F`. We require `g 0 = 0` so that `g ∘ f` is integrable. -/
theorem map_integral (f : α →ₛ E) (g : E → F) (hf : Integrable f μ) (hg : g 0 = 0) :
    (f.map g).integral μ = ∑ x ∈ f.range, ENNReal.toReal (μ (f ⁻¹' {x})) • g x
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
theorem HasFPowerSeriesAt.fderiv_eq (h : HasFPowerSeriesAt f p x) :
    fderiv 𝕜 f x = continuousMultilinearCurryFin1 𝕜 E F (p 1)
-- Mathlib/RingTheory/HahnSeries/Summable.lean
theorem unit_aux (x : HahnSeries Γ R) {r : R} (hr : r * x.leadingCoeff = 1) :
    0 < (1 - single (-x.order) r * x).orderTop
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
lemma _root_.NonUnitalStarAlgHom.map_adjoin (f : F) (s : Set A) :
    map f (adjoin R s) = adjoin R (f '' s)
-- Mathlib/Data/Set/Function.lean
@[simp]
theorem restrict_ite_compl (f g : α → β) (s : Set α) [∀ x, Decidable (x ∈ s)] :
    (sᶜ.restrict fun a => if a ∈ s then f a else g a) = sᶜ.restrict g
-- Mathlib/Data/Real/Hyperreal.lean
theorem infinitePos_abs_iff_infinite_abs {x : ℝ*} : InfinitePos |x| ↔ Infinite |x|
-- Mathlib/Order/Ideal.lean
@[ext]
theorem ext {s t : Ideal P} : (s : Set P) = t → s = t
-- Mathlib/Analysis/Normed/Ring/Units.lean
/-- The function `Ring.inverse` is continuous at each unit of `R`. -/
theorem inverse_continuousAt (x : Rˣ) : ContinuousAt inverse (x : R)
-- Mathlib/Topology/Algebra/Order/Compact.lean
/-- A continuous function with compact support is bounded below. -/
@[to_additive " A continuous function with compact support is bounded below. "]
theorem Continuous.bddBelow_range_of_hasCompactMulSupport [ClosedIicTopology α] [One α]
    {f : β → α} (hf : Continuous f) (h : HasCompactMulSupport f) : BddBelow (range f)
-- Mathlib/Algebra/Ring/Equiv.lean
theorem toNonUnitalRingHom_injective :
    Function.Injective (toNonUnitalRingHom : R ≃+* S → R →ₙ+* S)
-- Mathlib/Data/Int/Interval.lean
theorem card_Ioc_of_le (h : a ≤ b) : ((Ioc a b).card : ℤ) = b - a
-- Mathlib/RingTheory/MvPowerSeries/Trunc.lean
theorem coeff_trunc (m : σ →₀ ℕ) (φ : MvPowerSeries σ R) :
    (trunc R n φ).coeff m = if m < n then coeff R m φ else 0
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem prefix_append_right_inj (l) : l ++ l₁ <+: l ++ l₂ ↔ l₁ <+: l₂
-- Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
theorem ae_eq_zero_of_forall_inner [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
    [SecondCountableTopology E] {f : α → E} (hf : ∀ c : E, (fun x => (inner c (f x) : 𝕜)) =ᵐ[μ] 0) :
    f =ᵐ[μ] 0
-- Mathlib/RingTheory/Bialgebra/Hom.lean
@[simp, norm_cast]
theorem coe_toLinearMap (f : A →ₐc[R] B) : ⇑(f : A →ₗ[R] B) = f
-- Mathlib/RingTheory/HahnSeries/Multiplication.lean
theorem C_one : C (1 : R) = (1 : HahnSeries Γ R)
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem add_le_of_le_tsub_left_of_le (h : a ≤ c) (h2 : b ≤ c - a) : a + b ≤ c
-- Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean
theorem congr_comp_reverse {X Y : Paths <| Quiver.Symmetrify V} (p : X ⟶ Y) :
    Quot.mk (@Quotient.CompClosure _ _ redStep _ _) (p ≫ p.reverse) =
      Quot.mk (@Quotient.CompClosure _ _ redStep _ _) (𝟙 X)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem sub_pos_iff_lt : 0 < n - m ↔ m < n
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
lemma embedding_toWeakDualBCNN :
    Embedding (toWeakDualBCNN : FiniteMeasure Ω → WeakDual ℝ≥0 (Ω →ᵇ ℝ≥0))
-- Mathlib/SetTheory/Game/PGame.lean
/-- `0 + x` is equivalent to `x`. -/
theorem zero_add_equiv (x : PGame.{u}) : 0 + x ≈ x
-- Mathlib/Order/WellFounded.lean
theorem StrictAnti.wellFoundedGT [WellFoundedLT β] (hf : StrictAnti f) : WellFoundedGT α
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLogExp.lean
@[simp] lemma logOrderIso_apply (x : ℝ≥0∞) : logOrderIso x = log x
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
theorem det_apply (M : Matrix n n R) : M.det = ∑ σ : Perm n, Equiv.Perm.sign σ • ∏ i, M (σ i) i
-- Mathlib/Data/List/Cycle.lean
@[simp]
nonrec theorem next_prev (s : Cycle α) : ∀ (hs : Nodup s) (x : α) (hx : x ∈ s),
    s.next hs (s.prev hs x hx) (prev_mem s hs x hx) = x
-- Mathlib/Data/Matrix/Kronecker.lean
theorem diagonal_kroneckerTMul [DecidableEq l] (a : l → α) (B : Matrix m n α) :
    diagonal a ⊗ₖₜ[R] B =
      Matrix.reindex (Equiv.prodComm _ _) (Equiv.prodComm _ _)
        (blockDiagonal fun i => B.map fun b => a i ⊗ₜ[R] b)
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem LinearIndependent.extend_subset (hs : LinearIndependent K (fun x => x : s → V))
    (hst : s ⊆ t) : hs.extend hst ⊆ t
-- .lake/packages/lean4/src/lean/Init/Data/Array/Subarray.lean
structure Subarray (α : Type u)  where
  array : Array α
  start : Nat
  stop : Nat
  start_le_stop : start ≤ stop
  stop_le_array_size : stop ≤ array.size
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
@[simp]
theorem WalkingParallelFamily.hom_id (X : WalkingParallelFamily J) :
    WalkingParallelFamily.Hom.id X = 𝟙 X
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
theorem ofLinear_toLinearMap {h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂) = f
-- Mathlib/Topology/Order/IsLUB.lean
theorem IsGLB.mem_of_isClosed {a : α} {s : Set α} (ha : IsGLB s a) (hs : s.Nonempty)
    (sc : IsClosed s) : a ∈ s
-- Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
theorem StarSubalgebra.one_mem_toNonUnitalStarSubalgebra (S : StarSubalgebra R A) :
    (1 : A) ∈ S.toNonUnitalStarSubalgebra
-- Mathlib/Topology/Order/Monotone.lean
theorem IsClosed.isLeast_csInf {s : Set α} (hc : IsClosed s) (hs : s.Nonempty) (B : BddBelow s) :
    IsLeast s (sInf s)
-- Mathlib/FieldTheory/PolynomialGaloisGroup.lean
/-- `p` splits in the splitting field of `p ∘ q`, for `q` non-constant. -/
theorem splits_in_splittingField_of_comp (hq : q.natDegree ≠ 0) :
    p.Splits (algebraMap F (p.comp q).SplittingField)
-- Mathlib/Data/Real/GoldenRatio.lean
@[simp]
theorem gold_add_goldConj : φ + ψ = 1
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
lemma isIso_homologyMap_of_isIso_opcyclesMap_of_mono {φ : S₁ ⟶ S₂}
    [S₁.HasHomology] [S₂.HasHomology] (h₁ : IsIso (opcyclesMap φ)) (h₂ : Mono φ.τ₃) :
    IsIso (homologyMap φ)
-- Mathlib/LinearAlgebra/Prod.lean
theorem coe_prodMap (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₄) : ⇑(f.prodMap g) = Prod.map f g
-- .lake/packages/lean4/src/lean/Init/Core.lean
/-- `insert x ∅ = {x}` -/
class LawfulSingleton (α : Type u) (β : Type v) [EmptyCollection β] [Insert α β] [Singleton α β] :
    Prop where
  /-- `insert x ∅ = {x}` -/
  insert_emptyc_eq (x : α) : (insert x ∅ : β) = singleton x
-- Mathlib/NumberTheory/Cyclotomic/Rat.lean
/-- `ζ - 1` is prime if `p ≠ 2` and `ζ` is a primitive `p ^ (k + 1)`-th root of unity.
  See `zeta_sub_one_prime` for a general statement. -/
theorem zeta_sub_one_prime_of_ne_two [IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (hodd : p ≠ 2) :
    Prime (hζ.toInteger - 1)
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem mem_bot {x : A} : x ∈ (⊥ : NonUnitalSubalgebra R A) ↔ x = 0
-- Mathlib/Combinatorics/SimpleGraph/Trails.lean
theorem IsEulerian.isTrail {u v : V} {p : G.Walk u v} (h : p.IsEulerian) : p.IsTrail
-- Mathlib/CategoryTheory/Galois/Prorepresentability.lean
/-- The `Aut F` action on the fiber of a Galois object is transitive. See
`pretransitive_of_isConnected` for the same result for connected objects. -/
theorem FiberFunctor.isPretransitive_of_isGalois (X : C) [IsGalois X] :
    MulAction.IsPretransitive (Aut F) (F.obj X)
-- Mathlib/Data/Nat/Digits.lean
theorem ofDigits_zmodeq' (b b' : ℤ) (k : ℕ) (h : b ≡ b' [ZMOD k]) (L : List ℕ) :
    ofDigits b L ≡ ofDigits b' L [ZMOD k]
-- Mathlib/FieldTheory/SeparableClosure.lean
/-- An intermediate field of `E / F` is contained in the separable closure of `F` in `E`
if and only if it is separable over `F`. -/
theorem le_separableClosure_iff (L : IntermediateField F E) :
    L ≤ separableClosure F E ↔ Algebra.IsSeparable F L
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem self_sub_toIcoDiv_zsmul (a b : α) : b - toIcoDiv hp a b • p = toIcoMod hp a b
-- Mathlib/Combinatorics/Quiver/Cast.lean
@[simp]
theorem Hom.cast_cast {u v u' v' u'' v'' : U} (e : u ⟶ v) (hu : u = u') (hv : v = v')
    (hu' : u' = u'') (hv' : v' = v'') :
    (e.cast hu hv).cast hu' hv' = e.cast (hu.trans hu') (hv.trans hv')
-- Mathlib/Topology/Specialization.lean
@[simp] lemma toEquiv_symm : (@toEquiv α).symm = ofEquiv
-- Mathlib/Data/Set/Function.lean
lemma bijOn_id (s : Set α) : BijOn id s s
-- Mathlib/GroupTheory/Perm/Support.lean
theorem disjoint_comm : Disjoint f g ↔ Disjoint g f
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem const_pow (x : β) (n : ℕ) : const (x ^ n) = const x ^ n
-- Mathlib/Data/Fin/VecNotation.lean
theorem cons_fin_one (x : α) (u : Fin 0 → α) : vecCons x u = fun _ => x
-- Mathlib/Geometry/RingedSpace/PresheafedSpace.lean
/-- The isomorphism from the restriction to the top subspace.
-/
@[simps]
def restrictTopIso (X : PresheafedSpace C) : X.restrict (Opens.openEmbedding ⊤) ≅ X
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem strictMono_iff_injective : StrictMono f ↔ Injective f
-- Mathlib/Data/Set/Function.lean
lemma invOn : InvOn e e.symm t s
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem measurable_to_nat {f : α → ℕ} : (∀ y, MeasurableSet (f ⁻¹' {f y})) → Measurable f
-- Mathlib/RingTheory/Trace/Basic.lean
theorem traceMatrix_of_basis_mulVec (b : Basis ι A B) (z : B) :
    traceMatrix A b *ᵥ b.equivFun z = fun i => trace A B (z * b i)
-- Mathlib/Topology/MetricSpace/GromovHausdorff.lean
/-- The optimal coupling constructed above realizes exactly the Gromov-Hausdorff distance,
essentially by design. -/
theorem hausdorffDist_optimal {X : Type u} [MetricSpace X] [CompactSpace X] [Nonempty X]
    {Y : Type v} [MetricSpace Y] [CompactSpace Y] [Nonempty Y] :
    hausdorffDist (range (optimalGHInjl X Y)) (range (optimalGHInjr X Y)) = ghDist X Y
-- Mathlib/Order/CompleteBooleanAlgebra.lean
theorem compl_sInf' : (sInf s)ᶜ = sSup (HasCompl.compl '' s)
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem append_concat {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (h : G.Adj w x) :
    p.append (q.concat h) = (p.append q).concat h
-- Mathlib/LinearAlgebra/Contraction.lean
@[simp]
theorem homTensorHomEquiv_apply (x : (M →ₗ[R] P) ⊗[R] (N →ₗ[R] Q)) :
    homTensorHomEquiv R M N P Q x = homTensorHomMap R M N P Q x
-- Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean
lemma IsMeasurableRatCDF.stieltjesFunctionAux_def' (f : α → ℚ → ℝ) (a : α) :
    IsMeasurableRatCDF.stieltjesFunctionAux f a
      = fun (t : ℝ) ↦ ⨅ r : { r' : ℚ // t < r' }, f a r
-- Mathlib/Data/Finset/Basic.lean
@[simp] lemma insert_subset_insert_iff (ha : a ∉ s) : insert a s ⊆ insert a t ↔ s ⊆ t
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem shiftRight_add {w : Nat} (x : BitVec w) (n m : Nat) :
    x >>> (n + m) = (x >>> n) >>> m
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventually_iSup {p : α → Prop} {fs : ι → Filter α} :
    (∀ᶠ x in ⨆ b, fs b, p x) ↔ ∀ b, ∀ᶠ x in fs b, p x
-- Mathlib/MeasureTheory/Measure/OpenPos.lean
/-- A measure is said to be `IsOpenPosMeasure` if it is positive on nonempty open sets. -/
class IsOpenPosMeasure : Prop where
  open_pos : ∀ U : Set X, IsOpen U → U.Nonempty → μ U ≠ 0
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem min_dist_le_dist_pi (x y : ∀ i, F i) (i : ι) :
    min ((1 / 2) ^ encode i : ℝ) (dist (x i) (y i)) ≤ dist x y
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[reassoc (attr := simp)]
theorem prodComparison_snd : prodComparison F A B ≫ prod.snd = F.map prod.snd
-- Mathlib/Order/Filter/Lift.lean
theorem lift_mono (hf : f₁ ≤ f₂) (hg : g₁ ≤ g₂) : f₁.lift g₁ ≤ f₂.lift g₂
-- Mathlib/Data/Nat/Find.lean
@[simp] lemma findGreatest_pos : 0 < Nat.findGreatest P k ↔ ∃ n, 0 < n ∧ n ≤ k ∧ P n
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem two_le_iff : (2 : Cardinal) ≤ #α ↔ ∃ x y : α, x ≠ y
-- Mathlib/Order/Interval/Basic.lean
@[simp, norm_cast]
theorem coe_coe (s : NonemptyInterval α) : ((s : Interval α) : Set α) = s
-- Mathlib/Order/WithBot.lean
@[simp, norm_cast] lemma coe_top [Top α] : ((⊤ : α) : WithBot α) = ⊤
-- Mathlib/Analysis/Calculus/Darboux.lean
/-- **Darboux's theorem**: the image of a convex set under `f'` is a convex set,
`deriv` version. -/
theorem Convex.image_deriv {s : Set ℝ} (hs : Convex ℝ s) (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) :
    Convex ℝ (deriv f '' s)
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem ediam_image (s : Set E) : EMetric.diam (e '' s) = EMetric.diam s
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp, nolint simpNF] -- Porting note (#10675): dsimp can not prove this
theorem mem_toAddSubgroup {s : Subring R} {x : R} : x ∈ s.toAddSubgroup ↔ x ∈ s
-- Mathlib/CategoryTheory/Triangulated/TStructure/Basic.lean
lemma LE_monotone : Monotone t.LE
-- Mathlib/Data/Real/EReal.lean
@[simp, norm_cast]
theorem coe_zero : ((0 : ℝ) : EReal) = 0
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[simp]
theorem obj_μ_zero_app (m₁ m₂ : M) (X : C) :
    (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫ (F.μ m₁ (𝟙_ M ⊗ m₂)).app X ≫
    (F.map (α_ m₁ (𝟙_ M) m₂).inv).app X ≫ (F.μIso (m₁ ⊗ 𝟙_ M) m₂).inv.app X =
    (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
    (F.map (λ_ m₂).hom).app ((F.obj m₁).obj X) ≫ (F.obj m₂).map ((F.map (ρ_ m₁).inv).app X)
-- Mathlib/Computability/TuringMachine.lean
theorem tr_eval (k) (L : List (Γ k)) {L₁ L₂} (H₁ : L₁ ∈ TM1.eval (tr M) (trInit k L))
    (H₂ : L₂ ∈ TM2.eval M k L) :
    ∃ (S : ∀ k, List (Γ k)) (L' : ListBlank (∀ k, Option (Γ k))),
      addBottom L' = L₁ ∧
        (∀ k, L'.map (proj k) = ListBlank.mk ((S k).map some).reverse) ∧ S k = L₂
-- Mathlib/Topology/ContinuousOn.lean
theorem ContinuousAt.comp_continuousWithinAt {g : β → γ} {f : α → β} {s : Set α} {x : α}
    (hg : ContinuousAt g (f x)) (hf : ContinuousWithinAt f s x) : ContinuousWithinAt (g ∘ f) s x
-- Mathlib/Analysis/Complex/Hadamard.lean
/-- The function `invInterpStrip` is `diffContOnCl`. -/
lemma diffContOnCl_invInterpStrip {ε : ℝ} (hε : ε > 0) :
    DiffContOnCl ℂ (fun z ↦ invInterpStrip f z ε) (verticalStrip 0 1)
-- Mathlib/Topology/Category/CompHausLike/Basic.lean
@[simp]
theorem coe_comp {X Y Z : CompHausLike P} (f : X ⟶ Y) (g : Y ⟶ Z) :
    ((forget (CompHausLike P)).map f ≫ (forget (CompHausLike P)).map g) = g ∘ f
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If a function `f` is differentiable and `f'` is monotone on `ℝ` then `f` is convex. -/
theorem Monotone.convexOn_univ_of_deriv {f : ℝ → ℝ} (hf : Differentiable ℝ f)
    (hf'_mono : Monotone (deriv f)) : ConvexOn ℝ univ f
-- Mathlib/CategoryTheory/ComposableArrows.lean
lemma ext₀ {F G : ComposableArrows C 0} (h : F.obj' 0 = G.obj 0) : F = G
-- Mathlib/Topology/Instances/AddCircle.lean
theorem coe_eq_zero_of_pos_iff (hp : 0 < p) {x : 𝕜} (hx : 0 < x) :
    (x : AddCircle p) = 0 ↔ ∃ n : ℕ, n • p = x
-- Mathlib/CategoryTheory/Limits/FinallySmall.lean
theorem finallySmall_of_final_of_finallySmall [FinallySmall.{w} K] : FinallySmall.{w} J
-- Mathlib/Algebra/DirectSum/Module.lean
/-- `iff` version of `DirectSum.isInternal_submodule_of_independent_of_iSup_eq_top`,
`DirectSum.IsInternal.submodule_independent`, and `DirectSum.IsInternal.submodule_iSup_eq_top`. -/
theorem isInternal_submodule_iff_independent_and_iSup_eq_top (A : ι → Submodule R M) :
    IsInternal A ↔ CompleteLattice.Independent A ∧ iSup A = ⊤
-- Mathlib/Order/Filter/Basic.lean
theorem preimage_mem_comap (ht : t ∈ g) : m ⁻¹' t ∈ comap m g
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma exact_and_mono_f_iff_f_is_kernel [S.HasHomology] :
    S.Exact ∧ Mono S.f ↔ Nonempty (IsLimit (KernelFork.ofι S.f S.zero))
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
theorem negSucc_mul_subNatNat (m n k : Nat) :
    -[m+1] * subNatNat n k = subNatNat (succ m * k) (succ m * n)
-- .lake/packages/lean4/src/lean/Init/Data/AC.lean
theorem Context.evalList_insert
  (ctx : Context α)
  (h : Commutative ctx.op)
  (x : Nat)
  (xs : List Nat)
  : evalList α ctx (insert x xs) = evalList α ctx (x::xs)
-- Mathlib/Data/Complex/Abs.lean
private theorem mul_self_abs (z : ℂ) : ((abs z) * abs z) = normSq z
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp]
theorem natTrailingDegree_natCast (n : ℕ) : natTrailingDegree (n : R[X]) = 0
-- Mathlib/Data/List/ReduceOption.lean
theorem reduceOption_get?_iff {l : List (Option α)} {x : α} :
    (∃ i, l.get? i = some (some x)) ↔ ∃ i, l.reduceOption.get? i = some x
-- Mathlib/RingTheory/Localization/Algebra.lean
lemma IsLocalization.ker_map (hT : Submonoid.map g M = T) :
    RingHom.ker (IsLocalization.map Q g (hT.symm ▸ M.le_comap_map) : S →+* Q) =
      (RingHom.ker g).map (algebraMap R S)
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma isClopen_sInter (hS : ∀ s ∈ S, IsClopen s) : IsClopen (⋂₀ S)
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Icc_inter_Icc : Icc a₁ b₁ ∩ Icc a₂ b₂ = Icc (a₁ ⊔ a₂) (b₁ ⊓ b₂)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem equivOfEq_trans (S T U : Subalgebra R A) (hST : S = T) (hTU : T = U) :
    (equivOfEq S T hST).trans (equivOfEq T U hTU) = equivOfEq S U (hST.trans hTU)
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem lcm_dvd_lcm_mul_right [GCDMonoid α] (m n k : α) : lcm m n ∣ lcm (m * k) n
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
theorem sSup {ℐ : Set (Ideal A)} (h : ∀ I ∈ ℐ, Ideal.IsHomogeneous 𝒜 I) :
    (sSup ℐ).IsHomogeneous 𝒜
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem dropWhile (p : Char → Bool) : ∀ {s}, ValidFor l m r s →
    ValidFor (l ++ m.takeWhile p) (m.dropWhile p) r (s.dropWhile p)
-- Mathlib/Algebra/GroupWithZero/Defs.lean
lemma IsRightCancelMulZero.to_isLeftCancelMulZero [IsRightCancelMulZero M₀] :
    IsLeftCancelMulZero M₀
-- Mathlib/Order/CompleteLattice.lean
theorem iInf₂_le {f : ∀ i, κ i → α} (i : ι) (j : κ i) : ⨅ (i) (j), f i j ≤ f i j
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem C_dvd_iff_dvd_coeff (r : R) (φ : MvPolynomial σ R) : C r ∣ φ ↔ ∀ i, r ∣ φ.coeff i
-- Mathlib/Order/Basic.lean
theorem Pi.compl_def [∀ i, HasCompl (π i)] (x : ∀ i, π i) :
    xᶜ = fun i ↦ (x i)ᶜ
-- Mathlib/Order/BooleanAlgebra.lean
theorem IsCompl.compl_eq_iff (h : IsCompl x y) : zᶜ = y ↔ z = x
-- Mathlib/Analysis/SumIntegralComparisons.lean
theorem AntitoneOn.sum_le_integral (hf : AntitoneOn f (Icc x₀ (x₀ + a))) :
    (∑ i ∈ Finset.range a, f (x₀ + (i + 1 : ℕ))) ≤ ∫ x in x₀..x₀ + a, f x
-- Mathlib/Order/Basic.lean
protected lemma lt_of_le_of_lt (h₁ : x.1 ≤ y.1) (h₂ : x.2 < y.2) : x < y
-- Mathlib/Tactic/Abel.lean
theorem term_atom_pfg {α} [AddCommGroup α] (x x' : α) (h : x = x') : x = termg 1 x' 0
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem foldrIdx_cons :
    (x :: xs : List α).foldrIdx f i s = f s x (foldrIdx f i xs (s + 1))
-- Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
protected theorem mdifferentiable (f : C^∞⟮I, M; I', M'⟯) : MDifferentiable I I' f
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem map_roots [IsDomain S] : (map φ P).roots = (Polynomial.map φ P.toPoly).roots
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[deprecated getElem_replicate (since := "2024-06-12")]
theorem get_replicate (a : α) {n : Nat} (m : Fin _) : (replicate n a).get m = a
-- Mathlib/Algebra/AddConstMap/Equiv.lean
/-- Projection from `G ≃+c[a, a] G` to `G →+c[a, a] G`, as a monoid homomorphism. -/
@[simps! apply]
def toAddConstMapHom : (G ≃+c[a, a] G) →* (G →+c[a, a] G)