ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Fintype/Card.lean
/-- See `Infinite.exists_subset_card_eq` for a version that provides an arbitrary
`s : Finset α` for any cardinality. -/
theorem exists_superset_card_eq [Infinite α] (s : Finset α) (n : ℕ) (hn : s.card ≤ n) :
    ∃ t : Finset α, s ⊆ t ∧ t.card = n
-- Mathlib/NumberTheory/Cyclotomic/Discriminant.lean
/-- The discriminant of the power basis given by a primitive root of unity `ζ` is the same as the
discriminant of the power basis given by `ζ - 1`. -/
theorem discr_zeta_eq_discr_zeta_sub_one (hζ : IsPrimitiveRoot ζ n) :
    discr ℚ (hζ.powerBasis ℚ).basis = discr ℚ (hζ.subOnePowerBasis ℚ).basis
-- Mathlib/Data/TypeVec.lean
theorem diag_sub_val {n} {α : TypeVec.{u} n} : subtypeVal (repeatEq α) ⊚ diagSub = prod.diag
-- Mathlib/Topology/Order/Bornology.lean
lemma isOrderBornology_iff_eq_orderBornology [Lattice α] [Nonempty α] :
    IsOrderBornology α ↔ ‹Bornology α› = orderBornology
-- Mathlib/Analysis/Calculus/Deriv/Star.lean
@[simp]
protected theorem deriv.star' : (deriv fun y => star (f y)) = fun x => star (deriv f x)
-- Mathlib/Order/Interval/Set/Disjoint.lean
@[simp]
theorem biUnion_Ioc_eq_Ioi_self_iff {p : ι → Prop} {f : ∀ i, p i → α} {a : α} :
    ⋃ (i) (hi : p i), Ioc a (f i hi) = Ioi a ↔ ∀ x, a < x → ∃ i hi, x ≤ f i hi
