ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/GroupTheory/Perm/ClosureSwap.lean
/-- If a subgroup is generated by transpositions, then a transposition `swap x y` lies in the
  subgroup if and only if `x` lies in the same orbit as `y`. -/
theorem swap_mem_closure_isSwap {S : Set (Perm α)} (hS : ∀ f ∈ S, f.IsSwap) {x y : α} :
    swap x y ∈ closure S ↔ x ∈ orbit (closure S) y
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem measurable_quotient_mk'' {s : Setoid α} : Measurable (Quotient.mk'' : α → Quotient s)
-- Mathlib/Data/Nat/Log.lean
@[simp]
theorem log_zero_right (b : ℕ) : log b 0 = 0
-- Mathlib/Combinatorics/SetFamily/Compression/UV.lean
/-- Any family is compressed along two identical elements. -/
theorem isCompressed_self (u : α) (s : Finset α) : IsCompressed u u s
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
@[simp]
theorem PrimeSpectrum.comap_residue (T : Type u) [CommRing T] [LocalRing T]
    (x : PrimeSpectrum (ResidueField T)) : PrimeSpectrum.comap (residue T) x = closedPoint T
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem map_mono {S₁ S₂ : NonUnitalSubalgebra R A} {f : F} :
    S₁ ≤ S₂ → (map f S₁ : NonUnitalSubalgebra R B) ≤ map f S₂
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- For a set `s` in a pseudo emetric space, if for every `ε > 0` there exists a countable
set that is `ε`-dense in `s`, then there exists a countable subset `t ⊆ s` that is dense in `s`. -/
theorem subset_countable_closure_of_almost_dense_set (s : Set α)
    (hs : ∀ ε > 0, ∃ t : Set α, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε) :
    ∃ t, t ⊆ s ∧ t.Countable ∧ s ⊆ closure t
-- Mathlib/Probability/Martingale/BorelCantelli.lean
theorem Martingale.ae_not_tendsto_atTop_atBot [IsFiniteMeasure μ] (hf : Martingale f ℱ μ)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) :
    ∀ᵐ ω ∂μ, ¬Tendsto (fun n => f n ω) atTop atBot
-- Mathlib/Topology/Order/ExtrClosure.lean
protected theorem IsLocalMinOn.closure (h : IsLocalMinOn f s a) (hc : ContinuousOn f (closure s)) :
    IsLocalMinOn f (closure s) a
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem cardFactors_apply_prime_pow {p k : ℕ} (hp : p.Prime) : Ω (p ^ k) = k
-- Mathlib/NumberTheory/DirichletCharacter/Basic.lean
lemma changeLevel_one {d : ℕ} (h : d ∣ n) :
    changeLevel h (1 : DirichletCharacter R d) = 1
-- Mathlib/Analysis/Convolution.lean
theorem support_convolution_subset_swap : support (f ⋆[L, μ] g) ⊆ support g + support f
-- Mathlib/RingTheory/Algebraic.lean
lemma IsAlgebraic.inv_iff {K} [Field K] [Algebra R K] {x : K} :
    IsAlgebraic R (x⁻¹) ↔ IsAlgebraic R x
-- Mathlib/Analysis/Calculus/ContDiff/FiniteDimension.lean
/-- This is a useful lemma to prove that a certain operation preserves functions being `C^n`.
When you do induction on `n`, this gives a useful characterization of a function being `C^(n+1)`,
assuming you have already computed the derivative. The advantage of this version over
`contDiff_succ_iff_fderiv` is that both occurrences of `ContDiff` are for functions with the same
domain and codomain (`E` and `F`). This is not the case for `contDiff_succ_iff_fderiv`, which
often requires an inconvenient need to generalize `F`, which results in universe issues
(see the discussion in the section of `ContDiff.comp`).

