ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/LiftingProperties/Basic.lean
/-- `HasLiftingProperty i p` means that `i` has the left lifting
property with respect to `p`, or equivalently that `p` has
the right lifting property with respect to `i`. -/
class HasLiftingProperty : Prop where
  /-- Unique field expressing that any commutative square built from `f` and `g` has a lift -/
  sq_hasLift : ∀ {f : A ⟶ X} {g : B ⟶ Y} (sq : CommSq f i p g), sq.HasLift
-- Mathlib/Algebra/AddTorsor.lean
theorem vsub_ne_zero {p q : P} : p -ᵥ q ≠ (0 : G) ↔ p ≠ q
-- Mathlib/Data/Int/Defs.lean
lemma succ_neg_natCast_succ (n : ℕ) : succ (-Nat.succ n) = -n
-- Mathlib/Algebra/Order/Pointwise.lean
theorem smul_Ioi : r • Ioi a = Ioi (r • a)
-- Mathlib/Order/Heyting/Basic.lean
theorem Codisjoint.himp_inf_cancel_left (h : Codisjoint a b) : b ⇨ a ⊓ b = a
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
theorem coe_comp : (f.compDer D : A → N) = (f : M →ₗ[R] N).comp (D : A →ₗ[R] M)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem let_congr {α : Sort u} {β : Sort v} {a a' : α} {b b' : α → β}
    (h₁ : a = a') (h₂ : ∀ x, b x = b' x) : (let x := a; b x) = (let x := a'; b' x)
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[simp]
theorem toOuterMeasure_toMeasure {μ : Measure α} :
    μ.toOuterMeasure.toMeasure (le_toOuterMeasure_caratheodory _) = μ
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
@[simp]
theorem sInf_toNonUnitalSubsemiring (S : Set (NonUnitalSubalgebra R A)) :
    (sInf S).toNonUnitalSubsemiring = sInf (NonUnitalSubalgebra.toNonUnitalSubsemiring '' S)
-- Mathlib/Data/List/Rotate.lean
@[simp]
theorem rotate_zero (l : List α) : l.rotate 0 = l
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
nonrec theorem compl_compl (s : LowerSet α) : s.compl.compl = s
-- Mathlib/Data/List/Sublists.lean
@[simp]
theorem nodup_sublists {l : List α} : Nodup (sublists l) ↔ Nodup l
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[deprecated StronglyMeasurable.of_finite (since := "2024-02-06")]
theorem stronglyMeasurable_of_isEmpty [IsEmpty α] {_ : MeasurableSpace α} [TopologicalSpace β]
    (f : α → β) : StronglyMeasurable f
