/-- The obvious equivalence of categories `(ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ`. -/
@[simps]
def opEquiv : (ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ

(CategoryTheory.ShortComplex.opEquiv C).counitIso =
  CategoryTheory.Iso.refl ((CategoryTheory.ShortComplex.unopFunctor C).comp (CategoryTheory.ShortComplex.opFunctor C))


@[simp]
theorem prodCongr_symm (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) :
    (prodCongr e₁ e₂).symm = prodCongr e₁.symm e₂.symm

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
(e₁ : α₁ ≃ α₂)
(e₂ : β₁ ≃ β₂)

(e₁.prodCongr e₂).symm = e₁.symm.prodCongr e₂.symm


@[to_additive]
theorem intro' {K : Set α} (hK : IsCompact K) (h'K : IsClosed K)
    (hfK : ∀ x, x ∉ K → f x = 1) : HasCompactMulSupport f

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[One β]
{f : α → β}
{K : Set α}
(hK : IsCompact K)
(h'K : IsClosed K)
(hfK : ∀ x ∉ K, f x = 1)


@[simp]
theorem pointwise_smul_le_pointwise_smul_iff₀ {a : α} (ha : a ≠ 0) {S T : AddSubgroup A} :
    a • S ≤ a • T ↔ S ≤ T

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
{S T : AddSubgroup A}


@[simp]
theorem refl_toAlgHom : ↑(refl : A₁ ≃ₐ[R] A₁) = AlgHom.id R A₁

{R : Type uR}
{A₁ : Type uA₁}
[CommSemiring R]
[Semiring A₁]
[Algebra R A₁]


protected theorem eLpNorm'_eq {p : ℝ} (f : α →ₛ F) (μ : Measure α) :
    eLpNorm' f p μ = (∑ y ∈ f.range, (‖y‖₊ : ℝ≥0∞) ^ p * μ (f ⁻¹' {y})) ^ (1 / p)

{α : Type u_1}
{F : Type u_5}
[MeasurableSpace α]
[NormedAddCommGroup F]
{p : ℝ}
(f : MeasureTheory.SimpleFunc α F)
(μ : MeasureTheory.Measure α)

MeasureTheory.eLpNorm' (↑f) p μ = (∑ y ∈ f.range, ↑‖y‖₊ ^ p * μ (↑f ⁻¹' {y})) ^ (1 / p)


/-- Whiskering a 1-morphism is a functor. -/
@[simps]
def whiskering {x : B} (h : c ⟶ x) : LeftExtension f g ⥤ LeftExtension f (g ≫ h)

(t : CategoryTheory.Bicategory.LeftExtension f g)

(CategoryTheory.Bicategory.LeftExtension.whiskering h).obj t = t.whisker h


/-- The functor `(Square C)ᵒᵖ ⥤ Square Cᵒᵖ`. -/
@[simps]
def opFunctor : (Square C)ᵒᵖ ⥤ Square Cᵒᵖ

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(sq : (CategoryTheory.Square C)ᵒᵖ)

CategoryTheory.Square.opFunctor.obj sq = (Opposite.unop sq).op


/-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed

partialFunEquivPointed.unitIso.hom.app X =
  (PartialFun.Iso.mk
        { toFun := fun a => ⟨some a, ⋯⟩, invFun := fun a => (↑a).get ⋯, left_inv := ⋯, right_inv := ⋯ }).hom ≫
    pointedToPartialFun.map (Pointed.Iso.mk (Equiv.optionSubtypeNe none) ⋯).inv ≫
      pointedToPartialFun.map { toFun := Option.elim' none fun a => ↑a, map_point := ⋯ }


theorem mk_eq_zero_iff {α : Type u} : #α = 0 ↔ IsEmpty α


/-- Extensionality for `Poly α` -/
@[ext]
theorem ext {f g : Poly α} : (∀ x, f x = g x) → f = g


@[simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem mk_reindex_cast {n m : ℕ} (h : n = m) (x : ⨂[R]^n M) :
    GradedMonoid.mk (A := fun i => (⨂[R]^i) M) m
    (PiTensorProduct.reindex R (fun _ ↦ M) (Equiv.cast <| congr_arg Fin h) x) =
    GradedMonoid.mk n x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{n m : ℕ}
(h : n = m)
(x : ⨂[R]^n M)

GradedMonoid.mk m ((PiTensorProduct.reindex R (fun x => M) (Equiv.cast ⋯)) x) = GradedMonoid.mk n x


theorem range_coprod (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₃) : range (f.coprod g) = range f ⊔ range g

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
(f : M →ₗ[R] M₃)
(g : M₂ →ₗ[R] M₃)

LinearMap.range (f.coprod g) = LinearMap.range f ⊔ LinearMap.range g


lemma SupClosed.finsetSup'_mem (hs : SupClosed s) (ht : t.Nonempty) :
    (∀ i ∈ t, f i ∈ s) → t.sup' ht f ∈ s

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


theorem CondIndep.condIndepSet_of_measurableSet {μ : Measure Ω} [IsFiniteMeasure μ]
    (h_indep : CondIndep m' m₁ m₂ hm' μ) {s t : Set Ω} (hs : MeasurableSet[m₁] s)
    (ht : MeasurableSet[m₂] t) :
    CondIndepSet m' hm' s t μ

(h_indep : ProbabilityTheory.CondIndep m' m₁ m₂ hm' μ)

ProbabilityTheory.CondIndepSet m' hm' s t μ


@[to_additive (attr := simp)]
theorem mul_bot : f * ⊥ = ⊥


@[to_additive]
theorem Multipliable.mul (hf : Multipliable f) (hg : Multipliable g) :
    Multipliable fun b ↦ f b * g b

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f g : β → α}
[ContinuousMul α]
(hf : Multipliable f)
(hg : Multipliable g)


/-- The result of reflecting. -/
theorem reflection_apply (s : AffineSubspace ℝ P) [Nonempty s] [HasOrthogonalProjection s.direction]
    (p : P) : reflection s p = ↑(orthogonalProjection s p) -ᵥ p +ᵥ (orthogonalProjection s p : P)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : AffineSubspace ℝ P)
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
(p : P)

(EuclideanGeometry.reflection s) p =
  ↑((EuclideanGeometry.orthogonalProjection s) p) -ᵥ p +ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p)


@[simp]
theorem one_apply_eq (i) : (1 : Matrix n n α) i i = 1

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
(i : n)


@[simp]
lemma moduleCat_zero_apply (x : S.X₁) : S.g (S.f x) = 0

(S : CategoryTheory.ShortComplex (ModuleCat R))


