ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem le_cof_type [IsWellOrder α r] {c} : c ≤ cof (type r) ↔ ∀ S, Unbounded r S → c ≤ #S
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `E / F` is algebraic, then the `Field.finSepDegree F E` is equal to `Field.sepDegree F E`
as a natural number. This means that the cardinality of `Field.Emb F E` and the degree of
`(separableClosure F E) / F` are both finite or infinite, and when they are finite, they
coincide. -/
theorem finSepDegree_eq [Algebra.IsAlgebraic F E] :
    finSepDegree F E = Cardinal.toNat (sepDegree F E)
-- Mathlib/Order/OrdContinuous.lean
theorem map_sInf' (hf : RightOrdContinuous f) (s : Set α) : f (sInf s) = sInf (f '' s)
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem measure_spanningSets_lt_top (μ : Measure α) [SigmaFinite μ] (i : ℕ) :
    μ (spanningSets μ i) < ∞
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
/-- If a module has a finite dimension, all bases are indexed by a finite type. -/
theorem Basis.nonempty_fintype_index_of_rank_lt_aleph0 {ι : Type*} (b : Basis ι R M)
    (h : Module.rank R M < ℵ₀) : Nonempty (Fintype ι)
-- Mathlib/CategoryTheory/Generator.lean
theorem isCoseparating_proj_preimage {𝒢 : Set C} (h𝒢 : IsCoseparating 𝒢) :
    IsCoseparating ((proj S T).obj ⁻¹' 𝒢)
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
theorem mem_conjugatesOfSet_iff {x : G} : x ∈ conjugatesOfSet s ↔ ∃ a ∈ s, IsConj a x
-- Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem ImageMap.map_uniq_aux {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] {sq : f ⟶ g}
    (map : image f.hom ⟶ image g.hom)
    (map_ι : map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right := by aesop_cat)
    (map' : image f.hom ⟶ image g.hom)
    (map_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) : (map = map')
-- Mathlib/MeasureTheory/Group/Measure.lean
@[to_additive]
theorem map_mul_right_ae (μ : Measure G) [IsMulRightInvariant μ] (x : G) :
    Filter.map (fun h => h * x) (ae μ) = ae μ
-- Mathlib/Algebra/Order/Group/OrderIso.lean
@[to_additive (attr := simp)]
theorem OrderIso.mulRight_symm (a : α) : (OrderIso.mulRight a).symm = OrderIso.mulRight a⁻¹
-- Mathlib/Order/Lattice.lean
theorem max_max_max_comm : max (max a b) (max c d) = max (max a c) (max b d)
-- Mathlib/Topology/GDelta.lean
/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
theorem IsGδ.biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
    IsGδ (⋃ i ∈ s, f i)
-- Mathlib/RingTheory/AdjoinRoot.lean
theorem Minpoly.toAdjoin_apply' (a : AdjoinRoot (minpoly R x)) :
    Minpoly.toAdjoin R x a =
      liftHom (minpoly R x) (⟨x, self_mem_adjoin_singleton R x⟩ : adjoin R ({x} : Set S))
        (by simp [← Subalgebra.coe_eq_zero, aeval_subalgebra_coe]) a
-- Mathlib/MeasureTheory/Measure/Haar/Quotient.lean
/-- If `μ` on `G ⧸ Γ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and
  right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a left-invariant
  measure. -/
@[to_additive "If `μ` on `G ⧸ Γ` satisfies `AddQuotientMeasureEqMeasurePreimage` relative to a both
  left- and right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a
  left-invariant measure."]
lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient
    [hasFun : HasFundamentalDomain Γ.op G ν] [QuotientMeasureEqMeasurePreimage ν μ] :
    μ.IsMulLeftInvariant
-- Mathlib/Algebra/FreeAlgebra.lean
@[simp]
theorem lift_unique (f : X → A) (g : FreeAlgebra R X →ₐ[R] A) :
    (g : FreeAlgebra R X → A) ∘ ι R = f ↔ g = lift R f
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem isOpen_ball : IsOpen (ball x ε)
-- Mathlib/Order/UpperLower/Basic.lean
lemma le_erase : s ≤ s.erase a
-- Mathlib/RingTheory/Adjoin/Basic.lean
theorem adjoin_le_equalizer (φ₁ φ₂ : A →ₐ[R] B) {s : Set A} (h : s.EqOn φ₁ φ₂) :
    adjoin R s ≤ equalizer φ₁ φ₂
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem let_val_congr {α : Sort u} {β : Sort v} {a a' : α}
    (b : α → β) (h : a = a') : (let x := a; b x) = (let x := a'; b x)
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem fderivWithin_of_isOpen (hs : IsOpen s) (hx : x ∈ s) : fderivWithin 𝕜 f s x = fderiv 𝕜 f x
-- Mathlib/Data/PFunctor/Univariate/M.lean
theorem M.default_consistent [Inhabited F.A] : ∀ n, Agree (default : CofixA F n) default
-- Mathlib/RingTheory/Localization/Basic.lean
theorem mk'_one (x) : mk' S x (1 : M) = algebraMap R S x
-- Mathlib/CategoryTheory/Triangulated/Subcategory.lean
lemma ext₃' (h₁ : S.P T.obj₁) (h₂ : S.P T.obj₂) :
    CategoryTheory.isoClosure S.P T.obj₃
-- Mathlib/CategoryTheory/Monoidal/Center.lean
@[simp]
theorem rightUnitor_hom_f (X : Center C) : Hom.f (ρ_ X).hom = (ρ_ X.1).hom
-- Mathlib/Topology/Order/ScottTopology.lean
lemma upperSet_le_scott : upperSet α ≤ scott α
-- Mathlib/NumberTheory/Modular.lean
/-- This replaces `(g•z).re = a/c + *` in the standard theory with the following novel identity:
  `g • z = (a c + b d) / (c^2 + d^2) + (d z - c) / ((c^2 + d^2) (c z + d))`
  which does not need to be decomposed depending on whether `c = 0`. -/
theorem smul_eq_lcRow0_add {p : Fin 2 → ℤ} (hp : IsCoprime (p 0) (p 1)) (hg : (↑ₘg) 1 = p) :
    ↑(g • z) =
      (lcRow0 p ↑(g : SL(2, ℝ)) : ℂ) / ((p 0 : ℂ) ^ 2 + (p 1 : ℂ) ^ 2) +
        ((p 1 : ℂ) * z - p 0) / (((p 0 : ℂ) ^ 2 + (p 1 : ℂ) ^ 2) * (p 0 * z + p 1))
-- .lake/packages/lean4/src/lean/Init/Data/AC.lean
theorem Context.evalList_sort_cons
  (ctx : Context α)
  (h : Commutative ctx.op)
  (x : Nat)
  (xs : List Nat)
  : evalList α ctx (sort (x :: xs)) = evalList α ctx (x :: sort xs)
-- Mathlib/FieldTheory/NormalClosure.lean
lemma normalClosure_def : normalClosure F K L = ⨆ f : K →ₐ[F] L, f.fieldRange
-- Mathlib/MeasureTheory/Measure/NullMeasurable.lean
protected theorem NullMeasurable.measurable' (h : NullMeasurable f μ) :
    @Measurable (NullMeasurableSpace α μ) β _ _ f
-- Mathlib/CategoryTheory/Localization/Predicate.lean
theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W
-- Mathlib/Order/Filter/Lift.lean
theorem lift_iInf_of_map_univ {f : ι → Filter α} {g : Set α → Filter β}
    (hg : ∀ s t, g (s ∩ t) = g s ⊓ g t) (hg' : g univ = ⊤) :
    (iInf f).lift g = ⨅ i, (f i).lift g
-- Mathlib/Topology/Constructions.lean
theorem isClosed_iff {s : Set (CofiniteTopology X)} : IsClosed s ↔ s = univ ∨ s.Finite
-- Mathlib/Topology/Instances/NNReal.lean
theorem hasSum_real_toNNReal_of_nonneg {f : α → ℝ} (hf_nonneg : ∀ n, 0 ≤ f n) (hf : Summable f) :
    HasSum (fun n => Real.toNNReal (f n)) (Real.toNNReal (∑' n, f n))
-- Mathlib/Topology/Algebra/Group/Basic.lean
/-- A version of `Homeomorph.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }))
  "A version of `Homeomorph.addRight (-a) b` that is defeq to `b - a`. "]