-- Mathlib/Data/Nat/Factorization/Root.lean
@[simp] lemma floorRoot_pow_self (hn : n ≠ 0) (a : ℕ) : floorRoot n (a ^ n) = a
-- .lake/packages/lean4/src/lean/lake/Lake/Util/Compare.lean
/--
Proof that the equality of a compare function corresponds
to propositional equality.
-/
class EqOfCmp (α : Type u) (cmp : α → α → Ordering) where
  eq_of_cmp {a a' : α} : cmp a a' = .eq → a = a'
-- Mathlib/Algebra/Order/Antidiag/Pi.lean
@[simp] lemma piAntidiag_empty_of_ne_zero (hn : n ≠ 0) : piAntidiag (∅ : Finset ι) n = ∅
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem degreeLT_succ_eq_degreeLE {n : ℕ} : degreeLT R (n + 1) = degreeLE R n
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem map_add (f : α → β) (s t) : map f (s + t) = map f s + map f t
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem empty_not_mem (f : Filter α) [NeBot f] : ¬∅ ∈ f
-- Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
theorem SuperpolynomialDecay.trans_eventually_abs_le (hf : SuperpolynomialDecay l k f)
    (hfg : abs ∘ g ≤ᶠ[l] abs ∘ f) : SuperpolynomialDecay l k g
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
theorem tensor_id (M N : ModuleCat R) : tensorHom (𝟙 M) (𝟙 N) = 𝟙 (ModuleCat.of R (M ⊗ N))
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
@[simp]
theorem liftMonoid_coe_addMonoidHom (f : α →* R) : ↑(liftMonoid f) = lift f
-- Mathlib/Data/Multiset/Basic.lean
theorem choose_spec (hp : ∃! a, a ∈ l ∧ p a) : choose p l hp ∈ l ∧ p (choose p l hp)
-- Mathlib/Data/Finset/Lattice.lean
theorem sup_union [DecidableEq β] : (s₁ ∪ s₂).sup f = s₁.sup f ⊔ s₂.sup f
-- Mathlib/CategoryTheory/Galois/Decomposition.lean
/-- Up to isomorphism an element of the fiber of `X` only lies in one connected component. -/
lemma connected_component_unique {X A B : C} [IsConnected A] [IsConnected B] (a : F.obj A)
    (b : F.obj B) (i : A ⟶ X) (j : B ⟶ X) (h : F.map i a = F.map j b) [Mono i] [Mono j] :
    ∃ (f : A ≅ B), F.map f.hom a = b
-- Mathlib/Analysis/Analytic/Basic.lean
/-- If a function admits a power series expansion `p` on an open ball `B (x, r)`, then
it is analytic at every point of this ball. -/
theorem HasFPowerSeriesOnBall.analyticAt_of_mem (hf : HasFPowerSeriesOnBall f p x r)
    (h : y ∈ EMetric.ball x r) : AnalyticAt 𝕜 f y
-- Mathlib/NumberTheory/Padics/PadicVal.lean
theorem padicValInt_self : padicValInt p p = 1
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem disjUnion_empty (s : Finset α) (h : Disjoint s ∅ := disjoint_bot_right) :
    disjUnion s ∅ h = s
-- Mathlib/Data/Real/Sqrt.lean
@[fun_prop]
nonrec theorem ContinuousAt.sqrt (h : ContinuousAt f x) : ContinuousAt (fun x => √(f x)) x
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem abs_arg_le_pi (z : ℂ) : |arg z| ≤ π
-- Mathlib/CategoryTheory/Limits/Preserves/Limits.lean
@[reassoc (attr := simp)]
theorem preservesColimitsIso_inv_comp_desc (t : Cocone F) :
    (preservesColimitIso G F).inv ≫ G.map (colimit.desc _ t) =
    colimit.desc _ (G.mapCocone t)
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
/-- To prove something for an arbitrary `Lp` simple function, with `0 < p < ∞`, it suffices to show
that the property holds for (multiples of) characteristic functions of finite-measure measurable
sets and is closed under addition (of functions with disjoint support). -/
@[elab_as_elim]
protected theorem induction (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) {P : Lp.simpleFunc E p μ → Prop}
    (h_ind :
      ∀ (c : E) {s : Set α} (hs : MeasurableSet s) (hμs : μ s < ∞),
        P (Lp.simpleFunc.indicatorConst p hs hμs.ne c))
    (h_add :
      ∀ ⦃f g : α →ₛ E⦄,
        ∀ hf : Memℒp f p μ,
          ∀ hg : Memℒp g p μ,
            Disjoint (support f) (support g) →
              P (Lp.simpleFunc.toLp f hf) →
                P (Lp.simpleFunc.toLp g hg) → P (Lp.simpleFunc.toLp f hf + Lp.simpleFunc.toLp g hg))
    (f : Lp.simpleFunc E p μ) : P f
-- Mathlib/Topology/Order/Basic.lean
theorem ge_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 a, x ≤ b
-- Mathlib/Order/Ideal.lean
theorem le_above : x ≤ D.above x
-- Mathlib/CategoryTheory/Limits/Connected.lean
/-- (Impl). The obvious natural transformation from (X × K -) to X -/
@[simps]
def γ₁ {K : J ⥤ C} (X : C) : K ⋙ prod.functor.obj X ⟶ (Functor.const J).obj X
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem map_vadd (p : P) (v : V) : e (v +ᵥ p) = e.linearIsometryEquiv v +ᵥ e p
-- Mathlib/Data/Set/Lattice.lean
theorem compl_sUnion (S : Set (Set α)) : (⋃₀S)ᶜ = ⋂₀ (compl '' S)
-- Mathlib/MeasureTheory/Function/Egorov.lean
theorem notConvergentSeqLTIndex_spec (hε : 0 < ε) (hf : ∀ n, StronglyMeasurable (f n))
    (hg : StronglyMeasurable g) (hsm : MeasurableSet s) (hs : μ s ≠ ∞)
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ notConvergentSeq f g n (notConvergentSeqLTIndex hε hf hg hsm hs hfg n)) ≤
      ENNReal.ofReal (ε * 2⁻¹ ^ n)
