lemma quasispectrum.not_isUnit_mem (a : A) {r : R} (hr : ¬ IsUnit r) : r ∈ quasispectrum R a

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalRing A]
[Module R A]
(a : A)
{r : R}
(hr : ¬IsUnit r)


/-- If `P` is separated for `R` and every family has an amalgamation, then `P` is a sheaf for `R`.
-/
theorem IsSeparatedFor.isSheafFor (t : IsSeparatedFor P R) :
    (∀ x : FamilyOfElements P R, x.Compatible → ∃ t, x.IsAmalgamation t) → IsSheafFor P R

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

(t : CategoryTheory.Presieve.IsSeparatedFor P R)

(∀ (x : CategoryTheory.Presieve.FamilyOfElements P R), x.Compatible → ∃ t, x.IsAmalgamation t) →
  CategoryTheory.Presieve.IsSheafFor P R


@[to_additive]
theorem le_div_iff_mul_le' : b ≤ c / a ↔ a * b ≤ c

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


/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
bounded by `C` on `s`, then the function is `C`-Lipschitz on `s`.
Version with `HasDerivWithinAt` and `LipschitzOnWith`. -/
theorem lipschitzOnWith_of_nnnorm_hasDerivWithin_le {C : ℝ≥0} (hs : Convex ℝ s)
    (hf : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) (bound : ∀ x ∈ s, ‖f' x‖₊ ≤ C) :
    LipschitzOnWith C f s


theorem IsClosed.not_specializes (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬x ⤳ y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(hs : IsClosed s)
(hx : x ∈ s)
(hy : y ∉ s)


theorem dist_coe_center_sq (z w : ℍ) (r : ℝ) : dist (z : ℂ) (w.center r) ^ 2 =
    2 * z.im * w.im * (Real.cosh (dist z w) - Real.cosh r) + (w.im * Real.sinh r) ^ 2

dist ↑z ↑(w.center r) ^ 2 = 2 * z.im * w.im * (Real.cosh (dist z w) - Real.cosh r) + (w.im * Real.sinh r) ^ 2


@[simp]
theorem piecewise_empty (f g : α →ₛ β) : piecewise ∅ MeasurableSet.empty f g = g

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

MeasureTheory.SimpleFunc.piecewise ∅ ⋯ f g = g


theorem isBigOWith_id : IsBigOWith ‖f‖ l f fun x => x

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_5}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)
(l : Filter E)

Asymptotics.IsBigOWith ‖f‖ l ⇑f fun x => x


lemma mapsTo_pow_toEnd_sub_algebraMap {φ : R} {k : ℕ} {x : L} :
    MapsTo ((toEnd R L M x - algebraMap R (Module.End R M) φ) ^ k) N N

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(N : LieSubmodule R L M)
{φ : R}
{k : ℕ}
{x : L}

Set.MapsTo ⇑(((LieModule.toEnd R L M) x - (algebraMap R (Module.End R M)) φ) ^ k) ↑N ↑N


@[simp]
lemma i_cyclesMk {i : ι} (x : (forget₂ C Ab).obj (K.X i)) (j : ι) (hj : c.next i = j)
    (hx : ((forget₂ C Ab).map (K.d i j)) x = 0) :
    ((forget₂ C Ab).map (K.iCycles i)) (K.cyclesMk x j hj hx) = x

(x : ↑((CategoryTheory.forget₂ C Ab).obj (K.X i)))

(hx : ((CategoryTheory.forget₂ C Ab).map (K.d i j)) x = 0)

((CategoryTheory.forget₂ C Ab).map (K.iCycles i)) (K.cyclesMk x j hj hx) = x


/-- The equivalence between isomorphisms of the form `A ≅ B` and `B.unop ≅ A.unop`.

Note this is definitionally the same as the other three variants:
* `(Opposite.op A ≅ B) ≃ (B.unop ≅ A)`
* `(A ≅ Opposite.op B) ≃ (B ≅ A.unop)`
* `(Opposite.op A ≅ Opposite.op B) ≃ (B ≅ A)`
-/
@[simps]
def isoOpEquiv (A B : Cᵒᵖ) : (A ≅ B) ≃ (B.unop ≅ A.unop)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(A B : Cᵒᵖ)
(f : A ≅ B)

(CategoryTheory.isoOpEquiv A B) f = f.unop


@[simp]
theorem star_mul_self_eq_zero_iff (x : E) : x⋆ * x = 0 ↔ x = 0

{E : Type u_2}
[NonUnitalNormedRing E]
[StarRing E]
[CstarRing E]
(x : E)


theorem isTheta_of_norm_eventuallyEq (h : (fun x ↦ ‖f x‖) =ᶠ[l] fun x ↦ ‖g x‖) : f =Θ[l] g

(h : (fun x => ‖f x‖) =ᶠ[l] fun x => ‖g x‖)


private lemma continuousAt_mul_symm3 {a b : EReal}
    (h : ContinuousAt (fun p : EReal × EReal ↦ p.1 * p.2) (a, b)) :
    ContinuousAt (fun p : EReal × EReal ↦ p.1 * p.2) (-a, -b)

(h : ContinuousAt (fun p => p.1 * p.2) (a, b))

ContinuousAt (fun p => p.1 * p.2) (-a, -b)


@[simp]
theorem coe_restrictScalars (f : ContinuousMultilinearMap A M₁ M₂) : ⇑(f.restrictScalars R) = f

(R : Type u)
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
{A : Type u_1}
[Semiring A]
[SMul R A]
[(i : ι) → Module A (M₁ i)]
[Module A M₂]
[∀ (i : ι), IsScalarTower R A (M₁ i)]
[IsScalarTower R A M₂]
(f : ContinuousMultilinearMap A M₁ M₂)

⇑(ContinuousMultilinearMap.restrictScalars R f) = ⇑f


@[simp]
theorem coeff_eq_a : P.toPoly.coeff 3 = P.a

{R : Type u_1}
{P : Cubic R}
[Semiring R]


theorem rootMultiplicity_mul_X_sub_C_pow {p : R[X]} {a : R} {n : ℕ} (h : p ≠ 0) :
    (p * (X - C a) ^ n).rootMultiplicity a = p.rootMultiplicity a + n

{R : Type u}
[CommRing R]
{p : R[X]}
{a : R}
{n : ℕ}
(h : p ≠ 0)

Polynomial.rootMultiplicity a (p * (Polynomial.X - Polynomial.C a) ^ n) = Polynomial.rootMultiplicity a p + n


@[to_additive (attr := simp)]
theorem sup_apply (x : E) : (p ⊔ q) x = p x ⊔ q x

{E : Type u_4}
[AddGroup E]
(p q : AddGroupNorm E)
(x : E)


theorem map_comap_le [RingHomSurjective σ₁₂] (f : F) (q : Submodule R₂ M₂) :
    map f (comap f q) ≤ q

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
(f : F)
(q : Submodule R₂ M₂)

Submodule.map f (Submodule.comap f q) ≤ q


theorem algebraMap_leftInverse :
    Function.LeftInverse algebraMapInv (algebraMap R <| FreeAlgebra R X)

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}

Function.LeftInverse ⇑FreeAlgebra.algebraMapInv ⇑(algebraMap R (FreeAlgebra R X))


theorem pairwise_pair {a b : α} : Pairwise R [a, b] ↔ R a b

{α : Type u_1}
{R : α → α → Prop}
{a b : α}


theorem ConcaveOn.smul {c : 𝕜} (hc : 0 ≤ c) (hf : ConcaveOn 𝕜 s f) :
    ConcaveOn 𝕜 s fun x => c • f x

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedCommSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{c : 𝕜}
(hc : 0 ≤ c)
(hf : ConcaveOn 𝕜 s f)


theorem setLIntegral_condDistrib_of_measurableSet (hX : Measurable X) (hY : AEMeasurable Y μ)
    (hs : MeasurableSet s) {t : Set α} (ht : MeasurableSet[mβ.comap X] t) :
    ∫⁻ a in t, condDistrib Y X μ (X a) s ∂μ = μ (t ∩ Y ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{Ω : Type u_3}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
{X : α → β}
{Y : α → Ω}
{mβ : MeasurableSpace β}
{s : Set Ω}
(hX : Measurable X)
(hY : AEMeasurable Y μ)
(hs : MeasurableSet s)
{t : Set α}
(ht : MeasurableSet t)

∫⁻ (a : α) in t, ((ProbabilityTheory.condDistrib Y X μ) (X a)) s ∂μ = μ (t ∩ Y ⁻¹' s)


theorem isNilpotent_jacobson_bot : IsNilpotent (Ideal.jacobson (⊥ : Ideal R))

{R : Type u_1}
[CommRing R]
[IsArtinianRing R]


/-- A kernel is finite if every measure in its image is finite, with a uniform bound. -/
class IsFiniteKernel (κ : Kernel α β) : Prop where
  exists_univ_le : ∃ C : ℝ≥0∞, C < ∞ ∧ ∀ a, κ a Set.univ ≤ C

[self : ProbabilityTheory.IsFiniteKernel κ]


theorem infinite_mul_of_not_infinitesimal_infinite {x y : ℝ*} :
    ¬Infinitesimal x → Infinite y → Infinite (x * y)

¬x.Infinitesimal → y.Infinite → (x * y).Infinite


@[simp]
theorem ker_rangeRestrict (f : R →+* S) : ker f.rangeRestrict = ker f

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

RingHom.ker f.rangeRestrict = RingHom.ker f


@[reassoc]
theorem curry_natural_left (f : X ⟶ X') (g : A ⨯ X' ⟶ Y) :
    curry (Limits.prod.map (𝟙 _) f ≫ g) = f ≫ curry g

CategoryTheory.CartesianClosed.curry
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id A) f) g) =
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.CartesianClosed.curry g)


/-- The span of the entire projective space is the top of the lattice of subspaces. -/
@[simp]
theorem span_univ : span (Set.univ : Set (ℙ K V)) = ⊤

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]

Projectivization.Subspace.span Set.univ = ⊤


@[simp]
theorem coe_ofNormedAddCommGroup {α : Type u} {β : Type v} [TopologicalSpace α]
    [SeminormedAddCommGroup β] (f : α → β) (Hf : Continuous f) (C : ℝ) (H : ∀ x, ‖f x‖ ≤ C) :
    (ofNormedAddCommGroup f Hf C H : α → β) = f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : α → β)
(Hf : Continuous f)
(C : ℝ)
(H : ∀ (x : α), ‖f x‖ ≤ C)

⇑(BoundedContinuousFunction.ofNormedAddCommGroup f Hf C H) = f


theorem repr_opow (a b) : repr (opow a b) = repr a ^ repr b


lemma KaehlerDifferential.polynomialEquiv_comp_D :
    (polynomialEquiv R).compDer (D R R[X]) = derivative'

(KaehlerDifferential.polynomialEquiv R).compDer (KaehlerDifferential.D R (Polynomial R)) = Polynomial.derivative'


lemma norm_natCast_cpow_of_pos {n : ℕ} (hn : 0 < n) (s : ℂ) :
    ‖(n : ℂ) ^ s‖ = (n : ℝ) ^ (s.re)


/-- (implementation) The forgetful functor from bundled actions to the underlying objects.

Use the `CategoryTheory.forget` API provided by the `ConcreteCategory` instance below,
rather than using this directly.
-/
@[simps]
def forget : Action V G ⥤ V

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)

∀ {X Y : Action V G} (f : X ⟶ Y), (Action.forget V G).map f = f.hom


theorem map_radical_of_surjective {f : R →+* S} (hf : Function.Surjective f) {I : Ideal R}
    (h : RingHom.ker f ≤ I) : map f I.radical = (map f I).radical

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
{f : R →+* S}
(hf : Function.Surjective ⇑f)
{I : Ideal R}
(h : RingHom.ker f ≤ I)

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


/-- If `f : α → β` is a constant both on $(-∞, a]$ and on $[b, +∞)$, then the extension of this
function from $[a, b]$ to the whole line is equal to the original function. -/
theorem IccExtend_eq_self (f : α → β) (ha : ∀ x < a, f x = f a) (hb : ∀ x, b < x → f x = f b) :
    IccExtend h (f ∘ (↑)) = f

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
(f : α → β)
(ha : ∀ x < a, f x = f a)
(hb : ∀ (x : α), b < x → f x = f b)


/-- Two solutions are equal if their `x` and `y` components are equal. -/
@[ext]
theorem ext {a b : Solution₁ d} (hx : a.x = b.x) (hy : a.y = b.y) : a = b

{d : ℤ}
{a b : Pell.Solution₁ d}
(hx : a.x = b.x)
(hy : a.y = b.y)


@[simp] theorem measureOf_eq_coe (m : OuterMeasure α) : m.measureOf = m

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)


/-- If two functions are a.e. equal on an open set and are continuous on this set, then they are
equal on this set. -/
theorem eqOn_open_of_ae_eq {f g : X → Y} (h : f =ᵐ[μ.restrict U] g) (hU : IsOpen U)
    (hf : ContinuousOn f U) (hg : ContinuousOn g U) : EqOn f g U

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{m : MeasurableSpace X}
[TopologicalSpace Y]
[T2Space Y]
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{U : Set X}
{f g : X → Y}
(h : f =ᵐ[μ.restrict U] g)
(hU : IsOpen U)
(hf : ContinuousOn f U)
(hg : ContinuousOn g U)


theorem max'_le (x) (H2 : ∀ y ∈ s, y ≤ x) : s.max' H ≤ x

{α : Type u_2}
[LinearOrder α]
(s : Finset α)
(H : s.Nonempty)
(x : α)
(H2 : ∀ y ∈ s, y ≤ x)


theorem Continuous.rpow_const (hf : Continuous f) (h : ∀ x, f x ≠ 0 ∨ 0 ≤ p) :
    Continuous fun x => f x ^ p

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{p : ℝ}
(hf : Continuous f)
(h : ∀ (x : α), f x ≠ 0 ∨ 0 ≤ p)


theorem Ideal.mem_prime_of_mul_mem_pow [IsDedekindDomain S] {P : Ideal S} [P_prime : P.IsPrime]
    (hP : P ≠ ⊥) {i : ℕ} {a b : S} (a_not_mem : a ∉ P ^ (i + 1)) (ab_mem : a * b ∈ P ^ (i + 1)) :
    b ∈ P

{S : Type u_1}
[CommRing S]
[IsDedekindDomain S]
{P : Ideal S}
[P_prime : P.IsPrime]
(hP : P ≠ ⊥)
{i : ℕ}
{a b : S}
(a_not_mem : a ∉ P ^ (i + 1))
(ab_mem : a * b ∈ P ^ (i + 1))


lemma natCast_succ_pos (n : ℕ) : 0 < (n.succ : ℤ)


protected theorem zero_mul (k : Fin (n + 1)) : (0 : Fin (n + 1)) * k = 0


protected theorem Nonempty.congr {α β} (f : α → β) (g : β → α) : Nonempty α ↔ Nonempty β

{α : Sort u_3}
{β : Sort u_4}
(f : α → β)
(g : β → α)


/-- If `f : ℝⁿ → E` is Bochner integrable w.r.t. a locally finite measure `μ` on a rectangular box
`I`, then it is McShane integrable on `I` with the same integral.  -/
theorem IntegrableOn.hasBoxIntegral [CompleteSpace E] {f : (ι → ℝ) → E} {μ : Measure (ι → ℝ)}
    [IsLocallyFiniteMeasure μ] {I : Box ι} (hf : IntegrableOn f I μ) (l : IntegrationParams)
    (hl : l.bRiemann = false) :
    HasIntegral.{u, v, v} I l f μ.toBoxAdditive.toSMul (∫ x in I, f x ∂μ)

