ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem incl_coe : (I.incl.toLinearMap : I →ₗ[R] L) = (I : Submodule R L).subtype
-- Mathlib/CategoryTheory/ConcreteCategory/UnbundledHom.lean
/-- A class for unbundled homs used to define a category. `hom` must
take two types `α`, `β` and instances of the corresponding structures,
and return a predicate on `α → β`. -/
class UnbundledHom {c : Type u → Type u} (hom : ∀ ⦃α β⦄, c α → c β → (α → β) → Prop) : Prop where
  hom_id : ∀ {α} (ia : c α), hom ia ia id
  hom_comp : ∀ {α β γ} {Iα : c α} {Iβ : c β} {Iγ : c γ} {g : β → γ} {f : α → β} (_ : hom Iβ Iγ g)
      (_ : hom Iα Iβ f), hom Iα Iγ (g ∘ f)
-- Mathlib/Topology/Semicontinuous.lean
theorem UpperSemicontinuousAt.upperSemicontinuousWithinAt (s : Set α)
    (h : UpperSemicontinuousAt f x) : UpperSemicontinuousWithinAt f s x
-- Mathlib/Data/Nat/Bitwise.lean
theorem lor_assoc (n m k : ℕ) : (n ||| m) ||| k = n ||| (m ||| k)
-- Mathlib/Probability/Density.lean
theorem pdf_of_not_aemeasurable {_ : MeasurableSpace Ω} {ℙ : Measure Ω} {μ : Measure E}
    {X : Ω → E} (hX : ¬AEMeasurable X ℙ) : pdf X ℙ μ =ᵐ[μ] 0
-- Mathlib/CategoryTheory/Closed/FunctorCategory.lean
theorem ihom_coev_app (F G : D ⥤ C) : (ihom.coev F).app G = (closedUnit F).app G
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
/-- Given linear maps `f : M → P`, `g : N → Q`, if we identify `M ⊗ N` with `N ⊗ M` and `P ⊗ Q`
with `Q ⊗ P`, then this lemma states that `f ⊗ g = g ⊗ f`. -/
lemma map_comp_comm_eq (f : M →ₗ[R] P) (g : N →ₗ[R] Q) :
    map f g ∘ₗ TensorProduct.comm R N M = TensorProduct.comm R Q P ∘ₗ map g f
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean
theorem differentiableOn_arcsin : DifferentiableOn ℝ arcsin {-1, 1}ᶜ
-- Mathlib/Topology/Order/Lattice.lean
@[continuity]
theorem continuous_sup [Sup L] [ContinuousSup L] : Continuous fun p : L × L => p.1 ⊔ p.2
-- Mathlib/Algebra/Order/Ring/WithTop.lean
lemma coe_mul_eq_bind {a : α} (ha : a ≠ 0) : ∀ b, (a * b : WithTop α) = b.bind fun b ↦ ↑(a * b)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem exists_mem_cons {p : α → Prop} {a : α} {l : List α} :
    (∃ x, ∃ _ : x ∈ a :: l, p x) ↔ p a ∨ ∃ x, ∃ _ : x ∈ l, p x
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_iUnion_le_sum_mk {α ι : Type u} {f : ι → Set α} : #(⋃ i, f i) ≤ sum fun i => #(f i)
-- Mathlib/Analysis/Convex/Function.lean
theorem ConvexOn.le_left_of_right_le'' (hf : ConvexOn 𝕜 s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x ≤ y)
    (hyz : y < z) (h : f z ≤ f y) : f y ≤ f x
-- Mathlib/Probability/Kernel/Composition.lean
lemma map_prodMkLeft (γ : Type*) [MeasurableSpace γ] (κ : Kernel α β)
    {f : β → δ} (hf : Measurable f) :
    map (prodMkLeft γ κ) f hf = prodMkLeft γ (map κ f hf)
