lemma homEquiv_trans (f : L₁.obj X ⟶ L₁.obj Y) :
    homEquiv W L₂ L₃ (homEquiv W L₁ L₂ f) = homEquiv W L₁ L₃ f

(CategoryTheory.Localization.homEquiv W L₂ L₃) ((CategoryTheory.Localization.homEquiv W L₁ L₂) f) =
  (CategoryTheory.Localization.homEquiv W L₁ L₃) f


@[to_additive (attr := simp)]
theorem singleton_div : {a} / t = (· / ·) a '' t

{α : Type u_2}
[Sub α]
{t : Set α}
{a : α}


theorem compl_singleton (a : α) : ({a} : Finset α)ᶜ = univ.erase a

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(a : α)


protected theorem Adj.symm {G' : Subgraph G} {u v : V} (h : G'.Adj u v) : G'.Adj v u

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{u v : V}
(h : G'.Adj u v)


theorem IsAtomic.isPrenex {φ : L.BoundedFormula α n} (h : IsAtomic φ) : IsPrenex φ

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α n}
(h : φ.IsAtomic)


/-- An open set belongs to its own set neighborhoods filter. -/
theorem IsOpen.mem_nhdsSet_self (ho : IsOpen s) : s ∈ 𝓝ˢ s

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


@[ext]
theorem ext {S T : NonUnitalStarSubalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
{S T : NonUnitalStarSubalgebra R A}
(h : ∀ (x : A), x ∈ S ↔ x ∈ T)


/-- The function `x ↦ x⁻¹` tends to `+∞` on the right of `0`. -/
theorem tendsto_inv_zero_atTop : Tendsto (fun x : 𝕜 => x⁻¹) (𝓝[>] (0 : 𝕜)) atTop

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]

Filter.Tendsto (fun x => x⁻¹) (𝓝[>] 0) Filter.atTop


theorem exists_lt_norm_lt {r₁ r₂ : ℝ} (h₀ : 0 ≤ r₁) (h : r₁ < r₂) : ∃ x : α, r₁ < ‖x‖ ∧ ‖x‖ < r₂

(α : Type u_1)
[DenselyNormedField α]
{r₁ r₂ : ℝ}
(h₀ : 0 ≤ r₁)
(h : r₁ < r₂)

∃ x, r₁ < ‖x‖ ∧ ‖x‖ < r₂


/-- Any costructured arrow factors through a universal arrow. -/
@[reassoc (attr := simp)]
theorem fac (h : IsUniversal f) (g : CostructuredArrow S T) :
    S.map (h.lift g) ≫ f.hom = g.hom

{f : CategoryTheory.CostructuredArrow S T}

(g : CategoryTheory.CostructuredArrow S T)

CategoryTheory.CategoryStruct.comp (S.map (h.lift g)) f.hom = g.hom