theorem isEquiv_iff_val_eq_one [LinearOrderedCommGroupWithZero Γ₀]
    [LinearOrderedCommGroupWithZero Γ'₀] (v : Valuation K Γ₀) (v' : Valuation K Γ'₀) :
    v.IsEquiv v' ↔ ∀ {x : K}, v x = 1 ↔ v' x = 1

{K : Type u_1}
[DivisionRing K]
{Γ₀ : Type u_4}
{Γ'₀ : Type u_5}
[LinearOrderedCommGroupWithZero Γ₀]
[LinearOrderedCommGroupWithZero Γ'₀]
(v : Valuation K Γ₀)
(v' : Valuation K Γ'₀)


theorem image_def (s : Set α) : f.image s = { y | ∃ x ∈ s, y ∈ f x }

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


protected theorem mul_assoc : I * J * K = I * (J * K)

{R : Type u}
[CommSemiring R]
(I J K : Ideal R)


@[simp]
lemma absolutelyContinuous_zero_iff : μ ≪ 0 ↔ μ = 0

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


theorem isOpen_biUnion {s : Set α} {f : α → Set X} (h : ∀ i ∈ s, IsOpen (f i)) :
    IsOpen (⋃ i ∈ s, f i)

{X : Type u}
{α : Type u_1}
[TopologicalSpace X]
{s : Set α}
{f : α → Set X}
(h : ∀ i ∈ s, IsOpen (f i))


@[to_additive]
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G]
    [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M]
    [FunLike hom G M] [MonoidHomClass hom G M]
    (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    UniformEquicontinuous ((↑) ∘ F)

(hf : EquicontinuousAt (DFunLike.coe ∘ F) 1)

UniformEquicontinuous (DFunLike.coe ∘ F)


@[simp, norm_cast] theorem encard_coe_eq_coe_finsetCard (s : Finset α) :
    encard (s : Set α) = s.card


/-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R

{R : Type u_1}
(c₁ c₂ : R)
(a : R × R × R × R)

((QuaternionAlgebra.equivProd c₁ c₂).symm a).imK = a.2.2.2


/-- If `f : 𝕜 → 𝕜` is convex on `s`, then for any point `x ∈ s` the slope of the secant line of `f`
through `x` is monotone on `s \ {x}`. -/
lemma ConvexOn.slope_mono (hfc : ConvexOn 𝕜 s f) (hx : x ∈ s) : MonotoneOn (slope f x) (s \ {x})

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
{x : 𝕜}
(hfc : ConvexOn 𝕜 s f)
(hx : x ∈ s)


theorem toLp_const_smul {f : α → E} (c : 𝕜) (hf : Memℒp f p μ) :
    (hf.const_smul c).toLp (c • f) = c • hf.toLp f

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
{f : α → E}
(c : 𝕜)
(hf : MeasureTheory.Memℒp f p μ)

MeasureTheory.Memℒp.toLp (c • f) ⋯ = c • MeasureTheory.Memℒp.toLp f hf


/-- Corner case for `helly_theorem'`. -/
private lemma helly_theorem_corner {F : ι → Set E} {s : Finset ι}
    (h_card_small : s.card ≤ finrank 𝕜 E + 1)
    (h_inter : ∀ I ⊆ s, I.card ≤ finrank 𝕜 E + 1 → (⋂ i ∈ I, F i).Nonempty) :
    (⋂ i ∈ s, F i).Nonempty

(h_card_small : s.card ≤ FiniteDimensional.finrank 𝕜 E + 1)

(h_inter : ∀ I ⊆ s, I.card ≤ FiniteDimensional.finrank 𝕜 E + 1 → (⋂ i ∈ I, F i).Nonempty)


theorem lfpApprox_add_one (h : x ≤ f x) (a : Ordinal) :
    lfpApprox f x (a+1) = f (lfpApprox f x a)

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(x : α)
(h : x ≤ f x)
(a : Ordinal.{u})

OrdinalApprox.lfpApprox f x (a + 1) = f (OrdinalApprox.lfpApprox f x a)


@[simp]
theorem disjoint_univ_pi : Disjoint (pi univ t₁) (pi univ t₂) ↔ ∃ i, Disjoint (t₁ i) (t₂ i)

{ι : Type u_1}
{α : ι → Type u_2}
{t₁ t₂ : (i : ι) → Set (α i)}

Disjoint (Set.univ.pi t₁) (Set.univ.pi t₂) ↔ ∃ i, Disjoint (t₁ i) (t₂ i)


lemma growsPolynomially_log : GrowsPolynomially Real.log


@[to_additive]
theorem snd_surjective : Surjective (snd : M ∗ N →* N)

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


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

{𝕜 : Type u_1}
{V₁' : Type u_4}
{V₂ : Type u_5}
{P₁' : Type u_9}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V₁']
[NormedSpace 𝕜 V₁']
[MetricSpace P₁']
[NormedAddTorsor V₁' P₁']
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f₁ : P₁' →ᵃⁱ[𝕜] P₂)
{x y : P₁'}


/-- Equivalence between `Fin (n + 1) → β` and `β × (Fin n → β)` which separates out the last
element of the tuple. -/
@[simps! (config := .asFn)]
def Equiv.piFinCastSucc (n : ℕ) (β : Type u) : (Fin (n + 1) → β) ≃ β × (Fin n → β)

⇑(Equiv.piFinCastSucc n β).symm = fun f => Fin.snoc f.2 f.1


theorem preimage_eq_empty_iff (f : α →ₛ β) (b : β) : f ⁻¹' {b} = ∅ ↔ b ∉ f.range

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
(b : β)


@[to_additive (attr := simp)] theorem coe_mkHomeomorph : ⇑(mkHomeomorph : M ≃ₜ Mᵈᵐᵃ) = mk


theorem indep_of_indep_of_le_left (h_indep : Indep m₁ m₂ μ) (h31 : m₃ ≤ m₁) :
    Indep m₃ m₂ μ

(h_indep : ProbabilityTheory.Indep m₁ m₂ μ)


/-- The equivalence `A ≅ B` whose functor is `F ⋙ eB.inverse` and
whose inverse is `G : B ≅ A`. -/
@[simps! inverse]
def equivalence : A ≌ B

(hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor)

(AlgebraicTopology.DoldKan.Compatibility.equivalence hF hG).inverse = G


/-- The type of Heyting homomorphisms from `α` to `β`. Bounded lattice homomorphisms that preserve
Heyting implication. -/
structure HeytingHom (α β : Type*) [HeytingAlgebra α] [HeytingAlgebra β] extends
  LatticeHom α β where
  /-- The proposition that a Heyting homomorphism preserves the bottom element. -/
  protected map_bot' : toFun ⊥ = ⊥
  /-- The proposition that a Heyting homomorphism preserves the Heyting implication. -/
  protected map_himp' : ∀ a b, toFun (a ⇨ b) = toFun a ⇨ toFun b

{α : Type u_6}
{β : Type u_7}
[HeytingAlgebra α]
[HeytingAlgebra β]
(self : HeytingHom α β)


theorem prob_le_one [IsProbabilityMeasure μ] : μ s ≤ 1

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[MeasureTheory.IsProbabilityMeasure μ]


/-- Typeclass for faithful actions. -/
@[to_additive]
class FaithfulSMul (M : Type*) (α : Type*) [SMul M α] : Prop where
  /-- Two elements `m₁` and `m₂` are equal whenever they act in the same way on all points. -/
  eq_of_smul_eq_smul : ∀ {m₁ m₂ : M}, (∀ a : α, m₁ • a = m₂ • a) → m₁ = m₂

{M : Type u_11}
{α : Type u_12}
[SMul M α]
[self : FaithfulSMul M α]
{m₁ m₂ : M}


theorem replicate_add (m n) (a : α) : replicate (m + n) a = replicate m a ++ replicate n a

List.replicate (m + n) a = List.replicate m a ++ List.replicate n a


theorem signAux_mul {n : ℕ} (f g : Perm (Fin n)) : signAux (f * g) = signAux f * signAux g


/-- Show that the functor given by `leftAdjointOfEquiv` is indeed left adjoint to `G`. Dual
to `adjunctionOfRightEquiv`. -/
@[simps!]
def adjunctionOfEquivLeft : leftAdjointOfEquiv e he ⊣ G

(e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y))

(he :
  ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y),
    (e X Y') (CategoryTheory.CategoryStruct.comp h g) = CategoryTheory.CategoryStruct.comp ((e X Y) h) (G.map g))

(CategoryTheory.Adjunction.adjunctionOfEquivLeft e he).unit.app X =
  (e X (F_obj X)) (CategoryTheory.CategoryStruct.id (F_obj X))


/-- If the order of `x` is finite, then `x` is a unit with inverse `x ^ (orderOf x - 1)`. -/
@[simps]
noncomputable
def IsOfFinOrder.unit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : Mˣ

{M : Type u_6}
[Monoid M]
{x : M}
(hx : IsOfFinOrder x)


@[simp]
theorem map_zero : map I (0 : M →ₗ[R] N) = 0

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


theorem image_Icc (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
    e '' Icc x y = Icc (e x) (e y)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(he : (Set.range ⇑e).OrdConnected)
(x y : α)


@[to_additive (attr := simp)]
theorem quotientMapSubgroupOfOfLe_mk {A' A B' B : Subgroup G} [_hAN : (A'.subgroupOf A).Normal]
    [_hBN : (B'.subgroupOf B).Normal] (h' : A' ≤ B') (h : A ≤ B) (x : A) :
    quotientMapSubgroupOfOfLe h' h x = ↑(Subgroup.inclusion h x : B)

{G : Type u}
[AddGroup G]
{A' A B' B : AddSubgroup G}
[_hAN : (A'.addSubgroupOf A).Normal]
[_hBN : (B'.addSubgroupOf B).Normal]
(h' : A' ≤ B')
(h : A ≤ B)
(x : ↥A)

(QuotientAddGroup.quotientMapAddSubgroupOfOfLe h' h) ↑x = ↑((AddSubgroup.inclusion h) x)


theorem _root_.Wbtw.wSameSide₂₃ {s : AffineSubspace R P} {x y z : P} (h : Wbtw R x y z)
    (hx : x ∈ s) : s.WSameSide y z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y z : P}
(h : Wbtw R x y z)
(hx : x ∈ s)


@[to_additive (attr := simp)]
theorem mem_inf {p p' : Submonoid M} {x : M} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{M : Type u_1}
[MulOneClass M]
{p p' : Submonoid M}
{x : M}


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


/-- When both `S.f` and `S.g` are zero, the middle object `S.X₂` gives a left homology data on S -/
@[simps]
def ofZeros (hf : S.f = 0) (hg : S.g = 0) : S.LeftHomologyData

(CategoryTheory.ShortComplex.LeftHomologyData.ofZeros S hf hg).K = S.X₂


theorem mdifferentiableAt_snd {x : M × M'} : MDifferentiableAt (I.prod I') I' Prod.snd x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{x : M × M'}


/-- `χ₈` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈ : χ₈.IsQuadratic


/-- The identity map is a bialgebra equivalence. -/
@[refl, simps!]
def refl : A ≃ₐc[R] A

(R : Type u)
(A : Type v)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[CoalgebraStruct R A]

∀ (a : A), (BialgEquiv.refl R A).invFun a = a


@[mono]
theorem toSubsemiring_strictMono : StrictMono (toSubsemiring : Subring R → Subsemiring R)


@[to_additive (attr := simp)]
theorem rel_eq_coe (c : Con M) : c.r = c


theorem le_iff_imp : ∀ {x y : Bool}, x ≤ y ↔ x → y


@[simp]
theorem coe_toIsometryEquiv : ⇑e.toIsometryEquiv = e

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)


/-- The distinguished element in `Splitting.IndexSet Δ` which corresponds to the
identity of `Δ`. -/
@[simps]
def id : IndexSet Δ

(SimplicialObject.Splitting.IndexSet.id Δ).fst = Δ


theorem bsup_not_succ_of_ne_bsup {o : Ordinal.{u}} {f : ∀ a < o, Ordinal.{max u v}}
    (hf : ∀ {i : Ordinal} (h : i < o), f i h ≠ bsup.{_, v} o f) (a) :
    a < bsup.{_, v} o f → succ a < bsup.{_, v} o f

{f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}}

(hf : ∀ {i : Ordinal.{u}} (h : i < o), f i h ≠ o.bsup f)


@[gcongr]
theorem mul_le_mul_of_nonneg_left [PosMulMono α] (h : b ≤ c) (a0 : 0 ≤ a) : a * b ≤ a * c

{α : Type u_1}
{a b c : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : b ≤ c)
(a0 : 0 ≤ a)


/-- **Dirichlet's approximation theorem**

See also `Real.exists_rat_abs_sub_le_and_den_le`. -/
lemma exists_norm_nsmul_le (ξ : 𝕊) {n : ℕ} (hn : 0 < n) :
    ∃ j ∈ Icc 1 n, ‖j • ξ‖ ≤ T / ↑(n + 1)

{T : ℝ}
[hT : Fact (0 < T)]
(ξ : AddCircle T)
{n : ℕ}
(hn : 0 < n)

∃ j ∈ Set.Icc 1 n, ‖j • ξ‖ ≤ T / ↑(n + 1)


theorem le_iff_le (x : K) (r : ℝ) : (∀ w : InfinitePlace K, w x ≤ r) ↔ ∀ φ : K →+* ℂ, ‖φ x‖ ≤ r

{K : Type u_2}
[Field K]
(x : K)
(r : ℝ)

(∀ (w : NumberField.InfinitePlace K), w x ≤ r) ↔ ∀ (φ : K →+* ℂ), ‖φ x‖ ≤ r


@[simp]
lemma _root_.LinearIsometryEquiv.star_eq_symm (e : H ≃ₗᵢ[𝕜] H) :
    star (e : H →L[𝕜] H) = e.symm

{𝕜 : Type u_1}
[RCLike 𝕜]
{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace 𝕜 H]
[CompleteSpace H]
(e : H ≃ₗᵢ[𝕜] H)

star ↑{ toLinearEquiv := e.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ } =
  ↑{ toLinearEquiv := e.symm.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }


theorem eventually_le_limsup (hf : IsBoundedUnder (· ≤ ·) f u := by isBoundedDefault) :
    ∀ᶠ b in f, u b ≤ f.limsup u

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

∀ᶠ (b : β) in f, u b ≤ Filter.limsup u f


protected theorem R1Space.inf {X : Type*} {t₁ t₂ : TopologicalSpace X}
    (h₁ : @R1Space X t₁) (h₂ : @R1Space X t₂) : @R1Space X (t₁ ⊓ t₂)

{X : Type u_3}
{t₁ t₂ : TopologicalSpace X}
(h₁ : R1Space X)
(h₂ : R1Space X)


@[simp]
lemma isEmpty_iff (X : Type*) :
    IsEmpty (FundamentalGroupoid X) ↔ IsEmpty X


theorem Matrix.mulVecLin_submatrix [Fintype n] [Fintype l] (f₁ : m → k) (e₂ : n ≃ l)
    (M : Matrix k l R) :
    (M.submatrix f₁ e₂).mulVecLin = funLeft R R f₁ ∘ₗ M.mulVecLin ∘ₗ funLeft _ _ e₂.symm

{R : Type u_1}
[CommSemiring R]
{k : Type u_2}
{l : Type u_3}
{m : Type u_4}
{n : Type u_5}
[Fintype n]
[Fintype l]
(f₁ : m → k)
(e₂ : n ≃ l)
(M : Matrix k l R)

(M.submatrix f₁ ⇑e₂).mulVecLin = LinearMap.funLeft R R f₁ ∘ₗ M.mulVecLin ∘ₗ LinearMap.funLeft R R ⇑e₂.symm


/-- An element is right-regular if and only if multiplying it on the right with a right-regular
element is right-regular. -/
@[to_additive (attr := simp)
"An element is add-right-regular if and only if adding it on the right to
an add-right-regular element is add-right-regular."]
theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
    IsRightRegular (b * a) ↔ IsRightRegular b

{R : Type u_1}
[Semigroup R]
{a : R}
(b : R)
(ha : IsRightRegular a)


protected theorem Function.Injective.countable [Countable β] {f : α → β} (hf : Injective f) :
    Countable α

{α : Sort u}
{β : Sort v}
[Countable β]
{f : α → β}
(hf : Function.Injective f)


lemma complete_distinguished_essImageDistTriang_morphism
    (H : ∀ (T₁' T₂' : Triangle C) (_ : T₁' ∈ distTriang C) (_ : T₂' ∈ distTriang C)
      (a : L.obj (T₁'.obj₁) ⟶ L.obj (T₂'.obj₁)) (b : L.obj (T₁'.obj₂) ⟶ L.obj (T₂'.obj₂))
      (_ : L.map T₁'.mor₁ ≫ b = a ≫ L.map T₂'.mor₁),
      ∃ (φ : L.mapTriangle.obj T₁' ⟶ L.mapTriangle.obj T₂'), φ.hom₁ = a ∧ φ.hom₂ = b)
    (T₁ T₂ : Triangle D)
    (hT₁ : T₁ ∈ Functor.essImageDistTriang L) (hT₂ : T₂ ∈ L.essImageDistTriang)
    (a : T₁.obj₁ ⟶ T₂.obj₁) (b : T₁.obj₂ ⟶ T₂.obj₂) (fac : T₁.mor₁ ≫ b = a ≫ T₂.mor₁) :
    ∃ c, T₁.mor₂ ≫ c = b ≫ T₂.mor₂ ∧ T₁.mor₃ ≫ a⟦1⟧' = c ≫ T₂.mor₃

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

(H :
  ∀ (T₁' T₂' : CategoryTheory.Pretriangulated.Triangle C),
    T₁' ∈ CategoryTheory.Pretriangulated.distinguishedTriangles →
      T₂' ∈ CategoryTheory.Pretriangulated.distinguishedTriangles →
        ∀ (a : L.obj T₁'.obj₁ ⟶ L.obj T₂'.obj₁) (b : L.obj T₁'.obj₂ ⟶ L.obj T₂'.obj₂),
          CategoryTheory.CategoryStruct.comp (L.map T₁'.mor₁) b =
              CategoryTheory.CategoryStruct.comp a (L.map T₂'.mor₁) →
            ∃ φ, φ.hom₁ = a ∧ φ.hom₂ = b)

(T₁ T₂ : CategoryTheory.Pretriangulated.Triangle D)

(fac : CategoryTheory.CategoryStruct.comp T₁.mor₁ b = CategoryTheory.CategoryStruct.comp a T₂.mor₁)

∃ c,
  CategoryTheory.CategoryStruct.comp T₁.mor₂ c = CategoryTheory.CategoryStruct.comp b T₂.mor₂ ∧
    CategoryTheory.CategoryStruct.comp T₁.mor₃ ((CategoryTheory.shiftFunctor D 1).map a) =
      CategoryTheory.CategoryStruct.comp c T₂.mor₃


theorem inv_lt_iff_inv_lt : a⁻¹ < b ↔ b⁻¹ < a


@[simp]
theorem quot_mk_eq_mk (x : ℕ × K) : (Quot.mk (R K p) x : PerfectClosure K p) = mk K p x

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x : ℕ × K)

Quot.mk (PerfectClosure.R K p) x = PerfectClosure.mk K p x


theorem exists_finset_le_card (α : Type*) (n : ℕ) (h : n ≤ #α) :
    ∃ s : Finset α, n ≤ s.card

(α : Type u_1)
(n : ℕ)
(h : ↑n ≤ Cardinal.mk α)


@[simp]
theorem Matrix.toLinAlgEquiv_symm :
    (Matrix.toLinAlgEquiv v₁).symm = LinearMap.toMatrixAlgEquiv v₁

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)


theorem ncard_diff_singleton_lt_of_mem {a : α} (h : a ∈ s) (hs : s.Finite := by toFinite_tac) :
    (s \ {a}).ncard < s.ncard

{α : Type u_1}
{s : Set α}
{a : α}
(h : a ∈ s)
(hs : s.Finite := by toFinite_tac)


theorem pairwise_sublists {R} {l : List α} (H : Pairwise R l) :
    Pairwise (fun l₁ l₂ => Lex R (reverse l₁) (reverse l₂)) (sublists l)

{α : Type u}
{R : α → α → Prop}
{l : List α}
(H : List.Pairwise R l)

List.Pairwise (fun l₁ l₂ => List.Lex R l₁.reverse l₂.reverse) l.sublists


/-- An oriented angle is unchanged by replacing the first point by one strictly further away on
the same ray. -/
theorem _root_.Sbtw.oangle_eq_left {p₁ p₁' p₂ p₃ : P} (h : Sbtw ℝ p₂ p₁ p₁') :
    ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃

[hd2 : Fact (FiniteDimensional.finrank ℝ V = 2)]

∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃


theorem snd_pow_of_smul_comm [Monoid R] [AddMonoid M] [DistribMulAction R M]
    [DistribMulAction Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] (x : tsze R M) (n : ℕ)
    (h : x.snd <• x.fst = x.fst •> x.snd) : snd (x ^ n) = n • x.fst ^ n.pred •> x.snd

{R : Type u}
{M : Type v}
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[DistribMulAction Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
(x : tsze R M)
(n : ℕ)
(h : x.snd <• x.fst = x.fst •> x.snd)

(x ^ n).snd = n •> x.fst ^ n.pred •> x.snd


@[simp]
theorem dTo_eq_zero {j : ι} (h : ¬c.Rel (c.prev j) j) : C.dTo j = 0


theorem image_mem_map (hs : s ∈ f) : m '' s ∈ map m f

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}
{s : Set α}
(hs : s ∈ f)


@[simp]
theorem differentiableWithinAt_const_add_iff (c : F) :
    DifferentiableWithinAt 𝕜 (fun y => c + f y) s x ↔ DifferentiableWithinAt 𝕜 f s 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}
{s : Set E}
(c : F)


@[reassoc (attr := simp)]
lemma pullback_inv_fst_snd_of_right_isIso :
    inv (pullback.fst f g) ≫ pullback.snd f g = f ≫ inv g

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

CategoryTheory.inv (CategoryTheory.Limits.pullback.fst f g) ≫ CategoryTheory.Limits.pullback.snd f g =
  f ≫ CategoryTheory.inv g


lemma of_id_fst : IsPushout (𝟙 _) f f (𝟙 _)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{Z X : C}
{f : Z ⟶ X}

CategoryTheory.IsPushout (𝟙 Z) f f (𝟙 X)


/-- Corollary of the **Hahn-Banach theorem**: if `f : p → F` is a continuous linear map
from a submodule of a normed space `E` over `𝕜`, `𝕜 = ℝ` or `𝕜 = ℂ`,
with a finite dimensional range,
then `f` admits an extension to a continuous linear map `E → F`.

Note that contrary to the case `F = 𝕜`, see `exists_extension_norm_eq`,
we provide no estimates on the norm of the extension.
-/
lemma ContinuousLinearMap.exist_extension_of_finiteDimensional_range {p : Submodule 𝕜 E}
    (f : p →L[𝕜] F) [FiniteDimensional 𝕜 (LinearMap.range f)] :
    ∃ g : E →L[𝕜] F, f = g.comp p.subtypeL

[FiniteDimensional 𝕜 ↥(LinearMap.range f)]


protected theorem eq_zero_of_div_eq_zero {d n : Int} (h : d ∣ n) (H : n.div d = 0) : n = 0


/-- If a monotone function sending `top` to `top` is continuous at the indexed infimum over
a `Sort`, then it sends this indexed infimum to the indexed infimum of the composition. -/
theorem Monotone.map_iInf_of_continuousAt {ι : Sort*} {f : α → β} {g : ι → α}
    (Cf : ContinuousAt f (iInf g)) (Mf : Monotone f) (ftop : f ⊤ = ⊤) : f (iInf g) = iInf (f ∘ g)

{α : Type u_1}
{β : Type u_2}
[CompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[CompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{ι : Sort u_4}
{f : α → β}
{g : ι → α}
(Cf : ContinuousAt f (iInf g))
(Mf : Monotone f)
(ftop : f ⊤ = ⊤)


@[simp]
theorem id_toContinuousLinearMap : id.toContinuousLinearMap = ContinuousLinearMap.id R E

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]

LinearIsometry.id.toContinuousLinearMap = ContinuousLinearMap.id R E


theorem getElem_insertNth_of_lt (l : List α) (x : α) (n k : ℕ) (hn : k < n) (hk : k < l.length)
    (hk' : k < (insertNth n x l).length := hk.trans_le (length_le_length_insertNth _ _ _)) :
    (insertNth n x l)[k] = l[k]

(hk' : k < (List.insertNth n x l).length := ⋯)


theorem setIntegral_comp_smul (f : E → F) {R : ℝ} (s : Set E) (hR : R ≠ 0) :
    ∫ x in s, f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ x in R • s, f x ∂μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : E → F)
{R : ℝ}
(s : Set E)
(hR : R ≠ 0)

∫ (x : E) in s, f (R • x) ∂μ = |(R ^ FiniteDimensional.finrank ℝ E)⁻¹| • ∫ (x : E) in R • s, f x ∂μ


theorem adic_basis (I : Ideal R) : SubmodulesRingBasis fun n : ℕ => (I ^ n • ⊤ : Ideal R)

{R : Type u_1}
[CommRing R]
(I : Ideal R)


theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
    trop s.inf = Multiset.sum (s.map trop)

{R : Type u_1}
[LinearOrder R]
[OrderTop R]
(s : Multiset R)

Tropical.trop s.inf = (Multiset.map Tropical.trop s).sum


@[simp] theorem run_throw [Monad m] : run (throw e : ExceptCpsT ε m β) = pure (Except.error e)

{m : Type u_1 → Type u_2}
{ε β : Type u_1}
{e : ε}
[Monad m]


theorem X_add_C_ne_zero (r : R) : X + C r ≠ 0

{R : Type u}
[Nontrivial R]
[Semiring R]
(r : R)


theorem lim_eq_lim_im_add_lim_re (f : CauSeq ℂ Complex.abs) :
    lim f = ↑(lim (cauSeqRe f)) + ↑(lim (cauSeqIm f)) * I

f.lim = ↑(Complex.cauSeqRe f).lim + ↑(Complex.cauSeqIm f).lim * Complex.I


theorem not_iff_not : (¬a ↔ ¬b) ↔ (a ↔ b)


@[to_additive (attr := simp)]
theorem tprod_const [T2Space G] (a : G) : ∏' _ : β, a = a ^ (Nat.card β)

{β : Type u_2}
{G : Type u_5}
[TopologicalSpace G]
[AddCommGroup G]
[TopologicalAddGroup G]
[T2Space G]
(a : G)


/--
If `C` has an initial object and binary coproducts, then it has a coproduct for objects indexed by
`Fin n`.
This is a helper lemma for `hasCofiniteProductsOfHasBinaryAndTerminal`, which is more general
than this.
-/
private theorem hasCoproduct_fin : ∀ (n : ℕ) (f : Fin n → C), HasCoproduct f


theorem HasFiniteIntegral.max_zero {f : α → ℝ} (hf : HasFiniteIntegral f μ) :
    HasFiniteIntegral (fun a => max (f a) 0) μ

(hf : MeasureTheory.HasFiniteIntegral f μ)

MeasureTheory.HasFiniteIntegral (fun a => max (f a) 0) μ


@[to_additive, field_simps] -- The attributes are out of order on purpose
theorem div_div_eq_mul_div : a / (b / c) = a * c / b

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


lemma vanishingIdeal_isIrreducible :
    vanishingIdeal (R := R) '' {s | IsIrreducible s} = {P | P.IsPrime}

PrimeSpectrum.vanishingIdeal '' {s | IsIrreducible s} = {P | P.IsPrime}


theorem convex_halfspace_re_le (r : ℝ) : Convex ℝ { c : ℂ | c.re ≤ r }


@[to_additive (attr := simp)]
theorem Units.coe_unop_opEquiv {M} [Monoid M] (u : Mᵐᵒᵖˣ) :
    ((Units.opEquiv u).unop : M) = unop (u : Mᵐᵒᵖ)

↑(MulOpposite.unop (Units.opEquiv u)) = MulOpposite.unop ↑u


theorem equivalence_inverse : (equivalence : SimplicialObject A ≌ _).inverse = Γ

{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
[CategoryTheory.Abelian A]


theorem Pi.uniformity :
    𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) (𝓤 (α i))

{ι : Type u_1}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]

𝓤 ((i : ι) → α i) = ⨅ i, Filter.comap (fun a => (a.1 i, a.2 i)) (𝓤 (α i))


@[simp]
theorem zero_rpow_mul_self (y : ℝ) : (0 : ℝ≥0∞) ^ y * (0 : ℝ≥0∞) ^ y = (0 : ℝ≥0∞) ^ y


theorem limsup_trim (hm : m ≤ m0) {f : α → ℝ≥0∞} (hf : Measurable[m] f) :
    limsup f (ae (μ.trim hm)) = limsup f (ae μ)

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
{f : α → ENNReal}
(hf : Measurable f)

Filter.limsup f (MeasureTheory.ae (μ.trim hm)) = Filter.limsup f (MeasureTheory.ae μ)


theorem preimage_union (s t : Set β) : r.preimage (s ∪ t) = r.preimage s ∪ r.preimage t

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)
(s t : Set β)


theorem isBounded_image (f : α →ᵇ β) (s : Set α) : IsBounded (f '' s)

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


@[simp]
theorem zero_snd : (0 : WithLp p (α × β)).snd = 0

{p : ℝ≥0∞}
{α : Type u_2}
{β : Type u_3}
[AddCommGroup α]
[AddCommGroup β]


@[simp]
theorem toOuterMeasure_ofFinset_apply :
    (ofFinset f s h h').toOuterMeasure t = ∑' x, t.indicator f x

{α : Type u_1}
{f : α → ENNReal}
{s : Finset α}
(h : ∑ a ∈ s, f a = 1)
(h' : ∀ a ∉ s, f a = 0)
(t : Set α)

(PMF.ofFinset f s h h').toOuterMeasure t = ∑' (x : α), t.indicator f x


lemma optionEquivLeft_X_none : optionEquivLeft R S₁ (X none) = Polynomial.X

(R : Type u)
(S₁ : Type v)
[CommSemiring R]

(MvPolynomial.optionEquivLeft R S₁) (MvPolynomial.X none) = Polynomial.X


@[simp]
theorem empty_union (s : Finset α) : ∅ ∪ s = s

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


@[simp]
theorem id_eq_id (A : Coalgebra G) : Coalgebra.Hom.id A = 𝟙 A

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{G : CategoryTheory.Comonad C}
(A : G.Coalgebra)

CategoryTheory.Comonad.Coalgebra.Hom.id A = CategoryTheory.CategoryStruct.id A


lemma fullyFaithful_preimage {X Y : Cᵒᵖ} (f : coyoneda.obj X ⟶ coyoneda.obj Y) :
    fullyFaithful.preimage f = (f.app X.unop (𝟙 X.unop)).op

(f : CategoryTheory.coyoneda.obj X ⟶ CategoryTheory.coyoneda.obj Y)

CategoryTheory.Coyoneda.fullyFaithful.preimage f =
  Quiver.Hom.op (f.app (Opposite.unop X) (CategoryTheory.CategoryStruct.id (Opposite.unop X)))


lemma IsCircuit.not_nil {p : G.Walk v v} (hp : IsCircuit p) : ¬ p.Nil

{V : Type u}
{G : SimpleGraph V}
{v : V}
{p : G.Walk v v}
(hp : p.IsCircuit)


theorem liftAlgHom_unique (f : A →ₐ[S] B) {s : A → A → Prop} (w : ∀ ⦃x y⦄, s x y → f x = f y)
    (g : RingQuot s →ₐ[S] B) (h : g.comp (mkAlgHom S s) = f) : g = liftAlgHom S ⟨f, w⟩

(h : g.comp (RingQuot.mkAlgHom S s) = f)


@[to_additive (attr := simp)]
theorem index_bot : (⊥ : Subgroup G).index = Nat.card G


@[norm_cast]
theorem summable_coe {f : α → ℝ≥0} : (Summable fun a => (f a : ℝ)) ↔ Summable f


theorem IsExtreme.inter (hAB : IsExtreme 𝕜 A B) (hAC : IsExtreme 𝕜 A C) :
    IsExtreme 𝕜 A (B ∩ C)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A B C : Set E}
(hAB : IsExtreme 𝕜 A B)
(hAC : IsExtreme 𝕜 A C)


/-- If `I` is an additive monoid and `c : ComplexShape I`, `c.TensorSigns` contains the data of
map `ε : I → ℤˣ` and properties which allows the construction of a `TotalComplexShape c c c`. -/
class TensorSigns where
  /-- the signs which appear in the vertical differential of the total complex -/
  ε' : Multiplicative I →* ℤˣ
  rel_add (p q r : I) (hpq : c.Rel p q) : c.Rel (p + r) (q + r)
  add_rel (p q r : I) (hpq : c.Rel p q) : c.Rel (r + p) (r + q)
  ε'_succ (p q : I) (hpq : c.Rel p q) : ε' q = - ε' p

{I : Type u_4}
[AddMonoid I]
{c : ComplexShape I}
[self : c.TensorSigns]
(p q : I)
(hpq : c.Rel p q)

(ComplexShape.TensorSigns.ε' c) q = -(ComplexShape.TensorSigns.ε' c) p


/-- A family of MulHom's `f a : γ →ₙ* β a` defines a MulHom `Pi.mulHom f : γ →ₙ* Π a, β a`
given by `Pi.mulHom f x b = f b x`. -/
@[to_additive (attr := simps)
  "A family of AddHom's `f a : γ → β a` defines an AddHom `Pi.addHom f : γ → Π a, β a` given by
  `Pi.addHom f x b = f b x`."]
def Pi.mulHom {γ : Type w} [∀ i, Mul (f i)] [Mul γ] (g : ∀ i, γ →ₙ* f i) : γ →ₙ* ∀ i, f i

{I : Type u}
{f : I → Type v}
{γ : Type w}
[(i : I) → Mul (f i)]
[Mul γ]
(g : (i : I) → γ →ₙ* f i)
(x : γ)
(i : I)


@[simp] protected theorem neg_div : ∀ a b : Int, (-a).div b = -(a.div b)


/-- The `DFinsupp` version of `Finsupp.liftAddHom`,-/
@[simps apply symm_apply]
def liftAddHom [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] :
    (∀ i, β i →+ γ) ≃+ ((Π₀ i, β i) →+ γ)

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
[AddCommMonoid γ]
(F : (Π₀ (i : ι), β i) →+ γ)
(i : ι)

DFinsupp.liftAddHom.symm F i = F.comp (DFinsupp.singleAddHom β i)


lemma ComplexShape.quotient_isLocalization :
    (HomotopyCategory.quotient C c).IsLocalization
      (HomologicalComplex.homotopyEquivalences _ _)

(HomotopyCategory.quotient C c).IsLocalization (HomologicalComplex.homotopyEquivalences C c)


@[simp]
theorem fst_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (z : tsze R M).fst = z

{R : Type u}
{M : Type v}
[AddGroupWithOne R]
[AddGroup M]
(z : ℤ)


@[deprecated map_zero (since := "2024-06-26")]
protected theorem map_zero : φ 0 = 0

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(φ : A →ₐ[R] B)


/-- Turn a subgraph of a `SimpleGraph` into a member of its subgraph type. -/
@[simps]
def _root_.SimpleGraph.toSubgraph (H : SimpleGraph V) (h : H ≤ G) : G.Subgraph

{V : Type u}
{G : SimpleGraph V}
(H : SimpleGraph V)
(h : H ≤ G)

(SimpleGraph.toSubgraph H h).verts = Set.univ


/-- An Eilenberg-Moore coalgebra for a comonad `T`. -/
-- Porting note(#5171): linter not ported yet
-- @[nolint has_nonempty_instance]
structure Coalgebra (G : Comonad C) : Type max u₁ v₁ where
  /-- The underlying object associated to a coalgebra. -/
  A : C
  /-- The structure morphism associated to a coalgebra. -/
  a : A ⟶ (G : C ⥤ C).obj A
  /-- The counit axiom associated to a coalgebra. -/
  counit : a ≫ G.ε.app A = 𝟙 A := by aesop_cat
  /-- The coassociativity axiom associated to a coalgebra. -/
  coassoc : a ≫ G.δ.app A = a ≫ G.map a := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{G : CategoryTheory.Comonad C}
(self : G.Coalgebra)

CategoryTheory.CategoryStruct.comp self.a (G.δ.app self.A) = CategoryTheory.CategoryStruct.comp self.a (G.map self.a)


@[to_additive (attr := continuity) continuous_nnnorm]
theorem continuous_nnnorm' : Continuous fun a : E => ‖a‖₊


@[to_additive] lemma mul_le_mul_iff_of_ge [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] {a₁ a₂ b₁ b₂ : α} (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) :
    a₂ * b₂ ≤ a₁ * b₁ ↔ a₁ = a₂ ∧ b₁ = b₂

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

[CovariantClass α α (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1]


@[simp]
theorem sort_eq (s : Finset α) : ↑(sort r s) = s.1

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
(s : Finset α)


theorem sSameSide_smul_vsub_vadd_left {s : AffineSubspace R P} {x p₁ p₂ : P} (hx : x ∉ s)
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : 0 < t) : s.SSameSide (t • (x -ᵥ p₁) +ᵥ p₂) x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x p₁ p₂ : P}
(hx : x ∉ s)
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)
{t : R}
(ht : 0 < t)


protected theorem sign_eq_ediv_abs (a : ℤ) : sign a = a / |a|


@[reassoc (attr := simp)] lemma ι_g' : h.ι ≫ h.g' = 0

CategoryTheory.CategoryStruct.comp h.ι h.g' = 0


/-- The triangle `Z₁₂ ⟶ Z₁₃ ⟶ Z₂₃ ⟶ Z₁₂⟦1⟧` given by an octahedron. -/
@[simps!]
def triangle : Triangle C

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)

h.triangle.mor₃ = CategoryTheory.CategoryStruct.comp w₂₃ ((CategoryTheory.shiftFunctor C 1).map v₁₂)


/-- The localization of a formally étale map is formally étale. -/
theorem localization_map [FormallyEtale R S] : FormallyEtale Rₘ Sₘ

[IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ]


@[simp]
theorem prod_apply (f : ContinuousMultilinearMap R M₁ M₂) (g : ContinuousMultilinearMap R M₁ M₃)
    (m : ∀ i, M₁ i) : (f.prod g) m = (f m, g m)

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
{M₃ : Type w₃}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[Module R M₃]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
[TopologicalSpace M₃]
(f : ContinuousMultilinearMap R M₁ M₂)
(g : ContinuousMultilinearMap R M₁ M₃)
(m : (i : ι) → M₁ i)


/-- For level `N = 1`, the gamma sets are all equal. -/
lemma gammaSet_one_eq (a a' : Fin 2 → ZMod 1) : gammaSet 1 a = gammaSet 1 a'

EisensteinSeries.gammaSet 1 a = EisensteinSeries.gammaSet 1 a'


@[simp]
theorem deriv_log' : deriv log = Inv.inv


protected theorem surjective (e : r ≃r s) : Surjective e

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(e : r ≃r s)


lemma η_app (X₂ : C₂) :
    (η adj L₁ L₂ W₂ G' F').app (L₂.obj X₂) =
      G'.map ((CatCommSq.iso F L₂ L₁ F').inv.app X₂) ≫
        (CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂) ≫
        L₂.map (adj.counit.app X₂)

(W₂ : CategoryTheory.MorphismProperty C₂)

(CategoryTheory.Adjunction.Localization.η adj L₁ L₂ W₂ G' F').app (L₂.obj X₂) =
  CategoryTheory.CategoryStruct.comp (G'.map ((CategoryTheory.CatCommSq.iso F L₂ L₁ F').inv.app X₂))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂))
      (L₂.map (adj.counit.app X₂)))


@[simp]
theorem sub_top {a : WithTop α} : a - ⊤ = ⊤

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a : WithTop α}


@[simp]
theorem div_right (hab : Commute a b) (hac : Commute a c) : Commute a (b / c)

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b c : G₀}
(hab : Commute a b)
(hac : Commute a c)


/-- A submonoid `S` of a monoid `R` is (left) Ore if common factors on the right can be turned
into common factors on the left, and if each pair of `r : R` and `s : S` admits an Ore numerator
`v : R` and an Ore denominator `u : S` such that `u * r = v * s`. -/
@[to_additive AddOreLocalization.AddOreSet]
class OreSet {R : Type*} [Monoid R] (S : Submonoid R) where
  /-- Common factors on the right can be turned into common factors on the left, a weak form of
cancellability. -/
  ore_right_cancel : ∀ (r₁ r₂ : R) (s : S), r₁ * s = r₂ * s → ∃ s' : S, s' * r₁ = s' * r₂
  /-- The Ore numerator of a fraction. -/
  oreNum : R → S → R
  /-- The Ore denominator of a fraction. -/
  oreDenom : R → S → S
  /-- The Ore condition of a fraction, expressed in terms of `oreNum` and `oreDenom`. -/
  ore_eq : ∀ (r : R) (s : S), oreDenom r s * r = oreNum r s * s

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[self : OreLocalization.OreSet S]
(r : R)
(s : ↥S)

↑(OreLocalization.OreSet.oreDenom r s) * r = OreLocalization.OreSet.oreNum r s * ↑s


/-- A polynomial function is infinitely differentiable. -/
theorem CPolynomialOn.contDiffOn (h : CPolynomialOn 𝕜 f s) {n : ℕ∞} :
    ContDiffOn 𝕜 n f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(h : CPolynomialOn 𝕜 f s)
{n : ℕ∞}


theorem ExtraDegeneracy.s_comp_base (n : ℕ) :
    ExtraDegeneracy.s f S n ≫ WidePullback.base _ = WidePullback.base _

[∀ (n : ℕ), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

(CategoryTheory.Arrow.AugmentedCechNerve.ExtraDegeneracy.s f S n ≫
    CategoryTheory.Limits.WidePullback.base fun x => f.hom) =
  CategoryTheory.Limits.WidePullback.base fun x => f.hom


theorem star_ne_zero [AddMonoid R] [StarAddMonoid R] {x : R} : star x ≠ 0 ↔ x ≠ 0

{R : Type u}
[AddMonoid R]
[StarAddMonoid R]
{x : R}


@[simp]
theorem toFinsupp_nil [DecidablePred fun i => getD ([] : List M) i 0 ≠ 0] :
    toFinsupp ([] : List M) = 0

[DecidablePred fun i => [].getD i 0 ≠ 0]


/-- If `x` is in the base field `K`, then the trace is `[L : K] * x`.

(If `L` is not finite-dimensional over `K`, then `trace` and `finrank` return `0`.)
-/
@[simp]
theorem trace_algebraMap [StrongRankCondition R] [Module.Free R S] (x : R) :
    trace R S (algebraMap R S x) = finrank R S • x

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
[StrongRankCondition R]
[Module.Free R S]
(x : R)

(Algebra.trace R S) ((algebraMap R S) x) = FiniteDimensional.finrank R S • x


theorem hasStrictDerivAt_id : HasStrictDerivAt id 1 x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)


theorem IsIntegral.of_mul_unit {x y : B} {r : R} (hr : algebraMap R B r * y = 1)
    (hx : IsIntegral R (x * y)) : IsIntegral R x

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]
{x y : B}
{r : R}
(hr : (algebraMap R B) r * y = 1)
(hx : IsIntegral R (x * y))


theorem summable_Lp_add_of_nonneg (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i)
    (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ p) :
    Summable fun i => (f i + g i) ^ p

{ι : Type u}
{f g : ι → ℝ}
{p : ℝ}
(hp : 1 ≤ p)
(hf : ∀ (i : ι), 0 ≤ f i)
(hg : ∀ (i : ι), 0 ≤ g i)
(hf_sum : Summable fun i => f i ^ p)
(hg_sum : Summable fun i => g i ^ p)


theorem subset_generated (c d : C) : X c d ⊆ (generated X).arrows c d

{C : Type u}
[CategoryTheory.Groupoid C]
(X : (c d : C) → Set (c ⟶ d))
(c d : C)

X c d ⊆ (CategoryTheory.Subgroupoid.generated X).arrows c d


theorem mul_right_cancel₀ (hb : b ≠ 0) (h : a * b = c * b) : a = c

{M₀ : Type u_1}
[Mul M₀]
[Zero M₀]
[IsRightCancelMulZero M₀]
{a b c : M₀}
(hb : b ≠ 0)
(h : a * b = c * b)


/-- An `Invertible` element is a unit. -/
@[simps]
def unitOfInvertible [Monoid α] (a : α) [Invertible a] : αˣ

{α : Type u}
[Monoid α]
(a : α)
[Invertible a]


theorem EqOn.mono (hs : s₁ ⊆ s₂) (hf : EqOn f₁ f₂ s₂) : EqOn f₁ f₂ s₁

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{f₁ f₂ : α → β}
(hs : s₁ ⊆ s₂)
(hf : Set.EqOn f₁ f₂ s₂)


theorem nhdsWithin_inter_of_mem {a : α} {s t : Set α} (h : s ∈ 𝓝[t] a) : 𝓝[s ∩ t] a = 𝓝[t] a

{α : Type u_1}
[TopologicalSpace α]
{a : α}
{s t : Set α}
(h : s ∈ 𝓝[t] a)


theorem Complex.hasSum_sin' (z : ℂ) :
    HasSum (fun n : ℕ => (z * Complex.I) ^ (2 * n + 1) / ↑(2 * n + 1)! / Complex.I)
      (Complex.sin z)

HasSum (fun n => (z * Complex.I) ^ (2 * n + 1) / ↑(2 * n + 1)! / Complex.I) (Complex.sin z)


protected theorem finrank [NumberField K] : finrank ℝ (E K) = finrank ℚ K

(K : Type u_1)
[Field K]
[NumberField K]

FiniteDimensional.finrank ℝ (({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ)) = FiniteDimensional.finrank ℚ K


theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2

Real.cos θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ (2 * ↑k + 1) * Real.pi / 2


theorem ext {q₁ q₂ : Semiquot α} : q₁ = q₂ ↔ ∀ a, a ∈ q₁ ↔ a ∈ q₂


theorem sup_eq_biUnion {α β} [DecidableEq β] (s : Finset α) (t : α → Finset β) :
    s.sup t = s.biUnion t

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


lemma differentiable_completedHurwitzZetaEven₀ (a : UnitAddCircle) :
    Differentiable ℂ (completedHurwitzZetaEven₀ a)

Differentiable ℂ (HurwitzZeta.completedHurwitzZetaEven₀ a)


lemma optionEquivLeft_symm_univ_isHomogeneous :
    ((optionEquivLeft R (n × n)).symm (univ R n)).IsHomogeneous (Fintype.card n)

(R : Type u_1)
(n : Type u_3)
[CommRing R]
[Fintype n]
[DecidableEq n]

((MvPolynomial.optionEquivLeft R (n × n)).symm (Matrix.charpoly.univ R n)).IsHomogeneous (Fintype.card n)


theorem setToL1SCLM_mono_left {T T' : Set α → E →L[ℝ] G''} {C C' : ℝ}
    (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C')
    (hTT' : ∀ s x, T s x ≤ T' s x) (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ hT f ≤ setToL1SCLM α E μ hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

(hTT' : ∀ (s : Set α) (x : E), (T s) x ≤ (T' s) x)

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f ≤ (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT') f


lemma exists_unique_mem_descSet (x : c.pt) : ∃! y : lc.pt, x ∈ descSet hc {y}

(hc : CategoryTheory.Limits.IsColimit c)

(lc : CategoryTheory.Limits.Cocone (K.comp CategoryTheory.uliftFunctor.{v, u}))

∃! y, x ∈ CategoryTheory.Limits.Types.descSet hc {y}


theorem zipWith_nil (f : α → β → γ) (l : List α) : zipWith f l [] = []

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → β → γ)
(l : List α)


@[to_additive]
theorem map_inf_le (H K : Subgroup G) (f : G →* N) : map f (H ⊓ K) ≤ map f H ⊓ map f K

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(H K : Subgroup G)
(f : G →* N)

Subgroup.map f (H ⊓ K) ≤ Subgroup.map f H ⊓ Subgroup.map f K


@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : NonemptyInterval α)

{α : Type u_2}
[PartialOrder α]
[Zero α]


theorem isNat_le_true [OrderedSemiring α] : {a b : α} → {a' b' : ℕ} →
    IsNat a a' → IsNat b b' → Nat.ble a' b' = true → a ≤ b

{α : Type u_1}
[OrderedSemiring α]
{a b : α}
{a' b' : ℕ}

Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.ble b' = true → a ≤ b


@[to_additive (attr := simp)]
theorem constSMul_symm (c : G) : (constSMul c : X ≃ᵢ X).symm = constSMul c⁻¹

{G : Type v}
{X : Type w}
[PseudoEMetricSpace X]
[Group G]
[MulAction G X]
[IsometricSMul G X]
(c : G)

(IsometryEquiv.constSMul c).symm = IsometryEquiv.constSMul c⁻¹


@[simp]
theorem smul_apply : (c • x) i = c • x i

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


theorem AddMonoidHom.completion_add {γ : Type*} [AddCommGroup γ] [UniformSpace γ]
    [UniformAddGroup γ] (f g : α →+ γ) (hf : Continuous f) (hg : Continuous g) :
    AddMonoidHom.completion (f + g) (hf.add hg) =
    AddMonoidHom.completion f hf + AddMonoidHom.completion g hg

{α : Type u_3}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{γ : Type u_5}
[AddCommGroup γ]
[UniformSpace γ]
[UniformAddGroup γ]
(f g : α →+ γ)
(hf : Continuous ⇑f)
(hg : Continuous ⇑g)

(f + g).completion ⋯ = f.completion hf + g.completion hg


/-- `Prop` structure holding the hypotheses of the Picard-Lindelöf theorem.

The similarly named `PicardLindelof` structure is part of the internal API for convenience, so as
not to constantly invoke choice, but is not intended for public use. -/
structure IsPicardLindelof {E : Type*} [NormedAddCommGroup E] (v : ℝ → E → E) (tMin t₀ tMax : ℝ)
    (x₀ : E) (L : ℝ≥0) (R C : ℝ) : Prop where
  ht₀ : t₀ ∈ Icc tMin tMax
  hR : 0 ≤ R
  lipschitz : ∀ t ∈ Icc tMin tMax, LipschitzOnWith L (v t) (closedBall x₀ R)
  cont : ∀ x ∈ closedBall x₀ R, ContinuousOn (fun t : ℝ => v t x) (Icc tMin tMax)
  norm_le : ∀ t ∈ Icc tMin tMax, ∀ x ∈ closedBall x₀ R, ‖v t x‖ ≤ C
  C_mul_le_R : (C : ℝ) * max (tMax - t₀) (t₀ - tMin) ≤ R

(self : IsPicardLindelof v tMin t₀ tMax x₀ L R C)


theorem Cofork.IsColimit.hom_ext {s : Cofork f g} (hs : IsColimit s) {W : C} {k l : s.pt ⟶ W}
    (h : Cofork.π s ≫ k = Cofork.π s ≫ l) : k = l

(hs : CategoryTheory.Limits.IsColimit s)

(h : CategoryTheory.CategoryStruct.comp s.π k = CategoryTheory.CategoryStruct.comp s.π l)


/-- Product of a multiset of elements in a submonoid of a `CommMonoid` is in the submonoid. -/
@[to_additive
      "Sum of a multiset of elements in an `AddSubmonoid` of an `AddCommMonoid` is
      in the `AddSubmonoid`."]
theorem multiset_prod_mem {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset M)
    (hm : ∀ a ∈ m, a ∈ S) : m.prod ∈ S

{B : Type u_3}
{S : B}
{M : Type u_4}
[AddCommMonoid M]
[SetLike B M]
[AddSubmonoidClass B M]
(m : Multiset M)
(hm : ∀ a ∈ m, a ∈ S)


/-- The empty set is collinear. -/
theorem collinear_empty : Collinear k (∅ : Set P)

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


@[simp]
theorem sheafification_map {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    (J.sheafification D).map η = J.sheafifyMap η

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]


@[simp]
theorem associator_obj_inl_inr (X) : (associator C D E).obj (inl (inr X)) = inr (inl X)

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

(CategoryTheory.sum.associator C D E).obj (Sum.inl (Sum.inr X)) = Sum.inr (Sum.inl X)


lemma mul_coe_eq_bind {b : α} (hb : b ≠ 0) : ∀ a, (a * b : WithTop α) = a.bind fun a ↦ ↑(a * b)

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
{b : α}
(hb : b ≠ 0)
(a : WithTop α)

a * ↑b = Option.bind a fun a => some (a * b)


@[to_additive (attr := simp)]
theorem prod_ite_eq [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
    (f.prod fun x v => ite (a = x) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
[DecidableEq α]
(f : α →₀ M)
(a : α)
(b : α → M → N)

(f.sum fun x v => if a = x then b x v else 0) = if a ∈ f.support then b a (f a) else 0


theorem forall₂_cons_right_iff {b l u} :
    Forall₂ R u (b :: l) ↔ ∃ a u', R a b ∧ Forall₂ R u' l ∧ u = a :: u'

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{b : β}
{l : List β}
{u : List α}

List.Forall₂ R u (b :: l) ↔ ∃ a u', R a b ∧ List.Forall₂ R u' l ∧ u = a :: u'


theorem smulRight_one_pow [TopologicalSpace R] [TopologicalRing R] (c : R) (n : ℕ) :
    smulRight (1 : R →L[R] R) c ^ n = smulRight (1 : R →L[R] R) (c ^ n)

{R : Type u_1}
[Ring R]
[TopologicalSpace R]
[TopologicalRing R]
(c : R)
(n : ℕ)

ContinuousLinearMap.smulRight 1 c ^ n = ContinuousLinearMap.smulRight 1 (c ^ n)


theorem pwFilter_eq_self [DecidableRel (α := α) R] {l : List α} :
    pwFilter R l = l ↔ Pairwise R l

{α : Type u_1}
{R : α → α → Prop}
[DecidableRel R]
{l : List α}

List.pwFilter R l = l ↔ List.Pairwise R l


@[to_additive]
theorem pi_empty (H : ∀ i, Subgroup (f i)) : pi ∅ H = ⊤

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → AddGroup (f i)]
(H : (i : η) → AddSubgroup (f i))


theorem topologyOfClosureOperator_close (c : ∀ X : C, ClosureOperator (Sieve X))
    (pb : ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Sieve X), c Y (S.pullback f) = (c X S).pullback f) (X : C)
    (S : Sieve X) : (topologyOfClosureOperator c pb).close S = c X S

(c : (X : C) → ClosureOperator (CategoryTheory.Sieve X))

(pb :
  ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : CategoryTheory.Sieve X),
    (c Y) (CategoryTheory.Sieve.pullback f S) = CategoryTheory.Sieve.pullback f ((c X) S))

(CategoryTheory.topologyOfClosureOperator c pb).close S = (c X) S


theorem IsInvertedBy.iff_of_iso (W : MorphismProperty C) {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) :
    W.IsInvertedBy F₁ ↔ W.IsInvertedBy F₂

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
(W : CategoryTheory.MorphismProperty C)
{F₁ F₂ : CategoryTheory.Functor C D}
(e : F₁ ≅ F₂)


theorem coe_sup [SemilatticeSup α] (a b : α) : ((a ⊔ b : α) : WithBot α) = (a : WithBot α) ⊔ b

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


/-- Submonoids are closed under natural powers. -/
@[to_additive
      "An `AddSubmonoid` is closed under multiplication by naturals."]
theorem IsSubmonoid.pow_mem {a : M} (hs : IsSubmonoid s) (h : a ∈ s) : ∀ {n : ℕ}, a ^ n ∈ s

{M : Type u_1}
[AddMonoid M]
{s : Set M}
{a : M}
(hs : IsAddSubmonoid s)
(h : a ∈ s)
{n : ℕ}


/-- Two multilinear maps indexed by `Fin n` are equal if they are equal when all arguments are
basis vectors. -/
theorem Basis.ext_multilinear_fin {f g : MultilinearMap R M M₂} {ι₁ : Fin n → Type*}
    (e : ∀ i, Basis (ι₁ i) R (M i))
    (h : ∀ v : ∀ i, ι₁ i, (f fun i => e i (v i)) = g fun i => e i (v i)) : f = g

(e : (i : Fin n) → Basis (ι₁ i) R (M i))

(h : ∀ (v : (i : Fin n) → ι₁ i), (f fun i => (e i) (v i)) = g fun i => (e i) (v i))


theorem eq_pow_of_mul_eq_pow_odd_right {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ} (hk : Odd k)
    (h : a * b = c ^ k) : ∃ d, b = d ^ k


theorem apply_piecewise {δ' : α → Sort*} (h : ∀ i, δ i → δ' i) {x : α} :
    h x (s.piecewise f g x) = s.piecewise (fun x => h x (f x)) (fun x => h x (g x)) x

{α : Type u_1}
{δ : α → Sort u_6}
(s : Set α)
(f g : (i : α) → δ i)
[(j : α) → Decidable (j ∈ s)]
{δ' : α → Sort u_7}
(h : (i : α) → δ i → δ' i)
{x : α}


@[fun_prop]
theorem continuousOn_cos {s} : ContinuousOn cos s


theorem nilradical_eq_sInf (R : Type*) [CommSemiring R] :
    nilradical R = sInf { J : Ideal R | J.IsPrime }


/-- The integral of the derivative of a product of two maps.
Special case of `integral_deriv_mul_eq_sub_of_hasDeriv_right` where the functions have a
two-sided derivative in the interior of the interval. -/
theorem integral_deriv_mul_eq_sub_of_hasDerivAt {u v u' v' : ℝ → A}
    (hu : ContinuousOn u [[a, b]])
    (hv : ContinuousOn v [[a, b]])
    (huu' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt u (u' x) x)
    (hvv' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt v (v' x) x)
    (hu' : IntervalIntegrable u' volume a b)
    (hv' : IntervalIntegrable v' volume a b) :
    ∫ x in a..b, u' x * v x + u x * v' x = u b * v b - u a * v a

(huu' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt u (u' x) x)

(hvv' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt v (v' x) x)

(hu' : IntervalIntegrable u' MeasureTheory.volume a b)

(hv' : IntervalIntegrable v' MeasureTheory.volume a b)

∫ (x : ℝ) in a..b, u' x * v x + u x * v' x = u b * v b - u a * v a


theorem Balanced.union (hA : Balanced 𝕜 A) (hB : Balanced 𝕜 B) : Balanced 𝕜 (A ∪ B)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
{A B : Set E}
(hA : Balanced 𝕜 A)
(hB : Balanced 𝕜 B)


/-- Composition by continuous linear maps on the left preserves `C^n` functions in a domain
at a point. -/
theorem ContDiffAt.continuousLinearMap_comp (g : F →L[𝕜] G) (hf : ContDiffAt 𝕜 n f x) :
    ContDiffAt 𝕜 n (g ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{x : E}
{n : ℕ∞}
(g : F →L[𝕜] G)
(hf : ContDiffAt 𝕜 n f x)


theorem not_forall_not {p : α → Prop} : (¬∀ x, ¬p x) ↔ ∃ x, p x


/-- An `OrderedRing` is a ring with a partial order such that addition is monotone and
multiplication by a nonnegative number is monotone. -/
class OrderedRing (α : Type u) extends Ring α, OrderedAddCommGroup α where
  /-- `0 ≤ 1` in any ordered ring. -/
  protected zero_le_one : 0 ≤ (1 : α)
  /-- The product of non-negative elements is non-negative. -/
  protected mul_nonneg : ∀ a b : α, 0 ≤ a → 0 ≤ b → 0 ≤ a * b

{α : Type u}
[self : OrderedRing α]
(a b : α)


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


@[simp]
theorem cancel_iso_hom_right_assoc {W X X' Y Z : C} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X')
    (g' : X' ⟶ Y) (h : Y ≅ Z) : f ≫ g ≫ h.hom = f' ≫ g' ≫ h.hom ↔ f ≫ g = f' ≫ g'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X X' Y Z : C}
(f : W ⟶ X)
(g : X ⟶ Y)
(f' : W ⟶ X')
(g' : X' ⟶ Y)
(h : Y ≅ Z)

CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h.hom) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h.hom) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'


theorem _root_.isWeakAntichain_insert :
    IsWeakAntichain (insert a s) ↔ IsWeakAntichain s ∧ ∀ ⦃b⦄, b ∈ s → a ≠ b → ¬a ≺ b ∧ ¬b ≺ a

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

IsWeakAntichain (insert a s) ↔ IsWeakAntichain s ∧ ∀ ⦃b : (i : ι) → α i⦄, b ∈ s → a ≠ b → ¬StrongLT a b ∧ ¬StrongLT b a


/-- A version of `Equiv.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps) " A version of `Equiv.addRight (-a) b` that is defeq to `b - a`. "]
protected def divRight (a : G) : G ≃ G


/-- The identity in this lemma asserts that the "obvious" square
```
    R    → (R / (P ∩ R))
    ↓          ↓
R[x] / P → (R / (P ∩ R))[x] / (P / (P ∩ R))
```
commutes.  It is used, for instance, in the proof of `quotient_mk_comp_C_is_integral_of_jacobson`,
in the file `RingTheory.Jacobson`.
-/
theorem quotient_mk_maps_eq (P : Ideal R[X]) :
    ((Quotient.mk (map (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) P)).comp C).comp
        (Quotient.mk (P.comap (C : R →+* R[X]))) =
      (Ideal.quotientMap (map (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) P)
            (mapRingHom (Quotient.mk (P.comap (C : R →+* R[X])))) le_comap_map).comp
        ((Quotient.mk P).comp C)

{R : Type u_1}
[CommRing R]
(P : Ideal (Polynomial R))

((Ideal.Quotient.mk (Ideal.map (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) P)).comp
        Polynomial.C).comp
    (Ideal.Quotient.mk (Ideal.comap Polynomial.C P)) =
  (Ideal.quotientMap (Ideal.map (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) P)
        (Polynomial.mapRingHom (Ideal.Quotient.mk (Ideal.comap Polynomial.C P))) ⋯).comp
    ((Ideal.Quotient.mk P).comp Polynomial.C)


@[to_additive]
theorem const_mul_eq_map [Mul β] (f : α →ₛ β) (b : β) : const α b * f = f.map fun a => b * a

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Add β]
(f : MeasureTheory.SimpleFunc α β)
(b : β)

MeasureTheory.SimpleFunc.const α b + f = MeasureTheory.SimpleFunc.map (fun a => b + a) f


@[simp]
theorem coe_smul (a : M) (f : E →ₗ.[R] F) : ⇑(a • f) = a • ⇑f

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{M : Type u_5}
[Monoid M]
[DistribMulAction M F]
[SMulCommClass R M F]
(a : M)
(f : E →ₗ.[R] F)


/-- The bottom submodule is linearly equivalent to punit as an `R`-module. -/
@[simps]
def botEquivPUnit : (⊥ : Submodule R M) ≃ₗ[R] PUnit.{v+1}

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]

∀ (x : ↥⊥), Submodule.botEquivPUnit x = PUnit.unit


@[simp]
theorem coe_toContinuousAffineMap (f : V →L[R] W) : ⇑f.toContinuousAffineMap = f

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace V]
[AddCommGroup W]
[Module R W]
[TopologicalSpace W]
(f : V →L[R] W)


/-- A topological add group with a basis of `𝓝 0` satisfying the axioms of `ModuleFilterBasis`
is a topological module.

This lemma is mathematically useless because one could obtain such a result by applying
`ModuleFilterBasis.continuousSMul` and use the fact that group topologies are characterized
by their neighborhoods of 0 to obtain the `ContinuousSMul` on the pre-existing topology.

But it turns out it's just easier to get it as a byproduct of the proof, so this is just a free
quality-of-life improvement. -/
theorem _root_.ContinuousSMul.of_basis_zero {ι : Type*} [TopologicalRing R] [TopologicalSpace M]
    [TopologicalAddGroup M] {p : ι → Prop} {b : ι → Set M} (h : HasBasis (𝓝 0) p b)
    (hsmul : ∀ {i}, p i → ∃ V ∈ 𝓝 (0 : R), ∃ j, p j ∧ V • b j ⊆ b i)
    (hsmul_left : ∀ (x₀ : R) {i}, p i → ∃ j, p j ∧ MapsTo (x₀ • ·) (b j) (b i))
    (hsmul_right : ∀ (m₀ : M) {i}, p i → ∀ᶠ x in 𝓝 (0 : R), x • m₀ ∈ b i) : ContinuousSMul R M

(hsmul : ∀ {i : ι}, p i → ∃ V ∈ 𝓝 0, ∃ j, p j ∧ V • b j ⊆ b i)

(hsmul_left : ∀ (x₀ : R) {i : ι}, p i → ∃ j, p j ∧ Set.MapsTo (fun x => x₀ • x) (b j) (b i))

(hsmul_right : ∀ (m₀ : M) {i : ι}, p i → ∀ᶠ (x : R) in 𝓝 0, x • m₀ ∈ b i)


theorem neg_clog_inv_eq_log (b : ℕ) (r : R) : -clog b r⁻¹ = log b r

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)
(r : R)


theorem parallelogram_law_with_norm (x y : E) :
    ‖x + y‖ * ‖x + y‖ + ‖x - y‖ * ‖x - y‖ = 2 * (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)

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


/-- A product of copies of a type can be split as the binary product of one copy and the product
  of all the remaining copies. -/
@[simps!]
def funSplitAt {α : Type*} [DecidableEq α] (i : α) (β : Type*) :
    (α → β) ≃ β × ({ j // j ≠ i } → β)

{α : Type u_1}
[DecidableEq α]
(i : α)
(β : Type u_2)
(f : (j : α) → (fun a => β) j)

(Equiv.funSplitAt i β) f = (f i, fun j => f ↑j)


@[to_additive addEquivOfLocalizations_right_inv_apply]
theorem mulEquivOfLocalizations_right_inv_apply {k : LocalizationMap S P} {x} :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfLocalizations k)).toMap x = k.toMap x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : S.LocalizationMap P}
{x : M}

(f.ofAddEquivOfLocalizations (f.addEquivOfLocalizations k)).toMap x = k.toMap x


/-- A polynomial over an integral domain `R` is irreducible if it is monic and
  irreducible after mapping into an integral domain `S`.

A special case of this lemma is that a polynomial over `ℤ` is irreducible if
  it is monic and irreducible over `ℤ/pℤ` for some prime `p`.
-/
theorem Monic.irreducible_of_irreducible_map (f : R[X]) (h_mon : Monic f)
    (h_irr : Irreducible (Polynomial.map φ f)) : Irreducible f


theorem closure_eq_self_of_mem_closed {x : α} (h : x ∈ l.closed) : u (l x) = x

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


theorem tendsto_iSup_iSup {f : α → β} {x : ι → Filter α} {y : ι → Filter β}
    (h : ∀ i, Tendsto f (x i) (y i)) : Tendsto f (iSup x) (iSup y)

(h : ∀ (i : ι), Filter.Tendsto f (x i) (y i))


/-- The canonical comparison functor between the indexing category of the presentation and the
    comma category `CostructuredArrow yoneda A`. This functor is always final. -/
@[simps! obj_left obj_right_as obj_hom map_left]
def toCostructuredArrow : P.I ⥤ CostructuredArrow yoneda A

{A : CategoryTheory.Functor Cᵒᵖ (Type v)}

(P : CategoryTheory.Limits.IndObjectPresentation A)

(P.toCostructuredArrow.obj X).right.as = PUnit.unit


theorem RegularSpace.inf {X} {t₁ t₂ : TopologicalSpace X} (h₁ : @RegularSpace X t₁)
    (h₂ : @RegularSpace X t₂) : @RegularSpace X (t₁ ⊓ t₂)

{X : Type u_3}
{t₁ t₂ : TopologicalSpace X}
(h₁ : RegularSpace X)
(h₂ : RegularSpace X)


theorem gcd_comm (m n : Nat) : gcd m n = gcd n m


/-- If `f` is a monoid homomorphism then `f 1 = 1`. -/
@[to_additive "If `f` is an additive monoid homomorphism then `f 0 = 0`."]
protected theorem MonoidHom.map_one [MulOneClass M] [MulOneClass N] (f : M →* N) : f 1 = 1

{M : Type u_4}
{N : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)


/-- The set of closed elements for `l` is the range of `u ∘ l`. -/
theorem closed_eq_range_close : l.closed = Set.range (u ∘ l)

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


lemma filter_inj : s.filter p = t.filter p ↔ ∀ ⦃a⦄, p a → (a ∈ s ↔ a ∈ t)

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

Finset.filter p s = Finset.filter p t ↔ ∀ ⦃a : α⦄, p a → (a ∈ s ↔ a ∈ t)


theorem map (h : x ~ᵢ y) (hf : Continuous f) : f x ~ᵢ f y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x y : X}
{f : X → Y}
(h : x ~ᵢ y)
(hf : Continuous f)


@[to_additive]
theorem mem_sup_right {S T : Subsemigroup M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T

{M : Type u_2}
[Mul M]
{S T : Subsemigroup M}
{x : M}


/-- (Impl). The obvious natural transformation from (X × K -) to K. -/
@[simps]
def γ₂ {K : J ⥤ C} (X : C) : K ⋙ prod.functor.obj X ⟶ K

(CategoryTheory.ProdPreservesConnectedLimits.γ₂ X).app Y = CategoryTheory.Limits.prod.snd


/-- A Bézout ring is a ring whose finitely generated ideals are principal. -/
class IsBezout : Prop where
  /-- Any finitely generated ideal is principal. -/
  isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal

{R : Type u}
[Ring R]
[self : IsBezout R]
(I : Ideal R)


theorem image_sInter_subset (S : Set (Set α)) (f : α → β) : f '' ⋂₀ S ⊆ ⋂ s ∈ S, f '' s

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


/-- The composable arrows associated to a short complex. -/
@[simps!]
def ShortComplex.toComposableArrows (S : ShortComplex C) : ComposableArrows C 2

∀ (a : Fin (1 + 1 + 1)),
  S.toComposableArrows.obj a =
    CategoryTheory.ComposableArrows.Precomp.obj (CategoryTheory.ComposableArrows.mk₁ S.g) S.X₁ a


@[nontriviality]
lemma CompleteOrthogonalIdempotents.of_subsingleton [Subsingleton R] :
    CompleteOrthogonalIdempotents e

{R : Type u_1}
[Ring R]
{I : Type u_3}
{e : I → R}
[Fintype I]
[Subsingleton R]


lemma sup_eq_half_smul_add_add_abs_sub' (x y : β) : x ⊔ y = (2⁻¹ : α) • (x + y + |y - x|)

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


theorem coprime_prod_right_iff {x : ℕ} {t : Finset ι} {s : ι → ℕ} :
    Coprime x (∏ i ∈ t, s i) ↔ ∀ i ∈ t, Coprime x (s i)

{ι : Type u_1}
{x : ℕ}
{t : Finset ι}
{s : ι → ℕ}

x.Coprime (∏ i ∈ t, s i) ↔ ∀ i ∈ t, x.Coprime (s i)


/-- The diagram describing the universal property for quotients of monoids commutes. -/
@[to_additive "The diagram describing the universal property for quotients of `AddMonoid`s
commutes."]
theorem lift_mk' (H : c ≤ ker f) (x) : c.lift f H (c.mk' x) = f x

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{c : Con M}
{f : M →* P}
(H : c ≤ Con.ker f)
(x : M)


@[to_additive]
theorem continuousAt_zpow (x : G) (z : ℤ) : ContinuousAt (fun x => x ^ z) x

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(x : G)
(z : ℤ)


@[to_additive (attr := simp)]
lemma antilipschitzWith_inv_iff : AntilipschitzWith K f⁻¹ ↔ AntilipschitzWith K f

{α : Type u_5}
{E : Type u_6}
[SeminormedAddCommGroup E]
[PseudoEMetricSpace α]
{K : ℝ≥0}
{f : α → E}

AntilipschitzWith K (-f) ↔ AntilipschitzWith K f


lemma IsAntichain.interior_eq_empty [∀ x : α, (𝓝[<] x).NeBot] {s : Set α}
    (hs : IsAntichain (· ≤ ·) s) : interior s = ∅

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


theorem lpMeas_coe {m _ : MeasurableSpace α} {μ : Measure α} {f : lpMeas F 𝕜 m p μ} :
    (f : _ → _) = (f : Lp F p μ)

{α : Type u_1}
{F : Type u_3}
{𝕜 : Type u_5}
{p : ℝ≥0∞}
[RCLike 𝕜]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m : MeasurableSpace α}

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : ↥(MeasureTheory.lpMeas F 𝕜 m p μ)}, ↑↑↑f = ↑↑↑f


@[ext]
theorem ext : ∀ c₁ c₂ : ClosureOperator α, (∀ x, c₁ x = c₂ x) → c₁ = c₂

{α : Type u_1}
[PartialOrder α]
(c₁ c₂ : ClosureOperator α)


theorem _root_.Pi.exp_def {ι : Type*} {𝔸 : ι → Type*} [Finite ι] [∀ i, NormedRing (𝔸 i)]
    [∀ i, NormedAlgebra 𝕂 (𝔸 i)] [∀ i, CompleteSpace (𝔸 i)] (x : ∀ i, 𝔸 i) :
    exp 𝕂 x = fun i => exp 𝕂 (x i)

(𝕂 : Type u_1)
[RCLike 𝕂]
{ι : Type u_4}
{𝔸 : ι → Type u_5}
[Finite ι]
[(i : ι) → NormedRing (𝔸 i)]
[(i : ι) → NormedAlgebra 𝕂 (𝔸 i)]
[∀ (i : ι), CompleteSpace (𝔸 i)]
(x : (i : ι) → 𝔸 i)

NormedSpace.exp 𝕂 x = fun i => NormedSpace.exp 𝕂 (x i)


theorem OneOneReducible.disjoin_right {α β} [Primcodable α] [Primcodable β] {p : α → Prop}
    {q : β → Prop} : q ≤₁ p ⊕' q

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{p : α → Prop}
{q : β → Prop}


theorem smul_mem_pointwise_smul (m : M) (r : R) (S : Ideal R) : r ∈ S → m • r ∈ m • S

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[CommRing R]
[MulSemiringAction M R]
(m : M)
(r : R)
(S : Ideal R)


/-- The equivalence between the opposite of a product and the product of the opposites. -/
@[simps]
def prodOpEquiv : (C × D)ᵒᵖ ≌ Cᵒᵖ × Dᵒᵖ

(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]

∀ (x : Cᵒᵖ × Dᵒᵖ),
  (CategoryTheory.prodOpEquiv C).inverse.obj x =
    match x with
    | (X, Y) => Opposite.op (Opposite.unop X, Opposite.unop Y)


@[simp]
theorem pow_mulRight (a : A) (n : ℕ) : mulRight R a ^ n = mulRight R (a ^ n)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a : A)
(n : ℕ)

LinearMap.mulRight R a ^ n = LinearMap.mulRight R (a ^ n)


@[simp]
theorem frequently_iSup {p : α → Prop} {fs : β → Filter α} :
    (∃ᶠ x in ⨆ b, fs b, p x) ↔ ∃ b, ∃ᶠ x in fs b, p x

{α : Type u}
{β : Type v}
{p : α → Prop}
{fs : β → Filter α}

(∃ᶠ (x : α) in ⨆ b, fs b, p x) ↔ ∃ b, ∃ᶠ (x : α) in fs b, p x


theorem starClosure_le_iff {S₁ : NonUnitalSubalgebra R A} {S₂ : NonUnitalStarSubalgebra R A} :
    S₁.starClosure ≤ S₂ ↔ S₁ ≤ S₂.toNonUnitalSubalgebra

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{S₁ : NonUnitalSubalgebra R A}
{S₂ : NonUnitalStarSubalgebra R A}


theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z

{k : Type u}
[Field k]
[IsAlgClosed k]
(x : k)


lemma id_X (p q : ℤ) (hpq : p + 1 = q) :
    (fst φ).1.v p q hpq ≫ (inl φ).v q p (by omega) +
      (snd φ).v p p (add_zero p) ≫ (inr φ).f p = 𝟙 ((mappingCone φ).X p)

(↑(CochainComplex.mappingCone.fst φ)).v p q hpq ≫ (CochainComplex.mappingCone.inl φ).v q p ⋯ +
    (CochainComplex.mappingCone.snd φ).v p p ⋯ ≫ (CochainComplex.mappingCone.inr φ).f p =
  𝟙 ((CochainComplex.mappingCone φ).X p)


@[to_additive (attr := simp)]
lemma mk_eq_one {a : M} {ha} : (⟨a, ha⟩ : S) = 1 ↔ a = 1

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)
{a : M}
{ha : a ∈ S}


/-- If `F` is of exponential characteristic `q`, then `F(S) / F` is a purely inseparable extension
if and only if for any `x ∈ S`, `x ^ (q ^ n)` is contained in `F` for some `n : ℕ`. -/
theorem isPurelyInseparable_adjoin_iff_pow_mem (q : ℕ) [hF : ExpChar F q] {S : Set E} :
    IsPurelyInseparable F (adjoin F S) ↔ ∀ x ∈ S, ∃ n : ℕ, x ^ q ^ n ∈ (algebraMap F E).range

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[hF : ExpChar F q]
{S : Set E}

IsPurelyInseparable F ↥(IntermediateField.adjoin F S) ↔ ∀ x ∈ S, ∃ n, x ^ q ^ n ∈ (algebraMap F E).range


theorem convexBodyLT_neg_mem (x : E K) (hx : x ∈ (convexBodyLT K f)) :
    -x ∈ (convexBodyLT K f)

(f : NumberField.InfinitePlace K → NNReal)

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

(hx : x ∈ NumberField.mixedEmbedding.convexBodyLT K f)

-x ∈ NumberField.mixedEmbedding.convexBodyLT K f


theorem tensor_right_iff {X Y : C} (f g : X ⟶ Y) : f ⊗ 𝟙 (𝟙_ C) = g ⊗ 𝟙 (𝟙_ C) ↔ f = g

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

CategoryTheory.MonoidalCategory.tensorHom f (CategoryTheory.CategoryStruct.id (𝟙_ C)) =
    CategoryTheory.MonoidalCategory.tensorHom g (CategoryTheory.CategoryStruct.id (𝟙_ C)) ↔
  f = g


@[simp]
theorem card_type (r : α → α → Prop) [IsWellOrder α r] : card (type r) = #α

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]


@[simp] theorem updateFinset_empty {y} : updateFinset x ∅ y = x

{ι : Type u_1}
{π : ι → Sort u_2}
{x : (i : ι) → π i}
[DecidableEq ι]
{y : (i : { x // x ∈ ∅ }) → π ↑i}


theorem lTensor_trans_apply : (f ≪≫ₗ g).lTensor M x = g.lTensor M (f.lTensor M x)

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(g : P ≃ₗ[R] Q)
(f : N ≃ₗ[R] P)
(x : TensorProduct R M N)

(LinearEquiv.lTensor M (f ≪≫ₗ g)) x = (LinearEquiv.lTensor M g) ((LinearEquiv.lTensor M f) x)


@[to_additive (attr := measurability)]
theorem _root_.List.aestronglyMeasurable_prod
    (l : List (α → M)) (hl : ∀ f ∈ l, AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (fun x => (l.map fun f : α → M => f x).prod) μ

(hl : ∀ f ∈ l, MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => (List.map (fun f => f x) l).prod) μ


protected theorem mem_span (x : M) : x ∈ span R (range b)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(x : M)


theorem coeff_apply_lt (h : IsAdjoinRootMonic S f) (z : S) (i : ℕ) (hi : i < natDegree f) :
    h.coeff z i = h.basis.repr z ⟨i, hi⟩

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRootMonic S f)
(z : S)
(i : ℕ)
(hi : i < f.natDegree)


theorem diff_eq_foldl : ∀ l₁ l₂ : List α, l₁.diff l₂ = foldl List.erase l₁ l₂

{α : Type u_1}
[BEq α]
[LawfulBEq α]
(l₁ l₂ : List α)

l₁.diff l₂ = List.foldl List.erase l₁ l₂


protected theorem mul_add (φ₁ φ₂ φ₃ : MvPowerSeries σ R) : φ₁ * (φ₂ + φ₃) = φ₁ * φ₂ + φ₁ * φ₃

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

φ₁ * (φ₂ + φ₃) = φ₁ * φ₂ + φ₁ * φ₃


theorem uncurry_bicompr (f : α → β → γ) (g : γ → δ) : uncurry (g ∘₂ f) = g ∘ uncurry f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β → γ)
(g : γ → δ)

Function.uncurry (Function.bicompr g f) = g ∘ Function.uncurry f


@[simp, norm_cast]
theorem coe_sup (s t : L.DefinableSet A α) :
    ((s ⊔ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) ∪ (t : Set (α → M))

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{A : Set M}
{α : Type u₁}
(s t : L.DefinableSet A α)


theorem tendsto_snd : Tendsto Prod.snd (f ×ˢ g) g

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}


theorem csInf_le_iff (h : BddBelow s) (hs : s.Nonempty) : sInf s ≤ a ↔ ∀ b ∈ lowerBounds s, b ≤ a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(h : BddBelow s)
(hs : s.Nonempty)


lemma Measure.integrableOn_of_bounded (s_finite : μ s ≠ ∞) (f_mble : AEStronglyMeasurable f μ)
    {M : ℝ} (f_bdd : ∀ᵐ a ∂(μ.restrict s), ‖f a‖ ≤ M) :
    IntegrableOn f s μ

(f_mble : MeasureTheory.AEStronglyMeasurable f μ)

(f_bdd : ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ M)


theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet s)
    (h2s : (μ.prod ν) s ≠ ∞) : Integrable (fun x => (ν (Prod.mk x ⁻¹' s)).toReal) μ

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{s : Set (α × β)}
(hs : MeasurableSet s)
(h2s : (μ.prod ν) s ≠ ⊤)

MeasureTheory.Integrable (fun x => (ν (Prod.mk x ⁻¹' s)).toReal) μ


theorem multiplicity_eq_zero {a b : α} : multiplicity a b = 0 ↔ ¬a ∣ b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}


@[simp]
theorem smul (m : M) (x : FixedPoints.subfield M F) : m • x = x

(M : Type u)
[Monoid M]
(F : Type v)
[Field F]
[MulSemiringAction M F]
(m : M)
(x : ↥(FixedPoints.subfield M F))


theorem im_inv_neg_coe_pos (z : ℍ) : 0 < (-z : ℂ)⁻¹.im


theorem iIndepSet.indep_generateFrom_le_nat [IsProbabilityMeasure μ] {s : ℕ → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iIndepSet s μ) (n : ℕ) :
    Indep (generateFrom {s (n + 1)}) (generateFrom { t | ∃ k ≤ n, s k = t }) μ

{Ω : Type u_1}
{_mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsProbabilityMeasure μ]
{s : ℕ → Set Ω}
(hsm : ∀ (n : ℕ), MeasurableSet (s n))
(hs : ProbabilityTheory.iIndepSet s μ)
(n : ℕ)

ProbabilityTheory.Indep (MeasurableSpace.generateFrom {s (n + 1)}) (MeasurableSpace.generateFrom {t | ∃ k ≤ n, s k = t})
  μ


@[to_additive (attr := simp)] lemma forget_map {X Y : MonCat} (f : X ⟶ Y) :
    (forget MonCat).map f = f

(CategoryTheory.forget AddMonCat).map f = ⇑f


theorem chartAt_inclusion_symm_eventuallyEq {U V : Opens M} (hUV : U ≤ V) {x : U} :
    (chartAt H (Set.inclusion hUV x)).symm
    =ᶠ[𝓝 (chartAt H (Set.inclusion hUV x) (Set.inclusion hUV x))]
    Set.inclusion hUV ∘ (chartAt H x).symm

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{U V : TopologicalSpace.Opens M}
(hUV : U ≤ V)
{x : ↥U}

↑(chartAt H (Set.inclusion hUV x)).symm =ᶠ[𝓝 (↑(chartAt H (Set.inclusion hUV x)) (Set.inclusion hUV x))]
  Set.inclusion hUV ∘ ↑(chartAt H x).symm


theorem cmpEq.lt_congr_left (H : cmpEq cmp x y) : cmpLT cmp x z ↔ cmpLT cmp y z

∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y z : α},
  Batteries.RBNode.cmpEq cmp x y → (Batteries.RBNode.cmpLT cmp x z ↔ Batteries.RBNode.cmpLT cmp y z)


theorem Gamma_mem' (N : ℕ) (γ : SL(2, ℤ)) : γ ∈ Gamma N ↔ SLMOD(N) γ = 1

γ ∈ CongruenceSubgroup.Gamma N ↔ (Matrix.SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ = 1


/-- A pseudofunctor `F` between bicategories `B` and `C` consists of a function between objects
`F.obj`, a function between 1-morphisms `F.map`, and a function between 2-morphisms `F.map₂`.

Unlike functors between categories, `F.map` do not need to strictly commute with the compositions,
and do not need to strictly preserve the identity. Instead, there are specified 2-isomorphisms
`F.map (𝟙 a) ≅ 𝟙 (F.obj a)` and `F.map (f ≫ g) ≅ F.map f ≫ F.map g`.

`F.map₂` strictly commute with compositions and preserve the identity. They also preserve the
associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains
of 2-morphisms.
-/
structure Pseudofunctor (B : Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂)
    [Bicategory.{w₂, v₂} C] extends PrelaxFunctor B C where
  mapId (a : B) : map (𝟙 a) ≅ 𝟙 (obj a)
  mapComp {a b c : B} (f : a ⟶ b) (g : b ⟶ c) : map (f ≫ g) ≅ map f ≫ map g
  map₂_whisker_left :
    ∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h),
      map₂ (f ◁ η) = (mapComp f g).hom ≫ map f ◁ map₂ η ≫ (mapComp f h).inv := by
    aesop_cat
  map₂_whisker_right :
    ∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c),
      map₂ (η ▷ h) = (mapComp f h).hom ≫ map₂ η ▷ map h ≫ (mapComp g h).inv := by
    aesop_cat
  map₂_associator :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
      map₂ (α_ f g h).hom = (mapComp (f ≫ g) h).hom ≫ (mapComp f g).hom ▷ map h ≫
      (α_ (map f) (map g) (map h)).hom ≫ map f ◁ (mapComp g h).inv ≫
      (mapComp f (g ≫ h)).inv := by
    aesop_cat
  map₂_left_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (λ_ f).hom = (mapComp (𝟙 a) f).hom ≫ (mapId a).hom ▷ map f ≫ (λ_ (map f)).hom := by
    aesop_cat
  map₂_right_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (ρ_ f).hom = (mapComp f (𝟙 b)).hom ≫ map f ◁ (mapId b).hom ≫ (ρ_ (map f)).hom := by
    aesop_cat

(self : CategoryTheory.Pseudofunctor B C)

self.map₂ (CategoryTheory.Bicategory.whiskerRight η h) =
  CategoryTheory.CategoryStruct.comp (self.mapComp f h).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (self.map₂ η) (self.map h))
      (self.mapComp g h).inv)


/-- If `-1` is a square modulo `n` and `m` divides `n`, then `-1` is also a square modulo `m`. -/
theorem ZMod.isSquare_neg_one_of_dvd {m n : ℕ} (hd : m ∣ n) (hs : IsSquare (-1 : ZMod n)) :
    IsSquare (-1 : ZMod m)

{m n : ℕ}
(hd : m ∣ n)
(hs : IsSquare (-1))


/-- Precompose a partial equivalence with an equivalence.
We modify the source and target to have better definitional behavior. -/
@[simps!]
def transPartialEquiv (e : α ≃ β) (f' : PartialEquiv β γ) : PartialEquiv α γ

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : α ≃ β)
(f' : PartialEquiv β γ)

∀ (a : α), ↑(e.transPartialEquiv f') a = ↑f' (e a)


lemma isEquivalence_right_of_isEquivalence_left (h : L ⊣ R) [L.IsEquivalence] : R.IsEquivalence

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
[L.IsEquivalence]


@[simp]
theorem isTheta_sup : f' =Θ[l ⊔ l'] g' ↔ f' =Θ[l] g' ∧ f' =Θ[l'] g'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{f' : α → E'}
{g' : α → F'}
{l l' : Filter α}


theorem _root_.QuotientAddGroup.norm_lift_apply_le {S : AddSubgroup M} (f : NormedAddGroupHom M N)
    (hf : ∀ x ∈ S, f x = 0) (x : M ⧸ S) : ‖lift S f.toAddMonoidHom hf x‖ ≤ ‖f‖ * ‖x‖

{M : Type u_1}
{N : Type u_2}
[SeminormedAddCommGroup M]
[SeminormedAddCommGroup N]
{S : AddSubgroup M}
(f : NormedAddGroupHom M N)
(hf : ∀ x ∈ S, f x = 0)
(x : M ⧸ S)

‖(QuotientAddGroup.lift S f.toAddMonoidHom hf) x‖ ≤ ‖f‖ * ‖x‖


theorem map_nhds_eq {x} (hx : x ∈ e.source) : map e (𝓝 x) = 𝓝 (e x)

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


/-- To prove something for an arbitrary `Memℒp` function a.e. strongly measurable with respect
to a sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in the `Lᵖ` space strongly measurable w.r.t. `m` for which the property
  holds is closed.
* the property is closed under the almost-everywhere equal relation.
-/
@[elab_as_elim]
theorem Memℒp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : (α → F) → Prop)
    (h_ind : ∀ (c : F) ⦃s⦄, MeasurableSet[m] s → μ s < ∞ → P (s.indicator fun _ => c))
    (h_add : ∀ ⦃f g : α → F⦄, Disjoint (Function.support f) (Function.support g) →
      Memℒp f p μ → Memℒp g p μ → StronglyMeasurable[m] f → StronglyMeasurable[m] g →
        P f → P g → P (f + g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f})
    (h_ae : ∀ ⦃f g⦄, f =ᵐ[μ] g → Memℒp f p μ → P f → P g) :
    ∀ ⦃f : α → F⦄, Memℒp f p μ → AEStronglyMeasurable' m f μ → P f

(h_ind : ∀ (c : F) ⦃s : Set α⦄, MeasurableSet s → μ s < ⊤ → P (s.indicator fun x => c))

(h_add :
  ∀ ⦃f g : α → F⦄,
    Disjoint (Function.support f) (Function.support g) →
      MeasureTheory.Memℒp f p μ →
        MeasureTheory.Memℒp g p μ →
          MeasureTheory.StronglyMeasurable f → MeasureTheory.StronglyMeasurable g → P f → P g → P (f + g))

(h_ae : ∀ ⦃f g : α → F⦄, f =ᵐ[μ] g → MeasureTheory.Memℒp f p μ → P f → P g)

MeasureTheory.Memℒp f p μ → MeasureTheory.AEStronglyMeasurable' m f μ → P f


theorem tsub_tsub_tsub_cancel_left (h : b ≤ a) : a - c - (a - b) = b - c

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

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


theorem dNext_eq (f : ∀ i j, C.X i ⟶ D.X j) {i i' : ι} (w : c.Rel i i') :
    dNext i f = C.d i i' ≫ f i' i

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f : (i j : ι) → C.X i ⟶ D.X j)
{i i' : ι}
(w : c.Rel i i')


@[simp, norm_cast]
theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n

{α : Type u_3}
[DivisionRing α]
[CharZero α]
{m n : ℚ}


/-- Restrict a `PartialEquiv` to a pair of corresponding sets. -/
@[simps (config := .asFn)]
def restr (h : e.IsImage s t) : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}
(h : e.IsImage s t)


@[simp]
theorem midpoint_vsub_left (p₁ p₂ : P) : midpoint R p₁ p₂ -ᵥ p₁ = (⅟ 2 : R) • (p₂ -ᵥ p₁)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(p₁ p₂ : P)

midpoint R p₁ p₂ -ᵥ p₁ = ⅟2 • (p₂ -ᵥ p₁)


@[to_additive (attr := simp)]
theorem inv_inj : a⁻¹ = b⁻¹ ↔ a = b

{G : Type u_3}
[InvolutiveInv G]
{a b : G}


theorem addHaar_smul_of_nonneg {r : ℝ} (hr : 0 ≤ r) (s : Set E) :
    μ (r • s) = ENNReal.ofReal (r ^ finrank ℝ E) * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
{r : ℝ}
(hr : 0 ≤ r)
(s : Set E)

μ (r • s) = ENNReal.ofReal (r ^ FiniteDimensional.finrank ℝ E) * μ s


@[simp]
lemma smul_le_iff_le_one_left [SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) :
    a • b ≤ b ↔ a ≤ 1

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


theorem integral_mono_ae {f g : α → ℝ} (hf : Integrable f μ) (hg : Integrable g μ) (h : f ≤ᵐ[μ] g) :
    ∫ a, f a ∂μ ≤ ∫ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)
(h : f ≤ᵐ[μ] g)


@[to_additive]
theorem prehaar_sup_eq {K₀ : PositiveCompacts G} {U : Set G} {K₁ K₂ : Compacts G}
    (hU : (interior U).Nonempty) (h : Disjoint (K₁.1 * U⁻¹) (K₂.1 * U⁻¹)) :
    prehaar (K₀ : Set G) U (K₁ ⊔ K₂) = prehaar (K₀ : Set G) U K₁ + prehaar (K₀ : Set G) U K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

(h : Disjoint (K₁.carrier * U⁻¹) (K₂.carrier * U⁻¹))

MeasureTheory.Measure.haar.prehaar (↑K₀) U (K₁ ⊔ K₂) =
  MeasureTheory.Measure.haar.prehaar (↑K₀) U K₁ + MeasureTheory.Measure.haar.prehaar (↑K₀) U K₂


@[to_additive]
lemma mem_stabilizer_set_iff_subset_smul_set {s : Set α} (hs : s.Finite) :
    a ∈ stabilizer G s ↔ s ⊆ a • s

{G : Type u_1}
{α : Type u_3}
[AddGroup G]
[AddAction G α]
{a : G}
{s : Set α}
(hs : s.Finite)

a ∈ AddAction.stabilizer G s ↔ s ⊆ a +ᵥ s


@[to_additive (attr := simp)]
theorem div_apply [∀ i, Div <| f i] : (x / y) i = x i / y i

{I : Type u}
{f : I → Type v₁}
(x y : (i : I) → f i)
(i : I)
[(i : I) → Div (f i)]


@[to_additive (attr := simp)]
lemma ker_fst : ker (fst G G') = .prod ⊥ ⊤

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']


theorem eLpNorm'_add_le (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ)
    (hq1 : 1 ≤ q) : eLpNorm' (f + g) q μ ≤ eLpNorm' f q μ + eLpNorm' g q μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.eLpNorm' (f + g) q μ ≤ MeasureTheory.eLpNorm' f q μ + MeasureTheory.eLpNorm' g q μ


/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℤ`-linear morphisms `A →ₗ[ℤ] B`.
-/
@[simps]
def addMonoidHomLequivInt {A B : Type*} (R : Type*) [Semiring R] [AddCommGroup A] [AddCommGroup B]
    [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℤ] B

{A : Type u_17}
{B : Type u_18}
(R : Type u_19)
[Semiring R]
[AddCommGroup A]
[AddCommGroup B]
[Module R B]
(f : A →ₗ[ℤ] B)

(addMonoidHomLequivInt R).symm f = f.toAddMonoidHom


/-- Construct a left lift along `g : c ⟶ a` from a left lift along `𝟙 c ≫ g`. -/
@[simps!]
def ofIdComp (t : LeftLift f (𝟙 c ≫ g)) : LeftLift f g

(t : CategoryTheory.Bicategory.LeftLift f (CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id c) g))


theorem NonUnitalStarSubalgebra.toStarSubalgebra_toNonUnitalStarSubalgebra
    (S : NonUnitalStarSubalgebra R A) (h1 : (1 : A) ∈ S) :
    (S.toStarSubalgebra h1).toNonUnitalStarSubalgebra = S

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
(S : NonUnitalStarSubalgebra R A)
(h1 : 1 ∈ S)


theorem accessible {a : α} (f : α → β) (ac : Acc r (f a)) : Acc (InvImage r f) a

{α : Sort u}
{β : Sort v}
{r : β → β → Prop}
{a : α}
(f : α → β)
(ac : Acc r (f a))


theorem foldl.unop_ofFreeMonoid (f : β → α → β) (xs : FreeMonoid α) (a : β) :
    unop (Foldl.ofFreeMonoid f xs) a = List.foldl f a (FreeMonoid.toList xs)

{α β : Type u}
(f : β → α → β)
(xs : FreeMonoid α)
(a : β)

MulOpposite.unop ((Monoid.Foldl.ofFreeMonoid f) xs) a = List.foldl f a (FreeMonoid.toList xs)


@[to_additive]
lemma prod_fiberwise_eq_prod_filter (s : Finset ι) (t : Finset κ) (g : ι → κ) (f : ι → α) :
    ∏ j ∈ t, ∏ i ∈ s.filter fun i ↦ g i = j, f i = ∏ i ∈ s.filter fun i ↦ g i ∈ t, f i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[CommMonoid α]
[DecidableEq κ]
(s : Finset ι)
(t : Finset κ)
(g : ι → κ)
(f : ι → α)

∏ j ∈ t, ∏ i ∈ Finset.filter (fun i => g i = j) s, f i = ∏ i ∈ Finset.filter (fun i => g i ∈ t) s, f i


theorem trans_assoc {δ} (ab : α ≃ β) (bc : β ≃ γ) (cd : γ ≃ δ) :
    (ab.trans bc).trans cd = ab.trans (bc.trans cd)

{α : Sort u}
{β : Sort v}
{γ : Sort w}
{δ : Sort u_1}
(ab : α ≃ β)
(bc : β ≃ γ)
(cd : γ ≃ δ)


theorem CG.map {N : Type*} [L.Structure N] (f : M →[L] N) {s : L.Substructure M} (hs : s.CG) :
    (s.map f).CG

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]
{N : Type u_2}
[L.Structure N]
(f : M →[L] N)
{s : L.Substructure M}
(hs : s.CG)


theorem analyticAt_congr (h : f =ᶠ[𝓝 x] g) : AnalyticAt 𝕜 f x ↔ AnalyticAt 𝕜 g x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
(h : f =ᶠ[𝓝 x] g)


/-- If `E` is first countable, then every locally bounded linear map `E →ₛₗ[σ] F` is continuous. -/
theorem LinearMap.continuous_of_locally_bounded [UniformAddGroup F] (f : E →ₛₗ[σ] F)
    (hf : ∀ s, IsVonNBounded 𝕜 s → IsVonNBounded 𝕜' (f '' s)) : Continuous f

(hf : ∀ (s : Set E), Bornology.IsVonNBounded 𝕜 s → Bornology.IsVonNBounded 𝕜' (⇑f '' s))


lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :
    P1 x₁ x₂ x₃ y₁ y₂ y₃

(h₁ : Surreal.Multiplication.P2 x₁ x₃ y₁)

(h₃ : Surreal.Multiplication.P2 x₁ x₃ y₃)

(h3 : Surreal.Multiplication.P3 x₁ x₂ y₂ y₃)

Surreal.Multiplication.P1 x₁ x₂ x₃ y₁ y₂ y₃


@[simp]
theorem sub_zero (a : Ordinal) : a - 0 = a


theorem coe_linearMap_injective : Function.Injective ((↑) : (A →ₗc[R] B) → A →ₗ[R] B)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]


theorem vecMul_injective_iff_isUnit {A : Matrix m m K} :
    Function.Injective A.vecMul ↔ IsUnit A

{m : Type u}
[DecidableEq m]
{K : Type u_3}
[Field K]
[Fintype m]
{A : Matrix m m K}

(Function.Injective fun v => Matrix.vecMul v A) ↔ IsUnit A


@[simp] theorem mk_coe (U : Opens α) : mk (↑U) U.isOpen = U

{α : Type u_2}
[TopologicalSpace α]
(U : TopologicalSpace.Opens α)


@[fun_prop]
theorem DifferentiableAt.clm_comp (hc : DifferentiableAt 𝕜 c x) (hd : DifferentiableAt 𝕜 d x) :
    DifferentiableAt 𝕜 (fun y => (c y).comp (d y)) x

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


theorem not_iff_comm : (¬a ↔ b) ↔ (¬b ↔ a)


@[simp]
theorem finsuppTensorFinsuppRid_symm_single_smul (i : ι × κ) (m : M) (r : R) :
    (finsuppTensorFinsuppRid R M ι κ).symm (Finsupp.single i (r • m)) =
      Finsupp.single i.1 m ⊗ₜ Finsupp.single i.2 r

(R : Type u_1)
(M : Type u_3)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(i : ι × κ)
(m : M)
(r : R)

(finsuppTensorFinsuppRid R M ι κ).symm (Finsupp.single i (r • m)) = Finsupp.single i.1 m ⊗ₜ[R] Finsupp.single i.2 r


/-- A completely distributive lattice is a complete lattice whose `⨅` and `⨆`
distribute over each other. -/
class CompletelyDistribLattice (α : Type u) extends CompleteLattice α, BiheytingAlgebra α where
  protected iInf_iSup_eq {ι : Type u} {κ : ι → Type u} (f : ∀ a, κ a → α) :
    (⨅ a, ⨆ b, f a b) = ⨆ g : ∀ a, κ a, ⨅ a, f a (g a)

{α : Type u}
[self : CompletelyDistribLattice α]
{ι : Type u}
{κ : ι → Type u}
(f : (a : ι) → κ a → α)


/-- The good products span `LocallyConstant C ℤ` if and only all the products do. -/
theorem GoodProducts.span_iff_products : ⊤ ≤ span ℤ (Set.range (eval C)) ↔
    ⊤ ≤ span ℤ (Set.range (Products.eval C))

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))

⊤ ≤ Submodule.span ℤ (Set.range (Profinite.NobelingProof.GoodProducts.eval C)) ↔
  ⊤ ≤ Submodule.span ℤ (Set.range (Profinite.NobelingProof.Products.eval C))


/-- homotopy is closed under composition (on the left) -/
@[simps]
def compLeft {f g : D ⟶ E} (h : Homotopy f g) (e : C ⟶ D) : Homotopy (e ≫ f) (e ≫ g)

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D E : HomologicalComplex V c}
{f g : D ⟶ E}
(h : Homotopy f g)
(e : C ⟶ D)
(i j : ι)

(h.compLeft e).hom i j = e.f i ≫ h.hom i j


@[to_additive]
theorem prod_option_index [AddCommMonoid M] [CommMonoid N] (f : Option α →₀ M)
    (b : Option α → M → N) (h_zero : ∀ o, b o 0 = 1)
    (h_add : ∀ o m₁ m₂, b o (m₁ + m₂) = b o m₁ * b o m₂) :
    f.prod b = b none (f none) * f.some.prod fun a => b (Option.some a)

(h_add : ∀ (o : Option α) (m₁ m₂ : M), b o (m₁ + m₂) = b o m₁ + b o m₂)

f.sum b = b none (f none) + f.some.sum fun a => b (some a)


/-- The map that sends `c` to a translation by `c`
as a monoid homomorphism from `Multiplicative G` to `G →+c[a, a] G`. -/
@[simps! (config := .asFn)]
def addLeftHom : Multiplicative G →* (G →+c[a, a] G)

{G : Type u_1}
[AddMonoid G]
{a : G}
(c : Multiplicative G)


@[simp]
theorem opNNNorm_prod (f : E →L[𝕜] F) (g : E →L[𝕜] G) : ‖f.prod g‖₊ = ‖(f, g)‖₊

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
[NormedSpace 𝕜 G]
(f : E →L[𝕜] F)
(g : E →L[𝕜] G)


theorem Set.WellFoundedOn.sigma_lex_of_wellFoundedOn_fiber (hι : s.WellFoundedOn (rι on f))
    (hπ : ∀ i, (s ∩ f ⁻¹' {i}).WellFoundedOn (rπ i on g i)) :
    s.WellFoundedOn (Sigma.Lex rι rπ on fun c => ⟨f c, g (f c) c⟩)

(hπ : ∀ (i : ι), (s ∩ f ⁻¹' {i}).WellFoundedOn (rπ i on g i))


@[simp, norm_cast]
theorem coe_centralizer (s : Set A) : (centralizer R s : Set A) = s.centralizer

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(s : Set A)

↑(NonUnitalSubalgebra.centralizer R s) = s.centralizer


/-- A helper lemma used to prove that the (scalar or usual) product of a function that tends to one
and a bounded function tends to one. This lemma is formulated for any binary operation
`op : E → F → G` with an estimate `‖op x y‖ ≤ ‖x‖ * ‖y‖` instead of multiplication so that it
can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`. -/
@[to_additive "A helper lemma used to prove that the (scalar or usual) product of a function that
tends to zero and a bounded function tends to zero. This lemma is formulated for any binary
operation `op : E → F → G` with an estimate `‖op x y‖ ≤ ‖x‖ * ‖y‖` instead of multiplication so
that it can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`."]
theorem Filter.Tendsto.op_one_isBoundedUnder_le {f : α → E} {g : α → F} {l : Filter α}
    (hf : Tendsto f l (𝓝 1)) (hg : IsBoundedUnder (· ≤ ·) l (Norm.norm ∘ g)) (op : E → F → G)
    (h_op : ∀ x y, ‖op x y‖ ≤ ‖x‖ * ‖y‖) : Tendsto (fun x => op (f x) (g x)) l (𝓝 1)

(hg : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g))

(h_op : ∀ (x : E) (y : F), ‖op x y‖ ≤ ‖x‖ * ‖y‖)

Filter.Tendsto (fun x => op (f x) (g x)) l (𝓝 0)


protected theorem mul_assoc (a b c : Fin n) : a * b * c = a * (b * c)


@[simp]
theorem zero_trim (hle : m ≤ n) : (0 : VectorMeasure α M).trim hle = 0

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
[AddCommMonoid M]
[TopologicalSpace M]
{n : MeasurableSpace α}
(hle : m ≤ n)

MeasureTheory.VectorMeasure.trim 0 hle = 0


theorem volume_pi_le_prod_diam (s : Set (ι → ℝ)) :
    volume s ≤ ∏ i : ι, EMetric.diam (Function.eval i '' s)

{ι : Type u_1}
[Fintype ι]
(s : Set (ι → ℝ))

MeasureTheory.volume s ≤ ∏ i : ι, EMetric.diam (Function.eval i '' s)


theorem prodToProdTop_map {x₀ x₁ : πₓ A} {y₀ y₁ : πₓ B} (p₀ : x₀ ⟶ x₁) (p₁ : y₀ ⟶ y₁) :
    (prodToProdTop A B).map (X := (x₀, y₀)) (Y := (x₁, y₁)) (p₀, p₁) =
      Path.Homotopic.prod p₀ p₁

(A B : TopCat)
{x₀ x₁ : ↑(π.obj A)}
{y₀ y₁ : ↑(π.obj B)}
(p₀ : x₀ ⟶ x₁)
(p₁ : y₀ ⟶ y₁)

(FundamentalGroupoidFunctor.prodToProdTop A B).map (p₀, p₁) = Path.Homotopic.prod p₀ p₁


protected theorem of_zsmul : a ≡ b [PMOD z • p] → a ≡ b [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b : α}
{z : ℤ}


@[simp]
theorem coe_toNonUnitalSubring (S : NonUnitalSubalgebra R A) :
    (↑S.toNonUnitalSubring : Set A) = S

{R : Type u}
{A : Type v}
[CommRing R]
[NonUnitalNonAssocRing A]
[Module R A]
(S : NonUnitalSubalgebra R A)


theorem disjoint_iff_ne {s t : Multiset α} : Disjoint s t ↔ ∀ a ∈ s, ∀ b ∈ t, a ≠ b


@[simp] theorem countP_false {l : List α} : (l.countP fun _ => false) = 0


@[simp]
theorem infLELeft_apply_mk (U V : Opens X) (x) (m) :
    (infLELeft U V) ⟨x, m⟩ = ⟨x, (@inf_le_left _ _ U V : _ ≤ _) m⟩

{X : TopCat}
(U V : TopologicalSpace.Opens ↑X)
(x : ↑X)
(m : x ∈ U ⊓ V)


@[simp]
theorem mem_nonunits_iff [Monoid α] : a ∈ nonunits α ↔ ¬IsUnit a


theorem hasTerminalChangeUniverse [h : HasLimitsOfShape (Discrete.{w} PEmpty) C] :
    HasLimitsOfShape (Discrete.{w'} PEmpty) C

[h : CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Discrete PEmpty.{w + 1}) C]

CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Discrete PEmpty.{w' + 1}) C


protected theorem map_smul : X (r • f) = r • X f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[Monoid G]
[SmoothMul I G]
{r : 𝕜}
(X : LeftInvariantDerivation I G)
(f : C^⊤⟮I, G; 𝓘(𝕜, 𝕜), 𝕜⟯)


theorem isPell_star : ∀ {b : ℤ√d}, IsPell b ↔ IsPell (star b)


protected theorem Filter.Tendsto.abs {a : G} (h : Tendsto f l (𝓝 a)) :
    Tendsto (fun x => |f x|) l (𝓝 |a|)

{α : Type u_1}
{G : Type u_2}
[TopologicalSpace G]
[LinearOrderedAddCommGroup G]
[OrderTopology G]
{l : Filter α}
{f : α → G}
{a : G}
(h : Filter.Tendsto f l (𝓝 a))

Filter.Tendsto (fun x => |f x|) l (𝓝 |a|)


private theorem inner_le_Lp_mul_Lp_of_norm_le_one (f g : ι → ℝ≥0) {p q : ℝ}
    (hpq : p.IsConjExponent q) (hf : ∑ i ∈ s, f i ^ p ≤ 1) (hg : ∑ i ∈ s, g i ^ q ≤ 1) :
    ∑ i ∈ s, f i * g i ≤ 1

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ≥0)
{p q : ℝ}
(hpq : p.IsConjExponent q)
(hf : ∑ i ∈ s, f i ^ p ≤ 1)
(hg : ∑ i ∈ s, g i ^ q ≤ 1)


@[to_additive sum_lt_sum_of_subset]
theorem prod_lt_prod_of_subset' (h : s ⊆ t) {i : ι} (ht : i ∈ t) (hs : i ∉ s) (hlt : 1 < f i)
    (hle : ∀ j ∈ t, j ∉ s → 1 ≤ f j) : ∏ j ∈ s, f j < ∏ j ∈ t, f j

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelCommMonoid M]
{f : ι → M}
{s t : Finset ι}
(h : s ⊆ t)
{i : ι}
(ht : i ∈ t)
(hs : i ∉ s)
(hlt : 1 < f i)
(hle : ∀ j ∈ t, j ∉ s → 1 ≤ f j)


protected lemma ext_iff {n : ℕ} {α β : Ext X Y n} : α = β ↔ α.hom = β.hom

{α β : CategoryTheory.Abelian.Ext X Y n}


@[simp]
theorem nnnorm_abs (r : ℝ) : ‖|r|‖₊ = ‖r‖₊

‖|r|‖₊ = ‖r‖₊


theorem monomial_zero {s : σ →₀ ℕ} : monomial s (0 : R) = 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{s : σ →₀ ℕ}


theorem Model.union {T' : L.Theory} (h : M ⊨ T) (h' : M ⊨ T') : M ⊨ T ∪ T'

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{T T' : L.Theory}
(h : M ⊨ T)
(h' : M ⊨ T')


theorem QuadraticMap.toMatrix'_smul (a : R) (Q : QuadraticMap R (n → R) R) :
    (a • Q).toMatrix' = a • Q.toMatrix'

{R : Type u_3}
{n : Type w}
[Fintype n]
[DecidableEq n]
[CommRing R]
[Invertible 2]
(a : R)
(Q : QuadraticMap R (n → R) R)