ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Group/Hom/Instances.lean
/-- Evaluation of a `MonoidHom` at a point as a monoid homomorphism. See also `MonoidHom.apply`
for the evaluation of any function at a point. -/
@[to_additive (attr := simps!)
      "Evaluation of an `AddMonoidHom` at a point as an additive monoid homomorphism.
      See also `AddMonoidHom.apply` for the evaluation of any function at a point."]
def eval [MulOneClass M] [CommMonoid N] : M →* (M →* N) →* N
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableAt.inner (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) :
    DifferentiableAt ℝ (fun x => ⟪f x, g x⟫) x
-- Mathlib/Data/Sigma/Basic.lean
lemma forall' {p : ∀ a, β a → Prop} : (∀ a b, p a b) ↔ ∀ x : Σ a, β a, p x.1 x.2
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
@[simp]
theorem coe_subtype : (subtype s : s → R) = Subtype.val
-- Mathlib/Probability/Process/Adapted.lean
theorem Filtration.adapted_natural [MetrizableSpace β] [mβ : MeasurableSpace β] [BorelSpace β]
    {u : ι → Ω → β} (hum : ∀ i, StronglyMeasurable[m] (u i)) :
    Adapted (Filtration.natural u hum) u
-- Mathlib/AlgebraicGeometry/Restrict.lean
theorem morphismRestrict_base_coe {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens) (x) :
    @Coe.coe U Y (⟨fun x => x.1⟩) ((f ∣_ U).val.base x) = f.val.base x.1
-- Mathlib/Combinatorics/SimpleGraph/Turan.lean
/-- There are `min n r` parts in a graph on `n` vertices satisfying `G.IsTuranMaximal r`.
`min` handles the `n < r` case, when `G` is complete but still `r + 1`-cliquefree
for having insufficiently many vertices. -/
theorem card_parts : h.finpartition.parts.card = min (Fintype.card V) r
-- Mathlib/LinearAlgebra/Matrix/GeneralLinearGroup/Defs.lean
theorem coe_inv : ↑A⁻¹ = (↑A : Matrix n n R)⁻¹
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem MonotoneOn.inv (hf : MonotoneOn f s) : AntitoneOn (fun x => (f x)⁻¹) s
-- Mathlib/Data/Int/Bitwise.lean
@[simp]
theorem shiftRight_neg (m n : ℤ) : m >>> (-n) = m <<< n
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem inner_sub_right (x y z : F) : ⟪x, y - z⟫ = ⟪x, y⟫ - ⟪x, z⟫
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem eLpNorm'_congr_norm_ae {f g : α → F} (hfg : ∀ᵐ x ∂μ, ‖f x‖ = ‖g x‖) :
    eLpNorm' f q μ = eLpNorm' g q μ
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Order.lean
lemma IsSelfAdjoint.neg_algebraMap_norm_le_self {a : A} (ha : IsSelfAdjoint a := by cfc_tac) :
    - (algebraMap ℝ A ‖a‖) ≤ a
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem real_inner_self_eq_norm_sq (x : F) : ⟪x, x⟫_ℝ = ‖x‖ ^ 2
-- Mathlib/Analysis/Convex/Caratheodory.lean
/-- If `x` is in the convex hull of some finset `t` whose elements are not affine-independent,
then it is in the convex hull of a strict subset of `t`. -/
theorem mem_convexHull_erase [DecidableEq E] {t : Finset E} (h : ¬AffineIndependent 𝕜 ((↑) : t → E))
    {x : E} (m : x ∈ convexHull 𝕜 (↑t : Set E)) :
    ∃ y : (↑t : Set E), x ∈ convexHull 𝕜 (↑(t.erase y) : Set E)
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem Span.finsupp_total_repr {w : Set M} (x : span R w) :
    Finsupp.total w M R (↑) (Span.repr R w x) = x
-- Mathlib/Data/Finmap.lean
theorem erase_union_singleton (a : α) (b : β a) (s : Finmap β) (h : s.lookup a = some b) :
    s.erase a ∪ singleton a b = s
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem exists_ball_subset_ball (h : y ∈ ball x ε) : ∃ ε' > 0, ball y ε' ⊆ ball x ε
-- Mathlib/Data/Real/Sign.lean
theorem sign_neg {r : ℝ} : sign (-r) = -sign r
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp, norm_cast]
theorem coe_id : ((ContinuousAlgHom.id R A) : A →ₐ[R] A) = AlgHom.id R A
-- Mathlib/Analysis/Complex/AbsMax.lean
theorem norm_max_aux₂ {f : ℂ → F} {z w : ℂ} (hd : DiffContOnCl ℂ f (ball z (dist w z)))
    (hz : IsMaxOn (norm ∘ f) (closedBall z (dist w z)) z) : ‖f w‖ = ‖f z‖
