ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Int/Defs.lean
lemma eq_mul_div_of_mul_eq_mul_of_dvd_left (hb : b ≠ 0) (hbc : b ∣ c) (h : b * a = c * d) :
    a = c / b * d
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem sep_eq_self_iff_mem_true : { x ∈ s | p x } = s ↔ ∀ x ∈ s, p x
-- Mathlib/RingTheory/Finiteness.lean
theorem exists_radical_pow_le_of_fg {R : Type*} [CommSemiring R] (I : Ideal R) (h : I.radical.FG) :
    ∃ n : ℕ, I.radical ^ n ≤ I
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
theorem nndist_vadd_cancel_left (v : V) (x y : P) : nndist (v +ᵥ x) (v +ᵥ y) = nndist x y
-- Mathlib/Topology/Homeomorph.lean
@[simp] lemma coe_toHomeomorph (e : X ≃ Y) (he) : ⇑(e.toHomeomorph he) = e
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
@[simp] lemma support_div' (f g : ι → G₀) : support (f / g) = support f ∩ support g
-- Mathlib/Order/PFilter.lean
protected theorem nonempty : (F : Set P).Nonempty
-- Mathlib/Analysis/Complex/UnitDisc/Basic.lean
@[simp]
theorem im_neg (z : 𝔻) : (-z).im = -z.im
-- Mathlib/Algebra/Associated/Basic.lean
@[simp]
theorem mk_one [Monoid α] : Associates.mk (1 : α) = 1
-- Mathlib/NumberTheory/Cyclotomic/Rat.lean
/-- The algebra isomorphism `adjoin ℤ {ζ} ≃ₐ[ℤ] (𝓞 K)`, where `ζ` is a primitive `p`-th root of
unity and `K` is a `p`-th cyclotomic extension of `ℚ`. -/
@[simps!]
noncomputable def _root_.IsPrimitiveRoot.adjoinEquivRingOfIntegers'
    [hcycl : IsCyclotomicExtension {p} ℚ K] (hζ : IsPrimitiveRoot ζ p) :
    adjoin ℤ ({ζ} : Set K) ≃ₐ[ℤ] 𝓞 K
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem WithSeminorms.image_isVonNBounded_iff_seminorm_bounded (f : G → E) {s : Set G}
    (hp : WithSeminorms p) :
    Bornology.IsVonNBounded 𝕜 (f '' s) ↔ ∀ i : ι, ∃ r > 0, ∀ x ∈ s, p i (f x) < r
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiagonal'_neg [AddGroup α] (M : ∀ i, Matrix (m' i) (n' i) α) :
    blockDiagonal' (-M) = -blockDiagonal' M
-- Mathlib/RingTheory/Polynomial/Eisenstein/IsIntegral.lean
theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (n : ℕ) :
    ((cyclotomic (p ^ (n + 1)) ℤ).comp (X + 1)).IsEisensteinAt 𝓟
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `E / F` is a separable extension of exponential characteristic `q`, if `{ u_i }` is a family
of elements of `E` which `F`-linearly spans `E`, then `{ u_i ^ (q ^ n) }` also `F`-linearly spans
`E` for any natural number `n`. -/
theorem Field.span_map_pow_expChar_pow_eq_top_of_isSeparable [Algebra.IsSeparable F E]
    (h : Submodule.span F (Set.range v) = ⊤) :
    Submodule.span F (Set.range (v · ^ q ^ n)) = ⊤
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventually_false_iff_eq_bot {f : Filter α} : (∀ᶠ _ in f, False) ↔ f = ⊥
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem ext_iff (v w : VectorMeasure α M) : v = w ↔ ∀ i : Set α, MeasurableSet i → v i = w i
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
@[local simp] theorem ofNat_add_ofNat (m n : Nat) : (↑m + ↑n : Int) = ↑(m + n)
-- Mathlib/Algebra/Order/Group/Lattice.lean
@[to_additive]
lemma mul_inf (a b c : α) : c * (a ⊓ b) = c * a ⊓ c * b
-- Mathlib/Topology/Homeomorph.lean
protected theorem normalSpace [NormalSpace X] (h : X ≃ₜ Y) : NormalSpace Y
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- The smallest congruence relation containing a binary relation `r` is contained in any
    congruence relation containing `r`. -/
@[to_additive addConGen_le "The smallest additive congruence relation containing a binary
relation `r` is contained in any additive congruence relation containing `r`."]
theorem conGen_le {r : M → M → Prop} {c : Con M} (h : ∀ x y, r x y → c x y) :
    conGen r ≤ c
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem if_neg {c : Prop} {h : Decidable c} (hnc : ¬c) {α : Sort u} {t e : α} : (ite c t e) = e
-- Mathlib/Order/Minimal.lean
@[simp] theorem maximals_Iic (a : α) : maximals (· ≤ ·) (Iic a) = {a}
-- Mathlib/Analysis/Analytic/Basic.lean
/-- For `r` strictly smaller than the radius of `p`, then `‖pₙ‖ rⁿ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `‖p n‖ * r ^ n ≤ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : ↑r < p.radius) :
    ∃ a ∈ Ioo (0 : ℝ) 1, ∃ C > 0, ∀ n, ‖p n‖ * (r : ℝ) ^ n ≤ C * a ^ n
-- Mathlib/Topology/Order/OrderClosed.lean
@[simp]
theorem continuousWithinAt_Icc_iff_Ici (h : a < b) :
    ContinuousWithinAt f (Icc a b) a ↔ ContinuousWithinAt f (Ici a) a
-- Mathlib/Topology/FiberBundle/Basic.lean
theorem isOpen_target_of_mem_pretrivializationAtlas_inter (e e' : Pretrivialization F (π F E))
    (he' : e' ∈ a.pretrivializationAtlas) :
    IsOpen (e'.toPartialEquiv.target ∩ e'.toPartialEquiv.symm ⁻¹' e.source)
-- Mathlib/Topology/Compactness/Compact.lean
/-- A set `s` is compact if and only if
for every open cover of `s`, there exists a finite subcover. -/
theorem isCompact_iff_finite_subcover :
    IsCompact s ↔ ∀ {ι : Type u} (U : ι → Set X),
      (∀ i, IsOpen (U i)) → (s ⊆ ⋃ i, U i) → ∃ t : Finset ι, s ⊆ ⋃ i ∈ t, U i
-- Mathlib/FieldTheory/Finite/Polynomial.lean
theorem range_evalᵢ [Finite σ] : range (evalᵢ σ K) = ⊤
-- Mathlib/Data/List/ReduceOption.lean
theorem reduceOption_length_eq_iff {l : List (Option α)} :
    l.reduceOption.length = l.length ↔ ∀ x ∈ l, Option.isSome x
-- Mathlib/Topology/Sets/Closeds.lean
/-- The type of clopen sets of a topological space. -/
structure Clopens (α : Type*) [TopologicalSpace α] where
  /-- the carrier set, i.e. the points in this set -/
  carrier : Set α
  isClopen' : IsClopen carrier
-- Mathlib/LinearAlgebra/Finsupp.lean
theorem supported_eq_span_single (s : Set α) :
    supported R R s = span R ((fun i => single i 1) '' s)
-- Mathlib/Data/ENat/Basic.lean
@[simp] lemma top_ne_zero : (⊤ : ℕ∞) ≠ 0
-- Mathlib/Data/Complex/Order.lean
theorem not_lt_zero_iff {z : ℂ} : ¬z < 0 ↔ 0 ≤ z.re ∨ z.im ≠ 0
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
lemma IsUnramifiedAtInfinitePlaces.top [h : IsUnramifiedAtInfinitePlaces k F] :
    IsUnramifiedAtInfinitePlaces K F
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
@[norm_cast]
theorem coe_div : ∀ {x y : ℚ}, (↑(x / y) : ℚ_[p]) = ↑x / ↑y
-- Mathlib/Data/Finset/Sups.lean
theorem disjSups_right_comm : s ○ t ○ u = s ○ u ○ t
-- Mathlib/Order/OmegaCompletePartialOrder.lean
theorem exists_of_mem_map {b : β} : b ∈ c.map f → ∃ a, a ∈ c ∧ f a = b
-- Mathlib/Analysis/SpecialFunctions/Complex/LogDeriv.lean
theorem isOpenMap_exp : IsOpenMap exp
-- Mathlib/CategoryTheory/Monoidal/Center.lean
@[reassoc]
theorem whiskerRight_comm {X₁ X₂ : Center C} (f : X₁ ⟶ X₂) (Y : Center C) (U : C) :
    f.f ▷ Y.1 ▷ U ≫ ((tensorObj X₂ Y).2.β U).hom =
      ((tensorObj X₁ Y).2.β U).hom ≫ U ◁ f.f ▷ Y.1
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[simp]
theorem _root_.LinearIsometryEquiv.piLpCongrRight_apply (e : ∀ i, α i ≃ₗᵢ[𝕜] β i) (x : PiLp p α) :
    LinearIsometryEquiv.piLpCongrRight p e x =
      (WithLp.equiv p _).symm (fun i => e i (x i))
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
theorem norm_eval_le_injectiveSeminorm (f : ContinuousMultilinearMap 𝕜 E F) (x : ⨂[𝕜] i, E i) :
    ‖lift f.toMultilinearMap x‖ ≤ ‖f‖ * injectiveSeminorm x
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem setLintegral_compl {f : α → ℝ≥0∞} {s : Set α} (hsm : MeasurableSet s)
    (hfs : ∫⁻ x in s, f x ∂μ ≠ ∞) :
    ∫⁻ x in sᶜ, f x ∂μ = ∫⁻ x, f x ∂μ - ∫⁻ x in s, f x ∂μ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sin_add_nat_mul_pi (x : ℝ) (n : ℕ) : sin (x + n * π) = (-1) ^ n * sin x
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem monomial_zero_eq_C : ⇑(monomial R 0) = C R
-- Mathlib/Topology/Homotopy/HomotopyGroup.lean
/-- The converse to `GenLoop.homotopyTo`: a homotopy between two loops in the space of
  `n`-dimensional loops can be seen as a homotopy between two `n+1`-dimensional paths. -/
@[simps!] def homotopyFrom (i : N) {p q : Ω^ N X x} (H : (toLoop i p).Homotopy (toLoop i q)) :
    C(I × I^N, X)
-- Mathlib/Data/Set/Image.lean
/-- `Set.image` is monotone. See `Set.image_subset` for the statement in terms of `⊆`. -/
lemma monotone_image {f : α → β} : Monotone (image f)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem enumOrd_surjective (hS : Unbounded (· < ·) S) : ∀ s ∈ S, ∃ a, enumOrd S a = s
-- Mathlib/Data/Nat/Digits.lean
@[norm_cast]
theorem coe_ofDigits (α : Type*) [Semiring α] (b : ℕ) (L : List ℕ) :
    ((ofDigits b L : ℕ) : α) = ofDigits (b : α) L
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem measure_diff_null' (h : μ (s₁ ∩ s₂) = 0) : μ (s₁ \ s₂) = μ s₁
-- Mathlib/CategoryTheory/Limits/Opposites.lean
/-- Turn a limit for `F : Jᵒᵖ ⥤ C` into a colimit for `F.rightOp : J ⥤ Cᵒᵖ`. -/
@[simps]
def isColimitCoconeRightOpOfCone (F : Jᵒᵖ ⥤ C) {c : Cone F} (hc : IsLimit c) :
    IsColimit (coconeRightOpOfCone c)
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem AntitoneOn.Ico (hf : AntitoneOn f s) (hg : MonotoneOn g s) :
    MonotoneOn (fun x => Ico (f x) (g x)) s
-- Mathlib/NumberTheory/LSeries/Basic.lean
lemma LSeries_congr {f g : ℕ → ℂ} (s : ℂ) (h : ∀ {n}, n ≠ 0 → f n = g n) :
    LSeries f s = LSeries g s
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem ContMDiff.clm_postcomp {f : M → F₂ →L[𝕜] F₃} (hf : ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₃) n f) :
    ContMDiff I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃))
