ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem mapDomain_sum {k' G' : Type*} [Semiring k'] {f : G → G'} {s : AddMonoidAlgebra k' G}
    {v : G → k' → k[G]} :
    mapDomain f (s.sum v) = s.sum fun a b => mapDomain f (v a b)
-- Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
/-- A closed convex set is the intersection of the halfspaces containing it. -/
theorem iInter_halfspaces_eq (hs₁ : Convex ℝ s) (hs₂ : IsClosed s) :
    ⋂ l : E →L[ℝ] ℝ, { x | ∃ y ∈ s, l x ≤ l y } = s
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
protected theorem coe_mul (x y : S) : (↑(x * y) : A) = ↑x * ↑y
-- Mathlib/GroupTheory/Nilpotent.lean
/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which an ascending
central series reaches `G` in its `n`'th term. -/
theorem least_ascending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_ascending_central_series G).mp hG) =
    Group.nilpotencyClass G
-- Mathlib/CategoryTheory/Limits/Constructions/LimitsOfProductsAndEqualizers.lean
/--
Given the existence of the appropriate (possibly finite) products and equalizers, we know a limit of
`F` exists.
(This assumes the existence of all equalizers, which is technically stronger than needed.)
-/
theorem hasLimit_of_equalizer_and_product (F : J ⥤ C) [HasLimit (Discrete.functor F.obj)]
    [HasLimit (Discrete.functor fun f : Σp : J × J, p.1 ⟶ p.2 => F.obj f.1.2)] [HasEqualizers C] :
    HasLimit F
-- Mathlib/Data/Sum/Interval.lean
theorem Ico_inr_inr : Ico (inr b₁ : α ⊕ β) (inr b₂) = (Ico b₁ b₂).map Embedding.inr
-- Mathlib/Data/Matroid/Restrict.lean
theorem StrictRestriction.restriction (h : N <r M) : N ≤r M
-- Mathlib/Data/Finset/Lattice.lean
theorem max_mem_insert_bot_image_coe (s : Finset α) :
    s.max ∈ (insert ⊥ (s.image (↑)) : Finset (WithBot α))
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
@[simp]
theorem intervalIntegrable_log (h : (0 : ℝ) ∉ [[a, b]]) : IntervalIntegrable log μ a b
-- Mathlib/Topology/Homotopy/HSpaces.lean
theorem delayReflLeft_one (γ : Path x y) : delayReflLeft 1 γ = γ
-- Mathlib/CategoryTheory/ComposableArrows.lean
@[simp]
lemma map_one_succ (j : ℕ) (hj : j + 1 < n + 1 + 1) :
    map F f 1 ⟨j + 1, hj⟩ (by simp [Fin.le_def]) = F.map' 0 j
-- Mathlib/Data/List/Sigma.lean
theorem kerase_keys_subset (a) (l : List (Sigma β)) : (kerase a l).keys ⊆ l.keys
-- Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂
-- Mathlib/AlgebraicGeometry/Restrict.lean
lemma eqToHom_eq_homOfLE {C} [Preorder C] {X Y : C} (e : X = Y) : eqToHom e = homOfLE e.le
-- Mathlib/Data/DFinsupp/Basic.lean
protected theorem induction {p : (Π₀ i, β i) → Prop} (f : Π₀ i, β i) (h0 : p 0)
    (ha : ∀ (i b) (f : Π₀ i, β i), f i = 0 → b ≠ 0 → p f → p (single i b + f)) : p f