This lemma avoids these universe issues, but only applies for finite dimensional `E`. -/
theorem contDiff_succ_iff_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} :
    ContDiff 𝕜 (n + 1 : ℕ) f ↔ Differentiable 𝕜 f ∧ ∀ y, ContDiff 𝕜 n fun x => fderiv 𝕜 f x y
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
@[simp]
theorem val_one : (1 : HomogeneousLocalization 𝒜 x).val = 1
-- Mathlib/Analysis/Convex/Cone/Proper.lean
protected theorem pointed (K : ProperCone ℝ E) : (K : ConvexCone ℝ E).Pointed
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
/-- In a group with zero, an existential over a unit can be rewritten in terms of `Units.mk0`. -/
theorem exists0 {p : G₀ˣ → Prop} : (∃ g : G₀ˣ, p g) ↔ ∃ (g : G₀) (hg : g ≠ 0), p (Units.mk0 g hg)
-- Mathlib/RingTheory/DedekindDomain/Different.lean
lemma le_traceDual {I J : Submodule B L} :
    I ≤ Jᵛ ↔ I * J ≤ 1ᵛ
-- Mathlib/Order/Filter/Prod.lean
theorem sup_prod (f₁ f₂ : Filter α) (g : Filter β) : (f₁ ⊔ f₂) ×ˢ g = (f₁ ×ˢ g) ⊔ (f₂ ×ˢ g)
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_ne_mul_left (a : G) {b c : G} : b * a ≠ c * a ↔ b ≠ c
-- Mathlib/Algebra/Polynomial/Coeff.lean
@[simp]
theorem intCast_coeff_zero {i : ℤ} {R : Type*} [Ring R] : (i : R[X]).coeff 0 = i
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem nonempty_Icc : (Icc a b).Nonempty ↔ a ≤ b
-- Mathlib/Topology/Separation.lean
/-- If the codomain of a topological embedding is a Hausdorff space, then so is its domain.
See also `T2Space.of_continuous_injective`. -/
theorem Embedding.t2Space [TopologicalSpace Y] [T2Space Y] {f : X → Y} (hf : Embedding f) :
    T2Space X
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem lt_mul_left [MulPosStrictMono α]
    (hn : 0 < a) (hm : 1 < b) : a < b * a
-- Mathlib/Geometry/Euclidean/MongePoint.lean
/-- Two triangles with the same points have the same orthocenter. -/
theorem orthocenter_eq_of_range_eq {t₁ t₂ : Triangle ℝ P}
    (h : Set.range t₁.points = Set.range t₂.points) : t₁.orthocenter = t₂.orthocenter
-- Mathlib/Data/Finset/NAry.lean
theorem image₂_subset_iff_right : image₂ f s t ⊆ u ↔ ∀ b ∈ t, (s.image fun a => f a b) ⊆ u
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean
theorem continuousAt_tan {x : ℝ} : ContinuousAt tan x ↔ cos x ≠ 0
-- Mathlib/Topology/Algebra/Field.lean
/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then either `f = g` or `f = -g` on
`S`. -/
theorem IsPreconnected.eq_or_eq_neg_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) :
    EqOn f g S ∨ EqOn f (-g) S
-- Mathlib/LinearAlgebra/SymplecticGroup.lean
theorem mem_iff' : A ∈ symplecticGroup l R ↔ Aᵀ * J l R * A = J l R
-- Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean
lemma support_prod (s : Finset ι) (f : ι → κ → M₀) :
    support (fun j ↦ ∏ i ∈ s, f i j) = ⋂ i ∈ s, support (f i)
-- Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
lemma isLocalAtSource
    (H : ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) [IsAffine Y] (𝒰 : Scheme.OpenCover.{u} X),
        Q f ↔ ∀ i, Q (𝒰.map i ≫ f)) : IsLocalAtSource P
-- Mathlib/Data/Finset/Powerset.lean
/-- **Number of Subsets of a Set** -/
@[simp]
theorem card_powerset (s : Finset α) : card (powerset s) = 2 ^ card s
-- Mathlib/Analysis/Fourier/FourierTransform.lean
/-- The Fourier transform converts right-translation into scalar multiplication by a phase
factor. -/
theorem fourierIntegral_comp_add_right [MeasurableAdd 𝕜] (e : AddChar 𝕜 𝕊) (μ : Measure 𝕜)
    [μ.IsAddRightInvariant] (f : 𝕜 → E) (v₀ : 𝕜) :
    fourierIntegral e μ (f ∘ fun v ↦ v + v₀) = fun w ↦ e (v₀ * w) • fourierIntegral e μ f w
