ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Finset/Sups.lean
lemma filter_infs_le [@DecidableRel α (· ≤ ·)] (s t : Finset α) (a : α) :
    (s ⊼ t).filter (a ≤ ·) = s.filter (a ≤ ·) ⊼ t.filter (a ≤ ·)
-- Mathlib/LinearAlgebra/Matrix/MvPolynomial.lean
@[simp]
theorem mvPolynomialX_apply [CommSemiring R] (i j) :
    mvPolynomialX m n R i j = MvPolynomial.X (i, j)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem_of_append {l : List α} (eq : l = l₁ ++ a :: l₂) (h : l₁.length = n) :
    l[n]'(eq ▸ h ▸ by simp_arith) = a
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.const_mul_left {f : α → R} (h : f =O[l] g) (c' : R) : (fun x => c' * f x) =O[l] g
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem span_singleton_prime {p : α} (hp : p ≠ 0) : IsPrime (span ({p} : Set α)) ↔ Prime p
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[reassoc (attr := simp)]
lemma stalkMap_hom_inv (e : X ≅ Y) (y : Y) :
    e.hom.stalkMap (e.inv.val.base y) ≫ e.inv.stalkMap y =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| by simp)
-- Mathlib/NumberTheory/LSeries/Dirichlet.lean
/-- The L-series of the arithmetic function `ζ` and of the Möbius function are inverses. -/
lemma LSeries_zeta_mul_Lseries_moebius {s : ℂ} (hs : 1 < s.re) : L ↗ζ s * L ↗μ s = 1
-- Mathlib/Order/SymmDiff.lean
theorem symmDiff_eq_Xor' (p q : Prop) : p ∆ q = Xor' p q
-- Mathlib/MeasureTheory/Function/SpecialFunctions/Basic.lean
@[measurability]
theorem Measurable.csin : Measurable fun x => Complex.sin (f x)
-- Mathlib/Topology/Basic.lean
theorem IsClosed.frontier_eq (hs : IsClosed s) : frontier s = s \ interior s
-- Mathlib/FieldTheory/RatFunc/Degree.lean
@[simp]
theorem intDegree_polynomial {p : K[X]} :
    intDegree (algebraMap K[X] (RatFunc K) p) = natDegree p
-- Mathlib/Data/Set/Defs.lean
theorem mem_diff_of_mem {s t : Set α} {x : α} (h1 : x ∈ s) (h2 : x ∉ t) : x ∈ s \ t
-- Mathlib/RingTheory/PowerSeries/Order.lean
/-- If `n` is strictly smaller than the order of `ψ`, then the `n`th coefficient of its product
with any other power series is `0`. -/
theorem coeff_mul_of_lt_order {φ ψ : R⟦X⟧} {n : ℕ} (h : ↑n < ψ.order) :
    coeff R n (φ * ψ) = 0
-- Mathlib/Topology/MetricSpace/Basic.lean
/-- A map between metric spaces is a uniform embedding if and only if the distance between `f x`
and `f y` is controlled in terms of the distance between `x` and `y` and conversely. -/
theorem uniformEmbedding_iff' [MetricSpace β] {f : γ → β} :
    UniformEmbedding f ↔
      (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, dist a b < δ → dist (f a) (f b) < ε) ∧
        ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, dist (f a) (f b) < ε → dist a b < δ
-- Mathlib/Topology/Algebra/ConstMulAction.lean
nonrec theorem continuousWithinAt_const_smul_iff (hc : IsUnit c) :
    ContinuousWithinAt (fun x => c • f x) s b ↔ ContinuousWithinAt f s b
-- Mathlib/CategoryTheory/Limits/ConeCategory.lean
theorem IsInitial.to_eq_descCoconeMorphism {F : J ⥤ C} {c : Cocone F} (hc : IsInitial c)
    (s : Cocone F) :
    IsInitial.to hc s = ((Cocone.isColimitEquivIsInitial _).symm hc).descCoconeMorphism s
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma eval_polynomial_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) : eval P W.polynomial / P z ^ 6 =
    W.toAffine.polynomial.evalEval (P x / P z ^ 2) (P y / P z ^ 3)
-- Mathlib/LinearAlgebra/Matrix/Adjugate.lean
/-- Use linearity of `cramer` and vector evaluation to take `cramer A _ i` out of a summation. -/
theorem sum_cramer_apply {β} (s : Finset β) (f : n → β → α) (i : n) :
    (∑ x ∈ s, cramer A (fun j => f j x) i) = cramer A (fun j : n => ∑ x ∈ s, f j x) i
