lemma locallyLipschitzOn_iff_restrict :
    LocallyLipschitzOn s f ↔ LocallyLipschitz (s.restrict f)

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


protected theorem sum_measure_preimage_singleton (f : α →ₛ β) {μ : Measure α} (s : Finset β) :
    (∑ y ∈ s, μ (f ⁻¹' {y})) = μ (f ⁻¹' ↑s)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
{μ : MeasureTheory.Measure α}
(s : Finset β)


@[to_additive]
lemma units_left_inverse :
    Function.LeftInverse (units (M := M)) (Subgroup.ofUnits (M := M))


@[simp]
theorem integral_const {m : MeasurableSpace α} (μ : Measure α) (y : F) :
    (const α y).integral μ = (μ univ).toReal • y

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(y : F)

MeasureTheory.SimpleFunc.integral μ (MeasureTheory.SimpleFunc.const α y) = (μ Set.univ).toReal • y


lemma leftRightHomologyComparison_eq [S.HasLeftHomology] [S.HasRightHomology]
    (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData) :
    S.leftRightHomologyComparison = h₁.leftHomologyIso.hom ≫
      leftRightHomologyComparison' h₁ h₂ ≫ h₂.rightHomologyIso.inv

S.leftRightHomologyComparison =
  CategoryTheory.CategoryStruct.comp h₁.leftHomologyIso.hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.leftRightHomologyComparison' h₁ h₂)
      h₂.rightHomologyIso.inv)


@[to_additive]
theorem Filter.Tendsto.mul_const (b : M) {c : M} {f : α → M} {l : Filter α}
    (h : Tendsto (fun k : α => f k) l (𝓝 c)) : Tendsto (fun k : α => f k * b) l (𝓝 (c * b))

(h : Filter.Tendsto (fun k => f k) l (𝓝 c))

Filter.Tendsto (fun k => f k * b) l (𝓝 (c * b))


@[ext]
lemma MonoidHom.ext_mnat ⦃f g : Multiplicative ℕ →* α⦄
    (h : f (Multiplicative.ofAdd 1) = g (Multiplicative.ofAdd 1)) : f = g


theorem degrees_C (a : R) : degrees (C a : MvPolynomial σ R) = 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(a : R)


@[to_additive (attr := simp)]
theorem inv_cthickening : (cthickening δ s)⁻¹ = cthickening δ s⁻¹

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)

-Metric.cthickening δ s = Metric.cthickening δ (-s)


theorem measurePreserving_piFinTwo {α : Fin 2 → Type u} {m : ∀ i, MeasurableSpace (α i)}
    (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)] :
    MeasurePreserving (MeasurableEquiv.piFinTwo α) (Measure.pi μ) ((μ 0).prod (μ 1))

{m : (i : Fin 2) → MeasurableSpace (α i)}

(μ : (i : Fin 2) → MeasureTheory.Measure (α i))

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

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.piFinTwo α)) (MeasureTheory.Measure.pi μ) ((μ 0).prod (μ 1))


theorem incidenceSet_subset (G' : Subgraph G) (v : V) : G'.incidenceSet v ⊆ G'.edgeSet

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


lemma cfc_zpow (a : Aˣ) (n : ℤ) (ha : p a := by cfc_tac) :
    cfc (fun x : R ↦ x ^ n) (a : A) = ↑(a ^ n)

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[Semifield R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[HasContinuousInv₀ R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : Aˣ)
(n : ℤ)
(ha : p ↑a := by cfc_tac)


@[simp, reassoc]
theorem NatTrans.rightDerived_comp {F G H : C ⥤ D} [F.Additive] [G.Additive] [H.Additive]
    (α : F ⟶ G) (β : G ⟶ H) (n : ℕ) :
    NatTrans.rightDerived (α ≫ β) n = NatTrans.rightDerived α n ≫ NatTrans.rightDerived β n

CategoryTheory.NatTrans.rightDerived (CategoryTheory.CategoryStruct.comp α β) n =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.NatTrans.rightDerived α n)
    (CategoryTheory.NatTrans.rightDerived β n)


@[to_additive]
theorem smul_finset_sdiff : a • (s \ t) = a • s \ a • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[Group α]
[MulAction α β]
{s t : Finset β}
{a : α}


@[simp]
theorem lift_prod {ι : Type u} (c : ι → Cardinal.{v}) :
    lift.{w} (prod c) = prod fun i => lift.{w} (c i)

Cardinal.lift.{w, max v u} (Cardinal.prod c) = Cardinal.prod fun i => Cardinal.lift.{w, v} (c i)


@[csimp] theorem toList_eq_toListTR : @toList = @toListTR


@[to_additive addProjection_respects_measure]
lemma IsFundamentalDomain.projection_respects_measure {ν : Measure α}
    (μ : Measure (Quotient α_mod_G)) [i : QuotientMeasureEqMeasurePreimage ν μ] {t : Set α}
    (fund_dom_t : IsFundamentalDomain G t ν) : μ = (ν.restrict t).map π

(μ : MeasureTheory.Measure (Quotient (MulAction.orbitRel G α)))

[i : MeasureTheory.QuotientMeasureEqMeasurePreimage ν μ]

(fund_dom_t : MeasureTheory.IsFundamentalDomain G t ν)

μ = MeasureTheory.Measure.map (Quotient.mk (MulAction.orbitRel G α)) (ν.restrict t)


protected theorem add_lt_of_lt_sub_right {a b c : Int} (h : a < c - b) : a + b < c


lemma rpow_add_one' (hx : 0 ≤ x) (h : y + 1 ≠ 0) : x ^ (y + 1) = x ^ y * x


theorem ascPochhammer_smeval_eq_eval [Semiring R] (r : R) (n : ℕ) :
    (ascPochhammer ℕ n).smeval r = (ascPochhammer R n).eval r

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

(ascPochhammer ℕ n).smeval r = Polynomial.eval r (ascPochhammer R n)


theorem pathComponent_congr (h : x ∈ pathComponent y) : pathComponent x = pathComponent y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(h : x ∈ pathComponent y)


/-- The braiding isomorphism is symmetric. -/
@[reassoc]
theorem prod.symmetry (P Q : C) [HasBinaryProduct P Q] [HasBinaryProduct Q P] :
    (prod.braiding P Q).hom ≫ (prod.braiding Q P).hom = 𝟙 _

(CategoryTheory.Limits.prod.braiding P Q).hom ≫ (CategoryTheory.Limits.prod.braiding Q P).hom = 𝟙 (P ⨯ Q)


@[simp]
theorem boddDiv2_eq (n : ℕ) : boddDiv2 n = (bodd n, div2 n)


@[simp]
theorem whiskerLeft_apply (X : Type u) {Y Z : Type u} (f : Y ⟶ Z) (p : X ⊗ Y) :
    (X ◁ f) p = (p.1, f p.2)


@[simp] theorem getElem_singleton (a : α) (h : i < 1) : [a][i] = a


theorem subsingleton_of_isTerminal {X : CommRingCat} (hX : IsTerminal X) : Subsingleton X

(hX : CategoryTheory.Limits.IsTerminal X)


/-- `LinearMap.prodMap` as a `LinearMap` -/
@[simps]
def prodMapLinear [Module S M₃] [Module S M₄] [SMulCommClass R S M₃] [SMulCommClass R S M₄] :
    (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₄) →ₗ[S] M × M₂ →ₗ[R] M₃ × M₄

(R : Type u)
(M : Type v)
(M₂ : Type w)
(M₃ : Type y)
(M₄ : Type z)
(S : Type u_3)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[AddCommMonoid M₄]
[Module R M]
[Module R M₂]
[Module R M₃]
[Module R M₄]
[Module S M₃]
[Module S M₄]
[SMulCommClass R S M₃]
[SMulCommClass R S M₄]
(f : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₄))

(LinearMap.prodMapLinear R M M₂ M₃ M₄ S) f = f.1.prodMap f.2


lemma leftHomologyMap_comm [S₁.HasLeftHomology] [S₂.HasLeftHomology] :
    leftHomologyMap φ ≫ h₂.leftHomologyIso.hom = h₁.leftHomologyIso.hom ≫ γ.φH

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.leftHomologyMap φ) h₂.leftHomologyIso.hom =
  CategoryTheory.CategoryStruct.comp h₁.leftHomologyIso.hom γ.φH


lemma zeroLocus_singleton {U : Opens X} (f : X.presheaf.obj (op U)) :
    X.zeroLocus {f} = (X.basicOpen f).carrierᶜ

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}


lemma logTaylor_at_zero (n : ℕ) : logTaylor n 0 = 0


@[simp]
theorem coeff_p_one [CharP R p] : (p : 𝕎 R).coeff 1 = 1

(p : ℕ)
(R : Type u_1)
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CharP R p]


theorem mem_normalizedFactors_factor_orderIso_of_mem_normalizedFactors {m p : Associates M}
    {n : Associates N} (hn : n ≠ 0) (hp : p ∈ normalizedFactors m) (d : Set.Iic m ≃o Set.Iic n) :
    (d ⟨p, dvd_of_mem_normalizedFactors hp⟩ : Associates N) ∈ normalizedFactors n

(hp : p ∈ UniqueFactorizationMonoid.normalizedFactors m)

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


theorem bounded_gt_inter_gt [LinearOrder α] [NoMinOrder α] (a : α) :
    Bounded (· > ·) (s ∩ { b | b < a }) ↔ Bounded (· > ·) s

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

Set.Bounded (fun x x_1 => x > x_1) (s ∩ {b | b < a}) ↔ Set.Bounded (fun x x_1 => x > x_1) s


theorem Iic_filter_lt_of_lt_right {α} [Preorder α] [LocallyFiniteOrderBot α] {a c : α}
    [DecidablePred (· < c)] (h : a < c) : (Iic a).filter (· < c) = Iic a

{α : Type u_3}
[Preorder α]
[LocallyFiniteOrderBot α]
{a c : α}
[DecidablePred fun x => x < c]
(h : a < c)

Finset.filter (fun x => x < c) (Finset.Iic a) = Finset.Iic a


/-- `x ^ k = o(exp(b * x))` as `x → ∞` for any natural `k` and positive `b`. -/
theorem isLittleO_pow_exp_pos_mul_atTop (k : ℕ) {b : ℝ} (hb : 0 < b) :
    (fun x : ℝ => x ^ k) =o[atTop] fun x => exp (b * x)

(fun x => x ^ k) =o[Filter.atTop] fun x => rexp (b * x)


@[simp]
theorem trans_apply (e₁ : E ≃ₛₗᵢ[σ₁₂] E₂) (e₂ : E₂ ≃ₛₗᵢ[σ₂₃] E₃) (c : E) :
    (e₁.trans e₂ : E ≃ₛₗᵢ[σ₁₃] E₃) c = e₂ (e₁ c)