(hf : MeasureTheory.IntegrableOn f (↑I) μ)

BoxIntegral.HasIntegral I l f μ.toBoxAdditive.toSMul (∫ (x : ι → ℝ) in ↑I, f x ∂μ)


theorem ProbabilityMeasure.tendsto_measure_of_null_frontier_of_tendsto' {Ω ι : Type*}
    {L : Filter ι} [MeasurableSpace Ω] [PseudoEMetricSpace Ω] [OpensMeasurableSpace Ω]
    [HasOuterApproxClosed Ω] {μ : ProbabilityMeasure Ω} {μs : ι → ProbabilityMeasure Ω}
    (μs_lim : Tendsto μs L (𝓝 μ)) {E : Set Ω} (E_nullbdry : (μ : Measure Ω) (frontier E) = 0) :
    Tendsto (fun i => (μs i : Measure Ω) E) L (𝓝 ((μ : Measure Ω) E))

{μ : MeasureTheory.ProbabilityMeasure Ω}

{μs : ι → MeasureTheory.ProbabilityMeasure Ω}

Filter.Tendsto (fun i => ↑(μs i) E) L (𝓝 (↑μ E))


theorem isSimpleOrder_Iic_iff_isAtom [PartialOrder α] [OrderBot α] {a : α} :
    IsSimpleOrder (Iic a) ↔ IsAtom a

{α : Type u_2}
[PartialOrder α]
[OrderBot α]
{a : α}


theorem le_iff_Icc : I ≤ J ↔ Box.Icc I ⊆ Box.Icc J

{ι : Type u_1}
{I J : BoxIntegral.Box ι}

I ≤ J ↔ BoxIntegral.Box.Icc I ⊆ BoxIntegral.Box.Icc J


theorem get_eq_of_promises {a} : s ~> a → get s = a

{α : Type u}
(s : Computation α)
[h : s.Terminates]
{a : α}


@[simp]
theorem intersperse_cons_cons (a b c : α) (tl : List α) :
    intersperse a (b :: c :: tl) = b :: a :: intersperse a (c :: tl)

List.intersperse a (b :: c :: tl) = b :: a :: List.intersperse a (c :: tl)


lemma map_ΨSq (n : ℤ) : (W.map f).ΨSq n = (W.ΨSq n).map f

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
(f : R →+* S)
(n : ℤ)

(W.map f).ΨSq n = Polynomial.map f (W.ΨSq n)


@[simp]
theorem multifork_ι (a) : (Multiequalizer.multifork I).ι a = Multiequalizer.ι I a

(I : CategoryTheory.Limits.MulticospanIndex C)

(CategoryTheory.Limits.Multiequalizer.multifork I).ι a = CategoryTheory.Limits.Multiequalizer.ι I a


/-- Naturally isomorphic endofunctors give equivalent categories of coalgebras.
Furthermore, they are equivalent as categories over `C`, that is,
we have `equiv_of_nat_iso h ⋙ forget = forget`.
-/
@[simps]
def equivOfNatIso {F G : C ⥤ C} (α : F ≅ G) : Coalgebra F ≌ Coalgebra G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : CategoryTheory.Functor C C}
(α : F ≅ G)

(CategoryTheory.Endofunctor.Coalgebra.equivOfNatIso α).inverse =
  CategoryTheory.Endofunctor.Coalgebra.functorOfNatTrans α.inv


@[simp] theorem min_some_some [Min α] {a b : α} : min (some a) (some b) = some (min a b)


theorem countable_cover_nhds [LindelofSpace X] {U : X → Set X} (hU : ∀ x, U x ∈ 𝓝 x) :
    ∃ t : Set X, t.Countable ∧ ⋃ x ∈ t, U x = univ

{X : Type u}
[TopologicalSpace X]
[LindelofSpace X]
{U : X → Set X}
(hU : ∀ (x : X), U x ∈ 𝓝 x)

∃ t, t.Countable ∧ ⋃ x ∈ t, U x = Set.univ


theorem val_lt {n : ℕ} [NeZero n] (a : ZMod n) : a.val < n


theorem isBigO_sub_rev (l : Filter E) (x : E) : (fun x' => x' - x) =O[l] fun x' => e (x' - x)

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_5}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₁ : 𝕜₂ →+* 𝕜}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
(e : E ≃SL[σ₁₂] F)
[RingHomIsometric σ₂₁]
(l : Filter E)
(x : E)


theorem respectsIso_of_isStableUnderComposition {P : MorphismProperty C}
    [P.IsStableUnderComposition] (hP : isomorphisms C ≤ P) :
    RespectsIso P

(hP : CategoryTheory.MorphismProperty.isomorphisms C ≤ P)


theorem addHaar_parallelepiped (b : Basis ι ℝ G) (v : ι → G) :
    b.addHaar (parallelepiped v) = ENNReal.ofReal |b.det v|

{ι : Type u_3}
{G : Type u_4}
[Fintype ι]
[DecidableEq ι]
[NormedAddCommGroup G]
[NormedSpace ℝ G]
[MeasurableSpace G]
[BorelSpace G]
(b : Basis ι ℝ G)
(v : ι → G)


theorem sum_antidiagonal_succ' {n : ℕ} {f : ℕ × ℕ → N} :
    (∑ p ∈ antidiagonal (n + 1), f p) = f (n + 1, 0) + ∑ p ∈ antidiagonal n, f (p.1, p.2 + 1)

{N : Type u_2}
[AddCommMonoid N]
{n : ℕ}
{f : ℕ × ℕ → N}

∑ p ∈ Finset.antidiagonal (n + 1), f p = f (n + 1, 0) + ∑ p ∈ Finset.antidiagonal n, f (p.1, p.2 + 1)


@[reassoc]
theorem pushout.inl_desc {W X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} [HasPushout f g] (h : Y ⟶ W)
    (k : Z ⟶ W) (w : f ≫ h = g ≫ k) : pushout.inl _ _ ≫ pushout.desc h k w = h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
[CategoryTheory.Limits.HasPushout f g]
(h : Y ⟶ W)
(k : Z ⟶ W)
(w : f ≫ h = g ≫ k)

CategoryTheory.Limits.pushout.inl f g ≫ CategoryTheory.Limits.pushout.desc h k w = h


theorem not_tendsto_const_atTop [Preorder α] [NoMaxOrder α] (x : α) (l : Filter β) [l.NeBot] :
    ¬Tendsto (fun _ => x) l atTop

{α : Type u_3}
{β : Type u_4}
[Preorder α]
[NoMaxOrder α]
(x : α)
(l : Filter β)
[l.NeBot]

¬Filter.Tendsto (fun x_1 => x) l Filter.atTop


/-- The order of the formal power series `X` is `1`. -/
@[simp]
theorem order_X : order (X : R⟦X⟧) = 1

{R : Type u_1}
[Semiring R]
[Nontrivial R]


@[simp]
theorem Tape.move_left_mk' {Γ} [Inhabited Γ] (L R : ListBlank Γ) :
    (Tape.mk' L R).move Dir.left = Tape.mk' L.tail (R.cons L.head)

{Γ : Type u_1}
[Inhabited Γ]
(L R : Turing.ListBlank Γ)

Turing.Tape.move Turing.Dir.left (Turing.Tape.mk' L R) = Turing.Tape.mk' L.tail (Turing.ListBlank.cons L.head R)


theorem Filter.TendstoNhdsWithinIio.mul_const [MulPosStrictMono 𝕜] [MulPosReflectLT 𝕜]
    (h : Tendsto f l (𝓝[<] c)) : Tendsto (fun a => f a * b) l (𝓝[<] (c * b))

{α : Type u_2}
{𝕜 : Type u_6}
[Preorder 𝕜]
[Zero 𝕜]
[Mul 𝕜]
[TopologicalSpace 𝕜]
[ContinuousMul 𝕜]
{l : Filter α}
{f : α → 𝕜}
{b c : 𝕜}
(hb : 0 < b)
[MulPosStrictMono 𝕜]
[MulPosReflectLT 𝕜]
(h : Filter.Tendsto f l (𝓝[<] c))

Filter.Tendsto (fun a => f a * b) l (𝓝[<] (c * b))


theorem Subpresheaf.eq_top_iff_isIso : G = ⊤ ↔ IsIso G.ι

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)


lemma iterate_even (hf : Involutive f) (hn : Even n) : f^[n] = id

{α : Type u_5}
{f : α → α}
{n : ℕ}
(hf : Function.Involutive f)
(hn : Even n)


/-- Isomorphic functors become equal when lowered to `Subobject`.
(It's not as evil as usual to talk about equality between functors
because the categories are thin and skeletal.) -/
theorem lower_iso (F₁ F₂ : MonoOver X ⥤ MonoOver Y) (h : F₁ ≅ F₂) : lower F₁ = lower F₂

(F₁ F₂ : CategoryTheory.Functor (CategoryTheory.MonoOver X) (CategoryTheory.MonoOver Y))

CategoryTheory.Subobject.lower F₁ = CategoryTheory.Subobject.lower F₂


theorem mem_iff_star_mul_self {U : R} : U ∈ unitary R ↔ star U * U = 1

{R : Type u_1}
[CommMonoid R]
[StarMul R]
{U : R}


theorem Nonempty.mono {s t : Finset α} (hst : s ⊆ t) (hs : s.Nonempty) : t.Nonempty

{α : Type u_1}
{s t : Finset α}
(hst : s ⊆ t)
(hs : s.Nonempty)


/-- Version of `succ_one_eq_two` to be used by `dsimp` -/
@[simp] theorem succ_one_eq_two : Fin.succ (1 : Fin (n + 2)) = 2


@[elab_as_elim]
theorem DenseRange.induction_on [TopologicalSpace β] {e : α → β} (he : DenseRange e) {p : β → Prop}
    (b₀ : β) (hp : IsClosed { b | p b }) (ih : ∀ a : α, p <| e a) : p b₀

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace β]
{e : α → β}
(he : DenseRange e)
{p : β → Prop}
(b₀ : β)
(hp : IsClosed {b | p b})
(ih : ∀ (a : α), p (e a))


/-- Note that the `SMulCommClass α β β` typeclass argument is usually satisfied by `Algebra α β`. -/
@[to_additive] -- Porting note: nolint to_additive_doc
lemma mul_smul_comm [Mul β] [SMul α β] [SMulCommClass α β β] (s : α) (x y : β) :
    x * s • y = s • (x * y)

{α : Type u_7}
{β : Type u_8}
[Add β]
[VAdd α β]
[VAddCommClass α β β]
(s : α)
(x y : β)


theorem isAtomic_iff_forall_isAtomic_Iic [OrderBot α] :
    IsAtomic α ↔ ∀ x : α, IsAtomic (Set.Iic x)

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

IsAtomic α ↔ ∀ (x : α), IsAtomic ↑(Set.Iic x)


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

{G : Type u_1}
[AddCommGroup G]
(a b : G)


theorem diam_cthickening_le {α : Type*} [PseudoMetricSpace α] (s : Set α) (hε : 0 ≤ ε) :
    diam (cthickening ε s) ≤ diam s + 2 * ε

{ε : ℝ}
{α : Type u_2}
[PseudoMetricSpace α]
(s : Set α)
(hε : 0 ≤ ε)

Metric.diam (Metric.cthickening ε s) ≤ Metric.diam s + 2 * ε


theorem measurable_of_empty [IsEmpty α] (f : α → β) : Measurable f

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


/-- The trivial zeroes of the cosine zeta function. -/
theorem cosZeta_neg_two_mul_nat_add_one (a : UnitAddCircle) (n : ℕ) :
    cosZeta a (-2 * (n + 1)) = 0

HurwitzZeta.cosZeta a (-2 * (↑n + 1)) = 0


lemma summable_exp_neg_nat : Summable fun n : ℕ ↦ exp (-n)


@[simp]
theorem coe_pullback {Z : C} (f : Y ⟶ X) (g : Z ⟶ Y) (S : J.Cover X) :
    (S.pullback f) g ↔ S (g ≫ f)

{J : CategoryTheory.GrothendieckTopology C}

(S.pullback f).sieve.arrows g ↔ S.sieve.arrows (CategoryTheory.CategoryStruct.comp g f)


theorem mk_mem_interedges_comm : (a, b) ∈ G.interedges s t ↔ (b, a) ∈ G.interedges t s

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
{s t : Finset α}
{a b : α}


theorem realize_relabel_sum_inr (φ : L.Formula (Fin n)) {v : Empty → M} {x : Fin n → M} :
    (BoundedFormula.relabel Sum.inr φ).Realize v x ↔ φ.Realize x

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{n : ℕ}
(φ : L.Formula (Fin n))
{v : Empty → M}
{x : Fin n → M}

(FirstOrder.Language.BoundedFormula.relabel Sum.inr φ).Realize v x ↔ φ.Realize x


/-- The angle ∡AAB at a point. -/
@[simp]
theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0

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


@[simp]
lemma not_uncountable [Countable α] : ¬Uncountable α


@[simp]
theorem rescale_zero : rescale 0 = (C R).comp (constantCoeff R)

PowerSeries.rescale 0 = (PowerSeries.C R).comp (PowerSeries.constantCoeff R)


lemma IsHamiltonianCycle.isCycle (hp : p.IsHamiltonianCycle) : p.IsCycle

{α : Type u_1}
[DecidableEq α]
{G : SimpleGraph α}
{a : α}
{p : G.Walk a a}
(hp : p.IsHamiltonianCycle)


theorem exists_smodEq (pb : PowerBasis A B) (b : B) :
    ∃ a, SModEq (Ideal.span ({pb.gen})) b (algebraMap A B a)

{A : Type u_4}
{B : Type u_5}
[CommRing A]
[CommRing B]
[Algebra A B]
(pb : PowerBasis A B)
(b : B)

∃ a, b ≡ (algebraMap A B) a [SMOD Ideal.span {pb.gen}]


@[to_additive]
theorem MonoidHom.map_finprod_of_injective (g : M →* N) (hg : Injective g) (f : α → M) :
    g (∏ᶠ i, f i) = ∏ᶠ i, g (f i)

{M : Type u_2}
{N : Type u_3}
{α : Sort u_4}
[AddCommMonoid M]
[AddCommMonoid N]
(g : M →+ N)
(hg : Function.Injective ⇑g)
(f : α → M)

g (∑ᶠ (i : α), f i) = ∑ᶠ (i : α), g (f i)


theorem filter_eq_sum (p : α → Prop) [DecidablePred p] (f : α →₀ M) :
    f.filter p = ∑ i ∈ f.support.filter p, single i (f i)

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(p : α → Prop)
[DecidablePred p]
(f : α →₀ M)

Finsupp.filter p f = ∑ i ∈ Finset.filter p f.support, Finsupp.single i (f i)


theorem Additive.isAddSubmonoid {s : Set M} :
    IsSubmonoid s → @IsAddSubmonoid (Additive M) _ s


@[simp]
theorem kahler_apply_self (x : E) : o.kahler x x = ‖x‖ ^ 2

[Fact (FiniteDimensional.finrank ℝ E = 2)]


@[simp]
theorem coe_pi_add_coe_pi : (π : Real.Angle) + π = 0


@[simp]
theorem ofAdd_zsmul [SubNegMonoid α] (z : ℤ) (a : α) : ofAdd (z • a) = ofAdd a ^ z

{α : Type u}
[SubNegMonoid α]
(z : ℤ)
(a : α)

Multiplicative.ofAdd (z • a) = Multiplicative.ofAdd a ^ z


theorem toFinset_eq_singleton_iff (s : Multiset α) (a : α) :
    s.toFinset = {a} ↔ card s ≠ 0 ∧ s = card s • {a}

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