-- Mathlib/Data/Nat/Factorial/SuperFactorial.lean
@[simp]
theorem prod_Icc_factorial : ∀ n : ℕ, ∏ x ∈ Icc 1 n, x ! = sf n
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
/-- The mapping `toWeakDualBCNN` from finite Borel measures to the weak dual of `Ω →ᵇ ℝ≥0` is
injective, if in the underlying space `Ω`, indicator functions of closed sets have decreasing
approximations by sequences of continuous functions (in particular if `Ω` is pseudometrizable). -/
lemma injective_toWeakDualBCNN :
    Injective (toWeakDualBCNN : FiniteMeasure Ω → WeakDual ℝ≥0 (Ω →ᵇ ℝ≥0))
-- Mathlib/Order/Filter/Basic.lean
theorem kernMap_principal {s : Set α} : kernMap m (𝓟 s) = 𝓟 (kernImage m s)
-- Mathlib/CategoryTheory/Galois/Decomposition.lean
/-- Any element in the fiber of an object `X` is the evaluation of a morphism from a
Galois object. -/
lemma exists_hom_from_galois_of_fiber (X : C) (x : F.obj X) :
    ∃ (A : C) (f : A ⟶ X) (a : F.obj A), IsGalois A ∧ F.map f a = x
-- Mathlib/Order/Filter/Lift.lean
theorem map_lift_eq {m : β → γ} (hg : Monotone g) : map m (f.lift g) = f.lift (map m ∘ g)
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
@[simp]
theorem latticeBasis_apply [NumberField K] (i : Free.ChooseBasisIndex ℤ (𝓞 K)) :
    latticeBasis K i = (canonicalEmbedding K) (integralBasis K i)
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
lemma natCast_le_rank_iff_finset {n : ℕ} :
    n ≤ Module.rank R M ↔ ∃ s : Finset M, s.card = n ∧ LinearIndependent R ((↑) : s → M)
