theorem eLpNorm'_smul_measure {p : ℝ} (hp : 0 ≤ p) {f : α → F} (c : ℝ≥0∞) :
    eLpNorm' f p (c • μ) = c ^ (1 / p) * eLpNorm' f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{p : ℝ}
(hp : 0 ≤ p)
{f : α → F}
(c : ℝ≥0∞)

MeasureTheory.eLpNorm' f p (c • μ) = c ^ (1 / p) * MeasureTheory.eLpNorm' f p μ


@[simp, mfld_simps]
theorem comp_id (f : α → β) : f ∘ id = f


theorem X_dvd_iff {φ : R⟦X⟧} : (X : R⟦X⟧) ∣ φ ↔ constantCoeff R φ = 0

{R : Type u_1}
[Semiring R]
{φ : PowerSeries R}

PowerSeries.X ∣ φ ↔ (PowerSeries.constantCoeff R) φ = 0


@[simp]
theorem sort_zero : sort r 0 = []

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


theorem mem_res (f : α → β) (s : Set α) (a : α) (b : β) : b ∈ res f s a ↔ a ∈ s ∧ f a = b

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


protected theorem lt_or_lt_of_ne : ∀{a b : Nat}, a ≠ b → a < b ∨ b < a


theorem pointReflection_fixed_iff [Invertible (2 : 𝕜)] {x y : P} :
    pointReflection 𝕜 x y = y ↔ y = x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[Invertible 2]
{x y : P}

(AffineIsometryEquiv.pointReflection 𝕜 x) y = y ↔ y = x


@[simp]
theorem coe_toNonUnitalSubring {R : Type u} {A : Type v} [CommRing R] [NonUnitalRing A] [Module R A]
    [Star A] (S : NonUnitalStarSubalgebra R A) : (↑S.toNonUnitalSubring : Set A) = S


@[simp]
theorem invOf_mul [Monoid α] (a b : α) [Invertible a] [Invertible b] [Invertible (a * b)] :
    ⅟ (a * b) = ⅟ b * ⅟ a

{α : Type u}
[Monoid α]
(a b : α)
[Invertible a]
[Invertible b]
[Invertible (a * b)]


@[to_additive]
theorem smul_orbit_subset (m : M) (a : α) : m • orbit M a ⊆ orbit M a

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
(m : M)
(a : α)

m • MulAction.orbit M a ⊆ MulAction.orbit M a


/-- An odd function on a linear ordered additive commutative group is strictly antitone on the whole
group provided that it is strictly antitone on `Set.Ici 0`. -/
theorem strictAnti_of_odd_strictAntiOn_nonneg {f : G → H} (h₁ : ∀ x, f (-x) = -f x)
    (h₂ : StrictAntiOn f (Ici 0)) : StrictAnti f

{G : Type u_1}
{H : Type u_2}
[LinearOrderedAddCommGroup G]
[OrderedAddCommGroup H]
{f : G → H}
(h₁ : ∀ (x : G), f (-x) = -f x)
(h₂ : StrictAntiOn f (Set.Ici 0))


/-- A version of `Seminorm.bound_of_shell` expressed using pointwise scalar multiplication of
seminorms. -/
lemma bound_of_shell_smul
    (p q : Seminorm 𝕜 E) {ε : ℝ} {C : ℝ≥0} (ε_pos : 0 < ε) {c : 𝕜} (hc : 1 < ‖c‖)
    (hf : ∀ x, ε / ‖c‖ ≤ p x → p x < ε → q x ≤ (C • p) x) {x : E} (hx : p x ≠ 0) :
    q x ≤ (C • p) x

(hf : ∀ (x : E), ε / ‖c‖ ≤ p x → p x < ε → q x ≤ (C • p) x)


{α : Type u}
[SemilatticeSup α]
[OrderTop α]
(a : α)


/-- The Schnirelmann density is unaffected by adding `0`. -/
@[simp] lemma schnirelmannDensity_insert_zero [DecidablePred (· ∈ insert 0 A)] :
    schnirelmannDensity (insert 0 A) = schnirelmannDensity A

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
[DecidablePred fun x => x ∈ insert 0 A]


theorem evalComp_nil_cons {f g h i j : C} (α : f ⟶ g) (β : g ⟶ h) (η : h ⟶ i) (ηs : i ⟶ j) :
    α ≫ (β ≫ η ≫ ηs) = (α ≫ β) ≫ η ≫ ηs

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f g h i j : C}
(α : f ⟶ g)
(β : g ⟶ h)
(η : h ⟶ i)
(ηs : i ⟶ j)

CategoryTheory.CategoryStruct.comp α (CategoryTheory.CategoryStruct.comp β (CategoryTheory.CategoryStruct.comp η ηs)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.comp α β) (CategoryTheory.CategoryStruct.comp η ηs)


theorem mul_succ (n m : Nat) : n * succ m = n * m + n


@[simp]
theorem continuousAt_lift₂ {f : X → Y → Z} {hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}
    {x : X} {y : Y} :
    ContinuousAt (uncurry <| lift₂ f hf) (mk x, mk y) ↔ ContinuousAt (uncurry f) (x, y)

{hf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}

ContinuousAt (Function.uncurry (SeparationQuotient.lift₂ f hf)) (SeparationQuotient.mk x, SeparationQuotient.mk y) ↔
  ContinuousAt (Function.uncurry f) (x, y)


@[simp]
protected theorem compl_iSup (f : ι → UpperSet α) : (⨆ i, f i).compl = ⨆ i, (f i).compl

{α : Type u_1}
{ι : Sort u_4}
[LE α]
(f : ι → UpperSet α)


@[to_additive]
theorem Filter.Tendsto.mul {f g : α → M} {x : Filter α} {a b : M} (hf : Tendsto f x (𝓝 a))
    (hg : Tendsto g x (𝓝 b)) : Tendsto (fun x => f x * g x) x (𝓝 (a * b))

{α : Type u_2}
{M : Type u_3}
[TopologicalSpace M]
[Add M]
[ContinuousAdd M]
{f g : α → M}
{x : Filter α}
{a b : M}
(hf : Filter.Tendsto f x (𝓝 a))
(hg : Filter.Tendsto g x (𝓝 b))

Filter.Tendsto (fun x => f x + g x) x (𝓝 (a + b))


/-- `Fin.cast` as an `OrderIso`.

`castOrderIso eq i` embeds `i` into an equal `Fin` type. -/
@[simps]
def castOrderIso (eq : n = m) : Fin n ≃o Fin m

(RelIso.symm (Fin.castOrderIso eq)) i = Fin.cast ⋯ i


/-- If `F` reflects pushouts, then it reflects epimorphisms. -/
theorem reflects_epi_of_reflectsColimit {X Y : C} (f : X ⟶ Y) [ReflectsColimit (span f f) F]
    [Epi (F.map f)] : Epi f

[CategoryTheory.Limits.ReflectsColimit (CategoryTheory.Limits.span f f) F]


lemma _root_.CategoryTheory.ShortComplex.exact_iff_exact_toComposableArrows
    (S : ShortComplex C) :
    S.Exact ↔ S.toComposableArrows.Exact


/-- Three points are affinely independent if and only if they are not collinear. -/
theorem affineIndependent_iff_not_collinear_of_ne {p : Fin 3 → P} {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂)
    (h₁₃ : i₁ ≠ i₃) (h₂₃ : i₂ ≠ i₃) :
    AffineIndependent k p ↔ ¬Collinear k ({p i₁, p i₂, p i₃} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p : Fin 3 → P}
{i₁ i₂ i₃ : Fin 3}
(h₁₂ : i₁ ≠ i₂)
(h₁₃ : i₁ ≠ i₃)
(h₂₃ : i₂ ≠ i₃)

AffineIndependent k p ↔ ¬Collinear k {p i₁, p i₂, p i₃}


protected theorem not_le {a b : ℚ} : ¬a ≤ b ↔ b < a


/-- Two isomorphic functors `F₁` and `F₂` induce isomorphic functors
`F₁.mapTriangle` and `F₂.mapTriangle` if the isomorphism `F₁ ≅ F₂` is compatible
with the shifts. -/
@[simps!]
def mapTriangleIso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) [F₁.CommShift ℤ] [F₂.CommShift ℤ]
    [NatTrans.CommShift e.hom ℤ] : F₁.mapTriangle ≅ F₂.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIso e).inv.app X).hom₂ = e.inv.app X.obj₂


@[to_additive]
theorem center_eq_infi' (S : Set G) (hS : closure S = ⊤) :
    center G = ⨅ g : S, centralizer (zpowers (g : G))

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

AddSubgroup.center G = ⨅ g, AddSubgroup.centralizer ↑(AddSubgroup.zmultiples ↑g)


@[to_additive] lemma monotone_prod_take (L : List M) : Monotone fun i => (L.take i).prod

{M : Type u_3}
[CanonicallyOrderedAddCommMonoid M]
(L : List M)


@[simp]
lemma evaluation_eq_zero_iff_not_mem_basicOpen (x : U) (f : X.presheaf.obj (op U)) :
    X.evaluation x f = 0 ↔ x.val ∉ X.toRingedSpace.basicOpen f

{U : TopologicalSpace.Opens ↑X.toTopCat}

(X.evaluation x) f = 0 ↔ ↑x ∉ X.toRingedSpace.basicOpen f


/-- If `φ` is a bump function, compute `(φ ⋆ g) x₀`
if `g` is constant on `Metric.ball x₀ φ.rOut`. -/
theorem convolution_eq_right {x₀ : G} (hg : ∀ x ∈ ball x₀ φ.rOut, g x = g x₀) :
    (φ ⋆[lsmul ℝ ℝ, μ] g : G → E') x₀ = integral μ φ • g x₀

(hg : ∀ x ∈ Metric.ball x₀ φ.rOut, g x = g x₀)

(↑φ ⋆[ContinuousLinearMap.lsmul ℝ ℝ, μ] g) x₀ = MeasureTheory.integral μ ↑φ • g x₀


lemma isUnit_iff_natAbs_eq : IsUnit u ↔ u.natAbs = 1


{α : Type u}
{x y : α}
[BooleanAlgebra α]


/-- See `rank_subsingleton` that assumes `Subsingleton R` instead. -/
theorem rank_subsingleton' [Subsingleton M] : Module.rank R M = 0

(R : Type u)
(M : Type v)
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
[Subsingleton M]


/-- If two lifts of circle homeomorphisms have the same translation number, then they are
semiconjugate by a `CircleDeg1Lift`. This version uses assumptions `IsUnit f₁` and `IsUnit f₂`
to assume that `f₁` and `f₂` are homeomorphisms. -/
theorem semiconj_of_isUnit_of_translationNumber_eq {f₁ f₂ : CircleDeg1Lift} (h₁ : IsUnit f₁)
    (h₂ : IsUnit f₂) (h : τ f₁ = τ f₂) : ∃ F : CircleDeg1Lift, Semiconj F f₁ f₂

(h : f₁.translationNumber = f₂.translationNumber)


protected theorem lt_of_lt_of_eq {n m k : Nat} : n < m → m = k → n < k


theorem le_iSup_inf_iSup (f g : ι → α) : ⨆ i, f i ⊓ g i ≤ (⨆ i, f i) ⊓ ⨆ i, g i

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f g : ι → α)


protected theorem HasBasis.neBot_iff (hl : l.HasBasis p s) :
    NeBot l ↔ ∀ {i}, p i → (s i).Nonempty

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(hl : l.HasBasis p s)

l.NeBot ↔ ∀ {i : ι}, p i → (s i).Nonempty


/-- An `AddMonoidHom` preserves multiplication if pre- and post- composition with
`AddMonoidHom.mul` are equivalent. By converting the statement into an equality of
`AddMonoidHom`s, this lemma allows various specialized `ext` lemmas about `→+` to then be applied.
-/
theorem AddMonoidHom.map_mul_iff (f : R →+ S) :
    (∀ x y, f (x * y) = f x * f y) ↔
      (AddMonoidHom.mul : R →+ R →+ R).compr₂ f = (AddMonoidHom.mul.comp f).compl₂ f

{R : Type u_1}
{S : Type u_2}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R →+ S)

(∀ (x y : R), f (x * y) = f x * f y) ↔ AddMonoidHom.mul.compr₂ f = (AddMonoidHom.mul.comp f).compl₂ f