s.toFinset = {a} ↔ Multiset.card s ≠ 0 ∧ s = Multiset.card s • {a}


@[simp, mfld_simps] theorem toFun_as_coe (e : α ≃ β) : e.toFun = e


lemma not_mem_mutuallySingularSetSlice (κ η : Kernel α γ) (a : α) (x : γ) :
    x ∉ mutuallySingularSetSlice κ η a ↔ rnDerivAux κ (κ + η) a x < 1

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

x ∉ κ.mutuallySingularSetSlice η a ↔ κ.rnDerivAux (κ + η) a x < 1


/-- `SlashInvariantFormClass F Γ k` asserts `F` is a type of bundled functions that are invariant
under the `SlashAction`. -/
class SlashInvariantFormClass [FunLike F ℍ ℂ] : Prop where
  slash_action_eq : ∀ (f : F) (γ : Γ), (f : ℍ → ℂ) ∣[k] γ = f

{F : Type u_1}
{Γ : outParam (Subgroup SL(2, ℤ))}
{k : outParam ℤ}
[FunLike F ℍ ℂ]
[self : SlashInvariantFormClass F Γ k]
(f : F)
(γ : ↥Γ)


theorem le_def {r s : Setoid α} : r ≤ s ↔ ∀ {x y}, r.Rel x y → s.Rel x y

r ≤ s ↔ ∀ {x y : α}, r.Rel x y → s.Rel x y


@[simp]
theorem symm_dual_id : BotHom.dual.symm (TopHom.id _) = BotHom.id α

BotHom.dual.symm (TopHom.id αᵒᵈ) = BotHom.id α


theorem has_map_eq_map {β} (f : α → β) (c : Computation α) : f <$> c = map f c

{α β : Type u}
(f : α → β)
(c : Computation α)


@[to_additive (attr := simp)] lemma mulEnergy_pos_iff : 0 < Eₘ[s, t] ↔ s.Nonempty ∧ t.Nonempty

{α : Type u_1}
[DecidableEq α]
[Mul α]
{s t : Finset α}

0 < s.mulEnergy t ↔ s.Nonempty ∧ t.Nonempty


theorem iteratedPDeriv_eq_iteratedFDeriv {n : ℕ} {m : Fin n → E} {f : 𝓢(E, F)} {x : E} :
    iteratedPDeriv 𝕜 m f x = iteratedFDeriv ℝ n f x m

(𝕜 : Type u_1)
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
{n : ℕ}
{m : Fin n → E}
{f : SchwartzMap E F}
{x : E}

((SchwartzMap.iteratedPDeriv 𝕜 m) f) x = (iteratedFDeriv ℝ n (⇑f) x) m


/-- A Lie module is a module over a commutative ring, together with a linear action of a Lie
algebra on this module, such that the Lie bracket acts as the commutator of endomorphisms. -/
class LieModule (R : Type u) (L : Type v) (M : Type w) [CommRing R] [LieRing L] [LieAlgebra R L]
  [AddCommGroup M] [Module R M] [LieRingModule L M] : Prop where
  /-- A Lie module bracket is compatible with scalar multiplication in its first argument. -/
  protected smul_lie : ∀ (t : R) (x : L) (m : M), ⁅t • x, m⁆ = t • ⁅x, m⁆
  /-- A Lie module bracket is compatible with scalar multiplication in its second argument. -/
  protected lie_smul : ∀ (t : R) (x : L) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[self : LieModule R L M]
(t : R)
(x : L)
(m : M)


/-- When the first map `S.f` is zero, this is the right homology data on `S` given
by any limit kernel fork of `S.g` -/
@[simps]
def ofIsLimitKernelFork (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    S.RightHomologyData

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

(CategoryTheory.ShortComplex.RightHomologyData.ofIsLimitKernelFork S hf c hc).Q = S.X₂


lemma predAbove_castPred_of_lt (p i : Fin (n + 1)) (h : p < i) (hp := Fin.ne_last_of_lt h)
  (hi := Fin.ne_zero_of_lt h) : (castPred p hp).predAbove i = pred i hi

{n : ℕ}
(p i : Fin (n + 1))
(h : p < i)
(hp : p ≠ Fin.last n := ⋯)
(hi : i ≠ 0 := ⋯)


/-- An antitone function continuous at the indexed infimum over a nonempty `Sort` sends this indexed
infimum to the indexed supremum of the composition. -/
theorem Antitone.map_iInf_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α}
    (Cf : ContinuousAt f (iInf g)) (Af : Antitone f)
    (bdd : BddBelow (range g) := by bddDefault) : f (⨅ i, g i) = ⨆ i, f (g i)

(bdd : BddBelow (Set.range g) := by bddDefault)


@[reassoc (attr := simp)]
theorem ι_comp_coequalizerComparison [HasCoequalizer f g] [HasCoequalizer (G.map f) (G.map g)] :
    coequalizer.π _ _ ≫ coequalizerComparison f g G = G.map (coequalizer.π _ _)

[CategoryTheory.Limits.HasCoequalizer (G.map f) (G.map g)]

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.coequalizer.π (G.map f) (G.map g))
    (CategoryTheory.Limits.coequalizerComparison f g G) =
  G.map (CategoryTheory.Limits.coequalizer.π f g)


theorem Codisjoint.bihimp_eq_inf {a b : α} (h : Codisjoint a b) : a ⇔ b = a ⊓ b

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


theorem Memℒp.re (hf : Memℒp f p μ) : Memℒp (fun x => RCLike.re (f x)) p μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : α → 𝕜}
(hf : MeasureTheory.Memℒp f p μ)

MeasureTheory.Memℒp (fun x => RCLike.re (f x)) p μ


@[simp]
theorem coe_eq_coe {x y : α} :
    (x : ConnectedComponents α) = y ↔ connectedComponent x = connectedComponent y

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

ConnectedComponents.mk x = ConnectedComponents.mk y ↔ connectedComponent x = connectedComponent y


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
protected theorem smul {𝕜} [TopologicalSpace 𝕜] [SMul 𝕜 β] [ContinuousSMul 𝕜 β] {f : α → 𝕜}
    {g : α → β} (hf : StronglyMeasurable f) (hg : StronglyMeasurable g) :
    StronglyMeasurable fun x => f x • g x

(hf : MeasureTheory.StronglyMeasurable f)

(hg : MeasureTheory.StronglyMeasurable g)

MeasureTheory.StronglyMeasurable fun x => f x +ᵥ g x