-- Mathlib/Analysis/NormedSpace/HomeomorphBall.lean
/-- A (semi) normed real vector space is homeomorphic to the unit ball in the same space.
This homeomorphism sends `x : E` to `(1 + ‖x‖²)^(- ½) • x`.

In many cases the actual implementation is not important, so we don't mark the projection lemmas
`Homeomorph.unitBall_apply_coe` and `Homeomorph.unitBall_symm_apply` as `@[simp]`.

See also `Homeomorph.contDiff_unitBall` and `PartialHomeomorph.contDiffOn_unitBall_symm`
for smoothness properties that hold when `E` is an inner-product space. -/
@[simps! (config := .lemmasOnly)]
def Homeomorph.unitBall : E ≃ₜ ball (0 : E) 1
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem _root_.Set.Countable.ae_not_mem (h : s.Countable) (μ : Measure α) [NoAtoms μ] :
    ∀ᵐ x ∂μ, x ∉ s
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem disjoint_of_subset_left (ss : l₁ ⊆ l) (d : Disjoint l l₂) : Disjoint l₁ l₂
-- Mathlib/Data/Nat/Lattice.lean
@[simp]
theorem iInf_of_empty {ι : Sort*} [IsEmpty ι] (f : ι → ℕ) : iInf f = 0
-- Mathlib/Data/Set/Sups.lean
theorem sups_assoc : s ⊻ t ⊻ u = s ⊻ (t ⊻ u)
-- Mathlib/Combinatorics/Pigeonhole.lean
/-- The pigeonhole principle for finitely many pigeons counted by weight, non-strict inequality
version: if the total weight of a finite set of pigeons is less than or equal to `n • b`, and they
are sorted into `n > 0` pigeonholes, then for some pigeonhole, the total weight of the pigeons in
this pigeonhole is less than or equal to `b`. -/
theorem exists_sum_fiber_le_of_maps_to_of_sum_le_nsmul (hf : ∀ a ∈ s, f a ∈ t) (ht : t.Nonempty)
    (hb : ∑ x ∈ s, w x ≤ t.card • b) : ∃ y ∈ t, ∑ x ∈ s.filter fun x => f x = y, w x ≤ b
-- Mathlib/Data/Seq/Computation.lean
theorem of_thinkN_terminates (s : Computation α) (n) : Terminates (thinkN s n) → Terminates s
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
theorem restrictScalars_injective :
    Function.Injective (restrictScalars R : (M →ₗ[S] M₂) → M →ₗ[R] M₂)
-- Mathlib/Order/Heyting/Basic.lean
theorem himp_inf_himp_cancel (hba : b ≤ a) (hcb : c ≤ b) : (a ⇨ b) ⊓ (b ⇨ c) = a ⇨ c
-- Mathlib/Order/Basic.lean
@[to_additive ite_nonneg]
lemma one_le_ite [LE α] (ha : 1 ≤ a) (hb : 1 ≤ b) : 1 ≤ ite p a b
-- Mathlib/NumberTheory/ADEInequality.lean
theorem admissible_E'3 : Admissible (E' 3)
-- Mathlib/Analysis/Calculus/LogDeriv.lean
@[simp]
theorem logDeriv_id (x : 𝕜) : logDeriv id x = 1 / x
-- Mathlib/Topology/Instances/NNReal.lean
theorem tendsto_cofinite_zero_of_summable {α} {f : α → ℝ≥0} (hf : Summable f) :
    Tendsto f cofinite (𝓝 0)
-- Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean
lemma GrowsPolynomially.of_isEquivalent_const {f : ℝ → ℝ} {c : ℝ} (hf : f ~[atTop] fun _ => c) :
    GrowsPolynomially f
-- Mathlib/Data/Set/Basic.lean
theorem diff_subset {s t : Set α} : s \ t ⊆ s
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := measurability)]
theorem Measurable.const_smul' (hg : Measurable g) (c : M) : Measurable fun x => c • g x
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem sqLe_smul {c d x y : ℕ} (n : ℕ) (xy : SqLe x c y d) : SqLe (n * x) c (n * y) d
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[reassoc (attr := simp)]
theorem prod.lift_map {V W X Y Z : C} [HasBinaryProduct W X] [HasBinaryProduct Y Z] (f : V ⟶ W)
    (g : V ⟶ X) (h : W ⟶ Y) (k : X ⟶ Z) :
    prod.lift f g ≫ prod.map h k = prod.lift (f ≫ h) (g ≫ k)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem mk'_eq_of_same {a b} {d : S} :
    f.mk' a d = f.mk' b d ↔ ∃ c : S, c * a = c * b
