ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/Polynomial/Nilpotent.lean
/-- Let `P` be a polynomial over `R`. `P` is a unit if and only if all its coefficients are
nilpotent, except its constant term which is a unit.

See also `Polynomial.isUnit_iff'`. -/
theorem isUnit_iff_coeff_isUnit_isNilpotent :
    IsUnit P ↔ IsUnit (P.coeff 0) ∧ (∀ i, i ≠ 0 → IsNilpotent (P.coeff i))
-- Mathlib/Data/Real/GoldenRatio.lean
@[simp]
theorem gold_mul_goldConj : φ * ψ = -1
-- Mathlib/Data/Quot.lean
/-- A version of `Quotient.inductionOn₃` taking `{s₁ : Setoid α} {s₂ : Setoid β} {s₃ : Setoid γ}`
as implicit arguments instead of instance arguments. -/
@[elab_as_elim]
protected theorem inductionOn₃' {p : Quotient s₁ → Quotient s₂ → Quotient s₃ → Prop}
    (q₁ : Quotient s₁) (q₂ : Quotient s₂) (q₃ : Quotient s₃)
    (h : ∀ a₁ a₂ a₃, p (Quotient.mk'' a₁) (Quotient.mk'' a₂) (Quotient.mk'' a₃)) :
    p q₁ q₂ q₃
-- Mathlib/Order/Antichain.lean
protected theorem isAntisymm (h : IsAntichain r univ) : IsAntisymm α r
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
nonrec theorem ContinuousAt.vsub {f g : α → P} {x : α} (hf : ContinuousAt f x)
    (hg : ContinuousAt g x) :
    ContinuousAt (f -ᵥ g) x
-- Mathlib/Data/Matroid/Sum.lean
@[simp] lemma disjointSum_ground_eq {h} : (M.disjointSum N h).E = M.E ∪ N.E
-- .lake/packages/batteries/Batteries/Data/List/Count.lean
theorem filter_beq (l : List α) (a : α) : l.filter (· == a) = replicate (count a l) a
-- Mathlib/Data/Finset/Card.lean
theorem injOn_of_card_image_eq [DecidableEq β] (H : (s.image f).card = s.card) : Set.InjOn f s
-- Mathlib/NumberTheory/Pell.lean
@[simp]
theorem x_mk (x y : ℤ) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).x = x
-- Mathlib/Order/CompleteLattice.lean
theorem sup_iSup [Nonempty ι] {f : ι → α} {a : α} : (a ⊔ ⨆ x, f x) = ⨆ x, a ⊔ f x
-- Mathlib/RepresentationTheory/Basic.lean
theorem asGroupHom_apply (g : G) : ↑(asGroupHom ρ g) = ρ g
-- Mathlib/Order/Concept.lean
theorem gc_intentClosure_extentClosure :
    GaloisConnection (toDual ∘ intentClosure r) (extentClosure r ∘ ofDual)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem find?_cons_of_pos (l) (h : p a) : find? p (a :: l) = some a
-- Mathlib/Topology/Sheaves/Sheaf.lean
/-- Transfer the sheaf condition across an isomorphism of presheaves.
-/
theorem isSheaf_of_iso {F G : Presheaf C X} (α : F ≅ G) (h : F.IsSheaf) : G.IsSheaf
-- Mathlib/Logic/Encodable/Basic.lean
@[simp]
theorem encode_some [Encodable α] (a : α) : encode (some a) = succ (encode a)
-- Mathlib/LinearAlgebra/Matrix/Reindex.lean
/-- Reindexing both indices along the same equivalence preserves the determinant.

For the `simp` version of this lemma, see `det_submatrix_equiv_self`.
-/
theorem det_reindexAlgEquiv (B : Type*) [CommRing R] [CommRing B] [Algebra R B] [Fintype m]
    [DecidableEq m] [Fintype n] [DecidableEq n] (e : m ≃ n) (A : Matrix m m B) :
    det (reindexAlgEquiv R B e A) = det A
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem strongEpi_factorThruImage_of_strongEpiMonoFactorisation {X Y : C} {f : X ⟶ Y} [HasImage f]
    (F : StrongEpiMonoFactorisation f) : StrongEpi (factorThruImage f)
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem toAdd_zpow [SubNegMonoid α] (a : Multiplicative α) (z : ℤ) : toAdd (a ^ z) = z • toAdd a
-- Mathlib/Analysis/Analytic/Meromorphic.lean
@[simp]
lemma neg_iff {f : 𝕜 → E} {x : 𝕜} :
    MeromorphicAt (-f) x ↔ MeromorphicAt f x