{R : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
{E : Type u_5}
{E₂ : Type u_6}
{E₃ : Type u_7}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{σ₁₃ : R →+* R₃}
{σ₃₁ : R₃ →+* R}
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[SeminormedAddCommGroup E₃]
[Module R E]
[Module R₂ E₂]
[Module R₃ E₃]
(e₁ : E ≃ₛₗᵢ[σ₁₂] E₂)
(e₂ : E₂ ≃ₛₗᵢ[σ₂₃] E₃)
(c : E)


@[simp]
theorem sin_two_pi_sub (x : ℝ) : sin (2 * π - x) = -sin x

Real.sin (2 * Real.pi - x) = -Real.sin x


@[simp]
theorem withBot_comp (f : InfHom β γ) (g : InfHom α β) :
    (f.comp g).withBot = f.withBot.comp g.withBot

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[SemilatticeInf α]
[SemilatticeInf β]
[SemilatticeInf γ]
(f : InfHom β γ)
(g : InfHom α β)


/-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
  relations in both directions. -/
class StrongHomClass (L : outParam Language) (F M N : Type*)
  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
  map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x

[self : FirstOrder.Language.StrongHomClass L F M N]

φ (FirstOrder.Language.Structure.funMap f x) = FirstOrder.Language.Structure.funMap f (⇑φ ∘ x)


theorem topToCompHaus_obj (X : TopCat) : ↥(topToCompHaus.obj X) = StoneCech X

↑(topToCompHaus.obj X).toTop = StoneCech ↑X


/-- Lemmas about `WithTop` expect (and can output) `WithTop.some` but the normal form for coercion
`ℕ → ℕ∞` is `Nat.cast`. -/
@[simp] theorem some_eq_coe : (WithTop.some : ℕ → ℕ∞) = Nat.cast


theorem Injective.ne_iff (hf : Injective f) {x y : α} : f x ≠ f y ↔ x ≠ y

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
(hf : Function.Injective f)
{x y : α}


@[to_additive (attr := simp)]
theorem id_comp (f : α →*o β) : (OrderMonoidHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(f : α →*o β)


theorem eq_of_sdiff_eq_sdiff (hxz : x ≤ z) (hyz : y ≤ z) (h : z \ x = z \ y) : x = y

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(hxz : x ≤ z)
(hyz : y ≤ z)
(h : z \ x = z \ y)


@[to_additive]
theorem Nonempty.of_div_left : (s / t).Nonempty → s.Nonempty


@[simp]
theorem equivIsoLimit_apply {r t : Cone F} (i : r ≅ t) (P : IsLimit r) :
    equivIsoLimit i P = P.ofIsoLimit i

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{r t : CategoryTheory.Limits.Cone F}
(i : r ≅ t)
(P : CategoryTheory.Limits.IsLimit r)

(CategoryTheory.Limits.IsLimit.equivIsoLimit i) P = P.ofIsoLimit i


theorem specializes_iff_forall_closed : x ⤳ y ↔ ∀ s : Set X, IsClosed s → x ∈ s → y ∈ s

{X : Type u_1}
[TopologicalSpace X]
{x y : X}

x ⤳ y ↔ ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s


theorem intValuationDef_if_pos {r : R} (hr : r = 0) : v.intValuationDef r = 0

(v : IsDedekindDomain.HeightOneSpectrum R)


theorem eq_rec_on_bijective {C : α → Sort*} :
    ∀ {a a' : α} (h : a = a'), Function.Bijective (@Eq.ndrec _ _ C · _ h)

{α : Sort u_1}
{C : α → Sort u_3}
{a a' : α}
(h : a = a')


@[simp] theorem default_eq : default = ""


@[to_additive existing (attr := simp) (reorder := 6 7) smul_swap]
lemma pow_swap (p : α × β) (c : E) : (p ^ c).swap = p.swap ^ c

{E : Type u_4}
{α : Type u_5}
{β : Type u_6}
[Pow α E]
[Pow β E]
(p : α × β)
(c : E)


/-- The **Cauchy product formula** for the product of two infinites sums indexed by `ℕ`, expressed
by summing on `Finset.range`.

See also `tsum_mul_tsum_eq_tsum_sum_range_of_summable_norm` if `f` and `g` are absolutely summable.
-/
theorem tsum_mul_tsum_eq_tsum_sum_range (hf : Summable f) (hg : Summable g)
    (hfg : Summable fun x : ℕ × ℕ ↦ f x.1 * g x.2) :
    ((∑' n, f n) * ∑' n, g n) = ∑' n, ∑ k ∈ range (n + 1), f k * g (n - k)

{α : Type u_4}
[TopologicalSpace α]
[NonUnitalNonAssocSemiring α]
{f g : ℕ → α}
[T3Space α]
[TopologicalSemiring α]
(hf : Summable f)
(hg : Summable g)
(hfg : Summable fun x => f x.1 * g x.2)

(∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ k ∈ Finset.range (n + 1), f k * g (n - k)


@[reassoc]
theorem δ_comp_δ' {n} {i : Fin (n + 2)} {j : Fin (n + 3)} (H : Fin.castSucc i < j) :
    X.δ i ≫ X.δ j =
      X.δ (j.pred fun (hj : j = 0) => by simp only [hj, Fin.not_lt_zero] at H) ≫
        X.δ (Fin.castSucc i)

(X : CategoryTheory.CosimplicialObject C)

X.δ i ≫ X.δ j = X.δ (j.pred ⋯) ≫ X.δ i.castSucc


theorem disjoint_sdiff_inter : Disjoint (s \ t) (s ∩ t)


/-- If `f` commutes with `g`, then `Option.map f` commutes with `Option.map g`. -/
nonrec theorem option_map {f g : α → α} (h : Commute f g) : Commute (Option.map f) (Option.map g)

{α : Type u_1}
{f g : α → α}
(h : Function.Commute f g)

Function.Commute (Option.map f) (Option.map g)


@[simp]
theorem associated_comp {N' : Type*} [AddCommGroup N'] [Module R N'] (f : N' →ₗ[R] M) :
    associatedHom S (Q.comp f) = (associatedHom S Q).compl₁₂ f f

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[CommSemiring S]
[Algebra S R]
[Module S N]
[IsScalarTower S R N]
[Invertible 2]
(Q : QuadraticMap R M N)
{N' : Type u_8}
[AddCommGroup N']
[Module R N']
(f : N' →ₗ[R] M)

(QuadraticMap.associatedHom S) (Q.comp f) = LinearMap.compl₁₂ ((QuadraticMap.associatedHom S) Q) f f


lemma disjiUnion_disjiUnion (s : Finset α) (f : α → Finset β) (g : β → Finset γ) (h1 h2) :
    (s.disjiUnion f h1).disjiUnion g h2 =
      s.attach.disjiUnion
        (fun a ↦ ((f a).disjiUnion g) fun b hb c hc ↦
            h2 (mem_disjiUnion.mpr ⟨_, a.prop, hb⟩) (mem_disjiUnion.mpr ⟨_, a.prop, hc⟩))
        fun a _ b _ hab ↦
        disjoint_left.mpr fun x hxa hxb ↦ by
          obtain ⟨xa, hfa, hga⟩ := mem_disjiUnion.mp hxa
          obtain ⟨xb, hfb, hgb⟩ := mem_disjiUnion.mp hxb
          refine disjoint_left.mp
            (h2 (mem_disjiUnion.mpr ⟨_, a.prop, hfa⟩) (mem_disjiUnion.mpr ⟨_, b.prop, hfb⟩) ?_) hga
            hgb
          rintro rfl
          exact disjoint_left.mp (h1 a.prop b.prop <| Subtype.coe_injective.ne hab) hfa hfb

(h2 : (↑(s.disjiUnion f h1)).PairwiseDisjoint g)

(s.disjiUnion f h1).disjiUnion g h2 = s.attach.disjiUnion (fun a => (f ↑a).disjiUnion g ⋯) ⋯


@[to_additive]
theorem nhds_translation_mul_inv (x : G) : comap (· * x⁻¹) (𝓝 1) = 𝓝 x

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(x : G)

Filter.comap (fun x_1 => x_1 + -x) (𝓝 0) = 𝓝 x


@[to_additive]
theorem iInter_div_subset (s : ι → Set α) (t : Set α) : (⋂ i, s i) / t ⊆ ⋂ i, s i / t

{α : Type u_2}
{ι : Sort u_5}
[Sub α]
(s : ι → Set α)
(t : Set α)


theorem essentiallySmall_of_small_of_locallySmall [Small.{w} C] [LocallySmall.{w} C] :
    EssentiallySmall.{w} C

[CategoryTheory.LocallySmall.{w, v, u} C]

CategoryTheory.EssentiallySmall.{w, v, u} C


theorem sum_le_ofDigits {p : ℕ} (L : List ℕ) (h : 1 ≤ p) : L.sum ≤ ofDigits p L


theorem rnDeriv_neg (s : SignedMeasure α) (μ : Measure α) [s.HaveLebesgueDecomposition μ] :
    (-s).rnDeriv μ =ᵐ[μ] -s.rnDeriv μ

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


/-- If the derivative of a function is never equal to `m`, then either
it is always greater than `m`, or it is always less than `m`. -/
theorem hasDerivWithinAt_forall_lt_or_forall_gt_of_forall_ne {s : Set ℝ} (hs : Convex ℝ s)
    (hf : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) {m : ℝ} (hf' : ∀ x ∈ s, f' x ≠ m) :
    (∀ x ∈ s, f' x < m) ∨ ∀ x ∈ s, m < f' x


@[simp]
theorem pullbackIsoPullback_inv_fst_apply (x : (Types.pullbackCone f g).pt) :
    (pullback.fst f g) ((pullbackIsoPullback f g).inv x) = (fun p => (p.1 : X × Y).fst) x

(x : (CategoryTheory.Limits.Types.pullbackCone f g).pt)

CategoryTheory.Limits.pullback.fst f g ((CategoryTheory.Limits.Types.pullbackIsoPullback f g).inv x) =
  (fun p => (↑p).1) x


theorem exists_subsingleton_mem_of_forall_separating (p : Set α → Prop)
    [HasCountableSeparatingOn α p univ] (hl : ∀ U, p U → U ∈ l ∨ Uᶜ ∈ l) :
    ∃ s : Set α, s.Subsingleton ∧ s ∈ l

(hl : ∀ (U : Set α), p U → U ∈ l ∨ Uᶜ ∈ l)


theorem vadd_vsub_eq_sub_vsub (g : G) (p q : P) : g +ᵥ p -ᵥ q = g - (q -ᵥ p)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(g : G)
(p q : P)


theorem degree_le_degree (h : coeff q (natDegree p) ≠ 0) : degree p ≤ degree q

{R : Type u}
[Semiring R]
{p q : R[X]}
(h : q.coeff p.natDegree ≠ 0)


theorem closure_singleton_eq (x : M) : closure ({x} : Set M) = mrange (powersHom M x)

Submonoid.closure {x} = MonoidHom.mrange ((powersHom M) x)


theorem eLpNorm'_le_nnreal_smul_eLpNorm'_of_ae_le_mul {f : α → F} {g : α → G} {c : ℝ≥0}
    (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊) {p : ℝ} (hp : 0 < p) :
    eLpNorm' f p μ ≤ c • eLpNorm' g p μ

(h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊)

MeasureTheory.eLpNorm' f p μ ≤ c • MeasureTheory.eLpNorm' g p μ


@[to_additive (attr := simp)]
theorem coe_pow {G : Type*} [Monoid G] [TopologicalSpace G] [ChartedSpace H' G] [SmoothMul I' G]
    (f : C^∞⟮I, N; I', G⟯) (n : ℕ) :
    ⇑(f ^ n) = (f : N → G) ^ n

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_4}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{H' : Type u_5}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{N : Type u_6}
[TopologicalSpace N]
[ChartedSpace H N]
{G : Type u_10}
[Monoid G]
[TopologicalSpace G]
[ChartedSpace H' G]
[SmoothMul I' G]
(f : C^⊤⟮I, N; I', G⟯)
(n : ℕ)


theorem tendsto_measure_Iic_atTop [SemilatticeSup α] [(atTop : Filter α).IsCountablyGenerated]
    (μ : Measure α) : Tendsto (fun x => μ (Iic x)) atTop (𝓝 (μ univ))

{α : Type u_1}
{m0 : MeasurableSpace α}
[SemilatticeSup α]
[Filter.atTop.IsCountablyGenerated]
(μ : MeasureTheory.Measure α)

Filter.Tendsto (fun x => μ (Set.Iic x)) Filter.atTop (nhds (μ Set.univ))


@[simp]
theorem implicitToPartialHomeomorph_fst (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)
    (x : E) : (hf.implicitToPartialHomeomorph f f' hf' x).fst = f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[FiniteDimensional 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f f' a)
(hf' : LinearMap.range f' = ⊤)
(x : E)

(↑(HasStrictFDerivAt.implicitToPartialHomeomorph f f' hf hf') x).1 = f x


theorem exists_rat_eq_nth_num : ∃ q : ℚ, (of v).nums n = (q : K)

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
(v : K)
(n : ℕ)


@[to_additive]
theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) :
    mk c • hf.toLp f =
      (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·)

[MeasureTheory.VAddInvariantMeasure M α μ]

DomAddAct.mk c +ᵥ MeasureTheory.Memℒp.toLp f hf = MeasureTheory.Memℒp.toLp (fun x => f (c +ᵥ x)) ⋯


@[simp]
theorem wideEqualizer.trident_ι : (wideEqualizer.trident f).ι = wideEqualizer.ι f

(CategoryTheory.Limits.wideEqualizer.trident f).ι = CategoryTheory.Limits.wideEqualizer.ι f


theorem le_op_iff {S₁ : Subsemiring Rᵐᵒᵖ} {S₂ : Subsemiring R} : S₁ ≤ S₂.op ↔ S₁.unop ≤ S₂

{R : Type u_2}
[NonAssocSemiring R]
{S₁ : Subsemiring Rᵐᵒᵖ}
{S₂ : Subsemiring R}


theorem setToL1_smul_left (hT : DominatedFinMeasAdditive μ T C) (c : ℝ) (f : α →₁[μ] E) :
    setToL1 (hT.smul c) f = c • setToL1 hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(MeasureTheory.L1.setToL1 ⋯) f = c • (MeasureTheory.L1.setToL1 hT) f


nonrec
theorem _root_.Continuous.clog {f : α → ℂ} (h₁ : Continuous f)
    (h₂ : ∀ x, f x ∈ slitPlane) : Continuous fun t => log (f t)

(h₂ : ∀ (x : α), f x ∈ Complex.slitPlane)


@[to_additive AddMonoid.exp_eq_one_iff]
theorem exp_eq_one_iff : exponent G = 1 ↔ Subsingleton G

AddMonoid.exponent G = 1 ↔ Subsingleton G


@[to_additive]
theorem inv_absolutelyContinuous : μ.inv ≪ μ

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


/-- To show a property on elements of `M ^ n` holds, it suffices to show that it holds for scalars,
is closed under addition, and holds for `x * m` where `m ∈ M` and it holds for `x` -/
@[elab_as_elim]
protected theorem pow_induction_on_right {C : A → Prop} (hr : ∀ r : R, C (algebraMap _ _ r))
    (hadd : ∀ x y, C x → C y → C (x + y)) (hmul : ∀ x, C x → ∀ m ∈ M, C (x * m)) {x : A} {n : ℕ}
    (hx : x ∈ M ^ n) : C x

(hr : ∀ (r : R), C ((algebraMap R A) r))

(hadd : ∀ (x y : A), C x → C y → C (x + y))

(hmul : ∀ (x : A), C x → ∀ m ∈ M, C (x * m))


theorem Codisjoint.dual [SemilatticeSup α] [OrderTop α] {a b : α} :
    Codisjoint a b → Disjoint (toDual a) (toDual b)

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}

Codisjoint a b → Disjoint (OrderDual.toDual a) (OrderDual.toDual b)


lemma StableUnderSpecialization.preimage {s : Set Y}
    (hs : StableUnderSpecialization s) (hf : Continuous f) :
    StableUnderSpecialization (f ⁻¹' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set Y}
(hs : StableUnderSpecialization s)
(hf : Continuous f)


@[simp]
theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0

{α : Type u_3}
[DivisionRing α]
[CharZero α]
{n : ℚ}


theorem wellFoundedOn_iff_no_descending_seq :
    s.WellFoundedOn r ↔ ∀ f : ((· > ·) : ℕ → ℕ → Prop) ↪r r, ¬∀ n, f n ∈ s

{α : Type u_2}
{r : α → α → Prop}
[IsStrictOrder α r]
{s : Set α}

s.WellFoundedOn r ↔ ∀ (f : (fun x x_1 => x > x_1) ↪r r), ¬∀ (n : ℕ), f n ∈ s


@[simp]
theorem dist_vadd_right (v : V) (x : P) : dist x (v +ᵥ x) = ‖v‖

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(v : V)
(x : P)


@[to_additive (attr := simp)]
theorem mem_inv {g : G} {S : Submonoid G} : g ∈ S⁻¹ ↔ g⁻¹ ∈ S

{G : Type u_2}
[Group G]
{g : G}
{S : Submonoid G}

g ∈ S⁻¹ ↔ g⁻¹ ∈ S


theorem forall_mem_singleton {p : α → Prop} {a : α} : (∀ (x) (_ : x ∈ [a]), p x) ↔ p a


/--
The `totalDegree` of a multivariable polynomial `p` is at least `i` more than the `totalDegree` of
the `i`th coefficient of `finSuccEquiv` applied to `p`, if this is nonzero.
-/
lemma totalDegree_coeff_finSuccEquiv_add_le (f : MvPolynomial (Fin (n + 1)) R) (i : ℕ)
    (hi : (finSuccEquiv R n f).coeff i ≠ 0) :
    totalDegree ((finSuccEquiv R n f).coeff i) + i ≤ totalDegree f

(hi : ((MvPolynomial.finSuccEquiv R n) f).coeff i ≠ 0)

(((MvPolynomial.finSuccEquiv R n) f).coeff i).totalDegree + i ≤ f.totalDegree


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

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f g : CentroidHom α)


@[simp]
theorem self_comp_symm (e : M₁ ≃SL[σ₁₂] M₂) : (e : M₁ → M₂) ∘ (e.symm : M₂ → M₁) = id

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)


protected theorem single_apply_self (p) (i : α) (a : E i) : lp.single p i a i = a

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
[DecidableEq α]
(p : ℝ≥0∞)
(i : α)
(a : E i)


/-- In a monoid, an element `a` divides an element `b` iff all associates of `a` divide `b`. -/
theorem mul_right_dvd : a * u ∣ b ↔ a ∣ b

{α : Type u_1}
[Monoid α]
{a b : α}
{u : αˣ}


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


@[simp]
theorem finsetCongr_symm (e : α ≃ β) : e.finsetCongr.symm = e.symm.finsetCongr

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


/-- If a function has a limit, then its liminf coincides with its limit. -/
theorem Filter.Tendsto.liminf_eq {f : Filter β} {u : β → α} {a : α} [NeBot f]
    (h : Tendsto u f (𝓝 a)) : liminf u f = a

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{f : Filter β}
{u : β → α}
{a : α}
[f.NeBot]
(h : Filter.Tendsto u f (𝓝 a))


@[simp, norm_cast]
theorem infsInfHom_apply : infsInfHom x = x.1 ⊓ x.2

{α : Type u_2}
[CompleteLattice α]
(x : α × α)


/-- The natural isomorphism `NΓ' satisfies the compatibility that is needed
for the construction of our counit isomorphism `η` -/
theorem hη :
    Compatibility.τ₀ =
      Compatibility.τ₁ isoN₁ isoΓ₀
        (N₁Γ₀ : Γ ⋙ N₁ ≅ (toKaroubiEquivalence (ChainComplex C ℕ)).functor)

AlgebraicTopology.DoldKan.Compatibility.τ₀ =
  AlgebraicTopology.DoldKan.Compatibility.τ₁ CategoryTheory.Idempotents.DoldKan.isoN₁
    CategoryTheory.Idempotents.DoldKan.isoΓ₀ AlgebraicTopology.DoldKan.N₁Γ₀


/-- Harder inclusion: at a point in `D f K`, the function `f` has a derivative, in `K`. -/
theorem D_subset_differentiable_set {K : Set F} (hK : IsComplete K) :
    D f K ⊆ { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K }

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : ℝ → F}
{K : Set F}
(hK : IsComplete K)

RightDerivMeasurableAux.D f K ⊆ {x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K}


theorem mfderivWithin_subset (st : s ⊆ t) (hs : UniqueMDiffWithinAt I s x)
    (h : MDifferentiableWithinAt I I' f t x) :
    mfderivWithin I I' f s x = mfderivWithin I I' f t x


@[to_additive const_add]
theorem StrictMonoOn.const_mul' (hf : StrictMonoOn f s) (c : α) :
    StrictMonoOn (fun x => c * f x) s

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


theorem uncurry_def {α β γ} (f : α → β → γ) : uncurry f = fun p ↦ f p.1 p.2

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

Function.uncurry f = fun p => f p.fst p.snd


@[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a

{I : Type u}
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[VAdd α γ]
(a : α)
(x : β → γ)
(y : I → β)


/-- If there is a scalar `c` with `‖c‖>1`, then any element with nonzero norm can be
moved by scalar multiplication to any shell of width `‖c‖`. Also recap information on the norm of
the rescaling element that shows up in applications. -/
lemma rescale_to_shell_semi_normed_zpow {c : 𝕜} (hc : 1 < ‖c‖) {ε : ℝ} (εpos : 0 < ε) {x : E}
    (hx : ‖x‖ ≠ 0) :
    ∃ n : ℤ, c^n ≠ 0 ∧ ‖c^n • x‖ < ε ∧ (ε / ‖c‖ ≤ ‖c^n • x‖) ∧ (‖c^n‖⁻¹ ≤ ε⁻¹ * ‖c‖ * ‖x‖)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{c : 𝕜}
(hc : 1 < ‖c‖)
{ε : ℝ}
(εpos : 0 < ε)
{x : E}
(hx : ‖x‖ ≠ 0)

∃ n, c ^ n ≠ 0 ∧ ‖c ^ n • x‖ < ε ∧ ε / ‖c‖ ≤ ‖c ^ n • x‖ ∧ ‖c ^ n‖⁻¹ ≤ ε⁻¹ * ‖c‖ * ‖x‖


theorem card_sections {s : Multiset (Multiset α)} : card (Sections s) = prod (s.map card)

{α : Type u_1}
{s : Multiset (Multiset α)}

Multiset.card s.Sections = (Multiset.map (⇑Multiset.card) s).prod


@[simp]
theorem range_eval {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
    range (eval i : (∀ i, α i) → α i) = univ

{ι : Sort u_4}
{α : ι → Type u_6}
[∀ (i : ι), Nonempty (α i)]
(i : ι)


@[to_additive]
theorem kerLift_injective : Injective (kerLift φ)

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


theorem apply_symm_apply' {b : B} {x : F} (hx : b ∈ e.baseSet) :
    e (e.toPartialEquiv.symm (b, x)) = (b, x)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
{b : B}
{x : F}
(hx : b ∈ e.baseSet)


@[simp]
theorem addOrderOf_one (n : ℕ) : addOrderOf (1 : ZMod n) = n


/-- An equivalence between opposite categories gives an equivalence between the original categories.
-/
@[simps]
def unop (e : Cᵒᵖ ≌ Dᵒᵖ) : C ≌ D

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


@[to_additive (attr := simp)]
theorem Interval.inv_bot : (⊥ : Interval α)⁻¹ = ⊥


@[simps]
instance : MonoidalCategoryStruct (FullSubcategory P)

(CategoryTheory.MonoidalCategory.leftUnitor X).hom = (CategoryTheory.MonoidalCategory.leftUnitor X.obj).hom


/-- A function which can be uniformly approximated by functions which are continuous on a set
is continuous on this set. -/
theorem continuousOn_of_uniform_approx_of_continuousOn
    (L : ∀ u ∈ 𝓤 β, ∃ F, ContinuousOn F s ∧ ∀ y ∈ s, (f y, F y) ∈ u) : ContinuousOn f s


@[simp]
theorem cancel_right {g₁ g₂ : CompleteLatticeHom β γ} {f : CompleteLatticeHom α β}
    (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CompleteLattice α]
[CompleteLattice β]
[CompleteLattice γ]
{g₁ g₂ : CompleteLatticeHom β γ}
{f : CompleteLatticeHom α β}
(hf : Function.Surjective ⇑f)


theorem compare_coe (a : α) : pkg.compare pkg' (pkg.coe a) = pkg'.coe a

{α : Type u_1}
[UniformSpace α]
(pkg pkg' : AbstractCompletion α)
(a : α)


/-- A monotone function with densely ordered codomain and a dense range is continuous. -/
theorem Monotone.continuous_of_denseRange [DenselyOrdered β] {f : α → β} (h_mono : Monotone f)
    (h_dense : DenseRange f) : Continuous f

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
[DenselyOrdered β]
{f : α → β}
(h_mono : Monotone f)
(h_dense : DenseRange f)


/-- `n + 2` points are affinely independent if and only if their
`vectorSpan` does not have dimension at most `n`. -/
theorem affineIndependent_iff_not_finrank_vectorSpan_le [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 2) :
    AffineIndependent k p ↔ ¬finrank k (vectorSpan k (Set.range p)) ≤ n

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
{ι : Type u_4}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Fintype ι]
(p : ι → P)
{n : ℕ}
(hc : Fintype.card ι = n + 2)

AffineIndependent k p ↔ ¬FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) ≤ n


/-- Given a bilinear form `B` and some `x` such that `B x x ≠ 0`, the span of the singleton of `x`
  is complement to its orthogonal complement. -/
theorem isCompl_span_singleton_orthogonal {B : V →ₗ[K] V →ₗ[K] K} {x : V} (hx : ¬B.IsOrtho x x) :
    IsCompl (K ∙ x) (Submodule.orthogonalBilin (N := K ∙ x) (B := B))

{K : Type u_13}
{V : Type u_16}
[Field K]
[AddCommGroup V]
[Module K V]
{B : V →ₗ[K] V →ₗ[K] K}
{x : V}
(hx : ¬B.IsOrtho x x)

IsCompl (Submodule.span K {x}) ((Submodule.span K {x}).orthogonalBilin B)


/-- An intermediate field of `E / F` is contained in the relative perfect closure of `F` in `E`
if it is purely inseparable over `F`. -/
theorem le_perfectClosure (L : IntermediateField F E) [h : IsPurelyInseparable F L] :
    L ≤ perfectClosure F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(L : IntermediateField F E)
[h : IsPurelyInseparable F ↥L]


@[to_additive (attr := simp, norm_cast) coe_lt_zero]
theorem coe_lt_one [LT α] : (a : WithBot α) < 1 ↔ a < 1


/-- If `f` and `g` agree on the integers then they are equal `φ`.

See note [partially-applied ext lemmas] for why `comp` is used here. -/
@[ext]
theorem ext_rat {f g : ℚ →*₀ M₀}
    (h : f.comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) = g.comp (Int.castRingHom ℚ)) : f = g

(h : f.comp ↑(Int.castRingHom ℚ) = g.comp ↑(Int.castRingHom ℚ))


/-- If `s ⊆ t`, then `s ≤ t` in the colex order. Note the converse does not hold, as inclusion does
not form a linear order. -/
lemma toColex_mono : Monotone (toColex : Finset α → Colex α)


/-- The continuous homomorphism given by multiplication. -/
@[to_additive (attr := simps!) "The continuous homomorphism given by addition."]
def mul : ContinuousMonoidHom (E × E) E

(E : Type u_6)
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]

∀ (a : E × E), (ContinuousAddMonoidHom.add E) a = a.1 + a.2


@[simp, norm_cast]
theorem coe_smul_of_tower [SMul S R] [SMul S M] [IsScalarTower S R M] (r : S) (x : p) :
    ((r • x : p) : M) = r • (x : M)

{S : Type u'}
{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
{p : Submodule R M}
[SMul S R]
[SMul S M]
[IsScalarTower S R M]
(r : S)
(x : ↥p)


theorem coeIdeal_fg (inj : Function.Injective (algebraMap R P)) (I : Ideal R) :
    FG ((I : FractionalIdeal S P) : Submodule R P) ↔ I.FG

(inj : Function.Injective ⇑(algebraMap R P))


theorem mul_dvd_mul_right (h : a ∣ b) (c : α) : a * c ∣ b * c

{α : Type u_1}
[CommMonoid α]
{a b : α}
(h : a ∣ b)
(c : α)


@[simp]
theorem compl_star [Star α] : sᶜ⋆ = s⋆ᶜ


/-- `Fin.rev` as an `Equiv.Perm`, the antitone involution `Fin n → Fin n` given by
`i ↦ n-(i+1)`. -/
@[simps! apply symm_apply]
def revPerm : Equiv.Perm (Fin n)


theorem Sphere.mk_radius (c : P) (r : ℝ) : (⟨c, r⟩ : Sphere P).radius = r

{P : Type u_2}
[MetricSpace P]
(c : P)
(r : ℝ)


theorem isArtinian_of_submodule_of_artinian (R M) [Ring R] [AddCommGroup M] [Module R M]
    (N : Submodule R M) (_ : IsArtinian R M) : IsArtinian R N

(R : Type u_1)
(M : Type u_2)
[Ring R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)


theorem ball_zero_absorbs_ball_zero (p : Seminorm 𝕜 E) {r₁ r₂ : ℝ} (hr₁ : 0 < r₁) :
    Absorbs 𝕜 (p.ball 0 r₁) (p.ball 0 r₂)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{r₁ r₂ : ℝ}
(hr₁ : 0 < r₁)


theorem deriv_arcsin_aux {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
    HasStrictDerivAt arcsin (1 / √(1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ arcsin x

HasStrictDerivAt Real.arcsin (1 / √(1 - x ^ 2)) x ∧ ContDiffAt ℝ ⊤ Real.arcsin x


@[ext]
theorem ext {φ₁ φ₂ : A →ₐc[R] B} (H : ∀ x, φ₁ x = φ₂ x) : φ₁ = φ₂

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{φ₁ φ₂ : A →ₐc[R] B}
(H : ∀ (x : A), φ₁ x = φ₂ x)


theorem ContinuousWithinAt.comp {g : β → γ} {f : α → β} {s : Set α} {t : Set β} {x : α}
    (hg : ContinuousWithinAt g t (f x)) (hf : ContinuousWithinAt f s x) (h : MapsTo f s t) :
    ContinuousWithinAt (g ∘ f) s x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{g : β → γ}
{f : α → β}
{s : Set α}
{t : Set β}
{x : α}
(hg : ContinuousWithinAt g t (f x))
(hf : ContinuousWithinAt f s x)
(h : Set.MapsTo f s t)


theorem le_ofDual_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    a ≤ WithTop.ofDual b ↔ b ≤ WithBot.toDual a

{α : Type u_1}
[LE α]
{a : WithBot α}
{b : WithTop αᵒᵈ}


@[simp]
theorem quot_mk_eq_coe (l : Filter α) (f : α → β) : Quot.mk _ f = (f : Germ l β)

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


@[elab_as_elim]
theorem adjoin_induction {p : A → Prop} {x : A} (h : x ∈ adjoin R s) (mem : ∀ x ∈ s, p x)
    (algebraMap : ∀ r, p (algebraMap R A r)) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x

(algebraMap : ∀ (r : R), p ((algebraMap R A) r))

(add : ∀ (x y : A), p x → p y → p (x + y))

(mul : ∀ (x y : A), p x → p y → p (x * y))


@[simp]
theorem disjoint_bot_right : Disjoint a ⊥

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


@[simp]
lemma dedup_bind_dedup [DecidableEq α] [DecidableEq β] (s : Multiset α) (f : α → Multiset β) :
    (s.dedup.bind f).dedup = (s.bind f).dedup

{α : Type u_1}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(s : Multiset α)
(f : α → Multiset β)


/-- We need this lemma since `Complex.coe_algebraMap` diverts the simp-normal form away from
`AlgHom.commutes`. -/
@[simp]
theorem _root_.AlgHom.map_coe_real_complex (f : ℂ →ₐ[ℝ] A) (x : ℝ) : f x = algebraMap ℝ A x

{A : Type u_3}
[Semiring A]
[Algebra ℝ A]
(f : ℂ →ₐ[ℝ] A)
(x : ℝ)


@[simp]
theorem aroots_X [CommRing S] [IsDomain S] [Algebra T S] :
    aroots (X : T[X]) S = {0}

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]


theorem projectiveSeminormAux_nonneg (p : FreeAddMonoid (𝕜 × Π i, E i)) :
    0 ≤ projectiveSeminormAux p

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

(p : FreeAddMonoid (𝕜 × ((i : ι) → E i)))

0 ≤ PiTensorProduct.projectiveSeminormAux p


@[simp]
theorem det_toMatrix_prod [Fintype n] (L : List (TransvectionStruct n 𝕜)) :
    det (L.map toMatrix).prod = 1

(L : List (Matrix.TransvectionStruct n 𝕜))

(List.map Matrix.TransvectionStruct.toMatrix L).prod.det = 1


@[simp]
theorem ContinuousLinearMap.mkOfIsCompactOperator_to_linearMap {f : M₁ →ₛₗ[σ₁₂] M₂}
    (hf : IsCompactOperator f) :
    (ContinuousLinearMap.mkOfIsCompactOperator hf : M₁ →ₛₗ[σ₁₂] M₂) = f

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[NontriviallyNormedField 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{M₁ : Type u_3}
{M₂ : Type u_4}
[TopologicalSpace M₁]
[AddCommGroup M₁]
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[TopologicalAddGroup M₁]
[ContinuousConstSMul 𝕜₁ M₁]
[TopologicalAddGroup M₂]
[ContinuousSMul 𝕜₂ M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)

↑(ContinuousLinearMap.mkOfIsCompactOperator hf) = f


/-- The binary fan whose point is `prod F G`. -/
@[simps!]
def binaryProductCone : BinaryFan F G

(F G : CategoryTheory.Functor C (Type w))

(CategoryTheory.FunctorToTypes.binaryProductCone F G).pt.obj a = (F.obj a × G.obj a)


@[simp]
theorem ofNat_apply [ContinuousAdd M₁] (n : ℕ) [n.AtLeastTwo] (m : M₁) :
    ((no_index (OfNat.ofNat n) : M₁ →L[R₁] M₁)) m = OfNat.ofNat n • m

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[ContinuousAdd M₁]
(n : ℕ)
[n.AtLeastTwo]
(m : M₁)


@[simp]
theorem leadingCoeff_C (a : R) : leadingCoeff (C a) = a


/-- The additive equivalence `Cochain K L n ≃+ Cochain K L⟦a⟧ n'` when `n' + a = n`. -/
@[simps]
def rightShiftAddEquiv (n a n' : ℤ) (hn' : n' + a = n) :
    Cochain K L n ≃+ Cochain K (L⟦a⟧) n'

(γ : CochainComplex.HomComplex.Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n')

(CochainComplex.HomComplex.Cochain.rightShiftAddEquiv K L n a n' hn').symm γ = γ.rightUnshift n hn'


lemma flip_def {f : α → β → φ} : flip f = fun b a => f a b

{α : Sort u₁}
{β : Sort u₂}
{φ : Sort u₃}
{f : α → β → φ}


@[simp]
theorem typein_apply {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s]
    (f : r ≼i s) (a : α) : Ordinal.typein s (f a) = Ordinal.typein r a

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]
(f : r ≼i s)
(a : α)


/-- Composition of morphisms of `Pointed`. -/
@[simps]
def comp {X Y Z : Pointed.{u}} (f : Pointed.Hom X Y) (g : Pointed.Hom Y Z) : Pointed.Hom X Z

{X Y Z : Pointed}
(f : X.Hom Y)
(g : Y.Hom Z)

∀ (a : X.X), (f.comp g).toFun a = (g.toFun ∘ f.toFun) a


theorem borel_eq_generateFrom_Ici_rat : borel ℝ = .generateFrom (⋃ a : ℚ, {Ici (a : ℝ)})

borel ℝ = MeasurableSpace.generateFrom (⋃ a, {Set.Ici ↑a})


@[to_additive]
theorem nhds_eq (B : GroupFilterBasis G) {x₀ : G} : @nhds G B.topology x₀ = B.N x₀

{G : Type u}
[Group G]
(B : GroupFilterBasis G)
{x₀ : G}


@[simp]
theorem toConjAct_inv (x : G) : toConjAct x⁻¹ = (toConjAct x)⁻¹

ConjAct.toConjAct x⁻¹ = (ConjAct.toConjAct x)⁻¹


theorem forall₂_congr {p q : ∀ a, β a → Prop} (h : ∀ a b, p a b ↔ q a b) :
    (∀ a b, p a b) ↔ ∀ a b, q a b

(h : ∀ (a : α) (b : β a), p a b ↔ q a b)

(∀ (a : α) (b : β a), p a b) ↔ ∀ (a : α) (b : β a), q a b


theorem ext_iff {v₁ v₂ : AddValuation R Γ₀} : v₁ = v₂ ↔ ∀ (r : R), v₁ r = v₂ r

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
{v₁ v₂ : AddValuation R Γ₀}


lemma finite_hasEigenvalue : Set.Finite f.HasEigenvalue

{K : Type v}
{V : Type w}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(f : Module.End K V)


/-- like `coe_le_one`, but with the inequality in `Icc (0:α) 1`. -/
theorem le_one {t : Icc (0 : α) 1} : t ≤ 1

{α : Type u_1}
[OrderedSemiring α]
{t : ↑(Set.Icc 0 1)}


theorem Exists.nonempty : (∃ x, p x) → Nonempty α


@[simp] theorem mk_lt_mk {x y : Nat} {hx hy} : (⟨x, hx⟩ : Fin n) < ⟨y, hy⟩ ↔ x < y


theorem IsMaxOn.on_preimage (g : δ → α) {b : δ} (hf : IsMaxOn f s (g b)) :
    IsMaxOn (f ∘ g) (g ⁻¹' s) b

{α : Type u}
{β : Type v}
{δ : Type x}
[Preorder β]
{f : α → β}
{s : Set α}
(g : δ → α)
{b : δ}
(hf : IsMaxOn f s (g b))


@[simp]
theorem closure_iUnion₂_lt_nat {n : ℕ} (f : ℕ → Set X) :
    closure (⋃ m < n, f m) = ⋃ m < n, closure (f m)

{X : Type u}
[TopologicalSpace X]
{n : ℕ}
(f : ℕ → Set X)

closure (⋃ m, ⋃ (_ : m < n), f m) = ⋃ m, ⋃ (_ : m < n), closure (f m)


theorem eq_empty_or_nonempty (s : Set α) : s = ∅ ∨ s.Nonempty


lemma multinomial_insert [DecidableEq α] (ha : a ∉ s) (f : α → ℕ) :
    multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * multinomial s f

{α : Type u_1}
{s : Finset α}
{a : α}
[DecidableEq α]
(ha : a ∉ s)
(f : α → ℕ)

Nat.multinomial (insert a s) f = (f a + ∑ i ∈ s, f i).choose (f a) * Nat.multinomial s f


theorem _root_.Real.toNNReal_div {x y : ℝ} (hx : 0 ≤ x) :
    Real.toNNReal (x / y) = Real.toNNReal x / Real.toNNReal y

(x / y).toNNReal = x.toNNReal / y.toNNReal


theorem parallel_promises {S : WSeq (Computation α)} {a} (H : ∀ s ∈ S, s ~> a) : parallel S ~> a

(H : ∀ (s : Computation α), s ∈ S → s.Promises a)


theorem starClosure_toSubalgebra (S : Subalgebra R A) : S.starClosure.toSubalgebra = S ⊔ star S

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
(S : Subalgebra R A)


@[gcongr] theorem rpow_le_rpow_of_exponent_le {x : ℝ≥0} {y z : ℝ} (hx : 1 ≤ x) (hyz : y ≤ z) :
    x ^ y ≤ x ^ z


/--
If `L` preserves the appropriate colimit, then given a colimit cocone for `F ⋙ fst L R : J ⥤ L` and
a cocone for `F ⋙ snd L R : J ⥤ R` we can build a cocone for `F` which will turn out to be a
colimit cocone.
-/
@[simps]
def coconeOfPreserves [PreservesColimit (F ⋙ fst L R) L] {c₁ : Cocone (F ⋙ fst L R)}
    (t₁ : IsColimit c₁) (c₂ : Cocone (F ⋙ snd L R)) : Cocone F

(F : CategoryTheory.Functor J (CategoryTheory.Comma L R))

[CategoryTheory.Limits.PreservesColimit (F.comp (CategoryTheory.Comma.fst L R)) L]

{c₁ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.fst L R))}

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

(c₂ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.snd L R)))

(CategoryTheory.Comma.coconeOfPreserves F t₁ c₂).pt.left = c₁.pt


theorem min_abs_abs_le_abs_max : min |a| |b| ≤ |max a b|

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


@[simp]
theorem diagonal_conjTranspose [AddMonoid α] [StarAddMonoid α] (v : n → α) :
    (diagonal v)ᴴ = diagonal (star v)

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[AddMonoid α]
[StarAddMonoid α]
(v : n → α)

(Matrix.diagonal v)ᴴ = Matrix.diagonal (star v)


@[simp]
theorem submatrix_diagonal_equiv [Zero α] [DecidableEq m] [DecidableEq l] (d : m → α) (e : l ≃ m) :
    (diagonal d).submatrix e e = diagonal (d ∘ e)

{l : Type u_1}
{m : Type u_2}
{α : Type v}
[Zero α]
[DecidableEq m]
[DecidableEq l]
(d : m → α)
(e : l ≃ m)

(Matrix.diagonal d).submatrix ⇑e ⇑e = Matrix.diagonal (d ∘ ⇑e)


theorem setIntegral_le_integral (hfi : Integrable f μ) (hf : 0 ≤ᵐ[μ] f) :
    ∫ x in s, f x ∂μ ≤ ∫ x, f x ∂μ

{X : Type u_1}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{f : X → ℝ}
{s : Set X}
(hfi : MeasureTheory.Integrable f μ)
(hf : 0 ≤ᵐ[μ] f)

∫ (x : X) in s, f x ∂μ ≤ ∫ (x : X), f x ∂μ


theorem directSum_decompose_apply [_hT : Fact T.IsSymmetric] (x : E) (μ : Eigenvalues T) :
    DirectSum.decompose (fun μ : Eigenvalues T => eigenspace T μ) x μ =
      orthogonalProjection (eigenspace T μ) x

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{T : E →ₗ[𝕜] E}
[FiniteDimensional 𝕜 E]
[_hT : Fact T.IsSymmetric]
(x : E)
(μ : Module.End.Eigenvalues T)

((DirectSum.decompose fun μ => Module.End.eigenspace T (↑T μ)) x) μ =
  (orthogonalProjection (Module.End.eigenspace T (↑T μ))) x


@[simp]
theorem ofSet_univ : ofSet Set.univ = PEquiv.refl α


protected theorem NeBot.prod (hf : NeBot f) (hg : NeBot g) : NeBot (f ×ˢ g)

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}
(hf : f.NeBot)
(hg : g.NeBot)


@[to_additive (attr := simp)]
theorem comp_id (f : α →*o β) : f.comp (OrderMonoidHom.id α) = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(f : α →+o β)


theorem tr_clear (p k q) : tr (Λ'.clear p k q) = pop' k (branch
    (fun s => s.elim true p) (goto fun _ => q) (goto fun _ => Λ'.clear p k q))

(p : Turing.PartrecToTM2.Γ' → Bool)
(k : Turing.PartrecToTM2.K')
(q : Turing.PartrecToTM2.Λ')

Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.clear p k q) =
  Turing.PartrecToTM2.pop' k
    (Turing.TM2.Stmt.branch (fun s => s.elim true p) (Turing.TM2.Stmt.goto fun x => q)
      (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.Λ'.clear p k q))


@[to_additive max_sub_sub_right]
theorem max_div_div_right' (a b c : α) : max (a / c) (b / c) = max a b / c

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


@[simp]
theorem insert_toFinmap (a : α) (b : β a) (s : AList β) :
    insert a b (AList.toFinmap s) = AList.toFinmap (s.insert a b)

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

Finmap.insert a b ⟦s⟧ = ⟦AList.insert a b s⟧


@[to_additive (attr := simp)]
lemma ker_snd : ker (snd G G') = .prod ⊤ ⊥

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']


/-- `legendreSym p 2` is given by `χ₈ p`. -/
theorem at_two : legendreSym p 2 = χ₈ p

{p : ℕ}
[Fact (Nat.Prime p)]
(hp : p ≠ 2)


theorem Heap.WF.merge (h₁ : s₁.WF le n) (h₂ : s₂.WF le n) : (merge le s₁ s₂).WF le n

∀ {α : Type u_1} {le : α → α → Bool} {s₁ s₂ : Batteries.BinomialHeap.Imp.Heap α} {n : Nat},
  Batteries.BinomialHeap.Imp.Heap.WF le n s₁ →
    Batteries.BinomialHeap.Imp.Heap.WF le n s₂ →
      Batteries.BinomialHeap.Imp.Heap.WF le n (Batteries.BinomialHeap.Imp.Heap.merge le s₁ s₂)


theorem bddBelow_Icc : BddBelow (Icc a b)


/-- An isomorphism of monads gives a natural isomorphism of the underlying functors.
-/
/- Porting note: removed
`@[simps (config := { rhsMd := semireducible })]`
and replaced with `@[simps]` in the two declarations below-/
@[simps!]
def MonadIso.toNatIso {M N : Monad C} (h : M ≅ N) : (M : C ⥤ C) ≅ N

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{M N : CategoryTheory.Monad C}
(h : M ≅ N)

(CategoryTheory.MonadIso.toNatIso h).hom = h.hom.toNatTrans


@[to_additive]
theorem mem_sup_left {S T : Subgroup G} : ∀ {x : G}, x ∈ S → x ∈ S ⊔ T

{G : Type u_1}
[Group G]
{S T : Subgroup G}
{x : G}


/--
We have a bijection of homsets which will be used to construct the left adjoint to the comparison
functor.
-/
@[simps!]
def comparisonLeftAdjointHomEquiv (A : adj.toMonad.Algebra) (B : D)
    [HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
    (comparisonLeftAdjointObj adj A ⟶ B) ≃ (A ⟶ (comparison adj).obj B)

[CategoryTheory.Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))]

∀ (a : A ⟶ (CategoryTheory.Monad.comparison adj).obj B),
  (CategoryTheory.Monad.MonadicityInternal.comparisonLeftAdjointHomEquiv adj A B).symm a =
    (CategoryTheory.Limits.Cofork.IsColimit.homIso
          (CategoryTheory.Limits.colimit.isColimit
            (CategoryTheory.Limits.parallelPair (F.map A.a) (adj.counit.app (F.obj A.A))))
          B).symm
      ⟨CategoryTheory.CategoryStruct.comp (F.map a.f) (adj.counit.app B), ⋯⟩


theorem Valid'.node {s l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H : BalancedSz (size l) (size r)) (hs : s = size l + size r + 1) :
    Valid' o₁ (@node α s l x r) o₂

{α : Type u_1}
[Preorder α]
{s : ℕ}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}
(hl : Ordnode.Valid' o₁ l ↑x)
(hr : Ordnode.Valid' (↑x) r o₂)
(H : Ordnode.BalancedSz l.size r.size)
(hs : s = l.size + r.size + 1)

Ordnode.Valid' o₁ (Ordnode.node s l x r) o₂


nonrec theorem norm_toLp [Fact (1 ≤ p)] (f : α →ₛ E) (hf : Memℒp f p μ) :
    ‖toLp f hf‖ = ENNReal.toReal (eLpNorm f p μ)

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[Fact (1 ≤ p)]
(f : MeasureTheory.SimpleFunc α E)
(hf : MeasureTheory.Memℒp (↑f) p μ)

‖MeasureTheory.Lp.simpleFunc.toLp f hf‖ = (MeasureTheory.eLpNorm (↑f) p μ).toReal


@[simp]
theorem round_sub_one (a : α) : round (a - 1) = round a - 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


theorem HasDerivWithinAt.smul_const (hc : HasDerivWithinAt c c' s x) (f : F) :
    HasDerivWithinAt (fun y => c y • f) (c' • f) s x

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


theorem bounded_mem (f : ℍ → ℂ) :
    IsBoundedAtImInfty f ↔ ∃ M A : ℝ, ∀ z : ℍ, A ≤ im z → abs (f z) ≤ M

UpperHalfPlane.IsBoundedAtImInfty f ↔ ∃ M A, ∀ (z : ℍ), A ≤ z.im → Complex.abs (f z) ≤ M


@[simp]
theorem _root_.aestronglyMeasurable_union_iff [PseudoMetrizableSpace β] {s t : Set α} :
    AEStronglyMeasurable f (μ.restrict (s ∪ t)) ↔
      AEStronglyMeasurable f (μ.restrict s) ∧ AEStronglyMeasurable f (μ.restrict t)

MeasureTheory.AEStronglyMeasurable f (μ.restrict (s ∪ t)) ↔
  MeasureTheory.AEStronglyMeasurable f (μ.restrict s) ∧ MeasureTheory.AEStronglyMeasurable f (μ.restrict t)


@[norm_cast, simp]
theorem coe_sub (f g : M →ₗ⁅R,L⁆ N) : ⇑(f - g) = f - g

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(f g : M →ₗ⁅R,L⁆ N)


theorem invOf_div (a b : α) [Invertible a] [Invertible b] [Invertible (a / b)] :
    ⅟ (a / b) = b / a

{α : Type u}
[GroupWithZero α]
(a b : α)
[Invertible a]
[Invertible b]
[Invertible (a / b)]


theorem ae_lt_top {f : α → ℝ≥0∞} (hf : Measurable f) (h2f : ∫⁻ x, f x ∂μ ≠ ∞) :
    ∀ᵐ x ∂μ, f x < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : Measurable f)
(h2f : ∫⁻ (x : α), f x ∂μ ≠ ⊤)


@[simp]
theorem coe_mul (f g : A →A[R] A) : ⇑(f * g) = f ∘ g

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[Algebra R A]
(f g : A →A[R] A)


@[simp]
theorem smul_fst : (c • x).fst = c • x.fst

{p : ℝ≥0∞}
{𝕜 : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Semiring 𝕜]
[AddCommGroup α]
[AddCommGroup β]
(x : WithLp p (α × β))
(c : 𝕜)
[Module 𝕜 α]
[Module 𝕜 β]


@[simp]
theorem neLocus_neg_neg : neLocus (-f) (-g) = f.neLocus g

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → AddGroup (N a)]
(f g : Π₀ (a : α), N a)


@[simp]
theorem mul_neg (a b : α) : a * -b = -(a * b)

{α : Type u}
[Mul α]
[HasDistribNeg α]
(a b : α)


@[simp] theorem runCatch_bind_lift [Monad m] (x : m α) (f : α → ExceptCpsT β m β) : runCatch (ExceptCpsT.lift x >>= f : ExceptCpsT β m β) = x >>= fun a => runCatch (f a)

{m : Type u_1 → Type u_2}
{α β : Type u_1}
[Monad m]
(x : m α)
(f : α → ExceptCpsT β m β)

(ExceptCpsT.lift x >>= f).runCatch = do
  let a ← x
  (f a).runCatch


/-- Bijection obtained by separating the term of index `none` of a dfinsupp over `Option ι`.

This is the dfinsupp version of `Equiv.piOptionEquivProd`. -/
@[simps]
noncomputable def equivProdDFinsupp [∀ i, Zero (α i)] :
    (Π₀ i, α i) ≃ α none × Π₀ i, α (some i)

{ι : Type u}
{α : Option ι → Type v}
[(i : Option ι) → Zero (α i)]
(f : α none × Π₀ (i : ι), α (some i))

DFinsupp.equivProdDFinsupp.symm f = DFinsupp.extendWith f.1 f.2


theorem UniformContinuous₂.bicompl {f : α → β → γ} {ga : δ → α} {gb : δ' → β}
    (hf : UniformContinuous₂ f) (hga : UniformContinuous ga) (hgb : UniformContinuous gb) :
    UniformContinuous₂ (bicompl f ga gb)

{α : Type ua}
{β : Type ub}
{γ : Type uc}
{δ : Type ud}
{δ' : Type u_2}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
[UniformSpace δ]
[UniformSpace δ']
{f : α → β → γ}
{ga : δ → α}
{gb : δ' → β}
(hf : UniformContinuous₂ f)
(hga : UniformContinuous ga)
(hgb : UniformContinuous gb)

UniformContinuous₂ (Function.bicompl f ga gb)


@[scoped simp]
theorem map_add_nsmul [AddMonoid G] [AddMonoid H] [AddConstMapClass F G H a b]
    (f : F) (x : G) (n : ℕ) : f (x + n • a) = f x + n • b

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


@[simp, nolint simpNF] -- porting note (#10618): `simpNF` says `simp` can prove this, but it can't
theorem mem_carrier {s : StarSubalgebra R A} {x : A} : x ∈ s.carrier ↔ x ∈ s

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
{s : StarSubalgebra R A}
{x : A}


@[to_additive]
theorem image_mul : m '' (s * t) = m '' s * m '' t

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Mul α]
[Mul β]
[FunLike F α β]
[MulHomClass F α β]
(m : F)
{s t : Set α}


@[simp]
theorem comp_hom' {M N K : Mon_ C} (f : M ⟶ N) (g : N ⟶ K) :
    (f ≫ g : Hom M K).hom = f.hom ≫ g.hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M N K : Mon_ C}
(f : M ⟶ N)
(g : N ⟶ K)


@[simp]
theorem lcongr_single {ι κ : Sort _} (e₁ : ι ≃ κ) (e₂ : M ≃ₗ[R] N) (i : ι) (m : M) :
    lcongr e₁ e₂ (Finsupp.single i m) = Finsupp.single (e₁ i) (e₂ m)

{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{κ : Type u_8}
(e₁ : ι ≃ κ)
(e₂ : M ≃ₗ[R] N)
(i : ι)
(m : M)

(Finsupp.lcongr e₁ e₂) (Finsupp.single i m) = Finsupp.single (e₁ i) (e₂ m)


lemma sign_natCast_of_ne_zero {n : ℕ} (hn : n ≠ 0) : Int.sign n = 1


theorem nextCoeff_of_natDegree_pos (hp : 0 < p.natDegree) :
    nextCoeff p = p.coeff (p.natDegree - 1)

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : 0 < p.natDegree)


@[simp]
theorem binCast_eq [AddMonoidWithOne R] (n : ℕ) :
    (Nat.binCast n : R) = ((n : ℕ) : R)

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


theorem pred_eq_iSup (a : α) : pred a = ⨆ (b) (_ : b < a), b

{α : Type u_1}
[CompleteLattice α]
[PredOrder α]
(a : α)


@[to_additive (attr := simp)]
theorem mul_inv_le_iff_le_mul : a * b⁻¹ ≤ c ↔ a ≤ c * b

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


theorem all_iff (s : String) (p : Char → Bool) : all s p ↔ ∀ c ∈ s.1, p c

s.all p = true ↔ ∀ (c : Char), c ∈ s.data → p c = true


theorem Function.Surjective.iInf_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
    ⨅ x, g (f x) = ⨅ y, g y

{α : Type u_1}
{ι : Sort u_5}
{ι' : Sort u_6}
[InfSet α]
{f : ι → ι'}
(hf : Function.Surjective f)
(g : ι' → α)


lemma toFiniteAux_absolutelyContinuous_toFinite (μ : Measure α) [SFinite μ] :
    μ.toFiniteAux ≪ μ.toFinite

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


theorem subgroup_moeb (A : Γ) (z : ℍ) : A • z = (A : GL(2, ℝ)⁺) • z

(Γ : Subgroup SL(2, ℤ))
(A : ↥Γ)
(z : ℍ)


theorem single_eq_algebraMap_mul_of [CommSemiring k] [Monoid G] (a : G) (b : k) :
    single a b = algebraMap k (MonoidAlgebra k G) b * of k G a

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[Monoid G]
(a : G)
(b : k)

MonoidAlgebra.single a b = (algebraMap k (MonoidAlgebra k G)) b * (MonoidAlgebra.of k G) a


theorem oneCocycles_map_mul_of_isTrivial [A.IsTrivial] (f : oneCocycles A) (g h : G) :
    f.1 (g * h) = f.1 g + f.1 h

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
[A.IsTrivial]
(f : ↥(groupCohomology.oneCocycles A))
(g h : G)


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the top side and `g` on the bottom side. -/
@[simps!]
def fromArrowArrowFunctor' : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor'.obj f).f₂₄ = f.hom.right


lemma centerToCentroid_apply (z : NonUnitalSubsemiring.center α) (a : α) :
    (centerToCentroid z) a = z * a

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(z : ↥(NonUnitalSubsemiring.center α))
(a : α)

(CentroidHom.centerToCentroid z) a = ↑z * a


@[simp]
theorem «forall» {p : PProd α β → Prop} : (∀ x, p x) ↔ ∀ a b, p ⟨a, b⟩

{α : Sort u_1}
{β : Sort u_2}
{p : PProd α β → Prop}

(∀ (x : PProd α β), p x) ↔ ∀ (a : α) (b : β), p ⟨a, b⟩


theorem mul_le_right_iff_opow_omega_dvd {a b : Ordinal} (ha : 0 < a) :
    a * b ≤ b ↔ (a^omega) ∣ b


/-- The image of the normalizer is equal to the normalizer of the image of an isomorphism. -/
@[to_additive
      "The image of the normalizer is equal to the normalizer of the image of an
      isomorphism."]
theorem map_equiv_normalizer_eq (H : Subgroup G) (f : G ≃* N) :
    H.normalizer.map f.toMonoidHom = (H.map f.toMonoidHom).normalizer

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H : AddSubgroup G)
(f : G ≃+ N)

AddSubgroup.map f.toAddMonoidHom H.normalizer = (AddSubgroup.map f.toAddMonoidHom H).normalizer


@[simp]
theorem projRight_prod : projRight (prod q₁ q₂) = q₂

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{a₁ a₂ : α}
{b₁ b₂ : β}
(q₁ : Path.Homotopic.Quotient a₁ a₂)
(q₂ : Path.Homotopic.Quotient b₁ b₂)

Path.Homotopic.projRight (Path.Homotopic.prod q₁ q₂) = q₂


@[simp, norm_cast]
theorem coe_valMinAbs : ∀ {n : ℕ} (x : ZMod n), (x.valMinAbs : ZMod n) = x


/-- If the domain has a zero (and is nontrivial), then `χ 0 = 0`. -/
protected theorem map_zero {R : Type*} [CommMonoidWithZero R] [Nontrivial R] (χ : MulChar R R') :
    χ (0 : R) = 0

{R' : Type u_2}
[CommMonoidWithZero R']
{R : Type u_3}
[CommMonoidWithZero R]
[Nontrivial R]
(χ : MulChar R R')


theorem span_attach_biUnion [DecidableEq M] {α : Type*} (s : Finset α) (f : s → Finset M) :
    span R (s.attach.biUnion f : Set M) = ⨆ x, span R (f x)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[DecidableEq M]
{α : Type u_9}
(s : Finset α)
(f : { x // x ∈ s } → Finset M)

Submodule.span R ↑(s.attach.biUnion f) = ⨆ x, Submodule.span R ↑(f x)


/-- The category of coalgebras over an additive comonad on a preadditive category is preadditive. -/
@[simps]
instance Comonad.coalgebraPreadditive : Preadditive (Comonad.Coalgebra U)

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
(U : CategoryTheory.Comonad C)
[U.Additive]
(F G : U.Coalgebra)
(α β : F ⟶ G)


theorem eq_of_eqOn_of_field_closure_eq_top {s : Set K} (hs : closure s = ⊤) {f g : K →+* L}
    (h : s.EqOn f g) : f = g

{K : Type u}
[DivisionRing K]
{L : Type v}
[Semiring L]
{s : Set K}
(hs : Subfield.closure s = ⊤)
{f g : K →+* L}
(h : Set.EqOn (⇑f) (⇑g) s)


protected theorem sub_lt_sub_right : ∀ {a b c : Nat}, c ≤ a → a < b → a - c < b - c


@[simp]
theorem fst_prod_snd  : (fst R A B).prod (snd R A B) = ContinuousAlgHom.id R (A × B)

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]

(ContinuousAlgHom.fst R A B).prod (ContinuousAlgHom.snd R A B) = ContinuousAlgHom.id R (A × B)


lemma zero_le_one_row [Preorder α] [ZeroLEOneClass α] (i : n) :
    0 ≤ (1 : Matrix n n α) i

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
[Preorder α]
[ZeroLEOneClass α]
(i : n)


@[simp] theorem mkEmpty_eq (α n) : @mkEmpty α n = #[]


/-- `P` is a sheaf for `R` iff it is separated for `R` and there exists an amalgamation. -/
theorem isSeparatedFor_and_exists_isAmalgamation_iff_isSheafFor :
    (IsSeparatedFor P R ∧ ∀ x : FamilyOfElements P R, x.Compatible → ∃ t, x.IsAmalgamation t) ↔
      IsSheafFor P R

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

(CategoryTheory.Presieve.IsSeparatedFor P R ∧
    ∀ (x : CategoryTheory.Presieve.FamilyOfElements P R), x.Compatible → ∃ t, x.IsAmalgamation t) ↔
  CategoryTheory.Presieve.IsSheafFor P R


/-- The one-vertex subgraph. -/
@[simps]
protected def singletonSubgraph (G : SimpleGraph V) (v : V) : G.Subgraph

{V : Type u}
(G : SimpleGraph V)
(v : V)


theorem lt_of_gt {x y : Int} (h : x > y) : y < x


@[to_additive]
theorem tprod_comm' {f : β → γ → α} (h : Multipliable (Function.uncurry f))
    (h₁ : ∀ b, Multipliable (f b)) (h₂ : ∀ c, Multipliable fun b ↦ f b c) :
    ∏' (c) (b), f b c = ∏' (b) (c), f b c

{f : β → γ → α}

(h₂ : ∀ (c : γ), Multipliable fun b => f b c)


/-- The cocone on `constPUnitFunctor` with cone point `PUnit`. -/
@[simps]
def pUnitCocone : Cocone (constPUnitFunctor.{w} C)

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

(CategoryTheory.Limits.Types.pUnitCocone C).pt = PUnit.{w + 1}


theorem finite_respectsIso : RespectsIso @Finite


@[simp]
theorem domCoprod'_apply (a : MultilinearMap R (fun _ : ι₁ => N) N₁)
    (b : MultilinearMap R (fun _ : ι₂ => N) N₂) : domCoprod' (a ⊗ₜ[R] b) = domCoprod a b

{R : Type u_1}
{ι₁ : Type u_2}
{ι₂ : Type u_3}
[CommSemiring R]
{N₁ : Type u_6}
[AddCommMonoid N₁]
[Module R N₁]
{N₂ : Type u_7}
[AddCommMonoid N₂]
[Module R N₂]
{N : Type u_8}
[AddCommMonoid N]
[Module R N]
(a : MultilinearMap R (fun x => N) N₁)
(b : MultilinearMap R (fun x => N) N₂)

MultilinearMap.domCoprod' (a ⊗ₜ[R] b) = a.domCoprod b


theorem negSucc_mul_negOfNat (m n : Nat) : -[m+1] * negOfNat n = ofNat (succ m * n)

Int.negSucc m * Int.negOfNat n = Int.ofNat (m.succ * n)


@[to_additive] lemma div (ha : IsUnit a) (hb : IsUnit b) : IsUnit (a / b)

{α : Type u}
[DivisionMonoid α]
{a b : α}
(ha : IsUnit a)
(hb : IsUnit b)


@[simp] theorem dense_discrete {s : Set α} : Dense s ↔ s = univ

{α : Type u_1}
[TopologicalSpace α]
[DiscreteTopology α]
{s : Set α}


@[simp]
theorem bmod_add_mul_cancel (x : Int) (n : Nat) (k : Int) : Int.bmod (x + n * k) n = Int.bmod x n


theorem support_mul_subset_add_support [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} :
    support (x * y) ⊆ support x + support y

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{x y : HahnSeries Γ R}


lemma tendsto_integral_of_forall_integral_le_liminf_integral {ι : Type*} {L : Filter ι}
    {μ : Measure X} [IsProbabilityMeasure μ] {μs : ι → Measure X} [∀ i, IsProbabilityMeasure (μs i)]
    (h : ∀ f : X →ᵇ ℝ, 0 ≤ f → ∫ x, f x ∂μ ≤ L.liminf (fun i ↦ ∫ x, f x ∂ (μs i)))
    (f : X →ᵇ ℝ) :
    Tendsto (fun i ↦ ∫ x, f x ∂ (μs i)) L (𝓝 (∫ x, f x ∂μ))

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

(h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → ∫ (x : X), f x ∂μ ≤ Filter.liminf (fun i => ∫ (x : X), f x ∂μs i) L)

Filter.Tendsto (fun i => ∫ (x : X), f x ∂μs i) L (𝓝 (∫ (x : X), f x ∂μ))


theorem solution_nonzero {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) :
    solution p a₁ a₂ ≠ 0

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[IsAlgClosed k]
{a₁ a₂ : WittVector p k}
(ha₁ : a₁.coeff 0 ≠ 0)
(ha₂ : a₂.coeff 0 ≠ 0)

WittVector.RecursionBase.solution p a₁ a₂ ≠ 0


@[to_additive]
theorem prodMap_comap_prod {G' : Type*} {N' : Type*} [Group G'] [Group N'] (f : G →* N)
    (g : G' →* N') (S : Subgroup N) (S' : Subgroup N') :
    (S.prod S').comap (prodMap f g) = (S.comap f).prod (S'.comap g)

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{G' : Type u_8}
{N' : Type u_9}
[AddGroup G']
[AddGroup N']
(f : G →+ N)
(g : G' →+ N')
(S : AddSubgroup N)
(S' : AddSubgroup N')

AddSubgroup.comap (f.prodMap g) (S.prod S') = (AddSubgroup.comap f S).prod (AddSubgroup.comap g S')


@[norm_cast]
theorem coe_bot : (⊥ : YoungDiagram).cells = (∅ : Set (ℕ × ℕ))


theorem Nonempty.subset_pair_iff_eq (hs : s.Nonempty) :
    s ⊆ {a, b} ↔ s = {a} ∨ s = {b} ∨ s = {a, b}

{α : Type u}
{a b : α}
{s : Set α}
(hs : s.Nonempty)


@[simp]
theorem deleteEdges_inter_edgeSet_left_eq :
    G'.deleteEdges (G'.edgeSet ∩ s) = G'.deleteEdges s

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


/--
Show that the extension of `f : S.functor ⟶ P` to all of `yoneda.obj X` is in fact an extension, ie
that the triangle below commutes, provided `P` is a sheaf for `S`

      f
   S  →  P
   ↓  ↗
   yX

-/
@[reassoc (attr := simp)]
theorem IsSheafFor.functorInclusion_comp_extend {P : Cᵒᵖ ⥤ Type v₁} (h : IsSheafFor P S)
    (f : S.functor ⟶ P) : S.functorInclusion ≫ h.extend f = f

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

(h : CategoryTheory.Presieve.IsSheafFor P S.arrows)

CategoryTheory.CategoryStruct.comp S.functorInclusion (h.extend f) = f


@[simp, norm_cast]
theorem coe_eq_univ : (s : Set α) = univ ↔ s = ⊥


theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
(g : α → β)
(f : ι → α)


@[reassoc]
theorem prod.lift_snd {W X Y : C} [HasBinaryProduct X Y] (f : W ⟶ X) (g : W ⟶ Y) :
    prod.lift f g ≫ prod.snd = g

CategoryTheory.Limits.prod.lift f g ≫ CategoryTheory.Limits.prod.snd = g


@[simp]
theorem ack_inj_left {m₁ m₂ n : ℕ} : ack m₁ n = ack m₂ n ↔ m₁ = m₂


theorem add_coeff {x y : HahnSeries Γ R} {a : Γ} : (x + y).coeff a = x.coeff a + y.coeff a

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
{x y : HahnSeries Γ R}
{a : Γ}


theorem singleton_vsub_singleton (a b : β) : ({a} : Finset β) -ᵥ {b} = {a -ᵥ b}

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


theorem Iic_prod_eq (a : α × β) : Iic a = Iic a.1 ×ˢ Iic a.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(a : α × β)


theorem stronglyMeasurable_derivWithin_Ioi :
    StronglyMeasurable (fun x ↦ derivWithin f (Ioi x) x)

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : ℝ → F)
[CompleteSpace F]

MeasureTheory.StronglyMeasurable fun x => derivWithin f (Set.Ioi x) x


theorem coe_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Subsemiring R}
    (hS : Directed (· ≤ ·) S) : ((⨆ i, S i : Subsemiring R) : Set R) = ⋃ i, S i

(hS : Directed (fun x x_1 => x ≤ x_1) S)


theorem isSpecial_iff : u.IsSpecial ↔ u.IsSpecial'


theorem dvd_two_of_totient_le_one {a : ℕ} (han : 0 < a) (ha : a.totient ≤ 1) : a ∣ 2


lemma equicontinuousAt_restrict_iff (F : ι → X → α) {S : Set X} (x₀ : S) :
    EquicontinuousAt (S.restrict ∘ F) x₀ ↔ EquicontinuousWithinAt F S x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
(F : ι → X → α)
{S : Set X}
(x₀ : ↑S)

EquicontinuousAt (S.restrict ∘ F) x₀ ↔ EquicontinuousWithinAt F S ↑x₀


theorem arrowCongr_comp {α₁ β₁ γ₁ α₂ β₂ γ₂ : Sort*} (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) (ec : γ₁ ≃ γ₂)
    (f : α₁ → β₁) (g : β₁ → γ₁) :
    arrowCongr ea ec (g ∘ f) = arrowCongr eb ec g ∘ arrowCongr ea eb f

{α₁ : Sort u_1}
{β₁ : Sort u_2}
{γ₁ : Sort u_3}
{α₂ : Sort u_4}
{β₂ : Sort u_5}
{γ₂ : Sort u_6}
(ea : α₁ ≃ α₂)
(eb : β₁ ≃ β₂)
(ec : γ₁ ≃ γ₂)
(f : α₁ → β₁)
(g : β₁ → γ₁)

(ea.arrowCongr ec) (g ∘ f) = (eb.arrowCongr ec) g ∘ (ea.arrowCongr eb) f


theorem pf_sub_c [Sub α] (p : a = b) (c : α) : a - c = b - c

{α : Type u_1}
{a b : α}
[Sub α]
(p : a = b)
(c : α)


lemma dvd {x : ℕ} (hx : (x : R) = 0) : ringChar R ∣ x

{R : Type u_1}
[NonAssocSemiring R]
{x : ℕ}
(hx : ↑x = 0)


theorem modifyLast_append (f : α → α) (l₁ l₂ : List α) (_ : l₂ ≠ []) :
    modifyLast f (l₁ ++ l₂) = l₁ ++ modifyLast f l₂

{α : Type u}
(f : α → α)
(l₁ l₂ : List α)

l₂ ≠ [] → List.modifyLast f (l₁ ++ l₂) = l₁ ++ List.modifyLast f l₂


theorem msb_eq_false_iff_two_mul_lt (x : BitVec w) : x.msb = false ↔ 2 * x.toNat < 2^w


theorem comm_sq₂ (hf : ψ.comp f₁ = f₂.comp φ) (hf' : ψ'.comp f₂ = f₃.comp φ') :
    (ψ'.comp ψ).comp f₁ = f₃.comp (φ'.comp φ)

{V₁ : Type u_3}
{V₂ : Type u_4}
{V₃ : Type u_5}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
{W₁ : Type u_6}
{W₂ : Type u_7}
{W₃ : Type u_8}
[SeminormedAddCommGroup W₁]
[SeminormedAddCommGroup W₂]
[SeminormedAddCommGroup W₃]
{f₁ : NormedAddGroupHom V₁ W₁}
{f₂ : NormedAddGroupHom V₂ W₂}
{f₃ : NormedAddGroupHom V₃ W₃}
{φ : NormedAddGroupHom V₁ V₂}
{ψ : NormedAddGroupHom W₁ W₂}
{φ' : NormedAddGroupHom V₂ V₃}
{ψ' : NormedAddGroupHom W₂ W₃}
(hf : ψ.comp f₁ = f₂.comp φ)
(hf' : ψ'.comp f₂ = f₃.comp φ')


@[nontriviality]
theorem of_subsingleton [Subsingleton α] : NullMeasurableSet s μ

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[Subsingleton α]


/-- See also `injective_pow_iff_not_isOfFinOrder`. -/
@[to_additive "See also `injective_nsmul_iff_not_isOfFinAddOrder`."]
theorem not_isOfFinOrder_of_injective_pow {x : G} (h : Injective fun n : ℕ => x ^ n) :
    ¬IsOfFinOrder x

{G : Type u_1}
[AddMonoid G]
{x : G}
(h : Function.Injective fun n => n • x)


@[to_additive]
theorem mul_inter_subset : s * (t₁ ∩ t₂) ⊆ s * t₁ ∩ (s * t₂)

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


protected theorem add_left_cancel' (c : ℤ) (h : c + a ≡ c + b [ZMOD n]) : a ≡ b [ZMOD n]

{n a b : ℤ}
(c : ℤ)
(h : c + a ≡ c + b [ZMOD n])


/-- If a group `G` acts on `X` by isometries, then `IsometryEquiv.constSMul` is the isometry of
`X` given by multiplication of a constant element of the group. -/
@[to_additive (attr := simps! toEquiv apply) "If an additive group `G` acts on `X` by isometries,
then `IsometryEquiv.constVAdd` is the isometry of `X` given by addition of a constant element of the
group."]
def constSMul (c : G) : X ≃ᵢ X

{G : Type v}
{X : Type w}
[PseudoEMetricSpace X]
[AddGroup G]
[AddAction G X]
[IsometricVAdd G X]
(c : G)

(IsometryEquiv.constVAdd c).toEquiv = AddAction.toPerm c


@[simp]
theorem toFinset_add (s t : Multiset α) : toFinset (s + t) = toFinset s ∪ toFinset t

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

(s + t).toFinset = s.toFinset ∪ t.toFinset


theorem ext' {as bs : Array α} (h : as.data = bs.data) : as = bs

{α : Type u_1}
{as bs : Array α}
(h : as.data = bs.data)


/-- Every set in a join-semilattice generates a set closed under join. -/
@[simps! isClosed]
def supClosure : ClosureOperator (Set α)

{α : Type u_2}
[SemilatticeSup α]
(s : Set α)


theorem union_le_add (s t : Multiset α) : s ∪ t ≤ s + t


@[simp]
theorem IciExtend_coe (f : Ici a → β) (x : Ici a) : IciExtend f x = f x

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a : α}
(f : ↑(Set.Ici a) → β)
(x : ↑(Set.Ici a))


theorem lt_of_le_of_lt' : b ≤ c → a < b → a < c


theorem uniformContinuous_iff {α β} {uα : UniformSpace α} {uβ : UniformSpace β} {f : α → β} :
    UniformContinuous f ↔ uα ≤ uβ.comap f

{α : Type u_2}
{β : Type u_3}
{uα : UniformSpace α}
{uβ : UniformSpace β}
{f : α → β}

UniformContinuous f ↔ uα ≤ UniformSpace.comap f uβ


@[simp]
theorem diam_image (s : Set P) : Metric.diam (e '' s) = Metric.diam s

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


@[simp]
theorem mul_left (a b : N ⋊[φ] G) : (a * b).left = a.left * φ a.right b.left

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}
(a b : N ⋊[φ] G)

(a * b).left = a.left * (φ a.right) b.left


@[simp]
theorem pmap_eq_nil {p : α → Prop} {f : ∀ a, p a → β} {l H} : pmap f l H = [] ↔ l = []

{α : Type u}
{β : Type v}
{p : α → Prop}
{f : (a : α) → p a → β}
{l : List α}
{H : ∀ (a : α), a ∈ l → p a}


@[simp]
theorem mem_sort {s : Finset α} {a : α} : a ∈ sort r s ↔ a ∈ s

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
{s : Finset α}
{a : α}


theorem one_le_blocksFun (i : Fin c.length) : 1 ≤ c.blocksFun i

{n : ℕ}
(c : Composition n)
(i : Fin c.length)


theorem fderivWithin_exp (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => Real.exp (f x)) s x = Real.exp (f x) • fderivWithin ℝ f s x

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


@[simp]
theorem conjTranspose_conjTranspose [InvolutiveStar α] (M : Matrix m n α) : Mᴴᴴ = M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[InvolutiveStar α]
(M : Matrix m n α)


/-- The fully faithful embedding of `Sequential` in `TopCat`. -/
@[simps!]
def sequentialToTop : Sequential.{u} ⥤ TopCat.{u}

∀ {X Y : CategoryTheory.InducedCategory TopCat Sequential.toTop} (f : X ⟶ Y), Sequential.sequentialToTop.map f = f


/-- "iff" version of `Multipliable.of_nat_of_neg`. -/
@[to_additive "\"iff\" version of `Summable.of_nat_of_neg`."]
lemma multipliable_int_iff_multipliable_nat_and_neg {f : ℤ → G} :
    Multipliable f ↔ (Multipliable fun n : ℕ ↦ f n) ∧ (Multipliable fun n : ℕ ↦ f (-n))

{G : Type u_2}
[CommGroup G]
[UniformSpace G]
[UniformGroup G]
[CompleteSpace G]
{f : ℤ → G}

Multipliable f ↔ (Multipliable fun n => f ↑n) ∧ Multipliable fun n => f (-↑n)


@[to_additive relindex_mul_relindex]
theorem relindex_mul_relindex (hHK : H ≤ K) (hKL : K ≤ L) :
    H.relindex K * K.relindex L = H.relindex L

{G : Type u_1}
[Group G]
(H K L : Subgroup G)
(hHK : H ≤ K)
(hKL : K ≤ L)


/-- Functor composition induces a functor on truncated cosimplicial objects. -/
@[simps!]
def whiskering {n} (D : Type*) [Category D] : (C ⥤ D) ⥤ Truncated C n ⥤ Truncated D n

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{n : ℕ}
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategory.Truncated n ⥤ C)

∀ {X Y : SimplexCategory.Truncated n} (f : X ⟶ Y),
  (((CategoryTheory.CosimplicialObject.Truncated.whiskering C D).obj H).obj F).map f = H.map (F.map f)


theorem mod_mem_mod [Mod α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma % mb ∈ a % b

{α : Type u_1}
[Mod α]
(a b : Part α)
(ma mb : α)
(ha : ma ∈ a)
(hb : mb ∈ b)


theorem bind_singleton (f : α → List β) (x : α) : [x].bind f = f x

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


/-- Angles in a vector space are invariant to inversion -/
@[simp]
theorem angle_const_sub (v : V) (v₁ v₂ v₃ : V) : ∠ (v - v₁) (v - v₂) (v - v₃) = ∠ v₁ v₂ v₃

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(v v₁ v₂ v₃ : V)

EuclideanGeometry.angle (v - v₁) (v - v₂) (v - v₃) = EuclideanGeometry.angle v₁ v₂ v₃


theorem blsub_lt_ord {o : Ordinal} {f : ∀ a < o, Ordinal} {c : Ordinal} (ho : o.card < c.cof)
    (hf : ∀ i hi, f i hi < c) : blsub.{u, u} o f < c

{f : (a : Ordinal.{u}) → a < o → Ordinal.{u}}

(hf : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi < c)


@[field_simps] lemma div_eq_div_iff (hb : b ≠ 0) (hd : d ≠ 0) : a / b = c / d ↔ a * d = c * b

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{a b c d : G₀}
(hb : b ≠ 0)
(hd : d ≠ 0)


theorem toMeasure_normalize_eq_of_nonzero (nonzero : μ ≠ 0) :
    (μ.normalize : Measure Ω) = μ.mass⁻¹ • μ

{Ω : Type u_1}
[Nonempty Ω]
{m0 : MeasurableSpace Ω}
(μ : MeasureTheory.FiniteMeasure Ω)
(nonzero : μ ≠ 0)


protected nonrec theorem IsWF.union (hs : IsWF s) (ht : IsWF t) : IsWF (s ∪ t)

{α : Type u_2}
[Preorder α]
{s t : Set α}
(hs : s.IsWF)
(ht : t.IsWF)


/-- The function `(x ^ n) / (b * exp x + c)` tends to `0` at `+∞`, for any natural number
`n` and any real numbers `b` and `c` such that `b` is nonzero. -/
theorem tendsto_div_pow_mul_exp_add_atTop (b c : ℝ) (n : ℕ) (hb : 0 ≠ b) :
    Tendsto (fun x => x ^ n / (b * exp x + c)) atTop (𝓝 0)

Filter.Tendsto (fun x => x ^ n / (b * Real.exp x + c)) Filter.atTop (𝓝 0)


lemma map_polynomialX : (W'.map f).toJacobian.polynomialX = MvPolynomial.map f W'.polynomialX

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)

(WeierstrassCurve.map W' f).toJacobian.polynomialX = (MvPolynomial.map f) W'.polynomialX


@[simp]
theorem compContinuousLinearMapEquivL_symm (f : ∀ i, E i ≃L[𝕜] E₁ i) :
    (compContinuousLinearMapEquivL G f).symm =
      compContinuousLinearMapEquivL G fun i : ι => (f i).symm

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

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

(ContinuousMultilinearMap.compContinuousLinearMapEquivL G f).symm =
  ContinuousMultilinearMap.compContinuousLinearMapEquivL G fun i => (f i).symm


/-- 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, +∞)`. -/
theorem integrableOn_Ioi_deriv_of_nonneg' (hderiv : ∀ x ∈ Ici a, HasDerivAt g (g' x) x)
    (g'pos : ∀ x ∈ Ioi a, 0 ≤ g' x) (hg : Tendsto g atTop (𝓝 l)) : IntegrableOn g' (Ioi a)

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

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

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


theorem op (h : IsPushout f g inl inr) : IsPullback inr.op inl.op g.op f.op

(h : CategoryTheory.IsPushout f g inl inr)

CategoryTheory.IsPullback inr.op inl.op g.op f.op


@[to_additive tendsto_norm]
theorem tendsto_norm' {x : E} : Tendsto (fun a => ‖a‖) (𝓝 x) (𝓝 ‖x‖)

{E : Type u_6}
[SeminormedGroup E]
{x : E}

Filter.Tendsto (fun a => ‖a‖) (𝓝 x) (𝓝 ‖x‖)


@[to_additive]
theorem mul_left_ne_self : a * b ≠ b ↔ a ≠ 1

{M : Type u}
[RightCancelMonoid M]
{a b : M}


/--
Giving a continuous map out of a disjoint union is the same as giving a continuous map out of
each term. This is a version of `Equiv.piCurry` for continuous maps.
-/
@[simps]
def sigmaEquiv : (∀ i, C(X i, A)) ≃ C((Σ i, X i), A)

{I : Type u_5}
(A : Type u_6)
(X : I → Type u_7)
[TopologicalSpace A]
[(i : I) → TopologicalSpace (X i)]
(f : C((i : I) × X i, A))
(i : I)

(ContinuousMap.sigmaEquiv A X).symm f i = f.comp (ContinuousMap.sigmaMk i)


/-- A sequence `[r₁, …, rₙ]` is weakly regular on `M` iff `rᵢ` is regular on
`M⧸(r₁, …, rᵢ₋₁)M` for all `1 ≤ i ≤ n`. -/
@[mk_iff]
structure IsWeaklyRegular (rs : List R) : Prop where
  regular_mod_prev : ∀ i (h : i < rs.length),
    IsSMulRegular (M ⧸ (ofList (rs.take i) • ⊤ : Submodule R M)) rs[i]

{R : Type u_1}
(M : Type u_3)
[CommRing R]
[AddCommGroup M]
[Module R M]
(rs : List R)

RingTheory.Sequence.IsWeaklyRegular M rs ↔
  ∀ (i : ℕ) (h : i < rs.length), IsSMulRegular (M ⧸ Ideal.ofList (List.take i rs) • ⊤) rs[i]


theorem NNReal.tendsto_const_div_atTop_nhds_zero_nat (C : ℝ≥0) :
    Tendsto (fun n : ℕ ↦ C / n) atTop (𝓝 0)

Filter.Tendsto (fun n => C / ↑n) Filter.atTop (𝓝 0)


theorem insert_entries_of_neg {a} {b : β a} {s : AList β} (h : a ∉ s) :
    (insert a b s).entries = ⟨a, b⟩ :: s.entries

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

(AList.insert a b s).entries = ⟨a, b⟩ :: s.entries


@[simp]
theorem self_empty {n : ℕ} : Ico n n = []


theorem is_prime_iff {a : Cardinal} : Prime a ↔ ℵ₀ ≤ a ∨ ∃ p : ℕ, a = p ∧ p.Prime

Prime a ↔ Cardinal.aleph0 ≤ a ∨ ∃ p, a = ↑p ∧ Nat.Prime p


theorem lie_mem_left (I : LieIdeal R L) (x y : L) (h : x ∈ I) : ⁅x, y⁆ ∈ I

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
(x y : L)
(h : x ∈ I)


@[simp]
protected theorem coe_coe {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R A₁ A₂] (f : F) :
    ⇑(f : A₁ ≃ₐ[R] A₂) = f

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
{F : Type u_1}
[EquivLike F A₁ A₂]
[AlgEquivClass F R A₁ A₂]
(f : F)


@[simp]
theorem cast_one' : (cast (1 : ZMod n) : R) = 1

{n : ℕ}
{R : Type u_1}
[Ring R]
[CharP R n]


@[to_additive (attr := simp)]
theorem mul_apply (f g : α →*o β) (a : α) : (f * g) a = f a * g a

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
(f g : α →+o β)
(a : α)


lemma zero_add' (f : L.obj X ⟶ L.obj Y) :
    add' W (L.map 0) f = f

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

CategoryTheory.Localization.Preadditive.add' W (L.map 0) f = f


@[reassoc]
theorem map_π_preserves_coequalizer_inv_desc {W : D} (k : G.obj Y ⟶ W)
    (wk : G.map f ≫ k = G.map g ≫ k) : G.map (coequalizer.π f g) ≫
      (PreservesCoequalizer.iso G f g).inv ≫ coequalizer.desc k wk = k

[CategoryTheory.Limits.HasCoequalizer (G.map f) (G.map g)]

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f g) G]

G.map (CategoryTheory.Limits.coequalizer.π f g) ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv ≫ CategoryTheory.Limits.coequalizer.desc k wk =
  k


protected theorem disjoint_right (C : G.ComponentCompl K) : Disjoint K C

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


theorem unit_valuation_eq_one (x : S.unit K) {v : HeightOneSpectrum R} (hv : v ∉ S) :
    v.valuation ((x : Kˣ) : K) = 1

(S : Set (IsDedekindDomain.HeightOneSpectrum R))

{v : IsDedekindDomain.HeightOneSpectrum R}


theorem isOpen_iff_continuous_mem {s : Set α} : IsOpen s ↔ Continuous (· ∈ s)

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}


@[simp] lemma smul_τ₃ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₃ = a • φ.τ₃

{R : Type u_1}
{C : Type u_2}
[Semiring R]
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(a : R)
(φ : S₁ ⟶ S₂)

(a • φ).τ₃ = a • φ.τ₃


theorem eq_symm_apply (e : P₁ ≃ᵃL[k] P₂) {x y} : y = e.symm x ↔ e y = x

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)
{x : P₂}
{y : P₁}


theorem algebraMap_eq_diagonal (r : R) :
    algebraMap R (Matrix n n α) r = diagonal (algebraMap R (n → α) r)

{n : Type u_3}
{R : Type u_7}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommSemiring R]
[Semiring α]
[Algebra R α]
(r : R)

(algebraMap R (Matrix n n α)) r = Matrix.diagonal ((algebraMap R (n → α)) r)


@[simp]
theorem flip_apply (A : BilinForm R M) (x y : M) : flipHom A x y = A y x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(A : LinearMap.BilinForm R M)
(x y : M)

((LinearMap.BilinForm.flipHom A) x) y = (A y) x


/-- The `cons` and `head`/`tail` functions are mutually inverse, unlike in the case of `List` where
this only holds for nonempty lists. -/
@[simp]
theorem ListBlank.cons_head_tail {Γ} [Inhabited Γ] : ∀ l : ListBlank Γ, l.tail.cons l.head = l

{Γ : Type u_1}
[Inhabited Γ]
(l : Turing.ListBlank Γ)


@[to_additive]
theorem MonoidHomClass.lipschitz_of_bound_nnnorm [MonoidHomClass 𝓕 E F] (f : 𝓕) (C : ℝ≥0)
    (h : ∀ x, ‖f x‖₊ ≤ C * ‖x‖₊) : LipschitzWith C f

{𝓕 : Type u_1}
{E : Type u_3}
{F : Type u_4}
[SeminormedAddGroup E]
[SeminormedAddGroup F]
[FunLike 𝓕 E F]
[AddMonoidHomClass 𝓕 E F]
(f : 𝓕)
(C : ℝ≥0)
(h : ∀ (x : E), ‖f x‖₊ ≤ C * ‖x‖₊)


@[to_additive]
theorem Subgroup.exponent_toSubmonoid (H : Subgroup G) :
    Monoid.exponent H.toSubmonoid = Monoid.exponent H

Monoid.exponent ↥H.toSubmonoid = Monoid.exponent ↥H


@[to_additive]
nonrec theorem Smooth.inv {f : M → G} (hf : Smooth I' I f) : Smooth I' I fun x => (f x)⁻¹

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


@[to_additive (attr := simp)]
lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f

{X Y Z : AddMonCat}
{f : X ⟶ Y}
{g : Y ⟶ Z}


@[simp]
theorem mk_id {X : F C} : ⟦Hom.id X⟧ = 𝟙 X

{X : CategoryTheory.FreeMonoidalCategory C}

⟦CategoryTheory.FreeMonoidalCategory.Hom.id X⟧ = CategoryTheory.CategoryStruct.id X


lemma exists_eq_iInf_of_not_isPredLimit (hf : ¬ IsPredLimit (⨅ i, f i)) :
    ∃ i, f i = ⨅ i, f i

{ι : Type u_1}
{α : Type u_2}
[CompleteLinearOrder α]
{f : ι → α}
(hf : ¬Order.IsPredLimit (⨅ i, f i))


theorem Icc.infinite : Infinite (Icc a b)

{α : Type u_1}
[Preorder α]
[DenselyOrdered α]
{a b : α}
(h : a < b)


theorem Disjoint.sup_sdiff_cancel_right (h : Disjoint a b) : (a ⊔ b) \ b = a

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b : α}
(h : Disjoint a b)


theorem hundred_div_ε_pow_five_le_m [Nonempty α] (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α)
    (hPε : 100 ≤ (4 : ℝ) ^ P.parts.card * ε ^ 5) : 100 / ε ^ 5 ≤ m

(hPα : P.parts.card * 16 ^ P.parts.card ≤ Fintype.card α)


@[simp]
theorem single_vecMul [Fintype m] [DecidableEq m] [NonUnitalNonAssocSemiring R] (M : Matrix m n R)
    (i : m) (x : R) : Pi.single i x ᵥ* M = fun j => x * M i j

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
[Fintype m]
[DecidableEq m]
[NonUnitalNonAssocSemiring R]
(M : Matrix m n R)
(i : m)
(x : R)


theorem neg_left {M : Type*} [AddCommGroup M] [TopologicalSpace M] [TopologicalAddGroup M]
    {v : VectorMeasure α M} {w : VectorMeasure α N} (h : v ≪ᵥ w) : -v ≪ᵥ w

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


theorem gramSchmidtOrthonormalBasis_inv_triangular' {i j : ι} (hij : i < j) :
    (gramSchmidtOrthonormalBasis h f).repr (f i) j = 0

(h : FiniteDimensional.finrank 𝕜 E = Fintype.card ι)


protected theorem _root_.Embedding.firstCountableTopology {β : Type*}
    [TopologicalSpace β] [FirstCountableTopology β] {f : α → β} (hf : Embedding f) :
    FirstCountableTopology α

{α : Type u}
[t : TopologicalSpace α]
{β : Type u_1}
[TopologicalSpace β]
[FirstCountableTopology β]
{f : α → β}
(hf : Embedding f)


/-- An induction principle for closure membership. If `p` holds for `1` and all elements of
`k` and their inverse, and is preserved under multiplication, then `p` holds for all elements of
the closure of `k`. -/
@[to_additive (attr := elab_as_elim)
  "An induction principle for additive closure membership. If `p` holds for `0` and all
  elements of `k` and their negation, and is preserved under addition, then `p` holds for all
  elements of the additive closure of `k`."]
theorem closure_induction'' {p : (g : G) → g ∈ closure s → Prop}
    (mem : ∀ x (hx : x ∈ s), p x (subset_closure hx))
    (inv_mem : ∀ x (hx : x ∈ s), p x⁻¹ (inv_mem (subset_closure hx)))
    (one : p 1 (one_mem _))
    (mul : ∀ x y hx hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
    {x} (h : x ∈ closure s) : p x h

{p : (g : G) → g ∈ Subgroup.closure s → Prop}

(inv_mem : ∀ (x : G) (hx : x ∈ s), p x⁻¹ ⋯)

(mul : ∀ (x y : G) (hx : x ∈ Subgroup.closure s) (hy : y ∈ Subgroup.closure s), p x hx → p y hy → p (x * y) ⋯)


@[simp]
theorem ofMul_one [One α] : @Additive.ofMul α 1 = 0


@[simp]
theorem forget₂_obj (X : ModuleCat R) :
    (forget₂ (ModuleCat R) AddCommGrp).obj X = AddCommGrp.of X

(CategoryTheory.forget₂ (ModuleCat R) AddCommGrp).obj X = AddCommGrp.of ↑X


@[to_additive (attr := simp)]
theorem zpow_mod_period_smul (j : ℤ) {g : G} {a : α} :
    g ^ (j % (period g a : ℤ)) • a = g ^ j • a

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

g ^ (j % ↑(MulAction.period g a)) • a = g ^ j • a


protected lemma lt_iff_le_and_ne : a < b ↔ a ≤ b ∧ a ≠ b


theorem lt_iff_cmp {m n} : m < n ↔ cmp m n = Ordering.lt


theorem cast_rat {n : ℤ} {d : ℕ} {R} [DivisionRing R] {a : R} :
    IsRat a n d → a = Rat.rawCast n d + 0

{n : ℤ}
{d : ℕ}
{R : Type u_2}
[DivisionRing R]
{a : R}

Mathlib.Meta.NormNum.IsRat a n d → a = Rat.rawCast n d + 0


/-- The functor `Comma L R ⥤ Comma L R` induced by the identity natural transformation on `R` is
    naturally isomorphic to the identity functor. -/
@[simps!]
def mapRightId : mapRight 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]
(L : CategoryTheory.Functor A T)
(R : CategoryTheory.Functor B T)
(X : CategoryTheory.Comma L R)

((CategoryTheory.Comma.mapRightId L R).hom.app X).right = CategoryTheory.CategoryStruct.id X.right


@[to_additive]
theorem comp_lift {P' : Type*} [Monoid P'] (f : P →* P') (g₁ : M →* P) (g₂ : N →* P) :
    f.comp (lift g₁ g₂) = lift (f.comp g₁) (f.comp g₂)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[MulOneClass M]
[MulOneClass N]
[Monoid P]
{P' : Type u_4}
[Monoid P']
(f : P →* P')
(g₁ : M →* P)
(g₂ : N →* P)

f.comp (Monoid.Coprod.lift g₁ g₂) = Monoid.Coprod.lift (f.comp g₁) (f.comp g₂)


@[simp]
theorem ae_restrict_biUnion_finset_iff (s : ι → Set α) (t : Finset ι) (p : α → Prop) :
    (∀ᵐ x ∂μ.restrict (⋃ i ∈ t, s i), p x) ↔ ∀ i ∈ t, ∀ᵐ x ∂μ.restrict (s i), p x

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : ι → Set α)
(t : Finset ι)
(p : α → Prop)

(∀ᵐ (x : α) ∂μ.restrict (⋃ i ∈ t, s i), p x) ↔ ∀ i ∈ t, ∀ᵐ (x : α) ∂μ.restrict (s i), p x


private theorem ghostFun_natCast (i : ℕ) : ghostFun (i : 𝕎 R) = i

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


@[to_additive]
theorem dense_of_nonempty_smul_invariant [IsMinimal M α] {s : Set α} (hne : s.Nonempty)
    (hsmul : ∀ c : M, c • s ⊆ s) : Dense s

(M : Type u_1)
{α : Type u_3}
[Monoid M]
[TopologicalSpace α]
[MulAction M α]
[MulAction.IsMinimal M α]
{s : Set α}
(hne : s.Nonempty)
(hsmul : ∀ (c : M), c • s ⊆ s)


theorem inl_mul_inr [Semiring R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A] (r : R)
    (a : A) : ((inl r : Unitization R A) * a) = ↑(r • a)

{R : Type u_1}
{A : Type u_2}
[Semiring R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
(r : R)
(a : A)


theorem stalkFunctor_map_injective_of_app_injective {F G : Presheaf C X} (f : F ⟶ G)
    (h : ∀ U : Opens X, Function.Injective (f.app (op U))) (x : X) :
    Function.Injective ((stalkFunctor C x).map f)

(h : ∀ (U : TopologicalSpace.Opens ↑X), Function.Injective ⇑(f.app (Opposite.op U)))

Function.Injective ⇑((TopCat.Presheaf.stalkFunctor C x).map f)


lemma liftCochain_v_descCochain_v (p₁ p₂ p₃ : ℤ) (h₁₂ : p₁ + n = p₂) (h₂₃ : p₂ + n' = p₃)
    (q : ℤ) (hq : p₁ + m = q) :
    (liftCochain φ α β h).v p₁ p₂ h₁₂ ≫ (descCochain φ α' β' h').v p₂ p₃ h₂₃ =
      α.v p₁ q hq ≫ α'.v q p₃ (by omega) + β.v p₁ p₂ h₁₂ ≫ β'.v p₂ p₃ h₂₃

(α : CochainComplex.HomComplex.Cochain K F m)

(β : CochainComplex.HomComplex.Cochain K G n)

(α' : CochainComplex.HomComplex.Cochain F L m')

(β' : CochainComplex.HomComplex.Cochain G L n')

(CochainComplex.mappingCone.liftCochain φ α β h).v p₁ p₂ h₁₂ ≫
    (CochainComplex.mappingCone.descCochain φ α' β' h').v p₂ p₃ h₂₃ =
  α.v p₁ q hq ≫ α'.v q p₃ ⋯ + β.v p₁ p₂ h₁₂ ≫ β'.v p₂ p₃ h₂₃


/-- Negating the first vector produces the same angle as negating the second vector. -/
theorem oangle_neg_left_eq_neg_right (x y : V) : o.oangle (-x) y = o.oangle x (-y)

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


theorem minimum_le_of_mem : a ∈ l → (minimum l : WithTop α) = m → m ≤ a

{α : Type u_1}
[LinearOrder α]
{l : List α}
{a m : α}


theorem or_iff_right_of_imp (ha : a → b) : (a ∨ b) ↔ b


/-- The `nnnorm` of a function is controlled by the supremum of the pointwise `nnnorm`s. -/
theorem nnnorm_le (C : ℝ≥0) : ‖f‖₊ ≤ C ↔ ∀ x : α, ‖f x‖₊ ≤ C

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : BoundedContinuousFunction α β)
(C : ℝ≥0)

‖f‖₊ ≤ C ↔ ∀ (x : α), ‖f x‖₊ ≤ C


theorem infEdist_closure_pos_iff_not_mem_closure {x : α} {E : Set α} :
    0 < infEdist x (closure E) ↔ x ∉ closure E

{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{E : Set α}

0 < EMetric.infEdist x (closure E) ↔ x ∉ closure E


@[simp]
lemma conjTranspose_mul_self_eq_zero {A : Matrix m n R} : Aᴴ * A = 0 ↔ A = 0

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype m]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
{A : Matrix m n R}


theorem three_add_one_eq_four [AddMonoidWithOne R] : 3 + 1 = (4 : R)


@[to_additive (attr := simp)]
theorem topEquiv_toMulHom :
    ((topEquiv : _ ≃* M) : _ →ₙ* M) = MulMemClass.subtype (⊤ : Subsemigroup M)

↑AddSubsemigroup.topEquiv = AddMemClass.subtype ⊤


@[simp]
theorem eval_one_map (f : R →+* S) (p : R[X]) : (p.map f).eval 1 = f (p.eval 1)

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

Polynomial.eval 1 (Polynomial.map f p) = f (Polynomial.eval 1 p)


/-- Given `f(A) = f(B)`, `ker f ≤ A`, and `ker f ≤ B`, deduce that `A = B`. -/
@[to_additive "Given `f(A) = f(B)`, `ker f ≤ A`, and `ker f ≤ B`, deduce that `A = B`."]
theorem map_injective_of_ker_le {H K : Subgroup G} (hH : f.ker ≤ H) (hK : f.ker ≤ K)
    (hf : map f H = map f K) : H = K

(hf : Subgroup.map f H = Subgroup.map f K)


protected theorem IsRegular.disjoint_compl_left_iff (ha : IsRegular a) :
    Disjoint aᶜ b ↔ b ≤ a

{α : Type u_1}
[HeytingAlgebra α]
{a b : α}
(ha : Heyting.IsRegular a)


theorem integral_condexpL2_eq_of_fin_meas_real (f : Lp 𝕜 2 μ) (hs : MeasurableSet[m] s)
    (hμs : μ s ≠ ∞) : ∫ x in s, (condexpL2 𝕜 𝕜 hm f : α → 𝕜) x ∂μ = ∫ x in s, f x ∂μ

{α : Type u_1}
{𝕜 : Type u_7}
[RCLike 𝕜]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{hm : m ≤ m0}
(f : ↥(MeasureTheory.Lp 𝕜 2 μ))
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)

∫ (x : α) in s, ↑↑↑((MeasureTheory.condexpL2 𝕜 𝕜 hm) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ


/-- `mul_left_comm` for `Algebra`s when one element is from the base ring. -/
theorem left_comm (x : A) (r : R) (y : A) :
    x * (algebraMap R A r * y) = algebraMap R A r * (x * y)

{R : Type u}
{A : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
(r : R)
(y : A)

x * ((algebraMap R A) r * y) = (algebraMap R A) r * (x * y)


lemma neg_nat_succ (n : ℕ) : -(Nat.succ n : ℤ) = pred (-n)


/-- Dirac delta measures at two points are different if and only if the two points are different,
assuming the measurable space separates points. -/
lemma dirac_ne_dirac_iff [SeparatesPoints α] {x y : α} :
    Measure.dirac x ≠ Measure.dirac y ↔ x ≠ y

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSpace.SeparatesPoints α]
{x y : α}

MeasureTheory.Measure.dirac x ≠ MeasureTheory.Measure.dirac y ↔ x ≠ y


theorem half_pos (h : 0 < a) : 0 < a / 2

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(h : 0 < a)


theorem as_sum (p : MvPolynomial σ R) : p = ∑ v ∈ p.support, monomial v (coeff v p)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(p : MvPolynomial σ R)

p = ∑ v ∈ p.support, (MvPolynomial.monomial v) (MvPolynomial.coeff v p)


@[simp]
theorem mk'_X_1 : (mk' X₀ X₁ d₀ succ').X 1 = X₁

(succ' : {X₀ X₁ : V} → (f : X₁ ⟶ X₀) → (X₂ : V) ×' (d : X₂ ⟶ X₁) ×' d ≫ f = 0)

(ChainComplex.mk' X₀ X₁ d₀ fun {X₀ X₁} => succ').X 1 = X₁


@[simp]
theorem toNNReal_lt_toNNReal (ha : a ≠ ∞) (hb : b ≠ ∞) : a.toNNReal < b.toNNReal ↔ a < b


/-- A characterization of weak convergence of probability measures by the condition that the
integrals of every continuous bounded nonnegative function converge to the integral of the function
against the limit measure. -/
theorem tendsto_iff_forall_lintegral_tendsto {γ : Type*} {F : Filter γ}
    {μs : γ → ProbabilityMeasure Ω} {μ : ProbabilityMeasure Ω} :
    Tendsto μs F (𝓝 μ) ↔
      ∀ f : Ω →ᵇ ℝ≥0,
        Tendsto (fun i => ∫⁻ ω, f ω ∂(μs i : Measure Ω)) F (𝓝 (∫⁻ ω, f ω ∂(μ : Measure Ω)))

{μs : γ → MeasureTheory.ProbabilityMeasure Ω}

{μ : MeasureTheory.ProbabilityMeasure Ω}

Filter.Tendsto μs F (𝓝 μ) ↔
  ∀ (f : Ω →ᵇ ℝ≥0), Filter.Tendsto (fun i => ∫⁻ (ω : Ω), ↑(f ω) ∂↑(μs i)) F (𝓝 (∫⁻ (ω : Ω), ↑(f ω) ∂↑μ))


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

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


theorem closure_image_mem_nhds_of_uniformInducing {s : Set (α × α)} {e : α → β} (b : β)
    (he₁ : UniformInducing e) (he₂ : DenseInducing e) (hs : s ∈ 𝓤 α) :
    ∃ a, closure (e '' { a' | (a, a') ∈ s }) ∈ 𝓝 b

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{s : Set (α × α)}
{e : α → β}
(b : β)
(he₁ : UniformInducing e)
(he₂ : DenseInducing e)
(hs : s ∈ 𝓤 α)

∃ a, closure (e '' {a' | (a, a') ∈ s}) ∈ 𝓝 b


theorem norm_eq_one_of_not_exists_basis (h : ¬∃ s : Finset S, Nonempty (Basis s R S)) (x : S) :
    norm R x = 1

(h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S))


@[simp, norm_cast]
theorem coe_toRingHom (f : A →ₐ[R] B) : ⇑(f : A →+* B) = f

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


@[simp]
theorem lift_id : lift (RingHom.id K) j p = j

{K : Type u_1}
{M : Type u_3}
[CommRing K]
[CommRing M]
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar M p]
[PerfectRing M p]