ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Logic/Embedding/Basic.lean
theorem Equiv.toEmbedding_injective : Function.Injective (Equiv.toEmbedding : (α ≃ β) → (α ↪ β))
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma homOf_ofHom_eq_self (φ : F ⟶ G) : homOf (ofHom φ) = φ
-- Mathlib/Combinatorics/SimpleGraph/Hamiltonian.lean
/-- The length of a hamiltonian path is one less than the number of vertices of the graph. -/
lemma IsHamiltonian.length_eq (hp : p.IsHamiltonian) : p.length = Fintype.card α - 1
-- Mathlib/Data/Nat/ModEq.lean
theorem modEq_and_modEq_iff_modEq_mul {a b m n : ℕ} (hmn : m.Coprime n) :
    a ≡ b [MOD m] ∧ a ≡ b [MOD n] ↔ a ≡ b [MOD m * n]
-- Mathlib/LinearAlgebra/FiniteDimensional.lean
/-- The dimension of a strict submodule is strictly bounded by the dimension of the ambient
space. -/
theorem finrank_lt [FiniteDimensional K V] {s : Submodule K V} (h : s < ⊤) :
    finrank K s < finrank K V
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ioo_def (a b : α) : { x | a < x ∧ x < b } = Ioo a b
-- Mathlib/Order/Filter/Basic.lean
theorem map_comm (H : ψ ∘ φ = ρ ∘ θ) (F : Filter α) :
    map ψ (map φ F) = map ρ (map θ F)
-- Mathlib/Algebra/NeZero.lean
@[simp] lemma neZero_zero_iff_false {α : Type*} [Zero α] : NeZero (0 : α) ↔ False
-- Mathlib/ModelTheory/Satisfiability.lean
theorem IsMaximal.isComplete (h : T.IsMaximal) : T.IsComplete
-- Mathlib/Topology/Algebra/OpenSubgroup.lean
@[to_additive]
protected theorem isOpen : IsOpen (U : Set G)
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
lemma IsIntegralCurveOn.isIntegralCurveAt (h : IsIntegralCurveOn γ v s) (hs : s ∈ 𝓝 t₀) :
    IsIntegralCurveAt γ v t₀
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- If three points lie in the affine span of two points, the first four points are collinear. -/
theorem collinear_insert_insert_insert_left_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ p₅ : P}
    (h₁ : p₁ ∈ line[k, p₄, p₅]) (h₂ : p₂ ∈ line[k, p₄, p₅]) (h₃ : p₃ ∈ line[k, p₄, p₅]) :
    Collinear k ({p₁, p₂, p₃, p₄} : Set P)
-- Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
/-- If a function is countably sub-multiplicative then it is sub-multiplicative on finite sets -/
@[to_additive "If a function is countably sub-additive then it is sub-additive on finite sets"]
theorem rel_iSup_prod [CompleteLattice α] (m : α → M) (m0 : m ⊥ = 1) (R : M → M → Prop)
    (m_iSup : ∀ s : ℕ → α, R (m (⨆ i, s i)) (∏' i, m (s i))) (s : γ → α) (t : Finset γ) :
    R (m (⨆ d ∈ t, s d)) (∏ d ∈ t, m (s d))
-- Mathlib/AlgebraicTopology/SplitSimplicialObject.lean
theorem hom_ext' {Z : C} {Δ : SimplexCategoryᵒᵖ} (f g : X.obj Δ ⟶ Z)
    (h : ∀ A : IndexSet Δ, (s.cofan Δ).inj A ≫ f = (s.cofan Δ).inj A ≫ g) : f = g
-- Mathlib/Algebra/Group/Action/Defs.lean
/-- `SMul` version of `comp_mul_left` -/
@[to_additive "`VAdd` version of `comp_add_left`"]
lemma comp_smul_left (a₁ a₂ : M) : (a₁ • ·) ∘ (a₂ • ·) = (((a₁ * a₂) • ·) : α → α)
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[simp]
theorem zero_compLinearMap (g : M₂ →ₗ[R] M) : (0 : M [⋀^ι]→ₗ[R] N).compLinearMap g = 0
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_subset_Iic_union_Ico : Iio b ⊆ Iic a ∪ Ico a b
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem shortestPrefixDiff_pos {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty)
    {x : ∀ n, E n} (hx : x ∉ s) : 0 < shortestPrefixDiff x s
-- Mathlib/Data/Set/Function.lean
theorem InjOn.mono (h : s₁ ⊆ s₂) (ht : InjOn f s₂) : InjOn f s₁
-- Mathlib/Data/Nat/Squarefree.lean
lemma primeFactors_prod (hs : ∀ p ∈ s, p.Prime) : primeFactors (∏ p ∈ s, p) = s
-- Mathlib/Topology/LocallyConstant/Algebra.lean
/-- `LocallyConstant.congrLeft` as an `AlgEquiv`. -/
@[simps!]
def congrLeftₐ (R : Type*) [CommSemiring R] [Semiring Z] [Algebra R Z] (e : X ≃ₜ Y) :
    LocallyConstant X Z ≃ₐ[R] LocallyConstant Y Z
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean
theorem two_mul_arctan_inv_3_add_arctan_inv_7 : 2 * arctan 3⁻¹ + arctan 7⁻¹ = π / 4
-- Mathlib/Data/List/Sigma.lean
theorem mem_keys_of_mem {s : Sigma β} {l : List (Sigma β)} : s ∈ l → s.1 ∈ l.keys
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- Congruence relations are symmetric. -/
@[to_additive "Additive congruence relations are symmetric."]
protected theorem symm {x y} : c x y → c y x
-- Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean
lemma minpolyDiv_ne_zero [Nontrivial S] : minpolyDiv R x ≠ 0
-- Mathlib/GroupTheory/Submonoid/Center.lean
/-- For a monoid, the units of the center inject into the center of the units. This is not an
equivalence in general; one case when it is is for groups with zero, which is covered in
`centerUnitsEquivUnitsCenter`. -/
@[to_additive (attr := simps! apply_coe_val)
  "For an additive monoid, the units of the center inject into the center of the units."]
def unitsCenterToCenterUnits [Monoid M] : (Submonoid.center M)ˣ →* Submonoid.center (Mˣ)
-- Mathlib/Data/Multiset/Basic.lean
theorem countP_pos_of_mem {s a} (h : a ∈ s) (pa : p a) : 0 < countP p s
-- Mathlib/Algebra/EuclideanDomain/Basic.lean
@[simp]
theorem lcm_zero_left (x : R) : lcm 0 x = 0
-- Mathlib/Order/Atoms.lean
theorem isSimpleOrder_iff_isSimpleOrder_orderDual [LE α] [BoundedOrder α] :
    IsSimpleOrder α ↔ IsSimpleOrder αᵒᵈ
-- Mathlib/Topology/Algebra/Module/FiniteDimension.lean
@[simp]
theorem coe_toContinuousLinearMap (f : E →ₗ[𝕜] F') :
    ((LinearMap.toContinuousLinearMap f) : E →ₗ[𝕜] F') = f
-- Mathlib/Topology/PartialHomeomorph.lean
@[simp, mfld_simps]
theorem ofSet_trans_ofSet {s : Set X} (hs : IsOpen s) {s' : Set X} (hs' : IsOpen s') :
    (ofSet s hs).trans (ofSet s' hs') = ofSet (s ∩ s') (IsOpen.inter hs hs')
-- Mathlib/Order/WithBot.lean
@[simp]
theorem map_top (f : α → β) : map f ⊤ = ⊤
-- Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
@[simp] lemma degree_leadingCoeff_inv {p : K[X]} (hp0 : p ≠ 0) :
    degree (C (leadingCoeff p)⁻¹) = 0
-- Mathlib/Order/MinMax.lean
theorem max_lt_max_left_iff : max a c < max b c ↔ a < b ∧ c < b
-- Mathlib/RingTheory/HahnSeries/Basic.lean
theorem embDomain_notin_image_support {f : Γ ↪o Γ'} {x : HahnSeries Γ R} {b : Γ'}
    (hb : b ∉ f '' x.support) : (embDomain f x).coeff b = 0
-- Mathlib/Data/List/OfFn.lean
/-- Note we can only state this when the two functions are indexed by defeq `n`. -/
theorem ofFn_injective {n : ℕ} : Function.Injective (ofFn : (Fin n → α) → List α)
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
theorem setIntegral_eq_tsum' (h : IsFundamentalDomain G s μ) {f : α → E} {t : Set α}
    (hf : IntegrableOn f t μ) : ∫ x in t, f x ∂μ = ∑' g : G, ∫ x in g • t ∩ s, f (g⁻¹ • x) ∂μ
-- Mathlib/Data/List/Basic.lean
lemma lookup_graph (f : α → β) {a : α} {as : List α} (h : a ∈ as) :
    lookup a (as.map fun x => (x, f x)) = some (f a)
-- Mathlib/CategoryTheory/Monad/Algebra.lean
@[simp]
theorem id_f (A : Algebra T) : (𝟙 A : A ⟶ A).f = 𝟙 A.A
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
theorem closure_neg (s : Set M) : span R (-s) = -span R s
-- Mathlib/Algebra/Order/Group/Basic.lean
@[to_additive zsmul_pos] lemma one_lt_zpow' (ha : 1 < a) (hn : 0 < n) : 1 < a ^ n
-- Mathlib/Probability/StrongLaw.lean
theorem strong_law_aux4 {c : ℝ} (c_one : 1 < c) :
    ∀ᵐ ω, (fun n : ℕ => ∑ i ∈ range ⌊c ^ n⌋₊, truncation (X i) i ω - ⌊c ^ n⌋₊ * 𝔼[X 0]) =o[atTop]
    fun n : ℕ => (⌊c ^ n⌋₊ : ℝ)
-- Mathlib/AlgebraicTopology/CechNerve.lean
/-- The augmented Čech conerve associated to an arrow. -/
@[simps]
def augmentedCechConerve : CosimplicialObject.Augmented C
-- Mathlib/Data/Set/Basic.lean
theorem inclusion_injective (h : s ⊆ t) : Injective (inclusion h)
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem prefix_refl (l : List α) : l <+: l
-- Mathlib/Data/Fin/Basic.lean
theorem rev_ne_iff {i j : Fin n} : rev i ≠ j ↔ i ≠ rev j
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp]
theorem trailingDegree_C_mul_X_pow (n : ℕ) (ha : a ≠ 0) : trailingDegree (C a * X ^ n) = n
-- Mathlib/NumberTheory/LSeries/HurwitzZeta.lean
/-- The residue of the Hurwitz zeta function at `s = 1` is `1`. -/
lemma hurwitzZeta_residue_one (a : UnitAddCircle) :
    Tendsto (fun s ↦ (s - 1) * hurwitzZeta a s) (𝓝[≠] 1) (𝓝 1)
-- Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean
theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) :
    StronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v)
-- Mathlib/AlgebraicGeometry/OpenImmersion.lean
@[simp]
lemma Scheme.ofRestrict_appLE (V W e) :
    (X.ofRestrict h).appLE V W e = X.presheaf.map
      (homOfLE (show X.ofRestrict h ''ᵁ _ ≤ _ by exact Set.image_subset_iff.mpr e)).op
-- Mathlib/FieldTheory/NormalClosure.lean
lemma AlgHom.fieldRange_le_normalClosure (f : K →ₐ[F] L) : f.fieldRange ≤ normalClosure F K L
-- Mathlib/Data/ENNReal/Basic.lean
theorem image_ennreal_ofReal (h : s.OrdConnected) : (ENNReal.ofReal '' s).OrdConnected
-- Mathlib/NumberTheory/ModularForms/Basic.lean
theorem CuspForm.toFun_eq_coe {f : CuspForm Γ k} : f.toFun = (f : ℍ → ℂ)
-- Mathlib/Data/Nat/Factorization/Basic.lean
/-- If `p` is a prime factor of `a` then the power of `p` in `a` is the same that in `a * b`,
for any `b` coprime to `a`. -/
theorem factorization_eq_of_coprime_left {p a b : ℕ} (hab : Coprime a b)
    (hpa : p ∈ a.primeFactorsList) : (a * b).factorization p = a.factorization p
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem implies_congr_ctx {p₁ p₂ q₁ q₂ : Prop} (h₁ : p₁ = p₂) (h₂ : p₂ → q₁ = q₂) : (p₁ → q₁) = (p₂ → q₂)
-- Mathlib/MeasureTheory/Integral/Bochner.lean
/-- If `F i → f` in `L1`, then `∫ x in s, F i x ∂μ → ∫ x in s, f x ∂μ`. -/
lemma tendsto_setIntegral_of_L1' {ι} (f : α → G) (hfi : Integrable f μ) {F : ι → α → G}
    {l : Filter ι}
    (hFi : ∀ᶠ i in l, Integrable (F i) μ) (hF : Tendsto (fun i ↦ eLpNorm (F i - f) 1 μ) l (𝓝 0))
    (s : Set α) :
    Tendsto (fun i ↦ ∫ x in s, F i x ∂μ) l (𝓝 (∫ x in s, f x ∂μ))
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive (attr := simp)] lemma leOnePart_apply (f : ∀ i, α i) (i : ι) : f⁻ i = (f i)⁻
-- Mathlib/Algebra/Star/Subsemiring.lean
@[simp]
lemma coe_mk (S : Subsemiring R) (h) : ((⟨S, h⟩ : StarSubsemiring R) : Set R) = S
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem nontrivial_iff [Semiring R] : Nontrivial R[X] ↔ Nontrivial R
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_eq_setToL1 (f : α →₁[μ] E) :
    integral f = setToL1 (E := E) (dominatedFinMeasAdditive_weightedSMul μ) f
-- Mathlib/Data/Int/Bitwise.lean
@[simp]
theorem lnot_bit (b) : ∀ n, lnot (bit b n) = bit (not b) (lnot n)
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean
lemma neg'_eq (f : L.obj X ⟶ L.obj Y) (φ : W.LeftFraction X Y)
    (hφ : f = φ.map L (inverts L W)) :
    neg' W f = φ.neg.map L (inverts L W)
-- Mathlib/Order/Filter/Extr.lean
theorem IsMinOn.comp_mono (hf : IsMinOn f s a) {g : β → γ} (hg : Monotone g) :
    IsMinOn (g ∘ f) s a
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem monic_C_mul_of_mul_leadingCoeff_eq_one {b : R} (hp : b * p.leadingCoeff = 1) :
    Monic (C b * p)
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.ge_iff (hl' : l'.HasBasis p' s') : l ≤ l' ↔ ∀ i', p' i' → s' i' ∈ l
-- Mathlib/Algebra/MvPolynomial/Division.lean
theorem monomial_one_dvd_iff_modMonomial_eq_zero {i : σ →₀ ℕ} {x : MvPolynomial σ R} :
    monomial i (1 : R) ∣ x ↔ x %ᵐᵒⁿᵒᵐⁱᵃˡ i = 0
-- Mathlib/Algebra/Lie/Weights/Basic.lean
/-- This lemma exists only to simplify the proof of
`LieModule.isCompl_weightSpace_zero_posFittingComp`. -/
private lemma isCompl_weightSpace_zero_posFittingComp_aux
    (h : ∀ N < (⊤ : LieSubmodule R L M), IsCompl (weightSpace N 0) (posFittingComp R L N)) :
    IsCompl (weightSpace M 0) (posFittingComp R L M)
-- Mathlib/Data/Set/Function.lean
theorem injOn_preimage {B : Set (Set β)} (hB : B ⊆ 𝒫 range f) : InjOn (preimage f) B
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp] protected lemma map_intCast {S} [Ring S] (f : R →+* S) (n : ℤ) : map f ↑n = ↑n
-- Mathlib/Geometry/Manifold/DerivationBundle.lean
@[simp]
theorem apply_fdifferential (f : C^∞⟮I, M; I', M'⟯) {x : M} (v : PointDerivation I x)
    (g : C^∞⟮I', M'; 𝕜⟯) : 𝒅 f x v g = v (g.comp f)
