theorem quotient_mk_comp_C_injective (I : Ideal (MvPolynomial σ K)) (hI : I ≠ ⊤) :
    Function.Injective ((Ideal.Quotient.mk I).comp MvPolynomial.C)

(σ : Type u)
(K : Type v)
[Field K]
(I : Ideal (MvPolynomial σ K))
(hI : I ≠ ⊤)

Function.Injective ⇑((Ideal.Quotient.mk I).comp MvPolynomial.C)


theorem outerMeasure_opens (U : Opens G) : μ.outerMeasure U = μ.innerContent U

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
[R1Space G]
(U : TopologicalSpace.Opens G)


@[simp]
theorem whiskerLeft_hom {X Y : Mon_ C} (f : X ⟶ Y) (Z : Mon_ C) :
    (f ▷ Z).hom = f.hom ▷ Z.X

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


/-- Two simplices with the same points have the same Monge point. -/
theorem mongePoint_eq_of_range_eq {n : ℕ} {s₁ s₂ : Simplex ℝ P n}
    (h : Set.range s₁.points = Set.range s₂.points) : s₁.mongePoint = s₂.mongePoint


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable])) const_nsmul]
protected theorem pow [Monoid β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (n : ℕ) :
    AEStronglyMeasurable (f ^ n) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (n • f) μ


theorem apply_le_nfpFamily [hι : Nonempty ι] {f : ι → Ordinal → Ordinal} (H : ∀ i, IsNormal (f i))
    {a b} : (∀ i, f i b ≤ nfpFamily.{u, v} f a) ↔ b ≤ nfpFamily.{u, v} f a

{f : ι → Ordinal.{max u v} → Ordinal.{max u v}}

(∀ (i : ι), f i b ≤ Ordinal.nfpFamily f a) ↔ b ≤ Ordinal.nfpFamily f a


@[simp]
theorem succ_coe (a : α) : succ (↑a : WithTop α) = ↑(succ a)

{α : Type u_1}
[Preorder α]
[NoMaxOrder α]
[SuccOrder α]
(a : α)


lemma of_comp_of_mem_range [Zero P] (h1 : g ∘ f = 0)
    (h2 : ∀ x, g x = 0 → x ∈ Set.range f) : Exact f g

(h2 : ∀ (x : N), g x = 0 → x ∈ Set.range f)


@[simp]
theorem max_eq_zero {a b : Ordinal} : max a b = 0 ↔ a = 0 ∧ b = 0


theorem continuous_boolIndicator_iff_isClopen (U : Set X) :
    Continuous U.boolIndicator ↔ IsClopen U

{X : Type u}
[TopologicalSpace X]
(U : Set X)


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

(α : Type u_1)
[SemilatticeInf α]
[OrderTop α]


/-- If the two vectors passed to `oangle` are the same, the result is 0. -/
@[simp]
theorem oangle_self (x : V) : o.oangle x x = 0

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


@[to_additive]
theorem comap_iSup_map_of_injective (S : ι → Submonoid M) : (⨆ i, (S i).map f).comap f = iSup S

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

Submonoid.comap f (⨆ i, Submonoid.map f (S i)) = iSup S


/-- Bijection between `α` and `PLift α` -/
theorem PLift.down_up {α : Sort u} (a : α) : Eq (down (up a)) a


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


theorem isometry_id : @Isometry V V _ _ (id V)

{V : Type u_1}
[SeminormedAddCommGroup V]


theorem strictAnti_iff_map_pos : StrictAnti (f : α → β) ↔ ∀ a < 0, 0 < f a

[CovariantClass β β (fun x x_1 => x + x_1) fun x x_1 => x < x_1]

StrictAnti ⇑f ↔ ∀ (a : α), a < 0 → 0 < f a


theorem natDegree_comp_le : natDegree (p.comp q) ≤ natDegree p * natDegree q

(p.comp q).natDegree ≤ p.natDegree * q.natDegree


theorem monadLift_bind [Monad m] [LawfulMonad m] {α β} (x : m α) (f : α → m β) :
    (monadLift (x >>= f) : ContT r m β) = monadLift x >>= monadLift ∘ f

{r : Type u}
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α β : Type u}
(x : m α)
(f : α → m β)

ContT.monadLift (x >>= f) = ContT.monadLift x >>= ContT.monadLift ∘ f


protected lemma ext_iff (z₁ z₂ : Cocycle F G n) : z₁ = z₂ ↔ (z₁ : Cochain F G n) = z₂

(z₁ z₂ : CochainComplex.HomComplex.Cocycle F G n)

z₁ = z₂ ↔ ↑z₁ = ↑z₂


theorem pairwise_pair : Set.Pairwise {a, b} r ↔ a ≠ b → r a b ∧ r b a

{α : Type u_1}
{r : α → α → Prop}
{a b : α}

{a, b}.Pairwise r ↔ a ≠ b → r a b ∧ r b a


/-- A morphism is separated if the diagonal map is a closed immersion. -/
@[mk_iff]
class IsSeparated : Prop where
  /-- A morphism is separated if the diagonal map is a closed immersion. -/
  diagonal_isClosedImmersion : IsClosedImmersion (pullback.diagonal f) := by infer_instance

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

AlgebraicGeometry.IsSeparated f ↔
  autoParam (AlgebraicGeometry.IsClosedImmersion (CategoryTheory.Limits.pullback.diagonal f)) _auto✝


@[to_additive (attr := simp)]
theorem swap_inv [Inv G] [Inv H] (p : G × H) : p⁻¹.swap = p.swap⁻¹

{G : Type u_3}
{H : Type u_4}
[Inv G]
[Inv H]
(p : G × H)


theorem wellFounded_iff_principalSeg.{u} {β : Type u} {s : β → β → Prop} [IsTrans β s] :
    WellFounded s ↔ ∀ (α : Type u) (r : α → α → Prop) (_ : r ≺i s), WellFounded r

WellFounded s ↔ ∀ (α : Type u) (r : α → α → Prop), r ≺i s → WellFounded r


theorem types_ι_jointly_surjective (D : GlueData (Type v)) (x : D.glued) :
    ∃ (i : _) (y : D.U i), D.ι i y = x

(D : CategoryTheory.GlueData (Type v))
(x : D.glued)


@[simp]
theorem ppred_succ {n : ℕ} : ppred (succ n) = some n


/-- If a normed ring `𝔸` is a normed algebra over two fields, then they define the same
`expSeries` on `𝔸`. -/
theorem expSeries_eq_expSeries (n : ℕ) (x : 𝔸) :
    (expSeries 𝕂 𝔸 n fun _ => x) = expSeries 𝕂' 𝔸 n fun _ => x