-- Mathlib/CategoryTheory/Limits/Types.lean
theorem Limit.w_apply {j j' : J} {x : limit F} (f : j ⟶ j') :
    F.map f (limit.π F j x) = limit.π F j' x
-- Mathlib/Data/Nat/Find.lean
lemma findGreatest_le (n : ℕ) : Nat.findGreatest P n ≤ n
-- Mathlib/Data/Int/Cast/Basic.lean
@[simp, norm_cast]
theorem cast_neg : ∀ n, ((-n : ℤ) : R) = -n
-- Mathlib/Algebra/Ring/CentroidHom.lean
@[simp]
theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f
-- Mathlib/Order/Lattice.lean
theorem of_map_inf [SemilatticeInf α] [SemilatticeInf β]
    (h : ∀ x ∈ s, ∀ y ∈ s, f (x ⊓ y) = f x ⊓ f y) : MonotoneOn f s
-- Mathlib/MeasureTheory/Decomposition/SignedLebesgue.lean
/-- **The Lebesgue Decomposition theorem between a signed measure and a measure**:
Given a signed measure `s` and a σ-finite measure `μ`, there exist a signed measure `t` and a
measurable and integrable function `f`, such that `t` is mutually singular with respect to `μ`
and `s = t + μ.withDensityᵥ f`. In this case `t = s.singularPart μ` and
`f = s.rnDeriv μ`. -/
theorem singularPart_add_withDensity_rnDeriv_eq [s.HaveLebesgueDecomposition μ] :
    s.singularPart μ + μ.withDensityᵥ (s.rnDeriv μ) = s
-- Mathlib/Topology/UniformSpace/AbstractCompletion.lean
@[continuity]
theorem continuous_map : Continuous (map f)
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem getLsb_zeroExtend' (ge : m ≥ n) (x : BitVec n) (i : Nat) :
    getLsb (zeroExtend' ge x) i = getLsb x i
-- Mathlib/MeasureTheory/Covering/Differentiation.lean
/-- For every point `x`, sufficiently small sets in a Vitali family around `x` have finite measure.
(This is a trivial result, following from the fact that the measure is locally finite). -/
theorem eventually_measure_lt_top [IsLocallyFiniteMeasure μ] (x : α) :
    ∀ᶠ a in v.filterAt x, μ a < ∞
-- Mathlib/Order/RelClasses.lean
theorem right_iff_left_not_left {r s : α → α → Prop} [IsNonstrictStrictOrder α r s] {a b : α} :
    s a b ↔ r a b ∧ ¬r b a
-- Mathlib/Order/Interval/Finset/Nat.lean
@[simp]
theorem card_Iio : (Iio b).card = b
-- Mathlib/Analysis/Analytic/Basic.lean
theorem le_radius_of_summable (h : Summable fun n => ‖p n‖ * (r : ℝ) ^ n) : ↑r ≤ p.radius
-- Mathlib/Topology/Category/TopCat/Limits/Konig.lean
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H)
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
@[simp]
theorem algebraMap_toProd (k : 𝕜) : (algebraMap 𝕜 𝓜(𝕜, A) k).toProd = algebraMap 𝕜 _ k
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp] lemma coeff_natTrailingDegree_eq_zero : coeff p p.natTrailingDegree = 0 ↔ p = 0
-- Mathlib/Algebra/Order/Ring/Rat.lean
protected lemma add_nonneg : 0 ≤ a → 0 ≤ b → 0 ≤ a + b
-- Mathlib/CategoryTheory/Category/Cat.lean
lemma leftUnitor_inv_app {B C : Cat} (F : B ⟶ C) (X : B) : (λ_ F).inv.app X = eqToHom (by simp)
-- Mathlib/Tactic/NormNum/LegendreSymbol.lean
theorem jacobiSymNat.zero_left (b : ℕ) (hb : Nat.beq (b / 2) 0 = false) : jacobiSymNat 0 b = 0
-- Mathlib/LinearAlgebra/Dual.lean
/-- For any m : M n, \sum_{p ∈ Q n} (ε p m) • e p = m -/
@[simp]
theorem lc_coeffs (m : M) : DualBases.lc e (h.coeffs m) = m
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
@[simp]
lemma toMvPolynomial_constantCoeff (M : Matrix m n R) (i : m) :
    constantCoeff (M.toMvPolynomial i) = 0
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp]
theorem commutes (r : R) : φ (algebraMap R A r) = algebraMap R B r
-- Mathlib/Order/Hom/Bounded.lean
/-- Reinterpret a top homomorphism as a bot homomorphism between the dual lattices. -/
@[simps]
protected def dual :
    TopHom α β ≃ BotHom αᵒᵈ βᵒᵈ
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma cube_of_not_dvd {n : ℤ} (h : ¬ 3 ∣ n) :
    (n : ZMod 9) ^ 3 = 1 ∨ (n : ZMod 9) ^ 3 = 8
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_count [MeasurableSingletonClass α] (f : α → ℝ≥0∞) :
    ∫⁻ a, f a ∂count = ∑' a, f a