def Homeomorph.divRight (x : G) : G ≃ₜ G
-- Mathlib/Data/Multiset/Basic.lean
theorem replicate_subset_singleton (n : ℕ) (a : α) : replicate n a ⊆ {a}
-- Mathlib/Algebra/Algebra/Unitization.lean
/-- The coercion from a non-unital `R`-algebra `A` to its unitization `Unitization R A`
realized as a non-unital algebra homomorphism. -/
@[simps]
def inrNonUnitalAlgHom (R A : Type*) [CommSemiring R] [NonUnitalSemiring A] [Module R A] :
    A →ₙₐ[R] Unitization R A
-- Mathlib/AlgebraicGeometry/Cover/Open.lean
/-- If the restriction of a global section to each member of an open cover is zero, then it is
globally zero. -/
lemma zero_of_zero_cover {X : Scheme.{u}} {U : X.Opens} (s : Γ(X, U)) (𝒰 : X.OpenCover)
    (h : ∀ i : 𝒰.J, (𝒰.map i).app U s = 0) : s = 0
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
/-- The linear map from `⨂[𝕜] i, Eᵢ` to `ContinuousMultilinearMap 𝕜 E F →L[𝕜] F` sending
`x` in `⨂[𝕜] i, Eᵢ` to the map `f ↦ f.lift x`.
-/
@[simps!]
noncomputable def toDualContinuousMultilinearMap : (⨂[𝕜] i, E i) →ₗ[𝕜]
    ContinuousMultilinearMap 𝕜 E F →L[𝕜] F
