@[simp]
theorem mk'_toAddSubgroup {s : Set R} {sm : Subsemigroup R} (hm : ↑sm = s) {sa : AddSubgroup R}
    (ha : ↑sa = s) : (NonUnitalSubring.mk' s sm sa hm ha).toAddSubgroup = sa

{R : Type u}
[NonUnitalNonAssocRing R]
{s : Set R}
{sm : Subsemigroup R}
(hm : ↑sm = s)
{sa : AddSubgroup R}
(ha : ↑sa = s)


@[simp]
theorem id_val {F : C ⥤ Type w} {p : F.Elements} : (𝟙 p : p ⟶ p).val = 𝟙 p.1

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : CategoryTheory.Functor C (Type w)}
{p : F.Elements}

↑(CategoryTheory.CategoryStruct.id p) = CategoryTheory.CategoryStruct.id p.fst


theorem bmex_le_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    bmex.{_, v} o f ≤ blsub.{_, v} o f

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


theorem ext_iff {η η' : ApplicativeTransformation F G} :
    η = η' ↔ ∀ (α : Type u) (x : F α), η x = η' x

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
{η η' : ApplicativeTransformation F G}

η = η' ↔ ∀ (α : Type u) (x : F α), (fun {α} => η.app α) x = (fun {α} => η'.app α) x


/-- If a function `f` is strongly measurable w.r.t. a sub-σ-algebra `m` and the measure is σ-finite
on `m`, then there exists spanning measurable sets with finite measure on which `f` has bounded
norm. In particular, `f` is integrable on each of those sets. -/
theorem exists_spanning_measurableSet_norm_le [SeminormedAddCommGroup β] {m m0 : MeasurableSpace α}
    (hm : m ≤ m0) (hf : StronglyMeasurable[m] f) (μ : Measure α) [SigmaFinite (μ.trim hm)] :
    ∃ s : ℕ → Set α,
      (∀ n, MeasurableSet[m] (s n) ∧ μ (s n) < ∞ ∧ ∀ x ∈ s n, ‖f x‖ ≤ n) ∧
      ⋃ i, s i = Set.univ

(hf : MeasureTheory.StronglyMeasurable f)

∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ μ (s n) < ⊤ ∧ ∀ x ∈ s n, ‖f x‖ ≤ ↑n) ∧ ⋃ i, s i = Set.univ


theorem IsCompact.exists_isGreatest [ClosedIciTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : ∃ x, IsGreatest s x

{α : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[ClosedIciTopology α]
{s : Set α}
(hs : IsCompact s)
(ne_s : s.Nonempty)


theorem sSup_image2_eq_sSup_sInf (h₁ : ∀ b, GaloisConnection (swap l b) (u₁ b))
    (h₂ : ∀ a, GaloisConnection (l a ∘ ofDual) (toDual ∘ u₂ a)) :
    sSup (image2 l s t) = l (sSup s) (sInf t)

{l : α → β → γ}

{u₁ : β → γ → α}

{u₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (Function.swap l b) (u₁ b))

(h₂ : ∀ (a : α), GaloisConnection (l a ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ u₂ a))

sSup (Set.image2 l s t) = l (sSup s) (sInf t)


lemma Exact.epi_toCycles (hS : S.Exact) [S.HasLeftHomology] : Epi S.toCycles

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
(hS : S.Exact)
[S.HasLeftHomology]


theorem Scheme.restrictFunctor_map_app_aux {U V : X.Opens} (i : U ⟶ V) (W : Opens V) :
    U.ι ''ᵁ ((X.restrictFunctor.map i).1 ⁻¹ᵁ W) ≤ V.ι ''ᵁ W

{X : AlgebraicGeometry.Scheme}
{U V : X.Opens}
(i : U ⟶ V)
(W : (↑V).Opens)

(AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj
    ((TopologicalSpace.Opens.map (X.restrictFunctor.map i).left.val.base).obj W) ≤
  (AlgebraicGeometry.Scheme.Hom.opensFunctor V.ι).obj W


/-- If `R` is of characteristic `p` and `¬p ∣ n`, then
`cyclotomic (n * p) R = (cyclotomic n R) ^ (p - 1)`. -/
theorem cyclotomic_mul_prime_eq_pow_of_not_dvd (R : Type*) {p n : ℕ} [hp : Fact (Nat.Prime p)]
    [Ring R] [CharP R p] (hn : ¬p ∣ n) : cyclotomic (n * p) R = cyclotomic n R ^ (p - 1)

(R : Type u_1)
{p n : ℕ}
[hp : Fact (Nat.Prime p)]
[Ring R]
[CharP R p]
(hn : ¬p ∣ n)

Polynomial.cyclotomic (n * p) R = Polynomial.cyclotomic n R ^ (p - 1)


lemma integrable_pow_mul_iteratedFDeriv (f : 𝓢(D, V))
    (k n : ℕ) : Integrable (fun x ↦ ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖) μ

{D : Type u_3}
{V : Type u_7}
[NormedAddCommGroup D]
[NormedSpace ℝ D]
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[MeasurableSpace D]
[BorelSpace D]
[SecondCountableTopology D]
(μ : MeasureTheory.Measure D)
[hμ : μ.HasTemperateGrowth]
(f : SchwartzMap D V)
(k n : ℕ)

MeasureTheory.Integrable (fun x => ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖) μ


theorem signAux3_mul_and_swap [Finite α] (f g : Perm α) (s : Multiset α) (hs : ∀ x, x ∈ s) :
    signAux3 (f * g) hs = signAux3 f hs * signAux3 g hs ∧
      Pairwise fun x y => signAux3 (swap x y) hs = -1

{α : Type u}
[DecidableEq α]
[Finite α]
(f g : Equiv.Perm α)
(s : Multiset α)
(hs : ∀ (x : α), x ∈ s)

(f * g).signAux3 hs = f.signAux3 hs * g.signAux3 hs ∧ Pairwise fun x y => (Equiv.swap x y).signAux3 hs = -1


@[to_additive]
lemma mul [Mul β] {g : α → β} (hf : EventuallyConst f l) (hg : EventuallyConst g l) :
    EventuallyConst (f * g) l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{f : α → β}
[Mul β]
{g : α → β}
(hf : Filter.EventuallyConst f l)
(hg : Filter.EventuallyConst g l)


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the top side and `g` on the bottom side. -/
@[simps!]
def fromArrowArrowFunctor' : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor'.obj f).X₁ = f.left.left


@[simp]
theorem continuous_sum_map {f : X → Y} {g : Z → W} :
    Continuous (Sum.map f g) ↔ Continuous f ∧ Continuous g

{X : Type u}
{Y : Type v}
{Z : Type u_1}
{W : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace W]
{f : X → Y}
{g : Z → W}


theorem IsCycleOn.range_pow (hs : s.Finite) (h : f.IsCycleOn s) (ha : a ∈ s) :
    Set.range (fun n => (f ^ n) a : ℕ → α) = s

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


theorem hasSum_div_const_iff (h : a₂ ≠ 0) : HasSum (fun i ↦ f i / a₂) (a₁ / a₂) ↔ HasSum f a₁

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a₁ a₂ : α}
(h : a₂ ≠ 0)

HasSum (fun i => f i / a₂) (a₁ / a₂) ↔ HasSum f a₁


protected theorem ContinuousLinearMap.summable {f : ι → M} (φ : M →SL[σ] M₂) (hf : Summable f) :
    Summable fun b : ι ↦ φ (f b)

{ι : Type u_5}
{R : Type u_7}
{R₂ : Type u_8}
{M : Type u_9}
{M₂ : Type u_10}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₂]
[Module R₂ M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{σ : R →+* R₂}
{f : ι → M}
(φ : M →SL[σ] M₂)
(hf : Summable f)


theorem IsPath.nil {u : V} : (nil : G.Walk u u).IsPath

{V : Type u}
{G : SimpleGraph V}
{u : V}


@[simp] theorem forgetMonoidal_toFunctor : (forgetMonoidal C).toFunctor = forget C

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

(Comon_.forgetMonoidal C).toFunctor = Comon_.forget C


@[refl]
theorem Lex.refl_right (r : α → α → Prop) (s : β → β → Prop) [IsRefl β s] : ∀ x, Prod.Lex r s x x

{α : Type u_1}
{β : Type u_2}
(r : α → α → Prop)
(s : β → β → Prop)
[IsRefl β s]
(x : α × β)


@[csimp] theorem replace_eq_replaceTR : @List.replace = @replaceTR


@[simp] lemma addSubmonoid_closure_range_mul_self : closure (range fun x : ℚ≥0 ↦ x * x) = ⊤

AddSubmonoid.closure (Set.range fun x => x * x) = ⊤


@[simp] lemma toNat_pos : 0 < toNat c ↔ c ≠ 0 ∧ c < ℵ₀

0 < Cardinal.toNat c ↔ c ≠ 0 ∧ c < Cardinal.aleph0


@[to_additive (attr := simp, nolint simpNF)]
theorem tprod_singleton (b : β) (f : β → α) : ∏' x : ({b} : Set β), f x = f b

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


theorem hasPullback_of_cover : HasPullback f g

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


@[simp]
theorem braiding_hom_apply {X Y : Type u} {x : X} {y : Y} :
    ((β_ X Y).hom : X ⊗ Y → Y ⊗ X) (x, y) = (y, x)


theorem ConvexOn.secant_mono_aux1 (hf : ConvexOn 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s)
    (hxy : x < y) (hyz : y < z) : (z - x) * f y ≤ (z - y) * f x + (y - x) * f z

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : ConvexOn 𝕜 s f)
{x y z : 𝕜}
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x < y)
(hyz : y < z)


theorem IsCoprime.pow_left_iff (hm : 0 < m) : IsCoprime (x ^ m) y ↔ IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y : R}
{m : ℕ}
(hm : 0 < m)


lemma HasAntitoneBasis.iInf_principal {ι : Type*} [Preorder ι] [Nonempty ι] [IsDirected ι (· ≤ ·)]
    {s : ι → Set α} (hs : Antitone s) : (⨅ i, 𝓟 (s i)).HasAntitoneBasis s

{α : Type u_1}
{ι : Type u_7}
[Preorder ι]
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{s : ι → Set α}
(hs : Antitone s)


theorem add_eq_right_iff_mul_omega_le {a b : Ordinal} : a + b = b ↔ a * omega ≤ b


lemma essSurj_of_hasLeftResolutions [Φ.HasLeftResolutions] : (Φ.functor ⋙ L₂).EssSurj

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


@[simp]
theorem disjoint_diag_offDiag : Disjoint s.diag s.offDiag

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


