theorem conjugateEquiv_symm_comm {α : R₁ ⟶ R₂}{β : R₂ ⟶ R₁} (αβ : α ≫ β = 𝟙 _) :
    (conjugateEquiv adj₂ adj₁).symm β ≫ (conjugateEquiv adj₁ adj₂).symm α = 𝟙 _

(αβ : CategoryTheory.CategoryStruct.comp α β = CategoryTheory.CategoryStruct.id R₁)

CategoryTheory.CategoryStruct.comp ((CategoryTheory.conjugateEquiv adj₂ adj₁).symm β)
    ((CategoryTheory.conjugateEquiv adj₁ adj₂).symm α) =
  CategoryTheory.CategoryStruct.id L₁


@[simp] theorem ForInStep.bind_bindList_assoc [Monad m] [LawfulMonad m]
    (f : β → m (ForInStep β)) (g : α → β → m (ForInStep β)) (s : ForInStep β) (l) :
    s.bind f >>= (·.bindList g l) = s.bind fun b => f b >>= (·.bindList g l)

{m : Type u_1 → Type u_2}
{β : Type u_1}
{α : Type u_3}
[Monad m]
[LawfulMonad m]
(f : β → m (ForInStep β))
(g : α → β → m (ForInStep β))
(s : ForInStep β)
(l : List α)

(do
    let x ← s.bind f
    ForInStep.bindList g l x) =
  s.bind fun b => do
    let x ← f b
    ForInStep.bindList g l x


theorem Algebra.fg_trans' {R S A : Type*} [CommSemiring R] [CommSemiring S] [Semiring A]
    [Algebra R S] [Algebra S A] [Algebra R A] [IsScalarTower R S A] (hRS : (⊤ : Subalgebra R S).FG)
    (hSA : (⊤ : Subalgebra S A).FG) : (⊤ : Subalgebra R A).FG

{R : Type u_1}
{S : Type u_2}
{A : Type u_3}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra S A]
[Algebra R A]
[IsScalarTower R S A]
(hRS : ⊤.FG)
(hSA : ⊤.FG)


theorem ae_eq_restrict_of_forall_setIntegral_eq {f g : α → E}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hg_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn g s μ)
    (hfg_zero : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ)
    {t : Set α} (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] g

(hf_int_finite : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → MeasureTheory.IntegrableOn f s μ)

(hg_int_finite : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → MeasureTheory.IntegrableOn g s μ)

(hfg_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = ∫ (x : α) in s, g x ∂μ)


@[simp]
theorem hadamard_zero : A ⊙ (0 : Matrix m n α) = 0

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
(A : Matrix m n α)
[MulZeroClass α]


lemma casesOn'_eq_elim (b : β) (f : α → β) (a : Option α) :
    Option.casesOn' a b f = Option.elim a b f

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


theorem mul_logb {a b c : ℝ} (h₁ : b ≠ 0) (h₂ : b ≠ 1) (h₃ : b ≠ -1) :
    logb a b * logb b c = logb a c

Real.logb a b * Real.logb b c = Real.logb a c


theorem algebraMap_surjective_of_isIntegral {k K : Type*} [Field k] [Ring K] [IsDomain K]
    [hk : IsAlgClosed k] [Algebra k K] [Algebra.IsIntegral k K] :
    Function.Surjective (algebraMap k K)

{k : Type u_1}
{K : Type u_2}
[Field k]
[Ring K]
[IsDomain K]
[hk : IsAlgClosed k]
[Algebra k K]
[Algebra.IsIntegral k K]


theorem opow_def (o₁ o₂ : ONote) : o₁ ^ o₂ = opowAux2 o₂ (split o₁)


@[reassoc (attr := simp)]
lemma inr_biprodXIso_inv (i : ι) :
    biprod.inr ≫ (biprodXIso K L i).inv = (biprod.inr : L ⟶ K ⊞ L).f i

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (K.X i) (L.X i)]

CategoryTheory.Limits.biprod.inr ≫ (K.biprodXIso L i).inv = CategoryTheory.Limits.biprod.inr.f i


/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfLax' (F : LaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

