ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/FieldTheory/SeparableClosure.lean
/-- If `E` and `K` are isomorphic as `F`-algebras, then they have the same
separable degree over `F`. -/
theorem lift_sepDegree_eq_of_equiv (i : E ≃ₐ[F] K) :
    Cardinal.lift.{w} (sepDegree F E) = Cardinal.lift.{v} (sepDegree F K)
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f` and `g ∘ σ` do not antivary together. Stated by permuting the entries of `g`. -/
theorem Antivary.sum_mul_lt_sum_mul_comp_perm_iff (hfg : Antivary f g) :
    ∑ i, f i • g i < ∑ i, f i • g (σ i) ↔ ¬Antivary f (g ∘ σ)
-- Mathlib/LinearAlgebra/Matrix/Dual.lean
@[simp]
theorem Matrix.toLin_transpose (M : Matrix ι₁ ι₂ K) : Matrix.toLin B₁.dualBasis B₂.dualBasis Mᵀ =
    Module.Dual.transpose (R := K) (Matrix.toLin B₂ B₁ M)
-- Mathlib/Data/List/Sublists.lean
theorem sublists'_reverse (l : List α) : sublists' (reverse l) = map reverse (sublists l)
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
lemma iInf_coe_lt_top : ⨅ i, (f i : WithTop α) < ⊤ ↔ Nonempty ι
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
protected theorem mul_div_mul_left {m : Nat} (n k : Nat) (H : 0 < m) :
    m * n / (m * k) = n / k
-- Mathlib/CategoryTheory/Limits/Shapes/Equivalence.lean
theorem hasInitial_of_equivalence (e : D ⥤ C) [e.IsEquivalence] [HasInitial C] : HasInitial D
-- Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
theorem iff_of_iSup_eq_top
    {ι} (U : ι → Y.affineOpens) (hU : ⨆ i, (U i : Y.Opens) = ⊤) :
    P f ↔ ∀ i, Q (f ∣_ U i)
-- Mathlib/Data/Fin/Basic.lean
lemma natCast_le_natCast (han : a ≤ n) (hbn : b ≤ n) : (a : Fin (n + 1)) ≤ b ↔ a ≤ b
-- Mathlib/NumberTheory/MulChar/Basic.lean
protected theorem mul_one (χ : MulChar R R') : χ * 1 = χ
-- Mathlib/Topology/Category/CompHausLike/Limits.lean
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι (a : α) :
    OpenEmbedding (Sigma.ι X a)
-- Mathlib/Probability/Kernel/Composition.lean
theorem map_apply' (κ : Kernel α β) (hf : Measurable f) (a : α) {s : Set γ} (hs : MeasurableSet s) :
    map κ f hf a s = κ a (f ⁻¹' s)
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
@[simp]
theorem cone_snd (h : IsPullback fst snd f g) : h.cone.snd = snd
-- Mathlib/CategoryTheory/Abelian/DiagramLemmas/Four.lean
theorem epi_of_epi_of_epi_of_epi (hR₂ : R₂.Exact) (hR₁' : Epi (R₁.map' 1 2))
    (h₀ : Epi (app' φ 0)) (h₁ : Epi (app' φ 2)) :
    Epi (app' φ 1)
-- .lake/packages/batteries/Batteries/Data/HashMap/WF.lean
@[ext] protected theorem ext : ∀ {b₁ b₂ : Buckets α β}, b₁.1.data = b₂.1.data → b₁ = b₂
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
@[ext]
theorem ext {p q : SubMulAction R M} (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q
-- Mathlib/LinearAlgebra/FreeModule/PID.lean
lemma le_ker_coord_of_nmem_range {i : ι} (hi : i ∉ Set.range snf.f) :
    N ≤ LinearMap.ker (snf.bM.coord i)
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
/-- If a function `f` is locally integrable on a set `s` in a second countable topological space,
then there exist countably many open sets `u` covering `s` such that `f` is integrable on each
set `u ∩ s`. -/
theorem LocallyIntegrableOn.exists_countable_integrableOn [SecondCountableTopology X]
    (hf : LocallyIntegrableOn f s μ) : ∃ T : Set (Set X), T.Countable ∧
    (∀ u ∈ T, IsOpen u) ∧ (s ⊆ ⋃ u ∈ T, u) ∧ (∀ u ∈ T, IntegrableOn f (u ∩ s) μ)
-- Mathlib/Algebra/GroupWithZero/Invertible.lean
@[simp]
theorem mul_div_cancel_of_invertible (a b : α) [Invertible b] : a * b / b = a
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Linear.lean
theorem Expr.of_cancel_le (ctx : Context) (a b c d : Expr) (h : Poly.cancel a.toNormPoly b.toNormPoly = (c.toPoly, d.toPoly)) : (a.denote ctx ≤ b.denote ctx) = (c.denote ctx ≤ d.denote ctx)
-- Mathlib/Dynamics/FixedPoints/Basic.lean
/-- Any two maps `f : α → β` and `g : β → α` are inverse of each other on the sets of fixed points
of `f ∘ g` and `g ∘ f`, respectively. -/
theorem invOn_fixedPoints_comp (f : α → β) (g : β → α) :
    Set.InvOn f g (fixedPoints <| f ∘ g) (fixedPoints <| g ∘ f)
-- .lake/packages/batteries/Batteries/Data/DList.lean
/--
A difference List is a Function that, given a List, returns the original
contents of the difference List prepended to the given List.
This structure supports `O(1)` `append` and `concat` operations on lists, making it
useful for append-heavy uses such as logging and pretty printing.
-/
structure DList (α : Type u) where
  /-- "Run" a `DList` by appending it on the right by a `List α` to get another `List α`. -/
  apply     : List α → List α
  /-- The `apply` function of a `DList` is completely determined by the list `apply []`. -/
  invariant : ∀ l, apply l = apply [] ++ l
-- Mathlib/Algebra/Homology/TotalComplexShift.lean
@[simp]
lemma shiftFunctor₁XXIso_refl (a b x : ℤ) :
    K.shiftFunctor₁XXIso a x (a + x) rfl b = Iso.refl _
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
theorem fderivWithin_mul (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (hd : DifferentiableWithinAt 𝕜 d s x) :
    fderivWithin 𝕜 (fun y => c y * d y) s x =
      c x • fderivWithin 𝕜 d s x + d x • fderivWithin 𝕜 c s x
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isLittleO_const_id_cobounded (c : F'') :
    (fun _ => c) =o[Bornology.cobounded E''] id
-- Mathlib/Order/SupClosed.lean
/-- Every set in a join-semilattice generates a set closed under join. -/
@[simps! isClosed]
def latticeClosure : ClosureOperator (Set α)
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp]
theorem coe_mk {f : A →+* B} (h) : ((⟨f, h⟩ : A →ₐ[R] B) : A → B) = f
-- Mathlib/Data/Nat/Cast/Basic.lean
theorem natCast_apply (n : ℕ) (a : α) : (n : ∀ a, π a) a = n
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfcHom_eq_cfc_extend {a : A} (g : R → R) (ha : p a) (f : C(spectrum R a, R)) :
    cfcHom ha f = cfc (Function.extend Subtype.val f g) a
-- Mathlib/Data/Real/Basic.lean
private irreducible_def one : ℝ
-- Mathlib/Analysis/RCLike/Basic.lean
theorem re_le_norm (z : K) : re z ≤ ‖z‖
-- Mathlib/Topology/Instances/ENNReal.lean
theorem tsum_coe_eq_top_iff_not_summable_coe {f : α → ℝ≥0} :
    (∑' a, (f a : ℝ≥0∞)) = ∞ ↔ ¬Summable fun a => (f a : ℝ)
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
/-- If two non-unital ring homomorphisms are equal on a set, then they are equal on its
non-unital subsemiring closure. -/
theorem eqOn_sclosure {f g : F} {s : Set R} (h : Set.EqOn (f : R → S) (g : R → S) s) :
    Set.EqOn f g (closure s)
-- Mathlib/Algebra/Order/Ring/Cast.lean
@[simp] lemma cast_lt_zero : (n : R) < 0 ↔ n < 0
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
theorem map_eq_iff {x y : P} : e x = e y ↔ x = y
-- Mathlib/ModelTheory/Satisfiability.lean
protected theorem SemanticallyEquivalent.ex {φ ψ : L.BoundedFormula α (n + 1)}
    (h : T.SemanticallyEquivalent φ ψ) : T.SemanticallyEquivalent φ.ex ψ.ex
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem homogeneousComponent_mem  :
    homogeneousComponent n φ ∈ homogeneousSubmodule σ R n
-- Mathlib/Algebra/Module/Submodule/Range.lean
theorem _root_.Submodule.map_comap_eq_self [RingHomSurjective τ₁₂] {f : F} {q : Submodule R₂ M₂}
    (h : q ≤ range f) : map f (comap f q) = q
-- Mathlib/LinearAlgebra/Matrix/InvariantBasisNumber.lean
theorem Matrix.square_of_invertible (M : Matrix n m R) (N : Matrix m n R) (h : M * N = 1)
    (h' : N * M = 1) : Fintype.card n = Fintype.card m
-- Mathlib/Data/Rel.lean
theorem graph_injective : Injective (graph : (α → β) → Rel α β)
-- Mathlib/Analysis/Seminorm.lean
theorem lt_def {p q : Seminorm 𝕜 E} : p < q ↔ p ≤ q ∧ ∃ x, p x < q x
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Icc_eq [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] (p q : α × β) :
    Finset.Icc p q = Finset.Icc p.1 q.1 ×ˢ Finset.Icc p.2 q.2
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem Integrable.congr' {f : α → β} {g : α → γ} (hf : Integrable f μ)
    (hg : AEStronglyMeasurable g μ) (h : ∀ᵐ a ∂μ, ‖f a‖ = ‖g a‖) : Integrable g μ
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
theorem hasFDerivAtFilter_snd {L : Filter (E × F)} :
    HasFDerivAtFilter (@Prod.snd E F) (snd 𝕜 E F) p L
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
@[simp]
theorem toNatOrdinal_one : toNatOrdinal 1 = 1
-- Mathlib/RingTheory/Coalgebra/Basic.lean
theorem comul_comp_inr :
    comul ∘ₗ inr R A B = TensorProduct.map (.inr R A B) (.inr R A B) ∘ₗ comul
-- Mathlib/Algebra/MvPolynomial/CommRing.lean
@[simp]
theorem coeff_sub (m : σ →₀ ℕ) (p q : MvPolynomial σ R) : coeff m (p - q) = coeff m p - coeff m q
-- Mathlib/Topology/Maps/Basic.lean
theorem openEmbedding_iff_embedding_open :
    OpenEmbedding f ↔ Embedding f ∧ IsOpenMap f
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
theorem sub_one_pow_totient_lt_cyclotomic_eval {n : ℕ} {q : ℝ} (hn' : 2 ≤ n) (hq' : 1 < q) :
    (q - 1) ^ totient n < (cyclotomic n ℝ).eval q
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
@[simp]
theorem toPMF_toMeasure : μ.toPMF.toMeasure = μ
-- Mathlib/CategoryTheory/GradedObject.lean
@[ext]
lemma mapObj_ext {A : C} {j : J} (f g : X.mapObj p j ⟶ A)
    (hfg : ∀ (i : I) (hij : p i = j), X.ιMapObj p i j hij ≫ f = X.ιMapObj p i j hij ≫ g) :
    f = g
-- Mathlib/NumberTheory/LSeries/RiemannZeta.lean
/-- We have `ζ(0) = -1 / 2`. -/
theorem riemannZeta_zero : riemannZeta 0 = -1 / 2
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
@[simp low]
theorem if_true_right [h : Decidable p] :
    ite p q True ↔ p → q
-- Mathlib/CategoryTheory/Localization/Bousfield.lean
lemma W_isoClosure : W (isoClosure P) = W P
-- Mathlib/Analysis/RCLike/Basic.lean
theorem sub_conj (z : K) : z - conj z = 2 * im z * I
-- Mathlib/Data/ENNReal/Inv.lean
theorem lt_inv_iff_lt_inv : a < b⁻¹ ↔ b < a⁻¹
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem getElem_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}
    (hj : j < (l.set i a).length) :
    (l.set i a)[j] = l[j]'(by simp at hj; exact hj)
-- Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean
/-- If `n % 4 = 1`, then `χ₄ n = 1`. -/
theorem χ₄_nat_one_mod_four {n : ℕ} (hn : n % 4 = 1) : χ₄ n = 1
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isLittleO_abs_right : (f =o[l] fun x => |u x|) ↔ f =o[l] u
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
@[simp]
lemma variableChange_c₄ : (W.variableChange C).c₄ = C.u⁻¹ ^ 4 * W.c₄
-- Mathlib/Topology/Homotopy/Contractible.lean
theorem contractible_iff_id_nullhomotopic (Y : Type*) [TopologicalSpace Y] :
    ContractibleSpace Y ↔ (ContinuousMap.id Y).Nullhomotopic
-- Mathlib/Logic/Equiv/Basic.lean
theorem swap_eq_update (i j : α) : (Equiv.swap i j : α → α) = update (update id j i) i j
-- Mathlib/Data/Finset/Image.lean
theorem map_comm {β'} {f : β ↪ γ} {g : α ↪ β} {f' : α ↪ β'} {g' : β' ↪ γ}
    (h_comm : ∀ a, f (g a) = g' (f' a)) : (s.map g).map f = (s.map f').map g'
-- Mathlib/CategoryTheory/FiberedCategory/BasedCategory.lean
@[simp]
lemma comp_assoc {𝒵 : BasedCategory.{v₄, u₄} 𝒮} {𝒜 : BasedCategory.{v₅, u₅} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴)
    (G : 𝒴 ⥤ᵇ 𝒵) (H : 𝒵 ⥤ᵇ 𝒜) : (F ⋙ G) ⋙ H = F ⋙ (G ⋙ H)
-- Mathlib/Data/Set/Semiring.lean
@[simp]
lemma _root_.Set.up_image [MulOneClass α] [MulOneClass β] (f : α →* β) (s : Set α) :
    up (f '' s) = imageHom f (up s)
-- Mathlib/Topology/DenseEmbedding.lean
/-- The dense embedding of a subtype inside its closure. -/
@[simps]
def subtypeEmb {α : Type*} (p : α → Prop) (e : α → β) (x : { x // p x }) :
    { x // x ∈ closure (e '' { x | p x }) }
-- Mathlib/LinearAlgebra/Dual.lean
theorem coe_toDual_self (i : ι) : b.toDual (b i) = b.coord i
-- Mathlib/Algebra/GradedMulAction.lean
theorem mk_smul_mk [VAdd ιA ιM] [GSMul A M] {i j} (a : A i) (b : M j) :
    mk i a • mk j b = mk (i +ᵥ j) (GSMul.smul a b)
-- Mathlib/FieldTheory/IsAlgClosed/Basic.lean
@[simp]
theorem equivOfEquiv_symm_algebraMap (hSR : S ≃+* R) (r : R) :
    (equivOfEquiv L M hSR).symm (algebraMap R M r) = algebraMap S L (hSR.symm r)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mul_eq_left {a b : Cardinal} (ha : ℵ₀ ≤ a) (hb : b ≤ a) (hb' : b ≠ 0) : a * b = a
-- Mathlib/Topology/Constructions.lean
theorem embedding_prod_mk (x : X) : Embedding (Prod.mk x : Y → X × Y)
-- .lake/packages/batteries/Batteries/Data/HashMap/WF.lean
theorem WF.out [BEq α] [Hashable α] {m : Imp α β} (h : m.WF) :
    m.size = m.buckets.size ∧ m.buckets.WF
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem le_symmDiff_iff_left : a ≤ a ∆ b ↔ Disjoint a b
-- Mathlib/Analysis/SpecialFunctions/Exponential.lean
/-- The exponential in a Banach algebra `𝔸` over a normed field `𝕂` has Fréchet derivative
`1 : 𝔸 →L[𝕂] 𝔸` at zero, as long as it converges on a neighborhood of zero. -/
theorem hasFDerivAt_exp_zero_of_radius_pos (h : 0 < (expSeries 𝕂 𝔸).radius) :
    HasFDerivAt (exp 𝕂) (1 : 𝔸 →L[𝕂] 𝔸) 0
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[simp]
theorem mk'_toSubsemigroup {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toSubsemigroup = sg
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[simp]
theorem smul_set_neg : a • -t = -(a • t)
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem norm_expSeries_summable_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    Summable fun n => ‖expSeries 𝕂 𝔸 n fun _ => x‖
-- Mathlib/Data/Finmap.lean
lemma mem_lookup_iff {s : Finmap β} {a : α} {b : β a} :
    b ∈ s.lookup a ↔ Sigma.mk a b ∈ s.entries
-- Mathlib/Data/Countable/Defs.lean
protected theorem Function.Surjective.countable [Countable α] {f : α → β} (hf : Surjective f) :
    Countable β
-- Mathlib/Topology/Instances/ENNReal.lean
/-- If `edist (f n) (f (n+1))` is bounded above by a function `d : ℕ → ℝ≥0∞`,
then the distance from `f n` to the limit is bounded by `∑'_{k=n}^∞ d k`. -/
theorem edist_le_tsum_of_edist_le_of_tendsto {f : ℕ → α} (d : ℕ → ℝ≥0∞)
    (hf : ∀ n, edist (f n) (f n.succ) ≤ d n) {a : α} (ha : Tendsto f atTop (𝓝 a)) (n : ℕ) :
    edist (f n) a ≤ ∑' m, d (n + m)