-- Mathlib/Algebra/MvPolynomial/Equiv.lean
lemma optionEquivRight_X_some (x : S₁) : optionEquivRight R S₁ (X (some x)) = X x
-- Mathlib/Data/Nat/Nth.lean
theorem nth_lt_nth' {m n : ℕ} (hlt : m < n) (h : ∀ hf : (setOf p).Finite, n < hf.toFinset.card) :
    nth p m < nth p n
-- Mathlib/Data/Nat/Defs.lean
lemma eq_of_dvd_of_lt_two_mul (ha : a ≠ 0) (hdvd : b ∣ a) (hlt : a < 2 * b) : a = b
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
protected theorem injective (e : P₁ ≃ᵃ[k] P₂) : Injective e
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
theorem ofRat_one : (ofRat 1 : Cauchy abv) = 1
-- Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean
lemma IsMeasurableRatCDF.stieltjesFunctionAux_unit_prod {f : α → ℚ → ℝ} (a : α) :
    IsMeasurableRatCDF.stieltjesFunctionAux (fun (p : Unit × α) ↦ f p.2) ((), a)
      = IsMeasurableRatCDF.stieltjesFunctionAux f a
-- Mathlib/NumberTheory/Ostrowski.lean
/-- The absolute value of `p` is `p ^ (-t)` for some positive real number `t`. -/
lemma exists_pos_mulRingNorm_eq_pow_neg : ∃ t : ℝ, 0 < t ∧ f p = p ^ (-t)
-- Mathlib/Data/List/DropRight.lean
@[simp]
theorem rtakeWhile_eq_self_iff : rtakeWhile p l = l ↔ ∀ x ∈ l, p x
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- Affine maps commute with affine combinations. -/
theorem map_affineCombination {V₂ P₂ : Type*} [AddCommGroup V₂] [Module k V₂] [AffineSpace V₂ P₂]
    (p : ι → P) (w : ι → k) (hw : s.sum w = 1) (f : P →ᵃ[k] P₂) :
    f (s.affineCombination k p w) = s.affineCombination k (f ∘ p) w
-- Mathlib/Topology/Category/UniformSpace.lean
theorem hom_ext {X Y : UniformSpaceCat} {f g : X ⟶ Y} : (f : X → Y) = g → f = g
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[simp]
lemma cyclesMap_zero [HasLeftHomology S₁] [HasLeftHomology S₂] :
    cyclesMap (0 : S₁ ⟶ S₂) = 0
-- Mathlib/RingTheory/Coalgebra/Equiv.lean
theorem toCoalgHom_injective : Function.Injective (toCoalgHom : (A ≃ₗc[R] B) → A →ₗc[R] B)
-- Mathlib/LinearAlgebra/Prod.lean
theorem prod_eq_top_iff {p₁ : Submodule R M} {p₂ : Submodule R M₂} :
    p₁.prod p₂ = ⊤ ↔ p₁ = ⊤ ∧ p₂ = ⊤
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
@[simp]
theorem coe_smul (r : R) (v : VectorMeasure α M) : ⇑(r • v) = r • ⇑v
-- Mathlib/Probability/Distributions/Gamma.lean
lemma gammaPDF_of_neg {a r x : ℝ} (hx : x < 0) : gammaPDF a r x = 0
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem continuousMultilinearCurryRightEquiv_symm_apply' (f : G[×n.succ]→L[𝕜] G')
    (v : Fin n → G) (x : G) :
    (continuousMultilinearCurryRightEquiv' 𝕜 n G G').symm f v x = f (snoc v x)
-- Mathlib/Data/Quot.lean
@[simp]
theorem hrecOn₂'_mk'' {φ : Quotient s₁ → Quotient s₂ → Sort*}
    (f : ∀ a b, φ (Quotient.mk'' a) (Quotient.mk'' b))
    (c : ∀ a₁ b₁ a₂ b₂, a₁ ≈ a₂ → b₁ ≈ b₂ → HEq (f a₁ b₁) (f a₂ b₂)) (x : α) (qb : Quotient s₂) :
    (Quotient.mk'' x).hrecOn₂' qb f c = qb.hrecOn' (f x) fun _ _ ↦ c _ _ _ _ (Setoid.refl _)
