ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Sites/Grothendieck.lean
@[simp]
theorem trivial_eq_bot : trivial C = ⊥
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive le_of_add_le_add_right]
theorem le_of_mul_le_mul_right' [i : ContravariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α}
    (bc : b * a ≤ c * a) :
    b ≤ c
-- Mathlib/Data/Set/Basic.lean
protected theorem disjoint_iff : Disjoint s t ↔ s ∩ t ⊆ ∅
-- Mathlib/Topology/LocallyConstant/Basic.lean
theorem of_constant_on_preconnected_clopens [LocallyConnectedSpace X] {f : X → Y}
    (h : ∀ U : Set X, IsPreconnected U → IsClopen U → ∀ x ∈ U, ∀ y ∈ U, f y = f x) :
    IsLocallyConstant f
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
theorem EuclideanSpace.dist_single_same (i : ι) (a b : 𝕜) :
    dist (EuclideanSpace.single i (a : 𝕜)) (EuclideanSpace.single i (b : 𝕜)) = dist a b
-- Mathlib/Algebra/Divisibility/Units.lean
theorem IsRelPrime.isUnit_of_dvd (H : IsRelPrime x y) (d : x ∣ y) : IsUnit x
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem eval_eq_sum_degreeLTEquiv {n : ℕ} {p : R[X]} (hp : p ∈ degreeLT R n) (x : R) :
    p.eval x = ∑ i, degreeLTEquiv _ _ ⟨p, hp⟩ i * x ^ (i : ℕ)
-- Mathlib/Order/Filter/Lift.lean
theorem le_lift' {f : Filter α} {h : Set α → Set β} {g : Filter β} :
    g ≤ f.lift' h ↔ ∀ s ∈ f, h s ∈ g
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem _root_.Subalgebra.starClosure_eq_adjoin (S : Subalgebra R A) :
    S.starClosure = adjoin R (S : Set A)