theorem comapDomain_smul [AddMonoid M] [Monoid R] [DistribMulAction R M] {f : α → β} (r : R)
    (v : β →₀ M) (hfv : Set.InjOn f (f ⁻¹' ↑v.support))
    (hfrv : Set.InjOn f (f ⁻¹' ↑(r • v).support) :=
      hfv.mono <| Set.preimage_mono <| Finset.coe_subset.mpr support_smul) :
    comapDomain f (r • v) hfrv = r • comapDomain f v hfv

(hfrv : Set.InjOn f (f ⁻¹' ↑(r • v).support) := ⋯)

Finsupp.comapDomain f (r • v) hfrv = r • Finsupp.comapDomain f v hfv


protected theorem Tendsto.Ioo {l₁ l₂ : Filter α} [TendstoIxxClass Ioo l₁ l₂] {lb : Filter β}
    {u₁ u₂ : β → α} (h₁ : Tendsto u₁ lb l₁) (h₂ : Tendsto u₂ lb l₁) :
    Tendsto (fun x => Ioo (u₁ x) (u₂ x)) lb l₂.smallSets

{α : Type u_1}
{β : Type u_2}
[Preorder α]
{l₁ l₂ : Filter α}
[Filter.TendstoIxxClass Set.Ioo l₁ l₂]
{lb : Filter β}
{u₁ u₂ : β → α}
(h₁ : Filter.Tendsto u₁ lb l₁)
(h₂ : Filter.Tendsto u₂ lb l₁)

Filter.Tendsto (fun x => Set.Ioo (u₁ x) (u₂ x)) lb l₂.smallSets


lemma disjoint_sdiff_left : Disjoint (t \ s) s


@[reassoc (attr := simp)]
lemma homologyι_singleObjOpcyclesSelfIso_inv :
    ((single C c j).obj A).homologyι j ≫ (singleObjOpcyclesSelfIso _ _ _).inv =
      (singleObjHomologySelfIso _ _ _).hom

((HomologicalComplex.single C c j).obj A).homologyι j ≫ (HomologicalComplex.singleObjOpcyclesSelfIso c j A).inv =
  (HomologicalComplex.singleObjHomologySelfIso c j A).hom


@[to_additive]
theorem mulSupport_subset_iff' {f : α → M} {s : Set α} :
    mulSupport f ⊆ s ↔ ∀ x ∉ s, f x = 1

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α → M}
{s : Set α}

Function.support f ⊆ s ↔ ∀ x ∉ s, f x = 0


@[to_additive (attr := simp)]
theorem preimage_smul_closedBall (c : G) (x : X) (r : ℝ) :
    (c • ·) ⁻¹' closedBall x r = closedBall (c⁻¹ • x) r

{G : Type v}
{X : Type w}
[PseudoMetricSpace X]
[Group G]
[MulAction G X]
[IsometricSMul G X]
(c : G)
(x : X)
(r : ℝ)

(fun x => c • x) ⁻¹' Metric.closedBall x r = Metric.closedBall (c⁻¹ • x) r


@[simp]
theorem as_ideal_le_as_ideal (x y : ProjectiveSpectrum 𝒜) :
    x.asHomogeneousIdeal ≤ y.asHomogeneousIdeal ↔ x ≤ y

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(x y : ProjectiveSpectrum 𝒜)


/-- The sum of the angles of a possibly degenerate triangle (where the
two given sides are nonzero), vector angle form. -/
theorem angle_add_angle_sub_add_angle_sub_eq_pi {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    angle x y + angle x (x - y) + angle y (y - x) = π

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

InnerProductGeometry.angle x y + InnerProductGeometry.angle x (x - y) + InnerProductGeometry.angle y (y - x) = π


@[simp]
theorem powerset_empty : 𝒫(∅ : Set α) = {∅}


@[to_additive (attr := simp)]
theorem add_apply (x : E) : (p + q) x = p x + q x

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


theorem toReal_sup {a b : ℝ≥0∞} : a ≠ ∞ → b ≠ ∞ → (a ⊔ b).toReal = a.toReal ⊔ b.toReal

a ≠ ⊤ → b ≠ ⊤ → (a ⊔ b).toReal = a.toReal ⊔ b.toReal


@[reassoc (attr := simp)]
theorem w {A B : Under X} (f : A ⟶ B) : A.hom ≫ f.right = B.hom

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
{A B : CategoryTheory.Under X}
(f : A ⟶ B)

CategoryTheory.CategoryStruct.comp A.hom f.right = B.hom


@[simp] theorem counit_comp_inl : counit ∘ₗ inl R A B = counit

(R : Type u)
(A : Type v)
(B : Type w)
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[Coalgebra R A]
[Coalgebra R B]

Coalgebra.counit ∘ₗ LinearMap.inl R A B = Coalgebra.counit


theorem image_uIcc_eq_Icc (h : ContinuousOn f [[a, b]]) :
    f '' [[a, b]] = Icc (sInf (f '' [[a, b]])) (sSup (f '' [[a, b]]))

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[TopologicalSpace β]
[DenselyOrdered α]
[ConditionallyCompleteLinearOrder β]
[OrderTopology β]
{f : α → β}
{a b : α}
(h : ContinuousOn f (Set.uIcc a b))

f '' Set.uIcc a b = Set.Icc (sInf (f '' Set.uIcc a b)) (sSup (f '' Set.uIcc a b))


/-- Given a square from an isomorphism `i` to an arrow `p`, express the target part of `sq`
in terms of the inverse of `i`. -/
theorem square_from_iso_invert {X Y : T} (i : X ≅ Y) (p : Arrow T) (sq : Arrow.mk i.hom ⟶ p) :
    i.inv ≫ sq.left ≫ p.hom = sq.right

(sq : CategoryTheory.Arrow.mk i.hom ⟶ p)

CategoryTheory.CategoryStruct.comp i.inv (CategoryTheory.CategoryStruct.comp sq.left p.hom) = sq.right


theorem lineMap_mono_right (hb : b ≤ b') (hr : 0 ≤ r) : lineMap a b r ≤ lineMap a b' r

{k : Type u_1}
{E : Type u_2}
[OrderedRing k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{a b b' : E}
{r : k}
(hb : b ≤ b')
(hr : 0 ≤ r)

(AffineMap.lineMap a b) r ≤ (AffineMap.lineMap a b') r


@[simp]
lemma val_mul (x y : PreQuasiregular R) : (x * y).val = y.val + x.val + x.val * y.val

{R : Type u_1}
[NonUnitalSemiring R]
(x y : PreQuasiregular R)


@[simp]
theorem swap_le_swap_iff [LE α] [LE β] {a b : α ⊕ β} : a.swap ≤ b.swap ↔ a ≤ b

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
{a b : α ⊕ β}


protected theorem Nodup.map {f : α → β} (hf : Injective f) : Nodup l → Nodup (map f l)

{α : Type u}
{β : Type v}
{l : List α}
{f : α → β}
(hf : Function.Injective f)


/-- A lattice is coatomic iff every element other than `⊤` has a coatom above it. -/
@[mk_iff]
class IsCoatomic [OrderTop α] : Prop where
  /-- Every element other than `⊤` has an atom above it. -/
  eq_top_or_exists_le_coatom : ∀ b : α, b = ⊤ ∨ ∃ a : α, IsCoatom a ∧ b ≤ a

{α : Type u_2}
[PartialOrder α]
[OrderTop α]
[self : IsCoatomic α]
(b : α)


@[simp]
theorem setOf_mem {α} {s : Finset α} : { a | a ∈ s } = s


@[simp]
theorem coe_zero : ((0 : SummableFamily Γ R α) : α → HahnSeries Γ R) = 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}


/-- The equivalence between sections of `J : SingleObj M ⥤ Type u` and fixed points of the
induced action on `J.obj (SingleObj.star M)`. -/
@[simps]
def Types.sections.equivFixedPoints :
    J.sections ≃ MulAction.fixedPoints M (J.obj (SingleObj.star M))

(J : CategoryTheory.Functor (CategoryTheory.SingleObj M) (Type u))

↑((CategoryTheory.Limits.SingleObj.Types.sections.equivFixedPoints J) s) = ↑s (CategoryTheory.SingleObj.star M)


@[simp]
theorem coe_toNatLinearEquiv : ⇑e.toNatLinearEquiv = e

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


@[simp]
theorem recOn_cons (a : α) (m : Multiset α) :
    (a ::ₘ m).recOn C_0 C_cons C_cons_heq = C_cons a m (m.recOn C_0 C_cons C_cons_heq)

{C_cons : (a : α) → (m : Multiset α) → C m → C (a ::ₘ m)}

{C_cons_heq :
  ∀ (a a' : α) (m : Multiset α) (b : C m),
    HEq (C_cons a (a' ::ₘ m) (C_cons a' m b)) (C_cons a' (a ::ₘ m) (C_cons a m b))}


theorem ContDiff.continuous_fderiv (h : ContDiff 𝕜 n f) (hn : 1 ≤ n) :
    Continuous fun x => fderiv 𝕜 f x

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


theorem whiskerLeft_id_bimod {X Y Z : Mon_ C} {M : Bimod X Y} {N : Bimod Y Z} :
    whiskerLeft M (𝟙 N) = 𝟙 (M.tensorBimod N)

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

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

M.whiskerLeft (𝟙 N) = 𝟙 (M.tensorBimod N)


/-- The range of a proper map is closed. -/
lemma IsProperMap.isClosed_range (hf : IsProperMap f) : IsClosed (range f)

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


theorem one_div_pow_anti (a1 : 1 ≤ a) : Antitone fun n : ℕ => 1 / a ^ n

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(a1 : 1 ≤ a)


@[simp]
theorem curryLeft_zero {n : ℕ} : curryLeft (0 : M'' [⋀^Fin n.succ]→ₗ[R'] N'') = 0

{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[Module R' M'']
[Module R' N'']
{n : ℕ}


@[simp]
theorem preimage_closedBall (h : α ≃ᵢ β) (x : β) (r : ℝ) :
    h ⁻¹' Metric.closedBall x r = Metric.closedBall (h.symm x) r

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(h : α ≃ᵢ β)
(x : β)
(r : ℝ)

⇑h ⁻¹' Metric.closedBall x r = Metric.closedBall (h.symm x) r


/-- Definition of the infimum of two congruence relations. -/
@[to_additive "Definition of the infimum of two additive congruence relations."]
theorem inf_iff_and {c d : Con M} {x y} : (c ⊓ d) x y ↔ c x y ∧ d x y

{M : Type u_1}
[Add M]
{c d : AddCon M}
{x y : M}


@[to_additive (attr := simp)]
theorem pureMonoidHom_apply (a : α) : pureMonoidHom a = pure a


@[simp, norm_cast]
theorem re_coe (z : 𝔻) : (z : ℂ).re = z.re


theorem TendstoUniformly.tendstoUniformlyOnFilter (h : TendstoUniformly F f p) :
    TendstoUniformlyOnFilter F f p ⊤

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{p : Filter ι}
(h : TendstoUniformly F f p)


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(m : ℕ)


/-- `dvd` is injective in the left argument -/
lemma dvd_left_injective : Function.Injective ((· ∣ ·) : ℕ → ℕ → Prop)


@[simp]
theorem id (X : PresheafedSpace.{_, _, v} C) (x : X) :
    (𝟙 X : X ⟶ X).stalkMap x = 𝟙 (X.presheaf.stalk x)

(X : AlgebraicGeometry.PresheafedSpace C)

AlgebraicGeometry.PresheafedSpace.Hom.stalkMap (𝟙 X) x = 𝟙 (X.presheaf.stalk x)


/-- A relation is well founded iff its lift to a quotient is. -/
@[simp]
theorem wellFounded_lift₂_iff [Setoid α] {r : α → α → Prop}
    {H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂} :
    WellFounded (Quotient.lift₂ r H) ↔ WellFounded r


/-- The natural functor from `R`-coalgebras to comonoid objects in the category of `R`-modules. -/
@[simps]
def toComon : CoalgebraCat R ⥤ Comon_ (ModuleCat R)

(R : Type u)
[CommRing R]
(X : CoalgebraCat R)

(CoalgebraCat.toComon R).obj X = X.toComonObj


theorem le_trim (hm : m ≤ m0) : μ s ≤ μ.trim hm s

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hm : m ≤ m0)


theorem target_inter_inv_preimage_preimage (s : Set β) :
    e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s

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

e.target ∩ ↑e.symm ⁻¹' (↑e ⁻¹' s) = e.target ∩ s


protected theorem lt_of_sub_pos (h : 0 < n - m) : m < n


theorem condexpIndSMul_add (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (x y : G) :
    condexpIndSMul hm hs hμs (x + y) = condexpIndSMul hm hs hμs x + condexpIndSMul hm hs hμs y

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(x y : G)

MeasureTheory.condexpIndSMul hm hs hμs (x + y) =
  MeasureTheory.condexpIndSMul hm hs hμs x + MeasureTheory.condexpIndSMul hm hs hμs y


theorem Real.totallyBounded_ball (x ε : ℝ) : TotallyBounded (ball x ε)


@[norm_cast]
theorem WithTop.coe_iSup [SupSet α] (f : ι → α) (h : BddAbove (Set.range f)) :
    ↑(⨆ i, f i) = (⨆ i, f i : WithTop α)

{α : Type u_1}
{ι : Sort u_4}
[Preorder α]
[SupSet α]
(f : ι → α)
(h : BddAbove (Set.range f))


/-- A mono factorisation of `g ≫ f`, where `g` is an isomorphism,
gives a mono factorisation of `f`. -/
@[simps]
def ofIsoComp {X' : C} (g : X' ⟶ X) [IsIso g] (F : MonoFactorisation (g ≫ f)) :
    MonoFactorisation f

(F : CategoryTheory.Limits.MonoFactorisation (g ≫ f))

(CategoryTheory.Limits.MonoFactorisation.ofIsoComp g F).e = CategoryTheory.inv g ≫ F.e


theorem Subspace.biUnion_ne_univ_of_ne_top (hs : ∀ p ∈ s, p ≠ ⊤) :
    ⋃ p ∈ s, (p : Set E) ≠ Set.univ

{k : Type u_1}
{E : Type u_2}
[DivisionRing k]
[Infinite k]
[AddCommGroup E]
[Module k E]
{s : Finset (Subspace k E)}
(hs : ∀ p ∈ s, p ≠ ⊤)


@[to_additive lt_neg]
theorem lt_inv' : a < b⁻¹ ↔ b < a⁻¹

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

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


theorem le_sup_lintegral (f g : α →ₛ ℝ≥0∞) : f.lintegral μ ⊔ g.lintegral μ ≤ (f ⊔ g).lintegral μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f g : MeasureTheory.SimpleFunc α ℝ≥0∞)


@[simp]
theorem Fintype.piFinset_univ {α : Type*} {β : α → Type*} [DecidableEq α] [Fintype α]
    [∀ a, Fintype (β a)] :
    (Fintype.piFinset fun a : α => (Finset.univ : Finset (β a))) =
      (Finset.univ : Finset (∀ a, β a))

{α : Type u_2}
{β : α → Type u_3}
[DecidableEq α]
[Fintype α]
[(a : α) → Fintype (β a)]

(Fintype.piFinset fun a => Finset.univ) = Finset.univ


theorem convexJoin_mono_right (ht : t₁ ⊆ t₂) : convexJoin 𝕜 s t₁ ⊆ convexJoin 𝕜 s t₂

{𝕜 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s t₁ t₂ : Set E}
(ht : t₁ ⊆ t₂)


@[to_additive (attr := simp)]
theorem preimage_mul_left_ball [IsometricSMul G G] (a b : G) (r : ℝ≥0∞) :
    (a * ·) ⁻¹' ball b r = ball (a⁻¹ * b) r

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul G G]
(a b : G)
(r : ℝ≥0∞)

(fun x => a * x) ⁻¹' EMetric.ball b r = EMetric.ball (a⁻¹ * b) r


theorem tr_respects : Respects (TM0.step M) (TM1.step (tr M)) fun a b ↦ trCfg M a = b

{Γ : Type u_1}
[Inhabited Γ]
{Λ : Type u_2}
[Inhabited Λ]
(M : Turing.TM0.Machine Γ Λ)

Turing.Respects (Turing.TM0.step M) (Turing.TM1.step (Turing.TM0to1.tr M)) fun a b => Turing.TM0to1.trCfg M a = b


@[simp]
lemma binaryProductIso_inv_comp_snd :
    (binaryProductIso F G).inv ≫ Limits.prod.snd = prod.snd

(F G : CategoryTheory.Functor C (Type w))

CategoryTheory.CategoryStruct.comp (CategoryTheory.FunctorToTypes.binaryProductIso F G).inv
    CategoryTheory.Limits.prod.snd =
  CategoryTheory.FunctorToTypes.prod.snd


/-- The object level part of the backward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
@[simps]
def ofMon_Comon_obj (M : Mon_ (Comon_ C)) : Bimon_ C

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

(Bimon_.ofMon_Comon_obj C M).counit.hom = M.X.counit


theorem IsMax.mono (ha : IsMax a) (h : a ≤ b) : IsMax b

{α : Type u_1}
[Preorder α]
{a b : α}
(ha : IsMax a)
(h : a ≤ b)


/-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ

∀ (a : ℝ × ℝ), (Complex.equivRealProdLm.symm a).re = a.1


@[to_additive]
theorem Submonoid.top_closure_mul_self_eq (s : Submonoid M) :
    _root_.closure (s : Set M) * _root_.closure s = _root_.closure s

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
(s : Submonoid M)


/-- Turn a colimit for `F : Jᵒᵖ ⥤ C` into a limit for `F.rightOp : J ⥤ Cᵒᵖ`. -/
@[simps]
def isLimitConeRightOpOfCocone (F : Jᵒᵖ ⥤ C) {c : Cocone F} (hc : IsColimit c) :
    IsLimit (coneRightOpOfCocone c)

(hc : CategoryTheory.Limits.IsColimit c)

(s : CategoryTheory.Limits.Cone F.rightOp)

(CategoryTheory.Limits.isLimitConeRightOpOfCocone F hc).lift s =
  (hc.desc (CategoryTheory.Limits.coconeOfConeRightOp s)).op


@[simp]
theorem specializes_pi {f g : ∀ i, π i} : f ⤳ g ↔ ∀ i, f i ⤳ g i

{ι : Type u_5}
{π : ι → Type u_6}
[(i : ι) → TopologicalSpace (π i)]
{f g : (i : ι) → π i}


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


theorem map_comap_eq_self_of_surjective
    {f : R →+* S} (hf : Function.Surjective f) (t : Subsemiring S) : (t.comap f).map f = t

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R →+* S}
(hf : Function.Surjective ⇑f)
(t : Subsemiring S)

Subsemiring.map f (Subsemiring.comap f t) = t


@[to_additive mem_add_center]
theorem mem_center {a : G} : a ∈ center G ↔ ∀ g, g * a = a * g

a ∈ IsSubgroup.center G ↔ ∀ (g : G), g * a = a * g


@[simp]
theorem induced_inf : (t₁ ⊓ t₂).induced g = t₁.induced g ⊓ t₂.induced g

{α : Type u_1}
{β : Type u_2}
{t₁ t₂ : TopologicalSpace α}
{g : β → α}

TopologicalSpace.induced g (t₁ ⊓ t₂) = TopologicalSpace.induced g t₁ ⊓ TopologicalSpace.induced g t₂


theorem QuotientRing.isOpenMap_coe : IsOpenMap (mk N)

{R : Type u_1}
[TopologicalSpace R]
[CommRing R]
(N : Ideal R)
[TopologicalRing R]


protected theorem sub_lt_of_sub_lt {a b c : Int} (h : a - b < c) : a - c < b


/--
A class describing the property of reflecting effective epimorphisms.
-/
class ReflectsEffectiveEpis (F : C ⥤ D) : Prop where
  /--
  A functor reflects effective epimorphisms if morphisms that are mapped to epimorphisms are
  themselves effective epimorphisms.
  -/
  reflects : ∀ {X Y : C} (f : X ⟶ Y), EffectiveEpi (F.map f) → EffectiveEpi f

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_2} D]
{F : CategoryTheory.Functor C D}
[self : F.ReflectsEffectiveEpis]
{X Y : C}
(f : X ⟶ Y)

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


/-- The product of two `s`-factored numbers is again `s`-factored. -/
lemma mul_mem_factoredNumbers {s : Finset ℕ} {m n : ℕ} (hm : m ∈ factoredNumbers s)
    (hn : n ∈ factoredNumbers s) :
    m * n ∈ factoredNumbers s

{s : Finset ℕ}
{m n : ℕ}
(hm : m ∈ Nat.factoredNumbers s)
(hn : n ∈ Nat.factoredNumbers s)


@[simp] theorem setOf_top : { _x : α | ⊤ } = univ


/-- `Matrix.conjTranspose` as a `LinearMap` -/
@[simps apply]
def conjTransposeLinearEquiv [CommSemiring R] [StarRing R] [AddCommMonoid α] [StarAddMonoid α]
    [Module R α] [StarModule R α] : Matrix m n α ≃ₗ⋆[R] Matrix n m α

(m : Type u_2)
(n : Type u_3)
(R : Type u_7)
(α : Type v)
[CommSemiring R]
[StarRing R]
[AddCommMonoid α]
[StarAddMonoid α]
[Module R α]
[StarModule R α]

∀ (a : Matrix m n α), (Matrix.conjTransposeLinearEquiv m n R α) a = (Matrix.conjTransposeAddEquiv m n α).toFun a


/-- The exponent of product of two monoids is the `lcm` of the exponents of the
individuaul monoids. -/
@[to_additive AddMonoid.exponent_prod "The exponent of product of two additive monoids is the `lcm`
of the exponents of the individuaul additive monoids."]
theorem Monoid.exponent_prod {M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂] :
    exponent (M₁ × M₂) = lcm (exponent M₁) (exponent M₂)

{M₁ : Type u_1}
{M₂ : Type u_2}
[Monoid M₁]
[Monoid M₂]

Monoid.exponent (M₁ × M₂) = lcm (Monoid.exponent M₁) (Monoid.exponent M₂)


lemma fourierIntegralInv_comm (f : V → E) :
    𝓕 (𝓕⁻ f) = 𝓕⁻ (𝓕 f)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MeasurableSpace V]
[BorelSpace V]
[FiniteDimensional ℝ V]
(f : V → E)

Real.fourierIntegral (Real.fourierIntegralInv f) = Real.fourierIntegralInv (Real.fourierIntegral f)


theorem lf_neg_iff {x y : PGame} : y ⧏ -x ↔ x ⧏ -y


theorem ContinuousOn.clm_comp {X} [TopologicalSpace X] {g : X → F →L[𝕜] G} {f : X → E →L[𝕜] F}
    {s : Set X} (hg : ContinuousOn g s) (hf : ContinuousOn f s) :
    ContinuousOn (fun x => (g x).comp (f x)) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{X : Type u_5}
[TopologicalSpace X]
{g : X → F →L[𝕜] G}
{f : X → E →L[𝕜] F}
{s : Set X}
(hg : ContinuousOn g s)
(hf : ContinuousOn f s)


@[simp] lemma nil_copy {x' y' : V} {p : G.Walk x y} (hx : x = x') (hy : y = y') :
    (p.copy hx hy).Nil = p.Nil

{V : Type u}
{G : SimpleGraph V}
{x y x' y' : V}
{p : G.Walk x y}
(hx : x = x')
(hy : y = y')


@[simp]
theorem repr_self : b.repr (b i) = Finsupp.single i 1

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


@[to_additive]
theorem ciSup_mul_le [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] {a : α} {g : ι → α}
    {h : α} (H : ∀ i, g i * h ≤ a) : iSup g * h ≤ a

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


nonrec theorem exists_mem_Ioc_zpow {x : ℝ≥0} {y : ℝ≥0} (hx : x ≠ 0) (hy : 1 < y) :
    ∃ n : ℤ, x ∈ Set.Ioc (y ^ n) (y ^ (n + 1))


lemma lieCharpoly_coeff_natDegree (i j : ℕ) (hij : i + j = finrank R M) :
    ((lieCharpoly R M x y).coeff i).natDegree ≤ j

(hij : i + j = FiniteDimensional.finrank R M)

((LieAlgebra.engel_isBot_of_isMin.lieCharpoly R M x y).coeff i).natDegree ≤ j


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

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(self : AkraBazziRecurrence T g a b r)
(n : ℕ)
(hn : n < self.n₀)


@[simp]
theorem mapAction_ε_inv_hom : (inv (F.mapAction G).ε).hom = inv F.ε

(F : CategoryTheory.MonoidalFunctor V W)

(CategoryTheory.inv (F.mapAction G).ε).hom = CategoryTheory.inv F.ε


@[simp]
theorem lineDerivWithin_univ : lineDerivWithin 𝕜 f univ x v = lineDeriv 𝕜 f x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{x v : E}

lineDerivWithin 𝕜 f Set.univ x v = lineDeriv 𝕜 f x v


theorem cosh_dist' (z w : ℍ) :
    Real.cosh (dist z w) = ((z.re - w.re) ^ 2 + z.im ^ 2 + w.im ^ 2) / (2 * z.im * w.im)


theorem mul_conj (z : ℂ) : z * conj z = normSq z

z * (starRingEnd ℂ) z = ↑(Complex.normSq z)


/-- For positive `a` and `b`, the prime factors of `a * b` are the union of those of `a` and `b` -/
theorem perm_primeFactorsList_mul {a b : ℕ} (ha : a ≠ 0) (hb : b ≠ 0) :
    (a * b).primeFactorsList ~ a.primeFactorsList ++ b.primeFactorsList

(a * b).primeFactorsList.Perm (a.primeFactorsList ++ b.primeFactorsList)


/-- A simply connected space is one whose fundamental groupoid is equivalent to `Discrete Unit` -/
@[mk_iff simply_connected_def]
class SimplyConnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
  equiv_unit : Nonempty (FundamentalGroupoid X ≌ Discrete Unit)

SimplyConnectedSpace X ↔ Nonempty (FundamentalGroupoid X ≌ CategoryTheory.Discrete Unit)


theorem stepBound_pos_iff {n : ℕ} : 0 < stepBound n ↔ 0 < n

0 < SzemerediRegularity.stepBound n ↔ 0 < n


/-- Let `A` and `C` be the adjacency matrices of a strongly regular graph with parameters `n k ℓ μ`
and its complement respectively and `I` be the identity matrix,
then `A ^ 2 = k • I + ℓ • A + μ • C`. `C` is equivalent to the expression `J - I - A`
more often found in the literature, where `J` is the all-ones matrix. -/
theorem IsSRGWith.matrix_eq {α : Type*} [Semiring α] (h : G.IsSRGWith n k ℓ μ) :
    G.adjMatrix α ^ 2 = k • (1 : Matrix V V α) + ℓ • G.adjMatrix α + μ • Gᶜ.adjMatrix α

{V : Type u}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
{α : Type u_1}
[Semiring α]
(h : G.IsSRGWith n k ℓ μ)

SimpleGraph.adjMatrix α G ^ 2 = k • 1 + ℓ • SimpleGraph.adjMatrix α G + μ • SimpleGraph.adjMatrix α Gᶜ


theorem factors_decreasing [IsDomain α] (b₁ b₂ : α) (h₁ : b₁ ≠ 0) (h₂ : ¬IsUnit b₂) :
    span ({b₁ * b₂} : Set α) < span {b₁}

{α : Type u}
[CommSemiring α]
[IsDomain α]
(b₁ b₂ : α)
(h₁ : b₁ ≠ 0)
(h₂ : ¬IsUnit b₂)


theorem commMap_apply_of_isReal (x : (K →+* ℂ) → ℂ) {w : InfinitePlace K} (hw : IsReal w) :
    (commMap K x).1 ⟨w, hw⟩ = (x w.embedding).re

(K : Type u_1)
[Field K]
(x : (K →+* ℂ) → ℂ)
{w : NumberField.InfinitePlace K}
(hw : w.IsReal)

((NumberField.mixedEmbedding.commMap K) x).1 ⟨w, hw⟩ = (x w.embedding).re


@[simp]
theorem rootSet_one (S) [CommRing S] [IsDomain S] [Algebra T S] : (1 : T[X]).rootSet S = ∅

{T : Type w}
[CommRing T]
(S : Type u_1)
[CommRing S]
[IsDomain S]
[Algebra T S]


theorem mul_mk'_eq_mk'_of_mul (x y : R) (z : M) :
    (algebraMap R S) x * mk' S y z = mk' S (x * y) z

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

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


theorem eq_of_superset_of_card_ge (hst : s ⊆ t) (hts : t.card ≤ s.card) : t = s

{α : Type u_1}
{s t : Finset α}
(hst : s ⊆ t)
(hts : t.card ≤ s.card)


theorem support_le_prod_of_mem {l : List (Perm α)} (h : f ∈ l) (hl : l.Pairwise Disjoint) :
    f.support ≤ l.prod.support

(hl : List.Pairwise Equiv.Perm.Disjoint l)


@[simp]
theorem sub_eq_add : a - b = a + b

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


@[simp, mfld_simps]
theorem ofSet_univ_eq_refl : ofSet univ isOpen_univ = PartialHomeomorph.refl X

PartialHomeomorph.ofSet Set.univ ⋯ = PartialHomeomorph.refl X


/-- A helper structure to construct the shift functor `(Discrete A) ⥤ (C ⥤ C)`. -/
structure ShiftMkCore where
  /-- the family of shift functors -/
  F : A → C ⥤ C
  /-- the shift by 0 identifies to the identity functor -/
  zero : F 0 ≅ 𝟭 C
  /-- the composition of shift functors identifies to the shift by the sum -/
  add : ∀ n m : A, F (n + m) ≅ F n ⋙ F m
  /-- compatibility with the associativity -/
  assoc_hom_app : ∀ (m₁ m₂ m₃ : A) (X : C),
    (add (m₁ + m₂) m₃).hom.app X ≫ (F m₃).map ((add m₁ m₂).hom.app X) =
      eqToHom (by rw [add_assoc]) ≫ (add m₁ (m₂ + m₃)).hom.app X ≫
        (add m₂ m₃).hom.app ((F m₁).obj X) := by aesop_cat
  /-- compatibility with the left addition with 0 -/
  zero_add_hom_app : ∀ (n : A) (X : C), (add 0 n).hom.app X =
    eqToHom (by dsimp; rw [zero_add]) ≫ (F n).map (zero.inv.app X) := by aesop_cat
  /-- compatibility with the right addition with 0 -/
  add_zero_hom_app : ∀ (n : A) (X : C), (add n 0).hom.app X =
    eqToHom (by dsimp; rw [add_zero]) ≫ zero.inv.app ((F n).obj X) := by aesop_cat

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
(self : CategoryTheory.ShiftMkCore C A)
(n : A)
(X : C)

(self.add 0 n).hom.app X =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) ((self.F n).map (self.zero.inv.app X))


@[simp]
theorem symm_toRingEquiv : (e.symm : A₂ ≃+* A₁) = (e : A₁ ≃+* A₂).symm

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


/-- The order isomorphism between ordinals less than `o` and `o.out.α`. -/
@[simps!]
noncomputable def enumIsoOut (o : Ordinal) : Set.Iio o ≃o o.out.α

o.enumIsoOut x = Ordinal.enum (fun x x_1 => x < x_1) ↑x ⋯


@[simp]
theorem ι_range_comap_reverse :
    (ι Q).range.comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q)
      = LinearMap.range (ι Q)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)

Submodule.comap CliffordAlgebra.reverse (LinearMap.range (CliffordAlgebra.ι Q)) = LinearMap.range (CliffordAlgebra.ι Q)


theorem realize_denselyOrdered_iff [Preorder M] :
    M ⊨ Language.order.denselyOrderedSentence ↔ DenselyOrdered M

M ⊨ FirstOrder.Language.order.denselyOrderedSentence ↔ DenselyOrdered M


@[measurability]
theorem measurable_infDist {s : Set α} : Measurable fun x => infDist x s

{α : Type u_1}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{s : Set α}


lemma tilted_comm (hf : Integrable (fun x ↦ exp (f x)) μ) {g : α → ℝ}
    (hg : Integrable (fun x ↦ exp (g x)) μ) :
    (μ.tilted f).tilted g = (μ.tilted g).tilted f

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) μ)

(hg : MeasureTheory.Integrable (fun x => rexp (g x)) μ)


@[simp]
theorem aeval_X : aeval x (X : R[X]) = x

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


theorem succ_log_def {b x : Ordinal} (hb : 1 < b) (hx : x ≠ 0) :
    succ (log b x) = sInf { o : Ordinal | x < b ^ o }

{b x : Ordinal.{u_1}}
(hb : 1 < b)
(hx : x ≠ 0)

Order.succ (Ordinal.log b x) = sInf {o | x < b ^ o}


/-- An induction principle for closure membership. If `p` holds for `0`, `1`, and all elements
of `s`, and is preserved under addition, negation, and multiplication, then `p` holds for all
elements of the closure of `s`. -/
@[elab_as_elim]
theorem closure_induction {s : Set R} {p : R → Prop} {x} (h : x ∈ closure s) (Hs : ∀ x ∈ s, p x)
    (zero : p 0) (one : p 1) (add : ∀ x y, p x → p y → p (x + y)) (neg : ∀ x : R, p x → p (-x))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x

(add : ∀ (x y : R), p x → p y → p (x + y))

(mul : ∀ (x y : R), p x → p y → p (x * y))


theorem Subset.ndunion_eq_right {s t : Multiset α} (h : s ⊆ t) : s.ndunion t = t

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


@[to_additive]
theorem set_subsingleton (h : UniqueMul A B a0 b0) :
    Set.Subsingleton { ab : G × G | ab.1 ∈ A ∧ ab.2 ∈ B ∧ ab.1 * ab.2 = a0 * b0 }

{G : Type u_1}
[Add G]
{A B : Finset G}
{a0 b0 : G}
(h : UniqueAdd A B a0 b0)

{ab | ab.1 ∈ A ∧ ab.2 ∈ B ∧ ab.1 + ab.2 = a0 + b0}.Subsingleton


lemma card_diffs_iff :
    (s \\ t).card = s.card * t.card ↔ (s ×ˢ t : Set (α × α)).InjOn fun x ↦ x.1 \ x.2

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

(s.diffs t).card = s.card * t.card ↔ Set.InjOn (fun x => x.1 \ x.2) (↑s ×ˢ ↑t)


theorem LiftRel.swap_lem {R : α → β → Prop} {s1 s2} (h : LiftRel R s1 s2) :
    LiftRel (swap R) s2 s1

{α : Type u}
{β : Type v}
{R : α → β → Prop}
{s1 : Stream'.WSeq α}
{s2 : Stream'.WSeq β}
(h : Stream'.WSeq.LiftRel R s1 s2)

Stream'.WSeq.LiftRel (Function.swap R) s2 s1


@[simp]
theorem map_eq_empty : s.map f = ∅ ↔ s = ∅

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


/-- A version of `convexHull_prod` for `Set.reProdIm`. -/
lemma convexHull_reProdIm (s t : Set ℝ) :
    convexHull ℝ (s ×ℂ t) = convexHull ℝ s ×ℂ convexHull ℝ t

(convexHull ℝ) (s ×ℂ t) = (convexHull ℝ) s ×ℂ (convexHull ℝ) t


protected theorem «exists» {α : Sort _} {f : Sym2 α → Prop} :
    (∃ x : Sym2 α, f x) ↔ ∃ x y, f s(x, y)


theorem singularPart_neg (s : SignedMeasure α) (μ : Measure α) :
    (-s).singularPart μ = -s.singularPart μ

{α : Type u_1}
{m : MeasurableSpace α}
(s : MeasureTheory.SignedMeasure α)
(μ : MeasureTheory.Measure α)


theorem sameRay_neg_smul_left_iff_of_ne {v : M} {r : R} (hv : v ≠ 0) (hr : r ≠ 0) :
    SameRay R (r • v) (-v) ↔ r < 0

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{v : M}
{r : R}
(hv : v ≠ 0)
(hr : r ≠ 0)


theorem toIocMod_add_toIcoMod_zero (a b : α) :
    toIocMod hp 0 (a - b) + toIcoMod hp 0 (b - a) = p

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


@[to_additive]
theorem TendstoUniformlyOn.mul (hf : TendstoUniformlyOn f g l s)
    (hf' : TendstoUniformlyOn f' g' l s) : TendstoUniformlyOn (f * f') (g * g') l s

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Type u_3}
{l : Filter ι}
{f f' : ι → β → α}
{g g' : β → α}
{s : Set β}
(hf : TendstoUniformlyOn f g l s)
(hf' : TendstoUniformlyOn f' g' l s)

TendstoUniformlyOn (f + f') (g + g') l s


theorem mul_smul_mul_eq_smul_mul_smul (x y : R) : (x * y) • (M * N) = (x • M) * (y • N)

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


theorem uniformContinuous_vadd : UniformContinuous fun x : V × P => x.1 +ᵥ x.2

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]


theorem lt_of_succ_lt      {n m : Nat} : succ n < m → n < m


@[simp]
theorem re_smul (g : GL(2, ℝ)⁺) (z : ℍ) : (g • z).re = (num g z / denom g z).re

(g • z).re = (UpperHalfPlane.num g z / UpperHalfPlane.denom g z).re


theorem mul_single_apply_of_not_exists_add [Add G] (r : k) {g g' : G} (x : k[G])
    (h : ¬∃ d, g' = d + g) : (x * single g r) g' = 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Add G]
(r : k)
{g g' : G}
(x : AddMonoidAlgebra k G)
(h : ¬∃ d, g' = d + g)

(x * AddMonoidAlgebra.single g r) g' = 0


@[simp]
theorem range_comp [RingHomSurjective σ₂₃] [RingHomSurjective σ₁₃] :
    LinearMap.range (h.comp (e : M →ₛₗ[σ₁₂] M₂) : M →ₛₗ[σ₁₃] M₃) = LinearMap.range h

{R : Type u_1}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_5}
{M₂ : Type u_7}
{M₃ : Type u_8}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
(e : M ≃ₛₗ[σ₁₂] M₂)
(h : M₂ →ₛₗ[σ₂₃] M₃)
[RingHomSurjective σ₂₃]
[RingHomSurjective σ₁₃]

LinearMap.range (h.comp ↑e) = LinearMap.range h


theorem image_subset_iff : s.image f ⊆ t ↔ ∀ x ∈ s, f x ∈ t

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


theorem not_of_not_imp {a : Prop} : ¬(a → b) → ¬b


theorem add_divMonomial (x y : MvPolynomial σ R) (s : σ →₀ ℕ) :
    (x + y) /ᵐᵒⁿᵒᵐⁱᵃˡ s = x /ᵐᵒⁿᵒᵐⁱᵃˡ s + y /ᵐᵒⁿᵒᵐⁱᵃˡ s

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(x y : MvPolynomial σ R)
(s : σ →₀ ℕ)

(x + y).divMonomial s = x.divMonomial s + y.divMonomial s


theorem subset_image_union (f : α → β) (s : Set α) (t : Set β) : f '' (s ∪ f ⁻¹' t) ⊆ f '' s ∪ t

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


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


@[to_additive]
theorem reduce_invRev {w : List (α × Bool)} : reduce (invRev w) = invRev (reduce w)

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

FreeAddGroup.reduce (FreeAddGroup.negRev w) = FreeAddGroup.negRev (FreeAddGroup.reduce w)


/-- Torsion groups are closed under extensions. -/
@[to_additive AddIsTorsion.extension_closed "Additive torsion groups are closed under extensions."]
theorem IsTorsion.extension_closed {f : G →* H} (hN : N = f.ker) (tH : IsTorsion H)
    (tN : IsTorsion N) : IsTorsion G

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
{N : AddSubgroup G}
[AddGroup H]
{f : G →+ H}
(hN : N = f.ker)
(tH : AddMonoid.IsTorsion H)
(tN : AddMonoid.IsTorsion ↥N)


theorem Set.Finite.isClopen_biInter {s : Set Y} (hs : s.Finite) {f : Y → Set X}
    (h : ∀ i ∈ s, IsClopen (f i)) : IsClopen (⋂ i ∈ s, f i)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
{s : Set Y}
(hs : s.Finite)
{f : Y → Set X}
(h : ∀ i ∈ s, IsClopen (f i))


/-- A module over a `Subsingleton` semiring is a `Subsingleton`. We cannot register this
as an instance because Lean has no way to guess `R`. -/
protected theorem Module.subsingleton (R M : Type*) [Semiring R] [Subsingleton R] [AddCommMonoid M]
    [Module R M] : Subsingleton M

(R : Type u_9)
(M : Type u_10)
[Semiring R]
[Subsingleton R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem blocks_length : c.blocks.length = c.length


/-- Values of Hurwitz zeta functions at (strictly) negative integers.

TODO: This formula is also correct for `k = 0`; but our current proof does not work in this
case. -/
theorem hurwitzZeta_neg_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :
    hurwitzZeta x (-k) =
    -1 / (k + 1) * ((Polynomial.bernoulli (k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.hurwitzZeta (↑x) (-↑k) =
  -1 / (↑k + 1) * Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (k + 1)))


@[to_additive]
theorem mulAntidiagonal_mono_left (h : s₁ ⊆ s₂) : mulAntidiagonal s₁ t a ⊆ mulAntidiagonal s₂ t a

{α : Type u_1}
[Add α]
{s₁ s₂ t : Set α}
{a : α}
(h : s₁ ⊆ s₂)

s₁.addAntidiagonal t a ⊆ s₂.addAntidiagonal t a


@[simp]
theorem smul_apply (r : R) (p : NonarchAddGroupSeminorm E) (x : E) : (r • p) x = r • p x

{R : Type u_2}
{E : Type u_4}
[AddGroup E]
[SMul R ℝ]
[SMul R ℝ≥0]
[IsScalarTower R ℝ≥0 ℝ]
(r : R)
(p : NonarchAddGroupSeminorm E)
(x : E)


/-- `find p` does not return `none` if and only if `p i` holds at some index `i`. -/
theorem isSome_find_iff :
    ∀ {n : ℕ} {p : Fin n → Prop} [DecidablePred p], (find p).isSome ↔ ∃ i, p i


theorem eval₂_rename : (rename k p).eval₂ f g = p.eval₂ f (g ∘ k)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
{S : Type u_5}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(k : σ → τ)
(g : τ → S)
(p : MvPolynomial σ R)

MvPolynomial.eval₂ f g ((MvPolynomial.rename k) p) = MvPolynomial.eval₂ f (g ∘ k) p


@[reassoc]
theorem pullback.condition {X Y Z : C} {f : X ⟶ Z} {g : Y ⟶ Z} [HasPullback f g] :
    pullback.fst f g ≫ f = pullback.snd f g ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Z}
{g : Y ⟶ Z}
[CategoryTheory.Limits.HasPullback f g]

CategoryTheory.Limits.pullback.fst f g ≫ f = CategoryTheory.Limits.pullback.snd f g ≫ g


theorem eval_image_pi_subset (hs : i ∈ s) : eval i '' s.pi t ⊆ t i

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
(hs : i ∈ s)


theorem setToL1SCLM_const [IsFiniteMeasure μ] {T : Set α → E →L[ℝ] F} {C : ℝ}
    (hT : DominatedFinMeasAdditive μ T C) (x : E) :
    setToL1SCLM α E μ hT (simpleFunc.indicatorConst 1 MeasurableSet.univ (measure_ne_top μ _) x) =
      T univ x

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) (MeasureTheory.Lp.simpleFunc.indicatorConst 1 ⋯ ⋯ x) = (T Set.univ) x


lemma P_succ (q : ℕ) : (P (q+1) : K[X] ⟶ K[X]) = P q ≫ (𝟙 _ + Hσ q)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}
(q : ℕ)

AlgebraicTopology.DoldKan.P (q + 1) = AlgebraicTopology.DoldKan.P q ≫ (𝟙 K[X] + AlgebraicTopology.DoldKan.Hσ q)


@[simp, norm_cast]
theorem coe_to_intFractPair {b : ℤ} {fr : K} :
    (↑(IntFractPair.mk b fr) : IntFractPair β) = IntFractPair.mk b (↑fr : β)

{K : Type u_1}
{β : Type u_2}
[Coe K β]
{b : ℤ}
{fr : K}

↑{ b := b, fr := fr } = { b := b, fr := Coe.coe fr }


lemma NNReal.le_add_nndist (a b : ℝ≥0) : a ≤ b + nndist a b


theorem ae_mem_imp_eq_mk {s} (h : AEMeasurable f (μ.restrict s)) :
    ∀ᵐ x ∂μ, x ∈ s → f x = h.mk f x

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

∀ᵐ (x : α) ∂μ, x ∈ s → f x = AEMeasurable.mk f h x


theorem coe_mapAddHom {X Y : C} : ⇑(F.mapAddHom : (X ⟶ Y) →+ _) = F.map

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


theorem tsum_geometric_of_abs_lt_one {r : ℝ} (h : |r| < 1) : ∑' n : ℕ, r ^ n = (1 - r)⁻¹


@[simp]
theorem symm_apply_apply (e : A₁ ≃ₐ[R] A₂) : ∀ x, e.symm (e x) = x

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)
(x : A₁)


@[to_additive]
theorem inv_mem_inv : a⁻¹ ∈ s⁻¹ ↔ a ∈ s

{α : Type u_2}
[InvolutiveNeg α]
{s : Set α}
{a : α}


theorem map_eq_zero_iff (f : RingInvo R) {x : R} : f x = 0 ↔ x = 0

{R : Type u_2}
[Semiring R]
(f : RingInvo R)
{x : R}


theorem ι_of_isLimit {f : J → C} {t : Bicone f} (ht : IsLimit t.toCone) (j : J) :
    t.ι j = ht.lift (Fan.mk _ fun j' => if h : j = j' then eqToHom (congr_arg f h) else 0)

(ht : CategoryTheory.Limits.IsLimit t.toCone)

t.ι j = ht.lift (CategoryTheory.Limits.Fan.mk (f j) fun j' => if h : j = j' then CategoryTheory.eqToHom ⋯ else 0)


@[to_additive]
nonrec theorem SmoothWithinAt.mul (hf : SmoothWithinAt I' I f s x)
    (hg : SmoothWithinAt I' I g s x) : SmoothWithinAt I' I (f * g) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[Add G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{s : Set M}
{x : M}
(hf : SmoothWithinAt I' I f s x)
(hg : SmoothWithinAt I' I g s x)


theorem insert_insert_of_ne {a a'} {b : β a} {b' : β a'} (s : AList β) (h : a ≠ a') :
    ((s.insert a b).insert a' b').entries ~ ((s.insert a' b').insert a b).entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a a' : α}
{b : β a}
{b' : β a'}
(s : AList β)
(h : a ≠ a')

(AList.insert a' b' (AList.insert a b s)).entries ~ (AList.insert a b (AList.insert a' b' s)).entries


@[simp]
theorem cancel_natIso_inv_right_assoc {W X X' : D} {Y : C} (f : W ⟶ X) (g : X ⟶ G.obj Y)
    (f' : W ⟶ X') (g' : X' ⟶ G.obj Y) :
    f ≫ g ≫ α.inv.app Y = f' ≫ g' ≫ α.inv.app Y ↔ f ≫ g = f' ≫ g'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : C ⥤ D}
(α : F ≅ G)
{W X X' : D}
{Y : C}
(f : W ⟶ X)
(g : X ⟶ G.obj Y)
(f' : W ⟶ X')
(g' : X' ⟶ G.obj Y)


theorem le_eLpNorm_of_bddBelow (hp : p ≠ 0) (hp' : p ≠ ∞) {f : α → F} (C : ℝ≥0) {s : Set α}
    (hs : MeasurableSet s) (hf : ∀ᵐ x ∂μ, x ∈ s → C ≤ ‖f x‖₊) :
    C • μ s ^ (1 / p.toReal) ≤ eLpNorm f p μ

(hf : ∀ᵐ (x : α) ∂μ, x ∈ s → C ≤ ‖f x‖₊)

C • μ s ^ (1 / p.toReal) ≤ MeasureTheory.eLpNorm f p μ


@[simp]
theorem verschiebungPoly_zero : verschiebungPoly 0 = 0


@[to_additive]
theorem SemiconjBy.function_semiconj_mul_right_swap (h : SemiconjBy a b c) :
    Function.Semiconj (· * a) (· * c) (· * b)

{G : Type u_3}
[Semigroup G]
{a b c : G}
(h : SemiconjBy a b c)

Function.Semiconj (fun x => x * a) (fun x => x * c) fun x => x * b


/-- Turn a colimit for `F : Jᵒᵖ ⥤ Cᵒᵖ` into a limit for `F.unop : J ⥤ C`. -/
@[simps]
def isLimitConeUnopOfCocone (F : Jᵒᵖ ⥤ Cᵒᵖ) {c : Cocone F} (hc : IsColimit c) :
    IsLimit (coneUnopOfCocone c)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.isLimitConeUnopOfCocone F hc).lift s = (hc.desc (CategoryTheory.Limits.coconeOfConeUnop s)).unop


@[reassoc (attr := simp)]
theorem prodIsoProd_hom_snd (X Y : TopCat.{u}) :
    (prodIsoProd X Y).hom ≫ prodSnd = Limits.prod.snd

(X.prodIsoProd Y).hom ≫ TopCat.prodSnd = CategoryTheory.Limits.prod.snd


/-- The constant function with value `x : ℂ` as a modular form of weight 0 and any level. -/
@[simps! (config := .asFn) toFun toSlashInvariantForm]
def const (x : ℂ) : ModularForm Γ 0

⇑(ModularForm.const x) = Function.const ℍ x


theorem mem_nhds_discrete {x : α} {s : Set α} :
    s ∈ 𝓝 x ↔ x ∈ s

{α : Type u_1}
[TopologicalSpace α]
[DiscreteTopology α]
{x : α}
{s : Set α}

s ∈ 𝓝 x ↔ x ∈ s


theorem toList_ne_nil {i j} (w : NeWord M i j) : w.toList ≠ List.nil

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


theorem iSup_approx_apply [TopologicalSpace β] [CompleteLattice β] [OrderClosedTopology β] [Zero β]
    [MeasurableSpace β] [OpensMeasurableSpace β] (i : ℕ → β) (f : α → β) (a : α) (hf : Measurable f)
    (h_zero : (0 : β) = ⊥) : ⨆ n, (approx i f n : α →ₛ β) a = ⨆ (k) (_ : i k ≤ f a), i k

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[TopologicalSpace β]
[CompleteLattice β]
[OrderClosedTopology β]
[Zero β]
[MeasurableSpace β]
[OpensMeasurableSpace β]
(i : ℕ → β)
(f : α → β)
(a : α)
(hf : Measurable f)
(h_zero : 0 = ⊥)

⨆ n, ↑(MeasureTheory.SimpleFunc.approx i f n) a = ⨆ k, ⨆ (_ : i k ≤ f a), i k


lemma zpow {f : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℤ) : MeromorphicAt (f ^ n) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{f : 𝕜 → 𝕜}
{x : 𝕜}
(hf : MeromorphicAt f x)
(n : ℤ)


theorem le_ciSup_iff' {s : ι → α} {a : α} (h : BddAbove (range s)) :
    a ≤ iSup s ↔ ∀ b, (∀ i, s i ≤ b) → a ≤ b

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrderBot α]
{s : ι → α}
{a : α}
(h : BddAbove (Set.range s))

a ≤ iSup s ↔ ∀ (b : α), (∀ (i : ι), s i ≤ b) → a ≤ b


/-- The identity functor on `C`, viewed as a functor from the monoidal opposite of `C` to `C`. -/
@[simps obj map] -- not necessary but the symmetry with `mopFunctor` looks nicer
def unmopFunctor : Cᴹᵒᵖ ⥤ C

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

(CategoryTheory.unmopFunctor C).obj self = self.unmop


protected theorem Set.OrdConnected.interior (h : s.OrdConnected) : (interior s).OrdConnected

{α : Type u_1}
[TopologicalSpace α]
[Preorder α]
[HasUpperLowerClosure α]
{s : Set α}
(h : s.OrdConnected)


theorem integral_sub {f g : α →ₛ E} (hf : Integrable f μ) (hg : Integrable g μ) :
    integral μ (f - g) = integral μ f - integral μ g

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
{f g : MeasureTheory.SimpleFunc α E}
(hf : MeasureTheory.Integrable (↑f) μ)
(hg : MeasureTheory.Integrable (↑g) μ)

MeasureTheory.SimpleFunc.integral μ (f - g) =
  MeasureTheory.SimpleFunc.integral μ f - MeasureTheory.SimpleFunc.integral μ g


theorem isOpenImmersion_eq_inf :
    @IsOpenImmersion = (topologically OpenEmbedding) ⊓
      stalkwise (fun f ↦ Function.Bijective f)

@AlgebraicGeometry.IsOpenImmersion =
  (AlgebraicGeometry.topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => OpenEmbedding) ⊓
    AlgebraicGeometry.stalkwise fun {R S} [CommRing R] [CommRing S] f => Function.Bijective ⇑f


theorem ext'_iff {f g : F} : f = g ↔ (f : ∀ a : α, β a) = (g : ∀ a : α, β a)

{F : Sort u_1}
{α : Sort u_2}
{β : α → Sort u_3}
[i : DFunLike F α β]
{f g : F}


/-- Peel off a single integral from a `lmarginal` integral at the end (compare with
`lmarginal_insert`, which peels off an integral at the beginning). -/
theorem lmarginal_insert' (f : (∀ i, π i) → ℝ≥0∞) (hf : Measurable f) {i : δ}
    (hi : i ∉ s) :
    ∫⋯∫⁻_insert i s, f ∂μ = ∫⋯∫⁻_s, (fun x ↦ ∫⁻ xᵢ, f (Function.update x i xᵢ) ∂μ i) ∂μ

{μ : (i : δ) → MeasureTheory.Measure (π i)}

[∀ (i : δ), MeasureTheory.SigmaFinite (μ i)]

∫⋯∫⁻_insert i s, f ∂μ = ∫⋯∫⁻_s, fun x => ∫⁻ (xᵢ : π i), f (Function.update x i xᵢ) ∂μ i ∂μ


lemma leRecOn_trans {C : ℕ → Sort*} {n m k} (hnm : n ≤ m) (hmk : m ≤ k) {next} (x : C n) :
    (leRecOn (Nat.le_trans hnm hmk) (@next) x : C k) =
      leRecOn hmk (@next) (leRecOn hnm (@next) x)

{C : ℕ → Sort u_1}
{n m k : ℕ}
(hnm : n ≤ m)
(hmk : m ≤ k)
{next : {k : ℕ} → C k → C (k + 1)}
(x : C n)

Nat.leRecOn ⋯ next x = Nat.leRecOn hmk next (Nat.leRecOn hnm next x)


/-- Base cases: `b = 0`, `b = 1`, `a = 0`, `a = 1`. -/
theorem jacobiSymNat.zero_right (a : ℕ) : jacobiSymNat a 0 = 1

Mathlib.Meta.NormNum.jacobiSymNat a 0 = 1


/-- A right homology data for a short complex `S` in the opposite category
induces a left homology data for `S.unop`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : S.RightHomologyData) : S.unop.LeftHomologyData


@[simp] lemma himp_eq_himp_iff : b ⇨ a = a ⇨ b ↔ a = b

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


@[simp]
theorem realize_constants {c : L.Constants} {v : α → M} : c.term.realize v = c

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{c : L.Constants}
{v : α → M}

FirstOrder.Language.Term.realize v c.term = ↑c


theorem Real.uniformContinuous_add : UniformContinuous fun p : ℝ × ℝ => p.1 + p.2


theorem diff_cons_right (l₁ l₂ : List α) (a : α) : l₁.diff (a :: l₂) = (l₁.diff l₂).erase a

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


theorem tendsto_fst : Tendsto Prod.fst (f ×ˢ g) f

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


protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
    (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

(hu : AEMeasurable u (MeasureTheory.Measure.map f μ))

ProbabilityTheory.IdentDistrib (u ∘ f) (u ∘ g) μ ν


theorem Ideal.minimal_primes_comap_of_surjective {f : R →+* S} (hf : Function.Surjective f)
    {I J : Ideal S} (h : J ∈ I.minimalPrimes) : J.comap f ∈ (I.comap f).minimalPrimes

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

Ideal.comap f J ∈ (Ideal.comap f I).minimalPrimes


@[reassoc (attr := simp)]
theorem section_comp_left (f g : A ⟶ B) [IsReflexivePair f g] : commonSection f g ≫ f = 𝟙 B

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A B : C}
(f g : A ⟶ B)
[CategoryTheory.IsReflexivePair f g]

CategoryTheory.CategoryStruct.comp (CategoryTheory.commonSection f g) f = CategoryTheory.CategoryStruct.id B


@[reassoc (attr := simp)]
lemma associator_inv_snd (X Y Z : C) :
    (α_ X Y Z).inv ≫ snd _ _ = snd _ _ ≫ snd _ _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.ChosenFiniteProducts C]
(X Y Z : C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.ChosenFiniteProducts.snd (CategoryTheory.MonoidalCategory.tensorObj X Y) Z) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.ChosenFiniteProducts.snd X (CategoryTheory.MonoidalCategory.tensorObj Y Z))
    (CategoryTheory.ChosenFiniteProducts.snd Y Z)


/-- Product of elements of an intermediate field indexed by a `Finset` is in the intermediate_field.
-/
protected theorem prod_mem {ι : Type*} {t : Finset ι} {f : ι → L} (h : ∀ c ∈ t, f c ∈ S) :
    (∏ i ∈ t, f i) ∈ S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{ι : Type u_4}
{t : Finset ι}
{f : ι → L}
(h : ∀ c ∈ t, f c ∈ S)


theorem Monic.irreducible_iff_natDegree' (hp : p.Monic) : Irreducible p ↔ p ≠ 1 ∧
    ∀ f g : R[X], f.Monic → g.Monic → f * g = p → g.natDegree ∉ Ioc 0 (p.natDegree / 2)

{R : Type u}
[CommSemiring R]
[NoZeroDivisors R]
{p : R[X]}
(hp : p.Monic)

Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → g.natDegree ∉ Finset.Ioc 0 (p.natDegree / 2)


@[to_additive (attr := simp)]
lemma mem_iff_toUnits_mem_units (H : Subgroup G) (x : G) : toUnits x ∈ H.units ↔ x ∈ H

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


lemma binaryRec_eq {C : Nat → Sort u} {z : C 0} {f : ∀ b n, C n → C (bit b n)}
    (h : f false 0 z = z) (b n) : binaryRec z f (bit b n) = f b n (binaryRec z f n)

{f : (b : Bool) → (n : ℕ) → C n → C (Nat.bit b n)}

Nat.binaryRec z f (Nat.bit b n) = f b n (Nat.binaryRec z f n)


@[simp]
theorem coe_symm_toEquiv (h : X ≃ₜ Y) : ⇑h.toEquiv.symm = h.symm

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


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

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Sup α]
[Sup β]
[Sup γ]
(f : SupHom β γ)
(g : SupHom α β)


lemma Nat.not_isWellOrderLimitElement (a : ℕ) [IsWellOrderLimitElement a] : False


/-- The derivative of the inverse of the chart at a base point is the inverse of the chart of the
tangent bundle, composed with the identification between the tangent bundle of the model space and
the product space. -/
theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
    (h : q.1 ∈ (chartAt H p.1).target) :
    tangentMap I I (chartAt H p.1).symm q =
      (chartAt (ModelProd H E) p).symm (TotalSpace.toProd H E q)

(h : q.proj ∈ (chartAt H p.proj).target)

tangentMap I I (↑(chartAt H p.proj).symm) q = ↑(chartAt (ModelProd H E) p).symm ((Bundle.TotalSpace.toProd H E) q)


@[simp]
lemma succ_predAbove_zero [NeZero n] {j : Fin (n + 1)} (h : j ≠ 0) : succ (predAbove 0 j) = j

{n : ℕ}
[NeZero n]
{j : Fin (n + 1)}
(h : j ≠ 0)


/-- Version of `WeaklyLocallyCompactSpace.isProperMap_iff_isCompact_preimage`
in terms of `cocompact`. -/
lemma WeaklyLocallyCompactSpace.isProperMap_iff_tendsto_cocompact [T2Space Y]
    [WeaklyLocallyCompactSpace Y] :
    IsProperMap f ↔ Continuous f ∧ Tendsto f (cocompact X) (cocompact Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
[T2Space Y]
[WeaklyLocallyCompactSpace Y]

IsProperMap f ↔ Continuous f ∧ Filter.Tendsto f (Filter.cocompact X) (Filter.cocompact Y)


theorem uniformEmbedding_iff' {f : α → β} :
    UniformEmbedding f ↔ Injective f ∧ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{f : α → β}

UniformEmbedding f ↔ Function.Injective f ∧ UniformContinuous f ∧ Filter.comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α


/-- The forgetful functor from `Scheme` to `TopCat`. -/
@[simps!]
def forgetToTop : Scheme ⥤ TopCat

AlgebraicGeometry.Scheme.forgetToTop.obj X = (AlgebraicGeometry.SheafedSpace.forget CommRingCat).obj X.toSheafedSpace


@[simp]
theorem cramer_subsingleton_apply [Subsingleton n] (A : Matrix n n α) (b : n → α) (i : n) :
    cramer A b i = b i

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
[Subsingleton n]
(A : Matrix n n α)
(b : n → α)
(i : n)


@[simp]
theorem ofList_get (l : List α) (n : ℕ) : (ofList l).get? n = l.get? n


theorem continuous_isUnit_unit {f : C(X, R)} (h : ∀ x, IsUnit (f x)) :
    Continuous fun x => (h x).unit

{X : Type u_1}
{R : Type u_3}
[TopologicalSpace X]
[NormedRing R]
[CompleteSpace R]
{f : C(X, R)}
(h : ∀ (x : X), IsUnit (f x))


/-- Auxiliary lemma for `MeasureTheory.IsStoppingTime.measurableSet_lt`. -/
theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i : ι)
    (h_lub : IsLUB (Set.Iio i) i) : MeasurableSet[f i] {ω | τ ω < i}

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


theorem map_injective {f : A →⋆ₐ[R] B} (hf : Function.Injective f) : Function.Injective (map f)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
{f : A →⋆ₐ[R] B}
(hf : Function.Injective ⇑f)


theorem BijOn.compl (hst : BijOn f s t) (hf : Bijective f) : BijOn f sᶜ tᶜ

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(hst : Set.BijOn f s t)
(hf : Function.Bijective f)


theorem MeasureTheory.AEStronglyMeasurable.snd {γ} [TopologicalSpace γ] [SFinite ν] {f : β → γ}
    (hf : AEStronglyMeasurable f ν) : AEStronglyMeasurable (fun z : α × β => f z.2) (μ.prod ν)

(hf : MeasureTheory.AEStronglyMeasurable f ν)

MeasureTheory.AEStronglyMeasurable (fun z => f z.2) (μ.prod ν)


lemma rightUnitor_inv_app {B C : Cat} (F : B ⟶ C) (X : B) : (ρ_ F).inv.app X = eqToHom (by simp)

{B C : CategoryTheory.Cat}
(F : B ⟶ C)
(X : ↑B)

(CategoryTheory.Bicategory.rightUnitor F).inv.app X = CategoryTheory.eqToHom ⋯


/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), the norm of a primitive root is
`1` if `n ≠ 2`. -/
theorem norm_eq_one [IsDomain L] [IsCyclotomicExtension {n} K L] (hn : n ≠ 2)
    (hirr : Irreducible (cyclotomic n K)) : norm K ζ = 1

(hirr : Irreducible (Polynomial.cyclotomic (↑n) K))


/-- If `M` has a nonzero determinant, then `M` as a bilinear form on `n → A` is nondegenerate.

See also `BilinForm.nondegenerateOfDetNeZero'` and `BilinForm.nondegenerateOfDetNeZero`.
-/
theorem nondegenerate_of_det_ne_zero [DecidableEq m] {M : Matrix m m A} (hM : M.det ≠ 0) :
    Nondegenerate M

{m : Type u_1}
{A : Type u_3}
[Fintype m]
[CommRing A]
[IsDomain A]
[DecidableEq m]
{M : Matrix m m A}
(hM : M.det ≠ 0)


@[simps zero]
instance instZero [Preadditive C] {P Q : Karoubi C} : Zero (P ⟶ Q)

{P Q : CategoryTheory.Idempotents.Karoubi C}


@[simp]
theorem map_id (s : Stream' α) : map id s = s


theorem index_of_argmax :
    ∀ {l : List α} {m : α}, m ∈ argmax f l → ∀ {a}, a ∈ l → f m ≤ f a → l.indexOf m ≤ l.indexOf a

{α : Type u_1}
{β : Type u_2}
[LinearOrder β]
{f : α → β}
[DecidableEq α]
{l : List α}
{m : α}

m ∈ List.argmax f l → ∀ {a : α}, a ∈ l → f m ≤ f a → List.indexOf m l ≤ List.indexOf a l


@[simp]
theorem ceil_sub_nat (a : α) (n : ℕ) : ⌈a - n⌉ = ⌈a⌉ - n

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


/--
`TopCat.toCondensedSet` yields a functor from `TopCat.{u+1}` to `CondensedSet.{u}`.
-/
@[simps]
noncomputable def topCatToCondensedSet : TopCat.{u+1} ⥤ CondensedSet.{u}

topCatToCondensedSet.obj X = X.toCondensedSet


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


@[simp]
theorem snoc_comp_cast_add {n m : ℕ} {α : Sort _} (f : Fin (n + m) → α) (a : α) :
    (snoc f a : Fin _ → α) ∘ castAdd (m + 1) = f ∘ castAdd m

{n m : ℕ}
{α : Type u_1}
(f : Fin (n + m) → α)
(a : α)

Fin.snoc f a ∘ Fin.castAdd (m + 1) = f ∘ Fin.castAdd m


@[simp]
lemma toNNReal_apply (f : C(X, ℝ)) (x : X) : f.toNNReal x = (f x).toNNReal

{X : Type u_1}
[TopologicalSpace X]
(f : C(X, ℝ))
(x : X)


protected theorem Balanced.del {path : Path α}
    (hp : path.Balanced c₀ n₀ c n) (ht : t.DelProp c' n) (hc : c = black → c' ≠ red) :
    ∃ n, (path.del t c').Balanced black n

(hp : Batteries.RBNode.Path.Balanced c₀ n₀ path c n)

(hc : c = Batteries.RBColor.black → c' ≠ Batteries.RBColor.red)

∃ n, (path.del t c').Balanced Batteries.RBColor.black n


theorem ContinuousOn.piecewise' {s t : Set α} {f g : α → β} [∀ a, Decidable (a ∈ t)]
    (hpf : ∀ a ∈ s ∩ frontier t, Tendsto f (𝓝[s ∩ t] a) (𝓝 (piecewise t f g a)))
    (hpg : ∀ a ∈ s ∩ frontier t, Tendsto g (𝓝[s ∩ tᶜ] a) (𝓝 (piecewise t f g a)))
    (hf : ContinuousOn f <| s ∩ t) (hg : ContinuousOn g <| s ∩ tᶜ) :
    ContinuousOn (piecewise t f g) s

(hpf : ∀ a ∈ s ∩ frontier t, Filter.Tendsto f (𝓝[s ∩ t] a) (𝓝 (t.piecewise f g a)))

(hpg : ∀ a ∈ s ∩ frontier t, Filter.Tendsto g (𝓝[s ∩ tᶜ] a) (𝓝 (t.piecewise f g a)))


@[nontriviality] -- Porting note: added `nontriviality`
theorem of_subsingleton [Subsingleton α] {K : ℝ≥0} : AntilipschitzWith K f

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
[Subsingleton α]
{K : ℝ≥0}


theorem lift_spec : functor r ⋙ lift r F H = F

(H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂)

(CategoryTheory.Quotient.functor r).comp (CategoryTheory.Quotient.lift r F H) = F


/-- If `X` is a zero object, `Y ≅ X ⊞ Y` for any `Y`. -/
@[simps]
def isoZeroBiprod {X Y : C} [HasBinaryBiproduct X Y] (hY : IsZero X) : Y ≅ X ⊞ Y

(CategoryTheory.Limits.isoZeroBiprod hY).hom = CategoryTheory.Limits.biprod.inr


@[simp] lemma isRegular_prod_X (s : Finset σ) :
    IsRegular (∏ n ∈ s, X n : MvPolynomial σ R)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : Finset σ)


@[simp] theorem bind_cons x xs (f : α → List β) :
  List.bind (x :: xs) f = f x ++ List.bind xs f

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


theorem hammingDist_lt_one {x y : ∀ i, β i} : hammingDist x y < 1 ↔ x = y

{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
{x y : (i : ι) → β i}


theorem mkRat_eq_zero (d0 : d ≠ 0) : mkRat n d = 0 ↔ n = 0


@[to_additive (attr := simp) AddMonoid.addOrderOf_eq_one_iff]
theorem orderOf_eq_one_iff : orderOf x = 1 ↔ x = 1


theorem getI_eq_iget_get? (n : ℕ) : l.getI n = (l.get? n).iget

{α : Type u}
(l : List α)
[Inhabited α]
(n : ℕ)


theorem mem_some_iff {α : Type*} {a b : α} : a ∈ some b ↔ b = a


theorem le_unbot_iff {a : α} {b : WithBot α} (h : b ≠ ⊥) :
    a ≤ unbot b h ↔ (a : WithBot α) ≤ b

{α : Type u_1}
[LE α]
{a : α}
{b : WithBot α}
(h : b ≠ ⊥)


theorem weightedDecomposition.decompose'_apply [DecidableEq M]
    (φ : MvPolynomial σ R) (m : M) :
    ((weightedDecomposition R w).decompose' φ m : MvPolynomial σ R) =
      weightedHomogeneousComponent w m φ

(R : Type u_1)
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
(w : σ → M)
[AddCommMonoid M]
[DecidableEq M]
(φ : MvPolynomial σ R)
(m : M)

↑((DirectSum.Decomposition.decompose' φ) m) = (MvPolynomial.weightedHomogeneousComponent w m) φ


@[simp]
lemma ΨSq_ofNat (n : ℕ) : W.ΨSq n = W.preΨ' n ^ 2 * if Even n then W.Ψ₂Sq else 1

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℕ)

W.ΨSq ↑n = W.preΨ' n ^ 2 * if Even n then W.Ψ₂Sq else 1


theorem cons_injective_right (x : α) : Function.Injective (cons x)


@[to_additive (attr := simp)]
theorem dist_mul_self_left (a b : E) : dist (a * b) b = ‖a‖

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


/-- Subtracting `p` from its `orthogonalProjection` produces a result
in the orthogonal direction. -/
theorem orthogonalProjection_vsub_mem_direction_orthogonal (s : AffineSubspace ℝ P) [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : P) :
    (orthogonalProjection s p : P) -ᵥ p ∈ s.directionᗮ

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

↑((EuclideanGeometry.orthogonalProjection s) p) -ᵥ p ∈ s.directionᗮ


theorem prod_dist_eq_sup (f g : WithLp ∞ (α × β)) :
    dist f g = dist f.fst g.fst ⊔ dist f.snd g.snd

{α : Type u_2}
{β : Type u_3}
[Dist α]
[Dist β]
(f g : WithLp ⊤ (α × β))


theorem mul_add_right_right_iff {x y z : R} : IsCoprime x (z * x + y) ↔ IsCoprime x y


protected theorem continuous : Continuous f

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


theorem Integrable.comp_measurable {f : α → δ} {g : δ → β} (hg : Integrable g (Measure.map f μ))
    (hf : Measurable f) : Integrable (g ∘ f) μ

(hg : MeasureTheory.Integrable g (MeasureTheory.Measure.map f μ))


theorem LinearMap.slope_comp {F : Type*} [AddCommGroup F] [Module k F] (f : E →ₗ[k] F) (g : k → E)
    (a b : k) : slope (f ∘ g) a b = f (slope g a b)

{k : Type u_1}
{E : Type u_2}
[Field k]
[AddCommGroup E]
[Module k E]
{F : Type u_4}
[AddCommGroup F]
[Module k F]
(f : E →ₗ[k] F)
(g : k → E)
(a b : k)


@[reassoc (attr := simp)]
theorem homotopyEquiv_inv_π {X : C} (P Q : ProjectiveResolution X) :
    (homotopyEquiv P Q).inv ≫ P.π = Q.π

(P Q : CategoryTheory.ProjectiveResolution X)

CategoryTheory.CategoryStruct.comp (P.homotopyEquiv Q).inv P.π = Q.π


@[simp]
theorem ComonadHom.id_toNatTrans (T : Comonad C) : (𝟙 T : T ⟶ T).toNatTrans = 𝟙 (T : C ⥤ C)

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

(CategoryTheory.CategoryStruct.id T).toNatTrans = CategoryTheory.CategoryStruct.id T.toFunctor


@[simp]
theorem disjoint_sup_left : Disjoint (a ⊔ b) c ↔ Disjoint a c ∧ Disjoint b c

{α : Type u_1}
[DistribLattice α]
[OrderBot α]
{a b c : α}


@[simp]
theorem le_inf'_iff {a : α} : a ≤ s.inf' H f ↔ ∀ b ∈ s, a ≤ f b

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
{s : Finset β}
(H : s.Nonempty)
(f : β → α)
{a : α}


theorem NeBot.div_zero_nonneg (hf : f.NeBot) : 0 ≤ f / 0

{α : Type u_2}
[GroupWithZero α]
{f : Filter α}
(hf : f.NeBot)


@[simp]
theorem projectSubobject_mk [HasLimits C] [PreservesLimits T] {A P : StructuredArrow S T}
    (f : P ⟶ A) [Mono f] : projectSubobject (Subobject.mk f) = Subobject.mk f.right

{A P : CategoryTheory.StructuredArrow S T}

CategoryTheory.StructuredArrow.projectSubobject (CategoryTheory.Subobject.mk f) = CategoryTheory.Subobject.mk f.right


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


theorem eq (h : LeftInvOn f' f s) {x} (hx : x ∈ s) : f' (f x) = x

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{f' : β → α}
(h : Set.LeftInvOn f' f s)
{x : α}
(hx : x ∈ s)


@[trans]
theorem lf_of_lf_of_le {x y z : PGame} (h₁ : x ⧏ y) (h₂ : y ≤ z) : x ⧏ z

{x y z : SetTheory.PGame}
(h₁ : x.LF y)
(h₂ : y ≤ z)


theorem Complex.isometryOfOrthonormal_apply (v : OrthonormalBasis (Fin 2) ℝ F) (z : ℂ) :
    Complex.isometryOfOrthonormal v z = z.re • v 0 + z.im • v 1

{F : Type u_6}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(v : OrthonormalBasis (Fin 2) ℝ F)
(z : ℂ)

(Complex.isometryOfOrthonormal v) z = z.re • v 0 + z.im • v 1


theorem mul_eq_zero_of_ne_zero_imp_eq_zero {a b : M₀} (h : a ≠ 0 → b = 0) : a * b = 0

{M₀ : Type u_2}
[MulZeroClass M₀]
{a b : M₀}
(h : a ≠ 0 → b = 0)


theorem exists_or_forall_not (P : α → Prop) : (∃ a, P a) ∨ ∀ a, ¬ P a


@[to_additive]
theorem map_le_map_iff_of_injective {S T : Subsemigroup M} : S.map f ≤ T.map f ↔ S ≤ T

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}
(hf : Function.Injective ⇑f)
{S T : AddSubsemigroup M}

AddSubsemigroup.map f S ≤ AddSubsemigroup.map f T ↔ S ≤ T


/-- Reinterpret `G ≃* H` as `Additive G ≃+ Additive H`. -/
@[simps]
def MulEquiv.toAdditive [MulOneClass G] [MulOneClass H] :
    G ≃* H ≃ (Additive G ≃+ Additive H)

{G : Type u_1}
{H : Type u_2}
[MulOneClass G]
[MulOneClass H]
(f : G ≃* H)
(a : Additive G)

(MulEquiv.toAdditive f) a = (MonoidHom.toAdditive f.toMonoidHom) a


theorem isCoatom_iff_ge_of_le : IsCoatom a ↔ a ≠ ⊤ ∧ ∀ b ≠ ⊤, a ≤ b → b ≤ a

{α : Type u_2}
[Preorder α]
[OrderTop α]
{a : α}

IsCoatom a ↔ a ≠ ⊤ ∧ ∀ (b : α), b ≠ ⊤ → a ≤ b → b ≤ a


/-- A real function into a finite dimensional real vector space with bounded variation
is differentiable almost everywhere. -/
theorem ae_differentiableAt {f : ℝ → V} (h : LocallyBoundedVariationOn f univ) :
    ∀ᵐ x, DifferentiableAt ℝ f x

(h : LocallyBoundedVariationOn f Set.univ)


@[to_additive]
lemma mul_prod_Iio_eq_prod_Iic (a : α) : f a * ∏ x ∈ Iio a, f x = ∏ x ∈ Iic a, f x

{α : Type u_1}
{M : Type u_2}
[PartialOrder α]
[CommMonoid M]
{f : α → M}
[LocallyFiniteOrderBot α]
(a : α)

f a * ∏ x ∈ Finset.Iio a, f x = ∏ x ∈ Finset.Iic a, f x


/-- A version of `Homeomorph.mulLeft a b⁻¹` that is defeq to `a / b`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }))
  " A version of `Homeomorph.addLeft a (-b)` that is defeq to `a - b`. "]
def Homeomorph.divLeft (x : G) : G ≃ₜ G

{G : Type w}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
(x b : G)


/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with an
explicit continuity assumption on addition, for application to `EReal`. The unprimed version of
the lemma uses `[ContinuousAdd]`. -/
theorem UpperSemicontinuousWithinAt.add' {f g : α → γ} (hf : UpperSemicontinuousWithinAt f s x)
    (hg : UpperSemicontinuousWithinAt g s x)
    (hcont : ContinuousAt (fun p : γ × γ => p.1 + p.2) (f x, g x)) :
    UpperSemicontinuousWithinAt (fun z => f z + g z) s x

(hcont : ContinuousAt (fun p => p.1 + p.2) (f x, g x))


@[simp]
theorem preimage_coe_Ioi_bot : (some : α → WithBot α) ⁻¹' Ioi ⊥ = univ


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

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

(CompactlyGenerated.isoOfHomeo f).inv = { toFun := ⇑f.symm, continuous_toFun := ⋯ }


lemma toPartialHomeomorph_right_inv {x : Y} (hx : x ∈ Set.range f) :
    f ((h.toPartialHomeomorph f).symm x) = x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : X → Y)
(h : OpenEmbedding f)
[Nonempty X]
{x : Y}
(hx : x ∈ Set.range f)

f (↑(OpenEmbedding.toPartialHomeomorph f h).symm x) = x


theorem dim_pos [Nontrivial S] (pb : PowerBasis R S) : 0 < pb.dim

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
[Nontrivial S]
(pb : PowerBasis R S)


theorem prod_const [CommMonoid α] (n : ℕ) (x : α) : ∏ _i : Fin n, x = x ^ n

{α : Type u_1}
[CommMonoid α]
(n : ℕ)
(x : α)


@[to_additive]
theorem map_comap_eq (f : M →ₙ* N) (S : Subsemigroup N) : (S.comap f).map f = S ⊓ f.srange

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M →ₙ* N)
(S : Subsemigroup N)

Subsemigroup.map f (Subsemigroup.comap f S) = S ⊓ f.srange


theorem of_toList : ∀ {l : Lists α}, IsList l → ofList (toList l) = l


theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt 𝕜 f x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(hf : HasFPowerSeriesOnBall f p x r)


/-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
{c₁ c₂ : R}
(q : QuaternionAlgebra.Basis A c₁ c₂)
(F : A →ₐ[R] B)


@[simp, norm_cast]
theorem coe_map {f : α → β} (hf : Continuous f) (hf' : IsOpenMap f) (s : PositiveCompacts α) :
    (s.map f hf hf' : Set β) = f '' s

(s : TopologicalSpace.PositiveCompacts α)

↑(TopologicalSpace.PositiveCompacts.map f hf hf' s) = f '' ↑s


@[to_additive (attr := nontriviality) norm_of_subsingleton]
theorem norm_of_subsingleton' [Subsingleton E] (a : E) : ‖a‖ = 0

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


lemma IsMeasurableRatCDF.monotone_stieltjesFunctionAux (a : α) :
    Monotone (IsMeasurableRatCDF.stieltjesFunctionAux f a)

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

Monotone (ProbabilityTheory.IsMeasurableRatCDF.stieltjesFunctionAux f a)


@[symm]
nonrec theorem CondIndepFun.symm {_ : MeasurableSpace β} {f g : Ω → β}
    (hfg : CondIndepFun m' hm' f g μ) :
    CondIndepFun m' hm' g f μ

{Ω : Type u_1}
{β : Type u_3}
{m' mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
{hm' : m' ≤ mΩ}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]

∀ {x : MeasurableSpace β} {f g : Ω → β},
  ProbabilityTheory.CondIndepFun m' hm' f g μ → ProbabilityTheory.CondIndepFun m' hm' g f μ


lemma char_is_prime_or_zero (p : ℕ) [hc : CharP R p] : Nat.Prime p ∨ p = 0

(R : Type u_1)
[NonAssocSemiring R]
[NoZeroDivisors R]
[Nontrivial R]
(p : ℕ)
[hc : CharP R p]


/-- Let `P` be the minimal polynomial of a root of unity `μ` and `Q` be the minimal polynomial of
`μ ^ p`, where `p` is a prime that does not divide `n`. Then `P` divides `Q ^ p` modulo `p`. -/
theorem minpoly_dvd_pow_mod {p : ℕ} [hprime : Fact p.Prime] (hdiv : ¬p ∣ n) :
    map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
      map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) ^ p

{n : ℕ}
{K : Type u_1}
[CommRing K]
{μ : K}
(h : IsPrimitiveRoot μ n)
[IsDomain K]
[CharZero K]
{p : ℕ}
[hprime : Fact (Nat.Prime p)]
(hdiv : ¬p ∣ n)

Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ μ) ∣
  Polynomial.map (Int.castRingHom (ZMod p)) (minpoly ℤ (μ ^ p)) ^ p


/-- The span of a separable subset with respect to a separable scalar ring is again separable. -/
lemma TopologicalSpace.IsSeparable.span {R M : Type*} [AddCommMonoid M] [Semiring R] [Module R M]
    [TopologicalSpace M] [TopologicalSpace R] [SeparableSpace R]
    [ContinuousAdd M] [ContinuousSMul R M] {s : Set M} (hs : IsSeparable s) :
    IsSeparable (Submodule.span R s : Set M)

{R : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
[Semiring R]
[Module R M]
[TopologicalSpace M]
[TopologicalSpace R]
[TopologicalSpace.SeparableSpace R]
[ContinuousAdd M]
[ContinuousSMul R M]
{s : Set M}
(hs : TopologicalSpace.IsSeparable s)

TopologicalSpace.IsSeparable ↑(Submodule.span R s)


theorem dvd_cancel_left_coe_nonZeroDivisors {x y : R'} {c : R'⁰} : c * x ∣ c * y ↔ x ∣ y

{R' : Type u_6}
[CommRing R']
{x y : R'}
{c : ↥R'⁰}


theorem integral_one_div_of_neg (ha : a < 0) (hb : b < 0) :
    ∫ x : ℝ in a..b, 1 / x = log (b / a)

∫ (x : ℝ) in a..b, 1 / x = Real.log (b / a)


lemma smul_lt_smul_of_lt_of_le [PosSMulMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂)
    (hb : b₁ ≤ b₂) (h₁ : 0 ≤ a₁) (h₂ : 0 < b₂) : a₁ • b₁ < a₂ • b₂

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

a₁ • b₁ < a₂ • b₂


/-- Chord-length is always greater than a multiple of arc-length. -/
lemma mul_angle_le_norm_sub (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) : 2 / π * angle x y ≤ ‖x - y‖

2 / π * InnerProductGeometry.angle x y ≤ ‖x - y‖


protected nonrec theorem StrictConvex.eq (hs : StrictConvex 𝕜 s) (hx : x ∈ s) (hy : y ∈ s)
    (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (h : a • x + b • y ∉ interior s) : x = y

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}
{x y : E}
{a b : 𝕜}
(hs : StrictConvex 𝕜 s)
(hx : x ∈ s)
(hy : y ∈ s)
(ha : 0 < a)
(hb : 0 < b)
(hab : a + b = 1)
(h : a • x + b • y ∉ interior s)


theorem abs_le_max_abs_abs (hab : a ≤ b) (hbc : b ≤ c) : |b| ≤ max |a| |c|

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b c : α}
(hab : a ≤ b)
(hbc : b ≤ c)


@[to_additive (attr := simp)]
lemma aestabilizer_univ : aestabilizer G μ univ = ⊤

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.VAddInvariantMeasure G α μ],
  AddAction.aestabilizer G μ Set.univ = ⊤


theorem norm_integral_min_max (f : ℝ → E) :
    ‖∫ x in min a b..max a b, f x ∂μ‖ = ‖∫ x in a..b, f x ∂μ‖

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(f : ℝ → E)

‖∫ (x : ℝ) in min a b..max a b, f x ∂μ‖ = ‖∫ (x : ℝ) in a..b, f x ∂μ‖


theorem isCompact_iff_ultrafilter_le_nhds :
    IsCompact s ↔ ∀ f : Ultrafilter X, ↑f ≤ 𝓟 s → ∃ x ∈ s, ↑f ≤ 𝓝 x

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

IsCompact s ↔ ∀ (f : Ultrafilter X), ↑f ≤ 𝓟 s → ∃ x ∈ s, ↑f ≤ 𝓝 x


/-- **The Radon-Nikodym theorem**: Given two measures `μ` and `ν`, if
`HaveLebesgueDecomposition μ ν`, then `μ` is absolutely continuous to `ν` if and only if
`ν.withDensity (rnDeriv μ ν) = μ`. -/
theorem absolutelyContinuous_iff_withDensity_rnDeriv_eq
    [HaveLebesgueDecomposition μ ν] : μ ≪ ν ↔ ν.withDensity (rnDeriv μ ν) = μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[μ.HaveLebesgueDecomposition ν]


/-- Since `Real.smoothTransition` is constant on $(-∞, 0]$ and $[1, ∞)$, applying it to the
projection of `x : ℝ` to $[0, 1]$ gives the same result as applying it to `x`. -/
@[simp]
protected theorem projIcc :
    smoothTransition (projIcc (0 : ℝ) 1 zero_le_one x) = smoothTransition x

(↑(Set.projIcc 0 1 ⋯ x)).smoothTransition = x.smoothTransition


protected theorem iterate {f : α → α} (hf : QuasiMeasurePreserving f μa μa) :
    ∀ n, QuasiMeasurePreserving f^[n] μa μa

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μa μa)

MeasureTheory.Measure.QuasiMeasurePreserving f^[n] μa μa


theorem cardinal_mk_le_mul : #{ x : A // IsAlgebraic R x } ≤ #R[X] * ℵ₀

(R A : Type u)
[CommRing R]
[CommRing A]
[IsDomain A]
[Algebra R A]
[NoZeroSMulDivisors R A]


theorem _root_.IsClosed.measurableSet_image_of_continuousOn_injOn
    [TopologicalSpace γ] [PolishSpace γ] {β : Type*} [TopologicalSpace β] [T2Space β]
    [MeasurableSpace β] [OpensMeasurableSpace β] {s : Set γ} (hs : IsClosed s) {f : γ → β}
    (f_cont : ContinuousOn f s) (f_inj : InjOn f s) : MeasurableSet (f '' s)

{γ : Type u_3}
[TopologicalSpace γ]
[PolishSpace γ]
{β : Type u_4}
[TopologicalSpace β]
[T2Space β]
[MeasurableSpace β]
[OpensMeasurableSpace β]
{s : Set γ}
(hs : IsClosed s)
{f : γ → β}
(f_cont : ContinuousOn f s)
(f_inj : Set.InjOn f s)


/-- Maps a term's symbols along a language equivalence. -/
@[simps]
def Lequiv.onTerm (φ : L ≃ᴸ L') : L.Term α ≃ L'.Term α

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{α : Type u'}
(φ : L ≃ᴸ L')

∀ (a : L.Term α), (FirstOrder.Language.Lequiv.onTerm φ) a = φ.toLHom.onTerm a


theorem norm_iteratedFDerivWithin_clm_apply {f : E → F →L[𝕜] G} {g : E → F} {s : Set E} {x : E}
    {N : ℕ∞} {n : ℕ} (hf : ContDiffOn 𝕜 N f s) (hg : ContDiffOn 𝕜 N g s) (hs : UniqueDiffOn 𝕜 s)
    (hx : x ∈ s) (hn : ↑n ≤ N) : ‖iteratedFDerivWithin 𝕜 n (fun y => (f y) (g y)) s x‖ ≤
      ∑ i ∈ Finset.range (n + 1), ↑(n.choose i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *
        ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F →L[𝕜] G}
{g : E → F}
{s : Set E}
{x : E}
{N : ℕ∞}
{n : ℕ}
(hf : ContDiffOn 𝕜 N f s)
(hg : ContDiffOn 𝕜 N g s)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)
(hn : ↑n ≤ N)


protected theorem mem_closure {s : Set (Filter α)} {l : Filter α} :
    l ∈ closure s ↔ ∀ t ∈ l, ∃ l' ∈ s, t ∈ l'

{α : Type u_2}
{s : Set (Filter α)}
{l : Filter α}


theorem nhds_eq_comap (h : X ≃ₜ Y) (x : X) : 𝓝 x = comap h (𝓝 (h x))

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


lemma isInt_ediv_zero : ∀ {a b r : ℤ}, IsInt a r → IsNat b (nat_lit 0) → IsNat (a / b) (nat_lit 0)

Mathlib.Meta.NormNum.IsInt a r → Mathlib.Meta.NormNum.IsNat b 0 → Mathlib.Meta.NormNum.IsNat (a / b) 0


@[simp]
theorem lift_coe {α β : Type*} (x : List α) (f : List α → β)
    (h : ∀ a b : List α, a ≈ b → f a = f b) : Quotient.lift f h (x : Multiset α) = f x

(h : ∀ (a b : List α), a ≈ b → f a = f b)


lemma num_ne_zero {q : ℚ} : q.num ≠ 0 ↔ q ≠ 0


@[simp]
theorem upperBounds_singleton : upperBounds {a} = Ici a


theorem hasPullbacksOfInclusions
    (hP' : ∀ ⦃X Y B : CompHausLike.{u} P⦄ (f : X ⟶ B) (g : Y ⟶ B)
      (_ : OpenEmbedding f), HasExplicitPullback f g) :
    HasExplicitPullbacksOfInclusions P

(hP' : ∀ ⦃X Y B : CompHausLike P⦄ (f : X ⟶ B) (g : Y ⟶ B), OpenEmbedding ⇑f → CompHausLike.HasExplicitPullback f g)


theorem Associated.of_mul_left [CancelCommMonoidWithZero α] {a b c d : α} (h : a * b ~ᵤ c * d)
    (h₁ : a ~ᵤ c) (ha : a ≠ 0) : b ~ᵤ d

{α : Type u_1}
[CancelCommMonoidWithZero α]
{a b c d : α}
(h : a * b ~ᵤ c * d)
(h₁ : a ~ᵤ c)
(ha : a ≠ 0)


@[simp]
theorem iUnionLift_mk {i : ι} (x : S i) (hx : (x : α) ∈ T) :
    iUnionLift S f hf T hT ⟨x, hx⟩ = f i x

{hf : ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j), f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩}

Set.iUnionLift S f hf T hT ⟨↑x, hx⟩ = f i x


@[to_additive (attr := simp)]
theorem srange_snd [Nonempty M] : (snd M N).srange = ⊤

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
[Nonempty M]


@[simp]
lemma whiskerRightIso_symm {X Y : C} (f : X ≅ Y) (W : C) :
    (whiskerRightIso f W).symm = whiskerRightIso f.symm W

{C : Type u}
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{X Y : C}
(f : X ≅ Y)
(W : C)

(CategoryTheory.MonoidalCategory.whiskerRightIso f W).symm = CategoryTheory.MonoidalCategory.whiskerRightIso f.symm W


/-- `normalClosure` as a `ClosureOperator`. -/
@[simps]
noncomputable def closureOperator : ClosureOperator (IntermediateField F L)

(F : Type u_1)
(L : Type u_3)
[Field F]
[Field L]
[Algebra F L]
[Normal F L]
(x : IntermediateField F L)

(IntermediateField.closureOperator F L).IsClosed x = (normalClosure F (↥x) L = x)


/-- The identity morphism of a differential object. -/
@[simps]
def id (X : DifferentialObject S C) : Hom X X

(X : CategoryTheory.DifferentialObject S C)

(CategoryTheory.DifferentialObject.Hom.id X).f = CategoryTheory.CategoryStruct.id X.obj


@[simp]
theorem natDegree_of_b_ne_zero (ha : P.a = 0) (hb : P.b ≠ 0) : P.toPoly.natDegree = 2

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b ≠ 0)


@[simp]
theorem sInf_toAddSubgroup (s : Set (NonUnitalSubring R)) :
    (sInf s).toAddSubgroup = ⨅ t ∈ s, NonUnitalSubring.toAddSubgroup t

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

(sInf s).toAddSubgroup = ⨅ t ∈ s, t.toAddSubgroup


@[to_additive (attr := simp)]
theorem mk_pow (a : G) (n : ℕ) : ((a ^ n : G) : Q) = (a : Q) ^ n

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


theorem invariants_eq_inter : (invariants ρ).carrier = ⋂ g : G, Function.fixedPoints (ρ g)

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
[CommSemiring k]
[Group G]
[AddCommMonoid V]
[Module k V]
(ρ : Representation k G V)

ρ.invariants.carrier = ⋂ g, Function.fixedPoints ⇑(ρ g)


/-- `g ∘ f` is `C^∞` within `s` at `x` if `g` is `C^∞` at `f x` and
`f` is `C^∞` within `s` at `x`. -/
theorem SmoothAt.comp_smoothWithinAt {g : M' → M''} (x : M) (hg : SmoothAt I' I'' g (f x))
    (hf : SmoothWithinAt I I' f s x) : SmoothWithinAt I I'' (g ∘ f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{s : Set M}
{g : M' → M''}
(x : M)
(hg : SmoothAt I' I'' g (f x))
(hf : SmoothWithinAt I I' f s x)


theorem mem_ofRowLens {w : List ℕ} {hw : w.Sorted (· ≥ ·)} {c : ℕ × ℕ} :
    c ∈ ofRowLens w hw ↔ ∃ h : c.fst < w.length, c.snd < w.get ⟨c.fst, h⟩

{hw : List.Sorted (fun x x_1 => x ≥ x_1) w}

c ∈ YoungDiagram.ofRowLens w hw ↔ ∃ (h : c.1 < w.length), c.2 < w.get ⟨c.1, h⟩


/-- **Tietze extension theorem** for real-valued continuous maps, a version for a closed set. Let
`s` be a closed set in a normal topological space `Y`. Let `f` be a continuous real-valued function
on `s`. Let `t` be a nonempty convex set of real numbers (we use `OrdConnected` instead of `Convex`
to automatically deduce this argument by typeclass search) such that `f x ∈ t` for all `x : s`. Then
there exists a continuous real-valued function `g : C(Y, ℝ)` such that `g y ∈ t` for all `y` and
`g.restrict s = f`. -/
theorem exists_restrict_eq_forall_mem_of_closed {s : Set Y} (f : C(s, ℝ)) {t : Set ℝ}
    [OrdConnected t] (ht : ∀ x, f x ∈ t) (hne : t.Nonempty) (hs : IsClosed s) :
    ∃ g : C(Y, ℝ), (∀ y, g y ∈ t) ∧ g.restrict s = f

{Y : Type u_2}
[TopologicalSpace Y]
[NormalSpace Y]
{s : Set Y}
(f : C(↑s, ℝ))
{t : Set ℝ}
[t.OrdConnected]
(ht : ∀ (x : ↑s), f x ∈ t)
(hne : t.Nonempty)
(hs : IsClosed s)

∃ g, (∀ (y : Y), g y ∈ t) ∧ ContinuousMap.restrict s g = f


@[simp]
theorem forget_map {U V : Over X} {f : U ⟶ V} : (forget X).map f = f.left

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
{U V : CategoryTheory.Over X}
{f : U ⟶ V}

(CategoryTheory.Over.forget X).map f = f.left


theorem copy_eq (S : StarSubsemiring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S

{R : Type v}
[NonAssocSemiring R]
[StarRing R]
(S : StarSubsemiring R)
(s : Set R)
(hs : s = ↑S)


/-- `Equiv.mulLeft` as an `OrderIso`. See also `OrderEmbedding.mulLeft`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }) toEquiv apply)
  "`Equiv.addLeft` as an `OrderIso`. See also `OrderEmbedding.addLeft`."]
def OrderIso.mulLeft (a : α) : α ≃o α

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

(OrderIso.addLeft a).toEquiv = Equiv.addLeft a


@[simp, norm_cast]
theorem coe_inj {f g : M₁ →SL[σ₁₂] M₂} : (f : M₁ →ₛₗ[σ₁₂] M₂) = g ↔ f = g

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{f g : M₁ →SL[σ₁₂] M₂}


/-- The isomorphism `eB.functor ⋙ e'.inverse ⋙ e'.functor ≅ eB.functor` deduced
from the isomorphisms `hF : eA.functor ⋙ e'.functor ≅ F`,
`hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor` and the datum of
an isomorphism `η : G ⋙ F ≅ eB.functor`. -/
@[simps! hom_app]
def τ₁ (η : G ⋙ F ≅ eB.functor) : eB.functor ⋙ e'.inverse ⋙ e'.functor ≅ eB.functor

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

(AlgebraicTopology.DoldKan.Compatibility.τ₁ hF hG η).hom.app X =
  e'.functor.map (hG.hom.app X) ≫ hF.hom.app (G.obj X) ≫ η.hom.app X


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

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

CategoryTheory.CategoryStruct.comp (self.t' i j k hij hik hjk)
    (CategoryTheory.CategoryStruct.comp (self.t' j k i hjk ⋯ ⋯) (self.t' k i j ⋯ ⋯ hij)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.Limits.pullback (self.f i j hij) (self.f i k hik))


@[to_additive]
theorem pow_eq_pow_iff_modEq : x ^ n = x ^ m ↔ n ≡ m [MOD orderOf x]

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

n • x = m • x ↔ n ≡ m [MOD addOrderOf x]


@[simp]
theorem eval₂Hom_eq_bind₂ (f : R →+* MvPolynomial σ S) : eval₂Hom f X = bind₂ f

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* MvPolynomial σ S)

MvPolynomial.eval₂Hom f MvPolynomial.X = MvPolynomial.bind₂ f


theorem mapsTo_coreflection_coroot :
    MapsTo (P.coreflection i) (range P.coroot) (range P.coroot)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i : ι)

Set.MapsTo (⇑(P.coreflection i)) (Set.range ⇑P.coroot) (Set.range ⇑P.coroot)


theorem eq_or_coprime_of_le_prime {n p} (n_pos : 0 < n) (hle : n ≤ p) (pp : Prime p) :
    p = n ∨ Coprime p n

{n p : ℕ}
(n_pos : 0 < n)
(hle : n ≤ p)
(pp : Nat.Prime p)


/-- The powerset of a singleton contains only `∅` and the singleton itself. -/
theorem powerset_singleton (x : α) : 𝒫({x} : Set α) = {∅, {x}}


@[to_additive]
theorem CancelMonoid.toLeftCancelMonoid_injective {M : Type u} :
    Function.Injective (@CancelMonoid.toLeftCancelMonoid M)


theorem extend_def (f : α → β) (g : α → γ) (e' : β → γ) (b : β) [Decidable (∃ a, f a = b)] :
    extend f g e' b = if h : ∃ a, f a = b then g (Classical.choose h) else e' b

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
(f : α → β)
(g : α → γ)
(e' : β → γ)
(b : β)
[Decidable (∃ a, f a = b)]

Function.extend f g e' b = if h : ∃ a, f a = b then g (Classical.choose h) else e' b


/-- A structure encapsulating the fact that a set of sets is closed under finite intersection. -/
structure FiniteInter : Prop where
  /-- `univ_mem` states that `Set.univ` is in `S`. -/
  univ_mem : Set.univ ∈ S
  /-- `inter_mem` states that any two intersections of sets in `S` is also in `S`. -/
  inter_mem : ∀ ⦃s⦄, s ∈ S → ∀ ⦃t⦄, t ∈ S → s ∩ t ∈ S

{α : Type u_1}
{S : Set (Set α)}
(self : FiniteInter S)
⦃s : Set α⦄

s ∈ S → ∀ ⦃t : Set α⦄, t ∈ S → s ∩ t ∈ S


protected lemma nonneg_antisymm : 0 ≤ q → 0 ≤ -q → q = 0


@[simp]
theorem mem_erase {a b : α} {s : Finset α} : a ∈ erase s b ↔ a ≠ b ∧ a ∈ s

{α : Type u_1}
[DecidableEq α]
{a b : α}
{s : Finset α}


theorem upperCrossingTime_lt_of_le_upcrossingsBefore (hN : 0 < N) (hab : a < b)
    (hn : n ≤ upcrossingsBefore a b f N ω) : upperCrossingTime a b f N n ω < N

{f : ℕ → Ω → ℝ}

(hn : n ≤ MeasureTheory.upcrossingsBefore a b f N ω)

MeasureTheory.upperCrossingTime a b f N n ω < N


theorem IsAntichain.top_mem_iff [OrderTop α] (hs : IsAntichain (· ≤ ·) s) : ⊤ ∈ s ↔ s = {⊤}

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


theorem finite_univ [Finite α] : (@univ α).Finite


protected theorem sub_sub (n m k : Nat) : n - m - k = n - (m + k)


@[simp]
lemma inv_cobounded₀ : (cobounded α)⁻¹ = 𝓝[≠] 0


@[simp]
theorem convexHull_empty_iff : convexHull 𝕜 s = ∅ ↔ s = ∅

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


/-- An injective linear map with finite-dimensional domain is a closed embedding. -/
theorem LinearMap.closedEmbedding_of_injective [FiniteDimensional 𝕜 E] {f : E →ₗ[𝕜] F}
    (hf : LinearMap.ker f = ⊥) : ClosedEmbedding f

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[T2Space E]
[TopologicalAddGroup E]
[Module 𝕜 E]
[ContinuousSMul 𝕜 E]
[AddCommGroup F]
[TopologicalSpace F]
[T2Space F]
[TopologicalAddGroup F]
[Module 𝕜 F]
[ContinuousSMul 𝕜 F]
[FiniteDimensional 𝕜 E]
{f : E →ₗ[𝕜] F}
(hf : LinearMap.ker f = ⊥)


theorem pow_sum_div_card_le_sum_pow (f : ι → ℝ≥0) (n : ℕ) :
    (∑ x ∈ s, f x) ^ (n + 1) / (s.card : ℝ) ^ n ≤ ∑ x ∈ s, f x ^ (n + 1)

{ι : Type u}
(s : Finset ι)
(f : ι → ℝ≥0)
(n : ℕ)

↑(∑ x ∈ s, f x) ^ (n + 1) / ↑s.card ^ n ≤ ↑(∑ x ∈ s, f x ^ (n + 1))


/-- The double opposite category is equivalent to the original. -/
@[simps]
def opOpEquivalence : Cᵒᵖᵒᵖ ≌ C

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

(CategoryTheory.opOpEquivalence C).inverse = CategoryTheory.opOp C


@[simp, norm_cast]
theorem add_apply (f g : CauSeq β abv) (i : ℕ) : (f + g) i = f i + g i

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(f g : CauSeq β abv)
(i : ℕ)


{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
(s : S.Splitting)


theorem image_sUnion {f : α → β} {s : Set (Set α)} : (f '' ⋃₀ s) = ⋃₀ (image f '' s)

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


theorem mem_erase_of_ne_of_mem : a ≠ b → a ∈ s → a ∈ erase s b

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}


theorem isCoprime_iff_codisjoint : IsCoprime I J ↔ Codisjoint I J

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


protected theorem isFixedPt (hf : IsPeriodicPt f n x) : IsFixedPt f^[n] x

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}
(hf : Function.IsPeriodicPt f n x)


@[simp]
theorem zeroIsoInitial_hom [HasInitial C] : zeroIsoInitial.hom = (0 : 0 ⟶ ⊥_ C)


theorem corec_id_id_eq_const (a : α) : corec id id a = const a


@[simp]
theorem dotProduct_stdBasis_eq_mul [DecidableEq n] (v : n → R) (c : R) (i : n) :
    dotProduct v (LinearMap.stdBasis R (fun _ => R) i c) = v i * c

{n : Type u_2}
{R : Type u_4}
[Semiring R]
[Fintype n]
[DecidableEq n]
(v : n → R)
(c : R)
(i : n)

Matrix.dotProduct v ((LinearMap.stdBasis R (fun x => R) i) c) = v i * c