ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Functor/EpiMono.lean
/-- A functor reflects epimorphisms if morphisms that are mapped to epimorphisms are themselves
    epimorphisms. -/
class ReflectsEpimorphisms (F : C ⥤ D) : Prop where
  /-- A functor reflects epimorphisms if morphisms that are mapped to epimorphisms are themselves
      epimorphisms. -/
  reflects : ∀ {X Y : C} (f : X ⟶ Y), Epi (F.map f) → Epi f
-- Mathlib/CategoryTheory/Sites/CoverPreserving.lean
/-- The identity functor on a site is cover-preserving. -/
theorem idCoverPreserving : CoverPreserving J J (𝟭 _)
-- Mathlib/Topology/Order/Monotone.lean
theorem IsClosed.sSup_mem {s : Set α} (hs : s.Nonempty) (hc : IsClosed s) : sSup s ∈ s
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem add_pos_right (m) (h : 0 < n) : 0 < m + n
-- Mathlib/Topology/Filter.lean
theorem nhds_eq' (l : Filter α) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' }
-- Mathlib/Algebra/Divisibility/Units.lean
theorem isRelPrime_self : IsRelPrime x x ↔ IsUnit x
-- Mathlib/GroupTheory/GroupAction/SubMulAction/Pointwise.lean
theorem subset_coe_one : (1 : Set M) ⊆ (1 : SubMulAction R M)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem erase_subperm (a : α) (l : List α) : l.erase a <+~ l
-- Mathlib/Algebra/RingQuot.lean
theorem lift_unique (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y⦄, r x y → f x = f y)
    (g : RingQuot r →+* T) (h : g.comp (mkRingHom r) = f) : g = lift ⟨f, w⟩
