/-- When `S₁.g` and `S₂.g` are zero and we have chosen colimit cokernel coforks `c₁` and `c₂`
for `S₁.f` and `S₂.f` respectively, the action on homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`φ.τ₂ ≫ c₂.π = c₁.π ≫ f`. -/
@[simps]
def ofIsColimitCokernelCofork (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (c₁ : CokernelCofork S₁.f) (hc₁ : IsColimit c₁)
    (hg₂ : S₂.g = 0) (c₂ : CokernelCofork S₂.f) (hc₂ : IsColimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : φ.τ₂ ≫ c₂.π = c₁.π ≫ f) :
    HomologyMapData φ (HomologyData.ofIsColimitCokernelCofork S₁ hg₁ c₁ hc₁)
      (HomologyData.ofIsColimitCokernelCofork S₂ hg₂ c₂ hc₂)

(c₁ : CategoryTheory.Limits.CokernelCofork S₁.f)

(hc₁ : CategoryTheory.Limits.IsColimit c₁)

(c₂ : CategoryTheory.Limits.CokernelCofork S₂.f)

(hc₂ : CategoryTheory.Limits.IsColimit c₂)

(comm :
  CategoryTheory.CategoryStruct.comp φ.τ₂ (CategoryTheory.Limits.Cofork.π c₂) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Cofork.π c₁) f)

(CategoryTheory.ShortComplex.HomologyMapData.ofIsColimitCokernelCofork φ hg₁ c₁ hc₁ hg₂ c₂ hc₂ f comm).right =
  CategoryTheory.ShortComplex.RightHomologyMapData.ofIsColimitCokernelCofork φ hg₁ c₁ hc₁ hg₂ c₂ hc₂ f comm


@[simp]
theorem iUnion_Ico_left (b : α) : ⋃ a, Ico a b = Iio b


/-- A lax braided functor takes commutative monoid objects to commutative monoid objects.

That is, a lax braided functor `F : C ⥤ D` induces a functor `CommMon_ C ⥤ CommMon_ D`.
-/
@[simps!]
def mapCommMon (F : LaxBraidedFunctor C D) : CommMon_ C ⥤ CommMon_ D

(F : CategoryTheory.LaxBraidedFunctor C D)


lemma of_dvd (d : m ∣ n) (h : a ≡ b [MOD n]) : a ≡ b [MOD m]

{m n a b : ℕ}
(d : m ∣ n)
(h : a ≡ b [MOD n])


@[simp]
lemma extendDomain_pow (n : ℕ) : (e ^ n).extendDomain f = e.extendDomain f ^ n

{α : Type u}
{β : Type v}
(e : Equiv.Perm α)
{p : β → Prop}
[DecidablePred p]
(f : α ≃ Subtype p)
(n : ℕ)


/-- Reflection is involutive. -/
@[simp]
theorem reflection_trans_reflection :
    (reflection K).trans (reflection K) = LinearIsometryEquiv.refl 𝕜 E

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(K : Submodule 𝕜 E)
[HasOrthogonalProjection K]


theorem reducible_not_mem_factorSet {p : Associates α} (hp : ¬Irreducible p) (s : FactorSet α) :
    ¬p ∈ s

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p : Associates α}
(hp : ¬Irreducible p)
(s : Associates.FactorSet α)


