ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Finset/Prod.lean
theorem subset_product [DecidableEq α] [DecidableEq β] {s : Finset (α × β)} :
    s ⊆ s.image Prod.fst ×ˢ s.image Prod.snd
-- Mathlib/Data/Matrix/PEquiv.lean
theorem mul_toPEquiv_toMatrix {m n α : Type*} [Fintype n] [DecidableEq n] [Semiring α] (f : n ≃ n)
    (M : Matrix m n α) : M * f.toPEquiv.toMatrix = M.submatrix id f.symm
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoMod_sub (a b : α) : toIcoMod hp a (b - p) = toIcoMod hp a b
-- Mathlib/Algebra/Ring/Ext.lean
theorem AddCommMonoidWithOne.toAddMonoidWithOne_injective :
    Function.Injective (@AddCommMonoidWithOne.toAddMonoidWithOne R)
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.range_restrict (f : α → β) (s : Set α) (t : Set β) (h : MapsTo f s t) :
    range (h.restrict f s t) = Subtype.val ⁻¹' (f '' s)
-- Mathlib/Data/Finset/Pairwise.lean
theorem pairwise_iff_coe_toFinset_pairwise (hn : l.Nodup) (hs : Symmetric r) :
    (l.toFinset : Set α).Pairwise r ↔ l.Pairwise r
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem two_pi_pos : 0 < 2 * π
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem length (h : Red L₁ L₂) : ∃ n, L₁.length = L₂.length + 2 * n
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem toSet_of_ZFSet (A : Class.{u}) (x : ZFSet.{u}) : ToSet A x ↔ A x
-- Mathlib/Topology/Sequences.lean
theorem IsCompact.tendsto_subseq' {s : Set X} {x : ℕ → X} (hs : IsCompact s)
    (hx : ∃ᶠ n in atTop, x n ∈ s) :
    ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_monoidOf (x) :
    (mulEquivOfQuotient f).symm (f.toMap x) = (monoidOf S).toMap x
-- Mathlib/Data/Set/Lattice.lean
theorem biInter_union (s t : Set α) (u : α → Set β) :
    ⋂ x ∈ s ∪ t, u x = (⋂ x ∈ s, u x) ∩ ⋂ x ∈ t, u x
-- Mathlib/Order/Heyting/Basic.lean
theorem sdiff_sdiff_left : (a \ b) \ c = a \ (b ⊔ c)
-- Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
theorem eq_unit_mul_pow_irreducible {x : R} (hx : x ≠ 0) {ϖ : R} (hirr : Irreducible ϖ) :
    ∃ (n : ℕ) (u : Rˣ), x = u * ϖ ^ n
-- Mathlib/FieldTheory/Separable.lean
theorem Separable.of_pow {f : R[X]} (hf : ¬IsUnit f) {n : ℕ} (hn : n ≠ 0)
    (hfs : (f ^ n).Separable) : f.Separable ∧ n = 1
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem Decidable.not_or_of_imp [Decidable a] (h : a → b) : ¬a ∨ b
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem top_bihimp : ⊤ ⇔ a = a
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma nndist_pi_lt_iff {f g : ∀ b, π b} {r : ℝ≥0} (hr : 0 < r) :
    nndist f g < r ↔ ∀ b, nndist (f b) (g b) < r
-- Mathlib/Algebra/Ring/Ext.lean
@[ext] theorem ext ⦃inst₁ inst₂ : NonAssocSemiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂
-- Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
/-- The `Γ` function (of a complex variable `s`). -/
@[pp_nodot]
irreducible_def Gamma (s : ℂ) : ℂ
-- Mathlib/Order/RelIso/Basic.lean
protected theorem isTrichotomous : ∀ (_ : r ↪r s) [IsTrichotomous β s], IsTrichotomous α r
-- Mathlib/Computability/PartrecCode.lean
theorem pair_prim : Primrec₂ pair
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The second projection in a product is `C^∞`. -/
theorem contDiff_snd : ContDiff 𝕜 n (Prod.snd : E × F → F)
-- Mathlib/MeasureTheory/Measure/Haar/Unique.lean
/-- If an invariant measure is inner regular, then it gives less mass to sets with compact closure
than any other invariant measure, up to the scalar `haarScalarFactor μ' μ`.