-- Mathlib/Data/NNRat/Defs.lean
theorem le_def {p q : ℚ≥0} : p ≤ q ↔ p.num * q.den ≤ q.num * p.den
-- Mathlib/RingTheory/WittVector/Truncated.lean
@[simp]
theorem truncate_mk' (f : ℕ → R) :
    truncate n (@mk' p _ f) = TruncatedWittVector.mk _ fun k => f k
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
/-- `nthRoots n` as a `Finset` is equal to the union of `primitiveRoots i R` for `i ∣ n`
if there is a primitive root of unity in `R`. -/
theorem nthRoots_one_eq_biUnion_primitiveRoots {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) :
    nthRootsFinset n R = (Nat.divisors n).biUnion fun i => primitiveRoots i R
-- Mathlib/Topology/Instances/Nat.lean
@[norm_cast, simp]
theorem dist_cast_real (x y : ℕ) : dist (x : ℝ) y = dist x y
-- Mathlib/Algebra/GCDMonoid/Nat.lean
theorem normalize_of_nonneg {z : ℤ} (h : 0 ≤ z) : normalize z = z
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem sclosure_preimage_le (f : F) (s : Set S) :
    closure ((f : R → S) ⁻¹' s) ≤ (closure s).comap f
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem aleph0_le_beth (o : Ordinal) : ℵ₀ ≤ beth o
-- Mathlib/Data/Multiset/FinsetOps.lean
theorem Subset.ndinter_eq_left {s t : Multiset α} (h : s ⊆ t) : s.ndinter t = s
-- Mathlib/Topology/Algebra/Order/Field.lean
theorem tendsto_zpow_atTop_zero {n : ℤ} (hn : n < 0) :
    Tendsto (fun x : 𝕜 => x ^ n) atTop (𝓝 0)
-- Mathlib/Data/Finsupp/Defs.lean
@[simp]
theorem unique_single_eq_iff [Unique α] {b' : M} : single a b = single a' b' ↔ b = b'
-- Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
theorem eq_lift_of_comp_eq (g : X ⟶ widePullback _ _ arrows) :
    (∀ j : J, g ≫ π arrows j = fs j) → g ≫ base arrows = f → g = lift f fs w
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive]
lemma orbitRel_le_fst :
    orbitRel G (α × β) ≤ (orbitRel G α).comap Prod.fst
-- Mathlib/Order/Partition/Finpartition.lean
lemma part_mem (ha : a ∈ s) : P.part a ∈ P.parts
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
lemma isIntegralCurveAt_comp_add {dt : ℝ} :
    IsIntegralCurveAt γ v t₀ ↔ IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt)
-- Mathlib/Algebra/Order/CompleteField.lean
@[simp]
theorem inducedMap_zero : inducedMap α β 0 = 0
-- Mathlib/Algebra/GeomSum.lean
theorem geom_sum_ne_zero [LinearOrderedRing α] (hx : x ≠ -1) (hn : n ≠ 0) :
    ∑ i ∈ range n, x ^ i ≠ 0
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
theorem closure_singleton_one : closure ({1} : Set M) = ⊥
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem eq_or_ne_mem_of_mem {a b : α} {l : List α} (h' : a ∈ b :: l) : a = b ∨ (a ≠ b ∧ a ∈ l)
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[arith_mult]
theorem mul [CommSemiring R] {f g : ArithmeticFunction R} (hf : f.IsMultiplicative)
    (hg : g.IsMultiplicative) : IsMultiplicative (f * g)
-- Mathlib/Analysis/Normed/Module/FiniteDimension.lean
/-- A family of continuous linear maps is continuous on `s` if all its applications are. -/
theorem continuousOn_clm_apply {X : Type*} [TopologicalSpace X] [FiniteDimensional 𝕜 E]
    {f : X → E →L[𝕜] F} {s : Set X} : ContinuousOn f s ↔ ∀ y, ContinuousOn (fun x => f x y) s
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise scalar multiplication of
`f` and `g`, which monovary together, is strictly decreased by a permutation if and only if
`f` and `g ∘ σ` do not monovary together. Stated by permuting the entries of `g`. -/
theorem Monovary.sum_smul_comp_perm_lt_sum_smul_iff (hfg : Monovary f g) :
    ∑ i, f i • g (σ i) < ∑ i, f i • g i ↔ ¬Monovary f (g ∘ σ)
-- Mathlib/Data/Option/Basic.lean
theorem map_comm {f₁ : α → β} {f₂ : α → γ} {g₁ : β → δ} {g₂ : γ → δ} (h : g₁ ∘ f₁ = g₂ ∘ f₂)
    (a : α) :
    (Option.map f₁ a).map g₁ = (Option.map f₂ a).map g₂
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
theorem measurableSet_of_mem_nhdsWithin_Ioi_aux {s : Set α} (h : ∀ x ∈ s, s ∈ 𝓝[>] x)
    (h' : ∀ x ∈ s, ∃ y, x < y) : MeasurableSet s
-- Mathlib/CategoryTheory/Groupoid.lean
@[simp]
theorem Groupoid.inv_eq_inv (f : X ⟶ Y) : Groupoid.inv f = CategoryTheory.inv f
-- Mathlib/CategoryTheory/Monoidal/Transport.lean
/--
We can upgrade `F` to a monoidal functor from `D` to `E` with the induced structure.
-/
@[simps]
def fromInduced [MonoidalCategoryStruct D] (F : D ⥤ C) [F.Faithful]
    (fData : InducingFunctorData F) :
    letI := induced F fData
    MonoidalFunctor D C
-- Mathlib/Topology/MetricSpace/ProperSpace.lean
/-- A pseudometric space is proper if all closed balls are compact. -/
class ProperSpace (α : Type u) [PseudoMetricSpace α] : Prop where
  isCompact_closedBall : ∀ x : α, ∀ r, IsCompact (closedBall x r)
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem sup'_insert [DecidableEq β] {b : β} :
    (insert b s).sup' (insert_nonempty _ _) f = f b ⊔ s.sup' H f
-- Mathlib/Algebra/Polynomial/Coeff.lean
@[simp]
theorem coeff_smul [SMulZeroClass S R] (r : S) (p : R[X]) (n : ℕ) :
    coeff (r • p) n = r • coeff p n
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive]
theorem aemeasurable_const_smul_iff (c : G) :
    AEMeasurable (fun x => c • f x) μ ↔ AEMeasurable f μ
-- Mathlib/Condensed/Light/Discrete.lean
/--
The discrete condensed object associated to an object of `C` is the constant sheaf at that object.
-/
@[simps!]
noncomputable def LightCondensed.discrete : C ⥤ LightCondensed.{u} C
-- Mathlib/Data/List/Sigma.lean
@[simp]
theorem dlookup_kunion_right {a} {l₁ l₂ : List (Sigma β)} (h : a ∉ l₁.keys) :
    dlookup a (kunion l₁ l₂) = dlookup a l₂
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem LineDifferentiableAt.of_comp {v : E'} (hf : LineDifferentiableAt 𝕜 (f ∘ L) x v) :
    LineDifferentiableAt 𝕜 f (L x) (L v)
-- Mathlib/Order/Hom/Basic.lean
protected theorem acc (a : α) : Acc (· < ·) (f a) → Acc (· < ·) a
-- Mathlib/LinearAlgebra/Span.lean
theorem map_span_le [RingHomSurjective σ₁₂] (f : F) (s : Set M) (N : Submodule R₂ M₂) :
    map f (span R s) ≤ N ↔ ∀ m ∈ s, f m ∈ N
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
theorem IsBilimit.total {f : J → C} {b : Bicone f} (i : b.IsBilimit) :
    ∑ j : J, b.π j ≫ b.ι j = 𝟙 b.pt
-- Mathlib/Order/Chain.lean
/-- The type of flags, aka maximal chains, of an order. -/
structure Flag (α : Type*) [LE α] where
  /-- The `carrier` of a flag is the underlying set. -/
  carrier : Set α
  /-- By definition, a flag is a chain -/
  Chain' : IsChain (· ≤ ·) carrier
  /-- By definition, a flag is a maximal chain -/
  max_chain' : ∀ ⦃s⦄, IsChain (· ≤ ·) s → carrier ⊆ s → carrier = s
-- Mathlib/Topology/Sheaves/SheafCondition/PairwiseIntersections.lean
@[simp]
theorem interUnionPullbackCone_fst :
    (interUnionPullbackCone F U V).fst = F.1.map (homOfLE le_sup_left).op
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem natDegree_sum_le (f : ι → S[X]) :
    natDegree (∑ i ∈ s, f i) ≤ s.fold max 0 (natDegree ∘ f)
-- Mathlib/RingTheory/Regular/RegularSequence.lean
lemma quotOfListConsSMulTopEquivQuotSMulTopInner_naturality (f : M →ₗ[R] M₂) :
    (quotOfListConsSMulTopEquivQuotSMulTopInner M₂ r rs).toLinearMap ∘ₗ
        mapQ _ _ _ (smul_top_le_comap_smul_top (Ideal.ofList (r :: rs)) f) =
      mapQ _ _ _ (smul_top_le_comap_smul_top _ (QuotSMulTop.map r f)) ∘ₗ
        (quotOfListConsSMulTopEquivQuotSMulTopInner M r rs).toLinearMap
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem iSup_ord {ι} {f : ι → Cardinal} (hf : BddAbove (range f)) :
    (iSup f).ord = ⨆ i, (f i).ord
-- Mathlib/NumberTheory/Cyclotomic/PrimitiveRoots.lean
/-- If `Irreducible (cyclotomic (p ^ (k + 1)) K)` (in particular for `K = ℚ`) and `p` is an odd
prime, then the norm of `ζ - 1` is `p`. -/
theorem norm_sub_one_of_prime_ne_two {k : ℕ} (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1)))
    [hpri : Fact (p : ℕ).Prime] [IsCyclotomicExtension {p ^ (k + 1)} K L]
    (hirr : Irreducible (cyclotomic (↑(p ^ (k + 1)) : ℕ) K)) (h : p ≠ 2) : norm K (ζ - 1) = p
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
theorem hasFDerivAt_prod_mk_left (e₀ : E) (f₀ : F) :
    HasFDerivAt (fun e : E => (e, f₀)) (inl 𝕜 E F) e₀
-- Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
@[simp]
theorem evenOdd_map_reverse (n : ZMod 2) :
    (evenOdd Q n).map (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) = evenOdd Q n
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem ext' {g h : M ⊗[R] N →ₗ[R] P} (H : ∀ x y, g (x ⊗ₜ y) = h (x ⊗ₜ y)) : g = h
-- Mathlib/CategoryTheory/Shift/Basic.lean
@[reassoc]
lemma shiftFunctorAdd_assoc_inv_app (a₁ a₂ a₃ : A) (X : C) :
    ((shiftFunctorAdd C a₁ a₂).inv.app X)⟦a₃⟧' ≫
      (shiftFunctorAdd C (a₁ + a₂) a₃).inv.app X =
    (shiftFunctorAdd C a₂ a₃).inv.app (X⟦a₁⟧) ≫
      (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (add_assoc _ _ _).symm).inv.app X
-- Mathlib/Algebra/Order/BigOperators/Group/List.lean
@[to_additive]
lemma single_le_prod [OrderedCommMonoid M] {l : List M} (hl₁ : ∀ x ∈ l, (1 : M) ≤ x) :
    ∀ x ∈ l, x ≤ l.prod
-- Mathlib/Algebra/Group/Submonoid/MulOpposite.lean
@[to_additive]
theorem unop_sInf (S : Set (Submonoid Mᵐᵒᵖ)) : (sInf S).unop = sInf (.op ⁻¹' S)
-- Mathlib/Data/Set/Image.lean
theorem image_preimage_inl_union_image_preimage_inr (s : Set (α ⊕ β)) :
    Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s
-- Mathlib/Data/DFinsupp/Multiset.lean
@[simp]
theorem toDFinsupp_le_toDFinsupp : toDFinsupp s ≤ toDFinsupp t ↔ s ≤ t
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem IsNormal.le_iff_eq {f} (H : IsNormal f) {a} : f a ≤ a ↔ f a = a
-- Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean
theorem zero_le_of_contsAux_b : 0 ≤ ((of v).contsAux n).b
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
/-- Fundamental theorem of calculus for set integrals, `nhdsWithin` version: if `μ` is a locally
finite measure, `f` is continuous on a measurable set `t`, and `a ∈ t`, then `∫ x in (s i), f x ∂μ =
μ (s i) • f a + o(μ (s i))` at `li` provided that `s i` tends to `(𝓝[t] a).smallSets` along `li`.
Since `μ (s i)` is an `ℝ≥0∞` number, we use `(μ (s i)).toReal` in the actual statement.

Often there is a good formula for `(μ (s i)).toReal`, so the formalization can take an optional
argument `m` with this formula and a proof of `(fun i => (μ (s i)).toReal) =ᶠ[li] m`. Without these
arguments, `m i = (μ (s i)).toReal` is used in the output. -/
theorem ContinuousOn.integral_sub_linear_isLittleO_ae [TopologicalSpace X] [OpensMeasurableSpace X]
    [SecondCountableTopologyEither X E] {μ : Measure X}
    [IsLocallyFiniteMeasure μ] {x : X} {t : Set X} {f : X → E} (hft : ContinuousOn f t) (hx : x ∈ t)
    (ht : MeasurableSet t) {s : ι → Set X} {li : Filter ι} (hs : Tendsto s li (𝓝[t] x).smallSets)
    (m : ι → ℝ := fun i => (μ (s i)).toReal)
    (hsμ : (fun i => (μ (s i)).toReal) =ᶠ[li] m := by rfl) :
    (fun i => (∫ x in s i, f x ∂μ) - m i • f x) =o[li] m
-- Mathlib/Topology/Algebra/Order/Archimedean.lean
/-- Let `S` be a nontrivial additive subgroup in an archimedean linear ordered additive commutative
group `G` with order topology. If the set of positive elements of `S` does not have a minimal
element, then `S` is dense `G`. -/
theorem dense_of_no_min (S : AddSubgroup G) (hbot : S ≠ ⊥)
    (H : ¬∃ a : G, IsLeast { g : G | g ∈ S ∧ 0 < g } a) : Dense (S : Set G)
-- Mathlib/Algebra/Homology/Homotopy.lean
/-- homotopy is closed under composition (on the right) -/
@[simps]
def compRight {e f : C ⟶ D} (h : Homotopy e f) (g : D ⟶ E) : Homotopy (e ≫ g) (f ≫ g)
-- Mathlib/Algebra/Module/LinearMap/End.lean
theorem iterate_injective (h : Injective f') : ∀ n : ℕ, Injective (f' ^ n)
-- Mathlib/LinearAlgebra/UnitaryGroup.lean
@[simp] theorem mul_apply : ⇑(A * B) = A.1 * B.1
-- Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
/-- The `v`-adic valuation of `r ∈ R` is less than 1 if and only if `v` divides the ideal `(r)`. -/
theorem intValuation_lt_one_iff_dvd (r : R) :
    v.intValuationDef r < 1 ↔ v.asIdeal ∣ Ideal.span {r}
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem equivTuple_apply {R : Type*} (c₁ c₂ : R) (x : ℍ[R,c₁,c₂]) :
    equivTuple c₁ c₂ x = ![x.re, x.imI, x.imJ, x.imK]
-- Mathlib/RingTheory/Artinian.lean
theorem isArtinian_of_range_eq_ker [IsArtinian R M] [IsArtinian R P] (f : M →ₗ[R] N) (g : N →ₗ[R] P)
    (hf : Function.Injective f) (hg : Function.Surjective g)
    (h : LinearMap.range f = LinearMap.ker g) : IsArtinian R N
-- Mathlib/LinearAlgebra/Matrix/Polynomial.lean
theorem coeff_det_X_add_C_card (A B : Matrix n n α) :
    coeff (det ((X : α[X]) • A.map C + B.map C)) (Fintype.card n) = det A
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem differentiableAt_sin : DifferentiableAt ℝ sin x
-- Mathlib/Data/DFinsupp/Basic.lean
@[to_additive]
theorem _root_.dfinsupp_prod_mem [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid γ] {S : Type*} [SetLike S γ] [SubmonoidClass S γ]
    (s : S) (f : Π₀ i, β i) (g : ∀ i, β i → γ)
    (h : ∀ c, f c ≠ 0 → g c (f c) ∈ s) : f.prod g ∈ s
-- Mathlib/Analysis/Complex/Basic.lean
@[continuity, fun_prop]
theorem continuous_ofReal : Continuous ((↑) : ℝ → ℂ)
-- Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean
theorem isTheta_cpow_rpow (hl_im : IsBoundedUnder (· ≤ ·) l fun x => |(g x).im|)
    (hl : ∀ᶠ x in l, f x = 0 → re (g x) = 0 → g x = 0) :
    (fun x => f x ^ g x) =Θ[l] fun x => abs (f x) ^ (g x).re
-- .lake/packages/batteries/Batteries/Control/ForInStep/Lemmas.lean
@[simp] theorem ForInStep.bindList_cons [Monad m]
    (f : α → β → m (ForInStep β)) (s : ForInStep β) (a l) :
    s.bindList f (a::l) = s.bind fun b => f a b >>= (·.bindList f l)
-- Mathlib/Data/SetLike/Basic.lean
theorem not_le_iff_exists : ¬p ≤ q ↔ ∃ x ∈ p, x ∉ q
-- Mathlib/Data/List/AList.lean
theorem insertRec_insert {C : AList β → Sort*} (H0 : C ∅)
    (IH : ∀ (a : α) (b : β a) (l : AList β), a ∉ l → C l → C (l.insert a b)) {c : Sigma β}
    {l : AList β} (h : c.1 ∉ l) :
    @insertRec α β _ C H0 IH (l.insert c.1 c.2) = IH c.1 c.2 l h (@insertRec α β _ C H0 IH l)
-- Mathlib/Data/Nat/GCD/Basic.lean
theorem Coprime.lcm_eq_mul {m n : ℕ} (h : Coprime m n) : lcm m n = m * n
-- Mathlib/Algebra/Lie/Sl2.lean
lemma pow_toEnd_f_ne_zero_of_eq_nat
    [CharZero R] [NoZeroSMulDivisors R M]
    {n : ℕ} (hn : μ = n) {i} (hi : i ≤ n) : (ψ i) ≠ 0
-- Mathlib/Algebra/Order/AddTorsor.lean
/-- An ordered scalar multiplication is a bi-monotone scalar multiplication. Note that this is
different from `OrderedSMul`, which uses strict inequality, requires `G` to be a semiring, and the
defining conditions are restricted to positive elements of `G`. -/
@[to_additive]
class IsOrderedSMul (G P : Type*) [LE G] [LE P] [SMul G P] : Prop where
  protected smul_le_smul_left : ∀ a b : P, a ≤ b → ∀ c : G, c • a ≤ c • b
  protected smul_le_smul_right : ∀ c d : G, c ≤ d → ∀ a : P, c • a ≤ d • a
-- Mathlib/Topology/Connected/TotallyDisconnected.lean
/-- A preconnected set `s` has the property that every map to a
discrete space that is continuous on `s` is constant on `s` -/
theorem IsPreconnected.constant {Y : Type*} [TopologicalSpace Y] [DiscreteTopology Y] {s : Set α}
    (hs : IsPreconnected s) {f : α → Y} (hf : ContinuousOn f s) {x y : α} (hx : x ∈ s)
    (hy : y ∈ s) : f x = f y
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma mulOption_lt_of_lt (hy : y.Numeric) (ihxy : IH1 x y) (ihyx : IH1 y x) (i j k l)
    (h : x.moveLeft i < x.moveLeft j) :
    (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧
-- Mathlib/Deprecated/Subgroup.lean
/-- `s` is an additive subgroup: a set containing 0 and closed under addition and negation. -/
structure IsAddSubgroup (s : Set A) extends IsAddSubmonoid s : Prop where
  /-- The proposition that `s` is closed under negation. -/
  neg_mem {a} : a ∈ s → -a ∈ s
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
@[measurability]
theorem measurable_mk (h : AEMeasurable f μ) : Measurable (h.mk f)
-- Mathlib/Topology/Homeomorph.lean
theorem image_closure (h : X ≃ₜ Y) (s : Set X) : h '' closure s = closure (h '' s)
-- Mathlib/Control/LawfulFix.lean
/-- `Sigma.uncurry` as a monotone function. -/
@[simps]
def monotoneUncurry [(x y : _) → Preorder <| γ x y] :
    (∀ (a) (b : β a), γ a b) →o ∀ x : Σa, β a, γ x.1 x.2
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem lt_rpow_inv_iff {x y : ℝ≥0} {z : ℝ} (hz : 0 < z) : x < y ^ z⁻¹ ↔ x ^z < y
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
@[simp]
theorem tmul_tensorComm_apply
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (x : M₁ ⊗[R] M₂) :
    Q₂.tmul Q₁ (TensorProduct.comm R M₁ M₂ x) = Q₁.tmul Q₂ x
-- Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean
theorem opensImagePreimageMap_app' (i j k : D.J) (U : Opens (D.U i).carrier) :
    ∃ eq,
      D.opensImagePreimageMap i j U ≫ (D.f j k).c.app _ =
        ((π₁ j, i, k) ≫ D.t j i ≫ D.f i j).c.app (op U) ≫
          (π₂⁻¹ j, i, k) (unop _) ≫ (D.V (j, k)).presheaf.map (eqToHom eq)
-- Mathlib/CategoryTheory/Shift/Basic.lean
lemma shiftFunctorAdd_add_zero_inv_app (a : A) (X : C) : (shiftFunctorAdd C a 0).inv.app X =
    (shiftFunctorZero C A).hom.app (X⟦a⟧) ≫ eqToHom (by dsimp; rw [add_zero])
-- Mathlib/Combinatorics/SetFamily/Shatter.lean
lemma shatters_of_forall_subset (h : ∀ t, t ⊆ s → t ∈ 𝒜) : 𝒜.Shatters s
-- Mathlib/Data/Matrix/Invertible.lean
lemma conjTranspose_invOf [Invertible A] [Invertible Aᴴ] : (⅟A)ᴴ = ⅟(Aᴴ)
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
theorem coequalizer.cofork_ι_app_one : (coequalizer.cofork f g).ι.app one = coequalizer.π f g
-- Mathlib/Data/Matrix/Basic.lean
protected theorem sub_mul (M M' : Matrix m n α) (N : Matrix n o α) :
    (M - M') * N = M * N - M' * N
-- Mathlib/Algebra/Order/Pointwise.lean
@[to_additive]
theorem csInf_mul (hs₀ : s.Nonempty) (hs₁ : BddBelow s) (ht₀ : t.Nonempty) (ht₁ : BddBelow t) :
    sInf (s * t) = sInf s * sInf t
-- Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
lemma differentiable_fourierChar_neg_bilinear_left (w : W) :
    Differentiable ℝ (fun v ↦ (𝐞 (-L v w) : ℂ))
-- Mathlib/Probability/ProbabilityMassFunction/Monad.lean
@[simp]
theorem bind_apply (b : β) : p.bind f b = ∑' a, p a * f a b
-- Mathlib/Topology/Semicontinuous.lean
theorem Continuous.comp_lowerSemicontinuous {g : γ → δ} {f : α → γ} (hg : Continuous g)
    (hf : LowerSemicontinuous f) (gmon : Monotone g) : LowerSemicontinuous (g ∘ f)
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem smoothAt_finset_prod' (h : ∀ i ∈ t, SmoothAt I' I (f i) x) :
    SmoothAt I' I (∏ i ∈ t, f i) x
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_add {x : ℝ≥0} (hx : x ≠ 0) (y z : ℝ) : x ^ (y + z) = x ^ y * x ^ z
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
@[simp]
protected lemma mem_gen {f g : α →ᵤ β} {V : Set (β × β)} :
    (f, g) ∈ UniformFun.gen α β V ↔ ∀ x, (toFun f x, toFun g x) ∈ V
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
@[ext]
theorem limit.hom_ext {F : J ⥤ C} [HasLimit F] {X : C} {f f' : X ⟶ limit F}
    (w : ∀ j, f ≫ limit.π F j = f' ≫ limit.π F j) : f = f'
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem mul_lt_of_le_one_of_lt' [PosMulStrictMono α] [MulPosMono α] (ha : a ≤ 1) (bc : b < c)
    (a0 : 0 < a) (c0 : 0 ≤ c) : a * b < c
-- Mathlib/Analysis/Convex/Combination.lean
/-- The convex hull of a finite set is the image of the standard simplex in `s → ℝ`
under the linear map sending each function `w` to `∑ x ∈ s, w x • x`.

Since we have no sums over finite sets, we use sum over `@Finset.univ _ hs.fintype`.
The map is defined in terms of operations on `(s → ℝ) →ₗ[ℝ] ℝ` so that later we will not need
to prove that this map is linear. -/
theorem Set.Finite.convexHull_eq_image {s : Set E} (hs : s.Finite) : convexHull R s =
    haveI := hs.fintype
    (⇑(∑ x : s, (@LinearMap.proj R s _ (fun _ => R) _ _ x).smulRight x.1)) '' stdSimplex R s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem sign_eq_zero_iff {θ : Angle} : θ.sign = 0 ↔ θ = 0 ∨ θ = π
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt8.toNat_modn (x : UInt8) (n) : (x.modn n).toNat = x.toNat % n
-- Mathlib/Algebra/Homology/Homotopy.lean
@[simp]
theorem prevD_eq_toPrev_dTo (f : ∀ i j, C.X i ⟶ D.X j) (j : ι) :
    prevD j f = toPrev j f ≫ D.dTo j
-- Mathlib/Order/OrdContinuous.lean
theorem map_sInf (hf : RightOrdContinuous f) (s : Set α) : f (sInf s) = ⨅ x ∈ s, f x
-- Mathlib/Topology/PartialHomeomorph.lean
theorem nhds_eq_comap_inf_principal {x} (hx : x ∈ e.source) :
    𝓝 x = comap e (𝓝 (e x)) ⊓ 𝓟 e.source
-- Mathlib/Algebra/Polynomial/Reverse.lean
theorem reverse_natDegree_le (f : R[X]) : f.reverse.natDegree ≤ f.natDegree
-- Mathlib/Data/Matroid/Dual.lean
@[simp] theorem dual_coindep_iff : M✶.Coindep X ↔ M.Indep X
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem nonempty_embedding_to_cardinal : Nonempty (σ ↪ Cardinal.{u})
-- Mathlib/LinearAlgebra/PerfectPairing.lean
theorem toDualRight_symm_toDualLeft (x : M) :
    p.toDualRight.symm.dualMap (p.toDualLeft x) = Dual.eval R M x
-- Mathlib/Topology/Compactness/Compact.lean
theorem Set.Finite.isCompact_sUnion {S : Set (Set X)} (hf : S.Finite) (hc : ∀ s ∈ S, IsCompact s) :
    IsCompact (⋃₀ S)
-- Mathlib/Algebra/Module/Defs.lean
/-- `nsmul` is equal to any other module structure via a cast. -/
@[deprecated Nat.cast_smul_eq_nsmul (since := "2024-07-23")]
lemma nsmul_eq_smul_cast (n : ℕ) (b : M) : n • b = (n : R) • b
-- Mathlib/Data/Set/Function.lean
theorem mapsTo_univ (f : α → β) (s : Set α) : MapsTo f s univ
-- Mathlib/Algebra/Lie/Weights/Basic.lean
theorem mem_weightSpaceOf (χ : R) (x : L) (m : M) :
    m ∈ weightSpaceOf M χ x ↔ ∃ k : ℕ, ((toEnd R L M x - χ • ↑1) ^ k) m = 0
-- Mathlib/Data/Set/Function.lean
lemma SurjOn.comp_left (hf : SurjOn f s t) (g : β → γ) : SurjOn (g ∘ f) s (g '' t)
-- Mathlib/RingTheory/ClassGroup.lean
/-- The class number is `1` iff the ring of integers is a principal ideal domain. -/
theorem card_classGroup_eq_one_iff [IsDedekindDomain R] [Fintype (ClassGroup R)] :
    Fintype.card (ClassGroup R) = 1 ↔ IsPrincipalIdealRing R
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem mul_mono_left (h : I ≤ J) : I * K ≤ J * K
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem isPreconnected_uIcc : IsPreconnected (uIcc a b)
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Grading.lean
theorem GradedAlgebra.ι_apply (m : M) :
    GradedAlgebra.ι R M m =
      DirectSum.of (fun i : ℕ => ⋀[R]^i M) 1
        ⟨ι R m, by simpa only [pow_one] using LinearMap.mem_range_self _ m⟩
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem head!_le_of_lt [Inhabited I] {q l : Products I} (h : q < l) (hq : q.val ≠ []) :
    q.val.head! ≤ l.val.head!
-- Mathlib/Data/Set/Pointwise/BigOperators.lean
/-- An n-ary version of `Set.mul_mem_mul`. -/
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
    (t.map g).prod ∈ (t.map f).prod
-- Mathlib/Data/Nat/Nth.lean
theorem nth_injOn (hf : (setOf p).Finite) : (Set.Iio hf.toFinset.card).InjOn (nth p)