-- Mathlib/CategoryTheory/Triangulated/Functor.lean
lemma isTriangulated_iff_of_iso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) [F₁.CommShift ℤ] [F₂.CommShift ℤ]
    [NatTrans.CommShift e.hom ℤ] : F₁.IsTriangulated ↔ F₂.IsTriangulated
-- Mathlib/RingTheory/OreLocalization/Basic.lean
protected theorem add_left_neg (x : X[S⁻¹]) : -x + x = 0
-- Mathlib/Data/Sign.lean
/-- We can decompose a sum of absolute value less than `n` into a sum of at most `n` signs. -/
theorem exists_signed_sum' {α : Type u_1} [Nonempty α] [DecidableEq α] (s : Finset α) (f : α → ℤ)
    (n : ℕ) (h : (∑ i ∈ s, (f i).natAbs) ≤ n) :
    ∃ (β : Type u_1) (_ : Fintype β) (sgn : β → SignType) (g : β → α),
      (∀ b, g b ∉ s → sgn b = 0) ∧
        Fintype.card β = n ∧ ∀ a ∈ s, (∑ i, if g i = a then (sgn i : ℤ) else 0) = f a
-- Mathlib/Data/Vector/Basic.lean
/-- The recursive step of `scanl` splits a vector `x ::ᵥ v : Vector α (n + 1)`
into the provided starting value `b : β` and the recursed `scanl`
`f b x : β` as the starting value.