-- Mathlib/LinearAlgebra/CliffordAlgebra/Prod.lean
lemma ofProd_comp_toProd : (ofProd Q₁ Q₂).comp (toProd Q₁ Q₂) = AlgHom.id _ _
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem compl_iInf₂ (f : ∀ i, κ i → LowerSet α) :
    (⨅ (i) (j), f i j).compl = ⨅ (i) (j), (f i j).compl
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem toFinset_sum_count_nsmul_eq (s : Multiset α) :
    ∑ a ∈ s.toFinset, s.count a • {a} = s
-- Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
theorem gradedMul_algebraMap (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) (r : R) :
    gradedMul R 𝒜 ℬ x (algebraMap R _ r ⊗ₜ 1) = r • x
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
theorem map_adj {v w : V} (h : G.Adj v w) : G'.Adj (f v) (f w)
-- Mathlib/Topology/Maps/Basic.lean
theorem Embedding.mk' (f : X → Y) (inj : Injective f) (induced : ∀ x, comap f (𝓝 (f x)) = 𝓝 x) :
    Embedding f
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
/-- We say that the action of `M` on `α` has `MeasurableSMul` if for each `c` the map `x ↦ c • x`
is a measurable function and for each `x` the map `c ↦ c • x` is a measurable function. -/
@[to_additive]
class MeasurableSMul (M α : Type*) [SMul M α] [MeasurableSpace M] [MeasurableSpace α] :
    Prop where
  measurable_const_smul : ∀ c : M, Measurable (c • · : α → α)
  measurable_smul_const : ∀ x : α, Measurable (· • x : M → α)
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem comap_isPrime [H : IsPrime K] : IsPrime (comap f K)
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem domLCongr_apply {α₁ : Type*} {α₂ : Type*} (e : α₁ ≃ α₂) (v : α₁ →₀ M) :
    (Finsupp.domLCongr e : _ ≃ₗ[R] _) v = Finsupp.domCongr e v
-- Mathlib/Data/Nat/Factorial/Basic.lean
theorem descFactorial_self : ∀ n : ℕ, n.descFactorial n = n !
-- Mathlib/Data/Nat/Defs.lean
private lemma iter_fp_bound (n k : ℕ) :
    let iter_next (n guess : ℕ) := (guess + n / guess) / 2;
    sqrt.iter n k ≤ iter_next n (sqrt.iter n k)
-- Mathlib/Order/Filter/Basic.lean
theorem map_eq_comap_of_inverse {f : Filter α} {m : α → β} {n : β → α} (h₁ : m ∘ n = id)
    (h₂ : n ∘ m = id) : map m f = comap n f
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- All n-simplices among cospherical points in an n-dimensional
subspace have the same circumradius. -/
theorem exists_circumradius_eq_of_cospherical_subset {s : AffineSubspace ℝ P} {ps : Set P}
    (h : ps ⊆ s) [Nonempty s] {n : ℕ} [FiniteDimensional ℝ s.direction]
    (hd : finrank ℝ s.direction = n) (hc : Cospherical ps) :
    ∃ r : ℝ, ∀ sx : Simplex ℝ P n, Set.range sx.points ⊆ ps → sx.circumradius = r
