/-- A relation isomorphism between equal relations on equal types. -/
@[simps! toEquiv apply]
protected def cast {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} (h₁ : α = β)
    (h₂ : HEq r s) : r ≃r s

{α β : Type u}
{r : α → α → Prop}
{s : β → β → Prop}
(h₁ : α = β)
(h₂ : HEq r s)
(a : α)


theorem div_le_self (ha : 0 ≤ a) (hb : 1 ≤ b) : a / b ≤ a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 ≤ a)
(hb : 1 ≤ b)


@[simp]
theorem ndinsert_of_not_mem {a : α} {s : Multiset α} : a ∉ s → ndinsert a s = a ::ₘ s

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


/-- The equivalence `Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiChainComplexEquivalence : Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.down α)))

((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).unitIso.hom.app P).f.f n = P.p.f n


/-- A function `f` from `Finset α` is strictly monotone if and only if `f s < f (insert a s)` for
all `s` and `a ∉ s`. -/
lemma strictMono_iff_forall_lt_insert : StrictMono f ↔ ∀ s ⦃a⦄, a ∉ s → f s < f (insert a s)

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

StrictMono f ↔ ∀ (s : Finset α) ⦃a : α⦄, a ∉ s → f s < f (insert a s)


@[simp]
lemma iInf_eq_top_of_isEmpty [IsEmpty ι] : ⨅ i, (f i : ℕ∞) = ⊤


@[csimp] theorem length_eq_lengthTR : @List.length = @List.lengthTR


theorem K'.elim_stack (a b c d) : K'.elim a b c d K'.stack = d

Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.stack = d


theorem den_mem (f : HomogeneousLocalization 𝒜 x) : f.den ∈ x

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


/-- A family of orthogonal idempotents induces an surjection `R ≃+* ∏ R ⧸ ⟨1 - eᵢ⟩` -/
lemma OrthogonalIdempotents.surjective_pi {I : Type*} [Finite I] {e : I → R}
    (he : OrthogonalIdempotents e) :
    Function.Surjective (Pi.ringHom fun i ↦ Ideal.Quotient.mk (Ideal.span {1 - e i}))

{R : Type u_1}
[CommRing R]
{I : Type u_3}
[Finite I]
{e : I → R}
(he : OrthogonalIdempotents e)

Function.Surjective ⇑(Pi.ringHom fun i => Ideal.Quotient.mk (Ideal.span {1 - e i}))


@[simp]
theorem map₂_bot_left (f : M →ₗ[R] N →ₗ[R] P) (q : Submodule R N) : map₂ f ⊥ q = ⊥

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(q : Submodule R N)


theorem exp_sub : exp (x - y) = exp x / exp y

Complex.exp (x - y) = Complex.exp x / Complex.exp y


protected theorem rightInvOn : RightInvOn e.symm e e.target

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


@[simp]
theorem card_Ico : (Ico a b).card = b - a


theorem ContMDiffAt.prod_map' {p : M × N} (hf : ContMDiffAt I I' n f p.1)
    (hg : ContMDiffAt J J' n g p.2) : ContMDiffAt (I.prod J) (I'.prod J') n (Prod.map f g) p

{𝕜 : 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']
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{f : M → M'}
{n : ℕ∞}
{g : N → N'}
{p : M × N}
(hf : ContMDiffAt I I' n f p.1)
(hg : ContMDiffAt J J' n g p.2)


/-- Product of a list of elements in a submonoid is in the submonoid. -/
@[to_additive "Sum of a list of elements in an `AddSubmonoid` is in the `AddSubmonoid`."]
theorem list_prod_mem {l : List M} (hl : ∀ x ∈ l, x ∈ s) : l.prod ∈ s

{M : Type u_1}
[Monoid M]
(s : Submonoid M)
{l : List M}
(hl : ∀ x ∈ l, x ∈ s)


protected lemma SurjOn.extendDomain (h : SurjOn g s t) :
    SurjOn (g.extendDomain f) ((↑) ∘ f '' s) ((↑) ∘ f '' t)

{α : Type u_1}
{β : Type u_2}
{p : β → Prop}
[DecidablePred p]
{f : α ≃ Subtype p}
{g : Equiv.Perm α}
{s t : Set α}
(h : Set.SurjOn (⇑g) s t)

Set.SurjOn (⇑(g.extendDomain f)) (Subtype.val ∘ ⇑f '' s) (Subtype.val ∘ ⇑f '' t)


theorem card_roots_le [IsDomain R] [DecidableEq R] : P.roots.toFinset.card ≤ 3

{R : Type u_1}
{P : Cubic R}
[CommRing R]
[IsDomain R]
[DecidableEq R]


/-- For an antisymmetric relation, erasing then inserting is the identity. -/
theorem orderedInsert_erase [DecidableEq α] [IsAntisymm α r] (x : α) (xs : List α) (hx : x ∈ xs)
    (hxs : Sorted r xs) :
    (xs.erase x).orderedInsert r x = xs

{α : Type u}
{r : α → α → Prop}
[DecidableRel r]
[DecidableEq α]
[IsAntisymm α r]
(x : α)
(xs : List α)
(hx : x ∈ xs)
(hxs : List.Sorted r xs)

List.orderedInsert r x (xs.erase x) = xs


@[simp]
theorem star_one [MulOneClass R] [StarMul R] : star (1 : R) = 1

(R : Type u)
[MulOneClass R]
[StarMul R]


theorem modEq_add_fac_self {a t n : ℤ} : a + n * t ≡ a [ZMOD n]


theorem coe_injective : Injective fun (f : ι →ᵇᵃ[I₀] M) x => f x

{ι : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
{I₀ : WithTop (BoxIntegral.Box ι)}


@[to_additive "A left transversal is finite iff the subgroup has finite index"]
theorem finite_iff
    (h : S ∈ Subgroup.leftTransversals (H : Set G)) :
    Finite S ↔ H.FiniteIndex

(h : S ∈ AddSubgroup.leftTransversals ↑H)


/-- If the sign of the angle between two vectors is nonzero, the first vector is nonzero. -/
theorem left_ne_zero_of_oangle_sign_ne_zero {x y : V} (h : (o.oangle x y).sign ≠ 0) : x ≠ 0

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


@[simp]
theorem ofFn_getElem : ∀ l : List α, (ofFn (fun i : Fin l.length => l[(i : Nat)])) = l


theorem valid : ∀ {it}, ValidFor l r it → Valid it

{l r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor l r it → it.Valid


theorem norm_intervalIntegral_eq (f : ℝ → E) (a b : ℝ) (μ : Measure ℝ) :
    ‖∫ x in a..b, f x ∂μ‖ = ‖∫ x in Ι a b, f x ∂μ‖

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : ℝ → E)
(a b : ℝ)
(μ : MeasureTheory.Measure ℝ)

‖∫ (x : ℝ) in a..b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖


theorem subset (h : t.WellFoundedOn r) (hst : s ⊆ t) : s.WellFoundedOn r

{α : Type u_2}
{r : α → α → Prop}
{s t : Set α}
(h : t.WellFoundedOn r)
(hst : s ⊆ t)


theorem IsSRGWith.card_commonNeighbors_eq_of_not_adj_compl (h : G.IsSRGWith n k ℓ μ) {v w : V}
    (hn : v ≠ w) (hna : ¬Gᶜ.Adj v w) :
    Fintype.card (Gᶜ.commonNeighbors v w) = n - (2 * k - ℓ)

{V : Type u}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
(h : G.IsSRGWith n k ℓ μ)
{v w : V}
(hn : v ≠ w)
(hna : ¬Gᶜ.Adj v w)

Fintype.card ↑(Gᶜ.commonNeighbors v w) = n - (2 * k - ℓ)


theorem exists_measure_closedBall_le_mul :
    ∃ C : ℝ≥0, ∀ᶠ ε in 𝓝[>] 0, ∀ x, μ (closedBall x (2 * ε)) ≤ C * μ (closedBall x ε)

{α : Type u_1}
[MetricSpace α]
[MeasurableSpace α]
(μ : MeasureTheory.Measure α)
[IsUnifLocDoublingMeasure μ]

∃ C, ∀ᶠ (ε : ℝ) in 𝓝[>] 0, ∀ (x : α), μ (Metric.closedBall x (2 * ε)) ≤ ↑C * μ (Metric.closedBall x ε)


theorem coe_eq_coe_iff_of_mem_Ico {x y : 𝕜} (hx : x ∈ Ico a (a + p)) (hy : y ∈ Ico a (a + p)) :
    (x : AddCircle p) = y ↔ x = y

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{p : 𝕜}
[hp : Fact (0 < p)]
{a : 𝕜}
[Archimedean 𝕜]
{x y : 𝕜}
(hx : x ∈ Set.Ico a (a + p))
(hy : y ∈ Set.Ico a (a + p))


theorem ext_elem_iff (h : IsAdjoinRootMonic S f) {x y : S} :
    x = y ↔ ∀ i < natDegree f, h.coeff x i = h.coeff y i

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRootMonic S f)
{x y : S}

x = y ↔ ∀ i < f.natDegree, h.coeff x i = h.coeff y i


/-- The opcycles functor `ShortComplex C ⥤ C` which sends a short complex `S` to `S.opcycles`
which is a cokernel of `S.f : S.X₁ ⟶ S.X₂`. -/
@[simps]
noncomputable def opcyclesFunctor :
    ShortComplex C ⥤ C

(CategoryTheory.ShortComplex.opcyclesFunctor C).obj S = S.opcycles


@[simp]
theorem AlgHom.card (K : Type*) [Field K] [IsAlgClosed K] [Algebra F K] :
    Fintype.card (E →ₐ[F] K) = finrank F E

(F : Type u_1)
(E : Type u_2)
[Field F]
[Field E]
[Algebra F E]
[FiniteDimensional F E]
[Algebra.IsSeparable F E]
(K : Type u_3)
[Field K]
[IsAlgClosed K]
[Algebra F K]

Fintype.card (E →ₐ[F] K) = FiniteDimensional.finrank F E


/-- `Real.equivCauchy` as a ring equivalence. -/
@[simps]
def ringEquivCauchy : ℝ ≃+* CauSeq.Completion.Cauchy (abs : ℚ → ℚ)


theorem sdiff_union_distrib (s t₁ t₂ : Finset α) : s \ (t₁ ∪ t₂) = s \ t₁ ∩ (s \ t₂)

{α : Type u_1}
[DecidableEq α]
(s t₁ t₂ : Finset α)


/-- The empty set has zero diameter -/
@[simp]
theorem diam_empty : diam (∅ : Set α) = 0


@[simp]
theorem coe_copy (f : M →ₛₗ[σ] M₃) (f' : M → M₃) (h : f' = ⇑f) : ⇑(f.copy f' h) = f'

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
(f : M →ₛₗ[σ] M₃)
(f' : M → M₃)
(h : f' = ⇑f)


theorem image_preimage_eq_range_inter {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = range f ∩ t

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


/-- The Grothendieck construction applied to a functor to `Type`
(thought of as a functor to `Cat` by realising a type as a discrete category)
is the same as the 'category of elements' construction.
-/
-- See porting note on grothendieckTypeToCatInverse.
-- We just want to turn off grothendieckTypeToCat_inverse_map_fiber_down_down,
-- so have to list the complement here for `@[simps]`.
@[simps! functor_obj_fst functor_obj_snd functor_map_coe inverse_obj_base inverse_obj_fiber_as
  inverse_map_base unitIso_hom_app_base unitIso_hom_app_fiber unitIso_inv_app_base
  unitIso_inv_app_fiber counitIso_hom_app_coe counitIso_inv_app_coe]
def grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(G : CategoryTheory.Functor C (Type w))
(X : G.Elements)

((CategoryTheory.Grothendieck.grothendieckTypeToCat G).inverse.obj X).base = X.fst


/-- A surjective embedding is an `OpenEmbedding`. -/
theorem _root_.Embedding.toOpenEmbedding_of_surjective (hf : Embedding f) (hsurj : f.Surjective) :
    OpenEmbedding f

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : Embedding f)
(hsurj : Function.Surjective f)


/-- Composition of `DilationEquiv`s. -/
@[simps! (config := .asFn) apply]
def trans (e₁ : X ≃ᵈ Y) (e₂ : Y ≃ᵈ Z) : X ≃ᵈ Z

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
[PseudoEMetricSpace Z]
(e₁ : X ≃ᵈ Y)
(e₂ : Y ≃ᵈ Z)


theorem IsAntichain.not_lt (hs : IsAntichain (· ≤ ·) s) (ha : a ∈ s) (hb : b ∈ s) : ¬a < b

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


@[to_additive (attr := simp)]
theorem div_mul_cancel (a b : G) : a / b * b = a


@[simp]
theorem getElem_tails (l : List α) (n : Nat) (h : n < (tails l).length) :
    (tails l)[n] = l.drop n

{α : Type u_1}
(l : List α)
(n : ℕ)
(h : n < l.tails.length)


@[simp]
theorem setOfTop_eq_univ [Nontrivial R] : setOfIdeal (⊤ : Ideal C(X, R)) = Set.univ

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
[Nontrivial R]


theorem mono_iff_injective {X Y : CompHausLike.{u} P} (f : X ⟶ Y) :
    Mono f ↔ Function.Injective f

{P : TopCat → Prop}
{X Y : CompHausLike P}
(f : X ⟶ Y)

CategoryTheory.Mono f ↔ Function.Injective ⇑f


theorem lf_zero_iff {G : PGame} [G.Impartial] : G ⧏ 0 ↔ 0 ⧏ G


/-- A family of 1-hypercovers generates the topology if any covering sieve
contains the sieve generated by the underlying covering of one of these 1-hypercovers.
See `OneHypercoverFamily.isSheaf_iff` for the characterization of sheaves. -/
class IsGenerating : Prop where
  le {X : C} (S : Sieve X) (hS : S ∈ J X) :
    ∃ (E : J.OneHypercover X) (_ : H E), E.sieve₀ ≤ S

{J : CategoryTheory.GrothendieckTopology C}


theorem squarefree_one [CommMonoid R] : Squarefree (1 : R)


/-- The obvious equivalence of categories `(ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ`. -/
@[simps]
def opEquiv : (ShortComplex C)ᵒᵖ ≌ ShortComplex Cᵒᵖ

(CategoryTheory.ShortComplex.opEquiv C).functor = CategoryTheory.ShortComplex.opFunctor C


/-- The monomial function `x^n` tends to `+∞` at `+∞` for any positive natural `n`.
A version for positive real powers exists as `tendsto_rpow_atTop`. -/
theorem tendsto_pow_atTop {n : ℕ} (hn : n ≠ 0) : Tendsto (fun x : α => x ^ n) atTop atTop

{α : Type u_3}
[OrderedSemiring α]
{n : ℕ}
(hn : n ≠ 0)

Filter.Tendsto (fun x => x ^ n) Filter.atTop Filter.atTop


theorem inter_subset_union : s ∩ t ⊆ s ∪ t

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


/-- The norm of the tensor product of a scalar linear map and of an element of a normed space
is the product of the norms. -/
@[simp]
theorem norm_smulRight_apply (c : E →L[𝕜] 𝕜) (f : Fₗ) : ‖smulRight c f‖ = ‖c‖ * ‖f‖

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
(c : E →L[𝕜] 𝕜)
(f : Fₗ)


theorem iInf_adj_of_nonempty [Nonempty ι] {f : ι → SimpleGraph V} :
    (⨅ i, f i).Adj a b ↔ ∀ i, (f i).Adj a b

{ι : Sort u_1}
{V : Type u}
{a b : V}
[Nonempty ι]
{f : ι → SimpleGraph V}

(⨅ i, f i).Adj a b ↔ ∀ (i : ι), (f i).Adj a b


@[to_additive (attr := simp)]
theorem coe_inclusion {H K : S} {h : H ≤ K} (a : H) : (inclusion h a : G) = a

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
[SetLike S G]
[AddSubgroupClass S G]
{H K : S}
{h : H ≤ K}
(a : ↥H)

↑((AddSubgroupClass.inclusion h) a) = ↑a


/-- `A[x]` is a fractional ideal for every integral `x`. -/
theorem isFractional_adjoin_integral :
    IsFractional S (Subalgebra.toSubmodule (Algebra.adjoin R ({x} : Set P)))

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(x : P)
(hx : IsIntegral R x)

IsFractional S (Subalgebra.toSubmodule (Algebra.adjoin R {x}))


theorem continuousOn_snd {s : Set (α × β)} : ContinuousOn Prod.snd s

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set (α × β)}


@[to_additive]
theorem map_comap_eq (f : M →ₙ* N) (S : Subsemigroup N) : (S.comap f).map f = S ⊓ f.srange

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : AddHom M N)
(S : AddSubsemigroup N)

AddSubsemigroup.map f (AddSubsemigroup.comap f S) = S ⊓ f.srange


@[to_additive prod_comp_prodMap]
theorem prod_comp_prodMap (f : P →* M) (g : P →* N) (f' : M →* M') (g' : N →* N') :
    (f'.prodMap g').comp (f.prod g) = (f'.comp f).prod (g'.comp g)

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


theorem mem_map_of_mem {x : P₁} {s : AffineSubspace k P₁} (h : x ∈ s) : f x ∈ s.map f

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
{x : P₁}
{s : AffineSubspace k P₁}
(h : x ∈ s)


theorem mk_sep (s : Set α) (t : α → Prop) : #({ x ∈ s | t x } : Set α) = #{ x : s | t x.1 }

Cardinal.mk ↑{x | x ∈ s ∧ t x} = Cardinal.mk ↑{x | t ↑x}


theorem X_pow_sub_one_mul_cyclotomic_dvd_X_pow_sub_one_of_dvd (R) [CommRing R] {d n : ℕ}
    (h : d ∈ n.properDivisors) : (X ^ d - 1) * cyclotomic n R ∣ X ^ n - 1

(R : Type u_1)
[CommRing R]
{d n : ℕ}
(h : d ∈ n.properDivisors)

(Polynomial.X ^ d - 1) * Polynomial.cyclotomic n R ∣ Polynomial.X ^ n - 1


theorem ae_restrict_biUnion_eq (s : ι → Set α) {t : Set ι} (ht : t.Countable) :
    ae (μ.restrict (⋃ i ∈ t, s i)) = ⨆ i ∈ t, ae (μ.restrict (s i))

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

MeasureTheory.ae (μ.restrict (⋃ i ∈ t, s i)) = ⨆ i ∈ t, MeasureTheory.ae (μ.restrict (s i))


theorem norm_add_le (x y : L) : norm (x + y) ≤ max (norm x) (norm y)

{L : Type u_2}
[Field L]
{Γ₀ : Type u_3}
[LinearOrderedCommGroupWithZero Γ₀]
[val : Valued L Γ₀]
[hv : Valued.v.RankOne]
(x y : L)

Valued.norm (x + y) ≤ max (Valued.norm x) (Valued.norm y)


/-- Applying a `MulDistribMulAction` results in an isomorphic subgroup -/
@[simps!]
def equivSMul (a : α) (H : Subgroup G) : H ≃* (a • H : Subgroup G)

(y : ↑(⇑↑(MulDistribMulAction.toMulEquiv G a) '' ↑H.toSubmonoid))

↑((Subgroup.equivSMul a H).symm y) = a⁻¹ • ↑y


@[to_additive (attr := simp)]
theorem elim_mulSingle_one [DecidableEq α] [DecidableEq β] [One γ] (i : α) (c : γ) :
    Sum.elim (Pi.mulSingle i c) (1 : β → γ) = Pi.mulSingle (Sum.inl i) c

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq α]
[DecidableEq β]
[Zero γ]
(i : α)
(c : γ)

Sum.elim (Pi.single i c) 0 = Pi.single (Sum.inl i) c


theorem add_one_le_iff (hm : m ≠ ⊤) : m + 1 ≤ n ↔ m < n


theorem Basis.basis_union (hIX : M.Basis I X) (hIY : M.Basis I Y) : M.Basis I (X ∪ Y)

{α : Type u_1}
{M : Matroid α}
{I X Y : Set α}
(hIX : M.Basis I X)
(hIY : M.Basis I Y)


@[simp]
theorem rootSet_zero (S) [CommRing S] [IsDomain S] [Algebra T S] : (0 : T[X]).rootSet S = ∅

{T : Type w}
[CommRing T]
(S : Type u_1)
[CommRing S]
[IsDomain S]
[Algebra T S]


/-- Let `G` be a complete nonarchimedean multiplicative abelian group, and let `f : α → G` be a
function that tends to one on the filter of cofinite sets. Then `f` is unconditionally
multipliable. -/
@[to_additive "Let `G` be a complete nonarchimedean additive abelian group, and let `f : α → G` be a
function that tends to zero on the filter of cofinite sets. Then `f` is unconditionally summable."]
theorem multipliable_of_tendsto_cofinite_one [CompleteSpace G] {f : α → G}
    (hf : Tendsto f cofinite (𝓝 1)) : Multipliable f

(hf : Filter.Tendsto f Filter.cofinite (𝓝 1))


theorem coe_nsmul : ∀ (n : ℕ) (K : ConvexBody V), ↑(n • K) = n • (K : Set V)

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
[ContinuousAdd V]
(n : ℕ)
(K : ConvexBody V)


theorem coe_sumPiEquivProdPi (α : δ ⊕ δ' → Type*) [∀ i, MeasurableSpace (α i)] :
    ⇑(MeasurableEquiv.sumPiEquivProdPi α) = Equiv.sumPiEquivProdPi α

{δ : Type u_4}
{δ' : Type u_5}
(α : δ ⊕ δ' → Type u_8)
[(i : δ ⊕ δ') → MeasurableSpace (α i)]

⇑(MeasurableEquiv.sumPiEquivProdPi α) = ⇑(Equiv.sumPiEquivProdPi α)


lemma closure_sInter_eq_biInter_closure_of_sUnion_indep (Is : Set (Set α)) (hIs : Is.Nonempty)
    (h : M.Indep (⋃₀ Is)) :  M.closure (⋂₀ Is) = (⋂ I ∈ Is, M.closure I)

{α : Type u_2}
{M : Matroid α}
(Is : Set (Set α))
(hIs : Is.Nonempty)
(h : M.Indep (⋃₀ Is))

M.closure (⋂₀ Is) = ⋂ I ∈ Is, M.closure I


theorem Function.Injective.preimage_pullbackDiagonal {f : X → Y} {g : Z → X} (inj : g.Injective) :
    mapPullback g id g (by rfl) (by rfl) ⁻¹' pullbackDiagonal f = pullbackDiagonal (f ∘ g)

{X : Type u_2}
{Y : Sort u_3}
{Z : Type u_1}
{f : X → Y}
{g : Z → X}
(inj : Function.Injective g)

Function.mapPullback g id g ⋯ ⋯ ⁻¹' Function.pullbackDiagonal f = Function.pullbackDiagonal (f ∘ g)


/-- If we dilate a convex set about a point in its interior by a scale `t > 1`, the interior of
the result includes the closure of the original set.

TODO Generalise this from convex sets to sets that are balanced / star-shaped about `x`. -/
theorem Convex.subset_interior_image_homothety_of_one_lt {s : Set E} (hs : Convex ℝ s) {x : E}
    (hx : x ∈ interior s) (t : ℝ) (ht : 1 < t) : s ⊆ interior (homothety x t '' s)

{E : Type u_3}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
{s : Set E}
(hs : Convex ℝ s)
{x : E}
(hx : x ∈ interior s)
(t : ℝ)
(ht : 1 < t)

s ⊆ interior (⇑(AffineMap.homothety x t) '' s)


@[fun_prop]
theorem DifferentiableOn.continuousMultilinear_apply_const (hc : DifferentiableOn 𝕜 c s)
    (u : ∀ i, M i) : DifferentiableOn 𝕜 (fun y ↦ (c y) u) s

{c : E → ContinuousMultilinearMap 𝕜 M H}


@[simp]
theorem coe_algebraMap {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    ⇑(algebraMap k (MonoidAlgebra A G)) = single 1 ∘ algebraMap k A

{k : Type u₁}
{G : Type u₂}
{A : Type u_3}
[CommSemiring k]
[Semiring A]
[Algebra k A]
[Monoid G]

⇑(algebraMap k (MonoidAlgebra A G)) = MonoidAlgebra.single 1 ∘ ⇑(algebraMap k A)


theorem modEq_iff_not_forall_mem_Ioo_mod :
    a ≡ b [PMOD p] ↔ ∀ z : ℤ, b - z • p ∉ Set.Ioo a (a + p)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
{a b : α}

a ≡ b [PMOD p] ↔ ∀ (z : ℤ), b - z • p ∉ Set.Ioo a (a + p)


/-- Algebraically closed fields are `S`-cyclotomic extensions over themselves if
`NeZero ((a : ℕ) : K))` for all `a ∈ S`. -/
theorem IsAlgClosed.isCyclotomicExtension (h : ∀ a ∈ S, NeZero ((a : ℕ) : K)) :
    IsCyclotomicExtension S K K

(S : Set ℕ+)
(K : Type w)
[Field K]
[IsAlgClosed K]
(h : ∀ a ∈ S, NeZero ↑↑a)


theorem mem_roots_sub_C' {p : R[X]} {a x : R} : x ∈ (p - C a).roots ↔ p ≠ C a ∧ p.eval x = a

{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
{a x : R}

x ∈ (p - Polynomial.C a).roots ↔ p ≠ Polynomial.C a ∧ Polynomial.eval x p = a


theorem ascPochhammer_eval₂ (f : S →+* T) (n : ℕ) (t : T) :
    (ascPochhammer T n).eval t = (ascPochhammer S n).eval₂ f t

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

Polynomial.eval t (ascPochhammer T n) = Polynomial.eval₂ f t (ascPochhammer S n)


theorem nth_injective (hf : (setOf p).Infinite) : Function.Injective (nth p)

{p : ℕ → Prop}
(hf : (setOf p).Infinite)


/-- See also `Module.Finite.exists_fin'`. -/
theorem exists_fin [Finite R M] : ∃ (n : ℕ) (s : Fin n → M), Submodule.span R (range s) = ⊤

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module.Finite R M]

