ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Complex/Abs.lean
@[simp]
theorem sq_abs_sub_sq_re (z : ℂ) : Complex.abs z ^ 2 - z.re ^ 2 = z.im ^ 2
-- Mathlib/Order/Heyting/Basic.lean
theorem le_hnot_inf_hnot : ￢(a ⊔ b) ≤ ￢a ⊓ ￢b
-- Mathlib/CategoryTheory/Limits/Cones.lean
/--
The categories of cocones over `F` and `G` are equivalent if `F` and `G` are naturally isomorphic
(possibly after changing the indexing category by an equivalence).
-/
@[simps! functor_obj]
def equivalenceOfReindexing {G : K ⥤ C} (e : K ≌ J) (α : e.functor ⋙ F ≅ G) : Cocone F ≌ Cocone G
-- Mathlib/CategoryTheory/Shift/ShiftSequence.lean
lemma shiftIso_add' (n m mn : M) (hnm : m + n = mn) (a a' a'' : M)
    (ha' : n + a = a') (ha'' : m + a' = a'') :
    F.shiftIso mn a a'' (by rw [← hnm, ← ha'', ← ha', add_assoc]) =
      isoWhiskerRight (shiftFunctorAdd' C m n _ hnm) _ ≪≫ Functor.associator _ _ _ ≪≫
        isoWhiskerLeft _ (F.shiftIso n a a' ha') ≪≫ F.shiftIso m a' a'' ha''
-- Mathlib/Data/ENNReal/Operations.lean
protected theorem sub_lt_iff_lt_right (hb : b ≠ ∞) (hab : b ≤ a) : a - b < c ↔ a < c + b
-- Mathlib/Order/CompleteLattice.lean
theorem iSup_const_le : ⨆ _ : ι, a ≤ a
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToFun_nonneg {T : Set α → G' →L[ℝ] G''} {C : ℝ} (hT : DominatedFinMeasAdditive μ T C)
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) {f : α → G'}
    (hf : 0 ≤ᵐ[μ] f) : 0 ≤ setToFun μ T hT f
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem toReal_neg_pi_div_two : ((-π / 2 : ℝ) : Angle).toReal = -π / 2
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
/-- A finite dimensional space is nontrivial if it has `finrank` equal to the successor of a
natural number. -/
theorem FiniteDimensional.nontrivial_of_finrank_eq_succ {n : ℕ}
    (hn : finrank R M = n.succ) : Nontrivial M
-- Mathlib/Analysis/Convolution.lean
theorem AEStronglyMeasurable.convolution_integrand (hf : AEStronglyMeasurable f ν)
    (hg : AEStronglyMeasurable g μ) :
    AEStronglyMeasurable (fun p : G × G => L (f p.2) (g (p.1 - p.2))) (μ.prod ν)
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
@[simp]
lemma Hom.id_eq_id (X : WalkingMulticospan fst snd) :
    Hom.id X = 𝟙 X
-- Mathlib/Algebra/Order/Floor.lean
theorem floor_eq_on_Ico (n : ℤ) : ∀ a ∈ Set.Ico (n : α) (n + 1), ⌊a⌋ = n
-- Mathlib/Algebra/Category/CoalgebraCat/Basic.lean
@[simp] theorem toCoalgHom_id {M : CoalgebraCat.{v} R} :
    Hom.toCoalgHom (𝟙 M) = CoalgHom.id _ _
-- Mathlib/Data/ZMod/Basic.lean
theorem ker_intCastAddHom (n : ℕ) :
    (Int.castAddHom (ZMod n)).ker = AddSubgroup.zmultiples (n : ℤ)
-- Mathlib/Algebra/Lie/Weights/Cartan.lean
theorem zeroRootSubalgebra_eq_iff_is_cartan [IsNoetherian R L] :
    zeroRootSubalgebra R L H = H ↔ H.IsCartanSubalgebra
-- Mathlib/LinearAlgebra/Determinant.lean
/-- If the determinant of a map vanishes, then the map is not onto. -/
theorem range_lt_top_of_det_eq_zero {𝕜 : Type*} [Field 𝕜] [Module 𝕜 M] {f : M →ₗ[𝕜] M}
    (hf : LinearMap.det f = 0) : LinearMap.range f < ⊤
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem map_zero {f : ArithmeticFunction R} : f 0 = 0
-- Mathlib/Topology/Maps/Basic.lean
/-- The topology induced under an inclusion `f : X → Y` from a discrete topological space `Y`
is the discrete topology on `X`.

See also `DiscreteTopology.of_continuous_injective`. -/
theorem Embedding.discreteTopology [DiscreteTopology Y] (hf : Embedding f) : DiscreteTopology X
-- Mathlib/Topology/Basic.lean
@[continuity]
theorem continuous_id : Continuous (id : X → X)
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
@[simp] theorem pwFilter_idem [DecidableRel (α := α) R] :
    pwFilter R (pwFilter R l) = pwFilter R l
-- Mathlib/RingTheory/Complex.lean
theorem Algebra.trace_complex_apply (z : ℂ) : Algebra.trace ℝ ℂ z = 2 * z.re
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
lemma quotientInfToPiQuotient_surj [Finite ι] {I : ι → Ideal R}
    (hI : Pairwise fun i j => IsCoprime (I i) (I j)) : Surjective (quotientInfToPiQuotient I)
-- Mathlib/RepresentationTheory/Rep.lean
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem disjoint_left : Disjoint l₁ l₂ ↔ ∀ ⦃a⦄, a ∈ l₁ → a ∉ l₂
-- Mathlib/Combinatorics/Hindman.lean
/-- If `m` and `m'` are finite products in `M`, then so is `m * m'`, provided that `m'` is obtained
from a subsequence of `M` starting sufficiently late. -/
@[to_additive
      "If `m` and `m'` are finite sums in `M`, then so is `m + m'`, provided that `m'`
      is obtained from a subsequence of `M` starting sufficiently late."]
theorem FP.mul {M} [Semigroup M] {a : Stream' M} {m : M} (hm : m ∈ FP a) :
    ∃ n, ∀ m' ∈ FP (a.drop n), m * m' ∈ FP a
-- Mathlib/Analysis/Normed/Group/Bounded.lean
@[to_additive]
lemma NormedCommGroup.cauchySeq_iff [Nonempty α] [SemilatticeSup α] {u : α → E} :
    CauchySeq u ↔ ∀ ε > 0, ∃ N, ∀ m, N ≤ m → ∀ n, N ≤ n → ‖u m / u n‖ < ε
-- Mathlib/NumberTheory/Pell.lean
/-- If `(x, y)` is a solution with `x` positive, then all its powers have positive `x`. -/
theorem x_zpow_pos {a : Solution₁ d} (hax : 0 < a.x) (n : ℤ) : 0 < (a ^ n).x
-- Mathlib/Algebra/Ring/Semiconj.lean
theorem neg_right (h : SemiconjBy a x y) : SemiconjBy a (-x) (-y)
-- Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
theorem f_iUnion {s : ℕ → Set α} (h : ∀ i, IsCaratheodory m (s i)) (hd : Pairwise (Disjoint on s)) :
    m (⋃ i, s i) = ∑' i, m (s i)
-- Mathlib/Analysis/Analytic/Basic.lean
theorem HasFPowerSeriesAt.eventually_eq_zero
    (hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries 𝕜 E F) x) : ∀ᶠ z in 𝓝 x, f z = 0
-- Mathlib/Logic/Function/Basic.lean
/-- **Cantor's diagonal argument** implies that there are no injective functions from `Set α`
to `α`. -/
theorem cantor_injective {α : Type*} (f : Set α → α) : ¬Injective f
-- Mathlib/Analysis/Convex/Join.lean
@[simp]
theorem convexJoin_iUnion_left (s : ι → Set E) (t : Set E) :
    convexJoin 𝕜 (⋃ i, s i) t = ⋃ i, convexJoin 𝕜 (s i) t
-- Mathlib/Computability/TuringMachine.lean
theorem Reaches₀.trans {σ} {f : σ → Option σ} {a b c : σ} (h₁ : Reaches₀ f a b)
    (h₂ : Reaches₀ f b c) : Reaches₀ f a c
-- Mathlib/Algebra/Module/Submodule/Ker.lean
@[simp]
theorem ker_id : ker (LinearMap.id : M →ₗ[R] M) = ⊥
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Icc_subset_Iic_self : Icc a b ⊆ Iic b
-- Mathlib/RingTheory/Generators.lean
@[simp]
lemma Hom.toAlgHom_id : Hom.toAlgHom (.id P) = AlgHom.id _ _
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
lemma le_induce_union : G'.induce s ⊔ G'.induce s' ≤ G'.induce (s ∪ s')
-- Mathlib/Order/Filter/Pi.lean
theorem compl_mem_coprodᵢ {s : Set (∀ i, α i)} :
    sᶜ ∈ Filter.coprodᵢ f ↔ ∀ i, (eval i '' s)ᶜ ∈ f i
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp, mfld_simps]
theorem coe_transDiffeomorph : ⇑(I.transDiffeomorph e) = e ∘ I
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem Homeomorph.mulLeft_symm (a : G) : (Homeomorph.mulLeft a).symm = Homeomorph.mulLeft a⁻¹
-- Mathlib/Data/Real/EReal.lean
lemma inv_inv {a : EReal} (h : a ≠ ⊥) (h' : a ≠ ⊤) : (a⁻¹)⁻¹ = a
-- Mathlib/Logic/Basic.lean
lemma imp_congr_ctx_eq {a b c d : Prop} (h₁ : a = c) (h₂ : c → b = d) : (a → b) = (c → d)
-- Mathlib/Data/List/Join.lean
/-- In a join, taking the first elements up to an index which is the sum of the lengths of the
first `i` sublists, is the same as taking the join of the first `i` sublists.

See `List.take_sum_join` for the corresponding statement using `List.sum`. -/
theorem take_sum_join' (L : List (List α)) (i : ℕ) :
    L.join.take (Nat.sum ((L.map length).take i)) = (L.take i).join
-- Mathlib/FieldTheory/Adjoin.lean
@[simp] theorem rank_bot' : Module.rank (⊥ : IntermediateField F E) E = Module.rank F E
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem coeToSubmodule_injective :
    Function.Injective (fun (I : FractionalIdeal S P) ↦ (I : Submodule R P))
-- Mathlib/Combinatorics/SimpleGraph/Coloring.lean
theorem Colorable.of_embedding {V' : Type*} {G' : SimpleGraph V'} (f : G ↪g G') {n : ℕ}
    (h : G'.Colorable n) : G.Colorable n
-- Mathlib/Data/Fin/Tuple/Reflection.lean
/-- This can be use to prove
```lean
example (P : (Fin 2 → α) → Prop) : (∀ f, P f) ↔ ∀ a₀ a₁, P ![a₀, a₁] :=
  (forall_iff _).symm
```
-/
@[simp]
theorem forall_iff : ∀ {m} (P : (Fin m → α) → Prop), Forall P ↔ ∀ x, P x
-- Mathlib/Analysis/Seminorm.lean
protected theorem sSup_empty : sSup (∅ : Set (Seminorm 𝕜 E)) = ⊥
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem sup'_cons {b : β} {hb : b ∉ s} :
    (cons b s hb).sup' (nonempty_cons hb) f = f b ⊔ s.sup' H f
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_range_succ' (f : ℕ → β) :
    ∀ n : ℕ, (∏ k ∈ range (n + 1), f k) = (∏ k ∈ range n, f (k + 1)) * f 0
-- Mathlib/Data/Finset/Basic.lean
theorem Insert.comm (a b : α) (s : Finset α) : insert a (insert b s) = insert b (insert a s)
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Iso.lean
@[simp]
theorem pushoutCoconeOfLeftIso_ι_app_right : (pushoutCoconeOfLeftIso f g).ι.app right = 𝟙 _
-- Mathlib/Analysis/Convex/Segment.lean
theorem segment_subset_Icc (h : x ≤ y) : [x -[𝕜] y] ⊆ Icc x y
-- Mathlib/CategoryTheory/Monad/Limits.lean
/-- If `C` has limits of shape `J` then any coreflective subcategory has limits of shape `J`. -/
theorem hasLimitsOfShape_of_coreflective (R : D ⥤ C) [Coreflective R] [HasLimitsOfShape J C] :
    HasLimitsOfShape J D
-- Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean
theorem IsSRGWith.card_commonNeighbors_eq_of_adj_compl (h : G.IsSRGWith n k ℓ μ) {v w : V}
    (ha : Gᶜ.Adj v w) : Fintype.card (Gᶜ.commonNeighbors v w) = n - (2 * k - μ) - 2
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
@[simp] lemma flip_innerₗ : (innerₗ F).flip = innerₗ F
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
lemma δ_eq {A : C} (x₃ : A ⟶ S.L₀.X₃) (x₂ : A ⟶ S.L₁.X₂) (x₁ : A ⟶ S.L₂.X₁)
    (h₂ : x₂ ≫ S.L₁.g = x₃ ≫ S.v₀₁.τ₃) (h₁ : x₁ ≫ S.L₂.f = x₂ ≫ S.v₁₂.τ₂) :
    x₃ ≫ S.δ = x₁ ≫ S.v₂₃.τ₁
-- Mathlib/Data/Int/Defs.lean
/-- See `Int.inductionOn'` for an induction in both directions. -/
protected theorem le_induction_down {P : ℤ → Prop} {m : ℤ} (h0 : P m)
    (h1 : ∀ n : ℤ, n ≤ m → P n → P (n - 1)) (n : ℤ) : n ≤ m → P n
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem ae_eq_image_of_ae_eq_comap {β} [MeasurableSpace α] {mβ : MeasurableSpace β} (f : α → β)
    (μ : Measure β) (hfi : Injective f) (hf : ∀ s, MeasurableSet s → NullMeasurableSet (f '' s) μ)
    {s t : Set α} (hst : s =ᵐ[comap f μ] t) : f '' s =ᵐ[μ] f '' t
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsLittleO.const_mul_left {f : α → R} (h : f =o[l] g) (c : R) : (fun x => c * f x) =o[l] g
-- Mathlib/LinearAlgebra/Prod.lean
theorem prod_eq_bot_iff {p₁ : Submodule R M} {p₂ : Submodule R M₂} :
    p₁.prod p₂ = ⊥ ↔ p₁ = ⊥ ∧ p₂ = ⊥
-- Mathlib/Algebra/Order/Sub/Defs.lean
theorem lt_tsub_comm : a < b - c ↔ c < b - a
-- Mathlib/RepresentationTheory/Action/Monoidal.lean
/-- When `V` is monoidal the forgetful functor `Action V G` to `V` is monoidal. -/
@[simps]
def forgetMonoidal : MonoidalFunctor (Action V G) V
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem coe_basisOneIJK_repr (q : ℍ[R,c₁,c₂]) :
    ⇑((basisOneIJK c₁ c₂).repr q) = ![q.re, q.imI, q.imJ, q.imK]
-- Mathlib/Topology/LocallyClosed.lean
lemma subset_coborder :
    s ⊆ coborder s
-- Mathlib/FieldTheory/Finite/Basic.lean
theorem odd_card_of_char_ne_two (hF : ringChar F ≠ 2) : Fintype.card F % 2 = 1
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem isSubgroup_iUnion_of_directed {ι : Type*} [Nonempty ι] {s : ι → Set G}
    (hs : ∀ i, IsSubgroup (s i)) (directed : ∀ i j, ∃ k, s i ⊆ s k ∧ s j ⊆ s k) :
    IsSubgroup (⋃ i, s i)
-- Mathlib/Data/Multiset/Basic.lean
theorem map_surjective_of_surjective {f : α → β} (hf : Function.Surjective f) :
    Function.Surjective (map f)
-- Mathlib/Analysis/RCLike/Basic.lean
theorem ext_iff {z w : K} : z = w ↔ re z = re w ∧ im z = im w
-- Mathlib/SetTheory/Cardinal/Divisibility.lean
@[simp, norm_cast]
theorem nat_coe_dvd_iff : (n : Cardinal) ∣ m ↔ n ∣ m
-- Mathlib/SetTheory/Game/Ordinal.lean
@[simp]
theorem toPGame_le_iff {a b : Ordinal} : a.toPGame ≤ b.toPGame ↔ a ≤ b
-- Mathlib/Topology/Order/LeftRightLim.lean
theorem leftLim_le (h : x ≤ y) : leftLim f x ≤ f y
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
@[to_additive (attr := simp, nolint simpNF)] -- Porting note: LHS does not simplify.
theorem mk_div (f g : α → γ) (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    mk (f / g) (hf.div hg) = (mk f hf : α →ₘ[μ] γ) / mk g hg
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem get?_set_of_lt' (a : α) {m n} (l : List α) (h : m < length l) :
    (set l m a).get? n = if m = n then some a else l.get? n
-- Mathlib/Data/Set/Subsingleton.lean
protected theorem Nontrivial.choose_fst_mem (hs : s.Nontrivial) : hs.choose.fst ∈ s
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem ofReal_toReal_ae_eq {f : α → ℝ≥0∞} (hf : ∀ᵐ x ∂μ, f x < ∞) :
    (fun x => ENNReal.ofReal (f x).toReal) =ᵐ[μ] f
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
theorem coe_mk (A : Matrix n n R) (h : det A = 1) : ↑(⟨A, h⟩ : SpecialLinearGroup n R) = A
-- Mathlib/Topology/Compactness/Compact.lean
/-- For every open cover of a compact set, there exists a finite subcover. -/
theorem IsCompact.elim_finite_subcover {ι : Type v} (hs : IsCompact s) (U : ι → Set X)
    (hUo : ∀ i, IsOpen (U i)) (hsU : s ⊆ ⋃ i, U i) : ∃ t : Finset ι, s ⊆ ⋃ i ∈ t, U i
-- Mathlib/Algebra/Ring/Units.lean
theorem IsUnit.sub_iff [Ring α] {x y : α} : IsUnit (x - y) ↔ IsUnit (y - x)
-- Mathlib/Topology/Algebra/ContinuousMonoidHom.lean
/-- The continuous homomorphism given by projection onto the first factor. -/
@[to_additive (attr := simps!)
  "The continuous homomorphism given by projection onto the first factor."]
def fst : ContinuousMonoidHom (A × B) A
-- Mathlib/Geometry/Manifold/BumpFunction.lean
protected theorem hasCompactSupport : HasCompactSupport f
-- Mathlib/Data/Set/Image.lean
@[mfld_simps]
theorem preimage_id {s : Set α} : id ⁻¹' s = s
-- Mathlib/CategoryTheory/Monoidal/Category.lean
theorem whiskerRight_iff {X Y : C} (f g : X ⟶ Y) : f ▷ 𝟙_ C = g ▷ 𝟙_ C ↔ f = g
-- Mathlib/Data/ENat/Basic.lean
@[simp] theorem toNat_eq_zero : toNat n = 0 ↔ n = 0 ∨ n = ⊤
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem mul_nonneg_iff [ExistsAddOfLE α] [MulPosStrictMono α] [PosMulStrictMono α]
    [ContravariantClass α α (· + ·) (· ≤ ·)] [CovariantClass α α (· + ·) (· ≤ ·)]:
    0 ≤ a * b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0
-- Mathlib/Order/Interval/Set/Pi.lean
@[simp]
theorem pi_univ_Iic : (pi univ fun i ↦ Iic (x i)) = Iic x
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Ico_filter_le_left {a b : α} [DecidablePred (· ≤ a)] (hab : a < b) :
    ((Ico a b).filter fun x => x ≤ a) = {a}
-- Mathlib/NumberTheory/Bernoulli.lean
theorem bernoulli'_eq_bernoulli (n : ℕ) : bernoulli' n = (-1) ^ n * bernoulli n
-- Mathlib/Computability/EpsilonNFA.lean
@[simp]
theorem eval_nil : M.eval [] = M.εClosure M.start
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem contMDiffAt_iff_of_mem_source {x' : M} {y : M'} (hx : x' ∈ (chartAt H x).source)
    (hy : f x' ∈ (chartAt H' y).source) :
    ContMDiffAt I I' n f x' ↔
      ContinuousAt f x' ∧
        ContDiffWithinAt 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm) (range I)
          (extChartAt I x x')
-- Mathlib/Analysis/Complex/RealDeriv.lean
theorem ContDiff.real_of_complex {n : ℕ∞} (h : ContDiff ℂ n e) :
    ContDiff ℝ n fun x : ℝ => (e x).re
-- Mathlib/Data/Multiset/Nodup.lean
theorem Nodup.pmap {p : α → Prop} {f : ∀ a, p a → β} {s : Multiset α} {H}
    (hf : ∀ a ha b hb, f a ha = f b hb → a = b) : Nodup s → Nodup (pmap f s H)
-- Mathlib/Logic/Equiv/Defs.lean
theorem permCongr_trans (p p' : Equiv.Perm α') :
    (e.permCongr p).trans (e.permCongr p') = e.permCongr (p.trans p')
-- Mathlib/FieldTheory/RatFunc/AsPolynomial.lean
@[simp]
theorem num_X : num (X : RatFunc K) = Polynomial.X
-- Mathlib/AlgebraicGeometry/Scheme.lean
lemma Spec.map_base : (Spec.map f).1.base = PrimeSpectrum.comap f
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem restrict_const_lintegral (c : ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    ((const α c).restrict s).lintegral μ = c * μ s
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- Given any `Finset` of objects `{X, ...}` and
indexed collection of `Finset`s of morphisms `{f, ...}` in `C`,
there exists an object `S`, with a morphism `T X : S ⟶ X` from each `X`,
such that the triangles commute: `T X ≫ f = T Y`, for `f : X ⟶ Y` in the `Finset`.
-/
theorem inf_exists :
    ∃ (S : C) (T : ∀ {X : C}, X ∈ O → (S ⟶ X)),
      ∀ {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y},
        (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H →
          T mX ≫ f = T mY
-- Mathlib/Algebra/Order/Antidiag/Pi.lean
@[simp] lemma piAntidiag_zero (s : Finset ι) : piAntidiag s (0 : μ) = {0}
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- An affine subspace constructed from a point and a direction is nonempty. -/
theorem mk'_nonempty (p : P) (direction : Submodule k V) : (mk' p direction : Set P).Nonempty
-- Mathlib/Analysis/NormedSpace/MatrixExponential.lean
theorem exp_blockDiagonal' (v : ∀ i, Matrix (n' i) (n' i) 𝔸) :
    exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v)
-- Mathlib/Probability/Martingale/Basic.lean
theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
    (hf : Supermartingale f ℱ μ) (hg : Martingale g ℱ μ) : Supermartingale (f + g) ℱ μ
-- Mathlib/Algebra/GroupWithZero/Commute.lean
@[simp]
theorem div_left (hac : Commute a c) (hbc : Commute b c) : Commute (a / b) c
-- Mathlib/Data/Set/Lattice.lean
theorem image_iInter_subset (s : ι → Set α) (f : α → β) : (f '' ⋂ i, s i) ⊆ ⋂ i, f '' s i
-- Mathlib/Topology/PartitionOfUnity.lean
theorem sum_le_one (x : X) : ∑ᶠ i, f i x ≤ 1
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `cons`, one can express directly the multiplicativity
of a multilinear map along the first variable. -/
theorem snoc_smul (f : MultilinearMap R M M₂) (m : ∀ i : Fin n, M (castSucc i)) (c : R)
    (x : M (last n)) : f (snoc m (c • x)) = c • f (snoc m x)
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
@[simp]
lemma quasispectrum.zero_mem [Nontrivial R] (a : A) : 0 ∈ quasispectrum R a
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem toHomeomorph_symm : e.toHomeomorph.symm = e.symm.toHomeomorph
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem hasGradientWithinAt_iff_hasFDerivWithinAt {s : Set F} :
    HasGradientWithinAt f f' s x ↔ HasFDerivWithinAt f (toDual 𝕜 F f') s x
-- Mathlib/Data/Fintype/Basic.lean
@[simp, norm_cast]
theorem coe_compl (s : Finset α) : ↑sᶜ = (↑s : Set α)ᶜ
-- Mathlib/Algebra/Module/LocalizedModule.lean
theorem mk'_neg {M M' : Type*} [AddCommGroup M] [AddCommGroup M'] [Module R M] [Module R M']
    (f : M →ₗ[R] M') [IsLocalizedModule S f] (m : M) (s : S) : mk' f (-m) s = -mk' f m s
-- Mathlib/Algebra/Ring/Parity.lean
lemma mod_two_add_add_odd_mod_two (m : ℕ) {n : ℕ} (hn : Odd n) : m % 2 + (m + n) % 2 = 1
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
theorem _root_.aestronglyMeasurable_const_smul_iff₀ {c : G₀} (hc : c ≠ 0) :
    AEStronglyMeasurable (fun x => c • f x) μ ↔ AEStronglyMeasurable f μ
-- Mathlib/Order/Bounds/Basic.lean
/-- If `a` is the least element of `s` and `b` is the least element of `t`,
then `min a b` is the least element of `s ∪ t`. -/
theorem IsLeast.union [LinearOrder γ] {a b : γ} {s t : Set γ} (ha : IsLeast s a)
    (hb : IsLeast t b) : IsLeast (s ∪ t) (min a b)
-- Mathlib/RingTheory/FreeRing.lean
@[simp]
theorem lift_comp_of (f : FreeRing α →+* R) : lift (f ∘ of) = f
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem aeval_zero' (p : MvPolynomial σ R) :
    aeval (fun _ => 0 : σ → S₁) p = algebraMap _ _ (constantCoeff p)
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp]
theorem prod_edist_eq_card (f g : WithLp 0 (α × β)) :
    edist f g =
      (if edist f.fst g.fst = 0 then 0 else 1) + (if edist f.snd g.snd = 0 then 0 else 1)
-- Mathlib/LinearAlgebra/TensorProduct/Tower.lean
@[simp]
theorem map_id : map (id : M →ₗ[A] M) (id : N →ₗ[R] N) = .id
-- Mathlib/Algebra/MvPolynomial/Supported.lean
@[simp]
theorem supported_empty : supported R (∅ : Set σ) = ⊥
-- Mathlib/Algebra/Lie/Basic.lean
theorem comp_apply (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) (x : L₁) : f.comp g x = f (g x)
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalMax.on (h : IsLocalMax f a) (s) : IsLocalMaxOn f s a
-- Mathlib/Order/OmegaCompletePartialOrder.lean
lemma isLUB_of_scottContinuous {c : Chain α} {f : α → β} (hf : ScottContinuous f) :
    IsLUB (Set.range (Chain.map c ⟨f, (ScottContinuous.monotone hf)⟩)) (f (ωSup c))
-- Mathlib/Algebra/MvPolynomial/Equiv.lean
@[simp]
theorem mapAlgEquiv_trans (e : A₁ ≃ₐ[R] A₂) (f : A₂ ≃ₐ[R] A₃) :
    (mapAlgEquiv σ e).trans (mapAlgEquiv σ f) = mapAlgEquiv σ (e.trans f)
-- Mathlib/Algebra/Ring/Commute.lean
protected lemma sq_sub_sq (h : Commute a b) : a ^ 2 - b ^ 2 = (a + b) * (a - b)
-- Mathlib/Data/Set/Prod.lean
theorem Disjoint.set_prod_right (ht : Disjoint t₁ t₂) (s₁ s₂ : Set α) :
    Disjoint (s₁ ×ˢ t₁) (s₂ ×ˢ t₂)
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
@[deprecated getElem_list (since := "2024-06-12")]
theorem get_list (i : Fin (list n).length) : (list n).get i = i.cast (length_list n)
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem integrableOn_Ici_iff_integrableAtFilter_atTop [LinearOrder X] [CompactIccSpace X] :
    IntegrableOn f (Ici a) μ ↔ IntegrableAtFilter f atTop μ ∧ LocallyIntegrableOn f (Ici a) μ
-- Mathlib/Algebra/DualQuaternion.lean
@[simp]
theorem imJ_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
    (dualNumberEquiv q).fst.imJ = q.imJ.fst
-- Mathlib/Logic/Equiv/List.lean
theorem raise_chain : ∀ l n, List.Chain (· ≤ ·) n (raise l n)
-- Mathlib/Data/Finset/NAry.lean
@[simp, norm_cast]
theorem coe_image₂ (f : α → β → γ) (s : Finset α) (t : Finset β) :
    (image₂ f s t : Set γ) = Set.image2 f s t
-- Mathlib/RingTheory/LittleWedderburn.lean
private theorem center_eq_top [Finite D] : Subring.center D = ⊤
-- Mathlib/Analysis/Convex/Slope.lean
/-- If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is
greater than the slope of the secant line of `f` on `[y, z]`, then `f` is concave. -/
theorem concaveOn_of_slope_anti_adjacent (hs : Convex 𝕜 s)
    (hf :
      ∀ {x y z : 𝕜},
        x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)) :
    ConcaveOn 𝕜 s f
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
@[simp]
theorem _root_.NonUnitalSubalgebra.toSubmodule_toNonUnitalSubalgebra (S : NonUnitalSubalgebra R A) :
    (S.toSubmodule.toNonUnitalSubalgebra fun _ _ => mul_mem (s := S)) = S
-- Mathlib/Topology/Inseparable.lean
@[simp]
theorem continuous_lift₂ {f : X → Y → Z} {hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d} :
    Continuous (uncurry <| lift₂ f hf) ↔ Continuous (uncurry f)
-- Mathlib/RingTheory/PowerSeries/Inverse.lean
theorem ker_coeff_eq_max_ideal : RingHom.ker (constantCoeff k) = maximalIdeal _
-- Mathlib/Analysis/Convex/GaugeRescale.lean
/-- If `s` is a convex bounded set with a nonempty interior in a real normed space,
then there is a homeomorphism of the ambient space to itself
that sends the interior of `s` to the unit open ball
and the closure of `s` to the unit closed ball. -/
theorem exists_homeomorph_image_interior_closure_frontier_eq_unitBall {s : Set E}
    (hc : Convex ℝ s) (hne : (interior s).Nonempty) (hb : IsBounded s) :
    ∃ h : E ≃ₜ E, h '' interior s = ball 0 1 ∧ h '' closure s = closedBall 0 1 ∧
      h '' frontier s = sphere 0 1
-- Mathlib/RingTheory/Flat/Basic.lean
/--
M is flat if and only if `- ⊗ M` is a left exact functor.
-/
lemma iff_rTensor_exact [Small.{v} R] :
    Flat R M ↔
    ∀ ⦃N N' N'' : Type v⦄ [AddCommGroup N] [AddCommGroup N'] [AddCommGroup N'']
      [Module R N] [Module R N'] [Module R N''] ⦃f : N →ₗ[R] N'⦄ ⦃g : N' →ₗ[R] N''⦄,
        Function.Exact f g → Function.Exact (f.rTensor M) (g.rTensor M)