-- Mathlib/Order/CompleteLattice.lean
@[simp]
theorem le_sInf_iff : a ≤ sInf s ↔ ∀ b ∈ s, a ≤ b
-- Mathlib/Order/Basic.lean
theorem Ne.not_le_or_not_le [PartialOrder α] {a b : α} (h : a ≠ b) : ¬a ≤ b ∨ ¬b ≤ a
-- Mathlib/Order/Ideal.lean
@[simp]
theorem carrier_eq_coe (s : Ideal P) : s.carrier = s
-- Mathlib/MeasureTheory/MeasurableSpace/Invariants.lean
@[simp]
theorem invariants_id : invariants (id : α → α) = ‹MeasurableSpace α›
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem ext_iff {p q : R[X]} : p = q ↔ ∀ n, coeff p n = coeff q n
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem right_le_lineMap_iff_le (h : r < 1) : b ≤ lineMap a b r ↔ b ≤ a
-- Mathlib/Order/OrdContinuous.lean
protected theorem id : RightOrdContinuous (id : α → α)
-- Mathlib/FieldTheory/IsPerfectClosure.lean
theorem IsPRadical.comap_pNilradical [IsPRadical i p] :
    (pNilradical L p).comap i = pNilradical K p
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
@[simp] theorem bind_throw [Monad m] [LawfulMonad m] (f : α → ExceptT ε m β) : (throw e >>= f) = throw e
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem eq_of_mul_eq_mul_right {n m k : Nat} (hm : 0 < m) (h : n * m = k * m) : n = k
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- An oriented angle is unchanged by replacing the first point with the midpoint of the segment
between it and the second point. -/
@[simp]
theorem oangle_midpoint_left (p₁ p₂ p₃ : P) : ∡ (midpoint ℝ p₁ p₂) p₂ p₃ = ∡ p₁ p₂ p₃
-- Mathlib/Combinatorics/Quiver/SingleObj.lean
@[simp]
theorem toPrefunctor_symm_comp (f : SingleObj α ⥤q SingleObj β) (g : SingleObj β ⥤q SingleObj γ) :
    toPrefunctor.symm (f ⋙q g) = toPrefunctor.symm g ∘ toPrefunctor.symm f