This lemma is the `cons` version of `scanl_get`.
-/
@[simp]
theorem scanl_cons (x : α) : scanl f b (x ::ᵥ v) = b ::ᵥ scanl f (f b x) v
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
theorem closedPoint_mem_iff (U : TopologicalSpace.Opens <| PrimeSpectrum R) :
    closedPoint R ∈ U ↔ U = ⊤
-- Mathlib/Data/Finset/Slice.lean
theorem _root_.Set.Sized.card_le (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
    card 𝒜 ≤ (Fintype.card α).choose r
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
@[simp]
theorem LinearMap.toMatrixAlgEquiv'_id :
    LinearMap.toMatrixAlgEquiv' (LinearMap.id : (n → R) →ₗ[R] n → R) = 1
-- Mathlib/MeasureTheory/Function/SimpleFuncDense.lean
theorem nearestPtInd_le (e : ℕ → α) (N : ℕ) (x : α) : nearestPtInd e N x ≤ N
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
theorem biprod.isIso_inl_iff_id_eq_fst_comp_inl (X Y : C) [HasBinaryBiproduct X Y] :
    IsIso (biprod.inl : X ⟶ X ⊞ Y) ↔ 𝟙 (X ⊞ Y) = biprod.fst ≫ biprod.inl
-- Mathlib/Topology/Maps/Basic.lean
theorem comp (hg : ClosedEmbedding g) (hf : ClosedEmbedding f) :
    ClosedEmbedding (g ∘ f)
-- Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
private lemma Fintype.sum_div_mul_card_choose_card :
    ∑ s : Finset α, (card α / ((card α - s.card) * (card α).choose s.card) : ℚ) =
      card α * ∑ k ∈ range (card α), (↑k)⁻¹ + 1
-- Mathlib/Data/Finset/NAry.lean
theorem mem_image₂_iff (hf : Injective2 f) : f a b ∈ image₂ f s t ↔ a ∈ s ∧ b ∈ t
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[simp, nolint simpNF]
theorem zero_apply : (0 : PiLp p β) i = 0
-- Mathlib/RingTheory/PowerSeries/Basic.lean
theorem rescale_rescale (f : R⟦X⟧) (a b : R) :
    rescale b (rescale a f) = rescale (a * b) f
-- Mathlib/RingTheory/Generators.lean
/-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[X, Y] → S[X]`. -/
@[simps]
noncomputable
def ofComp (Q : Generators S T) (P : Generators R S) : Hom (Q.comp P) Q
-- Mathlib/MeasureTheory/OuterMeasure/Basic.lean
@[deprecated measure_union_null (since := "2024-05-14")]
theorem union_null (m : OuterMeasure α) {s₁ s₂ : Set α} (h₁ : m s₁ = 0) (h₂ : m s₂ = 0) :
    m (s₁ ∪ s₂) = 0
-- Mathlib/Analysis/Analytic/IsolatedZeros.lean
/-- The *identity principle* for analytic functions, global version: if two functions on a normed
field `𝕜` are analytic everywhere and coincide at points which accumulate to a point `z₀`, then
they coincide globally.
For higher-dimensional versions requiring that the functions coincide in a neighborhood of `z₀`,
see `AnalyticOn.eq_of_eventuallyEq`. -/
theorem eq_of_frequently_eq [ConnectedSpace 𝕜] (hf : AnalyticOn 𝕜 f univ) (hg : AnalyticOn 𝕜 g univ)
    (hfg : ∃ᶠ z in 𝓝[≠] z₀, f z = g z) : f = g
-- Mathlib/Combinatorics/SimpleGraph/Dart.lean
theorem dart_edge_eq_mk'_iff' :
    ∀ {d : G.Dart} {u v : V},
      d.edge = s(u, v) ↔ d.fst = u ∧ d.snd = v ∨ d.fst = v ∧ d.snd = u
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which monovary together, is unchanged by a permutation if and only if `f ∘ σ` and `g` monovary
together. Stated by permuting the entries of `g`. -/
theorem Monovary.sum_comp_perm_mul_eq_sum_mul_iff (hfg : Monovary f g) :
    ∑ i, f (σ i) * g i = ∑ i, f i * g i ↔ Monovary (f ∘ σ) g
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem all (f) : ∀ {s}, Valid s → s.all f = s.toString.1.all f
-- Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
theorem linearIndependent_le_span_aux' {ι : Type*} [Fintype ι] (v : ι → M)
    (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : range v ≤ span R w) :
    Fintype.card ι ≤ Fintype.card w
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive nsmul_add] lemma mul_pow (a b : M) : ∀ n, (a * b) ^ n = a ^ n * b ^ n
-- Mathlib/Topology/Semicontinuous.lean
theorem IsOpen.upperSemicontinuous_indicator (hs : IsOpen s) (hy : y ≤ 0) :
    UpperSemicontinuous (indicator s fun _x => y)
-- Mathlib/Data/Set/Image.lean
theorem image_subset_range (f : α → β) (s) : f '' s ⊆ range f
-- Mathlib/Data/Matroid/Closure.lean
lemma closure_insert_eq_of_mem_closure (he : e ∈ M.closure X) :
    M.closure (insert e X) = M.closure X
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive IsAddCyclic.card_nsmul_eq_zero_le]
theorem IsCyclic.card_pow_eq_one_le [DecidableEq α] [Fintype α] [IsCyclic α] {n : ℕ} (hn0 : 0 < n) :
    (univ.filter fun a : α => a ^ n = 1).card ≤ n
-- Mathlib/Algebra/Module/Opposites.lean
theorem opLinearEquiv_toAddEquiv : (opLinearEquiv R : M ≃ₗ[R] Mᵐᵒᵖ).toAddEquiv = opAddEquiv
-- Mathlib/Topology/Maps/Proper/Basic.lean
/-- A injective continuous and closed map is proper. -/
lemma isProperMap_of_isClosedMap_of_inj (f_cont : Continuous f) (f_inj : f.Injective)
    (f_closed : IsClosedMap f) : IsProperMap f
-- Mathlib/Topology/Compactness/SigmaCompact.lean
/-- If `f : X → Y` is an `Embedding`, the image `f '' s` of a set `s` is σ-compact
  if and only `s` is σ-compact. -/
lemma Embedding.isSigmaCompact_iff {f : X → Y} {s : Set X}
    (hf : Embedding f) : IsSigmaCompact s ↔ IsSigmaCompact (f '' s)
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
lemma IsClosed.mul_closure_one_eq {F : Set G} (hF : IsClosed F) :
    F * (closure {1} : Set G) = F
-- Mathlib/Algebra/Order/Hom/Ring.lean
@[simp]
theorem coe_toOrderRingHom_refl : (OrderRingIso.refl α : α →+*o α) = OrderRingHom.id α
-- Mathlib/Geometry/Manifold/MFDeriv/Defs.lean
theorem MDifferentiableAt.differentiableWithinAt_writtenInExtChartAt {f : M → M'} {x : M}
    (hf : MDifferentiableAt I I' f x) :
    DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f) (range I) ((extChartAt I x) x)
-- Mathlib/Data/Complex/Abs.lean
private theorem abs_nonneg' (z : ℂ) : 0 ≤ abs z
-- Mathlib/Order/Filter/Basic.lean
theorem frequently_imp_distrib {f : Filter α} {p q : α → Prop} :
    (∃ᶠ x in f, p x → q x) ↔ (∀ᶠ x in f, p x) → ∃ᶠ x in f, q x
-- Mathlib/CategoryTheory/Endomorphism.lean
theorem smul_left {X : Cᵒᵖ} {Y : C} {r : End X} {f : unop X ⟶ Y} : r • f = r.unop ≫ f
-- Mathlib/FieldTheory/NormalClosure.lean
lemma restrictScalars_eq :
    (toAlgHom K (normalClosure F K L) L).fieldRange.restrictScalars F = normalClosure F K L
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
theorem isOrtho_iff_le {U V : Submodule 𝕜 E} : U ⟂ V ↔ U ≤ Vᗮ
-- Mathlib/Analysis/Convex/Segment.lean
@[simp]
theorem left_mem_openSegment_iff [DenselyOrdered 𝕜] [NoZeroSMulDivisors 𝕜 E] :
    x ∈ openSegment 𝕜 x y ↔ x = y
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
@[simp]
theorem rootsOfUnityEquivNthRoots_symm_apply (x : { x // x ∈ nthRoots k (1 : R) }) :
    (((rootsOfUnityEquivNthRoots R k).symm x : Rˣ) : R) = (x : R)
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem smul_set_iUnion₂ (a : α) (s : ∀ i, κ i → Set β) :
    (a • ⋃ (i) (j), s i j) = ⋃ (i) (j), a • s i j
-- Mathlib/Data/ENNReal/Basic.lean
@[simp]
theorem coe_toNNReal : ∀ {a : ℝ≥0∞}, a ≠ ∞ → ↑a.toNNReal = a
-- Mathlib/Order/RelIso/Basic.lean
/-- `Quotient.mk'` as a relation homomorphism between the relation and the lift of a relation. -/
@[simps]
def Quotient.mkRelHom [Setoid α] {r : α → α → Prop}
    (H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂) : r →r Quotient.lift₂ r H
-- Mathlib/Order/WellFoundedSet.lean
theorem IsWF.mono (h : IsWF t) (st : s ⊆ t) : IsWF s
-- Mathlib/Data/Finset/Lattice.lean
theorem inf_id_set_eq_sInter (s : Finset (Set α)) : s.inf id = ⋂₀ ↑s
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ico_coe_top : Ico (a : WithTop α) ⊤ = (Ici a).map Embedding.some
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem hasFDerivAtFilter_const (c : F) (x : E) (L : Filter E) :
    HasFDerivAtFilter (fun _ => c) (0 : E →L[𝕜] F) x L
-- Mathlib/Algebra/BigOperators/Intervals.lean
@[to_additive]
theorem prod_range_div_prod_range {α : Type*} [CommGroup α] {f : ℕ → α} {n m : ℕ} (hnm : n ≤ m) :
    ((∏ k ∈ range m, f k) / ∏ k ∈ range n, f k) =
    ∏ k ∈ (range m).filter fun k => n ≤ k, f k
-- Mathlib/MeasureTheory/Measure/LevyProkhorovMetric.lean
lemma levyProkhorovDist_comm (μ ν : Measure Ω) :
    levyProkhorovDist μ ν = levyProkhorovDist ν μ
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
/-- A strongly measurable function is measurable. -/
@[aesop 5% apply (rule_sets := [Measurable])]
protected theorem measurable {_ : MeasurableSpace α} [TopologicalSpace β] [PseudoMetrizableSpace β]
    [MeasurableSpace β] [BorelSpace β] (hf : StronglyMeasurable f) : Measurable f
-- Mathlib/AlgebraicTopology/DoldKan/EquivalencePseudoabelian.lean
/-- The functor `Γ` for the equivalence is `Γ'`. -/
@[simps!, nolint unusedArguments]
def Γ [IsIdempotentComplete C] [HasFiniteCoproducts C] : ChainComplex C ℕ ⥤ SimplicialObject C
-- Mathlib/Analysis/NormedSpace/OperatorNorm/NormedSpace.lean
@[simp]
theorem coord_norm (x : E) (h : x ≠ 0) : ‖coord 𝕜 x h‖ = ‖x‖⁻¹
-- Mathlib/Order/Basic.lean
@[simp]
theorem swap_le_swap [LE α] [LE β] {x y : α × β} : x.swap ≤ y.swap ↔ x ≤ y
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem total_zero : Finsupp.total α M R 0 = 0
-- Mathlib/FieldTheory/RatFunc/Basic.lean
@[simp]
theorem num_div (p q : K[X]) :
    num (algebraMap _ _ p / algebraMap _ _ q) =
      Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q)
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval_surjective (x : R) : Function.Surjective <| eval x
-- Mathlib/Algebra/Group/Nat.lean
lemma even_mul_pred_self : ∀ n : ℕ, Even (n * (n - 1))
-- Mathlib/Data/List/Zip.lean
@[simp]
theorem zipWith3_same_left (f : α → α → β → γ) :
    ∀ (la : List α) (lb : List β), zipWith3 f la la lb = zipWith (fun a b => f a a b) la lb
