ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem norm_toContinuousLinearMap_le (f : E →ₛₗᵢ[σ₁₂] F) : ‖f.toContinuousLinearMap‖ ≤ 1
-- Mathlib/MeasureTheory/Order/Group/Lattice.lean
@[to_additive (attr := measurability)]
theorem measurable_oneLePart : Measurable (oneLePart : α → α)
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- A special case of `integral_Ioi_of_hasDerivAt_of_tendsto` where we assume that `f` is C^1 with
compact support. -/
theorem _root_.HasCompactSupport.integral_Ioi_deriv_eq (hf : ContDiff ℝ 1 f)
    (h2f : HasCompactSupport f) (b : ℝ) : ∫ x in Ioi b, deriv f x = - f b
-- Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean
@[simp]
theorem tensorLeftHomEquiv_symm_coevaluation_comp_whiskerRight {X Y : C} [HasRightDual X]
    [HasRightDual Y] (f : X ⟶ Y) :
    (tensorLeftHomEquiv _ _ _ _).symm (η_ _ _ ≫ f ▷ (Xᘁ)) = (ρ_ _).hom ≫ fᘁ
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem map_toAddSubmonoid (f : M →ₛₗ[σ₁₂] M₂) (p : Submodule R M) :
    (p.map f).toAddSubmonoid = p.toAddSubmonoid.map (f : M →+ M₂)
-- Mathlib/Analysis/Normed/Group/AddCircle.lean
@[simp]
theorem coe_real_preimage_closedBall_period_zero (x ε : ℝ) :
    (↑) ⁻¹' closedBall (x : AddCircle (0 : ℝ)) ε = closedBall x ε
-- Mathlib/Algebra/CharZero/Lemmas.lean
theorem RingHom.charZero_iff {ϕ : R →+* S} (hϕ : Function.Injective ϕ) : CharZero R ↔ CharZero S
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem dist_comm (x y : α) : dist x y = dist y x
-- Mathlib/Data/Sym/Basic.lean
theorem eq_nil_of_card_zero (s : Sym α 0) : s = nil
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem exists_lt (f : CauSeq α abs) : ∃ a : α, const a < f
-- Mathlib/Algebra/Group/Submonoid/Pointwise.lean
@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : α} {S T : AddSubmonoid A} :
    a • S ≤ a • T ↔ S ≤ T
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp]
theorem mul_left_self_sup : J * I ⊔ I = I
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
lemma indicator_mul_right (s : Set ι) (f g : ι → M₀) :
    indicator s (fun j ↦ f j * g j) i = f i * indicator s g i
-- Mathlib/Topology/Connected/PathConnected.lean
@[continuity]
theorem _root_.Continuous.path_trans {f : Y → Path x y} {g : Y → Path y z} :
    Continuous f → Continuous g → Continuous fun t => (f t).trans (g t)
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
@[simp]
theorem sub_apply (m : ∀ i, M₁ i) : (f - g) m = f m - g m
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
lemma isIntegralCurve_iff_isIntegralCurveOn : IsIntegralCurve γ v ↔ IsIntegralCurveOn γ v univ
-- Mathlib/Data/Set/Basic.lean
theorem mem_diff_singleton {x y : α} {s : Set α} : x ∈ s \ {y} ↔ x ∈ s ∧ x ≠ y
-- Mathlib/AlgebraicGeometry/Properties.lean
theorem reduce_to_affine_nbhd (P : ∀ (X : Scheme) (_ : X), Prop)
    (h₁ : ∀ R x, P (Spec R) x)
    (h₂ : ∀ {X Y} (f : X ⟶ Y) [IsOpenImmersion f] (x : X), P X x → P Y (f.1.base x)) :
    ∀ (X : Scheme) (x : X), P X x
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem ext {Y : Type*} [TopologicalSpace Y] [T2Space Y] {f g : Completion α → Y}
    (hf : Continuous f) (hg : Continuous g) (h : ∀ a : α, f a = g a) : f = g
-- Mathlib/Order/Cover.lean
theorem CovBy.unique_left (ha : a ⋖ c) (hb : b ⋖ c) : a = b
-- Mathlib/GroupTheory/FiniteAbelian.lean
/-- **Structure theorem of finite abelian groups** : Any finite abelian group is a direct sum of
some `ZMod (q i)` for some prime powers `q i > 1`. -/
lemma equiv_directSum_zmod_of_finite' (G : Type*) [AddCommGroup G] [Finite G] :
    ∃ (ι : Type) (_ : Fintype ι) (n : ι → ℕ),
      (∀ i, 1 < n i) ∧ Nonempty (G ≃+ ⨁ i, ZMod (n i))
