theorem union_cylinder (s₁ s₂ : Finset ι) (S₁ : Set (∀ i : s₁, α i)) (S₂ : Set (∀ i : s₂, α i))
    [DecidableEq ι] :
    cylinder s₁ S₁ ∪ cylinder s₂ S₂ =
      cylinder (s₁ ∪ s₂)
        ((fun f ↦ fun j : s₁ ↦ f ⟨j, Finset.mem_union_left s₂ j.prop⟩) ⁻¹' S₁ ∪
          (fun f ↦ fun j : s₂ ↦ f ⟨j, Finset.mem_union_right s₁ j.prop⟩) ⁻¹' S₂)

(S₁ : Set ((i : { x // x ∈ s₁ }) → α ↑i))

(S₂ : Set ((i : { x // x ∈ s₂ }) → α ↑i))

MeasureTheory.cylinder s₁ S₁ ∪ MeasureTheory.cylinder s₂ S₂ =
  MeasureTheory.cylinder (s₁ ∪ s₂) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₁ ∪ (fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S₂)


theorem update_strictMono : StrictMono (update f i)

{ι : Type u_1}
{π : ι → Type u_3}
[DecidableEq ι]
[(i : ι) → Preorder (π i)]
{f : (i : ι) → π i}
{i : ι}


lemma bounded (hf : IsCauSeq abv f) : ∃ r, ∀ i, abv (f i) < r

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{f : ℕ → β}
(hf : IsCauSeq abv f)


theorem integral_nonneg (hab : a ≤ b) (hf : ∀ u, u ∈ Icc a b → 0 ≤ f u) : 0 ≤ ∫ u in a..b, f u ∂μ

{f : ℝ → ℝ}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(hab : a ≤ b)
(hf : ∀ u ∈ Set.Icc a b, 0 ≤ f u)


theorem inf_def : s.inf f = (s.1.map f).inf

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderTop α]
{s : Finset β}
{f : β → α}


@[to_additive]
theorem op_iInf (S : ι → Submonoid M) : (iInf S).op = ⨅ i, (S i).op

{ι : Sort u_1}
{M : Type u_2}
[AddZeroClass M]
(S : ι → AddSubmonoid M)


@[aesop (rule_sets := [builtin]) norm destruct]
theorem pEmpty_false (h : PEmpty) : False


/-- See also `continuousAt_cpow_const` for a version that assumes `z ≠ 0` but makes no
assumptions about `w`. -/
theorem continuousAt_cpow_const_of_re_pos {z w : ℂ} (hz : 0 ≤ re z ∨ im z ≠ 0) (hw : 0 < re w) :
    ContinuousAt (fun x => x ^ w) z

{z w : ℂ}
(hz : 0 ≤ z.re ∨ z.im ≠ 0)
(hw : 0 < w.re)


theorem surjOn_iUnion {s : Set α} {t : ι → Set β} {f : α → β} (H : ∀ i, SurjOn f s (t i)) :
    SurjOn f s (⋃ i, t i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{s : Set α}
{t : ι → Set β}
{f : α → β}
(H : ∀ (i : ι), Set.SurjOn f s (t i))


/-- $aba^{-1}$ is a vector. -/
theorem ι_mul_ι_mul_invOf_ι (a b : M) [Invertible (ι Q a)] [Invertible (Q a)] :
    ι Q a * ι Q b * ⅟ (ι Q a) = ι Q ((⅟ (Q a) * QuadraticMap.polar Q a b) • a - b)

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

(CliffordAlgebra.ι Q) a * (CliffordAlgebra.ι Q) b * ⅟((CliffordAlgebra.ι Q) a) =
  (CliffordAlgebra.ι Q) ((⅟(Q a) * QuadraticMap.polar (⇑Q) a b) • a - b)


@[to_additive]
theorem index_map_eq {f : G →* G'} (hf1 : Function.Surjective f)
    (hf2 : f.ker ≤ H) : (H.map f).index = H.index

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']
(H : AddSubgroup G)
{f : G →+ G'}
(hf1 : Function.Surjective ⇑f)
(hf2 : f.ker ≤ H)


@[to_additive]
theorem SemiconjBy.function_semiconj_mul_right_swap (h : SemiconjBy a b c) :
    Function.Semiconj (· * a) (· * c) (· * b)

{G : Type u_3}
[AddSemigroup G]
{a b c : G}
(h : AddSemiconjBy a b c)

Function.Semiconj (fun x => x + a) (fun x => x + c) fun x => x + b


@[simp]
theorem restrictScalars_closedBall (p : Seminorm 𝕜' E) :
    (p.restrictScalars 𝕜).closedBall = p.closedBall

(𝕜 : Type u_3)
{E : Type u_7}
{𝕜' : Type u_13}
[NormedField 𝕜]
[SeminormedRing 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormOneClass 𝕜']
[AddCommGroup E]
[Module 𝕜' E]
[SMul 𝕜 E]
[IsScalarTower 𝕜 𝕜' E]
(p : Seminorm 𝕜' E)

(Seminorm.restrictScalars 𝕜 p).closedBall = p.closedBall


@[reassoc]
lemma ι_totalShift₂Iso_hom_f (a b n : ℤ) (h : a + b = n) (b' : ℤ) (hb' : b' = b + y)
    (n' : ℤ) (hn' : n' = n + y) :
    ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
      (a * y).negOnePow • (K.shiftFunctor₂XXIso a b y b' hb').hom ≫
        K.ιTotal (up ℤ) a b' n' (by dsimp; omega) ≫
          (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n n' hn').inv

(K : HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ))

((HomologicalComplex₂.shiftFunctor₂ C y).obj K).ιTotal (ComplexShape.up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
  (a * y).negOnePow •
    (K.shiftFunctor₂XXIso a b y b' hb').hom ≫
      K.ιTotal (ComplexShape.up ℤ) a b' n' ⋯ ≫
        (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) y n n' hn').inv


theorem SameCycle.exists_pow_eq'' [Finite α] (h : SameCycle f x y) :
    ∃ i : ℕ, 0 < i ∧ i ≤ orderOf f ∧ (f ^ i) x = y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
[Finite α]
(h : f.SameCycle x y)

∃ i, 0 < i ∧ i ≤ orderOf f ∧ (f ^ i) x = y


theorem π_tensor_id_preserves_coequalizer_inv_colimMap_desc {X Y Z X' Y' Z' : C} (f g : X ⟶ Y)
    (f' g' : X' ⟶ Y') (p : X ⊗ Z ⟶ X') (q : Y ⊗ Z ⟶ Y') (wf : (f ▷ Z) ≫ q = p ≫ f')
    (wg : (g ▷ Z) ≫ q = p ≫ g') (h : Y' ⟶ Z') (wh : f' ≫ h = g' ≫ h) :
    (coequalizer.π f g ▷ Z) ≫
        (PreservesCoequalizer.iso (tensorRight Z) f g).inv ≫
          colimMap (parallelPairHom (f ▷ Z) (g ▷ Z) f' g' p q wf wg) ≫ coequalizer.desc h wh =
      q ≫ h

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

CategoryTheory.Limits.coequalizer.π f g ▷ Z ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso (CategoryTheory.MonoidalCategory.tensorRight Z) f g).inv ≫
      CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom (f ▷ Z) (g ▷ Z) f' g' p q wf wg) ≫
        CategoryTheory.Limits.coequalizer.desc h wh =
  q ≫ h


theorem hasGradientWithinAt_iff_tendsto :
    HasGradientWithinAt f f' s x ↔
    Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - ⟪f', x' - x⟫‖) (𝓝[s] x) (𝓝 0)

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{s : Set F}

HasGradientWithinAt f f' s x ↔ Filter.Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - ⟪f', x' - x⟫_𝕜‖) (𝓝[s] x) (𝓝 0)


/-- Convergence in Lp implies uniform tightness. -/
private theorem unifTight_of_tendsto_Lp (hp' : p ≠ ∞) (hf : ∀ n, Memℒp (f n) p μ)
    (hg : Memℒp g p μ) (hfg : Tendsto (fun n => eLpNorm (f n - g) p μ) atTop (𝓝 0)) :
    UnifTight f p μ

{f : ℕ → α → β}

(hf : ∀ (n : ℕ), MeasureTheory.Memℒp (f n) p μ)

(hfg : Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n - g) p μ) Filter.atTop (nhds 0))


lemma greatestFib_sub_fib_greatestFib_le_greatestFib (hn : n ≠ 0) :
    greatestFib (n - fib (greatestFib n)) ≤ greatestFib n - 2

(n - Nat.fib n.greatestFib).greatestFib ≤ n.greatestFib - 2


@[simp]
theorem foldr_one (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) : foldr Q f hf n 1 = n

((CliffordAlgebra.foldr Q f hf) n) 1 = n


protected theorem congr_fun {f g : R ≃+* S} (h : f = g) (x : R) : f x = g x

{R : Type u_4}
{S : Type u_5}
[Mul R]
[Mul S]
[Add R]
[Add S]
{f g : R ≃+* S}
(h : f = g)
(x : R)


theorem injOn (h : LeftInvOn f₁' f s) : InjOn f s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{f₁' : β → α}
(h : Set.LeftInvOn f₁' f s)


theorem coe_injective : @Function.Injective (Derivation R A M) (A → M) DFunLike.coe

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]


theorem limsup_eq : limsup u f = sInf { a | ∀ᶠ n in f, u n ≤ a }

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

Filter.limsup u f = sInf {a | ∀ᶠ (n : β) in f, u n ≤ a}


protected lemma ContinuousAt.partialSups_apply (hf : ∀ k ≤ n, ContinuousAt (f k) x) :
    ContinuousAt (fun a ↦ partialSups (f · a) n) x

{L : Type u_1}
[SemilatticeSup L]
[TopologicalSpace L]
[ContinuousSup L]
{X : Type u_2}
[TopologicalSpace X]
{f : ℕ → X → L}
{n : ℕ}
{x : X}
(hf : ∀ k ≤ n, ContinuousAt (f k) x)

ContinuousAt (fun a => (partialSups fun x => f x a) n) x


theorem hasStrictDerivAt_sinh (x : ℝ) : HasStrictDerivAt sinh (cosh x) x

HasStrictDerivAt Real.sinh (Real.cosh x) x


theorem ker_map (f : R →+* S) :
    RingHom.ker (map f : MvPolynomial σ R →+* MvPolynomial σ S) =
    Ideal.map (C : R →+* MvPolynomial σ R) (RingHom.ker f)

{R : Type u}
{S : Type u_1}
{σ : Type v}
[CommRing R]
[CommRing S]
(f : R →+* S)

RingHom.ker (MvPolynomial.map f) = Ideal.map MvPolynomial.C (RingHom.ker f)


/-- If `M ⊕ N` embeds into `M`, for `M` noetherian over `R`, then `N` is trivial. -/
theorem IsNoetherian.subsingleton_of_prod_injective (f : M × N →ₗ[R] M)
    (i : Injective f) : Subsingleton N

{R : Type u_1}
{M : Type u_2}
{N : Type w}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[IsNoetherian R M]
(f : M × N →ₗ[R] M)
(i : Function.Injective ⇑f)


theorem exists_hasEigenvalue_of_iSup_genEigenspace_eq_top [Nontrivial M] {f : End R M}
    (hf : ⨆ μ, ⨆ k, f.genEigenspace μ k = ⊤) :
    ∃ μ, f.HasEigenvalue μ

(hf : ⨆ μ, ⨆ k, (f.genEigenspace μ) k = ⊤)


@[simp]
theorem ε_hom_inv_id : F.ε ≫ F.εIso.inv = 𝟙 _

(F : CategoryTheory.MonoidalFunctor C D)


@[simp]
theorem x_inv (a : Solution₁ d) : a⁻¹.x = a.x


/-- The natural category equivalence between `R`-coalgebras and comonoid objects in the
category of `R`-modules. -/
@[simps]
noncomputable def comonEquivalence : CoalgebraCat R ≌ Comon_ (ModuleCat R)

(CoalgebraCat.comonEquivalence R).inverse = CoalgebraCat.ofComon R


/-- `WalkingParallelPair` as a category is equivalent to a special case of
`WalkingParallelFamily`.  -/
@[simps!]
def walkingParallelFamilyEquivWalkingParallelPair :
    WalkingParallelFamily.{w} (ULift Bool) ≌ WalkingParallelPair

(X : CategoryTheory.Limits.WalkingParallelFamily (ULift.{w, 0} Bool))

CategoryTheory.Limits.walkingParallelFamilyEquivWalkingParallelPair.unitIso.hom.app X = CategoryTheory.eqToHom ⋯


theorem HasAffineProperty.diagonal_of_openCover (P) {Q} [HasAffineProperty P Q]
    {X Y : Scheme.{u}} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover.{u} Y) [∀ i, IsAffine (𝒰.obj i)]
    (𝒰' : ∀ i, Scheme.OpenCover.{u} (pullback f (𝒰.map i))) [∀ i j, IsAffine ((𝒰' i).obj j)]
    (h𝒰' : ∀ i j k,
      Q (pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) (𝒰.pullbackHom f i))) :
    P.diagonal f

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

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

(𝒰' : (i : 𝒰.J) → (CategoryTheory.Limits.pullback f (𝒰.map i)).OpenCover)

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

(h𝒰' :
  ∀ (i : 𝒰.J) (j k : (𝒰' i).J),
    Q (CategoryTheory.Limits.pullback.mapDesc ((𝒰' i).map j) ((𝒰' i).map k) (𝒰.pullbackHom f i)))


/-- An equality of subobjects gives an isomorphism of the corresponding objects. -/
@[simps]
def isoOfEqMk {B A : C} (X : Subobject B) (f : A ⟶ B) [Mono f] (h : X = mk f) : (X : C) ≅ A

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{B A : C}
(X : CategoryTheory.Subobject B)
(f : A ⟶ B)
[CategoryTheory.Mono f]
(h : X = CategoryTheory.Subobject.mk f)

(X.isoOfEqMk f h).inv = CategoryTheory.Subobject.ofMkLE f X ⋯


{α : Type u_2}
[Preorder α]
{x y : α}
(h : x = y)


protected theorem ext_iff {f g : MultilinearMap R M₁ M₂} : f = g ↔ ∀ x, f x = g x

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

f = g ↔ ∀ (x : (i : ι) → M₁ i), f x = g x


theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r)

(h : DiffContOnCl 𝕜 f (Metric.ball x r))


theorem congr_right (h : g =ᵐ[μ] g') (h_tendsto : TendstoInMeasure μ f l g) :
    TendstoInMeasure μ f l g'

(h_tendsto : MeasureTheory.TendstoInMeasure μ f l g)


theorem Tendsto.isBoundedUnder_ge_atTop (h : Tendsto u f atTop) : f.IsBoundedUnder (· ≥ ·) u

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Nonempty α]
{f : Filter β}
{u : β → α}
(h : Filter.Tendsto u f Filter.atTop)

Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u


@[simp]
theorem sSup_apply {Ss : Set (Sieve X)} {Y} (f : Y ⟶ X) :
    sSup Ss f ↔ ∃ (S : Sieve X) (_ : S ∈ Ss), S f

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

(sSup Ss).arrows f ↔ ∃ S, ∃ (_ : S ∈ Ss), S.arrows f


/-- A continuous function with compact support is integrable on the whole space. -/
theorem Continuous.integrable_of_hasCompactSupport (hf : Continuous f) (hcf : HasCompactSupport f) :
    Integrable f μ


theorem infix_cons_iff : l₁ <:+: a :: l₂ ↔ l₁ <+: a :: l₂ ∨ l₁ <:+: l₂

∀ {α : Type u_1} {l₁ : List α} {a : α} {l₂ : List α}, l₁ <:+: a :: l₂ ↔ l₁ <+: a :: l₂ ∨ l₁ <:+: l₂


theorem BddAbove.exists_ge [SemilatticeSup γ] {s : Set γ} (hs : BddAbove s) (x₀ : γ) :
    ∃ x, x₀ ≤ x ∧ ∀ y ∈ s, y ≤ x

{γ : Type w}
[SemilatticeSup γ]
{s : Set γ}
(hs : BddAbove s)
(x₀ : γ)


theorem integral_finset_biUnion {ι : Type*} (t : Finset ι) {s : ι → Set X}
    (hs : ∀ i ∈ t, MeasurableSet (s i)) (h's : Set.Pairwise (↑t) (Disjoint on s))
    (hf : ∀ i ∈ t, IntegrableOn f (s i) μ) :
    ∫ x in ⋃ i ∈ t, s i, f x ∂μ = ∑ i ∈ t, ∫ x in s i, f x ∂μ

(hf : ∀ i ∈ t, MeasureTheory.IntegrableOn f (s i) μ)

∫ (x : X) in ⋃ i ∈ t, s i, f x ∂μ = ∑ i ∈ t, ∫ (x : X) in s i, f x ∂μ


/-- Given a homomorphism `f` from the quotient of a monoid by a congruence relation, `f` equals the
    homomorphism on the quotient induced by `f` composed with the natural map from the monoid to
    the quotient. -/
@[to_additive (attr := simp) "Given a homomorphism `f` from the quotient of an `AddMonoid` by an
additive congruence relation, `f` equals the homomorphism on the quotient induced by `f` composed
with the natural map from the `AddMonoid` to the quotient."]
theorem lift_apply_mk' (f : c.Quotient →* P) :
    (c.lift (f.comp c.mk') fun x y h => show f ↑x = f ↑y by rw [c.eq.2 h]) = f

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{c : Con M}
(f : c.Quotient →* P)


/-- `star` as a ring automorphism, for commutative `R`. -/
@[simps apply]
def starRingAut : RingAut R

{R : Type u}
[CommSemiring R]
[StarRing R]


/-- A graded version of `Algebra`. An instance of `DirectSum.GAlgebra R A` endows `(⨁ i, A i)`
with an `R`-algebra structure. -/
class GAlgebra where
  toFun : R →+ A 0
  map_one : toFun 1 = GradedMonoid.GOne.one
  map_mul :
    ∀ r s, GradedMonoid.mk _ (toFun (r * s)) = .mk _ (GradedMonoid.GMul.mul (toFun r) (toFun s))
  commutes : ∀ (r) (x : GradedMonoid A), .mk _ (toFun r) * x = x * .mk _ (toFun r)
  smul_def : ∀ (r) (x : GradedMonoid A), r • x = .mk _ (toFun r) * x

{ι : Type uι}
{R : Type uR}
{A : ι → Type uA}
[DecidableEq ι]
[CommSemiring R]
[(i : ι) → AddCommMonoid (A i)]
[(i : ι) → Module R (A i)]
[AddMonoid ι]
[DirectSum.GSemiring A]
[self : DirectSum.GAlgebra R A]

DirectSum.GAlgebra.toFun 1 = GradedMonoid.GOne.one


theorem m_iUnion (v : VectorMeasure α M) {f : ℕ → Set α} (hf₁ : ∀ i, MeasurableSet (f i))
    (hf₂ : Pairwise (Disjoint on f)) : HasSum (fun i => v (f i)) (v (⋃ i, f i))

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)
{f : ℕ → Set α}
(hf₁ : ∀ (i : ℕ), MeasurableSet (f i))
(hf₂ : Pairwise (Disjoint on f))

HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))


theorem sinh_half_dist_add_dist (a b c : ℍ) : sinh ((dist a b + dist b c) / 2) =
    (dist (a : ℂ) b * dist (c : ℂ) (conj ↑b) + dist (b : ℂ) c * dist (a : ℂ) (conj ↑b)) /
      (2 * √(a.im * c.im) * dist (b : ℂ) (conj ↑b))

Real.sinh ((dist a b + dist b c) / 2) =
  (dist ↑a ↑b * dist (↑c) ((starRingEnd ℂ) ↑b) + dist ↑b ↑c * dist (↑a) ((starRingEnd ℂ) ↑b)) /
    (2 * √(a.im * c.im) * dist (↑b) ((starRingEnd ℂ) ↑b))


@[simp]
theorem mem_cutMap_iff : b ∈ cutMap β a ↔ ∃ q : ℚ, (q : α) < a ∧ (q : β) = b

{α : Type u_2}
{β : Type u_3}
[LinearOrderedField α]
[DivisionRing β]
{a : α}
{b : β}

b ∈ LinearOrderedField.cutMap β a ↔ ∃ q, ↑q < a ∧ ↑q = b


/-- The multiplicity of `p` in `(p * (n + 1))!` is one more than the sum
  of the multiplicities of `p` in `(p * n)!` and `n + 1`. -/
theorem multiplicity_factorial_mul_succ {n p : ℕ} (hp : p.Prime) :
    multiplicity p (p * (n + 1))! = multiplicity p (p * n)! + multiplicity p (n + 1) + 1


/-- A non-unital normed ring is a not-necessarily-unital ring
endowed with a norm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalNormedRing (α : Type*) extends Norm α, NonUnitalRing α, MetricSpace α where
  /-- The distance is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = norm (x - y)
  /-- The norm is submultiplicative. -/
  norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b

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


theorem comap_lt_comap_of_root_mem_sdiff [I.IsPrime] (hIJ : I ≤ J) {r : S}
    (hr : r ∈ (J : Set S) \ I) {p : R[X]} (p_ne_zero : p.map (Quotient.mk (I.comap f)) ≠ 0)
    (hp : p.eval₂ f r ∈ I) : I.comap f < J.comap f

(p_ne_zero : Polynomial.map (Ideal.Quotient.mk (Ideal.comap f I)) p ≠ 0)


theorem pi_congr {β' : α → Sort _} (h : ∀ a, β a = β' a) : (∀ a, β a) = ∀ a, β' a

{α : Sort u_1}
{β β' : α → Sort u_2}
(h : ∀ (a : α), β a = β' a)


@[to_additive addCHaar_sup_le]
theorem chaar_sup_le {K₀ : PositiveCompacts G} (K₁ K₂ : Compacts G) :
    chaar K₀ (K₁ ⊔ K₂) ≤ chaar K₀ K₁ + chaar K₀ K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.addCHaar K₀ (K₁ ⊔ K₂) ≤
  MeasureTheory.Measure.haar.addCHaar K₀ K₁ + MeasureTheory.Measure.haar.addCHaar K₀ K₂


@[simp] theorem sizeOf_default (n : α) : sizeOf n = 0


theorem Convex.combo_le_max (x y : E) (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
    a • x + b • y ≤ max x y

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{a b : 𝕜}
(x y : E)
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(hab : a + b = 1)


/-- Corollary of the third isomorphism theorem: `[S : T] [M : S] = [M : T]` -/
theorem card_quotient_mul_card_quotient (S T : Submodule R M) (hST : T ≤ S) :
    Nat.card (S.map T.mkQ) * Nat.card (M ⧸ S) = Nat.card (M ⧸ T)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(S T : Submodule R M)
(hST : T ≤ S)

Nat.card ↥(Submodule.map T.mkQ S) * Nat.card (M ⧸ S) = Nat.card (M ⧸ T)


theorem Faithful.of_comp [(F ⋙ G).Faithful] : F.Faithful

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


@[simp]
theorem coe_nil : (@nil α : Multiset α) = 0


theorem linearIndependent_fin_snoc {n} {v : Fin n → V} :
    LinearIndependent K (Fin.snoc v x : Fin (n + 1) → V) ↔
      LinearIndependent K v ∧ x ∉ Submodule.span K (range v)

{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{x : V}
{n : ℕ}
{v : Fin n → V}

LinearIndependent K (Fin.snoc v x) ↔ LinearIndependent K v ∧ x ∉ Submodule.span K (Set.range v)


@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i

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

∫⁻ (a : α), f a ∂MeasureTheory.Measure.sum μ = ∑' (i : ι), ∫⁻ (a : α), f a ∂μ i


@[to_additive (attr := simp)]
lemma infinite_powers : (powers a : Set G).Infinite ↔ ¬ IsOfFinOrder a

{G : Type u_1}
[LeftCancelMonoid G]
{a : G}

(↑(Submonoid.powers a)).Infinite ↔ ¬IsOfFinOrder a


theorem prod_apply_inl_snd (i) : (b.prod b' (Sum.inl i)).2 = 0

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


/-- The functor which sends `[n]` to the simplicial set `Δ[n]` equipped by
the obvious augmentation towards the terminal object of the category of sets. -/
@[simps]
noncomputable def standardSimplex : SimplexCategory ⥤ SSet.Augmented.{u}

(Δ : SimplexCategory)
(Δ' : SimplexCategoryᵒᵖ)

∀ (a : ((𝟭 (CategoryTheory.SimplicialObject (Type u))).obj (SSet.standardSimplex.obj Δ)).obj Δ'),
  (SSet.Augmented.standardSimplex.obj Δ).hom.app Δ' a =
    CategoryTheory.Limits.terminal.from
      (((𝟭 (CategoryTheory.SimplicialObject (Type u))).obj (SSet.standardSimplex.obj Δ)).obj Δ') a


/-- The cofree functor from the Eilenberg-Moore category, constructing a coalgebra for any
object. -/
@[simps]
def cofree : C ⥤ Coalgebra G

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


theorem sub'_one (a : PosNum) : sub' a 1 = (pred' a).toZNum


lemma leftRightHomologyComparison'_eq_descH :
    leftRightHomologyComparison' h₁ h₂ =
      h₁.descH (h₂.liftH (h₁.i ≫ h₂.p) (by simp))
        (by rw [← cancel_mono h₂.ι, assoc, RightHomologyData.liftH_ι,
          LeftHomologyData.f'_i_assoc, RightHomologyData.wp, zero_comp])

CategoryTheory.ShortComplex.leftRightHomologyComparison' h₁ h₂ =
  h₁.descH (h₂.liftH (CategoryTheory.CategoryStruct.comp h₁.i h₂.p) ⋯) ⋯


/-- The L-series of the arithmetic function `ζ` equals the Riemann Zeta Function on its
domain of convergence `1 < re s`. -/
lemma LSeries_zeta_eq_riemannZeta {s : ℂ} (hs : 1 < s.re) : L ↗ζ s = riemannZeta s

L (fun n => ↑(ArithmeticFunction.zeta n)) s = riemannZeta s


theorem measurable_bind [MeasurableSpace γ] (f : α →ₛ β) (g : β → α → γ)
    (hg : ∀ b, Measurable (g b)) : Measurable fun a => g (f a) a

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace α]
[MeasurableSpace γ]
(f : MeasureTheory.SimpleFunc α β)
(g : β → α → γ)
(hg : ∀ (b : β), Measurable (g b))


theorem im_eq_zero_of_le {a : K} (h : ‖a‖ ≤ re a) : im a = 0

{K : Type u_1}
[RCLike K]
{a : K}
(h : ‖a‖ ≤ RCLike.re a)


@[simp]
theorem sin_pi_div_thirty_two : sin (π / 32) = √(2 - √(2 + √(2 + √2))) / 2


@[deprecated toPartialEquiv_injective (since := "2023-02-18")]
theorem eq_of_partialEquiv_eq {e e' : PartialHomeomorph X Y}
    (h : e.toPartialEquiv = e'.toPartialEquiv) : e = e'


@[to_additive]
theorem eq_of_eqOn_top {f g : M →ₙ* N} (h : Set.EqOn f g (⊤ : Subsemigroup M)) : f = g

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f g : M →ₙ* N}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


/-- `Ω[S⁄R]` is trivial if `R → S` is surjective.
Also see `Algebra.FormallyUnramified.iff_subsingleton_kaehlerDifferential`. -/
lemma KaehlerDifferential.subsingleton_of_surjective (h : Function.Surjective (algebraMap R S)) :
    Subsingleton (Ω[S⁄R])

(h : Function.Surjective ⇑(algebraMap R S))


/-- The localized category `W.Localization` that was constructed satisfies
the universal property of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetQ : StrictUniversalPropertyFixedTarget W.Q W E

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
(W : CategoryTheory.MorphismProperty C)
(E : Type u_3)
[CategoryTheory.Category.{u_5, u_3} E]
(G : CategoryTheory.Functor C E)
(hG : W.IsInvertedBy G)

(CategoryTheory.Localization.strictUniversalPropertyFixedTargetQ W E).lift G hG =
  CategoryTheory.Localization.Construction.lift G hG


lemma surjOn_id (s : Set α) : SurjOn id s s


@[simp]
theorem primeFactorsList_one : primeFactorsList 1 = []


/-- **Gelfand-Mazur theorem**: For a complex Banach division algebra, the natural `algebraMap ℂ A`
is an algebra isomorphism whose inverse is given by selecting the (unique) element of
`spectrum ℂ a`. In addition, `algebraMap_isometry` guarantees this map is an isometry.

Note: because `NormedDivisionRing` requires the field `norm_mul' : ∀ a b, ‖a * b‖ = ‖a‖ * ‖b‖`, we
don't use this type class and instead opt for a `NormedRing` in which the nonzero elements are
precisely the units. This allows for the application of this isomorphism in broader contexts, e.g.,
to the quotient of a complex Banach algebra by a maximal ideal. In the case when `A` is actually a
`NormedDivisionRing`, one may fill in the argument `hA` with the lemma `isUnit_iff_ne_zero`. -/
@[simps]
noncomputable def _root_.NormedRing.algEquivComplexOfComplete [CompleteSpace A] : ℂ ≃ₐ[ℂ] A

{A : Type u_2}
[NormedRing A]
[NormedAlgebra ℂ A]
(hA : ∀ {a : A}, IsUnit a ↔ a ≠ 0)
[CompleteSpace A]
(a : A)

(NormedRing.algEquivComplexOfComplete hA).symm a = ⋯.some


@[to_additive (attr := simp)]
theorem div_singleton (a : α) : s / {a} = s.image (· / a)

{α : Type u_2}
[DecidableEq α]
[Div α]
{s : Finset α}
(a : α)

s / {a} = Finset.image (fun x => x / a) s


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

CliffordAlgebra.EquivEven.e0 Q * CliffordAlgebra.EquivEven.e0 Q = -1


@[reassoc (attr := simp)]
theorem whiskerRight_toPlus_comp_plusCompIso_hom :
    whiskerRight (J.toPlus _) _ ≫ (J.plusCompIso F P).hom = J.toPlus _

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (J.toPlus P) F) (J.plusCompIso F P).hom =
  J.toPlus (P.comp F)


/-- Construct a right adjoint functor to `F`, given the functor's value on objects `G_obj` and
a bijection `e` between `F.obj X ⟶ Y` and `X ⟶ G_obj Y` satisfying a naturality law
`he : ∀ X Y Y' g h, e X' Y (F.map f ≫ g) = f ≫ e X Y g`.
Dual to `leftAdjointOfEquiv`. -/
@[simps!]
def rightAdjointOfEquiv (he : ∀ X' X Y f g, e X' Y (F.map f ≫ g) = f ≫ e X Y g) : D ⥤ C

(e : (X : C) → (Y : D) → (F.obj X ⟶ Y) ≃ (X ⟶ G_obj Y))

(he :
  ∀ (X' X : C) (Y : D) (f : X' ⟶ X) (g : F.obj X ⟶ Y),
    (e X' Y) (CategoryTheory.CategoryStruct.comp (F.map f) g) = CategoryTheory.CategoryStruct.comp f ((e X Y) g))

(CategoryTheory.Adjunction.rightAdjointOfEquiv e he).map g =
  (e (G_obj Y) Y')
    (CategoryTheory.CategoryStruct.comp ((e (G_obj Y) Y).symm (CategoryTheory.CategoryStruct.id (G_obj Y))) g)


theorem perm_merge (s : α → α → Bool) (l r) : merge s l r ~ l ++ r

{α : Type u_1}
(s : α → α → Bool)
(l r : List α)


@[to_additive]
theorem mulIndicator_eventuallyLE_mulIndicator (h : f ≤ᶠ[l ⊓ 𝓟 s] g) :
    mulIndicator s f ≤ᶠ[l] mulIndicator s g

{α : Type u_1}
{β : Type u_2}
[Zero β]
[Preorder β]
{s : Set α}
{f g : α → β}
{l : Filter α}
(h : f ≤ᶠ[l ⊓ 𝓟 s] g)


theorem filter_eq_empty_iff : s.filter p = ∅ ↔ ∀ ⦃x⦄, x ∈ s → ¬p x

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s : Finset α}

Finset.filter p s = ∅ ↔ ∀ ⦃x : α⦄, x ∈ s → ¬p x


lemma cpow_ofReal_im (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).im = (abs x) ^ y * Real.sin (arg x * y)

(x ^ ↑y).im = Complex.abs x ^ y * Real.sin (x.arg * y)


@[to_additive]
theorem ofList_smul (f : α → β → β) (l : List α) (b : β) :
    haveI := mkMulAction f
    ofList l • b = l.foldr f b

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

FreeAddMonoid.ofList l +ᵥ b = List.foldr f b l


@[simp]
theorem coe_top [Top β] : ⇑(⊤ : SupHom α β) = ⊤

{α : Type u_3}
{β : Type u_4}
[Sup α]
[SemilatticeSup β]
[Top β]


theorem formPerm_apply_get_zero (l : List α) (h : Nodup l) (hl : 1 < l.length) :
    formPerm l (l.get (Fin.mk 0 (by omega))) = l.get (Fin.mk 1 hl)

{α : Type u_1}
[DecidableEq α]
(l : List α)
(h : l.Nodup)
(hl : 1 < l.length)

l.formPerm (l.get ⟨0, ⋯⟩) = l.get ⟨1, hl⟩


/-- An algebra morphism with an underlying isomorphism hom in `C` is an algebra isomorphism. -/
theorem iso_of_iso (f : A₀ ⟶ A₁) [IsIso f.1] : IsIso f

{A₀ A₁ : CategoryTheory.Endofunctor.Algebra F}


@[simp, mfld_simps]
theorem ofSet_toPartialEquiv : (ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(hs : IsOpen s)

(PartialHomeomorph.ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s


/-- A continuous linear map satisfies `IsBoundedLinearMap` -/
theorem ContinuousLinearMap.isBoundedLinearMap (f : E →L[𝕜] F) : IsBoundedLinearMap 𝕜 f

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


@[simp]
theorem comapMkQOrderEmbedding_eq (p' : Submodule R (M ⧸ p)) :
    comapMkQOrderEmbedding p p' = comap p.mkQ p'

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
(p' : Submodule R (M ⧸ p))

p.comapMkQOrderEmbedding p' = Submodule.comap p.mkQ p'


lemma sum_map_mul_right : sum (s.map fun i ↦ f i * a) = sum (s.map f) * a

{ι : Type u_1}
{α : Type u_2}
[NonUnitalNonAssocSemiring α]
{a : α}
{s : Multiset ι}
{f : ι → α}

(Multiset.map (fun i => f i * a) s).sum = (Multiset.map f s).sum * a


/-- The submodule generated by a finite set is finite-dimensional. -/
theorem span_of_finite {A : Set V} (hA : Set.Finite A) : FiniteDimensional K (Submodule.span K A)

(K : Type u)
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{A : Set V}
(hA : A.Finite)

FiniteDimensional K ↥(Submodule.span K A)


/-- A product of finite numbers is still finite -/
theorem prod_lt_top {s : Finset α} {f : α → ℝ≥0∞} (h : ∀ a ∈ s, f a ≠ ∞) : ∏ a ∈ s, f a < ∞

{α : Type u_1}
{s : Finset α}
{f : α → ℝ≥0∞}
(h : ∀ a ∈ s, f a ≠ ⊤)


@[simp]
theorem mem_graph_iff {c : α × M} {f : α →₀ M} : c ∈ f.graph ↔ f c.1 = c.2 ∧ c.2 ≠ 0

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


theorem Filter.filter_injOn_Iic_iff_injOn {s : Set α} {m : α → β} :
    InjOn (map m) (Iic <| 𝓟 s) ↔ InjOn m s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{m : α → β}

Set.InjOn (Filter.map m) (Set.Iic (𝓟 s)) ↔ Set.InjOn m s


theorem IsBigO.sum (h : ∀ i ∈ s, A i =O[l] g) : (fun x => ∑ i ∈ s, A i x) =O[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{l : Filter α}
{ι : Type u_17}
{A : ι → α → E'}
{s : Finset ι}
(h : ∀ i ∈ s, A i =O[l] g)


@[simp, norm_cast]
theorem real_lt_real {x y : ℝ} : (x : ℂ) < (y : ℂ) ↔ x < y


@[simp]
theorem integral_sin_pow_three :
    ∫ x in a..b, sin x ^ 3 = cos a - cos b - (cos a ^ 3 - cos b ^ 3) / 3

∫ (x : ℝ) in a..b, Real.sin x ^ 3 = Real.cos a - Real.cos b - (Real.cos a ^ 3 - Real.cos b ^ 3) / 3


theorem ergodic_zsmul {n : ℤ} (hn : 1 < |n|) : Ergodic fun y : AddCircle T => n • y

Ergodic (fun y => n • y) MeasureTheory.volume


theorem posMulStrictMono_iff_posMulReflectLE : PosMulStrictMono α ↔ PosMulReflectLE α

{α : Type u_1}
[Mul α]
[Zero α]
[LinearOrder α]


@[to_additive (attr := simp)]
theorem _root_.map_dfinsupp_prod
    {R S H : Type*} [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid R] [CommMonoid S] [FunLike H R S] [MonoidHomClass H R S] (h : H) (f : Π₀ i, β i)
    (g : ∀ i, β i → R) : h (f.prod g) = f.prod fun a b => h (g a b)

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

h (f.sum g) = f.sum fun a b => h (g a b)


@[simp]
theorem mk_zero [∀ i, Zero (β i)] {s : Finset ι} : mk s (0 : ∀ i : (↑s : Set ι), β i.1) = 0

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


@[simp] theorem utf8ByteSize_mk (cs) : utf8ByteSize ⟨cs⟩ = utf8Len cs

{ data := cs }.utf8ByteSize = String.utf8Len cs


/-- The following diagram is a pullback
```
X --f--> Z
|        |
id       id
v        v
X --f--> Z
```
-/
lemma id_vert (f : X ⟶ Z) : IsPushout f (𝟙 X) (𝟙 Z) f

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

CategoryTheory.IsPushout f (𝟙 X) (𝟙 Z) f


theorem normalizedMooreComplex_objD (X : SimplicialObject C) (n : ℕ) :
    ((normalizedMooreComplex C).obj X).d (n + 1) n = NormalizedMooreComplex.objD X n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
(X : CategoryTheory.SimplicialObject C)
(n : ℕ)

((AlgebraicTopology.normalizedMooreComplex C).obj X).d (n + 1) n = AlgebraicTopology.NormalizedMooreComplex.objD X n


/-- The function type `Bool → α` is equivalent to `α × α`. -/
@[simps]
def boolArrowEquivProd (α) : (Bool → α) ≃ α × α

(Equiv.boolArrowEquivProd α).symm p b = Bool.casesOn b p.1 p.2


@[simp]
theorem ofQuaternion_comp_toQuaternion :
    ofQuaternion.comp toQuaternion = AlgHom.id R (CliffordAlgebra (Q c₁ c₂))

CliffordAlgebraQuaternion.ofQuaternion.comp CliffordAlgebraQuaternion.toQuaternion =
  AlgHom.id R (CliffordAlgebra (CliffordAlgebraQuaternion.Q c₁ c₂))


/-- The sine zeta function is differentiable everywhere. -/
lemma differentiableAt_sinZeta (a : UnitAddCircle) :
    Differentiable ℂ (sinZeta a)

Differentiable ℂ (HurwitzZeta.sinZeta a)


theorem Filter.EventuallyEq.hasFDerivAt_iff (h : f₀ =ᶠ[𝓝 x] f₁) :
    HasFDerivAt f₀ f' x ↔ HasFDerivAt f₁ f' x

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


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

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

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


@[to_additive (attr := mono)]
theorem smul_subset_smul : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ • t₁ ⊆ s₂ • t₂

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

s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ • t₁ ⊆ s₂ • t₂


/-- Factoring gives a homomorphism from the multiplicative
 monoid ℕ+ to the additive monoid of multisets. -/
theorem factorMultiset_one : factorMultiset 1 = 0


/-- The empty set is not an equivalence class. -/
theorem empty_not_mem_classes {r : Setoid α} : ∅ ∉ r.classes


protected theorem div_div_eq_div_mul (m n k : Nat) : m / n / k = m / (n * k)


theorem encode_ofEquiv {α β} [Encodable α] (e : β ≃ α) (b : β) :
    @encode _ (ofEquiv _ e) b = encode (e b)

{α : Type u_3}
{β : Type u_4}
[Encodable α]
(e : β ≃ α)
(b : β)

Encodable.encode b = Encodable.encode (e b)


private lemma isBigO_one_aux :
    IsBigO atTop (fun t : ℝ ↦ (1 - rexp (-π * t))⁻¹) (fun _ ↦ (1 : ℝ))

(fun t => (1 - rexp (-π * t))⁻¹) =O[Filter.atTop] fun x => 1


theorem degreeOf_mul_X_ne {i j : σ} (f : MvPolynomial σ R) (h : i ≠ j) :
    degreeOf i (f * X j) = degreeOf i f

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{i j : σ}
(f : MvPolynomial σ R)
(h : i ≠ j)

MvPolynomial.degreeOf i (f * MvPolynomial.X j) = MvPolynomial.degreeOf i f


@[simp]
theorem vsub_singleton (b : β) : s -ᵥ ({b} : Finset β) = s.image (· -ᵥ b)

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

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


@[simp]
theorem _root_.Set.up_mul (s t : Set α) : up (s * t) = up s * up t


@[simp]
theorem zeroLocus_top : zeroLocus (⊤ : Ideal (MvPolynomial σ k)) = ⊥


@[simp]
theorem frequently_top {p : α → Prop} : (∃ᶠ x in ⊤, p x) ↔ ∃ x, p x


/-- A set of points in a two-dimensional space is coplanar. -/
theorem coplanar_of_finrank_eq_two (s : Set P) (h : finrank k V = 2) : Coplanar k s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(s : Set P)
(h : FiniteDimensional.finrank k V = 2)


@[simp]
theorem sigmaCongrRight_mul {α : Type*} {β : α → Type*} (F : ∀ a, Perm (β a))
    (G : ∀ a, Perm (β a)) : sigmaCongrRight F * sigmaCongrRight G = sigmaCongrRight (F * G)

{α : Type u_1}
{β : α → Type u_2}
(F G : (a : α) → Equiv.Perm (β a))

Equiv.Perm.sigmaCongrRight F * Equiv.Perm.sigmaCongrRight G = Equiv.Perm.sigmaCongrRight (F * G)


theorem completeSpace_congr {e : α ≃ β} (he : UniformEmbedding e) :
    CompleteSpace α ↔ CompleteSpace β

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{e : α ≃ β}
(he : UniformEmbedding ⇑e)


theorem eq_zero_iff_mem {I : Ideal R} : mk I a = 0 ↔ a ∈ I

{R : Type u}
[CommRing R]
{a : R}
{I : Ideal R}


theorem HasOrthogonalCols.hasOrthogonalRows [Fintype n] (h : Aᵀ.HasOrthogonalCols) :
    A.HasOrthogonalRows

{α : Type u_1}
{n : Type u_2}
{m : Type u_3}
[Mul α]
[AddCommMonoid α]
{A : Matrix m n α}
[Fintype n]
(h : A.transpose.HasOrthogonalCols)


theorem equivalent_weightedSumSquares_units_of_nondegenerate' (Q : QuadraticForm K V)
    (hQ : (associated (R := K) Q).SeparatingLeft) :
    ∃ w : Fin (FiniteDimensional.finrank K V) → Kˣ, Equivalent Q (weightedSumSquares K w)

(hQ : LinearMap.SeparatingLeft (QuadraticMap.associated Q))

∃ w, QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares K w)


@[simp]
theorem antitoneOn_comp_ofDual_iff : AntitoneOn (f ∘ ofDual) s ↔ MonotoneOn f s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s : Set α}

AntitoneOn (f ∘ ⇑OrderDual.ofDual) s ↔ MonotoneOn f s


lemma piecewise_same : s.piecewise f f = f

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


theorem le_of_castSucc_lt_of_succ_lt {a b : Fin (n + 1)} {i : Fin n}
    (hl : castSucc i < a) (hu : b < succ i) : b < a

{n : ℕ}
{a b : Fin (n + 1)}
{i : Fin n}
(hl : i.castSucc < a)
(hu : b < i.succ)


/-- This is a version of **Hall's Marriage Theorem** in terms of a relation to a finite type.
There is a transversal of the relation (an injective function `α → β` whose graph is a subrelation
of the relation) iff every subset of `k` terms of `α` is related to at least `k` terms of `β`.

It is like `Fintype.all_card_le_rel_image_card_iff_exists_injective` but uses `Finset.filter`
rather than `Rel.image`.
-/
theorem Fintype.all_card_le_filter_rel_iff_exists_injective {α : Type u} {β : Type v} [Fintype β]
    (r : α → β → Prop) [∀ a, DecidablePred (r a)] :
    (∀ A : Finset α, A.card ≤ (univ.filter fun b : β => ∃ a ∈ A, r a b).card) ↔
      ∃ f : α → β, Function.Injective f ∧ ∀ x, r x (f x)

{α : Type u}
{β : Type v}
[Fintype β]
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]

(∀ (A : Finset α), A.card ≤ (Finset.filter (fun b => ∃ a ∈ A, r a b) Finset.univ).card) ↔
  ∃ f, Function.Injective f ∧ ∀ (x : α), r x (f x)


theorem commProb_def :
    commProb M = Nat.card { p : M × M // Commute p.1 p.2 } / (Nat.card M : ℚ) ^ 2

commProb M = ↑(Nat.card { p // Commute p.1 p.2 }) / ↑(Nat.card M) ^ 2


theorem ascPochhammer_nat_eval_succ (r : ℕ) :
    ∀ n : ℕ, n * (ascPochhammer ℕ r).eval (n + 1) = (n + r) * (ascPochhammer ℕ r).eval n

n * Polynomial.eval (n + 1) (ascPochhammer ℕ r) = (n + r) * Polynomial.eval n (ascPochhammer ℕ r)


/-- Swaps the pointed elements of a two-pointed type. `TwoPointing.swap` as a functor. -/
@[simps]
noncomputable def swap : TwoP ⥤ TwoP

(TwoP.swap.obj X).toTwoPointing = X.toTwoPointing.swap


theorem ContDiff.norm_sq (hf : ContDiff ℝ n f) : ContDiff ℝ n fun x => ‖f x‖ ^ 2

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{n : ℕ∞}
(hf : ContDiff ℝ n f)


/-- The open cover of the glued space given by the glue data. -/
@[simps (config := .lemmasOnly)]
def openCover (D : Scheme.GlueData) : OpenCover D.glued

(D : AlgebraicGeometry.Scheme.GlueData)
(i : D.J)


theorem ker_isPGroup_of_injective {K : Type*} [Group K] {ϕ : K →* G} (hϕ : Function.Injective ϕ) :
    IsPGroup p ϕ.ker

{p : ℕ}
{G : Type u_1}
[Group G]
{K : Type u_2}
[Group K]
{ϕ : K →* G}
(hϕ : Function.Injective ⇑ϕ)


/-- A vertex lies in the corresponding altitude. -/
theorem mem_altitude {n : ℕ} (s : Simplex ℝ P (n + 1)) (i : Fin (n + 2)) :
    s.points i ∈ s.altitude i

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P (n + 1))
(i : Fin (n + 2))


theorem isAtom_of_image [OrderBot α] [OrderBot β] {l : α → β} {u : β → α}
    (gi : GaloisCoinsertion l u) {a : α} (hb : IsAtom (l a)) : IsAtom a

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[PartialOrder β]
[OrderBot α]
[OrderBot β]
{l : α → β}
{u : β → α}
(gi : GaloisCoinsertion l u)
{a : α}
(hb : IsAtom (l a))


theorem Sorted.rel_get_of_le [IsRefl α r] {l : List α} (h : l.Sorted r) {a b : Fin l.length}
    (hab : a ≤ b) : r (l.get a) (l.get b)

{α : Type u}
{r : α → α → Prop}
[IsRefl α r]
{l : List α}
(h : List.Sorted r l)
{a b : Fin l.length}
(hab : a ≤ b)


/-- The multiplicity of `m` in `n` is the number of positive natural numbers `i` such that `m ^ i`
divides `n`. This set is expressed by filtering `Ico 1 b` where `b` is any bound greater than
`log m n`. -/
theorem multiplicity_eq_card_pow_dvd {m n b : ℕ} (hm : m ≠ 1) (hn : 0 < n) (hb : log m n < b) :
    multiplicity m n = ↑((Finset.Ico 1 b).filter fun i => m ^ i ∣ n).card

{m n b : ℕ}
(hm : m ≠ 1)
(hn : 0 < n)
(hb : Nat.log m n < b)

multiplicity m n = ↑(Finset.filter (fun i => m ^ i ∣ n) (Finset.Ico 1 b)).card


/-- If two subtypes of a fintype have equal cardinality, so do their complements. -/
theorem Fintype.card_compl_eq_card_compl [Finite α] (p q : α → Prop) [Fintype { x // p x }]
    [Fintype { x // ¬p x }] [Fintype { x // q x }] [Fintype { x // ¬q x }]
    (h : Fintype.card { x // p x } = Fintype.card { x // q x }) :
    Fintype.card { x // ¬p x } = Fintype.card { x // ¬q x }


@[to_additive]
theorem op_iInf (S : ι → Submonoid M) : (iInf S).op = ⨅ i, (S i).op

{ι : Sort u_1}
{M : Type u_2}
[MulOneClass M]
(S : ι → Submonoid M)


@[to_additive]
theorem finprod_eq_one_of_forall_eq_one {f : α → M} (h : ∀ x, f x = 1) : ∏ᶠ i, f i = 1

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
(h : ∀ (x : α), f x = 1)


lemma eq_zero_of_le_div (hn : 2 ≤ n) (h : m ≤ m / n) : m = 0


@[simp] theorem length_insert_of_mem {l : List α} (h : a ∈ l) :
    length (l.insert a) = length l

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


theorem ordSeparatingSet_comm (s t : Set α) : ordSeparatingSet s t = ordSeparatingSet t s

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

s.ordSeparatingSet t = t.ordSeparatingSet s


/-- If an antitone sequence of functions has a lower bound and the sequence of integrals of these
functions tends to the integral of the lower bound, then the sequence of functions converges
almost everywhere to the lower bound. -/
lemma tendsto_of_integral_tendsto_of_antitone {μ : Measure α} {f : ℕ → α → ℝ} {F : α → ℝ}
    (hf_int : ∀ n, Integrable (f n) μ) (hF_int : Integrable F μ)
    (hf_tendsto : Tendsto (fun i ↦ ∫ a, f i a ∂μ) atTop (𝓝 (∫ a, F a ∂μ)))
    (hf_mono : ∀ᵐ a ∂μ, Antitone (fun i ↦ f i a))
    (hf_bound : ∀ᵐ a ∂μ, ∀ i, F a ≤ f i a) :
    ∀ᵐ a ∂μ, Tendsto (fun i ↦ f i a) atTop (𝓝 (F a))

{f : ℕ → α → ℝ}

(hf_int : ∀ (n : ℕ), MeasureTheory.Integrable (f n) μ)

(hf_tendsto : Filter.Tendsto (fun i => ∫ (a : α), f i a ∂μ) Filter.atTop (𝓝 (∫ (a : α), F a ∂μ)))

(hf_mono : ∀ᵐ (a : α) ∂μ, Antitone fun i => f i a)

(hf_bound : ∀ᵐ (a : α) ∂μ, ∀ (i : ℕ), F a ≤ f i a)

∀ᵐ (a : α) ∂μ, Filter.Tendsto (fun i => f i a) Filter.atTop (𝓝 (F a))


theorem one_le_rpow_of_pos_of_le_one_of_nonpos (hx1 : 0 < x) (hx2 : x ≤ 1) (hz : z ≤ 0) :
    1 ≤ x ^ z


theorem indep_iSup_of_disjoint [IsMarkovKernel κ] {m : ι → MeasurableSpace Ω}
    (h_le : ∀ i, m i ≤ _mΩ) (h_indep : iIndep m κ μ) {S T : Set ι} (hST : Disjoint S T) :
    Indep (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) κ μ

(h_indep : ProbabilityTheory.Kernel.iIndep m κ μ)

ProbabilityTheory.Kernel.Indep (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) κ μ


lemma Iso.isIso_inv (e : X ≅ Y) : IsIso e.inv

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(e : X ≅ Y)


theorem listEncode_sigma_injective :
    Function.Injective fun φ : Σn, L.BoundedFormula α n => φ.2.listEncode

Function.Injective fun φ => φ.snd.listEncode


theorem algEquivOfAssociated_toAlgHom {p q : K[X]} (hp : p ≠ 0) (hpq : Associated p q) :
    (algEquivOfAssociated hp hpq).toAlgHom =
      liftHom p (root q) (by simp only [aeval_eq, mk_eq_zero, hpq.symm.dvd])

{K : Type u_1}
[Field K]
{p q : K[X]}
(hp : p ≠ 0)
(hpq : Associated p q)

↑(AdjoinRoot.algEquivOfAssociated hp hpq) = AdjoinRoot.liftHom p (AdjoinRoot.root q) ⋯


theorem toPGame_moveLeft {o : Ordinal} (i) :
    o.toPGame.moveLeft (toLeftMovesToPGame i) = i.val.toPGame

o.toPGame.moveLeft (Ordinal.toLeftMovesToPGame i) = (↑i).toPGame


theorem floor_logb_natCast {b : ℕ} {r : ℝ} (hb : 1 < b) (hr : 0 ≤ r) :
    ⌊logb b r⌋ = Int.log b r


theorem Submodule.closure_subset_topologicalClosure_span (s : Set M) :
    closure s ⊆ (span R s).topologicalClosure

{R : Type u}
{M : Type v}
[Semiring R]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M]
(s : Set M)

closure s ⊆ ↑(Submodule.span R s).topologicalClosure


theorem biproduct.toSubtype_eq_desc [DecidablePred p] :
    biproduct.toSubtype f p =
      biproduct.desc fun j => if h : p j then biproduct.ι (Subtype.restrict p f) ⟨j, h⟩ else 0

[CategoryTheory.Limits.HasBiproduct (Subtype.restrict p f)]

CategoryTheory.Limits.biproduct.toSubtype f p =
  CategoryTheory.Limits.biproduct.desc fun j =>
    if h : p j then CategoryTheory.Limits.biproduct.ι (Subtype.restrict p f) ⟨j, h⟩ else 0


theorem rel_flip_eq {s t : Multiset α} : Rel (fun a b => b = a) s t ↔ s = t

Multiset.Rel (fun a b => b = a) s t ↔ s = t


theorem sub_nat (h : Irrational x) (m : ℕ) : Irrational (x - m)


theorem _root_.StarAlgHomClass.ext_topologicalClosure [T2Space B] {F : Type*}
    {S : StarSubalgebra R A} [FunLike F S.topologicalClosure B]
    [AlgHomClass F R S.topologicalClosure B] [StarAlgHomClass F R S.topologicalClosure B] {φ ψ : F}
    (hφ : Continuous φ) (hψ : Continuous ψ) (h : ∀ x : S,
        φ (inclusion (le_topologicalClosure S) x) = ψ ((inclusion (le_topologicalClosure S)) x)) :
    φ = ψ

[AlgHomClass F R (↥S.topologicalClosure) B]

[StarAlgHomClass F R (↥S.topologicalClosure) B]

(h : ∀ (x : ↥S), φ ((StarSubalgebra.inclusion ⋯) x) = ψ ((StarSubalgebra.inclusion ⋯) x))


theorem dim_le_degree_of_root (h : PowerBasis A S) {p : A[X]} (ne_zero : p ≠ 0)
    (root : aeval h.gen p = 0) : ↑h.dim ≤ p.degree

{S : Type u_2}
[Ring S]
{A : Type u_4}
[CommRing A]
[Algebra A S]
(h : PowerBasis A S)
{p : A[X]}
(ne_zero : p ≠ 0)
(root : (Polynomial.aeval h.gen) p = 0)


@[simp]
theorem preimage_const_sub_Ioi : (fun x => a - x) ⁻¹' Ioi b = Iio (a - b)

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

(fun x => a - x) ⁻¹' Set.Ioi b = Set.Iio (a - b)


theorem nhdsWithin_pi_eq {I : Set ι} (hI : I.Finite) (s : ∀ i, Set (π i)) (x : ∀ i, π i) :
    𝓝[pi I s] x =
      (⨅ i ∈ I, comap (fun x => x i) (𝓝[s i] x i)) ⊓
        ⨅ (i) (_ : i ∉ I), comap (fun x => x i) (𝓝 (x i))

{ι : Type u_5}
{π : ι → Type u_6}
[(i : ι) → TopologicalSpace (π i)]
{I : Set ι}
(hI : I.Finite)
(s : (i : ι) → Set (π i))
(x : (i : ι) → π i)

𝓝[I.pi s] x =
  (⨅ i ∈ I, Filter.comap (fun x => x i) (𝓝[s i] x i)) ⊓ ⨅ i, ⨅ (_ : i ∉ I), Filter.comap (fun x => x i) (𝓝 (x i))


lemma map_injective {φ : R →+* A} (hφ : Function.Injective φ) :
    Function.Injective <| map (φ := φ)

{R : Type u}
[CommRing R]
{A : Type v}
[CommRing A]
{φ : R →+* A}
(hφ : Function.Injective ⇑φ)


theorem _root_.aestronglyMeasurable_of_aestronglyMeasurable_trim {α} {m m0 : MeasurableSpace α}
    {μ : Measure α} (hm : m ≤ m0) {f : α → β} (hf : AEStronglyMeasurable f (μ.trim hm)) :
    AEStronglyMeasurable f μ

(hf : MeasureTheory.AEStronglyMeasurable f (μ.trim hm))


/-- The "evaluation of `F` at `X`" functor,
as a functor `C × (C ⥤ D) ⥤ D`.
-/
@[simps]
def evaluationUncurried : C × (C ⥤ D) ⥤ D

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(D : Type u₂)
[CategoryTheory.Category.{v₂, u₂} D]
{x y : C × CategoryTheory.Functor C D}
(f : x ⟶ y)

(CategoryTheory.evaluationUncurried C D).map f = CategoryTheory.CategoryStruct.comp (x.2.map f.1) (f.2.app y.1)


@[ext]
lemma rightKanExtension_hom_ext {G : D ⥤ H} (γ₁ γ₂ : G ⟶ rightKanExtension L F)
    (hγ : whiskerLeft L γ₁ ≫ rightKanExtensionCounit L F =
      whiskerLeft L γ₂ ≫ rightKanExtensionCounit L F) :
    γ₁ = γ₂

(hγ :
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft L γ₁) (L.rightKanExtensionCounit F) =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft L γ₂) (L.rightKanExtensionCounit F))


theorem copy_eq (S : Subring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S

{R : Type u}
[Ring R]
(S : Subring R)
(s : Set R)
(hs : s = ↑S)


@[simp]
theorem toAdd_div [Sub α] (x y : Multiplicative α) : toAdd (x / y) = toAdd x - toAdd y

{α : Type u}
[Sub α]
(x y : Multiplicative α)

Multiplicative.toAdd (x / y) = Multiplicative.toAdd x - Multiplicative.toAdd y


/-- If every finite subgraph of a graph `G` has a homomorphism to a finite graph `F`, then there is
a homomorphism from the whole of `G` to `F`. -/
theorem nonempty_hom_of_forall_finite_subgraph_hom [Finite W]
    (h : ∀ G' : G.Subgraph, G'.verts.Finite → G'.coe →g F) : Nonempty (G →g F)

(h : (G' : G.Subgraph) → G'.verts.Finite → G'.coe →g F)


theorem isOpen_iff_dist (s : Set (∀ n, E n)) :
    IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s

{E : ℕ → Type u_1}
[(n : ℕ) → TopologicalSpace (E n)]
[∀ (n : ℕ), DiscreteTopology (E n)]
(s : Set ((n : ℕ) → E n))

IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ (y : (n : ℕ) → E n), dist x y < ε → y ∈ s


lemma ssubset_irrefl [IsIrrefl α (· ⊂ ·)] (a : α) : ¬a ⊂ a

{α : Type u}
[HasSSubset α]
[IsIrrefl α fun x x_1 => x ⊂ x_1]
(a : α)


@[simp] theorem nhdsSet_Ioo : 𝓝ˢ (Ioo a b) = 𝓟 (Ioo a b)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b : α}


@[simp]
lemma charpoly_fromBlocks_zero₂₁ :
    (fromBlocks M₁₁ M₁₂ 0 M₂₂).charpoly = (M₁₁.charpoly * M₂₂.charpoly)

{R : Type u_1}
[CommRing R]
{m : Type u_3}
{n : Type u_4}
[DecidableEq m]
[DecidableEq n]
[Fintype m]
[Fintype n]
(M₁₁ : Matrix m m R)
(M₁₂ : Matrix m n R)
(M₂₂ : Matrix n n R)

(Matrix.fromBlocks M₁₁ M₁₂ 0 M₂₂).charpoly = M₁₁.charpoly * M₂₂.charpoly


theorem inv_lt_one_iff : a⁻¹ < 1 ↔ a ≤ 0 ∨ 1 < a

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}


theorem ofNat_min (a b : Nat) : ((min a b : Nat) : Int) = min (a : Int) (b : Int)


@[to_additive]
theorem mulIndicator_div' (s : Set α) (f g : α → G) :
    mulIndicator s (f / g) = mulIndicator s f / mulIndicator s g

{α : Type u_1}
{G : Type u_6}
[AddGroup G]
(s : Set α)
(f g : α → G)

s.indicator (f - g) = s.indicator f - s.indicator g


@[simp]
theorem lookmap_cons_none {a : α} (l : List α) (h : f a = none) :
    (a :: l).lookmap f = a :: l.lookmap f

{α : Type u}
(f : α → Option α)
{a : α}
(l : List α)
(h : f a = none)

List.lookmap f (a :: l) = a :: List.lookmap f l


lemma eventually_one_sub_smoothingFn_gt_const (c : ℝ) (hc : c < 1) :
    ∀ᶠ (n : ℕ) in atTop, c < 1 - ε n

∀ᶠ (n : ℕ) in Filter.atTop, c < 1 - AkraBazziRecurrence.smoothingFn ↑n


@[simp]
theorem eval₂_comp' : eval₂ (algebraMap R S) x (p.comp q) =
    eval₂ (algebraMap R S) (eval₂ (algebraMap R S) x q) p

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(x : S)
(p q : R[X])

Polynomial.eval₂ (algebraMap R S) x (p.comp q) =
  Polynomial.eval₂ (algebraMap R S) (Polynomial.eval₂ (algebraMap R S) x q) p


/-- We can clear the denominators of a finite set of fractions. -/
theorem exist_integer_multiples_of_finset (s : Finset S) :
    ∃ b : M, ∀ a ∈ s, IsInteger R ((b : R) • a)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(s : Finset S)

∃ b, ∀ a ∈ s, IsLocalization.IsInteger R (↑b • a)


@[to_additive] lemma IsSquare.zpow (n : ℤ) : IsSquare a → IsSquare (a ^ n)

{α : Type u_2}
[DivisionMonoid α]
{a : α}
(n : ℤ)


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

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

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


@[simp]
theorem convexHull_zero : convexHull 𝕜 (0 : Set E) = 0

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]


/-- `MulAction.toPerm` is injective on faithful actions. -/
@[to_additive "`AddAction.toPerm` is injective on faithful actions."]
lemma MulAction.toPerm_injective [FaithfulSMul α β] :
    Function.Injective (MulAction.toPerm : α → Equiv.Perm β)

{α : Type u_1}
{β : Type u_2}
[Group α]
[MulAction α β]
[FaithfulSMul α β]


theorem minpolyGen_monic (pb : PowerBasis A S) : Monic (minpolyGen pb)

{S : Type u_2}
[Ring S]
{A : Type u_4}
[CommRing A]
[Algebra A S]
(pb : PowerBasis A S)


@[simp]
theorem add_le_aleph0 {c₁ c₂ : Cardinal} : c₁ + c₂ ≤ ℵ₀ ↔ c₁ ≤ ℵ₀ ∧ c₂ ≤ ℵ₀

c₁ + c₂ ≤ Cardinal.aleph0 ↔ c₁ ≤ Cardinal.aleph0 ∧ c₂ ≤ Cardinal.aleph0


@[simp, norm_cast]
theorem coe_mul (x y : Ioc (0 : α) 1) : ↑(x * y) = (x * y : α)

{α : Type u_1}
[StrictOrderedSemiring α]
(x y : ↑(Set.Ioc 0 1))


/-- The characteristic equals the exponential characteristic iff the former is prime. -/
theorem char_eq_expChar_iff (p q : ℕ) [hp : CharP R p] [hq : ExpChar R q] : p = q ↔ p.Prime

(R : Type u)
[Semiring R]
(p q : ℕ)
[hp : CharP R p]
[hq : ExpChar R q]


@[to_additive (attr := simp, aesop safe apply (rule_sets := [finsetNonempty]))]
theorem mul_nonempty : (s * t).Nonempty ↔ s.Nonempty ∧ t.Nonempty

{α : Type u_2}
[DecidableEq α]
[Add α]
{s t : Finset α}

(s + t).Nonempty ↔ s.Nonempty ∧ t.Nonempty


lemma dirSupClosed_of_isClosed : IsClosed s → DirSupClosed s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScott α]
{s : Set α}


theorem div_lt_div_iff_mul_lt_mul {a b c d : ℤ} (b_pos : 0 < b) (d_pos : 0 < d) :
    (a : ℚ) / b < c / d ↔ a * d < c * b


theorem exists_pos_right_iff_sameRay_and_ne_zero (hy : y ≠ 0) :
    (∃ r : R, 0 < r ∧ x = r • y) ↔ SameRay R x y ∧ x ≠ 0

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(hy : y ≠ 0)

(∃ r, 0 < r ∧ x = r • y) ↔ SameRay R x y ∧ x ≠ 0


@[to_additive]
theorem sec_spec' {f : LocalizationMap S N} (z : N) :
    f.toMap (f.sec z).1 = f.toMap (f.sec z).2 * z

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{f : S.LocalizationMap N}
(z : N)

f.toMap (f.sec z).1 = f.toMap ↑(f.sec z).2 + z


lemma mono_binaryCofanSum_inr [MonoCoprod C] :
    Mono (binaryCofanSum c c₁ c₂ hc₁ hc₂).inr

(c₁ : CategoryTheory.Limits.Cofan (X ∘ Sum.inl))

(c₂ : CategoryTheory.Limits.Cofan (X ∘ Sum.inr))

(hc : CategoryTheory.Limits.IsColimit c)

(hc₁ : CategoryTheory.Limits.IsColimit c₁)

(hc₂ : CategoryTheory.Limits.IsColimit c₂)

CategoryTheory.Mono (CategoryTheory.Limits.MonoCoprod.binaryCofanSum c c₁ c₂ hc₁ hc₂).inr


/-- The elements related to x ∈ α by the kernel of f are those in the preimage of f(x) under f. -/
theorem ker_iff_mem_preimage {f : α → β} {x y} : (ker f).Rel x y ↔ x ∈ f ⁻¹' {f y}

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{x y : α}

(Setoid.ker f).Rel x y ↔ x ∈ f ⁻¹' {f y}


@[simp]
lemma image_subtype_val_Ico_Ioi {a b : α} (c : Ico a b) : Subtype.val '' Ioi c = Ioo c.1 b

{α : Type u_1}
[Preorder α]
{a b : α}
(c : ↑(Set.Ico a b))

Subtype.val '' Set.Ioi c = Set.Ioo (↑c) b


@[simp]
theorem mem_toSet (a u : ZFSet.{u}) : a ∈ u.toSet ↔ a ∈ u


theorem mono_of_mono_left {A B : CostructuredArrow S T} (f : A ⟶ B) [h : Mono f.left] : Mono f

{A B : CategoryTheory.CostructuredArrow S T}


@[to_additive]
theorem inducing_toContinuousMap : Inducing (toContinuousMap : ContinuousMonoidHom A B → C(A, B))

(A : Type u_2)
(B : Type u_3)
[Monoid A]
[Monoid B]
[TopologicalSpace A]
[TopologicalSpace B]


@[simp]
theorem sumEquivOfFintype_apply (x : ⨁ j, (AdicCompletion I (M j))) :
    sumEquivOfFintype I M x = sum I M x

(x : DirectSum ι fun j => AdicCompletion I (M j))

(AdicCompletion.sumEquivOfFintype I M) x = (AdicCompletion.sum I M) x


/-- The canonical isomorphism
`Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b`
when `a + b = n`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorAdd' (a b n : ℤ) (h : a + b = n) :
    Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b

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

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorAdd' C a b n h).inv.app X).hom₁ =
  (CategoryTheory.shiftFunctorAdd' C a b n h).inv.app X.obj₁


theorem AffineSubspace.closed_of_finiteDimensional {P : Type*} [MetricSpace P]
    [NormedAddTorsor E P] (s : AffineSubspace 𝕜 P) [FiniteDimensional 𝕜 s.direction] :
    IsClosed (s : Set P)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
{P : Type u_1}
[MetricSpace P]
[NormedAddTorsor E P]
(s : AffineSubspace 𝕜 P)
[FiniteDimensional 𝕜 ↥s.direction]


theorem lowerSemicontinuousOn_iSup {f : ι → α → δ} (h : ∀ i, LowerSemicontinuousOn (f i) s) :
    LowerSemicontinuousOn (fun x' => ⨆ i, f i x') s

{f : ι → α → δ}

(h : ∀ (i : ι), LowerSemicontinuousOn (f i) s)


@[to_additive]
theorem hasProd_ite_div_hasProd [DecidableEq β] (hf : HasProd f a) (b : β) :
    HasProd (fun n ↦ ite (n = b) 1 (f n)) (a / f b)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
{a : α}
[DecidableEq β]
(hf : HasSum f a)
(b : β)

HasSum (fun n => if n = b then 0 else f n) (a - f b)


theorem coeff_zero_multiset_prod : t.prod.coeff 0 = (t.map fun f => coeff f 0).prod

{R : Type u}
[CommSemiring R]
(t : Multiset R[X])

t.prod.coeff 0 = (Multiset.map (fun f => f.coeff 0) t).prod


theorem filter_product_left (p : α → Prop) [DecidablePred p] :
    ((s ×ˢ t).filter fun x : α × β => p x.1) = s.filter p ×ˢ t

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}
(p : α → Prop)
[DecidablePred p]

Finset.filter (fun x => p x.1) (s ×ˢ t) = Finset.filter p s ×ˢ t


@[simp]
theorem coe_lt_degree {p : R[X]} {n : ℕ} : (n : WithBot ℕ) < degree p ↔ n < natDegree p

{R : Type u}
[Semiring R]
{p : R[X]}
{n : ℕ}


theorem span_eq_top_iff_finite (s : Set α) :
    span s = ⊤ ↔ ∃ s' : Finset α, ↑s' ⊆ s ∧ span (s' : Set α) = ⊤

Ideal.span s = ⊤ ↔ ∃ s', ↑s' ⊆ s ∧ Ideal.span ↑s' = ⊤


@[simp]
lemma equivPullbackObj_apply_snd (x : c.pt) : (equivPullbackObj hc x).1.2 = c.snd x

{c : CategoryTheory.Limits.PullbackCone f g}

(↑((CategoryTheory.Limits.PullbackCone.IsLimit.equivPullbackObj hc) x)).2 = c.snd x


theorem HasFDerivAt.clog {f : E → ℂ} {f' : E →L[ℂ] ℂ} {x : E} (h₁ : HasFDerivAt f f' x)
    (h₂ : f x ∈ slitPlane) : HasFDerivAt (fun t => log (f t)) ((f x)⁻¹ • f') x

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{f' : E →L[ℂ] ℂ}
{x : E}
(h₁ : HasFDerivAt f f' x)
(h₂ : f x ∈ Complex.slitPlane)

HasFDerivAt (fun t => Complex.log (f t)) ((f x)⁻¹ • f') x


lemma map_injective {φ : R →+* A} (hφ : Function.Injective φ) :
    Function.Injective <| map (φ := φ)

{R : Type u}
[CommRing R]
{A : Type v}
[CommRing A]
{φ : R →+* A}
(hφ : Function.Injective ⇑φ)


@[to_additive (attr := simp)]
theorem isUnit_coe : IsUnit (s : Set α) ↔ IsUnit s

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


@[to_additive]
theorem IsLowerSet.mul_right (hs : IsLowerSet s) : IsLowerSet (s * t)

{α : Type u_1}
[OrderedAddCommGroup α]
{s t : Set α}
(hs : IsLowerSet s)


theorem inf_apply [∀ i, SemilatticeInf (α i)] (f g : Π₀ i, α i) (i : ι) : (f ⊓ g) i = f i ⊓ g i

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → SemilatticeInf (α i)]
(f g : Π₀ (i : ι), α i)
(i : ι)


nonrec theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A)

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


theorem iso_symm_apply' (m : M') (a : M) (b : S) (eq1 : b • m = f a) :
    (iso S f).symm m = LocalizedModule.mk a b

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(m : M')
(a : M)
(b : ↥S)
(eq1 : b • m = f a)

(IsLocalizedModule.iso S f).symm m = LocalizedModule.mk a b


/-- If the sine of the angle between three points is 0, they are collinear. -/
theorem collinear_of_sin_eq_zero {p₁ p₂ p₃ : P} (h : Real.sin (∠ p₁ p₂ p₃) = 0) :
    Collinear ℝ ({p₁, p₂, p₃} : Set P)

(h : Real.sin (EuclideanGeometry.angle p₁ p₂ p₃) = 0)


/-- Specialization of `exists_primeSpectrum_prod_le_and_ne_bot_of_domain` to Dedekind domains:
Let `I : Ideal A` be a nonzero ideal, where `A` is a Dedekind domain that is not a field.
Then `exists_primeSpectrum_prod_le_and_ne_bot_of_domain` states we can find a product of prime
ideals that is contained within `I`. This lemma extends that result by making the product minimal:
let `M` be a maximal ideal that contains `I`, then the product including `M` is contained within `I`
and the product excluding `M` is not contained within `I`. -/
theorem exists_multiset_prod_cons_le_and_prod_not_le [IsDedekindDomain A] (hNF : ¬IsField A)
    {I M : Ideal A} (hI0 : I ≠ ⊥) (hIM : I ≤ M) [hM : M.IsMaximal] :
    ∃ Z : Multiset (PrimeSpectrum A),
      (M ::ₘ Z.map PrimeSpectrum.asIdeal).prod ≤ I ∧
        ¬Multiset.prod (Z.map PrimeSpectrum.asIdeal) ≤ I

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
(hNF : ¬IsField A)
{I M : Ideal A}
(hI0 : I ≠ ⊥)
(hIM : I ≤ M)
[hM : M.IsMaximal]

∃ Z, (M ::ₘ Multiset.map PrimeSpectrum.asIdeal Z).prod ≤ I ∧ ¬(Multiset.map PrimeSpectrum.asIdeal Z).prod ≤ I


/-- The composition of Frobenius and Verschiebung is multiplication by `p`. -/
theorem frobenius_verschiebung (x : 𝕎 R) : frobenius (verschiebung x) = x * p

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(x : WittVector p R)

WittVector.frobenius (WittVector.verschiebung x) = x * ↑p


@[simp, reassoc]
theorem t'_snd_fst_fst (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ pullback.snd _ _ ≫ pullback.fst _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ pullback.snd _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g i j k ≫
    CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g j k)
        (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g j i) ≫
      CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map j ≫ f) g ≫ 𝒰.map j) (𝒰.map i) ≫
        CategoryTheory.Limits.pullback.fst (𝒰.map j ≫ f) g =
  CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
      (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j)


@[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponentExists_iff_ne_zero : ExponentExists G ↔ exponent G ≠ 0

Monoid.ExponentExists G ↔ Monoid.exponent G ≠ 0


theorem gcd_a_modEq (a b : ℕ) : (a : ℤ) * Nat.gcdA a b ≡ Nat.gcd a b [ZMOD b]


@[simp]
theorem isBounded_empty : IsBounded (∅ : Set α)

∀ {x : Bornology α}, Bornology.IsBounded ∅


protected theorem HasBasis.ker (h : HasBasis l p s) : l.ker = ⋂ (i) (_ : p i), s i

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)


/-- Given an index `i : ι`, `Pair M i` is the type of pairs `(head, tail)` where `head : M i` and
`tail : Word M`, subject to the constraint that first letter of `tail` can't be `⟨i, m⟩`.
By prepending `head` to `tail`, one obtains a new word. We'll show that any word can be uniquely
obtained in this way. -/
@[ext]
structure Pair (i : ι) where
  /-- An element of `M i`, the first letter of the word. -/
  head : M i
  /-- The remaining letters of the word, excluding the first letter -/
  tail : Word M
  /-- The index first letter of tail of a `Pair M i` is not equal to `i` -/
  fstIdx_ne : fstIdx tail ≠ some i

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
{i : ι}
(self : Monoid.CoprodI.Word.Pair M i)


/-- A measure `μ` on a measurable group is right invariant
  if the measure of right translations of a set are equal to the measure of the set itself. -/
@[to_additive existing]
class IsMulRightInvariant [Mul G] (μ : Measure G) : Prop where
  map_mul_right_eq_self : ∀ g : G, map (· * g) μ = μ

{G : Type u_2}
[MeasurableSpace G]
[Mul G]
{μ : MeasureTheory.Measure G}
[self : μ.IsMulRightInvariant]
(g : G)

MeasureTheory.Measure.map (fun x => x * g) μ = μ


theorem divMonomial_add_modMonomial (x : MvPolynomial σ R) (s : σ →₀ ℕ) :
    monomial s 1 * (x /ᵐᵒⁿᵒᵐⁱᵃˡ s) + x %ᵐᵒⁿᵒᵐⁱᵃˡ s = x

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(x : MvPolynomial σ R)
(s : σ →₀ ℕ)

(MvPolynomial.monomial s) 1 * x.divMonomial s + x.modMonomial s = x


theorem IsSt.infinitesimal_sub {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : Infinitesimal (x - ↑r)


@[simp]
theorem zsmul_apply (r : ℤ) (f : NormedAddGroupHom V₁ V₂) (v : V₁) : (r • f) v = r • f v

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(r : ℤ)
(f : NormedAddGroupHom V₁ V₂)
(v : V₁)


@[to_additive (attr := simp)]
theorem threeGPFree_singleton (a : α) : ThreeGPFree ({a} : Set α)


theorem ComponentCompl.supp_inj {C D : G.ComponentCompl K} : C.supp = D.supp ↔ C = D

{V : Type u}
{G : SimpleGraph V}
{K : Set V}
{C D : G.ComponentCompl K}


theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ i ∉ I, V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i

{α : Type u}
{ι : Type u_2}
{s : ι → Filter α}
{U : Set α}

U ∈ ⨅ i, s i ↔ ∃ I, I.Finite ∧ ∃ V, (∀ (i : ι), V i ∈ s i) ∧ (∀ i ∉ I, V i = Set.univ) ∧ U = ⋂ i ∈ I, V i ∧ U = ⋂ i, V i


/-- The functor `SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)` which maps
`X` to the formal direct factor of `K[X]` defined by `PInfty`. -/
@[simps]
def N₁ : SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)

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

∀ {X Y : CategoryTheory.SimplicialObject C} (f : X ⟶ Y),
  (AlgebraicTopology.DoldKan.N₁.map f).f =
    AlgebraicTopology.DoldKan.PInfty ≫ AlgebraicTopology.AlternatingFaceMapComplex.map f


@[simp]
protected theorem Multiset.forall_coe (p : m → Prop) :
    (∀ x : m, p x) ↔ ∀ (x : α) (i : Fin (m.count x)), p ⟨x, i⟩

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}
(p : m.ToType → Prop)

(∀ (x : m.ToType), p x) ↔ ∀ (x : α) (i : Fin (Multiset.count x m)), p ⟨x, i⟩


@[to_additive]
theorem one_lt_iff_ne_one : 1 < a ↔ a ≠ 1

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a : α}


@[simp]
theorem one_mulVec (v : m → α) : 1 *ᵥ v = v

{m : Type u_2}
{α : Type v}
[NonAssocSemiring α]
[Fintype m]
[DecidableEq m]
(v : m → α)


theorem isComplete_iff_ultrafilter' {s : Set α} :
    IsComplete s ↔ ∀ l : Ultrafilter α, Cauchy (l : Filter α) → s ∈ l → ∃ x ∈ s, ↑l ≤ 𝓝 x

{α : Type u}
[uniformSpace : UniformSpace α]
{s : Set α}

IsComplete s ↔ ∀ (l : Ultrafilter α), Cauchy ↑l → s ∈ l → ∃ x ∈ s, ↑l ≤ 𝓝 x


theorem vars_sub_subset [DecidableEq σ] : (p - q).vars ⊆ p.vars ∪ q.vars

{R : Type u}
{σ : Type u_1}
[CommRing R]
(p : MvPolynomial σ R)
{q : MvPolynomial σ R}
[DecidableEq σ]


@[simp]
theorem add_mem_center [Distrib M] {a b : M} (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) :
    a + b ∈ Set.center M

{M : Type u_1}
[Distrib M]
{a b : M}
(ha : a ∈ Set.center M)
(hb : b ∈ Set.center M)


/-- The submonoid generated by a set includes the set. -/
@[to_additive (attr := simp, aesop safe 20 apply (rule_sets := [SetLike]))
  "The `AddSubmonoid` generated by a set includes the set."]
theorem subset_closure : s ⊆ closure s

{M : Type u_1}
[AddZeroClass M]
{s : Set M}


theorem lintegral_biUnion₀ {t : Set β} {s : β → Set α} (ht : t.Countable)
    (hm : ∀ i ∈ t, NullMeasurableSet (s i) μ) (hd : t.Pairwise (AEDisjoint μ on s)) (f : α → ℝ≥0∞) :
    ∫⁻ a in ⋃ i ∈ t, s i, f a ∂μ = ∑' i : t, ∫⁻ a in s i, f a ∂μ

(hm : ∀ i ∈ t, MeasureTheory.NullMeasurableSet (s i) μ)

(hd : t.Pairwise (MeasureTheory.AEDisjoint μ on s))

(f : α → ℝ≥0∞)

∫⁻ (a : α) in ⋃ i ∈ t, s i, f a ∂μ = ∑' (i : ↑t), ∫⁻ (a : α) in s ↑i, f a ∂μ


@[to_additive]
theorem hasProd_le (h : ∀ i, f i ≤ g i) (hf : HasProd f a₁) (hg : HasProd g a₂) : a₁ ≤ a₂

{ι : Type u_1}
{α : Type u_3}
[OrderedCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f g : ι → α}
{a₁ a₂ : α}
(h : ∀ (i : ι), f i ≤ g i)
(hf : HasProd f a₁)
(hg : HasProd g a₂)


theorem toProperty_apply (P : AffineTargetMorphismProperty)
    {X Y : Scheme} (f : X ⟶ Y) [i : IsAffine Y] : P.toProperty f ↔ P f


theorem sign_eq_sign_of_equiv [DecidableEq β] [Fintype β] (f : Perm α) (g : Perm β) (e : α ≃ β)
    (h : ∀ x, e (f x) = g (e x)) : sign f = sign g

{α : Type u}
[DecidableEq α]
{β : Type v}
[Fintype α]
[DecidableEq β]
[Fintype β]
(f : Equiv.Perm α)
(g : Equiv.Perm β)
(e : α ≃ β)
(h : ∀ (x : α), e (f x) = g (e x))


@[to_additive]
theorem MonoidHom.uniformContinuous_of_continuousAt_one [UniformSpace β] [Group β] [UniformGroup β]
    (f : α →* β) (hf : ContinuousAt f 1) : UniformContinuous f

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
[UniformSpace β]
[AddGroup β]
[UniformAddGroup β]
(f : α →+ β)
(hf : ContinuousAt (⇑f) 0)


@[simp]
theorem IsHermitian.map {A : Matrix n n α} (h : A.IsHermitian) (f : α → β)
    (hf : Function.Semiconj f star star) : (A.map f).IsHermitian

{α : Type u_1}
{β : Type u_2}
{n : Type u_4}
[Star α]
[Star β]
{A : Matrix n n α}
(h : A.IsHermitian)
(f : α → β)
(hf : Function.Semiconj f star star)


@[simp]
theorem toFiniteMeasure_apply_eq_apply (ν : ProbabilityMeasure Ω) (s : Set Ω) :
    ν.toFiniteMeasure s = ν s

(ν : MeasureTheory.ProbabilityMeasure Ω)


@[to_additive (attr := simp)]
theorem liftOnUnits_mk (f : ∀ x y : M, c (x * y) 1 → c (y * x) 1 → α)
    (Hf : ∀ x y hxy hyx x' y' hxy' hyx', c x x' → c y y' → f x y hxy hyx = f x' y' hxy' hyx')
    (x y : M) (hxy hyx) :
    liftOnUnits ⟨(x : c.Quotient), y, hxy, hyx⟩ f Hf = f x y (c.eq.1 hxy) (c.eq.1 hyx)

(f : (x y : M) → c (x * y) 1 → c (y * x) 1 → α)

(Hf :
  ∀ (x y : M) (hxy : c (x * y) 1) (hyx : c (y * x) 1) (x' y' : M) (hxy' : c (x' * y') 1) (hyx' : c (y' * x') 1),
    c x x' → c y y' → f x y hxy hyx = f x' y' hxy' hyx')

Con.liftOnUnits { val := ↑x, inv := ↑y, val_inv := hxy, inv_val := hyx } f Hf = f x y ⋯ ⋯


theorem inv_t_mul_of (b : B) :
    t⁻¹ * (of (b : G) : HNNExtension G A B φ) = of (φ.symm b : G) * t⁻¹

{G : Type u_1}
[Group G]
{A B : Subgroup G}
{φ : ↥A ≃* ↥B}
(b : ↥B)

HNNExtension.t⁻¹ * HNNExtension.of ↑b = HNNExtension.of ↑(φ.symm b) * HNNExtension.t⁻¹


theorem supDegree_sum_le {ι} {s : Finset ι} {f : ι → R[A]} :
    (∑ i ∈ s, f i).supDegree D ≤ s.sup (fun i => (f i).supDegree D)

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[Semiring R]
[SemilatticeSup B]
[OrderBot B]
{D : A → B}
{ι : Type u_7}
{s : Finset ι}
{f : ι → AddMonoidAlgebra R A}

AddMonoidAlgebra.supDegree D (∑ i ∈ s, f i) ≤ s.sup fun i => AddMonoidAlgebra.supDegree D (f i)


lemma neg_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) :
    W.neg P = P z • ![P x / P z ^ 2, W.toAffine.negY (P x / P z ^ 2) (P y / P z ^ 3), 1]

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hPz : P z ≠ 0)


/-- A linear isometry preserves the inner product. -/
@[simp]
theorem LinearIsometry.inner_map_map (f : E →ₗᵢ[𝕜] E') (x y : E) : ⟪f x, f y⟫ = ⟪x, y⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
(f : E →ₗᵢ[𝕜] E')
(x y : E)


@[simp]
theorem cancel_counitInv_right_assoc' {W X X' Y Y' Z : D} (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z)
    (f' : W ⟶ X') (g' : X' ⟶ Y') (h' : Y' ⟶ Z) :
    f ≫ g ≫ h ≫ e.counitInv.app Z = f' ≫ g' ≫ h' ≫ e.counitInv.app Z ↔
    f ≫ g ≫ h = f' ≫ g' ≫ h'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{W X X' Y Y' Z : D}
(f : W ⟶ X)
(g : X ⟶ Y)
(h : Y ⟶ Z)
(f' : W ⟶ X')
(g' : X' ⟶ Y')
(h' : Y' ⟶ Z)

CategoryTheory.CategoryStruct.comp f
      (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.comp h (e.counitInv.app Z))) =
    CategoryTheory.CategoryStruct.comp f'
      (CategoryTheory.CategoryStruct.comp g' (CategoryTheory.CategoryStruct.comp h' (e.counitInv.app Z))) ↔
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g h) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' h')


/-- The Cesaro average of a converging sequence converges to the same limit. -/
theorem Filter.Tendsto.cesaro_smul {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {u : ℕ → E}
    {l : E} (h : Tendsto u atTop (𝓝 l)) :
    Tendsto (fun n : ℕ => (n⁻¹ : ℝ) • ∑ i ∈ range n, u i) atTop (𝓝 l)

(h : Filter.Tendsto u Filter.atTop (𝓝 l))

Filter.Tendsto (fun n => (↑n)⁻¹ • ∑ i ∈ Finset.range n, u i) Filter.atTop (𝓝 l)


theorem disjoint_closedBall_of_lt_infDist {r : ℝ} (h : r < infDist x s) :
    Disjoint (closedBall x r) s

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}
{r : ℝ}
(h : r < Metric.infDist x s)


lemma isSemisimpleModule_of_isSemisimpleModule_submodule' {p : ι → Submodule R M}
    (hp : ∀ i, IsSemisimpleModule R (p i)) (hp' : ⨆ i, p i = ⊤) :
    IsSemisimpleModule R M

(hp : ∀ (i : ι), IsSemisimpleModule R ↥(p i))


theorem isRotated_append : (l ++ l') ~r (l' ++ l)


theorem Prime.ne_one {p : ℕ+} : p.Prime → p ≠ 1


@[simp]
theorem flip_w : (flip u).w = u.z


theorem unmop_mop (X : C) : unmop (mop X) = X


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

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

(SeqLeft.seqLeft x fun x => y).run ctx = SeqLeft.seqLeft (x.run ctx) fun x => y.run ctx


lemma scottHausdorff_le_scott : scottHausdorff α ≤ scott α

Topology.scottHausdorff α ≤ Topology.scott α


@[simp]
theorem pointedToTwoPFst_comp_forget_to_bipointed :
    pointedToTwoPFst ⋙ forget₂ TwoP Bipointed = pointedToBipointedFst

pointedToTwoPFst ⋙ CategoryTheory.forget₂ TwoP Bipointed = pointedToBipointedFst


theorem PseudoMetricSpace.replaceTopology_eq {γ} [U : TopologicalSpace γ] (m : PseudoMetricSpace γ)
    (H : U = m.toUniformSpace.toTopologicalSpace) : m.replaceTopology H = m

(H : U = UniformSpace.toTopologicalSpace)


(WeierstrassCurve.ofJ j).Δ = j ^ 2 * (j - 1728) ^ 9


lemma image2_curry (f : α × β → γ) (s : Set α) (t : Set β) :
    image2 (fun a b ↦ f (a, b)) s t = f '' s ×ˢ t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
(f : α × β → γ)
(s : Set α)
(t : Set β)

Set.image2 (fun a b => f (a, b)) s t = f '' s ×ˢ t


private theorem add_lt_add_iff_left' (a) {b c : Ordinal} : a + b < a + c ↔ b < c

(a : Ordinal.{u_4})
{b c : Ordinal.{u_4}}


theorem indep_iSup_of_antitone [SemilatticeInf ι] [IsProbabilityMeasure μ]
    (h_indep : ∀ i, Indep (m i) m1 μ) (h_le : ∀ i, m i ≤ _mΩ) (h_le' : m1 ≤ _mΩ) (hm : Antitone m) :
    Indep (⨆ i, m i) m1 μ

(h_indep : ∀ (i : ι), ProbabilityTheory.Indep (m i) m1 μ)


theorem ext_on_codisjoint {φ ψ : F} {S T : Subalgebra R A} (hST : Codisjoint S T)
    (hS : Set.EqOn φ ψ S) (hT : Set.EqOn φ ψ T) : φ = ψ

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{F : Type u_4}
[FunLike F A B]
[AlgHomClass F R A B]
{φ ψ : F}
{S T : Subalgebra R A}
(hST : Codisjoint S T)
(hS : Set.EqOn ⇑φ ⇑ψ ↑S)
(hT : Set.EqOn ⇑φ ⇑ψ ↑T)


@[to_additive (attr := simp, norm_cast)] lemma val_inv_eq_inv_val (u : αˣ) : ↑u⁻¹ = (u⁻¹ : α)

{α : Type u}
[SubtractionMonoid α]
(u : AddUnits α)


lemma mapBifunctorRightUnitor_hasMap :
    HasMap (((mapBifunctor F J I).obj X).obj ((single₀ I).obj Y)) p

(F : CategoryTheory.Functor D (CategoryTheory.Functor C D))

(e : F.flip.obj Y ≅ CategoryTheory.Functor.id D)

[(X : D) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) (F.obj X)]

(((CategoryTheory.GradedObject.mapBifunctor F J I).obj X).obj ((CategoryTheory.GradedObject.single₀ I).obj Y)).HasMap p


theorem subtype_eq_empty {p : α → Prop} [DecidablePred p] {s : Finset α} :
    s.subtype p = ∅ ↔ ∀ x, p x → x ∉ s

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s : Finset α}

Finset.subtype p s = ∅ ↔ ∀ (x : α), p x → x ∉ s


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

(Algebra.norm ℤ) (hζ.toInteger ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s


/-- The closure of a set equals the intersection of its closed thickenings of positive radii. -/
theorem closure_eq_iInter_cthickening (E : Set α) :
    closure E = ⋂ (δ : ℝ) (_ : 0 < δ), cthickening δ E

{α : Type u}
[PseudoEMetricSpace α]
(E : Set α)

closure E = ⋂ δ, ⋂ (_ : 0 < δ), Metric.cthickening δ E


/-- The **Schwarz Lemma**: if `f : ℂ → ℂ` sends an open disk to itself and the center `c` of this
disk to itself, then for any point `z` of this disk we have `dist (f z) c ≤ dist z c`. -/
theorem dist_le_dist_of_mapsTo_ball_self (hd : DifferentiableOn ℂ f (ball c R))
    (h_maps : MapsTo f (ball c R) (ball c R)) (hc : f c = c) (hz : z ∈ ball c R) :
    dist (f z) c ≤ dist z c

(hd : DifferentiableOn ℂ f (Metric.ball c R))

(h_maps : Set.MapsTo f (Metric.ball c R) (Metric.ball c R))


@[to_additive]
theorem liftOn_mk {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn (mk a b) f H = f a b

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

(Localization.mk a b).liftOn f H = f a b


lemma right_deriv_lt_slope (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f (Ioi x) x) :
    derivWithin f (Ioi x) x < slope f x y

(hfd : DifferentiableWithinAt ℝ f (Set.Ioi x) x)

derivWithin f (Set.Ioi x) x < slope f x y


theorem isClopen_iff [PreconnectedSpace α] {s : Set α} : IsClopen s ↔ s = ∅ ∨ s = univ

{α : Type u}
[TopologicalSpace α]
[PreconnectedSpace α]
{s : Set α}


theorem mem_nhds_prod_iff {x : X} {y : Y} {s : Set (X × Y)} :
    s ∈ 𝓝 (x, y) ↔ ∃ u ∈ 𝓝 x, ∃ v ∈ 𝓝 y, u ×ˢ v ⊆ s

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


theorem sequence_le (a : α) : f (hf.sequence f (Encodable.encode a + 1)) ≤ f a

(hf : Directed (fun x x_1 => x ≥ x_1) f)

f (Directed.sequence f hf (Encodable.encode a + 1)) ≤ f a


theorem IsSuffix.trans : ∀ {l₁ l₂ l₃ : List α}, l₁ <:+ l₂ → l₂ <:+ l₃ → l₁ <:+ l₃


/-- A `LinearMap` on a finite-dimensional space over a complete field
  is injective iff it is anti-Lipschitz. -/
theorem LinearMap.injective_iff_antilipschitz [FiniteDimensional 𝕜 E] (f : E →ₗ[𝕜] F) :
    Injective f ↔ ∃ K > 0, AntilipschitzWith K f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type w}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace 𝕜]
[FiniteDimensional 𝕜 E]
(f : E →ₗ[𝕜] F)

Function.Injective ⇑f ↔ ∃ K > 0, AntilipschitzWith K ⇑f


/-- If `F` reflects pullbacks, then it reflects monomorphisms. -/
theorem reflects_mono_of_reflectsLimit {X Y : C} (f : X ⟶ Y) [ReflectsLimit (cospan f f) F]
    [Mono (F.map f)] : Mono f

[CategoryTheory.Limits.ReflectsLimit (CategoryTheory.Limits.cospan f f) F]


@[simp]
theorem isSplitMono_iff [Full F] [Faithful F] : IsSplitMono (F.map f) ↔ IsSplitMono f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
{X Y : C}
(f : X ⟶ Y)
[F.Full]
[F.Faithful]

CategoryTheory.IsSplitMono (F.map f) ↔ CategoryTheory.IsSplitMono f


theorem multiset_sum_pow_char (s : Multiset R) : s.sum ^ p = (s.map (· ^ p : R → R)).sum

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
(s : Multiset R)

s.sum ^ p = (Multiset.map (fun x => x ^ p) s).sum


@[simp]
theorem nthLe_range {n} (i) (H : i < (range n).length) : nthLe (range n) i H = i

{n : ℕ}
(i : ℕ)
(H : i < (List.range n).length)


theorem inter_product [DecidableEq α] [DecidableEq β] : (s ∩ s') ×ˢ t = s ×ˢ t ∩ s' ×ˢ t

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


@[simp]
theorem filter_empty : filter p ∅ = ∅

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


@[reassoc (attr := simp)]
theorem QInfty_f_naturality (n : ℕ) {X Y : SimplicialObject C} (f : X ⟶ Y) :
    f.app (op [n]) ≫ QInfty.f n = QInfty.f n ≫ f.app (op [n])

{X Y : CategoryTheory.SimplicialObject C}

f.app (Opposite.op [n]) ≫ AlgebraicTopology.DoldKan.QInfty.f n =
  AlgebraicTopology.DoldKan.QInfty.f n ≫ f.app (Opposite.op [n])


theorem hausdorffMeasure_of_lt_dimH {s : Set X} {d : ℝ≥0} (h : ↑d < dimH s) : μH[d] s = ∞

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{s : Set X}
{d : ℝ≥0}
(h : ↑d < dimH s)


lemma eq_targetAffineLocally : P = targetAffineLocally Q

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

P = AlgebraicGeometry.targetAffineLocally Q


@[csimp] theorem range'_eq_range'TR : @range' = @range'TR

List.range'TR.go step n (s + step * n) (List.range' (s + step * n) m step) = List.range' s (n + m) step


protected theorem eq_zero_iff {f : α → E} {s : Set α} (hf : LocallyBoundedVariationOn f s) {a b : α}
    (ha : a ∈ s) (hb : b ∈ s) :
    variationOnFromTo f s a b = 0 ↔
      ∀ ⦃x⦄ (_hx : x ∈ s ∩ uIcc a b) ⦃y⦄ (_hy : y ∈ s ∩ uIcc a b), edist (f x) (f y) = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)

variationOnFromTo f s a b = 0 ↔
  ∀ ⦃x : α⦄, x ∈ s ∩ Set.uIcc a b → ∀ ⦃y : α⦄, y ∈ s ∩ Set.uIcc a b → edist (f x) (f y) = 0


/-- Auxiliary definition for `extFunctor`. -/
@[simps]
noncomputable def extFunctorObj (X : C) (n : ℕ) : C ⥤ AddCommGrp.{w}

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.HasExt C]
(X : C)
(n : ℕ)

∀ {X_1 Y : C} (f : X_1 ⟶ Y),
  (CategoryTheory.Abelian.extFunctorObj X n).map f = AddCommGrp.ofHom ((CategoryTheory.Abelian.Ext.mk₀ f).postcomp X ⋯)


theorem map_rangeS : f.rangeS.map g = (g.comp f).rangeS

{R : Type u}
{S : Type v}
{T : Type w}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring T]
(g : S →+* T)
(f : R →+* S)

Subsemiring.map g f.rangeS = (g.comp f).rangeS


@[simp]
lemma mod_succ_eq_iff_lt : m % n.succ = m ↔ m < n.succ


theorem inversion_eq_center (hR : R ≠ 0) : inversion c R x = c ↔ x = c

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c x : P}
{R : ℝ}
(hR : R ≠ 0)

EuclideanGeometry.inversion c R x = c ↔ x = c


theorem tendstoUniformlyOn_diff_iUnionNotConvergentSeq (hε : 0 < ε)
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) :
    TendstoUniformlyOn f g atTop (s \ Egorov.iUnionNotConvergentSeq hε hf hg hsm hs hfg)

{f : ι → α → β}

(hf : ∀ (n : ι), MeasureTheory.StronglyMeasurable (f n))

(hg : MeasureTheory.StronglyMeasurable g)

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (g x)))

TendstoUniformlyOn f g Filter.atTop (s \ MeasureTheory.Egorov.iUnionNotConvergentSeq hε hf hg hsm hs hfg)


/-- The identity map between `R` and `PreQuasiregular R`. -/
@[simps]
def equiv : R ≃ PreQuasiregular R


lemma ofList_cons_smul {R} [CommSemiring R] (r : R) (rs : List R) {M}
    [AddCommMonoid M] [Module R M] (N : Submodule R M) :
    ofList (r :: rs) • N = r • N ⊔ ofList rs • N

{R : Type u_7}
[CommSemiring R]
(r : R)
(rs : List R)
{M : Type u_8}
[AddCommMonoid M]
[Module R M]
(N : Submodule R M)

Ideal.ofList (r :: rs) • N = r • N ⊔ Ideal.ofList rs • N


theorem bot_factors_iff_zero {A B : C} (f : A ⟶ B) : (⊥ : Subobject B).Factors f ↔ f = 0


theorem minimals_antichain : IsAntichain r (minimals r s)

{α : Type u_1}
(r : α → α → Prop)
(s : Set α)
[IsAntisymm α r]


@[simp]
theorem keys_erase_toFinset (a : α) (s : AList β) : keys ⟦s.erase a⟧ = (keys ⟦s⟧).erase a

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(s : AList β)

⟦AList.erase a s⟧.keys = ⟦s⟧.keys.erase a


@[to_additive]
theorem ofMulEquivOfDom_comp {k : M ≃* P} (H : T.map k.symm.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k x) = f.toMap x

(H : AddSubmonoid.map k.symm.toAddMonoidHom T = S)

(f.ofAddEquivOfDom H).toMap (k x) = f.toMap x


@[simp]
lemma rnDeriv_eq_zero (μ ν : Measure α) [μ.HaveLebesgueDecomposition ν] :
    μ.rnDeriv ν =ᵐ[ν] 0 ↔ μ ⟂ₘ ν

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


@[to_additive (attr := simp)]
theorem lift_mk {φ : G →* M} (HN : N ≤ φ.ker) (g : G) : lift N φ HN (g : Q) = φ g

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
{M : Type x}
[Monoid M]
{φ : G →* M}
(HN : N ≤ φ.ker)
(g : G)


@[simp]
theorem normAtPlace_apply (w : InfinitePlace K) (x : K) :
    normAtPlace w (mixedEmbedding K x) = w x

{K : Type u_1}
[Field K]
(w : NumberField.InfinitePlace K)
(x : K)

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


@[simp]
theorem takeI_nil : ∀ n, takeI n (@nil α) = replicate n default

List.takeI n [] = List.replicate n default


@[nontriviality]
theorem contDiff_of_subsingleton [Subsingleton F] : ContDiff 𝕜 n f

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


@[simp]
theorem map_sup {β} (f : α → β) (m m' : OuterMeasure α) : map f (m ⊔ m') = map f m ⊔ map f m'

{α : Type u_1}
{β : Type u_3}
(f : α → β)
(m m' : MeasureTheory.OuterMeasure α)

(MeasureTheory.OuterMeasure.map f) (m ⊔ m') =
  (MeasureTheory.OuterMeasure.map f) m ⊔ (MeasureTheory.OuterMeasure.map f) m'


/-- If a space of multilinear maps from `Π i, E i` to `F` is complete, and each `E i` has a nonzero
element, then `F` is complete. -/
lemma completeSpace_of_completeSpace_continuousMultilinearMap
    [CompleteSpace (ContinuousMultilinearMap 𝕜 M F)]
    {m : ∀ i, M i} (hm : ∀ i, m i ≠ 0) : CompleteSpace F


{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{v : MeasureTheory.VectorMeasure α M}
{w : MeasureTheory.VectorMeasure α N}
(h : v ⟂ᵥ w)


/-- If the vector is zero, `secondInter` gives the original point. -/
@[simp]
theorem Sphere.secondInter_zero (s : Sphere P) (p : P) : s.secondInter p (0 : V) = p

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


lemma le_of_lt_add_of_dvd (h : a < b + n) : n ∣ a → n ∣ b → a ≤ b


theorem not_le_delta {s} (H : 1 ≤ s) : ¬s ≤ delta * 0


/-- The **alternating series test** for monotone sequences.
See also `Monotone.tendsto_alternating_series_of_tendsto_zero`. -/
theorem Monotone.cauchySeq_alternating_series_of_tendsto_zero (hfa : Monotone f)
    (hf0 : Tendsto f atTop (𝓝 0)) : CauchySeq fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i

(hf0 : Filter.Tendsto f Filter.atTop (𝓝 0))

CauchySeq fun n => ∑ i ∈ Finset.range n, (-1) ^ i * f i


/-- The inner product between a multiple of a vector and a multiple of a `π / 2` rotation of
that vector is zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_smul_right (x : V) (r₁ r₂ : ℝ) :
    ⟪r₂ • x, r₁ • o.rotation (π / 2 : ℝ) x⟫ = 0

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

⟪r₂ • x, r₁ • (o.rotation ↑(π / 2)) x⟫_ℝ = 0


theorem continuousAt_cpow_const {a b : ℂ} (ha : a ∈ slitPlane) :
    ContinuousAt (· ^ b) a


/-- For an s-finite kernel `κ` and a function `f : α → β → ℝ≥0∞` which is measurable when seen as a
map from `α × β` (hypothesis `Measurable (uncurry f)`), the integral `a ↦ ∫⁻ b, f a b ∂(κ a)` is
measurable. -/
theorem _root_.Measurable.lintegral_kernel_prod_right {f : α → β → ℝ≥0∞}
    (hf : Measurable (uncurry f)) : Measurable fun a => ∫⁻ b, f a b ∂κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
{f : α → β → ℝ≥0∞}
(hf : Measurable (Function.uncurry f))

Measurable fun a => ∫⁻ (b : β), f a b ∂κ a


theorem HasFDerivAt.csinh (hf : HasFDerivAt f f' x) :
    HasFDerivAt (fun x => Complex.sinh (f x)) (Complex.cosh (f x) • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{f' : E →L[ℂ] ℂ}
{x : E}
(hf : HasFDerivAt f f' x)


/-- `IsDedekindDomain` and `IsDedekindDomainInv` are equivalent ways
to express that an integral domain is a Dedekind domain. -/
theorem isDedekindDomain_iff_isDedekindDomainInv [IsDomain A] :
    IsDedekindDomain A ↔ IsDedekindDomainInv A

{A : Type u_2}
[CommRing A]
[IsDomain A]


/-- The functor `Comma L₁ R ⥤ Comma L₃ R` induced by the composition of two natural transformations
    `l : L₁ ⟶ L₂` and `l' : L₂ ⟶ L₃` is naturally isomorphic to the composition of the two functors
    induced by these natural transformations. -/
@[simps!]
def mapLeftComp (l : L₁ ⟶ L₂) (l' : L₂ ⟶ L₃) :
    mapLeft R (l ≫ l') ≅ mapLeft R l' ⋙ mapLeft R l

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ L₃ : CategoryTheory.Functor A T}
(l : L₁ ⟶ L₂)
(l' : L₂ ⟶ L₃)
(X : CategoryTheory.Comma L₃ R)

((CategoryTheory.Comma.mapLeftComp R l l').inv.app X).left = CategoryTheory.CategoryStruct.id X.left


@[simp]
theorem isBounded_singleton : IsBounded ({x} : Set α)

∀ {x : Bornology α} {x_1 : α}, Bornology.IsBounded {x_1}


@[simp]
theorem vars_sub_of_disjoint [DecidableEq σ] (hpq : Disjoint p.vars q.vars) :
    (p - q).vars = p.vars ∪ q.vars

{R : Type u}
{σ : Type u_1}
[CommRing R]
(p : MvPolynomial σ R)
{q : MvPolynomial σ R}
[DecidableEq σ]
(hpq : Disjoint p.vars q.vars)


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

{M : Type u_1}
[MulOneClass M]
(S : Submonoid M)
[Subsingleton ↥S]


@[simp]
theorem integral_pow : ∫ x in a..b, x ^ n = (b ^ (n + 1) - a ^ (n + 1)) / (n + 1)


/--
Associate to a `u`-small topological space the corresponding light condensed set, given by
`yonedaPresheaf`.
-/
@[simps! val_obj val_map]
noncomputable def TopCat.toLightCondSet (X : TopCat.{u}) : LightCondSet.{u}

∀ (X_1 : LightProfiniteᵒᵖ), X.toLightCondSet.val.obj X_1 = C(↑(Opposite.unop X_1).toTop, ↑X)


/-- A mixin for right cancellative addition. -/
class IsRightCancelAdd (G : Type u) [Add G] : Prop where
  /-- Addition is right cancellative. -/
  protected add_right_cancel : ∀ a b c : G, a + b = c + b → a = c

{G : Type u}
[Add G]
[self : IsRightCancelAdd G]
(a b c : G)


/-- `Function.const` as a `MonoidHom`. -/
@[to_additive (attr := simps) "`Function.const` as an `AddMonoidHom`."]
def Pi.constMonoidHom (α β : Type*) [MulOneClass β] : β →* α → β

(α : Type u_3)
(β : Type u_4)
[AddZeroClass β]
(a : β)

∀ (a_1 : α), (Pi.constAddMonoidHom α β) a a_1 = Function.const α a a_1


@[to_additive]
theorem Set.piecewise_inv [∀ i, Inv (f i)] (s : Set I) [∀ i, Decidable (i ∈ s)] (f₁ g₁ : ∀ i, f i) :
    s.piecewise f₁⁻¹ g₁⁻¹ = (s.piecewise f₁ g₁)⁻¹

{I : Type u}
{f : I → Type v}
[(i : I) → Inv (f i)]
(s : Set I)
[(i : I) → Decidable (i ∈ s)]
(f₁ g₁ : (i : I) → f i)


theorem fromLocalizedModule_mk (m : M) (s : S) :
    fromLocalizedModule S f (LocalizedModule.mk m s) =
      (IsLocalizedModule.map_units f s).unit⁻¹.val (f m)

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(m : M)
(s : ↥S)

(IsLocalizedModule.fromLocalizedModule S f) (LocalizedModule.mk m s) = ↑⋯.unit⁻¹ (f m)


@[simp] lemma ceilRoot_zero_right (n : ℕ) : ceilRoot n 0 = 0


theorem IsPartialOrder.swap (r) [IsPartialOrder α r] : IsPartialOrder α (swap r)

{α : Type u}
(r : α → α → Prop)
[IsPartialOrder α r]


theorem exact_d_f {X Y : C} (f : X ⟶ Y) :
    (ShortComplex.mk (d f) f (by simp)).Exact

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

(CategoryTheory.ShortComplex.mk (CategoryTheory.Projective.d f) f ⋯).Exact


@[simp]
theorem toCone_π_app_right (c : BinaryBicone P Q) : c.toCone.π.app ⟨WalkingPair.right⟩ = c.snd

(c : CategoryTheory.Limits.BinaryBicone P Q)

c.toCone.π.app { as := CategoryTheory.Limits.WalkingPair.right } = c.snd


theorem locallyConnectedSpace_iff_connectedComponentIn_open :
    LocallyConnectedSpace α ↔
      ∀ F : Set α, IsOpen F → ∀ x ∈ F, IsOpen (connectedComponentIn F x)

LocallyConnectedSpace α ↔ ∀ (F : Set α), IsOpen F → ∀ x ∈ F, IsOpen (connectedComponentIn F x)


@[simps]
instance assoc (X Y Z W : C) [MonoidalCoherence (X ⊗ (Y ⊗ Z)) W] :
    MonoidalCoherence ((X ⊗ Y) ⊗ Z) W

[CategoryTheory.MonoidalCoherence (X ⊗ Y ⊗ Z) W]


@[simp]
theorem sqTo_right (f : Hom C₁ C₂) (j : ι) : (f.sqTo j).right = f.f j


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

(α : Type u_1)
[NonemptyFiniteLinearOrder α]


theorem kahler_comp_rightAngleRotation' (x y : E) :
    -(Complex.I * (Complex.I * o.kahler x y)) = o.kahler x y

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

-(Complex.I * (Complex.I * (o.kahler x) y)) = (o.kahler x) y


@[to_additive]
theorem map_equiv_eq_comap_symm (f : M ≃* N) (K : Subsemigroup M) :
    K.map (f : M →ₙ* N) = K.comap (f.symm : N →ₙ* M)

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M ≃* N)
(K : Subsemigroup M)

Subsemigroup.map (↑f) K = Subsemigroup.comap (↑f.symm) K


/-- A version of `Finset.centerMass_mem_convexHull` for when the weights are nonpositive. -/
lemma Finset.centerMass_id_mem_convexHull_of_nonpos (t : Finset E) {w : E → R}
    (hw₀ : ∀ i ∈ t, w i ≤ 0) (hws : ∑ i ∈ t, w i < 0) :
    t.centerMass w id ∈ convexHull R (t : Set E)

{R : Type u_1}
{E : Type u_3}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(t : Finset E)
{w : E → R}
(hw₀ : ∀ i ∈ t, w i ≤ 0)
(hws : ∑ i ∈ t, w i < 0)


/-- Although not explicitly stated, the assumptions of lemma `nat_degree_C_mul_eq_of_mul_ne_zero`
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
-/
theorem natDegree_C_mul_eq_of_mul_ne_zero (h : a * p.leadingCoeff ≠ 0) :
    (C a * p).natDegree = p.natDegree

{R : Type u}
{a : R}
[Semiring R]
{p : R[X]}
(h : a * p.leadingCoeff ≠ 0)

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


@[simp 1100]
theorem normalize_gcd : normalize (s.gcd f) = s.gcd f

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}


@[simp]
lemma Quot.ι_desc (j : J) (x : F.obj j) : Quot.desc c (Quot.ι F j x) = c.ι.app j x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
(c : CategoryTheory.Limits.Cocone F)
(j : J)
(x : F.obj j)

CategoryTheory.Limits.Types.Quot.desc c (CategoryTheory.Limits.Types.Quot.ι F j x) = c.ι.app j x


/-- Version allowing some constant terms (which are omitted from the sums). -/
lemma hasSum_mellin_pi_mul₀ {a : ι → ℂ} {p : ι → ℝ} {F : ℝ → ℂ} {s : ℂ}
    (hp : ∀ i, 0 ≤ p i) (hs : 0 < s.re)
    (hF : ∀ t ∈ Ioi 0, HasSum (fun i ↦ if p i = 0 then 0 else a i * rexp (-π * p i * t)) (F t))
    (h_sum : Summable fun i ↦ ‖a i‖ / (p i) ^ s.re) :
    HasSum (fun i ↦ π ^ (-s) * Gamma s * a i / p i ^ s) (mellin F s)

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

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

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


lemma exists_comp_symm_eq_of_comp_eq [Algebra k K] [IsGalois k K] (φ ψ : K →+* ℂ)
    (h : φ.comp (algebraMap k K) = ψ.comp (algebraMap k K)) :
    ∃ σ : K ≃ₐ[k] K, φ.comp σ.symm = ψ


/-- A function from a locally finite preorder is strictly antitone if and only if it is strictly
antitone when restricted to pairs satisfying `a ⋖ b`. -/
lemma strictAnti_iff_forall_covBy [Preorder α] [LocallyFiniteOrder α] [Preorder β]
    (f : α → β) : StrictAnti f ↔ ∀ a b : α, a ⋖ b → f b < f a

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

StrictAnti f ↔ ∀ (a b : α), a ⋖ b → f b < f a


@[to_additive max_sub_sub_left]
theorem max_div_div_left' (a b c : α) : max (a / b) (a / c) = a / min b c

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


@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_hom_naturality :
    cyclesMap ((single C c j).map f) j ≫ (singleObjCyclesSelfIso c j B).hom =
      (singleObjCyclesSelfIso c j A).hom ≫ f

HomologicalComplex.cyclesMap ((HomologicalComplex.single C c j).map f) j ≫
    (HomologicalComplex.singleObjCyclesSelfIso c j B).hom =
  (HomologicalComplex.singleObjCyclesSelfIso c j A).hom ≫ f


@[reassoc (attr := simp)]
lemma comp_descHomotopyZeroZero {Y Z : C} {I : InjectiveResolution Y} {J : InjectiveResolution Z}
    (f : I.cocomplex ⟶ J.cocomplex) (comm : I.ι ≫ f = 0) :
    I.cocomplex.d 0 1 ≫ descHomotopyZeroZero f comm = f.f 0

{I : CategoryTheory.InjectiveResolution Y}

{J : CategoryTheory.InjectiveResolution Z}

I.cocomplex.d 0 1 ≫ CategoryTheory.InjectiveResolution.descHomotopyZeroZero f comm = f.f 0


lemma biprod_ext {X₁ X₂ : C} {α β : Ext (X₁ ⊞ X₂) Y n}
    (h₁ : (mk₀ biprod.inl).comp α (zero_add n) = (mk₀ biprod.inl).comp β (zero_add n))
    (h₂ : (mk₀ biprod.inr).comp α (zero_add n) = (mk₀ biprod.inr).comp β (zero_add n)) :
    α = β

{α β : CategoryTheory.Abelian.Ext (X₁ ⊞ X₂) Y n}

(h₁ :
  (CategoryTheory.Abelian.Ext.mk₀ CategoryTheory.Limits.biprod.inl).comp α ⋯ =
    (CategoryTheory.Abelian.Ext.mk₀ CategoryTheory.Limits.biprod.inl).comp β ⋯)

(h₂ :
  (CategoryTheory.Abelian.Ext.mk₀ CategoryTheory.Limits.biprod.inr).comp α ⋯ =
    (CategoryTheory.Abelian.Ext.mk₀ CategoryTheory.Limits.biprod.inr).comp β ⋯)


theorem card_Ioc_eq_card_Icc_sub_one (a b : α) : (Ioc a b).card = (Icc a b).card - 1

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

(Finset.Ioc a b).card = (Finset.Icc a b).card - 1


/-- `StarRingEquivClass F A B` asserts `F` is a type of bundled ⋆-ring equivalences between `A` and
`B`.
You should also extend this typeclass when you extend `StarRingEquiv`. -/
class StarRingEquivClass (F : Type*) (A B : outParam Type*)
    [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B] [EquivLike F A B]
    extends RingEquivClass F A B : Prop where
  /-- By definition, a ⋆-ring equivalence preserves the `star` operation. -/
  map_star : ∀ (f : F) (a : A), f (star a) = star (f a)

{F : Type u_1}
{A : outParam (Type u_2)}
{B : outParam (Type u_3)}
[Add A]
[Mul A]
[Star A]
[Add B]
[Mul B]
[Star B]
[EquivLike F A B]
[self : StarRingEquivClass F A B]
(f : F)
(a : A)


theorem maximum_eq_coe_iff : maximum l = m ↔ m ∈ l ∧ ∀ a ∈ l, a ≤ m

{α : Type u_1}
[LinearOrder α]
{l : List α}
{m : α}

l.maximum = ↑m ↔ m ∈ l ∧ ∀ (a : α), a ∈ l → a ≤ m


theorem mk_eq {f g : CauSeq ℚ abs} : mk f = mk g ↔ f ≈ g


lemma LSeriesHasSum.LSeries_eq {f : ℕ → ℂ} {s a : ℂ}
    (h : LSeriesHasSum f s a) : LSeries f s = a


@[simp]
theorem withBotCongr_trans (e₁ : α ≃o β) (e₂ : β ≃o γ) :
    e₁.withBotCongr.trans e₂.withBotCongr = (e₁.trans e₂).withBotCongr

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[PartialOrder α]
[PartialOrder β]
[PartialOrder γ]
(e₁ : α ≃o β)
(e₂ : β ≃o γ)


theorem le_sub_of_add_le {a b c : Nat} (h : a + b ≤ c) : a ≤ c - b


theorem a_add_one_le_four_pow_parts_card : a + 1 ≤ 4 ^ P.parts.card

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{P : Finpartition Finset.univ}


@[simp]
theorem AlternatingMap.map_basis_eq_zero_iff {ι : Type*} [Finite ι] (e : Basis ι R M)
    (f : M [⋀^ι]→ₗ[R] R) : f e = 0 ↔ f = 0

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_5}
[Finite ι]
(e : Basis ι R M)
(f : M [⋀^ι]→ₗ[R] R)