ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
/-- A class for `𝕜`-algebras with a partial order where the ordering is compatible with the
(quasi)spectrum. -/
class NonnegSpectrumClass (𝕜 A : Type*) [OrderedCommSemiring 𝕜] [NonUnitalRing A] [PartialOrder A]
    [Module 𝕜 A] : Prop where
  quasispectrum_nonneg_of_nonneg : ∀ a : A, 0 ≤ a → ∀ x ∈ quasispectrum 𝕜 a, 0 ≤ x
-- Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean
/-- The natural isomorphism `toKaroubi (SimplicialObject C) ≅ N₁ ⋙ Γ₂`. -/
@[simps! inv]
def Γ₂N₁ : toKaroubi _ ≅ (N₁ : SimplicialObject C ⥤ _) ⋙ Γ₂
-- Mathlib/Probability/IdentDistrib.lean
@[to_additive]
theorem div_const [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
    IdentDistrib (fun x => f x / c) (fun x => g x / c) μ ν
-- Mathlib/CategoryTheory/Limits/TypesFiltered.lean
protected theorem rel_equiv : _root_.Equivalence (FilteredColimit.Rel.{v, u} F)
-- Mathlib/Logic/Equiv/Set.lean
lemma setOf_apply_symm_eq_image_setOf {α β} (e : α ≃ β) (p : α → Prop) :
    {b | p (e.symm b)} = e '' {a | p a}
-- Mathlib/Algebra/Homology/ShortComplex/QuasiIso.lean
lemma quasiIso_iff_of_arrow_mk_iso (φ : S₁ ⟶ S₂) (φ' : S₃ ⟶ S₄) (e : Arrow.mk φ ≅ Arrow.mk φ') :
    QuasiIso φ ↔ QuasiIso φ'
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem dz_val : ↑(d a1) = az a * az a - 1
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp]
theorem tensor_apply {W X Y Z : Type u} (f : W ⟶ X) (g : Y ⟶ Z) (p : W ⊗ Y) :
    (f ⊗ g) p = (f p.1, g p.2)
-- Mathlib/Algebra/Lie/SkewAdjoint.lean
@[simp]
theorem skewAdjointLieSubalgebraEquiv_symm_apply (f : skewAdjointLieSubalgebra B) :
    ↑((skewAdjointLieSubalgebraEquiv B e).symm f) = e.symm.lieConj f
-- Mathlib/Algebra/Group/Action/Basic.lean
lemma invOf_smul_eq_iff : ⅟c • x = y ↔ x = c • y
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Multiplying the second vector passed to `oangle` by a nonzero real does not change twice the
angle. -/
@[simp]
theorem two_zsmul_oangle_smul_right_of_ne_zero (x y : V) {r : ℝ} (hr : r ≠ 0) :
    (2 : ℤ) • o.oangle x (r • y) = (2 : ℤ) • o.oangle x y
-- Mathlib/Data/Sym/Sym2.lean
theorem rel_iff {x y z w : α} : Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem Iff.symm (h : a ↔ b) : b ↔ a
-- Mathlib/GroupTheory/DoubleCoset.lean
theorem right_bot_eq_right_quot (H : Subgroup G) :
    Quotient (H.1 : Set G) (⊥ : Subgroup G) = _root_.Quotient (QuotientGroup.rightRel H)
