lemma pushoutCocone_inl_eq_inr_iff_of_isColimit {c : PushoutCocone f g} (hc : IsColimit c)
    (h₁ : Function.Injective f) (x₁ : X₁) (x₂ : X₂) :
    c.inl x₁ = c.inr x₂ ↔ ∃ (s : S), f s = x₁ ∧ g s = x₂

{c : CategoryTheory.Limits.PushoutCocone f g}

(hc : CategoryTheory.Limits.IsColimit c)

c.inl x₁ = c.inr x₂ ↔ ∃ s, f s = x₁ ∧ g s = x₂


/-- If `K / E / F` is a field extension tower such that `E / F` is purely inseparable,
if `{ u_i }` is a family of separable elements of `K` which is `F`-linearly independent,
then it is also `E`-linearly independent. -/
theorem LinearIndependent.map_of_isPurelyInseparable_of_isSeparable [IsPurelyInseparable F E]
    {ι : Type*} {v : ι → K} (hsep : ∀ i : ι, IsSeparable F (v i))
    (h : LinearIndependent F v) : LinearIndependent E v

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
{K : Type w}
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[IsPurelyInseparable F E]
{ι : Type u_1}
{v : ι → K}
(hsep : ∀ (i : ι), IsSeparable F (v i))
(h : LinearIndependent F v)


theorem ae_prod_mem_iff_ae_ae_mem {s : Set (α × β)} (hs : MeasurableSet s) :
    (∀ᵐ z ∂μ.prod ν, z ∈ s) ↔ ∀ᵐ x ∂μ, ∀ᵐ y ∂ν, (x, y) ∈ s

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

(∀ᵐ (z : α × β) ∂μ.prod ν, z ∈ s) ↔ ∀ᵐ (x : α) ∂μ, ∀ᵐ (y : β) ∂ν, (x, y) ∈ s


theorem subset_preimage : quasispectrum S a ⊆ f ⁻¹' quasispectrum R a

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Field S]
[NonUnitalRing A]
[Module R A]
[Module S A]
[IsScalarTower S A A]
[SMulCommClass S A A]
[Algebra R S]
{a : A}
{f : S → R}
[IsScalarTower R S A]
(h : QuasispectrumRestricts a f)


theorem length_eq_one_iff {w : W} : ℓ w = 1 ↔ ∃ i : B, w = s i

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
{w : W}


@[simp]
theorem dimH_preimage (e : E ≃L[𝕜] F) (s : Set F) : dimH (e ⁻¹' s) = dimH s

{𝕜 : Type u_4}
{E : Type u_5}
{F : Type u_6}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(e : E ≃L[𝕜] F)
(s : Set F)


@[ext 900]
lemma ext_dual {A B : E →WOT[𝕜] F} (h : ∀ x (y : F⋆), y (A x) = y (B x)) : A = B

(h : ∀ (x : E) (y : NormedSpace.Dual 𝕜 F), y (A x) = y (B x))


/-- We can turn any limit cone over a discrete collection of objects into a bicone. -/
@[simps]
def ofLimitCone {f : J → C} {t : Cone (Discrete.functor f)} (ht : IsLimit t) : Bicone f

{t : CategoryTheory.Limits.Cone (CategoryTheory.Discrete.functor f)}

(CategoryTheory.Limits.Bicone.ofLimitCone ht).π j = t.π.app { as := j }


@[simp]
theorem coe_constVAdd (v : V) : ⇑(constVAdd 𝕜 P v : P ≃ᵃⁱ[𝕜] P) = (v +ᵥ ·)

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(v : V)

⇑(AffineIsometryEquiv.constVAdd 𝕜 P v) = fun x => v +ᵥ x


lemma Antitone.image_Iic_subset (h : Antitone f) : f '' Iic b ⊆ Ici (f b)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : Antitone f)


theorem locallyConnectedSpace_iff_connected_basis :
    LocallyConnectedSpace α ↔
      ∀ x, (𝓝 x).HasBasis (fun s : Set α => s ∈ 𝓝 x ∧ IsPreconnected s) id

LocallyConnectedSpace α ↔ ∀ (x : α), (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ IsPreconnected s) id


@[simp] lemma mk_one : mk (1 : NumDenSameDeg 𝒜 x) = 1

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


theorem mem_achart_source (x : M) : x ∈ (achart H x).1.source

(H : Type u)
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
(x : M)


theorem isClosed_range_inr : IsClosed (range (inr : Y → X ⊕ Y))

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem omegaLimit_union : ω f ϕ (s₁ ∪ s₂) = ω f ϕ s₁ ∪ ω f ϕ s₂

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s₁ s₂ : Set α)

omegaLimit f ϕ (s₁ ∪ s₂) = omegaLimit f ϕ s₁ ∪ omegaLimit f ϕ s₂


@[to_additive (attr := simp)]
lemma div_mul_cancel_right (a b : G) : a / (b * a) = b⁻¹


theorem image_coe_Ico : (some : α → WithTop α) '' Ico a b = Ico (a : WithTop α) b

WithTop.some '' Set.Ico a b = Set.Ico ↑a ↑b


/-- See `isUnit_iff_exists` for a similar lemma with one existential. -/
@[to_additive "See `isAddUnit_iff_exists` for a similar lemma with one existential."]
theorem isUnit_iff_exists_and_exists [Monoid M] {a : M} :
    IsUnit a ↔ (∃ b, a * b = 1) ∧ (∃ c, c * a = 1)

IsUnit a ↔ (∃ b, a * b = 1) ∧ ∃ c, c * a = 1


lemma IsClopen.himp (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ⇨ t)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsClopen s)
(ht : IsClopen t)


@[simp]
theorem id_toLinearMap : (id.toLinearMap : E →ₗ[R] E) = LinearMap.id

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


theorem Antiperiodic.int_mul_eq_of_eq_zero [Ring α] [SubtractionMonoid β] (h : Antiperiodic f c)
    (hi : f 0 = 0) : ∀ n : ℤ, f (n * c) = 0

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[Ring α]
[SubtractionMonoid β]
(h : Function.Antiperiodic f c)
(hi : f 0 = 0)
(n : ℤ)


lemma bijective_iff_dense_range_and_antilipschitz (f : E →SL[σ] F) :
    Bijective f ↔ (LinearMap.range f).topologicalClosure = ⊤ ∧ ∃ c, AntilipschitzWith c f

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(f : E →SL[σ] F)

Function.Bijective ⇑f ↔ (LinearMap.range f).topologicalClosure = ⊤ ∧ ∃ c, AntilipschitzWith c ⇑f


theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ)

{R : Type u_2}
[LinearOrderedSemiring R]
[FloorSemiring R]
[TopologicalSpace R]
[OrderTopology R]
[MeasurableSpace R]
[OpensMeasurableSpace R]


/-- A T₁ space, also known as a Fréchet space, is a topological space
  where every singleton set is closed. Equivalently, for every pair
  `x ≠ y`, there is an open set containing `x` and not `y`. -/
class T1Space (X : Type u) [TopologicalSpace X] : Prop where
  /-- A singleton in a T₁ space is a closed set. -/
  t1 : ∀ x, IsClosed ({x} : Set X)

{X : Type u}
[TopologicalSpace X]
[self : T1Space X]
(x : X)


/-- An object is simple if monomorphisms into it are (exclusively) either isomorphisms or zero. -/
class Simple (X : C) : Prop where
  mono_isIso_iff_nonzero : ∀ {Y : C} (f : Y ⟶ X) [Mono f], IsIso f ↔ f ≠ 0


@[simp] lemma cons_zero_zero : vecCons (0 : α) (0 : Fin n → α) = 0


@[simp]
theorem zero_apply (z : ℍ) : (0 : CuspForm Γ k) z = 0


@[simp]
theorem id_comp (f : BotHom α β) : (BotHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[Bot α]
[Bot β]
(f : BotHom α β)


@[to_additive]
lemma IsMulFreimanIso.mono {hmn : m ≤ n} (hf : IsMulFreimanIso n A B f) :
    IsMulFreimanIso m A B f

{α : Type u_2}
{β : Type u_3}
[AddCancelCommMonoid α]
[AddCancelCommMonoid β]
{A : Set α}
{B : Set β}
{f : α → β}
{m n : ℕ}
{hmn : m ≤ n}
(hf : IsAddFreimanIso n A B f)


@[simp]
theorem map_ssubset_map {s t : Finset α} : s.map f ⊂ t.map f ↔ s ⊂ t

{α : Type u_1}
{β : Type u_2}
{f : α ↪ β}
{s t : Finset α}


theorem ofPowerSeries_X_pow {R} [Semiring R] (n : ℕ) :
    ofPowerSeries Γ R (PowerSeries.X ^ n) = single (n : Γ) 1

{Γ : Type u_1}
[StrictOrderedSemiring Γ]
{R : Type u_3}
[Semiring R]
(n : ℕ)

(HahnSeries.ofPowerSeries Γ R) (PowerSeries.X ^ n) = (HahnSeries.single ↑n) 1


theorem isExtrOn_dual_iff : IsExtrOn (toDual ∘ f) s a ↔ IsExtrOn f s a

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}

IsExtrOn (⇑OrderDual.toDual ∘ f) s a ↔ IsExtrOn f s a


lemma flip_totalFlipIso : K.flip.totalFlipIso c = (K.totalFlipIso c).symm

[TotalComplexShapeSymmetrySymmetry c₁ c₂ c]


/-- A subset of a convex independent set of points is convex independent as well. -/
protected theorem ConvexIndependent.mono {s t : Set E} (hc : ConvexIndependent 𝕜 ((↑) : t → E))
    (hs : s ⊆ t) : ConvexIndependent 𝕜 ((↑) : s → E)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(hc : ConvexIndependent 𝕜 Subtype.val)
(hs : s ⊆ t)


@[simp]
theorem map_comap_map : ((I.map f).comap f).map f = I.map f

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(I : Ideal R)

Ideal.map f (Ideal.comap f (Ideal.map f I)) = Ideal.map f I


theorem Nondegenerate.toMatrix {B : BilinForm R₃ M₃} (h : B.Nondegenerate) (b : Basis ι R₃ M₃) :
    (BilinForm.toMatrix b B).Nondegenerate

{R₃ : Type u_7}
{M₃ : Type u_8}
[CommRing R₃]
[AddCommGroup M₃]
[Module R₃ M₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{B : LinearMap.BilinForm R₃ M₃}
(h : B.Nondegenerate)
(b : Basis ι R₃ M₃)


@[simp]
theorem equivAdjoinSimple_gen (pb : PowerBasis K L) :
    pb.equivAdjoinSimple (AdjoinSimple.gen K pb.gen) = pb.gen

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(pb : PowerBasis K L)

pb.equivAdjoinSimple (IntermediateField.AdjoinSimple.gen K pb.gen) = pb.gen


theorem swap_apply_def (a b x : α) : swap a b x = if x = a then b else if x = b then a else x

{α : Sort u_1}
[DecidableEq α]
(a b x : α)

(Equiv.swap a b) x = if x = a then b else if x = b then a else x


lemma shift_unop_opShiftFunctorEquivalence_counitIso_hom_app (X : Cᵒᵖ) (n : ℤ) :
    ((opShiftFunctorEquivalence C n).counitIso.hom.app X).unop⟦n⟧' =
      ((opShiftFunctorEquivalence C n).unitIso.inv.app ((Opposite.op (X.unop⟦n⟧)))).unop

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]
(X : Cᵒᵖ)
(n : ℤ)

(CategoryTheory.shiftFunctor C n).map
    ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).counitIso.hom.app X).unop =
  ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).unitIso.inv.app
      (Opposite.op ((CategoryTheory.shiftFunctor C n).obj (Opposite.unop X)))).unop


@[simp]
theorem range_arcsin : range arcsin = Icc (-(π / 2)) (π / 2)

Set.range Real.arcsin = Set.Icc (-(π / 2)) (π / 2)


@[to_additive]
theorem continuous_prod [Monoid α] [ContinuousMul α] : Continuous (prod : List α → α)

{α : Type u_1}
[TopologicalSpace α]
[Monoid α]
[ContinuousMul α]


@[simp] theorem natAbs_ofNat (n : Nat) : natAbs ↑n = n


theorem HasMFDerivWithinAt.mdifferentiableWithinAt (h : HasMFDerivWithinAt I I' f s x f') :
    MDifferentiableWithinAt I I' f s x

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