Auxiliary lemma in the proof of the more general
`measure_isMulInvariant_eq_smul_of_isCompact_closure`, which gives equality for any
set with compact closure. -/
@[to_additive smul_measure_isAddInvariant_le_of_isCompact_closure
"If an invariant measure is inner regular, then it gives less mass to sets with compact closure
than any other invariant measure, up to the scalar `addHaarScalarFactor μ' μ`.

Auxiliary lemma in the proof of the more general
`measure_isAddInvariant_eq_smul_of_isCompact_closure`, which gives equality for any
set with compact closure."]
lemma smul_measure_isMulInvariant_le_of_isCompact_closure [LocallyCompactSpace G]
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ']
    [InnerRegularCompactLTTop μ]
    {s : Set G} (hs : MeasurableSet s) (h's : IsCompact (closure s)) :
    haarScalarFactor μ' μ • μ s ≤ μ' s
-- Mathlib/Logic/Function/Defs.lean
@[simp, mfld_simps]
theorem id_comp (f : α → β) : id ∘ f = f
-- Mathlib/Topology/Homotopy/HSpaces.lean
theorem one_eq_hSpace_e {G : Type u} [TopologicalSpace G] [Group G] [TopologicalGroup G] :
    (1 : G) = HSpace.e
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem FractionalIdeal.adjoinIntegral_eq_one_of_isUnit [Algebra A K] [IsFractionRing A K] (x : K)
    (hx : IsIntegral A x) (hI : IsUnit (adjoinIntegral A⁰ x hx)) : adjoinIntegral A⁰ x hx = 1
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem ih_0 : ih 0 a
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atBot_mono' [Preorder β] (l : Filter α) ⦃f₁ f₂ : α → β⦄ (h : f₁ ≤ᶠ[l] f₂) :
    Tendsto f₂ l atBot → Tendsto f₁ l atBot
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
theorem nullMeasurableSet_smul (h : IsFundamentalDomain G s μ) (g : G) :
    NullMeasurableSet (g • s) μ
-- Mathlib/CategoryTheory/Preadditive/Basic.lean
/-- A preadditive category has a cokernel for `f - g` if it has a coequalizer for `f` and `g`. -/
theorem hasCokernel_of_hasCoequalizer [HasCoequalizer f g] : HasCokernel (f - g)
-- Mathlib/Control/Traversable/Instances.lean
protected theorem comp_traverse {α β γ} (f : β → F γ) (g : α → G β) (x : List α) :
    List.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
    Comp.mk (List.traverse f <$> List.traverse g x)
-- Mathlib/CategoryTheory/Sums/Associator.lean
@[simp]
theorem inverseAssociator_map_inl {X Y : C} (f : inl X ⟶ inl Y) :
    (inverseAssociator C D E).map f = f
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
@[simp]
lemma Φ_zero : W.Φ 0 = 1
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
@[simp]
theorem range_basisSingleton (ι : Type*) [Unique ι] (h : finrank K V = 1) (v : V) (hv : v ≠ 0) :
    Set.range (basisSingleton ι h v hv) = {v}
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
theorem _root_.Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux {f : E → F}
    (hf_temperate : f.HasTemperateGrowth) (n : ℕ) :
    ∃ (k : ℕ) (C : ℝ), 0 ≤ C ∧ ∀ N ≤ n, ∀ x : E, ‖iteratedFDeriv ℝ N f x‖ ≤ C * (1 + ‖x‖) ^ k
-- Mathlib/CategoryTheory/Iso.lean
@[simp]
theorem trans_mk {X Y Z : C} (hom : X ⟶ Y) (inv : Y ⟶ X) (hom_inv_id) (inv_hom_id)
    (hom' : Y ⟶ Z) (inv' : Z ⟶ Y) (hom_inv_id') (inv_hom_id') (hom_inv_id'') (inv_hom_id'') :
    Iso.trans ⟨hom, inv, hom_inv_id, inv_hom_id⟩ ⟨hom', inv', hom_inv_id', inv_hom_id'⟩ =
     ⟨hom ≫ hom', inv' ≫ inv, hom_inv_id'', inv_hom_id''⟩
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem isRadical_iInf {ι} (I : ι → Ideal R) (hI : ∀ i, IsRadical (I i)) : IsRadical (⨅ i, I i)
-- Mathlib/Order/JordanHolder.lean
theorem length_eq {s₁ s₂ : CompositionSeries X} (h : Equivalent s₁ s₂) : s₁.length = s₂.length
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem Integrable.left_of_add_measure {f : α → β} (h : Integrable f (μ + ν)) : Integrable f μ
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem prev_of_valid (cs : List Char) (c : Char) (cs' : List Char) :
    prev ⟨cs ++ c :: cs'⟩ ⟨utf8Len cs + c.utf8Size⟩ = ⟨utf8Len cs⟩
-- Mathlib/CategoryTheory/Abelian/Exact.lean
theorem exact_kernel {X Y : C} (f : X ⟶ Y) :
    (ShortComplex.mk (kernel.ι f) f (by simp)).Exact
-- Mathlib/Analysis/BoxIntegral/Partition/Additive.lean
/-- If `f` is box-additive on subboxes of `I₀`, then it is box-additive on subboxes of any
`I ≤ I₀`. -/
@[simps]
def restrict (f : ι →ᵇᵃ[I₀] M) (I : WithTop (Box ι)) (hI : I ≤ I₀) : ι →ᵇᵃ[I] M
-- Mathlib/RingTheory/IsAdjoinRoot.lean
theorem isIntegral_root (h : IsAdjoinRootMonic S f) : IsIntegral R h.root
-- Mathlib/Algebra/Star/SelfAdjoint.lean
@[aesop safe apply]
theorem conjugate {x : R} (hx : IsSelfAdjoint x) (z : R) : IsSelfAdjoint (z * x * star z)
-- Mathlib/LinearAlgebra/Ray.lean
protected theorem rfl : SameRay R x x
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[simp]
protected theorem map_smulₛₗ (c : R) (x : M) : f (c • x) = σ c • f x
-- Mathlib/Analysis/Convex/Gauge.lean
/-- If the given subset is `Absorbent` then the set we take an infimum over in `gauge` is nonempty,
which is useful for proving many properties about the gauge.  -/
theorem Absorbent.gauge_set_nonempty (absorbs : Absorbent ℝ s) :
    { r : ℝ | 0 < r ∧ x ∈ r • s }.Nonempty
-- Mathlib/Topology/MetricSpace/Gluing.lean
private theorem glueDist_triangle_inl_inr_inr (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (x : X) (y z : Y) :
    glueDist Φ Ψ ε (.inl x) (.inr z) ≤
      glueDist Φ Ψ ε (.inl x) (.inr y) + glueDist Φ Ψ ε (.inr y) (.inr z)
-- Mathlib/Data/Finset/Pointwise.lean
@[simp]
theorem toFinset_vsub (s t : Set β) [Fintype s] [Fintype t] [Fintype ↑(s -ᵥ t)] :
    (s -ᵥ t : Set α).toFinset = s.toFinset -ᵥ t.toFinset
-- Mathlib/Data/Set/Prod.lean
theorem update_image [DecidableEq ι] (x : (i : ι) → β i) (i : ι) (s : Set (β i)) :
    update x i '' s = Set.univ.pi (update (fun j ↦ {x j}) i s)
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem exists_forall_norm_le (f : α →ₛ F) : ∃ C, ∀ x, ‖f x‖ ≤ C
-- Mathlib/Topology/Maps/Basic.lean
theorem OpenEmbedding.tendsto_nhds_iff' (hf : OpenEmbedding f) {l : Filter Z} {x : X} :
    Tendsto (g ∘ f) (𝓝 x) l ↔ Tendsto g (𝓝 (f x)) l
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
lemma f_modif_aux1 : EqOn (fun x ↦ P.f_modif x - P.f x + P.f₀)
    ((Ioo 0 1).indicator (fun x : ℝ ↦ P.f₀ - (P.ε * ↑(x ^ (-P.k))) • P.g₀)
    + ({1} : Set ℝ).indicator (fun _ ↦ P.f₀ - P.f 1)) (Ioi 0)
-- Mathlib/RingTheory/Perfection.lean
theorem v_p_lt_preVal {x : ModP K v O hv p} : v p < preVal K v O hv p x ↔ x ≠ 0
-- Mathlib/Topology/Algebra/InfiniteSum/Nonarchimedean.lean
/-- Let `G` be a nonarchimedean multiplicative abelian group, and let `f : α → G` be a function that
tends to one on the filter of cofinite sets. For each finite subset of `α`, consider the partial
product of `f` on that subset. These partial products form a Cauchy filter. -/
@[to_additive "Let `G` be a nonarchimedean additive abelian group, and let `f : α → G` be a function
that tends to zero on the filter of cofinite sets. For each finite subset of `α`, consider the
partial sum of `f` on that subset. These partial sums form a Cauchy filter."]
theorem cauchySeq_prod_of_tendsto_cofinite_one {f : α → G} (hf : Tendsto f cofinite (𝓝 1)) :
    CauchySeq (fun s ↦ ∏ i ∈ s, f i)
-- Mathlib/Topology/Algebra/Order/Group.lean
@[continuity]
theorem continuous_abs : Continuous (abs : G → G)
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
@[simp]
theorem factors_one : factors (1 : α) = 0
-- Mathlib/Order/Filter/Germ/Basic.lean
@[simp]
theorem coe_compTendsto' (f : α → β) {lc : Filter γ} {g : Germ lc α} (hg : g.Tendsto l) :
    (f : Germ l β).compTendsto' g hg = g.map f
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
theorem disjoint_ball_ball_iff (hδ : 0 < δ) (hε : 0 < ε) :
    Disjoint (ball x δ) (ball y ε) ↔ δ + ε ≤ dist x y
-- Mathlib/LinearAlgebra/Dimension/RankNullity.lean
lemma rank_quotient_add_rank (N : Submodule R M) :
    Module.rank R (M ⧸ N) + Module.rank R N = Module.rank R M
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem support_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h p).support = u :: p.support
-- Mathlib/CategoryTheory/PathCategory.lean
/-- The inclusion of a quiver `V` into its path category, as a prefunctor.
-/
@[simps]
def of : V ⥤q Paths V
-- Mathlib/Data/Sign.lean
theorem neg_one_lt_iff {a : SignType} : -1 < a ↔ 0 ≤ a
-- Mathlib/CategoryTheory/Limits/Shapes/Reflexive.lean
/-- `C` has coreflexive equalizers if it has equalizers for every coreflexive pair. -/
class HasCoreflexiveEqualizers : Prop where
  has_eq : ∀ ⦃A B : C⦄ (f g : A ⟶ B) [IsCoreflexivePair f g], HasEqualizer f g
-- Mathlib/Order/Irreducible.lean
@[simp]
theorem infPrime_ofDual {a : αᵒᵈ} : InfPrime (ofDual a) ↔ SupPrime a
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem uIcc_subset_Icc (ha : a₁ ∈ Icc a₂ b₂) (hb : b₁ ∈ Icc a₂ b₂) : [[a₁, b₁]] ⊆ Icc a₂ b₂
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem coe_coeHom : (coeHom : ℝ → Angle) = ((↑) : ℝ → Angle)
-- Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
theorem Integrable.ae_eq_of_forall_setIntegral_eq (f g : α → E) (hf : Integrable f μ)
    (hg : Integrable g μ)
    (hfg : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ) :
    f =ᵐ[μ] g
-- Mathlib/Data/Complex/Exponential.lean
theorem exp_add_mul_I : exp (x + y * I) = exp x * (cos y + sin y * I)
-- Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean
lemma jacobiTheta₂'_add_left (z τ : ℂ) : jacobiTheta₂' (z + 1) τ = jacobiTheta₂' z τ
-- Mathlib/NumberTheory/LucasLehmer.lean
theorem sZMod_eq_s (p' : ℕ) (i : ℕ) : sZMod (p' + 2) i = (s i : ZMod (2 ^ (p' + 2) - 1))
-- Mathlib/MeasureTheory/Covering/Besicovitch.lean
/-- The main feature of the Besicovitch Vitali family is that its filter at a point `x` corresponds
to convergence along closed balls. We record one of the two implications here, which will enable us
to deduce specific statements on differentiation of measures in this context from the general
versions. -/
theorem tendsto_filterAt (μ : Measure α) [SFinite μ] (x : α) :
    Tendsto (fun r => closedBall x r) (𝓝[>] 0) ((Besicovitch.vitaliFamily μ).filterAt x)
-- Mathlib/CategoryTheory/Triangulated/Subcategory.lean
lemma isoClosure_W : S.isoClosure.W = S.W
-- Mathlib/Order/Concept.lean
@[simp]
theorem intentClosure_empty : intentClosure r ∅ = univ
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem coe_id : ⇑(SupBotHom.id α) = id
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem add_eq_zero_iff {a b : Ordinal} : a + b = 0 ↔ a = 0 ∧ b = 0
-- Mathlib/Topology/Instances/ENNReal.lean
theorem tsum_pos {g : α → ℝ≥0} (hg : Summable g) (i : α) (hi : 0 < g i) : 0 < ∑' b, g b
-- Mathlib/LinearAlgebra/Charpoly/Basic.lean
lemma charpoly_natDegree [StrongRankCondition R] : natDegree (charpoly f) = finrank R M
-- Mathlib/Condensed/Basic.lean
@[ext]
lemma hom_ext {X Y : Condensed.{u} C} (f g : X ⟶ Y) (h : ∀ S, f.val.app S = g.val.app S) :
    f = g
-- Mathlib/Combinatorics/Configuration.lean
theorem HasPoints.lineCount_eq_pointCount [HasPoints P L] [Fintype P] [Fintype L]
    (hPL : Fintype.card P = Fintype.card L) {p : P} {l : L} (hpl : p ∉ l) :
    lineCount L p = pointCount P l
-- Mathlib/RingTheory/OreLocalization/Basic.lean
@[to_additive (attr := simp)]
protected theorem one_div_smul {r : X} {s t : S} : ((1 : R) /ₒ t) • (r /ₒ s) = r /ₒ (s * t)
-- Mathlib/Analysis/Convex/Strict.lean
theorem StrictConvex.smul (hs : StrictConvex 𝕜 s) (c : 𝕝) : StrictConvex 𝕜 (c • s)
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem isEqv_cons_nil : isEqv (a::as : List α) [] eqv = false
-- Mathlib/Topology/Instances/Matrix.lean
theorem Matrix.transpose_tsum [T2Space R] {f : X → Matrix m n R} : (∑' x, f x)ᵀ = ∑' x, (f x)ᵀ
-- Mathlib/RingTheory/HahnSeries/Basic.lean
@[simp]
theorem zero_ofSuppBddBelow [Nonempty Γ] : ofSuppBddBelow 0 BddBelow_zero = (0 : HahnSeries Γ R)
-- Mathlib/Analysis/Complex/Tietze.lean
theorem Metric.instTietzeExtensionClosedBall (𝕜 : Type v) [RCLike 𝕜] {E : Type w}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] [FiniteDimensional 𝕜 E] (y : E) {r : ℝ} (hr : 0 < r) :
    TietzeExtension.{u, w} (Metric.closedBall y r)
-- Mathlib/Algebra/Group/Subgroup/Order.lean
/-- In a group that satisfies the normalizer condition, every maximal subgroup is normal -/
theorem NormalizerCondition.normal_of_coatom (hnc : NormalizerCondition G) (hmax : IsCoatom H) :
    H.Normal
-- Mathlib/Topology/Basic.lean
theorem continuous_iff_ultrafilter :
    Continuous f ↔ ∀ (x) (g : Ultrafilter X), ↑g ≤ 𝓝 x → Tendsto f g (𝓝 (f x))
-- Mathlib/Algebra/Order/Field/Unbundled/Basic.lean
lemma div_nonneg [PosMulMono α] (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a / b
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- If `f` has a local max on `s` at `a`, `f'` is a derivative of `f` at `a` within `s`, and
both `y` and `-y` belong to the positive tangent cone of `s` at `a`, then `f' y ≤ 0`. -/
theorem IsLocalMaxOn.hasFDerivWithinAt_eq_zero (h : IsLocalMaxOn f s a)
    (hf : HasFDerivWithinAt f f' s a) (hy : y ∈ posTangentConeAt s a)
    (hy' : -y ∈ posTangentConeAt s a) : f' y = 0
-- Mathlib/RingTheory/Presentation.lean
@[simp]
lemma quotientEquiv_symm (x : S) : P.quotientEquiv.symm x = P.σ x
-- Mathlib/Algebra/Bounds.lean
@[to_additive (attr := simp)]
theorem bddAbove_inv : BddAbove s⁻¹ ↔ BddBelow s
-- Mathlib/Computability/Primrec.lean
theorem PrimrecRel.of_eq {α β} [Primcodable α] [Primcodable β] {r s : α → β → Prop}
    [∀ a b, Decidable (r a b)] [∀ a b, Decidable (s a b)] (hr : PrimrecRel r)
    (H : ∀ a b, r a b ↔ s a b) : PrimrecRel s
-- Mathlib/Analysis/BoxIntegral/Partition/Split.lean
theorem splitLower_def [DecidableEq ι] {i x} (h : x ∈ Ioo (I.lower i) (I.upper i))
    (h' : ∀ j, I.lower j < update I.upper i x j :=
      (forall_update_iff I.upper fun j y => I.lower j < y).2
        ⟨h.1, fun j _ => I.lower_lt_upper _⟩) :
    I.splitLower i x = (⟨I.lower, update I.upper i x, h'⟩ : Box ι)
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem mul_subset_iff_right : s * t ⊆ u ↔ ∀ b ∈ t, op b • s ⊆ u
-- Mathlib/Data/Finsupp/Basic.lean
@[simp, norm_cast]
theorem cast_finsupp_prod [CommSemiring R] (g : α → M → ℕ) :
    (↑(f.prod g) : R) = f.prod fun a b => ↑(g a b)
-- Mathlib/Order/RelSeries.lean
@[simp] lemma last_tail (p : RelSeries r) (len_pos : p.length ≠ 0) :
    (p.tail len_pos).last = p.last
-- Mathlib/Topology/Order/OrderClosed.lean
theorem frontier_lt_subset_eq (hf : Continuous f) (hg : Continuous g) :
    frontier { b | f b < g b } ⊆ { b | f b = g b }
-- Mathlib/Algebra/Group/Hom/Basic.lean
/-- The `n`-th power map (for an integer `n`) on a commutative group, considered as a group
homomorphism. -/
@[to_additive (attr := simps) "Multiplication by an integer `n` on a commutative additive group,
considered as an additive group homomorphism."]
def zpowGroupHom (n : ℤ) : α →* α
-- Mathlib/Algebra/Group/Submonoid/Pointwise.lean
theorem pow_subset_pow {s : AddSubmonoid R} {n : ℕ} : (↑s : Set R) ^ n ⊆ ↑(s ^ n)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem bsup_eq_zero_iff {o} {f : ∀ a < o, Ordinal} : bsup o f = 0 ↔ ∀ i hi, f i hi = 0
-- Mathlib/Topology/Basic.lean
theorem interior_subset_closure : interior s ⊆ closure s
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem uniformContinuous_iff [PseudoMetricSpace β] {f : α → β} :
    UniformContinuous f ↔ ∀ ε > 0, ∃ δ > 0, ∀ {a b : α}, dist a b < δ → dist (f a) (f b) < ε
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem mk.eta {R : Type*} {c₁ c₂} (a : ℍ[R,c₁,c₂]) : mk a.1 a.2 a.3 a.4 = a
-- Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean
@[reassoc (attr := simp)]
theorem toSheafify_sheafifyLift {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (hQ : Presheaf.IsSheaf J Q) :
    J.toSheafify P ≫ sheafifyLift J η hQ = η
-- Mathlib/Algebra/Polynomial/Div.lean
@[simp]
theorem modByMonic_zero (p : R[X]) : p %ₘ 0 = p
-- Mathlib/Data/DFinsupp/Order.lean
theorem le_iff : f ≤ g ↔ ∀ i ∈ f.support, f i ≤ g i
-- Mathlib/RingTheory/Polynomial/Content.lean
theorem aeval_primPart_eq_zero {S : Type*} [Ring S] [IsDomain S] [Algebra R S]
    [NoZeroSMulDivisors R S] {p : R[X]} {s : S} (hpzero : p ≠ 0) (hp : aeval s p = 0) :
    aeval s p.primPart = 0
-- Mathlib/Algebra/Associated/Basic.lean
theorem Associated.of_mul_right [CancelCommMonoidWithZero α] {a b c d : α} :
    a * b ~ᵤ c * d → b ~ᵤ d → b ≠ 0 → a ~ᵤ c
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
lemma cfcₙHom_predicate (f : C(σₙ R a, R)₀) :
    p (cfcₙHom ha f)
-- Mathlib/MeasureTheory/Decomposition/Jordan.lean
theorem toSignedMeasure_zero : (0 : JordanDecomposition α).toSignedMeasure = 0
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem coeIdeal_ne_zero' {I : Ideal R} (h : S ≤ nonZeroDivisors R) :
    (I : FractionalIdeal S P) ≠ 0 ↔ I ≠ (⊥ : Ideal R)
-- Mathlib/Data/NNReal/Basic.lean
@[simp]
theorem _root_.Real.toNNReal_ofNat (n : ℕ) [n.AtLeastTwo] :
    Real.toNNReal (no_index (OfNat.ofNat n)) = OfNat.ofNat n
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem aleph_toPartENat (o : Ordinal) : toPartENat (aleph o) = ⊤
-- Mathlib/Order/Lattice.lean
/-- Pointwise maximum of two monotone functions is a monotone function. -/
protected theorem max [Preorder α] [LinearOrder β] {f g : α → β} (hf : Antitone f)
    (hg : Antitone g) :
    Antitone fun x => max (f x) (g x)
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- The `vectorSpan` of a finite affinely independent family has
dimension one less than its cardinality. -/
theorem AffineIndependent.finrank_vectorSpan [Fintype ι] {p : ι → P} (hi : AffineIndependent k p)
    {n : ℕ} (hc : Fintype.card ι = n + 1) : finrank k (vectorSpan k (Set.range p)) = n
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem _root_.affineSpan_le {s : Set P} {Q : AffineSubspace k P} :
    affineSpan k s ≤ Q ↔ s ⊆ (Q : Set P)
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem QuotientAddGroup.equivIcoMod_coe (a b : α) :
    QuotientAddGroup.equivIcoMod hp a ↑b = ⟨toIcoMod hp a b, toIcoMod_mem_Ico hp a _⟩
-- Mathlib/Analysis/Calculus/FDeriv/Linear.lean
@[fun_prop]
protected theorem ContinuousLinearMap.differentiableWithinAt : DifferentiableWithinAt 𝕜 e s x
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_comp' (g f : R → R) (a : A) (hg : ContinuousOn g (f '' spectrum R a) := by cfc_cont_tac)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc (g <| f ·) a = cfc g (cfc f a)
-- Mathlib/Algebra/Homology/Additive.lean
@[simp]
theorem NatTrans.mapHomologicalComplex_comp (c : ComplexShape ι) {F G H : W₁ ⥤ W₂}
    [F.PreservesZeroMorphisms] [G.PreservesZeroMorphisms] [H.PreservesZeroMorphisms]
    (α : F ⟶ G) (β : G ⟶ H) :
    NatTrans.mapHomologicalComplex (α ≫ β) c =
      NatTrans.mapHomologicalComplex α c ≫ NatTrans.mapHomologicalComplex β c
-- Mathlib/Topology/Sets/Opens.lean
@[simp, norm_cast]
theorem coe_bot : ((⊥ : Opens α) : Set α) = ∅
-- Mathlib/GroupTheory/Schreier.lean
/-- A theorem of Schur: The size of the commutator subgroup is bounded in terms of the number of
  commutators. -/
theorem card_commutator_le_of_finite_commutatorSet [Finite (commutatorSet G)] :
    Nat.card (_root_.commutator G) ≤ cardCommutatorBound (Nat.card (commutatorSet G))
-- Mathlib/Control/Traversable/Basic.lean
@[simp]
theorem coe_mk (f : ∀ α : Type u, F α → G α) (pp ps) :
    (ApplicativeTransformation.mk f @pp @ps) = f
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem SymmetricRel.eq {U : Set (α × α)} (hU : SymmetricRel U) : Prod.swap ⁻¹' U = U
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem map_le_iff_le_comap {f : F} {p : Submodule R M} {q : Submodule R₂ M₂} :
    map f p ≤ q ↔ p ≤ comap f q
-- Mathlib/Data/Int/Defs.lean
lemma dvd_mul_of_div_dvd (h : b ∣ a) (hdiv : a / b ∣ c) : a ∣ b * c
-- Mathlib/LinearAlgebra/Trace.lean
theorem trace_comp_comm' (f : M →ₗ[R] N) (g : N →ₗ[R] M) :
    trace R M (g ∘ₗ f) = trace R N (f ∘ₗ g)
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
/-- Auxiliary lemma for `iSup_restrict_spanningSets`. -/
theorem iSup_restrict_spanningSets_of_measurableSet [SigmaFinite μ] (hs : MeasurableSet s) :
    ⨆ i, μ.restrict (spanningSets μ i) s = μ s
-- .lake/packages/batteries/Batteries/Classes/SatisfiesM.lean
/--
`SatisfiesM` distributes over `<$>`, strongest postcondition version.
(Use this for reasoning forward from assumptions.)
-/
theorem map_post [Functor m] [LawfulFunctor m] {x : m α}
    (hx : SatisfiesM p x) : SatisfiesM (fun b => ∃ a, p a ∧ b = f a) (f <$> x)
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[simp 1100]
theorem basicOpen_res_eq (i : op U ⟶ op V) [IsIso i] :
    X.basicOpen (X.presheaf.map i f) = X.basicOpen f
-- .lake/packages/batteries/Batteries/Classes/Order.lean
theorem le_lt_trans (h₁ : cmp x y ≠ .gt) (h₂ : cmp y z = .lt) : cmp x z = .lt