-- Mathlib/Order/ModularLattice.lean
theorem inf_covBy_of_covBy_sup_right : b ⋖ a ⊔ b → a ⊓ b ⋖ a
-- Mathlib/RingTheory/Filtration.lean
theorem Stable.inter_left [IsNoetherianRing R] [Module.Finite R M] (hF : F.Stable) :
    (F' ⊓ F).Stable
-- Mathlib/Data/ENNReal/Inv.lean
theorem inv_strictAnti : StrictAnti (Inv.inv : ℝ≥0∞ → ℝ≥0∞)
-- Mathlib/Data/Stream/Init.lean
protected theorem eta (s : Stream' α) : (head s::tail s) = s
-- Mathlib/Order/SupClosed.lean
@[simp] lemma infClosed_preimage_ofDual {s : Set α} :
    InfClosed (ofDual ⁻¹' s) ↔ SupClosed s
-- Mathlib/Order/RelClasses.lean
/-- All values are accessible under the well-founded `<`. -/
theorem apply : ∀ a : α, Acc (· < ·) a
-- Mathlib/Order/CompleteLattice.lean
@[simp]
theorem iInf_neg {p : Prop} {f : p → α} (hp : ¬p) : ⨅ h : p, f h = ⊤
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventually_top {p : α → Prop} : (∀ᶠ x in ⊤, p x) ↔ ∀ x, p x
-- Mathlib/Topology/Algebra/WithZeroTopology.lean
/-- The neighbourhood filter of an invertible element consists of all sets containing that
element. -/
theorem nhds_coe_units (γ : Γ₀ˣ) : 𝓝 (γ : Γ₀) = pure (γ : Γ₀)
-- Mathlib/Data/Set/Function.lean
theorem StrictAntiOn.comp_strictMonoOn [Preorder α] [Preorder β] [Preorder γ] {g : β → γ}
    {f : α → β} {s : Set α} {t : Set β} (hg : StrictAntiOn g t) (hf : StrictMonoOn f s)
    (hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_compl_finset_of_infinite {α : Type*} [Infinite α] (s : Finset α) :
    #((↑s)ᶜ : Set α) = #α
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem unit_map_eq (u : Rˣ) : (Units.map (v : R →* Γ₀) u : Γ₀) = v u
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem inl_neg [Neg R] [SubNegZeroMonoid M] (r : R) : (inl (-r) : tsze R M) = -inl r
-- Mathlib/Topology/Homotopy/Equiv.lean
@[simp]
theorem symm_toHomotopyEquiv (h : X ≃ₜ Y) : h.symm.toHomotopyEquiv = h.toHomotopyEquiv.symm
-- Mathlib/Data/Sum/Order.lean
theorem inr_le_inr_iff [LE α] [LE β] {a b : β} : toLex (inr a : α ⊕ β) ≤ toLex (inr b) ↔ a ≤ b
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem tan_eq_of_two_nsmul_eq {θ ψ : Angle} (h : (2 : ℕ) • θ = (2 : ℕ) • ψ) : tan θ = tan ψ
-- Mathlib/Topology/Inseparable.lean
@[simp]
theorem mk_eq_mk : mk x = mk y ↔ (x ~ᵢ y)
-- Mathlib/Order/Bounded.lean
theorem unbounded_lt_iff_unbounded_le [Preorder α] [NoMaxOrder α] :
    Unbounded (· < ·) s ↔ Unbounded (· ≤ ·) s
-- Mathlib/Topology/ContinuousFunction/CompactlySupported.lean
theorem zero_apply [Zero β] : (0 : C_c(α, β)) x = 0
-- .lake/packages/batteries/Batteries/Data/Sum/Basic.lean
@[simp] theorem map_inr (f : α → α') (g : β → β') (x : β) : (inr x).map f g = inr (g x)
-- Mathlib/Computability/TMToPartrec.lean
theorem K'.elim_rev (a b c d) : K'.elim a b c d K'.rev = b
-- Mathlib/Algebra/Module/Submodule/LinearMap.lean
@[simp]
theorem coe_inclusion (h : p ≤ p') (x : p) : (inclusion h x : M) = x
-- Mathlib/Algebra/MvPolynomial/Supported.lean
@[simp]
theorem supported_le_supported_iff [Nontrivial R] : supported R s ≤ supported R t ↔ s ⊆ t
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
/-- For a functor `F : C ⥤ D` and an object `d : D`, we obtain a contravariant functor from the
category of structured arrows `d ⟶ F.obj c` to the category of costructured arrows
`F.op.obj c ⟶ (op d)`.
-/
@[simps]
def toCostructuredArrow (F : C ⥤ D) (d : D) :
    (StructuredArrow d F)ᵒᵖ ⥤ CostructuredArrow F.op (op d)
-- Mathlib/Data/Nat/Choose/Basic.lean
theorem factorial_mul_factorial_dvd_factorial_add (i j : ℕ) : i ! * j ! ∣ (i + j)!
-- .lake/packages/lean4/src/lean/Init/Control/ExceptCps.lean
@[simp] theorem runCatch_lift {α : Type u} [Monad m] [LawfulMonad m] (x : m α) : runCatch (ExceptCpsT.lift x : ExceptCpsT α m α) = x
-- Mathlib/Topology/Connected/Clopen.lean
theorem Sum.isConnected_iff [TopologicalSpace β] {s : Set (α ⊕ β)} :
    IsConnected s ↔
      (∃ t, IsConnected t ∧ s = Sum.inl '' t) ∨ ∃ t, IsConnected t ∧ s = Sum.inr '' t
-- Mathlib/RingTheory/Adjoin/Basic.lean
@[simp]
theorem adjoin_univ : adjoin R (Set.univ : Set A) = ⊤
-- Mathlib/Data/List/Basic.lean
theorem length_eq_three {l : List α} : l.length = 3 ↔ ∃ a b c, l = [a, b, c]
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isBigO_abs_left : (fun x => |u x|) =O[l] g ↔ u =O[l] g
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem comapDomain'_zero [∀ i, Zero (β i)] (h : κ → ι) {h' : ι → κ}
    (hh' : Function.LeftInverse h' h) : comapDomain' h hh' (0 : Π₀ i, β i) = 0
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- The inner product of two vectors, divided by the product of their
norms, has absolute value 1 if and only if they are nonzero and one is
a multiple of the other. One form of equality case for Cauchy-Schwarz. -/
theorem norm_inner_div_norm_mul_norm_eq_one_iff (x y : E) :
    ‖⟪x, y⟫ / (‖x‖ * ‖y‖)‖ = 1 ↔ x ≠ 0 ∧ ∃ r : 𝕜, r ≠ 0 ∧ y = r • x
-- Mathlib/NumberTheory/MulChar/Basic.lean
@[deprecated (since := "2024-06-16")]
lemma IsNontrivial.sum_eq_zero [IsDomain R'] {χ : MulChar R R'} (hχ : χ.IsNontrivial) :
    ∑ a, χ a = 0
-- Mathlib/Algebra/Order/CauSeq/BigOperators.lean
lemma geo_series_const (a : α) {x : α} (hx1 : |x| < 1) :
    IsCauSeq abs fun m ↦ ∑ n ∈ range m, (a * x ^ n)
-- Mathlib/Dynamics/BirkhoffSum/Basic.lean
theorem birkhoffSum_zero (f : α → α) (g : α → M) (x : α) : birkhoffSum f g 0 x = 0
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem IsWide.eqToHom_mem {S : Subgroupoid C} (Sw : S.IsWide) {c d : C} (h : c = d) :
    eqToHom h ∈ S.arrows c d
-- Mathlib/Logic/Basic.lean
/-- Provide the reverse of modus tollens (`mt`) as dot notation for implications. -/
protected theorem Function.mtr : (¬a → ¬b) → b → a
-- Mathlib/Topology/Clopen.lean
protected theorem IsClopen.isOpen (hs : IsClopen s) : IsOpen s
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem ContMDiff.mul (hf : ContMDiff I' I n f) (hg : ContMDiff I' I n g) :
    ContMDiff I' I n (f * g)
-- Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
/-- Construct a cocone over a wide span. -/
@[simps]
def mkCocone {F : WidePushoutShape J ⥤ C} {X : C} (f : F.obj none ⟶ X) (ι : ∀ j, F.obj (some j) ⟶ X)
    (w : ∀ j, F.map (Hom.init j) ≫ ι j = f) : Cocone F
-- Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean
theorem exists_eq_pow_mul_of_isCompact_of_isQuasiSeparated (X : Scheme.{u}) (U : X.Opens)
    (hU : IsCompact U.1) (hU' : IsQuasiSeparated U.1) (f : Γ(X, U)) (x : Γ(X, X.basicOpen f)) :
    ∃ (n : ℕ) (y : Γ(X, U)), y |_ X.basicOpen f = (f |_ X.basicOpen f) ^ n * x
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem analyticAt_exp_of_mem_ball (x : 𝔸) (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    AnalyticAt 𝕂 (exp 𝕂) x
-- Mathlib/Data/Matroid/Constructions.lean
theorem eq_loopyOn_or_rkPos (M : Matroid α) : M = loopyOn M.E ∨ RkPos M
-- Mathlib/Data/Matrix/RowCol.lean
theorem map_updateRow [DecidableEq m] (f : α → β) :
    map (updateRow M i b) f = updateRow (M.map f) i (f ∘ b)
-- Mathlib/Deprecated/Subring.lean
theorem closure_subset_iff {s t : Set R} (ht : IsSubring t) : closure s ⊆ t ↔ s ⊆ t
-- Mathlib/Data/Real/Pi/Bounds.lean
theorem pi_gt_three : 3 < π
-- Mathlib/Order/WellFounded.lean
theorem not_lt_argmin [Nonempty α] (a : α) : ¬f a < f (argmin f h)
-- Mathlib/CategoryTheory/Galois/Prorepresentability.lean
lemma autGaloisSystem_map_surjective ⦃A B : PointedGaloisObject F⦄ (f : A ⟶ B) :
    Function.Surjective ((autGaloisSystem F).map f)
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem one_re : (1 : ℍ[R,c₁,c₂]).re = 1
-- Mathlib/CategoryTheory/Localization/SmallHom.lean
lemma hasSmallLocalizedHom_of_isLocalization :
    HasSmallLocalizedHom.{v₂} W X Y
-- Mathlib/Data/Nat/Factorial/Basic.lean
@[simp]
theorem descFactorial_succ (n k : ℕ) : n.descFactorial (k + 1) = (n - k) * n.descFactorial k
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem add_limZero {f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f + g)
-- Mathlib/CategoryTheory/Sites/Sheaf.lean
/-- This is stated as a lemma to prevent class search from forming a loop since a sheaf morphism is
monic if and only if it is monic as a presheaf morphism (under suitable assumption). -/
theorem Sheaf.Hom.mono_of_presheaf_mono {F G : Sheaf J A} (f : F ⟶ G) [h : Mono f.1] : Mono f
-- Mathlib/LinearAlgebra/SModEq.lean
protected theorem SModEq.def :
    x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y
-- Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean
@[reassoc]
theorem leftAdjointMate_comp_evaluation {X Y : C} [HasLeftDual X] [HasLeftDual Y] (f : X ⟶ Y) :
    X ◁ (ᘁf) ≫ ε_ _ _ = f ▷ _ ≫ ε_ _ _
-- Mathlib/Data/List/Destutter.lean
@[simp]
theorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b
-- Mathlib/Algebra/Lie/Basic.lean
@[norm_cast, simp]
theorem coe_zero : ⇑(0 : M →ₗ⁅R,L⁆ N) = 0
-- Mathlib/Order/Disjoint.lean
theorem mk_bot : (⟨⊥, isComplemented_bot⟩ : Complementeds α) = ⊥
-- Mathlib/NumberTheory/ArithmeticFunction.lean
theorem IsMultiplicative.prodPrimeFactors_one_sub_of_squarefree [CommRing R]
    (f : ArithmeticFunction R) (hf : f.IsMultiplicative) {n : ℕ} (hn : Squarefree n) :
    ∏ p ∈ n.primeFactors, (1 - f p) = ∑ d ∈ n.divisors, μ d * f d
-- Mathlib/Logic/Equiv/Basic.lean
theorem sigmaCongrRight_sigmaEquivProd :
    (sigmaCongrRight e).trans (sigmaEquivProd α₁ β₂)
    = (sigmaEquivProd α₁ β₁).trans (prodCongrRight e)
-- Mathlib/CategoryTheory/Preadditive/ProjectiveResolution.lean
lemma complex_exactAt_succ (n : ℕ) :
    P.complex.ExactAt (n + 1)
-- Mathlib/Computability/TuringMachine.lean
theorem BlankRel.equivalence (Γ) [Inhabited Γ] : Equivalence (@BlankRel Γ _)
-- Mathlib/Logic/Basic.lean
@[simp] lemma choose_eq (a : α) : @Exists.choose _ (· = a) ⟨a, rfl⟩ = a
-- Mathlib/Algebra/Module/Torsion.lean
theorem coe_torsion_eq_annihilator_ne_bot :
    (torsion R M : Set M) = { x : M | (R ∙ x).annihilator ≠ ⊥ }
-- Mathlib/Analysis/Calculus/Implicit.lean
/-- Any point in some neighborhood of `a` can be represented as
`HasStrictFDerivAt.implicitFunctionOfComplemented` of some point. -/
theorem eq_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)
    (hker : (ker f').ClosedComplemented) :
    ∀ᶠ x in 𝓝 a, hf.implicitFunctionOfComplemented f f' hf' hker (f x)
      (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker x).snd = x
-- Mathlib/Order/Filter/AtTopBot.lean
/-- The function `fun x ↦ r * f x` tends to negative infinity along a nontrivial filter
if and only if `r > 0` and `f` tends to negative infinity or `r < 0` and `f` tends to infinity. -/
theorem tendsto_const_mul_atBot_iff [NeBot l] :
    Tendsto (fun x => r * f x) l atBot ↔ 0 < r ∧ Tendsto f l atBot ∨ r < 0 ∧ Tendsto f l atTop
-- Mathlib/Algebra/Module/Equiv/Defs.lean
theorem comp_symm_eq {α : Type*} (f : M₂ → α) (g : M₁ → α) : g ∘ e₁₂.symm = f ↔ g = f ∘ e₁₂
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
lemma neg_norm_le_apply (f : α →ᵇ ℝ) (x : α) :
    -‖f‖ ≤ f x
-- Mathlib/Order/OmegaCompletePartialOrder.lean
protected theorem coe_inj (f g : α →𝒄 β) (h : (f : α → β) = g) : f = g
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive (attr := simp)]
theorem equivQuotientZPowOfEquiv_refl :
    MulEquiv.refl (A ⧸ (zpowGroupHom n : A →* A).range) =
      equivQuotientZPowOfEquiv (MulEquiv.refl A) n
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem succ_one : succ (1 : Ordinal) = 2
-- Mathlib/Algebra/Order/Monoid/TypeTags.lean
@[simp]
theorem toAdd_le {a b : Multiplicative α} : toAdd a ≤ toAdd b ↔ a ≤ b
-- Mathlib/Topology/AlexandrovDiscrete.lean
@[simp] lemma principal_exterior (s : Set α) : 𝓟 (exterior s) = 𝓝ˢ s
-- Mathlib/Topology/PartialHomeomorph.lean
/-- Composition of a partial homeomorphism and its inverse is equivalent to the restriction of the
identity to the source -/
theorem self_trans_symm : e.trans e.symm ≈ PartialHomeomorph.ofSet e.source e.open_source
-- Mathlib/LinearAlgebra/Semisimple.lean
/-- The minimal polynomial of a semisimple endomorphism is square free -/
theorem IsSemisimple.minpoly_squarefree : Squarefree (minpoly K f)
-- Mathlib/Data/Finset/Lattice.lean
theorem max'_subset {s t : Finset α} (H : s.Nonempty) (hst : s ⊆ t) :
    s.max' H ≤ t.max' (H.mono hst)
-- Mathlib/Combinatorics/Quiver/Basic.lean
@[simp]
theorem comp_id {U V : Type*} [Quiver U] [Quiver V] (F : Prefunctor U V) :
    F.comp (id _) = F
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
theorem comp_differentiable_iff {f : G → E} : Differentiable 𝕜 (iso ∘ f) ↔ Differentiable 𝕜 f
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem nonneg_of_mem_sphere (hy : y ∈ sphere x ε) : 0 ≤ ε
-- Mathlib/Algebra/Group/Semiconj/Defs.lean
/-- Any element semiconjugates `1` to `1`. -/
@[to_additive (attr := simp) "Any element semiconjugates `0` to `0`."]
theorem one_right (a : M) : SemiconjBy a 1 1
-- Mathlib/Data/Option/Basic.lean
theorem pbind_eq_some {f : ∀ a : α, a ∈ x → Option β} {y : β} :
    x.pbind f = some y ↔ ∃ (z : α) (H : z ∈ x), f z H = some y
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem bound : ∃ C, 0 < C ∧ ∀ x, ‖f x‖ ≤ C * ‖x‖
-- Mathlib/Data/Nat/Digits.lean
theorem modEq_digits_sum (b b' : ℕ) (h : b' % b = 1) (n : ℕ) : n ≡ (digits b' n).sum [MOD b]
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
/-- The list version of `add_tsub_cancel_of_le` for multisets. -/
theorem subperm_append_diff_self_of_count_le {l₁ l₂ : List α}
    (h : ∀ x ∈ l₁, count x l₁ ≤ count x l₂) : l₁ ++ l₂.diff l₁ ~ l₂
-- Mathlib/Computability/NFA.lean
@[simp]
theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅
-- Mathlib/Data/Nat/Factorial/Basic.lean
theorem factorial_pos : ∀ n, 0 < n !
-- Mathlib/Analysis/Analytic/Within.lean
lemma AnalyticWithinAt.contDiffWithinAt [CompleteSpace F] {f : E → F} {s : Set E} {x : E}
    (h : AnalyticWithinAt 𝕜 f s x) {n : ℕ∞} : ContDiffWithinAt 𝕜 n f s x
-- Mathlib/Algebra/Lie/Weights/Chain.lean
lemma weightSpaceChain_def :
    weightSpaceChain M χ₁ χ₂ p q = ⨆ k ∈ Ioo p q, weightSpace M (k • χ₁ + χ₂)
-- Mathlib/Data/Nat/Choose/Basic.lean
/-- `choose n 2` is the `n`-th triangle number. -/
theorem choose_two_right (n : ℕ) : choose n 2 = n * (n - 1) / 2
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem toFinsupp_smul {S : Type*} [SMulZeroClass S R] (a : S) (b : R[X]) :
    (a • b).toFinsupp = a • b.toFinsupp
-- Mathlib/Data/Finset/Basic.lean
theorem not_mem_sdiff_of_mem_right (h : a ∈ t) : a ∉ s \ t
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
@[simp]
theorem edgeSet_inf : (G₁ ⊓ G₂).edgeSet = G₁.edgeSet ∩ G₂.edgeSet
-- Mathlib/Order/SuccPred/Basic.lean
theorem Ioo_pred_left_of_not_isMin (ha : ¬IsMin a) : Ioo (pred a) b = Ico a b
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem eq_zero_of_ediv_eq_zero {d n : Int} (h : d ∣ n) (H : n / d = 0) : n = 0
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
@[simp]
theorem Subalgebra.rank_bot : Module.rank F (⊥ : Subalgebra F E) = 1
-- Mathlib/Order/Monotone/Monovary.lean
protected theorem Monotone.antivary (hf : Monotone f) (hg : Antitone g) : Antivary f g
-- Mathlib/RingTheory/Ideal/MinimalPrime.lean
@[simp]
theorem Ideal.sInf_minimalPrimes : sInf I.minimalPrimes = I.radical
-- Mathlib/Logic/Equiv/Basic.lean
theorem Perm.subtypeCongr.apply (a : ε) : ep.subtypeCongr en a =
    if h : p a then (ep ⟨a, h⟩ : ε) else en ⟨a, h⟩
-- Mathlib/Topology/MetricSpace/Dilation.lean
protected theorem congr_arg (f : α →ᵈ β) {x y : α} (h : x = y) : f x = f y
-- Mathlib/GroupTheory/Perm/Basic.lean
@[simp] lemma iterate_eq_pow (f : Perm α) (n : ℕ) : f^[n] = ⇑(f ^ n)
-- Mathlib/Order/Disjoint.lean
theorem Codisjoint.of_codisjoint_sup_of_le (h : Codisjoint (a ⊔ b) c) (hle : c ≤ a) :
    Codisjoint a b
-- Mathlib/LinearAlgebra/BilinearForm/Hom.lean
@[simp]
theorem linMulLin_compLeft (l : M →ₗ[R] M) :
    (linMulLin f g).compLeft l = linMulLin (f.comp l) g
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
theorem integral_sin_pow_even :
    (∫ x in (0)..π, sin x ^ (2 * n)) = π * ∏ i ∈ range n, (2 * (i : ℝ) + 1) / (2 * i + 2)
-- Mathlib/RingTheory/IntegralDomain.lean
theorem Finite.isField_of_domain (R) [CommRing R] [IsDomain R] [Finite R] : IsField R
-- .lake/packages/lean4/src/lean/lake/Lake/Build/Key.lean
theorem eq_of_quickCmp {k k' : BuildKey}  :
quickCmp k k' = Ordering.eq → k = k'
-- Mathlib/Probability/Martingale/Upcrossing.lean
@[simp]
theorem upperCrossingTime_zero : upperCrossingTime a b f N 0 = ⊥
-- Mathlib/FieldTheory/SeparableDegree.lean
@[simp]
theorem natSepDegree_one : (1 : F[X]).natSepDegree = 0
-- Mathlib/Topology/ContinuousFunction/Ideals.lean
theorem mem_idealOfSet {s : Set X} {f : C(X, R)} :
    f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0
-- Mathlib/GroupTheory/HNNExtension.lean
theorem unitsSMul_neg (u : ℤˣ) (w : NormalWord d) :
    unitsSMul φ (-u) (unitsSMul φ u w) = w
-- Mathlib/LinearAlgebra/Ray.lean
theorem neg_units_smul (u : Rˣ) (v : Module.Ray R M) : -u • v = -(u • v)
-- Mathlib/Probability/Kernel/Disintegration/Integral.lean
lemma setIntegral_condKernel (a : α) {s : Set β} (hs : MeasurableSet s)
    {t : Set Ω} (ht : MeasurableSet t) (hf : IntegrableOn f (s ×ˢ t) (κ a)) :
    ∫ b in s, ∫ ω in t, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a)
      = ∫ x in s ×ˢ t, f x ∂(κ a)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem mem_iff_append {a : α} {l : List α} : a ∈ l ↔ ∃ s t : List α, l = s ++ a :: t
-- Mathlib/Algebra/Module/FinitePresentation.lean
lemma Module.FinitePresentation.fg_ker_iff [Module.FinitePresentation R M]
    (l : M →ₗ[R] N) (hl : Function.Surjective l) :
    Submodule.FG (LinearMap.ker l) ↔ Module.FinitePresentation R N
-- Mathlib/Data/Nat/Factorial/BigOperators.lean
theorem descFactorial_eq_prod_range (n : ℕ) : ∀ k, n.descFactorial k = ∏ i ∈ range k, (n - i)
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
protected nonrec theorem HasFDerivWithinAt.snd (h : HasFDerivWithinAt f₂ f₂' s x) :
    HasFDerivWithinAt (fun x => (f₂ x).2) ((snd 𝕜 F G).comp f₂') s x
-- Mathlib/Analysis/Normed/Ring/Seminorm.lean
/-- A seminorm on a ring `R` is a function `f : R → ℝ` that preserves zero, takes nonnegative
  values, is subadditive and submultiplicative and such that `f (-x) = f x` for all `x ∈ R`. -/
structure RingSeminorm (R : Type*) [NonUnitalNonAssocRing R] extends AddGroupSeminorm R where
  /-- The property of a `RingSeminorm` that for all `x` and `y` in the ring, the norm of `x * y` is
    less than the norm of `x` times the norm of `y`. -/
  mul_le' : ∀ x y : R, toFun (x * y) ≤ toFun x * toFun y
-- Mathlib/Data/List/Lex.lean
theorem nil_lt_cons [LT α] (a : α) (l : List α) : [] < a :: l
-- Mathlib/CategoryTheory/Monoidal/Types/Symmetric.lean
@[simp]
theorem braiding_inv_apply {X Y : Type u} {x : X} {y : Y} :
    ((β_ X Y).inv : Y ⊗ X → X ⊗ Y) (y, x) = (x, y)
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem degree_le (G' : Subgraph G) (v : V) [Fintype (G'.neighborSet v)]
    [Fintype (G.neighborSet v)] : G'.degree v ≤ G.degree v
-- Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean
lemma IsRatCondKernelCDF.iInf_rat_gt_eq (hf : IsRatCondKernelCDF f κ ν) (a : α) :
    ∀ᵐ b ∂(ν a), ∀ q, ⨅ r : Ioi q, f (a, b) r = f (a, b) q
-- Mathlib/LinearAlgebra/RootSystem/Basic.lean
private lemma coroot_eq_coreflection_of_root_eq_of_span_eq_top [CharZero R] [NoZeroSMulDivisors R M]
    (p : PerfectPairing R M N)
    (root : ι ↪ M)
    (coroot : ι ↪ N)
    (hp : ∀ i, p.toLin (root i) (coroot i) = 2)
    (hs : ∀ i, MapsTo (preReflection (root i) (p.toLin.flip (coroot i))) (range root) (range root))
    (hsp : span R (range root) = ⊤)
    {i j k : ι} (hk : root k = preReflection (root i) (p.toLin.flip (coroot i)) (root j)) :
    coroot k = preReflection (coroot i) (p.toLin (root i)) (coroot j)
-- Mathlib/Order/Filter/Bases.lean
protected theorem _root_.FilterBasis.hasBasis (B : FilterBasis α) :
    HasBasis B.filter (fun s : Set α => s ∈ B) id
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem coeff_X_of_ne_one {n : ℕ} (hn : n ≠ 1) : coeff (X : R[X]) n = 0
-- Mathlib/Topology/MetricSpace/Thickening.lean
/-- The closed thickening with radius zero is the closure of the set. -/
@[simp]
theorem cthickening_zero (E : Set α) : cthickening 0 E = closure E
-- Mathlib/Algebra/Category/MonCat/FilteredColimits.lean
/-- The definition of the "one" in the colimit is independent of the chosen object of `J`.
In particular, this lemma allows us to "unfold" the definition of `colimit_one` at a custom chosen
object `j`.
-/
@[to_additive
      "The definition of the \"zero\" in the colimit is independent of the chosen object
      of `J`. In particular, this lemma allows us to \"unfold\" the definition of `colimit_zero` at
      a custom chosen object `j`."]
theorem colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem Integrable.bdd_mul' {f g : α → 𝕜} {c : ℝ} (hg : Integrable g μ)
    (hf : AEStronglyMeasurable f μ) (hf_bound : ∀ᵐ x ∂μ, ‖f x‖ ≤ c) :
    Integrable (fun x => f x * g x) μ
-- Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean
/-- See also `continuousAt_cpow` and `Complex.continuousAt_cpow_of_re_pos`. -/
theorem continuousAt_cpow_zero_of_re_pos {z : ℂ} (hz : 0 < z.re) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) (0, z)
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
theorem Pairwise.iff_of_mem {S : α → α → Prop} {l : List α}
    (H : ∀ {a b}, a ∈ l → b ∈ l → (R a b ↔ S a b)) : Pairwise R l ↔ Pairwise S l