-- Mathlib/Topology/Order/Basic.lean
theorem pi_Ici_mem_nhds' (ha : ∀ i, a' i < x' i) : Ici a' ∈ 𝓝 x'
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem mapMatrix_comp (f : β →+ γ) (g : α →+ β) :
    f.mapMatrix.comp g.mapMatrix = ((f.comp g).mapMatrix : Matrix m n α →+ _)
-- Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean
theorem quasiCompact_stableUnderBaseChange :
    MorphismProperty.StableUnderBaseChange @QuasiCompact
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem not_prime_iff_minFac_lt {n : ℕ} (n2 : 2 ≤ n) : ¬Prime n ↔ minFac n < n
-- Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
@[measurability]
lemma measurable_llr (μ ν : Measure α) : Measurable (llr μ ν)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
@[simp] theorem gcd_mul_right_left (m n : Nat) : gcd (n * m) n = n
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem exists_linearIndependent_extension (hs : LinearIndependent K ((↑) : s → V)) (hst : s ⊆ t) :
    ∃ b ⊆ t, s ⊆ b ∧ t ⊆ span K b ∧ LinearIndependent K ((↑) : b → V)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
@[simp] theorem Bool.or_self (b : Bool) : (b || b) = b
-- Mathlib/Analysis/Convex/Cone/Pointed.lean
@[simp, norm_cast]
theorem coe_map (S : PointedCone 𝕜 E) (f : E →ₗ[𝕜] F) : (S.map f : Set F) = f '' S
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
theorem reflection_sub {v w : F} (h : ‖v‖ = ‖w‖) : reflection (ℝ ∙ (v - w))ᗮ v = w
-- Mathlib/GroupTheory/PushoutI.lean
theorem summand_smul_def' {i : ι} (g : G i) (w : NormalWord d) :
    g • w = (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }
-- Mathlib/Topology/Algebra/Module/Basic.lean
protected theorem uniformContinuous {E₁ E₂ : Type*} [UniformSpace E₁] [UniformSpace E₂]
    [AddCommGroup E₁] [AddCommGroup E₂] [Module R₁ E₁] [Module R₂ E₂] [UniformAddGroup E₁]
    [UniformAddGroup E₂] (f : E₁ →SL[σ₁₂] E₂) : UniformContinuous f
-- Mathlib/RingTheory/Ideal/Cotangent.lean
theorem to_quotient_square_comp_toCotangent :
    I.cotangentToQuotientSquare.comp I.toCotangent = (I ^ 2).mkQ.comp (Submodule.subtype I)
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast]
protected theorem coe_inv (r : ℝ≥0) : ((r⁻¹ : ℝ≥0) : ℝ) = (r : ℝ)⁻¹
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
/-- A non-unital star subalgebra is a non-unital subalgebra which is closed under the `star`
operation. -/
structure NonUnitalStarSubalgebra (R : Type u) (A : Type v) [CommSemiring R]
    [NonUnitalNonAssocSemiring A] [Module R A] [Star A]
    extends NonUnitalSubalgebra R A : Type v where
  /-- The `carrier` of a `NonUnitalStarSubalgebra` is closed under the `star` operation. -/
  star_mem' : ∀ {a : A} (_ha : a ∈ carrier), star a ∈ carrier
