private theorem pairwise_replaceF [BEq α] [PartialEquivBEq α]
    {l : List (α × β)} {f : α × β → β}
    (H : l.Pairwise fun a b => ¬(a.fst == b.fst)) :
    (l.replaceF fun a => bif a.fst == k then some (k, f a) else none)
      |>.Pairwise fun a b => ¬(a.fst == b.fst)

{f : α × β → β}

(H : List.Pairwise (fun a b => ¬(a.fst == b.fst) = true) l)

List.Pairwise (fun a b => ¬(a.fst == b.fst) = true)
  (List.replaceF (fun a => bif a.fst == k then some (k, f a) else none) l)


/-- Any nonnegative solution is a power with nonnegative exponent of a fundamental solution. -/
theorem eq_pow_of_nonneg {a₁ : Solution₁ d} (h : IsFundamental a₁) {a : Solution₁ d} (hax : 0 < a.x)
    (hay : 0 ≤ a.y) : ∃ n : ℕ, a = a₁ ^ n

{d : ℤ}
{a₁ : Pell.Solution₁ d}
(h : Pell.IsFundamental a₁)
{a : Pell.Solution₁ d}
(hax : 0 < a.x)
(hay : 0 ≤ a.y)


theorem IsLittleO.of_pow {f : α → 𝕜} {g : α → R} {n : ℕ} (h : (f ^ n) =o[l] (g ^ n)) (hn : n ≠ 0) :
    f =o[l] g

{α : Type u_1}
{R : Type u_13}
{𝕜 : Type u_15}
[SeminormedRing R]
[NormedDivisionRing 𝕜]
{l : Filter α}
{f : α → 𝕜}
{g : α → R}
{n : ℕ}
(h : (f ^ n) =o[l] (g ^ n))
(hn : n ≠ 0)


theorem Discrete.essentiallySmallOfSmall {α : Type u} [Small.{w} α] :
    EssentiallySmall.{w} (Discrete α)

CategoryTheory.EssentiallySmall.{w, u, u} (CategoryTheory.Discrete α)


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


@[to_additive (attr := simp)]
theorem toTopologicalSpace_iInf {ι} (s : ι → GroupTopology α) :
    (⨅ i, s i).toTopologicalSpace = ⨅ i, (s i).toTopologicalSpace

{α : Type u}
[Group α]
{ι : Sort u_1}
(s : ι → GroupTopology α)


@[simp]
theorem quot_sub (a b : PGame) : ⟦a - b⟧ = (⟦a⟧ : Game) - ⟦b⟧


@[simp]
theorem toPushforwardOfIso_app {X Y : TopCat} (H₁ : X ≅ Y) {ℱ : X.Presheaf C} {𝒢 : Y.Presheaf C}
    (H₂ : H₁.hom _* ℱ ⟶ 𝒢) (U : (Opens X)ᵒᵖ) :
    (toPushforwardOfIso H₁ H₂).app U =
      ℱ.map (eqToHom (by simp [Opens.map, Set.preimage_preimage])) ≫
        H₂.app (op ((Opens.map H₁.inv).obj (unop U)))

(H₂ : (TopCat.Presheaf.pushforward C H₁.hom).obj ℱ ⟶ 𝒢)

(TopCat.Presheaf.toPushforwardOfIso H₁ H₂).app U =
  ℱ.map (CategoryTheory.eqToHom ⋯) ≫ H₂.app (Opposite.op ((TopologicalSpace.Opens.map H₁.inv).obj (Opposite.unop U)))


@[simp]
theorem toEquiv_comp {X Y Z : Type u} (f : X ≅ Y) (g : Y ≅ Z) :
    (f ≪≫ g).toEquiv = f.toEquiv.trans g.toEquiv


@[simp]
theorem image.isImage_lift (F : MonoFactorisation f) : (Image.isImage f).lift F = image.lift F

(F : CategoryTheory.Limits.MonoFactorisation f)

(CategoryTheory.Limits.Image.isImage f).lift F = CategoryTheory.Limits.image.lift F


theorem subsingleton_iff_singleton {x} (hx : x ∈ s) : s.Subsingleton ↔ s = {x}

{α : Type u}
{s : Set α}
{x : α}
(hx : x ∈ s)


@[to_additive]
theorem ker_eq_bot_iff (f : G →* M) : f.ker = ⊥ ↔ Function.Injective f

{G : Type u_1}
[Group G]
{M : Type u_7}
[MulOneClass M]
(f : G →* M)


theorem differentiableAt_jacobiTheta {τ : ℂ} (hτ : 0 < im τ) :
    DifferentiableAt ℂ jacobiTheta τ


@[reassoc]
theorem δ_comp_σ_succ' {n} (j : Fin (n + 2)) (i : Fin (n + 1)) (H : j = i.succ) :
    δ j ≫ σ i = 𝟙 ([n] : SimplexCategory)

SimplexCategory.δ j ≫ SimplexCategory.σ i = 𝟙 (SimplexCategory.mk n)


theorem lt_of_mul_lt_mul_right {a b c : Int} (w : b * a < c * a) (h : 0 ≤ a) : b < c


theorem continuous_circleMap_inv {R : ℝ} {z w : ℂ} (hw : w ∈ ball z R) :
    Continuous fun θ => (circleMap z R θ - w)⁻¹

{R : ℝ}
{z w : ℂ}
(hw : w ∈ Metric.ball z R)


theorem finrank_range_le_card {ι : Type*} [Fintype ι] (b : ι → M) :
    (Set.range b).finrank R ≤ Fintype.card ι

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{ι : Type u_2}
[Fintype ι]
(b : ι → M)

Set.finrank R (Set.range b) ≤ Fintype.card ι


@[fun_prop]
theorem hasFDerivAt_single {i : ι} (y : E i) :
    HasFDerivAt (Pi.single i) (.pi (Pi.single i (.id 𝕜 (E i)))) y

{𝕜 : Type u_1}
{ι : Type u_2}
[DecidableEq ι]
[Fintype ι]
[NontriviallyNormedField 𝕜]
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
{i : ι}
(y : E i)

HasFDerivAt (Pi.single i) (ContinuousLinearMap.pi (Pi.single i (ContinuousLinearMap.id 𝕜 (E i)))) y


lemma isOpen_iff_forall_specializes : IsOpen s ↔ ∀ x y, x ⤳ y → y ∈ s → x ∈ s

{α : Type u_3}
[TopologicalSpace α]
{s : Set α}
[AlexandrovDiscrete α]

IsOpen s ↔ ∀ (x y : α), x ⤳ y → y ∈ s → x ∈ s


/-- If `F ≤ E` are two intermediate fields of `L / K` such that `[L : F] = [L : E]` are finite,
then `F = E`. -/
theorem eq_of_le_of_finrank_eq' [FiniteDimensional F L] (h_le : F ≤ E)
    (h_finrank : finrank F L = finrank E L) : F = E

(h_finrank : FiniteDimensional.finrank (↥F) L = FiniteDimensional.finrank (↥E) L)


theorem map_extChartAt_nhdsWithin (x : M) :
    map (extChartAt I x) (𝓝[s] x) = 𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] extChartAt I x x

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

Filter.map (↑(extChartAt I x)) (𝓝[s] x) = 𝓝[↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I] ↑(extChartAt I x) x


theorem erase_cons_of_ne {a b : α} {s : Finset α} (ha : a ∉ s) (hb : a ≠ b) :
    erase (cons a s ha) b = cons a (erase s b) fun h => ha <| erase_subset _ _ h

{α : Type u_1}
[DecidableEq α]
{a b : α}
{s : Finset α}
(ha : a ∉ s)
(hb : a ≠ b)

(Finset.cons a s ha).erase b = Finset.cons a (s.erase b) ⋯


theorem ratio_pos [DilationClass F α β] (f : F) : 0 < ratio f

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)


@[to_additive exists_pos_norm_le]
lemma Bornology.IsBounded.exists_pos_norm_le' (hs : IsBounded s) : ∃ R > 0, ∀ x ∈ s, ‖x‖ ≤ R

{E : Type u_3}
[SeminormedGroup E]
{s : Set E}
(hs : Bornology.IsBounded s)


@[simp]
theorem symm_dual_id : InfHom.dual.symm (SupHom.id _) = InfHom.id α

InfHom.dual.symm (SupHom.id αᵒᵈ) = InfHom.id α


theorem epi_iff_surjective_of_preservesPushout {X Y : C} (f : X ⟶ Y)
    [PreservesColimitsOfShape WalkingSpan (forget C)] : Epi f ↔ Function.Surjective f

[CategoryTheory.Limits.PreservesColimitsOfShape CategoryTheory.Limits.WalkingSpan (CategoryTheory.forget C)]

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


/-- A function `f : 𝕜 → 𝕜` is concave iff for any three points `x < y < z` the slope of the secant
line of `f` on `[x, y]` is greater than the slope of the secant line of `f` on `[y, z]`. -/
theorem concaveOn_iff_slope_anti_adjacent :
    ConcaveOn 𝕜 s f ↔
      Convex 𝕜 s ∧
        ∀ ⦃x y z : 𝕜⦄,
          x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}


@[to_additive (attr := simp)]
theorem coe_trans (e₁ : M ≃* N) (e₂ : N ≃* P) : ↑(e₁.trans e₂) = e₂ ∘ e₁

{M : Type u_6}
{N : Type u_7}
{P : Type u_8}
[Add M]
[Add N]
[Add P]
(e₁ : M ≃+ N)
(e₂ : N ≃+ P)


/-- A set is a neighborhood of `a` within `[a, +∞)` if and only if it contains an interval `[a, u]`
with `a < u`. -/
theorem mem_nhdsWithin_Ici_iff_exists_Icc_subset [NoMaxOrder α] [DenselyOrdered α] {a : α}
    {s : Set α} : s ∈ 𝓝[≥] a ↔ ∃ u, a < u ∧ Icc a u ⊆ s

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMaxOrder α]
[DenselyOrdered α]
{a : α}
{s : Set α}

s ∈ 𝓝[≥] a ↔ ∃ u, a < u ∧ Set.Icc a u ⊆ s


theorem image_symm (h : α ≃ᵢ β) : image h.symm = preimage h

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)


/-- Any map `f` sends fixed points of `g ∘ f` to fixed points of `f ∘ g`. -/
theorem mapsTo_fixedPoints_comp (f : α → β) (g : β → α) :
    Set.MapsTo f (fixedPoints <| g ∘ f) (fixedPoints <| f ∘ g)

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

Set.MapsTo f (Function.fixedPoints (g ∘ f)) (Function.fixedPoints (f ∘ g))


protected theorem isUnit {I : FractionalIdeal A⁰ K} (hI : I ≠ 0) : IsUnit I

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[IsDomain A]
[Algebra A K]
[IsFractionRing A K]
(h : IsDedekindDomainInv A)
{I : FractionalIdeal A⁰ K}
(hI : I ≠ 0)


theorem or_left_comm : ∀ (x y z : Bool), (x || (y || z)) = (y || (x || z))


theorem rpow_add' (hx : 0 ≤ x) (h : y + z ≠ 0) : x ^ (y + z) = x ^ y * x ^ z

{x y z : ℝ}
(hx : 0 ≤ x)
(h : y + z ≠ 0)


lemma of_ladder_addEquiv_of_exact' (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
    (comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) (H : Exact g₁₂ g₂₃) : Exact f₁₂ f₂₃

(comm₁₂ : g₁₂.comp ↑e₁ = (↑e₂).comp f₁₂)

(comm₂₃ : g₂₃.comp ↑e₂ = (↑e₃).comp f₂₃)


@[simp]
theorem sub_rat_iff : LiouvilleWith p (x - r) ↔ LiouvilleWith p x

LiouvilleWith p (x - ↑r) ↔ LiouvilleWith p x


@[simp] -- Porting note: add norm_cast; we leave it out for now to reproduce mathlib3 behavior.
theorem coe_add (K L : ConvexBody V) : (↑(K + L) : Set V) = (K : Set V) + L

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
[ContinuousAdd V]
(K L : ConvexBody V)


theorem comap_supr {ι : Sort*} (f : P₁ →ᵃ[k] P₂) (s : ι → AffineSubspace k P₂) :
    (iInf s).comap f = ⨅ i, (s i).comap f

{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₂]
{ι : Sort u_8}
(f : P₁ →ᵃ[k] P₂)
(s : ι → AffineSubspace k P₂)

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


theorem neg_v_mul_e0 (m : M) : -(v Q m * e0 Q) = e0 Q * v Q m

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

-((CliffordAlgebra.EquivEven.v Q) m * CliffordAlgebra.EquivEven.e0 Q) =
  CliffordAlgebra.EquivEven.e0 Q * (CliffordAlgebra.EquivEven.v Q) m


@[simp]
theorem coe_restrictScalars' (f : M →L[A] M₂) : ⇑(f.restrictScalars R) = f