-- Mathlib/Combinatorics/Quiver/Covering.lean
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u
-- Mathlib/Data/Ordmap/Ordset.lean
theorem All.imp {P Q : α → Prop} (H : ∀ a, P a → Q a) : ∀ {t}, All P t → All Q t
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
lemma pushoutCocone_inl_eq_inr_iff_of_isColimit {c : PushoutCocone f g} (hc : IsColimit c)
    (h₁ : Function.Injective f) (x₁ : X₁) (x₂ : X₂) :
    c.inl x₁ = c.inr x₂ ↔ ∃ (s : S), f s = x₁ ∧ g s = x₂
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `K / E / F` is a field extension tower such that `E / F` is purely inseparable,
if `{ u_i }` is a family of separable elements of `K` which is `F`-linearly independent,
then it is also `E`-linearly independent. -/
theorem LinearIndependent.map_of_isPurelyInseparable_of_isSeparable [IsPurelyInseparable F E]
    {ι : Type*} {v : ι → K} (hsep : ∀ i : ι, IsSeparable F (v i))
    (h : LinearIndependent F v) : LinearIndependent E v
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem ae_prod_mem_iff_ae_ae_mem {s : Set (α × β)} (hs : MeasurableSet s) :
    (∀ᵐ z ∂μ.prod ν, z ∈ s) ↔ ∀ᵐ x ∂μ, ∀ᵐ y ∂ν, (x, y) ∈ s
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
theorem subset_preimage : quasispectrum S a ⊆ f ⁻¹' quasispectrum R a
-- Mathlib/GroupTheory/Coxeter/Length.lean
theorem length_eq_one_iff {w : W} : ℓ w = 1 ↔ ∃ i : B, w = s i
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
@[simp]
theorem dimH_preimage (e : E ≃L[𝕜] F) (s : Set F) : dimH (e ⁻¹' s) = dimH s
-- Mathlib/Analysis/Normed/Operator/WeakOperatorTopology.lean
@[ext 900]
lemma ext_dual {A B : E →WOT[𝕜] F} (h : ∀ x (y : F⋆), y (A x) = y (B x)) : A = B
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem coe_constVAdd (v : V) : ⇑(constVAdd 𝕜 P v : P ≃ᵃⁱ[𝕜] P) = (v +ᵥ ·)
-- Mathlib/Order/Interval/Set/Image.lean
lemma Antitone.image_Iic_subset (h : Antitone f) : f '' Iic b ⊆ Ici (f b)
-- Mathlib/Topology/Connected/LocallyConnected.lean
theorem locallyConnectedSpace_iff_connected_basis :
    LocallyConnectedSpace α ↔
      ∀ x, (𝓝 x).HasBasis (fun s : Set α => s ∈ 𝓝 x ∧ IsPreconnected s) id
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
@[simp] lemma mk_one : mk (1 : NumDenSameDeg 𝒜 x) = 1
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source
-- Mathlib/Topology/Constructions.lean
theorem isClosed_range_inr : IsClosed (range (inr : Y → X ⊕ Y))
-- Mathlib/Dynamics/OmegaLimit.lean
theorem omegaLimit_union : ω f ϕ (s₁ ∪ s₂) = ω f ϕ s₁ ∪ ω f ϕ s₂
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp)]
lemma div_mul_cancel_right (a b : G) : a / (b * a) = b⁻¹
-- Mathlib/Order/Interval/Set/WithBotTop.lean
theorem image_coe_Ico : (some : α → WithTop α) '' Ico a b = Ico (a : WithTop α) b
-- Mathlib/Algebra/Group/Units.lean
/-- See `isUnit_iff_exists` for a similar lemma with one existential. -/
@[to_additive "See `isAddUnit_iff_exists` for a similar lemma with one existential."]
theorem isUnit_iff_exists_and_exists [Monoid M] {a : M} :
    IsUnit a ↔ (∃ b, a * b = 1) ∧ (∃ c, c * a = 1)