theorem prod.ext_iff {I I' : Ideal R} {J J' : Ideal S} :
    prod I J = prod I' J' ↔ I = I' ∧ J = J'

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{I I' : Ideal R}
{J J' : Ideal S}


/-- An iso `α ≃* β` can equivalently be viewed as an iso `αᵐᵒᵖ ≃* βᵐᵒᵖ`. -/
@[to_additive (attr := simps)
  "An iso `α ≃+ β` can equivalently be viewed as an iso `αᵃᵒᵖ ≃+ βᵃᵒᵖ`."]
def MulEquiv.op {α β} [Mul α] [Mul β] : α ≃* β ≃ (αᵐᵒᵖ ≃* βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[Add α]
[Add β]
(f : α ≃+ β)

∀ (a : βᵃᵒᵖ), (AddEquiv.op f).symm a = (AddOpposite.op ∘ ⇑f.symm ∘ AddOpposite.unop) a


/-- The colimit cocone over `coyoneda.obj X`, with cocone point `PUnit`.
-/
@[simps]
def colimitCocone (X : Cᵒᵖ) : Cocone (coyoneda.obj X)

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

(CategoryTheory.Coyoneda.colimitCocone X).pt = PUnit.{v + 1}


theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range f \ f '' s = f '' sᶜ

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


theorem of_mul_self (h : Irrational (x * x)) : Irrational x


@[to_additive]
protected theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{f g : S.LocalizationMap N}

f = g ↔ ∀ (x : M), f.toMap x = g.toMap x


theorem ContDiff.continuous (h : ContDiff 𝕜 n f) : Continuous f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
(h : ContDiff 𝕜 n f)


@[simp]
theorem toEquiv_mk (f : M →ₗ⁅R,L⁆ N) (g : N → M) (h₁ h₂) :
    toEquiv (mk f g h₁ h₂ : M ≃ₗ⁅R,L⁆ N) = Equiv.mk f g h₁ h₂

(h₁ : Function.LeftInverse g (↑f).toFun)

(h₂ : Function.RightInverse g (↑f).toFun)

{ toLieModuleHom := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toEquiv =
  { toFun := ⇑f, invFun := g, left_inv := h₁, right_inv := h₂ }


@[simp]
theorem coe_sub_linearMap (D1 D2 : Derivation R A M) : ↑(D1 - D2) = (D1 - D2 : A →ₗ[R] M)

{R : Type u_1}
[CommRing R]
{A : Type u_2}
[CommRing A]
[Algebra R A]
{M : Type u_3}
[AddCommGroup M]
[Module A M]
[Module R M]
(D1 D2 : Derivation R A M)


@[to_additive]
theorem mul_inv_self (a : G) : a * a⁻¹ = 1


/-- The set of finite subsets of a countable set is countable. -/
theorem countable_setOf_finite_subset {s : Set α} (hs : s.Countable) :
    { t | Set.Finite t ∧ t ⊆ s }.Countable

{α : Type u}
{s : Set α}
(hs : s.Countable)


/-- `LinearMap.prodMap` as an `AlgHom` -/
@[simps!]
def prodMapAlgHom : Module.End R M × Module.End R M₂ →ₐ[R] Module.End R (M × M₂)

(R : Type u)
(M : Type v)
(M₂ : Type w)
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(f : (M →ₗ[R] M) × (M₂ →ₗ[R] M₂))
(i : M × M₂)

((LinearMap.prodMapAlgHom R M M₂) f) i = (f.1 i.1, f.2 i.2)


theorem subset_compl_iff_disjoint_right : s ⊆ tᶜ ↔ Disjoint s t


theorem borel_comap {f : α → β} {t : TopologicalSpace β} :
    @borel α (t.induced f) = (@borel β t).comap f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{t : TopologicalSpace β}

borel α = MeasurableSpace.comap f (borel β)


theorem ext_iff {f g : Lp E p μ} : f = g ↔ f =ᵐ[μ] g

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f g : ↥(MeasureTheory.Lp E p μ)}


/-- The functor from augmented objects to arrows. -/
@[simps]
def toArrow : Augmented C ⥤ Arrow C

(X : CategoryTheory.SimplicialObject.Augmented C)

(CategoryTheory.SimplicialObject.Augmented.toArrow.obj X).right = CategoryTheory.SimplicialObject.Augmented.point.obj X


theorem extend_map [CompleteSpace γ] [T0Space γ] {f : β → γ} {g : α → β}
    (hf : UniformContinuous f) (hg : UniformContinuous g) :
    pkg'.extend f ∘ map g = pkg.extend (f ∘ g)

{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)
{β : Type u_2}
[UniformSpace β]
(pkg' : AbstractCompletion β)
{γ : Type u_3}
[UniformSpace γ]
[CompleteSpace γ]
[T0Space γ]
{f : β → γ}
{g : α → β}
(hf : UniformContinuous f)
(hg : UniformContinuous g)

pkg'.extend f ∘ pkg.map pkg' g = pkg.extend (f ∘ g)


@[simp] theorem add_one_ne_zero (n : Nat) : n + 1 ≠ 0


theorem Periodic.nsmul [AddMonoid α] (h : Periodic f c) (n : ℕ) : Periodic f (n • c)

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


/-- `CSLiftVal a b` means that `b = lift a`. This is used by `ring` to construct an expression `b`
from the input expression `a`, and then run the usual ring algorithm on `b`. -/
class CSLiftVal {α} {β : outParam (Type u)} [CSLift α β] (a : α) (b : outParam β) : Prop where
  /-- The output value `b` is equal to the lift of `a`. This can be supplied by the default
  instance which sets `b := lift a`, but `ring` will treat this as an atom so it is more useful
  when there are other instances which distribute addition or multiplication. -/
  eq : b = CSLift.lift a

[self : Mathlib.Tactic.Ring.CSLiftVal a b]


@[simp] theorem getElem?_modifyNth_eq (f : α → α) (n) (l : List α) :
    (modifyNth f n l)[n]? = f <$> l[n]?

{α : Type u_1}
(f : α → α)
(n : Nat)
(l : List α)

(List.modifyNth f n l)[n]? = f <$> l[n]?


@[simp]
theorem spanCompIso_inv_app_left : (spanCompIso F f g).inv.app WalkingSpan.left = 𝟙 _

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

(CategoryTheory.Limits.spanCompIso F f g).inv.app CategoryTheory.Limits.WalkingSpan.left =
  𝟙 ((CategoryTheory.Limits.span (F.map f) (F.map g)).obj CategoryTheory.Limits.WalkingSpan.left)


/-- The equivalence induced by `a ↦ (a / n, a % n)` for nonzero `n`.
This is like `finProdFinEquiv.symm` but with `m` infinite.
See `Nat.div_mod_unique` for a similar propositional statement. -/
@[simps]
def Nat.divModEquiv (n : ℕ) [NeZero n] : ℕ ≃ ℕ × Fin n


theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
    Disjoint (f ⁻¹' s) (f ⁻¹' t)

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


theorem iterate_derivative_sub {k : ℕ} {f g : R[X]} :
    derivative^[k] (f - g) = derivative^[k] f - derivative^[k] g

{R : Type u}
[Ring R]
{k : ℕ}
{f g : R[X]}

(⇑Polynomial.derivative)^[k] (f - g) = (⇑Polynomial.derivative)^[k] f - (⇑Polynomial.derivative)^[k] g


lemma derivWithin_le_slope (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f S y) :
    derivWithin f S y ≤ slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y : ℝ}
(hfc : ConcaveOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hfd : DifferentiableWithinAt ℝ f S y)


theorem boundary_hnot_le (a : α) : ∂ (￢a) ≤ ∂ a

{α : Type u_1}
[CoheytingAlgebra α]
(a : α)

∂ (￢a) ≤ ∂ a


/-- Colex is an extension of the base order. -/
lemma singleton_le_singleton : (toColex {a} : Colex α) ≤ toColex {b} ↔ a ≤ b

{α : Type u_1}
[PartialOrder α]
{a b : α}

{ ofColex := {a} } ≤ { ofColex := {b} } ↔ a ≤ b


@[integral_simps]
theorem integral_neg (f : α → G) : ∫ a, -f a ∂μ = -∫ a, f a ∂μ

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


theorem beth_ne_zero (o : Ordinal) : beth o ≠ 0


theorem Nullhomotopic.comp_right {f : C(X, Y)} (hf : f.Nullhomotopic) (g : C(Y, Z)) :
    (g.comp f).Nullhomotopic

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : C(X, Y)}
(hf : f.Nullhomotopic)
(g : C(Y, Z))


@[simp]
theorem lift_ofNat (n : ℕ) [n.AtLeastTwo] :
    lift.{u} (no_index (OfNat.ofNat n : Cardinal.{v})) = OfNat.ofNat n

Cardinal.lift.{u, v} (OfNat.ofNat n) = OfNat.ofNat n


theorem KaehlerDifferential.exact_kerCotangentToTensor_mapBaseChange
    (h : Function.Surjective (algebraMap A B)) :
    Function.Exact (kerCotangentToTensor R A B) (KaehlerDifferential.mapBaseChange R A B)

(h : Function.Surjective ⇑(algebraMap A B))

Function.Exact ⇑(KaehlerDifferential.kerCotangentToTensor R A B) ⇑(KaehlerDifferential.mapBaseChange R A B)


/-- An isomorphism `X ⟶ Y` is an open cover of `Y`. -/
@[simps J obj map]
def openCoverOfIsIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso f] : OpenCover.{v} Y

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[CategoryTheory.IsIso f]

∀ (x : PUnit.{v + 1}), (AlgebraicGeometry.Scheme.openCoverOfIsIso f).obj x = X


@[simp]
theorem cycleOf_apply_apply_self (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
    cycleOf f x (f x) = f (f x)

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(x : α)


/-- Non-dependent version of `Function.update_comp_eq_of_injective'` -/
theorem update_comp_eq_of_injective {β : Sort*} (g : α' → β) {f : α → α'}
    (hf : Function.Injective f) (i : α) (a : β) :
    Function.update g (f i) a ∘ f = Function.update (g ∘ f) i a

{α : Sort u}
{α' : Sort w}
[DecidableEq α]
[DecidableEq α']
{β : Sort u_1}
(g : α' → β)
{f : α → α'}
(hf : Function.Injective f)
(i : α)
(a : β)


/-- For any fintype `α` of cardinality `n`, `card (Sym α k) = multichoose (card α) k`. -/
theorem card_sym_eq_multichoose (α : Type*) (k : ℕ) [Fintype α] [Fintype (Sym α k)] :
    card (Sym α k) = multichoose (card α) k

(α : Type u_3)
(k : ℕ)
[Fintype α]
[Fintype (Sym α k)]

Fintype.card (Sym α k) = (Fintype.card α).multichoose k


theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
    (b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b

(f : ⦃i : ι⦄ → α i → β i → Finset (γ i))


theorem sInf_of_not_bddBelow {s : Set ℝ} (hs : ¬BddBelow s) : sInf s = 0


@[simp high, norm_cast]
theorem of_to_nat : ∀ n : Num, ((n : ℕ) : Num) = n


/-- The functor picking out the `i`-th object of a complex. -/
@[simps]
def eval (i : ι) : HomologicalComplex V c ⥤ V

∀ {X Y : HomologicalComplex V c} (f : X ⟶ Y), (HomologicalComplex.eval V c i).map f = f.f i


@[simp]
theorem deriv_circleMap (c : ℂ) (R : ℝ) (θ : ℝ) : deriv (circleMap c R) θ = circleMap 0 R θ * I

deriv (circleMap c R) θ = circleMap 0 R θ * Complex.I


theorem add_sub_add_ge (a c : Nat) {b d : Nat} (h : b ≥ d) : a + b - (c + d) = a + (b - d) - c


@[simp]
theorem toSignedMeasure_add (μ ν : Measure α) [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    (μ + ν).toSignedMeasure = μ.toSignedMeasure + ν.toSignedMeasure

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


theorem zeroLocus_eq_top_iff (s : Set R) :
    zeroLocus s = ⊤ ↔ s ⊆ nilradical R

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

PrimeSpectrum.zeroLocus s = ⊤ ↔ s ⊆ ↑(nilradical R)


lemma embedding_toUniformOnFun : Embedding (toUniformOnFun : ContinuousMultilinearMap 𝕜 E F → _)

{𝕜 : Type u_1}
{ι : Type u_2}
{E : ι → Type u_3}
{F : Type u_4}
[NormedField 𝕜]
[(i : ι) → TopologicalSpace (E i)]
[(i : ι) → AddCommGroup (E i)]
[(i : ι) → Module 𝕜 (E i)]
[AddCommGroup F]
[Module 𝕜 F]
[UniformSpace F]
[UniformAddGroup F]


protected theorem pos_iff_ne_zero {o : Ordinal} : 0 < o ↔ o ≠ 0


theorem generateFrom_iInter_of_generateFrom_eq_self (f : ι → Set (Set α))
    (hf : ∀ i, { s | IsOpen[generateFrom (f i)] s } = f i) :
    generateFrom (⋂ i, f i) = ⨆ i, generateFrom (f i)

{α : Type u}
{ι : Sort v}
(f : ι → Set (Set α))
(hf : ∀ (i : ι), {s | IsOpen s} = f i)

TopologicalSpace.generateFrom (⋂ i, f i) = ⨆ i, TopologicalSpace.generateFrom (f i)


/-- `BotHomClass F α β` states that `F` is a type of `⊥`-preserving morphisms.

You should extend this class when you extend `BotHom`. -/
class BotHomClass (F α β : Type*) [Bot α] [Bot β] [FunLike F α β] : Prop where
  /-- A `BotHomClass` morphism preserves the bottom element. -/
  map_bot (f : F) : f ⊥ = ⊥

{F : Type u_6}
{α : Type u_7}
{β : Type u_8}
[Bot α]
[Bot β]
[FunLike F α β]
[self : BotHomClass F α β]
(f : F)


theorem diffContOnCl_const {c : F} : DiffContOnCl 𝕜 (fun _ : E => c) s

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


/-- Closure of a subgroup `K` equals `K`. -/
@[to_additive (attr := simp) "Additive closure of an additive subgroup `K` equals `K`"]
theorem closure_eq : closure (K : Set G) = K

{G : Type u_1}
[Group G]
(K : Subgroup G)


theorem measure_iUnion_le [Countable ι] (s : ι → Set α) : μ (⋃ i, s i) ≤ ∑' i, μ (s i)

{α : Type u_1}
{ι : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
[Countable ι]
(s : ι → Set α)


theorem hermite_eq_deriv_gaussian (n : ℕ) (x : ℝ) : aeval x (hermite n) =
    (-1 : ℝ) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x / Real.exp (-(x ^ 2 / 2))

(Polynomial.aeval x) (Polynomial.hermite n) =
  (-1) ^ n * deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x / Real.exp (-(x ^ 2 / 2))


@[reassoc]
lemma δ_naturality (i j : ι) (hij : c.Rel i j) :
    hS₁.δ i j hij ≫ HomologicalComplex.homologyMap φ.τ₁ _ =
      HomologicalComplex.homologyMap φ.τ₃ _ ≫ hS₂.δ i j hij

{S₁ S₂ : CategoryTheory.ShortComplex (HomologicalComplex C c)}

hS₁.δ i j hij ≫ HomologicalComplex.homologyMap φ.τ₁ j = HomologicalComplex.homologyMap φ.τ₃ i ≫ hS₂.δ i j hij


lemma mkDerivation_apply (a : A) (f : R[X]) :
    mkDerivation R a f = derivative f • a

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (Polynomial R) A]
[IsScalarTower R (Polynomial R) A]
(a : A)
(f : Polynomial R)

((Polynomial.mkDerivation R) a) f = Polynomial.derivative f • a


theorem contDiffAt_finsum {s : Set E} (f : SmoothPartitionOfUnity ι 𝓘(ℝ, E) E s) {x₀ : E}
    {g : ι → E → F} (hφ : ∀ i, x₀ ∈ tsupport (f i) → ContDiffAt ℝ n (g i) x₀) :
    ContDiffAt ℝ n (fun x ↦ ∑ᶠ i, f i x • g i x) x₀

(hφ : ∀ (i : ι), x₀ ∈ tsupport ⇑(f i) → ContDiffAt ℝ n (g i) x₀)

ContDiffAt ℝ n (fun x => ∑ᶠ (i : ι), (f i) x • g i x) x₀


@[simp]
theorem refl_symm {a : X} : (Path.refl a).symm = Path.refl a

{X : Type u_1}
[TopologicalSpace X]
{a : X}


@[reassoc (attr := simp)]
lemma colimit_ι_zero_cokernel_desc {C : Type*} [Category C]
    [HasZeroMorphisms C] {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : f ≫ g = 0) [HasCokernel f] :
    colimit.ι (parallelPair f 0) WalkingParallelPair.zero ≫ cokernel.desc f g h = 0

CategoryTheory.Limits.colimit.ι (CategoryTheory.Limits.parallelPair f 0)
      CategoryTheory.Limits.WalkingParallelPair.zero ≫
    CategoryTheory.Limits.cokernel.desc f g h =
  0


theorem quotientInfEquivSupQuotient_symm_apply_left (p p' : Submodule R M) (x : ↥(p ⊔ p'))
    (hx : (x : M) ∈ p) :
    (quotientInfEquivSupQuotient p p').symm (Submodule.Quotient.mk x) =
      Submodule.Quotient.mk ⟨x, hx⟩

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p p' : Submodule R M)
(x : ↥(p ⊔ p'))
(hx : ↑x ∈ p)

(LinearMap.quotientInfEquivSupQuotient p p').symm (Submodule.Quotient.mk x) = Submodule.Quotient.mk ⟨↑x, hx⟩


protected theorem bijOn : BijOn e e.source e.target

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


theorem map_inv_intCast_smul [AddCommGroup M] [AddCommGroup M₂] {F : Type*} [FunLike F M M₂]
    [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [DivisionRing R] [DivisionRing S] [Module R M]
    [Module S M₂] (z : ℤ) (x : M) : f ((z⁻¹ : R) • x) = (z⁻¹ : S) • f x

{M : Type u_3}
{M₂ : Type u_4}
[AddCommGroup M]
[AddCommGroup M₂]
{F : Type u_5}
[FunLike F M M₂]
[AddMonoidHomClass F M M₂]
(f : F)
(R : Type u_6)
(S : Type u_7)
[DivisionRing R]
[DivisionRing S]
[Module R M]
[Module S M₂]
(z : ℤ)
(x : M)


theorem supportsStmt_move {S : Finset Λ'₁} {d : Dir} {q : Stmt'₁} :
    SupportsStmt S (moveₙ d q) = SupportsStmt S q

{q : Turing.TM1.Stmt Bool Turing.TM1to1.Λ' σ}

Turing.TM1.SupportsStmt S (Turing.TM1to1.move d q) = Turing.TM1.SupportsStmt S q


/-- If x ∈ α is in 2 equivalence classes, the equivalence classes are equal. -/
theorem eq_of_mem_classes {r : Setoid α} {x b} (hc : b ∈ r.classes) (hb : x ∈ b) {b'}
    (hc' : b' ∈ r.classes) (hb' : x ∈ b') : b = b'

{α : Type u_1}
{r : Setoid α}
{x : α}
{b : Set α}
(hc : b ∈ r.classes)
(hb : x ∈ b)
{b' : Set α}
(hc' : b' ∈ r.classes)
(hb' : x ∈ b')


/-- Given a homology map data `ψ : HomologyMapData φ h₁ h₂` such that
`h₁.left`, `h₁.right`, `h₂.left` and `h₂.right` are all preserved by a functor `F`, this is
the induced homology map data for the morphism `F.mapShortComplex.map φ`. -/
@[simps]
def HomologyMapData.map {φ : S₁ ⟶ S₂} {h₁ : S₁.HomologyData} {h₂ : S₂.HomologyData}
    (ψ : HomologyMapData φ h₁ h₂) (F : C ⥤ D) [F.PreservesZeroMorphisms]
    [h₁.left.IsPreservedBy F] [h₁.right.IsPreservedBy F]
    [h₂.left.IsPreservedBy F] [h₂.right.IsPreservedBy F] :
    HomologyMapData (F.mapShortComplex.map φ) (h₁.map F) (h₂.map F)

(ψ : CategoryTheory.ShortComplex.HomologyMapData φ h₁ h₂)


/-- The **Marica-Schönheim Inequality**. -/
lemma Finset.card_le_card_diffs (s : Finset α) : s.card ≤ (s \\ s).card

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


theorem isUnit_exp_of_mem_ball [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : IsUnit (exp 𝕂 x)

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)


@[fun_prop]
theorem measurable_comp (L : E →L[𝕜] F) {φ : α → E} (φ_meas : Measurable φ) :
    Measurable fun a : α => L (φ a)

{α : Type u_1}
[MeasurableSpace α]
{𝕜 : Type u_2}
[NormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MeasurableSpace E]
[OpensMeasurableSpace E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[MeasurableSpace F]
[BorelSpace F]
(L : E →L[𝕜] F)
{φ : α → E}
(φ_meas : Measurable φ)


/-- The Ackermann function is not primitive recursive. -/
theorem not_primrec₂_ack : ¬Primrec₂ ack


theorem sub_eq_fold_erase (s t : Multiset α) : s - t = foldl erase erase_comm s t

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

s - t = Multiset.foldl Multiset.erase ⋯ s t


@[simp]
theorem coe_bot : (⊥ : OuterMeasure α) = 0


@[to_additive (attr := simp)]
theorem mem_sInf {S : Set (Subgroup G)} {x : G} : x ∈ sInf S ↔ ∀ p ∈ S, x ∈ p

{G : Type u_1}
[Group G]
{S : Set (Subgroup G)}
{x : G}


/-- If all `f i`, `i ∈ s`, are nonnegative and each `f i` is less than or equal to `g i`, then the
product of `f i` is less than or equal to the product of `g i`. See also `Finset.prod_le_prod'` for
the case of an ordered commutative multiplicative monoid. -/
lemma prod_le_prod (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ g i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i

{ι : Type u_1}
{R : Type u_2}
[CommMonoidWithZero R]
[PartialOrder R]
[ZeroLEOneClass R]
[PosMulMono R]
{f g : ι → R}
{s : Finset ι}
(h0 : ∀ i ∈ s, 0 ≤ f i)
(h1 : ∀ i ∈ s, f i ≤ g i)


theorem IsPreconnected.intermediate_value_Iic {s : Set X} (hs : IsPreconnected s) {a : X}
    {l : Filter X} (ha : a ∈ s) [NeBot l] (hl : l ≤ 𝓟 s) {f : X → α} (hf : ContinuousOn f s)
    (ht : Tendsto f l atBot) : Iic (f a) ⊆ f '' s

{X : Type u}
{α : Type v}
[TopologicalSpace X]
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{s : Set X}
(hs : IsPreconnected s)
{a : X}
{l : Filter X}
(ha : a ∈ s)
[l.NeBot]
(hl : l ≤ 𝓟 s)
{f : X → α}
(hf : ContinuousOn f s)
(ht : Filter.Tendsto f l Filter.atBot)


/-- The angle between a nonzero vector and its negation. -/
@[simp]
theorem angle_self_neg_of_nonzero {x : V} (hx : x ≠ 0) : angle x (-x) = π

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x : V}
(hx : x ≠ 0)


/-- A specialization of `abs_sub_lt_of_nonneg_of_lt` for working with the signed subtraction
  of natural numbers. -/
theorem natAbs_coe_sub_coe_lt_of_lt {a b n : ℕ} (a_lt_n : a < n) (b_lt_n : b < n) :
    natAbs (a - b : ℤ) < n


@[to_additive]
theorem IsCompl.prod_mul_prod {s t : Finset α} (h : IsCompl s t) (f : α → β) :
    (∏ i ∈ s, f i) * ∏ i ∈ t, f i = ∏ i, f i

{α : Type u_3}
{β : Type u_4}
[Fintype α]
[AddCommMonoid β]
{s t : Finset α}
(h : IsCompl s t)
(f : α → β)

∑ i ∈ s, f i + ∑ i ∈ t, f i = ∑ i : α, f i


/-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(self : AkraBazziRecurrence T g a b r)
(i : α)


/-- Given a submonoid at each of the stalks, we may define a submonoid presheaf consisting of
sections whose restriction onto each stalk falls in the given submonoid. -/
@[simps]
noncomputable def submonoidPresheafOfStalk (S : ∀ x : X, Submonoid (F.stalk x)) :
    F.SubmonoidPresheaf

{X : TopCat}
(F : TopCat.Presheaf CommRingCat X)
(S : (x : ↑X) → Submonoid ↑(F.stalk x))
(U : (TopologicalSpace.Opens ↑X)ᵒᵖ)

(F.submonoidPresheafOfStalk S).obj U = ⨅ x, Submonoid.comap (F.germ x) (S ↑x)


@[to_additive gcd_nsmul_eq_zero]
theorem pow_gcd_eq_one {M : Type*} [Monoid M] (x : M) {m n : ℕ} (hm : x ^ m = 1) (hn : x ^ n = 1) :
    x ^ m.gcd n = 1

{M : Type u_1}
[AddMonoid M]
(x : M)
{m n : ℕ}
(hm : m • x = 0)
(hn : n • x = 0)


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

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

[self : CategoryTheory.MonoidalCategory C]

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft (𝟙_ C) f)
    (CategoryTheory.MonoidalCategory.leftUnitor Y).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.leftUnitor X).hom f


protected theorem toFinset_symmDiff [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∆ t).Finite) : h.toFinset = hs.toFinset ∆ ht.toFinset

{α : Type u}
{s t : Set α}
[DecidableEq α]
(hs : s.Finite)
(ht : t.Finite)
(h : (symmDiff s t).Finite)

h.toFinset = symmDiff hs.toFinset ht.toFinset


@[reassoc]
lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g

{P : TopCat → Prop}
{X Y B : CompHausLike P}
(f : X ⟶ B)
(g : Y ⟶ B)
[CompHausLike.HasExplicitPullback f g]

CategoryTheory.CategoryStruct.comp (CompHausLike.pullback.fst f g) f =
  CategoryTheory.CategoryStruct.comp (CompHausLike.pullback.snd f g) g


@[ext]
lemma hom_ext {R R' : Φ.RightResolution X₂} {φ₁ φ₂ : R ⟶ R'} (h : φ₁.f = φ₂.f) :
    φ₁ = φ₂

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


theorem mul_add_swap_eq_polar_of_forall_mul_self_eq {A : Type*} [Ring A] [Algebra R A]
    (f : M →ₗ[R] A) (hf : ∀ x, f x * f x = algebraMap _ _ (Q x)) (a b : M) :
    f a * f b + f b * f a = algebraMap R _ (QuadraticMap.polar Q a b)

(hf : ∀ (x : M), f x * f x = (algebraMap R A) (Q x))

f a * f b + f b * f a = (algebraMap R A) (QuadraticMap.polar (⇑Q) a b)


@[simp]
theorem cancel_left (hf : Injective f) : f.comp g = f.comp g' ↔ g = g'

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M₁ : Type u_10}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
{f : M₂ →ₛₗ[σ₂₃] M₃}
{g g' : M₁ →ₛₗ[σ₁₂] M₂}
(hf : Function.Injective ⇑f)


theorem augment_hom_zero (X : SimplicialObject C) (X₀ : C) (f : X _[0] ⟶ X₀) (w) :
    (X.augment X₀ f w).hom.app (op [0]) = f

(f : X.obj (Opposite.op (SimplexCategory.mk 0)) ⟶ X₀)

(w : ∀ (i : SimplexCategory) (g₁ g₂ : SimplexCategory.mk 0 ⟶ i), X.map g₁.op ≫ f = X.map g₂.op ≫ f)

(X.augment X₀ f w).hom.app (Opposite.op (SimplexCategory.mk 0)) = f


theorem mul_le_mul_right₀ (hc : c ≠ 0) : a * c ≤ b * c ↔ a ≤ b

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(hc : c ≠ 0)


theorem toPretrivialization_injective :
    Function.Injective fun e : Trivialization F proj => e.toPretrivialization

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]

Function.Injective fun e => e.toPretrivialization


@[simp] lemma unop_hom_rightUnitor (X : Cᵒᵖ) : (ρ_ X).hom.unop = (ρ_ (unop X)).inv

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

(CategoryTheory.MonoidalCategory.rightUnitor X).hom.unop =
  (CategoryTheory.MonoidalCategory.rightUnitor (Opposite.unop X)).inv


theorem integrableOn_Iic_iff_integrableOn_Iio' (hb : μ {b} ≠ ∞) :
    IntegrableOn f (Iic b) μ ↔ IntegrableOn f (Iio b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{b : α}
(hb : μ {b} ≠ ⊤)

MeasureTheory.IntegrableOn f (Set.Iic b) μ ↔ MeasureTheory.IntegrableOn f (Set.Iio b) μ


@[ext]
theorem biproduct.hom_ext' {f : J → C} [HasBiproduct f] {Z : C} (g h : ⨁ f ⟶ Z)
    (w : ∀ j, biproduct.ι f j ≫ g = biproduct.ι f j ≫ h) : g = h

(w : ∀ (j : J), CategoryTheory.Limits.biproduct.ι f j ≫ g = CategoryTheory.Limits.biproduct.ι f j ≫ h)


@[to_additive]
theorem mem_comm (nH : H.Normal) {a b : G} (h : a * b ∈ H) : b * a ∈ H

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}
(nH : H.Normal)
{a b : G}
(h : a + b ∈ H)


/-- The type of reduced words. A reduced word cannot contain a letter `1`, and no two adjacent
letters can come from the same summand. -/
@[ext]
structure Word where
  /-- A `Word` is a `List (Σ i, M i)`, such that `1` is not in the list, and no
  two adjacent letters are from the same summand -/
  toList : List (Σi, M i)
  /-- A reduced word does not contain `1` -/
  ne_one : ∀ l ∈ toList, Sigma.snd l ≠ 1
  /-- Adjacent letters are not from the same summand. -/
  chain_ne : toList.Chain' fun l l' => Sigma.fst l ≠ Sigma.fst l'

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


@[to_additive]
theorem units_of_val {a x y : Mˣ} (h : SemiconjBy (a : M) x y) : SemiconjBy a x y

{M : Type u_1}
[Monoid M]
{a x y : Mˣ}
(h : SemiconjBy ↑a ↑x ↑y)


/-- A non-commutative variant of `List.prod_reverse` -/
@[to_additive "A non-commutative variant of `List.sum_reverse`"]
theorem prod_reverse_noncomm : ∀ L : List G, L.reverse.prod = (L.map fun x => x⁻¹).prod⁻¹

L.reverse.prod = (List.map (fun x => x⁻¹) L).prod⁻¹


theorem IsPrimitive.isUnit_iff_isUnit_map {p : R[X]} (hp : p.IsPrimitive) :
    IsUnit p ↔ IsUnit (p.map (algebraMap R K))

{R : Type u_1}
[CommRing R]
{K : Type u_2}
[Field K]
[Algebra R K]
[IsFractionRing R K]
{p : R[X]}
(hp : p.IsPrimitive)

IsUnit p ↔ IsUnit (Polynomial.map (algebraMap R K) p)


theorem forall₂_of_length_eq_of_get :
    ∀ {x : List α} {y : List β},
      x.length = y.length → (∀ i h₁ h₂, R (x.get ⟨i, h₁⟩) (y.get ⟨i, h₂⟩)) → Forall₂ R x y

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{x : List α}
{y : List β}

x.length = y.length →
  (∀ (i : ℕ) (h₁ : i < x.length) (h₂ : i < y.length), R (x.get ⟨i, h₁⟩) (y.get ⟨i, h₂⟩)) → List.Forall₂ R x y


@[to_additive (attr := simp)]
theorem prod_map (s : Finset α) (e : α ↪ γ) (f : γ → β) :
    ∏ x ∈ s.map e, f x = ∏ x ∈ s, f (e x)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid β]
(s : Finset α)
(e : α ↪ γ)
(f : γ → β)

∏ x ∈ Finset.map e s, f x = ∏ x ∈ s, f (e x)


theorem isNoetherianRing_fin_0 [IsNoetherianRing R] :
    IsNoetherianRing (MvPolynomial (Fin 0) R)

{R : Type u}
[CommRing R]
[IsNoetherianRing R]


theorem image_subtype_val_Icc_subset (a b : {x // p x}) :
    Subtype.val '' Icc a b ⊆ Icc a.val b.val

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val '' Set.Icc a b ⊆ Set.Icc ↑a ↑b


/-- Given a measure `μ`, signed measures `s` and `t`, and a function `f` such that `t` is
mutually singular with respect to `μ` and `s = t + μ.withDensityᵥ f`, we have
`t = singularPart s μ`, i.e. `t` is the singular part of the Lebesgue decomposition between
`s` and `μ`. -/
theorem eq_singularPart (t : SignedMeasure α) (f : α → ℝ) (htμ : t ⟂ᵥ μ.toENNRealVectorMeasure)
    (hadd : s = t + μ.withDensityᵥ f) : t = s.singularPart μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : MeasureTheory.SignedMeasure α}
(t : MeasureTheory.SignedMeasure α)
(f : α → ℝ)
(htμ : t ⟂ᵥ μ.toENNRealVectorMeasure)
(hadd : s = t + μ.withDensityᵥ f)


@[to_additive]
protected theorem Periodic.div [Add α] [Div β] (hf : Periodic f c) (hg : Periodic g c) :
    Periodic (f / g) c

{α : Type u_1}
{β : Type u_2}
{f g : α → β}
{c : α}
[Add α]
[Sub β]
(hf : Function.Periodic f c)
(hg : Function.Periodic g c)


@[to_additive]
theorem even_mul_odd {f : ℕ → M} (he : Multipliable fun k ↦ f (2 * k))
    (ho : Multipliable fun k ↦ f (2 * k + 1)) : Multipliable f

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
{f : ℕ → M}
(he : Summable fun k => f (2 * k))
(ho : Summable fun k => f (2 * k + 1))


@[to_additive (attr := norm_cast) (reorder := 7 8)]
theorem coe_pow [Monoid β] [ContinuousMul β] (f : C(α, β)) (n : ℕ) : ⇑(f ^ n) = (⇑f) ^ n

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[AddMonoid β]
[ContinuousAdd β]
(n : ℕ)
(f : C(α, β))


theorem map_sub (x y : M) : Q (x - y) = Q (y - x)

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(x y : M)


@[simps]
instance compLeft (F : D ⥤ E) : Localization.Lifting L W (L ⋙ F) F

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
{E : Type u_3}
[CategoryTheory.Category.{u_6, u_3} E]
(F : CategoryTheory.Functor D E)

CategoryTheory.Localization.Lifting.iso' W = CategoryTheory.Iso.refl (L.comp F)


theorem IsBigO.const_smul_left (h : f' =O[l] g) (c : R) : (c • f') =O[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
{R : Type u_13}
[Norm F]
[SeminormedAddCommGroup E']
[SeminormedRing R]
{g : α → F}
{f' : α → E'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
(h : f' =O[l] g)
(c : R)


/-- An isomorphism of short complexes `S₁ ≅ S₂` induces an isomorphism on the `H` fields
of left homology data of `S₁` and `S₂`. -/
@[simps]
def leftHomologyMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.LeftHomologyData)
    (h₂ : S₂.LeftHomologyData) : h₁.H ≅ h₂.H

(CategoryTheory.ShortComplex.leftHomologyMapIso' e h₁ h₂).hom = CategoryTheory.ShortComplex.leftHomologyMap' e.hom h₁ h₂


theorem Cauchy.prod [UniformSpace β] {f : Filter α} {g : Filter β} (hf : Cauchy f) (hg : Cauchy g) :
    Cauchy (f ×ˢ g)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[UniformSpace β]
{f : Filter α}
{g : Filter β}
(hf : Cauchy f)
(hg : Cauchy g)


/-- Brahmagupta-Fibonacci identity or Diophantus identity, see
<https://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity>.

This sign choice here corresponds to the signs obtained by multiplying two complex numbers.
-/
theorem sq_add_sq_mul_sq_add_sq :
    (x₁ ^ 2 + x₂ ^ 2) * (y₁ ^ 2 + y₂ ^ 2) = (x₁ * y₁ - x₂ * y₂) ^ 2 + (x₁ * y₂ + x₂ * y₁) ^ 2

{R : Type u_1}
[CommRing R]
{x₁ x₂ y₁ y₂ : R}


/-- Left multiplication by a nonzero element in a `GroupWithZero` is a permutation of the
underlying type. -/
@[simps! (config := .asFn)]
protected def mulLeft₀ (a : G) (ha : a ≠ 0) : Perm G

{G : Type u_1}
[GroupWithZero G]
(a : G)
(ha : a ≠ 0)


/-- The identity function as a closure operator. -/
@[simps!]
def id : ClosureOperator α


theorem isLowerSet_empty : IsLowerSet (∅ : Set α)


@[simp]
theorem inf_adj (x y : SimpleGraph V) (v w : V) : (x ⊓ y).Adj v w ↔ x.Adj v w ∧ y.Adj v w

{V : Type u}
(x y : SimpleGraph V)
(v w : V)


/-- The dimension of a quotient is bounded by the dimension of the ambient space. -/
theorem Submodule.finrank_quotient_le [Module.Finite R M] (s : Submodule R M) :
    finrank R (M ⧸ s) ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
(s : Submodule R M)

FiniteDimensional.finrank R (M ⧸ s) ≤ FiniteDimensional.finrank R M


@[simp] theorem getMsb_shiftLeftZeroExtend (x : BitVec m) (n : Nat) :
    getMsb (shiftLeftZeroExtend x n) i = getMsb x i

(x.shiftLeftZeroExtend n).getMsb i = x.getMsb i


theorem lift_self (h : IsAdjoinRoot S f) :
    h.lift (algebraMap R S) h.root h.aeval_root = RingHom.id S

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
(h : IsAdjoinRoot S f)

IsAdjoinRoot.lift (algebraMap R S) h.root ⋯ h = RingHom.id S


theorem dite_ne_left_iff : dite P (fun _ ↦ a) B ≠ a ↔ ∃ h, a ≠ B h

{α : Sort u_1}
{P : Prop}
[Decidable P]
{a : α}
{B : ¬P → α}

dite P (fun x => a) B ≠ a ↔ ∃ h, a ≠ B h


/-- The Euler product for the Riemann ζ function, valid for `s.re > 1`.
This version is stated in terms of `HasProd`. -/
theorem riemannZeta_eulerProduct_hasProd (hs : 1 < s.re) :
    HasProd (fun p : Primes ↦ (1 - (p : ℂ) ^ (-s))⁻¹) (riemannZeta s)

HasProd (fun p => (1 - ↑↑p ^ (-s))⁻¹) (riemannZeta s)


@[simp]
theorem Icc_diff_Ico_self (h : a ≤ b) : Icc a b \ Ico a b = {b}

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


theorem mem_span_singleton_self (x : α) : x ∈ span ({x} : Set α)


/-- Two `CliffordAlgebra`s are equivalent as algebras if their quadratic forms are
equivalent. -/
@[simps! apply]
def equivOfIsometry (e : Q₁.IsometryEquiv Q₂) : CliffordAlgebra Q₁ ≃ₐ[R] CliffordAlgebra Q₂

{R : Type u_1}
[CommRing R]
{M₁ : Type u_4}
{M₂ : Type u_5}
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
{Q₁ : QuadraticForm R M₁}
{Q₂ : QuadraticForm R M₂}
(e : QuadraticMap.IsometryEquiv Q₁ Q₂)
(a : CliffordAlgebra Q₁)

(CliffordAlgebra.equivOfIsometry e) a = (CliffordAlgebra.map e.toIsometry) a


theorem C_mul' (a : R) (f : R[X]) : C a * f = a • f

{R : Type u}
[Semiring R]
(a : R)
(f : R[X])


/-- Given rings `R` and `S` of characteristic `p`, with `R` being perfect,
any homomorphism `R →+* S` can be lifted to a homomorphism `R →+* P`,
where `P` is any perfection of `S`. -/
@[simps]
noncomputable def lift [PerfectRing R p] (S : Type u₂) [CommSemiring S] [CharP S p] (P : Type u₃)
    [CommSemiring P] [CharP P p] [PerfectRing P p] (π : P →+* S) (m : PerfectionMap p π) :
    (R →+* S) ≃ (R →+* P)

(p : ℕ)
[Fact (Nat.Prime p)]
(R : Type u₁)
[CommSemiring R]
[CharP R p]
[PerfectRing R p]
(S : Type u₂)
[CommSemiring S]
[CharP S p]
(P : Type u₃)
[CommSemiring P]
[CharP P p]
[PerfectRing P p]
(π : P →+* S)
(m : PerfectionMap p π)
(f : R →+* S)

(PerfectionMap.lift p R S P π m) f = (↑m.equiv.symm).comp ((Perfection.lift p R S) f)


theorem subset_balancedCore (ht : (0 : E) ∈ t) (hst : ∀ a : 𝕜, ‖a‖ ≤ 1 → a • s ⊆ t) :
    s ⊆ balancedCore 𝕜 t

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(ht : 0 ∈ t)
(hst : ∀ (a : 𝕜), ‖a‖ ≤ 1 → a • s ⊆ t)


theorem div_add_mod (a b : Ordinal) : b * (a / b) + a % b = a


theorem tendsto_atTop_mono' [Preorder β] (l : Filter α) ⦃f₁ f₂ : α → β⦄ (h : f₁ ≤ᶠ[l] f₂)
    (h₁ : Tendsto f₁ l atTop) : Tendsto f₂ l atTop

{α : Type u_3}
{β : Type u_4}
[Preorder β]
(l : Filter α)
⦃f₁ f₂ : α → β⦄
(h : f₁ ≤ᶠ[l] f₂)
(h₁ : Filter.Tendsto f₁ l Filter.atTop)


theorem rpow_sub' {x : ℝ} (hx : 0 ≤ x) {y z : ℝ} (h : y - z ≠ 0) : x ^ (y - z) = x ^ y / x ^ z


/-- In a preadditive category `C`, when an object `X` decomposes as `X ≅ P ⨿ Q`, one may
consider `P` as a direct factor of `X` and up to unique isomorphism, it is determined by the
obvious idempotent `X ⟶ P ⟶ X` which is the projection onto `P` with kernel `Q`. More generally,
one may define a formal direct factor of an object `X : C` : it consists of an idempotent
`p : X ⟶ X` which is thought as the "formal image" of `p`. The type `Karoubi C` shall be the
type of the objects of the karoubi envelope of `C`. It makes sense for any category `C`. -/
structure Karoubi where
  /-- an object of the underlying category -/
  X : C
  /-- an endomorphism of the object -/
  p : X ⟶ X
  /-- the condition that the given endomorphism is an idempotent -/
  idem : p ≫ p = p := by aesop_cat

(self : CategoryTheory.Idempotents.Karoubi C)

CategoryTheory.CategoryStruct.comp self.p self.p = self.p


theorem integrableOn_Icc_iff_integrableOn_Ico :
    IntegrableOn f (Icc a b) μ ↔ IntegrableOn f (Ico a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
[MeasureTheory.NoAtoms μ]

MeasureTheory.IntegrableOn f (Set.Icc a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ico a b) μ


/-- Surjectivity of a map descends to the map induced on localizations. -/
theorem map_surjective_of_surjective (h : Function.Surjective g) [IsLocalization (M.map g) Q] :
    Function.Surjective (map Q g M.le_comap_map : S → Q)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{g : R →+* P}
(Q : Type u_4)
[CommSemiring Q]
[Algebra P Q]
(h : Function.Surjective ⇑g)
[IsLocalization (Submonoid.map g M) Q]

Function.Surjective ⇑(IsLocalization.map Q g ⋯)


theorem Submartingale.stoppedValue_leastGE [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ) (r : ℝ) :
    Submartingale (fun i => stoppedValue f (leastGE f r i)) ℱ μ

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

MeasureTheory.Submartingale (fun i => MeasureTheory.stoppedValue f (MeasureTheory.leastGE f r i)) ℱ μ


@[simp]
theorem reverse_zero : reverse (0 : R[X]) = 0


@[simp]
theorem mk_eq_coe (l : List α) : Quot.mk _ l = (l : Cycle α)


@[simp] theorem not_bne_self : ∀ (x : Bool), ((!x) != x) = true


theorem coeff_pow_of_natDegree_le_of_eq_ite' {m n o : ℕ} {a : R} {p : R[X]}
    (h_pow : natDegree p ≤ n) (h_exp : m * n ≤ o) (h_pow_bas : coeff p n = a) :
    coeff (p ^ m) o = if o = m * n then a ^ m else 0

{R : Type u_1}
[Semiring R]
{m n o : ℕ}
{a : R}
{p : R[X]}
(h_pow : p.natDegree ≤ n)
(h_exp : m * n ≤ o)
(h_pow_bas : p.coeff n = a)

(p ^ m).coeff o = if o = m * n then a ^ m else 0


theorem surjective (e : M ≃ₗ⁅R,L⁆ N) : Function.Surjective e

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(e : M ≃ₗ⁅R,L⁆ N)


/-- The convolution of a Dirichlet character `χ` with the twist `χ * μ` is `δ`,
the indicator function of `{1}`. -/
lemma convolution_mul_moebius {n : ℕ} (χ : DirichletCharacter ℂ n) : ↗χ ⍟ (↗χ * ↗μ) = δ

(fun n_1 => χ ↑n_1) ⍟ ((fun n_1 => χ ↑n_1) * fun n => ↑(ArithmeticFunction.moebius n)) = δ


theorem natAbs_sub_ne_zero_iff {i j : ℤ} : natAbs (i - j) ≠ 0 ↔ i ≠ j


@[simp, norm_cast]
theorem coe_nsmul [∀ i, AddMonoid (β i)] (b : ℕ) (v : Π₀ i, β i) : ⇑(b • v) = b • ⇑v

{ι : Type u}
{β : ι → Type v}
[(i : ι) → AddMonoid (β i)]
(b : ℕ)
(v : Π₀ (i : ι), β i)


@[simp]
theorem isLUB_preimage {s : Set β} {x : α} : IsLUB (f ⁻¹' s) x ↔ IsLUB s (f x)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
{s : Set β}
{x : α}


@[simp]
protected theorem nat_succ (n : ℕ) : ((n + 1 : ℕ) : PGame) = n + 1


theorem find?_eq_findEntry? [BEq α] (a : α) (l : AssocList α β) :
    find? a l = (l.findEntry? a).map (·.2)

{α : Type u_1}
{β : Type u_2}
[BEq α]
(a : α)
(l : Batteries.AssocList α β)

Batteries.AssocList.find? a l = Option.map (fun x => x.snd) (Batteries.AssocList.findEntry? a l)


/-- A sum of extended nonnegative reals which is finite can have only finitely many terms
above any positive threshold. -/
theorem finite_const_le_of_tsum_ne_top {ι : Type*} {a : ι → ℝ≥0∞} (tsum_ne_top : ∑' i, a i ≠ ∞)
    {ε : ℝ≥0∞} (ε_ne_zero : ε ≠ 0) : { i : ι | ε ≤ a i }.Finite

{ι : Type u_4}
{a : ι → ℝ≥0∞}
(tsum_ne_top : ∑' (i : ι), a i ≠ ⊤)
{ε : ℝ≥0∞}
(ε_ne_zero : ε ≠ 0)


@[reassoc (attr := simp)]
theorem ι_plusCompIso_hom (X) (W) :
    F.map (colimit.ι _ W) ≫ (J.plusCompIso F P).hom.app X =
      (J.diagramCompIso F P X.unop).hom.app W ≫ colimit.ι _ W

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

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

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

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.Limits.colimit.ι (J.diagram P (Opposite.unop X)) W))
    ((J.plusCompIso F P).hom.app X) =
  CategoryTheory.CategoryStruct.comp ((J.diagramCompIso F P (Opposite.unop X)).hom.app W)
    (CategoryTheory.Limits.colimit.ι (J.diagram (P.comp F) (Opposite.unop X)) W)


@[simp]
theorem map₂_cons (hd₁ : α) (tl₁ : Vector α n) (hd₂ : β) (tl₂ : Vector β n) (f : α → β → γ) :
    Vector.map₂ f (hd₁ ::ᵥ tl₁) (hd₂ ::ᵥ tl₂) = f hd₁ hd₂ ::ᵥ (Vector.map₂ f tl₁ tl₂)

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(hd₁ : α)
(tl₁ : Mathlib.Vector α n)
(hd₂ : β)
(tl₂ : Mathlib.Vector β n)
(f : α → β → γ)

Mathlib.Vector.map₂ f (hd₁ ::ᵥ tl₁) (hd₂ ::ᵥ tl₂) = f hd₁ hd₂ ::ᵥ Mathlib.Vector.map₂ f tl₁ tl₂


protected lemma le_iff_lt_or_eq : a ≤ b ↔ a < b ∨ a = b


@[to_additive]
lemma piFinset_div [∀ i, Div (α i)] (s t : ∀ i, Finset (α i)) :
    piFinset (fun i ↦ s i / t i) = piFinset s / piFinset t

{ι : Type u_5}
{α : ι → Type u_6}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → Div (α i)]
(s t : (i : ι) → Finset (α i))

(Fintype.piFinset fun i => s i / t i) = Fintype.piFinset s / Fintype.piFinset t


theorem exists_st_of_not_infinite {x : ℝ*} (hni : ¬Infinite x) : ∃ r : ℝ, IsSt x r


/-- Candidates are Lipschitz -/
private theorem candidates_lipschitz (fA : f ∈ candidates X Y) :
    LipschitzWith (2 * maxVar X Y) f

(fA : f ∈ GromovHausdorff.candidates X Y)

LipschitzWith (2 * GromovHausdorff.maxVar X Y) f


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

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

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


@[ext]
theorem ext (H : ∀ x : M, Q x = Q' x) : Q = Q'

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q Q' : QuadraticMap R M N}
(H : ∀ (x : M), Q x = Q' x)


theorem rank_real_of_complex (E : Type*) [AddCommGroup E] [Module ℂ E] :
    Module.rank ℝ E = 2 * Module.rank ℂ E

(E : Type u_1)
[AddCommGroup E]
[Module ℂ E]


theorem projectiveSeminorm_tprod_le (m : Π i, E i) :
    projectiveSeminorm (⨂ₜ[𝕜] i, m i) ≤ ∏ i, ‖m i‖

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

PiTensorProduct.projectiveSeminorm (⨂ₜ[𝕜] (i : ι), m i) ≤ ∏ i : ι, ‖m i‖


theorem map_injective (F : C ⥤ D) [Faithful F] :
    Function.Injective <| (F.map : (X ⟶ Y) → (F.obj X ⟶ F.obj Y))

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


theorem stoppedValue_piecewise_const {ι' : Type*} {i j : ι'} {f : ι' → Ω → ℝ} :
    stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.piecewise (f i) (f j)

{Ω : Type u_1}
{s : Set Ω}
[DecidablePred fun x => x ∈ s]
{ι' : Type u_4}
{i j : ι'}
{f : ι' → Ω → ℝ}

MeasureTheory.stoppedValue f (s.piecewise (fun x => i) fun x => j) = s.piecewise (f i) (f j)


theorem eval_continuous (y : E) : Continuous fun x : WeakDual 𝕜 E => x y

{𝕜 : Type u_2}
{E : Type u_5}
[CommSemiring 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]
(y : E)


theorem map_unique {f : α → β} {g : Completion α → Completion β} (hg : UniformContinuous g)
    (h : ∀ a : α, ↑(f a) = g a) : Completion.map f = g

{g : UniformSpace.Completion α → UniformSpace.Completion β}


theorem StrictConvex.neg (hs : StrictConvex 𝕜 s) : StrictConvex 𝕜 (-s)

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedRing 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
[TopologicalAddGroup E]
(hs : StrictConvex 𝕜 s)


theorem exp_periodic : Function.Periodic exp (2 * π * I)

Function.Periodic Complex.exp (2 * ↑Real.pi * Complex.I)


/-- The boundary is the complement of the interior. -/
lemma boundary_eq_complement_interior : I.boundary M = (I.interior M)ᶜ

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


@[simp]
theorem map_top (f : X ⟶ Y) [Mono f] : (map f).obj ⊤ = Subobject.mk f

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

(CategoryTheory.Subobject.map f).obj ⊤ = CategoryTheory.Subobject.mk f


theorem InfiniteNeg.not_infinitePos {x : ℝ*} : InfiniteNeg x → ¬InfinitePos x


theorem nhds_basis_uniformity' {p : ι → Prop} {s : ι → Set (α × α)} (h : (𝓤 α).HasBasis p s)
    {x : α} : (𝓝 x).HasBasis p fun i => ball x (s i)

{α : Type ua}
{ι : Sort u_1}
[UniformSpace α]
{p : ι → Prop}
{s : ι → Set (α × α)}
(h : (𝓤 α).HasBasis p s)
{x : α}

(𝓝 x).HasBasis p fun i => UniformSpace.ball x (s i)


/-- If a category has all binary products and all equalizers, then it also has all pullbacks.
    As usual, this is not an instance, since there may be a more direct way to construct
    pullbacks. -/
theorem hasPullbacks_of_hasBinaryProducts_of_hasEqualizers (C : Type u) [Category.{v} C]
    [HasBinaryProducts C] [HasEqualizers C] : HasPullbacks C


@[to_additive]
theorem orderOf_le_of_pow_eq_one (hn : 0 < n) (h : x ^ n = 1) : orderOf x ≤ n

{G : Type u_1}
[AddMonoid G]
{x : G}
{n : ℕ}
(hn : 0 < n)
(h : n • x = 0)


@[to_additive]
theorem closure_eq_mrange (s : Set M) : closure s = mrange (FreeMonoid.lift ((↑) : s → M))

Submonoid.closure s = MonoidHom.mrange (FreeMonoid.lift Subtype.val)


/-- Given a family of points `p : ι' → P` and an affine basis `b`, if the matrix whose rows are the
coordinates of `p` with respect `b` has a left inverse, then `p` spans the entire space. -/
theorem affineSpan_eq_top_of_toMatrix_left_inv [Finite ι] [Fintype ι'] [DecidableEq ι]
    [Nontrivial k] (p : ι' → P) {A : Matrix ι ι' k} (hA : A * b.toMatrix p = 1) :
    affineSpan k (range p) = ⊤

{ι : Type u₁}
{k : Type u₂}
{V : Type u₃}
{P : Type u₄}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
{ι' : Type u_1}
[Finite ι]
[Fintype ι']
[DecidableEq ι]
[Nontrivial k]
(p : ι' → P)
{A : Matrix ι ι' k}
(hA : A * b.toMatrix p = 1)


@[simp]
theorem degree_derivative_eq [NoZeroSMulDivisors ℕ R] (p : R[X]) (hp : 0 < natDegree p) :
    degree (derivative p) = (natDegree p - 1 : ℕ)

{R : Type u}
[Semiring R]
[NoZeroSMulDivisors ℕ R]
(p : R[X])
(hp : 0 < p.natDegree)

(Polynomial.derivative p).degree = ↑(p.natDegree - 1)


lemma getVert_one (p : G.Walk u v) (hnp : ¬ p.Nil) : p.getVert 1 = p.sndOfNotNil hnp

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
(hnp : ¬p.Nil)


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

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


@[simp]
theorem isHermitian_zero : (0 : Matrix n n α).IsHermitian

{α : Type u_1}
{n : Type u_4}
[AddMonoid α]
[StarAddMonoid α]


@[simp]
theorem cast_pos [Zero α] [One α] [Add α] (n : PosNum) : (Num.pos n : α) = n

{α : Type u_1}
[Zero α]
[One α]
[Add α]
(n : PosNum)


@[simp]
theorem reindex_toBasis (b : OrthonormalBasis ι 𝕜 E) (e : ι ≃ ι') :
    (b.reindex e).toBasis = b.toBasis.reindex e

{ι : Type u_1}
{ι' : Type u_2}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
[Fintype ι']
(b : OrthonormalBasis ι 𝕜 E)
(e : ι ≃ ι')


@[to_additive tsum_of_add_one_of_neg_add_one]
lemma tprod_of_add_one_of_neg_add_one [T2Space M] {f : ℤ → M}
    (hf₁ : Multipliable fun n : ℕ ↦ f (n + 1)) (hf₂ : Multipliable fun n : ℕ ↦ f (-(n + 1))) :
    ∏' n : ℤ, f n = (∏' n : ℕ, f (n + 1)) * f 0 * ∏' n : ℕ, f (-(n + 1))

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
[T2Space M]
{f : ℤ → M}
(hf₁ : Summable fun n => f (↑n + 1))
(hf₂ : Summable fun n => f (-(↑n + 1)))


@[simp]
theorem snd_sub : (s - t).snd = s.snd - t.fst

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

(s - t).toProd.2 = s.toProd.2 - t.toProd.1


theorem deriv_circleMap_eq_zero_iff {c : ℂ} {R : ℝ} {θ : ℝ} :
    deriv (circleMap c R) θ = 0 ↔ R = 0


theorem Antitone.mul [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hf : Antitone f) (hg : Antitone g) (hf₀ : ∀ x, f x ≤ 0) (hg₀ : ∀ x, g x ≤ 0) :
    Monotone (f * g)

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

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


/-- The minimum of the valuations of `q` and `r` is at most the valuation of `q + r`. -/
theorem min_le_padicValRat_add {q r : ℚ} (hqr : q + r ≠ 0) :
    min (padicValRat p q) (padicValRat p r) ≤ padicValRat p (q + r)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{q r : ℚ}
(hqr : q + r ≠ 0)


theorem nhds_comap_dist (a : α) : ((𝓝 (0 : ℝ)).comap (dist · a)) = 𝓝 a

{α : Type u}
[PseudoMetricSpace α]
(a : α)

Filter.comap (fun x => dist x a) (𝓝 0) = 𝓝 a


theorem mem_ball_self (hr : 0 < r) : x ∈ ball p x r

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
{x : E}
{r : ℝ}
(hr : 0 < r)


/-- `index_exists` asserts there is some `i` with `j < c.size_up_to (i+1)`.
In the next definition `index` we use `Nat.find` to produce the minimal such index.
-/
theorem index_exists {j : ℕ} (h : j < n) : ∃ i : ℕ, j < c.sizeUpTo (i + 1) ∧ i < c.length

{n : ℕ}
(c : Composition n)
{j : ℕ}
(h : j < n)

∃ i, j < c.sizeUpTo (i + 1) ∧ i < c.length


theorem IsRotated.map {β : Type*} {l₁ l₂ : List α} (h : l₁ ~r l₂) (f : α → β) :
    map f l₁ ~r map f l₂

{α : Type u}
{β : Type u_1}
{l₁ l₂ : List α}
(h : l₁ ~r l₂)
(f : α → β)


lemma supClosure_min : s ⊆ t → SupClosed t → supClosure s ⊆ t

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


theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
    Forall₂ R (List.take (length l₁) l) l₁

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(l : List α)
(l₁ l₂ : List β)
(h : List.Forall₂ R l (l₁ ++ l₂))

List.Forall₂ R (List.take l₁.length l) l₁


theorem eLpNorm'_eq_zero_of_ae_zero {f : α → F} (hq0_lt : 0 < q) (hf_zero : f =ᵐ[μ] 0) :
    eLpNorm' f q μ = 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
(hq0_lt : 0 < q)
(hf_zero : f =ᵐ[μ] 0)


/-- A variant of `jointly_surjective` for `x : colimit F`. -/
theorem jointly_surjective' (x : colimit F) :
    ∃ j y, colimit.ι F j y = x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
[CategoryTheory.Limits.HasColimit F]
(x : CategoryTheory.Limits.colimit F)

∃ j y, CategoryTheory.Limits.colimit.ι F j y = x


@[to_additive (attr := simp)] lemma one_ne_top : (1 : WithTop α) ≠ ⊤


theorem aleph'_le_of_limit {o : Ordinal} (l : o.IsLimit) {c} :
    aleph' o ≤ c ↔ ∀ o' < o, aleph' o' ≤ c

{o : Ordinal.{u_1}}
(l : o.IsLimit)
{c : Cardinal.{u_1}}

Cardinal.aleph' o ≤ c ↔ ∀ o' < o, Cardinal.aleph' o' ≤ c


/-- The "free algebra" functor, sending a type `S` to the free algebra on `S`. -/
@[simps!]
def free : Type u ⥤ AlgebraCat.{u} R

∀ {X Y : Type u} (f : X ⟶ Y), (AlgebraCat.free R).map f = (FreeAlgebra.lift R) (FreeAlgebra.ι R ∘ f)


@[simp] lemma eval_charpolyRev :
    eval 0 M.charpolyRev = 1

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
{M : Matrix n n R}


theorem lt_coe_iff : ∀ {x : WithBot α}, x < b ↔ ∀ a : α, x = a → a < b

{α : Type u_1}
{b : α}
[LT α]
{x : WithBot α}


theorem IsPathConnected.subset_pathComponent (h : IsPathConnected F) (x_in : x ∈ F) :
    F ⊆ pathComponent x

{X : Type u_1}
[TopologicalSpace X]
{x : X}
{F : Set X}
(h : IsPathConnected F)
(x_in : x ∈ F)


theorem AlgebraicIndependent.option_iff (hx : AlgebraicIndependent R x) (a : A) :
    (AlgebraicIndependent R fun o : Option ι => o.elim a x) ↔
      ¬IsAlgebraic (adjoin R (Set.range x)) a

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(a : A)

(AlgebraicIndependent R fun o => o.elim a x) ↔ ¬IsAlgebraic (↥(Algebra.adjoin R (Set.range x))) a


theorem eq_of_isDetecting [HasPullbacks C] {𝒢 : Set C} (h𝒢 : IsDetecting 𝒢) {X : C}
    (P Q : Subobject X) (h : ∀ G ∈ 𝒢, ∀ {f : G ⟶ X}, P.Factors f ↔ Q.Factors f) : P = Q


theorem pred_coe_of_ne_bot {a : α} (h : a ≠ ⊥) : pred (↑a : WithBot α) = ↑(pred a)

{α : Type u_1}
[DecidableEq α]
[PartialOrder α]
[OrderBot α]
[PredOrder α]
{a : α}
(h : a ≠ ⊥)


theorem mem_iInf₂_iff {f : ∀ i, κ i → LowerSet α} : (a ∈ ⨅ (i) (j), f i j) ↔ ∀ i j, a ∈ f i j

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_5}
[LE α]
{a : α}
{f : (i : ι) → κ i → LowerSet α}

a ∈ ⨅ i, ⨅ j, f i j ↔ ∀ (i : ι) (j : κ i), a ∈ f i j


theorem rpow_arith_mean_le_arith_mean_rpow (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) {p : ℝ} (hp : 1 ≤ p) :
    (∑ i ∈ s, w i * z i) ^ p ≤ ∑ i ∈ s, w i * z i ^ p

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1)
(hz : ∀ i ∈ s, 0 ≤ z i)
{p : ℝ}
(hp : 1 ≤ p)


theorem upperSemicontinuousOn_sum {f : ι → α → γ} {a : Finset ι}
    (ha : ∀ i ∈ a, UpperSemicontinuousOn (f i) s) :
    UpperSemicontinuousOn (fun z => ∑ i ∈ a, f i z) s

{f : ι → α → γ}


theorem polynomialFunctions.eq_adjoin_X (s : Set R) :
    polynomialFunctions s = Algebra.adjoin R {toContinuousMapOnAlgHom s X}

{R : Type u_1}
[CommSemiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
(s : Set R)

polynomialFunctions s = Algebra.adjoin R {(Polynomial.toContinuousMapOnAlgHom s) Polynomial.X}


theorem HasMFDerivWithinAt.congr_mono (h : HasMFDerivWithinAt I I' f s x f')
    (ht : ∀ x ∈ t, f₁ x = f x) (hx : f₁ x = f x) (h₁ : t ⊆ s) : HasMFDerivWithinAt I I' f₁ t x f'

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


/-- If `p : 𝓞 K` is a prime that divides both `S.a + η * S.b` and `S.a + η ^ 2 * S.b`, then `p`
is associated with `λ`. -/
lemma associated_of_dvd_a_add_eta_mul_b_of_dvd_a_add_eta_sq_mul_b {p : 𝓞 K} (hp : Prime p)
    (hpaηb : p ∣ S.a + η * S.b) (hpaηsqb : p ∣ S.a + η ^ 2 * S.b) : Associated p λ

(S : FermatLastTheoremForThreeGen.Solution hζ)


theorem integer.integers : v.Integers v.integer

{R : Type u}
{Γ₀ : Type v}
[CommRing R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)


@[simp]
theorem fst_inr [Zero R] (a : A) : (a : Unitization R A).fst = 0

(R : Type u_1)
{A : Type u_2}
[Zero R]
(a : A)


theorem lower_bound_le_one (hN : 1 ≤ N) (hN' : N ≤ 4096) :
    (N : ℝ) * exp (-4 * √(log N)) ≤ 1


theorem ωSup_zip (c₀ : Chain α) (c₁ : Chain β) : ωSup (c₀.zip c₁) = (ωSup c₀, ωSup c₁)

(c₀ : OmegaCompletePartialOrder.Chain α)

(c₁ : OmegaCompletePartialOrder.Chain β)

OmegaCompletePartialOrder.ωSup (c₀.zip c₁) = (OmegaCompletePartialOrder.ωSup c₀, OmegaCompletePartialOrder.ωSup c₁)


/-- If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively.
The constructive version is `quotientEquivProdOfLE'`. -/
@[to_additive (attr := simps!) "If `H ≤ K`, then `G/H ≃ G/K × K/H` nonconstructively. The
 constructive version is `quotientEquivProdOfLE'`."]
noncomputable def quotientEquivProdOfLE (h_le : s ≤ t) : α ⧸ s ≃ (α ⧸ t) × t ⧸ s.subgroupOf t

{α : Type u_1}
[Group α]
{s t : Subgroup α}
(h_le : s ≤ t)
(a : (α ⧸ t) × ↥t ⧸ s.subgroupOf t)

(Subgroup.quotientEquivProdOfLE h_le).symm a = Quotient.map' (fun b => Quotient.out' a.1 * ↑b) ⋯ a.2


theorem upper_two_blockTriangular [Preorder α] (A : Matrix m m R) (B : Matrix m n R)
    (D : Matrix n n R) {a b : α} (hab : a < b) :
    BlockTriangular (fromBlocks A B 0 D) (Sum.elim (fun _ => a) fun _ => b)

{α : Type u_1}
{m : Type u_3}
{n : Type u_4}
{R : Type v}
[CommRing R]
[Preorder α]
(A : Matrix m m R)
(B : Matrix m n R)
(D : Matrix n n R)
{a b : α}
(hab : a < b)

(Matrix.fromBlocks A B 0 D).BlockTriangular (Sum.elim (fun x => a) fun x => b)


@[simp]
theorem map₂_mk (f : α → β → γ) (h : ((· ≈ ·) ⇒ (· ≈ ·) ⇒ (· ≈ ·)) f f) (x : α) (y : β) :
    Quotient.map₂ f h (⟦x⟧ : Quotient sa) (⟦y⟧ : Quotient sb) = (⟦f x y⟧ : Quotient sc)

(f : α → β → γ)

(h : ((fun x x_1 => x ≈ x_1) ⇒ (fun x x_1 => x ≈ x_1) ⇒ fun x x_1 => x ≈ x_1) f f)


/-- Every exponent in the Cantor normal form `CNF b o` is less or equal to `o`. -/
theorem CNF_fst_le {b o : Ordinal.{u}} {x : Ordinal × Ordinal} (h : x ∈ CNF b o) : x.1 ≤ o

{b o : Ordinal.{u}}
{x : Ordinal.{u} × Ordinal.{u}}
(h : x ∈ Ordinal.CNF b o)


/-- a function `f : α × β → ℚ → ℝ` is called a rational conditional kernel CDF of `κ` with respect
to `ν` if is measurable, if `fun b ↦ f (a, b) x` is `(ν a)`-integrable for all `a : α` and `x : ℝ`
and for all measurable sets `s : Set β`, `∫ b in s, f (a, b) x ∂(ν a) = (κ a (s ×ˢ Iic x)).toReal`.
Also the `ℚ → ℝ` function `f (a, b)` should satisfy the properties of a Sieltjes function for
`(ν a)`-almost all `b : β`. -/
structure IsRatCondKernelCDF (f : α × β → ℚ → ℝ) (κ : Kernel α (β × ℝ)) (ν : Kernel α β) : Prop :=
  measurable : Measurable f
  isRatStieltjesPoint_ae (a : α) : ∀ᵐ b ∂(ν a), IsRatStieltjesPoint f (a, b)
  integrable (a : α) (q : ℚ) : Integrable (fun b ↦ f (a, b) q) (ν a)
  setIntegral (a : α) {s : Set β} (_hs : MeasurableSet s) (q : ℚ) :
    ∫ b in s, f (a, b) q ∂(ν a) = (κ a (s ×ˢ Iic (q : ℝ))).toReal

{f : α × β → ℚ → ℝ}

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

(self : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

∀ᵐ (b : β) ∂ν a, ProbabilityTheory.IsRatStieltjesPoint f (a, b)


@[simp]
theorem mem_toAffineSubspace {p : Submodule k V} {x : V} :
    x ∈ p.toAffineSubspace ↔ x ∈ p

{k : Type u_1}
{V : Type u_2}
[Ring k]
[AddCommGroup V]
[Module k V]
{p : Submodule k V}
{x : V}


@[to_additive]
lemma IsSquare.mul [CommSemigroup α] {a b : α} : IsSquare a → IsSquare b → IsSquare (a * b)

{α : Type u_2}
[CommSemigroup α]
{a b : α}


theorem coe_discr : (discr K : ℚ) = Algebra.discr ℚ (integralBasis K)

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

↑(NumberField.discr K) = Algebra.discr ℚ ⇑(NumberField.integralBasis K)


@[simp]
theorem ofLE_comp_ofLE (h₁ : A ≤ B) (h₂ : B ≤ C) : ofLE h₂ ∘ ofLE h₁ = ofLE (le_trans h₁ h₂)

{X : Type u_2}
[TopologicalSpace X]
{A B C : DiscreteQuotient X}
(h₁ : A ≤ B)
(h₂ : B ≤ C)

DiscreteQuotient.ofLE h₂ ∘ DiscreteQuotient.ofLE h₁ = DiscreteQuotient.ofLE ⋯


@[simp, norm_cast]
theorem coeFn_smul [IsScalarTower R ℝ≥0 ℝ≥0] (c : R) (μ : FiniteMeasure Ω) :
    (⇑(c • μ) : Set Ω → ℝ≥0) = c • (⇑μ : Set Ω → ℝ≥0)

{Ω : Type u_1}
[MeasurableSpace Ω]
{R : Type u_2}
[SMul R ℝ≥0]
[SMul R ℝ≥0∞]
[IsScalarTower R ℝ≥0 ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
[IsScalarTower R ℝ≥0 ℝ≥0]
(c : R)
(μ : MeasureTheory.FiniteMeasure Ω)

⇑(c • μ) = c • ⇑μ


/-- An affinely independent family is injective, if the underlying
ring is nontrivial. -/
protected theorem AffineIndependent.injective [Nontrivial k] {p : ι → P}
    (ha : AffineIndependent k p) : Function.Injective p

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[Nontrivial k]
{p : ι → P}
(ha : AffineIndependent k p)


@[simp]
theorem _root_.ContinuousLinearEquiv.coe_toContinuousAffineEquiv (e : E ≃L[k] F) :
    ⇑e.toContinuousAffineEquiv = e

{k : Type u_1}
[Ring k]
{E : Type u_10}
{F : Type u_11}
[AddCommGroup E]
[Module k E]
[TopologicalSpace E]
[AddCommGroup F]
[Module k F]
[TopologicalSpace F]
(e : E ≃L[k] F)


theorem mono_fun [NormedAddCommGroup F] {g : ℝ → F} (hf : IntervalIntegrable f μ a b)
    (hgm : AEStronglyMeasurable g (μ.restrict (Ι a b)))
    (hle : (fun x => ‖g x‖) ≤ᵐ[μ.restrict (Ι a b)] fun x => ‖f x‖) : IntervalIntegrable g μ a b

(hgm : MeasureTheory.AEStronglyMeasurable g (μ.restrict (Ι a b)))


/-- A variant of `Submodule.mem_iSup_iff_exists_dfinsupp` with the RHS fully unfolded.

See also `Submodule.mem_iSup_iff_exists_finsupp`. -/
theorem mem_iSup_iff_exists_dfinsupp' (p : ι → Submodule R N) [∀ (i) (x : p i), Decidable (x ≠ 0)]
    (x : N) : x ∈ iSup p ↔ ∃ f : Π₀ i, p i, (f.sum fun i xi => ↑xi) = x

[(i : ι) → (x : ↥(p i)) → Decidable (x ≠ 0)]

x ∈ iSup p ↔ ∃ f, (f.sum fun i xi => ↑xi) = x


lemma Odd.zpow_pos_iff (hn : Odd n) : 0 < a ^ n ↔ 0 < a

{α : Type u_1}
[LinearOrderedField α]
{a : α}
{n : ℤ}
(hn : Odd n)


/-- The functor `F` factorises through its essential image, where the first functor is essentially
surjective and the second is fully faithful.
-/
@[simps!]
def toEssImageCompEssentialImageInclusion (F : C ⥤ D) : F.toEssImage ⋙ F.essImageInclusion ≅ F

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

F.toEssImageCompEssentialImageInclusion.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


/-- The quotient of a direct sum is the direct sum of quotients. -/
@[simps!]
def quotientPi [Fintype ι] [DecidableEq ι] (p : ∀ i, Submodule R (Ms i)) :
    ((∀ i, Ms i) ⧸ pi Set.univ p) ≃ₗ[R] ∀ i, Ms i ⧸ p i

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
{Ms : ι → Type u_3}
[(i : ι) → AddCommGroup (Ms i)]
[(i : ι) → Module R (Ms i)]
[Fintype ι]
[DecidableEq ι]
(p : (i : ι) → Submodule R (Ms i))

∀ (a : (i : ι) → Ms i ⧸ p i),
  (Submodule.quotientPi p).symm a = (Submodule.piQuotientLift p (Submodule.pi Set.univ p) LinearMap.single ⋯) a


theorem abs_sum_of_nonneg {G : Type*} [LinearOrderedAddCommGroup G] {f : ι → G} {s : Finset ι}
    (hf : ∀ i ∈ s, 0 ≤ f i) : |∑ i ∈ s, f i| = ∑ i ∈ s, f i

{ι : Type u_1}
{G : Type u_9}
[LinearOrderedAddCommGroup G]
{f : ι → G}
{s : Finset ι}
(hf : ∀ i ∈ s, 0 ≤ f i)


theorem totient_mul_of_prime_of_not_dvd {p n : ℕ} (hp : p.Prime) (h : ¬p ∣ n) :
    (p * n).totient = (p - 1) * n.totient

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


theorem nullMeasurableSet_le [SecondCountableTopology α] {μ : Measure δ}
    {f g : δ → α} (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    NullMeasurableSet { a | f a ≤ g a } μ

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace δ]
[LinearOrder α]
[OrderClosedTopology α]
[SecondCountableTopology α]
{μ : MeasureTheory.Measure δ}
{f g : δ → α}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)

MeasureTheory.NullMeasurableSet {a | f a ≤ g a} μ


@[to_additive (attr := simp)] lemma map_mk'_self : N.map (mk' N) = ⊥

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]

AddSubgroup.map (QuotientAddGroup.mk' N) N = ⊥


@[simp]
theorem enum_inj {r : α → α → Prop} [IsWellOrder α r] {o₁ o₂ : Ordinal} (h₁ : o₁ < type r)
    (h₂ : o₂ < type r) : enum r o₁ h₁ = enum r o₂ h₂ ↔ o₁ = o₂

{α : Type u}
{r : α → α → Prop}
[IsWellOrder α r]
{o₁ o₂ : Ordinal.{u}}
(h₁ : o₁ < Ordinal.type r)
(h₂ : o₂ < Ordinal.type r)

Ordinal.enum r o₁ h₁ = Ordinal.enum r o₂ h₂ ↔ o₁ = o₂


@[simp]
lemma homologyMap'_add :
    homologyMap' (φ + φ') h₁ h₂ = homologyMap' φ h₁ h₂ + homologyMap' φ' h₁ h₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ φ' : S₁ ⟶ S₂}
(h₁ : S₁.HomologyData)
(h₂ : S₂.HomologyData)

CategoryTheory.ShortComplex.homologyMap' (φ + φ') h₁ h₂ =
  CategoryTheory.ShortComplex.homologyMap' φ h₁ h₂ + CategoryTheory.ShortComplex.homologyMap' φ' h₁ h₂


@[to_additive]
theorem hasProd_of_isLUB [CanonicallyLinearOrderedCommMonoid α] [TopologicalSpace α]
    [OrderTopology α] {f : ι → α} (b : α) (hf : IsLUB (Set.range fun s ↦ ∏ i ∈ s, f i) b) :
    HasProd f b

(hf : IsLUB (Set.range fun s => ∑ i ∈ s, f i) b)


protected theorem Finite.upperClosure [LocallyFiniteOrderTop α] (hs : s.Finite) :
    (upperClosure s : Set α).Finite

{α : Type u_1}
[Preorder α]
{s : Set α}
[LocallyFiniteOrderTop α]
(hs : s.Finite)


lemma strictMono_eulerMascheroniSeq : StrictMono eulerMascheroniSeq


@[simp]
theorem map_zero : (0 : FractionalIdeal S P).map g = 0

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
(g : P →ₐ[R] P')


@[simp]
theorem liftRel_think_right (R : α → β → Prop) (ca : Computation α) (cb : Computation β) :
    LiftRel R ca (think cb) ↔ LiftRel R ca cb

{α : Type u}
{β : Type v}
(R : α → β → Prop)
(ca : Computation α)
(cb : Computation β)

Computation.LiftRel R ca cb.think ↔ Computation.LiftRel R ca cb


@[simp]
theorem filter_zero [∀ i, Zero (β i)] (p : ι → Prop) [DecidablePred p] :
    (0 : Π₀ i, β i).filter p = 0

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(p : ι → Prop)
[DecidablePred p]


theorem stoppedProcess_eq_stoppedValue {u : ι → Ω → β} {τ : Ω → ι} :
    stoppedProcess u τ = fun i => stoppedValue u fun ω => min i (τ ω)

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[LinearOrder ι]
{u : ι → Ω → β}
{τ : Ω → ι}

MeasureTheory.stoppedProcess u τ = fun i => MeasureTheory.stoppedValue u fun ω => min i (τ ω)


@[elab_as_elim]
theorem adjoin_induction'' {x : A} (hx : x ∈ adjoin R s)
    {p : (x : A) → x ∈ adjoin R s → Prop} (mem : ∀ x (h : x ∈ s), p x (subset_adjoin h))
    (algebraMap : ∀ (r : R), p (algebraMap R A r) (algebraMap_mem _ r))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (add_mem hx hy))
    (mul : ∀ x hx y hy, p x hx → p y hy → p (x * y) (mul_mem hx hy)) :
    p x hx

{p : (x : A) → x ∈ Algebra.adjoin R s → Prop}

(algebraMap : ∀ (r : R), p ((algebraMap R A) r) ⋯)

(add : ∀ (x : A) (hx : x ∈ Algebra.adjoin R s) (y : A) (hy : y ∈ Algebra.adjoin R s), p x hx → p y hy → p (x + y) ⋯)

(mul : ∀ (x : A) (hx : x ∈ Algebra.adjoin R s) (y : A) (hy : y ∈ Algebra.adjoin R s), p x hx → p y hy → p (x * y) ⋯)


theorem fst_sumFinsuppEquivProdFinsupp {α β γ : Type*} [Zero γ] (f : α ⊕ β →₀ γ) (x : α) :
    (sumFinsuppEquivProdFinsupp f).1 x = f (Sum.inl x)

{α : Type u_13}
{β : Type u_14}
{γ : Type u_15}
[Zero γ]
(f : α ⊕ β →₀ γ)
(x : α)

(Finsupp.sumFinsuppEquivProdFinsupp f).1 x = f (Sum.inl x)


/-- Order equipped with a sensible predecessor function. -/
@[ext]
class PredOrder (α : Type*) [Preorder α] where
  /-- Predecessor function-/
  pred : α → α
  /-- Proof of basic ordering with respect to `pred`-/
  pred_le : ∀ a, pred a ≤ a
  /-- Proof of interaction between `pred` and minimal element-/
  min_of_le_pred {a} : a ≤ pred a → IsMin a
  /-- Proof that `pred` satisfies ordering invariants between `LT` and `LE`-/
  le_pred_of_lt {a b} : a < b → a ≤ pred b
  /-- Proof that `pred` satisfies ordering invariants between `LE` and `LT`-/
  le_of_pred_lt {a b} : pred a < b → a ≤ b

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


lemma mk_XYIdeal'_mul_mk_XYIdeal'_of_Yeq {x y : F} (h : W.Nonsingular x y) :
    ClassGroup.mk (XYIdeal' <| nonsingular_neg h) * ClassGroup.mk (XYIdeal' h) = 1

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x y : F}
(h : W.Nonsingular x y)

ClassGroup.mk (WeierstrassCurve.Affine.CoordinateRing.XYIdeal' ⋯) *
    ClassGroup.mk (WeierstrassCurve.Affine.CoordinateRing.XYIdeal' h) =
  1


theorem Embedding.t25Space [TopologicalSpace Y] [T25Space Y] {f : X → Y} (hf : Embedding f) :
    T25Space X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T25Space Y]
{f : X → Y}
(hf : Embedding f)


@[simp]
theorem ringHom_map_cast [Ring R] (f : R →+* ZMod n) (k : ZMod n) : f (cast k) = k

{n : ℕ}
{R : Type u_1}
[Ring R]
(f : R →+* ZMod n)
(k : ZMod n)


theorem congr_F {S₁ S₂ : Split C} {Φ₁ Φ₂ : S₁ ⟶ S₂} (h : Φ₁ = Φ₂) : Φ₁.f = Φ₂.f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{S₁ S₂ : SimplicialObject.Split C}
{Φ₁ Φ₂ : S₁ ⟶ S₂}
(h : Φ₁ = Φ₂)


theorem mul_apply [Fintype m] [Mul α] [AddCommMonoid α] {M : Matrix l m α} {N : Matrix m n α}
    {i k} : (M * N) i k = ∑ j, M i j * N j k

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Fintype m]
[Mul α]
[AddCommMonoid α]
{M : Matrix l m α}
{N : Matrix m n α}
{i : l}
{k : n}


@[simp] theorem tendsto_pure {f : α → β} {a : Filter α} {b : β} :
    Tendsto f a (pure b) ↔ ∀ᶠ x in a, f x = b

{α : Type u}
{β : Type v}
{f : α → β}
{a : Filter α}
{b : β}

Filter.Tendsto f a (pure b) ↔ ∀ᶠ (x : α) in a, f x = b


theorem half_add_half_equiv_one : powHalf 1 + powHalf 1 ≈ 1

SetTheory.PGame.powHalf 1 + SetTheory.PGame.powHalf 1 ≈ 1


lemma IsMeasurableRatCDF.stieltjesFunction_le_one (a : α) (x : ℝ) :
    hf.stieltjesFunction a x ≤ 1

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)


@[reassoc (attr := simp)]
lemma RightHomologyData.homologyIso_inv_comp_homologyι (h : S.RightHomologyData) :
    h.homologyIso.inv ≫ S.homologyι = h.ι ≫ h.opcyclesIso.inv

CategoryTheory.CategoryStruct.comp h.homologyIso.inv S.homologyι =
  CategoryTheory.CategoryStruct.comp h.ι h.opcyclesIso.inv


theorem eval₂_hom (x : R) : p.eval₂ f (f x) = f (p.eval x)

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

Polynomial.eval₂ f (f x) p = f (Polynomial.eval x p)


lemma length_eq_zero (irrefl : Irreflexive r) : s.length = 0 ↔ {x | x ∈ s}.Subsingleton

{α : Type u_1}
{r : Rel α α}
{s : RelSeries r}
(irrefl : Irreflexive r)


@[to_additive]
theorem div_mem_comm_iff {a b : G} : a / b ∈ H ↔ b / a ∈ H

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
{H : S}
[SetLike S G]
[AddSubgroupClass S G]
{a b : G}


theorem integral_eq_sum [Fintype α] (p : PMF α) (f : α → E) :
    ∫ a, f a ∂(p.toMeasure) = ∑ a, (p a).toReal • f a

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
[Fintype α]
(p : PMF α)
(f : α → E)

∫ (a : α), f a ∂p.toMeasure = ∑ a : α, (p a).toReal • f a


/-- `ZMod n` is reduced iff `n` is square-free (or `n=0`). -/
@[simp]
theorem isReduced_zmod {n : ℕ} : IsReduced (ZMod n) ↔ Squarefree n ∨ n = 0


@[simp]
theorem toRegular_coe (a : Regular α) : toRegular (a : α) = a

{α : Type u_1}
[HeytingAlgebra α]
(a : Heyting.Regular α)


@[simp]
theorem fract_add_one (a : α) : fract (a + 1) = fract a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


/-- The first theorem that characterises the function `reduce`: a word reduces to its maximal
  reduction. -/
@[to_additive "The first theorem that characterises the function `reduce`: a word reduces to its
  maximal reduction."]
theorem reduce.red : Red L (reduce L)

{α : Type u}
{L : List (α × Bool)}
[DecidableEq α]


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the top morphism of `sq`
to the bottom morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor' : Square C ⥤ Arrow (Arrow C)

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

(CategoryTheory.Square.toArrowArrowFunctor'.obj sq).right.right = sq.X₄


theorem Integrable.condKernel_ae {f : α × Ω → F} (hf_int : Integrable f ρ) :
    ∀ᵐ a ∂ρ.fst, Integrable (fun ω ↦ f (a, ω)) (ρ.condKernel a)

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

∀ᵐ (a : α) ∂ρ.fst, MeasureTheory.Integrable (fun ω => f (a, ω)) (ρ.condKernel a)


protected theorem ext_iff {R S : Sieve X} : R = S ↔ ∀ ⦃Y⦄ (f : Y ⟶ X), R f ↔ S f

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

R = S ↔ ∀ ⦃Y : C⦄ (f : Y ⟶ X), R.arrows f ↔ S.arrows f


theorem trinomial_mirror (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) (hw : w ≠ 0) :
    (trinomial k m n u v w).mirror = trinomial k (n - m + k) n w v u

{R : Type u_1}
[Semiring R]
{k m n : ℕ}
{u v w : R}
(hkm : k < m)
(hmn : m < n)
(hu : u ≠ 0)
(hw : w ≠ 0)

(Polynomial.trinomial k m n u v w).mirror = Polynomial.trinomial k (n - m + k) n w v u


theorem symm_trans_self (f : α ≃. β) : f.symm.trans f = ofSet { b | (f.symm b).isSome }

f.symm.trans f = PEquiv.ofSet {b | (f.symm b).isSome = true}


/-- The Riesz content can be approximated arbitrarily well by evaluating the positive linear
functional on test functions: for any `ε > 0`, there exists a bounded continuous nonnegative
function f on X such that `f ≥ 1` on K and such that `λ(K) ≤ Λ f < λ(K) + ε`. -/
theorem exists_lt_rieszContentAux_add_pos (K : Compacts X) {ε : ℝ≥0} (εpos : 0 < ε) :
    ∃ f : X →ᵇ ℝ≥0, (∀ x ∈ K, (1 : ℝ≥0) ≤ f x) ∧ Λ f < rieszContentAux Λ K + ε

{X : Type u_1}
[TopologicalSpace X]
(Λ : (X →ᵇ ℝ≥0) →ₗ[ℝ≥0] ℝ≥0)
(K : TopologicalSpace.Compacts X)
{ε : ℝ≥0}
(εpos : 0 < ε)

∃ f, (∀ x ∈ K, 1 ≤ f x) ∧ Λ f < rieszContentAux Λ K + ε


lemma edge_edgeSet_of_ne (h : s ≠ t) : (edge s t).edgeSet = {s(s, t)}

(SimpleGraph.edge s t).edgeSet = {s(s, t)}


lemma prod_sum_right {ι' : Type*} [Countable ι'] (m : Measure α) (m' : ι' → Measure β)
    [∀ n, SFinite (m' n)] :
    m.prod (Measure.sum m') = Measure.sum (fun p ↦ m.prod (m' p))

[∀ (n : ι'), MeasureTheory.SFinite (m' n)]

m.prod (MeasureTheory.Measure.sum m') = MeasureTheory.Measure.sum fun p => m.prod (m' p)


@[ext]
theorem ext {φ₁ φ₂ : A →ₗc[R] B} (H : ∀ x, φ₁ x = φ₂ x) : φ₁ = φ₂

{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]
{φ₁ φ₂ : A →ₗc[R] B}
(H : ∀ (x : A), φ₁ x = φ₂ x)


/-- The canonical map `Φ.op.RightResolution X₂ → Φ.LeftResolution X₂`. -/
@[simps]
def RightResolution.unop {X₂ : C₂ᵒᵖ} (L : Φ.op.RightResolution X₂) :
    Φ.LeftResolution X₂.unop

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


theorem SSameSide.trans_sOppSide {s : AffineSubspace R P} {x y z : P} (hxy : s.SSameSide x y)
    (hyz : s.SOppSide y z) : s.SOppSide x z

{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 y z : P}
(hxy : s.SSameSide x y)
(hyz : s.SOppSide y z)


/-- In a commutative Banach-algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`,
`exp 𝕂 (x+y) = (exp 𝕂 x) * (exp 𝕂 y)`. -/
theorem exp_add {x y : 𝔸} : exp 𝕂 (x + y) = exp 𝕂 x * exp 𝕂 y

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedCommRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
{x y : 𝔸}

NormedSpace.exp 𝕂 (x + y) = NormedSpace.exp 𝕂 x * NormedSpace.exp 𝕂 y


/-- The open set `ContinuousMap.setOfIdeal I` realized as a term of `opens X`. -/
@[simps]
def opensOfIdeal [T2Space R] (I : Ideal C(X, R)) : Opens X

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
[T2Space R]
(I : Ideal C(X, R))

↑(ContinuousMap.opensOfIdeal I) = ContinuousMap.setOfIdeal I


@[simp]
theorem ghostEquiv_coe : (ghostEquiv p R : 𝕎 R →+* ℕ → R) = ghostMap

(p : ℕ)
(R : Type u_1)
[hp : Fact (Nat.Prime p)]
[CommRing R]
[Invertible ↑p]

↑(WittVector.ghostEquiv p R) = WittVector.ghostMap


/-- The Bernstein polynomials are linearly independent.

We prove by induction that the collection of `bernsteinPolynomial n ν` for `ν = 0, ..., k`
are linearly independent.
The inductive step relies on the observation that the `(n-k)`-th derivative, evaluated at 1,
annihilates `bernsteinPolynomial n ν` for `ν < k`, but has a nonzero value at `ν = k`.
-/
theorem linearIndependent (n : ℕ) :
    LinearIndependent ℚ fun ν : Fin (n + 1) => bernsteinPolynomial ℚ n ν

LinearIndependent ℚ fun ν => bernsteinPolynomial ℚ n ↑ν


theorem hasLineDerivAt_smul_iff {c : 𝕜} (hc : c ≠ 0) :
    HasLineDerivAt 𝕜 f (c • f') x (c • v) ↔ HasLineDerivAt 𝕜 f f' x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{x v : E}
{f' : F}
{c : 𝕜}
(hc : c ≠ 0)


/-- If a function `f` with a densely ordered codomain is monotone on a left neighborhood of `a` and
the closure of the image of this neighborhood under `f` is a left neighborhood of `f a`, then `f` is
continuous at `a` from the left -/
theorem continuousWithinAt_left_of_monotoneOn_of_closure_image_mem_nhdsWithin [DenselyOrdered β]
    {f : α → β} {s : Set α} {a : α} (hf : MonotoneOn f s) (hs : s ∈ 𝓝[≤] a)
    (hfs : closure (f '' s) ∈ 𝓝[≤] f a) : ContinuousWithinAt f (Iic a) a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
[DenselyOrdered β]
{f : α → β}
{s : Set α}
{a : α}
(hf : MonotoneOn f s)
(hs : s ∈ 𝓝[≤] a)
(hfs : closure (f '' s) ∈ 𝓝[≤] f a)


{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]


lemma pred_succAbove (x : Fin n) (y : Fin (n + 1)) (h : y ≤ castSucc x)
    (h' := Fin.ne_zero_of_lt $ (lt_succAbove_iff_le_castSucc ..).2 h) :
    (y.succAbove x).pred h' = x

{n : ℕ}
(x : Fin n)
(y : Fin (n + 1))
(h : y ≤ x.castSucc)
(h' : y.succAbove x ≠ 0 := ⋯)


@[simp] theorem sign_mul_abs (x : α) : (sign x * |x| : α) = x

{α : Type u_1}
[LinearOrderedRing α]
(x : α)


theorem toNat_injOn : InjOn toNat (Iio ℵ₀)

Set.InjOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)


@[simp]
theorem hnot_hnot_hnot (a : α) : ￢￢￢a = ￢a

{α : Type u_2}
[CoheytingAlgebra α]
(a : α)


theorem iterate_eq_of_map_eq_add_int {x : ℝ} {m : ℤ} (h : f x = x + m) (n : ℕ) :
    f^[n] x = x + n * m

(f : CircleDeg1Lift)
{x : ℝ}
{m : ℤ}
(h : f x = x + ↑m)
(n : ℕ)


@[to_additive le_posPart] lemma le_oneLePart (a : α) : a ≤ a⁺ᵐ

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


/-- The minimal positive integer with absolute value smaller than 1 is a prime number.-/
lemma is_prime_of_minimal_nat_zero_lt_mulRingNorm_lt_one : p.Prime

(hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m)


/-- Construct an isomorphism from a homeomorphism. -/
@[simps hom inv]
def isoOfHomeo {X Y : Sequential.{u}} (f : X ≃ₜ Y) : X ≅ Y

{X Y : Sequential}
(f : ↑X.toTop ≃ₜ ↑Y.toTop)

(Sequential.isoOfHomeo f).hom = { toFun := ⇑f, continuous_toFun := ⋯ }


@[simp]
theorem cons_dotProduct (x : α) (v : Fin n → α) (w : Fin n.succ → α) :
    dotProduct (vecCons x v) w = x * vecHead w + dotProduct v (vecTail w)

{α : Type u}
{n : ℕ}
[AddCommMonoid α]
[Mul α]
(x : α)
(v : Fin n → α)
(w : Fin n.succ → α)

Matrix.dotProduct (Matrix.vecCons x v) w = x * Matrix.vecHead w + Matrix.dotProduct v (Matrix.vecTail w)


nonrec theorem HasDerivWithinAt.add_const (hf : HasDerivWithinAt f f' s x) (c : F) :
    HasDerivWithinAt (fun y => f y + c) f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}
(hf : HasDerivWithinAt f f' s x)
(c : F)


@[to_additive]
lemma pow_inj_mod {n m : ℕ} : x ^ n = x ^ m ↔ n % orderOf x = m % orderOf x

{G : Type u_1}
[LeftCancelMonoid G]
{x : G}
{n m : ℕ}


theorem isPiSystem_Iic_rat : IsPiSystem (⋃ a : ℚ, {Iic (a : ℝ)})


/--
Cones over `diagram U ⋙ F` are the same as a cones over the usual sheaf condition equalizer diagram.
-/
@[simps]
def coneEquiv :
    Limits.Cone ((diagram U).op ⋙ F) ≌
      Limits.Cone (SheafConditionEqualizerProducts.diagram F U)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)

(TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquiv F U).functor =
  TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor F U


@[simp]
theorem HasLimit.isoOfEquivalence_inv_π {F : J ⥤ C} [HasLimit F] {G : K ⥤ C} [HasLimit G]
    (e : J ≌ K) (w : e.functor ⋙ G ≅ F) (j : J) :
    (HasLimit.isoOfEquivalence e w).inv ≫ limit.π F j =
    limit.π G (e.functor.obj j) ≫ w.hom.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
{G : K ⥤ C}
[CategoryTheory.Limits.HasLimit G]
(e : J ≌ K)
(w : e.functor ⋙ G ≅ F)
(j : J)

(CategoryTheory.Limits.HasLimit.isoOfEquivalence e w).inv ≫ CategoryTheory.Limits.limit.π F j =
  CategoryTheory.Limits.limit.π G (e.functor.obj j) ≫ w.hom.app j


@[to_additive]
theorem map_mul_eq_one [MonoidHomClass F M N] (f : F) {a b : M} (h : a * b = 1) :
    f a * f b = 1

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[AddZeroClass M]
[AddZeroClass N]
[FunLike F M N]
[AddMonoidHomClass F M N]
(f : F)
{a b : M}
(h : a + b = 0)


@[simp] lemma exterior_subset_exterior : exterior s ⊆ exterior t ↔ 𝓝ˢ s ≤ 𝓝ˢ t

{α : Type u_3}
[TopologicalSpace α]
{s t : Set α}
[AlexandrovDiscrete α]


theorem LowerSemicontinuousAt.comp_continuousAt {f : α → β} {g : ι → α} {x : ι}
    (hf : LowerSemicontinuousAt f (g x)) (hg : ContinuousAt g x) :
    LowerSemicontinuousAt (fun x ↦ f (g x)) x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{ι : Type u_5}
[TopologicalSpace ι]
{f : α → β}
{g : ι → α}
{x : ι}
(hf : LowerSemicontinuousAt f (g x))
(hg : ContinuousAt g x)

LowerSemicontinuousAt (fun x => f (g x)) x


@[simps]
instance Endofunctor.coalgebraPreadditive : Preadditive (Endofunctor.Coalgebra F)

(A₁ A₂ : CategoryTheory.Endofunctor.Coalgebra F)

(α β : A₁ ⟶ A₂)


theorem linearIndependent_pair {x y : V} (hx : x ≠ 0) (hy : ∀ a : K, a • x ≠ y) :
    LinearIndependent K ((↑) : ({x, y} : Set V) → V)

{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{x y : V}
(hx : x ≠ 0)
(hy : ∀ (a : K), a • x ≠ y)

LinearIndependent (ι := { x_1 // x_1 ∈ {x, y} }) K Subtype.val


theorem strictAntiOn_natAbs : StrictAntiOn natAbs (Iic 0)


/-- The right unitor isomorphism for binary products with the terminal object. -/
@[simps]
def prod.rightUnitor (P : C) [HasBinaryProduct P (⊤_ C)] : P ⨯ ⊤_ C ≅ P

[CategoryTheory.Limits.HasBinaryProduct P (⊤_ C)]

(CategoryTheory.Limits.prod.rightUnitor P).hom = CategoryTheory.Limits.prod.fst


/-- Even if `s` is not measurable, we can bound `map f μ s` from below.
  See also `MeasurableEquiv.map_apply`. -/
theorem le_map_apply {f : α → β} (hf : AEMeasurable f μ) (s : Set β) : μ (f ⁻¹' s) ≤ μ.map f s

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f : α → β}
(hf : AEMeasurable f μ)
(s : Set β)

μ (f ⁻¹' s) ≤ (MeasureTheory.Measure.map f μ) s


theorem tendsto_of_monotone {ι α : Type*} [Preorder ι] [TopologicalSpace α]
    [ConditionallyCompleteLinearOrder α] [OrderTopology α] {f : ι → α} (h_mono : Monotone f) :
    Tendsto f atTop atTop ∨ ∃ l, Tendsto f atTop (𝓝 l)

{ι : Type u_3}
{α : Type u_4}
[Preorder ι]
[TopologicalSpace α]
[ConditionallyCompleteLinearOrder α]
[OrderTopology α]
{f : ι → α}
(h_mono : Monotone f)

Filter.Tendsto f Filter.atTop Filter.atTop ∨ ∃ l, Filter.Tendsto f Filter.atTop (𝓝 l)


theorem lt_add_left (n m : ℕ+) : n < m + n


@[simp] lemma sdiff_singleton_covBy (ha : a ∈ s) : s \ {a} ⋖ s

{α : Type u_1}
{s : Set α}
{a : α}
(ha : a ∈ s)


/-- The uncurrying of `F.flip` is isomorphic to
swapping the factors followed by the uncurrying of `F`. -/
@[simps!]
def uncurryObjFlip (F : C ⥤ D ⥤ E) : uncurry.obj F.flip ≅ Prod.swap _ _ ⋙ uncurry.obj F

(F : CategoryTheory.Functor C (CategoryTheory.Functor D E))

(CategoryTheory.uncurryObjFlip F).inv.app X = CategoryTheory.CategoryStruct.id ((F.obj X.2).obj X.1)


theorem filterMap_replicate_of_some {f : α → Option β} (h : f a = some b) :
    (replicate n a).filterMap f = replicate n b

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
{n : Nat}
{f : α → Option β}
(h : f a = some b)

List.filterMap f (List.replicate n a) = List.replicate n b


@[to_additive]
protected lemma div_div_cancel_left (h : IsUnit a) : a / b / a = b⁻¹

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


@[simp]
theorem sdiff_sdiff_self : (a \ b) \ a = ⊥

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b : α}


theorem lift_mk (f : α → γ) (h : ∀ a₁ a₂, r a₁ a₂ → f a₁ = f a₂) (a : α) :
    Quot.lift f h (Quot.mk r a) = f a

(h : ∀ (a₁ a₂ : α), r a₁ a₂ → f a₁ = f a₂)


theorem exists_sigma_iff {p : (Σi, α i) → Prop} :
    (∃ x ∈ s.sigma t, p x) ↔ ∃ i ∈ s, ∃ a ∈ t i, p ⟨i, a⟩

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{p : (i : ι) × α i → Prop}


theorem gauge_eq_zero (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
[TopologicalSpace E]
[T1Space E]
(hs : Absorbent ℝ s)
(hb : Bornology.IsVonNBounded ℝ s)


theorem isLUB_norm [Nonempty α] (f : lp E ∞) : IsLUB (Set.range fun i => ‖f i‖) ‖f‖

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


/-- The rank of a finite module is finite. -/
theorem rank_lt_aleph0 [Module.Finite R M] : Module.rank R M < ℵ₀

(R : Type u)
(M : Type v)
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]


@[to_additive]
theorem union_smul_inter_subset_union [DecidableEq α] : (s₁ ∪ s₂) • (t₁ ∩ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

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

s₁ ∪ s₂ +ᵥ t₁ ∩ t₂ ⊆ s₁ +ᵥ t₁ ∪ (s₂ +ᵥ t₂)


/-- The composition of two monoidal functors is again monoidal. -/
@[simps]
def comp : MonoidalFunctor.{v₁, v₃} C E

(F : CategoryTheory.MonoidalFunctor C D)

(G : CategoryTheory.MonoidalFunctor D E)

(F ⊗⋙ G).toLaxMonoidalFunctor = F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor


theorem dotProduct_assoc [NonUnitalSemiring α] (u : m → α) (w : n → α) (v : Matrix m n α) :
    (fun j => u ⬝ᵥ fun i => v i j) ⬝ᵥ w = u ⬝ᵥ fun i => v i ⬝ᵥ w

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Fintype m]
[Fintype n]
[NonUnitalSemiring α]
(u : m → α)
(w : n → α)
(v : Matrix m n α)