-- Mathlib/RingTheory/QuotSMulTop.lean
lemma map_surjective {f : M →ₗ[R] M'} (hf : Surjective f) : Surjective (map r f)
-- Mathlib/AlgebraicGeometry/Scheme.lean
lemma stalkSpecializes_stalkMap_apply (x x' : X) (h : x ⤳ x') (y) :
    f.stalkMap x (Y.presheaf.stalkSpecializes (f.val.base.map_specializes h) y) =
      (X.presheaf.stalkSpecializes h (f.stalkMap x' y))
-- Mathlib/Probability/Kernel/IntegralCompProd.lean
theorem integrable_compProd_iff ⦃f : β × γ → E⦄ (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) :
    Integrable f ((κ ⊗ₖ η) a) ↔
      (∀ᵐ x ∂κ a, Integrable (fun y => f (x, y)) (η (a, x))) ∧
        Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a)
-- Mathlib/MeasureTheory/Group/AddCircle.lean
theorem closedBall_ae_eq_ball {x : AddCircle T} {ε : ℝ} : closedBall x ε =ᵐ[volume] ball x ε
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem toMul_zsmul [DivInvMonoid α] (z : ℤ) (a : Additive α) : toMul (z • a) = toMul a ^ z
-- Mathlib/RepresentationTheory/Basic.lean
@[simp]
theorem asAlgebraHom_single (g : G) (r : k) : asAlgebraHom ρ (Finsupp.single g r) = r • ρ g
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_range_succ (f : ℕ → β) (n : ℕ) :
    (∏ x ∈ range (n + 1), f x) = (∏ x ∈ range n, f x) * f n
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
@[simp]
lemma inl_rel'_inl_iff (x₁ y₁ : X₁) :
    Rel' f g (Sum.inl x₁) (Sum.inl y₁) ↔ x₁ = y₁ ∨
      ∃ (x₀ y₀ : S) (_ : g x₀ = g y₀), x₁ = f x₀ ∧ y₁ = f y₀
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma unop_hom_leftUnitor (X : Cᵒᵖ) : (λ_ X).hom.unop = (λ_ (unop X)).inv
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_range_eq (f : α → β) (h : Injective f) : #(range f) = #α
-- Mathlib/GroupTheory/GroupAction/Quotient.lean
/-- **Class formula** for a finite group acting on a finite type. -/
@[to_additive "**Class formula** for a finite group acting on a finite type."]
theorem card_eq_sum_card_group_div_card_stabilizer [Fintype α] [Fintype β] [Fintype Ω]
    [∀ b : β, Fintype <| stabilizer α b] :
    Fintype.card β = ∑ ω : Ω, Fintype.card α / Fintype.card (stabilizer α ω.out')
-- .lake/packages/batteries/Batteries/Data/RBMap/WF.lean
@[simp] theorem isRed_reverse {t : RBNode α} : t.reverse.isRed = t.isRed
-- Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
/-- If a number `a` is less than or equal to the `liminf` of a function `f` at some filter
and is greater than or equal to the `limsup` of `f`, then `f` tends to `a` along this filter. -/
theorem tendsto_of_le_liminf_of_limsup_le {f : Filter β} {u : β → α} {a : α} (hinf : a ≤ liminf u f)
    (hsup : limsup u f ≤ a) (h : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h' : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault) : Tendsto u f (𝓝 a)
-- Mathlib/Topology/ContinuousOn.lean
theorem ContinuousOn.preimage_interior_subset_interior_preimage {f : α → β} {s : Set α} {t : Set β}
    (hf : ContinuousOn f s) (hs : IsOpen s) : s ∩ f ⁻¹' interior t ⊆ s ∩ interior (f ⁻¹' t)
-- Mathlib/AlgebraicTopology/MooreComplex.lean
theorem objX_zero : objX X 0 = ⊤
-- Mathlib/Analysis/Convex/Extrema.lean
/-- A local maximum of a concave function is a global maximum, restricted to a set `s`. -/
theorem IsMaxOn.of_isLocalMaxOn_of_concaveOn {f : E → β} {a : E} (a_in_s : a ∈ s)
    (h_localmax : IsLocalMaxOn f s a) (h_conc : ConcaveOn ℝ s f) : IsMaxOn f s a
-- Mathlib/Topology/Order/LeftRightNhds.lean
/-- If `a` is positive we can form a basis from only nonnegative `Set.Ioo` intervals -/
theorem nhds_basis_Ioo_pos_of_pos [NoMaxOrder α] {a : α} (ha : 0 < a) :
    (𝓝 a).HasBasis (fun ε : α => (0 : α) < ε ∧ ε ≤ a) fun ε => Ioo (a - ε) (a + ε)
-- Mathlib/Algebra/GroupWithZero/Divisibility.lean
theorem dvd_antisymm' : a ∣ b → b ∣ a → b = a
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem IsAlt.eq_of_add_add_eq_zero [IsCancelAdd M] {a b c : M₁} (hAdd : a + b + c = 0) :
    B a b = B b c
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
protected theorem ne_of_lt {a b : Fin n} (h : a < b) : a ≠ b
-- Mathlib/Algebra/Ring/Subsemiring/Pointwise.lean
@[simp]
theorem coe_pointwise_smul (m : M) (S : Subsemiring R) : ↑(m • S) = m • (S : Set R)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
theorem card_eq_sum_card_fiberwise [DecidableEq β] {f : α → β} {s : Finset α} {t : Finset β}
    (H : ∀ x ∈ s, f x ∈ t) : s.card = ∑ a ∈ t, (s.filter fun x => f x = a).card
-- Mathlib/Data/Rat/Cast/CharZero.lean
@[norm_cast]
theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem subtype_apply (s : AffineSubspace k P) [Nonempty s] (p : s) : s.subtype p = p
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[simp, norm_cast] lemma coe_one : ((1 : AddMonoid.End A) : A → A) = id
-- Mathlib/Topology/ContinuousFunction/Algebra.lean
@[simp, norm_cast]
theorem coe_intCast [IntCast β] (n : ℤ) : ((n : C(α, β)) : α → β) = n
-- Mathlib/RingTheory/LocalRing/ResidueField/Basic.lean
@[simp]
theorem mapEquiv_trans (e₁ : R ≃+* S) (e₂ : S ≃+* T) :
    mapEquiv (e₁.trans e₂) = (mapEquiv e₁).trans (mapEquiv e₂)
-- Mathlib/Analysis/Complex/ReImTopology.lean
theorem closure_preimage_re (s : Set ℝ) : closure (re ⁻¹' s) = re ⁻¹' closure s
-- Mathlib/Logic/IsEmpty.lean
@[simp]
theorem isEmpty_ulift {α} : IsEmpty (ULift α) ↔ IsEmpty α
-- Mathlib/Analysis/Convex/Star.lean
theorem StarConvex.add_smul_mem (hs : StarConvex 𝕜 x s) (hy : x + y ∈ s) {t : 𝕜} (ht₀ : 0 ≤ t)
    (ht₁ : t ≤ 1) : x + t • y ∈ s
-- Mathlib/Algebra/BigOperators/Finsupp.lean
theorem single_sum [Zero M] [AddCommMonoid N] (s : ι →₀ M) (f : ι → M → N) (a : α) :
    single a (s.sum f) = s.sum fun d c => single a (f d c)
-- Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
theorem isMulOneCocycle_of_oneCocycles (f : oneCocycles (Rep.ofMulDistribMulAction G M)) :
    IsMulOneCocycle (M := M) (Additive.toMul ∘ f.1)
-- Mathlib/Order/InitialSeg.lean
/-- A relation is well-founded iff every principal segment of it is well-founded.

In this lemma we use `Subrel` to indicate its principal segments because it's usually more
convenient to use.
-/
theorem wellFounded_iff_wellFounded_subrel {β : Type*} {s : β → β → Prop} [IsTrans β s] :
    WellFounded s ↔ ∀ b, WellFounded (Subrel s { b' | s b' b })
-- Mathlib/CategoryTheory/Category/Bipointed.lean
@[simp]
theorem swap_comp_bipointedToPointedSnd :
    Bipointed.swap ⋙ bipointedToPointedSnd = bipointedToPointedFst
-- Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
theorem intValuationDef_if_neg {r : R} (hr : r ≠ 0) :
    v.intValuationDef r =
      Multiplicative.ofAdd
        (-(Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {r} : Ideal R)).factors : ℤ)
-- Mathlib/CategoryTheory/Monoidal/Bimod.lean
theorem whisker_assoc_bimod {W X Y Z : Mon_ C} (M : Bimod W X) {N N' : Bimod X Y} (f : N ⟶ N')
    (P : Bimod Y Z) :
    whiskerRight (whiskerLeft M f) P =
      (associatorBimod M N P).hom ≫
        whiskerLeft M (whiskerRight f P) ≫ (associatorBimod M N' P).inv
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem single_commute_single [Add G] {a₁ a₂ : G} {b₁ b₂ : k}
    (ha : AddCommute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (single a₁ b₁) (single a₂ b₂)
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem sUnion_eq_empty {S : Set (Set α)} : ⋃₀S = ∅ ↔ ∀ s ∈ S, s = ∅
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
lemma zero_mem (I : FractionalIdeal S P) : 0 ∈ I
-- Mathlib/CategoryTheory/ConcreteCategory/Basic.lean
theorem coe_id {X : C} : (𝟙 X : X → X) = id
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem le_of_exists {f g : CauSeq α abs} (h : ∃ i, ∀ j ≥ i, f j ≤ g j) : f ≤ g
-- Mathlib/Tactic/CategoryTheory/MonoidalComp.lean
@[simps]
instance tensor_right (X Y : C) [MonoidalCoherence (𝟙_ C) Y] :
    MonoidalCoherence X (X ⊗ Y)
-- Mathlib/Topology/Category/CompHaus/Limits.lean
theorem pullback_fst_eq :
    CompHaus.pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst f g
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem gt_of_not_le {n m : Nat} (h : ¬ n ≤ m) : n > m
-- Mathlib/Algebra/CharP/Defs.lean
/-- If two integers from `{0, 1, -1}` result in equal elements in a ring `R`
that is nontrivial and of characteristic not `2`, then they are equal. -/
lemma Int.cast_injOn_of_ringChar_ne_two {R : Type*} [NonAssocRing R] [Nontrivial R]
    (hR : ringChar R ≠ 2) : ({0, 1, -1} : Set ℤ).InjOn ((↑) : ℤ → R)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma ofHom_sub (φ₁ φ₂ : F ⟶ G) :
    Cochain.ofHom (φ₁ - φ₂) = Cochain.ofHom φ₁ - Cochain.ofHom φ₂
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- Pythagorean theorem, subtracting vectors, vector angle form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq' (x y : V) (h : angle x y = π / 2) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
theorem eq_top_iff' (A : Subsemiring R) : A = ⊤ ↔ ∀ x : R, x ∈ A
-- Mathlib/Topology/VectorBundle/Basic.lean
@[continuity]
theorem continuous_totalSpaceMk (b : B) :
    Continuous[_, a.totalSpaceTopology] (.mk b)
-- Mathlib/Topology/Basic.lean
theorem IsClosed.closure_eq (h : IsClosed s) : closure s = s
-- Mathlib/NumberTheory/RamificationInertia.lean
theorem le_pow_of_le_ramificationIdx {n : ℕ} (hn : n ≤ ramificationIdx f p P) :
    map f p ≤ P ^ n
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- If three points lie in the affine span of two points, the first three points are collinear. -/
theorem collinear_triple_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₃} : Set P)
-- Mathlib/Algebra/Algebra/Equiv.lean
@[simp]
theorem coe_ofBijective {f : A₁ →ₐ[R] A₂} {hf : Function.Bijective f} :
    (AlgEquiv.ofBijective f hf : A₁ → A₂) = f
-- Mathlib/Order/WithBot.lean
@[simp] lemma map₂_top_right (f : α → β → γ) (a) : map₂ f a ⊤ = ⊤
-- Mathlib/Data/Set/Prod.lean
theorem univ_pi_eq_empty (ht : t i = ∅) : pi univ t = ∅
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Ioc_union_Ioc_right : Ioc a b ∪ Ioc a c = Ioc a (max b c)
-- Mathlib/RingTheory/Generators.lean
@[simp] lemma of_zero : (of 0 : P.Cotangent) = 0
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
/-- A sequence of uniformly integrable functions which converges μ-a.e. converges in Lp. -/
theorem tendsto_Lp_finite_of_tendsto_ae_of_meas [IsFiniteMeasure μ] (hp : 1 ≤ p) (hp' : p ≠ ∞)
    {f : ℕ → α → β} {g : α → β} (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g)
    (hg' : Memℒp g p μ) (hui : UnifIntegrable f p μ)
    (hfg : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) :
    Tendsto (fun n => eLpNorm (f n - g) p μ) atTop (𝓝 0)
-- Mathlib/Analysis/Convex/Slope.lean
/-- If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is
strictly less than the slope of the secant line of `f` on `[y, z]`, then `f` is strictly convex. -/
theorem strictConvexOn_of_slope_strict_mono_adjacent (hs : Convex 𝕜 s)
    (hf :
      ∀ {x y z : 𝕜},
        x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)) :
    StrictConvexOn 𝕜 s f
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem dropWhile_cons :
    (x :: xs : List α).dropWhile p = if p x then xs.dropWhile p else x :: xs
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Square.lean
lemma isPullback_iff :
    sq.IsPullback ↔ Nonempty (IsLimit sq.pullbackCone)
-- Mathlib/Analysis/RCLike/Basic.lean
@[rclike_simps] -- porting note (#10618): was `simp`
theorem I_mul_re (z : K) : re (I * z) = -im z
-- Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
theorem im_div_exp_dist_le (z w : ℍ) : z.im / Real.exp (dist z w) ≤ w.im
-- Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
/-- A submodule has dimension `1` if and only if there is a
single non-zero vector in the submodule such that the submodule is contained in
its span. -/
theorem rank_submodule_eq_one_iff (s : Submodule K V) [Module.Free K s] :
    Module.rank K s = 1 ↔ ∃ v₀ ∈ s, v₀ ≠ 0 ∧ s ≤ K ∙ v₀
-- Mathlib/Analysis/Calculus/Dslope.lean
theorem ContinuousAt.of_dslope (h : ContinuousAt (dslope f a) b) : ContinuousAt f b
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem HasFDerivAt.const_mul (ha : HasFDerivAt a a' x) (b : 𝔸) :
    HasFDerivAt (fun y => b * a y) (b • a') x
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
theorem _root_.AlgebraicGeometry.exists_basicOpen_le_affine_inter
    {V : X.Opens} (hV : IsAffineOpen V) (x : X) (hx : x ∈ U ⊓ V) :
    ∃ (f : Γ(X, U)) (g : Γ(X, V)), X.basicOpen f = X.basicOpen g ∧ x ∈ X.basicOpen f