-- Mathlib/Topology/Clopen.lean
lemma IsClopen.himp (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ⇨ t)
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem id_toLinearMap : (id.toLinearMap : E →ₗ[R] E) = LinearMap.id
-- Mathlib/Algebra/Periodic.lean
theorem Antiperiodic.int_mul_eq_of_eq_zero [Ring α] [SubtractionMonoid β] (h : Antiperiodic f c)
    (hi : f 0 = 0) : ∀ n : ℤ, f (n * c) = 0
-- Mathlib/Analysis/Normed/Operator/Banach.lean
lemma bijective_iff_dense_range_and_antilipschitz (f : E →SL[σ] F) :
    Bijective f ↔ (LinearMap.range f).topologicalClosure = ⊤ ∧ ∃ c, AntilipschitzWith c f
-- Mathlib/MeasureTheory/Function/Floor.lean
theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ)
-- Mathlib/Topology/Separation.lean
/-- A T₁ space, also known as a Fréchet space, is a topological space
  where every singleton set is closed. Equivalently, for every pair
  `x ≠ y`, there is an open set containing `x` and not `y`. -/
class T1Space (X : Type u) [TopologicalSpace X] : Prop where
  /-- A singleton in a T₁ space is a closed set. -/
  t1 : ∀ x, IsClosed ({x} : Set X)
-- Mathlib/CategoryTheory/Simple.lean
/-- An object is simple if monomorphisms into it are (exclusively) either isomorphisms or zero. -/
class Simple (X : C) : Prop where
  mono_isIso_iff_nonzero : ∀ {Y : C} (f : Y ⟶ X) [Mono f], IsIso f ↔ f ≠ 0
-- Mathlib/Algebra/Group/Fin/Tuple.lean
@[simp] lemma cons_zero_zero : vecCons (0 : α) (0 : Fin n → α) = 0
-- Mathlib/NumberTheory/ModularForms/Basic.lean
@[simp]
theorem zero_apply (z : ℍ) : (0 : CuspForm Γ k) z = 0
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem id_comp (f : BotHom α β) : (BotHom.id β).comp f = f
-- Mathlib/Combinatorics/Additive/FreimanHom.lean
@[to_additive]
lemma IsMulFreimanIso.mono {hmn : m ≤ n} (hf : IsMulFreimanIso n A B f) :
    IsMulFreimanIso m A B f
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem map_ssubset_map {s t : Finset α} : s.map f ⊂ t.map f ↔ s ⊂ t
-- Mathlib/RingTheory/HahnSeries/PowerSeries.lean
theorem ofPowerSeries_X_pow {R} [Semiring R] (n : ℕ) :
    ofPowerSeries Γ R (PowerSeries.X ^ n) = single (n : Γ) 1
-- Mathlib/Order/Filter/Extr.lean
theorem isExtrOn_dual_iff : IsExtrOn (toDual ∘ f) s a ↔ IsExtrOn f s a
-- Mathlib/Algebra/Homology/TotalComplexSymmetry.lean
lemma flip_totalFlipIso : K.flip.totalFlipIso c = (K.totalFlipIso c).symm
-- Mathlib/Analysis/Convex/Independent.lean
/-- A subset of a convex independent set of points is convex independent as well. -/
protected theorem ConvexIndependent.mono {s t : Set E} (hc : ConvexIndependent 𝕜 ((↑) : t → E))
    (hs : s ⊆ t) : ConvexIndependent 𝕜 ((↑) : s → E)
-- Mathlib/RingTheory/Ideal/Maps.lean
@[simp]
theorem map_comap_map : ((I.map f).comap f).map f = I.map f
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem Nondegenerate.toMatrix {B : BilinForm R₃ M₃} (h : B.Nondegenerate) (b : Basis ι R₃ M₃) :
    (BilinForm.toMatrix b B).Nondegenerate
-- Mathlib/FieldTheory/Adjoin.lean
@[simp]
theorem equivAdjoinSimple_gen (pb : PowerBasis K L) :
    pb.equivAdjoinSimple (AdjoinSimple.gen K pb.gen) = pb.gen
