/-- Approximate `(f ⋆ g) x₀` if the support of the `f` is bounded within a ball, and `g` is near
`g x₀` on a ball with the same radius around `x₀`. See `dist_convolution_le` for a special case.

We can simplify the second argument of `dist` further if we add some extra type-classes on `E`
and `𝕜` or if `L` is scalar multiplication. -/
theorem dist_convolution_le' {x₀ : G} {R ε : ℝ} {z₀ : E'} (hε : 0 ≤ ε) (hif : Integrable f μ)
    (hf : support f ⊆ ball (0 : G) R) (hmg : AEStronglyMeasurable g μ)
    (hg : ∀ x ∈ ball x₀ R, dist (g x) z₀ ≤ ε) :
    dist ((f ⋆[L, μ] g : G → F) x₀) (∫ t, L (f t) z₀ ∂μ) ≤ (‖L‖ * ∫ x, ‖f x‖ ∂μ) * ε

(hf : Function.support f ⊆ Metric.ball 0 R)

(hmg : MeasureTheory.AEStronglyMeasurable g μ)

(hg : ∀ x ∈ Metric.ball x₀ R, dist (g x) z₀ ≤ ε)

dist (MeasureTheory.convolution f g L μ x₀) (∫ (t : G), (L (f t)) z₀ ∂μ) ≤ (‖L‖ * ∫ (x : G), ‖f x‖ ∂μ) * ε


/-- A normed field is a field with a norm satisfying ‖x y‖ = ‖x‖ ‖y‖. -/
class NormedField (α : Type*) extends Norm α, Field α, MetricSpace α where
  /-- The distance is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = norm (x - y)
  /-- The norm is multiplicative. -/
  norm_mul' : ∀ a b, norm (a * b) = norm a * norm b

{α : Type u_5}
[self : NormedField α]
(x y : α)


theorem Multiset.coe_mk {x : α} {i : Fin (m.count x)} : ↑(m.mkToType x i) = x

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}
{x : α}
{i : Fin (Multiset.count x m)}


theorem exact_iff_epi_imageToKernel : S.Exact ↔ Epi (imageToKernel S.f S.g S.zero)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Abelian C]
(S : CategoryTheory.ShortComplex C)

S.Exact ↔ CategoryTheory.Epi (imageToKernel S.f S.g ⋯)


@[simp]
theorem range_coe : (f.range : Set L₂) = Set.range f

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{L₂ : Type w}
[LieRing L₂]
[LieAlgebra R L₂]
(f : L →ₗ⁅R⁆ L₂)


/-- Every continuous map from a connected topological space to the disjoint union of a family of
topological spaces is a composition of the embedding `ContinuousMap.sigmMk i : C(Y i, Σ i, Y i)` for
some `i` and a continuous map `g : C(X, Y i)`. See also `Continuous.exists_lift_sigma` for a version
with unbundled functions and `ContinuousMap.sigmaCodHomeomorph` for a homeomorphism defined using
this fact. -/
theorem exists_lift_sigma (f : C(X, Σ i, Y i)) : ∃ i g, f = (sigmaMk i).comp g

{X : Type u_1}
{ι : Type u_2}
{Y : ι → Type u_3}
[TopologicalSpace X]
[(i : ι) → TopologicalSpace (Y i)]
[ConnectedSpace X]
(f : C(X, (i : ι) × Y i))

∃ i g, f = (ContinuousMap.sigmaMk i).comp g


theorem exists_mem_eq_inf [OrderTop α] (s : Finset ι) (h : s.Nonempty) (f : ι → α) :
    ∃ i, i ∈ s ∧ s.inf f = f i

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
[OrderTop α]
(s : Finset ι)
(h : s.Nonempty)
(f : ι → α)


theorem continuous_ofDual : Continuous (ofDual : Xᵒᵈ → X)


/-- If the oriented angle between three points is `-π / 2`, the unoriented angle is `π / 2`. -/
theorem angle_eq_pi_div_two_of_oangle_eq_neg_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(-π / 2)) : ∠ p₁ p₂ p₃ = π / 2

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


@[simp]
theorem yoneda'_comp : yoneda'.{u} ⋙ sheafOfTypesToPresheaf _ = yoneda

CategoryTheory.yoneda'.comp (CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology) =
  CategoryTheory.yoneda


theorem eventually_atBot_prod_self' [SemilatticeInf α] [Nonempty α] {p : α × α → Prop} :
    (∀ᶠ x in atBot, p x) ↔ ∃ a, ∀ k ≤ a, ∀ l ≤ a, p (k, l)

{α : Type u_3}
[SemilatticeInf α]
[Nonempty α]
{p : α × α → Prop}

(∀ᶠ (x : α × α) in Filter.atBot, p x) ↔ ∃ a, ∀ k ≤ a, ∀ l ≤ a, p (k, l)


theorem Factors.inertiaDeg_ne_zero [IsNoetherian R S] [p.IsMaximal]
    (P : (factors (map (algebraMap R S) p)).toFinset) : inertiaDeg (algebraMap R S) p P ≠ 0