@[simp]
theorem mk_pow {x : α} (hx : 0 ≤ x) (n : ℕ) :
    (⟨x, hx⟩ : { x : α // 0 ≤ x }) ^ n = ⟨x ^ n, pow_nonneg hx n⟩

{α : Type u_1}
[MonoidWithZero α]
[Preorder α]
[ZeroLEOneClass α]
[PosMulMono α]
{x : α}
(hx : 0 ≤ x)
(n : ℕ)


lemma noetherianSpace_of_isAffineOpen (U : X.Opens) (hU : IsAffineOpen U)
    [IsNoetherianRing Γ(X, U)] :
    NoetherianSpace U

{X : AlgebraicGeometry.Scheme}
(U : X.Opens)
(hU : AlgebraicGeometry.IsAffineOpen U)
[IsNoetherianRing ↑Γ(X, U)]


theorem down'_mk {α : Type*} [AddRightCancelSemigroup α] (a : α) (i j : α) (h : j + a = i) :
    (down' a).Rel i j

{α : Type u_2}
[AddRightCancelSemigroup α]
(a i j : α)
(h : j + a = i)


@[to_additive prodMap_def]
theorem prodMap_def : prodMap f g = (f.comp (fst M N)).prod (g.comp (snd M N))

{M : Type u_5}
{N : Type u_6}
{M' : Type u_8}
{N' : Type u_9}
[Add M]
[Add N]
[Add M']
[Add N']
(f : AddHom M M')
(g : AddHom N N')

f.prodMap g = (f.comp (AddHom.fst M N)).prod (g.comp (AddHom.snd M N))


theorem eval₂_eq_eval_map (g : σ → S₁) (p : MvPolynomial σ R) : p.eval₂ f g = eval g (map f p)

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

MvPolynomial.eval₂ f g p = (MvPolynomial.eval g) ((MvPolynomial.map f) p)


protected theorem cons {n m} {f : Vector ℕ n → ℕ} {g} (hf : @Partrec' n f) (hg : @Vec n m g) :
    Vec fun v => f v ::ᵥ g v

{g : Mathlib.Vector ℕ n → Mathlib.Vector ℕ m}


@[to_additive]
protected theorem mul_left_injective (h : IsUnit b) : Injective (· * b)

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


@[simp]
theorem contMDiffAt_diffeomorph_comp_iff {m} (h : M ≃ₘ^n⟮I, J⟯ N) {f : M' → M} (hm : m ≤ n) {x} :
    ContMDiffAt I' J m (h ∘ f) x ↔ ContMDiffAt I' I m f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{G : Type u_7}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{n m : ℕ∞}
(h : M ≃ₘ^n⟮I, J⟯ N)
{f : M' → M}
(hm : m ≤ n)
{x : M'}

ContMDiffAt I' J m (⇑h ∘ f) x ↔ ContMDiffAt I' I m f x


theorem IsCompact.isLUB_sSup [ClosedIciTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : IsLUB s (sSup s)

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[ClosedIciTopology α]
{s : Set α}
(hs : IsCompact s)
(ne_s : s.Nonempty)


@[simp]
theorem log_exp (x : ℝ) : log (exp x) = x


theorem le_val_last (i : Fin (n + 1)) : i ≤ n


theorem val_prop {S : Set α} (a : { a // a ∈ S }) : a.val ∈ S

{α : Type u_1}
{S : Set α}
(a : { a // a ∈ S })


@[norm_cast]
theorem coe_orderMonoidWithZeroHom_apply (f : α →+*o β) (a : α) : (f : α →*₀o β) a = f a

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


@[simp]
theorem frobenius_nnnorm_map_eq (A : Matrix m n α) (f : α → β) (hf : ∀ a, ‖f a‖₊ = ‖a‖₊) :
    ‖A.map f‖₊ = ‖A‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
{β : Type u_6}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(A : Matrix m n α)
(f : α → β)
(hf : ∀ (a : α), ‖f a‖₊ = ‖a‖₊)


lemma IsStandardSmoothOfRelativeDimension.isStandardSmooth
    [IsStandardSmoothOfRelativeDimension.{t, w} n R S] :
    IsStandardSmooth.{t, w} R S

[Algebra.IsStandardSmoothOfRelativeDimension n R S]


theorem coe_replicate (n : ℕ) (a : α) : (List.replicate n a : Multiset α) = replicate n a

↑(List.replicate n a) = Multiset.replicate n a


theorem localization_comap_inducing [Algebra R S] (M : Submonoid R) [IsLocalization M S] :
    Inducing (comap (algebraMap R S))

{R : Type u}
(S : Type v)
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(M : Submonoid R)
[IsLocalization M S]

Inducing ⇑(PrimeSpectrum.comap (algebraMap R S))


theorem tendsto_comp_exp_atBot {f : ℝ → α} :
    Tendsto (fun x => f (exp x)) atBot l ↔ Tendsto f (𝓝[>] 0) l

{α : Type u_1}
{l : Filter α}
{f : ℝ → α}

Filter.Tendsto (fun x => f (Real.exp x)) Filter.atBot l ↔ Filter.Tendsto f (𝓝[>] 0) l


theorem up_sInf [InfSet α] (s : Set α) : up (sInf s) = sInf (ULift.down ⁻¹' s)

{ down := sInf s } = sInf (ULift.down ⁻¹' s)


theorem mem_bot_iff : t ∈ (⊥ : Finpartition s).parts ↔ ∃ a ∈ s, {a} = t

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


theorem Memℒp.integrable_norm_rpow' [IsFiniteMeasure μ] {f : α → β} {p : ℝ≥0∞} (hf : Memℒp f p μ) :
    Integrable (fun x : α => ‖f x‖ ^ p.toReal) μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
[MeasureTheory.IsFiniteMeasure μ]
{f : α → β}
{p : ℝ≥0∞}
(hf : MeasureTheory.Memℒp f p μ)

MeasureTheory.Integrable (fun x => ‖f x‖ ^ p.toReal) μ


/-- An algebra over a commutative semiring is of `FiniteType` if it is finitely generated
over the base ring as algebra. -/
class Algebra.FiniteType [CommSemiring R] [Semiring A] [Algebra R A] : Prop where
  out : (⊤ : Subalgebra R A).FG

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[self : Algebra.FiniteType R A]


theorem validFor : ∀ {s}, Valid s → ∃ l m r, ValidFor l m r s

s.Valid → ∃ l m r, Substring.ValidFor l m r s


@[simp]
theorem ofReal_lt_ofReal_iff {p q : ℝ} (h : 0 < q) :
    ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q


theorem get_mem : ∀ {o : Option α} (h : isSome o), o.get h ∈ o

{α : Type u_1}
{o : Option α}
(h : o.isSome = true)


@[to_additive]
theorem image_mulSingle_Ioo_left (i : ι) (a : α i) :
    Pi.mulSingle i '' Ioo a 1 = Ioo (Pi.mulSingle i a) 1

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → One (α i)]
(i : ι)
(a : α i)

Pi.mulSingle i '' Set.Ioo a 1 = Set.Ioo (Pi.mulSingle i a) 1


@[simp 1100]
theorem dNext_succ_chainComplex (f : ∀ i j, P.X i ⟶ Q.X j) (i : ℕ) :
    dNext (i + 1) f = P.d _ _ ≫ f i (i + 1)

{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{P Q : ChainComplex V ℕ}
(f : (i j : ℕ) → P.X i ⟶ Q.X j)
(i : ℕ)


theorem ext_iff_isBounded {t t' : Bornology α} :
    t = t' ↔ ∀ s, @IsBounded α t s ↔ @IsBounded α t' s

t = t' ↔ ∀ (s : Set α), Bornology.IsBounded s ↔ Bornology.IsBounded s


theorem Function.Injective.pprod_map {f : α → β} {g : γ → δ} (hf : Injective f) (hg : Injective g) :
    Injective (fun x ↦ ⟨f x.1, g x.2⟩ : PProd α γ → PProd β δ)

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{δ : Sort u_4}
{f : α → β}
{g : γ → δ}
(hf : Function.Injective f)
(hg : Function.Injective g)

Function.Injective fun x => ⟨f x.fst, g x.snd⟩


/-- The cardinality of morphisms `A ⟶ X` is smaller than the cardinality of
the fiber of the target if the source is connected. -/
lemma card_hom_le_card_fiber_of_connected (A X : C) [IsConnected A] :
    Nat.card (A ⟶ X) ≤ Nat.card (F.obj X)

(F : CategoryTheory.Functor C FintypeCat)


theorem Wbtw.trans_left {w x y z : P} (h₁ : Wbtw R w y z) (h₂ : Wbtw R w x y) : Wbtw R w x z

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


@[to_additive (attr := simp)]
lemma max_one [LinearOrder α] : (1 : Finset α).max = 1


@[simp, fun_prop]
theorem Differentiable.mul (ha : Differentiable 𝕜 a) (hb : Differentiable 𝕜 b) :
    Differentiable 𝕜 fun y => a y * b y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a b : E → 𝔸}
(ha : Differentiable 𝕜 a)
(hb : Differentiable 𝕜 b)


@[simp]
theorem blockDiag_transpose (M : Matrix (m × o) (n × o) α) (k : o) :
    blockDiag Mᵀ k = (blockDiag M k)ᵀ

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(M : Matrix (m × o) (n × o) α)
(k : o)


theorem sup_eq_iff_inf_eq : a ⊔ b = b ↔ a ⊓ b = a


theorem nhdsWithin_insert_of_ne [T1Space X] {x y : X} {s : Set X} (hxy : x ≠ y) :
    𝓝[insert y s] x = 𝓝[s] x

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{x y : X}
{s : Set X}
(hxy : x ≠ y)


/-- If the tuple `f` is not the same as `f ∘ sort f`, then `f` has a pair of strictly decreasing
entries. -/
theorem antitone_pair_of_not_sorted (h : f ≠ f ∘ sort f) : ∃ i j, i < j ∧ f j < f i

{n : ℕ}
{α : Type u_1}
[LinearOrder α]
{f : Fin n → α}
(h : f ≠ f ∘ ⇑(Tuple.sort f))


/-- See `lt_tsub_iff_left_of_le_of_le` for a weaker statement in a partial order. -/
protected theorem tsub_lt_tsub_iff_left_of_le (ha : AddLECancellable a) (hb : AddLECancellable b)
    (h : b ≤ a) : a - b < a - c ↔ c < b


@[to_additive]
theorem sSup_inv (s : Set α) : sSup s⁻¹ = (sInf s)⁻¹

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

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


@[to_additive]
theorem le_comap_map {f : F} : S ≤ (S.map f).comap f

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

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


/-- The `sSup` of a union of two sets is the max of the suprema of each subset, under the
assumptions that all sets are bounded above and nonempty. -/
theorem csSup_union (hs : BddAbove s) (sne : s.Nonempty) (ht : BddAbove t) (tne : t.Nonempty) :
    sSup (s ∪ t) = sSup s ⊔ sSup t

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s t : Set α}
(hs : BddAbove s)
(sne : s.Nonempty)
(ht : BddAbove t)
(tne : t.Nonempty)


/-- A well order `r` is order isomorphic to the set of ordinals smaller than `type r`. -/
@[simps]
def enumIso (r : α → α → Prop) [IsWellOrder α r] : Subrel (· < ·) (· < type r) ≃r r

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
(x : ↑fun x => x < Ordinal.type r)

(Ordinal.enumIso r) x = Ordinal.enum r ↑x ⋯


/-- To show `i` is an exponential ideal it suffices to show that `A ⟹ iB` is "in" `D` for any `A` in
`C` and `B` in `D`.
-/
theorem ExponentialIdeal.mk' (h : ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ i.essImage) :
    ExponentialIdeal i


/-- The equivalence classes of the equivalence relation defined by a partition of α equal
    the original partition. -/
theorem classes_mkClasses (c : Set (Set α)) (hc : IsPartition c) :
    (mkClasses c hc.2).classes = c

{α : Type u_1}
(c : Set (Set α))
(hc : Setoid.IsPartition c)


@[to_additive]
protected theorem UniformOnFun.hasBasis_nhds_one (𝔖 : Set <| Set α) (h𝔖₁ : 𝔖.Nonempty)
    (h𝔖₂ : DirectedOn (· ⊆ ·) 𝔖) :
    (𝓝 1 : Filter (α →ᵤ[𝔖] G)).HasBasis
      (fun SV : Set α × Set G => SV.1 ∈ 𝔖 ∧ SV.2 ∈ (𝓝 1 : Filter G)) fun SV =>
      { f : α →ᵤ[𝔖] G | ∀ x ∈ SV.1, f x ∈ SV.2 }

(h𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

(𝓝 0).HasBasis (fun SV => SV.1 ∈ 𝔖 ∧ SV.2 ∈ 𝓝 0) fun SV => {f | ∀ x ∈ SV.1, f x ∈ SV.2}


theorem subset_adjoin_of_subset_right {T : Set E} (H : T ⊆ S) : T ⊆ adjoin F S

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S : Set E)
{T : Set E}
(H : T ⊆ S)


/-- Given an open set `s` in a finite-dimensional real normed vector space, there exists a smooth
function with values in `[0, 1]` whose support is exactly `s`. -/
theorem IsOpen.exists_smooth_support_eq {s : Set E} (hs : IsOpen s) :
    ∃ f : E → ℝ, f.support = s ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{s : Set E}
(hs : IsOpen s)

∃ f, Function.support f = s ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1


@[to_additive]
theorem tprod_eq_zero_mul [T2Space G] {f : ℕ → G} (hf : Multipliable f) :
    ∏' b, f b = f 0 * ∏' b, f (b + 1)

{G : Type u_2}
[CommGroup G]
[TopologicalSpace G]
[TopologicalGroup G]
[T2Space G]
{f : ℕ → G}
(hf : Multipliable f)


@[simp]
protected lemma comp_zero {n₁ n₂ n₁₂ : ℤ} (z₁ : Cochain F G n₁)
    (h : n₁ + n₂ = n₁₂) : z₁.comp (0 : Cochain G K n₂) h = 0

(z₁ : CochainComplex.HomComplex.Cochain F G n₁)


@[to_additive]
lemma iIndepFun.indepFun_div_right (hf_indep : iIndepFun (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hij : i ≠ j) (hik : i ≠ k) :
    IndepFun (f i) (f j / f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iIndepFun (fun x => m) f μ)

ProbabilityTheory.IndepFun (f i) (f j / f k) μ


theorem inr_mul_inl [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) :
    (inr m * inl r : tsze R M) = inr (m <• r)

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module Rᵐᵒᵖ M]
(r : R)
(m : M)

TrivSqZeroExt.inr m * TrivSqZeroExt.inl r = TrivSqZeroExt.inr (m <• r)


/-- The support of `n.factorization` is exactly `n.primeFactors`. -/
@[simp] lemma support_factorization (n : ℕ) : (factorization n).support = n.primeFactors


protected theorem mono (hC : IsExposed 𝕜 A C) (hBA : B ⊆ A) (hCB : C ⊆ B) : IsExposed 𝕜 B C

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A B C : Set E}
(hC : IsExposed 𝕜 A C)
(hBA : B ⊆ A)
(hCB : C ⊆ B)


@[simp] lemma mk_add (i j : NumDenSameDeg 𝒜 x) : mk (i + j) = mk i + mk j

(i j : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

HomogeneousLocalization.mk (i + j) = HomogeneousLocalization.mk i + HomogeneousLocalization.mk j


@[to_additive (attr := simp)]
theorem range_subtype (s : Submonoid M) : mrange s.subtype = s

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


@[ghost_simps]
theorem ghostComponent_zero_verschiebung (x : 𝕎 R) : ghostComponent 0 (verschiebung x) = 0

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

(WittVector.ghostComponent 0) (WittVector.verschiebung x) = 0


protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0

{α : Type u_1}
(p : α → Bool)
{n : Nat}
(l : List α)

List.countP.go p l n = n + List.countP.go p l 0


theorem sum_condensed_le' (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (n : ℕ) :
    (∑ k ∈ range n, 2 ^ k • f (2 ^ (k + 1))) ≤ ∑ k ∈ Ico 2 (2 ^ n + 1), f k

(hf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m)

∑ k ∈ Finset.range n, 2 ^ k • f (2 ^ (k + 1)) ≤ ∑ k ∈ Finset.Ico 2 (2 ^ n + 1), f k


/-- (Impl) The natural transformation used to define the new cone -/
@[simps]
def γ : D ⋙ T.forget ⋙ ↑T ⟶ D ⋙ T.forget

(D : CategoryTheory.Functor J T.Algebra)

(CategoryTheory.Monad.ForgetCreatesLimits.γ D).app j = (D.obj j).a


@[simp]
theorem equiv_apply : b.equiv b' e (b i) = b' (e i)

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(i : ι)
(b' : Basis ι' R M')
(e : ι ≃ ι')


protected theorem neg {B : BilinForm R₁ M₁} (hB : B.IsSymm) : (-B).IsSymm

{R₁ : Type u_3}
{M₁ : Type u_4}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B : LinearMap.BilinForm R₁ M₁}
(hB : B.IsSymm)


@[simp] theorem top_ne_ofReal {r : ℝ} : ∞ ≠ ENNReal.ofReal r


@[simp]
theorem succ_zero : succ (0 : Cardinal) = 1


/-- See also `pow_left_strictMonoOn`. -/
@[to_additive nsmul_right_strictMono]  -- Porting note: nolint to_additive_doc
theorem pow_left_strictMono (hn : n ≠ 0) : StrictMono (· ^ n : M → M)

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

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


theorem connectedComponentIn_nonempty_iff {x : α} {F : Set α} :
    (connectedComponentIn F x).Nonempty ↔ x ∈ F

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


theorem liminf_le_limsup {f : Filter β} [NeBot f] {u : β → α}
    (h : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h' : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault) :
    liminf u f ≤ limsup u f

(h : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

(h' : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)


theorem setToFun_congr_measure {μ' : Measure α} (c c' : ℝ≥0∞) (hc : c ≠ ∞) (hc' : c' ≠ ∞)
    (hμ_le : μ ≤ c • μ') (hμ'_le : μ' ≤ c' • μ) (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ' T C') (f : α → E) :
    setToFun μ T hT f = setToFun μ' T hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ' T C')

MeasureTheory.setToFun μ T hT f = MeasureTheory.setToFun μ' T hT' f


theorem not_ex_isAtomic (φ : L.BoundedFormula α (n + 1)) : ¬φ.ex.IsAtomic

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


theorem range_coe_union_infty : range ((↑) : X → OnePoint X) ∪ {∞} = univ

Set.range OnePoint.some ∪ {OnePoint.infty} = Set.univ


theorem ext (a b : Array α)
    (h₁ : a.size = b.size)
    (h₂ : (i : Nat) → (hi₁ : i < a.size) → (hi₂ : i < b.size) → a[i] = b[i])
    : a = b

(h₂ : ∀ (i : Nat) (hi₁ : i < a.length) (hi₂ : i < b.length), a.get ⟨i, hi₁⟩ = b.get ⟨i, hi₂⟩)


@[simp]
theorem stalkSpecializes_refl {C : Type*} [Category C] [Limits.HasColimits C] {X : TopCat}
    (F : X.Presheaf C) (x : X) : F.stalkSpecializes (specializes_refl x) = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Limits.HasColimits C]
{X : TopCat}
(F : TopCat.Presheaf C X)
(x : ↑X)


theorem polyOfInterest_vars_eq (n : ℕ) : (polyOfInterest p n).vars =
    ((p : 𝕄) ^ (n + 1) * (wittMul p (n + 1) + (p : 𝕄) ^ (n + 1) * X (0, n + 1) * X (1, n + 1) -
      X (0, n + 1) * rename (Prod.mk (1 : Fin 2)) (wittPolynomial p ℤ (n + 1)) -
      X (1, n + 1) * rename (Prod.mk (0 : Fin 2)) (wittPolynomial p ℤ (n + 1)))).vars

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(WittVector.polyOfInterest p n).vars =
  (↑p ^ (n + 1) *
      (WittVector.wittMul p (n + 1) + ↑p ^ (n + 1) * MvPolynomial.X (0, n + 1) * MvPolynomial.X (1, n + 1) -
          MvPolynomial.X (0, n + 1) * (MvPolynomial.rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) -
        MvPolynomial.X (1, n + 1) * (MvPolynomial.rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)))).vars


/-- If a countable family of closed sets cover a dense `Gδ` set, then the union of their interiors
is dense. Formulated here with `⋃₀`. -/
theorem IsGδ.dense_sUnion_interior_of_closed {T : Set (Set X)} {s : Set X} (hs : IsGδ s)
    (hd : Dense s) (hc : T.Countable) (hc' : ∀ t ∈ T, IsClosed t) (hU : s ⊆ ⋃₀ T) :
    Dense (⋃ t ∈ T, interior t)

{X : Type u_1}
[TopologicalSpace X]
[BaireSpace X]
{T : Set (Set X)}
{s : Set X}
(hs : IsGδ s)
(hd : Dense s)
(hc : T.Countable)
(hc' : ∀ t ∈ T, IsClosed t)
(hU : s ⊆ ⋃₀ T)


theorem mem_asymm {x y : ZFSet} : x ∈ y → y ∉ x


/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[PolishSpace β]
{f : α → β}
(hf : ClosedEmbedding f)


theorem eq_bot_of_generator_maximal_submoduleImage_eq_zero {N O : Submodule R M} (b : Basis ι R O)
    (hNO : N ≤ O) {ϕ : O →ₗ[R] R} (hϕ : ∀ ψ : O →ₗ[R] R, ¬ϕ.submoduleImage N < ψ.submoduleImage N)
    [(ϕ.submoduleImage N).IsPrincipal] (hgen : generator (ϕ.submoduleImage N) = 0) : N = ⊥

(hϕ : ∀ (ψ : ↥O →ₗ[R] R), ¬ϕ.submoduleImage N < ψ.submoduleImage N)

(hgen : Submodule.IsPrincipal.generator (ϕ.submoduleImage N) = 0)


@[to_additive]
theorem Subsingleton.pi_mulSingle_eq {α : Type*} [DecidableEq I] [Subsingleton I] [One α]
    (i : I) (x : α) : Pi.mulSingle i x = fun _ => x

{I : Type u}
{α : Type u_4}
[DecidableEq I]
[Subsingleton I]
[Zero α]
(i : I)
(x : α)


@[to_additive]
theorem mul_comm : ∀ a b : G, a * b = b * a


@[mono]
theorem ofDigits_monotone {p q : ℕ} (L : List ℕ) (h : p ≤ q) : ofDigits p L ≤ ofDigits q L


@[simp]
theorem char_dual (V : FDRep k G) (g : G) : (of (dual V.ρ)).character g = V.character g⁻¹

{k : Type u}
[Field k]
{G : Type u}
[Group G]
(V : FDRep k G)
(g : G)

(FDRep.of (Representation.dual V.ρ)).character g = V.character g⁻¹


@[to_additive (attr := simp)]
theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i' = 1

{I : Type u}
{f : I → Type v₁}
[DecidableEq I]
[(i : I) → One (f i)]
{i i' : I}
(h : i' ≠ i)
(x : f i)


theorem Filter.EventuallyEq.fderivWithin_eq_nhds (h : f₁ =ᶠ[𝓝 x] f) :
    fderivWithin 𝕜 f₁ s x = fderivWithin 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
{s : Set E}
(h : f₁ =ᶠ[𝓝 x] f)


theorem core_subset : ((· ⊆ ·) ⇒ (· ⊆ ·)) r.core r.core

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)

((fun x x_1 => x ⊆ x_1) ⇒ fun x x_1 => x ⊆ x_1) r.core r.core


theorem choose_property (hp : ∃! a, a ∈ l ∧ p a) : p (choose p l hp)

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(l : Finset α)
(hp : ∃! a, a ∈ l ∧ p a)


@[simp] theorem H1LequivOfIsTrivial_H1_π_apply_apply
    [A.IsTrivial] (f : oneCocycles A) (x : Additive G) :
    H1LequivOfIsTrivial A (H1_π A f) x = f.1 (Additive.toMul x)

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

((groupCohomology.H1LequivOfIsTrivial A) ((groupCohomology.H1_π A) f)) x = ↑f (Additive.toMul x)


@[simp]
theorem isAtom_iff [OrderBot α] [OrderBot β] (f : α ≃o β) (a : α) : IsAtom (f a) ↔ IsAtom a

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[PartialOrder β]
[OrderBot α]
[OrderBot β]
(f : α ≃o β)
(a : α)


@[simp]
private theorem bracket'_tmul (s t : A) (x : L) (m : M) :
    bracket' R A L M (s ⊗ₜ[R] x) (t ⊗ₜ[R] m) = (s * t) ⊗ₜ ⁅x, m⁆

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[CommRing A]
[Algebra R A]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(s t : A)
(x : L)
(m : M)

((LieAlgebra.ExtendScalars.bracket' R A L M) (s ⊗ₜ[R] x)) (t ⊗ₜ[R] m) = (s * t) ⊗ₜ[R] ⁅x, m⁆


lemma dropSlice_sublist (n m : ℕ) (l : List α) : l.dropSlice n m <+ l


theorem sInf_image2_eq_sInf_sSup (h₁ : ∀ b, GaloisConnection (l₁ b) (swap u b))
    (h₂ : ∀ a, GaloisConnection (toDual ∘ l₂ a) (u a ∘ ofDual)) :
    sInf (image2 u s t) = u (sInf s) (sSup t)

{u : α → β → γ}

{l₁ : β → γ → α}

{l₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (l₁ b) (Function.swap u b))

(h₂ : ∀ (a : α), GaloisConnection (⇑OrderDual.toDual ∘ l₂ a) (u a ∘ ⇑OrderDual.ofDual))

sInf (Set.image2 u s t) = u (sInf s) (sSup t)


@[simp, norm_cast]
theorem coe_smul (c : S₂) (f : M₁ →SL[σ₁₂] M₂) :
    ↑(c • f) = c • (f : M₁ →ₛₗ[σ₁₂] M₂)

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{S₂ : Type u_9}
[Monoid S₂]
[DistribMulAction S₂ M₂]
[SMulCommClass R₂ S₂ M₂]
[ContinuousConstSMul S₂ M₂]
(c : S₂)
(f : M₁ →SL[σ₁₂] M₂)


lemma additive_of_full_essSurj_comp [Full F] [EssSurj F] (G : D ⥤ E)
    [(F ⋙ G).Additive] : G.Additive

{C : Type u_1}
{D : Type u_2}
{E : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} E]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
[CategoryTheory.Preadditive E]
(F : CategoryTheory.Functor C D)
[F.Additive]
[F.Full]
[F.EssSurj]
(G : CategoryTheory.Functor D E)
[(F.comp G).Additive]


theorem destruct_eq_think {s : Computation α} {s'} : destruct s = Sum.inr s' → s = think s'


@[simp]
theorem top_snd : (⊤ : Concept α β r).snd = intentClosure r univ

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}


@[simp]
theorem coe_Ioi (a : α) : ↑(Ioi a) = Set.Ioi a


/-- A Lie derivation `D` from the Lie `R`-algebra `L` to the `L`-module `M` is an `R`-linear map
that satisfies the Leibniz rule `D [a, b] = [a, D b] - [b, D a]`. -/
structure LieDerivation (R L M : Type*) [CommRing R] [LieRing L] [LieAlgebra R L]
    [AddCommGroup M] [Module R M] [LieRingModule L M] [LieModule R L M]
    extends L →ₗ[R] M where
  protected leibniz' (a b : L) : toLinearMap ⁅a, b⁆ = ⁅a, toLinearMap b⁆ - ⁅b, toLinearMap a⁆

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(self : LieDerivation R L M)
(a b : L)

↑self ⁅a, b⁆ = ⁅a, ↑self b⁆ - ⁅b, ↑self a⁆


/-- The strong pigeonhole principle for finitely many pigeons and pigeonholes.  Given a function `f`
between finite types `α` and `β` and a number `b` such that `card β • b ≤ card α`, there exists an
element `y : β` such that its preimage has at least `b` elements.
See also `Fintype.exists_lt_card_fiber_of_nsmul_lt_card` for a stronger statement. -/
theorem exists_le_card_fiber_of_nsmul_le_card [Nonempty β] (hb : card β • b ≤ card α) :
    ∃ y : β, b ≤ (univ.filter fun x => f x = y).card

(hb : Fintype.card β • b ≤ ↑(Fintype.card α))

∃ y, b ≤ ↑(Finset.filter (fun x => f x = y) Finset.univ).card


/-- Quotienting by the torsion submodule gives a torsion-free module. -/
@[simp]
theorem torsion_eq_bot : torsion R (M ⧸ torsion R M) = ⊥

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]

Submodule.torsion R (M ⧸ Submodule.torsion R M) = ⊥


theorem mem_source : x ∈ e.source ↔ proj x ∈ e.baseSet

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


@[reassoc (attr := simp)]
lemma functorMapSrc_functorObjTop :
    functorMapSrc f πX πY φ hφ ≫ functorObjTop f πY = functorObjTop f πX ≫ φ

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πX)) C]

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πY)) C]

(hφ : CategoryTheory.CategoryStruct.comp φ πY = πX)

CategoryTheory.CategoryStruct.comp (CategoryTheory.SmallObject.functorMapSrc f πX πY φ hφ)
    (CategoryTheory.SmallObject.functorObjTop f πY) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.SmallObject.functorObjTop f πX) φ


@[simp]
theorem cliqueSet_eq_empty_iff : G.cliqueSet n = ∅ ↔ G.CliqueFree n

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}


@[to_additive]
theorem mul_lt_of_lt_one_of_lt' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α} (ha : a < 1)
    (hbc : b < c) :
    a * b < c

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


theorem map_atBot_eq_of_gc [SemilatticeInf α] [SemilatticeInf β] {f : α → β} (g : β → α) (b' : β)
    (hf : Monotone f) (gc : ∀ a, ∀ b ≤ b', b ≤ f a ↔ g b ≤ a) (hgi : ∀ b ≤ b', f (g b) ≤ b) :
    map f atBot = atBot

(gc : ∀ (a : α), ∀ b ≤ b', b ≤ f a ↔ g b ≤ a)

Filter.map f Filter.atBot = Filter.atBot


theorem AEMeasurable.isLUB {ι} {μ : Measure δ} [Countable ι] {f : ι → δ → α} {g : δ → α}
    (hf : ∀ i, AEMeasurable (f i) μ) (hg : ∀ᵐ b ∂μ, IsLUB { a | ∃ i, f i b = a } (g b)) :
    AEMeasurable g μ

{f : ι → δ → α}

(hg : ∀ᵐ (b : δ) ∂μ, IsLUB {a | ∃ i, f i b = a} (g b))


@[simp, norm_cast]
theorem cast_natCast' (k : ℕ) : (cast (k : ZMod n) : R) = k

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


theorem isCoatom_singleton_compl (x : α) : IsCoatom ({x}ᶜ : Set α)


theorem Perm.inter_left (l : List α) {t₁ t₂ : List α} (p : t₁ ~ t₂) : l ∩ t₁ = l ∩ t₂

{α : Type u_1}
[DecidableEq α]
(l : List α)
{t₁ t₂ : List α}
(p : t₁ ~ t₂)


/-- Factoring through the coimage is a strong epi-mono factorisation. -/
@[simps]
def coimageStrongEpiMonoFactorisation : StrongEpiMonoFactorisation f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
{P Q : C}
(f : P ⟶ Q)

(CategoryTheory.Abelian.coimageStrongEpiMonoFactorisation f).m = CategoryTheory.Abelian.factorThruCoimage f


@[to_additive (attr := simp) existing nsmul_zmod_val_inv_nsmul]
lemma pow_zmod_val_inv_pow (hn : (Nat.card α).Coprime n) (a : α) :
    (a ^ (n⁻¹ : ZMod (Nat.card α)).val) ^ n = a

{α : Type u_1}
[Group α]
{n : ℕ}
(hn : (Nat.card α).Coprime n)
(a : α)


@[to_additive]
theorem mul_subset_iff_right : s * t ⊆ u ↔ ∀ b ∈ t, op b • s ⊆ u

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

s + t ⊆ u ↔ ∀ b ∈ t, AddOpposite.op b +ᵥ s ⊆ u


theorem dist_ofPreNNDist_le (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) (x y : X) :
    @dist X (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x
        y ≤
      d x y

(dist_comm : ∀ (x y : X), d x y = d y x)


theorem _root_.Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s : Set α} {a : α} :
    f a ∈ f '' s ↔ a ∈ s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
{s : Set α}
{a : α}


lemma cfcHom_closedEmbedding :
    ClosedEmbedding <| (cfcHom ha : C(spectrum R a, R) →⋆ₐ[R] A)

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
{a : A}
(ha : p a)


@[simp low]
theorem uncurry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}
    (f : Function.FromTypes p τ) (args : (i : Fin (n + 1)) → p i) :
    uncurry f args = uncurry (f (args 0)) (Fin.tail args)

f.uncurry args = (f (args 0)).uncurry (Fin.tail args)


theorem PairwiseDisjoint.elim_finset {s : Set ι} {f : ι → Finset α} (hs : s.PairwiseDisjoint f)
    {i j : ι} (hi : i ∈ s) (hj : j ∈ s) (a : α) (hai : a ∈ f i) (haj : a ∈ f j) : i = j

{α : Type u_1}
{ι : Type u_2}
{s : Set ι}
{f : ι → Finset α}
(hs : s.PairwiseDisjoint f)
{i j : ι}
(hi : i ∈ s)
(hj : j ∈ s)
(a : α)
(hai : a ∈ f i)
(haj : a ∈ f j)


@[simp]
theorem sub_f_apply (f g : C ⟶ D) (i : ι) : (f - g).f i = f.f i - g.f i

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f g : C ⟶ D)
(i : ι)


@[simp] lemma not_even_bit1 (n : ℕ) : ¬Even (2 * n + 1)


theorem Subset.trans {l₁ l₂ l₃ : List α} (h₁ : l₁ ⊆ l₂) (h₂ : l₂ ⊆ l₃) : l₁ ⊆ l₃

{α : Type u_1}
{l₁ l₂ l₃ : List α}
(h₁ : l₁ ⊆ l₂)
(h₂ : l₂ ⊆ l₃)


/-- `m` is `n`-smooth if and only if `m` is nonzero and all prime divisors `≤ m` of `m`
are less than `n`. -/
lemma mem_smoothNumbers_iff_forall_le {n m : ℕ} :
    m ∈ smoothNumbers n ↔ m ≠ 0 ∧ ∀ p ≤ m, p.Prime → p ∣ m → p < n

m ∈ n.smoothNumbers ↔ m ≠ 0 ∧ ∀ p ≤ m, Nat.Prime p → p ∣ m → p < n


@[simp]
theorem realize_top : (⊤ : L.Formula α).Realize v ↔ True

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{v : α → M}


theorem yz_succ_succ (n) : yz a1 (n + 2) = (2 * a : ℕ) * yz a1 (n + 1) - yz a1 n

Pell.yz a1 (n + 2) = ↑(2 * a) * Pell.yz a1 (n + 1) - Pell.yz a1 n


theorem nnnorm_def (a : 𝓜(𝕜, A)) : ‖a‖₊ = ‖toProdHom a‖₊

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(a : 𝓜(𝕜, A))


theorem IsCompact.sInf_mem [ClosedIicTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : sInf s ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[ClosedIicTopology α]
{s : Set α}
(hs : IsCompact s)
(ne_s : s.Nonempty)


/-- Two algebra morphisms are equal on `Algebra.span s`iff they are equal on s -/
theorem eqOn_adjoin_iff {φ ψ : A →ₐ[R] B} {s : Set A}  :
    Set.EqOn φ ψ (adjoin R s) ↔ Set.EqOn φ ψ s

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
{φ ψ : A →ₐ[R] B}
{s : Set A}

Set.EqOn ⇑φ ⇑ψ ↑(Algebra.adjoin R s) ↔ Set.EqOn (⇑φ) (⇑ψ) s


theorem condCDF_ae_eq (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (r : ℚ) :
    (fun a ↦ condCDF ρ a r) =ᵐ[ρ.fst] fun a ↦ (preCDF ρ r a).toReal

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]
(r : ℚ)

(fun a => ↑(ProbabilityTheory.condCDF ρ a) ↑r) =ᵐ[ρ.fst] fun a => (ProbabilityTheory.preCDF ρ r a).toReal


@[simp]
theorem antidiagonal_zero : antidiagonal (0 : α →₀ ℕ) = singleton (0, 0)


/-- Multiplying the first vector passed to `oangle` by a positive real does not change the
angle. -/
@[simp]
theorem oangle_smul_left_of_pos (x y : V) {r : ℝ} (hr : 0 < r) :
    o.oangle (r • x) y = o.oangle x y

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


theorem map_range_eq_span_tprod :
    LinearMap.range (map f) =
      Submodule.span R {t | ∃ (m : Π i, s i), tprod R (fun i ↦ f i (m i)) = t}

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
{t : ι → Type u_11}
[(i : ι) → AddCommMonoid (t i)]
[(i : ι) → Module R (t i)]
(f : (i : ι) → s i →ₗ[R] t i)

LinearMap.range (PiTensorProduct.map f) = Submodule.span R {t_1 | ∃ m, (⨂ₜ[R] (i : ι), (f i) (m i)) = t_1}


theorem cos_pos_of_le_one {x : ℝ} (hx : |x| ≤ 1) : 0 < cos x


theorem ext_abs_arg {x y : ℂ} (h₁ : abs x = abs y) (h₂ : x.arg = y.arg) : x = y

{x y : ℂ}
(h₁ : Complex.abs x = Complex.abs y)
(h₂ : x.arg = y.arg)


/-- A vector added to the second point lies in the affine span of two points if and only if it is
a multiple of their difference. -/
theorem vadd_right_mem_affineSpan_pair {p₁ p₂ : P} {v : V} :
    v +ᵥ p₂ ∈ line[k, p₁, p₂] ↔ ∃ r : k, r • (p₁ -ᵥ p₂) = v

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ : P}
{v : V}

v +ᵥ p₂ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v


@[simp]
theorem infs_eq_empty : s ⊼ t = ∅ ↔ s = ∅ ∨ t = ∅

{α : Type u_2}
[SemilatticeInf α]
{s t : Set α}


@[to_additive]
lemma one_le_elim_iff : 1 ≤ Sum.elim v₁ v₂ ↔ 1 ≤ v₁ ∧ 1 ≤ v₂

{α₁ : Type u_1}
{α₂ : Type u_2}
{β : Type u_3}
[LE β]
[Zero β]
{v₁ : α₁ → β}
{v₂ : α₂ → β}


theorem lift'_inf_principal_eq {h : Set α → Set β} {s : Set β} :
    f.lift' h ⊓ 𝓟 s = f.lift' fun t => h t ∩ s

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


@[simp]
theorem Finite.toFinset_insert [DecidableEq α] {s : Set α} {a : α} (hs : (insert a s).Finite) :
    hs.toFinset = insert a (hs.subset <| subset_insert _ _).toFinset

{α : Type u}
[DecidableEq α]
{s : Set α}
{a : α}
(hs : (insert a s).Finite)


theorem zero_lf_inv' : ∀ x : PGame, 0 ⧏ inv' x


theorem uniformity_multiplicative : 𝓤 (Multiplicative α) = (𝓤 α).map (Prod.map ofAdd ofAdd)

𝓤 (Multiplicative α) = Filter.map (Prod.map ⇑Multiplicative.ofAdd ⇑Multiplicative.ofAdd) (𝓤 α)


theorem mem_sup_right {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{S T : NonUnitalSubalgebra R A}
{x : A}


@[simp]
theorem lcongr_apply_apply {ι κ : Sort _} (e₁ : ι ≃ κ) (e₂ : M ≃ₗ[R] N) (f : ι →₀ M) (k : κ) :
    lcongr e₁ e₂ f k = e₂ (f (e₁.symm k))

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

((Finsupp.lcongr e₁ e₂) f) k = e₂ (f (e₁.symm k))


theorem functorPushforward_union (S R : Sieve X) :
    (S ⊔ R).functorPushforward F = S.functorPushforward F ⊔ R.functorPushforward F

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

CategoryTheory.Sieve.functorPushforward F (S ⊔ R) =
  CategoryTheory.Sieve.functorPushforward F S ⊔ CategoryTheory.Sieve.functorPushforward F R


theorem adjoin_eq_ring_closure (s : Set A) :
    (adjoin R s).toSubring = Subring.closure (Set.range (algebraMap R A) ∪ s)

{R : Type uR}
{A : Type uA}
[CommRing R]
[Ring A]
[Algebra R A]
(s : Set A)

(Algebra.adjoin R s).toSubring = Subring.closure (Set.range ⇑(algebraMap R A) ∪ s)


@[simp]
lemma opcyclesMap'_id (h : S.RightHomologyData) :
    opcyclesMap' (𝟙 S) h h = 𝟙 _

CategoryTheory.ShortComplex.opcyclesMap' (CategoryTheory.CategoryStruct.id S) h h = CategoryTheory.CategoryStruct.id h.Q


lemma not_boundaryLE_prev' [e.IsRelIff] {i j : ι} (hj : ¬ e.BoundaryLE j) (hk : c.prev j = i) :
    ¬ e.BoundaryLE i

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
[e.IsRelIff]
{i j : ι}
(hj : ¬e.BoundaryLE j)
(hk : c.prev j = i)


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

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableNeg G]
[μ.IsAddLeftInvariant]

MeasureTheory.Measure.QuasiMeasurePreserving Neg.neg μ μ


@[simp]
lemma scaleRoots_C (r c : R) : (C c).scaleRoots r = C c

(Polynomial.C c).scaleRoots r = Polynomial.C c


/-- The forgetful functor from `LocallyRingedSpace` to `SheafedSpace CommRing`. -/
@[simps]
def forgetToSheafedSpace : LocallyRingedSpace.{u} ⥤ SheafedSpace CommRingCat.{u}

AlgebraicGeometry.LocallyRingedSpace.forgetToSheafedSpace.obj X = X.toSheafedSpace


lemma covBy_iff_exists_erase : s ⋖ t ↔ ∃ a ∈ t, t.erase a = s

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


theorem _root_.Measurable.lmarginal (hf : Measurable f) : Measurable (∫⋯∫⁻_s, f ∂μ)

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

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


theorem restrict_restrict₀ (hs : NullMeasurableSet s (μ.restrict t)) :
    (μ.restrict t).restrict s = μ.restrict (s ∩ t)

(hs : MeasureTheory.NullMeasurableSet s (μ.restrict t))


/-- Permuting a vector on the right of a dot product can be transferred to the left. -/
@[simp]
theorem dotProduct_comp_equiv_symm (e : n ≃ m) : u ⬝ᵥ x ∘ e.symm = u ∘ e ⬝ᵥ x

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Fintype m]
[Fintype n]
[NonUnitalNonAssocSemiring α]
(u : m → α)
(x : n → α)
(e : n ≃ m)


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

(S : CategoryTheory.ShortComplex.SnakeInput C)

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


/-- The first morphism of triangles given by an octahedron. -/
@[simps]
def triangleMorphism₁ : Triangle.mk u₁₂ v₁₂ w₁₂ ⟶ Triangle.mk u₁₃ v₁₃ w₁₃

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)

h.triangleMorphism₁.hom₁ = CategoryTheory.CategoryStruct.id X₁


theorem setToSimpleFunc_nonneg' (T : Set α → G' →L[ℝ] G'')
    (hT_nonneg : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, 0 ≤ x → 0 ≤ T s x) (f : α →ₛ G') (hf : 0 ≤ f)
    (hfi : Integrable f μ) : 0 ≤ setToSimpleFunc T f

(hT_nonneg : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : G'), 0 ≤ x → 0 ≤ (T s) x)

0 ≤ MeasureTheory.SimpleFunc.setToSimpleFunc T f


theorem ediam_smul_le (c : 𝕜) (s : Set E) : EMetric.diam (c • s) ≤ ‖c‖₊ • EMetric.diam s

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedAddCommGroup 𝕜]
[SeminormedAddCommGroup E]
[SMulZeroClass 𝕜 E]
[BoundedSMul 𝕜 E]
(c : 𝕜)
(s : Set E)


/-- A regular epimorphism is a morphism which is the coequalizer of some parallel pair. -/
class RegularEpi (f : X ⟶ Y) where
  /-- An object from `C` -/
  W : C -- Porting note: violates naming convention but what is better?
  /-- Two maps to the domain of `f` -/
  (left right : W ⟶ X)
  /-- `f` coequalizes the two maps -/
  w : left ≫ f = right ≫ f := by aesop_cat
  /-- `f` is the coequalizer -/
  isColimit : IsColimit (Cofork.ofπ f w)

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

CategoryTheory.CategoryStruct.comp CategoryTheory.RegularEpi.left f =
  CategoryTheory.CategoryStruct.comp CategoryTheory.RegularEpi.right f


/-- If a function has compact support, then either the function is trivial
or the space is finite-dimensional. -/
theorem HasCompactSupport.eq_zero_or_finiteDimensional {X : Type*} [TopologicalSpace X] [Zero X]
    [T1Space X] {f : E → X} (hf : HasCompactSupport f) (h'f : Continuous f) :
    f = 0 ∨ FiniteDimensional 𝕜 E

(𝕜 : Type u)
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
{X : Type u_1}
[TopologicalSpace X]
[Zero X]
[T1Space X]
{f : E → X}
(hf : HasCompactSupport f)
(h'f : Continuous f)


theorem isNoetherian_spanSingleton_inv_to_map_mul (x : R₁) {I : FractionalIdeal R₁⁰ K}
    (hI : IsNoetherian R₁ I) :
    IsNoetherian R₁ (spanSingleton R₁⁰ (algebraMap R₁ K x)⁻¹ * I : FractionalIdeal R₁⁰ K)

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[frac : IsFractionRing R₁ K]
[IsDomain R₁]
(x : R₁)
{I : FractionalIdeal R₁⁰ K}
(hI : IsNoetherian R₁ ↥↑I)

IsNoetherian R₁ ↥↑(FractionalIdeal.spanSingleton R₁⁰ ((algebraMap R₁ K) x)⁻¹ * I)


lemma coyonedaEquiv_coyoneda_map {X Y : C} (f : X ⟶ Y) :
    coyonedaEquiv (coyoneda.map f.op) = f

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

CategoryTheory.coyonedaEquiv (CategoryTheory.coyoneda.map f.op) = f


@[to_additive]
theorem lt_mul_of_le_of_one_lt [CovariantClass α α (· * ·) (· < ·)] {a b c : α} (hbc : b ≤ c)
    (ha : 1 < a) :
    b < c * a

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


/-- An implication of predicates `P → P'` induces a monoidal functor between full monoidal
subcategories. -/
@[simps]
def fullMonoidalSubcategory.map (h : ∀ ⦃X⦄, P X → P' X) :
    MonoidalFunctor (FullSubcategory P) (FullSubcategory P')

(CategoryTheory.MonoidalCategory.fullMonoidalSubcategory.map h).ε =
  CategoryTheory.CategoryStruct.id (𝟙_ (CategoryTheory.FullSubcategory P'))


@[simp] theorem filter_nil (p : α → Bool) : filter p [] = []


theorem univ_eq : (Finset.univ : Finset SignType) = {0, -1, 1}


/-- The values of a multiplicative character `χ` such that `χ^n = 1` are contained in `ℤ[μ]` when
`μ` is a primitive `n`th root of unity. -/
lemma apply_mem_algebraAdjoin_of_pow_eq_one {χ : MulChar F R} {n : ℕ} (hn : n ≠ 0) (hχ : χ ^ n = 1)
    {μ : R} (hμ : IsPrimitiveRoot μ n) (a : F) :
    χ a ∈ Algebra.adjoin ℤ {μ}

{F : Type u_1}
[Field F]
[Finite F]
{R : Type u_2}
[CommRing R]
[IsDomain R]
{χ : MulChar F R}
{n : ℕ}
(hn : n ≠ 0)
(hχ : χ ^ n = 1)
{μ : R}
(hμ : IsPrimitiveRoot μ n)
(a : F)


@[to_additive (attr := simp)]
theorem toList_prod (xs : List (FreeMonoid α)) : toList xs.prod = (xs.map toList).join

{α : Type u_1}
(xs : List (FreeAddMonoid α))

FreeAddMonoid.toList xs.sum = (List.map (⇑FreeAddMonoid.toList) xs).join


theorem restrict_apply {f : M →ₗ[R] M₁} {p : Submodule R M} {q : Submodule R M₁}
    (hf : ∀ x ∈ p, f x ∈ q) (x : p) : f.restrict hf x = ⟨f x, hf x.1 x.2⟩

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
{f : M →ₗ[R] M₁}
{p : Submodule R M}
{q : Submodule R M₁}
(hf : ∀ x ∈ p, f x ∈ q)
(x : ↥p)


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

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

(((CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).functor.obj P).X n).X = P.X.X n


lemma isRightAdjoint_functor : e.functor.IsRightAdjoint

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


@[simp]
theorem toAdd_list_sum (s : List (Multiplicative α)) : toAdd s.prod = (s.map toAdd).sum

{α : Type u_3}
[AddMonoid α]
(s : List (Multiplicative α))

Multiplicative.toAdd s.prod = (List.map (⇑Multiplicative.toAdd) s).sum


@[simp]
protected theorem partiallyWellOrderedOn [IsRefl α r] (s : Finset α) :
    (s : Set α).PartiallyWellOrderedOn r

{α : Type u_2}
{r : α → α → Prop}
[IsRefl α r]
(s : Finset α)


lemma apply_mem_map_iff (hf : Injective f) : f a ∈ L.map f ↔ a ∈ L

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
{L : Sublattice α}
{f : LatticeHom α β}
{a : α}
(hf : Function.Injective ⇑f)


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

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

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

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


@[to_additive]
theorem tprod_union_disjoint {s t : Set β} (hd : Disjoint s t) (hs : Multipliable (f ∘ (↑) : s → α))
    (ht : Multipliable (f ∘ (↑) : t → α)) :
    ∏' x : ↑(s ∪ t), f x = (∏' x : s, f x) * ∏' x : t, f x

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
[T2Space α]
[ContinuousAdd α]
{s t : Set β}
(hd : Disjoint s t)
(hs : Summable (f ∘ Subtype.val))
(ht : Summable (f ∘ Subtype.val))

∑' (x : ↑(s ∪ t)), f ↑x = ∑' (x : ↑s), f ↑x + ∑' (x : ↑t), f ↑x


/-- Variant of `IsPushout.of_top` where `v₂₂` is induced from a morphism `v₁₃ : X₁₂ ⟶ X₃₂`, and
the universal property of the top square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂
|            |
v₁₁          v₁₂
↓            ↓
X₂₁ - h₂₁ -> X₂₂
|            |
v₂₁          v₂₂
↓            ↓
X₃₁ - h₃₁ -> X₃₂
```
-/
theorem of_top' {X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₂₁ : X₂₁ ⟶ X₂₂} {h₃₁ : X₃₁ ⟶ X₃₂}
    {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₂ ⟶ X₃₂} {v₂₁ : X₂₁ ⟶ X₃₁}
    (s : IsPushout h₁₁ (v₁₁ ≫ v₂₁) v₁₃ h₃₁) (t : IsPushout h₁₁ v₁₁ v₁₂ h₂₁) :
      IsPushout h₂₁ v₂₁ (t.desc v₁₃ (v₂₁ ≫ h₃₁) (by rw [s.w, Category.assoc])) h₃₁

{X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C}

{h₁₁ : X₁₁ ⟶ X₁₂}

{h₂₁ : X₂₁ ⟶ X₂₂}

{h₃₁ : X₃₁ ⟶ X₃₂}

{v₁₁ : X₁₁ ⟶ X₂₁}

{v₁₂ : X₁₂ ⟶ X₂₂}

{v₁₃ : X₁₂ ⟶ X₃₂}

{v₂₁ : X₂₁ ⟶ X₃₁}

(s : CategoryTheory.IsPushout h₁₁ (v₁₁ ≫ v₂₁) v₁₃ h₃₁)

(t : CategoryTheory.IsPushout h₁₁ v₁₁ v₁₂ h₂₁)

CategoryTheory.IsPushout h₂₁ v₂₁ (t.desc v₁₃ (v₂₁ ≫ h₃₁) ⋯) h₃₁


theorem isCauSeq_abs_exp (z : ℂ) :
    IsCauSeq _root_.abs fun n => ∑ m ∈ range n, abs (z ^ m / m.factorial)

IsCauSeq abs fun n => ∑ m ∈ Finset.range n, Complex.abs (z ^ m / ↑m.factorial)


theorem power_le_max_power_one {a b c : Cardinal} (h : b ≤ c) : a ^ b ≤ max (a ^ c) 1


@[simp]
theorem filter_cons_of_pos {a : α} (s) : p a → filter p (a ::ₘ s) = a ::ₘ filter p s

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{a : α}
(s : Multiset α)

p a → Multiset.filter p (a ::ₘ s) = a ::ₘ Multiset.filter p s


/-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y')

{X : Type u_1}
{X' : Type u_2}
{Y : Type u_3}
{Y' : Type u_4}
[TopologicalSpace X]
[TopologicalSpace X']
[TopologicalSpace Y]
[TopologicalSpace Y']
(eX : PartialHomeomorph X X')
(eY : PartialHomeomorph Y Y')

(eX.prod eY).source = eX.source ×ˢ eY.source


@[simp] theorem toNat_true : true.toNat = 1


theorem LE.le.disjoint_compl_right (h : a ≤ b) : Disjoint a bᶜ

{α : Type u_2}
[HeytingAlgebra α]
{a b : α}
(h : a ≤ b)


@[simp] theorem succ_lt_succ_iff {a b : Fin n} : a.succ < b.succ ↔ a < b


/-- A version of **Lebesgue differentiation theorem** for a sequence of closed balls whose
centers are not required to be fixed. -/
theorem ae_tendsto_average_norm_sub {f : α → E} (hf : LocallyIntegrable f μ) (K : ℝ) : ∀ᵐ x ∂μ,
    ∀ {ι : Type*} {l : Filter ι} (w : ι → α) (δ : ι → ℝ) (δlim : Tendsto δ l (𝓝[>] 0))
      (xmem : ∀ᶠ j in l, x ∈ closedBall (w j) (K * δ j)),
      Tendsto (fun j => ⨍ y in closedBall (w j) (δ j), ‖f y - f x‖ ∂μ) l (𝓝 0)

(hf : MeasureTheory.LocallyIntegrable f μ)

∀ᵐ (x : α) ∂μ,
  ∀ {ι : Type u_3} {l : Filter ι} (w : ι → α) (δ : ι → ℝ),
    Filter.Tendsto δ l (𝓝[>] 0) →
      (∀ᶠ (j : ι) in l, x ∈ Metric.closedBall (w j) (K * δ j)) →
        Filter.Tendsto (fun j => ⨍ (y : α) in Metric.closedBall (w j) (δ j), ‖f y - f x‖ ∂μ) l (𝓝 0)


lemma summable_exp_nat_mul_iff {a : ℝ} :
    Summable (fun n : ℕ ↦ exp (n * a)) ↔ a < 0

(Summable fun n => Real.exp (↑n * a)) ↔ a < 0


theorem valuation_le_one (a : A) : A.valuation a ≤ 1

{K : Type u}
[Field K]
(A : ValuationSubring K)
(a : ↥A)


theorem lt_orderTop_single {g g' : Γ} (hgg' : g < g') : g < (single g' r).orderTop

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{r : R}
{g g' : Γ}
(hgg' : g < g')

↑g < ((HahnSeries.single g') r).orderTop


theorem sOppSide_comm {s : AffineSubspace R P} {x y : P} : s.SOppSide x y ↔ s.SOppSide y x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}


/-- Jacobi's theta-function transformation formula for the sum of `exp -Q(x)`, where `Q` is a
negative definite quadratic form. -/
theorem Complex.tsum_exp_neg_quadratic {a : ℂ} (ha : 0 < a.re) (b : ℂ) :
    (∑' n : ℤ, cexp (-π * a * n ^ 2 + 2 * π * b * n)) =
      1 / a ^ (1 / 2 : ℂ) * ∑' n : ℤ, cexp (-π / a * (n + I * b) ^ 2)


lemma nonsingular_smul_iff (P : Fin 3 → R) (u : Rˣ) : W.Nonsingular (u • P) ↔ W.Nonsingular P

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Projective R)
(P : Fin 3 → R)
(u : Rˣ)


@[simp]
theorem cokernelZeroIsoTarget_inv : cokernelZeroIsoTarget.inv = cokernel.π (0 : X ⟶ Y)

CategoryTheory.Limits.cokernelZeroIsoTarget.inv = CategoryTheory.Limits.cokernel.π 0


theorem proj_pi (f : (i : ι) → M₂ →ₗ[R] φ i) (i : ι) : (proj i).comp (pi f) = f i

{R : Type u}
{M₂ : Type w}
{ι : Type x}
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
{φ : ι → Type i}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M₂ →ₗ[R] φ i)
(i : ι)

LinearMap.proj i ∘ₗ LinearMap.pi f = f i


@[simp]
theorem isReduced_reverse (ω : List B) : cs.IsReduced (ω.reverse) ↔ cs.IsReduced ω

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(ω : List B)


/-- If two measures coincide locally, then a set which is everywhere positive for the former is
also everywhere positive for the latter. -/
lemma IsEverywherePos.of_forall_exists_nhds_eq (hs : IsEverywherePos μ s)
    (h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u) : IsEverywherePos ν s


/-- `ContinuousAlternatingMap.compContinuousLinearMap` as a bundled `LinearMap`. -/
@[simps]
def compContinuousLinearMapₗ (f : M →L[R] M') : (M' [⋀^ι]→L[R] N) →ₗ[R] (M [⋀^ι]→L[R] N)

{R : Type u_1}
{M : Type u_2}
{M' : Type u_3}
{N : Type u_4}
{ι : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid M']
[Module R M']
[TopologicalSpace M']
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
[ContinuousAdd N]
[ContinuousConstSMul R N]
(f : M →L[R] M')
(g : M' [⋀^ι]→L[R] N)

(ContinuousAlternatingMap.compContinuousLinearMapₗ f) g = g.compContinuousLinearMap f


theorem injOn_of_disjoint_ker {p : Submodule R M} {s : Set M} (h : s ⊆ p)
    (hd : Disjoint p (ker f)) : Set.InjOn f s

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Ring R]
[Ring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_12}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f : F}
{p : Submodule R M}
{s : Set M}
(h : s ⊆ ↑p)
(hd : Disjoint p (LinearMap.ker f))


lemma dvd_pow_self (a : α) {n : ℕ} (hn : n ≠ 0) : a ∣ a ^ n

{α : Type u_1}
[Monoid α]
(a : α)
{n : ℕ}
(hn : n ≠ 0)


@[simp] protected lemma lower (s : LowerSet α) : IsLowerSet (s : Set α)


/-- Shows that `Bₙ = bₙ * Bₙ₋₁ + aₙ * Bₙ₋₂`. -/
theorem dens_recurrence {gp : Pair K} {ppredB predB : K}
    (succ_nth_s_eq : g.s.get? (n + 1) = some gp) (nth_den_eq : g.dens n = ppredB)
    (succ_nth_den_eq : g.dens (n + 1) = predB) :
    g.dens (n + 2) = gp.b * predB + gp.a * ppredB


theorem digits_zero_of_eq_zero {b : ℕ} (h : b ≠ 0) :
    ∀ {L : List ℕ} (_ : ofDigits b L = 0), ∀ l ∈ L, l = 0


@[simp]
theorem map_uncurry_prod (m : α → β → γ) (f : Filter α) (g : Filter β) :
    (f ×ˢ g).map (uncurry m) = map₂ m f g

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
(m : α → β → γ)
(f : Filter α)
(g : Filter β)

Filter.map (Function.uncurry m) (f ×ˢ g) = Filter.map₂ m f g


protected theorem Adj.coe {H : G.Subgraph} {u v : V} (h : H.Adj u v) :
    H.coe.Adj ⟨u, H.edge_vert h⟩ ⟨v, H.edge_vert h.symm⟩

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


theorem coordChange_same_apply (e : Trivialization F proj) {b : B} (h : b ∈ e.baseSet) (x : F) :
    e.coordChange e b x = x

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


theorem ncard_image_iff (hs : s.Finite := by toFinite_tac) :
    (f '' s).ncard = s.ncard ↔ Set.InjOn f s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
(hs : s.Finite := by toFinite_tac)


@[simp] lemma mop_inv_rightUnitor (X : C) : (ρ_ X).inv.mop = (λ_ (mop X)).inv

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

(CategoryTheory.MonoidalCategory.rightUnitor X).inv.mop =
  (CategoryTheory.MonoidalCategory.leftUnitor { unmop := X }).inv


@[simp]
lemma forget_map :
    (HomologicalComplex.forget C c₁₂).map (map φ c₁₂) =
      GradedObject.mapMap (toGradedObjectMap φ) _

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

(HomologicalComplex.forget C c₁₂).map (HomologicalComplex₂.total.map φ c₁₂) =
  CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂)


@[simp]
theorem deleteEdges_verts : (G'.deleteEdges s).verts = G'.verts

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


lemma biUnion_image_sdiff_left : s.biUnion (fun a ↦ t.image (a \ ·)) = s \\ t

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

(s.biUnion fun a => Finset.image (fun x => a \ x) t) = s.diffs t


theorem take_subset (n) (l : List α) : take n l ⊆ l


@[reassoc]
lemma map_comp : map φ₁ φ₃ (a ≫ a') (b ≫ b') (by rw [reassoc_of% comm, comm', assoc]) =
    map φ₁ φ₂ a b comm ≫ map φ₂ φ₃ a' b' comm'

{K₁ L₁ K₂ L₂ K₃ L₃ : CochainComplex C ℤ}

(φ₁ : K₁ ⟶ L₁)

(φ₂ : K₂ ⟶ L₂)

(φ₃ : K₃ ⟶ L₃)

CochainComplex.mappingCone.map φ₁ φ₃ (a ≫ a') (b ≫ b') ⋯ =
  CochainComplex.mappingCone.map φ₁ φ₂ a b comm ≫ CochainComplex.mappingCone.map φ₂ φ₃ a' b' comm'


@[simp]
theorem comp_id (f : A →ₑ+[φ] B) : f.comp (DistribMulActionHom.id M) = f

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


theorem down_surjective : Surjective (@down α)


@[simp]
theorem cos_pi_div_thirty_two : cos (π / 32) = √(2 + √(2 + √(2 + √2))) / 2


theorem isColimit_eq_iff {t : Cocone F} (ht : IsColimit t) {i j : J} {xi : F.obj i} {xj : F.obj j} :
    t.ι.app i xi = t.ι.app j xj ↔ ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f xi = F.map g xj

(ht : CategoryTheory.Limits.IsColimit t)

t.ι.app i xi = t.ι.app j xj ↔ ∃ k f g, F.map f xi = F.map g xj


lemma toZ_nonneg (hi : i0 ≤ i) : 0 ≤ toZ i0 i

{ι : Type u_1}
[LinearOrder ι]
[SuccOrder ι]
[IsSuccArchimedean ι]
[PredOrder ι]
{i0 i : ι}
(hi : i0 ≤ i)


theorem log_nonneg (hx : 1 ≤ x) : 0 ≤ log x


lemma bot_mul_coe_of_neg {x : ℝ} (h : x < 0) : (⊥ : EReal) * x = ⊤


theorem comap_inf_principal_neBot_of_image_mem (h : m '' s ∈ g) : (Filter.comap m g ⊓ 𝓟 s).NeBot

{α : Type u}
{β : Type v}
{m : α → β}
{s : Set α}
{g : Ultrafilter β}
(h : m '' s ∈ g)


theorem Perm.extendDomain_apply_subtype {b : β'} (h : p b) :
    e.extendDomain f b = f (e (f.symm ⟨b, h⟩))

{α' : Type u_1}
{β' : Type u_2}
(e : Equiv.Perm α')
{p : β' → Prop}
[DecidablePred p]
(f : α' ≃ Subtype p)
{b : β'}
(h : p b)

(e.extendDomain f) b = ↑(f (e (f.symm ⟨b, h⟩)))


theorem initiallySmall_iff_exists_small_weakly_initial_set [IsCofilteredOrEmpty J] :
    InitiallySmall.{v} J ↔ ∃ (s : Set J) (_ : Small.{v} s), ∀ i, ∃ j ∈ s, Nonempty (j ⟶ i)

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

CategoryTheory.InitiallySmall J ↔ ∃ s, ∃ (_ : Small.{v, u} ↑s), ∀ (i : J), ∃ j ∈ s, Nonempty (j ⟶ i)


theorem Antiperiodic.odd_zsmul_antiperiodic [AddGroup α] [InvolutiveNeg β] (h : Antiperiodic f c)
    (n : ℤ) : Antiperiodic f ((2 * n + 1) • c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddGroup α]
[InvolutiveNeg β]
(h : Function.Antiperiodic f c)
(n : ℤ)

Function.Antiperiodic f ((2 * n + 1) • c)


theorem reduceOption_length_eq {l : List (Option α)} :
    l.reduceOption.length = (l.filter Option.isSome).length

l.reduceOption.length = (List.filter Option.isSome l).length


/-- Any category with finite products and equalizers has all finite limits.

See <https://stacks.math.columbia.edu/tag/002O>.
-/
theorem hasFiniteLimits_of_hasEqualizers_and_finite_products [HasFiniteProducts C]
    [HasEqualizers C] : HasFiniteLimits C


@[to_additive]
theorem iSup_eq_closure {ι : Sort*} (p : ι → Subgroup G) :
    ⨆ i, p i = closure (⋃ i, (p i : Set G))

{G : Type u_1}
[Group G]
{ι : Sort u_5}
(p : ι → Subgroup G)

⨆ i, p i = Subgroup.closure (⋃ i, ↑(p i))


theorem HasFDerivWithinAt.arctan (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => arctan (f x)) ((1 / (1 + f x ^ 2)) • f') s x

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

HasFDerivWithinAt (fun x => Real.arctan (f x)) ((1 / (1 + f x ^ 2)) • f') s x


/-- Exactly one of the following is true (although we don't prove this here). -/
theorem lt_or_equiv_or_gt_or_fuzzy (x y : PGame) : x < y ∨ (x ≈ y) ∨ y < x ∨ x ‖ y


/-- Stronger version of `WellFounded.prod_lex`. Instead of requiring `rβ on g` to be well-founded,
we only require it to be well-founded on fibers of `f`. -/
theorem WellFounded.prod_lex_of_wellFoundedOn_fiber (hα : WellFounded (rα on f))
    (hβ : ∀ a, (f ⁻¹' {a}).WellFoundedOn (rβ on g)) :
    WellFounded (Prod.Lex rα rβ on fun c => (f c, g c))

(hβ : ∀ (a : α), (f ⁻¹' {a}).WellFoundedOn (rβ on g))


/-- This is Exercise 1.2.1 from [tao2010]. It allows you to express integration of a measurable
function with respect to `(μ.withDensity f)` as an integral with respect to `μ`, called the base
measure. `μ` is often the Lebesgue measure, and in this circumstance `f` is the probability density
function, and `(μ.withDensity f)` represents any continuous random variable as a
probability measure, such as the uniform distribution between 0 and 1, the Gaussian distribution,
the exponential distribution, the Beta distribution, or the Cauchy distribution (see Section 2.4
of [wasserman2004]). Thus, this method shows how to one can calculate expectations, variances,
and other moments as a function of the probability density function.
 -/
theorem lintegral_withDensity_eq_lintegral_mul (μ : Measure α) {f : α → ℝ≥0∞}
    (h_mf : Measurable f) :
    ∀ {g : α → ℝ≥0∞}, Measurable g → ∫⁻ a, g a ∂μ.withDensity f = ∫⁻ a, (f * g) a ∂μ

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

Measurable g → ∫⁻ (a : α), g a ∂μ.withDensity f = ∫⁻ (a : α), (f * g) a ∂μ


@[simp]
protected theorem compl_inf (s t : UpperSet α) : (s ⊓ t).compl = s.compl ⊓ t.compl

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


@[simp] lemma in₂₀_iff : (graph t).Adj (in₂ c) (in₀ a) ↔ ∃ b, (a, b, c) ∈ t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{t : Finset (α × β × γ)}
{a : α}
{c : γ}

(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₂ c) (Sum3.in₀ a) ↔ ∃ b, (a, b, c) ∈ t


/-- A topological additive group is nonarchimedean if every neighborhood of 0
  contains an open subgroup. -/
class NonarchimedeanAddGroup (G : Type*) [AddGroup G] [TopologicalSpace G] extends
  TopologicalAddGroup G : Prop where
  is_nonarchimedean : ∀ U ∈ 𝓝 (0 : G), ∃ V : OpenAddSubgroup G, (V : Set G) ⊆ U

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[self : NonarchimedeanAddGroup G]
(U : Set G)

U ∈ 𝓝 0 → ∃ V, ↑V ⊆ U


theorem RingHom.IsIntegralElem.neg {x : S} (hx : f.IsIntegralElem x) : f.IsIntegralElem (-x)

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
{x : S}
(hx : f.IsIntegralElem x)


theorem eq_of_bisim (bisim : IsBisimulation R) : ∀ {s₁ s₂}, s₁ ~ s₂ → s₁ = s₂

{α : Type u}
(R : Stream' α → Stream' α → Prop)
(bisim : Stream'.IsBisimulation R)
{s₁ s₂ : Stream' α}


private theorem findExistsOneDivLT_min (hi : ¬s ≤[i] 0) {m : ℕ}
    (hm : m < findExistsOneDivLT s i) : ¬ExistsOneDivLT s i m

(hi : ¬MeasureTheory.VectorMeasure.restrict s i ≤ MeasureTheory.VectorMeasure.restrict 0 i)

(hm : m < MeasureTheory.SignedMeasure.findExistsOneDivLT s i)

¬MeasureTheory.SignedMeasure.ExistsOneDivLT s i m


theorem symm_trans_symm (e e' : Pretrivialization F proj) :
    (e.toPartialEquiv.symm.trans e'.toPartialEquiv).symm
      = e'.toPartialEquiv.symm.trans e.toPartialEquiv

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e e' : Pretrivialization F proj)

(e.symm.trans e'.toPartialEquiv).symm = e'.symm.trans e.toPartialEquiv


@[simp]
theorem _root_.LinearMap.dualProd.toQuadraticForm :
    (LinearMap.dualProd R M).toQuadraticMap = 2 • dualProd R M

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]

LinearMap.BilinMap.toQuadraticMap (LinearMap.dualProd R M) = 2 • QuadraticForm.dualProd R M


@[continuity]
theorem continuous_trans {x y z : X} : Continuous fun ρ : Path x y × Path y z => ρ.1.trans ρ.2

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


theorem Ioo_subset_coe (I : Box ι) : Box.Ioo I ⊆ I


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

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


@[simp]
theorem pow_nonneg [ZeroLEOneClass α] [PosMulMono α]
    (H : 0 ≤ a) : ∀ n : ℕ, 0 ≤ a ^ n

{α : Type u}
[Semiring α]
[Preorder α]
{a : α}
[ZeroLEOneClass α]
[PosMulMono α]
(H : 0 ≤ a)
(n : ℕ)


@[simp]
theorem find_le_iff (n : ℕ+) : PNat.find h ≤ n ↔ ∃ m ≤ n, p m

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
(n : ℕ+)


@[to_additive posPart_nonneg] lemma one_le_oneLePart (a : α) : 1 ≤ a⁺ᵐ

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


theorem inter_eq_zero_iff_disjoint [DecidableEq α] {s t : Multiset α} :
    s ∩ t = 0 ↔ Disjoint s t

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


theorem setIntegral_setAverage_sub (hs : μ s ≠ ∞) (hf : IntegrableOn f s μ) :
    ∫ x in s, ⨍ a in s, f a ∂μ - f x ∂μ = 0

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{μ : MeasureTheory.Measure α}
{s : Set α}
{f : α → E}
(hs : μ s ≠ ⊤)
(hf : MeasureTheory.IntegrableOn f s μ)

∫ (x : α) in s, ⨍ (a : α) in s, f a ∂μ - f x ∂μ = 0


lemma truncatedSup_union (hs : a ∈ lowerClosure s) (ht : a ∈ lowerClosure t) :
    truncatedSup (s ∪ t) a = truncatedSup s a ⊔ truncatedSup t a

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
[DecidableEq α]
(hs : a ∈ lowerClosure ↑s)
(ht : a ∈ lowerClosure ↑t)

(s ∪ t).truncatedSup a = s.truncatedSup a ⊔ t.truncatedSup a


/-- If two additive homomorphisms from `α →₀ M` are equal on each `single a b`,
then they are equal. -/
theorem addHom_ext [AddZeroClass N] ⦃f g : (α →₀ M) →+ N⦄
    (H : ∀ x y, f (single x y) = g (single x y)) : f = g

(H : ∀ (x : α) (y : M), f (Finsupp.single x y) = g (Finsupp.single x y))


@[reassoc] -- Porting note: simp can solve both versions
theorem biprod.inr_fst {X Y : C} [HasBinaryBiproduct X Y] :
    (biprod.inr : Y ⟶ X ⊞ Y) ≫ (biprod.fst : X ⊞ Y ⟶ X) = 0

CategoryTheory.Limits.biprod.inr ≫ CategoryTheory.Limits.biprod.fst = 0


theorem compMeasurePreserving_eq_mk (g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν) :
    g.compMeasurePreserving f hf =
      mk (g ∘ f) (g.aestronglyMeasurable.comp_quasiMeasurePreserving hf.quasiMeasurePreserving)

(hf : MeasureTheory.MeasurePreserving f μ ν)

g.compMeasurePreserving f hf = MeasureTheory.AEEqFun.mk (↑g ∘ f) ⋯


/-- In an R₀ space, the `Specializes` relation is symmetric, `Iff` version. -/
theorem specializes_comm : x ⤳ y ↔ y ⤳ x

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


/-- If `f` is monotone both on `s` and `t`, with `s` to the left of `t` and the center
point belonging to both `s` and `t`, then `f` is monotone on `s ∪ t` -/
protected theorem MonotoneOn.union_right {s t : Set α} {c : α} (h₁ : MonotoneOn f s)
    (h₂ : MonotoneOn f t) (hs : IsGreatest s c) (ht : IsLeast t c) : MonotoneOn f (s ∪ t)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s t : Set α}
{c : α}
(h₁ : MonotoneOn f s)
(h₂ : MonotoneOn f t)
(hs : IsGreatest s c)
(ht : IsLeast t c)


@[simp]
theorem degree_of_d_ne_zero' (hd : d ≠ 0) : (toPoly ⟨0, 0, 0, d⟩).degree = 0

{R : Type u_1}
{d : R}
[Semiring R]
(hd : d ≠ 0)


theorem quasiMeasurePreserving_fst : QuasiMeasurePreserving Prod.fst (μ.prod ν) μ

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

MeasureTheory.Measure.QuasiMeasurePreserving Prod.fst (μ.prod ν) μ


@[simp]
lemma RingEquiv_coe_eq {X Y : Type _} [CommRing X] [CommRing Y] (e : X ≃+* Y) :
    (@DFunLike.coe (CommRingCat.of X ⟶ CommRingCat.of Y) X (fun _ => Y)
      ConcreteCategory.instFunLike (e : X →+* Y) : X → Y) = ↑e

{X Y : Type u_1}
[CommRing X]
[CommRing Y]
(e : X ≃+* Y)


theorem suffixLevenshtein_eq (xs : List α) (y ys) :
    impl C xs y (suffixLevenshtein C xs ys) = suffixLevenshtein C xs (y :: ys)

{α : Type u_1}
{β : Type u_2}
{δ : Type u_3}
[AddZeroClass δ]
[Min δ]
{C : Levenshtein.Cost α β δ}
(xs : List α)
(y : β)
(ys : List β)

Levenshtein.impl C xs y (suffixLevenshtein C xs ys) = suffixLevenshtein C xs (y :: ys)


/-- Permutations of `Option α` are equivalent to fixing an
`Option α` and permuting the remaining with a `Perm α`.
The fixed `Option α` is swapped with `none`. -/
@[simps]
def Equiv.Perm.decomposeOption {α : Type*} [DecidableEq α] :
    Perm (Option α) ≃ Option α × Perm α

{α : Type u_1}
[DecidableEq α]
(i : Option α × Equiv.Perm α)

Equiv.Perm.decomposeOption.symm i = Equiv.swap none i.1 * Equiv.optionCongr i.2


@[simp]
theorem lapply_apply (a : α) (f : α →₀ M) : (lapply a : (α →₀ M) →ₗ[R] M) f = f a

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(a : α)
(f : α →₀ M)


@[simp, measurability]
protected theorem MeasurableSet.union {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁)
    (h₂ : MeasurableSet s₂) : MeasurableSet (s₁ ∪ s₂)

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


@[simp]
theorem add_nat_le_add_nat_iff {α β : Cardinal} (n : ℕ) : α + n ≤ β + n ↔ α ≤ β

α + ↑n ≤ β + ↑n ↔ α ≤ β


theorem sum_pow_mul_eq_add_pow {n : ℕ} {R : Type*} [CommSemiring R] (a b : R) :
    (∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card)) = (a + b) ^ n

{n : ℕ}
{R : Type u_3}
[CommSemiring R]
(a b : R)

∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card) = (a + b) ^ n


@[measurability, fun_prop]
theorem AEMeasurable.nnreal_tsum {α : Type*} [MeasurableSpace α] {ι : Type*} [Countable ι]
    {f : ι → α → NNReal} {μ : MeasureTheory.Measure α} (h : ∀ i : ι, AEMeasurable (f i) μ) :
    AEMeasurable (fun x : α => ∑' i : ι, f i x) μ

{α : Type u_5}
[MeasurableSpace α]
{ι : Type u_6}
[Countable ι]
{f : ι → α → ℝ≥0}
{μ : MeasureTheory.Measure α}
(h : ∀ (i : ι), AEMeasurable (f i) μ)

AEMeasurable (fun x => ∑' (i : ι), f i x) μ


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

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

(CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.inverseObj F).X = F ⋙ Comon_.forget D


theorem image_projection_prod {ι : Type*} {α : ι → Type*} {v : ∀ i : ι, Set (α i)}
    (hv : (pi univ v).Nonempty) (i : ι) :
    ((fun x : ∀ i : ι, α i => x i) '' ⋂ k, (fun x : ∀ j : ι, α j => x k) ⁻¹' v k) = v i

{ι : Type u_11}
{α : ι → Type u_12}
{v : (i : ι) → Set (α i)}
(hv : (Set.univ.pi v).Nonempty)
(i : ι)

(fun x => x i) '' ⋂ k, (fun x => x k) ⁻¹' v k = v i


lemma orderedSubtype_coe (s : Subring R) : Subring.orderedSubtype s = Subring.subtype s

{R : Type u_2}
[OrderedRing R]
(s : Subring R)


/-- The `MonoidHom` from `S.leftInv` to `S` sending an element to its right inverse in `S`. -/
@[to_additive (attr := simps)
    "The `AddMonoidHom` from `S.leftNeg` to `S` sending an element to its
    right additive inverse in `S`."]
noncomputable def fromCommLeftInv : S.leftInv →* S

{M : Type u_1}
[CommMonoid M]
(S : Submonoid M)

∀ (a : ↥S.leftInv), S.fromCommLeftInv a = S.fromLeftInv a


@[simp]
theorem Prod.snd_toSigma {α β} (x : α × β) : (Prod.toSigma x).snd = x.snd

{α : Type u_7}
{β : Type u_8}
(x : α × β)


@[to_additive (attr := fun_prop) Continuous.norm]
theorem Continuous.norm' : Continuous f → Continuous fun x => ‖f x‖

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}


@[simp]
theorem _root_.Prod.fst_zmod_cast (a : ZMod n) : (cast a : R × S).fst = cast a

{n : ℕ}
{R : Type u_1}
[AddGroupWithOne R]
{S : Type u_2}
[AddGroupWithOne S]
(a : ZMod n)


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

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

∀ {X Y : C ⥤ D} (τ : X ⟶ Y) (F : (SimplexCategory.Truncated n)ᵒᵖ ⥤ C) (c : (SimplexCategory.Truncated n)ᵒᵖ),
  (((CategoryTheory.SimplicialObject.Truncated.whiskering C D).map τ).app F).app c = τ.app (F.obj c)


/-- A function on `[a, b]` with the norm of the right derivative bounded by `C`
satisfies `‖f x - f a‖ ≤ C * (x - a)`. -/
theorem norm_image_sub_le_of_norm_deriv_right_le_segment {f' : ℝ → E} {C : ℝ}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    (bound : ∀ x ∈ Ico a b, ‖f' x‖ ≤ C) : ∀ x ∈ Icc a b, ‖f x - f a‖ ≤ C * (x - a)

(hf' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

x ∈ Set.Icc a b → ‖f x - f a‖ ≤ C * (x - a)


theorem comparisonAdjunction_counit_app
    [∀ A : adj.toMonad.Algebra, HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] (B : D) :
    (comparisonAdjunction adj).counit.app B = colimit.desc _ (counitCofork adj B)

[∀ (A : adj.toMonad.Algebra), CategoryTheory.Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))]

(CategoryTheory.Monad.MonadicityInternal.comparisonAdjunction adj).counit.app B =
  CategoryTheory.Limits.colimit.desc
    (CategoryTheory.Limits.parallelPair (F.map (G.map (adj.counit.app B))) (adj.counit.app (F.obj (G.obj B))))
    (CategoryTheory.Monad.MonadicityInternal.counitCofork adj B)


@[to_additive (attr := simp)]
theorem rel_mk {s : Setoid M} {h a b} : Con.mk s h a b ↔ r a b

{h : ∀ {w x y z : M}, Setoid.r w x → Setoid.r y z → Setoid.r (w * y) (x * z)}

{ toSetoid := s, mul' := h } a b ↔ Setoid.r a b


lemma iIndepFun.meas_biInter (hf : iIndepFun mβ f κ μ)
    (hs : ∀ i, i ∈ S → MeasurableSet[(mβ i).comap (f i)] (s i)) :
    ∀ᵐ a ∂μ, κ a (⋂ i ∈ S, s i) = ∏ i ∈ S, κ a (s i)

(hf : ProbabilityTheory.Kernel.iIndepFun mβ f κ μ)

∀ᵐ (a : α) ∂μ, (κ a) (⋂ i ∈ S, s i) = ∏ i ∈ S, (κ a) (s i)


lemma ext₂ {f g : ComposableArrows C 2}
    (h₀ : f.obj' 0 = g.obj' 0) (h₁ : f.obj' 1 = g.obj' 1) (h₂ : f.obj' 2 = g.obj' 2)
    (w₀ : f.map' 0 1 = eqToHom h₀ ≫ g.map' 0 1 ≫ eqToHom h₁.symm)
    (w₁ : f.map' 1 2 = eqToHom h₁ ≫ g.map' 1 2 ≫ eqToHom h₂.symm) : f = g

{f g : CategoryTheory.ComposableArrows C 2}

(w₀ :
  f.map' 0 1 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₀)
      (CategoryTheory.CategoryStruct.comp (g.map' 0 1 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))

(w₁ :
  f.map' 1 2 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₁)
      (CategoryTheory.CategoryStruct.comp (g.map' 1 2 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))


theorem orthogonalFamily_iff_pairwise {ι} {V : ι → Submodule 𝕜 E} :
    (OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) ↔ Pairwise ((· ⟂ ·) on V)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{V : ι → Submodule 𝕜 E}

(OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ) ↔ Pairwise ((fun x x_1 => x ⟂ x_1) on V)


/-- In the canonical isometric isomorphism between a Hilbert sum `E` of `G : ι → Type*` and
`lp G 2`, a finitely-supported vector in `lp G 2` is the image of the associated finite sum of
elements of `E`. -/
@[simp]
protected theorem IsHilbertSum.linearIsometryEquiv_apply_dfinsupp_sum_single
    (hV : IsHilbertSum 𝕜 G V) (W₀ : Π₀ i : ι, G i) :
    ((W₀.sum (γ := lp G 2) fun a b ↦ hV.linearIsometryEquiv (V a b)) : ∀ i, G i) = W₀

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : IsHilbertSum 𝕜 G V)
(W₀ : Π₀ (i : ι), G i)

↑(W₀.sum fun a b => hV.linearIsometryEquiv ((V a) b)) = ⇑W₀


@[reassoc (attr := simp)]
lemma ι_mapBifunctorComp₁₂MapObjIso_hom (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J)
    (h : r (i₁, i₂, i₃) = j) :
    ιMapTrifunctorMapObj (bifunctorComp₁₂ F₁₂ G) r X₁ X₂ X₃ i₁ i₂ i₃ j h ≫
      (mapBifunctorComp₁₂MapObjIso F₁₂ G ρ₁₂ X₁ X₂ X₃).hom j =
      ιMapBifunctor₁₂BifunctorMapObj F₁₂ G ρ₁₂ X₁ X₂ X₃ i₁ i₂ i₃ j h

(F₁₂ : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂ C₁₂))

(G : CategoryTheory.Functor C₁₂ (CategoryTheory.Functor C₃ C₄))

(ρ₁₂ : CategoryTheory.GradedObject.BifunctorComp₁₂IndexData r)

(X₁ : CategoryTheory.GradedObject I₁ C₁)

(X₂ : CategoryTheory.GradedObject I₂ C₂)

(X₃ : CategoryTheory.GradedObject I₃ C₃)

[(((CategoryTheory.GradedObject.mapBifunctor F₁₂ I₁ I₂).obj X₁).obj X₂).HasMap ρ₁₂.p]

[(((CategoryTheory.GradedObject.mapBifunctor G ρ₁₂.I₁₂ I₃).obj
            (CategoryTheory.GradedObject.mapBifunctorMapObj F₁₂ ρ₁₂.p X₁ X₂)).obj
        X₃).HasMap
    ρ₁₂.q]

[H : CategoryTheory.GradedObject.HasGoodTrifunctor₁₂Obj F₁₂ G ρ₁₂ X₁ X₂ X₃]

[((((CategoryTheory.GradedObject.mapTrifunctor (CategoryTheory.bifunctorComp₁₂ F₁₂ G) I₁ I₂ I₃).obj X₁).obj X₂).obj
        X₃).HasMap
    r]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.ιMapTrifunctorMapObj (CategoryTheory.bifunctorComp₁₂ F₁₂ G) r X₁ X₂ X₃ i₁ i₂ i₃ j h)
    ((CategoryTheory.GradedObject.mapBifunctorComp₁₂MapObjIso F₁₂ G ρ₁₂ X₁ X₂ X₃).hom j) =
  CategoryTheory.GradedObject.ιMapBifunctor₁₂BifunctorMapObj F₁₂ G ρ₁₂ X₁ X₂ X₃ i₁ i₂ i₃ j h


theorem prev_cons_cons_of_ne' (y z : α) (h : x ∈ y :: z :: l) (hy : x ≠ y) (hz : x = z) :
    prev (y :: z :: l) x h = y

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


theorem iso_trans {X Y Z : Submodule R M × Submodule R M} : Iso X Y → Iso Y Z → Iso X Z

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{X Y Z : Submodule R M × Submodule R M}

JordanHolderModule.Iso X Y → JordanHolderModule.Iso Y Z → JordanHolderModule.Iso X Z


theorem of_think_mem {s : Computation α} {a} : a ∈ think s → a ∈ s

{α : Type u}
{s : Computation α}
{a : α}


theorem antidiagonalTuple_pairwise_pi_lex :
    ∀ k n, (antidiagonalTuple k n).Pairwise (Pi.Lex (· < ·) @fun _ => (· < ·))

List.Pairwise (Pi.Lex (fun x x_1 => x < x_1) fun x x x_1 => x < x_1) (List.Nat.antidiagonalTuple k n)


lemma equiv_shift' {a : M} [HasSmallLocalizedShiftedHom.{w} W M X Y]
    [HasSmallLocalizedShiftedHom.{w} W M Y Y]
    (f : SmallShiftedHom.{w} W X Y a) (n a' : M) (h : a + n = a') :
    SmallHom.equiv W L (f.shift n a' h) = (L.commShiftIso n).hom.app X ≫
      (SmallHom.equiv W L f)⟦n⟧' ≫ ((L.commShiftIso a).hom.app Y)⟦n⟧' ≫
        (shiftFunctorAdd' D a n a' h).inv.app (L.obj Y) ≫ (L.commShiftIso a').inv.app Y

[CategoryTheory.Localization.HasSmallLocalizedShiftedHom W M X Y]

[CategoryTheory.Localization.HasSmallLocalizedShiftedHom W M Y Y]

(f : CategoryTheory.Localization.SmallShiftedHom W X Y a)

(CategoryTheory.Localization.SmallHom.equiv W L) (f.shift n a' h) =
  CategoryTheory.CategoryStruct.comp ((L.commShiftIso n).hom.app X)
    (CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.shiftFunctor D n).map ((CategoryTheory.Localization.SmallHom.equiv W L) f))
      (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor D n).map ((L.commShiftIso a).hom.app Y))
        (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd' D a n a' h).inv.app (L.obj Y))
          ((L.commShiftIso a').inv.app Y))))


lemma IsAntichain.of_strictMonoOn_antitoneOn (hf : StrictMonoOn f s) (hf' : AntitoneOn f s) :
    IsAntichain (· ≤ ·) s

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
{f : α → β}
{s : Set α}
(hf : StrictMonoOn f s)
(hf' : AntitoneOn f s)


theorem castPred_le_iff {j : Fin n} {i : Fin (n + 1)} (hi : i ≠ last n) :
    castPred i hi ≤ j ↔ i ≤ castSucc j

{n : ℕ}
{j : Fin n}
{i : Fin (n + 1)}
(hi : i ≠ Fin.last n)


/-- Any continuous bijection of light profinite spaces induces an isomorphism. -/
theorem isIso_of_bijective (bij : Function.Bijective f) : IsIso f

{X Y : LightProfinite}
(f : X ⟶ Y)
(bij : Function.Bijective ⇑f)


/-- If `ringChar F = 2`, then `quadraticCharFun F` takes the value `1` on nonzero elements. -/
theorem quadraticCharFun_eq_one_of_char_two (hF : ringChar F = 2) {a : F} (ha : a ≠ 0) :
    quadraticCharFun F a = 1

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
(hF : ringChar F = 2)
{a : F}
(ha : a ≠ 0)


@[to_additive]
theorem swap_surjective : Surjective (swap M N)

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

Function.Surjective ⇑(Monoid.Coprod.swap M N)


/-- If a function `f` is

- injective on a compact set `s`;
- continuous at every point of this set;
- injective on a neighborhood of each point of this set,

then it is injective on a neighborhood of this set. -/
theorem Set.InjOn.exists_mem_nhdsSet {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
    [T2Space Y] {f : X → Y} {s : Set X} (inj : InjOn f s) (sc : IsCompact s)
    (fc : ∀ x ∈ s, ContinuousAt f x) (loc : ∀ x ∈ s, ∃ u ∈ 𝓝 x, InjOn f u) :
    ∃ t ∈ 𝓝ˢ s, InjOn f t

(loc : ∀ x ∈ s, ∃ u ∈ 𝓝 x, Set.InjOn f u)


theorem Machine.map_step {S : Set Λ} (f₂₁ : Function.RightInverse f₁ f₂)
    (g₂₁ : ∀ q ∈ S, g₂ (g₁ q) = q) :
    ∀ c : Cfg Γ Λ,
      c.q ∈ S → (step M c).map (Cfg.map f₁ g₁) = step (M.map f₁ f₂ g₁ g₂) (Cfg.map f₁ g₁ c)

{Γ : Type u_1}
[Inhabited Γ]
{Γ' : Type u_2}
[Inhabited Γ']
{Λ : Type u_3}
[Inhabited Λ]
{Λ' : Type u_4}
[Inhabited Λ']
(M : Turing.TM0.Machine Γ Λ)
(f₁ : Turing.PointedMap Γ Γ')
(f₂ : Turing.PointedMap Γ' Γ)
(g₁ : Λ → Λ')
(g₂ : Λ' → Λ)
{S : Set Λ}
(f₂₁ : Function.RightInverse f₁.f f₂.f)
(g₂₁ : ∀ q ∈ S, g₂ (g₁ q) = q)
(c : Turing.TM0.Cfg Γ Λ)

c.q ∈ S →
  Option.map (Turing.TM0.Cfg.map f₁ g₁) (Turing.TM0.step M c) =
    Turing.TM0.step (M.map f₁ f₂ g₁ g₂) (Turing.TM0.Cfg.map f₁ g₁ c)


/-- In a preadditive category, we can construct a binary biproduct for `X Y : C` from
any binary bicone `b` satisfying `total : b.fst ≫ b.inl + b.snd ≫ b.inr = 𝟙 b.X`.

(That is, such a bicone is a limit cone and a colimit cocone.)
-/
theorem hasBinaryBiproduct_of_total {X Y : C} (b : BinaryBicone X Y)
    (total : b.fst ≫ b.inl + b.snd ≫ b.inr = 𝟙 b.pt) : HasBinaryBiproduct X Y

(b : CategoryTheory.Limits.BinaryBicone X Y)


/-- If the second of three points is weakly between the other two, the oriented angle at the
third point (reversed) is zero. -/
theorem _root_.Wbtw.oangle₁₃₂_eq_zero {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) : ∡ p₁ p₃ p₂ = 0

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


theorem mul_rightUnitor {M : Mon_ C} :
    (tensor_μ C (M.X, 𝟙_ C) (M.X, 𝟙_ C) ≫ (M.mul ⊗ (λ_ (𝟙_ C)).hom)) ≫ (ρ_ M.X).hom =
      ((ρ_ M.X).hom ⊗ (ρ_ M.X).hom) ≫ M.mul

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

(CategoryTheory.tensor_μ C (M.X, 𝟙_ C) (M.X, 𝟙_ C) ≫ (M.mul ⊗ (λ_ (𝟙_ C)).hom)) ≫ (ρ_ M.X).hom =
  ((ρ_ M.X).hom ⊗ (ρ_ M.X).hom) ≫ M.mul


theorem degree_pow_le (p : R[X]) : ∀ n : ℕ, degree (p ^ n) ≤ n • degree p

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


@[to_additive (attr := fun_prop)]
theorem ContinuousOn.pow {f : X → M} {s : Set X} (hf : ContinuousOn f s) (n : ℕ) :
    ContinuousOn (fun x => f x ^ n) s

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
{f : X → M}
{s : Set X}
(hf : ContinuousOn f s)
(n : ℕ)


lemma SMulCommClass.of_commMonoid
    (A B G : Type*) [CommMonoid G] [SMul A G] [SMul B G]
    [IsScalarTower A G G] [IsScalarTower B G G] :
    SMulCommClass A B G

(A : Type u_11)
(B : Type u_12)
(G : Type u_13)
[CommMonoid G]
[SMul A G]
[SMul B G]
[IsScalarTower A G G]
[IsScalarTower B G G]


@[to_additive (attr := simp) sub_mem_addCenter]
theorem div_mem_center (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) : a / b ∈ Set.center M

{M : Type u_1}
[DivisionMonoid M]
{a b : M}
(ha : a ∈ Set.center M)
(hb : b ∈ Set.center M)


@[simp]
theorem _root_.NonUnitalAlgHom.coe_Lmul : ⇑(NonUnitalAlgHom.Lmul 𝕜 𝕜') = mul 𝕜 𝕜'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_3}
[NonUnitalSeminormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']

⇑(NonUnitalAlgHom.Lmul 𝕜 𝕜') = ⇑(ContinuousLinearMap.mul 𝕜 𝕜')


@[simp]
theorem T_inv_mul_apply_one (g : SL(2, ℤ)) : ↑ₘ(T⁻¹ * g) 1 = ↑ₘg 1

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


lemma findGreatest_succ (n : ℕ) :
    Nat.findGreatest P (n + 1) = if P (n + 1) then n + 1 else Nat.findGreatest P n

{P : ℕ → Prop}
[DecidablePred P]
(n : ℕ)


lemma le_iff_ne_zero_of_dvd (ha : a ≠ 0) (hab : a ∣ b) : a ≤ b ↔ b ≠ 0


theorem mul_inverse_rev' {a b : M₀} (h : Commute a b) :
    inverse (a * b) = inverse b * inverse a

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a b : M₀}
(h : Commute a b)

Ring.inverse (a * b) = Ring.inverse b * Ring.inverse a


theorem hasDerivAt_resolvent {a : A} {k : 𝕜} (hk : k ∈ ρ a) :
    HasDerivAt (resolvent a) (-resolvent a k ^ 2) k

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
{a : A}
{k : 𝕜}
(hk : k ∈ resolventSet 𝕜 a)


@[simp]
theorem coe_toHom {f : M ↪ₑ[L] N} : (f.toHom : M → N) = (f : M → N)

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
{f : M ↪ₑ[L] N}


theorem hasFDerivAt_exp_smul_const (x : 𝔸) (t : 𝕊) :
    HasFDerivAt (fun u : 𝕊 => exp 𝕂 (u • x)) (exp 𝕂 (t • x) • (1 : 𝕊 →L[𝕂] 𝕊).smulRight x) t

(𝕂 : Type u_1)
{𝕊 : Type u_2}
{𝔸 : Type u_3}
[RCLike 𝕂]
[NormedCommRing 𝕊]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝕊]
[NormedAlgebra 𝕂 𝔸]
[Algebra 𝕊 𝔸]
[ContinuousSMul 𝕊 𝔸]
[IsScalarTower 𝕂 𝕊 𝔸]
[CompleteSpace 𝔸]
(x : 𝔸)
(t : 𝕊)

HasFDerivAt (fun u => NormedSpace.exp 𝕂 (u • x)) (NormedSpace.exp 𝕂 (t • x) • ContinuousLinearMap.smulRight 1 x) t


theorem identity_N₂_objectwise (P : Karoubi (SimplicialObject C)) :
    (N₂Γ₂.inv.app (N₂.obj P) : N₂.obj P ⟶ N₂.obj (Γ₂.obj (N₂.obj P))) ≫
    N₂.map (Γ₂N₂.natTrans.app P) = 𝟙 (N₂.obj P)

(P : CategoryTheory.Idempotents.Karoubi (CategoryTheory.SimplicialObject C))

AlgebraicTopology.DoldKan.N₂Γ₂.inv.app (AlgebraicTopology.DoldKan.N₂.obj P) ≫
    AlgebraicTopology.DoldKan.N₂.map (AlgebraicTopology.DoldKan.Γ₂N₂.natTrans.app P) =
  𝟙 (AlgebraicTopology.DoldKan.N₂.obj P)


/-- If the angle between two vectors is `π / 2`, the first vector is nonzero. -/
theorem left_ne_zero_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = (π / 2 : ℝ)) : x ≠ 0

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


@[simp]
theorem sort_singleton (a : α) : sort r {a} = [a]

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


theorem rev_surjective : Surjective (@rev n)


theorem abs_im_div_abs_le_one (z : ℂ) : |z.im / Complex.abs z| ≤ 1


@[simp]
theorem dom_comp (f : β →. γ) (g : α →. β) : (f.comp g).Dom = g.preimage f.Dom

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


theorem measurable_const_smul_iff₀ {c : G₀} (hc : c ≠ 0) :
    (Measurable fun x => c • f x) ↔ Measurable f

{β : Type u_3}
{α : Type u_4}
[MeasurableSpace β]
[MeasurableSpace α]
{f : α → β}
{G₀ : Type u_6}
[GroupWithZero G₀]
[MeasurableSpace G₀]
[MulAction G₀ β]
[MeasurableSMul G₀ β]
{c : G₀}
(hc : c ≠ 0)


theorem tsum_lt_tsum {f g : α → ℝ≥0∞} {i : α} (hfi : tsum f ≠ ∞) (h : ∀ a : α, f a ≤ g a)
    (hi : f i < g i) : ∑' x, f x < ∑' x, g x

{α : Type u_1}
{f g : α → ℝ≥0∞}
{i : α}
(hfi : tsum f ≠ ⊤)
(h : ∀ (a : α), f a ≤ g a)
(hi : f i < g i)


theorem length_sigmaCompositionAux (a : Composition n) (b : Composition a.length)
    (i : Fin b.length) :
    Composition.length (Composition.sigmaCompositionAux a b ⟨i, (length_gather a b).symm ▸ i.2⟩) =
      Composition.blocksFun b i

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

(a.sigmaCompositionAux b ⟨↑i, ⋯⟩).length = b.blocksFun i


lemma add_mod_eq_add_mod_left (c : ℕ) (H : a % d = b % d) : (c + a) % d = (c + b) % d


@[simp]
theorem toContinuousOrderHom_coe {f : EsakiaHom α β} :
    f.toContinuousOrderHom = (f : α → β)

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
{f : EsakiaHom α β}


/-- The star algebra equivalence obtained by restricting `Unitization.inrNonUnitalStarAlgHom`
to its range. -/
@[simps!]
def inrRangeEquiv (R A : Type*) [CommSemiring R] [StarAddMonoid R] [NonUnitalSemiring A]
    [Star A] [Module R A] [IsScalarTower R A A] [SMulCommClass R A A] :
    A ≃⋆ₐ[R] NonUnitalStarAlgHom.range (inrNonUnitalStarAlgHom R A)

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[StarAddMonoid R]
[NonUnitalSemiring A]
[Star A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(a : A)

↑((Unitization.inrRangeEquiv R A) a) = ↑(Unitization.inrNonUnitalStarAlgHom R A) a


@[to_additive]
theorem oreDiv_mul_oreDiv {r₁ : R} {r₂ : R} {s₁ s₂ : S} :
    (r₁ /ₒ s₁) * (r₂ /ₒ s₂) = oreNum r₁ s₂ * r₂ /ₒ (oreDenom r₁ s₂ * s₁)

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{r₁ r₂ : R}
{s₁ s₂ : ↥S}

r₁ -ₒ s₁ + (r₂ -ₒ s₂) = AddOreLocalization.oreMin r₁ s₂ + r₂ -ₒ (AddOreLocalization.oreSubtra r₁ s₂ + s₁)


@[simp]
theorem preimage_cast_uIoc (p q : ℚ≥0) : (↑) ⁻¹' uIoc (p : K) q = uIoc p q

{K : Type u_5}
[LinearOrderedSemifield K]
(p q : ℚ≥0)


/-- The associator functor `(C × D) × E ⥤ C × (D × E)`.
-/
@[simps]
def associator : (C × D) × E ⥤ C × D × E

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

∀ (x x_1 : (C × D) × E) (f : x ⟶ x_1), (CategoryTheory.prod.associator C D E).map f = (f.1.1, f.1.2, f.2)


theorem comp (hf : RightInvOn f' f t) (hg : RightInvOn g' g p) (g'pt : MapsTo g' p t) :
    RightInvOn (f' ∘ g') (g ∘ f) p

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


/-- The measure of a measurable set is the supremum of the measures of compact sets it contains. -/
theorem _root_.MeasurableSet.measure_eq_iSup_isCompact ⦃U : Set α⦄ (hU : MeasurableSet U)
    (μ : Measure α) [InnerRegular μ] :
    μ U = ⨆ (K : Set α) (_ : K ⊆ U) (_ : IsCompact K), μ K

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
⦃U : Set α⦄
(hU : MeasurableSet U)
(μ : MeasureTheory.Measure α)
[μ.InnerRegular]

μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : IsCompact K), μ K


theorem tensor_μ_eq_tensorTensorTensorComm {A B C D : ModuleCat R} :
    tensor_μ _ (A, B) (C, D) = (TensorProduct.tensorTensorTensorComm R A B C D).toLinearMap

{R : Type u}
[CommRing R]
{A B C D : ModuleCat R}

CategoryTheory.tensor_μ (ModuleCat R) (A, B) (C, D) = ↑(TensorProduct.tensorTensorTensorComm R ↑A ↑B ↑C ↑D)


/-- A set is a neighborhood of `a` within `[a, +∞)` if and only if it contains an interval `[a, u)`
with `a < u`. -/
theorem mem_nhdsWithin_Ici_iff_exists_Ico_subset [NoMaxOrder α] {a : α} {s : Set α} :
    s ∈ 𝓝[≥] a ↔ ∃ u ∈ Ioi a, Ico a u ⊆ s

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

s ∈ 𝓝[≥] a ↔ ∃ u ∈ Set.Ioi a, Set.Ico a u ⊆ s


/-- A compact element `k` has the property that any directed set lying strictly below `k` has
its `sSup` strictly below `k`. -/
theorem IsCompactElement.directed_sSup_lt_of_lt {α : Type*} [CompleteLattice α] {k : α}
    (hk : IsCompactElement k) {s : Set α} (hemp : s.Nonempty) (hdir : DirectedOn (· ≤ ·) s)
    (hbelow : ∀ x ∈ s, x < k) : sSup s < k

(hk : CompleteLattice.IsCompactElement k)

(hdir : DirectedOn (fun x x_1 => x ≤ x_1) s)


theorem le_topologicalClosure (s : StarSubalgebra R A) : s ≤ s.topologicalClosure

{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 : StarSubalgebra R A)