ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem zipWith_distrib_take : (zipWith f l l').take n = zipWith f (l.take n) (l'.take n)
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- An element is contained in the relative perfect closure if and only if its mininal polynomial
has separable degree one. -/
theorem mem_perfectClosure_iff_natSepDegree_eq_one {x : E} :
    x ∈ perfectClosure F E ↔ (minpoly F x).natSepDegree = 1
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
protected theorem Set.EquicontinuousOn.continuousOn_of_mem {H : Set <| X → α} {S : Set X}
    (h : H.EquicontinuousOn S) {f : X → α} (hf : f ∈ H) : ContinuousOn f S
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem pureMonoidHom_apply (a : α) : pureMonoidHom a = pure a
-- Mathlib/Analysis/Normed/Group/SemiNormedGrp/Completion.lean
theorem completion.lift_unique {V W : SemiNormedGrp} [CompleteSpace W] [T0Space W]
    (f : V ⟶ W) (g : completion.obj V ⟶ W) : completion.incl ≫ g = f → g = completion.lift f
-- Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
nonrec theorem _root_.Irreducible.addVal_pow {ϖ : R} (h : Irreducible ϖ) (n : ℕ) :
    addVal R (ϖ ^ n) = n
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
theorem ker_comp_eq_of_commute_of_disjoint_ker [FiniteDimensional K V] {f g : V →ₗ[K] V}
    (h : Commute f g) (h' : Disjoint (ker f) (ker g)) :
    ker (f ∘ₗ g) = ker f ⊔ ker g
-- Mathlib/FieldTheory/SeparableClosure.lean
/-- An element is contained in the separable closure of `F` in `E` if and only if
it is a separable element. -/
theorem mem_separableClosure_iff {x : E} :
    x ∈ separableClosure F E ↔ IsSeparable F x
-- Mathlib/Algebra/Lie/Nilpotent.lean
/-- For a nilpotent Lie module `M` of a Lie algebra `L`, the first term in the lower central series
of `M` contains a non-zero element on which `L` acts trivially unless the entire action is trivial.

Taking `M = L`, this provides a useful characterisation of Abelian-ness for nilpotent Lie
algebras. -/
lemma disjoint_lowerCentralSeries_maxTrivSubmodule_iff [IsNilpotent R L M] :
    Disjoint (lowerCentralSeries R L M 1) (maxTrivSubmodule R L M) ↔ IsTrivial L M
-- Mathlib/Algebra/Algebra/Opposite.lean
@[simp]
theorem toRingHom_toOpposite (f : A →ₐ[R] B) (hf : ∀ x y, Commute (f x) (f y)) :
    (f.toOpposite hf : A →+* Bᵐᵒᵖ) = (f : A →+* B).toOpposite hf
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
@[simp]
theorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x
-- Mathlib/NumberTheory/SmoothNumbers.lean
@[simp]
lemma primesBelow_zero : primesBelow 0 = ∅
-- Mathlib/NumberTheory/Harmonic/GammaDeriv.lean
lemma hasDerivAt_Gamma_one_half : HasDerivAt Gamma (-√π * (γ + 2 * log 2)) (1 / 2)
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
theorem measure_inter_null_of_null_left {S : Set α} (T : Set α) (h : μ S = 0) : μ (S ∩ T) = 0
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- If `c` is a colimiting binary coproduct cocone, and we have an initial object,
then we have `IsPushout 0 0 c.inl c.inr`
(where each `0` is the unique morphism from the initial object). -/
theorem of_is_coproduct {c : BinaryCofan X Y} (h : Limits.IsColimit c) (t : IsInitial Z) :
    IsPushout (t.to _) (t.to _) c.inl c.inr
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem mem_centralizer_iff {s : Set A} {z : A} :
    z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
-- Mathlib/Order/RelIso/Basic.lean
protected theorem isWellFounded (f : r ↪r s) [IsWellFounded β s] : IsWellFounded α r
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
@[local simp] theorem ofNat_add_negSucc (m n : Nat) : ↑m + -[n+1] = subNatNat m (succ n)
-- Mathlib/LinearAlgebra/Basis.lean
theorem groupSMul_span_eq_top {G : Type*} [Group G] [DistribMulAction G R] [DistribMulAction G M]
    [IsScalarTower G R M] {v : ι → M} (hv : Submodule.span R (Set.range v) = ⊤) {w : ι → G} :
    Submodule.span R (Set.range (w • v)) = ⊤
-- Mathlib/Data/List/Intervals.lean
@[simp]
theorem bagInter_consecutive (n m l : Nat) :
    @List.bagInter ℕ instBEqOfDecidableEq (Ico n m) (Ico m l) = []
-- Mathlib/Data/DFinsupp/Multiset.lean
@[simp]
theorem toDFinsupp_toMultiset (s : Multiset α) : DFinsupp.toMultiset (Multiset.toDFinsupp s) = s
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem isPrefixOf_cons₂_self [LawfulBEq α] {a : α} :
    isPrefixOf (a::as) (a::bs) = isPrefixOf as bs
-- Mathlib/Data/List/Nodup.lean
protected theorem Pairwise.nodup {l : List α} {r : α → α → Prop} [IsIrrefl α r] (h : Pairwise r l) :
    Nodup l
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_bihimp_self : a ⇔ b ⇔ a = b
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
private theorem ne_add_csize_add_self : i ≠ n + Char.utf8Size c + i
-- Mathlib/Order/Fin/Basic.lean
/-- `Fin.addNat` as an `OrderEmbedding`.

`addNatOrderEmb m i` adds `m` to `i`, generalizes `Fin.succ`. -/
@[simps! apply toEmbedding]
def addNatOrderEmb (m) : Fin n ↪o Fin (n + m)
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
theorem reindex_reindex (e : ι ≃ ι₂) (e' : ι₂ ≃ ι₃) (x : ⨂[R] i, s i) :
    reindex R _ e' (reindex R s e x) = reindex R s (e.trans e') x
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLogExp.lean
@[simp] lemma _root_.EReal.expOrderIso_apply (x : EReal) : expOrderIso x = exp x
-- Mathlib/Data/Set/Function.lean
lemma InjOn.image_diff {t : Set α} (h : s.InjOn f) : f '' (s \ t) = f '' s \ f '' (s ∩ t)
-- Mathlib/LinearAlgebra/Quotient.lean
@[simp]
theorem mapQ_id (h : p ≤ p.comap LinearMap.id := (by rw [comap_id])) :
    p.mapQ p LinearMap.id h = LinearMap.id
-- Mathlib/Data/SetLike/Basic.lean
@[aesop 5% apply (rule_sets := [SetLike])]
lemma mem_of_subset {s : Set B} (hp : s ⊆ p) {x : B} (hx : x ∈ s) : x ∈ p
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
theorem norm_rpow_of_nonneg {x y : ℝ} (hx_nonneg : 0 ≤ x) : ‖x ^ y‖ = ‖x‖ ^ y
-- Mathlib/Algebra/Group/Pi/Basic.lean
@[to_additive]
theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
lemma natTrailingDegree_eq_zero_of_constantCoeff_ne_zero (h : constantCoeff p ≠ 0) :
    p.natTrailingDegree = 0
-- Mathlib/Topology/Order/Monotone.lean
theorem IsClosed.sInf_mem {s : Set α} (hs : s.Nonempty) (hc : IsClosed s) : sInf s ∈ s
-- Mathlib/Topology/Order/LowerUpperTopology.lean
lemma isOpen_def (T : Set (WithLower α)) : IsOpen T ↔ (lower α).IsOpen (WithLower.toLower ⁻¹' T)
-- Mathlib/Analysis/BoundedVariation.lean
protected theorem eq_of_le {a b : α} (h : a ≤ b) :
    variationOnFromTo f s a b = (eVariationOn f (s ∩ Icc a b)).toReal
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem rename_isHomogeneous_iff {f : σ → τ} (hf : f.Injective) :
    (rename f φ).IsHomogeneous n ↔ φ.IsHomogeneous n
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem nhdsWithin_eq_comap_uniformity {x : α} (S : Set α) :
    𝓝[S] x = (𝓤 α ⊓ 𝓟 (univ ×ˢ S)).comap (Prod.mk x)
-- Mathlib/MeasureTheory/Covering/Differentiation.lean
theorem ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable {f : α → E} (hf : Integrable f μ)
    (h'f : StronglyMeasurable f) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0)
-- Mathlib/Algebra/Group/Hom/Defs.lean
/-- The identity map from a type with multiplication to itself. -/
@[to_additive (attr := simps) "The identity map from a type with addition to itself."]
def MulHom.id (M : Type*) [Mul M] : M →ₙ* M
-- Mathlib/Data/Finset/Basic.lean
@[simp, norm_cast]
theorem coe_symmDiff : (↑(s ∆ t) : Set α) = (s : Set α) ∆ t
-- Mathlib/Analysis/Convex/Intrinsic.lean
@[simp]
theorem intrinsicClosure_diff_intrinsicFrontier (s : Set P) :
    intrinsicClosure 𝕜 s \ intrinsicFrontier 𝕜 s = intrinsicInterior 𝕜 s
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ContDiffAt.contDiffWithinAt (h : ContDiffAt 𝕜 n f x) : ContDiffWithinAt 𝕜 n f s x
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma add_of_X_ne' {x₁ x₂ y₁ y₂ : F} {h₁ : W.Nonsingular x₁ y₁} {h₂ : W.Nonsingular x₂ y₂}
    (hx : x₁ ≠ x₂) : some h₁ + some h₂ = -some (nonsingular_negAdd h₁ h₂ fun h => (hx h).elim)
-- Mathlib/Data/Sigma/Basic.lean
theorem fst_injective [h : ∀ a, Subsingleton (β a)] : Injective (fst : (Σ a, β a) → α)
-- Mathlib/RingTheory/Polynomial/Tower.lean
@[simp]
theorem aeval_algebraMap_eq_zero_iff [NoZeroSMulDivisors A B] [Nontrivial B] (x : A) (p : R[X]) :
    aeval (algebraMap A B x) p = 0 ↔ aeval x p = 0
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y)
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
theorem IsOrtho.all (x y : M) : IsOrtho (0 : QuadraticMap R M N) x y
-- Mathlib/CategoryTheory/Monoidal/Mon_.lean
@[simp]
theorem whiskerRight_hom (X : Mon_ C) {Y Z : Mon_ C} (f : Y ⟶ Z) :
    (X ◁ f).hom = X.X ◁ f.hom
-- Mathlib/Topology/Sober.lean
theorem IsGenericPoint.def {x : α} {S : Set α} (h : IsGenericPoint x S) :
    closure ({x} : Set α) = S
-- Mathlib/RingTheory/Ideal/Norm.lean
/-- Let `e : S ≃ I` be an additive isomorphism (therefore a `ℤ`-linear equiv).
Then an alternative way to compute the norm of `I` is given by taking the determinant of `e`.
See `natAbs_det_basis_change` for a more familiar formulation of this result. -/
theorem natAbs_det_equiv (I : Ideal S) {E : Type*} [EquivLike E S I] [AddEquivClass E S I] (e : E) :
    Int.natAbs
        (LinearMap.det
          ((Submodule.subtype I).restrictScalars ℤ ∘ₗ AddMonoidHom.toIntLinearMap (e : S →+ I))) =
      Ideal.absNorm I
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem fg_of_isUnit (I : FractionalIdeal S P) (h : IsUnit I) : FG (I : Submodule R P)
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
@[simp, norm_cast]
theorem coe_pow (x : Icc (0 : α) 1) (n : ℕ) : ↑(x ^ n) = ((x : α) ^ n)
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem isRoot_prod {R} [CommRing R] [IsDomain R] {ι : Type*} (s : Finset ι) (p : ι → R[X])
    (x : R) : IsRoot (∏ j ∈ s, p j) x ↔ ∃ i ∈ s, IsRoot (p i) x
-- Mathlib/Data/Set/Basic.lean
theorem mem_of_mem_inter_right {x : α} {a b : Set α} (h : x ∈ a ∩ b) : x ∈ b
-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem SeparatingLeft.ne_zero [Nontrivial M₁] {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}
    (h : B.SeparatingLeft) : B ≠ 0
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
@[simp]
theorem tensorObj (X Y : C) : X ⊗ Y = (X ⨯ Y)
-- Mathlib/Data/Num/Lemmas.lean
@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem add_of_nat (m n) : ((m + n : ℕ) : Num) = m + n
-- Mathlib/Data/Finset/Lattice.lean
theorem exists_mem_eq_sup' (f : ι → α) : ∃ i, i ∈ s ∧ s.sup' H f = f i
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_pi_mulSingle {β : α → Type*} [DecidableEq α] [∀ a, CommMonoid (β a)] (a : α)
    (f : ∀ a, β a) (s : Finset α) :
    (∏ a' ∈ s, Pi.mulSingle a' (f a') a) = if a ∈ s then f a else 1
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
lemma trailingDegree_ne_zero : trailingDegree p ≠ 0 ↔ coeff p 0 = 0
-- Mathlib/Data/Set/Function.lean
theorem congr_right (h₁ : RightInvOn f' f₁ t) (hg : MapsTo f' t s) (heq : EqOn f₁ f₂ s) :
    RightInvOn f' f₂ t
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem mapAlgHom_coe_ringHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    ↑(mapAlgHom f : _ →ₐ[R] MvPolynomial σ S₂) =
      (map ↑f : MvPolynomial σ S₁ →+* MvPolynomial σ S₂)
-- Mathlib/Analysis/Seminorm.lean
theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≤ r }
-- Mathlib/Data/Finset/Pi.lean
@[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
    Pi.cons s a b f a h = b
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
@[simp]
theorem isOrtho_sSup_right {U : Submodule 𝕜 E} {V : Set (Submodule 𝕜 E)} :
    U ⟂ sSup V ↔ ∀ Vᵢ ∈ V, U ⟂ Vᵢ
-- Mathlib/GroupTheory/Coxeter/Length.lean
private theorem exists_word_with_prod (w : W) : ∃ n ω, ω.length = n ∧ π ω = w
-- Mathlib/Topology/Order/Lattice.lean
lemma ContinuousOn.inf' (hf : ContinuousOn f s) (hg : ContinuousOn g s) :
    ContinuousOn (f ⊓ g) s
-- Mathlib/Topology/Separation.lean
theorem continuousOn_update_iff [T1Space X] [DecidableEq X] [TopologicalSpace Y] {f : X → Y}
    {s : Set X} {x : X} {y : Y} :
    ContinuousOn (Function.update f x y) s ↔
      ContinuousOn f (s \ {x}) ∧ (x ∈ s → Tendsto f (𝓝[s \ {x}] x) (𝓝 y))
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem countP_zero : countP p 0 = 0
-- Mathlib/Data/NNRat/BigOperators.lean
@[norm_cast]
theorem coe_sum {s : Finset α} {f : α → ℚ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℚ)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem transpose_apply (M : Matrix m n α) (i j) : transpose M i j = M j i
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem Ico_ae_eq_Icc : Ico a b =ᵐ[μ] Icc a b
-- Mathlib/Algebra/Ring/Commute.lean
theorem mul_self_eq_mul_self_iff [CommRing R] [NoZeroDivisors R] {a b : R} :
    a * a = b * b ↔ a = b ∨ a = -b
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean
/-- Two morphisms out of a pushout are equal if their compositions with the pushout morphisms are
    equal -/
@[ext 1100]
theorem pushout.hom_ext {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} [HasPushout f g] {W : C}
    {k l : pushout f g ⟶ W} (h₀ : pushout.inl _ _ ≫ k = pushout.inl _ _ ≫ l)
    (h₁ : pushout.inr _ _ ≫ k = pushout.inr _ _ ≫ l) : k = l
-- Mathlib/RingTheory/TensorProduct/Basic.lean
theorem map_comp (f₂ : B →ₐ[S] C) (f₁ : A →ₐ[S] B) (g₂ : E →ₐ[R] F) (g₁ : D →ₐ[R] E) :
    map (f₂.comp f₁) (g₂.comp g₁) = (map f₂ g₂).comp (map f₁ g₁)
-- Mathlib/Computability/Partrec.lean
theorem nat_strong_rec (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Computable₂ g)
    (H : ∀ a n, g a ((List.range n).map (f a)) = Option.some (f a n)) : Computable₂ f
-- Mathlib/Data/Set/NAry.lean
theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u
-- Mathlib/Data/Finset/Basic.lean
theorem pairwise_cons' {a : α} (ha : a ∉ s) (r : β → β → Prop) (f : α → β) :
    Pairwise (r on fun a : s.cons a ha => f a) ↔
    Pairwise (r on fun a : s => f a) ∧ ∀ b ∈ s, r (f a) (f b) ∧ r (f b) (f a)
-- Mathlib/MeasureTheory/Measure/Tilted.lean
lemma toReal_rnDeriv_tilted_left {ν : Measure α} [SigmaFinite μ] [SigmaFinite ν]
    (hfν : AEMeasurable f ν) :
    (fun x ↦ ((μ.tilted f).rnDeriv ν x).toReal)
      =ᵐ[ν] fun x ↦ exp (f x) / (∫ x, exp (f x) ∂μ) * (μ.rnDeriv ν x).toReal
-- Mathlib/MeasureTheory/Function/Jacobian.lean
lemma _root_.MeasurableEquiv.withDensity_ofReal_map_symm_apply_eq_integral_abs_deriv_mul
    (f : ℝ ≃ᵐ ℝ) {s : Set ℝ} (hs : MeasurableSet s)
    {g : ℝ → ℝ} (hg : ∀ᵐ x, x ∈ f '' s → 0 ≤ g x) (hg_int : IntegrableOn g (f '' s))
    {f' : ℝ → ℝ} (hf' : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) :
    (volume.withDensity (fun x ↦ ENNReal.ofReal (g x))).map f.symm s
      = ENNReal.ofReal (∫ x in s, |f' x| * g (f x))
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem iUnion_Ioc_add_intCast : ⋃ n : ℤ, Ioc (a + n) (a + n + 1) = Set.univ
-- Mathlib/Topology/Irreducible.lean
theorem nonempty_preirreducible_inter [PreirreducibleSpace X] :
    IsOpen s → IsOpen t → s.Nonempty → t.Nonempty → (s ∩ t).Nonempty
-- Mathlib/RingTheory/FiniteType.lean
/-- An additive monoid `M` is finitely generated if and only if `R[M]` is of
finite type. -/
theorem finiteType_iff_fg [CommRing R] [Nontrivial R] :
    FiniteType R R[M] ↔ AddMonoid.FG M
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
@[reassoc (attr := simp)]
lemma lift_fst (hP : IsPullback fst snd f g) {W : C} (h : W ⟶ X) (k : W ⟶ Y)
    (w : h ≫ f = k ≫ g) : hP.lift h k w ≫ fst = h
-- Mathlib/CategoryTheory/Monad/Algebra.lean
/-- A composition of monad morphisms gives the composition of corresponding functors.
-/
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomComp {T₁ T₂ T₃ : Monad C} (f : T₁ ⟶ T₂) (g : T₂ ⟶ T₃) :
    algebraFunctorOfMonadHom (f ≫ g) ≅ algebraFunctorOfMonadHom g ⋙ algebraFunctorOfMonadHom f
-- Mathlib/Data/Part.lean
theorem left_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : a.Dom
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
theorem injective_pointReflection_left_of_module [Invertible (2 : k)] :
    ∀ y, Injective fun x : P₁ => pointReflection k x y
-- Mathlib/Logic/Equiv/Defs.lean
@[simp] theorem symm_apply_apply (e : α ≃ β) (x : α) : e.symm (e x) = x
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
/-- Given `R`-module X and `S`-module Y, any `g : Y ⟶ (coextendScalars f).obj X`
corresponds to `(restrictScalars f).obj Y ⟶ X` by `y ↦ g y 1`
-/
@[simps apply]
def HomEquiv.toRestriction {X Y} (g : Y ⟶ (coextendScalars f).obj X) :
    (restrictScalars f).obj Y ⟶ X
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp]
theorem map_top_of_surjective (hf : Function.Surjective f) : AffineSubspace.map f ⊤ = ⊤
-- Mathlib/Analysis/Convex/Quasiconvex.lean
theorem QuasilinearOn.monotoneOn_or_antitoneOn [LinearOrder β] (hf : QuasilinearOn 𝕜 s f) :
    MonotoneOn f s ∨ AntitoneOn f s
-- .lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
theorem forIn_eq_data_forIn [Monad m]
    (as : Array α) (b : β) (f : α → β → m (ForInStep β)) :
    forIn as b f = forIn as.data b f
-- Mathlib/Data/Fin/Basic.lean
theorem exists_fin_succ' {P : Fin (n + 1) → Prop} :
    (∃ i, P i) ↔ (∃ i : Fin n, P i.castSucc) ∨ P (.last _)
-- Mathlib/Analysis/SpecialFunctions/NonIntegrable.lean
/-- If `a ≠ b`, `c ∈ [a, b]`, `f` is differentiable in the neighborhood of `c` within
`[a, b] \ {c}`, `‖f x‖ → ∞` as `x → c` within `[a, b] \ {c}`, and `f' = O(g)` along
`𝓝[[a, b] \ {c}] c`, where `f'` is the derivative of `f`, then `g` is not interval integrable on
`a..b`. -/
theorem not_intervalIntegrable_of_tendsto_norm_atTop_of_deriv_isBigO_within_diff_singleton
    {f : ℝ → E} {g : ℝ → F} {a b c : ℝ} (hne : a ≠ b) (hc : c ∈ [[a, b]])
    (h_deriv : ∀ᶠ x in 𝓝[[[a, b]] \ {c}] c, DifferentiableAt ℝ f x)
    (h_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \ {c}] c) atTop)
    (hg : deriv f =O[𝓝[[[a, b]] \ {c}] c] g) : ¬IntervalIntegrable g volume a b
-- Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
@[simp]
theorem coe_trans (e : P₁ ≃ᵃL[k] P₂) (e' : P₂ ≃ᵃL[k] P₃) : ⇑(e.trans e') = e' ∘ e
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem normSq_conj (z : ℂ) : normSq (conj z) = normSq z
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
theorem condexpIndL1_smul' [NormedSpace ℝ F] [SMulCommClass ℝ 𝕜 F] (c : 𝕜) (x : F) :
    condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive (attr := simp)]
theorem coe_mulLeft (x : X) : ⇑(ContinuousMap.mulLeft x) = fun y => x * y
-- Mathlib/Topology/Compactness/Lindelof.lean
theorem isLindelof_accumulate {K : ℕ → Set X} (hK : ∀ n, IsLindelof (K n)) (n : ℕ) :
    IsLindelof (Accumulate K n)
-- Mathlib/Data/Setoid/Partition.lean
@[simp]
lemma quotientEquivClasses_mk_eq (r : Setoid α) (a : α) :
    (quotientEquivClasses r (Quotient.mk r a) : Set α) = { x | r.Rel x a }
-- Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean
@[reassoc (attr := simp)]
lemma isoHomologyπ₀_inv_naturality [L.HasHomology 0] :
    HomologicalComplex.homologyMap φ 0 ≫ L.isoHomologyπ₀.inv =
      K.isoHomologyπ₀.inv ≫ HomologicalComplex.cyclesMap φ 0
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
lemma map_ψ (n : ℤ) : (W.map f).ψ n = (W.ψ n).map (mapRingHom f)
-- Mathlib/CategoryTheory/Dialectica/Monoidal.lean
/-- Left unit cancellation `1 ⊗ X ≅ X` in `Dial C`. -/
@[simps!] def leftUnitor (X : Dial C) : tensorObj tensorUnit X ≅ X
-- Mathlib/Topology/Compactness/Lindelof.lean
theorem isLindelof_univ_iff : IsLindelof (univ : Set X) ↔ LindelofSpace X
-- Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
theorem dist_eq_iff_dist_coe_center_eq :
    dist z w = r ↔ dist (z : ℂ) (w.center r) = w.im * Real.sinh r
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem not_unit_iff_exists_factors_eq (a : α) (hn0 : a ≠ 0) :
    ¬IsUnit a ↔ ∃ f : Multiset α, (∀ b ∈ f, Irreducible b) ∧ f.prod = a ∧ f ≠ ∅
-- Mathlib/Topology/Basic.lean
theorem interior_eq_empty_iff_dense_compl : interior s = ∅ ↔ Dense sᶜ
-- Mathlib/RingTheory/PowerSeries/Basic.lean
/-- Split off the constant coefficient. -/
theorem eq_X_mul_shift_add_const (φ : R⟦X⟧) :
    φ = (X * mk fun p => coeff R (p + 1) φ) + C R (constantCoeff R φ)
-- Mathlib/Order/Bounds/Basic.lean
/-- If `s ⊆ t` and `t` is bounded above, then so is `s`. -/
theorem BddAbove.mono ⦃s t : Set α⦄ (h : s ⊆ t) : BddAbove t → BddAbove s
-- Mathlib/NumberTheory/Pell.lean
/-- A solution has `x ≠ 0`. -/
theorem x_ne_zero (h₀ : 0 ≤ d) (a : Solution₁ d) : a.x ≠ 0
-- Mathlib/Analysis/Complex/Circle.lean
/-- If `z` is a nonzero complex number, then `conj z / z` belongs to the unit circle. -/
@[simps]
def circle.ofConjDivSelf (z : ℂ) (hz : z ≠ 0) : circle
-- Mathlib/Topology/Sets/Opens.lean
theorem openEmbedding' (U : Opens α) : OpenEmbedding (Subtype.val : U → α)
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
/-- The identity functor on `C`, viewed as a functor from the monoidal opposite of `C` to `C`. -/
@[simps obj map] -- not necessary but the symmetry with `mopFunctor` looks nicer
def unmopFunctor : Cᴹᵒᵖ ⥤ C
-- Mathlib/CategoryTheory/Abelian/Pseudoelements.lean
/-- Applying a pseudoelement to a composition of morphisms is the same as composing
    with each morphism. Sadly, this is not a definitional equality, but at least it is
    true. -/
theorem comp_apply {P Q R : C} (f : P ⟶ Q) (g : Q ⟶ R) (a : P) : (f ≫ g) a = g (f a)
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
theorem volume_fundamentalDomain_stdBasis :
    volume (fundamentalDomain (stdBasis K)) = 1
-- Mathlib/RingTheory/ReesAlgebra.lean
theorem monomial_mem_adjoin_monomial {I : Ideal R} {n : ℕ} {r : R} (hr : r ∈ I ^ n) :
    monomial n r ∈ Algebra.adjoin R (Submodule.map (monomial 1 : R →ₗ[R] R[X]) I : Set R[X])
-- Mathlib/Data/Set/Lattice.lean
theorem sUnion_pair (s t : Set α) : ⋃₀{s, t} = s ∪ t
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
/-- Bijection between a subgroup `H` and its opposite. -/
@[to_additive (attr := simps!) "Bijection between an additive subgroup `H` and its opposite."]
def equivOp (H : Subgroup G) : H ≃ H.op
-- Mathlib/Algebra/Polynomial/Derivation.lean
/--
For a derivation `d : A → M` and an element `a : A`, `d.compAEval a` is the
derivation of `R[X]` which takes a polynomial `f` to `d(aeval a f)`.

This derivation takes values in `Module.AEval R M a`, which is `M`, regarded as an
`R[X]`-module, with the action of a polynomial `f` defined by `f • m = (aeval a f) • m`.
-/
/-
Note: `compAEval` is not defined using `Derivation.compAlgebraMap`.
This because `A` is not an `R[X]` algebra and it would be messy to create an algebra instance
within the definition.
-/
@[simps]
def compAEval : Derivation R R[X] <| AEval R M a
-- Mathlib/Data/Real/ConjExponents.lean
lemma inv_pos : 0 < p⁻¹
-- Mathlib/RingTheory/FreeCommRing.lean
@[simp]
theorem restriction_of (p) : restriction s (of p) = if H : p ∈ s then of ⟨p, H⟩ else 0
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp, bv_toNat] theorem toInt_add (x y : BitVec w) :
  (x + y).toInt = (x.toInt + y.toInt).bmod (2^w)
-- Mathlib/SetTheory/Ordinal/Exponential.lean
@[simp, norm_cast]
theorem natCast_opow (m : ℕ) : ∀ n : ℕ, ↑(m ^ n : ℕ) = (m : Ordinal) ^ (n : Ordinal)
-- Mathlib/Data/Multiset/Functor.lean
theorem map_traverse {G : Type* → Type _} [Applicative G] [CommApplicative G] {α β γ : Type _}
    (g : α → G β) (h : β → γ) (x : Multiset α) :
    Functor.map (Functor.map h) (traverse g x) = traverse (Functor.map h ∘ g) x
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
/-- A locally finite measure on a second countable topological space admits a finite spanning
sequence of open sets. -/
noncomputable irreducible_def MeasureTheory.Measure.finiteSpanningSetsInOpen' [TopologicalSpace α]
  [SecondCountableTopology α] {m : MeasurableSpace α} (μ : Measure α) [IsLocallyFiniteMeasure μ] :
  μ.FiniteSpanningSetsIn { K | IsOpen K }