((CategoryTheory.Pseudofunctor.mkOfLax' F).mapId a).hom = CategoryTheory.inv (F.mapId a)


@[simp]
theorem mapRange.addEquiv_toEquiv (f : M ≃+ N) :
    ↑(mapRange.addEquiv f : (α →₀ _) ≃+ _) =
      (mapRange.equiv (f : M ≃ N) f.map_zero f.symm.map_zero : (α →₀ _) ≃ _)

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
(f : M ≃+ N)

↑(Finsupp.mapRange.addEquiv f) = Finsupp.mapRange.equiv ↑f ⋯ ⋯


@[to_additive (attr := measurability)]
theorem _root_.Finset.aestronglyMeasurable_prod {ι : Type*} {f : ι → α → M} (s : Finset ι)
    (hf : ∀ i ∈ s, AEStronglyMeasurable (f i) μ) :
    AEStronglyMeasurable (fun a => ∏ i ∈ s, f i a) μ

(hf : ∀ i ∈ s, MeasureTheory.AEStronglyMeasurable (f i) μ)

MeasureTheory.AEStronglyMeasurable (fun a => ∑ i ∈ s, f i a) μ


lemma cfcₙ_mono {f g : R → R} {a : A} (h : ∀ x ∈ σₙ R a, f x ≤ g x)
    (hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)
    (hg : ContinuousOn g (σₙ R a) := by cfc_cont_tac)
    (hf0 : f 0 = 0 := by cfc_zero_tac) (hg0 : g 0 = 0 := by cfc_zero_tac) :
    cfcₙ f a ≤ cfcₙ g a

[∀ (α : Type u_1) [inst : Zero α] [inst_1 : TopologicalSpace α], StarOrderedRing C(α, R)₀]


/-- The image of a topological basis "downstairs" in an open quotient is a topological basis. -/
theorem IsTopologicalBasis.quotient {V : Set (Set X)} (hV : IsTopologicalBasis V)
    (h : IsOpenMap (Quotient.mk' : X → Quotient S)) :
    IsTopologicalBasis (Set.image (Quotient.mk' : X → Quotient S) '' V)

(hV : TopologicalSpace.IsTopologicalBasis V)

TopologicalSpace.IsTopologicalBasis (Set.image Quotient.mk' '' V)


theorem measure_biUnion {s : Set β} {f : β → Set α} (hs : s.Countable) (hd : s.PairwiseDisjoint f)
    (h : ∀ b ∈ s, MeasurableSet (f b)) : μ (⋃ b ∈ s, f b) = ∑' p : s, μ (f p)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set β}
{f : β → Set α}
(hs : s.Countable)
(hd : s.PairwiseDisjoint f)
(h : ∀ b ∈ s, MeasurableSet (f b))

μ (⋃ b ∈ s, f b) = ∑' (p : ↑s), μ (f ↑p)


/-- In the tangent bundle to the model space, the charts are just the canonical identification
between a product type and a sigma type, a.k.a. `TotalSpace.toProd`. -/
@[simp, mfld_simps]
theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) :
    (chartAt (ModelProd H E) p).toPartialEquiv = (TotalSpace.toProd H E).toPartialEquiv

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(p : TangentBundle I H)

(chartAt (ModelProd H E) p).toPartialEquiv = (Bundle.TotalSpace.toProd H E).toPartialEquiv


theorem u_l_u_eq_u (b : β) : u (l (u b)) = u b

{α : Type u}
{β : Type v}
[PartialOrder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
(b : β)


/-- An element `x` lies in the span of `v` iff it can be written as sum `∑ cᵢ • vᵢ = x`.
-/
theorem mem_span_range_iff_exists_fun :
    x ∈ span R (range v) ↔ ∃ c : α → R, ∑ i, c i • v i = x

{α : Type u_1}
{M : Type u_2}
(R : Type u_3)
[Fintype α]
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
{x : M}

x ∈ Submodule.span R (Set.range v) ↔ ∃ c, ∑ i : α, c i • v i = x


@[to_additive]
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G]
    [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M]
    [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom)
    (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) :
    Equicontinuous ((↑) ∘ F)

(hf : EquicontinuousAt (DFunLike.coe ∘ F) 0)


/-- In the characteristic zero case, the centroid lies in the affine
span if the number of points is not zero. -/
theorem centroid_mem_affineSpan_of_card_ne_zero [CharZero k] {s : Finset ι} (p : ι → P)
    (h : card s ≠ 0) : s.centroid k p ∈ affineSpan k (range p)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[CharZero k]
{s : Finset ι}
(p : ι → P)
(h : s.card ≠ 0)

Finset.centroid k s p ∈ affineSpan k (Set.range p)


theorem isCoboundedUnder_le_max [LinearOrder β] {f : Filter α} {u v : α → β}
    (h : f.IsCoboundedUnder (· ≤ ·) u ∨ f.IsCoboundedUnder (· ≤ ·) v) :
    f.IsCoboundedUnder (· ≤ ·) (fun a ↦ max (u a) (v a))

(h : Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f u ∨ Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f v)

Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f fun a => max (u a) (v a)


@[simp]
theorem equiv_self : equiv i i p = RingEquiv.refl L

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

IsPerfectClosure.equiv i i p = RingEquiv.refl L


/-- `VectorMeasure.restrict` as an additive monoid homomorphism. -/
@[simps]
def restrictGm (i : Set α) : VectorMeasure α M →+ VectorMeasure α M

{α : Type u_1}
[MeasurableSpace α]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(i : Set α)
(v : MeasureTheory.VectorMeasure α M)

(MeasureTheory.VectorMeasure.restrictGm i) v = v.restrict i


@[to_additive]
theorem nhds_one_eq (B : GroupFilterBasis G) :
    @nhds G B.topology (1 : G) = B.toFilterBasis.filter

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

𝓝 1 = GroupFilterBasis.toFilterBasis.filter


@[simp] theorem associated_prod [Invertible (2 : R)]
    (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) :
    associated (Q₁.prod Q₂) =
      (associated Q₁).compl₁₂ (.fst R M₁ M₂) (.fst R M₁ M₂) +
      (associated Q₂).compl₁₂ (.snd R M₁ M₂) (.snd R M₁ M₂)

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[AddCommGroup P]
[Module R M₁]
[Module R M₂]
[Module R P]
[Invertible 2]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)

QuadraticMap.associated (Q₁.prod Q₂) =
  LinearMap.compl₁₂ (QuadraticMap.associated Q₁) (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
    LinearMap.compl₁₂ (QuadraticMap.associated Q₂) (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)


@[simp]
theorem summable_rpow_inv {p : ℝ} :
    Summable (fun n => ((n : ℝ≥0) ^ p)⁻¹ : ℕ → ℝ≥0) ↔ 1 < p


theorem comap_supp {S : Type*} [CommRing S] (f : S →+* R) :
    supp (v.comap f) = Ideal.comap f v.supp

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
{S : Type u_3}
[CommRing S]
(f : S →+* R)

(AddValuation.comap f v).supp = Ideal.comap f v.supp


@[simp]
protected theorem mem_closure {K : PointedCone 𝕜 E} {a : E} :
    a ∈ K.closure ↔ a ∈ closure (K : Set E)

{𝕜 : Type u_1}
[OrderedSemiring 𝕜]
{E : Type u_2}
[AddCommMonoid E]
[TopologicalSpace E]
[ContinuousAdd E]
[Module 𝕜 E]
[ContinuousConstSMul 𝕜 E]
{K : PointedCone 𝕜 E}
{a : E}


theorem contLinear_eq_zero_iff_exists_const (f : P →ᴬ[R] Q) :
    f.contLinear = 0 ↔ ∃ q, f = const R P q

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
{Q : Type u_7}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(f : P →ᴬ[R] Q)

f.contLinear = 0 ↔ ∃ q, f = ContinuousAffineMap.const R P q


/-- If `Y` is locally compact and Hausdorff, then proper maps `X → Y` are exactly continuous maps
such that the preimage of any compact set is compact.

This result is a direct consequence of `isProperMap_iff_isCompact_preimage`, because any
Hausdorff and weakly locally compact space is compactly generated.
In the future it should be inferred by typeclass inference, however compactly generated spaces
are not yet in Mathlib (TODO), therefore we also add this theorem. -/
theorem WeaklyLocallyCompactSpace.isProperMap_iff_isCompact_preimage [T2Space Y]
    [WeaklyLocallyCompactSpace Y] :
    IsProperMap f ↔ Continuous f ∧ ∀ ⦃K⦄, IsCompact K → IsCompact (f ⁻¹' K)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
[T2Space Y]
[WeaklyLocallyCompactSpace Y]

IsProperMap f ↔ Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)


@[simp]
theorem parallelPairHom_app_one {X' Y' : C} (f g : X ⟶ Y) (f' g' : X' ⟶ Y') (p : X ⟶ X')
    (q : Y ⟶ Y') (wf : f ≫ q = p ≫ f') (wg : g ≫ q = p ≫ g') :
    (parallelPairHom f g f' g' p q wf wg).app one = q

(wf : CategoryTheory.CategoryStruct.comp f q = CategoryTheory.CategoryStruct.comp p f')

(wg : CategoryTheory.CategoryStruct.comp g q = CategoryTheory.CategoryStruct.comp p g')

(CategoryTheory.Limits.parallelPairHom f g f' g' p q wf wg).app CategoryTheory.Limits.WalkingParallelPair.one = q


/-- There is a natural quaternionic basis for the `QuaternionAlgebra`. -/
@[simps i j k]
protected def self : Basis ℍ[R,c₁,c₂] c₁ c₂

(QuaternionAlgebra.Basis.self R).i = { re := 0, imI := 1, imJ := 0, imK := 0 }


@[simp]
theorem invFunOn_apply_mem (h : a ∈ s) : invFunOn f s (f a) ∈ s

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
{s : Set α}
{f : α → β}
{a : α}
(h : a ∈ s)


theorem restrict_lintegral_eq_lintegral_restrict (f : α →ₛ ℝ≥0∞) {s : Set α}
    (hs : MeasurableSet s) : (restrict f s).lintegral μ = f.lintegral (μ.restrict s)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α ℝ≥0∞)
{s : Set α}
(hs : MeasurableSet s)

(f.restrict s).lintegral μ = f.lintegral (μ.restrict s)


/-- With Mathlib's particular conventions, we have `ζ 1 ≠ 0`. -/
lemma _root_.riemannZeta_one_ne_zero : riemannZeta 1 ≠ 0


/-- If `f` and `g` are isomorphic arrows, then a mono factorisation of `f`
gives a mono factorisation of `g` -/
@[simps]
def ofArrowIso {f g : Arrow C} (F : MonoFactorisation f.hom) (sq : f ⟶ g) [IsIso sq] :
    MonoFactorisation g.hom

(F : CategoryTheory.Limits.MonoFactorisation f.hom)


theorem sub_iInf : (a - ⨅ i, f i) = ⨆ i, a - f i

{ι : Sort u_1}
{f : ι → ℝ≥0∞}
{a : ℝ≥0∞}


/-- The same-universe version of `Field.lift_sepDegree_eq_of_equiv`. -/
theorem sepDegree_eq_of_equiv (K : Type v) [Field K] [Algebra F K] (i : E ≃ₐ[F] K) :
    sepDegree F E = sepDegree F K

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type v)
[Field K]
[Algebra F K]
(i : E ≃ₐ[F] K)

Field.sepDegree F E = Field.sepDegree F K


@[simp] lemma ofScott_symm_eq : (@ofScott α).symm = toScott


/-- If a function `f : R → S` has a left-inverse that is a monoid hom,
  then `r : R` is invertible if `f r` is.

The inverse is computed as `g (⅟(f r))` -/
@[simps! (config := .lemmasOnly)]
def Invertible.ofLeftInverse {R : Type*} {S : Type*} {G : Type*} [MulOneClass R] [MulOneClass S]
    [FunLike G S R] [MonoidHomClass G S R] (f : R → S) (g : G) (r : R)
    (h : Function.LeftInverse g f) [Invertible (f r)] : Invertible r

{R : Type u_1}
{S : Type u_2}
{G : Type u_3}
[MulOneClass R]
[MulOneClass S]
[FunLike G S R]
[MonoidHomClass G S R]
(f : R → S)
(g : G)
(r : R)
(h : Function.LeftInverse (⇑g) f)
[Invertible (f r)]


@[mono]
theorem natPred_monotone : Monotone natPred


lemma equicontinuousOn_univ (F : ι → X → α) :
    EquicontinuousOn F univ ↔ Equicontinuous F

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

EquicontinuousOn F Set.univ ↔ Equicontinuous F


theorem Transcendental.pow {r : A} (ht : Transcendental R r) {n : ℕ} (hn : 0 < n) :
    Transcendental R (r ^ n)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{r : A}
(ht : Transcendental R r)
{n : ℕ}
(hn : 0 < n)


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

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


theorem ordConnectedProj_mem_ordConnectedComponent (s : Set α) (x : s) :
    ordConnectedProj s x ∈ ordConnectedComponent s x

{α : Type u_1}
[LinearOrder α]
(s : Set α)
(x : ↑s)

s.ordConnectedProj x ∈ s.ordConnectedComponent ↑x


/-- A braided monoidal category is a monoidal category equipped with a braiding isomorphism
`β_ X Y : X ⊗ Y ≅ Y ⊗ X`
which is natural in both arguments,
and also satisfies the two hexagon identities.
-/
class BraidedCategory (C : Type u) [Category.{v} C] [MonoidalCategory.{v} C] where
  /-- The braiding natural isomorphism. -/
  braiding : ∀ X Y : C, X ⊗ Y ≅ Y ⊗ X
  braiding_naturality_right :
    ∀ (X : C) {Y Z : C} (f : Y ⟶ Z),
      X ◁ f ≫ (braiding X Z).hom = (braiding X Y).hom ≫ f ▷ X := by
    aesop_cat
  braiding_naturality_left :
    ∀ {X Y : C} (f : X ⟶ Y) (Z : C),
      f ▷ Z ≫ (braiding Y Z).hom = (braiding X Z).hom ≫ Z ◁ f := by
    aesop_cat
  /-- The first hexagon identity. -/
  hexagon_forward :
    ∀ X Y Z : C,
      (α_ X Y Z).hom ≫ (braiding X (Y ⊗ Z)).hom ≫ (α_ Y Z X).hom =
        ((braiding X Y).hom ▷ Z) ≫ (α_ Y X Z).hom ≫ (Y ◁ (braiding X Z).hom) := by
    aesop_cat
  /-- The second hexagon identity. -/
  hexagon_reverse :
    ∀ X Y Z : C,
      (α_ X Y Z).inv ≫ (braiding (X ⊗ Y) Z).hom ≫ (α_ Z X Y).inv =
        (X ◁ (braiding Y Z).hom) ≫ (α_ X Z Y).inv ≫ ((braiding X Z).hom ▷ Y) := by
    aesop_cat

[self : CategoryTheory.BraidedCategory C]

(α_ X Y Z).inv ≫ (β_ (X ⊗ Y) Z).hom ≫ (α_ Z X Y).inv = X ◁ (β_ Y Z).hom ≫ (α_ X Z Y).inv ≫ (β_ X Z).hom ▷ Y


@[simp] lemma _root_.Multiset.Pi.cons_coe {l : List ι} (a : α i) (f : ∀ j ∈ l, α j) :
    Multiset.Pi.cons l _ a f = cons _ _ a f

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

Multiset.Pi.cons (↑l) i a f = List.Pi.cons i l a f


/-- Dense Gδ sets are residual. -/
theorem residual_of_dense_Gδ {s : Set X} (ho : IsGδ s) (hd : Dense s) : s ∈ residual X

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(ho : IsGδ s)
(hd : Dense s)


theorem measure_biUnion_finset_le (I : Finset ι) (s : ι → Set α) :
    μ (⋃ i ∈ I, s i) ≤ ∑ i ∈ I, μ (s i)

{α : Type u_1}
{ι : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
(I : Finset ι)
(s : ι → Set α)


lemma even_add' : Even (m + n) ↔ (Odd m ↔ Odd n)


@[simp]
theorem ball_normSeminorm : (normSeminorm 𝕜 E).ball = Metric.ball

(𝕜 : Type u_3)
(E : Type u_7)
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]


theorem sub_eq_add_neg (xs ys : IntList) : xs - ys = xs + (-ys)


theorem add_pow_eq_add_pow_mod_mul_pow_add_pow_div
    [CommSemiring R] {p : ℕ} [Fact p.Prime] [CharP R p] {n : ℕ} (x y : R) :
    (x + y) ^ n = (x + y) ^ (n % p) * (x ^ p + y ^ p) ^ (n / p)

(R : Type u_1)
[CommSemiring R]
{p : ℕ}
[Fact (Nat.Prime p)]
[CharP R p]
{n : ℕ}
(x y : R)


theorem isClosed_range : IsClosed (range I)

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


/-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f x`, for some `x : Fin (n + 1)` times the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f x`, for some `x : Fin (n + 1)` plus the remaining product"]
theorem prod_univ_succAbove [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) (x : Fin (n + 1)) :
    ∏ i, f i = f x * ∏ i : Fin n, f (x.succAbove i)

{β : Type u_2}
[CommMonoid β]
{n : ℕ}
(f : Fin (n + 1) → β)
(x : Fin (n + 1))

∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)


@[to_additive]
theorem powers_eq_top_of_prime_card {G : Type*} [Group G] {_ : Fintype G} {p : ℕ}
    [hp : Fact p.Prime] (h : Fintype.card G = p) {g : G} (hg : g ≠ 1) : Submonoid.powers g = ⊤

∀ {x : Fintype G} {p : ℕ} [hp : Fact (Nat.Prime p)], Fintype.card G = p → ∀ {g : G}, g ≠ 1 → Submonoid.powers g = ⊤


/-- The right fraction from `X` to `Y` given by a morphism `s : Y ⟶ X` such that `W s`. -/
@[simps]
def ofInv (s : Y ⟶ X) (hs : W s) :
    W.RightFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(s : Y ⟶ X)
(hs : W s)

(CategoryTheory.MorphismProperty.RightFraction.ofInv s hs).X' = Y


/-- The uncurrying of `F.flip` is isomorphic to
swapping the factors followed by the uncurrying of `F`. -/
@[simps!]
def uncurryObjFlip (F : C ⥤ D ⥤ E) : uncurry.obj F.flip ≅ Prod.swap _ _ ⋙ uncurry.obj F

(F : CategoryTheory.Functor C (CategoryTheory.Functor D E))

(CategoryTheory.uncurryObjFlip F).hom.app X = CategoryTheory.CategoryStruct.id ((F.obj X.2).obj X.1)


@[simp, norm_cast]
theorem cast_list_prod (s : List ℚ) : (↑s.prod : α) = (s.map (↑)).prod

{α : Type u_2}
[DivisionRing α]
[CharZero α]
(s : List ℚ)


@[simp]
theorem optionEquivSumPUnit_some (a) : optionEquivSumPUnit α (some a) = Sum.inl a

(Equiv.optionEquivSumPUnit α) (some a) = Sum.inl a


@[simp]
theorem comp_mk {a b c : Quotient r} (f : a.as ⟶ b.as) (g : b.as ⟶ c.as) :
    comp r (Quot.mk _ f) (Quot.mk _ g) = Quot.mk _ (f ≫ g)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(r : HomRel C)
{a b c : CategoryTheory.Quotient r}
(f : a.as ⟶ b.as)
(g : b.as ⟶ c.as)

CategoryTheory.Quotient.comp r (Quot.mk (CategoryTheory.Quotient.CompClosure r) f)
    (Quot.mk (CategoryTheory.Quotient.CompClosure r) g) =
  Quot.mk (CategoryTheory.Quotient.CompClosure r) (CategoryTheory.CategoryStruct.comp f g)


theorem Finset.smul_sum {r : α} {f : γ → β} {s : Finset γ} :
    (r • ∑ x ∈ s, f x) = ∑ x ∈ s, r • f x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid β]
[DistribSMul α β]
{r : α}
{f : γ → β}
{s : Finset γ}


/-- The equivalence, given by swapping factors, between `C × D` and `D × C`.
-/
@[simps!]
def braiding : C × D ≌ D × C

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

∀ {X Y : D × C} (f : X ⟶ Y), (CategoryTheory.Prod.braiding C D).inverse.map f = (f.2, f.1)


/-- The snake input in the opposite category that is deduced from a snake input. -/
@[simps]
noncomputable def op : SnakeInput Cᵒᵖ

(S : CategoryTheory.ShortComplex.SnakeInput C)

S.op.v₂₃ = CategoryTheory.ShortComplex.opMap S.v₀₁


theorem mem_graph_iff' (f : E →ₗ.[R] F) {x : E × F} :
    x ∈ f.graph ↔ ∃ y : f.domain, (↑y, f y) = x

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)
{x : E × F}


/-- If an element `a` divides another element `c` in a ring, `a` divides the difference of another
element `b` with `c` iff `a` divides `b`. -/
theorem dvd_sub_left (h : a ∣ c) : a ∣ b - c ↔ a ∣ b

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


theorem Infinite.exists_lt_map_eq_of_mapsTo [LinearOrder α] {s : Set α} {t : Set β} {f : α → β}
    (hs : s.Infinite) (hf : MapsTo f s t) (ht : t.Finite) : ∃ x ∈ s, ∃ y ∈ s, x < y ∧ f x = f y

{α : Type u}
{β : Type v}
[LinearOrder α]
{s : Set α}
{t : Set β}
{f : α → β}
(hs : s.Infinite)
(hf : Set.MapsTo f s t)
(ht : t.Finite)


@[to_additive (attr := simp)]
lemma inf'_one [SemilatticeInf β] (f : α → β) : inf' 1 one_nonempty f = f 1

{α : Type u_2}
{β : Type u_3}
[One α]
[SemilatticeInf β]
(f : α → β)


@[simp]
lemma id_val (X : LightCondensed.{u} C) : (𝟙 X : X ⟶ X).val = 𝟙 _

{C : Type w}
[CategoryTheory.Category.{v, w} C]
(X : LightCondensed C)


@[simp]
theorem mk_inf_mk {a b : α} (ha : IsComplemented a) (hb : IsComplemented b) :
    (⟨a, ha⟩ ⊓ ⟨b, hb⟩ : Complementeds α) = ⟨a ⊓ b, ha.inf hb⟩

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{a b : α}
(ha : IsComplemented a)
(hb : IsComplemented b)


theorem rank_of_isUnit [StrongRankCondition R] [DecidableEq n] (A : Matrix n n R) (h : IsUnit A) :
    A.rank = Fintype.card n

{n : Type u_3}
{R : Type u_5}
[Fintype n]
[CommRing R]
[StrongRankCondition R]
[DecidableEq n]
(A : Matrix n n R)
(h : IsUnit A)


@[simp]
theorem bernoulli_zero : bernoulli 0 = 1


theorem natDegree_cancelLeads_lt_of_natDegree_le_natDegree (h : p.natDegree ≤ q.natDegree)
    (hq : 0 < q.natDegree) : (p.cancelLeads q).natDegree < q.natDegree

{R : Type u_1}
[CommRing R]
{p q : Polynomial R}
(h : p.natDegree ≤ q.natDegree)
(hq : 0 < q.natDegree)


theorem SOppSide.not_wSameSide {s : AffineSubspace R P} {x y : P} (h : s.SOppSide x y) :
    ¬s.WSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.SOppSide x y)


theorem SSameSide.trans {s : AffineSubspace R P} {x y z : P} (hxy : s.SSameSide x y)
    (hyz : s.SSameSide y z) : s.SSameSide x z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y z : P}
(hxy : s.SSameSide x y)
(hyz : s.SSameSide y z)


lemma infEdist_biUnion {ι : Type*} (f : ι → Set α) (I : Set ι) (x : α) :
    infEdist x (⋃ i ∈ I, f i) = ⨅ i ∈ I, infEdist x (f i)

{α : Type u}
[PseudoEMetricSpace α]
{ι : Type u_2}
(f : ι → Set α)
(I : Set ι)
(x : α)

EMetric.infEdist x (⋃ i ∈ I, f i) = ⨅ i ∈ I, EMetric.infEdist x (f i)


theorem support_coeff_finSuccEquiv {f : MvPolynomial (Fin (n + 1)) R} {i : ℕ} {m : Fin n →₀ ℕ} :
    m ∈ (Polynomial.coeff ((finSuccEquiv R n) f) i).support ↔ Finsupp.cons i m ∈ f.support

{R : Type u}
[CommSemiring R]
{n : ℕ}
{f : MvPolynomial (Fin (n + 1)) R}
{i : ℕ}
{m : Fin n →₀ ℕ}

m ∈ (((MvPolynomial.finSuccEquiv R n) f).coeff i).support ↔ Finsupp.cons i m ∈ f.support


@[to_additive (attr := simp)]
theorem liftRight_inv_mul (f : M →* N) (h : ∀ x, IsUnit (f x)) (x) :
    ↑(IsUnit.liftRight f h x)⁻¹ * f x = 1

{M : Type u_4}
{N : Type u_5}
[Monoid M]
[Monoid N]
(f : M →* N)
(h : ∀ (x : M), IsUnit (f x))
(x : M)


@[simp] lemma inv_apply (ψ : AddChar A M) (x : A) : ψ⁻¹ x = ψ (-x)

{A : Type u_1}
{M : Type u_2}
[AddCommGroup A]
[CommMonoid M]
(ψ : AddChar A M)
(x : A)


/-- If a topological space admits an atlas with locally connected charts, then the space itself is
locally connected. -/
theorem ChartedSpace.locallyConnectedSpace [LocallyConnectedSpace H] : LocallyConnectedSpace M

(H : Type u)
(M : Type u_2)
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[LocallyConnectedSpace H]


@[simp] theorem findSome?_cons_of_isNone (l) (h : (f a).isNone) : findSome? f (a :: l) = findSome? f l

∀ {α : Type u_1} {α_1 : Type u_2} {f : α → Option α_1} {a : α} (l : List α),
  (f a).isNone = true → List.findSome? f (a :: l) = List.findSome? f l


theorem disjoint_sdiff : Disjoint s (t \ s)

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


/-- The equivalence, given by swapping factors, between `C × D` and `D × C`.
-/
@[simps!]
def braiding : C × D ≌ D × C

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

(CategoryTheory.Prod.braiding C D).counitIso.hom.app X =
  (CategoryTheory.CategoryStruct.id X.1, CategoryTheory.CategoryStruct.id X.2)


theorem prefix_of_prefix_length_le :
    ∀ {l₁ l₂ l₃ : List α}, l₁ <+: l₃ → l₂ <+: l₃ → length l₁ ≤ length l₂ → l₁ <+: l₂

l₁ <+: l₃ → l₂ <+: l₃ → l₁.length ≤ l₂.length → l₁ <+: l₂


/-- A subsemigroup `S` includes `closure s` if and only if it includes `s`. -/
@[to_additive (attr := simp)
  "An additive subsemigroup `S` includes `closure s` if and only if it includes `s`"]
theorem closure_le : closure s ≤ S ↔ s ⊆ S

{M : Type u_1}
[Add M]
{s : Set M}
{S : AddSubsemigroup M}


theorem sup_left_idem (a b : α) : a ⊔ (a ⊔ b) = a ⊔ b

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


/-- If an integrable function `f : α → E` takes values in a convex set `s` and for some set `t` of
positive measure, the average value of `f` over `t` belongs to the interior of `s`, then the average
of `f` over the whole space belongs to the interior of `s`. -/
theorem Convex.average_mem_interior_of_set [IsFiniteMeasure μ] (hs : Convex ℝ s) (h0 : μ t ≠ 0)
    (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (ht : (⨍ x in t, f x ∂μ) ∈ interior s) :
    (⨍ x, f x ∂μ) ∈ interior s

(ht : ⨍ (x : α) in t, f x ∂μ ∈ interior s)


/-- If a direct product has finite order then so does each component. -/
@[to_additive "If a direct product has finite additive order then so does each component."]
theorem IsOfFinOrder.apply {η : Type*} {Gs : η → Type*} [∀ i, Monoid (Gs i)] {x : ∀ i, Gs i}
    (h : IsOfFinOrder x) : ∀ i, IsOfFinOrder (x i)

{η : Type u_6}
{Gs : η → Type u_7}
[(i : η) → Monoid (Gs i)]
{x : (i : η) → Gs i}
(h : IsOfFinOrder x)
(i : η)


/-- When both maps `S.f` and `S.g` of a short complex `S` are zero, this is the right homology map
data (for the identity of `S`) which relates the right homology data `ofZeros` and
`ofIsColimitCokernelCofork`. -/
@[simps]
def compatibilityOfZerosOfIsColimitCokernelCofork (hf : S.f = 0) (hg : S.g = 0)
    (c : CokernelCofork S.f) (hc : IsColimit c) :
    RightHomologyMapData (𝟙 S)
      (RightHomologyData.ofZeros S hf hg)
      (RightHomologyData.ofIsColimitCokernelCofork S hg c hc)

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.RightHomologyMapData.compatibilityOfZerosOfIsColimitCokernelCofork S hf hg c hc).φQ =
  CategoryTheory.Limits.Cofork.π c


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


theorem DFinsupp.inner_sum {ι : Type*} [DecidableEq ι] {α : ι → Type*}
    [∀ i, AddZeroClass (α i)] [∀ (i) (x : α i), Decidable (x ≠ 0)] (f : ∀ i, α i → E)
    (l : Π₀ i, α i) (x : E) : ⟪x, l.sum f⟫ = l.sum fun i a => ⟪x, f i a⟫

[(i : ι) → (x : α i) → Decidable (x ≠ 0)]

⟪x, l.sum f⟫_𝕜 = l.sum fun i a => ⟪x, f i a⟫_𝕜


/-- Two vector spaces are isomorphic if and only if they have the same dimension. -/
theorem LinearEquiv.nonempty_equiv_iff_lift_rank_eq : Nonempty (M ≃ₗ[R] M') ↔
    Cardinal.lift.{v'} (Module.rank R M) = Cardinal.lift.{v} (Module.rank R M')

{R : Type u}
{M : Type v}
{M' : Type v'}
[Ring R]
[StrongRankCondition R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[AddCommGroup M']
[Module R M']
[Module.Free R M']

Nonempty (M ≃ₗ[R] M') ↔ Cardinal.lift.{v', v} (Module.rank R M) = Cardinal.lift.{v, v'} (Module.rank R M')


theorem left_le_opow (a : Ordinal) {b : Ordinal} (b1 : 0 < b) : a ≤ a ^ b


@[to_additive (attr := simp)]
theorem mem_unop {x : M} {S : Submonoid Mᵐᵒᵖ} : x ∈ S.unop ↔ MulOpposite.op x ∈ S

{M : Type u_2}
[AddZeroClass M]
{x : M}
{S : AddSubmonoid Mᵃᵒᵖ}


@[simp]
theorem mem_funs {x y f : ZFSet.{u}} : f ∈ funs x y ↔ IsFunc x y f


/-- The image under an onto linear map of a finite-dimensional space is also finite-dimensional. -/
theorem finiteDimensional_of_surjective [FiniteDimensional K V] (f : V →ₗ[K] V₂)
    (hf : LinearMap.range f = ⊤) : FiniteDimensional K V₂

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{V₂ : Type v'}
[AddCommGroup V₂]
[Module K V₂]
[FiniteDimensional K V]
(f : V →ₗ[K] V₂)
(hf : LinearMap.range f = ⊤)


theorem exists_forall_le [Nonempty β] [Preorder β] [IsDirected β (· ≤ ·)] (f : α →ₛ β) :
    ∃ C, ∀ x, f x ≤ C

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Nonempty β]
[Preorder β]
[IsDirected β fun x x_1 => x ≤ x_1]
(f : MeasureTheory.SimpleFunc α β)


theorem cos_add_nat_mul_two_pi (x : ℂ) (n : ℕ) : cos (x + n * (2 * π)) = cos x

Complex.cos (x + ↑n * (2 * ↑Real.pi)) = Complex.cos x


/-- Constructor for `IsTriangulated C` which shows that it suffices to obtain an octahedron
for a suitable isomorphic diagram instead of the given diagram. -/
lemma IsTriangulated.mk' (h : ∀ ⦃X₁' X₂' X₃' : C⦄ (u₁₂' : X₁' ⟶ X₂') (u₂₃' : X₂' ⟶ X₃'),
    ∃ (X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C) (u₁₂ : X₁ ⟶ X₂) (u₂₃ : X₂ ⟶ X₃) (e₁ : X₁' ≅ X₁) (e₂ : X₂' ≅ X₂)
    (e₃ : X₃' ≅ X₃) (_ : u₁₂' ≫ e₂.hom = e₁.hom ≫ u₁₂)
    (_ : u₂₃' ≫ e₃.hom = e₂.hom ≫ u₂₃)
    (v₁₂ : X₂ ⟶ Z₁₂) (w₁₂ : Z₁₂ ⟶ X₁⟦1⟧) (h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C)
    (v₂₃ : X₃ ⟶ Z₂₃) (w₂₃ : Z₂₃ ⟶ X₂⟦1⟧) (h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C)
    (v₁₃ : X₃ ⟶ Z₁₃) (w₁₃ : Z₁₃ ⟶ X₁⟦1⟧)
      (h₁₃ : Triangle.mk (u₁₂ ≫ u₂₃) v₁₃ w₁₃ ∈ distTriang C),
        Nonempty (Octahedron rfl h₁₂ h₂₃ h₁₃)) :
    IsTriangulated C

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

(h :
  ∀ ⦃X₁' X₂' X₃' : C⦄ (u₁₂' : X₁' ⟶ X₂') (u₂₃' : X₂' ⟶ X₃'),
    ∃ X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ u₁₂ u₂₃ e₁ e₂ e₃,
      ∃ (_ : CategoryTheory.CategoryStruct.comp u₁₂' e₂.hom = CategoryTheory.CategoryStruct.comp e₁.hom u₁₂) (_ :
        CategoryTheory.CategoryStruct.comp u₂₃' e₃.hom = CategoryTheory.CategoryStruct.comp e₂.hom u₂₃),
        ∃ v₁₂ w₁₂,
          ∃ (h₁₂ :
            CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈
              CategoryTheory.Pretriangulated.distinguishedTriangles),
            ∃ v₂₃ w₂₃,
              ∃ (h₂₃ :
                CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈
                  CategoryTheory.Pretriangulated.distinguishedTriangles),
                ∃ v₁₃ w₁₃,
                  ∃ (h₁₃ :
                    CategoryTheory.Pretriangulated.Triangle.mk (CategoryTheory.CategoryStruct.comp u₁₂ u₂₃) v₁₃ w₁₃ ∈
                      CategoryTheory.Pretriangulated.distinguishedTriangles),
                    Nonempty (CategoryTheory.Triangulated.Octahedron ⋯ h₁₂ h₂₃ h₁₃))


@[simp] lemma ofMul_vadd [SMul α β] (a : α) (b : β) : ofMul a +ᵥ b = a • b

{α : Type u_7}
{β : Type u_8}
[SMul α β]
(a : α)
(b : β)


theorem orderOf_coprime {n : ℕ} (hn : p.Coprime n) (g : G) : (orderOf g).Coprime n

{p : ℕ}
{G : Type u_1}
[Group G]
(hG : IsPGroup p G)
{n : ℕ}
(hn : p.Coprime n)
(g : G)


@[to_additive]
theorem closure_iUnion {ι} (s : ι → Set G) : closure (⋃ i, s i) = ⨆ i, closure (s i)

{G : Type u_1}
[AddGroup G]
{ι : Sort u_5}
(s : ι → Set G)

AddSubgroup.closure (⋃ i, s i) = ⨆ i, AddSubgroup.closure (s i)


theorem conjugatesOf_subset {t : Set G} (ht : IsNormalSubgroup t) {a : G} (h : a ∈ t) :
    conjugatesOf a ⊆ t

{G : Type u_1}
[Group G]
{t : Set G}
(ht : IsNormalSubgroup t)
{a : G}
(h : a ∈ t)


/-- Auxiliary lemma. Use `limit_of_surjections_surjective` instead. -/
lemma surjective_π_app_zero_of_surjective_map_aux :
    Function.Surjective ((limitCone F).π.app ⟨0⟩)

(hF : ∀ (n : ℕ), Function.Surjective (F.map (CategoryTheory.homOfLE ⋯).op))

Function.Surjective ((CategoryTheory.Limits.Types.limitCone F).π.app (Opposite.op 0))


@[to_additive]
theorem eq_bot_iff_forall : S = ⊥ ↔ ∀ x ∈ S, x = (1 : M)

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


/--
The category of comonoid objects in a cartesian monoidal category is equivalent
to the category itself, via the forgetful functor.
-/
@[simps] def comonEquiv : Comon_ C ≌ C

comonEquiv.unitIso = CategoryTheory.NatIso.ofComponents (fun A => iso_cartesianComon_ A) ⋯


@[to_additive]
theorem FP.mul_two {M} [Semigroup M] (a : Stream' M) (i j : ℕ) (ij : i < j) :
    a.get i * a.get j ∈ FP a

{M : Type u_1}
[Semigroup M]
(a : Stream' M)
(i j : ℕ)
(ij : i < j)


@[to_additive]
theorem dist_mul_mul_le (a₁ a₂ b₁ b₂ : E) : dist (a₁ * a₂) (b₁ * b₂) ≤ dist a₁ b₁ + dist a₂ b₂

{E : Type u_3}
[SeminormedCommGroup E]
(a₁ a₂ b₁ b₂ : E)


lemma IsPointwiseLeftKanExtensionAt.isIso_hom_app
    {X : C} (h : E.IsPointwiseLeftKanExtensionAt (L.obj X)) [L.Full] [L.Faithful] :
    IsIso (E.hom.app X)


theorem transpose_sum [AddCommMonoid α] {ι : Type*} (s : Finset ι) (M : ι → Matrix m n α) :
    (∑ i ∈ s, M i)ᵀ = ∑ i ∈ s, (M i)ᵀ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddCommMonoid α]
{ι : Type u_10}
(s : Finset ι)
(M : ι → Matrix m n α)


/-- If `f : α → E` is a function such that `norm ∘ f` has a maximum along a filter `l` at a point
`c` and `y` is a vector on the same ray as `f c`, then the function `fun x => ‖f x + y‖` has
a maximum along `l` at `c`. -/
theorem IsMaxFilter.norm_add_sameRay (h : IsMaxFilter (norm ∘ f) l c) (hy : SameRay ℝ (f c) y) :
    IsMaxFilter (fun x => ‖f x + y‖) l c

{α : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{f : α → E}
{l : Filter α}
{c : α}
{y : E}
(h : IsMaxFilter (norm ∘ f) l c)
(hy : SameRay ℝ (f c) y)


/-- A purely inseparable extension has inseparable degree equal to degree. -/
theorem IsPurelyInseparable.insepDegree_eq [IsPurelyInseparable F E] :
    insepDegree F E = Module.rank F E

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


theorem enum_zero_le {r : α → α → Prop} [IsWellOrder α r] (h0 : 0 < type r) (a : α) :
    ¬r a (enum r 0 h0)

{α : Type u}
{r : α → α → Prop}
[IsWellOrder α r]
(h0 : 0 < Ordinal.type r)
(a : α)


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivInverse :
    Limits.Cone (SheafConditionEqualizerProducts.diagram F U) ⥤
      Limits.Cone ((diagram U).op ⋙ F)

(c : CategoryTheory.Limits.Cone (TopCat.Presheaf.SheafConditionEqualizerProducts.diagram F U))

((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivInverse F U).obj c).π.app x =
  CategoryTheory.Pairwise.rec
    (fun a => CategoryTheory.Limits.Fork.ι c ≫ CategoryTheory.Limits.Pi.π (fun i => F.obj (Opposite.op (U i))) a)
    (fun a a_1 =>
      CategoryTheory.Limits.Fork.ι c ≫
        TopCat.Presheaf.SheafConditionEqualizerProducts.leftRes F U ≫
          CategoryTheory.Limits.Pi.π (fun p => F.obj (Opposite.op (U p.1 ⊓ U p.2))) (a, a_1))
    (Opposite.unop x)


lemma Ψ₂Sq_ne_zero (h : (4 : R) ≠ 0) : W.Ψ₂Sq ≠ 0

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(h : 4 ≠ 0)


/-- The *principle of isolated zeros* for an analytic function, global version: if a function is
analytic on a connected set `U` and vanishes in arbitrary neighborhoods of a point `z₀ ∈ U`, then
it is identically zero in `U`.
For higher-dimensional versions requiring that the function vanishes in a neighborhood of `z₀`,
see `AnalyticOn.eqOn_zero_of_preconnected_of_eventuallyEq_zero`. -/
theorem eqOn_zero_of_preconnected_of_frequently_eq_zero (hf : AnalyticOn 𝕜 f U)
    (hU : IsPreconnected U) (h₀ : z₀ ∈ U) (hfw : ∃ᶠ z in 𝓝[≠] z₀, f z = 0) : EqOn f 0 U

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{z₀ : 𝕜}
{U : Set 𝕜}
(hf : AnalyticOn 𝕜 f U)
(hU : IsPreconnected U)
(h₀ : z₀ ∈ U)
(hfw : ∃ᶠ (z : 𝕜) in 𝓝[≠] z₀, f z = 0)


theorem take_append_of_le_length {l₁ l₂ : List α} {n : Nat} (h : n ≤ l₁.length) :
    (l₁ ++ l₂).take n = l₁.take n

{α : Type u_1}
{l₁ l₂ : List α}
{n : Nat}
(h : n ≤ l₁.length)


theorem mfderiv_eq : mfderiv 𝓘(𝕜, E) 𝓘(𝕜, E') f x = (f : E →L[𝕜] E')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
(f : E ≃L[𝕜] E')
{x : E}


/-- If a set of functions is equicontinuous at some `x₀` within a set `S`, the same is true for its
closure in *any* topology for which evaluation at any `x ∈ S ∪ {x₀}` is continuous. Since
this will be applied to `DFunLike` types, we state it for any topological space whith a map
to `X → α` satisfying the right continuity conditions. See also `Set.EquicontinuousWithinAt.closure`
for a more familiar (but weaker) statement.

Note: This could *technically* be called `EquicontinuousWithinAt.closure` without name clashes
with `Set.EquicontinuousWithinAt.closure`, but we don't do it because, even with a `protected`
marker, it would introduce ambiguities while working in namespace `Set` (e.g, in the proof of
any theorem called `Set.something`). -/
theorem EquicontinuousWithinAt.closure' {A : Set Y} {u : Y → X → α} {S : Set X} {x₀ : X}
    (hA : EquicontinuousWithinAt (u ∘ (↑) : A → X → α) S x₀) (hu₁ : Continuous (S.restrict ∘ u))
    (hu₂ : Continuous (eval x₀ ∘ u)) :
    EquicontinuousWithinAt (u ∘ (↑) : closure A → X → α) S x₀

(hA : EquicontinuousWithinAt (u ∘ Subtype.val) S x₀)

(hu₂ : Continuous (Function.eval x₀ ∘ u))


lemma sheafAdjunctionCocontinuous_counit_app_val (F : Sheaf J A) :
    ((G.sheafAdjunctionCocontinuous A J K).counit.app F).val =
      (G.op.ranAdjunction A).counit.app F.val

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[∀ (F : Cᵒᵖ ⥤ A), G.op.HasPointwiseRightKanExtension F]


@[simp]
theorem toBoundedContinuousFunctionCLM_apply (f : 𝓢(E, F)) (x : E) :
    toBoundedContinuousFunctionCLM 𝕜 E F f x = f x

(𝕜 : Type u_1)
(E : Type u_4)
(F : Type u_5)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(f : SchwartzMap E F)
(x : E)

((SchwartzMap.toBoundedContinuousFunctionCLM 𝕜 E F) f) x = f x


/-- The trivial monoid object. We later show this is initial in `Mon_ C`.
-/
@[simps]
def trivial : Mon_ C

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


@[to_additive]
theorem Pi.mulSingle_sup [∀ i, SemilatticeSup (f i)] [∀ i, One (f i)] (i : I) (x y : f i) :
    Pi.mulSingle i (x ⊔ y) = Pi.mulSingle i x ⊔ Pi.mulSingle i y

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → SemilatticeSup (f i)]
[(i : I) → One (f i)]
(i : I)
(x y : f i)


protected theorem Tendsto.uIcc {l : Filter α} [TendstoIxxClass Icc l l] {f g : β → α}
    {lb : Filter β} (hf : Tendsto f lb l) (hg : Tendsto g lb l) :
    Tendsto (fun x => [[f x, g x]]) lb l.smallSets

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{l : Filter α}
[Filter.TendstoIxxClass Set.Icc l l]
{f g : β → α}
{lb : Filter β}
(hf : Filter.Tendsto f lb l)
(hg : Filter.Tendsto g lb l)

Filter.Tendsto (fun x => Set.uIcc (f x) (g x)) lb l.smallSets


@[simp]
lemma Nat.cast_card_eq_zero (R) [AddGroupWithOne R] [Fintype R] : (Fintype.card R : R) = 0

(R : Type u_6)
[AddGroupWithOne R]
[Fintype R]


/-- Polynomial evaluation commutes with `List.prod`
-/
theorem eval_list_prod (l : List R[X]) (x : R) : eval x l.prod = (l.map (eval x)).prod

{R : Type u}
[CommSemiring R]
(l : List R[X])
(x : R)

Polynomial.eval x l.prod = (List.map (Polynomial.eval x) l).prod


/-- The canonical isomorphism `F.rightDerived 0 ≅ F` when `F` is left exact
(i.e. preserves finite limits). -/
@[simps! inv]
noncomputable def rightDerivedZeroIsoSelf : F.rightDerived 0 ≅ F


@[simp]
theorem liftAddHom_symm_apply [AddCommMonoid M] [AddCommMonoid N] (F : (α →₀ M) →+ N) (x : α) :
    (liftAddHom (α := α) (M := M) (N := N)).symm F x = F.comp (singleAddHom x)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[AddCommMonoid M]
[AddCommMonoid N]
(F : (α →₀ M) →+ N)
(x : α)

Finsupp.liftAddHom.symm F x = F.comp (Finsupp.singleAddHom x)


@[to_additive]
theorem div_inter_subset : s / (t₁ ∩ t₂) ⊆ s / t₁ ∩ (s / t₂)

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


@[simp]
theorem heq_eqRec_iff_heq {α : Sort _} {a : α} {motive : (a' : α) → a = a' → Sort _}
    (x : motive a (rfl : a = a)) {a' : α} (e : a = a') {β : Sort _} (y : β) :
    HEq y (@Eq.rec α a motive x a' e) ↔ HEq y x

{α : Sort u_1}
{a : α}
{motive : (a' : α) → a = a' → Sort u_2}
(x : motive a ⋯)
{a' : α}
(e : a = a')
{β : Sort u_2}
(y : β)


/-- *Dirichlet's approximation theorem:*
For any real number `ξ` and positive natural `n`, there are integers `j` and `k`,
with `0 < k ≤ n` and `|k*ξ - j| ≤ 1/(n+1)`.

See also `Real.exists_nat_abs_mul_sub_round_le`. -/
theorem exists_int_int_abs_mul_sub_le (ξ : ℝ) {n : ℕ} (n_pos : 0 < n) :
    ∃ j k : ℤ, 0 < k ∧ k ≤ n ∧ |↑k * ξ - j| ≤ 1 / (n + 1)

∃ j k, 0 < k ∧ k ≤ ↑n ∧ |↑k * ξ - ↑j| ≤ 1 / (↑n + 1)


theorem ae_all_iff {ι : Sort*} [Countable ι] {p : α → ι → Prop} :
    (∀ᵐ a ∂μ, ∀ i, p a i) ↔ ∀ i, ∀ᵐ a ∂μ, p a i

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{ι : Sort u_4}
[Countable ι]
{p : α → ι → Prop}

(∀ᵐ (a : α) ∂μ, ∀ (i : ι), p a i) ↔ ∀ (i : ι), ∀ᵐ (a : α) ∂μ, p a i


@[simp, norm_cast]
theorem coeComplex_re (z : ℂ) : (z : ℍ).re = z.re


lemma toConvexCone_closure_pointed (K : PointedCone 𝕜 E) : (K : ConvexCone 𝕜 E).closure.Pointed

{𝕜 : Type u_1}
[OrderedSemiring 𝕜]
{E : Type u_2}
[AddCommMonoid E]
[TopologicalSpace E]
[ContinuousAdd E]
[Module 𝕜 E]
[ContinuousConstSMul 𝕜 E]
(K : PointedCone 𝕜 E)


@[mono]
theorem toNonUnitalSubsemiring_mono :
    Monotone (toNonUnitalSubsemiring : NonUnitalSubring R → NonUnitalSubsemiring R)


theorem frequently_lt_of_liminf_lt {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α}
    {u : α → β} {b : β}
    (hu : f.IsCoboundedUnder (· ≥ ·) u := by isBoundedDefault)
    (h : liminf u f < b) : ∃ᶠ x in f, u x < b

(hu : Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)


@[simp] theorem map_eq_none' : x.map f = none ↔ x = none

∀ {α : Type u_1} {x : Option α} {α_1 : Type u_2} {f : α → α_1}, Option.map f x = none ↔ x = none


theorem dist_eq_iSup (f g : PiLp ∞ α) : dist f g = ⨆ i, dist (f i) (g i)

{ι : Type u_2}
{α : ι → Type u_3}
[Fintype ι]
[(i : ι) → Dist (α i)]
(f g : PiLp ⊤ α)


/-- rank-nullity theorem : the dimensions of the kernel and the range of a linear map add up to
the dimension of the source space. -/
theorem finrank_range_add_finrank_ker [FiniteDimensional K V] (f : V →ₗ[K] V₂) :
    finrank K (LinearMap.range f) + finrank K (LinearMap.ker f) = finrank K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{V₂ : Type v'}
[AddCommGroup V₂]
[Module K V₂]
[FiniteDimensional K V]
(f : V →ₗ[K] V₂)

FiniteDimensional.finrank K ↥(LinearMap.range f) + FiniteDimensional.finrank K ↥(LinearMap.ker f) =
  FiniteDimensional.finrank K V


@[to_additive (attr := simp) add_lt_iff_neg_right]
theorem mul_lt_iff_lt_one_right' [CovariantClass α α (swap (· * ·)) (· < ·)]
    [ContravariantClass α α (swap (· * ·)) (· < ·)] {a : α} (b : α) : a * b < b ↔ a < 1

[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]


/-- A condition for `padicValRat p (n₁ / d₁) ≤ padicValRat p (n₂ / d₂)`, in terms of
divisibility by `p^n`. -/
theorem padicValRat_le_padicValRat_iff {n₁ n₂ d₁ d₂ : ℤ} (hn₁ : n₁ ≠ 0) (hn₂ : n₂ ≠ 0)
    (hd₁ : d₁ ≠ 0) (hd₂ : d₂ ≠ 0) :
    padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔
      ∀ n : ℕ, (p : ℤ) ^ n ∣ n₁ * d₂ → (p : ℤ) ^ n ∣ n₂ * d₁

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{n₁ n₂ d₁ d₂ : ℤ}
(hn₁ : n₁ ≠ 0)
(hn₂ : n₂ ≠ 0)
(hd₁ : d₁ ≠ 0)
(hd₂ : d₂ ≠ 0)

padicValRat p (n₁ /. d₁) ≤ padicValRat p (n₂ /. d₂) ↔ ∀ (n : ℕ), ↑p ^ n ∣ n₁ * d₂ → ↑p ^ n ∣ n₂ * d₁


@[simp]
theorem mk_coe {α β : Type*} (f : α ↪ β) (inj) : (⟨f, inj⟩ : α ↪ β) = f

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)
(inj : Function.Injective ⇑f)


theorem Max.right_comm (a b c : α) : max (max a b) c = max (max a c) b

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


@[simp]
theorem lim_const (x : β) : lim (const abv x) = x

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
[CauSeq.IsComplete β abv]
(x : β)


/-- We say that a type has `MeasurableDiv` if `(c / ·)` and `(· / c)` are measurable functions.
For a typeclass assuming measurability of `uncurry (· / ·)` see `MeasurableDiv₂`. -/
@[to_additive]
class MeasurableDiv (G₀ : Type*) [MeasurableSpace G₀] [Div G₀] : Prop where
  measurable_const_div : ∀ c : G₀, Measurable (c / ·)
  measurable_div_const : ∀ c : G₀, Measurable (· / c)

{G₀ : Type u_2}
[MeasurableSpace G₀]
[Div G₀]
[self : MeasurableDiv G₀]
(c : G₀)


@[simp]
theorem center_toNonUnitalSubsemiring :
    (center R A).toNonUnitalSubsemiring = NonUnitalSubsemiring.center A

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]

(NonUnitalSubalgebra.center R A).toNonUnitalSubsemiring = NonUnitalSubsemiring.center A


protected theorem mul_pos {a b : Int} (ha : 0 < a) (hb : 0 < b) : 0 < a * b


@[to_additive]
theorem Finset.prod_toFinset_eq_subtype {M : Type*} [CommMonoid M] [Fintype α] (p : α → Prop)
    [DecidablePred p] (f : α → M) : ∏ a ∈ { x | p x }.toFinset, f a = ∏ a : Subtype p, f a

{α : Type u_1}
{M : Type u_4}
[AddCommMonoid M]
[Fintype α]
(p : α → Prop)
[DecidablePred p]
(f : α → M)

∑ a ∈ {x | p x}.toFinset, f a = ∑ a : Subtype p, f ↑a


theorem divp_eq_one_iff_eq {a : α} {u : αˣ} : a /ₚ u = 1 ↔ a = u

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


theorem image_relEmbedding (hs : IsAntichain r s) (φ : r ↪r r') : IsAntichain r' (φ '' s)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{r' : β → β → Prop}
{s : Set α}
(hs : IsAntichain r s)
(φ : r ↪r r')


/-- The weighted sum is independent of the base point when the sum of
the weights is 0. -/
theorem weightedVSubOfPoint_eq_of_sum_eq_zero (w : ι → k) (p : ι → P) (h : ∑ i ∈ s, w i = 0)
    (b₁ b₂ : P) : s.weightedVSubOfPoint p b₁ w = s.weightedVSubOfPoint p b₂ w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
(h : ∑ i ∈ s, w i = 0)
(b₁ b₂ : P)

(s.weightedVSubOfPoint p b₁) w = (s.weightedVSubOfPoint p b₂) w


theorem _root_.Ring.inverse_exp (x : 𝔸) : Ring.inverse (exp 𝕂 x) = exp 𝕂 (-x)

(𝕂 : Type u_1)
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(x : 𝔸)

Ring.inverse (NormedSpace.exp 𝕂 x) = NormedSpace.exp 𝕂 (-x)


/-- If `E` and `K` are isomorphic as `F`-algebras, then they have the same finite
inseparable degree over `F`. -/
theorem finInsepDegree_eq_of_equiv (i : E ≃ₐ[F] K) :
    finInsepDegree F E = finInsepDegree F K

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
(i : E ≃ₐ[F] K)

Field.finInsepDegree F E = Field.finInsepDegree F K


/-- `PProd α β` is equivalent to `α × β` -/
@[simps apply symm_apply]
def pprodEquivProd : PProd α β ≃ α × β

{α : Type u_1}
{β : Type u_2}
(x : α × β)

Equiv.pprodEquivProd.symm x = ⟨x.1, x.2⟩


@[to_additive nsmul_zero_sub]
lemma one_div_pow (a : α) (n : ℕ) : (1 / a) ^ n = 1 / a ^ n

{α : Type u_1}
[SubtractionMonoid α]
(a : α)
(n : ℕ)


@[simp]
theorem curryFinFinset_symm_apply (hk : s.card = k) (hl : sᶜ.card = l)
    (f : G[×k]→L[𝕜] G[×l]→L[𝕜] G') (m : Fin n → G) : (curryFinFinset 𝕜 G G' hk hl).symm f m =
      f (fun i => m <| finSumEquivOfFinset hk hl (Sum.inl i)) fun i =>
        m <| finSumEquivOfFinset hk hl (Sum.inr i)

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

((ContinuousMultilinearMap.curryFinFinset 𝕜 G G' hk hl).symm f) m =
  (f fun i => m ((finSumEquivOfFinset hk hl) (Sum.inl i))) fun i => m ((finSumEquivOfFinset hk hl) (Sum.inr i))


theorem isOpenImmersion_stableUnderBaseChange :
    MorphismProperty.StableUnderBaseChange @IsOpenImmersion


@[simp]
theorem untrop_div [Sub R] (x y : Tropical R) : untrop (x / y) = untrop x - untrop y

Tropical.untrop (x / y) = Tropical.untrop x - Tropical.untrop y


protected theorem inf (h₁ : IsPartition π₁) (h₂ : IsPartition π₂) : IsPartition (π₁ ⊓ π₂)

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{π₁ π₂ : BoxIntegral.Prepartition I}
(h₁ : π₁.IsPartition)
(h₂ : π₂.IsPartition)


theorem maxPowDiv_eq_multiplicity {p n : ℕ} (hp : 1 < p) (hn : 0 < n) :
    p.maxPowDiv n = multiplicity p n


@[simp]
theorem curry_uncurry (f : α → β → φ) : curry (uncurry f) = f

{α : Type u₁}
{β : Type u₂}
{φ : Type u₃}
(f : α → β → φ)


@[norm_cast]
theorem coe_fn_coe' (f : R →ₑ+*[φ] S) : ⇑(f : R →ₑ+[φ] S) = f

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{R : Type u_10}
[Semiring R]
[MulSemiringAction M R]
{S : Type u_12}
[Semiring S]
[MulSemiringAction N S]
(f : R →ₑ+*[φ] S)


@[to_additive]
theorem iSup_comap_le {ι : Sort*} (f : G →* N) (s : ι → Subgroup N) :
    ⨆ i, (s i).comap f ≤ (iSup s).comap f

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{ι : Sort u_7}
(f : G →* N)
(s : ι → Subgroup N)

⨆ i, Subgroup.comap f (s i) ≤ Subgroup.comap f (iSup s)


@[to_additive nsmul_right_mono]
theorem pow_left_mono (n : ℕ) : Monotone fun a : M => a ^ n

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

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


theorem eq_intCastAddHom (f : ℤ →+ A) (h1 : f 1 = 1) : f = Int.castAddHom A

{A : Type u_5}
[AddGroupWithOne A]
(f : ℤ →+ A)
(h1 : f 1 = 1)


lemma lipschitzWith_sub : LipschitzWith 2 (fun (p : ℝ≥0 × ℝ≥0) ↦ p.1 - p.2)


lemma toUpperSet_inj {a b : α} : toUpperSet a = toUpperSet b ↔ a = b

Topology.WithUpperSet.toUpperSet a = Topology.WithUpperSet.toUpperSet b ↔ a = b


@[to_additive]
theorem continuousMul_inf {t₁ t₂ : TopologicalSpace M} (h₁ : @ContinuousMul M t₁ _)
    (h₂ : @ContinuousMul M t₂ _) : @ContinuousMul M (t₁ ⊓ t₂) _

{M : Type u_3}
[Mul M]
{t₁ t₂ : TopologicalSpace M}
(h₁ : ContinuousMul M)
(h₂ : ContinuousMul M)


theorem IsMinFilter.filter_inf (h : IsMinFilter f l a) (l') : IsMinFilter f (l ⊓ l') a

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{l : Filter α}
{a : α}
(h : IsMinFilter f l a)
(l' : Filter α)


/-- Bound for the operator norm of `ContinuousMap.toLp`. -/
theorem toLp_norm_le :
    ‖(toLp p μ 𝕜 : C(α, E) →L[𝕜] Lp E p μ)‖ ≤ measureUnivNNReal μ ^ p.toReal⁻¹

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[CompactSpace α]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]

‖ContinuousMap.toLp p μ 𝕜‖ ≤ ↑(MeasureTheory.measureUnivNNReal μ) ^ p.toReal⁻¹


@[to_additive]
theorem prod_antidiagonal_swap {M : Type*} [CommMonoid M] (n : α →₀ ℕ)
    (f : (α →₀ ℕ) → (α →₀ ℕ) → M) :
    ∏ p ∈ antidiagonal n, f p.1 p.2 = ∏ p ∈ antidiagonal n, f p.2 p.1

{α : Type u}
[DecidableEq α]
{M : Type u_1}
[AddCommMonoid M]
(n : α →₀ ℕ)
(f : (α →₀ ℕ) → (α →₀ ℕ) → M)

∑ p ∈ Finset.antidiagonal n, f p.1 p.2 = ∑ p ∈ Finset.antidiagonal n, f p.2 p.1


@[simp]
theorem keys_replace (a : α) (b : β a) (s : AList β) : (replace a b s).keys = s.keys

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


@[simp]
lemma opcyclesMap_zero [HasRightHomology S₁] [HasRightHomology S₂] :
    opcyclesMap (0 : S₁ ⟶ S₂) = 0

CategoryTheory.ShortComplex.opcyclesMap 0 = 0


theorem norm_eq' (hp : 0 < p) {x : ℝ} : ‖(x : AddCircle p)‖ = p * |p⁻¹ * x - round (p⁻¹ * x)|

‖↑x‖ = p * |p⁻¹ * x - ↑(round (p⁻¹ * x))|


theorem image2_iUnion₂_right (s : Set α) (t : ∀ i, κ i → Set β) :
    image2 f s (⋃ (i) (j), t i j) = ⋃ (i) (j), image2 f s (t i j)

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

Set.image2 f s (⋃ i, ⋃ j, t i j) = ⋃ i, ⋃ j, Set.image2 f s (t i j)


@[simp]
theorem coe_toEquiv_symm (e : α ≃ᵐ β) : (e.toEquiv.symm : β → α) = e.symm

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ᵐ β)


/-- The conclusion is the usual meaning of "glue nicely" in textbooks. It turns out to be quite
unusable, as it's about faces as sets in space rather than simplices. Further, additional structure
on `𝕜` means the only choice of `u` is `s ∩ t` (but it's hard to prove). -/
theorem disjoint_or_exists_inter_eq_convexHull (hs : s ∈ K.faces) (ht : t ∈ K.faces) :
    Disjoint (convexHull 𝕜 (s : Set E)) (convexHull 𝕜 ↑t) ∨
      ∃ u ∈ K.faces, convexHull 𝕜 (s : Set E) ∩ convexHull 𝕜 ↑t = convexHull 𝕜 ↑u

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}
{s t : Finset E}
(hs : s ∈ K.faces)
(ht : t ∈ K.faces)

Disjoint ((convexHull 𝕜) ↑s) ((convexHull 𝕜) ↑t) ∨
  ∃ u ∈ K.faces, (convexHull 𝕜) ↑s ∩ (convexHull 𝕜) ↑t = (convexHull 𝕜) ↑u


@[simp] theorem coe_one : ⇑(1 : X ≃ᵈ X) = id


theorem inf_covBy_of_covBy_sup_of_covBy_sup_left : a ⋖ a ⊔ b → b ⋖ a ⊔ b → a ⊓ b ⋖ a

{α : Type u_1}
[Lattice α]
[IsWeakLowerModularLattice α]
{a b : α}


theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0)

{f : ι → α → β}

(hf : ∀ (n : ι), MeasureTheory.StronglyMeasurable (f n))

(hg : MeasureTheory.StronglyMeasurable g)

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (g x)))

Filter.Tendsto (fun j => μ (s ∩ MeasureTheory.Egorov.notConvergentSeq f g n j)) Filter.atTop (𝓝 0)


@[to_additive]
theorem closure_eq_of_le (h₁ : s ⊆ S) (h₂ : S ≤ closure s) : closure s = S

{M : Type u_1}
[MulOneClass M]
{s : Set M}
{S : Submonoid M}
(h₁ : s ⊆ ↑S)
(h₂ : S ≤ Submonoid.closure s)


theorem IsBoundedUnder.bddBelow_range_of_cofinite [Preorder β] [IsDirected β (· ≥ ·)] {f : α → β}
    (hf : IsBoundedUnder (· ≥ ·) cofinite f) : BddBelow (range f)

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) Filter.cofinite f)


/-- If `X` is not a compact space, then the natural embedding `X → OnePoint X` has dense range.
-/
theorem denseRange_coe [NoncompactSpace X] : DenseRange ((↑) : X → OnePoint X)

{X : Type u_1}
[TopologicalSpace X]
[NoncompactSpace X]


@[to_additive top_prod]
theorem top_prod (s : Submonoid N) : (⊤ : Submonoid M).prod s = s.comap (MonoidHom.snd M N)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(s : Submonoid N)

⊤.prod s = Submonoid.comap (MonoidHom.snd M N) s


@[simp]
theorem disjoint_map_orderIso_iff [SemilatticeInf α] [OrderBot α] [SemilatticeInf β] [OrderBot β]
    {a b : α} (f : α ≃o β) : Disjoint (f a) (f b) ↔ Disjoint a b

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


theorem ne_zero_of_mem_circle (z : circle) : (z : ℂ) ≠ 0


@[simp]
theorem PreservesCoequalizer.iso_hom :
    (PreservesCoequalizer.iso G f g).hom = coequalizerComparison f g G

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

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

(CategoryTheory.Limits.PreservesCoequalizer.iso G f g).hom = CategoryTheory.Limits.coequalizerComparison f g G


@[to_additive]
theorem le_hasProd_of_le_prod (hf : HasProd f a) (h : ∀ s, a₂ ≤ ∏ i ∈ s, f i) : a₂ ≤ a

(h : ∀ (s : Finset ι), a₂ ≤ ∏ i ∈ s, f i)


theorem div_dioph : DiophFn fun v => f v / g v

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)


/-- The explicit cofan of a family of topological spaces given by the sigma type. -/
@[simps! pt ι_app]
def sigmaCofan {ι : Type v} (α : ι → TopCat.{max v u}) : Cofan α

(TopCat.sigmaCofan α).pt = TopCat.of ((i : ι) × ↑(α i))


/-- The space of curves $γ \colon [t_{\min}, t_{\max}] \to E$ such that $γ(t₀) = x₀$ and $γ$ is
Lipschitz continuous with constant $C$. The map sending $γ$ to
$\mathbf Pγ(t)=x₀ + ∫_{t₀}^{t} v(τ, γ(τ))\,dτ$ is a contracting map on this space, and its fixed
point is a solution of the ODE $\dot x=v(t, x)$. -/
structure FunSpace where
  toFun : Icc v.tMin v.tMax → E
  map_t₀' : toFun v.t₀ = v.x₀
  lipschitz' : LipschitzWith v.C toFun

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{v : PicardLindelof E}
(self : v.FunSpace)


protected theorem mul_inv_cancel {z : ℂ} (h : z ≠ 0) : z * z⁻¹ = 1


/-- A module is simple iff it's isomorphic to the quotient of the ring by a maximal left ideal
(not necessarily unique if the ring is not commutative). -/
theorem isSimpleModule_iff_quot_maximal :
    IsSimpleModule R M ↔ ∃ I : Ideal R, I.IsMaximal ∧ Nonempty (M ≃ₗ[R] R ⧸ I)

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]

IsSimpleModule R M ↔ ∃ I, I.IsMaximal ∧ Nonempty (M ≃ₗ[R] R ⧸ I)


@[to_additive addIndex_union_eq]
theorem index_union_eq (K₁ K₂ : Compacts G) {V : Set G} (hV : (interior V).Nonempty)
    (h : Disjoint (K₁.1 * V⁻¹) (K₂.1 * V⁻¹)) :
    index (K₁.1 ∪ K₂.1) V = index K₁.1 V + index K₂.1 V

(h : Disjoint (K₁.carrier * V⁻¹) (K₂.carrier * V⁻¹))

MeasureTheory.Measure.haar.index (K₁.carrier ∪ K₂.carrier) V =
  MeasureTheory.Measure.haar.index K₁.carrier V + MeasureTheory.Measure.haar.index K₂.carrier V


/-- `PProd α β` is equivalent to `PLift α × PLift β` -/
@[simps! apply symm_apply]
def pprodEquivProdPLift : PProd α β ≃ PLift α × PLift β

∀ (a : PLift α × PLift β),
  Equiv.pprodEquivProdPLift.symm a = (Equiv.plift.symm.pprodCongr Equiv.plift.symm).symm ⟨a.1, a.2⟩


@[simp, norm_cast]
theorem coe_pure (a : α) : (pure a : Set α) = {a}


@[simp]
theorem comp_apply (B : BilinForm R M') (l r : M →ₗ[R] M') (v w) : B.comp l r v w = B (l v) (r w)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type w}
[AddCommMonoid M']
[Module R M']
(B : LinearMap.BilinForm R M')
(l r : M →ₗ[R] M')
(v w : M)


theorem fpowerSeries_apply_one (f : E →L[𝕜] F) (x : E) :
    f.fpowerSeries x 1 = (continuousMultilinearCurryFin1 𝕜 E F).symm f

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : E →L[𝕜] F)
(x : E)


@[to_additive (attr := simp)]
lemma Subgroup.units_ofUnits_eq (S : Subgroup Mˣ) : S.ofUnits.units = S

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)


theorem cauchy_iff_exists_le_nhds [CompleteSpace α] {l : Filter α} [NeBot l] :
    Cauchy l ↔ ∃ x, l ≤ 𝓝 x

{α : Type u}
[uniformSpace : UniformSpace α]
[CompleteSpace α]
{l : Filter α}
[l.NeBot]


@[to_additive mem_prod]
theorem mem_prod {H : Subgroup G} {K : Subgroup N} {p : G × N} : p ∈ H.prod K ↔ p.1 ∈ H ∧ p.2 ∈ K

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{H : Subgroup G}
{K : Subgroup N}
{p : G × N}


/-- A family of equivalences between fibers gives an equivalence between domains. -/
@[simps!]
def ofFiberEquiv {f : α → γ} {g : β → γ} (e : ∀ c, { a // f a = c } ≃ { b // g b = c }) : α ≃ β

∀ (a : α), (Equiv.ofFiberEquiv e) a = ↑((e (f a)) ((Equiv.sigmaFiberEquiv f).symm a).snd)


theorem eq_zero_of_degree_lt_of_eval_finset_eq_zero (degree_f_lt : f.degree < s.card)
    (eval_f : ∀ x ∈ s, f.eval x = 0) : f = 0

(eval_f : ∀ x ∈ s, Polynomial.eval x f = 0)


@[simp]
theorem LinearMap.toMatrix_transpose (u : V₁ →ₗ[K] V₂) :
    LinearMap.toMatrix B₂.dualBasis B₁.dualBasis (Module.Dual.transpose (R := K) u) =
      (LinearMap.toMatrix B₁ B₂ u)ᵀ

{K : Type u_1}
{V₁ : Type u_2}
{V₂ : Type u_3}
{ι₁ : Type u_4}
{ι₂ : Type u_5}
[Field K]
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
[Fintype ι₁]
[Fintype ι₂]
[DecidableEq ι₁]
[DecidableEq ι₂]
{B₁ : Basis ι₁ K V₁}
{B₂ : Basis ι₂ K V₂}
(u : V₁ →ₗ[K] V₂)

(LinearMap.toMatrix B₂.dualBasis B₁.dualBasis) (Module.Dual.transpose u) = ((LinearMap.toMatrix B₁ B₂) u)ᵀ


/-- A special case of `Finset.sup_eq_iSup` that omits the useless `x ∈ univ` binder. -/
theorem sup_univ_eq_iSup [CompleteLattice β] (f : α → β) : Finset.univ.sup f = iSup f

{α : Type u_2}
{β : Type u_3}
[Fintype α]
[CompleteLattice β]
(f : α → β)


@[to_additive]
theorem prod_mapRange_index {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [∀ i, Zero (β₁ i)]
    [∀ i, Zero (β₂ i)] [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] [∀ (i) (x : β₂ i), Decidable (x ≠ 0)]
    [CommMonoid γ] {f : ∀ i, β₁ i → β₂ i} {hf : ∀ i, f i 0 = 0} {g : Π₀ i, β₁ i} {h : ∀ i, β₂ i → γ}
    (h0 : ∀ i, h i 0 = 1) : (mapRange f hf g).prod h = g.prod fun i b => h i (f i b)

[(i : ι) → (x : β₁ i) → Decidable (x ≠ 0)]

[(i : ι) → (x : β₂ i) → Decidable (x ≠ 0)]

(DFinsupp.mapRange f hf g).prod h = g.prod fun i b => h i (f i b)


@[to_additive] -- Porting note (#10618): `simp` can prove it
theorem mem_closedBall_one_iff : a ∈ closedBall (1 : E) r ↔ ‖a‖ ≤ r

{E : Type u_6}
[SeminormedGroup E]
{a : E}
{r : ℝ}


protected theorem HasFiniteFPowerSeriesAt.continuousAt (hf : HasFiniteFPowerSeriesAt f p x n) :
    ContinuousAt f x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{n : ℕ}
(hf : HasFiniteFPowerSeriesAt f p x n)


@[trans]
theorem trans {a b c : ℝ} (hab : IntervalIntegrable f μ a b) (hbc : IntervalIntegrable f μ b c) :
    IntervalIntegrable f μ a c

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


theorem range_mfderiv_eq_top {x : M} (hx : x ∈ e.source) : LinearMap.range (mfderiv I I' e x) = ⊤

(he : PartialHomeomorph.MDifferentiable I I' e)

LinearMap.range (mfderiv I I' (↑e) x) = ⊤


theorem IsLocalization.adjoin_inv (r : R) : IsLocalization.Away r (AdjoinRoot <| C r * X - 1)

IsLocalization.Away r (AdjoinRoot (Polynomial.C r * Polynomial.X - 1))


theorem length_lookmap (l : List α) : length (l.lookmap f) = length l

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


lemma isBigO_atTop_F_nat_one {a : ℝ} (ha : 0 ≤ a) : ∃ p, 0 < p ∧
    F_nat 1 a =O[atTop] fun t ↦ exp (-p * t)

∃ p, 0 < p ∧ HurwitzKernelBounds.F_nat 1 a =O[Filter.atTop] fun t => rexp (-p * t)


@[simp]
theorem integrableOn_const {C : E} : IntegrableOn (fun _ => C) s μ ↔ C = 0 ∨ μ s < ∞

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{s : Set α}
{μ : MeasureTheory.Measure α}
{C : E}

MeasureTheory.IntegrableOn (fun x => C) s μ ↔ C = 0 ∨ μ s < ⊤


/-- A morphism constructed with `nullHomotopic` is homotopic to zero. -/
@[simps]
def ofNullHomotopic (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
  Homotopy (nullHomotopic _ _ h₀ h₀_f h₁ h₂ h₃ g_h₃) 0

(h₀_f : CategoryTheory.CategoryStruct.comp h₀ S₂.f = 0)

(g_h₃ : CategoryTheory.CategoryStruct.comp S₁.g h₃ = 0)

(CategoryTheory.ShortComplex.Homotopy.ofNullHomotopic S₁ S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃).h₁ = h₁


/-- Given a `TransversalPair`, we can make a normal form for words in the `HNNExtension G A B φ`.
The normal form is a `head`, which is an element of `G`, followed by the product list of pairs,
`t ^ u * g`, where `u` is `1` or `-1` and `g` is the chosen element of its right coset of
`toSubgroup A B u`. There should also be no sequences of the form `t^u * g * t^-u`
where `g ∈ toSubgroup A B u` -/
structure _root_.HNNExtension.NormalWord (d : TransversalPair G A B)
    extends ReducedWord G A B : Type _ :=
  /-- Every element `g : G` in the list is the chosen element of its coset -/
  mem_set : ∀ (u : ℤˣ) (g : G), (u, g) ∈ toList → g ∈ d.set u

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


theorem Prime.pow_dvd_iff_dvd_ord_proj {p k n : ℕ} (pp : Prime p) (hn : n ≠ 0) :
    p ^ k ∣ n ↔ p ^ k ∣ ord_proj[p] n

{p k n : ℕ}
(pp : Nat.Prime p)
(hn : n ≠ 0)

p ^ k ∣ n ↔ p ^ k ∣ p ^ n.factorization p


@[to_additive]
lemma orbitRel_subgroup_le (H : Subgroup G) : orbitRel H α ≤ orbitRel G α

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
(H : Subgroup G)

MulAction.orbitRel (↥H) α ≤ MulAction.orbitRel G α


lemma withTopWithBot_apply (f : LatticeHom α β) (a : WithTop <| WithBot α) :
    f.withTopWithBot a = a.map (Option.map f)

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(a : WithTop (WithBot α))

f.withTopWithBot a = WithTop.map (Option.map ⇑f) a


theorem Nontrivial.le_infsep {d} (hs : s.Nontrivial)
    (h : ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ dist x y) : d ≤ s.infsep


theorem range'_succ (s n step) : range' s (n + 1) step = s :: range' (s + step) n step

List.range' s (n + 1) step = s :: List.range' (s + step) n step


theorem continuousOn_piecewise_ite' {s s' t : Set α} {f f' : α → β} [∀ x, Decidable (x ∈ t)]
    (h : ContinuousOn f (s ∩ closure t)) (h' : ContinuousOn f' (s' ∩ closure tᶜ))
    (H : s ∩ frontier t = s' ∩ frontier t) (Heq : EqOn f f' (s ∩ frontier t)) :
    ContinuousOn (t.piecewise f f') (t.ite s s')


@[simp]
theorem zero_apply (x : M₁) : (0 : M₁ →SL[σ₁₂] M₂) x = 0

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


theorem spanningSetsIndex_eq_iff (μ : Measure α) [SigmaFinite μ] {x : α} {n : ℕ} :
    spanningSetsIndex μ x = n ↔ x ∈ disjointed (spanningSets μ) n

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
{x : α}
{n : ℕ}

MeasureTheory.spanningSetsIndex μ x = n ↔ x ∈ disjointed (MeasureTheory.spanningSets μ) n


@[simp]
theorem symm_apply_apply (e : r ≃r s) (x : α) : e.symm (e x) = x

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(e : r ≃r s)
(x : α)


/-- If `f` has derivative `f'` at `a` in the strict sense and `c > 0`, then `f` approximates `f'`
with constant `c` on some neighborhood of `a`. -/
theorem approximates_deriv_on_nhds {f : E → F} {f' : E →L[𝕜] F} {a : E}
    (hf : HasStrictFDerivAt f f' a) {c : ℝ≥0} (hc : Subsingleton E ∨ 0 < c) :
    ∃ s ∈ 𝓝 a, ApproximatesLinearOn f f' s c

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f f' a)
{c : ℝ≥0}
(hc : Subsingleton E ∨ 0 < c)


theorem hasEigenvalue_of_isRoot (h : (minpoly K f).IsRoot μ) : f.HasEigenvalue μ

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


lemma exp_llr_of_ac' (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :
    (fun x ↦ exp (llr μ ν x)) =ᵐ[ν] fun x ↦ (μ.rnDeriv ν x).toReal

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

(fun x => rexp (MeasureTheory.llr μ ν x)) =ᵐ[ν] fun x => (μ.rnDeriv ν x).toReal


theorem abs_isBoundedUnder_iff :
    (IsBoundedUnder (· ≤ ·) atTop fun x => |eval x P|) ↔ P.degree ≤ 0

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
(P : 𝕜[X])
[OrderTopology 𝕜]

(Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) Filter.atTop fun x => |Polynomial.eval x P|) ↔ P.degree ≤ 0


@[to_additive]
theorem period_pos_of_exponent_pos (exp_pos : 0 < Monoid.exponent M) (m : M) (a : α) :
    0 < period m a

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
(exp_pos : 0 < AddMonoid.exponent M)
(m : M)
(a : α)


/-- The `n`th central binomial coefficient is the product of its prime factors, which are
at most `2n`. -/
theorem prod_pow_factorization_centralBinom (n : ℕ) :
    (∏ p ∈ Finset.range (2 * n + 1), p ^ (centralBinom n).factorization p) = centralBinom n

∏ p ∈ Finset.range (2 * n + 1), p ^ n.centralBinom.factorization p = n.centralBinom


theorem add_pow_expChar_pow_of_commute [Semiring R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) (h : Commute x y) : (x + y) ^ q ^ n = x ^ q ^ n + y ^ q ^ n

(R : Type u)
[Semiring R]
{q : ℕ}
[hR : ExpChar R q]
{n : ℕ}
(x y : R)
(h : Commute x y)


/-- A variant of `inv_mul_eq_iff_eq_mul₀` that moves the nonzero hypothesis to another variable. -/
lemma eq_mul_of_inv_mul_eq₀ (hc : c ≠ 0) (h : b⁻¹ * a = c) : a = b * c

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b c : G₀}
(hc : c ≠ 0)
(h : b⁻¹ * a = c)


/-- If `f` and `g` are isomorphic arrows, then an image factorisation of `f`
gives an image factorisation of `g` -/
@[simps]
def ofArrowIso {f g : Arrow C} (F : ImageFactorisation f.hom) (sq : f ⟶ g) [IsIso sq] :
    ImageFactorisation g.hom

(F : CategoryTheory.Limits.ImageFactorisation f.hom)

(F.ofArrowIso sq).isImage = F.isImage.ofArrowIso sq


theorem eq_false_eq_not_eq_true (b : Bool) : (¬b = true) = (b = false)


theorem initialBound_pos : 0 < initialBound ε l

0 < SzemerediRegularity.initialBound ε l


/-- The Yoneda embedding for `R`-linear categories `C`,
sending an object `X : C` to the `Module R`-valued presheaf on `C`,
with value on `Y : Cᵒᵖ` given by `Module.of R (unop Y ⟶ X)`. -/
@[simps]
def linearYoneda : C ⥤ Cᵒᵖ ⥤ ModuleCat R

(R : Type w)
[Ring R]
(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
(X : C)
(Y : Cᵒᵖ)

((CategoryTheory.linearYoneda R C).obj X).obj Y = ModuleCat.of R (Opposite.unop Y ⟶ X)


theorem of.injective_of_degree_ne_zero [IsDomain R] (hf : f.degree ≠ 0) :
    Function.Injective (AdjoinRoot.of f)

{R : Type u}
[CommRing R]
{f : R[X]}
[IsDomain R]
(hf : f.degree ≠ 0)


@[fun_prop]
theorem hasFDerivAt_const (c : F) (x : E) : HasFDerivAt (fun _ => c) (0 : E →L[𝕜] F) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(c : F)
(x : E)


@[simp] theorem next?_nil : @next? α [] = none


theorem continuousWithinAt_primitive (hb₀ : μ {b₀} = 0)
    (h_int : IntervalIntegrable f μ (min a b₁) (max a b₂)) :
    ContinuousWithinAt (fun b => ∫ x in a..b, f x ∂μ) (Icc b₁ b₂) b₀

ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Set.Icc b₁ b₂) b₀


@[to_additive (attr := simp)]
protected lemma inv_mul_cancel_right (h : IsUnit b) (a : α) : a * b⁻¹ * b = a

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


@[to_additive]
theorem prod_divisorsAntidiagonal' {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) {n : ℕ} :
    ∏ i ∈ n.divisorsAntidiagonal, f i.1 i.2 = ∏ i ∈ n.divisors, f (n / i) i

{M : Type u_1}
[AddCommMonoid M]
(f : ℕ → ℕ → M)
{n : ℕ}

∑ i ∈ n.divisorsAntidiagonal, f i.1 i.2 = ∑ i ∈ n.divisors, f (n / i) i


theorem ndunion_le_union (s t : Multiset α) : ndunion s t ≤ s ∪ t

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


theorem mk_image_le_lift {α : Type u} {β : Type v} {f : α → β} {s : Set α} :
    lift.{u} #(f '' s) ≤ lift.{v} #s

Cardinal.lift.{u, v} (Cardinal.mk ↑(f '' s)) ≤ Cardinal.lift.{v, u} (Cardinal.mk ↑s)


@[to_additive FreeAddGroup.join_red_of_step]
theorem join_red_of_step (h : Red.Step L₁ L₂) : Join Red L₁ L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
(h : FreeAddGroup.Red.Step L₁ L₂)


@[simp, norm_cast]
theorem hasSum_coe {f : α → ℝ} {r : ℝ} : HasSum (fun a => (f a : ℍ)) (↑r : ℍ) ↔ HasSum f r

HasSum (fun a => ↑(f a)) ↑r ↔ HasSum f r


@[simp]
theorem spanNorm_top : spanNorm R (⊤ : Ideal S) = ⊤

(R : Type u_1)
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]


theorem Restriction.exists_eq_restrict (h : N ≤r M) : ∃ R ⊆ M.E, N = M ↾ R

{α : Type u_1}
{M N : Matroid α}
(h : N.Restriction M)


@[to_additive]
lemma unit_of_mem_ofUnits_spec_val_eq_of_mem (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :
    S.unit_of_mem_ofUnits h = x

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
{x : M}
(h : x ∈ S.ofAddUnits)


lemma Algebra.trace_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [CommRing B₁]
    [CommRing A₂] [CommRing B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.trace A₁ B₁ x = e₁.symm (Algebra.trace A₂ B₂ (e₂ x))

(he : (algebraMap A₂ B₂).comp ↑e₁ = (↑e₂).comp (algebraMap A₁ B₁))

(Algebra.trace A₁ B₁) x = e₁.symm ((Algebra.trace A₂ B₂) (e₂ x))


theorem filter_range_nth_eq_insert {k : ℕ}
    (hlt : ∀ hf : (setOf p).Finite, k + 1 < hf.toFinset.card) :
    (range (nth p (k + 1))).filter p = insert (nth p k) ((range (nth p k)).filter p)

(hlt : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card)

Finset.filter p (Finset.range (Nat.nth p (k + 1))) = insert (Nat.nth p k) (Finset.filter p (Finset.range (Nat.nth p k)))


@[simp]
theorem zipWith_apply {f : M → N → P} {hf : f 0 0 = 0} {g₁ : α →₀ M} {g₂ : α →₀ N} {a : α} :
    zipWith f hf g₁ g₂ a = f (g₁ a) (g₂ a)

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
{P : Type u_8}
[Zero M]
[Zero N]
[Zero P]
{f : M → N → P}
{hf : f 0 0 = 0}
{g₁ : α →₀ M}
{g₂ : α →₀ N}
{a : α}

(Finsupp.zipWith f hf g₁ g₂) a = f (g₁ a) (g₂ a)


/-- If `G` is a `p`-group acting on a finite set `α`, then the number of fixed points
  of the action is congruent mod `p` to the cardinality of `α` -/
theorem card_modEq_card_fixedPoints : Nat.card α ≡ Nat.card (fixedPoints G α) [MOD p]

{p : ℕ}
{G : Type u_1}
[Group G]
(hG : IsPGroup p G)
[hp : Fact (Nat.Prime p)]
(α : Type u_2)
[MulAction G α]
[Finite α]

Nat.card α ≡ Nat.card ↑(MulAction.fixedPoints G α) [MOD p]


theorem QuadraticMap.isSymm_toMatrix' (Q : QuadraticMap R (n → R) R) : Q.toMatrix'.IsSymm

{R : Type u_3}
{n : Type w}
[Fintype n]
[DecidableEq n]
[CommRing R]
[Invertible 2]
(Q : QuadraticMap R (n → R) R)


theorem continuousSMul [RingHomSurjective σ] [RingHomIsometric σ]
    [TopologicalSpace F] [TopologicalAddGroup F] [ContinuousSMul 𝕜₂ F] (𝔖 : Set (Set E))
    (h𝔖₃ : ∀ S ∈ 𝔖, Bornology.IsVonNBounded 𝕜₁ S) :
    ContinuousSMul 𝕜₂ (UniformConvergenceCLM σ F 𝔖)

(σ : 𝕜₁ →+* 𝕜₂)


/-- A version of `Finite.exists_maximal_wrt` with the (weaker) hypothesis that the image of `s`
  is finite rather than `s` itself. -/
theorem Finite.exists_maximal_wrt' [PartialOrder β] (f : α → β) (s : Set α) (h : (f '' s).Finite)
    (hs : s.Nonempty) : (∃ a ∈ s, ∀ (a' : α), a' ∈ s → f a ≤ f a' → f a = f a')

{α : Type u}
{β : Type v}
[PartialOrder β]
(f : α → β)
(s : Set α)
(h : (f '' s).Finite)
(hs : s.Nonempty)

∃ a ∈ s, ∀ a' ∈ s, f a ≤ f a' → f a = f a'


theorem card_eq_card_functions_add_card_relations :
    L.card =
      (Cardinal.sum fun l => Cardinal.lift.{v} #(L.Functions l)) +
        Cardinal.sum fun l => Cardinal.lift.{u} #(L.Relations l)

L.card =
  (Cardinal.sum fun l => Cardinal.lift.{v, u} #(L.Functions l)) +
    Cardinal.sum fun l => Cardinal.lift.{u, v} #(L.Relations l)


/-- A bialgebra over a commutative (semi)ring `R` is both an algebra and a coalgebra over `R`, such
that the counit and comultiplication are algebra morphisms. -/
class Bialgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] extends
    Algebra R A, Coalgebra R A where
  -- The counit is an algebra morphism
  /-- The counit on a bialgebra preserves 1. -/
  counit_one : counit 1 = 1
  /-- The counit on a bialgebra preserves multiplication. Note that this is written
  in a rather obscure way: it says that two bilinear maps `A →ₗ[R] A →ₗ[R]` are equal.
  The two corresponding equal linear maps `A ⊗[R] A →ₗ[R]`
  are the following: the first factors through `A` and is multiplication on `A` followed
  by `counit`. The second factors through `R ⊗[R] R`, and is `counit ⊗ counit` followed by
  multiplication on `R`.

  See `Bialgebra.mk'` for a constructor for bialgebras which uses
  the more familiar but mathematically equivalent `counit (a * b) = counit a * counit b`. -/
  mul_compr₂_counit : (LinearMap.mul R A).compr₂ counit = (LinearMap.mul R R).compl₁₂ counit counit
  -- The comultiplication is an algebra morphism
  /-- The comultiplication on a bialgebra preserves `1`. -/
  comul_one : comul 1 = 1
  /-- The comultiplication on a bialgebra preserves multiplication. This is written in
  a rather obscure way: it says that two bilinear maps `A →ₗ[R] A →ₗ[R] (A ⊗[R] A)`
  are equal. The corresponding equal linear maps `A ⊗[R] A →ₗ[R] A ⊗[R] A`
  are firstly multiplcation followed by `comul`, and secondly `comul ⊗ comul` followed
  by multiplication on `A ⊗[R] A`.

  See `Bialgebra.mk'` for a constructor for bialgebras which uses the more familiar
  but mathematically equivalent `comul (a * b) = comul a * comul b`. -/
  mul_compr₂_comul :
    (LinearMap.mul R A).compr₂ comul = (LinearMap.mul R (A ⊗[R] A)).compl₁₂ comul comul

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[self : Bialgebra R A]


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}

(S.index P).right I = P.obj (Opposite.op I.r.Z)


lemma cpow_mul_int (x y : ℂ) (n : ℤ) : x ^ (y * n) = (x ^ y) ^ n


/-- In a vector bundle, a trivialization in the fiber (which is a priori only linear)
is in fact a continuous linear equiv between the fibers and the model fiber. -/
@[simps (config := .asFn) apply symm_apply]
def continuousLinearEquivAt (e : Trivialization F (π F E)) [e.IsLinear R] (b : B)
    (hb : b ∈ e.baseSet) : E b ≃L[R] F

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

⇑(Trivialization.continuousLinearEquivAt R e b hb) = fun y => (↑e { proj := b, snd := y }).2


@[to_additive]
theorem torsionMulEquiv_apply (tG : IsTorsion G) (a : torsion G) :
    tG.torsionMulEquiv a = MulEquiv.submonoidCongr tG.torsion_eq_top a

{G : Type u_1}
[AddCommMonoid G]
(tG : AddMonoid.IsTorsion G)
(a : ↥(AddCommMonoid.addTorsion G))

tG.torsionAddEquiv a = ↑((AddEquiv.addSubmonoidCongr ⋯) a)


theorem primitive_element_iff_minpoly_natDegree_eq (α : E) :
    F⟮α⟯ = ⊤ ↔ (minpoly F α).natDegree = finrank F E

(F : Type u_3)
{E : Type u_4}
[Field F]
[Field E]
[Algebra F E]
[FiniteDimensional F E]
(α : E)

F⟮α⟯ = ⊤ ↔ (minpoly F α).natDegree = FiniteDimensional.finrank F E


/-- We can turn any colimit cocone over a pair into a bicone. -/
@[simps]
def BinaryBicone.ofColimitCocone {X Y : C} {t : Cocone (pair X Y)} (ht : IsColimit t) :
    BinaryBicone X Y

{t : CategoryTheory.Limits.Cocone (CategoryTheory.Limits.pair X Y)}

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.BinaryBicone.ofColimitCocone ht).snd = ht.desc (CategoryTheory.Limits.BinaryCofan.mk 0 (𝟙 Y))


@[to_additive]
lemma mem_stabilizer_set_iff_subset_smul_set {s : Set α} (hs : s.Finite) :
    a ∈ stabilizer G s ↔ s ⊆ a • s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{a : G}
{s : Set α}
(hs : s.Finite)

a ∈ MulAction.stabilizer G s ↔ s ⊆ a • s


@[simp]
lemma neg_ofReal_mem_slitPlane {x : ℝ} : -↑x ∈ slitPlane ↔ x < 0


/-- The natural transformation `N₁ ⋙ Γ₂ ⟶ toKaroubi (SimplicialObject C)`. -/
@[simps]
def natTrans : (N₁ : SimplicialObject C ⥤ _) ⋙ Γ₂ ⟶ toKaroubi _

(AlgebraicTopology.DoldKan.Γ₂N₁.natTrans.app X).f.app Δ =
  (AlgebraicTopology.DoldKan.Γ₀.splitting K[X]).desc Δ fun A =>
    AlgebraicTopology.DoldKan.PInfty.f (Opposite.unop A.fst).len ≫ X.map A.e.op


theorem sin_periodic : Function.Periodic sin (2 * π)

Function.Periodic Real.sin (2 * Real.pi)


@[simp]
theorem lift_nil {C} [Category C] (φ : V ⥤q C) (X : V) :
    (lift φ).map Quiver.Path.nil = 𝟙 (φ.obj X)

{V : Type u₁}
[Quiver V]
{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(φ : V ⥤q C)
(X : V)

(CategoryTheory.Paths.lift φ).map Quiver.Path.nil = CategoryTheory.CategoryStruct.id (φ.obj X)


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

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


lemma sheafAdjunctionCocontinuous_homEquiv_apply_val {F : Sheaf K A} {H : Sheaf J A}
    (f : (G.sheafPushforwardContinuous A J K).obj F ⟶ H) :
    ((G.sheafAdjunctionCocontinuous A J K).homEquiv F H f).val =
      (G.op.ranAdjunction A).homEquiv F.val H.val f.val

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[∀ (F : Cᵒᵖ ⥤ A), G.op.HasPointwiseRightKanExtension F]

(((G.sheafAdjunctionCocontinuous A J K).homEquiv F H) f).val = ((G.op.ranAdjunction A).homEquiv F.val H.val) f.val


@[to_additive]
lemma mem_stabilizer_finset_iff_smul_finset_subset {s : Finset α} :
    a ∈ stabilizer G s ↔ a • s ⊆ s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{a : G}
[DecidableEq α]
{s : Finset α}

a ∈ MulAction.stabilizer G s ↔ a • s ⊆ s


theorem range_coe : range (some : α → WithBot α) = Ioi ⊥


theorem IsHermitian.ext_iff {A : Matrix n n α} : A.IsHermitian ↔ ∀ i j, star (A j i) = A i j

{α : Type u_1}
{n : Type u_4}
[Star α]
{A : Matrix n n α}

A.IsHermitian ↔ ∀ (i j : n), star (A j i) = A i j


@[to_additive (attr := simp)]
theorem map_one [OneHomClass F M N] (f : F) : f 1 = 1

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[Zero M]
[Zero N]
[FunLike F M N]
[ZeroHomClass F M N]
(f : F)


@[to_additive]
theorem leftInv_leftInv_le : S.leftInv.leftInv ≤ S

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


theorem isNat_natDiv : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.div a' b' = c → IsNat (a / b) c

Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → a'.div b' = c → Mathlib.Meta.NormNum.IsNat (a / b) c


theorem linearMapAt_def_of_not_mem (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∉ e.baseSet) : e.linearMapAt R b = 0

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)


@[to_additive (attr := simp)]
theorem inv_top : (⊤ : Submonoid G)⁻¹ = ⊤


/-- If `a` commutes with `b`, then `b` commutes with `a`. -/
@[to_additive (attr := symm) "If `a` commutes with `b`, then `b` commutes with `a`."]
protected theorem symm {a b : S} (h : Commute a b) : Commute b a

{S : Type u_3}
[Add S]
{a b : S}
(h : AddCommute a b)


@[simp]
theorem liftOn'_div {P : Sort v} (p q : K[X]) (f : K[X] → K[X] → P) (f0 : ∀ p, f p 0 = f 0 1)
    (H) :
    (RatFunc.liftOn' (algebraMap _ (RatFunc K) p / algebraMap _ _ q)) f @H = f p q

(H : ∀ {p q a : K[X]}, q ≠ 0 → a ≠ 0 → f (a * p) (a * q) = f p q)

((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).liftOn' f H = f p q


/-- **Triangle Removal Lemma**. If not all triangles can be removed by removing few edges (on the
order of `(card α)^2`), then there were many triangles to start with (on the order of
`(card α)^3`). -/
lemma FarFromTriangleFree.le_card_cliqueFinset (hG : G.FarFromTriangleFree ε) :
    triangleRemovalBound ε * card α ^ 3 ≤ (G.cliqueFinset 3).card

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : ℝ}
(hG : G.FarFromTriangleFree ε)

SimpleGraph.triangleRemovalBound ε * ↑(Fintype.card α) ^ 3 ≤ ↑(G.cliqueFinset 3).card


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

{G : Type u_1}
[AddGroup G]
{S T : AddSubgroup G}
{x : G}


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

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


/-- If `S` is a finite `R`-algebra, then `S' = M⁻¹S` is a finite `R' = M⁻¹R`-algebra. -/
theorem localization_finite : RingHom.LocalizationPreserves @RingHom.Finite


theorem LinearIndependent.coe_range (i : LinearIndependent R v) :
    LinearIndependent R ((↑) : range v → M)

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(i : LinearIndependent R v)

LinearIndependent (ι := { x // x ∈ Set.range v }) R Subtype.val


/-- Recurrent formula for `torusIntegral`, see also `torusIntegral_succ`. -/
theorem torusIntegral_succAbove {f : ℂⁿ⁺¹ → E} {c : ℂⁿ⁺¹} {R : ℝⁿ⁺¹} (hf : TorusIntegrable f c R)
    (i : Fin (n + 1)) :
    (∯ x in T(c, R), f x) =
      ∮ x in C(c i, R i), ∯ y in T(c ∘ i.succAbove, R ∘ i.succAbove), f (i.insertNth x y)

{n : ℕ}
{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : (Fin (n + 1) → ℂ) → E}
{c : Fin (n + 1) → ℂ}
{R : Fin (n + 1) → ℝ}
(hf : TorusIntegrable f c R)
(i : Fin (n + 1))

(∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =
  ∮ (x : ℂ) in C(c i, R i), ∯ (y : Fin n → ℂ) in T(c ∘ i.succAbove, R ∘ i.succAbove), f (i.insertNth x y)


/-- The 2-adic valuation of the n-th harmonic number is the negative of the logarithm
    of n. -/
theorem padicValRat_two_harmonic (n : ℕ) : padicValRat 2 (harmonic n) = -Nat.log 2 n

padicValRat 2 (harmonic n) = -↑(Nat.log 2 n)


theorem mem_prod {s : NonUnitalSubsemiring R} {t : NonUnitalSubsemiring S} {p : R × S} :
    p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{s : NonUnitalSubsemiring R}
{t : NonUnitalSubsemiring S}
{p : R × S}


/-- Helper function for constructing morphisms between coequalizer coforks.
-/
@[simps]
def Cofork.mkHom {s t : Cofork f g} (k : s.pt ⟶ t.pt) (w : s.π ≫ k = t.π) : s ⟶ t

{s t : CategoryTheory.Limits.Cofork f g}

(w : CategoryTheory.CategoryStruct.comp s.π k = t.π)

(CategoryTheory.Limits.Cofork.mkHom k w).hom = k


/-- Constructor for isomorphisms in `ComposableArrows C 2`. -/
@[simps]
def isoMk₂ {f g : ComposableArrows C 2}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2) : f ≅ g

{f g : CategoryTheory.ComposableArrows C 2}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁.hom =
    CategoryTheory.CategoryStruct.comp app₀.hom (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂.hom =
    CategoryTheory.CategoryStruct.comp app₁.hom (g.map' 1 2 ⋯ ⋯))

(CategoryTheory.ComposableArrows.isoMk₂ app₀ app₁ app₂ w₀ w₁).inv =
  CategoryTheory.ComposableArrows.homMk₂ app₀.inv app₁.inv app₂.inv ⋯ ⋯


theorem int_gcd_helper {x y : ℤ} {x' y' d : ℕ}
    (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.gcd x' y' = d) :
    Int.gcd x y = d

{x y : ℤ}
{x' y' d : ℕ}
(hx : x.natAbs = x')
(hy : y.natAbs = y')
(h : x'.gcd y' = d)


lemma liminf_le_liminf (h : u ≤ᶠ[f] v) :
    liminf u f ≤ liminf v f

{α : Type u_2}
{f : Filter α}
{u v : α → EReal}
(h : u ≤ᶠ[f] v)


lemma Gleason (X : CompHaus.{u}) :
    Projective X ↔ ExtremallyDisconnected X

CategoryTheory.Projective X ↔ ExtremallyDisconnected ↑X.toTop


protected theorem UniqueMDiffWithinAt.preimage_partialHomeomorph (hs : UniqueMDiffWithinAt I s x)
    {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') (hx : x ∈ e.source) :
    UniqueMDiffWithinAt I' (e.target ∩ e.symm ⁻¹' s) (e x)

(he : PartialHomeomorph.MDifferentiable I I' e)

UniqueMDiffWithinAt I' (e.target ∩ ↑e.symm ⁻¹' s) (↑e x)


private theorem le_antisymm {d₁ d₂ : ManyOneDegree} : d₁ ≤ d₂ → d₂ ≤ d₁ → d₁ = d₂

d₁ ≤ d₂ → d₂ ≤ d₁ → d₁ = d₂


/-- In this situation, `F` is also final, see
    `Functor.final_of_exists_of_isFiltered_of_fullyFaithful`. -/
theorem IsFiltered.of_exists_of_isFiltered_of_fullyFaithful [IsFiltered D] [F.Full] [F.Faithful]
    (h : ∀ d, ∃ c, Nonempty (d ⟶ F.obj c)) : IsFiltered C

(h : ∀ (d : D), ∃ c, Nonempty (d ⟶ F.obj c))


/-- If `f : X → Y` is continuous and `Y` is equipped with the Borel sigma algebra, then
convergence (in distribution) of `ProbabilityMeasure`s on `X` implies convergence (in
distribution) of the push-forwards of these measures by `f`. -/
lemma tendsto_map_of_tendsto_of_continuous {ι : Type*} {L : Filter ι}
    (νs : ι → ProbabilityMeasure Ω) (ν : ProbabilityMeasure Ω) (lim : Tendsto νs L (𝓝 ν))
    {f : Ω → Ω'} (f_cont : Continuous f) :
    Tendsto (fun i ↦ (νs i).map f_cont.measurable.aemeasurable) L
      (𝓝 (ν.map f_cont.measurable.aemeasurable))

(νs : ι → MeasureTheory.ProbabilityMeasure Ω)

(ν : MeasureTheory.ProbabilityMeasure Ω)

Filter.Tendsto (fun i => (νs i).map ⋯) L (𝓝 (ν.map ⋯))


@[simp]
theorem sign_symm (e : Perm α) : sign e.symm = sign e

{α : Type u}
[DecidableEq α]
[Fintype α]
(e : Equiv.Perm α)

Equiv.Perm.sign (Equiv.symm e) = Equiv.Perm.sign e


theorem Differentiable.const_cpow (hf : Differentiable ℂ f)
    (h0 : c ≠ 0 ∨ ∀ x, f x ≠ 0) : Differentiable ℂ (fun x ↦ c ^ f x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{c : ℂ}
(hf : Differentiable ℂ f)
(h0 : c ≠ 0 ∨ ∀ (x : E), f x ≠ 0)


/-- Oh, monads are just monoids in the category of endofunctors (equivalence of categories). -/
@[simps]
def monadMonEquiv : Monad C ≌ Mon_ (C ⥤ C)

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

(CategoryTheory.Monad.monadMonEquiv C).functor = CategoryTheory.Monad.monadToMon C


/-- The restriction of a locally ringed space along an open embedding.
-/
@[simps!]
def restrict {U : TopCat} (X : LocallyRingedSpace.{u}) {f : U ⟶ X.toTopCat} (h : OpenEmbedding f) :
    LocallyRingedSpace

∀ (X_1 : (TopologicalSpace.Opens ↑U)ᵒᵖ),
  (X.restrict h).presheaf.obj X_1 = X.presheaf.obj (Opposite.op (⋯.functor.obj (Opposite.unop X_1)))


theorem omegaLimit_mono_right {s₁ s₂ : Set α} (hs : s₁ ⊆ s₂) : ω f ϕ s₁ ⊆ ω f ϕ s₂

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
{s₁ s₂ : Set α}
(hs : s₁ ⊆ s₂)


/-- If `g : C(Y, Z)` is a topology inducing map,
then the composition `ContinuousMap.comp g : C(X, Y) → C(X, Z)` is a topology inducing map too. -/
theorem inducing_comp (g : C(Y, Z)) (hg : Inducing g) : Inducing (g.comp : C(X, Y) → C(X, Z))

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(g : C(Y, Z))
(hg : Inducing ⇑g)


@[simp]
theorem antivary_toDual_right : Antivary f (toDual ∘ g) ↔ Monovary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}

Antivary f (⇑OrderDual.toDual ∘ g) ↔ Monovary f g


theorem Iio_union_Ioi_of_lt (h : a < b) : Iio b ∪ Ioi a = univ

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


theorem homCongr_symm_apply (k : Type*) {C : Type*} [Category C] [Semiring k] [Preadditive C]
    [Linear k C] {X Y W Z : C} (f₁ : X ≅ Y) (f₂ : W ≅ Z) (f : Y ⟶ Z) :
    (homCongr k f₁ f₂).symm f = f₁.hom ≫ f ≫ f₂.inv

(k : Type u_1)
{C : Type u_2}
[CategoryTheory.Category.{u_3, u_2} C]
[Semiring k]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear k C]
{X Y W Z : C}
(f₁ : X ≅ Y)
(f₂ : W ≅ Z)
(f : Y ⟶ Z)

(CategoryTheory.Linear.homCongr k f₁ f₂).symm f = f₁.hom ≫ f ≫ f₂.inv


@[reassoc, simp]
lemma mapZ_comp {X'' Y'' : C} {h : X'' ⟶ Y''} (ψ : Arrow.mk g ⟶ Arrow.mk h) :
    data.mapZ (φ ≫ ψ) = data.mapZ φ ≫ data.mapZ ψ

{W₁ W₂ : CategoryTheory.MorphismProperty C}

(data : W₁.FunctorialFactorizationData W₂)

(φ : CategoryTheory.Arrow.mk f ⟶ CategoryTheory.Arrow.mk g)

(ψ : CategoryTheory.Arrow.mk g ⟶ CategoryTheory.Arrow.mk h)

data.mapZ (CategoryTheory.CategoryStruct.comp φ ψ) = CategoryTheory.CategoryStruct.comp (data.mapZ φ) (data.mapZ ψ)


theorem inv_mul_le_iff (h : 0 < b) : b⁻¹ * a ≤ c ↔ a ≤ b * c

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c : α}
(h : 0 < b)


@[simp high, nolint simpNF]
theorem starLift_symm_apply_apply (φ : Unitization R A →ₐ[R] C) (a : A) :
    Unitization.lift.symm φ a = φ a

{R : Type u_1}
{A : Type u_2}
{C : Type u_3}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[Semiring C]
[Algebra R C]
(φ : Unitization R A →ₐ[R] C)
(a : A)


/-- `Quotient.mk` is a surjective function. -/
theorem surjective_quotient_mk {α : Sort*} (s : Setoid α) :
    Function.Surjective (Quotient.mk s)


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem map_nonempty : (s.map f).Nonempty ↔ s.Nonempty

{α : Type u_1}
{β : Type u_2}
{f : α ↪ β}
{s : Finset α}


theorem Cofix.mk_dest {α : TypeVec n} (x : Cofix F α) : Cofix.mk (Cofix.dest x) = x

{n : ℕ}
{F : TypeVec.{u} (n + 1) → Type u}
[q : MvQPF F]
{α : TypeVec.{u} n}
(x : MvQPF.Cofix F α)


protected lemma sub_sub_sub_cancel_right (h : c ≤ b) : a - c - (b - c) = a - b


theorem nonempty_iff_ne_bot (Q : AffineSubspace k P) : (Q : Set P).Nonempty ↔ Q ≠ ⊥

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(Q : AffineSubspace k P)


@[simp]
theorem fullMonoidalClosedSubcategory_ihom_map (X : FullSubcategory P) {Y Z : FullSubcategory P}
    (f : Y ⟶ Z) : (ihom X).map f = (ihom X.obj).map f

{Y Z : CategoryTheory.FullSubcategory P}

(CategoryTheory.ihom X).map f = (CategoryTheory.ihom X.obj).map f


private lemma sqrt_isSqrt (n : ℕ) : IsSqrt n (sqrt n)


theorem quot_mk_eq_mk (a : α) : Quot.mk Setoid.r a = ConjClasses.mk a


theorem comap_maximalIdeal (h : LocalRing S := localRing S I) :
    (LocalRing.maximalIdeal S).comap (algebraMap R S) = I

{R : Type u_1}
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(I : Ideal R)
[hI : I.IsPrime]
[IsLocalization.AtPrime S I]
(h : LocalRing S := ⋯)

Ideal.comap (algebraMap R S) (LocalRing.maximalIdeal S) = I


@[to_additive]
theorem continuousInv_sInf {ts : Set (TopologicalSpace G)}
    (h : ∀ t ∈ ts, @ContinuousInv G t _) : @ContinuousInv G (sInf ts) _

{G : Type w}
[Neg G]
{ts : Set (TopologicalSpace G)}
(h : ∀ t ∈ ts, ContinuousNeg G)


@[to_additive]
theorem le_of_forall_lt_one_mul_le (h : ∀ ε < 1, a * ε ≤ b) : a ≤ b

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


theorem embedding_uLift_down [TopologicalSpace X] : Embedding (ULift.down : ULift.{v, u} X → X)


theorem isSome_iff_exists : isSome x ↔ ∃ a, x = some a

∀ {α : Type u_1} {x : Option α}, x.isSome = true ↔ ∃ a, x = some a


@[simp]
theorem norm_toBCF_eq_norm {f : C₀(α, β)} : ‖f.toBCF‖ = ‖f‖

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
{f : α →C₀ β}


/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t'

{α : Type u_1}
{ι : Type u_3}
[Countable ι]
[t : TopologicalSpace α]
[p : PolishSpace α]
(m : ι → TopologicalSpace α)
(hm : ∀ (n : ι), m n ≤ t)
(h'm : ∀ (n : ι), PolishSpace α)

∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α


lemma univ_natDegree [Nontrivial R] : (univ R n).natDegree = Fintype.card n

(R : Type u_1)
(n : Type u_3)
[CommRing R]
[Fintype n]
[DecidableEq n]
[Nontrivial R]

(Matrix.charpoly.univ R n).natDegree = Fintype.card n


/-- `Function.update f i x` is continuous in `(f, x)`. -/
@[continuity, fun_prop]
theorem continuous_update [DecidableEq ι] (i : ι) :
    Continuous fun f : (∀ j, π j) × π i => update f.1 i f.2

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

Continuous fun f => Function.update f.1 i f.2


/-- The exponent of product of two monoids is the `lcm` of the exponents of the
individuaul monoids. -/
@[to_additive AddMonoid.exponent_prod "The exponent of product of two additive monoids is the `lcm`
of the exponents of the individuaul additive monoids."]
theorem Monoid.exponent_prod {M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂] :
    exponent (M₁ × M₂) = lcm (exponent M₁) (exponent M₂)

{M₁ : Type u_1}
{M₂ : Type u_2}
[AddMonoid M₁]
[AddMonoid M₂]

AddMonoid.exponent (M₁ × M₂) = lcm (AddMonoid.exponent M₁) (AddMonoid.exponent M₂)


@[simp]
theorem toNatLinearEquiv_refl : (AddEquiv.refl M).toNatLinearEquiv = LinearEquiv.refl ℕ M


@[to_additive] theorem of_mulHom (f : H →ₙ* G)
    (hf : ∀ ⦃a b c d : H⦄, a * b = c * d → f a = f c ∧ f b = f d → a = c ∧ b = d)
    [UniqueProds G] : UniqueProds H

(hf : ∀ ⦃a b c d : H⦄, a + b = c + d → f a = f c ∧ f b = f d → a = c ∧ b = d)


/-- The map `(r ≃ s) → (r → s)` is injective. -/
theorem coe_fn_injective : @Function.Injective (α ≃ β) (α → β) (fun e => e)


theorem surjective_comp (e : α ≃ β) (f : β → γ) : Surjective (f ∘ e) ↔ Surjective f

{α : Sort u}
{β : Sort v}
{γ : Sort w}
(e : α ≃ β)
(f : β → γ)

Function.Surjective (f ∘ ⇑e) ↔ Function.Surjective f


@[simp]
theorem map_coe_ker (f : F) (x : ker f) : f x = 0

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_12}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
(f : F)
(x : ↥(LinearMap.ker f))


lemma negAddY_of_Z_eq_zero_right {P Q : Fin 3 → R} (hQ : W'.Equation Q) (hQz : Q z = 0) :
    W'.negAddY P Q = (-(Q x * P z)) ^ 3 * W'.negY P

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