{A : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring A]
[AddCommGroup M]
[AddCommGroup M₂]
[Module A M]
[Module A M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{R : Type u_4}
[Ring R]
[Module R M]
[Module R M₂]
[LinearMap.CompatibleSMul M M₂ R A]
(f : M →L[A] M₂)

⇑(ContinuousLinearMap.restrictScalars R f) = ⇑f


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

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

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


theorem range_zpowersHom (g : G) : (zpowersHom G g).range = zpowers g

((zpowersHom G) g).range = Subgroup.zpowers g


@[simp]
lemma toBlocks₁₂_diagonal (v : l ⊕ m → α) : toBlocks₁₂ (diagonal v) = 0

{l : Type u_1}
{m : Type u_2}
{α : Type u_12}
[DecidableEq l]
[DecidableEq m]
[Zero α]
(v : l ⊕ m → α)


nonrec theorem extend_apply' {f : α ↪ δ} {x : δ} (hx : x ∉ range f) (g : α →ᵇ β) (h : δ →ᵇ β) :
    extend f g h x = h x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{δ : Type u_2}
[TopologicalSpace δ]
[DiscreteTopology δ]
{f : α ↪ δ}
{x : δ}
(hx : x ∉ Set.range ⇑f)
(g : BoundedContinuousFunction α β)
(h : BoundedContinuousFunction δ β)

(BoundedContinuousFunction.extend f g h) x = h x


@[simp]
theorem mapPath_comp {a b : V} (p : Path a b) :
    ∀ {c : V} (q : Path b c), F.mapPath (p.comp q) = (F.mapPath p).comp (F.mapPath q)

{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
{a b : V}
(p : Quiver.Path a b)
{c : V}
(q : Quiver.Path b c)


@[to_additive (attr := simp)]
theorem pow_period_add_smul (n : ℕ) (m : M) (a : α) :
    m ^ (period m a + n) • a = m ^ n • a

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
(n : ℕ)
(m : M)
(a : α)

m ^ (MulAction.period m a + n) • a = m ^ n • a


theorem mul_self_eq_mul_self_iff [NonUnitalNonAssocRing R] [NoZeroDivisors R] {a b : R}
    (h : Commute a b) : a * a = b * b ↔ a = b ∨ a = -b

{R : Type x}
[NonUnitalNonAssocRing R]
[NoZeroDivisors R]
{a b : R}
(h : Commute a b)


lemma min_neg_neg (x y : EReal) : min (-x) (-y) = -max x y


lemma exists_monotone_Icc_subset_open_cover_unitInterval_prod_self {ι} {c : ι → Set (I × I)}
    (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : univ ⊆ ⋃ i, c i) :
    ∃ t : ℕ → I, t 0 = 0 ∧ Monotone t ∧ (∃ n, ∀ m ≥ n, t m = 1) ∧
      ∀ n m, ∃ i, Icc (t n) (t (n + 1)) ×ˢ Icc (t m) (t (m + 1)) ⊆ c i

{c : ι → Set (↑unitInterval × ↑unitInterval)}

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


@[simp, mfld_simps]
theorem toEquiv_coe_symm (h : M ≃ₘ^n⟮I, J⟯ N) : ⇑h.toEquiv.symm = h.symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{G : Type u_7}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, J⟯ N)


@[to_additive (attr := simp)]
theorem mk_mul_mk (f g : α → γ) (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    (mk f hf : α →ₘ[μ] γ) * mk g hg = mk (f * g) (hf.mul hg)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEEqFun.mk f hf + MeasureTheory.AEEqFun.mk g hg = MeasureTheory.AEEqFun.mk (f + g) ⋯


theorem Antiperiodic.even_zsmul_periodic [AddGroup α] [InvolutiveNeg β] (h : Antiperiodic f c)
    (n : ℤ) : Periodic f ((2 * n) • c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddGroup α]
[InvolutiveNeg β]
(h : Function.Antiperiodic f c)
(n : ℤ)


theorem sup_sdiff_left (s : Finset ι) (f : ι → α) (a : α) :
    (s.sup fun b => a \ f b) = a \ s.inf f

{α : Type u_2}
{ι : Type u_5}
[BooleanAlgebra α]
(s : Finset ι)
(f : ι → α)
(a : α)


@[simp]
theorem norm_smulRightL (c : E →L[𝕜] 𝕜) [Nontrivial Fₗ] : ‖smulRightL 𝕜 E Fₗ c‖ = ‖c‖

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
(c : E →L[𝕜] 𝕜)
[Nontrivial Fₗ]

‖(ContinuousLinearMap.smulRightL 𝕜 E Fₗ) c‖ = ‖c‖


@[to_additive HasSum.prod_mk]
theorem HasProd.prod_mk {f : β → α} {g : β → γ} {a : α} {b : γ}
    (hf : HasProd f a) (hg : HasProd g b) : HasProd (fun x ↦ (⟨f x, g x⟩ : α × γ)) ⟨a, b⟩

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
[CommMonoid γ]
[TopologicalSpace γ]
{f : β → α}
{g : β → γ}
{a : α}
{b : γ}
(hf : HasProd f a)
(hg : HasProd g b)


@[simp]
theorem lift_inj {a b : Ordinal} : lift.{u,v} a = lift.{u,v} b ↔ a = b

Ordinal.lift.{u, v} a = Ordinal.lift.{u, v} b ↔ a = b


theorem cycleFactorsFinset_eq_list_toFinset {σ : Perm α} {l : List (Perm α)} (hn : l.Nodup) :
    σ.cycleFactorsFinset = l.toFinset ↔
      (∀ f : Perm α, f ∈ l → f.IsCycle) ∧ l.Pairwise Disjoint ∧ l.prod = σ

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{σ : Equiv.Perm α}
{l : List (Equiv.Perm α)}
(hn : l.Nodup)

σ.cycleFactorsFinset = l.toFinset ↔ (∀ f ∈ l, f.IsCycle) ∧ List.Pairwise Equiv.Perm.Disjoint l ∧ l.prod = σ


@[simp]
theorem smul_val (n x y : ℤ) : (n : ℤ√d) * ⟨x, y⟩ = ⟨n * x, n * y⟩


@[simp] theorem toList_eq (arr : Array α) : arr.toList = arr.data


/-- The diagram sending each pointed Galois object to its automorphism group
as an object of `C`. -/
@[simps]
noncomputable def autGaloisSystem : PointedGaloisObject F ⥤ Grp.{u₂}

(F : CategoryTheory.Functor C FintypeCat)

(A : CategoryTheory.PreGaloisCategory.PointedGaloisObject F)

(CategoryTheory.PreGaloisCategory.autGaloisSystem F).obj A = Grp.of (CategoryTheory.Aut A.obj)


lemma eq_one_or_neg_one_of_mul_eq_neg_one (h : u * v = -1) : u = 1 ∨ u = -1


@[simp]
theorem coe_zeta_mul_moebius : (ζ * μ : ArithmeticFunction ℤ) = 1

↑ArithmeticFunction.zeta * ArithmeticFunction.moebius = 1


@[to_additive]
protected theorem conj (comm : Commute a b) (h : G) : Commute (h * a * h⁻¹) (h * b * h⁻¹)

{G : Type u_1}
[Group G]
{a b : G}
(comm : Commute a b)
(h : G)


theorem appr_mono (x : ℤ_[p]) : Monotone x.appr

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


theorem toOuterMeasure_apply_eq_zero_iff : p.toOuterMeasure s = 0 ↔ Disjoint p.support s


@[simp, norm_cast]
theorem coe_neg (x : R) : (↑(-x) : c.Quotient) = -x

{R : Type u_2}
[AddGroup R]
[Mul R]
(c : RingCon R)
(x : R)


theorem basisAux_map_smul (a : A) (x : A ⊗[R] M) : basisAux A b (a • x) = a • basisAux A b x

{R : Type uR}
{A : Type uA}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(a : A)
(x : A ⊗[R] M)

(Algebra.TensorProduct.basisAux A b) (a • x) = a • (Algebra.TensorProduct.basisAux A b) x


@[simp]
theorem toIocMod_zsmul_add' (a b : α) (m : ℤ) :
    toIocMod hp (m • p + a) b = m • p + toIocMod hp a b

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


/-- The homotopy between morphisms in `ShortComplex C` that is induced by a homotopy
between morphisms in `ShortComplex Cᵒᵖ`. -/
@[simps]
def unop {S₁ S₂ : ShortComplex Cᵒᵖ} {φ₁ φ₂ : S₁ ⟶ S₂}  (h : Homotopy φ₁ φ₂) :
    Homotopy (unopMap φ₁) (unopMap φ₂)

{S₁ S₂ : CategoryTheory.ShortComplex Cᵒᵖ}

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)


theorem mk'_pow (x : R) (y : M) (n : ℕ) : mk' S (x ^ n) (y ^ n) = mk' S x y ^ n

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

IsLocalization.mk' S (x ^ n) (y ^ n) = IsLocalization.mk' S x y ^ n


theorem memℒp_comp_iff_of_antilipschitz {α E F} {K K'} [MeasurableSpace α] {μ : Measure α}
    [NormedAddCommGroup E] [NormedAddCommGroup F] {f : α → E} {g : E → F} (hg : LipschitzWith K g)
    (hg' : AntilipschitzWith K' g) (g0 : g 0 = 0) : Memℒp (g ∘ f) p μ ↔ Memℒp f p μ

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

MeasureTheory.Memℒp (g ∘ f) p μ ↔ MeasureTheory.Memℒp f p μ


theorem toBaseChange_comp_ofBaseChange (Q : QuadraticForm R V) :
    (toBaseChange A Q).comp (ofBaseChange A Q) = AlgHom.id _ _

{R : Type u_1}
(A : Type u_2)
{V : Type u_3}
[CommRing R]
[CommRing A]
[AddCommGroup V]
[Algebra R A]
[Module R V]
[Invertible 2]
(Q : QuadraticForm R V)

(CliffordAlgebra.toBaseChange A Q).comp (CliffordAlgebra.ofBaseChange A Q) = AlgHom.id A (A ⊗[R] CliffordAlgebra Q)


theorem map_isoCongr {X Y X₁ Y₁ : C} (α : X ≅ X₁) (β : Y ≅ Y₁) (f : X ≅ Y) :
    F.mapIso (Iso.isoCongr α β f) = Iso.isoCongr (F.mapIso α) (F.mapIso β) (F.mapIso f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(F : CategoryTheory.Functor C D)
{X Y X₁ Y₁ : C}
(α : X ≅ X₁)
(β : Y ≅ Y₁)
(f : X ≅ Y)

F.mapIso ((α.isoCongr β) f) = ((F.mapIso α).isoCongr (F.mapIso β)) (F.mapIso f)


@[simp]
protected theorem compl_top : (⊤ : UpperSet α).compl = ⊤


@[to_additive (attr := simp)]
theorem N_one (B : GroupFilterBasis G) : B.N 1 = B.toFilterBasis.filter

{G : Type u}
[AddGroup G]
(B : AddGroupFilterBasis G)

B.N 0 = AddGroupFilterBasis.toFilterBasis.filter


lemma map (hφ : φ.IsHomogeneous n) (f : R →+* S) : (map f φ).IsHomogeneous n

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

((MvPolynomial.map f) φ).IsHomogeneous n


/-- If `F₁` and `F₂` are functors `W.Localization ⥤ D`, a natural transformation `F₁ ⟶ F₂`
can be obtained from a natural transformation `W.Q ⋙ F₁ ⟶ W.Q ⋙ F₂`. -/
@[simps]
def natTransExtension {F₁ F₂ : W.Localization ⥤ D} (τ : W.Q ⋙ F₁ ⟶ W.Q ⋙ F₂) : F₁ ⟶ F₂

{F₁ F₂ : CategoryTheory.Functor W.Localization D}

(CategoryTheory.Localization.Construction.natTransExtension τ).app X =
  CategoryTheory.Localization.Construction.NatTransExtension.app τ X


/-- The equivalence `Karoubi C ≌ Karoubi (Karoubi C)` -/
@[simps]
def equivalence : Karoubi C ≌ Karoubi (Karoubi C)

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

(CategoryTheory.Idempotents.KaroubiKaroubi.equivalence C).functor =
  CategoryTheory.Idempotents.toKaroubi (CategoryTheory.Idempotents.Karoubi C)


theorem eq_strictMono_iff_eq_range (h : WellFounded ((· < ·) : β → β → Prop)) {f g : β → γ}
    (hf : StrictMono f) (hg : StrictMono g) :
    Set.range f = Set.range g ↔ f = g

{β : Type u_2}
{γ : Type u_3}
[LinearOrder β]
[PartialOrder γ]
(h : WellFounded fun x x_1 => x < x_1)
{f g : β → γ}
(hf : StrictMono f)
(hg : StrictMono g)


theorem isIso_of_mono_of_epi [Balanced C] {X Y : C} (f : X ⟶ Y) [Mono f] [Epi f] : IsIso f

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


theorem ofNat_pos {a : Nat} : 0 < (a : Int) ↔ 0 < a


/-- The restriction of a reflexive, non-degenerate bilinear form on the orthogonal complement of
the span of a singleton is also non-degenerate. -/
theorem restrict_nondegenerate_orthogonal_spanSingleton (B : BilinForm K V) (b₁ : B.Nondegenerate)
    (b₂ : B.IsRefl) {x : V} (hx : ¬B.IsOrtho x x) :
    Nondegenerate <| B.restrict <| B.orthogonal (K ∙ x)

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
(B : LinearMap.BilinForm K V)
(b₁ : B.Nondegenerate)
(b₂ : B.IsRefl)
{x : V}
(hx : ¬B.IsOrtho x x)

(B.restrict (B.orthogonal (Submodule.span K {x}))).Nondegenerate


/-- A Lie module is a module over a commutative ring, together with a linear action of a Lie
algebra on this module, such that the Lie bracket acts as the commutator of endomorphisms. -/
class LieModule (R : Type u) (L : Type v) (M : Type w) [CommRing R] [LieRing L] [LieAlgebra R L]
  [AddCommGroup M] [Module R M] [LieRingModule L M] : Prop where
  /-- A Lie module bracket is compatible with scalar multiplication in its first argument. -/
  protected smul_lie : ∀ (t : R) (x : L) (m : M), ⁅t • x, m⁆ = t • ⁅x, m⁆
  /-- A Lie module bracket is compatible with scalar multiplication in its second argument. -/
  protected lie_smul : ∀ (t : R) (x : L) (m : M), ⁅x, t • m⁆ = t • ⁅x, m⁆

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[self : LieModule R L M]
(t : R)
(x : L)
(m : M)


@[fun_prop]
theorem HasFDerivAt.comp_hasFDerivWithinAt {g : F → G} {g' : F →L[𝕜] G}
    (hg : HasFDerivAt g g' (f x)) (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (g ∘ f) (g'.comp f') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{f' : E →L[𝕜] F}
(x : E)
{s : Set E}
{g : F → G}
{g' : F →L[𝕜] G}
(hg : HasFDerivAt g g' (f x))
(hf : HasFDerivWithinAt f f' s x)


theorem isZero_of_subsingleton (M : ModuleCat R) [Subsingleton M] : IsZero M

{R : Type u}
[Ring R]
(M : ModuleCat R)
[Subsingleton ↑M]


@[simp]
theorem subset_toFinset {s : Finset α} [Fintype t] : s ⊆ t.toFinset ↔ ↑s ⊆ t

{α : Type u_1}
{t : Set α}
{s : Finset α}
[Fintype ↑t]


@[simp]
theorem upperClosure_union (s t : Set α) : upperClosure (s ∪ t) = upperClosure s ⊓ upperClosure t

{α : Type u_1}
[Preorder α]
(s t : Set α)


@[simp]
theorem continuousWithinAt_diff_self {f : α → β} {s : Set α} {x : α} :
    ContinuousWithinAt f (s \ {x}) x ↔ ContinuousWithinAt f s x

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


theorem IsSeparatedFor.ext {R : Presieve X} (hR : IsSeparatedFor P R) {t₁ t₂ : P.obj (op X)}
    (h : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (_ : R f), P.map f.op t₁ = P.map f.op t₂) : t₁ = t₂

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

(hR : CategoryTheory.Presieve.IsSeparatedFor P R)

(h : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, R f → P.map f.op t₁ = P.map f.op t₂)


theorem coreprW_app_hom (X : C) (f : F.coreprX ⟶ X) :
    (F.coreprW.app X).hom f = F.map f F.coreprx

(F : CategoryTheory.Functor C (Type v₁))


theorem isColimit_rep_eq_iff_exists {D : Cocone F} {i j : J} (hD : IsColimit D)
    (x : F.obj i) (y : F.obj j) :
    D.ι.app i x = D.ι.app j y ↔ ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y

[CategoryTheory.Limits.PreservesColimit F (CategoryTheory.forget C)]

(hD : CategoryTheory.Limits.IsColimit D)

(x : (CategoryTheory.forget C).obj (F.obj i))

(y : (CategoryTheory.forget C).obj (F.obj j))

(D.ι.app i) x = (D.ι.app j) y ↔ ∃ k f g, (F.map f) x = (F.map g) y


/-- Internal: Not intended to be used outside this local construction. -/
@[simp]
theorem pnatCast_eq_natCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] (n : ℕ+) :
    ((n : Rˣ) : R) = ↑n

[Fact (∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I))]


theorem eq_empty_iff_forall_not_mem {s : Finset α} : s = ∅ ↔ ∀ x, x ∉ s


lemma div_nonneg {a b : EReal} (h : 0 ≤ a) (h' : 0 ≤ b) : 0 ≤ a / b


@[ext]
lemma hom_ext {X Y : Augmented C} (f g : X ⟶ Y) (h₁ : f.left = g.left) (h₂ : f.right = g.right) :
    f = g

{X Y : CategoryTheory.SimplicialObject.Augmented C}


@[simp]
theorem coeff_zero_reverse (f : R[X]) : coeff (reverse f) 0 = leadingCoeff f

{R : Type u_1}
[Semiring R]
(f : Polynomial R)


@[simp]
theorem mem_toSubalgebra (s : IntermediateField K L) (x : L) : x ∈ s.toSubalgebra ↔ x ∈ s

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(s : IntermediateField K L)
(x : L)


/-- Any model of the theory of simple graphs represents a simple graph. -/
@[simps]
def simpleGraphOfStructure [Language.graph.Structure V] [V ⊨ Theory.simpleGraph] :
    SimpleGraph V

(FirstOrder.Language.simpleGraphOfStructure V).Adj x y =
  FirstOrder.Language.Structure.RelMap FirstOrder.Language.adj ![x, y]


@[simp]
theorem AdditiveFunctor.of_fst (F : C ⥤ D) [F.Additive] : (AdditiveFunctor.of F).1 = F

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

(CategoryTheory.AdditiveFunctor.of F).obj = F


@[simp]
theorem count_apply_eq_top [MeasurableSingletonClass α] : count s = ∞ ↔ s.Infinite

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
[MeasurableSingletonClass α]

MeasureTheory.Measure.count s = ⊤ ↔ s.Infinite


@[simp] theorem refl_apply (x : α) : Equiv.refl α x = x


theorem isSeparable_range_deriv [SeparableSpace 𝕜] (f : 𝕜 → F) :
    IsSeparable (range (deriv f))

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[TopologicalSpace.SeparableSpace 𝕜]
(f : 𝕜 → F)

TopologicalSpace.IsSeparable (Set.range (deriv f))


theorem normAtPlace_neg (w : InfinitePlace K) (x : E K)  :
    normAtPlace w (- x) = normAtPlace w x

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

(NumberField.mixedEmbedding.normAtPlace w) (-x) = (NumberField.mixedEmbedding.normAtPlace w) x


theorem isCaratheodory_union (h₁ : IsCaratheodory m s₁) (h₂ : IsCaratheodory m s₂) :
    IsCaratheodory m (s₁ ∪ s₂)

{α : Type u}
(m : MeasureTheory.OuterMeasure α)
{s₁ s₂ : Set α}
(h₁ : m.IsCaratheodory s₁)
(h₂ : m.IsCaratheodory s₂)


@[to_additive]
theorem prod_singleton : [a].prod = a


lemma Module.stableUnderSpecialization_support :
    StableUnderSpecialization (Module.support R M)

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]


lemma finite_real_spectrum : (spectrum ℝ A).Finite

{n : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
[Fintype n]
[DecidableEq n]
{A : Matrix n n 𝕜}


theorem iff_preimage_eq' : e.IsImage s t ↔ e.source ∩ e ⁻¹' (e.target ∩ t) = e.source ∩ s

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}

e.IsImage s t ↔ e.source ∩ ↑e ⁻¹' (e.target ∩ t) = e.source ∩ s


theorem eq_one_of_dvd_one {n : Nat} (H : n ∣ 1) : n = 1


/-- The Bochner integral -/
irreducible_def integral {_ : MeasurableSpace α} (μ : Measure α) (f : α → G) : G

{α : Type u_6}
{G : Type u_7}
[NormedAddCommGroup G]
[NormedSpace ℝ G]

∀ {x : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : α → G),
  MeasureTheory.integral μ f =
    if x_1 : CompleteSpace G then
      if hf : MeasureTheory.Integrable f μ then MeasureTheory.L1.integral (MeasureTheory.Integrable.toL1 f hf) else 0
    else 0


@[simp]
theorem equivAdjoinSimple_symm_gen (pb : PowerBasis K L) :
    pb.equivAdjoinSimple.symm pb.gen = AdjoinSimple.gen K pb.gen

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(pb : PowerBasis K L)

pb.equivAdjoinSimple.symm pb.gen = IntermediateField.AdjoinSimple.gen K pb.gen


lemma hasLeftHomology_iff_unop (S : ShortComplex Cᵒᵖ) :
    S.HasLeftHomology ↔ S.unop.HasRightHomology


/-- Binary **arithmetic mean-geometric mean inequality** (aka AM-GM inequality) for linearly ordered
commutative semirings. -/
lemma two_mul_le_add_sq [ExistsAddOfLE α] [MulPosStrictMono α]
    [ContravariantClass α α (· + ·) (· ≤ ·)] [CovariantClass α α (· + ·) (· ≤ ·)]
    (a b : α) : 2 * a * b ≤ a ^ 2 + b ^ 2

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

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


theorem mono_of_kernel_zero {X Y : C} {f : X ⟶ Y} [HasLimit (parallelPair f 0)]
    (w : kernel.ι f = 0) : Mono f

[CategoryTheory.Limits.HasLimit (CategoryTheory.Limits.parallelPair f 0)]

(w : CategoryTheory.Limits.kernel.ι f = 0)


@[simp]
theorem comp_assoc (f : C₀(γ, δ)) (g : β →co γ) (h : α →co β) :
    (f.comp g).comp h = f.comp (g.comp h)

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
{δ : Type u_2}
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(f : γ →C₀ δ)
(g : CocompactMap β γ)
(h : CocompactMap α β)


theorem cramer_row_self (i : n) (h : ∀ j, b j = A j i) : A.cramer b = Pi.single i A.det

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)
(i : n)
(h : ∀ (j : n), b j = A j i)


theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '' {x}ᶜ) = range f

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


theorem mem_transferSet (q : G ⧸ H) : transferFunction H g q ∈ transferSet H g

{G : Type u}
[Group G]
(H : Subgroup G)
(g : G)
(q : G ⧸ H)

H.transferFunction g q ∈ H.transferSet g


@[to_additive]
theorem centralizer_le (h : S ⊆ T) : centralizer T ≤ centralizer S

{M : Type u_1}
{S T : Set M}
[AddMonoid M]
(h : S ⊆ T)

AddSubmonoid.centralizer T ≤ AddSubmonoid.centralizer S


theorem pow_map_zero_of_le {f : Module.End R M} {m : M} {k l : ℕ} (hk : k ≤ l)
    (hm : (f ^ k) m = 0) : (f ^ l) m = 0

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f : Module.End R M}
{m : M}
{k l : ℕ}
(hk : k ≤ l)
(hm : (f ^ k) m = 0)


@[simp, norm_cast]
theorem cast_list_sum (s : List ℚ) : (↑s.sum : α) = (s.map (↑)).sum

{α : Type u_2}
[DivisionRing α]
[CharZero α]
(s : List ℚ)


/-- See also `Finset.prod_dite_eq'`. -/
@[to_additive "See also `Finset.sum_dite_eq'`."] lemma prod_dite_eq' (i : ι) (f : ∀ j, j = i → α) :
    ∏ j, (if h : j = i then f j h else 1) = f i rfl

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[CommMonoid α]
[DecidableEq ι]
(i : ι)
(f : (j : ι) → j = i → α)

(∏ j : ι, if h : j = i then f j h else 1) = f i ⋯


@[simp]
theorem coe_id : ⇑(BotHom.id α) = id


lemma toNNRat_div' (hq : 0 ≤ q) : toNNRat (p / q) = toNNRat p / toNNRat q


lemma IsIntegralCurveOn.continuousAt (hγ : IsIntegralCurveOn γ v s) (ht : t₀ ∈ s) :
    ContinuousAt γ t₀

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{s : Set ℝ}
{t₀ : ℝ}
(hγ : IsIntegralCurveOn γ v s)
(ht : t₀ ∈ s)


@[to_additive]
theorem exists_pow_ne_one_of_isCyclic {G : Type*} [Group G] [Fintype G] [G_cyclic : IsCyclic G]
    {k : ℕ} (k_pos : k ≠ 0) (k_lt_card_G : k < Fintype.card G) : ∃ a : G, a ^ k ≠ 1

{G : Type u_1}
[AddGroup G]
[Fintype G]
[G_cyclic : IsAddCyclic G]
{k : ℕ}
(k_pos : k ≠ 0)
(k_lt_card_G : k < Fintype.card G)


@[simp]
theorem setLIntegral_const {f : β → ℝ≥0∞} {μ : Measure β} {a : α} {s : Set β} :
    ∫⁻ x in s, f x ∂const α μ a = ∫⁻ x in s, f x ∂μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : β → ℝ≥0∞}
{μ : MeasureTheory.Measure β}
{a : α}
{s : Set β}

∫⁻ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫⁻ (x : β) in s, f x ∂μ


theorem eq_freeOn_iff : M = freeOn E ↔ M.E = E ∧ M.Indep E

{α : Type u_1}
{M : Matroid α}
{E : Set α}

M = Matroid.freeOn E ↔ M.E = E ∧ M.Indep E


theorem cycleType_mul_inv_mem_cycleFactorsFinset_eq_sub
    {f g : Perm α} (hf : f ∈ g.cycleFactorsFinset) :
    (g * f⁻¹).cycleType = g.cycleType - f.cycleType

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


theorem toUnits_injective : Function.Injective (toUnits : unitary R → Rˣ)


theorem snd_top [Top α] [Top β] : (⊤ : α × β).snd = ⊤

(α : Type u)
(β : Type v)
[Top α]
[Top β]


/-- The elliptic curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$.
When `R` is a field, any two Weierstrass equations isomorphic to `E` are related by this. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def variableChange : EllipticCurve R

{R : Type u}
[CommRing R]
(E : EllipticCurve R)
(C : WeierstrassCurve.VariableChange R)

(E.variableChange C).a₃ = ↑C.u⁻¹ ^ 3 * (E.a₃ + C.r * E.a₁ + 2 * C.t)


theorem Codisjoint.inf_right (hb : Codisjoint a b) (hc : Codisjoint a c) : Codisjoint a (b ⊓ c)

{α : Type u_1}
[DistribLattice α]
[OrderTop α]
{a b c : α}
(hb : Codisjoint a b)
(hc : Codisjoint a c)


@[simp]
theorem innerₛₗ_apply_coe (v : E) : ⇑(innerₛₗ 𝕜 v) = fun w => ⟪v, w⟫

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


lemma integral_bilinear_hasLineDerivAt_right_eq_neg_left_of_integrable_aux2
    [FiniteDimensional ℝ E] {μ : Measure (E × ℝ)} [IsAddHaarMeasure μ]
    {f f' : E × ℝ → F} {g g' : E × ℝ → G} {B : F →L[ℝ] G →L[ℝ] W}
    (hf'g : Integrable (fun x ↦ B (f' x) (g x)) μ)
    (hfg' : Integrable (fun x ↦ B (f x) (g' x)) μ)
    (hfg : Integrable (fun x ↦ B (f x) (g x)) μ)
    (hf : ∀ x, HasLineDerivAt ℝ f (f' x) x (0, 1)) (hg : ∀ x, HasLineDerivAt ℝ g (g' x) x (0, 1)) :
    ∫ x, B (f x) (g' x) ∂μ = - ∫ x, B (f' x) (g x) ∂μ