-- Mathlib/Combinatorics/Colex.lean
/-- If `s ≤ t` in colex, and all elements in `t` are small, then all elements in `s` are small. -/
lemma forall_le_mono (hst : toColex s ≤ toColex t) (ht : ∀ b ∈ t, b ≤ a) : ∀ b ∈ s, b ≤ a
-- Mathlib/Topology/Germ.lean
theorem value_smul {α β : Type*} [SMul α β] (φ : Germ (𝓝 x) α)
    (ψ : Germ (𝓝 x) β) : (φ • ψ).value = φ.value • ψ.value
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
protected theorem measure_mono (h : μ ≤ ν) : ν.FiniteAtFilter f → μ.FiniteAtFilter f
-- Mathlib/RingTheory/MvPowerSeries/Inverse.lean
protected theorem inv_eq_iff_mul_eq_one {φ ψ : MvPowerSeries σ k} (h : constantCoeff σ k ψ ≠ 0) :
    ψ⁻¹ = φ ↔ φ * ψ = 1
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_eq_of_degree_eq [Semiring S] {q : S[X]} (h : degree p = degree q) :
    natDegree p = natDegree q
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
theorem tsum_coe_ne_top (p : PMF α) : ∑' a, p a ≠ ∞
-- Mathlib/CategoryTheory/Category/Basic.lean
/-- The typeclass `Category C` describes morphisms associated to objects of type `C`.
The universe levels of the objects and morphisms are unconstrained, and will often need to be
specified explicitly, as `Category.{v} C`. (See also `LargeCategory` and `SmallCategory`.)

See <https://stacks.math.columbia.edu/tag/0014>.
-/
@[pp_with_univ]
class Category (obj : Type u) extends CategoryStruct.{v} obj : Type max u (v + 1) where
  /-- Identity morphisms are left identities for composition. -/
  id_comp : ∀ {X Y : obj} (f : X ⟶ Y), 𝟙 X ≫ f = f := by aesop_cat
  /-- Identity morphisms are right identities for composition. -/
  comp_id : ∀ {X Y : obj} (f : X ⟶ Y), f ≫ 𝟙 Y = f := by aesop_cat
  /-- Composition in a category is associative. -/
  assoc : ∀ {W X Y Z : obj} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z), (f ≫ g) ≫ h = f ≫ g ≫ h := by
    aesop_cat
-- Mathlib/Algebra/Lie/TraceForm.lean
lemma restrict_killingForm :
    (killingForm R L).restrict I = LieModule.traceForm R I L
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
theorem sum_restrict (h : IsFundamentalDomain G s μ) : (sum fun g : G => μ.restrict (g • s)) = μ
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem image_rootSet [Algebra R K] [Algebra R L] {p : R[X]} (h : p.Splits (algebraMap R K))
    (f : K →ₐ[R] L) : f '' p.rootSet K = p.rootSet L
-- Mathlib/Data/Nat/BitIndices.lean
theorem two_pow_le_of_mem_bitIndices (ha : a ∈ n.bitIndices) : 2^a ≤ n
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop_add_const_right (C : β) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x + C) l atTop
-- Mathlib/LinearAlgebra/Basis.lean
protected theorem smul_eq_zero [NoZeroDivisors R] (b : Basis ι R M) {c : R} {x : M} :
    c • x = 0 ↔ c = 0 ∨ x = 0
-- Mathlib/Data/Nat/Defs.lean
protected lemma sub_eq_of_eq_add' (h : a = b + c) : a - b = c
-- Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
@[simp]
theorem symm_of_of (x : 𝒜 ᵍ⊗[R] ℬ) : of R 𝒜 ℬ ((of R 𝒜 ℬ).symm x) = x
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.cons_inv {a : α} {l₁ l₂ : List α} : a :: l₁ ~ a :: l₂ → l₁ ~ l₂
-- .lake/packages/batteries/Batteries/WF.lean
@[csimp] private theorem rec_eq_recC : @Acc.rec = @Acc.recC
-- Mathlib/Algebra/Polynomial/Module/AEval.lean
@[simp] lemma comapSubmodule_mapSubmodule :
    comapSubmodule R M a (mapSubmodule a hp) = p