-- Mathlib/Logic/Embedding/Set.lean
@[simp]
theorem subtypeOrEquiv_symm_inl (p q : α → Prop) [DecidablePred p] (h : Disjoint p q)
    (x : { x // p x }) : (subtypeOrEquiv p q h).symm (Sum.inl x) = ⟨x, Or.inl x.prop⟩
-- Mathlib/LinearAlgebra/Matrix/Trace.lean
theorem trace_fin_three (A : Matrix (Fin 3) (Fin 3) R) : trace A = A 0 0 + A 1 1 + A 2 2
-- Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean
@[simp]
theorem equiv_apply {X : C} {P : Cᵒᵖ ⥤ D} {S : J.Cover X} [HasMultiequalizer (S.index P)]
    (x : (multiequalizer (S.index P) : D)) (I : S.Arrow) :
    equiv P S x I = Multiequalizer.ι (S.index P) I x
-- Mathlib/Algebra/DirectSum/Module.lean
theorem IsInternal.collectedBasis_repr_of_mem (h : IsInternal A) {α : ι → Type*}
    (v : ∀ i, Basis (α i) R (A i)) {x : M} {i : ι} {a : α i} (hx : x ∈ A i) :
    (h.collectedBasis v).repr x ⟨i, a⟩ = (v i).repr ⟨x, hx⟩ a
-- Mathlib/Data/Nat/Defs.lean
lemma sq_sub_sq (a b : ℕ) : a ^ 2 - b ^ 2 = (a + b) * (a - b)
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem Monic.map [Semiring S] (f : R →+* S) (hp : Monic p) : Monic (p.map f)
-- Mathlib/Order/Cover.lean
theorem wcovBy_iff_covBy_or_le_and_le : a ⩿ b ↔ a ⋖ b ∨ a ≤ b ∧ b ≤ a
-- Mathlib/Data/Nat/Totient.lean
/-- For `d ∣ n`, the totient of `n/d` equals the number of values `k < n` such that `gcd n k = d` -/
theorem totient_div_of_dvd {n d : ℕ} (hnd : d ∣ n) :
    φ (n / d) = (filter (fun k : ℕ => n.gcd k = d) (range n)).card
-- Mathlib/Combinatorics/SetFamily/Shadow.lean
lemma mem_shadow_iterate_iff_exists_card :
    t ∈ ∂^[k] 𝒜 ↔ ∃ u : Finset α, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
/--
The composition of the isomorphism `pullbackSepcIso R S T` (from the pullback of
`Spec S ⟶ Spec R` and `Spec T ⟶ Spec R` to `Spec (S ⊗[R] T)`) with the morphism
`Spec (S ⊗[R] T) ⟶ Spec T` obtained by applying `Spec.map` to the ring morphism `t ↦ 1 ⊗ₜ[R] t`
is the second projection.
-/
@[reassoc (attr := simp)]
lemma pullbackSpecIso_hom_snd :
    (pullbackSpecIso R S T).hom ≫ Spec.map (ofHom (toRingHom includeRight)) = pullback.snd _ _
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem norm_sub_modPart (h : ‖(r : ℚ_[p])‖ ≤ 1) : ‖(⟨r, h⟩ - modPart p r : ℤ_[p])‖ < 1
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
@[simp]
theorem leadingCoeffHom_apply (p : R[X]) : leadingCoeffHom p = leadingCoeff p
-- Mathlib/Data/Set/Basic.lean
theorem Subset.antisymm_iff {a b : Set α} : a = b ↔ a ⊆ b ∧ b ⊆ a
-- Mathlib/Data/Quot.lean
@[simp]
protected theorem eq'' {a b : α} : @Quotient.mk'' α s₁ a = Quotient.mk'' b ↔ @Setoid.r _ s₁ a b
-- Mathlib/Topology/PartialHomeomorph.lean
protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t)
-- Mathlib/Topology/Compactness/SigmaCompact.lean
/-- A closed subset of a σ-compact set is σ-compact. -/
lemma IsSigmaCompact.of_isClosed_subset {s t : Set X} (ht : IsSigmaCompact t)
    (hs : IsClosed s) (h : s ⊆ t) : IsSigmaCompact s
-- Mathlib/CategoryTheory/Limits/FinallySmall.lean
/-- The converse is true if `J` is filtered, see `finallySmall_of_small_weakly_terminal_set`. -/
theorem FinallySmall.exists_small_weakly_terminal_set [FinallySmall.{w} J] :
    ∃ (s : Set J) (_ : Small.{w} s), ∀ i, ∃ j ∈ s, Nonempty (i ⟶ j)
-- Mathlib/Data/Vector3.lean
theorem exists_vector_succ (f : Vector3 α (succ n) → Prop) : Exists f ↔ ∃ x v, f (x :: v)
-- Mathlib/Data/Rat/Lemmas.lean
theorem mul_self_den (q : ℚ) : (q * q).den = q.den * q.den
-- Mathlib/FieldTheory/Separable.lean
theorem separable_map {S} [CommRing S] [Nontrivial S] (f : F →+* S) {p : F[X]} :
    (p.map f).Separable ↔ p.Separable
-- Mathlib/Algebra/Group/Hom/Basic.lean
@[to_additive]
theorem mul_comp [Mul M] [Mul N] [CommSemigroup P] (g₁ g₂ : N →ₙ* P) (f : M →ₙ* N) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f
-- Mathlib/Topology/Homeomorph.lean
@[simp]
theorem coe_prodComm : ⇑(prodComm X Y) = Prod.swap
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
@[simp]
theorem comap_exp_nhds_exp (x : ℝ) : comap exp (𝓝 (exp x)) = 𝓝 x
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[reassoc]
theorem inv_prodComparison_map_snd [IsIso (prodComparison F A B)] :
    inv (prodComparison F A B) ≫ F.map prod.snd = prod.snd
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
theorem Subpresheaf.sheafify_isSheaf (hF : Presieve.IsSheaf J F) :
    Presieve.IsSheaf J (G.sheafify J).toPresheaf
-- Mathlib/Algebra/Associated/Basic.lean
theorem isUnit_of_associated_mul [CancelCommMonoidWithZero α] {p b : α} (h : Associated (p * b) p)
    (hp : p ≠ 0) : IsUnit b
-- Mathlib/Data/List/Nodup.lean
theorem Nodup.diff_eq_filter [DecidableEq α] :
    ∀ {l₁ l₂ : List α} (_ : l₁.Nodup), l₁.diff l₂ = l₁.filter (· ∉ l₂)
-- .lake/packages/batteries/Batteries/Data/List/Basic.lean
@[simp] theorem headD_eq_head? (l) (a : α) : headD l a = (head? l).getD a
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
/-- Alias of `Nat.cast_eq_zero`, specialized to `Ordinal` --/
theorem natCast_eq_zero {n : ℕ} : (n : Ordinal) = 0 ↔ n = 0
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
protected theorem TendstoUniformlyOn.tendstoLocallyUniformlyOn (h : TendstoUniformlyOn F f p s) :
    TendstoLocallyUniformlyOn F f p s
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
@[aesop safe apply] lemma T_pos (n : ℕ) : 0 < T n
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
/-- Binary strict **rearrangement inequality**. -/
lemma mul_add_mul_lt_mul_add_mul [ExistsAddOfLE α] [MulPosStrictMono α]
    [CovariantClass α α (· + ·) (· < ·)] [ContravariantClass α α (· + ·) (· < ·)]
    (hab : a < b) (hcd : c < d) : a * d + b * c < a * c + b * d
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem coe_incl' : ⇑L'.incl' = ((↑) : L' → L)
-- Mathlib/Data/List/Sublists.lean
theorem mem_sublistsLen_self {l l' : List α} (h : l' <+ l) :
    l' ∈ sublistsLen (length l') l
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasFDerivAt.hasDerivAt {f' : 𝕜 →L[𝕜] F} : HasFDerivAt f f' x → HasDerivAt f (f' 1) x
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem foldr_singleton (f : α → β → β) (H b a) : foldr f H b ({a} : Multiset α) = f a b
-- Mathlib/Data/ENNReal/Inv.lean
@[simp] theorem inv_top : ∞⁻¹ = 0
-- Mathlib/LinearAlgebra/TensorProduct/Tower.lean
@[simp]
theorem rid_symm_apply (m : M) : (AlgebraTensorModule.rid R A M).symm m = m ⊗ₜ 1
-- Mathlib/Order/Bounds/Basic.lean
theorem isLeast_pair [LinearOrder γ] {a b : γ} : IsLeast {a, b} (min a b)
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_coe_angle_eq_iff_eq_toReal {z : ℂ} {θ : Real.Angle} :
    (arg z : Real.Angle) = θ ↔ arg z = θ.toReal
-- .lake/packages/lean4/src/lean/Init/Data/List/Control.lean
@[simp] theorem forIn_cons [Monad m] (f : α → β → m (ForInStep β)) (a : α) (as : List α) (b : β)
    : forIn (a::as) b f = f a b >>= fun | ForInStep.done b => pure b | ForInStep.yield b => forIn as b f
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem setOf_pow_dvd_eq_Icc_factorization {n p : ℕ} (pp : p.Prime) (hn : n ≠ 0) :
    { i : ℕ | i ≠ 0 ∧ p ^ i ∣ n } = Set.Icc 1 (n.factorization p)
-- Mathlib/Analysis/CstarAlgebra/GelfandDuality.lean
/--
Consider the contravariant functors between compact Hausdorff spaces and commutative unital
C⋆algebras `F : Cpct → CommCStarAlg := X ↦ C(X, ℂ)` and
`G : CommCStarAlg → Cpct := A → characterSpace ℂ A` whose actions on morphisms are given by
`WeakDual.CharacterSpace.compContinuousMap` and `ContinuousMap.compStarAlgHom'`, respectively.

Then `η : id → F ∘ G := gelfandStarTransform` is a natural isomorphism implementing (half of)
the duality between these categories. That is, for commutative unital C⋆-algebras `A` and `B` and
`φ : A →⋆ₐ[ℂ] B` the following diagram commutes:

```
A  --- η A ---> C(characterSpace ℂ A, ℂ)

|                     |

φ                  (F ∘ G) φ

|                     |
V                     V

B  --- η B ---> C(characterSpace ℂ B, ℂ)
```
-/
theorem gelfandStarTransform_naturality {A B : Type*} [NormedCommRing A] [NormedAlgebra ℂ A]
    [CompleteSpace A] [StarRing A] [CstarRing A] [StarModule ℂ A] [NormedCommRing B]
    [NormedAlgebra ℂ B] [CompleteSpace B] [StarRing B] [CstarRing B] [StarModule ℂ B]
    (φ : A →⋆ₐ[ℂ] B) :
    (gelfandStarTransform B : _ →⋆ₐ[ℂ] _).comp φ =
      (compContinuousMap φ |>.compStarAlgHom' ℂ ℂ).comp (gelfandStarTransform A : _ →⋆ₐ[ℂ] _)
-- Mathlib/Data/Finsupp/AList.lean
@[simp]
theorem lookupFinsupp_support [DecidableEq α] [DecidableEq M] (l : AList fun _x : α => M) :
    l.lookupFinsupp.support = (l.1.filter fun x => Sigma.snd x ≠ 0).keys.toFinset
-- Mathlib/AlgebraicTopology/DoldKan/Compatibility.lean
theorem equivalenceUnitIso_eq (hε : υ hF = ε) :
    (equivalence hF hG).unitIso = equivalenceUnitIso hG ε
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ici_inter_Iio : Ici a ∩ Iio b = Ico a b
-- Mathlib/Data/Matroid/Map.lean
lemma Basis.map {X : Set α} (hIX : M.Basis I X) {f : α → β} (hf) :
    (M.map f hf).Basis (f '' I) (f '' X)
-- Mathlib/Data/Matroid/Closure.lean
lemma closure_biInter_eq_biInter_closure_of_biUnion_indep {ι : Type*} {A : Set ι} (hA : A.Nonempty)
    {I : ι → Set α} (h : M.Indep (⋃ i ∈ A, I i)) :
    M.closure (⋂ i ∈ A, I i) = ⋂ i ∈ A, M.closure (I i)
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
/-- Two affine maps from a Pi-tyoe of modules `(i : ι) → φv i` are equal if they are equal in their
  operation on `Pi.single` and `ι` is nonempty.  Analogous to `LinearMap.pi_ext`. See also
  `pi_ext_zero`, which instead `Nonempty ι` requires agreement at 0.-/
theorem pi_ext_nonempty [Nonempty ι] (h : ∀ i x, f (Pi.single i x) = g (Pi.single i x)) :
    f = g
-- Mathlib/Deprecated/Group.lean
/-- The difference of two additive group homomorphisms is an additive group
homomorphism if the target is commutative. -/
theorem IsAddGroupHom.sub {α β} [AddGroup α] [AddCommGroup β] {f g : α → β} (hf : IsAddGroupHom f)
    (hg : IsAddGroupHom g) : IsAddGroupHom fun a => f a - g a
-- Mathlib/Order/Disjoint.lean
@[simp, norm_cast]
theorem coe_sup (a b : Complementeds α) : ↑(a ⊔ b) = (a : α) ⊔ b
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem ring_inverse_equiv (e : M ≃L[R] M) : Ring.inverse ↑e = inverse (e : M →L[R] M)
-- Mathlib/Order/CompleteLattice.lean
theorem iSup_mono' {g : ι' → α} (h : ∀ i, ∃ i', f i ≤ g i') : iSup f ≤ iSup g
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
@[simp]
theorem _root_.LinearIsometry.angle_map {E F : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F]
    [InnerProductSpace ℝ E] [InnerProductSpace ℝ F] (f : E →ₗᵢ[ℝ] F) (u v : E) :
    angle (f u) (f v) = angle u v
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiag_one [DecidableEq o] [DecidableEq m] [One α] :
    blockDiag (1 : Matrix (m × o) (m × o) α) = 1
-- Mathlib/Algebra/Polynomial/RingDivision.lean
theorem irreducible_X_sub_C (r : R) : Irreducible (X - C r)
-- Mathlib/Analysis/Convex/Join.lean
theorem subset_convexJoin_right (h : s.Nonempty) : t ⊆ convexJoin 𝕜 s t
-- Mathlib/Order/Lattice.lean
theorem Lattice.ext {α} {A B : Lattice α} (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) :
    A = B
-- Mathlib/NumberTheory/LSeries/Deriv.lean
/-- The derivative of the L-series of `f` agrees with the negative of the L-series of
`log * f` on the right half-plane of absolute convergence. -/
lemma LSeries_deriv_eqOn {f : ℕ → ℂ} :
    {s | abscissaOfAbsConv f < s.re}.EqOn (deriv (LSeries f)) (- LSeries (logMul f))
-- Mathlib/Data/List/Enum.lean
theorem enum_append (xs ys : List α) : enum (xs ++ ys) = enum xs ++ enumFrom xs.length ys
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem subset_zeroLocus_iff_subset_vanishingIdeal (t : Set (ProjectiveSpectrum 𝒜)) (s : Set A) :
    t ⊆ zeroLocus 𝒜 s ↔ s ⊆ vanishingIdeal t
-- Mathlib/Logic/Basic.lean
@[simp] theorem exists_exists_exists_and_eq {α β γ : Type*}
    {f : α → β → γ} {p : γ → Prop} :
    (∃ c, (∃ a, ∃ b, f a b = c) ∧ p c) ↔ ∃ a, ∃ b, p (f a b)
-- Mathlib/Data/Rat/Defs.lean
@[simp]
theorem num_neg_eq_neg_num (q : ℚ) : (-q).num = -q.num
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
@[simp] theorem testBit_zero (x : Nat) : testBit x 0 = decide (x % 2 = 1)
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem div_le_one_of_neg (hb : b < 0) : a / b ≤ 1 ↔ b ≤ a
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean
lemma Q_map_comp_Qinv {X Y Y' : C} (f : X ⟶ Y') (s : Y ⟶ Y') (hs : W s) :
    (Q W).map f ≫ Qinv s hs = homMk (mk f s hs)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem sub.elim {motive : Nat → Prop}
    (x y : Nat)
    (h₁ : y ≤ x → (k : Nat) → x = y + k → motive k)
    (h₂ : x < y → motive 0)
    : motive (x - y)
-- Mathlib/Algebra/BigOperators/Associated.lean
theorem Prod.associated_iff {M N : Type*} [Monoid M] [Monoid N] {x z : M × N} :
    x ~ᵤ z ↔ x.1 ~ᵤ z.1 ∧ x.2 ~ᵤ z.2
-- Mathlib/Data/Fintype/Card.lean
theorem not_injective_infinite_finite {α β} [Infinite α] [Finite β] (f : α → β) : ¬Injective f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma nonsingular_add {P Q : Fin 3 → F} (hP : W.Nonsingular P) (hQ : W.Nonsingular Q) :
    W.Nonsingular <| W.add P Q
-- Mathlib/Topology/Order/UpperLowerSetTopology.lean
@[simp] lemma ofUpperSet_toUpperSet (a : α) : ofUpperSet (toUpperSet a) = a
-- Mathlib/Algebra/GroupWithZero/Commute.lean
theorem inv_left₀ (h : Commute a b) : Commute a⁻¹ b
-- Mathlib/Order/CompleteLattice.lean
theorem Antitone.le_map_iInf [CompleteLattice β] {f : α → β} (hf : Antitone f) :
    ⨆ i, f (s i) ≤ f (iInf s)
-- Mathlib/Algebra/MvPolynomial/Expand.lean
theorem expand_bind₁ (p : ℕ) (f : σ → MvPolynomial τ R) (φ : MvPolynomial σ R) :
    expand p (bind₁ f φ) = bind₁ (fun i ↦ expand p (f i)) φ
-- .lake/packages/batteries/Batteries/Data/Array/Monadic.lean
theorem SatisfiesM_mapM [Monad m] [LawfulMonad m] (as : Array α) (f : α → m β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → SatisfiesM (p i · ∧ motive (i + 1)) (f as[i])) :
    SatisfiesM
      (fun arr => motive as.size ∧ ∃ eq : arr.size = as.size, ∀ i h, p ⟨i, h⟩ arr[i])
      (Array.mapM f as)
-- Mathlib/Algebra/DirectSum/Module.lean
@[simp]
theorem linearEquivFunOnFintype_symm_coe [Fintype ι] (f : ⨁ i, M i) :
    (linearEquivFunOnFintype R ι M).symm f = f
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
@[simp] protected theorem zero_div (b : Nat) : 0 / b = 0
-- Mathlib/Data/Set/Basic.lean
theorem mem_inter {x : α} {a b : Set α} (ha : x ∈ a) (hb : x ∈ b) : x ∈ a ∩ b
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem not_lt {a b : Int} : ¬a < b ↔ b ≤ a
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
theorem Red.enum.sound (H : L₂ ∈ List.filter (Red L₁) (List.sublists L₁)) : Red L₁ L₂
-- Mathlib/Algebra/Order/Hom/Monoid.lean
theorem monotone_iff_map_nonpos : Monotone (f : α → β) ↔ ∀ a ≤ 0, f a ≤ 0
-- Mathlib/Data/Nat/GCD/Basic.lean
theorem Coprime.dvd_mul_right {m n k : ℕ} (H : Coprime k n) : k ∣ m * n ↔ k ∣ m
-- Mathlib/Order/SuccPred/IntervalSucc.lean
/-- If `α` is a linear pred order, `β` is a preorder, and `f : α → β` is a monotone function, then
the intervals `Set.Ioo (f Order.pred n) (f n)` are pairwise disjoint. -/
theorem pairwise_disjoint_on_Ioo_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Monotone f) :
    Pairwise (Disjoint on fun n => Ioo (f (pred n)) (f n))
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma map_equation (hf : Function.Injective f) (x y : R) :
    (W.map f).toAffine.Equation (f x) (f y) ↔ W.Equation x y
-- Mathlib/Algebra/MvPolynomial/CommRing.lean
theorem C_sub : (C (a - a') : MvPolynomial σ R) = C a - C a'
-- Mathlib/Data/Real/EReal.lean
theorem eq_top_iff_forall_lt (x : EReal) : x = ⊤ ↔ ∀ y : ℝ, (y : EReal) < x
-- Mathlib/Data/Num/Lemmas.lean
theorem zneg_succ (n : ZNum) : -n.succ = (-n).pred
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
@[simp]
theorem zmodEquivZPowers_apply_coe_nat (i : ℕ) :
    h.zmodEquivZPowers i = Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ)
-- Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean
/-- If the sequence already terminated at position `n + 1`, nothing gets squashed. -/
theorem squashSeq_eq_self_of_terminated (terminatedAt_succ_n : s.TerminatedAt (n + 1)) :
    squashSeq s n = s
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- The circumradius is non-negative. -/
theorem circumradius_nonneg {n : ℕ} (s : Simplex ℝ P n) : 0 ≤ s.circumradius
-- Mathlib/Analysis/Hofer.lean
theorem hofer {X : Type*} [MetricSpace X] [CompleteSpace X] (x : X) (ε : ℝ) (ε_pos : 0 < ε)
    {ϕ : X → ℝ} (cont : Continuous ϕ) (nonneg : ∀ y, 0 ≤ ϕ y) : ∃ ε' > 0, ∃ x' : X,
    ε' ≤ ε ∧ d x' x ≤ 2 * ε ∧ ε * ϕ x ≤ ε' * ϕ x' ∧ ∀ y, d x' y ≤ ε' → ϕ y ≤ 2 * ϕ x'
-- Mathlib/Analysis/Convex/SpecificFunctions/Basic.lean
/-- **Bernoulli's inequality** for real exponents, strict version: for `0 < p < 1` and `-1 ≤ s`,
with `s ≠ 0`, we have `(1 + s) ^ p < 1 + p * s`. -/
theorem rpow_one_add_lt_one_add_mul_self {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp1 : 0 < p)
    (hp2 : p < 1) : (1 + s) ^ p < 1 + p * s
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_biUnion_le_lift {α : Type u} {ι : Type v} (A : ι → Set α) (s : Set ι) :
    lift.{v} #(⋃ x ∈ s, A x) ≤ lift.{u} #s * ⨆ x : s, lift.{v} #(A x.1)
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
/-- A characterization of the a.e.-measurability of the indicator function which takes a constant
value `b` on a set `A` and `0` elsewhere. -/
lemma aemeasurable_indicator_const_iff {s} [MeasurableSingletonClass β] (b : β) [NeZero b] :
    AEMeasurable (s.indicator (fun _ ↦ b)) μ ↔ NullMeasurableSet s μ
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma opcyclesMap'_add :
    opcyclesMap' (φ + φ') h₁ h₂ = opcyclesMap' φ h₁ h₂ +
      opcyclesMap' φ' h₁ h₂
-- Mathlib/LinearAlgebra/TensorProduct/Tower.lean
theorem map_smul_left (b : B) (f : M →ₗ[A] P) (g : N →ₗ[R] Q) : map (b • f) g = b • map f g
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
@[reassoc (attr := simp)]
theorem LaxMonoidalFunctor.associativity_inv (F : LaxMonoidalFunctor C D) (X Y Z : C) :
    F.obj X ◁ F.μ Y Z ≫ F.μ X (Y ⊗ Z) ≫ F.map (α_ X Y Z).inv =
      (α_ (F.obj X) (F.obj Y) (F.obj Z)).inv ≫ F.μ X Y ▷ F.obj Z ≫ F.μ (X ⊗ Y) Z
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem top_coe : ((⊤ : LieSubmodule R L M) : Set M) = univ
-- Mathlib/RingTheory/WittVector/Identities.lean
theorem coeff_p_pow_eq_zero [CharP R p] {i j : ℕ} (hj : j ≠ i) : ((p : 𝕎 R) ^ i).coeff j = 0
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[measurability]
protected theorem sub [AddGroup β] [ContinuousSub β] (hf : AEFinStronglyMeasurable f μ)
    (hg : AEFinStronglyMeasurable g μ) : AEFinStronglyMeasurable (f - g) μ
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.symm (h : (fun x => f₁ x - f₂ x) =O[l] g) : (fun x => f₂ x - f₁ x) =O[l] g
-- Mathlib/SetTheory/Cardinal/Continuum.lean
@[simp]
theorem ofNat_mul_continuum {n : ℕ} [Nat.AtLeastTwo n] : no_index (OfNat.ofNat n) * 𝔠 = 𝔠
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem exists_maximal_independent' (s : ι → M) :
    ∃ I : Set ι,
      (LinearIndependent R fun x : I => s x) ∧
        ∀ J : Set ι, I ⊆ J → (LinearIndependent R fun x : J => s x) → I = J
-- Mathlib/Algebra/DirectSum/Ring.lean
/-- A family of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
describes a `RingHom`s on `⨁ i, A i`. This is a stronger version of `DirectSum.toMonoid`.

Of particular interest is the case when `A i` are bundled subojects, `f` is the family of
coercions such as `AddSubmonoid.subtype (A i)`, and the `[GSemiring A]` structure originates from
`DirectSum.gsemiring.ofAddSubmonoids`, in which case the proofs about `GOne` and `GMul`
can be discharged by `rfl`. -/
@[simps]
def toSemiring (f : ∀ i, A i →+ R) (hone : f _ GradedMonoid.GOne.one = 1)
    (hmul : ∀ {i j} (ai : A i) (aj : A j), f _ (GradedMonoid.GMul.mul ai aj) = f _ ai * f _ aj) :
    (⨁ i, A i) →+* R
-- .lake/packages/lean4/src/lean/Init/Control/StateCps.lean
@[simp] theorem runK_set (s s' : σ) (k : PUnit → σ → m β) : (set s' : StateCpsT σ m PUnit).runK s k = k ⟨⟩ s'
-- Mathlib/Data/Finset/Fold.lean
theorem fold_min_le : s.fold min b f ≤ c ↔ b ≤ c ∨ ∃ x ∈ s, f x ≤ c
-- Mathlib/Order/JordanHolder.lean
theorem total {s : CompositionSeries X} {x y : X} (hx : x ∈ s) (hy : y ∈ s) : x ≤ y ∨ y ≤ x
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
theorem MeasureTheory.Measure.restrict_map_of_aemeasurable {f : α → δ} (hf : AEMeasurable f μ)
    {s : Set δ} (hs : MeasurableSet s) : (μ.map f).restrict s = (μ.restrict <| f ⁻¹' s).map f
-- Mathlib/Data/Finset/Union.lean
@[simp] lemma mem_biUnion {b : β} : b ∈ s.biUnion t ↔ ∃ a ∈ s, b ∈ t a
-- Mathlib/MeasureTheory/Function/UniformIntegrable.lean
protected theorem unifIntegrable {f : ι → α → β} {p : ℝ≥0∞} (hf : UniformIntegrable f p μ) :
    UnifIntegrable f p μ
-- Mathlib/Data/Fintype/Card.lean
theorem Fintype.card_compl_set [Fintype α] (s : Set α) [Fintype s] [Fintype (↥sᶜ : Sort _)] :
    Fintype.card (↥sᶜ : Sort _) = Fintype.card α - Fintype.card s
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem injective_πs (o : Ordinal) : Function.Injective (πs C o)
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
@[simp]
theorem ofSigmaCofork_ι_app_left (c : Cofork I.fstSigmaMap I.sndSigmaMap) (a) :
    (ofSigmaCofork I c).ι.app (WalkingMultispan.left a) =
      (Sigma.ι I.left a : _) ≫ I.fstSigmaMap ≫ c.π
-- Mathlib/Algebra/Field/Subfield.lean
/-- A subfield is closed under addition. -/
protected theorem add_mem {x y : K} : x ∈ s → y ∈ s → x + y ∈ s
-- Mathlib/Analysis/Convex/Side.lean
theorem WOppSide.trans_wSameSide {s : AffineSubspace R P} {x y z : P} (hxy : s.WOppSide x y)
    (hyz : s.WSameSide y z) (hy : y ∉ s) : s.WOppSide x z
-- Mathlib/CategoryTheory/Subobject/Basic.lean
@[reassoc (attr := simp)]
theorem ofLEMk_comp_ofMkLE {B A : C} (X : Subobject B) (f : A ⟶ B) [Mono f] (Y : Subobject B)
    (h₁ : X ≤ mk f) (h₂ : mk f ≤ Y) : ofLEMk X f h₁ ≫ ofMkLE f Y h₂ = ofLE X Y (h₁.trans h₂)
-- Mathlib/Data/Nat/Choose/Sum.lean
/-- A version of `Commute.add_pow` that avoids ℕ-subtraction by summing over the antidiagonal and
also with the binomial coefficient applied via scalar action of ℕ. -/
theorem add_pow' (h : Commute x y) (n : ℕ) :
    (x + y) ^ n = ∑ m ∈ antidiagonal n, choose n m.fst • (x ^ m.fst * y ^ m.snd)
-- Mathlib/Data/Complex/Exponential.lean
theorem abs_exp (z : ℂ) : abs (exp z) = Real.exp z.re
-- Mathlib/Topology/FiberBundle/Basic.lean
theorem localTrivAt_snd (b : B) (p) :
    (Z.localTrivAt b p).2 = Z.coordChange (Z.indexAt p.1) (Z.indexAt b) p.1 p.2
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem zeroLocus_bot : zeroLocus 𝒜 ((⊥ : Ideal A) : Set A) = Set.univ
-- Mathlib/Data/Multiset/Basic.lean
theorem subset_iff {s t : Multiset α} : s ⊆ t ↔ ∀ ⦃x⦄, x ∈ s → x ∈ t
-- Mathlib/Probability/Independence/Basic.lean
theorem IndepFun.neg_left {_mβ : MeasurableSpace β} {_mβ' : MeasurableSpace β'} [Neg β]
    [MeasurableNeg β] (hfg : IndepFun f g μ) :
    IndepFun (-f) g μ
-- Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
theorem log_conj_eq_ite (x : ℂ) : log (conj x) = if x.arg = π then log x else conj (log x)