ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Combinatorics/Pigeonhole.lean
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function `f`, a
finite sets `s` in its domain, a finite set `t` in its codomain, and a natural number `n` such that
`card s ≤ card t * n`, there exists `y ∈ t` such that its preimage in `s` has no more than `n`
elements. See also `Finset.exists_card_fiber_lt_of_card_lt_mul` for a stronger statement. -/
theorem exists_card_fiber_le_of_card_le_mul (ht : t.Nonempty) (hn : s.card ≤ t.card * n) :
    ∃ y ∈ t, (s.filter fun x => f x = y).card ≤ n
-- Mathlib/MeasureTheory/Integral/PeakFunction.lean
/-- Consider a nonnegative function `φ` with integral one, decaying quickly enough at infinity.
Then suitable renormalizations of `φ` form a sequence of peak functions around the origin:
`∫ (c ^ d * φ (c • x)) • g x` converges to `g 0` as `c → ∞` if `g` is continuous at `0`
and integrable. -/
theorem tendsto_integral_comp_smul_smul_of_integrable
    {φ : F → ℝ} (hφ : ∀ x, 0 ≤ φ x) (h'φ : ∫ x, φ x ∂μ = 1)
    (h : Tendsto (fun x ↦ ‖x‖ ^ finrank ℝ F * φ x) (cobounded F) (𝓝 0))
    {g : F → E} (hg : Integrable g μ) (h'g : ContinuousAt g 0) :
    Tendsto (fun (c : ℝ) ↦ ∫ x, (c ^ (finrank ℝ F) * φ (c • x)) • g x ∂μ) atTop (𝓝 (g 0))
-- Mathlib/Analysis/Calculus/FDeriv/RestrictScalars.lean
theorem HasFDerivAtFilter.restrictScalars {L} (h : HasFDerivAtFilter f f' x L) :
    HasFDerivAtFilter f (f'.restrictScalars 𝕜) x L
-- Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
@[to_additive (attr := simp)]
theorem tprod_pi_single [DecidableEq β] (b : β) (a : α) : ∏' b', Pi.mulSingle b a b' = a
-- Mathlib/Analysis/LocallyConvex/Bounded.lean
theorem isVonNBounded_of_smul_tendsto_zero {ε : ι → 𝕜} {l : Filter ι} [l.NeBot]
    (hε : ∀ᶠ n in l, ε n ≠ 0) {S : Set E}
    (H : ∀ x : ι → E, (∀ n, x n ∈ S) → Tendsto (ε • x) l (𝓝 0)) : IsVonNBounded 𝕜 S
-- Mathlib/Analysis/SpecialFunctions/PolarCoord.lean
theorem integral_comp_polarCoord_symm {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (f : ℝ × ℝ → E) :
    (∫ p in polarCoord.target, p.1 • f (polarCoord.symm p)) = ∫ p, f p
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem of_nonpos_disjoint_union_eq_zero {s : SignedMeasure α} {A B : Set α} (h : Disjoint A B)
    (hA₁ : MeasurableSet A) (hB₁ : MeasurableSet B) (hA₂ : s A ≤ 0) (hB₂ : s B ≤ 0)
    (hAB : s (A ∪ B) = 0) : s A = 0
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z
-- Mathlib/Algebra/Group/Submonoid/Units.lean
@[to_additive]
lemma val_mem_of_mem_units (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) : (x : M) ∈ S
-- Mathlib/CategoryTheory/Category/ULift.lean
/-- One half of the equivalence between `C` and `AsSmall C`. -/
@[simps]
def AsSmall.down : AsSmall C ⥤ C
-- Mathlib/Analysis/Convex/Function.lean
theorem strictConvexOn_iff_div {f : E → β} :
    StrictConvexOn 𝕜 s f ↔
      Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → x ≠ y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b →
        f ((a / (a + b)) • x + (b / (a + b)) • y) < (a / (a + b)) • f x + (b / (a + b)) • f y
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp] lemma map_map (f : V ↪ W) (g : W ↪ X) : (G.map f).map g = G.map (f.trans g)
-- Mathlib/Algebra/MvPolynomial/Equiv.lean
@[simp]
theorem sumToIter_C (a : R) : sumToIter R S₁ S₂ (C a) = C (C a)
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.inter (h₁ : MapsTo f s t₁) (h₂ : MapsTo f s t₂) : MapsTo f s (t₁ ∩ t₂)
-- Mathlib/Data/Part.lean
@[simp]
theorem to_ofOption (o : Option α) : toOption (ofOption o) = o
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem intCast_mulVec (x : ℤ) (v : m → α) : x *ᵥ v = (x : α) • v
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
@[simp]
theorem take_eq_take :
    ∀ {l : List α} {m n : Nat}, l.take m = l.take n ↔ min m l.length = min n l.length
-- Mathlib/Data/Fintype/Powerset.lean
@[simp]
theorem Fintype.card_finset_len [Fintype α] (k : ℕ) :
    Fintype.card { s : Finset α // s.card = k } = Nat.choose (Fintype.card α) k
-- Mathlib/Order/SemiconjSup.lean
theorem isOrderRightAdjoint_csSup [ConditionallyCompleteLattice α] [Preorder β] (f : α → β)
    (hne : ∀ y, ∃ x, f x ≤ y) (hbdd : ∀ y, BddAbove { x | f x ≤ y }) :
    IsOrderRightAdjoint f fun y => sSup { x | f x ≤ y }
-- Mathlib/Geometry/Euclidean/Inversion/Basic.lean
theorem inversion_bijective (c : P) {R : ℝ} (hR : R ≠ 0) : Bijective (inversion c R)
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Valid'.node4L_lemma₃ {b c d : ℕ} (mr₁ : 2 * d ≤ b + c + 1) (mm₁ : b ≤ 3 * c) :
    d ≤ 3 * c
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
theorem mem_map_equiv {f : R ≃+* S} {K : NonUnitalSubring R} {x : S} :
    x ∈ K.map (f : R →ₙ+* S) ↔ f.symm x ∈ K
-- Mathlib/RepresentationTheory/Action/Monoidal.lean
theorem associator_hom_hom {X Y Z : Action V G} :
    Hom.hom (α_ X Y Z).hom = (α_ X.V Y.V Z.V).hom
-- Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean
lemma polynomialZ_eq : W.polynomialZ =
    X 1 ^ 2 + C W.a₁ * X 0 * X 1 + C (2 * W.a₃) * X 1 * X 2
      - (C W.a₂ * X 0 ^ 2 + C (2 * W.a₄) * X 0 * X 2 + C (3 * W.a₆) * X 2 ^ 2)
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem sumAssoc_symm_apply_inr_inr : (sumAssoc α β γ).symm (inr (inr c)) = inr c
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem sub_im : (a - b).im = a.im - b.im
-- Mathlib/Combinatorics/SetFamily/CauchyDavenport.lean
/-- The **Cauchy-Davenport Theorem** for torsion-free groups. The size of `s * t` is lower-bounded
by `|s| + |t| - 1`. -/
@[to_additive "The **Cauchy-Davenport theorem** for torsion-free groups. The size of `s + t` is
lower-bounded by `|s| + |t| - 1`."]
lemma Monoid.IsTorsionFree.card_add_card_sub_one_le_card_mul (h : IsTorsionFree α)
    (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card
-- Mathlib/AlgebraicTopology/DoldKan/Decomposition.lean
@[simp]
theorem preComp_φ : (f.preComp g).φ = g.app (op [n + 1]) ≫ f.φ
-- Mathlib/Algebra/Lie/CartanExists.lean
lemma exists_isCartanSubalgebra_engel_of_finrank_le_card (h : finrank K L ≤ #K) :
    ∃ x : L, IsCartanSubalgebra (engel K x)
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
protected theorem antilipschitz [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) :
    AntilipschitzWith 1 f
-- Mathlib/Algebra/Lie/Free.lean
theorem liftAux_map_mul (f : X → L) (a b : lib R X) :
    liftAux R f (a * b) = ⁅liftAux R f a, liftAux R f b⁆
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
/-- An alternative formulation of `contMDiffWithinAt_iff_of_mem_maximalAtlas`
  if the set if `s` lies in `e.source`. -/
theorem contMDiffWithinAt_iff_image {x : M} (he : e ∈ maximalAtlas I M)
    (he' : e' ∈ maximalAtlas I' M') (hs : s ⊆ e.source) (hx : x ∈ e.source) (hy : f x ∈ e'.source) :
    ContMDiffWithinAt I I' n f s x ↔
      ContinuousWithinAt f s x ∧
        ContDiffWithinAt 𝕜 n (e'.extend I' ∘ f ∘ (e.extend I).symm) (e.extend I '' s)
          (e.extend I x)
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
lemma nullMeasurable_comp_snd [NeZero μ] {f : β → γ} :
    NullMeasurable (f ∘ Prod.snd) (μ.prod ν) ↔ NullMeasurable f ν
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[simp] lemma measurableSet_preimage_up {s : Set (ULift α)} :
    MeasurableSet (ULift.up ⁻¹' s) ↔ MeasurableSet s
-- Mathlib/RingTheory/Coprime/Basic.lean
lemma IsCoprime.intCast {R : Type*} [CommRing R] {a b : ℤ} (h : IsCoprime a b) :
    IsCoprime (a : R) (b : R)
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
protected theorem le_antisymm_iff {x y : Fin n} : x = y ↔ x ≤ y ∧ y ≤ x
-- Mathlib/RingTheory/Coprime/Lemmas.lean
theorem IsCoprime.pow_right_iff (hm : 0 < m) : IsCoprime x (y ^ m) ↔ IsCoprime x y
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem perm_insertNth {α} (x : α) (l : List α) {n} (h : n ≤ l.length) :
    insertNth n x l ~ x :: l
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- No points are in `⊥`. -/
theorem not_mem_bot (p : P) : p ∉ (⊥ : AffineSubspace k P)
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem floor_sub_nat [Sub α] [OrderedSub α] [ExistsAddOfLE α] (a : α) (n : ℕ) :
    ⌊a - n⌋₊ = ⌊a⌋₊ - n
-- Mathlib/Algebra/Order/Ring/WithTop.lean
@[simp] lemma untop'_zero_mul (a b : WithTop α) : (a * b).untop' 0 = a.untop' 0 * b.untop' 0
-- Mathlib/Algebra/Module/Equiv/Defs.lean
protected theorem congr_arg {x x'} : x = x' → e x = e x'
-- Mathlib/Deprecated/Subfield.lean
theorem IsSubfield.div_mem {S : Set F} (hS : IsSubfield S) {x y : F} (hx : x ∈ S) (hy : y ∈ S) :
    x / y ∈ S
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem Monotone.Icc (hf : Monotone f) (hg : Antitone g) :
    Antitone fun x => Icc (f x) (g x)
-- Mathlib/CategoryTheory/Bicategory/NaturalTransformation/Strong.lean
@[simp]
lemma id.toOplax : (id F).toOplax = OplaxNatTrans.id F
-- Mathlib/LinearAlgebra/Contraction.lean
@[simp]
theorem lTensorHomEquivHomLTensor_toLinearMap :
    (lTensorHomEquivHomLTensor R M P Q).toLinearMap = lTensorHomToHomLTensor R M P Q
-- Mathlib/Algebra/Group/Submonoid/Basic.lean
@[to_additive (attr := simp)]
theorem mem_toSubsemigroup {s : Submonoid M} {x : M} : x ∈ s.toSubsemigroup ↔ x ∈ s
-- Mathlib/CategoryTheory/Functor/EpiMono.lean
/-- A functor reflects monomorphisms if morphisms that are mapped to monomorphisms are themselves
    monomorphisms. -/
class ReflectsMonomorphisms (F : C ⥤ D) : Prop where
   /-- A functor reflects monomorphisms if morphisms that are mapped to monomorphisms are themselves
    monomorphisms. -/
  reflects : ∀ {X Y : C} (f : X ⟶ Y), Mono (F.map f) → Mono f
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem setLIntegral_const_lt_top [IsFiniteMeasure μ] (s : Set α) {c : ℝ≥0∞} (hc : c ≠ ∞) :
    ∫⁻ _ in s, c ∂μ < ∞
-- Mathlib/RingTheory/OreLocalization/Ring.lean
/-- The ring homomorphism from `R` to `R[S⁻¹]`, mapping `r : R` to the fraction `r /ₒ 1`. -/
@[simps!]
def numeratorRingHom : R →+* R[S⁻¹]
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem mfderiv_neg (f : M → E') (x : M) :
    (mfderiv I 𝓘(𝕜, E') (-f) x : TangentSpace I x →L[𝕜] E') =
      (-mfderiv I 𝓘(𝕜, E') f x : TangentSpace I x →L[𝕜] E')
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem div_eq_inv_mul : a / b = b⁻¹ * a
-- Mathlib/Analysis/SpecificLimits/Basic.lean
theorem aux_hasSum_of_le_geometric : HasSum (fun n : ℕ ↦ C * r ^ n) (C / (1 - r))
-- Mathlib/Algebra/Order/UpperLower.lean
@[to_additive (attr := simp,norm_cast)]
theorem coe_mul (s t : UpperSet α) : (↑(s * t) : Set α) = s * t
-- Mathlib/Algebra/Group/Equiv/Basic.lean
/-- A multiplicative analogue of `Equiv.arrowCongr`,
for multiplicative maps from a monoid to a commutative monoid.
-/
@[to_additive (attr := simps apply)
  "An additive analogue of `Equiv.arrowCongr`,
  for additive maps from an additive monoid to a commutative additive monoid."]
-- Porting note: @[simps apply] removed because it was making a lemma which
-- wasn't in simp normal form.
def monoidHomCongr {M N P Q} [MulOneClass M] [MulOneClass N] [CommMonoid P] [CommMonoid Q]
    (f : M ≃* N) (g : P ≃* Q) : (M →* P) ≃* (N →* Q)
-- Mathlib/Data/Real/Hyperreal.lean
theorem not_real_of_infinitesimal_ne_zero (x : ℝ*) : Infinitesimal x → x ≠ 0 → ∀ r : ℝ, x ≠ r
-- Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean
lemma coverPreserving : haveI := F.reflects_preregular
    CoverPreserving (regularTopology _) (regularTopology _) F
-- Mathlib/FieldTheory/KummerExtension.lean
lemma autEquivZmod_symm_apply_intCast {ζ : K} (hζ : IsPrimitiveRoot ζ n) (m : ℤ) :
    (autEquivZmod H L hζ).symm (Multiplicative.ofAdd (m : ZMod n)) α = ζ ^ m • α
-- Mathlib/Data/ENNReal/Operations.lean
protected theorem sub_lt_self_iff (ha : a ≠ ∞) : a - b < a ↔ 0 < a ∧ 0 < b
-- Mathlib/Algebra/Group/Support.lean
@[to_additive (attr := simp)]
theorem mem_mulSupport {f : α → M} {x : α} : x ∈ mulSupport f ↔ f x ≠ 1
-- Mathlib/Data/ZMod/Basic.lean
theorem val_coe_unit_coprime {n : ℕ} (u : (ZMod n)ˣ) : Nat.Coprime (u : ZMod n).val n
-- Mathlib/Control/Applicative.lean
theorem pure_seq_eq_map (f : α → β) (x : Comp F G α) : pure f <*> x = f <$> x
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
/-- Given `F : WalkingCospan ⥤ C`, which is really the same as `cospan (F.map inl) (F.map inr)`,
    and a cone on `F`, we get a pullback cone on `F.map inl` and `F.map inr`. -/
@[simps]
def PullbackCone.ofCone {F : WalkingCospan ⥤ C} (t : Cone F) :
    PullbackCone (F.map inl) (F.map inr)
-- Mathlib/Order/Partition/Equipartition.lean
theorem _root_.Set.Subsingleton.isEquipartition (h : (P.parts : Set (Finset α)).Subsingleton) :
    P.IsEquipartition
-- Mathlib/Algebra/GroupWithZero/Basic.lean
/-- To match `mul_one_eq_id`. -/
theorem mul_zero_eq_const : (· * (0 : M₀)) = Function.const _ 0
-- Mathlib/Topology/Sheaves/Stalks.lean
@[reassoc (attr := simp)]
lemma germToPullbackStalk_stalkPullbackHom
    (f : X ⟶ Y) (F : Y.Presheaf C) (U : Opens X) (x : U) :
    germToPullbackStalk C f F U x ≫ stalkPullbackHom C f F x =
      ((pullback C f).obj F).germ x
-- Mathlib/RingTheory/ClassGroup.lean
@[simp]
theorem coe_toPrincipalIdeal (x : Kˣ) :
    (toPrincipalIdeal R K x : FractionalIdeal R⁰ K) = spanSingleton _ (x : K)
-- Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
@[simp]
lemma map_f' : (h.map F).f' = F.map h.f'
-- Mathlib/Algebra/Algebra/Operations.lean
theorem comap_op_pow (n : ℕ) (M : Submodule R Aᵐᵒᵖ) :
    comap (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) (M ^ n) =
      comap (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) M ^ n
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
theorem gcd_add_mul_self (m n k : Nat) : gcd m (n + k * m) = gcd m n
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem equivOfEq_rfl (S : Subalgebra R A) : equivOfEq S S rfl = AlgEquiv.refl
-- Mathlib/RingTheory/PowerSeries/Basic.lean
theorem rescale_neg_one_X : rescale (-1 : A) X = -X
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atBot_add (hf : Tendsto f l atBot) (hg : Tendsto g l atBot) :
    Tendsto (fun x => f x + g x) l atBot
-- Mathlib/Control/ULift.lean
@[simp]
theorem map_up (f : α → β) (a : α) : (PLift.up a).map f = PLift.up (f a)
-- Mathlib/Topology/UniformSpace/Equiv.lean
@[continuity]
protected theorem continuous_symm (h : α ≃ᵤ β) : Continuous h.symm
-- Mathlib/Algebra/GradedMonoid.lean
theorem smul_mk [∀ i, SMul α (A i)] {i} (c : α) (a : A i) :
    c • mk i a = mk i (c • a)
-- Mathlib/Order/Compare.lean
theorem Eq.cmp_eq_eq' (h : x = y) : cmp y x = Ordering.eq
-- Mathlib/Topology/Order/LocalExtr.lean
nonrec theorem IsLocalMinOn.bicomp_mono [Preorder δ] {op : β → γ → δ}
    (hop : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) op op) (hf : IsLocalMinOn f s a) {g : α → γ}
    (hg : IsLocalMinOn g s a) : IsLocalMinOn (fun x => op (f x) (g x)) s a
-- Mathlib/RingTheory/Kaehler/Basic.lean
theorem KaehlerDifferential.derivationQuotKerTotal_apply (x) :
    KaehlerDifferential.derivationQuotKerTotal R S x = 1𝖣x
-- Mathlib/Topology/Separation.lean
/-- A point `x` in a discrete subset `s` of a topological space admits a neighbourhood
that only meets `s` at `x`.  -/
theorem nhds_inter_eq_singleton_of_mem_discrete {s : Set X} [DiscreteTopology s] {x : X}
    (hx : x ∈ s) : ∃ U ∈ 𝓝 x, U ∩ s = {x}
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
@[simp]
theorem arcsin_nonneg {x : ℝ} : 0 ≤ arcsin x ↔ 0 ≤ x
-- Mathlib/Data/PEquiv.lean
theorem toPEquiv_apply (f : α ≃ β) (x : α) : f.toPEquiv x = some (f x)
-- Mathlib/Topology/List.lean
theorem continuous_insertNth {n : ℕ} {i : Fin (n + 1)} {f : β → α} {g : β → Vector α n}
    (hf : Continuous f) (hg : Continuous g) : Continuous fun b => Vector.insertNth (f b) i (g b)
-- Mathlib/Analysis/Convex/Segment.lean
theorem openSegment_translate_preimage (a b c : E) :
    (fun x => a + x) ⁻¹' openSegment 𝕜 (a + b) (a + c) = openSegment 𝕜 b c
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
@[simp]
theorem _root_.ContinuousLinearMap.compContinuousAlternatingMap_coe (g : N →L[R] N')
    (f : M [⋀^ι]→L[R] N) : ⇑(g.compContinuousAlternatingMap f) = g ∘ f
-- Mathlib/Data/Finset/Functor.lean
@[simp]
theorem id_traverse [DecidableEq α] (s : Finset α) : traverse (pure : α → Id α) s = s
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem range_smul_range {ι κ : Type*} [SMul α β] (b : ι → α) (c : κ → β) :
    range b • range c = range fun p : ι × κ ↦ b p.1 • c p.2
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
theorem pointwise_smul_def {a : α} (S : AddSubgroup A) :
    a • S = S.map (DistribMulAction.toAddMonoidEnd _ _ a)
-- Mathlib/RingTheory/Flat/Basic.lean
/--
If `M` is a flat module, then `𝟙 M ⊗ f` is injective for all injective linear maps `f`.
-/
theorem lTensor_preserves_injective_linearMap {N' : Type*} [AddCommGroup N'] [Module R N']
    [Flat R M] (L : N →ₗ[R] N') (hL : Function.Injective L) :
    Function.Injective (L.lTensor M)
-- Mathlib/Algebra/Order/AddGroupWithTop.lean
/-- A linearly ordered commutative group with an additively absorbing `⊤` element.
  Instances should include number systems with an infinite element adjoined. -/
class LinearOrderedAddCommGroupWithTop (α : Type*) extends LinearOrderedAddCommMonoidWithTop α,
  SubNegMonoid α, Nontrivial α where
  protected neg_top : -(⊤ : α) = ⊤
  protected add_neg_cancel : ∀ a : α, a ≠ ⊤ → a + -a = 0
-- Mathlib/Topology/Algebra/UniformGroup.lean
@[to_additive uniformContinuous_const_nsmul]
theorem uniformContinuous_pow_const (n : ℕ) : UniformContinuous fun x : α => x ^ n
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
theorem HasDerivAt.sum (h : ∀ i ∈ u, HasDerivAt (A i) (A' i) x) :
    HasDerivAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) x
-- Mathlib/Topology/Sheaves/SheafCondition/OpensLeCover.lean
/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)
-- Mathlib/Data/Nat/PartENat.lean
@[simp]
theorem one_lt_top : (1 : PartENat) < ⊤
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[simp]
theorem id_val_base (X : Scheme) : (𝟙 X : _).1.base = 𝟙 _
-- Mathlib/Algebra/Polynomial/Roots.lean
@[simp]
theorem roots_smul_nonzero (p : R[X]) (ha : a ≠ 0) : (a • p).roots = p.roots
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp]
theorem nndist_toAdd (a b : Multiplicative X) : nndist (toAdd a) (toAdd b) = nndist a b
-- Mathlib/Topology/Order/NhdsSet.lean
theorem Ioo_mem_nhdsSet_Ioc (h : a ≤ b) (h' : c < d) : Ioo a d ∈ 𝓝ˢ (Ioc b c)
-- Mathlib/Analysis/Normed/Algebra/TrivSqZeroExt.lean
theorem norm_def (x : tsze R M) : ‖x‖ = ‖fst x‖ + ‖snd x‖
-- Mathlib/MeasureTheory/Category/MeasCat.lean
@[simp]
theorem coe_of (X : Type u) [MeasurableSpace X] : (of X : Type u) = X
-- Mathlib/Order/SuccPred/CompleteLinearOrder.lean
lemma sInf_mem_of_not_isPredLimit (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s
-- Mathlib/Topology/Instances/Rat.lean
@[norm_cast, simp]
theorem Nat.dist_cast_rat (x y : ℕ) : dist (x : ℚ) y = dist x y
-- Mathlib/RingTheory/Nilpotent/Defs.lean
theorem isRadical_iff_pow_one_lt [MonoidWithZero R] (k : ℕ) (hk : 1 < k) :
    IsRadical y ↔ ∀ x, y ∣ x ^ k → y ∣ x
-- Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
/-- If `M` is finite, `finrank M = rank M`. -/
@[simp]
theorem finrank_eq_rank [Module.Finite R M] :
    ↑(FiniteDimensional.finrank R M) = Module.rank R M
-- Mathlib/RingTheory/Bialgebra/Hom.lean
@[simps (config := .lemmasOnly) toSemigroup_toMul_mul toOne_one]
instance End : Monoid (A →ₐc[R] A)
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem uncurry_apply (f : M →ₗ[R] N →ₗ[R] P) (m : M) (n : N) :
    uncurry R M N P f (m ⊗ₜ n) = f m n
-- Mathlib/FieldTheory/Perfect.lean
@[simp]
theorem coe_frobeniusEquiv : ⇑(frobeniusEquiv R p) = frobenius R p
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem comap_preimage {β} [MeasurableSpace α] {mβ : MeasurableSpace β} (f : α → β) (μ : Measure β)
    {s : Set β} (hf : Injective f) (hf' : Measurable f)
    (h : ∀ t, MeasurableSet t → NullMeasurableSet (f '' t) μ) (hs : MeasurableSet s) :
    μ.comap f (f ⁻¹' s) = μ (s ∩ range f)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem PosMulMono.toPosMulStrictMono [PosMulMono α] : PosMulStrictMono α
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
/-- Alias of `Nat.cast_le`, specialized to `Ordinal` --/
theorem natCast_le {m n : ℕ} : (m : Ordinal) ≤ n ↔ m ≤ n
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_inter_Ioo : Iio a ∩ Ioo b c = Ioo b (min a c)
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive (attr := simp)]
theorem coe_comp' {G H K : Type _} [Group G] [Group H] [Group K] (f : G →* H) (g : H →* K) :
    @DFunLike.coe (G →* K) G (fun _ ↦ K) MonoidHom.instFunLike (CategoryStruct.comp
      (X := Grp.of G) (Y := Grp.of H) (Z := Grp.of K) f g) = g ∘ f
-- Mathlib/NumberTheory/DirichletCharacter/Basic.lean
@[simp]
lemma changeLevel_eq_one_iff {m : ℕ} {χ : DirichletCharacter R n} (hm : n ∣ m) [NeZero m] :
    changeLevel hm χ = 1 ↔ χ = 1
-- Mathlib/Topology/Algebra/ProperAction.lean
/-- If a T2 group acts properly on a topological space, then this topological space is T2. -/
@[to_additive "If a T2 group acts properly on a topological space,
then this topological space is T2."]
theorem t2Space_of_properSMul_of_t2Group [h_proper : ProperSMul G X] [T2Space G] : T2Space X
-- Mathlib/Data/Set/Image.lean
theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) ⊆ s
-- Mathlib/Data/Complex/Basic.lean
theorem ofReal_mul' (r : ℝ) (z : ℂ) : ↑r * z = ⟨r * z.re, r * z.im⟩
-- Mathlib/AlgebraicTopology/DoldKan/FunctorGamma.lean
@[reassoc]
theorem Obj.map_on_summand' {Δ Δ' : SimplexCategoryᵒᵖ} (A : Splitting.IndexSet Δ) (θ : Δ ⟶ Δ') :
    ((splitting K).cofan Δ).inj A ≫ (obj K).map θ =
      Obj.Termwise.mapMono K (image.ι (θ.unop ≫ A.e)) ≫
        ((splitting K).cofan Δ').inj (A.pull θ)
-- Mathlib/GroupTheory/FixedPointFree.lean
theorem commutatorMap_injective (hφ : FixedPointFree φ) : Function.Injective (commutatorMap φ)
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Sized.eq_node' {s l x r} (h : @Sized α (node s l x r)) : node s l x r = .node' l x r
-- Mathlib/Topology/Instances/EReal.lean
theorem continuousAt_add_coe_bot (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (a, ⊥)
-- Mathlib/Algebra/MonoidAlgebra/ToDirectSum.lean
@[simp]
theorem toDirectSum_zero [Semiring M] : (0 : AddMonoidAlgebra M ι).toDirectSum = 0
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Iic_diff_Iio : Iic b \ Iio a = Icc a b
-- Mathlib/Order/Minimal.lean
@[simp]
theorem minimals_empty : minimals r ∅ = ∅
-- Mathlib/Data/Analysis/Filter.lean
@[simp]
theorem top_F (u : Unit) : (@Realizer.top α).F u = univ
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
lemma even_nat_card_aut_of_not_isUnramified [IsGalois k K] (hw : ¬ IsUnramified k w) :
    Even (Nat.card <| K ≃ₐ[k] K)
-- Mathlib/Deprecated/Group.lean
/-- A map to a group preserving multiplication is a monoid homomorphism. -/
@[to_additive "A map to an additive group preserving addition is an additive monoid
homomorphism."]
theorem IsMulHom.to_isMonoidHom [MulOneClass α] [Group β] {f : α → β} (hf : IsMulHom f) :
    IsMonoidHom f
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem dropn_ofSeq (s : Seq α) : ∀ n, drop (ofSeq s) n = ofSeq (s.drop n)
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem ceil_ofNat (n : ℕ) [n.AtLeastTwo] : ⌈(no_index (OfNat.ofNat n : α))⌉ = n
-- Mathlib/Analysis/Convex/EGauge.lean
/-- If `c • x ∈ s`, then `egauge 𝕜 s x` is at most `(‖c‖₊ : ℝ≥0∞)⁻¹.

See also `egauge_le_of_smul_mem_of_ne`. -/
lemma egauge_le_of_smul_mem (h : c • x ∈ s) : egauge 𝕜 s x ≤ (‖c‖₊ : ℝ≥0∞)⁻¹
-- Mathlib/RingTheory/Polynomial/Chebyshev.lean
theorem T_derivative_eq_U (n : ℤ) : derivative (T R n) = n * U R (n - 1)
-- Mathlib/Algebra/Group/AddChar.lean
@[simp] lemma toAddMonoidHomEquiv_apply (ψ : AddChar A M) (a : A) :
    toAddMonoidHomEquiv ψ a = Additive.ofMul (ψ a)
-- Mathlib/Topology/ContinuousOn.lean
@[simp]
theorem continuousWithinAt_update_same [DecidableEq α] {f : α → β} {s : Set α} {x : α} {y : β} :
    ContinuousWithinAt (update f x y) s x ↔ Tendsto f (𝓝[s \ {x}] x) (𝓝 y)