-- Mathlib/Data/Set/Finite.lean
@[simp]
theorem card_singleton (a : α) : Fintype.card ({a} : Set α) = 1
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Sized.rotateR_size {l x r} (hl : Sized l) :
    size (@Ordnode.rotateR α l x r) = size l + size r + 1
-- Mathlib/Algebra/Homology/ShortComplex/ShortExact.lean
lemma ShortExact.op (h : S.ShortExact) : S.op.ShortExact
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem ContDiffWithinAt.csin {n} (hf : ContDiffWithinAt ℂ n f s x) :
    ContDiffWithinAt ℂ n (fun x => Complex.sin (f x)) s x
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
theorem condexp_ae_eq_condexpL1CLM (hm : m ≤ m0) [SigmaFinite (μ.trim hm)] (hf : Integrable f μ) :
    μ[f|m] =ᵐ[μ] condexpL1CLM F' hm μ (hf.toL1 f)
-- Mathlib/Data/Sum/Interval.lean
lemma Ioo_inl_inl :
    Ioo (inlₗ a₁ : α ⊕ₗ β) (inlₗ a₂) = (Ioo a₁ a₂).map (Embedding.inl.trans toLex.toEmbedding)
-- Mathlib/LinearAlgebra/Projectivization/Basic.lean
@[simp]
theorem mk_rep (v : ℙ K V) : mk K v.rep v.rep_nonzero = v
-- Mathlib/CategoryTheory/Bicategory/Functor/Pseudofunctor.lean
@[reassoc]
lemma whiskerLeft_mapId_inv (f : a ⟶ b) : F.map f ◁ (F.mapId b).inv =
    (ρ_ (F.map f)).hom ≫ F.map₂ (ρ_ f).inv ≫ (F.mapComp f (𝟙 b)).hom
