@[simp]
theorem eval₂_reverse_eq_zero_iff (i : R →+* S) (x : S) [Invertible x] (f : R[X]) :
    eval₂ i (⅟ x) (reverse f) = 0 ↔ eval₂ i x f = 0

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[CommSemiring S]
(i : R →+* S)
(x : S)
[Invertible x]
(f : Polynomial R)

Polynomial.eval₂ i (⅟x) f.reverse = 0 ↔ Polynomial.eval₂ i x f = 0


theorem mul_lt_of_lt_of_le_one' [PosMulMono α] [MulPosStrictMono α] (bc : b < c) (ha : a ≤ 1)
    (a0 : 0 < a) (c0 : 0 ≤ c) : b * a < c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
[MulPosStrictMono α]
(bc : b < c)
(ha : a ≤ 1)
(a0 : 0 < a)
(c0 : 0 ≤ c)


@[to_additive (attr := simp)] theorem snd_apply_inl (x : M) : snd (inl x : M ∗ N) = 1

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
(x : M)

Monoid.Coprod.snd (Monoid.Coprod.inl x) = 1


protected theorem le_of_eq {n m : Nat} (p : n = m) : n ≤ m


@[simp, norm_cast]
theorem coe_sum' {ι : Type*} (t : Finset ι) (f : ι → M₁ →SL[σ₁₂] M₂) :
    ⇑(∑ d ∈ t, f d) = ∑ d ∈ t, ⇑(f d)

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
[ContinuousAdd M₂]
{ι : Type u_9}
(t : Finset ι)
(f : ι → M₁ →SL[σ₁₂] M₂)


@[simp, norm_cast]
theorem coe_monomial (n : ℕ) (a : R) :
    (monomial n a : PowerSeries R) = PowerSeries.monomial R n a

{R : Type u_2}
[CommSemiring R]
(n : ℕ)
(a : R)

↑((Polynomial.monomial n) a) = (PowerSeries.monomial R n) a


/-- `autMap` is uniquely characterized by making the canonical diagram commute. -/
lemma autMap_unique {A B : C} [IsConnected A] [IsGalois B] (f : A ⟶ B) (σ : Aut A)
    (τ : Aut B) (h : f ≫ τ.hom = σ.hom ≫ f) :
    autMap f σ = τ

(h : CategoryTheory.CategoryStruct.comp f τ.hom = CategoryTheory.CategoryStruct.comp σ.hom f)

CategoryTheory.PreGaloisCategory.autMap f σ = τ


/-- If `C` is cofiltered, then we can give an explicit condition for a functor `F : C ⥤ D` to
    be final. The converse is also true, see `initial_iff_of_isCofiltered`. -/