-- Mathlib/RingTheory/LocalRing/Defs.lean
/-- A semiring is local if it is nontrivial and `a` or `b` is a unit whenever `a + b = 1`.
Note that `LocalRing` is a predicate. -/
class LocalRing (R : Type*) [Semiring R] extends Nontrivial R : Prop where
  of_is_unit_or_is_unit_of_add_one ::
  /-- in a local ring `R`, if `a + b = 1`, then either `a` is a unit or `b` is a unit. In another
    word, for every `a : R`, either `a` is a unit or `1 - a` is a unit. -/
  isUnit_or_isUnit_of_add_one {a b : R} (h : a + b = 1) : IsUnit a ∨ IsUnit b
-- Mathlib/Topology/Basic.lean
theorem map_mem_closure {t : Set Y} (hf : Continuous f)
    (hx : x ∈ closure s) (ht : MapsTo f s t) : f x ∈ closure t
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean
/-- If `R` is of characteristic zero, then `ζ` is a root of `cyclotomic n R` if and only if it is a
primitive `n`-th root of unity. -/
theorem isRoot_cyclotomic_iff_charZero {n : ℕ} {R : Type*} [CommRing R] [IsDomain R] [CharZero R]
    {μ : R} (hn : 0 < n) : (Polynomial.cyclotomic n R).IsRoot μ ↔ IsPrimitiveRoot μ n