-- Mathlib/Data/Real/Sqrt.lean
/-- **Cauchy-Schwarz inequality** for finsets using square roots in `ℝ`. -/
lemma sum_mul_le_sqrt_mul_sqrt (s : Finset ι) (f g : ι → ℝ) :
    ∑ i ∈ s, f i * g i ≤ √(∑ i ∈ s, f i ^ 2) * √(∑ i ∈ s, g i ^ 2)
-- Mathlib/Analysis/SpecificLimits/FloorPow.lean
theorem mul_pow_le_nat_floor_pow {c : ℝ} (hc : 1 < c) (i : ℕ) : (1 - c⁻¹) * c ^ i ≤ ⌊c ^ i⌋₊
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
/-- Fundamental theorem of calculus for set integrals, `nhds` version: if `μ` is a locally finite
measure and `f` is an almost everywhere measurable function that is continuous at a point `a`, then
`∫ x in s i, f x ∂μ = μ (s i) • f a + o(μ (s i))` at `li` provided that `s` tends to
`(𝓝 a).smallSets` along `li`. Since `μ (s i)` is an `ℝ≥0∞` number, we use `(μ (s i)).toReal` in
the actual statement.

Often there is a good formula for `(μ (s i)).toReal`, so the formalization can take an optional
argument `m` with this formula and a proof of `(fun i => (μ (s i)).toReal) =ᶠ[li] m`. Without these
arguments, `m i = (μ (s i)).toReal` is used in the output. -/
theorem ContinuousAt.integral_sub_linear_isLittleO_ae [TopologicalSpace X] [OpensMeasurableSpace X]
    {μ : Measure X} [IsLocallyFiniteMeasure μ] {x : X}
    {f : X → E} (hx : ContinuousAt f x) (hfm : StronglyMeasurableAtFilter f (𝓝 x) μ) {s : ι → Set X}
    {li : Filter ι} (hs : Tendsto s li (𝓝 x).smallSets) (m : ι → ℝ := fun i => (μ (s i)).toReal)
    (hsμ : (fun i => (μ (s i)).toReal) =ᶠ[li] m := by rfl) :
    (fun i => (∫ x in s i, f x ∂μ) - m i • f x) =o[li] m