-- Mathlib/SetTheory/Ordinal/Basic.lean
/-- `lift.{max u v, u}` equals `lift.{v, u}`. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_umax : lift.{max u v, u} = lift.{v, u}
-- Mathlib/Logic/Equiv/Defs.lean
@[ext] theorem ext {f g : Equiv α β} (H : ∀ x, f x = g x) : f = g
-- Mathlib/Topology/Order/LeftRight.lean
theorem nhds_left_sup_nhds_right' (a : α) : 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a
-- Mathlib/Computability/Ackermann.lean
theorem not_nat_primrec_ack_self : ¬Nat.Primrec fun n => ack n n
-- Mathlib/RingTheory/AdicCompletion/Functoriality.lean
/-- Equality of maps out of an adic completion can be checked on Cauchy sequences. -/
theorem map_ext {f g : AdicCompletion I M → N}
    (h : ∀ (a : AdicCauchySequence I M),
      f (AdicCompletion.mk I M a) = g (AdicCompletion.mk I M a)) :
    f = g
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem parallel_iff_direction_eq_and_eq_bot_iff_eq_bot {s₁ s₂ : AffineSubspace k P} :
    s₁ ∥ s₂ ↔ s₁.direction = s₂.direction ∧ (s₁ = ⊥ ↔ s₂ = ⊥)
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive]
lemma comp_def {X Y Z : CommGrp} {f : X ⟶ Y} {g : Y ⟶ Z} : f ≫ g = g.comp f
-- Mathlib/Algebra/Homology/Opposite.lean
/-- Sends a complex `X` with objects in `V` to the corresponding complex with objects in `Vᵒᵖ`. -/
@[simps]
protected def op (X : HomologicalComplex V c) : HomologicalComplex Vᵒᵖ c.symm
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
@[simp]
theorem associator_inv_apply {M N K : ModuleCat.{u} R} (m : M) (n : N) (k : K) :
    ((α_ M N K).inv : M ⊗ N ⊗ K ⟶ (M ⊗ N) ⊗ K) (m ⊗ₜ (n ⊗ₜ k)) = m ⊗ₜ n ⊗ₜ k
-- Mathlib/Computability/PartrecCode.lean
theorem curry_prim : Primrec₂ curry
-- Mathlib/Data/Set/Subsingleton.lean
theorem Nontrivial.exists_ne (hs : s.Nontrivial) (z) : ∃ x ∈ s, x ≠ z
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
@[local simp]
private theorem zero_lt_pow (n : Nat) : 0 < 2^n
-- Mathlib/Data/Finset/Basic.lean
theorem nonempty_iff_ne_empty {s : Finset α} : s.Nonempty ↔ s ≠ ∅
-- Mathlib/RingTheory/Presentation.lean
private lemma span_range_relation_eq_ker_localizationAway :
    Ideal.span { C r * X () - 1 } =
      RingHom.ker (aeval (S₁ := S) (Generators.localizationAway r).val)
-- Mathlib/CategoryTheory/CofilteredSystem.lean
theorem IsMittagLeffler.toPreimages (h : F.IsMittagLeffler) : (F.toPreimages s).IsMittagLeffler
-- Mathlib/Data/Real/Hyperreal.lean
theorem st_le_of_le {x y : ℝ*} (hix : ¬Infinite x) (hiy : ¬Infinite y) : x ≤ y → st x ≤ st y
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive]
lemma preimage_image_coe (s : Set G) : ((↑) : G → Q) ⁻¹' ((↑) '' s) = N * s
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem lt_nfpBFamily {a b} :
    a < nfpBFamily.{u, v} o f b ↔ ∃ l, a < List.foldr (familyOfBFamily o f) b l
-- Mathlib/Topology/Algebra/InfiniteSum/Real.lean
/-- If a sequence `f` with non-negative terms is dominated by a sequence `g` with summable
series and at least one term of `f` is strictly smaller than the corresponding term in `g`,
then the series of `f` is strictly smaller than the series of `g`. -/
theorem tsum_lt_tsum_of_nonneg {i : ℕ} {f g : ℕ → ℝ} (h0 : ∀ b : ℕ, 0 ≤ f b)
    (h : ∀ b : ℕ, f b ≤ g b) (hi : f i < g i) (hg : Summable g) : ∑' n, f n < ∑' n, g n
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
theorem isPiSystem_Ioo_rat :
    IsPiSystem (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) (b : ℝ)})