/-- An additive semigroup homomorphism `AddHom M N` can equivalently be viewed as an additive
homomorphism `AddHom Mᵐᵒᵖ Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on
morphisms. -/
@[simps]
def AddHom.mulOp {M N} [Add M] [Add N] : AddHom M N ≃ AddHom Mᵐᵒᵖ Nᵐᵒᵖ

{M : Type u_2}
{N : Type u_3}
[Add M]
[Add N]
(f : AddHom Mᵐᵒᵖ Nᵐᵒᵖ)

∀ (a : M), (AddHom.mulOp.symm f) a = (MulOpposite.unop ∘ ⇑f ∘ MulOpposite.op) a


lemma floorRoot_ne_zero : floorRoot n a ≠ 0 ↔ n ≠ 0 ∧ a ≠ 0


theorem Ioi_disjUnion_Iio (a : α) :
    (Ioi a).disjUnion (Iio a) (disjoint_Ioi_Iio a) = ({a} : Finset α)ᶜ

{α : Type u_2}
[LinearOrder α]
[Fintype α]
[LocallyFiniteOrderTop α]
[LocallyFiniteOrderBot α]
(a : α)

(Finset.Ioi a).disjUnion (Finset.Iio a) ⋯ = {a}ᶜ


/-- If `E / F` is algebraic, then `E` is purely inseparable over the
separable closure of `F` in `E`. -/
theorem separableClosure.isPurelyInseparable [Algebra.IsAlgebraic F E] :
    IsPurelyInseparable (separableClosure F E) E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsAlgebraic F E]

IsPurelyInseparable (↥(separableClosure F E)) E


/-- If `x'` is a dual element such that the norms `‖x' z‖` are bounded for `z ∈ s`, then a
small scalar multiple of `x'` is in `polar 𝕜 s`. -/
theorem smul_mem_polar {s : Set E} {x' : Dual 𝕜 E} {c : 𝕜} (hc : ∀ z, z ∈ s → ‖x' z‖ ≤ ‖c‖) :
    c⁻¹ • x' ∈ polar 𝕜 s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{x' : NormedSpace.Dual 𝕜 E}
{c : 𝕜}
(hc : ∀ z ∈ s, ‖x' z‖ ≤ ‖c‖)


theorem sups_subset_right : s₁ ⊆ s₂ → s₁ ⊻ t ⊆ s₂ ⊻ t

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

s₁ ⊆ s₂ → s₁ ⊻ t ⊆ s₂ ⊻ t


@[simp]
theorem iSup_neg {p : Prop} {f : p → α} (hp : ¬p) : ⨆ h : p, f h = ⊥

{α : Type u_1}
[CompleteLattice α]
{p : Prop}
{f : p → α}
(hp : ¬p)


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv (s : Finset α) : ↑s⁻¹ = (s : Set α)⁻¹

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


/-- The unitary elements embed into the units. -/
@[simps]
def toUnits : unitary R →* Rˣ

{R : Type u_1}
[Monoid R]
[StarMul R]
(x : ↥(unitary R))


@[simp, norm_cast]
theorem coe_mul_unitSphere [NormedDivisionRing 𝕜] (x y : sphere (0 : 𝕜) 1) :
    ↑(x * y) = (x * y : 𝕜)

{𝕜 : Type u_1}
[NormedDivisionRing 𝕜]
(x y : ↑(Metric.sphere 0 1))


@[gcongr]
theorem sInf_le_sInf (h : s ⊆ t) : sInf t ≤ sInf s

{α : Type u_1}
[CompleteSemilatticeInf α]
{s t : Set α}
(h : s ⊆ t)


theorem Pi.continuous_postcomp [TopologicalSpace Y] {g : X → Y} (hg : Continuous g) :
    Continuous (g ∘ · : (ι → X) → (ι → Y))

{X : Type u}
{Y : Type v}
{ι : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
{g : X → Y}
(hg : Continuous g)


lemma filter_attach (s : Multiset α) (p : α → Prop) [DecidablePred p] :
    (s.attach.filter fun a : {a // a ∈ s} ↦ p ↑a) =
      (s.filter p).attach.map (Subtype.map id fun _ ↦ Multiset.mem_of_mem_filter)

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

Multiset.filter (fun a => p ↑a) s.attach = Multiset.map (Subtype.map id ⋯) (Multiset.filter p s).attach


theorem convexBodySum_mem {x : K} :
    mixedEmbedding K x ∈ (convexBodySum K B) ↔
      ∑ w : InfinitePlace K, (mult w) * w.val x ≤ B

(K : Type u_1)
[Field K]
[NumberField K]
(B : ℝ)
{x : K}

(NumberField.mixedEmbedding K) x ∈ NumberField.mixedEmbedding.convexBodySum K B ↔
  ∑ w : NumberField.InfinitePlace K, ↑w.mult * ↑w x ≤ B


theorem measure_closedBall_le_integral : (μ (closedBall c f.rIn)).toReal ≤ ∫ x, f x ∂μ

(μ (Metric.closedBall c f.rIn)).toReal ≤ ∫ (x : E), ↑f x ∂μ


/-- Extract the equation from a morphism in a discrete category. -/
theorem eq_of_hom {X Y : Discrete α} (i : X ⟶ Y) : X.as = Y.as

{α : Type u₁}
{X Y : CategoryTheory.Discrete α}
(i : X ⟶ Y)


@[simp, nolint simpNF]
theorem limsup_nat_add (f : ℕ → α) (k : ℕ) : limsup (fun i => f (i + k)) atTop = limsup f atTop

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

Filter.limsup (fun i => f (i + k)) Filter.atTop = Filter.limsup f Filter.atTop


theorem DirectSum.IsInternal.collectedBasis_orthonormal [DecidableEq ι] {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
    (hV_sum : DirectSum.IsInternal fun i => V i) {α : ι → Type*}
    {v_family : ∀ i, Basis (α i) 𝕜 (V i)} (hv_family : ∀ i, Orthonormal 𝕜 (v_family i)) :
    Orthonormal 𝕜 (hV_sum.collectedBasis v_family)

(hV : OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ)

{v_family : (i : ι) → Basis (α i) 𝕜 ↥(V i)}

(hv_family : ∀ (i : ι), Orthonormal 𝕜 ⇑(v_family i))

Orthonormal 𝕜 ⇑(hV_sum.collectedBasis v_family)


theorem iSup_inf_of_monotone {ι : Type*} [Preorder ι] [IsDirected ι (· ≤ ·)] {f g : ι → α}
    (hf : Monotone f) (hg : Monotone g) : ⨆ i, f i ⊓ g i = (⨆ i, f i) ⊓ ⨆ i, g i

{α : Type u}
[Order.Frame α]
{ι : Type u_1}
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{f g : ι → α}
(hf : Monotone f)
(hg : Monotone g)


theorem infinitesimal_sub_st {x : ℝ*} (hx : ¬Infinite x) : Infinitesimal (x - ↑(st x))


@[reassoc (attr := simp)]
lemma iCycles_g : S.iCycles ≫ S.g = 0

CategoryTheory.CategoryStruct.comp S.iCycles S.g = 0


theorem mem_top (x : E) : x ∈ (⊤ : ConvexCone 𝕜 E)

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(x : E)


theorem degreeOf_mul_X_eq (j : σ) (f : MvPolynomial σ R) :
    degreeOf j (f * X j) ≤ degreeOf j f + 1

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(j : σ)
(f : MvPolynomial σ R)

MvPolynomial.degreeOf j (f * MvPolynomial.X j) ≤ MvPolynomial.degreeOf j f + 1


theorem range_eq_map (f : R →ₙ+* S) : f.range = NonUnitalSubring.map f ⊤

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(f : R →ₙ+* S)


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

∀ {X Y : PartialFun} (f : X ⟶ Y) (a : Option X),
  (partialFunEquivPointed.functor.map f).toFun a = Option.elim' none (fun a => (f a).toOption) a


theorem isUnit_map (f : α →+* β) {a : α} : IsUnit a → IsUnit (f a)

{α : Type u_2}
{β : Type u_3}
[Semiring α]
[Semiring β]
(f : α →+* β)
{a : α}


theorem Complex.sin_eq_tsum (z : ℂ) :
    Complex.sin z = ∑' n : ℕ, (-1) ^ n * z ^ (2 * n + 1) / ↑(2 * n + 1)!


/-- Permuting the rows changes the sign of the determinant. -/
theorem det_permute' (σ : Perm n) (M : Matrix n n R) :
    (M.submatrix id σ).det = Perm.sign σ * M.det

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(σ : Equiv.Perm n)
(M : Matrix n n R)

(M.submatrix id ⇑σ).det = ↑↑(Equiv.Perm.sign σ) * M.det


@[simp]
theorem lTensor_neg (f : N →ₗ[R] P) : (-f).lTensor M = -f.lTensor M

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
(f : N →ₗ[R] P)

LinearMap.lTensor M (-f) = -LinearMap.lTensor M f


@[simp]
theorem splitLower_eq_self : I.splitLower i x = I ↔ I.upper i ≤ x

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{i : ι}
{x : ℝ}


/-- For each `1 ≤ p < ∞`, the linear span of the monomials `fourier n` is dense in
`Lp ℂ p haarAddCircle`. -/
theorem span_fourierLp_closure_eq_top {p : ℝ≥0∞} [Fact (1 ≤ p)] (hp : p ≠ ∞) :
    (span ℂ (range (@fourierLp T _ p _))).topologicalClosure = ⊤

{T : ℝ}
[hT : Fact (0 < T)]
{p : ℝ≥0∞}
[Fact (1 ≤ p)]
(hp : p ≠ ⊤)

(Submodule.span ℂ (Set.range (fourierLp p))).topologicalClosure = ⊤


theorem ker_evalRingHom (x : R) : RingHom.ker (evalRingHom x) = Ideal.span {X - C x}

RingHom.ker (Polynomial.evalRingHom x) = Ideal.span {Polynomial.X - Polynomial.C x}


protected theorem gt [LT α] {x y : α} (h : x < y) : y > x

{α : Type u_2}
[LT α]
{x y : α}
(h : x < y)


/-- In a directed order, the union of two sets is bounded above if and only if both sets are. -/
theorem bddAbove_union [IsDirected α (· ≤ ·)] {s t : Set α} :
    BddAbove (s ∪ t) ↔ BddAbove s ∧ BddAbove t

{α : Type u}
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
{s t : Set α}


/-- If the first `n` derivatives within a set of a function are continuous, and its first `n-1`
derivatives are differentiable, then the function is `C^n`. This is not an equivalence in general,
but this is an equivalence when the set has unique derivatives, see
`contDiffOn_iff_continuousOn_differentiableOn_deriv`. -/
theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : ℕ∞}
    (Hcont : ∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s)
    (Hdiff : ∀ m : ℕ, (m : ℕ∞) < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s) :
    ContDiffOn 𝕜 n f s

(Hcont : ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s)

(Hdiff : ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s)


protected theorem inner {𝕜 : Type*} {E : Type*} [RCLike 𝕜] [NormedAddCommGroup E]
    [InnerProductSpace 𝕜 E] {_ : MeasurableSpace α} {f g : α → E} (hf : StronglyMeasurable f)
    (hg : StronglyMeasurable g) : StronglyMeasurable fun t => @inner 𝕜 _ _ (f t) (g t)

{α : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]

∀ {x : MeasurableSpace α} {f g : α → E},
  MeasureTheory.StronglyMeasurable f →
    MeasureTheory.StronglyMeasurable g → MeasureTheory.StronglyMeasurable fun t => ⟪f t, g t⟫_𝕜


theorem OpenEmbedding.map_nhdsWithin_preimage_eq {f : α → β} (hf : OpenEmbedding f) (s : Set β)
    (x : α) : map f (𝓝[f ⁻¹' s] x) = 𝓝[s] f x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(hf : OpenEmbedding f)
(s : Set β)
(x : α)


/-- `mul_comm` for `Algebra`s when one element is from the base ring. -/
theorem commutes (r : R) (x : A) : algebraMap R A r * x = x * algebraMap R A r

{R : Type u}
{A : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(r : R)
(x : A)

(algebraMap R A) r * x = x * (algebraMap R A) r


@[simp]
theorem rtake_zero : rtake l 0 = []


theorem utf8SetAux_of_gt (c' : Char) : ∀ (cs : List Char) {i p : Pos}, i > p → utf8SetAux c' cs i p = cs

(c' : Char)
(cs : List Char)
{i p : String.Pos}

i > p → String.utf8SetAux c' cs i p = cs


theorem snd_injective [Subsingleton α] : Function.Injective (@snd α β)

{α : Type u_1}
{β : Type u_2}
[Subsingleton α]


/-- The Grundy value of the sum of two nim games with natural numbers of piles equals their bitwise
xor. -/
@[simp]
theorem grundyValue_nim_add_nim (n m : ℕ) :
    grundyValue (nim.{u} n + nim.{u} m) = n ^^^ m

(SetTheory.PGame.nim ↑n + SetTheory.PGame.nim ↑m).grundyValue = ↑(n ^^^ m)


/-- Given a functor `F : C₁ ⥤ C₂ ⥤ D`, this is the bifunctor which sends
`K₁ : HomologicalComplex C₁ c₁` and `K₂ : HomologicalComplex C₂ c₂` to the bicomplex
which is degree `(i₁, i₂)` consists of `(F.obj (K₁.X i₁)).obj (K₂.X i₂)`. -/
@[simps! obj_obj_X_X obj_obj_X_d obj_obj_d_f obj_map_f_f map_app_f_f]
def mapBifunctorHomologicalComplex :
    HomologicalComplex C₁ c₁ ⥤ HomologicalComplex C₂ c₂ ⥤ HomologicalComplex₂ D c₁ c₂

[∀ (X₁ : C₁), (F.obj X₁).PreservesZeroMorphisms]

((((F.mapBifunctorHomologicalComplex c₁ c₂).obj K₁).obj K₂).X i₁).d i₂ i₂' = (F.obj (K₁.X i₁)).map (K₂.d i₂ i₂')


/-- Constructor for `EssentiallySmall C` from an explicit small category witness. -/
theorem EssentiallySmall.mk' {C : Type u} [Category.{v} C] {S : Type w} [SmallCategory S]
    (e : C ≌ S) : EssentiallySmall.{w} C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{S : Type w}
[CategoryTheory.SmallCategory S]
(e : C ≌ S)

CategoryTheory.EssentiallySmall.{w, v, u} C


/-- A sufficient condition for the Church-Rosser property. -/
theorem church_rosser (h : ∀ a b c, r a b → r a c → ∃ d, ReflGen r b d ∧ ReflTransGen r c d)
    (hab : ReflTransGen r a b) (hac : ReflTransGen r a c) : Join (ReflTransGen r) b c

(h : ∀ (a b c : α), r a b → r a c → ∃ d, Relation.ReflGen r b d ∧ Relation.ReflTransGen r c d)

Relation.Join (Relation.ReflTransGen r) b c


/-- The language map adding constants.  -/
@[simps!] -- Porting note: add `!` to `simps`
def lhomWithConstants : L →ᴸ L[[α]]

(L : FirstOrder.Language)
(α : Type w')
(_n : ℕ)
(val : L.Functions _n)

(L.lhomWithConstants α).onFunction val = Sum.inl val


lemma CharP.neg_eq_sub_one_mul {α : Type _} [Ring α] (n : ℕ) (inst : CharP α n) (b : α)
    (a : ℕ) (a' : α) (p : IsNat (n - 1 : α) a) (pa : a = a') :
    -b = a' * b

(p : Mathlib.Meta.NormNum.IsNat (↑n - 1) a)


@[simp]
theorem getLsb_rotateLeft {x : BitVec w} {r i : Nat}  :
    (x.rotateLeft r).getLsb i =
      cond (i < r % w)
      (x.getLsb (w - (r % w) + i))
      (decide (i < w) && x.getLsb (i - (r % w)))

(x.rotateLeft r).getLsb i =
  bif decide (i < r % w) then x.getLsb (w - r % w + i) else decide (i < w) && x.getLsb (i - r % w)


theorem Subtype.coe_bot {s : Set ℕ} [DecidablePred (· ∈ s)] [h : Nonempty s] :
    ((⊥ : s) : ℕ) = Nat.find (nonempty_subtype.1 h)

{s : Set ℕ}
[DecidablePred fun x => x ∈ s]
[h : Nonempty ↑s]


/-- Colimit cocones on `F` are unique up to isomorphism. -/
@[simps]
def uniqueUpToIso {s t : Cocone F} (P : IsColimit s) (Q : IsColimit t) : s ≅ t

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{s t : CategoryTheory.Limits.Cocone F}
(P : CategoryTheory.Limits.IsColimit s)
(Q : CategoryTheory.Limits.IsColimit t)

(P.uniqueUpToIso Q).hom = P.descCoconeMorphism t


/--
Given a series `a₀ -r→ a₁ -r→ ... -r→ aₙ` and an `a` such that `a₀ -r→ a` holds, there is
a series of length `n+1`: `a -r→ a₀ -r→ a₁ -r→ ... -r→ aₙ`.
-/
@[simps! length]
def cons (p : RelSeries r) (newHead : α) (rel : r newHead p.head) : RelSeries r

{α : Type u_1}
{r : Rel α α}
(p : RelSeries r)
(newHead : α)
(rel : r newHead p.head)

(p.cons newHead rel).length = p.length + 1


theorem mem_generate_iff {s : Set <| Set α} {U : Set α} :
    U ∈ generate s ↔ ∃ t ⊆ s, Set.Finite t ∧ ⋂₀ t ⊆ U

{α : Type u}
{s : Set (Set α)}
{U : Set α}

U ∈ Filter.generate s ↔ ∃ t ⊆ s, t.Finite ∧ ⋂₀ t ⊆ U


/-- Odd Bernoulli numbers (greater than 1) are zero. -/
theorem bernoulli'_odd_eq_zero {n : ℕ} (h_odd : Odd n) (hlt : 1 < n) : bernoulli' n = 0


@[fun_prop]
theorem Continuous.continuousAt (h : Continuous f) : ContinuousAt f x

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


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

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

DiscreteQuotient.ofLE h (DiscreteQuotient.map f cond a) = DiscreteQuotient.map f ⋯ a


lemma IndepFun_iff_Indep [mβ : MeasurableSpace β]
    [mγ : MeasurableSpace γ] (f : Ω → β) (g : Ω → γ) (μ : Measure Ω) :
    IndepFun f g μ ↔ Indep (MeasurableSpace.comap f mβ) (MeasurableSpace.comap g mγ) μ

{Ω : Type u_1}
{β : Type u_3}
{γ : Type u_4}

∀ {x : MeasurableSpace Ω} [mβ : MeasurableSpace β] [mγ : MeasurableSpace γ] (f : Ω → β) (g : Ω → γ)
  (μ : MeasureTheory.Measure Ω),
  ProbabilityTheory.IndepFun f g μ ↔ ProbabilityTheory.Indep (MeasurableSpace.comap f mβ) (MeasurableSpace.comap g mγ) μ


theorem isLUB_Icc (h : a ≤ b) : IsLUB (Icc a b) b

{α : Type u}
[Preorder α]
{a b : α}
(h : a ≤ b)


/-- Proper group action in the sense of Bourbaki:
the map `G × X → X × X` is a proper map (see `IsProperMap`). -/
@[to_additive existing (attr := mk_iff)]
class ProperSMul (G X : Type*) [TopologicalSpace G] [TopologicalSpace X] [Group G]
    [MulAction G X] : Prop where
  /-- Proper group action in the sense of Bourbaki:
  the map `G × X → X × X` is a proper map (see `IsProperMap`). -/
  isProperMap_smul_pair : IsProperMap (fun gx ↦ (gx.1 • gx.2, gx.2) : G × X → X × X)

{G : Type u_1}
{X : Type u_2}
[TopologicalSpace G]
[TopologicalSpace X]
[Group G]
[MulAction G X]
[self : ProperSMul G X]

IsProperMap fun gx => (gx.1 • gx.2, gx.2)


/-- A relation `r : α → β → Prop` is "function-like"
(for each `a` there exists a unique `b` such that `r a b`)
if and only if it is `(f · = ·)` for some function `f`. -/
lemma forall_existsUnique_iff' {r : α → β → Prop} :
    (∀ a, ∃! b, r a b) ↔ ∃ f : α → β, r = (f · = ·)

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

(∀ (a : α), ∃! b, r a b) ↔ ∃ f, r = fun x x_1 => f x = x_1


@[to_additive (attr := simp)]
theorem singletonOneHom_apply (a : α) : singletonOneHom a = {a}


@[simp]
lemma cyclesMap'_smul :
    cyclesMap' (a • φ) h₁ h₂ = a • cyclesMap' φ h₁ h₂

{R : Type u_1}
{C : Type u_2}
[Semiring R]
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ : S₁ ⟶ S₂)
(h₁ : S₁.LeftHomologyData)
(h₂ : S₂.LeftHomologyData)
(a : R)

CategoryTheory.ShortComplex.cyclesMap' (a • φ) h₁ h₂ = a • CategoryTheory.ShortComplex.cyclesMap' φ h₁ h₂


@[ext] theorem Sigma.ext : {x y : Sigma β} → x.fst = y.fst → HEq x.snd y.snd → x = y

∀ {α : Type u_1} {β : α → Type u_2} {x y : Sigma β}, x.fst = y.fst → HEq x.snd y.snd → x = y


@[simp]
theorem logEmbedding_component (x : (𝓞 K)ˣ) (w : {w : InfinitePlace K // w ≠ w₀}) :
    (logEmbedding K x) w = mult w.val * Real.log (w.val x)

(w : { w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ })

(NumberField.Units.logEmbedding K) x w = ↑(↑w).mult * Real.log (↑w ((algebraMap (𝓞 K) K) ↑x))


/-- The equivalence between the endomorphisms of the single object
when we promote a monoidal category to a single object bicategory,
and the original monoidal category.
-/
@[simps functor inverse_obj inverse_map unitIso counitIso]
noncomputable def endMonoidalStarFunctorEquivalence :
    EndMonoidal (MonoidalSingleObj.star C) ≌ C

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

∀ {X Y : C} (f : X ⟶ Y), (CategoryTheory.MonoidalSingleObj.endMonoidalStarFunctorEquivalence C).inverse.map f = f


@[to_additive]
theorem HasCompactMulSupport.mul (hf : HasCompactMulSupport f) (hf' : HasCompactMulSupport f') :
    HasCompactMulSupport (f * f')

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[AddZeroClass β]
{f f' : α → β}
(hf : HasCompactSupport f)
(hf' : HasCompactSupport f')


/-- **Helly's theorem** for sets of compact convex sets in its classical version.

If `F` is a (possibly infinite) set of more than `d + 1` compact convex sets in a vector space of
finite dimension `d`, and any `d + 1` sets from `F` intersect nontrivially,
then all sets from `F` intersect nontrivially. -/
theorem helly_theorem_set_compact [TopologicalSpace E] [T2Space E] {F : Set (Set E)}
    (h_card : finrank 𝕜 E + 1 ≤ F.encard)
    (h_convex : ∀ X ∈ F, Convex 𝕜 X) (h_compact : ∀ X ∈ F, IsCompact X)
    (h_inter : ∀ G : Finset (Set E), (G : Set (Set E)) ⊆ F → G.card = finrank 𝕜 E + 1 →
    (⋂₀ G : Set E).Nonempty) :
    (⋂₀ (F : Set (Set E))).Nonempty

(h_card : ↑(FiniteDimensional.finrank 𝕜 E) + 1 ≤ F.encard)

(h_inter : ∀ (G : Finset (Set E)), ↑G ⊆ F → G.card = FiniteDimensional.finrank 𝕜 E + 1 → (⋂₀ ↑G).Nonempty)


theorem Perm.extendDomain_apply_not_subtype {b : β'} (h : ¬p b) : e.extendDomain f b = b

{α' : Type u_1}
{β' : Type u_2}
(e : Equiv.Perm α')
{p : β' → Prop}
[DecidablePred p]
(f : α' ≃ Subtype p)
{b : β'}
(h : ¬p b)


theorem coeFn_comp₂Measurable (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
    (f₂ : α →ₘ[μ] γ) : comp₂Measurable g hg f₁ f₂ =ᵐ[μ] fun a => g (f₁ a) (f₂ a)

(g : β → γ → δ)

(f₁ : α →ₘ[μ] β)

(f₂ : α →ₘ[μ] γ)

↑(MeasureTheory.AEEqFun.comp₂Measurable g hg f₁ f₂) =ᵐ[μ] fun a => g (↑f₁ a) (↑f₂ a)


theorem Eventually.atTop_of_arithmetic {p : ℕ → Prop} {n : ℕ} (hn : n ≠ 0)
    (hp : ∀ k < n, ∀ᶠ a in atTop, p (n * a + k)) : ∀ᶠ a in atTop, p a

(hp : ∀ k < n, ∀ᶠ (a : ℕ) in Filter.atTop, p (n * a + k))


@[simp] lemma compl_comp (a : α) : (comp a)ᶜ = lift a

(Booleanisation.comp a)ᶜ = Booleanisation.lift a


theorem inner_map_map (u : unitary (H →L[𝕜] H)) (x y : H) :
    ⟪(u : H →L[𝕜] H) x, (u : H →L[𝕜] H) y⟫_𝕜 = ⟪x, y⟫_𝕜

{𝕜 : Type u_1}
[RCLike 𝕜]
{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace 𝕜 H]
[CompleteSpace H]
(u : ↥(unitary (H →L[𝕜] H)))
(x y : H)


/-- Combinatorial viewpoint on a composition of `n`, by seeing it as non-empty blocks of
consecutive integers in `{0, ..., n-1}`. We register every block by its left end-point, yielding
a finset containing `0`. As this does not make sense for `n = 0`, we add `n` to this finset, and
get a finset of `{0, ..., n}` containing `0` and `n`. This is the data in the structure
`CompositionAsSet n`. -/
@[ext]
structure CompositionAsSet (n : ℕ) where
  /-- Combinatorial viewpoint on a composition of `n` as consecutive integers `{0, ..., n-1}`-/
  boundaries : Finset (Fin n.succ)
  /-- Proof that `0` is a member of `boundaries`-/
  zero_mem : (0 : Fin n.succ) ∈ boundaries
  /-- Last element of the composition-/
  getLast_mem : Fin.last n ∈ boundaries


@[simp]
theorem coe_comp (f : CoheytingHom β γ) (g : CoheytingHom α β) : ⇑(f.comp g) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CoheytingAlgebra α]
[CoheytingAlgebra β]
[CoheytingAlgebra γ]
(f : CoheytingHom β γ)
(g : CoheytingHom α β)


theorem replicate_right_injective {n : ℕ} (h : n ≠ 0) :
    Function.Injective (replicate n : α → Sym α n)


theorem lookup_replicate_of_pos {k : α} (h : 0 < n) :
    (replicate n (a,b)).lookup k = if k == a then some b else none

{α : Type u_2}
[BEq α]
[LawfulBEq α]
{n : Nat}
{a : α}

∀ {α_1 : Type u_1} {b : α_1} {k : α},
  0 < n → List.lookup k (List.replicate n (a, b)) = if (k == a) = true then some b else none


theorem IsPathConnected.isConnected (hF : IsPathConnected F) : IsConnected F

{X : Type u_1}
[TopologicalSpace X]
{F : Set X}
(hF : IsPathConnected F)


lemma toFiniteAux_apply (μ : Measure α) [SFinite μ] (s : Set α) :
    μ.toFiniteAux s = ∑' n, (2 ^ (n + 1) * sFiniteSeq μ n Set.univ)⁻¹ * sFiniteSeq μ n s

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
(s : Set α)

μ.toFiniteAux s =
  ∑' (n : ℕ), (2 ^ (n + 1) * (MeasureTheory.sFiniteSeq μ n) Set.univ)⁻¹ * (MeasureTheory.sFiniteSeq μ n) s


@[to_additive zero_leftAddCoset]
theorem one_leftCoset : (1 : α) • s = s


theorem pf_mul_c [Mul α] (p : a = b) (c : α) : a * c = b * c

{α : Type u_1}
{a b : α}
[Mul α]
(p : a = b)
(c : α)


theorem of_hasBinaryCoproduct' [HasBinaryCoproduct X Y] [HasInitial C] :
    IsPushout (initial.to _) (initial.to _) (coprod.inl : X ⟶ _) (coprod.inr : Y ⟶ _)

CategoryTheory.IsPushout (CategoryTheory.Limits.initial.to X) (CategoryTheory.Limits.initial.to Y)
  CategoryTheory.Limits.coprod.inl CategoryTheory.Limits.coprod.inr


theorem toComplex_one : ((1 : ℤ[i]) : ℂ) = 1


lemma IsRightDerivedFunctor.isLeftKanExtension
    [L.IsLocalization W] [RF.IsRightDerivedFunctor α W] :
    RF.IsLeftKanExtension α

{C : Type u_1}
{D : Type u_2}
{H : Type u_5}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Category.{u_6, u_5} H]
(RF : CategoryTheory.Functor D H)
{F : CategoryTheory.Functor C H}
{L : CategoryTheory.Functor C D}
(α : F ⟶ L.comp RF)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[RF.IsRightDerivedFunctor α W]


theorem coeff_C_mul_X_pow (x : R) (k n : ℕ) :
    coeff (C x * X ^ k : R[X]) n = if n = k then x else 0

{R : Type u}
[Semiring R]
(x : R)
(k n : ℕ)

(Polynomial.C x * Polynomial.X ^ k).coeff n = if n = k then x else 0


theorem HasMFDerivAt.neg (hf : HasMFDerivAt I 𝓘(𝕜, E') f z f') :
    HasMFDerivAt I 𝓘(𝕜, E') (-f) z (-f')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{z : M}
{f : M → E'}
{f' : TangentSpace I z →L[𝕜] E'}
(hf : HasMFDerivAt I 𝓘(𝕜, E') f z f')


theorem closedBall_eq_Icc (x : ℕ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊

Metric.closedBall x r = Set.Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊


@[simp]
theorem _root_.LinearEquiv.toAddEquiv_toNatLinearEquiv (e : M ≃ₗ[ℕ] M₂) :
    AddEquiv.toNatLinearEquiv ↑e = e

{M : Type u_8}
{M₂ : Type u_10}
[AddCommMonoid M]
[AddCommMonoid M₂]
(e : M ≃ₗ[ℕ] M₂)


/-- Generalization of `Finset.prod_comm` to the case when the inner `Finset`s depend on the outer
variable. -/
@[to_additive "Generalization of `Finset.sum_comm` to the case when the inner `Finset`s depend on
the outer variable."]
theorem prod_comm' {s : Finset γ} {t : γ → Finset α} {t' : Finset α} {s' : α → Finset γ}
    (h : ∀ x y, x ∈ s ∧ y ∈ t x ↔ x ∈ s' y ∧ y ∈ t') {f : γ → α → β} :
    (∏ x ∈ s, ∏ y ∈ t x, f x y) = ∏ y ∈ t', ∏ x ∈ s' y, f x y

(h : ∀ (x : γ) (y : α), x ∈ s ∧ y ∈ t x ↔ x ∈ s' y ∧ y ∈ t')

{f : γ → α → β}

∏ x ∈ s, ∏ y ∈ t x, f x y = ∏ y ∈ t', ∏ x ∈ s' y, f x y


theorem gcd_pos_iff {i j : ℤ} : 0 < gcd i j ↔ i ≠ 0 ∨ j ≠ 0


@[to_additive]
theorem continuous_coe_inv : Continuous (fun u => ↑u⁻¹ : Mˣ → M)

{M : Type u_1}
[TopologicalSpace M]
[Monoid M]


private lemma expCoeff_cast (n : ℕ) : (expCoeff n : ℚ) = if Even n then (n / 2 : ℚ) else n

↑(WeierstrassCurve.expCoeff n) = if Even n then ↑n / 2 else ↑n


lemma mapComp_id_right (f : a ⟶ b) : (F.mapComp f (𝟙 b)) = F.map₂Iso (ρ_ f) ≪≫
    (ρ_ (F.map f)).symm ≪≫ (whiskerLeftIso (F.map f) (F.mapId b)).symm

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

F.mapComp f (CategoryTheory.CategoryStruct.id b) =
  F.map₂Iso (CategoryTheory.Bicategory.rightUnitor f) ≪≫
    (CategoryTheory.Bicategory.rightUnitor (F.map f)).symm ≪≫
      (CategoryTheory.Bicategory.whiskerLeftIso (F.map f) (F.mapId b)).symm


@[simp]
theorem union_diff_left {s t : Set α} : (s ∪ t) \ s = t \ s


@[simp]
theorem funMap_sum_inr {n : ℕ} (f : L₂.Functions n) :
    @funMap (L₁.sum L₂) S _ n (Sum.inr f) = funMap f

{L₁ : FirstOrder.Language}
{L₂ : FirstOrder.Language}
{S : Type u_3}
[L₁.Structure S]
[L₂.Structure S]
{n : ℕ}
(f : L₂.Functions n)

FirstOrder.Language.Structure.funMap (Sum.inr f) = FirstOrder.Language.Structure.funMap f


/-- The opposite localizer morphism `LocalizerMorphism W₁.op W₂.op` deduced
from `Φ : LocalizerMorphism W₁ W₂`. -/
@[simps]
def op : LocalizerMorphism W₁.op W₂.op

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


@[simp]
theorem taylor_coeff_one : (taylor r f).coeff 1 = f.derivative.eval r

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

((Polynomial.taylor r) f).coeff 1 = Polynomial.eval r (Polynomial.derivative f)


theorem HasFDerivAtFilter.neg (h : HasFDerivAtFilter f f' x L) :
    HasFDerivAtFilter (fun x => -f x) (-f') x L

{𝕜 : 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}
{L : Filter E}
(h : HasFDerivAtFilter f f' x L)


/-- A vector space has dimension at most `1` if and only if there is a
single vector of which all vectors are multiples. -/
theorem rank_le_one_iff [Module.Free K V] :
    Module.rank K V ≤ 1 ↔ ∃ v₀ : V, ∀ v, ∃ r : K, r • v₀ = v

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

Module.rank K V ≤ 1 ↔ ∃ v₀, ∀ (v : V), ∃ r, r • v₀ = v


@[to_additive (attr := simp, norm_cast)]
theorem coe_one : ((1 : α) : WithTop α) = 1


theorem hitting_le_iff_of_lt [IsWellOrder ι (· < ·)] {m : ι} (i : ι) (hi : i < m) :
    hitting u s n m ω ≤ i ↔ ∃ j ∈ Set.Icc n i, u j ω ∈ s

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrder ι]
{u : ι → Ω → β}
{s : Set β}
{n : ι}
{ω : Ω}
[IsWellOrder ι fun x x_1 => x < x_1]
{m : ι}
(i : ι)
(hi : i < m)

MeasureTheory.hitting u s n m ω ≤ i ↔ ∃ j ∈ Set.Icc n i, u j ω ∈ s


@[to_additive]
theorem tprod_le_tprod_of_inj {g : κ → α} (e : ι → κ) (he : Injective e)
    (hs : ∀ c, c ∉ Set.range e → 1 ≤ g c) (h : ∀ i, f i ≤ g (e i)) (hf : Multipliable f)
    (hg : Multipliable g) : tprod f ≤ tprod g

{ι : Type u_1}
{κ : Type u_2}
{α : Type u_3}
[OrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
{g : κ → α}
(e : ι → κ)
(he : Function.Injective e)
(hs : ∀ c ∉ Set.range e, 0 ≤ g c)
(h : ∀ (i : ι), f i ≤ g (e i))
(hf : Summable f)
(hg : Summable g)


@[to_additive (attr := simp)]
theorem iterate_map_one {M F : Type*} [One M] [FunLike F M M] [OneHomClass F M M]
    (f : F) (n : ℕ) :
    f^[n] 1 = 1

{M : Type u_5}
{F : Type u_6}
[Zero M]
[FunLike F M M]
[ZeroHomClass F M M]
(f : F)
(n : ℕ)


/-- Interpret a `RingHom` `f` as an `f`-semilinear map. -/
@[simps]
def _root_.RingHom.toSemilinearMap (f : R →+* S) : R →ₛₗ[f] S

{R : Type u_1}
{S : Type u_6}
[Semiring R]
[Semiring S]
(f : R →+* S)

∀ (a : R), f.toSemilinearMap a = (↑↑f).toFun a


protected theorem IsCycleOn.apply_ne (hf : f.IsCycleOn s) (hs : s.Nontrivial) (ha : a ∈ s) :
    f a ≠ a

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
{a : α}
(hf : f.IsCycleOn s)
(hs : s.Nontrivial)
(ha : a ∈ s)


/-- Equality of linear maps out of an adic completion can be checked on Cauchy sequences. -/
@[ext]
theorem map_ext' {f g : AdicCompletion I M →ₗ[AdicCompletion I R] T}
    (h : ∀ (a : AdicCauchySequence I M),
      f (AdicCompletion.mk I M a) = g (AdicCompletion.mk I M a)) :
    f = g

(h : ∀ (a : AdicCompletion.AdicCauchySequence I M), f ((AdicCompletion.mk I M) a) = g ((AdicCompletion.mk I M) a))


theorem equiv_snd_eq_self_iff_mem {g : G} (h1 : 1 ∈ S) :
    ((hST.equiv g).snd : G) = g ↔ g ∈ T

{G : Type u_1}
[Group G]
{S T : Set G}
(hST : Subgroup.IsComplement S T)
{g : G}
(h1 : 1 ∈ S)


lemma changeLevel_self_toUnitHom : (changeLevel (dvd_refl n) χ).toUnitHom = χ.toUnitHom

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)

MulChar.toUnitHom ((DirichletCharacter.changeLevel ⋯) χ) = MulChar.toUnitHom χ


lemma top_preconnected : (⊤ : SimpleGraph V).Preconnected


@[simp]
theorem toDual_toDual : b.dualBasis.toDual.comp b.toDual = Dual.eval R M

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommRing R]
[AddCommGroup M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
[Finite ι]

b.dualBasis.toDual ∘ₗ b.toDual = Module.Dual.eval R M


/-- The functor which sends `S : SnakeInput C` to `S.L₁'` which is
`S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁`. -/
@[simps]
noncomputable def functorL₁' : SnakeInput C ⥤ ShortComplex C

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

∀ {X Y : CategoryTheory.ShortComplex.SnakeInput C} (f : X ⟶ Y),
  (CategoryTheory.ShortComplex.SnakeInput.functorL₁'.map f).τ₃ = f.f₃.τ₁


@[simp]
theorem symmDiff_sdiff_left : a ∆ b \ a = b \ a

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


nonrec theorem tan_eq_sin_div_cos : tan x = sin x / cos x


@[to_additive]
theorem map_comap_eq (H : Subgroup N) : map f (comap f H) = f.range ⊓ H

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)
(H : AddSubgroup N)

AddSubgroup.map f (AddSubgroup.comap f H) = f.range ⊓ H


@[simp]
theorem truncate_wittVector_truncate {m : ℕ} (hm : n ≤ m) (x : 𝕎 R) :
    truncate hm (WittVector.truncate m x) = WittVector.truncate n x

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{n : ℕ}
{R : Type u_1}
[CommRing R]
{m : ℕ}
(hm : n ≤ m)
(x : 𝕎 R)

(TruncatedWittVector.truncate hm) ((WittVector.truncate m) x) = (WittVector.truncate n) x


theorem tendsto_Ici_atTop [SemilatticeSup α] {a : α} {f : β → Ici a} {l : Filter β} :
    Tendsto f l atTop ↔ Tendsto (fun x => (f x : α)) l atTop

{α : Type u_3}
{β : Type u_4}
[SemilatticeSup α]
{a : α}
{f : β → ↑(Set.Ici a)}
{l : Filter β}

Filter.Tendsto f l Filter.atTop ↔ Filter.Tendsto (fun x => ↑(f x)) l Filter.atTop


/-- The canonical elementary embedding of an `L`-structure into any model of its elementary diagram
-/
@[simps]
def ElementaryEmbedding.ofModelsElementaryDiagram (N : Type*) [L.Structure N] [L[[M]].Structure N]
    [(lhomWithConstants L M).IsExpansionOn N] [N ⊨ L.elementaryDiagram M] : M ↪ₑ[L] N

∀ (a : M),
  (FirstOrder.Language.ElementaryEmbedding.ofModelsElementaryDiagram L M N) a =
    (FirstOrder.Language.constantMap ∘ Sum.inr) a


@[to_additive (attr := simp)]
theorem pure_one : pure (1 : α) = 1


/-- If the union of a.e.-disjoint null-measurable sets has finite measure, then there are only
finitely many members of the union whose measure exceeds any given positive number. -/
theorem finite_const_le_meas_of_disjoint_iUnion₀ {ι : Type*} [MeasurableSpace α] (μ : Measure α)
    {ε : ℝ≥0∞} (ε_pos : 0 < ε) {As : ι → Set α} (As_mble : ∀ i : ι, NullMeasurableSet (As i) μ)
    (As_disj : Pairwise (AEDisjoint μ on As)) (Union_As_finite : μ (⋃ i, As i) ≠ ∞) :
    Set.Finite { i : ι | ε ≤ μ (As i) }

(As_mble : ∀ (i : ι), MeasureTheory.NullMeasurableSet (As i) μ)

(As_disj : Pairwise (MeasureTheory.AEDisjoint μ on As))


@[simp] lemma coe_forgetToTop (X : AlexDisc) : ↥((forget₂ _ TopCat).obj X) = X

↑((CategoryTheory.forget₂ AlexDisc TopCat).obj X) = ↑X


@[to_additive]
theorem continuous_comp_right (f : ContinuousMonoidHom B C) :
    Continuous fun g : ContinuousMonoidHom A B => f.comp g

{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[AddMonoid A]
[AddMonoid B]
[AddMonoid C]
[TopologicalSpace A]
[TopologicalSpace B]
[TopologicalSpace C]
(f : ContinuousAddMonoidHom B C)


theorem hasFiniteIntegral_compProd_iff ⦃f : β × γ → E⦄ (h1f : StronglyMeasurable f) :
    HasFiniteIntegral f ((κ ⊗ₖ η) a) ↔
      (∀ᵐ x ∂κ a, HasFiniteIntegral (fun y => f (x, y)) (η (a, x))) ∧
        HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂η (a, x)) (κ a)

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

⦃f : β × γ → E⦄

(h1f : MeasureTheory.StronglyMeasurable f)

MeasureTheory.HasFiniteIntegral f ((κ ⊗ₖ η) a) ↔
  (∀ᵐ (x : β) ∂κ a, MeasureTheory.HasFiniteIntegral (fun y => f (x, y)) (η (a, x))) ∧
    MeasureTheory.HasFiniteIntegral (fun x => ∫ (y : γ), ‖f (x, y)‖ ∂η (a, x)) (κ a)


theorem IsLittleO.def (h : f =o[l] g) (hc : 0 < c) : ∀ᶠ x in l, ‖f x‖ ≤ c * ‖g x‖

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c : ℝ}
{f : α → E}
{g : α → F}
{l : Filter α}
(h : f =o[l] g)
(hc : 0 < c)


theorem image_inter_on {f : α → β} {s t : Set α} (h : ∀ x ∈ t, ∀ y ∈ s, f x = f y → x = y) :
    f '' (s ∩ t) = f '' s ∩ f '' t


@[to_additive (attr := simp)]
theorem mulIndicator_compl_mul_self_apply (s : Set α) (f : α → M) (a : α) :
    mulIndicator sᶜ f a * mulIndicator s f a = f a

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

sᶜ.mulIndicator f a * s.mulIndicator f a = f a


/-- Evaluation as a `RingHom` -/
@[simps!] def evalRingHom [Semiring Y] (x : X) : LocallyConstant X Y →+* Y

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

∀ (a : LocallyConstant X Y), (LocallyConstant.evalRingHom x) a = a x


theorem apply_eq_one_iff (p : PMF α) (a : α) : p a = 1 ↔ p.support = {a}


@[simp]
theorem aroots_monomial [CommRing S] [IsDomain S] [Algebra T S]
    [NoZeroSMulDivisors T S] {a : T} (ha : a ≠ 0) (n : ℕ) :
    (monomial n a).aroots S = n • ({0} : Multiset S)

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
[NoZeroSMulDivisors T S]
{a : T}
(ha : a ≠ 0)
(n : ℕ)

((Polynomial.monomial n) a).aroots S = n • {0}


/-- A point-free means of proving membership in the center, for a non-associative ring.

This can be helpful when working with types that have ext lemmas for `R →+ R`. -/
lemma _root_.Set.mem_center_iff_addMonoidHom (a : R) :
    a ∈ Set.center R ↔
      AddMonoidHom.mulLeft a = .mulRight a ∧
      AddMonoidHom.compr₂ .mul (.mulLeft a) = .comp .mul (.mulLeft a) ∧
      AddMonoidHom.comp .mul (.mulRight a) = .compl₂ .mul (.mulLeft a) ∧
      AddMonoidHom.compr₂ .mul (.mulRight a) = .compl₂ .mul (.mulRight a)

(R : Type u)
[NonUnitalNonAssocSemiring R]
(a : R)

a ∈ Set.center R ↔
  AddMonoidHom.mulLeft a = AddMonoidHom.mulRight a ∧
    AddMonoidHom.mul.compr₂ (AddMonoidHom.mulLeft a) = AddMonoidHom.mul.comp (AddMonoidHom.mulLeft a) ∧
      AddMonoidHom.mul.comp (AddMonoidHom.mulRight a) = AddMonoidHom.mul.compl₂ (AddMonoidHom.mulLeft a) ∧
        AddMonoidHom.mul.compr₂ (AddMonoidHom.mulRight a) = AddMonoidHom.mul.compl₂ (AddMonoidHom.mulRight a)


@[simp, reassoc]
lemma map_shiftFunctorCompIsoId_hom_app [F.CommShift A] (X : C) (a b : A) (h : a + b = 0) :
    F.map ((shiftFunctorCompIsoId C a b h).hom.app X) =
      (F.commShiftIso b).hom.app (X⟦a⟧) ≫ ((F.commShiftIso a).hom.app X)⟦b⟧' ≫
        (shiftFunctorCompIsoId D a b h).hom.app (F.obj X)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
(F : CategoryTheory.Functor C D)
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[F.CommShift A]
(X : C)
(a b : A)
(h : a + b = 0)

F.map ((CategoryTheory.shiftFunctorCompIsoId C a b h).hom.app X) =
  CategoryTheory.CategoryStruct.comp ((F.commShiftIso b).hom.app ((CategoryTheory.shiftFunctor C a).obj X))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor D b).map ((F.commShiftIso a).hom.app X))
      ((CategoryTheory.shiftFunctorCompIsoId D a b h).hom.app (F.obj X)))


theorem closedBall_eq_Icc (x : ℤ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉ ⌊↑x + r⌋

Metric.closedBall x r = Set.Icc ⌈↑x - r⌉ ⌊↑x + r⌋


theorem essSurj (W) [L.IsLocalization W] : L.EssSurj

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


theorem homothety_def (c : P1) (r : k) :
    homothety c r = r • (id k P1 -ᵥ const k P1 c) +ᵥ const k P1 c

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[CommRing k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
(c : P1)
(r : k)

AffineMap.homothety c r = r • (AffineMap.id k P1 -ᵥ AffineMap.const k P1 c) +ᵥ AffineMap.const k P1 c


theorem leadingCoeff_add_of_degree_eq (h : degree p = degree q)
    (hlc : leadingCoeff p + leadingCoeff q ≠ 0) :
    leadingCoeff (p + q) = leadingCoeff p + leadingCoeff q

(hlc : p.leadingCoeff + q.leadingCoeff ≠ 0)

(p + q).leadingCoeff = p.leadingCoeff + q.leadingCoeff


@[simp] theorem false_eq_decide_iff {p : Prop} [h : Decidable p] : false = decide p ↔ ¬p


lemma mem_orbit_subMul_iff {p : SubMulAction R M} {x m : p} :
    x ∈ MulAction.orbit R m ↔ (x : M) ∈ MulAction.orbit R (m : M)

{R : Type u}
{M : Type v}
[Monoid R]
[MulAction R M]
{p : SubMulAction R M}
{x m : ↥p}

x ∈ MulAction.orbit R m ↔ ↑x ∈ MulAction.orbit R ↑m


@[simp]
theorem mk_neg (z : ℂ) (hz : abs (-z) < 1) : mk (-z) hz = -mk z (abs.map_neg z ▸ hz)

Complex.UnitDisc.mk (-z) hz = -Complex.UnitDisc.mk z ⋯


theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type*} [CommSemiring A] [CommRing B]
    [Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p ≠ 0)
    (hQ : ∀ i ∈ range (Q.natDegree + 1), p ∣ Q.coeff i) (hz : aeval x Q = p • z) :
    z ∈ adjoin A ({x} : Set B)

(hQ : ∀ i ∈ Finset.range (Q.natDegree + 1), p ∣ Q.coeff i)


theorem Codisjoint.eq_top : Codisjoint a b → a ⊔ b = ⊤

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}


@[simp]
theorem abelianizationCongr_symm : e.abelianizationCongr.symm = e.symm.abelianizationCongr

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(e : G ≃* H)


@[simp]
theorem mem_map {I : FractionalIdeal S P} {g : P →ₐ[R] P'} {y : P'} :
    y ∈ I.map g ↔ ∃ x, x ∈ I ∧ g x = y

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
{I : FractionalIdeal S P}
{g : P →ₐ[R] P'}
{y : P'}

y ∈ FractionalIdeal.map g I ↔ ∃ x ∈ I, g x = y


@[simp]
theorem prod_nonempty_iff : (s ×ˢ t).Nonempty ↔ s.Nonempty ∧ t.Nonempty

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}


/-- Taking the `MultilinearMap.alternatization` of the `MultilinearMap.domCoprod` of two
`AlternatingMap`s gives a scaled version of the `AlternatingMap.coprod` of those maps.
-/
theorem MultilinearMap.domCoprod_alternization_eq [DecidableEq ιa] [DecidableEq ιb]
    (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :
    MultilinearMap.alternatization
      (MultilinearMap.domCoprod a b : MultilinearMap R' (fun _ : ιa ⊕ ιb => Mᵢ) (N₁ ⊗ N₂)) =
      ((Fintype.card ιa).factorial * (Fintype.card ιb).factorial) • a.domCoprod b

{ιa : Type u_1}
{ιb : Type u_2}
[Fintype ιa]
[Fintype ιb]
{R' : Type u_3}
{Mᵢ : Type u_4}
{N₁ : Type u_5}
{N₂ : Type u_6}
[CommSemiring R']
[AddCommGroup N₁]
[Module R' N₁]
[AddCommGroup N₂]
[Module R' N₂]
[AddCommMonoid Mᵢ]
[Module R' Mᵢ]
[DecidableEq ιa]
[DecidableEq ιb]
(a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)
(b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)

MultilinearMap.alternatization ((↑a).domCoprod ↑b) =
  ((Fintype.card ιa).factorial * (Fintype.card ιb).factorial) • a.domCoprod b


theorem disjSum_mono (hs : s₁ ≤ s₂) (ht : t₁ ≤ t₂) : s₁.disjSum t₁ ≤ s₂.disjSum t₂

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Multiset α}
{t₁ t₂ : Multiset β}
(hs : s₁ ≤ s₂)
(ht : t₁ ≤ t₂)


@[to_additive (attr := simp, norm_cast)]
theorem const_smul [SMul M G] (n : M) (a : G) : (↑(n • a) : Germ l G) = n • (↑a : Germ l G)

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
{G : Type u_6}
[VAdd M G]
(n : M)
(a : G)


lemma Scheme.map_basicOpen' (r : Γ(U, ⊤)) :
    U.ι ''ᵁ (U.toScheme.basicOpen r) = X.basicOpen
      (X.presheaf.map (eqToHom U.openEmbedding_obj_top.symm).op r)

(r : ↑((↑U).presheaf.obj (Opposite.op ⊤)))

(AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj ((↑U).basicOpen r) =
  X.basicOpen ((X.presheaf.map (CategoryTheory.eqToHom ⋯).op) r)


theorem Real.iInf_mul_of_nonneg (ha : 0 ≤ r) (f : ι → ℝ) : (⨅ i, f i) * r = ⨅ i, f i * r

{ι : Sort u_1}
{r : ℝ}
(ha : 0 ≤ r)
(f : ι → ℝ)


/-- The diameter of a singleton vanishes -/
@[simp]
theorem diam_singleton : diam ({x} : Set α) = 0

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


@[simp]
lemma finsuppLeft_symm_apply_single (i : ι) (m : M) (n : N) :
    (finsuppLeft R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
      Finsupp.single i m ⊗ₜ[R] n

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_4}
[DecidableEq ι]
(i : ι)
(m : M)
(n : N)

(TensorProduct.finsuppLeft R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) = Finsupp.single i m ⊗ₜ[R] n


theorem IsComplement'.card_mul (h : IsComplement' H K) :
    Nat.card H * Nat.card K = Nat.card G

{G : Type u_1}
[Group G]
{H K : Subgroup G}
(h : H.IsComplement' K)


/-- Implementation of `CommMon_.equivLaxBraidedFunctorPunit`. -/
@[simps]
def commMonToLaxBraided : CommMon_ C ⥤ LaxBraidedFunctor (Discrete PUnit.{u + 1}) C

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

((CommMon_.EquivLaxBraidedFunctorPUnit.commMonToLaxBraided C).obj A).ε = A.one


@[simp]
theorem intCast_mem_center [NonAssocRing M] (n : ℤ) : (n : M) ∈ Set.center M


theorem map_monotone {G' : SimpleGraph W} (f : G →g G') : Monotone (Subgraph.map f)

{V : Type u}
{W : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')


@[simp]
theorem partiallyWellOrderedOn_union :
    (s ∪ t).PartiallyWellOrderedOn r ↔ s.PartiallyWellOrderedOn r ∧ t.PartiallyWellOrderedOn r

{α : Type u_2}
{r : α → α → Prop}
{s t : Set α}


theorem lift_mono' (hg : ∀ s ∈ f, g₁ s ≤ g₂ s) : f.lift g₁ ≤ f.lift g₂

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g₁ g₂ : Set α → Filter β}
(hg : ∀ s ∈ f, g₁ s ≤ g₂ s)


theorem lcm_dvd [GCDMonoid α] {a b c : α} (hab : a ∣ b) (hcb : c ∣ b) : lcm a c ∣ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a b c : α}
(hab : a ∣ b)
(hcb : c ∣ b)


theorem HasFDerivAt.const_rpow (hf : HasFDerivAt f f' x) (hc : 0 < c) :
    HasFDerivAt (fun x => c ^ f x) ((c ^ f x * Real.log c) • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{c : ℝ}
(hf : HasFDerivAt f f' x)
(hc : 0 < c)


theorem homOfLE_leOfHom {x y : X} (h : x ⟶ y) : h.le.hom = h

{X : Type u}
[Preorder X]
{x y : X}
(h : x ⟶ y)


/-- Non-unital algebra homomorphisms from `A` into a unital `R`-algebra `C` lift uniquely to
`Unitization R A →ₐ[R] C`. This is the universal property of the unitization. -/
@[simps! apply symm_apply apply_apply]
def lift : (A →ₙₐ[R] C) ≃ (Unitization R A →ₐ[R] C)

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
{C : Type u_5}
[Semiring C]
[Algebra R C]
(φ : Unitization R A →ₐ[R] C)

Unitization.lift.symm φ = (NonUnitalAlgHomClass.toNonUnitalAlgHom φ).comp (Unitization.inrNonUnitalAlgHom R A)


theorem neLocus_comm : f.neLocus g = g.neLocus f

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


/-- Functor translating a functor into the category of comonoid objects
to a comonoid object in the functor category
-/
@[simps]
private def inverse : (C ⥤ Comon_ D) ⥤ Comon_ (C ⥤ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]

∀ {X Y : C ⥤ Comon_ D} (α : X ⟶ Y) (X_1 : C),
  (CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.inverse.map α).hom.app X_1 = (α.app X_1).hom


theorem comap_nhds_neBot (di : DenseInducing i) (b : β) : NeBot (comap i (𝓝 b))

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
(di : DenseInducing i)
(b : β)


@[to_additive]
theorem codisjoint_range_inl_range_inr :
    Codisjoint (MonoidHom.range (inl : G →* G ∗ H)) (MonoidHom.range inr)

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


theorem sup_semanticallyEquivalent_not_inf_not :
    T.SemanticallyEquivalent (φ ⊔ ψ) (φ.not ⊓ ψ.not).not

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
(φ ψ : L.Formula α)


@[simp] theorem rTensor_symm_tmul : (f.rTensor M).symm (p ⊗ₜ m) = f.symm p ⊗ₜ m

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : N ≃ₗ[R] P)
(m : M)
(p : P)

(LinearEquiv.rTensor M f).symm (p ⊗ₜ[R] m) = f.symm p ⊗ₜ[R] m


lemma self_zpow₀ (a : G₀) (n : ℤ) : Commute a (a ^ n)

{G₀ : Type u_3}
[GroupWithZero G₀]
(a : G₀)
(n : ℤ)


theorem isLocalization_of_eq_basicOpen {V : X.Opens} (i : V ⟶ U) (e : V = X.basicOpen f) :
    @IsLocalization.Away _ _ f Γ(X, V) _ (X.presheaf.map i.op).toAlgebra

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
(f : ↑(X.presheaf.obj (Opposite.op U)))
{V : X.Opens}
(i : V ⟶ U)
(e : V = X.basicOpen f)

IsLocalization.Away f ↑(X.presheaf.obj (Opposite.op V))


/-- The rank of a free module `M` over an infinite scalar ring `R` is the cardinality of `M`
whenever `#R < #M`. -/
lemma rank_eq_mk_of_infinite_lt [Infinite R] (h_lt : lift.{v} #R < lift.{u} #M) :
    Module.rank R M = #M

(h_lt : Cardinal.lift.{v, u} #R < Cardinal.lift.{u, v} #M)


theorem neg_def (xs : IntList) : - xs = xs.map fun x => -x


@[simp] lemma nsmul_apply (n : ℕ) (κ : Kernel α β) (a : α) : (n • κ) a = n • κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(n : ℕ)
(κ : ProbabilityTheory.Kernel α β)
(a : α)


theorem sdiff_eq_self_iff_disjoint' : x \ y = x ↔ Disjoint x y

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


theorem Memℒp.ae_eq {f g : α → E} (hfg : f =ᵐ[μ] g) (hf_Lp : Memℒp f p μ) : Memℒp g p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f g : α → E}
(hfg : f =ᵐ[μ] g)
(hf_Lp : MeasureTheory.Memℒp f p μ)


@[simp] theorem neg_get (xs : IntList) (i : Nat) : (- xs).get i = - xs.get i


theorem AnalyticAt.differentiableWithinAt (h : AnalyticAt 𝕜 f x) : DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
(h : AnalyticAt 𝕜 f x)


theorem IsCompact.exists_isMinOn_mem_subset [ClosedIicTopology α] {f : β → α} {s t : Set β}
    {z : β} (ht : IsCompact t) (hf : ContinuousOn f t) (hz : z ∈ t)
    (hfz : ∀ z' ∈ t \ s, f z < f z') : ∃ x ∈ s, IsMinOn f t x

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[TopologicalSpace α]
[TopologicalSpace β]
[ClosedIicTopology α]
{f : β → α}
{s t : Set β}
{z : β}
(ht : IsCompact t)
(hf : ContinuousOn f t)
(hz : z ∈ t)
(hfz : ∀ z' ∈ t \ s, f z < f z')


@[simp]
theorem coe_toEquiv (e : P₁ ≃ᵃ[k] P₂) : ⇑e.toEquiv = 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₂)


theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x)

{J : CategoryTheory.GrothendieckTopology C}

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

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

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

(x : (CategoryTheory.forget D).obj (P.obj (Opposite.op X)))

((J.toPlus P).app (Opposite.op X)) x = CategoryTheory.GrothendieckTopology.Plus.mk (CategoryTheory.Meq.mk S x)


/-- An `iff` version of `WCovBy.eq_or_eq` and `wcovBy_of_eq_or_eq`. -/
theorem wcovBy_iff_le_and_eq_or_eq : a ⩿ b ↔ a ≤ b ∧ ∀ c, a ≤ c → c ≤ b → c = a ∨ c = b

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

a ⩿ b ↔ a ≤ b ∧ ∀ (c : α), a ≤ c → c ≤ b → c = a ∨ c = b


lemma noetherianSpace_of_isAffine [IsAffine X] [IsNoetherianRing Γ(X, ⊤)] :
    NoetherianSpace X

{X : AlgebraicGeometry.Scheme}
[AlgebraicGeometry.IsAffine X]
[IsNoetherianRing ↑Γ(X, ⊤)]


@[simp] theorem none_eq_top : (none : ℝ≥0∞) = ∞


theorem continuous_CC'₁ : Continuous (CC'₁ C hsC ho)

(hsC : Profinite.NobelingProof.contained C (Order.succ o))

(ho : o < Ordinal.type fun x x_1 => x < x_1)

Continuous (Profinite.NobelingProof.CC'₁ C hsC ho)


theorem map_update_sum {α : Type*} [DecidableEq ι] (t : Finset α) (i : ι) (g : α → M) (m : ι → M) :
    f (update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (update m i (g a))

{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)
{α : Type u_12}
[DecidableEq ι]
(t : Finset α)
(i : ι)
(g : α → M)
(m : ι → M)

f (Function.update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (Function.update m i (g a))


lemma fst_map_id_prod (κ : Kernel α β) {γ : Type*} {mγ : MeasurableSpace γ}
    {f : β → γ} (hf : Measurable f) :
    fst (map κ (fun a ↦ (a, f a)) (measurable_id.prod_mk hf)) = κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
{γ : Type u_6}
{mγ : MeasurableSpace γ}
{f : β → γ}
(hf : Measurable f)


@[simp]
lemma logDeriv_zpow (x : 𝕜) (n : ℤ) : logDeriv (· ^ n) x = n / x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
(n : ℤ)


nonrec theorem cos_three_mul : cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x

Real.cos (3 * x) = 4 * Real.cos x ^ 3 - 3 * Real.cos x


@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem sSup_eq_bsup {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    sSup (brange o f) = bsup.{_, v} o f

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


lemma units_eq_one_or (u : ℤˣ) : u = 1 ∨ u = -1


protected theorem isFractional (I : FractionalIdeal S P) : IsFractional S (I : Submodule R P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I : FractionalIdeal S P)


/-- If a filter is converging, its limsup coincides with its limit. -/
theorem limsInf_eq_of_le_nhds {f : Filter α} {a : α} [NeBot f] (h : f ≤ 𝓝 a) : f.limsInf = a

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{f : Filter α}
{a : α}
[f.NeBot]
(h : f ≤ 𝓝 a)


@[simp]
theorem whisker_extension (t : LeftExtension f g) {x : B} (h : c ⟶ x) :
    (t.whisker h).extension = t.extension ≫ h

(t : CategoryTheory.Bicategory.LeftExtension f g)

(t.whisker h).extension = CategoryTheory.CategoryStruct.comp t.extension h


@[simp]
theorem trailingDegree_C (ha : a ≠ 0) : trailingDegree (C a) = (0 : ℕ∞)

{R : Type u}
{a : R}
[Semiring R]
(ha : a ≠ 0)


@[symm]
theorem Disjoint.symm {s t : Multiset α} (d : Disjoint s t) : Disjoint t s

{α : Type u_1}
{s t : Multiset α}
(d : s.Disjoint t)


@[simp]
theorem coe_id : ⇑(LocallyBoundedMap.id α) = id


theorem factorMultiset_pow (n : ℕ+) (m : ℕ) :
    factorMultiset (n ^ m) = m • factorMultiset n

(n ^ m).factorMultiset = m • n.factorMultiset


/-- If `s` is bounded, then so is `s ∩ t` -/
theorem BddAbove.inter_of_left (h : BddAbove s) : BddAbove (s ∩ t)

{α : Type u}
[Preorder α]
{s t : Set α}
(h : BddAbove s)


@[to_additive]
lemma orbitRel.Quotient.mem_subgroup_orbit_iff' {H : Subgroup G} {x : orbitRel.Quotient G α}
    {a b : x.orbit} {c : α} (h : (⟦a⟧ : orbitRel.Quotient H x.orbit) = ⟦b⟧) :
    (a : α) ∈ MulAction.orbit H c ↔ (b : α) ∈ MulAction.orbit H c

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{H : Subgroup G}
{x : MulAction.orbitRel.Quotient G α}
{a b : ↑x.orbit}
{c : α}
(h : ⟦a⟧ = ⟦b⟧)

↑a ∈ MulAction.orbit (↥H) c ↔ ↑b ∈ MulAction.orbit (↥H) c


/-- `Polynomial.taylor` as an `AlgHom` for commutative semirings -/
@[simps!]
def taylorAlgHom {R} [CommSemiring R] (r : R) : R[X] →ₐ[R] R[X]

{R : Type u_2}
[CommSemiring R]
(r : R)
(a : Polynomial R)

(Polynomial.taylorAlgHom r) a = (Polynomial.taylor r) a


theorem mul_inl_eq_op_smul [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    (x : tsze R M) (r : R) :
    x * inl r = x <• r

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module Rᵐᵒᵖ M]
(x : tsze R M)
(r : R)


/-- Uniform converence implies pointwise convergence. -/
theorem TendstoUniformlyOn.tendsto_at (h : TendstoUniformlyOn F f p s) {x : α} (hx : x ∈ s) :
    Tendsto (fun n => F n x) p <| 𝓝 (f x)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
(h : TendstoUniformlyOn F f p s)
{x : α}
(hx : x ∈ s)

Filter.Tendsto (fun n => F n x) p (𝓝 (f x))


protected theorem div_le_of_le_mul {m n : Nat} : ∀ {k}, m ≤ k * n → m / k ≤ n


theorem isAssociative_left [Std.Associative gb] (h : Semiconj₂ f ga gb) (h_inj : Injective f) :
    Std.Associative ga

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ga : α → α → α}
{gb : β → β → β}
[Std.Associative gb]
(h : Function.Semiconj₂ f ga gb)
(h_inj : Function.Injective f)


/-- A set is a neighborhood of `a` within `(-∞, a)` if and only if it contains an interval `(l, a)`
with `l < a`. -/
theorem mem_nhdsWithin_Iio_iff_exists_Ioo_subset [NoMinOrder α] {a : α} {s : Set α} :
    s ∈ 𝓝[<] a ↔ ∃ l ∈ Iio a, Ioo l a ⊆ s

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMinOrder α]
{a : α}
{s : Set α}

s ∈ 𝓝[<] a ↔ ∃ l ∈ Set.Iio a, Set.Ioo l a ⊆ s


lemma smul_fin3 {R : Type u} [CommRing R] (P : Fin 3 → R) (u : Rˣ) :
    u • P = ![u * P x, u * P y, u * P z]


@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) :
    I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) =
    Quotient.mk (map C I : Ideal R[X]) f

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

I.polynomialQuotientEquivQuotientPolynomial (Polynomial.map (Ideal.Quotient.mk I) f) =
  (Ideal.Quotient.mk (Ideal.map Polynomial.C I)) f


/-- Negating a nonzero vector commutes with coercion to the underlying module. -/
@[simp, norm_cast]
theorem coe_neg {R : Type*} (v : RayVector R M) : ↑(-v) = -(v : M)

{M : Type u_2}
[AddCommGroup M]
{R : Type u_4}
(v : RayVector R M)


theorem charmatrix_apply :
    charmatrix M i j = (Matrix.diagonal fun _ : n => X) i j - C (M i j)

{R : Type u_1}
[CommRing R]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(i j : n)

M.charmatrix i j = Matrix.diagonal (fun x => Polynomial.X) i j - Polynomial.C (M i j)


@[to_additive]
protected lemma IsOfFinOrder.mem_powers_iff_mem_range_orderOf [DecidableEq G]
    (hx : IsOfFinOrder x) :
    y ∈ Submonoid.powers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·)

{G : Type u_1}
[Monoid G]
{x y : G}
[DecidableEq G]
(hx : IsOfFinOrder x)

y ∈ Submonoid.powers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))


theorem integral_cexp_neg_sum_mul_add {ι : Type*} [Fintype ι] {b : ι → ℂ}
    (hb : ∀ i, 0 < (b i).re) (c : ι → ℂ) :
    ∫ v : ι → ℝ, cexp (- ∑ i, b i * (v i : ℂ) ^ 2 + ∑ i, c i * v i)
      = ∏ i, (π / b i) ^ (1 / 2 : ℂ) * cexp (c i ^ 2 / (4 * b i))

{ι : Type u_2}
[Fintype ι]
{b : ι → ℂ}
(hb : ∀ (i : ι), 0 < (b i).re)
(c : ι → ℂ)


theorem mem_uniformity_of_uniformContinuous_invariant [UniformSpace α] [UniformSpace β]
    {s : Set (β × β)} {f : α → α → β} (hf : UniformContinuous fun p : α × α => f p.1 p.2)
    (hs : s ∈ 𝓤 β) : ∃ u ∈ 𝓤 α, ∀ a b c, (a, b) ∈ u → (f a c, f b c) ∈ s

{f : α → α → β}

(hf : UniformContinuous fun p => f p.1 p.2)

∃ u ∈ 𝓤 α, ∀ (a b c : α), (a, b) ∈ u → (f a c, f b c) ∈ s


{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]


class WellFoundedRelation (α : Sort u) where
  rel : α → α → Prop
  wf  : WellFounded rel

{α : Sort u}
[self : WellFoundedRelation α]


/-- **Triangle inequality** for the norm. -/
@[to_additive norm_add_le "**Triangle inequality** for the norm."]
theorem norm_mul_le' (a b : E) : ‖a * b‖ ≤ ‖a‖ + ‖b‖

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

‖a + b‖ ≤ ‖a‖ + ‖b‖


@[simp]
theorem mapL_id : mapL (fun i ↦ ContinuousLinearMap.id 𝕜 (E i)) = ContinuousLinearMap.id _ _

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

(PiTensorProduct.mapL fun i => ContinuousLinearMap.id 𝕜 (E i)) = ContinuousLinearMap.id 𝕜 (⨂[𝕜] (i : ι), E i)


theorem mk_surjective [Monoid α] : Function.Surjective (@Associates.mk α _)


theorem sSup_sUnion (s : Set (Set β)) : sSup (⋃₀ s) = ⨆ t ∈ s, sSup t

{β : Type u_2}
[CompleteLattice β]
(s : Set (Set β))


theorem boundedBy_eq_ofFunction (m_empty : m ∅ = 0) (s : Set α) :
    boundedBy m s = OuterMeasure.ofFunction m m_empty s

{α : Type u_1}
{m : Set α → ℝ≥0∞}
(m_empty : m ∅ = 0)
(s : Set α)

(MeasureTheory.OuterMeasure.boundedBy m) s = (MeasureTheory.OuterMeasure.ofFunction m m_empty) s


/-- An ingredient of the proof of the Special Adjoint Functor Theorem: a complete well-powered
    category with a small coseparating set has an initial object.

    In fact, it follows from the Special Adjoint Functor Theorem that `C` is already cocomplete,
    see `hasColimits_of_hasLimits_of_isCoseparating`. -/
theorem hasInitial_of_isCoseparating [WellPowered C] [HasLimits C] {𝒢 : Set C} [Small.{v₁} 𝒢]
    (h𝒢 : IsCoseparating 𝒢) : HasInitial C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.WellPowered C]
[CategoryTheory.Limits.HasLimits C]
{𝒢 : Set C}
[Small.{v₁, u₁} ↑𝒢]
(h𝒢 : CategoryTheory.IsCoseparating 𝒢)


lemma erase_sdiff_erase (hab : a ≠ b) (hb : b ∈ s) : s.erase a \ s.erase b = {b}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hab : a ≠ b)
(hb : b ∈ s)


@[simp]
theorem sqrt_inv (x : ℝ) : √x⁻¹ = (√x)⁻¹

√x⁻¹ = (√x)⁻¹


protected theorem NeBot.map₂ (hf : f.NeBot) (hg : g.NeBot) : (map₂ m f g).NeBot

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g : Filter β}
(hf : f.NeBot)
(hg : g.NeBot)


@[simp]
theorem round_natCast (n : ℕ) : round (n : α) = n

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


@[simp] theorem down_compare [Ord α] (a b : ULift α) :
  compare (down a) (down b) = compare a b

{α : Type u}
[Ord α]
(a b : ULift.{u_1, u} α)


/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_mul_eq_mul_of_uniqueMul [Mul A] {f g : MonoidAlgebra R A} {a0 b0 : A}
    (h : UniqueMul f.support g.support a0 b0) :
    (f * g) (a0 * b0) = f a0 * g b0


theorem lt_or_le (a b : α) : a < b ∨ b ≤ a


lemma even_two_mul (a : α) : Even (2 * a)


theorem norm_eq_of_nat {p : ℝ≥0∞} [Fact (1 ≤ p)] {β : ι → Type*}
    [∀ i, SeminormedAddCommGroup (β i)] (n : ℕ) (h : p = n) (f : PiLp p β) :
    ‖f‖ = (∑ i, ‖f i‖ ^ n) ^ (1 / (n : ℝ))

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


@[to_additive ContinuousWithinAt.norm]
theorem ContinuousWithinAt.norm' {s : Set α} {a : α} (h : ContinuousWithinAt f s a) :
    ContinuousWithinAt (fun x => ‖f x‖) s a

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
[TopologicalSpace α]
{f : α → E}
{s : Set α}
{a : α}
(h : ContinuousWithinAt f s a)


/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`. -/
theorem terminated_stable (n_le_m : n ≤ m) (terminatedAt_n : g.TerminatedAt n) :
    g.TerminatedAt m

{K : Type u_1}
{g : GenContFract K}
{n m : ℕ}
(n_le_m : n ≤ m)
(terminatedAt_n : g.TerminatedAt n)


/-- The equivalence of categories `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps]
def karoubiUniversal₁ : C ⥤ Karoubi 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]

(CategoryTheory.Idempotents.karoubiUniversal₁ C D).unitIso =
  (CategoryTheory.Idempotents.functorExtension₁CompWhiskeringLeftToKaroubiIso C D).symm


theorem nhds_atBot [Preorder α] : 𝓝 atBot = ⨅ x : α, 𝓟 (Iic (𝓟 (Iic x)))

𝓝 Filter.atBot = ⨅ x, 𝓟 (Set.Iic (𝓟 (Set.Iic x)))


@[simp]
lemma hom_naturality_apply {X Y : LightCondSet.{u}} (f : X ⟶ Y)  {S T : LightProfiniteᵒᵖ}
    (g : S ⟶ T) (x : X.val.obj S) : f.val.app T (X.val.map g x) = Y.val.map g (f.val.app S x)

{X Y : LightCondSet}
(f : X ⟶ Y)
{S T : LightProfiniteᵒᵖ}
(g : S ⟶ T)
(x : X.val.obj S)


@[to_additive sum_univ_one]
theorem prod_univ_one [CommMonoid β] (f : Fin 1 → β) : ∏ i, f i = f 0

{β : Type u_2}
[CommMonoid β]
(f : Fin 1 → β)


theorem subset_sInf_emptyset [Inhabited s] :
    sInf (∅ : Set s) = default

{α : Type u_2}
(s : Set α)
[Preorder α]
[InfSet α]
[Inhabited ↑s]


@[simp]
theorem map_iInf {m : ι → MeasurableSpace α} : (⨅ i, m i).map f = ⨅ i, (m i).map f

{α : Type u_1}
{β : Type u_2}
{ι : Sort uι}
{f : α → β}
{m : ι → MeasurableSpace α}

MeasurableSpace.map f (⨅ i, m i) = ⨅ i, MeasurableSpace.map f (m i)


theorem exists_fixed_point_of_prime' {p n : ℕ} [hp : Fact p.Prime] (hα : p ∣ Fintype.card α)
    {σ : Perm α} (hσ : σ ^ p ^ n = 1) {a : α} (ha : σ a = a) : ∃ b : α, σ b = b ∧ b ≠ a

{α : Type u_1}
[Fintype α]
{p n : ℕ}
[hp : Fact (Nat.Prime p)]
(hα : p ∣ Fintype.card α)
{σ : Equiv.Perm α}
(hσ : σ ^ p ^ n = 1)
{a : α}
(ha : σ a = a)


@[simp]
theorem zero_bind : bind 0 f = 0

{α : Type u_1}
{β : Type v}
(f : α → Multiset β)


@[simp]
theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio ↑b

Finset.map Fin.valEmbedding (Finset.Iio b) = Finset.Iio ↑b


@[simp]
theorem eraseNone_inter [DecidableEq (Option α)] [DecidableEq α] (s t : Finset (Option α)) :
    eraseNone (s ∩ t) = eraseNone s ∩ eraseNone t

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

Finset.eraseNone (s ∩ t) = Finset.eraseNone s ∩ Finset.eraseNone t


theorem coe_ennreal_ne_coe_ennreal_iff {x y : ℝ≥0∞} : (x : EReal) ≠ (y : EReal) ↔ x ≠ y

↑x ≠ ↑y ↔ x ≠ y


theorem exists_basicOpen_le {V : X.Opens} (x : V) (h : ↑x ∈ U) :
    ∃ f : Γ(X, U), X.basicOpen f ≤ V ∧ ↑x ∈ X.basicOpen f

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
{V : X.Opens}
(x : ↥V)
(h : ↑x ∈ U)

∃ f, X.basicOpen f ≤ V ∧ ↑x ∈ X.basicOpen f


@[to_additive]
theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Subgroup G} (i : ι) :
    ∀ {x : G}, x ∈ S i → x ∈ iSup S

{G : Type u_1}
[Group G]
{ι : Sort u_5}
{S : ι → Subgroup G}
(i : ι)
{x : G}


/-- Lagrange multipliers theorem, 1d version. Let `f : ι → E → ℝ` be a finite family of functions.
Suppose that `φ : E → ℝ` has a local extremum on the set `{x | ∀ i, f i x = f i x₀}` at `x₀`.
Suppose that all functions `f i` as well as `φ` are strictly differentiable at `x₀`.
Then the derivatives `f' i : E → L[ℝ] ℝ` and `φ' : E →L[ℝ] ℝ` are linearly dependent:
there exist `Λ : ι → ℝ` and `Λ₀ : ℝ`, `(Λ, Λ₀) ≠ 0`, such that `∑ i, Λ i • f' i + Λ₀ • φ' = 0`.

See also `IsLocalExtrOn.linear_dependent_of_hasStrictFDerivAt` for a version that
states `¬LinearIndependent ℝ _` instead of existence of `Λ` and `Λ₀`. -/
theorem IsLocalExtrOn.exists_multipliers_of_hasStrictFDerivAt {ι : Type*} [Fintype ι]
    {f : ι → E → ℝ} {f' : ι → E →L[ℝ] ℝ} (hextr : IsLocalExtrOn φ {x | ∀ i, f i x = f i x₀} x₀)
    (hf' : ∀ i, HasStrictFDerivAt (f i) (f' i) x₀) (hφ' : HasStrictFDerivAt φ φ' x₀) :
    ∃ (Λ : ι → ℝ) (Λ₀ : ℝ), (Λ, Λ₀) ≠ 0 ∧ (∑ i, Λ i • f' i) + Λ₀ • φ' = 0

(hextr : IsLocalExtrOn φ {x | ∀ (i : ι), f i x = f i x₀} x₀)

(hf' : ∀ (i : ι), HasStrictFDerivAt (f i) (f' i) x₀)

∃ Λ Λ₀, (Λ, Λ₀) ≠ 0 ∧ ∑ i : ι, Λ i • f' i + Λ₀ • φ' = 0


theorem prod_nndist_eq_add [PseudoMetricSpace α] [PseudoMetricSpace β]
    (hp : p ≠ ∞) (x y : WithLp p (α × β)) :
    nndist x y = (nndist x.fst y.fst ^ p.toReal + nndist x.snd y.snd ^ p.toReal) ^ (1 / p.toReal)

{p : ℝ≥0∞}
{α : Type u_2}
{β : Type u_3}
[hp : Fact (1 ≤ p)]
[PseudoMetricSpace α]
[PseudoMetricSpace β]

p ≠ ⊤ →
  ∀ (x y : WithLp p (α × β)), nndist x y = (nndist x.1 y.1 ^ p.toReal + nndist x.2 y.2 ^ p.toReal) ^ (1 / p.toReal)


/-- A functorial version of `Cosimplicial_object.Augmented.leftOp`. -/
@[simps]
def cosimplicialToSimplicialAugmented :
    CosimplicialObject.Augmented Cᵒᵖ ⥤ (SimplicialObject.Augmented C)ᵒᵖ

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

∀ {X Y : CategoryTheory.CosimplicialObject.Augmented Cᵒᵖ} (f : X ⟶ Y),
  (CategoryTheory.cosimplicialToSimplicialAugmented C).map f =
    Quiver.Hom.op { left := CategoryTheory.NatTrans.leftOp f.right, right := f.left.unop, w := ⋯ }


theorem mul : @Primrec' 2 fun v => v.head * v.tail.head

Nat.Primrec' fun v => v.head * v.tail.head


@[simp] lemma coe_toBoundedLatticeHom (f : CompleteLatticeHom α β) : ⇑f.toBoundedLatticeHom = f

{α : Type u_2}
{β : Type u_3}
[CompleteLattice α]
[CompleteLattice β]
(f : CompleteLatticeHom α β)


@[simp]
theorem image_symm (f : P₁ ≃ᵃ[k] P₂) (s : Set P₂) : f.symm '' s = f ⁻¹' s

{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₂]
(f : P₁ ≃ᵃ[k] P₂)
(s : Set P₂)


/-- `f.dualMap` is injective if and only if `f` is surjective -/
@[simp]
theorem dualMap_injective_iff {f : V₁ →ₗ[K] V₂} :
    Function.Injective f.dualMap ↔ Function.Surjective f

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
{V₂ : Type uV₂}
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
{f : V₁ →ₗ[K] V₂}

Function.Injective ⇑f.dualMap ↔ Function.Surjective ⇑f


@[reassoc (attr := simp)]
lemma descOfIsLeftKanExtension_fac (G : D ⥤ H) (β : F ⟶ L ⋙ G) :
    α ≫ whiskerLeft L (F'.descOfIsLeftKanExtension α G β) = β

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_7, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : F ⟶ L.comp F')
[F'.IsLeftKanExtension α]
(G : CategoryTheory.Functor D H)
(β : F ⟶ L.comp G)

CategoryTheory.CategoryStruct.comp α (CategoryTheory.whiskerLeft L (F'.descOfIsLeftKanExtension α G β)) = β


theorem smul_def (s : SetSemiring A) (P : Submodule R A) :
    s • P = span R (SetSemiring.down (α := A) s) * P

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
(s : SetSemiring A)
(P : Submodule R A)

s • P = Submodule.span R (SetSemiring.down s) * P


lemma disjoint_iff_forall_ne : Disjoint s t ↔ ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ t → a ≠ b

Disjoint s t ↔ ∀ ⦃a : α⦄, a ∈ s → ∀ ⦃b : α⦄, b ∈ t → a ≠ b


protected theorem measurableSet_lt_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[f i] {ω | τ ω < i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[PartialOrder ι]
{τ : Ω → ι}
{f : MeasureTheory.Filtration ι m}
[Countable ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


@[to_additive (attr := simp)]
theorem finprod_true (f : True → M) : ∏ᶠ i, f i = f trivial

{M : Type u_2}
[CommMonoid M]
(f : True → M)


theorem blockDiag'_apply (M : Matrix (Σi, m' i) (Σi, n' i) α) (k : o) (i j) :
    blockDiag' M k i j = M ⟨k, i⟩ ⟨k, j⟩

(M : Matrix ((i : o) × m' i) ((i : o) × n' i) α)


@[to_additive norm_le_zero_iff']
theorem norm_le_zero_iff''' [T0Space E] {a : E} : ‖a‖ ≤ 0 ↔ a = 1

{E : Type u_6}
[SeminormedAddGroup E]
[T0Space E]
{a : E}


@[simp]
lemma snd_prod [IsProbabilityMeasure μ] : (μ.prod ν).snd = ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.IsProbabilityMeasure μ]


@[to_additive]
protected theorem Tendsto.inv_inv : Tendsto m f₁ f₂ → Tendsto m f₁⁻¹ f₂⁻¹

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
[FunLike F α β]
[AddMonoidHomClass F α β]
(m : F)
{f₁ : Filter α}
{f₂ : Filter β}

Filter.Tendsto (⇑m) f₁ f₂ → Filter.Tendsto (⇑m) (-f₁) (-f₂)


@[to_additive]
theorem prod_filter_of_ne {p : α → Prop} [DecidablePred p] (hp : ∀ x ∈ s, f x ≠ 1 → p x) :
    ∏ x ∈ s.filter p, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[CommMonoid β]
{p : α → Prop}
[DecidablePred p]
(hp : ∀ x ∈ s, f x ≠ 1 → p x)

∏ x ∈ Finset.filter p s, f x = ∏ x ∈ s, f x


theorem gal_one_isSolvable : IsSolvable (1 : F[X]).Gal


@[simp]
theorem directSumRight_tmul_lof (x : M₁') (i : ι₂) (y : M₂ i) :
    directSumRight R M₁' M₂ (x ⊗ₜ[R] DirectSum.lof R _ _ i y) =
    DirectSum.lof R _ _ i (x ⊗ₜ[R] y)

(R : Type u)
[CommSemiring R]
{ι₂ : Type v₂}
[DecidableEq ι₂]
{M₁' : Type w₁'}
{M₂ : ι₂ → Type w₂}
[AddCommMonoid M₁']
[(i₂ : ι₂) → AddCommMonoid (M₂ i₂)]
[Module R M₁']
[(i₂ : ι₂) → Module R (M₂ i₂)]
(x : M₁')
(i : ι₂)
(y : M₂ i)

(TensorProduct.directSumRight R M₁' M₂) (x ⊗ₜ[R] (DirectSum.lof R ι₂ M₂ i) y) =
  (DirectSum.lof R ι₂ (fun i => TensorProduct R M₁' (M₂ i)) i) (x ⊗ₜ[R] y)