-- Mathlib/CategoryTheory/Limits/Final.lean
/-- See also the strictly more general `final_iff_comp_final_full_faithful` below. -/
theorem final_iff_comp_equivalence [IsEquivalence G] : Final F ↔ Final (F ⋙ G)
-- Mathlib/CategoryTheory/Limits/MonoCoprod.lean
theorem mono_inl_iff {A B : C} {c₁ c₂ : BinaryCofan A B} (hc₁ : IsColimit c₁) (hc₂ : IsColimit c₂) :
    Mono c₁.inl ↔ Mono c₂.inl
-- Mathlib/Order/Bounds/Basic.lean
/-- The image under a monotone function of a set which is bounded below is bounded below. See also
`BddBelow.image2`. -/
theorem map_bddBelow : BddBelow s → BddBelow (f '' s)
-- Mathlib/Algebra/EuclideanDomain/Basic.lean
@[simp]
theorem gcd_self (a : R) : gcd a a = a
-- Mathlib/Algebra/Polynomial/Coeff.lean
theorem coeff_X_add_one_pow (R : Type*) [Semiring R] (n k : ℕ) :
    ((X + 1) ^ n).coeff k = (n.choose k : R)
-- Mathlib/Data/Matrix/Basis.lean
@[simp]
theorem trace_zero (h : j ≠ i) : trace (stdBasisMatrix i j c) = 0
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1_const [IsFiniteMeasure μ] (hT : DominatedFinMeasAdditive μ T C) (x : E) :
    setToL1 hT (indicatorConstLp 1 MeasurableSet.univ (measure_ne_top _ _) x) = T univ x