-- Mathlib/Topology/Sets/Compacts.lean
@[simp, norm_cast] lemma coe_sup (s t : CompactOpens α) : ↑(s ⊔ t) = (s ∪ t : Set α)
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
/-- A continuous map of affine spaces. -/
structure ContinuousAffineMap (R : Type*) {V W : Type*} (P Q : Type*) [Ring R] [AddCommGroup V]
  [Module R V] [TopologicalSpace P] [AddTorsor V P] [AddCommGroup W] [Module R W]
  [TopologicalSpace Q] [AddTorsor W Q] extends P →ᵃ[R] Q where
  cont : Continuous toFun
-- Mathlib/RingTheory/SurjectiveOnStalks.lean
lemma surjectiveOnStalks_of_isLocalization [IsLocalization M S] :
    SurjectiveOnStalks (algebraMap R S)
-- Mathlib/Algebra/Category/Grp/EpiMono.lean
theorem τ_symm_apply_fromCoset : Equiv.symm τ (fromCoset ⟨f.range, 1, one_leftCoset _⟩) = ∞
-- Mathlib/Data/List/ToFinsupp.lean
theorem toFinsupp_cons_eq_single_add_embDomain {R : Type*} [AddZeroClass R] (x : R) (xs : List R)
    [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :
    toFinsupp (x::xs) =
      Finsupp.single 0 x + (toFinsupp xs).embDomain ⟨Nat.succ, Nat.succ_injective⟩
-- Mathlib/Data/Set/Pointwise/BigOperators.lean
/-- An n-ary version of `Set.mul_mem_mul`. -/
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).prod ∈ (t.map f).prod
-- Mathlib/Data/Fin/Basic.lean
lemma succAbove_castSucc_of_le (p i : Fin n) (h : p ≤ i) : succAbove p.castSucc i = i.succ
-- .lake/packages/lean4/src/lean/Init/Data/List/Control.lean
@[simp] theorem forM_cons [Monad m] (f : α → m PUnit) (a : α) (as : List α) : forM (a::as) f = f a >>= fun _ => forM as f
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContDiff.iterate_deriv' (n : ℕ) :
    ∀ (k : ℕ) {f₂ : 𝕜 → F}, ContDiff 𝕜 (n + k : ℕ) f₂ → ContDiff 𝕜 n (deriv^[k] f₂)
-- Mathlib/Topology/Separation.lean
/-- In a (weakly) locally compact R₁ space, each point admits a compact closed neighborhood. -/
theorem exists_mem_nhds_isCompact_isClosed (x : X) : ∃ K ∈ 𝓝 x, IsCompact K ∧ IsClosed K
-- Mathlib/Topology/Bases.lean
theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s)
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- The tangent of an angle in a right-angled triangle multiplied by the adjacent side equals
the opposite side. -/
theorem tan_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.tan (o.oangle (x + y) y) * ‖y‖ = ‖x‖
-- Mathlib/RingTheory/DedekindDomain/Different.lean
@[simp]
lemma coe_dual_one :
    (dual A K (1 : FractionalIdeal B⁰ L) : Submodule B L) = 1ᵛ
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem dualEquivDual_apply (φ : Module.Dual K W) :
    W.dualEquivDual φ = ⟨W.dualLift φ, mem_range.2 ⟨φ, rfl⟩⟩
-- Mathlib/GroupTheory/Perm/Sign.lean
@[simp]
theorem sign_refl : sign (Equiv.refl α) = 1
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n
-- Mathlib/RingTheory/MvPolynomial/Basic.lean
theorem restrictTotalDegree_le_restrictDegree (m : ℕ) :
    restrictTotalDegree σ R m ≤ restrictDegree σ R m
-- Mathlib/Data/Nat/Factorial/Basic.lean
theorem succ_ascFactorial (n : ℕ) :
    ∀ k, n * n.succ.ascFactorial k = (n + k) * n.ascFactorial k
-- Mathlib/MeasureTheory/Measure/HasOuterApproxClosed.lean
/-- Two finite Borel measures are equal if the integrals of all bounded continuous functions with
respect to both agree. -/
theorem ext_of_forall_lintegral_eq_of_IsFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [BorelSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) :
    μ = ν
-- Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
    (hf' : TendstoLocallyUniformlyOn f' g' l s) (hf : ∀ n, ∀ x ∈ s, HasFDerivAt (f n) (f' n x) x)
    (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) :
    HasFDerivAt g (g' x) x
-- Mathlib/RingTheory/PowerSeries/Order.lean
/-- The order of the product of two formal power series
 is at least the sum of their orders. -/
theorem order_mul_ge (φ ψ : R⟦X⟧) : order φ + order ψ ≤ order (φ * ψ)
-- Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean
@[to_additive]
theorem le_iff_exists_mul : a ≤ b ↔ ∃ c, b = a * c
-- Mathlib/Algebra/DirectSum/Internal.lean
@[simp]
theorem DirectSum.coeAlgHom_of [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] (i : ι) (x : A i) :
    DirectSum.coeAlgHom A (DirectSum.of (fun i => A i) i x) = x
-- Mathlib/Topology/Compactness/Lindelof.lean
theorem isLindelof_diagonal [LindelofSpace X] : IsLindelof (diagonal X)
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem isClosed_ker [T1Space M₂] [FunLike F M₁ M₂] [ContinuousSemilinearMapClass F σ₁₂ M₁ M₂]
    (f : F) :
    IsClosed (ker f : Set M₁)
-- Mathlib/NumberTheory/Padics/PadicVal.lean
theorem pow_padicValNat_dvd {n : ℕ} : p ^ padicValNat p n ∣ n
-- Mathlib/Algebra/Polynomial/Roots.lean
@[simp]
theorem roots_X_sub_C (r : R) : roots (X - C r) = {r}
-- Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean
@[simp]
theorem op_top : (⊤ : Subalgebra R A).op = ⊤
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem eq_pell_lem : ∀ (n) (b : ℤ√(d a1)), 1 ≤ b → IsPell b →
    b ≤ pellZd a1 n → ∃ n, b = pellZd a1 n
-- Mathlib/RingTheory/AlgebraicIndependent.lean
theorem algebraicIndependent_iff :
    AlgebraicIndependent R x ↔
      ∀ p : MvPolynomial ι R, MvPolynomial.aeval (x : ι → A) p = 0 → p = 0
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem mul_injective_of_disjoint {H₁ H₂ : Subgroup G} (h : Disjoint H₁ H₂) :
    Function.Injective (fun g => g.1 * g.2 : H₁ × H₂ → G)
-- Mathlib/ModelTheory/Fraisse.lean
theorem Embedding.age_subset_age (MN : M ↪[L] N) : L.age M ⊆ L.age N
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem lt_of_neg_of_one_div_lt_one_div (hb : b < 0) (h : 1 / a < 1 / b) : b < a
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean
theorem det_matrixToStdBasis :
    (matrixToStdBasis K).det = (2⁻¹ * I) ^ NrComplexPlaces K
-- Mathlib/Order/CompleteLattice.lean
theorem fst_sSup [SupSet α] [SupSet β] (s : Set (α × β)) : (sSup s).fst = sSup (Prod.fst '' s)
-- Mathlib/Algebra/Ring/Units.lean
@[simp]
protected theorem map_neg {F : Type*} [Ring β] [FunLike F α β] [RingHomClass F α β]
    (f : F) (u : αˣ) : map (f : α →* β) (-u) = -map (f : α →* β) u
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem modPart_lt_p : modPart p r < p
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
/-- A restatement of `Types.Limit.map_π_apply` that uses `Pi.π` and `Pi.map`. -/
@[simp 1001]
theorem pi_map_π_apply {β : Type v} [Small.{u} β] {f g : β → Type u}
    (α : ∀ j, f j ⟶ g j) (b : β) (x) :
    (Pi.π g b : ∏ᶜ g → g b) (Pi.map α x) = α b ((Pi.π f b : ∏ᶜ f → f b) x)
-- Mathlib/Data/Fin/Basic.lean
/--
The `Fin.castSucc_ne_zero_iff` in `Lean` only applies in `Fin (n+1)`.
This one instead uses a `NeZero n` typeclass hypothesis.
-/
theorem castSucc_ne_zero_iff' [NeZero n] (a : Fin n) : castSucc a ≠ 0 ↔ a ≠ 0
-- Mathlib/RingTheory/Adjoin/Field.lean
/-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F`,
then `[E[L] : E] ≤ [L : F]`. -/
lemma Subalgebra.adjoin_rank_le {F : Type*} (E : Type*) {K : Type*}
    [CommRing F] [StrongRankCondition F] [CommRing E] [StrongRankCondition E] [Ring K]
    [SMul F E] [Algebra E K] [Algebra F K] [IsScalarTower F E K]
    (L : Subalgebra F K) [Module.Free F L] :
    Module.rank E (Algebra.adjoin E (L : Set K)) ≤ Module.rank F L
-- Mathlib/Lean/Thunk.lean
@[simp] theorem get_mk {α} (f : Unit → α) : (Thunk.mk f).get = f ()
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
theorem convexBodyLT_convex : Convex ℝ (convexBodyLT K f)
-- Mathlib/MeasureTheory/OuterMeasure/Operations.lean
@[simp]
theorem sSup_apply (ms : Set (OuterMeasure α)) (s : Set α) :
    (sSup ms) s = ⨆ m ∈ ms, (m : OuterMeasure α) s
-- Mathlib/Analysis/Convex/Intrinsic.lean
/-- The intrinsic interior of a nonempty convex set is nonempty. -/
protected theorem Set.Nonempty.intrinsicInterior (hscv : Convex ℝ s) (hsne : s.Nonempty) :
    (intrinsicInterior ℝ s).Nonempty
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem _root_.Function.update_exp {ι : Type*} {𝔸 : ι → Type*} [Finite ι] [DecidableEq ι]
    [∀ i, NormedRing (𝔸 i)] [∀ i, NormedAlgebra 𝕂 (𝔸 i)] [∀ i, CompleteSpace (𝔸 i)] (x : ∀ i, 𝔸 i)
    (j : ι) (xj : 𝔸 j) :
    Function.update (exp 𝕂 x) j (exp 𝕂 xj) = exp 𝕂 (Function.update x j xj)
-- Mathlib/Analysis/Convolution.lean
theorem Integrable.integrable_convolution (hf : Integrable f μ)
    (hg : Integrable g μ) : Integrable (f ⋆[L, μ] g) μ
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean
/-- The angle between two vectors is `θ` if and only if they are nonzero and the second vector
is the first rotated by `θ` and scaled by a positive real, or `θ` and at least one of the
vectors are zero. -/
theorem oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle) :
    o.oangle x y = θ ↔
      (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r : ℝ, 0 < r ∧ y = r • o.rotation θ x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)
-- Mathlib/Logic/Pairwise.lean
protected lemma Subsingleton.pairwise [Subsingleton α] : Pairwise r
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
/-- Eta rule for costructured arrows. -/
@[simps!]
def eta (f : CostructuredArrow S T) : f ≅ mk f.hom
-- Mathlib/MeasureTheory/Group/Action.lean
@[to_additive]
theorem measure_preimage_smul_null (h : μ s = 0) (c : G) : μ ((c • ·) ⁻¹' s) = 0
-- Mathlib/CategoryTheory/Triangulated/Functor.lean
/-- `F.mapTriangle` commutes with the rotation of triangles. -/
@[simps!]
def mapTriangleRotateIso :
    F.mapTriangle ⋙ Pretriangulated.rotate D ≅
      Pretriangulated.rotate C ⋙ F.mapTriangle
-- Mathlib/Data/Finmap.lean
@[simp]
theorem keys_erase (a : α) (s : Finmap β) : (erase a s).keys = s.keys.erase a
-- Mathlib/Data/Set/Card.lean
theorem encard_preimage_of_injective_subset_range (hf : f.Injective) (ht : t ⊆ range f) :
    (f ⁻¹' t).encard = t.encard
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem reverse_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).reverse = p.reverse.copy hv hu
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
/-- A conditionally complete lattice is a lattice in which
every nonempty subset which is bounded above has a supremum, and
every nonempty subset which is bounded below has an infimum.
Typical examples are real numbers or natural numbers.

To differentiate the statements from the corresponding statements in (unconditional)
complete lattices, we prefix sInf and subₛ by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness. -/
class ConditionallyCompleteLattice (α : Type*) extends Lattice α, SupSet α, InfSet α where
  /-- `a ≤ sSup s` for all `a ∈ s`. -/
  le_csSup : ∀ s a, BddAbove s → a ∈ s → a ≤ sSup s
  /-- `sSup s ≤ a` for all `a ∈ upperBounds s`. -/
  csSup_le : ∀ s a, Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
  /-- `sInf s ≤ a` for all `a ∈ s`. -/
  csInf_le : ∀ s a, BddBelow s → a ∈ s → sInf s ≤ a
  /-- `a ≤ sInf s` for all `a ∈ lowerBounds s`. -/
  le_csInf : ∀ s a, Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp]
theorem sInf_toSubmonoid (s : Set (Subring R)) :
    (sInf s).toSubmonoid = ⨅ t ∈ s, t.toSubmonoid
-- Mathlib/Data/Fin/VecNotation.lean
theorem cons_val_zero' (h : 0 < m.succ) (x : α) (u : Fin m → α) : vecCons x u ⟨0, h⟩ = x
-- Mathlib/Order/FixedPoints.lean
theorem le_gfp {a : α} (h : a ≤ f a) : a ≤ gfp f
-- Mathlib/Order/Interval/Set/Image.lean
@[simp]
lemma image_subtype_val_Ico_Ici {a b : α} (c : Ico a b) : Subtype.val '' Ici c = Ico c.1 b
-- Mathlib/MeasureTheory/Group/AEStabilizer.lean
@[to_additive]
theorem smul_ae_eq_self_of_mem_zpowers (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s
-- Mathlib/RingTheory/Finiteness.lean
theorem fg_ker_comp {R S A : Type*} [CommRing R] [CommRing S] [CommRing A] (f : R →+* S)
    (g : S →+* A) (hf : f.ker.FG) (hg : g.ker.FG) (hsur : Function.Surjective f) :
    (g.comp f).ker.FG
-- Mathlib/GroupTheory/Exponent.lean
@[to_additive]
theorem exponent_pos : 0 < exponent G ↔ ExponentExists G
-- Mathlib/Analysis/Complex/ReImTopology.lean
@[simp]
theorem frontier_setOf_le_re (a : ℝ) : frontier { z : ℂ | a ≤ z.re } = { z | z.re = a }
-- Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean
@[simp]
private theorem pairMap_involutive : (pairMap σ).Involutive
-- Mathlib/Algebra/Ring/Prod.lean
theorem prodMap_def : prodMap f g = (f.comp (fst R S)).prod (g.comp (snd R S))
-- Mathlib/Data/Real/GoldenRatio.lean
/-- The characteristic polynomial of `fibRec` is `X² - (X + 1)`. -/
theorem fibRec_charPoly_eq {β : Type*} [CommRing β] :
    fibRec.charPoly = X ^ 2 - (X + (1 : β[X]))
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem nthHomSeq_one : nthHomSeq f_compat 1 ≈ 1
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem inv_eq_iff_eq_inv : a⁻¹ = b ↔ a = b⁻¹
-- Mathlib/Algebra/RingQuot.lean
theorem zero_quot : (⟨Quot.mk _ 0⟩ : RingQuot r) = 0
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)]
theorem mker_swap : MonoidHom.mker (swap M N) = ⊥
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem deriv_isNormal (f) : IsNormal (deriv f)
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_pow_le_of_le {a : WithBot ℕ} (b : ℕ) (hp : degree p ≤ a) :
    degree (p ^ b) ≤ b * a
-- 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_mul_comp_perm_eq_sum_mul_iff (hfg : Monovary f g) :
    ∑ i, f i * g (σ i) = ∑ i, f i * g i ↔ Monovary f (g ∘ σ)
-- Mathlib/Algebra/Ring/Hom/Defs.lean
lemma one_def : (1 : α →+* α) = id α
-- Mathlib/Algebra/MonoidAlgebra/ToDirectSum.lean
@[simp]
theorem AddMonoidAlgebra.toDirectSum_toAddMonoidAlgebra (f : AddMonoidAlgebra M ι) :
    f.toDirectSum.toAddMonoidAlgebra = f
-- Mathlib/Data/List/Nodup.lean
@[simp]
theorem nodup_cons {a : α} {l : List α} : Nodup (a :: l) ↔ a ∉ l ∧ Nodup l
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
@[simp]
theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} :
    IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ
-- Mathlib/CategoryTheory/Sites/Sieves.lean
theorem functorPullback_comp (R : Sieve ((F ⋙ G).obj X)) :
    R.functorPullback (F ⋙ G) = (R.functorPullback G).functorPullback F
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_mono {s t : ι → Set α} (h : ∀ i, s i ⊆ t i) : ⋃ i, s i ⊆ ⋃ i, t i
-- Mathlib/Topology/Connected/PathConnected.lean
@[simp]
theorem coe_mk_mk (f : I → X) (h₁) (h₂ : f 0 = x) (h₃ : f 1 = y) :
    ⇑(mk ⟨f, h₁⟩ h₂ h₃ : Path x y) = f
-- Mathlib/Algebra/Periodic.lean
theorem Periodic.sub_nsmul_eq [AddGroup α] (h : Periodic f c) (n : ℕ) : f (x - n • c) = f x
-- Mathlib/Algebra/CharP/Defs.lean
lemma ringChar_ne_one [Nontrivial R] : ringChar R ≠ 1
-- Mathlib/Algebra/Algebra/Bilinear.lean
@[simp]
theorem mulLeft_one : mulLeft R (1 : A) = LinearMap.id
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- Open elements of `𝓤 α` form a basis of `𝓤 α`. -/
theorem uniformity_hasBasis_open : HasBasis (𝓤 α) (fun V : Set (α × α) => V ∈ 𝓤 α ∧ IsOpen V) id
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem indexOf_cons_self (a : α) (l : List α) : indexOf a (a :: l) = 0
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem emod_ofNat_nonneg {x : Nat} {y : Int} : 0 ≤ (x : Int) % y
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_Icc_eq_integral_Ico : ∫ t in Icc x y, f t ∂μ = ∫ t in Ico x y, f t ∂μ
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp, norm_cast]
theorem _root_.Subalgebra.coe_valA (p : Subalgebra R A) :
    (p.valA : p →ₐ[R] A) = p.subtype
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
    OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i)
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive (attr := congr)]
theorem noncommProd_congr {s₁ s₂ : Finset α} {f g : α → β} (h₁ : s₁ = s₂)
    (h₂ : ∀ x ∈ s₂, f x = g x) (comm) :
    noncommProd s₁ f comm =
      noncommProd s₂ g fun x hx y hy h => by
        dsimp only
        rw [← h₂ _ hx, ← h₂ _ hy]
        subst h₁
        exact comm hx hy h
-- Mathlib/Topology/Order/Basic.lean
theorem tendsto_nhds_top_mono' [TopologicalSpace β] [Preorder β] [OrderTop β] [OrderTopology β]
    {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊤)) (hg : f ≤ g) : Tendsto g l (𝓝 ⊤)
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma uniformContinuous_nndist : UniformContinuous fun p : α × α => nndist p.1 p.2
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[simp]
theorem next (α : Type*) [AddRightCancelSemigroup α] [One α] (i : α) :
    (ComplexShape.up α).next i = i + 1
-- Mathlib/SetTheory/Game/Ordinal.lean
@[nolint unusedHavesSuffices]
theorem toPGame_def (o : Ordinal) :
    have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
    o.toPGame = ⟨o.out.α, PEmpty, fun x => (typein (· < ·) x).toPGame, PEmpty.elim⟩
-- Mathlib/Topology/LocallyConstant/Algebra.lean
@[to_additive]
theorem smul_apply [SMul R Y] (r : R) (f : LocallyConstant X Y) (x : X) : (r • f) x = r • f x
-- Mathlib/GroupTheory/Subsemigroup/Centralizer.lean
@[to_additive]
theorem center_le_centralizer (S) : center M ≤ centralizer S
-- Mathlib/Data/Multiset/Fintype.lean
@[simp]
protected theorem Multiset.exists_coe (p : m → Prop) :
    (∃ x : m, p x) ↔ ∃ (x : α) (i : Fin (m.count x)), p ⟨x, i⟩
-- Mathlib/Algebra/MvPolynomial/Rename.lean
theorem aeval_rename [Algebra R S] : aeval g (rename k p) = aeval (g ∘ k) p