@[simp]
theorem PreservesLimitPair.iso_hom : (PreservesLimitPair.iso G X Y).hom = prodComparison G X Y

[CategoryTheory.Limits.HasBinaryProduct (G.obj X) (G.obj Y)]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.pair X Y) G]

(CategoryTheory.Limits.PreservesLimitPair.iso G X Y).hom = CategoryTheory.Limits.prodComparison G X Y


theorem prod_inf {g₁ g₂ : Filter β} : f ×ˢ (g₁ ⊓ g₂) = (f ×ˢ g₁) ⊓ (f ×ˢ g₂)

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

f ×ˢ (g₁ ⊓ g₂) = f ×ˢ g₁ ⊓ f ×ˢ g₂


theorem continuousLinearMap_symm_apply' {b : B} (hb : b ∈ e₁.baseSet ∩ e₂.baseSet)
    (L : F₁ →SL[σ] F₂) :
    (continuousLinearMap σ e₁ e₂).symm b L =
      (e₂.symmL 𝕜₂ b).comp (L.comp <| e₁.continuousLinearMapAt 𝕜₁ b)

(σ : 𝕜₁ →+* 𝕜₂)

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

(e₁ : Trivialization F₁ Bundle.TotalSpace.proj)

(e₂ : Trivialization F₂ Bundle.TotalSpace.proj)

(Pretrivialization.continuousLinearMap σ e₁ e₂).symm b L =
  (Trivialization.symmL 𝕜₂ e₂ b).comp (L.comp (Trivialization.continuousLinearMapAt 𝕜₁ e₁ b))


theorem dist_lt_add_of_nonempty_ball_inter_closedBall (h : (ball x ε₁ ∩ closedBall y ε₂).Nonempty) :
    dist x y < ε₁ + ε₂

(h : (Metric.ball x ε₁ ∩ Metric.closedBall y ε₂).Nonempty)


/-- Corresponds to `norm_nonneg`. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem hammingNorm_nonneg {x : ∀ i, β i} : 0 ≤ hammingNorm x

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


theorem LineDifferentiableWithinAt.congr_of_eventuallyEq (h : LineDifferentiableWithinAt 𝕜 f s x v)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : LineDifferentiableWithinAt 𝕜 f₁ s x v


lemma addX_of_Z_eq_zero_right {P Q : Fin 3 → R} (hQz : Q z = 0) :
    W'.addX P Q = (-(Q x * P z)) ^ 2 * P x

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(hQz : Q z = 0)


@[reassoc (attr := simp)]
theorem whiskerRight_naturality_naturality {f g : a ⟶ b} (β : f ⟶ g) (h : G.obj b ⟶ a') :
    F.map₂ β ▷ η.app b ▷ h ≫ (η.naturality g).hom ▷ h =
      (η.naturality f).hom ▷ h ≫ (α_ _ _ _).hom ≫ η.app a ◁ G.map₂ β ▷ h ≫ (α_ _ _ _).inv

(η : CategoryTheory.StrongOplaxNatTrans F G)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.whiskerRight (F.map₂ β) (η.app b)) h)
    (CategoryTheory.Bicategory.whiskerRight (η.naturality g).hom h) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (η.naturality f).hom h)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (η.app a) (G.map f) h).hom
      (CategoryTheory.CategoryStruct.comp
        (CategoryTheory.Bicategory.whiskerLeft (η.app a) (CategoryTheory.Bicategory.whiskerRight (G.map₂ β) h))
        (CategoryTheory.Bicategory.associator (η.app a) (G.map g) h).inv))


lemma algebraMap_pos (ha : 0 < a) : 0 < algebraMap α β a

{α : Type u_1}
(β : Type u_2)
[OrderedCommSemiring α]
[StrictOrderedSemiring β]
[Algebra α β]
[SMulPosStrictMono α β]
{a : α}
(ha : 0 < a)


theorem SmoothWithinAt.contMDiffWithinAt (h : SmoothWithinAt I I' f s x) :
    ContMDiffWithinAt I I' n 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']
{f : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
(h : SmoothWithinAt I I' f s x)


protected theorem Sized.subsingleton (hA : A.Sized 0) : A.Subsingleton

{α : Type u_1}
{A : Set (Finset α)}
(hA : Set.Sized 0 A)


@[simp]
theorem map_coe_nnreal : WithTop.map ((↑) : ℕ → ℝ≥0) = ((↑) : ℕ∞ → ℝ≥0∞)


@[simp]
lemma ι_app (V) : U.ι.app V = X.presheaf.map
    (homOfLE (x := U.ι ''ᵁ U.ι ⁻¹ᵁ V) (Set.image_preimage_subset _ _)).op

{X : AlgebraicGeometry.Scheme}
(U V : X.Opens)

AlgebraicGeometry.Scheme.Hom.app U.ι V = X.presheaf.map (CategoryTheory.homOfLE ⋯).op


lemma abs_le_of_sq_le_sq (h : a ^ 2 ≤ b ^ 2) (hb : 0 ≤ b) : |a| ≤ b

{α : Type u_1}
[LinearOrderedRing α]
{a b : α}
(h : a ^ 2 ≤ b ^ 2)
(hb : 0 ≤ b)


theorem convexBodyLT_mem {x : K} :
    mixedEmbedding K x ∈ (convexBodyLT K f) ↔ ∀ w : InfinitePlace K, w x < f w

(f : NumberField.InfinitePlace K → NNReal)

(NumberField.mixedEmbedding K) x ∈ NumberField.mixedEmbedding.convexBodyLT K f ↔
  ∀ (w : NumberField.InfinitePlace K), w x < ↑(f w)


@[simp]
lemma disjiUnion_eq_biUnion (s : Finset α) (f : α → Finset β) (hf) :
    s.disjiUnion f hf = s.biUnion f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(s : Finset α)
(f : α → Finset β)
(hf : (↑s).PairwiseDisjoint f)


theorem ext' {s : Submodule R E} {f g : s →ₗ[R] F} (h : f = g) : mk s f = mk s g

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{s : Submodule R E}
{f g : ↥s →ₗ[R] F}
(h : f = g)

{ domain := s, toFun := f } = { domain := s, toFun := g }


lemma uIcc_subset_uIcc_iff_le' :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] ↔ a₂ ⊓ b₂ ≤ a₁ ⊓ b₁ ∧ a₁ ⊔ b₁ ≤ a₂ ⊔ b₂

{α : Type u_1}
[Lattice α]
{a₁ a₂ b₁ b₂ : α}

Set.uIcc a₁ b₁ ⊆ Set.uIcc a₂ b₂ ↔ a₂ ⊓ b₂ ≤ a₁ ⊓ b₁ ∧ a₁ ⊔ b₁ ≤ a₂ ⊔ b₂


theorem _root_.Bornology.IsCobounded.closedBall_compl_subset {s : Set α} (hs : IsCobounded s)
    (c : α) : ∃ (r : ℝ), (Metric.closedBall c r)ᶜ ⊆ s

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(hs : Bornology.IsCobounded s)
(c : α)


@[simp]
theorem aeval_zero (p : MvPolynomial σ R) :
    aeval (0 : σ → S₁) p = algebraMap _ _ (constantCoeff p)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[Algebra R S₁]
(p : MvPolynomial σ R)

(MvPolynomial.aeval 0) p = (algebraMap R S₁) (MvPolynomial.constantCoeff p)


theorem contDiff_norm_sq : ContDiff ℝ n fun x : E => ‖x‖ ^ 2

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{n : ℕ∞}


/-- The determinant of a unit matrix is itself a unit. -/
@[simps]
def det : GL n R →* Rˣ

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : GL n R)

↑(Matrix.GeneralLinearGroup.det A)⁻¹ = (↑A⁻¹).det


@[simp]
theorem neLocus_add_left [∀ a, AddLeftCancelMonoid (N a)] (f g h : Π₀ a, N a) :
    (f + g).neLocus (f + h) = g.neLocus h

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


theorem contMDiff_top : Smooth I I' f ↔ ∀ n : ℕ, ContMDiff I I' n f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{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 : M → M'}

Smooth I I' f ↔ ∀ (n : ℕ), ContMDiff I I' (↑n) f


theorem IsLeast.nonempty (h : IsLeast s a) : s.Nonempty

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsLeast s a)


@[simp, norm_cast]
theorem coe_sup [Sup β] (f g : α →ₛ β) : ⇑(f ⊔ g) = ⇑f ⊔ ⇑g

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


lemma schnirelmannDensity_congr {B : Set ℕ} [DecidablePred (· ∈ B)] (h : A = B) :
    schnirelmannDensity A = schnirelmannDensity B

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
{B : Set ℕ}
[DecidablePred fun x => x ∈ B]
(h : A = B)


theorem support_mul_single_eq_image [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) {r : k}
    (hr : ∀ y, y * r = 0 ↔ y = 0) {x : G} (rx : IsRightRegular x) :
    (f * single x r).support = Finset.image (· * x) f.support

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Mul G]
(f : MonoidAlgebra k G)
{r : k}
(hr : ∀ (y : k), y * r = 0 ↔ y = 0)
{x : G}
(rx : IsRightRegular x)

(f * MonoidAlgebra.single x r).support = Finset.image (fun x_1 => x_1 * x) f.support


/-- In a module over an artinian ring, the submodule generated by finitely many vectors is
artinian. -/
theorem isArtinian_span_of_finite (R) {M} [Ring R] [AddCommGroup M] [Module R M] [IsArtinianRing R]
    {A : Set M} (hA : A.Finite) : IsArtinian R (Submodule.span R A)

(R : Type u_1)
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinianRing R]
{A : Set M}
(hA : A.Finite)


/-- A generalization of **Sylow's third theorem**.
  If the number of Sylow `p`-subgroups is finite, then it is congruent to `1` modulo `p`. -/
theorem card_sylow_modEq_one [Fact p.Prime] [Finite (Sylow p G)] :
    Nat.card (Sylow p G) ≡ 1 [MOD p]

(p : ℕ)
(G : Type u_1)
[Group G]
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]