-- Mathlib/ModelTheory/Definability.lean
@[simp]
theorem Definable.union {f g : Set (α → M)} (hf : A.Definable L f) (hg : A.Definable L g) :
    A.Definable L (f ∪ g)
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
@[simp]
theorem coe_mk' (e : P₁ ≃ P₂) (e' : V₁ ≃ₗ[k] V₂) (p h) : ⇑(mk' e e' p h) = e
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
theorem Quotient.algHom_ext {I : Ideal A} {S} [Semiring S] [Algebra R₁ S] ⦃f g : A ⧸ I →ₐ[R₁] S⦄
    (h : f.comp (Quotient.mkₐ R₁ I) = g.comp (Quotient.mkₐ R₁ I)) : f = g
-- Mathlib/CategoryTheory/Monoidal/Bimod.lean
@[ext]
lemma hom_ext {M N : Bimod A B} (f g : M ⟶ N) (h : f.hom = g.hom) : f = g
-- Mathlib/Algebra/Homology/ShortComplex/Linear.lean
@[simp] lemma smul_τ₁ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₁ = a • φ.τ₁
-- Mathlib/Analysis/Fourier/AddCircle.lean
/-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is dense. -/
theorem fourierSubalgebra_closure_eq_top : (@fourierSubalgebra T).topologicalClosure = ⊤
-- Mathlib/Topology/UrysohnsLemma.lean
theorem lim_of_nmem_U (c : CU P) (x : X) (h : x ∉ c.U) : c.lim x = 1
-- Mathlib/Topology/GDelta.lean
/-- A closed set is nowhere dense iff its interior is empty. -/
lemma IsClosed.isNowhereDense_iff {s : Set X} (hs : IsClosed s) :
    IsNowhereDense s ↔ interior s = ∅
-- Mathlib/Data/PEquiv.lean
theorem mem_trans (f : α ≃. β) (g : β ≃. γ) (a : α) (c : γ) :
    c ∈ f.trans g a ↔ ∃ b, b ∈ f a ∧ c ∈ g b
-- Mathlib/Topology/Algebra/Order/Rolle.lean
/-- A continuous function on a closed interval with `f a = f b`
takes either its maximum or its minimum value at a point in the interior of the interval. -/
theorem exists_Ioo_extr_on_Icc (hab : a < b) (hfc : ContinuousOn f (Icc a b)) (hfI : f a = f b) :
    ∃ c ∈ Ioo a b, IsExtrOn f (Icc a b) c
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem natAbs_sign (z : Int) : z.sign.natAbs = if z = 0 then 0 else 1
-- Mathlib/Geometry/Manifold/Instances/Sphere.lean
theorem hasFDerivAt_stereoInvFunAux (v : E) :
    HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0
-- Mathlib/Tactic/Ring/Basic.lean
theorem div_pf {R} [DivisionRing R] {a b c d : R} (_ : b⁻¹ = c) (_ : a * c = d) : a / b = d
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem HasFTaylorSeriesUpTo.zero_eq' (h : HasFTaylorSeriesUpTo n f p) (x : E) :
    p x 0 = (continuousMultilinearCurryFin0 𝕜 E F).symm (f x)
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem forall_map_iff {p : β → Prop} (f : α → β) : Forall p (l.map f) ↔ Forall (p ∘ f) l
-- Mathlib/Computability/Primrec.lean
theorem const : ∀ n : ℕ, Nat.Primrec fun _ => n
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem coeIdeal_inj {I J : Ideal R} :
    (I : FractionalIdeal R⁰ K) = (J : FractionalIdeal R⁰ K) ↔ I = J
