@[simp]
theorem toExterior_ι (m : M) :
    TensorAlgebra.toExterior (TensorAlgebra.ι R m) = ExteriorAlgebra.ι R m

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(m : M)

TensorAlgebra.toExterior ((TensorAlgebra.ι R) m) = (ExteriorAlgebra.ι R) m


lemma isTriangulated_of_precomp
    [(F ⋙ G).IsTriangulated] [F.IsTriangulated] [F.mapArrow.EssSurj] :
    G.IsTriangulated

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

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

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


theorem sSup_of_not_bddAbove {s : Set ℝ} (hs : ¬BddAbove s) : sSup s = 0


theorem nontrivial_of_mem_mem_ne {x y} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) : s.Nontrivial

{α : Type u}
{s : Set α}
{x y : α}
(hx : x ∈ s)
(hy : y ∈ s)
(hxy : x ≠ y)


theorem natDegree_C_mul (a0 : a ≠ 0) : (C a * p).natDegree = p.natDegree

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p : R[X]}
{a : R}
(a0 : a ≠ 0)

(Polynomial.C a * p).natDegree = p.natDegree


@[to_additive]
theorem codisjoint_mrange_inl_mrange_inr :
    Codisjoint (MonoidHom.mrange (inl : M →* M ∗ N)) (MonoidHom.mrange inr)

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

Codisjoint (MonoidHom.mrange Monoid.Coprod.inl) (MonoidHom.mrange Monoid.Coprod.inr)


@[simp]
theorem monomial_mul_X_pow (n : ℕ) (r : R) (k : ℕ) :
    monomial n r * X ^ k = monomial (n + k) r

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

(Polynomial.monomial n) r * Polynomial.X ^ k = (Polynomial.monomial (n + k)) r


theorem lt_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 b, a < x

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[OrderTopology α]
{a b : α}
(h : a < b)


@[to_additive]
theorem coe_of (R : Type u) [CommMonoid R] : (CommMonCat.of R : Type u) = R


/-- Converting an augmented simplicial object to an augmented cosimplicial
object and back is isomorphic to the given object. -/
@[simps!]
def SimplicialObject.Augmented.rightOpLeftOpIso (X : SimplicialObject.Augmented C) :
    X.rightOp.leftOp ≅ X

(X : CategoryTheory.SimplicialObject.Augmented C)

X.rightOpLeftOpIso.inv.right = 𝟙 X.right


theorem right_ne_zero_of_mul_eq_one (h : a * b = 1) : b ≠ 0

{M₀ : Type u_2}
[MulZeroOneClass M₀]
[Nontrivial M₀]
{a b : M₀}
(h : a * b = 1)


theorem coe_foldr_swap (f : α → β → β) (H : LeftCommutative f) (b : β) (l : List α) :
    foldr f H b l = l.foldl (fun x y => f y x) b

{α : Type u_1}
{β : Type v}
(f : α → β → β)
(H : LeftCommutative f)
(b : β)
(l : List α)

Multiset.foldr f H b ↑l = List.foldl (fun x y => f y x) b l


@[simp, norm_cast]
theorem coe_pow (n : ℕ) : ((f ^ n : RatFunc F) : LaurentSeries F) = (f : LaurentSeries F) ^ n

{F : Type u}
[Field F]
(f : RatFunc F)
(n : ℕ)


@[to_additive]
theorem OneHom.coe_copy_eq {_ : One M} {_ : One N} (f : OneHom M N) (f' : M → N) (h : f' = f) :
    f.copy f' h = f

∀ {x : One M} {x_1 : One N} (f : OneHom M N) (f' : M → N) (h : f' = ⇑f), f.copy f' h = f


theorem lt_of_eq_of_lt' : b = c → a < b → a < c


@[to_additive]
theorem div_apply [Div β] (f g : α →ₛ β) (x : α) : (f / g) x = f x / g x

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


@[simp]
theorem foldr_reverse (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) (x : CliffordAlgebra Q) :
    foldr Q f hf n (reverse x) = foldl Q f hf n x

((CliffordAlgebra.foldr Q f hf) n) (CliffordAlgebra.reverse x) = ((CliffordAlgebra.foldl Q f hf) n) x


theorem length_gather (a : Composition n) (b : Composition a.length) :
    length (a.gather b) = b.length

{n : ℕ}
(a : Composition n)
(b : Composition a.length)


theorem IsBigO.natCast_atTop {R : Type*} [StrictOrderedSemiring R] [Archimedean R]
    {f : R → E} {g : R → F} (h : f =O[atTop] g) :
    (fun (n : ℕ) => f n) =O[atTop] (fun n => g n)

{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{R : Type u_17}
[StrictOrderedSemiring R]
[Archimedean R]
{f : R → E}
{g : R → F}
(h : f =O[Filter.atTop] g)

(fun n => f ↑n) =O[Filter.atTop] fun n => g ↑n


theorem image_union [DecidableEq α] {f : α → β} (s₁ s₂ : Finset α) :
    (s₁ ∪ s₂).image f = s₁.image f ∪ s₂.image f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
[DecidableEq α]
{f : α → β}
(s₁ s₂ : Finset α)

Finset.image f (s₁ ∪ s₂) = Finset.image f s₁ ∪ Finset.image f s₂


theorem nat_rec {f : α → β} {g : α → ℕ × β → β} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a (n : ℕ) => n.rec (motive := fun _ => β) (f a) fun n IH => g a (n, IH)

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

Primrec₂ fun a n => Nat.rec (f a) (fun n IH => g a (n, IH)) n


theorem binomial_apply (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) (i : Fin (n + 1)) :
    binomial p h n i = p^(i : ℕ) * (1-p)^((Fin.last n - i) : ℕ) * (n.choose i : ℕ)

(p : ENNReal)
(h : p ≤ 1)
(n : ℕ)
(i : Fin (n + 1))

(PMF.binomial p h n) i = p ^ ↑i * (1 - p) ^ (↑(Fin.last n) - ↑i) * ↑(n.choose ↑i)


theorem equiv_iff {t₁ t₂ : Ordnode α} (h₁ : Sized t₁) (h₂ : Sized t₂) :
    Equiv t₁ t₂ ↔ toList t₁ = toList t₂

{α : Type u_1}
{t₁ t₂ : Ordnode α}
(h₁ : t₁.Sized)
(h₂ : t₂.Sized)


@[simp]
theorem blimsup_true (f : Filter β) (u : β → α) : (blimsup u f fun _ => True) = limsup u f

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
(f : Filter β)
(u : β → α)

(Filter.blimsup u f fun x => True) = Filter.limsup u f


theorem lintegral_sub' {f g : α → ℝ≥0∞} (hg : AEMeasurable g μ) (hg_fin : ∫⁻ a, g a ∂μ ≠ ∞)
    (h_le : g ≤ᵐ[μ] f) : ∫⁻ a, f a - g a ∂μ = ∫⁻ a, f a ∂μ - ∫⁻ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(hg : AEMeasurable g μ)
(hg_fin : ∫⁻ (a : α), g a ∂μ ≠ ⊤)
(h_le : g ≤ᵐ[μ] f)

∫⁻ (a : α), f a - g a ∂μ = ∫⁻ (a : α), f a ∂μ - ∫⁻ (a : α), g a ∂μ


@[simp]
theorem step_zero (s a) : (0 : εNFA α σ).step s a = ∅

{α : Type u}
{σ : Type v}
(s : σ)
(a : Option α)


@[simp]
theorem noncommFoldr_empty (h) (b : β) : noncommFoldr f (0 : Multiset α) h b = b

(f : α → β → β)

(h : {x | x ∈ 0}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b))


/-- The L-series of the (convolution) product of two `ℂ`-valued arithmetic functions `f` and `g`
equals the product of their L-series in their common half-plane of absolute convergence. -/
lemma LSeries_mul {f g : ArithmeticFunction ℂ} {s : ℂ}
    (hf : abscissaOfAbsConv ↗f < s.re) (hg : abscissaOfAbsConv ↗g < s.re) :
    LSeries ↗(f * g) s = LSeries ↗f s * LSeries ↗g s

(hf : (LSeries.abscissaOfAbsConv fun n => f n) < ↑s.re)

(hg : (LSeries.abscissaOfAbsConv fun n => g n) < ↑s.re)

L (fun n => (f * g) n) s = L (fun n => f n) s * L (fun n => g n) s


/-- A binary injective function is injective when only the right argument varies. -/
protected theorem right (hf : Injective2 f) (a : α) : Function.Injective (f a)

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β → γ}
(hf : Function.Injective2 f)
(a : α)


/-- The identity natural transformation is a `BasedNatTrans`. -/
@[simps]
def id (F : 𝒳 ⥤ᵇ 𝒴) : BasedNatTrans F F

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
{𝒳 : CategoryTheory.BasedCategory 𝒮}
{𝒴 : CategoryTheory.BasedCategory 𝒮}
(F : CategoryTheory.BasedFunctor 𝒳 𝒴)

(CategoryTheory.BasedNatTrans.id F).toNatTrans = CategoryTheory.NatTrans.id F.toFunctor


@[simp]
theorem single_blocksFun {n : ℕ} (h : 0 < n) (i : Fin (single n h).length) :
    (single n h).blocksFun i = n

(i : Fin (Composition.single n h).length)

(Composition.single n h).blocksFun i = n


@[simp]
theorem explicitCokernelπ_desc_apply {X Y Z : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}
    {cond : f ≫ g = 0} (x : Y) : explicitCokernelDesc cond (explicitCokernelπ f x) = g x

{X Y Z : SemiNormedGrp}
{f : X ⟶ Y}
{g : Y ⟶ Z}
{cond : f ≫ g = 0}
(x : ↑Y)

(SemiNormedGrp.explicitCokernelDesc cond) ((SemiNormedGrp.explicitCokernelπ f) x) = g x


/--
A thin category is essentially small if and only if the underlying type of its skeleton is small.
-/
theorem essentiallySmall_iff_of_thin {C : Type u} [Category.{v} C] [Quiver.IsThin C] :
    EssentiallySmall.{w} C ↔ Small.{w} (Skeleton C)

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

CategoryTheory.EssentiallySmall.{w, v, u} C ↔ Small.{w, u} (CategoryTheory.Skeleton C)


lemma _root_.Multiset.pi_coe (l : List ι) (fs : ∀ i, List (α i)) :
    (l : Multiset ι).pi (fs ·) = (↑(pi l fs) : Multiset (∀ i ∈ l, α i))

{ι : Type u_1}
[DecidableEq ι]
{α : ι → Type u_2}
(l : List ι)
(fs : (i : ι) → List (α i))


lemma inf'_image₂_right (g : γ → δ) (h : (image₂ f s t).Nonempty) :
    inf' (image₂ f s t) h g =
      inf' t h.of_image₂_right fun y ↦ inf' s h.of_image₂_left (g <| f · y)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
[SemilatticeInf δ]
(g : γ → δ)
(h : (Finset.image₂ f s t).Nonempty)

(Finset.image₂ f s t).inf' h g = t.inf' ⋯ fun y => s.inf' ⋯ fun x => g (f x y)


@[mono]
theorem cast_strictMono : StrictMono ((↑) : ℚ → K)


theorem image_mem_toPartialHomeomorph_target (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    f a ∈ (hf.toPartialHomeomorph f).target

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f (↑f') a)

f a ∈ (HasStrictFDerivAt.toPartialHomeomorph f hf).target


protected theorem _root_.Disjoint.aedisjoint (h : Disjoint s t) : AEDisjoint μ s t

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : Disjoint s t)


theorem mem_cylinder_iff_eq {x y : ∀ n, E n} {n : ℕ} :
    y ∈ cylinder x n ↔ cylinder y n = cylinder x n

{E : ℕ → Type u_1}
{x y : (n : ℕ) → E n}
{n : ℕ}

y ∈ PiNat.cylinder x n ↔ PiNat.cylinder y n = PiNat.cylinder x n


@[simp]
lemma ProdAdicCompletions.algebraMap_apply (r : R) :
    algebraMap R (K_hat R K) r v = (algebraMap R K r : v.adicCompletion K)

(v : IsDedekindDomain.HeightOneSpectrum R)

(algebraMap R (DedekindDomain.ProdAdicCompletions R K)) r v = ↑K ((algebraMap R K) r)


@[simp]
theorem coe_one : ↑(1 : SignType) = (1 : α)


protected lemma one_nonneg : 0 ≤ (1 : ℤ)


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.inv (hf : ContinuousAt f x) : ContinuousAt (fun x => (f x)⁻¹) x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Neg G]
[ContinuousNeg G]
[TopologicalSpace α]
{f : α → G}
{x : α}
(hf : ContinuousAt f x)


theorem card_of_mem_right {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) : 2 ≤ Finset.card b

(h : m ∈ SetTheory.PGame.Domineering.right b)


theorem vsub_sub_vsub_comm (p₁ p₂ p₃ p₄ : P) : p₁ -ᵥ p₂ - (p₃ -ᵥ p₄) = p₁ -ᵥ p₃ - (p₂ -ᵥ p₄)

{G : Type u_1}
{P : Type u_2}
[AddCommGroup G]
[AddTorsor G P]
(p₁ p₂ p₃ p₄ : P)


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

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

(∀ (a : α), ∃! b, r a b) ↔ ∃ f, ∀ {a : α} {b : β}, r a b ↔ f a = b


@[simp]
theorem smul_finset_neg : a • -t = -(a • t)

{α : Type u_2}
{β : Type u_3}
[Monoid α]
[AddGroup β]
[DistribMulAction α β]
[DecidableEq β]
(a : α)
(t : Finset β)


@[to_additive (attr := simp, nolint simpNF)]
theorem one_eq : (1 : PUnit) = unit


lemma PosSMulReflectLE.lift [PosSMulReflectLE α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulReflectLE α β

(hf : ∀ {b₁ b₂ : β}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)

(smul : ∀ (a : α) (b : β), f (a • b) = a • f b)


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

(hT : MeasureTheory.DominatedFinMeasAdditive μ 0 C)


theorem dvd_count_of_dvd_count_mul [DecidableEq (Associates α)] {a b : Associates α} (hb : b ≠ 0)
    {p : Associates α} (hp : Irreducible p) (hab : ∀ d, d ∣ a → d ∣ b → ¬Prime d) {k : ℕ}
    (habk : k ∣ count p (a * b).factors) : k ∣ count p a.factors

[(p : Associates α) → Decidable (Irreducible p)]

(hab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d)


theorem Integrable.real_toNNReal {f : α → ℝ} (hf : Integrable f μ) :
    Integrable (fun x => ((f x).toNNReal : ℝ)) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun x => ↑(f x).toNNReal) μ


@[ext] -- Porting note (#11215): TODO: replace with `∀ x, x ∈ U ↔ x ∈ V`
theorem ext {U V : Opens α} (h : (U : Set α) = V) : U = V

{α : Type u_2}
[TopologicalSpace α]
{U V : TopologicalSpace.Opens α}
(h : ↑U = ↑V)


@[simp]
theorem pointedToBipointedSnd_comp_swap :
    pointedToBipointedSnd ⋙ Bipointed.swap = pointedToBipointedFst


@[simp]
theorem mk_lt_mk_iff [∀ i, LT (α i)] {i : ι} {a b : α i} : (⟨i, a⟩ : Sigma α) < ⟨i, b⟩ ↔ a < b

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → LT (α i)]
{i : ι}
{a b : α i}