∃ n s, Submodule.span R (Set.range s) = ⊤


/-- A set is a neighborhood of `a` if and only if it contains an interval `(l, u)` containing `a`.
-/
theorem mem_nhds_iff_exists_Ioo_subset [OrderTopology α] [NoMaxOrder α] [NoMinOrder α] {a : α}
    {s : Set α} : s ∈ 𝓝 a ↔ ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ s

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMaxOrder α]
[NoMinOrder α]
{a : α}
{s : Set α}

s ∈ 𝓝 a ↔ ∃ l u, a ∈ Set.Ioo l u ∧ Set.Ioo l u ⊆ s


/-- If `x ≠ y` belong to the same closed ball, then a convex combination of `x` and `y` with
positive coefficients belongs to the corresponding open ball. -/
theorem combo_mem_ball_of_ne (hx : x ∈ closedBall z r) (hy : y ∈ closedBall z r) (hne : x ≠ y)
    (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) : a • x + b • y ∈ ball z r

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[StrictConvexSpace ℝ E]
{x y z : E}
{a b r : ℝ}
(hx : x ∈ Metric.closedBall z r)
(hy : y ∈ Metric.closedBall z r)
(hne : x ≠ y)
(ha : 0 < a)
(hb : 0 < b)
(hab : a + b = 1)


theorem hasSum_re {f : α → ℂ} {x : ℂ} (h : HasSum f x) : HasSum (fun x => (f x).re) x.re

{α : Type u_1}
{f : α → ℂ}
{x : ℂ}
(h : HasSum f x)


theorem AddSubgroup.fg_iff_mul_fg (P : AddSubgroup H) : P.FG ↔ P.toSubgroup.FG

{H : Type u_4}
[AddGroup H]
(P : AddSubgroup H)


theorem degree_compl [Fintype (Gᶜ.neighborSet v)] [Fintype V] :
    Gᶜ.degree v = Fintype.card V - 1 - G.degree v

{V : Type u_1}
(G : SimpleGraph V)
(v : V)
[Fintype ↑(G.neighborSet v)]
[Fintype ↑(Gᶜ.neighborSet v)]
[Fintype V]


@[simp]
theorem zero_geom_sum : ∀ {n}, ∑ i ∈ range n, (0 : α) ^ i = if n = 0 then 0 else 1

∑ i ∈ Finset.range n, 0 ^ i = if n = 0 then 0 else 1