-- Mathlib/Algebra/Polynomial/RingDivision.lean
@[simp]
theorem natDegree_multiset_prod_X_sub_C_eq_card (s : Multiset R) :
    (s.map fun a => X - C a).prod.natDegree = Multiset.card s
-- Mathlib/Data/List/Rotate.lean
@[simp]
theorem mem_rotate : ∀ {l : List α} {a : α} {n : ℕ}, a ∈ l.rotate n ↔ a ∈ l
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- If the inner product of two unit vectors is strictly less than `1`, then the two vectors are
distinct. One form of the equality case for Cauchy-Schwarz. -/
theorem inner_lt_one_iff_real_of_norm_one {x y : F} (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) :
    ⟪x, y⟫_ℝ < 1 ↔ x ≠ y
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
@[simp]
theorem ofNat_re (n : ℕ) [n.AtLeastTwo] : (no_index (OfNat.ofNat n) : ℤ√d).re = n
-- Mathlib/AlgebraicGeometry/Morphisms/Preimmersion.lean
lemma isPreimmersion_eq_inf :
    @IsPreimmersion = topologically Embedding ⊓ stalkwise (Function.Surjective ·)
-- Mathlib/Data/ZMod/Basic.lean
theorem natCast_natAbs_valMinAbs {n : ℕ} [NeZero n] (a : ZMod n) :
    (a.valMinAbs.natAbs : ZMod n) = if a.val ≤ (n : ℕ) / 2 then a else -a
-- Mathlib/Algebra/Order/Monovary.lean
@[to_additive] lemma AntivaryOn.mul_right (h₁ : AntivaryOn f g₁ s) (h₂ : AntivaryOn f g₂ s) :
    AntivaryOn f (g₁ * g₂) s
-- Mathlib/Topology/Order/Basic.lean
theorem nhdsWithin_Iic_basis' [TopologicalSpace α] [LinearOrder α] [OrderTopology α] {a : α}
    (ha : ∃ l, l < a) : (𝓝[≤] a).HasBasis (fun l => l < a) fun l => Ioc l a
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive]
theorem MonoidHom.copy_eq {_ : MulOneClass M} {_ : MulOneClass N} (f : M →* N) (f' : M → N)
    (h : f' = f) : f.copy f' h = f
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
/-- The change-of-basis matrix between two orthonormal bases `a`, `b` is a unitary matrix. -/
theorem OrthonormalBasis.toMatrix_orthonormalBasis_mem_unitary :
    a.toBasis.toMatrix b ∈ Matrix.unitaryGroup ι 𝕜