@[simp]
theorem ULift.edist_up_up (x y : α) : edist (ULift.up x) (ULift.up y) = edist x y

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

edist { down := x } { down := y } = edist x y


@[reassoc, elementwise]
lemma map_ΓIso_inv {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] (U : Y.Opens) :
    Y.presheaf.map (homOfLE inf_le_right).op ≫ (ΓIso f U).inv = f.app U

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[AlgebraicGeometry.IsOpenImmersion f]
(U : Y.Opens)

Y.presheaf.map (CategoryTheory.homOfLE ⋯).op ≫ (AlgebraicGeometry.IsOpenImmersion.ΓIso f U).inv =
  AlgebraicGeometry.Scheme.Hom.app f U


protected theorem Finite.offDiag {s : Set α} (hs : s.Finite) : s.offDiag.Finite

{α : Type u}
{s : Set α}
(hs : s.Finite)


theorem eq_zero_iff_forall_not_mem {s : Multiset α} : s = 0 ↔ ∀ a, a ∉ s


/-- The identity monoidal functor. -/
@[simps]
def id : MonoidalFunctor.{v₁, v₁} C C

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

(CategoryTheory.MonoidalFunctor.id C).toFunctor = 𝟭 C


theorem IsTrail.isEulerian_of_forall_mem {u v : V} {p : G.Walk u v} (h : p.IsTrail)
    (hc : ∀ e, e ∈ G.edgeSet → e ∈ p.edges) : p.IsEulerian

{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsTrail)
(hc : ∀ e ∈ G.edgeSet, e ∈ p.edges)


/-- A dependent version of `Subgroup.iSup_induction`. -/
@[to_additive (attr := elab_as_elim) "A dependent version of `AddSubgroup.iSup_induction`. "]
theorem iSup_induction' {ι : Sort*} (S : ι → Subgroup G) {C : ∀ x, (x ∈ ⨆ i, S i) → Prop}
    (hp : ∀ (i), ∀ x (hx : x ∈ S i), C x (mem_iSup_of_mem i hx)) (h1 : C 1 (one_mem _))
    (hmul : ∀ x y hx hy, C x hx → C y hy → C (x * y) (mul_mem ‹_› ‹_›)) {x : G}
    (hx : x ∈ ⨆ i, S i) : C x hx

(hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x ⋯)

(hmul : ∀ (x y : G) (hx : x ∈ ⨆ i, S i) (hy : y ∈ ⨆ i, S i), C x hx → C y hy → C (x * y) ⋯)


@[simp]
theorem elim'_none (b : β) (f : α → β) : Option.elim' b f none = b

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


@[simp] lemma ceilRoot_zero_left (a : ℕ) : ceilRoot 0 a = 0


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

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


theorem le_essInf_of_ae_le {f : α → β} (c : β) (hf : (fun _ => c) ≤ᵐ[μ] f) : c ≤ essInf f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[CompleteLattice β]
{f : α → β}
(c : β)
(hf : (fun x => c) ≤ᵐ[μ] f)


theorem continuousOn_fst {s : Set (α × β)} : ContinuousOn Prod.fst s

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


theorem subNatNat_of_sub_eq_succ {m n k : Nat} (h : n - m = succ k) : subNatNat m n = -[k+1]


theorem isSeparator_coprod_of_isSeparator_right (G H : C) [HasBinaryCoproduct G H]
    (hH : IsSeparator H) : IsSeparator (G ⨿ H)


theorem degree_of_d_eq_zero' : (⟨0, 0, 0, 0⟩ : Cubic R).toPoly.degree = ⊥


@[to_additive additive_of_symmetric_of_isTotal]
lemma multiplicative_of_symmetric_of_isTotal
    (hsymm : Symmetric p) (hf_swap : ∀ {a b}, p a b → f a b * f b a = 1)
    (hmul : ∀ {a b c}, r a b → r b c → p a b → p b c → p a c → f a c = f a b * f b c)
    {a b c : α} (pab : p a b) (pbc : p b c) (pac : p a c) : f a c = f a b * f b c

(f : α → α → β)

(hf_swap : ∀ {a b : α}, p a b → f a b + f b a = 0)

(hmul : ∀ {a b c : α}, r a b → r b c → p a b → p b c → p a c → f a c = f a b + f b c)


@[simp]
theorem vandermonde_apply {n : ℕ} (v : Fin n → R) (i j) : vandermonde v i j = v i ^ (j : ℕ)

{R : Type u_1}
[CommRing R]
{n : ℕ}
(v : Fin n → R)
(i j : Fin n)


/-- Affine homeomorphism `(r • · +ᵥ c)` between a normed space and an add torsor over this space,
interpreted as a `PartialHomeomorph` between `Metric.ball 0 1` and `Metric.ball c r`. -/
@[simps!]
def unitBallBall (c : P) (r : ℝ) (hr : 0 < r) : PartialHomeomorph E P

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{P : Type u_2}
[PseudoMetricSpace P]
[NormedAddTorsor E P]
(c : P)
(r : ℝ)
(hr : 0 < r)
(a : P)

↑(PartialHomeomorph.unitBallBall c r hr).symm a = r⁻¹ • (a -ᵥ c)


private theorem ghostFun_sub : ghostFun (x - y) = ghostFun x - ghostFun y

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

WittVector.ghostFun (x - y) = WittVector.ghostFun x - WittVector.ghostFun y


theorem continuousOn_iUnion' {g : X → Y} (hf : LocallyFinite f)
    (hc : ∀ i x, x ∈ closure (f i) → ContinuousWithinAt g (f i) x) :
    ContinuousOn g (⋃ i, f i)

(hc : ∀ (i : ι), ∀ x ∈ closure (f i), ContinuousWithinAt g (f i) x)


/-- The map from ideals of `R` dividing `I` to the ideals of `A` dividing `J` induced by
  a homomorphism `f : R/I →+* A/J` -/
