ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem Integrable.comp_aemeasurable {f : α → δ} {g : δ → β} (hg : Integrable g (Measure.map f μ))
    (hf : AEMeasurable f μ) : Integrable (g ∘ f) μ
-- Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean
/-- Given a linear map `L : E → F`, a property holds almost everywhere in `F` if and only if,
almost everywhere in `F`, it holds almost everywhere along the subspace spanned by the
image of `L`. This is an instance of a disintegration argument for additive Haar measures. -/
lemma ae_ae_add_linearMap_mem_iff [LocallyCompactSpace F] {s : Set F} (hs : MeasurableSet s) :
    (∀ᵐ y ∂ν, ∀ᵐ x ∂μ, y + L x ∈ s) ↔ ∀ᵐ y ∂ν, y ∈ s
-- Mathlib/Analysis/Calculus/Dslope.lean
theorem dslope_sub_smul_of_ne (f : 𝕜 → E) (h : b ≠ a) :
    dslope (fun x => (x - a) • f x) a b = f b
-- Mathlib/Order/Filter/Basic.lean
theorem generate_iUnion {s : ι → Set (Set α)} :
    Filter.generate (⋃ i, s i) = ⨅ i, Filter.generate (s i)
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- The cosine of an angle in a right-angled triangle as a ratio of sides. -/
theorem cos_oangle_add_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.cos (o.oangle x (x + y)) = ‖x‖ / ‖x + y‖
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma exists_eventually_const_mul_le_r :
    ∃ c ∈ Set.Ioo (0 : ℝ) 1, ∀ᶠ (n : ℕ) in atTop, ∀ i, c * n ≤ r i n
-- Mathlib/LinearAlgebra/Dimension/DivisionRing.lean
theorem rank_fun_infinite {ι : Type v} [hι : Infinite ι] : Module.rank K (ι → K) = #(ι → K)
-- Mathlib/RingTheory/Ideal/Over.lean
lemma map_eq_top_iff_of_ker_le
    (f : R →+* S) {I : Ideal R} (hf₁ : RingHom.ker f ≤ I) (hf₂ : f.IsIntegral) :
    I.map f = ⊤ ↔ I = ⊤
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
/-- If `P` is a sheaf for `R`, it is separated for `R`. -/
theorem IsSheafFor.isSeparatedFor : IsSheafFor P R → IsSeparatedFor P R
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[simp]
lemma XIsoOfEq_rfl (K : HomologicalComplex V c) (p : ι) :
    K.XIsoOfEq (rfl : p = p) = Iso.refl _
-- Mathlib/FieldTheory/Adjoin.lean
theorem isAlgebraic_adjoin {S : Set L} (hS : ∀ x ∈ S, IsIntegral K x) :
    Algebra.IsAlgebraic K (adjoin K S)
-- Mathlib/Algebra/Polynomial/Mirror.lean
theorem irreducible_of_mirror (h1 : ¬IsUnit f)
    (h2 : ∀ k, f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror)
    (h3 : IsRelPrime f f.mirror) : Irreducible f
-- Mathlib/Topology/MetricSpace/Dilation.lean
@[simp]
theorem ratio_mul (f g : α →ᵈ α) : ratio (f * g) = ratio f * ratio g
-- Mathlib/Algebra/Module/Submodule/Basic.lean
@[simp]
theorem mem_mk {S : AddSubmonoid M} {x : M} (h) : x ∈ (⟨S, h⟩ : Submodule R M) ↔ x ∈ S
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
lemma homologyMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.HomologyData) (h₂ : S₂.HomologyData) (h₃ : S₃.HomologyData) :
    homologyMap' (φ₁ ≫ φ₂) h₁ h₃ = homologyMap' φ₁ h₁ h₂ ≫
      homologyMap' φ₂ h₂ h₃
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_univ_hom (x : ZFSet.{u}) : univ.{u} x
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem Fin.image_succAbove_univ {n : ℕ} (i : Fin (n + 1)) : univ.image i.succAbove = {i}ᶜ
-- Mathlib/Data/Finset/Pointwise.lean
theorem zero_div_subset (s : Finset α) : 0 / s ⊆ 0
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLog.lean
@[simp] lemma log_lt_top_iff {x : ℝ≥0∞} : log x < ⊤ ↔ x < ⊤
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, norm_cast]
lemma ofReal_lt_ofReal {x y : ℝ} : (x : K) < (y : K) ↔ x < y
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem lt_of_not_ge : ∀{a b : Nat}, ¬(b ≥ a) → b < a
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma isIso_g' (hS : S.Exact) (h : S.RightHomologyData) [Epi S.g] :
    IsIso h.g'
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem tendsto_setToFun_approxOn_of_measurable_of_range_subset
    (hT : DominatedFinMeasAdditive μ T C) [MeasurableSpace E] [BorelSpace E] {f : α → E}
    (fmeas : Measurable f) (hf : Integrable f μ) (s : Set E) [SeparableSpace s]
    (hs : range f ∪ {0} ⊆ s) :
    Tendsto (fun n => setToFun μ T hT (SimpleFunc.approxOn f fmeas s 0 (hs <| by simp) n)) atTop
      (𝓝 <| setToFun μ T hT f)
-- Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean
lemma Real.dist_le_of_mem_uIcc {x y x' y' : ℝ} (hx : x ∈ uIcc x' y') (hy : y ∈ uIcc x' y') :
    dist x y ≤ dist x' y'
-- Mathlib/GroupTheory/GroupAction/Hom.lean
/-- Equivariant functions :
When `φ : M → N` is a function, and types `X` and `Y` are endowed with actions of `M` and `N`,
a function `f : X → Y` is `φ`-equivariant if `f (m • x) = (φ m) • (f x)`.  -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure MulActionHom where
  /-- The underlying function. -/
  protected toFun : X → Y
  /-- The proposition that the function commutes with the actions. -/
  protected map_smul' : ∀ (m : M) (x : X), toFun (m • x) = (φ m) • toFun x
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
/-- `SimpleFunc.lintegral` is monotone both in function and in measure. -/
@[mono]
theorem lintegral_mono {f g : α →ₛ ℝ≥0∞} (hfg : f ≤ g) (hμν : μ ≤ ν) :
    f.lintegral μ ≤ g.lintegral ν
-- Mathlib/Probability/Kernel/Disintegration/StandardBorel.lean
/-- Conditional kernel of a kernel `κ : Kernel α (β × Ω)`: a Markov kernel such that
`fst κ ⊗ₖ condKernel κ = κ` (see `MeasureTheory.Measure.compProd_fst_condKernel`).
It exists whenever `Ω` is standard Borel and either `α` is countable
or `β` is countably generated. -/
noncomputable
irreducible_def condKernel : Kernel (α × β) Ω
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
@[trans]
theorem trans {u : VectorMeasure α L} {v : VectorMeasure α M} {w : VectorMeasure α N} (huv : u ≪ᵥ v)
    (hvw : v ≪ᵥ w) : u ≪ᵥ w
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
theorem symm_bijective : Function.Bijective (symm : (M ≃* N) → N ≃* M)
-- Mathlib/Topology/Bornology/Basic.lean
theorem IsBounded.subset (ht : IsBounded t) (hs : s ⊆ t) : IsBounded s
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem toSubalgebra_mk (s : Submodule R A) (h1 hmul) :
    s.toSubalgebra h1 hmul =
      Subalgebra.mk ⟨⟨⟨s, @hmul⟩, h1⟩, s.add_mem, s.zero_mem⟩
        (by intro r; rw [Algebra.algebraMap_eq_smul_one]; apply s.smul_mem _ h1)
-- Mathlib/Topology/DerivedSet.lean
lemma derivedSet_union (A B : Set X) : derivedSet (A ∪ B) = derivedSet A ∪ derivedSet B
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem filter_lt_lt_eq_Ioo [DecidablePred fun j => a < j ∧ j < b] :
    (univ.filter fun j => a < j ∧ j < b) = Ioo a b
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem lie_le_right : ⁅I, N⁆ ≤ N
-- Mathlib/Topology/Sets/Compacts.lean
@[simp]
theorem equiv_refl : Compacts.equiv (Homeomorph.refl α) = Equiv.refl _
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem fundamentalSequenceProp_inr (o f) :
    FundamentalSequenceProp o (Sum.inr f) ↔
      o.repr.IsLimit ∧
        (∀ i, f i < f (i + 1) ∧ f i < o ∧ (o.NF → (f i).NF)) ∧
        ∀ a, a < o.repr → ∃ i, a < (f i).repr
