theorem IsCycle.pow_eq_one_iff' [Finite β] {f : Perm β} (hf : IsCycle f) {n : ℕ} {x : β}
    (hx : f x ≠ x) : f ^ n = 1 ↔ (f ^ n) x = x

{β : Type u_3}
[Finite β]
{f : Equiv.Perm β}
(hf : f.IsCycle)
{n : ℕ}
{x : β}
(hx : f x ≠ x)


theorem apply_eq_iff_eq_symm_apply {x : α} {y : β} (f : α ≃ β) : f x = y ↔ x = f.symm y

{α : Sort u}
{β : Sort v}
{x : α}
{y : β}
(f : α ≃ β)


theorem factorization_eq_card_pow_dvd (n : ℕ) {p : ℕ} (pp : p.Prime) :
    n.factorization p = ((Ico 1 n).filter fun i => p ^ i ∣ n).card

n.factorization p = (Finset.filter (fun i => p ^ i ∣ n) (Finset.Ico 1 n)).card


/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData

(S : CategoryTheory.ShortComplex (ModuleCat R))

S.moduleCatLeftHomologyData.K = ModuleCat.of R ↥(LinearMap.ker S.g)


@[simp]
theorem val_mulMap'_tmul (a : A) (b : B) : (mulMap' A B (a ⊗ₜ[R] b) : S) = a.1 * b.1

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
{A B : Subalgebra R S}
(a : ↥A)
(b : ↥B)


/-- We can regard an injective map preserving binary infima as an order embedding. -/
@[simps! apply]
def orderEmbeddingOfInjective [SemilatticeInf α] [SemilatticeInf β] (f : F) [InfHomClass F α β]
    (hf : Injective f) : α ↪o β

{F : Type u_1}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[SemilatticeInf α]
[SemilatticeInf β]
(f : F)
[InfHomClass F α β]
(hf : Function.Injective ⇑f)
(a : α)

(orderEmbeddingOfInjective f hf) a = f a


lemma Icc_subset_uIcc' : Icc b a ⊆ [[a, b]]


@[simps!]
instance : Category LightDiagram

∀ {X Y Z : CategoryTheory.InducedCategory Profinite LightDiagram.toProfinite} (f : X ⟶ Y) (g : Y ⟶ Z)
  (a : ↑(LightDiagram.toProfinite X).toTop), (f ≫ g) a = g (f a)


@[trans]
theorem mem_of_mem_of_le {F G : PFilter P} (hx : x ∈ F) (hle : F ≤ G) : x ∈ G

{P : Type u_1}
[Preorder P]
{x : P}
{F G : Order.PFilter P}
(hx : x ∈ F)
(hle : F ≤ G)


@[to_additive]
theorem coe_comp_monoidHom (f : β →*o γ) (g : α →*o β) :
    (f.comp g : α →* γ) = (f : β →* γ).comp g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[AddZeroClass α]
[AddZeroClass β]
[AddZeroClass γ]
(f : β →+o γ)
(g : α →+o β)


theorem ext' {f g : F} (h : (f : ∀ a : α, β a) = (g : ∀ a : α, β a)) : f = g

{F : Sort u_1}
{α : Sort u_2}
{β : α → Sort u_3}
[i : DFunLike F α β]
{f g : F}
(h : ⇑f = ⇑g)


@[simp]
theorem smulRight_apply {c : M₁ →L[R] S} {f : M₂} {x : M₁} :
    (smulRight c f : M₁ → M₂) x = c x • f

{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{R : Type u_10}
{S : Type u_11}
[Semiring R]
[Semiring S]
[Module R M₁]
[Module R M₂]
[Module R S]
[Module S M₂]
[IsScalarTower R S M₂]
[TopologicalSpace S]
[ContinuousSMul S M₂]
{c : M₁ →L[R] S}
{f : M₂}
{x : M₁}


theorem natDegree_eraseLead_le_of_nextCoeff_eq_zero (h : f.nextCoeff = 0) :
    f.eraseLead.natDegree ≤ f.natDegree - 2

{R : Type u_1}
[Semiring R]
{f : R[X]}
(h : f.nextCoeff = 0)


theorem basisSets_smul_left (x : 𝕜) (U : Set E) (hU : U ∈ p.basisSets) :
    ∃ V ∈ p.addGroupFilterBasis.sets, V ⊆ (fun y : E => x • y) ⁻¹' U

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : SeminormFamily 𝕜 E ι)
[Nonempty ι]
(x : 𝕜)
(U : Set E)
(hU : U ∈ p.basisSets)

∃ V ∈ AddGroupFilterBasis.toFilterBasis.sets, V ⊆ (fun y => x • y) ⁻¹' U


theorem mem_inf_principal' {f : Filter α} {s t : Set α} : s ∈ f ⊓ 𝓟 t ↔ tᶜ ∪ s ∈ f

{α : Type u}
{f : Filter α}
{s t : Set α}

s ∈ f ⊓ 𝓟 t ↔ tᶜ ∪ s ∈ f


theorem N₁Γ₀_app (K : ChainComplex C ℕ) :
    N₁Γ₀.app K = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫
      (toKaroubi _).mapIso (Γ₀NondegComplexIso K)