-- Mathlib/Logic/Equiv/Basic.lean
theorem swap_apply_def (a b x : α) : swap a b x = if x = a then b else if x = b then a else x
-- Mathlib/CategoryTheory/Triangulated/Opposite.lean
lemma shift_unop_opShiftFunctorEquivalence_counitIso_hom_app (X : Cᵒᵖ) (n : ℤ) :
    ((opShiftFunctorEquivalence C n).counitIso.hom.app X).unop⟦n⟧' =
      ((opShiftFunctorEquivalence C n).unitIso.inv.app ((Opposite.op (X.unop⟦n⟧)))).unop
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
@[simp]
theorem range_arcsin : range arcsin = Icc (-(π / 2)) (π / 2)
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
@[simp] theorem natAbs_ofNat (n : Nat) : natAbs ↑n = n
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem HasMFDerivWithinAt.mdifferentiableWithinAt (h : HasMFDerivWithinAt I I' f s x f') :
    MDifferentiableWithinAt I I' f s x
-- Mathlib/RingTheory/Ideal/Prod.lean
theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} :
    prod I J = prod I' J' ↔ I = I' ∧ J = J'
-- Mathlib/CategoryTheory/Limits/Yoneda.lean
/-- The colimit cocone over `coyoneda.obj X`, with cocone point `PUnit`.
-/
@[simps]
def colimitCocone (X : Cᵒᵖ) : Cocone (coyoneda.obj X)
-- Mathlib/Data/Set/Image.lean
theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range f \ f '' s = f '' sᶜ
-- Mathlib/Data/Real/Irrational.lean
theorem of_mul_self (h : Irrational (x * x)) : Irrational x
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
protected theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ContDiff.continuous (h : ContDiff 𝕜 n f) : Continuous f
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem toEquiv_mk (f : M →ₗ⁅R,L⁆ N) (g : N → M) (h₁ h₂) :
    toEquiv (mk f g h₁ h₂ : M ≃ₗ⁅R,L⁆ N) = Equiv.mk f g h₁ h₂
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
theorem coe_sub_linearMap (D1 D2 : Derivation R A M) : ↑(D1 - D2) = (D1 - D2 : A →ₗ[R] M)
-- Mathlib/Data/Set/Countable.lean
/-- The set of finite subsets of a countable set is countable. -/
theorem countable_setOf_finite_subset {s : Set α} (hs : s.Countable) :
    { t | Set.Finite t ∧ t ⊆ s }.Countable
-- Mathlib/LinearAlgebra/Prod.lean
/-- `LinearMap.prodMap` as an `AlgHom` -/
@[simps!]
def prodMapAlgHom : Module.End R M × Module.End R M₂ →ₐ[R] Module.End R (M × M₂)
-- Mathlib/Data/Set/Basic.lean
theorem subset_compl_iff_disjoint_right : s ⊆ tᶜ ↔ Disjoint s t
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
theorem borel_comap {f : α → β} {t : TopologicalSpace β} :
    @borel α (t.induced f) = (@borel β t).comap f
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem ext_iff {f g : Lp E p μ} : f = g ↔ f =ᵐ[μ] g
-- Mathlib/Topology/UniformSpace/AbstractCompletion.lean
theorem extend_map [CompleteSpace γ] [T0Space γ] {f : β → γ} {g : α → β}
    (hf : UniformContinuous f) (hg : UniformContinuous g) :
    pkg'.extend f ∘ map g = pkg.extend (f ∘ g)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
@[simp] theorem add_one_ne_zero (n : Nat) : n + 1 ≠ 0
-- Mathlib/Data/Nat/Fib/Basic.lean
@[simp]
theorem fib_two : fib 2 = 1
-- Mathlib/Algebra/Periodic.lean
theorem Periodic.nsmul [AddMonoid α] (h : Periodic f c) (n : ℕ) : Periodic f (n • c)
-- Mathlib/Tactic/Ring/Basic.lean
/-- `CSLiftVal a b` means that `b = lift a`. This is used by `ring` to construct an expression `b`
from the input expression `a`, and then run the usual ring algorithm on `b`. -/
class CSLiftVal {α} {β : outParam (Type u)} [CSLift α β] (a : α) (b : outParam β) : Prop where
  /-- The output value `b` is equal to the lift of `a`. This can be supplied by the default
  instance which sets `b := lift a`, but `ring` will treat this as an atom so it is more useful
  when there are other instances which distribute addition or multiplication. -/
  eq : b = CSLift.lift a
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem getElem?_modifyNth_eq (f : α → α) (n) (l : List α) :
    (modifyNth f n l)[n]? = f <$> l[n]?
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
@[simp]
theorem spanCompIso_inv_app_left : (spanCompIso F f g).inv.app WalkingSpan.left = 𝟙 _
-- Mathlib/Data/Set/Image.lean
theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
    Disjoint (f ⁻¹' s) (f ⁻¹' t)
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem iterate_derivative_sub {k : ℕ} {f g : R[X]} :
    derivative^[k] (f - g) = derivative^[k] f - derivative^[k] g