-- Mathlib/NumberTheory/Pell.lean
/-- A solution with `x = 1` is trivial. -/
theorem eq_one_of_x_eq_one (h₀ : d ≠ 0) {a : Solution₁ d} (ha : a.x = 1) : a = 1
-- Mathlib/Computability/Ackermann.lean
theorem ack_injective_left (n : ℕ) : Function.Injective fun m => ack m n
-- Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
lemma differentiableOn_negMulLog : DifferentiableOn ℝ negMulLog {0}ᶜ
-- Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean
theorem unitors_equal : (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom
-- Mathlib/Computability/Encoding.lean
theorem encodePosNum_nonempty (n : PosNum) : encodePosNum n ≠ []
-- Mathlib/CategoryTheory/Functor/KanExtension/Pointwise.lean
/-- The constructed pointwise right Kan extension
when `HasPointwiseRightKanExtension L F` holds. -/
@[simps]
noncomputable def pointwiseRightKanExtension : D ⥤ H
-- Mathlib/Order/LiminfLimsup.lean
/-- In linear orders, frequent boundedness from above implies coboundedness for `≥`. -/
lemma IsCobounded.of_frequently_le {u : R} (freq_le : ∃ᶠ r in F, r ≤ u) :
    IsCobounded (· ≥ ·) F
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem le_inf_support_pow (degt0 : 0 ≤ degt 0) (degtm : ∀ a b, degt a + degt b ≤ degt (a + b))
    (n : ℕ) (f : R[A]) : n • f.support.inf degt ≤ (f ^ n).support.inf degt
-- Mathlib/Order/WithBot.lean
protected theorem «forall» {p : WithTop α → Prop} : (∀ x, p x) ↔ p ⊤ ∧ ∀ x : α, p x
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem IsPrime.isRadical (H : IsPrime I) : I.IsRadical
-- Mathlib/Data/Finset/Pointwise.lean
theorem smul_finset_inter₀ (ha : a ≠ 0) : a • (s ∩ t) = a • s ∩ a • t
-- Mathlib/SetTheory/Cardinal/ENat.lean
@[simp] lemma nat_lt_ofENat {m : ℕ} {n : ℕ∞} : (m : Cardinal) < n ↔ m < n
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem eLpNorm'_congr_nnnorm_ae {f g : α → F} (hfg : ∀ᵐ x ∂μ, ‖f x‖₊ = ‖g x‖₊) :
    eLpNorm' f q μ = eLpNorm' g q μ
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
@[simp, mfld_simps]
theorem trivializationAt_source (x : M) :
    (trivializationAt E (TangentSpace I) x).source =
      π E (TangentSpace I) ⁻¹' (chartAt H x).source
-- Mathlib/Data/Finmap.lean
theorem union_comm_of_disjoint {s₁ s₂ : Finmap β} : Disjoint s₁ s₂ → s₁ ∪ s₂ = s₂ ∪ s₁
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
lemma cyclesMap_comm [S₁.HasLeftHomology] [S₂.HasLeftHomology] :
    cyclesMap φ ≫ h₂.cyclesIso.hom = h₁.cyclesIso.hom ≫ γ.φK
-- Mathlib/Computability/TuringMachine.lean
@[simp]
theorem ListBlank.tail_mk {Γ} [Inhabited Γ] (l : List Γ) :
    ListBlank.tail (ListBlank.mk l) = ListBlank.mk l.tail
-- Mathlib/MeasureTheory/Measure/Restrict.lean
lemma comap_restrict (μ : Measure β) (s : Set β) :
    (μ.restrict s).comap f = (μ.comap f).restrict (f ⁻¹' s)
-- Mathlib/Analysis/Seminorm.lean
@[simp]
theorem coe_restrictScalars (p : Seminorm 𝕜' E) : (p.restrictScalars 𝕜 : E → ℝ) = p
-- Mathlib/Topology/Compactness/Compact.lean
/-- If `X` is a compact space, then a locally finite family of sets of `X` can have only finitely
many nonempty elements. -/
theorem LocallyFinite.finite_nonempty_of_compact [CompactSpace X] {f : ι → Set X}
    (hf : LocallyFinite f) : { i | (f i).Nonempty }.Finite
-- Mathlib/Topology/LocallyConstant/Algebra.lean
/-- The constant-function embedding, as a ring hom.  -/
@[simps]
def constRingHom [NonAssocSemiring Y] : Y →+* LocallyConstant X Y
-- Mathlib/Order/Monotone/Basic.lean
protected theorem StrictAntiOn.antitoneOn (hf : StrictAntiOn f s) : AntitoneOn f s
-- Mathlib/Data/PFunctor/Univariate/Basic.lean
@[simp]
theorem W.dest_mk (p : P (W P)) : W.dest (W.mk p) = p
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem deleteEdges_empty_eq : G'.deleteEdges ∅ = G'
-- Mathlib/Deprecated/Subring.lean
theorem closure_subset {t : Set R} (ht : IsSubring t) : s ⊆ t → closure s ⊆ t
-- Mathlib/ModelTheory/Semantics.lean
theorem nonempty [Mn : Nonempty M] (h : M ≅[L] N) : Nonempty N
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem sUnion_subset_iff {s : Set (Set α)} {t : Set α} : ⋃₀s ⊆ t ↔ ∀ t' ∈ s, t' ⊆ t
-- Mathlib/Algebra/Group/Submonoid/Basic.lean
@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set M) = ⊥
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
theorem rightInvOn (h : SpectrumRestricts a f) : (spectrum S a).RightInvOn f (algebraMap R S)
-- Mathlib/Data/PFun.lean
@[simp]
theorem id_comp (f : α →. β) : (PFun.id β).comp f = f
-- Mathlib/MeasureTheory/Function/SpecialFunctions/RCLike.lean
@[measurability]
theorem Measurable.im (hf : Measurable f) : Measurable fun x => RCLike.im (f x)
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem inner_add_right (x y z : F) : ⟪x, y + z⟫ = ⟪x, y⟫ + ⟪x, z⟫
-- Mathlib/RingTheory/AdicCompletion/Algebra.lean
@[local simp]
theorem transitionMap_map_mul {m n : ℕ} (hmn : m ≤ n) (x y : R ⧸ (I ^ n • ⊤ : Ideal R)) :
    transitionMap I R hmn (x * y) = transitionMap I R hmn x * transitionMap I R hmn y
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Closed.lean
@[simp]
theorem monoidalClosed_uncurry
    {M N P : ModuleCat.{u} R} (f : N ⟶ M ⟶[ModuleCat.{u} R] P) (x : M) (y : N) :
    MonoidalClosed.uncurry f (x ⊗ₜ[R] y) =
      @DFunLike.coe _ _ _ LinearMap.instFunLike (f y) x
-- Mathlib/CategoryTheory/Monoidal/Tor.lean
/-- The higher `Tor` groups for `X` and `Y` are zero if `Y` is projective. -/
lemma isZero_Tor_succ_of_projective (X Y : C) [Projective Y] (n : ℕ) :
    IsZero (((Tor C (n + 1)).obj X).obj Y)
-- Mathlib/Tactic/Linarith/Preprocessing.lean
theorem without_one_mul {M : Type*} [MulOneClass M] {a b : M} (h : 1 * a = b) : a = b
-- Mathlib/Data/Set/Basic.lean
theorem Monotone.union [Preorder β] {f g : β → Set α} (hf : Monotone f) (hg : Monotone g) :
    Monotone fun x => f x ∪ g x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem nsmul_toReal_eq_mul {n : ℕ} (h : n ≠ 0) {θ : Angle} :
    (n • θ).toReal = n * θ.toReal ↔ θ.toReal ∈ Set.Ioc (-π / n) (π / n)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem principal_add_ord {c : Cardinal} (hc : ℵ₀ ≤ c) : Ordinal.Principal (· + ·) c.ord
-- Mathlib/Data/Set/Card.lean
theorem _root_.Function.Injective.encard_image (hf : f.Injective) (s : Set α) :
    (f '' s).encard = s.encard
-- Mathlib/Order/Filter/Extr.lean
theorem IsMaxOn.iSup_eq (hx₀ : x₀ ∈ s) (h : IsMaxOn f s x₀) : ⨆ x : s, f x = f x₀
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem Measurable.dite [∀ x, Decidable (x ∈ s)] {f : s → β} (hf : Measurable f)
    {g : (sᶜ : Set α) → β} (hg : Measurable g) (hs : MeasurableSet s) :
    Measurable fun x => if hx : x ∈ s then f ⟨x, hx⟩ else g ⟨x, hx⟩
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem HasFDerivWithinAt.mul' (ha : HasFDerivWithinAt a a' s x) (hb : HasFDerivWithinAt b b' s x) :
    HasFDerivWithinAt (fun y => a y * b y) (a x • b' + a'.smulRight (b x)) s x
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
lemma mulSupport_prod (s : Finset ι) (f : ι → α → β) :
    mulSupport (fun x ↦ ∏ i ∈ s, f i x) ⊆ ⋃ i ∈ s, mulSupport (f i)
-- Mathlib/Data/Nat/Choose/Dvd.lean
theorem dvd_choose_add (hp : Prime p) (hap : a < p) (hbp : b < p) (h : p ≤ a + b) :
    p ∣ choose (a + b) a
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableOn.dist (hf : DifferentiableOn ℝ f s) (hg : DifferentiableOn ℝ g s)
    (hne : ∀ x ∈ s, f x ≠ g x) : DifferentiableOn ℝ (fun y => dist (f y) (g y)) s
-- Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
theorem PosSemidef.fromBlocks₂₂ [Fintype m] [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜)
    (B : Matrix m n 𝕜) {D : Matrix n n 𝕜} (hD : D.PosDef) [Invertible D] :
    (fromBlocks A B Bᴴ D).PosSemidef ↔ (A - B * D⁻¹ * Bᴴ).PosSemidef
-- Mathlib/LinearAlgebra/Span.lean
theorem coe_sup : ↑(p ⊔ p') = (p + p' : Set M)
-- Mathlib/Data/Quot.lean
theorem factor_mk_eq {α : Type*} (r s : α → α → Prop) (h : ∀ x y, r x y → s x y) :
    factor r s h ∘ Quot.mk _ = Quot.mk _
-- Mathlib/Algebra/Order/Ring/Finset.lean
theorem mul_inf_le_inf_mul_of_nonneg [OrderTop R] (s : Finset ι) (ha : ∀ i ∈ s, 0 ≤ a i)
    (hb : ∀ i ∈ s, 0 ≤ b i) : s.inf a * s.inf b ≤ s.inf (a * b)
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
lemma mul_inv_eq_iff_eq_mul₀ (hb : b ≠ 0) : a * b⁻¹ = c ↔ a = c * b
-- Mathlib/GroupTheory/SpecificGroups/Dihedral.lean
/-- If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs (represented as
$n + n + n + n*n$) of commuting elements. -/
@[simps]
def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } ≃
    ZMod n ⊕ ZMod n ⊕ ZMod n ⊕ ZMod n × ZMod n
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem hasFDerivWithinAt_of_mem_nhds (h : s ∈ 𝓝 x) :
    HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x
-- Mathlib/CategoryTheory/Adjunction/Reflective.lean
/-- If `A` is essentially in the image of a reflective functor `i`, then `η_A` is an isomorphism.
This gives that the "witness" for `A` being in the essential image can instead be given as the
reflection of `A`, with the isomorphism as `η_A`.

(For any `B` in the reflective subcategory, we automatically have that `ε_B` is an iso.)
-/
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) :
    IsIso ((reflectorAdjunction i).unit.app A)