-- Mathlib/Order/Disjoint.lean
theorem codisjoint_iff_le_sup : Codisjoint a b ↔ ⊤ ≤ a ⊔ b
-- Mathlib/Order/Filter/Lift.lean
theorem lift'_lift_assoc {g : Set α → Filter β} {h : Set β → Set γ} (hg : Monotone g) :
    (f.lift g).lift' h = f.lift fun s => (g s).lift' h
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
/-- A function is almost everywhere strongly measurable if and only if it is almost everywhere
measurable, and up to a zero measure set its range is contained in a separable set. -/
theorem _root_.aestronglyMeasurable_iff_aemeasurable_separable [PseudoMetrizableSpace β]
    [MeasurableSpace β] [BorelSpace β] :
    AEStronglyMeasurable f μ ↔
      AEMeasurable f μ ∧ ∃ t : Set β, IsSeparable t ∧ ∀ᵐ x ∂μ, f x ∈ t
-- Mathlib/Topology/Order/Hom/Esakia.lean
@[simp]
theorem coe_copy (f : EsakiaHom α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'
-- Mathlib/RingTheory/WittVector/WittPolynomial.lean
@[simp]
theorem bind₁_wittPolynomial_xInTermsOfW [Invertible (p : R)] (n : ℕ) :
    bind₁ (W_ R) (xInTermsOfW p R n) = X n
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- If the lines determined by corresponding pairs of points in two angles are parallel, twice
those angles are equal. -/
theorem two_zsmul_oangle_of_parallel {p₁ p₂ p₃ p₄ p₅ p₆ : P}
    (h₁₂₄₅ : line[ℝ, p₁, p₂] ∥ line[ℝ, p₄, p₅]) (h₃₂₆₅ : line[ℝ, p₃, p₂] ∥ line[ℝ, p₆, p₅]) :
    (2 : ℤ) • ∡ p₁ p₂ p₃ = (2 : ℤ) • ∡ p₄ p₅ p₆
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma IsSMulRegular.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul :
    IsSMulRegular M r → (IsSMulRegular (M ⧸ N) r ↔ r • ⊤ ⊓ N ≤ r • N)
-- Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
@[to_additive Finset.sum_nonneg']
theorem one_le_prod'' (h : ∀ i : ι, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
@[simp]
lemma inr_rel'_inr_iff (x₂ y₂ : X₂) :
    Rel' f g (Sum.inr x₂) (Sum.inr y₂) ↔ x₂ = y₂
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem locallyIntegrable_zero : LocallyIntegrable (fun _ ↦ (0 : E)) μ
-- Mathlib/Order/Interval/Set/Disjoint.lean
@[simp]
theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} :
    ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x
-- Mathlib/Analysis/Convex/Body.lean
@[simp] -- Porting note: add norm_cast; we leave it out for now to reproduce mathlib3 behavior.
theorem coe_smul' (c : ℝ≥0) (K : ConvexBody V) : (↑(c • K) : Set V) = c • (K : Set V)
-- Mathlib/SetTheory/ZFC/Basic.lean
protected theorem equiv_of_isEmpty (x y : PSet) [IsEmpty x.Type] [IsEmpty y.Type] : Equiv x y
-- Mathlib/CategoryTheory/Shift/ShiftSequence.lean
lemma shiftIso_add_inv_app (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') (X : C) :
    (F.shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha''])).inv.app X =
      (shiftIso F m a' a'' ha'').inv.app X ≫
        (shiftIso F n a a' ha').inv.app ((shiftFunctor C m).obj X) ≫
          (shift F a).map ((shiftFunctorAdd C m n).inv.app X)
-- Mathlib/Algebra/Polynomial/Div.lean
theorem modByMonic_X (p : R[X]) : p %ₘ X = C (p.eval 0)
-- Mathlib/Algebra/Order/Ring/Basic.lean
theorem le_self_pow (ha : 1 ≤ a) (h : m ≠ 0) : a ≤ a ^ m
-- Mathlib/Data/PFun.lean
@[simp]
theorem id_apply (a : α) : PFun.id α a = Part.some a
-- Mathlib/Data/Setoid/Basic.lean
theorem ext_iff {r s : Setoid α} : r = s ↔ ∀ a b, r.Rel a b ↔ s.Rel a b
-- Mathlib/Topology/Constructions.lean
theorem quotientMap_quotient_mk' : QuotientMap (@Quotient.mk' X s)
-- Mathlib/Topology/Algebra/Ring/Basic.lean
/-- In a topological semiring, the left-multiplication `AddMonoidHom` is continuous. -/
theorem mulLeft_continuous (x : α) : Continuous (AddMonoidHom.mulLeft x)
-- Mathlib/Analysis/Analytic/CPolynomial.lean
/-- If `p` is a formal multilinear series such that `p m = 0` for `n ≤ m`, then
`p.changeOrigin x k = 0` for `n ≤ k`.  -/
lemma changeOrigin_finite_of_finite (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) {k : ℕ} (hk : n ≤ k) :
    p.changeOrigin x k = 0
-- Mathlib/NumberTheory/Dioph.lean
theorem ex1_dioph {S : Set (Option α → ℕ)} : Dioph S → Dioph {v | ∃ x, x ::ₒ v ∈ S}
-- Mathlib/Algebra/GroupWithZero/Basic.lean
lemma zpow_one_add₀ (h : a ≠ 0) (i : ℤ) : a ^ (1 + i) = a * a ^ i
-- Mathlib/Algebra/Ring/Opposite.lean
/-- A non-unital ring homomorphism `f : R →ₙ* S` such that `f x` commutes with `f y` for all `x, y`
defines a non-unital ring homomorphism from `Rᵐᵒᵖ`. -/
@[simps (config := .asFn)]
def NonUnitalRingHom.fromOpposite {R S : Type*} [NonUnitalNonAssocSemiring R]
    [NonUnitalNonAssocSemiring S] (f : R →ₙ+* S) (hf : ∀ x y, Commute (f x) (f y)) : Rᵐᵒᵖ →ₙ+* S
-- Mathlib/Control/Fold.lean
theorem length_toList {xs : t α} : length xs = List.length (toList xs)
-- Mathlib/Data/List/Sym.lean
theorem left_mem_of_mk_mem_sym2 {xs : List α} {a b : α}
    (h : s(a, b) ∈ xs.sym2) : a ∈ xs
-- Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
theorem integrable_cexp_neg_sum_mul_add {ι : Type*} [Fintype ι] {b : ι → ℂ}
    (hb : ∀ i, 0 < (b i).re) (c : ι → ℂ) :
    Integrable (fun (v : ι → ℝ) ↦ cexp (- ∑ i, b i * (v i : ℂ) ^ 2 + ∑ i, c i * v i))
-- Mathlib/Order/Monotone/Basic.lean
theorem foldl_strictMono [Preorder α] {f : α → β → α} (H : ∀ b, StrictMono fun a ↦ f a b)
    (l : List β) : StrictMono fun a ↦ l.foldl f a
-- Mathlib/Order/Fin/Basic.lean
lemma strictMono_addNat (m) : StrictMono ((addNat · m) : Fin n → Fin (n + m))
-- Mathlib/CategoryTheory/Limits/FunctorCategory.lean
@[ext]
theorem limit_obj_ext {H : J ⥤ K ⥤ C} [HasLimitsOfShape J C] {k : K} {W : C}
    {f g : W ⟶ (limit H).obj k}
    (w : ∀ j, f ≫ (Limits.limit.π H j).app k = g ≫ (Limits.limit.π H j).app k) : f = g
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
/-- A short complex `S` has right homology when there exists a `S.RightHomologyData` -/
class HasRightHomology : Prop where
  condition : Nonempty S.RightHomologyData
-- Mathlib/Data/NNReal/Basic.lean
theorem iInf_mul (f : ι → ℝ≥0) (a : ℝ≥0) : iInf f * a = ⨅ i, f i * a
-- Mathlib/Analysis/Analytic/Within.lean
/-- `f` has power series `p` at `x` iff some local extension of `f` has that series -/
lemma hasFPowerSeriesWithinOnBall_iff_exists_hasFPowerSeriesOnBall [CompleteSpace F] {f : E → F}
    {p : FormalMultilinearSeries 𝕜 E F} {s : Set E} {x : E} {r : ℝ≥0∞} :
    HasFPowerSeriesWithinOnBall f p s x r ↔
      ContinuousWithinAt f s x ∧ ∃ g, EqOn f g (s ∩ EMetric.ball x r) ∧
        HasFPowerSeriesOnBall g p x r
-- Mathlib/Order/Booleanisation.lean
@[simp] lemma comp_sup_lift (a b : α) : comp a ⊔ lift b = comp (a \ b)
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContDiff.iterate_deriv :
    ∀ (n : ℕ) {f₂ : 𝕜 → F}, ContDiff 𝕜 ∞ f₂ → ContDiff 𝕜 ∞ (deriv^[n] f₂)
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_range_le {α β : Type u} {f : α → β} : #(range f) ≤ #α
-- Mathlib/Topology/ExtendFrom.lean
theorem extendFrom_eq [T2Space Y] {A : Set X} {f : X → Y} {x : X} {y : Y} (hx : x ∈ closure A)
    (hf : Tendsto f (𝓝[A] x) (𝓝 y)) : extendFrom A f x = y
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
theorem int_cyclotomic_rw {n : ℕ} (h : n ≠ 0) :
    cyclotomic n ℤ = (int_coeff_of_cyclotomic' (Complex.isPrimitiveRoot_exp n h)).choose
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_eq_pi_iff {z : ℂ} : arg z = π ↔ z.re < 0 ∧ z.im = 0
-- Mathlib/Logic/Function/Basic.lean
theorem const_def {y : β} : (fun _ : α ↦ y) = const α y
-- Mathlib/Data/Finset/NAry.lean
/-- Symmetric statement to `Finset.image₂_image_left_comm`. -/
theorem image_image₂_distrib_left {g : γ → δ} {f' : α' → β → δ} {g' : α → α'}
    (h_distrib : ∀ a b, g (f a b) = f' (g' a) b) :
    (image₂ f s t).image g = image₂ f' (s.image g') t
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem frequently_and_distrib_right {f : Filter α} {p : α → Prop} {q : Prop} :
    (∃ᶠ x in f, p x ∧ q) ↔ (∃ᶠ x in f, p x) ∧ q