theorem exists_dual_map_eq_bot_of_nmem {x : M} (hx : x ∉ p) (hp' : Free R (M ⧸ p)) :
    ∃ f : Dual R M, f x ≠ 0 ∧ p.map f = ⊥

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{p : Submodule R M}
{x : M}
(hx : x ∉ p)
(hp' : Module.Free R (M ⧸ p))


@[simp]
theorem neLocus_self_sub_right : neLocus f (f - g) = g.support

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → AddGroup (N a)]
(f g : Π₀ (a : α), N a)


/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (insert a s)` for all `s` and
`a ∉ s`. -/
lemma monotone_iff_forall_le_insert : Monotone f ↔ ∀ s ⦃a⦄, a ∉ s → f s ≤ f (insert a s)

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f : Finset α → β}
[DecidableEq α]

Monotone f ↔ ∀ (s : Finset α) ⦃a : α⦄, a ∉ s → f s ≤ f (insert a s)


/--
Definition of bitvector addition as a nat.
-/
@[simp, bv_toNat] theorem toNat_add (x y : BitVec w) : (x + y).toNat = (x.toNat + y.toNat) % 2^w

(x + y).toNat = (x.toNat + y.toNat) % 2 ^ w


lemma eval₂ (hφ : φ.IsHomogeneous m) (f : R →+* MvPolynomial τ S) (g : σ → MvPolynomial τ S)
    (hf : ∀ r, (f r).IsHomogeneous 0) (hg : ∀ i, (g i).IsHomogeneous n) :
    (eval₂ f g φ).IsHomogeneous (n * m)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
{φ : MvPolynomial σ R}
{m n : ℕ}
(hφ : φ.IsHomogeneous m)
(f : R →+* MvPolynomial τ S)
(g : σ → MvPolynomial τ S)
(hf : ∀ (r : R), (f r).IsHomogeneous 0)
(hg : ∀ (i : σ), (g i).IsHomogeneous n)

(MvPolynomial.eval₂ f g φ).IsHomogeneous (n * m)


protected theorem measurableSet_eq' [TopologicalSpace ι] [OrderTopology ι]
    [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω = i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[TopologicalSpace ι]
[OrderTopology ι]
[FirstCountableTopology ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


@[to_additive]
theorem mapsTo_smul_orbit (m : M) (a : α) : Set.MapsTo (m • ·) (orbit M a) (orbit M a)

{M : Type u}
[AddMonoid M]
{α : Type v}
[AddAction M α]
(m : M)
(a : α)

Set.MapsTo (fun x => m +ᵥ x) (AddAction.orbit M a) (AddAction.orbit M a)


lemma zpow_pos_of_pos [PosMulStrictMono α] (ha : 0 < a) : ∀ n : ℤ, 0 < a ^ n

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}
[PosMulStrictMono α]
(ha : 0 < a)
(n : ℤ)


theorem norm_eq_zero_iff' {x : E K} (hx : x ∈ Set.range (mixedEmbedding K)) :
    mixedEmbedding.norm x = 0 ↔ x = 0

{x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)}

(hx : x ∈ Set.range ⇑(NumberField.mixedEmbedding K))

NumberField.mixedEmbedding.norm x = 0 ↔ x = 0


lemma IsStableUnderProductsOfShape.mk (J : Type*)
    [W.RespectsIso] [HasProductsOfShape J C]
    (hW : ∀ (X₁ X₂ : J → C) (f : ∀ j, X₁ j ⟶ X₂ j) (_ : ∀ (j : J), W (f j)),
      W (Pi.map f)) : W.IsStableUnderProductsOfShape J

(hW : ∀ (X₁ X₂ : J → C) (f : (j : J) → X₁ j ⟶ X₂ j), (∀ (j : J), W (f j)) → W (CategoryTheory.Limits.Pi.map f))


/-- The span of two points that lie in an affine subspace is contained in that subspace. -/
theorem affineSpan_pair_le_of_mem_of_mem {p₁ p₂ : P} {s : AffineSubspace k P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) : line[k, p₁, p₂] ≤ s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ : P}
{s : AffineSubspace k P}
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)


/-- The colimit of the constant `⊥_ C` functor is `⊥_ C`. -/
@[simps inv]
def colimitConstInitial {J : Type*} [Category J] {C : Type*} [Category C] [HasInitial C] :
    colimit ((CategoryTheory.Functor.const J).obj (⊥_ C)) ≅ ⊥_ C

{J : Type u_1}
[CategoryTheory.Category.{u_3, u_1} J]
{C : Type u_2}
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.Limits.HasInitial C]

CategoryTheory.Limits.colimitConstInitial.inv =
  CategoryTheory.Limits.initial.to (CategoryTheory.Limits.colimit ((CategoryTheory.Functor.const J).obj (⊥_ C)))


/-- `UniqueMul` is preserved under embeddings that are multiplicative.

See `UniqueMul.mulHom_image_iff` for a version with swapped bundling. -/
@[to_additive
      "`UniqueAdd` is preserved under embeddings that are additive.

See `UniqueAdd.addHom_image_iff` for a version with swapped bundling."]
theorem mulHom_map_iff (f : G ↪ H) (mul : ∀ x y, f (x * y) = f x * f y) :
    UniqueMul (A.map f) (B.map f) (f a0) (f b0) ↔ UniqueMul A B a0 b0

(mul : ∀ (x y : G), f (x + y) = f x + f y)

UniqueAdd (Finset.map f A) (Finset.map f B) (f a0) (f b0) ↔ UniqueAdd A B a0 b0


/-- Construct the Beck cofork in the category of algebras. This cofork is reflexive as well as a
coequalizer.
-/
@[simps!]
def beckAlgebraCofork : Cofork (FreeCoequalizer.topMap X) (FreeCoequalizer.bottomMap X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Monad C}
(X : T.Algebra)

(CategoryTheory.Monad.beckAlgebraCofork X).pt = X


@[simp] lemma one_le_sqrt : 1 ≤ √x ↔ 1 ≤ x

1 ≤ √x ↔ 1 ≤ x


/-- A holomorphic function on a compact connected complex manifold is constant. -/
theorem apply_eq_of_compactSpace [PreconnectedSpace M] {f : M → F}
    (hf : MDifferentiable I 𝓘(ℂ, F) f) (a b : M) : f a = f b

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℂ F]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners ℂ E H}
[I.Boundaryless]
{M : Type u_4}
[TopologicalSpace M]
[CompactSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[PreconnectedSpace M]
{f : M → F}
(hf : MDifferentiable I 𝓘(ℂ, F) f)
(a b : M)


/-- The cdf is non-negative. -/
lemma cdf_nonneg (x : ℝ) : 0 ≤ cdf μ x


theorem eq_natCast' [AddMonoidHomClass F ℕ A] (f : F) (h1 : f 1 = 1) : ∀ n : ℕ, f n = n

{A : Type u_3}
{F : Type u_5}
[FunLike F ℕ A]
[AddMonoidWithOne A]
[AddMonoidHomClass F ℕ A]
(f : F)
(h1 : f 1 = 1)
(n : ℕ)


lemma hasAntidiagonal_congr (A : Type*) [AddMonoid A]
    [H1 : HasAntidiagonal A] [H2 : HasAntidiagonal A] :
    H1.antidiagonal = H2.antidiagonal

(A : Type u_2)
[AddMonoid A]
[H1 : Finset.HasAntidiagonal A]
[H2 : Finset.HasAntidiagonal A]


theorem replicate_right_injective {n : ℕ} (hn : n ≠ 0) : Injective (@replicate α n)


theorem one_def : (1 : AddAut A) = AddEquiv.refl _


theorem nat_sub (h : Irrational x) (m : ℕ) : Irrational (m - x)


/-- A ring homomorphism f : Z[X_1, X_2, ...] → R
is determined by the evaluations f(X_1), f(X_2), ... -/
@[simp]
theorem eval₂Hom_X {R : Type u} (c : ℤ →+* S) (f : MvPolynomial R ℤ →+* S) (x : MvPolynomial R ℤ) :
    eval₂ c (f ∘ X) x = f x

{S : Type v}
[CommRing S]
{R : Type u}
(c : ℤ →+* S)
(f : MvPolynomial R ℤ →+* S)
(x : MvPolynomial R ℤ)

MvPolynomial.eval₂ c (⇑f ∘ MvPolynomial.X) x = f x


theorem pow_minFac {n k : ℕ} (hk : k ≠ 0) : (n ^ k).minFac = n.minFac


@[simp]
theorem circleMap_sub_center (c : ℂ) (R : ℝ) (θ : ℝ) : circleMap c R θ - c = circleMap 0 R θ


theorem uniqueDiffWithinAt_of_mem_nhds (h : s ∈ 𝓝 x) : UniqueDiffWithinAt 𝕜 s x

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


@[to_additive]
theorem exists_orderOf_eq_exponent (hG : ExponentExists G) : ∃ g : G, orderOf g = exponent G

{G : Type u}
[AddCommMonoid G]
(hG : AddMonoid.ExponentExists G)

∃ g, addOrderOf g = AddMonoid.exponent G


lemma smul_absolutelyContinuous {c : ℝ≥0∞} : c • μ ≪ μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{c : ENNReal}


theorem Ico_union_Ico_eq_Ico {a b c : α} (hab : a ≤ b) (hbc : b ≤ c) :
    Ico a b ∪ Ico b c = Ico a c

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
{a b c : α}
(hab : a ≤ b)
(hbc : b ≤ c)

Finset.Ico a b ∪ Finset.Ico b c = Finset.Ico a c


theorem denomsClearable_C_mul_X_pow {N : ℕ} (a : R) (bu : bi * i b = 1) {n : ℕ} (r : R)
    (nN : n ≤ N) : DenomsClearable a b N (C r * X ^ n) i

{R : Type u_1}
{K : Type u_2}
[Semiring R]
[CommSemiring K]
{i : R →+* K}
{b : R}
{bi : K}
{N : ℕ}
(a : R)
(bu : bi * i b = 1)
{n : ℕ}
(r : R)
(nN : n ≤ N)

DenomsClearable a b N (Polynomial.C r * Polynomial.X ^ n) i


@[to_additive (attr := simp)]
theorem OneHom.toFun_eq_coe [One M] [One N] (f : OneHom M N) : f.toFun = f

{M : Type u_4}
{N : Type u_5}
[Zero M]
[Zero N]
(f : ZeroHom M N)


theorem inv_as_inv {x y : SingleObj G} (f : x ⟶ y) : inv f = f⁻¹

(G : Type u)
[Group G]
{x y : CategoryTheory.SingleObj G}
(f : x ⟶ y)


theorem derivedSeries_eq_bot_iff (k : ℕ) :
    derivedSeries R I k = ⊥ ↔ derivedSeriesOfIdeal R L k I = ⊥

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
(k : ℕ)

LieAlgebra.derivedSeries R (↥↑I) k = ⊥ ↔ LieAlgebra.derivedSeriesOfIdeal R L k I = ⊥


theorem nodup_iff_sublist {l : List α} : Nodup l ↔ ∀ a, ¬[a, a] <+ l


theorem impartial_iff_aux {G : PGame} : G.Impartial ↔ G.ImpartialAux


@[simp]
theorem ofSet_symm : (ofSet s).symm = ofSet s

{α : Type u}
(s : Set α)
[DecidablePred fun x => x ∈ s]


/-- NB: `Nat.card` is defined to be `0` for infinite types. -/
theorem card_eq_zero_of_injective [Nonempty α] {f : α → β} (hf : Function.Injective f)
    (h : Nat.card α = 0) : Nat.card β = 0

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
{f : α → β}
(hf : Function.Injective f)
(h : Nat.card α = 0)


/-- If `edist (f n) (f (n+1))` is bounded by `C * r^n`, then the distance from
`f n` to the limit of `f` is bounded above by `C * r^n / (1 - r)`. -/
theorem edist_le_of_edist_le_geometric_of_tendsto {a : α} (ha : Tendsto f atTop (𝓝 a)) (n : ℕ) :
    edist (f n) a ≤ C * r ^ n / (1 - r)

(hu : ∀ (n : ℕ), edist (f n) (f (n + 1)) ≤ C * r ^ n)

(ha : Filter.Tendsto f Filter.atTop (𝓝 a))


theorem fstIdx_ne_iff {w : Word M} {i} :
    fstIdx w ≠ some i ↔ ∀ l ∈ w.toList.head?, i ≠ Sigma.fst l

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
{w : Monoid.CoprodI.Word M}
{i : ι}

w.fstIdx ≠ some i ↔ ∀ l ∈ w.toList.head?, i ≠ l.fst


/-- The cokernel of `g.unop` is the opposite of `kernel g`. -/
@[simps!]
def cokernelUnopOp : Opposite.op (cokernel g.unop) ≅ kernel g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

(CategoryTheory.cokernelUnopOp g).hom =
  CategoryTheory.Limits.kernel.lift g (CategoryTheory.Limits.cokernel.π g.unop).op ⋯


theorem eval₂_gcd_eq_zero [CommSemiring k] [DecidableEq R]
    {ϕ : R →+* k} {f g : R[X]} {α : k} (hf : f.eval₂ ϕ α = 0)
    (hg : g.eval₂ ϕ α = 0) : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0

{R : Type u}
{k : Type y}
[Field R]
[CommSemiring k]
[DecidableEq R]
{ϕ : R →+* k}
{f g : R[X]}
{α : k}
(hf : Polynomial.eval₂ ϕ α f = 0)
(hg : Polynomial.eval₂ ϕ α g = 0)

Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0


@[to_additive]
theorem prod_subset_one_on_sdiff [DecidableEq α] (h : s₁ ⊆ s₂) (hg : ∀ x ∈ s₂ \ s₁, g x = 1)
    (hfg : ∀ x ∈ s₁, f x = g x) : ∏ i ∈ s₁, f i = ∏ i ∈ s₂, g i

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f g : α → β}
[AddCommMonoid β]
[DecidableEq α]
(h : s₁ ⊆ s₂)
(hg : ∀ x ∈ s₂ \ s₁, g x = 0)
(hfg : ∀ x ∈ s₁, f x = g x)


nonrec theorem integral_non_aestronglyMeasurable
    (hf : ¬AEStronglyMeasurable f (μ.restrict (Ι a b))) :
    ∫ x in a..b, f x ∂μ = 0

(hf : ¬MeasureTheory.AEStronglyMeasurable f (μ.restrict (Ι a b)))


lemma lt_of_smul_lt_smul_left [PosSMulReflectLT α β] (h : a • b₁ < a • b₂) (ha : 0 ≤ a) : b₁ < b₂

{α : Type u_1}
{β : Type u_2}
{a : α}
{b₁ b₂ : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[PosSMulReflectLT α β]
(h : a • b₁ < a • b₂)
(ha : 0 ≤ a)


lemma injOn_weightSpace [NoZeroSMulDivisors R M] :
    InjOn (fun (χ : L → R) ↦ weightSpace M χ) {χ | weightSpace M χ ≠ ⊥}

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[NoZeroSMulDivisors R M]

Set.InjOn (fun χ => LieModule.weightSpace M χ) {χ | LieModule.weightSpace M χ ≠ ⊥}


@[simp]
theorem mem_intrinsicClosure :
    x ∈ intrinsicClosure 𝕜 s ↔ ∃ y, y ∈ closure ((↑) ⁻¹' s : Set <| affineSpan 𝕜 s) ∧ ↑y = x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
{s : Set P}
{x : P}

x ∈ intrinsicClosure 𝕜 s ↔ ∃ y ∈ closure (Subtype.val ⁻¹' s), ↑y = x


theorem fderivWithin_derivWithin : (fderivWithin 𝕜 f s x : 𝕜 → F) 1 = derivWithin f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}

(fderivWithin 𝕜 f s x) 1 = derivWithin f s x


@[to_additive (attr := simp)]
theorem preimage_mul_left_one : preimage 1 (a * ·) (mul_right_injective _).injOn = {a⁻¹}

Finset.preimage 1 (fun x => a * x) ⋯ = {a⁻¹}


@[simp]
theorem Homeomorph.smulOfNeZero_symm_apply {c : G₀} (hc : c ≠ 0) :
    ⇑(Homeomorph.smulOfNeZero c hc).symm = (c⁻¹ • · : α → α)

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)

⇑(Homeomorph.smulOfNeZero c hc).symm = fun x => c⁻¹ • x


theorem le_degree_of_ne_zero (h : coeff p n ≠ 0) : (n : WithBot ℕ) ≤ degree p

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(h : p.coeff n ≠ 0)


@[simp]
theorem mem_carrier_iff (A : Subspace K V) (x : ℙ K V) : x ∈ A.carrier ↔ x ∈ A

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
(A : Projectivization.Subspace K V)
(x : Projectivization K V)


lemma IsPointwiseLeftKanExtension.hom_ext (h : E.IsPointwiseLeftKanExtension)
    {G : LeftExtension L F} {f₁ f₂ : E ⟶ G} : f₁ = f₂

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
{E : L.LeftExtension F}
(h : E.IsPointwiseLeftKanExtension)
{G : L.LeftExtension F}
{f₁ f₂ : E ⟶ G}


@[simp]
theorem BinaryBicone.inlCokernelCofork_π : (BinaryBicone.inlCokernelCofork c).π = c.snd

(c : CategoryTheory.Limits.BinaryBicone X Y)

CategoryTheory.Limits.Cofork.π c.inlCokernelCofork = c.snd


/-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor D T)
(X : T)

∀ {X_1 Y : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)}
  (f : X_1 ⟶ Y), ((CategoryTheory.CostructuredArrow.toOver F X).map f).left = F.map f.left


/-- The units group of `S →ₐ[R] S` is `S ≃ₐ[R] S`.
See `LinearMap.GeneralLinearGroup.generalLinearEquiv` for the linear map version. -/
@[simps]
def algHomUnitsEquiv (R S : Type*) [CommSemiring R] [Semiring S] [Algebra R S] :
    (S →ₐ[R] S)ˣ ≃* (S ≃ₐ[R] S)

(R : Type u_1)
(S : Type u_2)
[CommSemiring R]
[Semiring S]
[Algebra R S]
(f : S ≃ₐ[R] S)

↑((AlgEquiv.algHomUnitsEquiv R S).symm f) = ↑f


theorem and_iff_right_of_imp (h : b → a) : (a ∧ b) ↔ b


lemma measurable_up : Measurable (ULift.up : α → ULift α)


@[simp]
theorem arsinh_eq_zero_iff : arsinh x = 0 ↔ x = 0


@[simp, norm_cast]
theorem intCast_imJ (z : ℤ) : (z : ℍ[R]).imJ = 0


theorem two_dvd_centralBinom_of_one_le {n : ℕ} (h : 0 < n) : 2 ∣ centralBinom n


@[simp]
theorem map_eq_iff {x y : F} : f₁ x = f₁ y ↔ x = y

{R : Type u_1}
{R₂ : Type u_2}
{E₂ : Type u_6}
{F : Type u_9}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E₂]
[Module R₂ E₂]
[NormedAddCommGroup F]
[Module R F]
(f₁ : F →ₛₗᵢ[σ₁₂] E₂)
{x y : F}


@[simp]
theorem measure_iUnion_toMeasurable [Countable β] (s : β → Set α) :
    μ (⋃ b, toMeasurable μ (s b)) = μ (⋃ b, s b)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable β]
(s : β → Set α)

μ (⋃ b, MeasureTheory.toMeasurable μ (s b)) = μ (⋃ b, s b)


/-- **Ruzsa's covering lemma**. -/
@[to_additive "**Ruzsa's covering lemma**"]
theorem exists_subset_mul_div (ht : t.Nonempty) :
    ∃ u : Finset α, u.card * t.card ≤ (s * t).card ∧ s ⊆ u * t / t

{α : Type u_1}
[DecidableEq α]
[CommGroup α]
(s : Finset α)
{t : Finset α}
(ht : t.Nonempty)

∃ u, u.card * t.card ≤ (s * t).card ∧ s ⊆ u * t / t


@[simp]
lemma decomposeAlgEquiv_symm_apply (a : ⨁ i, 𝒜 i) :
    (decomposeAlgEquiv 𝒜).symm a = (decompose 𝒜).symm a

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
[Semiring A]
[Algebra R A]
(𝒜 : ι → Submodule R A)
[GradedAlgebra 𝒜]
(a : ⨁ (i : ι), ↥(𝒜 i))

(DirectSum.decomposeAlgEquiv 𝒜).symm a = (DirectSum.decompose 𝒜).symm a


lemma cfc_pow_id (a : A) (n : ℕ) (ha : p a := by cfc_tac) : cfc (· ^ n : R → R) a = a ^ n

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : A)
(n : ℕ)
(ha : p a := by cfc_tac)


theorem iIndep.indep
    (h_indep : iIndep m μ) {i j : ι} (hij : i ≠ j) : Indep (m i) (m j) μ

(h_indep : ProbabilityTheory.iIndep m μ)


theorem condexp_sub (hf : Integrable f μ) (hg : Integrable g μ) :
    μ[f - g|m] =ᵐ[μ] μ[f|m] - μ[g|m]

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → F'}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)


lemma dist_inf_sup_pi (x y : ι → ℝ) : dist (x ⊓ y) (x ⊔ y) = dist x y

{ι : Type u_2}
[Fintype ι]
(x y : ι → ℝ)


@[simp]
lemma map_self : map p f φ (id_comp f).symm φ = 𝟙 a

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
[CategoryTheory.Category.{v₂, u₂} 𝒳]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsStronglyCartesian f φ]

CategoryTheory.Functor.IsStronglyCartesian.map p f φ ⋯ φ = 𝟙 a


theorem measurable_join : Measurable (join : Measure (Measure α) → Measure α)


theorem mem_coclosedLindelof : s ∈ coclosedLindelof X ↔
    ∃ t, IsClosed t ∧ IsLindelof t ∧ tᶜ ⊆ s

{X : Type u}
[TopologicalSpace X]
{s : Set X}

s ∈ Filter.coclosedLindelof X ↔ ∃ t, IsClosed t ∧ IsLindelof t ∧ tᶜ ⊆ s


@[simp]
theorem binaryProductCone_snd (X Y : Type u) : (binaryProductCone X Y).snd = _root_.Prod.snd

(CategoryTheory.Limits.Types.binaryProductCone X Y).snd = Prod.snd


@[simp]
theorem lanCompIsoWhisker_hom_right :
    (lanCompIsoWhisker f g h).hom.right = lanDesc ((lanLeftExtension f g).whisker h)

[CategoryTheory.Bicategory.Lan.CommuteWith f g h]

(CategoryTheory.Bicategory.Lan.CommuteWith.lanCompIsoWhisker f g h).hom.right =
  CategoryTheory.Bicategory.lanDesc ((CategoryTheory.Bicategory.lanLeftExtension f g).whisker h)


@[simp] theorem mem_append {a : α} {s t : Array α} : a ∈ s ++ t ↔ a ∈ s ∨ a ∈ t


lemma isNilRegular_iff_natTrailingDegree_charpoly_eq_nilRank :
    IsNilRegular φ x ↔ (φ x).charpoly.natTrailingDegree = nilRank φ

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Module.Free R M]
[Module.Finite R M]
[Module.Finite R L]
[Module.Free R L]
[Nontrivial R]
(x : L)

φ.IsNilRegular x ↔ (LinearMap.charpoly (φ x)).natTrailingDegree = φ.nilRank


/-- The monoid of natural transformations of the identity is commutative.-/
lemma id_comm (α β : (𝟭 C) ⟶ (𝟭 C)) : α ≫ β = β ≫ α

(α β : CategoryTheory.Functor.id C ⟶ CategoryTheory.Functor.id C)

CategoryTheory.CategoryStruct.comp α β = CategoryTheory.CategoryStruct.comp β α


/-- Let `f : ℝ → ℝ` be a differentiable function. If `C ≤ f'`, then `f` grows at least as fast
as `C * x`, i.e., `C * (y - x) ≤ f y - f x` whenever `x ≤ y`. -/
theorem mul_sub_le_image_sub_of_le_deriv {f : ℝ → ℝ} (hf : Differentiable ℝ f) {C}
    (hf'_ge : ∀ x, C ≤ deriv f x) ⦃x y⦄ (hxy : x ≤ y) : C * (y - x) ≤ f y - f x

{f : ℝ → ℝ}
(hf : Differentiable ℝ f)
{C : ℝ}
(hf'_ge : ∀ (x : ℝ), C ≤ deriv f x)
⦃x y : ℝ⦄
(hxy : x ≤ y)


/-- The map part of the functor `CondensedSet ⥤ TopCat`  -/
@[simps]
def toTopCatMap : X.toTopCat ⟶ Y.toTopCat

∀ (a : X.val.obj (Opposite.op (CompHaus.of PUnit.{u + 1}))),
  (CondensedSet.toTopCatMap f) a = f.val.app (Opposite.op (CompHaus.of PUnit.{u + 1})) a


lemma toRatCDF_of_isRatStieltjesPoint {a : α} (h : IsRatStieltjesPoint f a) (q : ℚ) :
    toRatCDF f a q = f a q

{f : α → ℚ → ℝ}

(h : ProbabilityTheory.IsRatStieltjesPoint f a)

ProbabilityTheory.toRatCDF f a q = f a q


theorem filter_apply_ne_zero_iff (a : α) : (p.filter s h) a ≠ 0 ↔ a ∈ s ∧ a ∈ p.support

{α : Type u_1}
{p : PMF α}
{s : Set α}
(h : ∃ a ∈ s, a ∈ p.support)
(a : α)


@[ext]
theorem ext (A B : SpecialLinearGroup n R) : (∀ i j, ↑ₘA i j = ↑ₘB i j) → A = B

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


/-- Two equivalent partial homeomorphisms have coinciding `invFun` on the target -/
theorem EqOnSource.symm_eqOn_target {e e' : PartialHomeomorph X Y} (h : e ≈ e') :
    EqOn e.symm e'.symm e.target

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e e' : PartialHomeomorph X Y}
(h : e ≈ e')


@[simp 1100] lemma fourierPowSMulRight_apply {f : V → E} {v : V} {n : ℕ} {m : Fin n → W} :
    fourierPowSMulRight L f v n m = (- (2 * π * I))^n • (∏ i, L v (m i)) • f v

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
{f : V → E}
{v : V}
{n : ℕ}
{m : Fin n → W}

(VectorFourier.fourierPowSMulRight L f v n) m = (-(2 * ↑π * Complex.I)) ^ n • (∏ i : Fin n, (L v) (m i)) • f v


theorem lifts_iff_ringHom_rangeS (p : S[X]) : p ∈ lifts f ↔ p ∈ (mapRingHom f).rangeS

{R : Type u}
[Semiring R]
{S : Type v}
[Semiring S]
{f : R →+* S}
(p : S[X])

p ∈ Polynomial.lifts f ↔ p ∈ (Polynomial.mapRingHom f).rangeS


@[simp]
theorem prodProdProdComm_toMulEquiv :
    (prodProdProdComm R R' S S' : _ ≃* _) = MulEquiv.prodProdProdComm R R' S S'

(R : Type u_3)
(R' : Type u_4)
(S : Type u_5)
(S' : Type u_6)
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring R']
[NonAssocSemiring S']

↑(RingEquiv.prodProdProdComm R R' S S') = MulEquiv.prodProdProdComm R R' S S'


lemma self_natCast_mul : Commute a (n * a)

{α : Type u_1}
[Semiring α]
(a : α)
(n : ℕ)


theorem chromaticNumber_mono_of_embedding {V' : Type*} {G' : SimpleGraph V'}
    (f : G ↪g G') : G.chromaticNumber ≤ G'.chromaticNumber

{V : Type u}
{G : SimpleGraph V}
{V' : Type u_3}
{G' : SimpleGraph V'}
(f : G ↪g G')


/-- Laplacian expansion of the determinant of an `n+1 × n+1` matrix along row `i`. -/
theorem det_succ_row {n : ℕ} (A : Matrix (Fin n.succ) (Fin n.succ) R) (i : Fin n.succ) :
    det A =
      ∑ j : Fin n.succ, (-1) ^ (i + j : ℕ) * A i j * det (A.submatrix i.succAbove j.succAbove)

A.det = ∑ j : Fin n.succ, (-1) ^ (↑i + ↑j) * A i j * (A.submatrix i.succAbove j.succAbove).det


@[to_additive (attr := simp)]
theorem smul_div_one {p : R} {r : X} {s : S} : (p /ₒ s) • (r /ₒ 1) = (p • r) /ₒ s

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
{p : R}
{r : X}
{s : ↥S}


lemma Multiset.nat_divisors_prod (s : Multiset ℕ) : divisors s.prod = (s.map divisors).prod

s.prod.divisors = (Multiset.map Nat.divisors s).prod


@[simp]
theorem neg_le_neg_iff {x y : PGame} : -y ≤ -x ↔ x ≤ y


@[simp]
lemma toAdd_eq_zero {α : Type*} [Zero α] {x : Multiplicative α} :
    Multiplicative.toAdd x = 0 ↔ x = 1

{α : Type u_1}
[Zero α]
{x : Multiplicative α}


theorem filter_le_of_top_le {n m l : ℕ} (hml : m ≤ l) : ((Ico n m).filter fun x => l ≤ x) = []

List.filter (fun x => decide (l ≤ x)) (List.Ico n m) = []


theorem surjOn_cos : SurjOn cos (Icc 0 π) (Icc (-1) 1)

Set.SurjOn Real.cos (Set.Icc 0 Real.pi) (Set.Icc (-1) 1)


theorem hitting_le {m : ι} (ω : Ω) : hitting u s n m ω ≤ m

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrder ι]
{u : ι → Ω → β}
{s : Set β}
{n m : ι}
(ω : Ω)


theorem coe_LpSubmodule : (LpSubmodule E p μ 𝕜).toAddSubgroup = Lp E p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]

(MeasureTheory.Lp.LpSubmodule E p μ 𝕜).toAddSubgroup = MeasureTheory.Lp E p μ


/-- If the symmetric difference of two negative sets is a null-set, then so are the differences
between the two sets. -/
theorem of_diff_eq_zero_of_symmDiff_eq_zero_negative (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hsu : s ≤[u] 0) (hsv : s ≤[v] 0) (hs : s (u ∆ v) = 0) : s (u \ v) = 0 ∧ s (v \ u) = 0

(hsu : MeasureTheory.VectorMeasure.restrict s u ≤ MeasureTheory.VectorMeasure.restrict 0 u)

(hsv : MeasureTheory.VectorMeasure.restrict s v ≤ MeasureTheory.VectorMeasure.restrict 0 v)


/-- Radon-Nikodym derivative of a sum of two measures.
See also `rnDeriv_add'`, which requires sigma-finite `ν₁`, `ν₂` and `μ`. -/
lemma rnDeriv_add (ν₁ ν₂ μ : Measure α) [IsFiniteMeasure ν₁] [IsFiniteMeasure ν₂]
    [ν₁.HaveLebesgueDecomposition μ] [ν₂.HaveLebesgueDecomposition μ]
    [(ν₁ + ν₂).HaveLebesgueDecomposition μ] :
    (ν₁ + ν₂).rnDeriv μ =ᵐ[μ] ν₁.rnDeriv μ + ν₂.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
(ν₁ ν₂ μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure ν₁]
[MeasureTheory.IsFiniteMeasure ν₂]
[ν₁.HaveLebesgueDecomposition μ]
[ν₂.HaveLebesgueDecomposition μ]
[(ν₁ + ν₂).HaveLebesgueDecomposition μ]


/-- If `F` and `G` are naturally isomorphic functors, then they have equivalent categories of
cocones.
-/
@[simps]
def precomposeEquivalence {G : J ⥤ C} (α : G ≅ F) : Cocone F ≌ Cocone G

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
(α : G ≅ F)

(CategoryTheory.Limits.Cocones.precomposeEquivalence α).functor = CategoryTheory.Limits.Cocones.precompose α.hom


@[to_additive]
theorem le_iff_exists_mul' : a ≤ b ↔ ∃ c, b = c * a

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a b : α}


theorem setIntegral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
    {s : Set Ω} (hs : MeasurableSet[ℱ i] s) : ∫ ω in s, f i ω ∂μ = ∫ ω in s, f j ω ∂μ

∫ (ω : Ω) in s, f i ω ∂μ = ∫ (ω : Ω) in s, f j ω ∂μ


theorem prodMap_def : prodMap f g = (f.comp (fst R S)).prod (g.comp (snd R S))

{R : Type u_3}
{R' : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring R']
[NonAssocSemiring S']
(f : R →+* R')
(g : S →+* S')

f.prodMap g = (f.comp (RingHom.fst R S)).prod (g.comp (RingHom.snd R S))


theorem comp_symm_of_uniformity {s : Set (α × α)} (hs : s ∈ 𝓤 α) :
    ∃ t ∈ 𝓤 α, (∀ {a b}, (a, b) ∈ t → (b, a) ∈ t) ∧ t ○ t ⊆ s

{α : Type ua}
[UniformSpace α]
{s : Set (α × α)}
(hs : s ∈ 𝓤 α)

∃ t ∈ 𝓤 α, (∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t) ∧ t ○ t ⊆ s


/-- Rational numbers are dense in a linear ordered archimedean field. -/
theorem Rat.denseRange_cast {𝕜} [LinearOrderedField 𝕜] [TopologicalSpace 𝕜] [OrderTopology 𝕜]
    [Archimedean 𝕜] : DenseRange ((↑) : ℚ → 𝕜)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
[Archimedean 𝕜]


@[simp]
theorem symmDiff_apply [∀ i, GeneralizedCoheytingAlgebra (π i)] (a b : ∀ i, π i) (i : ι) :
    (a ∆ b) i = a i ∆ b i

[(i : ι) → GeneralizedCoheytingAlgebra (π i)]


theorem IsBigOWith.mono (h : IsBigOWith c l' f g) (hl : l ≤ l') : IsBigOWith c l f g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c : ℝ}
{f : α → E}
{g : α → F}
{l l' : Filter α}
(h : Asymptotics.IsBigOWith c l' f g)
(hl : l ≤ l')


@[simp]
theorem coconeOfIsSplitEpi_π : (coconeOfIsSplitEpi f).π = f

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

(CategoryTheory.Limits.coconeOfIsSplitEpi f).π = f


lemma Exact.exact' (hS : S.Exact) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    (S.sc' hS.toIsComplex i j k).Exact

{S : CategoryTheory.ComposableArrows C n}


/-- If `f₀, f₁, f₂, ...` and `g₀, g₁, g₂, ...` have products `a`, `b` respectively, then
the `ℤ`-indexed sequence: `..., g₂, g₁, g₀, f₀, f₁, f₂, ...` (with `f₀` at the `0`-th position) has
product `a + b`. -/
@[to_additive "If `f₀, f₁, f₂, ...` and `g₀, g₁, g₂, ...` have sums `a`, `b` respectively, then
the `ℤ`-indexed sequence: `..., g₂, g₁, g₀, f₀, f₁, f₂, ...` (with `f₀` at the `0`-th position) has
sum `a + b`."]
lemma HasProd.int_rec {f g : ℕ → M} (hf : HasProd f m) (hg : HasProd g m') :
    HasProd (Int.rec f g) (m * m')

{M : Type u_1}
[CommMonoid M]
[TopologicalSpace M]
{m m' : M}
[ContinuousMul M]
{f g : ℕ → M}
(hf : HasProd f m)
(hg : HasProd g m')

HasProd (fun t => Int.rec f g t) (m * m')


@[to_additive (attr := simp, norm_cast)]
theorem coe_ofDense [Semigroup M] [Semigroup N] {s : Set M} (f : M → N) (hs : closure s = ⊤)
    (hmul) : (ofDense f hs hmul : M → N) = f

(hmul : ∀ (x y : M), y ∈ s → f (x + y) = f x + f y)


@[simp]
theorem ρ_self_inv_apply {G : Type u} [Group G] {A : Rep k G} (g : G) (x : A) :
    A.ρ g (A.ρ g⁻¹ x) = x

{k : Type u}
[CommRing k]
{G : Type u}
[Group G]
{A : Rep k G}
(g : G)
(x : CoeSort.coe A)


/-- An induction principle for closure membership for predicates with two arguments.  -/
@[to_additive (attr := elab_as_elim)
      "An induction principle for additive closure membership for predicates with two arguments."]
theorem closure_induction₂ {p : M → M → Prop} {x} {y : M} (hx : x ∈ closure s) (hy : y ∈ closure s)
    (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (H1_left : ∀ x, p 1 x) (H1_right : ∀ x, p x 1)
    (Hmul_left : ∀ x y z, p x z → p y z → p (x * y) z)
    (Hmul_right : ∀ x y z, p z x → p z y → p z (x * y)) : p x y

(Hmul_left : ∀ (x y z : M), p x z → p y z → p (x + y) z)

(Hmul_right : ∀ (x y z : M), p z x → p z y → p z (x + y))


/-- The pull back of a complete sublattice under a complete lattice hom is a complete sublattice. -/
@[simps] def comap (L : CompleteSublattice β) : CompleteSublattice α

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
[CompleteLattice β]
(f : CompleteLatticeHom α β)
(L : CompleteSublattice β)

(CompleteSublattice.comap f L).carrier = ⇑f ⁻¹' ↑L


/-- Tensoring an exact pair on the left gives an exact pair -/
theorem lTensor_exact : Exact (lTensor Q f) (lTensor Q g)

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(Q : Type u_5)
[AddCommGroup Q]
[Module R Q]
(hfg : Function.Exact ⇑f ⇑g)
(hg : Function.Surjective ⇑g)

Function.Exact ⇑(LinearMap.lTensor Q f) ⇑(LinearMap.lTensor Q g)


theorem Subalgebra.one_mem_toNonUnitalSubalgebra (S : Subalgebra R A) :
    (1 : A) ∈ S.toNonUnitalSubalgebra

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)


@[simp]
theorem mem_inf {S T : NonUnitalSubalgebra R A} {x : A} : x ∈ S ⊓ T ↔ x ∈ S ∧ x ∈ T

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{S T : NonUnitalSubalgebra R A}
{x : A}


lemma aemeasurable_of_map_neZero {mβ : MeasurableSpace β} {μ : Measure α}
    {f : α → β} (h : NeZero (μ.map f)) :
    AEMeasurable f μ

(h : NeZero (MeasureTheory.Measure.map f μ))


protected theorem ofNat_add_out (m n : ℕ) : ↑m + ↑n = (↑(m + n) : ℤ)


@[simp]
theorem toAlgEquiv_eq_coe (f : A ≃ₐc[R] B) : f.toAlgEquiv = f

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(f : A ≃ₐc[R] B)


theorem cauchy_map_iff_exists_tendsto [CompleteSpace α] {l : Filter β} {f : β → α} [NeBot l] :
    Cauchy (l.map f) ↔ ∃ x, Tendsto f l (𝓝 x)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[CompleteSpace α]
{l : Filter β}
{f : β → α}
[l.NeBot]

Cauchy (Filter.map f l) ↔ ∃ x, Filter.Tendsto f l (𝓝 x)


theorem add_le_of_limit {a b c : Ordinal} (h : IsLimit b) : a + b ≤ c ↔ ∀ b' < b, a + b' ≤ c


@[trans]
nonrec theorem trans (h₁ : x ~ᵢ y) (h₂ : y ~ᵢ z) : x ~ᵢ z

{X : Type u_1}
[TopologicalSpace X]
{x y z : X}
(h₁ : x ~ᵢ y)
(h₂ : y ~ᵢ z)


@[reassoc (attr := simp)]
theorem fstPiMap_π (b) : I.fstPiMap ≫ Pi.π I.right b = Pi.π I.left _ ≫ I.fst b

(I : CategoryTheory.Limits.MulticospanIndex C)

CategoryTheory.CategoryStruct.comp I.fstPiMap (CategoryTheory.Limits.Pi.π I.right b) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Pi.π I.left (I.fstTo b)) (I.fst b)


/-- The inner product of two linear combinations of a set of orthonormal vectors, expressed as
a sum. -/
theorem Orthonormal.inner_sum {v : ι → E} (hv : Orthonormal 𝕜 v) (l₁ l₂ : ι → 𝕜) (s : Finset ι) :
    ⟪∑ i ∈ s, l₁ i • v i, ∑ i ∈ s, l₂ i • v i⟫ = ∑ i ∈ s, conj (l₁ i) * l₂ i

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{v : ι → E}
(hv : Orthonormal 𝕜 v)
(l₁ l₂ : ι → 𝕜)
(s : Finset ι)

⟪∑ i ∈ s, l₁ i • v i, ∑ i ∈ s, l₂ i • v i⟫_𝕜 = ∑ i ∈ s, (starRingEnd 𝕜) (l₁ i) * l₂ i


@[simp]
theorem IccExtend_val (f : Icc a b → β) (x : Icc a b) : IccExtend h f x = f x

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
(f : ↑(Set.Icc a b) → β)
(x : ↑(Set.Icc a b))


/-- If any point of a set is joined to a fixed point by a preconnected subset,
then the original set is preconnected as well. -/
theorem isPreconnected_of_forall {s : Set α} (x : α)
    (H : ∀ y ∈ s, ∃ t, t ⊆ s ∧ x ∈ t ∧ y ∈ t ∧ IsPreconnected t) : IsPreconnected s

(H : ∀ y ∈ s, ∃ t ⊆ s, x ∈ t ∧ y ∈ t ∧ IsPreconnected t)


lemma cfc_eval_X (ha : p a := by cfc_tac) : cfc (X : R[X]).eval a = a

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : A)
(ha : p a := by cfc_tac)

cfc (fun a => Polynomial.eval a Polynomial.X) a = a


@[to_additive]
protected lemma mul_div_mul_right (h : IsUnit c) (a b : α) : a * c / (b * c) = a / b

{α : Type u}
[DivisionMonoid α]
{c : α}
(h : IsUnit c)
(a b : α)


theorem compl_ne_univ_iff_nonempty (s : Finset α) : sᶜ ≠ univ ↔ s.Nonempty

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


@[simp]
theorem toLex_update_le_self_iff : toLex (update x i a) ≤ toLex x ↔ a ≤ x i

{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}

toLex (Function.update x i a) ≤ toLex x ↔ a ≤ x i


/-- Given a discrete submartingale `f` and a predictable process `ξ` (i.e. `ξ (n + 1)` is adapted)
the process defined by `fun n => ∑ k ∈ Finset.range n, ξ (k + 1) * (f (k + 1) - f k)` is also a
submartingale. -/
theorem Submartingale.sum_mul_sub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
    (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 fun n => ξ (n + 1)) (hbdd : ∀ n ω, ξ n ω ≤ R)
    (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
    Submartingale (fun n => ∑ k ∈ Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ

{ξ f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f 𝒢 μ)

(hξ : MeasureTheory.Adapted 𝒢 fun n => ξ (n + 1))

(hnonneg : ∀ (n : ℕ) (ω : Ω), 0 ≤ ξ n ω)

MeasureTheory.Submartingale (fun n => ∑ k ∈ Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ


@[simp]
theorem rootMultiplicity_pos' {p : R[X]} {x : R} :
    0 < rootMultiplicity x p ↔ p ≠ 0 ∧ IsRoot p x

{R : Type u}
[CommRing R]
{p : R[X]}
{x : R}

0 < Polynomial.rootMultiplicity x p ↔ p ≠ 0 ∧ p.IsRoot x


@[simp]
theorem mk_coe (f : α →*₀o β) (h) : OrderMonoidWithZeroHom.mk (f : α →*₀ β) h = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulZeroOneClass α]
[MulZeroOneClass β]
(f : α →*₀o β)
(h : Monotone (↑↑f).toFun)

{ toMonoidWithZeroHom := ↑f, monotone' := h } = f


@[to_additive mem_rightAddCoset_iff]
theorem mem_rightCoset_iff (a : α) : x ∈ op a • s ↔ x * a⁻¹ ∈ s

{α : Type u_1}
[AddGroup α]
{s : Set α}
{x : α}
(a : α)


/-- The type of continuous open maps from `α` to `β`, aka Priestley homomorphisms. -/
structure ContinuousOpenMap (α β : Type*) [TopologicalSpace α] [TopologicalSpace β] extends
  ContinuousMap α β where
  map_open' : IsOpenMap toFun

{α : Type u_6}
{β : Type u_7}
[TopologicalSpace α]
[TopologicalSpace β]
(self : α →CO β)


theorem le_changeOriginSeries_radius (k : ℕ) : p.radius ≤ (p.changeOriginSeries k).radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(k : ℕ)


/-- For nonzero `a`, the "multiples of `a`" map `zmultiplesHom` from `ℤ` to `ℝ` is discrete, i.e.
inverse images of compact sets are finite. -/
theorem tendsto_zmultiplesHom_cofinite {a : ℝ} (ha : a ≠ 0) :
    Tendsto (zmultiplesHom ℝ a) cofinite (cocompact ℝ)

Filter.Tendsto (⇑((zmultiplesHom ℝ) a)) Filter.cofinite (Filter.cocompact ℝ)


theorem _root_.AlgHom.fieldRange_eq_top {f : E →ₐ[F] K} :
    f.fieldRange = ⊤ ↔ Function.Surjective f

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{K : Type u_3}
[Field K]
[Algebra F K]
{f : E →ₐ[F] K}

f.fieldRange = ⊤ ↔ Function.Surjective ⇑f


/--
This is a variant of `GlueData` that only requires conditions on `V (i, j)` when `i ≠ j`.
See `GlueData.ofGlueData'`
-/
structure GlueData' where
  /-- Indexing type of a glue data. -/
  J : Type v
  /-- Objects of a glue data to be glued. -/
  U : J → C
  /-- Objects representing the intersections. -/
  V : ∀ (i j : J), i ≠ j → C
  /-- The inclusion maps of the intersection into the object. -/
  f : ∀ i j h, V i j h ⟶ U i
  f_mono : ∀ i j h, Mono (f i j h) := by infer_instance
  f_hasPullback : ∀ i j k hij hik, HasPullback (f i j hij) (f i k hik) := by infer_instance
  /-- The transition maps between the intersections. -/
  t : ∀ i j h, V i j h ⟶ V j i h.symm
  /-- The transition maps between the intersection of intersections. -/
  t' : ∀ i j k hij hik hjk,
    pullback (f i j hij) (f i k hik) ⟶ pullback (f j k hjk) (f j i hij.symm)
  t_fac : ∀ i j k hij hik hjk, t' i j k hij hik hjk ≫ pullback.snd _ _ =
    pullback.fst _ _ ≫ t i j hij
  t_inv : ∀ i j hij, t i j hij ≫ t j i hij.symm = 𝟙 _
  cocycle : ∀ i j k hij hik hjk, t' i j k hij hik hjk ≫
    t' j k i hjk hij.symm hik.symm ≫ t' k i j hik.symm hjk.symm hij = 𝟙 _

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(self : CategoryTheory.GlueData' C)
(i j : self.J)
(hij : i ≠ j)

CategoryTheory.CategoryStruct.comp (self.t i j hij) (self.t j i ⋯) = CategoryTheory.CategoryStruct.id (self.V i j hij)


@[to_additive]
theorem NeBot.of_smul_left : (f • g).NeBot → f.NeBot

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{f : Filter α}
{g : Filter β}


@[simp, nolint unusedHavesSuffices]
theorem reverseRecOn_concat {motive : List α → Sort*} (x : α) (xs : List α) (nil : motive [])
    (append_singleton : ∀ (l : List α) (a : α), motive l → motive (l ++ [a])) :
    reverseRecOn (motive := motive) (xs ++ [x]) nil append_singleton =
      append_singleton _ _ (reverseRecOn (motive := motive) xs nil append_singleton)

(append_singleton : (l : List α) → (a : α) → motive l → motive (l ++ [a]))

List.reverseRecOn (xs ++ [x]) nil append_singleton = append_singleton xs x (List.reverseRecOn xs nil append_singleton)


@[to_additive]
theorem centralizer_le (h : S ⊆ T) : centralizer T ≤ centralizer S

{M : Type u_1}
{S T : Set M}
[Monoid M]
(h : S ⊆ T)

Submonoid.centralizer T ≤ Submonoid.centralizer S


@[simp] lemma monovary_inv_left₀ (hf : StrongLT 0 f) : Monovary f⁻¹ g ↔ Antivary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{f : ι → α}
{g : ι → β}
(hf : StrongLT 0 f)


theorem restrict_inter_add_diff (s : Set α) (ht : MeasurableSet t) :
    μ.restrict (s ∩ t) + μ.restrict (s \ t) = μ.restrict s

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{t : Set α}
(s : Set α)
(ht : MeasurableSet t)


theorem dual_ordSeparatingSet :
    ordSeparatingSet (ofDual ⁻¹' s) (ofDual ⁻¹' t) = ofDual ⁻¹' ordSeparatingSet s t

{α : Type u_1}
[LinearOrder α]
{s t : Set α}

(⇑OrderDual.ofDual ⁻¹' s).ordSeparatingSet (⇑OrderDual.ofDual ⁻¹' t) = ⇑OrderDual.ofDual ⁻¹' s.ordSeparatingSet t


@[simp]
theorem restrict_coe_apply (f : M →ₗ[R] M₁) {p : Submodule R M} {q : Submodule R M₁}
    (hf : ∀ x ∈ p, f x ∈ q) (x : p) : ↑(f.restrict hf x) = f x

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
(f : M →ₗ[R] M₁)
{p : Submodule R M}
{q : Submodule R M₁}
(hf : ∀ x ∈ p, f x ∈ q)
(x : ↥p)


/-- If two sets are equal modulo a set of measure zero, then `μ s = μ t`. -/
theorem measure_congr (H : s =ᵐ[μ] t) : μ s = μ t

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(H : s =ᵐ[μ] t)


theorem not_infinite_iff_exist_lt_gt {x : ℝ*} : ¬Infinite x ↔ ∃ r s : ℝ, (r : ℝ*) < x ∧ x < s


theorem exists_eq_mul_right_of_dvd (h : a ∣ b) : ∃ c, b = a * c

{α : Type u_1}
[Semigroup α]
{a b : α}
(h : a ∣ b)


theorem EventuallyLE.le_sup_of_le_left [SemilatticeSup β] {l : Filter α} {f g h : α → β}
    (hf : h ≤ᶠ[l] f) : h ≤ᶠ[l] f ⊔ g

{α : Type u}
{β : Type v}
[SemilatticeSup β]
{l : Filter α}
{f g h : α → β}
(hf : h ≤ᶠ[l] f)


theorem prod_sub_preimage_iff {W : Set γ} {f : α × β → γ} :
    s ×ˢ t ⊆ f ⁻¹' W ↔ ∀ a b, a ∈ s → b ∈ t → f (a, b) ∈ W

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{W : Set γ}
{f : α × β → γ}

s ×ˢ t ⊆ f ⁻¹' W ↔ ∀ (a : α) (b : β), a ∈ s → b ∈ t → f (a, b) ∈ W


theorem effectiveEpiFamily_of_jointly_surjective
    {α : Type} [Finite α] {B : CompHaus.{u}}
    (X : α → CompHaus.{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)


theorem isSymm_iff_eq_flip {B : LinearMap.BilinForm R M} : B.IsSymm ↔ B = B.flip

{R : Type u_1}
{M : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}

LinearMap.IsSymm B ↔ B = LinearMap.flip B


/-- Left whiskering for morphisms of bimodule objects. -/
@[simps]
noncomputable def whiskerLeft {X Y Z : Mon_ C} (M : Bimod X Y) {N₁ N₂ : Bimod Y Z} (f : N₁ ⟶ N₂) :
    M.tensorBimod N₁ ⟶ M.tensorBimod N₂

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

(M.whiskerLeft f).hom =
  CategoryTheory.Limits.colimMap
    (CategoryTheory.Limits.parallelPairHom (M.actRight ▷ N₁.X) ((α_ M.X Y.X N₁.X).hom ≫ M.X ◁ N₁.actLeft)
      (M.actRight ▷ N₂.X) ((α_ M.X Y.X N₂.X).hom ≫ M.X ◁ N₂.actLeft) ((M.X ⊗ Y.X) ◁ f.hom) (M.X ◁ f.hom) ⋯ ⋯)


theorem extendDomain_eq_embDomain_subtype (f : Subtype P →₀ M) :
    extendDomain f = embDomain (.subtype _) f

{α : Type u_1}
{M : Type u_13}
[Zero M]
{P : α → Prop}
[DecidablePred P]
(f : Subtype P →₀ M)

f.extendDomain = Finsupp.embDomain (Function.Embedding.subtype P) f


/-- `clog b` and `pow b` form a Galois connection. -/
theorem le_pow_iff_clog_le {b : ℕ} (hb : 1 < b) {x y : ℕ} : x ≤ b ^ y ↔ clog b x ≤ y


theorem IsRefl.ortho_comm (H : B.IsRefl) {x y : M} : IsOrtho B x y ↔ IsOrtho B y x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(H : B.IsRefl)
{x y : M}


theorem csSup_image2_eq_csInf_csSup (h₁ : ∀ b, GaloisConnection (swap l b ∘ ofDual) (toDual ∘ u₁ b))
    (h₂ : ∀ a, GaloisConnection (l a) (u₂ a)) :
    s.Nonempty → BddBelow s → t.Nonempty → BddAbove t → sSup (image2 l s t) = l (sInf s) (sSup t)

{l : α → β → γ}

{u₁ : β → γ → α}

{u₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (Function.swap l b ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ u₁ b))

(h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a))

s.Nonempty → BddBelow s → t.Nonempty → BddAbove t → sSup (Set.image2 l s t) = l (sInf s) (sSup t)


lemma IsGLB.mem_of_nonempty_of_not_isPredLimit
    (hs : IsGLB s x) (hne : s.Nonempty) (hx : ¬ IsPredLimit x) : x ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
{x : α}
(hs : IsGLB s x)
(hne : s.Nonempty)
(hx : ¬Order.IsPredLimit x)


protected theorem bijective_iff_injective_and_card [Finite β] (f : α → β) :
    Bijective f ↔ Injective f ∧ Nat.card α = Nat.card β

{α : Type u_1}
{β : Type u_2}
[Finite β]
(f : α → β)

Function.Bijective f ↔ Function.Injective f ∧ Nat.card α = Nat.card β


@[to_additive dist_le_norm_add_norm]
theorem dist_le_norm_add_norm' (a b : E) : dist a b ≤ ‖a‖ + ‖b‖

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)


theorem measure_zero_of_nhdsWithin (hs : IsCompact s) :
    (∀ a ∈ s, ∃ t ∈ 𝓝[s] a, μ t = 0) → μ s = 0

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : IsCompact s)


theorem hasFDerivWithinAt_congr_set' (y : E) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
    HasFDerivWithinAt f f' s x ↔ HasFDerivWithinAt f f' t 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 t : Set E}
(y : E)
(h : s =ᶠ[𝓝[{y}ᶜ] x] t)


/-- The pointwise distance is controlled by the distance between functions, by definition. -/
theorem dist_coe_le_dist (x : α) : dist (f x) (g x) ≤ dist f g

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{f g : BoundedContinuousFunction α β}
(x : α)


theorem toMatrix_reindexEquiv_prod (e : n ≃ p) (L : List (TransvectionStruct n R)) :
    (L.map (toMatrix ∘ reindexEquiv e)).prod = reindexAlgEquiv R _ e (L.map toMatrix).prod

(L : List (Matrix.TransvectionStruct n R))

(List.map (Matrix.TransvectionStruct.toMatrix ∘ Matrix.TransvectionStruct.reindexEquiv e) L).prod =
  (Matrix.reindexAlgEquiv R R e) (List.map Matrix.TransvectionStruct.toMatrix L).prod


theorem reachable_is_equivalence : Equivalence G.Reachable


theorem lcm_mk_mk {a b : α} : lcm (Associates.mk a) (Associates.mk b) = Associates.mk (lcm a b)

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


theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s t : Set α)


lemma IsRightCancelMulZero.to_isCancelMulZero [IsRightCancelMulZero M₀] :
    IsCancelMulZero M₀

{M₀ : Type u_1}
[CommSemigroup M₀]
[Zero M₀]
[IsRightCancelMulZero M₀]


/-- Two `R`-algebra morphisms from the quaternions are equal if they agree on `i` and `j`. -/
@[ext]
theorem hom_ext ⦃f g : ℍ[R] →ₐ[R] A⦄
    (hi : f (Basis.self R).i = g (Basis.self R).i) (hj : f (Basis.self R).j = g (Basis.self R).j) :
    f = g

(hi : f (QuaternionAlgebra.Basis.self R).i = g (QuaternionAlgebra.Basis.self R).i)

(hj : f (QuaternionAlgebra.Basis.self R).j = g (QuaternionAlgebra.Basis.self R).j)


theorem degree_derivative_lt {p : R[X]} (hp : p ≠ 0) : p.derivative.degree < p.degree

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p ≠ 0)

(Polynomial.derivative p).degree < p.degree


@[simp] theorem beq_false : ∀b, (b == false) = !b


theorem fourierIntegral_continuousLinearMap_apply
    {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
    {f : V → (F →L[ℝ] E)} {a : F} {v : V} (hf : Integrable f) :
    𝓕 f v a = 𝓕 (fun x ↦ f x a) v

(hf : MeasureTheory.Integrable f MeasureTheory.volume)

(Real.fourierIntegral f v) a = Real.fourierIntegral (fun x => (f x) a) v


@[simp]
theorem gcd_add_self_right (m n : ℕ) : gcd m (n + m) = gcd m n


theorem mem_sSup_of_directedOn {S : Set (NonUnitalSubring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : R} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

(hS : DirectedOn (fun x x_1 => x ≤ x_1) S)


@[simp]
lemma inr_fst :
    (Cochain.ofHom (inr φ)).comp (fst φ).1 (zero_add 1) = 0

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)).comp ↑(CochainComplex.mappingCone.fst φ)
    ⋯ =
  0


@[to_additive]
theorem norm_div_sub_norm_div_le_norm_div (u v w : E) : ‖u / w‖ - ‖v / w‖ ≤ ‖u / v‖

{E : Type u_6}
[SeminormedGroup E]
(u v w : E)


theorem Ioi_inter_Ioo : Set.Ioi a ∩ Set.Ioo b c = Set.Ioo (max a b) c

{α : Type u_1}
[LinearOrder α]
{a b c : α}


/-- A lax monoidal functor induces a lax monoidal functor between
the categories of `G`-actions within those categories. -/
@[simps!]
def mapActionLax (F : LaxMonoidalFunctor V W) (G : MonCat.{u}) :
    LaxMonoidalFunctor (Action V G) (Action W G)

(F : CategoryTheory.LaxMonoidalFunctor V W)

∀ {X Y : Action V G} (a : X ⟶ Y), ((CategoryTheory.MonoidalFunctor.mapActionLax F G).map a).hom = F.map a.hom


/-- An increasing function is injective -/
theorem injective_of_increasing (r : α → α → Prop) (s : β → β → Prop) [IsTrichotomous α r]
    [IsIrrefl β s] (f : α → β) (hf : ∀ {x y}, r x y → s (f x) (f y)) : Injective f

(hf : ∀ {x y : α}, r x y → s (f x) (f y))


theorem ne_zero_of_mem_roots (h : a ∈ p.roots) : p ≠ 0

{R : Type u}
{a : R}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
(h : a ∈ p.roots)


@[to_additive]
theorem smul_set_subset_smul {s : Set α} : a ∈ s → a • t ⊆ s • t

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


theorem CliqueFreeOn.mono (hmn : m ≤ n) (hG : G.CliqueFreeOn s m) : G.CliqueFreeOn s n

{α : Type u_1}
(G : SimpleGraph α)
{s : Set α}
{m n : ℕ}
(hmn : m ≤ n)
(hG : G.CliqueFreeOn s m)


/-- Given `pb : PowerBasis K S`, the trace of `pb.gen` is `-(minpoly K pb.gen).nextCoeff`. -/
theorem PowerBasis.trace_gen_eq_nextCoeff_minpoly [Nontrivial S] (pb : PowerBasis K S) :
    Algebra.trace K S pb.gen = -(minpoly K pb.gen).nextCoeff

{S : Type u_2}
[CommRing S]
{K : Type u_4}
[Field K]
[Algebra K S]
[Nontrivial S]
(pb : PowerBasis K S)

(Algebra.trace K S) pb.gen = -(minpoly K pb.gen).nextCoeff


theorem contDiffWithinAt_insert {y : E} :
    ContDiffWithinAt 𝕜 n f (insert y s) x ↔ ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
{y : E}


theorem card_eq_succ : s.card = n + 1 ↔ ∃ a t, a ∉ t ∧ insert a t = s ∧ t.card = n

{α : Type u_1}
{s : Finset α}
{n : ℕ}
[DecidableEq α]


lemma disjoint_weightSpace [NoZeroSMulDivisors R M] {χ₁ χ₂ : L → R} (h : χ₁ ≠ χ₂) :
    Disjoint (weightSpace M χ₁) (weightSpace M χ₂)

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[NoZeroSMulDivisors R M]
{χ₁ χ₂ : L → R}
(h : χ₁ ≠ χ₂)

Disjoint (LieModule.weightSpace M χ₁) (LieModule.weightSpace M χ₂)


@[simp]
theorem fst_eps [Zero R] [One R] : fst ε = (0 : R)


theorem inl_injective [Zero A] : Function.Injective (inl : R → Unitization R A)


theorem integralNormalization_coeff_degree {f : R[X]} {i : ℕ} (hi : f.degree = i) :
    (integralNormalization f).coeff i = 1

{R : Type u}
[Semiring R]
{f : R[X]}
{i : ℕ}
(hi : f.degree = ↑i)


theorem radius_eq_top_of_forall_image_add_eq_zero (n : ℕ) (hn : ∀ m, p (m + n) = 0) :
    p.radius = ∞

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(n : ℕ)
(hn : ∀ (m : ℕ), p (m + n) = 0)


theorem isNat_natCast {R} [AddMonoidWithOne R] (n m : ℕ) :
    IsNat n m → IsNat (n : R) m

{R : Type u_1}
[AddMonoidWithOne R]
(n m : ℕ)

Mathlib.Meta.NormNum.IsNat n m → Mathlib.Meta.NormNum.IsNat (↑n) m


/-- An induction principle for closure membership for predicates with two arguments.  -/
@[to_additive (attr := elab_as_elim)
      "An induction principle for additive closure membership for predicates with two arguments."]
theorem closure_induction₂ {p : M → M → Prop} {x} {y : M} (hx : x ∈ closure s) (hy : y ∈ closure s)
    (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (H1_left : ∀ x, p 1 x) (H1_right : ∀ x, p x 1)
    (Hmul_left : ∀ x y z, p x z → p y z → p (x * y) z)
    (Hmul_right : ∀ x y z, p z x → p z y → p z (x * y)) : p x y

(Hmul_left : ∀ (x y z : M), p x z → p y z → p (x * y) z)

(Hmul_right : ∀ (x y z : M), p z x → p z y → p z (x * y))


theorem discreteTopology_iff_locallyInjective (y : Y) :
    DiscreteTopology X ↔ IsLocallyInjective fun _ : X ↦ y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(y : Y)

DiscreteTopology X ↔ IsLocallyInjective fun x => y


/-- The graph induced on `Set.univ` is isomorphic to the original graph. -/
@[simps!]
def induceUnivIso (G : SimpleGraph V) : G.induce Set.univ ≃g G

{V : Type u_1}
(G : SimpleGraph V)
(a : V)


/-- If `n` passes the Fermat primality test to base `b`, then `n` is coprime with `b`, assuming that
`n` and `b` are both positive.
-/
theorem coprime_of_probablePrime {n b : ℕ} (h : ProbablePrime n b) (h₁ : 1 ≤ n) (h₂ : 1 ≤ b) :
    Nat.Coprime n b

{n b : ℕ}
(h : n.ProbablePrime b)
(h₁ : 1 ≤ n)
(h₂ : 1 ≤ b)


theorem norm_smul_eq (h : SameRay ℝ x y) : ‖x‖ • y = ‖y‖ • x

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x y : E}
(h : SameRay ℝ x y)

‖x‖ • y = ‖y‖ • x


theorem congr_fun {f g : P →ᴬ[R] Q} (h : f = g) (x : P) : f x = g x

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]
{f g : P →ᴬ[R] Q}
(h : f = g)
(x : P)


theorem cast_neg {n : ℕ} {R} [Ring R] {a : R} :
    IsInt a (.negOfNat n) → a = (Int.negOfNat n).rawCast + 0

Mathlib.Meta.NormNum.IsInt a (Int.negOfNat n) → a = (Int.negOfNat n).rawCast + 0


theorem iInf_bool_eq {f : Bool → α} : ⨅ b : Bool, f b = f true ⊓ f false

{α : Type u_1}
[CompleteLattice α]
{f : Bool → α}


theorem cofinite.blimsup_set_eq :
    blimsup s cofinite p = { x | { n | p n ∧ x ∈ s n }.Infinite }

{α : Type u_1}
{ι : Type u_4}
{p : ι → Prop}
{s : ι → Set α}

Filter.blimsup s Filter.cofinite p = {x | {n | p n ∧ x ∈ s n}.Infinite}


@[to_additive]
theorem map_inf_eq (H K : Subgroup G) (f : G →* N) (hf : Function.Injective f) :
    map f (H ⊓ K) = map f H ⊓ map f K

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H K : AddSubgroup G)
(f : G →+ N)
(hf : Function.Injective ⇑f)

AddSubgroup.map f (H ⊓ K) = AddSubgroup.map f H ⊓ AddSubgroup.map f K


@[to_additive (attr := simp)]
theorem range_one : (1 : G →* N).range = ⊥

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]


theorem tendsto_ofReal_atTop : Tendsto ENNReal.ofReal atTop (𝓝 ∞)

Filter.Tendsto ENNReal.ofReal Filter.atTop (𝓝 ⊤)


@[simp]
theorem rightUnitor_inv_f (X : Center C) : Hom.f (ρ_ X).inv = (ρ_ X.1).inv

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


@[to_additive]
theorem supports_of_mem (ha : a ∈ s) : Supports G s a

(G : Type u_1)
{α : Type u_3}
[SMul G α]
{s : Set α}
{a : α}
(ha : a ∈ s)


lemma shift_v (a : ℤ) (p q : ℤ) (hpq : p + n = q) (p' q' : ℤ)
    (hp' : p' = p + a) (hq' : q' = q + a) :
    (γ.shift a).v p q hpq = (K.shiftFunctorObjXIso a p p' hp').hom ≫
      γ.v p' q' (by rw [hp', hq', ← hpq, add_assoc, add_comm a, add_assoc]) ≫
      (L.shiftFunctorObjXIso a q q' hq').inv

(γ : CochainComplex.HomComplex.Cochain K L n)

(γ.shift a).v p q hpq = (K.shiftFunctorObjXIso a p p' hp').hom ≫ γ.v p' q' ⋯ ≫ (L.shiftFunctorObjXIso a q q' hq').inv


@[to_additive]
theorem mul_ciInf (hf : BddBelow (range f)) (a : G) : (a * ⨅ i, f i) = ⨅ i, a * f i

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


@[to_additive (attr := simp)]
theorem bot_smul : (⊥ : Filter α) • g = ⊥

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{g : Filter β}


/-- An **e-transform**. Turns `(s, t)` into `(s ∩ s • e, t ∪ e⁻¹ • t)`. This reduces the
product of the two sets. -/
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s ∩ s +ᵥ e, t ∪ -e +ᵥ t)`. This reduces the sum of the two sets."]
def mulETransformLeft : Finset α × Finset α

{α : Type u_1}
[DecidableEq α]
[Group α]
(e : α)
(x : Finset α × Finset α)

(Finset.mulETransformLeft e x).2 = x.2 ∪ e⁻¹ • x.2


theorem map_projective (adj : F ⊣ G) [G.PreservesEpimorphisms] (P : C) (hP : Projective P) :
    Projective (F.obj P)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
{F : C ⥤ D}
{G : D ⥤ C}
(adj : F ⊣ G)
[G.PreservesEpimorphisms]
(P : C)
(hP : CategoryTheory.Projective P)


/-- If the product comparison morphism is an iso, its inverse is natural. -/
@[reassoc]
theorem prodComparison_inv_natural (f : A ⟶ A') (g : B ⟶ B') [IsIso (prodComparison F A B)]
    [IsIso (prodComparison F A' B')] :
    inv (prodComparison F A B) ≫ F.map (prod.map f g) =
      prod.map (F.map f) (F.map g) ≫ inv (prodComparison F A' B')

[CategoryTheory.Limits.HasBinaryProduct (F.obj A) (F.obj B)]

[CategoryTheory.Limits.HasBinaryProduct (F.obj A') (F.obj B')]

[CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison F A B)]

[CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison F A' B')]

CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A B) ≫ F.map (CategoryTheory.Limits.prod.map f g) =
  CategoryTheory.Limits.prod.map (F.map f) (F.map g) ≫ CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A' B')


theorem num_isRoot_scaleRoots_of_aeval_eq_zero [UniqueFactorizationMonoid A] {p : A[X]} {x : K}
    (hr : aeval x p = 0) : IsRoot (scaleRoots p (den A x)) (num A x)

{A : Type u_1}
{K : Type u_2}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDomain A]
[UniqueFactorizationMonoid A]
{p : A[X]}
{x : K}
(hr : (Polynomial.aeval x) p = 0)

(p.scaleRoots ↑(IsFractionRing.den A x)).IsRoot (IsFractionRing.num A x)


theorem add_isNormal (a : Ordinal) : IsNormal (a + ·)


/-- The invariants of the representation `linHom X.ρ Y.ρ` correspond to the representation
homomorphisms from `X` to `Y`. -/
@[simps]
def invariantsEquivRepHom (X Y : Rep k G) : (linHom X.ρ Y.ρ).invariants ≃ₗ[k] X ⟶ Y

{k : Type u}
[CommRing k]
{G : Grp}
(X Y : Rep k ↑G)
(f : X ⟶ Y)

↑((Representation.linHom.invariantsEquivRepHom X Y).symm f) = f.hom


theorem preimage_symm (h : X ≃ₜ Y) : preimage h.symm = image h

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


/-- A continuous affine map between normed vector spaces is smooth. -/
theorem contDiff {n : ℕ∞} (f : V →ᴬ[𝕜] W) : ContDiff 𝕜 n f

{𝕜 : Type u_1}
{V : Type u_2}
{W : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup V]
[NormedSpace 𝕜 V]
[NormedAddCommGroup W]
[NormedSpace 𝕜 W]
{n : ℕ∞}
(f : V →ᴬ[𝕜] W)


lemma isUnit_prime_of_not_dvd {n p : ℕ} (hp : p.Prime) (h : ¬ p ∣ n) : IsUnit (p : ZMod n)

{n p : ℕ}
(hp : Nat.Prime p)
(h : ¬p ∣ n)


theorem compl_sSup : (sSup s)ᶜ = ⨅ i ∈ s, iᶜ

{α : Type u}
[CompleteBooleanAlgebra α]
{s : Set α}


@[simp]
theorem isBigOWith_norm_right : (IsBigOWith c l f fun x => ‖g' x‖) ↔ IsBigOWith c l f g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{c : ℝ}
{f : α → E}
{g' : α → F'}
{l : Filter α}

(Asymptotics.IsBigOWith c l f fun x => ‖g' x‖) ↔ Asymptotics.IsBigOWith c l f g'


@[simp]
theorem map_sub_int (x : ℝ) (n : ℤ) : f (x - n) = f x - n


theorem dist_le_tsum_of_dist_le_of_tendsto₀ (d : ℕ → ℝ) (hf : ∀ n, dist (f n) (f n.succ) ≤ d n)
    (hd : Summable d) (ha : Tendsto f atTop (𝓝 a)) : dist (f 0) a ≤ tsum d

(hf : ∀ (n : ℕ), dist (f n) (f n.succ) ≤ d n)

(ha : Filter.Tendsto f Filter.atTop (𝓝 a))


@[simp]
theorem isSymm_zero : (0 : BilinForm R M).IsSymm

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]


theorem biproduct.lift_eq {T : C} {g : ∀ j, T ⟶ f j} :
    biproduct.lift g = ∑ j, g j ≫ biproduct.ι f j

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{J : Type}
[Fintype J]
{f : J → C}
[CategoryTheory.Limits.HasBiproduct f]
{T : C}
{g : (j : J) → T ⟶ f j}

CategoryTheory.Limits.biproduct.lift g = ∑ j : J, g j ≫ CategoryTheory.Limits.biproduct.ι f j


@[simp]
theorem trans_apply (e₁ : A ≃⋆ₐ[R] B) (e₂ : B ≃⋆ₐ[R] C) (x : A) : (e₁.trans e₂) x = e₂ (e₁ x)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
[Add C]
[Mul C]
[SMul R C]
[Star C]
(e₁ : A ≃⋆ₐ[R] B)
(e₂ : B ≃⋆ₐ[R] C)
(x : A)


theorem countable_of_injective_of_countable_image {s : Set α} {f : α → β} (hf : InjOn f s)
    (hs : (f '' s).Countable) : s.Countable

{α : Type u}
{β : Type v}
{s : Set α}
{f : α → β}
(hf : Set.InjOn f s)
(hs : (f '' s).Countable)


theorem support_C_mul_X {c : R} (h : c ≠ 0) : Polynomial.support (C c * X) = singleton 1

{R : Type u}
[Semiring R]
{c : R}
(h : c ≠ 0)

(Polynomial.C c * Polynomial.X).support = {1}


@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b

[(i : ι) → CanonicallyOrderedAddCommMonoid (α i)]

DFinsupp.single i (a - b) = DFinsupp.single i a - DFinsupp.single i b


@[reassoc (attr := simp)]
theorem isoRestrict_inv_ofRestrict : (isoRestrict f).inv ≫ f = Y.ofRestrict _

{X Y : AlgebraicGeometry.SheafedSpace C}

[H : AlgebraicGeometry.SheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.SheafedSpace.IsOpenImmersion.isoRestrict f).inv ≫ f = Y.ofRestrict ⋯


theorem CondIndepSets.condIndepSet_of_mem (hs : s ∈ S) (ht : t ∈ T)
    (hs_meas : MeasurableSet s) (ht_meas : MeasurableSet t) (μ : Measure Ω) [IsFiniteMeasure μ]
    (h_indep : CondIndepSets m' hm' S T μ) :
    CondIndepSet m' hm' s t μ

(h_indep : ProbabilityTheory.CondIndepSets m' hm' S T μ)

ProbabilityTheory.CondIndepSet m' hm' s t μ


/-- GCD monoid: a `CancelCommMonoidWithZero` with `gcd` (greatest common divisor) and
`lcm` (least common multiple) operations, determined up to a unit. The type class focuses on `gcd`
and we derive the corresponding `lcm` facts from `gcd`.
-/
class GCDMonoid (α : Type*) [CancelCommMonoidWithZero α] where
  /-- The greatest common divisor between two elements. -/
  gcd : α → α → α
  /-- The least common multiple between two elements. -/
  lcm : α → α → α
  /-- The GCD is a divisor of the first element. -/
  gcd_dvd_left : ∀ a b, gcd a b ∣ a
  /-- The GCD is a divisor of the second element. -/
  gcd_dvd_right : ∀ a b, gcd a b ∣ b
  /-- Any common divisor of both elements is a divisor of the GCD. -/
  dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b
  /-- The product of two elements is `Associated` with the product of their GCD and LCM. -/
  gcd_mul_lcm : ∀ a b, Associated (gcd a b * lcm a b) (a * b)
  /-- `0` is left-absorbing. -/
  lcm_zero_left : ∀ a, lcm 0 a = 0
  /-- `0` is right-absorbing. -/
  lcm_zero_right : ∀ a, lcm a 0 = 0

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : GCDMonoid α]
(a b : α)


theorem coe_toNNReal_le (x : ℝ) : (toNNReal x : ℝ) ≤ |x|


theorem IsCycleOn.pow_apply_eq {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s) {n : ℕ} :
    (f ^ n) a = a ↔ s.card ∣ n

{α : Type u_2}
{f : Equiv.Perm α}
{a : α}
{s : Finset α}
(hf : f.IsCycleOn ↑s)
(ha : a ∈ s)
{n : ℕ}


@[simp] lemma Int.range_castAddHom {A : Type*} [AddGroupWithOne A] :
    (Int.castAddHom A).range = AddSubgroup.zmultiples 1


@[simp]
theorem iInter_Ici_coe_nat : ⋂ n : ℕ, Ici (n : ℝ≥0∞) = {∞}


theorem liftRel_mk_mk {r : β → γ → Prop} {f : α → β} {g : α → γ} {hf hg} :
    LiftRel r (mk f hf : α →ₘ[μ] β) (mk g hg) ↔ ∀ᵐ a ∂μ, r (f a) (g a)

{hf : MeasureTheory.AEStronglyMeasurable f μ}

{hg : MeasureTheory.AEStronglyMeasurable g μ}

MeasureTheory.AEEqFun.LiftRel r (MeasureTheory.AEEqFun.mk f hf) (MeasureTheory.AEEqFun.mk g hg) ↔
  ∀ᵐ (a : α) ∂μ, r (f a) (g a)


/-- An `R`-algebra `A` is unramified if it is formally unramified and of finite type.

Note that the Stacks project has a different definition of unramified, and tag
<https://stacks.math.columbia.edu/tag/00UU> shows that their definition is the
same as this one.
-/
class Unramified : Prop where
  formallyUnramified : FormallyUnramified R A := by infer_instance
  finiteType : FiniteType R A := by infer_instance

{R : Type u}
[CommSemiring R]
{A : Type u}
[Semiring A]
[Algebra R A]
[self : Algebra.Unramified R A]


theorem ker_le_range_iff {f : M →ₛₗ[τ₁₂] M₂} {g : M₂ →ₛₗ[τ₂₃] M₃} :
    ker g ≤ range f ↔ f.range.mkQ.comp g.ker.subtype = 0

{R : Type u_1}
{M : Type u_2}
{R₂ : Type u_3}
{M₂ : Type u_4}
{R₃ : Type u_5}
{M₃ : Type u_6}
[Ring R]
[Ring R₂]
[Ring R₃]
[AddCommMonoid M]
[AddCommGroup M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{τ₁₂ : R →+* R₂}
{τ₂₃ : R₂ →+* R₃}
[RingHomSurjective τ₁₂]
{f : M →ₛₗ[τ₁₂] M₂}
{g : M₂ →ₛₗ[τ₂₃] M₃}

LinearMap.ker g ≤ LinearMap.range f ↔ (LinearMap.range f).mkQ ∘ₗ (LinearMap.ker g).subtype = 0


/-- The reverse direction of the equivalence `F.Elementsᵒᵖ ≅ (yoneda, F)`,
given by `CategoryTheory.yonedaEquiv`.
-/
@[simps]
def fromCostructuredArrow (F : Cᵒᵖ ⥤ Type v) : (CostructuredArrow yoneda F)ᵒᵖ ⥤ F.Elements

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

(X : (CategoryTheory.CostructuredArrow CategoryTheory.yoneda F)ᵒᵖ)

((CategoryTheory.CategoryOfElements.fromCostructuredArrow F).obj X).fst = Opposite.op (Opposite.unop X).left


theorem mem_of_models (p : T.CompleteType α) {φ : L[[α]].Sentence}
    (h : (L.lhomWithConstants α).onTheory T ⊨ᵇ φ) : φ ∈ p


/-- A functor reflects epimorphisms if morphisms that are mapped to epimorphisms are themselves
    epimorphisms. -/
class ReflectsEpimorphisms (F : C ⥤ D) : Prop where
  /-- A functor reflects epimorphisms if morphisms that are mapped to epimorphisms are themselves
      epimorphisms. -/
  reflects : ∀ {X Y : C} (f : X ⟶ Y), Epi (F.map f) → Epi f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : C ⥤ D}
[self : F.ReflectsEpimorphisms]
{X Y : C}
(f : X ⟶ Y)

CategoryTheory.Epi (F.map f) → CategoryTheory.Epi f


@[to_additive]
lemma op_smul_mul (b : β) (a₁ a₂ : α) : b <• (a₁ * a₂) = b <• a₁ <• a₂

{α : Type u_5}
{β : Type u_6}
[AddMonoid α]
[AddAction αᵃᵒᵖ β]
(b : β)
(a₁ a₂ : α)

AddOpposite.op (a₁ + a₂) +ᵥ b = AddOpposite.op a₂ +ᵥ (AddOpposite.op a₁ +ᵥ b)


/-- The identity functor on a site is cover-preserving. -/
theorem idCoverPreserving : CoverPreserving J J (𝟭 _)

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.CoverPreserving J J (𝟭 C)


theorem IsClosed.sSup_mem {s : Set α} (hs : s.Nonempty) (hc : IsClosed s) : sSup s ∈ s

{α : Type u_1}
[CompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hs : s.Nonempty)
(hc : IsClosed s)


protected theorem add_pos_right (m) (h : 0 < n) : 0 < m + n


theorem nhds_eq' (l : Filter α) : 𝓝 l = l.lift' fun s => { l' | s ∈ l' }


theorem isRelPrime_self : IsRelPrime x x ↔ IsUnit x


theorem subset_coe_one : (1 : Set M) ⊆ (1 : SubMulAction R M)

{R : Type u_1}
{M : Type u_2}
[Monoid R]
[MulAction R M]
[One M]


theorem erase_subperm (a : α) (l : List α) : l.erase a <+~ l

{α : Type u_1}
[DecidableEq α]
(a : α)
(l : List α)


@[to_additive]
theorem mul_eq_one_iff_inv_eq : a * b = 1 ↔ a⁻¹ = b


theorem lift_unique (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y⦄, r x y → f x = f y)
    (g : RingQuot r →+* T) (h : g.comp (mkRingHom r) = f) : g = lift ⟨f, w⟩

{R : Type uR}
[Semiring R]
{T : Type uT}
[Semiring T]
(f : R →+* T)
{r : R → R → Prop}
(w : ∀ ⦃x y : R⦄, r x y → f x = f y)
(g : RingQuot r →+* T)
(h : g.comp (RingQuot.mkRingHom r) = f)


@[simp] lemma mul_inv_ne_top (a : ℝ≥0∞) : a * a⁻¹ ≠ ⊤


protected theorem sup_inf_distrib_right (a b c : CauSeq α abs) : a ⊓ b ⊔ c = (a ⊔ c) ⊓ (b ⊔ c)

{α : Type u_1}
[LinearOrderedField α]
(a b c : CauSeq α abs)


@[simp]
theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0

{σ : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (MvPolynomial σ R) A]
(D : Derivation R (MvPolynomial σ R) A)
(a : R)


theorem comap_le_comap_iff {f : F} (hf : range f = ⊤) {p p'} : comap f p ≤ comap f p' ↔ p ≤ p'

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_11}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
[RingHomSurjective τ₁₂]
{f : F}
(hf : LinearMap.range f = ⊤)
{p p' : Submodule R₂ M₂}

Submodule.comap f p ≤ Submodule.comap f p' ↔ p ≤ p'


@[to_additive neg_one_zsmul_add]
lemma mul_zpow_neg_one (a b : α) : (a * b) ^ (-1 : ℤ) = b ^ (-1 : ℤ) * a ^ (-1 : ℤ)

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


theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t

{R : Type u}
[NonUnitalNonAssocSemiring R]
(s t : Set R)

NonUnitalSubsemiring.closure (s ∪ t) = NonUnitalSubsemiring.closure s ⊔ NonUnitalSubsemiring.closure t


/-- If there is a single strong epi-mono factorisation of `f`, then every image factorisation is a
    strong epi-mono factorisation. -/
theorem strongEpi_of_strongEpiMonoFactorisation {X Y : C} {f : X ⟶ Y}
    (F : StrongEpiMonoFactorisation f) {F' : MonoFactorisation f} (hF' : IsImage F') :
    StrongEpi F'.e

(F : CategoryTheory.Limits.StrongEpiMonoFactorisation f)

{F' : CategoryTheory.Limits.MonoFactorisation f}

(hF' : CategoryTheory.Limits.IsImage F')


@[simp]
theorem mem_incidenceFinset [DecidableEq V] (e : Sym2 V) :
    e ∈ G.incidenceFinset v ↔ e ∈ G.incidenceSet v

{V : Type u_1}
(G : SimpleGraph V)
(v : V)
[Fintype ↑(G.neighborSet v)]
[DecidableEq V]
(e : Sym2 V)


theorem infsep_triple (hxy : x ≠ y) (hyz : y ≠ z) (hxz : x ≠ z) :
    ({x, y, z} : Set α).infsep = dist x y ⊓ dist x z ⊓ dist y z

{α : Type u_1}
[PseudoMetricSpace α]
{x y z : α}
(hxy : x ≠ y)
(hyz : y ≠ z)
(hxz : x ≠ z)

{x, y, z}.infsep = dist x y ⊓ dist x z ⊓ dist y z


theorem derivativeFun_add (f g : R⟦X⟧) :
    derivativeFun (f + g) = derivativeFun f + derivativeFun g

{R : Type u_1}
[CommSemiring R]
(f g : PowerSeries R)

(f + g).derivativeFun = f.derivativeFun + g.derivativeFun


@[to_additive]
theorem diff_inv : (diff ϕ S T)⁻¹ = diff ϕ T S

(S T : ↑(AddSubgroup.leftTransversals ↑H))

-AddSubgroup.leftTransversals.diff ϕ S T = AddSubgroup.leftTransversals.diff ϕ T S


theorem listTransvecCol_get (i : Fin (listTransvecCol M).length) :
    (listTransvecCol M).get i =
      letI i' := Fin.cast (length_listTransvecCol M) i
      transvection (inl i') (inr unit) <| -M (inl i') (inr unit) / M (inr unit) (inr unit)

(M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜)

(i : Fin (Matrix.Pivot.listTransvecCol M).length)

(Matrix.Pivot.listTransvecCol M).get i =
  Matrix.transvection (Sum.inl (Fin.cast ⋯ i)) (Sum.inr ())
    (-M (Sum.inl (Fin.cast ⋯ i)) (Sum.inr ()) / M (Sum.inr ()) (Sum.inr ()))


@[reassoc]
theorem condition (a) :
    I.fst a ≫ Multicoequalizer.π I (I.fstFrom a) = I.snd a ≫ Multicoequalizer.π I (I.sndFrom a)

(I : CategoryTheory.Limits.MultispanIndex C)

CategoryTheory.CategoryStruct.comp (I.fst a) (CategoryTheory.Limits.Multicoequalizer.π I (I.fstFrom a)) =
  CategoryTheory.CategoryStruct.comp (I.snd a) (CategoryTheory.Limits.Multicoequalizer.π I (I.sndFrom a))


/-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_comp_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) :
    (k.map hl j).comp (f.map hy k) =
    f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
{A : Type u_5}
[CommMonoid A]
{U : Submonoid A}
{R : Type u_6}
[CommMonoid R]
(j : U.LocalizationMap R)
{l : P →* A}
(hl : ∀ (w : ↥T), l ↑w ∈ U)

(k.map hl j).comp (f.map hy k) = f.map ⋯ j


/-- See also `Fintype.card_zpowers`. -/
@[to_additive (attr := simp) "See also `Fintype.card_zmultiples`."]
theorem Nat.card_zpowers : Nat.card (zpowers a) = orderOf a

Nat.card ↥(Subgroup.zpowers a) = orderOf a


@[simp]
theorem lift_add (a b : Ordinal.{v}) : lift.{u} (a + b) = lift.{u} a + lift.{u} b

Ordinal.lift.{u, v} (a + b) = Ordinal.lift.{u, v} a + Ordinal.lift.{u, v} b


theorem coeff_derivative (f : R⟦X⟧) (n : ℕ) :
    coeff R n (d⁄dX R f) = coeff R (n + 1) f * (n + 1)

{R : Type u_1}
[CommSemiring R]
(f : PowerSeries R)
(n : ℕ)

(PowerSeries.coeff R n) ((PowerSeries.derivative R) f) = (PowerSeries.coeff R (n + 1)) f * (↑n + 1)


@[simp]
theorem equalizerIso_hom_comp_subtype : (equalizerIso g h).hom ≫ Subtype.val = equalizer.ι g h

(CategoryTheory.Limits.Types.equalizerIso g h).hom ≫ Subtype.val = CategoryTheory.Limits.equalizer.ι g h


@[simp]
theorem coprime_add_mul_right_right (m n k : ℕ) : Coprime m (n + k * m) ↔ Coprime m n


@[simp]
theorem op_le_op_iff {S₁ S₂ : Subalgebra R A} : S₁.op ≤ S₂.op ↔ S₁ ≤ S₂

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{S₁ S₂ : Subalgebra R A}


@[simp]
theorem pure_seq (f : α → β) (x : FreeAbelianGroup α) : pure f <*> x = f <$> x

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

(Seq.seq (pure f) fun x_1 => x) = f <$> x


lemma differentiable_fourierChar_neg_bilinear_right (v : V) :
    Differentiable ℝ (fun w ↦ (𝐞 (-L v w) : ℂ))

{V : Type u_1}
{W : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
(v : V)

Differentiable ℝ fun w => ↑(𝐞 (-(L v) w))


@[deprecated get_of_mem (since := "2023-01-05")]
theorem nthLe_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n h, nthLe l n h = a

{α : Type u}
{a : α}
{l : List α}
(h : a ∈ l)


theorem IsLeast.unique (Ha : IsLeast s a) (Hb : IsLeast s b) : a = b

{α : Type u}
[PartialOrder α]
{s : Set α}
{a b : α}
(Ha : IsLeast s a)
(Hb : IsLeast s b)


theorem lid_comp_rTensor (f : N →ₗ[R] R) :
    (TensorProduct.lid R M).comp (rTensor M f) = lift ((lsmul R M).comp f)

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : N →ₗ[R] R)

↑(TensorProduct.lid R M) ∘ₗ LinearMap.rTensor M f = TensorProduct.lift (LinearMap.lsmul R M ∘ₗ f)


theorem Periodic.sub_zsmul_eq [AddGroup α] (h : Periodic f c) (n : ℤ) : f (x - n • c) = f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddGroup α]
(h : Function.Periodic f c)
(n : ℤ)


@[to_additive]
lemma orbitRel.Quotient.subgroup_quotient_eq_iff {H : Subgroup G} {x : orbitRel.Quotient G α}
    {a b : x.orbit} : (⟦a⟧ : orbitRel.Quotient H x.orbit) = ⟦b⟧ ↔
      (⟦↑a⟧ : orbitRel.Quotient H α) = ⟦↑b⟧

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
{H : AddSubgroup G}
{x : AddAction.orbitRel.Quotient G α}
{a b : ↑x.orbit}

⟦a⟧ = ⟦b⟧ ↔ ⟦↑a⟧ = ⟦↑b⟧


/-- This is primed to match `eq_intCast'`. -/
theorem eq_natCast' {R} [NonAssocSemiring R] (f : ℕ →+* R) : f = Nat.castRingHom R

{R : Type u_3}
[NonAssocSemiring R]
(f : ℕ →+* R)


@[simp]
theorem splitMany_insert (I : Box ι) (s : Finset (ι × ℝ)) (p : ι × ℝ) :
    splitMany I (insert p s) = splitMany I s ⊓ split I p.1 p.2

{ι : Type u_1}
(I : BoxIntegral.Box ι)
(s : Finset (ι × ℝ))
(p : ι × ℝ)

BoxIntegral.Prepartition.splitMany I (insert p s) =
  BoxIntegral.Prepartition.splitMany I s ⊓ BoxIntegral.Prepartition.split I p.1 p.2


theorem mul_nonpos {α} [OrderedRing α] {a b : α} (ha : a ≤ 0) (hb : 0 < b) : b * a ≤ 0

{α : Type u_1}
[OrderedRing α]
{a b : α}
(ha : a ≤ 0)
(hb : 0 < b)


@[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
    (insert a s).fold op b f = f a * s.fold op b f

{α : Type u_1}
{β : Type u_2}
{op : β → β → β}
[hc : Std.Commutative op]
[ha : Std.Associative op]
{f : α → β}
{b : β}
{s : Finset α}
{a : α}
[DecidableEq α]
(h : a ∉ s)

Finset.fold op b f (insert a s) = op (f a) (Finset.fold op b f s)


theorem Even.zpow_abs {p : ℤ} (hp : Even p) (a : α) : |a| ^ p = a ^ p

{α : Type u_1}
[LinearOrderedField α]
{p : ℤ}
(hp : Even p)
(a : α)


@[to_additive]
theorem preimage_image_mk (N : Subgroup α) (s : Set α) :
    mk ⁻¹' ((mk : α → α ⧸ N) '' s) = ⋃ x : N, (· * (x : α)) ⁻¹' s

{α : Type u_1}
[AddGroup α]
(N : AddSubgroup α)
(s : Set α)

QuotientAddGroup.mk ⁻¹' (QuotientAddGroup.mk '' s) = ⋃ x, (fun x_1 => x_1 + ↑x) ⁻¹' s


/-- Given `M : Matroid α`, the `IndepMatroid α` whose independent sets are
  the subsets of `M.E` that are disjoint from some base of `M` -/
@[simps] def dualIndepMatroid (M : Matroid α) : IndepMatroid α

{α : Type u_1}
(M : Matroid α)
(I : Set α)

M.dualIndepMatroid.Indep I = (I ⊆ M.E ∧ ∃ B, M.Base B ∧ Disjoint I B)


/-- The ring equiv `R/I ≃+* S/J` induced by a ring equiv `f : R ≃+* S`, where `J = f(I)`. -/
@[simps]
def quotientEquiv (I : Ideal R) (J : Ideal S) (f : R ≃+* S) (hIJ : J = I.map (f : R →+* S)) :
    R ⧸ I ≃+* S ⧸ J

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
(I : Ideal R)
(J : Ideal S)
(f : R ≃+* S)
(hIJ : J = Ideal.map (↑f) I)
(a : S ⧸ J)

(I.quotientEquiv J f hIJ).symm a = (Ideal.quotientMap I ↑f.symm ⋯) a


@[to_additive (attr := simp)]
theorem quotientSubgroupOfEmbeddingOfLE_apply_mk (H : Subgroup α) (h : s ≤ t) (g : s) :
    quotientSubgroupOfEmbeddingOfLE H h (QuotientGroup.mk g) =
      (QuotientGroup.mk (inclusion h g) : (fun _ => { x // x ∈ t } ⧸ subgroupOf H t) ↑g)

{α : Type u_1}
[Group α]
{s t : Subgroup α}
(H : Subgroup α)
(h : s ≤ t)
(g : ↥s)

(Subgroup.quotientSubgroupOfEmbeddingOfLE H h) ↑g = ↑((Subgroup.inclusion h) g)


theorem mem_append_of_mem_left {a : α} {as : List α} (bs : List α) : a ∈ as → a ∈ as ++ bs

{α : Type u}
{a : α}
{as : List α}
(bs : List α)


lemma SupClosed.finsetSup_mem [OrderBot α] (hs : SupClosed s) (ht : t.Nonempty) :
    (∀ i ∈ t, f i ∈ s) → t.sup f ∈ s

{α : Type u_2}
[SemilatticeSup α]
{ι : Type u_4}
{f : ι → α}
{s : Set α}
{t : Finset ι}
[OrderBot α]
(hs : SupClosed s)
(ht : t.Nonempty)


lemma add_norm_nonneg (f : α →ᵇ ℝ) :
    0 ≤ f + const _ ‖f‖

{α : Type u_2}
[TopologicalSpace α]
(f : BoundedContinuousFunction α ℝ)

0 ≤ f + BoundedContinuousFunction.const α ‖f‖


@[simp]
lemma Modification.id_app' {X : B} {F G : OplaxFunctor B C} (α : F ⟶ G) :
    Modification.app (𝟙 α) X = 𝟙 (α.app X)

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{X : B}
{F G : CategoryTheory.OplaxFunctor B C}
(α : F ⟶ G)

(CategoryTheory.CategoryStruct.id α).app X = CategoryTheory.CategoryStruct.id (α.app X)


theorem mkPiRing_coeff_eq (p : FormalMultilinearSeries 𝕜 𝕜 E) (n : ℕ) :
    ContinuousMultilinearMap.mkPiRing 𝕜 (Fin n) (p.coeff n) = p n

{𝕜 : Type u}
{E : Type v}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(p : FormalMultilinearSeries 𝕜 𝕜 E)
(n : ℕ)


/-- The (identity) equivalence between `Cᴹᵒᵖ` and `C`. -/
@[simps!] def MonoidalOpposite.unmopEquiv : Cᴹᵒᵖ ≌ C

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(X : Cᴹᵒᵖ)

((CategoryTheory.MonoidalOpposite.unmopEquiv C).unitIso.inv.app X).unmop = 𝟙 X.unmop


@[simp]
protected theorem sup_idem (a : CauSeq α abs) : a ⊔ a = a

{α : Type u_1}
[LinearOrderedField α]
(a : CauSeq α abs)


theorem BijOn.inter (h₁ : BijOn f s₁ t₁) (h₂ : BijOn f s₂ t₂) (h : InjOn f (s₁ ∪ s₂)) :
    BijOn f (s₁ ∩ s₂) (t₁ ∩ t₂)

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{t₁ t₂ : Set β}
{f : α → β}
(h₁ : Set.BijOn f s₁ t₁)
(h₂ : Set.BijOn f s₂ t₂)
(h : Set.InjOn f (s₁ ∪ s₂))


@[simp]
theorem map_id : c.map OrderHom.id = c

{α : Type u}
[Preorder α]
(c : OmegaCompletePartialOrder.Chain α)


@[to_additive]
theorem smul_subset_smul_right : s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s₁ s₂ : Finset α}
{t : Finset β}

s₁ ⊆ s₂ → s₁ +ᵥ t ⊆ s₂ +ᵥ t


@[simp]
theorem dualDistrib_apply (f : Dual R M) (g : Dual R N) (m : M) (n : N) :
    dualDistrib R M N (f ⊗ₜ g) (m ⊗ₜ n) = f m * g n

{R : Type u_1}
{M : Type u_3}
{N : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : Module.Dual R M)
(g : Module.Dual R N)
(m : M)
(n : N)

((TensorProduct.dualDistrib R M N) (f ⊗ₜ[R] g)) (m ⊗ₜ[R] n) = f m * g n


@[simp]
theorem toFinsupp_singleton (a : α) : toFinsupp ({a} : Multiset α) = Finsupp.single a 1

Multiset.toFinsupp {a} = Finsupp.single a 1


@[simp]
theorem C_mul_comp : (C a * p).comp r = C a * p.comp r

{R : Type u}
{a : R}
[Semiring R]
{p r : R[X]}

(Polynomial.C a * p).comp r = Polynomial.C a * p.comp r


theorem real_smul_negPart_neg (r : ℝ) (hr : r < 0) :
    (r • j).negPart = (-r).toNNReal • j.posPart

(j : MeasureTheory.JordanDecomposition α)


theorem pow_eq_span_pow_set (n : ℕ) : M ^ n = span R ((M : Set A) ^ n)

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M : Submodule R A)
(n : ℕ)


@[simp]
theorem mem_coe {x : B} : x ∈ (p : Set B) ↔ x ∈ p

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p : A}
{x : B}

x ∈ ↑p ↔ x ∈ p


theorem nnnorm_eq_ciSup (f : PiLp ∞ β) : ‖f‖₊ = ⨆ i, ‖f i‖₊

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

‖f‖₊ = ⨆ i, ‖f i‖₊


theorem left_mem_Icc : a ∈ Icc a b ↔ a ≤ b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


@[simp]
theorem coneOfIsSplitMono_ι : (coneOfIsSplitMono f).ι = f

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

(CategoryTheory.Limits.coneOfIsSplitMono f).ι = f


/-- The equivalences given by `Pi.eqToEquivalence` are compatible with reindexing. -/
@[simps!]
def Pi.eqToEquivalenceFunctorIso (f : J → I) {i' j' : J} (h : i' = j') :
    (Pi.eqToEquivalence C (congr_arg f h)).functor ≅
      (Pi.eqToEquivalence (fun i' => C (f i')) h).functor

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(CategoryTheory.Pi.eqToEquivalenceFunctorIso C f h).inv = CategoryTheory.eqToHom ⋯


@[ext]
theorem ext {p q : MulRingNorm R} : (∀ x, p x = q x) → p = q

{R : Type u_2}
[NonAssocRing R]
{p q : MulRingNorm R}


lemma eq_zero_or_one_of_sq_eq_self (hx : x ^ 2 = x) : x = 0 ∨ x = 1

{M₀ : Type u_1}
[CancelMonoidWithZero M₀]
{x : M₀}
(hx : x ^ 2 = x)


@[to_additive]
theorem smulAntidiagonal_min_smul_min [LinearOrder G] [LinearOrder P] [SMul G P]
    [IsOrderedCancelSMul G P] {s : Set G} {t : Set P} (hs : s.IsWF) (ht : t.IsWF) (hns : s.Nonempty)
    (hnt : t.Nonempty) :
    SMulAntidiagonal hs.isPWO ht.isPWO (hs.min hns • ht.min hnt) = {(hs.min hns, ht.min hnt)}

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)
(hns : s.Nonempty)
(hnt : t.Nonempty)

Finset.VAddAntidiagonal ⋯ ⋯ (hs.min hns +ᵥ ht.min hnt) = {(hs.min hns, ht.min hnt)}


theorem abs_le_abs_re_add_abs_im (z : ℂ) : Complex.abs z ≤ |z.re| + |z.im|


/-- Double counting argument. Considering `r` as a bipartite graph, the LHS is a lower bound on the
number of edges while the RHS is an upper bound. -/
theorem card_mul_le_card_mul [∀ a b, Decidable (r a b)]
    (hm : ∀ a ∈ s, m ≤ (t.bipartiteAbove r a).card)
    (hn : ∀ b ∈ t, (s.bipartiteBelow r b).card ≤ n) : s.card * m ≤ t.card * n

(hm : ∀ a ∈ s, m ≤ (Finset.bipartiteAbove r t a).card)

(hn : ∀ b ∈ t, (Finset.bipartiteBelow r s b).card ≤ n)


@[simp]
theorem finSuccEquiv'_symm_some (i : Fin (n + 1)) (j : Fin n) :
    (finSuccEquiv' i).symm (some j) = i.succAbove j


nonrec theorem DifferentiableAt.isBigO_sub {f : E → F} {x₀ : E} (h : DifferentiableAt 𝕜 f x₀) :
    (f · - f x₀) =O[𝓝 x₀] (· - x₀)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x₀ : E}
(h : DifferentiableAt 𝕜 f x₀)

(fun x => f x - f x₀) =O[𝓝 x₀] fun x => x - x₀


theorem degree_list_sum_le (l : List S[X]) : degree l.sum ≤ (l.map natDegree).maximum

{S : Type u_1}
[Semiring S]
(l : List S[X])

l.sum.degree ≤ (List.map Polynomial.natDegree l).maximum


theorem measure_support_lt_top_of_integrable (f : α →ₛ E) (hf : Integrable f μ) :
    μ (support f) < ∞

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α E)
(hf : MeasureTheory.Integrable (↑f) μ)


protected theorem eq_of_add_eq_add_left {a b c : Cardinal} (h : a + b = a + c) (ha : a < ℵ₀) :
    b = c

{a b c : Cardinal.{u_1}}
(h : a + b = a + c)
(ha : a < ℵ₀)


theorem ContinuousLinearMap.closedComplemented_ker_of_rightInverse {R : Type*} [Ring R]
    {M : Type*} [TopologicalSpace M] [AddCommGroup M] {M₂ : Type*} [TopologicalSpace M₂]
    [AddCommGroup M₂] [Module R M] [Module R M₂] [TopologicalAddGroup M] (f₁ : M →L[R] M₂)
    (f₂ : M₂ →L[R] M) (h : Function.RightInverse f₂ f₁) : (ker f₁).ClosedComplemented

{R : Type u_1}
[Ring R]
{M : Type u_2}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_3}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R M₂]
[TopologicalAddGroup M]
(f₁ : M →L[R] M₂)
(f₂ : M₂ →L[R] M)
(h : Function.RightInverse ⇑f₂ ⇑f₁)


/--
In a monoidal category, we can take the tensor product of objects, `X ⊗ Y` and of morphisms `f ⊗ g`.
Tensor product does not need to be strictly associative on objects, but there is a
specified associator, `α_ X Y Z : (X ⊗ Y) ⊗ Z ≅ X ⊗ (Y ⊗ Z)`. There is a tensor unit `𝟙_ C`,
with specified left and right unitor isomorphisms `λ_ X : 𝟙_ C ⊗ X ≅ X` and `ρ_ X : X ⊗ 𝟙_ C ≅ X`.
These associators and unitors satisfy the pentagon and triangle equations.

See <https://stacks.math.columbia.edu/tag/0FFK>.
-/
-- Porting note: The Mathport did not translate the temporary notation
class MonoidalCategory (C : Type u) [𝒞 : Category.{v} C] extends MonoidalCategoryStruct C where
  tensorHom_def {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
    f ⊗ g = (f ▷ X₂) ≫ (Y₁ ◁ g) := by
      aesop_cat
  /-- Tensor product of identity maps is the identity: `(𝟙 X₁ ⊗ 𝟙 X₂) = 𝟙 (X₁ ⊗ X₂)` -/
  tensor_id : ∀ X₁ X₂ : C, 𝟙 X₁ ⊗ 𝟙 X₂ = 𝟙 (X₁ ⊗ X₂) := by aesop_cat
  /--
  Composition of tensor products is tensor product of compositions:
  `(f₁ ⊗ g₁) ∘ (f₂ ⊗ g₂) = (f₁ ∘ f₂) ⊗ (g₁ ⊗ g₂)`
  -/
  tensor_comp :
    ∀ {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂),
      (f₁ ≫ g₁) ⊗ (f₂ ≫ g₂) = (f₁ ⊗ f₂) ≫ (g₁ ⊗ g₂) := by
    aesop_cat
  whiskerLeft_id : ∀ (X Y : C), X ◁ 𝟙 Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  id_whiskerRight : ∀ (X Y : C), 𝟙 X ▷ Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  /-- Naturality of the associator isomorphism: `(f₁ ⊗ f₂) ⊗ f₃ ≃ f₁ ⊗ (f₂ ⊗ f₃)` -/
  associator_naturality :
    ∀ {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃),
      ((f₁ ⊗ f₂) ⊗ f₃) ≫ (α_ Y₁ Y₂ Y₃).hom = (α_ X₁ X₂ X₃).hom ≫ (f₁ ⊗ (f₂ ⊗ f₃)) := by
    aesop_cat
  /--
  Naturality of the left unitor, commutativity of `𝟙_ C ⊗ X ⟶ 𝟙_ C ⊗ Y ⟶ Y` and `𝟙_ C ⊗ X ⟶ X ⟶ Y`
  -/
  leftUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), 𝟙_ _ ◁ f ≫ (λ_ Y).hom = (λ_ X).hom ≫ f := by
    aesop_cat
  /--
  Naturality of the right unitor: commutativity of `X ⊗ 𝟙_ C ⟶ Y ⊗ 𝟙_ C ⟶ Y` and `X ⊗ 𝟙_ C ⟶ X ⟶ Y`
  -/
  rightUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), f ▷ 𝟙_ _ ≫ (ρ_ Y).hom = (ρ_ X).hom ≫ f := by
    aesop_cat
  /--
  The pentagon identity relating the isomorphism between `X ⊗ (Y ⊗ (Z ⊗ W))` and `((X ⊗ Y) ⊗ Z) ⊗ W`
  -/
  pentagon :
    ∀ W X Y Z : C,
      (α_ W X Y).hom ▷ Z ≫ (α_ W (X ⊗ Y) Z).hom ≫ W ◁ (α_ X Y Z).hom =
        (α_ (W ⊗ X) Y Z).hom ≫ (α_ W X (Y ⊗ Z)).hom := by
    aesop_cat
  /--
  The identity relating the isomorphisms between `X ⊗ (𝟙_ C ⊗ Y)`, `(X ⊗ 𝟙_ C) ⊗ Y` and `X ⊗ Y`
  -/
  triangle :
    ∀ X Y : C, (α_ X (𝟙_ _) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y := by
    aesop_cat

[self : CategoryTheory.MonoidalCategory C]

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f (𝟙_ C))
    (CategoryTheory.MonoidalCategory.rightUnitor Y).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.rightUnitor X).hom f


/-- Given an equivalence `e : R ≃+* S` of rings and a subring `s` of `R`,
`subringMap e s` is the induced equivalence between `s` and `s.map e` -/
@[simps!]
def subringMap (e : R ≃+* S) : s ≃+* s.map e.toRingHom

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{s : Subring R}
(e : R ≃+* S)
(x : ↑↑s.toAddSubmonoid)


@[to_additive]
theorem Nonempty.of_div_left : (s / t).Nonempty → s.Nonempty

{α : Type u_2}
[DecidableEq α]
[Sub α]
{s t : Finset α}


theorem cocycle_snd_fst_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.snd _ _ ≫ pullback.fst _ _ ≫
      pullback.snd _ _ = pullback.snd _ _ ≫ pullback.fst _ _ ≫ pullback.snd _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g i j k ≫
    AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g j k i ≫
      AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g k i j ≫
        CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
            (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
          CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map k) ≫
            CategoryTheory.Limits.pullback.snd (𝒰.map i ≫ f) g =
  CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
      (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map k) ≫
      CategoryTheory.Limits.pullback.snd (𝒰.map i ≫ f) g


@[simp] lemma card_val (s : Finset α) : Multiset.card s.1 = s.card


@[to_additive]
theorem toFun_eq_coe (f : α →*o β) : f.toFun = (f : α → β)

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


@[simp]
theorem mem_filter {p : Box ι → Prop} : J ∈ π.filter p ↔ J ∈ π ∧ p J

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
{p : BoxIntegral.Box ι → Prop}


/-- The equivalence `Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiChainComplexEquivalence : Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α

(C : Type u_1)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
(α : Type u_3)
[AddRightCancelSemigroup α]
[One α]

(CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).counitIso.hom = CategoryTheory.eqToHom ⋯


@[simp]
theorem dualDual_apply (a : α) : dualDual α a = toDual (toDual a)

(OrderIso.dualDual α) a = OrderDual.toDual (OrderDual.toDual a)


theorem lintegral_union_le (f : α → ℝ≥0∞) (s t : Set α) :
    ∫⁻ a in s ∪ t, f a ∂μ ≤ ∫⁻ a in s, f a ∂μ + ∫⁻ a in t, f a ∂μ

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

∫⁻ (a : α) in s ∪ t, f a ∂μ ≤ ∫⁻ (a : α) in s, f a ∂μ + ∫⁻ (a : α) in t, f a ∂μ


theorem get?_push_lt (a : Array α) (x : α) (i : Nat) (h : i < a.size) :
    (a.push x)[i]? = some a[i]

{α : Type u_1}
(a : Array α)
(x : α)
(i : Nat)
(h : i < a.size)


lemma withDensity_mono {f g : α → ℝ≥0∞} (hfg : f ≤ᵐ[μ] g) :
    μ.withDensity f ≤ μ.withDensity g

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(hfg : f ≤ᵐ[μ] g)


lemma toLower_inj {a b : α} : toLower a = toLower b ↔ a = b

Topology.WithLower.toLower a = Topology.WithLower.toLower b ↔ a = b


/-- For `f : α →ᵤ[𝔖] β`, where `𝔖 : Set (Set α)` is nonempty and directed, `𝓝 f` admits the
family `{g | ∀ x ∈ S, (f x, g x) ∈ V}` for `S ∈ 𝔖` and `V ∈ 𝓤 β` as a filter basis. -/
protected theorem hasBasis_nhds (f : α →ᵤ[𝔖] β) (h : 𝔖.Nonempty) (h' : DirectedOn (· ⊆ ·) 𝔖) :
    (𝓝 f).HasBasis (fun SV : Set α × Set (β × β) => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓤 β) fun SV =>
      { g | (g, f) ∈ UniformOnFun.gen 𝔖 SV.1 SV.2 }

(h' : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

(𝓝 f).HasBasis (fun SV => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓤 β) fun SV => {g | (g, f) ∈ UniformOnFun.gen 𝔖 SV.1 SV.2}


@[simp]
theorem canonicalEquiv_canonicalEquiv (P'' : Type*) [CommRing P''] [Algebra R P'']
    [IsLocalization S P''] (I : FractionalIdeal S P) :
    canonicalEquiv S P' P'' (canonicalEquiv S P P' I) = canonicalEquiv S P P'' I

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
(P : Type u_2)
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(P' : Type u_3)
[CommRing P']
[Algebra R P']
[loc' : IsLocalization S P']
(P'' : Type u_5)
[CommRing P'']
[Algebra R P'']
[IsLocalization S P'']
(I : FractionalIdeal S P)

(FractionalIdeal.canonicalEquiv S P' P'') ((FractionalIdeal.canonicalEquiv S P P') I) =
  (FractionalIdeal.canonicalEquiv S P P'') I


theorem MapsTo.comp (h₁ : MapsTo g t p) (h₂ : MapsTo f s t) : MapsTo (g ∘ f) s p

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{p : Set γ}
{f : α → β}
{g : β → γ}
(h₁ : Set.MapsTo g t p)
(h₂ : Set.MapsTo f s t)


theorem monotone_filter_right (s : Multiset α) ⦃p q : α → Prop⦄ [DecidablePred p] [DecidablePred q]
    (h : ∀ b, p b → q b) :
    s.filter p ≤ s.filter q

{α : Type u_1}
(s : Multiset α)
⦃p q : α → Prop⦄
[DecidablePred p]
[DecidablePred q]
(h : ∀ (b : α), p b → q b)

Multiset.filter p s ≤ Multiset.filter q s


theorem edist_approxOn_le {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
    [SeparableSpace s] (x : β) (n : ℕ) : edist (approxOn f hf s y₀ h₀ n x) (f x) ≤ edist y₀ (f x)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[PseudoEMetricSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
(hf : Measurable f)
{s : Set α}
{y₀ : α}
(h₀ : y₀ ∈ s)
[TopologicalSpace.SeparableSpace ↑s]
(x : β)
(n : ℕ)

edist (↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n) x) (f x) ≤ edist y₀ (f x)


protected theorem zero_mul (x : R[S⁻¹]) : 0 * x = 0

{R : Type u_1}
[Semiring R]
{S : Submonoid R}
[OreLocalization.OreSet S]
(x : OreLocalization S R)


/-- A polynomial over a field which is not a unit must have a monic irreducible factor.
See also `WfDvdMonoid.exists_irreducible_factor`. -/
theorem Polynomial.exists_monic_irreducible_factor {F : Type*} [Field F] (f : F[X])
    (hu : ¬IsUnit f) : ∃ g : F[X], g.Monic ∧ Irreducible g ∧ g ∣ f

{F : Type u_2}
[Field F]
(f : F[X])
(hu : ¬IsUnit f)


/-- `Nat.divisors` as a `MonoidHom`. -/
@[simps]
def Nat.divisorsHom : ℕ →* Finset ℕ


theorem hasMFDerivAt_extChartAt (h : y ∈ (chartAt H x).source) :
    HasMFDerivAt I 𝓘(𝕜, E) (extChartAt I x) y (mfderiv I I (chartAt H x) y : _)

{𝕜 : Type u_11}
[NontriviallyNormedField 𝕜]
{E : Type u_12}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_13}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_14}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{x y : M}
(h : y ∈ (chartAt H x).source)

HasMFDerivAt I 𝓘(𝕜, E) (↑(extChartAt I x)) y (mfderiv I I (↑(chartAt H x)) y)


@[simp]
protected theorem le_add_left (d₁ d₂ : ManyOneDegree) : d₁ ≤ d₁ + d₂

d₁ ≤ d₁ + d₂


theorem piecewise_mem_pi {δ : α → Type*} {t : Set α} {t' : ∀ i, Set (δ i)} {f g} (hf : f ∈ pi t t')
    (hg : g ∈ pi t t') : s.piecewise f g ∈ pi t t'

{α : Type u_1}
(s : Set α)
[(j : α) → Decidable (j ∈ s)]
{δ : α → Type u_7}
{t : Set α}
{t' : (i : α) → Set (δ i)}
{f g : (i : α) → δ i}
(hf : f ∈ t.pi t')
(hg : g ∈ t.pi t')


@[simp]
theorem map_neg {X Y : C} {f : X ⟶ Y} : F.map (-f) = -F.map f

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D)
[F.Additive]
{X Y : C}
{f : X ⟶ Y}


@[simp]
theorem mapRange.addMonoidHom_toZeroHom (f : M →+ N) :
    (mapRange.addMonoidHom f).toZeroHom = (mapRange.zeroHom f.toZeroHom : ZeroHom (α →₀ _) _)

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
(f : M →+ N)

↑(Finsupp.mapRange.addMonoidHom f) = Finsupp.mapRange.zeroHom ↑f


theorem to_affineMap_injective {f g : P →ᴬ[R] Q} (h : (f : P →ᵃ[R] Q) = (g : P →ᵃ[R] Q)) :
    f = g

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]
{f g : P →ᴬ[R] Q}
(h : f.toAffineMap = g.toAffineMap)


theorem memℓp_infty_iff {f : ∀ i, E i} : Memℓp f ∞ ↔ BddAbove (Set.range fun i => ‖f i‖)

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
{f : (i : α) → E i}

Memℓp f ⊤ ↔ BddAbove (Set.range fun i => ‖f i‖)


theorem OrdConnected.preimage_mono {f : β → α} (hs : OrdConnected s) (hf : Monotone f) :
    OrdConnected (f ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set α}
{f : β → α}
(hs : s.OrdConnected)
(hf : Monotone f)


/--
In an additive monoid with multiplication `R`, the submonoid generated by the squares is the set of
sums of squares.
-/
theorem SquaresAddClosure [AddMonoid R] : closure IsSquare = SumSqIn R

AddSubmonoid.closure IsSquare = SumSqIn R


/-- `DFinsupp.subtypeDomain` as a `LinearMap`. -/
@[simps]
def subtypeDomainLinearMap [Semiring γ] [∀ i, AddCommMonoid (β i)] [∀ i, Module γ (β i)]
    (p : ι → Prop) [DecidablePred p] : (Π₀ i, β i) →ₗ[γ] Π₀ i : Subtype p, β i

{ι : Type u}
(γ : Type w)
(β : ι → Type v)
[Semiring γ]
[(i : ι) → AddCommMonoid (β i)]
[(i : ι) → Module γ (β i)]
(p : ι → Prop)
[DecidablePred p]
(x : Π₀ (i : ι), β i)

(DFinsupp.subtypeDomainLinearMap γ β p) x = DFinsupp.subtypeDomain p x


@[simp] lemma cons_support_tail (p : G.Walk x y) (hp : ¬p.Nil) :
    x :: (p.tail hp).support = p.support

{V : Type u}
{G : SimpleGraph V}
{x y : V}
(p : G.Walk x y)
(hp : ¬p.Nil)