-- Mathlib/Analysis/Analytic/Within.lean
lemma AnalyticWithinAt.prod {e : E} {f : E → F} {g : E → G} {s : Set E}
    (hf : AnalyticWithinAt 𝕜 f s e) (hg : AnalyticWithinAt 𝕜 g s e) :
    AnalyticWithinAt 𝕜 (fun x ↦ (f x, g x)) s e
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- Given a "bowtie" of morphisms
```
 j₁   j₂
 |\  /|
 | \/ |
 | /\ |
 |/  \∣
 vv  vv
 k₁  k₂
```
in a filtered category, we can construct an object `s` and two morphisms from `k₁` and `k₂` to `s`,
making the resulting squares commute.
-/
theorem bowtie {j₁ j₂ k₁ k₂ : C} (f₁ : j₁ ⟶ k₁) (g₁ : j₁ ⟶ k₂) (f₂ : j₂ ⟶ k₁) (g₂ : j₂ ⟶ k₂) :
    ∃ (s : C) (α : k₁ ⟶ s) (β : k₂ ⟶ s), f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = g₂ ≫ β
-- Mathlib/Algebra/Order/Kleene.lean
/-- A Kleene Algebra is an idempotent semiring with an additional unary operator `kstar` (for Kleene
star) that satisfies the following properties:
* `1 + a * a∗ ≤ a∗`
* `1 + a∗ * a ≤ a∗`
* If `a * c + b ≤ c`, then `a∗ * b ≤ c`
* If `c * a + b ≤ c`, then `b * a∗ ≤ c`
-/
class KleeneAlgebra (α : Type*) extends IdemSemiring α, KStar α where
  protected one_le_kstar : ∀ a : α, 1 ≤ a∗
  protected mul_kstar_le_kstar : ∀ a : α, a * a∗ ≤ a∗
  protected kstar_mul_le_kstar : ∀ a : α, a∗ * a ≤ a∗
  protected mul_kstar_le_self : ∀ a b : α, b * a ≤ b → b * a∗ ≤ b
  protected kstar_mul_le_self : ∀ a b : α, a * b ≤ b → a∗ * b ≤ b
-- Mathlib/Algebra/Ring/Hom/Defs.lean
theorem coe_inj ⦃f g : α →+* β⦄ (h : (f : α → β) = g) : f = g
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
theorem preimage_mul_right_singleton :
    preimage {b} (· * a) (mul_left_injective _).injOn = {b * a⁻¹}
-- Mathlib/RingTheory/Polynomial/GaussLemma.lean
/-- **Gauss's Lemma** for `ℤ` states that a primitive integer polynomial is irreducible iff it is
  irreducible over `ℚ`. -/