-- Mathlib/Order/Filter/Ultrafilter.lean
/-- The ultrafilter lemma: Any proper filter is contained in an ultrafilter. -/
theorem exists_le (f : Filter α) [h : NeBot f] : ∃ u : Ultrafilter α, ↑u ≤ f
-- Mathlib/NumberTheory/LSeries/HurwitzZeta.lean
lemma differentiableAt_hurwitzZeta_sub_one_div (a : UnitAddCircle) :
    DifferentiableAt ℂ (fun s ↦ hurwitzZeta a s - 1 / (s - 1) / Gammaℝ s) 1
-- Mathlib/NumberTheory/Padics/PadicVal.lean
/-- A finite sum of rationals with positive `p`-adic valuation has positive `p`-adic valuation
(if the sum is non-zero). -/
theorem sum_pos_of_pos {n : ℕ} {F : ℕ → ℚ} (hF : ∀ i, i < n → 0 < padicValRat p (F i))
    (hn0 : ∑ i ∈ Finset.range n, F i ≠ 0) : 0 < padicValRat p (∑ i ∈ Finset.range n, F i)
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
@[simp] lemma tensorLId_symm_apply (Q₂ : QuadraticForm R M₂) (x : M₂) :
    (tensorLId Q₂).symm x = (TensorProduct.lid R M₂).symm x
-- Mathlib/Algebra/FreeAlgebra.lean
@[simp]
theorem algebraMap_inj (x y : R) :
    algebraMap R (FreeAlgebra R X) x = algebraMap R (FreeAlgebra R X) y ↔ x = y
-- Mathlib/Order/BooleanAlgebra.lean
theorem codisjoint_himp_self_right : Codisjoint x (x ⇨ y)
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
theorem condexpL2_indicator_of_measurable (hm : m ≤ m0) (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞)
    (c : E) :
    (condexpL2 E 𝕜 hm (indicatorConstLp 2 (hm s hs) hμs c) : α →₂[μ] E) =
      indicatorConstLp 2 (hm s hs) hμs c