-- Mathlib/CategoryTheory/Monad/Limits.lean
/-- (Impl) The key property defining the map `λ : TL ⟶ L`. -/
theorem commuting (j : J) : (T : C ⥤ C).map (c.ι.app j) ≫ lambda c t = (D.obj j).a ≫ c.ι.app j
-- Mathlib/Order/Filter/Pi.lean
@[instance]
theorem coprodᵢ_neBot [∀ i, Nonempty (α i)] [Nonempty ι] (f : ∀ i, Filter (α i))
    [H : ∀ i, NeBot (f i)] : NeBot (Filter.coprodᵢ f)
-- Mathlib/RingTheory/WittVector/MulCoeff.lean
theorem nthRemainder_spec (n : ℕ) (x y : 𝕎 k) : (x * y).coeff (n + 1) =
    x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1) + y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) +
    nthRemainder p n (truncateFun (n + 1) x) (truncateFun (n + 1) y)
-- Mathlib/Algebra/Order/Floor.lean
theorem le_ceil (a : α) : a ≤ ⌈a⌉
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem ysq_dvd_yy (n) : yn a1 n * yn a1 n ∣ yn a1 (n * yn a1 n)
-- Mathlib/Topology/ContinuousOn.lean
theorem continuousOn_isOpen_of_generateFrom {β : Type*} {s : Set α} {T : Set (Set β)} {f : α → β}
    (h : ∀ t ∈ T, IsOpen (s ∩ f ⁻¹' t)) :
    @ContinuousOn α β _ (.generateFrom T) f s
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem Differentiable.finset_prod (hd : ∀ i ∈ u, Differentiable 𝕜 (f i)) :
    Differentiable 𝕜 (∏ i ∈ u, f i ·)
-- Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean
/-- Shows that the partial denominators `bᵢ` correspond to an integer. -/
theorem exists_int_eq_of_partDen {b : K}
    (nth_partDen_eq : (of v).partDens.get? n = some b) : ∃ z : ℤ, b = (z : K)
-- Mathlib/Topology/VectorBundle/Basic.lean
@[simp, mfld_simps]
theorem coe_coordChange (i j : ι) : Z.toFiberBundleCore.coordChange i j b = Z.coordChange i j b
-- Mathlib/Algebra/Lie/Rank.lean
lemma rank_le_finrank_engel (x : L) :
    rank K L ≤ finrank K (engel K x)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean
lemma degree_norm_smul_basis [IsDomain R] (p q : R[X]) :
    (Algebra.norm R[X] <| p • (1 : W.CoordinateRing) + q • mk W Y).degree =
      max (2 • p.degree) (2 • q.degree + 3)
-- Mathlib/Algebra/Order/Group/Abs.lean
theorem sub_lt_of_abs_sub_lt_left (h : |a - b| < c) : b - c < a
-- Mathlib/NumberTheory/KummerDedekind.lean
theorem Ideal.irreducible_map_of_irreducible_minpoly (hI : IsMaximal I) (hI' : I ≠ ⊥)
    (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤) (hx' : IsIntegral R x)
    (hf : Irreducible (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))) :
    Irreducible (I.map (algebraMap R S))
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem IsMaximal.exists_inv {I : Ideal α} (hI : I.IsMaximal) {x} (hx : x ∉ I) :
    ∃ y, ∃ i ∈ I, y * x + i = 1
-- Mathlib/Topology/Compactification/OnePoint.lean
theorem isClosed_infty : IsClosed ({∞} : Set (OnePoint X))
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
/-- If a subalgebra is contained in a finite-dimensional
subalgebra with the same dimension, they are equal. -/
theorem _root_.Subalgebra.eq_of_le_of_finrank_eq (h_finrank : finrank K F = finrank K E) : F = E
-- Mathlib/Algebra/Associated/Basic.lean
theorem ne_one : p ≠ 1
-- Mathlib/Data/List/Perm.lean
theorem perm_comp_forall₂ {l u v} (hlu : Perm l u) (huv : Forall₂ r u v) :
    (Forall₂ r ∘r Perm) l v
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem get?_eq_getElem? (l : List α) (i : Nat) : l.get? i = l[i]?
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
/-- A prepartition of `I : BoxIntegral.Box ι` is a finite set of pairwise disjoint subboxes of
`I`. -/
structure Prepartition (I : Box ι) where
  /-- The underlying set of boxes -/
  boxes : Finset (Box ι)
  /-- Each box is a sub-box of `I` -/
  le_of_mem' : ∀ J ∈ boxes, J ≤ I
  /-- The boxes in a prepartition are pairwise disjoint. -/
  pairwiseDisjoint : Set.Pairwise (↑boxes) (Disjoint on ((↑) : Box ι → Set (ι → ℝ)))
-- Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
lemma naturality_apply {P Q : PresheafOfModules R} (f : P ⟶ Q)
    {X Y : Cᵒᵖ} (g : X ⟶ Y) (x : P.obj X) :
    f.app Y (P.map g x) = Q.map g (f.app X x)
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem pmul_zeta (f : ArithmeticFunction R) : f.pmul ↑ζ = f
-- Mathlib/SetTheory/Surreal/Basic.lean
@[simp]
lemma mk_le_mk {x y : PGame.{u}} {hx hy} : mk x hx ≤ mk y hy ↔ x ≤ y
-- Mathlib/RingTheory/PowerSeries/Basic.lean
theorem coeff_zero_one : coeff R 0 (1 : R⟦X⟧) = 1
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
theorem pointwise_smul_le_iff₀ {a : α} (ha : a ≠ 0) {S T : AddSubgroup A} :
    a • S ≤ T ↔ S ≤ a⁻¹ • T
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem writtenInExtChartAt_chartAt_symm {x : M} {y : E} (h : y ∈ (extChartAt I x).target) :
    writtenInExtChartAt I I (chartAt H x x) (chartAt H x).symm y = y
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem compl_range_some (α : Type*) : (range (some : α → Option α))ᶜ = {none}
-- Mathlib/Data/Set/Basic.lean
theorem eq_empty_of_subset_empty {s : Set α} : s ⊆ ∅ → s = ∅
-- Mathlib/Data/Complex/Basic.lean
theorem mul_I_im (z : ℂ) : (z * I).im = z.re
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
/-- Closure of a subsemiring `S` equals `S`. -/
theorem closure_eq (s : Subsemiring R) : closure (s : Set R) = s
-- Mathlib/Analysis/Normed/Group/Quotient.lean
theorem lift_normNoninc {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M)
    (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) (fb : f.NormNoninc) :
    (lift S f hf).NormNoninc
-- Mathlib/Topology/Algebra/Module/LocallyConvex.lean
/-- A `LocallyConvexSpace` is a topological semimodule over an ordered semiring in which convex
neighborhoods of a point form a neighborhood basis at that point. -/
class LocallyConvexSpace (𝕜 E : Type*) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E]
    [TopologicalSpace E] : Prop where
  convex_basis : ∀ x : E, (𝓝 x).HasBasis (fun s : Set E => s ∈ 𝓝 x ∧ Convex 𝕜 s) id
-- Mathlib/Data/Nat/Defs.lean
/-- Given a predicate on two naturals `P : ℕ → ℕ → Prop`, `P a b` is true for all `a < b` if
`P (a + 1) (a + 1)` is true for all `a`, `P 0 (b + 1)` is true for all `b` and for all
`a < b`, `P (a + 1) b` is true and `P a (b + 1)` is true implies `P (a + 1) (b + 1)` is true. -/
@[elab_as_elim]
theorem diag_induction (P : ℕ → ℕ → Prop) (ha : ∀ a, P (a + 1) (a + 1)) (hb : ∀ b, P 0 (b + 1))
    (hd : ∀ a b, a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)) : ∀ a b, a < b → P a b
-- Mathlib/Data/Finset/Basic.lean
theorem union_subset (hs : s ⊆ u) : t ⊆ u → s ∪ t ⊆ u
-- Mathlib/Data/Nat/Defs.lean
lemma sqrt_mul_sqrt_lt_succ' (n : ℕ) : sqrt n ^ 2 < n + 1
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
theorem foldl_rev (f : Fin n → α → α) (x) :
    foldl n (fun x i => f i.rev x) x = foldr n f x
-- Mathlib/Algebra/Order/Monoid/NatCast.lean
lemma lt_one_add [One α] [AddZeroClass α] [PartialOrder α] [ZeroLEOneClass α]
    [NeZero (1 : α)] [CovariantClass α α (swap (·+·)) (·<·)] (a : α) : a < 1 + a
-- Mathlib/RingTheory/Polynomial/Opposites.lean
@[simp]
theorem opRingEquiv_symm_monomial (n : ℕ) (r : Rᵐᵒᵖ) :
    (opRingEquiv R).symm (monomial n r) = op (monomial n (unop r))
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem add_sub_self_left (a b : Nat) : (a + b) - a = b
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
protected theorem mul_pos (a b : ℤ√d) (a0 : 0 < a) (b0 : 0 < b) : 0 < a * b
-- Mathlib/Data/Nat/Defs.lean
lemma add_succ_lt_add (hab : a < b) (hcd : c < d) : a + c + 1 < b + d
-- Mathlib/Topology/Separation.lean
@[simp]
theorem limUnder_nhds_id (x : X) : @limUnder _ _ _ ⟨x⟩ (𝓝 x) id = x
-- Mathlib/Topology/MetricSpace/Bounded.lean
/-- If a function is continuous on a set `s` containing a compact set `k`, then it is bounded on
some open neighborhood of `k` in `s`. -/
theorem exists_isOpen_isBounded_image_inter_of_isCompact_of_continuousOn [TopologicalSpace β]
    {k s : Set β} {f : β → α} (hk : IsCompact k) (hks : k ⊆ s) (hf : ContinuousOn f s) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' (t ∩ s))
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem isPartition_single_iff (h : J ≤ I) : IsPartition (single I J h) ↔ J = I
-- Mathlib/ModelTheory/LanguageMap.lean
/-- A language equivalence maps the symbols of one language to symbols of another bijectively. -/
structure LEquiv (L L' : Language) where
  toLHom : L →ᴸ L'
  invLHom : L' →ᴸ L
  left_inv : invLHom.comp toLHom = LHom.id L
  right_inv : toLHom.comp invLHom = LHom.id L'
-- Mathlib/Tactic/CategoryTheory/MonoidalComp.lean
@[simps]
instance whiskerRight (X Y Z : C) [MonoidalCoherence X Y] :
    MonoidalCoherence (X ⊗ Z) (Y ⊗ Z)
-- Mathlib/RingTheory/Regular/RegularSequence.lean
lemma isWeaklyRegular_cons_iff' (r : R) (rs : List R) :
    IsWeaklyRegular M (r :: rs) ↔
      IsSMulRegular M r ∧
        IsWeaklyRegular (QuotSMulTop r M)
          (rs.map (Ideal.Quotient.mk (Ideal.span {r})))
-- .lake/packages/lean4/src/lean/Init/Data/Nat/MinMax.lean
protected theorem min_eq_left {a b : Nat} (h : a ≤ b) : min a b = a
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem two_zsmul_eq_iff {ψ θ : Angle} : (2 : ℤ) • ψ = (2 : ℤ) • θ ↔ ψ = θ ∨ ψ = θ + ↑π
-- Mathlib/Order/Heyting/Basic.lean
theorem sdiff_le_iff_left : a \ b ≤ b ↔ a ≤ b
-- Mathlib/Order/SuccPred/Basic.lean
theorem Ioo_pred_right_eq_insert (h : a < b) : Ioo (pred a) b = insert a (Ioo a b)
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
@[simp]
theorem iInf_coe {ι} (p : ι → Submodule R M) : (↑(⨅ i, p i) : Set M) = ⋂ i, ↑(p i)
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The composition of a `C^n` function on a domain with a `C^n` function is `C^n`. -/
theorem ContDiff.comp_contDiffOn {s : Set E} {g : F → G} {f : E → F} (hg : ContDiff 𝕜 n g)
    (hf : ContDiffOn 𝕜 n f s) : ContDiffOn 𝕜 n (g ∘ f) s
-- Mathlib/MeasureTheory/Measure/Restrict.lean
/-- The restriction of the pushforward measure is the pushforward of the restriction. For a version
assuming only `AEMeasurable`, see `restrict_map_of_aemeasurable`. -/
theorem restrict_map {f : α → β} (hf : Measurable f) {s : Set β} (hs : MeasurableSet s) :
    (μ.map f).restrict s = (μ.restrict <| f ⁻¹' s).map f
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem totalDegree_le_degrees_card (p : MvPolynomial σ R) :
    p.totalDegree ≤ Multiset.card p.degrees
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem erase_replicate_ne [LawfulBEq α] {a b : α} (h : !b == a) :
    (replicate n a).erase b = replicate n a
-- Mathlib/Topology/Compactness/Compact.lean
lemma IsCompact.elim_nhds_subcover_nhdsSet' (hs : IsCompact s) (U : ∀ x ∈ s, Set X)
    (hU : ∀ x hx, U x hx ∈ 𝓝 x) : ∃ t : Finset s, (⋃ x ∈ t, U x.1 x.2) ∈ 𝓝ˢ s
-- Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
lemma truncatedSup_union_right (hs : a ∉ lowerClosure s) (ht : a ∈ lowerClosure t) :
    truncatedSup (s ∪ t) a = truncatedSup t a
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
lemma δ_leftShift (a n' m' : ℤ) (hn' : n + a = n') (m : ℤ) (hm' : m + a = m') :
    δ n' m' (γ.leftShift a n' hn') = a.negOnePow • (δ n m γ).leftShift a m' hm'
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem alephIdx_le {a b} : alephIdx a ≤ alephIdx b ↔ a ≤ b
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive]
theorem unop_iSup (S : ι → Subgroup Gᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop
-- Mathlib/Analysis/SpecificLimits/FloorPow.lean
/-- If a monotone sequence `u` is such that `u n / n` tends to a limit `l` along subsequences with
exponential growth rate arbitrarily close to `1`, then `u n / n` tends to `l`. -/
theorem tendsto_div_of_monotone_of_exists_subseq_tendsto_div (u : ℕ → ℝ) (l : ℝ)
    (hmono : Monotone u)
    (hlim : ∀ a : ℝ, 1 < a → ∃ c : ℕ → ℕ, (∀ᶠ n in atTop, (c (n + 1) : ℝ) ≤ a * c n) ∧
      Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / c n) atTop (𝓝 l)) :
    Tendsto (fun n => u n / n) atTop (𝓝 l)
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
@[simp]
theorem norm_pow (z : ℤ_[p]) : ∀ n : ℕ, ‖z ^ n‖ = ‖z‖ ^ n
-- Mathlib/Topology/Order.lean
theorem isOpen_implies_isOpen_iff : (∀ s, IsOpen[t₁] s → IsOpen[t₂] s) ↔ t₂ ≤ t₁