-- Mathlib/Data/Semiquot.lean
theorem exists_mem (q : Semiquot α) : ∃ a, a ∈ q
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Bounded.to_nil {t : Ordnode α} : ∀ {o₁ o₂}, Bounded t o₁ o₂ → Bounded nil o₁ o₂
-- Mathlib/Topology/ContinuousFunction/Compact.lean
theorem norm_eq_iSup_norm : ‖f‖ = ⨆ x : α, ‖f x‖
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- Given two Localization maps `f : M →* N, k : M →* P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`. -/
@[to_additive (attr := simp)
    "Given two Localization maps `f : M →+ N, k : M →+ P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`."]
theorem lift_left_inverse {k : LocalizationMap S P} (z : N) :
    k.lift f.map_units (f.lift k.map_units z) = z
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- The characterization of the unbundled orthogonal projection.  This
lemma is only intended for use in setting up the bundled version
and should not be used once that is defined. -/
theorem orthogonalProjectionFn_inner_eq_zero (v : E) :
    ∀ w ∈ K, ⟪v - orthogonalProjectionFn K v, w⟫ = 0
-- Mathlib/Logic/Equiv/Fintype.lean
@[simp]
theorem Equiv.Perm.viaFintypeEmbedding_apply_image (a : α) :
    e.viaFintypeEmbedding f (f a) = f (e a)