theorem Functor.initial_of_exists_of_isCofiltered [IsCofilteredOrEmpty C]
    (h₁ : ∀ d, ∃ c, Nonempty (F.obj c ⟶ d)) (h₂ : ∀ {d : D} {c : C} (s s' : F.obj c ⟶ d),
      ∃ (c' : C) (t : c' ⟶ c), F.map t ≫ s = F.map t ≫ s') : Functor.Initial F

(h₁ : ∀ (d : D), ∃ c, Nonempty (F.obj c ⟶ d))

(h₂ :
  ∀ {d : D} {c : C} (s s' : F.obj c ⟶ d),
    ∃ c' t, CategoryTheory.CategoryStruct.comp (F.map t) s = CategoryTheory.CategoryStruct.comp (F.map t) s')


@[to_additive const_add]
theorem StrictMono.const_mul' (hf : StrictMono f) (c : α) : StrictMono fun x => c * f x

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


/-- If a monic irreducible polynomial over a field `F` of exponential characteristic `q` has
separable degree one, then it is of the form `X ^ (q ^ n) - C y` for some natural number `n`,
and some element `y` of `F`, such that either `n = 0` or `y` has no `q`-th root in `F`. -/
theorem eq_X_pow_char_pow_sub_C_of_natSepDegree_eq_one_of_irreducible (q : ℕ) [ExpChar F q]
    (hm : f.Monic) (hi : Irreducible f) (h : f.natSepDegree = 1) : ∃ (n : ℕ) (y : F),
      (n = 0 ∨ y ∉ (frobenius F q).range) ∧ f = X ^ q ^ n - C y

{F : Type u}
[Field F]
{f : F[X]}
(q : ℕ)
[ExpChar F q]
(hm : f.Monic)
(hi : Irreducible f)
(h : f.natSepDegree = 1)

∃ n y, (n = 0 ∨ y ∉ (frobenius F q).range) ∧ f = Polynomial.X ^ q ^ n - Polynomial.C y


theorem IsMinFilter.congr {α β : Type*} [Preorder β] {f g : α → β} {a : α} {l : Filter α}
    (h : IsMinFilter f l a) (heq : f =ᶠ[l] g) (hfga : f a = g a) : IsMinFilter g l a

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f g : α → β}
{a : α}
{l : Filter α}
(h : IsMinFilter f l a)
(heq : f =ᶠ[l] g)
(hfga : f a = g a)


/-- A `CFilter α σ` is a realization of a filter (base) on `α`,
  represented by a type `σ` together with operations for the top element and
  the binary `inf` operation. -/
structure CFilter (α σ : Type*) [PartialOrder α] where
  f : σ → α
  pt : σ
  inf : σ → σ → σ
  inf_le_left : ∀ a b : σ, f (inf a b) ≤ f a
  inf_le_right : ∀ a b : σ, f (inf a b) ≤ f b

{α : Type u_1}
{σ : Type u_2}
[PartialOrder α]
(self : CFilter α σ)
(a b : σ)


@[ext]
theorem ext {f f' : ContinuousMultilinearMap R M₁ M₂} (H : ∀ x, f x = f' x) : f = f'

(H : ∀ (x : (i : ι) → M₁ i), f x = f' x)


/-- The intersection of the subspace and the orthogonal subspace
through the given point is the `orthogonalProjectionFn` of that
point onto the subspace. This lemma is only intended for use in
setting up the bundled version and should not be used once that is
defined. -/
theorem inter_eq_singleton_orthogonalProjectionFn {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : P) :
    (s : Set P) ∩ mk' p s.directionᗮ = {orthogonalProjectionFn s p}

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

↑s ∩ ↑(AffineSubspace.mk' p s.directionᗮ) = {EuclideanGeometry.orthogonalProjectionFn s p}


/-- When `s.re > 1`, the map `n ↦ n^(-s)` is norm-summable. -/
lemma summable_riemannZetaSummand (hs : 1 < s.re) :
    Summable (fun n ↦ ‖riemannZetaSummandHom (ne_zero_of_one_lt_re hs) n‖)

Summable fun n => ‖(riemannZetaSummandHom ⋯) n‖


theorem Hom.cast_eq_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟶ v) (e' : u' ⟶ v') :
    e.cast hu hv = e' ↔ HEq e e'

{U : Type u_1}
[Quiver U]
{u v u' v' : U}
(hu : u = u')
(hv : v = v')
(e : u ⟶ v)
(e' : u' ⟶ v')


@[simp]
theorem adjMatrix_dotProduct [NonAssocSemiring α] (v : V) (vec : V → α) :
    dotProduct (G.adjMatrix α v) vec = ∑ u ∈ G.neighborFinset v, vec u

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
(v : V)
(vec : V → α)

SimpleGraph.adjMatrix α G v ⬝ᵥ vec = ∑ u ∈ G.neighborFinset v, vec u


theorem _root_.integral_inner {f : α → E} (hf : Integrable f μ) (c : E) :
    ∫ x, ⟪c, f x⟫ ∂μ = ⟪c, ∫ x, f x ∂μ⟫

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_2}
{𝕜 : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
[NormedSpace ℝ E]
{f : α → E}
(hf : MeasureTheory.Integrable f μ)
(c : E)

∫ (x : α), ⟪c, f x⟫_𝕜 ∂μ = ⟪c, ∫ (x : α), f x ∂μ⟫_𝕜


/-- The abelian coimage in a functor category can be calculated componentwise. -/
@[simps!]
def coimageObjIso : (Abelian.coimage α).obj X ≅ Abelian.coimage (α.app X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type w}
[CategoryTheory.Category.{z, w} D]
[CategoryTheory.Abelian D]
{F G : CategoryTheory.Functor C D}
(α : F ⟶ G)
(X : C)

(CategoryTheory.Abelian.FunctorCategory.coimageObjIso α X).inv =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.cokernel.map (CategoryTheory.Limits.kernel.ι (α.app X))
      ((CategoryTheory.Limits.kernel.ι α).app X)
      (CategoryTheory.Limits.PreservesKernel.iso ((CategoryTheory.evaluation C D).obj X) α).inv
      (CategoryTheory.CategoryStruct.id (F.obj X)) ⋯)
    (CategoryTheory.Limits.cokernelComparison (CategoryTheory.Limits.kernel.ι α)
      ((CategoryTheory.evaluation C D).obj X))


@[simp]
theorem coe_toStepOfLE (m n : ℕ) (h : m ≤ n) :
    (toStepOfLE k m n h : Step k m → Step k n) = Nat.leRecOn h @fun n => toStepSucc k n

(k : Type u)
[Field k]
(m n : ℕ)
(h : m ≤ n)

⇑(AlgebraicClosure.toStepOfLE k m n h) = fun a => Nat.leRecOn h (fun n => ⇑(AlgebraicClosure.toStepSucc k n)) a


/-- A two-argument function applied to two `dite`s is a `dite` of that two-argument function
applied to each of the branches. -/
theorem apply_dite₂ {α β γ : Sort*} (f : α → β → γ) (P : Prop) [Decidable P]
    (a : P → α) (b : ¬P → α) (c : P → β) (d : ¬P → β) :
    f (dite P a b) (dite P c d) = dite P (fun h ↦ f (a h) (c h)) fun h ↦ f (b h) (d h)

{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
(f : α → β → γ)
(P : Prop)
[Decidable P]
(a : P → α)
(b : ¬P → α)
(c : P → β)
(d : ¬P → β)

f (dite P a b) (dite P c d) = if h : P then f (a h) (c h) else f (b h) (d h)


/-- `pure : α → Ultrafilter α` defines a dense embedding of `α` in `Ultrafilter α`. -/
theorem denseEmbedding_pure : @DenseEmbedding _ _ ⊥ _ (pure : α → Ultrafilter α)


@[to_additive]
theorem smul_univ_pi [∀ i, SMul K (R i)] (r : K) (t : ∀ i, Set (R i)) :
    r • pi (univ : Set ι) t = pi (univ : Set ι) (r • t)

{K : Type u_1}
{ι : Type u_2}
{R : ι → Type u_3}
[(i : ι) → VAdd K (R i)]
(r : K)
(t : (i : ι) → Set (R i))

r +ᵥ Set.univ.pi t = Set.univ.pi (r +ᵥ t)


theorem isOpen_iff_ultrafilter' [CompactSpace X] (U : Set X) :
    IsOpen U ↔ ∀ F : Ultrafilter X, F.lim ∈ U → U ∈ F.1

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
[CompactSpace X]
(U : Set X)

IsOpen U ↔ ∀ (F : Ultrafilter X), F.lim ∈ U → U ∈ ↑F


@[deprecated div_mem_center (since := "2024-06-17")]
theorem div_mem_center₀ (ha : a ∈ Set.center G₀) (hb : b ∈ Set.center G₀) : a / b ∈ Set.center G₀

{G₀ : Type u_2}
[GroupWithZero G₀]
{a b : G₀}
(ha : a ∈ Set.center G₀)
(hb : b ∈ Set.center G₀)


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

(F : CategoryTheory.LaxMonoidalFunctor C D)

(G : CategoryTheory.LaxMonoidalFunctor D E)

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


theorem add_one (n : PosNum) : n + 1 = succ n


/-- Initial functors preserve cofilteredness.

This can be seen as a generalization of `IsCofiltered.of_left_adjoint` (which states that left
adjoints preserve cofilteredness), as right adjoints are always initial, see `intial_of_adjunction`.
-/
theorem IsCofilteredOrEmpty.of_initial (F : C ⥤ D) [Initial F] [IsCofilteredOrEmpty C] :
    IsCofilteredOrEmpty D

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


/-- A uniform space with the discrete uniformity has the discrete topology. -/
theorem discreteTopology_of_discrete_uniformity [hα : UniformSpace α] (h : uniformity α = 𝓟 idRel) :
    DiscreteTopology α

{α : Type ua}
[hα : UniformSpace α]
(h : 𝓤 α = 𝓟 idRel)


@[simp]
theorem units_ne_neg_self (u : Rˣ) : u ≠ -u

{R : Type u_1}
[Ring R]
[CharZero R]
(u : Rˣ)


/-- The carrier of `H ⊔ N` is just `↑H * ↑N` (pointwise set product) when `N` is normal. -/
@[to_additive "The carrier of `H ⊔ N` is just `↑H + ↑N` (pointwise set addition)
when `N` is normal."]
theorem mul_normal (H N : Subgroup G) [hN : N.Normal] : (↑(H ⊔ N) : Set G) = H * N

{G : Type u_2}
[AddGroup G]
(H N : AddSubgroup G)
[hN : N.Normal]


theorem WF.modify {t : RBNode α}
    (H : (t.zoom cut).1.OnRoot fun x => cmpEq cmp (f x) x)
    (h : WF cmp t) : WF cmp (t.modify cut f)

(H : Batteries.RBNode.OnRoot (fun x => Batteries.RBNode.cmpEq cmp (f x) x) (Batteries.RBNode.zoom cut t).fst)

Batteries.RBNode.WF cmp (Batteries.RBNode.modify cut f t)


theorem Rat.normalize.reduced {num : Int} {den g : Nat} (den_nz : den ≠ 0)
    (e : g = num.natAbs.gcd den) : (num.div g).natAbs.Coprime (den / g)


@[simp] lemma comap_comap {G : SimpleGraph X} (f : V → W) (g : W → X) :
  (G.comap g).comap f = G.comap (g ∘ f)

{V : Type u_1}
{W : Type u_2}
{X : Type u_3}
{G : SimpleGraph X}
(f : V → W)
(g : W → X)

SimpleGraph.comap f (SimpleGraph.comap g G) = SimpleGraph.comap (g ∘ f) G


/-- Homotopy between morphisms of short complexes is compatible with postcomposition. -/
@[simps]
def compRight (h : Homotopy φ₁ φ₂) (ψ : S₂ ⟶ S₃) : Homotopy (φ₁ ≫ ψ) (φ₂ ≫ ψ)

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

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(h.compRight ψ).h₃ = CategoryTheory.CategoryStruct.comp h.h₃ ψ.τ₃


@[reassoc (attr := simp)]
theorem imageSubobjectCompIso_hom_arrow (f : X ⟶ Y) [HasImage f] {Y' : C} (h : Y ⟶ Y') [IsIso h] :
    (imageSubobjectCompIso f h).hom ≫ (imageSubobject f).arrow =
      (imageSubobject (f ≫ h)).arrow ≫ inv h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
[CategoryTheory.Limits.HasEqualizers C]
(f : X ⟶ Y)
[CategoryTheory.Limits.HasImage f]
{Y' : C}
(h : Y ⟶ Y')
[CategoryTheory.IsIso h]

(CategoryTheory.Limits.imageSubobjectCompIso f h).hom ≫ (CategoryTheory.Limits.imageSubobject f).arrow =
  (CategoryTheory.Limits.imageSubobject (f ≫ h)).arrow ≫ CategoryTheory.inv h


theorem addHaar_image_le_lintegral_abs_det_fderiv (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) :
    μ (f '' s) ≤ ∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ

μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |(f' x).det| ∂μ


@[reassoc (attr := simp)]
lemma RightHomologyData.homologyIso_hom_comp_rightHomologyIso_inv (h : S.RightHomologyData) :
    h.homologyIso.hom ≫ h.rightHomologyIso.inv = S.rightHomologyIso.inv

CategoryTheory.CategoryStruct.comp h.homologyIso.hom h.rightHomologyIso.inv = S.rightHomologyIso.inv


@[simp] theorem max_some_some [Max α] {a b : α} : max (some a) (some b) = some (max a b)


theorem diam_union' {t : Set α} (h : (s ∩ t).Nonempty) : diam (s ∪ t) ≤ diam s + diam t

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}
(h : (s ∩ t).Nonempty)

EMetric.diam (s ∪ t) ≤ EMetric.diam s + EMetric.diam t


/-- If `F.leftOp : Jᵒᵖ ⥤ C` has a limit, we can construct a colimit for `F : J ⥤ Cᵒᵖ`.
-/
theorem hasColimit_of_hasLimit_leftOp (F : J ⥤ Cᵒᵖ) [HasLimit F.leftOp] : HasColimit F


/-- The cokernel morphism of an epimorphism is a zero morphism -/
theorem cokernel.π_of_epi [HasCokernel f] [Epi f] : cokernel.π f = 0


@[simp]
theorem top_toNonUnitalSubsemiring : (⊤ : NonUnitalSubalgebra R A).toNonUnitalSubsemiring = ⊤

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


@[simp]
lemma basicOpen_eq_bot_of_isNilpotent (X : LocallyRingedSpace.{u}) (U : Opens X.carrier)
    (f : (X.presheaf.obj <| op U)) (hf : IsNilpotent f) :
    X.toRingedSpace.basicOpen f = ⊥

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


theorem mem_sup_left {S T : Ideal R} : ∀ {x : R}, x ∈ S → x ∈ S ⊔ T

{R : Type u}
[Semiring R]
{S T : Ideal R}
{x : R}


@[simp, norm_cast]
theorem coe_add (x y : ℝ) : (↑(x + y) : EReal) = x + y


@[simp, norm_cast]
theorem coe_add (m m' : N) : (↑(m + m') : M) = (m : M) + (m' : M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N : LieSubmodule R L M)
(m m' : ↥N)


/-- The product of a strictly monotone function and a monotone function is strictly monotone. -/
@[to_additive add_monotone "The sum of a strictly monotone function and a monotone function is
strictly monotone."]
theorem StrictMonoOn.mul_monotone' (hf : StrictMonoOn f s) (hg : MonotoneOn g s) :
    StrictMonoOn (fun x => f x * g x) s

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

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


@[simp]
theorem algebraMap_def : ⇑(algebraMap R ℍ[R]) = coe


@[simp]
theorem preimage_coe_Ioo_top : (some : α → WithTop α) ⁻¹' Ioo a ⊤ = Ioi a

WithTop.some ⁻¹' Set.Ioo ↑a ⊤ = Set.Ioi a


@[to_additive (attr := simp)]
theorem mul_inv_cancel_left (a b : G) : a * (a⁻¹ * b) = b


/-- A category "has a zero object" if it has an object which is both initial and terminal. -/
class HasZeroObject : Prop where
  /-- there exists a zero object -/
  zero : ∃ X : C, IsZero X

[self : CategoryTheory.Limits.HasZeroObject C]


theorem fourierCoeff_bernoulli_eq {k : ℕ} (hk : k ≠ 0) (n : ℤ) :
    fourierCoeff ((↑) ∘ periodizedBernoulli k : 𝕌 → ℂ) n = -k ! / (2 * π * I * n) ^ k

fourierCoeff (Complex.ofReal' ∘ periodizedBernoulli k) n = -↑k ! / (2 * ↑π * Complex.I * ↑n) ^ k


theorem comp_assoc {L3 : Language} (F : L'' →ᴸ L3) (G : L' →ᴸ L'') (H : L →ᴸ L') :
    F ∘ᴸ G ∘ᴸ H = F ∘ᴸ (G ∘ᴸ H)

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{L'' : FirstOrder.Language}
{L3 : FirstOrder.Language}
(F : L'' →ᴸ L3)
(G : L' →ᴸ L'')
(H : L →ᴸ L')


@[simp]
theorem dual_pure (a : α) : dual (pure a) = pure (toDual a)

Interval.dual (Interval.pure a) = Interval.pure (OrderDual.toDual a)


theorem coeff_zero_one : coeff R (0 : σ →₀ ℕ) 1 = 1

{σ : Type u_1}
{R : Type u_2}
[Semiring R]


@[simp]
theorem quot_mul (x y) :
    (by exact Quot.mk Setoid.r (mul x y) : ColimitType F) =
      (by exact Quot.mk _ x) * (by exact Quot.mk _ y)

(x y : CommRingCat.Colimits.Prequotient F)

Quot.mk Setoid.r (x.mul y) = Quot.mk Setoid.r x * Quot.mk Setoid.r y


theorem Not.intro {a : Prop} (h : a → False) : ¬a


theorem order_separated [OrderTopology α] {a₁ a₂ : α} (h : a₁ < a₂) :
    ∃ u v : Set α, IsOpen u ∧ IsOpen v ∧ a₁ ∈ u ∧ a₂ ∈ v ∧ ∀ b₁ ∈ u, ∀ b₂ ∈ v, b₁ < b₂

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a₁ a₂ : α}
(h : a₁ < a₂)

∃ u v, IsOpen u ∧ IsOpen v ∧ a₁ ∈ u ∧ a₂ ∈ v ∧ ∀ b₁ ∈ u, ∀ b₂ ∈ v, b₁ < b₂


theorem isEmpty_fun : IsEmpty (α → β) ↔ Nonempty α ∧ IsEmpty β


theorem op_iSup (S : ι → Subalgebra R A) : (iSup S).op = ⨆ i, (S i).op

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


theorem card_Icc :
    (Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i)

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

(Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s)


@[simp]
theorem lift_includeLeft_includeRight :
    lift includeLeft includeRight (fun a b => (Commute.one_right _).tmul (Commute.one_left _)) =
      .id S (A ⊗[R] B)

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]

Algebra.TensorProduct.lift Algebra.TensorProduct.includeLeft Algebra.TensorProduct.includeRight ⋯ =
  AlgHom.id S (A ⊗[R] B)


lemma finite_weightSpaceOf_ne_bot [NoZeroSMulDivisors R M] [IsNoetherian R M] (x : L) :
    {χ : R | weightSpaceOf M χ x ≠ ⊥}.Finite

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

{χ | LieModule.weightSpaceOf M χ x ≠ ⊥}.Finite


theorem tan_two_mul {x : ℝ} : tan (2 * x) = 2 * tan x / (1 - tan x ^ 2)

Real.tan (2 * x) = 2 * Real.tan x / (1 - Real.tan x ^ 2)


@[simp]
theorem sub_apply (Q Q' : QuadraticMap R M N) (x : M) : (Q - Q') x = Q x - Q' x

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


theorem nodup_permutations (s : List α) (hs : Nodup s) : Nodup s.permutations

{α : Type u_1}
(s : List α)
(hs : s.Nodup)


lemma Triangle.eqToHom_hom₂ {A B : Triangle C} (h : A = B) :
    (eqToHom h).hom₂ = eqToHom (by subst h; rfl)

{A B : CategoryTheory.Pretriangulated.Triangle C}

(CategoryTheory.eqToHom h).hom₂ = CategoryTheory.eqToHom ⋯


lemma indicator_smul_const (s : Set α) (r : α → R) (m : M) :
    indicator s (r · • m) = (indicator s r · • m)

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero R]
[Zero M]
[SMulWithZero R M]
(s : Set α)
(r : α → R)
(m : M)

(s.indicator fun x => r x • m) = fun x => s.indicator r x • m


@[fun_prop]
protected theorem DifferentiableAt.iterate {f : E → E} (hf : DifferentiableAt 𝕜 f x) (hx : f x = x)
    (n : ℕ) : DifferentiableAt 𝕜 f^[n] x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{f : E → E}
(hf : DifferentiableAt 𝕜 f x)
(hx : f x = x)
(n : ℕ)


@[simp]
theorem divp_one (a : α) : a /ₚ 1 = a


theorem _root_.measurableEmbedding_mulRight₀ {g : G₀} (hg : g ≠ 0) :
    MeasurableEmbedding fun x => x * g

{G₀ : Type u_2}
[MeasurableSpace G₀]
[GroupWithZero G₀]
[MeasurableMul G₀]
{g : G₀}
(hg : g ≠ 0)


theorem IsIntegral.tmul (x : A) {y : B} (h : IsIntegral R y) : IsIntegral A (x ⊗ₜ[R] y)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[CommRing A]
[Ring B]
[Algebra R A]
[Algebra R B]
(x : A)
{y : B}
(h : IsIntegral R y)


lemma isIntegralCurveOn_comp_add {dt : ℝ} :
    IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ (· + dt)) v { t | t + dt ∈ s }

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{s : Set ℝ}
{dt : ℝ}

IsIntegralCurveOn γ v s ↔ IsIntegralCurveOn (γ ∘ fun x => x + dt) v {t | t + dt ∈ s}


theorem mul_left_mem_nonZeroDivisors_eq_zero_iff {r x : M₁} (hr : r ∈ M₁⁰) : r * x = 0 ↔ x = 0

{M₁ : Type u_4}
[CommMonoidWithZero M₁]
{r x : M₁}
(hr : r ∈ M₁⁰)


@[simp] theorem count_false (n : ℕ) : count (fun _ ↦ False) n = 0


@[elab_as_elim]
theorem right_induction {P : CliffordAlgebra Q → Prop} (algebraMap : ∀ r : R, P (algebraMap _ _ r))
    (add : ∀ x y, P x → P y → P (x + y)) (mul_ι : ∀ m x, P x → P (x * ι Q m)) : ∀ x, P x

(algebraMap : ∀ (r : R), P ((algebraMap R (CliffordAlgebra Q)) r))

(add : ∀ (x y : CliffordAlgebra Q), P x → P y → P (x + y))

(mul_ι : ∀ (m : M) (x : CliffordAlgebra Q), P x → P (x * (CliffordAlgebra.ι Q) m))


theorem coe_lcm (i j : ℤ) : ↑(Int.lcm i j) = GCDMonoid.lcm i j


@[simp]
theorem map_zero [Nonempty ι] : f 0 = 0

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
(f : M [⋀^ι]→ₗ[R] N)
[Nonempty ι]


/-- **Bernoulli's inequality** reformulated to estimate `a^n`. -/
lemma one_add_mul_sub_le_pow (H : -1 ≤ a) (n : ℕ) : 1 + n * (a - 1) ≤ a ^ n

{R : Type u_1}
[LinearOrderedRing R]
{a : R}
(H : -1 ≤ a)
(n : ℕ)


protected theorem isIrrefl (h : WellFounded r) : IsIrrefl α r

{α : Type u_1}
{r : α → α → Prop}
(h : WellFounded r)


@[reassoc]
lemma leftHomologyIso_inv_naturality :
    S₁.leftHomologyIso.inv ≫ leftHomologyMap φ =
      homologyMap φ ≫ S₂.leftHomologyIso.inv

CategoryTheory.CategoryStruct.comp S₁.leftHomologyIso.inv (CategoryTheory.ShortComplex.leftHomologyMap φ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ) S₂.leftHomologyIso.inv


@[measurability]
theorem Measurable.inf' (hf : Measurable f) (hg : Measurable g) : Measurable (f ⊓ g)

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{f g : α → M}
[Inf M]
[MeasurableInf₂ M]
(hf : Measurable f)
(hg : Measurable g)


theorem infDist_smul₀ {c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) :
    Metric.infDist (c • x) (c • s) = ‖c‖ * Metric.infDist x s

{𝕜 : Type u_1}
{E : Type u_2}
[NormedDivisionRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
{c : 𝕜}
(hc : c ≠ 0)
(s : Set E)
(x : E)


theorem isVonNBounded_biUnion {ι : Type*} {I : Set ι} (hI : I.Finite) {s : ι → Set E} :
    IsVonNBounded 𝕜 (⋃ i ∈ I, s i) ↔ ∀ i ∈ I, IsVonNBounded 𝕜 (s i)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[Zero E]
[TopologicalSpace E]
{ι : Type u_7}
{I : Set ι}
(hI : I.Finite)
{s : ι → Set E}

Bornology.IsVonNBounded 𝕜 (⋃ i ∈ I, s i) ↔ ∀ i ∈ I, Bornology.IsVonNBounded 𝕜 (s i)


theorem sum_pow_char_pow {ι : Type*} (s : Finset ι) (f : ι → R) :
    (∑ i ∈ s, f i) ^ p ^ n = ∑ i ∈ s, f i ^ p ^ n

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
(n : ℕ)
{ι : Type u_2}
(s : Finset ι)
(f : ι → R)


@[to_additive addIndex_empty]
theorem index_empty {V : Set G} : index ∅ V = 0

MeasureTheory.Measure.haar.addIndex ∅ V = 0


@[simp]
theorem head_val' (B : Fin m.succ → n' → α) (j : n') : (vecHead fun i => B i j) = vecHead B j

{α : Type u}
{m : ℕ}
{n' : Type uₙ}
(B : Fin m.succ → n' → α)
(j : n')

(Matrix.vecHead fun i => B i j) = Matrix.vecHead B j


@[to_additive]
lemma Antivary.mul_left (h₁ : Antivary f₁ g) (h₂ : Antivary f₂ g) : Antivary (f₁ * f₂) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommGroup β]
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : Antivary f₁ g)
(h₂ : Antivary f₂ g)


theorem aemeasurable_const_smul_iff₀ {c : G₀} (hc : c ≠ 0) :
    AEMeasurable (fun x => c • f x) μ ↔ AEMeasurable f μ

{β : Type u_3}
{α : Type u_4}
[MeasurableSpace β]
[MeasurableSpace α]
{f : α → β}
{μ : MeasureTheory.Measure α}
{G₀ : Type u_6}
[GroupWithZero G₀]
[MeasurableSpace G₀]
[MulAction G₀ β]
[MeasurableSMul G₀ β]
{c : G₀}
(hc : c ≠ 0)


theorem AntitoneOn.convex_le (hf : AntitoneOn f s) (hs : Convex 𝕜 s) (r : β) :
    Convex 𝕜 ({ x ∈ s | f x ≤ r })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{s : Set E}
{f : E → β}
(hf : AntitoneOn f s)
(hs : Convex 𝕜 s)
(r : β)


theorem subset_def {l₁ l₂ : Lists' α true} : l₁ ⊆ l₂ ↔ ∀ a ∈ l₁.toList, a ∈ l₂


theorem single_multiset_sum [AddCommMonoid M] (s : Multiset M) (a : α) :
    single a s.sum = (s.map (single a)).sum

{α : Type u_1}
{M : Type u_8}
[AddCommMonoid M]
(s : Multiset M)
(a : α)

Finsupp.single a s.sum = (Multiset.map (Finsupp.single a) s).sum


/-- The algebra version of `AddMonoidAlgebra.addMonoidAlgebraEquivDirectSum`. -/
@[simps (config := .asFn)]
def addMonoidAlgebraAlgEquivDirectSum [DecidableEq ι] [AddMonoid ι] [CommSemiring R] [Semiring A]
    [Algebra R A] [∀ m : A, Decidable (m ≠ 0)] : AddMonoidAlgebra A ι ≃ₐ[R] ⨁ _ : ι, A

{ι : Type u_1}
{R : Type u_2}
{A : Type u_4}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
[Semiring A]
[Algebra R A]
[(m : A) → Decidable (m ≠ 0)]


@[simp]
theorem trans_refl (e : P₁ ≃ᵃ[k] P₂) : e.trans (refl k P₂) = e

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(e : P₁ ≃ᵃ[k] P₂)


/-- The `p`-adic norm of `1` is `1`. -/
-- @[simp] -- Porting note (#10618): simp can prove this
protected theorem one : padicNorm p 1 = 1


@[simp]
theorem ofAntisymmetrization_le_ofAntisymmetrization_iff {a b : Antisymmetrization α (· ≤ ·)} :
    ofAntisymmetrization (· ≤ ·) a ≤ ofAntisymmetrization (· ≤ ·) b ↔ a ≤ b

{a b : Antisymmetrization α fun x x_1 => x ≤ x_1}

ofAntisymmetrization (fun x x_1 => x ≤ x_1) a ≤ ofAntisymmetrization (fun x x_1 => x ≤ x_1) b ↔ a ≤ b


@[simp]
theorem NatTrans.rightDerived_id (F : C ⥤ D) [F.Additive] (n : ℕ) :
    NatTrans.rightDerived (𝟙 F) n = 𝟙 (F.rightDerived n)

CategoryTheory.NatTrans.rightDerived (CategoryTheory.CategoryStruct.id F) n =
  CategoryTheory.CategoryStruct.id (F.rightDerived n)


@[symm]
protected theorem Equiv.symm {x y : PGame} : (x ≈ y) → (y ≈ x)


/-- `Equiv.sumComm` promoted to an order isomorphism. -/
@[simps! apply]
def sumComm (α β : Type*) [LE α] [LE β] : α ⊕ β ≃o β ⊕ α

(α : Type u_5)
(β : Type u_6)
[LE α]
[LE β]

∀ (a : α ⊕ β), (OrderIso.sumComm α β) a = a.swap


theorem nndist_of_im_eq {z w : ℂ} (h : z.im = w.im) : nndist z w = nndist z.re w.re


theorem Embedding.continuousOn_iff {f : α → β} {g : β → γ} (hg : Embedding g) {s : Set α} :
    ContinuousOn f s ↔ ContinuousOn (g ∘ f) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : α → β}
{g : β → γ}
(hg : Embedding g)
{s : Set α}


@[simp]
theorem map_comp_ofLE (cond : LEComap f A B) (h : A' ≤ A) :
    map f cond ∘ ofLE h = map f (cond.mono h le_rfl)

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
{A A' : DiscreteQuotient X}
{B : DiscreteQuotient Y}
(cond : DiscreteQuotient.LEComap f A B)
(h : A' ≤ A)

DiscreteQuotient.map f cond ∘ DiscreteQuotient.ofLE h = DiscreteQuotient.map f ⋯


@[simp]
theorem aleph0_le_lift {c : Cardinal.{u}} : ℵ₀ ≤ lift.{v} c ↔ ℵ₀ ≤ c

Cardinal.aleph0 ≤ Cardinal.lift.{v, u} c ↔ Cardinal.aleph0 ≤ c


lemma Algebra.algebraMap_intNorm (x : B) :
    algebraMap A K (Algebra.intNorm A B x) = Algebra.norm K (algebraMap B L x)

[Algebra.IsSeparable (FractionRing A) (FractionRing B)]

(algebraMap A K) ((Algebra.intNorm A B) x) = (Algebra.norm K) ((algebraMap B L) x)


theorem primitive_element_iff_algHom_eq_of_eval (α : E)
    (φ : E →ₐ[F] A) : F⟮α⟯ = ⊤ ↔ ∀ ψ : E →ₐ[F] A, φ α = ψ α → φ = ψ

(hA : ∀ (x : E), Polynomial.Splits (algebraMap F A) (minpoly F x))

F⟮α⟯ = ⊤ ↔ ∀ (ψ : E →ₐ[F] A), φ α = ψ α → φ = ψ


@[fun_prop]
theorem DifferentiableWithinAt.mul_const (ha : DifferentiableWithinAt 𝕜 a s x) (b : 𝔸) :
    DifferentiableWithinAt 𝕜 (fun y => a y * b) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a : E → 𝔸}
(ha : DifferentiableWithinAt 𝕜 a s x)
(b : 𝔸)


theorem sup_eq_sdiff_sup_sdiff_sup_inf : x ⊔ y = x \ y ⊔ y \ x ⊔ x ⊓ y

{α : Type u}
{x y : α}
[GeneralizedBooleanAlgebra α]


@[simp]
theorem preimage_Ioo (e : α ≃o β) (a b : β) : e ⁻¹' Ioo a b = Ioo (e.symm a) (e.symm b)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(a b : β)

⇑e ⁻¹' Set.Ioo a b = Set.Ioo (e.symm a) (e.symm b)


/-- There exists only one solution of an ODE \(\dot x=v(t, x)\) with
a given initial value provided that the RHS is Lipschitz continuous in `x`. -/
theorem ODE_solution_unique
    (hv : ∀ t, LipschitzWith K (v t))
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ t ∈ Ico a b, HasDerivWithinAt f (v t (f t)) (Ici t) t)
    (hg : ContinuousOn g (Icc a b))
    (hg' : ∀ t ∈ Ico a b, HasDerivWithinAt g (v t (g t)) (Ici t) t)
    (ha : f a = g a) :
    EqOn f g (Icc a b)

(hf' : ∀ t ∈ Set.Ico a b, HasDerivWithinAt f (v t (f t)) (Set.Ici t) t)

(hg' : ∀ t ∈ Set.Ico a b, HasDerivWithinAt g (v t (g t)) (Set.Ici t) t)


@[simp]
lemma mk_comp_mkInv [HasSmallLocalizedHom.{w} W X Y] [HasSmallLocalizedHom.{w} W Y X]
    [HasSmallLocalizedHom.{w} W Y Y] (f : Y ⟶ X) (hf : W f) :
    (mk W f).comp (mkInv f hf) = mk W (𝟙 Y)

[CategoryTheory.Localization.HasSmallLocalizedHom W X Y]

[CategoryTheory.Localization.HasSmallLocalizedHom W Y X]

[CategoryTheory.Localization.HasSmallLocalizedHom W Y Y]

(CategoryTheory.Localization.SmallHom.mk W f).comp (CategoryTheory.Localization.SmallHom.mkInv f hf) =
  CategoryTheory.Localization.SmallHom.mk W (CategoryTheory.CategoryStruct.id Y)


@[reassoc (attr := simp)]
theorem Cofork.IsColimit.π_desc {s t : Cofork f g} (hs : IsColimit s) : s.π ≫ hs.desc t = t.π

{s t : CategoryTheory.Limits.Cofork f g}

(hs : CategoryTheory.Limits.IsColimit s)

CategoryTheory.CategoryStruct.comp s.π (hs.desc t) = t.π


theorem mem_ker_iff {c d : C} (f : c ⟶ d) :
    f ∈ (ker φ).arrows c d ↔ ∃ h : φ.obj c = φ.obj d, φ.map f = eqToHom h

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
{c d : C}
(f : c ⟶ d)

f ∈ (CategoryTheory.Subgroupoid.ker φ).arrows c d ↔ ∃ (h : φ.obj c = φ.obj d), φ.map f = CategoryTheory.eqToHom h


@[simp]
lemma map₁_snd {G : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v} (η : F ⟶ G)
    (p : YonedaCollection F X) : (YonedaCollection.map₁ η p).snd =
      G.map (eqToHom (by rw [YonedaCollection.map₁_fst])) (η.app _ p.snd)

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

{F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

{G : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

(p : CategoryTheory.OverPresheafAux.YonedaCollection F X)

(CategoryTheory.OverPresheafAux.YonedaCollection.map₁ η p).snd =
  G.map (CategoryTheory.eqToHom ⋯) (η.app (Opposite.op (CategoryTheory.CostructuredArrow.mk p.fst)) p.snd)


theorem hom_f_injective {C₁ C₂ : HomologicalComplex V c} :
    Function.Injective fun f : Hom C₁ C₂ => f.f


@[to_additive]
theorem op_sInf (S : Set (Submonoid M)) : (sInf S).op = sInf (.unop ⁻¹' S)

{M : Type u_2}
[MulOneClass M]
(S : Set (Submonoid M))

(sInf S).op = sInf (Submonoid.unop ⁻¹' S)


theorem subtype_Iic_eq : Iic a = (Iic (a : α)).subtype p

{α : Type u_1}
[Preorder α]
(p : α → Prop)
[DecidablePred p]
[LocallyFiniteOrderBot α]
(a : Subtype p)

Finset.Iic a = Finset.subtype p (Finset.Iic ↑a)


/-- A helper definition used to define the morphisms for `plus`. -/
@[simps]
def diagramPullback {X Y : C} (f : X ⟶ Y) : J.diagram P Y ⟶ (J.pullback f).op ⋙ J.diagram P X

(J : CategoryTheory.GrothendieckTopology C)

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

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

(J.diagramPullback P f).app S =
  CategoryTheory.Limits.Multiequalizer.lift ((Opposite.unop ((J.pullback f).op.obj S)).index P) ((J.diagram P Y).obj S)
    (fun I =>
      CategoryTheory.Limits.Multiequalizer.ι ((Opposite.unop S).index P)
        (CategoryTheory.GrothendieckTopology.Cover.Arrow.base I))
    ⋯


@[simp]
theorem mapsTo_iUnion {s : ι → Set α} {t : Set β} {f : α → β} :
    MapsTo f (⋃ i, s i) t ↔ ∀ i, MapsTo f (s i) t

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{s : ι → Set α}
{t : Set β}
{f : α → β}

Set.MapsTo f (⋃ i, s i) t ↔ ∀ (i : ι), Set.MapsTo f (s i) t


@[to_additive]
theorem tprod_eq_prod' {s : Finset β} (hf : mulSupport f ⊆ s) :
    ∏' b, f b = ∏ b ∈ s, f b

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{s : Finset β}
(hf : Function.mulSupport f ⊆ ↑s)


theorem lintegral_coeFn (f : α →ₘ[μ] ℝ≥0∞) : ∫⁻ a, f a ∂μ = f.lintegral

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
(f : α →ₘ[μ] ℝ≥0∞)


@[simp]
theorem sub_apply (f g : CuspForm Γ k) (z : ℍ) : (f - g) z = f z - g z

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f g : CuspForm Γ k)
(z : ℍ)


/--
The image of the maximal ideal of the source is contained within the maximal ideal of the target.
-/
theorem map_nonunit (f : R →+* S) [IsLocalRingHom f] (a : R) (h : a ∈ maximalIdeal R) :
    f a ∈ maximalIdeal S

{R : Type u_1}
{S : Type u_2}
[CommSemiring R]
[LocalRing R]
[CommSemiring S]
[LocalRing S]
(f : R →+* S)
[IsLocalRingHom f]
(a : R)
(h : a ∈ LocalRing.maximalIdeal R)


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


/-- The natural isomorphism `F(A ⨯ -) ≅ FA ⨯ F-`, provided each `prodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def prodComparisonNatIso [HasBinaryProducts C] [HasBinaryProducts D] (A : C)
    [∀ B, IsIso (prodComparison F A B)] :
    prod.functor.obj A ⋙ F ≅ F ⋙ prod.functor.obj (F.obj A)

[∀ (B : C), CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison F A B)]

(CategoryTheory.Limits.prodComparisonNatIso F A).inv =
  (CategoryTheory.asIso { app := fun B => CategoryTheory.Limits.prodComparison F A B, naturality := ⋯ }).inv


lemma polyCharpoly_coeff_eq_zero_of_basis (b : Basis ι R L) (b' : Basis ι' R L) (k : ℕ)
    (H : (polyCharpoly φ b).coeff k = 0) :
    (polyCharpoly φ b').coeff k = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
{ι' : Type u_6}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[Fintype ι']
[DecidableEq ι]
[DecidableEq ι']
[Module.Free R M]
[Module.Finite R M]
(b : Basis ι R L)
(b' : Basis ι' R L)
(k : ℕ)
(H : (φ.polyCharpoly b).coeff k = 0)


theorem monotone_normalizer : Monotone (normalizer : LieSubmodule R L M → LieSubmodule R L M)

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]


/-- A subgroup is either the trivial subgroup or nontrivial. -/
@[to_additive "A subgroup is either the trivial subgroup or nontrivial."]
theorem bot_or_nontrivial (H : Subgroup G) : H = ⊥ ∨ Nontrivial H

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


theorem toIocMod_sub_eq_sub (a b c : α) : toIocMod hp a (b - c) = toIocMod hp (a + c) b - c

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b c : α)


@[simp]
theorem prodMonoidal_rightUnitor_hom_fst (X : C₁ × C₂) :
    ((ρ_ X).hom : X ⊗ 𝟙_ _ ⟶ X).1 = (ρ_ X.1).hom

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

(CategoryTheory.MonoidalCategory.rightUnitor X).hom.1 = (CategoryTheory.MonoidalCategory.rightUnitor X.1).hom


/-- Adding a group element to a point, then subtracting another point,
produces the same result as subtracting the points then adding the
group element. -/
theorem vadd_vsub_assoc (g : G) (p₁ p₂ : P) : g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(g : G)
(p₁ p₂ : P)


@[simp]
theorem coe_natLERec (m n : ℕ) (h : m ≤ n) :
    (natLERec f' m n h : G' m → G' n) = Nat.leRecOn h (@fun k => f' k)

{L : FirstOrder.Language}
{G' : ℕ → Type w}
[(i : ℕ) → L.Structure (G' i)]
(f' : (n : ℕ) → G' n ↪[L] G' (n + 1))
(m n : ℕ)
(h : m ≤ n)

⇑(FirstOrder.Language.DirectedSystem.natLERec f' m n h) = fun a => Nat.leRecOn h (fun k => ⇑(f' k)) a


/-- The bijection on the indexing set induced by reflection. -/
@[simps]
protected def equiv_of_mapsTo :
    ι ≃ ι

(h :
  ∀ (i : ι),
    Set.MapsTo (⇑(Module.preReflection (root i) (p.toLin.flip (coroot i)))) (Set.range ⇑root) (Set.range ⇑root))

(hp : ∀ (i : ι), (p.toLin (root i)) (coroot i) = 2)

(RootPairing.equiv_of_mapsTo p root coroot i h hp) j = ⋯.choose


lemma mem_roots_iff_aeval_eq_zero {x : R} (w : p ≠ 0) : x ∈ roots p ↔ aeval x p = 0

{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
{x : R}
(w : p ≠ 0)

x ∈ p.roots ↔ (Polynomial.aeval x) p = 0


@[csimp] theorem range'_eq_range'TR : @range' = @range'TR


@[norm_cast, simp]
theorem coe_maxTrivHom_apply (f : M →ₗ⁅R,L⁆ N) (m : maxTrivSubmodule R L M) :
    (maxTrivHom f m : N) = f m

(m : ↥(LieModule.maxTrivSubmodule R L M))


private theorem zero_add' (x : LocalizedModule S M) : 0 + x = x

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
(x : LocalizedModule S M)


lemma r_eq_some {i : ι} {i' : ι'} (hi : e.f i = i') :
    e.r i' = some i

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
{i : ι}
{i' : ι'}
(hi : e.f i = i')


theorem mem_dlookup_iff {a : α} {b : β a} {l : List (Sigma β)} (nd : l.NodupKeys) :
    b ∈ dlookup a l ↔ Sigma.mk a b ∈ l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{l : List (Sigma β)}
(nd : l.NodupKeys)


@[simp]
theorem coe_coe [AddGroupWithOne R] {f : ArithmeticFunction ℕ} :
    ((f : ArithmeticFunction ℤ) : ArithmeticFunction R) = (f : ArithmeticFunction R)

{R : Type u_1}
[AddGroupWithOne R]
{f : ArithmeticFunction ℕ}


theorem Memℒp.restrict (s : Set α) {f : α → E} (hf : Memℒp f p μ) : Memℒp f p (μ.restrict s)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(s : Set α)
{f : α → E}
(hf : MeasureTheory.Memℒp f p μ)


theorem add_comm {X Y : C} (a b : X ⟶ Y) : a + b = b + a


@[to_additive (attr := simp)]
theorem quotientMulEquivOfEq_mk {M N : Subgroup G} [M.Normal] [N.Normal] (h : M = N) (x : G) :
    QuotientGroup.quotientMulEquivOfEq h (QuotientGroup.mk x) = QuotientGroup.mk x

{G : Type u}
[Group G]
{M N : Subgroup G}
[M.Normal]
[N.Normal]
(h : M = N)
(x : G)

(QuotientGroup.quotientMulEquivOfEq h) ↑x = ↑x


theorem coe_fst' (ex : proj x ∈ e.baseSet) : (e x).1 = proj x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : Z}
(ex : proj x ∈ e.baseSet)


@[to_additive]
protected theorem inv_inv : Commute a b → Commute a⁻¹ b⁻¹

{G : Type u_1}
[SubtractionMonoid G]
{a b : G}


@[simp]
theorem comp_id (f : TopHom α β) : f.comp (TopHom.id α) = f

{α : Type u_2}
{β : Type u_3}
[Top α]
[Top β]
(f : TopHom α β)


theorem filter_snd_eq_antidiagonal (n m : A) [DecidablePred (· = m)] [Decidable (m ≤ n)] :
    filter (fun x : A × A ↦ x.snd = m) (antidiagonal n) = if m ≤ n then {(n - m, m)} else ∅

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

Finset.filter (fun x => x.2 = m) (Finset.antidiagonal n) = if m ≤ n then {(n - m, m)} else ∅


theorem PrimrecRel.comp₂ {R : γ → δ → Prop} [∀ a b, Decidable (R a b)] {f : α → β → γ}
    {g : α → β → δ} :
    PrimrecRel R → Primrec₂ f → Primrec₂ g → PrimrecRel fun a b => R (f a b) (g a b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable δ]
{R : γ → δ → Prop}
[(a : γ) → (b : δ) → Decidable (R a b)]
{f : α → β → γ}
{g : α → β → δ}


lemma nat_card_stabilizer_eq_one_or_two :
    Nat.card (Stab w) = 1 ∨ Nat.card (Stab w) = 2

(k : Type u_1)
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
(w : NumberField.InfinitePlace K)

Nat.card ↥(MulAction.stabilizer (K ≃ₐ[k] K) w) = 1 ∨ Nat.card ↥(MulAction.stabilizer (K ≃ₐ[k] K) w) = 2


theorem isStoppingTime_const [Preorder ι] (f : Filtration ι m) (i : ι) :
    IsStoppingTime f fun _ => i

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
(f : MeasureTheory.Filtration ι m)
(i : ι)

MeasureTheory.IsStoppingTime f fun x => i


theorem unit_mateEquiv (α : G ⋙ L₂ ⟶ L₁ ⋙ H) (c : C) :
    G.map (adj₁.unit.app c) ≫ (mateEquiv adj₁ adj₂ α).app _ =
      adj₂.unit.app _ ≫ R₂.map (α.app _)

{C : Type u₁}
{D : Type u₂}
{E : Type u₃}
{F : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.Category.{v₃, u₃} E]
[CategoryTheory.Category.{v₄, u₄} F]
{G : CategoryTheory.Functor C E}
{H : CategoryTheory.Functor D F}
{L₁ : CategoryTheory.Functor C D}
{R₁ : CategoryTheory.Functor D C}
{L₂ : CategoryTheory.Functor E F}
{R₂ : CategoryTheory.Functor F E}
(adj₁ : L₁ ⊣ R₁)
(adj₂ : L₂ ⊣ R₂)
(α : G.comp L₂ ⟶ L₁.comp H)
(c : C)

CategoryTheory.CategoryStruct.comp (G.map (adj₁.unit.app c)) (((CategoryTheory.mateEquiv adj₁ adj₂) α).app (L₁.obj c)) =
  CategoryTheory.CategoryStruct.comp (adj₂.unit.app (G.obj ((CategoryTheory.Functor.id C).obj c)))
    (R₂.map (α.app ((CategoryTheory.Functor.id C).obj c)))


theorem minFac_eq (n : ℕ) : minFac n = if 2 ∣ n then 2 else minFacAux n 3

n.minFac = if 2 ∣ n then 2 else n.minFacAux 3


@[simp] lemma LinearMap.restrictScalars_extendScalarsOfIsLocalization (f : M →ₗ[R] N) :
    (f.extendScalarsOfIsLocalization S A).restrictScalars R = f

{R : Type u_3}
[CommSemiring R]
(S : Submonoid R)
(A : Type u_4)
[CommSemiring A]
[Algebra R A]
[IsLocalization S A]
{M : Type u_5}
{N : Type u_6}
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[Module A N]
[IsScalarTower R A N]
(f : M →ₗ[R] N)

↑R (LinearMap.extendScalarsOfIsLocalization S A f) = f


theorem div_eq_top : a / b = ∞ ↔ a ≠ 0 ∧ b = 0 ∨ a = ∞ ∧ b ≠ ∞

a / b = ⊤ ↔ a ≠ 0 ∧ b = 0 ∨ a = ⊤ ∧ b ≠ ⊤


theorem ker_mulVecLin_transpose_mul_self (A : Matrix m n R) :
    LinearMap.ker (Aᵀ * A).mulVecLin = LinearMap.ker (mulVecLin A)

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[Fintype m]
[LinearOrderedField R]
(A : Matrix m n R)

LinearMap.ker (Aᵀ * A).mulVecLin = LinearMap.ker A.mulVecLin


lemma f_int_ofNat (k : ℕ) {a : ℝ} (ha : 0 ≤ a) (t : ℝ) (n : ℕ) :
    f_int k a t (Int.ofNat n) = f_nat k a t n

HurwitzKernelBounds.f_int k a t (Int.ofNat n) = HurwitzKernelBounds.f_nat k a t n


theorem div_sub_same {a b : K} (h : b ≠ 0) : (a - b) / b = a / b - 1

{K : Type u_3}
[DivisionRing K]
{a b : K}
(h : b ≠ 0)


theorem restr_toPartialEquiv' (s : Set X) (hs : IsOpen s) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr s

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(s : Set X)
(hs : IsOpen s)


@[simp, norm_cast]
theorem isTheta_ofReal_right {f : α → E} {g : α → ℝ} : f =Θ[l] (g · : α → ℂ) ↔ f =Θ[l] g

{α : Type u_1}
{E : Type u_2}
[Norm E]
{l : Filter α}
{f : α → E}
{g : α → ℝ}


theorem toLp_inj {f g : α →ᵇ E} [μ.IsOpenPosMeasure] [NormedField 𝕜] [NormedSpace 𝕜 E] :
    toLp (E := E) p μ 𝕜 f = toLp (E := E) p μ 𝕜 g ↔ f = g

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
{f g : α →ᵇ E}
[μ.IsOpenPosMeasure]
[NormedField 𝕜]
[NormedSpace 𝕜 E]

(BoundedContinuousFunction.toLp p μ 𝕜) f = (BoundedContinuousFunction.toLp p μ 𝕜) g ↔ f = g


/-- Drop the augmentation. -/
@[simps!]
def drop : Augmented C ⥤ SimplicialObject C

(X : CategoryTheory.Comma (𝟭 (CategoryTheory.SimplicialObject C)) (CategoryTheory.SimplicialObject.const C))

CategoryTheory.SimplicialObject.Augmented.drop.obj X = X.left


@[reassoc]
lemma appLE_map' (e : V ≤ f ⁻¹ᵁ U) (i : V = V') :
    f.appLE U V' (i ▸ e) ≫ X.presheaf.map (eqToHom i).op = f.appLE U V e

(e : V ≤ (TopologicalSpace.Opens.map f.val.base).obj U)

f.appLE U V' ⋯ ≫ X.presheaf.map (CategoryTheory.eqToHom i).op = f.appLE U V e


@[simp]
theorem shiftLeft_negSucc (m n : ℕ) : -[m+1] <<< (n : ℤ) = -[Nat.shiftLeft' true m n+1]

Int.negSucc m <<< ↑n = Int.negSucc (Nat.shiftLeft' true m n)


theorem linearIndependent_of_top_le_span_of_card_eq_finrank {ι : Type*} [Fintype ι] {b : ι → V}
    (spans : ⊤ ≤ span K (Set.range b)) (card_eq : Fintype.card ι = finrank K V) :
    LinearIndependent K b

(spans : ⊤ ≤ Submodule.span K (Set.range b))

(card_eq : Fintype.card ι = FiniteDimensional.finrank K V)


@[simp]
theorem sInf_eq_zero {s : Set ℕ} : sInf s = 0 ↔ 0 ∈ s ∨ s = ∅


/-- A category is `MonoidalPreadditive` if tensoring is additive in both factors.

Note we don't `extend Preadditive C` here, as `Abelian C` already extends it,
and we'll need to have both typeclasses sometimes.
-/
class MonoidalPreadditive : Prop where
  whiskerLeft_zero : ∀ {X Y Z : C}, X ◁ (0 : Y ⟶ Z) = 0 := by aesop_cat
  zero_whiskerRight : ∀ {X Y Z : C}, (0 : Y ⟶ Z) ▷ X = 0 := by aesop_cat
  whiskerLeft_add : ∀ {X Y Z : C} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g := by aesop_cat
  add_whiskerRight : ∀ {X Y Z : C} (f g : Y ⟶ Z), (f + g) ▷ X = f ▷ X + g ▷ X := by aesop_cat

[self : CategoryTheory.MonoidalPreadditive C]

CategoryTheory.MonoidalCategory.whiskerLeft X (f + g) =
  CategoryTheory.MonoidalCategory.whiskerLeft X f + CategoryTheory.MonoidalCategory.whiskerLeft X g


theorem uniq {K : J ⥤ C} {c : Cone K} (hc : IsLimit c) (s : Cone (K ⋙ F))
    (f₁ f₂ : s.pt ⟶ F.obj c.pt) (h₁ : ∀ j : J, f₁ ≫ (F.mapCone c).π.app j = s.π.app j)
    (h₂ : ∀ j : J, f₂ ≫ (F.mapCone c).π.app j = s.π.app j) : f₁ = f₂

(s : CategoryTheory.Limits.Cone (K ⋙ F))

(h₁ : ∀ (j : J), f₁ ≫ (F.mapCone c).π.app j = s.π.app j)

(h₂ : ∀ (j : J), f₂ ≫ (F.mapCone c).π.app j = s.π.app j)


theorem IsAtom.disjoint_of_ne [SemilatticeInf α] [OrderBot α] {a b : α} (ha : IsAtom a)
    (hb : IsAtom b) (hab : a ≠ b) : Disjoint a b

{α : Type u_2}
[SemilatticeInf α]
[OrderBot α]
{a b : α}
(ha : IsAtom a)
(hb : IsAtom b)
(hab : a ≠ b)


theorem MDifferentiable.comp (hg : MDifferentiable I' I'' g) (hf : MDifferentiable I I' f) :
    MDifferentiable I I'' (g ∘ f)

[I''s : SmoothManifoldWithCorners I'' M'']


theorem tr_eval (c v) : eval (TM2.step tr) (init c v) = halt <$> Code.eval c v

(c : Turing.ToPartrec.Code)
(v : List ℕ)

Turing.eval (Turing.TM2.step Turing.PartrecToTM2.tr) (Turing.PartrecToTM2.init c v) =
  Turing.PartrecToTM2.halt <$> c.eval v


lemma dotProduct_le_dotProduct_of_nonneg_left {u v w : n → R} (huv : u ≤ v) (hw : 0 ≤ w) :
    dotProduct w u ≤ dotProduct w v

{n : Type u_2}
{R : Type u_4}
[OrderedSemiring R]
[Fintype n]
{u v w : n → R}
(huv : u ≤ v)
(hw : 0 ≤ w)

Matrix.dotProduct w u ≤ Matrix.dotProduct w v


@[simp]
theorem rescale_X (a : A) : rescale a X = C A a * X

(PowerSeries.rescale a) PowerSeries.X = (PowerSeries.C A) a * PowerSeries.X


@[to_additive]
theorem prod_eq_foldr : ∀ {l : List M}, l.prod = foldr (· * ·) 1 l

l.prod = List.foldr (fun x x_1 => x * x_1) 1 l


@[simp]
theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt


protected theorem add_divInt (a b c : ℤ) : (a + b) /. c = a /. c + b /. c

Rat.divInt (a + b) c = Rat.divInt a c + Rat.divInt b c


theorem pos_iff {z : ℂ} : 0 < z ↔ 0 < z.re ∧ 0 = z.im


theorem SeparatesPoints.mono {m m' : MeasurableSpace α} [hsep : @SeparatesPoints _ m] (h : m ≤ m') :
    @SeparatesPoints _ m'

[hsep : MeasurableSpace.SeparatesPoints α]


theorem le_ciInf_iff' [Nonempty ι] {f : ι → α} {a : α} : a ≤ iInf f ↔ ∀ i, a ≤ f i

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrderBot α]
[Nonempty ι]
{f : ι → α}
{a : α}


@[simp]
lemma codRestrict_apply (P : LieSubmodule R L N) (f : M →ₗ⁅R,L⁆ N) (h : ∀ m, f m ∈ P) (m : M) :
    (f.codRestrict P h m : N) = f m

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup N]
[Module R N]
[LieRingModule L N]
(P : LieSubmodule R L N)
(f : M →ₗ⁅R,L⁆ N)
(h : ∀ (m : M), f m ∈ P)
(m : M)

↑((LieModuleHom.codRestrict P f h) m) = f m


/-- If `e : A ≃ₐ[R] B` is an isomorphism of `R`-algebras, then so is `map e`. -/
@[simps apply]
def mapAlgEquiv (e : A₁ ≃ₐ[R] A₂) : MvPolynomial σ A₁ ≃ₐ[R] MvPolynomial σ A₂

{R : Type u}
(σ : Type u_1)
[CommSemiring R]
{A₁ : Type u_2}
{A₂ : Type u_3}
[CommSemiring A₁]
[CommSemiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)
(a : MvPolynomial σ A₁)

(MvPolynomial.mapAlgEquiv σ e) a = (MvPolynomial.map ↑e) a


@[simp]
theorem Fintype.card_lex (α : Type*) [Fintype α] : Fintype.card (Lex α) = Fintype.card α


protected theorem eq_sub_of_add_eq (hc : c ≠ ∞) : a + c = b → a = b - c


@[to_additive (attr := simp)]
lemma symm_mk_zpow [DivInvMonoid M] (a : Mᵈᵐᵃ) (n : ℤ) : mk.symm (a ^ n) = mk.symm a ^ n

{M : Type u_1}
[DivInvMonoid M]
(a : Mᵈᵐᵃ)
(n : ℤ)

DomMulAct.mk.symm (a ^ n) = DomMulAct.mk.symm a ^ n


theorem quotient_map_C_eq_zero {I : Ideal R} {i : R} (hi : i ∈ I) :
    (Ideal.Quotient.mk (Ideal.map (C : R →+* MvPolynomial σ R) I :
      Ideal (MvPolynomial σ R))).comp C i = 0

{R : Type u_1}
{σ : Type u_2}
[CommRing R]
{I : Ideal R}
{i : R}
(hi : i ∈ I)

((Ideal.Quotient.mk (Ideal.map MvPolynomial.C I)).comp MvPolynomial.C) i = 0


theorem Filter.Tendsto.zpow₀ {f : α → G₀} {l : Filter α} {a : G₀} (hf : Tendsto f l (𝓝 a)) (m : ℤ)
    (h : a ≠ 0 ∨ 0 ≤ m) : Tendsto (fun x => f x ^ m) l (𝓝 (a ^ m))

{α : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
{f : α → G₀}
{l : Filter α}
{a : G₀}
(hf : Filter.Tendsto f l (𝓝 a))
(m : ℤ)
(h : a ≠ 0 ∨ 0 ≤ m)

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


theorem colimit.pre_id (F : J ⥤ C) :
    colimit.pre F (𝟭 _) = colim.map (Functor.leftUnitor F).hom

CategoryTheory.Limits.colimit.pre F (𝟭 J) = CategoryTheory.Limits.colim.map F.leftUnitor.hom


@[simp]
theorem convexHull_univ : convexHull 𝕜 (univ : Set E) = univ

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]


protected theorem UniformSpace.Core.comp_mem_uniformity_sets {c : Core α} {s : Set (α × α)}
    (hs : s ∈ c.uniformity) : ∃ t ∈ c.uniformity, t ○ t ⊆ s

{α : Type ua}
{c : UniformSpace.Core α}
{s : Set (α × α)}
(hs : s ∈ c.uniformity)


@[simp]
theorem map_eq_zero_of_eq (v : ι → M) {i j : ι} (h : v i = v j) (hij : i ≠ j) : f v = 0

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
(f : M [⋀^ι]→ₗ[R] N)
(v : ι → M)
{i j : ι}
(h : v i = v j)
(hij : i ≠ j)


protected theorem tendsto_pure_self (l : Filter X) :
    Tendsto (pure : X → Filter X) l (𝓝 l)


@[to_additive]
theorem IsSubgroup.div_mem {s : Set G} (hs : IsSubgroup s) {x y : G} (hx : x ∈ s) (hy : y ∈ s) :
    x / y ∈ s

{G : Type u_1}
[AddGroup G]
{s : Set G}
(hs : IsAddSubgroup s)
{x y : G}
(hx : x ∈ s)
(hy : y ∈ s)


lemma shiftFunctorAdd'_hom_app_f' (K : CochainComplex C ℤ) (a b ab : ℤ) (h : a + b = ab) (n : ℤ) :
    ((CategoryTheory.shiftFunctorAdd' (CochainComplex C ℤ) a b ab h).hom.app K).f n =
      (K.XIsoOfEq (by dsimp; rw [← h, add_assoc, add_comm a])).hom

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)
(a b ab : ℤ)
(h : a + b = ab)
(n : ℤ)

((CategoryTheory.shiftFunctorAdd' (CochainComplex C ℤ) a b ab h).hom.app K).f n = (HomologicalComplex.XIsoOfEq K ⋯).hom


theorem isVonNBounded_sUnion {S : Set (Set E)} (hS : S.Finite) :
    IsVonNBounded 𝕜 (⋃₀ S) ↔ ∀ s ∈ S, IsVonNBounded 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[Zero E]
[TopologicalSpace E]
{S : Set (Set E)}
(hS : S.Finite)

Bornology.IsVonNBounded 𝕜 (⋃₀ S) ↔ ∀ s ∈ S, Bornology.IsVonNBounded 𝕜 s


theorem restrict (hf : P f) (U : Y.Opens) : P (f ∣_ U)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

[hP : AlgebraicGeometry.IsLocalAtTarget P]


@[simp]
theorem star_re (z : ℤ√d) : (star z).re = z.re


/-- If two functions coincide on a set `s`, then their iterated differentials within this set
coincide. See also `Filter.EventuallyEq.iteratedFDerivWithin_eq` and
`Filter.EventuallyEq.iteratedFDerivWithin`. -/
theorem iteratedFDerivWithin_congr (hs : EqOn f₁ f s) (hx : x ∈ s) (n : ℕ) :
    iteratedFDerivWithin 𝕜 n f₁ s x = iteratedFDerivWithin 𝕜 n f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f f₁ : E → F}
{x : E}
(hs : Set.EqOn f₁ f s)
(hx : x ∈ s)
(n : ℕ)


@[simp]
theorem coe_toSubring {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) : (↑S.toSubring : Set A) = S


@[simp]
theorem eventuallyEq_bind {f : Filter α} {m : α → Filter β} {g₁ g₂ : β → γ} :
    g₁ =ᶠ[bind f m] g₂ ↔ ∀ᶠ x in f, g₁ =ᶠ[m x] g₂

{α : Type u}
{β : Type v}
{γ : Type w}
{f : Filter α}
{m : α → Filter β}
{g₁ g₂ : β → γ}

g₁ =ᶠ[f.bind m] g₂ ↔ ∀ᶠ (x : α) in f, g₁ =ᶠ[m x] g₂


@[simp]
theorem approxOn_zero {f : β → α} (hf : Measurable f) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s)
    [SeparableSpace s] (x : β) : approxOn f hf s y₀ h₀ 0 x = y₀

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

↑(MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ 0) x = y₀


/-- The absolute value of the determinant of the base change from `integralBasis` to
`basisOfFractionalIdeal I` is equal to the norm of `I`. -/
theorem det_basisOfFractionalIdeal_eq_absNorm  (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ)
    (e : (Free.ChooseBasisIndex ℤ (𝓞 K)) ≃ (Free.ChooseBasisIndex ℤ I)) :
    |(integralBasis K).det ((basisOfFractionalIdeal K I).reindex e.symm)| =
      FractionalIdeal.absNorm I.1

(I : (FractionalIdeal (nonZeroDivisors (NumberField.RingOfIntegers K)) K)ˣ)

(e : Module.Free.ChooseBasisIndex ℤ (NumberField.RingOfIntegers K) ≃ Module.Free.ChooseBasisIndex ℤ ↥↑↑I)

|(NumberField.integralBasis K).det ⇑((NumberField.basisOfFractionalIdeal K I).reindex e.symm)| =
  FractionalIdeal.absNorm ↑I


@[to_additive (attr := simp)]
theorem mk'_self (x) (H : x ∈ S) : f.mk' x ⟨x, H⟩ = 1

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(x : M)
(H : x ∈ S)


@[simp]
theorem span_zero : span R (0 : Set M) = ⊥

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


@[simp]
lemma comp' {A₁ A₂ A₃ : CommMon_ C} (f : A₁ ⟶ A₂) (g : A₂ ⟶ A₃) :
    ((f ≫ g : A₁ ⟶ A₃) : A₁.toMon_ ⟶ A₃.toMon_) = @CategoryStruct.comp (Mon_ C) _ _ _ _ f g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]
{A₁ A₂ A₃ : CommMon_ C}
(f : A₁ ⟶ A₂)
(g : A₂ ⟶ A₃)


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

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

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


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


theorem Independent.mono {s t : ι → α} (hs : Independent s) (hst : t ≤ s) : Independent t

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{s t : ι → α}
(hs : CompleteLattice.Independent s)
(hst : t ≤ s)


theorem Monic.prime_of_degree_eq_one (hp1 : degree p = 1) (hm : Monic p) : Prime p

{R : Type u}
[CommRing R]
[IsDomain R]
{p : R[X]}
(hp1 : p.degree = 1)
(hm : p.Monic)


theorem size_eq_bits_len (n : ℕ) : n.bits.length = n.size


theorem WSameSide.trans {s : AffineSubspace R P} {x y z : P} (hxy : s.WSameSide x y)
    (hyz : s.WSameSide y z) (hy : y ∉ s) : s.WSameSide 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.WSameSide x y)
(hyz : s.WSameSide y z)
(hy : y ∉ s)


@[to_additive (attr := simp)]
theorem map_mk_nhds (x : M) : map (mk : M → Mᵈᵐᵃ) (𝓝 x) = 𝓝 (mk x)

{M : Type u_1}
[TopologicalSpace M]
(x : M)

Filter.map (⇑DomMulAct.mk) (𝓝 x) = 𝓝 (DomMulAct.mk x)


/-- Interpreting the legs of a cocone as a costructured arrow and then forgetting the arrow again
    does nothing. -/
@[simps!]
def Cocone.toCostructuredArrowCompProj {F : J ⥤ C} (c : Cocone F) :
    c.toCostructuredArrow ⋙ CostructuredArrow.proj _ _ ≅ 𝟭 J

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : CategoryTheory.Functor J C}
(c : CategoryTheory.Limits.Cocone F)
(X : J)

c.toCostructuredArrowCompProj.inv.app X = CategoryTheory.CategoryStruct.id X


lemma image_inclusion (s : SubMulAction M α) :
    Set.range s.inclusion = s.carrier

{M : Type u_1}
{α : Type u_2}
[Monoid M]
[MulAction M α]
(s : SubMulAction M α)


@[simp] lemma comap_id (N : Matroid β) : N.comap id = N


theorem inr_eq_prod : inr R M M₂ = prod 0 LinearMap.id

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.inr R M M₂ = LinearMap.prod 0 LinearMap.id


theorem mul_def (α β : Type u) : #α * #β = #(α × β)

Cardinal.mk α * Cardinal.mk β = Cardinal.mk (α × β)


theorem dist_apply_le_dist (f₁ f₂ : FunSpace v) (t : Icc v.tMin v.tMax) :
    dist (f₁ t) (f₂ t) ≤ dist f₁ f₂

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{v : PicardLindelof E}
(f₁ f₂ : v.FunSpace)
(t : ↑(Set.Icc v.tMin v.tMax))

dist (f₁.toFun t) (f₂.toFun t) ≤ dist f₁ f₂


theorem Subset.congr_right : ∀ {x y z : PSet}, Equiv x y → (z ⊆ x ↔ z ⊆ y)


/-- Technical lemma to rewrite suitably the preimage of an intersection under an extended chart, to
bring it into a convenient form to apply derivative lemmas. -/
theorem extend_preimage_inter_eq :
    (f.extend I).symm ⁻¹' (s ∩ t) ∩ range I =
      (f.extend I).symm ⁻¹' s ∩ range I ∩ (f.extend I).symm ⁻¹' t

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
{s t : Set M}

↑(f.extend I).symm ⁻¹' (s ∩ t) ∩ Set.range ↑I = ↑(f.extend I).symm ⁻¹' s ∩ Set.range ↑I ∩ ↑(f.extend I).symm ⁻¹' t


theorem mk_union_le_aleph0 {α} {P Q : Set α} :
    #(P ∪ Q : Set α) ≤ ℵ₀ ↔ #P ≤ ℵ₀ ∧ #Q ≤ ℵ₀

Cardinal.mk ↑(P ∪ Q) ≤ Cardinal.aleph0 ↔ Cardinal.mk ↑P ≤ Cardinal.aleph0 ∧ Cardinal.mk ↑Q ≤ Cardinal.aleph0


theorem strongLT_of_strongLT_of_le (hab : a ≺ b) (hbc : b ≤ c) : a ≺ c

{ι : Type u_1}
{π : ι → Type u_4}
[(i : ι) → Preorder (π i)]
{a b c : (i : ι) → π i}
(hab : StrongLT a b)
(hbc : b ≤ c)


theorem comapFunIsLocallyFraction (f : R →+* S) (U : Opens (PrimeSpectrum.Top R))
    (V : Opens (PrimeSpectrum.Top S)) (hUV : V.1 ⊆ PrimeSpectrum.comap f ⁻¹' U.1)
    (s : ∀ x : U, Localizations R x) (hs : (isLocallyFraction R).toPrelocalPredicate.pred s) :
    (isLocallyFraction S).toPrelocalPredicate.pred (comapFun f U V hUV s)

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(V : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top S))

(hUV : V.carrier ⊆ ⇑(PrimeSpectrum.comap f) ⁻¹' U.carrier)

(s : (x : ↥U) → AlgebraicGeometry.StructureSheaf.Localizations R ↑x)

(hs : (AlgebraicGeometry.StructureSheaf.isLocallyFraction R).pred s)

(AlgebraicGeometry.StructureSheaf.isLocallyFraction S).pred (AlgebraicGeometry.StructureSheaf.comapFun f U V hUV s)


/-- Given a structured arrow `X ⟶ T(Y)`, and an arrow `Y ⟶ Y'`, we can construct a morphism of
    structured arrows given by `(X ⟶ T(Y)) ⟶ (X ⟶ T(Y) ⟶ T(Y'))`.  -/
@[simps]
def homMk' (f : StructuredArrow S T) (g : f.right ⟶ Y') : f ⟶ mk (f.hom ≫ T.map g)

(f : CategoryTheory.StructuredArrow S T)

(f.homMk' g).left = CategoryTheory.CategoryStruct.id f.left


theorem mem_openSegment_of_gauge_lt_one (absorbs : Absorbent ℝ s) (hgauge : gauge s x < 1) :
    ∃ y ∈ s, x ∈ openSegment ℝ 0 y

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
(absorbs : Absorbent ℝ s)
(hgauge : gauge s x < 1)


theorem sin_eq_zero_iff_cos_eq {x : ℝ} : sin x = 0 ↔ cos x = 1 ∨ cos x = -1

Real.sin x = 0 ↔ Real.cos x = 1 ∨ Real.cos x = -1


@[simp]
theorem pointwise_smul_toSubsemiring (m : R') (S : Subalgebra R A) :
    (m • S).toSubsemiring = m • S.toSubsemiring

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{R' : Type u_3}
[Semiring R']
[MulSemiringAction R' A]
[SMulCommClass R' R A]
(m : R')
(S : Subalgebra R A)


/-- If `f b = 1` for all `b ∈ t`, then the product of `f a` with `a ∈ s` is the same as the
product of `f a` with `a ∈ s ∖ t`. -/
@[to_additive "If `f b = 0` for all `b ∈ t`, then the sum of `f a` with `a ∈ s` is the same as the
sum of `f a` with `a ∈ s ∖ t`."]
lemma tprod_setElem_eq_tprod_setElem_diff {f : β → α} (s t : Set β)
    (hf₀ : ∀ b ∈ t, f b = 1) :
    ∏' a : s, f a = ∏' a : (s \ t : Set β), f a

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
(s t : Set β)
(hf₀ : ∀ b ∈ t, f b = 0)

∑' (a : ↑s), f ↑a = ∑' (a : ↑(s \ t)), f ↑a


theorem mem_closed_iff_closure_le (x : α) : x ∈ l.closed ↔ u (l x) ≤ x

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


theorem u_injective [Preorder α] [PartialOrder β] (gi : GaloisInsertion l u) : Injective u

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[PartialOrder β]
(gi : GaloisInsertion l u)


theorem ae_eq_mk (h : AEMeasurable f μ) : f =ᵐ[μ] h.mk f

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : AEMeasurable f μ)


@[simp]
theorem inter_zero (s : Multiset α) : s ∩ 0 = 0

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


lemma cfcₙ_apply_of_not_continuousOn {f : R → R} (a : A) (hf : ¬ ContinuousOn f (σₙ R a)) :
    cfcₙ f a = 0


theorem card_fintypeIoi : Fintype.card (Set.Ioi a) = n - 1 - a


@[deprecated mem_image (since := "2024-03-23")]
theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
    y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set α}
{y : β}

y ∈ f '' s ↔ ∃ x, ∃ (_ : x ∈ s), f x = y


@[simp]
theorem coe_opLinearEquiv_toLinearMap : ((opLinearEquiv R).toLinearMap : M → Mᵐᵒᵖ) = op

(R : Type u)
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]

⇑↑(MulOpposite.opLinearEquiv R) = MulOpposite.op


/-- In a Lie group, inversion is a smooth map. -/
@[to_additive "In an additive Lie group, inversion is a smooth map."]
theorem smooth_inv : Smooth I I fun x : G => x⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(I : ModelWithCorners 𝕜 E H)
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup I G]


@[to_additive (attr := simp)]
theorem map_comp_map {I : Type*} [Group I] (M : Subgroup H) (O : Subgroup I) [M.Normal] [O.Normal]
    (f : G →* H) (g : H →* I) (hf : N ≤ Subgroup.comap f M) (hg : M ≤ Subgroup.comap g O)
    (hgf : N ≤ Subgroup.comap (g.comp f) O :=
      hf.trans ((Subgroup.comap_mono hg).trans_eq (Subgroup.comap_comap _ _ _))) :
    (map M O g hg).comp (map N M f hf) = map N O (g.comp f) hgf

(hgf : N ≤ Subgroup.comap (g.comp f) O := ⋯)

(QuotientGroup.map M O g hg).comp (QuotientGroup.map N M f hf) = QuotientGroup.map N O (g.comp f) hgf


theorem coe_injective : @Injective (E →ₛₗᵢ[σ₁₂] E₂) (E → E₂) (fun f => f)

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]


lemma norm_sub_nonneg (f : α →ᵇ ℝ) :
    0 ≤ const _ ‖f‖ - f

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

0 ≤ BoundedContinuousFunction.const α ‖f‖ - f


/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I

(I : CategoryTheory.Limits.MultispanIndex C)

(w :
  ∀ (a : I.L),
    CategoryTheory.CategoryStruct.comp (I.fst a) (π (I.fstFrom a)) =
      CategoryTheory.CategoryStruct.comp (I.snd a) (π (I.sndFrom a)))

(x : CategoryTheory.Limits.WalkingMultispan I.fstFrom I.sndFrom)

(CategoryTheory.Limits.Multicofork.ofπ I P π w).ι.app x =
  match x with
  | CategoryTheory.Limits.WalkingMultispan.left a => CategoryTheory.CategoryStruct.comp (I.fst a) (π (I.fstFrom a))
  | CategoryTheory.Limits.WalkingMultispan.right b => π b


/-- The equivalence `(ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n` obtained
by reversing the arrows. -/
@[simps!]
def opEquivalence : (ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
(n : ℕ)

∀ {X Y : (CategoryTheory.Functor (Fin (n + 1)) C)ᵒᵖ} (f : X ⟶ Y) (X_1 : Fin (n + 1)),
  ((CategoryTheory.ComposableArrows.opEquivalence C n).functor.map f).app X_1 = (f.unop.app X_1.rev).op


/-- This is a helper construction that can be useful when verifying that a category has all
    pushout. Given `F : WalkingSpan ⥤ C`, which is really the same as
    `span (F.map fst) (F.map snd)`, and a pushout cocone on `F.map fst` and `F.map snd`,
    we get a cocone on `F`.

    If you're thinking about using this, have a look at `hasPushouts_of_hasColimit_span`, which
    you may find to be an easier way of achieving your goal. -/
@[simps]
def Cocone.ofPushoutCocone {F : WalkingSpan ⥤ C} (t : PushoutCocone (F.map fst) (F.map snd)) :
    Cocone F

{F : CategoryTheory.Limits.WalkingSpan ⥤ C}

(t :
  CategoryTheory.Limits.PushoutCocone (F.map CategoryTheory.Limits.WalkingSpan.Hom.fst)
    (F.map CategoryTheory.Limits.WalkingSpan.Hom.snd))

(CategoryTheory.Limits.Cocone.ofPushoutCocone t).ι = (CategoryTheory.Limits.diagramIsoSpan F).hom ≫ t.ι


theorem mk_toPartENat_eq_coe_card [Fintype α] : toPartENat #α = Fintype.card α

Cardinal.toPartENat (Cardinal.mk α) = ↑(Fintype.card α)


@[simp]
theorem Equiv_isup_symm_inclusion (i : ι) :
    (Equiv_iSup S).symm.toEmbedding.comp (Substructure.inclusion (le_iSup _ _))
    = of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i

{L : FirstOrder.Language}
{ι : Type v}
[Preorder ι]
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{M : Type u_1}
[L.Structure M]
(S : ι →o L.Substructure M)
(i : ι)

(FirstOrder.Language.DirectLimit.Equiv_iSup S).symm.toEmbedding.comp (FirstOrder.Language.Substructure.inclusion ⋯) =
  FirstOrder.Language.DirectLimit.of L ι (fun x => ↥(S x)) (fun x x_1 h => FirstOrder.Language.Substructure.inclusion ⋯)
    i


/-- A property holds for all polynomials of positive `degree` with coefficients in a semiring `R`
if it holds for
* `a * X`, with `a ∈ R`,
* `p * X`, with `p ∈ R[X]`,
* `p + a`, with `a ∈ R`, `p ∈ R[X]`,
with appropriate restrictions on each term.

See `natDegree_ne_zero_induction_on` for a similar statement involving no explicit multiplication.
 -/
@[elab_as_elim]
theorem degree_pos_induction_on {P : R[X] → Prop} (p : R[X]) (h0 : 0 < degree p)
    (hC : ∀ {a}, a ≠ 0 → P (C a * X)) (hX : ∀ {p}, 0 < degree p → P p → P (p * X))
    (hadd : ∀ {p} {a}, 0 < degree p → P p → P (p + C a)) : P p

(hC : ∀ {a : R}, a ≠ 0 → P (Polynomial.C a * Polynomial.X))

(hX : ∀ {p : R[X]}, 0 < p.degree → P p → P (p * Polynomial.X))

(hadd : ∀ {p : R[X]} {a : R}, 0 < p.degree → P p → P (p + Polynomial.C a))


lemma homEquiv_comp (f : L₁.obj X ⟶ L₁.obj Y) (g : L₁.obj Y ⟶ L₁.obj Z) :
    homEquiv W L₁ L₂ (f ≫ g) = homEquiv W L₁ L₂ f ≫ homEquiv W L₁ L₂ g

(CategoryTheory.Localization.homEquiv W L₁ L₂) (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.Localization.homEquiv W L₁ L₂) f)
    ((CategoryTheory.Localization.homEquiv W L₁ L₂) g)


@[simp]
theorem coe_addMonoidHom_mk (f : α → β) (h₁ h₂ h₃ h₄) :
    ((⟨⟨⟨f, h₁⟩, h₂⟩, h₃, h₄⟩ : α →+* β) : α →+ β) = ⟨⟨f, h₃⟩, h₄⟩

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α → β) (h₁ : f 1 = 1)
  (h₂ :
    ∀ (x_2 y : α),
      { toFun := f, map_one' := h₁ }.toFun (x_2 * y) =
        { toFun := f, map_one' := h₁ }.toFun x_2 * { toFun := f, map_one' := h₁ }.toFun y)
  (h₃ : (↑{ toFun := f, map_one' := h₁, map_mul' := h₂ }).toFun 0 = 0)
  (h₄ :
    ∀ (x_2 y : α),
      (↑{ toFun := f, map_one' := h₁, map_mul' := h₂ }).toFun (x_2 + y) =
        (↑{ toFun := f, map_one' := h₁, map_mul' := h₂ }).toFun x_2 +
          (↑{ toFun := f, map_one' := h₁, map_mul' := h₂ }).toFun y),
  ↑{ toFun := f, map_one' := h₁, map_mul' := h₂, map_zero' := h₃, map_add' := h₄ } =
    { toFun := f, map_zero' := h₃, map_add' := h₄ }


theorem mem_cons (a : α) : ∀ s : Seq α, a ∈ cons a s

{α : Type u}
(a : α)
(s : Stream'.Seq α)


lemma CharP.neg_one_ne_one [Ring R] (p : ℕ) [CharP R p] [Fact (2 < p)] : (-1 : R) ≠ (1 : R)

(R : Type u_1)
[Ring R]
(p : ℕ)
[CharP R p]
[Fact (2 < p)]


theorem RestrictScalars.addEquiv_symm_map_algebraMap_smul (r : R) (x : M) :
    (RestrictScalars.addEquiv R S M).symm (algebraMap R S r • x) =
      r • (RestrictScalars.addEquiv R S M).symm x

(R : Type u_1)
(S : Type u_2)
(M : Type u_3)
[AddCommMonoid M]
[CommSemiring R]
[Semiring S]
[Algebra R S]
[Module S M]
(r : R)
(x : M)

(RestrictScalars.addEquiv R S M).symm ((algebraMap R S) r • x) = r • (RestrictScalars.addEquiv R S M).symm x


/-- A set of points, whose `vectorSpan` is finite-dimensional, is
collinear if and only if their `vectorSpan` has dimension at most
`1`. -/
theorem collinear_iff_finrank_le_one {s : Set P} [FiniteDimensional k (vectorSpan k s)] :
    Collinear k s ↔ finrank k (vectorSpan k s) ≤ 1

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
[FiniteDimensional k ↥(vectorSpan k s)]

Collinear k s ↔ FiniteDimensional.finrank k ↥(vectorSpan k s) ≤ 1


@[to_additive (attr := simp)]
theorem mk_smul_mk (r : R) (x : M) (hx : x ∈ s) : r • (⟨x, hx⟩ : s) = ⟨r • x, smul_mem r hx⟩

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


private theorem eq_imp_of_iff_imp {x y : Prop} {p : x = y → Prop}
    (h : (he : x ↔ y) → p (propext he)) (he : x = y) : p he

{x y : Prop}
{p : x = y → Prop}
(h : ∀ (he : x ↔ y), p ⋯)
(he : x = y)


@[to_additive]
theorem Multipliable.hasProd (ha : Multipliable f) : HasProd f (∏' b, f b)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
(ha : Summable f)


theorem term_add_termg {α} [AddCommGroup α] (n₁ x a₁ n₂ a₂ n' a')
    (h₁ : n₁ + n₂ = n') (h₂ : a₁ + a₂ = a') :
    @termg α _ n₁ x a₁ + @termg α _ n₂ x a₂ = termg n' x a'

{α : Type u_1}
[AddCommGroup α]
(n₁ : ℤ)
(x a₁ : α)
(n₂ : ℤ)
(a₂ : α)
(n' : ℤ)
(a' : α)
(h₁ : n₁ + n₂ = n')
(h₂ : a₁ + a₂ = a')

Mathlib.Tactic.Abel.termg n₁ x a₁ + Mathlib.Tactic.Abel.termg n₂ x a₂ = Mathlib.Tactic.Abel.termg n' x a'


/-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g

(hw : CategoryTheory.CategoryStruct.comp hl.hom g.hom = f.hom := by aesop_cat)

(CategoryTheory.Over.isoMk hl hw).hom.left = hl.hom


@[deprecated (since := "2024-02-14")]
lemma int_cast_abs (n : ℤ) : |↑n| = Complex.abs n


/-- Uses `right` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `right` co(ntra)variant."]
theorem Right.inv_le_one_iff : a⁻¹ ≤ 1 ↔ 1 ≤ a

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

a⁻¹ ≤ 1 ↔ 1 ≤ a


theorem IndepSets.bUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)}
    {u : Set ι} (hyp : ∀ n ∈ u, IndepSets (s n) s' μ) :
    IndepSets (⋃ n ∈ u, s n) s' μ

(hyp : ∀ n ∈ u, ProbabilityTheory.IndepSets (s n) s' μ)

ProbabilityTheory.IndepSets (⋃ n ∈ u, s n) s' μ


/-- A complete lattice is a bounded lattice which has suprema and infima for every subset. -/
class CompleteLattice (α : Type*) extends Lattice α, CompleteSemilatticeSup α,
  CompleteSemilatticeInf α, Top α, Bot α where
  /-- Any element is less than the top one. -/
  protected le_top : ∀ x : α, x ≤ ⊤
  /-- Any element is more than the bottom one. -/
  protected bot_le : ∀ x : α, ⊥ ≤ x

{α : Type u_9}
[self : CompleteLattice α]
(x : α)


@[simp] lemma divp_mk0 (a : G₀) (hb : b ≠ 0) : a /ₚ Units.mk0 b hb = a / b

{G₀ : Type u_3}
[GroupWithZero G₀]
{b : G₀}
(a : G₀)
(hb : b ≠ 0)


/-- That the left options of `x * y` are less than itself and the right options are greater, which
  is part of the condition that `x * y` is numeric, is equivalent to the conjunction of various
  `MulOptionsLTMul` statements for `x`, `y` and their negations. We only show the forward
  direction. -/
lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :
    (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧
    (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y)

{x y : SetTheory.PGame}
(hn : (x * y).Numeric)

(Surreal.Multiplication.MulOptionsLTMul x y ∧ Surreal.Multiplication.MulOptionsLTMul (-x) (-y)) ∧
  Surreal.Multiplication.MulOptionsLTMul x (-y) ∧ Surreal.Multiplication.MulOptionsLTMul (-x) y


theorem exists_factors (a : α) :
    a ≠ 0 → ∃ f : Multiset α, (∀ b ∈ f, Irreducible b) ∧ Associated f.prod a

{α : Type u_1}
[CommMonoidWithZero α]
[WfDvdMonoid α]
(a : α)

a ≠ 0 → ∃ f, (∀ b ∈ f, Irreducible b) ∧ f.prod ~ᵤ a


@[simp]
theorem orderTop_single (h : r ≠ 0) : (single a r).orderTop = a

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a : Γ}
{r : R}
(h : r ≠ 0)


@[simp]
theorem mk'_mul_cancel_left (x : R) (y : M) : mk' S (y * x : R) y = (algebraMap R S) x

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(y : ↥M)

IsLocalization.mk' S (↑y * x) y = (algebraMap R S) x


@[reassoc]
theorem homEquiv_naturality_right_square (f : X' ⟶ X) (g : X ⟶ G.obj Y')
    (h : X' ⟶ G.obj Y) (k : Y ⟶ Y') (w : f ≫ g = h ≫ G.map k) :
    F.map f ≫ (adj.homEquiv X Y').symm g = (adj.homEquiv X' Y).symm h ≫ k

(w : CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp h (G.map k))

CategoryTheory.CategoryStruct.comp (F.map f) ((adj.homEquiv X Y').symm g) =
  CategoryTheory.CategoryStruct.comp ((adj.homEquiv X' Y).symm h) k


@[simp]
theorem val_mul (x y : { x : R // 0 < x }) : ↑(x * y) = (x * y : R)

{R : Type u_2}
[StrictOrderedSemiring R]
(x y : { x // 0 < x })


theorem SatisfiesM_foldrM [Monad m] [LawfulMonad m]
    {as : Array α} (motive : Nat → β → Prop)
    {init : β} (h0 : motive as.size init) {f : α → β → m β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → SatisfiesM (motive i.1) (f as[i] b)) :
    SatisfiesM (motive 0) (as.foldrM f init)

{f : α → β → m β}

(hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → SatisfiesM (motive ↑i) (f as[i] b))

SatisfiesM (motive 0) (Array.foldrM.fold f as 0 i hi b)


@[simp]
theorem mapEquiv_symm_apply (h : α ≃ β) (h' : α' ≃ β') (y : F β β') :
    (mapEquiv F h h' : F α α' ≃ F β β').symm y = bimap h.symm h'.symm y

{α β : Type u}
{α' β' : Type v}
(F : Type u → Type v → Type w)
[Bifunctor F]
[LawfulBifunctor F]
(h : α ≃ β)
(h' : α' ≃ β')
(y : F β β')

(Bifunctor.mapEquiv F h h').symm y = bimap (⇑h.symm) (⇑h'.symm) y


theorem mem_ideal_smul_span_iff_exists_sum' {ι : Type*} (s : Set ι) (f : ι → M) (x : M) :
    x ∈ I • span R (f '' s) ↔
    ∃ (a : s →₀ R) (_ : ∀ i, a i ∈ I), (a.sum fun i c => c • f i) = x

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(I : Ideal R)
{ι : Type u_4}
(s : Set ι)
(f : ι → M)
(x : M)

x ∈ I • Submodule.span R (f '' s) ↔ ∃ a, ∃ (_ : ∀ (i : ↑s), a i ∈ I), (a.sum fun i c => c • f ↑i) = x


/-- Formula for `hurwitzZeta s` as a Dirichlet series in the convergence range. We
restrict to `a ∈ Icc 0 1` to simplify the statement. -/
lemma hasSum_hurwitzZeta_of_one_lt_re {a : ℝ} (ha : a ∈ Icc 0 1) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℕ ↦ 1 / (n + a : ℂ) ^ s) (hurwitzZeta a s)

{a : ℝ}
(ha : a ∈ Set.Icc 0 1)
{s : ℂ}
(hs : 1 < s.re)

HasSum (fun n => 1 / (↑n + ↑a) ^ s) (HurwitzZeta.hurwitzZeta (↑a) s)


theorem sumInr_injective : (LHom.sumInr : L' →ᴸ L.sum L').Injective

{L : FirstOrder.Language}
{L' : FirstOrder.Language}


/-- The `p`-adic norm of a difference is at most the max of each component. Restates the archimedean
property of the `p`-adic norm. -/
protected theorem sub {q r : ℚ} : padicNorm p (q - r) ≤ max (padicNorm p q) (padicNorm p r)

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


theorem frobeniusPoly_zmod (n : ℕ) :
    MvPolynomial.map (Int.castRingHom (ZMod p)) (frobeniusPoly p n) = X n ^ p

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(MvPolynomial.map (Int.castRingHom (ZMod p))) (WittVector.frobeniusPoly p n) = MvPolynomial.X n ^ p


/-- The functor defined by the under categories.-/
@[simps] def mapFunctor : Tᵒᵖ  ⥤ Cat

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

(CategoryTheory.Under.mapFunctor T).obj X = CategoryTheory.Cat.of (CategoryTheory.Under (Opposite.unop X))


theorem rightAdjointSquare.comp_vhcomp
    (α : R₁ ⋙ G₁ ⟶ H₁ ⋙ R₃) (β : R₂ ⋙ H₁ ⟶ K₁ ⋙ R₄)
    (γ : R₃ ⋙ G₂ ⟶ H₂ ⋙ R₅) (δ : R₄ ⋙ H₂ ⟶ K₂ ⋙ R₆) :
    rightAdjointSquare.comp α β γ δ =
    rightAdjointSquare.vcomp (rightAdjointSquare.hcomp α β) (rightAdjointSquare.hcomp γ δ)

{A : Type u₁}
{B : Type u₂}
{C : Type u₃}
{D : Type u₄}
{E : Type u₅}
{F : Type u₆}
{X : Type u₇}
{Y : Type u₈}
{Z : Type u₉}
[CategoryTheory.Category.{v₁, u₁} A]
[CategoryTheory.Category.{v₂, u₂} B]
[CategoryTheory.Category.{v₃, u₃} C]
[CategoryTheory.Category.{v₄, u₄} D]
[CategoryTheory.Category.{v₅, u₅} E]
[CategoryTheory.Category.{v₆, u₆} F]
[CategoryTheory.Category.{v₇, u₇} X]
[CategoryTheory.Category.{v₈, u₈} Y]
[CategoryTheory.Category.{v₉, u₉} Z]
{G₁ : CategoryTheory.Functor A D}
{H₁ : CategoryTheory.Functor B E}
{K₁ : CategoryTheory.Functor C F}
{G₂ : CategoryTheory.Functor D X}
{H₂ : CategoryTheory.Functor E Y}
{K₂ : CategoryTheory.Functor F Z}
{R₁ : CategoryTheory.Functor B A}
{R₂ : CategoryTheory.Functor C B}
{R₃ : CategoryTheory.Functor E D}
{R₄ : CategoryTheory.Functor F E}
{R₅ : CategoryTheory.Functor Y X}
{R₆ : CategoryTheory.Functor Z Y}
(α : R₁.comp G₁ ⟶ H₁.comp R₃)
(β : R₂.comp H₁ ⟶ K₁.comp R₄)
(γ : R₃.comp G₂ ⟶ H₂.comp R₅)
(δ : R₄.comp H₂ ⟶ K₂.comp R₆)

CategoryTheory.rightAdjointSquare.comp α β γ δ =
  CategoryTheory.rightAdjointSquare.vcomp (CategoryTheory.rightAdjointSquare.hcomp α β)
    (CategoryTheory.rightAdjointSquare.hcomp γ δ)


lemma isZero₁_of_isZero₂₃ (h₂ : IsZero T.obj₂) (h₃ : IsZero T.obj₃) : IsZero T.obj₁

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(h₂ : CategoryTheory.Limits.IsZero T.obj₂)

(h₃ : CategoryTheory.Limits.IsZero T.obj₃)


theorem map_div_right_divisors :
    n.divisors.map ⟨fun d => (d, n / d), fun p₁ p₂ => congr_arg Prod.fst⟩ =
      n.divisorsAntidiagonal

Finset.map { toFun := fun d => (d, n / d), inj' := ⋯ } n.divisors = n.divisorsAntidiagonal


/-- The unit for the adjunction for `Cones.functoriality K G : Cone K ⥤ Cone (K ⋙ G)`.

Auxiliary definition for `functorialityIsRightAdjoint`.
-/
@[simps]
def functorialityUnit' :
    𝟭 (Cone (K ⋙ G)) ⟶ functorialityLeftAdjoint adj K ⋙ Cones.functoriality _ G

(c : CategoryTheory.Limits.Cone (K.comp G))

((adj.functorialityUnit' K).app c).hom = adj.unit.app c.pt


/-- The canonical functor `(C ⥤ D) ⥤ (Karoubi C ⥤ Karoubi D)` -/
@[simps!]
def functorExtension₂ : (C ⥤ D) ⥤ Karoubi C ⥤ Karoubi D

(C : Type u_1)
(D : Type u_2)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]

∀ {X Y : CategoryTheory.Functor C D} (f : X ⟶ Y) (P : CategoryTheory.Idempotents.Karoubi C),
  (((CategoryTheory.Idempotents.functorExtension₂ C D).map f).app P).f =
    CategoryTheory.CategoryStruct.comp (f.app P.X) (Y.map P.p)


@[simp]
theorem nextCoeff_X_sub_C [Ring S] (c : S) : nextCoeff (X - C c) = -c

(Polynomial.X - Polynomial.C c).nextCoeff = -c


/-- Given a pushout square assembled from a pushout square on the top and
a commuting square on the bottom, the bottom square is a pushout square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂
|            |
v₁₁          v₁₂
↓            ↓
X₂₁ - h₂₁ -> X₂₂
|            |
v₂₁          v₂₂
↓            ↓
X₃₁ - h₃₁ -> X₃₂
```
-/
theorem of_top {X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₂₁ : X₂₁ ⟶ X₂₂} {h₃₁ : X₃₁ ⟶ X₃₂}
    {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₂₁ : X₂₁ ⟶ X₃₁} {v₂₂ : X₂₂ ⟶ X₃₂}
    (s : IsPushout h₁₁ (v₁₁ ≫ v₂₁) (v₁₂ ≫ v₂₂) h₃₁) (p : h₂₁ ≫ v₂₂ = v₂₁ ≫ h₃₁)
    (t : IsPushout h₁₁ v₁₁ v₁₂ h₂₁) : IsPushout h₂₁ v₂₁ v₂₂ h₃₁

{X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C}

{h₁₁ : X₁₁ ⟶ X₁₂}

{h₂₁ : X₂₁ ⟶ X₂₂}

{h₃₁ : X₃₁ ⟶ X₃₂}

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

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

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

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

(s : CategoryTheory.IsPushout h₁₁ (v₁₁ ≫ v₂₁) (v₁₂ ≫ v₂₂) h₃₁)

(p : h₂₁ ≫ v₂₂ = v₂₁ ≫ h₃₁)

(t : CategoryTheory.IsPushout h₁₁ v₁₁ v₁₂ h₂₁)

CategoryTheory.IsPushout h₂₁ v₂₁ v₂₂ h₃₁


/-- The weak form of **Hindman's theorem**: in any finite cover of a nonempty semigroup, one of the
parts contains an FP-set. -/
@[to_additive exists_FS_of_finite_cover
      "The weak form of **Hindman's theorem**: in any finite cover
      of a nonempty additive semigroup, one of the parts contains an FS-set."]
theorem exists_FP_of_finite_cover {M} [Semigroup M] [Nonempty M] (s : Set (Set M)) (sfin : s.Finite)
    (scov : ⊤ ⊆ ⋃₀ s) : ∃ c ∈ s, ∃ a : Stream' M, FP a ⊆ c

{M : Type u_1}
[Semigroup M]
[Nonempty M]
(s : Set (Set M))
(sfin : s.Finite)
(scov : ⊤ ⊆ ⋃₀ s)


/-- The `Submonoid.closure` of a set is the union of `{1}` and its `Subsemigroup.closure`. -/
lemma closure_eq_one_union (s : Set M) :
    closure s = {(1 : M)} ∪ (Subsemigroup.closure s : Set M)

{M : Type u_1}
[MulOneClass M]
(s : Set M)

↑(Submonoid.closure s) = {1} ∪ ↑(Subsemigroup.closure s)


lemma coe_norm_smul_basis (p q : R[X]) :
    Algebra.norm R[X] (p • (1 : W.CoordinateRing) + q • mk W Y) =
      mk W ((C p + C q * X) * (C p + C q * (-(Y : R[X][Y]) - C (C W.a₁ * X + C W.a₃))))

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(p q : R[X])

(AdjoinRoot.of W.polynomial) ((Algebra.norm R[X]) (p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y)) =
  (WeierstrassCurve.Affine.CoordinateRing.mk W)
    ((Polynomial.C p + Polynomial.C q * Y) *
      (Polynomial.C p + Polynomial.C q * (-Y - Polynomial.C (Polynomial.C W.a₁ * Polynomial.X + Polynomial.C W.a₃))))


@[simp] theorem List.toFinset_finRange (n : ℕ) : (List.finRange n).toFinset = Finset.univ


theorem drop_sizeOf_le [SizeOf α] (l : List α) (n : Nat) : sizeOf (l.drop n) ≤ sizeOf l

{α : Type u_1}
[SizeOf α]
(l : List α)
(n : Nat)


/-- A constructor for `SuccOrder α` for `α` a linear order. -/
@[simps]
def SuccOrder.ofCore (succ : α → α) (hn : ∀ {a}, ¬IsMax a → ∀ b, a < b ↔ succ a ≤ b)
    (hm : ∀ a, IsMax a → succ a = a) : SuccOrder α

(hn : ∀ {a : α}, ¬IsMax a → ∀ (b : α), a < b ↔ succ a ≤ b)


@[simp]
theorem updateRow_ne [DecidableEq m] {i' : m} (i_ne : i' ≠ i) : updateRow M i b i' = M i'

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{M : Matrix m n α}
{i : m}
{b : n → α}
[DecidableEq m]
{i' : m}
(i_ne : i' ≠ i)


@[simp]
theorem aleph0_power_aleph0 : aleph0.{u} ^ aleph0.{u} = 𝔠

Cardinal.aleph0 ^ Cardinal.aleph0 = Cardinal.continuum


theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : MeasurableSet t)
    (ht : ∀ᵐ x ∂μ, f x ∈ t) : ∀ᵐ x ∂ν, g x ∈ t

(h : ProbabilityTheory.IdentDistrib f g μ ν)


@[simp]
theorem mk_eq_iff {φ ψ : K →+* ℂ} : mk φ = mk ψ ↔ φ = ψ ∨ ComplexEmbedding.conjugate φ = ψ

{K : Type u_2}
[Field K]
{φ ψ : K →+* ℂ}

NumberField.InfinitePlace.mk φ = NumberField.InfinitePlace.mk ψ ↔ φ = ψ ∨ NumberField.ComplexEmbedding.conjugate φ = ψ


theorem Smooth.div₀ (hf : Smooth I' I f) (hg : Smooth I' I g) (h₀ : ∀ x, g x ≠ 0) :
    Smooth I' I (f / g)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[GroupWithZero G]
[SmoothInv₀ I G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
(hf : Smooth I' I f)
(hg : Smooth I' I g)
(h₀ : ∀ (x : M), g x ≠ 0)


@[to_additive (attr := simp)]
theorem inv_lt_self_iff : a⁻¹ < a ↔ 1 < a

{α : Type u}
[LinearOrderedAddCommGroup α]
{a : α}


theorem coe_lt_iff (n : ℕ) (x : PartENat) : (n : PartENat) < x ↔ ∀ h : x.Dom, n < x.get h


theorem IsClosed.mem_of_nhdsWithin_neBot {s : Set α} (hs : IsClosed s) {x : α}
    (hx : NeBot <| 𝓝[s] x) : x ∈ s

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
(hs : IsClosed s)
{x : α}
(hx : (𝓝[s] x).NeBot)


theorem basisSets_singleton_mem (i : ι) {r : ℝ} (hr : 0 < r) : (p i).ball 0 r ∈ p.basisSets

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : SeminormFamily 𝕜 E ι)
(i : ι)
{r : ℝ}
(hr : 0 < r)


@[to_additive (attr := simp, norm_cast)]
theorem mem_toOpens : g ∈ (U : Opens G) ↔ g ∈ U

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
{U : OpenAddSubgroup G}
{g : G}

g ∈ ↑U ↔ g ∈ U


theorem not_isPredLimit_of_noMin [NoMinOrder α] [NoMaxOrder α] : ¬IsPredLimit a

{α : Type u_1}
[Preorder α]
{a : α}
[PredOrder α]
[IsPredArchimedean α]
[NoMinOrder α]
[NoMaxOrder α]


/-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(e : C ≌ D)

e.congrLeft.unitIso =
  CategoryTheory.Equivalence.adjointifyη (CategoryTheory.NatIso.ofComponents (fun F => (e.funInvIdAssoc F).symm) ⋯)
    (CategoryTheory.NatIso.ofComponents (fun F => e.invFunIdAssoc F) ⋯)


/-- **Krull's intersection theorem** for noetherian domains. -/
theorem Ideal.iInf_pow_eq_bot_of_isDomain [IsNoetherianRing R] [IsDomain R] (h : I ≠ ⊤) :
    ⨅ i : ℕ, I ^ i = ⊥

{R : Type u}
[CommRing R]
(I : Ideal R)
[IsNoetherianRing R]
[IsDomain R]
(h : I ≠ ⊤)


@[simp, nolint simpNF] theorem symm_symm_apply (f : α ≃ β) (b : α) : f.symm.symm b = f b

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


/-- Every nonzero natural number has a unique prime factorization -/
theorem factorization_inj : Set.InjOn factorization { x : ℕ | x ≠ 0 }


theorem continuous_decomposeProdAdjoint [TopologicalAddGroup A] [ContinuousStar A]
    [ContinuousConstSMul R A] : Continuous (StarModule.decomposeProdAdjoint R A)

(R : Type u_1)
(A : Type u_2)
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]
[TopologicalSpace A]
[TopologicalAddGroup A]
[ContinuousStar A]
[ContinuousConstSMul R A]

Continuous ⇑(StarModule.decomposeProdAdjoint R A)


protected theorem ext_iff (s₁ s₂ : AffineSubspace k P) : s₁ = s₂ ↔ (s₁ : Set P) = s₂

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

s₁ = s₂ ↔ ↑s₁ = ↑s₂


@[to_additive (attr := simp)]
lemma map_comp_mul [MulHomClass F M N] (f : F) (g h : ι → M) : f ∘ (g * h) = f ∘ g * f ∘ h

{ι : Type u_1}
{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[Mul M]
[Mul N]
[FunLike F M N]
[MulHomClass F M N]
(f : F)
(g h : ι → M)


/-- Typeclass for division rounded down. For each `a > 0`, this asserts the existence of a right
adjoint to the map `b ↦ a • b : β → β`. -/
class FloorDiv where
  /-- Flooring division. If `a > 0`, then `b ⌊/⌋ a` is the greatest `c` such that `a • c ≤ b`. -/
  floorDiv : β → α → β
  /-- Do not use this. Use `gc_floorDiv_smul` or `gc_floorDiv_mul` instead. -/
  protected floorDiv_gc ⦃a⦄ : 0 < a → GaloisConnection (a • ·) (floorDiv · a)
  /-- Do not use this. Use `floorDiv_nonpos` instead. -/
  protected floorDiv_nonpos ⦃a⦄ : a ≤ 0 → ∀ b, floorDiv b a = 0
  /-- Do not use this. Use `zero_floorDiv` instead. -/
  protected zero_floorDiv (a) : floorDiv 0 a = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[self : FloorDiv α β]
⦃a : α⦄


/-- A multiplicative isomorphism of monoids sends `1` to `1` (and is hence a monoid isomorphism). -/
@[to_additive
  "An additive isomorphism of additive monoids sends `0` to `0`
  (and is hence an additive monoid isomorphism)."]
protected theorem map_one (h : M ≃* N) : h 1 = 1

{M : Type u_6}
{N : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
(h : M ≃+ N)


@[to_additive lt_of_add_lt_add_right]
theorem lt_of_mul_lt_mul_right' [i : ContravariantClass α α (swap (· * ·)) (· < ·)] {a b c : α}
    (bc : b * a < c * a) :
    b < c

[i : ContravariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1]


theorem map_surjective {f : α →* β} (hf : Function.Surjective f) :
    Function.Surjective (ConjClasses.map f)

{α : Type u}
{β : Type v}
[Monoid α]
[Monoid β]
{f : α →* β}
(hf : Function.Surjective ⇑f)


theorem HasLineDerivAt.unique (h₀ : HasLineDerivAt 𝕜 f f₀' x v) (h₁ : HasLineDerivAt 𝕜 f f₁' x v) :
    f₀' = f₁'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{f₀' f₁' : F}
{x v : E}
(h₀ : HasLineDerivAt 𝕜 f f₀' x v)
(h₁ : HasLineDerivAt 𝕜 f f₁' x v)


theorem isEmpty_iff_eq_nil {l : List α} : l.isEmpty ↔ l = []


theorem pred_ne_pred_iff : pred a ≠ pred b ↔ a ≠ b

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


theorem Prime.dvd_iff_not_coprime {p n : ℕ} (pp : Prime p) : p ∣ n ↔ ¬Coprime p n


/-- The trivial commutative monoid object. We later show this is initial in `CommMon_ C`.
-/
@[simps!]
def trivial : CommMon_ C

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


protected theorem forall_coe {α : Type*} (s : Finset α) (p : s → Prop) :
    (∀ x : s, p x) ↔ ∀ (x : α) (h : x ∈ s), p ⟨x, h⟩

{α : Type u_4}
(s : Finset α)
(p : { x // x ∈ s } → Prop)

(∀ (x : { x // x ∈ s }), p x) ↔ ∀ (x : α) (h : x ∈ s), p ⟨x, h⟩


@[simp]
lemma mem_reverse : a ∈ l.reverse ↔ a.reverse ∈ l

{α : Type u_1}
{l : Language α}
{a : List α}


theorem eLpNorm'_const' [IsFiniteMeasure μ] (c : F) (hc_ne_zero : c ≠ 0) (hq_ne_zero : q ≠ 0) :
    eLpNorm' (fun _ : α => c) q μ = (‖c‖₊ : ℝ≥0∞) * μ Set.univ ^ (1 / q)

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
[MeasureTheory.IsFiniteMeasure μ]
(c : F)
(hc_ne_zero : c ≠ 0)
(hq_ne_zero : q ≠ 0)

MeasureTheory.eLpNorm' (fun x => c) q μ = ↑‖c‖₊ * μ Set.univ ^ (1 / q)


/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its line derivative at `x₀` in the direction `v` has norm
bounded by `C * ‖v‖`. This version only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a
neighborhood of `x`.
Version using `lineDeriv`. -/
theorem norm_lineDeriv_le_of_lip' {f : E → F} {x₀ : E}
    {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) :
    ‖lineDeriv 𝕜 f x₀ v‖ ≤ C * ‖v‖

(hlip : ∀ᶠ (x : E) in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖)


@[to_additive]
theorem map_comap_eq_of_surjective (S : Submonoid N) : (S.comap f).map f = S

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}
(hf : Function.Surjective ⇑f)
(S : Submonoid N)

Submonoid.map f (Submonoid.comap f S) = S


@[to_additive] lemma fst_prod (s : Multiset (α × β)) : s.prod.1 = (s.map Prod.fst).prod

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid α]
[AddCommMonoid β]
(s : Multiset (α × β))


theorem empty_theory_categorical (T : Language.empty.Theory) : κ.Categorical T

(κ : Cardinal.{w})
(T : FirstOrder.Language.empty.Theory)


@[simp]
lemma natCast_lt_toNNReal {r : ℝ} {n : ℕ} : n < r.toNNReal ↔ n < r


theorem iUnion₂_mono' {s : ∀ i, κ i → Set α} {t : ∀ i', κ' i' → Set α}
    (h : ∀ i j, ∃ i' j', s i j ⊆ t i' j') : ⋃ (i) (j), s i j ⊆ ⋃ (i') (j'), t i' j'

(h : ∀ (i : ι) (j : κ i), ∃ i' j', s i j ⊆ t i' j')


theorem reflection_orthogonal : reflection Kᗮ = .trans (reflection K) (.neg _)

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

reflection Kᗮ = (reflection K).trans (LinearIsometryEquiv.neg 𝕜)


theorem StrictConvex.affinity [ContinuousAdd E] (hs : StrictConvex 𝕜 s) (z : E) (c : 𝕝) :
    StrictConvex 𝕜 (z +ᵥ c • s)

{𝕜 : Type u_1}
{𝕝 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
[LinearOrderedField 𝕝]
[Module 𝕝 E]
[ContinuousConstSMul 𝕝 E]
[LinearMap.CompatibleSMul E E 𝕜 𝕝]
{s : Set E}
[ContinuousAdd E]
(hs : StrictConvex 𝕜 s)
(z : E)
(c : 𝕝)


@[to_additive one_lt_card_iff_ne_bot]
theorem one_lt_card_iff_ne_bot [Finite H] : 1 < Nat.card H ↔ H ≠ ⊥

{G : Type u_1}
[Group G]
(H : Subgroup G)
[Finite ↥H]


theorem WCovBy.Ioo_eq (h : a ⩿ b) : Ioo a b = ∅

{α : Type u_1}
[Preorder α]
{a b : α}
(h : a ⩿ b)


theorem nmem_hyperfilter_of_finite {s : Set α} (hf : s.Finite) : s ∉ hyperfilter α

{α : Type u}
[Infinite α]
{s : Set α}
(hf : s.Finite)


theorem derivWithin_const_mul (hxs : UniqueDiffWithinAt 𝕜 s x) (c : 𝔸)
    (hd : DifferentiableWithinAt 𝕜 d s x) :
    derivWithin (fun y => c * d y) s x = c * derivWithin d s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{d : 𝕜 → 𝔸}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(c : 𝔸)
(hd : DifferentiableWithinAt 𝕜 d s x)


theorem Measure.withDensityᵥ_absolutelyContinuous (μ : Measure α) (f : α → ℝ) :
    μ.withDensityᵥ f ≪ᵥ μ.toENNRealVectorMeasure

{α : Type u_1}
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(f : α → ℝ)


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

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

((s \ s₂).weightedVSubOfPoint p b) w - (s₂.weightedVSubOfPoint p b) (-w) = (s.weightedVSubOfPoint p b) w


@[simp]
theorem lift_toPath {C} [Category C] (φ : V ⥤q C) {X Y : V} (f : X ⟶ Y) :
    (lift φ).map f.toPath = φ.map f

{V : Type u₁}
[Quiver V]
{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(φ : V ⥤q C)
{X Y : V}
(f : X ⟶ Y)

(CategoryTheory.Paths.lift φ).map f.toPath = φ.map f


@[simp]
theorem toDualProd_apply (s : NonemptyInterval α) : s.toDualProd = (toDual s.fst, s.snd)

{α : Type u_1}
[LE α]
(s : NonemptyInterval α)

s.toDualProd = (OrderDual.toDual s.toProd.1, s.toProd.2)


theorem differentiableWithinAt_of_derivWithin_ne_zero (h : derivWithin f s x ≠ 0) :
    DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(h : derivWithin f s x ≠ 0)


@[fun_prop]
theorem HasStrictFDerivAt.sub_const (hf : HasStrictFDerivAt f f' x) (c : F) :
    HasStrictFDerivAt (fun x => f x - c) f' x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
(hf : HasStrictFDerivAt f f' x)
(c : F)


@[fun_prop]
theorem DifferentiableOn.clm_apply (hc : DifferentiableOn 𝕜 c s) (hu : DifferentiableOn 𝕜 u s) :
    DifferentiableOn 𝕜 (fun y => (c y) (u y)) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{u : E → G}
(hc : DifferentiableOn 𝕜 c s)
(hu : DifferentiableOn 𝕜 u s)


theorem Module.injective_iff_injective_object :
    Module.Injective R Q ↔
    CategoryTheory.Injective (ModuleCat.of R Q)

(R : Type u)
[Ring R]
(Q : Type v)
[AddCommGroup Q]
[Module R Q]


theorem pow_eq_pow_iff {a : R} (ha0 : a ≠ 0) (ha1 : ¬IsUnit a) {i j : ℕ} : a ^ i = a ^ j ↔ i = j

{R : Type u_2}
[CancelCommMonoidWithZero R]
[UniqueFactorizationMonoid R]
{a : R}
(ha0 : a ≠ 0)
(ha1 : ¬IsUnit a)
{i j : ℕ}


lemma two_not_dvd_two_mul_add_one (n : ℕ) : ¬2 ∣ 2 * n + 1


theorem pow_log_le_self (b : ℕ) {x : ℕ} (hx : x ≠ 0) : b ^ log b x ≤ x


@[to_additive]
theorem orbit_nonempty (a : α) : Set.Nonempty (orbit M a)

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


@[simp]
theorem fullSubcategoryInclusion.obj {X} : (fullSubcategoryInclusion Z).obj X = X.obj

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(Z : C → Prop)
{X : CategoryTheory.FullSubcategory Z}

(CategoryTheory.fullSubcategoryInclusion Z).obj X = X.obj


/-- If `M` and `M₂` are both `R`-semimodules and `S`-semimodules and `R`-semimodule structures
are defined by an action of `R` on `S` (formally, we have two scalar towers), then any `S`-linear
equivalence from `M` to `M₂` is also an `R`-linear equivalence.

See also `LinearMap.restrictScalars`. -/
@[simps]
def restrictScalars (f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂

(R : Type u_1)
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M]
[Module S M₂]
[LinearMap.CompatibleSMul M M₂ R S]
(f : M ≃ₗ[S] M₂)
(a : M)

(LinearEquiv.restrictScalars R f) a = f a


theorem eq_true_eq_not_eq_false (b : Bool) : (¬b = false) = (b = true)


/-- A normed space over a normed field is a vector space endowed with a norm which satisfies the
equality `‖c • x‖ = ‖c‖ ‖x‖`. We require only `‖c • x‖ ≤ ‖c‖ ‖x‖` in the definition, then prove
`‖c • x‖ = ‖c‖ ‖x‖` in `norm_smul`.

Note that since this requires `SeminormedAddCommGroup` and not `NormedAddCommGroup`, this
typeclass can be used for "semi normed spaces" too, just as `Module` can be used for
"semi modules". -/
class NormedSpace (𝕜 : Type*) (E : Type*) [NormedField 𝕜] [SeminormedAddCommGroup E]
    extends Module 𝕜 E where
  norm_smul_le : ∀ (a : 𝕜) (b : E), ‖a • b‖ ≤ ‖a‖ * ‖b‖

{𝕜 : Type u_6}
{E : Type u_7}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[self : NormedSpace 𝕜 E]
(a : 𝕜)
(b : E)

‖a • b‖ ≤ ‖a‖ * ‖b‖