-- Mathlib/Analysis/Asymptotics/Theta.lean
theorem IsLittleO.right_isTheta_add {f₁ f₂ : α → E'} (h : f₁ =o[l] f₂) :
    f₂ =Θ[l] (f₁ + f₂)
-- Mathlib/Topology/Bornology/Basic.lean
theorem isBounded_univ : IsBounded (univ : Set α) ↔ BoundedSpace α
-- Mathlib/CategoryTheory/Sites/Coherent/RegularTopology.lean
/--
For a preregular category, any sieve that contains an `EffectiveEpi` is a covering sieve of the
regular topology.
Note: This is one direction of `mem_sieves_iff_hasEffectiveEpi`, but is needed for the proof.
-/
theorem mem_sieves_of_hasEffectiveEpi (S : Sieve X) :
    (∃ (Y : C) (π : Y ⟶ X), EffectiveEpi π ∧ S.arrows π) → (S ∈ (regularTopology C).sieves X)
-- Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean
/-- For `A : Matrix V V α` and `h : IsAdjMatrix A`,
    `h.toGraph` is the simple graph whose adjacency matrix is `A`. -/
@[simps]
def toGraph [MulZeroOneClass α] [Nontrivial α] (h : IsAdjMatrix A) : SimpleGraph V
-- Mathlib/Algebra/Homology/ComplexShapeSigns.lean
lemma ε_succ {p q : I} (hpq : c.Rel p q) : c.ε q = - c.ε p
-- Mathlib/Analysis/Complex/Basic.lean
theorem dist_self_conj (z : ℂ) : dist z (conj z) = 2 * |z.im|
-- Mathlib/Data/Set/Prod.lean
theorem prod_univ_range_eq {m₂ : β → δ} :
    (univ : Set α) ×ˢ range m₂ = range fun p : α × β => (p.1, m₂ p.2)
-- Mathlib/Data/PNat/Interval.lean
@[simp]
theorem card_Ico : (Ico a b).card = b - a
-- Mathlib/Data/PNat/Prime.lean
@[simp]
theorem one_gcd {n : ℕ+} : gcd 1 n = 1
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem UniqueDiffWithinAt.univ_pi (ι : Type*) [Finite ι] (E : ι → Type*)
    [∀ i, NormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] (s : ∀ i, Set (E i)) (x : ∀ i, E i)
    (h : ∀ i, UniqueDiffWithinAt 𝕜 (s i) (x i)) : UniqueDiffWithinAt 𝕜 (Set.pi univ s) x
-- Mathlib/RingTheory/Congruence/Basic.lean
@[simp, norm_cast]
theorem coe_add (x y : R) : (↑(x + y) : c.Quotient) = ↑x + ↑y
-- Mathlib/Data/ENNReal/Basic.lean
theorem coe_le_iff : ↑r ≤ a ↔ ∀ p : ℝ≥0, a = p → r ≤ p
-- Mathlib/Data/Fintype/Card.lean
private theorem natEmbeddingAux_injective (α : Type*) [Infinite α] :
    Function.Injective (natEmbeddingAux α)
-- Mathlib/MeasureTheory/Measure/Restrict.lean
@[simp]
theorem ae_restrict_union_eq (s t : Set α) :
    ae (μ.restrict (s ∪ t)) = ae (μ.restrict s) ⊔ ae (μ.restrict t)
-- Mathlib/Data/Finset/Image.lean
theorem erase_image_subset_image_erase [DecidableEq α] (f : α → β) (s : Finset α) (a : α) :
    (s.image f).erase (f a) ⊆ (s.erase a).image f
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
@[simp]
theorem imagePresheaf_id : imagePresheaf (𝟙 F) = ⊤
-- Mathlib/Order/CompletePartialOrder.lean
/--
Complete partial orders are partial orders where every directed set has a least upper bound.
-/
class CompletePartialOrder (α : Type*) extends PartialOrder α, SupSet α where
  /-- For each directed set `d`, `sSup d` is the least upper bound of `d`. -/
  lubOfDirected : ∀ d, DirectedOn (· ≤ ·) d → IsLUB d (sSup d)
-- Mathlib/Analysis/Analytic/Composition.lean
@[simp]
theorem removeZero_applyComposition (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (c : Composition n) : p.removeZero.applyComposition c = p.applyComposition c
-- Mathlib/SetTheory/Lists.lean
@[simp]
theorem of_toList : ∀ l : Lists' α true, ofList (toList l) = l
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean
@[reassoc]
theorem PreservesPullback.iso_hom_fst :
    (PreservesPullback.iso G f g).hom ≫ pullback.fst _ _ = G.map (pullback.fst f g)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp, norm_cast]
theorem coe_sInf (S : Set (Subring R)) : ((sInf S : Subring R) : Set R) = ⋂ s ∈ S, ↑s
-- Mathlib/Probability/Martingale/Centering.lean
theorem martingale_martingalePart (hf : Adapted ℱ f) (hf_int : ∀ n, Integrable (f n) μ)
    [SigmaFiniteFiltration μ ℱ] : Martingale (martingalePart f ℱ μ) ℱ μ
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem _root_.MeasurableEmbedding.integral_map {β} {_ : MeasurableSpace β} {f : α → β}
    (hf : MeasurableEmbedding f) (g : β → G) : ∫ y, g y ∂Measure.map f μ = ∫ x, g (f x) ∂μ
-- Mathlib/LinearAlgebra/StdBasis.lean
@[simp]
theorem basis_apply [DecidableEq η] (s : ∀ j, Basis (ιs j) R (Ms j)) (ji) :
    Pi.basis s ji = stdBasis R _ ji.1 (s ji.1 ji.2)
-- Mathlib/Data/List/Rotate.lean
@[simp]
theorem length_rotate' : ∀ (l : List α) (n : ℕ), (l.rotate' n).length = l.length
-- Mathlib/Analysis/Calculus/Deriv/Pow.lean
theorem deriv_pow : deriv (fun x : 𝕜 => x ^ n) x = (n : 𝕜) * x ^ (n - 1)
-- Mathlib/CategoryTheory/Preadditive/Generator.lean
theorem Preadditive.isCoseparating_iff (𝒢 : Set C) :
    IsCoseparating 𝒢 ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ G ∈ 𝒢, ∀ (h : Y ⟶ G), f ≫ h = 0) → f = 0