/-- The convolution `f * g` is continuous if `f` is locally integrable and `g` is continuous and
compactly supported. Version where `g` depends on an additional parameter in an open subset `s` of
a parameter space `P` (and the compact support `k` is independent of the parameter in `s`),
given in terms of compositions with an additional continuous map. -/
theorem continuousOn_convolution_right_with_param_comp {s : Set P} {v : P → G}
    (hv : ContinuousOn v s) {g : P → G → E'} {k : Set G} (hk : IsCompact k)
    (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0) (hf : LocallyIntegrable f μ)
    (hg : ContinuousOn (↿g) (s ×ˢ univ)) : ContinuousOn (fun x => (f ⋆[L, μ] g x) (v x)) s

(hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0)

(hf : MeasureTheory.LocallyIntegrable f μ)

(hg : ContinuousOn (↿g) (s ×ˢ Set.univ))

ContinuousOn (fun x => MeasureTheory.convolution f (g x) L μ (v x)) s


theorem measurable_mk [PseudoMetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
    (hf : AEStronglyMeasurable f μ) : Measurable (hf.mk f)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

Measurable (MeasureTheory.AEStronglyMeasurable.mk f hf)


theorem isSeparatedMap_iff_isClosedMap {f : X → Y} :
    IsSeparatedMap f ↔ IsClosedMap (toPullbackDiag f)

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


@[simp]
theorem insert_diff_eq_singleton {a : α} {s : Set α} (h : a ∉ s) : insert a s \ s = {a}

{α : Type u}
{a : α}
{s : Set α}
(h : a ∉ s)


lemma isDiscrete_iff_mem_essImage (F : Sheaf J A) :
    F.IsDiscrete J ht ↔ F ∈ (constantSheaf J A).essImage

(J : CategoryTheory.GrothendieckTopology C)

(ht : CategoryTheory.Limits.IsTerminal t)

CategoryTheory.Sheaf.IsDiscrete J ht F ↔ F ∈ (CategoryTheory.constantSheaf J A).essImage


@[simp]
theorem join_append (S T : WSeq (WSeq α)) : join (append S T) ~ʷ append (join S) (join T)

{α : Type u}
(S T : Stream'.WSeq (Stream'.WSeq α))

(S.append T).join ~ʷ S.join.append T.join


@[simp]
theorem iInf_apply {α : Type*} {β : α → Type*} {ι : Sort*} [∀ i, InfSet (β i)] {f : ι → ∀ a, β a}
    {a : α} : (⨅ i, f i) a = ⨅ i, f i a

{α : Type u_9}
{β : α → Type u_10}
{ι : Sort u_11}
[(i : α) → InfSet (β i)]
{f : ι → (a : α) → β a}
{a : α}


/-- If a continuous map `f` maps `s` to a closed set `t`, then it maps `closure s` to `t`. -/
theorem Set.MapsTo.closure_left {t : Set Y} (h : MapsTo f s t)
    (hc : Continuous f) (ht : IsClosed t) : MapsTo f (closure s) t

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
{t : Set Y}
(h : Set.MapsTo f s t)
(hc : Continuous f)
(ht : IsClosed t)


/-- The range of a surjective semigroup hom is the whole of the codomain. -/
@[to_additive (attr := simp)
  "The range of a surjective `AddSemigroup` hom is the whole of the codomain."]
theorem srange_top_of_surjective {N} [Mul N] (f : M →ₙ* N) (hf : Function.Surjective f) :
    f.srange = (⊤ : Subsemigroup N)

{M : Type u_1}
[Mul M]
{N : Type u_5}
[Mul N]
(f : M →ₙ* N)
(hf : Function.Surjective ⇑f)


theorem antidiagonalTuple_two (n : ℕ) :
    antidiagonalTuple 2 n = (antidiagonal n).map fun i => ![i.1, i.2]

Multiset.Nat.antidiagonalTuple 2 n = Multiset.map (fun i => ![i.1, i.2]) (Multiset.Nat.antidiagonal n)


@[simp]
theorem sumMap_comp_inl : ϕ.sumMap ψ ∘ᴸ LHom.sumInl = LHom.sumInl ∘ᴸ ϕ

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(ϕ : L →ᴸ L')
{L₁ : FirstOrder.Language}
{L₂ : FirstOrder.Language}
(ψ : L₁ →ᴸ L₂)

(ϕ.sumMap ψ).comp FirstOrder.Language.LHom.sumInl = FirstOrder.Language.LHom.sumInl.comp ϕ


theorem Encoding.card_le_card_list {α : Type u} (e : Encoding.{u, v} α) :
    Cardinal.lift.{v} #α ≤ Cardinal.lift.{u} #(List e.Γ)

{α : Type u}
(e : Computability.Encoding α)

Cardinal.lift.{v, u} #α ≤ Cardinal.lift.{u, v} #(List e.Γ)


@[reassoc (attr := simp 1100)]
theorem wideCoequalizer.π_desc [Nonempty J] {W : C} (k : Y ⟶ W)
    (h : ∀ j₁ j₂, f j₁ ≫ k = f j₂ ≫ k) :
    wideCoequalizer.π f ≫ wideCoequalizer.desc k h = k

(h : ∀ (j₁ j₂ : J), CategoryTheory.CategoryStruct.comp (f j₁) k = CategoryTheory.CategoryStruct.comp (f j₂) k)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.wideCoequalizer.π f)
    (CategoryTheory.Limits.wideCoequalizer.desc k h) =
  k


theorem StarConvex.inter (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 x t) : StarConvex 𝕜 x (s ∩ t)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{x : E}
{s t : Set E}
(hs : StarConvex 𝕜 x s)
(ht : StarConvex 𝕜 x t)


@[to_additive (attr := simp)]
theorem coe_add : ⇑(p + q) = p + q

{E : Type u_4}
[Group E]
(p q : GroupSeminorm E)


theorem Reaches₀.single {σ} {f : σ → Option σ} {a b : σ} (h : b ∈ f a) : Reaches₀ f a b

{σ : Type u_1}
{f : σ → Option σ}
{a b : σ}
(h : b ∈ f a)


/-- Assumes left covariance.
The lemma assuming right covariance is `Right.one_le_mul`. -/
@[to_additive Left.add_nonneg "Assumes left covariance.
The lemma assuming right covariance is `Right.add_nonneg`."]
theorem Left.one_le_mul [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : 1 ≤ a) (hb : 1 ≤ b) :
    1 ≤ a * b

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


theorem sup'_biUnion [DecidableEq β] {s : Finset γ} (Hs : s.Nonempty) {t : γ → Finset β}
    (Ht : ∀ b, (t b).Nonempty) :
    (s.biUnion t).sup' (Hs.biUnion fun b _ => Ht b) f = s.sup' Hs (fun b => (t b).sup' (Ht b) f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeSup α]
(f : β → α)
[DecidableEq β]
{s : Finset γ}
(Hs : s.Nonempty)
{t : γ → Finset β}
(Ht : ∀ (b : γ), (t b).Nonempty)

(s.biUnion t).sup' ⋯ f = s.sup' Hs fun b => (t b).sup' ⋯ f


/-- If `f` is bounded, then its `LSeries` is summable at `s` when `re s > 1`. -/
theorem LSeriesSummable_of_bounded_of_one_lt_re {f : ℕ → ℂ} {m : ℝ}
    (h : ∀ n ≠ 0, Complex.abs (f n) ≤ m) {s : ℂ} (hs : 1 < s.re) :
    LSeriesSummable f s

(h : ∀ (n : ℕ), n ≠ 0 → Complex.abs (f n) ≤ m)


theorem intrinsicFrontier_subset_intrinsicClosure : intrinsicFrontier 𝕜 s ⊆ intrinsicClosure 𝕜 s

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
{s : Set P}


theorem support_eq_singleton' {f : α →₀ M} {a : α} :
    f.support = {a} ↔ ∃ b ≠ 0, f = single a b

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}
{a : α}

f.support = {a} ↔ ∃ b, b ≠ 0 ∧ f = Finsupp.single a b


theorem arsinh_strictMono : StrictMono arsinh


protected theorem sub_eq_zero_iff_le : n - m = 0 ↔ n ≤ m


/-- If an arrow set contains a split epi, it generates the maximal sieve. -/
theorem generate_of_contains_isSplitEpi {R : Presieve X} (f : Y ⟶ X) [IsSplitEpi f] (hf : R f) :
    generate R = ⊤

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


theorem HasSum.matrix_blockDiag' {f : X → Matrix (Σi, m' i) (Σi, n' i) R}
    {a : Matrix (Σi, m' i) (Σi, n' i) R} (hf : HasSum f a) :
    HasSum (fun x => blockDiag' (f x)) (blockDiag' a)

{f : X → Matrix ((i : l) × m' i) ((i : l) × n' i) R}

{a : Matrix ((i : l) × m' i) ((i : l) × n' i) R}

HasSum (fun x => (f x).blockDiag') a.blockDiag'


@[to_additive]
lemma iCondIndepFun.indepFun_div_div (hf_indep : iCondIndepFun m' hm' (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    CondIndepFun m' hm' (f i / f j) (f k / f l) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (f i / f j) (f k / f l) μ


theorem curry_injective : Function.Injective (curry : (M ⊗[R] N →ₗ[R] P) → M →ₗ[R] N →ₗ[R] P)

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]


theorem expand_eq_comp_X_pow {f : R[X]} : expand R p f = f.comp (X ^ p)

{R : Type u}
[CommSemiring R]
(p : ℕ)
{f : R[X]}

(Polynomial.expand R p) f = f.comp (Polynomial.X ^ p)


theorem mem_nhdsWithin_subtype {s : Set α} {a : { x // x ∈ s }} {t u : Set { x // x ∈ s }} :
    t ∈ 𝓝[u] a ↔ t ∈ comap ((↑) : s → α) (𝓝[(↑) '' u] a)

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
{a : { x // x ∈ s }}
{t u : Set { x // x ∈ s }}

t ∈ 𝓝[u] a ↔ t ∈ Filter.comap Subtype.val (𝓝[Subtype.val '' u] ↑a)


@[simp]
theorem toDual_top [Top α] : toDual (⊤ : α) = ⊥


/-- Composing the zero multilinear map with a linear map in each argument. -/
@[simp]
theorem zero_compLinearMap (f : ∀ i, M₁ i →ₗ[R] M₁' i) :
    (0 : MultilinearMap R M₁' M₂).compLinearMap f = 0

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{M₁' : ι → Type u_1}
[(i : ι) → AddCommMonoid (M₁' i)]
[(i : ι) → Module R (M₁' i)]
(f : (i : ι) → M₁ i →ₗ[R] M₁' i)


lemma moduleCat_exact_iff_ker_sub_range :
    S.Exact ↔ LinearMap.ker S.g ≤ LinearMap.range S.f

(S : CategoryTheory.ShortComplex (ModuleCat R))


@[nontriviality]
theorem Countable.of_subsingleton [Subsingleton α] (s : Set α) : s.Countable

{α : Type u}
[Subsingleton α]
(s : Set α)


@[simp] lemma map_add_right_Ico (a b c : α) :
    (Ico a b).map (addRightEmbedding c) = Ico (a + c) (b + c)

{α : Type u_2}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(a b c : α)

Finset.map (addRightEmbedding c) (Finset.Ico a b) = Finset.Ico (a + c) (b + c)


@[simp]
theorem coe_prodMap : ⇑(prodMap f g) = Prod.map f g

{R : Type u_3}
{R' : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring R']
[NonAssocSemiring S']
(f : R →+* R')
(g : S →+* S')


@[ext]
theorem ext {f g : P →ᵃⁱ[𝕜] P₂} (h : ∀ x, f x = g x) : f = g

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
{f g : P →ᵃⁱ[𝕜] P₂}
(h : ∀ (x : P), f x = g x)


@[simp]
theorem withDensity_apply (f : α → ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    μ.withDensity f s = ∫⁻ a in s, f a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ≥0∞)
{s : Set α}
(hs : MeasurableSet s)

(μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ


theorem exp_eq_exp_iff_exp_sub_eq_one {x y : ℂ} : exp x = exp y ↔ exp (x - y) = 1

Complex.exp x = Complex.exp y ↔ Complex.exp (x - y) = 1


@[to_additive]
theorem ContinuousWithinAt.mul {f g : X → M} {s : Set X} {x : X} (hf : ContinuousWithinAt f s x)
    (hg : ContinuousWithinAt g s x) : ContinuousWithinAt (fun x => f x * g x) s x

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Add M]
[ContinuousAdd M]
{f g : X → M}
{s : Set X}
{x : X}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)

ContinuousWithinAt (fun x => f x + g x) s x


@[simp]
theorem eval₂_X (n) : (X n).eval₂ f g = g n

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(g : σ → S₁)
(n : σ)

MvPolynomial.eval₂ f g (MvPolynomial.X n) = g n


theorem toIcoMod_eq_iff : toIcoMod hp a b = c ↔ c ∈ Set.Ico a (a + p) ∧ ∃ z : ℤ, b = c + z • p

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

toIcoMod hp a b = c ↔ c ∈ Set.Ico a (a + p) ∧ ∃ z, b = c + z • p


/-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `f.map hy k z * k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `f.map hy k z + k (g y) = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_right (z) : f.map hy k z * k.toMap (g (f.sec z).2) = k.toMap (g (f.sec z).1)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
(z : N)

(f.map hy k) z * k.toMap (g ↑(f.sec z).2) = k.toMap (g (f.sec z).1)


@[simp]
theorem get?_tail (s : Seq α) (n) : get? (tail s) n = get? s (n + 1)

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


theorem bind_inf_principal {f : Filter α} {g : α → Filter β} {s : Set β} :
    (f.bind fun x => g x ⊓ 𝓟 s) = f.bind g ⊓ 𝓟 s

{α : Type u}
{β : Type v}
{f : Filter α}
{g : α → Filter β}
{s : Set β}


theorem isInt_pow {α} [Ring α] : ∀ {f : α → ℕ → α} {a : α} {b : ℕ} {a' : ℤ} {b' : ℕ} {c : ℤ},
    f = HPow.hPow → IsInt a a' → IsNat b b' → Int.pow a' b' = c → IsInt (f a b) c

{α : Type u_1}
[Ring α]
{f : α → ℕ → α}
{a : α}
{b : ℕ}
{a' : ℤ}
{b' : ℕ}
{c : ℤ}

f = HPow.hPow →
  Mathlib.Meta.NormNum.IsInt a a' →
    Mathlib.Meta.NormNum.IsNat b b' → a'.pow b' = c → Mathlib.Meta.NormNum.IsInt (f a b) c


theorem GammaSeq_add_one_left (s : ℂ) {n : ℕ} (hn : n ≠ 0) :
    GammaSeq (s + 1) n / s = n / (n + 1 + s) * GammaSeq s n

(s + 1).GammaSeq n / s = ↑n / (↑n + 1 + s) * s.GammaSeq n


theorem preimage_setOf_dist (hf : Isometry f) (x : α) (p : ℝ → Prop) :
    f ⁻¹' { y | p (dist y (f x)) } = { y | p (dist y x) }

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{f : α → β}
(hf : Isometry f)
(x : α)
(p : ℝ → Prop)

f ⁻¹' {y | p (dist y (f x))} = {y | p (dist y x)}


@[to_additive]
lemma div_sup (a b c : α) : c / (a ⊔ b) = c / a ⊓ c / b

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

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


@[aesop safe 100 apply (rule_sets := [Measurable])]
lemma measurableSet_not_mem (a : α) : MeasurableSet {s : Set α | a ∉ s}


@[to_additive]
theorem inv_def [Inv β] (x : α) :
    letI := Equiv.Inv e
    x⁻¹ = e.symm (e x)⁻¹

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Neg β]
(x : α)


theorem apply_dualBasis_right (B : BilinForm K V) (hB : B.Nondegenerate) (sym : B.IsSymm)
    (b : Basis ι K V) (i j) : B (b i) (B.dualBasis hB b j) = if i = j then 1 else 0

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
{ι : Type u_10}
[DecidableEq ι]
[Finite ι]
(B : LinearMap.BilinForm K V)
(hB : B.Nondegenerate)
(sym : B.IsSymm)
(b : Basis ι K V)
(i j : ι)

(B (b i)) ((B.dualBasis hB b) j) = if i = j then 1 else 0


/-- For any extended real number `x`, the sum of `⊤` and `x` is equal to `⊤`
if and only if `x` is not `⊥`. -/
theorem top_add_iff_ne_bot {x : EReal} : ⊤ + x = ⊤ ↔ x ≠ ⊥

⊤ + x = ⊤ ↔ x ≠ ⊥


theorem Finset.centerMass_filter_ne_zero :
    (t.filter fun i => w i ≠ 0).centerMass w z = t.centerMass w z

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{t : Finset ι}
{w : ι → R}
(z : ι → E)

(Finset.filter (fun i => w i ≠ 0) t).centerMass w z = t.centerMass w z


/-- The predicate expressing that, up to equivalence, a functor `L : C ⥤ D`
identifies the category `D` with the localized category of `C` with respect
to `W : MorphismProperty C`. -/
class IsLocalization : Prop where
  /-- the functor inverts the given `MorphismProperty` -/
  inverts : W.IsInvertedBy L
  /-- the induced functor from the constructed localized category is an equivalence -/
  isEquivalence : IsEquivalence (Localization.Construction.lift L inverts)

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


@[to_additive]
theorem inter_mul_union_subset_union : s₁ ∩ s₂ * (t₁ ∪ t₂) ⊆ s₁ * t₁ ∪ s₂ * t₂

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


theorem natSepDegree_map : (f.map (algebraMap F E)).natSepDegree = f.natSepDegree

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(f : F[X])

(Polynomial.map (algebraMap F E) f).natSepDegree = f.natSepDegree


theorem coe_comp_sup_hom (f : BoundedLatticeHom β γ) (g : BoundedLatticeHom α β) :
    (f.comp g : SupHom α γ) = (f : SupHom β γ).comp g

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Lattice α]
[Lattice β]
[Lattice γ]
[BoundedOrder α]
[BoundedOrder β]
[BoundedOrder γ]
(f : BoundedLatticeHom β γ)
(g : BoundedLatticeHom α β)

{ toFun := ⇑(f.comp g), map_sup' := ⋯ } = { toFun := ⇑f, map_sup' := ⋯ }.comp { toFun := ⇑g, map_sup' := ⋯ }


theorem eq_zero : ∀ {x y : M}, B x y = 0 → B y x = 0

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(H : B.IsRefl)
{x y : M}


theorem dist_eq_max_sub_min {i j : ℕ} : dist i j = (max i j) - min i j


theorem le_chainHeight_TFAE (n : ℕ) :
    TFAE [↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, length l = n, ∃ l ∈ s.subchain, n ≤ length l]

{α : Type u_1}
[LT α]
(s : Set α)
(n : ℕ)

[↑n ≤ s.chainHeight, ∃ l ∈ s.subchain, l.length = n, ∃ l ∈ s.subchain, n ≤ l.length].TFAE


theorem exists_right_inverse_iff_isUnit : (∃ B, A * B = 1) ↔ IsUnit A

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A : Matrix n n α}


theorem group_smul_def (g : G) (w : NormalWord d) :
    g • w = { w with head := g * w.head }

{d : HNNExtension.NormalWord.TransversalPair G A B}

g • w = { head := g * w.head, toList := w.toList, chain := ⋯, mem_set := ⋯ }


/-- (internal implementation) the colimit cocone of a functor,
implemented as a quotient of a sigma type
-/
@[simps]
noncomputable def colimitCocone (F : J ⥤ Type u) [Small.{u} (Quot F)] : Cocone F

[Small.{u, max u v} (CategoryTheory.Limits.Types.Quot F)]

(CategoryTheory.Limits.Types.colimitCocone F).ι.app j x =
  (equivShrink (CategoryTheory.Limits.Types.Quot F)) (Quot.mk (CategoryTheory.Limits.Types.Quot.Rel F) ⟨j, x⟩)


protected theorem le_total (a b : ℤ√d) : a ≤ b ∨ b ≤ a


/-- A function that is complex differentiable on the complex plane is given by evaluating
its Taylor series at any point `c`. -/
lemma hasSum_taylorSeries_of_entire :
    HasSum (fun n : ℕ ↦ (n ! : ℂ)⁻¹ • (z - c) ^ n • iteratedDeriv n f c) (f z)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
⦃f : ℂ → E⦄
(hf : Differentiable ℂ f)
(c z : ℂ)

HasSum (fun n => (↑n.factorial)⁻¹ • (z - c) ^ n • iteratedDeriv n f c) (f z)


@[simp]
theorem comapDomain_single (f : α → β) (a : α) (m : M)
    (hif : Set.InjOn f (f ⁻¹' (single (f a) m).support)) :
    comapDomain f (Finsupp.single (f a) m) hif = Finsupp.single a m

(hif : Set.InjOn f (f ⁻¹' ↑(Finsupp.single (f a) m).support))

Finsupp.comapDomain f (Finsupp.single (f a) m) hif = Finsupp.single a m


/-- The co-Yoneda embedding, as a functor from `Cᵒᵖ` into co-presheaves on `C`.
-/
@[simps]
def coyoneda : Cᵒᵖ ⥤ C ⥤ Type v₁

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

∀ {X_1 Y : C} (f : X_1 ⟶ Y) (g : Opposite.unop X ⟶ X_1),
  (CategoryTheory.coyoneda.obj X).map f g = CategoryTheory.CategoryStruct.comp g f


@[simp]
theorem min_eq_top [OrderTop α] {a b : α} : min a b = ⊤ ↔ a = ⊤ ∧ b = ⊤

{α : Type u}
[LinearOrder α]
[OrderTop α]
{a b : α}


theorem neg_divInt (n d) : -(n /. d) = -n /. d


theorem logb_nonpos_iff (hx : 0 < x) : logb b x ≤ 0 ↔ x ≤ 1


theorem comp {g : G → E} {t : Set G} (hf : DiffContOnCl 𝕜 f s) (hg : DiffContOnCl 𝕜 g t)
    (h : MapsTo g t s) : DiffContOnCl 𝕜 (f ∘ g) t

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{s : Set E}
{g : G → E}
{t : Set G}
(hf : DiffContOnCl 𝕜 f s)
(hg : DiffContOnCl 𝕜 g t)
(h : Set.MapsTo g t s)


/-- If every coefficient of a polynomial is in an ideal `I`, then so is the polynomial itself -/
theorem polynomial_mem_ideal_of_coeff_mem_ideal (I : Ideal R[X]) (p : R[X])
    (hp : ∀ n : ℕ, p.coeff n ∈ I.comap (C : R →+* R[X])) : p ∈ I

(hp : ∀ (n : ℕ), p.coeff n ∈ Ideal.comap Polynomial.C I)


/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def functorObj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(A : Mon_ (C ⥤ D))
(X : C)

((CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.functorObj A).obj X).mul = A.mul.app X


@[simp]
theorem integral_deterministic {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] : ∫ x, f x ∂deterministic g hg a = f (g a)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : β → E}
{g : α → β}
{a : α}
(hg : Measurable g)
[MeasurableSingletonClass β]

∫ (x : β), f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = f (g a)


/-- If `f` is primitive recursive, there exists `m` such that `f n < ack m n` for all `n`. -/
theorem exists_lt_ack_of_nat_primrec {f : ℕ → ℕ} (hf : Nat.Primrec f) :
    ∃ m, ∀ n, f n < ack m n


theorem aemeasurable_coeFn [MeasurableSpace β] [BorelSpace β] (f : α →₁[μ] β) : AEMeasurable f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
[MeasurableSpace β]
[BorelSpace β]
(f : ↥(MeasureTheory.Lp β 1 μ))


theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z


/-- Given a cone `c : Cone K` and a map `f : X ⟶ F.obj c.X`, we can construct a cone of structured
arrows over `X` with `f` as the cone point.
-/
@[simps]
def Cone.toStructuredArrowCone {K : J ⥤ C} (c : Cone K) (F : C ⥤ D) {X : D} (f : X ⟶ F.obj c.pt) :
    Cone ((F.mapCone c).toStructuredArrow ⋙ StructuredArrow.map f ⋙ StructuredArrow.pre _ K F)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
{K : CategoryTheory.Functor J C}
(c : CategoryTheory.Limits.Cone K)
(F : CategoryTheory.Functor C D)
{X : D}
(f : X ⟶ F.obj c.pt)
(j : J)

(c.toStructuredArrowCone F f).π.app j = CategoryTheory.StructuredArrow.homMk (c.π.app j) ⋯


theorem init (f : r ≼i s) {a : α} {b : β} : s b (f a) → ∃ a', f a' = b

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≼i s)
{a : α}
{b : β}


@[simp]
lemma smul_iso_hom (a : Units ℤ) (e : X ≅ Y) : (a • e).hom = a • e.hom

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X Y : C}
(a : ℤˣ)
(e : X ≅ Y)


theorem setToFun_non_aEStronglyMeasurable (hT : DominatedFinMeasAdditive μ T C)
    (hf : ¬AEStronglyMeasurable f μ) : setToFun μ T hT f = 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hf : ¬MeasureTheory.AEStronglyMeasurable f μ)


theorem ContDiffOn.continuousOn_fderiv_of_isOpen (h : ContDiffOn 𝕜 n f s) (hs : IsOpen s)
    (hn : 1 ≤ n) : ContinuousOn (fun x => fderiv 𝕜 f x) s

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


/-- The functorial version of `ULift.up`. -/
@[simps]
def ULift.upFunctor : C ⥤ ULift.{u₂} C

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

∀ {X Y : C} (f : X ⟶ Y), CategoryTheory.ULift.upFunctor.map f = f


/-- Rewrite in terms of the `factorThruImage` interface. -/
@[simp]
theorem as_factorThruImage : (Image.monoFactorisation f).e = factorThruImage f

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

(CategoryTheory.Limits.Image.monoFactorisation f).e = CategoryTheory.Limits.factorThruImage f


theorem rotate'_rotate' : ∀ (l : List α) (n m : ℕ), (l.rotate' n).rotate' m = l.rotate' (n + m)


theorem ascPochhammer_pos (n : ℕ) (s : S) (h : 0 < s) : 0 < (ascPochhammer S n).eval s

{S : Type u_1}
[StrictOrderedSemiring S]
(n : ℕ)
(s : S)
(h : 0 < s)

0 < Polynomial.eval s (ascPochhammer S n)


protected theorem dvd_iff_dvd_of_dvd_add {a b c : Int} (H : a ∣ b + c) : a ∣ b ↔ a ∣ c


protected theorem differentiable : Differentiable 𝕜 f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(f : 𝕜 →ᵃ[𝕜] E)


theorem exists_reduced_fraction' {b : B} (hb : b ≠ 0) (hx : Irreducible x) :
    ∃ (a : R) (n : ℤ), ¬x ∣ a ∧ selfZPow x B n * algebraMap R B a = b

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
[IsDomain R]
[WfDvdMonoid R]
{b : B}
(hb : b ≠ 0)
(hx : Irreducible x)

∃ a n, ¬x ∣ a ∧ selfZPow x B n * (algebraMap R B) a = b


theorem IsBigOWith.of_pow {n : ℕ} {f : α → 𝕜} {g : α → R} (h : IsBigOWith c l (f ^ n) (g ^ n))
    (hn : n ≠ 0) (hc : c ≤ c' ^ n) (hc' : 0 ≤ c') : IsBigOWith c' l f g

(h : Asymptotics.IsBigOWith c l (f ^ n) (g ^ n))


/-- If there is a primitive `n`-th root of unity in `K`, then
`cyclotomic n K = ∏ μ ∈ primitiveRoots n K, (X - C μ)`. ∈ particular,
`cyclotomic n K = cyclotomic' n K` -/
theorem cyclotomic_eq_prod_X_sub_primitiveRoots {K : Type*} [CommRing K] [IsDomain K] {ζ : K}
    {n : ℕ} (hz : IsPrimitiveRoot ζ n) : cyclotomic n K = ∏ μ ∈ primitiveRoots n K, (X - C μ)

{K : Type u_1}
[CommRing K]
[IsDomain K]
{ζ : K}
{n : ℕ}
(hz : IsPrimitiveRoot ζ n)

Polynomial.cyclotomic n K = ∏ μ ∈ primitiveRoots n K, (Polynomial.X - Polynomial.C μ)


theorem IsRelPrime.dvd_of_dvd_mul_right (H1 : IsRelPrime x z) (H2 : x ∣ y * z) : x ∣ y

{α : Type u_1}
[CommMonoid α]
{x y z : α}
[DecompositionMonoid α]
(H1 : IsRelPrime x z)
(H2 : x ∣ y * z)


theorem eq_top_iff' {p : Submodule R M} : p = ⊤ ↔ ∀ x, x ∈ p

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


/-- A subsemiring contains the semiring's 0. -/
protected theorem zero_mem : (0 : R) ∈ s

{R : Type u}
[NonAssocSemiring R]
(s : Subsemiring R)


/--
`mapCone` commutes with `postcompose`. In particular, for `F : J ⥤ C`, given a cone `c : Cone F`, a
natural transformation `α : F ⟶ G` and a functor `H : C ⥤ D`, we have two obvious ways of producing
a cone over `G ⋙ H`, and they are both isomorphic.
-/
@[simps!]
def mapConePostcompose {α : F ⟶ G} {c} :
    mapCone H ((Cones.postcompose α).obj c) ≅
      (Cones.postcompose (whiskerRight α H : _)).obj (mapCone H c)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F G : J ⥤ C}
{α : F ⟶ G}
{c : CategoryTheory.Limits.Cone F}

H.mapConePostcompose.hom.hom = 𝟙 (H.obj c.pt)


@[simp]
lemma smul_isUnit [Monoid M] [SMul M α] {m : M} (hm : IsUnit m) (a : α) : hm.unit • a = m • a

{M : Type u_3}
{α : Type u_5}
[Monoid M]
[SMul M α]
{m : M}
(hm : IsUnit m)
(a : α)


@[simp] protected theorem Fin.sizeOf (a : Fin n) : sizeOf a = a.val + 1


/-- The `i + j`-th element of a list coincides with the `j`-th element of the list obtained by
dropping the first `i` elements. Version designed to rewrite from the small list to the big list. -/
@[deprecated getElem_drop' (since := "2024-06-12")]
theorem get_drop' (L : List α) {i j} :
    get (L.drop i) j = get L ⟨i + j, by
      rw [Nat.add_comm]
      exact Nat.add_lt_of_lt_sub (length_drop i L ▸ j.2)⟩

{α : Type u_1}
(L : List α)
{i : Nat}
{j : Fin (List.drop i L).length}

(List.drop i L).get j = L.get ⟨i + ↑j, ⋯⟩


theorem Monotone.map_min (hf : Monotone f) : f (min a b) = min (f a) (f b)

{α : Type u}
{β : Type v}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
{a b : α}
(hf : Monotone f)


theorem map_apply_div_ne_zero {R F : Type*} [CommRing R] [IsDomain R]
    [FunLike F K[X] R[X]] [MonoidHomClass F K[X] R[X]]
    (φ : F) (hφ : K[X]⁰ ≤ R[X]⁰.comap φ) (p q : K[X]) (hq : q ≠ 0) :
    map φ hφ (algebraMap _ _ p / algebraMap _ _ q) =
      algebraMap _ _ (φ p) / algebraMap _ _ (φ q)

{K : Type u}
[CommRing K]
[IsDomain K]
{R : Type u_1}
{F : Type u_2}
[CommRing R]
[IsDomain R]
[FunLike F K[X] R[X]]
[MonoidHomClass F K[X] R[X]]
(φ : F)
(hφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰)
(p q : K[X])
(hq : q ≠ 0)

(RatFunc.map φ hφ) ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q) =
  (algebraMap R[X] (RatFunc R)) (φ p) / (algebraMap R[X] (RatFunc R)) (φ q)


@[simp, norm_cast] lemma natAbs_cast (n : ℕ) : natAbs ↑n = n


theorem compProdFun_iUnion (κ : Kernel α β) (η : Kernel (α × β) γ) [IsSFiniteKernel η] (a : α)
    (f : ℕ → Set (β × γ)) (hf_meas : ∀ i, MeasurableSet (f i))
    (hf_disj : Pairwise (Disjoint on f)) :
    compProdFun κ η a (⋃ i, f i) = ∑' i, compProdFun κ η a (f i)

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

(hf_meas : ∀ (i : ℕ), MeasurableSet (f i))

κ.compProdFun η a (⋃ i, f i) = ∑' (i : ℕ), κ.compProdFun η a (f i)


/-- A version of the law of total probability. -/
theorem cond_add_cond_compl_eq [IsFiniteMeasure μ] (hms : MeasurableSet s) :
    μ[t|s] * μ s + μ[t|sᶜ] * μ sᶜ = μ t

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)
{s t : Set Ω}
[MeasureTheory.IsFiniteMeasure μ]
(hms : MeasurableSet s)

(ProbabilityTheory.cond μ s) t * μ s + (ProbabilityTheory.cond μ sᶜ) t * μ sᶜ = μ t


/-- If `𝕜₁` is a normed field contained as subfield of a larger normed field `𝕜₂`, and if `a : A`
is an element whose `𝕜₂` spectrum restricts to `𝕜₁`, then the spectral radii over each scalar
field coincide. -/
lemma spectralRadius_eq {𝕜₁ 𝕜₂ A : Type*} [NormedField 𝕜₁] [NormedField 𝕜₂]
    [NormedRing A] [NormedAlgebra 𝕜₁ A] [NormedAlgebra 𝕜₂ A] [NormedAlgebra 𝕜₁ 𝕜₂]
    [IsScalarTower 𝕜₁ 𝕜₂ A] {f : 𝕜₂ → 𝕜₁} {a : A} (h : SpectrumRestricts a f) :
    spectralRadius 𝕜₁ a = spectralRadius 𝕜₂ a

{𝕜₁ : Type u_3}
{𝕜₂ : Type u_4}
{A : Type u_5}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
[NormedRing A]
[NormedAlgebra 𝕜₁ A]
[NormedAlgebra 𝕜₂ A]
[NormedAlgebra 𝕜₁ 𝕜₂]
[IsScalarTower 𝕜₁ 𝕜₂ A]
{f : 𝕜₂ → 𝕜₁}
{a : A}
(h : SpectrumRestricts a f)


@[simp]
theorem map_rat_algebraMap [Semiring R] [Semiring S] [Algebra ℚ R] [Algebra ℚ S] (f : R →+* S)
    (r : ℚ) : f (algebraMap ℚ R r) = algebraMap ℚ S r

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
[Algebra ℚ R]
[Algebra ℚ S]
(f : R →+* S)
(r : ℚ)

f ((algebraMap ℚ R) r) = (algebraMap ℚ S) r


@[simp]
theorem basicOpen_mul {U : Opens X} (f g : X.presheaf.obj (op U)) :
    X.basicOpen (f * g) = X.basicOpen f ⊓ X.basicOpen g

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}

(f g : ↑(X.presheaf.obj (Opposite.op U)))


theorem card_add (s t : Multiset α) : card (s + t) = card s + card t

Multiset.card (s + t) = Multiset.card s + Multiset.card t


theorem factors_self [Nontrivial α] {p : Associates α} (hp : Irreducible p) :
    p.factors = WithTop.some {⟨p, hp⟩}

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[Nontrivial α]
{p : Associates α}
(hp : Irreducible p)


theorem range_cons_empty (x : α) (u : Fin 0 → α) : Set.range (Matrix.vecCons x u) = {x}


lemma ae_compProd_iff [SFinite μ] [IsSFiniteKernel κ] {p : α × β → Prop}
    (hp : MeasurableSet {x | p x}) :
    (∀ᵐ x ∂(μ ⊗ₘ κ), p x) ↔ ∀ᵐ a ∂μ, ∀ᵐ b ∂(κ a), p (a, b)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{μ : MeasureTheory.Measure α}
{κ : ProbabilityTheory.Kernel α β}
[MeasureTheory.SFinite μ]
[ProbabilityTheory.IsSFiniteKernel κ]
{p : α × β → Prop}
(hp : MeasurableSet {x | p x})

(∀ᵐ (x : α × β) ∂μ ⊗ₘ κ, p x) ↔ ∀ᵐ (a : α) ∂μ, ∀ᵐ (b : β) ∂κ a, p (a, b)


theorem exists_rat_pow_btwn_rat (hn : n ≠ 0) {x y : ℚ} (h : x < y) (hy : 0 < y) :
    ∃ q : ℚ, 0 < q ∧ x < q ^ n ∧ q ^ n < y


@[to_additive (attr := simp)]
theorem id_comp (f : α →*o β) : (OrderMonoidHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(f : α →+o β)


theorem mul_adjugate (A : Matrix n n α) : A * adjugate A = A.det • (1 : Matrix n n α)

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


lemma CstarRing.norm_or_neg_norm_mem_spectrum [Nontrivial A] {a : A}
    (ha : IsSelfAdjoint a := by cfc_tac) : ‖a‖ ∈ spectrum ℝ a ∨ -‖a‖ ∈ spectrum ℝ a

{A : Type u_1}
[NormedRing A]
[StarRing A]
[CstarRing A]
[CompleteSpace A]
[NormedAlgebra ℂ A]
[StarModule ℂ A]
[Nontrivial A]
{a : A}
(ha : IsSelfAdjoint a := by cfc_tac)


theorem ret_supports {S k} (H₁ : contSupp k ⊆ S) : TM2.SupportsStmt S (tr (Λ'.ret k))

(H₁ : Turing.PartrecToTM2.contSupp k ⊆ S)

Turing.TM2.SupportsStmt S (Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret k))


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

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


theorem sqrtTwoAddSeries_two : sqrtTwoAddSeries 0 2 = √(2 + √2)


/-- The isomorphism between `incl ⋙ lift F _ _` with `F`. -/
@[simps!]
def inclLift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : incl ⋙ lift F M hM ≅ F

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (M x) (F.map f) = M y)

(CategoryTheory.WithInitial.inclLift F M hM).hom.app X =
  CategoryTheory.CategoryStruct.id
    (match CategoryTheory.WithInitial.incl.obj X with
    | CategoryTheory.WithInitial.of x => F.obj x
    | CategoryTheory.WithInitial.star => Z)


@[simp] lemma FGModuleCatDual_coe : (FGModuleCatDual K V : Type u) = Module.Dual K V

(K : Type u)
[Field K]
(V : FGModuleCat K)

↑(FGModuleCat.FGModuleCatDual K V) = Module.Dual K ↑V


theorem Basis.det_map' (b : Basis ι R M) (f : M ≃ₗ[R] M') :
    (b.map f).det = b.det.compLinearMap f.symm

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{M' : Type u_3}
[AddCommGroup M']
[Module R M']
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
(b : Basis ι R M)
(f : M ≃ₗ[R] M')

(b.map f).det = b.det.compLinearMap ↑f.symm


theorem map₂_right_comm {f : δ → γ → ε} {g : α → β → δ} {f' : α → γ → δ'} {g' : δ' → β → ε}
    (h_right_comm : ∀ a b c, f (g a b) c = g' (f' a c) b) :
    map₂ f (map₂ g a b) c = map₂ g' (map₂ f' a c) b

{f : δ → γ → ε}

{g : α → β → δ}

(h_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b)

Option.map₂ f (Option.map₂ g a b) c = Option.map₂ g' (Option.map₂ f' a c) b


@[simp]
theorem one_coeff_eq_of_pos (n : ℕ) (hn : 0 < n) : coeff (1 : 𝕎 R) n = 0

(p : ℕ)
(R : Type u_1)
[hp : Fact (Nat.Prime p)]
[CommRing R]
(n : ℕ)
(hn : 0 < n)


/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfOplax' (F : OplaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), ((CategoryTheory.Pseudofunctor.mkOfOplax' F).mapComp f g).hom = F.mapComp f g


theorem has_filtered_colimits_of_has_cofiltered_limits_op [HasCofilteredLimitsOfSize.{v₂, u₂} Cᵒᵖ] :
    HasFilteredColimitsOfSize.{v₂, u₂} C

[CategoryTheory.Limits.HasCofilteredLimitsOfSize.{v₂, u₂, v₁, u₁} Cᵒᵖ]

CategoryTheory.Limits.HasFilteredColimitsOfSize.{v₂, u₂, v₁, u₁} C


@[to_additive (attr := simp)]
lemma stabilizer_mul_eq_left [Group α] [IsScalarTower G α α] (a b : α)  :
    stabilizer G (a * b) = stabilizer G a

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
[AddGroup α]
[VAddAssocClass G α α]
(a b : α)

AddAction.stabilizer G (a + b) = AddAction.stabilizer G a


@[measurability]
lemma stronglyMeasurable_geometricPMFReal : StronglyMeasurable (geometricPMFReal p)


@[to_additive]
theorem mem_norm_comm {s : Set G} (hs : IsNormalSubgroup s) {a b : G} (hab : a * b ∈ s) :
    b * a ∈ s

{G : Type u_1}
[AddGroup G]
{s : Set G}
(hs : IsNormalAddSubgroup s)
{a b : G}
(hab : a + b ∈ s)


/--
The multiplicative congruences on `M` bijects to the multiplicative congruences on `Mᵐᵒᵖ`
-/
@[to_additive (attr := simps) "The additive congruences on `M` bijects to the additive congruences
on `Mᵃᵒᵖ`"]
def orderIsoOp : Con M ≃o Con Mᵐᵒᵖ

{M : Type u_1}
[Add M]
(c : AddCon Mᵃᵒᵖ)

(RelIso.symm AddCon.orderIsoOp) c = c.unop


@[to_additive Left.nsmul_neg_iff]
theorem Left.pow_lt_one_iff' [CovariantClass M M (· * ·) (· < ·)] {n : ℕ} {x : M} (hn : 0 < n) :
    x ^ n < 1 ↔ x < 1

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


theorem interior_preimage_im (s : Set ℝ) : interior (im ⁻¹' s) = im ⁻¹' interior s

interior (Complex.im ⁻¹' s) = Complex.im ⁻¹' interior s


/-- Augment a simplicial object with an object. -/
@[simps]
def augment (X : SimplicialObject C) (X₀ : C) (f : X _[0] ⟶ X₀)
    (w : ∀ (i : SimplexCategory) (g₁ g₂ : ([0] : SimplexCategory) ⟶ i),
      X.map g₁.op ≫ f = X.map g₂.op ≫ f) :
    SimplicialObject.Augmented C

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

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


@[simp]
theorem commutatorElement_one_left : ⁅(1 : G), g⁆ = 1


lemma Asymptotics.IsBigO.comp_summable {ι E F : Type*}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E]
    [NormedAddCommGroup F] [CompleteSpace F]
    {f : E → F} (hf : f =O[𝓝 0] id) {g : ι → E} (hg : Summable g) : Summable (f ∘ g)

{ι : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[NormedAddCommGroup F]
[CompleteSpace F]
{f : E → F}
(hf : f =O[𝓝 0] id)
{g : ι → E}
(hg : Summable g)


lemma Continuous.finset_inf' (hne : s.Nonempty) (hs : ∀ i ∈ s, Continuous (f i)) :
    Continuous (s.inf' hne f)

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeInf L]
[ContinuousInf L]
{s : Finset ι}
{f : ι → X → L}
(hne : s.Nonempty)
(hs : ∀ i ∈ s, Continuous (f i))


/-- A map `f : X → Y` is proper if and only if it is continuous and **universally closed**, in the
sense that for any topological space `Z`, the map `Prod.map f id : X × Z → Y × Z` is closed. Note
that `Z` lives in the same universe as `X` here, but `IsProperMap.universally_closed` does not
have this restriction.

This is taken as the definition of properness in
[N. Bourbaki, *General Topology*][bourbaki1966]. -/
theorem isProperMap_iff_universally_closed {X : Type u} {Y : Type v} [TopologicalSpace X]
    [TopologicalSpace Y] {f : X → Y} :
    IsProperMap f ↔ Continuous f ∧ ∀ (Z : Type u) [TopologicalSpace Z],
      IsClosedMap (Prod.map f id : X × Z → Y × Z)

IsProperMap f ↔ Continuous f ∧ ∀ (Z : Type u) [inst : TopologicalSpace Z], IsClosedMap (Prod.map f id)


/-- **Helly's theorem** for finite sets of convex sets.

If `F` is a finite set of convex sets in a vector space of finite dimension `d`, and any `k ≤ d + 1`
sets from `F` intersect nontrivially, then all sets from `F` intersect nontrivially. -/
theorem helly_theorem_set' {F : Finset (Set E)}
    (h_convex : ∀ X ∈ F, Convex 𝕜 X)
    (h_inter : ∀ G : Finset (Set E), G ⊆ F → G.card ≤ finrank 𝕜 E + 1 → (⋂₀ G : Set E).Nonempty) :
    (⋂₀ (F : Set (Set E))).Nonempty

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


theorem ext_iff (A B : SpecialLinearGroup n R) : A = B ↔ ∀ i j, ↑ₘA i j = ↑ₘB i j

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A B : Matrix.SpecialLinearGroup n R)


@[simp] lemma coe_constVAdd (v : G) : ⇑(constVAdd P v) = (v +ᵥ ·)

{G : Type u_1}
(P : Type u_2)
[AddGroup G]
[AddTorsor G P]
(v : G)

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


/-- Let `B` be a real number. The set of algebraic integers in `K` whose conjugates are all
smaller in norm than `B` is finite. -/
theorem finite_of_norm_le (B : ℝ) : {x : K | IsIntegral ℤ x ∧ ∀ φ : K →+* A, ‖φ x‖ ≤ B}.Finite

(K : Type u_1)
[Field K]
[NumberField K]
(A : Type u_2)
[NormedField A]
[IsAlgClosed A]
[NormedAlgebra ℚ A]
(B : ℝ)

{x | IsIntegral ℤ x ∧ ∀ (φ : K →+* A), ‖φ x‖ ≤ B}.Finite


/-- This is not an instance to avoid type class inference loops. See
`WeakDual.Complex.instStarHomClass`. -/
lemma _root_.AlgHomClass.instStarAlgHomClass : StarAlgHomClass F ℂ A ℂ

{F : Type u_1}
{A : Type u_2}
[NormedRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
[FunLike F A ℂ]
[hF : AlgHomClass F ℂ A ℂ]


/-- Let `r` be a well-founded relation on `α`, let `C : α → Prop`, and let `bot : α`.
This induction principle shows that `C bot` holds, given that
* some `a` satisfies `C a`, and
* for each `b` that satisfies `C b`, there is `c` satisfying `r c b` and `C c`.

The naming is inspired by the fact that when `r` is transitive, it follows that `bot` is
the smallest element w.r.t. `r` that satisfies `C`. -/
theorem WellFounded.induction_bot {α} {r : α → α → Prop} (hwf : WellFounded r) {a bot : α}
    {C : α → Prop} (ih : ∀ b, b ≠ bot → C b → ∃ c, r c b ∧ C c) : C a → C bot

(ih : ∀ (b : α), b ≠ bot → C b → ∃ c, r c b ∧ C c)


@[to_additive (attr := simp)]
theorem coprod_apply (p : M × N) : f.coprod g p = f p.1 * g p.2

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Add M]
[Add N]
[AddCommSemigroup P]
(f : AddHom M P)
(g : AddHom N P)
(p : M × N)


theorem HasGradientAt.continuousAt (h : HasGradientAt f f' x) : ContinuousAt f x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
(h : HasGradientAt f f' x)


lemma comapOn_dual_eq_of_bijOn (h : BijOn f E N.E) :
    (N.comapOn E f)✶ = N✶.comapOn E f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{N : Matroid β}
{E : Set α}
(h : Set.BijOn f E N.E)


@[fun_prop]
theorem Differentiable.continuous (h : Differentiable 𝕜 f) : Continuous f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(h : Differentiable 𝕜 f)


lemma curry_two_eq_curry {α β : Type u} (f : ((i : Fin 2) → α) → β) :
    curry f = Function.curry (f ∘ (finTwoArrowEquiv α).symm)

Function.OfArity.curry f = Function.curry (f ∘ ⇑(finTwoArrowEquiv α).symm)


theorem intCast (x : ℤ) : (x : PerfectClosure K p) = mk K p (0, x)

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


lemma small_max (α : Type v) : Small.{max w v} α


/-- Two maps from a wide coequalizer are equal if they are equal when composed with the wide
    coequalizer map -/
@[ext]
theorem wideCoequalizer.hom_ext [Nonempty J] {W : C} {k l : wideCoequalizer f ⟶ W}
    (h : wideCoequalizer.π f ≫ k = wideCoequalizer.π f ≫ l) : k = l

{k l : CategoryTheory.Limits.wideCoequalizer f ⟶ W}

(h :
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.wideCoequalizer.π f) k =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.wideCoequalizer.π f) l)


@[simp]
theorem ker_algebraMap_end (K : Type u) (V : Type v) [Field K] [AddCommGroup V] [Module K V] (a : K)
    (ha : a ≠ 0) : LinearMap.ker ((algebraMap K (End K V)) a) = ⊥

LinearMap.ker ((algebraMap K (Module.End K V)) a) = ⊥


theorem pairwise_isRelPrime_iff_isRelPrime_prod [DecidableEq I] :
    Pairwise (IsRelPrime on fun i : t ↦ s i) ↔ ∀ i ∈ t, IsRelPrime (s i) (∏ j ∈ t \ {i}, s j)

{α : Type u_2}
{I : Type u_1}
[CommMonoid α]
[DecompositionMonoid α]
{s : I → α}
{t : Finset I}
[DecidableEq I]

Pairwise (IsRelPrime on fun i => s ↑i) ↔ ∀ i ∈ t, IsRelPrime (s i) (∏ j ∈ t \ {i}, s j)


@[to_additive]
theorem prod_eq_prod_Ico_succ_bot {a b : ℕ} (hab : a < b) (f : ℕ → M) :
    ∏ k ∈ Ico a b, f k = f a * ∏ k ∈ Ico (a + 1) b, f k

{M : Type u_2}
[AddCommMonoid M]
{a b : ℕ}
(hab : a < b)
(f : ℕ → M)

∑ k ∈ Finset.Ico a b, f k = f a + ∑ k ∈ Finset.Ico (a + 1) b, f k


@[simp]
theorem ciSup_unique [Unique ι] {s : ι → α} : ⨆ i, s i = s default

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Unique ι]
{s : ι → α}


@[simp] theorem append_eq_append (arr arr' : Array α) : arr.append arr' = arr ++ arr'


/-- If `μ` has finite spanning sets in the collection of measurable sets `C`, then `μ` is σ-finite.
-/
protected theorem sigmaFinite (h : μ.FiniteSpanningSetsIn C) : SigmaFinite μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{C : Set (Set α)}
(h : μ.FiniteSpanningSetsIn C)


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

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


@[simp]
theorem natDegree_restriction {p : R[X]} : (restriction p).natDegree = p.natDegree


/-- Two `LieModuleHom`s from a quotient lie module are equal if their compositions with
`LieSubmodule.Quotient.mk'` are equal.

See note [partially-applied ext lemmas]. -/
@[ext]
theorem lieModuleHom_ext ⦃f g : M ⧸ N →ₗ⁅R,L⁆ M⦄ (h : f.comp (mk' N) = g.comp (mk' N)) : f = g

(h : f.comp (LieSubmodule.Quotient.mk' N) = g.comp (LieSubmodule.Quotient.mk' N))


@[simp]
theorem ofLeftInverse_apply {g : B → A} {f : A →ₐ[R] B} (h : Function.LeftInverse g f) (x : A) :
    ↑(ofLeftInverse h x) = f x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
{g : B → A}
{f : A →ₐ[R] B}
(h : Function.LeftInverse g ⇑f)
(x : A)


@[simp]
theorem encode_prod_val (a b) : @encode (α × β) _ (a, b) = pair (encode a) (encode b)

{α : Type u_1}
{β : Type u_2}
[Encodable α]
[Encodable β]
(a : α)
(b : β)

Encodable.encode (a, b) = Nat.pair (Encodable.encode a) (Encodable.encode b)


/-- Reinterpret an infimum homomorphism as a supremum homomorphism between the dual lattices. -/
@[simps]
protected def dual : InfHom α β ≃ SupHom αᵒᵈ βᵒᵈ

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Inf β]
(f : InfHom α β)
(a : α)


theorem IsClosed.isGδ {X : Type*} [UniformSpace X] [IsCountablyGenerated (𝓤 X)] {s : Set X}
    (hs : IsClosed s) : IsGδ s

{X : Type u_5}
[UniformSpace X]
[(𝓤 X).IsCountablyGenerated]
{s : Set X}
(hs : IsClosed s)


/-- Given a basis, the `i`th element of the dual basis evaluates to the Kronecker delta on the
`j`th element of the basis. -/
theorem mk_coord_apply [DecidableEq ι] {i j : ι} :
    (Basis.mk hli hsp).coord i (v j) = if j = i then 1 else 0

{hsp : ⊤ ≤ Submodule.span R (Set.range v)}

((Basis.mk hli hsp).coord i) (v j) = if j = i then 1 else 0


@[to_additive]
theorem rank_congr {H K : Subgroup G} [Group.FG H] [Group.FG K] (h : H = K) :
    Group.rank H = Group.rank K

{G : Type u_3}
[Group G]
{H K : Subgroup G}
[Group.FG ↥H]
[Group.FG ↥K]
(h : H = K)


theorem DifferentiableAt.finset_prod (hd : ∀ i ∈ u, DifferentiableAt 𝕜 (f i) x) :
    DifferentiableAt 𝕜 (∏ i ∈ u, f i ·) x

{f : ι → 𝕜 → 𝔸'}

DifferentiableAt 𝕜 (fun x => ∏ i ∈ u, f i x) x


theorem zipWithAll_map {μ} (f : Option γ → Option δ → μ) (g : α → γ) (h : β → δ) (l₁ : List α) (l₂ : List β) :
    zipWithAll f (l₁.map g) (l₂.map h) = zipWithAll (fun a b => f (g <$> a) (h <$> b)) l₁ l₂

{γ : Type u_1}
{δ : Type u_2}
{α : Type u_1}
{β : Type u_2}
{μ : Type u_3}
(f : Option γ → Option δ → μ)
(g : α → γ)
(h : β → δ)
(l₁ : List α)
(l₂ : List β)

List.zipWithAll f (List.map g l₁) (List.map h l₂) = List.zipWithAll (fun a b => f (g <$> a) (h <$> b)) l₁ l₂


@[simp]
theorem toMeasure_toPMF : p.toMeasure.toPMF = p

{α : Type u_1}
[Countable α]
[MeasurableSpace α]
[MeasurableSingletonClass α]
(p : PMF α)


theorem _root_.LieSubmodule.isNilpotent_iff_exists_lcs_eq_bot (N : LieSubmodule R L M) :
    LieModule.IsNilpotent R L N ↔ ∃ k, N.lcs k = ⊥

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

LieModule.IsNilpotent R L ↥↑N ↔ ∃ k, LieSubmodule.lcs k N = ⊥


protected theorem aemeasurable (hf : QuasiMeasurePreserving f μa μb) : AEMeasurable f μa

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


theorem map_volume_mul_right {a : ℝ} (h : a ≠ 0) :
    Measure.map (· * a) volume = ENNReal.ofReal |a⁻¹| • volume

MeasureTheory.Measure.map (fun x => x * a) MeasureTheory.volume = ENNReal.ofReal |a⁻¹| • MeasureTheory.volume


theorem uniformContinuous_uncurry_lift₂ {f : α → β → γ}
    (h : ∀ a c b d, Inseparable a b → Inseparable c d → f a c = f b d) :
    UniformContinuous (uncurry <| lift₂ f h) ↔ UniformContinuous (uncurry f)

{f : α → β → γ}

(h : ∀ (a : α) (c : β) (b : α) (d : β), Inseparable a b → Inseparable c d → f a c = f b d)

UniformContinuous (Function.uncurry (SeparationQuotient.lift₂ f h)) ↔ UniformContinuous (Function.uncurry f)


@[simp]
theorem mk_eq_top_iff [OrderTop α] [OrderTop (Subtype p)] (htop : p ⊤) {x : α} (hx : p x) :
    (⟨x, hx⟩ : Subtype p) = ⊤ ↔ x = ⊤

{α : Type u}
{p : α → Prop}
[PartialOrder α]
[OrderTop α]
[OrderTop (Subtype p)]
(htop : p ⊤)
{x : α}
(hx : p x)


@[to_additive]
protected theorem mul_eq_one_iff : f * g = 1 ↔ ∃ a b, f = pure a ∧ g = pure b ∧ a * b = 1

{α : Type u_2}
[SubtractionMonoid α]
{f g : Filter α}

f + g = 0 ↔ ∃ a b, f = pure a ∧ g = pure b ∧ a + b = 0


/-- The functor `RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def RightExtension.precomp : RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)

(X : CategoryTheory.Comma ((CategoryTheory.whiskeringLeft C D H).obj L) (CategoryTheory.Functor.fromPUnit F))

((CategoryTheory.Functor.RightExtension.precomp L F G).obj X).left = X.left


@[simp]
theorem subgroup_to_sl_moeb (A : Γ) (z : ℍ) : A • z = (A : SL(2, ℤ)) • z

(Γ : Subgroup SL(2, ℤ))
(A : ↥Γ)
(z : ℍ)


theorem mem_diff_singleton_empty {t : Set (Set α)} : s ∈ t \ {∅} ↔ s ∈ t ∧ s.Nonempty

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


theorem isNat_ofScientific_of_false [DivisionRing α] : {m e nm ne n : ℕ} →
    IsNat m nm → IsNat e ne → n = Nat.mul nm ((10 : ℕ) ^ ne) →
    IsNat (OfScientific.ofScientific m false e : α) n

{α : Type u_1}
[DivisionRing α]
{m e nm ne n : ℕ}

Mathlib.Meta.NormNum.IsNat m nm →
  Mathlib.Meta.NormNum.IsNat e ne →
    n = nm.mul (10 ^ ne) → Mathlib.Meta.NormNum.IsNat (OfScientific.ofScientific m false e) n


/-- A preconnected set is either one of the intervals `Icc`, `Ico`, `Ioc`, `Ioo`, `Ici`, `Ioi`,
`Iic`, `Iio`, or `univ`, or `∅`. The converse statement requires `α` to be densely ordered. Though
one can represent `∅` as `(Inf ∅, Inf ∅)`, we include it into the list of possible cases to improve
readability. -/
theorem setOf_isPreconnected_subset_of_ordered :
    { s : Set α | IsPreconnected s } ⊆
      -- bounded intervals
      (range (uncurry Icc) ∪ range (uncurry Ico) ∪ range (uncurry Ioc) ∪ range (uncurry Ioo)) ∪
      -- unbounded intervals and `univ`
      (range Ici ∪ range Ioi ∪ range Iic ∪ range Iio ∪ {univ, ∅})

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]

{s | IsPreconnected s} ⊆
  Set.range (Function.uncurry Set.Icc) ∪ Set.range (Function.uncurry Set.Ico) ∪ Set.range (Function.uncurry Set.Ioc) ∪
      Set.range (Function.uncurry Set.Ioo) ∪
    (Set.range Set.Ici ∪ Set.range Set.Ioi ∪ Set.range Set.Iic ∪ Set.range Set.Iio ∪ {Set.univ, ∅})


lemma δ_v (hnm : n + 1 = m) (z : Cochain F G n) (p q : ℤ) (hpq : p + m = q) (q₁ q₂ : ℤ)
    (hq₁ : q₁ = q - 1) (hq₂ : p + 1 = q₂) : (δ n m z).v p q hpq =
    z.v p q₁ (by rw [hq₁, ← hpq, ← hnm, ← add_assoc, add_sub_cancel_right]) ≫ G.d q₁ q
      + m.negOnePow • F.d p q₂ ≫ z.v q₂ q
          (by rw [← hq₂, add_assoc, add_comm 1, hnm, hpq])

(z : CochainComplex.HomComplex.Cochain F G n)

(CochainComplex.HomComplex.δ n m z).v p q hpq = z.v p q₁ ⋯ ≫ G.d q₁ q + m.negOnePow • F.d p q₂ ≫ z.v q₂ q ⋯


theorem WCovBy.ge_of_gt (hab : a ⩿ b) (hac : a < c) : b ≤ c

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(hab : a ⩿ b)
(hac : a < c)


@[to_additive]
theorem closure_singleton_one : closure ({1} : Set G) = ⊥


theorem mk'_eq_iff_eq {x₁ x₂} {y₁ y₂ : M} :
    mk' S x₁ y₁ = mk' S x₂ y₂ ↔ algebraMap R S (y₂ * x₁) = algebraMap R S (y₁ * x₂)

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

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


theorem disjoint_of_disjoint_append_left_left (d : Disjoint (l₁ ++ l₂) l) : Disjoint l₁ l

∀ {α : Type u_1} {l₁ l₂ l : List α}, (l₁ ++ l₂).Disjoint l → l₁.Disjoint l


@[simp]
theorem mapRange_id : v.mapRange (AddMonoidHom.id M) continuous_id = v

{α : Type u_1}
[MeasurableSpace α]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)


@[to_additive]
theorem div_ae_eq_one {β} [Group β] (f g : α → β) : f / g =ᵐ[μ] 1 ↔ f =ᵐ[μ] g

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_7}
[AddGroup β]
(f g : α → β)


protected theorem continuous_of_continuousAt_zero [TopologicalSpace E] [TopologicalAddGroup E]
    {p : Seminorm 𝕝 E} (hp : ContinuousAt p 0) : Continuous p

{𝕝 : Type u_6}
{E : Type u_7}
[SeminormedRing 𝕝]
[AddCommGroup E]
[Module 𝕝 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
{p : Seminorm 𝕝 E}
(hp : ContinuousAt (⇑p) 0)


theorem const_ext {f₁ f₂ g₁ g₂ : R} {U hu₁ hu₂} (h : f₁ * g₂ = f₂ * g₁) :
    const R f₁ g₁ U hu₁ = const R f₂ g₂ U hu₂

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

{hu₁ : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl}

{hu₂ : ∀ x ∈ U, g₂ ∈ x.asIdeal.primeCompl}

AlgebraicGeometry.StructureSheaf.const R f₁ g₁ U hu₁ = AlgebraicGeometry.StructureSheaf.const R f₂ g₂ U hu₂


theorem lowerSemicontinuousAt_const : LowerSemicontinuousAt (fun _x => z) x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{x : α}
{z : β}


theorem ceil_add_nat (ha : 0 ≤ a) (n : ℕ) : ⌈a + n⌉₊ = ⌈a⌉₊ + n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
(ha : 0 ≤ a)
(n : ℕ)

⌈a + ↑n⌉₊ = ⌈a⌉₊ + n


theorem Summable.op (hf : Summable f) : Summable (op ∘ f)

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


lemma abs_lt_iff_mul_self_lt : |a| < |b| ↔ a * a < b * b

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


theorem multiset_map_sum [Zero M] {f : α →₀ M} {m : β → γ} {h : α → M → Multiset β} :
    Multiset.map m (f.sum h) = f.sum fun a b => (h a b).map m

{α : Type u_1}
{γ : Type u_3}
{β : Type u_7}
{M : Type u_8}
[Zero M]
{f : α →₀ M}
{m : β → γ}
{h : α → M → Multiset β}

Multiset.map m (f.sum h) = f.sum fun a b => Multiset.map m (h a b)


@[simp]
theorem eraseIdx_eq_self : ∀ {l : List α} {k : Nat}, eraseIdx l k = l ↔ length l ≤ k


lemma ker_surjective : Surjective (ker : Filter α → Set α)


@[to_additive]
protected lemma IsOfFinOrder.orderOf_pow (h : IsOfFinOrder x) :
    orderOf (x ^ n) = orderOf x / gcd (orderOf x) n

{G : Type u_1}
[AddMonoid G]
(x : G)
(n : ℕ)
(h : IsOfFinAddOrder x)

addOrderOf (n • x) = addOrderOf x / (addOrderOf x).gcd n


theorem xn_modEq_x2n_add (n j) : xn a1 (2 * n + j) + xn a1 j ≡ 0 [MOD xn a1 n]

Pell.xn a1 (2 * n + j) + Pell.xn a1 j ≡ 0 [MOD Pell.xn a1 n]


@[simp, norm_cast]
theorem coe_map (f : E →L[ℝ] F) (K : ProperCone ℝ E) :
    ↑(K.map f) = (PointedCone.map (f : E →ₗ[ℝ] F) ↑K).closure

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{F : Type u_2}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(f : E →L[ℝ] F)
(K : ProperCone ℝ E)

↑(ProperCone.map f K) = (PointedCone.map ↑f ↑K).closure


@[simp]
lemma star_lt_one_iff {x : R} : star x < 1 ↔ x < 1

{R : Type u}
[Semiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x : R}


@[reassoc]
theorem δ_comp_δ_self' {n} {i : Fin (n + 2)} {j : Fin (n + 3)} (H : j = Fin.castSucc i) :
    X.δ i ≫ X.δ j = X.δ i ≫ X.δ i.succ

(X : CategoryTheory.CosimplicialObject C)


theorem Subalgebra.isSimpleOrder_of_finrank_prime (F A) [Field F] [Ring A] [IsDomain A]
    [Algebra F A] (hp : (finrank F A).Prime) : IsSimpleOrder (Subalgebra F A)

(hp : Nat.Prime (FiniteDimensional.finrank F A))


@[simp]
theorem norm_toContinuousLinearMap [Nontrivial E] [RingHomIsometric σ₁₂] (f : E →ₛₗᵢ[σ₁₂] F) :
    ‖f.toContinuousLinearMap‖ = 1

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[Nontrivial E]
[RingHomIsometric σ₁₂]
(f : E →ₛₗᵢ[σ₁₂] F)


@[fun_prop]
theorem hasStrictFDerivAt_apply (i : ι) (f : ∀ i, F' i) :
    HasStrictFDerivAt (𝕜 := 𝕜) (fun f : ∀ i, F' i => f i) (proj i) f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
(i : ι)
(f : (i : ι) → F' i)

HasStrictFDerivAt (fun f => f i) (ContinuousLinearMap.proj i) f


theorem sum_add_index {S : Type*} [AddCommMonoid S] (p q : R[X]) (f : ℕ → R → S)
    (hf : ∀ i, f i 0 = 0) (h_add : ∀ a b₁ b₂, f a (b₁ + b₂) = f a b₁ + f a b₂) :
    (p + q).sum f = p.sum f + q.sum f

(h_add : ∀ (a : ℕ) (b₁ b₂ : R), f a (b₁ + b₂) = f a b₁ + f a b₂)


@[simp] lemma one_le_ofENat {n : ℕ∞} : 1 ≤ (n : Cardinal) ↔ 1 ≤ n

1 ≤ ↑n ↔ 1 ≤ n


theorem AlgEquiv.isSeparable_iff : Algebra.IsSeparable F K ↔ Algebra.IsSeparable F E

{F : Type u_1}
{K : Type u_2}
[CommRing F]
[Ring K]
[Algebra F K]
{E : Type u_3}
[Ring E]
[Algebra F E]
(e : K ≃ₐ[F] E)


theorem abs_rpow_le_exp_log_mul (x y : ℝ) : |x ^ y| ≤ exp (log x * y)


protected lemma HasBasis.congr (hl : l.HasBasis p s) {p' s'} (hp : ∀ i, p i ↔ p' i)
    (hs : ∀ i, p i → s i = s' i) : l.HasBasis p' s'

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(hl : l.HasBasis p s)
{p' : ι → Prop}
{s' : ι → Set α}
(hp : ∀ (i : ι), p i ↔ p' i)
(hs : ∀ (i : ι), p i → s i = s' i)


/-- Order without top elements. -/
class NoTopOrder (α : Type*) [LE α] : Prop where
  /-- For each term `a`, there is some `b` which is either incomparable or strictly larger. -/
  exists_not_le (a : α) : ∃ b, ¬b ≤ a

{α : Type u_3}
[LE α]
[self : NoTopOrder α]
(a : α)


@[simp]
theorem _root_.LieModuleHom.coe_restrictLie (f : M →ₗ⁅R,L⁆ N) : ⇑(f.restrictLie L') = f

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(L' : LieSubalgebra R L)
{M : Type w}
[AddCommGroup M]
[LieRingModule L M]
{N : Type w₁}
[AddCommGroup N]
[LieRingModule L N]
[Module R N]
[Module R M]
(f : M →ₗ⁅R,L⁆ N)


theorem _root_.String.validFor_mkIterator (s) : (mkIterator s).ValidFor [] s.1

String.Iterator.ValidFor [] s.data s.mkIterator


@[to_additive]
theorem smul_union : s • (t₁ ∪ t₂) = s • t₁ ∪ s • t₂

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


/-- Symmetric statement to `Finset.image_image₂_antidistrib_left`. -/
theorem image₂_image_left_anticomm {f : α' → β → γ} {g : α → α'} {f' : β → α → δ} {g' : δ → γ}
    (h_left_anticomm : ∀ a b, f (g a) b = g' (f' b a)) :
    image₂ f (s.image g) t = (image₂ f' t s).image g'

{f : α' → β → γ}

{f' : β → α → δ}

(h_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a))

Finset.image₂ f (Finset.image g s) t = Finset.image g' (Finset.image₂ f' t s)


theorem tendsto_units {γ₀ : Γ₀ˣ} : Tendsto f l (𝓝 (γ₀ : Γ₀)) ↔ ∀ᶠ x in l, f x = γ₀

{α : Type u_1}
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
{l : Filter α}
{f : α → Γ₀}
{γ₀ : Γ₀ˣ}

Filter.Tendsto f l (𝓝 ↑γ₀) ↔ ∀ᶠ (x : α) in l, f x = ↑γ₀


/-- If a function `f` is continuous on a convex set `D ⊆ ℝ`, is twice differentiable on its
interior, and `f''` is nonpositive on the interior, then `f` is concave on `D`. -/
theorem concaveOn_of_deriv2_nonpos {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ} (hf : ContinuousOn f D)
    (hf' : DifferentiableOn ℝ f (interior D)) (hf'' : DifferentiableOn ℝ (deriv f) (interior D))
    (hf''_nonpos : ∀ x ∈ interior D, deriv^[2] f x ≤ 0) : ConcaveOn ℝ D f


@[mono]
theorem hasSum_strict_mono {f g : α → ℝ≥0} {sf sg : ℝ≥0} (hf : HasSum f sf) (hg : HasSum g sg)
    (h : f < g) : sf < sg

{α : Type u_1}
{f g : α → ℝ≥0}
{sf sg : ℝ≥0}
(hf : HasSum f sf)
(hg : HasSum g sg)
(h : f < g)


theorem image_minimals_univ :
    Subtype.val '' minimals (· ≤ ·) (univ : Set s) = minimals (· ≤ ·) s

Subtype.val '' minimals (fun x x_1 => x ≤ x_1) Set.univ = minimals (fun x x_1 => x ≤ x_1) s


theorem List.norm_prod_le [NormOneClass α] : ∀ l : List α, ‖l.prod‖ ≤ (l.map norm).prod

{α : Type u_1}
[SeminormedRing α]
[NormOneClass α]
(l : List α)


/-- Alias of `mul_le_one'` for unification. -/
theorem mul_le_one₀ (ha : a ≤ 1) (hb : b ≤ 1) : a * b ≤ 1

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b : α}
(ha : a ≤ 1)
(hb : b ≤ 1)


@[simp, norm_cast]
theorem coe_toAddMonoidHom (f : A →ₐ[R] B) : ⇑(f : A →+ B) = f

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


theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = s(x, y)

{α : Type u_1}
{x y : α}
{z : Sym2 α}
(hne : x ≠ y)


theorem prev_getLast_cons' (y : α) (hxy : x ∈ y :: l) (hx : x = y) :
    prev (y :: l) x hxy = getLast (y :: l) (cons_ne_nil _ _)

{α : Type u_1}
[DecidableEq α]
(l : List α)
(x y : α)
(hxy : x ∈ y :: l)
(hx : x = y)

(y :: l).prev x hxy = (y :: l).getLast ⋯


theorem isPWO_iUnion_support (s : SummableFamily Γ R α) : Set.IsPWO (⋃ a : α, (s a).support)

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}
(s : HahnSeries.SummableFamily Γ R α)


theorem argmin_le (a : α) [Nonempty α] : f (argmin f h) ≤ f a

{α : Type u_1}
{β : Type u_2}
(f : α → β)
[LinearOrder β]
(h : WellFounded fun x x_1 => x < x_1)
(a : α)
[Nonempty α]


theorem toPEquiv_trans (f : α ≃ β) (g : β ≃ γ) :
    (f.trans g).toPEquiv = f.toPEquiv.trans g.toPEquiv

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α ≃ β)
(g : β ≃ γ)


theorem swap_mul_eq_iff {i j : α} {σ : Perm α} : swap i j * σ = σ ↔ i = j

{α : Type u}
[DecidableEq α]
{i j : α}
{σ : Equiv.Perm α}


@[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_mk' (x y) :
    (mulEquivOfQuotient f).symm (f.mk' x y) = (monoidOf S).mk' x y

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

(Localization.mulEquivOfQuotient f).symm (f.mk' x y) = (Localization.monoidOf S).mk' x y


@[simp]
theorem max_self (a : α) : max a a = a


@[ext]
theorem ext {x y : 𝕎 R} (h : ∀ n, x.coeff n = y.coeff n) : x = y

{p : ℕ}
{R : Type u_1}
{x y : 𝕎 R}
(h : ∀ (n : ℕ), x.coeff n = y.coeff n)


theorem mem_prodMap {f : α →. γ} {g : β →. δ} {x : α × β} {y : γ × δ} :
    y ∈ f.prodMap g x ↔ y.1 ∈ f x.1 ∧ y.2 ∈ g x.2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : α →. γ}
{g : β →. δ}
{x : α × β}
{y : γ × δ}


protected theorem continuousOn (hf : HolderOnWith C r f s) (h0 : 0 < r) : ContinuousOn f s

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
{s : Set X}
(hf : HolderOnWith C r f s)
(h0 : 0 < r)


theorem drop_zip (n : ℕ) (s₁ : Stream' α) (s₂ : Stream' β) :
    drop n (zip f s₁ s₂) = zip f (drop n s₁) (drop n s₂)

{α : Type u}
{β : Type v}
{δ : Type w}
(f : α → β → δ)
(n : ℕ)
(s₁ : Stream' α)
(s₂ : Stream' β)

Stream'.drop n (Stream'.zip f s₁ s₂) = Stream'.zip f (Stream'.drop n s₁) (Stream'.drop n s₂)


/-- An add-regular element is an element `c` such that addition by `c` both on the left and
on the right is injective. -/
structure IsAddRegular {R : Type*} [Add R] (c : R) : Prop where
  /-- An add-regular element `c` is left-regular -/
  left : IsAddLeftRegular c -- Porting note: It seems like to_additive is misbehaving
  /-- An add-regular element `c` is right-regular -/
  right : IsAddRightRegular c

{R : Type u_2}
[Add R]
{c : R}
(self : IsAddRegular c)


@[simp]
theorem toIocMod_toIocMod (a₁ a₂ b : α) : toIocMod hp a₁ (toIocMod hp a₂ b) = toIocMod hp a₁ b

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


theorem Iso.conj_eq_conj {V W : FGModuleCat R} (i : V ≅ W) (f : End V) :
    Iso.conj i f = LinearEquiv.conj (isoToLinearEquiv i) f

(R : Type u)
[CommRing R]
{V W : FGModuleCat R}
(i : V ≅ W)
(f : CategoryTheory.End V)

i.conj f = (FGModuleCat.isoToLinearEquiv i).conj f


@[simp] theorem run_seqRight [Monad m] (x : ReaderT ρ m α) (y : ReaderT ρ m β) (ctx : ρ)
    : (x *> y).run ctx = (x.run ctx *> y.run ctx)

{m : Type u_1 → Type u_2}
{ρ α β : Type u_1}
[Monad m]
(x : ReaderT ρ m α)
(y : ReaderT ρ m β)
(ctx : ρ)

(SeqRight.seqRight x fun x => y).run ctx = SeqRight.seqRight (x.run ctx) fun x => y.run ctx


@[simp]
theorem comm_tmul (a : A) (b : B) :
    TensorProduct.comm R A B (a ⊗ₜ b) = b ⊗ₜ a

(R : Type uR)
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
(a : A)
(b : B)

(Algebra.TensorProduct.comm R A B) (a ⊗ₜ[R] b) = b ⊗ₜ[R] a


@[simp] lemma bddAbove_smul_iff_of_pos (ha : 0 < a) : BddAbove (a • s) ↔ BddAbove s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[GroupWithZero α]
[Zero β]
[MulActionWithZero α β]
[PosSMulMono α β]
[PosSMulReflectLE α β]
{s : Set β}
{a : α}
(ha : 0 < a)


@[simp]
theorem snd_imI_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
    (dualNumberEquiv.symm d).imI.snd = d.snd.imI

{R : Type u_1}
[CommRing R]
(d : DualNumber (Quaternion R))

TrivSqZeroExt.snd (Quaternion.dualNumberEquiv.symm d).imI = (TrivSqZeroExt.snd d).imI


theorem tendsto_rpow_abs_mul_exp_neg_mul_sq_cocompact {a : ℝ} (ha : 0 < a) (s : ℝ) :
    Tendsto (fun x : ℝ => |x| ^ s * rexp (-a * x ^ 2)) (cocompact ℝ) (𝓝 0)

Filter.Tendsto (fun x => |x| ^ s * rexp (-a * x ^ 2)) (Filter.cocompact ℝ) (𝓝 0)


/-- See also `Cardinal.aleph0_le_mul_iff'`. -/
theorem aleph0_le_mul_iff' {a b : Cardinal.{u}} : ℵ₀ ≤ a * b ↔ a ≠ 0 ∧ ℵ₀ ≤ b ∨ ℵ₀ ≤ a ∧ b ≠ 0

Cardinal.aleph0 ≤ a * b ↔ a ≠ 0 ∧ Cardinal.aleph0 ≤ b ∨ Cardinal.aleph0 ≤ a ∧ b ≠ 0


@[simp]
theorem ofBoolRing_zero : ofBoolRing (0 : AsBoolRing α) = ⊥


@[to_additive]
theorem prod_Ico_succ_top {a b : ℕ} (hab : a ≤ b) (f : ℕ → M) :
    (∏ k ∈ Ico a (b + 1), f k) = (∏ k ∈ Ico a b, f k) * f b

{M : Type u_2}
[AddCommMonoid M]
{a b : ℕ}
(hab : a ≤ b)
(f : ℕ → M)

∑ k ∈ Finset.Ico a (b + 1), f k = ∑ k ∈ Finset.Ico a b, f k + f b


theorem rightInvSeq_concat (ω : List B) (i : B) :
    ris (ω.concat i) = (List.map (MulAut.conj (s i)) (ris ω)).concat (s i)

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

cs.rightInvSeq (ω.concat i) = (List.map (⇑(MulAut.conj (cs.simple i))) (cs.rightInvSeq ω)).concat (cs.simple i)


/-- The measure of the intersection of a decreasing sequence of measurable
sets indexed by a linear order with first countable topology is the limit of the measures. -/
theorem tendsto_measure_biInter_gt {ι : Type*} [LinearOrder ι] [TopologicalSpace ι]
    [OrderTopology ι] [DenselyOrdered ι] [FirstCountableTopology ι] {s : ι → Set α}
    {a : ι} (hs : ∀ r > a, MeasurableSet (s r)) (hm : ∀ i j, a < i → i ≤ j → s i ⊆ s j)
    (hf : ∃ r > a, μ (s r) ≠ ∞) : Tendsto (μ ∘ s) (𝓝[Ioi a] a) (𝓝 (μ (⋂ r > a, s r)))

(hm : ∀ (i j : ι), a < i → i ≤ j → s i ⊆ s j)

Filter.Tendsto (⇑μ ∘ s) (nhdsWithin a (Set.Ioi a)) (nhds (μ (⋂ r, ⋂ (_ : r > a), s r)))


@[simp]
theorem equivIsoLimit_symm_apply {r t : Cone F} (i : r ≅ t) (P : IsLimit t) :
    (equivIsoLimit i).symm P = P.ofIsoLimit i.symm

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{r t : CategoryTheory.Limits.Cone F}
(i : r ≅ t)
(P : CategoryTheory.Limits.IsLimit t)

(CategoryTheory.Limits.IsLimit.equivIsoLimit i).symm P = P.ofIsoLimit i.symm


/-- The identification `- ⊗ unmop X = unmop (X ⊗ mop -)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorRightUnmopIso (X : Cᴹᵒᵖ) :
    tensorRight (unmop X) ≅ mopFunctor C ⋙ tensorLeft X ⋙ unmopFunctor C

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

∀ (X_1 : C), X.tensorRightUnmopIso.inv.app X_1 = 𝟙 (CategoryTheory.MonoidalCategory.tensorObj X_1 X.unmop)


theorem lt_isGLB_iff (ha : IsGLB s a) : b < a ↔ ∃ c ∈ lowerBounds s, b < c

{α : Type u}
[Preorder α]
{s : Set α}
{a b : α}
(ha : IsGLB s a)


@[simp] lemma chainTopCoeff_zero : chainTopCoeff 0 β = 0

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(β : LieModule.Weight R L M)


@[reassoc (attr := simp)]
lemma ιMapObjOrZero_mapMap :
    X.ιMapObjOrZero p i j ≫ mapMap φ p j = φ i ≫ Y.ιMapObjOrZero p i j

CategoryTheory.CategoryStruct.comp (X.ιMapObjOrZero p i j) (CategoryTheory.GradedObject.mapMap φ p j) =
  CategoryTheory.CategoryStruct.comp (φ i) (Y.ιMapObjOrZero p i j)


theorem bot_toSubalgebra : (⊥ : StarSubalgebra R A).toSubalgebra = ⊥

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]


/-- The cosine of the angle between two vectors is 1 if and only if the angle is 0. -/
theorem cos_eq_one_iff_angle_eq_zero : cos (angle x y) = 1 ↔ angle x y = 0

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}

Real.cos (InnerProductGeometry.angle x y) = 1 ↔ InnerProductGeometry.angle x y = 0


theorem lift_unique (φ : V ⥤q V') (Φ : FreeGroupoid V ⥤ V') (hΦ : of V ⋙q Φ.toPrefunctor = φ) :
    Φ = lift φ

(Φ : CategoryTheory.Functor (CategoryTheory.FreeGroupoid V) V')

(hΦ : CategoryTheory.Groupoid.Free.of V ⋙q Φ.toPrefunctor = φ)


@[simp]
theorem blockDiag'_one [DecidableEq o] [∀ i, DecidableEq (m' i)] [One α] :
    blockDiag' (1 : Matrix (Σi, m' i) (Σi, m' i) α) = 1

{o : Type u_4}
{m' : o → Type u_7}
{α : Type u_12}
[Zero α]
[DecidableEq o]
[(i : o) → DecidableEq (m' i)]
[One α]


@[simp]
lemma fromRows_zero : fromRows (0 : Matrix m₁ n R) (0 : Matrix m₂ n R) = 0

{R : Type u_1}
{m₁ : Type u_3}
{m₂ : Type u_4}
{n : Type u_5}
[Semiring R]


theorem one_div_add_one_div (ha : a ≠ 0) (hb : b ≠ 0) : 1 / a + 1 / b = (a + b) / (a * b)

{α : Type u_1}
[Semifield α]
{a b : α}
(ha : a ≠ 0)
(hb : b ≠ 0)


theorem BlockTriangular.det_fintype [DecidableEq α] [Fintype α] [LinearOrder α]
    (h : BlockTriangular M b) : M.det = ∏ k : α, (M.toSquareBlock b k).det

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{M : Matrix m m R}
{b : m → α}
[DecidableEq m]
[Fintype m]
[DecidableEq α]
[Fintype α]
[LinearOrder α]
(h : M.BlockTriangular b)


protected theorem Subsingleton.monovary [Subsingleton ι] (f : ι → α) (g : ι → β) : Monovary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
[Subsingleton ι]
(f : ι → α)
(g : ι → β)


theorem thickenedIndicator_one {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) {x : α} (x_in_E : x ∈ E) :
    thickenedIndicator δ_pos E x = 1

{α : Type u_1}
[PseudoEMetricSpace α]
{δ : ℝ}
(δ_pos : 0 < δ)
(E : Set α)
{x : α}
(x_in_E : x ∈ E)


theorem minSqFac_prime {n d : ℕ} (h : n.minSqFac = some d) : Prime d


@[reassoc]
theorem e_assoc' (W X Y Z : C) :
    (α_ _ _ _).hom ≫ _ ◁ eComp V X Y Z ≫ eComp V W X Z =
      eComp V W X Y ▷ _ ≫ eComp V W Y Z

(V : Type v)
[CategoryTheory.Category.{w, v} V]
[CategoryTheory.MonoidalCategory V]
{C : Type u₁}
[CategoryTheory.EnrichedCategory V C]
(W X Y Z : C)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.associator (CategoryTheory.EnrichedCategory.Hom W X)
        (CategoryTheory.EnrichedCategory.Hom X Y) (CategoryTheory.EnrichedCategory.Hom Y Z)).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.EnrichedCategory.Hom W X)
        (CategoryTheory.eComp V X Y Z))
      (CategoryTheory.eComp V W X Z)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.eComp V W X Y)
      (CategoryTheory.EnrichedCategory.Hom Y Z))
    (CategoryTheory.eComp V W Y Z)


/-- A category is `InitiallySmall.{w}` if there is an initial functor from a `w`-small category. -/
class InitiallySmall : Prop where
  /-- There is an initial functor from a small category. -/
  initial_smallCategory : ∃ (S : Type w) (_ : SmallCategory S) (F : S ⥤ J), Initial F

[self : CategoryTheory.InitiallySmall J]


@[deprecated Measure.withDensity.instSFinite (since := "2024-07-14"), nolint unusedArguments]
lemma sFinite_withDensity_of_measurable (μ : Measure α) [SFinite μ]
    {f : α → ℝ≥0∞} (_hf : Measurable f) :
    SFinite (μ.withDensity f)

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


@[simp]
theorem sign_cycleRange {n : ℕ} (i : Fin n) : Perm.sign (cycleRange i) = (-1) ^ (i : ℕ)

Equiv.Perm.sign i.cycleRange = (-1) ^ ↑i


@[simp]
theorem id_eq_id : Algebra.Hom.id A = 𝟙 A

(A : CategoryTheory.Endofunctor.Algebra F)

CategoryTheory.Endofunctor.Algebra.Hom.id A = CategoryTheory.CategoryStruct.id A


protected theorem lt_of_not_ge {a b : Int} (h : ¬a ≤ b) : b < a


theorem IsMinOn.bicomp_mono [Preorder δ] {op : β → γ → δ}
    (hop : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) op op) (hf : IsMinOn f s a) {g : α → γ}
    (hg : IsMinOn g s a) : IsMinOn (fun x => op (f x) (g x)) s a

{op : β → γ → δ}

(hop : ((fun x x_1 => x ≤ x_1) ⇒ (fun x x_1 => x ≤ x_1) ⇒ fun x x_1 => x ≤ x_1) op op)


@[fun_prop]
lemma continuous_toNNReal : Continuous (toNNReal (X := X))

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


@[simp]
theorem mk_fintype (α : Type u) [h : Fintype α] : #α = Fintype.card α


@[simp] theorem toModuleCat_tensor (X Y : QuadraticModuleCat.{u} R) :
    (X ⊗ Y).toModuleCat = X.toModuleCat ⊗ Y.toModuleCat

{R : Type u}
[CommRing R]
[Invertible 2]
(X Y : QuadraticModuleCat R)


@[simp]
theorem mem_op {s : Set α} {a : αᵒᵖ} : a ∈ s.op ↔ unop a ∈ s


@[simp] theorem pure_id_seq [Applicative f] [LawfulApplicative f] (x : f α) : pure id <*> x = x

{f : Type u_1 → Type u_2}
{α : Type u_1}
[Applicative f]
[LawfulApplicative f]
(x : f α)


@[simp]
protected theorem sup_eq_bot_iff (f : β → α) (S : Finset β) : S.sup f = ⊥ ↔ ∀ s ∈ S, f s = ⊥

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
(f : β → α)
(S : Finset β)


theorem comp_snoc {α : Type*} {β : Type*} (g : α → β) (q : Fin n → α) (y : α) :
    g ∘ snoc q y = snoc (g ∘ q) (g y)

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(g : α → β)
(q : Fin n → α)
(y : α)

g ∘ Fin.snoc q y = Fin.snoc (g ∘ q) (g y)


lemma map_ne_zero_iff (hf : AEMeasurable f μ) : μ.map f ≠ 0 ↔ μ ≠ 0

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

MeasureTheory.Measure.map f μ ≠ 0 ↔ μ ≠ 0


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

{𝕜 : Type u_3}
{G : Type u_4}
[RCLike 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : 𝕜 → G}
{s : Set 𝕜}
{C : ℝ≥0}
(hf : ∀ x ∈ s, DifferentiableAt 𝕜 f x)
(bound : ∀ x ∈ s, ‖deriv f x‖₊ ≤ C)
(hs : Convex ℝ s)


@[simp] theorem one_gcd {a : Int} : gcd 1 a = 1


@[simp] theorem castLE_castLE {k m n} (km : k ≤ m) (mn : m ≤ n) (i : Fin k) :
    Fin.castLE mn (Fin.castLE km i) = Fin.castLE (Nat.le_trans km mn) i

{k m n : Nat}
(km : k ≤ m)
(mn : m ≤ n)
(i : Fin k)

Fin.castLE mn (Fin.castLE km i) = Fin.castLE ⋯ i


/-- If `m u = ∞` for any set `u` that has nonempty intersection both with `s` and `t`, then
`μ (s ∪ t) = μ s + μ t`, where `μ = MeasureTheory.OuterMeasure.boundedBy m`.

E.g., if `α` is an (e)metric space and `m u = ∞` on any set of diameter `≥ r`, then this lemma
implies that `μ (s ∪ t) = μ s + μ t` on any two sets such that `r ≤ edist x y` for all `x ∈ s`
and `y ∈ t`.  -/
theorem boundedBy_union_of_top_of_nonempty_inter {s t : Set α}
    (h : ∀ u, (s ∩ u).Nonempty → (t ∩ u).Nonempty → m u = ∞) :
    boundedBy m (s ∪ t) = boundedBy m s + boundedBy m t

(h : ∀ (u : Set α), (s ∩ u).Nonempty → (t ∩ u).Nonempty → m u = ⊤)

(MeasureTheory.OuterMeasure.boundedBy m) (s ∪ t) =
  (MeasureTheory.OuterMeasure.boundedBy m) s + (MeasureTheory.OuterMeasure.boundedBy m) t


@[fun_prop]
lemma Units.continuousOn_zpow₀_spectrum (a : Aˣ) (n : ℤ) :
    ContinuousOn (· ^ n) (spectrum R (a : A))

{R : Type u_1}
{A : Type u_2}
[Semifield R]
[MetricSpace R]
[TopologicalSemiring R]
[HasContinuousInv₀ R]
[Ring A]
[Algebra R A]
(a : Aˣ)
(n : ℤ)

ContinuousOn (fun x => x ^ n) (spectrum R ↑a)


theorem iteratedFDerivWithin_succ_const (n : ℕ) (c : F) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) :
    iteratedFDerivWithin 𝕜 (n + 1) (fun _ : E ↦ c) s x = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{x : E}
(n : ℕ)
(c : F)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)

iteratedFDerivWithin 𝕜 (n + 1) (fun x => c) s x = 0


theorem sup_biSup {p : ι → Prop} {f : ∀ i, p i → α} {a : α} (h : ∃ i, p i) :
    (a ⊔ ⨆ (i) (h : p i), f i h) = ⨆ (i) (h : p i), a ⊔ f i h

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{p : ι → Prop}
{f : (i : ι) → p i → α}
{a : α}
(h : ∃ i, p i)

a ⊔ ⨆ i, ⨆ (h : p i), f i h = ⨆ i, ⨆ (h : p i), a ⊔ f i h


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

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{J : Type u₂}
[CategoryTheory.Category.{v₂, u₂} J]
(F : Jᵒᵖ ⥤ Cᵒᵖ)
{c : CategoryTheory.Limits.Cone F.unop}
(hc : CategoryTheory.Limits.IsLimit c)
(s : CategoryTheory.Limits.Cocone F)

(CategoryTheory.Limits.isColimitConeOfCoconeUnop F hc).desc s = (hc.lift (CategoryTheory.Limits.coneUnopOfCocone s)).op


@[deprecated Nat.add_le_of_le_sub' (since := "2024-02-19")]
protected theorem add_le_of_le_sub_left {n k m : Nat} (h : m ≤ k) : n ≤ k - m → m + n ≤ k


lemma abs_le_of_sq_le_sq' (h : a ^ 2 ≤ b ^ 2) (hb : 0 ≤ b) : -b ≤ a ∧ a ≤ b

{α : Type u_1}
[LinearOrderedRing α]
{a b : α}
(h : a ^ 2 ≤ b ^ 2)
(hb : 0 ≤ b)


@[simp] theorem fst_expSeries (x : tsze R M) (n : ℕ) :
    fst (expSeries 𝕜 (tsze R M) n fun _ => x) = expSeries 𝕜 R n fun _ => x.fst

(𝕜 : Type u_1)
{R : Type u_3}
{M : Type u_4}
[Field 𝕜]
[Ring R]
[AddCommGroup M]
[Algebra 𝕜 R]
[Module 𝕜 M]
[Module R M]
[Module Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
[IsScalarTower 𝕜 R M]
[IsScalarTower 𝕜 Rᵐᵒᵖ M]
[TopologicalSpace R]
[TopologicalSpace M]
[TopologicalRing R]
[TopologicalAddGroup M]
[ContinuousSMul R M]
[ContinuousSMul Rᵐᵒᵖ M]
(x : tsze R M)
(n : ℕ)

((NormedSpace.expSeries 𝕜 (tsze R M) n) fun x_1 => x).fst = (NormedSpace.expSeries 𝕜 R n) fun x_1 => x.fst


theorem mul_pos_iff [ExistsAddOfLE α] [PosMulStrictMono α] [MulPosStrictMono α]
    [CovariantClass α α (· + ·) (· < ·)] [ContravariantClass α α (· + ·) (· < ·)] :
    0 < a * b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0

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

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


/-- The canonical isomorphism `mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧`. -/
@[simps!]
noncomputable def mappingConeHomOfDegreewiseSplitIso :
    mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧

(S : CategoryTheory.ShortComplex (CochainComplex C ℤ))

(σ : (n : ℤ) → (S.map (HomologicalComplex.eval C (ComplexShape.up ℤ) n)).Splitting)

(CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).inv.f i =
  (CochainComplex.mappingConeHomOfDegreewiseSplitXIso S σ i (i + 1) ⋯).inv


@[simp, norm_cast]
theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n

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


/-- If the field `L` is a finite extension of the fraction field of the integral domain `A`,
the integral closure `C` of `A` in `L` has fraction field `L`. -/
theorem isFractionRing_of_finite_extension [Algebra K L] [IsScalarTower A K L]
    [FiniteDimensional K L] : IsFractionRing C L

(A : Type u_4)
(K : Type u_5)
[CommRing A]
[IsDomain A]
(L : Type u_6)
[Field K]
[Field L]
[Algebra A K]
[Algebra A L]
[IsFractionRing A K]
(C : Type u_7)
[CommRing C]
[IsDomain C]
[Algebra C L]
[IsIntegralClosure C A L]
[Algebra A C]
[IsScalarTower A C L]
[Algebra K L]
[IsScalarTower A K L]
[FiniteDimensional K L]


theorem add (hxy₁ : x₁ ≡ y₁ [SMOD U]) (hxy₂ : x₂ ≡ y₂ [SMOD U]) : x₁ + x₂ ≡ y₁ + y₂ [SMOD U]

{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
{x₁ x₂ y₁ y₂ : M}
(hxy₁ : x₁ ≡ y₁ [SMOD U])
(hxy₂ : x₂ ≡ y₂ [SMOD U])


@[simp]
theorem norm_eq_abs (z : ℂ) : ‖z‖ = abs z


/-- In a pseudometric space, Cauchy sequences are characterized by the fact that, eventually,
the distance between its elements is arbitrarily small -/
-- Porting note: @[nolint ge_or_gt] doesn't exist
theorem Metric.cauchySeq_iff {u : β → α} :
    CauchySeq u ↔ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, dist (u m) (u n) < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[Nonempty β]
[SemilatticeSup β]
{u : β → α}


lemma isRatCondKernelCDFAux_density_Iic (κ : Kernel α (γ × ℝ)) [IsFiniteKernel κ] :
    IsRatCondKernelCDFAux (fun (p : α × γ) q ↦ density κ (fst κ) p.1 p.2 (Iic q)) κ (fst κ)

(κ : ProbabilityTheory.Kernel α (γ × ℝ))

ProbabilityTheory.IsRatCondKernelCDFAux (fun p q => κ.density κ.fst p.1 p.2 (Set.Iic ↑q)) κ κ.fst


@[simp]
theorem dotProduct_pUnit [AddCommMonoid α] [Mul α] (v w : PUnit → α) : v ⬝ᵥ w = v ⟨⟩ * w ⟨⟩

{α : Type v}
[AddCommMonoid α]
[Mul α]
(v w : PUnit.{u_10 + 1} → α)


/-- Functorially associated to each functor `J ⥤ C`, we have the `C`-presheaf consisting of
cones with a given cone point.
-/
@[simps!]
def cones : (J ⥤ C) ⥤ Cᵒᵖ ⥤ Type max u₁ v₃

(J : Type u₁)
[CategoryTheory.Category.{v₁, u₁} J]
(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]
(F : J ⥤ C)

∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (a : (CategoryTheory.yoneda.obj F).obj ((CategoryTheory.Functor.const J).op.obj X)) (X_1 : J),
  (((CategoryTheory.cones J C).obj F).map f a).app X_1 = f.unop ≫ a.app X_1


theorem MeasurePreserving.integral_comp {β} {_ : MeasurableSpace β} {f : α → β} {ν}
    (h₁ : MeasurePreserving f μ ν) (h₂ : MeasurableEmbedding f) (g : β → G) :
    ∫ x, g (f x) ∂μ = ∫ y, g y ∂ν

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_7}

∀ {x : MeasurableSpace β} {f : α → β} {ν : MeasureTheory.Measure β},
  MeasureTheory.MeasurePreserving f μ ν →
    MeasurableEmbedding f → ∀ (g : β → G), ∫ (x : α), g (f x) ∂μ = ∫ (y : β), g y ∂ν


@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem add [AddMonoid β] [ContinuousAdd β] (hf : FinStronglyMeasurable f μ)
    (hg : FinStronglyMeasurable g μ) : FinStronglyMeasurable (f + g) μ

(hf : MeasureTheory.FinStronglyMeasurable f μ)

(hg : MeasureTheory.FinStronglyMeasurable g μ)

MeasureTheory.FinStronglyMeasurable (f + g) μ


theorem arctan_injective : arctan.Injective


/-- Given a neighborhood `s` of `(x, x)`, then `(x, x)` has a square open neighborhood
  that is a subset of `s`. -/
theorem exists_nhds_square {s : Set (X × X)} {x : X} (hx : s ∈ 𝓝 (x, x)) :
    ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ U ×ˢ U ⊆ s

{X : Type u}
[TopologicalSpace X]
{s : Set (X × X)}
{x : X}
(hx : s ∈ 𝓝 (x, x))


/-- The predicate corresponding to a base set of the filter defined by an
`IntegrationParams`. It says that

* if `l.bHenstock`, then `π` is a Henstock prepartition, i.e. each tag belongs to the corresponding
  closed box;
* `π` is subordinate to `r`;
* if `l.bDistortion`, then the distortion of each box in `π` is less than or equal to `c`;
* if `l.bDistortion`, then there exists a prepartition `π'` with distortion `≤ c` that covers
  exactly `I \ π.iUnion`.

The last condition is automatically verified for partitions, and is used in the proof of the
Sacks-Henstock inequality to compare two prepartitions covering the same part of the box.

It is also automatically satisfied for any `c > 1`, see TODO section of the module docstring for
details. -/
structure MemBaseSet (l : IntegrationParams) (I : Box ι) (c : ℝ≥0) (r : (ι → ℝ) → Ioi (0 : ℝ))
    (π : TaggedPrepartition I) : Prop where
  protected isSubordinate : π.IsSubordinate r
  protected isHenstock : l.bHenstock → π.IsHenstock
  protected distortion_le : l.bDistortion → π.distortion ≤ c
  protected exists_compl : l.bDistortion → ∃ π' : Prepartition I,
    π'.iUnion = ↑I \ π.iUnion ∧ π'.distortion ≤ c

{ι : Type u_1}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{I : BoxIntegral.Box ι}
{c : ℝ≥0}
{r : (ι → ℝ) → ↑(Set.Ioi 0)}
{π : BoxIntegral.TaggedPrepartition I}
(self : l.MemBaseSet I c r π)


/--
Equivalent preregular categories give equivalent regular toposes.
-/
@[simps!]
def sheafCongrPreregular : haveI := e.preregular
    Sheaf (regularTopology C) A ≌ Sheaf (regularTopology D) A

(X : CategoryTheory.Sheaf (CategoryTheory.regularTopology C) A)

∀ (X_1 : Cᵒᵖ),
  ((e.sheafCongrPreregular A).unitIso.inv.app X).val.app X_1 = X.val.map (e.unitIso.hom.app (Opposite.unop X_1)).op


theorem Function.Embedding.toEquivRange_eq_ofInjective :
    f.toEquivRange = Equiv.ofInjective f f.injective

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)


theorem updateColumn_reindex [DecidableEq o] [DecidableEq n] (A : Matrix m n α) (j : o) (c : l → α)
    (e : m ≃ l) (f : n ≃ o) :
    updateColumn (reindex e f A) j c = reindex e f (A.updateColumn (f.symm j) fun i => c (e i))

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[DecidableEq o]
[DecidableEq n]
(A : Matrix m n α)
(j : o)
(c : l → α)
(e : m ≃ l)
(f : n ≃ o)

((Matrix.reindex e f) A).updateColumn j c = (Matrix.reindex e f) (A.updateColumn (f.symm j) fun i => c (e i))


theorem eval_eval₂ {S τ : Type*} {x : τ → S} [CommSemiring R] [CommSemiring S]
    (f : R →+* MvPolynomial τ S) (g : σ → MvPolynomial τ S) (p : MvPolynomial σ R) :
    eval x (eval₂ f g p) = eval₂ ((eval x).comp f) (fun s => eval x (g s)) p

{R : Type u}
{σ : Type u_1}
{S : Type u_2}
{τ : Type u_3}
{x : τ → S}
[CommSemiring R]
[CommSemiring S]
(f : R →+* MvPolynomial τ S)
(g : σ → MvPolynomial τ S)
(p : MvPolynomial σ R)

(MvPolynomial.eval x) (MvPolynomial.eval₂ f g p) =
  MvPolynomial.eval₂ ((MvPolynomial.eval x).comp f) (fun s => (MvPolynomial.eval x) (g s)) p


@[simp] theorem size_swap (a : Array α) (i j : Fin a.size) : (a.swap i j).size = a.size

{α : Type u_1}
(a : Array α)
(i j : Fin a.size)


theorem dvd_lcm_left (m n : Nat) : m ∣ lcm m n


@[simp]
theorem quotQuotEquivQuotOfLE_quotQuotMk (x : R) (h : I ≤ J) :
    quotQuotEquivQuotOfLE h (quotQuotMk I J x) = (Ideal.Quotient.mk J) x

{R : Type u}
[CommRing R]
{I J : Ideal R}
(x : R)
(h : I ≤ J)

(DoubleQuot.quotQuotEquivQuotOfLE h) ((DoubleQuot.quotQuotMk I J) x) = (Ideal.Quotient.mk J) x


@[to_additive]
theorem measure_preimage_smul_of_nullMeasurableSet (hs : NullMeasurableSet s μ) (c : G) :
    μ ((c • ·) ⁻¹' s) = μ s

[MeasureTheory.VAddInvariantMeasure G α μ]

(hs : MeasureTheory.NullMeasurableSet s μ)


@[to_additive (attr := simp)]
lemma op_smul [SMul α β] (a : α) (b : β) : op (a • b) = a • op b

{α : Type u_1}
{β : Type u_2}
[SMul α β]
(a : α)
(b : β)

MulOpposite.op (a • b) = a • MulOpposite.op b


@[simp]
theorem sigmaFinsuppEquivPiFinsupp_apply (f : (Σj, ιs j) →₀ α) (j i) :
    sigmaFinsuppEquivPiFinsupp f j i = f ⟨j, i⟩

{α : Type u_1}
{η : Type u_14}
[Fintype η]
{ιs : η → Type u_15}
[Zero α]
(f : (j : η) × ιs j →₀ α)
(j : η)
(i : ιs j)

(Finsupp.sigmaFinsuppEquivPiFinsupp f j) i = f ⟨j, i⟩


theorem eigenvalues_eq (i : n) :
    (hA.eigenvalues i) = RCLike.re (Matrix.dotProduct (star ⇑(hA.eigenvectorBasis i))
    (A *ᵥ ⇑(hA.eigenvectorBasis i)))

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)
(i : n)

hA.eigenvalues i =
  RCLike.re
    (Matrix.dotProduct (star ((WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis i)))
      (A.mulVec ((WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis i))))


private theorem smul_add_aux (x : T) (p q : LocalizedModule S M) :
    x • (p + q) = x • p + x • q

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
{T : Type u_1}
[CommSemiring T]
[Algebra R T]
[IsLocalization S T]
(x : T)
(p q : LocalizedModule S M)


/-- `s ≤ {a}` in colex iff all elements of `s` are strictly less than `a`, except possibly `a` in
which case `s = {a}`. -/
lemma toColex_le_singleton : toColex s ≤ toColex {a} ↔ ∀ b ∈ s, b ≤ a ∧ (a ∈ s → b = a)

{α : Type u_1}
[PartialOrder α]
{s : Finset α}
{a : α}

{ ofColex := s } ≤ { ofColex := {a} } ↔ ∀ b ∈ s, b ≤ a ∧ (a ∈ s → b = a)


theorem iSup_option (f : Option β → α) : ⨆ o, f o = f none ⊔ ⨆ b, f (Option.some b)

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
(f : Option β → α)


@[simp]
theorem deleteVerts_inter_verts_left_eq : G'.deleteVerts (G'.verts ∩ s) = G'.deleteVerts s

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{s : Set V}


lemma quasiIso_τ₃ (h₁ : QuasiIso φ.τ₁) (h₂ : QuasiIso φ.τ₂) :
    QuasiIso φ.τ₃

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


/-- Note that we rarely use `CompleteSemilatticeSup`
(in fact, any such object is always a `CompleteLattice`, so it's usually best to start there).

Nevertheless it is sometimes a useful intermediate step in constructions.
-/
class CompleteSemilatticeSup (α : Type*) extends PartialOrder α, SupSet α where
  /-- Any element of a set is less than the set supremum. -/
  le_sSup : ∀ s, ∀ a ∈ s, a ≤ sSup s
  /-- Any upper bound is more than the set supremum. -/
  sSup_le : ∀ s a, (∀ b ∈ s, b ≤ a) → sSup s ≤ a

{α : Type u_9}
[self : CompleteSemilatticeSup α]
(s : Set α)
(a : α)


theorem measurable_tProd_elim' [DecidableEq δ] {l : List δ} (h : ∀ i, i ∈ l) :
    Measurable (TProd.elim' h : TProd π l → ∀ i, π i)

{δ : Type u_4}
{π : δ → Type u_6}
[(x : δ) → MeasurableSpace (π x)]
[DecidableEq δ]
{l : List δ}
(h : ∀ (i : δ), i ∈ l)


theorem inverse_one_sub_nth_order' (n : ℕ) {t : R} (ht : ‖t‖ < 1) :
    inverse ((1 : R) - t) = (∑ i ∈ range n, t ^ i) + t ^ n * inverse (1 - t)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
(n : ℕ)
{t : R}
(ht : ‖t‖ < 1)

Ring.inverse (1 - t) = ∑ i ∈ Finset.range n, t ^ i + t ^ n * Ring.inverse (1 - t)


theorem smul_of [DistribSMul S R] [IsScalarTower S R R] (a : S) (x : R) :
    a • of f x = of f (a • x)

{R : Type u}
{S : Type v}
[CommRing R]
(f : R[X])
[DistribSMul S R]
[IsScalarTower S R R]
(a : S)
(x : R)

a • (AdjoinRoot.of f) x = (AdjoinRoot.of f) (a • x)


@[simp]
theorem discrete_eq_top : discrete C = ⊤

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

CategoryTheory.GrothendieckTopology.discrete C = ⊤


@[to_additive]
theorem eq_bot_of_subsingleton [Subsingleton H] : H = ⊥

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


@[to_additive]
theorem orderOf_dvd_iff_pow_eq_one {n : ℕ} : orderOf x ∣ n ↔ x ^ n = 1

{G : Type u_1}
[AddMonoid G]
{x : G}
{n : ℕ}