ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which monovary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not monovary together. Stated by permuting the entries of `f`. -/
theorem MonovaryOn.sum_comp_perm_mul_lt_sum_mul_iff (hfg : MonovaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f (σ i) * g i < ∑ i ∈ s, f i * g i ↔ ¬MonovaryOn (f ∘ σ) g s
-- Mathlib/MeasureTheory/Integral/Periodic.lean
/-- The integral of an almost-everywhere strongly measurable function over `UnitAddCircle` is
equal to the integral over an interval (t, t + 1] in `ℝ` of its lift to `ℝ`. -/
protected theorem integral_preimage (t : ℝ) (f : UnitAddCircle → E) :
    (∫ a in Ioc t (t + 1), f a) = ∫ b : UnitAddCircle, f b
-- Mathlib/CategoryTheory/Adjunction/AdjointFunctorTheorems.lean
/-- A consequence of the special adjoint functor theorem: if `C` is cocomplete, well-copowered and
    has a small separating set, then it is complete. -/
theorem hasLimits_of_hasColimits_of_isSeparating [HasColimits C] [WellPowered Cᵒᵖ] {𝒢 : Set C}
    [Small.{v} 𝒢] (h𝒢 : IsSeparating 𝒢) : HasLimits C
-- Mathlib/Data/Int/Defs.lean
protected lemma lt_asymm : a < b → ¬ b < a
-- Mathlib/Algebra/Category/Grp/Limits.lean
/-- The categorical kernel inclusion for `f : G ⟶ H`, as an object over `G`,
agrees with the `AddSubgroup.subtype` map.
-/
@[simps! hom_left_apply_coe inv_left_apply]
def kernelIsoKerOver {G H : AddCommGrp.{u}} (f : G ⟶ H) :
    Over.mk (kernel.ι f) ≅ @Over.mk _ _ G (AddCommGrp.of f.ker) (AddSubgroup.subtype f.ker)
-- Mathlib/SetTheory/Ordinal/Notation.lean
@[simp]
theorem repr_mul : ∀ (o₁ o₂) [NF o₁] [NF o₂], repr (o₁ * o₂) = repr o₁ * repr o₂
-- Mathlib/RingTheory/FractionalIdeal/Norm.lean
theorem absNorm_one : absNorm (1 : FractionalIdeal R⁰ K) = 1
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem bmod_lt {x : Int} {m : Nat} (h : 0 < m) : bmod x m < (m + 1) / 2
-- Mathlib/Data/Nat/Defs.lean
lemma one_le_iff_ne_zero : 1 ≤ n ↔ n ≠ 0
-- Mathlib/Algebra/Quandle.lean
@[simp]
theorem act'_apply (x y : R) : act' x y = x ◃ y
-- Mathlib/Data/List/Enum.lean
theorem get_enumFrom (l : List α) (n) (i : Fin (l.enumFrom n).length) :
    (l.enumFrom n).get i = (n + i, l.get (i.cast enumFrom_length))
-- Mathlib/Probability/Independence/ZeroOne.lean
theorem condIndep_biSup_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (hf : ∀ t, p t → tᶜ ∈ f)
    {t : Set ι} (ht : p t) :
    CondIndep m (⨆ n ∈ t, s n) (limsup s f) hm μ
-- Mathlib/Data/Real/Irrational.lean
theorem of_nat_sub (m : ℕ) (h : Irrational (m - x)) : Irrational x
-- Mathlib/Order/Bounded.lean
theorem bounded_gt_Icc [Preorder α] [NoMinOrder α] (a b : α) : Bounded (· > ·) (Icc a b)
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
/-- If a set of ae strongly measurable functions is stable under addition and approximates
characteristic functions in `ℒp`, then it is dense in `ℒp`. -/
theorem Memℒp.induction_dense (hp_ne_top : p ≠ ∞) (P : (α → E) → Prop)
    (h0P :
      ∀ (c : E) ⦃s : Set α⦄,
        MeasurableSet s →
          μ s < ∞ →
            ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g : α → E, eLpNorm (g - s.indicator fun _ => c) p μ ≤ ε ∧ P g)
    (h1P : ∀ f g, P f → P g → P (f + g)) (h2P : ∀ f, P f → AEStronglyMeasurable f μ) {f : α → E}
    (hf : Memℒp f p μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) : ∃ g : α → E, eLpNorm (f - g) p μ ≤ ε ∧ P g
-- Mathlib/Data/Set/Image.lean
theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f
-- Mathlib/Data/Seq/Parallel.lean
theorem parallel_congr_right {S T : WSeq (Computation α)} {a} (h2 : ∀ t ∈ T, t ~> a)
    (H : S.LiftRel Equiv T) : parallel S ~ parallel T
-- Mathlib/Analysis/Normed/Algebra/Unitization.lean
theorem antilipschitzWith_addEquiv :
    AntilipschitzWith 2 (addEquiv 𝕜 A)
-- Mathlib/SetTheory/Game/PGame.lean
/-- Adding a gift horse right option does not change the value of `x`. A gift horse right option is
 a game `x'` with `x ⧏ x'`. It is called "gift horse" because it seems like Right has gotten the
 "gift" of a new option, but actually the value of the game did not change. -/
lemma insertRight_equiv_of_lf {x x' : PGame} (h : x ⧏ x') : insertRight x x' ≈ x
-- Mathlib/Data/Finset/Lattice.lean
theorem subset_range_sup_succ (s : Finset ℕ) : s ⊆ range (s.sup id).succ
-- Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
theorem summable_sum_mul_antidiagonal_of_summable_mul
    (h : Summable fun x : A × A ↦ f x.1 * g x.2) :
    Summable fun n ↦ ∑ kl ∈ antidiagonal n, f kl.1 * g kl.2
-- Mathlib/SetTheory/Surreal/Dyadic.lean
theorem powHalf_leftMoves (n) : (powHalf n).LeftMoves = PUnit
-- Mathlib/Algebra/Periodic.lean
@[to_additive]
theorem _root_.List.periodic_prod [Add α] [Monoid β] (l : List (α → β))
    (hl : ∀ f ∈ l, Periodic f c) : Periodic l.prod c
-- Mathlib/Algebra/MvPolynomial/Monad.lean
theorem map_bind₂ (f : R →+* MvPolynomial σ S) (g : S →+* T) (φ : MvPolynomial σ R) :
    map g (bind₂ f φ) = bind₂ ((map g).comp f) φ
-- Mathlib/Order/SuccPred/Basic.lean
theorem pred_ne_top (a : α) : pred a ≠ ⊤
-- Mathlib/NumberTheory/ADEInequality.lean
/-- A multiset `{p,q,r}` of positive natural numbers
is a solution to `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1` if and only if
it is `admissible` which means it is one of:

* `A' q r := {1,q,r}`
* `D' r := {2,2,r}`
* `E6 := {2,3,3}`, or `E7 := {2,3,4}`, or `E8 := {2,3,5}`
-/
theorem classification (p q r : ℕ+) : 1 < sumInv {p, q, r} ↔ Admissible {p, q, r}
-- Mathlib/Probability/StrongLaw.lean
theorem strong_law_aux2 {c : ℝ} (c_one : 1 < c) :
    ∀ᵐ ω, (fun n : ℕ => ∑ i ∈ range ⌊c ^ n⌋₊, truncation (X i) i ω -
      𝔼[∑ i ∈ range ⌊c ^ n⌋₊, truncation (X i) i]) =o[atTop] fun n : ℕ => (⌊c ^ n⌋₊ : ℝ)
-- Mathlib/GroupTheory/Index.lean
@[to_additive (attr := simp) relindex_eq_one]
theorem relindex_eq_one : H.relindex K = 1 ↔ K ≤ H
-- Mathlib/Data/Erased.lean
@[simp]
theorem bind_eq_out {α β} (a f) : @bind α β a f = f a.out
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem dropLast_replicate (n) (a : α) : dropLast (replicate n a) = replicate (n - 1) a
-- Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
theorem card_le_mul_card_image_of_maps_to {f : α → β} {s : Finset α} {t : Finset β}
    (Hf : ∀ a ∈ s, f a ∈ t) (n : ℕ) (hn : ∀ a ∈ t, (s.filter fun x ↦ f x = a).card ≤ n) :
    s.card ≤ n * t.card
-- Mathlib/Order/InitialSeg.lean
@[simp, nolint simpNF]
theorem subrelIso_apply (f : r ≺i s) (a : α) :
    f.subrelIso ⟨f a, f.down.mpr ⟨a, rfl⟩⟩ = a
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
/-- `UniqueDiffWithinAt` achieves its goal: it implies the uniqueness of the derivative. -/
theorem UniqueDiffWithinAt.eq (H : UniqueDiffWithinAt 𝕜 s x) (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt f f₁' s x) : f' = f₁'
-- Mathlib/Topology/Constructions.lean
theorem isClosedMap_sigmaMk {i : ι} : IsClosedMap (@Sigma.mk ι σ i)
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
/-- The multiplicity of an irreducible factor of a nonzero element is exactly the number of times
the normalized factor occurs in the `normalizedFactors`.

See also `count_normalizedFactors_eq` which expands the definition of `multiplicity`
to produce a specification for `count (normalizedFactors _) _`..
-/
theorem multiplicity_eq_count_normalizedFactors [DecidableEq R] {a b : R} (ha : Irreducible a)
    (hb : b ≠ 0) : multiplicity a b = (normalizedFactors b).count (normalize a)
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive]
theorem ne_one_of_map {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomClass F R S]
    {f : F} {x : R} (hx : f x ≠ 1) : x ≠ 1
-- Mathlib/Algebra/Group/Submonoid/Units.lean
@[to_additive]
lemma ofUnits_strictMono : StrictMono (ofUnits (M := M))
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
@[deprecated Nat.mul_le_mul_right (since := "2024-02-19")]
protected theorem mul_le_mul_of_nonneg_right {a b c : Nat} : a ≤ b → a * c ≤ b * c
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem lintegral_add {ν} (f : α →ₛ ℝ≥0∞) : f.lintegral (μ + ν) = f.lintegral μ + f.lintegral ν
-- Mathlib/Data/Nat/Pairing.lean
theorem unpair_left_le : ∀ n : ℕ, (unpair n).1 ≤ n
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
theorem mul_left_eq_zero {a b : M₀} (hb : IsUnit b) : a * b = 0 ↔ a = 0
-- Mathlib/Data/Finset/Prod.lean
theorem subset_product_image_fst [DecidableEq α] : (s ×ˢ t).image Prod.fst ⊆ s
-- Mathlib/Data/Nat/PartENat.lean
@[simp, norm_cast]
theorem ofENat_toWithTop (x : PartENat) {_ : Decidable (x : PartENat).Dom} : toWithTop x = x
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
theorem contMDiff_const : ContMDiff I I' n fun _ : M => c
-- Mathlib/Probability/Kernel/WithDensity.lean
@[simp]
lemma withDensity_zero (κ : Kernel α β) [IsSFiniteKernel κ] :
    Kernel.withDensity κ 0 = 0
-- Mathlib/Data/Set/Function.lean
@[simp] lemma injOn_pair {b : α} : InjOn f {a, b} ↔ f a = f b → a = b
-- Mathlib/Data/Finset/NoncommProd.lean
/-- The non-commutative version of `Finset.prod_union` -/
@[to_additive "The non-commutative version of `Finset.sum_union`"]
theorem noncommProd_union_of_disjoint [DecidableEq α] {s t : Finset α} (h : Disjoint s t)
    (f : α → β) (comm : { x | x ∈ s ∪ t }.Pairwise fun a b => Commute (f a) (f b)) :
    noncommProd (s ∪ t) f comm =
      noncommProd s f (comm.mono <| coe_subset.2 subset_union_left) *
        noncommProd t f (comm.mono <| coe_subset.2 subset_union_right)
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem exists_congr (h : ∀ a, p a ↔ q a) : (∃ a, p a) ↔ ∃ a, q a
-- Mathlib/Order/Interval/Set/ProjIcc.lean
@[simp]
theorem IicExtend_coe (f : Iic b → β) (x : Iic b) : IicExtend f x = f x
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
theorem eq_top_iff' (A : NonUnitalSubring R) : A = ⊤ ↔ ∀ x : R, x ∈ A
-- Mathlib/CategoryTheory/Preadditive/Projective.lean
theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProjectives D
-- Mathlib/CategoryTheory/Limits/IndYoneda.lean
@[reassoc (attr := simp)]
lemma limitRightOpIsoOpColimit_inv_comp_π (F : Iᵒᵖ ⥤ C) [HasColimit F] (i : I) :
    (limitRightOpIsoOpColimit F).inv ≫ limit.π F.rightOp i = (colimit.ι F ⟨i⟩).op
-- Mathlib/Order/CompleteLattice.lean
@[simp]
theorem iInf_exists {p : ι → Prop} {f : Exists p → α} : ⨅ x, f x = ⨅ (i) (h), f ⟨i, h⟩
-- Mathlib/Data/Finset/Sigma.lean
@[simp]
theorem sigma_eq_empty : s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅
-- Mathlib/Analysis/Analytic/CPolynomial.lean
theorem CPolynomialAt.eventually_cPolynomialAt {f : E → F} {x : E} (h : CPolynomialAt 𝕜 f x) :
    ∀ᶠ y in 𝓝 x, CPolynomialAt 𝕜 f y
-- Mathlib/Order/Filter/Archimedean.lean
theorem Tendsto.atTop_nsmul_const {f : α → ℕ} (hr : 0 < r) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x • r) l atTop
-- Mathlib/NumberTheory/DirichletCharacter/Basic.lean
lemma isPritive_one_level_zero : IsPrimitive (1 : DirichletCharacter R 0)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem comap_map_eq_self_of_injective
    {f : A →ₐ[R] B} (hf : Function.Injective f) (S : Subalgebra R A) : (S.map f).comap f = S