-- Mathlib/Data/ENNReal/Inv.lean
@[simp] lemma mul_inv_ne_top (a : ℝ≥0∞) : a * a⁻¹ ≠ ⊤
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
protected theorem sup_inf_distrib_right (a b c : CauSeq α abs) : a ⊓ b ⊔ c = (a ⊔ c) ⊓ (b ⊔ c)
-- Mathlib/Algebra/MvPolynomial/Derivation.lean
@[simp]
theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0
-- Mathlib/Algebra/Module/Submodule/Range.lean
theorem comap_le_comap_iff {f : F} (hf : range f = ⊤) {p p'} : comap f p ≤ comap f p' ↔ p ≤ p'
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
/-- If there is a single strong epi-mono factorisation of `f`, then every image factorisation is a
    strong epi-mono factorisation. -/
theorem strongEpi_of_strongEpiMonoFactorisation {X Y : C} {f : X ⟶ Y}
    (F : StrongEpiMonoFactorisation f) {F' : MonoFactorisation f} (hF' : IsImage F') :
    StrongEpi F'.e
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
@[simp]
theorem mem_incidenceFinset [DecidableEq V] (e : Sym2 V) :
    e ∈ G.incidenceFinset v ↔ e ∈ G.incidenceSet v
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem infsep_triple (hxy : x ≠ y) (hyz : y ≠ z) (hxz : x ≠ z) :
    ({x, y, z} : Set α).infsep = dist x y ⊓ dist x z ⊓ dist y z
-- Mathlib/RingTheory/PowerSeries/Derivative.lean
theorem derivativeFun_add (f g : R⟦X⟧) :
    derivativeFun (f + g) = derivativeFun f + derivativeFun g
-- Mathlib/LinearAlgebra/Matrix/Transvection.lean
theorem listTransvecCol_get (i : Fin (listTransvecCol M).length) :
    (listTransvecCol M).get i =
      letI i' := Fin.cast (length_listTransvecCol M) i
      transvection (inl i') (inr unit) <| -M (inl i') (inr unit) / M (inr unit) (inr unit)
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
@[reassoc]
theorem condition (a) :
    I.fst a ≫ Multicoequalizer.π I (I.fstFrom a) = I.snd a ≫ Multicoequalizer.π I (I.sndFrom a)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem lift_add (a b : Ordinal.{v}) : lift.{u} (a + b) = lift.{u} a + lift.{u} b
-- Mathlib/RingTheory/PowerSeries/Derivative.lean
theorem coeff_derivative (f : R⟦X⟧) (n : ℕ) :
    coeff R n (d⁄dX R f) = coeff R (n + 1) f * (n + 1)
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
@[simp]
theorem equalizerIso_hom_comp_subtype : (equalizerIso g h).hom ≫ Subtype.val = equalizer.ι g h
-- Mathlib/Data/Nat/GCD/Basic.lean
@[simp]
theorem coprime_add_mul_right_right (m n k : ℕ) : Coprime m (n + k * m) ↔ Coprime m n
-- Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean
@[simp]
theorem op_le_op_iff {S₁ S₂ : Subalgebra R A} : S₁.op ≤ S₂.op ↔ S₁ ≤ S₂
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
@[simp]
theorem pure_seq (f : α → β) (x : FreeAbelianGroup α) : pure f <*> x = f <$> x
-- Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
lemma differentiable_fourierChar_neg_bilinear_right (v : V) :
    Differentiable ℝ (fun w ↦ (𝐞 (-L v w) : ℂ))
-- Mathlib/Data/List/Basic.lean
@[deprecated get_of_mem (since := "2023-01-05")]
theorem nthLe_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n h, nthLe l n h = a
-- Mathlib/Order/Bounds/Basic.lean
theorem IsLeast.unique (Ha : IsLeast s a) (Hb : IsLeast s b) : a = b
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem lid_comp_rTensor (f : N →ₗ[R] R) :
    (TensorProduct.lid R M).comp (rTensor M f) = lift ((lsmul R M).comp f)
-- Mathlib/Algebra/Periodic.lean
theorem Periodic.sub_zsmul_eq [AddGroup α] (h : Periodic f c) (n : ℤ) : f (x - n • c) = f x
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive]
lemma orbitRel.Quotient.subgroup_quotient_eq_iff {H : Subgroup G} {x : orbitRel.Quotient G α}
    {a b : x.orbit} : (⟦a⟧ : orbitRel.Quotient H x.orbit) = ⟦b⟧ ↔
      (⟦↑a⟧ : orbitRel.Quotient H α) = ⟦↑b⟧
-- Mathlib/Data/Nat/Cast/Basic.lean
/-- This is primed to match `eq_intCast'`. -/
theorem eq_natCast' {R} [NonAssocSemiring R] (f : ℕ →+* R) : f = Nat.castRingHom R
-- Mathlib/Analysis/BoxIntegral/Partition/Split.lean
@[simp]
theorem splitMany_insert (I : Box ι) (s : Finset (ι × ℝ)) (p : ι × ℝ) :
    splitMany I (insert p s) = splitMany I s ⊓ split I p.1 p.2
-- Mathlib/Tactic/Linarith/Lemmas.lean
theorem mul_nonpos {α} [OrderedRing α] {a b : α} (ha : a ≤ 0) (hb : 0 < b) : b * a ≤ 0
-- Mathlib/Data/Finset/Fold.lean
@[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
    (insert a s).fold op b f = f a * s.fold op b f
-- Mathlib/Algebra/Order/Field/Power.lean
theorem Even.zpow_abs {p : ℤ} (hp : Even p) (a : α) : |a| ^ p = a ^ p
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
/-- The ring equiv `R/I ≃+* S/J` induced by a ring equiv `f : R ≃+* S`, where `J = f(I)`. -/
@[simps]
def quotientEquiv (I : Ideal R) (J : Ideal S) (f : R ≃+* S) (hIJ : J = I.map (f : R →+* S)) :
    R ⧸ I ≃+* S ⧸ J
-- Mathlib/GroupTheory/Coset.lean
@[to_additive (attr := simp)]
theorem quotientSubgroupOfEmbeddingOfLE_apply_mk (H : Subgroup α) (h : s ≤ t) (g : s) :
    quotientSubgroupOfEmbeddingOfLE H h (QuotientGroup.mk g) =
      (QuotientGroup.mk (inclusion h g) : (fun _ => { x // x ∈ t } ⧸ subgroupOf H t) ↑g)
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
theorem mem_append_of_mem_left {a : α} {as : List α} (bs : List α) : a ∈ as → a ∈ as ++ bs
-- Mathlib/Order/SupClosed.lean
lemma SupClosed.finsetSup_mem [OrderBot α] (hs : SupClosed s) (ht : t.Nonempty) :
    (∀ i ∈ t, f i ∈ s) → t.sup f ∈ s
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
lemma add_norm_nonneg (f : α →ᵇ ℝ) :
    0 ≤ f + const _ ‖f‖
-- Mathlib/CategoryTheory/Bicategory/NaturalTransformation/Oplax.lean
@[simp]
lemma Modification.id_app' {X : B} {F G : OplaxFunctor B C} (α : F ⟶ G) :
    Modification.app (𝟙 α) X = 𝟙 (α.app X)
-- Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
theorem mkPiRing_coeff_eq (p : FormalMultilinearSeries 𝕜 𝕜 E) (n : ℕ) :
    ContinuousMultilinearMap.mkPiRing 𝕜 (Fin n) (p.coeff n) = p n
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
@[simp]
protected theorem sup_idem (a : CauSeq α abs) : a ⊔ a = a
-- Mathlib/Data/Set/Function.lean
theorem BijOn.inter (h₁ : BijOn f s₁ t₁) (h₂ : BijOn f s₂ t₂) (h : InjOn f (s₁ ∪ s₂)) :
    BijOn f (s₁ ∩ s₂) (t₁ ∩ t₂)
-- Mathlib/Order/OmegaCompletePartialOrder.lean
@[simp]
theorem map_id : c.map OrderHom.id = c
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem dualDistrib_apply (f : Dual R M) (g : Dual R N) (m : M) (n : N) :
    dualDistrib R M N (f ⊗ₜ g) (m ⊗ₜ n) = f m * g n
-- Mathlib/Data/Finsupp/Multiset.lean
@[simp]
theorem toFinsupp_singleton (a : α) : toFinsupp ({a} : Multiset α) = Finsupp.single a 1
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem C_mul_comp : (C a * p).comp r = C a * p.comp r
-- Mathlib/MeasureTheory/Decomposition/Jordan.lean
theorem real_smul_negPart_neg (r : ℝ) (hr : r < 0) :
    (r • j).negPart = (-r).toNNReal • j.posPart
-- Mathlib/Algebra/Algebra/Operations.lean
theorem pow_eq_span_pow_set (n : ℕ) : M ^ n = span R ((M : Set A) ^ n)
-- Mathlib/Data/SetLike/Basic.lean
@[simp]
theorem mem_coe {x : B} : x ∈ (p : Set B) ↔ x ∈ p
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
theorem nnnorm_eq_ciSup (f : PiLp ∞ β) : ‖f‖₊ = ⨆ i, ‖f i‖₊
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem left_mem_Icc : a ∈ Icc a b ↔ a ≤ b
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
@[simp]
theorem coneOfIsSplitMono_ι : (coneOfIsSplitMono f).ι = f
-- Mathlib/Analysis/Normed/Ring/Seminorm.lean
@[ext]
theorem ext {p q : MulRingNorm R} : (∀ x, p x = q x) → p = q
-- Mathlib/Algebra/GroupWithZero/Defs.lean
lemma eq_zero_or_one_of_sq_eq_self (hx : x ^ 2 = x) : x = 0 ∨ x = 1
-- Mathlib/Data/Complex/Abs.lean
theorem abs_le_abs_re_add_abs_im (z : ℂ) : Complex.abs z ≤ |z.re| + |z.im|
-- Mathlib/Combinatorics/Enumerative/DoubleCounting.lean
/-- Double counting argument. Considering `r` as a bipartite graph, the LHS is a lower bound on the
number of edges while the RHS is an upper bound. -/
theorem card_mul_le_card_mul [∀ a b, Decidable (r a b)]
    (hm : ∀ a ∈ s, m ≤ (t.bipartiteAbove r a).card)
    (hn : ∀ b ∈ t, (s.bipartiteBelow r b).card ≤ n) : s.card * m ≤ t.card * n
-- Mathlib/Logic/Equiv/Fin.lean
@[simp]
theorem finSuccEquiv'_symm_some (i : Fin (n + 1)) (j : Fin n) :
    (finSuccEquiv' i).symm (some j) = i.succAbove j
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
nonrec theorem DifferentiableAt.isBigO_sub {f : E → F} {x₀ : E} (h : DifferentiableAt 𝕜 f x₀) :
    (f · - f x₀) =O[𝓝 x₀] (· - x₀)
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem degree_list_sum_le (l : List S[X]) : degree l.sum ≤ (l.map natDegree).maximum
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem measure_support_lt_top_of_integrable (f : α →ₛ E) (hf : Integrable f μ) :
    μ (support f) < ∞
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
protected theorem eq_of_add_eq_add_left {a b c : Cardinal} (h : a + b = a + c) (ha : a < ℵ₀) :
    b = c
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem ContinuousLinearMap.closedComplemented_ker_of_rightInverse {R : Type*} [Ring R]
    {M : Type*} [TopologicalSpace M] [AddCommGroup M] {M₂ : Type*} [TopologicalSpace M₂]
    [AddCommGroup M₂] [Module R M] [Module R M₂] [TopologicalAddGroup M] (f₁ : M →L[R] M₂)
    (f₂ : M₂ →L[R] M) (h : Function.RightInverse f₂ f₁) : (ker f₁).ClosedComplemented
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
theorem cocycle_snd_fst_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.snd _ _ ≫ pullback.fst _ _ ≫
      pullback.snd _ _ = pullback.snd _ _ ≫ pullback.fst _ _ ≫ pullback.snd _ _
-- Mathlib/Data/Finset/Card.lean
@[simp] lemma card_val (s : Finset α) : Multiset.card s.1 = s.card
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem mem_filter {p : Box ι → Prop} : J ∈ π.filter p ↔ J ∈ π ∧ p J
-- Mathlib/Order/Hom/Basic.lean
@[simp]
theorem dualDual_apply (a : α) : dualDual α a = toDual (toDual a)
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_union_le (f : α → ℝ≥0∞) (s t : Set α) :
    ∫⁻ a in s ∪ t, f a ∂μ ≤ ∫⁻ a in s, f a ∂μ + ∫⁻ a in t, f a ∂μ
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get?_push_lt (a : Array α) (x : α) (i : Nat) (h : i < a.size) :
    (a.push x)[i]? = some a[i]
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
lemma withDensity_mono {f g : α → ℝ≥0∞} (hfg : f ≤ᵐ[μ] g) :
    μ.withDensity f ≤ μ.withDensity g
-- Mathlib/Topology/Order/LowerUpperTopology.lean
lemma toLower_inj {a b : α} : toLower a = toLower b ↔ a = b
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
/-- For `f : α →ᵤ[𝔖] β`, where `𝔖 : Set (Set α)` is nonempty and directed, `𝓝 f` admits the
family `{g | ∀ x ∈ S, (f x, g x) ∈ V}` for `S ∈ 𝔖` and `V ∈ 𝓤 β` as a filter basis. -/
protected theorem hasBasis_nhds (f : α →ᵤ[𝔖] β) (h : 𝔖.Nonempty) (h' : DirectedOn (· ⊆ ·) 𝔖) :
    (𝓝 f).HasBasis (fun SV : Set α × Set (β × β) => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓤 β) fun SV =>
      { g | (g, f) ∈ UniformOnFun.gen 𝔖 SV.1 SV.2 }
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp]
theorem canonicalEquiv_canonicalEquiv (P'' : Type*) [CommRing P''] [Algebra R P'']
    [IsLocalization S P''] (I : FractionalIdeal S P) :
    canonicalEquiv S P' P'' (canonicalEquiv S P P' I) = canonicalEquiv S P P'' I
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.comp (h₁ : MapsTo g t p) (h₂ : MapsTo f s t) : MapsTo (g ∘ f) s p
-- Mathlib/Data/Multiset/Basic.lean
theorem monotone_filter_right (s : Multiset α) ⦃p q : α → Prop⦄ [DecidablePred p] [DecidablePred q]
    (h : ∀ b, p b → q b) :
    s.filter p ≤ s.filter q
-- Mathlib/MeasureTheory/Function/SimpleFuncDense.lean
theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
    [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x)
-- Mathlib/RingTheory/OreLocalization/Ring.lean
protected theorem zero_mul (x : R[S⁻¹]) : 0 * x = 0
-- Mathlib/RingTheory/Polynomial/Basic.lean
/-- A polynomial over a field which is not a unit must have a monic irreducible factor.
See also `WfDvdMonoid.exists_irreducible_factor`. -/
theorem Polynomial.exists_monic_irreducible_factor {F : Type*} [Field F] (f : F[X])
    (hu : ¬IsUnit f) : ∃ g : F[X], g.Monic ∧ Irreducible g ∧ g ∣ f
-- Mathlib/Data/Finset/NatDivisors.lean
/-- `Nat.divisors` as a `MonoidHom`. -/
@[simps]
def Nat.divisorsHom : ℕ →* Finset ℕ
-- Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean
theorem hasMFDerivAt_extChartAt (h : y ∈ (chartAt H x).source) :
    HasMFDerivAt I 𝓘(𝕜, E) (extChartAt I x) y (mfderiv I I (chartAt H x) y : _)
-- Mathlib/Computability/Reduce.lean
@[simp]
protected theorem le_add_left (d₁ d₂ : ManyOneDegree) : d₁ ≤ d₁ + d₂
-- Mathlib/Data/Set/Function.lean
theorem piecewise_mem_pi {δ : α → Type*} {t : Set α} {t' : ∀ i, Set (δ i)} {f g} (hf : f ∈ pi t t')
    (hg : g ∈ pi t t') : s.piecewise f g ∈ pi t t'
-- Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean
@[simp]
theorem map_neg {X Y : C} {f : X ⟶ Y} : F.map (-f) = -F.map f
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem mapRange.addMonoidHom_toZeroHom (f : M →+ N) :
    (mapRange.addMonoidHom f).toZeroHom = (mapRange.zeroHom f.toZeroHom : ZeroHom (α →₀ _) _)
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
theorem to_affineMap_injective {f g : P →ᴬ[R] Q} (h : (f : P →ᵃ[R] Q) = (g : P →ᵃ[R] Q)) :
    f = g
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
theorem memℓp_infty_iff {f : ∀ i, E i} : Memℓp f ∞ ↔ BddAbove (Set.range fun i => ‖f i‖)
-- Mathlib/Order/Interval/Set/OrdConnected.lean
theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
    OrdConnected (f ⁻¹' s)
-- Mathlib/Algebra/Ring/SumsOfSquares.lean
/--
In an additive monoid with multiplication `R`, the submonoid generated by the squares is the set of
sums of squares.
-/
theorem SquaresAddClosure [AddMonoid R] : closure IsSquare = SumSqIn R
-- Mathlib/Data/DFinsupp/Basic.lean
/-- `DFinsupp.subtypeDomain` as a `LinearMap`. -/
@[simps]
def subtypeDomainLinearMap [Semiring γ] [∀ i, AddCommMonoid (β i)] [∀ i, Module γ (β i)]
    (p : ι → Prop) [DecidablePred p] : (Π₀ i, β i) →ₗ[γ] Π₀ i : Subtype p, β i
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp] lemma cons_support_tail (p : G.Walk x y) (hp : ¬p.Nil) :
    x :: (p.tail hp).support = p.support
-- Mathlib/GroupTheory/SpecificGroups/Quaternion.lean
/-- If `0 < n`, then `xa i` has order 4.
-/
@[simp]
theorem orderOf_xa [NeZero n] (i : ZMod (2 * n)) : orderOf (xa i) = 4
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem singleton_disjoint_neighborFinset : Disjoint {v} (G.neighborFinset v)
-- Mathlib/Order/PartialSups.lean
theorem iSup_eq_iSup_of_partialSups_eq_partialSups {f g : ℕ → α}
    (h : partialSups f = partialSups g) : ⨆ n, f n = ⨆ n, g n
-- Mathlib/Topology/Algebra/Algebra.lean
/-- Continuous algebra homomorphisms between algebras. We only put the type classes that are
necessary for the definition, although in applications `M` and `B` will be topological algebras
over the topological ring `R`. -/
structure ContinuousAlgHom (R : Type*) [CommSemiring R] (A : Type*) [Semiring A]
    [TopologicalSpace A] (B : Type*) [Semiring B] [TopologicalSpace B] [Algebra R A] [Algebra R B]
    extends A →ₐ[R] B where
-- TODO: replace with `fun_prop` when that is stable
  cont : Continuous toFun := by continuity
-- Mathlib/Algebra/Lie/Nilpotent.lean
theorem isNilpotent_toEnd_of_isNilpotent [IsNilpotent R L M] (x : L) :
    _root_.IsNilpotent (toEnd R L M x)
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
/-- The angle between two vectors is `θ` if and only if they are nonzero and the second vector
is the first rotated by `θ` and scaled by the ratio of the norms, or `θ` and at least one of the
vectors are zero. -/
theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle) :
    o.oangle x y = θ ↔
      x ≠ 0 ∧ y ≠ 0 ∧ y = (‖y‖ / ‖x‖) • o.rotation θ x ∨ θ = 0 ∧ (x = 0 ∨ y = 0)
-- Mathlib/Order/WellFounded.lean
theorem wellFounded_iff_has_min {r : α → α → Prop} :
    WellFounded r ↔ ∀ s : Set α, s.Nonempty → ∃ m ∈ s, ∀ x ∈ s, ¬r x m
-- Mathlib/Algebra/Field/Subfield.lean
/-- A subfield is closed under subtraction. -/
protected theorem sub_mem {x y : K} : x ∈ s → y ∈ s → x - y ∈ s
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Ico_filter_lt_of_le_left [DecidablePred (· < c)] (hca : c ≤ a) :
    (Ico a b).filter (· < c) = ∅
-- Mathlib/Analysis/Normed/Module/FiniteDimension.lean
theorem lipschitzExtensionConstant_pos (E' : Type*) [NormedAddCommGroup E'] [NormedSpace ℝ E']
    [FiniteDimensional ℝ E'] : 0 < lipschitzExtensionConstant E'
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp]
lemma map_apply (f : V ≃ W) (G : SimpleGraph V) (v : V) :
    SimpleGraph.Iso.map f G v = f v
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Chunk.lean
private theorem density_sub_eps_le_sum_density_div_card [Nonempty α]
    (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    {hU : U ∈ P.parts} {hV : V ∈ P.parts} {A B : Finset (Finset α)}
    (hA : A ⊆ (chunk hP G ε hU).parts) (hB : B ⊆ (chunk hP G ε hV).parts) :
    (G.edgeDensity (A.biUnion id) (B.biUnion id)) - ε ^ 5 / 50 ≤
    (∑ ab ∈ A.product B, (G.edgeDensity ab.1 ab.2 : ℝ)) / (A.card * B.card)
-- Mathlib/Topology/MetricSpace/Basic.lean
theorem MetricSpace.replaceUniformity_eq {γ} [U : UniformSpace γ] (m : MetricSpace γ)
    (H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : m.replaceUniformity H = m
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem HasFDerivAt.mul_const (hc : HasFDerivAt c c' x) (d : 𝔸') :
    HasFDerivAt (fun y => c y * d) (d • c') x
-- Mathlib/Order/SuccPred/LinearLocallyFinite.lean
theorem toZ_iterate_succ [NoMaxOrder ι] (n : ℕ) : toZ i0 (succ^[n] i0) = n
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
/-- Two affine maps are equal if they have equal linear maps and are equal at some point. -/
theorem ext_linear_iff {f g : P1 →ᵃ[k] P2} : f = g ↔ (f.linear = g.linear) ∧ (∃ p, f p = g p)
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
/-- If a finset has cardinality larger than `finrank + 1`,
then there is a nontrivial linear relation amongst its elements,
such that the coefficients of the relation sum to zero. -/
theorem Module.exists_nontrivial_relation_sum_zero_of_finrank_succ_lt_card
    {t : Finset M} (h : finrank R M + 1 < t.card) :
    ∃ f : M → R, ∑ e ∈ t, f e • e = 0 ∧ ∑ e ∈ t, f e = 0 ∧ ∃ x ∈ t, f x ≠ 0
-- Mathlib/Algebra/Lie/Basic.lean
theorem lie_jacobi : ⁅x, ⁅y, z⁆⁆ + ⁅y, ⁅z, x⁆⁆ + ⁅z, ⁅x, y⁆⁆ = 0
-- Mathlib/GroupTheory/Commutator.lean
theorem commutator_mem_commutator (h₁ : g₁ ∈ H₁) (h₂ : g₂ ∈ H₂) : ⁅g₁, g₂⁆ ∈ ⁅H₁, H₂⁆
-- Mathlib/Algebra/Lie/Basic.lean
theorem LieRingModule.compLieHom_apply (x : L₁) (m : M) :
    haveI := LieRingModule.compLieHom M f
    ⁅x, m⁆ = ⁅f x, m⁆
-- Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
theorem fourierIntegral_iteratedDeriv {f : ℝ → E} {N : ℕ∞} {n : ℕ} (hf : ContDiff ℝ N f)
    (h'f : ∀ (n : ℕ), n ≤ N → Integrable (iteratedDeriv n f)) (hn : n ≤ N) :
    𝓕 (iteratedDeriv n f) = fun (x : ℝ) ↦ (2 * π * I * x) ^ n • (𝓕 f x)
-- Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
/-- Alternative formulation of `MeasureTheory.SignedMeasure.exists_isCompl_positive_negative`
(the Hahn decomposition theorem) using set complements. -/
theorem exists_compl_positive_negative (s : SignedMeasure α) :
    ∃ i : Set α, MeasurableSet i ∧ 0 ≤[i] s ∧ s ≤[iᶜ] 0
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- Determinant of 2x2 matrix -/
theorem det_fin_two (A : Matrix (Fin 2) (Fin 2) R) : det A = A 0 0 * A 1 1 - A 0 1 * A 1 0
-- Mathlib/Analysis/MellinTransform.lean
/-- Auxiliary lemma to reduce convergence statements from vector-valued functions to real
scalar-valued functions. -/
theorem mellin_convergent_iff_norm [NormedSpace ℂ E] {f : ℝ → E} {T : Set ℝ} (hT : T ⊆ Ioi 0)
    (hT' : MeasurableSet T) (hfc : AEStronglyMeasurable f <| volume.restrict <| Ioi 0) {s : ℂ} :
    IntegrableOn (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) T ↔
      IntegrableOn (fun t : ℝ => t ^ (s.re - 1) * ‖f t‖) T
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- The oriented angle between three points is π if and only if the second point is strictly
between the other two. -/
theorem oangle_eq_pi_iff_sbtw {p₁ p₂ p₃ : P} : ∡ p₁ p₂ p₃ = π ↔ Sbtw ℝ p₁ p₂ p₃
-- Mathlib/LinearAlgebra/FreeModule/Basic.lean
/-- `Module.Free R M` is the statement that the `R`-module `M` is free. -/
class Module.Free : Prop where
  exists_basis : Nonempty <| (I : Type v) × Basis I R M
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem nonempty_support_iff : p.support.Nonempty ↔ p ≠ 0
-- Mathlib/Order/RelSeries.lean
@[simp] lemma head_tail (p : RelSeries r) (len_pos : p.length ≠ 0) :
    (p.tail len_pos).head = p 1
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[simp]
theorem measure_union_toMeasurable : μ (s ∪ toMeasurable μ t) = μ (s ∪ t)
-- Mathlib/Combinatorics/SimpleGraph/Metric.lean
protected theorem edist_triangle : G.edist u w ≤ G.edist u v + G.edist v w
-- Mathlib/Algebra/Module/Submodule/Range.lean
theorem mem_submoduleImage_of_le {M' : Type*} [AddCommMonoid M'] [Module R M'] {O : Submodule R M}
    {ϕ : O →ₗ[R] M'} {N : Submodule R M} (hNO : N ≤ O) {x : M'} :
    x ∈ ϕ.submoduleImage N ↔ ∃ (y : _) (yN : y ∈ N), ϕ ⟨y, hNO yN⟩ = x
-- Mathlib/Algebra/Group/Fin/Tuple.lean
@[simp] lemma zero_empty : (0 : Fin 0 → α) = ![]
-- Mathlib/CategoryTheory/Shift/Basic.lean
@[simp]
lemma map_zero_inv_app (X : C) :
    F.map ((zero hF s i).inv.app X) =
      (shiftFunctorZero D A).inv.app (F.obj X) ≫ (i 0).inv.app X
-- Mathlib/ModelTheory/Substructures.lean
theorem map_map (g : N →[L] P) (f : M →[L] N) : (S.map f).map g = S.map (g.comp f)
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
theorem Integrable.prod_left_ae [SFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
    ∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ
-- Mathlib/Topology/Basic.lean
theorem closure_subset_iff_isClosed : closure s ⊆ s ↔ IsClosed s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem differentiableAt_sinh {x : ℂ} : DifferentiableAt ℂ sinh x
-- Mathlib/MeasureTheory/Measure/MutuallySingular.lean
@[symm]
theorem symm (h : ν ⟂ₘ μ) : μ ⟂ₘ ν
-- Mathlib/Order/Hom/Basic.lean
@[simp, norm_cast]
theorem coe_le_coe {f g : α →o β} : (f : α → β) ≤ g ↔ f ≤ g
-- Mathlib/Analysis/Calculus/SmoothSeries.lean
/-- Consider a series of functions `∑' n, f n x` on a preconnected open set. If the series converges
at a point, and all functions in the series are differentiable with a summable bound on the
derivatives, then the series converges everywhere on the set. -/
theorem summable_of_summable_hasDerivAt_of_isPreconnected (hu : Summable u) (ht : IsOpen t)
    (h't : IsPreconnected t) (hg : ∀ n y, y ∈ t → HasDerivAt (g n) (g' n y) y)
    (hg' : ∀ n y, y ∈ t → ‖g' n y‖ ≤ u n) (hy₀ : y₀ ∈ t) (hg0 : Summable (g · y₀))
    (hy : y ∈ t) : Summable fun n => g n y