@[to_additive]
theorem prod_subtype_mul_prod_subtype {α β : Type*} [Fintype α] [CommMonoid β] (p : α → Prop)
    (f : α → β) [DecidablePred p] :
    (∏ i : { x // p x }, f i) * ∏ i : { x // ¬p x }, f i = ∏ i, f i

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

(∏ i : { x // p x }, f ↑i) * ∏ i : { x // ¬p x }, f ↑i = ∏ i : α, f i


/-- If `E / F` is a separable extension, then its separable degree is equal to its degree.
When `E / F` is infinite, it means that `Field.Emb F E` has infinitely many elements.
(But the cardinality of `Field.Emb F E` is not equal to `Module.rank F E` in general!) -/
theorem finSepDegree_eq_finrank_of_isSeparable [Algebra.IsSeparable F E] :
    finSepDegree F E = finrank F E

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

Field.finSepDegree F E = FiniteDimensional.finrank F E


/-- The first theorem that characterises the function `reduce`: a word reduces to its maximal
  reduction. -/
@[to_additive "The first theorem that characterises the function `reduce`: a word reduces to its
  maximal reduction."]
theorem reduce.red : Red L (reduce L)

{α : Type u}
{L : List (α × Bool)}
[DecidableEq α]

FreeAddGroup.Red L (FreeAddGroup.reduce L)


theorem unbounded_of_tendsto_atBot [Nonempty α] [SemilatticeSup α] [Preorder β] [NoMinOrder β]
    {f : α → β} (h : Tendsto f atTop atBot) : ¬BddBelow (range f)

(h : Filter.Tendsto f Filter.atTop Filter.atBot)


/-- The topological space `Π i, Y i` can be split as a product by separating the indices in ι
  depending on whether they satisfy a predicate p or not. -/
@[simps!]
def piEquivPiSubtypeProd (p : ι → Prop) (Y : ι → Type*) [∀ i, TopologicalSpace (Y i)]
    [DecidablePred p] : (∀ i, Y i) ≃ₜ (∀ i : { x // p x }, Y i) × ∀ i : { x // ¬p x }, Y i

(Homeomorph.piEquivPiSubtypeProd p Y).symm f x = if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩


/-- A multiplicative equivalence of groups preserves inversion. -/
@[to_additive "An additive equivalence of additive groups preserves negation."]
protected theorem map_inv [Group G] [DivisionMonoid H] (h : G ≃* H) (x : G) :
    h x⁻¹ = (h x)⁻¹

{G : Type u_10}
{H : Type u_11}
[AddGroup G]
[SubtractionMonoid H]
(h : G ≃+ H)
(x : G)


theorem factors_normalizedMooreComplex_PInfty (n : ℕ) :
    Subobject.Factors (NormalizedMooreComplex.objX X n) (PInfty.f n)

{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
[CategoryTheory.Abelian A]
{X : CategoryTheory.SimplicialObject A}
(n : ℕ)

(AlgebraicTopology.NormalizedMooreComplex.objX X n).Factors (AlgebraicTopology.DoldKan.PInfty.f n)


/-- A ray does not equal its own negation. -/
theorem ne_neg_self [NoZeroSMulDivisors R M] (x : Module.Ray R M) : x ≠ -x

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(x : Module.Ray R M)


protected theorem floor_def {q : ℚ} : ⌊q⌋ = q.num / q.den


theorem Ico_filter_le_of_le_left [DecidablePred (c ≤ ·)] (hca : c ≤ a) :
    ((Ico a b).filter fun x => c ≤ x) = Ico a b

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

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


lemma zmultiplesHom_symm_apply (f : ℤ →+ β) : (zmultiplesHom β).symm f = f 1

(β : Type u_4)
[AddGroup β]
(f : ℤ →+ β)


theorem lookupAll_sublist (a : α) : ∀ l : List (Sigma β), (lookupAll a l).map (Sigma.mk a) <+ l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(l : List (Sigma β))

(List.map (Sigma.mk a) (List.lookupAll a l)).Sublist l


theorem moebius_apply_isPrimePow_not_prime {n : ℕ} (hn : IsPrimePow n) (hn' : ¬n.Prime) :
    μ n = 0

{n : ℕ}
(hn : IsPrimePow n)
(hn' : ¬Nat.Prime n)


theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n

{α : Type u_1}
[DivisionSemiring α]
[CharZero α]
{m n d : ℕ}
(hn : d ∣ n)
(hm : d ∣ m)


lemma closure_iUnion (f : ι → Set α) : closure (⋃ i, f i) = ⋃ i, closure (f i)

{ι : Sort u_1}
{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]
(f : ι → Set α)


/-- Constructs a partial function isomorphism between types from an equivalence between them. -/
@[simps]
def Iso.mk {α β : PartialFun.{u}} (e : α ≃ β) : α ≅ β

(PartialFun.Iso.mk e).hom x = ↑(some (e x))


theorem Function.Injective.isLieAbelian {R : Type u} {L₁ : Type v} {L₂ : Type w} [CommRing R]
    [LieRing L₁] [LieRing L₂] [LieAlgebra R L₁] [LieAlgebra R L₂] {f : L₁ →ₗ⁅R⁆ L₂}
    (h₁ : Function.Injective f) (_ : IsLieAbelian L₂) : IsLieAbelian L₁

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


theorem commProb_pos [h : Nonempty M] : 0 < commProb M

(M : Type u_1)
[Mul M]
[Finite M]
[h : Nonempty M]


@[simp]
theorem comp_f {X Y Z : Center C} (f : X ⟶ Y) (g : Y ⟶ Z) : (f ≫ g).f = f.f ≫ g.f

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


protected theorem IsCycle.isCycleOn (hf : f.IsCycle) : f.IsCycleOn { x | f x ≠ x }

{α : Type u_2}
{f : Equiv.Perm α}
(hf : f.IsCycle)


theorem integrable_smul_const {f : α → 𝕜} {c : E} (hc : c ≠ 0) :
    Integrable (fun x => f x • c) μ ↔ Integrable f μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
{E : Type u_6}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : α → 𝕜}
{c : E}
(hc : c ≠ 0)

MeasureTheory.Integrable (fun x => f x • c) μ ↔ MeasureTheory.Integrable f μ


lemma coe_toContinuousMapHom [StarRing R] [ContinuousStar R] :
    ⇑(toContinuousMapHom (X := X) (R := R)) = (↑)

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[TopologicalSpace R]
[CommSemiring R]
[TopologicalSemiring R]
[StarRing R]
[ContinuousStar R]


theorem _root_.stronglyMeasurable_const_smul_iff {m : MeasurableSpace α} (c : G) :
    (StronglyMeasurable fun x => c • f x) ↔ StronglyMeasurable f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{G : Type u_6}
[TopologicalSpace β]
[Group G]
[MulAction G β]
[ContinuousConstSMul G β]
{m : MeasurableSpace α}
(c : G)

(MeasureTheory.StronglyMeasurable fun x => c • f x) ↔ MeasureTheory.StronglyMeasurable f


@[simp]
theorem map_comp_ιMulti {n : ℕ} (f : M →ₗ[R] N) :
    (map f).toLinearMap.compAlternatingMap (ιMulti R n (M := M)) =
    (ιMulti R n (M := N)).compLinearMap f

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{N : Type u4}
[AddCommGroup N]
[Module R N]
{n : ℕ}
(f : M →ₗ[R] N)

(ExteriorAlgebra.map f).toLinearMap.compAlternatingMap (ExteriorAlgebra.ιMulti R n) =
  (ExteriorAlgebra.ιMulti R n).compLinearMap f


theorem jointly_surjective (k : K) {t : Cocone F} (h : IsColimit t) (x : t.pt.obj k) :
    ∃ j y, x = (t.ι.app j).app k y

(F : CategoryTheory.Functor J (CategoryTheory.Functor K TypeMax))


theorem IsOpen.inter (s t : Set α) : IsOpen α s → IsOpen α t → IsOpen α (s ∩ t)

(α : Type u)
[OmegaCompletePartialOrder α]
(s t : Set α)

Scott.IsOpen α s → Scott.IsOpen α t → Scott.IsOpen α (s ∩ t)


theorem map [MeasureSpace β] (h : v ≪ᵥ w) (f : α → β) : v.map f ≪ᵥ w.map f

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{v : MeasureTheory.VectorMeasure α M}
{w : MeasureTheory.VectorMeasure α N}
[MeasureTheory.MeasureSpace β]
(h : v ≪ᵥ w)
(f : α → β)


theorem le_of_lt_add_one {n m : Nat} : n < m + 1 → n ≤ m


lemma IsUnramifiedAtInfinitePlaces.bot [h₁ : IsUnramifiedAtInfinitePlaces k F]
    [Algebra.IsAlgebraic K F] :
    IsUnramifiedAtInfinitePlaces k K

(k : Type u_1)
[Field k]
(K : Type u_2)
[Field K]
(F : Type u_3)
[Field F]
[Algebra k K]
[Algebra k F]
[Algebra K F]
[IsScalarTower k K F]
[h₁ : IsUnramifiedAtInfinitePlaces k F]
[Algebra.IsAlgebraic K F]


/-- **Darboux's theorem**: the image of a `Set.OrdConnected` set under `f'` is a `Set.OrdConnected`
set, `derivWithin` version. -/
theorem Set.OrdConnected.image_derivWithin {s : Set ℝ} (hs : OrdConnected s)
    (hf : DifferentiableOn ℝ f s) : OrdConnected (derivWithin f s '' s)

{f : ℝ → ℝ}
{s : Set ℝ}
(hs : s.OrdConnected)
(hf : DifferentiableOn ℝ f s)


@[to_additive (attr := norm_cast, simp)]
theorem coe_one [One β] : ⇑(1 : C(α, β)) = 1

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]


lemma tendsto_eLpNorm_one_restrict_densityProcess_limitProcess [IsFiniteKernel ν]
    (hκν : fst κ ≤ ν) (a : α) {s : Set β} (hs : MeasurableSet s) (A : Set γ) :
    Tendsto (fun n ↦ eLpNorm ((fun x ↦ densityProcess κ ν n a x s)
      - (countableFiltration γ).limitProcess (fun n x ↦ densityProcess κ ν n a x s) (ν a))
      1 ((ν a).restrict A)) atTop (𝓝 0)

{κ : ProbabilityTheory.Kernel α (γ × β)}

Filter.Tendsto
  (fun n =>
    MeasureTheory.eLpNorm
      ((fun x => κ.densityProcess ν n a x s) -
        MeasureTheory.Filtration.limitProcess (fun n x => κ.densityProcess ν n a x s)
          (ProbabilityTheory.countableFiltration γ) (ν a))
      1 ((ν a).restrict A))
  Filter.atTop (𝓝 0)


@[simp]
theorem map_comp_includeLeft (f : A →ₐ[S] B) (g : C →ₐ[R] D) :
    (map f g).comp includeLeft = includeLeft.comp f

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
[Semiring C]
[Algebra R C]
[Semiring D]
[Algebra R D]
(f : A →ₐ[S] B)
(g : C →ₐ[R] D)

(Algebra.TensorProduct.map f g).comp Algebra.TensorProduct.includeLeft = Algebra.TensorProduct.includeLeft.comp f


theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
    (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (f · b) s) (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
    EMetric.diam (Set.image2 f s t) ≤ ↑K₁ * EMetric.diam s + ↑K₂ * EMetric.diam t

(f : α → β → γ)

(hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun x => f x b) s)


@[simp]
theorem ofDirectSum_toDirectSum (x : TensorAlgebra R M) :
    ofDirectSum (TensorAlgebra.toDirectSum x) = x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(x : TensorAlgebra R M)

TensorAlgebra.ofDirectSum (TensorAlgebra.toDirectSum x) = x


theorem ContMDiff.prod_map (hf : ContMDiff I I' n f) (hg : ContMDiff J J' n g) :
    ContMDiff (I.prod J) (I'.prod J') n (Prod.map 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]
{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']
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{f : M → M'}
{n : ℕ∞}
{g : N → N'}
(hf : ContMDiff I I' n f)
(hg : ContMDiff J J' n g)


theorem edist_nearestPt_le (e : ℕ → α) (x : α) {k N : ℕ} (hk : k ≤ N) :
    edist (nearestPt e N x) x ≤ edist (e k) x

{α : Type u_1}
[MeasurableSpace α]
[PseudoEMetricSpace α]
[OpensMeasurableSpace α]
(e : ℕ → α)
(x : α)
{k N : ℕ}
(hk : k ≤ N)

edist (↑(MeasureTheory.SimpleFunc.nearestPt e N) x) x ≤ edist (e k) x


/-- A simple function is measurable -/
@[measurability]
protected theorem measurable [MeasurableSpace β] (f : α →ₛ β) : Measurable f

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


protected theorem Equiv.comm {x y} : Equiv x y ↔ Equiv y x


/-- If `μ` is a locally finite measure on `ℝⁿ`, then `fun J ↦ (μ J).toReal` is a box-additive
function. -/
@[simps]
def toBoxAdditive [Finite ι] (μ : Measure (ι → ℝ)) [IsLocallyFiniteMeasure μ] : ι →ᵇᵃ[⊤] ℝ


@[simp]
theorem ofNat_lt_cast : (no_index (OfNat.ofNat m : α)) < n ↔ (OfNat.ofNat m : ℕ) < n

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


theorem IsQF.liftAt {k m : ℕ} (h : IsQF φ) : (φ.liftAt k m).IsQF

{L : FirstOrder.Language}
{α : Type u'}
{l : ℕ}
{φ : L.BoundedFormula α l}
{k m : ℕ}
(h : φ.IsQF)

(FirstOrder.Language.BoundedFormula.liftAt k m φ).IsQF


theorem isJacobson_iso (e : R ≃+* S) : IsJacobson R ↔ IsJacobson S

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
(e : R ≃+* S)


/-- Given a short exact complex `S` in `C` that is short exact (`hS`), this is the
canonical isomorphism between the triangle `hS.singleTriangle` in the derived category
and the triangle attached to the corresponding short exact sequence of cochain complexes
after the application of the single functor. -/
@[simps!]
noncomputable def singleTriangleIso :
    hS.singleTriangle ≅
      triangleOfSES (hS.map_of_exact (HomologicalComplex.single C (ComplexShape.up ℤ) 0))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)

hS.singleTriangleIso.inv.hom₃ = ((DerivedCategory.singleFunctorsPostcompQIso C).inv.hom 0).app S.X₃


@[simp]
lemma toPresheaf_map_app {P Q : PresheafOfModules R}
    (f : P ⟶ Q) (X : Cᵒᵖ) :
    ((toPresheaf R).map f).app X = (f.app X).toAddMonoidHom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
{P Q : PresheafOfModules R}
(f : P ⟶ Q)
(X : Cᵒᵖ)

((PresheafOfModules.toPresheaf R).map f).app X = (PresheafOfModules.Hom.app f X).toAddMonoidHom


theorem CPolynomialOn.congr' {s : Set E} (hf : CPolynomialOn 𝕜 f s) (hg : f =ᶠ[𝓝ˢ s] g) :
    CPolynomialOn 𝕜 g s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{s : Set E}
(hf : CPolynomialOn 𝕜 f s)
(hg : f =ᶠ[𝓝ˢ s] g)


theorem cof_le (r : α → α → Prop) {S : Set α} (h : ∀ a, ∃ b ∈ S, r a b) : cof r ≤ #S

{α : Type u_1}
(r : α → α → Prop)
{S : Set α}
(h : ∀ (a : α), ∃ b ∈ S, r a b)


lemma hasRightExtension_iff_of_iso₁ : HasRightKanExtension L F ↔ HasRightKanExtension L' F

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

L.HasRightKanExtension F ↔ L'.HasRightKanExtension F


theorem smul_sSup {R} [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] (s : Set ℝ≥0∞) (c : R) :
    c • sSup s = ⨆ i ∈ s, c • i

{R : Type u_4}
[SMul R ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
(s : Set ℝ≥0∞)
(c : R)


@[to_additive]
theorem continuousMul_induced {M N F : Type*} [Mul M] [Mul N] [FunLike F M N] [MulHomClass F M N]
    [TopologicalSpace N] [ContinuousMul N] (f : F) : @ContinuousMul M (induced f ‹_›) _

{M : Type u_6}
{N : Type u_7}
{F : Type u_8}
[Mul M]
[Mul N]
[FunLike F M N]
[MulHomClass F M N]
[TopologicalSpace N]
[ContinuousMul N]
(f : F)


theorem le_pullback_bind (S : Presieve X) (R : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, S f → Sieve Y) (f : Y ⟶ X)
    (h : S f) : R h ≤ (bind S R).pullback f

(R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → CategoryTheory.Sieve Y)

R h ≤ CategoryTheory.Sieve.pullback f (CategoryTheory.Sieve.bind S R)


@[simp]
theorem baseChange_sub : (f - g).baseChange A = f.baseChange A - g.baseChange A

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[Ring A]
[Algebra R A]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(f g : M →ₗ[R] N)

LinearMap.baseChange A (f - g) = LinearMap.baseChange A f - LinearMap.baseChange A g


@[simp]
theorem gcd_zero_left (i : ℤ) : gcd 0 i = natAbs i


@[simp]
theorem lcoeff_apply (n : ℕ) (f : R[X]) : lcoeff R n f = coeff f n

{R : Type u}
[Semiring R]
(n : ℕ)
(f : R[X])


theorem HasDerivAtFilter.sum (h : ∀ i ∈ u, HasDerivAtFilter (A i) (A' i) x L) :
    HasDerivAtFilter (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) x L


/-- If the algebra map `R →+* A` is injective then `A` has the same exponential characteristic
as `R`. -/
theorem expChar_of_injective_algebraMap {R A : Type*}
    [CommSemiring R] [Semiring A] [Algebra R A] (h : Function.Injective (algebraMap R A))
    (q : ℕ) [ExpChar R q] : ExpChar A q

(h : Function.Injective ⇑(algebraMap R A))


/-- `SignType.sign` respects strictly monotone zero-preserving maps. -/
lemma StrictMono.sign_comp {β F : Type*} [Zero β] [Preorder β] [DecidableRel ((· < ·) : β → β → _)]
    [FunLike F α β] [ZeroHomClass F α β] {f : F} (hf : StrictMono f) (a : α) :
    sign (f a) = sign a

{α : Type u_1}
[Zero α]
[LinearOrder α]
{β : Type u_2}
{F : Type u_3}
[Zero β]
[Preorder β]
[DecidableRel fun x x_1 => x < x_1]
[FunLike F α β]
[ZeroHomClass F α β]
{f : F}
(hf : StrictMono ⇑f)
(a : α)


lemma pow_lt_pow_iff_left (ha : 0 ≤ a) (hb : 0 ≤ b) (hn : n ≠ 0) : a ^ n < b ^ n ↔ a < b

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
{n : ℕ}
(ha : 0 ≤ a)
(hb : 0 ≤ b)
(hn : n ≠ 0)


/-- Multiplying `a⁻¹` by `a` twice results in `a` (whether or not `a`
is zero). -/
@[simp]
theorem inv_mul_mul_self (a : G₀) : a⁻¹ * a * a = a

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


lemma coborder_eq_compl_frontier_iff :
    coborder s = (frontier s)ᶜ ↔ IsOpen s

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


theorem t1Space_iff_disjoint_nhds_pure : T1Space X ↔ ∀ ⦃x y : X⦄, x ≠ y → Disjoint (𝓝 x) (pure y)


@[to_additive]
theorem image_smul_distrib [MulOneClass α] [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β]
    (f : F) (a : α) (s : Set α) :
    f '' (a • s) = f a • f '' s

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[MulOneClass α]
[MulOneClass β]
[FunLike F α β]
[MonoidHomClass F α β]
(f : F)
(a : α)
(s : Set α)


theorem thickenedIndicatorAux_le_one (δ : ℝ) (E : Set α) (x : α) :
    thickenedIndicatorAux δ E x ≤ 1

{α : Type u_1}
[PseudoEMetricSpace α]
(δ : ℝ)
(E : Set α)
(x : α)


theorem eventualRange_eq_iff {f : i ⟶ j} :
    F.eventualRange j = range (F.map f) ↔
      ∀ ⦃k⦄ (g : k ⟶ i), range (F.map f) ⊆ range (F.map <| g ≫ f)

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
{i j : J}
[CategoryTheory.IsCofilteredOrEmpty J]
{f : i ⟶ j}

F.eventualRange j = Set.range (F.map f) ↔ ∀ ⦃k : J⦄ (g : k ⟶ i), Set.range (F.map f) ⊆ Set.range (F.map (g ≫ f))


@[to_additive (attr := simp, norm_cast)]
theorem coe_sInf (H : Set (Subgroup G)) : ((sInf H : Subgroup G) : Set G) = ⋂ s ∈ H, ↑s

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


@[gcongr]
theorem factors_mono : ∀ {a b : Associates α}, a ≤ b → a.factors ≤ b.factors

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a b : Associates α}


/-- An upper bound on `n.factorization p` -/
theorem factorization_le_of_le_pow {n p b : ℕ} (hb : n ≤ p ^ b) : n.factorization p ≤ b


@[aesop unsafe 5% (rule_sets := [Matroid])]
private theorem inter_left_subset_ground (hX : X ⊆ M.E) :
    Y ∩ X ⊆ M.E

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


theorem List.eq_of_length_one (x : List α) (w : x.length = 1) :
    have : 0 < x.length := lt_of_lt_of_eq Nat.zero_lt_one w.symm
    x = [x[0]]

{α : Type u_1}
(x : List α)
(w : x.length = 1)


@[simp] theorem if_true_right  (p : Prop) [h : Decidable p] (t : Bool) :
    (ite p t true) = (!(p : Bool) || t)

(if p then t else true) = (!decide p || t)


lemma next_π₁ {i₁ i₁' : I₁} (h : c₁.Rel i₁ i₁') (i₂ : I₂) :
    c₁₂.next (π c₁ c₂ c₁₂ ⟨i₁, i₂⟩) = π c₁ c₂ c₁₂ ⟨i₁', i₂⟩

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
{c₁ : ComplexShape I₁}
(c₂ : ComplexShape I₂)
(c₁₂ : ComplexShape I₁₂)
[TotalComplexShape c₁ c₂ c₁₂]
{i₁ i₁' : I₁}
(h : c₁.Rel i₁ i₁')
(i₂ : I₂)

c₁₂.next (c₁.π c₂ c₁₂ (i₁, i₂)) = c₁.π c₂ c₁₂ (i₁', i₂)


theorem wPathCasesOn_eta {α : TypeVec n} {a : P.A} {f : P.last.B a → P.last.W}
    (h : P.WPath ⟨a, f⟩ ⟹ α) : P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) = h

(h : TypeVec.Arrow (P.WPath (WType.mk a f)) α)


theorem IsNat.raw_refl (n : ℕ) : IsNat n n


@[simp]
theorem Tape.move_right_mk' {Γ} [Inhabited Γ] (L R : ListBlank Γ) :
    (Tape.mk' L R).move Dir.right = Tape.mk' (L.cons R.head) R.tail

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

Turing.Tape.move Turing.Dir.right (Turing.Tape.mk' L R) = Turing.Tape.mk' (Turing.ListBlank.cons R.head L) R.tail


theorem eLpNorm_eq [NormedAddCommGroup γ] [OpensMeasurableSpace γ] (h : IdentDistrib f g μ ν)
    (p : ℝ≥0∞) : eLpNorm f p μ = eLpNorm g p ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

MeasureTheory.eLpNorm f p μ = MeasureTheory.eLpNorm g p ν


lemma comp (hf : InvOn f' f s t) (hg : InvOn g' g t p) (fst : MapsTo f s t)
    (g'pt : MapsTo g' p t) :
    InvOn (f' ∘ g') (g ∘ f) s p

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


theorem natAbs_valMinAbs_add_le {n : ℕ} (a b : ZMod n) :
    (a + b).valMinAbs.natAbs ≤ (a.valMinAbs + b.valMinAbs).natAbs


@[simp]
theorem map_left (g : N ⋊[φ] G) : (map f₁ f₂ h g).left = f₁ g.left

(h : ∀ (g : G), f₁.comp (MulEquiv.toMonoidHom (φ g)) = (MulEquiv.toMonoidHom (φ₁ (f₂ g))).comp f₁)

((SemidirectProduct.map f₁ f₂ h) g).left = f₁ g.left


@[simp]
theorem Quaternion.equivTuple_apply (R : Type*) [One R] [Neg R] (x : ℍ[R]) :
    Quaternion.equivTuple R x = ![x.re, x.imI, x.imJ, x.imK]

(R : Type u_1)
[One R]
[Neg R]
(x : ℍ[R])

(Quaternion.equivTuple R) x = ![x.re, x.imI, x.imJ, x.imK]


/-- Taking sub-families preserves equicontinuity on a subset. -/
theorem EquicontinuousOn.comp {F : ι → X → α} {S : Set X} (h : EquicontinuousOn F S) (u : κ → ι) :
    EquicontinuousOn (F ∘ u) S

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
{S : Set X}
(h : EquicontinuousOn F S)
(u : κ → ι)


theorem false_eq_true_eq_False : ¬false = true


@[simp]
theorem inv_comp [IsIso f] [IsIso h] : inv (f ≫ h) = inv h ≫ inv f

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

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


@[simp, norm_cast]
theorem coe_coe (f : A →A[R] B) : ⇑(f : A →ₐ[R] B) = 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]
(f : A →A[R] B)


@[reassoc, simp]
theorem whiskerLeft_rightUnitor (f : a ⟶ b) (g : b ⟶ c) :
    f ◁ (ρ_ g).hom = (α_ f g (𝟙 c)).inv ≫ (ρ_ (f ≫ g)).hom

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c : B}
(f : a ⟶ b)
(g : b ⟶ c)

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.rightUnitor g).hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.id c)).inv
    (CategoryTheory.Bicategory.rightUnitor (CategoryTheory.CategoryStruct.comp f g)).hom


@[simp]
theorem preimage_sub_const_Ioc : (fun x => x - a) ⁻¹' Ioc b c = Ioc (b + a) (c + a)

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

(fun x => x - a) ⁻¹' Set.Ioc b c = Set.Ioc (b + a) (c + a)


@[to_additive (attr := simp, norm_cast)]
theorem coe_div [Div M] (f g : α → M) : ↑(f / g) = (f / g : Germ l M)

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
[Sub M]
(f g : α → M)


@[simp]
theorem mkSpanSingleton'_apply (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) (c : R) (h) :
    mkSpanSingleton' x y H ⟨c • x, h⟩ = c • y

(h : c • x ∈ (LinearPMap.mkSpanSingleton' x y H).domain)

↑(LinearPMap.mkSpanSingleton' x y H) ⟨c • x, h⟩ = c • y


/-- `CuspFormClass F Γ k` says that `F` is a type of bundled functions that extend
`SlashInvariantFormClass` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass (F : Type*) (Γ : outParam <| Subgroup (SL(2, ℤ))) (k : outParam ℤ)
    [FunLike F ℍ ℂ] extends SlashInvariantFormClass F Γ k : Prop where
  holo : ∀ f : F, MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (f : ℍ → ℂ)
  zero_at_infty : ∀ (f : F) (A : SL(2, ℤ)), IsZeroAtImInfty (f ∣[k] A)

{F : Type u_2}
{Γ : outParam (Subgroup SL(2, ℤ))}
{k : outParam ℤ}
[FunLike F ℍ ℂ]
[self : CuspFormClass F Γ k]
(f : F)
(A : SL(2, ℤ))

UpperHalfPlane.IsZeroAtImInfty (SlashAction.map ℂ k A ⇑f)


/-- Given two disjoint closed sets `s, t` in a Hausdorff normal σ-compact finite dimensional
manifold `M`, there exists a smooth function `f : M → [0,1]` that vanishes in a neighbourhood of `s`
and is equal to `1` in a neighbourhood of `t`. -/
theorem exists_smooth_zero_one_nhds_of_isClosed [T2Space M] [NormalSpace M] [SigmaCompactSpace M]
    {s t : Set M} (hs : IsClosed s) (ht : IsClosed t) (hd : Disjoint s t) :
    ∃ f : C^∞⟮I, M; 𝓘(ℝ), ℝ⟯, (∀ᶠ x in 𝓝ˢ s, f x = 0) ∧ (∀ᶠ x in 𝓝ˢ t, f x = 1) ∧
      ∀ x, f x ∈ Icc 0 1

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[T2Space M]
[NormalSpace M]
[SigmaCompactSpace M]
{s t : Set M}
(hs : IsClosed s)
(ht : IsClosed t)
(hd : Disjoint s t)

∃ f, (∀ᶠ (x : M) in 𝓝ˢ s, f x = 0) ∧ (∀ᶠ (x : M) in 𝓝ˢ t, f x = 1) ∧ ∀ (x : M), f x ∈ Set.Icc 0 1


theorem pi_eq_zero (f : ∀ i, M →L[R] φ i) : pi f = 0 ↔ ∀ i, f i = 0

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
{φ : ι → Type u_5}
[(i : ι) → TopologicalSpace (φ i)]
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M →L[R] φ i)

ContinuousLinearMap.pi f = 0 ↔ ∀ (i : ι), f i = 0


@[simp]
theorem single_eq_zero : single a b = 0 ↔ b = 0

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


@[to_additive (attr := simp)]
theorem Units.val_mkOfMulEqOne [CommMonoid α] {a b : α} (h : a * b = 1) :
    (Units.mkOfMulEqOne a b h : α) = a

{α : Type u}
[CommMonoid α]
{a b : α}
(h : a * b = 1)


private theorem mod_two_pow_succ (x i : Nat) :
    x % 2^(i+1) = 2^i*(x.testBit i).toNat + x % (2 ^ i)

x % 2 ^ (i + 1) = 2 ^ i * (x.testBit i).toNat + x % 2 ^ i


lemma StrictAnti.mapsTo_Ioo (h : StrictAnti f) : MapsTo f (Ioo a b) (Ioo (f b) (f a))

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

Set.MapsTo f (Set.Ioo a b) (Set.Ioo (f b) (f a))


/-- A family `𝓕 : ι → X → α` is equicontinuous iff the function `swap 𝓕 : X → ι → α` is
continuous *when `ι → α` is equipped with the topology of uniform convergence*. This is
very useful for developping the equicontinuity API, but it should not be used directly for other
purposes. -/
theorem equicontinuous_iff_continuous {F : ι → X → α} :
    Equicontinuous F ↔ Continuous (ofFun ∘ Function.swap F : X → ι →ᵤ α)

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}

Equicontinuous F ↔ Continuous (⇑UniformFun.ofFun ∘ Function.swap F)


@[to_additive]
theorem MonoidHom.toFun_eq_coe [MulOneClass M] [MulOneClass N] (f : M →* N) : f.toFun = f

{M : Type u_4}
{N : Type u_5}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)


@[to_additive]
theorem MonoidHom.coe_finsupp_prod [Zero β] [Monoid N] [CommMonoid P] (f : α →₀ β)
    (g : α → β → N →* P) : ⇑(f.prod g) = f.prod fun i fi => ⇑(g i fi)

{α : Type u_1}
{β : Type u_7}
{N : Type u_10}
{P : Type u_11}
[Zero β]
[Monoid N]
[CommMonoid P]
(f : α →₀ β)
(g : α → β → N →* P)


/-- A small family of surreals is bounded above. -/
lemma bddAbove_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Surreal.{u}) :
    BddAbove (Set.range f)

{ι : Type u_1}
[Small.{u, u_1} ι]
(f : ι → Surreal)


@[simp]
theorem smul_cons (g₁ g₂ : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    g₁ • cons g₂ u w h1 h2 = cons (g₁ * g₂) u w h1 h2

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

(h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ HNNExtension.toSubgroup A B u → u = u')

g₁ • HNNExtension.NormalWord.cons g₂ u w h1 h2 = HNNExtension.NormalWord.cons (g₁ * g₂) u w h1 h2


/-- Composing a `List.map` with another `List.map` is equal to
a single `List.map` of composed functions.
-/
@[simp]
theorem map_comp_map (g : β → γ) (f : α → β) : map g ∘ map f = map (g ∘ f)

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

List.map g ∘ List.map f = List.map (g ∘ f)


theorem kahler_map {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F]
    [hF : Fact (finrank ℝ F = 2)] (φ : E ≃ₗᵢ[ℝ] F) (x y : F) :
    (Orientation.map (Fin 2) φ.toLinearEquiv o).kahler x y = o.kahler (φ.symm x) (φ.symm y)

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

[hF : Fact (FiniteDimensional.finrank ℝ F = 2)]

(((Orientation.map (Fin 2) φ.toLinearEquiv) o).kahler x) y = (o.kahler (φ.symm x)) (φ.symm y)


theorem quasilinearOn_iff_mem_uIcc : QuasilinearOn 𝕜 s f ↔ Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
    y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ∈ uIcc (f x) (f y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrder β]
[SMul 𝕜 E]
{s : Set E}
{f : E → β}

QuasilinearOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄,
      x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ∈ Set.uIcc (f x) (f y)


@[simp]
theorem mapRange.addEquiv_symm (e : ∀ i, β₁ i ≃+ β₂ i) :
    (mapRange.addEquiv e).symm = mapRange.addEquiv fun i => (e i).symm

{ι : Type u}
{β₁ : ι → Type v₁}
{β₂ : ι → Type v₂}
[(i : ι) → AddZeroClass (β₁ i)]
[(i : ι) → AddZeroClass (β₂ i)]
(e : (i : ι) → β₁ i ≃+ β₂ i)

(DFinsupp.mapRange.addEquiv e).symm = DFinsupp.mapRange.addEquiv fun i => (e i).symm


/-- The cardinality of embeddings from an infinite type to a finite type is zero.
This is a re-statement of the pigeonhole principle. -/
theorem card_embedding_eq_of_infinite {α β : Type*} [Infinite α] [Fintype β] [Fintype (α ↪ β)] :
    ‖α ↪ β‖ = 0

{α : Type u_1}
{β : Type u_2}
[Infinite α]
[Fintype β]
[Fintype (α ↪ β)]


/-- The isomorphism between the short complex attached to
two isomorphic distinguished triangles. -/
@[simps!]
def shortComplexOfDistTriangleIsoOfIso {T T' : Triangle C} (e : T ≅ T') (hT : T ∈ distTriang C) :
    shortComplexOfDistTriangle T hT ≅ shortComplexOfDistTriangle T'
      (isomorphic_distinguished _ hT _ e.symm)

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

{T T' : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.Pretriangulated.shortComplexOfDistTriangleIsoOfIso e hT).hom.τ₃ = e.hom.hom₃


theorem elim_none_some (f : Option α → β) : (fun x ↦ Option.elim x (f none) (f ∘ some)) = f

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

(fun x => x.elim (f none) (f ∘ some)) = f


theorem sqrt_eq (q : ℚ) : Rat.sqrt (q * q) = |q|


/-- If `x` is in the base ring `K`, then the norm is `x ^ [L : K]`. -/
theorem norm_algebraMap_of_basis [Fintype ι] (b : Basis ι R S) (x : R) :
    norm R (algebraMap R S x) = x ^ Fintype.card ι

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{ι : Type w}
[Fintype ι]
(b : Basis ι R S)
(x : R)

(Algebra.norm R) ((algebraMap R S) x) = x ^ Fintype.card ι


/-- The seminorm controls the Schwartz estimate for any fixed `x`.

Variant for functions `𝓢(ℝ, F)`. -/
theorem le_seminorm' (k n : ℕ) (f : 𝓢(ℝ, F)) (x : ℝ) :
    |x| ^ k * ‖iteratedDeriv n f x‖ ≤ SchwartzMap.seminorm 𝕜 k n f

(𝕜 : Type u_1)
{F : Type u_5}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedField 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(k n : ℕ)
(f : SchwartzMap ℝ F)
(x : ℝ)

|x| ^ k * ‖iteratedDeriv n (⇑f) x‖ ≤ (SchwartzMap.seminorm 𝕜 k n) f


theorem Martingale.bddAbove_range_iff_bddBelow_range [IsFiniteMeasure μ] (hf : Martingale f ℱ μ)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) :
    ∀ᵐ ω ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)

{f : ℕ → Ω → ℝ}

(hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R)

∀ᵐ (ω : Ω) ∂μ, BddAbove (Set.range fun n => f n ω) ↔ BddBelow (Set.range fun n => f n ω)


@[simp] theorem modn_val (a : Fin n) (b : Nat) : (a.modn b).val = a.val % b


theorem iInf₂_mono {f g : ∀ i, κ i → α} (h : ∀ i j, f i j ≤ g i j) :
    ⨅ (i) (j), f i j ≤ ⨅ (i) (j), g i j

(h : ∀ (i : ι) (j : κ i), f i j ≤ g i j)


/-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ

∀ {X_1 Y : Xᵒᵖ} (f : X_1 ⟶ Y), (CategoryTheory.orderDualEquivalence X).inverse.map f = CategoryTheory.homOfLE ⋯


@[simp]
protected theorem lt_inf_iff (ha : a < ⊤) : a < s.inf f ↔ ∀ b ∈ s, a < f b

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
[OrderTop α]
{s : Finset ι}
{f : ι → α}
{a : α}
(ha : a < ⊤)


@[simp]
theorem isBoundedUnder_le_sup [SemilatticeSup α] {f : Filter β} {u v : β → α} :
    (f.IsBoundedUnder (· ≤ ·) fun a => u a ⊔ v a) ↔
      f.IsBoundedUnder (· ≤ ·) u ∧ f.IsBoundedUnder (· ≤ ·) v

{α : Type u_1}
{β : Type u_2}
[SemilatticeSup α]
{f : Filter β}
{u v : β → α}

(Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f fun a => u a ⊔ v a) ↔
  Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u ∧ Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f v


theorem antitone_mul_right [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    {a : α} (ha : a ≤ 0) : Antitone fun x => x * a

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

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


@[to_additive]
theorem mulEquivOfQuotient_symm_mk (x y) : (mulEquivOfQuotient f).symm (f.mk' x y) = mk x y

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

(AddLocalization.addEquivOfQuotient f).symm (f.mk' x y) = AddLocalization.mk x y


theorem comap_cobounded_le (hf : LipschitzWith K f) :
    comap f (Bornology.cobounded β) ≤ Bornology.cobounded α

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : LipschitzWith K f)

Filter.comap f (Bornology.cobounded β) ≤ Bornology.cobounded α


@[simp]
theorem le_sup_iff : a ≤ b ⊔ c ↔ a ≤ b ∨ a ≤ c

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


@[simp] theorem floor_ofNat (n : ℕ) [n.AtLeastTwo] : ⌊(no_index (OfNat.ofNat n : α))⌋ = n

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(n : ℕ)
[n.AtLeastTwo]


lemma sin_half_eq_neg_sqrt {x : ℝ} (hl : -(2 * π) ≤ x) (hr : x ≤ 0) :
    sin (x / 2) = -sqrt ((1 - cos x) / 2)

{x : ℝ}
(hl : -(2 * Real.pi) ≤ x)
(hr : x ≤ 0)

Real.sin (x / 2) = -√((1 - Real.cos x) / 2)


@[simp]
lemma UniformFun.ofFun_smul {M : Type*} [SMul M β] (c : M) (f : α → β) :
    ofFun (c • f) = c • ofFun f

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[SMul M β]
(c : M)
(f : α → β)

UniformFun.ofFun (c • f) = c • UniformFun.ofFun f


/--
The `Monad` typeclass only contains the operations of a monad.
`LawfulMonad` further asserts that these operations satisfy the laws of a monad,
including associativity and identity laws for `bind`:
```
pure x >>= f = f x
x >>= pure = x
x >>= f >>= g = x >>= (fun x => f x >>= g)
```

`LawfulMonad.mk'` is an alternative constructor containing useful defaults for many fields.
-/
class LawfulMonad (m : Type u → Type v) [Monad m] extends LawfulApplicative m : Prop where
  bind_pure_comp (f : α → β) (x : m α) : x >>= (fun a => pure (f a)) = f <$> x
  bind_map       {α β : Type u} (f : m (α → β)) (x : m α) : f >>= (. <$> x) = f <*> x
  pure_bind      (x : α) (f : α → m β) : pure x >>= f = f x
  bind_assoc     (x : m α) (f : α → m β) (g : β → m γ) : x >>= f >>= g = x >>= fun x => f x >>= g
  map_pure g x    := (by rw [← bind_pure_comp, pure_bind])
  seq_pure g x    := (by rw [← bind_map]; simp [map_pure, bind_pure_comp])
  seq_assoc x g h := (by simp [← bind_pure_comp, ← bind_map, bind_assoc, pure_bind])

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


/-- If a `NonUnitalStarSubalgebra` over a field does not contain `1`, then its unitization is
isomorphic to its `StarAlgebra.adjoin`. -/
@[simps! apply_coe]
noncomputable def unitizationStarAlgEquiv (h1 : (1 : A) ∉ s) :
    Unitization R s ≃⋆ₐ[R] StarAlgebra.adjoin R (s : Set A)

{R : Type u_1}
{S : Type u_2}
{A : Type u_3}
[Field R]
[StarRing R]
[Ring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[SetLike S A]
[hSA : NonUnitalSubringClass S A]
[hSRA : SMulMemClass S R A]
[StarMemClass S A]
(s : S)
(h1 : 1 ∉ s)
(a : Unitization R ↥s)

↑((NonUnitalStarSubalgebra.unitizationStarAlgEquiv s h1) a) = (algebraMap R A) a.fst + ↑a.snd


theorem IsMaxOn.comp_mono (hf : IsMaxOn f s a) {g : β → γ} (hg : Monotone g) :
    IsMaxOn (g ∘ f) s a

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


lemma coreflection_apply_coroot :
    P.coreflection i (P.coroot j) = P.coroot j - (P.pairing i j) • P.coroot i

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i j : ι)

(P.coreflection i) (P.coroot j) = P.coroot j - P.pairing i j • P.coroot i


/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p


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

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(f : M ≃+ N)


@[simp] lemma log_le_zero_iff {x : ℝ≥0∞} : log x ≤ 0 ↔ x ≤ 1


@[simp]
theorem RightExactFunctor.forget_obj (F : C ⥤ᵣ D) : (RightExactFunctor.forget C D).obj F = F.1

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

(CategoryTheory.RightExactFunctor.forget C D).obj F = F.obj


@[to_additive]
theorem haarContent_outerMeasure_self_pos (K₀ : PositiveCompacts G) :
    0 < (haarContent K₀).outerMeasure K₀

(K₀ : TopologicalSpace.PositiveCompacts G)

0 < (MeasureTheory.Measure.haar.haarContent K₀).outerMeasure ↑K₀


lemma exact₂ :
    (ShortComplex.mk ((homologyFunctor C n₀).map T.mor₁) ((homologyFunctor C n₀).map T.mor₂)
      (by simp only [← Functor.map_comp, comp_distTriang_mor_zero₁₂ _ hT,
        Functor.map_zero])).Exact

(T : CategoryTheory.Pretriangulated.Triangle (DerivedCategory C))

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.ShortComplex.mk ((DerivedCategory.homologyFunctor C n₀).map T.mor₁)
    ((DerivedCategory.homologyFunctor C n₀).map T.mor₂) ⋯).Exact


theorem iSup_const_mono (h : ι → ι') : ⨆ _ : ι, a ≤ ⨆ _ : ι', a

{α : Type u_1}
{ι : Sort u_5}
{ι' : Sort u_6}
[CompleteLattice α]
{a : α}
(h : ι → ι')


lemma IsIntegralCurveOn.of_union (h : IsIntegralCurveOn γ v s) (h' : IsIntegralCurveOn γ v s') :
    IsIntegralCurveOn γ v (s ∪ s')

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{s s' : Set ℝ}
(h : IsIntegralCurveOn γ v s)
(h' : IsIntegralCurveOn γ v s')


@[simps id comp]
instance : CategoryStruct (OplaxFunctor B C)

(B : Type u₁)
[CategoryTheory.Bicategory B]
(C : Type u₂)
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)

CategoryTheory.CategoryStruct.id F = CategoryTheory.OplaxNatTrans.id F


/-- The natural homeomorphism between nonzero elements of a normed space `E`
and `Metric.sphere (0 : E) 1 × Set.Ioi (0 : ℝ)`.

The forward map sends `⟨x, hx⟩` to `⟨‖x‖⁻¹ • x, ‖x‖⟩`,
the inverse map sends `(x, r)` to `r • x`.

One may think about it as generalization of polar coordinates to any normed space. -/
@[simps apply_fst_coe apply_snd_coe symm_apply_coe]
noncomputable def homeomorphUnitSphereProd :
    ({0}ᶜ : Set E) ≃ₜ (sphere (0 : E) 1 × Ioi (0 : ℝ))

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(x : ↑{0}ᶜ)

↑((homeomorphUnitSphereProd E) x).2 = ‖↑x‖


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

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
[TopologicalSemiring A]
[ContinuousStar A]
{s t : StarSubalgebra R A}
(h : s ≤ t)
(ht : IsClosed ↑t)


@[to_additive]
theorem closure_eq_top_of_mclosure_eq_top {S : Set G} (h : Submonoid.closure S = ⊤) :
    closure S = ⊤

{G : Type u_1}
[AddGroup G]
{S : Set G}
(h : AddSubmonoid.closure S = ⊤)


theorem ContDiffWithinAt.exp {n} (hf : ContDiffWithinAt ℝ n f s x) :
    ContDiffWithinAt ℝ n (fun x => Real.exp (f x)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
{n : ℕ∞}
(hf : ContDiffWithinAt ℝ n f s x)


theorem val_injective (n : ℕ) [NeZero n] : Function.Injective (val : ZMod n → ℕ)


@[to_additive]
theorem one_lt_of_lt_mul_right [ContravariantClass α α (· * ·) (· < ·)] {a b : α} (h : a < a * b) :
    1 < b

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


theorem pairwiseDisjoint_fiber (f : ι → α) (s : Set α) : s.PairwiseDisjoint fun a => f ⁻¹' {a}

{α : Type u_1}
{ι : Type u_4}
(f : ι → α)
(s : Set α)


theorem coe_ne_zero [Nontrivial α] {x : Ico (0 : α) 1} : (x : α) ≠ 0 ↔ x ≠ 0

{α : Type u_1}
[OrderedSemiring α]
[Nontrivial α]
{x : ↑(Set.Ico 0 1)}

↑x ≠ 0 ↔ x ≠ 0


theorem ne_zero [Nontrivial R] (i : ι) : x i ≠ 0

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
[Nontrivial R]
(i : ι)


@[to_additive]
theorem pow_count [DecidableEq α] (a : α) : a ^ s.count a = (s.filter (Eq a)).prod

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

Multiset.count a s • a = (Multiset.filter (Eq a) s).sum


@[simp]
theorem getLast?_eq_none : ∀ {l : List α}, getLast? l = none ↔ l = []


theorem algEquiv_symm_mk (x : R) (y : M) : (algEquiv M S).symm (mk' S x y) = mk x y

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(y : ↥M)

(Localization.algEquiv M S).symm (IsLocalization.mk' S x y) = Localization.mk x y


theorem isDirected_mono [IsDirected α r] (h : ∀ ⦃a b⦄, r a b → s a b) : IsDirected α s

{α : Type u}
{r : α → α → Prop}
(s : α → α → Prop)
[IsDirected α r]
(h : ∀ ⦃a b : α⦄, r a b → s a b)


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

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


theorem coe_biInf : (↑(⨅ i, ⨅ (_ : p i), f i) : α) = a ⊓ ⨅ i, ⨅ (_ : p i), (f i : α)

{ι : Sort u_1}
{α : Type u_2}
[CompleteLattice α]
{a : α}
(f : ι → ↑(Set.Iic a))
(p : ι → Prop)

↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)


@[simp] lemma norm_toMul (x) : ‖(toMul x : E)‖ = ‖x‖

{E : Type u_2}
[Norm E]
(x : Additive E)


protected theorem Sigma.eq {α : Type u} {β : α → Type v} : ∀ {p₁ p₂ : Σ a, β a} (h₁ : p₁.1 = p₂.1),
    (Eq.recOn h₁ p₁.2 : β p₂.1) = p₂.2 → p₁ = p₂

{α : Type u}
{β : α → Type v}
{p₁ p₂ : (a : α) × β a}
(h₁ : p₁.fst = p₂.fst)


theorem induced_topology_le_preorder [Preorder α] [Preorder β] [TopologicalSpace β]
    [OrderTopology β] {f : α → β} (hf : ∀ {x y}, f x < f y ↔ x < y) :
    induced f ‹TopologicalSpace β› ≤ Preorder.topology α

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : ∀ {x y : α}, f x < f y ↔ x < y)

TopologicalSpace.induced f inst✝ ≤ Preorder.topology α


/-- Given an open set `s` containing a closed set `t` in a finite-dimensional real manifold, there
exists a smooth function with support equal to `s`, taking values in `[0,1]`, and equal to `1`
exactly on `t`. -/
theorem exists_msmooth_support_eq_eq_one_iff
    {s t : Set M} (hs : IsOpen s) (ht : IsClosed t) (h : t ⊆ s) :
    ∃ f : M → ℝ, Smooth I 𝓘(ℝ) f ∧ range f ⊆ Icc 0 1 ∧ support f = s
      ∧ (∀ x, x ∈ t ↔ f x = 1)

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[SigmaCompactSpace M]
[T2Space M]
{s t : Set M}
(hs : IsOpen s)
(ht : IsClosed t)
(h : t ⊆ s)

∃ f, Smooth I 𝓘(ℝ, ℝ) f ∧ Set.range f ⊆ Set.Icc 0 1 ∧ Function.support f = s ∧ ∀ (x : M), x ∈ t ↔ f x = 1


theorem cons_self_properDivisors (h : n ≠ 0) :
    cons n (properDivisors n) properDivisors.not_self_mem = divisors n

Finset.cons n n.properDivisors ⋯ = n.divisors


theorem of_eq {f g : α → σ} (hf : Primrec f) (H : ∀ n, f n = g n) : Primrec g

{α : Type u_1}
{σ : Type u_3}
[Primcodable α]
[Primcodable σ]
{f g : α → σ}
(hf : Primrec f)
(H : ∀ (n : α), f n = g n)


/-- Similar to `pi`, but all functors come from the same category `A`
-/
@[simps]
def pi' (f : ∀ i, A ⥤ C i) : A ⥤ ∀ i, C i

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

(f : (i : I) → CategoryTheory.Functor A (C i))

(CategoryTheory.Functor.pi' f).obj a i = (f i).obj a


theorem IsMaxFilter.max (hf : IsMaxFilter f l a) (hg : IsMaxFilter g l a) :
    IsMaxFilter (fun x => max (f x) (g x)) l a

{α : Type u}
{β : Type v}
[LinearOrder β]
{f g : α → β}
{a : α}
{l : Filter α}
(hf : IsMaxFilter f l a)
(hg : IsMaxFilter g l a)


@[simp]
theorem map_zero : map I (0 : M →ₗ[R] N) = 0

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

AdicCompletion.AdicCauchySequence.map I 0 = 0


/-- If a category has all binary coproducts and all coequalizers, then it also has all pushouts.
    As usual, this is not an instance, since there may be a more direct way to construct
    pushouts. -/
theorem hasPushouts_of_hasBinaryCoproducts_of_hasCoequalizers (C : Type u) [Category.{v} C]
    [HasBinaryCoproducts C] [HasCoequalizers C] : HasPushouts C


theorem centralizer_le {R} [Semiring R] (s t : Set R) (h : s ⊆ t) : centralizer t ≤ centralizer s

{R : Type u_1}
[Semiring R]
(s t : Set R)
(h : s ⊆ t)

Subsemiring.centralizer t ≤ Subsemiring.centralizer s


theorem isOpenMap_inr : IsOpenMap (@inr X Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem fin_two_exists_eq_mk_of_apply_zero_one_eq_zero {R : Type*} [Field R] (g : SL(2, R))
    (hg : (g : Matrix (Fin 2) (Fin 2) R) 1 0 = 0) :
    ∃ (a b : R) (h : a ≠ 0), g = (⟨!![a, b; 0, a⁻¹], by simp [h]⟩ : SL(2, R))

(g : Matrix.SpecialLinearGroup (Fin 2) R)

∃ a b, ∃ (h : a ≠ 0), g = ⟨!![a, b; 0, a⁻¹], ⋯⟩


theorem HasFTaylorSeriesUpToOn.continuousOn (h : HasFTaylorSeriesUpToOn n f p s) :
    ContinuousOn f s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpToOn n f p s)


theorem memℒp_lineDeriv (hf : LipschitzWith C f) (v : E) :
    Memℒp (fun x ↦ lineDeriv ℝ f x v) ∞ μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{C : ℝ≥0}
{f : E → ℝ}
{μ : MeasureTheory.Measure E}
(hf : LipschitzWith C f)
(v : E)

MeasureTheory.Memℒp (fun x => lineDeriv ℝ f x v) ⊤ μ


@[simp]
theorem xgcdAux_fst (x y) : ∀ s t s' t', (xgcdAux x s t y s' t').1 = gcd x y


theorem eq_of_xn_modEq {i j n} (i2n : i ≤ 2 * n) (j2n : j ≤ 2 * n)
    (h : xn a1 i ≡ xn a1 j [MOD xn a1 n])
    (ntriv : a = 2 → n = 1 → (i = 0 → j ≠ 2) ∧ (i = 2 → j ≠ 0)) : i = j

(h : Pell.xn a1 i ≡ Pell.xn a1 j [MOD Pell.xn a1 n])


@[simp]
theorem relabel_moveLeft' {x : PGame} {xl' xr'} (el : xl' ≃ x.LeftMoves) (er : xr' ≃ x.RightMoves)
    (i : xl') : moveLeft (relabel el er) i = x.moveLeft (el i)

{x : SetTheory.PGame}
{xl' xr' : Type u_1}
(el : xl' ≃ x.LeftMoves)
(er : xr' ≃ x.RightMoves)
(i : xl')

(SetTheory.PGame.relabel el er).moveLeft i = x.moveLeft (el i)


/-- `toList` of `cons` of a vector and an element is
the `cons` of the list obtained by `toList` and the element -/
@[simp]
theorem toList_cons (a : α) (v : Vector α n) : toList (cons a v) = a :: toList v

{α : Type u}
{n : ℕ}
(a : α)
(v : Mathlib.Vector α n)

(Mathlib.Vector.cons a v).toList = a :: v.toList


@[to_additive]
theorem prod_map_hom (L : List ι) (f : ι → M) {G : Type*} [FunLike G M N] [MonoidHomClass G M N]
    (g : G) :
    (L.map (g ∘ f)).prod = g (L.map f).prod

{ι : Type u_1}
{M : Type u_4}
{N : Type u_5}
[AddMonoid M]
[AddMonoid N]
(L : List ι)
(f : ι → M)
{G : Type u_8}
[FunLike G M N]
[AddMonoidHomClass G M N]
(g : G)

(List.map (⇑g ∘ f) L).sum = g (List.map f L).sum


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

{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)
(a : P)
{x : G × P}

x ∈ Finset.VAddAntidiagonal hs ht a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 +ᵥ x.2 = a


/-- Assumes left covariance. -/
theorem Left.one_lt_mul_of_le_of_lt_of_pos [PosMulStrictMono α] (ha : 1 ≤ a) (hb : 1 < b)
    (a0 : 0 < a) : 1 < a * b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
(ha : 1 ≤ a)
(hb : 1 < b)
(a0 : 0 < a)


@[simp, norm_cast]
theorem coe_top [BoundedOrder α] : ((⊤ : Interval α) : Set α) = univ

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]


@[simp] theorem map_sup : map m (f₁ ⊔ f₂) = map m f₁ ⊔ map m f₂

{α : Type u}
{β : Type v}
{f₁ f₂ : Filter α}
{m : α → β}

Filter.map m (f₁ ⊔ f₂) = Filter.map m f₁ ⊔ Filter.map m f₂


/-- This is the `List.prod` version of `mul_inv` -/
@[to_additive "This is the `List.sum` version of `add_neg`"]
theorem prod_inv : ∀ L : List G, L.prod⁻¹ = (L.map fun x => x⁻¹).prod

{G : Type u_7}
[CommGroup G]
(L : List G)

L.prod⁻¹ = (List.map (fun x => x⁻¹) L).prod


/-- Adding a vector in the direction to a point produces a point in the subspace if and only if
the original point is in the subspace. -/
theorem vadd_mem_iff_mem_of_mem_direction {s : AffineSubspace k P} {v : V} (hv : v ∈ s.direction)
    {p : P} : v +ᵥ p ∈ s ↔ p ∈ s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
{v : V}
(hv : v ∈ s.direction)
{p : P}


/-- An **e-transform**. Turns `(s, t)` into `(s ∪ s • e, t ∩ e⁻¹ • t)`. This reduces the
product of the two sets. -/
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s ∪ s +ᵥ e, t ∩ -e +ᵥ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset α × Finset α

{α : Type u_1}
[DecidableEq α]
[Group α]
(e : α)
(x : Finset α × Finset α)

(Finset.mulETransformRight e x).2 = x.2 ∩ e⁻¹ • x.2


theorem continuous_coe_ennreal_iff {f : α → ℝ≥0∞} :
    (Continuous fun a => (f a : EReal)) ↔ Continuous f

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ≥0∞}

(Continuous fun a => ↑(f a)) ↔ Continuous f


@[simp]
theorem image_preimage_coe (s t : Set α) : ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = s ∩ t

Subtype.val '' (Subtype.val ⁻¹' t) = s ∩ t


@[simp]
protected theorem coe_coe {F : Type*} [FunLike F A B]
    [NonUnitalAlgSemiHomClass F φ A B] (f : F) :
    ⇑(f : A →ₛₙₐ[φ] B) = f

{R : Type u}
{S : Type u₁}
[Monoid R]
[Monoid S]
{φ : R →* S}
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction S B]
{F : Type u_2}
[FunLike F A B]
[NonUnitalAlgSemiHomClass F φ A B]
(f : F)


/-- `padicValInt p 1` is `0` for any `p`. -/
@[simp]
protected theorem one : padicValInt p 1 = 0


@[simp]
theorem mul_twoPow_eq_shiftLeft (x : BitVec w) (i : Nat) :
    x * (twoPow w i) = x <<< i


private theorem norm_eq_of_equiv {f g : PadicSeq p} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) (hfg : f ≈ g) :
    padicNorm p (f (stationaryPoint hf)) = padicNorm p (g (stationaryPoint hg))

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{f g : PadicSeq p}
(hf : ¬f ≈ 0)
(hg : ¬g ≈ 0)
(hfg : f ≈ g)

padicNorm p (↑f (PadicSeq.stationaryPoint hf)) = padicNorm p (↑g (PadicSeq.stationaryPoint hg))


@[simp]
theorem edges_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).edges = p.edges

{V : Type u}
{G : SimpleGraph V}
{u v u' v' : V}
(p : G.Walk u v)
(hu : u = u')
(hv : v = v')


theorem realize_sentence (g : M ≃[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(g : L.Equiv M N)
(φ : L.Sentence)

M ⊨ φ ↔ N ⊨ φ


theorem Codisjoint.eq_top_of_ge (hab : Codisjoint a b) : a ≤ b → b = ⊤

{α : Type u_1}
[PartialOrder α]
[OrderTop α]
{a b : α}
(hab : Codisjoint a b)


@[to_additive]
theorem IsOpen.smul_left (ht : IsOpen t) : IsOpen (s • t)

{α : Type u}
{β : Type v}
[TopologicalSpace β]
[AddGroup α]
[AddAction α β]
[ContinuousConstVAdd α β]
{s : Set α}
{t : Set β}
(ht : IsOpen t)


/-- `(x + y) * z` is equivalent to `x * z + y * z.`-/
theorem right_distrib_equiv (x y z : PGame) : (x + y) * z ≈ x * z + y * z


theorem nnnorm_eq_iSup_nnnorm : ‖f‖₊ = ⨆ x : α, ‖f x‖₊

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

‖f‖₊ = ⨆ x, ‖f x‖₊


theorem IsCoprime.of_isCoprime_of_dvd_right (h : IsCoprime z y) (hdvd : x ∣ y) : IsCoprime z x

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime z y)
(hdvd : x ∣ y)


theorem OrthonormalBasis.measurePreserving_repr_symm (b : OrthonormalBasis ι ℝ F) :
    MeasurePreserving b.repr.symm volume volume

{ι : Type u_1}
{F : Type u_3}
[Fintype ι]
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[FiniteDimensional ℝ F]
[MeasurableSpace F]
[BorelSpace F]
(b : OrthonormalBasis ι ℝ F)

MeasureTheory.MeasurePreserving (⇑b.repr.symm) MeasureTheory.volume MeasureTheory.volume


theorem prod_ofPrime (p : Nat.Primes) : (ofPrime p).prod = (p : ℕ+)


@[simp]
theorem preimage_coe_compl' (s : Set α) :
    (fun x : (sᶜ : Set α) => (x : α)) ⁻¹' s = ∅


lemma nnreal_of_nonneg [Module ℝ A] [IsScalarTower ℝ A A] [SMulCommClass ℝ A A] [PartialOrder A]
    [NonnegSpectrumClass ℝ A] {a : A} (ha : 0 ≤ a) :
    QuasispectrumRestricts a ContinuousMap.realToNNReal

{A : Type u_3}
[NonUnitalRing A]
[Module ℝ A]
[IsScalarTower ℝ A A]
[SMulCommClass ℝ A A]
[PartialOrder A]
[NonnegSpectrumClass ℝ A]
{a : A}
(ha : 0 ≤ a)


theorem pointwise_smul_subset_iff {a : M} {S T : Subring R} : a • S ≤ T ↔ S ≤ a⁻¹ • T

{M : Type u_1}
{R : Type u_2}
[Group M]
[Ring R]
[MulSemiringAction M R]
{a : M}
{S T : Subring R}

a • S ≤ T ↔ S ≤ a⁻¹ • T


theorem StrictAnti.const_mul_of_neg [ExistsAddOfLE α] [PosMulStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (hf : StrictAnti f) (ha : a < 0) : StrictMono fun x => a * f x

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

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


theorem elim_injective (γ : Type*) (fγ : (Σa : α, β a → γ) → γ)
    (fγ_injective : Function.Injective fγ) : Function.Injective (elim γ fγ)

{α : Type u_1}
{β : α → Type u_2}
(γ : Type u_3)
(fγ : (a : α) × (β a → γ) → γ)
(fγ_injective : Function.Injective fγ)


/-- The canonical morphism of sheafed spaces from `X` to the spectrum of its global sections. -/
@[simps]
def toΓSpecSheafedSpace : X.toSheafedSpace ⟶ Spec.toSheafedSpace.obj (op (Γ.obj (op X)))


theorem val_natCast_of_lt {n a : ℕ} (h : a < n) : (a : ZMod n).val = a


theorem eq_zero_of_localization (r : R)
    (h : ∀ (J : Ideal R) (hJ : J.IsMaximal), algebraMap R (Localization.AtPrime J) r = 0) :
    r = 0

(h : ∀ (J : Ideal R) (hJ : J.IsMaximal), (algebraMap R (Localization.AtPrime J)) r = 0)


theorem set_eventuallyLE_iff_mem_inf_principal {s t : Set α} {l : Filter α} :
    s ≤ᶠ[l] t ↔ t ∈ l ⊓ 𝓟 s

{α : Type u}
{s t : Set α}
{l : Filter α}


theorem HasDerivAt.complexToReal_fderiv' {f : ℂ → E} {x : ℂ} {f' : E} (h : HasDerivAt f f' x) :
    HasFDerivAt f (reCLM.smulRight f' + I • imCLM.smulRight f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : ℂ → E}
{x : ℂ}
{f' : E}
(h : HasDerivAt f f' x)

HasFDerivAt f (Complex.reCLM.smulRight f' + Complex.I • Complex.imCLM.smulRight f') x


theorem ptendsto_of_ptendsto' {f : α →. β} {l₁ : Filter α} {l₂ : Filter β} :
    PTendsto' f l₁ l₂ → PTendsto f l₁ l₂

{α : Type u}
{β : Type v}
{f : α →. β}
{l₁ : Filter α}
{l₂ : Filter β}

Filter.PTendsto' f l₁ l₂ → Filter.PTendsto f l₁ l₂


SetTheory.PGame.nim 1 ≈ SetTheory.PGame.star


theorem SeparationQuotient.t1Space_iff : T1Space (SeparationQuotient X) ↔ R0Space X


private theorem add_le_add' : ∀ {a b c d : Cardinal}, a ≤ b → c ≤ d → a + c ≤ b + d


/-- The bottom-right evaluation `Square C ⥤ C`. -/
@[simps]
def evaluation₄ : Square C ⥤ C

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

∀ {X Y : CategoryTheory.Square C} (φ : X ⟶ Y), CategoryTheory.Square.evaluation₄.map φ = φ.τ₄


/-- A pair (i, j) is contained in the antidiagonal of `n` if and only if `i + j = n`. -/
@[simp]
theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n

x ∈ List.Nat.antidiagonal n ↔ x.1 + x.2 = n


/-- The angle between two nonnegative multiples of the same vector is 0. -/
@[simp]
theorem oangle_smul_smul_self_of_nonneg (x : V) {r₁ r₂ : ℝ} (hr₁ : 0 ≤ r₁) (hr₂ : 0 ≤ r₂) :
    o.oangle (r₁ • x) (r₂ • x) = 0

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


@[simp]
theorem coe_copy (p : FractionalIdeal S P) (s : Set P) (hs : s = ↑p) : ↑(p.copy s hs) = s

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(p : FractionalIdeal S P)
(s : Set P)
(hs : s = ↑p)


@[to_additive (attr := simp)]
theorem smul_filter_eq_bot_iff : a • f = ⊥ ↔ f = ⊥

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter β}
{a : α}


theorem mem_pointwise_smul_iff_inv_smul_mem {a : M} {S : Ideal R} {x : R} :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{M : Type u_1}
{R : Type u_2}
[Group M]
[CommRing R]
[MulSemiringAction M R]
{a : M}
{S : Ideal R}
{x : R}

x ∈ a • S ↔ a⁻¹ • x ∈ S


theorem neg_sub' {X Y : C} (a b : X ⟶ Y) : -(a - b) = -a + b


theorem minimum_eq_coe_iff : minimum l = m ↔ m ∈ l ∧ ∀ a ∈ l, m ≤ a

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

l.minimum = ↑m ↔ m ∈ l ∧ ∀ (a : α), a ∈ l → m ≤ a


theorem not_add_one_le_self : (n : Nat) → ¬ n + 1 ≤ n


@[to_additive (attr := simp)]
theorem snd_comp_inr : (snd M N).comp (inr M N) = id N

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]

(AddMonoidHom.snd M N).comp (AddMonoidHom.inr M N) = AddMonoidHom.id N


@[to_additive (attr := simp)]
theorem prod_join {l : List (List M)} : l.join.prod = (l.map List.prod).prod

{M : Type u_4}
[Monoid M]
{l : List (List M)}

l.join.prod = (List.map List.prod l).prod


theorem HasStrictDerivAt.scomp_of_eq
    (hg : HasStrictDerivAt g₁ g₁' y) (hh : HasStrictDerivAt h h' x) (hy : y = h x) :
    HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
{y : 𝕜'}
(hg : HasStrictDerivAt g₁ g₁' y)
(hh : HasStrictDerivAt h h' x)
(hy : y = h x)


theorem surjOn_iUnion₂ {s : Set α} {t : ∀ i, κ i → Set β} {f : α → β}
    (H : ∀ i j, SurjOn f s (t i j)) : SurjOn f s (⋃ (i) (j), t i j)

(H : ∀ (i : ι) (j : κ i), Set.SurjOn f s (t i j))


theorem image2_iInter_subset_right (s : Set α) (t : ι → Set β) :
    image2 f s (⋂ i, t i) ⊆ ⋂ i, image2 f s (t i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{ι : Sort u_4}
(f : α → β → γ)
(s : Set α)
(t : ι → Set β)

Set.image2 f s (⋂ i, t i) ⊆ ⋂ i, Set.image2 f s (t i)


/-- The explicit pullback in the category of types, bundled up as a `LimitCone`
for given `f` and `g`.
-/
@[simps]
def pullbackLimitCone (f : X ⟶ Z) (g : Y ⟶ Z) : Limits.LimitCone (cospan f g)

{X Y Z : Type u}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.Types.pullbackLimitCone f g).cone = CategoryTheory.Limits.Types.pullbackCone f g


theorem arg_mul_coe_angle {x y : ℂ} (hx : x ≠ 0) (hy : y ≠ 0) :
    (arg (x * y) : Real.Angle) = arg x + arg y


/-- If `x` is in the base field `K`, then the trace is `[L : K] * x`. -/
theorem trace_algebraMap_of_basis (x : R) : trace R S (algebraMap R S x) = Fintype.card ι • x

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{ι : Type w}
[Fintype ι]
(b : Basis ι R S)
(x : R)

(Algebra.trace R S) ((algebraMap R S) x) = Fintype.card ι • x


theorem atomise_empty (hs : s.Nonempty) : (atomise s ∅).parts = {s}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
[Fintype α]
(hs : s.Nonempty)


@[simp]
theorem symm_dual_comp (g : βᵒᵈ →o γᵒᵈ) (f : αᵒᵈ →o βᵒᵈ) :
    OrderHom.dual.symm (g.comp f) = (OrderHom.dual.symm g).comp (OrderHom.dual.symm f)

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


theorem nadd_left_comm : ∀ a b c, a ♯ (b ♯ c) = b ♯ (a ♯ c)


lemma iSup_sUnion (S : Set (Set α)) (f : α → β) :
    (⨆ x ∈ ⋃₀ S, f x) = ⨆ (s ∈ S) (x ∈ s), f x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice β]
(S : Set (Set α))
(f : α → β)


protected theorem Even.zpow_nonneg (hn : Even n) (a : α) : 0 ≤ a ^ n

{α : Type u_1}
[LinearOrderedField α]
{n : ℤ}
(hn : Even n)
(a : α)


theorem ord_compl_le (n p : ℕ) : ord_compl[p] n ≤ n


lemma norm_eq_max_natAbs (x : Fin 2 → ℤ) : ‖x‖ = max (x 0).natAbs (x 1).natAbs


/-- A product over `Finset.powersetCard` which only depends on the size of the sets is constant. -/
@[to_additive
"A sum over `Finset.powersetCard` which only depends on the size of the sets is constant."]
lemma prod_powersetCard (n : ℕ) (s : Finset α) (f : ℕ → β) :
    ∏ t ∈ powersetCard n s, f t.card = f n ^ s.card.choose n

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(n : ℕ)
(s : Finset α)
(f : ℕ → β)

∏ t ∈ Finset.powersetCard n s, f t.card = f n ^ s.card.choose n


protected theorem isClosed [T2Space V] (K : ConvexBody V) : IsClosed (K : Set V)

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
[T2Space V]
(K : ConvexBody V)


theorem Intersecting.not_bot_mem (hs : s.Intersecting) : ⊥ ∉ s

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{s : Set α}
(hs : s.Intersecting)


/-- The product of a family of partial equivalences, as a partial equivalence on the pi type. -/
@[simps (config := mfld_cfg) apply source target]
protected def pi (ei : ∀ i, PartialEquiv (αi i) (βi i)) : PartialEquiv (∀ i, αi i) (∀ i, βi i)

(ei : (i : ι) → PartialEquiv (αi i) (βi i))

↑(PartialEquiv.pi ei) = fun f i => ↑(ei i) (f i)


theorem hasDerivAtFilter_const : HasDerivAtFilter (fun _ => c) 0 x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
(L : Filter 𝕜)
(c : F)


@[symm]
protected theorem Resp.Equiv.symm {n} {a b : Resp n} : Resp.Equiv a b → Resp.Equiv b a


lemma truncatedSup_infs_of_not_mem (ha : a ∉ lowerClosure s ⊓ lowerClosure t) :
    truncatedSup (s ⊼ t) a = ⊤

(ha : a ∉ lowerClosure ↑s ⊓ lowerClosure ↑t)


@[aesop safe 100 apply (rule_sets := [Measurable])]
lemma measurableSet_mem (a : α) : MeasurableSet {s : Set α | a ∈ s}


private theorem mul_aux_right (x y1 y2 : ℕ × K) (H : R K p y1 y2) :
    mk K p (x.1 + y1.1, (frobenius K p)^[y1.1] x.2 * (frobenius K p)^[x.1] y1.2) =
      mk K p (x.1 + y2.1, (frobenius K p)^[y2.1] x.2 * (frobenius K p)^[x.1] y2.2)

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x y1 y2 : ℕ × K)
(H : PerfectClosure.R K p y1 y2)

PerfectClosure.mk K p (x.1 + y1.1, (⇑(frobenius K p))^[y1.1] x.2 * (⇑(frobenius K p))^[x.1] y1.2) =
  PerfectClosure.mk K p (x.1 + y2.1, (⇑(frobenius K p))^[y2.1] x.2 * (⇑(frobenius K p))^[x.1] y2.2)


lemma setIntegral_toReal_rnDeriv [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) (s : Set α) :
    ∫ x in s, (μ.rnDeriv ν x).toReal ∂ν = (μ s).toReal

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hμν : μ ≪ ν)
(s : Set α)

∫ (x : α) in s, (μ.rnDeriv ν x).toReal ∂ν = (μ s).toReal


/-- Proving equality between functors. This isn't an extensionality lemma,
  because usually you don't really want to do this. -/
theorem ext {F G : C ⥤ D} (h_obj : ∀ X, F.obj X = G.obj X)
    (h_map : ∀ X Y f,
      F.map f = eqToHom (h_obj X) ≫ G.map f ≫ eqToHom (h_obj Y).symm := by aesop_cat) :
    F = G

(h_map :
  ∀ (X Y : C) (f : X ⟶ Y),
    F.map f =
      CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
        (CategoryTheory.CategoryStruct.comp (G.map f) (CategoryTheory.eqToHom ⋯)) := by
  aesop_cat)


theorem range_enumOrd (hS : Unbounded (· < ·) S) : range (enumOrd S) = S

(hS : Set.Unbounded (fun x x_1 => x < x_1) S)


/-- The cartesian product of two equivalences of categories. -/
@[simps]
def prod (E₁ : A ≌ B) (E₂ : C ≌ D) : A × C ≌ B × D

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(E₁ : A ≌ B)
(E₂ : C ≌ D)

(E₁.prod E₂).counitIso = CategoryTheory.NatIso.prod E₁.counitIso E₂.counitIso


theorem Context.toList_nonEmpty (e : Expr) : e.toList ≠ []


theorem Measure.QuasiMeasurePreserving.ae_eq_comp {ν : Measure β} {f : α → β} {g g' : β → δ}
    (hf : QuasiMeasurePreserving f μ ν) (h : g =ᵐ[ν] g') : g ∘ f =ᵐ[μ] g' ∘ f

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μ ν)


@[simp]
lemma map₂_val {F : Cᵒᵖ ⥤ Type v} {η : F ⟶ A} {X Y : C} (f : X ⟶ Y)
    {s : yoneda.obj X ⟶ A} {t : yoneda.obj Y ⟶ A} (hst : yoneda.map f ≫ t = s)
    (u : OverArrows η t) : (u.map₂ f hst).val = F.map f.op u.val

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

(hst : CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map f) t = s)

(u : CategoryTheory.OverPresheafAux.OverArrows η t)


@[simp]
theorem apply_symm_apply (e : A₁ ≃ₐ[R] A₂) : ∀ x, e (e.symm x) = x

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


theorem eval_gcd_eq_zero [DecidableEq R] {f g : R[X]} {α : R}
    (hf : f.eval α = 0) (hg : g.eval α = 0) : (EuclideanDomain.gcd f g).eval α = 0

{R : Type u}
[Field R]
[DecidableEq R]
{f g : R[X]}
{α : R}
(hf : Polynomial.eval α f = 0)
(hg : Polynomial.eval α g = 0)

Polynomial.eval α (EuclideanDomain.gcd f g) = 0


@[to_additive (attr := simp)]
theorem prod_add (s t : Multiset α) : prod (s + t) = prod s * prod t

{α : Type u_3}
[CommMonoid α]
(s t : Multiset α)


@[simp]
theorem inl_apply [Module R₁ M₂] (x : M₁) : inl R₁ M₁ M₂ x = (x, 0)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₁ M₂]
(x : M₁)

(ContinuousLinearMap.inl R₁ M₁ M₂) x = (x, 0)


/-- The functor `LeftExtension L' F ⥤ LeftExtension L F`
induced by a natural transformation `L' ⟶ L ⋙ G'`. -/
@[simps!]
def LeftExtension.postcomp₁ (f : L' ⟶ L ⋙ G) (F : C ⥤ H) :
    LeftExtension L' F ⥤ LeftExtension L F

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D' H).obj L'))

∀ (X_1 : C),
  ((CategoryTheory.Functor.LeftExtension.postcomp₁ G f F).obj X).hom.app X_1 =
    CategoryTheory.CategoryStruct.comp (X.hom.app X_1) (X.right.map (f.app X_1))


@[simp]
theorem coe_restrictScalars {E : IntermediateField L' L} :
    (restrictScalars K E : Set L) = (E : Set L)

(K : Type u_1)
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
[Algebra L' L]
[IsScalarTower K L' L]
{E : IntermediateField L' L}

↑(IntermediateField.restrictScalars K E) = ↑E


theorem braiding_leftUnitor_aux₂ (X : C) :
    ((β_ X (𝟙_ C)).hom ▷ 𝟙_ C) ≫ ((λ_ X).hom ▷ 𝟙_ C) = (ρ_ X).hom ▷ 𝟙_ C

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

(β_ X (𝟙_ C)).hom ▷ 𝟙_ C ≫ (λ_ X).hom ▷ 𝟙_ C = (ρ_ X).hom ▷ 𝟙_ C


lemma invOn_reflection_of_mapsTo {Φ : Set M} (h : f x = 2) :
    InvOn (reflection h) (reflection h) Φ Φ

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{x : M}
{f : Module.Dual R M}
{Φ : Set M}
(h : f x = 2)

Set.InvOn (⇑(Module.reflection h)) (⇑(Module.reflection h)) Φ Φ


theorem isIso_π_of_isTerminal {j : J} (I : IsTerminal j) (F : J ⥤ C) [HasLimit F]
    [∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)] : IsIso (limit.π F j)

(I : CategoryTheory.Limits.IsTerminal j)

[∀ (i j : J) (f : i ⟶ j), CategoryTheory.IsIso (F.map f)]

CategoryTheory.IsIso (CategoryTheory.Limits.limit.π F j)


/-- The identity morphism of `X : Bipointed`. -/
@[simps]
nonrec def id (X : Bipointed) : Bipointed.Hom X X


theorem range_restrictDom (s : Set α) [DecidablePred (· ∈ s)] :
    LinearMap.range (restrictDom M R s) = ⊤

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(s : Set α)
[DecidablePred fun x => x ∈ s]

LinearMap.range (Finsupp.restrictDom M R s) = ⊤


lemma frequently_gt_nhds (a : α) [NeBot (𝓝[>] a)] : ∃ᶠ x in 𝓝 a, a < x

{α : Type u_1}
[TopologicalSpace α]
[Preorder α]
(a : α)
[(𝓝[>] a).NeBot]


@[simp] theorem carrier_eq_coe (U : Opens α) : U.1 = ↑U

{α : Type u_2}
[TopologicalSpace α]
(U : TopologicalSpace.Opens α)


lemma preReflection_preReflection (g : Dual R M) (h : f x = 2) :
    preReflection (preReflection x f y) (preReflection f (Dual.eval R M x) g) =
    (preReflection x f) ∘ₗ (preReflection y g) ∘ₗ (preReflection x f)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{x : M}
{f : Module.Dual R M}
(y : M)
(g : Module.Dual R M)
(h : f x = 2)

Module.preReflection ((Module.preReflection x f) y) ((Module.preReflection f ((Module.Dual.eval R M) x)) g) =
  Module.preReflection x f ∘ₗ Module.preReflection y g ∘ₗ Module.preReflection x f


@[to_additive (attr := simp, norm_cast)] lemma coe_one : ((1 : α) : WithBot α) = 1


theorem HasFDerivWithinAt.inner (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt g g' s x) :
    HasFDerivWithinAt (fun t => ⟪f t, g t⟫) ((fderivInnerCLM 𝕜 (f x, g x)).comp <| f'.prod g') s
      x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{f' g' : G →L[ℝ] E}
{s : Set G}
{x : G}
(hf : HasFDerivWithinAt f f' s x)
(hg : HasFDerivWithinAt g g' s x)

HasFDerivWithinAt (fun t => ⟪f t, g t⟫_𝕜) ((fderivInnerCLM 𝕜 (f x, g x)).comp (f'.prod g')) s x


theorem restrictScalars_apply (fₗ : M →ₗ[S] M₂) (x) : restrictScalars R fₗ x = fₗ x

(R : Type u_1)
{S : Type u_6}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M]
[Module S M₂]
[LinearMap.CompatibleSMul M M₂ R S]
(fₗ : M →ₗ[S] M₂)
(x : M)


@[simp]
theorem wbtw_vadd_const_iff {x y z : V} (p : P) :
    Wbtw R (x +ᵥ p) (y +ᵥ p) (z +ᵥ p) ↔ Wbtw R x y z

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


/-- Order isomorphism between the space of monotone maps to `β × γ` and the product of the spaces
of monotone maps to `β` and `γ`. -/
@[simps]
def prodIso : (α →o β × γ) ≃o (α →o β) × (α →o γ)

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

OrderHom.prodIso f = (OrderHom.fst.comp f, OrderHom.snd.comp f)


theorem objSupIsoProdEqLocus_inv_snd {X : TopCat} (F : X.Sheaf CommRingCat) (U V : Opens X) (x) :
    F.1.map (homOfLE le_sup_right).op ((F.objSupIsoProdEqLocus U V).inv x) = x.1.2

(x :
  ↥((RingHom.comp (F.val.map (CategoryTheory.homOfLE ⋯).op)
          (RingHom.fst ↑(F.val.obj (Opposite.op U)) ↑(F.val.obj (Opposite.op V)))).eqLocus
      (RingHom.comp (F.val.map (CategoryTheory.homOfLE ⋯).op)
        (RingHom.snd ↑(F.val.obj (Opposite.op U)) ↑(F.val.obj (Opposite.op V))))))

(F.val.map (CategoryTheory.homOfLE ⋯).op) ((F.objSupIsoProdEqLocus U V).inv x) = (↑x).2


@[simp]
lemma snd_dirac_unit_compProd_const (μ : Measure β) [IsFiniteMeasure μ] :
    snd (Measure.dirac () ⊗ₘ Kernel.const Unit μ) = μ

{β : Type u_2}
{mβ : MeasurableSpace β}
(μ : MeasureTheory.Measure β)
[MeasureTheory.IsFiniteMeasure μ]

(MeasureTheory.Measure.dirac () ⊗ₘ ProbabilityTheory.Kernel.const Unit μ).snd = μ


lemma smul_pos [PosSMulStrictMono α β] (ha : 0 < a) (hb : 0 < b) : 0 < a • b

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulZeroClass α β]
[Preorder α]
[Preorder β]
[PosSMulStrictMono α β]
(ha : 0 < a)
(hb : 0 < b)


@[to_additive (attr := simp)]
theorem ker_one : (1 : G →* M).ker = ⊤

{G : Type u_1}
[Group G]
{M : Type u_7}
[MulOneClass M]


/-- Only assumes right strict covariance. -/
@[to_additive "Only assumes right strict covariance"]
theorem Right.mul_lt_mul [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, norm_cast)]
theorem coe_inv (x : H) : ↑(x⁻¹ : H) = (x⁻¹ : G)

{G : Type u_1}
[Group G]
(H : Subgroup G)
(x : ↥H)

↑x⁻¹ = (↑x)⁻¹


theorem deriv_sqrt_aux {x : ℝ} (hx : x ≠ 0) :
    HasStrictDerivAt (√·) (1 / (2 * √x)) x ∧ ∀ n, ContDiffAt ℝ n (√·) x

HasStrictDerivAt (fun x => √x) (1 / (2 * √x)) x ∧ ∀ (n : ℕ∞), ContDiffAt ℝ n (fun x => √x) x


@[local simp]
theorem transitionMap_map_pow {m n a : ℕ} (hmn : m ≤ n) (x : R ⧸ (I ^ n • ⊤ : Ideal R)) :
    transitionMap I R hmn (x ^ a) = transitionMap I R hmn x ^ a

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{m n a : ℕ}
(hmn : m ≤ n)
(x : R ⧸ I ^ n • ⊤)

(AdicCompletion.transitionMap I R hmn) (x ^ a) = (AdicCompletion.transitionMap I R hmn) x ^ a


theorem iInf_option (f : Option β → α) : ⨅ o, f o = f none ⊓ ⨅ b, f (Option.some b)

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
(f : Option β → α)


@[simp]
theorem coe_smul (r : ℝ≥0) : (r : ℝ) • j = r • j

(j : MeasureTheory.JordanDecomposition α)


theorem le_add_right (s t : Multiset α) : s ≤ s + t


@[simp]
theorem coe_openToLocalization (U : Opens (PrimeSpectrum.Top R)) (x : PrimeSpectrum.Top R)
    (hx : x ∈ U) :
    (openToLocalization R U x hx :
        (structureSheaf R).1.obj (op U) → Localization.AtPrime x.asIdeal) =
      fun s => (s.1 ⟨x, hx⟩ : _)

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

⇑(AlgebraicGeometry.StructureSheaf.openToLocalization R U x hx) = fun s => ↑s ⟨x, hx⟩


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

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


/-- The "evaluation at `X`" functor, such that
`(evaluation.obj X).obj F = F.obj X`,
which is functorial in both `X` and `F`.
-/
@[simps]
def evaluation : C ⥤ (C ⥤ D) ⥤ D

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

∀ {X_1 Y : CategoryTheory.Functor C D} (α : X_1 ⟶ Y), ((CategoryTheory.evaluation C D).obj X).map α = α.app X