/-- If `r` is not a unit, then `e.mulShift r` is not primitive. -/
lemma not_isPrimitive_mulShift [Finite R] (e : AddChar R R') {r : R}
    (hr : ¬ IsUnit r) : ¬ IsPrimitive (e.mulShift r)

{R : Type u}
[CommRing R]
{R' : Type v}
[CommMonoid R']
[Finite R]
(e : AddChar R R')
{r : R}
(hr : ¬IsUnit r)


protected lemma Nonempty.diffs : s.Nonempty → t.Nonempty → (s \\ t).Nonempty

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

s.Nonempty → t.Nonempty → (s.diffs t).Nonempty


theorem Equiv.exists_right {x y : PSet} (h : Equiv x y) : ∀ j, ∃ i, Equiv (x.Func i) (y.Func j)

{x : PSet}
{y : PSet}
(h : x.Equiv y)
(j : y.Type)


theorem if_congr_prop {b c x y u v : Prop} [Decidable b] [Decidable c] (h_c : b ↔ c) (h_t : x ↔ u)
    (h_e : y ↔ v) : ite b x y ↔ ite c u v

(if b then x else y) ↔ if c then u else v


theorem OrderIso.map_sSup_eq_sSup_symm_preimage [CompleteLattice β] (f : α ≃o β) (s : Set α) :
    f (sSup s) = sSup (f.symm ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
[CompleteLattice β]
(f : α ≃o β)
(s : Set α)


lemma eq_sqrt_of_sq_eq {B : Matrix n n 𝕜} (hB : PosSemidef B) (hAB : A ^ 2 = B) : A = hB.sqrt

{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.PosSemidef)
{B : Matrix n n 𝕜}
(hB : B.PosSemidef)
(hAB : A ^ 2 = B)


protected theorem isCompact (s : CompactOpens α) : IsCompact (s : Set α)

{α : Type u_1}
[TopologicalSpace α]
(s : TopologicalSpace.CompactOpens α)


@[simp, reassoc]
theorem toSheafify_comp_sheafifyCompIso_inv :
    J.toSheafify _ ≫ (J.sheafifyCompIso F P).inv = whiskerRight (J.toSheafify _) _

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w₁} D]

[CategoryTheory.Category.{max v u, w₂} E]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

CategoryTheory.CategoryStruct.comp (J.toSheafify (P.comp F)) (J.sheafifyCompIso F P).inv =
  CategoryTheory.whiskerRight (J.toSheafify P) F


@[simp]
theorem op_id {X : C} : (𝟙 X).op = 𝟙 (op X)

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

(CategoryTheory.CategoryStruct.id X).op = CategoryTheory.CategoryStruct.id (Opposite.op X)


/-- The data we need to pick a normal form for words in the pushout. We need to pick a
canonical element of each coset. We also need all the maps in the diagram to be injective  -/
structure Transversal : Type _ where
  /-- All maps in the diagram are injective -/
  injective : ∀ i, Injective (φ i)
  /-- The underlying set, containing exactly one element of each coset of the base group -/
  set : ∀ i, Set (G i)
  /-- The chosen element of the base group itself is the identity -/
  one_mem : ∀ i, 1 ∈ set i
  /-- We have exactly one element of each coset of the base group -/
  compl : ∀ i, IsComplement (φ i).range (set i)

(self : Monoid.PushoutI.NormalWord.Transversal φ)


@[to_additive]
theorem pluennecke_petridis_inequality_mul (C : Finset α)
    (hA : ∀ A' ⊆ A, (A * B).card * A'.card ≤ (A' * B).card * A.card) :
    (A * B * C).card * A.card ≤ (A * B).card * (A * C).card

(hA : ∀ A' ⊆ A, (A + B).card * A'.card ≤ (A' + B).card * A.card)

(A + B + C).card * A.card ≤ (A + B).card * (A + C).card


theorem continuous_le_dom {t₁ t₂ : TopologicalSpace α} {t₃ : TopologicalSpace β} (h₁ : t₂ ≤ t₁)
    (h₂ : Continuous[t₁, t₃] f) : Continuous[t₂, t₃] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ t₂ : TopologicalSpace α}
{t₃ : TopologicalSpace β}
(h₁ : t₂ ≤ t₁)
(h₂ : Continuous f)


@[simp]
theorem dimH_empty : dimH (∅ : Set X) = 0


theorem gcdB'_coe : (gcdB' a b : ℕ) = gcdY a b + gcdZ a b


theorem subtypeOrLeftEmbedding_apply_left {p q : α → Prop} [DecidablePred p]
    (x : { x // p x ∨ q x }) (hx : p x) :
    subtypeOrLeftEmbedding p q x = Sum.inl ⟨x, hx⟩

{α : Type u_1}
{p q : α → Prop}
[DecidablePred p]
(x : { x // p x ∨ q x })
(hx : p ↑x)

(subtypeOrLeftEmbedding p q) x = Sum.inl ⟨↑x, hx⟩


theorem tan_eq_sin_div_cos : tan x = sin x / cos x

Complex.tan x = Complex.sin x / Complex.cos x


@[simp]
lemma NatTrans.leftDerivedToHomotopyCategory_id (F : C ⥤ D) [F.Additive] :
    NatTrans.leftDerivedToHomotopyCategory (𝟙 F) = 𝟙 _

CategoryTheory.NatTrans.leftDerivedToHomotopyCategory (CategoryTheory.CategoryStruct.id F) =
  CategoryTheory.CategoryStruct.id F.leftDerivedToHomotopyCategory


@[simp, mfld_simps]
theorem trivializationAt_symmL {b₀ b : B} (hb : b ∈ (trivializationAt F Z.Fiber b₀).baseSet) :
    (trivializationAt F Z.Fiber b₀).symmL R b = Z.coordChange (Z.indexAt b₀) (Z.indexAt b) b

Trivialization.symmL R (trivializationAt F Z.Fiber b₀) b = Z.coordChange (Z.indexAt b₀) (Z.indexAt b) b


theorem maximalIdeal_isPrincipal_of_isDedekindDomain [LocalRing R] [IsDomain R]
    [IsDedekindDomain R] : (maximalIdeal R).IsPrincipal

(R : Type u_1)
[CommRing R]
[LocalRing R]
[IsDomain R]
[IsDedekindDomain R]


@[to_additive]
theorem mrangeRestrict_surjective (f : M →* N) : Function.Surjective f.mrangeRestrict

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)


@[norm_cast] lemma coe_subset_coe : (s : Set α) ⊆ t ↔ s ≤ t

{α : Type u_1}
[LE α]
{s t : LowerSet α}

↑s ⊆ ↑t ↔ s ≤ t


/-- If `i : K →+* L` is `p`-radical, then for any ring `M` of exponential charactistic `p` whose
`p`-nilradical is zero, the map `(L →+* M) → (K →+* M)` induced by `i` is injective. -/
theorem injective_comp_of_pNilradical_eq_bot [IsPRadical i p] (h : pNilradical M p = ⊥) :
    Function.Injective fun f : L →+* M ↦ f.comp i

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(p : ℕ)
[ExpChar M p]
[IsPRadical i p]
(h : pNilradical M p = ⊥)


lemma antidiagonal_eq_map' (n : ℕ) :
    antidiagonal n =
      (range (n + 1)).map ⟨fun i ↦ (n - i, i), fun _ _ h ↦ (Prod.ext_iff.1 h).2⟩

Finset.antidiagonal n = Finset.map { toFun := fun i => (n - i, i), inj' := ⋯ } (Finset.range (n + 1))


theorem mapEdgeSet.injective (hinj : Function.Injective f) : Function.Injective f.mapEdgeSet

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')
(hinj : Function.Injective ⇑f)


/-- Sophie Germain's identity, see <https://www.cut-the-knot.org/blue/SophieGermainIdentity.shtml>.
-/
theorem pow_four_add_four_mul_pow_four' :
    a ^ 4 + 4 * b ^ 4 = (a ^ 2 - 2 * a * b + 2 * b ^ 2) * (a ^ 2 + 2 * a * b + 2 * b ^ 2)


theorem union_vsub : s₁ ∪ s₂ -ᵥ t = s₁ -ᵥ t ∪ (s₂ -ᵥ t)

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{s₁ s₂ t : Finset β}
[DecidableEq β]


@[simp]
theorem implicitToPartialHomeomorph_self (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :
    hf.implicitToPartialHomeomorph f f' hf' a = (f a, 0)

{𝕜 : 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' = ⊤)

↑(HasStrictFDerivAt.implicitToPartialHomeomorph f f' hf hf') a = (f a, 0)


/-- Auxiliary lemma for `biprod.uniqueUpToIso`. -/
theorem biprod.conePointUniqueUpToIso_inv (X Y : C) [HasBinaryBiproduct X Y] {b : BinaryBicone X Y}
    (hb : b.IsBilimit) :
    (hb.isLimit.conePointUniqueUpToIso (BinaryBiproduct.isLimit _ _)).inv =
      biprod.desc b.inl b.inr

{b : CategoryTheory.Limits.BinaryBicone X Y}

(hb.isLimit.conePointUniqueUpToIso (CategoryTheory.Limits.BinaryBiproduct.isLimit X Y)).inv =
  CategoryTheory.Limits.biprod.desc b.inl b.inr


@[simp]
theorem constantCoeff_map (f : R →+* S₁) (φ : MvPolynomial σ R) :
    constantCoeff (MvPolynomial.map f φ) = f (constantCoeff φ)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(φ : MvPolynomial σ R)

MvPolynomial.constantCoeff ((MvPolynomial.map f) φ) = f (MvPolynomial.constantCoeff φ)


theorem image_preimage_eq_iff {f : α → β} {s : Set β} : f '' (f ⁻¹' s) = s ↔ s ⊆ range f

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


theorem IsSemisimpleModule.of_sSup_simples_eq_top
    (h : sSup { m : Submodule R M | IsSimpleModule R m } = ⊤) : IsSemisimpleModule R M

(h : sSup {m | IsSimpleModule R ↥m} = ⊤)


/-- The Euler product for the Riemann ζ function, valid for `s.re > 1`.
This version is stated in the form of convergence of finite partial products. -/
theorem riemannZeta_eulerProduct (hs : 1 < s.re) :
    Tendsto (fun n : ℕ ↦ ∏ p ∈ primesBelow n, (1 - (p : ℂ) ^ (-s))⁻¹) atTop
      (𝓝 (riemannZeta s))

Filter.Tendsto (fun n => ∏ p ∈ n.primesBelow, (1 - ↑p ^ (-s))⁻¹) Filter.atTop (𝓝 (riemannZeta s))


theorem mem_single_iff (a₁ a₂ : α) (b₁ b₂ : β) : b₁ ∈ single a₂ b₂ a₁ ↔ a₁ = a₂ ∧ b₁ = b₂

{α : Type u}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(a₁ a₂ : α)
(b₁ b₂ : β)

b₁ ∈ (PEquiv.single a₂ b₂) a₁ ↔ a₁ = a₂ ∧ b₁ = b₂


theorem inf_hnot_self (a : α) : a ⊓ ￢a = ∂ a

{α : Type u_1}
[CoheytingAlgebra α]
(a : α)


@[simp] lemma UniformOnFun.ofFun_toFun (f : α →ᵤ[𝔖] β) : ofFun 𝔖 (toFun 𝔖 f) = f

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
(f : α →ᵤ[𝔖] β)

(UniformOnFun.ofFun 𝔖) ((UniformOnFun.toFun 𝔖) f) = f


@[simp] theorem natCast_add (a b : Nat) : ((a + b : Nat) : Int) = (a : Int) + (b : Int)


@[simp] lemma pow_addLeft (n : ℕ) : Equiv.addLeft a ^ n = Equiv.addLeft (n • a)

{α : Type u}
[AddGroup α]
(a : α)
(n : ℕ)


@[simp]
theorem involute_eq_id :
    (involute : CliffordAlgebra (0 : QuadraticForm R Unit) →ₐ[R] _) = AlgHom.id R _

CliffordAlgebra.involute = AlgHom.id R (CliffordAlgebra 0)


lemma exists_add_eq_of_codisjoint (h : Codisjoint p p') (x : M) :
    ∃ y ∈ p, ∃ z ∈ p', y + z = x

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p p' : Submodule R M}
(h : Codisjoint p p')
(x : M)


theorem natCast_div (a b : ℕ) (h : b ∣ a) : ((a / b : ℕ) : ℚ) = a / b


@[to_additive]
theorem fst_mul : (s * t).fst = s.fst * t.fst

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

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

(s + t).toProd.1 = s.toProd.1 + t.toProd.1


@[reassoc (attr := simp)]
theorem colimit.comp_coconePointUniqueUpToIso_hom {F : J ⥤ C} [HasColimit F] {c : Cocone F}
    (hc : IsColimit c) (j : J) :
    colimit.ι F j ≫ (IsColimit.coconePointUniqueUpToIso (colimit.isColimit _) hc).hom = c.ι.app j

(hc : CategoryTheory.Limits.IsColimit c)

CategoryTheory.Limits.colimit.ι F j ≫ ((CategoryTheory.Limits.colimit.isColimit F).coconePointUniqueUpToIso hc).hom =
  c.ι.app j


protected theorem zero_lt_one : (0 : Int) < 1


@[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Submonoid N} : S.comap f ≤ T.comap f ↔ S ≤ T

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

Submonoid.comap f S ≤ Submonoid.comap f T ↔ S ≤ T


/-- Given a compact set in a proper space, the measure of its `r`-closed thickenings converges to
its measure as `r` tends to `0`. -/
theorem tendsto_measure_cthickening_of_isCompact [MetricSpace α] [MeasurableSpace α]
    [OpensMeasurableSpace α] [ProperSpace α] {μ : Measure α} [IsFiniteMeasureOnCompacts μ]
    {s : Set α} (hs : IsCompact s) :
    Tendsto (fun r => μ (Metric.cthickening r s)) (𝓝 0) (𝓝 (μ s))

Filter.Tendsto (fun r => μ (Metric.cthickening r s)) (𝓝 0) (𝓝 (μ s))


theorem head!_mem_self [Inhabited α] {l : List α} (h : l ≠ nil) : l.head! ∈ l

{α : Type u}
[Inhabited α]
{l : List α}
(h : l ≠ [])


/-- Change of variable formula for differentiable functions: if a function `f` is
injective and differentiable on a measurable set `s`, then the Bochner integral of a function
`g : E → F` on `f '' s` coincides with the integral of `|(f' x).det| • g ∘ f` on `s`. -/
theorem integral_image_eq_integral_abs_det_fderiv_smul (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hf : InjOn f s) (g : E → F) :
    ∫ x in f '' s, g x ∂μ = ∫ x in s, |(f' x).det| • g (f x) ∂μ

∫ (x : E) in f '' s, g x ∂μ = ∫ (x : E) in s, |(f' x).det| • g (f x) ∂μ


@[fun_prop]
theorem continuousOn_pi' {ι : Type*} {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
    {f : α → ∀ i, π i} {s : Set α} (hf : ∀ i, ContinuousOn (fun y => f y i) s) :
    ContinuousOn f s

(hf : ∀ (i : ι), ContinuousOn (fun y => f y i) s)


theorem omegaLimit_eq_iInter_inter {v : Set τ} (hv : v ∈ f) :
    ω f ϕ s = ⋂ u : ↥f.sets, closure (image2 ϕ (u ∩ v) s)

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)
{v : Set τ}
(hv : v ∈ f)

omegaLimit f ϕ s = ⋂ u, closure (Set.image2 ϕ (↑u ∩ v) s)


/-- As the thickening radius δ tends to 0, the δ-thickened indicator of a set E (in α) tends
pointwise to the indicator function of the closure of E.

Note: This version is for the bundled bounded continuous functions, but the topology is not
the topology on `α →ᵇ ℝ≥0`. Coercions to functions `α → ℝ≥0` are done first, so the topology
instance is the product topology (the topology of pointwise convergence). -/
theorem thickenedIndicator_tendsto_indicator_closure {δseq : ℕ → ℝ} (δseq_pos : ∀ n, 0 < δseq n)
    (δseq_lim : Tendsto δseq atTop (𝓝 0)) (E : Set α) :
    Tendsto (fun n : ℕ => ((↑) : (α →ᵇ ℝ≥0) → α → ℝ≥0) (thickenedIndicator (δseq_pos n) E)) atTop
      (𝓝 (indicator (closure E) fun _ => (1 : ℝ≥0)))

(δseq_lim : Filter.Tendsto δseq Filter.atTop (𝓝 0))

Filter.Tendsto (fun n => ⇑(thickenedIndicator ⋯ E)) Filter.atTop (𝓝 ((closure E).indicator fun x => 1))


@[simp]
theorem Ioc_inter_Ioi : Ioc a b ∩ Ioi c = Ioc (a ⊔ c) b

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

Set.Ioc a b ∩ Set.Ioi c = Set.Ioc (a ⊔ c) b


/-- The norm of a function is controlled by the supremum of the pointwise norms. -/
theorem norm_le (C0 : (0 : ℝ) ≤ C) : ‖f‖ ≤ C ↔ ∀ x : α, ‖f x‖ ≤ C

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


lemma false_of_nontrivial_of_char_one [Nontrivial R] [CharP R 1] : False

{R : Type u_1}
[NonAssocSemiring R]
[Nontrivial R]
[CharP R 1]


/-- A ball package is a family of balls in a metric space with positive bounded radii. -/
structure BallPackage (β : Type*) (α : Type*) where
  c : β → α
  r : β → ℝ
  rpos : ∀ b, 0 < r b
  r_bound : ℝ
  r_le : ∀ b, r b ≤ r_bound

{β : Type u_1}
{α : Type u_2}
(self : Besicovitch.BallPackage β α)
(b : β)


/-- The image under `↑ : NormedSpace.Dual 𝕜 E → (E → 𝕜)` of a polar `polar 𝕜 s` of a
neighborhood `s` of the origin is a closed set. -/
theorem _root_.NormedSpace.Dual.isClosed_image_polar_of_mem_nhds {s : Set E}
    (s_nhd : s ∈ 𝓝 (0 : E)) :
    IsClosed (((↑) : Dual 𝕜 E → E → 𝕜) '' NormedSpace.polar 𝕜 s)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
(s_nhd : s ∈ 𝓝 0)

IsClosed (DFunLike.coe '' NormedSpace.polar 𝕜 s)


/-- Intermediate value theorem for two functions: if `f` and `g` are two functions continuous
on a preconnected set `s` and for some `a b ∈ s` we have `f a ≤ g a` and `g b ≤ f b`,
then for some `x ∈ s` we have `f x = g x`. -/
theorem IsPreconnected.intermediate_value₂ {s : Set X} (hs : IsPreconnected s) {a b : X}
    (ha : a ∈ s) (hb : b ∈ s) {f g : X → α} (hf : ContinuousOn f s) (hg : ContinuousOn g s)
    (ha' : f a ≤ g a) (hb' : g b ≤ f b) : ∃ x ∈ s, f x = g x

{X : Type u}
{α : Type v}
[TopologicalSpace X]
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{s : Set X}
(hs : IsPreconnected s)
{a b : X}
(ha : a ∈ s)
(hb : b ∈ s)
{f g : X → α}
(hf : ContinuousOn f s)
(hg : ContinuousOn g s)
(ha' : f a ≤ g a)
(hb' : g b ≤ f b)


theorem IsBoundedBilinearMap.isBigO_comp {α : Type*} (H : IsBoundedBilinearMap 𝕜 f) {g : α → E}
    {h : α → F} {l : Filter α} : (fun x => f (g x, h x)) =O[l] fun x => ‖g x‖ * ‖h x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
{α : Type u_5}
(H : IsBoundedBilinearMap 𝕜 f)
{g : α → E}
{h : α → F}
{l : Filter α}


theorem degrees_pow (p : MvPolynomial σ R) (n : ℕ) : (p ^ n).degrees ≤ n • p.degrees

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(p : MvPolynomial σ R)
(n : ℕ)


theorem Real.smul_iSup_of_nonpos (ha : a ≤ 0) (f : ι → ℝ) : (a • ⨆ i, f i) = ⨅ i, a • f i

{ι : Sort u_1}
{α : Type u_2}
[LinearOrderedField α]
[Module α ℝ]
[OrderedSMul α ℝ]
{a : α}
(ha : a ≤ 0)
(f : ι → ℝ)


@[aesop unsafe 10% (rule_sets := [Matroid])]
private theorem ground_diff_subset_ground : M.E \ X ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{X : Set α}


theorem one_lt_one_div (h1 : 0 < a) (h2 : a < 1) : 1 < 1 / a

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(h1 : 0 < a)
(h2 : a < 1)


@[simp]
theorem mem_ofLe (x : K') : x ∈ ofLe h ↔ (x : L) ∈ K

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


lemma coprime_num_den (q : ℚ≥0) : q.num.Coprime q.den


@[simp]
theorem mem_top (x : R) : x ∈ (⊤ : NonUnitalSubring R)

{R : Type u}
[NonUnitalNonAssocRing R]
(x : R)


/-- If `f` has a local min on `s` at `a` and `y` belongs to the positive tangent cone
of `s` at `a`, then `0 ≤ f' y`. -/
theorem IsLocalMinOn.fderivWithin_nonneg (h : IsLocalMinOn f s a)
    (hy : y ∈ posTangentConeAt s a) : (0 : ℝ) ≤ (fderivWithin ℝ f s a : E → ℝ) y

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{a y : E}
(h : IsLocalMinOn f s a)
(hy : y ∈ posTangentConeAt s a)


/-- Riemann zeta functional equation, formulated for `Λ₀`: for any complex `s` we have
`Λ₀(1 - s) = Λ₀ s`. -/
theorem completedRiemannZeta₀_one_sub (s : ℂ) :
    completedRiemannZeta₀ (1 - s) = completedRiemannZeta₀ s


theorem Intersecting.not_mem {s : Set α} (hs : s.Intersecting) {a : α} (ha : aᶜ ∈ s) : a ∉ s

{α : Type u_1}
[BooleanAlgebra α]
{s : Set α}
(hs : s.Intersecting)
{a : α}
(ha : aᶜ ∈ s)


/-- An angle in a right-angled triangle expressed using `arccos`. -/
theorem oangle_right_eq_arccos_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    ∡ p₂ p₃ p₁ = Real.arccos (dist p₃ p₂ / dist p₁ p₃)

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

∡ p₂ p₃ p₁ = ↑(Real.arccos (dist p₃ p₂ / dist p₁ p₃))


theorem Perm.eraseP (f : α → Bool) {l₁ l₂ : List α}
    (H : Pairwise (fun a b => f a → f b → False) l₁) (p : l₁ ~ l₂) : eraseP f l₁ ~ eraseP f l₂

(H : List.Pairwise (fun a b => f a = true → f b = true → False) l₁)


@[to_additive]
theorem not_one_le_div_iff : ¬1 ≤ f / g ↔ Disjoint f g

{α : Type u_2}
[Group α]
{f g : Filter α}


theorem not_nontrivial_iff_subsingleton : ¬Nontrivial α ↔ Subsingleton α


theorem FinitaryExtensive.mono_inl_of_isColimit [FinitaryExtensive C] {c : BinaryCofan X Y}
    (hc : IsColimit c) : Mono c.inl

{c : CategoryTheory.Limits.BinaryCofan X Y}

(hc : CategoryTheory.Limits.IsColimit c)


/-- The sheafification functor is left adjoint to the forgetful functor. -/
@[simps! unit_app counit_app_val]
noncomputable def plusPlusAdjunction : plusPlusSheaf J D ⊣ sheafToPresheaf J D

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ (CategoryTheory.forget D)]

(CategoryTheory.plusPlusAdjunction J D).unit.app X = J.toSheafify X


/-- The identity map from a type with 1 to itself. -/
@[to_additive (attr := simps) "The identity map from a type with zero to itself."]
def OneHom.id (M : Type*) [One M] : OneHom M M


theorem next_cons_cons_eq' (y z : α) (h : x ∈ y :: z :: l) (hx : x = y) :
    next (y :: z :: l) x h = z

{α : Type u_1}
[DecidableEq α]
(l : List α)
(x y z : α)
(h : x ∈ y :: z :: l)
(hx : x = y)


theorem sin_sub_int_mul_two_pi (x : ℂ) (n : ℤ) : sin (x - n * (2 * π)) = sin x

Complex.sin (x - ↑n * (2 * ↑Real.pi)) = Complex.sin x


@[to_additive]
theorem smul_toFun (f : F) (T : leftTransversals (H : Set G)) (g : G) :
    (f • (toFun T.2 g : G)) = toFun (f • T).2 (f • g)

(T : ↑(AddSubgroup.leftTransversals ↑H))

f +ᵥ ↑(AddSubgroup.MemLeftTransversals.toFun ⋯ g) = ↑(AddSubgroup.MemLeftTransversals.toFun ⋯ (f +ᵥ g))


lemma _root_.absorbs_iff_eventually_cobounded_mapsTo :
    Absorbs G₀ s t ↔ ∀ᶠ c in cobounded G₀, MapsTo (c⁻¹ • ·) t s

{G₀ : Type u_1}
{α : Type u_2}
[GroupWithZero G₀]
[Bornology G₀]
[MulAction G₀ α]
{s t : Set α}

Absorbs G₀ s t ↔ ∀ᶠ (c : G₀) in Bornology.cobounded G₀, Set.MapsTo (fun x => c⁻¹ • x) t s


theorem comp {g : B →ₐ[R] C} {f : A →ₐ[R] B} (hg : g.FinitePresentation)
    (hf : f.FinitePresentation) : (g.comp f).FinitePresentation

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommRing R]
[CommRing A]
[CommRing B]
[CommRing C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
{g : B →ₐ[R] C}
{f : A →ₐ[R] B}
(hg : g.FinitePresentation)
(hf : f.FinitePresentation)


theorem truncateFun_neg (x : 𝕎 R) : truncateFun n (-x) = -truncateFun n x

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

WittVector.truncateFun n (-x) = -WittVector.truncateFun n x


/-- The opposite of the right homology functor is the left homology functor. -/
@[simps!]
noncomputable def rightHomologyFunctorOpNatIso :
    (rightHomologyFunctor C).op ≅ opFunctor C ⋙ leftHomologyFunctor Cᵒᵖ

(CategoryTheory.ShortComplex.rightHomologyFunctorOpNatIso C).hom.app X = (Opposite.unop X).leftHomologyOpIso.inv


@[simp]
theorem ofDual_covBy_ofDual_iff {a b : αᵒᵈ} : ofDual a ⋖ ofDual b ↔ b ⋖ a

OrderDual.ofDual a ⋖ OrderDual.ofDual b ↔ b ⋖ a


theorem Spec.basicOpen_hom_ext {X : RingedSpace.{u}} {R : CommRingCat.{u}}
    {α β : X ⟶ Spec.sheafedSpaceObj R} (w : α.base = β.base)
    (h : ∀ r : R,
      let U := PrimeSpectrum.basicOpen r
      (toOpen R U ≫ α.c.app (op U)) ≫ X.presheaf.map (eqToHom (by rw [w])) =
        toOpen R U ≫ β.c.app (op U)) :
    α = β

{α β : X ⟶ AlgebraicGeometry.Spec.sheafedSpaceObj R}

(h :
  ∀ (r : ↑R),
    let U := PrimeSpectrum.basicOpen r;
    CategoryTheory.CategoryStruct.comp
        (CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.StructureSheaf.toOpen (↑R) U) (α.c.app (Opposite.op U)))
        (X.presheaf.map (CategoryTheory.eqToHom ⋯)) =
      CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.StructureSheaf.toOpen (↑R) U) (β.c.app (Opposite.op U)))


theorem range_val : NonUnitalStarAlgHom.range (NonUnitalStarSubalgebraClass.subtype S) = S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
(S : NonUnitalStarSubalgebra R A)


theorem surjective_or_eq_zero [IsSimpleModule R N] (f : M →ₗ[R] N) :
    Function.Surjective f ∨ f = 0

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{N : Type u_5}
[AddCommGroup N]
[Module R N]
[IsSimpleModule R N]
(f : M →ₗ[R] N)


@[to_additive]
theorem pow_mem_pow (ha : a ∈ s) : ∀ n : ℕ, a ^ n ∈ s ^ n

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{s : Finset α}
{a : α}
(ha : a ∈ s)
(n : ℕ)


@[simp]
theorem equiv_comp_apply (x : K) : equiv i j p (i x) = j x

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing L p]
[IsPerfectClosure i p]
[PerfectRing M p]
[IsPerfectClosure j p]
(x : K)

(IsPerfectClosure.equiv i j p) (i x) = j x


@[to_additive]
theorem IsPWO.smul [PartialOrder G] [PartialOrder P] [SMul G P] [IsOrderedCancelSMul G P]
    {s : Set G} {t : Set P} (hs : s.IsPWO) (ht : t.IsPWO) : IsPWO (s • t)

{G : Type u_1}
{P : Type u_2}
[PartialOrder G]
[PartialOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
{s : Set G}
{t : Set P}
(hs : s.IsPWO)
(ht : t.IsPWO)


@[grind_norm↓] theorem not_forall (p : α → Prop) : (¬∀ x, p x) = ∃ x, ¬p x


@[simp, norm_cast] lemma coe_sum (s : Finset ι) (f : ι → α) :
    ∑ i ∈ s, f i = ∑ i ∈ s, (f i : WithTop α)

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


/-- The image under a ring homomorphism of the subfield generated by a set equals
the subfield generated by the image of the set. -/
theorem map_field_closure (f : K →+* L) (s : Set K) : (closure s).map f = closure (f '' s)

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
(f : K →+* L)
(s : Set K)

Subfield.map f (Subfield.closure s) = Subfield.closure (⇑f '' s)


@[inherit_doc IsUpperSet]
structure UpperSet (α : Type*) [LE α] where
  /-- The carrier of an `UpperSet`. -/
  carrier : Set α
  /-- The carrier of an `UpperSet` is an upper set. -/
  upper' : IsUpperSet carrier

{α : Type u_6}
[LE α]
(self : UpperSet α)


/-- The functor taking a monoid to its subgroup of units. -/
@[simps]
def CommMonCat.units : CommMonCat.{u} ⥤ CommGrp.{u}

∀ {X Y : CommMonCat} (f : X ⟶ Y), CommMonCat.units.map f = CommGrp.ofHom (Units.map f)


theorem dist_smul_le (s : α) (x y : β) : dist (s • x) (s • y) ≤ ‖s‖ * dist x y

{α : Type u_1}
{β : Type u_2}
[SeminormedAddGroup α]
[SeminormedAddGroup β]
[SMulZeroClass α β]
[BoundedSMul α β]
(s : α)
(x y : β)


theorem modByMonic_eq_of_not_monic (p : R[X]) (hq : ¬Monic q) : p %ₘ q = p

{R : Type u}
[Ring R]
{q : R[X]}
(p : R[X])
(hq : ¬q.Monic)


theorem blockTriangular_transvection' {i j : m} (hij : b j ≤ b i) (c : R) :
    BlockTriangular (transvection i j c) (OrderDual.toDual ∘ b)

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]
{i j : m}
(hij : b j ≤ b i)
(c : R)

(Matrix.transvection i j c).BlockTriangular (⇑OrderDual.toDual ∘ b)


theorem integral_eq_sum_filter [DecidablePred fun x : F => x ≠ 0] {m : MeasurableSpace α}
    (f : α →ₛ F) (μ : Measure α) :
    f.integral μ = ∑ x ∈ f.range.filter fun x => x ≠ 0, (μ (f ⁻¹' {x})).toReal • x

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[DecidablePred fun x => x ≠ 0]
{m : MeasurableSpace α}
(f : MeasureTheory.SimpleFunc α F)
(μ : MeasureTheory.Measure α)

MeasureTheory.SimpleFunc.integral μ f = ∑ x ∈ Finset.filter (fun x => x ≠ 0) f.range, (μ (↑f ⁻¹' {x})).toReal • x


@[simp]
theorem Basis.ofIsLocalizedModule_repr_apply (m : M) (i : ι) :
    ((b.ofIsLocalizedModule Rₛ S f).repr (f m)) i = algebraMap R Rₛ (b.repr m i)

{R : Type u_1}
(Rₛ : Type u_2)
[CommSemiring R]
(S : Submonoid R)
[CommRing Rₛ]
[Algebra R Rₛ]
[hT : IsLocalization S Rₛ]
{M : Type u_3}
{Mₛ : Type u_4}
[AddCommGroup M]
[AddCommGroup Mₛ]
[Module R M]
[Module R Mₛ]
[Module Rₛ Mₛ]
(f : M →ₗ[R] Mₛ)
[IsLocalizedModule S f]
[IsScalarTower R Rₛ Mₛ]
{ι : Type u_5}
(b : Basis ι R M)
(m : M)
(i : ι)

((Basis.ofIsLocalizedModule Rₛ S f b).repr (f m)) i = (algebraMap R Rₛ) ((b.repr m) i)


lemma mem_piFinset_succ' {x : ∀ i, α i} {s : ∀ i, Finset (α i)} :
    x ∈ piFinset s ↔ init x ∈ piFinset (init s) ∧ x (last n) ∈ s (last n)

{n : ℕ}
{α : Fin (n + 1) → Type u_1}
{x : (i : Fin (n + 1)) → α i}
{s : (i : Fin (n + 1)) → Finset (α i)}

x ∈ Fintype.piFinset s ↔ Fin.init x ∈ Fintype.piFinset (Fin.init s) ∧ x (Fin.last n) ∈ s (Fin.last n)


/-- If `F : J ⥤ C` then `F.cones` is the functor assigning to an object `X : C` the
type of natural transformations from the constant functor with value `X` to `F`.
An object representing this functor is a limit of `F`.
-/
@[simps!]
def cones : Cᵒᵖ ⥤ Type max u₁ v₃

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
(F : J ⥤ C)

∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (a : (CategoryTheory.yoneda.obj F).obj ((CategoryTheory.Functor.const J).op.obj X)) (X_1 : J),
  (F.cones.map f a).app X_1 = f.unop ≫ a.app X_1


theorem disjoint_finset_sum_right {β : Type*} {i : Finset β} {f : β → Multiset α}
    {a : Multiset α} : Multiset.Disjoint a (i.sum f) ↔ ∀ b ∈ i, Multiset.Disjoint a (f b)

{α : Type u_3}
{β : Type u_6}
{i : Finset β}
{f : β → Multiset α}
{a : Multiset α}

a.Disjoint (i.sum f) ↔ ∀ b ∈ i, a.Disjoint (f b)


@[measurability]
theorem measurable_toNNReal : Measurable ENNReal.toNNReal


@[simp, norm_cast]
lemma coe_sdiff (G₁ G₂ : G.Finsubgraph) : ↑(G₁ \ G₂) = (G₁ \ G₂ : G.Subgraph)

{V : Type u}
{G : SimpleGraph V}
(G₁ G₂ : G.Finsubgraph)


theorem subsemiringClosure_coe :
    (M.subsemiringClosure : Set R) = AddSubmonoid.closure (M : Set R)

{R : Type u}
[NonAssocSemiring R]
(M : Submonoid R)

↑M.subsemiringClosure = ↑(AddSubmonoid.closure ↑M)


@[to_additive even_iff_exists_two_nsmul]
lemma isSquare_iff_exists_sq (m : α) : IsSquare m ↔ ∃ c, m = c ^ 2


/-- Given a topological space `X : TopCat` and a type family `T : X → Type`,
a `P : PrelocalPredicate T` consists of:
* a family of predicates `P.pred`, one for each `U : Opens X`, of the form `(Π x : U, T x) → Prop`
* a proof that if `f : Π x : V, T x` satisfies the predicate on `V : Opens X`, then
  the restriction of `f` to any open subset `U` also satisfies the predicate.
-/
structure PrelocalPredicate where
  /-- The underlying predicate of a prelocal predicate -/
  pred : ∀ {U : Opens X}, (∀ x : U, T x) → Prop
  /-- The underlying predicate should be invariant under restriction -/
  res : ∀ {U V : Opens X} (i : U ⟶ V) (f : ∀ x : V, T x) (_ : pred f), pred fun x : U => f (i x)

{X : TopCat}
{T : ↑X → Type v}
(self : TopCat.PrelocalPredicate T)
{U V : TopologicalSpace.Opens ↑X}
(i : U ⟶ V)
(f : (x : ↥V) → T ↑x)

self.pred f → self.pred fun x => f ((fun x => ⟨↑x, ⋯⟩) x)


/-- If the preimage of a set under a surjective map is a subsingleton,
the set is a subsingleton. -/
theorem subsingleton_of_preimage {f : α → β} (hf : Function.Surjective f) (s : Set β)
    (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Surjective f)
(s : Set β)
(hs : (f ⁻¹' s).Subsingleton)


@[simp]
theorem Ico_union_Ici_eq_Ici (h : a ≤ b) : Ico a b ∪ Ici b = Ici a

{α : Type u_1}
[LinearOrder α]
{a b : α}
(h : a ≤ b)


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow (s : Finset α) (n : ℕ) : ↑(s ^ n) = (s : Set α) ^ n

{α : Type u_2}
[DecidableEq α]
[Monoid α]
(s : Finset α)
(n : ℕ)


theorem degreeLT_eq_span_X_pow [DecidableEq R] {n : ℕ} :
    degreeLT R n = Submodule.span R ↑((Finset.range n).image fun n => X ^ n : Finset R[X])

{R : Type u}
[Semiring R]
[DecidableEq R]
{n : ℕ}

Polynomial.degreeLT R n = Submodule.span R ↑(Finset.image (fun n => Polynomial.X ^ n) (Finset.range n))


/-- An affine basis is a family of affine-independent points whose span is the top subspace. -/
structure AffineBasis (ι : Type u₁) (k : Type u₂) {V : Type u₃} (P : Type u₄) [AddCommGroup V]
  [AffineSpace V P] [Ring k] [Module k V] where
  protected toFun : ι → P
  protected ind' : AffineIndependent k toFun
  protected tot' : affineSpan k (range toFun) = ⊤

{ι : Type u₁}
{k : Type u₂}
{V : Type u₃}
{P : Type u₄}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(self : AffineBasis ι k P)


@[csimp] private theorem HeapNode.rankTR_eq : @rankTR = @rank


protected theorem ContinuousLinearMap.hasFDerivAtFilter : HasFDerivAtFilter e e x L

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


lemma AffineIndependent.eq_zero_of_sum_eq_zero_subtype {s : Finset V}
    (hp : AffineIndependent k ((↑) : s → V)) {w : V → k} (hw₀ : ∑ x ∈ s, w x = 0)
    (hw₁ : ∑ x ∈ s, w x • x = 0) : ∀ x ∈ s, w x = 0

{k : Type u_1}
{V : Type u_2}
[Ring k]
[AddCommGroup V]
[Module k V]
{s : Finset V}
(hp : AffineIndependent k Subtype.val)
{w : V → k}
(hw₀ : ∑ x ∈ s, w x = 0)
(hw₁ : ∑ x ∈ s, w x • x = 0)
(x : V)


@[simp]
theorem Units.neg_smul (u : Rˣ) (x : M) : -u • x = -(u • x)

{R : Type u_2}
{M : Type u_5}
[Ring R]
[AddCommGroup M]
[Module R M]
(u : Rˣ)
(x : M)


@[to_additive (attr := simp)]
theorem empty_div : ∅ / s = ∅


@[simp] lemma covBy_cons (s : Multiset α) (a : α) : s ⋖ a ::ₘ s


/-- The L-series of `f` is complex differentiable in its open half-plane of absolute
convergence. -/
lemma LSeries_differentiableOn (f : ℕ → ℂ) :
    DifferentiableOn ℂ (LSeries f) {s | abscissaOfAbsConv f < s.re}

DifferentiableOn ℂ (LSeries f) {s | LSeries.abscissaOfAbsConv f < ↑s.re}


/-- Convolution of a measure μ with the zero measure returns the zero measure. -/
@[to_additive (attr := simp) zero_conv]
theorem zero_mconv (μ : Measure M) : μ ∗ (0 : Measure M) = (0 : Measure M)

{M : Type u_1}
[AddMonoid M]
[MeasurableSpace M]
(μ : MeasureTheory.Measure M)


theorem le_of_inf_neBot' (f : Ultrafilter α) {g : Filter α} (hg : NeBot (g ⊓ f)) : ↑f ≤ g

{α : Type u}
(f : Ultrafilter α)
{g : Filter α}
(hg : (g ⊓ ↑f).NeBot)


/-- `x ↦ x⁻¹` as an order-reversing equivalence. -/
@[to_additive (attr := simps!) "`x ↦ -x` as an order-reversing equivalence."]
def OrderIso.inv : α ≃o αᵒᵈ

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

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

∀ (a : αᵒᵈ), (RelIso.symm (OrderIso.neg α)) a = -OrderDual.ofDual a


/-- Left unitor for the vertical composition of oplax natural transformations. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
def leftUnitor (η : F ⟶ G) : 𝟙 F ≫ η ≅ η

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
(η : F ⟶ G)
(a : B)

(CategoryTheory.OplaxNatTrans.leftUnitor η).hom.app a = (CategoryTheory.Bicategory.leftUnitor (η.app a)).hom


/-- A group is commutative if the quotient by the center is cyclic.
  Also see `commGroup_of_cycle_center_quotient` for the `CommGroup` instance. -/
@[to_additive
      "A group is commutative if the quotient by the center is cyclic.
      Also see `addCommGroup_of_cycle_center_quotient` for the `AddCommGroup` instance."]
theorem commutative_of_cyclic_center_quotient [IsCyclic H] (f : G →* H) (hf : f.ker ≤ center G)
    (a b : G) : a * b = b * a

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
[IsAddCyclic H]
(f : G →+ H)
(hf : f.ker ≤ AddSubgroup.center G)
(a b : G)


@[simp]
theorem dual_comp (g : BoundedLatticeHom β γ) (f : BoundedLatticeHom α β) :
    BoundedLatticeHom.dual (g.comp f) =
      (BoundedLatticeHom.dual g).comp (BoundedLatticeHom.dual f)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Lattice α]
[BoundedOrder α]
[Lattice β]
[BoundedOrder β]
[Lattice γ]
[BoundedOrder γ]
(g : BoundedLatticeHom β γ)
(f : BoundedLatticeHom α β)


/-- If a measure `ρ` is singular with respect to `μ`, then for `μ` almost every `x`, the ratio
`ρ a / μ a` tends to zero when `a` shrinks to `x` along the Vitali family. This makes sense
as `μ a` is eventually positive by `ae_eventually_measure_pos`. -/
theorem ae_eventually_measure_zero_of_singular (hρ : ρ ⟂ₘ μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 0)

(hρ : ρ ⟂ₘ μ)

∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 0)


theorem Summable.matrix_blockDiagonal [DecidableEq p] {f : X → p → Matrix m n R} (hf : Summable f) :
    Summable fun x => blockDiagonal (f x)

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{p : Type u_6}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[DecidableEq p]
{f : X → p → Matrix m n R}
(hf : Summable f)

Summable fun x => Matrix.blockDiagonal (f x)


@[ghost_simps]
theorem ghostComponent_frobenius (n : ℕ) (x : 𝕎 R) :
    ghostComponent n (frobenius x) = ghostComponent (n + 1) x

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

(WittVector.ghostComponent n) (WittVector.frobenius x) = (WittVector.ghostComponent (n + 1)) x


/-- Construct a modification isomorphism between oplax natural transformations
by giving object level isomorphisms, and checking naturality only in the forward direction.
-/
@[simps]
def ModificationIso.ofComponents (app : ∀ a, η.app a ≅ θ.app a)
    (naturality :
      ∀ {a b} (f : a ⟶ b),
        F.map f ◁ (app b).hom ≫ θ.naturality f = η.naturality f ≫ (app a).hom ▷ G.map f) :
    η ≅ θ

(naturality :
  ∀ {a b : B} (f : a ⟶ b),
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (app b).hom) (θ.naturality f) =
      CategoryTheory.CategoryStruct.comp (η.naturality f)
        (CategoryTheory.Bicategory.whiskerRight (app a).hom (G.map f)))

(CategoryTheory.OplaxNatTrans.ModificationIso.ofComponents app naturality).inv.app a = (app a).inv


theorem MDifferentiable.sub (hf : MDifferentiable I 𝓘(𝕜, E') f)
    (hg : MDifferentiable I 𝓘(𝕜, E') g) : MDifferentiable I 𝓘(𝕜, E') (f - g)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{f g : M → E'}
(hf : MDifferentiable I 𝓘(𝕜, E') f)
(hg : MDifferentiable I 𝓘(𝕜, E') g)


lemma Set.Icc.coe_iSup [ConditionallyCompleteLattice α] {a b : α} (h : a ≤ b)
    [Nonempty ι] {S : ι → Set.Icc a b} : letI := Set.Icc.completeLattice h
    ↑(iSup S) = (⨆ i, S i : α)

{ι : Sort u_1}
{α : Type u_2}
[ConditionallyCompleteLattice α]
{a b : α}
(h : a ≤ b)
[Nonempty ι]
{S : ι → ↑(Set.Icc a b)}


@[simp]
theorem natCast_im (n : ℕ) : (n : ℤ√d).im = 0


@[simp]
theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo ↑a ↑b

Finset.map Fin.valEmbedding (Finset.Ioo a b) = Finset.Ioo ↑a ↑b


theorem HasPoints.lineCount_le_pointCount [HasPoints P L] {p : P} {l : L} (h : p ∉ l)
    [hf : Finite { p : P // p ∈ l }] : lineCount L p ≤ pointCount P l

{P : Type u_1}
{L : Type u_2}
[Membership P L]
[Configuration.HasPoints P L]
{p : P}
{l : L}
(h : p ∉ l)
[hf : Finite { p // p ∈ l }]

Configuration.lineCount L p ≤ Configuration.pointCount P l


/-- A measurable space is a space equipped with a σ-algebra. -/
@[class] structure MeasurableSpace (α : Type*) where
  /-- Predicate saying that a given set is measurable. Use `MeasurableSet` in the root namespace
  instead. -/
  MeasurableSet' : Set α → Prop
  /-- The empty set is a measurable set. Use `MeasurableSet.empty` instead. -/
  measurableSet_empty : MeasurableSet' ∅
  /-- The complement of a measurable set is a measurable set. Use `MeasurableSet.compl` instead. -/
  measurableSet_compl : ∀ s, MeasurableSet' s → MeasurableSet' sᶜ
  /-- The union of a sequence of measurable sets is a measurable set. Use a more general
  `MeasurableSet.iUnion` instead. -/
  measurableSet_iUnion : ∀ f : ℕ → Set α, (∀ i, MeasurableSet' (f i)) → MeasurableSet' (⋃ i, f i)

{α : Type u_7}
(self : MeasurableSpace α)


theorem CovBy.trans_antisymmRel (hab : a ⋖ b) (hbc : AntisymmRel (· ≤ ·) b c) : a ⋖ c

(hbc : AntisymmRel (fun x x_1 => x ≤ x_1) b c)


lemma dblX_of_Z_eq_zero {P : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.dblX P = (P x ^ 2) ^ 2

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P : Fin 3 → R}
(hP : W'.Equation P)
(hPz : P z = 0)


@[simp]
theorem add_self_eq_zero (x : R) : x + x = 0

{R : Type u_1}
[Semiring R]
[CharP R 2]
(x : R)


theorem lt_of_forall_lt_of_lt (a b : Lex (Π₀ i, α i)) (i : ι) :
    (∀ j < i, ofLex a j = ofLex b j) → ofLex a i < ofLex b i → a < b

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[LinearOrder ι]
[(i : ι) → PartialOrder (α i)]
(a b : Lex (Π₀ (i : ι), α i))
(i : ι)

(∀ j < i, (ofLex a) j = (ofLex b) j) → (ofLex a) i < (ofLex b) i → a < b


theorem nil_left_or_eq_nil {r : α → α → Prop} (l : List α) : List.Lex r [] l ∨ l = []

{α : Type u}
{r : α → α → Prop}
(l : List α)


/-- Two group homomorphisms `G →* G'` are equal if and only if they agree on a generator of `G`. -/
@[to_additive
   "Two homomorphisms `G →+ G'` of additive groups are equal if and only if they agree
   on a generator of `G`."]
lemma MonoidHom.eq_iff_eq_on_generator (f₁ f₂ : G →* G') : f₁ = f₂ ↔ f₁ g = f₂ g

(hg : ∀ (x : G), x ∈ Subgroup.zpowers g)


@[simp]
theorem Subsingleton.aestronglyMeasurable {_ : MeasurableSpace α} [TopologicalSpace β]
    [Subsingleton β] {μ : Measure α} (f : α → β) : AEStronglyMeasurable f μ

∀ {x : MeasurableSpace α} [inst : TopologicalSpace β] [inst_1 : Subsingleton β] {μ : MeasureTheory.Measure α}
  (f : α → β), MeasureTheory.AEStronglyMeasurable f μ


theorem getElem_splitWrtComposition (l : List α) (c : Composition n)
    (i : Nat) (h : i < (l.splitWrtComposition c).length) :
    (l.splitWrtComposition c)[i] = (l.take (c.sizeUpTo (i + 1))).drop (c.sizeUpTo i)

(l.splitWrtComposition c)[i] = List.drop (c.sizeUpTo i) (List.take (c.sizeUpTo (i + 1)) l)


/-- The function `MulOpposite.op` is an additive equivalence. -/
@[simps! (config := { fullyApplied := false, simpRhs := true }) apply symm_apply]
def opAddEquiv [Add α] : α ≃+ αᵐᵒᵖ


theorem comp_assoc {D : Type*} [Semiring D] [Algebra R D] [TopologicalSpace D] (h : C →A[R] D)
    (g : B →A[R] C) (f : A →A[R] B) : (h.comp g).comp f = h.comp (g.comp f)

{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]
{C : Type u_4}
[Semiring C]
[Algebra R C]
[TopologicalSpace C]
{D : Type u_5}
[Semiring D]
[Algebra R D]
[TopologicalSpace D]
(h : C →A[R] D)
(g : B →A[R] C)
(f : A →A[R] B)


lemma eq_of_lt_of_lt (h : a ≡ b [MOD m]) (ha : a < m) (hb : b < m) : a = b

{m a b : ℕ}
(h : a ≡ b [MOD m])
(ha : a < m)
(hb : b < m)


/-- Given a left homology map data for morphism `φ`, this is the induced left homology
map data for `-φ`. -/
@[simps]
def neg : LeftHomologyMapData (-φ) h₁ h₂

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


@[simp, bv_toNat] theorem toNat_neg (x : BitVec n) : (- x).toNat = (2^n - x.toNat) % 2^n


/-- The union of two bounded sets is bounded. -/
theorem IsVonNBounded.union {s₁ s₂ : Set E} (hs₁ : IsVonNBounded 𝕜 s₁) (hs₂ : IsVonNBounded 𝕜 s₂) :
    IsVonNBounded 𝕜 (s₁ ∪ s₂)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[Zero E]
[TopologicalSpace E]
{s₁ s₂ : Set E}
(hs₁ : Bornology.IsVonNBounded 𝕜 s₁)
(hs₂ : Bornology.IsVonNBounded 𝕜 s₂)


theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1

Polynomial.eval 0 (descPochhammer R 0) = 1


theorem HasFTaylorSeriesUpTo.ofLe (h : HasFTaylorSeriesUpTo n f p) (hmn : m ≤ n) :
    HasFTaylorSeriesUpTo m f p

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{m n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpTo n f p)
(hmn : m ≤ n)


@[simp] theorem mem_closedBall : y ∈ closedBall x ε ↔ dist y x ≤ ε

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}

y ∈ Metric.closedBall x ε ↔ dist y x ≤ ε


theorem iIndepFun.mgf_sum [IsProbabilityMeasure μ] {X : ι → Ω → ℝ}
    (h_indep : iIndepFun (fun i => inferInstance) X μ) (h_meas : ∀ i, Measurable (X i))
    (s : Finset ι) : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t

{X : ι → Ω → ℝ}

(h_indep : ProbabilityTheory.iIndepFun (fun i => inferInstance) X μ)

ProbabilityTheory.mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, ProbabilityTheory.mgf (X i) μ t


theorem lt_length' (i : Fin c.length) : (i : ℕ) < c.boundaries.card

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


@[simp]
theorem mul_inv_cancel_of_invertible (a : α) [Invertible a] : a * a⁻¹ = 1

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


/-- Let `K : ι → Set X` be a locally finite family of closed sets in an emetric space. Let
`U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then for any point
`x : X`, for sufficiently small `r : ℝ≥0∞` and for `y` sufficiently close to `x`, for all `i`, if
`y ∈ K i`, then `EMetric.closedBall y r ⊆ U i`. -/
theorem eventually_nhds_zero_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
    (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) :
    ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, ∀ i, p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i

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

∀ᶠ (p : ℝ≥0∞ × X) in 𝓝 0 ×ˢ 𝓝 x, ∀ (i : ι), p.2 ∈ K i → EMetric.closedBall p.2 p.1 ⊆ U i


theorem Summable.const_smul (b : γ) (hf : Summable f) : Summable fun i ↦ b • f i

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Monoid γ]
[TopologicalSpace α]
[AddCommMonoid α]
[DistribMulAction γ α]
[ContinuousConstSMul γ α]
{f : β → α}
(b : γ)
(hf : Summable f)


theorem Model.isSatisfiable (M : Type w) [Nonempty M] [L.Structure M] [M ⊨ T] :
    T.IsSatisfiable

{L : FirstOrder.Language}
{T : L.Theory}
(M : Type w)
[Nonempty M]
[L.Structure M]
[M ⊨ T]


theorem le_sum_caratheodory {ι} (m : ι → OuterMeasure α) :
    ⨅ i, (m i).caratheodory ≤ (sum m).caratheodory

{α : Type u_1}
{ι : Type u_2}
(m : ι → MeasureTheory.OuterMeasure α)

⨅ i, (m i).caratheodory ≤ (MeasureTheory.OuterMeasure.sum m).caratheodory


theorem Coprime.dvd_mul_left {m n k : ℕ} (H : Coprime k m) : k ∣ m * n ↔ k ∣ n


theorem const_equiv {x y : β} : const x ≈ const y ↔ x = y

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{x y : β}

CauSeq.const abv x ≈ CauSeq.const abv y ↔ x = y


theorem deriv_const_mul_field (u : 𝕜') : deriv (fun y => u * v y) x = u * deriv v x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝕜' : Type u_2}
[NormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{v : 𝕜 → 𝕜'}
(u : 𝕜')


@[to_additive]
theorem IsCompact.mul {s t : Set M} (hs : IsCompact s) (ht : IsCompact t) : IsCompact (s * t)

{M : Type u_3}
[TopologicalSpace M]
[AddMonoid M]
[ContinuousAdd M]
{s t : Set M}
(hs : IsCompact s)
(ht : IsCompact t)


theorem le_pred_of_lt (h : n < m) : n ≤ pred m


theorem of_isBigO_im_re_rpow (hre : Tendsto re l atTop) (r : ℝ) (hr : im =O[l] fun z => z.re ^ r) :
    IsExpCmpFilter l

(hre : Filter.Tendsto Complex.re l Filter.atTop)

(hr : Complex.im =O[l] fun z => z.re ^ r)


protected theorem Filter.Tendsto.min {b : Filter β} {a₁ a₂ : α} (hf : Tendsto f b (𝓝 a₁))
    (hg : Tendsto g b (𝓝 a₂)) : Tendsto (fun b => min (f b) (g b)) b (𝓝 (min a₁ a₂))

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f g : β → α}
{b : Filter β}
{a₁ a₂ : α}
(hf : Filter.Tendsto f b (𝓝 a₁))
(hg : Filter.Tendsto g b (𝓝 a₂))

Filter.Tendsto (fun b => min (f b) (g b)) b (𝓝 (min a₁ a₂))


@[simp] lemma mkRat_pow (num den : ℕ) (n : ℕ) : mkRat num den ^ n = mkRat (num ^ n) (den ^ n)

mkRat (↑num) den ^ n = mkRat (↑num ^ n) (den ^ n)


lemma descSet_empty : descSet hc (∅ : Set lc.pt) = ∅

(hc : CategoryTheory.Limits.IsColimit c)

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

CategoryTheory.Limits.Types.descSet hc ∅ = ∅


theorem _root_.Function.Surjective.valuationRing {R S : Type*} [CommRing R] [IsDomain R]
    [ValuationRing R] [CommRing S] [IsDomain S] (f : R →+* S) (hf : Function.Surjective f) :
    ValuationRing S

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[IsDomain R]
[ValuationRing R]
[CommRing S]
[IsDomain S]
(f : R →+* S)
(hf : Function.Surjective ⇑f)


theorem lt_map_map_zero : f 0 + g 0 - 1 < f (g 0)


theorem contractNth_apply_of_gt (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (h : (j : ℕ) < k) : contractNth j op g k = g k.succ

{n : ℕ}
{α : Type u_1}
(j : Fin (n + 1))
(op : α → α → α)
(g : Fin (n + 1) → α)
(k : Fin n)
(h : ↑j < ↑k)


@[simp]
theorem pow_p_dvd_int_iff (n : ℕ) (a : ℤ) : (p : ℤ_[p]) ^ n ∣ a ↔ (p ^ n : ℤ) ∣ a

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(n : ℕ)
(a : ℤ)


theorem zeroLocus_iSup_ideal {γ : Sort*} (I : γ → Ideal A) :
    zeroLocus _ ((⨆ i, I i : Ideal A) : Set A) = ⋂ i, zeroLocus 𝒜 (I i)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
{γ : Sort u_3}
(I : γ → Ideal A)

ProjectiveSpectrum.zeroLocus 𝒜 ↑(⨆ i, I i) = ⋂ i, ProjectiveSpectrum.zeroLocus 𝒜 ↑(I i)


theorem disjoint_sSup_left {a : Set α} {b : α} (d : Disjoint (sSup a) b) {i} (hi : i ∈ a) :
    Disjoint i b

{α : Type u_1}
[CompleteLattice α]
{a : Set α}
{b : α}
(d : Disjoint (sSup a) b)
{i : α}
(hi : i ∈ a)


@[continuity]
theorem continuous_inf [Inf L] [ContinuousInf L] : Continuous fun p : L × L => p.1 ⊓ p.2

{L : Type u_1}
[TopologicalSpace L]
[Inf L]
[ContinuousInf L]


@[to_additive]
theorem mul_lt_mul_of_le_of_lt [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α} (h₁ : a ≤ b) (h₂ : c < d) :
    a * c < b * d

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

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


@[to_additive (attr := simp)]
theorem prod_singleton (a : α) : prod {a} = a

{α : Type u_3}
[AddCommMonoid α]
(a : α)


MeasureTheory.BorelCantelli.process s 0 = 0


@[simp]
theorem compl_le_compl : s.compl ≤ t.compl ↔ s ≤ t

{α : Type u_1}
[LE α]
{s t : UpperSet α}


@[simp]
theorem lt_toLex_update_self_iff : toLex x < toLex (update x i a) ↔ x i < a

{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}

toLex x < toLex (Function.update x i a) ↔ x i < a


@[simp] lemma coe_affineIsometryOfStrictConvexSpace (hi : Isometry f) :
    ⇑hi.affineIsometryOfStrictConvexSpace = f

{E : Type u_3}
{F : Type u_4}
{PE : Type u_5}
{PF : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace ℝ E]
[NormedSpace ℝ F]
[StrictConvexSpace ℝ E]
[MetricSpace PE]
[MetricSpace PF]
[NormedAddTorsor E PE]
[NormedAddTorsor F PF]
{f : PF → PE}
(hi : Isometry f)


/-- `spanSingleton x` is the fractional ideal generated by `x` if `0 ∉ S` -/
irreducible_def spanSingleton (x : P) : FractionalIdeal S P

{R : Type u_5}
[CommRing R]
(S : Submonoid R)
{P : Type u_6}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(x : P)

FractionalIdeal.spanSingleton S x = ⟨Submodule.span R {x}, ⋯⟩


/-- If `χ` is a multiplicative character on a commutative monoid `M` with finitely many units,
then `χ ^ #Mˣ = 1`. -/
protected lemma pow_card_eq_one [Fintype Mˣ] (χ : MulChar M R) : χ ^ (Fintype.card Mˣ) = 1

{M : Type u_1}
[CommMonoid M]
{R : Type u_2}
[CommMonoidWithZero R]
[Fintype Mˣ]
(χ : MulChar M R)


theorem vars_add_subset [DecidableEq σ] (p q : MvPolynomial σ R) :
    (p + q).vars ⊆ p.vars ∪ q.vars

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


/-- `p → q → r ↔ p ∧ q → r` -/
theorem himp_himp (a b c : α) : a ⇨ b ⇨ c = a ⊓ b ⇨ c

{α : Type u_2}
[GeneralizedHeytingAlgebra α]
(a b c : α)


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

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


theorem factorMultiset_mul (n m : ℕ+) :
    factorMultiset (n * m) = factorMultiset n + factorMultiset m

(n * m).factorMultiset = n.factorMultiset + m.factorMultiset


theorem IsOpen.isConnected_iff_isPathConnected [LocPathConnectedSpace X] {U : Set X}
    (U_op : IsOpen U) : IsPathConnected U ↔ IsConnected U

{X : Type u_1}
[TopologicalSpace X]
[LocPathConnectedSpace X]
{U : Set X}
(U_op : IsOpen U)


lemma uniformSpace_eq_bot {u : UniformSpace α} : u = ⊥ ↔ idRel ∈ 𝓤[u]


@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ []

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


@[to_additive (attr := simp)]
theorem mulIndicator_empty (f : α → M) : mulIndicator (∅ : Set α) f = fun _ => 1

{α : Type u_1}
{M : Type u_4}
[Zero M]
(f : α → M)


/-- The natural isomorphism between functors `G ≅ F` induced by a natural isomorphism
between the opposite functors `F.op ≅ G.op`. -/
@[simps]
protected def removeOp (α : F.op ≅ G.op) : G ≅ F

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

(CategoryTheory.NatIso.removeOp α).hom = CategoryTheory.NatTrans.removeOp α.hom


@[to_additive]
theorem lift_of_comp_eq_map (f : α → β) : (lift fun x ↦ of (f x)) = map f

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

(FreeAddMonoid.lift fun x => FreeAddMonoid.of (f x)) = FreeAddMonoid.map f


@[simp]
theorem restrictScalars_smul (c : R₁) (f : M →ₗ[S] N) :
    (c • f).restrictScalars R = c • f.restrictScalars R

{R : Type u_17}
{S : Type u_18}
{M : Type u_19}
{N : Type u_20}
[Semiring R]
[Semiring S]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Module S M]
[Module S N]
[LinearMap.CompatibleSMul M N R S]
{R₁ : Type u_21}
[Semiring R₁]
[Module R₁ N]
[SMulCommClass S R₁ N]
[SMulCommClass R R₁ N]
(c : R₁)
(f : M →ₗ[S] N)


/-- When applied to `inl`, `DualNumber.lift` applies the map `f : A →ₐ[R] B`. -/
@[simp] theorem lift_apply_inl (fe : {fe : (A →ₐ[R] B) × B // _}) (a : A) :
    lift fe (inl a : A[ε]) = fe.val.1 a

(fe : { fe // fe.2 * fe.2 = 0 ∧ ∀ (a : A), Commute fe.2 (fe.1 a) })

(DualNumber.lift fe) (TrivSqZeroExt.inl a) = (↑fe).1 a


/--
If there exists a multiplication-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`.
-/
@[to_additive "If there exists a addition-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`."]
theorem exponent_eq_of_mulEquiv (e : G ≃* H) : Monoid.exponent G = Monoid.exponent H

{G : Type u}
[AddMonoid G]
{H : Type u_1}
[AddMonoid H]
(e : G ≃+ H)

AddMonoid.exponent G = AddMonoid.exponent H


theorem map_surjective_of_surjective : Function.Surjective (map f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}
(hf : Function.Surjective ⇑f)


theorem IntegrableAtFilter.inf_of_right (hl : IntegrableAtFilter f l μ) :
    IntegrableAtFilter f (l' ⊓ l) μ

(hl : MeasureTheory.IntegrableAtFilter f l μ)

MeasureTheory.IntegrableAtFilter f (l' ⊓ l) μ


@[to_additive]
theorem measurePreserving_inv (μ : Measure G) [IsInvInvariant μ] : MeasurePreserving Inv.inv μ μ

{G : Type u_2}
[MeasurableSpace G]
[Inv G]
[MeasurableInv G]
(μ : MeasureTheory.Measure G)
[μ.IsInvInvariant]

MeasureTheory.MeasurePreserving Inv.inv μ μ


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


@[simp] -- @[norm_cast] -- Porting note: A theorem with this can't have a rhs starting with `↑`.
theorem _root_.Submodule.subtypeL_apply (p : Submodule R₁ M₁) (x : p) : p.subtypeL x = x

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
(p : Submodule R₁ M₁)
(x : ↥p)


/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
vectors picks out the coefficient of that vector. -/
theorem Orthonormal.inner_right_fintype [Fintype ι] {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι → 𝕜)
    (i : ι) : ⟪v i, ∑ i : ι, l i • v i⟫ = l i

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
[Fintype ι]
{v : ι → E}
(hv : Orthonormal 𝕜 v)
(l : ι → 𝕜)
(i : ι)


@[simp]
theorem coe_fn_toFun (f : r →r s) : f.toFun = (f : α → β)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r →r s)


private lemma firstRow_exact : (firstRow I M f).Exact

{R : Type u}
[CommRing R]
(I : Ideal R)
(M : Type u)
[AddCommGroup M]
[Module R M]
{ι : Type}
(f : (ι → R) →ₗ[R] M)
(hf : Function.Surjective ⇑f)


/-- If `H` is a subgroup of `G` and `G` is the union of a finite family of left cosets of `H`
then `H` has finite index. -/
@[to_additive]
theorem finiteIndex_of_leftCoset_cover_const : H.FiniteIndex

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


protected theorem HasCompactSupport.fderiv (hf : HasCompactSupport f) :
    HasCompactSupport (fderiv 𝕜 f)

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


@[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_one {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : powCoprime h 1 = 1

{n : ℕ}
{G : Type u_6}
[AddGroup G]
(h : (Nat.card G).Coprime n)


theorem map_residue (f : R →+* S) [IsLocalRingHom f] (r : R) :
    ResidueField.map f (residue R r) = residue S (f r)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[LocalRing R]
[CommRing S]
[LocalRing S]
(f : R →+* S)
[IsLocalRingHom f]
(r : R)

(LocalRing.ResidueField.map f) ((LocalRing.residue R) r) = (LocalRing.residue S) (f r)


/-- The forgetful functor from categories to quivers. -/
@[simps]
def forget : Cat.{v, u} ⥤ Quiv.{v, u}

CategoryTheory.Quiv.forget.obj C = CategoryTheory.Quiv.of ↑C


@[simp]
lemma mem_sum {s : Finset ι} {m : ι → Multiset α} : a ∈ ∑ i ∈ s, m i ↔ ∃ i ∈ s, a ∈ m i

{ι : Type u_1}
{α : Type u_3}
{a : α}
{s : Finset ι}
{m : ι → Multiset α}


/-- Formula for the distance between the images of two nonzero points under an inversion with center
zero. See also `EuclideanGeometry.dist_inversion_inversion` for inversions around a general
point. -/
theorem dist_div_norm_sq_smul {x y : F} (hx : x ≠ 0) (hy : y ≠ 0) (R : ℝ) :
    dist ((R / ‖x‖) ^ 2 • x) ((R / ‖y‖) ^ 2 • y) = R ^ 2 / (‖x‖ * ‖y‖) * dist x y

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x y : F}
(hx : x ≠ 0)
(hy : y ≠ 0)
(R : ℝ)


nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) :
    HasStrictDerivAt (fun y => f y + g y) (f' + g') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : 𝕜 → F}
{f' g' : F}
{x : 𝕜}
(hf : HasStrictDerivAt f f' x)
(hg : HasStrictDerivAt g g' x)


/-- Extended (pseudo) metric spaces, with an extended distance `edist` possibly taking the
value ∞

Each pseudo_emetric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace`.
This is enforced in the type class definition, by extending the `UniformSpace` structure. When
instantiating a `PseudoEMetricSpace` structure, the uniformity fields are not necessary, they
will be filled in by default. There is a default value for the uniformity, that can be substituted
in cases of interest, for instance when instantiating a `PseudoEMetricSpace` structure
on a product.

Continuity of `edist` is proved in `Topology.Instances.ENNReal`
-/
class PseudoEMetricSpace (α : Type u) extends EDist α : Type u where
  edist_self : ∀ x : α, edist x x = 0
  edist_comm : ∀ x y : α, edist x y = edist y x
  edist_triangle : ∀ x y z : α, edist x z ≤ edist x y + edist y z
  toUniformSpace : UniformSpace α := uniformSpaceOfEDist edist edist_self edist_comm edist_triangle
  uniformity_edist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | edist p.1 p.2 < ε } := by rfl

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


@[to_additive]
theorem tendsto_multiset_prod {f : ι → α → M} {x : Filter α} {a : ι → M} (s : Multiset ι) :
    (∀ i ∈ s, Tendsto (f i) x (𝓝 (a i))) →
      Tendsto (fun b => (s.map fun c => f c b).prod) x (𝓝 (s.map a).prod)

{ι : Type u_1}
{α : Type u_2}
{M : Type u_3}
[TopologicalSpace M]
[CommMonoid M]
[ContinuousMul M]
{f : ι → α → M}
{x : Filter α}
{a : ι → M}
(s : Multiset ι)

(∀ i ∈ s, Filter.Tendsto (f i) x (𝓝 (a i))) →
  Filter.Tendsto (fun b => (Multiset.map (fun c => f c b) s).prod) x (𝓝 (Multiset.map a s).prod)


/-- If `f` is integrable on intervals `Ioc a (b i)`,
where `b i` tends to ∞, and
`∫ x in a .. b i, ‖f x‖ ∂μ` converges to `I : ℝ` along a filter `l`,
then `f` is integrable on the interval (a, ∞) -/
theorem integrableOn_Ioi_of_intervalIntegral_norm_tendsto (I a : ℝ)
    (hfi : ∀ i, IntegrableOn f (Ioc a (b i)) μ) (hb : Tendsto b l atTop)
    (h : Tendsto (fun i => ∫ x in a..b i, ‖f x‖ ∂μ) l (𝓝 <| I)) : IntegrableOn f (Ioi a) μ

(hfi : ∀ (i : ι), MeasureTheory.IntegrableOn f (Set.Ioc a (b i)) μ)

(h : Filter.Tendsto (fun i => ∫ (x : ℝ) in a..b i, ‖f x‖ ∂μ) l (𝓝 I))

MeasureTheory.IntegrableOn f (Set.Ioi a) μ


theorem glueDist_glued_points [Nonempty Z] (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (p : Z) :
    glueDist Φ Ψ ε (.inl (Φ p)) (.inr (Ψ p)) = ε

{X : Type u}
{Y : Type v}
{Z : Type w}
[MetricSpace X]
[MetricSpace Y]
[Nonempty Z]
(Φ : Z → X)
(Ψ : Z → Y)
(ε : ℝ)
(p : Z)

Metric.glueDist Φ Ψ ε (Sum.inl (Φ p)) (Sum.inr (Ψ p)) = ε


@[to_additive (attr := ext)]
lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g

{X Y : MonCat}
{f g : X ⟶ Y}
(w : ∀ (x : ↑X), f x = g x)


@[simp]
theorem ofMul_div [Div α] (x y : α) : ofMul (x / y) = ofMul x - ofMul y

Additive.ofMul (x / y) = Additive.ofMul x - Additive.ofMul y


theorem get?_zip_eq_some (l₁ : List α) (l₂ : List β) (z : α × β) (i : ℕ) :
    (zip l₁ l₂).get? i = some z ↔ l₁.get? i = some z.1 ∧ l₂.get? i = some z.2

{α : Type u}
{β : Type u_1}
(l₁ : List α)
(l₂ : List β)
(z : α × β)
(i : ℕ)

(l₁.zip l₂).get? i = some z ↔ l₁.get? i = some z.1 ∧ l₂.get? i = some z.2


theorem Sublist.subperm {l₁ l₂ : List α} (s : l₁ <+ l₂) : l₁ <+~ l₂

{α : Type u_1}
{l₁ l₂ : List α}
(s : l₁ <+ l₂)


theorem ofBoolUsing_eq_true {p : Prop} {d : Decidable p} (h : toBoolUsing d = true) : p


protected theorem adapted [LE E] (hf : Supermartingale f ℱ μ) : Adapted ℱ f

(hf : MeasureTheory.Supermartingale f ℱ μ)


lemma StrictAnti.image_Iio_subset (h : StrictAnti f) : f '' Iio b ⊆ Ioi (f b)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : StrictAnti f)


lemma shiftFunctorZero_hom_app_shift (n : A) :
    (shiftFunctorZero C A).hom.app (X⟦n⟧) =
    (shiftFunctorComm C n 0).hom.app X ≫ ((shiftFunctorZero C A).hom.app X)⟦n⟧'

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddCommMonoid A]
[CategoryTheory.HasShift C A]
{X : C}
(n : A)

(CategoryTheory.shiftFunctorZero C A).hom.app ((CategoryTheory.shiftFunctor C n).obj X) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorComm C n 0).hom.app X)
    ((CategoryTheory.shiftFunctor C n).map ((CategoryTheory.shiftFunctorZero C A).hom.app X))


/-- The diameter is monotonous with respect to inclusion -/
@[gcongr]
theorem diam_mono {s t : Set α} (h : s ⊆ t) : diam s ≤ diam t

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


theorem enum_lt_enum {r : α → α → Prop} [IsWellOrder α r] {o₁ o₂ : Ordinal} (h₁ : o₁ < type r)
    (h₂ : o₂ < type r) : r (enum r o₁ h₁) (enum r o₂ h₂) ↔ o₁ < o₂

{α : Type u}
{r : α → α → Prop}
[IsWellOrder α r]
{o₁ o₂ : Ordinal.{u}}
(h₁ : o₁ < Ordinal.type r)
(h₂ : o₂ < Ordinal.type r)

r (Ordinal.enum r o₁ h₁) (Ordinal.enum r o₂ h₂) ↔ o₁ < o₂


theorem not_fuzzy {x y : PGame} (ox : Numeric x) (oy : Numeric y) : ¬Fuzzy x y

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)


@[csimp] private theorem Float.mk_eq : @Float.mk = Float.mkImpl


@[to_additive (attr := simp) prod_bot_sup_bot_prod]
theorem prod_bot_sup_bot_prod (s : Submonoid M) (t : Submonoid N) :
    (prod s ⊥) ⊔ (prod ⊥ t) = prod s t

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(s : AddSubmonoid M)
(t : AddSubmonoid N)


theorem prod_norm_eq_add (hp : 0 < p.toReal) (f : WithLp p (α × β)) :
    ‖f‖ = (‖f.fst‖ ^ p.toReal + ‖f.snd‖ ^ p.toReal) ^ (1 / p.toReal)

{p : ℝ≥0∞}
{α : Type u_2}
{β : Type u_3}
[Norm α]
[Norm β]
(hp : 0 < p.toReal)
(f : WithLp p (α × β))

‖f‖ = (‖f.1‖ ^ p.toReal + ‖f.2‖ ^ p.toReal) ^ (1 / p.toReal)


/-- The push-forward of an ideal `I` of `R` to `MvPolynomial σ R` via inclusion
 is exactly the set of polynomials whose coefficients are in `I` -/
theorem mem_map_C_iff {I : Ideal R} {f : MvPolynomial σ R} :
    f ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R)) ↔
      ∀ m : σ →₀ ℕ, f.coeff m ∈ I

{R : Type u}
{σ : Type v}
[CommRing R]
{I : Ideal R}
{f : MvPolynomial σ R}

f ∈ Ideal.map MvPolynomial.C I ↔ ∀ (m : σ →₀ ℕ), MvPolynomial.coeff m f ∈ I


theorem biInter_singleton (a : α) (s : α → Set β) : ⋂ x ∈ ({a} : Set α), s x = s a

{α : Type u_1}
{β : Type u_2}
(a : α)
(s : α → Set β)


@[simp]
theorem mul_apply (f g : Module.End R M) (x : M) : (f * g) x = f (g x)

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(f g : Module.End R M)
(x : M)


@[to_additive (attr := simp)]
theorem smul_set_singleton : a • ({b} : Set β) = {a • b}

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


protected theorem le_total (m n : Nat) : m ≤ n ∨ n ≤ m


@[to_additive]
theorem mulDysonETransform.smul_finset_snd_subset_fst :
    e • (mulDysonETransform e x).2 ⊆ (mulDysonETransform e x).1

{α : Type u_1}
[DecidableEq α]
[AddCommGroup α]
{e : α}
{x : Finset α × Finset α}

e +ᵥ (Finset.addDysonETransform e x).2 ⊆ (Finset.addDysonETransform e x).1


theorem coeff_invOfUnit (n : ℕ) (φ : R⟦X⟧) (u : Rˣ) :
    coeff R n (invOfUnit φ u) =
      if n = 0 then ↑u⁻¹
      else
        -↑u⁻¹ *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0

{R : Type u_1}
[Ring R]
(n : ℕ)
(φ : PowerSeries R)
(u : Rˣ)

(PowerSeries.coeff R n) (φ.invOfUnit u) =
  if n = 0 then ↑u⁻¹
  else
    -↑u⁻¹ *
      ∑ x ∈ Finset.antidiagonal n,
        if x.2 < n then (PowerSeries.coeff R x.1) φ * (PowerSeries.coeff R x.2) (φ.invOfUnit u) else 0


@[simp, measurability]
protected lemma MeasurableSet.bihimp {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁)
    (h₂ : MeasurableSet s₂) : MeasurableSet (s₁ ⇔ s₂)

{α : Type u_1}
{m : MeasurableSpace α}
{s₁ s₂ : Set α}
(h₁ : MeasurableSet s₁)
(h₂ : MeasurableSet s₂)


theorem falling_zero_subset : falling 0 𝒜 ⊆ {∅}

{α : Type u_2}
[DecidableEq α]
(𝒜 : Finset (Finset α))


/-- unique factorization monoids.

These are defined as `CancelCommMonoidWithZero`s with well-founded strict divisibility
relations, but this is equivalent to more familiar definitions:

Each element (except zero) is uniquely represented as a multiset of irreducible factors.
Uniqueness is only up to associated elements.

Each element (except zero) is non-uniquely represented as a multiset
of prime factors.

To define a UFD using the definition in terms of multisets
of irreducible factors, use the definition `of_exists_unique_irreducible_factors`

To define a UFD using the definition in terms of multisets
of prime factors, use the definition `of_exists_prime_factors`

-/
class UniqueFactorizationMonoid (α : Type*) [CancelCommMonoidWithZero α] extends WfDvdMonoid α :
  Prop where
  protected irreducible_iff_prime : ∀ {a : α}, Irreducible a ↔ Prime a

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : UniqueFactorizationMonoid α]
{a : α}


/-- An equality of subobjects gives an isomorphism of the corresponding objects.
(One could use `underlying.mapIso (eqToIso h))` here, but this is more readable.) -/
@[simps]
def isoOfEq {B : C} (X Y : Subobject B) (h : X = Y) : (X : C) ≅ (Y : C)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{B : C}
(X Y : CategoryTheory.Subobject B)
(h : X = Y)


@[to_additive (attr := simp)]
theorem comap_map_comap {S : Submonoid N} {f : F} : ((S.comap f).map f).comap f = S.comap f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{S : Submonoid N}
{f : F}

Submonoid.comap f (Submonoid.map f (Submonoid.comap f S)) = Submonoid.comap f S


theorem valMinAbs_def_pos {n : ℕ} [NeZero n] (x : ZMod n) :
    valMinAbs x = if x.val ≤ n / 2 then (x.val : ℤ) else x.val - n

x.valMinAbs = if x.val ≤ n / 2 then ↑x.val else ↑x.val - ↑n


@[simp]
theorem continuum_add_self : 𝔠 + 𝔠 = 𝔠

Cardinal.continuum + Cardinal.continuum = Cardinal.continuum


theorem StrictConcaveOn.congr (hf : StrictConcaveOn 𝕜 s f) (hfg : EqOn f g s) :
    StrictConcaveOn 𝕜 s g

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : StrictConcaveOn 𝕜 s f)
(hfg : Set.EqOn f g s)


theorem iSup₂_lintegral_le {ι : Sort*} {ι' : ι → Sort*} (f : ∀ i, ι' i → α → ℝ≥0∞) :
    ⨆ (i) (j), ∫⁻ a, f i j a ∂μ ≤ ∫⁻ a, ⨆ (i) (j), f i j a ∂μ

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

⨆ i, ⨆ j, ∫⁻ (a : α), f i j a ∂μ ≤ ∫⁻ (a : α), ⨆ i, ⨆ j, f i j a ∂μ


@[to_additive]
theorem centralizer_le {s t : Set G} (h : s ⊆ t) : centralizer t ≤ centralizer s

{G : Type u_1}
[AddGroup G]
{s t : Set G}
(h : s ⊆ t)

AddSubgroup.centralizer t ≤ AddSubgroup.centralizer s


/-- **Taylor's theorem** with the Lagrange form of the remainder.

We assume that `f` is `n+1`-times continuously differentiable in the closed set `Icc x₀ x` and
`n+1`-times differentiable on the open set `Ioo x₀ x`. Then there exists an `x' ∈ Ioo x₀ x` such
that $$f(x) - (P_n f)(x₀, x) = \frac{f^{(n+1)}(x') (x - x₀)^{n+1}}{(n+1)!},$$
where $P_n f$ denotes the Taylor polynomial of degree $n$ and $f^{(n+1)}$ is the $n+1$-th iterated
derivative. -/
theorem taylor_mean_remainder_lagrange {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)
    (hf : ContDiffOn ℝ n f (Icc x₀ x))
    (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :
    ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =
      iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x₀) ^ (n + 1) / (n + 1)!

(hf : ContDiffOn ℝ (↑n) f (Set.Icc x₀ x))

(hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Set.Icc x₀ x)) (Set.Ioo x₀ x))

∃ x' ∈ Set.Ioo x₀ x,
  f x - taylorWithinEval f n (Set.Icc x₀ x) x₀ x =
    iteratedDerivWithin (n + 1) f (Set.Icc x₀ x) x' * (x - x₀) ^ (n + 1) / ↑(n + 1)!


@[simp]
theorem divOf_apply (g : G) (x : k[G]) (g' : G) : (x /ᵒᶠ g) g' = x (g + g')

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(g : G)
(x : AddMonoidAlgebra k G)
(g' : G)


@[simp]
theorem toNat_add_toNat_neg_eq_nnnorm (n : ℤ) : ↑n.toNat + ↑(-n).toNat = ‖n‖₊


protected theorem sSup_apply {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) {l : E →ₗ.[R] F}
    (hl : l ∈ c) (x : l.domain) :
    (LinearPMap.sSup c hc) ⟨x, (LinearPMap.le_sSup hc hl).1 x.2⟩ = l x

(hc : DirectedOn (fun x x_1 => x ≤ x_1) c)


@[simp]
theorem toPartialHomeomorph_coe {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)
    (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :
    (hf.toPartialHomeomorph f hf' hn : E → F) = f

{𝕂 : Type u_1}
[RCLike 𝕂]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕂 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕂 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕂] F}
{a : E}
{n : ℕ∞}
(hf : ContDiffAt 𝕂 n f a)
(hf' : HasFDerivAt f (↑f') a)
(hn : 1 ≤ n)

↑(ContDiffAt.toPartialHomeomorph f hf hf' hn) = f


theorem finite_isTop (α : Type*) [PartialOrder α] : { x : α | IsTop x }.Finite


@[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S)
    {x : M} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i

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


theorem card_Ico : (Ico f g).card = (∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card) - 1

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

(Finset.Ico f g).card = ∏ i ∈ f.support ∪ g.support, (Finset.Icc (f i) (g i)).card - 1


@[simp] theorem conj_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
    (e₁.trans e₂).conj = e₁.conj.trans e₂.conj

{α : Sort u}
{β : Sort v}
{γ : Sort w}
(e₁ : α ≃ β)
(e₂ : β ≃ γ)


theorem interedges_biUnion_left (s : Finset ι) (t : Finset α) (f : ι → Finset α) :
    G.interedges (s.biUnion f) t = s.biUnion fun a ↦ G.interedges (f a) t

{ι : Type u_2}
{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
[DecidableEq α]
(s : Finset ι)
(t : Finset α)
(f : ι → Finset α)

G.interedges (s.biUnion f) t = s.biUnion fun a => G.interedges (f a) t


theorem tendsto_nhds_top_iff_nat {m : α → ℝ≥0∞} {f : Filter α} :
    Tendsto m f (𝓝 ∞) ↔ ∀ n : ℕ, ∀ᶠ a in f, ↑n < m a

{α : Type u_1}
{m : α → ℝ≥0∞}
{f : Filter α}

Filter.Tendsto m f (𝓝 ⊤) ↔ ∀ (n : ℕ), ∀ᶠ (a : α) in f, ↑n < m a


theorem exists_imp : ((∃ x, p x) → b) ↔ ∀ x, p x → b

{α : Sort u_1}
{p : α → Prop}
{b : Prop}


theorem eq_of_eq_graph {f g : E →ₗ.[R] F} (h : f.graph = g.graph) : f = g

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{f g : E →ₗ.[R] F}
(h : f.graph = g.graph)


@[to_additive]
theorem div_le_div_iff_left (a : α) : a / b ≤ a / c ↔ c ≤ b

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

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


protected theorem add_pos_of_nonneg_of_pos {a b : Int} (ha : 0 ≤ a) (hb : 0 < b) : 0 < a + b


@[simp]
theorem NormedAddGroupHom.zero_completion : (0 : NormedAddGroupHom G H).completion = 0

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]


@[simp]
theorem _root_.Basis.coe_toOrthonormalBasis (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
    (v.toOrthonormalBasis hv : ι → E) = (v : ι → E)

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(v : Basis ι 𝕜 E)
(hv : Orthonormal 𝕜 ⇑v)


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

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

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


theorem initial_natIso_iff {F F' : C ⥤ D} (i : F ≅ F') : Initial F ↔ Initial F'

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


/-- If `f` has a local max on `s` at `a`, `f'` is the derivative of `f` at `a` within `s`, and
`y` belongs to the positive tangent cone of `s` at `a`, then `f' y ≤ 0`. -/
theorem IsLocalMaxOn.hasFDerivWithinAt_nonpos (h : IsLocalMaxOn f s a)
    (hf : HasFDerivWithinAt f f' s a) (hy : y ∈ posTangentConeAt s a) : f' y ≤ 0

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{s : Set E}
{a y : E}
(h : IsLocalMaxOn f s a)
(hf : HasFDerivWithinAt f f' s a)
(hy : y ∈ posTangentConeAt s a)


theorem map_decode_iff {f : α → β → σ} :
    (Computable₂ fun a n => (decode (α := β) n).map (f a)) ↔ Computable₂ f

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → β → σ}

(Computable₂ fun a n => Option.map (f a) (Encodable.decode n)) ↔ Computable₂ f


@[to_additive (attr := simp)]
theorem mrange_fst : mrange (fst M N) = ⊤

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]

MonoidHom.mrange (MonoidHom.fst M N) = ⊤


/-- The identification `mop X ⊗ mop Y = mop (Y ⊗ X)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorIso :
    tensor Cᴹᵒᵖ ≅ (unmopFunctor C).prod (unmopFunctor C) ⋙
      Prod.swap C C ⋙ tensor C ⋙ mopFunctor C

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
(X : Cᴹᵒᵖ × Cᴹᵒᵖ)

((CategoryTheory.MonoidalOpposite.tensorIso C).inv.app X).unmop =
  𝟙 (CategoryTheory.MonoidalCategory.tensorObj X.2.unmop X.1.unmop)


@[simp]
theorem id_F (S : Split C) : (𝟙 S : S ⟶ S).F = 𝟙 S.X

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(S : SimplicialObject.Split C)


@[simp] theorem toFin_and (x y : BitVec v) :
    BitVec.toFin (x &&& y) = BitVec.toFin x &&& BitVec.toFin y


@[to_additive (attr := simp)]
lemma symm_mk_pow [Monoid M] (a : Mᵈᵐᵃ) (n : ℕ) : mk.symm (a ^ n) = mk.symm a ^ n

{M : Type u_1}
[Monoid M]
(a : Mᵈᵐᵃ)
(n : ℕ)

DomMulAct.mk.symm (a ^ n) = DomMulAct.mk.symm a ^ n


/-- If all but one point of a family are affinely independent, and that point does not lie in
the affine span of that family, the family is affinely independent. -/
theorem AffineIndependent.affineIndependent_of_not_mem_span {p : ι → P} {i : ι}
    (ha : AffineIndependent k fun x : { y // y ≠ i } => p x)
    (hi : p i ∉ affineSpan k (p '' { x | x ≠ i })) : AffineIndependent k p

(ha : AffineIndependent k fun x => p ↑x)

(hi : p i ∉ affineSpan k (p '' {x | x ≠ i}))


/-- Given a point `x` in a discrete subset `s` of a pseudometric space, there is an open ball
centered at `x` and intersecting `s` only at `x`. -/
theorem exists_ball_inter_eq_singleton_of_mem_discrete [DiscreteTopology s] {x : α} (hx : x ∈ s) :
    ∃ ε > 0, Metric.ball x ε ∩ s = {x}

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
[DiscreteTopology ↑s]
{x : α}
(hx : x ∈ s)


protected theorem div_eq_iff_eq_mul_left {a b c : Int}
    (H : b ≠ 0) (H' : b ∣ a) : a.div b = c ↔ a = c * b


theorem coe_mk (α) (str) : (@Bundled.mk c α str : Type u) = α

{c : Type u → Type v}
(α : Type u)
(str : c α)


theorem surjective_iff_surjOn_univ : Surjective f ↔ SurjOn f univ univ

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

Function.Surjective f ↔ Set.SurjOn f Set.univ Set.univ


@[simp]
theorem bind₂_C_left : bind₂ (C : R →+* MvPolynomial σ R) = RingHom.id _

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]

MvPolynomial.bind₂ MvPolynomial.C = RingHom.id (MvPolynomial σ R)


@[to_additive]
theorem le_tprod' (hf : Multipliable f) (i : ι) : f i ≤ ∏' i, f i

{ι : Type u_1}
{α : Type u_3}
[CanonicallyOrderedCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(hf : Multipliable f)
(i : ι)


theorem swap_def (a : Array α) (i j : Fin a.size) :
    a.swap i j = (a.set i (a.get j)).set ⟨j.1, by simp [j.2]⟩ (a.get i)

{α : Type u_1}
(a : Array α)
(i j : Fin a.size)

a.swap i j = (a.set i (a.get j)).set ⟨↑j, ⋯⟩ (a.get i)


@[to_additive]
theorem prod_bij_ne_one {s : Finset α} {t : Finset γ} {f : α → β} {g : γ → β}
    (i : ∀ a ∈ s, f a ≠ 1 → γ) (hi : ∀ a h₁ h₂, i a h₁ h₂ ∈ t)
    (i_inj : ∀ a₁ h₁₁ h₁₂ a₂ h₂₁ h₂₂, i a₁ h₁₁ h₁₂ = i a₂ h₂₁ h₂₂ → a₁ = a₂)
    (i_surj : ∀ b ∈ t, g b ≠ 1 → ∃ a h₁ h₂, i a h₁ h₂ = b) (h : ∀ a h₁ h₂, f a = g (i a h₁ h₂)) :
    ∏ x ∈ s, f x = ∏ x ∈ t, g x

(hi : ∀ (a : α) (h₁ : a ∈ s) (h₂ : f a ≠ 1), i a h₁ h₂ ∈ t)

(i_inj :
  ∀ (a₁ : α) (h₁₁ : a₁ ∈ s) (h₁₂ : f a₁ ≠ 1) (a₂ : α) (h₂₁ : a₂ ∈ s) (h₂₂ : f a₂ ≠ 1),
    i a₁ h₁₁ h₁₂ = i a₂ h₂₁ h₂₂ → a₁ = a₂)

(i_surj : ∀ b ∈ t, g b ≠ 1 → ∃ a, ∃ (h₁ : a ∈ s) (h₂ : f a ≠ 1), i a h₁ h₂ = b)

(h : ∀ (a : α) (h₁ : a ∈ s) (h₂ : f a ≠ 1), f a = g (i a h₁ h₂))


@[to_additive (attr := simp)]
theorem map_of (x) : map f (of x) = of (f x)

{α : Type u}
{β : Type v}
(f : α → β)
(x : α)

(FreeSemigroup.map f) (FreeSemigroup.of x) = FreeSemigroup.of (f x)


/-- `setToL1S` does not change if we replace the measure `μ` by `μ'` with `μ ≪ μ'`. The statement
uses two functions `f` and `f'` because they have to belong to different types, but morally these
are the same function (we have `f =ᵐ[μ] f'`). -/
theorem setToL1S_congr_measure {μ' : Measure α} (T : Set α → E →L[ℝ] F)
    (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0) (h_add : FinMeasAdditive μ T) (hμ : μ ≪ μ')
    (f : α →₁ₛ[μ] E) (f' : α →₁ₛ[μ'] E) (h : (f : α → E) =ᵐ[μ] f') :
    setToL1S T f = setToL1S T f'

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0)

(h_add : MeasureTheory.FinMeasAdditive μ T)

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(f' : ↥(MeasureTheory.Lp.simpleFunc E 1 μ'))

MeasureTheory.L1.SimpleFunc.setToL1S T f = MeasureTheory.L1.SimpleFunc.setToL1S T f'


theorem fromLoop_trans_toLoop {i : N} {p q : Ω^ N X x} :
    fromLoop i ((toLoop i p).trans <| toLoop i q) = transAt i p q

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
{i : N}
{p q : ↑(Ω^ N X x)}

GenLoop.fromLoop i (Path.trans (GenLoop.toLoop i p) (GenLoop.toLoop i q)) = GenLoop.transAt i p q


@[simp]
theorem nonempty_uIcc : Finset.Nonempty [[a, b]]

{α : Type u_2}
[Lattice α]
[LocallyFiniteOrder α]
{a b : α}


/-- The n-th harmonic number is not an integer for n ≥ 2. -/
theorem harmonic_not_int {n : ℕ} (h : 2 ≤ n) : ¬ (harmonic n).isInt


theorem map_comp (f : X ⟶ Y) (g : Y ⟶ Z) [Mono f] [Mono g] (x : Subobject X) :
    (map (f ≫ g)).obj x = (map g).obj ((map f).obj x)

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

(CategoryTheory.Subobject.map (CategoryTheory.CategoryStruct.comp f g)).obj x =
  (CategoryTheory.Subobject.map g).obj ((CategoryTheory.Subobject.map f).obj x)


theorem Subtype.exists_pi_extension {ι : Sort*} {α : ι → Sort*} [ne : ∀ i, Nonempty (α i)]
    {p : ι → Prop} (f : ∀ i : Subtype p, α i) :
    ∃ g : ∀ i : ι, α i, (fun i : Subtype p => g i) = f

{ι : Sort u_1}
{α : ι → Sort u_2}
[ne : ∀ (i : ι), Nonempty (α i)]
{p : ι → Prop}
(f : (i : Subtype p) → α i.val)


theorem Measurable.mono {ma ma' : MeasurableSpace α} {mb mb' : MeasurableSpace β} {f : α → β}
    (hf : @Measurable α β ma mb f) (ha : ma ≤ ma') (hb : mb' ≤ mb) : @Measurable α β ma' mb' f

{α : Type u_1}
{β : Type u_2}
{ma ma' : MeasurableSpace α}
{mb mb' : MeasurableSpace β}
{f : α → β}
(hf : Measurable f)
(ha : ma ≤ ma')
(hb : mb' ≤ mb)


theorem nilpotencyLength_eq_succ_iff (k : ℕ) :
    nilpotencyLength R L M = k + 1 ↔
      lowerCentralSeries R L M (k + 1) = ⊥ ∧ lowerCentralSeries R L M k ≠ ⊥

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

LieModule.nilpotencyLength R L M = k + 1 ↔
  LieModule.lowerCentralSeries R L M (k + 1) = ⊥ ∧ LieModule.lowerCentralSeries R L M k ≠ ⊥


/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[to_additive (attr := simp) "An element is add-left-regular if and only if adding to it on the left
an add-left-regular element is add-left-regular."]
theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
    IsLeftRegular (a * b) ↔ IsLeftRegular b

{R : Type u_1}
[Semigroup R]
{a : R}
(b : R)
(ha : IsLeftRegular a)


@[to_additive]
theorem finprod_comp_equiv (e : α ≃ β) {f : β → M} : (∏ᶠ i, f (e i)) = ∏ᶠ i', f i'

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
(e : α ≃ β)
{f : β → M}


theorem exists_ne_map_eq_of_ncard_lt_of_maps_to {t : Set β} (hc : t.ncard < s.ncard) {f : α → β}
    (hf : ∀ a ∈ s, f a ∈ t) (ht : t.Finite := by toFinite_tac) :
    ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ f x = f y

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
(hc : t.ncard < s.ncard)
{f : α → β}
(hf : ∀ a ∈ s, f a ∈ t)
(ht : t.Finite := by toFinite_tac)


@[simps!]
instance : Category (SimplicialObject C)

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(F : SimplexCategoryᵒᵖ ⥤ C)
(X : SimplexCategoryᵒᵖ)


@[to_additive (attr := simp) nnnorm_zero]
theorem nnnorm_one' : ‖(1 : E)‖₊ = 0


theorem add_mem_Ioo_iff_left : a + b ∈ Set.Ioo c d ↔ a ∈ Set.Ioo (c - b) (d - b)

{α : Type u_1}
[OrderedAddCommGroup α]
{a b c d : α}


@[to_additive]
theorem map_div₂ {_ : Group M} {_ : MulOneClass N} {_ : CommGroup P} (f : M →* N →* P)
    (m₁ m₂ : M) (n : N) : f (m₁ / m₂) n = f m₁ n / f m₂ n

{M : Type uM}
{N : Type uN}
{P : Type uP}

∀ {x : AddGroup M} {x_1 : AddZeroClass N} {x_2 : AddCommGroup P} (f : M →+ N →+ P) (m₁ m₂ : M) (n : N),
  (f (m₁ - m₂)) n = (f m₁) n - (f m₂) n


theorem injective_of_iterate_injective {n : ℕ} (hn : n ≠ 0) (h : Injective (f' ^ n)) :
    Injective f'

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f' : M →ₗ[R] M}
{n : ℕ}
(hn : n ≠ 0)
(h : Function.Injective ⇑(f' ^ n))


/-- A version of `Homeomorph.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }))
  "A version of `Homeomorph.addRight (-a) b` that is defeq to `b - a`. "]
def Homeomorph.divRight (x : G) : G ≃ₜ G

{G : Type w}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
(x b : G)


lemma comapOn_base_iff_of_bijOn (h : BijOn f E N.E) :
    (N.comapOn E f).Base B ↔ N.Base (f '' B) ∧ B ⊆ E

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{N : Matroid β}
{E B : Set α}
(h : Set.BijOn f E N.E)


@[to_additive]
theorem prod_product {s : Finset γ} {t : Finset α} {f : γ × α → β} :
    ∏ x ∈ s ×ˢ t, f x = ∏ x ∈ s, ∏ y ∈ t, f (x, y)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[CommMonoid β]
{s : Finset γ}
{t : Finset α}
{f : γ × α → β}


@[to_additive (attr := simp)]
theorem equivQuotientZPowOfEquiv_symm :
    (equivQuotientZPowOfEquiv e n).symm = equivQuotientZPowOfEquiv e.symm n

{A B : Type u}
[AddCommGroup A]
[AddCommGroup B]
(e : A ≃+ B)
(n : ℤ)

(QuotientAddGroup.equivQuotientZSMulOfEquiv e n).symm = QuotientAddGroup.equivQuotientZSMulOfEquiv e.symm n


@[simp]
theorem sum_monomial_index {S : Type*} [AddCommMonoid S] {n : ℕ} (a : R) (f : ℕ → R → S)
    (hf : f n 0 = 0) : (monomial n a : R[X]).sum f = f n a

{R : Type u}
[Semiring R]
{S : Type u_1}
[AddCommMonoid S]
{n : ℕ}
(a : R)
(f : ℕ → R → S)
(hf : f n 0 = 0)

((Polynomial.monomial n) a).sum f = f n a


theorem exists_pos_rat_lt {x : α} (x0 : 0 < x) : ∃ q : ℚ, 0 < q ∧ (q : α) < x

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
{x : α}
(x0 : 0 < x)


@[simp] theorem bne_assoc : ∀ (x y z : Bool), ((x != y) != z) = (x != (y != z))


theorem colimitSMulAux_eq_of_rel (r : R) (x y : Σ j, F.obj j)
    (h : Types.FilteredColimit.Rel (F ⋙ forget (ModuleCat R)) x y) :
    colimitSMulAux F r x = colimitSMulAux F r y

(h : CategoryTheory.Limits.Types.FilteredColimit.Rel (F ⋙ CategoryTheory.forget (ModuleCat R)) x y)

ModuleCat.FilteredColimits.colimitSMulAux F r x = ModuleCat.FilteredColimits.colimitSMulAux F r y


/-- A language homomorphism is an expansion on a structure if it commutes with the interpretation of
all symbols on that structure. -/
class IsExpansionOn (M : Type*) [L.Structure M] [L'.Structure M] : Prop where
  map_onFunction : ∀ {n} (f : L.Functions n) (x : Fin n → M), funMap (ϕ.onFunction f) x = funMap f x
  map_onRelation : ∀ {n} (R : L.Relations n) (x : Fin n → M),
    RelMap (ϕ.onRelation R) x = RelMap R x

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{ϕ : L →ᴸ L'}
{M : Type u_1}
[L.Structure M]
[L'.Structure M]
[self : ϕ.IsExpansionOn M]
{n : ℕ}
(f : L.Functions n)
(x : Fin n → M)

FirstOrder.Language.Structure.funMap (ϕ.onFunction f) x = FirstOrder.Language.Structure.funMap f x


/-- The angle between two non-zero complex numbers is the absolute value of the argument of their
quotient.

Note that this does not hold when `x` or `y` is `0` as the LHS is `π / 2` while the RHS is `0`. -/
lemma angle_eq_abs_arg (hx : x ≠ 0) (hy : y ≠ 0) : angle x y = |(x / y).arg|

InnerProductGeometry.angle x y = |(x / y).arg|


/-- The type of `⊤`-preserving functions from `α` to `β`. -/
structure TopHom (α β : Type*) [Top α] [Top β] where
  /-- The underlying function. The preferred spelling is `DFunLike.coe`. -/
  toFun : α → β
  /-- The function preserves the top element. The preferred spelling is `map_top`. -/
  map_top' : toFun ⊤ = ⊤

{α : Type u_6}
{β : Type u_7}
[Top α]
[Top β]
(self : TopHom α β)


theorem preimage_ball (x : ℤ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r

Int.cast ⁻¹' Metric.ball (↑x) r = Metric.ball x r


/-- A topological space is σ-compact iff there exists a countable collection of compact
subspaces that cover the entire space. -/
lemma SigmaCompactSpace_iff_exists_compact_covering :
    SigmaCompactSpace X ↔ ∃ K : ℕ → Set X, (∀ n, IsCompact (K n)) ∧ ⋃ n, K n = univ

SigmaCompactSpace X ↔ ∃ K, (∀ (n : ℕ), IsCompact (K n)) ∧ ⋃ n, K n = Set.univ


theorem _root_.mulLeft_bijective₀ (a : G) (ha : a ≠ 0) : Function.Bijective (a * · : G → G)

{G : Type u_1}
[GroupWithZero G]
(a : G)
(ha : a ≠ 0)


@[elab_as_elim]
protected theorem induction_on [Nonempty ι] [IsDirected ι (· ≤ ·)] {C : DirectLimit G f → Prop}
    (z : DirectLimit G f) (ih : ∀ i x, C (of G f i x)) : C z

{C : AddCommGroup.DirectLimit G f → Prop}

(ih : ∀ (i : ι) (x : G i), C ((AddCommGroup.DirectLimit.of G f i) x))


lemma assoc : ∀ {X Y Z W : Σi, C i} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ W), (f ≫ g) ≫ h = f ≫ g ≫ h

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

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


@[simp]
theorem hasseDeriv_zero : @hasseDeriv R _ 0 = LinearMap.id


/-- A morphism of schemes `f : X ⟶ Y` is locally of finite type if for each affine `U ⊆ Y` and
`V ⊆ f ⁻¹' U`, The induced map `Γ(Y, U) ⟶ Γ(X, V)` is of finite type.
-/
@[mk_iff]
class LocallyOfFiniteType (f : X ⟶ Y) : Prop where
  finiteType_of_affine_subset :
    ∀ (U : Y.affineOpens) (V : X.affineOpens) (e : V.1 ≤ f ⁻¹ᵁ U.1), (f.appLE U V e).FiniteType

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

AlgebraicGeometry.LocallyOfFiniteType f ↔
  ∀ (U : ↑Y.affineOpens) (V : ↑X.affineOpens) (e : ↑V ≤ (TopologicalSpace.Opens.map f.val.base).obj ↑U),
    RingHom.FiniteType (AlgebraicGeometry.Scheme.Hom.appLE f (↑U) (↑V) e)


theorem mem_interleave_right {a : α} {s₁ : Stream' α} (s₂ : Stream' α) : a ∈ s₂ → a ∈ s₁ ⋈ s₂

{α : Type u}
{a : α}
{s₁ : Stream' α}
(s₂ : Stream' α)

a ∈ s₂ → a ∈ s₁ ⋈ s₂


theorem norm_fract_le [HasSolidNorm K] (m : E) : ‖fract b m‖ ≤ ∑ i, ‖b i‖

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Fintype ι]
[HasSolidNorm K]
(m : E)


protected lemma mul_ne_mul_right (ha : a ≠ 0) : a * b ≠ a * c ↔ b ≠ c


theorem erase_single (j : ι) (i : ι) (x : β i) :
    (single i x).erase j = if i = j then 0 else single i x

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

DFinsupp.erase j (DFinsupp.single i x) = if i = j then 0 else DFinsupp.single i x


@[simp]
theorem coe_trans_to_affineMap (e : P₁ ≃ᵃ[k] P₂) (e' : P₂ ≃ᵃ[k] P₃) :
    (e.trans e' : P₁ →ᵃ[k] P₃) = (e' : P₂ →ᵃ[k] P₃).comp e

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{P₃ : Type u_4}
{V₁ : Type u_6}
{V₂ : Type u_7}
{V₃ : Type u_8}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
[AddCommGroup V₃]
[Module k V₃]
[AffineSpace V₃ P₃]
(e : P₁ ≃ᵃ[k] P₂)
(e' : P₂ ≃ᵃ[k] P₃)


/-- If `E / F` is a field extension and `E` is separably closed, then the separable closure
of `F` in `E` is equal to `F` if and only if `F` is separably closed. -/
theorem IsSepClosed.separableClosure_eq_bot_iff [IsSepClosed E] :
    separableClosure F E = ⊥ ↔ IsSepClosed F

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


/-- A morphism of triangles `(X,Y,Z,f,g,h) ⟶ (X',Y',Z',f',g',h')` in `C` is a triple of morphisms
`a : X ⟶ X'`, `b : Y ⟶ Y'`, `c : Z ⟶ Z'` such that
`a ≫ f' = f ≫ b`, `b ≫ g' = g ≫ c`, and `a⟦1⟧' ≫ h = h' ≫ c`.
In other words, we have a commutative diagram:
```
     f      g      h
  X  ───> Y  ───> Z  ───> X⟦1⟧
  │       │       │        │
  │a      │b      │c       │a⟦1⟧'
  V       V       V        V
  X' ───> Y' ───> Z' ───> X'⟦1⟧
     f'     g'     h'
```
See <https://stacks.math.columbia.edu/tag/0144>.
-/
@[ext]
structure TriangleMorphism (T₁ : Triangle C) (T₂ : Triangle C) where
  /-- the first morphism in a triangle morphism -/
  hom₁ : T₁.obj₁ ⟶ T₂.obj₁
  /-- the second morphism in a triangle morphism -/
  hom₂ : T₁.obj₂ ⟶ T₂.obj₂
  /-- the third morphism in a triangle morphism -/
  hom₃ : T₁.obj₃ ⟶ T₂.obj₃
  /-- the first commutative square of a triangle morphism -/
  comm₁ : T₁.mor₁ ≫ hom₂ = hom₁ ≫ T₂.mor₁ := by aesop_cat
  /-- the second commutative square of a triangle morphism -/
  comm₂ : T₁.mor₂ ≫ hom₃ = hom₂ ≫ T₂.mor₂ := by aesop_cat
  /-- the third commutative square of a triangle morphism -/
  comm₃ : T₁.mor₃ ≫ hom₁⟦1⟧' = hom₃ ≫ T₂.mor₃ := by aesop_cat

{T₁ T₂ : CategoryTheory.Pretriangulated.Triangle C}

(self : CategoryTheory.Pretriangulated.TriangleMorphism T₁ T₂)

T₁.mor₁ ≫ self.hom₂ = self.hom₁ ≫ T₂.mor₁


lemma BddAbove.smul_of_nonneg (hs : BddAbove s) (ha : 0 ≤ a) : BddAbove (a • s)

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[PosSMulMono α β]
{a : α}
{s : Set β}
(hs : BddAbove s)
(ha : 0 ≤ a)


theorem iInf_finset_image {f : γ → α} {g : α → β} {s : Finset γ} :
    ⨅ x ∈ s.image f, g x = ⨅ y ∈ s, g (f y)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CompleteLattice β]
[DecidableEq α]
{f : γ → α}
{g : α → β}
{s : Finset γ}

⨅ x ∈ Finset.image f s, g x = ⨅ y ∈ s, g (f y)


theorem map_comap_of_surjective {β} {f : α → β} (hf : Surjective f) (m : OuterMeasure β) :
    map f (comap f m) = m

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

(MeasureTheory.OuterMeasure.map f) ((MeasureTheory.OuterMeasure.comap f) m) = m


@[to_additive ContinuousWithinAt.nnnorm]
theorem ContinuousWithinAt.nnnorm' {s : Set α} {a : α} (h : ContinuousWithinAt f s a) :
    ContinuousWithinAt (fun x => ‖f x‖₊) s a

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
[TopologicalSpace α]
{f : α → E}
{s : Set α}
{a : α}
(h : ContinuousWithinAt f s a)


theorem hasseDeriv_eq_zero_of_lt_natDegree (p : R[X]) (n : ℕ) (h : p.natDegree < n) :
    hasseDeriv n p = 0

{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(n : ℕ)
(h : p.natDegree < n)


@[to_additive]
theorem smul_finset_subset_iff : a • s ⊆ t ↔ s ⊆ a⁻¹ • t

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

a • s ⊆ t ↔ s ⊆ a⁻¹ • t


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

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

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


theorem arg_neg_eq_arg_sub_pi_of_im_pos {x : ℂ} (hi : 0 < x.im) : arg (-x) = arg x - π


/-- An induction principle for closure membership for predicates with two arguments. -/
@[elab_as_elim]
theorem closure_induction₂ {s : Set R} {p : R → R → Prop} {x} {y : R} (hx : x ∈ closure s)
    (hy : y ∈ closure s) (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (H0_left : ∀ x, p 0 x)
    (H0_right : ∀ x, p x 0) (Hadd_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (Hadd_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (Hmul_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂)) : p x y

(hx : x ∈ NonUnitalSubsemiring.closure s)

(hy : y ∈ NonUnitalSubsemiring.closure s)

(Hadd_left : ∀ (x₁ x₂ y : R), p x₁ y → p x₂ y → p (x₁ + x₂) y)

(Hadd_right : ∀ (x y₁ y₂ : R), p x y₁ → p x y₂ → p x (y₁ + y₂))

(Hmul_left : ∀ (x₁ x₂ y : R), p x₁ y → p x₂ y → p (x₁ * x₂) y)

(Hmul_right : ∀ (x y₁ y₂ : R), p x y₁ → p x y₂ → p x (y₁ * y₂))


/-- The empty set is a Lindelof set. -/
@[simp]
theorem isLindelof_empty : IsLindelof (∅ : Set X)


@[simp]
theorem nnnorm_zpow : ∀ (a : α) (n : ℤ), ‖a ^ n‖₊ = ‖a‖₊ ^ n

{α : Type u_1}
[NormedDivisionRing α]
(a : α)
(n : ℤ)


@[to_additive (attr := simp)]
theorem toTopologicalSpace_bot : (⊥ : GroupTopology α).toTopologicalSpace = ⊥


/-- Promote a `Fin n` into a larger `Fin m`, as a subtype where the underlying
values are retained. This is the `OrderIso` version of `Fin.castLE`. -/
@[simps apply symm_apply]
def Fin.castLEOrderIso {n m : ℕ} (h : n ≤ m) : Fin n ≃o { i : Fin m // (i : ℕ) < n }

(Fin.castLEOrderIso h) i = ⟨Fin.castLE h i, ⋯⟩


/-- A version of `Finset.min'_image` with LHS and RHS reversed.
Also, this version assumes that `s` is nonempty, not its image. -/
lemma _root_.Monotone.map_finset_min' [LinearOrder β] {f : α → β} (hf : Monotone f) {s : Finset α}
    (h : s.Nonempty) : f (s.min' h) = (s.image f).min' (h.image f)

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
(hf : Monotone f)
{s : Finset α}
(h : s.Nonempty)

f (s.min' h) = (Finset.image f s).min' ⋯


/-- An n-ary version of `Set.mul_mem_mul`. -/
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
    (t.map g).prod ∈ (t.map f).prod

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
(t : List ι)
(f : ι → Set α)
(g : ι → α)
(hg : ∀ i ∈ t, g i ∈ f i)


theorem writtenInExtChartAt_comp (h : ContinuousWithinAt f s x) :
    {y | writtenInExtChartAt I I'' x (g ∘ f) y =
          (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) y} ∈
      𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] (extChartAt I x) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{x : M}
{s : Set M}
{g : M' → M''}
(h : ContinuousWithinAt f s x)

{y | writtenInExtChartAt I I'' x (g ∘ f) y = (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) y} ∈
  𝓝[↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I] ↑(extChartAt I x) x


@[nontriviality, measurability]
theorem Subsingleton.aemeasurable [Subsingleton α] : AEMeasurable f μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
[Subsingleton α]


/-- The natural transformation from the identity functor to `plus`. -/
@[simps]
def toPlusNatTrans : 𝟭 (Cᵒᵖ ⥤ D) ⟶ J.plusFunctor D

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]


/-- If two half-open intervals are disjoint and the endpoint of one lies in the other,
  then it must be equal to the endpoint of the other. -/
theorem eq_of_Ico_disjoint {x₁ x₂ y₁ y₂ : α} (h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)) (hx : x₁ < x₂)
    (h2 : x₂ ∈ Ico y₁ y₂) : y₁ = x₂

(h : Disjoint (Set.Ico x₁ x₂) (Set.Ico y₁ y₂))


@[to_additive]
theorem SeminormedCommGroup.mem_closure_iff :
    a ∈ closure s ↔ ∀ ε, 0 < ε → ∃ b ∈ s, ‖a / b‖ < ε

{E : Type u_6}
[SeminormedGroup E]
{s : Set E}
{a : E}

a ∈ closure s ↔ ∀ (ε : ℝ), 0 < ε → ∃ b ∈ s, ‖a / b‖ < ε


@[simp]
theorem recTopCoe_one {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) : @recTopCoe C d f 1 = f 1

{C : ℕ∞ → Sort u_1}
(d : C ⊤)
(f : (a : ℕ) → C ↑a)


theorem eventuallyConst_pred' {p : α → Prop} :
    EventuallyConst p l ↔ (p =ᶠ[l] fun _ ↦ False) ∨ (p =ᶠ[l] fun _ ↦ True)

{α : Type u_1}
{l : Filter α}
{p : α → Prop}

Filter.EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True


theorem iInf_pair {f : β → α} {a b : β} : ⨅ x ∈ ({a, b} : Set β), f x = f a ⊓ f b

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


protected theorem StrictConvex.convex (hs : StrictConvex 𝕜 s) : Convex 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}
(hs : StrictConvex 𝕜 s)


@[to_additive (attr := simp)]
theorem map_mk_symm_nhds (x : Mᵈᵐᵃ) : map (mk.symm : Mᵈᵐᵃ → M) (𝓝 x) = 𝓝 (mk.symm x)

{M : Type u_1}
[TopologicalSpace M]
(x : Mᵈᵃᵃ)

Filter.map (⇑DomAddAct.mk.symm) (𝓝 x) = 𝓝 (DomAddAct.mk.symm x)