-- Mathlib/Order/Filter/Basic.lean
theorem NeBot.nonempty (f : Filter α) [hf : f.NeBot] : Nonempty α
-- Mathlib/Tactic/NormNum/GCD.lean
theorem int_lcm_helper {x y : ℤ} {x' y' d : ℕ}
    (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.lcm x' y' = d) :
    Int.lcm x y = d
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem Measurable.subtype_mk {p : β → Prop} {f : α → β} (hf : Measurable f) {h : ∀ x, p (f x)} :
    Measurable fun x => (⟨f x, h x⟩ : Subtype p)
-- Mathlib/RingTheory/HahnSeries/Addition.lean
theorem orderTop_sub {Γ} [LinearOrder Γ] {x y : HahnSeries Γ R}
    (hxy : x.orderTop < y.orderTop) : (x - y).orderTop = x.orderTop
-- Mathlib/Data/ENNReal/Basic.lean
@[simp] theorem some_eq_coe (a : ℝ≥0) : (Option.some a : ℝ≥0∞) = (↑a : ℝ≥0∞)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem size_swap! (a : Array α) (i j) :
    (a.swap! i j).size = a.size
-- Mathlib/Algebra/Order/Monoid/Unbundled/MinMax.lean
@[to_additive (attr := simp)]
lemma max_mul_min (a b : α) : max a b * min a b = a * b
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem cont_withSeminorms_normedSpace (F) [SeminormedAddCommGroup F] [NormedSpace 𝕝₂ F]
    [TopologicalSpace E] {p : ι → Seminorm 𝕝 E} (hp : WithSeminorms p)
    (f : E →ₛₗ[τ₁₂] F) (hf : ∃ (s : Finset ι) (C : ℝ≥0), (normSeminorm 𝕝₂ F).comp f ≤ C • s.sup p) :
    Continuous f