-- Mathlib/Analysis/Calculus/LocalExtr/LineDeriv.lean
theorem IsExtrOn.lineDerivWithin_eq_zero (h : IsExtrOn f s a)
    (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : lineDerivWithin ℝ f s a b = 0
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The Hausdorff distance satisfies the triangle inequality. -/
theorem hausdorffDist_triangle' (fin : hausdorffEdist t u ≠ ⊤) :
    hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u
-- Mathlib/CategoryTheory/Subobject/Limits.lean
@[simp]
theorem kernelSubobjectMap_id : kernelSubobjectMap (𝟙 (Arrow.mk f)) = 𝟙 _
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem count_erase_self (a : α) (s : Multiset α) : count a (erase s a) = count a s - 1
-- Mathlib/Topology/Algebra/Module/FiniteDimension.lean
@[simp]
theorem det_toContinuousLinearMap (f : E →ₗ[𝕜] E) :
    (LinearMap.toContinuousLinearMap f).det = LinearMap.det f
-- Mathlib/Analysis/Convex/Star.lean
theorem StarConvex.smul (hs : StarConvex 𝕜 x s) (c : 𝕜) : StarConvex 𝕜 (c • x) (c • s)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive (attr := simp) cmp_add_left]
theorem cmp_mul_left' {α : Type*} [Mul α] [LinearOrder α] [CovariantClass α α (· * ·) (· < ·)]
    (a b c : α) :
    cmp (a * b) (a * c) = cmp b c
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem mem_groupoid_of_pregroupoid {PG : Pregroupoid H} {e : PartialHomeomorph H H} :
    e ∈ PG.groupoid ↔ PG.property e e.source ∧ PG.property e.symm e.target
-- Mathlib/LinearAlgebra/InvariantBasisNumber.lean
theorem card_le_of_injective' [StrongRankCondition R] {α β : Type*} [Fintype α] [Fintype β]
    (f : (α →₀ R) →ₗ[R] β →₀ R) (i : Injective f) : Fintype.card α ≤ Fintype.card β
-- Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
/-- A submodule has dimension at most `1` if and only if there is a
single vector, not necessarily in the submodule, such that the
submodule is contained in its span. -/
theorem rank_submodule_le_one_iff' (s : Submodule K V) [Module.Free K s] :
    Module.rank K s ≤ 1 ↔ ∃ v₀, s ≤ K ∙ v₀
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
lemma toUpperSet_le_iff {a b : α} : toUpperSet a ≤ toUpperSet b ↔ a ≤ b
-- Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
/-- If `n % 4 = 3`, then `(-1)^(n/2) = -1`. -/
theorem neg_one_pow_div_two_of_three_mod_four {n : ℕ} (hn : n % 4 = 3) : (-1 : ℤ) ^ (n / 2) = -1
-- Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
@[simp]
theorem coe_pos_real_smul : ↑(x • z) = (x : ℝ) • (z : ℂ)
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
theorem one_lt_inv₀ (ha : a ≠ 0) : 1 < a⁻¹ ↔ a < 1
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
@[simp] theorem blt_eq : (Nat.blt x y = true) = (x < y)
-- Mathlib/Order/SymmDiff.lean
protected theorem Disjoint.symmDiff_left (ha : Disjoint a c) (hb : Disjoint b c) :
    Disjoint (a ∆ b) c
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
lemma injOn_pow {n : ℕ} {ζ : M} (hζ : IsPrimitiveRoot ζ n) :
    Set.InjOn (ζ ^ ·) (Finset.range n)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem lt_of_sub_ne_zero (h : n - m ≠ 0) : m < n
-- Mathlib/Data/Sign.lean
/-- We can decompose a sum of absolute value `n` into a sum of `n` signs. -/
theorem exists_signed_sum {α : Type u_1} [DecidableEq α] (s : Finset α) (f : α → ℤ) :
    ∃ (β : Type u_1) (_ : Fintype β) (sgn : β → SignType) (g : β → α),
      (∀ b, g b ∈ s) ∧
        (Fintype.card β = ∑ a ∈ s, (f a).natAbs) ∧
          ∀ a ∈ s, (∑ b, if g b = a then (sgn b : ℤ) else 0) = f a