(hf'g : MeasureTheory.Integrable (fun x => (B (f' x)) (g x)) μ)

(hfg' : MeasureTheory.Integrable (fun x => (B (f x)) (g' x)) μ)

(hfg : MeasureTheory.Integrable (fun x => (B (f x)) (g x)) μ)

(hf : ∀ (x : E × ℝ), HasLineDerivAt ℝ f (f' x) x (0, 1))

(hg : ∀ (x : E × ℝ), HasLineDerivAt ℝ g (g' x) x (0, 1))

∫ (x : E × ℝ), (B (f x)) (g' x) ∂μ = -∫ (x : E × ℝ), (B (f' x)) (g x) ∂μ


@[to_additive addHaarScalarFactor_eq_integral_div]
lemma haarScalarFactor_eq_integral_div (μ' μ : Measure G) [IsHaarMeasure μ]
    [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] {f : G → ℝ} (hf : Continuous f)
    (h'f : HasCompactSupport f) (int_nonzero : ∫ x, f x ∂μ ≠ 0) :
    haarScalarFactor μ' μ = (∫ x, f x ∂μ') / ∫ x, f x ∂μ

↑(μ'.haarScalarFactor μ) = (∫ (x : G), f x ∂μ') / ∫ (x : G), f x ∂μ


@[simp]
theorem fderiv_id : fderiv 𝕜 id x = id 𝕜 E

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}

fderiv 𝕜 id x = ContinuousLinearMap.id 𝕜 E


theorem gcd_dvd_gcd [GCDMonoid α] {a b c d : α} (hab : a ∣ b) (hcd : c ∣ d) : gcd a c ∣ gcd b d

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a b c d : α}
(hab : a ∣ b)
(hcd : c ∣ d)


theorem ENNReal.tendsto_rpow_at_top {y : ℝ} (hy : 0 < y) :
    Tendsto (fun x : ℝ≥0∞ => x ^ y) (𝓝 ⊤) (𝓝 ⊤)

Filter.Tendsto (fun x => x ^ y) (𝓝 ⊤) (𝓝 ⊤)


/-- The forgetful functor from the Eilenberg-Moore category, forgetting the algebraic structure. -/
@[simps]
def forget : Algebra T ⥤ C

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


/-- The equivalence between the opposite of a product and the product of the opposites. -/
@[simps]
def prodOpEquiv : (C × D)ᵒᵖ ≌ Cᵒᵖ × Dᵒᵖ

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

∀ {X Y : (C × D)ᵒᵖ} (f : X ⟶ Y), (CategoryTheory.prodOpEquiv C).functor.map f = (f.unop.1.op, f.unop.2.op)


/-- If `g` maps a second argument of 0 to 1, then multiplying it over the
result of `onFinset` is the same as multiplying it over the original `Finset`. -/
@[to_additive
      "If `g` maps a second argument of 0 to 0, summing it over the
      result of `onFinset` is the same as summing it over the original `Finset`."]
theorem onFinset_prod {s : Finset α} {f : α → M} {g : α → M → N} (hf : ∀ a, f a ≠ 0 → a ∈ s)
    (hg : ∀ a, g a 0 = 1) : (onFinset s f hf).prod g = ∏ a ∈ s, g a (f a)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
{s : Finset α}
{f : α → M}
{g : α → M → N}
(hf : ∀ (a : α), f a ≠ 0 → a ∈ s)
(hg : ∀ (a : α), g a 0 = 0)

(Finsupp.onFinset s f hf).sum g = ∑ a ∈ s, g a (f a)


@[simp] theorem restrict_idem (M : Matroid α) (R : Set α) : M ↾ R ↾ R = M ↾ R

{α : Type u_1}
(M : Matroid α)
(R : Set α)

(M.restrict R).restrict R = M.restrict R


@[simp]
theorem mem_range (φ : A →ₐ[R] B) {y : B} : y ∈ φ.range ↔ ∃ x, φ x = y

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


theorem liftOn_zero {p : Type*} (f : M → S → p) (H) : liftOn 0 f H = f 0 1

(H : ∀ {a c : M} {b d : ↥S}, (Localization.r S) (a, b) (c, d) → f a b = f c d)


lemma add_of_Y_ne {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ Q y * P z ^ 3) :
    W.add P Q = addU P Q • ![1, 1, 0]

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P Q : Fin 3 → F}
(hP : W.Equation P)
(hQ : W.Equation Q)
(hPz : P z ≠ 0)
(hQz : Q z ≠ 0)
(hx : P x * Q z ^ 2 = Q x * P z ^ 2)
(hy : P y * Q z ^ 3 ≠ Q y * P z ^ 3)

W.add P Q = WeierstrassCurve.Jacobian.addU P Q • ![1, 1, 0]


/-- `Matrix.comp` as `AlgEquiv` -/
@[simps!]
def compAlgEquiv : Matrix I I (Matrix J J R) ≃ₐ[K] Matrix (I × J) (I × J) R

(I : Type u_1)
(J : Type u_2)
(R : Type u_5)
(K : Type u_6)
[CommSemiring K]
[Semiring R]
[Fintype I]
[Fintype J]
[Algebra K R]
[DecidableEq I]
[DecidableEq J]
(n : Matrix (I × J) (I × J) R)
(i j : I)
(k l : J)

(Matrix.compAlgEquiv I J R K).symm n i j k l = n (i, k) (j, l)


theorem mem_rangeSingleton_apply_iff : a ∈ f.rangeSingleton i ↔ a = f i

{ι : Type u_1}
{α : Type u_2}
[Zero α]
{f : ι →₀ α}
{i : ι}
{a : α}


/-- **Phragmen-Lindelöf principle** in a strip `U = {z : ℂ | a < im z < b}`.
Let `f g : ℂ → E` be functions such that

* `f` and `g` are differentiable on `U` and are continuous on its closure;
* `‖f z‖` and `‖g z‖` are bounded from above by `A * exp(B * exp(c * |re z|))` on `U` for some
  `c < π / (b - a)`;
* `f z = g z` on the boundary of `U`.

Then `f` is equal to `g` on the closed strip `{z : ℂ | a ≤ im z ≤ b}`.
-/
theorem eqOn_horizontal_strip {g : ℂ → E} (hdf : DiffContOnCl ℂ f (im ⁻¹' Ioo a b))
    (hBf : ∃ c < π / (b - a), ∃ B, f =O[comap (_root_.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)]
      fun z ↦ expR (B * expR (c * |z.re|)))
    (hdg : DiffContOnCl ℂ g (im ⁻¹' Ioo a b))
    (hBg : ∃ c < π / (b - a), ∃ B, g =O[comap (_root_.abs ∘ re) atTop ⊓ 𝓟 (im ⁻¹' Ioo a b)]
      fun z ↦ expR (B * expR (c * |z.re|)))
    (ha : ∀ z : ℂ, z.im = a → f z = g z) (hb : ∀ z : ℂ, z.im = b → f z = g z) :
    EqOn f g (im ⁻¹' Icc a b)

(hdf : DiffContOnCl ℂ f (Complex.im ⁻¹' Set.Ioo a b))

(hBf :
  ∃ c < π / (b - a),
    ∃ B,
      f =O[Filter.comap (abs ∘ Complex.re) Filter.atTop ⊓ 𝓟 (Complex.im ⁻¹' Set.Ioo a b)] fun z =>
        expR (B * expR (c * |z.re|)))

(hdg : DiffContOnCl ℂ g (Complex.im ⁻¹' Set.Ioo a b))

(hBg :
  ∃ c < π / (b - a),
    ∃ B,
      g =O[Filter.comap (abs ∘ Complex.re) Filter.atTop ⊓ 𝓟 (Complex.im ⁻¹' Set.Ioo a b)] fun z =>
        expR (B * expR (c * |z.re|)))

Set.EqOn f g (Complex.im ⁻¹' Set.Icc a b)


@[simp]
theorem mul_const {f : ℝ → A} (hf : IntervalIntegrable f μ a b) (c : A) :
    IntervalIntegrable (fun x => f x * c) μ a b

{A : Type u_5}
[NormedRing A]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{f : ℝ → A}
(hf : IntervalIntegrable f μ a b)
(c : A)


theorem nonneg_of_mul_nonpos_left [ExistsAddOfLE α] [MulPosStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    {a b : α} (h : a * b ≤ 0) (hb : b < 0) : 0 ≤ a

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

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


@[simp] theorem val_toFin (x : BitVec w) : x.toFin.val = x.toNat


@[field_simps]
theorem div_add' (a b c : α) (hc : c ≠ 0) : a / c + b = (a + b * c) / c

{α : Type u_1}
[DivisionSemiring α]
(a b c : α)
(hc : c ≠ 0)


@[to_additive]
theorem Red.reduce_left (h : Red L₁ L₂) : Red L₂ (reduce L₁)

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(h : FreeGroup.Red L₁ L₂)


@[to_additive (attr := simp)]
lemma mk_mul [Mul M] (a b : M) : mk (a * b) = mk b * mk a

DomAddAct.mk (a + b) = DomAddAct.mk b + DomAddAct.mk a


/-- The biUnion of a family of preconnected sets is preconnected if the graph determined by
whether two sets intersect is preconnected. -/
theorem IsPreconnected.biUnion_of_reflTransGen {ι : Type*} {t : Set ι} {s : ι → Set α}
    (H : ∀ i ∈ t, IsPreconnected (s i))
    (K : ∀ i, i ∈ t → ∀ j, j ∈ t → ReflTransGen (fun i j => (s i ∩ s j).Nonempty ∧ i ∈ t) i j) :
    IsPreconnected (⋃ n ∈ t, s n)

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


theorem enum_eq_zip (s : Stream' α) : enum s = zip Prod.mk nats s

s.enum = Stream'.zip Prod.mk Stream'.nats s


@[simp] lemma disjiUnion_cons (a : α) (s : Finset α) (ha : a ∉ s) (f : α → Finset β) (H) :
    disjiUnion (cons a s ha) f H =
    (f a).disjUnion ((s.disjiUnion f) fun _ hb _ hc ↦ H (mem_cons_of_mem hb) (mem_cons_of_mem hc))
      (disjoint_left.2 fun _ hb h ↦
        let ⟨_, hc, h⟩ := mem_disjiUnion.mp h
        disjoint_left.mp
          (H (mem_cons_self a s) (mem_cons_of_mem hc) (ne_of_mem_of_not_mem hc ha).symm) hb h)

(H : (↑(Finset.cons a s ha)).PairwiseDisjoint f)

(Finset.cons a s ha).disjiUnion f H = (f a).disjUnion (s.disjiUnion f ⋯) ⋯


/-- Use `map` as the preferred simp normal form. -/
@[simp] theorem lift_of_comp :
    Abelianization.lift (Abelianization.of.comp f) = Abelianization.map f

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(f : G →* H)


theorem aeval_def (p : MvPolynomial σ R) : aeval f p = eval₂ (algebraMap R S₁) f p

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

(MvPolynomial.aeval f) p = MvPolynomial.eval₂ (algebraMap R S₁) f p


theorem indexOf_mem_indexesOf [BEq α] [LawfulBEq α] {xs : List α} (m : x ∈ xs) :
    xs.indexOf x ∈ xs.indexesOf x

{α : Type u_1}
{x : α}
[BEq α]
[LawfulBEq α]
{xs : List α}
(m : x ∈ xs)


theorem compactSpace_iff_quasiCompact (X : Scheme) :
    CompactSpace X ↔ QuasiCompact (terminal.from X)

CompactSpace ↑↑X.toPresheafedSpace ↔ AlgebraicGeometry.QuasiCompact (CategoryTheory.Limits.terminal.from X)


theorem stream_nth_fr_num_le_fr_num_sub_n_rat :
    ∀ {ifp_n : IntFractPair ℚ},
      IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (IntFractPair.of q).fr.num - n

{q : ℚ}
{n : ℕ}
{ifp_n : GenContFract.IntFractPair ℚ}

GenContFract.IntFractPair.stream q n = some ifp_n → ifp_n.fr.num ≤ (GenContFract.IntFractPair.of q).fr.num - ↑n


@[simp]
lemma subgroup_toSubmonoid : (α^*M).toSubmonoid = submonoid M α

(M : Type u)
(α : Type v)
[Monoid M]
[Group α]
[MulDistribMulAction M α]

(FixedPoints.subgroup M α).toSubmonoid = FixedPoints.submonoid M α


theorem mem_implicitToPartialHomeomorphOfComplemented_source (hf : HasStrictFDerivAt f f' a)
    (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) :
    a ∈ (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker).source

(hker : (LinearMap.ker f').ClosedComplemented)

a ∈ (HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented f f' hf hf' hker).source


/-- When the first map `S.f` is zero, this is the right homology data on `S` given
by any limit kernel fork of `S.g` -/
@[simps]
def ofIsLimitKernelFork (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    S.RightHomologyData

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

(CategoryTheory.ShortComplex.RightHomologyData.ofIsLimitKernelFork S hf c hc).ι = CategoryTheory.Limits.Fork.ι c


/-- The functor `Γ` for the equivalence is `Γ'`. -/
@[simps!, nolint unusedArguments]
def Γ [IsIdempotentComplete C] [HasFiniteCoproducts C] : ChainComplex C ℕ ⥤ SimplicialObject C

∀ {X_1 Y : SimplexCategoryᵒᵖ} (θ : X_1 ⟶ Y),
  (CategoryTheory.Idempotents.DoldKan.Γ.obj X).map θ = AlgebraicTopology.DoldKan.Γ₀.Obj.map X θ


@[simp] lemma innerSL_real_flip : (innerSL ℝ (E := F)).flip = innerSL ℝ

(F : Type u_3)
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]


theorem toIocMod_eq_iff : toIocMod hp a b = c ↔ c ∈ Set.Ioc a (a + p) ∧ ∃ z : ℤ, b = c + z • p

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

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


theorem IsBlock.iff_subtype_val {C : SubMulAction G X} {B : Set C} :
    IsBlock G B ↔ IsBlock G (Subtype.val '' B : Set X)

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{C : SubMulAction G X}
{B : Set ↥C}

MulAction.IsBlock G B ↔ MulAction.IsBlock G (Subtype.val '' B)


/-- `ReflTransGen r`: reflexive transitive closure of `r` -/
@[mk_iff ReflTransGen.cases_tail_iff]
inductive ReflTransGen (r : α → α → Prop) (a : α) : α → Prop
  | refl : ReflTransGen r a a
  | tail {b c} : ReflTransGen r a b → r b c → ReflTransGen r a c

{α : Type u_1}
(r : α → α → Prop)
(a : α)

∀ (a_1 : α), Relation.ReflTransGen r a a_1 ↔ a_1 = a ∨ ∃ b, Relation.ReflTransGen r a b ∧ r b a_1


theorem inv_eq_of_inv_hom_id {f : X ⟶ Y} [IsIso f] {g : Y ⟶ X} (inv_hom_id : g ≫ f = 𝟙 Y) :
    inv f = g

(inv_hom_id : CategoryTheory.CategoryStruct.comp g f = CategoryTheory.CategoryStruct.id Y)


/-- The finite product of a family of sets of unique differentiability is a set of unique
differentiability. -/
theorem UniqueDiffOn.univ_pi (ι : Type*) [Finite ι] (E : ι → Type*)
    [∀ i, NormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] (s : ∀ i, Set (E i))
    (h : ∀ i, UniqueDiffOn 𝕜 (s i)) : UniqueDiffOn 𝕜 (Set.pi univ s)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
(ι : Type u_5)
[Finite ι]
(E : ι → Type u_6)
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
(s : (i : ι) → Set (E i))
(h : ∀ (i : ι), UniqueDiffOn 𝕜 (s i))


/-- The "monotone chain condition" below is sometimes a convenient form of well foundedness. -/
theorem WellFounded.monotone_chain_condition [PartialOrder α] :
    WellFounded ((· > ·) : α → α → Prop) ↔ ∀ a : ℕ →o α, ∃ n, ∀ m, n ≤ m → a n = a m

(WellFounded fun x x_1 => x > x_1) ↔ ∀ (a : ℕ →o α), ∃ n, ∀ (m : ℕ), n ≤ m → a n = a m


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

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

(s ∪ t).indicator f a = s.indicator f a + t.indicator f a


theorem iUnion_vsub_left_image : ⋃ a ∈ s, (a -ᵥ ·) '' t = s -ᵥ t

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

⋃ a ∈ s, (fun x => a -ᵥ x) '' t = s -ᵥ t


theorem isIntegral_quotientMap_iff {I : Ideal S} :
    (Ideal.quotientMap I f le_rfl).IsIntegral ↔
      ((Ideal.Quotient.mk I).comp f : R →+* S ⧸ I).IsIntegral

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
{I : Ideal S}

(Ideal.quotientMap I f ⋯).IsIntegral ↔ ((Ideal.Quotient.mk I).comp f).IsIntegral


/-- A continuous affine equivalence, denoted `P₁ ≃ᵃL[k] P₂`, between two affine topological spaces
is an affine equivalence such that forward and inverse maps are continuous. -/
structure ContinuousAffineEquiv (k P₁ P₂ : Type*) {V₁ V₂ : Type*} [Ring k]
    [AddCommGroup V₁] [Module k V₁] [AddTorsor V₁ P₁] [TopologicalSpace P₁]
    [AddCommGroup V₂] [Module k V₂] [AddTorsor V₂ P₂] [TopologicalSpace P₂]
    extends P₁ ≃ᵃ[k] P₂ where
  continuous_toFun : Continuous toFun := by continuity
  continuous_invFun : Continuous invFun := by continuity

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_4}
{V₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[TopologicalSpace P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₂]
(self : P₁ ≃ᵃL[k] P₂)


theorem subtypeRestr_symm_eqOn {U : Opens X} (hU : Nonempty U) :
    EqOn e.symm (Subtype.val ∘ (e.subtypeRestr hU).symm) (e.subtypeRestr hU).target

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{U : TopologicalSpace.Opens X}
(hU : Nonempty ↥U)

Set.EqOn (↑e.symm) (Subtype.val ∘ ↑(e.subtypeRestr hU).symm) (e.subtypeRestr hU).target


@[to_additive (attr := simp)]
theorem subsingleton_iff : Subsingleton (Subgroup G) ↔ Subsingleton G

Subsingleton (AddSubgroup G) ↔ Subsingleton G


theorem succ_def (a : NatOrdinal) : succ a = toNatOrdinal (toOrdinal a + 1)

Order.succ a = Ordinal.toNatOrdinal (NatOrdinal.toOrdinal a + 1)


theorem norm_setToFun_le (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ) (hC : 0 ≤ C) :
    ‖setToFun μ T hT f‖ ≤ C * ‖hf.toL1 f‖

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

‖MeasureTheory.setToFun μ T hT f‖ ≤ C * ‖MeasureTheory.Integrable.toL1 f hf‖


protected theorem decode : Primrec (@decode α _)


/-- Builds a linear equivalence from a linear map whose determinant in some bases is a unit. -/
@[simps]
def LinearEquiv.ofIsUnitDet {f : M →ₗ[R] M'} {v : Basis ι R M} {v' : Basis ι R M'}
    (h : IsUnit (LinearMap.toMatrix v v' f).det) : M ≃ₗ[R] M'

(h : IsUnit ((LinearMap.toMatrix v v') f).det)


protected theorem sum_repr (b : OrthonormalBasis ι 𝕜 E) (x : E) : ∑ i, b.repr x i • b i = x

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)
(x : E)


theorem Smooth.mdifferentiableAt (hf : Smooth I I' f) : MDifferentiableAt I I' f x

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


/-- The type of morphisms in the category `Φ.LeftResolution X₂` (when `W₁` is multiplicative). -/
@[ext]
structure Hom (L L' : Φ.LeftResolution X₂) where
  /-- a morphism in the source category -/
  f : L.X₁ ⟶ L'.X₁
  hf : W₁ f
  comm : Φ.functor.map f ≫ L'.w = L.w := by aesop_cat

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


/-- If each prime factor of `orderOf x` has higher multiplicity in `orderOf y`, and `x` commutes
  with `y`, then `x * y` has the same order as `y`. -/
@[to_additive addOrderOf_add_eq_right_of_forall_prime_mul_dvd
  "If each prime factor of
  `addOrderOf x` has higher multiplicity in `addOrderOf y`, and `x` commutes with `y`,
  then `x + y` has the same order as `y`."]
theorem orderOf_mul_eq_right_of_forall_prime_mul_dvd (h : Commute x y) (hy : IsOfFinOrder y)
    (hdvd : ∀ p : ℕ, p.Prime → p ∣ orderOf x → p * orderOf x ∣ orderOf y) :
    orderOf (x * y) = orderOf y

(hdvd : ∀ (p : ℕ), Nat.Prime p → p ∣ addOrderOf x → p * addOrderOf x ∣ addOrderOf y)


theorem min_eq_right_of_lt {a b : α} (h : b < a) : min a b = b

{α : Type u}
[LinearOrder α]
{a b : α}
(h : b < a)


/-- The left inverse and the right inverse of a formal multilinear series coincide. This is not at
all obvious from their definition, but it follows from uniqueness of inverses (which comes from the
fact that composition is associative on formal multilinear series). -/
theorem leftInv_eq_rightInv (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F)
    (h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm i) : leftInv p i = rightInv p i

(h : p 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm ↑i)


@[simp]
theorem toLinearEquiv'_symm_apply (P : Matrix n n R) (h : Invertible P) :
    (↑(P.toLinearEquiv' h).symm : Module.End R (n → R)) = Matrix.toLin' (⅟ P)

{n : Type u_1}
[Fintype n]
{R : Type u_2}
[CommRing R]
[DecidableEq n]
(P : Matrix n n R)
(h : Invertible P)

↑(P.toLinearEquiv' h).symm = Matrix.toLin' ⅟P


/-- The seminorm of an element in a product space is `< r` if and only if the norm of each
component is. -/
@[to_additive pi_norm_lt_iff "The seminorm of an element in a product space is `< r` if and only
if the norm of each component is."]
lemma pi_norm_lt_iff' (hr : 0 < r) : ‖x‖ < r ↔ ∀ i, ‖x i‖ < r

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedAddGroup (π i)]
{x : (i : ι) → π i}
{r : ℝ}
(hr : 0 < r)


theorem deg_ne_zero [Nontrivial S] (h : IsAdjoinRootMonic S f) : natDegree f ≠ 0

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
[Nontrivial S]
(h : IsAdjoinRootMonic S f)


@[simp]
theorem stereographic'_source {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    (stereographic' n v).source = {v}ᶜ

[Fact (FiniteDimensional.finrank ℝ E = n + 1)]


@[simp]
lemma homMk₃_app_one : (homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app 1 = app₁

{f g : CategoryTheory.ComposableArrows C 3}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁ = CategoryTheory.CategoryStruct.comp app₀ (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂ = CategoryTheory.CategoryStruct.comp app₁ (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃ = CategoryTheory.CategoryStruct.comp app₂ (g.map' 2 3 ⋯ ⋯))

(CategoryTheory.ComposableArrows.homMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).app 1 = app₁


@[simp]
theorem preimage_coe_Ioc_bot : (some : α → WithBot α) ⁻¹' Ioc ⊥ a = Iic a

WithBot.some ⁻¹' Set.Ioc ⊥ ↑a = Set.Iic a


theorem mem_closure_iff_nhdsWithin_neBot : x ∈ closure s ↔ NeBot (𝓝[s] x)

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


theorem div_lt_iff' {a b r : ℝ≥0} (hr : r ≠ 0) : a / r < b ↔ a < r * b


/-- A continuous function from `α` to `β` is ae strongly measurable when one of the two spaces is
second countable. -/
theorem _root_.Continuous.aestronglyMeasurable [TopologicalSpace α] [OpensMeasurableSpace α]
    [PseudoMetrizableSpace β] [SecondCountableTopologyEither α β] (hf : Continuous f) :
    AEStronglyMeasurable f μ


@[simp]
theorem bind_pure (f : α → β) (s) : bind s (pure ∘ f) = map f s

{α : Type u}
{β : Type v}
(f : α → β)
(s : Computation α)

s.bind (Computation.pure ∘ f) = Computation.map f s


/-- **Rearrangement Inequality**: Pointwise multiplication of `f` and `g` is minimized when `f` and
`g` antivary together. Stated by permuting the entries of `g`. -/
theorem Antivary.sum_mul_le_sum_mul_comp_perm (hfg : Antivary f g) :
    ∑ i, f i * g i ≤ ∑ i, f i * g (σ i)

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{σ : Equiv.Perm ι}
{f g : ι → α}
[Fintype ι]
(hfg : Antivary f g)

∑ i : ι, f i * g i ≤ ∑ i : ι, f i * g (σ i)


@[simp]
theorem mem_pure {a b : α} : a ∈ (pure b : Semiquot α) ↔ a = b


theorem chromaticNumber_pos [Nonempty V] {n : ℕ} (hc : G.Colorable n) : 0 < G.chromaticNumber

{V : Type u}
{G : SimpleGraph V}
[Nonempty V]
{n : ℕ}
(hc : G.Colorable n)


theorem tan_nat_mul_pi (n : ℕ) : tan (n * π) = 0


lemma zsmul_mem {x} (n : ℤ) (hx : x ∈ I) : n • x ∈ I

{R : Type u_1}
[NonUnitalNonAssocRing R]
(I : TwoSidedIdeal R)
{x : R}
(n : ℤ)
(hx : x ∈ I)


theorem two_pi_I_ne_zero : (2 * π * I : ℂ) ≠ 0


protected theorem lt_tsub_iff_right (hc : AddLECancellable c) : a < b - c ↔ a + c < b


/-- The data of a monad on C consists of an endofunctor T together with natural transformations
η : 𝟭 C ⟶ T and μ : T ⋙ T ⟶ T satisfying three equations:
- T μ_X ≫ μ_X = μ_(TX) ≫ μ_X (associativity)
- η_(TX) ≫ μ_X = 1_X (left unit)
- Tη_X ≫ μ_X = 1_X (right unit)
-/
structure Monad extends C ⥤ C where
  /-- The unit for the monad. -/
  η : 𝟭 _ ⟶ toFunctor
  /-- The multiplication for the monad. -/
  μ : toFunctor ⋙ toFunctor ⟶ toFunctor
  assoc : ∀ X, toFunctor.map (NatTrans.app μ X) ≫ μ.app _ = μ.app _ ≫ μ.app _ := by aesop_cat
  left_unit : ∀ X : C, η.app (toFunctor.obj X) ≫ μ.app _ = 𝟙 _ := by aesop_cat
  right_unit : ∀ X : C, toFunctor.map (η.app X) ≫ μ.app _ = 𝟙 _ := by aesop_cat

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

CategoryTheory.CategoryStruct.comp (self.η.app (self.obj X)) (self.μ.app X) =
  CategoryTheory.CategoryStruct.id ((CategoryTheory.Functor.id C).obj (self.obj X))


theorem pos_of_mul_pos_right [PosMulReflectLT α] (h : 0 < a * b) (ha : 0 ≤ a) : 0 < b

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[Preorder α]
[PosMulReflectLT α]
(h : 0 < a * b)
(ha : 0 ≤ a)


@[to_additive]
theorem map_subtype_le {H : Subgroup G} (K : Subgroup H) : K.map H.subtype ≤ H

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


/-- If a proposition holds for all elements, then the subtype is
equivalent to the original type. -/
@[simps apply symm_apply]
def subtypeUnivEquiv {p : α → Prop} (h : ∀ x, p x) : Subtype p ≃ α

{α : Type u_1}
{p : α → Prop}
(h : ∀ (x : α), p x)
(x : α)

(Equiv.subtypeUnivEquiv h).symm x = ⟨x, ⋯⟩


@[simp]
theorem condition_zero (t : PushoutCocone f g) : t.ι.app WalkingSpan.zero = f ≫ t.inl

(t : CategoryTheory.Limits.PushoutCocone f g)

t.ι.app CategoryTheory.Limits.WalkingSpan.zero = f ≫ t.inl


theorem ringHom_ext {S} [Semiring S] {f g : R[X] →+* S} (h₁ : ∀ a, f (C a) = g (C a))
    (h₂ : f X = g X) : f = g

(h₁ : ∀ (a : R), f (Polynomial.C a) = g (Polynomial.C a))


theorem sphere_zero_subset : sphere n d 0 ⊆ 0


theorem app_eq {X Y : Scheme} (f : X ⟶ Y) {U V : Y.Opens} (e : U = V) :
    f.app U =
      Y.presheaf.map (eqToHom e.symm).op ≫
        f.app V ≫
          X.presheaf.map (eqToHom (congr_arg (Opens.map f.val.base).obj e)).op

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
{U V : Y.Opens}
(e : U = V)

AlgebraicGeometry.Scheme.Hom.app f U =
  Y.presheaf.map (CategoryTheory.eqToHom ⋯).op ≫
    AlgebraicGeometry.Scheme.Hom.app f V ≫ X.presheaf.map (CategoryTheory.eqToHom ⋯).op


/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`. This version
only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a neighborhood of `x`. -/
theorem norm_deriv_le_of_lip' {f : 𝕜 → F} {x₀ : 𝕜}
    {C : ℝ} (hC₀ : 0 ≤ C) (hlip : ∀ᶠ x in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖) :
    ‖deriv f x₀‖ ≤ C

(hlip : ∀ᶠ (x : 𝕜) in 𝓝 x₀, ‖f x - f x₀‖ ≤ C * ‖x - x₀‖)


theorem nthLe_cons {l : List α} {a : α} {n} (hl) :
    (a :: l).nthLe n hl = if hn : n = 0 then a else l.nthLe (n - 1) (nthLe_cons_aux hn hl)

{α : Type u}
{l : List α}
{a : α}
{n : ℕ}
(hl : n < (a :: l).length)

(a :: l).nthLe n hl = if hn : n = 0 then a else l.nthLe (n - 1) ⋯


theorem bddAbove_coe {s : Set ℝ≥0} : BddAbove (((↑) : ℝ≥0 → ℝ) '' s) ↔ BddAbove s

BddAbove (NNReal.toReal '' s) ↔ BddAbove s


/-- Given left homology map data for morphisms `φ` and `φ'`, this is
the induced left homology map data for `φ + φ'`. -/
@[simps]
def add : LeftHomologyMapData (φ + φ') h₁ h₂

(γ : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂)

(γ' : CategoryTheory.ShortComplex.LeftHomologyMapData φ' h₁ h₂)


/-- Hölder's inequality, as an inequality on the `ℒp` seminorm of a scalar product `φ • f`. -/
theorem eLpNorm_smul_le_mul_eLpNorm {p q r : ℝ≥0∞} {f : α → E} (hf : AEStronglyMeasurable f μ)
    {φ : α → 𝕜} (hφ : AEStronglyMeasurable φ μ) (hpqr : 1 / p = 1 / q + 1 / r) :
    eLpNorm (φ • f) p μ ≤ eLpNorm φ q μ * eLpNorm f r μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hφ : MeasureTheory.AEStronglyMeasurable φ μ)

MeasureTheory.eLpNorm (φ • f) p μ ≤ MeasureTheory.eLpNorm φ q μ * MeasureTheory.eLpNorm f r μ


/-- The category of sheaves taking values in Type is the same as the category of set-valued sheaves.
-/
@[simps]
def sheafEquivSheafOfTypes : Sheaf J (Type w) ≌ SheafOfTypes J

(J : CategoryTheory.GrothendieckTopology C)

∀ {X Y : CategoryTheory.Sheaf J (Type w)} (f : X ⟶ Y),
  ((CategoryTheory.sheafEquivSheafOfTypes J).functor.map f).val = f.val


lemma measurableSet_countableFiltration_countablePartitionSet (n : ℕ) (t : α) :
    MeasurableSet[countableFiltration α n] (countablePartitionSet n t)

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)
(t : α)

MeasurableSet (MeasurableSpace.countablePartitionSet n t)


lemma dirac_unit_compProd (κ : Kernel Unit β) [IsSFiniteKernel κ] :
    Measure.dirac () ⊗ₘ κ = (κ ()).map (Prod.mk ())

{β : Type u_2}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel Unit β)
[ProbabilityTheory.IsSFiniteKernel κ]

MeasureTheory.Measure.dirac () ⊗ₘ κ = MeasureTheory.Measure.map (Prod.mk ()) (κ ())


/-- A space `X` is sequentially compact if every sequence in `X` has a
converging subsequence. -/
@[mk_iff]
class SeqCompactSpace : Prop where
  isSeqCompact_univ : IsSeqCompact (univ : Set X)

SeqCompactSpace X ↔ IsSeqCompact Set.univ


/-- Flipping a complex of complexes over the diagonal, as an equivalence of categories. -/
@[simps]
def flipEquivalence :
    HomologicalComplex₂ C c₁ c₂ ≌ HomologicalComplex₂ C c₂ c₁

(HomologicalComplex₂.flipEquivalence C c₁ c₂).unitIso = HomologicalComplex₂.flipEquivalenceUnitIso C c₁ c₂


protected theorem neg_eq_comm {a b : Int} : -a = b ↔ -b = a


theorem iSup_union {f : β → α} {s t : Set β} :
    ⨆ x ∈ s ∪ t, f x = (⨆ x ∈ s, f x) ⊔ ⨆ x ∈ t, f x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : β → α}
{s t : Set β}


@[simp, norm_cast]
theorem get_natCast' (x : ℕ) (h : (x : PartENat).Dom) : get (x : PartENat) h = x


/-- An exterior point of a subset `E` (i.e., a point outside the closure of `E`) is not in the
(open) `δ`-thickening of `E` for small enough positive `δ`. -/
lemma eventually_not_mem_thickening_of_infEdist_pos {E : Set α} {x : α} (h : x ∉ closure E) :
    ∀ᶠ δ in 𝓝 (0 : ℝ), x ∉ Metric.thickening δ E

{α : Type u}
[PseudoEMetricSpace α]
{E : Set α}
{x : α}
(h : x ∉ closure E)

∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ Metric.thickening δ E


@[continuity]
theorem continuous_uncurry_extend_of_continuous_family {ι : Type*} [TopologicalSpace ι]
    {a b : ι → X} (γ : ∀ t : ι, Path (a t) (b t)) (h : Continuous ↿γ) :
    Continuous ↿fun t => (γ t).extend

{X : Type u_1}
[TopologicalSpace X]
{ι : Type u_4}
[TopologicalSpace ι]
{a b : ι → X}
(γ : (t : ι) → Path (a t) (b t))
(h : Continuous ↿γ)


@[to_additive]
theorem eq_mul_inv_of_mul_eq (h : a * c = b) : a = b * c⁻¹

{G : Type u_3}
[Group G]
{a b c : G}
(h : a * c = b)


@[simp]
theorem rightHom_comp_inl : (rightHom : N ⋊[φ] G →* G).comp inl = 1

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}

SemidirectProduct.rightHom.comp SemidirectProduct.inl = 1


/-- Coercion to a function as a `LinearMap`. -/
@[simps]
def coeFnLinearMap : C(α, M) →ₗ[R] α → M

{α : Type u_1}
[TopologicalSpace α]
(R : Type u_3)
{M : Type u_5}
[TopologicalSpace M]
[Semiring R]
[AddCommMonoid M]
[ContinuousAdd M]
[Module R M]
[ContinuousConstSMul R M]

∀ (a : C(α, M)) (a_1 : α), (ContinuousMap.coeFnLinearMap R) a a_1 = (↑ContinuousMap.coeFnAddMonoidHom).toFun a a_1


@[measurability]
theorem measurable_nndist : Measurable fun p : α × α => nndist p.1 p.2

{α : Type u_1}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[SecondCountableTopology α]


theorem intervalIntegrable_iff_integrableOn_Ico_of_le [NoAtoms μ] (hab : a ≤ b) :
    IntervalIntegrable f μ a b ↔ IntegrableOn f (Ico a b) μ

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

IntervalIntegrable f μ a b ↔ MeasureTheory.IntegrableOn f (Set.Ico a b) μ


@[simp]
theorem iccHomeoI_symm_apply_coe (a b : 𝕜) (h : a < b) (x : Set.Icc (0 : 𝕜) (1 : 𝕜)) :
    ((iccHomeoI a b h).symm x : 𝕜) = (b - a) * x + a

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
(a b : 𝕜)
(h : a < b)
(x : ↑(Set.Icc 0 1))

↑((iccHomeoI a b h).symm x) = (b - a) * ↑x + a


@[simp]
lemma homMk₄_app_four :
    (homMk₄ app₀ app₁ app₂ app₃ app₄ w₀ w₁ w₂ w₃).app ⟨4, by valid⟩ = app₄

{f g : CategoryTheory.ComposableArrows C 4}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁ = CategoryTheory.CategoryStruct.comp app₀ (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂ = CategoryTheory.CategoryStruct.comp app₁ (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃ = CategoryTheory.CategoryStruct.comp app₂ (g.map' 2 3 ⋯ ⋯))

(w₃ :
  CategoryTheory.CategoryStruct.comp (f.map' 3 4 ⋯ ⋯) app₄ = CategoryTheory.CategoryStruct.comp app₃ (g.map' 3 4 ⋯ ⋯))

(CategoryTheory.ComposableArrows.homMk₄ app₀ app₁ app₂ app₃ app₄ w₀ w₁ w₂ w₃).app ⟨4, ⋯⟩ = app₄


theorem plusCompIso_inv_eq_plusLift (hP : Presheaf.IsSheaf J (J.plusObj P ⋙ F)) :
    (J.plusCompIso F P).inv = J.plusLift (whiskerRight (J.toPlus _) _) hP

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

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

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

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

(hP : CategoryTheory.Presheaf.IsSheaf J ((J.plusObj P).comp F))

(J.plusCompIso F P).inv = J.plusLift (CategoryTheory.whiskerRight (J.toPlus P) F) hP


theorem IsClosed.closure_eq : c.IsClosed x → c x = x

{α : Type u_1}
[PartialOrder α]
{c : ClosureOperator α}
{x : α}


@[simp]
theorem hom_id (X : WidePushoutShape J) : Hom.id X = 𝟙 X

(X : CategoryTheory.Limits.WidePushoutShape J)

CategoryTheory.Limits.WidePushoutShape.Hom.id X = 𝟙 X


/-- The compatibility of a morphism with the augmentation, on 0-simplices -/
@[reassoc]
theorem w₀ {X Y : Augmented C} (f : X ⟶ Y) :
    (Augmented.drop.map f).app (op (SimplexCategory.mk 0)) ≫ Y.hom.app (op (SimplexCategory.mk 0)) =
      X.hom.app (op (SimplexCategory.mk 0)) ≫ Augmented.point.map f

{X Y : CategoryTheory.SimplicialObject.Augmented C}

(CategoryTheory.SimplicialObject.Augmented.drop.map f).app (Opposite.op (SimplexCategory.mk 0)) ≫
    Y.hom.app (Opposite.op (SimplexCategory.mk 0)) =
  X.hom.app (Opposite.op (SimplexCategory.mk 0)) ≫ CategoryTheory.SimplicialObject.Augmented.point.map f


theorem length_filterMap_le (f : α → Option β) (l : List α) :
    (filterMap f l).length ≤ l.length

{α : Type u_1}
{β : Type u_2}
(f : α → Option β)
(l : List α)


/-- See `MvPolynomial.IsHomogeneous.eq_zero_of_forall_eval_eq_zero_of_le_card`
for a version that assumes `n ≤ #R`. -/
lemma eq_zero_of_forall_eval_eq_zero [Infinite R] {F : MvPolynomial σ R} {n : ℕ}
    (hF : F.IsHomogeneous n) (h : ∀ r : σ → R, eval r F = 0) : F = 0

(h : ∀ (r : σ → R), (MvPolynomial.eval r) F = 0)


theorem mem_span_mul_finite_of_mem_mul {P Q : Submodule R A} {x : A} (hx : x ∈ P * Q) :
    ∃ T T' : Finset A, (T : Set A) ⊆ P ∧ (T' : Set A) ⊆ Q ∧ x ∈ span R (T * T' : Set A)

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
{P Q : Submodule R A}
{x : A}
(hx : x ∈ P * Q)

∃ T T', ↑T ⊆ ↑P ∧ ↑T' ⊆ ↑Q ∧ x ∈ Submodule.span R (↑T * ↑T')


@[simp]
theorem symm_trans_swap_trans [DecidableEq β] (a b : α) (e : α ≃ β) :
    (e.symm.trans (swap a b)).trans e = swap (e a) (e b)

{α : Sort u_2}
[DecidableEq α]
{β : Sort u_1}
[DecidableEq β]
(a b : α)
(e : α ≃ β)

(e.symm.trans (Equiv.swap a b)).trans e = Equiv.swap (e a) (e b)


/-- This is the same as `IsOfFinOrder.orderOf_pos` but with one fewer explicit assumption since this
is automatic in case of a finite cancellative monoid. -/
@[to_additive "This is the same as `IsOfFinAddOrder.addOrderOf_pos` but with one fewer explicit
assumption since this is automatic in case of a finite cancellative additive monoid."]
lemma orderOf_pos (x : G) : 0 < orderOf x

{G : Type u_1}
[LeftCancelMonoid G]
[Finite G]
(x : G)


theorem Ioi_mem_nhdsSet_Ico (h : a < b) : Ioi a ∈ 𝓝ˢ (Ico b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c : α}
(h : a < b)


@[simp]
theorem logb_zero : logb b 0 = 0


/-- `Real.sinh` as a `Homeomorph`. -/
@[simps! (config := .asFn)]
def sinhHomeomorph : ℝ ≃ₜ ℝ


/-- This is a weaker version of `sInf_sup_eq` -/
theorem sInf_sup_le_iInf_sup : sInf s ⊔ a ≤ ⨅ b ∈ s, b ⊔ a

{α : Type u_1}
[CompleteLattice α]
{a : α}
{s : Set α}


@[simp] lemma liftRelAux_inr_inr {ca cb} :
    LiftRelAux R C (Sum.inr ca) (Sum.inr cb) = C ca cb

{C : Computation α → Computation β → Prop}

Computation.LiftRelAux R C (Sum.inr ca) (Sum.inr cb) = C ca cb


@[simp]
theorem map_def {α β} : ((· <$> ·) : (α → β) → Erased α → Erased β) = @map _ _


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

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]

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


@[inherit_doc IsLowerSet]
structure LowerSet (α : Type*) [LE α] where
  /-- The carrier of a `LowerSet`. -/
  carrier : Set α
  /-- The carrier of a `LowerSet` is a lower set. -/
  lower' : IsLowerSet carrier

{α : Type u_6}
[LE α]
(self : LowerSet α)


theorem traceForm_isSymm : (traceForm R S).IsSymm

(R : Type u_1)
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]


theorem multichoose_neg_add (n k : ℕ) : multichoose (-n : ℤ) (n + k + 1) = 0


theorem facets_bot : (⊥ : SimplicialComplex 𝕜 E).facets = ∅

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]


theorem fiber_card_ne_zero_iff_mem_image (s : Finset α) (f : α → β) [DecidableEq β] (y : β) :
    (s.filter fun x => f x = y).card ≠ 0 ↔ y ∈ s.image f

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

(Finset.filter (fun x => f x = y) s).card ≠ 0 ↔ y ∈ Finset.image f s


theorem inv {x y : α} (h₁ : Acc r x) (h₂ : r y x) : Acc r y

{α : Sort u}
{r : α → α → Prop}
{x y : α}
(h₁ : Acc r x)
(h₂ : r y x)


@[reassoc (attr := simp)]
theorem inverse_counitInv_comp (e : C ≌ D) (Y : D) :
    e.inverse.map (e.counitInv.app Y) ≫ e.unitInv.app (e.inverse.obj Y) = 𝟙 (e.inverse.obj Y)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
(Y : D)

CategoryTheory.CategoryStruct.comp (e.inverse.map (e.counitInv.app Y)) (e.unitInv.app (e.inverse.obj Y)) =
  CategoryTheory.CategoryStruct.id (e.inverse.obj Y)


theorem IsSemisimple.sub_of_commute : (f - g).IsSemisimple

{M : Type u_2}
[AddCommGroup M]
{K : Type u_3}
[Field K]
[Module K M]
{f g : Module.End K M}
[FiniteDimensional K M]
[PerfectField K]
(comm : Commute f g)
(hf : f.IsSemisimple)
(hg : g.IsSemisimple)


theorem perm_of_nodup_nodup_toFinset_eq (hl : Nodup l) (hl' : Nodup l')
    (h : l.toFinset = l'.toFinset) : l ~ l'

{α : Type u_1}
[DecidableEq α]
{l l' : List α}
(hl : l.Nodup)
(hl' : l'.Nodup)
(h : l.toFinset = l'.toFinset)


lemma eq_div_iff_mul_eq (hc : c ≠ 0) : a = b / c ↔ a * c = b

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


@[simp]
theorem not_lt_neg_one (a : SignType) : ¬a < -1


@[simp]
theorem id_map' (x : F α) : (fun _i a => a) <$$> x = x

{n : ℕ}
{α : TypeVec.{u} n}
{F : TypeVec.{u} n → Type v}
[MvFunctor F]
[LawfulMvFunctor F]
(x : F α)


@[simp]
theorem mem_sSup_iff : a ∈ sSup S ↔ ∃ s ∈ S, a ∈ s

{α : Type u_1}
[LE α]
{S : Set (LowerSet α)}
{a : α}


theorem convexBodyLT'_neg_mem (x : E K) (hx : x ∈ convexBodyLT' K f w₀) :
    -x ∈ convexBodyLT' K f w₀

(f : NumberField.InfinitePlace K → NNReal)

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

(hx : x ∈ NumberField.mixedEmbedding.convexBodyLT' K f w₀)

-x ∈ NumberField.mixedEmbedding.convexBodyLT' K f w₀


theorem norm_precompL_le (L : E →L[𝕜] Fₗ →L[𝕜] Gₗ) : ‖precompL Eₗ L‖ ≤ ‖L‖

{𝕜 : Type u_1}
{E : Type u_4}
(Eₗ : Type u_5)
{Fₗ : Type u_7}
{Gₗ : Type u_9}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup Eₗ]
[SeminormedAddCommGroup Fₗ]
[SeminormedAddCommGroup Gₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Eₗ]
[NormedSpace 𝕜 Fₗ]
[NormedSpace 𝕜 Gₗ]
(L : E →L[𝕜] Fₗ →L[𝕜] Gₗ)

‖ContinuousLinearMap.precompL Eₗ L‖ ≤ ‖L‖


@[simp]
theorem kernelSubobjectIsoComp_inv_arrow {X' : C} (f : X' ⟶ X) [IsIso f] (g : X ⟶ Y) [HasKernel g] :
    (kernelSubobjectIsoComp f g).inv ≫ (kernelSubobject (f ≫ g)).arrow =
      (kernelSubobject g).arrow ≫ inv f

(CategoryTheory.Limits.kernelSubobjectIsoComp f g).inv ≫ (CategoryTheory.Limits.kernelSubobject (f ≫ g)).arrow =
  (CategoryTheory.Limits.kernelSubobject g).arrow ≫ CategoryTheory.inv f


@[to_additive (attr := simp) norm_zero]
theorem norm_one' : ‖(1 : E)‖ = 0


lemma killingForm_nondegenerate :
    (killingForm R L).Nondegenerate

(R : Type u_1)
(L : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsKilling R L]


theorem fst_diag {α : TypeVec n} : TypeVec.prod.fst ⊚ (prod.diag : α ⟹ _) = id

TypeVec.comp TypeVec.prod.fst TypeVec.prod.diag = TypeVec.id


@[simp, norm_cast] lemma coe_mul (f g : Perm α) : ⇑(f * g) = f ∘ g


theorem prod_symm : (e₁.prod e₂).symm = e₁.symm.prod e₂.symm

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
{M₄ : Type z}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[AddCommMonoid M₄]
{module_M : Module R M}
{module_M₂ : Module R M₂}
{module_M₃ : Module R M₃}
{module_M₄ : Module R M₄}
(e₁ : M ≃ₗ[R] M₂)
(e₂ : M₃ ≃ₗ[R] M₄)


@[simp]
theorem PullbackCone.fst_limit_cone {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [HasLimit (cospan f g)] :
    PullbackCone.fst (limit.cone (cospan f g)) = pullback.fst f g

[CategoryTheory.Limits.HasLimit (CategoryTheory.Limits.cospan f g)]

CategoryTheory.Limits.PullbackCone.fst (CategoryTheory.Limits.limit.cone (CategoryTheory.Limits.cospan f g)) =
  CategoryTheory.Limits.pullback.fst f g


@[simp]
theorem antidiagonal_map_snd (s : Multiset α) : (antidiagonal s).map Prod.snd = powerset s

Multiset.map Prod.snd s.antidiagonal = s.powerset


theorem card_sum [Finite α] [Finite β] : Nat.card (α ⊕ β) = Nat.card α + Nat.card β

{α : Type u_1}
{β : Type u_2}
[Finite α]
[Finite β]


@[simp]
theorem coe_prod (K : Compacts α) (L : Compacts β) :
    (K.prod L : Set (α × β)) = (K : Set α) ×ˢ (L : Set β)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(K : TopologicalSpace.Compacts α)
(L : TopologicalSpace.Compacts β)


theorem not_prime_of_dvd_of_lt {m n : ℕ} (h1 : m ∣ n) (h2 : 2 ≤ m) (h3 : m < n) : ¬Prime n


theorem neZero_iff {n : R} : NeZero n ↔ n ≠ 0


theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set α}
(H : Function.Surjective f)


/-- If all elements in a list are bounded below by `1`, then the length of the list is bounded
by the sum of the elements. -/
theorem length_le_sum_of_one_le (L : List ℕ) (h : ∀ i ∈ L, 1 ≤ i) : L.length ≤ L.sum


theorem IsLowerSet.preimage (hs : IsLowerSet s) {f : β → α} (hf : Monotone f) :
    IsLowerSet (f ⁻¹' s : Set β)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set α}
(hs : IsLowerSet s)
{f : β → α}
(hf : Monotone f)


theorem of_openCover
    (𝒰 : Y.OpenCover) [∀ i, IsAffine (𝒰.obj i)] (h𝒰 : ∀ i, Q (𝒰.pullbackHom f i)) :
    P f

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

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

(h𝒰 : ∀ (i : (𝒰.pullbackCover f).J), Q (𝒰.pullbackHom f i))


@[to_additive]
theorem Nonempty.of_mul_right : (s * t).Nonempty → t.Nonempty


theorem strictMono_sym2 : StrictMono (Finset.sym2 : Finset α → _)


/-- For a quasi ergodic map, sets that are almost invariant (rather than strictly invariant) are
still either almost empty or full. -/
theorem ae_empty_or_univ₀ (hf : QuasiErgodic f μ) (hsm : NullMeasurableSet s μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ

(hsm : MeasureTheory.NullMeasurableSet s μ)


/-- Binary strict **rearrangement inequality**. -/
lemma smul_add_smul_lt_smul_add_smul' [PosSMulStrictMono α β]
    {b₁ b₂ : α} {a d : β} (hba : b₂ < b₁) (hdc : d < a) :
    b₁ • d + b₂ • a < b₁ • a + b₂ • d

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
{b₁ b₂ : α}
{a d : β}
(hba : b₂ < b₁)
(hdc : d < a)


/-- Any nonempty Polish space is the continuous image of the fundamental space `ℕ → ℕ`. -/
theorem exists_nat_nat_continuous_surjective (α : Type*) [TopologicalSpace α] [PolishSpace α]
    [Nonempty α] : ∃ f : (ℕ → ℕ) → α, Continuous f ∧ Surjective f

(α : Type u_3)
[TopologicalSpace α]
[PolishSpace α]
[Nonempty α]

∃ f, Continuous f ∧ Function.Surjective f


@[simp, norm_cast]
theorem coe_one : (↑(1 : FractionalIdeal S P) : Submodule R P) = 1

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


@[simp]
theorem coprime_self_add_right {m n : ℕ} : Coprime m (m + n) ↔ Coprime m n


@[to_additive zsmul_nonneg]
theorem one_le_zpow {x : G} (H : 1 ≤ x) {n : ℤ} (hn : 0 ≤ n) : 1 ≤ x ^ n

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


/-- The natural isomorphism between functors `G.unop ≅ F.unop` induced by a natural isomorphism
between the original functors `F ≅ G`. -/
@[simps]
protected def unop {F G : Cᵒᵖ ⥤ Dᵒᵖ} (α : F ≅ G) : G.unop ≅ F.unop

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

(CategoryTheory.NatIso.unop α).hom = CategoryTheory.NatTrans.unop α.hom


theorem lt_iff_ssubset {s₁ s₂ : Finset α} : s₁ < s₂ ↔ s₁ ⊂ s₂

s₁ < s₂ ↔ s₁ ⊂ s₂


theorem sub_apply : (s - t) a = s a - t a

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommGroup R]
{α : Type u_3}
{s t : HahnSeries.SummableFamily Γ R α}
{a : α}


/-- The braiding isomorphism is symmetric. -/
theorem coprod.symmetry (P Q : C) : (coprod.braiding P Q).hom ≫ (coprod.braiding Q P).hom = 𝟙 _

(CategoryTheory.Limits.coprod.braiding P Q).hom ≫ (CategoryTheory.Limits.coprod.braiding Q P).hom = 𝟙 (P ⨿ Q)


@[to_additive]
theorem mem_smul : b ∈ s • t ↔ ∃ x ∈ s, ∃ y ∈ t, x • y = b

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{s : Set α}
{t : Set β}
{b : β}


/-- The cardinals are well-ordered. We express it here by the fact that in any set of cardinals
there is an element that injects into the others.
See `Cardinal.conditionallyCompleteLinearOrderBot` for (one of) the lattice instances. -/
theorem min_injective [I : Nonempty ι] : ∃ i, Nonempty (∀ j, β i ↪ β j)

{ι : Type u}
(β : ι → Type v)
[I : Nonempty ι]


/-- `IntermediateField.extendScalars.orderIso` bundles `IntermediateField.extendScalars`
into an order isomorphism from
`{ E : IntermediateField K L // F ≤ E }` to `IntermediateField F L`. Its inverse is
`IntermediateField.restrictScalars`. -/
@[simps]
def extendScalars.orderIso : { E : IntermediateField K L // F ≤ E } ≃o IntermediateField F L

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(F : IntermediateField K L)
(E : { E // F ≤ E })

(IntermediateField.extendScalars.orderIso F) E = IntermediateField.extendScalars ⋯


@[simp]
theorem degree_mul : degree (p * q) = degree p + degree q

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : R[X]}


theorem takeWhile_cons (p : α → Bool) (a : α) (l : List α) :
    (a :: l).takeWhile p = if p a then a :: l.takeWhile p else []

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

List.takeWhile p (a :: l) = if p a = true then a :: List.takeWhile p l else []


/-- The isomorphism between `F.leftOp.rightOp` and `F`. -/
@[simps!]
def leftOpRightOpIso (F : C ⥤ Dᵒᵖ) : F.leftOp.rightOp ≅ F

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

F.leftOpRightOpIso.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)


theorem dist_vsub_vsub_le (p₁ p₂ p₃ p₄ : P) :
    dist (p₁ -ᵥ p₂) (p₃ -ᵥ p₄) ≤ dist p₁ p₃ + dist p₂ p₄

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p₁ p₂ p₃ p₄ : P)


@[simps]
instance inhabited [Inhabited V] : Inhabited G.ConnectedComponent

{V : Type u}
{G : SimpleGraph V}
[Inhabited V]

default = G.connectedComponentMk default


/-- The isomorphism `S₁.leftHomology ≅ S₂.leftHomology` induced by an isomorphism of
short complexes `S₁ ≅ S₂`. -/
@[simps]
noncomputable def leftHomologyMapIso (e : S₁ ≅ S₂) [S₁.HasLeftHomology]
    [S₂.HasLeftHomology] : S₁.leftHomology ≅ S₂.leftHomology

(CategoryTheory.ShortComplex.leftHomologyMapIso e).inv = CategoryTheory.ShortComplex.leftHomologyMap e.inv


theorem NormedSpace.sphere_nonempty_rclike [Nontrivial E] {r : ℝ} (hr : 0 ≤ r) :
    Nonempty (sphere (0 : E) r)

(𝕜 : Type u_1)
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[Nontrivial E]
{r : ℝ}
(hr : 0 ≤ r)


theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source)

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

(e.trans e').source = e.source ∩ ↑e ⁻¹' (e.target ∩ e'.source)


/-- A type is either a subsingleton or nontrivial. -/
theorem subsingleton_or_nontrivial (α : Type*) : Subsingleton α ∨ Nontrivial α


@[simp, elementwise]
theorem biproductIsoPi_inv_comp_π (f : J → AddCommGrp.{u}) (j : J) :
    (biproductIsoPi f).inv ≫ biproduct.π f j = Pi.evalAddMonoidHom (fun j => f j) j

{J : Type}
[Finite J]
(f : J → AddCommGrp)
(j : J)

(AddCommGrp.biproductIsoPi f).inv ≫ CategoryTheory.Limits.biproduct.π f j = Pi.evalAddMonoidHom (fun j => ↑(f j)) j


@[ext]
theorem ext (h : ∀ s, MeasurableSet s → μ₁ s = μ₂ s) : μ₁ = μ₂

(h : ∀ (s : Set α), MeasurableSet s → μ₁ s = μ₂ s)


lemma commute_toEnd_of_mem_center_right :
    Commute (toEnd R L M y) (toEnd R L M x)

{R : Type u}
{L : Type v}
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{x : L}
(hx : x ∈ LieAlgebra.center R L)
(y : L)

Commute ((LieModule.toEnd R L M) y) ((LieModule.toEnd R L M) x)


theorem Context.eq_of_norm (ctx : Context α) (a b : Expr) (h : norm ctx a == norm ctx b) : eval α ctx a = eval α ctx b

(h : (Lean.Data.AC.norm ctx a == Lean.Data.AC.norm ctx b) = true)

Lean.Data.AC.eval α ctx a = Lean.Data.AC.eval α ctx b


/-- The Kahler form on an oriented real inner product space of dimension 2 can be evaluated in terms
of a complex-number representation of the space. -/
theorem kahler_map_complex (f : E ≃ₗᵢ[ℝ] ℂ)
    (hf : Orientation.map (Fin 2) f.toLinearEquiv o = Complex.orientation) (x y : E) :
    o.kahler x y = conj (f x) * f y

[Fact (FiniteDimensional.finrank ℝ E = 2)]

(hf : (Orientation.map (Fin 2) f.toLinearEquiv) o = Complex.orientation)

(o.kahler x) y = (starRingEnd ℂ) (f x) * f y


theorem tendsto_pow_atTop_nhds_zero_of_lt_one {𝕜 : Type*} [LinearOrderedField 𝕜] [Archimedean 𝕜]
    [TopologicalSpace 𝕜] [OrderTopology 𝕜] {r : 𝕜} (h₁ : 0 ≤ r) (h₂ : r < 1) :
    Tendsto (fun n : ℕ ↦ r ^ n) atTop (𝓝 0)

{𝕜 : Type u_4}
[LinearOrderedField 𝕜]
[Archimedean 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{r : 𝕜}
(h₁ : 0 ≤ r)
(h₂ : r < 1)

Filter.Tendsto (fun n => r ^ n) Filter.atTop (𝓝 0)


@[to_additive (attr := simp)]
lemma continuousAt_inv_iff : ContinuousAt f⁻¹ x ↔ ContinuousAt f x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[InvolutiveInv G]
[ContinuousInv G]
[TopologicalSpace α]
{f : α → G}
{x : α}


theorem count_erase (a b : α) :
    ∀ l : List α, count a (l.erase b) = count a l - if a = b then 1 else 0

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

List.count a (l.erase b) = List.count a l - if a = b then 1 else 0


@[simp, norm_cast]
theorem coe_le_coe : (p : E → ℝ) ≤ q ↔ p ≤ q

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

⇑p ≤ ⇑q ↔ p ≤ q


theorem ringEquiv_symm_apply (e : α ≃ β) [Add β] [Mul β] (b : β) : by
    letI := Equiv.add e
    letI := Equiv.mul e
    exact (ringEquiv e).symm b = e.symm b

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Add β]
[Mul β]
(b : β)

(RingEquiv.symm e.ringEquiv) b = e.symm b


/-- If L is an algebraic field extension of K and A is an algebraic algebra over L,
then A is algebraic over K. -/
protected theorem Algebra.IsAlgebraic.trans
    [L_alg : Algebra.IsAlgebraic K L] [A_alg : Algebra.IsAlgebraic L A] :
    Algebra.IsAlgebraic K A

{K : Type u_1}
{L : Type u_2}
{A : Type u_5}
[Field K]
[Field L]
[Ring A]
[Algebra K L]
[Algebra L A]
[Algebra K A]
[IsScalarTower K L A]
[L_alg : Algebra.IsAlgebraic K L]
[A_alg : Algebra.IsAlgebraic L A]


@[norm_cast]
theorem coe_pow (n : ℕ) : ((f ^ n : PowerSeries R) : LaurentSeries R) = (ofPowerSeries ℤ R f) ^ n

{R : Type u_1}
[Semiring R]
(f : PowerSeries R)
(n : ℕ)

(HahnSeries.ofPowerSeries ℤ R) (f ^ n) = (HahnSeries.ofPowerSeries ℤ R) f ^ n


@[reassoc (attr := simp 1100)]
theorem cofan_inj_naturality_symm {S₁ S₂ : Split C} (Φ : S₁ ⟶ S₂) {Δ : SimplexCategoryᵒᵖ}
    (A : Splitting.IndexSet Δ) :
    (S₁.s.cofan Δ).inj A ≫ Φ.F.app Δ = Φ.f A.1.unop.len ≫ (S₂.s.cofan Δ).inj A

(A : SimplicialObject.Splitting.IndexSet Δ)

(S₁.s.cofan Δ).inj A ≫ Φ.F.app Δ = Φ.f (Opposite.unop A.fst).len ≫ (S₂.s.cofan Δ).inj A


@[simp]
theorem eigenvectorUnitary_apply (i j : n) :
    eigenvectorUnitary hA i j = ⇑(hA.eigenvectorBasis j) i

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

↑hA.eigenvectorUnitary i j = (WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)) (hA.eigenvectorBasis j) i


lemma card_image_equiv (e : α ≃ β) : Nat.card (e '' s) = Nat.card s

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


/-- For all positive bases, there exist infinite **Fermat pseudoprimes** to that base.
Given in this form: for all numbers `b ≥ 1` and `m`, there exists a pseudoprime `n` to base `b` such
that `m ≤ n`. This form is similar to `Nat.exists_infinite_primes`.
-/
theorem exists_infinite_pseudoprimes {b : ℕ} (h : 1 ≤ b) (m : ℕ) :
    ∃ n : ℕ, FermatPsp n b ∧ m ≤ n


theorem starConvex_iff_openSegment_subset (hx : x ∈ s) :
    StarConvex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → openSegment 𝕜 x y ⊆ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{x : E}
{s : Set E}
(hx : x ∈ s)

StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → openSegment 𝕜 x y ⊆ s


theorem shift_shift' (i j : A) :
    f⟦i⟧'⟦j⟧' = (shiftAdd X i j).inv ≫ f⟦i + j⟧' ≫ (shiftAdd Y i j).hom

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(X Y : C)
(f : X ⟶ Y)
(i j : A)

(CategoryTheory.shiftFunctor C j).map ((CategoryTheory.shiftFunctor C i).map f) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.shiftAdd X i j).inv
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor C (i + j)).map f)
      (CategoryTheory.shiftAdd Y i j).hom)


@[to_additive (attr := simp)]
theorem mul_leftInvEquiv_symm (x : S) : (x : M) * (S.leftInvEquiv hS).symm x = 1

{M : Type u_1}
[AddCommMonoid M]
(S : AddSubmonoid M)
(hS : S ≤ IsAddUnit.addSubmonoid M)
(x : ↥S)


theorem OrderIso.essInf_apply {_ : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essInf f μ) = essInf (fun x => g (f x)) μ

{α : Type u_1}
{β : Type u_2}
[CompleteLattice β]

∀ {x : MeasurableSpace α} {γ : Type u_3} [inst : CompleteLattice γ] (f : α → β) (μ : MeasureTheory.Measure α)
  (g : β ≃o γ), g (essInf f μ) = essInf (fun x => g (f x)) μ


/-- If the measure of the symmetric difference of two sets is finite,
then one has infinite measure if and only if the other one does. -/
theorem measure_eq_top_iff_of_symmDiff (hμst : μ (s ∆ t) ≠ ∞) : μ s = ∞ ↔ μ t = ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(hμst : μ (symmDiff s t) ≠ ⊤)

μ s = ⊤ ↔ μ t = ⊤


theorem Prefunctor.costar_comp (u : U) : (φ ⋙q ψ).costar u = ψ.costar (φ.obj u) ∘ φ.costar u

{U : Type u_1}
[Quiver U]
{V : Type u_3}
[Quiver V]
(φ : U ⥤q V)
{W : Type u_2}
[Quiver W]
(ψ : V ⥤q W)
(u : U)


@[simp]
theorem linear_eq_linear_isometry : e.linear = e.linearIsometryEquiv.toLinearEquiv

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)


theorem normalize_one : normalize (1 : α) = 1

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]


/-- A topological space `X` is an H-space if it behaves like a (potentially non-associative)
topological group, but where the axioms for a group only hold up to homotopy.
-/
class HSpace (X : Type u) [TopologicalSpace X] where
  hmul : C(X × X, X)
  e : X
  hmul_e_e : hmul (e, e) = e
  eHmul :
    (hmul.comp <| (const X e).prodMk <| ContinuousMap.id X).HomotopyRel (ContinuousMap.id X) {e}
  hmulE :
    (hmul.comp <| (ContinuousMap.id X).prodMk <| const X e).HomotopyRel (ContinuousMap.id X) {e}

{X : Type u}
[TopologicalSpace X]
[self : HSpace X]

HSpace.hmul (HSpace.e, HSpace.e) = HSpace.e


theorem list_indexOf [DecidableEq α] : Primrec₂ (@List.indexOf α _)

{α : Type u_1}
[Primcodable α]
[DecidableEq α]


@[ext]
theorem Hom.ext' {X Y : SheafOfTypes J} (f g : X ⟶ Y) (w : f.val = g.val) : f = g

{J : CategoryTheory.GrothendieckTopology C}


/-- The topological sum of `ZetaAsymptotics.term (n + 1) 1` over all `n : ℕ` is `1 - γ`. This is
proved by directly evaluating the sum of the first `N` terms and using the limit definition of `γ`.
-/
lemma term_tsum_one : HasSum (fun n ↦ term (n + 1) 1) (1 - γ)

HasSum (fun n => ZetaAsymptotics.term (n + 1) 1) (1 - γ)


@[simp]
theorem zip_swap : ∀ (l₁ : List α) (l₂ : List β), (zip l₁ l₂).map Prod.swap = zip l₂ l₁

{α : Type u}
{β : Type u_1}
(l₁ : List α)
(l₂ : List β)

List.map Prod.swap (l₁.zip l₂) = l₂.zip l₁


/-- The functor from augmented objects to arrows. -/
@[simps!]
def toArrow : Augmented C ⥤ Arrow C

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

∀ {X Y : CategoryTheory.CosimplicialObject.Augmented C} (η : X ⟶ Y),
  (CategoryTheory.CosimplicialObject.Augmented.toArrow.map η).left = η.left


/-- The disjoint union of antidiagonals `Σ (n : A), antidiagonal n` is equivalent to the product
    `A × A`. This is such an equivalence, obtained by mapping `(n, (k, l))` to `(k, l)`. -/
@[simps]
def sigmaAntidiagonalEquivProd [AddMonoid A] [HasAntidiagonal A] :
    (Σ n : A, antidiagonal n) ≃ A × A

{A : Type u_1}
[AddMonoid A]
[Finset.HasAntidiagonal A]
(x : A × A)

(Finset.sigmaAntidiagonalEquivProd.symm x).fst = x.1 + x.2


@[simp]
theorem coe_topEquiv :
    ⇑(topEquiv : (⊤ : L.Substructure M) ≃[L] M) = ((↑) : (⊤ : L.Substructure M) → M)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]


@[simp]
theorem eqToHom_f {P Q : Karoubi C} (h : P = Q) :
    Karoubi.Hom.f (eqToHom h) = P.p ≫ eqToHom (congr_arg Karoubi.X h)

{P Q : CategoryTheory.Idempotents.Karoubi C}

(CategoryTheory.eqToHom h).f = CategoryTheory.CategoryStruct.comp P.p (CategoryTheory.eqToHom ⋯)


theorem iterate_eq_of_map_eq (h : Commute f g) (n : ℕ) {x} (hx : f x = g x) :
    f^[n] x = g^[n] x

{α : Type u}
{f g : α → α}
(h : Function.Commute f g)
(n : ℕ)
{x : α}
(hx : f x = g x)


/-- **Krein-Milman lemma**: In a LCTVS, any nonempty compact set has an extreme point. -/
theorem IsCompact.extremePoints_nonempty (hscomp : IsCompact s) (hsnemp : s.Nonempty) :
    (s.extremePoints ℝ).Nonempty

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T2Space E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
[LocallyConvexSpace ℝ E]
{s : Set E}
(hscomp : IsCompact s)
(hsnemp : s.Nonempty)


/-- A functorial version of `SimplicialObject.Augmented.rightOp`. -/
@[simps]
def simplicialToCosimplicialAugmented :
    (SimplicialObject.Augmented C)ᵒᵖ ⥤ CosimplicialObject.Augmented Cᵒᵖ

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

∀ {X Y : (CategoryTheory.SimplicialObject.Augmented C)ᵒᵖ} (f : X ⟶ Y),
  ((CategoryTheory.simplicialToCosimplicialAugmented C).map f).left = f.unop.right.op


@[simp]
theorem coeff_X_zero : coeff (X : R[X]) 0 = 0


@[simp]
lemma finsuppRight_symm_apply_single (i : ι) (m : M) (n : N) :
    (finsuppRight R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) =
      m ⊗ₜ[R] Finsupp.single i n

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_4}
[DecidableEq ι]
(i : ι)
(m : M)
(n : N)

(TensorProduct.finsuppRight R M N ι).symm (Finsupp.single i (m ⊗ₜ[R] n)) = m ⊗ₜ[R] Finsupp.single i n


theorem union_right_comm (s₁ s₂ s₃ : Set α) : s₁ ∪ s₂ ∪ s₃ = s₁ ∪ s₃ ∪ s₂

s₁ ∪ s₂ ∪ s₃ = s₁ ∪ s₃ ∪ s₂


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

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)
{S T : Submonoid M}

Submonoid.map f S ≤ Submonoid.map f T ↔ S ≤ T


@[to_additive]
theorem IsCyclic.image_range_card (ha : ∀ x : α, x ∈ zpowers a) :
    Finset.image (fun i => a ^ i) (range (Fintype.card α)) = univ

(ha : ∀ (x : α), x ∈ AddSubgroup.zmultiples a)

Finset.image (fun i => i • a) (Finset.range (Fintype.card α)) = Finset.univ


/-- A pushout cocone on `f` and `g` is determined by morphisms `inl : Y ⟶ W` and `inr : Z ⟶ W` such
    that `f ≫ inl = g ↠ inr`. -/
@[simps]
def mk {W : C} (inl : Y ⟶ W) (inr : Z ⟶ W) (eq : f ≫ inl = g ≫ inr) : PushoutCocone f g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
{W : C}
(inl : Y ⟶ W)
(inr : Z ⟶ W)
(eq : f ≫ inl = g ≫ inr)

(CategoryTheory.Limits.PushoutCocone.mk inl inr eq).pt = W


theorem Frequently.forall_exists_of_atTop [SemilatticeSup α] [Nonempty α] {p : α → Prop}
    (h : ∃ᶠ x in atTop, p x) : ∀ a, ∃ b ≥ a, p b

{α : Type u_3}
[SemilatticeSup α]
[Nonempty α]
{p : α → Prop}
(h : ∃ᶠ (x : α) in Filter.atTop, p x)
(a : α)


theorem IsGreatest.isLeast_image2_of_isLeast (ha : IsGreatest s a) (hb : IsLeast t b) :
    IsLeast (Set.image2 f s t) (f a b)

{f : α → β → γ}

(h₀ : ∀ (b : β), Antitone (Function.swap f b))


theorem map_subtype_embedding_Icc : (Icc a b).map (Embedding.subtype _) = Icc ↑a ↑b

Finset.map (Function.Embedding.subtype fun n => 0 < n) (Finset.Icc a b) = Finset.Icc ↑a ↑b


@[to_additive]
theorem contMDiff_finset_prod' (h : ∀ i ∈ t, ContMDiff I' I n (f i)) :
    ContMDiff I' I n (∏ i ∈ t, f i)

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[CommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul 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]
{t : Finset ι}
{f : ι → M → G}
{n : ℕ∞}
(h : ∀ i ∈ t, ContMDiff I' I n (f i))


/-- Given `f : β → ℝ`, if `f` sends `{i | p i}` to a set of positive numbers
accumulating to zero, then closed neighborhoods of the diagonal of sizes `{f i | p i}`
form a basis of `𝓤 α`.

Currently we have only one specific basis `uniformity_basis_dist_le` based on this constructor.
More can be easily added if needed in the future. -/
protected theorem mk_uniformity_basis_le {β : Type*} {p : β → Prop} {f : β → ℝ}
    (hf₀ : ∀ x, p x → 0 < f x) (hf : ∀ ε, 0 < ε → ∃ x, p x ∧ f x ≤ ε) :
    (𝓤 α).HasBasis p fun x => { p : α × α | dist p.1 p.2 ≤ f x }

(hf : ∀ (ε : ℝ), 0 < ε → ∃ x, p x ∧ f x ≤ ε)

(𝓤 α).HasBasis p fun x => {p | dist p.1 p.2 ≤ f x}


/-- The product of two antitone functions is antitone. -/
@[to_additive add "The sum of two antitone functions is antitone."]
theorem AntitoneOn.mul' [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : AntitoneOn f s) (hg : AntitoneOn g s) :
    AntitoneOn (fun x => f x * g x) s

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

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


theorem Surjective.of_comp {g : γ → α} (S : Surjective (f ∘ g)) : Surjective f

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
{g : γ → α}
(S : Function.Surjective (f ∘ g))


theorem IsPrefix.getElem {x y : List α} (h : x <+: y) {n} (hn : n < x.length) :
    x[n] = y[n]'(hn.trans_le h.length_le)

{α : Type u_1}
{x y : List α}
(h : x <+: y)
{n : ℕ}
(hn : n < x.length)


@[simp]
theorem totient_eq_zero : ∀ {n : ℕ}, φ n = 0 ↔ n = 0


/-- Every derivation of a finite-dimensional Killing Lie algebra is an inner derivation. -/
lemma exists_eq_ad (D : 𝔻) : ∃ x, ad R L x = D

{R : Type u_1}
{L : Type u_2}
[Field R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[LieAlgebra.IsKilling R L]
(D : LieDerivation R L L)


@[simp]
theorem rangeIcc_support (f g : ι →₀ α) :
    (rangeIcc f g).support = f.support ∪ g.support

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[PartialOrder α]
[LocallyFiniteOrder α]
(f g : ι →₀ α)

(f.rangeIcc g).support = f.support ∪ g.support


@[simp]
lemma ofHoms_v_comp_d (ψ : ∀ (p : ℤ), F.X p ⟶ G.X p) (p q q' : ℤ) (hpq : p + 0 = q) :
    (ofHoms ψ).v p q hpq ≫ G.d q q' = ψ p ≫ G.d p q'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
(ψ : (p : ℤ) → F.X p ⟶ G.X p)
(p q q' : ℤ)
(hpq : p + 0 = q)

(CochainComplex.HomComplex.Cochain.ofHoms ψ).v p q hpq ≫ G.d q q' = ψ p ≫ G.d p q'


@[to_additive]
theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i

{I : Type u}
{f : I → Type v₁}
(x y : (i : I) → f i)
[(i : I) → Div (f i)]


@[simp]
theorem rank_top : Module.rank R (⊤ : Submodule R M) = Module.rank R M

(R : Type u)
(M : Type v)
[Ring R]
[AddCommGroup M]
[Module R M]


theorem mem_map_restrict_ae_iff {β} {s : Set α} {t : Set β} {f : α → β} (hs : MeasurableSet s) :
    t ∈ Filter.map f (ae (μ.restrict s)) ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_7}
{s : Set α}
{t : Set β}
{f : α → β}
(hs : MeasurableSet s)

t ∈ Filter.map f (MeasureTheory.ae (μ.restrict s)) ↔ μ ((f ⁻¹' t)ᶜ ∩ s) = 0


theorem uniformContinuous (f : F) : UniformContinuous (f : β → γ)

{F : Type u_1}
{β : Type v}
{γ : Type w}
[UniformSpace β]
[UniformSpace γ]
[Zero γ]
[FunLike F β γ]
[ZeroAtInftyContinuousMapClass F β γ]
(f : F)


@[deprecated getElem?_modifyNth_ne (since := "2024-06-12")]
theorem get?_modifyNth_ne (f : α → α) {m n} (l : List α) (h : m ≠ n) :
    (modifyNth f m l).get? n = l.get? n

{α : Type u_1}
(f : α → α)
{m n : Nat}
(l : List α)
(h : m ≠ n)

(List.modifyNth f m l).get? n = l.get? n