-- Mathlib/Analysis/NormedSpace/IndicatorFunction.lean
theorem nnnorm_indicator_eq_indicator_nnnorm :
    ‖indicator s f a‖₊ = indicator s (fun a => ‖f a‖₊) a
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_list_count_of_subset [DecidableEq α] [CommMonoid α] (m : List α) (s : Finset α)
    (hs : m.toFinset ⊆ s) : m.prod = ∏ i ∈ s, i ^ m.count i
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If `f : ℝ → ℝ` is strictly convex on `S` and differentiable at `x ∈ S`, then the slope of any
secant line with left endpoint at `x` is strictly greater than the derivative of `f` at `x`. -/
lemma lt_slope_of_hasDerivAt (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivAt f f' x) :
    f' < slope f x y
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem disjoint_cobounded_nhds (x : α) : Disjoint (cobounded α) (𝓝 x)
-- Mathlib/Data/NNReal/Basic.lean
lemma toNNReal_le_toNNReal_iff' {r p : ℝ} : r.toNNReal ≤ p.toNNReal ↔ r ≤ p ∨ r ≤ 0
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem HasFDerivWithinAt.congr_of_eventuallyEq (h : HasFDerivWithinAt f f' s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : HasFDerivWithinAt f₁ f' s x
-- Mathlib/Data/PFunctor/Univariate/M.lean
theorem dest_corec (g : α → P α) (x : α) : M.dest (M.corec g x) = P.map (M.corec g) (g x)
-- Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean
theorem LpAddConst_zero : LpAddConst 0 = 1
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem quotQuotEquivQuotSupₐ_toRingEquiv :
    (quotQuotEquivQuotSupₐ R I J : _ ⧸ J.map (Quotient.mkₐ R I) ≃+* _) = quotQuotEquivQuotSup I J
-- Mathlib/NumberTheory/Cyclotomic/Three.lean
/-- We have that `λ` divides `x * (x - 1) * (x - (η + 1))`. -/
lemma lambda_dvd_mul_sub_one_mul_sub_eta_add_one : λ ∣ x * (x - 1) * (x - (η + 1))
-- Mathlib/Init/Data/Sigma/Lex.lean
/-- The lexicographical order of well-founded relations is well-founded. -/
theorem lex_wf (ha : WellFounded r) (hb : ∀ x, WellFounded (s x)) : WellFounded (Lex r s)
-- Mathlib/Analysis/Complex/ReImTopology.lean
theorem closure_preimage_im (s : Set ℝ) : closure (im ⁻¹' s) = im ⁻¹' closure s
-- Mathlib/Topology/Instances/ENNReal.lean
theorem tsum_le_of_sum_range_le {f : ℕ → ℝ≥0∞} {c : ℝ≥0∞}
    (h : ∀ n, ∑ i ∈ Finset.range n, f i ≤ c) : ∑' n, f n ≤ c
-- Mathlib/CategoryTheory/Limits/Fubini.lean
/-- Given a functor `F : J ⥤ K ⥤ C`, with all needed colimits,
we can construct a diagram consisting of the colimit cocone over each functor `F.obj j`,
and the universal cocone morphisms between these.
-/
@[simps]
noncomputable def DiagramOfCocones.mkOfHasColimits : DiagramOfCocones F
-- Mathlib/CategoryTheory/ConcreteCategory/EpiMono.lean
lemma surjective_eq_epimorphisms_iff :
    MorphismProperty.surjective C = epimorphisms C ↔ (forget C).PreservesEpimorphisms
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem cmp_mul_pos_left [PosMulStrictMono α]
    (ha : 0 < a) (b c : α) : cmp (a * b) (a * c) = cmp b c
-- Mathlib/GroupTheory/Submonoid/Inverses.lean
@[to_additive]
theorem fromLeftInv_eq_iff (a : S.leftInv) (b : M) :
    (S.fromLeftInv a : M) = b ↔ (a : M) * b = 1
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma homologyMap_sub : homologyMap (φ - φ') = homologyMap φ - homologyMap φ'
-- Mathlib/Data/Set/Function.lean
theorem InjOn.exists_subset_injOn_subset_range_eq {r : Set α} (hinj : InjOn f r) (hrs : r ⊆ s) :
    ∃ u : Set α, r ⊆ u ∧ u ⊆ s ∧ f '' u = f '' s ∧ InjOn f u
-- Mathlib/Data/Real/EReal.lean
@[simp]
theorem top_sub_coe (x : ℝ) : (⊤ : EReal) - x = ⊤
-- Mathlib/MeasureTheory/PiSystem.lean
theorem IsPiSystem.insert_univ {α} {S : Set (Set α)} (h_pi : IsPiSystem S) :
    IsPiSystem (insert Set.univ S)
-- Mathlib/Topology/Basic.lean
theorem continuous_congr {g : X → Y} (h : ∀ x, f x = g x) :
    Continuous f ↔ Continuous g
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive]
theorem noncommProd_mul_single [Fintype ι] [DecidableEq ι] (x : ∀ i, M i) :
    (univ.noncommProd (fun i => Pi.mulSingle i (x i)) fun i _ j _ _ =>
        Pi.mulSingle_apply_commute x i j) = x
-- Mathlib/Algebra/Tropical/Basic.lean
theorem injective_untrop : Function.Injective (untrop : Tropical R → R)
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem monomial_comp (n : ℕ) : (monomial n a).comp p = C a * p ^ n
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem le_add_right_of_le {n m k : Nat} (h : n ≤ m) : n ≤ m + k
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma dist_pi_eq_iff {f g : ∀ b, π b} {r : ℝ} (hr : 0 < r) :
    dist f g = r ↔ (∃ i, dist (f i) (g i) = r) ∧ ∀ b, dist (f b) (g b) ≤ r
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_iff : (φ.iff ψ).Realize v xs ↔ (φ.Realize v xs ↔ ψ.Realize v xs)
-- Mathlib/Computability/Primrec.lean
protected theorem eq [DecidableEq α] : PrimrecRel (@Eq α)
-- Mathlib/Data/Finset/Card.lean
/-- $\#(s \setminus \{a\}) = \#s - 1$ if $a \in s$.
  This result is casted to any additive group with 1,
  so that we don't have to work with `ℕ`-subtraction. -/
@[simp]
theorem cast_card_erase_of_mem {R} [AddGroupWithOne R] {s : Finset α} (hs : a ∈ s) :
    ((s.erase a).card : R) = s.card - 1
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Dense.orderDual [TopologicalSpace α] {s : Set α} (hs : Dense s) :
    Dense (OrderDual.ofDual ⁻¹' s)
-- Mathlib/Data/Fintype/Card.lean
theorem surjective_of_injective {f : α → α} (hinj : Injective f) : Surjective f
-- Mathlib/Data/Fintype/Sigma.lean
lemma Set.biInter_finsetSigma_univ (s : Finset ι) (f : Sigma κ → Set α) :
    ⋂ ij ∈ s.sigma fun _ ↦ Finset.univ, f ij = ⋂ i ∈ s, ⋂ j, f ⟨i, j⟩
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
theorem Or.neg_resolve_right (h : Or a (Not b)) (nb : b) : a
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_max_of_nonpos (ha : a ≤ 0) (b₁ b₂ : β) : a • max b₁ b₂ = min (a • b₁) (a • b₂)
-- Mathlib/Combinatorics/Schnirelmann.lean
lemma schnirelmannDensity_congr' {B : Set ℕ} [DecidablePred (· ∈ B)]
    (h : ∀ n > 0, n ∈ A ↔ n ∈ B) : schnirelmannDensity A = schnirelmannDensity B
-- Mathlib/Topology/Order.lean
theorem discreteTopology_iff_singleton_mem_nhds [TopologicalSpace α] :
    DiscreteTopology α ↔ ∀ x : α, {x} ∈ 𝓝 x
-- Mathlib/Geometry/Euclidean/Sphere/Basic.lean
/-- The three points of a cospherical set are affinely independent. -/
theorem Cospherical.affineIndependent_of_ne {p₁ p₂ p₃ : P} (hs : Cospherical ({p₁, p₂, p₃} : Set P))
    (h₁₂ : p₁ ≠ p₂) (h₁₃ : p₁ ≠ p₃) (h₂₃ : p₂ ≠ p₃) : AffineIndependent ℝ ![p₁, p₂, p₃]
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
protected theorem TendstoUniformly.tendstoUniformlyOn (h : TendstoUniformly F f p) :
    TendstoUniformlyOn F f p s
-- Mathlib/Algebra/Algebra/Basic.lean
theorem mem_algebraMapSubmonoid_of_mem {S : Type*} [Semiring S] [Algebra R S] {M : Submonoid R}
    (x : M) : algebraMap R S x ∈ algebraMapSubmonoid S M
-- Mathlib/Logic/Equiv/PartialEquiv.lean
@[simp, mfld_simps]
theorem prod_source (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').source = e.source ×ˢ e'.source
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem Ico_ae_eq_Ioc' (ha : μ {a} = 0) (hb : μ {b} = 0) : Ico a b =ᵐ[μ] Ioc a b
-- Mathlib/Analysis/Normed/Algebra/Spectrum.lean
theorem exists_nnnorm_eq_spectralRadius_of_nonempty [ProperSpace 𝕜] {a : A} (ha : (σ a).Nonempty) :
    ∃ k ∈ σ a, (‖k‖₊ : ℝ≥0∞) = spectralRadius 𝕜 a
-- Mathlib/Data/Bool/Set.lean
@[simp] theorem compl_singleton (b : Bool) : ({b}ᶜ : Set Bool) = {!b}
-- Mathlib/Data/Finset/Basic.lean
lemma filter_and_not (s : Finset α) (p q : α → Prop) [DecidablePred p] [DecidablePred q] :
    s.filter (fun a ↦ p a ∧ ¬ q a) = s.filter p \ s.filter q
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
protected theorem Measure.isTopologicalBasis_isOpen_lt_top [TopologicalSpace α]
    (μ : Measure α) [IsLocallyFiniteMeasure μ] :
    TopologicalSpace.IsTopologicalBasis { s | IsOpen s ∧ μ s < ∞ }
-- Mathlib/Analysis/Normed/Order/Lattice.lean
theorem norm_inf_sub_inf_le_norm (x y z : α) : ‖x ⊓ z - y ⊓ z‖ ≤ ‖x - y‖
-- Mathlib/SetTheory/Game/PGame.lean
theorem lf_or_equiv_or_gf (x y : PGame) : x ⧏ y ∨ (x ≈ y) ∨ y ⧏ x
-- Mathlib/Analysis/Convex/Between.lean
theorem wbtw_swap_left_iff [NoZeroSMulDivisors R V] {x y : P} (z : P) :
    Wbtw R x y z ∧ Wbtw R y x z ↔ x = y
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem unique_diff_at_image {x : H} : UniqueDiffWithinAt 𝕜 (range I) (I x)
-- Mathlib/Analysis/Analytic/Composition.lean
/-- The auxiliary set corresponding to the composition of partial sums asymptotically contains
all possible compositions. -/
theorem compPartialSumTarget_tendsto_atTop :
    Tendsto (fun N => compPartialSumTarget 0 N N) atTop atTop
-- Mathlib/CategoryTheory/Bicategory/Functor/Lax.lean
/-- Composition of lax functors. -/
@[simps]
def comp {D : Type u₃} [Bicategory.{w₃, v₃} D] (F : LaxFunctor B C) (G : LaxFunctor C D) :
    LaxFunctor B D
-- Mathlib/Topology/Bornology/Basic.lean
theorem IsBounded.union (hs : IsBounded s) (ht : IsBounded t) : IsBounded (s ∪ t)
-- Mathlib/Data/Matroid/Basic.lean
theorem indep_of_not_dep (hI : ¬ M.Dep I) (hIE : I ⊆ M.E := by aesop_mat) : M.Indep I
-- Mathlib/Topology/Inseparable.lean
theorem inseparable_of_nhdsWithin_eq (hx : x ∈ s) (hy : y ∈ s) (h : 𝓝[s] x = 𝓝[s] y) : x ~ᵢ y
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem toFun_eq_coe (v : Valuation R Γ₀) : v.toFun = v
-- Mathlib/LinearAlgebra/QuadraticForm/IsometryEquiv.lean
@[simp]
theorem map_app (f : Q₁.IsometryEquiv Q₂) (m : M₁) : Q₂ (f m) = Q₁ m
-- Mathlib/Algebra/Order/Hom/Basic.lean
@[to_additive]
theorem map_div_rev : f (x / y) = f (y / x)
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem isUnit_leadingCoeff_mul_left_eq_zero_iff (h : IsUnit p.leadingCoeff) {q : R[X]} :
    q * p = 0 ↔ q = 0
-- Mathlib/Algebra/BigOperators/Ring.lean
lemma sum_boole_mul (s : Finset ι) (f : ι → α) (i : ι) :
    ∑ j ∈ s, ite (i = j) 1 0 * f j = ite (i ∈ s) (f i) 0
-- Mathlib/Topology/Order/DenselyOrdered.lean
/-- The closure of the open interval `(a, b)` is the closed interval `[a, b]`. -/
@[simp]
theorem closure_Ioo {a b : α} (hab : a ≠ b) : closure (Ioo a b) = Icc a b
-- Mathlib/Data/Fin/Tuple/Basic.lean
@[simp] lemma removeNth_zero (f : ∀ i, α i) : removeNth 0 f = tail f
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem ContDiff.cos {n} (h : ContDiff ℝ n f) : ContDiff ℝ n fun x => Real.cos (f x)
-- Mathlib/MeasureTheory/Group/Measure.lean
@[to_additive]
theorem isMulLeftInvariant_map {H : Type*} [MeasurableSpace H] [Mul H] [MeasurableMul H]
    [IsMulLeftInvariant μ] (f : G →ₙ* H) (hf : Measurable f) (h_surj : Surjective f) :
    IsMulLeftInvariant (Measure.map f μ)
-- Mathlib/FieldTheory/Fixed.lean
theorem coe_algebraMap :
    algebraMap (FixedPoints.subfield M F) F = Subfield.subtype (FixedPoints.subfield M F)
-- Mathlib/NumberTheory/SiegelsLemma.lean
theorem exists_ne_zero_int_vec_norm_le' (hA : A ≠ 0) : ∃ t : β → ℤ, t ≠ 0 ∧
    A *ᵥ t = 0 ∧ ‖t‖ ≤ (n * ‖A‖) ^ ((m : ℝ) / (n - m))