theorem integral_inv_smul_sub_mul_tendsto_integral_lineDeriv_mul'
    (hf : LipschitzWith C f) (h'f : HasCompactSupport f) (hg : Continuous g) (v : E) :
    Tendsto (fun (t : ℝ) ↦ ∫ x, (t⁻¹ • (f (x + t • v) - f x)) * g x ∂μ) (𝓝[>] 0)
      (𝓝 (∫ x, lineDeriv ℝ f x v * g x ∂μ))

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{C : ℝ≥0}
{f g : E → ℝ}
{μ : MeasureTheory.Measure E}
[μ.IsAddHaarMeasure]
(hf : LipschitzWith C f)
(h'f : HasCompactSupport f)
(hg : Continuous g)
(v : E)

Filter.Tendsto (fun t => ∫ (x : E), t⁻¹ • (f (x + t • v) - f x) * g x ∂μ) (𝓝[>] 0)
  (𝓝 (∫ (x : E), lineDeriv ℝ f x v * g x ∂μ))


theorem Pairwise.insert_of_symmetric_of_not_mem (hs : s.Pairwise r) (hr : Symmetric r) (ha : a ∉ s)
    (h : ∀ b ∈ s, r a b) : (insert a s).Pairwise r

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
(hs : s.Pairwise r)
(hr : Symmetric r)
(ha : a ∉ s)
(h : ∀ b ∈ s, r a b)


theorem exists_nhds_ne_inf_principal_neBot (hs : IsCompact s) (hs' : s.Infinite) :
    ∃ z ∈ s, (𝓝[≠] z ⊓ 𝓟 s).NeBot

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsCompact s)
(hs' : s.Infinite)


theorem continuous_coinduced_rng {t : TopologicalSpace α} :
    Continuous[t, coinduced f t] f

{α : Type u}
{β : Type v}
{f : α → β}
{t : TopologicalSpace α}


theorem isAtom_iff [OrderBot α] [OrderBot β] [IsAtomic β] {l : α → β} {u : β → α}
    (gi : GaloisCoinsertion l u) (h_atom : ∀ b, IsAtom b → l (u b) = b) (a : α) :
    IsAtom (l a) ↔ IsAtom a

(h_atom : ∀ (b : β), IsAtom b → l (u b) = b)


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

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


@[to_additive (attr := simp)]
theorem union_inv : (s ∪ t)⁻¹ = s⁻¹ ∪ t⁻¹

(s ∪ t)⁻¹ = s⁻¹ ∪ t⁻¹


/--
The functor assigning, to a finite set in `V`, the set of connected components in its complement.
-/
@[simps]
def componentComplFunctor : (Finset V)ᵒᵖ ⥤ Type u

∀ {X Y : (Finset V)ᵒᵖ} (f : X ⟶ Y) (C : G.ComponentCompl ↑(Opposite.unop X)),
  G.componentComplFunctor.map f C = SimpleGraph.ComponentCompl.hom ⋯ C


lemma root_X_pow_sub_C_pow (n : ℕ) (a : K) :
    (AdjoinRoot.root (X ^ n - C a)) ^ n = AdjoinRoot.of _ a

AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a) ^ n = (AdjoinRoot.of (Polynomial.X ^ n - Polynomial.C a)) a


@[ext]
theorem ExtensionOf.ext {a b : ExtensionOf i f} (domain_eq : a.domain = b.domain)
    (to_fun_eq :
      ∀ ⦃x : a.domain⦄ ⦃y : b.domain⦄, (x : N) = y → a.toLinearPMap x = b.toLinearPMap y) :
    a = b

(to_fun_eq : ∀ ⦃x : ↥a.domain⦄ ⦃y : ↥b.domain⦄, ↑x = ↑y → ↑a.toLinearPMap x = ↑b.toLinearPMap y)


lemma Even.trans_dvd (ha : Even a) (hab : a ∣ b) : Even b

{α : Type u_2}
[Semiring α]
{a b : α}
(ha : Even a)
(hab : a ∣ b)


@[to_additive]
protected theorem Finset.hasProd_iff_compl (s : Finset β) :
    HasProd f a ↔ HasProd (fun x : { x // x ∉ s } ↦ f x) (a / ∏ i ∈ s, f i)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
{a : α}
(s : Finset β)

HasSum f a ↔ HasSum (fun x => f ↑x) (a - ∑ i ∈ s, f i)


theorem ack_injective_right (m : ℕ) : Function.Injective (ack m)


theorem sSup_pair {a b : α} : sSup {a, b} = a ⊔ b

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


theorem mem_normalizedFactors_factor_dvd_iso_of_mem_normalizedFactors {m p : M} {n : N} (hm : m ≠ 0)
    (hn : n ≠ 0) (hp : p ∈ normalizedFactors m) {d : { l : M // l ∣ m } ≃ { l : N // l ∣ n }}
    (hd : ∀ l l', (d l : N) ∣ d l' ↔ (l : M) ∣ (l' : M)) :
    ↑(d ⟨p, dvd_of_mem_normalizedFactors hp⟩) ∈ normalizedFactors n

(hp : p ∈ UniqueFactorizationMonoid.normalizedFactors m)

(hd : ∀ (l l' : { l // l ∣ m }), ↑(d l) ∣ ↑(d l') ↔ ↑l ∣ ↑l')

↑(d ⟨p, ⋯⟩) ∈ UniqueFactorizationMonoid.normalizedFactors n


theorem integrable_of_integral_eq_one {f : α → ℝ} (h : ∫ x, f x ∂μ = 1) : Integrable f μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(h : ∫ (x : α), f x ∂μ = 1)


/-- Sending `X : C` to `Subobject X` is a contravariant functor `Cᵒᵖ ⥤ Type`. -/
@[simps]
def functor [HasPullbacks C] : Cᵒᵖ ⥤ Type max u₁ v₁

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

∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (a : CategoryTheory.Subobject (Opposite.unop X)),
  (CategoryTheory.Subobject.functor C).map f a = (CategoryTheory.Subobject.pullback f.unop).obj a


@[reassoc]
theorem degeneracy_comp_PInfty (X : SimplicialObject C) (n : ℕ) {Δ' : SimplexCategory}
    (θ : ([n] : SimplexCategory) ⟶ Δ') (hθ : ¬Mono θ) : X.map θ.op ≫ PInfty.f n = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : CategoryTheory.SimplicialObject C)
(n : ℕ)
{Δ' : SimplexCategory}
(θ : [n] ⟶ Δ')
(hθ : ¬CategoryTheory.Mono θ)

X.map θ.op ≫ AlgebraicTopology.DoldKan.PInfty.f n = 0


/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Finite α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a)

{α : Type}
[Finite α]
(Z : α → Stonean)
(a : α)

OpenEmbedding ⇑(CategoryTheory.Limits.Sigma.ι Z a)


@[simp]
theorem val_eq_toMeasure (ν : FiniteMeasure Ω) : ν.val = (ν : Measure Ω)

{Ω : Type u_1}
[MeasurableSpace Ω]
(ν : MeasureTheory.FiniteMeasure Ω)


theorem modEq_three_digits_sum (n : ℕ) : n ≡ (digits 10 n).sum [MOD 3]


{E : Type u_1}
[NormedAddCommGroup E]
{r : ℝ}
(x : E)
(hr : 0 < r)


theorem image2_left_comm {f : α → δ → ε} {g : β → γ → δ} {f' : α → γ → δ'} {g' : β → δ' → ε}
    (h_left_comm : ∀ a b c, f a (g b c) = g' b (f' a c)) :
    image2 f s (image2 g t u) = image2 g' t (image2 f' s u)

{f : α → δ → ε}

{g : β → γ → δ}

(h_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c))

Set.image2 f s (Set.image2 g t u) = Set.image2 g' t (Set.image2 f' s u)


@[simp]
theorem closure_setOf_re_lt (a : ℝ) : closure { z : ℂ | z.re < a } = { z | z.re ≤ a }


theorem polar_antitone : Antitone (B.polar : Set E → Set F)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)


/-- A continuous function on a compact space is automatically a continuous function vanishing at
infinity. -/
@[simps]
def ContinuousMap.liftZeroAtInfty [CompactSpace α] : C(α, β) ≃ C₀(α, β)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
[CompactSpace α]
(f : α →C₀ β)

ZeroAtInftyContinuousMap.ContinuousMap.liftZeroAtInfty.symm f = ↑f


@[simp]
theorem val_sub (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 - y2).val = y1.val - y2.val

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


/-- If a left-invariant measure gives positive mass to some compact set with nonempty interior, then
it is a Haar measure. -/
@[to_additive
"If a left-invariant measure gives positive mass to some compact set with nonempty interior, then
it is an additive Haar measure."]
theorem isHaarMeasure_of_isCompact_nonempty_interior [TopologicalGroup G] [BorelSpace G]
    (μ : Measure G) [IsMulLeftInvariant μ] (K : Set G) (hK : IsCompact K)
    (h'K : (interior K).Nonempty) (h : μ K ≠ 0) (h' : μ K ≠ ∞) : IsHaarMeasure μ

{G : Type u_2}
[MeasurableSpace G]
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[BorelSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsAddLeftInvariant]
(K : Set G)
(hK : IsCompact K)
(h'K : (interior K).Nonempty)
(h : μ K ≠ 0)
(h' : μ K ≠ ⊤)


@[simp]
theorem d_of {G : Type u} {n : ℕ} (c : Fin (n + 1) → G) :
    d k G n (Finsupp.single c 1) =
      Finset.univ.sum fun p : Fin (n + 1) =>
        Finsupp.single (c ∘ p.succAbove) ((-1 : k) ^ (p : ℕ))

{k : Type u}
[CommRing k]
{G : Type u}
{n : ℕ}
(c : Fin (n + 1) → G)

(groupCohomology.resolution.d k G n) (Finsupp.single c 1) =
  ∑ p : Fin (n + 1), Finsupp.single (c ∘ p.succAbove) ((-1) ^ ↑p)


/-- A function which can be locally uniformly approximated by functions which are continuous at
a point is continuous at this point. -/
theorem continuousAt_of_locally_uniform_approx_of_continuousAt
    (L : ∀ u ∈ 𝓤 β, ∃ t ∈ 𝓝 x, ∃ F, ContinuousAt F x ∧ ∀ y ∈ t, (f y, F y) ∈ u) :
    ContinuousAt f x


/-- A Lie ring is an additive group with compatible product, known as the bracket, satisfying the
Jacobi identity. -/
class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where
  /-- A Lie ring bracket is additive in its first component. -/
  protected add_lie : ∀ x y z : L, ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆
  /-- A Lie ring bracket is additive in its second component. -/
  protected lie_add : ∀ x y z : L, ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆
  /-- A Lie ring bracket vanishes on the diagonal in L × L. -/
  protected lie_self : ∀ x : L, ⁅x, x⁆ = 0
  /-- A Lie ring bracket satisfies a Leibniz / Jacobi identity. -/
  protected leibniz_lie : ∀ x y z : L, ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆

{L : Type v}
[self : LieRing L]
(x y z : L)


/-- Given two bundled monotone maps `f`, `g`, `f.prod g` is the map `x ↦ (f x, g x)` bundled as a
`OrderHom`. -/
@[simps]
protected def prod (f : α →o β) (g : α →o γ) : α →o β × γ

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
(f : α →o β)
(g : α →o γ)
(x : α)


theorem isReduced_ofLocalizationMaximal : OfLocalizationMaximal fun R hR => IsReduced R


/-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
  also an algebraic closure of `K`. -/
theorem ofAlgebraic [hKJ : Algebra.IsAlgebraic K J] : IsAlgClosure K L

(K : Type u_1)
(J : Type u_2)
(L : Type v)
[Field K]
[Field J]
[Field L]
[Algebra K J]
[Algebra J L]
[IsAlgClosure J L]
[Algebra K L]
[IsScalarTower K J L]
[hKJ : Algebra.IsAlgebraic K J]


theorem finset_sup_le_sum (p : ι → Seminorm 𝕜 E) (s : Finset ι) : s.sup p ≤ ∑ i ∈ s, p i

{𝕜 : Type u_3}
{E : Type u_7}
{ι : Type u_12}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : ι → Seminorm 𝕜 E)
(s : Finset ι)


@[simp]
theorem eventually_all_finite {ι} {I : Set ι} (hI : I.Finite) {l} {p : ι → α → Prop} :
    (∀ᶠ x in l, ∀ i ∈ I, p i x) ↔ ∀ i ∈ I, ∀ᶠ x in l, p i x

{α : Type u}
{ι : Type u_2}
{I : Set ι}
(hI : I.Finite)
{l : Filter α}
{p : ι → α → Prop}

(∀ᶠ (x : α) in l, ∀ i ∈ I, p i x) ↔ ∀ i ∈ I, ∀ᶠ (x : α) in l, p i x


/-- The tautological 1-pre-hypercover induced by `S : J.Cover X`. Its index type `I₀`
is given by `S.Arrow` (i.e. all the morphisms in the sieve `S`), while `I₁` is given
by all possible pullback cones. -/
@[simps]
def preOneHypercover : PreOneHypercover.{max u v} X

{J : CategoryTheory.GrothendieckTopology C}


theorem map_floor (f : F) (hf : StrictMono f) (a : α) : ⌊f a⌋ = ⌊a⌋

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedRing β]
[FloorRing α]
[FloorRing β]
[FunLike F α β]
[RingHomClass F α β]
(f : F)
(hf : StrictMono ⇑f)
(a : α)


theorem sum_finsupport_smul_eq_finsum {A : Type*} [AddCommGroup A] [Module ℝ A] (φ : ι → M → A) :
    ∑ i ∈ ρ.finsupport x₀, ρ i x₀ • φ i x₀ = ∑ᶠ i, ρ i x₀ • φ i x₀

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(ρ : SmoothPartitionOfUnity ι I M s)
(x₀ : M)
{A : Type u_1}
[AddCommGroup A]
[Module ℝ A]
(φ : ι → M → A)

∑ i ∈ ρ.finsupport x₀, (ρ i) x₀ • φ i x₀ = ∑ᶠ (i : ι), (ρ i) x₀ • φ i x₀


theorem le_iff [LT α] [LE β] (a b : α × β) :
    toLex a ≤ toLex b ↔ a.1 < b.1 ∨ a.1 = b.1 ∧ a.2 ≤ b.2

{α : Type u_1}
{β : Type u_2}
[LT α]
[LE β]
(a b : α × β)


@[to_additive]
theorem Prod.semiconjBy_iff {x y z : M × N} :
    SemiconjBy x y z ↔ SemiconjBy x.1 y.1 z.1 ∧ SemiconjBy x.2 y.2 z.2

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
{x y z : M × N}

AddSemiconjBy x y z ↔ AddSemiconjBy x.1 y.1 z.1 ∧ AddSemiconjBy x.2 y.2 z.2


@[simp]
theorem integral_smul_measure (f : α → G) (c : ℝ≥0∞) :
    ∫ x, f x ∂c • μ = c.toReal • ∫ x, f x ∂μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → G)
(c : ℝ≥0∞)

∫ (x : α), f x ∂c • μ = c.toReal • ∫ (x : α), f x ∂μ


theorem indep_or_dep (hX : X ⊆ M.E := by aesop_mat) : M.Indep X ∨ M.Dep X

{α : Type u_1}
{M : Matroid α}
{X : Set α}
(hX : X ⊆ M.E := by aesop_mat)


lemma basis_union_iff_indep_closure : M.Basis I (I ∪ X) ↔ M.Indep I ∧ X ⊆ M.closure I

{α : Type u_2}
{M : Matroid α}
{X I : Set α}


theorem norm_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x : PiLp 2 β) :
    ‖x‖ = √(∑ i : ι, ‖x i‖ ^ 2)

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


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

{α : Type u_1}
[AddMonoidWithOne α]
(m n : PosNum)


@[to_additive (attr := simp)]
theorem inv_mul : (↑a⁻¹ * a : α) = 1


theorem IsExtrOn.comp_antitone (hf : IsExtrOn f s a) {g : β → γ} (hg : Antitone g) :
    IsExtrOn (g ∘ f) s a

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder β]
[Preorder γ]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsExtrOn f s a)
{g : β → γ}
(hg : Antitone g)


theorem adjoint_apply_eq (y : T†.domain) {x₀ : E} (hx₀ : ∀ x : T.domain, ⟪x₀, x⟫ = ⟪(y : F), T x⟫) :
    T† y = x₀

(hx₀ : ∀ (x : ↥T.domain), ⟪x₀, ↑x⟫_𝕜 = ⟪↑y, ↑T x⟫_𝕜)


@[reassoc]
theorem Spec_Γ_naturality {R S : CommRingCat.{u}} (f : R ⟶ S) :
    f ≫ toSpecΓ S = toSpecΓ R ≫ Γ.map (Spec.toLocallyRingedSpace.map f.op).op

CategoryTheory.CategoryStruct.comp f (AlgebraicGeometry.toSpecΓ S) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.toSpecΓ R)
    (AlgebraicGeometry.LocallyRingedSpace.Γ.map (AlgebraicGeometry.Spec.toLocallyRingedSpace.map f.op).op)


/-- `Equiv.piCongrLeft` as a uniform isomorphism: this is the natural isomorphism
`Π i, β (e i) ≃ᵤ Π j, β j` obtained from a bijection `ι ≃ ι'`. -/
@[simps! apply toEquiv]
def piCongrLeft {ι ι' : Type*} {β : ι' → Type*} [∀ j, UniformSpace (β j)]
    (e : ι ≃ ι') : (∀ i, β (e i)) ≃ᵤ ∀ j, β j

{ι : Type u_4}
{ι' : Type u_5}
{β : ι' → Type u_6}
[(j : ι') → UniformSpace (β j)]
(e : ι ≃ ι')

(UniformEquiv.piCongrLeft e).toEquiv = Equiv.piCongrLeft β e


/-- The prime spectrum of a commutative (semi)ring `R` is the type of all prime ideals of `R`.

It is naturally endowed with a topology (the Zariski topology),
and a sheaf of commutative rings (see `AlgebraicGeometry.StructureSheaf`).
It is a fundamental building block in algebraic geometry. -/
@[ext]
structure PrimeSpectrum [CommSemiring R] where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime

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


theorem modEq_comm : a ≡ b [PMOD p] ↔ b ≡ a [PMOD p]

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


/-- To prove a property of a finite product, it suffices to prove that the property is
multiplicative and holds on the factors. -/
@[to_additive
      "To prove a property of a finite sum, it suffices to prove that the property is
      additive and holds on the summands."]
theorem finprod_induction {f : α → M} (p : M → Prop) (hp₀ : p 1)
    (hp₁ : ∀ x y, p x → p y → p (x * y)) (hp₂ : ∀ i, p (f i)) : p (∏ᶠ i, f i)

(hp₁ : ∀ (x y : M), p x → p y → p (x * y))


@[simp]
theorem even_toSubmodule : Subalgebra.toSubmodule (even Q) = evenOdd Q 0

{R : Type uR}
{M : Type uM}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)

Subalgebra.toSubmodule (CliffordAlgebra.even Q) = CliffordAlgebra.evenOdd Q 0


@[to_additive (attr := simp, norm_cast)]
theorem coe_eq_univ {H : Subgroup G} : (H : Set G) = Set.univ ↔ H = ⊤

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}


theorem max_erase_ne_self {s : Finset α} : (s.erase x).max ≠ x

{α : Type u_2}
[LinearOrder α]
{x : α}
{s : Finset α}


lemma toUnitHom_eq_iff (ψ : DirichletCharacter R n) : toUnitHom χ = toUnitHom ψ ↔ χ = ψ

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ ψ : DirichletCharacter R n)

MulChar.toUnitHom χ = MulChar.toUnitHom ψ ↔ χ = ψ


@[to_additive (attr := simp)]
theorem ker_codRestrict {S} [SetLike S N] [SubmonoidClass S N] (f : G →* N) (s : S)
    (h : ∀ x, f x ∈ s) : (f.codRestrict s h).ker = f.ker

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{S : Type u_8}
[SetLike S N]
[SubmonoidClass S N]
(f : G →* N)
(s : S)
(h : ∀ (x : G), f x ∈ s)


@[simp]
theorem Spec.topMap_comp {R S T : CommRingCat.{u}} (f : R ⟶ S) (g : S ⟶ T) :
    Spec.topMap (f ≫ g) = Spec.topMap g ≫ Spec.topMap f

{R S T : CommRingCat}
(f : R ⟶ S)
(g : S ⟶ T)

AlgebraicGeometry.Spec.topMap (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.Spec.topMap g) (AlgebraicGeometry.Spec.topMap f)


theorem span_eq_top_of_tmul_eq_basis [Module.Finite R M] {ι}
    (f : ι → M) (b : Basis ι k (k ⊗[R] M))
    (hb : ∀ i, 1 ⊗ₜ f i = b i) : Submodule.span R (Set.range f) = ⊤

(b : Basis ι (LocalRing.ResidueField R) (TensorProduct R (LocalRing.ResidueField R) M))


theorem swap_mul_swap_same_mem_closure_three_cycles {a b c : α} (ab : a ≠ b) (ac : a ≠ c) :
    swap a b * swap a c ∈ closure { σ : Perm α | IsThreeCycle σ }

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{a b c : α}
(ab : a ≠ b)
(ac : a ≠ c)

Equiv.swap a b * Equiv.swap a c ∈ Subgroup.closure {σ | σ.IsThreeCycle}


theorem Finset.sum_sym2_filter_not_isDiag {ι α} [LinearOrder ι] [AddCommMonoid α]
    (s : Finset ι) (p : Sym2 ι → α) :
    ∑ i in s.sym2.filter (¬ ·.IsDiag), p i =
      ∑ i in s.offDiag.filter (fun i => i.1 < i.2), p s(i.1, i.2)

{ι : Type u_6}
{α : Type u_7}
[LinearOrder ι]
[AddCommMonoid α]
(s : Finset ι)
(p : Sym2 ι → α)

∑ i ∈ Finset.filter (fun x => ¬x.IsDiag) s.sym2, p i = ∑ i ∈ Finset.filter (fun i => i.1 < i.2) s.offDiag, p s(i.1, i.2)


theorem inv_add {a₁ a₂ : ℕ} (_ : ((a₁ : ℕ) : R) = b₁) (_ : ((a₂ : ℕ) : R) = b₂) :
    ((a₁ + a₂ : ℕ) : R) = b₁ + b₂

{R : Type u_1}
[CommSemiring R]
{b₁ b₂ : R}
{a₁ a₂ : ℕ}

↑a₁ = b₁ → ↑a₂ = b₂ → ↑(a₁ + a₂) = b₁ + b₂


lemma measurable_countablePartitionSet_subtype (n : ℕ)
    (m : MeasurableSpace (countablePartition α n)) :
    @Measurable α (countablePartition α n) (countableFiltration α n) m
      (fun a ↦ ⟨countablePartitionSet n a, countablePartitionSet_mem n a⟩)

(m : MeasurableSpace ↑(MeasurableSpace.countablePartition α n))

Measurable fun a => ⟨MeasurableSpace.countablePartitionSet n a, ⋯⟩


/-- `WithLp.equiv` as a continuous linear equivalence. -/
@[simps! (config := .asFn) apply symm_apply]
protected def continuousLinearEquiv : PiLp p β ≃L[𝕜] ∀ i, β i

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

⇑(PiLp.continuousLinearEquiv p 𝕜 β) = ⇑(WithLp.equiv p ((i : ι) → β i))


@[simp]
theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}


protected theorem mul_self_lt_mul_self {a b : Int} (h1 : 0 ≤ a) (h2 : a < b) : a * a < b * b


theorem succ_le_succ_iff : succ a ≤ succ b ↔ a ≤ b


@[to_additive]
lemma prod_mul_prod_eq_prod_zipWith_of_length_eq (l l' : List M) (h : l.length = l'.length) :
    l.prod * l'.prod = (zipWith (· * ·) l l').prod

{M : Type u_4}
[AddCommMonoid M]
(l l' : List M)
(h : l.length = l'.length)

l.sum + l'.sum = (List.zipWith (fun x x_1 => x + x_1) l l').sum


@[simp] theorem cons_merge_cons_pos (s : α → α → Bool) (l r) (h : s a b) :
    merge s (a::l) (b::r) = a :: merge s l (b::r)

{α : Type u_1}
{a b : α}
(s : α → α → Bool)
(l r : List α)
(h : s a b = true)

List.merge s (a :: l) (b :: r) = a :: List.merge s l (b :: r)


@[to_additive (attr := simp)]
theorem inv_eq_self (μ : Measure G) [IsInvInvariant μ] : μ.inv = μ

{G : Type u_2}
[MeasurableSpace G]
[Neg G]
(μ : MeasureTheory.Measure G)
[μ.IsNegInvariant]


theorem deleteEdges_le_of_le {s s' : Set (Sym2 V)} (h : s ⊆ s') :
    G'.deleteEdges s' ≤ G'.deleteEdges s

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{s s' : Set (Sym2 V)}
(h : s ⊆ s')


@[to_additive]
theorem closure_inv (s : Set G) : closure s⁻¹ = (closure s)⁻¹

Submonoid.closure s⁻¹ = (Submonoid.closure s)⁻¹


theorem IsSubordinate.mono {f : BumpCovering ι X s} {U V : ι → Set X} (hU : f.IsSubordinate U)
    (hV : ∀ i, U i ⊆ V i) : f.IsSubordinate V

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
{f : BumpCovering ι X s}
{U V : ι → Set X}
(hU : f.IsSubordinate U)
(hV : ∀ (i : ι), U i ⊆ V i)


/-- The only divisors of prime powers are prime powers. See `eq_pow_find_of_dvd_irreducible_pow`
for an explicit expression as a p-power (without using `count`). -/
theorem eq_pow_count_factors_of_dvd_pow [DecidableEq (Associates α)] {p a : Associates α}
    (hp : Irreducible p) {n : ℕ} (h : a ∣ p ^ n) : a = p ^ p.count a.factors

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


theorem stdBasis_ne (i j : ι) (h : j ≠ i) (b : φ i) : stdBasis R φ i b j = 0

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
(φ : ι → Type u_3)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(i j : ι)
(h : j ≠ i)
(b : φ i)


theorem smulTower_leftMulMatrix_algebraMap_ne (x : S) (i j) {k k'} (h : k ≠ k') :
    leftMulMatrix (b.smulTower c) (algebraMap _ _ x) (i, k) (j, k') = 0

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[Ring T]
[Algebra R S]
[Algebra S T]
[Algebra R T]
[IsScalarTower R S T]
{m : Type u_4}
{n : Type u_5}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
(b : Basis m R S)
(c : Basis n S T)
(x : S)
(i j : m)
{k k' : n}
(h : k ≠ k')

(Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k') = 0


theorem imageUnopOp_inv_comp_op_factorThruImage :
    (imageUnopOp g).inv ≫ (factorThruImage g.unop).op = image.ι g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

CategoryTheory.CategoryStruct.comp (CategoryTheory.imageUnopOp g).inv
    (CategoryTheory.Limits.factorThruImage g.unop).op =
  CategoryTheory.Limits.image.ι g


theorem ofRat_inv (x : β) : ofRat x⁻¹ = ((ofRat x)⁻¹ : (Cauchy abv))

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
(x : β)

CauSeq.Completion.ofRat x⁻¹ = (CauSeq.Completion.ofRat x)⁻¹


/-- Characterizing uniformities associated to a (generalized) distance function `D`
in terms of the elements of the uniformity. -/
theorem uniformity_dist_of_mem_uniformity [LinearOrder β] {U : Filter (α × α)} (z : β)
    (D : α → α → β) (H : ∀ s, s ∈ U ↔ ∃ ε > z, ∀ {a b : α}, D a b < ε → (a, b) ∈ s) :
    U = ⨅ ε > z, 𝓟 { p : α × α | D p.1 p.2 < ε }

(D : α → α → β)

(H : ∀ (s : Set (α × α)), s ∈ U ↔ ∃ ε > z, ∀ {a b : α}, D a b < ε → (a, b) ∈ s)


theorem denseInducing_toCompl : DenseInducing (toCompl : α → Completion α)

(α : Type u_3)
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]


/-- Let `X` be an extended metric space. Let `K : ι → Set X` be a locally finite family of closed
sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there
exists a positive continuous function `δ : C(X, ℝ≥0)` such that for any `i` and `x ∈ K i`,
we have `EMetric.closedBall x (δ x) ⊆ U i`. -/
theorem exists_continuous_nnreal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
    (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) :
    ∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i

{ι : Type u_1}
{X : Type u_2}
[EMetricSpace X]
{K U : ι → Set X}
(hK : ∀ (i : ι), IsClosed (K i))
(hU : ∀ (i : ι), IsOpen (U i))
(hKU : ∀ (i : ι), K i ⊆ U i)
(hfin : LocallyFinite K)

∃ δ, (∀ (x : X), 0 < δ x) ∧ ∀ (i : ι), ∀ x ∈ K i, EMetric.closedBall x ↑(δ x) ⊆ U i


@[to_additive]
theorem lt_div_iff_mul_lt' : b < c / a ↔ a * b < c

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


/-- The initial object in `Factorisation f`, with the domain of `f` as its midpoint. -/
@[simps]
protected def initial : Factorisation f

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

CategoryTheory.Factorisation.initial.ι = CategoryTheory.CategoryStruct.id X


theorem diagonal_eq_univ_iff : diagonal α = univ ↔ Subsingleton α

Set.diagonal α = Set.univ ↔ Subsingleton α


/-- We call a category `NonPreadditiveAbelian` if it has a zero object, kernels, cokernels, binary
    products and coproducts, and every monomorphism and every epimorphism is normal. -/
class NonPreadditiveAbelian extends HasZeroMorphisms C, NormalMonoCategory C,
    NormalEpiCategory C where
  [has_zero_object : HasZeroObject C]
  [has_kernels : HasKernels C]
  [has_cokernels : HasCokernels C]
  [has_finite_products : HasFiniteProducts C]
  [has_finite_coproducts : HasFiniteCoproducts C]

[self : CategoryTheory.NonPreadditiveAbelian C]


theorem Ico_filter_lt_of_right_le [DecidablePred (· < c)] (hbc : b ≤ c) :
    ((Ico a b).filter fun x => x < c) = Ico a b

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
{a b c : α}
[DecidablePred fun x => x < c]
(hbc : b ≤ c)

Multiset.filter (fun x => x < c) (Multiset.Ico a b) = Multiset.Ico a b


lemma fibration_iff_isLowerSet_image_Iic [Preorder α] [LE β] :
    Fibration (· ≤ ·) (· ≤ ·) f ↔ ∀ x, IsLowerSet (f '' Iic x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[LE β]

Relation.Fibration (fun x x_1 => x ≤ x_1) (fun x x_1 => x ≤ x_1) f ↔ ∀ (x : α), IsLowerSet (f '' Set.Iic x)


lemma changeOriginSeries_sum_eq_partialSum_of_finite (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) (k : ℕ) :
    (p.changeOriginSeries k).sum = (p.changeOriginSeries k).partialSum (n - k)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)
(k : ℕ)


theorem Iic_pred_of_not_isMin (ha : ¬IsMin a) : Iic (pred a) = Iio a

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a : α}
(ha : ¬IsMin a)


/-- In a sum space `α ⊕ β`, one can form a topological basis by taking the union of
topological bases on each of the two components. -/
theorem IsTopologicalBasis.sum {s : Set (Set α)} (hs : IsTopologicalBasis s) {t : Set (Set β)}
    (ht : IsTopologicalBasis t) :
    IsTopologicalBasis ((fun u => Sum.inl '' u) '' s ∪ (fun u => Sum.inr '' u) '' t)

(hs : TopologicalSpace.IsTopologicalBasis s)

(ht : TopologicalSpace.IsTopologicalBasis t)

TopologicalSpace.IsTopologicalBasis ((fun u => Sum.inl '' u) '' s ∪ (fun u => Sum.inr '' u) '' t)


theorem closure_iUnion {ι} (s : ι → Set R) : closure (⋃ i, s i) = ⨆ i, closure (s i)

{R : Type u}
[Ring R]
{ι : Sort u_1}
(s : ι → Set R)

Subring.closure (⋃ i, s i) = ⨆ i, Subring.closure (s i)


@[simp]
theorem adjunction_unit_app_app_top (X : Scheme.{u}) :
    (ΓSpec.adjunction.unit.app X).app ⊤ = (Scheme.ΓSpecIso Γ(X, ⊤)).hom

AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.ΓSpec.adjunction.unit.app X) ⊤ =
  (AlgebraicGeometry.Scheme.ΓSpecIso (X.presheaf.obj (Opposite.op ⊤))).hom


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : L₁ ≅ L₂) : Comma L₁ R ≌ Comma L₂ R

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

((CategoryTheory.Comma.mapLeftIso R i).unitIso.hom.app X).right = CategoryTheory.CategoryStruct.id X.right


/-- Tower law: if `A` is a `K`-module and `K` is an extension of `F` then
$\operatorname{rank}_F(A) = \operatorname{rank}_F(K) * \operatorname{rank}_K(A)$.

This is a simpler version of `lift_rank_mul_lift_rank` with `K` and `A` in the same universe. -/
theorem rank_mul_rank (A : Type v) [AddCommGroup A]
    [Module K A] [Module F A] [IsScalarTower F K A] [Module.Free K A] :
    Module.rank F K * Module.rank K A = Module.rank F A

(F : Type u)
(K : Type v)
[Ring F]
[Ring K]
[Module F K]
[StrongRankCondition F]
[StrongRankCondition K]
[Module.Free F K]
(A : Type v)
[AddCommGroup A]
[Module K A]
[Module F A]
[IsScalarTower F K A]
[Module.Free K A]


lemma hasLeftExtension_iff_of_iso₁ : HasLeftKanExtension L F ↔ HasLeftKanExtension L' F

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
{L L' : CategoryTheory.Functor C D}
(iso₁ : L ≅ L')
(F : CategoryTheory.Functor C H)

L.HasLeftKanExtension F ↔ L'.HasLeftKanExtension F


theorem eq_const_of_compMeasurePreserving_eq (h : Ergodic f μ) {g : α →ₘ[μ] X}
    (hg_eq : g.compMeasurePreserving f h.1 = g) : ∃ c, g = .const α c

(hg_eq : g.compMeasurePreserving f ⋯ = g)

∃ c, g = MeasureTheory.AEEqFun.const α c


@[simp]
theorem continuousWithinAt_lift {hf : ∀ x y, (x ~ᵢ y) → f x = f y}
    {s : Set (SeparationQuotient X)} :
    ContinuousWithinAt (lift f hf) s (mk x) ↔ ContinuousWithinAt f (mk ⁻¹' s) x

{hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y}

ContinuousWithinAt (SeparationQuotient.lift f hf) s (SeparationQuotient.mk x) ↔
  ContinuousWithinAt f (SeparationQuotient.mk ⁻¹' s) x


@[to_additive (attr := simp)]
theorem mulLeft_symm (u : Mˣ) : u.mulLeft.symm = u⁻¹.mulLeft


/-- Let the group `G` be the union of finitely many left cosets `g i • H i`.
If the sum of the inverses of the indexes of the subgroups `H i` is equal to 1,
then the cosets of the subgroups of finite index are pairwise disjoint. -/
@[to_additive]
theorem pairwiseDisjoint_leftCoset_cover_of_sum_inv_index_eq_one
    [DecidablePred (FiniteIndex : Subgroup G → Prop)] :
    ∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 →
      Set.PairwiseDisjoint (s.filter (fun i => (H i).FiniteIndex))
        (fun i ↦ g i • (H i : Set G))

(hcovers : ⋃ i ∈ s, g i +ᵥ ↑(H i) = Set.univ)

∑ i ∈ s, (↑(H i).index)⁻¹ = 1 →
  (↑(Finset.filter (fun i => (H i).FiniteIndex) s)).PairwiseDisjoint fun i => g i +ᵥ ↑(H i)


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

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


theorem star_singleton {β : Type*} [InvolutiveStar β] (x : β) : ({x} : Set β)⋆ = {x⋆}

{β : Type u_2}
[InvolutiveStar β]
(x : β)


/-- A continuous function with compact support is in L^p. -/
theorem _root_.Continuous.memℒp_of_hasCompactSupport [OpensMeasurableSpace X]
    {f : X → E} (hf : Continuous f) (h'f : HasCompactSupport f) : Memℒp f p μ


theorem eq_one_of_pos_of_logb_eq_zero_of_base_lt_one (h₁ : 0 < x) (h₂ : logb b x = 0) : x = 1

{b x : ℝ}
(b_pos : 0 < b)
(b_lt_one : b < 1)
(h₁ : 0 < x)
(h₂ : Real.logb b x = 0)


protected theorem id : IsOpenMap (@id X)


theorem getLast?_eq_getLast_of_ne_nil : ∀ {l : List α} (h : l ≠ []), l.getLast? = some (l.getLast h)


theorem of_sub_rat (h : Irrational (x - q)) : Irrational x

(q : ℚ)
{x : ℝ}
(h : Irrational (x - ↑q))


@[fun_prop]
theorem Measurable.prod_mk {β γ} {_ : MeasurableSpace β} {_ : MeasurableSpace γ} {f : α → β}
    {g : α → γ} (hf : Measurable f) (hg : Measurable g) : Measurable fun a : α => (f a, g a)

{α : Type u_1}
{m : MeasurableSpace α}
{β : Type u_6}
{γ : Type u_7}

∀ {x : MeasurableSpace β} {x_1 : MeasurableSpace γ} {f : α → β} {g : α → γ},
  Measurable f → Measurable g → Measurable fun a => (f a, g a)


@[simp]
lemma realPart_idem {x : A} : ℜ (ℜ x : A) = ℜ x

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]
{x : A}


theorem Sbtw.ne_left {x y z : P} (h : Sbtw R x y z) : y ≠ x

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


@[simp]
theorem trans_symm (γ : Path x y) (γ' : Path y z) : (γ.trans γ').symm = γ'.symm.trans γ.symm

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


protected theorem sub_sub_self {n m : Nat} (h : m ≤ n) : n - (n - m) = m


theorem frequently_mod_eq {d n : ℕ} (h : d < n) : ∃ᶠ m in atTop, m % n = d


/-- 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)

(CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.inverseObj F).X = F ⋙ Mon_.forget D


theorem Injective.lieAlgebra_isSolvable [h₁ : IsSolvable R L] (h₂ : Injective f) :
    IsSolvable R L'

{R : Type u}
{L : Type v}
{L' : Type w₁}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
{f : L' →ₗ⁅R⁆ L}
[h₁ : LieAlgebra.IsSolvable R L]
(h₂ : Function.Injective ⇑f)


@[to_additive]
theorem preimage_div_preimage_subset {s t : Set β} : m ⁻¹' s / m ⁻¹' t ⊆ m ⁻¹' (s / t)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
[FunLike F α β]
[AddMonoidHomClass F α β]
(m : F)
{s t : Set β}


lemma end_apply (ij : ι × ι) : (b.end ij) = (Matrix.toLin b b) (Matrix.stdBasis R ι ι ij)

{R : Type u_1}
{M : Type u_2}
{ι : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[Fintype ι]
[DecidableEq ι]
(b : Basis ι R M)
(ij : ι × ι)

b.end ij = (Matrix.toLin b b) ((Matrix.stdBasis R ι ι) ij)


theorem finrank_span_finset_le_card (s : Finset M) : (s : Set M).finrank R ≤ s.card

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
(s : Finset M)


lemma map_weightSpace_eq_of_injective (hf : Injective f) :
    (weightSpace M χ).map f = weightSpace M₂ χ ⊓ f.range

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{M₂ : Type u_5}
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
{χ : L → R}
{f : M →ₗ⁅R,L⁆ M₂}
(hf : Function.Injective ⇑f)

LieSubmodule.map f (LieModule.weightSpace M χ) = LieModule.weightSpace M₂ χ ⊓ f.range


/-- Spec, as a contravariant functor from commutative rings to locally ringed spaces.
-/
@[simps]
def Spec.toLocallyRingedSpace : CommRingCat.{u}ᵒᵖ ⥤ LocallyRingedSpace

AlgebraicGeometry.Spec.toLocallyRingedSpace.obj R = AlgebraicGeometry.Spec.locallyRingedSpaceObj (Opposite.unop R)


/-- Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `invRotate` gives a triangle that can be thought of as:
```
        -h⟦-1⟧'     f       g
  Z⟦-1⟧  ───>  X  ───> Y  ───> Z
```
(note that this diagram doesn't technically fit the definition of triangle, as `Z⟦-1⟧⟦1⟧` is
not necessarily equal to `Z`, but it is isomorphic, by the `counitIso` of `shiftEquiv C 1`)
-/
@[simps!]
def Triangle.invRotate (T : Triangle C) : Triangle C

(T : CategoryTheory.Pretriangulated.Triangle C)


theorem coe_of_rat_eq : ((IntFractPair.of q).mapFr (↑) : IntFractPair K) = IntFractPair.of v

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
{q : ℚ}
(v_eq_q : v = ↑q)

GenContFract.IntFractPair.mapFr Rat.cast (GenContFract.IntFractPair.of q) = GenContFract.IntFractPair.of v


theorem iUnion_eq_if {p : Prop} [Decidable p] (s : Set α) : ⋃ _ : p, s = if p then s else ∅

{α : Type u_1}
{p : Prop}
[Decidable p]
(s : Set α)


@[simp] lemma mapEquiv_dep_iff {D : Set β} : (M.mapEquiv f).Dep D ↔ M.Dep (f.symm '' D)

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : α ≃ β}
{D : Set β}

(M.mapEquiv f).Dep D ↔ M.Dep (⇑f.symm '' D)


@[simp]
lemma preNormEDS_three : preNormEDS b c d 3 = c


@[to_additive (attr := simp)]
theorem one_mem_div_iff : (1 : α) ∈ s / t ↔ ¬Disjoint s t

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


theorem le_iff_cmp {m n} : m ≤ n ↔ cmp m n ≠ Ordering.gt


/-- The product of `f a + g a` over all of `s` is the sum over the powerset of `s` of the product of
`f` over a subset `t` times the product of `g` over the complement of `t`  -/
theorem prod_add (f g : ι → α) (s : Finset ι) :
    ∏ i ∈ s, (f i + g i) = ∑ t ∈ s.powerset, (∏ i ∈ t, f i) * ∏ i ∈ s \ t, g i

{ι : Type u_1}
{α : Type u_2}
[CommSemiring α]
[DecidableEq ι]
(f g : ι → α)
(s : Finset ι)


/-- Variant of `NNReal.rpow_add'` that avoids having to prove `y + z = w` twice. -/
lemma rpow_of_add_eq (x : ℝ≥0) (hw : w ≠ 0) (h : y + z = w) : x ^ w = x ^ y * x ^ z


theorem cauchy_sub : ∀ a b, (a - b : ℝ).cauchy = a.cauchy - b.cauchy


theorem mem_upperBounds_image2_of_mem_upperBounds_of_mem_upperBounds (ha : a ∈ lowerBounds s)
    (hb : b ∈ upperBounds t) : f a b ∈ upperBounds (image2 f s t)

{f : α → β → γ}

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


theorem rightInverse_symm (e : A₁ ≃ₐ[R] A₂) : Function.RightInverse e.symm 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₂)


theorem Module.finrank_le_one_iff_top_isPrincipal [Module.Free K V] [Module.Finite K V] :
    finrank K V ≤ 1 ↔ (⊤ : Submodule K V).IsPrincipal

{K : Type u}
{V : Type v}
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
[Module.Finite K V]

FiniteDimensional.finrank K V ≤ 1 ↔ ⊤.IsPrincipal


/-- `mapMon` is functorial in the lax monoidal functor. -/
@[simps] -- Porting note: added this, not sure how it worked previously without.
def mapMonFunctor : LaxMonoidalFunctor C D ⥤ Mon_ C ⥤ Mon_ D

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

∀ {X Y : CategoryTheory.LaxMonoidalFunctor C D} (α : X ⟶ Y) (A : Mon_ C),
  (((CategoryTheory.LaxMonoidalFunctor.mapMonFunctor C D).map α).app A).hom = α.app A.X


/-- `AlternatingMap.domDomCongr` as a linear equivalence. -/
@[simps apply symm_apply]
def domDomCongrₗ (σ : ι ≃ ι') : M [⋀^ι]→ₗ[R] N ≃ₗ[S] M [⋀^ι']→ₗ[R] N

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{ι' : Type u_8}
(S : Type u_12)
[Semiring S]
[Module S N]
[SMulCommClass R S N]
(σ : ι ≃ ι')
(f : M [⋀^ι]→ₗ[R] N)

(AlternatingMap.domDomCongrₗ S σ) f = AlternatingMap.domDomCongr σ f


/-- Given a `p : R[X]` and a `x : S` such that `p.eval₂ f x = 0`,
`f p.leadingCoeff * x` is integral. -/
theorem RingHom.isIntegralElem_leadingCoeff_mul (h : p.eval₂ f x = 0) :
    f.IsIntegralElem (f p.leadingCoeff * x)

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
(p : R[X])
(x : S)
(h : Polynomial.eval₂ f x p = 0)


@[to_additive (attr := simp, norm_cast)]
theorem coe_ofClosureMEqTopLeft (f : M → N) (hs : closure s = ⊤) (h1 hmul) :
    ⇑(ofClosureMEqTopLeft f hs h1 hmul) = f

(hmul : ∀ x ∈ s, ∀ (y : M), f (x * y) = f x * f y)

⇑(MonoidHom.ofClosureMEqTopLeft f hs h1 hmul) = f


@[to_additive]
theorem prod_single_index [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ]
    {i : ι} {b : β i} {h : ∀ i, β i → γ} (h_zero : h i 0 = 1) : (single i b).prod h = h i b

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


/-- Composition by a surjective function on the left is itself surjective. -/
theorem Surjective.comp_left {g : β → γ} (hg : Surjective g) :
    Surjective (g ∘ · : (α → β) → α → γ)

{α : Sort u}
{β : Sort v}
{γ : Sort w}
{g : β → γ}
(hg : Function.Surjective g)


@[to_additive]
theorem not_mem_of_not_mem_closure {P : M} (hP : P ∉ closure s) : P ∉ s

{M : Type u_1}
[AddZeroClass M]
{s : Set M}
{P : M}
(hP : P ∉ AddSubmonoid.closure s)


protected theorem IsLeast.insert [LinearOrder γ] (a) {b} {s : Set γ} (hs : IsLeast s b) :
    IsLeast (insert a s) (min a b)

{γ : Type w}
[LinearOrder γ]
(a : γ)
{b : γ}
{s : Set γ}
(hs : IsLeast s b)


theorem LeftInverse.injective {g : β → α} {f : α → β} : LeftInverse g f → Injective f

{α : Sort u₁}
{β : Sort u₂}
{g : β → α}
{f : α → β}

Function.LeftInverse g f → Function.Injective f


/-- An absolute value `R → ℤ` is admissible if it respects the Euclidean domain
structure and a large enough set of elements in `R^n` will contain a pair of
elements whose remainders are pointwise close together. -/
structure IsAdmissible extends IsEuclidean abv where
  protected card : ℝ → ℕ
  /-- For all `ε > 0` and finite families `A`, we can partition the remainders of `A` mod `b`
  into `abv.card ε` sets, such that all elements in each part of remainders are close together. -/
  exists_partition' :
    ∀ (n : ℕ) {ε : ℝ} (_ : 0 < ε) {b : R} (_ : b ≠ 0) (A : Fin n → R),
      ∃ t : Fin n → Fin (card ε), ∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ % b - A i₀ % b) : ℝ) < abv b • ε

{R : Type u_1}
[EuclideanDomain R]
{abv : AbsoluteValue R ℤ}
(self : abv.IsAdmissible)
(n : ℕ)
{ε : ℝ}

0 < ε →
  ∀ {b : R}, b ≠ 0 → ∀ (A : Fin n → R), ∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑(abv (A i₁ % b - A i₀ % b)) < abv b • ε


theorem isCycle_of_prime_order {σ : Perm α} (h1 : (orderOf σ).Prime)
    (h2 : σ.support.card < 2 * orderOf σ) : σ.IsCycle

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{σ : Equiv.Perm α}
(h1 : Nat.Prime (orderOf σ))
(h2 : σ.support.card < 2 * orderOf σ)


@[simp]
theorem neg_birthday : ∀ x : PGame, (-x).birthday = x.birthday


theorem normalize_eq_one {x : α} : normalize x = 1 ↔ IsUnit x

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


@[to_additive (attr := simp)]
theorem empty_pow (hn : n ≠ 0) : (∅ : Finset α) ^ n = ∅

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{n : ℕ}
(hn : n ≠ 0)


theorem RegularSpace.of_lift'_closure_le (h : ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x) :
    RegularSpace X

(h : ∀ (x : X), (𝓝 x).lift' closure ≤ 𝓝 x)


theorem IsPurelyInseparable.isAlgebraic [IsPurelyInseparable F E] :
    Algebra.IsAlgebraic F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[IsPurelyInseparable F E]


@[to_additive (attr := simp)]
theorem coe_copy {s : Set M} (hs : s = S) : (S.copy s hs : Set M) = s

{M : Type u_1}
[AddZeroClass M]
{S : AddSubmonoid M}
{s : Set M}
(hs : s = ↑S)


@[simp]
theorem powersetAux'_cons (a : α) (l : List α) :
    powersetAux' (a :: l) = powersetAux' l ++ List.map (cons a) (powersetAux' l)

Multiset.powersetAux' (a :: l) = Multiset.powersetAux' l ++ List.map (Multiset.cons a) (Multiset.powersetAux' l)


/-- If `a` is a unit and `n : ℕ`, then `(χ ^ n) a = (χ a) ^ n`. -/
theorem pow_apply_coe (χ : MulChar R R') (n : ℕ) (a : Rˣ) : (χ ^ n) a = χ a ^ n

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
(χ : MulChar R R')
(n : ℕ)
(a : Rˣ)


/-- A weaker, but easier-to-apply, version of `Complex.Gamma_ne_zero`. -/
theorem Gamma_ne_zero_of_re_pos {s : ℂ} (hs : 0 < re s) : Gamma s ≠ 0


@[simp]
theorem inf_lt_left : a ⊓ b < a ↔ ¬a ≤ b

{α : Type u}
[SemilatticeInf α]
{a b : α}


/-- **Abel's limit theorem**. Given a real power series converging at 1, the corresponding function
is continuous at 1 when approaching 1 from the left. -/
theorem tendsto_tsum_powerSeries_nhdsWithin_lt
    (h : Tendsto (fun n ↦ ∑ i ∈ range n, f i) atTop (𝓝 l)) :
    Tendsto (fun x ↦ ∑' n, f n * x ^ n) (𝓝[<] 1) (𝓝 l)

(h : Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop (𝓝 l))

Filter.Tendsto (fun x => ∑' (n : ℕ), f n * x ^ n) (𝓝[<] 1) (𝓝 l)


@[simp]
theorem sumAssoc_apply_inl_inr : sumAssoc α β γ (inl (inr b)) = inr (inl b)

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

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


theorem equitableOn_iff_exists_le_le_add_one {s : Set α} {f : α → ℕ} :
    s.EquitableOn f ↔ ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1


theorem toNNReal_rpow (x : ℝ≥0∞) (z : ℝ) : x.toNNReal ^ z = (x ^ z).toNNReal


theorem isRegular_X_pow (n : ℕ) : IsRegular (X ^ n : R[X])


theorem equiv_eq_conj (a : A) :
    (of (φ a : G) : HNNExtension G A B φ) = t * of (a : G) * t⁻¹

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

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


theorem sum_card_parts : ∑ i ∈ P.parts, i.card = s.card

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)


@[simp]
theorem Orthonormal.equiv_apply {ι' : Type*} {v : Basis ι 𝕜 E} (hv : Orthonormal 𝕜 v)
    {v' : Basis ι' 𝕜 E'} (hv' : Orthonormal 𝕜 v') (e : ι ≃ ι') (i : ι) :
    hv.equiv hv' e (v i) = v' (e i)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
{ι' : Type u_9}
{v : Basis ι 𝕜 E}
(hv : Orthonormal 𝕜 ⇑v)
{v' : Basis ι' 𝕜 E'}
(hv' : Orthonormal 𝕜 ⇑v')
(e : ι ≃ ι')
(i : ι)


/-- Not an instance to avoid a loop. -/
theorem HomClass.strongHomClassOfIsAlgebraic [L.IsAlgebraic] {F M N} [L.Structure M] [L.Structure N]
    [FunLike F M N] [HomClass L F M N] : StrongHomClass L F M N

{L : FirstOrder.Language}
[L.IsAlgebraic]
{F : Type u_3}
{M : Type u_4}
{N : Type u_5}
[L.Structure M]
[L.Structure N]
[FunLike F M N]
[L.HomClass F M N]


/-- If our derivatives converge uniformly, then the Fréchet derivatives converge uniformly -/
theorem UniformCauchySeqOnFilter.one_smulRight {l' : Filter 𝕜}
    (hf' : UniformCauchySeqOnFilter f' l l') :
    UniformCauchySeqOnFilter (fun n => fun z => (1 : 𝕜 →L[𝕜] 𝕜).smulRight (f' n z)) l l'

UniformCauchySeqOnFilter (fun n z => ContinuousLinearMap.smulRight 1 (f' n z)) l l'


/-- Given a multifork, we may obtain a fork over `∏ᶜ I.left ⇉ ∏ᶜ I.right`. -/
@[simps pt]
noncomputable def toPiFork (K : Multifork I) : Fork I.fstPiMap I.sndPiMap

{I : CategoryTheory.Limits.MulticospanIndex C}


/-- The order embedding sending `b` to `b * a`, for some fixed `a`.
See also `OrderIso.mulRight` when working in an ordered group. -/
@[to_additive (attr := simps!)
      "The order embedding sending `b` to `b + a`, for some fixed `a`.
       See also `OrderIso.addRight` when working in an additive ordered group."]
def OrderEmbedding.mulRight {α : Type*} [Mul α] [LinearOrder α]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α

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


theorem mul_eval_of_const_right (l₁ l₂ : LinearCombo) (v : Coeffs) (w : l₂.coeffs.isZero) :
    (mul l₁ l₂).eval v = l₁.eval v * l₂.eval v

(l₁ l₂ : Lean.Omega.LinearCombo)
(v : Lean.Omega.Coeffs)
(w : l₂.coeffs.isZero)

(l₁.mul l₂).eval v = l₁.eval v * l₂.eval v


theorem psigmaCongrRight_trans {α} {β₁ β₂ β₃ : α → Sort*}
    (F : ∀ a, β₁ a ≃ β₂ a) (G : ∀ a, β₂ a ≃ β₃ a) :
    (psigmaCongrRight F).trans (psigmaCongrRight G) =
      psigmaCongrRight fun a => (F a).trans (G a)

{α : Sort u_4}
{β₁ : α → Sort u_1}
{β₂ : α → Sort u_2}
{β₃ : α → Sort u_3}
(F : (a : α) → β₁ a ≃ β₂ a)
(G : (a : α) → β₂ a ≃ β₃ a)

(Equiv.psigmaCongrRight F).trans (Equiv.psigmaCongrRight G) = Equiv.psigmaCongrRight fun a => (F a).trans (G a)


/-- Given an open cover `{ Zᵢ }` of `Z`, then `X ×[Z] Y` is covered by `Xᵢ ×[Zᵢ] Yᵢ`, where
  `Xᵢ = X ×[Z] Zᵢ` and `Yᵢ = Y ×[Z] Zᵢ` is the preimage of `Zᵢ` in `X` and `Y`. -/
@[simps! J obj map]
def openCoverOfBase (𝒰 : OpenCover Z) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)

{X Y Z : AlgebraicGeometry.Scheme}
(𝒰 : Z.OpenCover)
(f : X ⟶ Z)
(g : Y ⟶ Z)

(AlgebraicGeometry.Scheme.Pullback.openCoverOfBase 𝒰 f g).J = 𝒰.J


@[simp]
theorem coe_refl : (Homeomorph.refl α : C(α, α)) = ContinuousMap.id α

(Homeomorph.refl α).toContinuousMap = ContinuousMap.id α


protected theorem tsub_inj_right (hab : AddLECancellable (a - b)) (h₁ : b ≤ a) (h₂ : c ≤ a)
    (h₃ : a - b = a - c) : b = c

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


lemma toZeroHom_injective : Injective (toZeroHom : (α →*₀ β) → ZeroHom α β)

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


@[simp]
theorem aleph0_lt_lift {c : Cardinal.{u}} : ℵ₀ < lift.{v} c ↔ ℵ₀ < c

Cardinal.aleph0 < Cardinal.lift.{v, u} c ↔ Cardinal.aleph0 < c


@[simp]
theorem to_real_re (x : ℤ[i]) : ((x.re : ℤ) : ℝ) = (x : ℂ).re


/-- Flipping a square by switching the top-right and the bottom-left objects. -/
@[simps]
def flip (sq : Square C) : Square C

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


@[simp]
theorem ceil_eq_zero : ⌈a⌉₊ = 0 ↔ a ≤ 0

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}

⌈a⌉₊ = 0 ↔ a ≤ 0


@[simp]
theorem isUnit_gcd_one_right [GCDMonoid α] (a : α) : IsUnit (gcd a 1)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(a : α)


theorem realize_mapTermRel_id [L'.Structure M]
    {ft : ∀ n, L.Term (α ⊕ (Fin n)) → L'.Term (β ⊕ (Fin n))}
    {fr : ∀ n, L.Relations n → L'.Relations n} {n} {φ : L.BoundedFormula α n} {v : α → M}
    {v' : β → M} {xs : Fin n → M}
    (h1 :
      ∀ (n) (t : L.Term (α ⊕ (Fin n))) (xs : Fin n → M),
        (ft n t).realize (Sum.elim v' xs) = t.realize (Sum.elim v xs))
    (h2 : ∀ (n) (R : L.Relations n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x) :
    (φ.mapTermRel ft fr fun _ => id).Realize v' xs ↔ φ.Realize v xs

{ft : (n : ℕ) → L.Term (α ⊕ Fin n) → L'.Term (β ⊕ Fin n)}

{fr : (n : ℕ) → L.Relations n → L'.Relations n}

(h1 :
  ∀ (n : ℕ) (t : L.Term (α ⊕ Fin n)) (xs : Fin n → M),
    FirstOrder.Language.Term.realize (Sum.elim v' xs) (ft n t) = FirstOrder.Language.Term.realize (Sum.elim v xs) t)

(h2 :
  ∀ (n : ℕ) (R : L.Relations n) (x : Fin n → M),
    FirstOrder.Language.Structure.RelMap (fr n R) x = FirstOrder.Language.Structure.RelMap R x)

(FirstOrder.Language.BoundedFormula.mapTermRel ft fr (fun x => id) φ).Realize v' xs ↔ φ.Realize v xs


theorem card_Ioo :
    (Finset.Ioo s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2

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

(Finset.Ioo s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (Multiset.count i t + 1 - Multiset.count i s) - 2


@[rify_simps] lemma ofNat_rat_real (a : ℕ) [a.AtLeastTwo] :
    ((no_index (OfNat.ofNat a : ℚ)) : ℝ) = (OfNat.ofNat a : ℝ)


/-- To check that a filter is frequently bounded, it suffices to have a witness
which bounds `f` at some point for every admissible set.

This is only an implication, as the other direction is wrong for the trivial filter. -/
theorem IsCobounded.mk [IsTrans α r] (a : α) (h : ∀ s ∈ f, ∃ x ∈ s, r a x) : f.IsCobounded r

{α : Type u_1}
{r : α → α → Prop}
{f : Filter α}
[IsTrans α r]
(a : α)
(h : ∀ s ∈ f, ∃ x ∈ s, r a x)


/-- Given `w : TwoSquare T L R B` and `X₂ : C₂`, this is the obvious functor
`StructuredArrow X₂ T ⥤ StructuredArrow (R.obj X₂) B`. -/
@[simps! obj map]
def structuredArrowDownwards (X₂ : C₂) :
    StructuredArrow X₂ T ⥤ StructuredArrow (R.obj X₂) B

(X : CategoryTheory.StructuredArrow X₂ T)

(w.structuredArrowDownwards X₂).obj X =
  (CategoryTheory.StructuredArrow.pre (R.obj X₂) L B).obj
    ((CategoryTheory.Comma.mapRight (CategoryTheory.Functor.fromPUnit (R.obj X₂)) w).obj
      (CategoryTheory.StructuredArrow.mk (R.map X.hom)))


/-- If `f` subsumes `c` (i.e. `c ∈ f`), then `f.proof c`. -/
theorem Fmla.proof_of_subsumes {f : Fmla} {c : Clause}
    (H : Fmla.subsumes f (Fmla.one c)) : f.proof c

{f : Sat.Fmla}
{c : Sat.Clause}
(H : f.subsumes (Sat.Fmla.one c))


@[continuity, fun_prop]
theorem Continuous.quotient_map' {t : Setoid Y} {f : X → Y} (hf : Continuous f)
    (H : (s.r ⇒ t.r) f f) : Continuous (Quotient.map' f H)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Setoid X}
{t : Setoid Y}
{f : X → Y}
(hf : Continuous f)
(H : (Setoid.r ⇒ Setoid.r) f f)


@[simp]
theorem contMDiffOn_transDiffeomorph_right {f : M' → M} {s} :
    ContMDiffOn I' (I.transDiffeomorph e) n f s ↔ ContMDiffOn I' I n f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F)
{f : M' → M}
{s : Set M'}


theorem eventuallyConst_of_isArtinian (f : ℕ →o (Submodule R M)ᵒᵈ) :
    atTop.EventuallyConst f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinian R M]
(f : ℕ →o (Submodule R M)ᵒᵈ)


theorem Set.Finite.isGδ_compl {s : Set X} [T1Space X] (hs : s.Finite) : IsGδ sᶜ

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[T1Space X]
(hs : s.Finite)


theorem IsHermitian.pow [Fintype n] [DecidableEq n] {A : Matrix n n α} (h : A.IsHermitian) (k : ℕ) :
    (A ^ k).IsHermitian

{α : Type u_1}
{n : Type u_4}
[Semiring α]
[StarRing α]
[Fintype n]
[DecidableEq n]
{A : Matrix n n α}
(h : A.IsHermitian)
(k : ℕ)


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded function, then for every `x : R`,
  `seminormFromBounded' f x` is bounded above by some multiple of `f x`. -/
theorem seminormFromBounded_le (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) (x : R) :
    seminormFromBounded' f x ≤ c * f x

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)


@[simp]
theorem exp_smul_eps (r : R) : exp 𝕜 (r • eps : DualNumber R) = 1 + r • eps

(𝕜 : Type u_1)
{R : Type u_2}
[Field 𝕜]
[CharZero 𝕜]
[CommRing R]
[Algebra 𝕜 R]
[UniformSpace R]
[TopologicalRing R]
[T2Space R]
(r : R)

NormedSpace.exp 𝕜 (r • DualNumber.eps) = 1 + r • DualNumber.eps


/--
`P` is a sheaf for `Presieve.ofArrows X π`, iff the fork given by `w` is an equalizer.
See <https://stacks.math.columbia.edu/tag/00VM>.
-/
theorem sheaf_condition : (Presieve.ofArrows X π).IsSheafFor P ↔
    Nonempty (IsLimit (Fork.ofι (forkMap P X π) (w P X π)))

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

CategoryTheory.Presieve.IsSheafFor P (CategoryTheory.Presieve.ofArrows X π) ↔
  Nonempty
    (CategoryTheory.Limits.IsLimit
      (CategoryTheory.Limits.Fork.ofι (CategoryTheory.Equalizer.Presieve.Arrows.forkMap P X π) ⋯))


theorem IsVanKampenColimit.whiskerEquivalence_iff {K : Type*} [Category K] (e : J ≌ K)
    {F : K ⥤ C} {c : Cocone F} :
    IsVanKampenColimit (c.whisker e.functor) ↔ IsVanKampenColimit c

{J : Type v'}
[CategoryTheory.Category.{u', v'} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{K : Type u_3}
[CategoryTheory.Category.{u_4, u_3} K]
(e : J ≌ K)
{F : CategoryTheory.Functor K C}
{c : CategoryTheory.Limits.Cocone F}

CategoryTheory.IsVanKampenColimit (CategoryTheory.Limits.Cocone.whisker e.functor c) ↔
  CategoryTheory.IsVanKampenColimit c


/-- A centroid, over the image of an embedding, equals a centroid with
the same points and weights over the original `Finset`. -/
theorem centroid_map (e : ι₂ ↪ ι) (p : ι → P) :
    (s₂.map e).centroid k p = s₂.centroid k (p ∘ e)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
{ι₂ : Type u_5}
(s₂ : Finset ι₂)
(e : ι₂ ↪ ι)
(p : ι → P)

Finset.centroid k (Finset.map e s₂) p = Finset.centroid k s₂ (p ∘ ⇑e)


theorem coprime_list_prod_right_iff {k : ℕ} {l : List ℕ} :
    Coprime k l.prod ↔ ∀ n ∈ l, Coprime k n


theorem decide_false_iff (p : Prop) {_ : Decidable p} : decide p = false ↔ ¬p

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


/--
If `s` is a spanning set of `Γ(X, U)`, such that each `X.basicOpen i` is affine, then `U` is also
affine.
-/
lemma isAffineOpen_of_isAffineOpen_basicOpen (U) (s : Set Γ(X, U))
    (hs : Ideal.span s = ⊤) (hs₂ : ∀ i ∈ s, IsAffineOpen (X.basicOpen i)) :
    IsAffineOpen U

(s : Set ↑(X.presheaf.obj (Opposite.op U)))

(hs₂ : ∀ i ∈ s, AlgebraicGeometry.IsAffineOpen (X.basicOpen i))


@[to_additive (attr := simp)]
theorem inv_subset_closure (S : Set G) : S⁻¹ ⊆ closure S


/-- If a monotone sequence of functions has an upper bound and the sequence of integrals of these
functions tends to the integral of the upper bound, then the sequence of functions converges
almost everywhere to the upper bound. Auxiliary version assuming moreover that the
functions in the sequence are ae measurable. -/
lemma tendsto_of_lintegral_tendsto_of_monotone_aux {α : Type*} {mα : MeasurableSpace α}
    {f : ℕ → α → ℝ≥0∞} {F : α → ℝ≥0∞} {μ : Measure α}
    (hf_meas : ∀ n, AEMeasurable (f n) μ) (hF_meas : AEMeasurable F μ)
    (hf_tendsto : Tendsto (fun i ↦ ∫⁻ a, f i a ∂μ) atTop (𝓝 (∫⁻ a, F a ∂μ)))
    (hf_mono : ∀ᵐ a ∂μ, Monotone (fun i ↦ f i a))
    (h_bound : ∀ᵐ a ∂μ, ∀ i, f i a ≤ F a) (h_int_finite : ∫⁻ a, F a ∂μ ≠ ∞) :
    ∀ᵐ a ∂μ, Tendsto (fun i ↦ f i a) atTop (𝓝 (F a))

{f : ℕ → α → ℝ≥0∞}

{F : α → ℝ≥0∞}

(hf_meas : ∀ (n : ℕ), AEMeasurable (f n) μ)

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

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

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

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


@[to_additive (attr := simp)]
theorem mem_top (x : G) : x ∈ (⊤ : Subgroup G)


@[to_additive vadd_image_prod]
theorem image_smul_prod : (fun x : α × β ↦ x.fst • x.snd) '' s ×ˢ t = s • t

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


theorem universalHom_apply {r : R} {s : S} :
    universalHom f fS hf (r /ₒ s) = ((fS s)⁻¹ : Units T) * f r

{R : Type u_1}
[Semiring R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{T : Type u_3}
[Semiring T]
(f : R →+* T)
(fS : ↥S →* Tˣ)
(hf : ∀ (s : ↥S), f ↑s = ↑(fS s))
{r : R}
{s : ↥S}

(OreLocalization.universalHom f fS hf) (r /ₒ s) = ↑(fS s)⁻¹ * f r


/-- The second projection in a product is a trivial fiber bundle. -/
theorem isHomeomorphicTrivialFiberBundle_snd :
    IsHomeomorphicTrivialFiberBundle F (Prod.snd : F × B → B)

{B : Type u_1}
(F : Type u_2)
[TopologicalSpace B]
[TopologicalSpace F]


theorem Step.isIntegral (n) : ∀ z : Step k n, IsIntegral k z

(k : Type u)
[Field k]
(n : ℕ)
(z : AlgebraicClosure.Step k n)


@[simp]
theorem mk_add_mk [AddZeroClass α] [Preorder α] [CovariantClass α α (· + ·) (· ≤ ·)] {x y : α}
    (hx : 0 ≤ x) (hy : 0 ≤ y) :
    (⟨x, hx⟩ : { x : α // 0 ≤ x }) + ⟨y, hy⟩ = ⟨x + y, add_nonneg hx hy⟩

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


/-- The trace map from a finite field to its prime field is nongedenerate. -/
theorem trace_to_zmod_nondegenerate (F : Type*) [Field F] [Finite F]
    [Algebra (ZMod (ringChar F)) F] {a : F} (ha : a ≠ 0) :
    ∃ b : F, Algebra.trace (ZMod (ringChar F)) F (a * b) ≠ 0

(F : Type u_1)
[Field F]
[Finite F]
[Algebra (ZMod (ringChar F)) F]
{a : F}
(ha : a ≠ 0)

∃ b, (Algebra.trace (ZMod (ringChar F)) F) (a * b) ≠ 0


/-- The canonical inclusion of rings `R →+* Unitization R A`. -/
@[simps apply]
def inlRingHom [Semiring R] [NonUnitalSemiring A] [Module R A] : R →+* Unitization R A

(R : Type u_1)
(A : Type u_2)
[Semiring R]
[NonUnitalSemiring A]
[Module R A]
(r : R)

(Unitization.inlRingHom R A) r = Unitization.inl r


theorem ofDigits_digits (b n : ℕ) : ofDigits b (digits b n) = n


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

a = ⊥ ↔ a ≤ ⊥


@[simp]
theorem coe_subtypeEquivCodomain (f : { x' // x' ≠ x } → Y) :
    (subtypeEquivCodomain f : _ → Y) =
      fun g : { g : X → Y // g ∘ (↑) = f } => (g : X → Y) x

{X : Sort u_2}
[DecidableEq X]
{x : X}
{Y : Sort u_1}
(f : { x' // x' ≠ x } → Y)

⇑(Equiv.subtypeEquivCodomain f) = fun g => ↑g x


/-- Taking cokernels is an order-reversing map from the subobjects of `X` to the quotient objects
    of `X`. -/
@[simps]
def cokernelOrderHom [HasCokernels C] (X : C) : Subobject X →o (Subobject (op X))ᵒᵈ

∀ (a : CategoryTheory.Subobject X),
  (CategoryTheory.Limits.cokernelOrderHom X) a =
    CategoryTheory.Subobject.lift (fun A f x => CategoryTheory.Subobject.mk (CategoryTheory.Limits.cokernel.π f).op) ⋯ a


theorem reverse_concat' (l : List α) (a : α) : (l ++ [a]).reverse = a :: l.reverse


theorem const_mul_lintegral (f : α →ₛ ℝ≥0∞) (x : ℝ≥0∞) :
    (const α x * f).lintegral μ = x * f.lintegral μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α ℝ≥0∞)
(x : ℝ≥0∞)

(MeasureTheory.SimpleFunc.const α x * f).lintegral μ = x * f.lintegral μ


theorem commute_int_add (n : ℤ) : Function.Commute f (n + ·)


theorem num_mul_denom_add_denom_mul_num_ne_zero {x y : RatFunc K} (hxy : x + y ≠ 0) :
    x.num * y.denom + x.denom * y.num ≠ 0

{K : Type u}
[Field K]
{x y : RatFunc K}
(hxy : x + y ≠ 0)


@[simp]
theorem nontrivial_iff : Nontrivial (LieSubmodule R L M) ↔ Nontrivial M

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]


@[simp]
theorem tendsto_comp_coe_Ioo_atBot (h : a < b) :
    Tendsto (fun x : Ioo a b => f x) atBot l ↔ Tendsto f (𝓝[>] a) l

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}
{l : Filter β}
{f : α → β}
(h : a < b)

Filter.Tendsto (fun x => f ↑x) Filter.atBot l ↔ Filter.Tendsto f (𝓝[>] a) l


/-- A multiplicative morphism between commutative monoids gives a braided functor between
the corresponding discrete braided monoidal categories.
-/
@[simps!]
def Discrete.braidedFunctor (F : M →* N) : BraidedFunctor (Discrete M) (Discrete N)

{M : Type u}
[CommMonoid M]
{N : Type u}
[CommMonoid N]
(F : M →* N)
(X Y : CategoryTheory.Discrete M)

(CategoryTheory.Discrete.braidedFunctor F).μ X Y = CategoryTheory.Discrete.eqToHom ⋯


@[simp]
theorem star_sub [AddGroup R] [StarAddMonoid R] (r s : R) : star (r - s) = star r - star s

{R : Type u}
[AddGroup R]
[StarAddMonoid R]
(r s : R)


/-- The Hausdorff distance between a set and its closure vanishes. -/
@[simp]
theorem hausdorffDist_self_closure : hausdorffDist s (closure s) = 0

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}


/-- Composition of lax prefunctors. -/
@[simps]
def comp (F : PrelaxFunctorStruct B C) (G : PrelaxFunctorStruct C D) : PrelaxFunctorStruct B D

(F : CategoryTheory.PrelaxFunctorStruct B C)

(G : CategoryTheory.PrelaxFunctorStruct C D)

(F.comp G).toPrefunctor = F.toPrefunctor ⋙q G.toPrefunctor


lemma integrable_llr_tilted_right [IsFiniteMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hfμ : Integrable f μ)
    (h_int : Integrable (llr μ ν) μ) (hfν : Integrable (fun x ↦ exp (f x)) ν) :
    Integrable (llr μ (ν.tilted f)) μ

(h_int : MeasureTheory.Integrable (MeasureTheory.llr μ ν) μ)

(hfν : MeasureTheory.Integrable (fun x => rexp (f x)) ν)

MeasureTheory.Integrable (MeasureTheory.llr μ (ν.tilted f)) μ


@[simp]
theorem down_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    down (no_index (OfNat.ofNat n : ULift α)) = OfNat.ofNat n

{α : Type u}
[NatCast α]
(n : ℕ)
[n.AtLeastTwo]


theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : Mem.other h ≠ a

{α : Type u_1}
{a : α}
{z : Sym2 α}
(hd : ¬z.IsDiag)
(h : a ∈ z)


theorem mk_emptyCollection (α : Type u) : #(∅ : Set α) = 0


theorem nodup_iff_forall_not_duplicate : Nodup l ↔ ∀ x : α, ¬x ∈+ l

l.Nodup ↔ ∀ (x : α), ¬List.Duplicate x l


/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfLax' (F : LaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

((CategoryTheory.Pseudofunctor.mkOfLax' F).mapId a).inv = F.mapId a


theorem Additive.isAddGroupHom [Group α] [Group β] {f : α → β} (hf : IsGroupHom f) :
    @IsAddGroupHom (Additive α) (Additive β) _ _ f

{α : Type u}
{β : Type v}
[Group α]
[Group β]
{f : α → β}
(hf : IsGroupHom f)


theorem ediv_eq_ediv_of_mul_eq_mul {a b c d : Int}
    (H2 : d ∣ c) (H3 : b ≠ 0) (H4 : d ≠ 0) (H5 : a * d = b * c) : a / b = c / d


theorem Restriction.trans {M₁ M₂ M₃ : Matroid α} (h : M₁ ≤r M₂) (h' : M₂ ≤r M₃) : M₁ ≤r M₃

{α : Type u_1}
{M₁ M₂ M₃ : Matroid α}
(h : M₁.Restriction M₂)
(h' : M₂.Restriction M₃)


@[simp]
theorem LinearMap.toMatrix'_algebraMap (x : R) :
    LinearMap.toMatrix' (algebraMap R (Module.End R (n → R)) x) = scalar n x

{R : Type u_1}
[CommSemiring R]
{n : Type u_5}
[DecidableEq n]
[Fintype n]
(x : R)

LinearMap.toMatrix' ((algebraMap R (Module.End R (n → R))) x) = (Matrix.scalar n) x


/-- `s`, coerced to a type, is a nontrivial type if and only if `s` is a nontrivial set. -/
@[simp, norm_cast]
theorem nontrivial_coe_sort {s : Set α} : Nontrivial s ↔ s.Nontrivial


theorem toStepSucc.exists_root {n} {f : Polynomial (Step k n)} (hfm : f.Monic)
    (hfi : Irreducible f) : ∃ x : Step k (n + 1), f.eval₂ (toStepSucc k n) x = 0

(k : Type u)
[Field k]
{n : ℕ}
{f : (AlgebraicClosure.Step k n)[X]}
(hfm : f.Monic)
(hfi : Irreducible f)

∃ x, Polynomial.eval₂ (AlgebraicClosure.toStepSucc k n) x f = 0


@[simp]
theorem mk_sum (α : Type u) (β : Type v) : #(α ⊕ β) = lift.{v, u} #α + lift.{u, v} #β

Cardinal.mk (α ⊕ β) = Cardinal.lift.{v, u} (Cardinal.mk α) + Cardinal.lift.{u, v} (Cardinal.mk β)


theorem reflective_products [HasFiniteProducts C] [Reflective i] : HasFiniteProducts D


theorem isComplement'_stabilizer_of_coprime {α : H.QuotientDiff}
    (hH : Nat.Coprime (Nat.card H) H.index) : IsComplement' H (stabilizer G α)

H.IsComplement' (MulAction.stabilizer G α)


/-- **Apollonius's Theorem**. -/
theorem dist_sq_add_dist_sq_eq_two_mul_dist_midpoint_sq_add_half_dist_sq (a b c : P) :
    dist a b ^ 2 + dist a c ^ 2 = 2 * (dist a (midpoint ℝ b c) ^ 2 + (dist b c / 2) ^ 2)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(a b c : P)


@[to_additive]
theorem smul_le_smul : f₁ ≤ f₂ → g₁ ≤ g₂ → f₁ • g₁ ≤ f₂ • g₂

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f₁ f₂ : Filter α}
{g₁ g₂ : Filter β}

f₁ ≤ f₂ → g₁ ≤ g₂ → f₁ +ᵥ g₁ ≤ f₂ +ᵥ g₂


lemma div_div_div_cancel_right (a : G₀) (hc : c ≠ 0) : a / c / (b / c) = a / b

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


lemma IsPointwiseRightKanExtension.hasRightKanExtension :
    HasRightKanExtension L F

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
[CategoryTheory.Category.{u_5, u_3} H]
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
{E : L.RightExtension F}
(h : E.IsPointwiseRightKanExtension)


@[simp]
theorem nodup_rotate {l : List α} {n : ℕ} : Nodup (l.rotate n) ↔ Nodup l


theorem flip_flip :
    flipHom.trans flipHom = LinearEquiv.refl R (BilinForm R M)

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

LinearMap.BilinForm.flipHom ≪≫ₗ LinearMap.BilinForm.flipHom = LinearEquiv.refl R (LinearMap.BilinForm R M)


theorem Icc_subset_Icc_right (h : b₁ ≤ b₂) : Icc a b₁ ⊆ Icc a b₂

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


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


theorem withDensity_smul_measure (r : ℝ≥0∞) (f : α → ℝ≥0∞) :
    (r • μ).withDensity f = r • μ.withDensity f

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


@[simp]
lemma Differentiable.add_iff_left (hg : Differentiable 𝕜 g) :
    Differentiable 𝕜 (fun y => f y + g y) ↔ Differentiable 𝕜 f

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

(Differentiable 𝕜 fun y => f y + g y) ↔ Differentiable 𝕜 f


@[measurability]
theorem aestronglyMeasurable_const {α β} {_ : MeasurableSpace α} {μ : Measure α}
    [TopologicalSpace β] {b : β} : AEStronglyMeasurable (fun _ : α => b) μ

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : TopologicalSpace β] {b : β},
  MeasureTheory.AEStronglyMeasurable (fun x => b) μ


theorem esymm_neg (s : Multiset R) (k : ℕ) : (map Neg.neg s).esymm k = (-1) ^ k * esymm s k

{R : Type u_1}
[CommRing R]
(s : Multiset R)
(k : ℕ)

(Multiset.map Neg.neg s).esymm k = (-1) ^ k * s.esymm k


theorem ext_iff {inst₁ inst₂ : NonUnitalNonAssocSemiring R} :
    inst₁ = inst₂ ↔
      (local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) ∧
      (local_hMul[R, inst₁] = local_hMul[R, inst₂])

inst₁ = inst₂ ↔ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul


theorem tprod_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
    (s : ∀ i, Set (π i)) :
    Measure.tprod l μ (Set.tprod l s) = (l.map fun i => (μ i) (s i)).prod

(μ : (i : δ) → MeasureTheory.Measure (π i))

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

(MeasureTheory.Measure.tprod l μ) (Set.tprod l s) = (List.map (fun i => (μ i) (s i)) l).prod


theorem AffineEquiv.pointReflection_midpoint_left (x y : P) :
    pointReflection R (midpoint R x y) x = y

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

(AffineEquiv.pointReflection R (midpoint R x y)) x = y


/-- The functor `(F, S) ⥤ (F ⋙ G, G(S))`. -/
@[simps]
def post (F : B ⥤ C) (G : C ⥤ D) (S : C) :
    CostructuredArrow F S ⥤ CostructuredArrow (F ⋙ G) (G.obj S)

(X : CategoryTheory.CostructuredArrow F S)

(CategoryTheory.CostructuredArrow.post F G S).obj X = CategoryTheory.CostructuredArrow.mk (G.map X.hom)


theorem pullback_snd_isIso_of_range_subset (H : Set.range g.base ⊆ Set.range f.base) :
    IsIso (pullback.snd f g)

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

[hf : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

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

CategoryTheory.IsIso (CategoryTheory.Limits.pullback.snd f g)


@[simp] lemma op_braiding (X Y : C) : (β_ X Y).op = β_ (op Y) (op X)

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

(β_ X Y).op = β_ (Opposite.op Y) (Opposite.op X)


@[simp]
theorem coe_comp (f : C(β, γ)) (g : C(α, β)) : ⇑(comp f g) = f ∘ g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(f : C(β, γ))
(g : C(α, β))


lemma Bornology.ext_iff (t t' : Bornology α) :
    t = t' ↔ @Bornology.cobounded α t = @Bornology.cobounded α t'

t = t' ↔ Bornology.cobounded α = Bornology.cobounded α


/-- The function `fun x ↦ f x / r` tends to negative infinity along a nontrivial filter
if and only if `r > 0` and `f` tends to negative infinity or `r < 0` and `f` tends to infinity. -/
lemma tendsto_div_const_atBot_iff [NeBot l] :
    Tendsto (fun x ↦ f x / r) l atBot ↔ 0 < r ∧ Tendsto f l atBot ∨ r < 0 ∧ Tendsto f l atTop

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]

Filter.Tendsto (fun x => f x / r) l Filter.atBot ↔
  0 < r ∧ Filter.Tendsto f l Filter.atBot ∨ r < 0 ∧ Filter.Tendsto f l Filter.atTop


theorem invFunOn_pos (h : ∃ a ∈ s, f a = b) : invFunOn f s b ∈ s ∧ f (invFunOn f s b) = b

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
{s : Set α}
{f : α → β}
{b : β}
(h : ∃ a ∈ s, f a = b)

Function.invFunOn f s b ∈ s ∧ f (Function.invFunOn f s b) = b


@[simp]
theorem symm_refl : (Diffeomorph.refl I M n).symm = Diffeomorph.refl I M n

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{n : ℕ∞}


theorem natCast_mem_one (n : ℕ) : (n : R) ∈ (1 : AddSubmonoid R)

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


@[simp]
theorem inv_mk {f} (hf) : (mk (abv := abv) f)⁻¹ = mk (inv f hf)

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
{f : CauSeq β abv}
(hf : ¬f.LimZero)

(CauSeq.Completion.mk f)⁻¹ = CauSeq.Completion.mk (f.inv hf)


theorem descFactorial_one (n : ℕ) : n.descFactorial 1 = n


theorem card_cycleType_eq_zero {σ : Perm α} : Multiset.card σ.cycleType = 0 ↔ σ = 1

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


@[continuity, fun_prop]
protected theorem continuous : Continuous fun x => p.eval x

{R : Type u_1}
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
(p : Polynomial R)


theorem of_toQuadraticForm' [DecidableEq n] {M : Matrix n n ℝ} (hM : M.IsSymm)
    (hMq : M.toQuadraticMap'.PosDef) : M.PosDef

{n : Type u_2}
[Fintype n]
[DecidableEq n]
{M : Matrix n n ℝ}
(hM : M.IsSymm)
(hMq : M.toQuadraticMap'.PosDef)


theorem mem_of_mem_even (a : α) (s : Stream' α) : a ∈ even s → a ∈ s


theorem exists_contracting_iterate :
    ∃ (N : ℕ) (K : _), ContractingWith K (FunSpace.next : v.FunSpace → v.FunSpace)^[N]

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)

∃ N K, ContractingWith K PicardLindelof.FunSpace.next^[N]


lemma yonedaEquiv_symm_map {X Y : Cᵒᵖ} (f : X ⟶ Y) {F : Cᵒᵖ ⥤ Type v₁} (t : F.obj X) :
    yonedaEquiv.symm (F.map f t) = yoneda.map f.unop ≫ yonedaEquiv.symm t

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

CategoryTheory.yonedaEquiv.symm (F.map f t) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map f.unop) (CategoryTheory.yonedaEquiv.symm t)


theorem ite_prop_iff_or : (if P then Q else R) ↔ (P ∧ Q ∨ ¬ P ∧ R)


@[simp] theorem trunc_X (n) : trunc (n + 2) X = (Polynomial.X : R[X])

PowerSeries.trunc (n + 2) PowerSeries.X = Polynomial.X


theorem ExistsUnique.unique {α : Sort u} {p : α → Prop}
    (h : ∃! x, p x) {y₁ y₂ : α} (py₁ : p y₁) (py₂ : p y₂) : y₁ = y₂


@[to_additive (attr := simp)] lemma leOnePart_inv (a : α) : a⁻¹⁻ᵐ = a⁺ᵐ

{α : Type u_1}
[Lattice α]
[Group α]
(a : α)


@[to_additive (attr := simp)]
theorem mem_comap {S : Submonoid N} {f : F} {x : M} : x ∈ S.comap f ↔ f x ∈ S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{S : AddSubmonoid N}
{f : F}
{x : M}


@[simp]
theorem comp_assoc (f : CompleteLatticeHom γ δ) (g : CompleteLatticeHom β γ)
    (h : CompleteLatticeHom α β) : (f.comp g).comp h = f.comp (g.comp h)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[CompleteLattice α]
[CompleteLattice β]
[CompleteLattice γ]
[CompleteLattice δ]
(f : CompleteLatticeHom γ δ)
(g : CompleteLatticeHom β γ)
(h : CompleteLatticeHom α β)


/--
In a type `R` with an addition, a zero element and a multiplication, the property of being a sum of
squares is defined by an inductive predicate: `0 : R` is a sum of squares and if `S` is a sum of
squares, then for all `a : R`, `a * a + S` is a sum of squares in `R`.
-/
@[mk_iff]
inductive isSumSq [Add R] [Zero R] : R → Prop
  | zero                              : isSumSq 0
  | sq_add (a S : R) (pS : isSumSq S) : isSumSq (a * a + S)

∀ (a : R), isSumSq a ↔ a = 0 ∨ ∃ a_1 S, isSumSq S ∧ a = a_1 * a_1 + S


theorem factorization_le_factorization_mul_right {a b : ℕ} (ha : a ≠ 0) :
    b.factorization ≤ (a * b).factorization


@[simp] theorem le_zero_iff {n : Nat} {k : Fin (n + 1)} : k ≤ 0 ↔ k = 0


@[simp, norm_cast]
theorem one_apply (i) : (1 : CauSeq β abv) i = 1

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


theorem le_jacobson_bot [IsAdicComplete I R] : I ≤ (⊥ : Ideal R).jacobson

{R : Type u_1}
[CommRing R]
(I : Ideal R)
[IsAdicComplete I R]


/-- Transport a `HasColimitsOfSize` instance across an equivalence. -/
theorem has_colimits_of_equivalence (E : C ⥤ D) [E.IsEquivalence] [HasColimitsOfSize.{v, u} D] :
    HasColimitsOfSize.{v, u} C

[CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₂, u₂} D]

CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₁, u₁} C


theorem mem_singleton_self (a : α) : a ∈ ({a} : Multiset α)


protected theorem map_sub [Sub α] [Sub β] (f : α → β) (hf : ∀ a₁ a₂, f (a₁ - a₂) = f a₁ - f a₂)
    (M N : Matrix m n α) : (M - N).map f = M.map f - N.map f

(hf : ∀ (a₁ a₂ : α), f (a₁ - a₂) = f a₁ - f a₂)


@[simps]
instance : Category (SheafOfTypes J)

{J : CategoryTheory.GrothendieckTopology C}

∀ (x : CategoryTheory.SheafOfTypes J), (CategoryTheory.CategoryStruct.id x).val = CategoryTheory.CategoryStruct.id x.val


@[to_additive posPart_eq_of_posPart_pos]
lemma oneLePart_of_one_lt_oneLePart (ha : 1 < a⁺ᵐ) : a⁺ᵐ = a

{α : Type u_1}
[LinearOrder α]
[AddGroup α]
{a : α}
(ha : 0 < a⁺)


/-- The cocone for `CostructuredArrow.proj L Y ⋙ F` attached to `E : LeftExtension L F`.
The point of this cocone is `E.right.obj Y` -/
@[simps]
def coconeAt (Y : D) : Cocone (CostructuredArrow.proj L Y ⋙ F)

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(E : L.LeftExtension F)
(Y : D)


theorem IntegrableOn.continuousOn_smul [T2Space X] [SecondCountableTopologyEither X 𝕜] {g : X → E}
    (hg : IntegrableOn g K μ) {f : X → 𝕜} (hf : ContinuousOn f K) (hK : IsCompact K) :
    IntegrableOn (fun x => f x • g x) K μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure X}
[OpensMeasurableSpace X]
{K : Set X}
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 E]
[T2Space X]
[SecondCountableTopologyEither X 𝕜]
{g : X → E}
(hg : MeasureTheory.IntegrableOn g K μ)
{f : X → 𝕜}
(hf : ContinuousOn f K)
(hK : IsCompact K)

MeasureTheory.IntegrableOn (fun x => f x • g x) K μ


@[simp]
theorem mem_stepSet_iff : s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t a)

{α : Type u}
{σ : Type v}
{M : εNFA α σ}
{S : Set σ}
{s : σ}
{a : α}

s ∈ M.stepSet S a ↔ ∃ t ∈ S, s ∈ M.εClosure (M.step t (some a))


theorem neg_ne_self
    (R) (M) [Semiring R] [CharZero R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M]
    {v : M} : -v ≠ v ↔ v ≠ 0

(R : Type u_9)
(M : Type u_10)
[Semiring R]
[CharZero R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{v : M}


theorem combo_eq_smul_add_smul (a : Int) (xs : Coeffs) (b : Int) (ys : Coeffs) :
    combo a xs b ys = (a * xs) + (b * ys)

(a : Int)
(xs : Lean.Omega.Coeffs)
(b : Int)
(ys : Lean.Omega.Coeffs)

Lean.Omega.Coeffs.combo a xs b ys = a * xs + b * ys


theorem rpow_sum_of_pos {ι : Type*} {a : ℝ} (ha : 0 < a) (f : ι → ℝ) (s : Finset ι) :
    (a ^ ∑ x ∈ s, f x) = ∏ x ∈ s, a ^ f x

{ι : Type u_1}
{a : ℝ}
(ha : 0 < a)
(f : ι → ℝ)
(s : Finset ι)


theorem image : f '' quasispectrum S a = quasispectrum R a

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Field S]
[NonUnitalRing A]
[Module R A]
[Module S A]
[IsScalarTower S A A]
[SMulCommClass S A A]
[Algebra R S]
{a : A}
{f : S → R}
[IsScalarTower R S A]
(h : QuasispectrumRestricts a f)


/-- The restriction of scalars by a composition of ring morphisms identify to the
composition of the restriction of scalars functors. -/
@[simps! hom_app inv_app]
def restrictScalarsComp' :
    ModuleCat.restrictScalars.{v} gf ≅
      ModuleCat.restrictScalars g ⋙ ModuleCat.restrictScalars f

{R₁ : Type u₁}
{R₂ : Type u₂}
{R₃ : Type u₃}
[Ring R₁]
[Ring R₂]
[Ring R₃]
(f : R₁ →+* R₂)
(g : R₂ →+* R₃)
(gf : R₁ →+* R₃)
(hgf : gf = g.comp f)
(X : ModuleCat R₃)

(ModuleCat.restrictScalarsComp' f g gf hgf).hom.app X = (ModuleCat.restrictScalarsComp'App f g gf hgf X).hom


lemma transGen_wcovBy_eq_reflTransGen_covBy [PartialOrder α] :
    TransGen ((· : α) ⩿ ·) = ReflTransGen (· ⋖ ·)

(Relation.TransGen fun x x_1 => x ⩿ x_1) = Relation.ReflTransGen fun x x_1 => x ⋖ x_1


/-- Bijection between a subsemiring `S` and `MulOpposite` of its opposite. -/
@[simps!]
def ringEquivOpMop (S : Subsemiring R) : S ≃+* (S.op)ᵐᵒᵖ

{R : Type u_2}
[NonAssocSemiring R]
(S : Subsemiring R)

∀ (a : (↥S.op)ᵐᵒᵖ), ↑(S.ringEquivOpMop.symm a) = MulOpposite.unop ↑(MulOpposite.unop a)


@[simp] theorem coe_true_iff_false  : ∀(a b : Bool), (a ↔ b = false) ↔ a = (!b)


@[to_additive]
theorem quasiMeasurePreserving_inv : QuasiMeasurePreserving (Inv.inv : G → G) μ μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulLeftInvariant]

MeasureTheory.Measure.QuasiMeasurePreserving Inv.inv μ μ


@[to_additive abs_add_eq_two_nsmul_posPart]
lemma mabs_mul_eq_oneLePart_sq (a : α) : |a|ₘ * a = a⁺ᵐ ^ 2

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


/-- When a function has a limit at infinity, and its derivative is nonnegative, then the derivative
is automatically integrable on `(a, +∞)`. Version assuming differentiability
on `(a, +∞)` and continuity at `a⁺`. -/
theorem integrableOn_Ioi_deriv_of_nonneg (hcont : ContinuousWithinAt g (Ici a) a)
    (hderiv : ∀ x ∈ Ioi a, HasDerivAt g (g' x) x) (g'pos : ∀ x ∈ Ioi a, 0 ≤ g' x)
    (hg : Tendsto g atTop (𝓝 l)) : IntegrableOn g' (Ioi a)

(hcont : ContinuousWithinAt g (Set.Ici a) a)

(hderiv : ∀ x ∈ Set.Ioi a, HasDerivAt g (g' x) x)

(hg : Filter.Tendsto g Filter.atTop (𝓝 l))

MeasureTheory.IntegrableOn g' (Set.Ioi a) MeasureTheory.volume


theorem effectiveEpi_iff_effectiveEpiFamily {B X : C} (f : X ⟶ B) :
    EffectiveEpi f ↔ EffectiveEpiFamily (fun () ↦ X) (fun () ↦ f)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{B X : C}
(f : X ⟶ B)

CategoryTheory.EffectiveEpi f ↔
  CategoryTheory.EffectiveEpiFamily (fun x => X) fun x =>
    match x with
    | PUnit.unit => f


theorem Differentiable.sqrt (hf : Differentiable ℝ f) (hs : ∀ x, f x ≠ 0) :
    Differentiable ℝ fun y => √(f y)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
(hf : Differentiable ℝ f)
(hs : ∀ (x : E), f x ≠ 0)


theorem isRelPrime_one_right : IsRelPrime x 1


lemma strictAnti_sumCoeffsExp : StrictAnti (fun (p : ℝ) => ∑ i, a i * (b i) ^ p)

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

StrictAnti fun p => ∑ i : α, a i * b i ^ p


/-- The images of two vectors under an injective linear map are on the same ray if and only if the
original vectors are on the same ray. -/
theorem _root_.Function.Injective.sameRay_map_iff
    {F : Type*} [FunLike F M N] [LinearMapClass F R M N]
    {f : F} (hf : Function.Injective f) :
    SameRay R (f x) (f y) ↔ SameRay R x y

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{x y : M}
{F : Type u_6}
[FunLike F M N]
[LinearMapClass F R M N]
{f : F}
(hf : Function.Injective ⇑f)


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the left morphism of `sq`
to the right morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C)

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

(CategoryTheory.Square.toArrowArrowFunctor.obj sq).left.left = sq.X₁


@[simp]
theorem functorPushforward_bot (F : C ⥤ D) (X : C) : (⊥ : Sieve X).functorPushforward F = ⊥

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

CategoryTheory.Sieve.functorPushforward F ⊥ = ⊥


theorem Filter.Tendsto.exists_forall_le [Nonempty α] [LinearOrder β] {f : α → β}
    (hf : Tendsto f cofinite atTop) : ∃ a₀, ∀ a, f a₀ ≤ f a

(hf : Filter.Tendsto f Filter.cofinite Filter.atTop)


/-- The definitional equality between `0`-ary heterogeneous functions into `τ` and `τ`. -/
@[simps!]
def fromTypes_zero_equiv (p : Fin 0 → Type u) (τ : Type u) :
    FromTypes p τ ≃ τ

(p : Fin 0 → Type u)
(τ : Type u)
(a : Function.FromTypes p τ)

(Function.fromTypes_zero_equiv p τ) a = a


@[simp]
theorem subset_iff : ∀ {x y : PSet}, mk x ⊆ mk y ↔ x ⊆ y


lemma lawsonClosed_iff_scottClosed_of_isLowerSet (s : Set α) (h : IsLowerSet s) :
    IsClosed[L] s ↔ IsClosed[S] s

{α : Type u_1}
[Preorder α]
(L S : TopologicalSpace α)
[Topology.IsLawson α]
[Topology.IsScott α]
(s : Set α)
(h : IsLowerSet s)


theorem cyclotomic_eval_lt_add_one_pow_totient {n : ℕ} {q : ℝ} (hn' : 3 ≤ n) (hq' : 1 < q) :
    (cyclotomic n ℝ).eval q < (q + 1) ^ totient n

Polynomial.eval q (Polynomial.cyclotomic n ℝ) < (q + 1) ^ n.totient


/-- A diagonal matrix is positive semidefinite iff its diagonal entries are nonnegative. -/
lemma posSemidef_diagonal_iff [DecidableEq n] {d : n → R} :
    PosSemidef (diagonal d) ↔ (∀ i : n, 0 ≤ d i)

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[DecidableEq n]
{d : n → R}

(Matrix.diagonal d).PosSemidef ↔ ∀ (i : n), 0 ≤ d i


theorem add_right_cancel_iff [IsRightCancelAdd α] (ha : a ≠ ⊥) : b + a = c + a ↔ b = c

{α : Type u}
[Add α]
{a b c : WithBot α}
[IsRightCancelAdd α]
(ha : a ≠ ⊥)


theorem Finsupp.mul_sum (b : S) (s : α →₀ R) {f : α → R → S} :
    b * s.sum f = s.sum fun a c => b * f a c

{α : Type u_1}
{R : Type u_14}
{S : Type u_15}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(b : S)
(s : α →₀ R)
{f : α → R → S}


@[simp]
theorem cancel_left {f : β →+*o γ} {g₁ g₂ : α →+*o β} (hf : Injective f) :
    f.comp g₁ = f.comp g₂ ↔ g₁ = g₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[NonAssocSemiring α]
[Preorder α]
[NonAssocSemiring β]
[Preorder β]
[NonAssocSemiring γ]
[Preorder γ]
{f : β →+*o γ}
{g₁ g₂ : α →+*o β}
(hf : Function.Injective ⇑f)


theorem IsGLB.exists_between_self_add (h : IsGLB s a) (hε : 0 < ε) : ∃ b ∈ s, a ≤ b ∧ b < a + ε

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{s : Set α}
{a ε : α}
(h : IsGLB s a)
(hε : 0 < ε)


theorem Basis'.eq_of_subset_indep (hI : M.Basis' I X) (hJ : M.Indep J) (hIJ : I ⊆ J)
    (hJX : J ⊆ X) : I = J

{α : Type u_1}
{M : Matroid α}
{I J X : Set α}
(hI : M.Basis' I X)
(hJ : M.Indep J)
(hIJ : I ⊆ J)
(hJX : J ⊆ X)


@[simp]
theorem append_assoc (s t u : Seq α) : append (append s t) u = append s (append t u)

(s.append t).append u = s.append (t.append u)


theorem RingHom.isIntegralElem.of_comp {x : T} (h : (g.comp f).IsIntegralElem x) :
    g.IsIntegralElem x

{R : Type u_1}
{S : Type u_4}
{T : Type u_5}
[CommRing R]
[CommRing S]
[CommRing T]
(f : R →+* S)
(g : S →+* T)
{x : T}
(h : (g.comp f).IsIntegralElem x)


theorem ball_infDist_subset_compl : ball x (infDist x s) ⊆ sᶜ

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}


/-- If `φ` is a normed bump function, approximate `(φ ⋆ g) x₀`
if `g` is near `g x₀` on a ball with radius `φ.rOut` around `x₀`. -/
theorem dist_normed_convolution_le {x₀ : G} {ε : ℝ} (hmg : AEStronglyMeasurable g μ)
    (hg : ∀ x ∈ ball x₀ φ.rOut, dist (g x) (g x₀) ≤ ε) :
    dist ((φ.normed μ ⋆[lsmul ℝ ℝ, μ] g : G → E') x₀) (g x₀) ≤ ε

(hmg : MeasureTheory.AEStronglyMeasurable g μ)

(hg : ∀ x ∈ Metric.ball x₀ φ.rOut, dist (g x) (g x₀) ≤ ε)

dist ((φ.normed μ ⋆[ContinuousLinearMap.lsmul ℝ ℝ, μ] g) x₀) (g x₀) ≤ ε


/-- The composition of a primitive additive character with an injective mooid homomorphism
is also primitive. -/
lemma IsPrimitive.compMulHom_of_isPrimitive {R'' : Type*} [CommMonoid R''] {φ : AddChar R R'}
    {f : R' →* R''} (hφ : φ.IsPrimitive) (hf : Function.Injective f) :
    (f.compAddChar φ).IsPrimitive

{R : Type u}
[CommRing R]
{R' : Type v}
[CommMonoid R']
{R'' : Type u_1}
[CommMonoid R'']
{φ : AddChar R R'}
{f : R' →* R''}
(hφ : φ.IsPrimitive)
(hf : Function.Injective ⇑f)


@[to_additive]
theorem period_le_exponent (exp_pos : 0 < Monoid.exponent M) (m : M) (a : α) :
    period m a ≤ Monoid.exponent M

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
(exp_pos : 0 < Monoid.exponent M)
(m : M)
(a : α)

MulAction.period m a ≤ Monoid.exponent M


@[to_additive (attr := simp)]
theorem ofLex_div [Div α] (a b : Lex α) : ofLex (a / b) = ofLex a / ofLex b


private theorem add_smul_aux (x y : T) (p : LocalizedModule S M) :
    (x + y) • p = x • p + y • p

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
{T : Type u_1}
[CommSemiring T]
[Algebra R T]
[IsLocalization S T]
(x y : T)
(p : LocalizedModule S M)


theorem toNNReal_le_toNNReal {r p : ℝ} (h : r ≤ p) : Real.toNNReal r ≤ Real.toNNReal p


theorem isNormal_iff_lt_succ_and_bsup_eq {f : Ordinal.{u} → Ordinal.{max u v}} :
    IsNormal f ↔ (∀ a, f a < f (succ a)) ∧ ∀ o, IsLimit o → (bsup.{_, v} o fun x _ => f x) = f o

Ordinal.IsNormal f ↔
  (∀ (a : Ordinal.{u}), f a < f (Order.succ a)) ∧ ∀ (o : Ordinal.{u}), o.IsLimit → (o.bsup fun x x_1 => f x) = f o


lemma restrictScalarsComp'App_inv_apply (M : ModuleCat R₃) (x : M) :
    (restrictScalarsComp'App f g gf hgf M).inv x = x

{R₁ : Type u₁}
{R₂ : Type u₂}
{R₃ : Type u₃}
[Ring R₁]
[Ring R₂]
[Ring R₃]
(f : R₁ →+* R₂)
(g : R₂ →+* R₃)
(gf : R₁ →+* R₃)
(hgf : gf = g.comp f)
(M : ModuleCat R₃)
(x : ↑M)

(ModuleCat.restrictScalarsComp'App f g gf hgf M).inv x = x


theorem viaEmbeddingHom_injective : Function.Injective (viaEmbeddingHom ι)

{α : Type u_1}
{β : Type u_2}
(ι : α ↪ β)


@[norm_cast]
theorem coe_prod (s : NonUnitalSubsemiring R) (t : NonUnitalSubsemiring S) :
    (s.prod t : Set (R × S)) = (s : Set R) ×ˢ (t : Set S)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(s : NonUnitalSubsemiring R)
(t : NonUnitalSubsemiring S)


/-- The product of a strictly monotone function and a monotone function is strictly monotone. -/
@[to_additive add_monotone "The sum of a strictly monotone function and a monotone function is
strictly monotone."]
theorem StrictMonoOn.mul_monotone' (hf : StrictMonoOn f s) (hg : MonotoneOn g s) :
    StrictMonoOn (fun x => f x * g x) s

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

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


/-- Constructs an equivalence between distributive lattices from an order isomorphism between them.
-/
@[simps]
def Iso.mk {α β : DistLat.{u}} (e : α ≃o β) : α ≅ β

(DistLat.Iso.mk e).inv.toSupHom a = e.symm a


theorem support_mem_nhds : support f ∈ 𝓝 c

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)


theorem l_sSup_u_image [CompleteLattice α] [CompleteLattice β] (gi : GaloisInsertion l u)
    (s : Set β) : l (sSup (u '' s)) = sSup s

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[CompleteLattice α]
[CompleteLattice β]
(gi : GaloisInsertion l u)
(s : Set β)


@[fun_prop]
lemma continuous_inducingFn : Continuous (inducingFn 𝕜 E F)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]

Continuous ⇑(ContinuousLinearMapWOT.inducingFn 𝕜 E F)


/-- Given two convex bounded sets in a topological vector space with nonempty interiors,
there exists a homeomorphism of the ambient space
that sends the interior, the closure, and the frontier of one set
to the interior, the closure, and the frontier of the other set.

In particular, if both `s` and `t` are open set or both `s` and `t` are closed sets,
then `e` maps `s` to `t`. -/
theorem exists_homeomorph_image_eq {s t : Set E}
    (hsc : Convex ℝ s) (hsne : (interior s).Nonempty) (hsb : IsVonNBounded ℝ s)
    (hst : Convex ℝ t) (htne : (interior t).Nonempty) (htb : IsVonNBounded ℝ t) :
    ∃ e : E ≃ₜ E, e '' interior s = interior t ∧ e '' closure s = closure t ∧
      e '' frontier s = frontier t

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T1Space E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
{s t : Set E}
(hsc : Convex ℝ s)
(hsne : (interior s).Nonempty)
(hsb : Bornology.IsVonNBounded ℝ s)
(hst : Convex ℝ t)
(htne : (interior t).Nonempty)
(htb : Bornology.IsVonNBounded ℝ t)

∃ e, ⇑e '' interior s = interior t ∧ ⇑e '' closure s = closure t ∧ ⇑e '' frontier s = frontier t


@[to_additive]
theorem mul_left_comm : ∀ a b c : G, a * (b * c) = b * (a * c)

{G : Type u_3}
[CommSemigroup G]
(a b c : G)


theorem nonUnitalSubsemiringClosure_toAddSubmonoid :
    M.nonUnitalSubsemiringClosure.toAddSubmonoid = AddSubmonoid.closure (M : Set R)

{R : Type u}
[NonUnitalNonAssocSemiring R]
(M : Subsemigroup R)

M.nonUnitalSubsemiringClosure.toAddSubmonoid = AddSubmonoid.closure ↑M


theorem eq_δ_of_mono {n : ℕ} (θ : mk n ⟶ mk (n + 1)) [Mono θ] : ∃ i : Fin (n + 2), θ = δ i

(θ : SimplexCategory.mk n ⟶ SimplexCategory.mk (n + 1))


theorem Matrix.conjTranspose_tsum [StarAddMonoid R] [ContinuousStar R] [T2Space R]
    {f : X → Matrix m n R} : (∑' x, f x)ᴴ = ∑' x, (f x)ᴴ

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[StarAddMonoid R]
[ContinuousStar R]
[T2Space R]
{f : X → Matrix m n R}


theorem volume_eq_smul_haarAddCircle :
    (volume : Measure (AddCircle T)) = ENNReal.ofReal T • (@haarAddCircle T _)

MeasureTheory.volume = ENNReal.ofReal T • AddCircle.haarAddCircle


@[simp]
theorem coe_withConstants : (S.withConstants h : Set M) = ↑S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{S : L.Substructure M}
{A : Set M}
(h : A ⊆ ↑S)


@[to_additive single_le_sum]
theorem single_le_prod' (hf : ∀ i ∈ s, 1 ≤ f i) {a} (h : a ∈ s) : f a ≤ ∏ x ∈ s, f x

{ι : Type u_1}
{N : Type u_5}
[OrderedCommMonoid N]
{f : ι → N}
{s : Finset ι}
(hf : ∀ i ∈ s, 1 ≤ f i)
{a : ι}
(h : a ∈ s)


@[simp]
theorem dropWhile_eq_nil_iff : dropWhile p l = [] ↔ ∀ x ∈ l, p x

{α : Type u}
{p : α → Bool}
{l : List α}

List.dropWhile p l = [] ↔ ∀ (x : α), x ∈ l → p x = true


theorem map_comp {f : α → β} {g : β → γ} : map (g ∘ f) = (map g).comp (map f)

{α : Type u}
{β : Type v}
{γ : Type w}
{f : α → β}
{g : β → γ}

FreeAbelianGroup.map (g ∘ f) = (FreeAbelianGroup.map g).comp (FreeAbelianGroup.map f)


theorem mul_apply' [Fintype m] [Mul α] [AddCommMonoid α] {M : Matrix l m α} {N : Matrix m n α}
    {i k} : (M * N) i k = (fun j => M i j) ⬝ᵥ fun j => N j k

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Fintype m]
[Mul α]
[AddCommMonoid α]
{M : Matrix l m α}
{N : Matrix m n α}
{i : l}
{k : n}


theorem ext_iff {inst₁ inst₂ : NonUnitalCommSemiring R} :
    inst₁ = inst₂ ↔
      (local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) ∧
      (local_hMul[R, inst₁] = local_hMul[R, inst₂])

{R : Type u}
{inst₁ inst₂ : NonUnitalCommSemiring R}

inst₁ = inst₂ ↔ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul


/-- A function `f` from `Finset α` is antitone if and only if `f (cons a s ha) ≤ f s` for all
`s` and `a ∉ s`. -/
lemma antitone_iff_forall_cons_le : Antitone f ↔ ∀ s ⦃a⦄ ha, f (cons a s ha) ≤ f s

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f : Finset α → β}

Antitone f ↔ ∀ (s : Finset α) ⦃a : α⦄ (ha : a ∉ s), f (Finset.cons a s ha) ≤ f s


theorem _root_.AntitoneOn.set_prod (hf : AntitoneOn f s) (hg : AntitoneOn g s) :
    AntitoneOn (fun x => f x ×ˢ g x) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
[Preorder α]
{f : α → Set β}
{g : α → Set γ}
(hf : AntitoneOn f s)
(hg : AntitoneOn g s)


theorem innerContent_comap (f : G ≃ₜ G) (h : ∀ ⦃K : Compacts G⦄, μ (K.map f f.continuous) = μ K)
    (U : Opens G) : μ.innerContent (Opens.comap f.toContinuousMap U) = μ.innerContent U

(h :
  ∀ ⦃K : TopologicalSpace.Compacts G⦄,
    (fun s => ↑(μ.toFun s)) (TopologicalSpace.Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K)

μ.innerContent ((TopologicalSpace.Opens.comap f.toContinuousMap) U) = μ.innerContent U


theorem isBigOWith_congr (hc : c₁ = c₂) (hf : f₁ =ᶠ[l] f₂) (hg : g₁ =ᶠ[l] g₂) :
    IsBigOWith c₁ l f₁ g₁ ↔ IsBigOWith c₂ l f₂ g₂

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c₁ c₂ : ℝ}
{l : Filter α}
{f₁ f₂ : α → E}
{g₁ g₂ : α → F}
(hc : c₁ = c₂)
(hf : f₁ =ᶠ[l] f₂)
(hg : g₁ =ᶠ[l] g₂)

Asymptotics.IsBigOWith c₁ l f₁ g₁ ↔ Asymptotics.IsBigOWith c₂ l f₂ g₂


@[simp]
theorem coe_codRestrict (f : F) (S : NonUnitalStarSubalgebra R B) (hf : ∀ x, f x ∈ S) (x : A) :
    ↑(NonUnitalStarAlgHom.codRestrict f S hf x) = f x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)
(S : NonUnitalStarSubalgebra R B)
(hf : ∀ (x : A), f x ∈ S)
(x : A)

↑((NonUnitalStarAlgHom.codRestrict f S hf) x) = f x


theorem add_mul_div_right (x y : Nat) {z : Nat} (H : 0 < z) : (x + y * z) / z = x / z + y


@[to_additive (attr := simp)]
theorem mulIndicator_of_not_mem (h : a ∉ s) (f : α → M) : mulIndicator s f a = 1

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


@[simp] lemma map_snd_prod : Measure.map Prod.snd (μ.prod ν) = (μ univ) • ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]

MeasureTheory.Measure.map Prod.snd (μ.prod ν) = μ Set.univ • ν


theorem exposedPoints_subset : A.exposedPoints 𝕜 ⊆ A

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A : Set E}


theorem interior_eq_iff_isOpen : interior s = s ↔ IsOpen s

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


@[simp]
theorem integral_cos : ∫ x in a..b, cos x = sin b - sin a

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


theorem extraction_forall_of_eventually' {P : ℕ → ℕ → Prop} (h : ∀ n, ∃ N, ∀ k ≥ N, P n k) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, P n (φ n)

{P : ℕ → ℕ → Prop}
(h : ∀ (n : ℕ), ∃ N, ∀ k ≥ N, P n k)

∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P n (φ n)


protected theorem continuous : Continuous smoothTransition


theorem map_ofNat_add' [AddCommMonoidWithOne G] [AddMonoid H] [AddConstMapClass F G H 1 b]
    (f : F) (n : ℕ) [n.AtLeastTwo] (x : G) :
    f (OfNat.ofNat n + x) = f x + OfNat.ofNat n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{b : H}
[AddCommMonoidWithOne G]
[AddMonoid H]
[AddConstMapClass F G H 1 b]
(f : F)
(n : ℕ)
[n.AtLeastTwo]
(x : G)


lemma isLeftKanExtension_along_yoneda_iff :
    L.IsLeftKanExtension α ↔
      (IsIso α ∧ Nonempty (PreservesColimitsOfSize.{v₁, max u₁ v₁} L))

(L : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ (Type v₁)) ℰ)

L.IsLeftKanExtension α ↔
  CategoryTheory.IsIso α ∧
    Nonempty (CategoryTheory.Limits.PreservesColimitsOfSize.{v₁, max u₁ v₁, max u₁ v₁, v₁, max u₁ (v₁ + 1), u₂} L)


@[simp] protected theorem one_mul (n : Nat) : 1 * n = n


@[simp]
theorem card_Ioc : (Ioc a b).card = b - a


@[simp]
theorem refl_range {a : X} : range (Path.refl a) = {a}

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


theorem norm_neg_period (x : ℝ) : ‖(x : AddCircle (-p))‖ = ‖(x : AddCircle p)‖


/-- A multiset is accessible under `CutExpand` if all its singleton subsets are,
  assuming `r` is irreflexive. -/
theorem acc_of_singleton [IsIrrefl α r] {s : Multiset α} (hs : ∀ a ∈ s, Acc (CutExpand r) {a}) :
    Acc (CutExpand r) s

(hs : ∀ a ∈ s, Acc (Relation.CutExpand r) {a})


/-- Given `M : Matroid α`, the `IndepMatroid α` whose independent sets are
  the subsets of `M.E` that are disjoint from some base of `M` -/
@[simps] def dualIndepMatroid (M : Matroid α) : IndepMatroid α


@[to_additive (attr := simp)]
theorem _root_.MulOpposite.exponent : exponent (MulOpposite G) = exponent G

AddMonoid.exponent Gᵃᵒᵖ = AddMonoid.exponent G


@[to_additive (attr := simp)]
lemma UniformFun.toFun_mul [Mul β] (f g : α →ᵤ β) : toFun (f * g) = toFun f * toFun g

{α : Type u_1}
{β : Type u_2}
[Add β]
(f g : α →ᵤ β)

UniformFun.toFun (f + g) = UniformFun.toFun f + UniformFun.toFun g


/-- The composition operator (in the target) with a Lipschitz map is uniformly continuous. -/
theorem uniformContinuous_comp {G : β → γ} {C : ℝ≥0} (H : LipschitzWith C G) :
    UniformContinuous (comp G H : (α →ᵇ β) → α →ᵇ γ)

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[PseudoMetricSpace β]
[PseudoMetricSpace γ]
{G : β → γ}
{C : ℝ≥0}
(H : LipschitzWith C G)

UniformContinuous (BoundedContinuousFunction.comp G H)


/-- Two sets are at zero Hausdorff edistance if and only if they have the same closure. -/
theorem hausdorffEdist_zero_iff_closure_eq_closure :
    hausdorffEdist s t = 0 ↔ closure s = closure t

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}

EMetric.hausdorffEdist s t = 0 ↔ closure s = closure t


@[to_additive]
theorem mem_sup_right {S T : Subsemigroup M} : ∀ {x : M}, x ∈ T → x ∈ S ⊔ T

{M : Type u_2}
[Add M]
{S T : AddSubsemigroup M}
{x : M}


@[to_additive (attr := simp)]
theorem inv_mul : (↑a⁻¹ * a : α) = 1

{α : Type u}
[AddMonoid α]
(a : AddUnits α)