(P : { x // x ∈ (UniqueFactorizationMonoid.factors (Ideal.map (algebraMap R S) p)).toFinset })

Ideal.inertiaDeg (algebraMap R S) p ↑P ≠ 0


private theorem chainClosure_succ_total_aux (hc₁ : ChainClosure r c₁)
    (h : ∀ ⦃c₃⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂) :
    SuccChain r c₂ ⊆ c₁ ∨ c₁ ⊆ c₂

(h : ∀ ⦃c₃ : Set α⦄, ChainClosure r c₃ → c₃ ⊆ c₂ → c₂ = c₃ ∨ SuccChain r c₃ ⊆ c₂)


lemma singularPart_restrict (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    {s : Set α} (hs : MeasurableSet s) :
    (μ.restrict s).singularPart ν = (μ.singularPart ν).restrict s

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
[μ.HaveLebesgueDecomposition ν]
{s : Set α}
(hs : MeasurableSet s)


theorem add_one_inj : a + 1 = b + 1 ↔ a = b


theorem exists_unique_of_exists_of_unique {α : Sort u} {p : α → Prop}
    (hex : ∃ x, p x) (hunique : ∀ y₁ y₂, p y₁ → p y₂ → y₁ = y₂) : ∃! x, p x

(hunique : ∀ (y₁ y₂ : α), p y₁ → p y₂ → y₁ = y₂)


theorem ofReal_lt_iff_lt_toReal {a : ℝ} {b : ℝ≥0∞} (ha : 0 ≤ a) (hb : b ≠ ∞) :
    ENNReal.ofReal a < b ↔ a < ENNReal.toReal b

{a : ℝ}
{b : ℝ≥0∞}
(ha : 0 ≤ a)
(hb : b ≠ ⊤)


@[to_additive]
theorem mem_iSup {ι : Sort*} (p : ι → Subsemigroup M) {m : M} :
    (m ∈ ⨆ i, p i) ↔ ∀ N, (∀ i, p i ≤ N) → m ∈ N

{M : Type u_1}
[Add M]
{ι : Sort u_4}
(p : ι → AddSubsemigroup M)
{m : M}

m ∈ ⨆ i, p i ↔ ∀ (N : AddSubsemigroup M), (∀ (i : ι), p i ≤ N) → m ∈ N


theorem gcd_mul_right (i j k : ℤ) : gcd (i * j) (k * j) = gcd i k * natAbs j

(i * j).gcd (k * j) = i.gcd k * j.natAbs


/-- If one controls the norm of every `A x`, then one controls the norm of `A`. -/
theorem opNorm_le_bound (f : E →SL[σ₁₂] F) {M : ℝ} (hMp : 0 ≤ M) (hM : ∀ x, ‖f x‖ ≤ M * ‖x‖) :
    ‖f‖ ≤ M

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
(f : E →SL[σ₁₂] F)
{M : ℝ}
(hMp : 0 ≤ M)
(hM : ∀ (x : E), ‖f x‖ ≤ M * ‖x‖)


@[simp]
theorem familyOfElements_ofArrows_mk (i : I) :
    hx.familyOfElements _ (ofArrows.mk i) = x i

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

{x : (i : I) → P.obj (Opposite.op (X i))}

(hx : CategoryTheory.Presieve.Arrows.Compatible P π x)


@[to_additive]
theorem IsOrderedSMul.smul_le_smul [Preorder G] [Preorder P] [SMul G P] [IsOrderedSMul G P]
    {a b : G} {c d : P} (hab : a ≤ b) (hcd : c ≤ d) : a • c ≤ b • d

{G : Type u_1}
{P : Type u_2}
[Preorder G]
[Preorder P]
[SMul G P]
[IsOrderedSMul G P]
{a b : G}
{c d : P}
(hab : a ≤ b)
(hcd : c ≤ d)


@[to_additive (attr := simp) one_zsmul]
lemma zpow_one (a : G) : a ^ (1 : ℤ) = a


@[simp]
theorem _root_.ContinuousLinearEquiv.compContinuousMultilinearMapL_apply (g : G ≃L[𝕜] G')
    (f : ContinuousMultilinearMap 𝕜 E G) :
    g.compContinuousMultilinearMapL E f = (g : G →L[𝕜] G').compContinuousMultilinearMap f

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

(ContinuousLinearEquiv.compContinuousMultilinearMapL E g) f = (↑g).compContinuousMultilinearMap f


theorem IsBoundedBilinearMap.map_sub_right (h : IsBoundedBilinearMap 𝕜 f) {x : E} {y z : F} :
    f (x, y - z) = f (x, y) - f (x, z)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
(h : IsBoundedBilinearMap 𝕜 f)
{x : E}
{y z : F}


theorem ker_id_sub_eq_of_proj {f : E →ₗ[R] p} (hf : ∀ x : p, f x = x) :
    ker (id - p.subtype.comp f) = p

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p : Submodule R E}
{f : E →ₗ[R] ↥p}
(hf : ∀ (x : ↥p), f ↑x = x)

LinearMap.ker (LinearMap.id - p.subtype ∘ₗ f) = p


theorem valid'_singleton {x : α} {o₁ o₂} (h₁ : Bounded nil o₁ x) (h₂ : Bounded nil x o₂) :
    Valid' o₁ (singleton x : Ordnode α) o₂

{α : Type u_1}
[Preorder α]
{x : α}
{o₁ : WithBot α}
{o₂ : WithTop α}
(h₁ : Ordnode.nil.Bounded o₁ ↑x)
(h₂ : Ordnode.nil.Bounded (↑x) o₂)


theorem modEq_sub_fac {a b n : ℤ} (c : ℤ) (ha : a ≡ b [ZMOD n]) : a - n * c ≡ b [ZMOD n]


@[simp]
theorem Ioi_zero_eq_map : Ioi (0 : Fin n.succ) = univ.map (Fin.succEmb _)

Finset.Ioi 0 = Finset.map (Fin.succEmb n) Finset.univ


@[ext]
theorem ext : a.re = b.re → a.imI = b.imI → a.imJ = b.imJ → a.imK = b.imK → a = b

{R : Type u_3}
[CommRing R]
(a b : ℍ[R])


theorem sheafify_hom_ext {P Q : Cᵒᵖ ⥤ D} (η γ : J.sheafify P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (h : J.toSheafify P ≫ η = J.toSheafify P ≫ γ) : η = γ

(J : CategoryTheory.GrothendieckTopology C)

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

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

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

(hQ : CategoryTheory.Presheaf.IsSheaf J Q)

(h : CategoryTheory.CategoryStruct.comp (J.toSheafify P) η = CategoryTheory.CategoryStruct.comp (J.toSheafify P) γ)


@[to_additive existing, simp] lemma sum_inv_index [InvolutiveInv ι] (s : Finset ι) (f : ι → α) :
    ∑ i ∈ s⁻¹, f i = ∑ i ∈ s, f i⁻¹

{α : Type u_2}
[AddCommMonoid α]
{ι : Type u_5}
[DecidableEq ι]
[InvolutiveInv ι]
(s : Finset ι)
(f : ι → α)


@[ext]
theorem rightDistributor_ext₂_left {J : Type} [Fintype J]
    {f : J → C} {X Y Z : C} {g h : ((⨁ f) ⊗ X) ⊗ Y ⟶ Z}
    (w : ∀ j, ((biproduct.ι f j ▷ X) ▷ Y) ≫ g = ((biproduct.ι f j ▷ X) ▷ Y) ≫ h) :
    g = h

{g h : CategoryTheory.MonoidalCategory.tensorObj (CategoryTheory.MonoidalCategory.tensorObj (⨁ f) X) Y ⟶ Z}

(w :
  ∀ (j : J),
    CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerRight
          (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.ι f j) X) Y)
        g =
      CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerRight
          (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.ι f j) X) Y)
        h)


theorem neg_apply (f : M →ₗ⁅R,L⁆ N) (m : M) : (-f) m = -f m

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


/-- The terms of the sequence have norm bounded by `B`. -/
theorem seq_norm_le (n : ℕ) :
    Int.natAbs (Algebra.norm ℤ (seq K w₁ hB n : 𝓞 K)) ≤ B

(hB : NumberField.mixedEmbedding.minkowskiBound K 1 < ↑(NumberField.mixedEmbedding.convexBodyLTFactor K) * ↑B)

((Algebra.norm ℤ) ↑(NumberField.Units.dirichletUnitTheorem.seq K w₁ hB n)).natAbs ≤ B


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

{α : Type u}
[SubtractionCommMonoid α]
{a b : α}
(h : IsAddUnit a)


@[simp] theorem opFunctor_comp_unopFunctor_eq :
    Functor.comp opFunctor unopFunctor = Functor.id _

CategoryTheory.RelCat.opFunctor.comp CategoryTheory.RelCat.unopFunctor = CategoryTheory.Functor.id CategoryTheory.RelCat


@[to_additive]
theorem le_map_add_map_div' : f x ≤ f y + f (y / x)

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[AddGroup α]
[OrderedAddCommMonoid β]
[AddGroupSeminormClass F α β]
(f : F)
(x y : α)


@[simp]
theorem cons_vecMul (x : α) (v : Fin n → α) (B : Fin n.succ → o' → α) :
    vecCons x v ᵥ* of B = x • vecHead B + v ᵥ* of (vecTail B)

{α : Type u}
{n : ℕ}
{o' : Type uₒ}
[NonUnitalNonAssocSemiring α]
(x : α)
(v : Fin n → α)
(B : Fin n.succ → o' → α)

Matrix.vecMul (Matrix.vecCons x v) (Matrix.of B) = x • Matrix.vecHead B + Matrix.vecMul v (Matrix.of (Matrix.vecTail B))


theorem pow_apply [Monoid β] (n : ℕ) (f : α →ₛ β) (a : α) : (f ^ n) a = f a ^ n

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Monoid β]
(n : ℕ)
(f : MeasureTheory.SimpleFunc α β)
(a : α)


/-- `AbsoluteValue R S` is the type of absolute values on `R` mapping to `S`:
the maps that preserve `*`, are nonnegative, positive definite and satisfy the triangle equality. -/
structure AbsoluteValue (R S : Type*) [Semiring R] [OrderedSemiring S] extends R →ₙ* S where
  /-- The absolute value is nonnegative -/
  nonneg' : ∀ x, 0 ≤ toFun x
  /-- The absolute value is positive definitive -/
  eq_zero' : ∀ x, toFun x = 0 ↔ x = 0
  /-- The absolute value satisfies the triangle inequality -/
  add_le' : ∀ x y, toFun (x + y) ≤ toFun x + toFun y

{R : Type u_5}
{S : Type u_6}
[Semiring R]
[OrderedSemiring S]
(self : AbsoluteValue R S)
(x : R)


theorem mapRange_def [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] {f : ∀ i, β₁ i → β₂ i}
    {hf : ∀ i, f i 0 = 0} {g : Π₀ i, β₁ i} :
    mapRange f hf g = mk g.support fun i => f i.1 (g i.1)

[(i : ι) → (x : β₁ i) → Decidable (x ≠ 0)]

DFinsupp.mapRange f hf g = DFinsupp.mk g.support fun i => f (↑i) (g ↑i)


@[reassoc (attr := simp)]
theorem ι_sigmaπ (b) : Sigma.ι I.right b ≫ sigmaπ I = π I b

(I : CategoryTheory.Limits.MultispanIndex C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Sigma.ι I.right b)
    (CategoryTheory.Limits.Multicoequalizer.sigmaπ I) =
  CategoryTheory.Limits.Multicoequalizer.π I b


theorem continuousAt_extChartAt_symm (x : M) :
    ContinuousAt (extChartAt I x).symm ((extChartAt I x) x)

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

ContinuousAt (↑(extChartAt I x).symm) (↑(extChartAt I x) x)


/-- A nonnegative multiple of a vector is in the same ray as one it is in the same ray as. -/
lemma nonneg_smul_left (h : SameRay R x y) (ha : 0 ≤ a) : SameRay R (a • x) y

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{x y : M}
{S : Type u_5}
[OrderedCommSemiring S]
[Algebra S R]
[Module S M]
[SMulPosMono S R]
[IsScalarTower S R M]
{a : S}
(h : SameRay R x y)
(ha : 0 ≤ a)


@[ext]
lemma hom_ext {X Y : CosimplicialObject C} (f g : X ⟶ Y)
    (h : ∀ (n : SimplexCategory), f.app n = g.app n) : f = g

{X Y : CategoryTheory.CosimplicialObject C}


protected theorem Infinite.image2_left (hs : s.Infinite) (hb : b ∈ t)
    (hf : InjOn (fun a => f a b) s) : (image2 f s t).Infinite

{α : Type u}
{β : Type v}
{γ : Type x}
{f : α → β → γ}
{s : Set α}
{t : Set β}
{b : β}
(hs : s.Infinite)
(hb : b ∈ t)
(hf : Set.InjOn (fun a => f a b) s)


lemma isZeckendorfRep_zeckendorf : ∀ n, (zeckendorf n).IsZeckendorfRep


theorem HasLineDerivAt.tendsto_slope_zero_left [PartialOrder 𝕜] (h : HasLineDerivAt 𝕜 f f' x v) :
    Tendsto (fun (t : 𝕜) ↦ t⁻¹ • (f (x + t • v) - f x)) (𝓝[<] 0) (𝓝 f')

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

Filter.Tendsto (fun t => t⁻¹ • (f (x + t • v) - f x)) (𝓝[<] 0) (𝓝 f')


/-- The tangent of an angle in a right-angled triangle, where one side is a multiple of a
rotation of another by `π / 2`. -/
theorem tan_oangle_add_right_smul_rotation_pi_div_two {x : V} (h : x ≠ 0) (r : ℝ) :
    Real.Angle.tan (o.oangle x (x + r • o.rotation (π / 2 : ℝ) x)) = r

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

(o.oangle x (x + r • (o.rotation ↑(π / 2)) x)).tan = r


@[simp]
theorem isRightInversion_simple_iff_isRightDescent (w : W) (i : B) :
    cs.IsRightInversion w (s i) ↔ cs.IsRightDescent w i

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

cs.IsRightInversion w (cs.simple i) ↔ cs.IsRightDescent w i


@[simp]
theorem double_powHalf_succ_eq_powHalf (n : ℕ) : 2 * powHalf (n + 1) = powHalf n

2 * Surreal.powHalf (n + 1) = Surreal.powHalf n


lemma tendsto_harmonic_sub_log :
    Tendsto (fun n : ℕ ↦ harmonic n - log n) atTop (𝓝 eulerMascheroniConstant)

Filter.Tendsto (fun n => ↑(harmonic n) - Real.log ↑n) Filter.atTop (𝓝 Real.eulerMascheroniConstant)


@[simp] lemma toLowerSet_ofLowerSet (a : WithLowerSet α) : toLowerSet (ofLowerSet a) = a

{α : Type u_1}
(a : Topology.WithLowerSet α)

Topology.WithLowerSet.toLowerSet (Topology.WithLowerSet.ofLowerSet a) = a


@[to_additive]
theorem inv_smul_ae_eq_self (hs : (x • s : Set α) =ᵐ[μ] s) : (x⁻¹ • s : Set α) =ᵐ[μ] s

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

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.VAddInvariantMeasure G α μ] {x_1 : G}
  {s : Set α}, x_1 +ᵥ s =ᵐ[μ] s → -x_1 +ᵥ s =ᵐ[μ] s


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

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

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


theorem union_sdiff_cancel_right (h : Disjoint s t) : (s ∪ t) \ t = s

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


theorem symm_bijective {f₀ f₁ : C(X, Y)} :
    Function.Bijective (HomotopyWith.symm : HomotopyWith f₀ f₁ P → HomotopyWith f₁ f₀ P)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{P : C(X, Y) → Prop}
{f₀ f₁ : C(X, Y)}


@[to_additive]
theorem div_ne_one_of_ne : a ≠ b → a / b ≠ 1

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


theorem tendsto_zero : Tendsto f l (𝓝 (0 : Γ₀)) ↔ ∀ (γ₀) (_ : γ₀ ≠ 0), ∀ᶠ x in l, f x < γ₀

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

Filter.Tendsto f l (𝓝 0) ↔ ∀ (γ₀ : Γ₀), γ₀ ≠ 0 → ∀ᶠ (x : α) in l, f x < γ₀


theorem liftProp_subtype_val {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) (U : Opens M) :
    LiftProp Q (Subtype.val : U → M)

{H : Type u_1}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G : StructureGroupoid H}
{Q : (H → H) → Set H → H → Prop}
(hG : G.LocalInvariantProp G Q)
(hQ : ∀ (y : H), Q id Set.univ y)
(U : TopologicalSpace.Opens M)


@[simp]
theorem union_assoc (s₁ s₂ s₃ : Finset α) : s₁ ∪ s₂ ∪ s₃ = s₁ ∪ (s₂ ∪ s₃)

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

s₁ ∪ s₂ ∪ s₃ = s₁ ∪ (s₂ ∪ s₃)


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

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


@[simp]
theorem rank_self : Module.rank R R = 1

(R : Type u)
[Ring R]
[StrongRankCondition R]


theorem _root_.MeasureTheory.Integrable.norm_integral_condDistrib_map
    (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
    Integrable (fun x => ‖∫ y, f (x, y) ∂condDistrib Y X μ x‖) (μ.map X)

(hf_int : MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

MeasureTheory.Integrable (fun x => ‖∫ (y : Ω), f (x, y) ∂(ProbabilityTheory.condDistrib Y X μ) x‖)
  (MeasureTheory.Measure.map X μ)


theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s)
    (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s : Set (α → M)}
{L' : FirstOrder.Language}
[L'.Structure M]
(h : A.Definable L s)
(φ : L →ᴸ L')
[φ.IsExpansionOn M]


@[deprecated getElem?_inj (since := "2024-06-12")]
theorem get?_inj
    (h₀ : i < xs.length) (h₁ : Nodup xs) (h₂ : xs.get? i = xs.get? j) : i = j

∀ {α : Type u_1} {xs : List α} {j : Nat}, i < xs.length → xs.Nodup → xs.get? i = xs.get? j → i = j


theorem Integrable.const_mul {f : α → 𝕜} (h : Integrable f μ) (c : 𝕜) :
    Integrable (fun x => c * f x) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[NormedRing 𝕜]
{f : α → 𝕜}
(h : MeasureTheory.Integrable f μ)
(c : 𝕜)

MeasureTheory.Integrable (fun x => c * f x) μ


lemma exterior_def (s : Set α) : exterior s = ⋂₀ {t : Set α | IsOpen t ∧ s ⊆ t}

{α : Type u_3}
[TopologicalSpace α]
(s : Set α)


/-- The tautological fully faithful functor `Karoubi (J ⥤ C) ⥤ (J ⥤ Karoubi C)`. -/
@[simps]
def karoubiFunctorCategoryEmbedding : Karoubi (J ⥤ C) ⥤ J ⥤ Karoubi C

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

∀ {X Y : CategoryTheory.Idempotents.Karoubi (J ⥤ C)} (f : X ⟶ Y),
  (CategoryTheory.Idempotents.karoubiFunctorCategoryEmbedding J C).map f =
    CategoryTheory.Idempotents.KaroubiFunctorCategoryEmbedding.map f


/-- If `Prod.fst ⁻¹' s` is a null measurable set and `ν ≠ 0`, then `s` is a null measurable set. -/
lemma _root_.MeasureTheory.NullMeasurableSet.of_preimage_fst [NeZero ν] {s : Set α}
    (h : NullMeasurableSet (Prod.fst ⁻¹' s) (μ.prod ν)) : NullMeasurableSet s μ

(h : MeasureTheory.NullMeasurableSet (Prod.fst ⁻¹' s) (μ.prod ν))


/-- Convergence in the topology of `𝔖`-convergence means uniform convergence on `S` (in the sense
of `TendstoUniformlyOn`) for all `S ∈ 𝔖`. -/
protected theorem tendsto_iff_tendstoUniformlyOn {F : ι → α →ᵤ[𝔖] β} {f : α →ᵤ[𝔖] β} :
    Tendsto F p (𝓝 f) ↔ ∀ s ∈ 𝔖, TendstoUniformlyOn (toFun 𝔖 ∘ F) (toFun 𝔖 f) p s

{α : Type u_1}
{β : Type u_2}
{ι : Type u_4}
{p : Filter ι}
[UniformSpace β]
{𝔖 : Set (Set α)}
{F : ι → α →ᵤ[𝔖] β}
{f : α →ᵤ[𝔖] β}

Filter.Tendsto F p (𝓝 f) ↔ ∀ s ∈ 𝔖, TendstoUniformlyOn (⇑(UniformOnFun.toFun 𝔖) ∘ F) ((UniformOnFun.toFun 𝔖) f) p s


{α : Type u_2}
[Preorder α]
[BoundedOrder α]
[IsSimpleOrder α]
{a b : α}
(h : a < b)


theorem AddSubgroup.int_mul_mem {G : AddSubgroup R} (k : ℤ) {g : R} (h : g ∈ G) :
    (k : R) * g ∈ G

{R : Type u}
[Ring R]
{G : AddSubgroup R}
(k : ℤ)
{g : R}
(h : g ∈ G)


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

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


@[to_additive Ioc_add_Ico_subset]
theorem Ioc_mul_Ico_subset' (a b c d : α) : Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]

Set.Ioc a b * Set.Ico c d ⊆ Set.Ioo (a * c) (b * d)


@[simp] lemma comul_natCast (n : ℕ) : comul (R := R) (n : A) = n

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Bialgebra R A]
(n : ℕ)


/-- If `f : X → Y` is `Inducing`, the image `f '' s` of a set `s` is σ-compact
  if and only `s` is σ-compact. -/
lemma Inducing.isSigmaCompact_iff {f : X → Y} {s : Set X}
    (hf : Inducing f) : IsSigmaCompact s ↔ IsSigmaCompact (f '' s)

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


theorem le_of_mul_le_mul_left {a b c : Ordinal} (h : c * a ≤ c * b) (h0 : 0 < c) : a ≤ b

{a b c : Ordinal.{u_4}}
(h : c * a ≤ c * b)
(h0 : 0 < c)


theorem mul_apply [DecidableEq G] [Add G] (f g : k[G]) (x : G) :
    (f * g) x = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => if a₁ + a₂ = x then b₁ * b₂ else 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Add G]
(f g : AddMonoidAlgebra k G)
(x : G)

(f * g) x = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => if a₁ + a₂ = x then b₁ * b₂ else 0


theorem IsIrreducible.genericPoint_spec [QuasiSober α] {S : Set α} (hS : IsIrreducible S) :
    IsGenericPoint hS.genericPoint (closure S)

{α : Type u_1}
[TopologicalSpace α]
[QuasiSober α]
{S : Set α}
(hS : IsIrreducible S)


/-- Differentiation under integral of `x ↦ ∫ t in a..b, F x t` at a given point `x₀`, assuming
`F x₀` is integrable, `x ↦ F x a` is locally Lipschitz on a ball around `x₀` for ae `a`
(with a ball radius independent of `a`) with integrable Lipschitz bound, and `F x` is ae-measurable
for `x` in a possibly smaller neighborhood of `x₀`. -/
nonrec theorem hasFDerivAt_integral_of_dominated_loc_of_lip
    {F : H → ℝ → E} {F' : ℝ → H →L[𝕜] E} {x₀ : H}
    (ε_pos : 0 < ε) (hF_meas : ∀ᶠ x in 𝓝 x₀, AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))
    (hF_int : IntervalIntegrable (F x₀) μ a b)
    (hF'_meas : AEStronglyMeasurable F' (μ.restrict (Ι a b)))
    (h_lip : ∀ᵐ t ∂μ, t ∈ Ι a b →
      LipschitzOnWith (Real.nnabs <| bound t) (fun x => F x t) (ball x₀ ε))
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_diff : ∀ᵐ t ∂μ, t ∈ Ι a b → HasFDerivAt (fun x => F x t) (F' t) x₀) :
    IntervalIntegrable F' μ a b ∧
      HasFDerivAt (fun x => ∫ t in a..b, F x t ∂μ) (∫ t in a..b, F' t ∂μ) x₀

(hF_meas : ∀ᶠ (x : H) in 𝓝 x₀, MeasureTheory.AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))

(hF'_meas : MeasureTheory.AEStronglyMeasurable F' (μ.restrict (Ι a b)))

(h_lip : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → LipschitzOnWith (Real.nnabs (bound t)) (fun x => F x t) (Metric.ball x₀ ε))

(h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasFDerivAt (fun x => F x t) (F' t) x₀)

IntervalIntegrable F' μ a b ∧ HasFDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' t ∂μ) x₀


@[simp]
theorem toNat_ofENat (n : ℕ∞) : toNat n = ENat.toNat n


theorem iteratedFDeriv_add_apply {i : ℕ} {f g : E → F} (hf : ContDiff 𝕜 i f) (hg : ContDiff 𝕜 i g) :
    iteratedFDeriv 𝕜 i (f + g) x = iteratedFDeriv 𝕜 i f x + iteratedFDeriv 𝕜 i g x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{i : ℕ}
{f g : E → F}
(hf : ContDiff 𝕜 (↑i) f)
(hg : ContDiff 𝕜 (↑i) g)


@[to_additive]
lemma mulSupport_iInf [ConditionallyCompleteLattice M] [Nonempty ι] (f : ι → α → M) :
    mulSupport (fun x ↦ ⨅ i, f i x) ⊆ ⋃ i, mulSupport (f i)

{ι : Sort u_1}
{α : Type u_2}
{M : Type u_4}
[One M]
[ConditionallyCompleteLattice M]
[Nonempty ι]
(f : ι → α → M)

(Function.mulSupport fun x => ⨅ i, f i x) ⊆ ⋃ i, Function.mulSupport (f i)


theorem mem_centralizer_iff {s : Set A} {z : A} : z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g

(R : Type u)
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}
{z : A}

z ∈ Subalgebra.centralizer R s ↔ ∀ g ∈ s, g * z = z * g


@[to_additive]
theorem mul_iff_right [CommGroup β] [TopologicalGroup β] (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (f * g) μ ↔ AEStronglyMeasurable g μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (f + g) μ ↔ MeasureTheory.AEStronglyMeasurable g μ


theorem isLeast_opNorm [RingHomIsometric σ₁₂] (f : E →SL[σ₁₂] F) :
    IsLeast {c | 0 ≤ c ∧ ∀ x, ‖f x‖ ≤ c * ‖x‖} ‖f‖

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

IsLeast {c | 0 ≤ c ∧ ∀ (x : E), ‖f x‖ ≤ c * ‖x‖} ‖f‖


theorem orthogonalFamily_self :
    OrthogonalFamily 𝕜 (fun b => ↥(cond b K Kᗮ)) fun b => (cond b K Kᗮ).subtypeₗᵢ

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

OrthogonalFamily 𝕜 (fun b => ↥(bif b then K else Kᗮ)) fun b => (bif b then K else Kᗮ).subtypeₗᵢ


@[simp]
theorem ofInjective_symm_apply {α β} {f : α → β} (hf : Injective f) (a : α) :
    (ofInjective f hf).symm ⟨f a, ⟨a, rfl⟩⟩ = a

{α : Sort u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(a : α)

(Equiv.ofInjective f hf).symm ⟨f a, ⋯⟩ = a


/-- A commuting square of isomorphisms induces an isomorphism of kernels. -/
@[simps]
def kernel.mapIso {X' Y' : C} (f' : X' ⟶ Y') [HasKernel f'] (p : X ≅ X') (q : Y ≅ Y')
    (w : f ≫ q.hom = p.hom ≫ f') : kernel f ≅ kernel f'

(CategoryTheory.Limits.kernel.mapIso f f' p q w).inv = CategoryTheory.Limits.kernel.map f' f p.inv q.inv ⋯


/-- Composing on the left by a uniformly continuous function preserves
  uniform convergence on a set -/
theorem UniformContinuous.comp_tendstoUniformlyOn [UniformSpace γ] {g : β → γ}
    (hg : UniformContinuous g) (h : TendstoUniformlyOn F f p s) :
    TendstoUniformlyOn (fun i => g ∘ F i) (g ∘ f) p s

{α : Type u}
{β : Type v}
{γ : Type w}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
[UniformSpace γ]
{g : β → γ}
(hg : UniformContinuous g)
(h : TendstoUniformlyOn F f p s)


theorem map_mod_divByMonic [Ring S] (f : R →+* S) (hq : Monic q) :
    (p /ₘ q).map f = p.map f /ₘ q.map f ∧ (p %ₘ q).map f = p.map f %ₘ q.map f

{R : Type u}
{S : Type v}
[Ring R]
{p q : R[X]}
[Ring S]
(f : R →+* S)
(hq : q.Monic)

Polynomial.map f (p /ₘ q) = Polynomial.map f p /ₘ Polynomial.map f q ∧
  Polynomial.map f (p %ₘ q) = Polynomial.map f p %ₘ Polynomial.map f q


@[simp]
theorem mul_lt_iff_lt_one_left [MulPosStrictMono α] [MulPosReflectLT α] (b0 : 0 < b) :
    a * b < b ↔ a < 1

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosStrictMono α]
[MulPosReflectLT α]
(b0 : 0 < b)


/-- A rewrite lemma for `padicValRat p (q^k)` with condition `q ≠ 0`. -/
protected theorem pow {q : ℚ} (hq : q ≠ 0) {k : ℕ} :
    padicValRat p (q ^ k) = k * padicValRat p q

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{q : ℚ}
(hq : q ≠ 0)
{k : ℕ}

padicValRat p (q ^ k) = ↑k * padicValRat p q


theorem irreducible_of_factor {a : α} : ∀ x : α, x ∈ factors a → Irreducible x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a : α}
(x : α)

x ∈ UniqueFactorizationMonoid.factors a → Irreducible x


/-- `K` and `Kᗮ` have trivial intersection. -/
theorem inf_orthogonal_eq_bot : K ⊓ Kᗮ = ⊥


@[measurability]
protected theorem MeasurableSet.prod {s : Set α} {t : Set β} (hs : MeasurableSet s)
    (ht : MeasurableSet t) : MeasurableSet (s ×ˢ t)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set α}
{t : Set β}
(hs : MeasurableSet s)
(ht : MeasurableSet t)


/-- A sum is finite iff all terms are finite. -/
lemma sum_lt_top_iff : ∑ i ∈ s, f i < ⊤ ↔ ∀ i ∈ s, f i < ⊤

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
[LT α]
{s : Finset ι}
{f : ι → WithTop α}


theorem add_right_cancel {a b : Ordinal} (n : ℕ) : a + n = b + n ↔ a = b


@[ext]
theorem ext (f g : α →o β) (h : (f : α → β) = g) : f = g

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f g : α →o β)
(h : ⇑f = ⇑g)


theorem exists_succ_iterate_iff_le : (∃ n, succ^[n] a = b) ↔ a ≤ b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
[IsSuccArchimedean α]
{a b : α}


theorem nullMeasurableSet_lt' [SecondCountableTopology α] {μ : Measure (α × α)} :
    NullMeasurableSet { p : α × α | p.1 < p.2 } μ

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[LinearOrder α]
[OrderClosedTopology α]
[SecondCountableTopology α]
{μ : MeasureTheory.Measure (α × α)}

MeasureTheory.NullMeasurableSet {p | p.1 < p.2} μ


theorem sups_inter_subset_right : s ⊻ (t₁ ∩ t₂) ⊆ s ⊻ t₁ ∩ s ⊻ t₂

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

s ⊻ (t₁ ∩ t₂) ⊆ s ⊻ t₁ ∩ s ⊻ t₂


@[simp]
theorem mem_erase {a a' : α} {s : Finmap β} : a' ∈ erase a s ↔ a' ≠ a ∧ a' ∈ s

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a a' : α}
{s : Finmap β}


@[simp, nolint simpNF]
theorem cmp_toDual [LT α] [@DecidableRel α (· < ·)] (x y : α) :
    cmp (toDual x) (toDual y) = cmp y x

{α : Type u_1}
[LT α]
[DecidableRel fun x x_1 => x < x_1]
(x y : α)

cmp (OrderDual.toDual x) (OrderDual.toDual y) = cmp y x


@[reassoc (attr := simp)]
theorem HasLimit.lift_isoOfNatIso_hom {F G : J ⥤ C} [HasLimit F] [HasLimit G] (t : Cone F)
    (w : F ≅ G) :
    limit.lift F t ≫ (HasLimit.isoOfNatIso w).hom =
      limit.lift G ((Cones.postcompose w.hom).obj _)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
[CategoryTheory.Limits.HasLimit G]
(t : CategoryTheory.Limits.Cone F)
(w : F ≅ G)

CategoryTheory.Limits.limit.lift F t ≫ (CategoryTheory.Limits.HasLimit.isoOfNatIso w).hom =
  CategoryTheory.Limits.limit.lift G ((CategoryTheory.Limits.Cones.postcompose w.hom).obj t)


@[simp]
theorem colimit.cocone_x {F : J ⥤ C} [HasColimit F] : (colimit.cocone F).pt = colimit F

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasColimit F]

(CategoryTheory.Limits.colimit.cocone F).pt = CategoryTheory.Limits.colimit F


/-- An ideal which contains an element within `1` of `1 : R` is the unit ideal. -/
theorem eq_top_of_norm_lt_one (I : Ideal R) {x : R} (hxI : x ∈ I) (hx : ‖1 - x‖ < 1) : I = ⊤

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
(I : Ideal R)
{x : R}
(hxI : x ∈ I)
(hx : ‖1 - x‖ < 1)


theorem dioph_comp2 {S : ℕ → ℕ → Prop} (d : Dioph fun v : Vector3 ℕ 2 => S (v &0) (v &1)) :
    Dioph fun v => S (f v) (g v)

(d : Dioph fun v => S (v (Fin2.ofNat' 0)) (v (Fin2.ofNat' 1)))


theorem toOuterMeasure_eq_inducedOuterMeasure :
    μ.toOuterMeasure = inducedOuterMeasure (fun s _ => μ s) MeasurableSet.empty μ.empty

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

μ.toOuterMeasure = MeasureTheory.inducedOuterMeasure (fun s x => μ s) ⋯ ⋯


@[to_additive]
theorem numerator_isUnit (s : S) : IsUnit (numeratorHom (s : R) : R[S⁻¹])

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


/-- Given a cocone over `F ⋙ G`, we can construct a `Cocone G` with the same cocone point.
-/
@[simps]
def extendCocone : Cocone (F ⋙ G) ⥤ Cocone G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
[F.Final]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{G : CategoryTheory.Functor D E}

∀ {X Y : CategoryTheory.Limits.Cocone (F.comp G)} (f : X ⟶ Y),
  (CategoryTheory.Functor.Final.extendCocone.map f).hom = f.hom


theorem map_injective {p : α → Prop} {q : β → Prop} {f : α → β} (h : ∀ a, p a → q (f a))
    (hf : Injective f) : Injective (map f h)

{α : Sort u_1}
{β : Sort u_2}
{p : α → Prop}
{q : β → Prop}
{f : α → β}
(h : ∀ (a : α), p a → q (f a))
(hf : Function.Injective f)


theorem ContDiffWithinAt.differentiableWithinAt (h : ContDiffWithinAt 𝕜 n f s x) (hn : 1 ≤ n) :
    DifferentiableWithinAt 𝕜 f s x

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


theorem hasBasis_opens_closure (x : X) : (𝓝 x).HasBasis (fun s => x ∈ s ∧ IsOpen s) closure

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
(x : X)


@[scoped simp]
theorem map_add_nat' [AddMonoidWithOne G] [AddMonoid H] [AddConstMapClass F G H 1 b]
    (f : F) (x : G) (n : ℕ) : f (x + n) = f x + n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{b : H}
[AddMonoidWithOne G]
[AddMonoid H]
[AddConstMapClass F G H 1 b]
(f : F)
(x : G)
(n : ℕ)


@[fun_prop, measurability]
theorem Measurable.comp_aemeasurable' [MeasurableSpace δ] {f : α → δ} {g : δ → β}
    (hg : Measurable g) (hf : AEMeasurable f μ) : AEMeasurable (fun x ↦ g (f x)) μ

{α : Type u_1}
{β : Type u_2}
{δ : Type u_4}
{m : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
[MeasurableSpace δ]
{f : α → δ}
{g : δ → β}
(hg : Measurable g)
(hf : AEMeasurable f μ)


@[simp]
theorem preimage_const_sub_Iic : (fun x => a - x) ⁻¹' Iic b = Ici (a - b)

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

(fun x => a - x) ⁻¹' Set.Iic b = Set.Ici (a - b)


@[simp (high)]
theorem commRingIsoToRingEquiv_symm_toRingHom {X Y : CommRingCat} (i : X ≅ Y) :
    i.commRingCatIsoToRingEquiv.symm.toRingHom = i.inv


theorem unbounded_lt_of_unbounded_le [Preorder α] (h : Unbounded (· ≤ ·) s) : Unbounded (· < ·) s

(h : Set.Unbounded (fun x x_1 => x ≤ x_1) s)


@[simp]
theorem coe_of (α : Type*) [OmegaCompletePartialOrder α] : ↥(of α) = α

(α : Type u_1)
[OmegaCompletePartialOrder α]


theorem coimageImageComparison_app :
    coimageImageComparison (α.app X) =
      (coimageObjIso α X).inv ≫ (coimageImageComparison α).app X ≫ (imageObjIso α X).hom

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

CategoryTheory.Abelian.coimageImageComparison (α.app X) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Abelian.FunctorCategory.coimageObjIso α X).inv
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.Abelian.coimageImageComparison α).app X)
      (CategoryTheory.Abelian.FunctorCategory.imageObjIso α X).hom)


/-- The Banach open mapping theorem: a surjective bounded linear map between Banach spaces is
open. -/
protected theorem isOpenMap (surj : Surjective f) : IsOpenMap f

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


@[ext]
theorem ext {X Y : SheafedSpace C} {α β : X ⟶ Y} (w : α.base = β.base)
    (h : α.c ≫ whiskerRight (eqToHom (by rw [w])) _ = β.c) : α = β

{X Y : AlgebraicGeometry.SheafedSpace C}

(h : α.c ≫ CategoryTheory.whiskerRight (CategoryTheory.eqToHom ⋯) X.presheaf = β.c)


lemma inverts :
    (W.functorCategory (Discrete J)).IsInvertedBy (lim ⋙ L)

(W.functorCategory (CategoryTheory.Discrete J)).IsInvertedBy (CategoryTheory.Limits.lim.comp L)


theorem congr_map {U V : Type*} [Quiver U] [Quiver V] (F : U ⥤q V) {X Y : U} {f g : X ⟶ Y}
    (h : f = g) : F.map f = F.map g

{U : Type u_1}
{V : Type u_2}
[Quiver U]
[Quiver V]
(F : U ⥤q V)
{X Y : U}
{f g : X ⟶ Y}
(h : f = g)


@[simp] theorem UInt16.toNat_ofNat (n) :
    (no_index (OfNat.ofNat n) : UInt16).toNat = n % UInt16.size


@[simp]
theorem eLpNorm'_neg {f : α → F} : eLpNorm' (-f) q μ = eLpNorm' f q μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}

MeasureTheory.eLpNorm' (-f) q μ = MeasureTheory.eLpNorm' f q μ


theorem log_div (hx : x ≠ 0) (hy : y ≠ 0) : log (x / y) = log x - log y

Real.log (x / y) = Real.log x - Real.log y


/-- Multiplicity of the ideal norm, for powers of prime ideals. -/
theorem cardQuot_pow_of_prime [IsDedekindDomain S] {i : ℕ} :
    cardQuot (P ^ i) = cardQuot P ^ i

{S : Type u_1}
[CommRing S]
{P : Ideal S}
[P_prime : P.IsPrime]
(hP : P ≠ ⊥)
[IsDedekindDomain S]
{i : ℕ}

Submodule.cardQuot (P ^ i) = Submodule.cardQuot P ^ i


/-- The equivalence between `SemilatSupCat` and `SemilatInfCat` induced by `OrderDual` both ways. -/
@[simps functor inverse]
def SemilatSupCatEquivSemilatInfCat : SemilatSupCat ≌ SemilatInfCat


@[simp]
theorem deriv_sqrt (hf : DifferentiableAt ℝ f x) (hx : f x ≠ 0) :
    deriv (fun x => √(f x)) x = deriv f x / (2 * √(f x))

{f : ℝ → ℝ}
{x : ℝ}
(hf : DifferentiableAt ℝ f x)
(hx : f x ≠ 0)


theorem DifferentiableWithinAt.congr (h : DifferentiableWithinAt 𝕜 f s x) (ht : ∀ x ∈ s, f₁ x = f x)
    (hx : f₁ x = f x) : DifferentiableWithinAt 𝕜 f₁ s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
{s : Set E}
(h : DifferentiableWithinAt 𝕜 f s x)
(ht : ∀ x ∈ s, f₁ x = f x)
(hx : f₁ x = f x)


theorem derivative_sub {f g : R[X]} : derivative (f - g) = derivative f - derivative g

Polynomial.derivative (f - g) = Polynomial.derivative f - Polynomial.derivative g


/-- We can swap `a` and `b` in a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2`. -/
theorem minimal_comm {a b c : ℤ} : Minimal a b c → Minimal b a c

Fermat42.Minimal a b c → Fermat42.Minimal b a c


/--
This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.
-/
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
    NormedAlgebra ℝ K, CompleteSpace K where
  re : K →+ ℝ
  im : K →+ ℝ
  /-- Imaginary unit in `K`. Meant to be set to `0` for `K = ℝ`. -/
  I : K
  I_re_ax : re I = 0
  I_mul_I_ax : I = 0 ∨ I * I = -1
  re_add_im_ax : ∀ z : K, 𝓚 (re z) + 𝓚 (im z) * I = z
  ofReal_re_ax : ∀ r : ℝ, re (𝓚 r) = r
  ofReal_im_ax : ∀ r : ℝ, im (𝓚 r) = 0
  mul_re_ax : ∀ z w : K, re (z * w) = re z * re w - im z * im w
  mul_im_ax : ∀ z w : K, im (z * w) = re z * im w + im z * re w
  conj_re_ax : ∀ z : K, re (conj z) = re z
  conj_im_ax : ∀ z : K, im (conj z) = -im z
  conj_I_ax : conj I = -I
  norm_sq_eq_def_ax : ∀ z : K, ‖z‖ ^ 2 = re z * re z + im z * im z
  mul_im_I_ax : ∀ z : K, im z * im I = im z
  /-- only an instance in the `ComplexOrder` locale -/
  [toPartialOrder : PartialOrder K]
  le_iff_re_im {z w : K} : z ≤ w ↔ re z ≤ re w ∧ im z = im w
  -- note we cannot put this in the `extends` clause
  [toDecidableEq : DecidableEq K]

{K : semiOutParam (Type u_1)}
[self : RCLike K]
{z w : K}

z ≤ w ↔ RCLike.re z ≤ RCLike.re w ∧ RCLike.im z = RCLike.im w


theorem one_le_pow_iff_of_nonneg (ha : 0 ≤ a) (hn : n ≠ 0) : 1 ≤ a ^ n ↔ 1 ≤ a

{R : Type u_3}
[LinearOrderedSemiring R]
{a : R}
{n : ℕ}
(ha : 0 ≤ a)
(hn : n ≠ 0)


lemma growsPolynomially_deriv_rpow_p_mul_one_add_smoothingFn (p : ℝ) :
    GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 + ε z)) x‖

AkraBazziRecurrence.GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) x‖


@[to_additive]
theorem comap_mono {f : G →* N} {K K' : Subgroup N} : K ≤ K' → comap f K ≤ comap f K'

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{K K' : AddSubgroup N}

K ≤ K' → AddSubgroup.comap f K ≤ AddSubgroup.comap f K'


@[to_additive]
theorem smul_singleton (b : β) : s • ({b} : Finset β) = s.image (· • b)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset α}
(b : β)

s • {b} = Finset.image (fun x => x • b) s


@[to_additive]
theorem disjoint_image_image_iff {U V : Set α} :
    letI := orbitRel G α
    Disjoint (Quotient.mk' '' U) (Quotient.mk' '' V) ↔ ∀ x ∈ U, ∀ g : G, g • x ∉ V

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

Disjoint (Quotient.mk' '' U) (Quotient.mk' '' V) ↔ ∀ x ∈ U, ∀ (g : G), g +ᵥ x ∉ V


@[reassoc (attr := simp)]
lemma iCycles_d : K.iCycles i ≫ K.d i j = 0


theorem zero_snd : (0 : 𝓜(𝕜, A)).snd = 0

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]


/-- Any open cover of a paracompact space has a locally finite *precise* refinement, that is,
one indexed on the same type with each open set contained in the corresponding original one. -/
theorem precise_refinement [ParacompactSpace X] (u : ι → Set X) (uo : ∀ a, IsOpen (u a))
    (uc : ⋃ i, u i = univ) : ∃ v : ι → Set X, (∀ a, IsOpen (v a)) ∧ ⋃ i, v i = univ ∧
    LocallyFinite v ∧ ∀ a, v a ⊆ u a

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
[ParacompactSpace X]
(u : ι → Set X)
(uo : ∀ (a : ι), IsOpen (u a))
(uc : ⋃ i, u i = Set.univ)

∃ v, (∀ (a : ι), IsOpen (v a)) ∧ ⋃ i, v i = Set.univ ∧ LocallyFinite v ∧ ∀ (a : ι), v a ⊆ u a


/-- The exponential map in a complete normed field `𝕂` of characteristic zero has derivative
`1` at zero, as long as it converges on a neighborhood of zero. -/
theorem hasDerivAt_exp_zero_of_radius_pos (h : 0 < (expSeries 𝕂 𝕂).radius) :
    HasDerivAt (exp 𝕂) (1 : 𝕂) 0

(h : 0 < (NormedSpace.expSeries 𝕂 𝕂).radius)


/-- A version of `WithBot.map` for order embeddings. -/
@[simps (config := .asFn)]
protected def withBotMap (f : α ↪o β) : WithBot α ↪o WithBot β

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : α ↪o β)


/-- `span` is a semiring homomorphism (recall multiplication is pointwise multiplication of subsets
on either side). -/
@[simps]
def span.ringHom : SetSemiring A →+* Submodule R A

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(s : SetSemiring A)

Submodule.span.ringHom s = Submodule.span R (SetSemiring.down s)


@[simp]
theorem setToL1SCLM_zero_left (hT : DominatedFinMeasAdditive μ (0 : Set α → E →L[ℝ] F) C)
    (f : α →₁ₛ[μ] E) : setToL1SCLM α E μ hT f = 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ 0 C)

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f = 0


theorem orthogonalProjection_coe_linearMap_eq_linearProj [HasOrthogonalProjection K] :
    (orthogonalProjection K : E →ₗ[𝕜] K) =
      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace

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

↑(orthogonalProjection K) = K.linearProjOfIsCompl Kᗮ ⋯


/-- The even subalgebras of the algebras with quadratic form `Q` and `-Q` are isomorphic.

Stated another way, `𝒞ℓ⁺(p,q,r)` and `𝒞ℓ⁺(q,p,r)` are isomorphic. -/
@[simps!]
def evenEquivEvenNeg : CliffordAlgebra.even Q ≃ₐ[R] CliffordAlgebra.even (-Q)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(a : ↥(CliffordAlgebra.even Q))

(CliffordAlgebra.evenEquivEvenNeg Q) a = (CliffordAlgebra.evenToNeg Q (-Q) ⋯) a


/-- A `Subalgebra` is `FiniteDimensional` iff it is `FiniteDimensional` as a submodule. -/
theorem Subalgebra.finiteDimensional_toSubmodule {S : Subalgebra F E} :
    FiniteDimensional F (Subalgebra.toSubmodule S) ↔ FiniteDimensional F S

{F : Type u_1}
{E : Type u_2}
[Field F]
[Ring E]
[Algebra F E]
{S : Subalgebra F E}

FiniteDimensional F ↥(Subalgebra.toSubmodule S) ↔ FiniteDimensional F ↥S


@[to_additive]
theorem prod_range_div' {M : Type*} [CommGroup M] (f : ℕ → M) (n : ℕ) :
    (∏ i ∈ range n, f i / f (i + 1)) = f 0 / f n

{M : Type u_6}
[CommGroup M]
(f : ℕ → M)
(n : ℕ)

∏ i ∈ Finset.range n, f i / f (i + 1) = f 0 / f n


@[simp]
theorem quot_mul_zero (x : PGame) : (⟦x * 0⟧ : Game) = ⟦0⟧


@[simp]
theorem union_inter_cancel_left {s t : Finset α} : (s ∪ t) ∩ s = s

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


@[simp]
theorem fourier_coe_apply' {n : ℤ} {x : ℝ} :
    toCircle (n • (x : AddCircle T) :) = Complex.exp (2 * π * Complex.I * n * x / T)

↑(AddCircle.toCircle (n • ↑x)) = Complex.exp (2 * ↑π * Complex.I * ↑n * ↑x / ↑T)


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv α] (a : α) : ((a⁻¹ : α) : WithOne α) = (a : WithOne α)⁻¹

↑a⁻¹ = (↑a)⁻¹


@[reassoc (attr := simp)]
lemma whiskerRight_app_fst {F₁ F₁' : J ⥤ C} (f : F₁ ⟶ F₁') (F₂ : J ⥤ C) (j : J) :
    (f ▷ F₂).app j ≫ fst _ _ = fst _ _ ≫ f.app j

{J : Type u_1}
{C : Type u_2}
[CategoryTheory.Category.{u_3, u_1} J]
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.ChosenFiniteProducts C]
{F₁ F₁' : CategoryTheory.Functor J C}
(f : F₁ ⟶ F₁')
(F₂ : CategoryTheory.Functor J C)
(j : J)

CategoryTheory.CategoryStruct.comp ((CategoryTheory.MonoidalCategory.whiskerRight f F₂).app j)
    (CategoryTheory.ChosenFiniteProducts.fst (F₁'.obj j) (F₂.obj j)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ChosenFiniteProducts.fst (F₁.obj j) (F₂.obj j)) (f.app j)


theorem stdBasis_eq_pi_diag (i : ι) : stdBasis R φ i = pi (diag i)

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
(φ : ι → Type u_3)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(i : ι)

LinearMap.stdBasis R φ i = LinearMap.pi (LinearMap.diag i)


theorem erase_inter_comm (s t : Finset α) (a : α) : s.erase a ∩ t = s ∩ t.erase a

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


theorem tendsto_gauge_nhds_zero (hs : s ∈ 𝓝 0) : Tendsto (gauge s) (𝓝 0) (𝓝 0)

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
[TopologicalSpace E]
[ContinuousSMul ℝ E]
(hs : s ∈ 𝓝 0)


@[simp]
theorem liftHom_map (h : IsAdjoinRoot S f) (z : R[X]) : h.liftHom x hx' (h.map z) = aeval x z

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
{T : Type u_1}
[CommRing T]
{x : T}
[Algebra R T]
(hx' : (Polynomial.aeval x) f = 0)
(h : IsAdjoinRoot S f)
(z : R[X])

(IsAdjoinRoot.liftHom x hx' h) (h.map z) = (Polynomial.aeval x) z


lemma SpectrumRestricts.nnreal_add {a b : A} (ha₁ : IsSelfAdjoint a)
    (hb₁ : IsSelfAdjoint b) (ha₂ : SpectrumRestricts a ContinuousMap.realToNNReal)
    (hb₂ : SpectrumRestricts b ContinuousMap.realToNNReal) :
    SpectrumRestricts (a + b) ContinuousMap.realToNNReal

(ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal)

(hb₂ : SpectrumRestricts b ⇑ContinuousMap.realToNNReal)

SpectrumRestricts (a + b) ⇑ContinuousMap.realToNNReal


theorem finite_of_fg_torsion [CommGroup G] [Group.FG G] (hG : Monoid.IsTorsion G) : Finite G

(G : Type u)
[CommGroup G]
[Group.FG G]
(hG : Monoid.IsTorsion G)


theorem StrictMono.apply_eq_bot_iff (hf : StrictMono f) : f a = f ⊥ ↔ a = ⊥

{α : Type u}
{β : Type v}
[PartialOrder α]
[OrderBot α]
[Preorder β]
{f : α → β}
{a : α}
(hf : StrictMono f)


theorem add_le_mul [ZeroLEOneClass α] [NeZero (R := α) 1]
    [MulPosStrictMono α] [PosMulStrictMono α] [CovariantClass α α (· + ·) (· ≤ ·)]
    (a2 : 2 ≤ a) (b2 : 2 ≤ b) : a + b ≤ a * b

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


lemma inv_add_inv_conj_ennreal : (p⁻¹ + q⁻¹ : ℝ≥0∞) = 1

↑p⁻¹ + ↑q⁻¹ = 1


lemma isLocalHomeomorph_expMapCircle : IsLocalHomeomorph expMapCircle


theorem cycleType_def (σ : Perm α) :
    σ.cycleType = σ.cycleFactorsFinset.1.map (Finset.card ∘ support)

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(σ : Equiv.Perm α)

σ.cycleType = Multiset.map (Finset.card ∘ Equiv.Perm.support) σ.cycleFactorsFinset.val


theorem Convex.gauge_le (hs : Convex ℝ s) (h₀ : (0 : E) ∈ s) (absorbs : Absorbent ℝ s) (a : ℝ) :
    Convex ℝ { x | gauge s x ≤ a }

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
(hs : Convex ℝ s)
(h₀ : 0 ∈ s)
(absorbs : Absorbent ℝ s)
(a : ℝ)


theorem bound_aux (hd : d ≠ 0) (hn : 2 ≤ n) :
    (d ^ (n - 2 :) / n : ℝ) ≤ rothNumberNat ((2 * d - 1) ^ n)

↑d ^ (n - 2) / ↑n ≤ ↑(rothNumberNat ((2 * d - 1) ^ n))


theorem mem_diff_of_mem {a : α} : ∀ {l₁ l₂ : List α}, a ∈ l₁ → a ∉ l₂ → a ∈ l₁.diff l₂

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


theorem tendsto_atTop_nhds [Nonempty α] [SemilatticeSup α] {f : α → X} :
    Tendsto f atTop (𝓝 x) ↔ ∀ U : Set X, x ∈ U → IsOpen U → ∃ N, ∀ n, N ≤ n → f n ∈ U

{X : Type u}
{α : Type u_1}
{x : X}
[TopologicalSpace X]
[Nonempty α]
[SemilatticeSup α]
{f : α → X}

Filter.Tendsto f Filter.atTop (𝓝 x) ↔ ∀ (U : Set X), x ∈ U → IsOpen U → ∃ N, ∀ (n : α), N ≤ n → f n ∈ U


theorem parallel_empty (S : WSeq (Computation α)) (h : S.head ~> none) : parallel S = empty _

{α : Type u}
(S : Stream'.WSeq (Computation α))
(h : S.head.Promises none)

Computation.parallel S = Computation.empty α


theorem dist_eq_iff_eq_sinh :
    dist z w = r ↔ dist (z : ℂ) w / (2 * √(z.im * w.im)) = sinh (r / 2)

dist z w = r ↔ dist ↑z ↑w / (2 * √(z.im * w.im)) = Real.sinh (r / 2)


protected theorem Sublist.filterMap (f : α → Option β) (s : l₁ <+ l₂) :
    filterMap f l₁ <+ filterMap f l₂

{α : Type u_1}
{β : Type u_2}
{l₁ l₂ : List α}
(f : α → Option β)
(s : l₁ <+ l₂)

List.filterMap f l₁ <+ List.filterMap f l₂


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

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


@[to_additive (attr := simp)]
theorem smul_finset_univ [Fintype β] : a • (univ : Finset β) = univ

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[Group α]
[MulAction α β]
{a : α}
[Fintype β]


theorem coeHom_injective : Function.Injective (coeHom E F)

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]

Function.Injective ⇑(SchwartzMap.coeHom E F)


/-- A lower set is Lawson closed if and only if it is closed under sups of directed sets -/
lemma lawsonClosed_iff_dirSupClosed_of_isLowerSet (s : Set α) (h : IsLowerSet s) :
    IsClosed[L] s ↔ DirSupClosed s

{α : Type u_1}
[Preorder α]
(L S : TopologicalSpace α)
[Topology.IsLawson α]
[Topology.IsScott α]
(s : Set α)
(h : IsLowerSet s)


@[push_cast, simp]
theorem intCast_mod (a : ℤ) (b : ℕ) : ((a % b : ℤ) : ZMod b) = (a : ZMod b)


theorem eq_comp_inv (α : X ≅ Y) {f : Z ⟶ Y} {g : Z ⟶ X} : g = f ≫ α.inv ↔ g ≫ α.hom = f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
(α : X ≅ Y)
{f : Z ⟶ Y}
{g : Z ⟶ X}

g = CategoryTheory.CategoryStruct.comp f α.inv ↔ CategoryTheory.CategoryStruct.comp g α.hom = f


theorem dualAnnihilator_inj {W W' : Subspace K V} :
    W.dualAnnihilator = W'.dualAnnihilator ↔ W = W'

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
{W W' : Subspace K V}

Submodule.dualAnnihilator W = Submodule.dualAnnihilator W' ↔ W = W'


lemma HomologicalComplex.homologyFunctor_inverts_quasiIso (i : ι) :
    (quasiIso C c).IsInvertedBy (homologyFunctor C c i)

(HomologicalComplex.quasiIso C c).IsInvertedBy (HomologicalComplex.homologyFunctor C c i)


@[simp, norm_cast]
theorem natCoe_mul [Semiring R] {f g : ArithmeticFunction ℕ} :
    (↑(f * g) : ArithmeticFunction R) = f * g

{R : Type u_1}
[Semiring R]
{f g : ArithmeticFunction ℕ}


theorem ule_eq_carry (x y : BitVec w) : x.ule y = carry w y (~~~x) true


@[to_additive]
theorem mulIndicator_union_of_not_mem_inter (h : a ∉ s ∩ t) (f : α → M) :
    mulIndicator (s ∪ t) f a = mulIndicator s f a * mulIndicator t f a

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

(s ∪ t).mulIndicator f a = s.mulIndicator f a * t.mulIndicator f a


/-- `b < sSup s` when there is an element `a` in `s` with `b < a`, when `s` is bounded above.
This is essentially an iff, except that the assumptions for the two implications are
slightly different (one needs boundedness above for one direction, nonemptiness and linear
order for the other one), so we formulate separately the two implications, contrary to
the `CompleteLattice` case. -/
theorem lt_csSup_of_lt (hs : BddAbove s) (ha : a ∈ s) (h : b < a) : b < sSup s

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a b : α}
(hs : BddAbove s)
(ha : a ∈ s)
(h : b < a)


theorem surjective_of_epi [Epi f] : Function.Surjective f

{A B : Grp}
(f : A ⟶ B)
[CategoryTheory.Epi f]


@[to_additive (attr := simp)]
theorem empty_smul : (∅ : Set α) • t = ∅

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{t : Set β}


theorem le_succ_of_isLimit {o} (h : IsLimit o) {a} : o ≤ succ a ↔ o ≤ a

{o : Ordinal.{u_4}}
(h : o.IsLimit)
{a : Ordinal.{u_4}}


theorem Eventually.exists_measurable_mem_of_smallSets {f : Filter α} [IsMeasurablyGenerated f]
    {p : Set α → Prop} (h : ∀ᶠ s in f.smallSets, p s) : ∃ s ∈ f, MeasurableSet s ∧ p s

(h : ∀ᶠ (s : Set α) in f.smallSets, p s)


theorem convs'_stable_of_terminated (n_le_m : n ≤ m) (terminatedAt_n : g.TerminatedAt n) :
    g.convs' m = g.convs' n

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


theorem norm_def : ‖f‖ = max ‖f 0‖ ‖f.contLinear‖

{𝕜 : Type u_1}
{V : Type u_3}
{W : Type u_4}
[NormedAddCommGroup V]
[NormedAddCommGroup W]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 V]
[NormedSpace 𝕜 W]
(f : V →ᴬ[𝕜] W)


theorem rightRel_r_eq_rightCosetEquivalence :
    @Setoid.r _ (QuotientGroup.rightRel s) = RightCosetEquivalence s

{α : Type u_1}
[Group α]
(s : Subgroup α)


@[simp] theorem RingHom.comp_id_commRingCat
    {G : CommRingCat.{u}} {H : Type u} [CommRing H] (f : G →+* H) : f.comp (𝟙 G) = f

{G : CommRingCat}
{H : Type u}
[CommRing H]
(f : ↑G →+* H)


@[to_additive]
lemma mulIndicator_le_one (h : ∀ a ∈ s, f a ≤ 1) (a : α) : mulIndicator s f a ≤ 1

{α : Type u_2}
{M : Type u_4}
[Preorder M]
[One M]
{s : Set α}
{f : α → M}
(h : ∀ a ∈ s, f a ≤ 1)
(a : α)


theorem monic_normalize [DecidableEq R] (hp0 : p ≠ 0) : Monic (normalize p)

{R : Type u}
[Field R]
{p : R[X]}
[DecidableEq R]
(hp0 : p ≠ 0)


theorem listFilterMap {f : α → List β} {g : α → β → Option σ}
    (hf : Primrec f) (hg : Primrec₂ g) : Primrec fun a => (f a).filterMap (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → List β}
{g : α → β → Option σ}
(hf : Primrec f)
(hg : Primrec₂ g)

Primrec fun a => List.filterMap (g a) (f a)


protected theorem Monotone.monovary (hf : Monotone f) (hg : Monotone g) : Monovary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
[LinearOrder ι]
(hf : Monotone f)
(hg : Monotone g)


theorem tr_supports {S : Finset Λ} (ss : Supports M S) : Supports (tr enc dec M) (trSupp M S)

{Γ : Type u_1}
{Λ : Type u_2}
[Inhabited Λ]
{σ : Type u_3}
{n : ℕ}
{enc : Γ → Mathlib.Vector Bool n}
(dec : Mathlib.Vector Bool n → Γ)
(M : Λ → Turing.TM1.Stmt Γ Λ σ)
[Fintype Γ]
{S : Finset Λ}
(ss : Turing.TM1.Supports M S)

Turing.TM1.Supports (Turing.TM1to1.tr enc dec M) (Turing.TM1to1.trSupp M S)


theorem RingHom.IsIntegralElem.mul {x y : S} (hx : f.IsIntegralElem x) (hy : f.IsIntegralElem y) :
    f.IsIntegralElem (x * y)

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
{x y : S}
(hx : f.IsIntegralElem x)
(hy : f.IsIntegralElem y)


protected theorem lt_or_eq_of_le {n m : Nat} (h : n ≤ m) : n < m ∨ n = m


protected theorem Finset.isClosed [T1Space X] (s : Finset X) : IsClosed (s : Set X)

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
(s : Finset X)


theorem lift_unique' [FormallyUnramified R A] {C : Type u} [CommRing C]
    [Algebra R C] (f : B →ₐ[R] C) (hf : IsNilpotent <| RingHom.ker (f : B →+* C))
    (g₁ g₂ : A →ₐ[R] B) (h : f.comp g₁ = f.comp g₂) : g₁ = g₂

{R : Type u}
[CommSemiring R]
{A : Type u}
[Semiring A]
[Algebra R A]
{B : Type u}
[CommRing B]
[Algebra R B]
[Algebra.FormallyUnramified R A]
{C : Type u}
[CommRing C]
[Algebra R C]
(f : B →ₐ[R] C)
(hf : IsNilpotent (RingHom.ker ↑f))
(g₁ g₂ : A →ₐ[R] B)
(h : f.comp g₁ = f.comp g₂)


lemma of_isEquivalence (L : C ⥤ D) (W : MorphismProperty C)
    (hW : W ≤ MorphismProperty.isomorphisms C) [IsEquivalence L] :
    L.IsLocalization W

(hW : W ≤ CategoryTheory.MorphismProperty.isomorphisms C)


theorem symmDiff_right_surjective (a : α) : Surjective (a ∆ ·)

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


lemma comap_iInf (f : LatticeHom α β) (s : ι → Sublattice β) :
    (iInf s).comap f = ⨅ i, (s i).comap f

{ι : Sort u_1}
{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(s : ι → Sublattice β)

Sublattice.comap f (iInf s) = ⨅ i, Sublattice.comap f (s i)


@[simp]
lemma mk_id_comp [HasSmallLocalizedHom.{w} W X Y] [HasSmallLocalizedHom.{w} W X X]
    (α : SmallHom.{w} W X Y) :
    (mk W (𝟙 X)).comp α = α

[CategoryTheory.Localization.HasSmallLocalizedHom W X Y]

[CategoryTheory.Localization.HasSmallLocalizedHom W X X]

(α : CategoryTheory.Localization.SmallHom W X Y)

(CategoryTheory.Localization.SmallHom.mk W (CategoryTheory.CategoryStruct.id X)).comp α = α


@[simp]
theorem hasDerivWithinAt_diff_singleton :
    HasDerivWithinAt f f' (s \ {x}) x ↔ HasDerivWithinAt f f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}


theorem Associates.isAtom_iff {p : Associates M} (h₁ : p ≠ 0) : IsAtom p ↔ Irreducible p

{M : Type u_1}
[CancelCommMonoidWithZero M]
{p : Associates M}
(h₁ : p ≠ 0)


@[to_additive]
theorem one_rel (y : S) : r S 1 (y, y)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
(y : ↥S)


@[simp] theorem sub_imI : (a - b).imI = a.imI - b.imI

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a b : ℍ[R,c₁,c₂])


theorem eraseP_append_right :
    ∀ {l₁ : List α} l₂, (∀ b ∈ l₁, ¬p b) → eraseP p (l₁++l₂) = l₁ ++ l₂.eraseP p

{α : Type u_1}
{p : α → Bool}
{l₁ : List α}
(l₂ : List α)

(∀ (b : α), b ∈ l₁ → ¬p b = true) → List.eraseP p (l₁ ++ l₂) = l₁ ++ List.eraseP p l₂


theorem invariants_eq_top [ρ.IsTrivial] :
    invariants ρ = ⊤

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


/-- When both maps `S.f` and `S.g` of a short complex `S` are zero, this is the left homology map
data (for the identity of `S`) which relates the left homology data `ofZeros` and
`ofIsColimitCokernelCofork`. -/
@[simps]
def compatibilityOfZerosOfIsColimitCokernelCofork (hf : S.f = 0) (hg : S.g = 0)
    (c : CokernelCofork S.f) (hc : IsColimit c) :
    LeftHomologyMapData (𝟙 S) (LeftHomologyData.ofZeros S hf hg)
      (LeftHomologyData.ofIsColimitCokernelCofork S hg c hc)

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.LeftHomologyMapData.compatibilityOfZerosOfIsColimitCokernelCofork S hf hg c hc).φH =
  CategoryTheory.Limits.Cofork.π c


@[simp]
theorem val_zero : ∀ {n}, (0 : ZMod n).val = 0


theorem eq_false_of_ne_true : {b : Bool} → Not (Eq b true) → Eq b false


@[to_additive (attr := fun_prop) Continuous.nnnorm]
theorem Continuous.nnnorm' : Continuous f → Continuous fun x => ‖f x‖₊

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}


/-- Any open cover `c` of a closed interval `[a, b]` in ℝ can be refined to
  a finite partition into subintervals. -/
lemma exists_monotone_Icc_subset_open_cover_Icc {ι} {a b : ℝ} (h : a ≤ b) {c : ι → Set (Icc a b)}
    (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) : ∃ t : ℕ → Icc a b, t 0 = a ∧
      Monotone t ∧ (∃ m, ∀ n ≥ m, t n = b) ∧ ∀ n, ∃ i, Icc (t n) (t (n + 1)) ⊆ c i

{ι : Sort u_1}
{a b : ℝ}
(h : a ≤ b)
{c : ι → Set ↑(Set.Icc a b)}
(hc₁ : ∀ (i : ι), IsOpen (c i))
(hc₂ : Set.univ ⊆ ⋃ i, c i)

∃ t, ↑(t 0) = a ∧ Monotone t ∧ (∃ m, ∀ n ≥ m, ↑(t n) = b) ∧ ∀ (n : ℕ), ∃ i, Set.Icc (t n) (t (n + 1)) ⊆ c i


@[to_additive (attr := simp)]
theorem symm_mk (f : M ≃ N) (h) :
    (MulEquiv.mk f h).symm = ⟨f.symm, (MulEquiv.mk f h).symm_map_mul⟩

(h : ∀ (x y : M), f.toFun (x + y) = f.toFun x + f.toFun y)

{ toEquiv := f, map_add' := h }.symm = { toEquiv := f.symm, map_add' := ⋯ }


@[to_additive (attr := simp)]
lemma fiberEquivKer_apply (f : α →* H) (a : α) (g : f ⁻¹' {f a}) : f.fiberEquivKer a g = a⁻¹ * g

{α : Type u_1}
[AddGroup α]
{H : Type u_2}
[AddGroup H]
(f : α →+ H)
(a : α)
(g : ↑(⇑f ⁻¹' {f a}))


/-- The characterization of this multiplication on partially homogenous elements. -/
theorem tmul_coe_mul_coe_tmul {j₁ i₂ : ι} (a₁ : A) (b₁ : ℬ j₁) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      (-1 : ℤˣ)^(j₁ * i₂) • ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B))

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
{j₁ i₂ : ι}
(a₁ : A)
(b₁ : ↥(ℬ j₁))
(a₂ : ↥(𝒜 i₂))
(b₂ : B)

a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (-1) ^ (j₁ * i₂) • (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)


@[to_additive]
theorem Specializes.const_smul {x y : α} (h : x ⤳ y) (c : M) : (c • x) ⤳ (c • y)

{M : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
[SMul M α]
[ContinuousConstSMul M α]
{x y : α}
(h : x ⤳ y)
(c : M)


/-- The identity map, bundled as an equivalence between the subtypes of `s : Set α` and of
`h.toFinset : Finset α`, where `h` is a proof of finiteness of `s`. -/
@[simps!] def subtypeEquivToFinset : {x // x ∈ s} ≃ {x // x ∈ hs.toFinset}

{α : Type u}
{s : Set α}
(hs : s.Finite)
(a : { a // (fun x => x ∈ s) a })


/-- Constructor for isomorphisms in the category `SheafedSpace C`. -/
@[simps]
def isoMk {X Y : SheafedSpace C} (e : X.toPresheafedSpace ≅ Y.toPresheafedSpace) : X ≅ Y

{X Y : AlgebraicGeometry.SheafedSpace C}

(AlgebraicGeometry.SheafedSpace.isoMk e).hom = e.hom


/-- The symmetric definition of convolution where the bilinear operator is multiplication. -/
theorem convolution_mul_swap [NormedSpace ℝ 𝕜] {f : G → 𝕜} {g : G → 𝕜} :
    (f ⋆[mul 𝕜 𝕜, μ] g) x = ∫ t, f (x - t) * g t ∂μ

{𝕜 : Type u𝕜}
{G : Type uG}
{x : G}
[NontriviallyNormedField 𝕜]
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[AddCommGroup G]
[μ.IsAddLeftInvariant]
[μ.IsNegInvariant]
[MeasurableNeg G]
[MeasurableAdd G]
[NormedSpace ℝ 𝕜]
{f g : G → 𝕜}

MeasureTheory.convolution f g (ContinuousLinearMap.mul 𝕜 𝕜) μ x = ∫ (t : G), f (x - t) * g t ∂μ


theorem _root_.MeasureTheory.Integrable.condDistrib_ae (hX : AEMeasurable X μ)
    (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
    ∀ᵐ a ∂μ, Integrable (fun ω => f (X a, ω)) (condDistrib Y X μ (X a))

(hf_int : MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

∀ᵐ (a : α) ∂μ, MeasureTheory.Integrable (fun ω => f (X a, ω)) ((ProbabilityTheory.condDistrib Y X μ) (X a))


theorem coe_injective : Function.Injective (fun f : F ↦ (f : ∀ a : α, β a))

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


@[simp]
theorem bagInter_nil (l : List α) : l.bagInter [] = []

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


/-- A snake input in an abelian category `C` consists of morphisms
of short complexes `L₀ ⟶ L₁ ⟶ L₂ ⟶ L₃` (which should be visualized vertically) such
that `L₀` and `L₃` are respectively the kernel and the cokernel of `L₁ ⟶ L₂`,
`L₁` and `L₂` are exact, `L₁.g` is epi and `L₂.f` is mono. -/
structure SnakeInput where
  /-- the zeroth row -/
  L₀ : ShortComplex C
  /-- the first row -/
  L₁ : ShortComplex C
  /-- the second row -/
  L₂ : ShortComplex C
  /-- the third row -/
  L₃ : ShortComplex C
  /-- the morphism from the zeroth row to the first row -/
  v₀₁ : L₀ ⟶ L₁
  /-- the morphism from the first row to the second row -/
  v₁₂ : L₁ ⟶ L₂
  /-- the morphism from the second row to the third row -/
  v₂₃ : L₂ ⟶ L₃
  w₀₂ : v₀₁ ≫ v₁₂ = 0 := by aesop_cat
  w₁₃ : v₁₂ ≫ v₂₃ = 0 := by aesop_cat
  /-- `L₀` is the kernel of `v₁₂ : L₁ ⟶ L₂`. -/
  h₀ : IsLimit (KernelFork.ofι _ w₀₂)
  /-- `L₃` is the cokernel of `v₁₂ : L₁ ⟶ L₂`. -/
  h₃ : IsColimit (CokernelCofork.ofπ _ w₁₃)
  L₁_exact : L₁.Exact
  epi_L₁_g : Epi L₁.g
  L₂_exact : L₂.Exact
  mono_L₂_f : Mono L₂.f

(self : CategoryTheory.ShortComplex.SnakeInput C)


theorem toNNReal_sInf (s : Set ℝ≥0∞) (hs : ∀ r ∈ s, r ≠ ∞) :
    (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)


theorem support_embDomain_subset {f : Γ ↪o Γ'} {x : HahnSeries Γ R} :
    support (embDomain f x) ⊆ f '' x.support

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{Γ' : Type u_3}
[PartialOrder Γ']
{f : Γ ↪o Γ'}
{x : HahnSeries Γ R}

(HahnSeries.embDomain f x).support ⊆ ⇑f '' x.support


/-- The truncation of an `ℕ`-indexed cochain complex,
deleting the object at `0` and shifting everything else down.
-/
@[simps]
def truncate [HasZeroMorphisms V] : CochainComplex V ℕ ⥤ CochainComplex V ℕ

∀ {X Y : CochainComplex V ℕ} (f : X ⟶ Y) (i : ℕ), (CochainComplex.truncate.map f).f i = f.f (i + 1)


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

{c : CategoryTheory.Limits.Cocone F.unop}

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.isLimitConeOfCoconeUnop F hc).lift s = (hc.desc (CategoryTheory.Limits.coconeUnopOfCone s)).op


/-- The map between two sum-languages induced by maps on the two factors. -/
@[simps]
def sumMap : L.sum L₁ →ᴸ L'.sum L₂

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

∀ (a : L.Relations _n ⊕ L₁.Relations _n),
  (ϕ.sumMap ψ).onRelation a = Sum.map (fun f => ϕ.onRelation f) (fun f => ψ.onRelation f) a


/-- `SatisfiesM` distributes over `<*>`, strongest postcondition version. -/
protected theorem seq_post [Applicative m] [LawfulApplicative m] {x : m α}
    (hf : SatisfiesM p₁ f) (hx : SatisfiesM p₂ x) :
    SatisfiesM (fun c => ∃ f a, p₁ f ∧ p₂ a ∧ c = f a) (f <*> x)

{m : Type u_1 → Type u_2}
{α : Type u_1}

∀ {α_1 : Type u_1} {p₁ : (α → α_1) → Prop} {f : m (α → α_1)} {p₂ : α → Prop} [inst : Applicative m]
  [inst_1 : LawfulApplicative m] {x : m α},
  SatisfiesM p₁ f → SatisfiesM p₂ x → SatisfiesM (fun c => ∃ f a, p₁ f ∧ p₂ a ∧ c = f a) (Seq.seq f fun x_1 => x)


@[simp]
theorem sum_apply {α : Type*} (f : α → ContinuousMultilinearMap R M₁ M₂) (m : ∀ i, M₁ i)
    {s : Finset α} : (∑ a ∈ s, f a) m = ∑ a ∈ s, f a m


theorem iUnion_pNat_ptsOfPeriod : ⋃ n : ℕ+, ptsOfPeriod f n = periodicPts f

⋃ n, Function.ptsOfPeriod f ↑n = Function.periodicPts f


@[simp]
theorem apply_ne_one_iff [MulZeroOneClass α] [Nontrivial α] (h : IsAdjMatrix A) (i j : V) :
    ¬A i j = 1 ↔ A i j = 0

{V : Type u_1}
{α : Type u_2}
{A : Matrix V V α}
[MulZeroOneClass α]
[Nontrivial α]
(h : A.IsAdjMatrix)
(i j : V)


@[simp]
theorem eraseLead_X_pow (n : ℕ) : eraseLead (X ^ n : R[X]) = 0


theorem mul_def (e e' : X ≃ᵈ X) : e * e' = e'.trans e

{X : Type u_1}
[PseudoEMetricSpace X]
(e e' : X ≃ᵈ X)


/-- If a function `f a b` is such that `y ↦ f a b` is continuous for all `a`, and `a` lives in a
discrete space, then `f` is continuous, and vice versa. -/
theorem continuous_prod_of_discrete_left [DiscreteTopology α] {f : α × β → γ} :
    Continuous f ↔ ∀ a, Continuous (f ⟨a, ·⟩)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[DiscreteTopology α]
{f : α × β → γ}

Continuous f ↔ ∀ (a : α), Continuous fun x => f (a, x)


theorem mem_fixedPoints_iff {α : Type*} {f : α → α} {x : α} : x ∈ fixedPoints f ↔ f x = x


theorem card_roots' (p : R[X]) : Multiset.card p.roots ≤ natDegree p

{R : Type u}
[CommRing R]
[IsDomain R]
(p : Polynomial R)


theorem degree_natCast_le (n : ℕ) : degree (n : R[X]) ≤ 0


{α : Type u_1}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
{a b : α}


/-- A family of functions `α → β → γ` tends uniformly to its value at `x` if `α` is locally compact,
`β` is compact and `f` is continuous on `U × (univ : Set β)` for some neighborhood `U` of `x`. -/
theorem ContinuousOn.tendstoUniformly [LocallyCompactSpace α] [CompactSpace β] [UniformSpace γ]
    {f : α → β → γ} {x : α} {U : Set α} (hxU : U ∈ 𝓝 x) (h : ContinuousOn (↿f) (U ×ˢ univ)) :
    TendstoUniformly f (f x) (𝓝 x)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace α]
[UniformSpace β]
[LocallyCompactSpace α]
[CompactSpace β]
[UniformSpace γ]
{f : α → β → γ}
{x : α}
{U : Set α}
(hxU : U ∈ 𝓝 x)
(h : ContinuousOn (↿f) (U ×ˢ Set.univ))


@[simp]
theorem map_id : N.map LieModuleHom.id = N

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


theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g)

{α : Type u_1}
{ι : Type u_3}
{ι' : Type u_4}
[Lattice α]
[OrderBot α]
{f : ι → α}
{s : Finset ι'}
{g : ι' ↪ ι}

(Finset.map g s).SupIndep f ↔ s.SupIndep (f ∘ ⇑g)


@[simp]
theorem leftUnitor_hom (X : C) : (λ_ X).hom = coprod.desc (initial.to X) (𝟙 _)

(CategoryTheory.MonoidalCategory.leftUnitor X).hom =
  CategoryTheory.Limits.coprod.desc (CategoryTheory.Limits.initial.to X) (CategoryTheory.CategoryStruct.id X)


theorem nmul_def (a b : Ordinal) :
    a ⨳ b = sInf {c | ∀ a' < a, ∀ b' < b, a' ⨳ b ♯ a ⨳ b' < c ♯ a' ⨳ b'}


@[simp] lemma cons_add (x : α) (v : Fin n → α) (w : Fin n.succ → α) :
    vecCons x v + w = vecCons (x + vecHead w) (v + vecTail w)

{α : Type u_1}
{n : ℕ}
[Add α]
(x : α)
(v : Fin n → α)
(w : Fin n.succ → α)

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


@[to_additive]
theorem to_mulOpposite (h : UniqueMul A B a0 b0) :
    UniqueMul (B.map ⟨_, op_injective⟩) (A.map ⟨_, op_injective⟩) (op b0) (op a0)

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

UniqueMul (Finset.map { toFun := MulOpposite.op, inj' := ⋯ } B) (Finset.map { toFun := MulOpposite.op, inj' := ⋯ } A)
  (MulOpposite.op b0) (MulOpposite.op a0)


theorem isTheta_const_mul_right {c : 𝕜} {g : α → 𝕜} (hc : c ≠ 0) :
    (f =Θ[l] fun x ↦ c * g x) ↔ f =Θ[l] g

{α : Type u_1}
{E : Type u_3}
{𝕜 : Type u_14}
[Norm E]
[NormedField 𝕜]
{f : α → E}
{l : Filter α}
{c : 𝕜}
{g : α → 𝕜}
(hc : c ≠ 0)


theorem mem_append_iff {s' : Sym α m} : a ∈ s.append s' ↔ a ∈ s ∨ a ∈ s'

{α : Type u_1}
{n m : ℕ}
{s : Sym α n}
{a : α}
{s' : Sym α m}


theorem seq_singleton {s : Set (α → β)} {a : α} : Set.seq s {a} = (fun f : α → β => f a) '' s

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


lemma density_ae_eq_limitProcess (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) :
    (fun x ↦ density κ ν a x s)
      =ᵐ[ν a] (countableFiltration γ).limitProcess
        (fun n x ↦ densityProcess κ ν n a x s) (ν a)

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

(fun x => κ.density ν a x s) =ᵐ[ν a]
  MeasureTheory.Filtration.limitProcess (fun n x => κ.densityProcess ν n a x s)
    (ProbabilityTheory.countableFiltration γ) (ν a)


@[ext]
theorem ext {x y : AdicCauchySequence I M} (h : ∀ n, x n = y n) : x = y

{x y : AdicCompletion.AdicCauchySequence I M}


/-- **L'Hôpital's rule** for approaching -∞, `deriv` version -/
theorem lhopital_zero_atBot (hdf : ∀ᶠ x : ℝ in atBot, DifferentiableAt ℝ f x)
    (hg' : ∀ᶠ x : ℝ in atBot, deriv g x ≠ 0) (hfbot : Tendsto f atBot (𝓝 0))
    (hgbot : Tendsto g atBot (𝓝 0)) (hdiv : Tendsto (fun x => (deriv f) x / (deriv g) x) atBot l) :
    Tendsto (fun x => f x / g x) atBot l

(hdf : ∀ᶠ (x : ℝ) in Filter.atBot, DifferentiableAt ℝ f x)

(hg' : ∀ᶠ (x : ℝ) in Filter.atBot, deriv g x ≠ 0)

(hfbot : Filter.Tendsto f Filter.atBot (𝓝 0))

(hgbot : Filter.Tendsto g Filter.atBot (𝓝 0))

(hdiv : Filter.Tendsto (fun x => deriv f x / deriv g x) Filter.atBot l)

Filter.Tendsto (fun x => f x / g x) Filter.atBot l


/-- In a `p ^ (k + 1)`-th cyclotomic extension of `ℚ `, we have that `ζ` is not congruent to an
  integer modulo `p` if `p ^ (k  + 1) ≠ 2`. -/
theorem not_exists_int_prime_dvd_sub_of_prime_pow_ne_two
    [hcycl : IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (htwo : p ^ (k + 1) ≠ 2) :
    ¬(∃ n : ℤ, (p : 𝓞 K) ∣ (hζ.toInteger - n : 𝓞 K))


@[simp]
theorem absNorm_span_singleton (r : S) :
    absNorm (span ({r} : Set S)) = (Algebra.norm ℤ r).natAbs

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
[Module.Finite ℤ S]
(r : S)

Ideal.absNorm (Ideal.span {r}) = ((Algebra.norm ℤ) r).natAbs


@[simp] theorem nil_sublist : ∀ l : List α, [] <+ l


@[continuity]
theorem Continuous.div (hf : Continuous f) (hg : Continuous g) (h₀ : ∀ x, g x ≠ 0) :
    Continuous (f / g)

{α : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
{f g : α → G₀}
[TopologicalSpace α]
(hf : Continuous f)
(hg : Continuous g)
(h₀ : ∀ (x : α), g x ≠ 0)


theorem integral_eq (f : α →₁[μ] E) : integral f = integralCLM (E := E) f

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[CompleteSpace E]
(f : ↥(MeasureTheory.Lp E 1 μ))

MeasureTheory.L1.integral f = MeasureTheory.L1.integralCLM f


theorem inter_nonempty [IsDirected P (· ≥ ·)] (I J : Ideal P) : (I ∩ J : Set P).Nonempty

{P : Type u_1}
[LE P]
[IsDirected P fun x x_1 => x ≥ x_1]
(I J : Order.Ideal P)


theorem not_isPrime_iff {I : Ideal α} :
    ¬I.IsPrime ↔ I = ⊤ ∨ ∃ (x : α) (_hx : x ∉ I) (y : α) (_hy : y ∉ I), x * y ∈ I

¬I.IsPrime ↔ I = ⊤ ∨ ∃ x, ∃ (_ : x ∉ I), ∃ y, ∃ (_ : y ∉ I), x * y ∈ I


/-- `spanningCoe` is equivalent to `coe` for a subgraph that `IsSpanning`. -/
@[simps]
def spanningCoeEquivCoeOfSpanning (G' : Subgraph G) (h : G'.IsSpanning) :
    G'.spanningCoe ≃g G'.coe

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(h : G'.IsSpanning)
(v : ↑G'.verts)

(RelIso.symm (G'.spanningCoeEquivCoeOfSpanning h)) v = ↑v


@[simp]
theorem destutter'_cons_pos (h : R b a) : (a :: l).destutter' R b = b :: l.destutter' R a

{α : Type u_1}
(l : List α)
{R : α → α → Prop}
[DecidableRel R]
{a b : α}
(h : R b a)

List.destutter' R b (a :: l) = b :: List.destutter' R a l


{R : Type u_1}
[Ring R]
[CharP R 2]
(x : R)


@[refl]
theorem refl' (r : Setoid α) (x) : r.Rel x x


theorem dvd_of_emod_eq_zero {a b : Int} (H : b % a = 0) : a ∣ b


@[refl]
theorem Joined.refl (x : X) : Joined x x

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


@[simp] theorem reverse_sublist : l₁.reverse <+ l₂.reverse ↔ l₁ <+ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.reverse <+ l₂.reverse ↔ l₁ <+ l₂


/-- The **spectral mapping theorem** for polynomials in a Banach algebra over `ℂ`. -/
theorem map_polynomial_aeval (p : ℂ[X]) :
    spectrum ℂ (aeval a p) = (fun k => eval k p) '' spectrum ℂ a

{A : Type u_2}
[NormedRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[Nontrivial A]
(a : A)
(p : Polynomial ℂ)

spectrum ℂ ((Polynomial.aeval a) p) = (fun k => Polynomial.eval k p) '' spectrum ℂ a


theorem flip_inj {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (H : flip f = flip g) : f = g

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
{f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P}
(H : f.flip = g.flip)


theorem map_lift'_eq {m : β → γ} (hh : Monotone h) : map m (f.lift' h) = f.lift' (image m ∘ h)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{h : Set α → Set β}
{m : β → γ}
(hh : Monotone h)

Filter.map m (f.lift' h) = f.lift' (Set.image m ∘ h)


/-- Restricting a chart to its source `s ⊆ M` yields a chart in the maximal atlas of `s`. -/
theorem StructureGroupoid.restriction_mem_maximalAtlas_subtype
    {e : PartialHomeomorph M H} (he : e ∈ atlas H M)
    (hs : Nonempty e.source) [HasGroupoid M G] [ClosedUnderRestriction G] :
    let s := { carrier := e.source, is_open' := e.open_source : Opens M }
    let t := { carrier := e.target, is_open' := e.open_target : Opens H }
    ∀ c' ∈ atlas H t, e.toHomeomorphSourceTarget.toPartialHomeomorph ≫ₕ c' ∈ G.maximalAtlas s

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G : StructureGroupoid H}
{e : PartialHomeomorph M H}
(he : e ∈ atlas H M)
(hs : Nonempty ↑e.source)
[HasGroupoid M G]
[ClosedUnderRestriction G]

let s := { carrier := e.source, is_open' := ⋯ };
let t := { carrier := e.target, is_open' := ⋯ };
∀ c' ∈ atlas H ↥t, e.toHomeomorphSourceTarget.toPartialHomeomorph ≫ₕ c' ∈ StructureGroupoid.maximalAtlas (↥s) G


@[simp]
theorem coe_set_neg (S : Submodule R M) : ↑(-S) = -(S : Set M)

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommGroup M]
[Module R M]
(S : Submodule R M)


/-- If a function is countably sub-multiplicative then it is sub-multiplicative on countable
types -/
@[to_additive "If a function is countably sub-additive then it is sub-additive on countable types"]
theorem rel_iSup_tprod [CompleteLattice α] (m : α → M) (m0 : m ⊥ = 1) (R : M → M → Prop)
    (m_iSup : ∀ s : ℕ → α, R (m (⨆ i, s i)) (∏' i, m (s i))) (s : β → α) :
    R (m (⨆ b : β, s b)) (∏' b : β, m (s b))

(m_iSup : ∀ (s : ℕ → α), R (m (⨆ i, s i)) (∑' (i : ℕ), m (s i)))


theorem map_csSup (hf : LeftOrdContinuous f) {s : Set α} (sne : s.Nonempty) (sbdd : BddAbove s) :
    f (sSup s) = sSup (f '' s)

{α : Type u}
{β : Type v}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
{f : α → β}
(hf : LeftOrdContinuous f)
{s : Set α}
(sne : s.Nonempty)
(sbdd : BddAbove s)


lemma guitartExact_of_isRightDerivabilityStructure' [h : Φ.IsRightDerivabilityStructure]
    (e : Φ.functor ⋙ L₂ ≅ L₁ ⋙ F) : TwoSquare.GuitartExact e.hom

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


/-- Given a representation `M` of a Lie algebra `L`, the action of any `x : L` is skew-adjoint wrt
the trace form. -/
lemma traceForm_apply_lie_apply' (x y z : L) :
    traceForm R L M ⁅x, y⁆ z = - traceForm R L M y ⁅x, z⁆

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x y z : L)

((LieModule.traceForm R L M) ⁅x, y⁆) z = -((LieModule.traceForm R L M) y) ⁅x, z⁆


@[simp] theorem suffix_cons (a : α) : ∀ l, l <:+ a :: l


/-- `z - (toZMod z : ℤ_[p])` is contained in the maximal ideal of `ℤ_[p]`, for every `z : ℤ_[p]`.

The coercion from `ZMod p` to `ℤ_[p]` is `ZMod.cast`,
which coerces `ZMod p` into arbitrary rings.
This is unfortunate, but a consequence of the fact that we allow `ZMod p`
to coerce to rings of arbitrary characteristic, instead of only rings of characteristic `p`.
This coercion is only a ring homomorphism if it coerces into a ring whose characteristic divides
`p`. While this is not the case here we can still make use of the coercion.
-/
theorem toZMod_spec : x - (ZMod.cast (toZMod x) : ℤ_[p]) ∈ maximalIdeal ℤ_[p]

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(x : ℤ_[p])

x - (PadicInt.toZMod x).cast ∈ LocalRing.maximalIdeal ℤ_[p]


@[simp] theorem getElem_setD_eq (a : Array α) {i : Nat} (v : α) (h : _) :
  (setD a i v)[i]'h = v

{α : Type u_1}
(a : Array α)
{i : Nat}
(v : α)
(h : i < (a.setD i v).size)


theorem isUnital_rightAdd : EckmannHilton.IsUnital (· +ᵣ ·) 0

EckmannHilton.IsUnital (fun x x_1 => CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd X Y x x_1) 0


@[to_additive]
theorem tendsto_inv_nhdsWithin_Ioi {a : H} : Tendsto Inv.inv (𝓝[>] a) (𝓝[<] a⁻¹)

{H : Type x}
[TopologicalSpace H]
[OrderedAddCommGroup H]
[ContinuousNeg H]
{a : H}

Filter.Tendsto Neg.neg (𝓝[>] a) (𝓝[<] (-a))


lemma toAddCircle_natCast (j : ℕ) :
    toAddCircle (j : ZMod N) = ↑(j / N : ℝ)


theorem div_gcd_pos_of_pos_right (a : Nat) (h : 0 < b) : 0 < b / a.gcd b


theorem x_sub_y_dvd_pow_lem (y2 y1 y0 yn1 yn0 xn1 xn0 ay a2 : ℤ) :
    (a2 * yn1 - yn0) * ay + y2 - (a2 * xn1 - xn0) =
      y2 - a2 * y1 + y0 + a2 * (yn1 * ay + y1 - xn1) - (yn0 * ay + y0 - xn0)


theorem proj_prop_eq_self (hh : ∀ i x, x ∈ C → x i ≠ false → J i) : π C J = C

(hh : ∀ (i : I), ∀ x ∈ C, x i ≠ false → J i)


@[to_additive (attr := simp)]
theorem fst_comp_toProd : (MonoidHom.fst M N).comp toProd = fst

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]

(AddMonoidHom.fst M N).comp AddMonoid.Coprod.toSum = AddMonoid.Coprod.fst


theorem norm_eq_sum (hp : 0 < p.toReal) (f : PiLp p β) :
    ‖f‖ = (∑ i, ‖f i‖ ^ p.toReal) ^ (1 / p.toReal)

{p : ℝ≥0∞}
{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → Norm (β i)]
(hp : 0 < p.toReal)
(f : PiLp p β)

‖f‖ = (∑ i : ι, ‖f i‖ ^ p.toReal) ^ (1 / p.toReal)


@[simp]
theorem adjoin_empty (F E : Type*) [Field F] [Field E] [Algebra F E] : adjoin F (∅ : Set E) = ⊥

(F : Type u_3)
(E : Type u_4)
[Field F]
[Field E]
[Algebra F E]


@[to_additive (attr := simp)]
lemma prod_indicator_index_eq_prod_attach [Zero M] [CommMonoid N]
    {s : Finset α} (f : ∀ a ∈ s, M) {h : α → M → N} (h_zero : ∀ a ∈ s, h a 0 = 1) :
    (indicator s f).prod h = ∏ x ∈ s.attach, h ↑x (f x x.2)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
{s : Finset α}
(f : (a : α) → a ∈ s → M)
{h : α → M → N}
(h_zero : ∀ a ∈ s, h a 0 = 1)

(Finsupp.indicator s f).prod h = ∏ x ∈ s.attach, h (↑x) (f ↑x ⋯)


@[simp]
lemma algebraMap_apply (x) : algebraMap P.Ring S x = aeval (R := R) P.val x

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(P : Algebra.Generators R S)
(x : P.Ring)

(algebraMap P.Ring S) x = (MvPolynomial.aeval P.val) x


theorem isPrimePow_of_minFac_pow_factorization_eq {n : ℕ}
    (h : n.minFac ^ n.factorization n.minFac = n) (hn : n ≠ 1) : IsPrimePow n


@[simp]
theorem _root_.LinearIsometryEquiv.piLpCongrRight_symm (e : ∀ i, α i ≃ₗᵢ[𝕜] β i) :
    (LinearIsometryEquiv.piLpCongrRight p e).symm =
      LinearIsometryEquiv.piLpCongrRight p (fun i => (e i).symm)

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

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

(LinearIsometryEquiv.piLpCongrRight p e).symm = LinearIsometryEquiv.piLpCongrRight p fun i => (e i).symm


@[to_additive (attr := simp)] theorem range_swap : MonoidHom.range (swap G H) = ⊤

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


theorem lt_succ_iff_le {x y : s} : x < succ y ↔ x ≤ y

{s : Set ℕ}
[Infinite ↑s]
[DecidablePred fun x => x ∈ s]
{x y : ↑s}


/-- Given a nonzero vector in a finite-dimensional space of dimension `> 1`, one may find another
vector linearly independent of the first one. -/
theorem exists_linearIndependent_pair_of_one_lt_finrank [NoZeroSMulDivisors R M]
    (h : 1 < finrank R M) {x : M} (hx : x ≠ 0) :
    ∃ y, LinearIndependent R ![x, y]

{R : Type u_1}
{M : Type u}
[Ring R]
[AddCommGroup M]
[Module R M]
[HasRankNullity.{u, u_1} R]
[StrongRankCondition R]
[NoZeroSMulDivisors R M]
(h : 1 < FiniteDimensional.finrank R M)
{x : M}
(hx : x ≠ 0)


lemma sups_subset_self : s ⊻ s ⊆ s ↔ SupClosed (s : Set α)

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
{s : Finset α}


theorem coeToSubmodule_inj {I J : FractionalIdeal S P} : (I : Submodule R P) = J ↔ I = J

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


theorem Ico.infinite : Infinite (Ico a b)

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


theorem re_inner_le_norm (x y : E) : re ⟪x, y⟫ ≤ ‖x‖ * ‖y‖

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)


theorem isOrtho_def {Q : QuadraticMap R M N} {x y : M} : Q.IsOrtho x y ↔ Q (x + y) = Q x + Q y

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q : QuadraticMap R M N}
{x y : M}


theorem SurjOn.mapsTo_invFunOn [Nonempty α] (h : SurjOn f s t) : MapsTo (invFunOn f s) t s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
[Nonempty α]
(h : Set.SurjOn f s t)


theorem sub_div (a b c : K) : (a - b) / c = a / c - b / c

{K : Type u_3}
[DivisionRing K]
(a b c : K)


@[simp]
theorem mem_map : b ∈ map f s ↔ f.symm b ∈ s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α ≃o β}
{s : UpperSet α}
{b : β}


/-- A version of `WithTop.map` for `OneHom`s. -/
@[to_additive (attr := simps (config := .asFn))
  "A version of `WithTop.map` for `ZeroHom`s"]
protected def _root_.OneHom.withTopMap {M N : Type*} [One M] [One N] (f : OneHom M N) :
    OneHom (WithTop M) (WithTop N)

{M : Type u_1}
{N : Type u_2}
[Zero M]
[Zero N]
(f : ZeroHom M N)


/-- A function between topological spaces is an embedding if it is injective,
  and for all `s : Set X`, `s` is open iff it is the preimage of an open set. -/
@[mk_iff]
structure Embedding [TopologicalSpace X] [TopologicalSpace Y] (f : X → Y) extends
  Inducing f : Prop where
  /-- A topological embedding is injective. -/
  inj : Function.Injective f

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


/-- In a Dedekind domain, the localization at every nonzero prime ideal is a DVR. -/
theorem IsLocalization.AtPrime.discreteValuationRing_of_dedekind_domain [IsDedekindDomain A]
    {P : Ideal A} (hP : P ≠ ⊥) [pP : P.IsPrime] (Aₘ : Type*) [CommRing Aₘ] [IsDomain Aₘ]
    [Algebra A Aₘ] [IsLocalization.AtPrime Aₘ P] : DiscreteValuationRing Aₘ

(A : Type u_2)
[CommRing A]
[IsDomain A]
[IsDedekindDomain A]
{P : Ideal A}
(hP : P ≠ ⊥)
[pP : P.IsPrime]
(Aₘ : Type u_4)
[CommRing Aₘ]
[IsDomain Aₘ]
[Algebra A Aₘ]
[IsLocalization.AtPrime Aₘ P]


theorem BinaryCofan.isVanKampen_iff (c : BinaryCofan X Y) :
    IsVanKampenColimit c ↔
      ∀ {X' Y' : C} (c' : BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt)
        (_ : αX ≫ c.inl = c'.inl ≫ f) (_ : αY ≫ c.inr = c'.inr ≫ f),
        Nonempty (IsColimit c') ↔ IsPullback c'.inl αX f c.inl ∧ IsPullback c'.inr αY f c.inr

(c : CategoryTheory.Limits.BinaryCofan X Y)

CategoryTheory.IsVanKampenColimit c ↔
  ∀ {X' Y' : C} (c' : CategoryTheory.Limits.BinaryCofan X' Y') (αX : X' ⟶ X) (αY : Y' ⟶ Y) (f : c'.pt ⟶ c.pt),
    CategoryTheory.CategoryStruct.comp αX c.inl = CategoryTheory.CategoryStruct.comp c'.inl f →
      CategoryTheory.CategoryStruct.comp αY c.inr = CategoryTheory.CategoryStruct.comp c'.inr f →
        (Nonempty (CategoryTheory.Limits.IsColimit c') ↔
          CategoryTheory.IsPullback c'.inl αX f c.inl ∧ CategoryTheory.IsPullback c'.inr αY f c.inr)


@[to_additive] lemma Right.min_le_max_of_mul_le_mul
    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (swap (· * ·)) (· < ·)]
    (h : a * b ≤ c * d) : min a b ≤ max c d

[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]


@[ext high]
theorem hom_ext {f g : HNNExtension G A B φ →* M}
    (hg : f.comp of = g.comp of) (ht : f t = g t) : f = g

(hg : f.comp HNNExtension.of = g.comp HNNExtension.of)

(ht : f HNNExtension.t = g HNNExtension.t)


theorem lt_opow_of_limit {a b c : Ordinal} (b0 : b ≠ 0) (h : IsLimit c) :
    a < b ^ c ↔ ∃ c' < c, a < b ^ c'

{a b c : Ordinal.{u_1}}
(b0 : b ≠ 0)
(h : c.IsLimit)


theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β}
{g : β → γ}
{s : Set γ}


theorem negOfNat_mul_ofNat (m n : Nat) : negOfNat m * (n : Nat) = negOfNat (m * n)

Int.negOfNat m * ↑n = Int.negOfNat (m * n)


@[to_additive norm_le_norm_add_const_of_dist_le]
theorem norm_le_norm_add_const_of_dist_le' : dist a b ≤ r → ‖a‖ ≤ ‖b‖ + r

{E : Type u_6}
[SeminormedAddGroup E]
{a b : E}
{r : ℝ}


theorem UniformContinuous.subtype_mk {p : α → Prop} [UniformSpace α] [UniformSpace β] {f : β → α}
    (hf : UniformContinuous f) (h : ∀ x, p (f x)) :
    UniformContinuous (fun x => ⟨f x, h x⟩ : β → Subtype p)

{α : Type ua}
{β : Type ub}
{p : α → Prop}
[UniformSpace α]
[UniformSpace β]
{f : β → α}
(hf : UniformContinuous f)
(h : ∀ (x : β), p (f x))


/-- The subgroup of `S`-units of `Kˣ`. -/
@[simps!]
def unit : Subgroup Kˣ

(S : Set (IsDedekindDomain.HeightOneSpectrum R))

↑(S.unit K) = {x | ∀ v ∉ S, v.valuation ↑x = 1}


theorem le_total_of_le_of_le {x y : Part α} (z : Part α) (hx : x ≤ z) (hy : y ≤ z) :
    x ≤ y ∨ y ≤ x

{α : Type u_1}
{x y : Part α}
(z : Part α)
(hx : x ≤ z)
(hy : y ≤ z)


/-- A category with countably many objects and morphisms. -/
class CountableCategory (J : Type*) [Category J] : Prop where
  countableObj : Countable J := by infer_instance
  countableHom : ∀ j j' : J, Countable (j ⟶ j') := by infer_instance

[self : CategoryTheory.CountableCategory J]


theorem isNat_intOfNat : {n n' : ℕ} → IsNat n n' → IsNat (Int.ofNat n) n'

Mathlib.Meta.NormNum.IsNat n n' → Mathlib.Meta.NormNum.IsNat (Int.ofNat n) n'


@[simp] lemma zero_apply (a : α) : (0 : Kernel α β) a = 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(a : α)


protected theorem continuousOn (hf : IsCoveringMapOn f s) : ContinuousOn f (f ⁻¹' s)

{E : Type u_1}
{X : Type u_2}
[TopologicalSpace E]
[TopologicalSpace X]
{f : E → X}
{s : Set X}
(hf : IsCoveringMapOn f s)


theorem tendsto_fract_right' [OrderClosedTopology α] [TopologicalAddGroup α] (n : ℤ) :
    Tendsto (fract : α → α) (𝓝[≥] n) (𝓝 0)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
[TopologicalAddGroup α]
(n : ℤ)

Filter.Tendsto Int.fract (𝓝[≥] ↑n) (𝓝 0)


@[to_additive (attr := simp)]
theorem mem_mk {s : Set M} {x : M} (h_mul) : x ∈ mk s h_mul ↔ x ∈ s

(h_mul : ∀ {a b : M}, a ∈ s → b ∈ s → a * b ∈ s)

x ∈ { carrier := s, mul_mem' := h_mul } ↔ x ∈ s


theorem equiv_toRingHom : (equiv i j p).toRingHom = PerfectRing.lift i j p

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing L p]
[IsPerfectClosure i p]
[PerfectRing M p]
[IsPerfectClosure j p]

(IsPerfectClosure.equiv i j p).toRingHom = PerfectRing.lift i j p


lemma mem_smoothNumbersUpTo {N k n : ℕ} :
    n ∈ smoothNumbersUpTo N k ↔ n ≤ N ∧ n ∈ smoothNumbers k

n ∈ N.smoothNumbersUpTo k ↔ n ≤ N ∧ n ∈ k.smoothNumbers


/-- The identity morphism of a short complex. -/
@[simps]
def Hom.id : Hom S S

(CategoryTheory.ShortComplex.Hom.id S).τ₁ = CategoryTheory.CategoryStruct.id S.X₁


@[simp, mono]
theorem sym2_mono (h : s ⊆ t) : s.sym2 ⊆ t.sym2

{α : Type u_1}
{s t : Finset α}
(h : s ⊆ t)


/-- Let `c : ι → Set α` be an open cover of a compact set `s`. Then there exists an entourage
`n` such that for each `x ∈ s` its `n`-neighborhood is contained in some `c i`. -/
theorem lebesgue_number_lemma {ι : Sort*} {U : ι → Set α} (hK : IsCompact K)
    (hopen : ∀ i, IsOpen (U i)) (hcover : K ⊆ ⋃ i, U i) :
    ∃ V ∈ 𝓤 α, ∀ x ∈ K, ∃ i, ball x V ⊆ U i

{α : Type ua}
[UniformSpace α]
{K : Set α}
{ι : Sort u_2}
{U : ι → Set α}
(hK : IsCompact K)
(hopen : ∀ (i : ι), IsOpen (U i))
(hcover : K ⊆ ⋃ i, U i)

∃ V ∈ 𝓤 α, ∀ x ∈ K, ∃ i, UniformSpace.ball x V ⊆ U i


lemma dens_sdiff_add_dens_eq_dens (h : s ⊆ t) : dens (t \ s) + dens s = dens t

{α : Type u_2}
[Fintype α]
{s t : Finset α}
[DecidableEq α]
(h : s ⊆ t)


/-- An ideal is radical iff it is equal to its radical. -/
theorem radical_eq_iff : I.radical = I ↔ I.IsRadical

{R : Type u}
[CommSemiring R]
{I : Ideal R}


theorem coeNat_factorMultiset (n : ℕ+) :
    (factorMultiset n : Multiset ℕ) = (Nat.primeFactorsList n : Multiset ℕ)


@[simp]
theorem erase_add (i : ι) (f₁ f₂ : Π₀ i, β i) : erase i (f₁ + f₂) = erase i f₁ + erase i f₂

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
(i : ι)
(f₁ f₂ : Π₀ (i : ι), β i)

DFinsupp.erase i (f₁ + f₂) = DFinsupp.erase i f₁ + DFinsupp.erase i f₂


@[simp] theorem nil_diff (l : List α) : [].diff l = []

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


/-- The second half of the **Kummer-Dedekind Theorem** in the monogenic case, stating that the
    bijection `FactorsEquiv'` defined in the first half preserves multiplicities. -/
theorem multiplicity_factors_map_eq_multiplicity (hI : IsMaximal I) (hI' : I ≠ ⊥)
    (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤) (hx' : IsIntegral R x) {J : Ideal S}
    (hJ : J ∈ normalizedFactors (I.map (algebraMap R S))) :
    multiplicity J (I.map (algebraMap R S)) =
      multiplicity (↑(normalizedFactorsMapEquivNormalizedFactorsMinPolyMk hI hI' hx hx' ⟨J, hJ⟩))
        (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))

(hx : Ideal.comap (algebraMap R S) (conductor R x) ⊔ I = ⊤)

(hJ : J ∈ UniqueFactorizationMonoid.normalizedFactors (Ideal.map (algebraMap R S) I))

multiplicity J (Ideal.map (algebraMap R S) I) =
  multiplicity (↑((KummerDedekind.normalizedFactorsMapEquivNormalizedFactorsMinPolyMk hI hI' hx hx') ⟨J, hJ⟩))
    (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))


theorem trace_eq_sum_roots_charpoly_of_splits (hAps : A.charpoly.Splits (RingHom.id R)) :
    A.trace = (Matrix.charpoly A).roots.sum

(hAps : Polynomial.Splits (RingHom.id R) A.charpoly)


theorem cycleType_of_card_le_mem_cycleType_add_two {n : ℕ} {g : Perm α}
    (hn2 : Fintype.card α < n + 2) (hng : n ∈ g.cycleType) : g.cycleType = {n}

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{n : ℕ}
{g : Equiv.Perm α}
(hn2 : Fintype.card α < n + 2)
(hng : n ∈ g.cycleType)


theorem nodup_map_iff_of_inj_on {f : α → β} (d : ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) :
    Nodup (map f s) ↔ Nodup s


protected theorem UniformSpace.ext_iff {u₁ u₂ : UniformSpace α} :
    u₁ = u₂ ↔ ∀ s, s ∈ 𝓤[u₁] ↔ s ∈ 𝓤[u₂]

u₁ = u₂ ↔ ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ s ∈ 𝓤 α


@[simp] theorem perm_singleton {a : α} {l : List α} : l ~ [a] ↔ l = [a]


@[simp]
theorem funMap_quotient_mk'_sigma_mk' {n : ℕ} {F : L.Functions n} {i : ι} {x : Fin n → G i} :
    funMap F (fun a => (⟦.mk f i (x a)⟧ : DirectLimit G f)) = ⟦.mk f i (funMap F x)⟧

[DirectedSystem G fun i j h => ⇑(f i j h)]

(FirstOrder.Language.Structure.funMap F fun a => ⟦FirstOrder.Language.Structure.Sigma.mk f i (x a)⟧) =
  ⟦FirstOrder.Language.Structure.Sigma.mk f i (FirstOrder.Language.Structure.funMap F x)⟧


lemma log_pos_of_isNat {n : ℕ} (h : NormNum.IsNat e n) (w : Nat.blt 1 n = true) :
    0 < Real.log (e : ℝ)

{e : ℝ}
{n : ℕ}
(h : Mathlib.Meta.NormNum.IsNat e n)
(w : Nat.blt 1 n = true)


theorem graph_eq_ker_coprod : g.graph = ker ((-g).coprod LinearMap.id)

{R : Type u}
{M₃ : Type y}
{M₄ : Type z}
[Semiring R]
[AddCommGroup M₃]
[AddCommGroup M₄]
[Module R M₃]
[Module R M₄]
(g : M₃ →ₗ[R] M₄)

g.graph = LinearMap.ker ((-g).coprod LinearMap.id)


@[measurability]
theorem measurable_piEquivPiSubtypeProd (p : δ → Prop) [DecidablePred p] :
    Measurable (Equiv.piEquivPiSubtypeProd p π)

{δ : Type u_4}
(π : δ → Type u_6)
[(a : δ) → MeasurableSpace (π a)]
(p : δ → Prop)
[DecidablePred p]

Measurable ⇑(Equiv.piEquivPiSubtypeProd p π)


@[simp]
theorem initialMul_inv (X : C) [HasBinaryProduct (⊥_ C) X] : (initialMul X).inv = initial.to _

[CategoryTheory.Limits.HasBinaryProduct (⊥_ C) X]

(CategoryTheory.Limits.initialMul X).inv = CategoryTheory.Limits.initial.to ((⊥_ C) ⨯ X)


theorem eq_ite_iff : a = ite P b c ↔ P ∧ a = b ∨ ¬P ∧ a = c

{α : Sort u_1}
{P : Prop}
[Decidable P]
{a b c : α}

(a = if P then b else c) ↔ P ∧ a = b ∨ ¬P ∧ a = c


@[simp] theorem tendsto_lift₂_nhdsWithin {f : X → Y → α}
    {hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d} {x : X} {y : Y}
    {s : Set (SeparationQuotient X × SeparationQuotient Y)} {l : Filter α} :
    Tendsto (uncurry <| lift₂ f hf) (𝓝[s] (mk x, mk y)) l ↔
      Tendsto (uncurry f) (𝓝[Prod.map mk mk ⁻¹' s] (x, y)) l

{hf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}

Filter.Tendsto (Function.uncurry (SeparationQuotient.lift₂ f hf))
    (𝓝[s] (SeparationQuotient.mk x, SeparationQuotient.mk y)) l ↔
  Filter.Tendsto (Function.uncurry f) (𝓝[Prod.map SeparationQuotient.mk SeparationQuotient.mk ⁻¹' s] (x, y)) l


@[to_additive (attr := simp)]
theorem center_eq_top : center M = ⊤


theorem irreducibleComponent_mem_irreducibleComponents (x : X) :
    irreducibleComponent x ∈ irreducibleComponents X

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


theorem mul_eq_mul_iff_eq_and_eq_of_pos [PosMulStrictMono α] [MulPosStrictMono α]
    (hab : a ≤ b) (hcd : c ≤ d) (a0 : 0 < a) (d0 : 0 < d) :
    a * c = b * d ↔ a = b ∧ c = d

{α : Type u_1}
{a b c d : α}
[MulZeroClass α]
[PartialOrder α]
[PosMulStrictMono α]
[MulPosStrictMono α]
(hab : a ≤ b)
(hcd : c ≤ d)
(a0 : 0 < a)
(d0 : 0 < d)


@[to_additive]
theorem HasProd.div (hf : HasProd f a₁) (hg : HasProd g a₂) :
    HasProd (fun b ↦ f b / g b) (a₁ / a₂)

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f g : β → α}
{a₁ a₂ : α}
(hf : HasProd f a₁)
(hg : HasProd g a₂)


@[simp]
theorem toQuadraticMap_sub (B₁ B₂ : BilinMap R M N) :
    (B₁ - B₂).toQuadraticMap = B₁.toQuadraticMap - B₂.toQuadraticMap

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(B₁ B₂ : LinearMap.BilinMap R M N)


@[simp]
theorem submodule_mk (v : V) (hv : v ≠ 0) : (mk K v hv).submodule = K ∙ v

{K : Type u_1}
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(v : V)
(hv : v ≠ 0)

(Projectivization.mk K v hv).submodule = Submodule.span K {v}


theorem lt_toDual [LT α] {a : αᵒᵈ} {b : α} : a < toDual b ↔ b < ofDual a

a < OrderDual.toDual b ↔ b < OrderDual.ofDual a


@[simp]
theorem coeff_rename_mapDomain (f : σ → τ) (hf : Injective f) (φ : MvPolynomial σ R) (d : σ →₀ ℕ) :
    (rename f φ).coeff (d.mapDomain f) = φ.coeff d

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(f : σ → τ)
(hf : Function.Injective f)
(φ : MvPolynomial σ R)
(d : σ →₀ ℕ)

MvPolynomial.coeff (Finsupp.mapDomain f d) ((MvPolynomial.rename f) φ) = MvPolynomial.coeff d φ


theorem uniformEmbedding_equivRealProd : UniformEmbedding equivRealProd


@[simp]
theorem whiskerRight_apply {Y Z : Type u} (f : Y ⟶ Z) (X : Type u) (p : Y ⊗ X) :
    (f ▷ X) p = (f p.1, p.2)


/-- An ordered commutative monoid is a commutative monoid with a partial order such that
multiplication is monotone. -/
@[to_additive]
class OrderedCommMonoid (α : Type*) extends CommMonoid α, PartialOrder α where
  protected mul_le_mul_left : ∀ a b : α, a ≤ b → ∀ c, c * a ≤ c * b

{α : Type u_3}
[self : OrderedCommMonoid α]
(a b : α)