ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Ring/Subsemiring/Pointwise.lean
theorem pointwise_smul_subset_iff {a : M} {S T : Subsemiring R} : a • S ≤ T ↔ S ≤ a⁻¹ • T
-- Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
@[reassoc, simp]
theorem braiding_tensorUnit_right (X : C) : (β_ X (𝟙_ C)).hom = (ρ_ X).hom ≫ (λ_ X).inv
-- Mathlib/Data/Set/Basic.lean
theorem compl_subset_iff_union {s t : Set α} : sᶜ ⊆ t ↔ s ∪ t = univ
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem coe_to_submodule_eq_iff (L₁' L₂' : LieSubalgebra R L) :
    (L₁' : Submodule R L) = (L₂' : Submodule R L) ↔ L₁' = L₂'
-- Mathlib/Order/Lattice.lean
@[simp]
theorem inf_eq_right : a ⊓ b = b ↔ b ≤ a
-- Mathlib/Algebra/Order/Group/Abs.lean
theorem abs_add' (a b : α) : |a| ≤ |b| + |b + a|
-- Mathlib/Data/Set/Lattice.lean
theorem sUnion_subset {S : Set (Set α)} {t : Set α} (h : ∀ t' ∈ S, t' ⊆ t) : ⋃₀S ⊆ t
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Icc_subset_uIcc : Icc a b ⊆ [[a, b]]
-- Mathlib/ModelTheory/Definability.lean
@[simp, norm_cast]
theorem coe_bot : ((⊥ : L.DefinableSet A α) : Set (α → M)) = ∅
-- Mathlib/CategoryTheory/Adhesive.lean
theorem adhesive_of_preserves_and_reflects (F : C ⥤ D) [Adhesive D]
    [H₁ : ∀ {X Y S : C} (f : X ⟶ S) (g : Y ⟶ S) [Mono f], HasPullback f g]
    [H₂ : ∀ {X Y S : C} (f : S ⟶ X) (g : S ⟶ Y) [Mono f], HasPushout f g]
    [PreservesLimitsOfShape WalkingCospan F]
    [ReflectsLimitsOfShape WalkingCospan F]
    [PreservesColimitsOfShape WalkingSpan F]
    [ReflectsColimitsOfShape WalkingSpan F] :
    Adhesive C