theorem IsPrimitive.Int.irreducible_iff_irreducible_map_cast {p : ℤ[X]} (hp : p.IsPrimitive) :
    Irreducible p ↔ Irreducible (p.map (Int.castRingHom ℚ))
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem nonneg_antisymm : ∀ {a : ℤ√d}, Nonneg a → Nonneg (-a) → a = 0
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem union_succ : GoodProducts C = GoodProducts (π C (ord I · < o)) ∪ MaxProducts C ho
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
@[simp]
theorem fderivWithin_univ : fderivWithin 𝕜 f univ = fderiv 𝕜 f
-- Mathlib/Order/WithBot.lean
theorem some_eq_coe (a : α) : (Option.some a : WithTop α) = (↑a : WithTop α)
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp) sub_add_sub_cancel']
theorem div_mul_div_cancel'' (a b c : G) : a / b * (c / a) = c / b
-- Mathlib/GroupTheory/Finiteness.lean
/-- A group is finitely generated if and only if it is finitely generated as a monoid. -/
@[to_additive "An additive group is finitely generated if and only
if it is finitely generated as an additive monoid."]
theorem Group.fg_iff_monoid_fg : Group.FG G ↔ Monoid.FG G
-- Mathlib/AlgebraicGeometry/Cover/Open.lean
theorem affineBasisCover_is_basis (X : Scheme.{u}) :
    TopologicalSpace.IsTopologicalBasis
      {x : Set X |
        ∃ a : X.affineBasisCover.J, x = Set.range (X.affineBasisCover.map a).1.base}
-- Mathlib/RepresentationTheory/Rep.lean
theorem linearization_of (X : Action (Type u) (MonCat.of G)) (g : G) (x : X.V) :
    ((linearization k G).obj X).ρ g (Finsupp.single x (1 : k))
      = Finsupp.single (X.ρ g x) (1 : k)
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem norm_def (f : E →SL[σ₁₂] F) : ‖f‖ = sInf { c | 0 ≤ c ∧ ∀ x, ‖f x‖ ≤ c * ‖x‖ }
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem eval₂_restriction {p : R[X]} :
    eval₂ f x p =
      eval₂ (f.comp (Subring.subtype (Subring.closure (p.coeffs : Set R)))) x p.restriction
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem top_apply (a : α) : (⊤ : TopHom α β) a = ⊤
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simps]
instance Walk.instInhabited (v : V) : Inhabited (G.Walk v v)
-- Mathlib/Topology/Instances/ENNReal.lean
protected theorem tendsto_atTop_zero [Nonempty β] [SemilatticeSup β] {f : β → ℝ≥0∞} :
    Tendsto f atTop (𝓝 0) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, f n ≤ ε
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
theorem borel_eq_top_of_countable [TopologicalSpace α] [T1Space α] [Countable α] : borel α = ⊤
-- Mathlib/Tactic/Zify.lean
@[zify_simps] lemma natCast_lt (a b : Nat) : a < b ↔ (a : Int) < (b : Int)
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem preimage_Icc {a b : α} : ((↑) : ℤ → α) ⁻¹' Set.Icc a b = Set.Icc ⌈a⌉ ⌊b⌋
-- Mathlib/Order/Bounds/Basic.lean
theorem lowerBounds_mono_mem ⦃a b⦄ (hab : a ≤ b) : b ∈ lowerBounds s → a ∈ lowerBounds s
-- Mathlib/Order/Compare.lean
theorem Compares.eq_gt [Preorder α] {o} {a b : α} (h : Compares o a b) : o = gt ↔ b < a
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem integral_comp_sub_left (d) : (∫ x in a..b, f (d - x)) = ∫ x in d - b..d - a, f x
-- .lake/packages/batteries/Batteries/Data/List/Count.lean
@[simp] theorem count_erase_self (a : α) (l : List α) :
    count a (List.erase l a) = count a l - 1
-- Mathlib/MeasureTheory/Integral/Average.lean
/-- **First moment method**. The maximum of an integrable function is greater than its integral. -/
theorem exists_integral_le (hf : Integrable f μ) : ∃ x, ∫ a, f a ∂μ ≤ f x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sinOrderIso_apply (x : Icc (-(π / 2)) (π / 2)) : sinOrderIso x = ⟨sin x, sin_mem_Icc x⟩
-- Mathlib/Data/Set/Basic.lean
theorem Antitone.inter [Preorder β] {f g : β → Set α} (hf : Antitone f) (hg : Antitone g) :
    Antitone fun x => f x ∩ g x