AlgebraicTopology.DoldKan.N₁Γ₀.app K =
  (AlgebraicTopology.DoldKan.Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫
    (CategoryTheory.Idempotents.toKaroubi (ChainComplex C ℕ)).mapIso (AlgebraicTopology.DoldKan.Γ₀NondegComplexIso K)


@[simp]
theorem subtypeOrEquiv_symm_inr (p q : α → Prop) [DecidablePred p] (h : Disjoint p q)
    (x : { x // q x }) : (subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨x, Or.inr x.prop⟩

{α : Type u_1}
(p q : α → Prop)
[DecidablePred p]
(h : Disjoint p q)
(x : { x // q x })

(subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨↑x, ⋯⟩


/-- If a continuous function `c` realizes its maximum at a unique point `x₀` in a compact set `s`,
then the sequence of functions `(c x) ^ n / ∫ (c x) ^ n` is a sequence of peak functions
concentrating around `x₀`. Therefore, `∫ (c x) ^ n * g / ∫ (c x) ^ n` converges to `g x₀` if `g` is
continuous on `s`. -/
theorem tendsto_setIntegral_pow_smul_of_unique_maximum_of_isCompact_of_continuousOn
    [MetrizableSpace α] [IsLocallyFiniteMeasure μ] [IsOpenPosMeasure μ] (hs : IsCompact s)
    {c : α → ℝ} (hc : ContinuousOn c s) (h'c : ∀ y ∈ s, y ≠ x₀ → c y < c x₀)
    (hnc : ∀ x ∈ s, 0 ≤ c x) (hnc₀ : 0 < c x₀) (h₀ : x₀ ∈ closure (interior s))
    (hmg : ContinuousOn g s) :
    Tendsto (fun n : ℕ => (∫ x in s, c x ^ n ∂μ)⁻¹ • ∫ x in s, c x ^ n • g x ∂μ) atTop (𝓝 (g x₀))

Filter.Tendsto (fun n => (∫ (x : α) in s, c x ^ n ∂μ)⁻¹ • ∫ (x : α) in s, c x ^ n • g x ∂μ) Filter.atTop (𝓝 (g x₀))


@[simp]
theorem coeff_index_single_self_X (s : σ) : coeff R (single s 1) (X s : MvPowerSeries σ R) = 1

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(s : σ)

(MvPowerSeries.coeff R (Finsupp.single s 1)) (MvPowerSeries.X s) = 1


/-- The exponential map in `𝕂 = ℝ` or `𝕂 = ℂ` has derivative `1` at zero. -/
theorem hasDerivAt_exp_zero : HasDerivAt (exp 𝕂) (1 : 𝕂) 0


/-- The `ShortComplex` in `C` associated to a short complex in `Cᵒᵖ`. -/
@[simps]
def unop (S : ShortComplex Cᵒᵖ) : ShortComplex C


/-- `a` is in the down-compressed family iff it's in the original and its compression is in the
original, or it's not in the original but it's the compression of something in the original. -/
theorem mem_compression : s ∈ 𝓓 a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
{a : α}

s ∈ Down.compression a 𝒜 ↔ s ∈ 𝒜 ∧ s.erase a ∈ 𝒜 ∨ s ∉ 𝒜 ∧ insert a s ∈ 𝒜


theorem unop_iSup (S : ι → Subsemiring Rᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop

{ι : Sort u_1}
{R : Type u_2}
[NonAssocSemiring R]
(S : ι → Subsemiring Rᵐᵒᵖ)


theorem preimage_basicOpen {X Y : LocallyRingedSpace.{u}} (f : X ⟶ Y) {U : Opens Y}
    (s : Y.presheaf.obj (op U)) :
    (Opens.map f.1.base).obj (Y.toRingedSpace.basicOpen s) =
      @RingedSpace.basicOpen X.toRingedSpace ((Opens.map f.1.base).obj U) (f.1.c.app _ s)

{X Y : AlgebraicGeometry.LocallyRingedSpace}

{U : TopologicalSpace.Opens ↑Y.toTopCat}

(TopologicalSpace.Opens.map f.val.base).obj (Y.toRingedSpace.basicOpen s) =
  X.toRingedSpace.basicOpen ((f.val.c.app (Opposite.op U)) s)


theorem exists_unify_eq {α : Type*} [Finite α] {x y : α → Σˣ f} (xy : x ≈ y) :
    ∃ (i : ι) (hx : i ∈ upperBounds (range (Sigma.fst ∘ x)))
      (hy : i ∈ upperBounds (range (Sigma.fst ∘ y))), unify f x i hx = unify f y i hy

[DirectedSystem G fun i j h => ⇑(f i j h)]

{x y : α → FirstOrder.Language.Structure.Sigma f}

∃ i,
  ∃ (hx : i ∈ upperBounds (Set.range (Sigma.fst ∘ x))) (hy : i ∈ upperBounds (Set.range (Sigma.fst ∘ y))),
    FirstOrder.Language.DirectLimit.unify f x i hx = FirstOrder.Language.DirectLimit.unify f y i hy


theorem not_disjoint_self_iff : ¬Disjoint f f ↔ f.NeBot


/-- Class `LipschitzMul M` says that the multiplication `(*) : X × X → X` is Lipschitz jointly
in the two arguments. -/
@[to_additive]
class LipschitzMul [Monoid β] : Prop where
  lipschitz_mul : ∃ C, LipschitzWith C fun p : β × β => p.1 * p.2

{β : Type u_2}
[PseudoMetricSpace β]
[Monoid β]
[self : LipschitzMul β]


theorem natTrailingDegree_eq_of_trailingDegree_eq_some {p : R[X]} {n : ℕ}
    (h : trailingDegree p = n) : natTrailingDegree p = n

{R : Type u}
[Semiring R]
{p : R[X]}
{n : ℕ}
(h : p.trailingDegree = ↑n)


@[continuity]
theorem continuous_normSq : Continuous (normSq : ℍ → ℝ)


theorem toRingEquiv_op (f : A ≃ₐ[R] B) :
    (AlgEquiv.op f).toRingEquiv = RingEquiv.op f.toRingEquiv

{R : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A ≃ₐ[R] B)


@[to_additive (attr := simp)]
theorem inv_eq_bot_iff : f⁻¹ = ⊥ ↔ f = ⊥

f⁻¹ = ⊥ ↔ f = ⊥


theorem HasFDerivWithinAt.hasFDerivAt (h : HasFDerivWithinAt f f' s x) (hs : s ∈ 𝓝 x) :
    HasFDerivAt f f' x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : HasFDerivWithinAt f f' s x)
(hs : s ∈ 𝓝 x)


theorem le_of_eq_of_le' : b = c → a ≤ b → a ≤ c


theorem prod_dvd_prod_of_le (h : s ≤ t) : s.prod ∣ t.prod

{α : Type u_3}
[CommMonoid α]
{s t : Multiset α}
(h : s ≤ t)


@[to_additive]
theorem mul_mem_iff_of_index_two (h : H.index = 2) {a b : G} : a * b ∈ H ↔ (a ∈ H ↔ b ∈ H)

{G : Type u_1}
[Group G]
{H : Subgroup G}
(h : H.index = 2)
{a b : G}


theorem liminf_eq_iSup_iInf_of_nat {u : ℕ → α} : liminf u atTop = ⨆ n : ℕ, ⨅ i ≥ n, u i

{α : Type u_1}
[CompleteLattice α]
{u : ℕ → α}

Filter.liminf u Filter.atTop = ⨆ n, ⨅ i, ⨅ (_ : i ≥ n), u i


theorem effectiveEpiFamily_of_jointly_surjective
    {α : Type} [Finite α] {B : Stonean.{u}}
    (X : α → Stonean.{u}) (π : (a : α) → (X a ⟶ B))
    (surj : ∀ b : B, ∃ (a : α) (x : X a), π a x = b) :
    EffectiveEpiFamily X π

(surj : ∀ (b : ↑B.toTop), ∃ a x, (π a) x = b)


/-- Given a locally bijective morphism `α : R₀ ⟶ R.val` where `R₀` is a presheaf of rings
and `R` a sheaf of rings (i.e. `R` identifies to the sheafification of `R₀`), this is
the associated sheaf of modules functor `PresheafOfModules.{v} R₀ ⥤ SheafOfModules.{v} R`. -/
@[simps! (config := .lemmasOnly) map]
noncomputable def sheafification : PresheafOfModules.{v} R₀ ⥤ SheafOfModules.{v} R

{J : CategoryTheory.GrothendieckTopology C}

∀ {X Y : PresheafOfModules R₀} (f : X ⟶ Y),
  (PresheafOfModules.sheafification α).map f =
    PresheafOfModules.sheafifyMap α (CategoryTheory.toSheafify J X.presheaf) (CategoryTheory.toSheafify J Y.presheaf) f
      ((CategoryTheory.presheafToSheaf J AddCommGrp).map f.hom) ⋯


/-- If `e : S₁ ≅ S₂` is an isomorphism of short complexes and `h₁ : HomologyData S₁`,
this is the homology data for `S₂` deduced from the isomorphism. -/
@[simps!]
noncomputable def ofIso (e : S₁ ≅ S₂) (h : HomologyData S₁)

(CategoryTheory.ShortComplex.HomologyData.ofIso e h).right.H = h.right.H


@[simp, rclike_simps, norm_cast]
theorem natCast_im (n : ℕ) : im (n : K) = 0


theorem smul_mem_span_smul {s : Set S} (hs : span R s = ⊤) {t : Set A} {k : S} {x : A}
    (hx : x ∈ span R t) : k • x ∈ span R (s • t)

{R : Type u}
{S : Type v}
{A : Type w}
[Semiring R]
[Semiring S]
[AddCommMonoid A]
[Module R S]
[Module S A]
[Module R A]
[IsScalarTower R S A]
{s : Set S}
(hs : Submodule.span R s = ⊤)
{t : Set A}
{k : S}
{x : A}
(hx : x ∈ Submodule.span R t)


theorem symmDiff_le {a b c : α} (ha : a ≤ b ⊔ c) (hb : b ≤ a ⊔ c) : a ∆ b ≤ c

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b c : α}
(ha : a ≤ b ⊔ c)
(hb : b ≤ a ⊔ c)


@[reassoc] -- Porting note (#10618): simp can prove this, removed attribute
theorem lift_ι (W : C) (k : ∀ a, W ⟶ I.left a)
    (h : ∀ b, k (I.fstTo b) ≫ I.fst b = k (I.sndTo b) ≫ I.snd b) (a) :
    Multiequalizer.lift I _ k h ≫ Multiequalizer.ι I a = k _

(I : CategoryTheory.Limits.MulticospanIndex C)

(h :
  ∀ (b : I.R),
    CategoryTheory.CategoryStruct.comp (k (I.fstTo b)) (I.fst b) =
      CategoryTheory.CategoryStruct.comp (k (I.sndTo b)) (I.snd b))

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Multiequalizer.lift I W k h)
    (CategoryTheory.Limits.Multiequalizer.ι I a) =
  k a


@[to_additive (attr := simp)]
theorem mem_bot {x : G} : x ∈ (⊥ : Subgroup G) ↔ x = 1


theorem sum_pow_mem_span_pow {ι} (s : Finset ι) (f : ι → α) (n : ℕ) :
    (∑ i ∈ s, f i) ^ (s.card * n + 1) ∈ span ((fun i => f i ^ (n + 1)) '' s)

{α : Type u}
[CommSemiring α]
{ι : Type u_1}
(s : Finset ι)
(f : ι → α)
(n : ℕ)

(∑ i ∈ s, f i) ^ (s.card * n + 1) ∈ Ideal.span ((fun i => f i ^ (n + 1)) '' ↑s)


theorem IntegrableOn.smul_continuousOn [T2Space X] [SecondCountableTopologyEither X E] {f : X → 𝕜}
    (hf : IntegrableOn f K μ) {g : X → E} (hg : ContinuousOn g K) (hK : IsCompact K) :
    IntegrableOn (fun x => f x • g x) K μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure X}
[OpensMeasurableSpace X]
{K : Set X}
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 E]
[T2Space X]
[SecondCountableTopologyEither X E]
{f : X → 𝕜}
(hf : MeasureTheory.IntegrableOn f K μ)
{g : X → E}
(hg : ContinuousOn g K)
(hK : IsCompact K)

MeasureTheory.IntegrableOn (fun x => f x • g x) K μ


theorem sum_apply (t : Finset ι) (f : ι → M →ₛₗ[σ₁₂] M₂) (b : M) :
    (∑ d ∈ t, f d) b = ∑ d ∈ t, f d b

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
{ι : Type u_9}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
(t : Finset ι)
(f : ι → M →ₛₗ[σ₁₂] M₂)
(b : M)


@[simp]
theorem sSup_univ : sSup univ = (⊤ : α)


lemma _root_.MeasureTheory.Measure.condKernel_apply (ρ : Measure (α × Ω)) [IsFiniteMeasure ρ]
    (a : α) :
    ρ.condKernel a = condKernelUnitBorel (const Unit ρ) ((), a)

{α : Type u_1}
{Ω : Type u_4}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
(ρ : MeasureTheory.Measure (α × Ω))
[MeasureTheory.IsFiniteMeasure ρ]
(a : α)

ρ.condKernel a = (ProbabilityTheory.Kernel.const Unit ρ).condKernelUnitBorel ((), a)


{α : Type u_1}
{β : Type u_2}
{r : α → β → Prop}

(Relation.Comp r fun x x_1 => x = x_1) = r


@[simp]
lemma homMk₃_app_zero : (homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app 0 = app₀

{f g : CategoryTheory.ComposableArrows C 3}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁ = CategoryTheory.CategoryStruct.comp app₀ (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂ = CategoryTheory.CategoryStruct.comp app₁ (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃ = CategoryTheory.CategoryStruct.comp app₂ (g.map' 2 3 ⋯ ⋯))

(CategoryTheory.ComposableArrows.homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app 0 = app₀


protected lemma add_le_mul {a : ℕ} (ha : 2 ≤ a) : ∀ {b : ℕ} (_ : 2 ≤ b), a + b ≤ a * b


@[simp]
theorem mem_pure {a : α} {s : Set α} : s ∈ (pure a : Filter α) ↔ a ∈ s


lemma order_eq_int_iff {f : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℤ) : hf.order = n ↔
    ∃ g : 𝕜 → E, AnalyticAt 𝕜 g x ∧ g x ≠ 0 ∧ ∀ᶠ z in 𝓝[≠] x, f z = (z - x) ^ n • g z

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{x : 𝕜}
(hf : MeromorphicAt f x)
(n : ℤ)

hf.order = ↑n ↔ ∃ g, AnalyticAt 𝕜 g x ∧ g x ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = (z - x) ^ n • g z


@[to_additive HasSum.prod_mk]
theorem HasProd.prod_mk {f : β → α} {g : β → γ} {a : α} {b : γ}
    (hf : HasProd f a) (hg : HasProd g b) : HasProd (fun x ↦ (⟨f x, g x⟩ : α × γ)) ⟨a, b⟩

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
[AddCommMonoid γ]
[TopologicalSpace γ]
{f : β → α}
{g : β → γ}
{a : α}
{b : γ}
(hf : HasSum f a)
(hg : HasSum g b)


theorem glued_cover_cocycle_snd (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y ≫ pullback.snd _ _ =
      pullback.snd _ _

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(x y z : 𝒰.J)

𝒰.gluedCoverT' x y z ≫
    𝒰.gluedCoverT' y z x ≫
      𝒰.gluedCoverT' z x y ≫
        CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
          (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
    (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z))


/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which monovary together, is unchanged by a permutation if and only if `f ∘ σ` and `g` monovary
together. Stated by permuting the entries of `f`. -/
theorem MonovaryOn.sum_comp_perm_mul_eq_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

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f g : ι → α}
(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


@[fun_prop]
theorem differentiable_pi'' (hφ : ∀ i, Differentiable 𝕜 fun x => Φ x i) :
    Differentiable 𝕜 Φ

(hφ : ∀ (i : ι), Differentiable 𝕜 fun x => Φ x i)


@[reassoc]
theorem rightUnitor_tensor_inv (X Y : C) :
    (ρ_ (X ⊗ Y)).inv = X ◁ (ρ_ Y).inv ≫ (α_ X Y (𝟙_ C)).inv

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(X Y : C)

(CategoryTheory.MonoidalCategory.rightUnitor (CategoryTheory.MonoidalCategory.tensorObj X Y)).inv =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.rightUnitor Y).inv)
    (CategoryTheory.MonoidalCategory.associator X Y (𝟙_ C)).inv


/-- A finite union of finsets is finite. -/
theorem union_finset_finite_of_range_finite (f : α → Finset β) (h : (range f).Finite) :
    (⋃ a, (f a : Set β)).Finite

{α : Type u}
{β : Type v}
(f : α → Finset β)
(h : (Set.range f).Finite)


@[simp]
theorem bipointedToPointedSnd_comp_forget :
    bipointedToPointedSnd ⋙ forget Pointed = forget Bipointed

bipointedToPointedSnd ⋙ CategoryTheory.forget Pointed = CategoryTheory.forget Bipointed


@[simp] theorem range_coe_ennreal : range ((↑) : ℝ≥0∞ → EReal) = Set.Ici 0


@[simp]
theorem coe_mul : ↑(A * B) = (↑A : Matrix n n R) * (↑B : Matrix n n R)

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A B : GL n R)


@[fun_prop]
theorem HasStrictFDerivAt.clm_comp (hc : HasStrictFDerivAt c c' x) (hd : HasStrictFDerivAt d d' x) :
    HasStrictFDerivAt (fun y => (c y).comp (d y))
      ((compL 𝕜 F G H (c x)).comp d' + ((compL 𝕜 F G H).flip (d x)).comp c') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{c' : E →L[𝕜] G →L[𝕜] H}
{d : E → F →L[𝕜] G}
{d' : E →L[𝕜] F →L[𝕜] G}
(hc : HasStrictFDerivAt c c' x)
(hd : HasStrictFDerivAt d d' x)

HasStrictFDerivAt (fun y => (c y).comp (d y))
  (((ContinuousLinearMap.compL 𝕜 F G H) (c x)).comp d' + ((ContinuousLinearMap.compL 𝕜 F G H).flip (d x)).comp c') x


theorem compProd_of_not_isSFiniteKernel_right (κ : Kernel α β) (η : Kernel (α × β) γ)
    (h : ¬ IsSFiniteKernel η) :
    κ ⊗ₖ η = 0

(η : ProbabilityTheory.Kernel (α × β) γ)

(h : ¬ProbabilityTheory.IsSFiniteKernel η)


theorem mem_closed_iff (x : α) : x ∈ l.closed ↔ u (l x) = x

{α : Type u_1}
{β : Type u_4}
[Preorder α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)
(x : α)


@[simp]
theorem isWF_empty : IsWF (∅ : Set α)


theorem comap_eq (h : α ≃ᵤ β) : UniformSpace.comap h ‹_› = ‹_›

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


theorem efixedPoint_isFixedPt (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
    IsFixedPt f (efixedPoint f hf x hx)

{α : Type u_1}
[EMetricSpace α]
[cs : CompleteSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x : α}
(hx : edist x (f x) ≠ ⊤)

Function.IsFixedPt f (ContractingWith.efixedPoint f hf x hx)


/-- A natural transformation `R₁ ⟶ R₂` induces a functor `Comma L R₁ ⥤ Comma L R₂`. -/
@[simps]
def mapRight (r : R₁ ⟶ R₂) : Comma L R₁ ⥤ Comma L R₂

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(L : CategoryTheory.Functor A T)
{R₁ R₂ : CategoryTheory.Functor B T}
(r : R₁ ⟶ R₂)

∀ {X Y : CategoryTheory.Comma L R₁} (f : X ⟶ Y), ((CategoryTheory.Comma.mapRight L r).map f).right = f.right


theorem hasseDeriv_one' : hasseDeriv 1 f = derivative f

{R : Type u_1}
[Semiring R]
(f : Polynomial R)

(Polynomial.hasseDeriv 1) f = Polynomial.derivative f


@[to_additive]
theorem mulIndicator_eq_one_or_self (s : Set α) (f : α → M) (a : α) :
    mulIndicator s f a = 1 ∨ mulIndicator s f a = f a

{α : Type u_1}
{M : Type u_4}
[One M]
(s : Set α)
(f : α → M)
(a : α)

s.mulIndicator f a = 1 ∨ s.mulIndicator f a = f a


theorem toLinearMap_injective :
    Function.Injective (toLinearMap : _ → A →ₗ[R] B)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]


theorem mem_inverse_graph (x : f.domain) : (f x, (x : E)) ∈ (inverse f).graph

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{f : E →ₗ.[R] F}
(hf : LinearMap.ker f.toFun = ⊥)
(x : ↥f.domain)


theorem Asymptotics.isLittleO_pow_pow_atTop_of_lt [OrderTopology 𝕜] {p q : ℕ} (hpq : p < q) :
    (fun x : 𝕜 => x ^ p) =o[atTop] fun x => x ^ q

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
[OrderTopology 𝕜]
{p q : ℕ}
(hpq : p < q)

(fun x => x ^ p) =o[Filter.atTop] fun x => x ^ q


theorem ofList_subset {l₁ l₂ : List (Lists α)} (h : l₁ ⊆ l₂) :
    Lists'.ofList l₁ ⊆ Lists'.ofList l₂

{α : Type u_1}
{l₁ l₂ : List (Lists α)}
(h : l₁ ⊆ l₂)


theorem isWF_sup [Preorder α] (s : Finset ι) {f : ι → Set α} :
    (s.sup f).IsWF ↔ ∀ i ∈ s, (f i).IsWF

{ι : Type u_1}
{α : Type u_2}
[Preorder α]
(s : Finset ι)
{f : ι → Set α}


theorem count_span_normalizedFactors_eq_of_normUnit {r X : R}
    (hr : r ≠ 0) (hX₁ : normUnit X = 1) (hX : Prime X) :
      Multiset.count (Ideal.span {X} : Ideal R) (normalizedFactors (Ideal.span {r})) =
        Multiset.count X (normalizedFactors r)

{R : Type u_1}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
[DecidableEq R]
[DecidableEq (Ideal R)]
[NormalizationMonoid R]
[DecidableRel fun x x_1 => x ∣ x_1]
[DecidableRel fun x x_1 => x ∣ x_1]
{r X : R}
(hr : r ≠ 0)
(hX₁ : normUnit X = 1)
(hX : Prime X)

Multiset.count (Ideal.span {X}) (UniqueFactorizationMonoid.normalizedFactors (Ideal.span {r})) =
  Multiset.count X (UniqueFactorizationMonoid.normalizedFactors r)


@[simp]
theorem filterMap_cons_some (f : α → Option β) (a : α) (s : Multiset α) {b : β}
    (h : f a = some b) : filterMap f (a ::ₘ s) = b ::ₘ filterMap f s

{α : Type u_1}
{β : Type v}
(f : α → Option β)
(a : α)
(s : Multiset α)
{b : β}
(h : f a = some b)

Multiset.filterMap f (a ::ₘ s) = b ::ₘ Multiset.filterMap f s


@[simp]
theorem star_zsmul [AddGroup R] [StarAddMonoid R] (x : R) (n : ℤ) : star (n • x) = n • star x

{R : Type u}
[AddGroup R]
[StarAddMonoid R]
(x : R)
(n : ℤ)


theorem periodic_gcd (a : ℕ) : Periodic (gcd a) a


theorem lintegral_indicator_le (f : α → ℝ≥0∞) (s : Set α) :
    ∫⁻ a, s.indicator f a ∂μ ≤ ∫⁻ a in s, f a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ≥0∞)
(s : Set α)

∫⁻ (a : α), s.indicator f a ∂μ ≤ ∫⁻ (a : α) in s, f a ∂μ


@[simp]
theorem id_right (X : StructuredArrow S T) : (𝟙 X : X ⟶ X).right = 𝟙 X.right

(X : CategoryTheory.StructuredArrow S T)

(CategoryTheory.CategoryStruct.id X).right = CategoryTheory.CategoryStruct.id X.right


theorem StrictAnti.isMax_of_apply (hf : StrictAnti f) (ha : IsMin (f a)) : IsMax a

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{a : α}
(hf : StrictAnti f)
(ha : IsMin (f a))


theorem inv_eq_symplectic_inv (A : Matrix (l ⊕ l) (l ⊕ l) R) (hA : A ∈ symplecticGroup l R) :
    A⁻¹ = (-J l R) * Aᵀ * J l R

{l : Type u_1}
{R : Type u_2}
[DecidableEq l]
[Fintype l]
[CommRing R]
(A : Matrix (l ⊕ l) (l ⊕ l) R)
(hA : A ∈ Matrix.symplecticGroup l R)


theorem lt_lift_iff {a : Ordinal.{u}} {b : Ordinal.{max u v}} :
    b < lift.{v,u} a ↔ ∃ a', lift.{v,u} a' = b ∧ a' < a

b < Ordinal.lift.{v, u} a ↔ ∃ a', Ordinal.lift.{v, u} a' = b ∧ a' < a


/-- Reinterpret `G ≃+ Additive H` as `Multiplicative G ≃* H`. -/
@[simps]
def AddEquiv.toMultiplicative'' [AddZeroClass G] [MulOneClass H] :
    G ≃+ Additive H ≃ (Multiplicative G ≃* H)

{G : Type u_1}
{H : Type u_2}
[AddZeroClass G]
[MulOneClass H]
(f : Multiplicative G ≃* H)
(a : G)

(AddEquiv.toMultiplicative''.symm f) a = (AddMonoidHom.toMultiplicative''.symm f.toMonoidHom) a


/-- If a sequence `g` converges to some `b`, then the sequence of constant functions
`fun n ↦ fun a ↦ g n` converges to the constant function `fun a ↦ b` on any set `s` -/
theorem Filter.Tendsto.tendstoUniformlyOn_const {g : ι → β} {b : β} (hg : Tendsto g p (𝓝 b))
    (s : Set α) : TendstoUniformlyOn (fun n : ι => fun _ : α => g n) (fun _ : α => b) p s

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{p : Filter ι}
{g : ι → β}
{b : β}
(hg : Filter.Tendsto g p (𝓝 b))
(s : Set α)

TendstoUniformlyOn (fun n x => g n) (fun x => b) p s


/-- `TStructure C` is the type of t-structures on the (pre)triangulated category `C`. -/
structure TStructure where
  /-- the predicate of objects that are `≤ n` for `n : ℤ`. -/
  LE (n : ℤ) : C → Prop
  /-- the predicate of objects that are `≥ n` for `n : ℤ`. -/
  GE (n : ℤ) : C → Prop
  LE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (LE n) := by infer_instance
  GE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (GE n) := by infer_instance
  LE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : LE n X) : LE n' (X⟦a⟧)
  GE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : GE n X) : GE n' (X⟦a⟧)
  zero' ⦃X Y : C⦄ (f : X ⟶ Y) (hX : LE 0 X) (hY : GE 1 Y) : f = 0
  LE_zero_le : LE 0 ≤ LE 1
  GE_one_le : GE 1 ≤ GE 0
  exists_triangle_zero_one (A : C) : ∃ (X Y : C) (_ : LE 0 X) (_ : GE 1 Y)
    (f : X ⟶ A) (g : A ⟶ Y) (h : Y ⟶ X⟦(1 : ℤ)⟧), Triangle.mk f g h ∈ distTriang C

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

(self : CategoryTheory.Triangulated.TStructure C)


/-- See also `Nat.cast_nonneg`, specialised for an `OrderedSemiring`. -/
@[simp low]
theorem cast_nonneg' (n : ℕ) : 0 ≤ (n : α)

[CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1]


@[to_additive]
theorem copy_eq (f : α →*o β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(f : α →*o β)
(f' : α → β)
(h : f' = ⇑f)


@[to_additive]
theorem iUnion_smul_right_image : ⋃ a ∈ t, (· • a) '' s = s • t

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set α}
{t : Set β}

⋃ a ∈ t, (fun x => x +ᵥ a) '' s = s +ᵥ t


theorem const {n} : ∀ m, @Primrec' n fun _ => m


theorem lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α => infDist p.1 p.2

LipschitzWith 2 fun p => Metric.infDist p.1 ↑p.2


/-- A version of `Option.map` for `Function.Embedding`s. -/
@[simps (config := .asFn)]
def optionMap {α β} (f : α ↪ β) : Option α ↪ Option β

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)


/-- A ring satisfying `StrongRankCondition` (such as a `DivisionRing`) is one-dimensional as a
module over itself. -/
@[simp]
theorem FiniteDimensional.finrank_self : finrank R R = 1

(R : Type u)
[Ring R]
[StrongRankCondition R]


theorem mk_mul_mk [Add ι] [GMul A] {i j} (a : A i) (b : A j) :
    mk i a * mk j b = mk (i + j) (GMul.mul a b)

{ι : Type u_1}
(A : ι → Type u_2)
[Add ι]
[GradedMonoid.GMul A]
{i j : ι}
(a : A i)
(b : A j)

GradedMonoid.mk i a * GradedMonoid.mk j b = GradedMonoid.mk (i + j) (GradedMonoid.GMul.mul a b)


theorem le_inf {A : C} (h f g : Subobject A) : h ≤ f → h ≤ g → h ≤ (inf.obj f).obj g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A : C}
(h f g : CategoryTheory.Subobject A)

h ≤ f → h ≤ g → h ≤ (CategoryTheory.Subobject.inf.obj f).obj g


/-- Two points are coplanar. -/
theorem coplanar_pair (p₁ p₂ : P) : Coplanar k ({p₁, p₂} : Set P)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(p₁ p₂ : P)


theorem le_iff (hf : RightOrdContinuous f) (h : Injective f) {x y} : f x ≤ f y ↔ x ≤ y

{α : Type u}
{β : Type v}
[SemilatticeInf α]
[SemilatticeInf β]
{f : α → β}
(hf : RightOrdContinuous f)
(h : Function.Injective f)
{x y : α}


@[norm_cast]
theorem ofReal_inj {z w : ℝ} : (z : K) = (w : K) ↔ z = w


@[simp, mfld_simps]
theorem zeroSection_snd [∀ x, Zero (E x)] (x : B) : (zeroSection F E x).2 = 0

{B : Type u_2}
(F : Type u_3)
(E : B → Type u_4)
[(x : B) → Zero (E x)]
(x : B)


lemma toAffineLift_of_Z_eq_zero {P : Fin 3 → F} (hP : W.NonsingularLift ⟦P⟧) (hPz : P z = 0) :
    toAffineLift ⟨hP⟩ = 0

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.NonsingularLift ⟦P⟧)
(hPz : P z = 0)

(WeierstrassCurve.Jacobian.Point.mk hP).toAffineLift = 0


@[simp, fun_prop]
theorem differentiable_const (c : F) : Differentiable 𝕜 fun _ : E => c

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(c : F)


@[to_additive]
theorem hasProd_pi_single [DecidableEq β] (b : β) (a : α) : HasProd (Pi.mulSingle b a) a

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
[DecidableEq β]
(b : β)
(a : α)


@[simp]
theorem subtypeEquiv_refl {p : α → Prop} (h : ∀ a, p a ↔ p (Equiv.refl _ a) := fun a => Iff.rfl) :
    (Equiv.refl α).subtypeEquiv h = Equiv.refl { a : α // p a }

(h : ∀ (a : α), p a ↔ p ((Equiv.refl α) a) := ⋯)

(Equiv.refl α).subtypeEquiv h = Equiv.refl { a // p a }


theorem bind_map_comm {α β} {x : Option (Option α)} {f : α → β} :
    x.bind (Option.map f) = (x.map (Option.map f)).bind id

{α : Type u_1}
{β : Type u_2}
{x : Option (Option α)}
{f : α → β}

x.bind (Option.map f) = (Option.map (Option.map f) x).bind id


theorem setToSimpleFunc_congr' (T : Set α → E →L[ℝ] F) (h_add : FinMeasAdditive μ T) {f g : α →ₛ E}
    (hf : Integrable f μ) (hg : Integrable g μ)
    (h : Pairwise fun x y => T (f ⁻¹' {x} ∩ g ⁻¹' {y}) = 0) :
    f.setToSimpleFunc T = g.setToSimpleFunc T

(h_add : MeasureTheory.FinMeasAdditive μ T)

(h : Pairwise fun x y => T (↑f ⁻¹' {x} ∩ ↑g ⁻¹' {y}) = 0)

MeasureTheory.SimpleFunc.setToSimpleFunc T f = MeasureTheory.SimpleFunc.setToSimpleFunc T g


@[gcongr] protected theorem pow_lt_pow_left (h : a < b) {n : ℕ} (hn : n ≠ 0) :
    a ^ n < b ^ n


theorem finrank_mono [FiniteDimensional K V] : Monotone fun s : Submodule K V => finrank K s

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]

Monotone fun s => FiniteDimensional.finrank K ↥s


lemma conjBy_refl {α} [Preorder α] (c : ClosureOperator α) :
    c.conjBy (OrderIso.refl α) = c

{α : Type u_4}
[Preorder α]
(c : ClosureOperator α)


/-- For all natural numbers `n`, the pre-games `powHalf n` are numeric. -/
theorem numeric_powHalf (n) : (powHalf n).Numeric


theorem card_Ico_eq_card_Icc_sub_one (a b : α) : (Ico a b).card = (Icc a b).card - 1

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
(a b : α)

(Finset.Ico a b).card = (Finset.Icc a b).card - 1


theorem forall₂_or_left : (∀ x, p x ∨ q x → r x) ↔ (∀ x, p x → r x) ∧ ∀ x, q x → r x

(∀ (x : α), p x ∨ q x → r x) ↔ (∀ (x : α), p x → r x) ∧ ∀ (x : α), q x → r x


theorem pow_restrict {p : Submodule R M} (n : ℕ) (h : ∀ x ∈ p, f' x ∈ p)
    (h' := pow_apply_mem_of_forall_mem n h) :
    (f'.restrict h) ^ n = (f' ^ n).restrict h'

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f' : M →ₗ[R] M}
{p : Submodule R M}
(n : ℕ)
(h : ∀ x ∈ p, f' x ∈ p)
(h' : ∀ x ∈ p, (f' ^ n) x ∈ p := ⋯)

f'.restrict h ^ n = (f' ^ n).restrict h'


theorem eventually_nhds {x : X} (p : Y → Prop) (hx : x ∈ e.source) :
    (∀ᶠ y in 𝓝 (e x), p y) ↔ ∀ᶠ x in 𝓝 x, p (e x)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(p : Y → Prop)
(hx : x ∈ e.source)

(∀ᶠ (y : Y) in 𝓝 (↑e x), p y) ↔ ∀ᶠ (x : X) in 𝓝 x, p (↑e x)


theorem Nat.cast_eq_ofNat {n : ℕ} [NatCast R] [Nat.AtLeastTwo n] :
    (Nat.cast n : R) = OfNat.ofNat n

{R : Type u_1}
{n : ℕ}
[NatCast R]
[n.AtLeastTwo]


lemma piAntidiag_empty (n : μ) : piAntidiag (∅ : Finset ι) n = if n = 0 then {0} else ∅

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
(n : μ)

∅.piAntidiag n = if n = 0 then {0} else ∅


theorem inv_invApp (U : Opens X) :
    inv (H.invApp U) =
      f.c.app (op (opensFunctor f |>.obj U)) ≫
        X.presheaf.map (eqToHom (by simp [Opens.map, Set.preimage_image_eq _ H.base_open.inj]))

{X Y : AlgebraicGeometry.SheafedSpace C}

[H : AlgebraicGeometry.SheafedSpace.IsOpenImmersion f]

(U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace)

CategoryTheory.inv (AlgebraicGeometry.SheafedSpace.IsOpenImmersion.invApp f U) =
  f.c.app (Opposite.op ((AlgebraicGeometry.SheafedSpace.IsOpenImmersion.opensFunctor f).obj U)) ≫
    X.presheaf.map (CategoryTheory.eqToHom ⋯)


theorem star_subset_chunk : star hP G ε hU V ⊆ (chunk hP G ε hU).parts

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{P : Finpartition Finset.univ}
{hP : P.IsEquipartition}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : ℝ}
{U : Finset α}
{hU : U ∈ P.parts}
{V : Finset α}

SzemerediRegularity.star hP G ε hU V ⊆ (SzemerediRegularity.chunk hP G ε hU).parts


@[simp]
theorem nonempty_toSet_iff {u : PSet} : u.toSet.Nonempty ↔ u.Nonempty


@[simp]
theorem mk_smul_mulActionHom_apply (c : M) (f : α →[N] β) (a : α) : (mk c • f) a = f (c • a)

{M : Type u_1}
{α : Type u_2}
{N : Type u_3}
{β : Type u_4}
[SMul M α]
[SMul N α]
[SMulCommClass M N α]
[SMul N β]
(c : M)
(f : α →ₑ[id] β)
(a : α)


theorem setOf_inter_eq_sep (p : α → Prop) (s : Set α) : {a | p a} ∩ s = {a ∈ s | p a}


theorem GoodProducts.union : range C = ⋃ (e : {o' // o' < o}), (smaller C e.val)

(hsC : Profinite.NobelingProof.contained C o)

Profinite.NobelingProof.GoodProducts.range C = ⋃ e, Profinite.NobelingProof.GoodProducts.smaller C ↑e


/-- `AList β` is a key-value map stored as a `List` (i.e. a linked list).
  It is a wrapper around certain `List` functions with the added constraint
  that the list have unique keys. -/
structure AList (β : α → Type v) : Type max u v where
  /-- The underlying `List` of an `AList` -/
  entries : List (Sigma β)
  /-- There are no duplicate keys in `entries` -/
  nodupKeys : entries.NodupKeys

{α : Type u}
{β : α → Type v}
(self : AList β)


/-- A minimal polynomial is monic. -/
theorem monic (hx : IsIntegral A x) : Monic (minpoly A x)

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[Ring B]
[Algebra A B]
{x : B}
(hx : IsIntegral A x)


/-- See note [partially-applied ext lemmas]. -/
@[ext high]
protected theorem ext (g h : FreeAbelianGroup α →+ β) (H : ∀ x, g (of x) = h (of x)) : g = h

(H : ∀ (x : α), g (FreeAbelianGroup.of x) = h (FreeAbelianGroup.of x))


theorem volume_measurePreserving_sumPiEquivProdPi_symm (π : ι ⊕ ι' → Type*)
    [∀ i, MeasureSpace (π i)] [∀ i, SigmaFinite (volume : Measure (π i))] :
    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm volume volume

[(i : ι ⊕ ι') → MeasureTheory.MeasureSpace (π i)]

[∀ (i : ι ⊕ ι'), MeasureTheory.SigmaFinite MeasureTheory.volume]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.sumPiEquivProdPi π).symm) MeasureTheory.volume MeasureTheory.volume


theorem summable_of_absolute_convergence_real {f : ℕ → ℝ} :
    (∃ r, Tendsto (fun n ↦ ∑ i ∈ range n, |f i|) atTop (𝓝 r)) → Summable f

(∃ r, Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, |f i|) Filter.atTop (𝓝 r)) → Summable f


@[to_additive (attr := simp)]
lemma inv_right_iff : Commute a b⁻¹ ↔ Commute a b


theorem cauchySeq_finset_of_summable_norm {f : ι → E} (hf : Summable fun a => ‖f a‖) :
    CauchySeq fun s : Finset ι => ∑ a ∈ s, f a

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
{f : ι → E}
(hf : Summable fun a => ‖f a‖)


/-- Multiplicative congruence relations preserve product indexed by a multiset. -/
@[to_additive "Additive congruence relations preserve sum indexed by a multiset."]
protected theorem multiset_prod {ι M : Type*} [CommMonoid M] (c : Con M) {s : Multiset ι}
    {f g : ι → M} (h : ∀ x ∈ s, c (f x) (g x)) :
    c (s.map f).prod (s.map g).prod

{ι : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
(c : AddCon M)
{s : Multiset ι}
{f g : ι → M}
(h : ∀ x ∈ s, c (f x) (g x))

c (Multiset.map f s).sum (Multiset.map g s).sum


/-- Add extra prefix to context-free deriving. -/
lemma Derives.append_right {v w : List (Symbol T g.NT)}
    (hvw : g.Derives v w) (p : List (Symbol T g.NT)) :
    g.Derives (v ++ p) (w ++ p)

{T : Type uT}
{g : ContextFreeGrammar T}
{v w : List (Symbol T g.NT)}
(hvw : g.Derives v w)
(p : List (Symbol T g.NT))


theorem dimH_of_hausdorffMeasure_ne_zero_ne_top {d : ℝ≥0} {s : Set X} (h : μH[d] s ≠ 0)
    (h' : μH[d] s ≠ ∞) : dimH s = d

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{d : ℝ≥0}
{s : Set X}
(h : μH[↑d] s ≠ 0)
(h' : μH[↑d] s ≠ ⊤)


@[reassoc]
theorem Fork.app_one_eq_ι_comp_right (s : Fork f g) : s.π.app one = s.ι ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f g : X ⟶ Y}
(s : CategoryTheory.Limits.Fork f g)

s.π.app CategoryTheory.Limits.WalkingParallelPair.one = CategoryTheory.CategoryStruct.comp s.ι g


theorem summable_geometric_two_encode {ι : Type*} [Encodable ι] :
    Summable fun i : ι ↦ (1 / 2 : ℝ) ^ Encodable.encode i

Summable fun i => (1 / 2) ^ Encodable.encode i


theorem Convex.linear_image (hs : Convex 𝕜 s) (f : E →ₗ[𝕜] F) : Convex 𝕜 (f '' s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
{s : Set E}
(hs : Convex 𝕜 s)
(f : E →ₗ[𝕜] F)


@[deprecated subset_subalgebra (since := "2024-07-19")]
theorem subset_starSubalgebra [StarRing R] [StarRing A] [StarModule R A] {S : StarSubalgebra R A}
    (a : S) : spectrum R (a : A) ⊆ spectrum R a

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
[StarRing R]
[StarRing A]
[StarModule R A]
{S : StarSubalgebra R A}
(a : ↥S)


theorem lt_xor_cases {a b c : ℕ} (h : a < b ^^^ c) : a ^^^ c < b ∨ a ^^^ b < c


lemma dist_mono_right_pi : MonotoneOn (dist x) (Ici x)


lemma isLocallyInjective_whisker_iff (hH : CoverPreserving J K H) [H.IsCocontinuous J K]
    [H.IsCoverDense K] : IsLocallyInjective J (whiskerLeft H.op f) ↔ IsLocallyInjective K f

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

(hH : CategoryTheory.CoverPreserving J K H)

CategoryTheory.Presheaf.IsLocallyInjective J (CategoryTheory.whiskerLeft H.op f) ↔
  CategoryTheory.Presheaf.IsLocallyInjective K f


/-- The product of `X` with an initial object in a category with strict initial objects is itself
initial.
This is the generalisation of the fact that `Empty × X ≃ Empty` for types (or `0 * n = 0`).
-/
@[simps! hom]
noncomputable def initialMul (X : C) [HasBinaryProduct (⊥_ C) X] : (⊥_ C) ⨯ X ≅ ⊥_ C

[CategoryTheory.Limits.HasBinaryProduct (⊥_ C) X]

(CategoryTheory.Limits.initialMul X).hom = CategoryTheory.Limits.prod.fst


theorem restrict_withDensity {s : Set α} (hs : MeasurableSet s) (f : α → ℝ≥0∞) :
    (μ.withDensity f).restrict s = (μ.restrict s).withDensity f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
(f : α → ℝ≥0∞)


@[to_additive]
lemma units_surjective : Function.Surjective (units (M := M))


lemma toEnd_pow_comp_lieHom :
    (toEnd R L M₂ x ^ k) ∘ₗ f = f ∘ₗ toEnd R L M x ^ k

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{M₂ : Type w₁}
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
(f : M →ₗ⁅R,L⁆ M₂)
(k : ℕ)
(x : L)

((LieModule.toEnd R L M₂) x ^ k) ∘ₗ ↑f = ↑f ∘ₗ (LieModule.toEnd R L M) x ^ k


/-- An element of `k[G]` is in the subalgebra generated by its support, using
unbundled inclusion. -/
theorem mem_span_support' (f : k[G]) :
    f ∈ Submodule.span k (of' k G '' (f.support : Set G))

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(f : AddMonoidAlgebra k G)

f ∈ Submodule.span k (AddMonoidAlgebra.of' k G '' ↑f.support)


theorem isEquiv_iff_valuationSubring :
    v₁.IsEquiv v₂ ↔ v₁.valuationSubring = v₂.valuationSubring

{K : Type u}
[Field K]
{Γ₁ : Type u_2}
{Γ₂ : Type u_3}
[LinearOrderedCommGroupWithZero Γ₁]
[LinearOrderedCommGroupWithZero Γ₂]
(v₁ : Valuation K Γ₁)
(v₂ : Valuation K Γ₂)


theorem powerset_coe (l : List α) : @powerset α l = ((sublists l).map (↑) : List (Multiset α))

(↑l).powerset = ↑(List.map Multiset.ofList l.sublists)


theorem le_chainHeight_iff {n : ℕ} : ↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, length l = n

{α : Type u_1}
[LT α]
{s : Set α}
{n : ℕ}

↑n ≤ s.chainHeight ↔ ∃ l ∈ s.subchain, l.length = n


protected theorem continuous (h : α ≃ᵢ β) : Continuous h

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)


@[simp] lemma cons_sub (x : α) (v : Fin n → α) (w : Fin n.succ → α) :
    vecCons x v - w = vecCons (x - vecHead w) (v - vecTail w)

{α : Type u_1}
{n : ℕ}
[Sub α]
(x : α)
(v : Fin n → α)
(w : Fin n.succ → α)

Matrix.vecCons x v - w = Matrix.vecCons (x - Matrix.vecHead w) (v - Matrix.vecTail w)


theorem _root_.Filter.Eventually.isBigO {f : α → E} {g : α → ℝ} {l : Filter α}
    (hfg : ∀ᶠ x in l, ‖f x‖ ≤ g x) : f =O[l] g

{α : Type u_1}
{E : Type u_3}
[Norm E]
{f : α → E}
{g : α → ℝ}
{l : Filter α}
(hfg : ∀ᶠ (x : α) in l, ‖f x‖ ≤ g x)


theorem ofLists_moveLeft {L R : List PGame} (i : Fin L.length) :
    (ofLists L R).moveLeft (toOfListsLeftMoves i) = L.get i

{L R : List SetTheory.PGame}
(i : Fin L.length)

(SetTheory.PGame.ofLists L R).moveLeft (SetTheory.PGame.toOfListsLeftMoves i) = L.get i


@[reassoc (attr := simp)]
theorem whiskerRight_naturality_naturality {f g : a ⟶ b} (β : f ⟶ g) (h : G.obj b ⟶ a') :
    F.map₂ β ▷ η.app b ▷ h ≫ η.naturality g ▷ h =
      η.naturality f ▷ h ≫ (α_ _ _ _).hom ≫ η.app a ◁ G.map₂ β ▷ h ≫ (α_ _ _ _).inv

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
(η : CategoryTheory.OplaxNatTrans F G)
{a b : B}
{a' : C}
{f g : a ⟶ b}
(β : f ⟶ g)
(h : G.obj b ⟶ a')

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.whiskerRight (F.map₂ β) (η.app b)) h)
    (CategoryTheory.Bicategory.whiskerRight (η.naturality g) h) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (η.naturality f) h)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (η.app a) (G.map f) h).hom
      (CategoryTheory.CategoryStruct.comp
        (CategoryTheory.Bicategory.whiskerLeft (η.app a) (CategoryTheory.Bicategory.whiskerRight (G.map₂ β) h))
        (CategoryTheory.Bicategory.associator (η.app a) (G.map g) h).inv))


theorem support_sum_eq_biUnion {α : Type*} {ι : Type*} {M : Type*} [DecidableEq α]
    [AddCommMonoid M] {g : ι → α →₀ M} (s : Finset ι)
    (h : ∀ i₁ i₂, i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support) :
    (∑ i ∈ s, g i).support = s.biUnion fun i => (g i).support

{g : ι → α →₀ M}

(h : ∀ (i₁ i₂ : ι), i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support)


/-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β)

{α : Type u}
{β : Type v}
[AddSemigroup β]
(f : AddHom (FreeAddSemigroup α) β)

∀ (a : α), FreeAddSemigroup.lift.symm f a = (⇑f ∘ FreeAddSemigroup.of) a


/-- The Lax functor associated with a pseudofunctor. -/
@[simps]
def toLax : LaxFunctor B C

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.Pseudofunctor B C)
(a : B)


@[simp]
lemma opcyclesMap_comp [HasRightHomology S₁] [HasRightHomology S₂] [HasRightHomology S₃]
    (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃) :
    opcyclesMap (φ₁ ≫ φ₂) = opcyclesMap φ₁ ≫ opcyclesMap φ₂

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

(φ₁ : S₁ ⟶ S₂)

(φ₂ : S₂ ⟶ S₃)

CategoryTheory.ShortComplex.opcyclesMap (CategoryTheory.CategoryStruct.comp φ₁ φ₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.opcyclesMap φ₁)
    (CategoryTheory.ShortComplex.opcyclesMap φ₂)


theorem congr_mul (f₁ f₂ : M ≃ₗ[A] M) (g₁ g₂ : N ≃ₗ[R] N) :
    congr (f₁ * f₂) (g₁ * g₂) = congr f₁ g₁ * congr f₂ g₂

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
(f₁ f₂ : M ≃ₗ[A] M)
(g₁ g₂ : N ≃ₗ[R] N)

TensorProduct.AlgebraTensorModule.congr (f₁ * f₂) (g₁ * g₂) =
  TensorProduct.AlgebraTensorModule.congr f₁ g₁ * TensorProduct.AlgebraTensorModule.congr f₂ g₂


theorem monotone_proj (f : Fin n → α) : Monotone (graph.proj : graph f → α)

{n : ℕ}
{α : Type u_1}
[LinearOrder α]
(f : Fin n → α)


/-- The closure of the interval `(-∞, a)` is the interval `(-∞, a]`. -/
@[simp]
theorem closure_Iio (a : α) [NoMinOrder α] : closure (Iio a) = Iic a

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
(a : α)
[NoMinOrder α]


@[simp]
theorem coe_toZModLinearMap (f : M →+ M₁) : ⇑(f.toZModLinearMap n) = f

(n : ℕ)
{M : Type u_1}
{M₁ : Type u_2}
[AddCommGroup M]
[AddCommGroup M₁]
[Module (ZMod n) M]
[Module (ZMod n) M₁]
(f : M →+ M₁)

⇑(AddMonoidHom.toZModLinearMap n f) = ⇑f


theorem trivial_covering : S ∈ trivial C X ↔ S = ⊤

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : C}
{S : CategoryTheory.Sieve X}

S ∈ (CategoryTheory.GrothendieckTopology.trivial C).sieves X ↔ S = ⊤


/-- In a nonempty graph, if `k` is at most the degree of every vertex, it is at most the minimum
degree. Note the assumption that the graph is nonempty is necessary as long as `G.minDegree` is
defined to be a natural. -/
theorem le_minDegree_of_forall_le_degree [DecidableRel G.Adj] [Nonempty V] (k : ℕ)
    (h : ∀ v, k ≤ G.degree v) : k ≤ G.minDegree

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
[Nonempty V]
(k : ℕ)
(h : ∀ (v : V), k ≤ G.degree v)


/--The family of canonical injection maps, with `i` left implicit.-/
irreducible_def of {i : I} : A i →ₐ[R] FreeProduct R A

{I : Type u_1}
[DecidableEq I]
(R : Type u_2)
[CommSemiring R]
(A : I → Type u_3)
[(i : I) → Semiring (A i)]
[(i : I) → Algebra R (A i)]
{i : I}

LinearAlgebra.FreeProduct.of R A = LinearAlgebra.FreeProduct.ι R A i


/-- If a set `s` is separable, then the corresponding subtype is separable in a (pseudo extended)
metric space.  This is not obvious, as the countable set whose closure covers `s` does not need in
general to be contained in `s`. -/
theorem _root_.TopologicalSpace.IsSeparable.separableSpace {s : Set α} (hs : IsSeparable s) :
    SeparableSpace s

{α : Type u}
[PseudoEMetricSpace α]
{s : Set α}
(hs : TopologicalSpace.IsSeparable s)


/-- A weighted sum may be split into such sums over two subsets. -/
theorem weightedVSub_sdiff [DecidableEq ι] {s₂ : Finset ι} (h : s₂ ⊆ s) (w : ι → k) (p : ι → P) :
    (s \ s₂).weightedVSub p w + s₂.weightedVSub p w = s.weightedVSub p w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
[DecidableEq ι]
{s₂ : Finset ι}
(h : s₂ ⊆ s)
(w : ι → k)
(p : ι → P)

((s \ s₂).weightedVSub p) w + (s₂.weightedVSub p) w = (s.weightedVSub p) w


protected theorem zero_mul : (0 : MvPowerSeries σ R) * φ = 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(φ : MvPowerSeries σ R)


/-- Auxilary lemma showing that for any `k : ℤ` and `(a : Fin 2 → ℤ)`
the extension of `eisSummand` is differentiable on `{z : ℂ | 0 < z.im}`.-/
lemma eisSummand_extension_differentiableOn (k : ℤ) (a : Fin 2 → ℤ) :
    DifferentiableOn ℂ (↑ₕeisSummand k a) {z : ℂ | 0 < z.im}

DifferentiableOn ℂ (EisensteinSeries.eisSummand k a ∘ ↑UpperHalfPlane.ofComplex) {z | 0 < z.im}


@[to_additive] lemma mabs_div_comm (a b : α) : |a / b|ₘ = |b / a|ₘ

{α : Type u_1}
[Lattice α]
[AddGroup α]
(a b : α)


@[to_additive (attr := simp)]
theorem mulIndicator_univ (f : α → M) : mulIndicator (univ : Set α) f = f

{α : Type u_1}
{M : Type u_4}
[Zero M]
(f : α → M)


/-- A nonempty affine subspace is `⊤` if and only if its direction is `⊤`. -/
@[simp]
theorem direction_eq_top_iff_of_nonempty {s : AffineSubspace k P} (h : (s : Set P).Nonempty) :
    s.direction = ⊤ ↔ s = ⊤

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s : AffineSubspace k P}
(h : (↑s).Nonempty)


/-- Constructor for isomorphisms in `ComposableArrows C 0`. -/
@[simps!]
def isoMk₀ {F G : ComposableArrows C 0} (e : F.obj' 0 ≅ G.obj' 0) : F ≅ G

{F G : CategoryTheory.ComposableArrows C 0}

(CategoryTheory.ComposableArrows.isoMk₀ e).hom.app i =
  match i with
  | ⟨0, isLt⟩ => e.hom


/-- A pullback cone on `f` and `g` is determined by morphisms `fst : W ⟶ X` and `snd : W ⟶ Y`
    such that `fst ≫ f = snd ≫ g`. -/
@[simps]
def mk {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) : PullbackCone f g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Z}
{g : Y ⟶ Z}
{W : C}
(fst : W ⟶ X)
(snd : W ⟶ Y)
(eq : fst ≫ f = snd ≫ g)

(CategoryTheory.Limits.PullbackCone.mk fst snd eq).pt = W


protected theorem QuotientMap.isClopen_preimage {f : X → Y} (hf : QuotientMap f) {s : Set Y} :
    IsClopen (f ⁻¹' s) ↔ IsClopen s

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : QuotientMap f)
{s : Set Y}


@[simp]
theorem lineMap_apply_zero (p₀ p₁ : P1) : lineMap p₀ p₁ (0 : k) = p₀

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
(p₀ p₁ : P1)


@[simp] protected theorem not_le {a b : Nat} : ¬ a ≤ b ↔ b < a


@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1⁻¹ * x.2 ∈ U i }

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Sort u_3}
{p : ι → Prop}
{U : ι → Set α}
(h : (𝓝 0).HasBasis p U)

(𝓤 α).HasBasis p fun i => {x | -x.1 + x.2 ∈ U i}


@[simp]
theorem bipointedToPointedFst_comp_forget :
    bipointedToPointedFst ⋙ forget Pointed = forget Bipointed

bipointedToPointedFst ⋙ CategoryTheory.forget Pointed = CategoryTheory.forget Bipointed


protected theorem Filter.Tendsto.max_left {l : Filter β} {a : α} (h : Tendsto f l (𝓝 a)) :
    Tendsto (fun i => max (f i) a) l (𝓝 a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f : β → α}
{l : Filter β}
{a : α}
(h : Filter.Tendsto f l (𝓝 a))

Filter.Tendsto (fun i => max (f i) a) l (𝓝 a)


/--
If there exists a set `{ r }` of `R` such that `Mᵣ` is `Rᵣ`-finite for each `r`,
then `M` is a finite `R`-module.

General version for any modules `Mᵣ` and rings `Rᵣ` satisfying the correct universal properties.
See `Module.Finite.of_localizationSpan_finite` for the specialized version.
-/
theorem of_localizationSpan' (t : Set R) (ht : Ideal.span t = ⊤)
    {Mₚ : ∀ (_ : t), Type*} [∀ (g : t), AddCommMonoid (Mₚ g)] [∀ (g : t), Module R (Mₚ g)]
    {Rₚ : ∀ (_ : t), Type u} [∀ (g : t), CommRing (Rₚ g)] [∀ (g : t), Algebra R (Rₚ g)]
    [h₁ : ∀ (g : t), IsLocalization.Away g.val (Rₚ g)]
    [∀ (g : t), Module (Rₚ g) (Mₚ g)] [∀ (g : t), IsScalarTower R (Rₚ g) (Mₚ g)]
    (f : ∀ (g : t), M →ₗ[R] Mₚ g) [h₂ : ∀ (g : t), IsLocalizedModule (Submonoid.powers g.val) (f g)]
    (H : ∀ (g : t), Module.Finite (Rₚ g) (Mₚ g)) :
    Module.Finite R M

[h₁ : ∀ (g : ↑t), IsLocalization.Away (↑g) (Rₚ g)]

[∀ (g : ↑t), IsScalarTower R (Rₚ g) (Mₚ g)]

[h₂ : ∀ (g : ↑t), IsLocalizedModule (Submonoid.powers ↑g) (f g)]

(H : ∀ (g : ↑t), Module.Finite (Rₚ g) (Mₚ g))


/-- Sufficient condition for `map` to preserve an `All` quantifier. -/
protected theorem All.map {f : α → β} (H : ∀ {x}, p x → q (f x)) :
    ∀ {t : RBNode α}, t.All p → (t.map f).All q

{α : Type u_1}
{β : Type u_2}
{p : α → Prop}
{q : β → Prop}
{f : α → β}
(H : ∀ {x : α}, p x → q (f x))
{t : Batteries.RBNode α}

Batteries.RBNode.All p t → Batteries.RBNode.All q (Batteries.RBNode.map f t)


lemma smul_lt_of_lt_one_left [SMulPosStrictMono α β] (hb : 0 < b) (h : a < 1) : a • b < b

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Monoid α]
[Zero β]
[MulAction α β]
[Preorder α]
[Preorder β]
[SMulPosStrictMono α β]
(hb : 0 < b)
(h : a < 1)


theorem Antitone.map_sSup_le [CompleteLattice β] {s : Set α} {f : α → β} (hf : Antitone f) :
    f (sSup s) ≤ ⨅ a ∈ s, f a

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
[CompleteLattice β]
{s : Set α}
{f : α → β}
(hf : Antitone f)


protected theorem pos_of_mul_pos_left {a b : Nat} (h : 0 < a * b) : 0 < b


theorem mem_carrier {s : NonUnitalSubalgebra R A} {x : A} : x ∈ s.carrier ↔ x ∈ s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
{s : NonUnitalSubalgebra R A}
{x : A}


@[nontriviality]
theorem of_subsingleton [Subsingleton M] (x y : M) : SameRay R x y

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
[Subsingleton M]
(x y : M)


/-- The value from `WellFoundedGT.fix` is built from the successive ones as specified. -/
theorem fix_eq {C : α → Sort*} (F : ∀ x : α, (∀ y : α, x < y → C y) → C x) :
    ∀ x, fix F x = F x fun y _ => fix F y

(F : (x : α) → ((y : α) → x < y → C y) → C x)

WellFoundedGT.fix F x = F x fun y x => WellFoundedGT.fix F y


theorem exists_simple_subobject {X : C} [ArtinianObject X] (h : ¬IsZero X) :
    ∃ Y : Subobject X, Simple (Y : C)

∃ Y, CategoryTheory.Simple (CategoryTheory.Subobject.underlying.obj Y)


@[simp]
theorem div_pow_le (ha : 0 ≤ a) (hb : 1 ≤ b) (k : ℕ) : a / b ^ k ≤ a

{α : Type u_1}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 ≤ a)
(hb : 1 ≤ b)
(k : ℕ)


protected theorem sub_right (c : α) (h : a ≡ b [PMOD p]) : a - c ≡ b - c [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b : α}
(c : α)
(h : a ≡ b [PMOD p])


@[to_additive (attr := simp)]
theorem mul_right_eq_self : a * b = a ↔ b = 1

{M : Type u}
[LeftCancelMonoid M]
{a b : M}


theorem card_le_of_surjective [RankCondition R] {α β : Type*} [Fintype α] [Fintype β]
    (f : (α → R) →ₗ[R] β → R) (i : Surjective f) : Fintype.card β ≤ Fintype.card α

(R : Type u)
[Semiring R]
[RankCondition R]
{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(f : (α → R) →ₗ[R] β → R)
(i : Function.Surjective ⇑f)


@[simp]
theorem sup_toFinset {α β} [DecidableEq β] (s : Finset α) (f : α → Multiset β) :
    (s.sup f).toFinset = s.sup fun x => (f x).toFinset

{α : Type u_7}
{β : Type u_8}
[DecidableEq β]
(s : Finset α)
(f : α → Multiset β)


protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Involutive (preimage f)

{α : Type u_1}
{f : α → α}
(hf : Function.Involutive f)


theorem frequently_atBot' [SemilatticeInf α] [Nonempty α] [NoMinOrder α] {p : α → Prop} :
    (∃ᶠ x in atBot, p x) ↔ ∀ a, ∃ b < a, p b

{α : Type u_3}
[SemilatticeInf α]
[Nonempty α]
[NoMinOrder α]
{p : α → Prop}

(∃ᶠ (x : α) in Filter.atBot, p x) ↔ ∀ (a : α), ∃ b < a, p b


theorem add_pos {f g : CauSeq α abs} : Pos f → Pos g → Pos (f + g)

{α : Type u_1}
[LinearOrderedField α]
{f g : CauSeq α abs}


theorem map_measurableSpace_eq_borel [SecondCountableTopology Y] {f : X → Y} (hf : Measurable f)
    (hsurj : Surjective f) : MeasurableSpace.map f ‹MeasurableSpace X› = borel Y

{X : Type u_3}
{Y : Type u_4}
[MeasurableSpace X]
[StandardBorelSpace X]
[TopologicalSpace Y]
[T0Space Y]
[MeasurableSpace Y]
[OpensMeasurableSpace Y]
[SecondCountableTopology Y]
{f : X → Y}
(hf : Measurable f)
(hsurj : Function.Surjective f)


@[to_additive (attr := simp)]
theorem mker_one : mker (1 : M →* N) = ⊤

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]


theorem contMDiff_id : ContMDiff I I n (id : M → M)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{n : ℕ∞}


/-- Pythagorean theorem, subtracting vectors, if-and-only-if vector
inner product form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero (x y : F) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ ⟪x, y⟫_ℝ = 0

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)


@[simp]
theorem count_filter_of_pos {p} [DecidablePred p] {a} {s : Multiset α} (h : p a) :
    count a (filter p s) = count a s

{α : Type u_1}
[DecidableEq α]
{p : α → Prop}
[DecidablePred p]
{a : α}
{s : Multiset α}
(h : p a)

Multiset.count a (Multiset.filter p s) = Multiset.count a s


@[to_additive (attr := simp)]
theorem centralizer_univ : centralizer Set.univ = center M

Submonoid.centralizer Set.univ = Submonoid.center M


/-- Every finite subset of an algebraically independent set is algebraically independent. -/
theorem algebraicIndependent_finset_map_embedding_subtype (s : Set A)
    (li : AlgebraicIndependent R ((↑) : s → A)) (t : Finset s) :
    AlgebraicIndependent R ((↑) : Finset.map (Embedding.subtype s) t → A)

(li : AlgebraicIndependent R Subtype.val)


@[simp]
theorem LinearEquiv.coe_isometryOfInner (f : E ≃ₗ[𝕜] E') (h) : ⇑(f.isometryOfInner h) = f

(h : ∀ (x y : E), ⟪f x, f y⟫_𝕜 = ⟪x, y⟫_𝕜)


@[simp]
theorem iterate_derivative_C_mul (a : R) (p : R[X]) (k : ℕ) :
    derivative^[k] (C a * p) = C a * derivative^[k] p

{R : Type u}
[Semiring R]
(a : R)
(p : R[X])
(k : ℕ)

(⇑Polynomial.derivative)^[k] (Polynomial.C a * p) = Polynomial.C a * (⇑Polynomial.derivative)^[k] p


@[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x)

{α : Type u}
{β : Type v}
(f : α → β)
(x : α)

(FreeAddSemigroup.map f) (FreeAddSemigroup.of x) = FreeAddSemigroup.of (f x)


theorem lex_lt_of_lt_of_preorder [Preorder N] (r) [IsStrictOrder α r] {x y : α →₀ N} (hlt : x < y) :
    ∃ i, (∀ j, r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i

{α : Type u_1}
{N : Type u_2}
[Zero N]
[Preorder N]
(r : α → α → Prop)
[IsStrictOrder α r]
{x y : α →₀ N}
(hlt : x < y)

∃ i, (∀ (j : α), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i


theorem IsNormal.sup {f : Ordinal.{max u v} → Ordinal.{max u w}} (H : IsNormal f) {ι : Type u}
    (g : ι → Ordinal.{max u v}) [Nonempty ι] : f (sup.{_, v} g) = sup.{_, w} (f ∘ g)


/-- A continuous image of a Lindelöf set is a Lindelöf set. -/
theorem IsLindelof.image_of_continuousOn {f : X → Y} (hs : IsLindelof s) (hf : ContinuousOn f s) :
    IsLindelof (f '' s)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{f : X → Y}
(hs : IsLindelof s)
(hf : ContinuousOn f s)


lemma exact_iff_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) :
    S₁.Exact ↔ S₂.Exact

{S₁ S₂ : CategoryTheory.ComposableArrows C n}


lemma Even.sub_odd (h : n ≤ m) (hm : Even m) (hn : Odd n) : Odd (m - n)

{m n : ℕ}
(h : n ≤ m)
(hm : Even m)
(hn : Odd n)


@[simp]
theorem map_tmul (f : A →ₐ[S] B) (g : C →ₐ[R] D) (a : A) (c : C) : map f g (a ⊗ₜ c) = f a ⊗ₜ g c

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
[Semiring C]
[Algebra R C]
[Semiring D]
[Algebra R D]
(f : A →ₐ[S] B)
(g : C →ₐ[R] D)
(a : A)
(c : C)

(Algebra.TensorProduct.map f g) (a ⊗ₜ[R] c) = f a ⊗ₜ[R] g c


@[to_additive (attr := simp, norm_cast)]
protected theorem val_smul (r : R) (x : s) : (↑(r • x) : M) = r • (x : M)

{S : Type u'}
{R : Type u}
{M : Type v}
[SMul R M]
[SetLike S M]
[hS : SMulMemClass S R M]
(s : S)
(r : R)
(x : ↥s)


lemma CstarRing.mul_star_le_algebraMap_norm_sq {a : A} : a * star a ≤ algebraMap ℝ A (‖a‖ ^ 2)

{A : Type u_1}
[NormedRing A]
[StarRing A]
[CstarRing A]
[CompleteSpace A]
[NormedAlgebra ℂ A]
[StarModule ℂ A]
[PartialOrder A]
[StarOrderedRing A]
{a : A}


/--
Reduction to `p` prime: When proving any statement `P` about mixed characteristic rings we
can always assume that `p` is prime.
-/
theorem reduce_to_p_prime {P : Prop} :
    (∀ p > 0, MixedCharZero R p → P) ↔ ∀ p : ℕ, p.Prime → MixedCharZero R p → P

(∀ p > 0, MixedCharZero R p → P) ↔ ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P


@[simp] theorem foldr_self_append (l : List α) : l.foldr cons l' = l ++ l'

{α : Type u_1}
{l' : List α}
(l : List α)


/-- **Lucas's Theorem**: For primes `p`, `choose n k` is congruent to the product of
`choose (⌊n / p ^ i⌋ % p) (⌊k / p ^ i⌋ % p)` over `i` modulo `p`. -/
theorem choose_modEq_prod_range_choose_nat {a : ℕ} (ha₁ : n < p ^ a) (ha₂ : k < p ^ a) :
    choose n k ≡ ∏ i in range a, choose (n / p ^ i % p) (k / p ^ i % p) [MOD p]

{n k p : ℕ}
[Fact (Nat.Prime p)]
{a : ℕ}
(ha₁ : n < p ^ a)
(ha₂ : k < p ^ a)

n.choose k ≡ ∏ i ∈ Finset.range a, (n / p ^ i % p).choose (k / p ^ i % p) [MOD p]


@[simp]
theorem fromBlocks_apply₁₁ (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) (i : n) (j : l) : fromBlocks A B C D (Sum.inl i) (Sum.inl j) = A i j

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)
(i : n)
(j : l)

Matrix.fromBlocks A B C D (Sum.inl i) (Sum.inl j) = A i j


theorem getElem?_zipWith_eq_some (f : α → β → γ) (l₁ : List α) (l₂ : List β) (z : γ) (i : ℕ) :
    (zipWith f l₁ l₂)[i]? = some z ↔
      ∃ x y, l₁[i]? = some x ∧ l₂[i]? = some y ∧ f x y = z

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → β → γ)
(l₁ : List α)
(l₂ : List β)
(z : γ)
(i : ℕ)

(List.zipWith f l₁ l₂)[i]? = some z ↔ ∃ x y, l₁[i]? = some x ∧ l₂[i]? = some y ∧ f x y = z


theorem superpolynomialDecay_iff_abs_tendsto_zero :
    SuperpolynomialDecay l k f ↔ ∀ n : ℕ, Tendsto (fun a : α => |k a ^ n * f a|) l (𝓝 0)

{α : Type u_1}
{β : Type u_2}
(l : Filter α)
(k f : α → β)
[TopologicalSpace β]
[LinearOrderedCommRing β]
[OrderTopology β]

Asymptotics.SuperpolynomialDecay l k f ↔ ∀ (n : ℕ), Filter.Tendsto (fun a => |k a ^ n * f a|) l (nhds 0)


theorem free_map_coe {α β : Type u} {f : α → β} (x : FreeAbelianGroup α) :
    (free.map f) x = f <$> x


theorem admissible_E'4 : Admissible (E' 4)


theorem exists_le_and_iff_exists {P : α → Prop} {x₀ : α} (hP : Antitone P) :
    (∃ x, x ≤ x₀ ∧ P x) ↔ ∃ x, P x

{α : Type u}
[SemilatticeInf α]
{P : α → Prop}
{x₀ : α}
(hP : Antitone P)


theorem IsNat.of_raw (α) [AddMonoidWithOne α] (n : ℕ) : IsNat (n.rawCast : α) n

(α : Type u_1)
[AddMonoidWithOne α]
(n : ℕ)


protected theorem lt_of_add_lt_add_left {n : Nat} : n + k < n + m → k < m


/-- `NonUnitalSubring` closure of a set is monotone in its argument: if `s ⊆ t`,
then `closure s ≤ closure t`. -/
theorem closure_mono ⦃s t : Set R⦄ (h : s ⊆ t) : closure s ≤ closure t

{R : Type u}
[NonUnitalNonAssocRing R]
⦃s t : Set R⦄
(h : s ⊆ t)

NonUnitalSubring.closure s ≤ NonUnitalSubring.closure t


@[simp]
theorem translationNumber_pow : ∀ n : ℕ, τ (f ^ n) = n * τ f

(f ^ n).translationNumber = ↑n * f.translationNumber


@[to_additive (attr := simp)]
theorem top_subgroupOf : (⊤ : Subgroup G).subgroupOf H = ⊤

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)


theorem map_atBot_eq [Nonempty α] [SemilatticeInf α] {f : α → β} :
    atBot.map f = ⨅ a, 𝓟 (f '' { a' | a' ≤ a })

{α : Type u_3}
{β : Type u_4}
[Nonempty α]
[SemilatticeInf α]
{f : α → β}

Filter.map f Filter.atBot = ⨅ a, 𝓟 (f '' {a' | a' ≤ a})


theorem principal_le_lift' {t : Set β} : 𝓟 t ≤ f.lift' h ↔ ∀ s ∈ f, t ⊆ h s

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{h : Set α → Set β}
{t : Set β}


lemma pi_map_piCongrLeft [hι' : Fintype ι'] (e : ι ≃ ι') {β : ι' → Type*}
    [∀ i, MeasurableSpace (β i)] (μ : (i : ι') → Measure (β i)) [∀ i, SigmaFinite (μ i)] :
    (Measure.pi fun i ↦ μ (e i)).map (MeasurableEquiv.piCongrLeft (fun i ↦ β i) e)
      = Measure.pi μ

(μ : (i : ι') → MeasureTheory.Measure (β i))

[∀ (i : ι'), MeasureTheory.SigmaFinite (μ i)]

MeasureTheory.Measure.map (⇑(MeasurableEquiv.piCongrLeft (fun i => β i) e))
    (MeasureTheory.Measure.pi fun i => μ (e i)) =
  MeasureTheory.Measure.pi μ


theorem counitNat_surjective : Surjective (counitNat A)


lemma coevaluation_evaluation'' :
    Y ◁ η_ X Y ⊗≫ ε_ X Y ▷ Y = ⊗𝟙

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
(X Y : C)
[CategoryTheory.ExactPairing X Y]


theorem smul_single' {_ : Semiring R} (c : R) (a : α) (b : R) :
    c • Finsupp.single a b = Finsupp.single a (c * b)

∀ {x : Semiring R} (c : R) (a : α) (b : R), c • Finsupp.single a b = Finsupp.single a (c * b)


@[to_additive]
theorem finprod_mem_eq_finite_toFinset_prod (f : α → M) {s : Set α} (hs : s.Finite) :
    ∏ᶠ i ∈ s, f i = ∏ i ∈ hs.toFinset, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
{s : Set α}
(hs : s.Finite)

∏ᶠ (i : α) (_ : i ∈ s), f i = ∏ i ∈ hs.toFinset, f i


theorem coe_prod (f : A →⋆ₙₐ[R] B) (g : A →⋆ₙₐ[R] C) : ⇑(f.prod g) = Pi.prod f g

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
[NonUnitalNonAssocSemiring C]
[DistribMulAction R C]
[Star C]
(f : A →⋆ₙₐ[R] B)
(g : A →⋆ₙₐ[R] C)


/-- The sum of two `C^n` functions within a set at a point is `C^n` within this set
at this point. -/
theorem ContDiffWithinAt.add {s : Set E} {f g : E → F} (hf : ContDiffWithinAt 𝕜 n f s x)
    (hg : ContDiffWithinAt 𝕜 n g s x) : ContDiffWithinAt 𝕜 n (fun x => f x + g x) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{n : ℕ∞}
{s : Set E}
{f g : E → F}
(hf : ContDiffWithinAt 𝕜 n f s x)
(hg : ContDiffWithinAt 𝕜 n g s x)


theorem exists_mem_nhds_isCompact_mapsTo_of_isCompact_mem_nhds
    {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [R1Space Y] {f : X → Y} {x : X}
    {K : Set X} {s : Set Y} (hf : Continuous f) (hs : s ∈ 𝓝 (f x)) (hKc : IsCompact K)
    (hKx : K ∈ 𝓝 x) : ∃ K ∈ 𝓝 x, IsCompact K ∧ MapsTo f K s

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[R1Space Y]
{f : X → Y}
{x : X}
{K : Set X}
{s : Set Y}
(hf : Continuous f)
(hs : s ∈ 𝓝 (f x))
(hKc : IsCompact K)
(hKx : K ∈ 𝓝 x)

∃ K ∈ 𝓝 x, IsCompact K ∧ Set.MapsTo f K s


theorem IsHermitian.transpose {A : Matrix n n α} (h : A.IsHermitian) : Aᵀ.IsHermitian

{α : Type u_1}
{n : Type u_4}
[Star α]
{A : Matrix n n α}
(h : A.IsHermitian)


/-- **Cauchy-Goursat theorem** for a rectangle: the integral of a complex differentiable function
over the boundary of a rectangle equals zero. More precisely, if `f` is continuous on a closed
rectangle and is complex differentiable at all but countably many points of the corresponding open
rectangle, then its integral over the boundary of the rectangle equals zero. -/
theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : ℂ → E) (z w : ℂ)
    (s : Set ℂ) (hs : s.Countable) (Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]]))
    (Hd : ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
      DifferentiableAt ℂ f x) :
    (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
      I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
      I • (∫ y : ℝ in z.im..w.im, f (re z + y * I)) = 0

(Hd :
  ∀ x ∈ Set.Ioo (min z.re w.re) (max z.re w.re) ×ℂ Set.Ioo (min z.im w.im) (max z.im w.im) \ s, DifferentiableAt ℂ f x)

(((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * Complex.I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * Complex.I)) +
      Complex.I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * Complex.I)) -
    Complex.I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * Complex.I) =
  0


theorem irreducibleComponent_subset_connectedComponent {x : α} :
    irreducibleComponent x ⊆ connectedComponent x

{α : Type u}
[TopologicalSpace α]
{x : α}


theorem compl_iInter₂ (s : ∀ i, κ i → Set α) : (⋂ (i) (j), s i j)ᶜ = ⋃ (i) (j), (s i j)ᶜ

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
(s : (i : ι) → κ i → Set α)


lemma negDblY_of_Z_eq_zero {P : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.negDblY P = -(P x ^ 2) ^ 3

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P : Fin 3 → R}
(hP : W'.Equation P)
(hPz : P z = 0)


/-- Order equipped with a sensible successor function. -/
@[ext]
class SuccOrder (α : Type*) [Preorder α] where
  /-- Successor function-/
  succ : α → α
  /-- Proof of basic ordering with respect to `succ`-/
  le_succ : ∀ a, a ≤ succ a
  /-- Proof of interaction between `succ` and maximal element-/
  max_of_succ_le {a} : succ a ≤ a → IsMax a
  /-- Proof that `succ` satisfies ordering invariants between `LT` and `LE`-/
  succ_le_of_lt {a b} : a < b → succ a ≤ b
  /-- Proof that `succ` satisfies ordering invariants between `LE` and `LT`-/
  le_of_lt_succ {a b} : a < succ b → a ≤ b

{α : Type u_3}
[Preorder α]
[self : SuccOrder α]
{a b : α}


theorem insert_eq (a : α) (s : Finset α) : insert a s = {a} ∪ s

{α : Type u_1}
[DecidableEq α]
(a : α)
(s : Finset α)


theorem opow_limit {a b : Ordinal} (a0 : a ≠ 0) (h : IsLimit b) :
    a ^ b = bsup.{u, u} b fun c _ => a ^ c

{a b : Ordinal.{u}}
(a0 : a ≠ 0)
(h : b.IsLimit)


theorem to_dual_iff [LE α] : IsAntichain (· ≤ ·) s ↔ @IsAntichain αᵒᵈ (· ≤ ·) s

IsAntichain (fun x x_1 => x ≤ x_1) s ↔ IsAntichain (fun x x_1 => x ≤ x_1) s


/-- Explicit formula for `ζ (2 * k)`, for `k ∈ ℕ` with `k ≠ 0`, in terms of the Bernoulli number
`bernoulli (2 * k)`.

Compare `hasSum_zeta_nat` for a version formulated in terms of a sum over `1 / n ^ (2 * k)`, and
`riemannZeta_neg_nat_eq_bernoulli` for values at negative integers (equivalent to the above via
the functional equation). -/
theorem riemannZeta_two_mul_nat {k : ℕ} (hk : k ≠ 0) :
    riemannZeta (2 * k) = (-1) ^ (k + 1) * (2 : ℂ) ^ (2 * k - 1)
      * (π : ℂ) ^ (2 * k) * bernoulli (2 * k) / (2 * k)!


/-- under suitable mild assumptions on `𝕜`, the character space is a closed set in
`WeakDual 𝕜 A`. -/
protected theorem isClosed [Nontrivial 𝕜] [T2Space 𝕜] [ContinuousMul 𝕜] :
    IsClosed (characterSpace 𝕜 A)

{𝕜 : Type u_1}
{A : Type u_2}
[CommRing 𝕜]
[NoZeroDivisors 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[TopologicalSpace A]
[Semiring A]
[Algebra 𝕜 A]
[Nontrivial 𝕜]
[T2Space 𝕜]
[ContinuousMul 𝕜]


lemma sups_subset_self : s ⊻ s ⊆ s ↔ SupClosed s

{α : Type u_2}
[SemilatticeSup α]
{s : Set α}


@[to_additive]
theorem finprod_eq_mulIndicator_apply (s : Set α) (f : α → M) (a : α) :
    ∏ᶠ _ : a ∈ s, f a = mulIndicator s f a

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(s : Set α)
(f : α → M)
(a : α)


theorem _root_.Ideal.fg_of_isUnit (inj : Function.Injective (algebraMap R P)) (I : Ideal R)
    (h : IsUnit (I : FractionalIdeal S P)) : I.FG

(inj : Function.Injective ⇑(algebraMap R P))


@[simp]
theorem mulNat_eq_mul (n o) : mulNat o n = o * ofNat n


@[to_additive]
theorem Subgroup.isClosed_topologicalClosure (s : Subgroup G) :
    IsClosed (s.topologicalClosure : Set G)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(s : AddSubgroup G)


/-- Polarization identity: The imaginary part of the inner product, in terms of the norm. -/
theorem im_inner_eq_norm_sub_i_smul_mul_self_sub_norm_add_i_smul_mul_self_div_four (x y : E) :
    im ⟪x, y⟫ = (‖x - IK • y‖ * ‖x - IK • y‖ - ‖x + IK • y‖ * ‖x + IK • y‖) / 4

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)

RCLike.im ⟪x, y⟫_𝕜 = (‖x - RCLike.I • y‖ * ‖x - RCLike.I • y‖ - ‖x + RCLike.I • y‖ * ‖x + RCLike.I • y‖) / 4


theorem not_le_eq (a b : β) : (¬ (a ≤ b)) = (b < a)

{β : Type u_2}
[LinearOrder β]
(a b : β)


theorem exists_companion : ∃ B : BilinMap R M N, ∀ x y, Q (x + y) = Q x + Q y + B x y

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(Q : QuadraticMap R M N)

∃ B, ∀ (x y : M), Q (x + y) = Q x + Q y + (B x) y


theorem clog_pow (b x : ℕ) (hb : 1 < b) : clog b (b ^ x) = x


theorem uniqueBaseOn_basis_iff (hI : I ⊆ E) (hX : X ⊆ E) :
    (uniqueBaseOn I E).Basis J X ↔ J = X ∩ I

{α : Type u_1}
{E I X J : Set α}
(hI : I ⊆ E)
(hX : X ⊆ E)

(Matroid.uniqueBaseOn I E).Basis J X ↔ J = X ∩ I


/-- `f` is a measure preserving map w.r.t. measures `μa` and `μb` if `f` is measurable
and `map f μa = μb`. -/
structure MeasurePreserving (f : α → β)
  (μa : Measure α := by volume_tac) (μb : Measure β := by volume_tac) : Prop where
  protected measurable : Measurable f
  protected map_eq : map f μa = μb

{μa : autoParam (MeasureTheory.Measure α) _auto✝}

{μb : autoParam (MeasureTheory.Measure β) _auto✝¹}

(self : MeasureTheory.MeasurePreserving f μa μb)


@[simp]
theorem toWithTop_zero' {h : Decidable (0 : PartENat).Dom} : toWithTop 0 = 0


@[simp]
theorem quotientMap_algebraMap {J : Ideal A} {I : Ideal S} {f : A →+* S} {H : J ≤ I.comap f}
    {x : R₁} : quotientMap I f H (algebraMap R₁ (A ⧸ J) x) = Quotient.mk I (f (algebraMap _ _ x))

{R₁ : Type u_1}
{A : Type u_3}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
{S : Type v}
[CommRing S]
{J : Ideal A}
{I : Ideal S}
{f : A →+* S}
{H : J ≤ Ideal.comap f I}
{x : R₁}

(Ideal.quotientMap I f H) ((algebraMap R₁ (A ⧸ J)) x) = (Ideal.Quotient.mk I) (f ((algebraMap R₁ A) x))


lemma IsZero.neg (h : α.IsZero) : (-α).IsZero

{K : Type u_2}
{L : Type u_3}
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
[LieAlgebra.IsKilling K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
{α : LieModule.Weight K (↥H) L}
(h : α.IsZero)


theorem tan_add' {x y : ℝ}
    (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) :
    tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)

Real.tan (x + y) = (Real.tan x + Real.tan y) / (1 - Real.tan x * Real.tan y)


theorem nmem_singleton_empty {s : Set α} : s ∉ ({∅} : Set (Set α)) ↔ s.Nonempty


theorem gradedComm_of_zero_tmul (a : 𝒜 0) (b : ⨁ i, ℬ i) :
    gradedComm R 𝒜 ℬ (lof R _ 𝒜 0 a ⊗ₜ b) = b ⊗ₜ lof R _ 𝒜 _ a

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]
(a : 𝒜 0)
(b : ⨁ (i : ι), ℬ i)

(TensorProduct.gradedComm R 𝒜 ℬ) ((DirectSum.lof R ι 𝒜 0) a ⊗ₜ[R] b) = b ⊗ₜ[R] (DirectSum.lof R ι 𝒜 0) a


theorem abs_add_eq_iff : abs (x + y) = abs x + abs y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg

Complex.abs (x + y) = Complex.abs x + Complex.abs y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg


theorem extract_eq_of_size_le_end {l p : Nat} {a : Array α} (h : a.size ≤ l) :
    a.extract p l = a.extract p a.size

{α : Type u}
{l p : Nat}
{a : Array α}
(h : a.size ≤ l)


theorem Memℒp.of_le_mul {f : α → E} {g : α → F} {c : ℝ} (hg : Memℒp g p μ)
    (hf : AEStronglyMeasurable f μ) (hfg : ∀ᵐ x ∂μ, ‖f x‖ ≤ c * ‖g x‖) : Memℒp f p μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hfg : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c * ‖g x‖)


@[to_additive]
theorem Finset.tprod_subtype' (s : Finset β) (f : β → α) :
    ∏' x : (s : Set β), f x = ∏ x ∈ s, f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(s : Finset β)
(f : β → α)


@[to_additive (attr := simp)] lemma zpow_right (h : SemiconjBy a x y) :
    ∀ m : ℤ, SemiconjBy a (x ^ m) (y ^ m)

{G : Type u_1}
[Group G]
{a x y : G}
(h : SemiconjBy a x y)
(m : ℤ)


/-- A natural transformation `L₁ ⟶ L₂` induces a functor `Comma L₂ R ⥤ Comma L₁ R`. -/
@[simps]
def mapLeft (l : L₁ ⟶ L₂) : Comma L₂ R ⥤ Comma L₁ R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(l : L₁ ⟶ L₂)

∀ {X Y : CategoryTheory.Comma L₂ R} (f : X ⟶ Y), ((CategoryTheory.Comma.mapLeft R l).map f).left = f.left


theorem ContinuousLinearMap.continuous_det : Continuous fun f : E →L[𝕜] E => f.det

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]


/-- Constructor for isomorphisms in `ComposableArrows C 5`. -/
@[simps]
def isoMk₅ {f g : ComposableArrows C 5}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3) (app₄ : f.obj' 4 ≅ g.obj' 4) (app₅ : f.obj' 5 ≅ g.obj' 5)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3)
    (w₃ : f.map' 3 4 ≫ app₄.hom = app₃.hom ≫ g.map' 3 4)
    (w₄ : f.map' 4 5 ≫ app₅.hom = app₄.hom ≫ g.map' 4 5) :
    f ≅ g

{f g : CategoryTheory.ComposableArrows C 5}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁.hom =
    CategoryTheory.CategoryStruct.comp app₀.hom (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂.hom =
    CategoryTheory.CategoryStruct.comp app₁.hom (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃.hom =
    CategoryTheory.CategoryStruct.comp app₂.hom (g.map' 2 3 ⋯ ⋯))

(w₃ :
  CategoryTheory.CategoryStruct.comp (f.map' 3 4 ⋯ ⋯) app₄.hom =
    CategoryTheory.CategoryStruct.comp app₃.hom (g.map' 3 4 ⋯ ⋯))

(w₄ :
  CategoryTheory.CategoryStruct.comp (f.map' 4 5 ⋯ ⋯) app₅.hom =
    CategoryTheory.CategoryStruct.comp app₄.hom (g.map' 4 5 ⋯ ⋯))

(CategoryTheory.ComposableArrows.isoMk₅ app₀ app₁ app₂ app₃ app₄ app₅ w₀ w₁ w₂ w₃ w₄).hom =
  CategoryTheory.ComposableArrows.homMk₅ app₀.hom app₁.hom app₂.hom app₃.hom app₄.hom app₅.hom w₀ w₁ w₂ w₃ w₄


@[to_additive]
lemma prod_union_eq_left [DecidableEq α] (hs : ∀ a ∈ s₂, a ∉ s₁ → f a = 1) :
    ∏ a ∈ s₁ ∪ s₂, f a = ∏ a ∈ s₁, f a

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]
(hs : ∀ a ∈ s₂, a ∉ s₁ → f a = 0)


theorem cofixA_eq_zero : ∀ x y : CofixA F 0, x = y

(F : PFunctor.{u})
(x y : PFunctor.Approx.CofixA F 0)


/-- The equivalence `F.Elementsᵒᵖ ≅ (yoneda, F)` given by yoneda lemma. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_inv counitIso_hom counitIso_inv]
def costructuredArrowYonedaEquivalence (F : Cᵒᵖ ⥤ Type v) :
    F.Elementsᵒᵖ ≌ CostructuredArrow yoneda F

(F : CategoryTheory.Functor Cᵒᵖ (Type v))

(CategoryTheory.CategoryOfElements.costructuredArrowYonedaEquivalence F).counitIso.inv = CategoryTheory.eqToHom ⋯


@[to_additive]
theorem EventuallyEq.smul {𝕜} [SMul 𝕜 β] {l : Filter α} {f f' : α → 𝕜} {g g' : α → β}
    (hf : f =ᶠ[l] f') (hg : g =ᶠ[l] g') : (fun x => f x • g x) =ᶠ[l] fun x => f' x • g' x

{α : Type u}
{β : Type v}
{𝕜 : Type u_2}
[SMul 𝕜 β]
{l : Filter α}
{f f' : α → 𝕜}
{g g' : α → β}
(hf : f =ᶠ[l] f')
(hg : g =ᶠ[l] g')


@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set G) = ⊥


theorem Monic.pow (hp : Monic p) : ∀ n : ℕ, Monic (p ^ n)

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p.Monic)
(n : ℕ)


theorem coe_deleteEdges_eq (s : Set (Sym2 V)) :
    (G'.deleteEdges s).coe = G'.coe.deleteEdges (Sym2.map (↑) ⁻¹' s)

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(s : Set (Sym2 V))

(G'.deleteEdges s).coe = G'.coe.deleteEdges (Sym2.map Subtype.val ⁻¹' s)


theorem one_eq : (1 : HomogeneousLocalization 𝒜 x) = Quotient.mk'' 1

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)


protected theorem norm_single (hp : 0 < p.toReal) (f : ∀ i, E i) (i : α) :
    ‖lp.single p i (f i)‖ = ‖f i‖

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
[DecidableEq α]
(hp : 0 < p.toReal)
(f : (i : α) → E i)
(i : α)


/-- If `forget C` preserves initials and `X` is initial, then `(forget C).obj X` is empty. -/
lemma empty_of_initial_of_preserves [PreservesColimit (Functor.empty.{0} C) (forget C)] (X : C)
    (h : Nonempty (IsInitial X)) : IsEmpty ((forget C).obj X)

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) (CategoryTheory.forget C)]

(h : Nonempty (CategoryTheory.Limits.IsInitial X))

IsEmpty ((CategoryTheory.forget C).obj X)


lemma predAbove_of_le_castSucc (p : Fin n) (i : Fin (n + 1)) (h : i ≤ castSucc p)
    (hi := Fin.ne_of_lt $ Fin.lt_of_le_of_lt h $ castSucc_lt_last _) :
    p.predAbove i = i.castPred hi

{n : ℕ}
(p : Fin n)
(i : Fin (n + 1))
(h : i ≤ p.castSucc)
(hi : i ≠ Fin.last n := ⋯)


@[simp]
theorem homogeneousComponent_zero : homogeneousComponent 0 φ = C (coeff 0 φ)

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(φ : MvPolynomial σ R)

(MvPolynomial.homogeneousComponent 0) φ = MvPolynomial.C (MvPolynomial.coeff 0 φ)


lemma epiWithInjectiveKernel_of_iso {X Y : C} (f : X ⟶ Y) [IsIso f] :
    epiWithInjectiveKernel f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.IsIso f]


theorem mem_nhds_uniformity_iff_left {x : α} {s : Set α} :
    s ∈ 𝓝 x ↔ { p : α × α | p.2 = x → p.1 ∈ s } ∈ 𝓤 α

{α : Type ua}
[UniformSpace α]
{x : α}
{s : Set α}


theorem Integrable.integral_condKernel {f : α × Ω → E} (hf_int : Integrable f ρ) :
    Integrable (fun x ↦ ∫ y, f (x, y) ∂ρ.condKernel x) ρ.fst

{α : Type u_1}
{Ω : Type u_2}
{E : Type u_3}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{ρ : MeasureTheory.Measure (α × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
{f : α × Ω → E}
(hf_int : MeasureTheory.Integrable f ρ)

MeasureTheory.Integrable (fun x => ∫ (y : Ω), f (x, y) ∂ρ.condKernel x) ρ.fst


theorem polar_mem_iff (s : Set E) (y : F) : y ∈ B.polar s ↔ ∀ x ∈ s, ‖B x y‖ ≤ 1

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(s : Set E)
(y : F)


@[simp]
theorem toWeakDualBCNN_apply (μ : ProbabilityMeasure Ω) (f : Ω →ᵇ ℝ≥0) :
    μ.toWeakDualBCNN f = (∫⁻ ω, f ω ∂(μ : Measure Ω)).toNNReal

(μ : MeasureTheory.ProbabilityMeasure Ω)

(f : Ω →ᵇ ℝ≥0)

μ.toWeakDualBCNN f = (∫⁻ (ω : Ω), ↑(f ω) ∂↑μ).toNNReal


/-- When both maps `S.f` and `S.g` of a short complex `S` are zero, this is the right homology map
data (for the identity of `S`) which relates the right homology data
`RightHomologyData.ofIsLimitKernelFork` and `ofZeros` . -/
@[simps]
def compatibilityOfZerosOfIsLimitKernelFork (hf : S.f = 0) (hg : S.g = 0)
    (c : KernelFork S.g) (hc : IsLimit c) :
    RightHomologyMapData (𝟙 S)
      (RightHomologyData.ofIsLimitKernelFork S hf c hc)
      (RightHomologyData.ofZeros S hf hg)

(c : CategoryTheory.Limits.KernelFork S.g)

(CategoryTheory.ShortComplex.RightHomologyMapData.compatibilityOfZerosOfIsLimitKernelFork S hf hg c hc).φH =
  CategoryTheory.Limits.Fork.ι c


@[simp]
lemma preimage_coe_Ioc_bot (y : ℝ) : Real.toEReal ⁻¹' Ioc ⊥ y = Iic y

Real.toEReal ⁻¹' Set.Ioc ⊥ ↑y = Set.Iic y


/-- A periodic function `f : R → X` on a semiring (or, more generally, `AddZeroClass`)
of non-zero period is not injective. -/
lemma Periodic.not_injective {R X : Type*} [AddZeroClass R] {f : R → X} {c : R}
    (hf : Periodic f c) (hc : c ≠ 0) : ¬ Injective f

{R : Type u_4}
{X : Type u_5}
[AddZeroClass R]
{f : R → X}
{c : R}
(hf : Function.Periodic f c)
(hc : c ≠ 0)


theorem AntitoneOn.reflect_lt (hf : AntitoneOn f s) {a b : α} (ha : a ∈ s) (hb : b ∈ s)
    (h : f a < f b) : b < a

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : AntitoneOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)
(h : f a < f b)


theorem map₂_mono_right (h : f₁ ≤ f₂) : map₂ m f₁ g ≤ map₂ m f₂ g

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f₁ f₂ : Filter α}
{g : Filter β}
(h : f₁ ≤ f₂)


theorem UniqueDiffOn.uniqueDiffWithinAt {s : Set E} {x} (hs : UniqueDiffOn 𝕜 s) (h : x ∈ s) :
    UniqueDiffWithinAt 𝕜 s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{x : E}
(hs : UniqueDiffOn 𝕜 s)
(h : x ∈ s)


/-- Just as `TensorProduct.ext` is marked `ext` instead of `TensorProduct.ext'`, this is
a better `ext` lemma than `TensorProduct.AlgebraTensorModule.ext` below.

See note [partially-applied ext lemmas]. -/
@[ext high]
nonrec theorem curry_injective : Function.Injective (curry : (M ⊗ N →ₗ[A] P) → M →ₗ[A] N →ₗ[R] P)

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]


theorem dimH_univ : dimH (univ : Set ℝ) = 1


/-- A function `f : α → ℝ` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension
to the whole space. -/
theorem LipschitzOnWith.extend_real {f : α → ℝ} {s : Set α} {K : ℝ≥0} (hf : LipschitzOnWith K f s) :
    ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn f g s

{α : Type u}
[PseudoMetricSpace α]
{f : α → ℝ}
{s : Set α}
{K : ℝ≥0}
(hf : LipschitzOnWith K f s)


@[simp]
theorem sym_comp_unsym : (sym : α → αˢʸᵐ) ∘ unsym = id


@[csimp] theorem set_eq_setTR : @set = @setTR

(α : Type u_1)
(l : List α)
(a : α)
(acc : Array α)
(xs : List α)
(n : Nat)

l = acc.data ++ xs → List.setTR.go l a xs n acc = acc.data ++ xs.set n a


@[simp] theorem prod_norm_equiv_symm (f : α × β) : ‖(WithLp.equiv ⊤ _).symm f‖ = ‖f‖

{α : Type u_2}
{β : Type u_3}
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(f : α × β)


@[fun_prop]
theorem ContinuousAt.comp' {g : Y → Z} {x : X} (hg : ContinuousAt g (f x))
    (hf : ContinuousAt f x) : ContinuousAt (fun x => g (f x)) x

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y}
{g : Y → Z}
{x : X}
(hg : ContinuousAt g (f x))
(hf : ContinuousAt f x)


theorem symm_trans_target_eq (e e' : Pretrivialization F proj) :
    (e.toPartialEquiv.symm.trans e'.toPartialEquiv).target = (e.baseSet ∩ e'.baseSet) ×ˢ univ

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e e' : Pretrivialization F proj)

(e.symm.trans e'.toPartialEquiv).target = (e.baseSet ∩ e'.baseSet) ×ˢ Set.univ


@[to_additive]
theorem fixed_eq_iInter_fixedBy : fixedPoints M α = ⋂ m : M, fixedBy α m

(M : Type u)
[Monoid M]
(α : Type v)
[MulAction M α]

MulAction.fixedPoints M α = ⋂ m, MulAction.fixedBy α m


theorem stoppedValue_sub_eq_sum' [AddCommGroup β] (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) :
    stoppedValue u π - stoppedValue u τ = fun ω =>
      (∑ i ∈ Finset.range (N + 1), Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω

{Ω : Type u_1}
{β : Type u_2}
{u : ℕ → Ω → β}
{τ π : Ω → ℕ}
[AddCommGroup β]
(hle : τ ≤ π)
{N : ℕ}
(hbdd : ∀ (ω : Ω), π ω ≤ N)

MeasureTheory.stoppedValue u π - MeasureTheory.stoppedValue u τ = fun ω =>
  (∑ i ∈ Finset.range (N + 1), {ω | τ ω ≤ i ∧ i < π ω}.indicator (u (i + 1) - u i)) ω


/-- Equivalence of multiplicative ring norms is reflexive. -/
lemma equiv_refl (f : MulRingNorm R) : equiv f f

{R : Type u_4}
[Ring R]
(f : MulRingNorm R)


theorem nsmul (n : ℕ) (x : WittVector p R) : mapFun f (n • x) = n • mapFun f x

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(n : ℕ)
(x : 𝕎 R)

WittVector.mapFun (⇑f) (n • x) = n • WittVector.mapFun (⇑f) x


theorem mul_le_of_le_of_le_one_of_nonneg [PosMulMono α] (h : b ≤ c) (ha : a ≤ 1) (hb : 0 ≤ b) :
    b * a ≤ c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : b ≤ c)
(ha : a ≤ 1)
(hb : 0 ≤ b)


theorem nndist_integral_add_measure_le_lintegral
    {f : α → G} (h₁ : Integrable f μ) (h₂ : Integrable f ν) :
    (nndist (∫ x, f x ∂μ) (∫ x, f x ∂(μ + ν)) : ℝ≥0∞) ≤ ∫⁻ x, ‖f x‖₊ ∂ν

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{f : α → G}
(h₁ : MeasureTheory.Integrable f μ)
(h₂ : MeasureTheory.Integrable f ν)

↑(nndist (∫ (x : α), f x ∂μ) (∫ (x : α), f x ∂(μ + ν))) ≤ ∫⁻ (x : α), ↑‖f x‖₊ ∂ν


@[simp]
theorem map_eq_id {f : α → α} : Option.map f = id ↔ f = id


/-- Given a fixed pivot `p : Fin (n + 1)`, `p.succAbove` is injective. -/
lemma succAbove_right_inj : p.succAbove i = p.succAbove j ↔ i = j


lemma eq_zero_of_le_half (h : n ≤ n / 2) : n = 0


@[to_additive abs_pos_of_neg] lemma one_lt_mabs_of_lt_one (h : a < 1) : 1 < |a|ₘ

[CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1]


theorem filter_insert (a : α) (s : Finset α) :
    filter p (insert a s) = if p a then insert a (filter p s) else filter p s

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
[DecidableEq α]
(a : α)
(s : Finset α)

Finset.filter p (insert a s) = if p a then insert a (Finset.filter p s) else Finset.filter p s


{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)
{n : ℕ∞}
(x : (i : ι) → E i)


theorem isLeast_opNNNorm : IsLeast {C : ℝ≥0 | ∀ m, ‖f m‖₊ ≤ C * ∏ i, ‖m i‖₊} ‖f‖₊

[(i : ι) → SeminormedAddCommGroup (E i)]

IsLeast {C | ∀ (m : (i : ι) → E i), ‖f m‖₊ ≤ C * ∏ i : ι, ‖m i‖₊} ‖f‖₊


theorem lintegral_iUnion [Countable β] {s : β → Set α} (hm : ∀ i, MeasurableSet (s i))
    (hd : Pairwise (Disjoint on s)) (f : α → ℝ≥0∞) :
    ∫⁻ a in ⋃ i, s i, f a ∂μ = ∑' i, ∫⁻ a in s i, f a ∂μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable β]
{s : β → Set α}
(hm : ∀ (i : β), MeasurableSet (s i))
(hd : Pairwise (Disjoint on s))
(f : α → ℝ≥0∞)

∫⁻ (a : α) in ⋃ i, s i, f a ∂μ = ∑' (i : β), ∫⁻ (a : α) in s i, f a ∂μ


/-- **Cauchy–Schwarz inequality**.
We need this for the `Core` structure to prove the triangle inequality below when
showing the core is a normed group.
-/
theorem inner_mul_inner_self_le (x y : F) : ‖⟪x, y⟫‖ * ‖⟪y, x⟫‖ ≤ re ⟪x, x⟫ * re ⟪y, y⟫

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x y : F)

‖⟪x, y⟫_𝕜‖ * ‖⟪y, x⟫_𝕜‖ ≤ RCLike.re ⟪x, x⟫_𝕜 * RCLike.re ⟪y, y⟫_𝕜


@[to_additive]
theorem measure_eq_tsum_of_ac (h : IsFundamentalDomain G s μ) (hν : ν ≪ μ) (t : Set α) :
    ν t = ∑' g : G, ν (t ∩ g • s)

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)

(hν : ν ≪ μ)


lemma IsMeasurableRatCDF.measure_stieltjesFunction_univ (a : α) :
    (hf.stieltjesFunction a).measure univ = 1

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

(hf.stieltjesFunction a).measure Set.univ = 1


@[to_additive]
lemma iIndepFun.indepFun_mul_right (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hij : i ≠ j) (hik : i ≠ k) :
    IndepFun (f i) (f j * f k) κ μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (f i) (f j * f k) κ μ


/-- The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_left`
for commutative rings. -/
theorem not_linearIndependent_pair_of_flat_left [Module.Flat R M]
    (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b]

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{M N : Submodule R S}
(H : M.LinearDisjoint N)
[Nontrivial R]
[Module.Flat R ↥M]
(a b : ↥(M ⊓ N))


@[simp] lemma isSemisimple_neg : (-f).IsSemisimple ↔ f.IsSemisimple

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}


theorem Module.rank_le_one_iff_top_isPrincipal [Module.Free K V] :
    Module.rank K V ≤ 1 ↔ (⊤ : Submodule K V).IsPrincipal

{K : Type u}
{V : Type v}
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]


lemma Quotient.mk_smul_mk (r : R) (m : M) :
    Ideal.Quotient.mk I r •
      Submodule.Quotient.mk (p := (I • ⊤ : Submodule R M)) m =
      Submodule.Quotient.mk (p := (I • ⊤ : Submodule R M)) (r • m)

{R : Type u_1}
(M : Type u_2)
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(r : R)
(m : M)

(Ideal.Quotient.mk I) r • Submodule.Quotient.mk m = Submodule.Quotient.mk (r • m)


lemma NatTrans.app_homology {F G : C ⥤ D} (τ : F ⟶ G)
    (S : ShortComplex C) [S.HasHomology] [F.PreservesZeroMorphisms] [G.PreservesZeroMorphisms]
    [F.PreservesLeftHomologyOf S] [G.PreservesLeftHomologyOf S] [F.PreservesRightHomologyOf S]
    [G.PreservesRightHomologyOf S] :
    τ.app S.homology = (S.mapHomologyIso F).inv ≫
      ShortComplex.homologyMap (S.mapNatTrans τ) ≫ (S.mapHomologyIso G).hom

τ.app S.homology =
  CategoryTheory.CategoryStruct.comp (S.mapHomologyIso F).inv
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap (S.mapNatTrans τ))
      (S.mapHomologyIso G).hom)


theorem map_le {S : NonUnitalSubalgebra R A} {f : F} {U : NonUnitalSubalgebra R B} :
    map f S ≤ U ↔ S ≤ comap f U

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
{S : NonUnitalSubalgebra R A}
{f : F}
{U : NonUnitalSubalgebra R B}

NonUnitalSubalgebra.map f S ≤ U ↔ S ≤ NonUnitalSubalgebra.comap f U


theorem frontier_reProdIm (s t : Set ℝ) :
    frontier (s ×ℂ t) = closure s ×ℂ frontier t ∪ frontier s ×ℂ closure t


@[simp]
theorem comp_id (f : C₀(γ, δ)) : f.comp (CocompactMap.id γ) = f

{γ : Type w}
{δ : Type u_2}
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(f : γ →C₀ δ)


/-- A weighted subtraction, over the image of an embedding, equals a
weighted subtraction with the same points and weights over the
original `Finset`. -/
theorem weightedVSub_map (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P) :
    (s₂.map e).weightedVSub p w = s₂.weightedVSub (p ∘ e) (w ∘ e)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
{ι₂ : Type u_5}
(s₂ : Finset ι₂)
(e : ι₂ ↪ ι)
(w : ι → k)
(p : ι → P)

((Finset.map e s₂).weightedVSub p) w = (s₂.weightedVSub (p ∘ ⇑e)) (w ∘ ⇑e)


@[reassoc (attr := simp)]
theorem ev_coev : (A ◁ (coev A).app B) ≫ (ev A).app (A ⊗ B) = 𝟙 (A ⊗ B)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(A B : C)
[CategoryTheory.Closed A]

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft A ((CategoryTheory.ihom.coev A).app B))
    ((CategoryTheory.ihom.ev A).app (CategoryTheory.MonoidalCategory.tensorObj A B)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj A B)


theorem ne_zero_of_c_ne_zero (hc : P.c ≠ 0) : P.toPoly ≠ 0

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(hc : P.c ≠ 0)


theorem subset_zeroLocus_iff_le_vanishingIdeal (t : Set (ProjectiveSpectrum 𝒜)) (I : Ideal A) :
    t ⊆ zeroLocus 𝒜 I ↔ I ≤ (vanishingIdeal t).toIdeal

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
{𝒜 : ℕ → Submodule R A}
[GradedAlgebra 𝒜]
(t : Set (ProjectiveSpectrum 𝒜))
(I : Ideal A)

t ⊆ ProjectiveSpectrum.zeroLocus 𝒜 ↑I ↔ I ≤ (ProjectiveSpectrum.vanishingIdeal t).toIdeal


protected theorem is_glb_sInf (S : Set ℝ) (h₁ : S.Nonempty) (h₂ : BddBelow S) :
    IsGLB S (sInf S)


theorem fin_app {n} : Computable₂ (@id (Fin n → σ))


/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g ∘ f` has the
power series `g ∘ p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F →L[𝕜] G)
    (h : HasFPowerSeriesOnBall f p x r) :
    HasFPowerSeriesOnBall (g ∘ f) (g.compFormalMultilinearSeries p) x r

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(g : F →L[𝕜] G)
(h : HasFPowerSeriesOnBall f p x r)

HasFPowerSeriesOnBall (⇑g ∘ f) (g.compFormalMultilinearSeries p) x r


/-- Given a neighborhood `U` of `1` there is an open neighborhood `V` of `1`
such that `V * V ⊆ U`. -/
@[to_additive "Given an open neighborhood `U` of `0` there is an open neighborhood `V` of `0`
  such that `V + V ⊆ U`."]
theorem exists_open_nhds_one_mul_subset {U : Set M} (hU : U ∈ 𝓝 (1 : M)) :
    ∃ V : Set M, IsOpen V ∧ (1 : M) ∈ V ∧ V * V ⊆ U

{M : Type u_3}
[TopologicalSpace M]
[MulOneClass M]
[ContinuousMul M]
{U : Set M}
(hU : U ∈ 𝓝 1)


lemma setLIntegral_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) {A : Set γ} (hA : MeasurableSet A) :
    ∫⁻ x in A, ENNReal.ofReal (density κ ν a x s) ∂(ν a) = κ a (A ×ˢ s)

{κ : ProbabilityTheory.Kernel α (γ × β)}

∫⁻ (x : γ) in A, ENNReal.ofReal (κ.density ν a x s) ∂ν a = (κ a) (A ×ˢ s)


theorem dvdNotUnit_iff_lt {a b : Associates α} : DvdNotUnit a b ↔ a < b

{α : Type u_1}
[CancelCommMonoidWithZero α]
{a b : Associates α}


@[to_additive]
lemma prod_union_eq_right [DecidableEq α] (hs : ∀ a ∈ s₁, a ∉ s₂ → f a = 1) :
    ∏ a ∈ s₁ ∪ s₂, f a = ∏ a ∈ s₂, f a

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]
(hs : ∀ a ∈ s₁, a ∉ s₂ → f a = 0)


@[simp]
theorem decode_sum_val (n : ℕ) : (decode n : Option (α ⊕ β)) = decodeSum n

{α : Type u_1}
{β : Type u_2}
[Encodable α]
[Encodable β]
(n : ℕ)

Encodable.decode n = Encodable.decodeSum n


theorem Codisjoint.sup_right (h : Codisjoint a b) : Codisjoint a (b ⊔ c)

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}
(c : α)
(h : Codisjoint a b)


@[simp]
theorem neg_equiv_neg_iff {x y : PGame} : (-x ≈ -y) ↔ (x ≈ y)


@[simps]
instance BoolAlg.hasForgetToBoolRing : HasForget₂ BoolAlg BoolRing

CategoryTheory.HasForget₂.forget₂.obj X = BoolRing.of (AsBoolRing ↑X)


theorem monic_of_c_eq_one' : (toPoly ⟨0, 0, 1, d⟩).Monic


theorem _root_.BoundedVariationOn.locallyBoundedVariationOn {f : α → E} {s : Set α}
    (h : BoundedVariationOn f s) : LocallyBoundedVariationOn f s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(h : BoundedVariationOn f s)


/-- The product `Bool × α` is equivalent to `α ⊕ α`. -/
@[simps]
def boolProdEquivSum (α) : Bool × α ≃ α ⊕ α

∀ (a : α ⊕ α), (Equiv.boolProdEquivSum α).symm a = Sum.elim (Prod.mk false) (Prod.mk true) a


theorem insert_comm (a b : α) (s : Set α) : insert a (insert b s) = insert b (insert a s)


/-- A possibly empty category for which every functor to a discrete category is constant.
-/
class IsPreconnected (J : Type u₁) [Category.{v₁} J] : Prop where
  iso_constant :
    ∀ {α : Type u₁} (F : J ⥤ Discrete α) (j : J), Nonempty (F ≅ (Functor.const J).obj (F.obj j))

[self : CategoryTheory.IsPreconnected J]

(F : CategoryTheory.Functor J (CategoryTheory.Discrete α))

Nonempty (F ≅ (CategoryTheory.Functor.const J).obj (F.obj j))


@[simp]
theorem nat_le_card {o} {n : ℕ} : (n : Cardinal) ≤ card o ↔ (n : Ordinal) ≤ o


/-- The duality equivalence `WalkingCospanᵒᵖ ≌ WalkingSpan` -/
@[simps!]
def walkingCospanOpEquiv : WalkingCospanᵒᵖ ≌ WalkingSpan

(X : CategoryTheory.Limits.WidePushoutShape CategoryTheory.Limits.WalkingPair)

CategoryTheory.Limits.walkingCospanOpEquiv.counitIso.hom.app X = 𝟙 X


theorem partialSups_eq_ciSup_Iic (f : ℕ → α) (n : ℕ) : partialSups f n = ⨆ i : Set.Iic n, f i

{α : Type u_1}
[ConditionallyCompleteLattice α]
(f : ℕ → α)
(n : ℕ)