theorem disjoint_cylinder_iff [Nonempty (∀ i, α i)] {s t : Finset ι} {S : Set (∀ i : s, α i)}
    {T : Set (∀ i : t, α i)} [DecidableEq ι] :
    Disjoint (cylinder s S) (cylinder t T) ↔
      Disjoint
        ((fun f : ∀ i : (s ∪ t : Finset ι), α i
          ↦ fun j : s ↦ f ⟨j, Finset.mem_union_left t j.prop⟩) ⁻¹' S)
        ((fun f ↦ fun j : t ↦ f ⟨j, Finset.mem_union_right s j.prop⟩) ⁻¹' T)

{ι : Type u_1}
{α : ι → Type u_2}
[Nonempty ((i : ι) → α i)]
{s t : Finset ι}
{S : Set ((i : { x // x ∈ s }) → α ↑i)}
{T : Set ((i : { x // x ∈ t }) → α ↑i)}
[DecidableEq ι]

Disjoint (MeasureTheory.cylinder s S) (MeasureTheory.cylinder t T) ↔
  Disjoint ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' S) ((fun f j => f ⟨↑j, ⋯⟩) ⁻¹' T)


theorem equivProdDFinsupp_smul [Monoid γ] [∀ i, AddMonoid (α i)] [∀ i, DistribMulAction γ (α i)]
    (r : γ) (f : Π₀ i, α i) : equivProdDFinsupp (r • f) = r • equivProdDFinsupp f

[(i : Option ι) → DistribMulAction γ (α i)]

DFinsupp.equivProdDFinsupp (r • f) = r • DFinsupp.equivProdDFinsupp f


@[to_additive (attr := simp)]
lemma stabilizer_op_subgroup (s : Subgroup G) : stabilizer Gᵐᵒᵖ (s : Set G) = s.op

{G : Type u_1}
[AddGroup G]
(s : AddSubgroup G)


@[simp]
theorem Iio_disjoint_Ici (h : a ≤ b) : Disjoint (Iio a) (Ici b)

{α : Type v}
[Preorder α]
{a b : α}
(h : a ≤ b)


theorem gramSchmidtNormed_unit_length' {f : ι → E} {n : ι} (hn : gramSchmidtNormed 𝕜 f n ≠ 0) :
    ‖gramSchmidtNormed 𝕜 f n‖ = 1

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
{f : ι → E}
{n : ι}
(hn : gramSchmidtNormed 𝕜 f n ≠ 0)


@[simp]
theorem mem_support_iff {p : MvPolynomial σ R} {m : σ →₀ ℕ} : m ∈ p.support ↔ p.coeff m ≠ 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p : MvPolynomial σ R}
{m : σ →₀ ℕ}

m ∈ p.support ↔ MvPolynomial.coeff m p ≠ 0


@[simp]
theorem mem_bind (q : Semiquot α) (f : α → Semiquot β) (b : β) :
    b ∈ bind q f ↔ ∃ a ∈ q, b ∈ f a

{α : Type u_1}
{β : Type u_2}
(q : Semiquot α)
(f : α → Semiquot β)
(b : β)


theorem finrank [StrongRankCondition R] (pb : PowerBasis R S) :
    FiniteDimensional.finrank R S = pb.dim

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
[StrongRankCondition R]
(pb : PowerBasis R S)


@[reassoc]
lemma tensor_comp {X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C} (f₁ : X₁ ⟶ X₂) (f₂ : X₂ ⟶ X₃)
    (g₁ : Y₁ ⟶ Y₂) (g₂ : Y₂ ⟶ Y₃) [HasTensor X₁ Y₁] [HasTensor X₂ Y₂] [HasTensor X₃ Y₃] :
    tensorHom (f₁ ≫ f₂) (g₁ ≫ g₂) = tensorHom f₁ g₁ ≫ tensorHom f₂ g₂

{X₁ X₂ X₃ Y₁ Y₂ Y₃ : CategoryTheory.GradedObject I C}

CategoryTheory.GradedObject.Monoidal.tensorHom (CategoryTheory.CategoryStruct.comp f₁ f₂)
    (CategoryTheory.CategoryStruct.comp g₁ g₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.Monoidal.tensorHom f₁ g₁)
    (CategoryTheory.GradedObject.Monoidal.tensorHom f₂ g₂)


theorem cg_iff_countable [Countable (Σl, L.Functions l)] : CG L M ↔ Countable M

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]
[Countable ((l : ℕ) × L.Functions l)]

FirstOrder.Language.Structure.CG L M ↔ Countable M


/-- A measure `μ` has temperate growth if there is an `n : ℕ` such that `(1 + ‖x‖) ^ (- n)` is
`μ`-integrable. -/
class _root_.MeasureTheory.Measure.HasTemperateGrowth (μ : Measure D) : Prop :=
  exists_integrable : ∃ (n : ℕ), Integrable (fun x ↦ (1 + ‖x‖) ^ (- (n : ℝ))) μ

{D : Type u_3}
[NormedAddCommGroup D]
[MeasurableSpace D]
{μ : MeasureTheory.Measure D}
[self : μ.HasTemperateGrowth]

∃ n, MeasureTheory.Integrable (fun x => (1 + ‖x‖) ^ (-↑n)) μ


@[to_additive]
theorem exists_list_of_mem_closure {s : Set M} {x : M} (hx : x ∈ closure s) :
    ∃ l : List M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x

{M : Type u_1}
[AddMonoid M]
{s : Set M}
{x : M}
(hx : x ∈ AddSubmonoid.closure s)


/-- For a finite subset `s` of `M ⊗[R] N`, there are finitely generated
submodules `M'` and `N'` of `M` and `N`, respectively, such that `s` is contained in the image
of `M' ⊗[R] N'` in `M ⊗[R] N`. -/
theorem exists_finite_submodule_of_finite (s : Set (M ⊗[R] N)) (hs : s.Finite) :
    ∃ (M' : Submodule R M) (N' : Submodule R N), Module.Finite R M' ∧ Module.Finite R N' ∧
      s ⊆ LinearMap.range (mapIncl M' N')

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(s : Set (M ⊗[R] N))
(hs : s.Finite)

∃ M' N', Module.Finite R ↥M' ∧ Module.Finite R ↥N' ∧ s ⊆ ↑(LinearMap.range (TensorProduct.mapIncl M' N'))


@[to_additive]
theorem const_le_one_of_le_one (ha : a ≤ 1) : const β a ≤ 1

{α : Type u_3}
(β : Type u_4)
[One α]
[Preorder α]
{a : α}
(ha : a ≤ 1)


theorem vadd_def [VAdd M α] (g : p) (m : α) : g +ᵥ m = (g : M) +ᵥ m

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
{p : Submodule R M}
{α : Type u_1}
[VAdd M α]
(g : ↥p)
(m : α)


lemma nsmul_sup' {α'} [LinearOrderedAddCommMonoid β] {s : Finset α'}
    (hs : s.Nonempty) (f : α' → β) (n : ℕ) :
    s.sup' hs (fun a => n • f a) = n • s.sup' hs f

{β : Type u_3}
{α' : Type u_7}
[LinearOrderedAddCommMonoid β]
{s : Finset α'}
(hs : s.Nonempty)
(f : α' → β)
(n : ℕ)

(s.sup' hs fun a => n • f a) = n • s.sup' hs f


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


theorem minimalPeriod_eq_one_iff_isFixedPt : minimalPeriod f x = 1 ↔ IsFixedPt f x

Function.minimalPeriod f x = 1 ↔ Function.IsFixedPt f x


/-- Swaps the pointed elements of a bipointed type. `Prod.swap` as a functor. -/
@[simps]
def swap : Bipointed ⥤ Bipointed

∀ {X Y : Bipointed} (f : X ⟶ Y) (a : X.X), (Bipointed.swap.map f).toFun a = f.toFun a


theorem periodicOrbit_eq_nil_of_not_periodic_pt (h : x ∉ periodicPts f) :
    periodicOrbit f x = Cycle.nil

{α : Type u_1}
{f : α → α}
{x : α}
(h : x ∉ Function.periodicPts f)


/-- The measure of a closed ball can be expressed in terms of the measure of the closed unit ball.
Use instead `addHaar_closedBall`, which uses the measure of the open unit ball as a standard
form. -/
theorem addHaar_closedBall' (x : E) {r : ℝ} (hr : 0 ≤ r) :
    μ (closedBall x r) = ENNReal.ofReal (r ^ finrank ℝ E) * μ (closedBall 0 1)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(x : E)
{r : ℝ}
(hr : 0 ≤ r)

μ (Metric.closedBall x r) = ENNReal.ofReal (r ^ FiniteDimensional.finrank ℝ E) * μ (Metric.closedBall 0 1)


lemma ofENat_injective : Injective ofENat


@[simp]
theorem relEmbedding_apply (r : α → α → Prop) (p a) : Subrel.relEmbedding r p a = a.1

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


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

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


theorem comp_assoc (f₃₄ : P3 →ᵃ[k] P4) (f₂₃ : P2 →ᵃ[k] P3) (f₁₂ : P1 →ᵃ[k] P2) :
    (f₃₄.comp f₂₃).comp f₁₂ = f₃₄.comp (f₂₃.comp f₁₂)

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
{V3 : Type u_6}
{P3 : Type u_7}
{V4 : Type u_8}
{P4 : Type u_9}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
[AddCommGroup V3]
[Module k V3]
[AffineSpace V3 P3]
[AddCommGroup V4]
[Module k V4]
[AffineSpace V4 P4]
(f₃₄ : P3 →ᵃ[k] P4)
(f₂₃ : P2 →ᵃ[k] P3)
(f₁₂ : P1 →ᵃ[k] P2)


/-- A functor to the category of monoid objects can be translated as a monoid object
in the functor category. -/
@[simps]
def inverseObj (F : C ⥤ Mon_ D) : Mon_ (C ⥤ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(F : C ⥤ Mon_ D)
(X : C)

(CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.inverseObj F).one.app X = (F.obj X).one


@[norm_cast]
theorem zero_lt_coe [Zero α] [LT α] (a : α) : (0 : WithTop α) < a ↔ 0 < a


@[simp]
theorem quot_add (x y) :
    (by exact Quot.mk Setoid.r (add x y) : ColimitType.{w} F) =
      -- Porting note: force Lean to treat `ColimitType F` no as `Quot _`
      (by exact Quot.mk Setoid.r x) + (by exact Quot.mk Setoid.r y)

(x y : AddCommGrp.Colimits.Prequotient F)

Quot.mk Setoid.r (x.add y) = Quot.mk Setoid.r x + Quot.mk Setoid.r y


/-- Converting a bundled algebra to a monoid object in `ModuleCat R`.
-/
@[simps]
def inverseObj (A : AlgebraCat.{u} R) : Mon_ (ModuleCat.{u} R)

{R : Type u}
[CommRing R]
(A : AlgebraCat R)

(ModuleCat.MonModuleEquivalenceAlgebra.inverseObj A).one = Algebra.linearMap R ↑A


lemma descSet_univ : descSet hc (@Set.univ lc.pt) = Set.univ

(hc : CategoryTheory.Limits.IsColimit c)

(lc : CategoryTheory.Limits.Cocone (K.comp CategoryTheory.uliftFunctor.{v, u}))

CategoryTheory.Limits.Types.descSet hc Set.univ = Set.univ


theorem emod_add_cancel_right {m n k : Int} (i) : (m + i) % n = (k + i) % n ↔ m % n = k % n


theorem coe_inf_of_nonempty {s : Finset β} (h : s.Nonempty) (f : β → α) :
    (↑(s.inf f) : WithTop α) = s.inf ((↑) ∘ f)

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderTop α]
{s : Finset β}
(h : s.Nonempty)
(f : β → α)


@[simp]
theorem mk_le_mk {S S' : Subring K} (h h') : (⟨S, h⟩ : Subfield K) ≤ (⟨S', h'⟩ : Subfield K) ↔
    S ≤ S'

(h' : ∀ x ∈ S'.carrier, x⁻¹ ∈ S'.carrier)

{ toSubring := S, inv_mem' := h } ≤ { toSubring := S', inv_mem' := h' } ↔ S ≤ S'


@[simp]
theorem clog_one_right (b : ℕ) : clog b 1 = 0


lemma cyclesMap'_eq : cyclesMap' φ h₁ h₂ = γ.φK

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

CategoryTheory.ShortComplex.cyclesMap' φ h₁ h₂ = γ.φK


theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : 𝕜 → 𝕜'}
{c' : 𝕜'}
(hc : HasDerivWithinAt c c' s x)
(hf : HasDerivWithinAt f f' s x)


@[simp] theorem ncard_empty (α : Type*) : (∅ : Set α).ncard = 0


/-- in a `T1Space`, atoms of `TopologicalSpace.Closeds α` are precisely the
`TopologicalSpace.Closeds.singleton`s. -/
theorem Closeds.isAtom_iff [T1Space α] {s : Closeds α} :
    IsAtom s ↔ ∃ x, s = Closeds.singleton x

{α : Type u_2}
[TopologicalSpace α]
[T1Space α]
{s : TopologicalSpace.Closeds α}

IsAtom s ↔ ∃ x, s = TopologicalSpace.Closeds.singleton x


/-- Build an isomorphism in the category `BialgebraCat R` from a
`BialgEquiv`. -/
@[simps]
def toBialgebraCatIso (e : X ≃ₐc[R] Y) : BialgebraCat.of R X ≅ BialgebraCat.of R Y

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


@[simp]
lemma factorizationLCMLeft_zero_left : factorizationLCMLeft 0 b = 1


@[simp]
theorem not_isField_of_subsingleton (R : Type u) [Semiring R] [Subsingleton R] : ¬IsField R


@[trans]
theorem trans {s₁ s₂ s₃ : CompositionSeries X} (h₁ : Equivalent s₁ s₂) (h₂ : Equivalent s₂ s₃) :
    Equivalent s₁ s₃

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
{s₁ s₂ s₃ : CompositionSeries X}
(h₁ : s₁.Equivalent s₂)
(h₂ : s₂.Equivalent s₃)


/-- Transport dependent functions through an equivalence of the base space.

This is `Equiv.piCongrLeft'` as a `LinearEquiv`. -/
@[simps (config := { simpRhs := true })]
def piCongrLeft' (e : ι ≃ ι') : ((i' : ι) → φ i') ≃ₗ[R] (i : ι') → φ <| e.symm i

(R : Type u)
{ι : Type x}
{ι' : Type x'}
[Semiring R]
(φ : ι → Type u_1)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(e : ι ≃ ι')

∀ (a : (a : ι) → φ a) (b : ι'), (LinearEquiv.piCongrLeft' R φ e) a b = a (e.symm b)


@[simp] theorem gcd_eq_zero (xs : IntList) : xs.gcd = 0 ↔ ∀ x, x ∈ xs → x = 0

xs.gcd = 0 ↔ ∀ (x : Int), x ∈ xs → x = 0


@[simp]
theorem ofList_append (l l' : List α) : ofList (l ++ l') = append (ofList l) (ofList l')


/-- Multiplication by a nonzero element `a` on the left
as a `DilationEquiv` of a normed division ring. -/
@[simps!]
def DilationEquiv.mulLeft (a : α) (ha : a ≠ 0) : α ≃ᵈ α

{α : Type u_1}
[NormedDivisionRing α]
(a : α)
(ha : a ≠ 0)
(x : α)


@[to_additive (attr := simp)]
theorem mul_down [Mul α] : (x * y).down = x.down * y.down

{α : Type u}
{x y : ULift.{v, u} α}
[Add α]


theorem norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) :
    algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x

(K : Type u_4)
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
[IsGalois K L]
(x : L)

(algebraMap K L) ((Algebra.norm K) x) = ∏ σ : L ≃ₐ[K] L, σ x


/-- Constructor for `Small α` from an explicit witness type and equivalence.
-/
theorem Small.mk' {α : Type v} {S : Type w} (e : α ≃ S) : Small.{w} α


@[simp]
theorem deriv_arcsin : deriv arcsin = fun x => 1 / √(1 - x ^ 2)

deriv Real.arcsin = fun x => 1 / √(1 - x ^ 2)


theorem dist_birkhoffAverage_apply_birkhoffAverage (f : α → α) (g : α → E) (n : ℕ) (x : α) :
    dist (birkhoffAverage 𝕜 f g n (f x)) (birkhoffAverage 𝕜 f g n x) =
      dist (g (f^[n] x)) (g x) / n

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
(𝕜 : Type u_3)
[RCLike 𝕜]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(f : α → α)
(g : α → E)
(n : ℕ)
(x : α)

dist (birkhoffAverage 𝕜 f g n (f x)) (birkhoffAverage 𝕜 f g n x) = dist (g (f^[n] x)) (g x) / ↑n


theorem TendstoUniformlyOn.congr_right {g : α → β} (hf : TendstoUniformlyOn F f p s)
    (hfg : EqOn f g s) : TendstoUniformlyOn F g p s

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
{g : α → β}
(hf : TendstoUniformlyOn F f p s)
(hfg : Set.EqOn f g s)


/-- The image of a connected component in a totally disconnected space is a singleton. -/
@[simp]
theorem Continuous.image_connectedComponent_eq_singleton {β : Type*} [TopologicalSpace β]
    [TotallyDisconnectedSpace β] {f : α → β} (h : Continuous f) (a : α) :
    f '' connectedComponent a = {f a}

{α : Type u}
[TopologicalSpace α]
{β : Type u_3}
[TopologicalSpace β]
[TotallyDisconnectedSpace β]
{f : α → β}
(h : Continuous f)
(a : α)


theorem torsionBy_eq_span_singleton {R : Type w} [CommRing R] (a b : R) (ha : a ∈ R⁰) :
    torsionBy R (R ⧸ R ∙ a * b) a = R ∙ mk (R ∙ a * b) b

Submodule.torsionBy R (R ⧸ Submodule.span R {a * b}) a =
  Submodule.span R {(Ideal.Quotient.mk (Submodule.span R {a * b})) b}


/-- The map operation for `Part` just maps the value and maintains the same domain. -/
@[simps]
def map (f : α → β) (o : Part α) : Part β

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


theorem restrict_union' (h : Disjoint s t) (hs : MeasurableSet s) :
    μ.restrict (s ∪ t) = μ.restrict s + μ.restrict t

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


/-- Intersection of an indexed family of sets `s : ι → Set α` is equal to the intersection of the
intersections of finite subfamilies. This version works for `ι : Sort*`. See also
`iInter_eq_iInter_finset` for a version that assumes `ι : Type*` but avoids `PLift`s in the right
hand side. -/
theorem iInter_eq_iInter_finset' (s : ι' → Set α) :
    ⋂ i, s i = ⋂ t : Finset (PLift ι'), ⋂ i ∈ t, s (PLift.down i)

{α : Type u_2}
{ι' : Sort u_7}
(s : ι' → Set α)


theorem volume_image_subtype_coe {s : Set α} (hs : MeasurableSet s) (t : Set s) :
    volume ((↑) '' t : Set α) = volume t

{α : Type u_2}
[MeasureTheory.MeasureSpace α]
{s : Set α}
(hs : MeasurableSet s)
(t : Set ↑s)

MeasureTheory.volume (Subtype.val '' t) = MeasureTheory.volume t


@[simp]
theorem prod_map_snd : (prod p q).map (snd R M M₂) = q

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(p : Submodule R M)
(q : Submodule R M₂)

Submodule.map (LinearMap.snd R M M₂) (p.prod q) = q


theorem prod_injective : Function.Injective (prod : NormalWord d → PushoutI φ)

{d : Monoid.PushoutI.NormalWord.Transversal φ}


lemma IsNilpotent.charpoly_eq_X_pow_finrank (φ : Module.End R M) (h : IsNilpotent φ) :
    φ.charpoly = X ^ finrank R M

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[IsDomain R]
[AddCommGroup M]
[Module R M]
[Module.Finite R M]
[Module.Free R M]
(φ : Module.End R M)
(h : IsNilpotent φ)

LinearMap.charpoly φ = Polynomial.X ^ FiniteDimensional.finrank R M


theorem eq_rec_compose {α β φ : Sort u} :
    ∀ (p₁ : β = φ) (p₂ : α = β) (a : α),
      (Eq.recOn p₁ (Eq.recOn p₂ a : β) : φ) = Eq.recOn (Eq.trans p₂ p₁) a

{α β φ : Sort u}
(p₁ : β = φ)
(p₂ : α = β)
(a : α)

Eq.recOn p₁ (Eq.recOn p₂ a) = Eq.recOn ⋯ a


@[simp]
theorem abs_cpow_real (x : ℂ) (y : ℝ) : abs (x ^ (y : ℂ)) = Complex.abs x ^ y

Complex.abs (x ^ ↑y) = Complex.abs x ^ y


theorem mem_coe {x : L} : x ∈ (L' : Set L) ↔ x ∈ L'

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


theorem Ici_sSup (s : Set α) : Ici (sSup s) = ⋂ a ∈ s, Ici a

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


theorem StrictConvexOn.comp_strictConcaveOn (hg : StrictConvexOn 𝕜 (f '' s) g)
    (hf : StrictConcaveOn 𝕜 s f) (hg' : StrictAntiOn g (f '' s)) (hf' : s.InjOn f) :
    StrictConvexOn 𝕜 s (g ∘ f)

{𝕜 : Type u_1}
{E : Type u_2}
{α : Type u_4}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 α]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
{g : β → α}
(hg : StrictConvexOn 𝕜 (f '' s) g)
(hf : StrictConcaveOn 𝕜 s f)
(hg' : StrictAntiOn g (f '' s))
(hf' : Set.InjOn f s)


@[simp]
theorem supp_inj {C D : G.ConnectedComponent} : C.supp = D.supp ↔ C = D

{V : Type u}
{G : SimpleGraph V}
{C D : G.ConnectedComponent}


/-- The left fraction in the opposite category corresponding to a right fraction. -/
@[simps]
def RightFraction.op {X Y : C} (φ : W.RightFraction X Y) :
    W.op.LeftFraction (Opposite.op Y) (Opposite.op X)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(φ : W.RightFraction X Y)


theorem frequently_imp_distrib_right {f : Filter α} [NeBot f] {p : α → Prop} {q : Prop} :
    (∃ᶠ x in f, p x → q) ↔ (∀ᶠ x in f, p x) → q

{α : Type u}
{f : Filter α}
[f.NeBot]
{p : α → Prop}
{q : Prop}

(∃ᶠ (x : α) in f, p x → q) ↔ (∀ᶠ (x : α) in f, p x) → q


theorem coeff_update_ne (p : R[X]) {n : ℕ} (a : R) {i : ℕ} (h : i ≠ n) :
    (p.update n a).coeff i = p.coeff i

{R : Type u}
[Semiring R]
(p : R[X])
{n : ℕ}
(a : R)
{i : ℕ}
(h : i ≠ n)


/-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat

∀ {a b c : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑a ↑b) (G : CategoryTheory.Functor ↑b ↑c),
  CategoryTheory.WithTerminal.pseudofunctor.mapComp F G = CategoryTheory.WithTerminal.mapComp F G


/-- A typeclass mixin saying that scalar multiplication and Lie bracket are left commutative. -/
class SMulBracketCommClass (S L α : Type*) [SMul S α] [LieRing L] [AddCommGroup α]
    [LieRingModule L α] : Prop where
  /-- `•` and `⁅⬝, ⬝⁆`  are left commutative -/
  smul_bracket_comm : ∀ (s : S) (l : L) (a : α), s • ⁅l, a⁆ = ⁅l, s • a⁆

[self : LieDerivation.SMulBracketCommClass S L α]


@[to_additive]
theorem mk'_spec' (x) (y : S) : f.toMap y * f.mk' x y = f.toMap x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(x : M)
(y : ↥S)


lemma Shatters.mono_right (h : t ⊆ s) (hs : 𝒜.Shatters s) : 𝒜.Shatters t

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s t : Finset α}
(h : t ⊆ s)
(hs : 𝒜.Shatters s)


theorem eventually_countable_ball {ι : Type*} {S : Set ι} (hS : S.Countable)
    {p : α → ∀ i ∈ S, Prop} :
    (∀ᶠ x in l, ∀ i hi, p x i hi) ↔ ∀ i hi, ∀ᶠ x in l, p x i hi

{α : Type u_2}
{l : Filter α}
[CountableInterFilter l]
{ι : Type u_4}
{S : Set ι}
(hS : S.Countable)
{p : α → (i : ι) → i ∈ S → Prop}

(∀ᶠ (x : α) in l, ∀ (i : ι) (hi : i ∈ S), p x i hi) ↔ ∀ (i : ι) (hi : i ∈ S), ∀ᶠ (x : α) in l, p x i hi


theorem eLpNorm'_smul_le_mul_eLpNorm' {p q r : ℝ} {f : α → E} (hf : AEStronglyMeasurable f μ)
    {φ : α → 𝕜} (hφ : AEStronglyMeasurable φ μ) (hp0_lt : 0 < p) (hpq : p < q)
    (hpqr : 1 / p = 1 / q + 1 / r) : eLpNorm' (φ • f) p μ ≤ eLpNorm' φ q μ * eLpNorm' f r μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hφ : MeasureTheory.AEStronglyMeasurable φ μ)

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


theorem DifferentiableWithinAt.sinh (hf : DifferentiableWithinAt ℝ f s x) :
    DifferentiableWithinAt ℝ (fun x => Real.sinh (f x)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt ℝ f s x)


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

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


theorem ncard_diff_singleton_le (s : Set α) (a : α) : (s \ {a}).ncard ≤ s.ncard


@[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_target : (s.partialHomeomorphSubtypeCoe hs).target = s

{X : Type u_1}
[TopologicalSpace X]
(s : TopologicalSpace.Opens X)
(hs : Nonempty ↥s)

(s.partialHomeomorphSubtypeCoe hs).target = ↑s


/-- For `c, d ∈ ℝ` with `1 ≤ d ^ 2`, we have `r1 z ≤ |c * z + d| ^ 2`.  -/
lemma r1_aux_bound (c : ℝ) {d : ℝ} (hd : 1 ≤ d ^ 2) :
    r1 z ≤ (c * z.re + d) ^ 2 + (c * z.im) ^ 2

EisensteinSeries.r1 z ≤ (c * z.re + d) ^ 2 + (c * z.im) ^ 2


/-- **Fundamental theorem of calculus-2**, on semi-infinite intervals `(-∞, a)`.
When a function has a limit `m` at `-∞`, and its derivative is integrable, then the
integral of the derivative on `(-∞, a)` is `f a - m`. Version assuming differentiability
on `(-∞, a)` and continuity at `a⁻`.

Note that such a function always has a limit at minus infinity,
see `tendsto_limUnder_of_hasDerivAt_of_integrableOn_Iic`. -/
theorem integral_Iic_of_hasDerivAt_of_tendsto (hcont : ContinuousWithinAt f (Iic a) a)
    (hderiv : ∀ x ∈ Iio a, HasDerivAt f (f' x) x) (f'int : IntegrableOn f' (Iic a))
    (hf : Tendsto f atBot (𝓝 m)) : ∫ x in Iic a, f' x = f a - m

(hcont : ContinuousWithinAt f (Set.Iic a) a)

(hderiv : ∀ x ∈ Set.Iio a, HasDerivAt f (f' x) x)

(f'int : MeasureTheory.IntegrableOn f' (Set.Iic a) MeasureTheory.volume)

(hf : Filter.Tendsto f Filter.atBot (𝓝 m))


@[simp, mfld_simps]
theorem localTrivAsPartialEquiv_symm :
    (Z.localTrivAsPartialEquiv i).symm = (Z.localTriv i).toPartialEquiv.symm

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)

(Z.localTrivAsPartialEquiv i).symm = (Z.localTriv i).symm


@[simp]
theorem charmatrix_apply_eq : charmatrix M i i = (X : R[X]) - C (M i i)

{R : Type u_1}
[CommRing R]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(i : n)

M.charmatrix i i = Polynomial.X - Polynomial.C (M i i)


lemma countablePartitionSet_mem (n : ℕ) (a : α) :
    countablePartitionSet n a ∈ countablePartition α n

[h : MeasurableSpace.CountablyGenerated α]

MeasurableSpace.countablePartitionSet n a ∈ MeasurableSpace.countablePartition α n


lemma affineSpan_subset_span {s : Set V} :
    (affineSpan k s : Set V) ⊆  Submodule.span k s

{k : Type u_1}
{V : Type u_2}
[Ring k]
[AddCommGroup V]
[Module k V]
{s : Set V}

↑(affineSpan k s) ⊆ ↑(Submodule.span k s)


@[simp]
theorem tensorUnit_X : (𝟙_ (Mon_ C)).X = 𝟙_ C

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


@[simp, norm_cast]
theorem coeFn_sum {ι : Type*} (t : Finset ι) (f : ι → M →ₛₗ[σ₁₂] M₂) :
    ⇑(∑ i ∈ t, f i) = ∑ i ∈ t, (f i : M → M₂)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{ι : Type u_10}
(t : Finset ι)
(f : ι → M →ₛₗ[σ₁₂] M₂)


protected theorem eq_zero_of_add_eq_zero_left (h : n + m = 0) : m = 0


theorem HasCompactSupport.smul_left (hf : HasCompactSupport f') : HasCompactSupport (f • f')

{α : Type u_2}
{M : Type u_7}
{R : Type u_9}
[TopologicalSpace α]
[Zero M]
[SMulZeroClass R M]
{f : α → R}
{f' : α → M}
(hf : HasCompactSupport f')


@[simp]
theorem mk_coe (f : A →⋆ₙ+* B) (h₁ h₂ h₃ h₄) :
    (⟨⟨⟨f, h₁⟩, h₂, h₃⟩, h₄⟩ : A →⋆ₙ+* B) = f

(h₁ : ∀ (x y : A), f (x * y) = f x * f y)

(h₂ : { toFun := ⇑f, map_mul' := h₁ }.toFun 0 = 0)

(h₃ :
  ∀ (x y : A),
    { toFun := ⇑f, map_mul' := h₁ }.toFun (x + y) =
      { toFun := ⇑f, map_mul' := h₁ }.toFun x + { toFun := ⇑f, map_mul' := h₁ }.toFun y)

(h₄ :
  ∀ (a : A),
    { toFun := ⇑f, map_mul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun (star a) =
      star ({ toFun := ⇑f, map_mul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun a))

{ toFun := ⇑f, map_mul' := h₁, map_zero' := h₂, map_add' := h₃, map_star' := h₄ } = f


theorem exists_lub_Iio (i : γ) : ∃ j, IsLUB (Iio i) j


theorem M.mk_eq (x y : Σ j, F.obj j)
    (h : ∃ (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k), F.map f x.2 = F.map g y.2) : M.mk F x = M.mk F y

(h : ∃ k f g, (F.map f) x.snd = (F.map g) y.snd)

ModuleCat.FilteredColimits.M.mk F x = ModuleCat.FilteredColimits.M.mk F y


/-- While in many cases `finCongr` is better than `Equiv.cast`/`cast`, sometimes we want to apply
a generic theorem about `cast`. -/
lemma _root_.finCongr_eq_equivCast (h : n = m) : finCongr h = .cast (h ▸ rfl)


theorem mul_le_mul_of_nonpos_left [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (h : b ≤ a) (hc : c ≤ 0) : c * a ≤ c * b

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

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


theorem monotone_primeCounting' : Monotone primeCounting'


/-- We say that the action of `M` on `α` has `MeasurableVAdd` if for each `c` the map `x ↦ c +ᵥ x`
is a measurable function and for each `x` the map `c ↦ c +ᵥ x` is a measurable function. -/
class MeasurableVAdd (M α : Type*) [VAdd M α] [MeasurableSpace M] [MeasurableSpace α] :
    Prop where
  measurable_const_vadd : ∀ c : M, Measurable (c +ᵥ · : α → α)
  measurable_vadd_const : ∀ x : α, Measurable (· +ᵥ x : M → α)

{M : Type u_2}
{α : Type u_3}
[VAdd M α]
[MeasurableSpace M]
[MeasurableSpace α]
[self : MeasurableVAdd M α]
(c : M)


@[to_additive (attr := simp)]
theorem toProd_apply_inr (x : N) : toProd (inr x : M ∗ N) = (1, x)

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]
(x : N)

AddMonoid.Coprod.toSum (AddMonoid.Coprod.inr x) = (0, x)


theorem measurable_of_isClosed {f : δ → γ} (hf : ∀ s, IsClosed s → MeasurableSet (f ⁻¹' s)) :
    Measurable f

(hf : ∀ (s : Set γ), IsClosed s → MeasurableSet (f ⁻¹' s))


@[simp] lemma tail_neg (a : Fin n.succ → α) : vecTail (-a) = -vecTail a

{α : Type u_1}
{n : ℕ}
[Neg α]
(a : Fin n.succ → α)


theorem Infinite.of_image (f : α → β) {s : Set α} (hs : (f '' s).Infinite) : s.Infinite

{α : Type u}
{β : Type v}
(f : α → β)
{s : Set α}
(hs : (f '' s).Infinite)


@[simp]
theorem cancel_left {g : BotHom β γ} {f₁ f₂ : BotHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Bot α]
[Bot β]
[Bot γ]
{g : BotHom β γ}
{f₁ f₂ : BotHom α β}
(hg : Function.Injective ⇑g)


theorem iInf_eq_generate (s : ι → Filter α) : iInf s = generate (⋃ i, (s i).sets)

{α : Type u}
{ι : Sort x}
(s : ι → Filter α)

iInf s = Filter.generate (⋃ i, (s i).sets)


theorem ConvolutionExistsAt.distrib_add {x : G} (hfg : ConvolutionExistsAt f g x L μ)
    (hfg' : ConvolutionExistsAt f g' x L μ) :
    (f ⋆[L, μ] (g + g')) x = (f ⋆[L, μ] g) x + (f ⋆[L, μ] g') x

(hfg : MeasureTheory.ConvolutionExistsAt f g x L μ)

(hfg' : MeasureTheory.ConvolutionExistsAt f g' x L μ)

MeasureTheory.convolution f (g + g') L μ x = MeasureTheory.convolution f g L μ x + MeasureTheory.convolution f g' L μ x


@[to_additive (attr := simp) MeasureTheory.mem_addFundamentalFrontier]
theorem mem_fundamentalFrontier :
    x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g : G, g ≠ 1 ∧ x ∈ g • s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{s : Set α}
{x : α}

x ∈ MeasureTheory.fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s


theorem abs_le_floor_nnreal_iff (z : ℤ) (c : ℝ≥0) : |z| ≤ ⌊c⌋₊ ↔ ‖z‖₊ ≤ c

|z| ≤ ↑⌊c⌋₊ ↔ ‖z‖₊ ≤ c


theorem hom_desc (h : IsUniversal f) {c : C} (η : c ⟶ f.left) :
    η = h.lift (mk <| S.map η ≫ f.hom)

{f : CategoryTheory.CostructuredArrow S T}

η = h.lift (CategoryTheory.CostructuredArrow.mk (CategoryTheory.CategoryStruct.comp (S.map η) f.hom))


/-- The `vectorSpan` of the empty set is `⊥`. -/
@[simp]
theorem vectorSpan_empty : vectorSpan k (∅ : Set P) = (⊥ : Submodule k V)

(k : Type u_1)
{V : Type u_2}
(P : Type u_3)
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]


/-- A composition of monad morphisms gives the composition of corresponding functors.
-/
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomComp {T₁ T₂ T₃ : Monad C} (f : T₁ ⟶ T₂) (g : T₂ ⟶ T₃) :
    algebraFunctorOfMonadHom (f ≫ g) ≅ algebraFunctorOfMonadHom g ⋙ algebraFunctorOfMonadHom f

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

((CategoryTheory.Monad.algebraFunctorOfMonadHomComp f g).hom.app X).f =
  (CategoryTheory.Iso.refl
      ((CategoryTheory.Monad.algebraFunctorOfMonadHom (CategoryTheory.CategoryStruct.comp f g)).obj X).A).hom


theorem innerContent_bot : μ.innerContent ⊥ = 0

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


@[simp]
theorem Ioi_top : Ioi (⊤ : α) = ∅

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


/-- Push a sieve `R` on `Y` forward along an arrow `f : Y ⟶ X`: `gf : Z ⟶ X` is in the sieve if `gf`
factors through some `g : Z ⟶ Y` which is in `R`.
-/
@[simps]
def pushforward (f : Y ⟶ X) (R : Sieve Y) : Sieve X

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

(CategoryTheory.Sieve.pushforward f R).arrows gf = ∃ g, CategoryTheory.CategoryStruct.comp g f = gf ∧ R.arrows g


@[to_additive (attr := simp, norm_cast)]
theorem coe_toSubgroup : ((U : Subgroup G) : Set G) = U

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{U : OpenSubgroup G}


theorem upperCrossingTime_stabilize' (hnm : n ≤ m) (hn : N ≤ upperCrossingTime a b f N n ω) :
    upperCrossingTime a b f N m ω = N

{f : ℕ → Ω → ℝ}

(hn : N ≤ MeasureTheory.upperCrossingTime a b f N n ω)

MeasureTheory.upperCrossingTime a b f N m ω = N


theorem omegaLimit_omegaLimit (hf : ∀ t, Tendsto (t + ·) f f) : ω f ϕ (ω f ϕ s) ⊆ ω f ϕ s

(hf : ∀ (t : τ), Filter.Tendsto (fun x => t + x) f f)

omegaLimit f ϕ.toFun (omegaLimit f ϕ.toFun s) ⊆ omegaLimit f ϕ.toFun s


theorem hom_eq_lift (g : X ⟶ widePullback _ _ arrows) :
    g = lift (g ≫ base arrows) (fun j => g ≫ π arrows j) (by aesop_cat)

[CategoryTheory.Limits.HasWidePullback B objs arrows]

(g : X ⟶ CategoryTheory.Limits.widePullback B objs arrows)

g =
  CategoryTheory.Limits.WidePullback.lift (g ≫ CategoryTheory.Limits.WidePullback.base arrows)
    (fun j => g ≫ CategoryTheory.Limits.WidePullback.π arrows j) ⋯


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


/-- `x * 1` is equivalent to `x`. -/
theorem mul_one_equiv (x : PGame) : x * 1 ≈ x


/-- For `f : α →ᵤ β`, `𝓝 f` admits the family `{g | ∀ x, (f x, g x) ∈ V}` for `V ∈ 𝓤 β` as a
filter basis. -/
protected theorem hasBasis_nhds (f) :
    (𝓝 f).HasBasis (fun V => V ∈ 𝓤 β) fun V => { g | (f, g) ∈ UniformFun.gen α β V }

(α : Type u_1)
(β : Type u_2)
[UniformSpace β]
(f : α →ᵤ β)

(𝓝 f).HasBasis (fun V => V ∈ 𝓤 β) fun V => {g | (f, g) ∈ UniformFun.gen α β V}


@[simp]
theorem tensor_μ_apply
    {A B C D : ModuleCat R} (x : A) (y : B) (z : C) (w : D) :
    tensor_μ _ (A, B) (C, D) ((x ⊗ₜ y) ⊗ₜ (z ⊗ₜ w)) = (x ⊗ₜ z) ⊗ₜ (y ⊗ₜ w)

{R : Type u}
[CommRing R]
{A B C D : ModuleCat R}
(x : ↑A)
(y : ↑B)
(z : ↑C)
(w : ↑D)

(CategoryTheory.tensor_μ (ModuleCat R) (A, B) (C, D)) ((x ⊗ₜ[R] y) ⊗ₜ[R] z ⊗ₜ[R] w) = (x ⊗ₜ[R] z) ⊗ₜ[R] y ⊗ₜ[R] w


@[simp] lemma δ_zero : δ n m (0 : Cochain F G n) = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
(n m : ℤ)


/-- `nhds` as an order embedding. -/
@[simps!]
def nhdsOrderEmbedding : PrimeSpectrum R ↪o Filter (PrimeSpectrum R)

{R : Type u}
[CommSemiring R]
(x : PrimeSpectrum R)

PrimeSpectrum.nhdsOrderEmbedding x = nhds x


@[to_additive]
theorem regular_inv_iff : μ.inv.Regular ↔ μ.Regular

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[Group G]
[TopologicalGroup G]


@[to_additive]
theorem inv_range {ι : Sort*} {f : ι → α} : (range f)⁻¹ = range fun i => (f i)⁻¹

{α : Type u_2}
[InvolutiveNeg α]
{ι : Sort u_5}
{f : ι → α}


@[simp]
theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other h) = z

{α : Type u_1}
{a : α}
{z : Sym2 α}
(h : a ∈ z)


@[simp]
theorem sumCongr_symm (e : α ≃ β) (f : γ ≃ δ) :
    (Equiv.sumCongr e f).symm = Equiv.sumCongr e.symm f.symm

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(e : α ≃ β)
(f : γ ≃ δ)

(e.sumCongr f).symm = e.symm.sumCongr f.symm


@[simp]
theorem ContinuousMultilinearMap.curry_uncurryRight
    (f : ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei <| castSucc i) (Ei (last n) →L[𝕜] G)) :
    f.uncurryRight.curryRight = f

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

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

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


/-- The continuous function from the basic open set `D(f)` in `Proj`
to the corresponding basic open set in `Spec A⁰_f`. -/
@[simps! (config := .lemmasOnly) apply_asIdeal]
def toSpec (f : A) : (Proj.T| pbo f) ⟶ Spec.T A⁰_ f

(x : ↑↑((AlgebraicGeometry.Proj.toLocallyRingedSpace 𝒜).restrict ⋯).toPresheafedSpace)

((AlgebraicGeometry.ProjIsoSpecTopComponent.toSpec 𝒜 f) x).asIdeal =
  AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.carrier x


/-- A positive multiple of a vector is in the same ray as that vector. -/
lemma sameRay_pos_smul_left (v : M) (ha : 0 < a) : SameRay R (a • v) v

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{S : Type u_5}
[OrderedCommSemiring S]
[Algebra S R]
[Module S M]
[SMulPosMono S R]
[IsScalarTower S R M]
{a : S}
(v : M)
(ha : 0 < a)


theorem abs_max_le_max_abs_abs : |max a b| ≤ max |a| |b|

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b : α}


@[simp]
theorem mem_lists_iff (s : Multiset α) (l : List α) : l ∈ lists s ↔ s = ⟦l⟧

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


@[simp]
theorem coe_mk (z : ℂ) (hz : abs z < 1) : (mk z hz : ℂ) = z


/-- Let `A` be an algebraically closed field and let `x ∈ K`, with `K/F` an algebraic extension
  of fields. Then the images of `x` by the `F`-algebra morphisms from `K` to `A` are exactly
  the roots in `A` of the minimal polynomial of `x` over `F`. -/
theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly [IsAlgClosed A] (x : K) :
    (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A

{F : Type u_1}
{K : Type u_2}
(A : Type u_3)
[Field F]
[Field K]
[Field A]
[Algebra F K]
[Algebra F A]
[Algebra.IsAlgebraic F K]
[IsAlgClosed A]
(x : K)

(Set.range fun ψ => ψ x) = (minpoly F x).rootSet A


/-- On `Game`, simp-normal inequalities should use as few negations as possible. -/
@[simp]
theorem not_lf : ∀ {x y : Game}, ¬x ⧏ y ↔ y ≤ x


@[simp]
protected theorem target : γ 1 = y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)


theorem type_equalizer_iff_unique :
    Nonempty (IsLimit (Fork.ofι _ w)) ↔ ∀ y : Y, g y = h y → ∃! x : X, f x = y

{X Y Z : Type u}
(f : X ⟶ Y)
{g h : Y ⟶ Z}
(w : f ≫ g = f ≫ h)

Nonempty (CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι f w)) ↔ ∀ (y : Y), g y = h y → ∃! x, f x = y


@[to_additive]
theorem mul_left_inj (h : IsUnit a) : b * a = c * a ↔ b = c

{M : Type u_1}
[AddMonoid M]
{a b c : M}
(h : IsAddUnit a)


lemma le_findGreatest (hmb : m ≤ n) (hm : P m) : m ≤ Nat.findGreatest P n

{m : ℕ}
{P : ℕ → Prop}
[DecidablePred P]
{n : ℕ}
(hmb : m ≤ n)
(hm : P m)


lemma injective_le_monomorphisms :
    MorphismProperty.injective C ≤ monomorphisms C

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

CategoryTheory.MorphismProperty.injective C ≤ CategoryTheory.MorphismProperty.monomorphisms C


/-- `normalClosure F K L` is a valid normal closure if `K/F` is algebraic
  and all minimal polynomials of `K/F` splits in `L/F`. -/
lemma isNormalClosure_normalClosure : IsNormalClosure F K (normalClosure F K L)

(splits : ∀ (x : K), Polynomial.Splits (algebraMap F L) (minpoly F x))

IsNormalClosure F K ↥(normalClosure F K L)


/-- The lower part of the second column of the snake diagram is exact. -/
lemma exact_C₂_down : (ShortComplex.mk S.v₁₂.τ₂ S.v₂₃.τ₂
    (by rw [← comp_τ₂, S.w₁₃, zero_τ₂])).Exact

(S : CategoryTheory.ShortComplex.SnakeInput C)

(CategoryTheory.ShortComplex.mk S.v₁₂.τ₂ S.v₂₃.τ₂ ⋯).Exact


theorem mem_iff_getElem? {a} {l : List α} : a ∈ l ↔ ∃ n : Nat, l[n]? = some a


/-- The basic open sets for the topology on ultrafilters are open. -/
theorem ultrafilter_isOpen_basic (s : Set α) : IsOpen { u : Ultrafilter α | s ∈ u }


@[to_additive]
theorem singleton_mul (a : α) : {a} * s = s.image (a * ·)

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

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


@[simp]
theorem ack_succ_zero (m : ℕ) : ack (m + 1) 0 = ack m 1


theorem IsMatching.support_eq_verts (h : M.IsMatching) : M.support = M.verts

{V : Type u_1}
{G : SimpleGraph V}
{M : G.Subgraph}
(h : M.IsMatching)


@[simp]
lemma inv_add_add_mul_eq_zero (u : (PreQuasiregular R)ˣ) :
    u⁻¹.val.val + u.val.val + u.val.val * u⁻¹.val.val = 0

{R : Type u_1}
[NonUnitalSemiring R]
(u : (PreQuasiregular R)ˣ)

(↑u⁻¹).val + (↑u).val + (↑u).val * (↑u⁻¹).val = 0


@[simp]
theorem toNNReal_eq_toNNReal_iff {r p : ℝ} (hr : 0 ≤ r) (hp : 0 ≤ p) :
    toNNReal r = toNNReal p ↔ r = p


@[to_additive (attr := measurability)]
protected theorem const_mul [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (c : β) :
    AEStronglyMeasurable (fun x => c * f x) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => c + f x) μ


theorem emod_lt_of_pos (a : Int) {b : Int} (H : 0 < b) : a % b < b


theorem mulRight_injective [NoZeroDivisors A] {x : A} (hx : x ≠ 0) :
    Function.Injective (mulRight R x)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Ring A]
[Algebra R A]
[NoZeroDivisors A]
{x : A}
(hx : x ≠ 0)

Function.Injective ⇑(LinearMap.mulRight R x)


@[to_additive neg_le]
theorem inv_le' : a⁻¹ ≤ b ↔ b⁻¹ ≤ 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]


theorem app_eq_coe (η : ApplicativeTransformation F G) : η.app = η

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
(η : ApplicativeTransformation F G)


theorem dedup_cons_of_not_mem' {a : α} {l : List α} (h : a ∉ dedup l) :
    dedup (a :: l) = a :: dedup l

{α : Type u_1}
[DecidableEq α]
{a : α}
{l : List α}
(h : a ∉ l.dedup)


theorem pi_ball [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 < r) :
    Measure.pi μ (Metric.ball x r) = ∏ i, μ i (Metric.ball (x i) r)

(μ : (i : ι) → MeasureTheory.Measure (α i))

[∀ (i : ι), MeasureTheory.SigmaFinite (μ i)]

(MeasureTheory.Measure.pi μ) (Metric.ball x r) = ∏ i : ι, (μ i) (Metric.ball (x i) r)


@[simp] lemma Module.Dual.lie_apply (f : M →ₗ[R] R) : ⁅x, f⁆ m = - f ⁅x, m⁆

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


/-- The localization of `R` at `M` as a quotient type is isomorphic to any other localization. -/
@[simps!]
noncomputable def algEquiv : Localization M ≃ₐ[R] S

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

(Localization.algEquiv M S) a = (IsLocalization.map S (RingHom.id R) ⋯) a


@[simp]
theorem evalₐ_mk (n : ℕ) (x : AdicCauchySequence I R) :
    evalₐ I n (mk I R x) = Ideal.Quotient.mk (I ^ n) (x.val n)

(x : AdicCompletion.AdicCauchySequence I R)

(AdicCompletion.evalₐ I n) ((AdicCompletion.mk I R) x) = (Ideal.Quotient.mk (I ^ n)) (↑x n)


theorem sup_mul_eq_of_coprime_left (h : I ⊔ J = ⊤) : I ⊔ J * K = I ⊔ K

{R : Type u}
[CommSemiring R]
{I J K : Ideal R}
(h : I ⊔ J = ⊤)


@[simp]
theorem mulMap_tmul (m : M) (n : N) : mulMap M N (m ⊗ₜ[R] n) = m.1 * n.1

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(M N : Submodule R S)
(m : ↥M)
(n : ↥N)


@[simp] lemma id_f₀ : Hom.f₀ (𝟙 S) = 𝟙 _

(S : CategoryTheory.ShortComplex.SnakeInput C)

(CategoryTheory.CategoryStruct.id S).f₀ = CategoryTheory.CategoryStruct.id S.L₀


@[simp] theorem eq_mp_eq_cast  (h : α = β) : Eq.mp  h = cast h


theorem isSymm_lapMatrix [AddGroupWithOne R] : (G.lapMatrix R).IsSymm

{V : Type u_1}
{R : Type u_2}
[Fintype V]
[DecidableEq V]
(G : SimpleGraph V)
[DecidableRel G.Adj]
[AddGroupWithOne R]


/-- A category `IsCofilteredOrEmpty` if
1. for every pair of objects there exists another object "to the left", and
2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
   are equal.
-/
class IsCofilteredOrEmpty : Prop where
  /-- for every pair of objects there exists another object "to the left" -/
  cone_objs : ∀ X Y : C, ∃ (W : _) (_ : W ⟶ X) (_ : W ⟶ Y), True
  /-- for every pair of parallel morphisms there exists a morphism to the left
    so the compositions are equal -/
  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g

[self : CategoryTheory.IsCofilteredOrEmpty C]

∃ W h, CategoryTheory.CategoryStruct.comp h f = CategoryTheory.CategoryStruct.comp h g


@[reassoc (attr := simp)]
lemma d₁_mapMap (i₁ : I₁) (i₂ : I₂) (i₁₂ : I₁₂) :
    K.d₁ c₁₂ i₁ i₂ i₁₂ ≫ GradedObject.mapMap (toGradedObjectMap φ) _ i₁₂ =
    (φ.f i₁).f i₂ ≫ L.d₁ c₁₂ i₁ i₂ i₁₂

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K L : HomologicalComplex₂ C c₁ c₂}
(φ : K ⟶ L)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
[L.HasTotal c₁₂]
(i₁ : I₁)
(i₂ : I₂)
(i₁₂ : I₁₂)

K.d₁ c₁₂ i₁ i₂ i₁₂ ≫ CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂) i₁₂ =
  (φ.f i₁).f i₂ ≫ L.d₁ c₁₂ i₁ i₂ i₁₂


@[simp]
theorem union_compl_self (s : Set α) : s ∪ sᶜ = univ


/-- A commutative monoid object internal to a monoidal category.
-/
structure CommMon_ extends Mon_ C where
  mul_comm : (β_ _ _).hom ≫ mul = mul := by aesop_cat

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

(β_ self.X self.X).hom ≫ self.mul = self.mul


lemma jacobiTheta₂_conj (z τ : ℂ) :
    conj (jacobiTheta₂ z τ) = jacobiTheta₂ (conj z) (-conj τ)

(starRingEnd ℂ) (jacobiTheta₂ z τ) = jacobiTheta₂ ((starRingEnd ℂ) z) (-(starRingEnd ℂ) τ)


theorem spanningCoe_le_of_le {H H' : Subgraph G} (h : H ≤ H') : H.spanningCoe ≤ H'.spanningCoe

{V : Type u}
{G : SimpleGraph V}
{H H' : G.Subgraph}
(h : H ≤ H')


theorem one_le_exp {x : ℝ} (hx : 0 ≤ x) : 1 ≤ exp x


/-- `Finsupp.erase` as an `AddMonoidHom`. -/
@[simps]
def eraseAddHom (a : α) : (α →₀ M) →+ α →₀ M

{α : Type u_1}
{M : Type u_5}
[AddZeroClass M]
(a : α)
(f : α →₀ M)

(Finsupp.eraseAddHom a) f = Finsupp.erase a f


/-- The *identity principle* for analytic functions: If two analytic functions coincide in a whole
neighborhood of a point `z₀`, then they coincide globally along a connected set.
For a one-dimensional version assuming only that the functions coincide at some points
arbitrarily close to `z₀`, see `eqOn_of_preconnected_of_frequently_eq`. -/
theorem eqOn_of_preconnected_of_eventuallyEq {f g : E → F} {U : Set E} (hf : AnalyticOn 𝕜 f U)
    (hg : AnalyticOn 𝕜 g U) (hU : IsPreconnected U) {z₀ : E} (h₀ : z₀ ∈ U) (hfg : f =ᶠ[𝓝 z₀] g) :
    EqOn f g U

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{U : Set E}
(hf : AnalyticOn 𝕜 f U)
(hg : AnalyticOn 𝕜 g U)
(hU : IsPreconnected U)
{z₀ : E}
(h₀ : z₀ ∈ U)
(hfg : f =ᶠ[𝓝 z₀] g)


protected theorem eval {α : ι → Type u} [∀ i, PseudoEMetricSpace (α i)] [Fintype ι] (i : ι) :
    LipschitzWith 1 (Function.eval i : (∀ i, α i) → α i)

{ι : Type x}
{α : ι → Type u}
[(i : ι) → PseudoEMetricSpace (α i)]
[Fintype ι]
(i : ι)


@[simp] theorem eq_not_self : ∀(b : Bool), (b = (!b)) ↔ False


/-- Two elements `x` and `y` are complements of each other if `x ⊔ y = ⊤` and `x ⊓ y = ⊥`. -/
structure IsCompl [PartialOrder α] [BoundedOrder α] (x y : α) : Prop where
  /-- If `x` and `y` are to be complementary in an order, they should be disjoint. -/
  protected disjoint : Disjoint x y
  /-- If `x` and `y` are to be complementary in an order, they should be codisjoint. -/
  protected codisjoint : Codisjoint x y

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
{x y : α}
(self : IsCompl x y)


@[to_additive (attr := simp)]
lemma stabilizer_empty : stabilizer G (∅ : Set α) = ⊤

{G : Type u_1}
{α : Type u_3}
[AddGroup G]
[AddAction G α]


@[simp]
theorem prodProdProdComm_toAddEquiv :
    (prodProdProdComm R R' S S' : _ ≃+ _) = AddEquiv.prodProdProdComm R R' S S'

(R : Type u_3)
(R' : Type u_4)
(S : Type u_5)
(S' : Type u_6)
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring R']
[NonAssocSemiring S']

↑(RingEquiv.prodProdProdComm R R' S S') = AddEquiv.prodProdProdComm R R' S S'


@[to_additive] -- Porting note (#10618): `simp` can prove this
theorem mul_mem_ball_mul_iff {c : E} : a * c ∈ ball (b * c) r ↔ a ∈ ball b r

{E : Type u_6}
[SeminormedCommGroup E]
{a b : E}
{r : ℝ}
{c : E}

a * c ∈ Metric.ball (b * c) r ↔ a ∈ Metric.ball b r


theorem map_continuous (cond : LEComap f A B) : Continuous (map f cond)

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
{A : DiscreteQuotient X}
{B : DiscreteQuotient Y}
(cond : DiscreteQuotient.LEComap f A B)

Continuous (DiscreteQuotient.map f cond)


theorem _root_.Finset.range_eq_Ico : range = Ico 0


@[simp]
theorem fst_mul [Mul R] [Add A] [Mul A] [SMul R A] (x₁ x₂ : Unitization R A) :
    (x₁ * x₂).fst = x₁.fst * x₂.fst

{R : Type u_1}
{A : Type u_2}
[Mul R]
[Add A]
[Mul A]
[SMul R A]
(x₁ x₂ : Unitization R A)


theorem PairwiseDisjoint.union (hs : s.PairwiseDisjoint f) (ht : t.PairwiseDisjoint f)
    (h : ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ t → i ≠ j → Disjoint (f i) (f j)) : (s ∪ t).PairwiseDisjoint f

(h : ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ t → i ≠ j → Disjoint (f i) (f j))


theorem comap_iInf {ι : Sort*} (f : F) (s : ι → NonUnitalSubsemiring S) :
    (comap f (iInf s) : NonUnitalSubsemiring R) = ⨅ i, comap f (s i)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
{ι : Sort u_2}
(f : F)
(s : ι → NonUnitalSubsemiring S)

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


@[simp]
theorem mem_replicate : b ∈ replicate n a ↔ n ≠ 0 ∧ b = a


theorem card_units_zmod_lt_sub_one {p : ℕ} (hp : 1 < p) [Fintype (ZMod p)ˣ] :
    Fintype.card (ZMod p)ˣ ≤ p - 1


@[simp]
theorem Proj.stalkIso'_symm_mk (x) (f) :
    (Proj.stalkIso' 𝒜 x).symm (.mk f) = (Proj.structureSheaf 𝒜).presheaf.germ
      ⟨x, mem_basicOpen_den _ x f⟩ (sectionInBasicOpen _ x f)

(f : HomogeneousLocalization.NumDenSameDeg 𝒜 x.asHomogeneousIdeal.toIdeal.primeCompl)

(AlgebraicGeometry.Proj.stalkIso' 𝒜 x).symm (HomogeneousLocalization.mk f) =
  ((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).presheaf.germ ⟨x, ⋯⟩)
    (AlgebraicGeometry.sectionInBasicOpen 𝒜 x f)


theorem val_add_val_of_le {n : ℕ} [NeZero n] {a b : ZMod n} (h : n ≤ a.val + b.val) :
    a.val + b.val = (a + b).val + n


@[to_additive]
lemma IsOfFinOrder.mem_powers_iff_mem_zpowers (hx : IsOfFinOrder x) :
    y ∈ powers x ↔ y ∈ zpowers x

{G : Type u_1}
[Group G]
{x y : G}
(hx : IsOfFinOrder x)

y ∈ Submonoid.powers x ↔ y ∈ Subgroup.zpowers x


@[simp]
theorem single_trans_single (a : α) (b : β) (c : γ) :
    (single a b).trans (single b c) = single a c

{α : Type u}
{β : Type v}
{γ : Type w}
[DecidableEq α]
[DecidableEq β]
[DecidableEq γ]
(a : α)
(b : β)
(c : γ)

(PEquiv.single a b).trans (PEquiv.single b c) = PEquiv.single a c


@[simp]
theorem natSepDegree_C_mul {x : F} (hx : x ≠ 0) :
    (C x * f).natSepDegree = f.natSepDegree

{F : Type u}
[Field F]
(f : F[X])
{x : F}
(hx : x ≠ 0)

(Polynomial.C x * f).natSepDegree = f.natSepDegree


protected theorem tsub_add_tsub_comm (hb : AddLECancellable b) (hd : AddLECancellable d)
    (hba : b ≤ a) (hdc : d ≤ c) : a - b + (c - d) = a + c - (b + d)

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


/-- Any two measures satisfying `QuotientMeasureEqMeasurePreimage` are equal. -/
@[to_additive]
lemma QuotientMeasureEqMeasurePreimage.unique
    [hasFun : HasFundamentalDomain G α ν] (μ μ' : Measure (Quotient α_mod_G))
    [QuotientMeasureEqMeasurePreimage ν μ] [QuotientMeasureEqMeasurePreimage ν μ'] :
    μ = μ'

[hasFun : MeasureTheory.HasAddFundamentalDomain G α ν]

(μ μ' : MeasureTheory.Measure (Quotient (AddAction.orbitRel G α)))


protected theorem map_smulₑ (f : A →ₑ+[φ] B) (m : M) (x : A) : f (m • x) = (φ m) • f x

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
{B : Type u_5}
[AddMonoid B]
[DistribMulAction N B]
(f : A →ₑ+[φ] B)
(m : M)
(x : A)


/-- A new right option cannot hurt Right. -/
lemma insertRight_le (x x' : PGame) : insertRight x x' ≤ x


/-- The sum of two lower semicontinuous functions is lower semicontinuous. Formulated with an
explicit continuity assumption on addition, for application to `EReal`. The unprimed version of
the lemma uses `[ContinuousAdd]`. -/
theorem LowerSemicontinuousWithinAt.add' {f g : α → γ} (hf : LowerSemicontinuousWithinAt f s x)
    (hg : LowerSemicontinuousWithinAt g s x)
    (hcont : ContinuousAt (fun p : γ × γ => p.1 + p.2) (f x, g x)) :
    LowerSemicontinuousWithinAt (fun z => f z + g z) s x

(hcont : ContinuousAt (fun p => p.1 + p.2) (f x, g x))


@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ √2 / 2 ≤ x


lemma eventually_asympBound_pos : ∀ᶠ (n : ℕ) in atTop, 0 < asympBound g a b n

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

∀ᶠ (n : ℕ) in Filter.atTop, 0 < AkraBazziRecurrence.asympBound g a b n


theorem Continuous.integrableOn_uIoc [LinearOrder X] [CompactIccSpace X] [T2Space X]
    (hf : Continuous f) : IntegrableOn f (Ι a b) μ


theorem ContDiffAt.comp_contDiffWithinAt {n} (x : E) (hg : ContDiffAt 𝕜 n g (f x))
    (hf : ContDiffWithinAt 𝕜 n f s x) : ContDiffWithinAt 𝕜 n (g ∘ f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{g : F → G}
{n : ℕ∞}
(x : E)
(hg : ContDiffAt 𝕜 n g (f x))
(hf : ContDiffWithinAt 𝕜 n f s x)


theorem nfpFamily_le {a b} : (∀ l, List.foldr f a l ≤ b) → nfpFamily.{u, v} f a ≤ b

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

(∀ (l : List ι), List.foldr f a l ≤ b) → Ordinal.nfpFamily f a ≤ b


/-- The Banach open mapping theorem: if a bounded linear map between Banach spaces is onto, then
any point has a preimage with controlled norm. -/
theorem exists_preimage_norm_le (surj : Surjective f) :
    ∃ C > 0, ∀ y, ∃ x, f x = y ∧ ‖x‖ ≤ C * ‖y‖

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
(f : E →SL[σ] F)
[CompleteSpace F]
[CompleteSpace E]
(surj : Function.Surjective ⇑f)

∃ C > 0, ∀ (y : F), ∃ x, f x = y ∧ ‖x‖ ≤ C * ‖y‖


@[simp] lemma fst_prod (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel α γ) [IsMarkovKernel η] :
    fst (κ ×ₖ η) = κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]
(η : ProbabilityTheory.Kernel α γ)
[ProbabilityTheory.IsMarkovKernel η]


theorem Submodule.topologicalClosure_minimal (s : Submodule R M) {t : Submodule R M} (h : s ≤ t)
    (ht : IsClosed (t : Set M)) : s.topologicalClosure ≤ t

{R : Type u}
{M : Type v}
[Semiring R]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M]
(s : Submodule R M)
{t : Submodule R M}
(h : s ≤ t)
(ht : IsClosed ↑t)


@[simp]
theorem leadingCoeff_pow_X_add_C (r : R) (i : ℕ) : leadingCoeff ((X + C r) ^ i) = 1

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

((Polynomial.X + Polynomial.C r) ^ i).leadingCoeff = 1


@[simp]
theorem currySum_apply (f : MultilinearMap R (fun _ : ι ⊕ ι' => M') M₂) (u : ι → M')
    (v : ι' → M') : f.currySum u v = f (Sum.elim u v)

{R : Type uR}
{ι : Type uι}
{M₂ : Type v₂}
{M' : Type v'}
[CommSemiring R]
[AddCommMonoid M']
[AddCommMonoid M₂]
[Module R M']
[Module R M₂]
{ι' : Type u_1}
(f : MultilinearMap R (fun x => M') M₂)
(u : ι → M')
(v : ι' → M')


@[simp]
theorem isTheta_zero_right : (f'' =Θ[l] fun _ ↦ (0 : F')) ↔ f'' =ᶠ[l] 0

{α : Type u_1}
{F' : Type u_7}
{E'' : Type u_9}
[SeminormedAddCommGroup F']
[NormedAddCommGroup E'']
{f'' : α → E''}
{l : Filter α}


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

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


theorem inv_right₀ (h : Commute a b) : Commute a b⁻¹

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


/-- The variables of the product of a family of polynomials
are a subset of the union of the sets of variables of each polynomial.
-/
theorem vars_prod {ι : Type*} [DecidableEq σ] {s : Finset ι} (f : ι → MvPolynomial σ R) :
    (∏ i ∈ s, f i).vars ⊆ s.biUnion fun i => (f i).vars

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


@[simp, norm_cast]
theorem coe_eq_pair {s : Finset α} {a b : α} : (s : Set α) = {a, b} ↔ s = {a, b}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}


/-- Adding an element at the beginning of a tuple and then updating it amounts to adding it
directly. -/
theorem update_snoc_last : update (snoc p x) (last n) z = snoc p z

{n : ℕ}
{α : Fin (n + 1) → Type u}
(x : α (Fin.last n))
(p : (i : Fin n) → α i.castSucc)
(z : α (Fin.last n))

Function.update (Fin.snoc p x) (Fin.last n) z = Fin.snoc p z


lemma SurjectiveOnStalks.of_comp (hg : SurjectiveOnStalks (g.comp f)) :
    SurjectiveOnStalks g

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
{T : Type u_3}
[CommRing T]
{g : S →+* T}
{f : R →+* S}
(hg : (g.comp f).SurjectiveOnStalks)


/-- If `l₁` is a sublist of `l₂` and all elements of `l₂` are greater than or equal to one, then
`l₁.prod ≤ l₂.prod`. One can prove a stronger version assuming `∀ a ∈ l₂.diff l₁, 1 ≤ a` instead
of `∀ a ∈ l₂, 1 ≤ a` but this lemma is not yet in `mathlib`. -/
@[to_additive sum_le_sum "If `l₁` is a sublist of `l₂` and all elements of `l₂` are nonnegative,
  then `l₁.sum ≤ l₂.sum`.
  One can prove a stronger version assuming `∀ a ∈ l₂.diff l₁, 0 ≤ a` instead of `∀ a ∈ l₂, 0 ≤ a`
  but this lemma is not yet in `mathlib`."]
lemma Sublist.prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l₁ l₂ : List M} (h : l₁ <+ l₂)
    (h₁ : ∀ a ∈ l₂, (1 : M) ≤ a) : l₁.prod ≤ l₂.prod

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

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


@[simp]
theorem comap_top (f : R →+* S) : (⊤ : Subsemiring S).comap f = ⊤

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


theorem Continuous.if_const (p : Prop) {f g : α → β} [Decidable p] (hf : Continuous f)
    (hg : Continuous g) : Continuous fun a => if p then f a else g a

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(p : Prop)
{f g : α → β}
[Decidable p]
(hf : Continuous f)
(hg : Continuous g)


theorem hasMFDerivAt_snd (x : M × M') :
    HasMFDerivAt (I.prod I') I' Prod.snd x
      (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))

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


lemma gaussianReal_apply_eq_integral (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :
    gaussianReal μ v s = ENNReal.ofReal (∫ x in s, gaussianPDFReal μ v x)

(ProbabilityTheory.gaussianReal μ v) s = ENNReal.ofReal (∫ (x : ℝ) in s, ProbabilityTheory.gaussianPDFReal μ v x)


@[simp]
theorem sum_monomial_eq {A : Type*} [AddCommMonoid A] {u : σ →₀ ℕ} {r : R} {b : (σ →₀ ℕ) → R → A}
    (w : b u 0 = 0) : sum (monomial u r) b = b u r

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{A : Type u_2}
[AddCommMonoid A]
{u : σ →₀ ℕ}
{r : R}
{b : (σ →₀ ℕ) → R → A}
(w : b u 0 = 0)

Finsupp.sum ((MvPolynomial.monomial u) r) b = b u r


lemma intCast_eq_intCast_mod : (a : R) = a % (p : ℤ)

(R : Type u_1)
[AddGroupWithOne R]
(p : ℕ)
[CharP R p]
{a : ℤ}


theorem continuousAt_coe {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} {x : X} :
    ContinuousAt f x ↔ ContinuousAt (f ∘ (↑)) x

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

ContinuousAt f ↑x ↔ ContinuousAt (f ∘ OnePoint.some) x


theorem isPiSystem_Ioo_mem (s t : Set α) :
    IsPiSystem { S | ∃ᵉ (l ∈ s) (u ∈ t), l < u ∧ Ioo l u = S }

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

IsPiSystem {S | ∃ l ∈ s, ∃ u ∈ t, l < u ∧ Set.Ioo l u = S}


@[to_additive]
theorem exponent_pos : 0 < exponent G ↔ ExponentExists G

0 < Monoid.exponent G ↔ Monoid.ExponentExists G


@[to_additive]
theorem finprod_def (f : α → M) [Decidable (mulSupport f).Finite] :
    ∏ᶠ i : α, f i = if h : (mulSupport f).Finite then ∏ i ∈ h.toFinset, f i else 1

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
[Decidable (Function.support f).Finite]

∑ᶠ (i : α), f i = if h : (Function.support f).Finite then ∑ i ∈ h.toFinset, f i else 0


theorem mul_def (x y : FreeAbelianGroup α) :
    x * y = lift (fun x₂ ↦ lift (fun x₁ ↦ of (x₁ * x₂)) x) y

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

x * y = (FreeAbelianGroup.lift fun x₂ => (FreeAbelianGroup.lift fun x₁ => FreeAbelianGroup.of (x₁ * x₂)) x) y


theorem map_map {g : β → γ} {f : α → β} (x : Sym2 α) : map g (map f x) = map (g ∘ f) x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{g : β → γ}
{f : α → β}
(x : Sym2 α)

Sym2.map g (Sym2.map f x) = Sym2.map (g ∘ f) x


/-- A general version of the slash action of the space of modular forms. -/
class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where
  map : β → G → α → α
  zero_slash : ∀ (k : β) (g : G), map k g 0 = 0
  slash_one : ∀ (k : β) (a : α), map k 1 a = a
  slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a)
  smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a
  add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b

{β : Type u_1}
{G : Type u_2}
{α : Type u_3}
{γ : Type u_4}
[Group G]
[AddMonoid α]
[SMul γ α]
[self : SlashAction β G α γ]
(k : β)
(g : G)
(a b : α)

(a + b) ∣[k;γ] g = a ∣[k;γ] g + b ∣[k;γ] g


@[simp]
theorem inverse_one : inverse (1 : M₀) = 1


private lemma ofTensorProduct_eq :
    ofTensorProduct I (ι → R) = (piEquivOfFintype I (ι := ι) (fun _ : ι ↦ R)).symm.toLinearMap ∘ₗ
      (TensorProduct.piScalarRight R (AdicCompletion I R) (AdicCompletion I R) ι).toLinearMap

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(ι : Type u_4)
[Fintype ι]
[DecidableEq ι]

AdicCompletion.ofTensorProduct I (ι → R) =
  ↑(AdicCompletion.piEquivOfFintype I fun x => R).symm ∘ₗ
    ↑(TensorProduct.piScalarRight R (AdicCompletion I R) (AdicCompletion I R) ι)


theorem not_lt_iff_eq_or_lt [LinearOrder α] {a b : α} : ¬a < b ↔ a = b ∨ b < a

{α : Type u_2}
[LinearOrder α]
{a b : α}


@[to_additive]
theorem one_apply [One Y] (x : X) : (1 : LocallyConstant X Y) x = 1

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[One Y]
(x : X)


@[simp]
theorem self_mem_ordConnectedComponent : x ∈ ordConnectedComponent s x ↔ x ∈ s

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


@[to_additive]
theorem comp_coprod {Q : Type*} [CommMonoid Q] (h : P →* Q) (f : M →* P) (g : N →* P) :
    h.comp (f.coprod g) = (h.comp f).coprod (h.comp g)

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[MulOneClass M]
[MulOneClass N]
[CommMonoid P]
{Q : Type u_8}
[CommMonoid Q]
(h : P →* Q)
(f : M →* P)
(g : N →* P)


theorem le_succ_iterate (k : ℕ) (x : α) : x ≤ succ^[k] x

{α : Type u_1}
[Preorder α]
[SuccOrder α]
(k : ℕ)
(x : α)


@[simp] -- Porting note (#11215): TODO: use `of`/`asHom`?
theorem mul_def (xs ys : End X) : xs * ys = ys ≫ xs

xs * ys = CategoryTheory.CategoryStruct.comp ys xs


lemma isLocallyInjective_iff_injective :
    IsLocallyInjective φ ↔ ∀ (X : Cᵒᵖ), Function.Injective (φ.val.app X)

{J : CategoryTheory.GrothendieckTopology C}

CategoryTheory.Sheaf.IsLocallyInjective φ ↔ ∀ (X : Cᵒᵖ), Function.Injective ⇑(φ.val.app X)


/-- For finite intervals, see: `intervalIntegral.integral_deriv_mul_eq_sub`. -/
theorem integral_Iic_deriv_mul_eq_sub
    (hu : ∀ x ∈ Iio a, HasDerivAt u (u' x) x) (hv : ∀ x ∈ Iio a, HasDerivAt v (v' x) x)
    (huv : IntegrableOn (u' * v + u * v') (Iic a))
    (h_zero : Tendsto (u * v) (𝓝[<] a) (𝓝 a')) (h_infty : Tendsto (u * v) atBot (𝓝 b')) :
    ∫ (x : ℝ) in Iic a, u' x * v x + u x * v' x = a' - b'

(hu : ∀ x ∈ Set.Iio a, HasDerivAt u (u' x) x)

(hv : ∀ x ∈ Set.Iio a, HasDerivAt v (v' x) x)

(huv : MeasureTheory.IntegrableOn (u' * v + u * v') (Set.Iic a) MeasureTheory.volume)

(h_zero : Filter.Tendsto (u * v) (𝓝[<] a) (𝓝 a'))

(h_infty : Filter.Tendsto (u * v) Filter.atBot (𝓝 b'))

∫ (x : ℝ) in Set.Iic a, u' x * v x + u x * v' x = a' - b'


lemma left_ne_zero_of_smul : a • b ≠ 0 → a ≠ 0

{R : Type u_1}
{M : Type u_3}
[Zero R]
[Zero M]
[SMulWithZero R M]
{a : R}
{b : M}


protected theorem congr_fun {f g : 𝓕} (h : f = g) (x : E) :
    f x = g x

{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[FunLike 𝓕 E E₂]
{f g : 𝓕}
(h : f = g)
(x : E)


@[to_additive (attr := simp)]
theorem coe_comap (K : Subgroup N) (f : G →* N) : (K.comap f : Set G) = f ⁻¹' K

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


@[simp, reassoc]
theorem pullbackRestrictIsoRestrict_hom_morphismRestrict {X Y : Scheme.{u}} (f : X ⟶ Y)
    (U : Y.Opens) : (pullbackRestrictIsoRestrict f U).hom ≫ f ∣_ U = pullback.snd _ _

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

(AlgebraicGeometry.pullbackRestrictIsoRestrict f U).hom ≫ f ∣_ U = CategoryTheory.Limits.pullback.snd f U.ι


theorem lowerBounds_u_image (gc : GaloisConnection l u) (s : Set β) :
    lowerBounds (u '' s) = l ⁻¹' lowerBounds s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
(s : Set β)


/-- Sets of subtype are compact iff the image under a coercion is. -/
theorem Subtype.isCompact_iff {p : X → Prop} {s : Set { x // p x }} :
    IsCompact s ↔ IsCompact ((↑) '' s : Set X)

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

IsCompact s ↔ IsCompact (Subtype.val '' s)


lemma lTensor.inverse_of_rightInverse_apply
    {h : P → N} (hgh : Function.RightInverse h g) (y : Q ⊗[R] N) :
    (lTensor.inverse_of_rightInverse Q hfg hgh) ((lTensor Q g) y) =
      Submodule.Quotient.mk (p := (LinearMap.range (lTensor Q f))) y

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(Q : Type u_5)
[AddCommGroup Q]
[Module R Q]
(hfg : Function.Exact ⇑f ⇑g)
{h : P → N}
(hgh : Function.RightInverse h ⇑g)
(y : TensorProduct R Q N)

(lTensor.inverse_of_rightInverse Q hfg hgh) ((LinearMap.lTensor Q g) y) = Submodule.Quotient.mk y


lemma add'_assoc (f₁ f₂ f₃ : L.obj X ⟶ L.obj Y) :
    add' W (add' W f₁ f₂) f₃ = add' W f₁ (add' W f₂ f₃)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive C]
{L : CategoryTheory.Functor C D}
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasLeftCalculusOfFractions]
{X Y : C}
(f₁ f₂ f₃ : L.obj X ⟶ L.obj Y)

CategoryTheory.Localization.Preadditive.add' W (CategoryTheory.Localization.Preadditive.add' W f₁ f₂) f₃ =
  CategoryTheory.Localization.Preadditive.add' W f₁ (CategoryTheory.Localization.Preadditive.add' W f₂ f₃)


@[simp]
theorem limsup_const {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} [NeBot f]
    (b : β) : limsup (fun _ => b) f = b

{β : Type u_2}
{α : Type u_6}
[ConditionallyCompleteLattice β]
{f : Filter α}
[f.NeBot]
(b : β)


theorem lucas_lehmer_sufficiency (p : ℕ) (w : 1 < p) : LucasLehmerTest p → (mersenne p).Prime

LucasLehmerTest p → Nat.Prime (mersenne p)


/-- The measure of a closed set is at most the integral of any function in a decreasing
approximating sequence to the indicator of the set. -/
theorem measure_le_lintegral [MeasurableSpace X] [OpensMeasurableSpace X] (μ : Measure X) (n : ℕ) :
    μ F ≤ ∫⁻ x, (hF.apprSeq n x : ℝ≥0∞) ∂μ

{X : Type u_1}
[TopologicalSpace X]
[HasOuterApproxClosed X]
{F : Set X}
(hF : IsClosed F)
[MeasurableSpace X]
[OpensMeasurableSpace X]
(μ : MeasureTheory.Measure X)
(n : ℕ)

μ F ≤ ∫⁻ (x : X), ↑((hF.apprSeq n) x) ∂μ


@[simp]
theorem eval_mul_X_pow {k : ℕ} : (p * X ^ k).eval x = p.eval x * x ^ k

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

Polynomial.eval x (p * Polynomial.X ^ k) = Polynomial.eval x p * x ^ k


@[simp]
theorem Spec.toPresheafedSpace_obj (R : CommRingCat.{u}ᵒᵖ) :
    Spec.toPresheafedSpace.obj R = (Spec.sheafedSpaceObj (unop R)).toPresheafedSpace

AlgebraicGeometry.Spec.toPresheafedSpace.obj R =
  (AlgebraicGeometry.Spec.sheafedSpaceObj (Opposite.unop R)).toPresheafedSpace


theorem norm_le_one_iff_val_nonneg (x : ℚ_[p]) : ‖x‖ ≤ 1 ↔ 0 ≤ x.valuation

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


theorem fromLocalizedModule.bij : Function.Bijective <| fromLocalizedModule S f

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

Function.Bijective ⇑(IsLocalizedModule.fromLocalizedModule S f)


@[to_additive (attr := simp) sub_nonneg]
theorem one_le_div' : 1 ≤ a / b ↔ b ≤ a

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


/-- The existence of binary biproducts implies that there is at most one preadditive structure. -/
theorem biprod.add_eq_lift_desc_id [HasBinaryBiproduct Y Y] :
    f + g = biprod.lift f g ≫ biprod.desc (𝟙 Y) (𝟙 Y)

f + g = CategoryTheory.Limits.biprod.lift f g ≫ CategoryTheory.Limits.biprod.desc (𝟙 Y) (𝟙 Y)


@[ext]
lemma ComonadHom.ext' {T₁ T₂ : Comonad C} (f g : T₁ ⟶ T₂) (h : f.app = g.app) : f = g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ T₂ : CategoryTheory.Comonad C}
(f g : T₁ ⟶ T₂)
(h : f.app = g.app)


theorem independent_def : Independent t ↔ ∀ i : ι, Disjoint (t i) (⨆ (j) (_ : j ≠ i), t j)

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{t : ι → α}

CompleteLattice.Independent t ↔ ∀ (i : ι), Disjoint (t i) (⨆ j, ⨆ (_ : j ≠ i), t j)


theorem Heap.WF.deleteMin {s : Heap α}
    (h : s.WF le n) (eq : s.deleteMin le = some (a, s')) : s'.WF le 0

{s' s : Batteries.BinomialHeap.Imp.Heap α}

(h : Batteries.BinomialHeap.Imp.Heap.WF le n s)

(eq : Batteries.BinomialHeap.Imp.Heap.deleteMin le s = some (a, s'))

Batteries.BinomialHeap.Imp.Heap.WF le 0 s'


theorem spanningCoe_induce_le (s : Set V) : (G.induce s).spanningCoe ≤ G

{V : Type u_1}
(G : SimpleGraph V)
(s : Set V)

(SimpleGraph.induce s G).spanningCoe ≤ G


@[deprecated getElem_range (since := "2024-06-12")]
theorem get_range {n} (i) (H : i < (range n).length) : get (range n) ⟨i, H⟩ = i

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


@[continuity, fun_prop]
theorem Continuous.restrictPreimage {f : X → Y} {s : Set Y} (h : Continuous f) :
    Continuous (s.restrictPreimage f)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set Y}
(h : Continuous f)


theorem continuous_mul : Continuous fun p : Completion α × Completion α => p.1 * p.2

{α : Type u_1}
[Ring α]
[UniformSpace α]
[TopologicalRing α]
[UniformAddGroup α]


lemma isoOfHom_op_inv {X Y : Cᵒᵖ} (w : X ⟶ Y) (hw : W.op w) :
    (isoOfHom L.op W.op w hw).inv = (isoOfHom L W w.unop hw).inv.op

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
(L : C ⥤ D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
{X Y : Cᵒᵖ}
(w : X ⟶ Y)
(hw : W.op w)

(CategoryTheory.Localization.isoOfHom L.op W.op w hw).inv = (CategoryTheory.Localization.isoOfHom L W w.unop hw).inv.op


/-- The neighborhood filter of a Lindelöf set is disjoint with a filter `l` with the countable
intersection property if and only if the neighborhood filter of each point of this set
is disjoint with `l`. -/
theorem IsLindelof.disjoint_nhdsSet_left {l : Filter X} [CountableInterFilter l]
    (hs : IsLindelof s) :
    Disjoint (𝓝ˢ s) l ↔ ∀ x ∈ s, Disjoint (𝓝 x) l

{X : Type u}
[TopologicalSpace X]
{s : Set X}
{l : Filter X}
[CountableInterFilter l]
(hs : IsLindelof s)


theorem forall_open_iff_discrete {X : Type*} [TopologicalSpace X] :
    (∀ s : Set X, IsOpen s) ↔ DiscreteTopology X

(∀ (s : Set X), IsOpen s) ↔ DiscreteTopology X


/-- The algebra isomorphism between multivariable polynomials in a sum of two types,
and multivariable polynomials in one of the types,
with coefficients in multivariable polynomials in the other type.
-/
@[simps!]
def sumAlgEquiv : MvPolynomial (S₁ ⊕ S₂) R ≃ₐ[R] MvPolynomial S₁ (MvPolynomial S₂ R)

(a : MvPolynomial S₁ (MvPolynomial S₂ R))

(MvPolynomial.sumAlgEquiv R S₁ S₂).symm a = (MvPolynomial.iterToSum R S₁ S₂) a


@[to_additive (attr := simp)]
theorem unbot_one : (1 : WithBot α).unbot coe_ne_bot = 1


protected theorem inner {_ : MeasurableSpace α} {μ : Measure α} {f g : α → E}
    (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    AEStronglyMeasurable (fun x => ⟪f x, g x⟫) μ

{α : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f g : α → E},
  MeasureTheory.AEStronglyMeasurable f μ →
    MeasureTheory.AEStronglyMeasurable g μ → MeasureTheory.AEStronglyMeasurable (fun x => ⟪f x, g x⟫_𝕜) μ


/-- Given a set `s` of affine-independent points belonging to an open set `u`, we may extend `s` to
an affine basis, all of whose elements belong to `u`. -/
theorem IsOpen.exists_between_affineIndependent_span_eq_top {s u : Set P} (hu : IsOpen u)
    (hsu : s ⊆ u) (hne : s.Nonempty) (h : AffineIndependent ℝ ((↑) : s → P)) :
    ∃ t : Set P, s ⊆ t ∧ t ⊆ u ∧ AffineIndependent ℝ ((↑) : t → P) ∧ affineSpan ℝ t = ⊤

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s u : Set P}
(hu : IsOpen u)
(hsu : s ⊆ u)
(hne : s.Nonempty)
(h : AffineIndependent ℝ Subtype.val)

∃ t, s ⊆ t ∧ t ⊆ u ∧ AffineIndependent ℝ Subtype.val ∧ affineSpan ℝ t = ⊤


/-- Möbius inversion for functions to a `CommGroup`. -/
theorem prod_eq_iff_prod_pow_moebius_eq [CommGroup R] {f g : ℕ → R} :
    (∀ n > 0, ∏ i ∈ n.divisors, f i = g n) ↔
      ∀ n > 0, ∏ x ∈ n.divisorsAntidiagonal, g x.snd ^ μ x.fst = f n

{R : Type u_1}
[CommGroup R]
{f g : ℕ → R}

(∀ n > 0, ∏ i ∈ n.divisors, f i = g n) ↔
  ∀ n > 0, ∏ x ∈ n.divisorsAntidiagonal, g x.2 ^ ArithmeticFunction.moebius x.1 = f n


@[simp]
theorem frequently_iff_eventually : (∃ᶠ x in f, p x) ↔ ∀ᶠ x in f, p x

{α : Type u}
{f : Ultrafilter α}
{p : α → Prop}

(∃ᶠ (x : α) in ↑f, p x) ↔ ∀ᶠ (x : α) in ↑f, p x


theorem lintegral_rpow_nnnorm_lt_top_of_eLpNorm'_lt_top {f : α → F} (hq0_lt : 0 < q)
    (hfq : eLpNorm' f q μ < ∞) : (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ q ∂μ) < ∞

(hfq : MeasureTheory.eLpNorm' f q μ < ⊤)

∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ < ⊤


@[to_additive existing (attr := simp)]
theorem fst_div : (s / t).fst = s.fst / t.snd

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

(s / t).toProd.1 = s.toProd.1 / t.toProd.2


theorem sup_def : s.sup f = (s.1.map f).sup

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
{f : β → α}


theorem condIndep_bot_left (m₁ : MeasurableSpace Ω) {m' : MeasurableSpace Ω}
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    {hm' : m' ≤ mΩ} {μ : Measure Ω} [IsFiniteMeasure μ] :
    CondIndep m' ⊥ m₁ hm' μ

{Ω : Type u_1}
(m₁ : MeasurableSpace Ω)
{m' mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
{hm' : m' ≤ mΩ}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]

ProbabilityTheory.CondIndep m' ⊥ m₁ hm' μ


/-- Consider a series of functions `∑' i, f i x`. Assume that each individual function `f i` is of
class `C^N`, and moreover there is a uniform summable upper bound on the `k`-th derivative
for each `k ≤ N` (except maybe for finitely many `i`s). Then the series is also `C^N`. -/
theorem contDiff_tsum_of_eventually (hf : ∀ i, ContDiff 𝕜 N (f i))
    (hv : ∀ k : ℕ, (k : ℕ∞) ≤ N → Summable (v k))
    (h'f :
      ∀ k : ℕ,
        (k : ℕ∞) ≤ N →
          ∀ᶠ i in (Filter.cofinite : Filter α), ∀ x : E, ‖iteratedFDeriv 𝕜 k (f i) x‖ ≤ v k i) :
    ContDiff 𝕜 N fun x => ∑' i, f i x

{v : ℕ → α → ℝ}

(hv : ∀ (k : ℕ), ↑k ≤ N → Summable (v k))

(h'f : ∀ (k : ℕ), ↑k ≤ N → ∀ᶠ (i : α) in Filter.cofinite, ∀ (x : E), ‖iteratedFDeriv 𝕜 k (f i) x‖ ≤ v k i)


theorem suffix_iff_eq_drop : l₁ <:+ l₂ ↔ l₁ = drop (length l₂ - length l₁) l₂

l₁ <:+ l₂ ↔ l₁ = List.drop (l₂.length - l₁.length) l₂


theorem Filter.coclosedCompact_le_cofinite : coclosedCompact X ≤ cofinite

{X : Type u_1}
[TopologicalSpace X]
[R0Space X]

Filter.coclosedCompact X ≤ Filter.cofinite


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

(hfd : DifferentiableWithinAt ℝ f (Set.Iio y) y)

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


theorem zpow_add_of_nonneg {A : M} {m n : ℤ} (hm : 0 ≤ m) (hn : 0 ≤ n) :
    A ^ (m + n) = A ^ m * A ^ n

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A : Matrix n' n' R}
{m n : ℤ}
(hm : 0 ≤ m)
(hn : 0 ≤ n)


@[simp]
theorem lt_sup_iff : a < b ⊔ c ↔ a < b ∨ a < c

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


theorem embedding_mk_eq (φ : K →+* ℂ) :
    embedding (mk φ) = φ ∨ embedding (mk φ) = ComplexEmbedding.conjugate φ

(NumberField.InfinitePlace.mk φ).embedding = φ ∨
  (NumberField.InfinitePlace.mk φ).embedding = NumberField.ComplexEmbedding.conjugate φ


@[simp]
theorem coe_eq_zero_iff : (φ : PowerSeries R) = 0 ↔ φ = 0

{R : Type u_2}
[CommSemiring R]
{φ : Polynomial R}

↑φ = 0 ↔ φ = 0


theorem conjugatesOfSet_subset' {s t : Set G} (ht : IsNormalSubgroup t) (h : s ⊆ t) :
    conjugatesOfSet s ⊆ t

{G : Type u_1}
[Group G]
{s t : Set G}
(ht : IsNormalSubgroup t)
(h : s ⊆ t)


/-- The explicit left homology data of a short complex of abelian group that is
given by a kernel and a quotient given by the `AddMonoidHom` API. -/
@[simps]
def abLeftHomologyData : S.LeftHomologyData

S.abLeftHomologyData.K = AddCommGrp.of ↥(AddMonoidHom.ker S.g)


protected theorem surjective (h : α ≃ᵢ β) : Surjective h

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


lemma sSup_inf_eq : sSup s ⊓ b = ⨆ a ∈ s, a ⊓ b

{α : Type u}
(minAx : Order.Frame.MinimalAxioms α)
{s : Set α}
{b : α}


theorem Ico_subset_Ico (ha : a₂ ≤ a₁) (hb : b₁ ≤ b₂) : Ico a₁ b₁ ⊆ Ico a₂ b₂

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}
(ha : a₂ ≤ a₁)
(hb : b₁ ≤ b₂)


theorem cast_add_choose {a b : ℕ} : ((a + b).choose a : K) = (a + b)! / (a ! * b !)

(K : Type u_1)
[DivisionRing K]
[CharZero K]
{a b : ℕ}

↑((a + b).choose a) = ↑(a + b)! / (↑a ! * ↑b !)


@[simp, mfld_simps]
theorem localTrivAt_apply (p : Z.TotalSpace) : Z.localTrivAt p.1 p = ⟨p.1, p.2⟩

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(p : Z.TotalSpace)

↑(Z.localTrivAt p.proj) p = (p.proj, p.snd)


@[simp, norm_cast] theorem coe_sub (x y : ℝ) : (↑(x - y) : EReal) = x - y


theorem ContDiffWithinAt.rpow_const_of_le (hf : ContDiffWithinAt ℝ m f s x) (h : ↑m ≤ p) :
    ContDiffWithinAt ℝ m (fun x => f x ^ p) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
{p : ℝ}
{m : ℕ}
(hf : ContDiffWithinAt ℝ (↑m) f s x)
(h : ↑m ≤ p)

ContDiffWithinAt ℝ (↑m) (fun x => f x ^ p) s x


theorem trans_trichotomous_right [IsTrans α r] [IsTrichotomous α r] {a b c : α} :
    r a b → ¬r c b → r a c

{α : Type u}
{r : α → α → Prop}
[IsTrans α r]
[IsTrichotomous α r]
{a b c : α}


@[simp]
theorem irrational_int_add_iff : Irrational (m + x) ↔ Irrational x


theorem coe_ringEquiv' : (e.toRingEquiv : A₁ → A₂) = e

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


@[simp]
theorem disjoint_inv_left_iff : Disjoint f⁻¹ g ↔ Disjoint f g


@[simp]
theorem measure_univ_eq_zero : μ univ = 0 ↔ μ = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


theorem Squarefree.squarefree_of_dvd [CommMonoid R] {x y : R} (hdvd : x ∣ y) (hsq : Squarefree y) :
    Squarefree x

{R : Type u_1}
[CommMonoid R]
{x y : R}
(hdvd : x ∣ y)
(hsq : Squarefree y)


theorem Commute.expUnitary {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) :
    Commute (expUnitary a) (expUnitary b)

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[StarRing A]
[ContinuousStar A]
[CompleteSpace A]
[StarModule ℂ A]
{a b : ↥(selfAdjoint A)}
(h : Commute ↑a ↑b)

Commute (selfAdjoint.expUnitary a) (selfAdjoint.expUnitary b)


theorem IsIntegral.minpoly_splits_tower_top' {f : K →+* L}
    (h : Splits (f.comp <| algebraMap R K) (minpoly R x)) :
    Splits f (minpoly K x)

(h : Polynomial.Splits (f.comp (algebraMap R K)) (minpoly R x))


@[simp, norm_cast] theorem ofNat_emod (m n : Nat) : (↑(m % n) : Int) = m % n


theorem eq_adjoint_iff_basis_left {ι : Type*} (b : Basis ι 𝕜 E) (A : E →ₗ[𝕜] F) (B : F →ₗ[𝕜] E) :
    A = LinearMap.adjoint B ↔ ∀ i y, ⟪A (b i), y⟫ = ⟪b i, B y⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[FiniteDimensional 𝕜 E]
[FiniteDimensional 𝕜 F]
{ι : Type u_5}
(b : Basis ι 𝕜 E)
(A : E →ₗ[𝕜] F)
(B : F →ₗ[𝕜] E)

A = LinearMap.adjoint B ↔ ∀ (i : ι) (y : F), ⟪A (b i), y⟫_𝕜 = ⟪b i, B y⟫_𝕜


/-- The maps `hσ' q n m hnm` are compatible with the application of additive functors. -/
theorem map_hσ' {D : Type*} [Category D] [Preadditive D] (G : C ⥤ D) [G.Additive]
    (X : SimplicialObject C) (q n m : ℕ) (hnm : c.Rel m n) :
    (hσ' q n m hnm : K[((whiskering _ _).obj G).obj X].X n ⟶ _) =
      G.map (hσ' q n m hnm : K[X].X n ⟶ _)

(hnm : AlgebraicTopology.DoldKan.c.Rel m n)

AlgebraicTopology.DoldKan.hσ' q n m hnm = G.map (AlgebraicTopology.DoldKan.hσ' q n m hnm)


theorem coe_sSup' (S : Set L) : (↑(sSup S) : α) = ⨆ N ∈ S, (N : α)

{α : Type u_1}
[CompleteLattice α]
{L : CompleteSublattice α}
(S : Set ↥L)


theorem FiniteDimensional.of_rank_eq_nat {n : ℕ} (h : Module.rank K V = n) :
    FiniteDimensional K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{n : ℕ}
(h : Module.rank K V = ↑n)


@[to_additive]
theorem set_mul_normal_comm (s : Set G) (N : Subgroup G) [hN : N.Normal] :
    s * (N : Set G) = (N : Set G) * s

{G : Type u_2}
[AddGroup G]
(s : Set G)
(N : AddSubgroup G)
[hN : N.Normal]


@[simp] theorem data_pop (a : Array α) : a.pop.data = a.data.dropLast


/-- Let `Z, N` be types, let `R` be a metric space, let `α : R` be a point and let
`j : Z → N → R` be a function.  We aim to estimate how close we can get to `α`, while staying
in the image of `j`.  The points `j z a` of `R` in the image of `j` come with a "cost" equal to
`d a`.  As we get closer to `α` while staying in the image of `j`, we are interested in bounding
the quantity `d a * dist α (j z a)` from below by a strictly positive amount `1 / A`: the intuition
is that approximating well `α` with the points in the image of `j` should come at a high cost.  The
hypotheses on the function `f : R → R` provide us with sufficient conditions to ensure our goal.
The first hypothesis is that `f` is Lipschitz at `α`: this yields a bound on the distance.
The second hypothesis is specific to the Liouville argument and provides the missing bound
involving the cost function `d`.

This lemma collects the properties used in the proof of `exists_pos_real_of_irrational_root`.
It is stated in more general form than needed: in the intended application, `Z = ℤ`, `N = ℕ`,
`R = ℝ`, `d a = (a + 1) ^ f.nat_degree`, `j z a = z / (a + 1)`, `f ∈ ℤ[x]`, `α` is an irrational
root of `f`, `ε` is small, `M` is a bound on the Lipschitz constant of `f` near `α`, `n` is
the degree of the polynomial `f`.
-/
theorem exists_one_le_pow_mul_dist {Z N R : Type*} [PseudoMetricSpace R] {d : N → ℝ}
    {j : Z → N → R} {f : R → R} {α : R} {ε M : ℝ}
    -- denominators are positive
    (d0 : ∀ a : N, 1 ≤ d a)
    (e0 : 0 < ε)
    -- function is Lipschitz at α
    (B : ∀ ⦃y : R⦄, y ∈ closedBall α ε → dist (f α) (f y) ≤ dist α y * M)
    -- clear denominators
    (L : ∀ ⦃z : Z⦄, ∀ ⦃a : N⦄, j z a ∈ closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a))) :
    ∃ A : ℝ, 0 < A ∧ ∀ z : Z, ∀ a : N, 1 ≤ d a * (dist α (j z a) * A)

(B : ∀ ⦃y : R⦄, y ∈ Metric.closedBall α ε → dist (f α) (f y) ≤ dist α y * M)

(L : ∀ ⦃z : Z⦄ ⦃a : N⦄, j z a ∈ Metric.closedBall α ε → 1 ≤ d a * dist (f α) (f (j z a)))

∃ A, 0 < A ∧ ∀ (z : Z) (a : N), 1 ≤ d a * (dist α (j z a) * A)


/-- The map taking the pi product of a family of fundamental groupoids to the fundamental
groupoid of the pi product. This is actually an isomorphism (see `piIso`)
-/
@[simps]
def piToPiTop : (∀ i, πₓ (X i)) ⥤ πₓ (TopCat.of (∀ i, X i))

∀ {X_1 Y : (i : I) → ↑(π.obj (X i))} (p : X_1 ⟶ Y), (FundamentalGroupoidFunctor.piToPiTop X).map p = Path.Homotopic.pi p


@[simp] lemma smul_mk'_self {m : M} {r : R} :
    (m : R) • mk' S r m = algebraMap R S r

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
{m : ↥M}
{r : R}

↑m • IsLocalization.mk' S r m = (algebraMap R S) r


theorem size_zipWith (as : Array α) (bs : Array β) (f : α → β → γ) :
    (as.zipWith bs f).size = min as.size bs.size

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(as : Array α)
(bs : Array β)
(f : α → β → γ)


theorem add_pow_expChar_of_commute [Semiring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) (h : Commute x y) : (x + y) ^ q = x ^ q + y ^ q

(R : Type u)
[Semiring R]
{q : ℕ}
[hR : ExpChar R q]
(x y : R)
(h : Commute x y)


@[simp, norm_cast]
theorem coe_mul : ((x * y : R) : ℍ[R]) = x * y


lemma abs_neg_one_pow (n : ℕ) : |(-1 : α) ^ n| = 1

{α : Type u_1}
[LinearOrderedRing α]
(n : ℕ)


theorem DifferentiableOn.norm_sq (hf : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun y => ‖f y‖ ^ 2) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{s : Set G}
(hf : DifferentiableOn ℝ f s)


protected theorem sub_le_iff_le_add' {a b c : Nat} : a - b ≤ c ↔ a ≤ b + c


@[simp]
theorem sublists_singleton (a : α) : sublists [a] = [[], [a]]


theorem IsNat.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsRat a (.ofNat n) (nat_lit 1)

Mathlib.Meta.NormNum.IsNat a n → Mathlib.Meta.NormNum.IsRat a (Int.ofNat n) 1


/-- The image of the map sending a nonzero natural number `x ≤ p / 2` to the absolute value
  of the integer in `(-p/2, p/2]` that is congruent to `a * x mod p` is the set
  of nonzero natural numbers `x` such that `x ≤ p / 2`. -/
theorem Ico_map_valMinAbs_natAbs_eq_Ico_map_id (p : ℕ) [hp : Fact p.Prime] (a : ZMod p)
    (hap : a ≠ 0) : ((Ico 1 (p / 2).succ).1.map fun (x : ℕ) => (a * x).valMinAbs.natAbs) =
    (Ico 1 (p / 2).succ).1.map fun a => a

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(a : ZMod p)
(hap : a ≠ 0)

Multiset.map (fun x => (a * ↑x).valMinAbs.natAbs) (Finset.Ico 1 (p / 2).succ).val =
  Multiset.map (fun a => a) (Finset.Ico 1 (p / 2).succ).val


theorem sumDiffSubset_symm_apply_of_not_mem {α} {s t : Set α} (h : s ⊆ t) [DecidablePred (· ∈ s)]
    {x : t} (hx : x.1 ∉ s) : (Equiv.Set.sumDiffSubset h).symm x = Sum.inr ⟨x, ⟨x.2, hx⟩⟩

{α : Type u_1}
{s t : Set α}
(h : s ⊆ t)
[DecidablePred fun x => x ∈ s]
{x : ↑t}
(hx : ↑x ∉ s)

(Equiv.Set.sumDiffSubset h).symm x = Sum.inr ⟨↑x, ⋯⟩


@[simp]
theorem basisRepr_apply [Fintype ι] {v : Basis ι R M} (Q : QuadraticMap R M N) (w : ι → R) :
    Q.basisRepr v w = Q (∑ i : ι, w i • v i)

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{ι : Type u_8}
[Fintype ι]
{v : Basis ι R M}
(Q : QuadraticMap R M N)
(w : ι → R)

(Q.basisRepr v) w = Q (∑ i : ι, w i • v i)


theorem succ_castSucc {n : Nat} (i : Fin n) : i.castSucc.succ = castSucc i.succ


@[simp]
theorem tanh_neg : tanh (-x) = -tanh x


/-- If `f` maps `p ^ i` to `(f p) ^ i` for primes `p`, and `f`
is multiplicative on coprime elements, then `f` is multiplicative on all products of primes. -/
-- @[elab_as_elim] Porting note: commented out
theorem multiplicative_prime_power {f : α → β} (s : Finset α) (i j : α → ℕ)
    (is_prime : ∀ p ∈ s, Prime p) (is_coprime : ∀ᵉ (p ∈ s) (q ∈ s), p ∣ q → p = q)
    (h1 : ∀ {x y}, IsUnit y → f (x * y) = f x * f y)
    (hpr : ∀ {p} (i : ℕ), Prime p → f (p ^ i) = f p ^ i)
    (hcp : ∀ {x y}, IsRelPrime x y → f (x * y) = f x * f y) :
    f (∏ p ∈ s, p ^ (i p + j p)) = f (∏ p ∈ s, p ^ i p) * f (∏ p ∈ s, p ^ j p)

(is_coprime : ∀ p ∈ s, ∀ q ∈ s, p ∣ q → p = q)

(h1 : ∀ {x y : α}, IsUnit y → f (x * y) = f x * f y)

(hpr : ∀ {p : α} (i : ℕ), Prime p → f (p ^ i) = f p ^ i)

(hcp : ∀ {x y : α}, IsRelPrime x y → f (x * y) = f x * f y)


@[simp]
theorem isClosed_closure : IsClosed (closure s)

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


@[to_additive]
theorem smul_set_symmDiff : a • s ∆ t = (a • s) ∆ (a • t)

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{s t : Set β}
{a : α}

a +ᵥ symmDiff s t = symmDiff (a +ᵥ s) (a +ᵥ t)


@[simp]
theorem CNF_zero (b : Ordinal) : CNF b 0 = []


/-- Given `Uᵢ ×[Z] Y`, this is the glued fibered product `X ×[Z] Y`. -/
@[simps U V f t t', simps (config := .lemmasOnly) J]
def gluing : Scheme.GlueData.{u}

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

∀ (x : 𝒰.J × 𝒰.J),
  (AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).V x =
    match x with
    | (i, j) => AlgebraicGeometry.Scheme.Pullback.v 𝒰 f g i j


@[to_additive]
theorem card_dvd_of_le {H K : Subgroup α} (hHK : H ≤ K) : Nat.card H ∣ Nat.card K

{α : Type u_1}
[Group α]
{H K : Subgroup α}
(hHK : H ≤ K)


/-- `OrderDual` as a functor. -/
@[simps]
def dual : DistLat ⥤ DistLat

∀ {X Y : DistLat} (a : LatticeHom ↑X ↑Y), DistLat.dual.map a = LatticeHom.dual a


theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2

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


theorem isConnected_connectedComponent {x : α} : IsConnected (connectedComponent x)

{α : Type u}
[TopologicalSpace α]
{x : α}


theorem withDensity_smul' (r : ℝ≥0∞) (f : α → ℝ≥0∞) (hr : r ≠ ∞) :
    μ.withDensity (r • f) = r • μ.withDensity f

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


/-- if the msb is false, the arithmetic shift right equals logical shift right -/
theorem sshiftRight_eq_of_msb_false {x : BitVec w} {s : Nat} (h : x.msb = false) :
    (x.sshiftRight s) = x >>> s

{w : Nat}
{x : BitVec w}
{s : Nat}
(h : x.msb = false)


lemma prod_mk {g : α → γ} (hf : EventuallyConst f l) (hg : EventuallyConst g l) :
    EventuallyConst (fun x ↦ (f x, g x)) l

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{l : Filter α}
{f : α → β}
{g : α → γ}
(hf : Filter.EventuallyConst f l)
(hg : Filter.EventuallyConst g l)

Filter.EventuallyConst (fun x => (f x, g x)) l


lemma quotTensorEquivQuotSMul_comp_mkQ_rTensor (I : Ideal R) :
    quotTensorEquivQuotSMul M I ∘ₗ I.mkQ.rTensor M =
      (I • ⊤ : Submodule R M).mkQ ∘ₗ TensorProduct.lid R M

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)

↑(quotTensorEquivQuotSMul M I) ∘ₗ LinearMap.rTensor M (Submodule.mkQ I) = (I • ⊤).mkQ ∘ₗ ↑(TensorProduct.lid R M)


@[simp]
theorem pullbackIsoPullback_hom_fst (p : pullback f g) :
    ((pullbackIsoPullback f g).hom p : X × Y).fst = (pullback.fst f g) p

(p : CategoryTheory.Limits.pullback f g)

(↑((CategoryTheory.Limits.Types.pullbackIsoPullback f g).hom p)).1 = CategoryTheory.Limits.pullback.fst f g p


@[simp]
theorem exp_op [T2Space 𝔸] (x : 𝔸) : exp 𝕂 (MulOpposite.op x) = MulOpposite.op (exp 𝕂 x)

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[Field 𝕂]
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
[T2Space 𝔸]
(x : 𝔸)

NormedSpace.exp 𝕂 (MulOpposite.op x) = MulOpposite.op (NormedSpace.exp 𝕂 x)


theorem isCompactOperator_iff_image_closedBall_subset_compact [ContinuousConstSMul 𝕜₂ M₂]
    (f : M₁ →ₛₗ[σ₁₂] M₂) {r : ℝ} (hr : 0 < r) :
    IsCompactOperator f ↔ ∃ K : Set M₂, IsCompact K ∧ f '' Metric.closedBall 0 r ⊆ K

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[SeminormedAddCommGroup M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[NormedSpace 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
(f : M₁ →ₛₗ[σ₁₂] M₂)
{r : ℝ}
(hr : 0 < r)

IsCompactOperator ⇑f ↔ ∃ K, IsCompact K ∧ ⇑f '' Metric.closedBall 0 r ⊆ K


theorem finitaryExtensive (hP' : ∀ ⦃X Y B : CompHausLike.{u} P⦄ (f : X ⟶ B) (g : Y ⟶ B)
    (_ : OpenEmbedding f), HasExplicitPullback f g) :
      FinitaryExtensive (CompHausLike P)

(hP' : ∀ ⦃X Y B : CompHausLike P⦄ (f : X ⟶ B) (g : Y ⟶ B), OpenEmbedding ⇑f → CompHausLike.HasExplicitPullback f g)


theorem ContinuousOn.cpow (hf : ContinuousOn f s) (hg : ContinuousOn g s)
    (h0 : ∀ a ∈ s, f a ∈ slitPlane) : ContinuousOn (fun x => f x ^ g x) s

{α : Type u_1}
[TopologicalSpace α]
{f g : α → ℂ}
{s : Set α}
(hf : ContinuousOn f s)
(hg : ContinuousOn g s)
(h0 : ∀ a ∈ s, f a ∈ Complex.slitPlane)


theorem smeval_eq_sum : p.smeval x = p.sum (smul_pow x)

{R : Type u_1}
[Semiring R]
(p : Polynomial R)
{S : Type u_2}
[AddCommMonoid S]
[Pow S ℕ]
[MulActionWithZero R S]
(x : S)

p.smeval x = p.sum (Polynomial.smul_pow x)


theorem sub_pow_expChar_of_commute [Ring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) (h : Commute x y) : (x - y) ^ q = x ^ q - y ^ q

(R : Type u)
[Ring R]
{q : ℕ}
[hR : ExpChar R q]
(x y : R)
(h : Commute x y)


@[to_additive (attr := measurability)]
theorem AEMeasurable.mul_const [MeasurableMul M] (hf : AEMeasurable f μ) (c : M) :
    AEMeasurable (fun x => f x * c) μ

{M : Type u_2}
{α : Type u_3}
[MeasurableSpace M]
[Mul M]
{m : MeasurableSpace α}
{f : α → M}
{μ : MeasureTheory.Measure α}
[MeasurableMul M]
(hf : AEMeasurable f μ)
(c : M)


theorem filter_eq_generate (h : IsBasis p s) : h.filter = generate { U | ∃ i, p i ∧ s i = U }

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

h.filter = Filter.generate {U | ∃ i, p i ∧ s i = U}


theorem uniformContinuous_id : UniformContinuous (@id α)


@[simp]
theorem map₂_coe_right (f : α → β → γ) (a : Option α) (b : β) :
    map₂ f a b = a.map fun a => f a b

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

Option.map₂ f a (some b) = Option.map (fun a => f a b) a


lemma eq_of_abs_lt (h : a ≡ b [MOD m]) (h2 : |(b : ℤ) - a| < m) : a = b

{m a b : ℕ}
(h : a ≡ b [MOD m])
(h2 : |↑b - ↑a| < ↑m)


@[simp]
theorem frequently_bot {p : α → Prop} : ¬∃ᶠ x in ⊥, p x


lemma IsUpperSet.sdiff_of_isLowerSet (hs : IsUpperSet s) (ht : IsLowerSet t) : IsUpperSet (s \ t)

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


theorem lt_iff_add_one_le (a b : Int) : a < b ↔ a + 1 ≤ b


theorem map_snd_darts {u v : V} (p : G.Walk u v) : p.darts.map (·.snd) = p.support.tail

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

List.map (fun x => x.toProd.2) p.darts = p.support.tail


@[simp]
lemma iso_inv_val_base_hom_val_base_apply {X Y : LocallyRingedSpace.{u}} (e : X ≅ Y) (y : Y) :
    (e.hom.val.base (e.inv.val.base y)) = y

{X Y : AlgebraicGeometry.LocallyRingedSpace}


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

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


theorem coePNat_prime (v : PrimeMultiset) (p : ℕ+) (h : p ∈ (v : Multiset ℕ+)) : p.Prime

(v : PrimeMultiset)
(p : ℕ+)
(h : p ∈ v.toPNatMultiset)


@[to_additive]
theorem inv_mem_inv (ha : a ∈ s) : a⁻¹ ∈ s⁻¹

{α : Type u_2}
[DecidableEq α]
[Inv α]
{s : Finset α}
{a : α}
(ha : a ∈ s)


protected theorem ContinuousLinearMap.hasStrictDerivAt : HasStrictDerivAt e (e 1) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
(e : 𝕜 →L[𝕜] F)


theorem LieIdeal.map_lowerCentralSeries_le (k : ℕ) {f : L →ₗ⁅R⁆ L'} :
    LieIdeal.map f (lowerCentralSeries R L L k) ≤ lowerCentralSeries R L' L' k

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(k : ℕ)
{f : L →ₗ⁅R⁆ L'}

LieIdeal.map f (LieModule.lowerCentralSeries R L L k) ≤ LieModule.lowerCentralSeries R L' L' k


{α : Type u_1}
{E : Type u_3}
[Norm E]
{f : α → E}
{l : Filter α}


/-- The oscillation of `f` at `x` within a neighborhood `D` of `x` is equal to `oscillation f x` -/
theorem oscillationWithin_nhd_eq_oscillation [TopologicalSpace E] (f : E → F) (D : Set E) (x : E)
    (hD : D ∈ 𝓝 x) : oscillationWithin f D x = oscillation f x

{E : Type u}
{F : Type v}
[PseudoEMetricSpace F]
[TopologicalSpace E]
(f : E → F)
(D : Set E)
(x : E)
(hD : D ∈ 𝓝 x)


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

{α : Type u}
{t : Set α}
{ht : t.Finite}
{s : Finset α}


lemma Sieve.equalizer_eq_equalizerSieve {U V : C} (f₁ f₂ : U ⟶ V) :
    Sieve.equalizer f₁ f₂ = Presheaf.equalizerSieve (F := yoneda.obj _) f₁ f₂

{C : Type uC}
[CategoryTheory.Category.{vC, uC} C]
{U V : C}
(f₁ f₂ : U ⟶ V)

CategoryTheory.Sieve.equalizer f₁ f₂ = CategoryTheory.Presheaf.equalizerSieve f₁ f₂


/-- Eta rule for cones. -/
@[simps!]
def eta (c : Cone F) : c ≅ ⟨c.pt, c.π⟩

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.Cones.eta c).inv.hom = 𝟙 c.pt


theorem ascFactorial_succ {n k : ℕ} : n.ascFactorial k.succ = (n + k) * n.ascFactorial k


theorem mk_preimage_of_injective_of_subset_range_lift {β : Type v} (f : α → β) (s : Set β)
    (h : Injective f) (h2 : s ⊆ range f) : lift.{v} #(f ⁻¹' s) = lift.{u} #s

{α : Type u}
{β : Type v}
(f : α → β)
(s : Set β)
(h : Function.Injective f)
(h2 : s ⊆ Set.range f)

Cardinal.lift.{v, u} (Cardinal.mk ↑(f ⁻¹' s)) = Cardinal.lift.{u, v} (Cardinal.mk ↑s)


@[simp]
theorem ker_subtype : ker p.subtype = ⊥

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p : Submodule R M)


theorem Adapted.isStoppingTime_upperCrossingTime (hf : Adapted ℱ f) :
    IsStoppingTime ℱ (upperCrossingTime a b f N n)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N n : ℕ}
{ℱ : MeasureTheory.Filtration ℕ m0}
(hf : MeasureTheory.Adapted ℱ f)

MeasureTheory.IsStoppingTime ℱ (MeasureTheory.upperCrossingTime a b f N n)


/-- The composition of two oplax monoidal functors is again oplax monoidal. -/
@[simps]
def comp : OplaxMonoidalFunctor.{v₁, v₃} C E

(F : CategoryTheory.OplaxMonoidalFunctor C D)

(G : CategoryTheory.OplaxMonoidalFunctor D E)


@[to_additive]
theorem prod_inter_mul_prod_diff [DecidableEq α] (s t : Finset α) (f : α → β) :
    (∏ x ∈ s ∩ t, f x) * ∏ x ∈ s \ t, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
[DecidableEq α]
(s t : Finset α)
(f : α → β)