-- Mathlib/Probability/Independence/Conditional.lean
@[to_additive]
lemma iCondIndepFun.indepFun_div_left (hf_indep : iCondIndepFun m' hm' (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    CondIndepFun m' hm' (f i / f j) (f k) μ
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- Relation `fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α)` is transitive. -/
theorem Filter.Tendsto.uniformity_trans {l : Filter β} {f₁ f₂ f₃ : β → α}
    (h₁₂ : Tendsto (fun x => (f₁ x, f₂ x)) l (𝓤 α))
    (h₂₃ : Tendsto (fun x => (f₂ x, f₃ x)) l (𝓤 α)) : Tendsto (fun x => (f₁ x, f₃ x)) l (𝓤 α)
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[simp, measurability]
protected theorem MeasurableSet.univ : MeasurableSet (univ : Set α)
-- Mathlib/Data/Sum/Order.lean
theorem inl_lt_inr [LT α] [LT β] (a : α) (b : β) : toLex (inl a) < toLex (inr b)
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- A linear map `T` is zero, if and only if the identity `⟪T x, x⟫_ℂ = 0` holds for all `x`.
-/
theorem inner_map_self_eq_zero (T : V →ₗ[ℂ] V) : (∀ x : V, ⟪T x, x⟫_ℂ = 0) ↔ T = 0
-- Mathlib/Data/Matrix/Basic.lean
theorem sub_mulVec [Fintype n] (A B : Matrix m n α) (x : n → α) :
    (A - B) *ᵥ x = A *ᵥ x - B *ᵥ x
-- Mathlib/Order/SuccPred/Basic.lean
theorem Icc_pred_left (h : pred a ≤ b) : Icc (pred a) b = insert (pred a) (Icc a b)
-- Mathlib/Algebra/Homology/Embedding/Boundary.lean
lemma prev_f_of_not_boundaryGE [e.IsRelIff] {i j : ι} (hij : c.prev j = i)
    (hj : ¬ e.BoundaryGE j) :
    c'.prev (e.f j) = e.f i
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[mono]
theorem toSubsemigroup_strictMono :
    StrictMono (toSubsemigroup : NonUnitalSubsemiring R → Subsemigroup R)
-- Mathlib/CategoryTheory/Monoidal/Subcategory.lean
/-- A property `C → Prop` is a closed predicate if it is closed under taking internal homs
-/
class ClosedPredicate : Prop where
  prop_ihom : ∀ {X Y}, P X → P Y → P ((ihom X).obj Y) := by aesop_cat
-- Mathlib/CategoryTheory/Sums/Basic.lean
/-- The sum `F.sum' G` precomposed with the right inclusion functor is isomorphic to `G` -/
@[simps!]
def inrCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inr_ A B ⋙ F.sum' G ≅ G
-- Mathlib/Algebra/DirectSum/Internal.lean
@[nolint simpNF, simp, norm_cast] theorem coe_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : A 0) = (OfNat.ofNat n : R)
-- Mathlib/Order/WellFoundedSet.lean
protected theorem IsWF.insert (h : IsWF s) (a : α) : IsWF (insert a s)
-- Mathlib/Data/Nat/Defs.lean
lemma mul_eq_left (ha : a ≠ 0) : a * b = a ↔ b = 1
-- Mathlib/RingTheory/Nilpotent/Basic.lean
theorem IsNilpotent.isUnit_add_left_of_commute [Ring R] {r u : R}
    (hnil : IsNilpotent r) (hu : IsUnit u) (h_comm : Commute r u) :
    IsUnit (u + r)
-- Mathlib/Topology/MetricSpace/Basic.lean
/-- Deduce the equality of points from the vanishing of the nonnegative distance-/
theorem eq_of_nndist_eq_zero {x y : γ} : nndist x y = 0 → x = y
-- Mathlib/Algebra/Ring/Subring/MulOpposite.lean
theorem op_closure (s : Set R) : (closure s).op = closure (MulOpposite.unop ⁻¹' s)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean
/-- The `n`-th Chebyshev polynomial of the first kind evaluates on `cos θ` to the
value `cos (n * θ)`. -/
@[simp]
theorem T_real_cos : (T ℝ n).eval (cos θ) = cos (n * θ)
-- Mathlib/Algebra/MvPolynomial/Monad.lean
@[simp]
theorem map_comp_C (f : R →+* S) : (map f).comp (C : R →+* MvPolynomial σ R) = C.comp f
-- Mathlib/Data/List/Intervals.lean
theorem filter_lt_of_top_le {n m l : ℕ} (hml : m ≤ l) :
    ((Ico n m).filter fun x => x < l) = Ico n m
-- Mathlib/Algebra/Ring/Hom/Defs.lean
protected theorem ext_iff {f g : α →ₙ+* β} : f = g ↔ ∀ x, f x = g x
-- Mathlib/RepresentationTheory/Invariants.lean
/-- `average k G` is invariant under left multiplication by elements of `G`.
-/
@[simp]
theorem mul_average_left (g : G) : ↑(Finsupp.single g 1) * average k G = average k G
-- Mathlib/Data/Matrix/Rank.lean
/-- The rank of a diagnonal matrix is the count of non-zero elements on its main diagonal -/
theorem rank_diagonal [Fintype m] [DecidableEq m] [DecidableEq R] (w : m → R) :
    (diagonal w).rank = Fintype.card {i // (w i) ≠ 0}
-- Mathlib/Data/Int/Cast/Lemmas.lean
lemma cast_comm (n : ℤ) (x : α) : n * x = x * n
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem const_sub (x y : β) : const (x - y) = const x - const y
-- Mathlib/Data/Set/Image.lean
theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : s ⊆ range f) :
    (f ⁻¹' s).Nonempty
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem restrict_le_zero_subset (hi₁ : MeasurableSet i) (hij : j ⊆ i) (hi₂ : v ≤[i] 0) : v ≤[j] 0
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.eq_nil {l : List α} (p : l ~ []) : l = []
-- Mathlib/Topology/PartialHomeomorph.lean
lemma isOpen_symm_image_iff_of_subset_target {t : Set Y} (hs : t ⊆ e.target) :
    IsOpen (e.symm '' t) ↔ IsOpen t
-- Mathlib/CategoryTheory/CofilteredSystem.lean
/-- If `F` satisfies the Mittag-Leffler condition, its restriction to eventual ranges is a
surjective functor. -/
theorem surjective_toEventualRanges (h : F.IsMittagLeffler) ⦃i j⦄ (f : i ⟶ j) :
    (F.toEventualRanges.map f).Surjective
-- Mathlib/Data/Matrix/Basic.lean
/-- The `AlgHom` between spaces of square matrices induced by an `AlgHom` between their
coefficients. This is `Matrix.map` as an `AlgHom`. -/
@[simps]
def mapMatrix (f : α →ₐ[R] β) : Matrix m m α →ₐ[R] Matrix m m β
-- Mathlib/Analysis/LocallyConvex/Bounded.lean
theorem IsVonNBounded.of_sub_left (hst : IsVonNBounded 𝕜 (s - t)) (ht : t.Nonempty) :
    IsVonNBounded 𝕜 s
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
@[simp]
theorem deriv_mul_const_field' (v : 𝕜') : (deriv fun x => u x * v) = fun x => deriv u x * v
-- Mathlib/LinearAlgebra/BilinearMap.lean
@[simp]
theorem compr₂_apply (f : M →ₗ[R] Nₗ →ₗ[R] Pₗ) (g : Pₗ →ₗ[R] Qₗ) (m : M) (n : Nₗ) :
    f.compr₂ g m n = g (f m n)
-- Mathlib/Order/Hom/Order.lean
@[simp] lemma coe_inf [SemilatticeInf β] (f g : α →o β) :
  ((f ⊓ g : α →o β) : α → β) = (f : α → β) ⊓ g
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem nontrivial_of_einfsep_lt_top (hs : s.einfsep < ∞) : s.Nontrivial
-- Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
/-- The Lebesgue measure associated to a basis, giving measure `1` to the parallelepiped spanned
by the basis. -/
irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E
-- Mathlib/Topology/Separation.lean
/-- In an R₀ space, the closure of a singleton is a compact set. -/
theorem isCompact_closure_singleton : IsCompact (closure {x})
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
lemma set_smul_le (p : Submodule R M)
    (closed_under_smul : ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p) :
    s • N ≤ p
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
theorem lift_neg' {β} [AddCommGroup β] (f : α → β) : lift (-f) = -lift f
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem mdifferentiableOn_of_locally_mdifferentiableOn
    (h : ∀ x ∈ s, ∃ u, IsOpen u ∧ x ∈ u ∧ MDifferentiableOn I I' f (s ∩ u)) :
    MDifferentiableOn I I' f s
-- Mathlib/RingTheory/Valuation/ValuationSubring.lean
@[simp]
theorem pointwise_smul_toSubring (g : G) (S : ValuationSubring K) :
    (g • S).toSubring = g • S.toSubring
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
theorem det_updateColumn_smul (M : Matrix n n R) (j : n) (s : R) (u : n → R) :
    det (updateColumn M j <| s • u) = s * det (updateColumn M j u)
-- Mathlib/Algebra/Group/Units.lean
/-- `field_simp` needs the reverse direction of `divp_assoc` to move all `/ₚ` to the right. -/
@[field_simps]
theorem divp_assoc' (x y : α) (u : αˣ) : x * (y /ₚ u) = x * y /ₚ u
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem add_min_add_left (a b c : Nat) : min (a + b) (a + c) = a + min b c
-- Mathlib/Data/Real/Basic.lean
@[simp]
theorem ofRat_rat {abv : ℚ → ℚ} [IsAbsoluteValue abv] (q : ℚ) :
    ofRat (q : ℚ) = (q : Cauchy abv)
-- Mathlib/Topology/Algebra/Module/Basic.lean
/-- If `M` is a topological module over `R` and `0` is a limit of invertible elements of `R`, then
`⊤` is the only submodule of `M` with a nonempty interior.
This is the case, e.g., if `R` is a nontrivially normed field. -/
theorem Submodule.eq_top_of_nonempty_interior' [NeBot (𝓝[{ x : R | IsUnit x }] 0)]
    (s : Submodule R M) (hs : (interior (s : Set M)).Nonempty) : s = ⊤
-- Mathlib/Algebra/Category/BialgebraCat/Basic.lean
@[ext]
lemma hom_ext {X Y : BialgebraCat.{v} R} (f g : X ⟶ Y) (h : f.toBialgHom = g.toBialgHom) :
    f = g
-- Mathlib/Data/Set/Defs.lean
@[simp, mfld_simps] theorem mem_univ (x : α) : x ∈ @univ α
-- Mathlib/Data/PNat/Interval.lean
theorem uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).subtype fun n : ℕ => 0 < n
-- Mathlib/CategoryTheory/Comma/Presheaf.lean
/-- "Functoriality of `MakesOverArrow η s` in `s`. -/
lemma map₂ {F : Cᵒᵖ ⥤ Type v} {η : F ⟶ A} {X Y : C} (f : X ⟶ Y)
    {s : yoneda.obj X ⟶ A} {t : yoneda.obj Y ⟶ A} (hst : yoneda.map f ≫ t = s)
    {u : F.obj (op Y)} (h : MakesOverArrow η t u) : MakesOverArrow η s (F.map f.op u)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_add_one_eq {α : Type*} [Infinite α] : #α + 1 = #α
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
@[simp]
theorem eLpNorm_zero' : eLpNorm (fun _ : α => (0 : F)) p μ = 0
-- Mathlib/Algebra/Ring/BooleanRing.lean
@[simp]
theorem ofBoolAlg_mul_ofBoolAlg_eq_left_iff {a b : AsBoolAlg α} :
    ofBoolAlg a * ofBoolAlg b = ofBoolAlg a ↔ a ≤ b
-- Mathlib/RingTheory/Polynomial/Dickson.lean
theorem dickson_two : dickson k a 2 = X ^ 2 - C a * (3 - k : R[X])
-- Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
/-- Gives a recurrence to compute the `n + 1`th value of the sequence of integer and fractional
parts of a value in case of termination.
-/
theorem succ_nth_stream_eq_none_iff :
    IntFractPair.stream v (n + 1) = none ↔
      IntFractPair.stream v n = none ∨ ∃ ifp, IntFractPair.stream v n = some ifp ∧ ifp.fr = 0
-- Mathlib/Order/SuccPred/Limit.lean
theorem IsSuccLimit.succ_ne (h : IsSuccLimit a) (b : α) : succ b ≠ a
-- Mathlib/Algebra/Lie/Submodule.lean
theorem ker_le_comap : f.ker ≤ J.comap f
-- Mathlib/Data/Set/Image.lean
/-- Image is monotone with respect to `⊆`. See `Set.monotone_image` for the statement in
terms of `≤`. -/
@[gcongr]
theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b
-- Mathlib/RingTheory/PowerBasis.lean
@[simp]
theorem natDegree_minpoly [Nontrivial A] (pb : PowerBasis A S) :
    (minpoly A pb.gen).natDegree = pb.dim
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
/-- For every set there exists a measurable superset of the same measure. -/
theorem exists_measurable_superset (μ : Measure α) (s : Set α) :
    ∃ t, s ⊆ t ∧ MeasurableSet t ∧ μ t = μ s
-- Mathlib/Topology/MetricSpace/Gluing.lean
/-- The left injection of a space in a disjoint union is an isometry -/
theorem isometry_inl : Isometry (Sum.inl : X → X ⊕ Y)
-- Mathlib/Algebra/Star/StarAlgHom.lean
/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →⋆ₙₐ[R] B) × (A →⋆ₙₐ[R] C) ≃ (A →⋆ₙₐ[R] B × C)
-- Mathlib/Order/Disjoint.lean
theorem eq_top_of_isCompl_bot (h : IsCompl x ⊥) : x = ⊤
-- Mathlib/Analysis/Normed/Algebra/Spectrum.lean
theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace 𝕜] {a : A} (ha : (σ a).Nonempty)
    {r : ℝ≥0} (hr : ∀ k ∈ σ a, ‖k‖₊ < r) : spectralRadius 𝕜 a < r