lemma stableUnderGeneralization_sInter (S : Set (Set X))
    (H : ∀ s ∈ S, StableUnderGeneralization s) : StableUnderGeneralization (⋂₀ S)


theorem iSup_decode₂ [CompleteLattice α] (f : β → α) :
    ⨆ (i : ℕ) (b ∈ decode₂ β i), f b = (⨆ b, f b)

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

⨆ i, ⨆ b ∈ Encodable.decode₂ β i, f b = ⨆ b, f b


@[to_additive]
lemma IsSquare.map [MulOneClass α] [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β]
    {m : α} (f : F) :
    IsSquare m → IsSquare (f m)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[MulOneClass α]
[MulOneClass β]
[FunLike F α β]
[MonoidHomClass F α β]
{m : α}
(f : F)


theorem decomp_p (P : Karoubi C) : (toKaroubi C).map P.p = decompId_p P ≫ decompId_i P

(P : CategoryTheory.Idempotents.Karoubi C)

(CategoryTheory.Idempotents.toKaroubi C).map P.p = CategoryTheory.CategoryStruct.comp P.decompId_p P.decompId_i


theorem rightUnitor_inv_hom {X : Action V G} : Hom.hom (ρ_ X).inv = (ρ_ X.V).inv

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.MonoidalCategory V]
{X : Action V G}

(CategoryTheory.MonoidalCategory.rightUnitor X).inv.hom = (CategoryTheory.MonoidalCategory.rightUnitor X.V).inv