-- Mathlib/CategoryTheory/Limits/Comma.lean
/-- (Implementation). An auxiliary cocone which is useful in order to construct colimits
in the comma category. -/
@[simps!]
def colimitAuxiliaryCocone (c₂ : Cocone (F ⋙ snd L R)) : Cocone ((F ⋙ fst L R) ⋙ L)
-- Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean
/-- The inclusion of the Moore complex in the alternating face map complex
is a homotopy equivalence -/
@[simps]
def homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex {A : Type*} [Category A]
    [Abelian A] {Y : SimplicialObject A} :
    HomotopyEquiv ((normalizedMooreComplex A).obj Y) ((alternatingFaceMapComplex A).obj Y)
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem emod_eq_emod_iff_emod_sub_eq_zero {m n k : Int} : m % n = k % n ↔ (m - k) % n = 0
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
theorem coe_monoidHom_refl : (refl M : M →* M) = MonoidHom.id M
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem sigmaFinsuppLEquivPiFinsupp_apply {M : Type*} {ιs : η → Type*} [AddCommMonoid M]
    [Module R M] (f : (Σj, ιs j) →₀ M) (j i) : sigmaFinsuppLEquivPiFinsupp R f j i = f ⟨j, i⟩
-- Mathlib/Logic/IsEmpty.lean
/-- `IsEmpty α` expresses that `α` is empty. -/
class IsEmpty (α : Sort*) : Prop where
  protected false : α → False
-- Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
theorem AffineMap.restrict.linear (φ : P₁ →ᵃ[k] P₂) {E : AffineSubspace k P₁}
    {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F] (hEF : E.map φ ≤ F) :
    (φ.restrict hEF).linear = φ.linear.restrict (AffineMap.restrict.linear_aux hEF)
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp]
theorem Ioo_eq_empty (h : ¬a < b) : Ioo a b = ∅
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem filter_filterMap (f : α → Option β) (p : β → Bool) (l : List α) :
    filter p (filterMap f l) = filterMap (fun x => (f x).filter p) l
-- Mathlib/Analysis/Analytic/Linear.lean
theorem fpowerSeriesBilinear_apply_one (f : E →L[𝕜] F →L[𝕜] G) (x : E × F) :
    fpowerSeriesBilinear f x 1 = (continuousMultilinearCurryFin1 𝕜 (E × F) G).symm (f.deriv₂ x)
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
@[simp]
theorem log_inv (x : ℝ) : log x⁻¹ = -log x
-- Mathlib/FieldTheory/IntermediateField.lean
@[simp]
theorem toSubalgebra_map (f : L →ₐ[K] L') : (S.map f).toSubalgebra = S.toSubalgebra.map f
-- Mathlib/Analysis/Calculus/ContDiff/RCLike.lean
/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
theorem ContDiffAt.exists_lipschitzOnWith {f : E' → F'} {x : E'} (hf : ContDiffAt 𝕂 1 f x) :
    ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem HasStrictFDerivAt.const_smul (h : HasStrictFDerivAt f f' x) (c : R) :
    HasStrictFDerivAt (fun x => c • f x) (c • f') x
-- Mathlib/LinearAlgebra/FreeModule/PID.lean
/-- A submodule of a free `R`-module of finite rank is also a free `R`-module of finite rank,
if `R` is a principal ideal domain.

This is a `lemma` to make the induction a bit easier. To actually access the basis,
see `Submodule.basisOfPid`.

See also the stronger version `Submodule.smithNormalForm`.
-/
theorem Submodule.nonempty_basis_of_pid {ι : Type*} [Finite ι] (b : Basis ι R M)
    (N : Submodule R M) : ∃ n : ℕ, Nonempty (Basis (Fin n) R N)
-- Mathlib/Order/Interval/Multiset.lean
theorem right_not_mem_Ico : b ∉ Ico a b
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc]
theorem id_tensor_comp (f : W ⟶ X) (g : X ⟶ Y) : 𝟙 Z ⊗ f ≫ g = (𝟙 Z ⊗ f) ≫ (𝟙 Z ⊗ g)
-- Mathlib/Topology/Instances/ENNReal.lean
theorem iInf_mul_left {ι} [Nonempty ι] {f : ι → ℝ≥0∞} {a : ℝ≥0∞}
    (h : a = ∞ → ⨅ i, f i = 0 → ∃ i, f i = 0) : ⨅ i, a * f i = a * ⨅ i, f i
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem or_assoc (x y z : BitVec w) :
    x ||| y ||| z = x ||| (y ||| z)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem differentiable_cosh : Differentiable ℝ cosh
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
/-- A family of seminorms inducing a T₁ topology is separating. -/
theorem WithSeminorms.separating_of_T1 [T1Space E] (hp : WithSeminorms p) (x : E) (hx : x ≠ 0) :
    ∃ i, p i x ≠ 0
-- Mathlib/RingTheory/Bialgebra/Hom.lean
@[simp, norm_cast]
theorem coe_coalgHom_mk {f : A →ₗc[R] B} (h h₁) :
    ((⟨f, h, h₁⟩ : A →ₐc[R] B) : A →ₗc[R] B) = f
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem sup_eq_union (s t : Multiset α) : s ⊔ t = s ∪ t
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem mapMatrix_trans (f : α ≃ β) (g : β ≃ γ) :
    f.mapMatrix.trans g.mapMatrix = ((f.trans g).mapMatrix : Matrix m n α ≃ _)
-- Mathlib/Data/Matroid/Restrict.lean
theorem Restriction.finitary {M : Matroid α} [Finitary M] (h : N ≤r M) : N.Finitary
-- Mathlib/Data/ENNReal/Basic.lean
theorem bot_eq_zero : (⊥ : ℝ≥0∞) = 0
-- Mathlib/GroupTheory/Complement.lean
@[to_additive (attr := simp)]
theorem isComplement'_top_left : IsComplement' ⊤ H ↔ H = ⊥
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem measurableSet_preimage {t : Set β} (hf : Measurable f) (ht : MeasurableSet t) :
    MeasurableSet (f ⁻¹' t)
-- Mathlib/CategoryTheory/GradedObject/Bifunctor.lean
/-- Given a bifunctor `F : C₁ ⥤ C₂ ⥤ C₃` and a map `p : I × J → K`, this is the
functor `GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject K C₃` sending
`X : GradedObject I C₁` and `Y : GradedObject J C₂` to the `K`-graded object sending
`k` to the coproduct of `(F.obj (X i)).obj (Y j)` for `p ⟨i, j⟩ = k`. -/
@[simps]
noncomputable def mapBifunctorMap [∀ X Y, HasMap (((mapBifunctor F I J).obj X).obj Y) p] :
    GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject K C₃
-- Mathlib/Data/PNat/Defs.lean
theorem toPNat'_coe {n : ℕ} : 0 < n → (n.toPNat' : ℕ) = n
-- Mathlib/GroupTheory/SchurZassenhaus.lean
/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
theorem step7 : IsCommutative N
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Basic.lean
/-- If there are `ε * (card α)^2` disjoint triangles, then the graph is `ε`-far from being
triangle-free. -/
lemma farFromTriangleFree_of_disjoint_triangles (tris : Finset (Finset α))
    (htris : tris ⊆ G.cliqueFinset 3)
    (pd : (tris : Set (Finset α)).Pairwise fun x y ↦ (x ∩ y : Set α).Subsingleton)
    (tris_big : ε * (card α ^ 2 : ℕ) ≤ tris.card) :
    G.FarFromTriangleFree ε
-- Mathlib/Probability/Kernel/Disintegration/StandardBorel.lean
/-- **Disintegration** of finite product measures on `α × Ω`, where `Ω` is standard Borel. Such a
measure can be written as the composition-product of `ρ.fst` (marginal measure over `α`) and
a Markov kernel from `α` to `Ω`. We call that Markov kernel `ρ.condKernel`. -/
@[deprecated Measure.disintegrate (since := "2024-07-24")]
lemma _root_.MeasureTheory.Measure.compProd_fst_condKernel
    (ρ : Measure (α × Ω)) [IsFiniteMeasure ρ] :
    ρ.fst ⊗ₘ ρ.condKernel = ρ
-- Mathlib/Data/Real/EReal.lean
@[simp, norm_cast]
theorem coe_eq_zero {x : ℝ} : (x : EReal) = 0 ↔ x = 0
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem cons_product : (a ::ₘ s) ×ˢ t = map (Prod.mk a) t + s ×ˢ t
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem mem_asymm {x y : Class} : x ∈ y → y ∉ x
-- Mathlib/Deprecated/Group.lean
/-- A group homomorphism is injective iff its kernel is trivial. -/
@[to_additive "An additive group homomorphism is injective if its kernel is trivial."]
theorem injective_iff {f : α → β} (hf : IsGroupHom f) :
    Function.Injective f ↔ ∀ a, f a = 1 → a = 1
-- .lake/packages/batteries/Batteries/Data/Sum/Basic.lean
@[simp] theorem elim_inr (f : α → γ) (g : β → γ) (x : β) :
    Sum.elim f g (inr x) = g x
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
lemma not_reachable_iff_isEmpty_walk {u v : V} : ¬G.Reachable u v ↔ IsEmpty (G.Walk u v)
-- Mathlib/LinearAlgebra/Dual.lean
theorem dualAnnihilator_le_dualAnnihilator_iff {W W' : Subspace K V} :
    W.dualAnnihilator ≤ W'.dualAnnihilator ↔ W' ≤ W
-- Mathlib/Data/Part.lean
theorem right_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : b.Dom
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
@[simp]
theorem dimH_sUnion {S : Set (Set X)} (hS : S.Countable) : dimH (⋃₀ S) = ⨆ s ∈ S, dimH s
-- Mathlib/Topology/Instances/ENNReal.lean
protected theorem tsum_eq_limsup_sum_nat {f : ℕ → ℝ≥0∞} :
    ∑' i, f i = limsup (fun n => ∑ i ∈ Finset.range n, f i) atTop
-- Mathlib/Order/Antichain.lean
theorem isAntichain_singleton (a : α) (r : α → α → Prop) : IsAntichain r {a}
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[to_additive (attr := measurability)]
protected theorem const_mul [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (c : β) :
    AEStronglyMeasurable (fun x => c * f x) μ
-- Mathlib/Order/OmegaCompletePartialOrder.lean
theorem sSup_continuous' (s : Set (α → β)) (hc : ∀ f ∈ s, Continuous' f) :
    Continuous' (sSup s)
-- Mathlib/Topology/ContinuousFunction/Basic.lean
/-- `ContinuousMapClass F α β` states that `F` is a type of continuous maps.

You should extend this class when you extend `ContinuousMap`. -/
class ContinuousMapClass (F α β : Type*) [TopologicalSpace α] [TopologicalSpace β]
    [FunLike F α β] : Prop where
  /-- Continuity -/
  map_continuous (f : F) : Continuous f
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_add_eq_left_of_degree_lt (h : degree q < degree p) : degree (p + q) = degree p
-- Mathlib/GroupTheory/Coset.lean
@[to_additive]
theorem preimage_image_mk (N : Subgroup α) (s : Set α) :
    mk ⁻¹' ((mk : α → α ⧸ N) '' s) = ⋃ x : N, (· * (x : α)) ⁻¹' s
-- Mathlib/Topology/Basic.lean
@[mono, gcongr]
theorem closure_mono (h : s ⊆ t) : closure s ⊆ closure t
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean
lemma farFromTriangleFree [ExplicitDisjoint t] {ε : 𝕜}
    (ht : ε * ((Fintype.card α + Fintype.card β + Fintype.card γ) ^ 2 : ℕ) ≤ t.card) :
    (graph t).FarFromTriangleFree ε
-- Mathlib/LinearAlgebra/Dual.lean
theorem toDual_eq_equivFun [Finite ι] (m : M) (i : ι) : b.toDual m (b i) = b.equivFun m i
-- Mathlib/Topology/Bornology/Absorbs.lean
lemma _root_.Set.Finite.absorbs_biUnion {ι : Type*} {t : ι → Set α} {I : Set ι} (hI : I.Finite) :
    Absorbs M s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, Absorbs M s (t i)
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ContDiff.contDiffOn (h : ContDiff 𝕜 n f) : ContDiffOn 𝕜 n f s
-- Mathlib/Analysis/Complex/Polynomial/Basic.lean
/-- The number of complex roots equals the number of real roots plus
    the number of roots not fixed by complex conjugation (i.e. with some imaginary component). -/
theorem card_complex_roots_eq_card_real_add_card_not_gal_inv (p : ℚ[X]) :
    (p.rootSet ℂ).toFinset.card =
      (p.rootSet ℝ).toFinset.card +
        (galActionHom p ℂ (restrict p ℂ
        (AlgEquiv.restrictScalars ℚ Complex.conjAe))).support.card
-- Mathlib/LinearAlgebra/Alternating/DomCoprod.lean
/-- Swapping elements in `σ` with equal values in `v` result in zero if the swap has no effect
on the quotient. -/
theorem domCoprod.summand_eq_zero_of_smul_invariant (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)
    (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) (σ : Perm.ModSumCongr ιa ιb) {v : ιa ⊕ ιb → Mᵢ}
    {i j : ιa ⊕ ιb} (hv : v i = v j) (hij : i ≠ j) :
    swap i j • σ = σ → domCoprod.summand a b σ v = 0
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp, norm_cast]
theorem coe_fst : ↑(fst R A B) = AlgHom.fst R A B
-- Mathlib/Tactic/NormNum/Result.lean
theorem IsInt.of_raw (α) [Ring α] (n : ℤ) : IsInt (n.rawCast : α) n
-- Mathlib/Data/Option/Basic.lean
theorem map_bind {α β γ} (f : β → γ) (x : Option α) (g : α → Option β) :
    Option.map f (x >>= g) = x >>= fun a ↦ Option.map f (g a)
-- Mathlib/Data/Finset/Sups.lean
@[simp] lemma diffs_singleton : s \\ {b} = s.image (· \ b)
-- Mathlib/Analysis/NormedSpace/AddTorsorBases.lean
theorem isOpenMap_barycentric_coord [Nontrivial ι] (b : AffineBasis ι 𝕜 P) (i : ι) :
    IsOpenMap (b.coord i)
-- Mathlib/Data/ENNReal/Basic.lean
lemma coe_injective : Injective ((↑) : ℝ≥0 → ℝ≥0∞)
-- Mathlib/Order/LiminfLimsup.lean
theorem limsInf_principal {s : Set α} (h : BddBelow s) (hs : s.Nonempty) : limsInf (𝓟 s) = sInf s
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The Hausdorff distance between a set and itself is zero. -/
@[simp]
theorem hausdorffDist_self_zero : hausdorffDist s s = 0
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem cons_subset : a :: l ⊆ m ↔ a ∈ m ∧ l ⊆ m
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem prod_sup : s ×ˢ (t₁ ⊔ t₂) = s ×ˢ t₁ ⊔ s ×ˢ t₂
-- Mathlib/Analysis/SpecialFunctions/Gaussian/FourierTransform.lean
theorem integrable_cexp_neg_mul_sq_norm_add_of_euclideanSpace
    {ι : Type*} [Fintype ι] (hb : 0 < b.re) (c : ℂ) (w : EuclideanSpace ℝ ι) :
    Integrable (fun (v : EuclideanSpace ℝ ι) ↦ cexp (- b * ‖v‖^2 + c * ⟪w, v⟫))