-- Mathlib/LinearAlgebra/Pi.lean
@[simp]
theorem LinearMap.vecEmpty_apply (m : M) : (LinearMap.vecEmpty : M →ₗ[R] Fin 0 → M₃) m = ![]
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
@[simp]
theorem zero_apply (m : ∀ i, M₁ i) : (0 : MultilinearMap R M₁ M₂) m = 0
-- Mathlib/Algebra/Group/Commute/Defs.lean
/-- Any element commutes with itself. -/
@[to_additive (attr := refl, simp) "Any element commutes with itself."]
protected theorem refl (a : S) : Commute a a
-- Mathlib/Data/Real/EReal.lean
theorem sub_le_sub {x y z t : EReal} (h : x ≤ y) (h' : t ≤ z) : x - z ≤ y - t
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_map_div (f g : R → R) (a : A) (hg' : ∀ x ∈ spectrum R a, g x ≠ 0)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (hg : ContinuousOn g (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc (fun x ↦ f x / g x) a = cfc f a * Ring.inverse (cfc g a)
-- Mathlib/Order/Filter/Extr.lean
theorem isMaxOn_univ_iff : IsMaxOn f univ a ↔ ∀ x, f x ≤ f a
-- Mathlib/Data/Num/Lemmas.lean
theorem bit0_of_bit0 : ∀ n : Num, n + n = n.bit0
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma biUnion_associatedPrimes_eq_compl_regular [IsNoetherianRing R] :
    ⋃ p ∈ associatedPrimes R M, p = { r : R | IsSMulRegular M r }ᶜ
-- Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
theorem SLOnGLPos_smul_apply (s : SL(2, ℤ)) (g : GL(2, ℝ)⁺) (z : ℍ) :
    (s • g) • z = ((s : GL(2, ℝ)⁺) * g) • z
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem add_succ (n m : Nat) : n + succ m = succ (n + m)
-- Mathlib/MeasureTheory/Measure/GiryMonad.lean
theorem join_map_map {f : α → β} (hf : Measurable f) (μ : Measure (Measure α)) :
    join (map (map f) μ) = map f (join μ)
-- Mathlib/Algebra/Ring/Ext.lean
@[ext] theorem ext ⦃inst₁ inst₂ : Ring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem lookup_cons_self  {k : α} : ((k,b)::es).lookup k = some b
-- Mathlib/AlgebraicGeometry/Morphisms/UnderlyingMap.lean
lemma surjective_eq_topologically :
    @Surjective = topologically Function.Surjective
-- Mathlib/MeasureTheory/PiSystem.lean
theorem generate_inter {s : Set (Set α)} (hs : IsPiSystem s) {t₁ t₂ : Set α}
    (ht₁ : (generate s).Has t₁) (ht₂ : (generate s).Has t₂) : (generate s).Has (t₁ ∩ t₂)
-- Mathlib/Topology/MetricSpace/Thickening.lean
theorem thickening_of_nonpos (hδ : δ ≤ 0) (s : Set α) : thickening δ s = ∅
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp]
theorem coe_normComp : (f.normComp : α → ℝ) = norm ∘ f
-- .lake/packages/lean4/src/lean/Init/Data/String/Basic.lean
@[simp] theorem mk_lt_mk {i₁ i₂ : Nat} : Pos.mk i₁ < Pos.mk i₂ ↔ i₁ < i₂