(𝕂 : Type u_1)
(𝕂' : Type u_2)
(𝔸 : Type u_3)
[Field 𝕂]
[Field 𝕂']
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[Algebra 𝕂' 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
(n : ℕ)
(x : 𝔸)

((NormedSpace.expSeries 𝕂 𝔸 n) fun x_1 => x) = (NormedSpace.expSeries 𝕂' 𝔸 n) fun x_1 => x


theorem HasBasis.limsInf_eq_iSup_sInf {p : ι → Prop} {s : ι → Set α} {f : Filter α}
    (h : f.HasBasis p s) : limsInf f = ⨆ (i) (_ : p i), sInf (s i)

{α : Type u_1}
{ι : Type u_4}
[CompleteLattice α]
{p : ι → Prop}
{s : ι → Set α}
{f : Filter α}
(h : f.HasBasis p s)

f.limsInf = ⨆ i, ⨆ (_ : p i), sInf (s i)


theorem mono_left {s'} (h' : IsMetricSeparated s' t) (hs : s ⊆ s') : IsMetricSeparated s t

{X : Type u_1}
[EMetricSpace X]
{s t s' : Set X}
(h' : IsMetricSeparated s' t)
(hs : s ⊆ s')


theorem coeFn_injective : @Injective (P →ᵃⁱ[𝕜] P₂) (P → P₂) (↑)

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]


/-- `DFunLike.coe` as a `RingHom`. -/
@[simps!] def coeFnRingHom [Semiring Y] : LocallyConstant X Y →+* X → Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Semiring Y]

∀ (a : LocallyConstant X Y) (a_1 : X), LocallyConstant.coeFnRingHom a a_1 = a a_1


/-- The "forgetful functor" from `α →o β` to `α → β` that takes the underlying function,
is monotone. -/
@[simps (config := .asFn)]
def coeFnHom : (α →o β) →o α → β

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]


@[simp]
theorem frequently_frequently_nhds {p : X → Prop} :
    (∃ᶠ x' in 𝓝 x, ∃ᶠ x'' in 𝓝 x', p x'') ↔ ∃ᶠ x in 𝓝 x, p x

{X : Type u}
{x : X}
[TopologicalSpace X]
{p : X → Prop}

(∃ᶠ (x' : X) in 𝓝 x, ∃ᶠ (x'' : X) in 𝓝 x', p x'') ↔ ∃ᶠ (x : X) in 𝓝 x, p x


@[simp]
theorem map₂Right_cons_cons :
    map₂Right f (a :: as) (b :: bs) = f (some a) b :: map₂Right f as bs

{α : Type u}
{β : Type v}
{γ : Type w}
(f : Option α → β → γ)
(a : α)
(as : List α)
(b : β)
(bs : List β)

List.map₂Right f (a :: as) (b :: bs) = f (some a) b :: List.map₂Right f as bs


theorem eq_false_of_decide {p : Prop} {_ : Decidable p} (h : decide p = false) : p = False

∀ {x : Decidable p}, decide p = false → p = False


theorem splittingOfFinsuppSurjective_splits (f : M →ₗ[R] α →₀ R) (s : Surjective f) :
    f.comp (splittingOfFinsuppSurjective f s) = LinearMap.id

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_4}
(f : M →ₗ[R] α →₀ R)
(s : Function.Surjective ⇑f)

f ∘ₗ f.splittingOfFinsuppSurjective s = LinearMap.id


theorem mem_nhdsSet_iff_forall : s ∈ 𝓝ˢ t ↔ ∀ x : X, x ∈ t → s ∈ 𝓝 x

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}

s ∈ 𝓝ˢ t ↔ ∀ x ∈ t, s ∈ 𝓝 x


theorem surjOn_tan : SurjOn tan (Ioo (-(π / 2)) (π / 2)) univ

Set.SurjOn Real.tan (Set.Ioo (-(Real.pi / 2)) (Real.pi / 2)) Set.univ


theorem mul_right_inj' (ha : a ≠ 0) : a * b = a * c ↔ b = c

{M₀ : Type u_1}
[CancelMonoidWithZero M₀]
{a b c : M₀}
(ha : a ≠ 0)


lemma cons_ne_nil (p : Path a b) (e : b ⟶ a) : p.cons e ≠ Path.nil

{V : Type u}
[Quiver V]
{a b : V}
(p : Quiver.Path a b)
(e : b ⟶ a)


/-- If `x` and `y` are distinct letters and `w₁ w₂` are words such that `xw₁` reduces to `yw₂`, then
`w₁` reduces to `x⁻¹yw₂`. -/
@[to_additive "If `x` and `y` are distinct letters and `w₁ w₂` are words such that `x + w₁` reduces
  to `y + w₂`, then `w₁` reduces to `-x + y + w₂`."]
theorem inv_of_red_of_ne {x1 b1 x2 b2} (H1 : (x1, b1) ≠ (x2, b2))
    (H2 : Red ((x1, b1) :: L₁) ((x2, b2) :: L₂)) : Red L₁ ((x1, not b1) :: (x2, b2) :: L₂)

(H2 : FreeAddGroup.Red ((x1, b1) :: L₁) ((x2, b2) :: L₂))

FreeAddGroup.Red L₁ ((x1, !b1) :: (x2, b2) :: L₂)


theorem Int.measurable_floor [OpensMeasurableSpace R] : Measurable (Int.floor : R → ℤ)

{R : Type u_2}
[LinearOrderedRing R]
[FloorRing R]
[TopologicalSpace R]
[OrderTopology R]
[MeasurableSpace R]
[OpensMeasurableSpace R]


@[simp]
theorem opNNNorm_mul : ‖mul 𝕜 𝕜'‖₊ = 1

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(𝕜' : Type u_3)
[NonUnitalNormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']
[RegularNormedAlgebra 𝕜 𝕜']
[Nontrivial 𝕜']


@[simp, norm_cast] lemma coe_eq_bot [Bot α] {a : α} : (a : WithTop α) = ⊥ ↔ a = ⊥

↑a = ⊥ ↔ a = ⊥


@[to_additive]
theorem _root_.hasCompactMulSupport_comp_left (hg : ∀ {x}, g x = 1 ↔ x = 1) :
    HasCompactMulSupport (g ∘ f) ↔ HasCompactMulSupport f

{α : Type u_2}
{β : Type u_4}
{γ : Type u_5}
[TopologicalSpace α]
[One β]
[One γ]
{g : β → γ}
{f : α → β}
(hg : ∀ {x : β}, g x = 1 ↔ x = 1)


@[simp]
theorem kstar_eq_one : a∗ = 1 ↔ a ≤ 1

{α : Type u_1}
[KleeneAlgebra α]
{a : α}


@[to_additive]
lemma pow_two_semiclosed
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a : α} (ha : 1 ≤ a ^ 2) : 1 ≤ a

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

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


@[simp]
theorem pre_map {A₁ A₂ A₃ : C} [Exponentiable A₁] [Exponentiable A₂] [Exponentiable A₃]
    (f : A₁ ⟶ A₂) (g : A₂ ⟶ A₃) : pre (f ≫ g) = pre g ≫ pre f

CategoryTheory.pre (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.pre g) (CategoryTheory.pre f)


/-- We say that a filter `l` has an antitone basis `s : ι → Set α`, if `t ∈ l` if and only if `t`
includes `s i` for some `i`, and `s` is decreasing. -/
structure HasAntitoneBasis (l : Filter α) (s : ι'' → Set α)
    extends HasBasis l (fun _ => True) s : Prop where
  /-- The sequence of sets is antitone. -/
  protected antitone : Antitone s

{α : Type u_1}
{ι'' : Type u_6}
[Preorder ι'']
{l : Filter α}
{s : ι'' → Set α}
(self : l.HasAntitoneBasis s)


lemma bijOn_of_subsingleton' [Subsingleton α] [Subsingleton β] (f : α → β)
    (h : s.Nonempty ↔ t.Nonempty) : BijOn f s t

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


theorem aemeasurable_limRatio : AEMeasurable (v.limRatio ρ) μ

(hρ : ρ ≪ μ)


@[deprecated getElem?_set_ne (since := "2024-06-12")]
theorem get?_set_ne (a : α) {m n} (l : List α) (h : m ≠ n) : (set l m a).get? n = l.get? n

{α : Type u_1}
(a : α)
{m n : Nat}
(l : List α)
(h : m ≠ n)


theorem finrank_real_complex_fact' : Fact (finrank ℝ ℂ = 1 + 1)

Fact (FiniteDimensional.finrank ℝ ℂ = 1 + 1)


theorem HasOrthogonalCols.transpose_hasOrthogonalRows [Fintype m] (h : A.HasOrthogonalCols) :
    Aᵀ.HasOrthogonalRows

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


theorem iInf_singleton {f : β → α} {b : β} : ⨅ x ∈ (singleton b : Set β), f x = f b

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


theorem degree_mul_leadingCoeff_self_inv (p : K[X]) :
    degree (p * C (leadingCoeff p)⁻¹) = degree p

{K : Type u_1}
[DivisionRing K]
(p : K[X])

(p * Polynomial.C p.leadingCoeff⁻¹).degree = p.degree


/-- Evaluation of a `σ₁₂`-linear map at a fixed `a`, as an `AddMonoidHom`. -/
@[simps]
def evalAddMonoidHom (a : M) : (M →ₛₗ[σ₁₂] M₂) →+ M₂

{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R₁ M]
[Module R₂ M₂]
{σ₁₂ : R₁ →+* R₂}
(a : M)
(f : M →ₛₗ[σ₁₂] M₂)


@[simp]
theorem mem_subring_iff {x : ℚ_[p]} : x ∈ subring p ↔ ‖x‖ ≤ 1

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


@[simp] lemma add_def : Nat.add m n = m + n


@[simp]
protected theorem lift_mk {β : Sort*} {f : V → β}
    {h : ∀ (v w : V) (p : G.Walk v w), p.IsPath → f v = f w} {v : V} :
    ConnectedComponent.lift f h (G.connectedComponentMk v) = f v

SimpleGraph.ConnectedComponent.lift f h (G.connectedComponentMk v) = f v


@[simp]
theorem Sheaf.Hom.add_app (f g : P ⟶ Q) (U) : (f + g).1.app U = f.1.app U + g.1.app U

{J : CategoryTheory.GrothendieckTopology C}

(f + g).val.app U = f.val.app U + g.val.app U


theorem effectiveEpiFamily_tfae
    {α : Type} [Finite α] {B : Stonean.{u}}
    (X : α → Stonean.{u}) (π : (a : α) → (X a ⟶ B)) :
    TFAE
    [ EffectiveEpiFamily X π
    , Epi (Sigma.desc π)
    , ∀ b : B, ∃ (a : α) (x : X a), π a x = b
    ]

{α : Type}
[Finite α]
{B : Stonean}
(X : α → Stonean)
(π : (a : α) → X a ⟶ B)

[CategoryTheory.EffectiveEpiFamily X π, CategoryTheory.Epi (CategoryTheory.Limits.Sigma.desc π),
    ∀ (b : ↑B.toTop), ∃ a x, (π a) x = b].TFAE


@[simp]
theorem liftMonoid_coe (f : α →* R) : ⇑(liftMonoid f) = lift f

{α : Type u}
{R : Type u_1}
[Monoid α]
[Ring R]
(f : α →* R)

⇑(FreeAbelianGroup.liftMonoid f) = ⇑(FreeAbelianGroup.lift ⇑f)


/-- A non-quantitative version of Markov inequality for integrable functions: the measure of points
where `‖f x‖ > ε` is finite for all positive `ε`. -/
lemma Integrable.measure_norm_gt_lt_top {f : α → β} (hf : Integrable f μ) {ε : ℝ} (hε : 0 < ε) :
    μ {x | ε < ‖f x‖} < ∞

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


theorem ofSet_trans' {s : Set X} (hs : IsOpen s) :
    (ofSet s hs).trans e = e.restr (e.source ∩ s)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{s : Set X}
(hs : IsOpen s)

(PartialHomeomorph.ofSet s hs).trans e = e.restr (e.source ∩ s)


/-- If `K` is compact and `V` has nonempty interior, then the index `(K : V)` is well-defined,
  there is a finite set `t` satisfying the desired properties. -/
@[to_additive addIndex_defined
"If `K` is compact and `V` has nonempty interior, then the index `(K : V)` is well-defined, there is
a finite set `t` satisfying the desired properties."]
theorem index_defined {K V : Set G} (hK : IsCompact K) (hV : (interior V).Nonempty) :
    ∃ n : ℕ, n ∈ Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V }

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
{K V : Set G}
(hK : IsCompact K)
(hV : (interior V).Nonempty)

∃ n, n ∈ Finset.card '' {t | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V}


@[simp]
theorem val_eq_coe (I : FractionalIdeal S P) : I.val = I

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


@[to_additive]
theorem prod_sdiff_div_prod_sdiff :
    (∏ x ∈ s₂ \ s₁, f x) / ∏ x ∈ s₁ \ s₂, f x = (∏ x ∈ s₂, f x) / ∏ x ∈ s₁, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommGroup β]
[DecidableEq α]

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


theorem StarConvex.affinity (hs : StarConvex 𝕜 x s) (z : E) (c : 𝕜) :
    StarConvex 𝕜 (z + c • x) ((fun x => z + c • x) '' s)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedCommSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{x : E}
{s : Set E}
(hs : StarConvex 𝕜 x s)
(z : E)
(c : 𝕜)


@[to_additive]
theorem edist_op (x y : α) : edist (op x) (op y) = edist x y

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

edist (AddOpposite.op x) (AddOpposite.op y) = edist x y


/-- The embedding from `up ℕ` to `up ℤ` which sends `n : ℕ` to `p + n`. -/
@[simps!]
def embeddingUpIntGE : Embedding (up ℕ) (up ℤ)

(ComplexShape.embeddingUpIntGE p).f n = p + ↑n


/-- A countable intersection of Gδ sets is a Gδ set. -/
theorem IsGδ.sInter {S : Set (Set X)} (h : ∀ s ∈ S, IsGδ s) (hS : S.Countable) : IsGδ (⋂₀ S)

{X : Type u_1}
[TopologicalSpace X]
{S : Set (Set X)}
(h : ∀ s ∈ S, IsGδ s)
(hS : S.Countable)


lemma yonedaEquivFst_eq (p : YonedaCollection F X) : p.yonedaEquivFst = yonedaEquiv p.fst

{A : CategoryTheory.Functor Cᵒᵖ (Type v)}

{F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

(p : CategoryTheory.OverPresheafAux.YonedaCollection F X)

p.yonedaEquivFst = CategoryTheory.yonedaEquiv p.fst


@[to_additive (attr := simp)]
theorem zpow_add_period_smul (i : ℤ) (g : G) (a : α) :
    g ^ (i + period g a) • a = g ^ i • a

{α : Type v}
{G : Type u}
[Group G]
[MulAction G α]
(i : ℤ)
(g : G)
(a : α)

g ^ (i + ↑(MulAction.period g a)) • a = g ^ i • a


protected lemma sub_lt_sub_iff_right (h : c ≤ a) : a - c < b - c ↔ a < b


@[to_additive]
theorem prod_eq_mul {s : Finset α} {f : α → β} (a b : α) (hn : a ≠ b)
    (h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1) (ha : a ∉ s → f a = 1) (hb : b ∉ s → f b = 1) :
    ∏ x ∈ s, f x = f a * f b

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{s : Finset α}
{f : α → β}
(a b : α)
(hn : a ≠ b)
(h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 0)
(ha : a ∉ s → f a = 0)
(hb : b ∉ s → f b = 0)


@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
    (@DFunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
      ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e

{X Y : Type u_1}
[Mul X]
[Mul Y]
(e : X ≃* Y)


theorem star_dotProduct_star : star v ⬝ᵥ star w = star (w ⬝ᵥ v)

{m : Type u_2}
{α : Type v}
[Fintype m]
[NonUnitalSemiring α]
[StarRing α]
(v w : m → α)


@[simp, norm_cast]
lemma coe_disjiUnion {h} : (s.disjiUnion t h : Set β) = ⋃ x ∈ (s : Set α), t x

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
{h : (↑s).PairwiseDisjoint t}


@[reassoc (attr := simp)]
theorem coprod.map_map {A₁ A₂ A₃ B₁ B₂ B₃ : C} [HasBinaryCoproduct A₁ B₁] [HasBinaryCoproduct A₂ B₂]
    [HasBinaryCoproduct A₃ B₃] (f : A₁ ⟶ A₂) (g : B₁ ⟶ B₂) (h : A₂ ⟶ A₃) (k : B₂ ⟶ B₃) :
    coprod.map f g ≫ coprod.map h k = coprod.map (f ≫ h) (g ≫ k)

CategoryTheory.Limits.coprod.map f g ≫ CategoryTheory.Limits.coprod.map h k =
  CategoryTheory.Limits.coprod.map (f ≫ h) (g ≫ k)


theorem lintegral_laverage (μ : Measure α) [IsFiniteMeasure μ] (f : α → ℝ≥0∞) :
    ∫⁻ _x, ⨍⁻ a, f a ∂μ ∂μ = ∫⁻ x, f x ∂μ

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

∫⁻ (_x : α), ⨍⁻ (a : α), f a ∂μ ∂μ = ∫⁻ (x : α), f x ∂μ


/-- A column partitioned matrix mulitplied by a row partitioned matrix gives the sum of the "outer"
products of the block matrices -/
lemma fromColumns_mul_fromRows (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R)
    (B₁ : Matrix n₁ n R) (B₂ : Matrix n₂ n R) :
    fromColumns A₁ A₂ * fromRows B₁ B₂ = (A₁ * B₁ + A₂ * B₂)

{R : Type u_1}
{m : Type u_2}
{n : Type u_5}
{n₁ : Type u_6}
{n₂ : Type u_7}
[Fintype n₁]
[Fintype n₂]
[Semiring R]
(A₁ : Matrix m n₁ R)
(A₂ : Matrix m n₂ R)
(B₁ : Matrix n₁ n R)
(B₂ : Matrix n₂ n R)

A₁.fromColumns A₂ * B₁.fromRows B₂ = A₁ * B₁ + A₂ * B₂


theorem Poly.of_denote_le_cancel {ctx : Context} {m₁ m₂ : Poly} (h : denote_le ctx (cancel m₁ m₂)) : denote_le ctx (m₁, m₂)

(h : Nat.Linear.Poly.denote_le ctx (m₁.cancel m₂))


theorem cons_eq_cons {a b : α} {l l' : List α} : a :: l = b :: l' ↔ a = b ∧ l = l'

{α : Type u_1}
{a b : α}
{l l' : List α}


theorem kroneckerMap_reindex_left (f : α → β → γ) (el : l ≃ l') (em : m ≃ m') (M : Matrix l m α)
    (N : Matrix n n' β) :
    kroneckerMap f (Matrix.reindex el em M) N =
      reindex (el.prodCongr (Equiv.refl _)) (em.prodCongr (Equiv.refl _)) (kroneckerMap f M N)

{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{l' : Type u_14}
{m' : Type u_15}
{n' : Type u_16}
(f : α → β → γ)
(el : l ≃ l')
(em : m ≃ m')
(M : Matrix l m α)
(N : Matrix n n' β)

Matrix.kroneckerMap f ((Matrix.reindex el em) M) N =
  (Matrix.reindex (el.prodCongr (Equiv.refl n)) (em.prodCongr (Equiv.refl n'))) (Matrix.kroneckerMap f M N)


theorem HasFiniteFPowerSeriesAt.toHasFPowerSeriesAt
    (hf : HasFiniteFPowerSeriesAt f p x n) : HasFPowerSeriesAt f p x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{n : ℕ}
(hf : HasFiniteFPowerSeriesAt f p x n)


theorem rev_zero_eq_top (n : ℕ) [NeZero n] : rev (0 : Fin n) = ⊤


theorem disjoint_ordT5Nhd : Disjoint (ordT5Nhd s t) (ordT5Nhd t s)

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


@[local simp] theorem neg_ofNat_zero : -((0 : Nat) : Int) = 0


@[simp]
theorem diff_inter_self_eq_diff {s t : Set α} : s \ (t ∩ s) = s \ t


@[simp]
theorem ModularForm.toSlashInvariantForm_coe (f : ModularForm Γ k) : ⇑f.1 = f

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f : ModularForm Γ k)


theorem uniformEmbedding_coe : UniformEmbedding ((↑) : ℕ+ → ℕ)


@[simp]
theorem sub_apply (f g : Poly α) (x : α → ℕ) : (f - g) x = f x - g x

{α : Type u_1}
(f g : Poly α)
(x : α → ℕ)


/-- `LocallyConstant.map` as an `AlgHom` -/
@[simps!]
def mapₐ (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y] [Semiring Z] [Algebra R Z]
    (f : Y →ₐ[R] Z) : LocallyConstant X Y →ₐ[R] LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{Z : Type u_6}
(R : Type u_7)
[CommSemiring R]
[Semiring Y]
[Algebra R Y]
[Semiring Z]
[Algebra R Z]
(f : Y →ₐ[R] Z)
(g : LocallyConstant X Y)

∀ (a : X), ((LocallyConstant.mapₐ R f) g) a = f (g a)


@[simp, norm_cast]
theorem cast_add [AddMonoidWithOne R] (m n : ℕ) : ((m + n : ℕ) : R) = m + n

{R : Type u_1}
[AddMonoidWithOne R]
(m n : ℕ)


theorem support_finSuccEquiv_nonempty {f : MvPolynomial (Fin (n + 1)) R} (h : f ≠ 0) :
    (finSuccEquiv R n f).support.Nonempty

{R : Type u}
[CommSemiring R]
{n : ℕ}
{f : MvPolynomial (Fin (n + 1)) R}
(h : f ≠ 0)

((MvPolynomial.finSuccEquiv R n) f).support.Nonempty


@[simp]
theorem isTheta_const_const_iff [NeBot l] {c₁ : E''} {c₂ : F''} :
    ((fun _ : α ↦ c₁) =Θ[l] fun _ ↦ c₂) ↔ (c₁ = 0 ↔ c₂ = 0)

{α : Type u_1}
{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{l : Filter α}
[l.NeBot]
{c₁ : E''}
{c₂ : F''}

((fun x => c₁) =Θ[l] fun x => c₂) ↔ (c₁ = 0 ↔ c₂ = 0)


@[elab_as_elim]
protected theorem induction_on {α : Sort*} {r : α → α → Prop} {β : Quot r → Prop} (q : Quot r)
    (h : ∀ a, β (Quot.mk r a)) : β q

{α : Sort u_4}
{r : α → α → Prop}
{β : Quot r → Prop}
(q : Quot r)
(h : ∀ (a : α), β (Quot.mk r a))


lemma quasispectrumRestricts_iff
    {R S A : Type*} [CommSemiring R] [CommSemiring S] [NonUnitalRing A]
    [Module R A] [Module S A] [Algebra R S] (a : A) (f : S → R) :
    QuasispectrumRestricts a f ↔ (quasispectrum S a).RightInvOn f (algebraMap R S) ∧
      Function.LeftInverse f (algebraMap R S)

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

QuasispectrumRestricts a f ↔
  Set.RightInvOn f (⇑(algebraMap R S)) (quasispectrum S a) ∧ Function.LeftInverse f ⇑(algebraMap R S)


theorem isSeparator_iff_faithful_preadditiveCoyonedaObj (G : C) :
    IsSeparator G ↔ (preadditiveCoyonedaObj (op G)).Faithful

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

CategoryTheory.IsSeparator G ↔ (CategoryTheory.preadditiveCoyonedaObj (Opposite.op G)).Faithful


theorem mul_fin_three [AddCommMonoid α] [Mul α]
    (a₁₁ a₁₂ a₁₃ a₂₁ a₂₂ a₂₃ a₃₁ a₃₂ a₃₃ b₁₁ b₁₂ b₁₃ b₂₁ b₂₂ b₂₃ b₃₁ b₃₂ b₃₃ : α) :
    !![a₁₁, a₁₂, a₁₃;
       a₂₁, a₂₂, a₂₃;
       a₃₁, a₃₂, a₃₃] * !![b₁₁, b₁₂, b₁₃;
                           b₂₁, b₂₂, b₂₃;
                           b₃₁, b₃₂, b₃₃] =
    !![a₁₁*b₁₁ + a₁₂*b₂₁ + a₁₃*b₃₁, a₁₁*b₁₂ + a₁₂*b₂₂ + a₁₃*b₃₂, a₁₁*b₁₃ + a₁₂*b₂₃ + a₁₃*b₃₃;
       a₂₁*b₁₁ + a₂₂*b₂₁ + a₂₃*b₃₁, a₂₁*b₁₂ + a₂₂*b₂₂ + a₂₃*b₃₂, a₂₁*b₁₃ + a₂₂*b₂₃ + a₂₃*b₃₃;
       a₃₁*b₁₁ + a₃₂*b₂₁ + a₃₃*b₃₁, a₃₁*b₁₂ + a₃₂*b₂₂ + a₃₃*b₃₂, a₃₁*b₁₃ + a₃₂*b₂₃ + a₃₃*b₃₃]

!![a₁₁, a₁₂, a₁₃; a₂₁, a₂₂, a₂₃; a₃₁, a₃₂, a₃₃] * !![b₁₁, b₁₂, b₁₃; b₂₁, b₂₂, b₂₃; b₃₁, b₃₂, b₃₃] =
  !![a₁₁ * b₁₁ + a₁₂ * b₂₁ + a₁₃ * b₃₁, a₁₁ * b₁₂ + a₁₂ * b₂₂ + a₁₃ * b₃₂, a₁₁ * b₁₃ + a₁₂ * b₂₃ + a₁₃ * b₃₃;
    a₂₁ * b₁₁ + a₂₂ * b₂₁ + a₂₃ * b₃₁, a₂₁ * b₁₂ + a₂₂ * b₂₂ + a₂₃ * b₃₂, a₂₁ * b₁₃ + a₂₂ * b₂₃ + a₂₃ * b₃₃;
    a₃₁ * b₁₁ + a₃₂ * b₂₁ + a₃₃ * b₃₁, a₃₁ * b₁₂ + a₃₂ * b₂₂ + a₃₃ * b₃₂, a₃₁ * b₁₃ + a₃₂ * b₂₃ + a₃₃ * b₃₃]


@[simp]
theorem eval_basis_self (hvs : Set.InjOn v s) (hi : i ∈ s) :
    (Lagrange.basis s v i).eval (v i) = 1

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
{i : ι}
(hvs : Set.InjOn v ↑s)
(hi : i ∈ s)

Polynomial.eval (v i) (Lagrange.basis s v i) = 1


theorem sub_abv_le_abv_sub (a b : R) : abv a - abv b ≤ abv (a - b)

{S : Type u_5}
[OrderedRing S]
{R : Type u_6}
[Ring R]
(abv : R → S)
[IsAbsoluteValue abv]
(a b : R)


theorem newtonMap_apply_of_not_isUnit (h : ¬ (IsUnit <| aeval x (derivative P))) :
    P.newtonMap x = x

(h : ¬IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)))


/-- A closed subset of a Lindelöf set is a Lindelöf set. -/
theorem IsLindelof.of_isClosed_subset (hs : IsLindelof s) (ht : IsClosed t) (h : t ⊆ s) :
    IsLindelof t

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsLindelof s)
(ht : IsClosed t)
(h : t ⊆ s)


theorem neg : mapFun f (-x) = -mapFun f x

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(x : 𝕎 R)

WittVector.mapFun (⇑f) (-x) = -WittVector.mapFun (⇑f) x


/-- Unitary conjugation preserves the spectrum, star on left. -/
@[simp]
lemma spectrum.unitary_conjugate {a : A} {u : unitary A} :
    spectrum R (u * a * (star u : A)) = spectrum R a

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Ring A]
[Algebra R A]
[StarMul A]
{a : A}
{u : ↥(unitary A)}

spectrum R (↑u * a * star ↑u) = spectrum R a


@[to_additive]
theorem prod_unique {α β : Type*} [CommMonoid β] [Unique α] [Fintype α] (f : α → β) :
    ∏ x : α, f x = f default

{α : Type u_9}
{β : Type u_10}
[CommMonoid β]
[Unique α]
[Fintype α]
(f : α → β)


theorem mem_range_scalar_iff_commute_stdBasisMatrix {M : Matrix n n α} :
    M ∈ Set.range (Matrix.scalar n) ↔ ∀ (i j : n), i ≠ j → Commute (stdBasisMatrix i j 1) M

{n : Type u_3}
{α : Type u_5}
[DecidableEq n]
[Semiring α]
[Fintype n]
{M : Matrix n n α}

M ∈ Set.range ⇑(Matrix.scalar n) ↔ ∀ (i j : n), i ≠ j → Commute (Matrix.stdBasisMatrix i j 1) M


theorem unpair_lt {n : ℕ} (n1 : 1 ≤ n) : (unpair n).1 < n


@[ext]
theorem MonoidWithZeroHom.ext_nat {f g : ℕ →*₀ A} : (∀ {n : ℕ}, 0 < n → f n = g n) → f = g

{A : Type u_3}
[MulZeroOneClass A]
{f g : ℕ →*₀ A}


theorem one_lt_rpow_of_pos_of_lt_one_of_neg {x : ℝ≥0∞} {z : ℝ} (hx1 : 0 < x) (hx2 : x < 1)
    (hz : z < 0) : 1 < x ^ z


/-- For any multiplicative function `f` with `f 1 = 1` and `f 0 = 1`,
we can evaluate `f n` by evaluating `f` at `p ^ k` over the factorization of `n` -/
theorem multiplicative_factorization' {β : Type*} [CommMonoid β] (f : ℕ → β)
    (h_mult : ∀ x y : ℕ, Coprime x y → f (x * y) = f x * f y) (hf0 : f 0 = 1) (hf1 : f 1 = 1) :
    f n = n.factorization.prod fun p k => f (p ^ k)

(h_mult : ∀ (x y : ℕ), x.Coprime y → f (x * y) = f x * f y)


/-- If `a ≤ b + c` and `a = ∞` whenever `b = ∞` or `c = ∞`, then
`ENNReal.toReal a ≤ ENNReal.toReal b + ENNReal.toReal c`. This lemma is useful to transfer
triangle-like inequalities from `ENNReal`s to `Real`s. -/
theorem toReal_le_add' (hle : a ≤ b + c) (hb : b = ∞ → a = ∞) (hc : c = ∞ → a = ∞) :
    a.toReal ≤ b.toReal + c.toReal

{a b c : ℝ≥0∞}
(hle : a ≤ b + c)
(hb : b = ⊤ → a = ⊤)
(hc : c = ⊤ → a = ⊤)


@[simp]
theorem sup_mul_nat (o : Ordinal) : (sup fun n : ℕ => o * n) = o * ω


@[simp]
theorem zipWith3_same_right (f : α → β → β → γ) :
    ∀ (la : List α) (lb : List β), zipWith3 f la lb lb = zipWith (fun a b => f a b b) la lb

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → β → β → γ)
(la : List α)
(lb : List β)

List.zipWith3 f la lb lb = List.zipWith (fun a b => f a b b) la lb


protected theorem disjoint : Disjoint (IF.I : Set P) IF.F

{P : Type u_1}
[Preorder P]
(IF : Order.Ideal.PrimePair P)


@[simp]
theorem eval_one (F : Homotopy p₀ p₁) : F.eval 1 = p₁

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ : Path x₀ x₁}
(F : p₀.Homotopy p₁)


@[simp]
theorem ratio_pow (f : α →ᵈ α) (n : ℕ) : ratio (f ^ n) = ratio f ^ n

{α : Type u_1}
[PseudoEMetricSpace α]
(f : α →ᵈ α)
(n : ℕ)

Dilation.ratio (f ^ n) = Dilation.ratio f ^ n


theorem filter_inter_filter_neg_eq (s t : Finset α) :
    (s.filter p ∩ t.filter fun a => ¬p a) = ∅

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

Finset.filter p s ∩ Finset.filter (fun a => ¬p a) t = ∅


/-- Given a set `t` and a set `s` inside it, we can shrink `t` to any appropriate size, and keep `s`
    inside it. -/
@[deprecated exists_subsuperset_card_eq (since := "2024-06-24")]
theorem exists_intermediate_Set (i : ℕ) (h₁ : i + s.ncard ≤ t.ncard) (h₂ : s ⊆ t) :
    ∃ r : Set α, s ⊆ r ∧ r ⊆ t ∧ r.ncard = i + s.ncard

{α : Type u_1}
{s t : Set α}
(i : ℕ)
(h₁ : i + s.ncard ≤ t.ncard)
(h₂ : s ⊆ t)

∃ r, s ⊆ r ∧ r ⊆ t ∧ r.ncard = i + s.ncard


/-- The canonical isomorphism `(F ⋙ G).mapTriangle ≅ F.mapTriangle ⋙ G.mapTriangle`. -/
@[simps!]
def mapTriangleCompIso : (F ⋙ G).mapTriangle ≅ F.mapTriangle ⋙ G.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

((F.mapTriangleCompIso G).hom.app X).hom₁ = CategoryTheory.CategoryStruct.id (G.obj (F.obj X.obj₁))


theorem zipWith_eq_zipWith_take_min : ∀ (l₁ : List α) (l₂ : List β),
    zipWith f l₁ l₂ = zipWith f (l₁.take (min l₁.length l₂.length)) (l₂.take (min l₁.length l₂.length))

∀ {α_1 : Type u_3} {f : α → β → α_1} (l₁ : List α) (l₂ : List β),
  List.zipWith f l₁ l₂ =
    List.zipWith f (List.take (min l₁.length l₂.length) l₁) (List.take (min l₁.length l₂.length) l₂)


theorem Finite.exists_minimal_wrt [PartialOrder β] (f : α → β) (s : Set α) (h : s.Finite)
    (hs : s.Nonempty) : ∃ a ∈ s, ∀ a' ∈ s, f a' ≤ f a → f a = f a'

{α : Type u}
{β : Type v}
[PartialOrder β]
(f : α → β)
(s : Set α)
(h : s.Finite)
(hs : s.Nonempty)


@[simp] lemma mk_zero : mk (0 : NumDenSameDeg 𝒜 x) = 0

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)


theorem Applicative.map_seq_map (f : α → β → γ) (g : σ → β) (x : F α) (y : F σ) :
    f <$> x <*> g <$> y = ((· ∘ g) ∘ f) <$> x <*> y

{F : Type u → Type v}
[Applicative F]
[LawfulApplicative F]
{α β γ σ : Type u}
(f : α → β → γ)
(g : σ → β)
(x : F α)
(y : F σ)

(Seq.seq (f <$> x) fun x => g <$> y) = Seq.seq (((fun x => x ∘ g) ∘ f) <$> x) fun x => y


protected lemma Filter.HasBasis.uniformInducing_iff {ι ι'} {p : ι → Prop} {p' : ι' → Prop} {s s'}
    (h : (𝓤 α).HasBasis p s) (h' : (𝓤 β).HasBasis p' s') {f : α → β} :
    UniformInducing f ↔
      (∀ i, p' i → ∃ j, p j ∧ ∀ x y, (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
        (∀ j, p j → ∃ i, p' i ∧ ∀ x y, (f x, f y) ∈ s' i → (x, y) ∈ s j)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{ι : Sort u_1}
{ι' : Sort u_2}
{p : ι → Prop}
{p' : ι' → Prop}
{s : ι → Set (α × α)}
{s' : ι' → Set (β × β)}
(h : (𝓤 α).HasBasis p s)
(h' : (𝓤 β).HasBasis p' s')
{f : α → β}

UniformInducing f ↔
  (∀ (i : ι'), p' i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
    ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j


theorem equiv_of_both_ways {X Y : C} (f : X ⟶ Y) (g : Y ⟶ X) : X ≈ Y

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


theorem isometryEquiv_map_mkMetric (m : ℝ≥0∞ → ℝ≥0∞) (f : X ≃ᵢ Y) :
    map f (mkMetric m) = mkMetric m

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
(m : ℝ≥0∞ → ℝ≥0∞)
(f : X ≃ᵢ Y)

(MeasureTheory.OuterMeasure.map ⇑f) (MeasureTheory.OuterMeasure.mkMetric m) = MeasureTheory.OuterMeasure.mkMetric m


@[simp]
theorem filterMap_some (s : Multiset α) : filterMap some s = s


theorem card_fixingSubgroup_eq_finrank [DecidablePred (· ∈ IntermediateField.fixingSubgroup K)]
    [FiniteDimensional F E] [IsGalois F E] :
    Fintype.card (IntermediateField.fixingSubgroup K) = finrank K E

[DecidablePred fun x => x ∈ K.fixingSubgroup]

Fintype.card ↥K.fixingSubgroup = FiniteDimensional.finrank (↥K) E


@[to_additive]
theorem mem_smul_finset {x : β} : x ∈ a • s ↔ ∃ y, y ∈ s ∧ a • y = x

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset β}
{a : α}
{x : β}


/-- `J` commutes with any positively-oriented isometric automorphism. -/
theorem linearIsometryEquiv_comp_rightAngleRotation' (φ : E ≃ₗᵢ[ℝ] E)
    (hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) :
    LinearIsometryEquiv.trans J φ = φ.trans J

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

(hφ : 0 < LinearMap.det ↑φ.toLinearEquiv)

o.rightAngleRotation.trans φ = φ.trans o.rightAngleRotation


theorem hasDerivAt_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
    HasDerivAt arccos (-(1 / √(1 - x ^ 2))) x

HasDerivAt Real.arccos (-(1 / √(1 - x ^ 2))) x


@[simp]
theorem mapIso_inv_app (f g : X ⟶ Y) (h : f = g) (U : Opens Y) :
    (mapIso f g h).inv.app U = eqToHom (by rw [h])

{X Y : TopCat}
(f g : X ⟶ Y)
(h : f = g)
(U : TopologicalSpace.Opens ↑Y)

(TopologicalSpace.Opens.mapIso f g h).inv.app U = CategoryTheory.eqToHom ⋯


lemma Odd.pow_pos_iff (hn : Odd n) : 0 < a ^ n ↔ 0 < a

{R : Type u_3}
[LinearOrderedSemiring R]
{a : R}
{n : ℕ}
[ExistsAddOfLE R]
(hn : Odd n)


@[to_additive (attr := simp)]
theorem lift_comp_of' (f : AssocQuotient α →ₙ* β) : lift (f.comp of) = f

(f : AddHom (AddMagma.FreeAddSemigroup α) β)

AddMagma.FreeAddSemigroup.lift (f.comp AddMagma.FreeAddSemigroup.of) = f


theorem combo_sat' (s t : Constraint)
    (a : Int) (x : Coeffs) (b : Int) (y : Coeffs) (v : Coeffs)
    (wx : s.sat' x v) (wy : t.sat' y v) :
    (Constraint.combo a s b t).sat' (Coeffs.combo a x b y) v

(s t : Lean.Omega.Constraint)
(a : Int)
(x : Lean.Omega.Coeffs)
(b : Int)
(y v : Lean.Omega.Coeffs)
(wx : s.sat' x v = true)
(wy : t.sat' y v = true)

(Lean.Omega.Constraint.combo a s b t).sat' (Lean.Omega.Coeffs.combo a x b y) v = true


@[simp]
theorem simple_mul_simple_cancel_left {w : W} (i : B) : s i * (s i * w) = w

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


theorem totalDegree_finset_sum {ι : Type*} (s : Finset ι) (f : ι → MvPolynomial σ R) :
    (s.sum f).totalDegree ≤ Finset.sup s fun i => (f i).totalDegree

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{ι : Type u_3}
(s : Finset ι)
(f : ι → MvPolynomial σ R)

(s.sum f).totalDegree ≤ s.sup fun i => (f i).totalDegree


theorem Sized.node3L {l x m y r} (hl : @Sized α l) (hm : Sized m) (hr : Sized r) :
    Sized (node3L l x m y r)

{α : Type u_1}
{l : Ordnode α}
{x : α}
{m : Ordnode α}
{y : α}
{r : Ordnode α}
(hl : l.Sized)
(hm : m.Sized)
(hr : r.Sized)


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

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

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.RightHomologyData.ofIsColimitCokernelCofork S hg c hc).p = CategoryTheory.Limits.Cofork.π c


@[simp] theorem zero_re : (0 : ℍ[R,c₁,c₂]).re = 0


lemma comap_basicOpen (f : R →+* S) (x : R) :
    TopologicalSpace.Opens.comap (comap f) (basicOpen x) = basicOpen (f x)

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(x : R)

(TopologicalSpace.Opens.comap (PrimeSpectrum.comap f)) (PrimeSpectrum.basicOpen x) = PrimeSpectrum.basicOpen (f x)


theorem of_smul_eq_smul (g : G) (w : NormalWord d) :
    (of g : HNNExtension G A B φ) • w = g • w

{d : HNNExtension.NormalWord.TransversalPair G A B}


theorem nhdsWithin_hasBasis {p : β → Prop} {s : β → Set α} {a : α} (h : (𝓝 a).HasBasis p s)
    (t : Set α) : (𝓝[t] a).HasBasis p fun i => s i ∩ t

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{p : β → Prop}
{s : β → Set α}
{a : α}
(h : (𝓝 a).HasBasis p s)
(t : Set α)


/-- Group homomorphisms preserve division. -/
@[to_additive "Additive group homomorphisms preserve subtraction."]
protected theorem map_div [Group α] [DivisionMonoid β] (f : α →* β) (g h : α) :
    f (g / h) = f g / f h

{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
(f : α →* β)
(g h : α)


@[simp] lemma comapOn_ground_eq : (N.comapOn E f).E = E

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{N : Matroid β}
{E : Set α}


@[reassoc] theorem comul_assoc_flip :
    M.comul ≫ (M.comul ▷ M.X) = M.comul ≫ (M.X ◁ M.comul) ≫ (α_ M.X M.X M.X).inv

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M : Comon_ C}

M.comul ≫ M.comul ▷ M.X = M.comul ≫ M.X ◁ M.comul ≫ (α_ M.X M.X M.X).inv


@[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_list_prod (l : List s) : (l.prod : M) = (l.map (↑)).prod

{M : Type u_1}
[AddMonoid M]
(s : AddSubmonoid M)
(l : List ↥s)


theorem tendsto_pi {β : Type*} {m : β → ∀ i, α i} {l : Filter β} :
    Tendsto m l (pi f) ↔ ∀ i, Tendsto (fun x => m x i) l (f i)

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}
{β : Type u_3}
{m : β → (i : ι) → α i}
{l : Filter β}

Filter.Tendsto m l (Filter.pi f) ↔ ∀ (i : ι), Filter.Tendsto (fun x => m x i) l (f i)


@[to_additive (attr := simp)]
lemma mk_one [One M] : mk (1 : M) = 1


theorem mem_sumCongrHom_range_of_perm_mapsTo_inl {m n : Type*} [Finite m] [Finite n]
    {σ : Perm (m ⊕ n)} (h : Set.MapsTo σ (Set.range Sum.inl) (Set.range Sum.inl)) :
    σ ∈ (sumCongrHom m n).range

(h : Set.MapsTo (⇑σ) (Set.range Sum.inl) (Set.range Sum.inl))


theorem adjoin_algebraic_toSubalgebra {S : Set E} (hS : ∀ x ∈ S, IsAlgebraic F x) :
    (IntermediateField.adjoin F S).toSubalgebra = Algebra.adjoin F S

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{S : Set E}
(hS : ∀ x ∈ S, IsAlgebraic F x)


@[to_additive (attr := simp)]
theorem mulIndicator_one' {s : Set α} : s.mulIndicator (1 : α → M) = 1

{α : Type u_1}
(M : Type u_4)
[One M]
{s : Set α}


theorem diff_diff_eq_sdiff_union (h : u ⊆ s) : s \ (t \ u) = s \ t ∪ u

{α : Type u}
{s t u : Set α}
(h : u ⊆ s)


@[simp]
theorem fold_zero (b : α) : (0 : Multiset α).fold op b = b

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b : α)


theorem getElem?_take {l : List α} {n m : Nat} (h : m < n) : (l.take n)[m]? = l[m]?

{α : Type u_1}
{l : List α}
{n m : Nat}
(h : m < n)


@[simp]
theorem preimage_Ioi (e : α ≃o β) (b : β) : e ⁻¹' Ioi b = Ioi (e.symm b)

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


@[simp]
theorem symm_symm (F : Homotopy p₀ p₁) : F.symm.symm = F

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ : Path x₀ x₁}
(F : p₀.Homotopy p₁)


lemma angle_div_right_eq_angle_mul_left (a x y : ℂ) : angle x (y / a) = angle (x * a) y

InnerProductGeometry.angle x (y / a) = InnerProductGeometry.angle (x * a) y


theorem unitGroup_injective : Function.Injective (unitGroup : ValuationSubring K → Subgroup _)


/-- If a set `S` generates, as algebra, `MonoidAlgebra R M`, then the image of the union of the
supports of elements of `S` generates `MonoidAlgebra R M`. -/
theorem support_gen_of_gen' {S : Set (MonoidAlgebra R M)} (hS : Algebra.adjoin R S = ⊤) :
    Algebra.adjoin R (of R M '' ⋃ f ∈ S, (f.support : Set M)) = ⊤

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[Monoid M]
{S : Set (MonoidAlgebra R M)}
(hS : Algebra.adjoin R S = ⊤)

Algebra.adjoin R (⇑(MonoidAlgebra.of R M) '' ⋃ f ∈ S, ↑f.support) = ⊤


theorem card_image₂ (hf : Injective2 f) (s : Finset α) (t : Finset β) :
    (image₂ f s t).card = s.card * t.card

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
(hf : Function.Injective2 f)
(s : Finset α)
(t : Finset β)

(Finset.image₂ f s t).card = s.card * t.card


theorem toLex_mono : Monotone (toLex : α × β → α ×ₗ β)

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[Preorder β]


theorem IndepSets.indepSet_of_mem (hs : s ∈ S) (ht : t ∈ T)
    (hs_meas : MeasurableSet s) (ht_meas : MeasurableSet t)
    (μ : Measure Ω := by volume_tac) [IsProbabilityMeasure μ]
    (h_indep : IndepSets S T μ) :
    IndepSet s t μ

(μ : MeasureTheory.Measure Ω := by volume_tac)

(h_indep : ProbabilityTheory.IndepSets S T μ)


/-- Used to bootstrap the more general `quotient_mk_comp_C_isIntegral_of_jacobson` -/
private theorem quotient_mk_comp_C_isIntegral_of_jacobson' [Nontrivial R] (hR : IsJacobson R)
    (hP' : ∀ x : R, C x ∈ P → x = 0) : ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral

(hP' : ∀ (x : R), Polynomial.C x ∈ P → x = 0)


theorem isCycleOn_support_cycleOf [DecidableEq α] [Fintype α] (f : Perm α) (x : α) :
    f.IsCycleOn (f.cycleOf x).support

{α : Type u_2}
[DecidableEq α]
[Fintype α]
(f : Equiv.Perm α)
(x : α)


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

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

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


theorem preimage_singleton_eq_empty {f : α → β} {y : β} : f ⁻¹' {y} = ∅ ↔ y ∉ range f

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


theorem hasFTaylorSeriesUpTo_zero_iff :
    HasFTaylorSeriesUpTo 0 f p ↔ Continuous f ∧ ∀ x, (p x 0).uncurry0 = f x

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

HasFTaylorSeriesUpTo 0 f p ↔ Continuous f ∧ ∀ (x : E), (p x 0).uncurry0 = f x


theorem card_commonNeighbors_lt_card_verts [DecidableRel G.Adj] (v w : V) :
    Fintype.card (G.commonNeighbors v w) < Fintype.card V

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
(v w : V)

Fintype.card ↑(G.commonNeighbors v w) < Fintype.card V


/-- **Removable singularity** theorem: if a function `f : ℂ → E` is complex differentiable and
bounded on a punctured neighborhood of `c`, then `f` has a limit at `c`. -/
theorem tendsto_limUnder_of_differentiable_on_punctured_nhds_of_bounded_under {f : ℂ → E} {c : ℂ}
    (hd : ∀ᶠ z in 𝓝[≠] c, DifferentiableAt ℂ f z)
    (hb : IsBoundedUnder (· ≤ ·) (𝓝[≠] c) fun z => ‖f z - f c‖) :
    Tendsto f (𝓝[≠] c) (𝓝 <| limUnder (𝓝[≠] c) f)

(hd : ∀ᶠ (z : ℂ) in 𝓝[≠] c, DifferentiableAt ℂ f z)

(hb : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) (𝓝[≠] c) fun z => ‖f z - f c‖)

Filter.Tendsto f (𝓝[≠] c) (𝓝 (limUnder (𝓝[≠] c) f))


theorem UniformSpace.mem_ball_self (x : α) {V : Set (α × α)} (hV : V ∈ 𝓤 α) : x ∈ ball x V

{α : Type ua}
[UniformSpace α]
(x : α)
{V : Set (α × α)}
(hV : V ∈ 𝓤 α)


@[simp] theorem and_eq (x y : BitVec w)                   : BitVec.and x y = x &&& y


theorem isMax_iterate_succ_of_eq_of_ne {n m : ℕ} (h_eq : succ^[n] a = succ^[m] a)
    (h_ne : n ≠ m) : IsMax (succ^[n] a)

(h_eq : Order.succ^[n] a = Order.succ^[m] a)


@[reassoc (attr := simp)]
theorem π_arrow (j : J) : π arrows j ≫ arrows _ = base arrows

[CategoryTheory.Limits.HasWidePullback B objs arrows]

CategoryTheory.Limits.WidePullback.π arrows j ≫ arrows j = CategoryTheory.Limits.WidePullback.base arrows


@[simp] theorem smul_coeffs {lc : LinearCombo} {i : Int} : (i * lc).coeffs = i * lc.coeffs


theorem comp (hf' : LeftInvOn f' f s) (hg' : LeftInvOn g' g t) (hf : MapsTo f s t) :
    LeftInvOn (f' ∘ g') (g ∘ f) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{f : α → β}
{g : β → γ}
{f' : β → α}
{g' : γ → β}
(hf' : Set.LeftInvOn f' f s)
(hg' : Set.LeftInvOn g' g t)
(hf : Set.MapsTo f s t)


@[to_additive (attr := norm_cast, simp)]
lemma orbitRel.Quotient.mem_subgroup_orbit_iff {H : Subgroup G} {x : orbitRel.Quotient G α}
    {a b : x.orbit} : (a : α) ∈ MulAction.orbit H (b : α) ↔ a ∈ MulAction.orbit H b

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{H : Subgroup G}
{x : MulAction.orbitRel.Quotient G α}
{a b : ↑x.orbit}

↑a ∈ MulAction.orbit ↥H ↑b ↔ a ∈ MulAction.orbit (↥H) b


lemma prime_of_mem_primesBelow {p n : ℕ} (h : p ∈ n.primesBelow) : p.Prime


@[to_additive]
theorem NeBot.one_le_div (h : f.NeBot) : 1 ≤ f / f

{α : Type u_2}
[AddGroup α]
{f : Filter α}
(h : f.NeBot)


theorem of_zpow : ∀ m : ℤ, Irrational (x ^ m) → Irrational x


@[to_additive]
theorem orderOf_eq_prime (hg : x ^ p = 1) (hg1 : x ≠ 1) : orderOf x = p

{G : Type u_1}
[AddMonoid G]
{x : G}
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(hg : p • x = 0)
(hg1 : x ≠ 0)


/-- For any `p`, the power of `p` in `n^k` is `k` times the power in `n` -/
@[simp]
theorem factorization_pow (n k : ℕ) : factorization (n ^ k) = k • n.factorization

(n ^ k).factorization = k • n.factorization


/-- The square cylinders formed from measurable sets generate the product σ-algebra. -/
theorem generateFrom_squareCylinders [∀ i, MeasurableSpace (α i)] :
    MeasurableSpace.generateFrom (squareCylinders fun i ↦ {s : Set (α i) | MeasurableSet s}) =
      MeasurableSpace.pi

{ι : Type u_2}
{α : ι → Type u_1}
[(i : ι) → MeasurableSpace (α i)]

MeasurableSpace.generateFrom (MeasureTheory.squareCylinders fun i => {s | MeasurableSet s}) = MeasurableSpace.pi


@[simp] protected theorem UInt32.sizeOf (a : UInt32) : sizeOf a = a.toNat + 2


@[simp]
theorem div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = 0

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}


@[simp]
theorem inter_reverse {xs ys : List α} : xs.inter ys.reverse = xs.inter ys

{α : Type u_1}
[DecidableEq α]
{xs ys : List α}


@[simp]
theorem not_sbtw_self_right (x y : P) : ¬Sbtw R x y y

(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x y : P)


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X i ⟶ K.X j ⟶ K.X k` for arbitrary indices `i`, `j` and `k`. -/
@[simps]
def shortComplexFunctor' (i j k : ι) : HomologicalComplex C c ⥤ ShortComplex C

((HomologicalComplex.shortComplexFunctor' C c i j k).obj K).f = K.d i j


@[to_additive]
theorem mul_le_of_le_of_le_one [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b ≤ c)
    (ha : a ≤ 1) :
    b * a ≤ c

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


@[simp]
theorem map_cons (f : α → β) (a s) : map f (cons a s) = cons (f a) (map f s)

{α : Type u}
{β : Type v}
(f : α → β)
(a : α)
(s : Stream'.WSeq α)

Stream'.WSeq.map f (Stream'.WSeq.cons a s) = Stream'.WSeq.cons (f a) (Stream'.WSeq.map f s)


/-- Universe lift functor for commutative monoids. -/
@[to_additive (attr := simps)
  "Universe lift functor for additive commutative monoids."]
def uliftFunctor : CommMonCat.{u} ⥤ CommMonCat.{max u v}

AddCommMonCat.uliftFunctor.obj X = AddCommMonCat.of (ULift.{v, u} ↑X)


@[simp]
lemma coeff_ΨSq (n : ℤ) : (W.ΨSq n).coeff (n.natAbs ^ 2 - 1) = n ^ 2

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℤ)

(W.ΨSq n).coeff (n.natAbs ^ 2 - 1) = ↑n ^ 2


theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
    (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x⦄, x ∈ s → p (f x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set α}
{p : β → Prop}

(∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)


theorem of_disjoint_iUnion_nat [T2Space M] (v : VectorMeasure α M) {f : ℕ → Set α}
    (hf₁ : ∀ i, MeasurableSet (f i)) (hf₂ : Pairwise (Disjoint on f)) :
    v (⋃ i, f i) = ∑' i, v (f i)

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


/-- This rather technical-looking lemma exists because it is exactly what is needed to establish a
uniqueness result for root data. See the doc string of `Module.Dual.eq_of_preReflection_mapsTo` for
further remarks. -/
lemma Dual.eq_of_preReflection_mapsTo' [CharZero R] [NoZeroSMulDivisors R M]
    {x : M} (hx : x ≠ 0) {Φ : Set M} (hΦ₁ : Φ.Finite) (hx' : x ∈ span R Φ) {f g : Dual R M}
    (hf₁ : f x = 2) (hf₂ : MapsTo (preReflection x f) Φ Φ)
    (hg₁ : g x = 2) (hg₂ : MapsTo (preReflection x g) Φ Φ) :
    (span R Φ).subtype.dualMap f = (span R Φ).subtype.dualMap g

(hf₂ : Set.MapsTo (⇑(Module.preReflection x f)) Φ Φ)

(hg₂ : Set.MapsTo (⇑(Module.preReflection x g)) Φ Φ)

(Submodule.span R Φ).subtype.dualMap f = (Submodule.span R Φ).subtype.dualMap g


theorem lt_of_le_of_ne {a b : α} : a ≤ b → a ≠ b → a < b


/-- Any left option of `x * y` of the first kind is also a left option of `x * -(-y)` of
  the first kind. -/
lemma mulOption_neg_neg {x} (y) {i j} :
    mulOption x y i j = mulOption x (-(-y)) i (toLeftMovesNeg <| toRightMovesNeg j)

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

x.mulOption y i j = x.mulOption (- -y) i (SetTheory.PGame.toLeftMovesNeg (SetTheory.PGame.toRightMovesNeg j))


@[simp]
lemma range_ofENat : range ofENat = Iic ℵ₀

Set.range Cardinal.ofENat = Set.Iic Cardinal.aleph0


@[simp]
theorem supPrime_iff_supIrred : SupPrime a ↔ SupIrred a

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


theorem le_dist_iff_le_dist_coe_center :
    r < dist z w ↔ w.im * Real.sinh r < dist (z : ℂ) (w.center r)

r < dist z w ↔ w.im * Real.sinh r < dist ↑z ↑(w.center r)


@[to_additive]
protected theorem setIntegral_eq (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → E} (hf : ∀ (g : G) (x), f (g • x) = f x) : ∫ x in s, f x ∂μ = ∫ x in t, f x ∂μ

[MeasureTheory.VAddInvariantMeasure G α μ]

(hs : MeasureTheory.IsAddFundamentalDomain G s μ)

(ht : MeasureTheory.IsAddFundamentalDomain G t μ)

∫ (x : α) in s, f x ∂μ = ∫ (x : α) in t, f x ∂μ


theorem smul_eq_mul : ∀ (n : ℕ) (a : Ordinal), n • a = a * n


theorem IsTopologicalBasis.open_eq_sUnion {B : Set (Set α)} (hB : IsTopologicalBasis B) {u : Set α}
    (ou : IsOpen u) : ∃ S ⊆ B, u = ⋃₀ S

(hB : TopologicalSpace.IsTopologicalBasis B)


theorem HasCompactMulSupport.comp_smul {β : Type*} [One β] {f : α → β} (h : HasCompactMulSupport f)
    {c : G₀} (hc : c ≠ 0) : HasCompactMulSupport fun x => f (c • x)

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{β : Type u_5}
[One β]
{f : α → β}
(h : HasCompactMulSupport f)
{c : G₀}
(hc : c ≠ 0)


/-- Interpret a natural isomorphism of the underlying monoidal functors as an
isomorphism of the braided monoidal functors.
-/
@[simps]
def mkIso {F G : BraidedFunctor C D} (i : F.toMonoidalFunctor ≅ G.toMonoidalFunctor) : F ≅ G

{F G : CategoryTheory.BraidedFunctor C D}

(CategoryTheory.BraidedFunctor.mkIso i).hom = i.hom


theorem sub_le_of_le_add {a b c : Nat} (h : a ≤ c + b) : a - b ≤ c


theorem continuousSMul_induced : @ContinuousSMul R M₁ _ u (t.induced f)

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
[Semiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
[u : TopologicalSpace R]
{t : TopologicalSpace M₂}
[ContinuousSMul R M₂]
(f : M₁ →ₗ[R] M₂)


theorem skewAdjointPart_comp_subtype_skewAdjoint :
    (skewAdjointPart R).comp (skewAdjoint.submodule R A).subtype = .id

(R : Type u_1)
{A : Type u_2}
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]

skewAdjointPart R ∘ₗ (skewAdjoint.submodule R A).subtype = LinearMap.id


@[to_additive (attr := simp)]
theorem mem_smulAntidiagonal : x ∈ smulAntidiagonal s t a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 • x.2 = a

{G : Type u_1}
{P : Type u_2}
[SMul G P]
{s : Set G}
{t : Set P}
{a : P}
{x : G × P}

x ∈ s.smulAntidiagonal t a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 • x.2 = a


theorem quotientCentralizerEmbedding_apply (g : G) (x : G) :
    quotientCentralizerEmbedding g x = ⟨⁅x, g⁆, x, g, rfl⟩

(Subgroup.quotientCentralizerEmbedding g) ↑x = ⟨⁅x, g⁆, ⋯⟩


theorem univLE_max : UnivLE.{u, max u v}


theorem iUnion_of_singleton (α : Type*) : (⋃ x, {x} : Set α) = univ


@[simp] lemma toFinset_Ioc (a b : α) [Fintype (Ioc a b)] : (Ioc a b).toFinset = Finset.Ioc a b

{α : Type u_3}
[Preorder α]
[LocallyFiniteOrder α]
(a b : α)
[Fintype ↑(Set.Ioc a b)]


/-- (Impl)
The natural transformation given by the algebra structure maps, used to construct a cocone `c` with
point `colimit (D ⋙ forget T)`.
 -/
@[simps]
def γ : (D ⋙ forget T) ⋙ ↑T ⟶ D ⋙ forget T

{D : CategoryTheory.Functor J T.Algebra}

CategoryTheory.Monad.ForgetCreatesColimits.γ.app j = (D.obj j).a


/-- See `List.ranges_join` for the version about `List.sum`. -/
lemma ranges_join' : ∀ l : List ℕ, l.ranges.join = range (Nat.sum l)


theorem IsUpperSet.total (hs : IsUpperSet s) (ht : IsUpperSet t) : s ⊆ t ∨ t ⊆ s

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


/-- The definition of uniform integrable in mathlib is equivalent to the definition commonly
found in literature. -/
theorem uniformIntegrable_iff [IsFiniteMeasure μ] (hp : 1 ≤ p) (hp' : p ≠ ∞) :
    UniformIntegrable f p μ ↔
      (∀ i, AEStronglyMeasurable (f i) μ) ∧
        ∀ ε : ℝ, 0 < ε → ∃ C : ℝ≥0,
          ∀ i, eLpNorm ({ x | C ≤ ‖f i x‖₊ }.indicator (f i)) p μ ≤ ENNReal.ofReal ε

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{p : ℝ≥0∞}
{f : ι → α → β}
[MeasureTheory.IsFiniteMeasure μ]
(hp : 1 ≤ p)
(hp' : p ≠ ⊤)

MeasureTheory.UniformIntegrable f p μ ↔
  (∀ (i : ι), MeasureTheory.AEStronglyMeasurable (f i) μ) ∧
    ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), MeasureTheory.eLpNorm ({x | C ≤ ‖f i x‖₊}.indicator (f i)) p μ ≤ ENNReal.ofReal ε


@[simp]
theorem map_mk (φ : G →g G') (v : V) :
    (G.connectedComponentMk v).map φ = G'.connectedComponentMk (φ v)

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
(φ : G →g G')
(v : V)

SimpleGraph.ConnectedComponent.map φ (G.connectedComponentMk v) = G'.connectedComponentMk (φ v)


@[simp]
theorem one_add_ofNat (m : ℕ) [m.AtLeastTwo] :
    1 + (no_index (OfNat.ofNat m : Ordinal)) = Order.succ (OfNat.ofNat m : Ordinal)

1 + OfNat.ofNat m = Order.succ (OfNat.ofNat m)


protected theorem lt_iff_le_not_le : ∀ {x y : Bool}, x < y ↔ x ≤ y ∧ ¬ y ≤ x


theorem IsPurelyInseparable.minpoly_eq_X_sub_C_pow (q : ℕ) [ExpChar F q] [IsPurelyInseparable F E]
    (x : E) : ∃ n : ℕ, (minpoly F x).map (algebraMap F E) = (X - C x) ^ q ^ n

(F : Type u)
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[ExpChar F q]
[IsPurelyInseparable F E]
(x : E)

∃ n, Polynomial.map (algebraMap F E) (minpoly F x) = (Polynomial.X - Polynomial.C x) ^ q ^ n


@[reassoc (attr := simp)]
lemma EffectiveEpi.fac {X Y W : C} (f : Y ⟶ X) [EffectiveEpi f]
    (e : Y ⟶ W) (h : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) :
    f ≫ EffectiveEpi.desc f e h = e

(h :
  ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),
    CategoryTheory.CategoryStruct.comp g₁ f = CategoryTheory.CategoryStruct.comp g₂ f →
      CategoryTheory.CategoryStruct.comp g₁ e = CategoryTheory.CategoryStruct.comp g₂ e)

CategoryTheory.CategoryStruct.comp f (CategoryTheory.EffectiveEpi.desc f e ⋯) = e


@[simp, norm_cast]
theorem coe_pow {R} [Semiring R] (s : Subsemiring R) (x : s) (n : ℕ) :
    ((x ^ n : s) : R) = (x : R) ^ n

{R : Type u_1}
[Semiring R]
(s : Subsemiring R)
(x : ↥s)
(n : ℕ)


theorem prod_le_prod {p q : Multiset (Associates α)} (h : p ≤ q) : p.prod ≤ q.prod

{α : Type u_1}
[CommMonoid α]
{p q : Multiset (Associates α)}
(h : p ≤ q)


@[simp]
theorem nonempty_Ioo [DenselyOrdered α] : (Ioo a b).Nonempty ↔ a < b

{α : Type u_1}
[Preorder α]
{a b : α}
[DenselyOrdered α]


theorem upper_le_upper (hJ : J ∈ π) : J.upper ≤ I.upper

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


theorem HasStrictDerivAt.exp (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => Real.exp (f x)) (Real.exp (f x) * f') x

{f : ℝ → ℝ}
{f' x : ℝ}
(hf : HasStrictDerivAt f f' x)


theorem integral_union_eq_left_of_forall {f : X → E} (ht : MeasurableSet t)
    (ht_eq : ∀ x ∈ t, f x = 0) : ∫ x in s ∪ t, f x ∂μ = ∫ x in s, f x ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{s t : Set X}
{μ : MeasureTheory.Measure X}
{f : X → E}
(ht : MeasurableSet t)
(ht_eq : ∀ x ∈ t, f x = 0)

∫ (x : X) in s ∪ t, f x ∂μ = ∫ (x : X) in s, f x ∂μ


protected theorem ClosedEmbedding.noncompactSpace [NoncompactSpace X] {f : X → Y}
    (hf : ClosedEmbedding f) : NoncompactSpace Y

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
[NoncompactSpace X]
{f : X → Y}
(hf : ClosedEmbedding f)


theorem coprime_fintype_prod_left_iff [Fintype ι] {s : ι → ℕ} {x : ℕ} :
    Coprime (∏ i, s i) x ↔ ∀ i, Coprime (s i) x

{ι : Type u_1}
[Fintype ι]
{s : ι → ℕ}
{x : ℕ}

(∏ i : ι, s i).Coprime x ↔ ∀ (i : ι), (s i).Coprime x


/-- This rather trivial consequence of `subset_iUnion₂` is convenient with `apply`, and has `i` and
`j` explicit for this purpose. -/
theorem subset_iUnion₂_of_subset {s : Set α} {t : ∀ i, κ i → Set α} (i : ι) (j : κ i)
    (h : s ⊆ t i j) : s ⊆ ⋃ (i) (j), t i j

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
{s : Set α}
{t : (i : ι) → κ i → Set α}
(i : ι)
(j : κ i)
(h : s ⊆ t i j)


theorem const_smul (a : G) (x : β) : const (a • x) = a • const x

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{G : Type u_3}
[SMul G β]
[IsScalarTower G β β]
(a : G)
(x : β)

CauSeq.const abv (a • x) = a • CauSeq.const abv x


@[to_additive]
theorem comap_surjective_of_injective : Function.Surjective (comap f)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)


@[simp] theorem toHopfAlgebraCatIso_symm (e : X ≃ₐc[R] Y) :
    toHopfAlgebraCatIso e.symm = (toHopfAlgebraCatIso e).symm

{R : Type u}
[CommRing R]
{X Y : Type v}
[Ring X]
[Ring Y]
[HopfAlgebra R X]
[HopfAlgebra R Y]
(e : X ≃ₐc[R] Y)


theorem revAtFun_inj {N : ℕ} : Function.Injective (revAtFun N)


theorem withTopEquiv_one : withTopEquiv 1 = 1


/-- The functor defined by the over categories.-/
@[simps] def mapFunctor : T ⥤ Cat

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

(CategoryTheory.Over.mapFunctor T).obj X = CategoryTheory.Cat.of (CategoryTheory.Over X)


/-- The Čech nerve associated to an arrow. -/
@[simps]
def cechNerve : SimplicialObject C

[∀ (n : ℕ), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

∀ {X Y : SimplexCategoryᵒᵖ} (g : X ⟶ Y),
  f.cechNerve.map g =
    CategoryTheory.Limits.WidePullback.lift (CategoryTheory.Limits.WidePullback.base fun x => f.hom)
      (fun i => CategoryTheory.Limits.WidePullback.π (fun x => f.hom) ((SimplexCategory.Hom.toOrderHom g.unop) i)) ⋯


theorem nnnorm_lt_iff_of_nonempty [Nonempty α] {M : ℝ≥0} : ‖f‖₊ < M ↔ ∀ x, ‖f x‖₊ < M

{α : Type u_1}
{E : Type u_3}
[TopologicalSpace α]
[CompactSpace α]
[NormedAddCommGroup E]
(f : C(α, E))
[Nonempty α]
{M : ℝ≥0}


lemma cdf_measure_stieltjesFunction (f : StieltjesFunction) (hf0 : Tendsto f atBot (𝓝 0))
    (hf1 : Tendsto f atTop (𝓝 1)) :
    cdf f.measure = f

(hf0 : Filter.Tendsto (↑f) Filter.atBot (𝓝 0))

(hf1 : Filter.Tendsto (↑f) Filter.atTop (𝓝 1))


@[simp]
theorem parallelPair_obj_zero (f g : X ⟶ Y) : (parallelPair f g).obj zero = X

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

(CategoryTheory.Limits.parallelPair f g).obj CategoryTheory.Limits.WalkingParallelPair.zero = X


/--
A linear endomorphism of a module `E` is a projection onto a submodule `p` if it sends every element
of `E` to `p` and fixes every element of `p`.
The definition allow more generally any `FunLike` type and not just linear maps, so that it can be
used for example with `ContinuousLinearMap` or `Matrix`.
-/
structure IsProj {F : Type*} [FunLike F M M] (f : F) : Prop where
  map_mem : ∀ x, f x ∈ m
  map_id : ∀ x ∈ m, f x = x

{S : Type u_5}
[Semiring S]
{M : Type u_6}
[AddCommMonoid M]
[Module S M]
{m : Submodule S M}
{F : Type u_7}
[FunLike F M M]
{f : F}
(self : LinearMap.IsProj m f)
(x : M)


theorem perm_erase {a : α} {s₁ s₂ : AList β} :
    s₁.entries ~ s₂.entries → (erase a s₁).entries ~ (erase a s₂).entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{s₁ s₂ : AList β}

s₁.entries ~ s₂.entries → (AList.erase a s₁).entries ~ (AList.erase a s₂).entries


theorem continuous_sub_left {a : ℝ≥0∞} (a_ne_top : a ≠ ∞) : Continuous (a - ·)


@[simp]
theorem Ioi_subset_Ici_iff [DenselyOrdered α] : Ioi b ⊆ Ici a ↔ a ≤ b

{α : Type u_1}
[LinearOrder α]
{a b : α}
[DenselyOrdered α]


/--
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 Y : LightProfiniteᵒᵖ} (f : X_1 ⟶ Y) (g : C(↑(LightProfinite.toTopCat.obj (Opposite.unop X_1)), ↑X)),
  X.toLightCondSet.val.map f g = g.comp f.unop


@[simp]
theorem mk_ker {I : Ideal R} : ker (Quotient.mk I) = I


@[simp]
theorem arccos_eq_pi_div_two {x} : arccos x = π / 2 ↔ x = 0


theorem sup_mem (s : Set α) (w₁ : ⊥ ∈ s) (w₂ : ∀ᵉ (x ∈ s) (y ∈ s), x ⊔ y ∈ s)
    {ι : Type*} (t : Finset ι) (p : ι → α) (h : ∀ i ∈ t, p i ∈ s) : t.sup p ∈ s

{α : Type u_2}
[SemilatticeSup α]
[OrderBot α]
(s : Set α)
(w₁ : ⊥ ∈ s)
(w₂ : ∀ x ∈ s, ∀ y ∈ s, x ⊔ y ∈ s)
{ι : Type u_7}
(t : Finset ι)
(p : ι → α)
(h : ∀ i ∈ t, p i ∈ s)


theorem ker_eq_bot {f : M →ₛₗ[τ₁₂] M₂} : ker f = ⊥ ↔ Injective f

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Ring R]
[Ring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{f : M →ₛₗ[τ₁₂] M₂}

LinearMap.ker f = ⊥ ↔ Function.Injective ⇑f


theorem sr_mul_self (i : ZMod n) : sr i * sr i = 1

DihedralGroup.sr i * DihedralGroup.sr i = 1


theorem nil_zipWith (f : α → β → γ) (l : List β) : zipWith f [] l = []

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → β → γ)
(l : List β)


theorem mul_lt_of_mul_lt_of_nonneg_right [MulPosMono α] (h : a * b < c) (hle : d ≤ a) (b0 : 0 ≤ b) :
    d * b < c

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[MulPosMono α]
(h : a * b < c)
(hle : d ≤ a)
(b0 : 0 ≤ b)


@[simp]
theorem decomposeAux_eq_decompose :
    ⇑(decomposeAux f : R[M] →ₐ[R] ⨁ i : ι, gradeBy R f i) =
      DirectSum.decompose (gradeBy R f)

{M : Type u_1}
{ι : Type u_2}
{R : Type u_3}
[AddMonoid M]
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
(f : M →+ ι)

⇑(AddMonoidAlgebra.decomposeAux f) = ⇑(DirectSum.decompose (AddMonoidAlgebra.gradeBy R ⇑f))


@[simp]
theorem indexEquiv_apply_ofIsComplex_snd (w : {w : InfinitePlace K // IsComplex w}) :
    (indexEquiv K) (Sum.inr ⟨w, 1⟩) = ComplexEmbedding.conjugate w.val.embedding

{K : Type u_1}
[Field K]
[NumberField K]
(w : { w // w.IsComplex })

(NumberField.mixedEmbedding.indexEquiv K) (Sum.inr (w, 1)) = NumberField.ComplexEmbedding.conjugate (↑w).embedding


/-- A semigroup homomorphism `f : M →ₙ* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.srange`.

This is a bidirectional version of `MulHom.srangeRestrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive semigroup homomorphism `f : M →+ N` with a left-inverse
      `g : N → M` defines an additive equivalence between `M` and `f.srange`.
      This is a bidirectional version of `AddHom.srangeRestrict`. "]
def ofLeftInverse (f : M →ₙ* N) {g : N → M} (h : Function.LeftInverse g f) : M ≃* f.srange

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M →ₙ* N)
{g : N → M}
(h : Function.LeftInverse g ⇑f)

∀ (a : ↥f.srange), (MulEquiv.ofLeftInverse f h).symm a = g ↑a


theorem subsingleton_iff_subsingleton : Subsingleton R[X] ↔ Subsingleton R


@[to_additive (attr := measurability)]
theorem measurable_one [One α] : Measurable (1 : β → α)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
[One α]


@[simp]
theorem eval₂_X_pow {n : ℕ} : (X ^ n).eval₂ f x = x ^ n

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
(x : S)
{n : ℕ}

Polynomial.eval₂ f x (Polynomial.X ^ n) = x ^ n


theorem mem_principal_ideals_iff {I : (FractionalIdeal R⁰ K)ˣ} :
    I ∈ (toPrincipalIdeal R K).range ↔ ∃ x : K, spanSingleton R⁰ x = I

{R : Type u_1}
{K : Type u_2}
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
{I : (FractionalIdeal R⁰ K)ˣ}

I ∈ (toPrincipalIdeal R K).range ↔ ∃ x, FractionalIdeal.spanSingleton R⁰ x = ↑I


/-- A specialization of `spectrum.map_polynomial_aeval_of_nonempty` to monic monomials for
convenience. -/
theorem map_pow_of_nonempty [IsAlgClosed 𝕜] {a : A} (ha : (σ a).Nonempty) (n : ℕ) :
    σ (a ^ n) = (· ^ n) '' σ a

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
[IsAlgClosed 𝕜]
{a : A}
(ha : (spectrum 𝕜 a).Nonempty)
(n : ℕ)

spectrum 𝕜 (a ^ n) = (fun x => x ^ n) '' spectrum 𝕜 a


/-- Formula for `completedHurwitzZetaEven` as a Dirichlet series in the convergence range. -/
lemma hasSum_int_completedHurwitzZetaEven (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℤ ↦ Gammaℝ s / (↑|n + a| : ℂ) ^ s / 2) (completedHurwitzZetaEven a s)

HasSum (fun n => s.Gammaℝ / ↑|↑n + a| ^ s / 2) (HurwitzZeta.completedHurwitzZetaEven (↑a) s)


@[to_additive (attr := simp) norm_eq_of_mem_sphere]
theorem norm_eq_of_mem_sphere' (x : sphere (1 : E) r) : ‖(x : E)‖ = r

{E : Type u_6}
[SeminormedAddGroup E]
{r : ℝ}
(x : ↑(Metric.sphere 0 r))


theorem Finite.infsep_zero_iff_subsingleton (hs : s.Finite) : s.infsep = 0 ↔ s.Subsingleton

{α : Type u_1}
[MetricSpace α]
{s : Set α}
(hs : s.Finite)


theorem injective_comp (h : N ≃[L] P) :
    Function.Injective (h.comp : (M ≃[L] N) →  (M ≃[L] P))

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(h : L.Equiv N P)


/-- With our definitions, `MeromorphicAt f x` depends only on the values of `f` on a punctured
neighbourhood of `x` (not on `f x`) -/
lemma congr {f g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hfg : f =ᶠ[𝓝[≠] x] g) :
    MeromorphicAt g x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f g : 𝕜 → E}
{x : 𝕜}
(hf : MeromorphicAt f x)
(hfg : f =ᶠ[𝓝[≠] x] g)


/-- The `ShortComplex` in `C` associated to a short complex in `Cᵒᵖ`. -/
@[simps]
def unop (S : ShortComplex Cᵒᵖ) : ShortComplex C


theorem toFun_eq_coe {f : EsakiaHom α β} : f.toFun = (f : α → β)

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


/-- The main proof of the upper bound part of the Akra-Bazzi theorem. The factor
`1 - ε n` does not change the asymptotic order, but is needed for the induction step to go
through. -/
lemma T_isBigO_smoothingFn_mul_asympBound :
    T =O[atTop] (fun n => (1 - ε n) * asympBound g a b n)

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

T =O[Filter.atTop] fun n => (1 - AkraBazziRecurrence.smoothingFn ↑n) * AkraBazziRecurrence.asympBound g a b n


theorem le_of_mem_primeFactorsList {n p : ℕ} (h : p ∈ n.primeFactorsList) : p ≤ n


@[simp]
theorem zero_div (a : Ordinal) : 0 / a = 0


theorem blimsup_mono (h : ∀ x, p x → q x) : blimsup u f p ≤ blimsup u f q

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{p q : β → Prop}
{u : β → α}
(h : ∀ (x : β), p x → q x)

Filter.blimsup u f p ≤ Filter.blimsup u f q


@[deprecated map_prod (since := "2024-02-15")]
theorem toNat_finset_prod (s : Finset α) (f : α → Cardinal) :
    toNat (∏ i ∈ s, f i) = ∏ i ∈ s, toNat (f i)

{α : Type u}
(s : Finset α)
(f : α → Cardinal.{u_1})

Cardinal.toNat (∏ i ∈ s, f i) = ∏ i ∈ s, Cardinal.toNat (f i)


theorem proj_surjective : Function.Surjective S.proj

{X : Type u_2}
[TopologicalSpace X]
(S : DiscreteQuotient X)


/-- The transitivity of homotopy between morphisms of short complexes. -/
@[simps]
def trans (h₁₂ : Homotopy φ₁ φ₂) (h₂₃ : Homotopy φ₂ φ₃) : Homotopy φ₁ φ₃

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

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

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


@[simp]
theorem involution (f : RingInvo R) (x : R) : (f (f x).unop).unop = x

{R : Type u_2}
[Semiring R]
(f : RingInvo R)
(x : R)

MulOpposite.unop (f (MulOpposite.unop (f x))) = x


theorem map_eq_image (f : α ↪ β) (s : Finset α) : s.map f = s.image f

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


theorem _root_.totallyBounded_Ico (a b : α) : TotallyBounded (Ico a b)

{α : Type u}
[PseudoMetricSpace α]
[Preorder α]
[CompactIccSpace α]
(a b : α)


@[to_additive]
theorem prod_univ_five [CommMonoid β] (f : Fin 5 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4

{β : Type u_2}
[CommMonoid β]
(f : Fin 5 → β)


/-- **Taylor's theorem** with a polynomial bound on the remainder

We assume that `f` is `n+1`-times continuously differentiable on the closed set `Icc a b`.
There exists a constant `C` such that for all `x ∈ Icc a b` the difference of `f` and its `n`-th
Taylor polynomial can be estimated by `C * (x - a)^(n+1)`. -/
theorem exists_taylor_mean_remainder_bound {f : ℝ → E} {a b : ℝ} {n : ℕ} (hab : a ≤ b)
    (hf : ContDiffOn ℝ (n + 1) f (Icc a b)) :
    ∃ C, ∀ x ∈ Icc a b, ‖f x - taylorWithinEval f n (Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1)

(hf : ContDiffOn ℝ (↑n + 1) f (Set.Icc a b))

∃ C, ∀ x ∈ Set.Icc a b, ‖f x - taylorWithinEval f n (Set.Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1)


theorem dot_smul_left (xs ys : Coeffs) (i : Int) : dot (i * xs) ys = i * dot xs ys

Lean.Omega.Coeffs.dot (i * xs) ys = i * xs.dot ys


/-- If `f : α → E` is an integrable function, then either it is a.e. equal to the constant
`⨍ x, f x ∂μ` or there exists a measurable set such that `μ t ≠ 0`, `μ tᶜ ≠ 0`, and the average
values of `f` over `t` and `tᶜ` are different. -/
theorem ae_eq_const_or_exists_average_ne_compl [IsFiniteMeasure μ] (hfi : Integrable f μ) :
    f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨
      ∃ t, MeasurableSet t ∧ μ t ≠ 0 ∧ μ tᶜ ≠ 0 ∧ (⨍ x in t, f x ∂μ) ≠ ⨍ x in tᶜ, f x ∂μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{μ : MeasureTheory.Measure α}
{f : α → E}
[MeasureTheory.IsFiniteMeasure μ]
(hfi : MeasureTheory.Integrable f μ)

f =ᵐ[μ] Function.const α (⨍ (x : α), f x ∂μ) ∨
  ∃ t, MeasurableSet t ∧ μ t ≠ 0 ∧ μ tᶜ ≠ 0 ∧ ⨍ (x : α) in t, f x ∂μ ≠ ⨍ (x : α) in tᶜ, f x ∂μ


theorem Abelian.tfae_mono {X Y : C} (f : X ⟶ Y) (Z : C) :
    TFAE [Mono f, kernel.ι f = 0, (ShortComplex.mk (0 : Z ⟶ X) f zero_comp).Exact]

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

[CategoryTheory.Mono f, CategoryTheory.Limits.kernel.ι f = 0, (CategoryTheory.ShortComplex.mk 0 f ⋯).Exact].TFAE


@[simp]
theorem inter_nil' (l : List α) : l ∩ [] = []

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


@[to_additive]
theorem Red.Step.invRev {L₁ L₂ : List (α × Bool)} (h : Red.Step L₁ L₂) :
    Red.Step (FreeGroup.invRev L₁) (FreeGroup.invRev L₂)

{α : Type u}
{L₁ L₂ : List (α × Bool)}
(h : FreeAddGroup.Red.Step L₁ L₂)

FreeAddGroup.Red.Step (FreeAddGroup.negRev L₁) (FreeAddGroup.negRev L₂)


/-- Special case of `zeta_eq_tsum_one_div_nat_cpow` when the argument is in `ℕ`, so the power
function can be expressed using naïve `pow` rather than `cpow`. -/
theorem zeta_nat_eq_tsum_of_gt_one {k : ℕ} (hk : 1 < k) :
    riemannZeta k = ∑' n : ℕ, 1 / (n : ℂ) ^ k


/-- These are `SlashInvariantForm`'s that are holomorphic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm Γ k where
  holo' : MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (toSlashInvariantForm : ℍ → ℂ)
  bdd_at_infty' : ∀ A : SL(2, ℤ), IsBoundedAtImInfty (toSlashInvariantForm ∣[k] A)

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(self : ModularForm Γ k)
(A : SL(2, ℤ))

UpperHalfPlane.IsBoundedAtImInfty (SlashAction.map ℂ k A ⇑self.toSlashInvariantForm)


/-- A family of additive subgroups on a ring `A` is a subgroups basis if it satisfies some
axioms ensuring there is a topology on `A` which is compatible with the ring structure and
admits this family as a basis of neighborhoods of zero. -/
structure RingSubgroupsBasis {A ι : Type*} [Ring A] (B : ι → AddSubgroup A) : Prop where
  /-- Condition for `B` to be a filter basis on `A`. -/
  inter : ∀ i j, ∃ k, B k ≤ B i ⊓ B j
  /-- For each set `B` in the submodule basis on `A`, there is another basis element `B'` such
   that the set-theoretic product `B' * B'` is in `B`. -/
  mul : ∀ i, ∃ j, (B j : Set A) * B j ⊆ B i
  /-- For any element `x : A` and any set `B` in the submodule basis on `A`,
    there is another basis element `B'` such that `B' * x` is in `B`. -/
  leftMul : ∀ x : A, ∀ i, ∃ j, (B j : Set A) ⊆ (x * ·) ⁻¹' B i
  /-- For any element `x : A` and any set `B` in the submodule basis on `A`,
    there is another basis element `B'` such that `x * B'` is in `B`. -/
  rightMul : ∀ x : A, ∀ i, ∃ j, (B j : Set A) ⊆ (· * x) ⁻¹' B i

{A : Type u_1}
{ι : Type u_2}
[Ring A]
{B : ι → AddSubgroup A}
(self : RingSubgroupsBasis B)
(x : A)
(i : ι)

∃ j, ↑(B j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(B i)


@[simp]
theorem mk_eq_zero {g : R[X]} : mk f g = 0 ↔ f ∣ g


theorem nonempty_of_nonempty_subtype [Nonempty (↥s)] : s.Nonempty


/-- If `S` is finite and `IsCyclotomicExtension S K A`, then `finiteDimensional K A`. -/
theorem finiteDimensional (C : Type z) [Finite S] [CommRing C] [Algebra K C] [IsDomain C]
    [IsCyclotomicExtension S K C] : FiniteDimensional K C

(S : Set ℕ+)
(K : Type w)
[Field K]
(C : Type z)
[Finite ↑S]
[CommRing C]
[Algebra K C]
[IsDomain C]
[IsCyclotomicExtension S K C]


@[simp]
theorem coe_mk (f : ℕ → R) (hf) : @DFunLike.coe (ArithmeticFunction R) _ _ _
    (ZeroHom.mk f hf) = f

{R : Type u_1}
[Zero R]
(f : ℕ → R)
(hf : f 0 = 0)


theorem identity_N₂ :
    (𝟙 (N₂ : Karoubi (SimplicialObject C) ⥤ _) ◫ N₂Γ₂.inv) ≫
    (Functor.associator _ _ _).inv ≫ Γ₂N₂.natTrans ◫ 𝟙 (@N₂ C _ _) = 𝟙 N₂

(𝟙 AlgebraicTopology.DoldKan.N₂ ◫ AlgebraicTopology.DoldKan.N₂Γ₂.inv) ≫
    (AlgebraicTopology.DoldKan.N₂.associator AlgebraicTopology.DoldKan.Γ₂ AlgebraicTopology.DoldKan.N₂).inv ≫
      AlgebraicTopology.DoldKan.Γ₂N₂.natTrans ◫ 𝟙 AlgebraicTopology.DoldKan.N₂ =
  𝟙 AlgebraicTopology.DoldKan.N₂


theorem discr_smul (a : R) : (a • Q).discr = a ^ Fintype.card n * Q.discr

{R : Type u_3}
{n : Type w}
[Fintype n]
[CommRing R]
[DecidableEq n]
[Invertible 2]
{Q : QuadraticMap R (n → R) R}
(a : R)


/-- **Shrinking lemma**. A point-finite open cover of a closed subset of a normal space can be
"shrunk" to a new closed cover so that each new closed set is contained in the corresponding
original open set. See also `exists_subset_iUnion_closure_subset` for a stronger statement. -/
theorem exists_subset_iUnion_closed_subset (hs : IsClosed s) (uo : ∀ i, IsOpen (u i))
    (uf : ∀ x ∈ s, { i | x ∈ u i }.Finite) (us : s ⊆ ⋃ i, u i) :
    ∃ v : ι → Set X, s ⊆ iUnion v ∧ (∀ i, IsClosed (v i)) ∧ ∀ i, v i ⊆ u i

{ι : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
[NormalSpace X]
{u : ι → Set X}
{s : Set X}
(hs : IsClosed s)
(uo : ∀ (i : ι), IsOpen (u i))
(uf : ∀ x ∈ s, {i | x ∈ u i}.Finite)
(us : s ⊆ ⋃ i, u i)

∃ v, s ⊆ Set.iUnion v ∧ (∀ (i : ι), IsClosed (v i)) ∧ ∀ (i : ι), v i ⊆ u i


/-- The submonoid generated by an element of a monoid equals the set of natural number powers of
    the element. -/
theorem mem_closure_singleton {x y : M} : y ∈ closure ({x} : Set M) ↔ ∃ n : ℕ, x ^ n = y

y ∈ Submonoid.closure {x} ↔ ∃ n, x ^ n = y


@[simp]
theorem lift_eq_one {a : Cardinal.{v}} : lift.{u} a = 1 ↔ a = 1


@[simp]
theorem nmul_one (a : Ordinal) : a ⨳ 1 = a


@[simp]
theorem ringHom_eval₂_intCastRingHom {R S : Type*} [Ring R] [Ring S] (p : ℤ[X]) (f : R →+* S)
    (r : R) : f (eval₂ (Int.castRingHom R) r p) = eval₂ (Int.castRingHom S) (f r) p

{R : Type u_3}
{S : Type u_4}
[Ring R]
[Ring S]
(p : ℤ[X])
(f : R →+* S)
(r : R)

f (Polynomial.eval₂ (Int.castRingHom R) r p) = Polynomial.eval₂ (Int.castRingHom S) (f r) p


theorem prod_eq_of_fintype {α : Type u} [h : Fintype α] (f : α → Cardinal.{v}) :
    prod f = Cardinal.lift.{u} (∏ i, f i)

Cardinal.prod f = Cardinal.lift.{u, v} (∏ i : α, f i)


@[to_additive] theorem openEmbedding_mk : OpenEmbedding (@mk M)


theorem DifferentiableWithinAt.finset_prod (hd : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (f i) s x) :
    DifferentiableWithinAt 𝕜 (∏ i ∈ u, f i ·) s x

{f : ι → 𝕜 → 𝔸'}

DifferentiableWithinAt 𝕜 (fun x => ∏ i ∈ u, f i x) s x


@[ext]
theorem ext' {s t : Multiset α} : (∀ a, count a s = count a t) → s = t

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

(∀ (a : α), Multiset.count a s = Multiset.count a t) → s = t


protected theorem Perm.rfl {l : List α} : l ~ l


theorem single_eq_set_indicator : ⇑(single a b) = Set.indicator {a} fun _ => b

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a : α}
{b : M}

⇑(Finsupp.single a b) = {a}.indicator fun x => b


/-- The equivalence between isomorphisms in `CompactlyGenerated` and homeomorphisms
of topological spaces. -/
@[simps]
def isoEquivHomeo {X Y : CompactlyGenerated.{u, w}} : (X ≅ Y) ≃ (X ≃ₜ Y)

{X Y : CompactlyGenerated}
(f : ↑X.toTop ≃ₜ ↑Y.toTop)

CompactlyGenerated.isoEquivHomeo.symm f = CompactlyGenerated.isoOfHomeo f


/-- Given a monoid homomorphism `f` from `M` to `P`, the kernel of `f` is the unique congruence
    relation on `M` whose induced map from the quotient of `M` to `P` is injective. -/
@[to_additive "Given an `AddMonoid` homomorphism `f` from `M` to `P`, the kernel of `f`
is the unique additive congruence relation on `M` whose induced map from the quotient of `M`
to `P` is injective."]
theorem ker_eq_lift_of_injective (H : c ≤ ker f) (h : Injective (c.lift f H)) : ker f = c

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
(c : Con M)
(f : M →* P)
(H : c ≤ Con.ker f)
(h : Function.Injective ⇑(c.lift f H))


theorem extend_eq_top {s : α} (h : ¬P s) : extend m s = ∞

{α : Type u_1}
{P : α → Prop}
(m : (s : α) → P s → ℝ≥0∞)
{s : α}
(h : ¬P s)


@[to_additive]
theorem Function.Injective.multipliable_iff {g : γ → β} (hg : Injective g)
    (hf : ∀ x ∉ Set.range g, f x = 1) : Multipliable (f ∘ g) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{g : γ → β}
(hg : Function.Injective g)
(hf : ∀ x ∉ Set.range g, f x = 0)


theorem isOpen_resolventSet (a : A) : IsOpen (ρ a)

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)


@[to_additive]
theorem mem_mul {x : α} : x ∈ s * t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x

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


lemma zpow_add_one₀ (ha : a ≠ 0) : ∀ n : ℤ, a ^ (n + 1) = a ^ n * a

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(ha : a ≠ 0)
(n : ℤ)


/-- Two holors are equal if all their slices are equal. -/
theorem slice_eq (x : Holor α (d :: ds)) (y : Holor α (d :: ds)) (h : slice x = slice y) : x = y

{α : Type}
{d : ℕ}
{ds : List ℕ}
(x y : Holor α (d :: ds))
(h : x.slice = y.slice)


theorem mem_closure_iff_comap_neBot :
    x ∈ closure s ↔ NeBot (comap ((↑) : s → X) (𝓝 x))

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

x ∈ closure s ↔ (Filter.comap Subtype.val (𝓝 x)).NeBot


theorem frequently_filterAt_iff {x : α} {P : Set α → Prop} :
    (∃ᶠ a in v.filterAt x, P a) ↔ ∀ ε > (0 : ℝ), ∃ a ∈ v.setsAt x, a ⊆ closedBall x ε ∧ P a

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(v : VitaliFamily μ)
{x : α}
{P : Set α → Prop}

(∃ᶠ (a : Set α) in v.filterAt x, P a) ↔ ∀ ε > 0, ∃ a ∈ v.setsAt x, a ⊆ Metric.closedBall x ε ∧ P a


/-- A variant of `Finset.mul_prod_erase` with the multiplication swapped. -/
@[to_additive "A variant of `Finset.add_sum_erase` with the addition swapped."]
theorem prod_erase_mul [DecidableEq α] (s : Finset α) (f : α → β) {a : α} (h : a ∈ s) :
    (∏ x ∈ s.erase a, f x) * f a = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
(s : Finset α)
(f : α → β)
{a : α}
(h : a ∈ s)

∑ x ∈ s.erase a, f x + f a = ∑ x ∈ s, f x


lemma IsSemisimple.maxGenEigenspace_eq_eigenspace
    (hf : f.IsSemisimple) (μ : R) :
    f.maxGenEigenspace μ = f.eigenspace μ

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
(hf : f.IsSemisimple)
(μ : R)


@[simp, reassoc]
theorem lift_fac (H' : Set.range g.1.base ⊆ Set.range f.1.base) : lift f g H' ≫ f = g

{X Y Z : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base)

AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.lift f g H' ≫ f = g


@[to_additive (attr := simp)] lemma op_toSubmonoid (H : Subgroup G) :
    H.op.toSubmonoid = H.toSubmonoid.op

{G : Type u_2}
[Group G]
(H : Subgroup G)


theorem eLpNormEssSup_const_smul_le (c : 𝕜) (f : α → F) :
    eLpNormEssSup (c • f) μ ≤ ‖c‖₊ • eLpNormEssSup f μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[MulActionWithZero 𝕜 F]
[BoundedSMul 𝕜 F]
(c : 𝕜)
(f : α → F)

MeasureTheory.eLpNormEssSup (c • f) μ ≤ ‖c‖₊ • MeasureTheory.eLpNormEssSup f μ


theorem jacobiSymNat.qr₃_mod (a b ab : ℕ) (r : ℤ) (ha : a % 4 = 3) (hb : b % 4 = 3)
    (hab : b % a = ab) (hr : jacobiSymNat ab a = r) : jacobiSymNat a b = -r

(hr : Mathlib.Meta.NormNum.jacobiSymNat ab a = r)

Mathlib.Meta.NormNum.jacobiSymNat a b = -r


@[simp]
theorem iSup_neBot {f : ι → Filter α} : (⨆ i, f i).NeBot ↔ ∃ i, (f i).NeBot

{α : Type u}
{ι : Sort x}
{f : ι → Filter α}


theorem hasStrictFDerivAt_log_real {x : ℂ} (h : x ∈ slitPlane) :
    HasStrictFDerivAt log (x⁻¹ • (1 : ℂ →L[ℝ] ℂ)) x

HasStrictFDerivAt Complex.log (x⁻¹ • 1) x


theorem inftyValuedFqt.def {x : RatFunc Fq} :
    @Valued.v (RatFunc Fq) _ _ _ (inftyValuedFqt Fq) x = inftyValuationDef Fq x

(Fq : Type)
[Field Fq]
[DecidableEq (RatFunc Fq)]
{x : RatFunc Fq}

Valued.v x = FunctionField.inftyValuationDef Fq x


@[to_additive]
theorem inv_closure : ∀ s : Set G, (closure s)⁻¹ = closure s⁻¹

{G : Type w}
[TopologicalSpace G]
[InvolutiveNeg G]
[ContinuousNeg G]
(s : Set G)


@[to_additive]
theorem lift.range_le {s : Subgroup β} (H : Set.range f ⊆ s) : (lift f).range ≤ s

{α : Type u}
{β : Type v}
[AddGroup β]
{f : α → β}
{s : AddSubgroup β}
(H : Set.range f ⊆ ↑s)


/-- An equality version of this lemma is `iUnion_iInter_of_monotone` in `Data.Set.Finite`. -/
theorem iUnion_iInter_subset {s : ι → ι' → Set α} : (⋃ j, ⋂ i, s i j) ⊆ ⋂ i, ⋃ j, s i j

{α : Type u_1}
{ι : Sort u_4}
{ι' : Sort u_5}
{s : ι → ι' → Set α}


theorem EqOn.injOn_iff (H : EqOn f₁ f₂ s) : InjOn f₁ s ↔ InjOn f₂ s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f₁ f₂ : α → β}
(H : Set.EqOn f₁ f₂ s)


@[simp] theorem if_true {_ : Decidable True} (t e : α) : ite True t e = t

∀ {x : Decidable True} (t e : α), (if True then t else e) = t


@[simp]
theorem add_modEq_left : n + a ≡ a [ZMOD n]


(α : Type u)
[OmegaCompletePartialOrder α]


/-- The composition of morphisms of squares. -/
@[simps]
def comp {sq₁ sq₂ sq₃ : Square C} (f : Hom sq₁ sq₂) (g : Hom sq₂ sq₃) : Hom sq₁ sq₃

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{sq₁ sq₂ sq₃ : CategoryTheory.Square C}
(f : sq₁.Hom sq₂)
(g : sq₂.Hom sq₃)

(f.comp g).τ₂ = CategoryTheory.CategoryStruct.comp f.τ₂ g.τ₂


@[simp, norm_cast]
lemma ofENat_inj {m n : ℕ∞} : (m : Cardinal) = n ↔ m = n


/-- In a locally finite preorder, `≤` is the transitive closure of `⩿`. -/
lemma le_iff_transGen_wcovBy [Preorder α] [LocallyFiniteOrder α] {x y : α} :
    x ≤ y ↔ TransGen (· ⩿ ·) x y

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{x y : α}

x ≤ y ↔ Relation.TransGen (fun x x_1 => x ⩿ x_1) x y


theorem Continuous.matrix_conjTranspose [Star R] [ContinuousStar R] {A : X → Matrix m n R}
    (hA : Continuous A) : Continuous fun x => (A x)ᴴ

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Star R]
[ContinuousStar R]
{A : X → Matrix m n R}
(hA : Continuous A)


theorem norm_def : ‖f‖ = sInf { c | 0 ≤ (c : ℝ) ∧ ∀ m, ‖f m‖ ≤ c * ∏ i, ‖m i‖ }

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

‖f‖ = sInf {c | 0 ≤ c ∧ ∀ (m : (i : ι) → E i), ‖f m‖ ≤ c * ∏ i : ι, ‖m i‖}


theorem cancel_factors_le {α} [LinearOrderedField α] {a b ad bd a' b' gcd : α}
    (ha : ad * a = a') (hb : bd * b = b') (had : 0 < ad) (hbd : 0 < bd) (hgcd : 0 < gcd) :
    (a ≤ b) = (1 / gcd * (bd * a') ≤ 1 / gcd * (ad * b'))

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


@[simp]
theorem DifferentiableAt.sinh (hc : DifferentiableAt ℝ f x) :
    DifferentiableAt ℝ (fun x => Real.sinh (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)


{P : Type u_1}
[Preorder P]
(IF : Order.Ideal.PrimePair P)


theorem le_untop_iff {a : α} {b : WithTop α} (h : b ≠ ⊤) :
    a ≤ untop b h ↔ (a : WithTop α) ≤ b

{α : Type u_1}
[LE α]
{a : α}
{b : WithTop α}
(h : b ≠ ⊤)


theorem pwFilter_sublist [DecidableRel (α := α) R] : ∀ l : List α, pwFilter R l <+ l

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


@[simps!]
instance : MonoidalCategoryStruct (Dial C)


theorem filterMap_filterMap (f : α → Option β) (g : β → Option γ) (l : List α) :
    filterMap g (filterMap f l) = filterMap (fun x => (f x).bind g) l

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

List.filterMap g (List.filterMap f l) = List.filterMap (fun x => (f x).bind g) l


theorem exists_conts_b_of_den {B : K} (nth_denom_eq : g.dens n = B) :
    ∃ conts, g.conts n = conts ∧ conts.b = B

{K : Type u_1}
{g : GenContFract K}
{n : ℕ}
[DivisionRing K]
{B : K}
(nth_denom_eq : g.dens n = B)


@[to_additive (attr := simp)]
theorem image2_mul : image2 (· * ·) s t = s * t

Set.image2 (fun x x_1 => x + x_1) s t = s + t


@[simp]
theorem dickson_two_zero : ∀ n : ℕ, dickson 2 (0 : R) n = X ^ n

Polynomial.dickson 2 0 n = Polynomial.X ^ n


/-- General fencing theorem for continuous functions with an estimate on the norm of the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `‖f a‖ ≤ B a`;
* `f` has right derivative `f'` at every point of `[a, b)`;
* `B` has derivative `B'` everywhere on `ℝ`;
* the norm of `f'` is strictly less than `B'` whenever `‖f x‖ = B x`.

Then `‖f x‖ ≤ B x` everywhere on `[a, b]`. We use one-sided derivatives in the assumptions
to make this theorem work for piecewise differentiable functions.
-/
theorem image_norm_le_of_norm_deriv_right_lt_deriv_boundary {f' : ℝ → E}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    {B B' : ℝ → ℝ} (ha : ‖f a‖ ≤ B a) (hB : ∀ x, HasDerivAt B (B' x) x)
    (bound : ∀ x ∈ Ico a b, ‖f x‖ = B x → ‖f' x‖ < B' x) : ∀ ⦃x⦄, x ∈ Icc a b → ‖f x‖ ≤ B x

(hf' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

(bound : ∀ x ∈ Set.Ico a b, ‖f x‖ = B x → ‖f' x‖ < B' x)


theorem isNat_zpow_neg {α : Type*} [DivisionSemiring α] {a : α} {b : ℤ} {nb ne : ℕ}
    (pb : IsInt b (Int.negOfNat nb)) (pe' : IsNat (a ^ nb)⁻¹ ne) :
    IsNat (a ^ b) ne

(pb : Mathlib.Meta.NormNum.IsInt b (Int.negOfNat nb))

(pe' : Mathlib.Meta.NormNum.IsNat (a ^ nb)⁻¹ ne)


theorem Wbtw.left_mem_affineSpan_of_right_ne {x y z : P} (h : Wbtw R x y z) (hne : z ≠ y) :
    x ∈ line[R, z, y]

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(h : Wbtw R x y z)
(hne : z ≠ y)


theorem HasSum.mul_right (a₂) (hf : HasSum f a₁) : HasSum (fun i ↦ f i * a₂) (a₁ * a₂)

{ι : Type u_1}
{α : Type u_4}
[NonUnitalNonAssocSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a₁ : α}
(a₂ : α)
(hf : HasSum f a₁)


lemma ValuationRing.cond {A : Type u} [CommRing A] [IsDomain A] [ValuationRing A] (a b : A) :
    ∃ c : A, a * c = b ∨ b * c = a


lemma normEDS_odd (m : ℕ) : normEDS b c d (2 * (m + 2) + 1) =
    normEDS b c d (m + 4) * normEDS b c d (m + 2) ^ 3 -
      normEDS b c d (m + 1) * normEDS b c d (m + 3) ^ 3

{R : Type u}
[CommRing R]
(b c d : R)
(m : ℕ)

normEDS b c d (2 * (↑m + 2) + 1) =
  normEDS b c d (↑m + 4) * normEDS b c d (↑m + 2) ^ 3 - normEDS b c d (↑m + 1) * normEDS b c d (↑m + 3) ^ 3


theorem argmin_mem : ∀ {l : List α} {m : α}, m ∈ argmin f l → m ∈ l

{α : Type u_1}
{β : Type u_2}
[Preorder β]
[DecidableRel fun x x_1 => x < x_1]
{f : α → β}
{l : List α}
{m : α}


theorem Icc_subset_Icc_union_Ioc : Icc a c ⊆ Icc a b ∪ Ioc b c

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


/-- Technical lemma which will give us differentiability of Hurwitz zeta at `s = 0`. -/
lemma differentiableAt_update_of_residue
    {Λ : ℂ → ℂ} (hf : ∀ (s : ℂ) (_ : s ≠ 0) (_ : s ≠ 1), DifferentiableAt ℂ Λ s)
    {L : ℂ} (h_lim : Tendsto (fun s ↦ s * Λ s) (𝓝[≠] 0) (𝓝 L)) (s : ℂ) (hs' : s ≠ 1) :
    DifferentiableAt ℂ (Function.update (fun s ↦ Λ s / Gammaℝ s) 0 (L / 2)) s

(hf : ∀ (s : ℂ), s ≠ 0 → s ≠ 1 → DifferentiableAt ℂ Λ s)

(h_lim : Filter.Tendsto (fun s => s * Λ s) (𝓝[≠] 0) (𝓝 L))

DifferentiableAt ℂ (Function.update (fun s => Λ s / s.Gammaℝ) 0 (L / 2)) s


theorem eventually_le_nhds (hab : a < b) : ∀ᶠ x in 𝓝 a, x ≤ b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b : α}
(hab : a < b)


theorem lift_uniq (H' : Set.range g.1.base ⊆ Set.range f.1.base) (l : Y ⟶ X) (hl : l ≫ f = g) :
    l = lift f g H'

{X Y Z : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base)

l = AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.lift f g H'


@[simp]
theorem mem_prod {r : R} {s : S} : (⟨r, s⟩ : R × S) ∈ prod I J ↔ r ∈ I ∧ s ∈ J

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(I : Ideal R)
(J : Ideal S)
{r : R}
{s : S}


@[aesop safe apply (rule_sets := [SetLike])]
theorem smul_mem [Monoid R] [DistribMulAction R A] [StarModule R A] (r : R) {x : A}
    (h : x ∈ skewAdjoint A) : r • x ∈ skewAdjoint A

{R : Type u_1}
{A : Type u_2}
[Star R]
[TrivialStar R]
[AddCommGroup A]
[StarAddMonoid A]
[Monoid R]
[DistribMulAction R A]
[StarModule R A]
(r : R)
{x : A}
(h : x ∈ skewAdjoint A)


lemma two_mul_div_two_of_even : Even n → 2 * (n / 2) = n


theorem prod_dvd_iff {u v : PrimeMultiset} : u.prod ∣ v.prod ↔ u ≤ v


theorem ucs_bot_one : (⊥ : LieSubmodule R L M).ucs 1 = LieModule.maxTrivSubmodule R L M

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

LieSubmodule.ucs 1 ⊥ = LieModule.maxTrivSubmodule R L M


theorem apply_mk_symm (e : Pretrivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : F) :
    e ⟨b, e.symm b y⟩ = (b, y)

(e : Pretrivialization F Bundle.TotalSpace.proj)

↑e { proj := b, snd := e.symm b y } = (b, y)


@[simp]
theorem subsingleton_empty : (∅ : Set α).Subsingleton


theorem getLsb_concat (x : BitVec w) (b : Bool) (i : Nat) :
    (concat x b).getLsb i = if i = 0 then b else x.getLsb (i - 1)

{w : Nat}
(x : BitVec w)
(b : Bool)
(i : Nat)

(x.concat b).getLsb i = if i = 0 then b else x.getLsb (i - 1)


theorem gal_X_sub_C_isSolvable (x : F) : IsSolvable (X - C x).Gal

IsSolvable (Polynomial.X - Polynomial.C x).Gal


theorem mk_mem_graph_iff {a : α} {m : M} {f : α →₀ M} : (a, m) ∈ f.graph ↔ f a = m ∧ m ≠ 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a : α}
{m : M}
{f : α →₀ M}


@[simp]
theorem degree_zero : degree (0 : R[X]) = ⊥


theorem eq_of_degree_sub_lt_of_eval_index_eq (hvs : Set.InjOn v s)
    (degree_fg_lt : (f - g).degree < s.card) (eval_fg : ∀ i ∈ s, f.eval (v i) = g.eval (v i)) :
    f = g

(degree_fg_lt : (f - g).degree < ↑s.card)

(eval_fg : ∀ i ∈ s, Polynomial.eval (v i) f = Polynomial.eval (v i) g)


/-- Restrict the codomain of a continuous alternating map to a submodule. -/
@[simps!]
def codRestrict (f : M [⋀^ι]→L[R] N) (p : Submodule R N) (h : ∀ v, f v ∈ p) : M [⋀^ι]→L[R] p

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
(p : Submodule R N)
(h : ∀ (v : ι → M), f v ∈ p)
(v : (i : ι) → (fun x => M) i)


lemma self_intCast_mul : Commute a (n * a : α)


theorem Basis.eq_exchange_of_diff_eq_singleton (hI : M.Basis I X) (hJ : M.Basis J X)
    (hIJ : I \ J = {e}) : ∃ f ∈ J \ I, J = insert f I \ {e}

{α : Type u_1}
{M : Matroid α}
{I X J : Set α}
{e : α}
(hI : M.Basis I X)
(hJ : M.Basis J X)
(hIJ : I \ J = {e})


@[simp, norm_cast]
theorem coe_inj : (φ : MvPowerSeries σ R) = ψ ↔ φ = ψ

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
{φ ψ : MvPolynomial σ R}

↑φ = ↑ψ ↔ φ = ψ


@[reassoc (attr := simp)]
theorem isoRestrict_hom_ofRestrict : (isoRestrict f).hom ≫ Y.ofRestrict _ = f

{X Y : AlgebraicGeometry.SheafedSpace C}

[H : AlgebraicGeometry.SheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.SheafedSpace.IsOpenImmersion.isoRestrict f).hom ≫ Y.ofRestrict ⋯ = f


/-- If `f : β → α` sends any two distinct points to points at distance at least `ε > 0`, then
`f` is a uniform embedding with respect to the discrete uniformity on `β`. -/
theorem uniformEmbedding_bot_of_pairwise_le_dist {β : Type*} {ε : ℝ} (hε : 0 < ε) {f : β → α}
    (hf : Pairwise fun x y => ε ≤ dist (f x) (f y)) :
    @UniformEmbedding _ _ ⊥ (by infer_instance) f


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

LatticeHom.dual.symm (LatticeHom.id αᵒᵈ) = LatticeHom.id α


protected theorem dfun {ι : Type u} {α : ι → Type v} {β : ι → Type w} [∀ i, Preorder (α i)]
    [∀ i, Preorder (β i)] (l : ∀ i, α i → β i) (u : ∀ i, β i → α i)
    (gc : ∀ i, GaloisConnection (l i) (u i)) :
    GaloisConnection (fun (a : ∀ i, α i) i => l i (a i)) fun b i => u i (b i)

(gc : ∀ (i : ι), GaloisConnection (l i) (u i))

GaloisConnection (fun a i => l i (a i)) fun b i => u i (b i)


theorem le_rpow_one_add_norm_iff_norm_le {r t : ℝ} (hr : 0 < r) (ht : 0 < t) (x : E) :
    t ≤ (1 + ‖x‖) ^ (-r) ↔ ‖x‖ ≤ t ^ (-r⁻¹) - 1

{E : Type u_1}
[NormedAddCommGroup E]
{r t : ℝ}
(hr : 0 < r)
(ht : 0 < t)
(x : E)


theorem KaehlerDifferential.kerTotal_mkQ_single_algebraMap (x y) : (y𝖣algebraMap R S x) = 0

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]
(x : R)
(y : S)

(KaehlerDifferential.kerTotal R S).mkQ (Finsupp.single ((algebraMap R S) x) y) = 0


lemma monovaryOn_inv₀ (hf : ∀ i ∈ s, 0 < f i) (hg : ∀ i ∈ s, 0 < g i) :
    MonovaryOn f⁻¹ g⁻¹ s ↔ MonovaryOn f g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hf : ∀ i ∈ s, 0 < f i)
(hg : ∀ i ∈ s, 0 < g i)


/-- `MulHomClass F M N` states that `F` is a type of multiplication-preserving homomorphisms.

You should declare an instance of this typeclass when you extend `MulHom`.
-/
@[to_additive]
class MulHomClass (F : Type*) (M N : outParam Type*) [Mul M] [Mul N] [FunLike F M N] : Prop where
  /-- The proposition that the function preserves multiplication -/
  map_mul : ∀ (f : F) (x y : M), f (x * y) = f x * f y

{F : Type u_10}
{M : outParam (Type u_11)}
{N : outParam (Type u_12)}
[Mul M]
[Mul N]
[FunLike F M N]
[self : MulHomClass F M N]
(f : F)
(x y : M)


theorem lt_def {p q : ℚ≥0} : p < q ↔ p.num * q.den < q.num * p.den


theorem setToSimpleFunc_mono_left' (T T' : Set α → E →L[ℝ] G'')
    (hTT' : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, T s x ≤ T' s x) (f : α →ₛ E)
    (hf : Integrable f μ) : setToSimpleFunc T f ≤ setToSimpleFunc T' f

(hTT' : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : E), (T s) x ≤ (T' s) x)

MeasureTheory.SimpleFunc.setToSimpleFunc T f ≤ MeasureTheory.SimpleFunc.setToSimpleFunc T' f


lemma add_mod_eq_add_mod_right (c : ℕ) (H : a % d = b % d) : (a + c) % d = (b + c) % d


@[to_additive]
theorem op_iSup (S : ι → Submonoid M) : (iSup S).op = ⨆ i, (S i).op

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


theorem mk_pow (a : α) (n : ℕ) : Associates.mk (a ^ n) = Associates.mk a ^ n

{α : Type u_1}
[CommMonoid α]
(a : α)
(n : ℕ)


@[simp]
theorem single_eq_of_ne (h : a ≠ a') : (single a b : α →₀ M) a' = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a a' : α}
{b : M}
(h : a ≠ a')


theorem DifferentiableOn.inv (hf : DifferentiableOn 𝕜 h S) (hz : ∀ x ∈ S, h x ≠ 0) :
    DifferentiableOn 𝕜 (fun x => (h x)⁻¹) S

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{h : E → 𝕜}
{S : Set E}
(hf : DifferentiableOn 𝕜 h S)
(hz : ∀ x ∈ S, h x ≠ 0)


@[simp]
theorem bot_coe : ((⊥ : Submodule R M) : Set M) = {0}

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]


theorem dist_lt_iff_dist_coe_center_lt :
    dist z w < r ↔ dist (z : ℂ) (w.center r) < w.im * Real.sinh r

dist z w < r ↔ dist ↑z ↑(w.center r) < w.im * Real.sinh r


@[csimp] theorem erase_eq_eraseTR : @List.erase = @eraseTR


theorem unbounded_inter_ge [LinearOrder α] (a : α) :
    Unbounded (· > ·) (s ∩ { b | b ≤ a }) ↔ Unbounded (· > ·) s

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

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


theorem derivWithin_fderivWithin :
    smulRight (1 : 𝕜 →L[𝕜] 𝕜) (derivWithin f s x) = fderivWithin 𝕜 f s x

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

ContinuousLinearMap.smulRight 1 (derivWithin f s x) = fderivWithin 𝕜 f s x


@[reassoc (attr := simp)]
theorem homotopyEquiv_inv_ι {X : C} (I J : InjectiveResolution X) :
    J.ι ≫ (homotopyEquiv I J).inv = I.ι

(I J : CategoryTheory.InjectiveResolution X)


theorem add_ne_top : a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤

a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤


@[to_additive (attr := fun_prop, measurability)]
theorem Measurable.const_mul [MeasurableMul M] (hf : Measurable f) (c : M) :
    Measurable fun x => c * f x

{M : Type u_2}
{α : Type u_3}
[MeasurableSpace M]
[Mul M]
{m : MeasurableSpace α}
{f : α → M}
[MeasurableMul M]
(hf : Measurable f)
(c : M)


@[to_additive]
theorem Finset.prod_fin_eq_prod_range [CommMonoid β] {n : ℕ} (c : Fin n → β) :
    ∏ i, c i = ∏ i ∈ Finset.range n, if h : i < n then c ⟨i, h⟩ else 1

{β : Type u_2}
[CommMonoid β]
{n : ℕ}
(c : Fin n → β)

∏ i : Fin n, c i = ∏ i ∈ Finset.range n, if h : i < n then c ⟨i, h⟩ else 1


theorem minpoly_dvd_charpoly {K : Type u} {M : Type v} [Field K] [AddCommGroup M] [Module K M]
    [FiniteDimensional K M] (f : M →ₗ[K] M) : minpoly K f ∣ f.charpoly


theorem frequently_ae_iff {p : α → Prop} : (∃ᵐ a ∂μ, p a) ↔ μ { a | p a } ≠ 0

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