-- Mathlib/Computability/TuringMachine.lean
@[simp]
theorem ListBlank.append_mk {Γ} [Inhabited Γ] (l₁ l₂ : List Γ) :
    ListBlank.append l₁ (ListBlank.mk l₂) = ListBlank.mk (l₁ ++ l₂)
-- Mathlib/Order/Filter/Basic.lean
theorem mem_inf_of_inter {f g : Filter α} {s t u : Set α} (hs : s ∈ f) (ht : t ∈ g)
    (h : s ∩ t ⊆ u) : u ∈ f ⊓ g
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem mk'_mem_incidenceSet_right_iff : s(a, b) ∈ G.incidenceSet b ↔ G.Adj a b
-- Mathlib/RingTheory/Ideal/Quotient.lean
theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y
-- Mathlib/Order/Filter/Lift.lean
theorem prod_lift'_lift' {f₁ : Filter α₁} {f₂ : Filter α₂} {g₁ : Set α₁ → Set β₁}
    {g₂ : Set α₂ → Set β₂} (hg₁ : Monotone g₁) (hg₂ : Monotone g₂) :
    f₁.lift' g₁ ×ˢ f₂.lift' g₂ = f₁.lift fun s => f₂.lift' fun t => g₁ s ×ˢ g₂ t
-- Mathlib/MeasureTheory/Constructions/Cylinders.lean
theorem isPiSystem_measurableCylinders : IsPiSystem (measurableCylinders α)
-- Mathlib/Order/Heyting/Regular.lean
@[simp, norm_cast]
theorem coe_top : ((⊤ : Regular α) : α) = ⊤
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
/-- `ContinuousAlternatingMap.pi` as a `LinearEquiv`. -/
@[simps (config := { simpRhs := true })]
def piLinearEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, ContinuousAdd (M' i)] [∀ i, Module R (M' i)]
    [∀ i, Module A (M' i)] [∀ i, SMulCommClass A R (M' i)] [∀ i, ContinuousConstSMul R (M' i)] :
    (∀ i, M [⋀^ι]→L[A] M' i) ≃ₗ[R] M [⋀^ι]→L[A] ∀ i, M' i
-- Mathlib/Topology/Category/CompHaus/Basic.lean
theorem epi_iff_surjective {X Y : CompHaus.{u}} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f
-- Mathlib/Init/Order/LinearOrder.lean
theorem max_eq_left_of_lt {a b : α} (h : b < a) : max a b = a
-- Mathlib/GroupTheory/Index.lean
@[to_additive]
theorem finiteIndex_iInf {ι : Type*} [Finite ι] {f : ι → Subgroup G}
    (hf : ∀ i, (f i).FiniteIndex) : (⨅ i, f i).FiniteIndex
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `E / F` is an algebraic extension, `F` is separably closed,
then `E / F` is purely inseparable. -/
theorem Algebra.IsAlgebraic.isPurelyInseparable_of_isSepClosed [Algebra.IsAlgebraic F E]
    [IsSepClosed F] : IsPurelyInseparable F E
-- Mathlib/CategoryTheory/MorphismProperty/Limits.lean
theorem StableUnderBaseChange.mk {P : MorphismProperty C} [HasPullbacks C] [RespectsIso P]
    (hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S) (_ : P g), P (pullback.fst f g)) :
    StableUnderBaseChange P
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
/-- The `nonsing_inv` of `A` is a right inverse. -/
@[simp]
theorem mul_nonsing_inv (h : IsUnit A.det) : A * A⁻¹ = 1
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
/-- Given `F : WalkingSpan ⥤ C`, which is really the same as `span (F.map fst) (F.map snd)`,
    and a cocone on `F`, we get a pushout cocone on `F.map fst` and `F.map snd`. -/
@[simps]
def PushoutCocone.ofCocone {F : WalkingSpan ⥤ C} (t : Cocone F) :
    PushoutCocone (F.map fst) (F.map snd)
-- Mathlib/FieldTheory/PurelyInseparable.lean
/-- If `E / F` is algebraic, then an intermediate field of `E / F` contains the
separable closure of `F` in `E` if and only if `E` is purely inseparable over it. -/
theorem separableClosure_le_iff [Algebra.IsAlgebraic F E] (L : IntermediateField F E) :
    separableClosure F E ≤ L ↔ IsPurelyInseparable L E
-- Mathlib/CategoryTheory/Triangulated/Basic.lean
/-- Composition of triangle morphisms gives a triangle morphism.
-/
@[simps]
def TriangleMorphism.comp (f : TriangleMorphism T₁ T₂) (g : TriangleMorphism T₂ T₃) :
    TriangleMorphism T₁ T₃
-- Mathlib/Order/Interval/Set/Pi.lean
theorem pi_univ_Ioc_update_right {x y : ∀ i, α i} {i₀ : ι} {m : α i₀} (hm : m ≤ y i₀) :
    (pi univ fun i ↦ Ioc (x i) (update y i₀ m i)) =
      { z | z i₀ ≤ m } ∩ pi univ fun i ↦ Ioc (x i) (y i)
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma nndist_pi_def (f g : ∀ b, π b) : nndist f g = sup univ fun b => nndist (f b) (g b)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
theorem toMul_sum (s : Finset ι) (f : ι → Additive α) :
    toMul (∑ i ∈ s, f i) = ∏ i ∈ s, toMul (f i)
-- Mathlib/Order/Filter/Prod.lean
theorem tendsto_swap4_prod {h : Filter γ} {k : Filter δ} :
    Tendsto (fun p : (α × β) × γ × δ => ((p.1.1, p.2.1), (p.1.2, p.2.2))) ((f ×ˢ g) ×ˢ (h ×ˢ k))
      ((f ×ˢ h) ×ˢ (g ×ˢ k))
-- Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
/-- A version of the **Hahn-Banach theorem**: given disjoint convex sets `s`, `t` where `s` is open,
there is a continuous linear functional which separates them. -/
theorem geometric_hahn_banach_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (ht : Convex ℝ t)
    (disj : Disjoint s t) : ∃ (f : E →L[ℝ] ℝ) (u : ℝ), (∀ a ∈ s, f a < u) ∧ ∀ b ∈ t, u ≤ f b
-- Mathlib/Combinatorics/SimpleGraph/Coloring.lean
theorem chromaticNumber_eq_zero_of_isempty (G : SimpleGraph V) [IsEmpty V] :
    G.chromaticNumber = 0
-- Mathlib/Probability/Kernel/Disintegration/StandardBorel.lean
/-- For `κ' := map κ (Prod.map (id : β → β) e) (measurable_id.prod_map he.measurable)`, the
hypothesis `hη` is `fst κ' ⊗ₖ η = κ'`. The conclusion of the lemma is
`fst κ ⊗ₖ borelMarkovFromReal Ω η = comapRight (fst κ' ⊗ₖ η) _`. -/
lemma compProd_fst_borelMarkovFromReal_eq_comapRight_compProd
    (κ : Kernel α (β × Ω)) [IsSFiniteKernel κ] (η : Kernel (α × β) ℝ) [IsSFiniteKernel η]
    (hη : (fst (map κ (Prod.map (id : β → β) (embeddingReal Ω))
        (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable))) ⊗ₖ η
      = map κ (Prod.map (id : β → β) (embeddingReal Ω))
        (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable)) :
    fst κ ⊗ₖ borelMarkovFromReal Ω η
      = comapRight (fst (map κ (Prod.map (id : β → β) (embeddingReal Ω))
          (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable)) ⊗ₖ η)
        (MeasurableEmbedding.id.prod_mk (measurableEmbedding_embeddingReal Ω))
-- Mathlib/LinearAlgebra/Matrix/Transvection.lean
theorem transvection_mul_transvection_same (h : i ≠ j) (c d : R) :
    transvection i j c * transvection i j d = transvection i j (c + d)
-- Mathlib/Order/Filter/Basic.lean
theorem seq_mem_seq {f : Filter (α → β)} {g : Filter α} {s : Set (α → β)} {t : Set α} (hs : s ∈ f)
    (ht : t ∈ g) : s.seq t ∈ f.seq g
-- Mathlib/CategoryTheory/Iso.lean
theorem nonempty_iso_symm (X Y : C) : Nonempty (X ≅ Y) ↔ Nonempty (Y ≅ X)
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem Monic.of_mul_monic_right (hq : q.Monic) (hpq : (p * q).Monic) : p.Monic
-- Mathlib/Data/Sym/Sym2.lean
theorem mem_mk_left (x y : α) : x ∈ s(x, y)
-- Mathlib/Data/Set/Image.lean
theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
    (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)
-- Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
theorem StableUnderBaseChange.pullback_fst_app_top
    (hP : StableUnderBaseChange P) (hP' : RespectsIso P)
    {X Y S : Scheme} [IsAffine X] [IsAffine Y] [IsAffine S] (f : X ⟶ S) (g : Y ⟶ S)
    (H : P (g.app ⊤)) : P ((pullback.fst f g).app ⊤)
-- Mathlib/Data/Vector/Basic.lean
theorem eraseIdx_insertNth' {v : Vector α (n + 1)} :
    ∀ {i : Fin (n + 1)} {j : Fin (n + 2)},
      eraseIdx (j.succAbove i) (insertNth a j v) = insertNth a (i.predAbove j) (eraseIdx i v)
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
theorem of_one : (of 1 : FreeAbelianGroup α) = 1
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_finsupp_of_infinite (α β : Type u) [Infinite α] [Zero β] [Nontrivial β] :
    #(α →₀ β) = max #α #β
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem mul_mem_nonunits_left [CommMonoid α] : a ∈ nonunits α → a * b ∈ nonunits α
-- Mathlib/Data/FunLike/Fintype.lean
/-- All `FunLike`s are finite if their domain and codomain are.

Non-dependent version of `DFunLike.finite` that might be easier to infer.
Can't be an instance because it can cause infinite loops.
-/
theorem FunLike.finite [Finite α] [Finite γ] : Finite G
-- Mathlib/Data/List/Basic.lean
theorem ext_get?_iff' {l₁ l₂ : List α} : l₁ = l₂ ↔
    ∀ n < max l₁.length l₂.length, l₁.get? n = l₂.get? n
-- Mathlib/LinearAlgebra/Basis.lean
@[simp] theorem repr_smul (g : G) (b : Basis ι R M) :
    (g • b).repr = (DistribMulAction.toLinearEquiv _ _ g).symm.trans b.repr
-- Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean
/-- Construct a unit associated to the place `w₁`. The family, for `w₁ ≠ w₀`, formed by the
image by the `logEmbedding` of these units is `ℝ`-linearly independent, see
`unitLattice_span_eq_top`. -/
theorem exists_unit (w₁ : InfinitePlace K) :
    ∃ u : (𝓞 K)ˣ, ∀ w : InfinitePlace K, w ≠ w₁ → Real.log (w u) < 0
-- Mathlib/Order/CompleteBooleanAlgebra.lean
/--
A complete atomic Boolean algebra is a complete Boolean algebra
that is also completely distributive.

We take iSup_iInf_eq as the definition here,
and prove later on that this implies atomicity.
-/
-- We do not directly extend `CompletelyDistribLattice` to avoid having the `hnot` field
-- We do not directly extend `CompleteBooleanAlgebra` to avoid having the `inf_sSup_le_iSup_inf` and
-- `iInf_sup_le_sup_sInf` fields
class CompleteAtomicBooleanAlgebra (α : Type u) extends CompleteLattice α, BooleanAlgebra α where
  protected iInf_iSup_eq {ι : Type u} {κ : ι → Type u} (f : ∀ a, κ a → α) :
    (⨅ a, ⨆ b, f a b) = ⨆ g : ∀ a, κ a, ⨅ a, f a (g a)
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_mulEquiv_refl : (RingEquiv.refl R : R ≃* R) = MulEquiv.refl R
-- Mathlib/Analysis/Calculus/Conformal/NormedSpace.lean
@[nontriviality]
theorem Subsingleton.conformalAt [Subsingleton X] (f : X → Y) (x : X) : ConformalAt f x
-- Mathlib/Topology/Sets/Closeds.lean
theorem isIrreducible (s : IrreducibleCloseds α) : IsIrreducible (s : Set α)
-- Mathlib/Topology/UniformSpace/Pi.lean
theorem Pi.uniformContinuous_precomp' (φ : ι' → ι) :
    UniformContinuous (fun (f : (∀ i, α i)) (j : ι') ↦ f (φ j))
-- Mathlib/Probability/Martingale/Upcrossing.lean
theorem upperCrossingTime_mono (hnm : n ≤ m) :
    upperCrossingTime a b f N n ω ≤ upperCrossingTime a b f N m ω
-- Mathlib/Probability/Independence/Conditional.lean
theorem condIndep_of_condIndep_of_le_right {m' m₁ m₂ m₃ : MeasurableSpace Ω}
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    {hm' : m' ≤ mΩ} {μ : Measure Ω} [IsFiniteMeasure μ]
    (h_indep : CondIndep m' m₁ m₂ hm' μ) (h32 : m₃ ≤ m₂) :
    CondIndep m' m₁ m₃ hm' μ
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply' {k : P ≃* N} (x) :
    k ((f.ofMulEquivOfLocalizations k.symm).toMap x) = f.toMap x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem sin_pi_div_eight : sin (π / 8) = √(2 - √2) / 2
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
/-- Note that `0 : 0 →qᵢ Q` alone would not be well-typed as the RHS. -/
@[simp]
theorem Isometry.proj_comp_single_of_ne [Fintype ι] [DecidableEq ι]
    {i j : ι} (h : i ≠ j) (Q : QuadraticMap R (Mᵢ i) P) :
    (proj i Q).comp (single _ j) = (0 : 0 →qᵢ Q).comp (ofEq (Pi.single_eq_of_ne h.symm _))
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
/-- The identification `mop X ⊗ - = mop (- ⊗ X)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorLeftMopIso (X : C) :
    tensorLeft (mop X) ≅ unmopFunctor C ⋙ tensorRight X ⋙ mopFunctor C
-- Mathlib/Data/PNat/Basic.lean
theorem lt_add_right (n m : ℕ+) : n < n + m
-- Mathlib/Order/Basic.lean
theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2
-- Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
/-- Radon-Nikodym derivative of the scalar multiple of a measure.
See also `rnDeriv_smul_left_of_ne_top'`, which requires sigma-finite `ν` and `μ`. -/
theorem rnDeriv_smul_left_of_ne_top (ν μ : Measure α) [IsFiniteMeasure ν]
    [ν.HaveLebesgueDecomposition μ] {r : ℝ≥0∞} (hr : r ≠ ∞) :
    (r • ν).rnDeriv μ =ᵐ[μ] r • ν.rnDeriv μ
-- Mathlib/Data/Set/Basic.lean
theorem ne_insert_of_not_mem {s : Set α} (t : Set α) {a : α} : a ∉ s → s ≠ insert a t
-- Mathlib/GroupTheory/SpecificGroups/Alternating.lean
theorem isThreeCycle_isConj (h5 : 5 ≤ Fintype.card α) {σ τ : alternatingGroup α}
    (hσ : IsThreeCycle (σ : Perm α)) (hτ : IsThreeCycle (τ : Perm α)) : IsConj σ τ
-- Mathlib/Order/LiminfLimsup.lean
theorem inf_limsup (a : α) : a ⊓ limsup u f = limsup (fun x => a ⊓ u x) f
-- Mathlib/Data/Multiset/Nodup.lean
theorem Nodup.mem_erase_iff [DecidableEq α] {a b : α} {l} (d : Nodup l) :
    a ∈ l.erase b ↔ a ≠ b ∧ a ∈ l
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
theorem map_one_eq_zero : D 1 = 0
-- Mathlib/CategoryTheory/Adjunction/Reflective.lean
lemma Functor.essImage.counit_isIso [Coreflective j] {A : D} (h : A ∈ j.essImage) :
    IsIso ((coreflectorAdjunction j).counit.app A)
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
@[simp]
theorem polar_neg_right (x y : M) : polar Q x (-y) = -polar Q x y
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem copy_copy {u v u' v' u'' v''} (p : G.Walk u v)
    (hu : u = u') (hv : v = v') (hu' : u' = u'') (hv' : v' = v'') :
    (p.copy hu hv).copy hu' hv' = p.copy (hu.trans hu') (hv.trans hv')
-- Mathlib/Algebra/Order/Floor.lean
theorem floor_le_ceil (a : α) : ⌊a⌋ ≤ ⌈a⌉
-- Mathlib/Analysis/Convex/Cone/Basic.lean
protected theorem convex : Convex 𝕜 (S : Set E)
-- Mathlib/Data/Matroid/Closure.lean
lemma Indep.closure_inter_eq_self_of_subset (hI : M.Indep I) (hJI : J ⊆ I) :
    M.closure J ∩ I = J
-- Mathlib/RingTheory/Support.lean
lemma Module.mem_support_iff_of_span_eq_top {s : Set M} (hs : Submodule.span R s = ⊤) :
    p ∈ Module.support R M ↔ ∃ m ∈ s, (R ∙ m).annihilator ≤ p.asIdeal
-- Mathlib/RingTheory/Ideal/Maps.lean
@[simp]
theorem comap_id : I.comap (RingHom.id R) = I
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] protected theorem ediv_neg : ∀ a b : Int, a / (-b) = -(a / b)
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem filterMap_nil (f : α → Option β) : filterMap f [] = []
-- Mathlib/Dynamics/PeriodicPts.lean
theorem mem_periodicPts : x ∈ periodicPts f ↔ ∃ n > 0, IsPeriodicPt f n x
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive (attr := simp) lt_add_iff_pos_right]
theorem lt_mul_iff_one_lt_right' [CovariantClass α α (· * ·) (· < ·)]
    [ContravariantClass α α (· * ·) (· < ·)] (a : α) {b : α} :
    a < a * b ↔ 1 < b
-- Mathlib/LinearAlgebra/AffineSpace/Matrix.lean
/-- Given a family of points `p : ι' → P` and an affine basis `b`, if the matrix whose rows are the
coordinates of `p` with respect `b` has a right inverse, then `p` is affine independent. -/
theorem affineIndependent_of_toMatrix_right_inv [Fintype ι] [Finite ι'] [DecidableEq ι']
    (p : ι' → P) {A : Matrix ι ι' k} (hA : b.toMatrix p * A = 1) : AffineIndependent k p
-- Mathlib/Order/CompleteLattice.lean
theorem iInf_eq_if {p : Prop} [Decidable p] (a : α) : ⨅ _ : p, a = if p then a else ⊤
-- Mathlib/Algebra/Order/Sub/Canonical.lean
/-- The `tsub` version of `sub_sub_eq_add_sub`. -/
theorem tsub_tsub_eq_add_tsub_of_le [ContravariantClass α α HAdd.hAdd LE.le]
    (h : c ≤ b) : a - (b - c) = a + c - b
-- Mathlib/Data/Fin/Tuple/Basic.lean
/-- `Fin.cons` is the same as appending a one-tuple to the left. -/
theorem cons_eq_append {α : Type*} (x : α) (xs : Fin n → α) :
    cons x xs = append (cons x Fin.elim0) xs ∘ Fin.cast (Nat.add_comm ..)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
theorem smul_finset_eq_empty : a • s = ∅ ↔ s = ∅
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Bitblast.lean
@[simp] theorem atLeastTwo_false_right : atLeastTwo a b false = (a && b)
-- Mathlib/Analysis/Calculus/Deriv/AffineMap.lean
protected theorem derivWithin (hs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin f s x = f.linear 1
-- Mathlib/AlgebraicTopology/SplitSimplicialObject.lean
@[reassoc]
theorem cofan_inj_epi_naturality {Δ₁ Δ₂ : SimplexCategoryᵒᵖ} (A : IndexSet Δ₁) (p : Δ₁ ⟶ Δ₂)
    [Epi p.unop] : (s.cofan Δ₁).inj A ≫ X.map p = (s.cofan Δ₂).inj (A.epiComp p)