-- Mathlib/Analysis/Calculus/Deriv/Pow.lean
theorem HasDerivAt.pow (hc : HasDerivAt c c' x) :
    HasDerivAt (fun y => c y ^ n) ((n : 𝕜) * c x ^ (n - 1) * c') x
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem lowerCrossingTime_le : lowerCrossingTime a b f N n ω ≤ N
-- Mathlib/Topology/Basic.lean
/-- See also `IsClosedMap.closure_image_eq_of_continuous`. -/
theorem image_closure_subset_closure_image (h : Continuous f) :
    f '' closure s ⊆ closure (f '' s)
-- Mathlib/Algebra/CharP/ExpChar.lean
theorem MonoidHom.iterate_map_frobenius (f : R →* R) (p : ℕ) [ExpChar R p] (n : ℕ) :
    f^[n] (frobenius R p x) = frobenius R p (f^[n] x)
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
/-- `Finsupp.single` as a `MonoidHom` from the product type into the additive monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [AddZeroClass G] : k × Multiplicative G →* k[G]
-- Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
@[simp]
theorem singularPart_withDensity (ν : Measure α) (f : α → ℝ≥0∞) :
    (ν.withDensity f).singularPart ν = 0
-- Mathlib/Data/Finsupp/Basic.lean
theorem mapDomain_add {f : α → β} : mapDomain f (v₁ + v₂) = mapDomain f v₁ + mapDomain f v₂
-- Mathlib/Data/Multiset/Basic.lean
/-- `Multiset.replicate` as an `AddMonoidHom`. -/
@[simps]
def replicateAddMonoidHom (a : α) : ℕ →+ Multiset α
-- Mathlib/Topology/Instances/Matrix.lean
theorem HasSum.matrix_blockDiag {f : X → Matrix (m × p) (n × p) R} {a : Matrix (m × p) (n × p) R}
    (hf : HasSum f a) : HasSum (fun x => blockDiag (f x)) (blockDiag a)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
private theorem eq_0_of_lt (x : Nat) : x < 2^ 0 ↔ x = 0
-- Mathlib/Data/Int/Log.lean
/-- `zpow b` and `Int.log b` (almost) form a Galois connection. -/
theorem lt_zpow_iff_log_lt {b : ℕ} (hb : 1 < b) {x : ℤ} {r : R} (hr : 0 < r) :
    r < (b : R) ^ x ↔ log b r < x
-- Mathlib/RingTheory/Etale/Basic.lean
theorem iff_unramified_and_smooth :
    FormallyEtale R A ↔ FormallyUnramified R A ∧ FormallySmooth R A
-- Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
/-- A version of `Complex.cpow_int_mul` with RHS that matches `Complex.cpow_mul`.

The assumptions on the arguments are needed
because the equality fails, e.g., for `x = -I`, `n = 2`, `y = 1/2`. -/
lemma cpow_int_mul' {x : ℂ} {n : ℤ} (hlt : -π < n * x.arg) (hle : n * x.arg ≤ π) (y : ℂ) :
    x ^ (n * y) = (x ^ n) ^ y
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem Away.mk_eq_monoidOf_mk' : mk = (Away.monoidOf x).mk'
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
theorem Equivalent.prod {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P}
    {Q₁' : QuadraticMap R N₁ P} {Q₂' : QuadraticMap R N₂ P} (e₁ : Q₁.Equivalent Q₁')
    (e₂ : Q₂.Equivalent Q₂') : (Q₁.prod Q₂).Equivalent (Q₁'.prod Q₂')
-- Mathlib/Order/BoundedOrder.lean
theorem subsingleton_of_bot_eq_top (hα : (⊥ : α) = (⊤ : α)) : Subsingleton α
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
@[simp]
theorem sub_apply {f g : 𝓢(E, F)} {x : E} : (f - g) x = f x - g x
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem sup_eq_bsup {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    sup.{_, v} (familyOfBFamily o f) = bsup.{_, v} o f
-- Mathlib/Data/Nat/Nth.lean
theorem le_nth_of_count_le {n k : ℕ} (h : n ≤ nth p k) : count p n ≤ k
-- Mathlib/Order/SuccPred/Basic.lean
@[simp]
theorem lt_succ_iff_not_isMax : a < succ a ↔ ¬IsMax a
-- Mathlib/Topology/Order/OrderClosed.lean
theorem isClosed_le_prod : IsClosed { p : α × α | p.1 ≤ p.2 }
-- Mathlib/Order/Atoms.lean
@[simp]
theorem isCoatom_iff [OrderTop α] [OrderTop β] (f : α ≃o β) (a : α) :
    IsCoatom (f a) ↔ IsCoatom a
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- If `f g : α → ℝ≥0∞` are two functions and one of them is (a.e.) measurable, then the Lebesgue
integral of `f + g` equals the sum of integrals. This lemma assumes that `f` is integrable, see also
`MeasureTheory.lintegral_add_right` and primed versions of these lemmas. -/
@[simp]
theorem lintegral_add_left {f : α → ℝ≥0∞} (hf : Measurable f) (g : α → ℝ≥0∞) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem monic_of_c_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 1) : P.toPoly.Monic
-- Mathlib/Algebra/Lie/Submodule.lean
theorem incl_eq_val : (N.incl : N → M) = Subtype.val
-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem liftr_iff {α : Type u} (r : α → α → Prop) (x y : F α) :
    Liftr r x y ↔ ∃ a f₀ f₁, x = abs ⟨a, f₀⟩ ∧ y = abs ⟨a, f₁⟩ ∧ ∀ i, r (f₀ i) (f₁ i)
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem smooth_mul_right {a : G} : Smooth I I fun b : G => b * a
-- Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean
@[simp] lemma mass_prod : (μ.prod ν).mass = μ.mass * ν.mass
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
/-- A measure is called s-finite if it is a countable sum of finite measures. -/
class SFinite (μ : Measure α) : Prop where
  out' : ∃ m : ℕ → Measure α, (∀ n, IsFiniteMeasure (m n)) ∧ μ = Measure.sum m
-- Mathlib/Geometry/Manifold/WhitneyEmbedding.lean
theorem embeddingPiTangent_injOn : InjOn f.embeddingPiTangent s
-- Mathlib/GroupTheory/Perm/Basic.lean
theorem one_def : (1 : Perm α) = Equiv.refl α
-- Mathlib/Algebra/DirectLimit.lean
theorem lift_of (i x) : lift G f P g Hg (of G f i x) = g i x
-- Mathlib/Algebra/QuadraticDiscriminant.lean
/-- A quadratic has no root if its discriminant has no square root. -/
theorem quadratic_ne_zero_of_discrim_ne_sq (h : ∀ s : R, discrim a b c ≠ s^2) (x : R) :
    a * x * x + b * x + c ≠ 0
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean
lemma symm {X Y : C} {z₁ z₂ : W.LeftFraction X Y} (h : LeftFractionRel z₁ z₂) :
    LeftFractionRel z₂ z₁
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem zero_comp : comp (0 : R[X]) p = 0
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem toMul_neg [Inv α] (x : Additive α) : toMul (-x) = (toMul x)⁻¹
-- Mathlib/Data/PNat/Prime.lean
theorem Coprime.gcd_mul_left_cancel (m : ℕ+) {n k : ℕ+} :
    k.Coprime n → (k * m).gcd n = m.gcd n
-- Mathlib/CategoryTheory/Galois/Basic.lean
/-- If `A` is connected, the cardinality of `Aut A` is smaller than the cardinality of the
fiber of `A`. -/
lemma card_aut_le_card_fiber_of_connected (A : C) [IsConnected A] :
    Nat.card (Aut A) ≤ Nat.card (F.obj A)
-- Mathlib/Data/Int/Cast/Lemmas.lean
@[simp]
theorem eq_intCast [FunLike F ℤ α] [RingHomClass F ℤ α] (f : F) (n : ℤ) : f n = n
-- Mathlib/Data/Complex/Exponential.lean
theorem neg_one_le_sin : -1 ≤ sin x
-- Mathlib/LinearAlgebra/Dual.lean
theorem erange_coe [Module.Finite K V] : LinearMap.range (eval K V) = ⊤
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem toReal_rpow (x : ℝ≥0∞) (z : ℝ) : x.toReal ^ z = (x ^ z).toReal
-- Mathlib/Data/Finset/Lattice.lean
theorem mem_sup {α β} [DecidableEq β] {s : Finset α} {f : α → Finset β} {x : β} :
    x ∈ s.sup f ↔ ∃ v ∈ s, x ∈ f v
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
lemma _root_.HasCompactSupport.ennnorm_le_lintegral_Ici_deriv
    {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
    {f : ℝ → F} (hf : ContDiff ℝ 1 f) (h'f : HasCompactSupport f) (x : ℝ) :
    (‖f x‖₊ : ℝ≥0∞) ≤ ∫⁻ y in Iic x, ‖deriv f y‖₊
-- Mathlib/Data/PEquiv.lean
@[simp]
theorem toPEquiv_refl : (Equiv.refl α).toPEquiv = PEquiv.refl α
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem tendsto_tan_neg_pi_div_two : Tendsto tan (𝓝[>] (-(π / 2))) atBot