-- Mathlib/Probability/Martingale/Convergence.lean
/-- Part a of the **L¹ martingale convergence theorem**: a uniformly integrable submartingale
adapted to the filtration `ℱ` converges a.e. and in L¹ to an integrable function which is
measurable with respect to the σ-algebra `⨆ n, ℱ n`. -/
theorem Submartingale.tendsto_eLpNorm_one_limitProcess (hf : Submartingale f ℱ μ)
    (hunif : UniformIntegrable f 1 μ) :
    Tendsto (fun n => eLpNorm (f n - ℱ.limitProcess f μ) 1 μ) atTop (𝓝 0)
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem dual_id : sSupHom.dual (sSupHom.id α) = sInfHom.id _
-- Mathlib/Algebra/Category/BialgebraCat/Basic.lean
@[simp] theorem toBialgebraCatIso_symm (e : X ≃ₐc[R] Y) :
    toBialgebraCatIso e.symm = (toBialgebraCatIso e).symm
-- Mathlib/Analysis/Complex/Arg.lean
theorem abs_add_eq (h : x.arg = y.arg) : abs (x + y) = abs x + abs y
-- Mathlib/Order/WithBot.lean
@[simp, deprecated not_lt_bot "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem not_lt_none (a : WithBot α) : ¬@LT.lt (WithBot α) _ a none
-- Mathlib/Data/Finset/Basic.lean
theorem Nonempty.exists_mem {s : Finset α} (h : s.Nonempty) : ∃ x : α, x ∈ s
-- Mathlib/ModelTheory/Satisfiability.lean
/-- A consequence of the Löwenheim–Skolem Theorem: If `κ` is a cardinal greater than the
cardinalities of `L` and an infinite `L`-structure `M`, then there is a structure of cardinality `κ`
elementarily equivalent to `M`. -/
theorem exists_elementarilyEquivalent_card_eq (M : Type w') [L.Structure M] [Infinite M]
    (κ : Cardinal.{w}) (h1 : ℵ₀ ≤ κ) (h2 : lift.{w} L.card ≤ Cardinal.lift.{max u v} κ) :
    ∃ N : CategoryTheory.Bundled L.Structure, (M ≅[L] N) ∧ #N = κ
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem not_mem_of_csSup_lt {x : α} {s : Set α} (h : sSup s < x) (hs : BddAbove s) : x ∉ s
-- Mathlib/Analysis/Convex/Deriv.lean
/-- Reformulation of `ConvexOn.slope_le_of_hasDerivWithinAt` using `derivWithin`. -/
lemma slope_le_derivWithin (hfc : ConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f S y) :
    slope f x y ≤ derivWithin f S y
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive] -- Porting note: no longer a `simp`, see below
theorem invFun_eq_symm {f : M ≃* N} : f.invFun = f.symm
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
@[simp]
lemma id_toOrderHom (a : SimplexCategory) :
    Hom.toOrderHom (𝟙 a) = OrderHom.id
-- Mathlib/Algebra/Divisibility/Units.lean
theorem isRelPrime_mul_unit_right_left : IsRelPrime (y * x) z ↔ IsRelPrime y z
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem sub_max_sub_right : ∀ (a b c : Nat), max (a - c) (b - c) = max a b - c
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
/-- This lemma is less general than `MeasureTheory.unifIntegrable_finite` which applies to
all sequences indexed by a finite type. -/
theorem unifIntegrable_fin (hp_one : 1 ≤ p) (hp_top : p ≠ ∞) {n : ℕ} {f : Fin n → α → β}
    (hf : ∀ i, Memℒp (f i) p μ) : UnifIntegrable f p μ
-- Mathlib/Topology/Algebra/ProperAction.lean
/-- If `G` acts properly on `X`, then the quotient space is Hausdorff (T2). -/
@[to_additive "If `G` acts properly on `X`, then the quotient space is Hausdorff (T2)."]
theorem t2Space_quotient_mulAction_of_properSMul [ProperSMul G X] :
    T2Space (Quotient (MulAction.orbitRel G X))
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma fromAffine_some [Nontrivial R] {X Y : R} (h : W'.toAffine.Nonsingular X Y) :
    fromAffine (.some h) = ⟨(nonsingularLift_some ..).mpr h⟩