@[simp]
theorem comp_add [ContinuousAdd M₂] [ContinuousAdd M₃] (g : M₂ →SL[σ₂₃] M₃)
    (f₁ f₂ : M₁ →SL[σ₁₂] M₂) : g.comp (f₁ + f₂) = g.comp f₁ + g.comp f₂

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₂ M₂]
[Module R₃ M₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[ContinuousAdd M₂]
[ContinuousAdd M₃]
(g : M₂ →SL[σ₂₃] M₃)
(f₁ f₂ : M₁ →SL[σ₁₂] M₂)


@[to_additive (attr := mono)]
theorem toSubmonoid_strictMono : StrictMono (toSubmonoid : Subgroup G → Submonoid G)


theorem Context.evalList_append
  (ctx : Context α)
  (l r : List Nat)
  (h₁ : l ≠ [])
  (h₂ : r ≠ [])
  : evalList α ctx (l.append r) = ctx.op (evalList α ctx l) (evalList α ctx r)

{α : Sort u_1}
(ctx : Lean.Data.AC.Context α)
(l r : List Nat)
(h₁ : l ≠ [])
(h₂ : r ≠ [])

Lean.Data.AC.evalList α ctx (l.append r) = ctx.op (Lean.Data.AC.evalList α ctx l) (Lean.Data.AC.evalList α ctx r)


nonrec theorem HasDerivAtFilter.add (hf : HasDerivAtFilter f f' x L)
    (hg : HasDerivAtFilter g g' x L) : HasDerivAtFilter (fun y => f y + g y) (f' + g') x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : 𝕜 → F}
{f' g' : F}
{x : 𝕜}
{L : Filter 𝕜}
(hf : HasDerivAtFilter f f' x L)
(hg : HasDerivAtFilter g g' x L)


theorem subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton

{γ : Type w}
[MetricSpace γ]
(x : γ)
{r : ℝ}
(hr : r ≤ 0)


theorem neg_neg {X Y : C} (a : X ⟶ Y) : - -a = a


theorem fundamentalDomain_subset_parallelepiped [Fintype ι] :
    fundamentalDomain b ⊆ parallelepiped b

{E : Type u_1}
{ι : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(b : Basis ι ℝ E)
[Fintype ι]

Zspan.fundamentalDomain b ⊆ parallelepiped ⇑b


theorem isEmpty_of_colorable_zero (h : G.Colorable 0) : IsEmpty V

{V : Type u}
(G : SimpleGraph V)
(h : G.Colorable 0)


theorem one_sub_dvd_one_sub_pow [Ring α] (x : α) (n : ℕ) :
    1 - x ∣ 1 - x ^ n


@[simp]
theorem sumLexAssoc_symm_apply_inr_inl : (sumLexAssoc α β γ).symm (inr (inl b)) = inl (inr b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LE α]
[LE β]
[LE γ]
(b : β)

(OrderIso.sumLexAssoc α β γ).symm (Sum.inr (Sum.inl b)) = Sum.inl (Sum.inr b)


@[to_additive (attr := simp)]
theorem mem_inv : a ∈ s⁻¹ ↔ a⁻¹ ∈ s

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


∀ (x : ℝ),
  Real.neg x =
    match x with
    | { cauchy := a } => { cauchy := -a }


lemma even_or_odd (n : ℤ) : Even n ∨ Odd n


theorem quasiconcaveOn_iff_min_le : QuasiconcaveOn 𝕜 s f ↔ Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
    y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → min (f x) (f y) ≤ f (a • x + b • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrder β]
[SMul 𝕜 E]
{s : Set E}
{f : E → β}

QuasiconcaveOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → min (f x) (f y) ≤ f (a • x + b • y)


protected theorem Icc_subset (s : Set α) [hs : OrdConnected s] {x y} (hx : x ∈ s) (hy : y ∈ s) :
    Icc x y ⊆ s

{α : Type u_1}
[Preorder α]
(s : Set α)
[hs : s.OrdConnected]
{x y : α}
(hx : x ∈ s)
(hy : y ∈ s)


@[simp]
lemma mkOfHomFunctors_mapFunctor (F : B → C) (F' : (a : B) → (b : B) → (a ⟶ b) ⥤ (F a ⟶ F b))
    (a b : B) : (mkOfHomFunctors F F').mapFunctor a b = F' a b

(F' : (a b : B) → CategoryTheory.Functor (a ⟶ b) (F a ⟶ F b))

(CategoryTheory.PrelaxFunctor.mkOfHomFunctors F F').mapFunctor a b = F' a b


/-- When both maps `S.f` and `S.g` of a short complex `S` are zero, this is the right homology map
data (for the identity of `S`) which relates the right homology data
`RightHomologyData.ofIsLimitKernelFork` and `ofZeros` . -/
@[simps]
def compatibilityOfZerosOfIsLimitKernelFork (hf : S.f = 0) (hg : S.g = 0)
    (c : KernelFork S.g) (hc : IsLimit c) :
    RightHomologyMapData (𝟙 S)
      (RightHomologyData.ofIsLimitKernelFork S hf c hc)
      (RightHomologyData.ofZeros S hf hg)

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

(CategoryTheory.ShortComplex.RightHomologyMapData.compatibilityOfZerosOfIsLimitKernelFork S hf hg c hc).φQ =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ShortComplex.RightHomologyData.ofIsLimitKernelFork S hf c hc).Q


/-- In an ordered commutative monoid, if each factor `f i` of one nontrivial finite product is
strictly less than the corresponding factor `g i` of another nontrivial finite product, then
`s.prod f < s.prod g`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_lt_prod_of_nonempty'`,
convenient for the `gcongr` tactic. -/
@[to_additive (attr := gcongr) GCongr.sum_lt_sum_of_nonempty]
theorem _root_.GCongr.prod_lt_prod_of_nonempty' (hs : s.Nonempty) (Hlt : ∀ i ∈ s, f i < g i) :
    s.prod f < s.prod g

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelAddCommMonoid M]
{f g : ι → M}
{s : Finset ι}
(hs : s.Nonempty)
(Hlt : ∀ i ∈ s, f i < g i)


theorem bounded_lt_inter_lt [LinearOrder α] [NoMaxOrder α] (a : α) :
    Bounded (· < ·) (s ∩ { b | a < b }) ↔ Bounded (· < ·) s

{α : Type u_1}
{s : Set α}
[LinearOrder α]
[NoMaxOrder α]
(a : α)

Set.Bounded (fun x x_1 => x < x_1) (s ∩ {b | a < b}) ↔ Set.Bounded (fun x x_1 => x < x_1) s


theorem comap_le_comap_iff_of_surjective (p q : Submodule R₂ M₂) : p.comap f ≤ q.comap f ↔ p ≤ q

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

Submodule.comap f p ≤ Submodule.comap f q ↔ p ≤ q


theorem imageToKernel_zero_right [HasImages V] {w} :
    imageToKernel f (0 : B ⟶ C) w =
      (imageSubobject f).arrow ≫ inv (kernelSubobject (0 : B ⟶ C)).arrow

imageToKernel f 0 w =
  (CategoryTheory.Limits.imageSubobject f).arrow ≫ CategoryTheory.inv (CategoryTheory.Limits.kernelSubobject 0).arrow


/-- Given `X : Action (Type u) (Mon.of G)` for `G` a group, then `G × X` (with `G` acting as left
multiplication on the first factor and by `X.ρ` on the second) is isomorphic as a `G`-set to
`G × X` (with `G` acting as left multiplication on the first factor and trivially on the second).
The isomorphism is given by `(g, x) ↦ (g, g⁻¹ • x)`. -/
@[simps]
noncomputable def leftRegularTensorIso (G : Type u) [Group G] (X : Action (Type u) (MonCat.of G)) :
    leftRegular G ⊗ X ≅ leftRegular G ⊗ Action.mk X.V 1

(g : (CategoryTheory.MonoidalCategory.tensorObj (Action.leftRegular G) X).V)

(Action.leftRegularTensorIso G X).hom.hom g = (g.1, X.ρ g.1⁻¹ g.2)


@[simp]
theorem mul_im (z w : ℂ) : (z * w).im = z.re * w.im + z.im * w.re


lemma mulRight_eq_mulLeft : mulRight = (mulLeft : R →+ AddMonoid.End R)

{R : Type u_1}
[NonUnitalNonAssocCommSemiring R]


lemma isAtom_top : IsAtom (⊤ : LieIdeal R L)

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsSimple R L]


/--  `Fin.succAbove p` as an `OrderEmbedding`. -/
@[simps! apply toEmbedding]
def succAboveOrderEmb (p : Fin (n + 1)) : Fin n ↪o Fin (n + 1)


/-- Uniqueness property of `BoxIntegral.Prepartition.biUnionIndex`. -/
theorem biUnionIndex_of_mem (hJ : J ∈ π) {J'} (hJ' : J' ∈ πi J) : π.biUnionIndex πi J' = J

{πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J}


theorem mul_rpow_of_nonneg (x y : ℝ≥0∞) {z : ℝ} (hz : 0 ≤ z) : (x * y) ^ z = x ^ z * y ^ z


/-- When `R` is a field `F`, then a nontrivial additive character is primitive -/
theorem IsPrimitive.of_ne_one {F : Type u} [Field F] {ψ : AddChar F R'} (hψ : ψ ≠ 1) :
    IsPrimitive ψ

{R' : Type v}
[CommMonoid R']
{F : Type u}
[Field F]
{ψ : AddChar F R'}
(hψ : ψ ≠ 1)


/-- The pullback cone whose cone point is the explicit pullback. -/
@[simps! pt π]
noncomputable
def pullback.cone : Limits.PullbackCone f i

{X Y Z : Stonean}
(f : X ⟶ Z)
{i : Y ⟶ Z}
(hi : OpenEmbedding ⇑i)

(Stonean.pullback.cone f hi).pt = Stonean.pullback f hi


/-- A helper lemma for `MultilinearMap.domCoprod_alternization`. -/
theorem MultilinearMap.domCoprod_alternization_coe [DecidableEq ιa] [DecidableEq ιb]
    (a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :
    MultilinearMap.domCoprod (MultilinearMap.alternatization a)
      (MultilinearMap.alternatization b) =
      ∑ σa : Perm ιa, ∑ σb : Perm ιb,
        Equiv.Perm.sign σa • Equiv.Perm.sign σb •
          MultilinearMap.domCoprod (a.domDomCongr σa) (b.domDomCongr σb)

(a : MultilinearMap R' (fun x => Mᵢ) N₁)

(b : MultilinearMap R' (fun x => Mᵢ) N₂)

(↑(MultilinearMap.alternatization a)).domCoprod ↑(MultilinearMap.alternatization b) =
  ∑ σa : Equiv.Perm ιa,
    ∑ σb : Equiv.Perm ιb,
      Equiv.Perm.sign σa •
        Equiv.Perm.sign σb • (MultilinearMap.domDomCongr σa a).domCoprod (MultilinearMap.domDomCongr σb b)


@[to_additive] -- Porting note: no longer a `simp`, see below
theorem invFun_eq_symm {f : M ≃* N} : f.invFun = f.symm

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
{f : M ≃* N}


@[to_additive sum_nsmul_assoc]
lemma prod_pow_eq_pow_sum  (s : Finset ι) (f : ι → ℕ) (a : β) :
    ∏ i ∈ s, a ^ f i = a ^ ∑ i ∈ s, f i

{ι : Type u_1}
{β : Type u_4}
[CommMonoid β]
(s : Finset ι)
(f : ι → ℕ)
(a : β)


theorem card_pos {s : Multiset α} : 0 < card s ↔ s ≠ 0


theorem rel_refl_of_refl_on {m : Multiset α} {r : α → α → Prop} : (∀ x ∈ m, r x x) → Rel r m m

{α : Type u_1}
{m : Multiset α}
{r : α → α → Prop}


@[simp]
theorem cthickening_cthickening (hε : 0 ≤ ε) (hδ : 0 ≤ δ) (s : Set E) :
    cthickening ε (cthickening δ s) = cthickening (ε + δ) s

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{δ ε : ℝ}
(hε : 0 ≤ ε)
(hδ : 0 ≤ δ)
(s : Set E)

Metric.cthickening ε (Metric.cthickening δ s) = Metric.cthickening (ε + δ) s


theorem Ioc_subset_Ioo_right (h : b₁ < b₂) : Ioc a b₁ ⊆ Ioo a b₂

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b₁ b₂ : α}
(h : b₁ < b₂)


theorem trace_comp_comm :
    compr₂ (llcomp R M N M) (trace R M) = compr₂ (llcomp R N M N).flip (trace R N)

(R : Type u_1)
[CommRing R]
(M : Type u_2)
[AddCommGroup M]
[Module R M]
(N : Type u_3)
[AddCommGroup N]
[Module R N]
[Module.Free R M]
[Module.Finite R M]
[Module.Free R N]
[Module.Finite R N]

(LinearMap.llcomp R M N M).compr₂ (LinearMap.trace R M) = (LinearMap.llcomp R N M N).flip.compr₂ (LinearMap.trace R N)


@[to_additive]
theorem le_mul_of_le_mul_left [CovariantClass α α (· * ·) (· ≤ ·)] {a b c d : α} (h : a ≤ b * c)
    (hle : c ≤ d) :
    a ≤ b * d

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


@[to_additive (attr := simp)] lemma mul_apply (f g : M →* N) (x : M) : (f * g) x = f x * g x

{M : Type u_3}
{N : Type u_4}
[AddZeroClass M]
[AddCommMonoid N]
(f g : M →+ N)
(x : M)


@[simp]
theorem empty_entries : (∅ : AList β).entries = []


@[simp]
theorem reverse_reverse [h : HasInvolutiveReverse V] {a b : V} (f : a ⟶ b) :
    reverse (reverse f) = f

{V : Type u_2}
[Quiver V]
[h : Quiver.HasInvolutiveReverse V]
{a b : V}
(f : a ⟶ b)


@[simp]
theorem Iic_union_Ici : Iic a ∪ Ici a = univ


@[elab_as_elim]
theorem head_induction_on {P : ∀ a : α, TransGen r a b → Prop} {a : α} (h : TransGen r a b)
    (base : ∀ {a} (h : r a b), P a (single h))
    (ih : ∀ {a c} (h' : r a c) (h : TransGen r c b), P c h → P a (h.head h')) : P a h

{P : (a : α) → Relation.TransGen r a b → Prop}

(ih : ∀ {a c : α} (h' : r a c) (h : Relation.TransGen r c b), P c h → P a ⋯)


lemma stieltjesOfMeasurableRat_le_one (hf : Measurable f) (a : α) (x : ℝ) :
    stieltjesOfMeasurableRat f hf a x ≤ 1

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℚ → ℝ}
(hf : Measurable f)
(a : α)
(x : ℝ)

↑(ProbabilityTheory.stieltjesOfMeasurableRat f hf a) x ≤ 1


protected theorem pos {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) : Submartingale (f⁺) ℱ μ

{f : ι → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)


theorem mem_ordConnectedComponent_ordConnectedProj (s : Set α) (x : s) :
    ↑x ∈ ordConnectedComponent s (ordConnectedProj s x)

{α : Type u_1}
[LinearOrder α]
(s : Set α)
(x : ↑s)

↑x ∈ s.ordConnectedComponent (s.ordConnectedProj x)


theorem mem_compl_image [BooleanAlgebra α] (t : α) (S : Set α) :
    t ∈ HasCompl.compl '' S ↔ tᶜ ∈ S

{α : Type u_1}
[BooleanAlgebra α]
(t : α)
(S : Set α)


/-- The function `x * log (1 + t / x)` tends to `t` at `+∞`. -/
theorem tendsto_mul_log_one_plus_div_atTop (t : ℝ) :
    Tendsto (fun x => x * log (1 + t / x)) atTop (𝓝 t)

Filter.Tendsto (fun x => x * Real.log (1 + t / x)) Filter.atTop (𝓝 t)


theorem UniqueDiffWithinAt.congr_pt (h : UniqueDiffWithinAt 𝕜 s x) (hy : x = y) :
    UniqueDiffWithinAt 𝕜 s y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x y : E}
{s : Set E}
(h : UniqueDiffWithinAt 𝕜 s x)
(hy : x = y)


protected theorem map_ofNat [AddMonoidWithOne α] [AddMonoidWithOne β]
    {f : α → β} (h : f 0 = 0) (d : ℕ) [d.AtLeastTwo] :
    (no_index (OfNat.ofNat d) : Matrix n n α).map f = diagonal (fun _ => f (OfNat.ofNat d))

{n : Type u_3}
{α : Type v}
{β : Type w}
[DecidableEq n]
[AddMonoidWithOne α]
[AddMonoidWithOne β]
{f : α → β}
(h : f 0 = 0)
(d : ℕ)
[d.AtLeastTwo]

(OfNat.ofNat d).map f = Matrix.diagonal fun x => f (OfNat.ofNat d)


@[simp]
theorem dual_top : dual (⊤ : NonemptyInterval α) = ⊤

{α : Type u_1}
[Preorder α]
[BoundedOrder α]


theorem chain_adj_support {u v w : V} (h : G.Adj u v) :
    ∀ (p : G.Walk v w), List.Chain G.Adj u p.support

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(h : G.Adj u v)
(p : G.Walk v w)


/-- If the coefficients of a polynomial belong to an ideal, then that ideal contains
the ideal spanned by the coefficients of the polynomial. -/
theorem span_le_of_C_coeff_mem (cf : ∀ i : ℕ, C (f.coeff i) ∈ I) :
    Ideal.span { g | ∃ i, g = C (f.coeff i) } ≤ I

(cf : ∀ (i : ℕ), Polynomial.C (f.coeff i) ∈ I)

Ideal.span {g | ∃ i, g = Polynomial.C (f.coeff i)} ≤ I


@[simp, norm_cast]
theorem mem_coe : x ∈ (I : Set (ι → ℝ)) ↔ x ∈ I

{ι : Type u_1}
(I : BoxIntegral.Box ι)
{x : ι → ℝ}

x ∈ ↑I ↔ x ∈ I


@[simp]
theorem imCLM_apply (z : ℂ) : (imCLM : ℂ → ℝ) z = z.im


nonrec theorem ContMDiffOn.clm_postcomp {f : M → F₂ →L[𝕜] F₃} {s : Set M}
    (hf : ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₃) n f s) :
    ContMDiffOn I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) s

ContMDiffOn I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₃) n (fun y => ContinuousLinearMap.postcomp F₁ (f y)) s


/-- A geometric series in a normed field is summable iff the norm of the common ratio is less than
one. -/
@[simp]
theorem summable_geometric_iff_norm_lt_one : (Summable fun n : ℕ ↦ ξ ^ n) ↔ ‖ξ‖ < 1

{K : Type u_4}
[NormedDivisionRing K]
{ξ : K}


/-- A s-finite kernel which satisfy the disintegration property of the given measure `ρ` is almost
everywhere equal to the disintegration kernel of `ρ` when evaluated on a measurable set.

This theorem in the case of finite kernels is weaker than `eq_condKernel_of_measure_eq_compProd`
which asserts that the kernels are equal almost everywhere and not just on a given measurable
set. -/
theorem eq_condKernel_of_measure_eq_compProd' (κ : Kernel α Ω) [IsSFiniteKernel κ]
    (hκ : ρ = ρ.fst ⊗ₘ κ) {s : Set Ω} (hs : MeasurableSet s) :
    ∀ᵐ x ∂ρ.fst, κ x s = ρ.condKernel x s

{α : Type u_1}
{Ω : Type u_3}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{ρ : MeasureTheory.Measure (α × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
(κ : ProbabilityTheory.Kernel α Ω)
[ProbabilityTheory.IsSFiniteKernel κ]
(hκ : ρ = ρ.fst ⊗ₘ κ)
{s : Set Ω}
(hs : MeasurableSet s)

∀ᵐ (x : α) ∂ρ.fst, (κ x) s = (ρ.condKernel x) s


/-- Most basic version of the "Mellin transform = Dirichlet series" argument. -/
lemma hasSum_mellin {a : ι → ℂ} {p : ι → ℝ} {F : ℝ → ℂ} {s : ℂ}
    (hp : ∀ i, a i = 0 ∨ 0 < p i) (hs : 0 < s.re)
    (hF : ∀ t ∈ Ioi 0, HasSum (fun i ↦ a i * rexp (-p i * t)) (F t))
    (h_sum : Summable fun i ↦ ‖a i‖ / (p i) ^ s.re) :
    HasSum (fun i ↦ Gamma s * a i / p i ^ s) (mellin F s)

(hF : ∀ t ∈ Set.Ioi 0, HasSum (fun i => a i * ↑(rexp (-p i * t))) (F t))

(h_sum : Summable fun i => ‖a i‖ / p i ^ s.re)

HasSum (fun i => Complex.Gamma s * a i / ↑(p i) ^ s) (mellin F s)


/--
A family `{ eᵢ }` of idempotent elements is complete orthogonal if
1. (orthogonal) `eᵢ * eⱼ = 0` for all `i ≠ j`.
2. (complete) `∑ eᵢ = 1`
-/
@[mk_iff]
structure CompleteOrthogonalIdempotents (e : I → R) extends OrthogonalIdempotents e : Prop where
  complete : ∑ i, e i = 1

(self : CompleteOrthogonalIdempotents e)


theorem liminf_le_of_frequently_le {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α}
    {u : α → β} {b : β} (hu_le : ∃ᶠ x in f, u x ≤ b)
    (hu : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault) :
    liminf u f ≤ b

(hu : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)


theorem nhdsWithin_restrict'' {a : α} (s : Set α) {t : Set α} (h : t ∈ 𝓝[s] a) :
    𝓝[s] a = 𝓝[s ∩ t] a

{α : Type u_1}
[TopologicalSpace α]
{a : α}
(s : Set α)
{t : Set α}
(h : t ∈ 𝓝[s] a)


@[simp]
theorem sub_smul_dslope (f : 𝕜 → E) (a b : 𝕜) : (b - a) • dslope f a b = f b - f a

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


theorem uIcc_subset_uIcc_right (h : x ∈ [[a, b]]) : [[x, b]] ⊆ [[a, b]]

{α : Type u_2}
[Lattice α]
[LocallyFiniteOrder α]
{a b x : α}
(h : x ∈ [[a, b]])


theorem nmul_nadd_one : ∀ a b, a ⨳ (b ♯ 1) = a ⨳ b ♯ a


theorem mem_uniform_prod [t₁ : UniformSpace α] [t₂ : UniformSpace β] {a : Set (α × α)}
    {b : Set (β × β)} (ha : a ∈ 𝓤 α) (hb : b ∈ 𝓤 β) :
    { p : (α × β) × α × β | (p.1.1, p.2.1) ∈ a ∧ (p.1.2, p.2.2) ∈ b } ∈ 𝓤 (α × β)

{α : Type ua}
{β : Type ub}
[t₁ : UniformSpace α]
[t₂ : UniformSpace β]
{a : Set (α × α)}
{b : Set (β × β)}
(ha : a ∈ 𝓤 α)
(hb : b ∈ 𝓤 β)


/-- The function `a ↦ (condCDF ρ a).measure` is measurable. -/
theorem measurable_measure_condCDF (ρ : Measure (α × ℝ)) :
    Measurable fun a => (condCDF ρ a).measure

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))

Measurable fun a => (ProbabilityTheory.condCDF ρ a).measure


@[simp]
theorem isBot_iff_eq_bot : IsBot a ↔ a = ⊥

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


theorem clog_pos {b n : ℕ} (hb : 1 < b) (hn : 2 ≤ n) : 0 < clog b n


/-- The composition as an `AddMonoidHom`. -/
@[simps]
def pullback (f : E →ₛₗ[σ₁₂] E₂) : Seminorm 𝕜₂ E₂ →+ Seminorm 𝕜 E

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[AddCommGroup E]
[AddCommGroup E₂]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
(f : E →ₛₗ[σ₁₂] E₂)
(p : Seminorm 𝕜₂ E₂)


theorem Finset.nnnorm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
    (f : ι → α) : ‖∏ i ∈ s, f i‖₊ ≤ ∏ i ∈ s, ‖f i‖₊

{ι : Type u_4}
{α : Type u_5}
[NormedCommRing α]
[NormOneClass α]
(s : Finset ι)
(f : ι → α)

‖∏ i ∈ s, f i‖₊ ≤ ∏ i ∈ s, ‖f i‖₊


/-- `secondInter` is unchanged by negating the vector. -/
@[simp]
theorem Sphere.secondInter_neg (s : Sphere P) (p : P) (v : V) :
    s.secondInter p (-v) = s.secondInter p v

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : EuclideanGeometry.Sphere P)
(p : P)
(v : V)


/-- When `[HasPullbacks C]`, `MonoOver A` has "intersections", functorial in both arguments.

As `MonoOver A` is only a preorder, this doesn't satisfy the axioms of `SemilatticeInf`,
but we reuse all the names from `SemilatticeInf` because they will be used to construct
`SemilatticeInf (subobject A)` shortly.
-/
@[simps]
def inf {A : C} : MonoOver A ⥤ MonoOver A ⥤ MonoOver A

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A : C}
(f : CategoryTheory.MonoOver A)

CategoryTheory.MonoOver.inf.obj f = CategoryTheory.MonoOver.pullback f.arrow ⋙ CategoryTheory.MonoOver.map f.arrow


@[simp] lemma isBounded_preimage_toDual {s : Set αᵒᵈ} :
    IsBounded (toDual ⁻¹' s) ↔ IsBounded s

{α : Type u_2}
[Bornology α]
{s : Set αᵒᵈ}

Bornology.IsBounded (⇑OrderDual.toDual ⁻¹' s) ↔ Bornology.IsBounded s


theorem equiv_fst_eq_iff_leftCosetEquivalence {g₁ g₂ : G} :
    (hSK.equiv g₁).fst = (hSK.equiv g₂).fst ↔ LeftCosetEquivalence K g₁ g₂

{G : Type u_1}
[Group G]
{K : Subgroup G}
{S : Set G}
(hSK : Subgroup.IsComplement S ↑K)
{g₁ g₂ : G}

(hSK.equiv g₁).1 = (hSK.equiv g₂).1 ↔ LeftCosetEquivalence (↑K) g₁ g₂


@[to_additive (attr := simp)]
protected theorem map_one' (f : α → β) : (1 : Filter α).map f = pure (f 1)

{α : Type u_2}
{β : Type u_3}
[Zero α]
(f : α → β)


@[simp]
theorem typein_top {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s]
    (f : r ≺i s) : typein s f.top = type r

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]
(f : r ≺i s)


/-- The open cover of the coproduct. -/
@[simps obj map]
noncomputable
def sigmaOpenCover : (∐ f).OpenCover

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)
(b : ι)

(AlgebraicGeometry.sigmaOpenCover f).map b = CategoryTheory.Limits.Sigma.ι f b


/-- If zero is an element of a list `l`, then `List.prod l = 0`. If the domain is a nontrivial
monoid with zero with no divisors, then this implication becomes an `iff`, see
`List.prod_eq_zero_iff`. -/
lemma prod_eq_zero : ∀ {l : List M₀}, (0 : M₀) ∈ l → l.prod = 0
  -- |  absurd h (not_mem_nil _)

{M₀ : Type u_4}
[MonoidWithZero M₀]
{l : List M₀}


theorem norm_condexpInd_apply_le (x : G) : ‖condexpInd G hm μ s x‖ ≤ (μ s).toReal * ‖x‖

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(x : G)

‖(MeasureTheory.condexpInd G hm μ s) x‖ ≤ (μ s).toReal * ‖x‖


@[simp]
lemma yonedaMap_app_apply {Y : C} {X : Cᵒᵖ} (f : X.unop ⟶ Y) :
    (yonedaMap F Y).app X f = F.map f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u_1}
[CategoryTheory.Category.{v₁, u_1} D]
(F : CategoryTheory.Functor C D)
{Y : C}
{X : Cᵒᵖ}
(f : Opposite.unop X ⟶ Y)

(CategoryTheory.yonedaMap F Y).app X f = F.map f


@[to_additive]
theorem ker_le_comap (H : Subgroup N) : f.ker ≤ comap f H

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)
(H : Subgroup N)


@[simp]
theorem one_eq [Nontrivial A] : σ (1 : A) = {1}

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
[Nontrivial A]


lemma EssFiniteType.comp [h₁ : EssFiniteType R S] [h₂ : EssFiniteType S T] :
    EssFiniteType R T

(R : Type u_1)
(S : Type u_2)
(T : Type u_3)
[CommRing R]
[CommRing S]
[CommRing T]
[Algebra R S]
[Algebra R T]
[Algebra S T]
[IsScalarTower R S T]
[h₁ : Algebra.EssFiniteType R S]
[h₂ : Algebra.EssFiniteType S T]


@[simp] lemma addRight_add : Equiv.addRight (a + b) = Equiv.addRight b * Equiv.addRight a


/-- A version of `antisymm` with `r` explicit.

This lemma matches the lemmas from lean core in `Init.Algebra.Classes`, but is missing there.  -/
@[elab_without_expected_type]
theorem antisymm_of (r : α → α → Prop) [IsAntisymm α r] {a b : α} : r a b → r b a → a = b

{α : Type u}
(r : α → α → Prop)
[IsAntisymm α r]
{a b : α}


/-- The limit `a` of the sequence `stirlingSeq` satisfies `0 < a` -/
theorem stirlingSeq_has_pos_limit_a : ∃ a : ℝ, 0 < a ∧ Tendsto stirlingSeq atTop (𝓝 a)

∃ a, 0 < a ∧ Filter.Tendsto Stirling.stirlingSeq Filter.atTop (𝓝 a)


{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)


@[simp]
theorem inv_mul_cancel_left₀ (h : a ≠ 0) (b : G₀) : a⁻¹ * (a * b) = b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(h : a ≠ 0)
(b : G₀)


@[simp]
theorem stdBasis_apply_ofIsReal (x : E K) (w : {w : InfinitePlace K // IsReal w}) :
    (stdBasis K).repr x (Sum.inl w) = x.1 w

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

((NumberField.mixedEmbedding.stdBasis K).repr x) (Sum.inl w) = x.1 w


@[simp]
lemma mkOfObjOfMapSucc_obj (i : Fin (n + 1)) :
    (mkOfObjOfMapSucc obj mapSucc).obj i = obj i

(mapSucc : (i : Fin n) → obj i.castSucc ⟶ obj i.succ)

(CategoryTheory.ComposableArrows.mkOfObjOfMapSucc obj mapSucc).obj i = obj i


theorem le_pow_ramificationIdx : map f p ≤ P ^ ramificationIdx f p P

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
{f : R →+* S}
{p : Ideal R}
{P : Ideal S}

Ideal.map f p ≤ P ^ Ideal.ramificationIdx f p P


theorem integrable_rpow_mul_exp_neg_mul_sq {b : ℝ} (hb : 0 < b) {s : ℝ} (hs : -1 < s) :
    Integrable fun x : ℝ => x ^ s * exp (-b * x ^ 2)

MeasureTheory.Integrable (fun x => x ^ s * rexp (-b * x ^ 2)) MeasureTheory.volume


@[to_additive]
theorem pow_mem_pow (ha : a ∈ s) : ∀ n : ℕ, a ^ n ∈ s ^ n

{α : Type u_2}
[Monoid α]
{s : Set α}
{a : α}
(ha : a ∈ s)
(n : ℕ)


protected theorem add_sub_cancel_of_le {a b : Ordinal} (h : b ≤ a) : b + (a - b) = a


@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_inv_mul_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2⁻¹ * x.1 ∈ U i }

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Sort u_3}
{p : ι → Prop}
{U : ι → Set α}
(h : (𝓝 0).HasBasis p U)

(𝓤 α).HasBasis p fun i => {x | -x.2 + x.1 ∈ U i}


@[to_additive]
theorem iUnion_mul (s : ι → Set α) (t : Set α) : (⋃ i, s i) * t = ⋃ i, s i * t

{α : Type u_2}
{ι : Sort u_5}
[Mul α]
(s : ι → Set α)
(t : Set α)


@[simp] lemma coe_mk (f : α → β) (hf) : ⇑(mk f hf) = f

(hf : ∀ (s : Set α), f (sInf s) = sInf (f '' s))


@[to_additive]
theorem union_smul_inter_subset_union [DecidableEq α] : (s₁ ∪ s₂) • (t₁ ∩ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

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


theorem EReal.measurable_of_measurable_real {f : EReal → α} (h : Measurable fun p : ℝ => f p) :
    Measurable f

{α : Type u_1}
[MeasurableSpace α]
{f : EReal → α}
(h : Measurable fun p => f ↑p)


@[measurability, fun_prop]
lemma _root_.Measurable.ereal_exp {α : Type*} {_ : MeasurableSpace α}
    {f : α → EReal} (hf : Measurable f) :
    Measurable fun x ↦ exp (f x)

∀ {x : MeasurableSpace α} {f : α → EReal}, Measurable f → Measurable fun x => (f x).exp


theorem lie_mem {x y : L} (hx : x ∈ L') (hy : y ∈ L') : (⁅x, y⁆ : L) ∈ L'

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(L' : LieSubalgebra R L)
{x y : L}
(hx : x ∈ L')
(hy : y ∈ L')


theorem not_dvd_card_sylow [hp : Fact p.Prime] [Finite (Sylow p G)] : ¬p ∣ Nat.card (Sylow p G)

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


theorem degree_mul' (h : leadingCoeff p * leadingCoeff q ≠ 0) :
    degree (p * q) = degree p + degree q

(h : p.leadingCoeff * q.leadingCoeff ≠ 0)


lemma _root_.LocalRing.isRegular_of_perm [LocalRing R] [IsNoetherian R M]
    {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs') :
    IsRegular M rs'

(h1 : RingTheory.Sequence.IsRegular M rs)


@[to_additive] lemma mul_pow (h : Commute a b) : ∀ n, (a * b) ^ n = a ^ n * b ^ n

{M : Type u_2}
[AddMonoid M]
{a b : M}
(h : AddCommute a b)
(n : ℕ)


theorem blsub_eq_blsub {ι : Type u} (r r' : ι → ι → Prop) [IsWellOrder ι r] [IsWellOrder ι r']
    (f : ι → Ordinal.{max u v}) :
    blsub.{_, v} _ (bfamilyOfFamily' r f) = blsub.{_, v} _ (bfamilyOfFamily' r' f)

(Ordinal.type r).blsub (Ordinal.bfamilyOfFamily' r f) = (Ordinal.type r').blsub (Ordinal.bfamilyOfFamily' r' f)


/-- The unit isomorphism of the equivalence `equivalence₁` between `A` and `B'`. -/
@[simps!]
def equivalence₁UnitIso : 𝟭 A ≅ F ⋙ e'.inverse ⋙ eA.inverse

{A : Type u_1}
{A' : Type u_2}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_4} B']
{eA : A ≌ A'}
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)
(X : A)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₁UnitIso hF).inv.app X =
  eA.inverse.map (e'.inverse.map (hF.inv.app X)) ≫
    eA.inverse.map (e'.unitIso.inv.app (eA.functor.obj X)) ≫ eA.unitIso.inv.app X


@[simp] lemma to_WithUpper_symm_eq {α} : (@toUpper α).symm = ofUpper


theorem norm_iteratedFDerivWithin_mul_le {f : E → A} {g : E → A} {N : ℕ∞} (hf : ContDiffOn 𝕜 N f s)
    (hg : ContDiffOn 𝕜 N g s) (hs : UniqueDiffOn 𝕜 s) {x : E} (hx : x ∈ s) {n : ℕ}
    (hn : (n : ℕ∞) ≤ N) : ‖iteratedFDerivWithin 𝕜 n (fun y => f y * g y) s x‖ ≤
      ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *
        ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{A : Type u_3}
[NormedRing A]
[NormedAlgebra 𝕜 A]
{f g : E → A}
{N : ℕ∞}
(hf : ContDiffOn 𝕜 N f s)
(hg : ContDiffOn 𝕜 N g s)
(hs : UniqueDiffOn 𝕜 s)
{x : E}
(hx : x ∈ s)
{n : ℕ}
(hn : ↑n ≤ N)

‖iteratedFDerivWithin 𝕜 n (fun y => f y * g y) s x‖ ≤
  ∑ i ∈ Finset.range (n + 1), ↑(n.choose i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖


theorem nhds_def' (x : X) : 𝓝 x = ⨅ (s : Set X) (_ : IsOpen s) (_ : x ∈ s), 𝓟 s

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

𝓝 x = ⨅ s, ⨅ (_ : IsOpen s), ⨅ (_ : x ∈ s), 𝓟 s


@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t


@[simp]
protected theorem eq' [s₁ : Setoid α] {a b : α} :
    @Quotient.mk' α s₁ a = @Quotient.mk' α s₁ b ↔ @Setoid.r _ s₁ a b

{α : Sort u_1}
[s₁ : Setoid α]
{a b : α}

Quotient.mk' a = Quotient.mk' b ↔ Setoid.r a b


theorem of_iso_pushout (h : CommSq f g inl inr) [HasPushout f g] (i : P ≅ pushout f g)
    (w₁ : inl ≫ i.hom = pushout.inl _ _) (w₂ : inr ≫ i.hom = pushout.inr _ _) :
      IsPushout f g inl inr

(i : P ≅ CategoryTheory.Limits.pushout f g)

(w₁ : inl ≫ i.hom = CategoryTheory.Limits.pushout.inl f g)

(w₂ : inr ≫ i.hom = CategoryTheory.Limits.pushout.inr f g)


/-- The norm, relative to `ℤ`, of `ζ ^ 2 ^ k - 1` in a `2 ^ (k + 1)`-th cyclotomic extension of `ℚ`
is `(-2) ^ 2 ^ k`. -/
lemma norm_toInteger_pow_sub_one_of_two [IsCyclotomicExtension {2 ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑((2 : ℕ+) ^ (k + 1))) :
    Algebra.norm ℤ (hζ.toInteger ^ 2 ^ k - 1) = (-2) ^ (2 : ℕ) ^ k

(Algebra.norm ℤ) (hζ.toInteger ^ 2 ^ k - 1) = (-2) ^ 2 ^ k


/-- Preconnectedness of the iUnion of a family of preconnected sets
indexed by the vertices of a preconnected graph,
where two vertices are joined when the corresponding sets intersect. -/
theorem IsPreconnected.iUnion_of_reflTransGen {ι : Type*} {s : ι → Set α}
    (H : ∀ i, IsPreconnected (s i))
    (K : ∀ i j, ReflTransGen (fun i j : ι => (s i ∩ s j).Nonempty) i j) :
    IsPreconnected (⋃ n, s n)

(K : ∀ (i j : ι), Relation.ReflTransGen (fun i j => (s i ∩ s j).Nonempty) i j)


@[simp]
theorem join_cons (s S) : @join α (s ::ₘ S) = s + join S

{α : Type u_1}
(s : Multiset α)
(S : Multiset (Multiset α))


@[simp]
theorem cancel_right {g₁ g₂ : sSupHom β γ} {f : sSupHom α β} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SupSet α]
[SupSet β]
[SupSet γ]
{g₁ g₂ : sSupHom β γ}
{f : sSupHom α β}
(hf : Function.Surjective ⇑f)


@[simp]
theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc ↑a (n - 1)

Finset.map Fin.valEmbedding (Finset.Ioi a) = Finset.Ioc (↑a) (n - 1)


/-- The quadratic character is quadratic as a multiplicative character. -/
theorem quadraticChar_isQuadratic : (quadraticChar F).IsQuadratic

(F : Type u_1)
[Field F]
[Fintype F]
[DecidableEq F]


theorem degree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.degree ≤ 1

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


/-- ```
 X ⊞ Y --fst--> X
   |            |
  snd           0
   |            |
   v            v
   Y -----0---> 0
```
is a bicartesian square.
-/
theorem of_is_biproduct₁ {b : BinaryBicone X Y} (h : b.IsBilimit) :
    BicartesianSq b.fst b.snd (0 : X ⟶ 0) (0 : Y ⟶ 0)

{b : CategoryTheory.Limits.BinaryBicone X Y}

CategoryTheory.BicartesianSq b.fst b.snd 0 0


/-- The measurable equivalence `(∀ i, π i) ≃ᵐ π ⋆` when the domain of `π` only contains `⋆` -/
@[simps! (config := .asFn)]
def piUnique [Unique δ'] : (∀ i, π i) ≃ᵐ π default

{δ' : Type u_5}
(π : δ' → Type u_6)
[(x : δ') → MeasurableSpace (π x)]
[Unique δ']

⇑(MeasurableEquiv.piUnique π) = fun f => f default


/-- Two solutions are equal iff they are equal on `range E.order`. -/
theorem sol_eq_of_eq_init (u v : ℕ → α) (hu : E.IsSolution u) (hv : E.IsSolution v) :
    u = v ↔ Set.EqOn u v ↑(range E.order)

{α : Type u_1}
[CommSemiring α]
(E : LinearRecurrence α)
(u v : ℕ → α)
(hu : E.IsSolution u)
(hv : E.IsSolution v)

u = v ↔ Set.EqOn u v ↑(Finset.range E.order)


theorem card_biUnion [DecidableEq β] {s : Finset α} {t : α → Finset β}
    (h : ∀ x ∈ s, ∀ y ∈ s, x ≠ y → Disjoint (t x) (t y)) :
    (s.biUnion t).card = ∑ u ∈ s, card (t u)

(s.biUnion t).card = ∑ u ∈ s, (t u).card


theorem comp₁ (f : ℕ → ℕ) (hf : @Primrec' 1 fun v => f v.head) {n g} (hg : @Primrec' n g) :
    Primrec' fun v => f (g v)

(f : ℕ → ℕ)
(hf : Nat.Primrec' fun v => f v.head)
{n : ℕ}
{g : Mathlib.Vector ℕ n → ℕ}
(hg : Nat.Primrec' g)


@[simp]
theorem pure_apply : pure a a' = if a' = a then 1 else 0

(PMF.pure a) a' = if a' = a then 1 else 0


@[simp]
theorem mk'_leftMovesEquiv {x y L R hL hR} :
    (@Relabelling.mk' x y L R hL hR).leftMovesEquiv = L.symm

{hL : (i : y.LeftMoves) → (x.moveLeft (L i)).Relabelling (y.moveLeft i)}

{hR : (j : y.RightMoves) → (x.moveRight (R j)).Relabelling (y.moveRight j)}

(SetTheory.PGame.Relabelling.mk' L R hL hR).leftMovesEquiv = L.symm


/-- When `M` is finite free, the trace of a linear map correspond to the contraction pairing under
the isomorphism `End(M) ≃ M* ⊗ M`-/
theorem trace_eq_contract' :
    LinearMap.trace R M = contractLeft R M ∘ₗ (dualTensorHomEquiv R M M).symm.toLinearMap

(R : Type u_1)
[CommRing R]
(M : Type u_2)
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]

LinearMap.trace R M = contractLeft R M ∘ₗ ↑(dualTensorHomEquiv R M M).symm


@[ext]
theorem ext : (∀ x, p x = q x) → p = q

{E : Type u_4}
[AddGroup E]
{p q : NonarchAddGroupSeminorm E}


theorem Integrable.prod_right_ae [SFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
    ∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) ν

⦃f : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

∀ᵐ (x : α) ∂μ, MeasureTheory.Integrable (fun y => f (x, y)) ν


theorem measure_union_lt_top (hs : μ s < ∞) (ht : μ t < ∞) : μ (s ∪ t) < ∞

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}
(hs : μ s < ⊤)
(ht : μ t < ⊤)


theorem trans_assoc (eEE₂ : E ≃ₛₗᵢ[σ₁₂] E₂) (eE₂E₃ : E₂ ≃ₛₗᵢ[σ₂₃] E₃) (eE₃E₄ : E₃ ≃ₛₗᵢ[σ₃₄] E₄) :
    eEE₂.trans (eE₂E₃.trans eE₃E₄) = (eEE₂.trans eE₂E₃).trans eE₃E₄

{R : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
{R₄ : Type u_4}
{E : Type u_5}
{E₂ : Type u_6}
{E₃ : Type u_7}
{E₄ : Type u_8}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[Semiring R₄]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{σ₁₃ : R →+* R₃}
{σ₃₁ : R₃ →+* R}
{σ₁₄ : R →+* R₄}
{σ₄₁ : R₄ →+* R}
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
{σ₂₄ : R₂ →+* R₄}
{σ₄₂ : R₄ →+* R₂}
{σ₃₄ : R₃ →+* R₄}
{σ₄₃ : R₄ →+* R₃}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
[RingHomInvPair σ₁₄ σ₄₁]
[RingHomInvPair σ₄₁ σ₁₄]
[RingHomInvPair σ₂₄ σ₄₂]
[RingHomInvPair σ₄₂ σ₂₄]
[RingHomInvPair σ₃₄ σ₄₃]
[RingHomInvPair σ₄₃ σ₃₄]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₁₂ σ₂₄ σ₁₄]
[RingHomCompTriple σ₂₃ σ₃₄ σ₂₄]
[RingHomCompTriple σ₁₃ σ₃₄ σ₁₄]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
[RingHomCompTriple σ₄₂ σ₂₁ σ₄₁]
[RingHomCompTriple σ₄₃ σ₃₂ σ₄₂]
[RingHomCompTriple σ₄₃ σ₃₁ σ₄₁]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[SeminormedAddCommGroup E₃]
[SeminormedAddCommGroup E₄]
[Module R E]
[Module R₂ E₂]
[Module R₃ E₃]
[Module R₄ E₄]
(eEE₂ : E ≃ₛₗᵢ[σ₁₂] E₂)
(eE₂E₃ : E₂ ≃ₛₗᵢ[σ₂₃] E₃)
(eE₃E₄ : E₃ ≃ₛₗᵢ[σ₃₄] E₄)


theorem cthickening_of_nonpos {δ : ℝ} (hδ : δ ≤ 0) (E : Set α) : cthickening δ E = closure E

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
(hδ : δ ≤ 0)
(E : Set α)


theorem MeasureTheory.Memℒp.of_comp_antilipschitzWith {α E F} {K'} [MeasurableSpace α]
    {μ : Measure α} [NormedAddCommGroup E] [NormedAddCommGroup F] {f : α → E} {g : E → F}
    (hL : Memℒp (g ∘ f) p μ) (hg : UniformContinuous g) (hg' : AntilipschitzWith K' g)
    (g0 : g 0 = 0) : Memℒp f p μ

{p : ℝ≥0∞}
{α : Type u_5}
{E : Type u_6}
{F : Type u_7}
{K' : ℝ≥0}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{f : α → E}
{g : E → F}
(hL : MeasureTheory.Memℒp (g ∘ f) p μ)
(hg : UniformContinuous g)
(hg' : AntilipschitzWith K' g)
(g0 : g 0 = 0)


theorem isClosed_C0 : IsClosed (C0 C ho)

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

IsClosed (Profinite.NobelingProof.C0 C ho)


/-- The integral of a continuous function is differentiable on a real set `s`. -/
theorem differentiableOn_integral_of_continuous {s : Set ℝ}
    (hintg : ∀ x ∈ s, IntervalIntegrable f volume a x) (hcont : Continuous f) :
    DifferentiableOn ℝ (fun u => ∫ x in a..u, f x) s

(hintg : ∀ x ∈ s, IntervalIntegrable f MeasureTheory.volume a x)

DifferentiableOn ℝ (fun u => ∫ (x : ℝ) in a..u, f x) s


theorem mem_ae_iff {s : Set α} : s ∈ ae μ ↔ μ sᶜ = 0

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s : Set α}


/-- If `f` is monotone, `g` is antitone, and `f ≤ g`, then for all `a`, `b` we have `f a ≤ g b`. -/
theorem Monotone.forall_le_of_antitone {β : Type*} [Preorder β] {f g : α → β} (hf : Monotone f)
    (hg : Antitone g) (h : f ≤ g) (m n : α) : f m ≤ g n

{α : Type u}
[SemilatticeSup α]
{β : Type u_1}
[Preorder β]
{f g : α → β}
(hf : Monotone f)
(hg : Antitone g)
(h : f ≤ g)
(m n : α)


/-- The trivial comonoid object. We later show this is terminal in `Comon_ C`.
-/
@[simps]
def trivial : Comon_ C

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


@[to_additive]
theorem disjoint_def' {p₁ p₂ : Submonoid M} :
    Disjoint p₁ p₂ ↔ ∀ {x y : M}, x ∈ p₁ → y ∈ p₂ → x = y → x = 1

{M : Type u_1}
[AddZeroClass M]
{p₁ p₂ : AddSubmonoid M}

Disjoint p₁ p₂ ↔ ∀ {x y : M}, x ∈ p₁ → y ∈ p₂ → x = y → x = 0


theorem neg_apply (m : ι → M) : (-f) m = -f m

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Ring R]
[AddCommGroup M]
[Module R M]
[TopologicalSpace M]
[AddCommGroup N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
[TopologicalAddGroup N]
(m : ι → M)


@[simp]
theorem k_mul_k : q.k * q.k = -((c₁ * c₂) • (1 : A))

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


theorem indexOf_get? [DecidableEq α] {a : α} {l : List α} (h : a ∈ l) :
    get? l (indexOf a l) = some a

{α : Type u}
[DecidableEq α]
{a : α}
{l : List α}
(h : a ∈ l)


@[simp]
theorem ContinuousMultilinearMap.uncurryRight_apply
    (f : ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei <| castSucc i) (Ei (last n) →L[𝕜] G))
    (m : ∀ i, Ei i) : f.uncurryRight m = f (init m) (m (last n))

[(i : Fin n.succ) → NormedAddCommGroup (Ei i)]

[(i : Fin n.succ) → NormedSpace 𝕜 (Ei i)]

(f : ContinuousMultilinearMap 𝕜 (fun i => Ei i.castSucc) (Ei (Fin.last n) →L[𝕜] G))

f.uncurryRight m = (f (Fin.init m)) (m (Fin.last n))


theorem Term.realize_mem {α : Type*} (t : L.Term α) (xs : α → M) (h : ∀ a, xs a ∈ S) :
    t.realize xs ∈ S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{S : L.Substructure M}
{α : Type u_3}
(t : L.Term α)
(xs : α → M)
(h : ∀ (a : α), xs a ∈ S)

FirstOrder.Language.Term.realize xs t ∈ S


/-- `(P ⟶ P⁺)⁺ = P⁺ ⟶ P⁺⁺` -/
@[simp]
theorem plusMap_toPlus : J.plusMap (J.toPlus P) = J.toPlus (J.plusObj P)

(J : CategoryTheory.GrothendieckTopology C)

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

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

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


theorem restrictGermPredicate_congr {P : ∀ x : X, Germ (𝓝 x) Y → Prop}
    (hf : RestrictGermPredicate P A x f) (h : ∀ᶠ z in 𝓝ˢ A, g z = f z) :
    RestrictGermPredicate P A x g

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
{f g : X → Y}
{A : Set X}
{x : X}
{P : (x : X) → (𝓝 x).Germ Y → Prop}
(hf : RestrictGermPredicate P A x ↑f)
(h : ∀ᶠ (z : X) in 𝓝ˢ A, g z = f z)


@[simp] theorem coe_mk (e : α ≃ β) (h) : ⇑(mk e h) = e

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(e : α ≃ β)
(h : Isometry e.toFun)

⇑{ toEquiv := e, isometry_toFun := h } = ⇑e


@[simp]
theorem map_snd_nhds (x : X × Y) : map Prod.snd (𝓝 x) = 𝓝 x.2

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(x : X × Y)


@[simp]
theorem top_apply (f : Y ⟶ X) : (⊤ : Sieve X) f

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


/-- The first projection of a product is a non-unital alg_hom. -/
@[simps]
def fst : A × B →ₙₐ[R] A

(R : Type u)
[Monoid R]
(A : Type v)
(B : Type w)
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
(self : A × B)

(NonUnitalAlgHom.fst R A B) self = self.1


theorem repr_opow (o₁ o₂) [NF o₁] [NF o₂] : repr (o₁ ^ o₂) = repr o₁ ^ repr o₂


@[to_additive]
theorem singleton_mul_mem_nhds_of_nhds_one (a : α) (h : s ∈ 𝓝 (1 : α)) : {a} * s ∈ 𝓝 a

{α : Type u}
[TopologicalSpace α]
[Group α]
[ContinuousConstSMul α α]
{s : Set α}
(a : α)
(h : s ∈ 𝓝 1)


/-- One can reformulate smoothness on a set as continuity on this set, and smoothness in any
extended chart. -/
theorem contMDiffOn_iff :
    ContMDiffOn I I' n f s ↔
      ContinuousOn f s ∧
        ∀ (x : M) (y : M'),
          ContDiffOn 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm)
            ((extChartAt I x).target ∩
              (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source))

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{f : M → M'}
{s : Set M}
{n : ℕ∞}

ContMDiffOn I I' n f s ↔
  ContinuousOn f s ∧
    ∀ (x : M) (y : M'),
      ContDiffOn 𝕜 n (↑(extChartAt I' y) ∘ f ∘ ↑(extChartAt I x).symm)
        ((extChartAt I x).target ∩ ↑(extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source))


theorem id_apply (M : Mat R) (i j : M) : (𝟙 M : Matrix M M R) i j = if i = j then 1 else 0

(R : Type u)
[Semiring R]
(M : CategoryTheory.Mat R)
(i j : ↑M)


theorem isTrivial_of_nilpotencyLength_le_one [IsNilpotent R L M] (h : nilpotencyLength R L M ≤ 1) :
    IsTrivial L M

(h : LieModule.nilpotencyLength R L M ≤ 1)


theorem Poly.denote_eq_cancel_eq (ctx : Context) (m₁ m₂ : Poly) : denote_eq ctx (cancel m₁ m₂) = denote_eq ctx (m₁, m₂)

(ctx : Nat.Linear.Context)
(m₁ m₂ : Nat.Linear.Poly)

Nat.Linear.Poly.denote_eq ctx (m₁.cancel m₂) = Nat.Linear.Poly.denote_eq ctx (m₁, m₂)


theorem closure_smul₀' {c : G₀} (hc : c ≠ 0) (s : Set α) :
    closure (c • s) = c • closure s

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)
(s : Set α)


@[simp] theorem loopyOn_indep_iff : (loopyOn E).Indep I ↔ I = ∅


theorem neg_log_inv_eq_clog (b : ℕ) (r : R) : -log b r⁻¹ = clog b r

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)
(r : R)


@[to_additive]
theorem iSup_eq_closure {ι : Sort*} (p : ι → Subsemigroup M) :
    ⨆ i, p i = Subsemigroup.closure (⋃ i, (p i : Set M))

{M : Type u_1}
[Mul M]
{ι : Sort u_4}
(p : ι → Subsemigroup M)

⨆ i, p i = Subsemigroup.closure (⋃ i, ↑(p i))


theorem Ico_subset_Ico_iff {a₁ b₁ a₂ b₂ : α} (h : a₁ < b₁) :
    Ico a₁ b₁ ⊆ Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
{a₁ b₁ a₂ b₂ : α}
(h : a₁ < b₁)

Finset.Ico a₁ b₁ ⊆ Finset.Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂


theorem erase_cons {s : Finset α} {a : α} (h : a ∉ s) : (s.cons a h).erase a = s

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


lemma ι_app_self : U.ι.app U = X.presheaf.map (eqToHom (X := U.ι ''ᵁ _) (by simp)).op

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

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


@[to_additive (attr := measurability)]
theorem measurable_oneLePart : Measurable (oneLePart : α → α)

{α : Type u_1}
[Lattice α]
[AddGroup α]
[MeasurableSpace α]
[MeasurableSup α]


/-- Every presheaf is a sheaf for the family {𝟙 X}.

[Elephant] C2.1.5(i)
-/
theorem isSheafFor_singleton_iso (P : Cᵒᵖ ⥤ Type w) : IsSheafFor P (Presieve.singleton (𝟙 X))

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

CategoryTheory.Presieve.IsSheafFor P (CategoryTheory.Presieve.singleton (CategoryTheory.CategoryStruct.id X))


theorem continuousOn_iUnion {g : X → Y} (hf : LocallyFinite f) (h_cl : ∀ i, IsClosed (f i))
    (h_cont : ∀ i, ContinuousOn g (f i)) : ContinuousOn g (⋃ i, f i)

(h_cont : ∀ (i : ι), ContinuousOn g (f i))


/-- The linear equivalence between `ContinuousMultilinearMap 𝕜 E F` and `(⨂[𝕜] i, Eᵢ) →L[𝕜] F`
induced by `PiTensorProduct.lift`, for every normed space `F`.
-/
@[simps]
noncomputable def liftEquiv : ContinuousMultilinearMap 𝕜 E F ≃ₗ[𝕜] (⨂[𝕜] i, E i) →L[𝕜] F

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

(PiTensorProduct.liftEquiv 𝕜 E F) f = (PiTensorProduct.lift f.toMultilinearMap).mkContinuous ‖f‖ ⋯


theorem hasStrictDerivAt_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
    HasStrictDerivAt arcsin (1 / √(1 - x ^ 2)) x

HasStrictDerivAt Real.arcsin (1 / √(1 - x ^ 2)) x


theorem toFiniteMeasure_nonzero (μ : ProbabilityMeasure Ω) : μ.toFiniteMeasure ≠ 0

(μ : MeasureTheory.ProbabilityMeasure Ω)


theorem map_comp_heq' (hobj : ∀ X : C, F.obj X = G.obj X)
    (hmap : ∀ {X Y} (f : X ⟶ Y), HEq (F.map f) (G.map f)) :
    HEq (F.map (f ≫ g)) (G.map (f ≫ g))

(hmap : ∀ {X Y : C} (f : X ⟶ Y), HEq (F.map f) (G.map f))

HEq (F.map (CategoryTheory.CategoryStruct.comp f g)) (G.map (CategoryTheory.CategoryStruct.comp f g))


/-- The restriction of scalars functor `PresheafOfModules R' ⥤ PresheafOfModules R`
induced by a morphism of presheaves of rings `R ⟶ R'`. -/
@[simps]
noncomputable def restrictScalars (α : R ⟶ R') :
    PresheafOfModules.{v} R' ⥤ PresheafOfModules.{v} R

{C : Type u'}
[CategoryTheory.Category.{v', u'} C]
{R R' : Cᵒᵖ ⥤ RingCat}
(α : R ⟶ R')
{M₁' M₂' : PresheafOfModules R'}
(φ : M₁' ⟶ M₂')

((PresheafOfModules.restrictScalars α).map φ).hom = φ.hom


@[simp]
theorem toMul_multiset_sum (s : Multiset (Additive α)) : toMul s.sum = (s.map toMul).prod

{α : Type u_3}
[CommMonoid α]
(s : Multiset (Additive α))

Additive.toMul s.sum = (Multiset.map (⇑Additive.toMul) s).prod


lemma fourierIntegralInv_eq_fourierIntegral_comp_neg (f : V → E) :
    𝓕⁻ f = 𝓕 (fun x ↦ f (-x))

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

Real.fourierIntegralInv f = Real.fourierIntegral fun x => f (-x)


@[to_additive (attr := simp, norm_cast)]
theorem coe_smul' [SMul M β] (c : α → M) (f : α → β) : ↑(c • f) = (c : Germ l M) • (f : Germ l β)

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{M : Type u_5}
[SMul M β]
(c : α → M)
(f : α → β)


theorem UniformInducing.comp {g : β → γ} (hg : UniformInducing g) {f : α → β}
    (hf : UniformInducing f) : UniformInducing (g ∘ f)

{α : Type u}
{β : Type v}
{γ : Type w}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{g : β → γ}
(hg : UniformInducing g)
{f : α → β}
(hf : UniformInducing f)


@[reassoc (attr := simp), elementwise nosimp]
theorem germ_stalkSpecializes (F : X.Presheaf C) {U : Opens X} {y : U} {x : X} (h : x ⤳ y) :
    F.germ y ≫ F.stalkSpecializes h = F.germ (⟨x, h.mem_open U.isOpen y.prop⟩ : U)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasColimits C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{U : TopologicalSpace.Opens ↑X}
{y : ↥U}
{x : ↑X}
(h : x ⤳ ↑y)

F.germ y ≫ F.stalkSpecializes h = F.germ ⟨x, ⋯⟩


theorem Basis.ofZlatticeBasis_span :
    (span ℤ (Set.range (b.ofZlatticeBasis K))).toAddSubgroup = L

(K : Type u_1)
[NormedLinearOrderedField K]
[HasSolidNorm K]
[FloorRing K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
[FiniteDimensional K E]
[ProperSpace E]
(L : AddSubgroup E)
[DiscreteTopology ↥L]
{ι : Type u_3}
[hs : IsZlattice K L]
(b : Basis ι ℤ ↥L)

(Submodule.span ℤ (Set.range ⇑(Basis.ofZlatticeBasis K L b))).toAddSubgroup = L


@[deprecated forall_imp (since := "2024-03-23")]
theorem forall_of_ball (H : ∀ x, p x) (h : ∀ x, p x → q x) (x) : q x

{α : Sort u_1}
{p q : α → Prop}
(H : ∀ (x : α), p x)
(h : ∀ (x : α), p x → q x)
(x : α)


@[simp]
theorem eventually_pure {a : α} {p : α → Prop} : (∀ᶠ x in pure a, p x) ↔ p a


theorem WfDvdMonoid.of_exists_prime_factors : WfDvdMonoid α

(pf : ∀ (a : α), a ≠ 0 → ∃ f, (∀ b ∈ f, Prime b) ∧ f.prod ~ᵤ a)


/-- `PUnit` is a right identity for type product up to an equivalence. -/
@[simps]
def prodPUnit (α) : α × PUnit ≃ α

(Equiv.prodPUnit α).symm a = (a, PUnit.unit)


theorem integral_singleton [MeasurableSingletonClass α] {μ : Measure α} (f : α → E) (a : α) :
    ∫ a in {a}, f a ∂μ = (μ {a}).toReal • f a

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[hE : CompleteSpace E]
{m : MeasurableSpace α}
[MeasurableSingletonClass α]
{μ : MeasureTheory.Measure α}
(f : α → E)
(a : α)

∫ (a : α) in {a}, f a ∂μ = (μ {a}).toReal • f a


lemma type_ext {x y : c.pt} (h₁ : c.fst x = c.fst y) (h₂ : c.snd x = c.snd y) : x = y

{c : CategoryTheory.Limits.PullbackCone f g}


@[simp]
theorem symm_map (f : α ≃o β) : (map f).symm = map f.symm

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)

(UpperSet.map f).symm = UpperSet.map f.symm


theorem support_update (p : R[X]) (n : ℕ) (a : R) [Decidable (a = 0)] :
    support (p.update n a) = if a = 0 then p.support.erase n else insert n p.support

{R : Type u}
[Semiring R]
(p : R[X])
(n : ℕ)
(a : R)
[Decidable (a = 0)]

(p.update n a).support = if a = 0 then p.support.erase n else insert n p.support


@[to_additive (attr := simp)]
theorem map_mul_right_nhds (x y : G) : map (· * x) (𝓝 y) = 𝓝 (y * x)

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

Filter.map (fun x_1 => x_1 * x) (𝓝 y) = 𝓝 (y * x)


/-- If `ι` has a unique element, then `ι → α` is uniformly isomorphic to `α`. -/
@[simps! (config := .asFn)]
def funUnique (ι α : Type*) [Unique ι] [UniformSpace α] : (ι → α) ≃ᵤ α

(ι : Type u_4)
(α : Type u_5)
[Unique ι]
[UniformSpace α]

⇑(UniformEquiv.funUnique ι α) = fun f => f default


/-- The natural isomorphism `(K⟦n⟧).sc i ≅ K.sc i'` when `n + i = i'`. -/
@[simps!]
noncomputable def shiftShortComplexFunctorIso (n i i' : ℤ) (hi : n + i = i') :
    shiftFunctor C n ⋙ shortComplexFunctor C _ i ≅ shortComplexFunctor C _ i'

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(n i i' : ℤ)
(hi : n + i = i')
(X : CochainComplex C ℤ)

((CochainComplex.shiftShortComplexFunctorIso C n i i' hi).hom.app X).τ₂ = (HomologicalComplex.XIsoOfEq X ⋯).hom


theorem corec'_eq (f : α → β × α) (a : α) : corec' f a = (f a).1::corec' f (f a).2

{α : Type u}
{β : Type v}
(f : α → β × α)
(a : α)

Stream'.corec' f a = Stream'.cons (f a).1 (Stream'.corec' f (f a).2)


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

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul Gᵐᵒᵖ G]
(c : G)

(IsometryEquiv.mulRight c).toEquiv = Equiv.mulRight c


theorem sup_mem_subalgebra_closure (A : Subalgebra ℝ C(X, ℝ)) (f g : A) :
    (f : C(X, ℝ)) ⊔ (g : C(X, ℝ)) ∈ A.topologicalClosure

{X : Type u_1}
[TopologicalSpace X]
[CompactSpace X]
(A : Subalgebra ℝ C(X, ℝ))
(f g : ↥A)


@[simp] lemma natCast_mul_left (h : Commute a b) (n : ℕ) : Commute (n * a) b

{α : Type u_1}
[Semiring α]
{a b : α}
(h : Commute a b)
(n : ℕ)


@[simp] theorem ite_true_same (p q : Prop) [h : Decidable p] : (if p then p else q) = (¬p → q)


theorem irreducible_aux (f g : Polynomial (FixedPoints.subfield G F)) (hf : f.Monic) (hg : g.Monic)
    (hfg : f * g = minpoly G F x) : f = 1 ∨ g = 1

(f g : Polynomial ↥(FixedPoints.subfield G F))

(hfg : f * g = FixedPoints.minpoly G F x)


theorem piecewise_apply {s : Set α} (hs : MeasurableSet s) (f g : α →ₛ β) (a) :
    piecewise s hs f g a = if a ∈ s then f a else g a

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

↑(MeasureTheory.SimpleFunc.piecewise s hs f g) a = if a ∈ s then ↑f a else ↑g a


theorem nontrivial_toCycle (f : Perm α) (hf : IsCycle f) : (toCycle f hf).Nontrivial

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(f : Equiv.Perm α)
(hf : f.IsCycle)


lemma eqToHom_domain_lift_id {p : 𝒳 ⥤ 𝒮} {a b : 𝒳} (hab : a = b) {R : 𝒮} (hR : p.obj a = R) :
    p.IsHomLift (𝟙 R) (eqToHom hab)

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
{p : 𝒳 ⥤ 𝒮}
{a b : 𝒳}
(hab : a = b)
{R : 𝒮}
(hR : p.obj a = R)

p.IsHomLift (𝟙 R) (CategoryTheory.eqToHom hab)


lemma disjoint_box_succ_prod (n : ℕ) : Disjoint (box (n + 1)) (Icc (-n : α) n)

{α : Type u_1}
[OrderedRing α]
[LocallyFiniteOrder α]
[DecidableEq α]
(n : ℕ)

Disjoint (Finset.box (n + 1)) (Finset.Icc (-↑n) ↑n)


/-- Introduction rule to prove that `b` is the infimum of `f`: it suffices to check that `b`
is smaller than `f i` for all `i`, and that this is not the case of any `w>b`.
See `iInf_eq_of_forall_ge_of_forall_gt_exists_lt` for a version in complete lattices. -/
theorem ciInf_eq_of_forall_ge_of_forall_gt_exists_lt [Nonempty ι] {f : ι → α} (h₁ : ∀ i, b ≤ f i)
    (h₂ : ∀ w, b < w → ∃ i, f i < w) : ⨅ i : ι, f i = b

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{b : α}
[Nonempty ι]
{f : ι → α}
(h₁ : ∀ (i : ι), b ≤ f i)
(h₂ : ∀ (w : α), b < w → ∃ i, f i < w)


theorem surj'' (z : S) : ∃ (r : R) (m : M), z = r • (toInvSubmonoid M S m : S)

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(z : S)

∃ r m, z = r • ↑((IsLocalization.toInvSubmonoid M S) m)


@[measurability]
theorem measurable_exp : Measurable exp


@[simp]
theorem mem_iInf_iff {f : ι → LowerSet α} : (a ∈ ⨅ i, f i) ↔ ∀ i, a ∈ f i

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


theorem HasFiniteIntegral.norm {f : α → β} (hfi : HasFiniteIntegral f μ) :
    HasFiniteIntegral (fun a => ‖f a‖) μ

(hfi : MeasureTheory.HasFiniteIntegral f μ)

MeasureTheory.HasFiniteIntegral (fun a => ‖f a‖) μ


protected theorem Filter.EventuallyEq.fderiv (h : f₁ =ᶠ[𝓝 x] f) : fderiv 𝕜 f₁ =ᶠ[𝓝 x] fderiv 𝕜 f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
(h : f₁ =ᶠ[𝓝 x] f)


theorem gronwallBound_ε0_δ0 (K x : ℝ) : gronwallBound 0 K 0 x = 0


theorem IsRelPrime.of_add_mul_left_right (h : IsRelPrime x (y + x * z)) : IsRelPrime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsRelPrime x (y + x * z))


/-- If `d` is a positive integer that is not a square, then there exists a solution
to the Pell equation `x^2 - d*y^2 = 1` with `x > 1` and `y > 0`. -/
theorem exists_pos_of_not_isSquare (h₀ : 0 < d) (hd : ¬IsSquare d) :
    ∃ a : Solution₁ d, 1 < a.x ∧ 0 < a.y


theorem zpow_arith_mean_le_arith_mean_zpow (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 < z i) (m : ℤ) :
    (∑ i ∈ s, w i * z i) ^ m ≤ ∑ i ∈ s, w i * z i ^ m

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1)
(hz : ∀ i ∈ s, 0 < z i)
(m : ℤ)


/-- (Impl)
A cone for the diagram `(D ⋙ forget T) ⋙ T` found by composing the natural transformation `γ`
with the limiting cone for `D ⋙ forget T`.
-/
@[simps]
def newCone : Cone ((D ⋙ forget T) ⋙ (T : C ⥤ C))

{D : CategoryTheory.Functor J T.Coalgebra}

(c : CategoryTheory.Limits.Cone (D.comp T.forget))

(CategoryTheory.Comonad.ForgetCreatesLimits'.newCone c).π =
  CategoryTheory.CategoryStruct.comp c.π CategoryTheory.Comonad.ForgetCreatesLimits'.γ


theorem IsIntegral.prod {α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) :
    IsIntegral R (∏ x ∈ s, f x)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{α : Type u_5}
{s : Finset α}
(f : α → A)
(h : ∀ x ∈ s, IsIntegral R (f x))


/-- Compatibility of `nullHomotopicMap` with the precomposition by a morphism
of complexes. -/
theorem comp_nullHomotopicMap (f : C ⟶ D) (hom : ∀ i j, D.X i ⟶ E.X j) :
    f ≫ nullHomotopicMap hom = nullHomotopicMap fun i j => f.f i ≫ hom i j

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D E : HomologicalComplex V c}
(f : C ⟶ D)
(hom : (i j : ι) → D.X i ⟶ E.X j)

f ≫ Homotopy.nullHomotopicMap hom = Homotopy.nullHomotopicMap fun i j => f.f i ≫ hom i j


theorem get_interleave_left : ∀ (n : ℕ) (s₁ s₂ : Stream' α),
    get (s₁ ⋈ s₂) (2 * n) = get s₁ n

{α : Type u}
(n : ℕ)
(s₁ s₂ : Stream' α)


@[simp]
theorem mem_cells {μ : YoungDiagram} (c : ℕ × ℕ) : c ∈ μ.cells ↔ c ∈ μ


protected lemma add_le_zero_iff_le_neg : a + b ≤ 0 ↔ a ≤ - b


theorem isSuccLimit_of_succ_lt (H : ∀ a < b, succ a < b) : IsSuccLimit b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{b : α}
(H : ∀ a < b, Order.succ a < b)


@[simp]
theorem add_moveLeft_inr (x : PGame) {y : PGame} (i) :
    (x + y).moveLeft (toLeftMovesAdd (Sum.inr i)) = x + y.moveLeft i

(x : SetTheory.PGame)
{y : SetTheory.PGame}
(i : y.LeftMoves)

(x + y).moveLeft (SetTheory.PGame.toLeftMovesAdd (Sum.inr i)) = x + y.moveLeft i


@[rclike_simps]
theorem normSq_zero : normSq (0 : K) = 0


theorem IsCompactOperator.codRestrict {f : M₁ → M₂} (hf : IsCompactOperator f) {V : Submodule R₂ M₂}
    (hV : ∀ x, f x ∈ V) (h_closed : IsClosed (V : Set M₂)) :
    IsCompactOperator (Set.codRestrict f V hV)

{R₂ : Type u_2}
[Semiring R₂]
{M₁ : Type u_3}
{M₂ : Type u_4}
[TopologicalSpace M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R₂ M₂]
{f : M₁ → M₂}
(hf : IsCompactOperator f)
{V : Submodule R₂ M₂}
(hV : ∀ (x : M₁), f x ∈ V)
(h_closed : IsClosed ↑V)

IsCompactOperator (Set.codRestrict f (↑V) hV)


@[to_additive]
theorem comap_inf_map_of_injective (S T : Subsemigroup M) : (S.map f ⊓ T.map f).comap f = S ⊓ T

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

AddSubsemigroup.comap f (AddSubsemigroup.map f S ⊓ AddSubsemigroup.map f T) = S ⊓ T


lemma diff_sUnion_eq_sUnion_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    s \ ⋃₀ I = ⋃₀ hC.diffFinset₀ hs hI

{α : Type u_1}
{C : Set (Set α)}
{s : Set α}
{I : Finset (Set α)}
(hC : MeasureTheory.IsSetSemiring C)
(hs : s ∈ C)
(hI : ↑I ⊆ C)


@[to_additive]
theorem smul_Lp_ae_eq (c : Mᵈᵐᵃ) (f : Lp E p μ) : c • f =ᵐ[μ] (f <| mk.symm c • ·)

[MeasureTheory.VAddInvariantMeasure M α μ]

↑↑(c +ᵥ f) =ᵐ[μ] fun x => ↑↑f (DomAddAct.mk.symm c +ᵥ x)


theorem multiplicity_le_one_of_separable {p q : R[X]} (hq : ¬IsUnit q) (hsep : Separable p) :
    multiplicity q p ≤ 1

{R : Type u}
[CommSemiring R]
{p q : R[X]}
(hq : ¬IsUnit q)
(hsep : p.Separable)


/-- Let `M` be a smooth manifold with corners modelled on a finite dimensional real vector space.
Suppose also that `M` is a Hausdorff `σ`-compact topological space. Let `s` be a closed set
in `M` and `U : M → Set M` be a collection of sets such that `U x ∈ 𝓝 x` for every `x ∈ s`.
Then there exists a smooth bump covering of `s` that is subordinate to `U`. -/
theorem exists_isSubordinate [T2Space M] [SigmaCompactSpace M] (hs : IsClosed s)
    (hU : ∀ x ∈ s, U x ∈ 𝓝 x) :
    ∃ (ι : Type uM) (f : SmoothBumpCovering ι I M s), f.IsSubordinate U

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
{U : M → Set M}
[T2Space M]
[SigmaCompactSpace M]
(hs : IsClosed s)
(hU : ∀ x ∈ s, U x ∈ 𝓝 x)


theorem any_def (p : α → Prop) (s : Stream' α) : Any p s = ∃ n, p (get s n)

{α : Type u}
(p : α → Prop)
(s : Stream' α)


@[simp]
theorem toEquiv_fun (i : X ≅ Y) : (i.toEquiv : X → Y) = i.hom


lemma mul_div (a b c : EReal) : a * (b / c) = (a * b) / c


theorem forall_mem_nonempty_iff_neBot {f : Filter α} :
    (∀ s : Set α, s ∈ f → s.Nonempty) ↔ NeBot f


protected lemma EdgeDisjointTriangles.farFromTriangleFree (hG : G.EdgeDisjointTriangles)
    (tris_big : ε * (card α ^ 2 : ℕ) ≤ (G.cliqueFinset 3).card) :
    G.FarFromTriangleFree ε

(tris_big : ε * ↑(Fintype.card α ^ 2) ≤ ↑(G.cliqueFinset 3).card)


theorem strictConvex_Ici (r : β) : StrictConvex 𝕜 (Ici r)

{𝕜 : Type u_1}
{β : Type u_5}
[OrderedSemiring 𝕜]
[TopologicalSpace β]
[LinearOrderedCancelAddCommMonoid β]
[OrderTopology β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r : β)


@[simp]
theorem iUnion_Ioc_eq_Ioi_self_iff {f : ι → α} {a : α} :
    ⋃ i, Ioc a (f i) = Ioi a ↔ ∀ x, a < x → ∃ i, x ≤ f i

{ι : Sort u}
{α : Type v}
[LinearOrder α]
{f : ι → α}
{a : α}

⋃ i, Set.Ioc a (f i) = Set.Ioi a ↔ ∀ (x : α), a < x → ∃ i, x ≤ f i


/-- **Ruzsa's triangle inequality**. Div-div-mul version. -/
@[to_additive "**Ruzsa's triangle inequality**. Sub-sub-add version."]
theorem card_div_mul_le_card_div_mul_card_mul (A B C : Finset α) :
    (A / C).card * B.card ≤ (A / B).card * (B * C).card

{α : Type u_1}
[CommGroup α]
[DecidableEq α]
(A B C : Finset α)


@[simp]
theorem ofMultiset_apply (a : α) : ofMultiset s hs a = s.count a / (Multiset.card s)

{α : Type u_1}
{s : Multiset α}
(hs : s ≠ 0)
(a : α)

(PMF.ofMultiset s hs) a = ↑(Multiset.count a s) / ↑(Multiset.card s)


@[simp]
theorem map_direction (s : AffineSubspace k P₁) :
    (s.map f).direction = s.direction.map f.linear

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
(s : AffineSubspace k P₁)

(AffineSubspace.map f s).direction = Submodule.map f.linear s.direction


/-- A nonempty finite `G`-set is connected if and only if the `G`-action is transitive. -/
theorem Action.isConnected_iff_transitive (X : Action FintypeCat (MonCat.of G)) [Nonempty X.V] :
    IsConnected X ↔ MulAction.IsPretransitive G X.V

(G : Type u)
[Group G]
(X : Action FintypeCat (MonCat.of G))
[Nonempty ↑X.V]

CategoryTheory.PreGaloisCategory.IsConnected X ↔ MulAction.IsPretransitive G ↑X.V


@[simp]
theorem abs_cos_add_sin_mul_I (x : ℝ) : abs (cos x + sin x * I) = 1

Complex.abs (Complex.cos ↑x + Complex.sin ↑x * Complex.I) = 1


theorem map_nhds_eq (x : H) : map I (𝓝 x) = 𝓝[range I] I x

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

Filter.map (↑I) (𝓝 x) = 𝓝[Set.range ↑I] ↑I x


theorem continuous_if {p : α → Prop} {f g : α → β} [∀ a, Decidable (p a)]
    (hp : ∀ a ∈ frontier { x | p x }, f a = g a) (hf : ContinuousOn f (closure { x | p x }))
    (hg : ContinuousOn g (closure { x | ¬p x })) :
    Continuous fun a => if p a then f a else g a

(hp : ∀ a ∈ frontier {x | p x}, f a = g a)

(hf : ContinuousOn f (closure {x | p x}))

(hg : ContinuousOn g (closure {x | ¬p x}))


protected theorem eq_ediv_of_mul_eq_right {a b c : Int}
    (H1 : a ≠ 0) (H2 : a * b = c) : b = c / a


@[simp] lemma egauge_empty (x : E) : egauge 𝕜 ∅ x = ∞

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


theorem nhds_basis_closed_balanced [RegularSpace E] :
    (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ IsClosed s ∧ Balanced 𝕜 s) id

(𝕜 : Type u_1)
(E : Type u_2)
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
[RegularSpace E]

(𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ IsClosed s ∧ Balanced 𝕜 s) id


protected theorem IsTrail.takeUntil {u v w : V} {p : G.Walk v w} (hc : p.IsTrail)
    (h : u ∈ p.support) : (p.takeUntil u h).IsTrail

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
{p : G.Walk v w}
(hc : p.IsTrail)
(h : u ∈ p.support)


/-- An injective local homeomorphism is an open embedding. -/
theorem openEmbedding_of_injective (hf : IsLocalHomeomorph f) (hi : f.Injective) :
    OpenEmbedding f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : IsLocalHomeomorph f)
(hi : Function.Injective f)


@[simp]
theorem compl_eq_top : xᶜ = ⊤ ↔ x = ⊥

xᶜ = ⊤ ↔ x = ⊥


theorem continuous_posPart [Fact (1 ≤ p)] : Continuous fun f : Lp ℝ p μ => posPart f

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[Fact (1 ≤ p)]

Continuous fun f => MeasureTheory.Lp.posPart f


/-- The second modified cyclotomic polyomial is `X + 1` if the characteristic of `R` is not `2`. -/
@[simp]
theorem cyclotomic'_two (R : Type*) [CommRing R] [IsDomain R] (p : ℕ) [CharP R p] (hp : p ≠ 2) :
    cyclotomic' 2 R = X + 1

(R : Type u_2)
[CommRing R]
[IsDomain R]
(p : ℕ)
[CharP R p]
(hp : p ≠ 2)

Polynomial.cyclotomic' 2 R = Polynomial.X + 1


protected theorem add_right_cancel' (c : α) : a + c ≡ b + c [PMOD p] → a ≡ b [PMOD p]

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


protected theorem norm_compl_sum_single (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ‖f - ∑ i ∈ s, lp.single p i (f i)‖ ^ p.toReal = ‖f‖ ^ p.toReal - ∑ i ∈ s, ‖f i‖ ^ p.toReal

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
[DecidableEq α]
(hp : 0 < p.toReal)
(f : ↥(lp E p))
(s : Finset α)

‖f - ∑ i ∈ s, lp.single p i (↑f i)‖ ^ p.toReal = ‖f‖ ^ p.toReal - ∑ i ∈ s, ‖↑f i‖ ^ p.toReal


@[to_additive]
protected theorem eq' {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ Localization.r S (a₁, a₂) (b₁, b₂)

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)
{a₁ b₁ : M}
{a₂ b₂ : ↥S}

f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ (AddLocalization.r S) (a₁, a₂) (b₁, b₂)


@[simp] lemma fib_eq_zero : ∀ {n}, fib n = 0 ↔ n = 0


@[simp] theorem decide_eq_false_iff_not (p : Prop) {_ : Decidable p} : (decide p = false) ↔ ¬p

∀ {x : Decidable p}, decide p = false ↔ ¬p


theorem toConjAct_smul (g h : G) : toConjAct g • h = g * h * g⁻¹

{G : Type u_3}
[DivInvMonoid G]
(g h : G)


theorem coe_int_num_of_den_eq_one {q : ℚ} (hq : q.den = 1) : (q.num : ℚ) = q


theorem cos_sub : cos (x - y) = cos x * cos y + sin x * sin y

Complex.cos (x - y) = Complex.cos x * Complex.cos y + Complex.sin x * Complex.sin y


theorem coe_comp (p : Seminorm 𝕜₂ E₂) (f : E →ₛₗ[σ₁₂] E₂) : ⇑(p.comp f) = p ∘ f

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[AddCommGroup E]
[AddCommGroup E₂]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
(p : Seminorm 𝕜₂ E₂)
(f : E →ₛₗ[σ₁₂] E₂)


theorem ordConnected_iff_upperClosure_inter_lowerClosure :
    s.OrdConnected ↔ ↑(upperClosure s) ∩ ↑(lowerClosure s) = s


theorem toSesqForm_apply_norm_le {f : E →L[𝕜] E'} {v : E'} : ‖toSesqForm f v‖ ≤ ‖f‖ * ‖v‖

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{E' : Type u_4}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
{f : E →L[𝕜] E'}
{v : E'}

‖(ContinuousLinearMap.toSesqForm f) v‖ ≤ ‖f‖ * ‖v‖


/-- Given an almost everywhere measurable function `f` with values in `ℝ≥0` in a sigma-finite space,
there exists a lower semicontinuous function `g > f` with integral arbitrarily close to that of `f`.
Formulation in terms of `lintegral`.
Auxiliary lemma for Vitali-Carathéodory theorem `exists_lt_lower_semicontinuous_integral_lt`. -/
theorem exists_lt_lowerSemicontinuous_lintegral_ge_of_aemeasurable [SigmaFinite μ] (f : α → ℝ≥0)
    (fmeas : AEMeasurable f μ) {ε : ℝ≥0∞} (ε0 : ε ≠ 0) :
    ∃ g : α → ℝ≥0∞,
      (∀ x, (f x : ℝ≥0∞) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ x, g x ∂μ) ≤ (∫⁻ x, f x ∂μ) + ε

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
(μ : MeasureTheory.Measure α)
[μ.WeaklyRegular]
[MeasureTheory.SigmaFinite μ]
(f : α → ℝ≥0)
(fmeas : AEMeasurable f μ)
{ε : ℝ≥0∞}
(ε0 : ε ≠ 0)

∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), ↑(f x) ∂μ + ε


@[simp] -- Should be replaced with `LinearIsometry.isComplete_image_iff` when `lean4#3107` is fixed.
theorem isComplete_image_iff' (f : LinearIsometry σ₁₂ E E₂) {s : Set E} :
    IsComplete (f '' s) ↔ IsComplete s

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
{s : Set E}


private theorem candidates_symm (fA : f ∈ candidates X Y) : f (x, y) = f (y, x)

(fA : f ∈ GromovHausdorff.candidates X Y)


theorem sign_of_cycleType' (σ : Perm α) :
    sign σ = (σ.cycleType.map fun n => -(-1 : ℤˣ) ^ n).prod

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

Equiv.Perm.sign σ = (Multiset.map (fun n => -(-1) ^ n) σ.cycleType).prod


/-- Special case of the sandwich theorem: if the norm of `f` is eventually bounded by a real
function `a` which tends to `0`, then `f` tends to `1` (neutral element of `SeminormedGroup`).
In this pair of lemmas (`squeeze_one_norm'` and `squeeze_one_norm`), following a convention of
similar lemmas in `Topology.MetricSpace.Basic` and `Topology.Algebra.Order`, the `'` version is
phrased using "eventually" and the non-`'` version is phrased absolutely. -/
@[to_additive "Special case of the sandwich theorem: if the norm of `f` is eventually bounded by a
real function `a` which tends to `0`, then `f` tends to `0`. In this pair of lemmas
(`squeeze_zero_norm'` and `squeeze_zero_norm`), following a convention of similar lemmas in
`Topology.MetricSpace.Pseudo.Defs` and `Topology.Algebra.Order`, the `'` version is phrased using
\"eventually\" and the non-`'` version is phrased absolutely."]
theorem squeeze_one_norm' {f : α → E} {a : α → ℝ} {t₀ : Filter α} (h : ∀ᶠ n in t₀, ‖f n‖ ≤ a n)
    (h' : Tendsto a t₀ (𝓝 0)) : Tendsto f t₀ (𝓝 1)

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
{f : α → E}
{a : α → ℝ}
{t₀ : Filter α}
(h : ∀ᶠ (n : α) in t₀, ‖f n‖ ≤ a n)
(h' : Filter.Tendsto a t₀ (𝓝 0))


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

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


theorem map_smul (x : S) (z : R) : map Q g hy (z • x : S) = g z • map Q g hy x

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{g : R →+* P}
{T : Submonoid P}
{Q : Type u_4}
[CommSemiring Q]
(hy : M ≤ Submonoid.comap g T)
[Algebra P Q]
[IsLocalization T Q]
(x : S)
(z : R)

(IsLocalization.map Q g hy) (z • x) = g z • (IsLocalization.map Q g hy) x


@[to_additive]
theorem zpow_smul_eq_iff_minimalPeriod_dvd {n : ℤ} :
    a ^ n • b = b ↔ (minimalPeriod (a • ·) b : ℤ) ∣ n

{α : Type v}
{G : Type u}
[AddGroup G]
[AddAction G α]
{a : G}
{b : α}
{n : ℤ}

n • a +ᵥ b = b ↔ ↑(Function.minimalPeriod (fun x => a +ᵥ x) b) ∣ n


theorem lowerCentralSeries_pi_le (n : ℕ) :
    lowerCentralSeries (∀ i, Gs i) n ≤ Subgroup.pi Set.univ
      fun i => lowerCentralSeries (Gs i) n

{η : Type u_2}
{Gs : η → Type u_3}
[(i : η) → Group (Gs i)]
(n : ℕ)

lowerCentralSeries ((i : η) → Gs i) n ≤ Subgroup.pi Set.univ fun i => lowerCentralSeries (Gs i) n


theorem mem_orthogonalGroup_iff {A : Matrix n n β} :
    A ∈ Matrix.orthogonalGroup n β ↔ A * star A = 1

(n : Type u)
[DecidableEq n]
[Fintype n]
(β : Type v)
[CommRing β]
{A : Matrix n n β}


@[simp]
theorem id_comp (f : EsakiaHom α β) : (EsakiaHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : EsakiaHom α β)


theorem thickenedIndicator.coeFn_eq_comp {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) :
    ⇑(thickenedIndicator δ_pos E) = ENNReal.toNNReal ∘ thickenedIndicatorAux δ E

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


@[simp]
theorem range_nnnorm : range (nnnorm : E → ℝ≥0) = univ

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[Nontrivial E]


theorem HasMFDerivAt.mul' (hp : HasMFDerivAt I 𝓘(𝕜, F') p z p')
    (hq : HasMFDerivAt I 𝓘(𝕜, F') q z q') :
    HasMFDerivAt I 𝓘(𝕜, F') (p * q) z (p z • q' + p'.smulRight (q z) : E →L[𝕜] F')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{z : M}
{F' : Type u_11}
[NormedRing F']
[NormedAlgebra 𝕜 F']
{p q : M → F'}
{p' q' : TangentSpace I z →L[𝕜] F'}
(hp : HasMFDerivAt I 𝓘(𝕜, F') p z p')
(hq : HasMFDerivAt I 𝓘(𝕜, F') q z q')

HasMFDerivAt I 𝓘(𝕜, F') (p * q) z (p z • q' + p'.smulRight (q z))


theorem of_finitePresentation {f : A →+* B} (hf : f.FinitePresentation) : f.FiniteType

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
{f : A →+* B}
(hf : f.FinitePresentation)


/-- Left multiplication by a nonzero element in a `GroupWithZero` is a permutation of the
underlying type. -/
@[simps! (config := .asFn)]
protected def mulLeft₀ (a : G) (ha : a ≠ 0) : Perm G

{G : Type u_1}
[GroupWithZero G]
(a : G)
(ha : a ≠ 0)

⇑(Equiv.symm (Equiv.mulLeft₀ a ha)) = fun x => a⁻¹ * x


/-- If `E / F` is a field extension of exponential characteristic `q`, if `{ u_i }` is a
family of separable elements of `E` which is `F`-linearly independent, then `{ u_i ^ (q ^ n) }`
is also `F`-linearly independent for any natural number `n`. -/
theorem LinearIndependent.map_pow_expChar_pow_of_isIntegral'
    (hsep : ∀ i : ι, IsSeparable F (v i))
    (h : LinearIndependent F v) : LinearIndependent F (v · ^ q ^ n)

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q n : ℕ)
[hF : ExpChar F q]
{ι : Type u_1}
{v : ι → E}
(hsep : ∀ (i : ι), IsSeparable F (v i))
(h : LinearIndependent F v)

LinearIndependent F fun x => v x ^ q ^ n


@[to_additive]
nonrec theorem Smooth.inv {f : M → G} (hf : Smooth I' I f) : Smooth I' I fun x => (f x)⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{f : M → G}
(hf : Smooth I' I f)


theorem iff_orderOf [hp : Fact p.Prime] : IsPGroup p G ↔ ∀ g : G, ∃ k : ℕ, orderOf g = p ^ k

{p : ℕ}
{G : Type u_1}
[Group G]
[hp : Fact (Nat.Prime p)]

IsPGroup p G ↔ ∀ (g : G), ∃ k, orderOf g = p ^ k


theorem valuation_lt_one_iff (a : A) : a ∈ LocalRing.maximalIdeal A ↔ A.valuation a < 1

{K : Type u}
[Field K]
(A : ValuationSubring K)
(a : ↥A)

a ∈ LocalRing.maximalIdeal ↥A ↔ A.valuation ↑a < 1


@[simp]
theorem mk0_val (u : G₀ˣ) (h : (u : G₀) ≠ 0) : mk0 (u : G₀) h = u

{G₀ : Type u_3}
[GroupWithZero G₀]
(u : G₀ˣ)
(h : ↑u ≠ 0)


theorem Valid'.merge_aux {l r o₁ o₂} (hl : Valid' o₁ l o₂) (hr : Valid' o₁ r o₂)
    (sep : l.All fun x => r.All fun y => x < y) :
    Valid' o₁ (@merge α l r) o₂ ∧ size (merge l r) = size l + size r

(sep : Ordnode.All (fun x => Ordnode.All (fun y => x < y) r) l)

Ordnode.Valid' o₁ (l.merge r) o₂ ∧ (l.merge r).size = l.size + r.size


@[simp]
theorem top_subpresheaf_obj (U) : (⊤ : Subpresheaf F).obj U = ⊤

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : Cᵒᵖ ⥤ Type w}
(U : Cᵒᵖ)


/-- In a quiver with involutive inverses, the star and costar at every vertex are equivalent.
This map is induced by `Quiver.reverse`. -/
@[simps]
def Quiver.starEquivCostar (u : U) : Quiver.Star u ≃ Quiver.Costar u

{U : Type u_1}
[Quiver U]
[Quiver.HasInvolutiveReverse U]
(u : U)
(e : Quiver.Costar u)

((Quiver.starEquivCostar u).symm e).snd = Quiver.reverse e.snd


theorem optionToList : Primrec (Option.toList : Option α → List α)


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

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


theorem OrderEmbedding.image_Ici (e : α ↪o β) (he : IsUpperSet (range e)) (a : α) :
    e '' Ici a = Ici (e a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(he : IsUpperSet (Set.range ⇑e))
(a : α)


theorem exists_null_frontiers_thickening (μ : Measure Ω) [SFinite μ] (s : Set Ω) :
    ∃ rs : ℕ → ℝ,
      Tendsto rs atTop (𝓝 0) ∧ ∀ n, 0 < rs n ∧ μ (frontier (Metric.thickening (rs n) s)) = 0

{Ω : Type u_1}
[PseudoEMetricSpace Ω]
[MeasurableSpace Ω]
[OpensMeasurableSpace Ω]
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.SFinite μ]
(s : Set Ω)

∃ rs, Filter.Tendsto rs Filter.atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ μ (frontier (Metric.thickening (rs n) s)) = 0


@[simp] lemma mem_Ici : x ∈ Ici a ↔ a ≤ x

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


theorem isFiniteMeasure_withDensity {f : α → ℝ≥0∞} (hf : ∫⁻ a, f a ∂μ ≠ ∞) :
    IsFiniteMeasure (μ.withDensity f)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : ∫⁻ (a : α), f a ∂μ ≠ ⊤)


lemma negOnePow_succ (n : ℤ) : (n + 1).negOnePow = - n.negOnePow


@[simp]
theorem mul_add_mod_self (x y z : Ordinal) : (x * y + z) % x = z % x


@[simp] theorem preimage_Iio : e ⁻¹' Iio (e x) = Iio x

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(x : α)


theorem IsMinOn.hasLineDerivWithinAt_eq_zero (h : IsMinOn f s a)
    (hd : HasLineDerivWithinAt ℝ f f' s a b) (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : f' = 0


@[to_additive]
theorem coeFn_inv (f : α →ₘ[μ] γ) : ⇑f⁻¹ =ᵐ[μ] f⁻¹

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[AddGroup γ]
[TopologicalAddGroup γ]
(f : α →ₘ[μ] γ)


/--
The identity monad morphism induces the identity functor from the category of algebras to itself.
-/
-- Porting note: `semireducible -> default`
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomId {T₁ : Monad C} : algebraFunctorOfMonadHom (𝟙 T₁) ≅ 𝟭 _

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

(CategoryTheory.Monad.algebraFunctorOfMonadHomId.inv.app X).f =
  (CategoryTheory.Iso.refl
      ((CategoryTheory.Monad.algebraFunctorOfMonadHom (CategoryTheory.CategoryStruct.id T₁)).obj X).A).inv


theorem expand_WF [BEq α] [Hashable α] {buckets : Buckets α β} (H : buckets.WF) :
    (expand sz buckets).buckets.WF

{source : Array (Batteries.AssocList α β)}

(hs₁ :
  ∀ [inst : Batteries.HashMap.LawfulHashable α] [inst : PartialEquivBEq α] (bucket : Batteries.AssocList α β),
    bucket ∈ source.data → List.Pairwise (fun a b => ¬(a.fst == b.fst) = true) bucket.toList)

(hs₂ :
  ∀ (j : Nat) (h : j < source.size),
    Batteries.AssocList.All (fun k x => ((hash k).toUSize % source.size).toNat = j) source[j])

{target : Batteries.HashMap.Imp.Buckets α β}

(ht :
  target.WF ∧
    ∀ (bucket : Batteries.AssocList α β),
      bucket ∈ target.val.data → Batteries.AssocList.All (fun k x => ((hash k).toUSize % source.size).toNat < i) bucket)

(Batteries.HashMap.Imp.expand.go i source target).WF


theorem pellZd_add (m) : ∀ n, pellZd a1 (m + n) = pellZd a1 m * pellZd a1 n

Pell.pellZd a1 (m + n) = Pell.pellZd a1 m * Pell.pellZd a1 n


theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
    Submartingale (c • f) ℱ μ

(hf : MeasureTheory.Submartingale f ℱ μ)


@[to_additive]
theorem subsingleton_of_subsingleton [Subsingleton (Subsemigroup M)] : Subsingleton M

{M : Type u_1}
[Add M]
[Subsingleton (AddSubsemigroup M)]


theorem iterateFrobenius_add_apply :
    iterateFrobenius R p (m + n) x = iterateFrobenius R p m (iterateFrobenius R p n x)

(R : Type u)
[CommSemiring R]
(p m n : ℕ)
[ExpChar R p]
(x : R)

(iterateFrobenius R p (m + n)) x = (iterateFrobenius R p m) ((iterateFrobenius R p n) x)


@[to_additive]
theorem mul_univ_of_one_mem [Fintype α] (hs : (1 : α) ∈ s) : s * univ = univ

{α : Type u_2}
[DecidableEq α]
[AddMonoid α]
{s : Finset α}
[Fintype α]
(hs : 0 ∈ s)


theorem castPred_zero' [NeZero n] (h := Fin.ext_iff.not.2 last_pos'.ne) :
    castPred (0 : Fin (n + 1)) h = 0

{n : ℕ}
[NeZero n]
(h : ¬0 = Fin.last n := ⋯)


@[to_additive add_conv]
theorem add_mconv [MeasurableMul₂ M] (μ : Measure M) (ν : Measure M) (ρ : Measure M) [SFinite μ]
    [SFinite ν] [SFinite ρ] : (μ + ν) ∗ ρ = μ ∗ ρ + ν ∗ ρ

{M : Type u_1}
[AddMonoid M]
[MeasurableSpace M]
[MeasurableAdd₂ M]
(μ ν ρ : MeasureTheory.Measure M)
[MeasureTheory.SFinite μ]
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite ρ]


/-- An irreducible real polynomial has natural degree at most two. -/
lemma Irreducible.natDegree_le_two {p : ℝ[X]} (hp : Irreducible p) : natDegree p ≤ 2


protected theorem injective (e : M₁ ≃SL[σ₁₂] M₂) : Function.Injective e

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)


lemma divNat_inj (h₁ : d₁ ≠ 0) (h₂ : d₂ ≠ 0) : divNat n₁ d₁ = divNat n₂ d₂ ↔ n₁ * d₂ = n₂ * d₁

{n₁ n₂ d₁ d₂ : ℕ}
(h₁ : d₁ ≠ 0)
(h₂ : d₂ ≠ 0)

NNRat.divNat n₁ d₁ = NNRat.divNat n₂ d₂ ↔ n₁ * d₂ = n₂ * d₁


@[simp]
theorem bind_def {α β} : (· >>= ·) = @bind α β

(fun x x_1 => x >>= x_1) = Multiset.bind


/-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
`spectralRadius` of `a` is the limit of the sequence `‖a ^ n‖₊ ^ (1 / n)`. -/
theorem pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
    Tendsto (fun n : ℕ => (‖a ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ)) atTop (𝓝 (spectralRadius ℂ a))

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

Filter.Tendsto (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) Filter.atTop (nhds (spectralRadius ℂ a))


theorem _root_.RCLike.re_eq_complex_re : ⇑(RCLike.re : ℂ →+ ℝ) = Complex.re


@[simp high]
theorem coe_symm_comp_coe (e : M₁ ≃SL[σ₁₂] M₂) :
    (e.symm : M₂ →SL[σ₂₁] M₁).comp (e : M₁ →SL[σ₁₂] M₂) = ContinuousLinearMap.id R₁ M₁

(↑e.symm).comp ↑e = ContinuousLinearMap.id R₁ M₁


theorem productMap_right_apply (b : B) :
    productMap f g (1 ⊗ₜ b) = g b

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[CommSemiring S]
[Algebra R A]
[Algebra R B]
[Algebra R S]
(f : A →ₐ[R] S)
(g : B →ₐ[R] S)
(b : B)

(Algebra.TensorProduct.productMap f g) (1 ⊗ₜ[R] b) = g b


@[simp]
theorem length_nonneg : 0 ≤ s.length

{α : Type u_2}
[OrderedAddCommGroup α]
(s : NonemptyInterval α)


@[simp]
theorem coeff_one (n : ℕ) : coeff R n (1 : R⟦X⟧) = if n = 0 then 1 else 0

(PowerSeries.coeff R n) 1 = if n = 0 then 1 else 0


theorem ne_infty_iff_exists {x : OnePoint X} : x ≠ ∞ ↔ ∃ y : X, (y : OnePoint X) = x


protected theorem compl_sup (s t : LowerSet α) : (s ⊔ t).compl = s.compl ⊔ t.compl

{α : Type u_1}
[LE α]
(s t : LowerSet α)


/-- Sends a topological space to its specialisation order. -/
@[simps]
def alexDiscEquivPreord : AlexDisc ≌ Preord

alexDiscEquivPreord.functor = CategoryTheory.forget₂ AlexDisc TopCat ⋙ topToPreord