-- Mathlib/Order/Filter/Pointwise.lean
@[simp]
theorem bot_vsub : (⊥ : Filter β) -ᵥ g = ⊥
-- Mathlib/LinearAlgebra/UnitaryGroup.lean
@[simp] theorem mul_val : ↑(A * B) = A.1 * B.1
-- Mathlib/Algebra/Order/Kleene.lean
@[mono]
theorem kstar_mono : Monotone (KStar.kstar : α → α)
-- Mathlib/Geometry/RingedSpace/Stalks.lean
/-- If `α = β` and `x = x'`, we would like to say that `stalk_map α x = stalk_map β x'`.
Unfortunately, this equality is not well-formed, as their types are not _definitionally_ the same.
To get a proper congruence lemma, we therefore have to introduce these `eqToHom` arrows on
either side of the equality.
-/
theorem congr {X Y : PresheafedSpace.{_, _, v} C} (α β : X ⟶ Y)
    (h₁ : α = β) (x x' : X) (h₂ : x = x') :
    α.stalkMap x ≫ eqToHom (show X.presheaf.stalk x = X.presheaf.stalk x' by rw [h₂]) =
      eqToHom (show Y.presheaf.stalk (α.base x) = Y.presheaf.stalk (β.base x') by rw [h₁, h₂]) ≫
        β.stalkMap x'
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem eq_of_mem_singleton : a ∈ [b] → a = b
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem relabel_moveRight' {x : PGame} {xl' xr'} (el : xl' ≃ x.LeftMoves) (er : xr' ≃ x.RightMoves)
    (j : xr') : moveRight (relabel el er) j = x.moveRight (er j)
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
protected theorem inv_mul_cancel {x : (Cauchy abv)} : x ≠ 0 → x⁻¹ * x = 1
-- Mathlib/Topology/Constructions.lean
theorem interior_prod_eq (s : Set X) (t : Set Y) : interior (s ×ˢ t) = interior s ×ˢ interior t
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
nonrec
theorem ContinuousWithinAt.rexp (h : ContinuousWithinAt f s x) :
    ContinuousWithinAt (fun y ↦ exp (f y)) s x
-- Mathlib/RingTheory/Polynomial/Selmer.lean
theorem X_pow_sub_X_sub_one_irreducible_aux (z : ℂ) : ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)
-- Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean
/-- The image of an additive Haar measure under a surjective linear map is proportional to a given
additive Haar measure. The proportionality factor will be infinite if the linear map has a
nontrivial kernel. -/
theorem LinearMap.exists_map_addHaar_eq_smul_addHaar' (h : Function.Surjective L) :
    ∃ (c : ℝ≥0∞), 0 < c ∧ c < ∞ ∧ μ.map L = (c * addHaar (univ : Set (LinearMap.ker L))) • ν
-- Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean
theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
    (hx : x ∈ closedBall (0 : E) (1 - D)) : y D x = 1
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
theorem SL2_inv_expl (A : SL(2, R)) :
    A⁻¹ = ⟨![![A.1 1 1, -A.1 0 1], ![-A.1 1 0, A.1 0 0]], SL2_inv_expl_det A⟩
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive (attr := simp) add_le_iff_nonpos_right]
theorem mul_le_iff_le_one_right' [CovariantClass α α (· * ·) (· ≤ ·)]
    [ContravariantClass α α (· * ·) (· ≤ ·)] (a : α) {b : α} :
    a * b ≤ a ↔ b ≤ 1
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem _root_.Disjoint.of_image_finset {s t : Finset α} {f : α → β}
    (h : Disjoint (s.image f) (t.image f)) : Disjoint s t
-- Mathlib/Order/RelIso/Basic.lean
/-- `fun b ↦ Prod.mk a b` as a relation embedding. -/
@[simps]
def prodLexMkLeft (s : β → β → Prop) {a : α} (h : ¬r a a) : s ↪r Prod.Lex r s
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem drop_length (l : List α) : drop l.length l = []
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
theorem dist_eq_card (f g : PiLp 0 α) :
    dist f g = {i | dist (f i) (g i) ≠ 0}.toFinite.toFinset.card
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem ceil_add_one (a : α) : ⌈a + 1⌉ = ⌈a⌉ + 1
-- Mathlib/Analysis/Seminorm.lean
theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm 𝕜₃ E₃) (g : E₂ →ₛₗ[σ₂₃] E₃)
    (f : E →ₛₗ[σ₁₂] E₂) : p.comp (g.comp f) = (p.comp g).comp f
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
theorem Subpresheaf.sheafify_sheafify (h : Presieve.IsSheaf J F) :
    (G.sheafify J).sheafify J = G.sheafify J
-- Mathlib/Analysis/NormedSpace/OperatorNorm/NNNorm.lean
theorem nndist_le_opNNNorm (x y : E) : nndist (f x) (f y) ≤ ‖f‖₊ * nndist x y
-- Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
/-- **Ruzsa's triangle inequality**. Mul-mul-div version. -/
@[to_additive "**Ruzsa's triangle inequality**. Add-add-sub version."]
theorem ruzsa_triangle_inequality_mul_mul_div (A B C : Finset α) :
    (A * C).card * B.card ≤ (A * B).card * (B / C).card
-- Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
theorem gradedMul_one (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ x 1 = x
-- Mathlib/Data/Bool/Basic.lean
theorem lt_iff : ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true
-- Mathlib/Order/Sublattice.lean
lemma inclusion_apply (h : L ≤ M) (a : L) : inclusion h a = Set.inclusion h a
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem IntegrableOn.mul_continuousOn [T2Space X] (hg : IntegrableOn g K μ)
    (hg' : ContinuousOn g' K) (hK : IsCompact K) : IntegrableOn (fun x => g x * g' x) K μ
-- Mathlib/Geometry/Manifold/BumpFunction.lean
protected theorem continuous : Continuous f
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
/-- For any `x : ℝ` the sequence $\frac{f^n(x)-x}{n}$ tends to the translation number of `f`.
In particular, this limit does not depend on `x`. -/
theorem tendsto_translationNumber (x : ℝ) :
    Tendsto (fun n : ℕ => ((f ^ n) x - x) / n) atTop (𝓝 <| τ f)
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc (attr := simp)]
theorem triangle_assoc_comp_left_inv (X Y : C) :
    (X ◁ (λ_ Y).inv) ≫ (α_ X (𝟙_ C) Y).inv = (ρ_ X).inv ▷ Y
-- Mathlib/Data/Matroid/Basic.lean
theorem Base.dep_of_ssubset (hB : M.Base B) (h : B ⊂ X) (hX : X ⊆ M.E := by aesop_mat) : M.Dep X
-- Mathlib/CategoryTheory/Monoidal/FunctorCategory.lean
@[simp]
theorem whiskerLeft_app {F F' G' : C ⥤ D} {β : F' ⟶ G'} {X} :
    (F ◁ β).app X = F.obj X ◁ β.app X
-- Mathlib/Topology/MetricSpace/Gluing.lean
private theorem eq_of_glueDist_eq_zero (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (ε0 : 0 < ε) :
    ∀ p q : X ⊕ Y, glueDist Φ Ψ ε p q = 0 → p = q
-- Mathlib/RingTheory/Polynomial/Bernstein.lean
@[simp]
theorem iterate_derivative_at_1 (n ν : ℕ) (h : ν ≤ n) :
    (Polynomial.derivative^[n - ν] (bernsteinPolynomial R n ν)).eval 1 =
      (-1) ^ (n - ν) * (ascPochhammer R (n - ν)).eval (ν + 1 : R)
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
theorem int_mul_iff (hm : m ≠ 0) : LiouvilleWith p (m * x) ↔ LiouvilleWith p x
-- Mathlib/Data/Complex/Basic.lean
theorem re_surjective : Surjective re
-- Mathlib/Probability/Distributions/Uniform.lean
/-- Alternative way of writing the uniformPDF. -/
lemma uniformPDF_ite {s : Set E} {x : E} :
    uniformPDF s x μ = if x ∈ s then (μ s)⁻¹ else 0
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_im {f : X → 𝕜} (hf : Integrable f μ) :
    ∫ x, RCLike.im (f x) ∂μ = RCLike.im (∫ x, f x ∂μ)
-- Mathlib/Data/Nat/Prime/Basic.lean
theorem Prime.pow_minFac {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) : (p ^ k).minFac = p
-- Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
lemma sFiniteSeq_absolutelyContinuous_toFiniteAux (μ : Measure α) [SFinite μ] (n : ℕ) :
    sFiniteSeq μ n ≪ μ.toFiniteAux
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
theorem int_add (h : LiouvilleWith p x) (m : ℤ) : LiouvilleWith p (m + x)
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma isSMulRegular_on_quot_iff_lsmul_comap_le :
    IsSMulRegular (M ⧸ N) r ↔ N.comap (LinearMap.lsmul R M r) ≤ N
-- Mathlib/CategoryTheory/Adjunction/Comma.lean
/-- If each costructured arrow category on `G` has a terminal object, `G` is a left adjoint. -/
lemma isLeftAdjoint_of_costructuredArrowTerminals : G.IsLeftAdjoint
-- Mathlib/Analysis/SpecialFunctions/Arsinh.lean
theorem hasDerivAt_arsinh (x : ℝ) : HasDerivAt arsinh (√(1 + x ^ 2))⁻¹ x
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
@[reassoc (attr := simp)]
theorem lanLiftUnit_desc [HasLeftKanLift f g] (s : LeftLift f g) :
    lanLiftUnit f g ≫ lanLiftDesc s ▷ f = s.unit