ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/Algebra/Order/Compact.lean
theorem IsCompact.sSup_mem [ClosedIciTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : sSup s ∈ s
-- Mathlib/Order/Minimal.lean
theorem RelEmbedding.inter_preimage_minimals_eq_of_subset {y : Set β} {x : Set α}
    (f : r ↪r s) (h : y ⊆ f '' x) :
    x ∩ f ⁻¹' (minimals s y) = minimals r (x ∩ f ⁻¹' y)
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive]
theorem op_iInf (S : ι → Subgroup G) : (iInf S).op = ⨅ i, (S i).op
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem ContinuousLinearMap.curry_uncurryLeft
    (f : Ei 0 →L[𝕜] ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei i.succ) G) :
    f.uncurryLeft.curryLeft = f
-- Mathlib/Analysis/RCLike/Basic.lean
theorem nonpos_iff : z ≤ 0 ↔ re z ≤ 0 ∧ im z = 0
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem self_sub_fract (a : α) : a - fract a = ⌊a⌋
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
@[simp]
theorem div_const {𝕜 : Type*} {f : ℝ → 𝕜} [NormedField 𝕜] (h : IntervalIntegrable f μ a b)
    (c : 𝕜) : IntervalIntegrable (fun x => f x / c) μ a b
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Iso.lean
@[simp]
theorem pushoutCoconeOfRightIso_inr : (pushoutCoconeOfRightIso f g).inr = inv g ≫ f
-- Mathlib/Data/Finset/Lattice.lean
theorem comp_sup_eq_sup_comp_of_is_total [SemilatticeSup β] [OrderBot β] (g : α → β)
    (mono_g : Monotone g) (bot : g ⊥ = ⊥) : g (s.sup f) = s.sup (g ∘ f)
-- Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean
lemma hasSum_nat_cosKernel₀ (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℕ ↦ 2 * Real.cos (2 * π * a * (n + 1)) * rexp (-π * (n + 1) ^ 2 * t))
    (cosKernel a t - 1)
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
theorem isUnit_iff_range_eq_top [FiniteDimensional K V] (f : V →ₗ[K] V) :
    IsUnit f ↔ (LinearMap.range f) = ⊤
-- Mathlib/Algebra/Lie/Weights/Chain.lean
@[simp] lemma coe_chainTop : (chainTop α β : L → R) = (chainTopCoeff α β : ℤ) • α + β
-- Mathlib/Order/Height.lean
theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem add_mul_left_left_iff : IsRelPrime (x + y * z) y ↔ IsRelPrime x y
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem univ_subgroup : IsNormalSubgroup (@univ G)
-- Mathlib/FieldTheory/Cardinality.lean
theorem Fintype.not_isField_of_card_not_prime_pow {α} [Fintype α] [Ring α] :
    ¬IsPrimePow ‖α‖ → ¬IsField α
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
/-- Variant of `le_mul_of_one_le_left` for `b` non-positive instead of non-negative. -/
theorem mul_le_of_one_le_left [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hb : b ≤ 0) (h : 1 ≤ a) : a * b ≤ b
-- Mathlib/RingTheory/Bialgebra/Equiv.lean
@[simp]
theorem toBialgHom_eq_coe (f : A ≃ₐc[R] B) : f.toBialgHom = f
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma nilRank_eq_polyCharpoly_natTrailingDegree (b : Basis ι R L) :
    nilRank φ = (polyCharpoly φ b).natTrailingDegree
