theorem mul_mul_invOf_self_cancel [Monoid α] (a b : α) [Invertible b] : a * b * ⅟ b = a

{α : Type u}
[Monoid α]
(a b : α)
[Invertible b]


theorem ssubset_singleton_iff {s : Set α} {x : α} : s ⊂ {x} ↔ s = ∅


/-- If `p` is a prime factor of `a` then `p` is also a prime factor of `a * b` for any `b > 0` -/
theorem mem_primeFactorsList_mul_left {p a b : ℕ} (hpa : p ∈ a.primeFactorsList) (hb : b ≠ 0) :
    p ∈ (a * b).primeFactorsList


theorem grundyValue_iff_equiv_zero (G : PGame) [G.Impartial] : grundyValue G = 0 ↔ (G ≈ 0)


@[to_additive (attr := simp)]
theorem toTopologicalSpace_inf (x y : GroupTopology α) :
    (x ⊓ y).toTopologicalSpace = x.toTopologicalSpace ⊓ y.toTopologicalSpace

{α : Type u}
[Group α]
(x y : GroupTopology α)


theorem oreDiv_add_oreDiv {r r' : X} {s s' : S} :
    r /ₒ s + r' /ₒ s' =
      (oreDenom (s : R) s' • r + oreNum (s : R) s' • r') /ₒ (oreDenom (s : R) s' * s)

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
{r r' : X}
{s s' : ↥S}

r /ₒ s + r' /ₒ s' =
  (OreLocalization.oreDenom (↑s) s' • r + OreLocalization.oreNum (↑s) s' • r') /ₒ (OreLocalization.oreDenom (↑s) s' * s)


/-- Fundamental theorem of calculus: if `f : ℝ → E` is integrable on `a..b` and `f` has a finite
limit `c` almost surely at `b`, then the derivative of `u ↦ ∫ x in a..u, f x` at `b` equals `c`. -/
theorem deriv_integral_of_tendsto_ae_right (hf : IntervalIntegrable f volume a b)
    (hmeas : StronglyMeasurableAtFilter f (𝓝 b)) (hb : Tendsto f (𝓝 b ⊓ ae volume) (𝓝 c)) :
    deriv (fun u => ∫ x in a..u, f x) b = c

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

(hb : Filter.Tendsto f (𝓝 b ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

deriv (fun u => ∫ (x : ℝ) in a..u, f x) b = c


lemma zsmul_int_one (n : ℤ) : n • (1 : ℤ) = n


/-- The orthogonal projection has norm `≤ 1`. -/
theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1

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


lemma isClosed_sphere : IsClosed (sphere x ε)

{α : Type u_2}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}


theorem isBounded_bot : IsBounded r ⊥ ↔ Nonempty α


theorem exact_iff_isIso_imageToKernel : S.Exact ↔ IsIso (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.IsIso (imageToKernel S.f S.g ⋯)


@[simp]
theorem finsuppLEquivDirectSum_single (i : ι) (m : M) :
    finsuppLEquivDirectSum R M ι (Finsupp.single i m) = DirectSum.lof R ι _ i m

(R : Type u)
(M : Type v)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(ι : Type u_1)
[DecidableEq ι]
(i : ι)
(m : M)

(finsuppLEquivDirectSum R M ι) (Finsupp.single i m) = (DirectSum.lof R ι (fun i => M) i) m


theorem choice_mem (h : ∅ ∉ x) (y : ZFSet.{u}) (yx : y ∈ x) :
    (choice x ′ y : Class.{u}) ∈ (y : Class.{u})

(x : ZFSet)
(h : ∅ ∉ x)
(y : ZFSet)
(yx : y ∈ x)


@[simp]
theorem coeff_eq_zero {n : ℕ} (hn : 3 < n) : P.toPoly.coeff n = 0

{R : Type u_1}
{P : Cubic R}
[Semiring R]
{n : ℕ}
(hn : 3 < n)


theorem toNNReal_mul_nnnorm {x : ℝ} (y : ℝ) (hx : 0 ≤ x) : x.toNNReal * ‖y‖₊ = ‖x * y‖₊


theorem mem_iSup_finset_iff_exists_sum {s : Finset ι} (p : ι → Submodule R N) (a : N) :
    (a ∈ ⨆ i ∈ s, p i) ↔ ∃ μ : ∀ i, p i, (∑ i ∈ s, (μ i : N)) = a

{ι : Type u_1}
{R : Type u_2}
{N : Type u_5}
[Semiring R]
[AddCommMonoid N]
[Module R N]
{s : Finset ι}
(p : ι → Submodule R N)
(a : N)

a ∈ ⨆ i ∈ s, p i ↔ ∃ μ, ∑ i ∈ s, ↑(μ i) = a


lemma update_piecewise_of_mem [DecidableEq ι] {i : ι} (hi : i ∈ s) (v : π i) :
    update (s.piecewise f g) i v = s.piecewise (update f i v) g

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
(f g : (i : ι) → π i)
[(j : ι) → Decidable (j ∈ s)]
[DecidableEq ι]
{i : ι}
(hi : i ∈ s)
(v : π i)

Function.update (s.piecewise f g) i v = s.piecewise (Function.update f i v) g


theorem LinearIndependent.of_isLocalizedModule {ι : Type*} {v : ι → M}
    (hv : LinearIndependent R v) : LinearIndependent Rₛ (f ∘ v)

{R : Type u_1}
(Rₛ : Type u_2)
[CommSemiring R]
(S : Submonoid R)
[CommSemiring Rₛ]
[Algebra R Rₛ]
[hT : IsLocalization S Rₛ]
{M : Type u_3}
{M' : Type u_4}
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
[Module Rₛ M']
[IsScalarTower R Rₛ M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
{ι : Type u_5}
{v : ι → M}
(hv : LinearIndependent R v)


theorem aroots_X_pow [CommRing S] [IsDomain S] [Algebra T S] (n : ℕ) :
    (X ^ n : T[X]).aroots S = n • ({0} : Multiset S)

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
(n : ℕ)


protected theorem div_pos (ha : a ≠ 0) (hb : b ≠ ∞) : 0 < a / b

{a b : ENNReal}
(ha : a ≠ 0)
(hb : b ≠ ⊤)


@[to_additive] -- `simp` can prove this by a combination of the two preceding lemmas
lemma mulEquivOfOrderOfEq_symm_apply_gen : (mulEquivOfOrderOfEq hg hg' h).symm g' = g

(hg : ∀ (x : G), x ∈ AddSubgroup.zmultiples g)

(hg' : ∀ (x : G'), x ∈ AddSubgroup.zmultiples g')

(addEquivOfAddOrderOfEq hg hg' h).symm g' = g


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

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


theorem coprime_or_dvd_of_prime {p} (pp : Prime p) (i : ℕ) : Coprime p i ∨ p ∣ i


/-- The natural isomorphism comparing between
pulling back along two successive functions, and
pulling back along their composition
-/
@[simps!]
def comapComp (f : K → J) (g : J → I) : comap C g ⋙ comap (C ∘ g) f ≅ comap C (g ∘ f)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(CategoryTheory.Pi.comapComp C f g).hom.app X b = CategoryTheory.CategoryStruct.id (X (g (f b)))


@[simp]
theorem mapAlgEquiv_refl : mapAlgEquiv σ (AlgEquiv.refl : A₁ ≃ₐ[R] A₁) = AlgEquiv.refl

{R : Type u}
(σ : Type u_1)
[CommSemiring R]
{A₁ : Type u_2}
[CommSemiring A₁]
[Algebra R A₁]

MvPolynomial.mapAlgEquiv σ AlgEquiv.refl = AlgEquiv.refl


@[simp]
theorem trace_neg (A : Matrix n n R) : trace (-A) = -trace A

{n : Type u_3}
{R : Type u_6}
[Fintype n]
[AddCommGroup R]
(A : Matrix n n R)


/-- The list that makes up a `Vector` made up of a single element,
retrieved via `toList`, is equal to the list of that single element. -/
@[simp]
theorem toList_singleton (v : Vector α 1) : v.toList = [v.head]


theorem val_add_of_lt {n : ℕ} {a b : ZMod n} (h : a.val + b.val < n) :
    (a + b).val = a.val + b.val


@[simp]
theorem exp_inr (m : M) : exp 𝕜 (inr m : tsze R M) = 1 + inr m

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

NormedSpace.exp 𝕜 (TrivSqZeroExt.inr m) = 1 + TrivSqZeroExt.inr m


/-- The ring isomorphism between the ring `R` and the global sections `Γ(X, 𝒪ₓ)`. -/
-- Porting note: was @[simps (config := { rhsMd := Tactic.Transparency.semireducible })]
@[simps!]
def globalSectionsIso : CommRingCat.of R ≅ (structureSheaf R).1.obj (op ⊤)

(R : Type u)
[CommRing R]
(f : ↑(CommRingCat.of R))
(x : ↥(Opposite.unop (Opposite.op ⊤)))

↑((AlgebraicGeometry.StructureSheaf.globalSectionsIso R).hom f) x =
  (algebraMap R (AlgebraicGeometry.StructureSheaf.Localizations R ↑x)) f


theorem IsCycle.exists_pow_eq (hf : IsCycle f) (hx : f x ≠ x) (hy : f y ≠ y) :
    ∃ i : ℕ, (f ^ i) x = y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
[Finite α]
(hf : f.IsCycle)
(hx : f x ≠ x)
(hy : f y ≠ y)


theorem exists_finite_support (x : FreeCommRing α) : ∃ s : Set α, Set.Finite s ∧ IsSupported x s


theorem prod_diff_prod : s ×ˢ t \ s₁ ×ˢ t₁ = s ×ˢ (t \ t₁) ∪ (s \ s₁) ×ˢ t

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


@[simp] lemma mem_map {b : β} : b ∈ L.map f ↔ ∃ a ∈ L, f a = b

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
{L : Sublattice α}
{f : LatticeHom α β}
{b : β}

b ∈ Sublattice.map f L ↔ ∃ a ∈ L, f a = b


@[simp] lemma coe_unbot : ∀ (x : WithBot α) hx, x.unbot hx = x

{α : Type u_1}
(x : WithBot α)
(hx : x ≠ ⊥)


lemma norm_fst_le (x : E × F) : ‖x.1‖ ≤ ‖x‖

{E : Type u_2}
{F : Type u_3}
[Norm E]
[Norm F]
(x : E × F)


lemma right_ne_zero_of_mem_divisorsAntidiagonal {p : ℕ × ℕ} (hp : p ∈ n.divisorsAntidiagonal) :
    p.2 ≠ 0

{n : ℕ}
{p : ℕ × ℕ}
(hp : p ∈ n.divisorsAntidiagonal)


theorem hadamard_add [Distrib α] : A ⊙ (B + C) = A ⊙ B + A ⊙ C

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
(A B C : Matrix m n α)
[Distrib α]

A.hadamard (B + C) = A.hadamard B + A.hadamard C


@[arith_mult]
theorem isMultiplicative_zeta : IsMultiplicative ζ


theorem gcd_a_eq : a = gcdA' a b * gcd a b


/-- The Gelfand transform as a `StarAlgEquiv` between a commutative unital C⋆-algebra over `ℂ`
and the continuous functions on its `characterSpace`. -/
@[simps!]
noncomputable def gelfandStarTransform : A ≃⋆ₐ[ℂ] C(characterSpace ℂ A, ℂ)

(A : Type u_1)
[NormedCommRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
(a : A)
(φ : ↑(WeakDual.characterSpace ℂ A))


@[simp, norm_cast] lemma coe_inv (a : α) : ((a⁻¹ : α) : WithZero α) = (↑a)⁻¹

↑a⁻¹ = (↑a)⁻¹


@[simp]
theorem toWeakDualBCNN_apply (μ : FiniteMeasure Ω) (f : Ω →ᵇ ℝ≥0) :
    μ.toWeakDualBCNN f = (∫⁻ x, f x ∂(μ : Measure Ω)).toNNReal

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)
(f : Ω →ᵇ ℝ≥0)

μ.toWeakDualBCNN f = (∫⁻ (x : Ω), ↑(f x) ∂↑μ).toNNReal


theorem sumCongr_trans (e : Equiv.Perm α) (f : Equiv.Perm β) (g : Equiv.Perm α)
    (h : Equiv.Perm β) : (sumCongr e f).trans (sumCongr g h) = sumCongr (e.trans g) (f.trans h)

{α : Type u_1}
{β : Type u_2}
(e : Equiv.Perm α)
(f : Equiv.Perm β)
(g : Equiv.Perm α)
(h : Equiv.Perm β)

Equiv.trans (e.sumCongr f) (g.sumCongr h) = Equiv.Perm.sumCongr (Equiv.trans e g) (Equiv.trans f h)


@[simp]
theorem mem_inf (x : M) : x ∈ N ⊓ N' ↔ x ∈ N ∧ x ∈ N'

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


/-- The adjoint is involutive. -/
@[simp]
theorem adjoint_adjoint (A : E →L[𝕜] F) : A†† = A

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
[CompleteSpace F]
(A : E →L[𝕜] F)

ContinuousLinearMap.adjoint (ContinuousLinearMap.adjoint A) = A


@[to_additive]
theorem prod_sdiff [DecidableEq α] (h : s₁ ⊆ s₂) :
    (∏ x ∈ s₂ \ s₁, f x) * ∏ x ∈ s₁, f x = ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]
(h : s₁ ⊆ s₂)

∑ x ∈ s₂ \ s₁, f x + ∑ x ∈ s₁, f x = ∑ x ∈ s₂, f x


@[simp]
theorem factorThruImageSubobject_comp_self {W : C} (k : W ⟶ X) (h) :
    (imageSubobject f).factorThru (k ≫ f) h = k ≫ factorThruImageSubobject f

(h : (CategoryTheory.Limits.imageSubobject f).Factors (k ≫ f))

(CategoryTheory.Limits.imageSubobject f).factorThru (k ≫ f) h = k ≫ CategoryTheory.Limits.factorThruImageSubobject f


lemma restrict_commute {f g : M →ₗ[R] M} (h : Commute f g) {p : Submodule R M}
    (hf : MapsTo f p p) (hg : MapsTo g p p) :
    Commute (f.restrict hf) (g.restrict hg)

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f g : M →ₗ[R] M}
(h : Commute f g)
{p : Submodule R M}
(hf : Set.MapsTo ⇑f ↑p ↑p)
(hg : Set.MapsTo ⇑g ↑p ↑p)


@[simp]
theorem pos (n : ℕ+) : 0 < (n : ℕ)


@[simp]
theorem mulRight₀_symm_apply (c : α) (hc : c ≠ 0) :
    ((Homeomorph.mulRight₀ c hc).symm : α → α) = (· * c⁻¹)

{α : Type u_1}
[TopologicalSpace α]
[GroupWithZero α]
[ContinuousMul α]
(c : α)
(hc : c ≠ 0)

⇑(Homeomorph.mulRight₀ c hc).symm = fun x => x * c⁻¹


theorem iInf_false {s : False → α} : iInf s = ⊤

{α : Type u_1}
[CompleteLattice α]
{s : False → α}


/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c

C.asFunctor.obj t = { X := fun i => (C.X i).obj t, d := fun i j => (C.d i j).app t, shape := ⋯, d_comp_d' := ⋯ }


@[simp]
lemma restrictionApp_toPresheafOfModules {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    PresheafOfModules.restrictionApp f M.toPresheafOfModules = M.map f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : BundledCorePresheafOfModules R)
{X Y : Cᵒᵖ}
(f : X ⟶ Y)


/-- If `X` is a compact space, then a locally finite family of nonempty sets of `X` can have only
finitely many elements, `Set.Finite` version. -/
theorem LocallyFinite.finite_of_compact [CompactSpace X] {f : ι → Set X}
    (hf : LocallyFinite f) (hne : ∀ i, (f i).Nonempty) : (univ : Set ι).Finite

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
[CompactSpace X]
{f : ι → Set X}
(hf : LocallyFinite f)
(hne : ∀ (i : ι), (f i).Nonempty)


@[simp]
protected theorem zero_mul [Fintype m] (M : Matrix m n α) : (0 : Matrix l m α) * M = 0

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype m]
(M : Matrix m n α)


theorem coe_zpow (x : (𝓞 K)ˣ) (n : ℤ) : (↑(x ^ n) : K) = (x : K) ^ n

{K : Type u_1}
[Field K]
(x : (𝓞 K)ˣ)
(n : ℤ)

(algebraMap (𝓞 K) K) ↑(x ^ n) = (algebraMap (𝓞 K) K) ↑x ^ n


@[to_additive (attr := simp)]
theorem fromLeftInv_leftInvEquiv_symm (x : S) : S.fromLeftInv ((S.leftInvEquiv hS).symm x) = x

{M : Type u_1}
[CommMonoid M]
(S : Submonoid M)
(hS : S ≤ IsUnit.submonoid M)
(x : ↥S)


theorem univ_unique [Unique α] : @Set.univ α = {default}


@[simp] lemma dirSupClosed_compl : DirSupClosed sᶜ ↔ DirSupInacc s


theorem ContDiffWithinAt.congr_of_eventuallyEq_insert (h : ContDiffWithinAt 𝕜 n f s x)
    (h₁ : f₁ =ᶠ[𝓝[insert x s] x] f) : ContDiffWithinAt 𝕜 n f₁ s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f f₁ : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)
(h₁ : f₁ =ᶠ[𝓝[insert x s] x] f)


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

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

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.isLimitConeOfCoconeRightOp F hc).lift s =
  (hc.desc (CategoryTheory.Limits.coconeRightOpOfCone s)).unop


/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(s : S₁.Splitting)
(e : S₁ ≅ S₂)

(s.ofIso e).r = CategoryTheory.CategoryStruct.comp e.inv.τ₂ (CategoryTheory.CategoryStruct.comp s.r e.hom.τ₁)


@[aesop 10% apply]
theorem isStarNormal {x : R} (hx : IsSelfAdjoint x) : IsStarNormal x

{R : Type u_1}
[Semigroup R]
[StarMul R]
{x : R}
(hx : IsSelfAdjoint x)


theorem gc_map_comap (f : F) :
    GaloisConnection (map f : NonUnitalSubalgebra R A → NonUnitalSubalgebra R B) (comap f)

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(f : F)

GaloisConnection (NonUnitalSubalgebra.map f) (NonUnitalSubalgebra.comap f)


@[simp]
theorem mem_map_iff (f : α → β) {o : Part α} {b} : b ∈ map f o ↔ ∃ a ∈ o, f a = b

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{o : Part α}
{b : β}


theorem arctan_inv_2_add_arctan_inv_3 : arctan 2⁻¹ + arctan 3⁻¹ = π / 4

Real.arctan 2⁻¹ + Real.arctan 3⁻¹ = Real.pi / 4


theorem continuous_toMul : Continuous (toMul : Additive X → X)


/-- If `s ⊆ f.source` and `g x ∈ f'.source` whenever `x ∈ s`, then `g` is continuous on `s` if and
only if `g` written in charts `f.extend I` and `f'.extend I'` is continuous on `f.extend I '' s`. -/
theorem continuousOn_writtenInExtend_iff {f' : PartialHomeomorph M' H'} {g : M → M'}
    (hs : s ⊆ f.source) (hmaps : MapsTo g s f'.source) :
    ContinuousOn (f'.extend I' ∘ g ∘ (f.extend I).symm) (f.extend I '' s) ↔ ContinuousOn g s

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
{E' : Type u_5}
{M' : Type u_6}
{H' : Type u_7}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
[TopologicalSpace H']
[TopologicalSpace M']
(I' : ModelWithCorners 𝕜 E' H')
{s : Set M}
{f' : PartialHomeomorph M' H'}
{g : M → M'}
(hs : s ⊆ f.source)
(hmaps : Set.MapsTo g s f'.source)

ContinuousOn (↑(f'.extend I') ∘ g ∘ ↑(f.extend I).symm) (↑(f.extend I) '' s) ↔ ContinuousOn g s


@[simp]
theorem nnnorm_transpose (A : Matrix m n α) : ‖Aᵀ‖₊ = ‖A‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
(A : Matrix m n α)

‖Aᵀ‖₊ = ‖A‖₊


theorem extChartAt_coe_symm (x : M) : ⇑(extChartAt I x).symm = (chartAt H x).symm ∘ I.symm

{𝕜 : 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)

↑(extChartAt I x).symm = ↑(chartAt H x).symm ∘ ↑I.symm


/-- An element `y` is in the ω-limit set of `s` w.r.t. `f` if the
    preimages of an arbitrary neighbourhood of `y` frequently
    (w.r.t. `f`) intersects of `s`. -/
theorem mem_omegaLimit_iff_frequently (y : β) :
    y ∈ ω f ϕ s ↔ ∀ n ∈ 𝓝 y, ∃ᶠ t in f, (s ∩ ϕ t ⁻¹' n).Nonempty

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)
(y : β)

y ∈ omegaLimit f ϕ s ↔ ∀ n ∈ 𝓝 y, ∃ᶠ (t : τ) in f, (s ∩ ϕ t ⁻¹' n).Nonempty


theorem BinaryFan.isLimit_iff_isIso_fst {X Y : C} (h : IsTerminal Y) (c : BinaryFan X Y) :
    Nonempty (IsLimit c) ↔ IsIso c.fst

(h : CategoryTheory.Limits.IsTerminal Y)

(c : CategoryTheory.Limits.BinaryFan X Y)

Nonempty (CategoryTheory.Limits.IsLimit c) ↔ CategoryTheory.IsIso c.fst


/-- The first projection `Triangle C ⥤ C`. -/
@[simps]
def π₁ : Triangle C ⥤ C

(T : CategoryTheory.Pretriangulated.Triangle C)

CategoryTheory.Pretriangulated.Triangle.π₁.obj T = T.obj₁


/-- The equivalence of functor categories induced by `leftOp` and `rightOp`.
-/
@[simps!]
def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ

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

(CategoryTheory.Functor.leftOpRightOpEquiv C D).unitIso.inv.app X = (Opposite.unop X).rightOpLeftOpIso.inv.op


theorem add_def (s t : SetSemiring α) : s + t = up (down s ∪ down t)

s + t = Set.up (SetSemiring.down s ∪ SetSemiring.down t)


theorem hyperoperation_ge_two_eq_self (n m : ℕ) : hyperoperation (n + 2) m 1 = m


protected theorem Function.isEmpty [IsEmpty β] (f : α → β) : IsEmpty α

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


theorem card_boundaries_eq_succ_length : c.boundaries.card = c.length + 1


/-- The center of a special linear group of degree `n` is the subgroup of scalar matrices, for which
the scalars are the `n`-th roots of unity. -/
theorem mem_center_iff {A : SpecialLinearGroup n R} :
    A ∈ center (SpecialLinearGroup n R) ↔ ∃ (r : R), r ^ (Fintype.card n) = 1 ∧ scalar n r = A

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

A ∈ Subgroup.center (Matrix.SpecialLinearGroup n R) ↔ ∃ r, r ^ Fintype.card n = 1 ∧ (Matrix.scalar n) r = ↑A


@[simp]
theorem size_dual (t : Ordnode α) : size (dual t) = size t


/-- The **spectral mapping theorem** for the non-unital continuous functional calculus. -/
lemma cfcₙHom_map_quasispectrum (f : C(σₙ R a, R)₀) :
    σₙ R (cfcₙHom ha f) = Set.range f


/-- An auxiliary type for the proof of Urysohn's lemma: a pair of a closed set `C` and its
open neighborhood `U`, together with the assumption that `C` satisfies the property `P C`. The
latter assumption will make it possible to prove simultaneously both versions of Urysohn's lemma,
in normal spaces (with `P` always true) and in locally compact spaces (with `P = IsCompact`).
We put also in the structure the assumption that, for any such pair, one may find an intermediate
pair inbetween satisfying `P`, to avoid carrying it around in the argument. -/
structure CU {X : Type*} [TopologicalSpace X] (P : Set X → Prop) where
  /-- The inner set in the inductive construction towards Urysohn's lemma -/
  protected C : Set X
  /-- The outer set in the inductive construction towards Urysohn's lemma -/
  protected U : Set X
  protected P_C : P C
  protected closed_C : IsClosed C
  protected open_U : IsOpen U
  protected subset : C ⊆ U
  protected hP : ∀ {c u : Set X}, IsClosed c → P c → IsOpen u → c ⊆ u →
    ∃ v, IsOpen v ∧ c ⊆ v ∧ closure v ⊆ u ∧ P (closure v)

{X : Type u_2}
[TopologicalSpace X]
{P : Set X → Prop}
(self : Urysohns.CU P)


/-- Any two functors to `Discrete PUnit` are *equal*.
You probably want to use `punitExt` instead of this. -/
theorem punit_ext' (F G : C ⥤ Discrete PUnit.{w + 1}) : F = G

(F G : CategoryTheory.Functor C (CategoryTheory.Discrete PUnit.{w + 1}))


@[simp]
theorem comp_apply (f : FrameHom β γ) (g : FrameHom α β) (a : α) : (f.comp g) a = f (g a)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CompleteLattice α]
[CompleteLattice β]
[CompleteLattice γ]
(f : FrameHom β γ)
(g : FrameHom α β)
(a : α)


/-- like `coe_nonneg`, but with the inequality in `Ico (0:α) 1`. -/
theorem nonneg [Nontrivial α] {t : Ico (0 : α) 1} : 0 ≤ t

{α : Type u_1}
[OrderedSemiring α]
[Nontrivial α]
{t : ↑(Set.Ico 0 1)}


/-- When taking the infimum of `f : ι → α`, the elements of `ι` on which `f` gives `⊤` can be
dropped, without changing the result. -/
theorem iInf_ne_top_subtype (f : ι → α) : ⨅ i : { i // f i ≠ ⊤ }, f i = ⨅ i, f i

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f : ι → α)


@[simp]
theorem Submodule.toAddSubmonoid_toNatSubmodule (S : Submodule ℕ M) :
    AddSubmonoid.toNatSubmodule S.toAddSubmonoid = S

{M : Type u_3}
[AddCommMonoid M]
(S : Submodule ℕ M)


theorem contDiff_prod_mk_left (f₀ : F) : ContDiff 𝕜 n fun e : E => (e, f₀)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
(f₀ : F)


@[simp, elementwise]
theorem res_π (i : ι) : res F U ≫ limit.π _ ⟨i⟩ = F.map (Opens.leSupr U i).op

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)
(i : ι)

TopCat.Presheaf.SheafConditionEqualizerProducts.res F U ≫
    CategoryTheory.Limits.limit.π (CategoryTheory.Discrete.functor fun i => F.obj (Opposite.op (U i))) { as := i } =
  F.map (TopologicalSpace.Opens.leSupr U i).op


theorem cyclotomic_prime_pow_mul_X_pow_sub_one (R : Type*) [CommRing R] (p k : ℕ)
    [hn : Fact (Nat.Prime p)] :
    cyclotomic (p ^ (k + 1)) R * (X ^ p ^ k - 1) = X ^ p ^ (k + 1) - 1

(R : Type u_1)
[CommRing R]
(p k : ℕ)
[hn : Fact (Nat.Prime p)]

Polynomial.cyclotomic (p ^ (k + 1)) R * (Polynomial.X ^ p ^ k - 1) = Polynomial.X ^ p ^ (k + 1) - 1


theorem extChartAt_coe (x : M) : ⇑(extChartAt I x) = I ∘ chartAt H 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)


@[to_additive]
theorem mul_def [Mul M] [Mul N] (p q : M × N) : p * q = (p.1 * q.1, p.2 * q.2)

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]
(p q : M × N)


theorem range_sdiff_zero {n : ℕ} : range (n + 1) \ {0} = (range n).image Nat.succ

Finset.range (n + 1) \ {0} = Finset.image Nat.succ (Finset.range n)


/-- The right unitor functor `C × 1 ⥤ C` -/
@[simps]
def rightUnitor : C × Discrete (PUnit : Type w) ⥤ C

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

∀ {X Y : C × CategoryTheory.Discrete PUnit.{w + 1}} (f : X ⟶ Y), (CategoryTheory.prod.rightUnitor C).map f = f.1


theorem mul_le_mul_of_nonneg_of_nonpos' [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hca : c ≤ a) (hbd : b ≤ d) (ha : 0 ≤ a) (hd : d ≤ 0) : a * b ≤ c * d

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

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


theorem IsOpen.uniqueDiffOn (hs : IsOpen s) : UniqueDiffOn 𝕜 s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
(hs : IsOpen s)


theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s)

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(h : Bornology.IsBounded s)


theorem mul_le_of_le_div' (h : a ≤ b / c) : c * a ≤ b


@[simp]
theorem lastFun_of_subtype {α} (p : α ⟹ «repeat» (n + 1) Prop) :
    lastFun (ofSubtype p) = _root_.id

(p : α.Arrow (TypeVec.repeat (n + 1) Prop))

TypeVec.lastFun (TypeVec.ofSubtype p) = id


theorem continuous_from_bounded {p : SeminormFamily 𝕝 E ι} {q : SeminormFamily 𝕝₂ F ι'}
    {_ : TopologicalSpace E} (hp : WithSeminorms p) {_ : TopologicalSpace F} (hq : WithSeminorms q)
    (f : E →ₛₗ[τ₁₂] F) (hf : Seminorm.IsBounded p q f) : Continuous f

{𝕝 : Type u_3}
{𝕝₂ : Type u_4}
{E : Type u_5}
{F : Type u_6}
{ι : Type u_8}
{ι' : Type u_9}
[AddCommGroup E]
[NormedField 𝕝]
[Module 𝕝 E]
[AddCommGroup F]
[NormedField 𝕝₂]
[Module 𝕝₂ F]
{τ₁₂ : 𝕝 →+* 𝕝₂}
[RingHomIsometric τ₁₂]
[Nonempty ι]
[Nonempty ι']
{p : SeminormFamily 𝕝 E ι}
{q : SeminormFamily 𝕝₂ F ι'}

∀ {x : TopologicalSpace E},
  WithSeminorms p →
    ∀ {x_1 : TopologicalSpace F}, WithSeminorms q → ∀ (f : E →ₛₗ[τ₁₂] F), Seminorm.IsBounded p q f → Continuous ⇑f


theorem Set.restrictPreimage_openEmbedding (s : Set β) (h : OpenEmbedding f) :
    OpenEmbedding (s.restrictPreimage f)

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


theorem subsingleton_nil : Subsingleton (@nil α)


@[ext]
protected lemma ext {f g : X ⟶ Y} (h_base : f.1.base = g.1.base)
    (h_app : ∀ U, f.app U ≫ X.presheaf.map
      (eqToHom congr((Opens.map $h_base.symm).obj U)).op = g.app U) : f = g

(h_app :
  ∀ (U : Y.Opens),
    AlgebraicGeometry.Scheme.Hom.app f U ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯).op =
      AlgebraicGeometry.Scheme.Hom.app g U)


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

(α : Type u_1)
[PartialOrder α]
[BoundedOrder α]


theorem ext_iff {φ₁ φ₂ : A →ₗc[R] B} : φ₁ = φ₂ ↔ ∀ x, φ₁ x = φ₂ x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{φ₁ φ₂ : A →ₗc[R] B}

φ₁ = φ₂ ↔ ∀ (x : A), φ₁ x = φ₂ x


theorem monic_of_d_eq_one' : (toPoly ⟨0, 0, 0, 1⟩).Monic


@[simp]
theorem inf_sup_symmDiff : a ⊓ b ⊔ a ∆ b = a ⊔ b

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


/-- Auxiliary lemma to express bilinearity of `QuadraticMap.polar` without subtraction. -/
theorem polar_add_left_iff {f : M → N} {x x' y : M} :
    polar f (x + x') y = polar f x y + polar f x' y ↔
      f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x)

{M : Type u_4}
{N : Type u_5}
[AddCommGroup M]
[AddCommGroup N]
{f : M → N}
{x x' y : M}

QuadraticMap.polar f (x + x') y = QuadraticMap.polar f x y + QuadraticMap.polar f x' y ↔
  f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x)


/-- The functor which flips commutative squares. -/
@[simps]
def flipFunctor : Square C ⥤ Square C

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

∀ {X Y : CategoryTheory.Square C} (φ : X ⟶ Y), (CategoryTheory.Square.flipFunctor.map φ).τ₂ = φ.τ₃


theorem evariance_eq_zero_iff (hX : AEMeasurable X μ) :
    evariance X μ = 0 ↔ X =ᵐ[μ] fun _ => μ[X]

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{X : Ω → ℝ}
{μ : MeasureTheory.Measure Ω}
(hX : AEMeasurable X μ)

ProbabilityTheory.evariance X μ = 0 ↔ X =ᵐ[μ] fun x => ∫ (x : Ω), X x ∂μ


theorem injective_of_subsingleton [Subsingleton α] (f : α → β) : Injective f

{α : Sort u_1}
{β : Sort u_2}
[Subsingleton α]
(f : α → β)


theorem toReal_lintegral_coe_eq_integral (f : X →ᵇ ℝ≥0) (μ : Measure X) :
    (∫⁻ x, (f x : ℝ≥0∞) ∂μ).toReal = ∫ x, (f x : ℝ) ∂μ

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
(f : X →ᵇ ℝ≥0)
(μ : MeasureTheory.Measure X)

(∫⁻ (x : X), ↑(f x) ∂μ).toReal = ∫ (x : X), ↑(f x) ∂μ


theorem const_mono : Monotone (const β : α → β → α)


/-- Auxiliary lemma for `rnDeriv_withDensity_left`. -/
lemma rnDeriv_withDensity_withDensity_rnDeriv_left (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
    (hf_ne_top : ∀ᵐ x ∂μ, f x ≠ ∞) :
    ((ν.withDensity (μ.rnDeriv ν)).withDensity f).rnDeriv ν =ᵐ[ν] (μ.withDensity f).rnDeriv ν

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℝ≥0∞}
(μ ν : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hf_ne_top : ∀ᵐ (x : α) ∂μ, f x ≠ ⊤)


theorem nat_casesOn' {f : α → β} {g : α → ℕ → β} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a (n : ℕ) => (n.casesOn (f a) (g a) : β)

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

Primrec₂ fun a n => Nat.casesOn n (f a) (g a)


lemma natCast_eq_divInt (n : ℕ) : ↑n = n /. 1


theorem shiftLeft'_tt_eq_mul_pow (m) : ∀ n, shiftLeft' true m n + 1 = (m + 1) * 2 ^ n

Nat.shiftLeft' true m n + 1 = (m + 1) * 2 ^ n


@[to_additive]
theorem coe_smul [Group G] [MulAction G β] (g : G) (f : α ↪ β) : ⇑(g • f) = g • ⇑f

{G : Type u_1}
{α : Type u_3}
{β : Type u_4}
[AddGroup G]
[AddAction G β]
(g : G)
(f : α ↪ β)


theorem continuousOn_exp : ContinuousOn (exp 𝕂 : 𝔸 → 𝔸) (EMetric.ball 0 (expSeries 𝕂 𝔸).radius)

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[NontriviallyNormedField 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]

ContinuousOn (NormedSpace.exp 𝕂) (EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)


@[simp]
theorem coprod.desc_comp_inl_comp_inr {W X Y Z : C} [HasBinaryCoproduct W Y]
    [HasBinaryCoproduct X Z] (g : W ⟶ X) (g' : Y ⟶ Z) :
    coprod.desc (g ≫ coprod.inl) (g' ≫ coprod.inr) = coprod.map g g'

CategoryTheory.Limits.coprod.desc (g ≫ CategoryTheory.Limits.coprod.inl) (g' ≫ CategoryTheory.Limits.coprod.inr) =
  CategoryTheory.Limits.coprod.map g g'


@[simp]
theorem Real.logDeriv_cosh : logDeriv (Real.cosh) = Real.tanh


theorem eq_prime_pow_of_unique_prime_dvd {n p : ℕ} (hpos : n ≠ 0)
    (h : ∀ {d}, Nat.Prime d → d ∣ n → d = p) : n = p ^ n.primeFactorsList.length

(h : ∀ {d : ℕ}, Nat.Prime d → d ∣ n → d = p)


theorem extChartAt_preimage_mem_nhds' {x x' : M} (h : x' ∈ (extChartAt I x).source)
    (ht : t ∈ 𝓝 x') : (extChartAt I x).symm ⁻¹' t ∈ 𝓝 (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)
{t : Set M}
[ChartedSpace H M]
{x x' : M}
(h : x' ∈ (extChartAt I x).source)
(ht : t ∈ 𝓝 x')

↑(extChartAt I x).symm ⁻¹' t ∈ 𝓝 (↑(extChartAt I x) x')


@[simp]
theorem coe_coeMonoidHom : (coeMonoidHom : ℕ+ → ℕ) = Coe.coe


theorem isConnected_iff_isColimit_pUnitCocone :
    IsConnected C ↔ Nonempty (IsColimit (pUnitCocone.{w} C))

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

CategoryTheory.IsConnected C ↔ Nonempty (CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.Types.pUnitCocone C))


theorem connectedComponent_eq {x y : α} (h : y ∈ connectedComponent x) :
    connectedComponent x = connectedComponent y

{α : Type u}
[TopologicalSpace α]
{x y : α}
(h : y ∈ connectedComponent x)


theorem einfsep_anti (hst : s ⊆ t) : t.einfsep ≤ s.einfsep

{α : Type u_1}
[EDist α]
{s t : Set α}
(hst : s ⊆ t)


@[to_additive addOrderOf_add_dvd_mul_addOrderOf]
theorem orderOf_mul_dvd_mul_orderOf (h : Commute x y):
    orderOf (x * y) ∣ orderOf x * orderOf y

{G : Type u_1}
[Monoid G]
{x y : G}
(h : Commute x y)


theorem det_updateRow_add_smul_self (A : Matrix n n R) {i j : n} (hij : i ≠ j) (c : R) :
    det (updateRow A i (A i + c • A j)) = det A

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : Matrix n n R)
{i j : n}
(hij : i ≠ j)
(c : R)

(A.updateRow i (A i + c • A j)).det = A.det


theorem isSeparating_unop_iff (𝒢 : Set Cᵒᵖ) : IsSeparating 𝒢.unop ↔ IsCoseparating 𝒢

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

CategoryTheory.IsSeparating 𝒢.unop ↔ CategoryTheory.IsCoseparating 𝒢


theorem repr_range : LinearMap.range (b.repr : M →ₗ[R] ι →₀ R) = Finsupp.supported R R univ

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

LinearMap.range ↑b.repr = Finsupp.supported R R Set.univ


@[simp]
theorem mem_Ioi : x ∈ Ioi a ↔ a < x

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderTop α]
{a x : α}


@[simp, norm_cast]
theorem coe_inv (x : ℝ) : ↑x⁻¹ = (x⁻¹ : ℝ*)

↑x⁻¹ = (↑x)⁻¹


@[measurability]
theorem AEMeasurable.inner_const {m : MeasurableSpace α} [MeasurableSpace E]
    [OpensMeasurableSpace E] [SecondCountableTopology E]
    {μ : MeasureTheory.Measure α} {f : α → E} {c : E} (hf : AEMeasurable f μ) :
    AEMeasurable (fun x => ⟪f x, c⟫) μ

{α : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{m : MeasurableSpace α}
[MeasurableSpace E]
[OpensMeasurableSpace E]
[SecondCountableTopology E]
{μ : MeasureTheory.Measure α}
{f : α → E}
{c : E}
(hf : AEMeasurable f μ)


theorem of_source_openCover [IsAffine Y]
    (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.obj i)] (H : ∀ i, Q ((𝒰.map i ≫ f).app ⊤)) :
    P f

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

[∀ (i : 𝒰.J), AlgebraicGeometry.IsAffine (𝒰.obj i)]

(H : ∀ (i : 𝒰.J), Q (AlgebraicGeometry.Scheme.Hom.app (𝒰.map i ≫ f) ⊤))


theorem maximum?_le_iff [Max α] [LE α]
    (max_le_iff : ∀ a b c : α, max b c ≤ a ↔ b ≤ a ∧ c ≤ a) :
    {xs : List α} → xs.maximum? = some a → ∀ x, a ≤ x ↔ ∀ b ∈ xs, b ≤ x

(max_le_iff : ∀ (a b c : α), max b c ≤ a ↔ b ≤ a ∧ c ≤ a)

xs.maximum? = some a → ∀ (x : α), a ≤ x ↔ ∀ (b : α), b ∈ xs → b ≤ x


theorem isSeparatedFor_top (P : Cᵒᵖ ⥤ Type w) : IsSeparatedFor P (⊤ : Presieve X)

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


/-- A uniform limit of continuous functions is continuous. -/
protected theorem TendstoUniformly.continuous (h : TendstoUniformly F f p)
    (hc : ∀ᶠ n in p, Continuous (F n)) [NeBot p] : Continuous f

{F : ι → α → β}

(hc : ∀ᶠ (n : ι) in p, Continuous (F n))


/-- The dimension theorem: if `v` and `v'` are two bases, their index types
have the same cardinalities. -/
theorem mk_eq_mk_of_basis (v : Basis ι R M) (v' : Basis ι' R M) :
    Cardinal.lift.{w'} #ι = Cardinal.lift.{w} #ι'

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type w}
{ι' : Type w'}
[InvariantBasisNumber R]
(v : Basis ι R M)
(v' : Basis ι' R M)

Cardinal.lift.{w', w} #ι = Cardinal.lift.{w, w'} #ι'


@[simp] theorem coe_iSup : (↑(⨆ i, f i) : α) = ⨆ i, (f i : α)

{ι : Sort u_1}
{α : Type u_2}
[CompleteLattice α]
{a : α}
(f : ι → ↑(Set.Iic a))


@[simp, norm_cast]
theorem coe_iInf (f : ι → LowerSet α) : (↑(⨅ i, f i) : Set α) = ⋂ i, f i

{α : Type u_1}
{ι : Sort u_4}
[LE α]
(f : ι → LowerSet α)


theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s)
    (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[t : OrderClosedTopology α]
[TopologicalSpace β]
{f : β → α}
{s : Set β}
(hs : IsClosed s)
(hf : ContinuousOn f s)


@[simp]
theorem toPrefunctor_symm_id : toPrefunctor.symm (𝟭q (SingleObj α)) = id

Quiver.SingleObj.toPrefunctor.symm (𝟭q (Quiver.SingleObj α)) = id


theorem iInter_plift_down (f : ι → Set α) : ⋂ i, f (PLift.down i) = ⋂ i, f i

{α : Type u_1}
{ι : Sort u_4}
(f : ι → Set α)


theorem isWF_univ_iff : IsWF (univ : Set α) ↔ WellFounded ((· < ·) : α → α → Prop)

Set.univ.IsWF ↔ WellFounded fun x x_1 => x < x_1


theorem MapsTo.inter_bijOn (h₁ : MapsTo f s₁ t₁) (h₂ : BijOn f s₂ t₂) (h₃ : s₂ ∩ f ⁻¹' t₁ ⊆ s₁) :
    BijOn f (s₁ ∩ s₂) (t₁ ∩ t₂)

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{t₁ t₂ : Set β}
{f : α → β}
(h₁ : Set.MapsTo f s₁ t₁)
(h₂ : Set.BijOn f s₂ t₂)
(h₃ : s₂ ∩ f ⁻¹' t₁ ⊆ s₁)


@[to_additive]
theorem orderOf_le_exponent (h : ExponentExists G) (g : G) : orderOf g ≤ exponent G

{G : Type u}
[Monoid G]
(h : Monoid.ExponentExists G)
(g : G)


theorem vsub_le_vsub_right : f₁ ≤ f₂ → f₁ -ᵥ g ≤ f₂ -ᵥ g

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{f₁ f₂ g : Filter β}

f₁ ≤ f₂ → f₁ -ᵥ g ≤ f₂ -ᵥ g


@[reassoc]
lemma opcyclesMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) (h₃ : S₃.RightHomologyData) :
    opcyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = opcyclesMap' φ₁ h₁ h₂ ≫ opcyclesMap' φ₂ h₂ h₃

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

(φ₁ : S₁ ⟶ S₂)

(φ₂ : S₂ ⟶ S₃)

CategoryTheory.ShortComplex.opcyclesMap' (CategoryTheory.CategoryStruct.comp φ₁ φ₂) h₁ h₃ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.opcyclesMap' φ₁ h₁ h₂)
    (CategoryTheory.ShortComplex.opcyclesMap' φ₂ h₂ h₃)


lemma Functor.imageSieve_eq_imageSieve {D : Type uD} [Category.{vC} D] (G : C ⥤ D) {U V : C}
    (f : G.obj U ⟶ G.obj V) :
    G.imageSieve f = Presheaf.imageSieve (yonedaMap G V) f

{C : Type uC}
[CategoryTheory.Category.{vC, uC} C]
{D : Type uD}
[CategoryTheory.Category.{vC, uD} D]
(G : CategoryTheory.Functor C D)
{U V : C}
(f : G.obj U ⟶ G.obj V)

G.imageSieve f = CategoryTheory.Presheaf.imageSieve (CategoryTheory.yonedaMap G V) f


lemma W.shift {X₁ X₂ : C} {f : X₁ ⟶ X₂} (hf : S.W f) (n : ℤ) : S.W (f⟦n⟧')

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

{S : CategoryTheory.Triangulated.Subcategory C}

S.W ((CategoryTheory.shiftFunctor C n).map f)


theorem toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q

{R : Type u_1}
[Semiring R]
(P Q : Cubic R)


theorem uniformContinuous_ofUniformFun :
    UniformContinuous fun f : α →ᵤ β ↦ ofFun 𝔖 (UniformFun.toFun f)

{α : Type u_1}
(β : Type u_2)
[UniformSpace β]
(𝔖 : Set (Set α))

UniformContinuous fun f => (UniformOnFun.ofFun 𝔖) (UniformFun.toFun f)


theorem map_derivedSeries_eq (hf : Function.Surjective f) (n : ℕ) :
    (derivedSeries G n).map f = derivedSeries G' n

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
{f : G →* G'}
(hf : Function.Surjective ⇑f)
(n : ℕ)

Subgroup.map f (derivedSeries G n) = derivedSeries G' n


lemma mem_iff_of_isIso [ClosedUnderIsomorphisms P] {X Y : C} (f : X ⟶ Y) [IsIso f] : P X ↔ P Y


@[to_additive]
theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Add γ]
(x y : β → γ)
(z : α → β)


@[to_additive]
theorem image_mulSingle_Ico_right (i : ι) (b : α i) :
    Pi.mulSingle i '' Ico 1 b = Ico 1 (Pi.mulSingle i b)

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → One (α i)]
(i : ι)
(b : α i)

Pi.mulSingle i '' Set.Ico 1 b = Set.Ico 1 (Pi.mulSingle i b)


theorem embedding_coe : Embedding ((↑) : ℍ → ℂ)


@[simp]
theorem lintegral_eq_zero_iff {f : α → ℝ≥0∞} (hf : Measurable f) : ∫⁻ a, f a ∂μ = 0 ↔ f =ᵐ[μ] 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : Measurable f)


@[arith_mult]
theorem IsMultiplicative.ppow [CommSemiring R] {f : ArithmeticFunction R} (hf : f.IsMultiplicative)
    {k : ℕ} : IsMultiplicative (f.ppow k)

{R : Type u_1}
[CommSemiring R]
{f : ArithmeticFunction R}
(hf : f.IsMultiplicative)
{k : ℕ}


theorem superpolynomialDecay_mul_param_iff (hk : Tendsto k l atTop) :
    SuperpolynomialDecay l k (f * k) ↔ SuperpolynomialDecay l k f

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{k : α → β}
(f : α → β)
[TopologicalSpace β]
[LinearOrderedField β]
[OrderTopology β]
(hk : Filter.Tendsto k l Filter.atTop)

Asymptotics.SuperpolynomialDecay l k (f * k) ↔ Asymptotics.SuperpolynomialDecay l k f


/-- This can be used to prove
```lean
example [AddCommMonoid α] (a : Fin 3 → α) : ∑ i, a i = a 0 + a 1 + a 2 :=
  (sum_eq _).symm
```
-/
@[simp]
theorem sum_eq [AddCommMonoid α] : ∀ {m} (a : Fin m → α), sum a = ∑ i, a i

{α : Type u_1}
[AddCommMonoid α]
{m : ℕ}
(a : Fin m → α)


/-- The counit isomorphism of the equivalence
`Karoubi (HomologicalComplex C c) ≌ HomologicalComplex (Karoubi C) c`. -/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (HomologicalComplex (Karoubi C) c)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{ι : Type u_2}
{c : ComplexShape ι}

CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.counitIso.inv = CategoryTheory.eqToHom ⋯


theorem count_succ (n : ℕ) : count p (n + 1) = count p n + if p n then 1 else 0

(p : ℕ → Prop)
[DecidablePred p]
(n : ℕ)

Nat.count p (n + 1) = Nat.count p n + if p n then 1 else 0


@[simp]
theorem Ico_sub_Ico_left (a b c : α) : Ico a b - Ico a c = Ico (max a c) b

{α : Type u_1}
[LinearOrder α]
[LocallyFiniteOrder α]
(a b c : α)

Multiset.Ico a b - Multiset.Ico a c = Multiset.Ico (max a c) b


theorem monovaryOn_self (f : ι → α) (s : Set ι) : MonovaryOn f f s

{ι : Type u_1}
{α : Type u_3}
[Preorder α]
(f : ι → α)
(s : Set ι)


/-- The values of a multiplicative character on `R` are `n`th roots of unity, where `n = #Rˣ`. -/
lemma apply_mem_rootsOfUnity [Fintype Rˣ] (a : Rˣ) {χ : MulChar R R'} :
    equivToUnitHom χ a ∈ rootsOfUnity ⟨Fintype.card Rˣ, Fintype.card_pos⟩ R'

{R : Type u_1}
{R' : Type u_2}
[CommRing R]
[CommRing R']
[Fintype Rˣ]
(a : Rˣ)
{χ : MulChar R R'}

(MulChar.equivToUnitHom χ) a ∈ rootsOfUnity ⟨Fintype.card Rˣ, ⋯⟩ R'


@[simp]
theorem singleMapHomologicalComplex_hom_app_self (j : ι) (X : W₁) :
    ((singleMapHomologicalComplex F c j).hom.app X).f j =
      F.map (singleObjXSelf c j X).hom ≫ (singleObjXSelf c j (F.obj X)).inv

((HomologicalComplex.singleMapHomologicalComplex F c j).hom.app X).f j =
  F.map (HomologicalComplex.singleObjXSelf c j X).hom ≫ (HomologicalComplex.singleObjXSelf c j (F.obj X)).inv


theorem ker_noncommProd_eq_of_supIndep_ker [FiniteDimensional K V] {ι : Type*} {f : ι → V →ₗ[K] V}
    (s : Finset ι) (comm) (h : s.SupIndep fun i ↦ ker (f i)) :
    ker (s.noncommProd f comm) = ⨆ i ∈ s, ker (f i)

(comm : (↑s).Pairwise fun a b => Commute (f a) (f b))

(h : s.SupIndep fun i => LinearMap.ker (f i))

LinearMap.ker (s.noncommProd f comm) = ⨆ i ∈ s, LinearMap.ker (f i)


/-- **Cauchy-Goursat theorem for a rectangle**: the integral of a complex differentiable function
over the boundary of a rectangle equals zero. More precisely, if `f` is continuous on a closed
rectangle and is complex differentiable on the corresponding open rectangle, then its integral over
the boundary of the rectangle equals zero. -/
theorem integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn (f : ℂ → E) (z w : ℂ)
    (Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]]))
    (Hd : DifferentiableOn ℂ f
      (Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im))) :
    (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
      I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
      I • (∫ y : ℝ in z.im..w.im, f (re z + y * I)) = 0

(Hd : DifferentiableOn ℂ f (Set.Ioo (min z.re w.re) (max z.re w.re) ×ℂ Set.Ioo (min z.im w.im) (max z.im w.im)))

(((∫ (x : ℝ) in z.re..w.re, f (↑x + ↑z.im * Complex.I)) - ∫ (x : ℝ) in z.re..w.re, f (↑x + ↑w.im * Complex.I)) +
      Complex.I • ∫ (y : ℝ) in z.im..w.im, f (↑w.re + ↑y * Complex.I)) -
    Complex.I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * Complex.I) =
  0


protected theorem min_le_left (a b : Nat) : min a b ≤ a


{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
{x : M}


theorem smallSets_eq_generate {f : Filter α} : f.smallSets = generate (powerset '' f.sets)

f.smallSets = Filter.generate (Set.powerset '' f.sets)


/-- If any two objects in a nonempty category are linked by a sequence of (potentially reversed)
morphisms, then J is connected.

The converse of `exists_zigzag'`.
-/
theorem isConnected_of_zigzag [Nonempty J] (h : ∀ j₁ j₂ : J, ∃ l,
    List.Chain Zag j₁ l ∧ List.getLast (j₁ :: l) (List.cons_ne_nil _ _) = j₂) :
    IsConnected J

(h : ∀ (j₁ j₂ : J), ∃ l, List.Chain CategoryTheory.Zag j₁ l ∧ (j₁ :: l).getLast ⋯ = j₂)


theorem setLintegral_pos_iff {f : α → ℝ≥0∞} (hf : Measurable f) {s : Set α} :
    0 < ∫⁻ a in s, f a ∂μ ↔ 0 < μ (Function.support f ∩ s)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : Measurable f)
{s : Set α}

0 < ∫⁻ (a : α) in s, f a ∂μ ↔ 0 < μ (Function.support f ∩ s)


/-- Division `y ↦ y / x` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Subtraction `y ↦ y - x` as an `IsometryEquiv`."]
def divRight [IsometricSMul Gᵐᵒᵖ G] (c : G) : G ≃ᵢ G

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd Gᵃᵒᵖ G]
(c b : G)


@[simp]
theorem gcdB_zero_left {s : R} : gcdB 0 s = 1

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{s : R}


/--
The following are equivalent for a
noetherian local domain that is not a field `(R, m, k)`:
0. `R` is a discrete valuation ring
1. `R` is a valuation ring
2. `R` is a dedekind domain
3. `R` is integrally closed with a unique non-zero prime ideal
4. `m` is principal
5. `dimₖ m/m² = 1`
6. Every nonzero ideal is a power of `m`.

Also see `tfae_of_isNoetherianRing_of_localRing_of_isDomain` for a version without `¬ IsField R`.
-/
theorem DiscreteValuationRing.TFAE [IsNoetherianRing R] [LocalRing R] [IsDomain R]
    (h : ¬IsField R) :
    List.TFAE
      [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R,
        IsIntegrallyClosed R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ P.IsPrime, (maximalIdeal R).IsPrincipal,
        finrank (ResidueField R) (CotangentSpace R) = 1,
        ∀ (I) (_ : I ≠ ⊥), ∃ n : ℕ, I = maximalIdeal R ^ n]

(R : Type u_1)
[CommRing R]
[IsNoetherianRing R]
[LocalRing R]
[IsDomain R]
(h : ¬IsField R)

[DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R, IsIntegrallyClosed R ∧ ∃! P, P ≠ ⊥ ∧ P.IsPrime,
    Submodule.IsPrincipal (LocalRing.maximalIdeal R),
    FiniteDimensional.finrank (LocalRing.ResidueField R) (LocalRing.CotangentSpace R) = 1,
    ∀ (I : Ideal R), I ≠ ⊥ → ∃ n, I = LocalRing.maximalIdeal R ^ n].TFAE


theorem pred_le_iff_le_succ : ∀ {n m}, pred n ≤ m ↔ n ≤ succ m


@[simp]
theorem compl_himp : (x ⇨ y)ᶜ = x \ y

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


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

{M : Type u_2}
[MonoidWithZero M]
{x r : M}
(hr : r ∈ M⁰)


theorem prod_mono {S T : NonUnitalStarSubalgebra R A} {S₁ T₁ : NonUnitalStarSubalgebra R B} :
    S ≤ T → S₁ ≤ T₁ → prod S S₁ ≤ prod T T₁

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
[StarModule R B]
{S T : NonUnitalStarSubalgebra R A}
{S₁ T₁ : NonUnitalStarSubalgebra R B}


theorem mapRange_neLocus_eq [∀ a, DecidableEq (N a)] [∀ a, DecidableEq (M a)] (f g : Π₀ a, N a)
    {F : ∀ a, N a → M a} (F0 : ∀ a, F a 0 = 0) (hF : ∀ a, Function.Injective (F a)) :
    (f.mapRange F F0).neLocus (g.mapRange F F0) = f.neLocus g

(hF : ∀ (a : α), Function.Injective (F a))

(DFinsupp.mapRange F F0 f).neLocus (DFinsupp.mapRange F F0 g) = f.neLocus g


@[simp] theorem _root_.LinearIsometryEquiv.piLpCurry_apply
    (f : PiLp p (fun i : Sigma κ => α i.1 i.2)) :
    _root_.LinearIsometryEquiv.piLpCurry 𝕜 p α f =
      (WithLp.equiv _ _).symm (fun i => (WithLp.equiv _ _).symm <|
        Sigma.curry (WithLp.equiv _ _ f) i)

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

[(i : ι) → (k : κ i) → Module 𝕜 (α i k)]

(LinearIsometryEquiv.piLpCurry 𝕜 p α) f =
  (WithLp.equiv p ((i : ι) → WithLp p ((y : κ i) → α i y))).symm fun i =>
    (WithLp.equiv p ((y : κ i) → α i y)).symm (Sigma.curry ((WithLp.equiv p ((x : Sigma κ) → α x.fst x.snd)) f) i)


/-- If `I` is a `ModelWithCorners.Boundaryless` model, then it is a homeomorphism. -/
@[simps (config := {simpRhs := true})]
def ModelWithCorners.toHomeomorph {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) [I.Boundaryless] : H ≃ₜ E

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
[I.Boundaryless]


/-- `GroupSeminormClass F α` states that `F` is a type of `β`-valued seminorms on the group `α`.

You should extend this class when you extend `GroupSeminorm`. -/
@[to_additive]
class GroupSeminormClass (F α β : Type*) [Group α] [OrderedAddCommMonoid β] [FunLike F α β]
  extends MulLEAddHomClass F α β : Prop where
  /-- The image of one is zero. -/
  map_one_eq_zero (f : F) : f 1 = 0
  /-- The map is invariant under inversion of its argument. -/
  map_inv_eq_map (f : F) (a : α) : f a⁻¹ = f a

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Group α]
[OrderedAddCommMonoid β]
[FunLike F α β]
[self : GroupSeminormClass F α β]
(f : F)


theorem trans_apply {x : α} : (e.trans e') x = e' (e x)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)
{x : α}


@[parity_simps] lemma even_sub (h : n ≤ m) : Even (m - n) ↔ (Even m ↔ Even n)


theorem Submartingale.ae_tendsto_limitProcess_of_uniformIntegrable (hf : Submartingale f ℱ μ)
    (hunif : UniformIntegrable f 1 μ) :
    ∀ᵐ ω ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (ℱ.limitProcess f μ ω))

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(hunif : MeasureTheory.UniformIntegrable f 1 μ)

∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 (MeasureTheory.Filtration.limitProcess f ℱ μ ω))


lemma familyOfElements_isCompatible (hx : x.IsCompatible) (X : C) :
    (familyOfElements x X).Compatible

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

{x : CategoryTheory.Presheaf.FamilyOfElementsOnObjects F Y}


@[mono]
theorem apply_mono {f g : α →𝒄 β} {x y : α} (h₁ : f ≤ g) (h₂ : x ≤ y) : f x ≤ g y

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
{f g : α →𝒄 β}
{x y : α}
(h₁ : f ≤ g)
(h₂ : x ≤ y)


@[to_additive (attr := simp) coe_prodComm]
theorem coe_prodComm : ⇑(prodComm : M × N ≃* N × M) = Prod.swap

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]


/-- Given an element `a : A` of an `S`-algebra, where `S` is itself an `R`-algebra, we say that
the spectrum of `a` restricts via a function `f : S → R` if `f` is a left inverse of
`algebraMap R S`, and `f` is a right inverse of `algebraMap R S` on `spectrum S a`.

For example, when `f = Complex.re` (so `S := ℂ` and `R := ℝ`), `SpectrumRestricts a f` means that
the `ℂ`-spectrum of `a` is contained within `ℝ`. This arises naturally when `a` is selfadjoint
and `A` is a C⋆-algebra.

This is the property allows us to restrict a continuous functional calculus over `S` to a
continuous functional calculus over `R`. -/
structure QuasispectrumRestricts
    {R S A : Type*} [CommSemiring R] [CommSemiring S] [NonUnitalRing A]
    [Module R A] [Module S A] [Algebra R S] (a : A) (f : S → R) : Prop where
  /-- `f` is a right inverse of `algebraMap R S` when restricted to `quasispectrum S a`. -/
  rightInvOn : (quasispectrum S a).RightInvOn f (algebraMap R S)
  /-- `f` is a left inverse of `algebraMap R S`. -/
  left_inv : Function.LeftInverse f (algebraMap R S)

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[CommSemiring R]
[CommSemiring S]
[NonUnitalRing A]
[Module R A]
[Module S A]
[Algebra R S]
{a : A}
{f : S → R}
(self : QuasispectrumRestricts a f)

Function.LeftInverse f ⇑(algebraMap R S)


@[to_additive (attr := simp)]
theorem coe_top : ((⊤ : Subsemigroup M) : Set M) = Set.univ


@[to_additive]
theorem subset_set_smul_iff : A ⊆ a • B ↔ a⁻¹ • A ⊆ B

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{A B : Set β}
{a : α}


theorem countP_of (x : α) : countP p (of x) = if p x = true then 1 else 0

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

(FreeAddMonoid.countP p) (FreeAddMonoid.of x) = if p x = (true = true) then 1 else 0


@[simp] theorem val_rev (i : Fin n) : rev i = n - (i + 1)


@[simp]
theorem map_sub (f : M →ₗ⁅R,L⁆ N) (x y : M) : f (x - y) = f x - f y

{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)
(x y : M)


@[to_additive (attr := simp)]
theorem piCongrRight_refl {η : Type*} {Ms : η → Type*} [∀ j, Mul (Ms j)] :
    (piCongrRight fun j => MulEquiv.refl (Ms j)) = MulEquiv.refl _

{η : Type u_12}
{Ms : η → Type u_13}
[(j : η) → Mul (Ms j)]

(MulEquiv.piCongrRight fun j => MulEquiv.refl (Ms j)) = MulEquiv.refl ((j : η) → Ms j)


/-- A function is `C^(n + 1)` if and only if it is differentiable,
and its derivative (formulated in terms of `fderiv`) is `C^n`. -/
theorem contDiff_succ_iff_fderiv {n : ℕ} :
    ContDiff 𝕜 (n + 1 : ℕ) f ↔ Differentiable 𝕜 f ∧ ContDiff 𝕜 n fun y => fderiv 𝕜 f y

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ}

ContDiff 𝕜 (↑(n + 1)) f ↔ Differentiable 𝕜 f ∧ ContDiff 𝕜 ↑n fun y => fderiv 𝕜 f y


protected theorem _root_.Measurable.nullMeasurable (h : Measurable f) : NullMeasurable f μ

{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : Measurable f)


@[to_additive]
theorem univ_mul_of_one_mem (ht : (1 : α) ∈ t) : univ * t = univ

{α : Type u_2}
[AddMonoid α]
{t : Set α}
(ht : 0 ∈ t)


theorem ofReal_mul' {p q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q


/-- The function `x^(-n)` tends to `0` at `+∞` for any positive natural `n`.
A version for positive real powers exists as `tendsto_rpow_neg_atTop`. -/
theorem tendsto_pow_neg_atTop {n : ℕ} (hn : n ≠ 0) :
    Tendsto (fun x : 𝕜 => x ^ (-(n : ℤ))) atTop (𝓝 0)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{n : ℕ}
(hn : n ≠ 0)

Filter.Tendsto (fun x => x ^ (-↑n)) Filter.atTop (𝓝 0)


theorem rpow_left_surjective {x : ℝ} (hx : x ≠ 0) : Function.Surjective fun y : ℝ≥0∞ => y ^ x


@[to_additive (attr := simp)]
theorem coe_comap (S : Submonoid N) (f : F) : (S.comap f : Set M) = f ⁻¹' S

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


theorem approx_le_succ (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)
(n : ℕ)
(x : X)

Urysohns.CU.approx n c x ≤ Urysohns.CU.approx (n + 1) c x


@[to_additive]
theorem mem_orbit_smul (g : G) (a : α) : a ∈ orbit G (g • a)

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


@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) :
    StronglyMeasurable fun x => (l.map fun f : α → M => f x).prod

(hl : ∀ f ∈ l, MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable fun x => (List.map (fun f => f x) l).prod


/-- The **Jordan-Hölder** theorem, stated for any `JordanHolderLattice`.
If two composition series start and finish at the same place, they are equivalent. -/
theorem jordan_holder (s₁ s₂ : CompositionSeries X)
    (hb : s₁.head = s₂.head) (ht : s₁.last = s₂.last) :
    Equivalent s₁ s₂

(hb : RelSeries.head s₁ = RelSeries.head s₂)

(ht : RelSeries.last s₁ = RelSeries.last s₂)


theorem contDiffWithinAt_iff_forall_nat_le :
    ContDiffWithinAt 𝕜 n f s x ↔ ∀ m : ℕ, ↑m ≤ n → ContDiffWithinAt 𝕜 m 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 : ℕ∞}

ContDiffWithinAt 𝕜 n f s x ↔ ∀ (m : ℕ), ↑m ≤ n → ContDiffWithinAt 𝕜 (↑m) f s x


theorem trans_left (hab : TransGen r a b) (hbc : ReflTransGen r b c) : TransGen r a c

{α : Type u_1}
{r : α → α → Prop}
{a b c : α}
(hab : Relation.TransGen r a b)
(hbc : Relation.ReflTransGen r b c)


@[simp]
theorem preimage_Ico {a b : α} : ((↑) : ℤ → α) ⁻¹' Set.Ico a b = Set.Ico ⌈a⌉ ⌈b⌉

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a b : α}

Int.cast ⁻¹' Set.Ico a b = Set.Ico ⌈a⌉ ⌈b⌉


theorem card_sups_le : (s ⊻ t).card ≤ s.card * t.card

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


theorem contMDiffAt_prod_iff (f : M → M' × N') {x : M} :
    ContMDiffAt I (I'.prod J') n f x ↔
      ContMDiffAt I I' n (Prod.fst ∘ f) x ∧ ContMDiffAt I J' n (Prod.snd ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{n : ℕ∞}
(f : M → M' × N')
{x : M}


/--
Given a limit cone for the family `f : J → (X ⟶ Y)`, for any `Z`, morphisms from `Z` to its point
are in bijection with morphisms `h : Z ⟶ X` such that `∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂`.
Further, this bijection is natural in `Z`: see `Trident.Limits.homIso_natural`.
-/
@[simps]
def Trident.IsLimit.homIso [Nonempty J] {t : Trident f} (ht : IsLimit t) (Z : C) :
    (Z ⟶ t.pt) ≃ { h : Z ⟶ X // ∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂ }

{J : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f : J → (X ⟶ Y)}
[Nonempty J]
{t : CategoryTheory.Limits.Trident f}
(ht : CategoryTheory.Limits.IsLimit t)
(Z : C)
(k : Z ⟶ t.pt)

↑((CategoryTheory.Limits.Trident.IsLimit.homIso ht Z) k) = CategoryTheory.CategoryStruct.comp k t.ι


/-- `Option α` is a `Subsingleton` if and only if `α` is empty. -/
theorem subsingleton_iff_isEmpty {α : Type u} : Subsingleton (Option α) ↔ IsEmpty α


theorem min_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (min x y)

{α : Type u_2}
[LinearOrder α]
{x y : α}
(p : α → Prop)
(hx : p x)
(hy : p y)


/-- Binary biproducts are unique up to isomorphism. This already follows because bilimits are
    limits, but in the case of biproducts we can give an isomorphism with particularly nice
    definitional properties, namely that `biprod.lift b.fst b.snd` and `biprod.desc b.inl b.inr`
    are inverses of each other. -/
@[simps]
def biprod.uniqueUpToIso (X Y : C) [HasBinaryBiproduct X Y] {b : BinaryBicone X Y}
    (hb : b.IsBilimit) : b.pt ≅ X ⊞ Y

{b : CategoryTheory.Limits.BinaryBicone X Y}

(CategoryTheory.Limits.biprod.uniqueUpToIso X Y hb).inv = CategoryTheory.Limits.biprod.desc b.inl b.inr


theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ

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

⨍⁻ (x : α), f x ∂μ = (∫⁻ (x : α), f x ∂μ) / μ Set.univ


theorem quotientMap_iff : QuotientMap f ↔ Surjective f ∧ ∀ s : Set Y, IsOpen s ↔ IsOpen (f ⁻¹' s)

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

QuotientMap f ↔ Function.Surjective f ∧ ∀ (s : Set Y), IsOpen s ↔ IsOpen (f ⁻¹' s)


@[simp] lemma cons_eq_zero_iff {v : Fin n → α} {x : α} : vecCons x v = 0 ↔ x = 0 ∧ v = 0

{α : Type u_1}
{n : ℕ}
[Zero α]
{v : Fin n → α}
{x : α}


protected theorem Associated.irreducible_iff [Monoid α] {p q : α} (h : p ~ᵤ q) :
    Irreducible p ↔ Irreducible q

{α : Type u_1}
[Monoid α]
{p q : α}
(h : p ~ᵤ q)


@[simp] theorem one_im : (1 : ℍ[R,c₁,c₂]).im = 0


lemma ltTrichotomy_not_lt (h : ¬ x < y) :
    ltTrichotomy x y p q r = if y < x then r else q

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
{p q r : P}
(h : ¬x < y)


/-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit

WType.NatαEquivPUnitSumPUnit c =
  match c with
  | WType.Natα.zero => Sum.inl PUnit.unit
  | WType.Natα.succ => Sum.inr PUnit.unit


protected theorem sound {v w : V} :
    G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w

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


theorem mul_den_dvd (q₁ q₂ : ℚ) : (q₁ * q₂).den ∣ q₁.den * q₂.den


theorem single_eq_pi_single {i b} : ⇑(single i b : Π₀ i, β i) = Pi.single i b

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{i : ι}
{b : β i}


@[simp high, mfld_simps]
theorem continuousLinearMapAt_model_space (b b' : F) :
    (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).continuousLinearMapAt 𝕜 b' = (1 : F →L[𝕜] F)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(b b' : F)

Trivialization.continuousLinearMapAt 𝕜 (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b) b' = 1


theorem mul_toSubmodule_le (S T : Subalgebra R A) :
    (Subalgebra.toSubmodule S)* (Subalgebra.toSubmodule T) ≤ Subalgebra.toSubmodule (S ⊔ T)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S T : Subalgebra R A)

Subalgebra.toSubmodule S * Subalgebra.toSubmodule T ≤ Subalgebra.toSubmodule (S ⊔ T)


theorem inv_mem_resolventSet {r : Rˣ} {a : Aˣ} (h : (r : R) ∈ resolventSet R (a : A)) :
    (↑r⁻¹ : R) ∈ resolventSet R (↑a⁻¹ : A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{r : Rˣ}
{a : Aˣ}
(h : ↑r ∈ resolventSet R ↑a)


/-- given a sublist `l' <+ l`, there exists a list of indices `is` such that
  `l' = map (get l) is`. -/
theorem sublist_eq_map_get (h : l' <+ l) : ∃ is : List (Fin l.length),
    l' = map (get l) is ∧ is.Pairwise (· < ·)

∀ {α : Type u_1} {l' l : List α}, l' <+ l → ∃ is, l' = List.map l.get is ∧ List.Pairwise (fun x x_1 => x < x_1) is


@[simp]
theorem map₂_eq_none_iff : map₂ f a b = none ↔ a = none ∨ b = none

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β → γ}
{a : Option α}
{b : Option β}

Option.map₂ f a b = none ↔ a = none ∨ b = none


lemma comap_map_comm (κ : Kernel β γ) {f : α → β} {g : γ → δ}
    (hf : Measurable f) (hg : Measurable g) :
    comap (map κ g hg) f hf = map (comap κ f hf) g hg

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{δ : Type u_5}
{mγ : MeasurableSpace γ}
{mδ : MeasurableSpace δ}
(κ : ProbabilityTheory.Kernel β γ)
{f : α → β}
{g : γ → δ}
(hf : Measurable f)
(hg : Measurable g)

(κ.map g hg).comap f hf = (κ.comap f hf).map g hg


@[simp] theorem toNat_one : (1 : Int).toNat = 1


private theorem newton_seq_norm_le (n : ℕ) :
    ‖F.eval (newton_seq n)‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)

‖Polynomial.eval (newton_seq_gen hnorm n) F‖ ≤ ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2 * T_gen p F a ^ 2 ^ n


/-- `cyclotomic' n R` is monic. -/
theorem cyclotomic'.monic (n : ℕ) (R : Type*) [CommRing R] [IsDomain R] :
    (cyclotomic' n R).Monic

(n : ℕ)
(R : Type u_2)
[CommRing R]
[IsDomain R]


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

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

∀ (X_1 : C'), ((CategoryTheory.Functor.RightExtension.precomp L F G).obj X).hom.app X_1 = X.hom.app (G.obj X_1)


theorem testAgainstNN_add (μ : FiniteMeasure Ω) (f₁ f₂ : Ω →ᵇ ℝ≥0) :
    μ.testAgainstNN (f₁ + f₂) = μ.testAgainstNN f₁ + μ.testAgainstNN f₂

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)
(f₁ f₂ : Ω →ᵇ ℝ≥0)


lemma cfcₙHom_eq_of_continuous_of_map_id [UniqueNonUnitalContinuousFunctionalCalculus R A]
    (φ : C(σₙ R a, R)₀ →⋆ₙₐ[R] A) (hφ₁ : Continuous φ)
    (hφ₂ : φ ⟨.restrict (σₙ R a) <| .id R, rfl⟩ = a) : cfcₙHom ha = φ

(hφ₂ : φ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ } = a)


/-- The image of an element `m : M` in `R[M]` belongs the submodule generated by
`S : Set M` if and only if `m ∈ S`. -/
theorem of'_mem_span [Nontrivial R] {m : M} {S : Set M} :
    of' R M m ∈ span R (of' R M '' S) ↔ m ∈ S

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddMonoid M]
[Nontrivial R]
{m : M}
{S : Set M}

AddMonoidAlgebra.of' R M m ∈ Submodule.span R (AddMonoidAlgebra.of' R M '' S) ↔ m ∈ S


/-- Multiplication in the colimit is independent of the chosen "maximum" in the filtered category.
In particular, this lemma allows us to "unfold" the definition of the multiplication of `x` and `y`,
using a custom object `k` and morphisms `f : x.1 ⟶ k` and `g : y.1 ⟶ k`.
-/
@[to_additive
      "Addition in the colimit is independent of the chosen \"maximum\" in the filtered
      category. In particular, this lemma allows us to \"unfold\" the definition of the addition of
      `x` and `y`, using a custom object `k` and morphisms `f : x.1 ⟶ k` and `g : y.1 ⟶ k`."]
theorem colimit_mul_mk_eq (x y : Σ j, F.obj j) (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k) :
    M.mk.{v, u} F x * M.mk F y = M.mk F ⟨k, F.map f x.2 * F.map g y.2⟩

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ MonCatMax)
[CategoryTheory.IsFiltered J]
(x y : (j : J) × ↑(F.obj j))
(k : J)
(f : x.fst ⟶ k)
(g : y.fst ⟶ k)

MonCat.FilteredColimits.M.mk F x * MonCat.FilteredColimits.M.mk F y =
  MonCat.FilteredColimits.M.mk F ⟨k, (F.map f) x.snd * (F.map g) y.snd⟩


theorem succ_pos (o : Ordinal) : 0 < succ o


lemma cast_commute : ∀ (n : ℤ) (a : α), Commute ↑n a

{α : Type u_3}
[NonAssocRing α]
(n : ℤ)
(a : α)


/-- When the second map `S.g` is zero, this is the right homology data on `S` given
by any colimit cokernel cofork of `S.g` -/
@[simps]
def ofIsColimitCokernelCofork (hg : S.g = 0) (c : CokernelCofork S.f) (hc : IsColimit c) :
    S.RightHomologyData

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

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.RightHomologyData.ofIsColimitCokernelCofork S hg c hc).ι =
  CategoryTheory.CategoryStruct.id c.pt


@[simp]
theorem divisors_inj {a b : ℕ} : a.divisors = b.divisors ↔ a = b


@[simp] theorem toBialgHom_id {M : BialgebraCat.{v} R} :
    Hom.toBialgHom (𝟙 M) = BialgHom.id _ _

{R : Type u}
[CommRing R]
{M : BialgebraCat R}

(𝟙 M).toBialgHom = BialgHom.id R ↑M.toBundled


theorem mk_out'_eq_mul (H K : Subgroup G) (g : G) :
    ∃ h k : G, h ∈ H ∧ k ∈ K ∧ (mk H K g : Quotient ↑H ↑K).out' = h * g * k

{G : Type u_1}
[Group G]
(H K : Subgroup G)
(g : G)

∃ h k, h ∈ H ∧ k ∈ K ∧ Quotient.out' (Doset.mk H K g) = h * g * k


@[to_additive existing (attr := simp) inv_addRight]
lemma inv_mulRight : (Equiv.mulRight a)⁻¹ = Equiv.mulRight a⁻¹


@[simp]
theorem extend_range {a b : X} (γ : Path a b) :
    range γ.extend = range γ

{X : Type u_1}
[TopologicalSpace X]
{a b : X}
(γ : Path a b)


@[reassoc (attr := simp)]
lemma appLE_map (e : V ≤ f ⁻¹ᵁ U) (i : op V ⟶ op V') :
    f.appLE U V e ≫ X.presheaf.map i = f.appLE U V' (i.unop.le.trans e)

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

f.appLE U V e ≫ X.presheaf.map i = f.appLE U V' ⋯


lemma succAbove_zero_apply (i : Fin n) : succAbove 0 i = succ i


lemma LieModule.toEnd_pow_lie (x y : L) (z : M) (n : ℕ) :
    ((φ x) ^ n) ⁅y, z⁆ =
      ∑ ij ∈ antidiagonal n, n.choose ij.1 • ⁅((ad R L x) ^ ij.1) y, ((φ x) ^ ij.2) z⁆

(R : Type u)
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x y : L)
(z : M)
(n : ℕ)

((LieModule.toEnd R L M) x ^ n) ⁅y, z⁆ =
  ∑ ij ∈ Finset.antidiagonal n, n.choose ij.1 • ⁅((LieAlgebra.ad R L) x ^ ij.1) y, ((LieModule.toEnd R L M) x ^ ij.2) z⁆


@[to_additive (attr := simp)]
theorem toEquiv_eq_coe (f : M ≃* N) : f.toEquiv = f

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(f : M ≃+ N)


@[to_additive]
theorem pairwiseDisjoint_leftCoset_cover_const_of_index_eq (hind : H.index = s.card) :
    Set.PairwiseDisjoint s (g · • (H : Set G))

(hcovers : ⋃ i ∈ s, g i +ᵥ ↑H = Set.univ)

(↑s).PairwiseDisjoint fun x => g x +ᵥ ↑H


lemma conj_eq (ha : IsSelfAdjoint a) : conj a = a

{α : Type u_3}
[CommSemiring α]
[StarRing α]
{a : α}
(ha : IsSelfAdjoint a)


theorem infiniteNeg_def {x : ℝ*} : InfiniteNeg x ↔ ∀ r : ℝ, x < r


/-- To show a property of all powers of `g` it suffices to show it is closed under multiplication
by `g` and `g⁻¹` on the left. For subgroups generated by more than one element, see
`Subgroup.closure_induction_left`. -/
@[to_additive "To show a property of all multiples of `g` it suffices to show it is closed under
addition by `g` and `-g` on the left. For additive subgroups generated by more than one element, see
`AddSubgroup.closure_induction_left`."]
lemma zpow_induction_left {g : G} {P : G → Prop} (h_one : P (1 : G))
    (h_mul : ∀ a, P a → P (g * a)) (h_inv : ∀ a, P a → P (g⁻¹ * a)) (n : ℤ) : P (g ^ n)

{G : Type u_3}
[AddGroup G]
{g : G}
{P : G → Prop}
(h_one : P 0)
(h_mul : ∀ (a : G), P a → P (g + a))
(h_inv : ∀ (a : G), P a → P (-g + a))
(n : ℤ)


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivFunctor :
    Limits.Cone ((diagram U).op ⋙ F) ⥤
      Limits.Cone (SheafConditionEqualizerProducts.diagram F U)

(c : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F))

((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor F U).obj c).pt = c.pt


theorem exists_root_of_splits {f : K[X]} (hs : Splits i f) (hf0 : degree f ≠ 0) :
    ∃ x, eval₂ i x f = 0

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
{f : K[X]}
(hs : Polynomial.Splits i f)
(hf0 : f.degree ≠ 0)


/-- Alternative phrasing of the normalizer condition: Only the full group is self-normalizing.
This may be easier to work with, as it avoids inequalities and negations.  -/
theorem _root_.normalizerCondition_iff_only_full_group_self_normalizing :
    NormalizerCondition G ↔ ∀ H : Subgroup G, H.normalizer = H → H = ⊤

NormalizerCondition G ↔ ∀ (H : Subgroup G), H.normalizer = H → H = ⊤


theorem X_sub_C_mul_removeFactor (f : K[X]) (hf : f.natDegree ≠ 0) :
    (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f

{K : Type v}
[Field K]
(f : K[X])
(hf : f.natDegree ≠ 0)

(Polynomial.X - Polynomial.C (AdjoinRoot.root f.factor)) * f.removeFactor = Polynomial.map (AdjoinRoot.of f.factor) f


theorem integrableOn_Ioc_iff_integrableOn_Ioo :
    IntegrableOn f (Ioc a b) μ ↔ IntegrableOn f (Ioo a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
[MeasureTheory.NoAtoms μ]

MeasureTheory.IntegrableOn f (Set.Ioc a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ioo a b) μ


theorem _root_.Submodule.adjoint_orthogonalProjection (U : Submodule 𝕜 E) [CompleteSpace U] :
    (orthogonalProjection U : E →L[𝕜] U)† = U.subtypeL

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

ContinuousLinearMap.adjoint (orthogonalProjection U) = U.subtypeL


/-- The equivalence between `DistLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : DistLat ≌ DistLat


theorem map_comap_eq_self
    {f : R →+* S} {t : Subring S} (h : t ≤ f.range) : (t.comap f).map f = t

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{f : R →+* S}
{t : Subring S}
(h : t ≤ f.range)


/-- Any countable linear order embeds in any nontrivial dense linear order. -/
theorem embedding_from_countable_to_dense [Countable α] [DenselyOrdered β] [Nontrivial β] :
    Nonempty (α ↪o β)

(α : Type u_1)
(β : Type u_2)
[LinearOrder α]
[LinearOrder β]
[Countable α]
[DenselyOrdered β]
[Nontrivial β]


@[simp]
theorem seq_apply : (seq q p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0

{α : Type u_1}
{β : Type u_2}
(q : PMF (α → β))
(p : PMF α)
(b : β)

(q.seq p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0


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

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

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


@[to_additive]
theorem Equiv.multipliable_iff (e : γ ≃ β) : Multipliable (f ∘ e) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
(e : γ ≃ β)


@[simp]
theorem join₂_map (f : R →+* MvPolynomial σ S) (φ : MvPolynomial σ R) :
    join₂ (map f φ) = bind₂ f φ

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

MvPolynomial.join₂ ((MvPolynomial.map f) φ) = (MvPolynomial.bind₂ f) φ


/-- The power basis `1, x, ..., x ^ (d - 1)` for `K[x]`,
where `d` is the degree of the minimal polynomial of `x`. See `Algebra.adjoin.powerBasis'` for
a version over a more general base ring. -/
@[simps gen dim]
noncomputable def adjoin.powerBasis {x : S} (hx : IsIntegral K x) :
    PowerBasis K (adjoin K ({x} : Set S))

{K : Type u_1}
{S : Type u_2}
[Field K]
[CommRing S]
[Algebra K S]
{x : S}
(hx : IsIntegral K x)

(Algebra.adjoin.powerBasis hx).gen = ⟨x, ⋯⟩


@[to_additive negPart_nonneg] lemma one_le_leOnePart (a : α) : 1 ≤ a⁻ᵐ

{α : Type u_1}
[Lattice α]
[Group α]
(a : α)


theorem fib_two_mul_add_two (n : ℕ) :
    fib (2 * n + 2) = fib (n + 1) * (2 * fib n + fib (n + 1))

Nat.fib (2 * n + 2) = Nat.fib (n + 1) * (2 * Nat.fib n + Nat.fib (n + 1))


lemma equalizerSieve_mem [IsLocallyInjective J φ]
    {X : Cᵒᵖ} (x y : F₁.obj X) (h : φ.app X x = φ.app X y) :
    equalizerSieve x y ∈ J X.unop

(J : CategoryTheory.GrothendieckTopology C)

(x y : (CategoryTheory.forget D).obj (F₁.obj X))

CategoryTheory.Presheaf.equalizerSieve x y ∈ J.sieves (Opposite.unop X)


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

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
{p : Submodule R M}
(x y : ↥p)


/-- Composing on the right by a function preserves uniform convergence on a set -/
theorem TendstoUniformlyOn.comp (h : TendstoUniformlyOn F f p s) (g : γ → α) :
    TendstoUniformlyOn (fun n => F n ∘ g) (f ∘ g) p (g ⁻¹' s)

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


@[simp]
theorem stdBasisMatrix_zero (i : m) (j : n) : stdBasisMatrix i j (0 : α) = 0

{m : Type u_2}
{n : Type u_3}
{α : Type u_5}
[DecidableEq m]
[DecidableEq n]
[Semiring α]
(i : m)
(j : n)


/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is
differentiable there, and its derivative (formulated with `derivWithin`) is `C^n`. -/
theorem contDiffOn_succ_iff_derivWithin {n : ℕ} (hs : UniqueDiffOn 𝕜 s₂) :
    ContDiffOn 𝕜 (n + 1 : ℕ) f₂ s₂ ↔
      DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 n (derivWithin f₂ s₂) s₂

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₂ : 𝕜 → F}
{s₂ : Set 𝕜}
{n : ℕ}
(hs : UniqueDiffOn 𝕜 s₂)

ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (derivWithin f₂ s₂) s₂


theorem _root_.IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots (x : L)
    (hf : (minpoly K x).Splits (algebraMap K F)) :
    (algebraMap K F) (norm K (AdjoinSimple.gen K x)) =
      ((minpoly K x).aroots F).prod

(hf : Polynomial.Splits (algebraMap K F) (minpoly K x))

(algebraMap K F) ((Algebra.norm K) (IntermediateField.AdjoinSimple.gen K x)) = ((minpoly K x).aroots F).prod


@[congr]
theorem zipWith_congr (f g : α → β → γ) (la : List α) (lb : List β)
    (h : List.Forall₂ (fun a b => f a b = g a b) la lb) : zipWith f la lb = zipWith g la lb

(f g : α → β → γ)

List.zipWith f la lb = List.zipWith g la lb


@[simp]
theorem not_none_dom : ¬(none : Part α).Dom


theorem antitone_continuousOn {f : α → β} : Antitone (ContinuousOn f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}


theorem compProd_restrict_left {s : Set β} (hs : MeasurableSet s) :
    Kernel.restrict κ hs ⊗ₖ η = Kernel.restrict (κ ⊗ₖ η) (hs.prod MeasurableSet.univ)

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

(κ.restrict hs).compProd η = (κ.compProd η).restrict ⋯


protected theorem IsSuffix.subset (hl : l₁ <:+ l₂) : l₁ ⊆ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <:+ l₂ → l₁ ⊆ l₂


theorem iff_mpr_iff_true_intro {P : Prop} (h : P) : Iff.mpr (iff_true_intro h) True.intro = h


@[to_additive]
theorem mul_mem_mul [Mul α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma * mb ∈ a * b

{α : Type u_1}
[Add α]
(a b : Part α)
(ma mb : α)
(ha : ma ∈ a)
(hb : mb ∈ b)


@[simp]
theorem irrational_rat_mul_iff : Irrational (q * x) ↔ q ≠ 0 ∧ Irrational x

Irrational (↑q * x) ↔ q ≠ 0 ∧ Irrational x


theorem nonempty_diff {s t : Set α} : (s \ t).Nonempty ↔ ¬s ⊆ t


@[simp]
theorem mk_natCast (n : ℕ) : @Eq ℝ≥0 (⟨(n : ℝ), n.cast_nonneg⟩ : ℝ≥0) n

⟨↑n, ⋯⟩ = ↑n


lemma exp_nsmul (x : ℝ) (n : ℕ) : exp (n • x) = exp x ^ n


theorem isPartialInv_left {α β} {f : α → β} {g} (H : IsPartialInv f g) (x) : g (f x) = some x

{α : Type u_4}
{β : Sort u_5}
{f : α → β}
{g : β → Option α}
(H : Function.IsPartialInv f g)
(x : α)


@[to_additive] lemma prod_subset {s : Finset ι} {f : ι → α} (h : ∀ i, f i ≠ 1 → i ∈ s) :
    ∏ i ∈ s, f i = ∏ i, f i

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[AddCommMonoid α]
{s : Finset ι}
{f : ι → α}
(h : ∀ (i : ι), f i ≠ 0 → i ∈ s)


lemma areEqualizedByLocalization_iff [L.IsLocalization W] :
    AreEqualizedByLocalization W f g ↔ L.map f = L.map g

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

CategoryTheory.AreEqualizedByLocalization W f g ↔ L.map f = L.map g


theorem total_range (h : Function.Surjective v) : LinearMap.range (Finsupp.total α M R v) = ⊤

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
(h : Function.Surjective v)


theorem eq_one_iff_unique {α : Type*} : #α = 1 ↔ Subsingleton α ∧ Nonempty α

Cardinal.mk α = 1 ↔ Subsingleton α ∧ Nonempty α


theorem mulMap_range : (A.mulMap B).range = A ⊔ B

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(A B : Subalgebra R S)


@[simp]
theorem preimage_const_sub_Ico : (fun x => a - x) ⁻¹' Ico b c = Ioc (a - c) (a - b)

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

(fun x => a - x) ⁻¹' Set.Ico b c = Set.Ioc (a - c) (a - b)


theorem not_mem_edges_of_loop {v : V} {e : Sym2 V} {p : G.Path v v} :
    ¬e ∈ (p : G.Walk v v).edges

{V : Type u}
{G : SimpleGraph V}
{v : V}
{e : Sym2 V}
{p : G.Path v v}


@[simp]
theorem card_succ (o : Ordinal) : card (succ o) = card o + 1


@[simp]
theorem not_mem_keys_kerase (a) {l : List (Sigma β)} (nd : l.NodupKeys) :
    a ∉ (kerase a l).keys

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


/-- `M` is a scalar matrix if it commutes with every non-diagonal `stdBasisMatrix`. -/
theorem mem_range_scalar_of_commute_stdBasisMatrix {M : Matrix n n α}
    (hM : Pairwise fun i j => Commute (stdBasisMatrix i j 1) M) :
    M ∈ Set.range (Matrix.scalar n)

(hM : Pairwise fun i j => Commute (Matrix.stdBasisMatrix i j 1) M)


theorem testBit_bool_to_nat (b : Bool) (i : Nat) :
    testBit (Bool.toNat b) i = (decide (i = 0) && b)

b.toNat.testBit i = (decide (i = 0) && b)


@[to_additive (attr := simp)]
theorem smul_set_empty : a • (∅ : Set β) = ∅

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{a : α}


theorem exp_mul (x y : ℝ) : exp (x * y) = exp x ^ y


lemma prod_fac₂ :
    W₂.Q ⋙ (curry.obj (prodLift F hF)).flip = (prodLift₁ F hF).flip

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(F : CategoryTheory.Functor (C₁ × C₂) E)

W₂.Q.comp
    (CategoryTheory.curry.obj (CategoryTheory.Localization.StrictUniversalPropertyFixedTarget.prodLift F hF)).flip =
  (CategoryTheory.Localization.StrictUniversalPropertyFixedTarget.prodLift₁ F hF).flip


/-- `ContinuousAlternatingMap.pi` as a `LinearEquiv`. -/
@[simps (config := { simpRhs := true })]
def piLinearEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, ContinuousAdd (M' i)] [∀ i, Module R (M' i)]
    [∀ i, Module A (M' i)] [∀ i, SMulCommClass A R (M' i)] [∀ i, ContinuousConstSMul R (M' i)] :
    (∀ i, M [⋀^ι]→L[A] M' i) ≃ₗ[R] M [⋀^ι]→L[A] ∀ i, M' i

[∀ (i : ι'), ContinuousConstSMul R (M' i)]

∀ (a : (i : ι') → M [⋀^ι]→L[A] M' i), ContinuousAlternatingMap.piLinearEquiv a = ContinuousAlternatingMap.pi a


theorem deleteVerts_le : G'.deleteVerts s ≤ G'

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


theorem cancel_factors_eq {α} [Field α] {a b ad bd a' b' gcd : α} (ha : ad * a = a')
    (hb : bd * b = b') (had : ad ≠ 0) (hbd : bd ≠ 0) (hgcd : gcd ≠ 0) :
    (a = b) = (1 / gcd * (bd * a') = 1 / gcd * (ad * b'))

{α : Type u_1}
[Field α]
{a b ad bd a' b' gcd : α}
(ha : ad * a = a')
(hb : bd * b = b')
(had : ad ≠ 0)
(hbd : bd ≠ 0)
(hgcd : gcd ≠ 0)


/-- The functor of adjoining a neutral element `one` to a semigroup.
 -/
@[to_additive (attr := simps) "The functor of adjoining a neutral element `zero` to a semigroup"]
def adjoinOne : Semigrp.{u} ⥤ MonCat.{u}

AddMonCat.adjoinZero.obj S = AddMonCat.of (WithZero ↑S)


@[ext]
lemma hom_ext (f g : S₁ ⟶ S₂) (h₁ : f.τ₁ = g.τ₁) (h₂ : f.τ₂ = g.τ₂) (h₃ : f.τ₃ = g.τ₃) : f = g


theorem iUnion_Icc_intCast : ⋃ n : ℤ, Icc (n : α) (n + 1) = Set.univ

(α : Type u_1)
[LinearOrderedRing α]
[Archimedean α]


@[simp]
theorem image_sphere (h : α ≃ᵢ β) (x : α) (r : ℝ) :
    h '' Metric.sphere x r = Metric.sphere (h x) r

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

⇑h '' Metric.sphere x r = Metric.sphere (h x) r


theorem LiftRel.equiv (R : α → α → Prop) : Equivalence R → Equivalence (LiftRel R)

Equivalence R → Equivalence (Stream'.WSeq.LiftRel R)


theorem exists_seq_antitone_tendsto_atTop_atBot (α : Type*) [SemilatticeInf α] [Nonempty α]
    [h2 : (atBot : Filter α).IsCountablyGenerated] :
    ∃ xs : ℕ → α, Antitone xs ∧ Tendsto xs atTop atBot

∃ xs, Antitone xs ∧ Filter.Tendsto xs Filter.atTop Filter.atBot


theorem DifferentiableWithinAt.dist (hf : DifferentiableWithinAt ℝ f s x)
    (hg : DifferentiableWithinAt ℝ g s x) (hne : f x ≠ g x) :
    DifferentiableWithinAt ℝ (fun y => dist (f y) (g y)) s x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{s : Set G}
{x : G}
(hf : DifferentiableWithinAt ℝ f s x)
(hg : DifferentiableWithinAt ℝ g s x)
(hne : f x ≠ g x)


protected theorem LocallyIntegrable.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E]
    [BoundedSMul 𝕜 E] (hf : LocallyIntegrable f μ) (c : 𝕜) :
    LocallyIntegrable (c • f) μ

(hf : MeasureTheory.LocallyIntegrable f μ)

MeasureTheory.LocallyIntegrable (c • f) μ


@[elab_as_elim]
theorem adjoin_induction₂ {s : Set A} {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s)
    (hb : b ∈ adjoin R s) (Hs : ∀ x : A, x ∈ s → ∀ y : A, y ∈ s → p x y)
    (Halg : ∀ r₁ r₂ : R, p (algebraMap R A r₁) (algebraMap R A r₂))
    (Halg_left : ∀ (r : R) (x : A), x ∈ s → p (algebraMap R A r) x)
    (Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (algebraMap R A r))
    (Hadd_left : ∀ x₁ x₂ y : A, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (Hadd_right : ∀ x y₁ y₂ : A, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (Hmul_left : ∀ x₁ x₂ y : A, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂ : A, p x y₁ → p x y₂ → p x (y₁ * y₂))
    (Hstar : ∀ x y : A, p x y → p (star x) (star y)) (Hstar_left : ∀ x y : A, p x y → p (star x) y)
    (Hstar_right : ∀ x y : A, p x y → p x (star y)) : p a b

(Halg : ∀ (r₁ r₂ : R), p ((algebraMap R A) r₁) ((algebraMap R A) r₂))

(Halg_left : ∀ (r : R), ∀ x ∈ s, p ((algebraMap R A) r) x)

(Halg_right : ∀ (r : R), ∀ x ∈ s, p x ((algebraMap R A) r))

(Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y)

(Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂))

(Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y)

(Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂))

(Hstar : ∀ (x y : A), p x y → p (star x) (star y))

(Hstar_left : ∀ (x y : A), p x y → p (star x) y)

(Hstar_right : ∀ (x y : A), p x y → p x (star y))


theorem isClopen_iff_frontier_eq_empty : IsClopen s ↔ frontier s = ∅

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


theorem FG.map₂ (f : M →ₗ[R] N →ₗ[R] P) {p : Submodule R M} {q : Submodule R N} (hp : p.FG)
    (hq : q.FG) : (map₂ f p q).FG

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
{p : Submodule R M}
{q : Submodule R N}
(hp : p.FG)
(hq : q.FG)


theorem IsPreconnected.connectedComponentIn {x : α} {F : Set α} (h : IsPreconnected F)
    (hx : x ∈ F) : connectedComponentIn F x = F

{α : Type u}
[TopologicalSpace α]
{x : α}
{F : Set α}
(h : IsPreconnected F)
(hx : x ∈ F)


@[simp, norm_cast]
theorem intCast_im (z : ℤ) : (z : ℍ[R,c₁,c₂]).im = 0

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(z : ℤ)


theorem iIndep_comap_mem_iff {f : ι → Set Ω} :
    iIndep (fun i => MeasurableSpace.comap (· ∈ f i) ⊤) μ ↔ iIndepSet f μ

{Ω : Type u_1}
{ι : Type u_2}
{_mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
{f : ι → Set Ω}

ProbabilityTheory.iIndep (fun i => MeasurableSpace.comap (fun x => x ∈ f i) ⊤) μ ↔ ProbabilityTheory.iIndepSet f μ


theorem toEquiv_injective : Function.Injective (toEquiv : (M ≃ₛₗ[σ] M₂) → M ≃ M₂)

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module S M₂]
{σ : R →+* S}
{σ' : S →+* R}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]


/-- The map sending a congruence relation to its underlying binary relation is injective. -/
@[to_additive "The map sending an additive congruence relation to its underlying binary relation
is injective."]
theorem ext' {c d : Con M} (H : ⇑c = ⇑d) : c = d

{M : Type u_1}
[Add M]
{c d : AddCon M}
(H : ⇑c = ⇑d)


/-- Two equivalent partial homeomorphisms have the same source. -/
theorem EqOnSource.source_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.source = e'.source

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e e' : PartialHomeomorph X Y}
(h : e ≈ e')


protected theorem R1Space.sInf {X : Type*} {T : Set (TopologicalSpace X)}
    (hT : ∀ t ∈ T, @R1Space X t) : @R1Space X (sInf T)

{X : Type u_3}
{T : Set (TopologicalSpace X)}
(hT : ∀ t ∈ T, R1Space X)


theorem realize_sentence (h : M ≅[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(h : L.ElementarilyEquivalent M N)
(φ : L.Sentence)

M ⊨ φ ↔ N ⊨ φ


lemma Limits.IsZero.injective {X : C} (h : IsZero X) : Injective X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
(h : CategoryTheory.Limits.IsZero X)


theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ C

(hf : Filter.Tendsto (id fun i => ↑(F i)) l (nhds f))


nonrec theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[RCLike 𝕂]
[Fintype m]
[DecidableEq m]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(n : ℕ)
(A : Matrix m m 𝔸)

NormedSpace.exp 𝕂 (n • A) = NormedSpace.exp 𝕂 A ^ n


theorem restrict_of_not_measurable {f : α →ₛ β} {s : Set α} (hs : ¬MeasurableSet s) :
    restrict f s = 0

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Zero β]
{f : MeasureTheory.SimpleFunc α β}
{s : Set α}
(hs : ¬MeasurableSet s)


/-- A version of `continuous_inf_dom_left` for binary functions -/
theorem continuous_inf_dom_left₂ {X Y Z} {f : X → Y → Z} {ta1 ta2 : TopologicalSpace X}
    {tb1 tb2 : TopologicalSpace Y} {tc1 : TopologicalSpace Z}
    (h : by haveI := ta1; haveI := tb1; exact Continuous fun p : X × Y => f p.1 p.2) : by
    haveI := ta1 ⊓ ta2; haveI := tb1 ⊓ tb2; exact Continuous fun p : X × Y => f p.1 p.2

{X : Type u_5}
{Y : Type u_6}
{Z : Type u_7}
{f : X → Y → Z}
{ta1 ta2 : TopologicalSpace X}
{tb1 tb2 : TopologicalSpace Y}
{tc1 : TopologicalSpace Z}
(h : Continuous fun p => f p.1 p.2)


lemma IsSMulRegular.submodule [Semiring R] [AddCommMonoid M] [Module R M]
    (N : Submodule R M) (r : R) (h : IsSMulRegular M r) : IsSMulRegular N r

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(N : Submodule R M)
(r : R)
(h : IsSMulRegular M r)


@[norm_cast] lemma coe_ne_one : (r : ℝ) ≠ 1 ↔ r ≠ 1

↑r ≠ 1 ↔ r ≠ 1


@[to_additive]
theorem discreteTopology_iff_isOpen_singleton_one : DiscreteTopology G ↔ IsOpen ({1} : Set G)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[ContinuousAdd G]


@[simp]
theorem coe_comp (f : β →+*o γ) (g : α →+*o β) : ⇑(f.comp g) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[NonAssocSemiring α]
[Preorder α]
[NonAssocSemiring β]
[Preorder β]
[NonAssocSemiring γ]
[Preorder γ]
(f : β →+*o γ)
(g : α →+*o β)


/-- **Euler's four-square identity**. -/
theorem euler_four_squares {R : Type*} [CommRing R] (a b c d x y z w : R) :
    (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 +
      (a * z - b * w + c * x + d * y) ^ 2 + (a * w + b * z - c * y + d * x) ^ 2 =
      (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)

{R : Type u_1}
[CommRing R]
(a b c d x y z w : R)


theorem piPremeasure_pi_eval {s : Set (∀ i, α i)} :
    piPremeasure m (pi univ fun i => eval i '' s) = piPremeasure m s

{m : (i : ι) → MeasureTheory.OuterMeasure (α i)}

MeasureTheory.piPremeasure m (Set.univ.pi fun i => Function.eval i '' s) = MeasureTheory.piPremeasure m s


protected theorem congr_fun {φ₁ φ₂ : A →ₐ[R] B} (H : φ₁ = φ₂) (x : A) : φ₁ x = φ₂ x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
{φ₁ φ₂ : A →ₐ[R] B}
(H : φ₁ = φ₂)
(x : A)


theorem bit_decomp (n : ℤ) : bit (bodd n) (div2 n) = n


/-- Coercion to a function as a `MonoidHom`. Similar to `MonoidHom.coeFn`. -/
@[to_additive (attr := simps)
  "Coercion to a function as an `AddMonoidHom`. Similar to `AddMonoidHom.coeFn`." ]
def coeFnMonoidHom [Monoid β] [ContinuousMul β] : C(α, β) →* α → β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Monoid β]
[ContinuousMul β]
(f : C(α, β))
(a : α)


@[simp]
theorem sum_zero_index {S : Type*} [AddCommMonoid S] (f : ℕ → R → S) : (0 : R[X]).sum f = 0

{R : Type u}
[Semiring R]
{S : Type u_1}
[AddCommMonoid S]
(f : ℕ → R → S)


@[measurability]
theorem measurable_from_nat {f : ℕ → α} : Measurable f

{α : Type u_1}
[MeasurableSpace α]
{f : ℕ → α}


theorem formPerm_apply_mem_ne_self_iff (hl : Nodup l) (x : α) (hx : x ∈ l) :
    formPerm l x ≠ x ↔ 2 ≤ l.length

{α : Type u_1}
[DecidableEq α]
(l : List α)
(hl : l.Nodup)
(x : α)
(hx : x ∈ l)


theorem mapsTo_range (f : α → β) (s : Set α) : MapsTo f s (range f)

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


/-- **Equational criterion for flatness** [Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK),
forward direction, second alternate form.

Let $M$ be a flat module over a commutative ring $R$. Let $N$ be a finite free module over $R$,
let $f \in N$, and let $x \colon N \to M$ be a homomorphism such that $x(f) = 0$. Then there exist a
finite index type $\kappa$ and module homomorphisms $a \colon N \to R^{\kappa}$ and
$y \colon R^{\kappa} \to M$ such that $x = y \circ a$ and $a(f) = 0$. -/
theorem exists_factorization_of_apply_eq_zero_of_free [Flat R M] {N : Type u}
    [AddCommGroup N] [Module R N] [Free R N] [Finite R N] {f : N} {x : N →ₗ[R] M} (h : x f = 0) :
    ∃ (κ : Type u) (_ : Fintype κ) (a : N →ₗ[R] (κ →₀ R)) (y : (κ →₀ R) →ₗ[R] M),
      x = y ∘ₗ a ∧ a f = 0

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.Flat R M]
{N : Type u}
[AddCommGroup N]
[Module R N]
[Module.Free R N]
[Module.Finite R N]
{f : N}
{x : N →ₗ[R] M}
(h : x f = 0)


/-- Any nonempty compact Hausdorff semigroup where right-multiplication is continuous contains
an idempotent, i.e. an `m` such that `m * m = m`. -/
@[to_additive
      "Any nonempty compact Hausdorff additive semigroup where right-addition is continuous
      contains an idempotent, i.e. an `m` such that `m + m = m`"]
theorem exists_idempotent_of_compact_t2_of_continuous_mul_left {M} [Nonempty M] [Semigroup M]
    [TopologicalSpace M] [CompactSpace M] [T2Space M]
    (continuous_mul_left : ∀ r : M, Continuous (· * r)) : ∃ m : M, m * m = m

(continuous_mul_left : ∀ (r : M), Continuous fun x => x * r)


@[simp]
theorem sigma_add :
    ∀ t u : ∀ a, Multiset (σ a), (s.sigma fun a => t a + u a) = s.sigma t + s.sigma u

{α : Type u_1}
{σ : α → Type u_4}
(s : Multiset α)
(t u : (a : α) → Multiset (σ a))


@[to_additive]
theorem union_div_inter_subset_union : (s₁ ∪ s₂) / (t₁ ∩ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂

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


@[simp] lemma isNilpotent_mul_X_iff :
    IsNilpotent (P * X) ↔ IsNilpotent P

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

IsNilpotent (P * Polynomial.X) ↔ IsNilpotent P


@[simp] lemma last_snoc (p : RelSeries r) (newLast : α) (rel : r p.last newLast) :
    (p.snoc newLast rel).last = newLast

{α : Type u_1}
{r : Rel α α}
(p : RelSeries r)
(newLast : α)
(rel : r p.last newLast)


lemma continuousOn_tangentCoordChange (x y : M) : ContinuousOn (tangentCoordChange I x y)
    ((extChartAt I x).source ∩ (extChartAt I y).source)

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


/-- Functor composition induces a functor on simplicial objects. -/
@[simps!]
def whiskering (D : Type*) [Category D] : (C ⥤ D) ⥤ SimplicialObject C ⥤ SimplicialObject D

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategoryᵒᵖ ⥤ C)
(X : SimplexCategoryᵒᵖ)

(((CategoryTheory.SimplicialObject.whiskering C D).obj H).obj F).obj X = H.obj (F.obj X)


lemma decomp_from {j : ℤ} {A : C} (f : (mappingCone φ).X j ⟶ A) (i : ℤ) (hij : j + 1 = i) :
    ∃ (a : F.X i ⟶ A) (b : G.X j ⟶ A),
      f = (fst φ).1.v j i hij ≫ a + (snd φ).v j j (add_zero j) ≫ b

(f : (CochainComplex.mappingCone φ).X j ⟶ A)

∃ a b, f = (↑(CochainComplex.mappingCone.fst φ)).v j i hij ≫ a + (CochainComplex.mappingCone.snd φ).v j j ⋯ ≫ b


/-- Flip a complex of complexes over the diagonal,
exchanging the horizontal and vertical directions.
-/
@[simps]
def flip (K : HomologicalComplex₂ C c₁ c₂) : HomologicalComplex₂ C c₂ c₁


@[simp]
theorem convexJoin_empty_left (t : Set E) : convexJoin 𝕜 ∅ t = ∅

{𝕜 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(t : Set E)


theorem congr_trans (f : M ≃ₗ[R] P) (g : N ≃ₗ[R] Q) (f' : P ≃ₗ[R] S) (g' : Q ≃ₗ[R] T) :
    congr (f ≪≫ₗ f') (g ≪≫ₗ g') = congr f g ≪≫ₗ congr f' g'

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
{S : Type u_8}
{T : Type u_9}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[AddCommMonoid S]
[AddCommMonoid T]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
[Module R S]
[Module R T]
(f : M ≃ₗ[R] P)
(g : N ≃ₗ[R] Q)
(f' : P ≃ₗ[R] S)
(g' : Q ≃ₗ[R] T)

TensorProduct.congr (f ≪≫ₗ f') (g ≪≫ₗ g') = TensorProduct.congr f g ≪≫ₗ TensorProduct.congr f' g'


/-- We say that `α` is a `SupConvergenceClass` if the following holds. Let `f : ι → α` be a
monotone function, let `a : α` be a least upper bound of `Set.range f`. Then `f x` tends to `𝓝 a`
 as `x → ∞` (formally, at the filter `Filter.atTop`). We require this for `ι = (s : Set α)`,
`f = CoeTC.coe` in the definition, then prove it for any `f` in `tendsto_atTop_isLUB`.

This property holds for linear orders with order topology as well as their products. -/
class SupConvergenceClass (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
  /-- proof that a monotone function tends to `𝓝 a` as `x → ∞` -/
  tendsto_coe_atTop_isLUB :
    ∀ (a : α) (s : Set α), IsLUB s a → Tendsto (CoeTC.coe : s → α) atTop (𝓝 a)

{α : Type u_3}
[Preorder α]
[TopologicalSpace α]
[self : SupConvergenceClass α]
(a : α)
(s : Set α)

IsLUB s a → Filter.Tendsto CoeTC.coe Filter.atTop (𝓝 a)


@[nolint unusedArguments]
lemma lie_f_pow_toEnd_f (P : HasPrimitiveVectorWith t m μ) (n : ℕ) :
    ⁅f, ψ n⁆ = ψ (n + 1)

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{h e f : L}
{m : M}
{μ : R}
{t : IsSl2Triple h e f}
(P : t.HasPrimitiveVectorWith m μ)
(n : ℕ)

⁅f, ((LieModule.toEnd R L M) f ^ n) m⁆ = ((LieModule.toEnd R L M) f ^ (n + 1)) m


@[simp]
theorem sub_apply' (f g : M →SL[σ₁₂] M₂) (x : M) : ((f : M →ₛₗ[σ₁₂] M₂) - g) x = f x - g x

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
(f g : M →SL[σ₁₂] M₂)
(x : M)