-- Mathlib/Data/Set/Image.lean
theorem _root_.Function.Semiconj.set_image {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (image f) (image ga) (image gb)
-- Mathlib/Data/Nat/Choose/Basic.lean
@[simp]
theorem multichoose_zero_succ (k : ℕ) : multichoose 0 (k + 1) = 0
-- Mathlib/Order/Monotone/Basic.lean
@[simp]
theorem monotone_comp_ofDual_iff : Monotone (f ∘ ofDual) ↔ Antitone f
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem forall_mem_range {f : α →ₛ β} {p : β → Prop} : (∀ y ∈ f.range, p y) ↔ ∀ x, p (f x)
-- Mathlib/Data/Set/Subsingleton.lean
@[simp]
theorem nontrivial_univ_iff : (univ : Set α).Nontrivial ↔ Nontrivial α
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem sub [AddGroup β] [TopologicalAddGroup β] {f g : α → β} (hfm : AEStronglyMeasurable' m f μ)
    (hgm : AEStronglyMeasurable' m g μ) : AEStronglyMeasurable' m (f - g) μ
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
theorem map_le_iff_le_comap (f : V ↪ W) (G : SimpleGraph V) (G' : SimpleGraph W) :
    G.map f ≤ G' ↔ G ≤ G'.comap f
-- Mathlib/LinearAlgebra/Basis.lean
/-- Over any ring `R`, if `b` is an infinite basis for a module `M`,
and `s` is a maximal linearly independent set,
then the cardinality of `b` is bounded by the cardinality of `s`.
-/
theorem infinite_basis_le_maximal_linearIndependent' {ι : Type w} (b : Basis ι R M) [Infinite ι]
    {κ : Type w'} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) :
    Cardinal.lift.{w'} #ι ≤ Cardinal.lift.{w} #κ
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[simp]
theorem curryLeft_smul {n : ℕ} (r : R') (f : M'' [⋀^Fin n.succ]→ₗ[R'] N'') :
    curryLeft (r • f) = r • curryLeft f
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt8.toNat_mul (x y : UInt8) : (x * y).toNat = (x.toNat * y.toNat) % UInt8.size
-- Mathlib/Analysis/Seminorm.lean
/-- If there is a scalar `c` with `‖c‖>1`, then any element can be moved by scalar multiplication to
any shell of width `‖c‖`. Also recap information on the norm of the rescaling element that shows
up in applications. -/
lemma rescale_to_shell [NormedAddCommGroup F] [NormedSpace 𝕜 F] {c : 𝕜} (hc : 1 < ‖c‖)
    {ε : ℝ} (εpos : 0 < ε) {x : F} (hx : x ≠ 0) :
    ∃d : 𝕜, d ≠ 0 ∧ ‖d • x‖ < ε ∧ (ε/‖c‖ ≤ ‖d • x‖) ∧ (‖d‖⁻¹ ≤ ε⁻¹ * ‖c‖ * ‖x‖)
-- Mathlib/Data/ENNReal/Inv.lean
theorem mul_lt_of_lt_div (h : a < b / c) : a * c < b
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem one_leftMoves : LeftMoves 1 = PUnit
-- Mathlib/Order/RelIso/Basic.lean
protected theorem isStrictOrder : ∀ (_ : r ↪r s) [IsStrictOrder β s], IsStrictOrder α r
-- Mathlib/Analysis/BoxIntegral/Basic.lean
theorem HasIntegral.sum {α : Type*} {s : Finset α} {f : α → ℝⁿ → E} {g : α → F}
    (h : ∀ i ∈ s, HasIntegral I l (f i) vol (g i)) :
    HasIntegral I l (fun x => ∑ i ∈ s, f i x) vol (∑ i ∈ s, g i)
-- Mathlib/Analysis/Normed/Order/UpperLower.lean
lemma dist_mono_left_pi : MonotoneOn (dist · y) (Ici y)
-- Mathlib/Topology/Constructions.lean
/-- If `f` and `g` are maps with dense range, then `Prod.map f g` has dense range. -/
theorem DenseRange.prod_map {ι : Type*} {κ : Type*} {f : ι → Y} {g : κ → Z} (hf : DenseRange f)
    (hg : DenseRange g) : DenseRange (Prod.map f g)
-- Mathlib/Algebra/RingQuot.lean
irreducible_def preLiftAlgHom {s : A → A → Prop} {f : A →ₐ[S] B}
  (h : ∀ ⦃x y⦄, s x y → f x = f y) : RingQuot s →ₐ[S] B
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop_of_add_bdd_above_left' (C) (hC : ∀ᶠ x in l, f x ≤ C)
    (h : Tendsto (fun x => f x + g x) l atTop) : Tendsto g l atTop
-- Mathlib/Algebra/Jordan/Basic.lean
@[simp]
theorem commute_lmul_sq_rmul (a : A) : Commute (L (a * a)) (R a)
-- Mathlib/Analysis/NormedSpace/AddTorsorBases.lean
/-- Given a finite-dimensional normed real vector space, the interior of the convex hull of an
affine basis is the set of points whose barycentric coordinates are strictly positive with respect
to this basis.

TODO Restate this result for affine spaces (instead of vector spaces) once the definition of
convexity is generalised to this setting. -/
theorem AffineBasis.interior_convexHull {ι E : Type*} [Finite ι] [NormedAddCommGroup E]
    [NormedSpace ℝ E] (b : AffineBasis ι ℝ E) :
    interior (convexHull ℝ (range b)) = {x | ∀ i, 0 < b.coord i x}
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem natAbs_mul_self : ∀ {a : Int}, ↑(natAbs a * natAbs a) = a * a
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
@[simp]
theorem natDegree_sub_C {a : R} : natDegree (p - C a) = natDegree p
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
/-- Reinterpret a smooth partition of unity as a continuous partition of unity. -/
@[simps]
def toPartitionOfUnity : PartitionOfUnity ι M s
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem and_congr_left_eq  (h : c → a = b) : (a ∧ c) = (b ∧ c)
-- .lake/packages/batteries/Batteries/Data/RBMap/WF.lean
protected theorem RedRed.reverse : RedRed p t n → RedRed p t.reverse n
-- Mathlib/LinearAlgebra/TensorProduct/Prod.lean
@[simp] theorem prodLeft_symm_tmul (m₁ : M₁) (m₂ : M₂) (m₃ : M₃) :
    (prodLeft R M₁ M₂ M₃).symm (m₁ ⊗ₜ m₃, m₂ ⊗ₜ m₃) = ((m₁, m₂) ⊗ₜ m₃)
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
protected lemma add {A : Matrix m m R} {B : Matrix m m R}
    (hA : A.PosDef) (hB : B.PosDef) : (A + B).PosDef
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem foldlRecOn_nil {C : β → Sort*} (op : β → α → β) (b) (hb : C b) (hl) :
    foldlRecOn [] op b hb hl = hb
-- Mathlib/Logic/Basic.lean
theorem forall_and_left [Nonempty α] (q : Prop) (p : α → Prop) :
    (∀ x, q ∧ p x) ↔ (q ∧ ∀ x, p x)
-- Mathlib/Order/Hom/Lattice.lean
@[simp, norm_cast] lemma coe_fst : ⇑(fst (α := α) (β := β)) = Prod.fst
-- Mathlib/Data/Set/Basic.lean
theorem mem_singleton_of_eq {x y : α} (H : x = y) : x ∈ ({y} : Set α)
-- Mathlib/Analysis/Convex/Segment.lean
theorem segment_eq_uIcc (x y : 𝕜) : [x -[𝕜] y] = uIcc x y
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem top_symmDiff' : ⊤ ∆ a = ￢a
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[reassoc (attr := simp)]
lemma opcyclesIsoX₂_hom_inv_id (hf : S.f = 0) :
    (S.opcyclesIsoX₂ hf).hom ≫ S.pOpcycles = 𝟙 _
-- Mathlib/AlgebraicGeometry/Restrict.lean
lemma ι_image_top : U.ι ''ᵁ ⊤ = U
-- Mathlib/Data/List/Enum.lean
theorem mk_mem_enum_iff_get? {i : ℕ} {x : α} {l : List α} : (i, x) ∈ enum l ↔ l.get? i = x
-- Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
/-- A transvection preserves Lebesgue measure. -/
theorem volume_preserving_transvectionStruct [DecidableEq ι] (t : TransvectionStruct ι ℝ) :
    MeasurePreserving (toLin' t.toMatrix)
-- Mathlib/CategoryTheory/Abelian/Basic.lean
theorem mono_of_kernel_ι_eq_zero (h : kernel.ι f = 0) : Mono f
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp]
theorem coeIdeal_eq_zero {I : Ideal R} : (I : FractionalIdeal R⁰ K) = 0 ↔ I = ⊥
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- The finrank of `(ι → R)` is `Fintype.card ι`. -/
theorem FiniteDimensional.finrank_pi {ι : Type v} [Fintype ι] :
    finrank R (ι → R) = Fintype.card ι
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem extract_empty_of_size_le_start (as : Array α) {start stop : Nat} (h : as.size ≤ start) :
    as.extract start stop = #[]
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
/-- The restriction of a locally ringed space along an open embedding.
-/
@[simps!]
def restrict {U : TopCat} (X : LocallyRingedSpace.{u}) {f : U ⟶ X.toTopCat} (h : OpenEmbedding f) :
    LocallyRingedSpace
-- Mathlib/Data/Bool/Basic.lean
@[simp]
theorem exists_bool {p : Bool → Prop} : (∃ b, p b) ↔ p false ∨ p true
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem pureOneHom_apply (a : α) : pureOneHom a = pure a
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[simp]
lemma rightHomologyMap_zero [HasRightHomology S₁] [HasRightHomology S₂] :
    rightHomologyMap (0 : S₁ ⟶ S₂) = 0
-- Mathlib/Order/WellFounded.lean
theorem StrictMono.wellFoundedLT [WellFoundedLT β] (hf : StrictMono f) : WellFoundedLT α
-- Mathlib/Topology/Bases.lean
theorem IsSeparable.mono {s u : Set α} (hs : IsSeparable s) (hu : u ⊆ s) : IsSeparable u
-- Mathlib/Data/Set/Function.lean
theorem piecewise_op {δ' : α → Sort*} (h : ∀ i, δ i → δ' i) :
    (s.piecewise (fun x => h x (f x)) fun x => h x (g x)) = fun x => h x (s.piecewise f g x)
-- Mathlib/Combinatorics/SetFamily/FourFunctions.lean
lemma sum_collapse (h𝒜 : 𝒜 ⊆ (insert a u).powerset) (hu : a ∉ u) :
    ∑ s ∈ u.powerset, collapse 𝒜 a f s = ∑ s ∈ 𝒜, f s
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem toFinset_val (l : List α) : l.toFinset.1 = (l.dedup : Multiset α)
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- Given binary relations `r, s` with `r` contained in `s`, the smallest congruence relation
    containing `s` contains the smallest congruence relation containing `r`. -/
@[to_additive addConGen_mono "Given binary relations `r, s` with `r` contained in `s`, the
smallest additive congruence relation containing `s` contains the smallest additive congruence
relation containing `r`."]
theorem conGen_mono {r s : M → M → Prop} (h : ∀ x y, r x y → s x y) : conGen r ≤ conGen s
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem comapDomain_single [DecidableEq κ] [∀ i, Zero (β i)] (h : κ → ι) (hh : Function.Injective h)
    (k : κ) (x : β (h k)) : comapDomain h hh (single (h k) x) = single k x
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem zipWith_foldl_eq_zip_foldl {f : α → β → γ} (i : δ):
    (zipWith f l₁ l₂).foldl g i = (zip l₁ l₂).foldl (fun r p => g r (f p.1 p.2)) i
-- Mathlib/RingTheory/Adjoin/Basic.lean
theorem adjoin_algebraMap_image_union_eq_adjoin_adjoin (s : Set S) (t : Set A) :
    adjoin R (algebraMap S A '' s ∪ t) = (adjoin (adjoin R s) t).restrictScalars R
-- Mathlib/Algebra/Lie/Subalgebra.lean
theorem coe_zero_iff_zero (x : L') : (x : L) = 0 ↔ x = 0
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem ofMul_multiset_prod (s : Multiset α) : ofMul s.prod = (s.map ofMul).sum
-- Mathlib/Order/OmegaCompletePartialOrder.lean
/-- The map from continuous functions to monotone functions is itself a monotone function. -/
@[simps]
def toMono : (α →𝒄 β) →o α →o β
-- Mathlib/Data/Fintype/BigOperators.lean
/-- This lemma is specifically designed to be used backwards, whence the specialisation to `Fin n`
as the indexing type doesn't matter in practice. The more general forward direction lemma here is
`Fintype.card_pi`. -/
lemma card_pi_const (α : Type*) [Fintype α] (n : ℕ) : card (Fin n → α) = card α ^ n
-- Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
private theorem restrictNonposSeq_measurableSet (n : ℕ) :
    MeasurableSet (restrictNonposSeq s i n)
-- Mathlib/Algebra/Polynomial/Mirror.lean
theorem coeff_mul_mirror :
    (p * p.mirror).coeff (p.natDegree + p.natTrailingDegree) = p.sum fun n => (· ^ 2)
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- Angles in a vector space are invariant to inversion -/
@[simp]
theorem angle_neg (v₁ v₂ v₃ : V) : ∠ (-v₁) (-v₂) (-v₃) = ∠ v₁ v₂ v₃
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem ofInjective_apply {f : G →* N} (hf : Function.Injective f) {x : G} :
    ↑(ofInjective hf x) = f x
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem isometry_comp {g : NormedAddGroupHom V₂ V₃} {f : NormedAddGroupHom V₁ V₂} (hg : Isometry g)
    (hf : Isometry f) : Isometry (g.comp f)
-- Mathlib/Topology/MetricSpace/Contracting.lean
theorem dist_le_mul (x y : α) : dist (f x) (f y) ≤ K * dist x y
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigOWith.sup' (h : IsBigOWith c l f g') (h' : IsBigOWith c' l' f g') :
    IsBigOWith (max c c') (l ⊔ l') f g'
-- Mathlib/Topology/Homeomorph.lean
protected theorem isClosedMap (h : X ≃ₜ Y) : IsClosedMap h
-- Mathlib/CategoryTheory/Shift/SingleFunctors.lean
/-- The evaluation `SingleFunctors C D A ⥤ C ⥤ D` for some `a : A`. -/
@[simps]
def evaluation (a : A) : SingleFunctors C D A ⥤ C ⥤ D
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean
@[reassoc (attr := simp)]
theorem inl_inl_pushoutAssoc_hom [HasPushout (g₃ ≫ (pushout.inr _ _ : X₂ ⟶ Y₁)) g₄]
    [HasPushout g₁ (g₂ ≫ (pushout.inl _ _ : X₂ ⟶ Y₂))] :
    pushout.inl _ _ ≫ pushout.inl _ _ ≫ (pushoutAssoc g₁ g₂ g₃ g₄).hom = pushout.inl _ _
-- Mathlib/Topology/Instances/AddCircle.lean
lemma coe_eq_zero_iff_of_mem_Ico (ha : a ∈ Ico 0 p) :
    (a : AddCircle p) = 0 ↔ a = 0
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
/-- Assumes left covariance. -/
theorem Left.lt_mul_of_lt_of_one_le_of_nonneg [PosMulMono α] (ha : 1 < a) (hb : 1 ≤ b)
    (a0 : 0 ≤ a) : 1 < a * b
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem dot_neg_left (xs ys : IntList) : (-xs).dot ys = -(xs.dot ys)
-- Mathlib/NumberTheory/Pell.lean
/-- If a solution has `x > 1`, then `d` is not a square. -/
theorem d_nonsquare_of_one_lt_x {a : Solution₁ d} (ha : 1 < a.x) : ¬IsSquare d
-- Mathlib/Order/Heyting/Regular.lean
@[simp, norm_cast]
theorem coe_le_coe {a b : Regular α} : (a : α) ≤ b ↔ a ≤ b
-- Mathlib/CategoryTheory/HomCongr.lean
theorem homCongr_comp {X Y Z X₁ Y₁ Z₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (γ : Z ≅ Z₁) (f : X ⟶ Y)
    (g : Y ⟶ Z) : α.homCongr γ (f ≫ g) = α.homCongr β f ≫ β.homCongr γ g
-- Mathlib/RingTheory/Ideal/Over.lean
theorem isMaximal_comap_of_isIntegral_of_isMaximal' {R S : Type*} [CommRing R] [CommRing S]
    (f : R →+* S) (hf : f.IsIntegral) (I : Ideal S) [I.IsMaximal] : IsMaximal (I.comap f)
-- Mathlib/CategoryTheory/Limits/VanKampen.lean
theorem NatTrans.Equifibered.comp {F G H : J ⥤ C} {α : F ⟶ G} {β : G ⟶ H} (hα : Equifibered α)
    (hβ : Equifibered β) : Equifibered (α ≫ β)
-- Mathlib/NumberTheory/LSeries/HurwitzZetaValues.lean
theorem riemannZeta_two : riemannZeta 2 = (π : ℂ) ^ 2 / 6
-- Mathlib/Analysis/Analytic/Within.lean
/-- `f` has power series `p` at `x` iff some local extension of `f` has that series -/
lemma hasFPowerSeriesWithinAt_iff_exists_hasFPowerSeriesAt [CompleteSpace F] {f : E → F}
    {p : FormalMultilinearSeries 𝕜 E F} {s : Set E} {x : E} :
    HasFPowerSeriesWithinAt f p s x ↔
      ContinuousWithinAt f s x ∧ ∃ g, f =ᶠ[𝓝[s] x] g ∧ HasFPowerSeriesAt g p x
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem coe_ofEq_apply (h : p = q) (x : p) : (ofEq p q h x : E) = x
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive] lemma smul_def (g : S) (a : α) : g • a = (g : M') • a
-- Mathlib/Algebra/Ring/Action/Group.lean
/-- Each element of the group defines a semiring isomorphism. -/
@[simps!]
def MulSemiringAction.toRingEquiv [MulSemiringAction G R] (x : G) : R ≃+* R
-- Mathlib/Data/DFinsupp/Basic.lean
theorem update_eq_single_add_erase {β : ι → Type*} [∀ i, AddZeroClass (β i)] (f : Π₀ i, β i)
    (i : ι) (b : β i) : f.update i b = single i b + f.erase i
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
theorem existsUnique (h : IsUniversal f) (g : StructuredArrow S T) :
    ∃! η : f.right ⟶ g.right, f.hom ≫ T.map η = g.hom
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem dotProduct_neg : v ⬝ᵥ -w = -(v ⬝ᵥ w)
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
/-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] {ι : Type*}
    {t : Finset ι} {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S
-- Mathlib/Topology/Algebra/InfiniteSum/Order.lean
@[to_additive]
theorem isLUB_hasProd' (hf : HasProd f a) : IsLUB (Set.range fun s ↦ ∏ i ∈ s, f i) a
-- Mathlib/Init/Data/List/Lemmas.lean
/-- Length of a list obtained using `mapAccumr₂`. -/
@[simp]
theorem length_mapAccumr₂ :
    ∀ (f : α → β → σ → σ × φ) (x y c), length (mapAccumr₂ f x y c).2 = min (length x) (length y)
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive (attr := simp)]
theorem mul_ball : s * ball x δ = x • thickening δ s
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[simp]
theorem toFun_eq_coe : f.toFun = f
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem coe_copy (S : NonUnitalStarSubalgebra R A) (s : Set A) (hs : s = ↑S) :
    (S.copy s hs : Set A) = s
-- Mathlib/Data/Matroid/Restrict.lean
theorem StrictRestriction.exists_eq_restrict (h : N <r M) : ∃ R, R ⊂ M.E ∧ N = M ↾ R
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem sumAssoc_symm_apply_inr_inl : (sumAssoc α β γ).symm (inr (inl b)) = inl (inr b)
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
theorem norm_mkPiAlgebra_of_empty [IsEmpty ι] :
    ‖ContinuousMultilinearMap.mkPiAlgebra 𝕜 ι A‖ = ‖(1 : A)‖
-- Mathlib/Combinatorics/SimpleGraph/Dart.lean
/-- For a given vertex `v`, this is the bijective map from the neighbor set at `v`
to the darts `d` with `d.fst = v`. -/
@[simps]
def dartOfNeighborSet (v : V) (w : G.neighborSet v) : G.Dart
-- Mathlib/RingTheory/MvPolynomial/Symmetric.lean
theorem neg (hφ : IsSymmetric φ) : IsSymmetric (-φ)
-- Mathlib/Algebra/Group/Commute/Defs.lean
@[to_additive]
theorem self_pow (a : M) (n : ℕ) : Commute a (a ^ n)
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
/-- Together `Matrix.submatrixEquivInvertible` and
`Matrix.invertibleOfSubmatrixEquivInvertible` form an equivalence, although both sides of the
equiv are subsingleton anyway. -/
@[simps]
def submatrixEquivInvertibleEquivInvertible (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    Invertible (A.submatrix e₁ e₂) ≃ Invertible A
-- Mathlib/Order/SuccPred/Basic.lean
@[simp]
theorem pred_coe (a : α) : pred (↑a : WithTop α) = ↑(pred a)