-- Mathlib/Order/Filter/Bases.lean
theorem inf_neBot_iff :
    NeBot (l ⊓ l') ↔ ∀ ⦃s : Set α⦄, s ∈ l → ∀ ⦃s'⦄, s' ∈ l' → (s ∩ s').Nonempty
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem nadd_assoc (a b c) : a ♯ b ♯ c = a ♯ (b ♯ c)
-- Mathlib/Logic/Basic.lean
theorem ite_eq_iff : ite P a b = c ↔ P ∧ a = c ∨ ¬P ∧ b = c
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma negAddY_neg {P : Fin 3 → R} (hP : W'.Equation P) :
    W'.negAddY P (W'.neg P) = W'.dblZ P ^ 3
-- Mathlib/Data/Set/Function.lean
theorem image_restrictPreimage :
    t.restrictPreimage f '' (Subtype.val ⁻¹' s) = Subtype.val ⁻¹' (f '' s)
-- Mathlib/MeasureTheory/Measure/OpenPos.lean
theorem _root_.IsOpen.measure_pos_iff (hU : IsOpen U) : 0 < μ U ↔ U.Nonempty
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma IsOpen.exterior_subset (ht : IsOpen t) : exterior s ⊆ t ↔ s ⊆ t
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem dual_comp (g : BotHom β γ) (f : BotHom α β) :
    BotHom.dual (g.comp f) = g.dual.comp (BotHom.dual f)
-- Mathlib/Analysis/Complex/Polynomial/Basic.lean
lemma Polynomial.mul_star_dvd_of_aeval_eq_zero_im_ne_zero (p : ℝ[X]) {z : ℂ} (h0 : aeval z p = 0)
    (hz : z.im ≠ 0) : (X - C ((starRingEnd ℂ) z)) * (X - C z) ∣ map (algebraMap ℝ ℂ) p
-- Mathlib/Probability/Kernel/Disintegration/StandardBorel.lean
lemma borelMarkovFromReal_apply (Ω : Type*) [Nonempty Ω] [MeasurableSpace Ω] [StandardBorelSpace Ω]
    (η : Kernel α ℝ) (a : α) :
    borelMarkovFromReal Ω η a
      = if η a (range (embeddingReal Ω))ᶜ = 0 then (η a).comap (embeddingReal Ω)
        else (Measure.dirac (range_nonempty (embeddingReal Ω)).choose).comap (embeddingReal Ω)
-- Mathlib/Topology/Sets/Closeds.lean
theorem Opens.compl_bijective : Function.Bijective (@Opens.compl α _)
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp]
theorem ofEq_rfl : ofEq S₁ S₁ rfl = AffineEquiv.refl k S₁
-- Mathlib/CategoryTheory/EssentiallySmall.lean
theorem locallySmall_congr {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (e : C ≌ D) : LocallySmall.{w} C ↔ LocallySmall.{w} D
-- Mathlib/Data/Fintype/Basic.lean
theorem Fintype.univ_pempty : @univ PEmpty _ = ∅
-- Mathlib/AlgebraicTopology/SimplicialSet.lean
/-- The edge of `Λ[n, i]` with endpoints `j` and `j+1`.

This constructor assumes `0 < i < n`,
which is the type of horn that occurs in the horn-filling condition of quasicategories. -/
@[simps!]
def primitiveEdge {n : ℕ} {i : Fin (n+1)}
    (h₀ : 0 < i) (hₙ : i < Fin.last n) (j : Fin n) :
    Λ[n, i] _[1]
-- Mathlib/Data/Complex/Basic.lean
@[simp, norm_cast]
lemma ofReal_qsmul (q : ℚ) (r : ℝ) : ofReal' (q • r) = q • r
-- Mathlib/Order/Interval/Set/Pi.lean
/-- If `x`, `y`, `z` are functions `Π i : ι, α i`, then
the set difference between the box `[x, z]` and the product of the intervals `(y i, z i]`
is covered by the union of the boxes `[x, update z i (y i)]`.

E.g., if `x = y`, then this lemma states that the difference between a closed box
`[x, y]` and the product of half-open intervals `{z | ∀ i, x i < z i ≤ y i}` is covered by the union
of the faces of `[x, y]` adjacent to `x`. -/
theorem Icc_diff_pi_univ_Ioc_subset (x y z : ∀ i, α i) :
    (Icc x z \ pi univ fun i ↦ Ioc (y i) (z i)) ⊆ ⋃ i : ι, Icc x (update z i (y i))
-- Mathlib/CategoryTheory/GradedObject/Trifunctor.lean
@[reassoc (attr := simp)]
lemma ι_mapTrifunctorMapMap {X₁ Y₁ : GradedObject I₁ C₁} (f₁ : X₁ ⟶ Y₁)
    {X₂ Y₂ : GradedObject I₂ C₂} (f₂ : X₂ ⟶ Y₂)
    {X₃ Y₃ : GradedObject I₃ C₃} (f₃ : X₃ ⟶ Y₃)
    [HasMap ((((mapTrifunctor F I₁ I₂ I₃).obj X₁).obj X₂).obj X₃) p]
    [HasMap ((((mapTrifunctor F I₁ I₂ I₃).obj Y₁).obj Y₂).obj Y₃) p]
    (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J) (h : p ⟨i₁, i₂, i₃⟩ = j) :
  ιMapTrifunctorMapObj F p X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ mapTrifunctorMapMap F p f₁ f₂ f₃ j =
    ((F.map (f₁ i₁)).app (X₂ i₂)).app (X₃ i₃) ≫
      ((F.obj (Y₁ i₁)).map (f₂ i₂)).app (X₃ i₃) ≫
      ((F.obj (Y₁ i₁)).obj (Y₂ i₂)).map (f₃ i₃) ≫
      ιMapTrifunctorMapObj F p Y₁ Y₂ Y₃ i₁ i₂ i₃ j h
-- Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean
theorem convexOn_rpow {p : ℝ} (hp : 1 ≤ p) : ConvexOn ℝ (Ici 0) fun x : ℝ ↦ x ^ p
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- If the second of three points is strictly between the other two, the angle at the first point
(reversed) is zero. -/
theorem _root_.Sbtw.angle₃₁₂_eq_zero {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∠ p₃ p₁ p₂ = 0
-- Mathlib/Topology/Basic.lean
theorem ContinuousAt.congr {g : X → Y} (hf : ContinuousAt f x) (h : f =ᶠ[𝓝 x] g) :
    ContinuousAt g x
-- Mathlib/Data/Real/Sqrt.lean
@[simp] theorem sqrt_pos : 0 < sqrt x ↔ 0 < x
-- Mathlib/Order/InitialSeg.lean
@[simp]
theorem trans_top [IsTrans γ t] (f : r ≺i s) (g : s ≺i t) : (f.trans g).top = g f.top
-- Mathlib/LinearAlgebra/Eigenspace/Basic.lean
lemma iSup_genEigenspace_le_smul (f : Module.End R M) (μ t : R) :
    (⨆ k, f.genEigenspace μ k) ≤ ⨆ k, (t • f).genEigenspace (t * μ) k
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem le_ofWithBot {boxes : Finset (WithBot (Box ι))}
    {le_of_mem : ∀ J ∈ boxes, (J : WithBot (Box ι)) ≤ I}
    {pairwise_disjoint : Set.Pairwise (boxes : Set (WithBot (Box ι))) Disjoint}
    (H : ∀ J ∈ π, ∃ J' ∈ boxes, ↑J ≤ J') : π ≤ ofWithBot boxes le_of_mem pairwise_disjoint
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval₂_finset_sum (s : Finset ι) (g : ι → R[X]) (x : S) :
    (∑ i ∈ s, g i).eval₂ f x = ∑ i ∈ s, (g i).eval₂ f x
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLog.lean
@[simp] lemma log_top : log ⊤ = ⊤
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToSimpleFunc_sub (T : Set α → E →L[ℝ] F) (h_add : FinMeasAdditive μ T) {f g : α →ₛ E}
    (hf : Integrable f μ) (hg : Integrable g μ) :
    setToSimpleFunc T (f - g) = setToSimpleFunc T f - setToSimpleFunc T g
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
theorem Filter.Tendsto.midpoint [Invertible (2 : R)] {l : Filter α} {f₁ f₂ : α → P} {p₁ p₂ : P}
    (h₁ : Tendsto f₁ l (𝓝 p₁)) (h₂ : Tendsto f₂ l (𝓝 p₂)) :
    Tendsto (fun x => midpoint R (f₁ x) (f₂ x)) l (𝓝 <| midpoint R p₁ p₂)
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- This core description of a uniform space is outside of the type class hierarchy. It is useful
  for constructions of uniform spaces, when the topology is derived from the uniform space. -/
structure UniformSpace.Core (α : Type u) where
  /-- The uniformity filter. Once `UniformSpace` is defined, `𝓤 α` (`_root_.uniformity`) becomes the
  normal form. -/
  uniformity : Filter (α × α)
  /-- Every set in the uniformity filter includes the diagonal. -/
  refl : 𝓟 idRel ≤ uniformity
  /-- If `s ∈ uniformity`, then `Prod.swap ⁻¹' s ∈ uniformity`. -/
  symm : Tendsto Prod.swap uniformity uniformity
  /-- For every set `u ∈ uniformity`, there exists `v ∈ uniformity` such that `v ○ v ⊆ u`. -/
  comp : (uniformity.lift' fun s => s ○ s) ≤ uniformity
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem Finite.infsep_pos_iff_nontrivial (hs : s.Finite) : 0 < s.infsep ↔ s.Nontrivial
-- Mathlib/CategoryTheory/Limits/Shapes/FunctorToTypes.lean
/-- Given natural transformations `F₁ ⟶ F` and `F₂ ⟶ F`, construct
a natural transformation `coprod F₁ F₂ ⟶ F`. -/
@[simps]
def coprod.desc {F₁ F₂ : C ⥤ Type w} (τ₁ : F₁ ⟶ F) (τ₂ : F₂ ⟶ F) :
    coprod F₁ F₂ ⟶ F
-- Mathlib/Data/Nat/Defs.lean
lemma pred_le_iff : pred m ≤ n ↔ m ≤ succ n
-- Mathlib/Topology/MetricSpace/Lipschitz.lean
theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r
-- Mathlib/SetTheory/Ordinal/Exponential.lean
theorem opow_mul_add_lt_opow_mul_succ {b u w : Ordinal} (v : Ordinal) (hw : w < b ^ u) :
    b ^ u * v + w < b ^ u * succ v
-- Mathlib/Order/Interval/Set/Image.lean
@[simp] lemma preimage_subtype_val_Ioo (a b : {x // p x}) : (↑) ⁻¹' (Ioo a.1 b) = Ioo a b
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive (attr := simp)]
theorem prod_toList (s : Multiset α) : s.toList.prod = s.prod
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem ofAdd_multiset_prod (s : Multiset α) : ofAdd s.sum = (s.map ofAdd).prod
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
theorem Submodule.finrank_le_finrank_of_le {s t : Submodule R M} [Module.Finite R t] (hst : s ≤ t) :
    finrank R s ≤ finrank R t
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
/-- If `f` and `g` are isomorphic arrows, then a mono factorisation of `f` that is an image
gives a mono factorisation of `g` that is an image -/
@[simps]
def ofArrowIso {f g : Arrow C} {F : MonoFactorisation f.hom} (hF : IsImage F) (sq : f ⟶ g)
    [IsIso sq] : IsImage (F.ofArrowIso sq)
-- Mathlib/Data/Multiset/Basic.lean
theorem countP_le_card (s) : countP p s ≤ card s
-- Mathlib/RingTheory/Localization/Finiteness.lean
/--
To check that the kernel of a ring homomorphism is finitely generated,
it suffices to check this after localizing at a spanning set of the source.
-/
lemma RingHom.ker_fg_of_localizationSpan (t : Set R) (ht : Ideal.span t = ⊤)
    (H : ∀ g : t, (RingHom.ker (Localization.awayMap f g.val)).FG) :
    (RingHom.ker f).FG
-- Mathlib/Algebra/MvPolynomial/Variables.lean
theorem vars_add_of_disjoint [DecidableEq σ] (h : Disjoint p.vars q.vars) :
    (p + q).vars = p.vars ∪ q.vars
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Icc_prod_eq (a b : α × β) : Icc a b = Icc a.1 b.1 ×ˢ Icc a.2 b.2
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem eq_iff_sign_eq_and_abs_toReal_eq {θ ψ : Angle} :
    θ = ψ ↔ θ.sign = ψ.sign ∧ |θ.toReal| = |ψ.toReal|
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[simp]
theorem sub_bot : s - ⊥ = ⊥
-- Mathlib/ModelTheory/Substructures.lean
theorem range_comp (f : M →[L] N) (g : N →[L] P) : range (g.comp f : M →[L] P) = map g (range f)
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
/-- Helper function for constructing morphisms between wide equalizer tridents.
-/
@[simps]
def Trident.mkHom [Nonempty J] {s t : Trident f} (k : s.pt ⟶ t.pt)
    (w : k ≫ t.ι = s.ι := by aesop_cat) : s ⟶ t
-- Mathlib/Order/MinMax.lean
theorem min_commutative : Commutative (min : α → α → α)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem le_mul_of_le_of_one_le' [PosMulMono α] [MulPosMono α] (bc : b ≤ c) (ha : 1 ≤ a)
    (a0 : 0 ≤ a) (b0 : 0 ≤ b) : b ≤ c * a
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
theorem cyclotomic.eval_apply {R S : Type*} (q : R) (n : ℕ) [Ring R] [Ring S] (f : R →+* S) :
    eval (f q) (cyclotomic n S) = f (eval q (cyclotomic n R))
-- Mathlib/Analysis/Normed/Algebra/Spectrum.lean
lemma coe_mem_spectrum_real_of_nonneg [Algebra ℝ A] [NonnegSpectrumClass ℝ A] {a : A} {x : ℝ≥0}
    (ha : 0 ≤ a := by cfc_tac) :
    (x : ℝ) ∈ spectrum ℝ a ↔ x ∈ spectrum ℝ≥0 a
-- Mathlib/Data/Nat/MaxPowDiv.lean
theorem pow_dvd (p n : ℕ) : p ^ (p.maxPowDiv n) ∣ n
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_one : cfc (1 : R → R) a = 1
-- Mathlib/RingTheory/Nullstellensatz.lean
@[simp]
theorem mem_zeroLocus_iff {I : Ideal (MvPolynomial σ k)} {x : σ → k} :
    x ∈ zeroLocus I ↔ ∀ p ∈ I, eval x p = 0
-- Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean
lemma mem_bot {x : R} : x ∈ (⊥ : TwoSidedIdeal R) ↔ x = 0
-- Mathlib/Topology/Category/LightProfinite/AsLimit.lean
lemma proj_comp_transitionMap (n : ℕ) :
    S.proj (n + 1) ≫ S.diagram.map ⟨homOfLE (Nat.le_succ _)⟩ = S.proj n
-- Mathlib/CategoryTheory/Category/KleisliCat.lean
@[simp]
theorem KleisliCat.id_def {m} [Monad m] (α : KleisliCat m) : 𝟙 α = @pure m _ α
-- Mathlib/Topology/UniformSpace/Completion.lean
private theorem comp_gen : (((𝓤 α).lift' gen).lift' fun s => compRel s s) ≤ (𝓤 α).lift' gen
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive const_add]
theorem StrictAnti.const_mul' (hf : StrictAnti f) (c : α) : StrictAnti fun x => c * f x
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
/-- Application of a `ContinuousMultilinearMap` to a constant commutes with `fderivWithin`. -/
theorem fderivWithin_continuousMultilinear_apply_const_apply (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hc : DifferentiableWithinAt 𝕜 c s x) (u : ∀ i, M i) (m : E) :
    (fderivWithin 𝕜 (fun y ↦ (c y) u) s x) m = (fderivWithin 𝕜 c s x) m u
-- Mathlib/Data/Real/EReal.lean
lemma inv_nonneg_of_nonneg {a : EReal} (h : 0 ≤ a) : 0 ≤ a⁻¹
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem foldr (f) (init : α) : ∀ {s}, ValidFor l m r s → s.foldr f init = m.foldr f init
-- Mathlib/Data/Nat/Factors.lean
theorem prime_of_mem_primeFactorsList {n : ℕ} : ∀ {p : ℕ}, p ∈ primeFactorsList n → Prime p
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
@[reassoc (attr := simp)]
theorem isoIsPullback_inv_fst (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) :
    (h.isoIsPullback h').inv ≫ fst = fst'
-- Mathlib/Topology/Clopen.lean
theorem isClopen_iUnion_of_finite [Finite Y] {s : Y → Set X} (h : ∀ i, IsClopen (s i)) :
    IsClopen (⋃ i, s i)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem two_nsmul_coe_div_two (θ : ℝ) : (2 : ℕ) • (↑(θ / 2) : Angle) = θ
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem extChartAt_to_inv (x : M) : (extChartAt I x).symm ((extChartAt I x) x) = x
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
@[simp]
theorem mem_neighborFinset (w : V) : w ∈ G.neighborFinset v ↔ G.Adj v w
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[mono]
theorem map_mono {f : α → β} (h : μ ≤ ν) (hf : Measurable f) : μ.map f ≤ ν.map f
-- Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
/-- The map on stalks induced by the unit commutes with maps from `Γ(X)` to
    stalks (in `Spec Γ(X)` and in `X`). -/
theorem toStalk_stalkMap_toΓSpec (x : X) :
    toStalk _ _ ≫ X.toΓSpecSheafedSpace.stalkMap x = X.presheaf.Γgerm x
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
/-- The set in `enumOrd_def` is nonempty. -/
theorem enumOrd_def_nonempty (hS : Unbounded (· < ·) S) {o} :
    { x | x ∈ S ∧ ∀ c, c < o → enumOrd S c < x }.Nonempty
-- Mathlib/Algebra/PUnitInstances/Algebra.lean
@[to_additive]
theorem mul_eq {x y : PUnit} : x * y = unit
-- Mathlib/Data/List/Forall2.lean
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
-- Mathlib/Algebra/Module/FinitePresentation.lean
lemma Module.finitePresentation_iff_finite [IsNoetherianRing R] :
    Module.FinitePresentation R M ↔ Module.Finite R M
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem inr_neg [SubNegZeroMonoid R] [Neg M] (m : M) : (inr (-m) : tsze R M) = -inr m
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem and_rotate : a ∧ b ∧ c ↔ b ∧ c ∧ a
-- Mathlib/Data/Finset/Powerset.lean
theorem powersetCard_succ_insert [DecidableEq α] {x : α} {s : Finset α} (h : x ∉ s) (n : ℕ) :
    powersetCard n.succ (insert x s) =
    powersetCard n.succ s ∪ (powersetCard n s).image (insert x)
-- Mathlib/LinearAlgebra/Prod.lean
/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains.

See note [bundled maps over different rings] for why separate `R` and `S` semirings are used. -/
@[simps]
def prodEquiv [Module S M₂] [Module S M₃] [SMulCommClass R S M₂] [SMulCommClass R S M₃] :
    ((M →ₗ[R] M₂) × (M →ₗ[R] M₃)) ≃ₗ[S] M →ₗ[R] M₂ × M₃
-- Mathlib/Data/Finset/Card.lean
theorem List.toFinset_card_of_nodup {l : List α} (h : l.Nodup) : l.toFinset.card = l.length
-- Mathlib/Topology/Algebra/Constructions/DomMulAct.lean
@[to_additive] theorem closedEmbedding_mk : ClosedEmbedding (@mk M)
-- Mathlib/Algebra/Tropical/Basic.lean
theorem trop_mul_def [Add R] (x y : Tropical R) : x * y = trop (untrop x + untrop y)
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The minimal distance to a set `s` is `< r` iff there exists a point in `s` at distance `< r`. -/
theorem infDist_lt_iff {r : ℝ} (hs : s.Nonempty) : infDist x s < r ↔ ∃ y ∈ s, dist x y < r
-- Mathlib/MeasureTheory/Function/L2Space.lean
theorem _root_.integral_eq_zero_of_forall_integral_inner_eq_zero (f : α → E) (hf : Integrable f μ)
    (hf_int : ∀ c : E, ∫ x, ⟪c, f x⟫ ∂μ = 0) : ∫ x, f x ∂μ = 0
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem apply_symm_apply (f : M ≃[L] N) (a : N) : f (f.symm a) = a
-- Mathlib/MeasureTheory/Group/MeasurableEquiv.lean
@[to_additive (attr := simp)]
theorem toEquiv_mulRight (g : G) : (mulRight g).toEquiv = Equiv.mulRight g
-- Mathlib/RingTheory/Polynomial/Basic.lean
@[simp]
theorem coeff_toSubring {n : ℕ} : ↑(coeff (toSubring p T hp) n) = coeff p n
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem coeff_one_zero : coeff (1 : R[X]) 0 = 1
-- Mathlib/Algebra/Order/Interval/Set/Group.lean
theorem pairwise_disjoint_Ioc_add_intCast :
    Pairwise (Disjoint on fun n : ℤ => Ioc (a + n) (a + n + 1))
-- Mathlib/Order/CompleteBooleanAlgebra.lean
lemma sup_iInf_eq (a : α) (f : ι → α) : (a ⊔ ⨅ i, f i) = ⨅ i, a ⊔ f i
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem ball_prod_same [PseudoEMetricSpace β] (x : α) (y : β) (r : ℝ≥0∞) :
    ball x r ×ˢ ball y r = ball (x, y) r
-- Mathlib/Algebra/Lie/Weights/Basic.lean
@[ext] lemma ext {χ₁ χ₂ : Weight R L M} (h : ∀ x, χ₁ x = χ₂ x) : χ₁ = χ₂
-- Mathlib/Algebra/Group/Units/Hom.lean
@[to_additive (attr := simp)]
theorem coe_map (f : M →* N) (x : Mˣ) : ↑(map f x) = f x
-- Mathlib/Data/Quot.lean
/-- A version of `Quotient.inductionOn₂` taking `{s₁ : Setoid α} {s₂ : Setoid β}` as implicit
arguments instead of instance arguments. -/
@[elab_as_elim]
protected theorem inductionOn₂' {p : Quotient s₁ → Quotient s₂ → Prop} (q₁ : Quotient s₁)
    (q₂ : Quotient s₂)
    (h : ∀ a₁ a₂, p (Quotient.mk'' a₁) (Quotient.mk'' a₂)) : p q₁ q₂
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem div_mul_cancel {a b : Int} (H : b ∣ a) : a.div b * b = a
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
@[simp]
theorem homOfCocone_cooneOfHom {Y : C} (f : X ⟶ Y) : homOfCocone h (coconeOfHom h f) = f
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
theorem rootsOfUnity.coe_injective {n : ℕ+} :
    Function.Injective (fun x : rootsOfUnity n M ↦ x.val.val)
-- Mathlib/Geometry/Manifold/AnalyticManifold.lean
/-- The composition of a partial homeomorphism from `H` to `M` and its inverse belongs to
the analytic groupoid. -/
theorem symm_trans_mem_analyticGroupoid (e : PartialHomeomorph M H) :
    e.symm.trans e ∈ analyticGroupoid I
-- Mathlib/CategoryTheory/MorphismProperty/Composition.lean
lemma of_unop (W : MorphismProperty Cᵒᵖ) [W.unop.ContainsIdentities] :
    W.ContainsIdentities
-- Mathlib/Topology/Order/Lattice.lean
lemma Continuous.finset_inf'_apply (hne : s.Nonempty) (hs : ∀ i ∈ s, Continuous (f i)) :
    Continuous (fun a ↦ s.inf' hne (f · a))
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
lemma le_centralizer_centralizer {s : Subalgebra R A} :
    s ≤ centralizer R (centralizer R (s : Set A))
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem tan_eq_inv_of_two_zsmul_add_two_zsmul_eq_pi {θ ψ : Angle}
    (h : (2 : ℤ) • θ + (2 : ℤ) • ψ = π) : tan ψ = (tan θ)⁻¹
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
/-- If `u` is a family of uniform structures on `γ`, then
`𝒰(α, γ, (⨅ i, u i)) = ⨅ i, 𝒰(α, γ, u i)`. -/
protected theorem iInf_eq {u : ι → UniformSpace γ} : 𝒰(α, γ, (⨅ i, u i)) = ⨅ i, 𝒰(α, γ, u i)
-- Mathlib/Data/Int/ConditionallyCompleteOrder.lean
theorem csSup_of_not_bdd_above {s : Set ℤ} (h : ¬BddAbove s) : sSup s = 0
-- Mathlib/Data/ZMod/Basic.lean
theorem cast_zmod_eq_zero_iff_of_le {m n : ℕ} [NeZero m] (h : m ≤ n) (a : ZMod m) :
    (cast a : ZMod n) = 0 ↔ a = 0
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- **Markov's inequality** also known as **Chebyshev's first inequality**. For a version assuming
`AEMeasurable`, see `mul_meas_ge_le_lintegral₀`. -/
theorem mul_meas_ge_le_lintegral {f : α → ℝ≥0∞} (hf : Measurable f) (ε : ℝ≥0∞) :
    ε * μ { x | ε ≤ f x } ≤ ∫⁻ a, f a ∂μ
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
lemma mul_div_cancel_of_imp (h : b = 0 → a = 0) : a * b / b = a
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem image_const_sub_Ioo : (fun x => a - x) '' Ioo b c = Ioo (a - c) (a - b)
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
/-- Given `c = lineMap a b r`, `c < b`, the point `(c, f c)` is non-strictly below the
segment `[(a, f a), (b, f b)]` if and only if `slope f a b ≤ slope f c b`. -/
theorem map_le_lineMap_iff_slope_le_slope_right (h : 0 < (1 - r) * (b - a)) :
    f c ≤ lineMap (f a) (f b) r ↔ slope f a b ≤ slope f c b
-- Mathlib/Order/Synonym.lean
@[simp]
theorem ofDual_le_ofDual [LE α] {a b : αᵒᵈ} : ofDual a ≤ ofDual b ↔ b ≤ a
-- Mathlib/Topology/Algebra/InfiniteSum/Order.lean
@[to_additive]
theorem tprod_le_of_prod_range_le (hf : Multipliable f) (h : ∀ n, ∏ i ∈ range n, f i ≤ c) :
    ∏' n, f n ≤ c
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
theorem map_id : map id = AddMonoidHom.id (FreeAbelianGroup α)
-- Mathlib/Algebra/Group/Indicator.lean
@[to_additive]
theorem mulIndicator_mul_eq_left {f g : α → M} (h : Disjoint (mulSupport f) (mulSupport g)) :
    (mulSupport f).mulIndicator (f * g) = f
-- Mathlib/Analysis/Convex/Normed.lean
/-- Diameter of the convex hull of a set `s` equals the emetric diameter of `s`. -/
@[simp]
theorem convexHull_diam (s : Set E) : Metric.diam (convexHull ℝ s) = Metric.diam s
-- Mathlib/RingTheory/PrimeSpectrum.lean
theorem zeroLocus_sup (I J : Ideal R) :
    zeroLocus ((I ⊔ J : Ideal R) : Set R) = zeroLocus I ∩ zeroLocus J
-- Mathlib/Analysis/Convex/Basic.lean
theorem Set.OrdConnected.convex [OrderedSemiring 𝕜] [LinearOrderedAddCommMonoid E] [Module 𝕜 E]
    [OrderedSMul 𝕜 E] {s : Set E} (hs : s.OrdConnected) : Convex 𝕜 s
-- Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
/-- Expresses the integral over `Ioi 0` of `t ^ (a - 1) * exp (-(r * t))` in terms of the Gamma
function, for complex `a`. -/
lemma integral_cpow_mul_exp_neg_mul_Ioi {a : ℂ} {r : ℝ} (ha : 0 < a.re) (hr : 0 < r) :
    ∫ (t : ℝ) in Ioi 0, t ^ (a - 1) * exp (-(r * t)) = (1 / r) ^ a * Gamma a
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem differentiableWithinAt_euclidean :
    DifferentiableWithinAt 𝕜 f t y ↔ ∀ i, DifferentiableWithinAt 𝕜 (fun x => f x i) t y
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- The image of a cocone in C under a functor G : C ⥤ D is a cocone in D. -/
@[simps!]
def mapCocone (c : Cocone F) : Cocone (F ⋙ H)
-- Mathlib/Analysis/Convex/Between.lean
@[simp]
theorem wbtw_mul_sub_add_iff [NoZeroDivisors R] {x y r : R} :
    Wbtw R x (r * (y - x) + x) y ↔ x = y ∨ r ∈ Set.Icc (0 : R) 1
-- Mathlib/CategoryTheory/CommSq.lean
theorem vert_inv {g : W ≅ Y} {h : X ≅ Z} (p : CommSq f g.hom h.hom i) :
    CommSq i g.inv h.inv f
-- Mathlib/Topology/Specialization.lean
/-- Sends a topological space to its specialisation order. -/
@[simps]
def topToPreord : TopCat ⥤ Preord