-- Mathlib/Algebra/DirectSum/Internal.lean
@[nolint simpNF, simp, norm_cast] theorem coe_algebraMap (s : S) :
    ↑(algebraMap _ (A 0) s) = algebraMap _ R s
-- Mathlib/Data/List/Sigma.lean
theorem kerase_comm (a₁ a₂) (l : List (Sigma β)) :
    kerase a₂ (kerase a₁ l) = kerase a₁ (kerase a₂ l)
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem expSeries_apply_eq_div' (x : 𝔸) :
    (fun n => expSeries 𝕂 𝔸 n fun _ => x) = fun n => x ^ n / n !
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
/-- The affine open sets of an open subscheme
corresponds to the affine open sets containing in the subset. -/
@[simps! apply_coe_coe]
def _root_.AlgebraicGeometry.affineOpensRestrict {X : Scheme.{u}} (U : X.Opens) :
    U.toScheme.affineOpens ≃ { V : X.affineOpens // V ≤ U }
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- Given three points in strict order on the same line, and a fourth point, the angles at the
fourth point between the second and third or first and third points have the same sign. -/
theorem _root_.Sbtw.oangle_sign_eq_right {p₁ p₂ p₃ : P} (p₄ : P) (h : Sbtw ℝ p₁ p₂ p₃) :
    (∡ p₂ p₄ p₃).sign = (∡ p₁ p₄ p₃).sign
-- Mathlib/Topology/Instances/EReal.lean
theorem nhds_bot_basis : (𝓝 (⊥ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Iio ·)
-- Mathlib/Topology/DiscreteQuotient.lean
/-- The type of discrete quotients of a topological space. -/
@[ext] -- Porting note: in Lean 4, uses projection to `r` instead of `Setoid`.
structure DiscreteQuotient (X : Type*) [TopologicalSpace X] extends Setoid X where
  /-- For every point `x`, the set `{ y | Rel x y }` is an open set. -/
  protected isOpen_setOf_rel : ∀ x, IsOpen (setOf (toSetoid.Rel x))
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem add_one_inj {α β : Cardinal} : α + 1 = β + 1 ↔ α = β
-- Mathlib/RingTheory/Congruence/Basic.lean
/-- The smallest congruence relation containing a binary relation `r` is contained in any
    congruence relation containing `r`. -/
theorem ringConGen_le {r : R → R → Prop} {c : RingCon R}
    (h : ∀ x y, r x y → c x y) : ringConGen r ≤ c
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `E / F` is algebraic, then an intermediate field of `E / F` is equal to the separable closure
of `F` in `E` if and only if it is separable over `F`, and `E` is purely inseparable
over it. -/
theorem eq_separableClosure_iff [Algebra.IsAlgebraic F E] (L : IntermediateField F E) :
    L = separableClosure F E ↔ Algebra.IsSeparable F L ∧ IsPurelyInseparable L E
-- Mathlib/Data/Set/Sups.lean
@[simp]
theorem sups_eq_empty : s ⊻ t = ∅ ↔ s = ∅ ∨ t = ∅
-- Mathlib/Topology/Instances/ENNReal.lean
lemma liminf_const_sub (F : Filter ι) [NeBot F] (f : ι → ℝ≥0∞)
    {c : ℝ≥0∞} (c_ne_top : c ≠ ∞) :
    Filter.liminf (fun i ↦ c - f i) F = c - Filter.limsup f F
-- Mathlib/Order/WithBot.lean
theorem coe_mono : Monotone (fun a : α => (a : WithTop α))
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem comap_le_iff_le_map (hf : Function.Bijective f) {I : Ideal R} {K : Ideal S} :
    comap f K ≤ I ↔ K ≤ map f I
-- Mathlib/Data/Sym/Basic.lean
@[simp]
theorem attach_mk {m : Multiset α} {hc : Multiset.card m = n} :
    attach (mk m hc) = mk m.attach (Multiset.card_attach.trans hc)
-- Mathlib/Algebra/Divisibility/Units.lean
theorem IsRelPrime.of_mul_right_right (H : IsRelPrime x (y * z)) : IsRelPrime x z
-- Mathlib/Data/List/Pairwise.lean
theorem Pairwise.forall_of_forall (H : Symmetric R) (H₁ : ∀ x ∈ l, R x x) (H₂ : l.Pairwise R) :
    ∀ ⦃x⦄, x ∈ l → ∀ ⦃y⦄, y ∈ l → R x y
-- Mathlib/Combinatorics/Quiver/Basic.lean
@[simp]
theorem empty_arrow {V : Type u} (a b : Empty V) : (a ⟶ b) = PEmpty
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
@[simp]
lemma Isometry.snd_comp_inl (Q₂ : QuadraticMap R M₂ P) :
    (snd M₁ Q₂).comp (inl (0 : QuadraticMap R M₁ P) Q₂) = 0
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalMaxOn.not_nhds_le_map [TopologicalSpace β] (hf : IsLocalMaxOn f s a)
    [NeBot (𝓝[>] f a)] : ¬𝓝 (f a) ≤ map f (𝓝[s] a)
-- Mathlib/Order/SuccPred/Basic.lean
theorem Ici_succ_of_not_isMax (ha : ¬IsMax a) : Ici (succ a) = Ioi a
-- Mathlib/RingTheory/Multiplicity.lean
theorem eq_coe_iff {a b : α} {n : ℕ} :
    multiplicity a b = (n : PartENat) ↔ a ^ n ∣ b ∧ ¬a ^ (n + 1) ∣ b
-- Mathlib/Order/Filter/AtTopBot.lean
theorem mem_atBot [Preorder α] (a : α) : { b : α | b ≤ a } ∈ @atBot α _
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- An oriented angle is unchanged by replacing the third point with the midpoint of the segment
between the second point and that point. -/
@[simp]
theorem oangle_midpoint_rev_right (p₁ p₂ p₃ : P) : ∡ p₁ p₂ (midpoint ℝ p₂ p₃) = ∡ p₁ p₂ p₃
-- Mathlib/NumberTheory/ModularForms/JacobiTheta/TwoVariable.lean
lemma jacobiTheta₂'_neg_left (z τ : ℂ) : jacobiTheta₂' (-z) τ = -jacobiTheta₂' z τ
-- Mathlib/Algebra/Ring/Prod.lean
theorem prod_unique (f : R →ₙ+* S × T) : ((fst S T).comp f).prod ((snd S T).comp f) = f
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem snd_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : s(t, u) ∈ p.edges) :
    u ∈ p.support
-- Mathlib/Order/Lattice.lean
@[simp]
theorem ofDual_max (a b : αᵒᵈ) : ofDual (max a b) = min (ofDual a) (ofDual b)
-- Mathlib/Algebra/Algebra/Bilinear.lean
@[simp]
theorem mul_apply' (a b : A) : mul R A a b = a * b
-- .lake/packages/batteries/Batteries/Data/HashMap/WF.lean
theorem mk_size (h) : (mk n h : Buckets α β).size = 0
-- Mathlib/Topology/Order/IsLUB.lean
theorem exists_seq_strictMono_tendsto' {α : Type*} [LinearOrder α] [TopologicalSpace α]
    [DenselyOrdered α] [OrderTopology α] [FirstCountableTopology α] {x y : α} (hy : y < x) :
    ∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n ∈ Ioo y x) ∧ Tendsto u atTop (𝓝 x)
