ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- An alternative formula for the braiding isomorphism which swaps a binary biproduct,
using the fact that the biproduct is a coproduct.
-/
@[simps]
def biprod.braiding' (P Q : C) : P ⊞ Q ≅ Q ⊞ P
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean
@[reassoc]
lemma pullback.map_comp {X Y Z X' Y' Z' X'' Y'' Z'' : C}
    {f : X ⟶ Z} {g : Y ⟶ Z} {f' : X' ⟶ Z'} {g' : Y' ⟶ Z'} {f'' : X'' ⟶ Z''} {g'' : Y'' ⟶ Z''}
    (i₁ : X ⟶ X') (j₁ : X' ⟶ X'') (i₂ : Y ⟶ Y') (j₂ : Y' ⟶ Y'') (i₃ : Z ⟶ Z') (j₃ : Z' ⟶ Z'')
    [HasPullback f g] [HasPullback f' g'] [HasPullback f'' g'']
    (e₁ e₂ e₃ e₄) :
    pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂ ≫ pullback.map f' g' f'' g'' j₁ j₂ j₃ e₃ e₄ =
      pullback.map f g f'' g'' (i₁ ≫ j₁) (i₂ ≫ j₂) (i₃ ≫ j₃)
        (by rw [reassoc_of% e₁, e₃, Category.assoc])
        (by rw [reassoc_of% e₂, e₄, Category.assoc])
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
    [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
theorem unifIntegrable_zero_meas [MeasurableSpace α] {p : ℝ≥0∞} {f : ι → α → β} :
    UnifIntegrable f p (0 : Measure α)
-- Mathlib/Algebra/AddTorsor.lean
@[simp]
theorem fst_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').1 = p₁.1 -ᵥ p₂.1
-- Mathlib/Combinatorics/Schnirelmann.lean
/--
The Schnirelmann density of the set of naturals which are `1 mod m` is `m⁻¹`, for any `m ≠ 1`.

Note that if `m = 1`, this set is empty.
-/
lemma schnirelmannDensity_setOf_mod_eq_one {m : ℕ} (hm : m ≠ 1) :
    schnirelmannDensity {n | n % m = 1} = (m⁻¹ : ℝ)
-- Mathlib/Analysis/Normed/Operator/Compact.lean
theorem IsCompactOperator.comp_clm [AddCommMonoid M₂] [Module R₂ M₂] {f : M₂ → M₃}
    (hf : IsCompactOperator f) (g : M₁ →SL[σ₁₂] M₂) : IsCompactOperator (f ∘ g)
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
theorem aemeasurable_restrict_of_measurable_subtype {s : Set α} (hs : MeasurableSet s)
    (hf : Measurable fun x : s => f x) : AEMeasurable f (μ.restrict s)
-- Mathlib/Data/Set/Sigma.lean
theorem sigma_nonempty_iff : (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty
-- Mathlib/Computability/Language.lean
theorem mul_def (l m : Language α) : l * m = image2 (· ++ ·) l m
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem Subgroup.topologicalClosure_minimal (s : Subgroup G) {t : Subgroup G} (h : s ≤ t)
    (ht : IsClosed (t : Set G)) : s.topologicalClosure ≤ t
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
lemma cfcₙ_apply : cfcₙ f a = cfcₙHom (a := a) ha ⟨⟨_, hf.restrict⟩, hf0⟩
-- Mathlib/Topology/EMetricSpace/Basic.lean
@[simp]
theorem ball_zero : ball x 0 = ∅
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
@[simp]
theorem limit.lift_map {F G : J ⥤ C} [HasLimit F] [HasLimit G] (c : Cone F) (α : F ⟶ G) :
    limit.lift F c ≫ limMap α = limit.lift G ((Cones.postcompose α).obj c)
-- Mathlib/Data/Set/Finite.lean
lemma Finite.exists_not_mem (hs : s.Finite) : ∃ a, a ∉ s
-- Mathlib/LinearAlgebra/Dimension/DivisionRing.lean
/-- Also see `rank_quotient_add_rank`. -/
theorem rank_quotient_add_rank_of_divisionRing (p : Submodule K V) :
    Module.rank K (V ⧸ p) + Module.rank K p = Module.rank K V
-- Mathlib/RingTheory/TensorProduct/Basic.lean
@[simp]
theorem algEquivOfLinearEquivTensorProduct_apply (f h_mul h_one x) :
    (algEquivOfLinearEquivTensorProduct f h_mul h_one : A ⊗[R] B ≃ₐ[S] C) x = f x
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem idealFactorsEquivOfQuotEquiv_mem_normalizedFactors_of_mem_normalizedFactors (hJ : J ≠ ⊥)
    {L : Ideal R} (hL : L ∈ normalizedFactors I) :
    ↑(idealFactorsEquivOfQuotEquiv f ⟨L, dvd_of_mem_normalizedFactors hL⟩)
      ∈ normalizedFactors J
-- Mathlib/Data/Countable/Basic.lean
protected theorem Function.Embedding.countable [Countable β] (f : α ↪ β) : Countable α
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[reassoc (attr := simp)]
lemma π_descH (k : h.K ⟶ A) (hk : h.f' ≫ k = 0) : h.π ≫ h.descH k hk = k
-- Mathlib/Algebra/CharP/Quotient.lean
/-- If an ideal does not contain any coercions of natural numbers other than zero, then its quotient
inherits the characteristic of the underlying ring. -/
theorem quotient' {R : Type*} [CommRing R] (p : ℕ) [CharP R p] (I : Ideal R)
    (h : ∀ x : ℕ, (x : R) ∈ I → (x : R) = 0) : CharP (R ⧸ I) p
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem isPell_iff_mem_unitary : ∀ {b : ℤ√d}, IsPell b ↔ b ∈ unitary (ℤ√d)
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
protected theorem unique (g : FreeAbelianGroup α →+ β) (hg : ∀ x, g (of x) = f x) {x} :
    g x = lift f x
-- Mathlib/Topology/Connected/Basic.lean
theorem Continuous.mapsTo_connectedComponentIn [TopologicalSpace β] {f : α → β} {s : Set α}
    (h : Continuous f) {a : α} (hx : a ∈ s) :
    MapsTo f (connectedComponentIn s a) (connectedComponentIn (f '' s) (f a))
-- Mathlib/Data/List/Perm.lean
theorem perm_option_to_list {o₁ o₂ : Option α} : o₁.toList ~ o₂.toList ↔ o₁ = o₂
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive (attr := simp)]
theorem iUnion_smul_set (s : Set α) (t : Set β) : ⋃ a ∈ s, a • t = s • t
-- Mathlib/LinearAlgebra/PiTensorProduct.lean
/-- If elements `p,q` of `FreeAddMonoid (R × Π i, s i)` lift elements `x,y` of `⨂[R] i, s i`
respectively, then `p + q` lifts `x + y`.
-/
lemma lifts_add {x y : ⨂[R] i, s i} {p q : FreeAddMonoid (R × Π i, s i)}
    (hp : p ∈ lifts x) (hq : q ∈ lifts y) : p + q ∈ lifts (x + y)
-- Mathlib/Order/WellFoundedSet.lean
@[simp]
theorem partiallyWellOrderedOn_bUnion (s : Finset ι) {f : ι → Set α} :
    (⋃ i ∈ s, f i).PartiallyWellOrderedOn r ↔ ∀ i ∈ s, (f i).PartiallyWellOrderedOn r
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
/-- If a topological space admits an atlas with locally compact charts, then the space itself
is locally compact. -/
theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M
-- Mathlib/CategoryTheory/Monoidal/CommMon_.lean
@[simp]
theorem forget₂_Mon_obj_one (A : CommMon_ C) : ((forget₂Mon_ C).obj A).one = A.one
-- Mathlib/NumberTheory/FLT/Basic.lean
lemma not_fermatLastTheoremFor_one : ¬ FermatLastTheoremFor 1
-- Mathlib/Order/Monotone/Basic.lean
@[simp]
theorem strictMonoOn_comp_ofDual_iff : StrictMonoOn (f ∘ ofDual) s ↔ StrictAntiOn f s
-- Mathlib/CategoryTheory/Triangulated/Basic.lean
@[reassoc (attr := simp)]
lemma _root_.CategoryTheory.Iso.inv_hom_id_triangle_hom₃ {A B : Triangle C} (e : A ≅ B) :
    e.inv.hom₃ ≫ e.hom.hom₃ = 𝟙 _
-- Mathlib/Topology/Semicontinuous.lean
theorem lowerSemicontinuous_biSup {p : ι → Prop} {f : ∀ i, p i → α → δ}
    (h : ∀ i hi, LowerSemicontinuous (f i hi)) :
    LowerSemicontinuous fun x' => ⨆ (i) (hi), f i hi x'
-- Mathlib/AlgebraicTopology/SimplicialObject.lean
/-- Functor composition induces a functor on simplicial objects. -/
@[simps!]
def whiskering (D : Type*) [Category D] : (C ⥤ D) ⥤ SimplicialObject C ⥤ SimplicialObject D
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
/-- See `intervalIntegrable_cpow'` for a version with a weaker hypothesis on `r`, but assuming the
measure is volume. -/
theorem intervalIntegrable_cpow {r : ℂ} (h : 0 ≤ r.re ∨ (0 : ℝ) ∉ [[a, b]]) :
    IntervalIntegrable (fun x : ℝ => (x : ℂ) ^ r) μ a b
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem eq_of_le_of_lt_succ (h₁ : n ≤ m) (h₂ : m < n + 1) : m = n
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
@[simp] theorem beq_refl (a : Nat) : Nat.beq a a = true
-- Mathlib/CategoryTheory/IsConnected.lean
/-- An inductive-like property for the objects of a connected category.
If the set `p` is nonempty, and `p` is closed under morphisms of `J`,
then `p` contains all of `J`.

The converse is given in `IsConnected.of_induct`.
-/
theorem induct_on_objects [IsPreconnected J] (p : Set J) {j₀ : J} (h0 : j₀ ∈ p)
    (h1 : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), j₁ ∈ p ↔ j₂ ∈ p) (j : J) : j ∈ p
-- Mathlib/CategoryTheory/ComposableArrows.lean
/-- The equivalence `(ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n` obtained
by reversing the arrows. -/
@[simps!]
def opEquivalence : (ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n
-- Mathlib/FieldTheory/IntermediateField.lean
/-- `S : IntermediateField K L` is a subset of `L` such that there is a field
tower `L / S / K`. -/
structure IntermediateField extends Subalgebra K L where
  inv_mem' : ∀ x ∈ carrier, x⁻¹ ∈ carrier
-- Mathlib/Data/Set/Lattice.lean
theorem exists_set_mem_of_union_eq_top {ι : Type*} (t : Set ι) (s : ι → Set β)
    (w : ⋃ i ∈ t, s i = ⊤) (x : β) : ∃ i ∈ t, x ∈ s i
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
theorem div_le_iff₀ (hc : c ≠ 0) : a / c ≤ b ↔ a ≤ b * c
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive (attr := simp)]
theorem reduce_toWord : ∀ x : FreeGroup α, reduce (toWord x) = toWord x
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
lemma uIoc_comm (a b : α) : Ι a b = Ι b a
-- Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean
/-- Given an open subgroup `U` and an element `r` of a nonarchimedean ring, there is an open
  subgroup `V` such that `r • V` is contained in `U`. -/
theorem left_mul_subset (U : OpenAddSubgroup R) (r : R) :
    ∃ V : OpenAddSubgroup R, r • (V : Set R) ⊆ U
-- Mathlib/Analysis/Complex/CauchyIntegral.lean
/-- `f : ℂ → E` is analytic at `z` iff it's differentiable near `z` -/
theorem analyticAt_iff_eventually_differentiableAt {f : ℂ → E} {c : ℂ} :
    AnalyticAt ℂ f c ↔ ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z
-- Mathlib/Data/List/Sort.lean
@[simp]
theorem sorted_nil : Sorted r []
-- Mathlib/CategoryTheory/Functor/EpiMono.lean
theorem mono_of_mono_map (F : C ⥤ D) [ReflectsMonomorphisms F] {X Y : C} {f : X ⟶ Y}
    (h : Mono (F.map f)) : Mono f
-- Mathlib/Order/PFilter.lean
/-- A specific witness of `pfilter.directed` when `P` has meets. -/
theorem inf_mem (hx : x ∈ F) (hy : y ∈ F) : x ⊓ y ∈ F
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_range_eq_sUnion {α β : Type*} (C : Set (Set α)) {f : ∀ s : C, β → (s : Type _)}
    (hf : ∀ s : C, Surjective (f s)) : ⋃ y : β, range (fun s : C => (f s y).val) = ⋃₀C
-- Mathlib/Topology/Connected/PathConnected.lean
theorem ofLine_mem {f : ℝ → X} (hf : ContinuousOn f I) (h₀ : f 0 = x) (h₁ : f 1 = y) :
    ∀ t, ofLine hf h₀ h₁ t ∈ f '' I
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
@[simp]
lemma restrict_compl_singleton (a : α) : μ.restrict ({a}ᶜ) = μ
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma nndist_pi_eq_iff {f g : ∀ b, π b} {r : ℝ≥0} (hr : 0 < r) :
    nndist f g = r ↔ (∃ i, nndist (f i) (g i) = r) ∧ ∀ b, nndist (f b) (g b) ≤ r
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
theorem IsPartition.biUnionTagged {π : Prepartition I} (h : IsPartition π)
    {πi : ∀ J, TaggedPrepartition J} (hi : ∀ J ∈ π, (πi J).IsPartition) :
    (π.biUnionTagged πi).IsPartition
-- Mathlib/Algebra/Ring/Int.lean
@[simp]
theorem isSquare_ofNat_iff {n : ℕ} :
    IsSquare (no_index (OfNat.ofNat n) : ℤ) ↔ IsSquare (OfNat.ofNat n : ℕ)
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem aemeasurable_withDensity_ennreal_iff' {f : α → ℝ≥0}
    (hf : AEMeasurable f μ) {g : α → ℝ≥0∞} :
    AEMeasurable g (μ.withDensity fun x => (f x : ℝ≥0∞)) ↔
      AEMeasurable (fun x => (f x : ℝ≥0∞) * g x) μ
-- Mathlib/Topology/Instances/ENNReal.lean
theorem biInf_le_nhds : ∀ x : ℝ≥0∞, ⨅ ε > 0, 𝓟 (Icc (x - ε) (x + ε)) ≤ 𝓝 x
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
@[simp] theorem run_get [Monad m] (s : σ)    : (get : StateT σ m σ).run s = pure (s, s)
-- Mathlib/RingTheory/Kaehler/Polynomial.lean
lemma KaehlerDifferential.mvPolynomialBasis_repr_symm_single (σ) (i) (x) :
    (mvPolynomialBasis R σ).repr.symm (Finsupp.single i x) = x • D R (MvPolynomial σ R) (.X i)
-- Mathlib/Order/Antichain.lean
theorem mono (hs : IsAntichain r₁ s) (h : r₂ ≤ r₁) : IsAntichain r₂ s
-- Mathlib/Init/Data/Fin/Basic.lean
@[deprecated eq_of_val_eq (since := "2024-02-15")]
theorem eq_of_veq : i.val = j.val → i = j
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Submonoid N) : (⨆ i, (S i).comap f).map f = iSup S
-- Mathlib/GroupTheory/Index.lean
@[to_additive]
theorem index_dvd_card : H.index ∣ Nat.card G
-- Mathlib/CategoryTheory/Limits/ConeCategory.lean
/-- The category of cocones on `F` is just the comma category `(F ↓ Δ)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cocone.equivStructuredArrow (F : J ⥤ C) : Cocone F ≌ StructuredArrow F (const J)
-- Mathlib/ModelTheory/LanguageMap.lean
/-- A language homomorphism is injective when all the maps between symbol types are. -/
protected structure Injective : Prop where
  onFunction {n} : Function.Injective fun f : L.Functions n => onFunction ϕ f
  onRelation {n} : Function.Injective fun R : L.Relations n => onRelation ϕ R
-- Mathlib/Order/CompletePartialOrder.lean
protected lemma DirectedOn.le_sSup (hd : DirectedOn (· ≤ ·) d) (ha : a ∈ d) : a ≤ sSup d
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem adjoin_le {S : NonUnitalStarSubalgebra R A} {s : Set A} (hs : s ⊆ S) : adjoin R s ≤ S
-- Mathlib/GroupTheory/Torsion.lean
/-- Torsion groups are closed under extensions. -/
@[to_additive AddIsTorsion.extension_closed "Additive torsion groups are closed under extensions."]
theorem IsTorsion.extension_closed {f : G →* H} (hN : N = f.ker) (tH : IsTorsion H)
    (tN : IsTorsion N) : IsTorsion G
-- Mathlib/Analysis/Convex/Gauge.lean
theorem Balanced.starConvex (hs : Balanced ℝ s) : StarConvex ℝ 0 s
-- Mathlib/Algebra/Order/Group/Defs.lean
/-- A choice-free shortcut instance. -/
@[to_additive "A choice-free shortcut instance."]
theorem OrderedCommGroup.to_contravariantClass_left_le (α : Type u) [OrderedCommGroup α] :
    ContravariantClass α α (· * ·) (· ≤ ·)
-- Mathlib/Probability/Kernel/WithDensity.lean
@[simp]
lemma withDensity_one (κ : Kernel α β) [IsSFiniteKernel κ] :
    Kernel.withDensity κ 1 = κ
-- Mathlib/Topology/MetricSpace/Isometry.lean
protected theorem completeSpace [CompleteSpace β] (e : α ≃ᵢ β) : CompleteSpace α
-- Mathlib/Algebra/Polynomial/Inductions.lean
theorem divX_mul_X_add (p : R[X]) : divX p * X + C (p.coeff 0) = p
-- Mathlib/Data/Nat/Digits.lean
theorem dvd_iff_dvd_digits_sum (b b' : ℕ) (h : b' % b = 1) (n : ℕ) :
    b ∣ n ↔ b ∣ (digits b' n).sum
-- Mathlib/Data/Num/Lemmas.lean
theorem size_eq_natSize : ∀ n, (size n : ℕ) = natSize n
-- Mathlib/Algebra/Order/CauSeq/BigOperators.lean
lemma geo_series [Nontrivial β] (x : β) (hx1 : abv x < 1) :
    IsCauSeq abv fun n ↦ ∑ m ∈ range n, x ^ m
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem comp_id (f : FrameHom α β) : f.comp (FrameHom.id α) = f
-- Mathlib/Order/UpperLower/Basic.lean
lemma IsUpperSet.upperBounds_subset (hs : IsUpperSet s) : s.Nonempty → upperBounds s ⊆ s
-- Mathlib/Topology/MetricSpace/Ultra/Basic.lean
lemma isClopen_sphere {r : ℝ} (hr : r ≠ 0) : IsClopen (sphere x r)
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
theorem Complex.orthonormalBasisOneI_repr_apply (z : ℂ) :
    Complex.orthonormalBasisOneI.repr z = ![z.re, z.im]
-- Mathlib/Order/InitialSeg.lean
theorem eq_or_principal [IsWellOrder β s] (f : r ≼i s) :
    Surjective f ∨ ∃ b, ∀ x, s x b ↔ ∃ y, f y = x
-- Mathlib/Order/Basic.lean
@[simp]
lemma ltByCases_lt (h : x < y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
    ltByCases x y h₁ h₂ h₃ = h₁ h
-- Mathlib/Analysis/SpecialFunctions/ContinuousFunctionalCalculus/ExpLog.lean
@[simp]
protected lemma _root_.IsSelfAdjoint.log {a : A} : IsSelfAdjoint (log a)
-- Mathlib/Probability/Independence/Kernel.lean
theorem iIndepFun.indepFun_prod_mk [IsMarkovKernel κ] (hf_Indep : iIndepFun m f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (fun a => (f i a, f j a)) (f k) κ μ
-- Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
@[simp]
lemma add_hom (α β : Ext X Y n) : (α + β).hom = α.hom + β.hom
-- Mathlib/Data/Matroid/Constructions.lean
theorem freeOn_indep (hIE : I ⊆ E) : (freeOn E).Indep I
-- Mathlib/Order/Hom/Basic.lean
theorem OrderIso.isCompl_iff {x y : α} : IsCompl x y ↔ IsCompl (f x) (f y)
-- .lake/packages/lean4/src/lean/Init/Data/List/Impl.lean
@[csimp]
theorem iota_eq_iotaTR : @iota = @iotaTR
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
theorem _root_.Pi.orthonormalBasis.toBasis {η : Type*} [Fintype η] {ι : η → Type*}
    [∀ i, Fintype (ι i)] {𝕜 : Type*} [RCLike 𝕜] {E : η → Type*} [∀ i, NormedAddCommGroup (E i)]
    [∀ i, InnerProductSpace 𝕜 (E i)] (B : ∀ i, OrthonormalBasis (ι i) 𝕜 (E i)) :
    (Pi.orthonormalBasis B).toBasis =
      ((Pi.basis fun i : η ↦ (B i).toBasis).map (WithLp.linearEquiv 2 _ _).symm)
-- Mathlib/Analysis/NormedSpace/RCLike.lean
/-- `LinearMap.bound_of_ball_bound` is a version of this over arbitrary nontrivially normed fields.
It produces a less precise bound so we keep both versions. -/
theorem LinearMap.bound_of_ball_bound' {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : E →ₗ[𝕜] 𝕜)
    (h : ∀ z ∈ closedBall (0 : E) r, ‖f z‖ ≤ c) (z : E) : ‖f z‖ ≤ c / r * ‖z‖
-- Mathlib/RingTheory/Multiplicity.lean
theorem one_right {a : α} (ha : ¬IsUnit a) : multiplicity a 1 = 0
-- Mathlib/RingTheory/HahnSeries/Multiplication.lean
theorem algebraMap_apply {r : R} : algebraMap R (HahnSeries Γ A) r = C (algebraMap R A r)
-- Mathlib/Analysis/CstarAlgebra/Unitization.lean
/-- This is the key lemma used to establish the instance `Unitization.instCstarRing`
(i.e., proving that the norm on `Unitization 𝕜 E` satisfies the C⋆-property). We split this one
out so that declaring the `CstarRing` instance doesn't time out. -/
theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) :
    ‖(Unitization.splitMul 𝕜 E x).snd‖ ^ 2 ≤ ‖(Unitization.splitMul 𝕜 E (star x * x)).snd‖
-- Mathlib/MeasureTheory/PiSystem.lean
theorem generateFrom_generatePiSystem_eq {α} {g : Set (Set α)} :
    generateFrom (generatePiSystem g) = generateFrom g
-- Mathlib/Topology/UniformSpace/Separation.lean
@[simp]
theorem map_id : map (@id α) = id
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_ringHom_trans [NonAssocSemiring S'] (e₁ : R ≃+* S) (e₂ : S ≃+* S') :
    (e₁.trans e₂ : R →+* S') = (e₂ : S →+* S').comp ↑e₁
-- Mathlib/Topology/PartialHomeomorph.lean
theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s
-- .lake/packages/lean4/src/lean/Init/Omega/Constraint.lean
theorem not_sat_of_isImpossible (h : isImpossible c) {t} : ¬ c.sat t
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive (attr := simp)]
theorem noncommProd_singleton (a : α) (f : α → β) :
    noncommProd ({a} : Finset α) f
        (by
          norm_cast
          exact Set.pairwise_singleton _ _) =
      f a
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma LeftHomologyData.exact_map_iff (h : S.LeftHomologyData) (F : C ⥤ D)
    [F.PreservesZeroMorphisms] [h.IsPreservedBy F] [(S.map F).HasHomology] :
    (S.map F).Exact ↔ IsZero (F.obj h.H)
-- Mathlib/CategoryTheory/Filtered/Basic.lean
theorem of_isInitial {X : C} (h : IsInitial X) : IsCofiltered C
-- .lake/packages/lean4/src/lean/Init/Data/Int/Basic.lean
@[simp] theorem ofNat_one  : ((1 : Nat) : Int) = 1
-- Mathlib/Logic/Relation.lean
theorem tail'_iff : TransGen r a c ↔ ∃ b, ReflTransGen r a b ∧ r b c
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
/-- The category of types has `X × Y`, the usual cartesian product,
as the binary product of `X` and `Y`.
-/
@[simps]
def binaryProductLimitCone (X Y : Type u) : Limits.LimitCone (pair X Y)
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem map₂_mk_top_top_eq_top : Submodule.map₂ (mk R M N) ⊤ ⊤ = ⊤
-- Mathlib/Data/Matroid/Closure.lean
lemma closure_closure_union_closure_eq_closure_union (M : Matroid α) (X Y : Set α) :
    M.closure (M.closure X ∪ M.closure Y) = M.closure (X ∪ Y)
-- Mathlib/CategoryTheory/Adjunction/FullyFaithful.lean
/-- If the unit is an isomorphism, bundle one has an isomorphism `L ⋙ R ⋙ L ≅ L`. -/
@[simps!]
noncomputable def whiskerLeftLCounitIsoOfIsIsoUnit [IsIso h.unit] : L ⋙ R ⋙ L ≅ L
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem comap_iInf_map_of_injective {ι : Sort*} (S : ι → Submodule R M) :
    (⨅ i, (S i).map f).comap f = iInf S
-- Mathlib/Data/Set/Lattice.lean
theorem range_eq_iUnion {ι} (f : ι → α) : range f = ⋃ i, {f i}
-- Mathlib/Topology/Order/MonotoneConvergence.lean
theorem isGLB_of_tendsto_atTop [TopologicalSpace α] [Preorder α] [OrderClosedTopology α]
    [Nonempty β] [SemilatticeSup β] {f : β → α} {a : α} (hf : Antitone f)
    (ha : Tendsto f atTop (𝓝 a)) : IsGLB (Set.range f) a
-- Mathlib/FieldTheory/IsAlgClosed/Spectrum.lean
/-- The *spectral mapping theorem* for polynomials.  Note: the assumption `degree p > 0`
is necessary in case `σ a = ∅`, for then the left-hand side is `∅` and the right-hand side,
assuming `[Nontrivial A]`, is `{k}` where `p = Polynomial.C k`. -/
theorem map_polynomial_aeval_of_degree_pos [IsAlgClosed 𝕜] (a : A) (p : 𝕜[X])
    (hdeg : 0 < degree p) : σ (aeval a p) = (eval · p) '' σ a
-- Mathlib/Data/Finset/Lattice.lean
theorem min'_eq_inf' : s.min' H = s.inf' H id
-- Mathlib/Order/Bounds/Basic.lean
@[simp] theorem isLeast_singleton : IsLeast {a} a
-- Mathlib/Analysis/Convex/Cone/InnerDual.lean
theorem isClosed_innerDualCone : IsClosed (s.innerDualCone : Set H)
-- Mathlib/Analysis/Complex/OperatorNorm.lean
/-- The determinant of `conjLIE`, as a linear map. -/
@[simp]
theorem det_conjLIE : LinearMap.det (conjLIE.toLinearEquiv : ℂ →ₗ[ℝ] ℂ) = -1
-- Mathlib/InformationTheory/Hamming.lean
/-- Corresponds to `dist_smul` with the discrete norm on `α`. -/
theorem hammingDist_smul [∀ i, SMul α (β i)] {k : α} {x y : ∀ i, β i}
    (hk : ∀ i, IsSMulRegular (β i) k) : hammingDist (k • x) (k • y) = hammingDist x y
-- Mathlib/GroupTheory/Torsion.lean
/-- Subgroups of torsion groups are torsion groups. -/
@[to_additive "Subgroups of additive torsion groups are additive torsion groups."]
theorem IsTorsion.subgroup (tG : IsTorsion G) (H : Subgroup G) : IsTorsion H
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem HasMFDerivWithinAt.continuousWithinAt (h : HasMFDerivWithinAt I I' f s x f') :
    ContinuousWithinAt f s x
-- Mathlib/Algebra/Order/Archimedean.lean
theorem exists_int_gt (x : α) : ∃ n : ℤ, x < n
-- Mathlib/Algebra/Bounds.lean
@[to_additive]
theorem IsLUB.inv (h : IsLUB s a) : IsGLB s⁻¹ a⁻¹
-- Mathlib/Algebra/Homology/ConcreteCategory.lean
lemma δ_apply (x₃ : (forget₂ C Ab).obj (S.X₃.X i))
    (hx₃ : (forget₂ C Ab).map (S.X₃.d i j) x₃ = 0)
    (x₂ : (forget₂ C Ab).obj (S.X₂.X i)) (hx₂ : (forget₂ C Ab).map (S.g.f i) x₂ = x₃)
    (x₁ : (forget₂ C Ab).obj (S.X₁.X j))
    (hx₁ : (forget₂ C Ab).map (S.f.f j) x₁ = (forget₂ C Ab).map (S.X₂.d i j) x₂)
    (k : ι) (hk : c.next j = k) :
    (forget₂ C Ab).map (hS.δ i j hij)
      ((forget₂ C Ab).map (S.X₃.homologyπ i) (S.X₃.cyclesMk x₃ j (c.next_eq' hij) hx₃)) =
        (forget₂ C Ab).map (S.X₁.homologyπ j) (S.X₁.cyclesMk x₁ k hk (by
          have := hS.mono_f
          apply (Preadditive.mono_iff_injective (S.f.f k)).1 inferInstance
          erw [← forget₂_comp_apply, ← HomologicalComplex.Hom.comm, forget₂_comp_apply, hx₁,
            ← forget₂_comp_apply, HomologicalComplex.d_comp_d, Functor.map_zero, map_zero,
            AddMonoidHom.zero_apply]))
-- Mathlib/Data/Set/Function.lean
theorem SurjOn.inter_inter (h₁ : SurjOn f s₁ t₁) (h₂ : SurjOn f s₂ t₂) (h : InjOn f (s₁ ∪ s₂)) :
    SurjOn f (s₁ ∩ s₂) (t₁ ∩ t₂)
-- Mathlib/Analysis/Convex/Topology.lean
/-- If we dilate a convex set about a point in its interior by a scale `t > 1`, the interior of
the result includes the closure of the original set.

TODO Generalise this from convex sets to sets that are balanced / star-shaped about `x`. -/
theorem Convex.closure_subset_interior_image_homothety_of_one_lt {s : Set E} (hs : Convex ℝ s)
    {x : E} (hx : x ∈ interior s) (t : ℝ) (ht : 1 < t) :
    closure s ⊆ interior (homothety x t '' s)
-- Mathlib/Algebra/Associated/Basic.lean
theorem Associated.neg_neg [Monoid α] [HasDistribNeg α] {a b : α} (h : Associated a b) :
    Associated (-a) (-b)
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive (attr := simp)]
theorem inv_lt_div_iff_lt_mul : a⁻¹ < b / c ↔ c < a * b