@[simps] -- Porting note: use `Subtype` instead of `Set` to make linter happy
def idealFactorsFunOfQuotHom {f : R ⧸ I →+* A ⧸ J} (hf : Function.Surjective f) :
    {p : Ideal R // p ∣ I} →o {p : Ideal A // p ∣ J}

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[IsDedekindDomain A]
{I : Ideal R}
{J : Ideal A}
{f : R ⧸ I →+* A ⧸ J}
(hf : Function.Surjective ⇑f)
(X : { p // p ∣ I })

↑((idealFactorsFunOfQuotHom hf) X) =
  Ideal.comap (Ideal.Quotient.mk J) (Ideal.map f (Ideal.map (Ideal.Quotient.mk I) ↑X))


/-- Permuting vectors on both sides of a dot product is a no-op. -/
@[simp]
theorem comp_equiv_dotProduct_comp_equiv (e : m ≃ n) : x ∘ e ⬝ᵥ y ∘ e = x ⬝ᵥ y

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

x ∘ ⇑e ⬝ᵥ y ∘ ⇑e = x ⬝ᵥ y


theorem sum_inr : Computable (@Sum.inr α β)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]


theorem liftp_iff {α : Type u} (p : α → Prop) (x : P α) :
    Liftp p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i, p (f i)

{P : PFunctor.{u}}
{α : Type u}
(p : α → Prop)
(x : ↑P α)

Functor.Liftp p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ (i : P.B a), p (f i)


@[reassoc (attr := simp)]
theorem fac_lift {F : MonoFactorisation f} (hF : IsImage F) (F' : MonoFactorisation f) :
    F.e ≫ hF.lift F' = F'.e

{F : CategoryTheory.Limits.MonoFactorisation f}

(F' : CategoryTheory.Limits.MonoFactorisation f)


protected theorem Finite.prod (hs : s.Finite) (ht : t.Finite) : (s ×ˢ t : Set (α × β)).Finite

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
(hs : s.Finite)
(ht : t.Finite)


/-- The isomorphism `eA.functor ≅ F ⋙ e'.inverse` deduced from the
unit isomorphism of `e'` and the isomorphism `hF : eA.functor ⋙ e'.functor ≅ F`. -/
@[simps!]
def υ : eA.functor ≅ F ⋙ e'.inverse

{A : Type u_1}
{A' : Type u_2}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_4} B']
{eA : A ≌ A'}
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)
(X : A)

(AlgebraicTopology.DoldKan.Compatibility.υ hF).hom.app X =
  e'.unitIso.hom.app (eA.functor.obj X) ≫ e'.inverse.map (hF.hom.app X)


theorem inf_iSup_genEigenspace [FiniteDimensional K V] (h : ∀ x ∈ p, f x ∈ p) :
    p ⊓ ⨆ μ, ⨆ k, f.genEigenspace μ k = ⨆ μ, ⨆ k, p ⊓ f.genEigenspace μ k

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{p : Submodule K V}
{f : Module.End K V}
[FiniteDimensional K V]
(h : ∀ x ∈ p, f x ∈ p)

p ⊓ ⨆ μ, ⨆ k, (f.genEigenspace μ) k = ⨆ μ, ⨆ k, p ⊓ (f.genEigenspace μ) k


theorem convexIndependent_set_iff_inter_convexHull_subset {s : Set E} :
    ConvexIndependent 𝕜 ((↑) : s → E) ↔ ∀ t, t ⊆ s → s ∩ convexHull 𝕜 t ⊆ t

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}

ConvexIndependent 𝕜 Subtype.val ↔ ∀ t ⊆ s, s ∩ (convexHull 𝕜) t ⊆ t


@[simp]
theorem birthday_natCast : ∀ n : ℕ, birthday n = n


theorem empty_card' {h : Fintype.{u} (∅ : Set α)} : @Fintype.card (∅ : Set α) h = 0


theorem ae_smul_measure {p : α → Prop} [Monoid R] [DistribMulAction R ℝ≥0∞]
    [IsScalarTower R ℝ≥0∞ ℝ≥0∞] (h : ∀ᵐ x ∂μ, p x) (c : R) : ∀ᵐ x ∂c • μ, p x

{R : Type u_1}
{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : α → Prop}
[Monoid R]
[DistribMulAction R ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
(h : ∀ᵐ (x : α) ∂μ, p x)
(c : R)


lemma isometry_inr : Isometry ((↑) : A → Unitization 𝕜 A)

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[RegularNormedAlgebra 𝕜 A]


@[simp] theorem zero_ne_negSucc (n : Nat) : 0 ≠ -[n+1]


theorem martingalePart_eq_sum : martingalePart f ℱ μ = fun n =>
    f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|ℱ i])

{Ω : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : ℕ → Ω → E}
{ℱ : MeasureTheory.Filtration ℕ m0}

MeasureTheory.martingalePart f ℱ μ = fun n => f 0 + ∑ i ∈ Finset.range n, (f (i + 1) - f i - μ[f (i + 1) - f i|↑ℱ i])


@[to_additive]
theorem mk'_cancel (a : M) (b c : S) :
    f.mk' (a * c) (b * c) = f.mk' a b

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(a : M)
(b c : ↥S)


/-- If you rotate a triangle, you get another triangle.
Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `rotate` gives a triangle of the form:
```
      g       h        -f⟦1⟧'
  Y  ───> Z  ───>  X⟦1⟧ ───> Y⟦1⟧
```
-/
@[simps!]
def Triangle.rotate (T : Triangle C) : Triangle C

(T : CategoryTheory.Pretriangulated.Triangle C)

T.rotate.obj₃ = (CategoryTheory.shiftFunctor C 1).obj T.obj₁


@[simp]
theorem «exists» {p : (Σ'a, β a) → Prop} : (∃ x, p x) ↔ ∃ a b, p ⟨a, b⟩

{α : Sort u_1}
{β : α → Sort u_2}
{p : (a : α) ×' β a → Prop}


theorem iunfoldr.fst_eq
    {f : Fin w → α → α × Bool} (state : Nat → α) (s : α)
    (init : s = state 0)
    (ind : ∀(i : Fin w), (f i (state i.val)).fst = state (i.val+1)) :
    (iunfoldr f s).fst = state w

(ind : ∀ (i : Fin w), (f i (state ↑i)).fst = state (↑i + 1))


theorem submodule_comap_mul_reverse (p q : Submodule R (CliffordAlgebra Q)) :
    (p * q).comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) =
      q.comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) *
        p.comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(p q : Submodule R (CliffordAlgebra Q))

Submodule.comap CliffordAlgebra.reverse (p * q) =
  Submodule.comap CliffordAlgebra.reverse q * Submodule.comap CliffordAlgebra.reverse p


@[simp, reassoc]
lemma map_restrictFullyFaithful_unit_app (X : C) :
    iC.map ((adj.restrictFullyFaithful hiC hiD comm1 comm2).unit.app X) =
    adj.unit.app (iC.obj X) ≫ R'.map (comm1.hom.app X) ≫ comm2.hom.app (L.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{C' : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C']
{D' : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D']
{iC : CategoryTheory.Functor C C'}
{iD : CategoryTheory.Functor D D'}
{L' : CategoryTheory.Functor C' D'}
{R' : CategoryTheory.Functor D' C'}
(adj : L' ⊣ R')
(hiC : iC.FullyFaithful)
(hiD : iD.FullyFaithful)
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(comm1 : iC.comp L' ≅ L.comp iD)
(comm2 : iD.comp R' ≅ R.comp iC)
(X : C)

iC.map ((adj.restrictFullyFaithful hiC hiD comm1 comm2).unit.app X) =
  CategoryTheory.CategoryStruct.comp (adj.unit.app (iC.obj X))
    (CategoryTheory.CategoryStruct.comp (R'.map (comm1.hom.app X)) (comm2.hom.app (L.obj X)))


/-- `Matrix.comp` as `LinearEquiv` -/
@[simps!]
def compLinearEquiv : Matrix I J (Matrix K L R) ≃ₗ[K] Matrix (I × K) (J × L) R

(I : Type u_1)
(J : Type u_2)
(L : Type u_4)
(R : Type u_5)
(K : Type u_6)
[CommSemiring K]
[AddCommMonoid R]
[Module K R]

∀ (a : Matrix (I × K) (J × L) R), (Matrix.compLinearEquiv I J L R K).symm a = (Matrix.compAddEquiv I J K L R).symm a


theorem dvd_mod_iff {k m n : Nat} (h: k ∣ n) : k ∣ m % n ↔ k ∣ m


@[to_additive] lemma integral_eq_tsum'' (h : IsFundamentalDomain G s μ)
    (f : α → E) (hf : Integrable f μ) : ∫ x, f x ∂μ = ∑' g : G, ∫ x in s, f (g • x) ∂μ

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)

∫ (x : α), f x ∂μ = ∑' (g : G), ∫ (x : α) in s, f (g +ᵥ x) ∂μ


@[to_additive]
theorem comp_mul [Mul M] [CommSemigroup N] [CommSemigroup P] (g : N →ₙ* P) (f₁ f₂ : M →ₙ* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂

{M : Type u_3}
{N : Type u_4}
{P : Type u_5}
[Add M]
[AddCommSemigroup N]
[AddCommSemigroup P]
(g : AddHom N P)
(f₁ f₂ : AddHom M N)

g.comp (f₁ + f₂) = g.comp f₁ + g.comp f₂


private theorem frequently_imp {α : Type*} {p q : α → Prop} {f : Filter α}
    (hq : ∀ (x : α), p x → q x) (hp : ∃ᶠ (x : α) in f, p x) : ∃ᶠ (x : α) in f, q x

{α : Type u_1}
{p q : α → Prop}
{f : Filter α}
(hq : ∀ (x : α), p x → q x)
(hp : ∃ᶠ (x : α) in f, p x)


theorem withTopEquiv_symm_coe (n : Nat) : withTopEquiv.symm n = n


theorem castSucc_ne_zero_iff (a : Fin (n + 1)) : castSucc a ≠ 0 ↔ a ≠ 0


theorem id_nullhomotopic (X : Type*) [TopologicalSpace X] [ContractibleSpace X] :
    (ContinuousMap.id X).Nullhomotopic

(X : Type u_1)
[TopologicalSpace X]
[ContractibleSpace X]


theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type*} (T : ι → L.Theory) :
    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i)

{L : FirstOrder.Language}
{ι : Type u_1}
(T : ι → L.Theory)

FirstOrder.Language.Theory.IsSatisfiable (⋃ i, T i) ↔
  ∀ (s : Finset ι), FirstOrder.Language.Theory.IsSatisfiable (⋃ i ∈ s, T i)


theorem partiallyWellOrderedOn_iff_exists_monotone_subseq :
    s.PartiallyWellOrderedOn r ↔
      ∀ f : ℕ → α, (∀ n, f n ∈ s) → ∃ g : ℕ ↪o ℕ, ∀ m n : ℕ, m ≤ n → r (f (g m)) (f (g n))

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

s.PartiallyWellOrderedOn r ↔ ∀ (f : ℕ → α), (∀ (n : ℕ), f n ∈ s) → ∃ g, ∀ (m n : ℕ), m ≤ n → r (f (g m)) (f (g n))


@[simp]
theorem mem_incidenceSet (v w : V) : s(v, w) ∈ G.incidenceSet v ↔ G.Adj v w

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


lemma gaussianReal_absolutelyContinuous' (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    volume ≪ gaussianReal μ v

MeasureTheory.volume ≪ ProbabilityTheory.gaussianReal μ v


theorem iUnion_ite (f g : ι → Set α) :
    ⋃ i, (if p i then f i else g i) = (⋃ (i) (_ : p i), f i) ∪ ⋃ (i) (_ : ¬p i), g i

{α : Type u_1}
{ι : Sort u_4}
(p : ι → Prop)
[DecidablePred p]
(f g : ι → Set α)

(⋃ i, if p i then f i else g i) = (⋃ i, ⋃ (_ : p i), f i) ∪ ⋃ i, ⋃ (_ : ¬p i), g i


@[scoped simp]
theorem map_int_add' [AddCommGroupWithOne G] [AddGroup H] [AddConstMapClass F G H 1 b]
    (f : F) (n : ℤ) (x : G) : f (↑n + x) = f x + n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{b : H}
[AddCommGroupWithOne G]
[AddGroup H]
[AddConstMapClass F G H 1 b]
(f : F)
(n : ℤ)
(x : G)


theorem ord_proj_mul_ord_compl_eq_self (n p : ℕ) : ord_proj[p] n * ord_compl[p] n = n

p ^ n.factorization p * (n / p ^ n.factorization p) = n


theorem sigmaFinite_iff : SigmaFinite μ ↔ Nonempty (μ.FiniteSpanningSetsIn univ)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}

MeasureTheory.SigmaFinite μ ↔ Nonempty (μ.FiniteSpanningSetsIn Set.univ)


theorem mk_mem_row_iff {μ : YoungDiagram} {i j : ℕ} : (i, j) ∈ μ.row i ↔ (i, j) ∈ μ


protected theorem pow_right_comm (a m n : Nat) : (a ^ m) ^ n = (a ^ n) ^ m


theorem enoughInjectives_of_enoughProjectives_op [EnoughProjectives Cᵒᵖ] : EnoughInjectives C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.EnoughProjectives Cᵒᵖ]


@[simp]
theorem principal_singleton (a : α) : 𝓟 {a} = pure a


/-- If `C` has all limits of diagrams `parallelFamily f`, then it has all wide equalizers -/
theorem hasWideEqualizers_of_hasLimit_parallelFamily
    [∀ {J : Type w} {X Y : C} {f : J → (X ⟶ Y)}, HasLimit (parallelFamily f)] :
    HasWideEqualizers.{w} C

[∀ {J : Type w} {X Y : C} {f : J → (X ⟶ Y)}, CategoryTheory.Limits.HasLimit (CategoryTheory.Limits.parallelFamily f)]


/-- Implementation of `Mon_.hasLimits`: a limiting cone over a functor `F : J ⥤ Mon_ C`.
-/
@[simps]
def limitCone (F : J ⥤ Mon_ C) : Cone F

((Mon_.limitCone F).π.app j).hom = CategoryTheory.Limits.limit.π (F ⋙ Mon_.forget C) j


/-- The canonical linear map from the kernel of `g` to the kernel of its localization
is localizing. In other words, localization commutes with taking kernels. -/
lemma RingHom.toKerIsLocalization_isLocalizedModule (hT : Submonoid.map g M = T) :
    IsLocalizedModule M (toKerIsLocalization S Q g (hT.symm ▸ Submonoid.le_comap_map M))

{R : Type u_1}
{S : Type u_2}
{P : Type u_3}
(Q : Type u_4)
[CommSemiring R]
[CommSemiring S]
[CommSemiring P]
[CommSemiring Q]
{M : Submonoid R}
{T : Submonoid P}
[Algebra R S]
[Algebra P Q]
[IsLocalization M S]
[IsLocalization T Q]
(g : R →+* P)
(hT : Submonoid.map g M = T)

IsLocalizedModule M (RingHom.toKerIsLocalization S Q g ⋯)


private theorem nat_prop (r : ℕ) : innerProp' E (r : 𝕜)

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[InnerProductSpaceable E]
(r : ℕ)


/-- The natural transformation `π₂ ⟶ π₃` induced by `S.g` for all `S : ShortComplex C`. -/
@[simps] def π₂Toπ₃ : (π₂ : _ ⥤ C) ⟶ π₃

CategoryTheory.ShortComplex.π₂Toπ₃.app S = S.g


theorem exists_dvd_and_dvd_of_dvd_mul [DecompositionMonoid α] {b c a : α} (H : a ∣ b * c) :
    ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂

{α : Type u_1}
[Semigroup α]
[DecompositionMonoid α]
{b c a : α}
(H : a ∣ b * c)


@[simp] theorem set_nil_zero : set [] 0 y = [y]


theorem zsmul_eq_iff {ψ θ : Angle} {z : ℤ} (hz : z ≠ 0) :
    z • ψ = z • θ ↔ ∃ k : Fin z.natAbs, ψ = θ + (k : ℕ) • (2 * π / z : ℝ)

z • ψ = z • θ ↔ ∃ k, ψ = θ + ↑k • ↑(2 * π / ↑z)


@[simp]
theorem ofDual_le_ofDual_iff {a b : WithBot αᵒᵈ} : WithBot.ofDual a ≤ WithBot.ofDual b ↔ b ≤ a

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


theorem Convex.convexIndependent_extremePoints (hs : Convex 𝕜 s) :
    ConvexIndependent 𝕜 ((↑) : s.extremePoints 𝕜 → E)

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)


@[simp]
theorem map_pure (m : α → β) (a : α) : map m (pure a) = pure (m a)

{α : Type u}
{β : Type v}
(m : α → β)
(a : α)


/-- The counit of the adjunction `condensedSetToTopCat ⊣ topCatToCondensedSet` -/
@[simps]
def topCatAdjunctionCounit (X : TopCat.{u+1}) : X.toCondensedSet.toTopCat ⟶ X

(X : TopCat)
(x : ↑X.toCondensedSet.toTopCat)

(CondensedSet.topCatAdjunctionCounit X) x = x.toFun PUnit.unit


theorem comp_inj' {p₁ p₂ : Path a b} {q₁ q₂ : Path b c} (h : p₁.length = p₂.length) :
    p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂

{V : Type u}
[Quiver V]
{a b c : V}
{p₁ p₂ : Quiver.Path a b}
{q₁ q₂ : Quiver.Path b c}
(h : p₁.length = p₂.length)


theorem Primrec.comp₂ {f : γ → σ} {g : α → β → γ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a b => f (g a b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{σ : Type u_5}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable σ]
{f : γ → σ}
{g : α → β → γ}
(hf : Primrec f)
(hg : Primrec₂ g)


@[simp, norm_cast]
theorem coe_iInf {ι : Sort*} (f : ι → RingCon R) : ⇑(iInf f) = ⨅ i, ⇑(f i)

{R : Type u_2}
[Add R]
[Mul R]
{ι : Sort u_3}
(f : ι → RingCon R)


theorem InjOn.imageFactorization_injective (h : InjOn f s) :
    Injective (s.imageFactorization f)

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
(h : Set.InjOn f s)

Function.Injective (Set.imageFactorization f s)


/-- A finite domain is a field. See also `littleWedderburn` and `Fintype.divisionRingOfIsDomain`. -/
theorem Finite.isDomain_to_isField (D : Type*) [Finite D] [Ring D] [IsDomain D] : IsField D

(D : Type u_1)
[Finite D]
[Ring D]
[IsDomain D]


@[simp]
theorem conjugate_coe_eq (φ : K →+* ℂ) (x : K) : (conjugate φ) x = conj (φ x)

{K : Type u_1}
[Field K]
(φ : K →+* ℂ)
(x : K)

(NumberField.ComplexEmbedding.conjugate φ) x = (starRingEnd ℂ) (φ x)


@[to_additive]
theorem intro [R1Space α] {K : Set α} (hK : IsCompact K)
    (hfK : ∀ x, x ∉ K → f x = 1) : HasCompactMulSupport f

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[Zero β]
{f : α → β}
[R1Space α]
{K : Set α}
(hK : IsCompact K)
(hfK : ∀ x ∉ K, f x = 0)


theorem commutes' {m : ℕ} (hm : n ≤ m) (x : ZMod (p ^ m)) :
    truncate hm (zmodEquivTrunc p m x) = zmodEquivTrunc p n (ZMod.castHom (pow_dvd_pow p hm) _ x)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)
{m : ℕ}
(hm : n ≤ m)
(x : ZMod (p ^ m))

(TruncatedWittVector.truncate hm) ((TruncatedWittVector.zmodEquivTrunc p m) x) =
  (TruncatedWittVector.zmodEquivTrunc p n) ((ZMod.castHom ⋯ (ZMod (p ^ n))) x)


/-- The cartesian product of two monoidal functors is monoidal. -/
@[simps]
def prod : MonoidalFunctor (B × D) (C × E)

(F : CategoryTheory.MonoidalFunctor B C)

(G : CategoryTheory.MonoidalFunctor D E)

(F.prod G).toLaxMonoidalFunctor = F.prod G.toLaxMonoidalFunctor


/-- `exp ∘ f` is analytic -/
theorem AnalyticAt.cexp (fa : AnalyticAt ℂ f x) : AnalyticAt ℂ (fun z ↦ exp (f z)) x

{E : Type}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
(fa : AnalyticAt ℂ f x)


theorem upperSemicontinuousOn_ciInf {f : ι → α → δ'}
    (bdd : ∀ x ∈ s, BddBelow (range fun i => f i x)) (h : ∀ i, UpperSemicontinuousOn (f i) s) :
    UpperSemicontinuousOn (fun x' => ⨅ i, f i x') s

{f : ι → α → δ'}

(bdd : ∀ x ∈ s, BddBelow (Set.range fun i => f i x))

(h : ∀ (i : ι), UpperSemicontinuousOn (f i) s)


@[simp]
theorem swap_self (a : α) : swap a a = Equiv.refl _


@[simp] lemma inv_nonpos : a⁻¹ ≤ 0 ↔ a ≤ 0

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}

a⁻¹ ≤ 0 ↔ a ≤ 0


theorem ext_iff : e = e' ↔ ∀ x, e x = e' x

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
{e e' : M ≃ₛₗ[σ] M₂}


lemma Basis'.closure_eq_closure (h : M.Basis' I X) : M.closure I = M.closure X

{α : Type u_2}
{M : Matroid α}
{X I : Set α}
(h : M.Basis' I X)


@[simp, nolint unusedHavesSuffices] -- false positive from unfolding galRestrictHom
lemma galRestrictHom_symm_algebraMap_apply (σ : B →ₐ[A] B) (x : B) :
    (galRestrictHom A K L B).symm σ (algebraMap B L x) = algebraMap B L (σ x)

(A : Type u_1)
(K : Type u_2)
(L : Type u_3)
(B : Type u_4)
[CommRing A]
[CommRing B]
[Algebra A B]
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra B L]
[Algebra K L]
[Algebra A L]
[IsScalarTower A B L]
[IsScalarTower A K L]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
(σ : B →ₐ[A] B)
(x : B)

((galRestrictHom A K L B).symm σ) ((algebraMap B L) x) = (algebraMap B L) (σ x)


protected theorem add_sub_cancel_left (n m : Nat) : n + m - n = m


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

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


/-- The identity map from a monoid to itself. -/
@[to_additive (attr := simps) "The identity map from an additive monoid to itself."]
def MonoidHom.id (M : Type*) [MulOneClass M] : M →* M

(M : Type u_10)
[AddZeroClass M]
(x : M)


theorem encard_union_eq (h : Disjoint s t) : (s ∪ t).encard = s.encard + t.encard

{α : Type u_1}
{s t : Set α}
(h : Disjoint s t)


theorem floor_sub_le_translationNumber (x : ℝ) : ↑⌊f x - x⌋ ≤ τ f


theorem sup_eq_sSup {s : Set Ordinal.{u}} (hs : Small.{u} s) :
    (sup.{u, u} fun x => (@equivShrink s hs).symm x) = sSup s

{s : Set Ordinal.{u}}
(hs : Small.{u, u + 1} ↑s)

(Ordinal.sup fun x => ↑((equivShrink ↑s).symm x)) = sSup s


/-- Given a pullback square assembled from a commuting square on the left and
a pullback square on the right, the left square is a pullback square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂ - h₁₂ -> X₁₃
|            |            |
v₁₁          v₁₂          v₁₃
↓            ↓            ↓
X₂₁ - h₂₁ -> X₂₂ - h₂₂ -> X₂₃
```
-/
theorem of_right {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃} {h₂₁ : X₂₁ ⟶ X₂₂}
    {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)) (p : h₁₁ ≫ v₁₂ = v₁₁ ≫ h₂₁)
    (t : IsPullback h₁₂ v₁₂ v₁₃ h₂₂) : IsPullback h₁₁ v₁₁ v₁₂ h₂₁

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

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

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

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

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

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

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

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

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

(p : h₁₁ ≫ v₁₂ = v₁₁ ≫ h₂₁)

(t : CategoryTheory.IsPullback h₁₂ v₁₂ v₁₃ h₂₂)

CategoryTheory.IsPullback h₁₁ v₁₁ v₁₂ h₂₁


@[simp high]
lemma realContinuousMapOfNNReal_apply_comp_toReal (φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A)
    (f : C(X, ℝ≥0)) :
    φ.realContinuousMapOfNNReal ((ContinuousMap.mk toReal continuous_coe).comp f) = φ f

{X : Type u_1}
[TopologicalSpace X]
{A : Type u_2}
[Ring A]
[StarRing A]
[Algebra ℝ A]
(φ : C(X, NNReal) →⋆ₐ[NNReal] A)
(f : C(X, NNReal))

φ.realContinuousMapOfNNReal ({ toFun := NNReal.toReal, continuous_toFun := NNReal.continuous_coe }.comp f) = φ f


@[simp]
theorem mapAlgEquiv_id : mapAlgEquiv (@AlgEquiv.refl R A _ _ _) = AlgEquiv.refl

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]

Polynomial.mapAlgEquiv AlgEquiv.refl = AlgEquiv.refl


@[simp]
theorem mem_powerset {x y : ZFSet.{u}} : y ∈ powerset x ↔ y ⊆ x


protected lemma add (h1 : μ₁ ≪ ν) (h2 : μ₂ ≪ ν') : μ₁ + μ₂ ≪ ν + ν'

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ₁ μ₂ ν ν' : MeasureTheory.Measure α}
(h1 : μ₁.AbsolutelyContinuous ν)
(h2 : μ₂.AbsolutelyContinuous ν')


protected theorem dvd_of_mul_dvd_mul_left
    (kpos : 0 < k) (H : k * m ∣ k * n) : m ∣ n

{k m n : Nat}
(kpos : 0 < k)
(H : k * m ∣ k * n)


@[simp]
theorem mul_eq_mul (I J : FractionalIdeal S P) : mul I J = I * J

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I J : FractionalIdeal S P)


theorem nonempty_coe : Set.Nonempty (I : Set (ι → ℝ))


/-- A field extension is unramified at infinite places if every infinite place is unramified. -/
class IsUnramifiedAtInfinitePlaces : Prop where
  isUnramified : ∀ w : InfinitePlace K, w.IsUnramified k

[self : IsUnramifiedAtInfinitePlaces k K]


theorem M.map_dest {α β : TypeVec n} (g : (α ::: P.M α) ⟹ (β ::: P.M β)) (x : P.M α)
    (h : ∀ x : P.M α, lastFun g x = (dropFun g <$$> x : P.M β)) :
    g <$$> M.dest P x = M.dest P (dropFun g <$$> x)

(h : ∀ (x : P.M α), TypeVec.lastFun g x = TypeVec.dropFun g <$$> x)

g <$$> MvPFunctor.M.dest P x = MvPFunctor.M.dest P (TypeVec.dropFun g <$$> x)


/-- An injective homomorphism of monoids preserves orders of elements. -/
@[to_additive "An injective homomorphism of additive monoids preserves orders of elements."]
theorem orderOf_injective {H : Type*} [Monoid H] (f : G →* H) (hf : Function.Injective f) (x : G) :
    orderOf (f x) = orderOf x

{G : Type u_1}
[Monoid G]
{H : Type u_6}
[Monoid H]
(f : G →* H)
(hf : Function.Injective ⇑f)
(x : G)


/-- **Vitali covering theorem**: given a set `t` of subsets of a type, one may extract a disjoint
subfamily `u` such that the `τ`-enlargment of this family covers all elements of `t`, where `τ > 1`
is any fixed number.

When `t` is a family of balls, the `τ`-enlargment of `ball x r` is `ball x ((1+2τ) r)`. In general,
it is expressed in terms of a function `δ` (think "radius" or "diameter"), positive and bounded on
all elements of `t`. The condition is that every element `a` of `t` should intersect an
element `b` of `u` of size larger than that of `a` up to `τ`, i.e., `δ b ≥ δ a / τ`.

We state the lemma slightly more generally, with an indexed family of sets `B a` for `a ∈ t`, for
wider applicability.
-/
theorem exists_disjoint_subfamily_covering_enlargment (B : ι → Set α) (t : Set ι) (δ : ι → ℝ)
    (τ : ℝ) (hτ : 1 < τ) (δnonneg : ∀ a ∈ t, 0 ≤ δ a) (R : ℝ) (δle : ∀ a ∈ t, δ a ≤ R)
    (hne : ∀ a ∈ t, (B a).Nonempty) :
    ∃ u ⊆ t,
      u.PairwiseDisjoint B ∧ ∀ a ∈ t, ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ δ a ≤ τ * δ b

{α : Type u_1}
{ι : Type u_2}
(B : ι → Set α)
(t : Set ι)
(δ : ι → ℝ)
(τ : ℝ)
(hτ : 1 < τ)
(δnonneg : ∀ a ∈ t, 0 ≤ δ a)
(R : ℝ)
(δle : ∀ a ∈ t, δ a ≤ R)
(hne : ∀ a ∈ t, (B a).Nonempty)


lemma hasDerivAt_Gamma_one_half : HasDerivAt Gamma (-√π * (γ + 2 * log 2)) (1 / 2)

HasDerivAt Real.Gamma (-√Real.pi * (γ + 2 * Real.log 2)) (1 / 2)


lemma isUnit_iff_coprime (m n : ℕ) : IsUnit (m : ZMod n) ↔ m.Coprime n


lemma nonsingular_iff_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) :
    W.Nonsingular P ↔ W.Equation P ∧ (eval P W.polynomialX ≠ 0 ∨ eval P W.polynomialY ≠ 0)

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hPz : P z ≠ 0)

W.Nonsingular P ↔ W.Equation P ∧ ((MvPolynomial.eval P) W.polynomialX ≠ 0 ∨ (MvPolynomial.eval P) W.polynomialY ≠ 0)


@[simp]
theorem dist_midpoint_right (p₁ p₂ : P) :
    dist (midpoint 𝕜 p₁ p₂) p₂ = ‖(2 : 𝕜)‖⁻¹ * dist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
[Invertible 2]
(p₁ p₂ : P)

dist (midpoint 𝕜 p₁ p₂) p₂ = ‖2‖⁻¹ * dist p₁ p₂


/-- The determinant of `conjAe`, as a linear map. -/
@[simp]
theorem det_conjAe : LinearMap.det conjAe.toLinearMap = -1

LinearMap.det Complex.conjAe.toLinearMap = -1


@[to_additive]
theorem isCyclic_of_surjective {H G F : Type*} [Group H] [Group G] [hH : IsCyclic H]
    [FunLike F H G] [MonoidHomClass F H G] (f : F) (hf : Function.Surjective f) :
    IsCyclic G

{H : Type u_1}
{G : Type u_2}
{F : Type u_3}
[AddGroup H]
[AddGroup G]
[hH : IsAddCyclic H]
[FunLike F H G]
[AddMonoidHomClass F H G]
(f : F)
(hf : Function.Surjective ⇑f)


theorem mem_symmDiff : a ∈ s ∆ t ↔ a ∈ s ∧ a ∉ t ∨ a ∈ t ∧ a ∉ s

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

a ∈ symmDiff s t ↔ a ∈ s ∧ a ∉ t ∨ a ∈ t ∧ a ∉ s


theorem inf_lt_of_left_lt (h : a < c) : a ⊓ b < c

{α : Type u}
[SemilatticeInf α]
{a b c : α}
(h : a < c)


theorem setOf_dual_base_eq : {B | M✶.Base B} = (fun X ↦ M.E \ X) '' {B | M.Base B}

{B | M✶.Base B} = (fun X => M.E \ X) '' {B | M.Base B}


theorem inversion_of_mem_sphere (h : x ∈ Metric.sphere c R) : inversion c R x = x

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c x : P}
{R : ℝ}
(h : x ∈ Metric.sphere c R)


theorem choose_succ_succ [NatPowAssoc R] (r : R) (k : ℕ) :
    choose (r + 1) (k + 1) = choose r k + choose r (k + 1)

{R : Type u_1}
[NonAssocRing R]
[Pow R ℕ]
[BinomialRing R]
[NatPowAssoc R]
(r : R)
(k : ℕ)

Ring.choose (r + 1) (k + 1) = Ring.choose r k + Ring.choose r (k + 1)


lemma familyOfElements_apply (hx : x.IsCompatible) {X Z : C} (f : Z ⟶ X) (i : I) (φ : Z ⟶ Y i) :
    familyOfElements x X f ⟨i, ⟨φ⟩⟩ = F.map φ.op (x i)

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

{x : CategoryTheory.Presheaf.FamilyOfElementsOnObjects F Y}

x.familyOfElements X f ⋯ = F.map φ.op (x i)


theorem inclusion_apply (x : K) : inclusion h x = ⟨x.1, h x.2⟩

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


theorem exists_increasing_or_nonincreasing_subseq' (r : α → α → Prop) (f : ℕ → α) :
    ∃ g : ℕ ↪o ℕ,
      (∀ n : ℕ, r (f (g n)) (f (g (n + 1)))) ∨ ∀ m n : ℕ, m < n → ¬r (f (g m)) (f (g n))

{α : Type u_1}
(r : α → α → Prop)
(f : ℕ → α)


@[to_additive (attr := simp) coe_prodComm_symm]
theorem coe_prodComm_symm : ⇑(prodComm : M × N ≃* N × M).symm = Prod.swap

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


@[to_additive]
protected theorem ext_iff {a b : αˣ} : a = b ↔ (a : α) = b

{α : Type u}
[AddMonoid α]
{a b : AddUnits α}


@[simp]
theorem rootsOfUnityEquivNthRoots_apply (x : rootsOfUnity k R) :
    (rootsOfUnityEquivNthRoots R k x : R) = ((x : Rˣ) : R)

{R : Type u_4}
{k : ℕ+}
[CommRing R]
[IsDomain R]
(x : ↥(rootsOfUnity k R))

↑((rootsOfUnityEquivNthRoots R k) x) = ↑↑x


theorem Antitone.const_mul_of_nonpos [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hf : Antitone f) (ha : a ≤ 0) : Monotone fun x => a * f x

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

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


lemma reflexive_reflGen : Reflexive (ReflGen r)


@[simp]
theorem coeff_fun_eq_zero_iff {x : HahnSeries Γ R} : x.coeff = 0 ↔ x = 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{x : HahnSeries Γ R}


theorem insert'.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) :
    Valid (insert' x t)

{α : Type u_1}
[Preorder α]
[IsTotal α fun x x_1 => x ≤ x_1]
[DecidableRel fun x x_1 => x ≤ x_1]
(x : α)
{t : Ordnode α}
(h : t.Valid)


lemma Pi.induced_precomp' {ι' : Type*} (φ : ι' → ι) :
    induced (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j)) Pi.topologicalSpace =
    ⨅ i', induced (eval (φ i')) (T (φ i'))

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{ι' : Type u_8}
(φ : ι' → ι)

TopologicalSpace.induced (fun f j => f (φ j)) Pi.topologicalSpace =
  ⨅ i', TopologicalSpace.induced (Function.eval (φ i')) (T (φ i'))


protected theorem Dense.exists_ge [NoMaxOrder α] {s : Set α} (hs : Dense s) (x : α) :
    ∃ y ∈ s, x ≤ y

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
[NoMaxOrder α]
{s : Set α}
(hs : Dense s)
(x : α)


/-- `AlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms
from `A` to `B`.  -/
class AlgHomClass (F : Type*) (R A B : outParam Type*)
  [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
  [FunLike F A B] extends RingHomClass F A B : Prop where
  commutes : ∀ (f : F) (r : R), f (algebraMap R A r) = algebraMap R B r

{F : Type u_1}
{R : outParam (Type u_2)}
{A : outParam (Type u_3)}
{B : outParam (Type u_4)}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[FunLike F A B]
[self : AlgHomClass F R A B]
(f : F)
(r : R)

f ((algebraMap R A) r) = (algebraMap R B) r


theorem Chain'.append (h₁ : Chain' R l₁) (h₂ : Chain' R l₂)
    (h : ∀ x ∈ l₁.getLast?, ∀ y ∈ l₂.head?, R x y) : Chain' R (l₁ ++ l₂)

(h : ∀ (x : α), x ∈ l₁.getLast? → ∀ (y : α), y ∈ l₂.head? → R x y)


/-- The homology isomorphism `S₁.homology ⟶ S₂.homology` induced by an isomorphism
`S₁ ≅ S₂` of short complexes. -/
@[simps]
noncomputable def homologyMapIso (e : S₁ ≅ S₂) [S₁.HasHomology]
    [S₂.HasHomology] : S₁.homology ≅ S₂.homology

(CategoryTheory.ShortComplex.homologyMapIso e).hom = CategoryTheory.ShortComplex.homologyMap e.hom


/-- Restrict a `PartialEquiv` to a pair of corresponding sets. -/
@[simps (config := .asFn)]
def restr (h : e.IsImage s t) : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}
(h : e.IsImage s t)


@[simp]
theorem forkOfKernelFork_ι (c : KernelFork (f - g)) : (forkOfKernelFork c).ι = c.ι

(c : CategoryTheory.Limits.KernelFork (f - g))

(CategoryTheory.Preadditive.forkOfKernelFork c).ι = CategoryTheory.Limits.Fork.ι c


lemma dvd_choose_self (hp : Prime p) (hk : k ≠ 0) (hkp : k < p) : p ∣ choose p k

{p k : ℕ}
(hp : Nat.Prime p)
(hk : k ≠ 0)
(hkp : k < p)


/-- If `n ≠ -1` is an integer number, then the integral of `(z - w) ^ n` over the circle equals
zero. -/
theorem integral_sub_zpow_of_ne {n : ℤ} (hn : n ≠ -1) (c w : ℂ) (R : ℝ) :
    (∮ z in C(c, R), (z - w) ^ n) = 0


@[simp]
lemma ProdAdicCompletions.algebraMap_apply' (k : K) :
    algebraMap K (K_hat R K) k v = (k : v.adicCompletion K)

(v : IsDedekindDomain.HeightOneSpectrum R)

(algebraMap K (DedekindDomain.ProdAdicCompletions R K)) k v = ↑K k


lemma map'_zero (f : α →* β) : map' f 0 = 0

{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)


protected theorem orderOf (ζ : M) : IsPrimitiveRoot ζ (orderOf ζ)


theorem AffineMap.restrict.bijective {E : AffineSubspace k P₁} [Nonempty E] {φ : P₁ →ᵃ[k] P₂}
    (hφ : Function.Injective φ) : Function.Bijective (φ.restrict (le_refl (E.map φ)))

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[AddCommGroup V₂]
[Module k V₁]
[Module k V₂]
[AddTorsor V₁ P₁]
[AddTorsor V₂ P₂]
{E : AffineSubspace k P₁}
[Nonempty ↥E]
{φ : P₁ →ᵃ[k] P₂}
(hφ : Function.Injective ⇑φ)


/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorObj (X Y : Center C) : Center C

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


@[to_additive]
theorem mem_range_mulIndicator {r : M} {s : Set α} {f : α → M} :
    r ∈ range (mulIndicator s f) ↔ r = 1 ∧ s ≠ univ ∨ r ∈ f '' s

{α : Type u_1}
{M : Type u_4}
[Zero M]
{r : M}
{s : Set α}
{f : α → M}

r ∈ Set.range (s.indicator f) ↔ r = 0 ∧ s ≠ Set.univ ∨ r ∈ f '' s


/-- Nonzero divisors have nonzero valuation. -/
theorem intValuation_ne_zero' (x : nonZeroDivisors R) : v.intValuationDef x ≠ 0


@[to_additive]
theorem MulHom.coe_copy_eq {_ : Mul M} {_ : Mul N} (f : M →ₙ* N) (f' : M → N) (h : f' = f) :
    f.copy f' h = f

∀ {x : Add M} {x_1 : Add N} (f : AddHom M N) (f' : M → N) (h : f' = ⇑f), f.copy f' h = f


lemma overEquiv_iff {X : C} {Y : Over X} (S : Sieve Y) {Z : C} (f : Z ⟶ Y.left) :
    overEquiv Y S f ↔ S (Over.homMk f : Over.mk (f ≫ Y.hom) ⟶ Y)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : C}
{Y : CategoryTheory.Over X}
(S : CategoryTheory.Sieve Y)
{Z : C}
(f : Z ⟶ Y.left)

((CategoryTheory.Sieve.overEquiv Y) S).arrows f ↔ S.arrows (CategoryTheory.Over.homMk f ⋯)


lemma le_slope_of_hasDerivWithinAt (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivWithinAt f f' S y) :
    f' ≤ slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : ConcaveOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hf' : HasDerivWithinAt f f' S y)


theorem factors_of_le {Y Z : C} {P Q : Subobject Y} (f : Z ⟶ Y) (h : P ≤ Q) :
    P.Factors f → Q.Factors f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{Y Z : C}
{P Q : CategoryTheory.Subobject Y}
(f : Z ⟶ Y)
(h : P ≤ Q)


theorem Iic_mem_nhds (h : a < b) : Iic b ∈ 𝓝 a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b : α}
(h : a < b)


@[simp]
theorem ContinuousMultilinearMap.apply_zero_curry0 (f : G[×0]→L[𝕜] G') {x : Fin 0 → G} :
    ContinuousMultilinearMap.curry0 𝕜 G (f x) = f

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')


/-- This property implies `IsRatCondKernelCDF`. The measurability, integrability and integral
conditions are the same, but the limit properties of `IsRatCondKernelCDF` are replaced by
limits of integrals. -/
structure IsRatCondKernelCDFAux (f : α × β → ℚ → ℝ) (κ : Kernel α (β × ℝ)) (ν : Kernel α β) :
    Prop :=
  measurable : Measurable f
  mono' (a : α) {q r : ℚ} (_hqr : q ≤ r) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ f (a, c) r
  nonneg' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), 0 ≤ f (a, c) q
  le_one' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ 1
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atBot (𝓝 0)` but slightly easier
  to prove in the current applications of this definition (some integral convergence lemmas
  currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_antitone (a : α) (seq : ℕ → ℚ) (_hs : Antitone seq)
    (_hs_tendsto : Tendsto seq atTop atBot) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 0)
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atTop (𝓝 (ν a univ).toReal)` but
  slightly easier to prove in the current applications of this definition (some integral convergence
  lemmas currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_monotone (a : α) (seq : ℕ → ℚ) (_hs : Monotone seq)
    (_hs_tendsto : Tendsto seq atTop atTop) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 (ν a univ).toReal)
  integrable (a : α) (q : ℚ) : Integrable (fun c ↦ f (a, c) q) (ν a)
  setIntegral (a : α) {A : Set β} (_hA : MeasurableSet A) (q : ℚ) :
    ∫ c in A, f (a, c) q ∂(ν a) = (κ a (A ×ˢ Iic ↑q)).toReal

{f : α × β → ℚ → ℝ}

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

(self : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)


theorem biUnion_lt_succ' (u : ℕ → Set α) (n : ℕ) : ⋃ k < n + 1, u k = u 0 ∪ ⋃ k < n, u (k + 1)


@[simp] lemma cons_eta (f : ∀ j ∈ i :: l, α j) :
    cons _ _ (head f) (tail f) = f

{ι : Type u_1}
[DecidableEq ι]
{α : ι → Sort u_2}
{i : ι}
{l : List ι}
(f : (j : ι) → j ∈ i :: l → α j)

List.Pi.cons i l (List.Pi.head f) (List.Pi.tail f) = f


/-- Auxiliary lemma for the divergence theorem. -/
theorem norm_volume_sub_integral_face_upper_sub_lower_smul_le {f : (Fin (n + 1) → ℝ) → E}
    {f' : (Fin (n + 1) → ℝ) →L[ℝ] E} (hfc : ContinuousOn f (Box.Icc I)) {x : Fin (n + 1) → ℝ}
    (hxI : x ∈ (Box.Icc I)) {a : E} {ε : ℝ} (h0 : 0 < ε)
    (hε : ∀ y ∈ (Box.Icc I), ‖f y - a - f' (y - x)‖ ≤ ε * ‖y - x‖) {c : ℝ≥0}
    (hc : I.distortion ≤ c) :
    ‖(∏ j, (I.upper j - I.lower j)) • f' (Pi.single i 1) -
      (integral (I.face i) ⊥ (f ∘ i.insertNth (α := fun _ ↦ ℝ) (I.upper i)) BoxAdditiveMap.volume -
        integral (I.face i) ⊥ (f ∘ i.insertNth (α := fun _ ↦ ℝ) (I.lower i))
          BoxAdditiveMap.volume)‖ ≤
      2 * ε * c * ∏ j, (I.upper j - I.lower j)

(hfc : ContinuousOn f (BoxIntegral.Box.Icc I))

(hε : ∀ y ∈ BoxIntegral.Box.Icc I, ‖f y - a - f' (y - x)‖ ≤ ε * ‖y - x‖)

‖(∏ j : Fin (n + 1), (I.upper j - I.lower j)) • f' (Pi.single i 1) -
      (BoxIntegral.integral (I.face i) ⊥ (f ∘ i.insertNth (I.upper i)) BoxIntegral.BoxAdditiveMap.volume -
        BoxIntegral.integral (I.face i) ⊥ (f ∘ i.insertNth (I.lower i)) BoxIntegral.BoxAdditiveMap.volume)‖ ≤
  2 * ε * ↑c * ∏ j : Fin (n + 1), (I.upper j - I.lower j)


theorem disjoint_of_erase_right (ha : a ∉ s) (hst : Disjoint s (t.erase a)) : Disjoint s t

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{a : α}
(ha : a ∉ s)
(hst : Disjoint s (t.erase a))


protected theorem aestronglyMeasurable (h : IntervalIntegrable f μ a b) :
    AEStronglyMeasurable f (μ.restrict (Ioc a b))

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

MeasureTheory.AEStronglyMeasurable f (μ.restrict (Set.Ioc a b))


theorem coe_bot : ((⊥ : Subring R) : Set R) = Set.range ((↑) : ℤ → R)


/-- Data for the general version of the implicit function theorem. It holds two functions
`f : E → F` and `g : E → G` (named `leftFun` and `rightFun`) and a point `a` (named `pt`) such that

* both functions are strictly differentiable at `a`;
* the derivatives are surjective;
* the kernels of the derivatives are complementary subspaces of `E`. -/
-- Porting note(#5171): linter not yet ported @[nolint has_nonempty_instance]
structure ImplicitFunctionData (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] [CompleteSpace E] (F : Type*) [NormedAddCommGroup F]
    [NormedSpace 𝕜 F] [CompleteSpace F] (G : Type*) [NormedAddCommGroup G] [NormedSpace 𝕜 G]
    [CompleteSpace G] where
  leftFun : E → F
  leftDeriv : E →L[𝕜] F
  rightFun : E → G
  rightDeriv : E →L[𝕜] G
  pt : E
  left_has_deriv : HasStrictFDerivAt leftFun leftDeriv pt
  right_has_deriv : HasStrictFDerivAt rightFun rightDeriv pt
  left_range : range leftDeriv = ⊤
  right_range : range rightDeriv = ⊤
  isCompl_ker : IsCompl (ker leftDeriv) (ker rightDeriv)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[CompleteSpace G]
(self : ImplicitFunctionData 𝕜 E F G)

HasStrictFDerivAt self.leftFun self.leftDeriv self.pt


@[simp]
theorem expNear_zero (x r) : expNear 0 x r = r


theorem mod_nonneg : ∀ {a : Int} (b : Int), 0 ≤ a → 0 ≤ mod a b


@[to_additive]
theorem tprod_le_one (h : ∀ i, f i ≤ 1) : ∏' i, f i ≤ 1

{ι : Type u_1}
{α : Type u_3}
[OrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(h : ∀ (i : ι), f i ≤ 0)


@[simp]
lemma negOnePow_neg (n : ℤ) : (-n).negOnePow = n.negOnePow


lemma reflGen_eq_self (hr : Reflexive r) : ReflGen r = r

{α : Type u_1}
{r : α → α → Prop}
(hr : Reflexive r)


theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π)

expMapCircle x = expMapCircle y ↔ ∃ m, x = y + ↑m * (2 * π)


theorem domRestrict (H : B.IsRefl) (p : Submodule R₁ M₁) : (B.domRestrict₁₂ p p).IsRefl

{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
{I₁ I₂ : R₁ →+* R}
{B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M}
(H : B.IsRefl)
(p : Submodule R₁ M₁)


theorem map_rel_iff (f : r ≃r s) {a b} : s (f a) (f b) ↔ r a b

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


theorem transpose_injective : Function.Injective (transpose : Matrix m n α → Matrix n m α)

{m : Type u_2}
{n : Type u_3}
{α : Type v}


theorem vanishingIdeal_closure (t : Set (ProjectiveSpectrum 𝒜)) :
    vanishingIdeal (closure t) = vanishingIdeal t

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(t : Set (ProjectiveSpectrum 𝒜))

ProjectiveSpectrum.vanishingIdeal (closure t) = ProjectiveSpectrum.vanishingIdeal t


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

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


/-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y

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

(↑self.toAddMonoidHom).toFun x = (↑self.toAddMonoidHom).toFun y → ∃ c, ↑c + x = ↑c + y


@[simp]
theorem laurent_X : laurent r X = X + C r

{R : Type u}
[CommRing R]
[hdomain : IsDomain R]
(r : R)

(RatFunc.laurent r) RatFunc.X = RatFunc.X + RatFunc.C r


/-- **Fermat's Little Theorem**: for all nonzero `a : ZMod p`, we have `a ^ (p - 1) = 1`. -/
theorem pow_card_sub_one_eq_one {p : ℕ} [Fact p.Prime] {a : ZMod p} (ha : a ≠ 0) :
    a ^ (p - 1) = 1

{p : ℕ}
[Fact (Nat.Prime p)]
{a : ZMod p}
(ha : a ≠ 0)


/-- The product of two antitone functions is antitone. -/
@[to_additive add "The sum of two antitone functions is antitone."]
theorem AntitoneOn.mul' [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : AntitoneOn f s) (hg : AntitoneOn g s) :
    AntitoneOn (fun x => f x * g x) s

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

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


theorem hequiv [ContractibleSpace X] [ContractibleSpace Y] :
    Nonempty (X ≃ₕ Y)

(X : Type u_1)
(Y : Type u_2)
[TopologicalSpace X]
[TopologicalSpace Y]
[ContractibleSpace X]
[ContractibleSpace Y]


/-- On a compact uniform space, the topology determines the uniform structure, entourages are
exactly the neighborhoods of the diagonal. -/
theorem nhdsSet_diagonal_eq_uniformity [CompactSpace α] : 𝓝ˢ (diagonal α) = 𝓤 α

{α : Type u_1}
[UniformSpace α]
[CompactSpace α]


@[to_additive (attr := simp)]
theorem prod_const (b : β) : ∏ _x ∈ s, b = b ^ s.card

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[AddCommMonoid β]
(b : β)


@[simp, mfld_simps]
theorem transPartialHomeomorph_trans (e : X ≃ₜ Y) (f : PartialHomeomorph Y Z)
    (f' : PartialHomeomorph Z Z') :
    (e.transPartialHomeomorph f).trans f' = e.transPartialHomeomorph (f.trans f')

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
{Z' : Type u_6}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace Z']
(e : X ≃ₜ Y)
(f : PartialHomeomorph Y Z)
(f' : PartialHomeomorph Z Z')


@[to_additive (attr := simp)]
theorem isGLB_inv : IsGLB s⁻¹ a ↔ IsLUB s a⁻¹

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

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


theorem Basis.smul_det {G} [Group G] [DistribMulAction G M] [SMulCommClass G R M]
    (g : G) (v : ι → M) :
    (g • e).det v = e.det (g⁻¹ • v)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
(e : Basis ι R M)
{G : Type u_5}
[Group G]
[DistribMulAction G M]
[SMulCommClass G R M]
(g : G)
(v : ι → M)


/-- Transport being a right adjoint along a natural isomorphism. -/
lemma isRightAdjoint_of_iso {F G : C ⥤ D} (h : F ≅ G) [F.IsRightAdjoint] :
    IsRightAdjoint G

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


/-- Note this holds in marginally more generality than `Int.cast_mul` -/
lemma cast_mul_eq_zsmul_cast {α : Type*} [AddCommGroupWithOne α] :
    ∀ m n : ℤ, ↑(m * n) = m • (n : α)

{α : Type u_1}
[AddCommGroupWithOne α]
(m n : ℤ)


@[to_additive]
theorem mem_norm_comm_iff {s : Set G} (hs : IsNormalSubgroup s) {a b : G} : a * b ∈ s ↔ b * a ∈ s

{G : Type u_1}
[AddGroup G]
{s : Set G}
(hs : IsNormalAddSubgroup s)
{a b : G}


theorem StrictAnti.isMin_of_apply (hf : StrictAnti f) (ha : IsMax (f a)) : IsMin a

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{a : α}
(hf : StrictAnti f)
(ha : IsMax (f a))


/-- Algebra isomorphism between `R[X]` and `R[ℕ]`. This is just an
implementation detail, but it can be useful to transfer results from `Finsupp` to polynomials. -/
@[simps!]
def toFinsuppIsoAlg : R[X] ≃ₐ[R] R[ℕ]

(R : Type u)
[CommSemiring R]
(self : R[X])

(Polynomial.toFinsuppIsoAlg R) self = self.toFinsupp


theorem fromCoset_eq_of_mem_range {b : B} (hb : b ∈ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ = fromCoset ⟨f.range, 1, one_leftCoset _⟩

{A B : Grp}
(f : A ⟶ B)
{b : ↑B}
(hb : b ∈ MonoidHom.range f)

Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨b • ↑(MonoidHom.range f), ⋯⟩ =
  Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨↑(MonoidHom.range f), ⋯⟩


lemma sSup_mem_of_not_isSuccLimit (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s

{α : Type u_2}
[CompleteLinearOrder α]
{s : Set α}
(hlim : ¬Order.IsSuccLimit (sSup s))


@[simp]
nonrec theorem Iio_bot [OrderBot α] : Iio (⊥ : α) = ⊥

{α : Type u_1}
[Preorder α]
[OrderBot α]


@[to_additive]
lemma zpow_le_zpow_iff (ha : 1 < a) : a ^ m ≤ a ^ n ↔ m ≤ n

{α : Type u_1}
[OrderedAddCommGroup α]
{m n : ℤ}
{a : α}
(ha : 0 < a)


@[simp]
lemma rightShift_zero (a n' : ℤ) (hn' : n' + a = n) :
    (0 : Cochain K L n).rightShift a n' hn' = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K L : CochainComplex C ℤ)
(n a n' : ℤ)
(hn' : n' + a = n)

CochainComplex.HomComplex.Cochain.rightShift 0 a n' hn' = 0


@[simp]
theorem ofDual_apply_coe (a : αᵒᵈ) : WithTop.ofDual (a : WithTop αᵒᵈ) = ofDual a

WithTop.ofDual ↑a = ↑(OrderDual.ofDual a)


theorem extract_gcd' (f g : β → α) (hs : ∃ x, x ∈ s ∧ f x ≠ 0)
    (hg : ∀ b ∈ s, f b = s.gcd f * g b) : s.gcd g = 1

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
(f g : β → α)
(hs : ∃ x ∈ s, f x ≠ 0)
(hg : ∀ b ∈ s, f b = s.gcd f * g b)


lemma le_div_iff_mul_le {a b c : EReal} (h : b > 0) (h' : b ≠ ⊤) :
    a ≤ c / b ↔ a * b ≤ c


@[to_additive]
theorem finprod_cond_ne (f : α → M) (a : α) [DecidableEq α] (hf : (mulSupport f).Finite) :
    (∏ᶠ (i) (_ : i ≠ a), f i) = ∏ i ∈ hf.toFinset.erase a, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
(a : α)
[DecidableEq α]
(hf : (Function.support f).Finite)

∑ᶠ (i : α) (_ : i ≠ a), f i = ∑ i ∈ hf.toFinset.erase a, f i


theorem cycleType_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : cycleType (finRotate n) = {n}


lemma condexpKernel_ae_eq_condexp' [IsFiniteMeasure μ] {s : Set Ω} (hs : MeasurableSet s) :
    (fun ω ↦ (condexpKernel μ m ω s).toReal) =ᵐ[μ] μ⟦s | m ⊓ mΩ⟧

{Ω : Type u_1}
{m : MeasurableSpace Ω}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
{s : Set Ω}
(hs : MeasurableSet s)

(fun ω => (((ProbabilityTheory.condexpKernel μ m) ω) s).toReal) =ᵐ[μ] μ[s.indicator fun ω => 1|m ⊓ mΩ]


theorem getI_zero_eq_headI : l.getI 0 = l.headI


@[simp]
theorem neg_fst (x : X q) : (-x).1 = -x.1


@[simp, nolint simpNF]
theorem _root_.exists_subtype_mk_eq_iff {a : Subtype p} {b : α} :
    (∃ h : p b, Subtype.mk b h = a) ↔ b = a

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


theorem eq_symm_comp {α : Type*} (f : α → M₁) (g : α → M₂) : f = e₁₂.symm ∘ g ↔ e₁₂ ∘ f = g

{R₁ : Type u_2}
{R₂ : Type u_3}
{M₁ : Type u_9}
{M₂ : Type u_10}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
{e₁₂ : M₁ ≃ₛₗ[σ₁₂] M₂}
{α : Type u_18}
(f : α → M₁)
(g : α → M₂)


@[to_additive]
theorem _root_.List.periodic_prod [Add α] [Monoid β] (l : List (α → β))
    (hl : ∀ f ∈ l, Periodic f c) : Periodic l.prod c

{α : Type u_1}
{β : Type u_2}
{c : α}
[Add α]
[Monoid β]
(l : List (α → β))
(hl : ∀ f ∈ l, Function.Periodic f c)


@[to_additive]
lemma units_iInf₂ {ι : Sort*} {κ : ι → Sort*} (f : (i : ι) → κ i → Submonoid M) :
    (⨅ (i : ι), ⨅ (j : κ i), f i j).units = ⨅ (i : ι), ⨅ (j : κ i), (f i j).units

{M : Type u_1}
[AddMonoid M]
{ι : Sort u_2}
{κ : ι → Sort u_3}
(f : (i : ι) → κ i → AddSubmonoid M)

(⨅ i, ⨅ j, f i j).addUnits = ⨅ i, ⨅ j, (f i j).addUnits


/-- An `n`-dimensional `InnerProductSpace` equipped with a decomposition as an internal direct
sum has an orthonormal basis indexed by `Fin n` and subordinate to that direct sum. -/
irreducible_def DirectSum.IsInternal.subordinateOrthonormalBasis
    (hV' : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
    OrthonormalBasis (Fin n) 𝕜 E

(hn : FiniteDimensional.finrank 𝕜 E = n)

(hV' : OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ)

DirectSum.IsInternal.subordinateOrthonormalBasis hn hV hV' =
  (DirectSum.IsInternal.collectedOrthonormalBasis hV' hV fun i => stdOrthonormalBasis 𝕜 ↥(V i)).reindex
    (DirectSum.IsInternal.sigmaOrthonormalBasisIndexEquiv hn hV hV')


theorem smul_eq_C_mul (p : MvPolynomial σ R) (a : R) : a • p = C a * p

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


@[simp]
theorem comp_apply (f : B →⋆ₐ[R] C) (g : A →⋆ₐ[R] B) (a : A) : comp f g a = f (g a)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
[Semiring C]
[Algebra R C]
[Star C]
(f : B →⋆ₐ[R] C)
(g : A →⋆ₐ[R] B)
(a : A)


/-- `ιInvApp` is the right inverse of `D.ι i` on `U`. -/
theorem π_ιInvApp_π (i j : D.J) (U : Opens (D.U i).carrier) :
    D.diagramOverOpenπ U i ≫ D.ιInvAppπEqMap U ≫ D.ιInvApp U ≫ D.diagramOverOpenπ U j =
      D.diagramOverOpenπ U j

(D : AlgebraicGeometry.PresheafedSpace.GlueData C)


theorem to_reflTransGen {a b} (h : TransGen r a b) : ReflTransGen r a b

{α : Type u_1}
{r : α → α → Prop}
{a b : α}
(h : Relation.TransGen r a b)


lemma HomologyData.map_homologyMap'
    [h₁.left.IsPreservedBy F] [h₁.right.IsPreservedBy F]
    [h₂.left.IsPreservedBy F] [h₂.right.IsPreservedBy F] :
    F.map (ShortComplex.homologyMap' φ h₁ h₂) =
      ShortComplex.homologyMap' (F.mapShortComplex.map φ) (h₁.map F) (h₂.map F)

F.map (CategoryTheory.ShortComplex.homologyMap' φ h₁ h₂) =
  CategoryTheory.ShortComplex.homologyMap' (F.mapShortComplex.map φ) (h₁.map F) (h₂.map F)


@[deprecated (since := "2024-05-30")]
lemma succAbove_lt_ge (p : Fin (n + 1)) (i : Fin n) :
    castSucc i < p ∨ p ≤ castSucc i


@[simp]
theorem iUnion_biUnion (πi : ∀ J : Box ι, Prepartition J) :
    (π.biUnion πi).iUnion = ⋃ J ∈ π, (πi J).iUnion

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)


theorem forall_isBounded_image_eval_iff {s : Set (∀ i, π i)} :
    (∀ i, IsBounded (eval i '' s)) ↔ IsBounded s

{ι : Type u_3}
{π : ι → Type u_4}
[(i : ι) → Bornology (π i)]
{s : Set ((i : ι) → π i)}

(∀ (i : ι), Bornology.IsBounded (Function.eval i '' s)) ↔ Bornology.IsBounded s


@[simp]
theorem step_one (s a) : (1 : εNFA α σ).step s a = ∅

{α : Type u}
{σ : Type v}
(s : σ)
(a : Option α)


@[simp]
theorem _root_.MeasurableSet.nullMeasurableSet (h : MeasurableSet s) : NullMeasurableSet s μ

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(h : MeasurableSet s)


@[simp]
theorem dist_vsub_cancel_right (x y z : P) : dist (x -ᵥ z) (y -ᵥ z) = dist x y

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


@[simp]
theorem sup_typein_succ {o : Ordinal} :
    sup.{u, u} (typein ((· < ·) : (succ o).out.α → (succ o).out.α → Prop)) = o

Ordinal.sup (Ordinal.typein fun x x_1 => x < x_1) = o


@[simp, norm_cast] lemma coe_sup (s t : Clopens α) : ↑(s ⊔ t) = (s ∪ t : Set α)

{α : Type u_2}
[TopologicalSpace α]
(s t : TopologicalSpace.Clopens α)


theorem div_int_inj {a b c d : ℤ} (hb0 : 0 < b) (hd0 : 0 < d) (h1 : Nat.Coprime a.natAbs b.natAbs)
    (h2 : Nat.Coprime c.natAbs d.natAbs) (h : (a : ℚ) / b = (c : ℚ) / d) : a = c ∧ b = d

{a b c d : ℤ}
(hb0 : 0 < b)
(hd0 : 0 < d)
(h1 : a.natAbs.Coprime b.natAbs)
(h2 : c.natAbs.Coprime d.natAbs)
(h : ↑a / ↑b = ↑c / ↑d)


theorem toAffineEquiv_injective : Injective (toAffineEquiv : (P₁ ≃ᵃL[k] P₂) → P₁ ≃ᵃ[k] P₂)

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]


theorem mem_insertNth {a b : α} :
    ∀ {n : ℕ} {l : List α} (_ : n ≤ l.length), a ∈ l.insertNth n b ↔ a = b ∨ a ∈ l

{α : Type u}
{a b : α}
{n : ℕ}
{l : List α}

n ≤ l.length → (a ∈ List.insertNth n b l ↔ a = b ∨ a ∈ l)


theorem mul_def (a b : Rat) :
    a * b = normalize (a.num * b.num) (a.den * b.den) (Nat.mul_ne_zero a.den_nz b.den_nz)

a * b = Rat.normalize (a.num * b.num) (a.den * b.den) ⋯


theorem Int.Prime.dvd_pow' {n : ℤ} {k p : ℕ} (hp : Nat.Prime p) (h : (p : ℤ) ∣ n ^ k) :
    (p : ℤ) ∣ n

{n : ℤ}
{k p : ℕ}
(hp : Nat.Prime p)
(h : ↑p ∣ n ^ k)


theorem image_upperBounds_subset_lowerBounds_image : f '' upperBounds s ⊆ lowerBounds (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)
{s : Set α}


theorem HasIntegral.sub (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
    HasIntegral I l (f - g) vol (y - y')

(h : BoxIntegral.HasIntegral I l f vol y)

(h' : BoxIntegral.HasIntegral I l g vol y')

BoxIntegral.HasIntegral I l (f - g) vol (y - y')


theorem commonNeighbors_subset_neighborSet_right (v w : V) :
    G.commonNeighbors v w ⊆ G.neighborSet w

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


/-- If a monotone function `u : ι → α` tends to `atBot` along *some* non-trivial filter `l`, then
it tends to `atBot` along `atBot`. -/
theorem tendsto_atBot_of_monotone_of_filter [Preorder ι] [Preorder α] {l : Filter ι} {u : ι → α}
    (h : Monotone u) [NeBot l] (hu : Tendsto u l atBot) : Tendsto u atBot atBot

{ι : Type u_1}
{α : Type u_3}
[Preorder ι]
[Preorder α]
{l : Filter ι}
{u : ι → α}
(h : Monotone u)
[l.NeBot]
(hu : Filter.Tendsto u l Filter.atBot)

Filter.Tendsto u Filter.atBot Filter.atBot


theorem mapsTo_emetric_closedBall (hf : Isometry f) (x : α) (r : ℝ≥0∞) :
    MapsTo f (EMetric.closedBall x r) (EMetric.closedBall (f x) r)

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(hf : Isometry f)
(x : α)
(r : ℝ≥0∞)

Set.MapsTo f (EMetric.closedBall x r) (EMetric.closedBall (f x) r)


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

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


theorem ContMDiffWithinAt.clm_prodMap {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₄} {s : Set M}
    {x : M} (hg : ContMDiffWithinAt I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s x)
    (hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₄) n f s x) :
    ContMDiffWithinAt I 𝓘(𝕜, F₁ × F₂ →L[𝕜] F₃ × F₄) n (fun x => (g x).prodMap (f x)) s x


lemma involutive_reflection (h : f x = 2) :
    Involutive (reflection h)

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


/-- A monoid homomorphism `M →* N` can equivalently be viewed as a monoid homomorphism
`Mᵐᵒᵖ →* Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[to_additive (attr := simps)
      "An additive monoid homomorphism `M →+ N` can equivalently be viewed as an
      additive monoid homomorphism `Mᵃᵒᵖ →+ Nᵃᵒᵖ`. This is the action of the (fully faithful)
      `ᵃᵒᵖ`-functor on morphisms."]
def MonoidHom.op {M N} [MulOneClass M] [MulOneClass N] : (M →* N) ≃ (Mᵐᵒᵖ →* Nᵐᵒᵖ)

{M : Type u_2}
{N : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
(f : Mᵃᵒᵖ →+ Nᵃᵒᵖ)

∀ (a : M), (AddMonoidHom.op.symm f) a = (AddOpposite.unop ∘ ⇑f ∘ AddOpposite.op) a


@[to_additive (attr := simp)]
theorem map_id : K.map (MonoidHom.id G) = K

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)

AddSubgroup.map (AddMonoidHom.id G) K = K


@[simp] theorem mkInductiveAux₂_add_one (n) :
    mkInductiveAux₂ e zero comm_zero one comm_one succ (n + 1) =
      let I := mkInductiveAux₁ e zero one comm_one succ n
      ⟨(P.xNextIso rfl).hom ≫ I.1, I.2.1 ≫ (Q.xPrevIso rfl).inv,
        mkInductiveAux₂.proof_5 e zero one comm_one succ n⟩

(comm_one : e.f 1 = P.d 1 0 ≫ zero + one ≫ Q.d 2 1)

Homotopy.mkInductiveAux₂ e zero comm_zero one comm_one succ (n + 1) =
  let I := Homotopy.mkInductiveAux₁ e zero one comm_one succ n;
  ⟨(HomologicalComplex.xNextIso P ⋯).hom ≫ I.fst, ⟨I.snd.fst ≫ (HomologicalComplex.xPrevIso Q ⋯).inv, ⋯⟩⟩


@[simp]
theorem mul_eq_mul_right_iff : a * c = b * c ↔ a = b ∨ c = 0

{M₀ : Type u_2}
[CancelMonoidWithZero M₀]
{a b c : M₀}


theorem ker_aeval_ring_hom'_unit_polynomial (f : End K V) (c : K[X]ˣ) :
    LinearMap.ker (aeval f (c : K[X])) = ⊥

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

LinearMap.ker ((Polynomial.aeval f) ↑c) = ⊥


theorem ContinuousOn.if {α β : Type*} [TopologicalSpace α] [TopologicalSpace β] {p : α → Prop}
    [∀ a, Decidable (p a)] {s : Set α} {f g : α → β}
    (hp : ∀ a ∈ s ∩ frontier { a | p a }, f a = g a)
    (hf : ContinuousOn f <| s ∩ closure { a | p a })
    (hg : ContinuousOn g <| s ∩ closure { a | ¬p a }) :
    ContinuousOn (fun a => if p a then f a else g a) s

(hp : ∀ a ∈ s ∩ frontier {a | p a}, f a = g a)

(hf : ContinuousOn f (s ∩ closure {a | p a}))

(hg : ContinuousOn g (s ∩ closure {a | ¬p a}))


@[simp]
theorem toNFA_correct (M : DFA α σ) : M.toNFA.accepts = M.accepts


theorem le_rank_iff_exists_linearIndependent {c : Cardinal} {f : V →ₗ[K] V'} :
    c ≤ rank f ↔ ∃ s : Set V,
    Cardinal.lift.{v'} #s = Cardinal.lift.{v} c ∧ LinearIndependent K (fun x : s => f x)

{K : Type u}
{V : Type v}
{V' : Type v'}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[AddCommGroup V']
[Module K V']
{c : Cardinal.{v'}}
{f : V →ₗ[K] V'}

c ≤ f.rank ↔ ∃ s, Cardinal.lift.{v', v} #↑s = Cardinal.lift.{v, v'} c ∧ LinearIndependent K fun (x : ↑s) => f ↑x


lemma commute_toEnd_of_mem_center_left :
    Commute (toEnd R L M x) (toEnd R L M y)

{R : Type u}
{L : Type v}
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{x : L}
(hx : x ∈ LieAlgebra.center R L)
(y : L)

Commute ((LieModule.toEnd R L M) x) ((LieModule.toEnd R L M) y)


@[to_additive]
theorem closure_preimage_le (f : G →* N) (s : Set N) : closure (f ⁻¹' s) ≤ (closure s).comap f

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)
(s : Set N)

AddSubgroup.closure (⇑f ⁻¹' s) ≤ AddSubgroup.comap f (AddSubgroup.closure s)


theorem cos_sub_sin_I : cos x - sin x * I = exp (-x * I)

Complex.cos x - Complex.sin x * Complex.I = Complex.exp (-x * Complex.I)


protected theorem congr (h : AEDisjoint μ s t) (hu : u =ᵐ[μ] s) (hv : v =ᵐ[μ] t) :
    AEDisjoint μ u v

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t u v : Set α}
(h : MeasureTheory.AEDisjoint μ s t)
(hu : u =ᵐ[μ] s)
(hv : v =ᵐ[μ] t)


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

{F G H : CategoryTheory.OplaxFunctor B C}

∀ (x x_1 : G ⟶ H) (Γ : x ⟶ x_1) (a : B),
  (CategoryTheory.Bicategory.whiskerLeft η Γ).app a = CategoryTheory.Bicategory.whiskerLeft (η.app a) (Γ.app a)


theorem HasSum.matrix_conjTranspose [StarAddMonoid R] [ContinuousStar R] {f : X → Matrix m n R}
    {a : Matrix m n R} (hf : HasSum f a) : HasSum (fun x => (f x)ᴴ) aᴴ

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[StarAddMonoid R]
[ContinuousStar R]
{f : X → Matrix m n R}
{a : Matrix m n R}
(hf : HasSum f a)


theorem rat_add_continuous_lemma {ε : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ →
      abv (a₁ + a₂ - (b₁ + b₂)) < ε

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
(abv : β → α)
[IsAbsoluteValue abv]
{ε : α}
(ε0 : 0 < ε)


@[to_additive]
theorem isClosed_setOf_map_inv [Inv G₁] [Inv G₂] [ContinuousInv G₂] :
    IsClosed { f : G₁ → G₂ | ∀ x, f x⁻¹ = (f x)⁻¹ }

(G₁ : Type u_2)
(G₂ : Type u_3)
[TopologicalSpace G₂]
[T2Space G₂]
[Neg G₁]
[Neg G₂]
[ContinuousNeg G₂]

IsClosed {f | ∀ (x : G₁), f (-x) = -f x}


@[simp]
theorem right_vsub_pointReflection (x y : P) : y -ᵥ pointReflection x y = 2 • (y -ᵥ x)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[AddTorsor G P]
(x y : P)

y -ᵥ (Equiv.pointReflection x) y = 2 • (y -ᵥ x)


theorem map₂_eq_range_lift_comp_mapIncl (f : P →ₗ[R] Q →ₗ[R] M)
    (p : Submodule R P) (q : Submodule R Q) :
    Submodule.map₂ f p q = LinearMap.range (lift f ∘ₗ mapIncl p q)

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R P]
[Module R Q]
(f : P →ₗ[R] Q →ₗ[R] M)
(p : Submodule R P)
(q : Submodule R Q)

Submodule.map₂ f p q = LinearMap.range (TensorProduct.lift f ∘ₗ TensorProduct.mapIncl p q)


theorem finite_iUnion_left_iff {ι : Type*} {I : Set ι} (hI : I.Finite) {s : ι → Set X}
    {t : Set X} : IsMetricSeparated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, IsMetricSeparated (s i) t

{X : Type u_1}
[EMetricSpace X]
{ι : Type u_2}
{I : Set ι}
(hI : I.Finite)
{s : ι → Set X}
{t : Set X}


@[simp]
theorem mapRange_apply (f : ∀ i, β₁ i → β₂ i) (hf : ∀ i, f i 0 = 0) (g : Π₀ i, β₁ i) (i : ι) :
    mapRange f hf g i = f i (g i)

{ι : Type u}
{β₁ : ι → Type v₁}
{β₂ : ι → Type v₂}
[(i : ι) → Zero (β₁ i)]
[(i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i)
(hf : ∀ (i : ι), f i 0 = 0)
(g : Π₀ (i : ι), β₁ i)
(i : ι)

(DFinsupp.mapRange f hf g) i = f i (g i)


lemma fromAffine_ne_zero [Nontrivial R] {X Y : R} (h : W'.toAffine.Nonsingular X Y) :
    fromAffine (.some h) ≠ 0

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
[Nontrivial R]
{X Y : R}
(h : W'.toAffine.Nonsingular X Y)

WeierstrassCurve.Jacobian.Point.fromAffine (WeierstrassCurve.Affine.Point.some h) ≠ 0


theorem Matrix.toBilin'_apply' (M : Matrix n n R₂) (v w : n → R₂) :
    Matrix.toBilin' M v w = Matrix.dotProduct v (M *ᵥ w)

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(M : Matrix n n R₂)
(v w : n → R₂)

((Matrix.toBilin' M) v) w = Matrix.dotProduct v (M.mulVec w)


/-- In a topological vector space, the addition of a simple function and a measurable function is
measurable. -/
theorem _root_.Measurable.simpleFunc_add
    {E : Type*} {_ : MeasurableSpace α} [MeasurableSpace E] [AddGroup E] [MeasurableAdd E]
    {g : α → E} (hg : Measurable g) (f : SimpleFunc α E) :
    Measurable ((f : α → E) + g)

∀ {x : MeasurableSpace α} [inst : MeasurableSpace E] [inst_1 : AddGroup E] [inst_2 : MeasurableAdd E] {g : α → E},
  Measurable g → ∀ (f : MeasureTheory.SimpleFunc α E), Measurable (↑f + g)


/-- Any mono factorisation of `f` gives a mono factorisation of `g ≫ f`. -/
@[simps]
def isoComp (F : MonoFactorisation f) {X' : C} (g : X' ⟶ X) : MonoFactorisation (g ≫ f)

(F : CategoryTheory.Limits.MonoFactorisation f)


@[simp]
theorem one_rightMoves : RightMoves 1 = PEmpty

SetTheory.PGame.RightMoves 1 = PEmpty.{u_1 + 1}


lemma cast_le_neg_one_or_one_le_cast_of_ne_zero (hn : n ≠ 0) : (n : R) ≤ -1 ∨ 1 ≤ (n : R)

(R : Type u_1)
[LinearOrderedRing R]
{n : ℤ}
(hn : n ≠ 0)

↑n ≤ -1 ∨ 1 ≤ ↑n


/-- Variant of `toNat_cons` using `+` instead of `|||`. -/
theorem toNat_cons' {x : BitVec w} :
    (cons a x).toNat = (a.toNat <<< w) + x.toNat

(BitVec.cons a x).toNat = a.toNat <<< w + x.toNat


@[to_additive]
lemma Prod.orderOf_mk : orderOf (a, b) = Nat.lcm (orderOf a) (orderOf b)

{α : Type u_4}
{β : Type u_5}
[Monoid α]
[Monoid β]
{a : α}
{b : β}

orderOf (a, b) = (orderOf a).lcm (orderOf b)


/-- **Phragmen-Lindelöf principle** in the right half-plane. Let `f : ℂ → E` be a function such that

* `f` is differentiable in the open right half-plane and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * (abs z) ^ c)` on the open right half-plane
  for some `c < 2`;
* `‖f z‖` is bounded from above by a constant `C` on the imaginary axis;
* `f x → 0` as `x : ℝ` tends to infinity.

Then `‖f z‖` is bounded from above by the same constant on the closed right half-plane.
See also `PhragmenLindelof.right_half_plane_of_bounded_on_real` for a stronger version. -/
theorem right_half_plane_of_tendsto_zero_on_real (hd : DiffContOnCl ℂ f {z | 0 < z.re})
    (hexp : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * abs z ^ c))
    (hre : Tendsto (fun x : ℝ => f x) atTop (𝓝 0)) (him : ∀ x : ℝ, ‖f (x * I)‖ ≤ C)
    (hz : 0 ≤ z.re) : ‖f z‖ ≤ C

(hexp : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * Complex.abs z ^ c))

(hre : Filter.Tendsto (fun x => f ↑x) Filter.atTop (𝓝 0))

(him : ∀ (x : ℝ), ‖f (↑x * Complex.I)‖ ≤ C)


/-- Expansion is injective. -/
theorem expand_injective {n : ℕ} (hn : 0 < n) : Function.Injective (expand R n)

{R : Type u}
[CommSemiring R]
{n : ℕ}
(hn : 0 < n)

Function.Injective ⇑(Polynomial.expand R n)


theorem Ico_inl_inl : Ico (inl a₁ : α ⊕ β) (inl a₂) = (Ico a₁ a₂).map Embedding.inl

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a₁ a₂ : α)

Finset.Ico (Sum.inl a₁) (Sum.inl a₂) = Finset.map Function.Embedding.inl (Finset.Ico a₁ a₂)


lemma SurjOn.comp_right {s : Set β} {t : Set γ} (hf : Surjective f) (hg : SurjOn g s t) :
    SurjOn (g ∘ f) (f ⁻¹' s) t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β}
{g : β → γ}
{s : Set β}
{t : Set γ}
(hf : Function.Surjective f)
(hg : Set.SurjOn g s t)


theorem summable_of_sum_range_le {f : ℕ → ℝ≥0} {c : ℝ≥0}
    (h : ∀ n, ∑ i ∈ Finset.range n, f i ≤ c) : Summable f

(h : ∀ (n : ℕ), ∑ i ∈ Finset.range n, f i ≤ c)


@[to_additive]
theorem mulSupport_eq_preimage (f : α → M) : mulSupport f = f ⁻¹' {1}ᶜ

{α : Type u_1}
{M : Type u_5}
[One M]
(f : α → M)


theorem birthday_moveLeft_lt {x : PGame} (i : x.LeftMoves) :
    (x.moveLeft i).birthday < x.birthday


@[simp] lemma down_comp {X Y Z : C} (f : of X ⟶ of Y) (g : of Y ⟶ of Z) :
    down (f ≫ g) = down f ≫ down g

(f : CategoryTheory.WithInitial.of X ⟶ CategoryTheory.WithInitial.of Y)

(g : CategoryTheory.WithInitial.of Y ⟶ CategoryTheory.WithInitial.of Z)

CategoryTheory.WithInitial.down (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.down f) (CategoryTheory.WithInitial.down g)


@[simp]
theorem coe_id : ⇑(InfHom.id α) = id


theorem closure_eq_of_le {s : Set R} {t : Subring R} (h₁ : s ⊆ t) (h₂ : t ≤ closure s) :
    closure s = t

{R : Type u}
[Ring R]
{s : Set R}
{t : Subring R}
(h₁ : s ⊆ ↑t)
(h₂ : t ≤ Subring.closure s)


@[to_additive zsmul_mono_left]
lemma zpow_mono_right (ha : 1 ≤ a) : Monotone fun n : ℤ ↦ a ^ n

{α : Type u_1}
[OrderedCommGroup α]
{a : α}
(ha : 1 ≤ a)


theorem setIntegral_nonpos_of_ae_restrict (hf : f ≤ᵐ[μ.restrict s] 0) : ∫ x in s, f x ∂μ ≤ 0

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


@[simp] theorem perm_middle {a : α} : ∀ {l₁ l₂ : List α}, l₁ ++ a :: l₂ ~ a :: (l₁ ++ l₂)


theorem cons_eq_append :
    x :: c = a ++ b ↔ (a = [] ∧ b = x :: c) ∨ (∃ a', a = x :: a' ∧ c = a' ++ b)

∀ {α : Type u_1} {x : α} {c a b : List α}, x :: c = a ++ b ↔ a = [] ∧ b = x :: c ∨ ∃ a', a = x :: a' ∧ c = a' ++ b


/-- If `f` is a smooth partition of unity on a set `s : Set M` and `g : ι → M → F` is a family of
functions such that `g i` is $C^n$ smooth at every point of the topological support of `f i`, then
the sum `fun x ↦ ∑ᶠ i, f i x • g i x` is smooth on the whole manifold. -/
theorem contMDiff_finsum_smul {g : ι → M → F}
    (hg : ∀ (i), ∀ x ∈ tsupport (f i), ContMDiffAt I 𝓘(ℝ, F) n (g i) x) :
    ContMDiff I 𝓘(ℝ, F) n fun x => ∑ᶠ i, f i x • g i x

(hg : ∀ (i : ι), ∀ x ∈ tsupport ⇑(f i), ContMDiffAt I 𝓘(ℝ, F) n (g i) x)

ContMDiff I 𝓘(ℝ, F) n fun x => ∑ᶠ (i : ι), (f i) x • g i x


@[simp]
theorem _root_.Polynomial.toLaurent_C_mul_T (n : ℕ) (r : R) :
    (toLaurent (Polynomial.monomial n r) : R[T;T⁻¹]) = C r * T n

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

Polynomial.toLaurent ((Polynomial.monomial n) r) = LaurentPolynomial.C r * LaurentPolynomial.T ↑n


@[to_additive]
lemma Function.Surjective.smulCommClass [SMul M α] [SMul N α] [SMul M β] [SMul N β]
    [SMulCommClass M N α] {f : α → β} (hf : Surjective f) (h₁ : ∀ (c : M) x, f (c • x) = c • f x)
    (h₂ : ∀ (c : N) x, f (c • x) = c • f x) : SMulCommClass M N β

(h₁ : ∀ (c : M) (x : α), f (c +ᵥ x) = c +ᵥ f x)

(h₂ : ∀ (c : N) (x : α), f (c +ᵥ x) = c +ᵥ f x)


@[deprecated (since := "2024-04-14")]
theorem coe_neg : ⇑(-B₁) = -B₁

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


@[to_additive] lemma self_zpow : Commute a (a ^ n)

{G : Type u_1}
[Group G]
(a : G)
(n : ℤ)


theorem hom.faithful : ∀ c d, Function.Injective fun f : c ⟶ d => (hom S).map f

{C : Type u}
[CategoryTheory.Groupoid C]
(S : CategoryTheory.Subgroupoid C)
(c d : ↑S.objs)


private theorem haveLebesgueDecomposition_mk' (μ : Measure α) {f : α → ℝ} (hf : Measurable f)
    (hfi : Integrable f μ) (htμ : t ⟂ᵥ μ.toENNRealVectorMeasure) (hadd : s = t + μ.withDensityᵥ f) :
    s.HaveLebesgueDecomposition μ

{α : Type u_1}
{m : MeasurableSpace α}
{s t : MeasureTheory.SignedMeasure α}
(μ : MeasureTheory.Measure α)
{f : α → ℝ}
(hf : Measurable f)
(hfi : MeasureTheory.Integrable f μ)
(htμ : t ⟂ᵥ μ.toENNRealVectorMeasure)
(hadd : s = t + μ.withDensityᵥ f)


@[simp]
lemma rightHomologyMap'_op
    (φ : S₁ ⟶ S₂) (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) :
    (rightHomologyMap' φ h₁ h₂).op = leftHomologyMap' (opMap φ) h₂.op h₁.op

(CategoryTheory.ShortComplex.rightHomologyMap' φ h₁ h₂).op =
  CategoryTheory.ShortComplex.leftHomologyMap' (CategoryTheory.ShortComplex.opMap φ) h₂.op h₁.op


theorem quotientToQuotientRangePowQuotSuccAux_mk {i : ℕ} {a : S} (a_mem : a ∈ P ^ i) (x : S) :
    quotientToQuotientRangePowQuotSuccAux f p P a_mem (Submodule.Quotient.mk x) =
      Submodule.Quotient.mk ⟨_, Ideal.mem_map_of_mem _ (Ideal.mul_mem_right x _ a_mem)⟩

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
(f : R →+* S)
(p : Ideal R)
(P : Ideal S)
{i : ℕ}
{a : S}
(a_mem : a ∈ P ^ i)
(x : S)

Ideal.quotientToQuotientRangePowQuotSuccAux f p P a_mem (Submodule.Quotient.mk x) =
  Submodule.Quotient.mk ⟨(Ideal.Quotient.mk (P ^ Ideal.ramificationIdx f p P)) (a * x), ⋯⟩


/-- A module has dimension 1 iff there is some `v : V` so `{v}` is a basis.
-/
theorem finrank_eq_one_iff [Module.Free K V] (ι : Type*) [Unique ι] :
    finrank K V = 1 ↔ Nonempty (Basis ι K V)

{K : Type u}
{V : Type v}
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
(ι : Type u_1)
[Unique ι]

FiniteDimensional.finrank K V = 1 ↔ Nonempty (Basis ι K V)


private theorem pullback_fst_of_right (hP' : Q.StableUnderBaseChange)
    {X Y S : Scheme} (f : X ⟶ S) (g : Y ⟶ S) [IsAffine S] (H : Q g) :
    P (pullback.fst f g)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

P (CategoryTheory.Limits.pullback.fst f g)


@[simp]
theorem iSup_mrange_of : ⨆ i, MonoidHom.mrange (of : M i →* CoprodI M) = ⊤

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]

⨆ i, MonoidHom.mrange Monoid.CoprodI.of = ⊤


theorem ofDual_lt_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    WithTop.ofDual a < b ↔ WithBot.toDual b < a

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


@[to_additive]
protected theorem _root_.IsUnit.filter : IsUnit a → IsUnit (pure a : Filter α)


lemma set_smul_eq_of_le (p : Submodule R M)
    (closed_under_smul : ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p)
    (le : p ≤ s • N) :
    s • N = p


@[to_additive]
theorem mul_eq_one_iff_eq_inv {a : α} : a * u = 1 ↔ a = ↑u⁻¹

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


theorem _root_.Associated.separable_iff {f g : R[X]}
    (ha : Associated f g) : f.Separable ↔ g.Separable

{R : Type u}
[CommSemiring R]
{f g : R[X]}
(ha : Associated f g)


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

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


@[simp]
theorem congr_mk (e : G ≃* H) (he : G'.map ↑e = H') (x) : congr G' H' e he (mk x) = e x

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(G' : Subgroup G)
(H' : Subgroup H)
[G'.Normal]
[H'.Normal]
(e : G ≃* H)
(he : Subgroup.map (↑e) G' = H')
(x : G)

(QuotientGroup.congr G' H' e he) ↑x = ↑(e x)


@[simp]
theorem range_id : range (LinearMap.id : M →ₗ[R] M) = ⊤

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem quotKerEquivRange_apply_mk (x : M) :
    (f.quotKerEquivRange (Submodule.Quotient.mk x) : M₂) = f x

{R : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R M₂]
(f : M →ₗ[R] M₂)
(x : M)

↑(f.quotKerEquivRange (Submodule.Quotient.mk x)) = f x


/-- Any `1`-separated set in the ball of radius `2` has cardinality at most `5 ^ dim`. This is
useful to show that the supremum in the definition of `Besicovitch.multiplicity E` is
well behaved. -/
theorem card_le_of_separated (s : Finset E) (hs : ∀ c ∈ s, ‖c‖ ≤ 2)
    (h : ∀ c ∈ s, ∀ d ∈ s, c ≠ d → 1 ≤ ‖c - d‖) : s.card ≤ 5 ^ finrank ℝ E

s.card ≤ 5 ^ FiniteDimensional.finrank ℝ E


/-- Negation turns OR into AND, so `¬⟦l ∨ c⟧_v ≡ ¬⟦l⟧_v ∧ ¬⟦c⟧_v`. -/
theorem Clause.reify_and {l : Literal} {a : Prop} {c : Clause} {b : Prop}
    (h₁ : Literal.reify v l a) (h₂ : Clause.reify v c b) :
    Clause.reify v (Clause.cons l c) (a ∧ b)

{v : Sat.Valuation}
{l : Sat.Literal}
{a : Prop}
{c : Sat.Clause}
{b : Prop}
(h₁ : Sat.Literal.reify v l a)
(h₂ : Sat.Clause.reify v c b)

Sat.Clause.reify v (Sat.Clause.cons l c) (a ∧ b)


theorem exists_mem_of_rel_of_mem {r : α → β → Prop} {s : Multiset α} {t : Multiset β}
    (h : Rel r s t) : ∀ {a : α}, a ∈ s → ∃ b ∈ t, r a b

{α : Type u_1}
{β : Type v}
{r : α → β → Prop}
{s : Multiset α}
{t : Multiset β}
(h : Multiset.Rel r s t)
{a : α}


theorem iUnion_prod_const {s : ι → Set α} {t : Set β} : (⋃ i, s i) ×ˢ t = ⋃ i, s i ×ˢ t

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{s : ι → Set α}
{t : Set β}


@[simp, push_cast]
theorem norm_eq_hammingNorm [∀ i, Zero (β i)] (x : Hamming β) : ‖x‖ = hammingNorm (ofHamming x)

{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
[(i : ι) → Zero (β i)]
(x : Hamming β)

‖x‖ = ↑(hammingNorm (Hamming.ofHamming x))


protected theorem bijective (e : X ≃ᵈ Y) : Bijective e

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


/-- A function is `C^∞` if and only if it is differentiable,
and its derivative (formulated in terms of `deriv`) is `C^∞`. -/
theorem contDiff_top_iff_deriv :
    ContDiff 𝕜 ∞ f₂ ↔ Differentiable 𝕜 f₂ ∧ ContDiff 𝕜 ∞ (deriv f₂)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₂ : 𝕜 → F}

ContDiff 𝕜 ⊤ f₂ ↔ Differentiable 𝕜 f₂ ∧ ContDiff 𝕜 ⊤ (deriv f₂)


theorem DifferentiableOn.sin (hc : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun x => Real.sin (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
(hc : DifferentiableOn ℝ f s)


/-- If `v` is an injective family of vectors such that `f ∘ v` is linearly independent, then `v`
    spans a submodule disjoint from the kernel of `f` -/
theorem Submodule.range_ker_disjoint {f : M →ₗ[R] M'}
    (hv : LinearIndependent R (f ∘ v)) :
    Disjoint (span R (range v)) (LinearMap.ker f)

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{M' : Type u_5}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
{f : M →ₗ[R] M'}
(hv : LinearIndependent R (⇑f ∘ v))

Disjoint (Submodule.span R (Set.range v)) (LinearMap.ker f)


lemma triangleOfSES_distinguished :
    triangleOfSES hS ∈ distTriang (DerivedCategory C)

{S : CategoryTheory.ShortComplex (CochainComplex C ℤ)}

DerivedCategory.triangleOfSES hS ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


@[to_additive (attr := simp)]
theorem unop_op (S : Subgroup G) : S.op.unop = S

{G : Type u_2}
[Group G]
(S : Subgroup G)


theorem InjOn.mem_of_mem_image {x} (hf : InjOn f s) (hs : s₁ ⊆ s) (h : x ∈ s) (h₁ : f x ∈ f '' s₁) :
    x ∈ s₁

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{f : α → β}
{x : α}
(hf : Set.InjOn f s)
(hs : s₁ ⊆ s)
(h : x ∈ s)
(h₁ : f x ∈ f '' s₁)


theorem edgeFinset_inj : G₁.edgeFinset = G₂.edgeFinset ↔ G₁ = G₂

{V : Type u_1}
{G₁ G₂ : SimpleGraph V}
[Fintype ↑G₁.edgeSet]
[Fintype ↑G₂.edgeSet]


lemma locallyLinear [ExplicitDisjoint t] [NoAccidental t] : (graph t).LocallyLinear


@[to_additive (attr := simp)]
lemma UniformFun.ofFun_one [One β] : ofFun (1 : α → β) = 1


lemma scaleRoots_dvd (p q : R[X]) {r : R} [NoZeroDivisors R] (hpq : p ∣ q) :
    p.scaleRoots r ∣ q.scaleRoots r

{R : Type u_1}
[CommSemiring R]
(p q : Polynomial R)
{r : R}
[NoZeroDivisors R]
(hpq : p ∣ q)


theorem RingHom.algebraMap_toAlgebra {R S} [CommSemiring R] [CommSemiring S] (i : R →+* S) :
    @algebraMap R S _ _ i.toAlgebra = i

{R : Type u_1}
{S : Type u_2}
[CommSemiring R]
[CommSemiring S]
(i : R →+* S)


@[simp]
theorem isEmpty_fintype {α : Type*} : IsEmpty (Fintype α) ↔ Infinite α


lemma dblXYZ_of_Z_eq_zero {P : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.dblXYZ P = P x ^ 2 • ![1, 1, 0]

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


@[simp]
theorem isOrtho_sup_left {U₁ U₂ V : Submodule 𝕜 E} : U₁ ⊔ U₂ ⟂ V ↔ U₁ ⟂ V ∧ U₂ ⟂ V

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U₁ U₂ V : Submodule 𝕜 E}

U₁ ⊔ U₂ ⟂ V ↔ U₁ ⟂ V ∧ U₂ ⟂ V


theorem get?_congr {s t : WSeq α} (h : s ~ʷ t) (n) : get? s n ~ get? t n

{α : Type u}
{s t : Stream'.WSeq α}
(h : s ~ʷ t)
(n : ℕ)


protected theorem MeasurePreserving.lintegral_map_equiv [MeasurableSpace β] {ν : Measure β}
    (f : β → ℝ≥0∞) (g : α ≃ᵐ β) (hg : MeasurePreserving g μ ν) :
    ∫⁻ a, f a ∂ν = ∫⁻ a, f (g a) ∂μ

(f : β → ℝ≥0∞)

(g : α ≃ᵐ β)

(hg : MeasureTheory.MeasurePreserving (⇑g) μ ν)

∫⁻ (a : β), f a ∂ν = ∫⁻ (a : α), f (g a) ∂μ


@[simp]
theorem tendsto_map'_iff {f : β → γ} {g : α → β} {x : Filter α} {y : Filter γ} :
    Tendsto f (map g x) y ↔ Tendsto (f ∘ g) x y

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

Filter.Tendsto f (Filter.map g x) y ↔ Filter.Tendsto (f ∘ g) x y


/-- Given a neighborhood `U` of the identity, one may find a neighborhood `V` of the identity which
is closed, symmetric, and satisfies `V * V ⊆ U`. -/
@[to_additive "Given a neighborhood `U` of the identity, one may find a neighborhood `V` of the
identity which is closed, symmetric, and satisfies `V + V ⊆ U`."]
theorem exists_closed_nhds_one_inv_eq_mul_subset {U : Set G} (hU : U ∈ 𝓝 1) :
    ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{U : Set G}
(hU : U ∈ 𝓝 0)

∃ V ∈ 𝓝 0, IsClosed V ∧ -V = V ∧ V + V ⊆ U


/-- To show that two subobjects are equal, it suffices to exhibit an isomorphism commuting with
    the arrows. -/
theorem mk_eq_mk_of_comm {B A₁ A₂ : C} (f : A₁ ⟶ B) (g : A₂ ⟶ B) [Mono f] [Mono g] (i : A₁ ≅ A₂)
    (w : i.hom ≫ g = f) : mk f = mk g

(w : CategoryTheory.CategoryStruct.comp i.hom g = f)

CategoryTheory.Subobject.mk f = CategoryTheory.Subobject.mk g


@[simp]
theorem mk_prod (α : Type u) (β : Type v) : #(α × β) = lift.{v, u} #α * lift.{u, v} #β

Cardinal.mk (α × β) = Cardinal.lift.{v, u} (Cardinal.mk α) * Cardinal.lift.{u, v} (Cardinal.mk β)


theorem add_pos {t : I} {x : ℝ} (hx : 0 < x) : 0 < (x + t : ℝ)

{t : ↑unitInterval}
{x : ℝ}
(hx : 0 < x)


@[simp]
theorem id_app' (F : C ⥤ D) (X : C) : (NatTrans.id F).app X = 𝟙 (F.obj X)

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

(CategoryTheory.NatTrans.id F).app X = CategoryTheory.CategoryStruct.id (F.obj X)


/-- Two nonnegative real exponents `p, q` are conjugate if they are `> 1` and satisfy the equality
`1/p + 1/q = 1`. This condition shows up in many theorems in analysis, notably related to `L^p`
norms. -/
@[mk_iff]
structure IsConjExponent (p q : ℝ≥0) : Prop where
  one_lt : 1 < p
  inv_add_inv_conj : p⁻¹ + q⁻¹ = 1

{p q : NNReal}
(self : p.IsConjExponent q)


@[simp, norm_cast]
theorem coe_vadd (s : AffineSubspace k P) [Nonempty s] (a : s.direction) (b : s) :
    ↑(a +ᵥ b) = (a : V) +ᵥ (b : P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(s : AffineSubspace k P)
[Nonempty ↥s]
(a : ↥s.direction)
(b : ↥s)


theorem uniqueDiffWithinAt_extChartAt_target (x : M) :
    UniqueDiffWithinAt 𝕜 (extChartAt I x).target (extChartAt I x x)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
(x : M)

UniqueDiffWithinAt 𝕜 (extChartAt I x).target (↑(extChartAt I x) x)


theorem eigenvalue_nonneg_of_nonneg {μ : ℝ} {T : E →ₗ[𝕜] E} (hμ : HasEigenvalue T μ)
    (hnn : ∀ x : E, 0 ≤ RCLike.re ⟪x, T x⟫) : 0 ≤ μ

(hnn : ∀ (x : E), 0 ≤ RCLike.re ⟪x, T x⟫_𝕜)


/-- Homotopy between morphisms of short complexes is compatible with substraction. -/
@[simps]
def sub (h : Homotopy φ₁ φ₂) (h' : Homotopy φ₃ φ₄) : Homotopy (φ₁ - φ₃) (φ₂ - φ₄)

{φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(h' : CategoryTheory.ShortComplex.Homotopy φ₃ φ₄)


theorem gcd_mul_of_coprime_of_dvd {a b c : ℕ} (hac : Coprime a c) (b_dvd_c : b ∣ c) :
    gcd (a * b) c = b

{a b c : ℕ}
(hac : a.Coprime c)
(b_dvd_c : b ∣ c)


@[simp]
theorem head_map {β : Type*} (v : Vector α (n + 1)) (f : α → β) : (v.map f).head = f v.head

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(v : Mathlib.Vector α (n + 1))
(f : α → β)

(Mathlib.Vector.map f v).head = f v.head


/-- If `e : S₁ ≅ S₂` is an isomorphism of short complexes and `h₁ : HomologyData S₁`,
this is the homology data for `S₂` deduced from the isomorphism. -/
@[simps!]
noncomputable def ofIso (e : S₁ ≅ S₂) (h : HomologyData S₁)

(CategoryTheory.ShortComplex.HomologyData.ofIso e h).left.K = h.left.K


lemma isSMulRegular_algebraMap_iff [CommSemiring R] [Semiring S] [Algebra R S]
    [AddCommMonoid M] [Module R M] [Module S M] [IsScalarTower R S M] (r : R) :
    IsSMulRegular M (algebraMap R S r) ↔ IsSMulRegular M r

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
[CommSemiring R]
[Semiring S]
[Algebra R S]
[AddCommMonoid M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(r : R)

IsSMulRegular M ((algebraMap R S) r) ↔ IsSMulRegular M r


@[simp]
theorem comp_apply (η' : ApplicativeTransformation G H) (η : ApplicativeTransformation F G)
    {α : Type u} (x : F α) : η'.comp η x = η' (η x)

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
{H : Type u → Type s}
[Applicative H]
(η' : ApplicativeTransformation G H)
(η : ApplicativeTransformation F G)
{α : Type u}
(x : F α)

(fun {α} => (η'.comp η).app α) x = (fun {α} => η'.app α) ((fun {α} => η.app α) x)


/-- The isomorphism `S₁.cycles ≅ S₂.cycles` induced by an isomorphism
of short complexes `S₁ ≅ S₂`. -/
@[simps]
noncomputable def cyclesMapIso (e : S₁ ≅ S₂) [S₁.HasLeftHomology]
    [S₂.HasLeftHomology] : S₁.cycles ≅ S₂.cycles

(CategoryTheory.ShortComplex.cyclesMapIso e).inv = CategoryTheory.ShortComplex.cyclesMap e.inv


/-- The equivalence of functor categories induced by `op` and `unop`.
-/
@[simps]
def opUnopEquiv : (C ⥤ D)ᵒᵖ ≌ Cᵒᵖ ⥤ Dᵒᵖ

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

(CategoryTheory.Functor.opUnopEquiv C D).unitIso =
  CategoryTheory.NatIso.ofComponents (fun F => (Opposite.unop F).opUnopIso.op) ⋯


theorem _root_.SemiconjBy.tprod {a₁ a₂ a₃ : Π i, A i}
    (ha : SemiconjBy a₁ a₂ a₃) :
    SemiconjBy (tprod R a₁) (tprod R a₂) (tprod R a₃)

[(i : ι) → NonUnitalNonAssocSemiring (A i)]

[∀ (i : ι), SMulCommClass R (A i) (A i)]

[∀ (i : ι), IsScalarTower R (A i) (A i)]

SemiconjBy ((PiTensorProduct.tprod R) a₁) ((PiTensorProduct.tprod R) a₂) ((PiTensorProduct.tprod R) a₃)


@[simp]
theorem Ico_inr_inl : Ico (inr b₁) (inl a₂) = ∅

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

Finset.Ico (Sum.inr b₁) (Sum.inl a₂) = ∅


@[simp] lemma locallyLipschitzOn_empty (f : α → β) : LocallyLipschitzOn ∅ f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(f : α → β)


@[simp]
theorem subset_univ (s : Finset α) : s ⊆ univ

{α : Type u_1}
[Fintype α]
(s : Finset α)


@[simp]
theorem coprod_map_prod (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₃) (S : Submodule R M)
    (S' : Submodule R M₂) : (Submodule.prod S S').map (LinearMap.coprod f g) = S.map f ⊔ S'.map g

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
(f : M →ₗ[R] M₃)
(g : M₂ →ₗ[R] M₃)
(S : Submodule R M)
(S' : Submodule R M₂)

Submodule.map (f.coprod g) (S.prod S') = Submodule.map f S ⊔ Submodule.map g S'


@[to_additive]
theorem tprod_congr {f g : β → α}
    (hfg : ∀ b, f b = g b) : ∏' b, f b = ∏' b, g b

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f g : β → α}
(hfg : ∀ (b : β), f b = g b)


/-- For a function `f` with support in `s`, the Lᵖ norms of `f` with respect to `μ` and
`μ.restrict s` are the same. -/
theorem eLpNorm_restrict_eq_of_support_subset {s : Set α} {f : α → F} (hsf : f.support ⊆ s) :
    eLpNorm f p (μ.restrict s) = eLpNorm f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{s : Set α}
{f : α → F}
(hsf : Function.support f ⊆ s)

MeasureTheory.eLpNorm f p (μ.restrict s) = MeasureTheory.eLpNorm f p μ


/-- The supremum of a set of congruence relations `S` equals the smallest congruence relation
    containing the binary relation 'there exists `c ∈ S` such that `x` is related to `y` by
    `c`'. -/
@[to_additive sSup_eq_addConGen "The supremum of a set of additive congruence relations `S` equals
the smallest additive congruence relation containing the binary relation 'there exists `c ∈ S`
such that `x` is related to `y` by `c`'."]
theorem sSup_eq_conGen (S : Set (Con M)) :
    sSup S = conGen fun x y => ∃ c : Con M, c ∈ S ∧ c x y

{M : Type u_1}
[Add M]
(S : Set (AddCon M))

sSup S = addConGen fun x y => ∃ c ∈ S, c x y


theorem nndist_eq : nndist f g = sInf { C | ∀ x : α, nndist (f x) (g x) ≤ C }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{f g : BoundedContinuousFunction α β}

nndist f g = sInf {C | ∀ (x : α), nndist (f x) (g x) ≤ C}


/-- If `α` and `β` are two equal natural transformations, then the functors of coalgebras induced by
them are isomorphic.
We define it like this as opposed to using `eq_to_iso` so that the components are nicer to prove
lemmas about.
-/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def functorOfNatTransEq {F G : C ⥤ C} {α β : F ⟶ G} (h : α = β) :
    functorOfNatTrans α ≅ functorOfNatTrans β

(X : CategoryTheory.Endofunctor.Coalgebra F)

((CategoryTheory.Endofunctor.Coalgebra.functorOfNatTransEq h).inv.app X).f = CategoryTheory.CategoryStruct.id X.V


theorem inter_subset_left {s₁ s₂ : Finset α} : s₁ ∩ s₂ ⊆ s₁

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

s₁ ∩ s₂ ⊆ s₁


theorem infix_refl (l : List α) : l <:+: l


theorem le_pointwise_smul_iff {a : α} {S T : AddSubmonoid A} : S ≤ a • T ↔ a⁻¹ • S ≤ T

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Group α]
[DistribMulAction α A]
{a : α}
{S T : AddSubmonoid A}

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


{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)


theorem isCompl_range_some_none (α : Type*) : IsCompl (range (some : α → Option α)) {none}


theorem add_lt_aleph0 {a b : Cardinal} (ha : a < ℵ₀) (hb : b < ℵ₀) : a + b < ℵ₀

{a b : Cardinal.{u_1}}
(ha : a < Cardinal.aleph0)
(hb : b < Cardinal.aleph0)


theorem subsingleton_isBot (α : Type*) [PartialOrder α] : Set.Subsingleton { x : α | IsBot x }


/-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ

(S : Set (IsDedekindDomain.HeightOneSpectrum R))

↑((S.unitEquivUnitsInteger K).symm x) = Units.mk0 ↑↑x ⋯


/-- To construct an isomorphism of algebras, it suffices to give an isomorphism of the As which
commutes with the structure morphisms.
-/
@[simps!]
def isoMk (h : A₀.1 ≅ A₁.1) (w : F.map h.hom ≫ A₁.str = A₀.str ≫ h.hom := by aesop_cat) :
    A₀ ≅ A₁

{A₀ A₁ : CategoryTheory.Endofunctor.Algebra F}

(w : CategoryTheory.CategoryStruct.comp (F.map h.hom) A₁.str = CategoryTheory.CategoryStruct.comp A₀.str h.hom := by
  aesop_cat)

(CategoryTheory.Endofunctor.Algebra.isoMk h w).hom.f = h.hom


theorem pow_rootMultiplicity_dvd (p : R[X]) (a : R) : (X - C a) ^ rootMultiplicity a p ∣ p

{R : Type u}
[Ring R]
(p : R[X])
(a : R)

(Polynomial.X - Polynomial.C a) ^ Polynomial.rootMultiplicity a p ∣ p


@[to_additive]
theorem isOpen_of_mem_nhds [ContinuousMul G] (H : Subgroup G) {g : G} (hg : (H : Set G) ∈ 𝓝 g) :
    IsOpen (H : Set G)

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[ContinuousMul G]
(H : Subgroup G)
{g : G}
(hg : ↑H ∈ 𝓝 g)


theorem singleton_vsub_self (p : P) : ({p} : Set P) -ᵥ {p} = {(0 : G)}

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


@[to_additive] lemma threeGPFree_smul_set : ThreeGPFree (a • s) ↔ ThreeGPFree s

{α : Type u_2}
[AddCancelCommMonoid α]
{s : Set α}
{a : α}


theorem QuasiSeparatedSpace.of_openEmbedding (h : OpenEmbedding f) [QuasiSeparatedSpace β] :
    QuasiSeparatedSpace α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(h : OpenEmbedding f)
[QuasiSeparatedSpace β]


/-- See also `bourbaki1975b` Chapter VII §1.1, Proposition 2 (ii). -/
protected theorem weight_vector_multiplication (M₁ M₂ M₃ : Type*)
    [AddCommGroup M₁] [Module R M₁] [LieRingModule L M₁] [LieModule R L M₁] [AddCommGroup M₂]
    [Module R M₂] [LieRingModule L M₂] [LieModule R L M₂] [AddCommGroup M₃] [Module R M₃]
    [LieRingModule L M₃] [LieModule R L M₃] (g : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃) (χ₁ χ₂ : R) (x : L) :
    LinearMap.range ((g : M₁ ⊗[R] M₂ →ₗ[R] M₃).comp (mapIncl 𝕎(M₁, χ₁, x) 𝕎(M₂, χ₂, x))) ≤
      𝕎(M₃, χ₁ + χ₂, x)

{R : Type u_2}
{L : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(M₁ : Type u_5)
(M₂ : Type u_6)
(M₃ : Type u_7)
[AddCommGroup M₁]
[Module R M₁]
[LieRingModule L M₁]
[LieModule R L M₁]
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
[AddCommGroup M₃]
[Module R M₃]
[LieRingModule L M₃]
[LieModule R L M₃]
(g : TensorProduct R M₁ M₂ →ₗ⁅R,L⁆ M₃)
(χ₁ χ₂ : R)
(x : L)

LinearMap.range
    (↑g ∘ₗ
      TensorProduct.mapIncl (((LieModule.toEnd R L M₁) x).maxGenEigenspace χ₁)
        (((LieModule.toEnd R L M₂) x).maxGenEigenspace χ₂)) ≤
  ((LieModule.toEnd R L M₃) x).maxGenEigenspace (χ₁ + χ₂)


@[simp]
lemma fromSingle₀Equiv_symm_apply_f_zero
    {C : ChainComplex V ℕ} {X : V} (f : X ⟶ C.X 0) :
    ((fromSingle₀Equiv C X).symm f).f 0 = f


@[simp]
theorem equalizer.isoSourceOfSelf_inv :
    (equalizer.isoSourceOfSelf f).inv = equalizer.lift (𝟙 X) (by simp)

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

(CategoryTheory.Limits.equalizer.isoSourceOfSelf f).inv =
  CategoryTheory.Limits.equalizer.lift (CategoryTheory.CategoryStruct.id X) ⋯


lemma d_none_eq_zero' (i j : Option ι) (hj : j = none) :
    d K i j = 0


theorem AEMeasurable.indicator₀ (hfm : AEMeasurable f μ) {s} (hs : NullMeasurableSet s μ) :
    AEMeasurable (s.indicator f) μ

(hs : MeasureTheory.NullMeasurableSet s μ)


theorem liminf_finset_inf [ConditionallyCompleteLinearOrder β] [OrderTop β] {f : Filter α}
    {F : ι → α → β} {s : Finset ι}
    (h₁ : ∀ i ∈ s, f.IsCoboundedUnder (· ≥ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault)
    (h₂ : ∀ i ∈ s, f.IsBoundedUnder (· ≥ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault) :
    liminf (fun a ↦ inf s (fun i ↦ F i a)) f = inf s (fun i ↦ liminf (F i) f)

{F : ι → α → β}

(h₁ : ∀ i ∈ s, Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

(h₂ : ∀ i ∈ s, Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

Filter.liminf (fun a => s.inf fun i => F i a) f = s.inf fun i => Filter.liminf (F i) f


@[simp] theorem pred_lt_pred_iff {n : Nat} {a b : Fin n.succ} {ha : a ≠ 0} {hb : b ≠ 0} :
    a.pred ha < b.pred hb ↔ a < b


protected theorem add_smul (r s : R'') (x : M ⊗[R] N) : (r + s) • x = r • x + s • x

{R : Type u_1}
[CommSemiring R]
{R'' : Type u_3}
[Semiring R'']
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[Module R'' M]
[SMulCommClass R R'' M]
(r s : R'')
(x : TensorProduct R M N)


/-- Evaluating the Taylor polynomial at `x = x₀` yields `f x`. -/
@[simp]
theorem taylorWithinEval_self (f : ℝ → E) (n : ℕ) (s : Set ℝ) (x₀ : ℝ) :
    taylorWithinEval f n s x₀ x₀ = f x₀

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : ℝ → E)
(n : ℕ)
(s : Set ℝ)
(x₀ : ℝ)


theorem isBigO_const_const (c : E) {c' : F''} (hc' : c' ≠ 0) (l : Filter α) :
    (fun _x : α => c) =O[l] fun _x => c'

{α : Type u_1}
{E : Type u_3}
{F'' : Type u_10}
[Norm E]
[NormedAddCommGroup F'']
(c : E)
{c' : F''}
(hc' : c' ≠ 0)
(l : Filter α)