-- Mathlib/Topology/Semicontinuous.lean
theorem upperSemicontinuousWithinAt_const : UpperSemicontinuousWithinAt (fun _x => z) s x
-- Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean
theorem pos {M} (a : M) [CanonicallyOrderedAddCommMonoid M] [NeZero a] : 0 < a
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem mulEquivOfLocalizations_left_inv_apply {k : N ≃* P} (x) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) x = k x
-- Mathlib/Topology/EMetricSpace/Basic.lean
@[simp]
theorem edist_ofMul (a b : X) : edist (ofMul a) (ofMul b) = edist a b
-- Mathlib/Data/Finsupp/NeLocus.lean
@[simp]
theorem neLocus_sub_right : neLocus (f₁ - g) (f₂ - g) = neLocus f₁ f₂
-- Mathlib/SetTheory/Game/Nim.lean
@[simp]
theorem toRightMovesNim_symm_lt {o : Ordinal} (i : (nim o).RightMoves) :
    ↑(toRightMovesNim.symm i) < o
-- Mathlib/Algebra/DirectLimit.lean
lemma congr_apply_of [IsDirected ι (· ≤ ·)]
    (e : (i : ι) → G i ≃+ G' i)
    (he : ∀ i j h, (e j).toAddMonoidHom.comp (f i j h) = (f' i j h).comp (e i))
    {i : ι} (g : G i) :
    congr e he (of G f i g) = of G' f' i (e i g)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem map_id' (l : List α) : map (fun a => a) l = l
-- Mathlib/GroupTheory/Nilpotent.lean
/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which the descending
central series reaches `⊥` in its `n`'th term. -/
theorem least_descending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_descending_central_series G).mp hG) =
    Group.nilpotencyClass G
-- Mathlib/Topology/MetricSpace/Bounded.lean
/-- A totally bounded set is bounded -/
theorem _root_.TotallyBounded.isBounded {s : Set α} (h : TotallyBounded s) : IsBounded s
-- Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
theorem hom.inj_on_objects : Function.Injective (hom S).obj
-- Mathlib/Algebra/Group/AddChar.lean
@[simp, norm_cast] lemma coe_toMonoidHomEquiv (ψ : AddChar A M) :
    ⇑(toMonoidHomEquiv ψ) = ψ ∘ Multiplicative.toAdd
-- Mathlib/Data/Nat/Pairing.lean
theorem unpair_right_le (n : ℕ) : (unpair n).2 ≤ n
-- .lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean
theorem strongRecOn_eq {motive : Nat → Sort _} (ind : ∀ n, (∀ m, m < n → motive m) → motive n)
    (t : Nat) : Nat.strongRecOn t ind = ind t fun m _ => Nat.strongRecOn m ind
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc (attr := simp)]
theorem pentagon_hom_inv_inv_inv_hom :
    (α_ W X (Y ⊗ Z)).hom ≫ W ◁ (α_ X Y Z).inv ≫ (α_ W (X ⊗ Y) Z).inv =
      (α_ (W ⊗ X) Y Z).inv ≫ (α_ W X Y).hom ▷ Z
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
protected theorem isometry : Isometry e
-- Mathlib/CategoryTheory/Sites/NonabelianCohomology/H1.lean
lemma OneCocycle.IsCohomologous.class_eq {γ₁ γ₂ : OneCocycle G U} (h : γ₁.IsCohomologous γ₂) :
    γ₁.class = γ₂.class