-- Mathlib/Analysis/Normed/Group/Constructions.lean
@[simp] lemma nnnorm_toDual (x : E) : ‖toDual x‖₊ = ‖x‖₊
-- Mathlib/Logic/Basic.lean
theorem or_not {p : Prop} : p ∨ ¬p
-- Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean
@[fun_prop]
theorem IsBoundedBilinearMap.hasStrictFDerivAt (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
    HasStrictFDerivAt b (h.deriv p) p
-- Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean
/-- Given an ideal `𝓟` of a commutative semiring `R`, we say that a polynomial `f : R[X]`
is *Eisenstein at `𝓟`* if `f.leadingCoeff ∉ 𝓟`, `∀ n, n < f.natDegree → f.coeff n ∈ 𝓟` and
`f.coeff 0 ∉ 𝓟 ^ 2`. -/
@[mk_iff]
structure IsEisensteinAt [CommSemiring R] (f : R[X]) (𝓟 : Ideal R) : Prop where
  leading : f.leadingCoeff ∉ 𝓟
  mem : ∀ {n}, n < f.natDegree → f.coeff n ∈ 𝓟
  not_mem : f.coeff 0 ∉ 𝓟 ^ 2
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem coe_toSubmodule_eq_iff : (N : Submodule R M) = (N' : Submodule R M) ↔ N = N'
-- Mathlib/Data/Finset/Basic.lean
theorem mem_of_mem_inter_right {a : α} {s₁ s₂ : Finset α} (h : a ∈ s₁ ∩ s₂) : a ∈ s₂
-- Mathlib/Topology/UniformSpace/Pi.lean
lemma Pi.uniformSpace_comap_restrict_sUnion (𝔖 : Set (Set ι)) :
    UniformSpace.comap (⋃₀ 𝔖).restrict (Pi.uniformSpace (fun i : (⋃₀ 𝔖) ↦ α i)) =
    ⨅ S ∈ 𝔖, UniformSpace.comap S.restrict (Pi.uniformSpace (fun i : S ↦ α i))
-- Mathlib/Data/Quot.lean
@[simp]
theorem out_eq (q : Trunc α) : mk q.out = q
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[to_additive (attr := measurability)]
theorem measurableSet_mulSupport [One β] [MeasurableSingletonClass β] (hf : Measurable f) :
    MeasurableSet (mulSupport f)
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
theorem apply_eq_iff_eq (e : P₁ ≃ᵃ[k] P₂) {p₁ p₂ : P₁} : e p₁ = e p₂ ↔ p₁ = p₂
-- Mathlib/Algebra/Order/Pointwise.lean
@[to_additive]
theorem sSup_div : sSup (s / t) = sSup s / sInf t
-- Mathlib/Combinatorics/Schnirelmann.lean
/-- The Schnirelmann density of any finset is `0`. -/
lemma schnirelmannDensity_finset (A : Finset ℕ) : schnirelmannDensity A = 0
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem Prime.pow_dvd_iff_le_factorization {p k n : ℕ} (pp : Prime p) (hn : n ≠ 0) :
    p ^ k ∣ n ↔ k ≤ n.factorization p
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem uIoc_ae_eq_interval [LinearOrder α] {a b : α} : Ι a b =ᵐ[μ] [[a, b]]
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem DifferentiableOn.ccosh (hc : DifferentiableOn ℂ f s) :
    DifferentiableOn ℂ (fun x => Complex.cosh (f x)) s
-- Mathlib/Computability/NFA.lean
theorem pumping_lemma [Fintype σ] {x : List α} (hx : x ∈ M.accepts)
    (hlen : Fintype.card (Set σ) ≤ List.length x) :
    ∃ a b c,
      x = a ++ b ++ c ∧
        a.length + b.length ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ M.accepts
-- Mathlib/Data/Complex/Exponential.lean
theorem sinh_ofReal_re (x : ℝ) : (sinh x).re = Real.sinh x
-- Mathlib/CategoryTheory/IsConnected.lean
theorem Zigzag.symm {j₁ j₂ : J} (h : Zigzag j₁ j₂) : Zigzag j₂ j₁
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma NNReal.closedBall_zero_eq_Icc' (c : ℝ≥0) :
    Metric.closedBall (0 : ℝ≥0) c.toReal = Set.Icc 0 c
-- Mathlib/Order/Filter/AtTopBot.lean
/-- $\lim_{x\to-\infty}|x|=+\infty$ -/
theorem tendsto_abs_atBot_atTop : Tendsto (abs : α → α) atBot atTop
-- Mathlib/Analysis/Calculus/FDeriv/Comp.lean
@[fun_prop]
theorem Differentiable.comp {g : F → G} (hg : Differentiable 𝕜 g) (hf : Differentiable 𝕜 f) :
    Differentiable 𝕜 (g ∘ f)
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
lemma sphere_subset_ball {r R : ℝ} (h : r < R) : sphere x r ⊆ ball x R
-- Mathlib/FieldTheory/Laurent.lean
@[simp]
theorem laurentAux_algebraMap : laurentAux r (algebraMap _ _ p) = algebraMap _ _ (taylor r p)
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive]
theorem noncommProd_insert_of_not_mem' [DecidableEq α] (s : Finset α) (a : α) (f : α → β) (comm)
    (ha : a ∉ s) :
    noncommProd (insert a s) f comm =
      noncommProd s f (comm.mono fun _ => mem_insert_of_mem) * f a
-- Mathlib/CategoryTheory/Sites/Coherent/Comparison.lean
/-- The union of the extensive and regular coverages generates the coherent topology on `C`. -/
theorem extensive_regular_generate_coherent [Preregular C] [FinitaryPreExtensive C] :
    ((extensiveCoverage C) ⊔ (regularCoverage C)).toGrothendieck =
    (coherentTopology C)
-- Mathlib/Order/CompleteBooleanAlgebra.lean
theorem iInf₂_sup_eq {f : ∀ i, κ i → α} (a : α) : (⨅ (i) (j), f i j) ⊔ a = ⨅ (i) (j), f i j ⊔ a
-- Mathlib/Order/Interval/Set/Image.lean
lemma StrictAntiOn.image_Ioc_subset (h : StrictAntiOn f (Icc a b)) :
    f '' Ioc a b ⊆ Ico (f b) (f a)
-- Mathlib/MeasureTheory/Measure/Stieltjes.lean
@[simp]
theorem length_empty : f.length ∅ = 0
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem finiteAtBot {m0 : MeasurableSpace α} (μ : Measure α) : μ.FiniteAtFilter ⊥
-- Mathlib/Topology/VectorBundle/Basic.lean
@[simp, mfld_simps]
theorem mem_localTrivAt_baseSet : b ∈ (Z.localTrivAt b).baseSet
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- The sine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
opposite side. -/
theorem sin_oangle_left_mul_dist_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : Real.Angle.sin (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₃ p₂
-- Mathlib/Combinatorics/SimpleGraph/Prod.lean
protected theorem Connected.boxProd (hG : G.Connected) (hH : H.Connected) : (G □ H).Connected
-- Mathlib/Analysis/NormedSpace/OperatorNorm/NNNorm.lean
theorem opNNNorm_le_of_lipschitz {f : E →SL[σ₁₂] F} {K : ℝ≥0} (hf : LipschitzWith K f) :
    ‖f‖₊ ≤ K
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F → G} {f : E → F} (hg : ContDiffOn 𝕜 n g t)
    (hf : ContDiffOn 𝕜 n f s) (st : s ⊆ f ⁻¹' t) : ContDiffOn 𝕜 n (g ∘ f) s
-- Mathlib/Algebra/Ring/Subring/Basic.lean
protected theorem zsmul_mem {x : R} (hx : x ∈ s) (n : ℤ) : n • x ∈ s
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem take_eq_nil_of_eq_nil : ∀ {as : List α} {i}, as = [] → as.take i = []
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.isCountablyGenerated [Countable ι] {f : Filter α} {p : ι → Prop} {s : ι → Set α}
    (h : f.HasBasis p s) : f.IsCountablyGenerated
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
/-- If `s` is a limit binary fan over `X` and `Y`, then every pair of morphisms `f : W ⟶ X` and
    `g : W ⟶ Y` induces a morphism `l : W ⟶ s.pt` satisfying `l ≫ s.fst = f` and `l ≫ s.snd = g`.
    -/
@[simps]
def BinaryFan.IsLimit.lift' {W X Y : C} {s : BinaryFan X Y} (h : IsLimit s) (f : W ⟶ X)
    (g : W ⟶ Y) : { l : W ⟶ s.pt // l ≫ s.fst = f ∧ l ≫ s.snd = g }
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem cond_true_same  : ∀(c b : Bool), cond c c b = (c || b)
-- Mathlib/Order/Defs.lean
theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b
-- Mathlib/Topology/Order.lean
/-- If the codomain of a continuous injective function has discrete topology,
then so does the domain.

See also `Embedding.discreteTopology` for an important special case. -/
theorem DiscreteTopology.of_continuous_injective
    {β : Type*} [TopologicalSpace α] [TopologicalSpace β] [DiscreteTopology β] {f : α → β}
    (hc : Continuous f) (hinj : Injective f) : DiscreteTopology α
-- Mathlib/Analysis/NormedSpace/BallAction.lean
theorem ne_neg_of_mem_sphere {r : ℝ} (hr : r ≠ 0) (x : sphere (0 : E) r) : x ≠ -x
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- The square with `0 : 0 ⟶ 0` on the left and `𝟙 X` on the right is a pullback square. -/
@[simp]
theorem zero_left (X : C) : IsPullback (0 : 0 ⟶ X) (0 : (0 : C) ⟶ 0) (𝟙 X) (0 : 0 ⟶ X)
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
protected lemma covariantClass_add_le [AddZeroClass α] [CovariantClass α α (· + ·) (· ≤ ·)]
    (h : ∀ a : α, 0 ≤ a) : CovariantClass (WithZero α) (WithZero α) (· + ·) (· ≤ ·)
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem iff_and_self : ∀(a b : Bool), (b = (a && b)) ↔ (b → a)
-- Mathlib/GroupTheory/GroupAction/Blocks.lean
/-- An orbit is a block -/
theorem isFixedBlock_orbit (a : X) : IsFixedBlock G (orbit G a)
-- Mathlib/Order/Hom/Basic.lean
@[simp]
theorem symm_refl (α : Type*) [LE α] : (refl α).symm = refl α
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
protected theorem aestronglyMeasurable' (h : IntervalIntegrable f μ a b) :
    AEStronglyMeasurable f (μ.restrict (Ioc b a))
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
theorem surjOn_log' : SurjOn log (Iio 0) univ
-- Mathlib/CategoryTheory/Dialectica/Basic.lean
/--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y
-- Mathlib/Algebra/MvPolynomial/Division.lean
@[simp]
theorem zero_divMonomial (s : σ →₀ ℕ) : (0 : MvPolynomial σ R) /ᵐᵒⁿᵒᵐⁱᵃˡ s = 0
-- Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean
@[reassoc (attr := simp)]
lemma d_snd_v' (n : ℤ) :
    (mappingCone φ).d (n - 1) n ≫ (snd φ).v n n (add_zero n) =
    (fst φ : Cochain (mappingCone φ) F 1).v (n - 1) n (by omega) ≫ φ.f n +
      (snd φ).v (n - 1) (n - 1) (add_zero _) ≫ G.d (n - 1) n
-- Mathlib/Algebra/DirectSum/Module.lean
theorem ext_iff {f g : ⨁ i, M i} : f = g ↔ ∀ i, component R ι M i f = component R ι M i g
-- Mathlib/Algebra/BigOperators/Ring/List.lean
lemma prod_ne_zero (hL : (0 : M₀) ∉ l) : l.prod ≠ 0
-- Mathlib/Data/NNReal/Basic.lean
theorem lt_div_iff' {a b r : ℝ≥0} (hr : r ≠ 0) : a < b / r ↔ r * a < b
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
protected theorem map_smul : map (fun b => a • b) f = a • f
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
theorem hasBiproductsOfShape_of_equiv {K : Type w'} [HasBiproductsOfShape K C] (e : J ≃ K) :
    HasBiproductsOfShape J C
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_const_one : (∏ _x ∈ s, (1 : β)) = 1
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.exists_iff (hl : l.HasBasis p s) {P : Set α → Prop}
    (mono : ∀ ⦃s t⦄, s ⊆ t → P t → P s) : (∃ s ∈ l, P s) ↔ ∃ i, p i ∧ P (s i)
-- Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean
/-- A strong epimorphism that is a monomorphism is an isomorphism. -/
theorem isIso_of_mono_of_strongEpi (f : P ⟶ Q) [Mono f] [StrongEpi f] : IsIso f
-- Mathlib/Algebra/Symmetrized.lean
@[simp, to_additive existing]
theorem sym_inv [Inv α] (a : α) : sym a⁻¹ = (sym a)⁻¹
-- Mathlib/GroupTheory/Exponent.lean
theorem Group.exponent_dvd_nat_card : Monoid.exponent G ∣ Nat.card G
-- Mathlib/CategoryTheory/Monad/Limits.lean
/-- (Impl)
Construct the colimiting algebra from the map `λ : TL ⟶ L` given by `lambda`. We are required to
show it satisfies the two algebra laws, which follow from the algebra laws for the image of `D` and
our `commuting` lemma.
-/
@[simps]
def coconePoint : Algebra T
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem think_bind (c) (f : α → Computation β) : bind (think c) f = think (bind c f)
-- Mathlib/Topology/Homotopy/Path.lean
theorem hcomp {p₀ p₁ : Path x₀ x₁} {q₀ q₁ : Path x₁ x₂} (hp : p₀.Homotopic p₁)
    (hq : q₀.Homotopic q₁) : (p₀.trans q₀).Homotopic (p₁.trans q₁)
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem hasDerivAt_mul_const (c : 𝕜) : HasDerivAt (fun x => x * c) c x
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Subtracting a multiple of the second vector passed to `oangle` from the first vector does
not change the sign of the angle. -/
@[simp]
theorem oangle_sign_sub_smul_left (x y : V) (r : ℝ) :
    (o.oangle (x - r • y) y).sign = (o.oangle x y).sign
-- Mathlib/Algebra/Homology/DerivedCategory/HomologySequence.lean
lemma mono_homologyMap_mor₂_iff :
    Mono ((homologyFunctor C n₀).map T.mor₂) ↔ (homologyFunctor C n₀).map T.mor₁ = 0
-- Mathlib/GroupTheory/Perm/Basic.lean
@[simp]
theorem swap_inv (x y : α) : (swap x y)⁻¹ = swap x y
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := simp)]
theorem aemeasurable_inv_iff {G : Type*} [Group G] [MeasurableSpace G] [MeasurableInv G]
    {f : α → G} : AEMeasurable (fun x => (f x)⁻¹) μ ↔ AEMeasurable f μ
-- Mathlib/CategoryTheory/Abelian/InjectiveResolution.lean
@[reassoc]
lemma InjectiveResolution.iso_inv_naturality {X Y : C} (f : X ⟶ Y)
    (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0) :
    I.iso.inv ≫ (injectiveResolutions C).map f =
      (HomotopyCategory.quotient _ _).map φ ≫ J.iso.inv
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem linearIndependent_subtype {s : Set M} :
    LinearIndependent R (fun x => x : s → M) ↔
      ∀ l ∈ Finsupp.supported R R s, (Finsupp.total M M R id) l = 0 → l = 0
-- Mathlib/Data/Num/Lemmas.lean
@[norm_cast]
theorem lt_to_nat {m n : PosNum} : (m : ℕ) < n ↔ m < n
-- Mathlib/LinearAlgebra/Matrix/Hermitian.lean
/-- Note this is more general than `IsSelfAdjoint.conjugate` as `B` can be rectangular. -/
theorem isHermitian_mul_mul_conjTranspose [Fintype m] {A : Matrix m m α} (B : Matrix n m α)
    (hA : A.IsHermitian) : (B * A * Bᴴ).IsHermitian
-- Mathlib/Order/Cover.lean
theorem CovBy.Ico_eq (h : a ⋖ b) : Ico a b = {a}
-- Mathlib/Algebra/Polynomial/Div.lean
theorem rootMultiplicity_eq_multiplicity [DecidableEq R] [@DecidableRel R[X] (· ∣ ·)]
    (p : R[X]) (a : R) :
    rootMultiplicity a p =
      if h0 : p = 0 then 0 else (multiplicity (X - C a) p).get (multiplicity_X_sub_C_finite a h0)
-- Mathlib/SetTheory/Ordinal/Principal.lean
theorem principal_mul_omega_opow_opow (o : Ordinal) : Principal (· * ·) (omega^omega^o)
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
@[simp, norm_cast]
theorem dist_le_coe {x y : α} {c : ℝ≥0} : dist x y ≤ c ↔ nndist x y ≤ c
-- Mathlib/Order/Interval/Set/ProjIcc.lean
theorem IicExtend_of_le (f : Iic b → β) (hx : b ≤ x) : IicExtend f x = f ⟨b, le_rfl⟩
-- Mathlib/Algebra/Group/Pi/Basic.lean
@[to_additive (attr := simp)]
theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i
-- Mathlib/RingTheory/Ideal/Over.lean
theorem IsIntegralClosure.comap_lt_comap {I J : Ideal A} [I.IsPrime] (I_lt_J : I < J) :
    I.comap (algebraMap R A) < J.comap (algebraMap R A)
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
protected theorem seq_eq {α β ε : Type u} [Monad m] (mf : ExceptT ε m (α → β)) (x : ExceptT ε m α) : mf <*> x = mf >>= fun f => f <$> x
-- Mathlib/Topology/MetricSpace/Thickening.lean
/-- The frontier of the (open) thickening of a set is contained in an `EMetric.infEdist` level
set. -/
theorem frontier_thickening_subset (E : Set α) {δ : ℝ} :
    frontier (thickening δ E) ⊆ { x : α | infEdist x E = ENNReal.ofReal δ }
-- Mathlib/LinearAlgebra/QuadraticForm/QuadraticModuleCat.lean
/-- Build a `QuadraticForm.IsometryEquiv` from an isomorphism in the category
`QuadraticModuleCat R`. -/
@[simps]
def toIsometryEquiv (i : X ≅ Y) : X.form.IsometryEquiv Y.form
-- Mathlib/Dynamics/PeriodicPts.lean
@[simp]
theorem isFixedPt_prod_map (x : α × β) :
    IsFixedPt (Prod.map f g) x ↔ IsFixedPt f x.1 ∧ IsFixedPt g x.2
-- Mathlib/Data/Int/Defs.lean
@[simp] lemma natAbs_ofNat' (n : ℕ) : natAbs (ofNat n) = n
-- Mathlib/Order/Monotone/Basic.lean
theorem antitone' [Subsingleton β] (f : α → β) : Antitone f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma baseChange_negAddY (x₁ x₂ y₁ L : A) :
    (W.baseChange B).toAffine.negAddY (f x₁) (f x₂) (f y₁) (f L) =
      f ((W.baseChange A).toAffine.negAddY x₁ x₂ y₁ L)
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem mk_subset_mk_lt_cof {α : Type*} (h : ∀ x < #α, (2^x) < #α) :
    #{ s : Set α // #s < cof (#α).ord } = #α
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_range_zero (f : ℕ → β) : ∏ k ∈ range 0, f k = 1
-- .lake/packages/batteries/Batteries/Data/Array/Lemmas.lean
theorem mem_join : ∀ {L : Array (Array α)}, a ∈ L.join ↔ ∃ l, l ∈ L ∧ a ∈ l
-- Mathlib/Algebra/Ring/Divisibility/Lemmas.lean
lemma dvd_zsmul_of_dvd [NonUnitalRing R] {x y : R} (z : ℤ) (h : x ∣ y) : x ∣ z • y
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem restrict_eq_self {i : Set α} (hi : MeasurableSet i) {j : Set α} (hj : MeasurableSet j)
    (hij : j ⊆ i) : v.restrict i j = v j
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
@[simp]
lemma uniformEquicontinuousOn_empty [h : IsEmpty ι] (F : ι → β → α) (S : Set β) :
    UniformEquicontinuousOn F S
-- Mathlib/LinearAlgebra/Basis.lean
theorem forall_coord_eq_zero_iff {x : M} : (∀ i, b.coord i x = 0) ↔ x = 0
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp)]
theorem fst_comp_inr : (fst M N).comp (inr M N) = 1
-- Mathlib/AlgebraicTopology/SimplicialCategory/Basic.lean
/-- A simplicial category is a category `C` that is enriched over the
category of simplicial sets in such a way that morphisms in
`C` identify to the `0`-simplices of the enriched hom. -/
class SimplicialCategory extends EnrichedCategory SSet.{v} C where
  /-- morphisms identify to `0`-simplices of the enriched hom -/
  homEquiv (K L : C) : (K ⟶ L) ≃ (𝟙_ SSet.{v} ⟶ EnrichedCategory.Hom K L)
  homEquiv_id (K : C) : homEquiv K K (𝟙 K) = eId SSet K := by aesop_cat
  homEquiv_comp {K L M : C} (f : K ⟶ L) (g : L ⟶ M) :
    homEquiv K M (f ≫ g) = (λ_ _).inv ≫ (homEquiv K L f ⊗ homEquiv L M g) ≫
      eComp SSet K L M := by aesop_cat
-- Mathlib/LinearAlgebra/Basis/Flag.lean
theorem flag_le_iff (b : Basis (Fin n) R M) {k p} :
    b.flag k ≤ p ↔ ∀ i : Fin n, i.castSucc < k → b i ∈ p
-- Mathlib/Analysis/BoxIntegral/Basic.lean
theorem integralSum_fiberwise {α} (g : Box ι → α) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
    (π : TaggedPrepartition I) :
    (∑ y ∈ π.boxes.image g, integralSum f vol (π.filter (g · = y))) = integralSum f vol π
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem cond_false_same : ∀(c b : Bool), cond c b c = (c && b)
-- Mathlib/Computability/Primrec.lean
theorem bind_decode_iff {f : α → β → Option σ} :
    (Primrec₂ fun a n => (@decode β _ n).bind (f a)) ↔ Primrec₂ f
-- Mathlib/Algebra/GeomSum.lean
protected theorem Commute.geom_sum₂_Ico [DivisionRing α] {x y : α} (h : Commute x y) (hxy : x ≠ y)
    {m n : ℕ} (hmn : m ≤ n) :
    (∑ i ∈ Finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = (x ^ n - y ^ (n - m) * x ^ m) / (x - y)
-- Mathlib/RingTheory/HahnSeries/Valuation.lean
@[simp]
theorem addVal_apply_of_ne {x : HahnSeries Γ R} (hx : x ≠ 0) : addVal Γ R x = x.order
-- Mathlib/Topology/Compactness/SigmaCompact.lean
theorem SigmaCompactSpace.of_countable (S : Set (Set X)) (Hc : S.Countable)
    (Hcomp : ∀ s ∈ S, IsCompact s) (HU : ⋃₀ S = univ) : SigmaCompactSpace X
-- Mathlib/RingTheory/Coalgebra/Equiv.lean
@[simp]
theorem symm_toLinearEquiv (e : A ≃ₗc[R] B) :
    e.symm = (e : A ≃ₗ[R] B).symm
-- Mathlib/Order/OmegaCompletePartialOrder.lean
@[simp]
theorem comp_assoc (f : γ →𝒄 φ) (g : β →𝒄 γ) (h : α →𝒄 β) : f.comp (g.comp h) = (f.comp g).comp h
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem head_cons (a : α) (s) : head (cons a s) = some a
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
@[reassoc (attr := simp)]
theorem ι_fstSigmaMap (b) : Sigma.ι I.left b ≫ I.fstSigmaMap = I.fst b ≫ Sigma.ι I.right _
-- Mathlib/RingTheory/Localization/Basic.lean
theorem lift_surjective_iff :
    Surjective (lift hg : S → P) ↔ ∀ v : P, ∃ x : R × M, v * g x.2 = g x.1
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem map_ne_zero_of_mem_nonZeroDivisors [Nontrivial M] [ZeroHomClass F M M'] (g : F)
    (hg : Function.Injective (g : M → M')) {x : M} (h : x ∈ M⁰) : g x ≠ 0
-- Mathlib/Data/Fin/Tuple/Basic.lean
@[simp]
theorem forall_fin_zero_pi {α : Fin 0 → Sort*} {P : (∀ i, α i) → Prop} :
    (∀ x, P x) ↔ P finZeroElim
-- Mathlib/Order/LiminfLimsup.lean
lemma Antitone.isCoboundedUnder_ge_of_isCobounded {f : R → S} (f_decr : Antitone f)
    [NeBot F] (cobdd : IsCobounded (· ≤ ·) F) :
    F.IsCoboundedUnder (· ≥ ·) f
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem getLsb_sshiftRight (x : BitVec w) (s i : Nat) :
    getLsb (x.sshiftRight s) i =
      (!decide (w ≤ i) && if s + i < w then x.getLsb (s + i) else x.msb)
-- Mathlib/RingTheory/Finiteness.lean
theorem exists_mem_and_smul_eq_self_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
    [AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
    ∃ r ∈ I, ∀ n ∈ N, r • n = n
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToFun_toL1 (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ) :
    setToFun μ T hT (hf.toL1 f) = setToFun μ T hT f
-- Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
theorem iff_isSplitMono_eq_zero {X Y : C} (f : X ⟶ Y) [IsSplitMono f] : IsZero X ↔ f = 0
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem invFun_eq_symm (f : R ≃+* S) : EquivLike.inv f = f.symm
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem lt_def {x y : ONote} : x < y ↔ repr x < repr y