-- Mathlib/Analysis/Convex/Deriv.lean
lemma derivWithin_le_slope (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f S y) :
    derivWithin f S y ≤ slope f x y
-- Mathlib/Order/Heyting/Boundary.lean
theorem boundary_hnot_le (a : α) : ∂ (￢a) ≤ ∂ a
-- Mathlib/Combinatorics/Colex.lean
/-- Colex is an extension of the base order. -/
lemma singleton_le_singleton : (toColex {a} : Colex α) ≤ toColex {b} ↔ a ≤ b
-- Mathlib/MeasureTheory/Integral/Bochner.lean
@[integral_simps]
theorem integral_neg (f : α → G) : ∫ a, -f a ∂μ = -∫ a, f a ∂μ
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem beth_ne_zero (o : Ordinal) : beth o ≠ 0
-- Mathlib/Topology/Homotopy/Contractible.lean
theorem Nullhomotopic.comp_right {f : C(X, Y)} (hf : f.Nullhomotopic) (g : C(Y, Z)) :
    (g.comp f).Nullhomotopic
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem lift_ofNat (n : ℕ) [n.AtLeastTwo] :
    lift.{u} (no_index (OfNat.ofNat n : Cardinal.{v})) = OfNat.ofNat n
-- Mathlib/RingTheory/Kaehler/Basic.lean
theorem KaehlerDifferential.exact_kerCotangentToTensor_mapBaseChange
    (h : Function.Surjective (algebraMap A B)) :
    Function.Exact (kerCotangentToTensor R A B) (KaehlerDifferential.mapBaseChange R A B)
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
@[simp]
theorem cycleOf_apply_apply_self (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
    cycleOf f x (f x) = f (f x)
-- Mathlib/Logic/Function/Basic.lean
/-- Non-dependent version of `Function.update_comp_eq_of_injective'` -/
theorem update_comp_eq_of_injective {β : Sort*} (g : α' → β) {f : α → α'}
    (hf : Function.Injective f) (i : α) (a : β) :
    Function.update g (f i) a ∘ f = Function.update (g ∘ f) i a
-- Mathlib/Data/Sym/Card.lean
/-- For any fintype `α` of cardinality `n`, `card (Sym α k) = multichoose (card α) k`. -/
theorem card_sym_eq_multichoose (α : Type*) (k : ℕ) [Fintype α] [Fintype (Sym α k)] :
    card (Sym α k) = multichoose (card α) k
-- Mathlib/Data/Finset/Sigma.lean
theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
    (b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b
-- Mathlib/Data/Real/Archimedean.lean
theorem sInf_of_not_bddBelow {s : Set ℝ} (hs : ¬BddBelow s) : sInf s = 0
-- Mathlib/Data/Num/Lemmas.lean
@[simp high, norm_cast]
theorem of_to_nat : ∀ n : Num, ((n : ℕ) : Num) = n
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
/-- The functor picking out the `i`-th object of a complex. -/
@[simps]
def eval (i : ι) : HomologicalComplex V c ⥤ V
-- Mathlib/MeasureTheory/Integral/CircleIntegral.lean
@[simp]
theorem deriv_circleMap (c : ℂ) (R : ℝ) (θ : ℝ) : deriv (circleMap c R) θ = circleMap 0 R θ * I
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Simproc.lean
theorem add_sub_add_ge (a c : Nat) {b d : Nat} (h : b ≥ d) : a + b - (c + d) = a + (b - d) - c
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
@[simp]
theorem toSignedMeasure_add (μ ν : Measure α) [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    (μ + ν).toSignedMeasure = μ.toSignedMeasure + ν.toSignedMeasure
-- Mathlib/RingTheory/PrimeSpectrum.lean
theorem zeroLocus_eq_top_iff (s : Set R) :
    zeroLocus s = ⊤ ↔ s ⊆ nilradical R
-- Mathlib/Topology/Algebra/Module/Multilinear/Topology.lean
lemma embedding_toUniformOnFun : Embedding (toUniformOnFun : ContinuousMultilinearMap 𝕜 E F → _)
-- Mathlib/SetTheory/Ordinal/Basic.lean
protected theorem pos_iff_ne_zero {o : Ordinal} : 0 < o ↔ o ≠ 0
-- Mathlib/Topology/Order.lean
theorem generateFrom_iInter_of_generateFrom_eq_self (f : ι → Set (Set α))
    (hf : ∀ i, { s | IsOpen[generateFrom (f i)] s } = f i) :
    generateFrom (⋂ i, f i) = ⨆ i, generateFrom (f i)
-- Mathlib/Order/Hom/Bounded.lean
/-- `BotHomClass F α β` states that `F` is a type of `⊥`-preserving morphisms.

You should extend this class when you extend `BotHom`. -/
class BotHomClass (F α β : Type*) [Bot α] [Bot β] [FunLike F α β] : Prop where
  /-- A `BotHomClass` morphism preserves the bottom element. -/
  map_bot (f : F) : f ⊥ = ⊥
-- Mathlib/Analysis/Calculus/DiffContOnCl.lean
theorem diffContOnCl_const {c : F} : DiffContOnCl 𝕜 (fun _ : E => c) s
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- Closure of a subgroup `K` equals `K`. -/
@[to_additive (attr := simp) "Additive closure of an additive subgroup `K` equals `K`"]
theorem closure_eq : closure (K : Set G) = K
-- Mathlib/MeasureTheory/OuterMeasure/Basic.lean
theorem measure_iUnion_le [Countable ι] (s : ι → Set α) : μ (⋃ i, s i) ≤ ∑' i, μ (s i)
-- Mathlib/RingTheory/Polynomial/Hermite/Gaussian.lean
theorem hermite_eq_deriv_gaussian (n : ℕ) (x : ℝ) : aeval x (hermite n) =
    (-1 : ℝ) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x / Real.exp (-(x ^ 2 / 2))
-- Mathlib/Algebra/Homology/HomologySequenceLemmas.lean
@[reassoc]
lemma δ_naturality (i j : ι) (hij : c.Rel i j) :
    hS₁.δ i j hij ≫ HomologicalComplex.homologyMap φ.τ₁ _ =
      HomologicalComplex.homologyMap φ.τ₃ _ ≫ hS₂.δ i j hij
-- Mathlib/Algebra/Polynomial/Derivation.lean
lemma mkDerivation_apply (a : A) (f : R[X]) :
    mkDerivation R a f = derivative f • a
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
theorem contDiffAt_finsum {s : Set E} (f : SmoothPartitionOfUnity ι 𝓘(ℝ, E) E s) {x₀ : E}
    {g : ι → E → F} (hφ : ∀ i, x₀ ∈ tsupport (f i) → ContDiffAt ℝ n (g i) x₀) :
    ContDiffAt ℝ n (fun x ↦ ∑ᶠ i, f i x • g i x) x₀
-- Mathlib/Topology/Connected/PathConnected.lean
@[simp]
theorem refl_symm {a : X} : (Path.refl a).symm = Path.refl a
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[reassoc (attr := simp)]
lemma colimit_ι_zero_cokernel_desc {C : Type*} [Category C]
    [HasZeroMorphisms C] {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : f ≫ g = 0) [HasCokernel f] :
    colimit.ι (parallelPair f 0) WalkingParallelPair.zero ≫ cokernel.desc f g h = 0
-- Mathlib/LinearAlgebra/Isomorphisms.lean
theorem quotientInfEquivSupQuotient_symm_apply_left (p p' : Submodule R M) (x : ↥(p ⊔ p'))
    (hx : (x : M) ∈ p) :
    (quotientInfEquivSupQuotient p p').symm (Submodule.Quotient.mk x) =
      Submodule.Quotient.mk ⟨x, hx⟩
-- Mathlib/Logic/Equiv/PartialEquiv.lean
protected theorem bijOn : BijOn e e.source e.target
-- Mathlib/Algebra/Module/Basic.lean
theorem map_inv_intCast_smul [AddCommGroup M] [AddCommGroup M₂] {F : Type*} [FunLike F M M₂]
    [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [DivisionRing R] [DivisionRing S] [Module R M]
    [Module S M₂] (z : ℤ) (x : M) : f ((z⁻¹ : R) • x) = (z⁻¹ : S) • f x
-- Mathlib/Computability/TuringMachine.lean
theorem supportsStmt_move {S : Finset Λ'₁} {d : Dir} {q : Stmt'₁} :
    SupportsStmt S (moveₙ d q) = SupportsStmt S q
-- Mathlib/Data/Setoid/Partition.lean
/-- If x ∈ α is in 2 equivalence classes, the equivalence classes are equal. -/
theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x ∈ b) {b'}
    (hc' : b' ∈ r.classes) (hb' : x ∈ b') : b = b'
-- Mathlib/Combinatorics/SetFamily/FourFunctions.lean
/-- The **Marica-Schönheim Inequality**. -/
lemma Finset.card_le_card_diffs (s : Finset α) : s.card ≤ (s \\ s).card
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem isUnit_exp_of_mem_ball [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : IsUnit (exp 𝕂 x)
-- Mathlib/MeasureTheory/Constructions/BorelSpace/ContinuousLinearMap.lean
@[fun_prop]
theorem measurable_comp (L : E →L[𝕜] F) {φ : α → E} (φ_meas : Measurable φ) :
    Measurable fun a : α => L (φ a)
-- Mathlib/Computability/Ackermann.lean
/-- The Ackermann function is not primitive recursive. -/
theorem not_primrec₂_ack : ¬Primrec₂ ack
-- Mathlib/Data/Multiset/Basic.lean
theorem sub_eq_fold_erase (s t : Multiset α) : s - t = foldl erase erase_comm s t
-- Mathlib/MeasureTheory/OuterMeasure/Operations.lean
@[simp]
theorem coe_bot : (⊥ : OuterMeasure α) = 0
-- Mathlib/Algebra/Order/BigOperators/Ring/Finset.lean
/-- If all `f i`, `i ∈ s`, are nonnegative and each `f i` is less than or equal to `g i`, then the
product of `f i` is less than or equal to the product of `g i`. See also `Finset.prod_le_prod'` for
the case of an ordered commutative multiplicative monoid. -/
lemma prod_le_prod (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ g i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem IsPreconnected.intermediate_value_Iic {s : Set X} (hs : IsPreconnected s) {a : X}
    {l : Filter X} (ha : a ∈ s) [NeBot l] (hl : l ≤ 𝓟 s) {f : X → α} (hf : ContinuousOn f s)
    (ht : Tendsto f l atBot) : Iic (f a) ⊆ f '' s
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- The angle between a nonzero vector and its negation. -/
@[simp]
theorem angle_self_neg_of_nonzero {x : V} (hx : x ≠ 0) : angle x (-x) = π
-- Mathlib/Data/Int/Lemmas.lean
/-- A specialization of `abs_sub_lt_of_nonneg_of_lt` for working with the signed subtraction
  of natural numbers. -/
theorem natAbs_coe_sub_coe_lt_of_lt {a b n : ℕ} (a_lt_n : a < n) (b_lt_n : b < n) :
    natAbs (a - b : ℤ) < n
-- Mathlib/Topology/Sheaves/Operations.lean
/-- Given a submonoid at each of the stalks, we may define a submonoid presheaf consisting of
sections whose restriction onto each stalk falls in the given submonoid. -/
@[simps]
noncomputable def submonoidPresheafOfStalk (S : ∀ x : X, Submonoid (F.stalk x)) :
    F.SubmonoidPresheaf
-- Mathlib/Data/Set/Finite.lean
protected theorem toFinset_symmDiff [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∆ t).Finite) : h.toFinset = hs.toFinset ∆ ht.toFinset
-- Mathlib/Topology/Category/CompHausLike/Limits.lean
@[reassoc]
lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g
-- Mathlib/CategoryTheory/Localization/Resolution.lean
@[ext]
lemma hom_ext {R R' : Φ.RightResolution X₂} {φ₁ φ₂ : R ⟶ R'} (h : φ₁.f = φ₂.f) :
    φ₁ = φ₂
-- Mathlib/LinearAlgebra/CliffordAlgebra/Basic.lean
theorem mul_add_swap_eq_polar_of_forall_mul_self_eq {A : Type*} [Ring A] [Algebra R A]
    (f : M →ₗ[R] A) (hf : ∀ x, f x * f x = algebraMap _ _ (Q x)) (a b : M) :
    f a * f b + f b * f a = algebraMap R _ (QuadraticMap.polar Q a b)