/-- **Uniqueness of the conditional expectation** -/
theorem Lp.ae_eq_of_forall_setIntegral_eq' (hm : m ≤ m0) (f g : Lp E' p μ) (hp_ne_zero : p ≠ 0)
    (hp_ne_top : p ≠ ∞) (hf_int_finite : ∀ s, MeasurableSet[m] s → μ s < ∞ → IntegrableOn f s μ)
    (hg_int_finite : ∀ s, MeasurableSet[m] s → μ s < ∞ → IntegrableOn g s μ)
    (hfg : ∀ s : Set α, MeasurableSet[m] s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ)
    (hf_meas : AEStronglyMeasurable' m f μ) (hg_meas : AEStronglyMeasurable' m g μ) :
    f =ᵐ[μ] 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 : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = ∫ (x : α) in s, ↑↑g x ∂μ)

(hf_meas : MeasureTheory.AEStronglyMeasurable' m (↑↑f) μ)

(hg_meas : MeasureTheory.AEStronglyMeasurable' m (↑↑g) μ)

↑↑f =ᵐ[μ] ↑↑g


protected theorem add_assoc : ∀ a b c : Int, a + b + c = a + (b + c)


@[to_additive (attr := simp) top_prod_top]
theorem top_prod_top : (⊤ : Subgroup G).prod (⊤ : Subgroup N) = ⊤

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]


/-- The opposite morphism in `ShortComplex Cᵒᵖ` associated to a morphism in `ShortComplex C` -/
@[simps]
def opMap (φ : S₁ ⟶ S₂) : S₂.op ⟶ S₁.op

(CategoryTheory.ShortComplex.opMap φ).τ₂ = φ.τ₂.op


theorem Monotone.div_const {β : Type*} [Preorder β] {f : β → α} (hf : Monotone f) {c : α}
    (hc : 0 ≤ c) : Monotone fun x => f x / c

{α : Type u_2}
[LinearOrderedSemifield α]
{β : Type u_4}
[Preorder β]
{f : β → α}
(hf : Monotone f)
{c : α}
(hc : 0 ≤ c)


theorem inter_prod : (s₁ ∩ s₂) ×ˢ t = s₁ ×ˢ t ∩ s₂ ×ˢ t

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{t : Set β}

(s₁ ∩ s₂) ×ˢ t = s₁ ×ˢ t ∩ s₂ ×ˢ t


@[simp]
theorem disjoint_map {s t : Finset α} (f : α ↪ β) :
    Disjoint (s.map f) (t.map f) ↔ Disjoint s t

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

Disjoint (Finset.map f s) (Finset.map f t) ↔ Disjoint s t


/-- Composition of morphisms of monoid objects. -/
@[simps]
def comp {M N O : Comon_ C} (f : Hom M N) (g : Hom N O) : Hom M O

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M N O : Comon_ C}
(f : M.Hom N)
(g : N.Hom O)


theorem floor_eq_iff : ⌊a⌋ = z ↔ ↑z ≤ a ∧ a < z + 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{z : ℤ}
{a : α}


@[simp] theorem add_const {l₁ l₂ : LinearCombo} : (l₁ + l₂).const = l₁.const + l₂.const


/-- The `ωSup` operator for monotone functions. -/
@[simps]
protected def ωSup (c : Chain (α →o β)) : α →o β

(c : OmegaCompletePartialOrder.Chain (α →o β))

(OmegaCompletePartialOrder.OrderHom.ωSup c) a = OmegaCompletePartialOrder.ωSup (c.map (OrderHom.apply a))


theorem div_le_self (n k : Nat) : n / k ≤ n


@[simp]
theorem signAux_inv {n : ℕ} (f : Perm (Fin n)) : signAux f⁻¹ = signAux f


/-- One of **de Morgan's laws**: the negation of a conjunction is logically equivalent to the
disjunction of the negations. -/
theorem not_and_or : ¬(a ∧ b) ↔ ¬a ∨ ¬b

¬(a ∧ b) ↔ ¬a ∨ ¬b


/-- The image of an octahedron by a triangulated functor. -/
@[simps]
def map : Octahedron (by dsimp; rw [← F.map_comp, comm])
    (F.map_distinguished _ h₁₂) (F.map_distinguished _ h₂₃) (F.map_distinguished _ h₁₃)

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

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

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

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

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

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

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

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

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

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

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

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

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


@[to_additive (attr := simp) addCentralizer_eq_univ]
lemma centralizer_eq_univ : centralizer S = univ

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


/-- Symmetric statement to `Finset.image_image₂_right_comm`. -/
theorem image_image₂_distrib_right {g : γ → δ} {f' : α → β' → δ} {g' : β → β'}
    (h_distrib : ∀ a b, g (f a b) = f' a (g' b)) :
    (image₂ f s t).image g = image₂ f' s (t.image g')

{f : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b))

Finset.image g (Finset.image₂ f s t) = Finset.image₂ f' s (Finset.image g' t)


@[to_additive (attr := simp)]
lemma centralizer_centralizer_centralizer {s : Set M} :
    centralizer s.centralizer.centralizer = centralizer s

(M : Type u_1)
[AddMonoid M]
{s : Set M}

AddSubmonoid.centralizer s.addCentralizer.addCentralizer = AddSubmonoid.centralizer s


@[simp]
theorem fst_comp_prod [Module R₁ M₂] [Module R₁ M₃] (f : M₁ →L[R₁] M₂) (g : M₁ →L[R₁] M₃) :
    (fst R₁ M₂ M₃).comp (f.prod g) = f

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
(f : M₁ →L[R₁] M₂)
(g : M₁ →L[R₁] M₃)

(ContinuousLinearMap.fst R₁ M₂ M₃).comp (f.prod g) = f


/-- The tangent of an angle in a right-angled triangle multiplied by the adjacent side equals
the opposite side, version subtracting vectors. -/
theorem tan_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.tan (o.oangle y (y - x)) * ‖y‖ = ‖x‖

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


theorem one_mem_nthRootsFinset (hn : 0 < n) : 1 ∈ nthRootsFinset n R

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


/-- The homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def homologyData [HasZeroObject C] (s : S.Splitting) : S.HomologyData

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Limits.HasZeroObject C]
(s : S.Splitting)


@[simp]
theorem map_inj {s₁ s₂ : Finset α} : s₁.map f = s₂.map f ↔ s₁ = s₂

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

Finset.map f s₁ = Finset.map f s₂ ↔ s₁ = s₂


@[reassoc]
lemma isoShift_inv_naturality (n : M) {X Y : C} (f : X ⟶ Y) :
    (F.shift n).map f ≫ (F.isoShift n).inv.app Y =
      (F.isoShift n).inv.app X ≫ F.map (f⟦n⟧')

{C : Type u_1}
{A : Type u_2}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_6, u_2} A]
(F : C ⥤ A)
{M : Type u_3}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[F.ShiftSequence M]
(n : M)
{X Y : C}
(f : X ⟶ Y)

(F.shift n).map f ≫ (F.isoShift n).inv.app Y =
  (F.isoShift n).inv.app X ≫ F.map ((CategoryTheory.shiftFunctor C n).map f)


lemma Λ₀_eq (s : ℂ) : P.Λ₀ s = P.Λ s + (1 / s) • P.f₀ + (P.ε / (P.k - s)) • P.g₀

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(P : WeakFEPair E)
(s : ℂ)

P.Λ₀ s = P.Λ s + (1 / s) • P.f₀ + (P.ε / (↑P.k - s)) • P.g₀


theorem basisAux_tmul (a : A) (m : M) :
    basisAux A b (a ⊗ₜ m) = a • Finsupp.mapRange (algebraMap R A) (map_zero _) (b.repr m)

{R : Type uR}
{A : Type uA}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(a : A)
(m : M)

(Algebra.TensorProduct.basisAux A b) (a ⊗ₜ[R] m) = a • Finsupp.mapRange ⇑(algebraMap R A) ⋯ (b.repr m)


/-- The functor from `Pointed` to `TwoP` which adds a first point. -/
@[simps]
noncomputable def pointedToTwoPSnd : Pointed.{u} ⥤ TwoP


theorem toNat_intMax_eq : (intMax w).toNat = 2^w - 1


@[simp]
theorem exp_ofReal_mul_I_im (x : ℝ) : (exp (x * I)).im = Real.sin x

(Complex.exp (↑x * Complex.I)).im = Real.sin x


@[simp]
theorem of_f {i j} (hij) (x) : of G f j (f i j hij x) = of G f i x

{ι : Type v}
[Preorder ι]
{G : ι → Type w}
[DecidableEq ι]
[(i : ι) → AddCommGroup (G i)]
{f : (i j : ι) → i ≤ j → G i →+ G j}
{i j : ι}
(hij : i ≤ j)
(x : G i)

(AddCommGroup.DirectLimit.of G f j) ((f i j hij) x) = (AddCommGroup.DirectLimit.of G f i) x


/-- If `exps` is finitely supported, then `val_v(∏_w w^{exps w}) = exps v`. -/
theorem count_finprod (exps : HeightOneSpectrum R → ℤ)
    (h_exps : ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite, exps v = 0) :
    count K v (∏ᶠ v : HeightOneSpectrum R,
      (v.asIdeal : FractionalIdeal R⁰ K) ^ exps v) = exps v

(exps : IsDedekindDomain.HeightOneSpectrum R → ℤ)

(h_exps : ∀ᶠ (v : IsDedekindDomain.HeightOneSpectrum R) in Filter.cofinite, exps v = 0)

FractionalIdeal.count K v (∏ᶠ (v : IsDedekindDomain.HeightOneSpectrum R), ↑v.asIdeal ^ exps v) = exps v


theorem isOpen_iff_generate_Iic_compl : IsOpen s ↔ GenerateOpen { t | ∃ a, (Iic a)ᶜ = t } s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpper α]
{s : Set α}

IsOpen s ↔ TopologicalSpace.GenerateOpen {t | ∃ a, (Set.Iic a)ᶜ = t} s


/-- `Matrix.diag` as an `AddMonoidHom`. -/
@[simps]
def diagAddMonoidHom [AddZeroClass α] : Matrix n n α →+ n → α

(n : Type u_3)
(α : Type v)
[AddZeroClass α]
(A : Matrix n n α)
(i : n)

(Matrix.diagAddMonoidHom n α) A i = A.diag i


theorem Prime.dvd_mul {p m n : ℕ} (pp : Prime p) : p ∣ m * n ↔ p ∣ m ∨ p ∣ n


@[simp]
theorem isEmpty_pi {π : α → Sort*} : IsEmpty (∀ a, π a) ↔ ∃ a, IsEmpty (π a)

IsEmpty ((a : α) → π a) ↔ ∃ a, IsEmpty (π a)


@[simp]
theorem coe_getIso_apply : (H.getIso l i : α) = get l i

(H : List.Sorted (fun x x_1 => x < x_1) l)


theorem AnalyticAt.eventually_analyticAt {f : E → F} {x : E} (h : AnalyticAt 𝕜 f x) :
    ∀ᶠ y in 𝓝 x, AnalyticAt 𝕜 f y

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{x : E}
(h : AnalyticAt 𝕜 f x)


lemma hom_stalk_ext {X Y : SheafedSpace C} (f g : X ⟶ Y) (h : f.base = g.base)
    (h' : ∀ x, f.stalkMap x = (Y.presheaf.stalkCongr (h ▸ rfl)).hom ≫ g.stalkMap x) :
    f = g

{X Y : AlgebraicGeometry.SheafedSpace C}

(h' :
  ∀ (x : ↑↑X.toPresheafedSpace),
    AlgebraicGeometry.PresheafedSpace.Hom.stalkMap f x =
      (Y.presheaf.stalkCongr ⋯).hom ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap g x)


theorem tr_eval (l : List Γ) : TM0.eval (tr M) l = TM1.eval M l

{Γ : Type u_1}
[Inhabited Γ]
{Λ : Type u_2}
[Inhabited Λ]
{σ : Type u_3}
[Inhabited σ]
(M : Λ → Turing.TM1.Stmt Γ Λ σ)
(l : List Γ)

Turing.TM0.eval (Turing.TM1to0.tr M) l = Turing.TM1.eval M l


@[deprecated (since := "2024-04-14")]
theorem coe_add : ⇑(B + D) = B + D

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(B D : LinearMap.BilinForm R M)


/-- The isomorphism from the explicit pullback to the abstract pullback. -/
@[simps]
noncomputable
def pullbackIsoPullback : Stonean.pullback f hi ≅
    @Limits.pullback _ _ _ _ _ f i (HasPullbackOpenEmbedding f hi)

{X Y Z : Stonean}
(f : X ⟶ Z)
{i : Y ⟶ Z}
(hi : OpenEmbedding ⇑i)

(Stonean.pullbackIsoPullback f hi).inv =
  Stonean.pullback.lift f hi (CategoryTheory.Limits.pullback.fst f i) (CategoryTheory.Limits.pullback.snd f i) ⋯


@[simp 1100]
theorem singleton_unop_op (x : αᵒᵖ) : ({unop x} : Set α).op = {x}


lemma IsLimit.hom_ext (hK : IsLimit K) {T : C} {f g : T ⟶ K.pt}
    (h : ∀ a, f ≫ K.ι a = g ≫ K.ι a) : f = g

{I : CategoryTheory.Limits.MulticospanIndex C}

(h : ∀ (a : I.L), CategoryTheory.CategoryStruct.comp f (K.ι a) = CategoryTheory.CategoryStruct.comp g (K.ι a))


@[to_additive (attr := simp)]
theorem inv_symm : (Equiv.inv G).symm = Equiv.inv G


/-- Any set is contained in the complement of the δ-thickening of the complement of its
δ-thickening. -/
lemma subset_compl_thickening_compl_thickening_self (δ : ℝ) (E : Set α) :
    E ⊆ (thickening δ (thickening δ E)ᶜ)ᶜ

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

E ⊆ (Metric.thickening δ (Metric.thickening δ E)ᶜ)ᶜ


@[simp]
theorem Fintype.univ_Prop : (Finset.univ : Finset Prop) = {True, False}


@[to_additive (attr := simp)]
lemma Units.pow_ofPowEqOne (ha : a ^ n = 1) (hn : n ≠ 0) :
    Units.ofPowEqOne _ n ha hn ^ n = 1

{M : Type u_1}
[AddMonoid M]
{n : ℕ}
{a : M}
(ha : n • a = 0)
(hn : n ≠ 0)

n • AddUnits.ofNSMulEqZero a n ha hn = 0


theorem card_Ioc_eq_card_Icc_sub_one (a b : α) : card (Ioc a b) = card (Icc a b) - 1

{α : Type u_1}
[PartialOrder α]
[LocallyFiniteOrder α]
(a b : α)

Multiset.card (Multiset.Ioc a b) = Multiset.card (Multiset.Icc a b) - 1


lemma toAddCircle_intCast (j : ℤ) :
    toAddCircle (j : ZMod N) = ↑(j / N : ℝ)


@[to_additive]
theorem hasProd_nat_add_iff {f : ℕ → G} (k : ℕ) :
    HasProd (fun n ↦ f (n + k)) g ↔ HasProd f (g * ∏ i ∈ range k, f i)

{G : Type u_2}
[AddCommGroup G]
{g : G}
[TopologicalSpace G]
[TopologicalAddGroup G]
{f : ℕ → G}
(k : ℕ)

HasSum (fun n => f (n + k)) g ↔ HasSum f (g + ∑ i ∈ Finset.range k, f i)


theorem same_sub_div {a b : K} (h : b ≠ 0) : (b - a) / b = 1 - a / b

{K : Type u_3}
[DivisionRing K]
{a b : K}
(h : b ≠ 0)


@[simp]
theorem neg_hom {X Y : Action V G} (f : X ⟶ Y) : (-f).hom = -f.hom

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.Preadditive V]
{X Y : Action V G}
(f : X ⟶ Y)


theorem rotate_eq_drop_append_take {l : List α} {n : ℕ} :
    n ≤ l.length → l.rotate n = l.drop n ++ l.take n

n ≤ l.length → l.rotate n = List.drop n l ++ List.take n l


theorem squarefree_and_prime_pow_iff_prime {n : ℕ} : Squarefree n ∧ IsPrimePow n ↔ Prime n

Squarefree n ∧ IsPrimePow n ↔ Nat.Prime n


@[simp] lemma reflGen_transGen : ReflGen (TransGen r) = ReflTransGen r

Relation.ReflGen (Relation.TransGen r) = Relation.ReflTransGen r


lemma closedEmbedding_cfcₙAux : ClosedEmbedding (cfcₙAux hp₁ a ha)

{𝕜 : Type u_1}
{A : Type u_2}
[RCLike 𝕜]
[NonUnitalNormedRing A]
[StarRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[StarModule 𝕜 A]
{p : A → Prop}
{p₁ : Unitization 𝕜 A → Prop}
(hp₁ : ∀ {x : A}, p₁ ↑x ↔ p x)
(a : A)
(ha : p a)
[ContinuousFunctionalCalculus 𝕜 p₁]


theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π)

x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (Real.log x * y) * Real.cos (y * π)


theorem lt_mul_of_lt_of_one_lt_of_pos [PosMulStrictMono α] [MulPosStrictMono α] (bc : b < c)
    (ha : 1 < a) (a0 : 0 < a) (b0 : 0 < b) : b < c * a

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosStrictMono α]
(bc : b < c)
(ha : 1 < a)
(a0 : 0 < a)
(b0 : 0 < b)


@[fun_prop]
theorem differentiableWithinAt_apply (i : ι) (f : ∀ i, F' i) (s' : Set (∀ i, F' i)) :
    DifferentiableWithinAt (𝕜 := 𝕜) (fun f : ∀ i, F' i => f i) s' f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
(i : ι)
(f : (i : ι) → F' i)
(s' : Set ((i : ι) → F' i))

DifferentiableWithinAt 𝕜 (fun f => f i) s' f


/-- **Zorn's lemma**: A partial order is atomic if every nonempty chain `c`, `⊥ ∉ c`, has a lower
bound not equal to `⊥`. -/
theorem IsAtomic.of_isChain_bounded {α : Type*} [PartialOrder α] [OrderBot α]
    (h :
      ∀ c : Set α,
        IsChain (· ≤ ·) c → c.Nonempty → ⊥ ∉ c → ∃ x ≠ ⊥, x ∈ lowerBounds c) :
    IsAtomic α

(h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊥ ∉ c → ∃ x, x ≠ ⊥ ∧ x ∈ lowerBounds c)


lemma birkhoffFinset_injective : Injective (birkhoffFinset (α := α))

{α : Type u_1}
[DistribLattice α]
[Fintype α]
[DecidablePred SupIrred]


theorem isSheaf_sup (K L : Coverage C) (P : Cᵒᵖ ⥤ D) :
    (IsSheaf ((K ⊔ L).toGrothendieck C)) P ↔
    (IsSheaf (K.toGrothendieck C)) P ∧ (IsSheaf (L.toGrothendieck C)) P

{C : Type u_1}
{D : Type u_4}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Category.{u_3, u_4} D]
(K L : CategoryTheory.Coverage C)
(P : CategoryTheory.Functor Cᵒᵖ D)

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.Coverage.toGrothendieck C (K ⊔ L)) P ↔
  CategoryTheory.Presheaf.IsSheaf (CategoryTheory.Coverage.toGrothendieck C K) P ∧
    CategoryTheory.Presheaf.IsSheaf (CategoryTheory.Coverage.toGrothendieck C L) P


theorem sigma_inter_sigma : s₁.sigma t₁ ∩ s₂.sigma t₂ = (s₁ ∩ s₂).sigma fun i ↦ t₁ i ∩ t₂ i

{ι : Type u_1}
{α : ι → Type u_3}
{s₁ s₂ : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}

s₁.sigma t₁ ∩ s₂.sigma t₂ = (s₁ ∩ s₂).sigma fun i => t₁ i ∩ t₂ i


theorem id_sequence (x : t α) : sequence (f := Id) (pure <$> x) = pure x

{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
{α : Type u}
(x : t α)


theorem rightMoves_nim (o : Ordinal) : (nim o).RightMoves = o.out.α

(SetTheory.PGame.nim o).RightMoves = (Quotient.out o).α


@[simp]
theorem subsingleton_iff : Subsingleton (Submodule R M) ↔ Subsingleton M

(R : Type u_1)
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]


theorem forall_mem_single (p : (ι → ℝ) → Box ι → Prop) (hJ : J ≤ I) (h : x ∈ Box.Icc I) :
    (∀ J' ∈ single I J hJ x h, p ((single I J hJ x h).tag J') J') ↔ p x J

(p : (ι → ℝ) → BoxIntegral.Box ι → Prop)

(∀ J' ∈ BoxIntegral.TaggedPrepartition.single I J hJ x h,
    p ((BoxIntegral.TaggedPrepartition.single I J hJ x h).tag J') J') ↔
  p x J


@[simp]
theorem lcm_one_right [NormalizedGCDMonoid α] (a : α) : lcm a 1 = normalize a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(a : α)


/-- Promote a finite products preserving functor to a monoidal functor between
categories equipped with the monoidal category structure given by finite products. -/
@[simps]
def Functor.toMonoidalFunctorOfHasFiniteProducts : MonoidalFunctor C D

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Functor.empty C) F]

[CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]

F.toMonoidalFunctorOfHasFiniteProducts.μ X Y = (CategoryTheory.asIso (CategoryTheory.Limits.prodComparison F X Y)).inv


theorem eq_one_of_mul_eq_one_left {a b : Int} (H : 0 ≤ b) (H' : a * b = 1) : b = 1


theorem Trivialization.smooth_iff {f : M → TotalSpace F E} (he : ∀ x, f x ∈ e.source) :
    Smooth IM (IB.prod 𝓘(𝕜, F)) f ↔
      Smooth IM IB (fun x => (f x).proj) ∧ Smooth IM 𝓘(𝕜, F) (fun x ↦ (e (f x)).2)

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

Smooth IM (IB.prod 𝓘(𝕜, F)) f ↔ (Smooth IM IB fun x => (f x).proj) ∧ Smooth IM 𝓘(𝕜, F) fun x => (↑e (f x)).2


lemma mem_iff_of_iso [ClosedUnderIsomorphisms P] {X Y : C} (e : X ≅ Y) : P X ↔ P Y


theorem finset_sum_apply' (I : Finset ι) (κ : ι → Kernel α β) (a : α) (s : Set β) :
    (∑ i ∈ I, κ i) a s = ∑ i ∈ I, κ i a s

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(I : Finset ι)
(κ : ι → ProbabilityTheory.Kernel α β)
(a : α)
(s : Set β)

((∑ i ∈ I, κ i) a) s = ∑ i ∈ I, ((κ i) a) s


@[simp]
theorem bot_σ : (@Realizer.bot α).σ = Unit


lemma dist_pi_le_iff' [Nonempty β] {f g : ∀ b, π b} {r : ℝ} :
    dist f g ≤ r ↔ ∀ b, dist (f b) (g b) ≤ r

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
[Nonempty β]
{f g : (b : β) → π b}
{r : ℝ}

dist f g ≤ r ↔ ∀ (b : β), dist (f b) (g b) ≤ r


@[simp]
theorem prod_apply (x) : f.prod g x = (f x, g x)

{R : Type u_3}
{S : Type u_5}
{T : Type u_7}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring T]
(f : R →+* S)
(g : R →+* T)
(x : R)


theorem mk_ball {x : E} {r : ℝ} (hd : DifferentiableOn 𝕜 f (ball x r))
    (hc : ContinuousOn f (closedBall x r)) : DiffContOnCl 𝕜 f (ball x r)

(hd : DifferentiableOn 𝕜 f (Metric.ball x r))

(hc : ContinuousOn f (Metric.closedBall x r))


@[reassoc (attr := simp)]
lemma opShiftFunctorEquivalence_unitIso_hom_naturality (n : ℤ) {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    f ≫ (opShiftFunctorEquivalence C n).unitIso.hom.app Y =
      (opShiftFunctorEquivalence C n).unitIso.hom.app X ≫ (f⟦n⟧').unop⟦n⟧'.op

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]
(n : ℤ)
{X Y : Cᵒᵖ}
(f : X ⟶ Y)

CategoryTheory.CategoryStruct.comp f
    ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).unitIso.hom.app Y) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).unitIso.hom.app X)
    ((CategoryTheory.shiftFunctor C n).map ((CategoryTheory.shiftFunctor Cᵒᵖ n).map f).unop).op


theorem discr_def [Fintype ι] (b : ι → B) : discr A b = (traceMatrix A b).det

(A : Type u)
{B : Type v}
{ι : Type w}
[DecidableEq ι]
[CommRing A]
[CommRing B]
[Algebra A B]
[Fintype ι]
(b : ι → B)

Algebra.discr A b = (Algebra.traceMatrix A b).det


@[simp]
lemma map_comp (g : M' →ₗ[R] M'') (f : M →ₗ[R] M') :
    map r (g ∘ₗ f) = map r g ∘ₗ map r f

{R : Type u_2}
[CommRing R]
(r : R)
{M : Type u_1}
{M' : Type u_3}
{M'' : Type u_4}
[AddCommGroup M]
[Module R M]
[AddCommGroup M']
[Module R M']
[AddCommGroup M'']
[Module R M'']
(g : M' →ₗ[R] M'')
(f : M →ₗ[R] M')

(QuotSMulTop.map r) (g ∘ₗ f) = (QuotSMulTop.map r) g ∘ₗ (QuotSMulTop.map r) f


@[to_additive]
theorem singleton_one : ({1} : Set α) = 1


theorem GradedAlgebra.proj_recompose (a : ⨁ i, 𝒜 i) (i : ι) :
    GradedAlgebra.proj 𝒜 i ((decompose 𝒜).symm a) = (decompose 𝒜).symm (of _ i (a i))

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
[Semiring A]
[Algebra R A]
(𝒜 : ι → Submodule R A)
[GradedAlgebra 𝒜]
(a : ⨁ (i : ι), ↥(𝒜 i))
(i : ι)

(GradedAlgebra.proj 𝒜 i) ((DirectSum.decompose 𝒜).symm a) =
  (DirectSum.decompose 𝒜).symm ((DirectSum.of (fun i => ↥(𝒜 i)) i) (a i))


/-- Any function in `ℒp` can be approximated by bounded continuous functions when `p < ∞`,
version in terms of `eLpNorm`. -/
theorem Memℒp.exists_boundedContinuous_eLpNorm_sub_le [μ.WeaklyRegular] (hp : p ≠ ∞) {f : α → E}
    (hf : Memℒp f p μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ g : α →ᵇ E, eLpNorm (f - (g : α → E)) p μ ≤ ε ∧ Memℒp g p μ

{α : Type u_1}
[TopologicalSpace α]
[NormalSpace α]
[MeasurableSpace α]
[BorelSpace α]
{E : Type u_2}
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
{p : ℝ≥0∞}
[NormedSpace ℝ E]
[μ.WeaklyRegular]
(hp : p ≠ ⊤)
{f : α → E}
(hf : MeasureTheory.Memℒp f p μ)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ g, MeasureTheory.eLpNorm (f - ⇑g) p μ ≤ ε ∧ MeasureTheory.Memℒp (⇑g) p μ


@[simp]
theorem eqToHom_right (X Y : Comma L R) (H : X = Y) :
    CommaMorphism.right (eqToHom H) = eqToHom (by cases H; rfl)

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(L : CategoryTheory.Functor A T)
(R : CategoryTheory.Functor B T)
(X Y : CategoryTheory.Comma L R)
(H : X = Y)

(CategoryTheory.eqToHom H).right = CategoryTheory.eqToHom ⋯


protected theorem IsPrefix.map (h : l₁ <+: l₂) (f : α → β) : l₁.map f <+: l₂.map f

{α : Type u_1}
{β : Type u_2}
{l₁ l₂ : List α}
(h : l₁ <+: l₂)
(f : α → β)


theorem liftRel_rec {R : α → β → Prop} (C : Computation α → Computation β → Prop)
    (H : ∀ {ca cb}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)) (ca cb) (Hc : C ca cb) :
    LiftRel R ca cb

(H : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → Computation.LiftRelAux R C ca.destruct cb.destruct)


/-- If `μ` is a regular content, then the measure induced by `μ` will agree with `μ`
  on compact sets. -/
theorem measure_eq_content_of_regular (H : MeasureTheory.Content.ContentRegular μ)
    (K : TopologicalSpace.Compacts G) : μ.measure ↑K = μ K

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
[MeasurableSpace G]
[R1Space G]
[BorelSpace G]
(H : μ.ContentRegular)
(K : TopologicalSpace.Compacts G)

μ.measure ↑K = (fun s => ↑(μ.toFun s)) K


lemma List.range_zero' {n : ℕ} (pn : NormNum.IsNat n 0) :
    List.range n = []

{n : ℕ}
(pn : Mathlib.Meta.NormNum.IsNat n 0)


/-- The equivalence `(β →* γ) ≃ (α →* γ)` obtained by precomposition with
a multiplicative equivalence `e : α ≃* β`. -/
@[simps]
def precompEquiv {α β : Type*} [Monoid α] [Monoid β] (e : α ≃* β) (γ : Type*) [Monoid γ] :
    (β →* γ) ≃ (α →* γ)

{α : Type u_1}
{β : Type u_2}
[Monoid α]
[Monoid β]
(e : α ≃* β)
(γ : Type u_3)
[Monoid γ]
(g : α →* γ)

(MonoidHom.precompEquiv e γ).symm g = g.comp ↑e.symm


theorem IsOpen.preimage (hf : Continuous f) {t : Set Y} (h : IsOpen t) :
    IsOpen (f ⁻¹' t)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : Continuous f)
{t : Set Y}
(h : IsOpen t)


theorem Antiperiodic.const_add [AddSemigroup α] [Neg β] (h : Antiperiodic f c) (a : α) :
    Antiperiodic (fun x => f (a + x)) c

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddSemigroup α]
[Neg β]
(h : Function.Antiperiodic f c)
(a : α)

Function.Antiperiodic (fun x => f (a + x)) c


@[deprecated WeaklyLocallyCompactSpace.locallyCompactSpace (since := "2023-09-03")]
theorem locally_compact_of_compact [T2Space X] [CompactSpace X] :
    LocallyCompactSpace X

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
[CompactSpace X]


lemma epi_of_isZero_cokernel' {X Y : C} {f : X ⟶ Y} (c : CokernelCofork f) (hc : IsColimit c)
    (h : IsZero c.pt) : Epi f

(c : CategoryTheory.Limits.CokernelCofork f)

(hc : CategoryTheory.Limits.IsColimit c)


theorem _root_.ContinuousAt.path_extend {g : Y → ℝ} {l r : Y → X} (γ : ∀ y, Path (l y) (r y))
    {y : Y} (hγ : ContinuousAt (↿γ) (y, projIcc 0 1 zero_le_one (g y))) (hg : ContinuousAt g y) :
    ContinuousAt (fun i => (γ i).extend (g i)) y

(hγ : ContinuousAt (↿γ) (y, Set.projIcc 0 1 ⋯ (g y)))


/-- A subsemiring `S` of `R` determines a subsemiring `S.op` of the opposite ring `Rᵐᵒᵖ`. -/
@[simps]
def opEquiv : Subsemiring R ≃o Subsemiring Rᵐᵒᵖ

{R : Type u_2}
[NonAssocSemiring R]
(S : Subsemiring R)


lemma diffs_subset_right : s₁ ⊆ s₂ → s₁ \\ t ⊆ s₂ \\ t

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


@[simp]
theorem zpow_inj (h₀ : 0 < a) (h₁ : a ≠ 1) : a ^ m = a ^ n ↔ m = n

{α : Type u_1}
[LinearOrderedSemifield α]
{a : α}
{m n : ℤ}
(h₀ : 0 < a)
(h₁ : a ≠ 1)


theorem convex_Ioi (r : β) : Convex 𝕜 (Ioi r)

{𝕜 : Type u_1}
{β : Type u_4}
[OrderedSemiring 𝕜]
[OrderedCancelAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r : β)


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

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


/-- Computing the norm of a difference between two L¹-functions. Note that this is not a
  special case of `ofReal_norm_eq_lintegral` since `(f - g) x` and `f x - g x` are not equal
  (but only a.e.-equal). -/
theorem ofReal_norm_sub_eq_lintegral (f g : α →₁[μ] β) :
    ENNReal.ofReal ‖f - g‖ = ∫⁻ x, (‖f x - g x‖₊ : ℝ≥0∞) ∂μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f g : ↥(MeasureTheory.Lp β 1 μ))

ENNReal.ofReal ‖f - g‖ = ∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ


/-- Typeclass for multiplicative actions by monoids on semirings.

This combines `DistribMulAction` with `MulDistribMulAction`. -/
class MulSemiringAction (M : Type u) (R : Type v) [Monoid M] [Semiring R] extends
  DistribMulAction M R where
  /-- Multipliying `1` by a scalar gives `1` -/
  smul_one : ∀ g : M, (g • (1 : R) : R) = 1
  /-- Scalar multiplication distributes across multiplication -/
  smul_mul : ∀ (g : M) (x y : R), g • (x * y) = g • x * g • y

{M : Type u}
{R : Type v}
[Monoid M]
[Semiring R]
[self : MulSemiringAction M R]
(g : M)
(x y : R)


theorem Ioc_subset_Ioc_right (h : b₁ ≤ b₂) : Ioc a b₁ ⊆ Ioc a b₂

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


/-- An `AffineSubspace k P` is a subset of an `AffineSpace V P` that, if not empty, has an affine
space structure induced by a corresponding subspace of the `Module k V`. -/
structure AffineSubspace (k : Type*) {V : Type*} (P : Type*) [Ring k] [AddCommGroup V]
  [Module k V] [AffineSpace V P] where
  /-- The affine subspace seen as a subset. -/
  carrier : Set P
  smul_vsub_vadd_mem :
    ∀ (c : k) {p1 p2 p3 : P},
      p1 ∈ carrier → p2 ∈ carrier → p3 ∈ carrier → c • (p1 -ᵥ p2 : V) +ᵥ p3 ∈ carrier

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(self : AffineSubspace k P)
(c : k)
{p1 p2 p3 : P}

p1 ∈ self.carrier → p2 ∈ self.carrier → p3 ∈ self.carrier → c • (p1 -ᵥ p2) +ᵥ p3 ∈ self.carrier


@[symm]
theorem symm : PythagoreanTriple y x z

{x y z : ℤ}
(h : PythagoreanTriple x y z)


theorem norm_ne_zero_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S] {x : S} :
    norm R x ≠ 0 ↔ x ≠ 0

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
[IsDomain R]
[IsDomain S]
[Module.Free R S]
[Module.Finite R S]
{x : S}


lemma PosSMulReflectLT.toPosSMulMono [PosSMulReflectLT α β] : PosSMulMono α β

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[Preorder α]
[LinearOrder β]
[Zero α]
[PosSMulReflectLT α β]


theorem Memℒp.smul_of_top_left {p : ℝ≥0∞} {f : α → E} {φ : α → 𝕜} (hf : Memℒp f ∞ μ)
    (hφ : Memℒp φ p μ) : Memℒp (φ • f) p μ

{𝕜 : Type u_1}
{α : Type u_2}
{E : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedRing 𝕜]
[NormedAddCommGroup E]
[MulActionWithZero 𝕜 E]
[BoundedSMul 𝕜 E]
{p : ℝ≥0∞}
{f : α → E}
{φ : α → 𝕜}
(hf : MeasureTheory.Memℒp f ⊤ μ)
(hφ : MeasureTheory.Memℒp φ p μ)


private theorem inv_eq_of_mul (h : a * b = 1) : a⁻¹ = b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}
(h : a * b = 1)


theorem op_inf (S₁ S₂ : Subsemiring R) : (S₁ ⊓ S₂).op = S₁.op ⊓ S₂.op

{R : Type u_2}
[NonAssocSemiring R]
(S₁ S₂ : Subsemiring R)


/-- An additive homomorphism `M →+ N` can equivalently be viewed as an additive homomorphism
`Mᵐᵒᵖ →+ Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps]
def AddMonoidHom.mulOp {M N} [AddZeroClass M] [AddZeroClass N] : (M →+ N) ≃ (Mᵐᵒᵖ →+ Nᵐᵒᵖ)

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

∀ (a : Mᵐᵒᵖ), (AddMonoidHom.mulOp f) a = (MulOpposite.op ∘ ⇑f ∘ MulOpposite.unop) a


/-- The Lusin-Souslin theorem: if `s` is Borel-measurable in a standard Borel space,
then its image under a measurable injective map taking values in a
countably separate measurable space is also Borel-measurable. -/
theorem _root_.MeasurableSet.image_of_measurable_injOn {f : γ → α}
    [MeasurableSpace.CountablySeparated α]
    [MeasurableSpace γ] [StandardBorelSpace γ]
    (hs : MeasurableSet s) (f_meas : Measurable f) (f_inj : InjOn f s) :
    MeasurableSet (f '' s)

{γ : Type u_3}
{α : Type u_4}
[MeasurableSpace α]
{s : Set γ}
{f : γ → α}
[MeasurableSpace.CountablySeparated α]
[MeasurableSpace γ]
[StandardBorelSpace γ]
(hs : MeasurableSet s)
(f_meas : Measurable f)
(f_inj : Set.InjOn f s)


theorem isSheaf_iff_isTerminal_of_indiscrete {X : TopCat.{w}} (hind : X.str = ⊤)
    (F : Presheaf C X) : F.IsSheaf ↔ Nonempty (IsTerminal <| F.obj <| op ⊥)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : TopCat}
(hind : X.str = ⊤)
(F : TopCat.Presheaf C X)

F.IsSheaf ↔ Nonempty (CategoryTheory.Limits.IsTerminal (F.obj (Opposite.op ⊥)))


@[simp]
theorem eval_geom_sum {R} [CommSemiring R] {n : ℕ} {x : R} :
    eval x (∑ i ∈ range n, X ^ i) = ∑ i ∈ range n, x ^ i

{R : Type u_1}
[CommSemiring R]
{n : ℕ}
{x : R}

Polynomial.eval x (∑ i ∈ Finset.range n, Polynomial.X ^ i) = ∑ i ∈ Finset.range n, x ^ i


/-- Every split epi `f` with a kernel induces a binary bicone with `f` as its `snd` and
the kernel map as its `inl`.
We will show in `binary_bicone_of_is_split_mono_of_cokernel` that this binary bicone is in fact
already a biproduct. -/
@[simps]
def binaryBiconeOfIsSplitEpiOfKernel {X Y : C} {f : X ⟶ Y} [IsSplitEpi f] {c : KernelFork f}
    (i : IsLimit c) : BinaryBicone c.pt Y

{c : CategoryTheory.Limits.KernelFork f}

(CategoryTheory.Limits.binaryBiconeOfIsSplitEpiOfKernel i).fst =
  let c' := CategoryTheory.Limits.KernelFork.ofι (CategoryTheory.Limits.Fork.ι c) ⋯;
  let i' := CategoryTheory.Limits.isKernelCompMono i (CategoryTheory.section_ f) ⋯;
  let i'' := CategoryTheory.Preadditive.isLimitForkOfKernelFork i';
  (CategoryTheory.Limits.splitMonoOfIdempotentOfIsLimitFork C ⋯ i'').retraction


theorem coprime_of_coprime (hc : Int.gcd x y = 1) : Int.gcd y z = 1

{x y z : ℤ}
(h : PythagoreanTriple x y z)
(hc : x.gcd y = 1)


theorem volume_pi_closedBall [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
    [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 ≤ r) :
    volume (Metric.closedBall x r) = ∏ i, volume (Metric.closedBall (x i) r)

[(i : ι) → MeasureTheory.MeasureSpace (α i)]

[∀ (i : ι), MeasureTheory.SigmaFinite MeasureTheory.volume]

MeasureTheory.volume (Metric.closedBall x r) = ∏ i : ι, MeasureTheory.volume (Metric.closedBall (x i) r)


@[simp]
theorem evalAt_coe : Derivation.evalAt g ↑X = evalAt g X

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[Monoid G]
[SmoothMul I G]
(g : G)
(X : LeftInvariantDerivation I G)

(Derivation.evalAt g) ↑X = (LeftInvariantDerivation.evalAt g) X


/-- Product of `f x` as `x` ranges over the elements of the multiplicative support of `f`, if it's
finite. One otherwise. -/
@[to_additive existing]
noncomputable irreducible_def finprod (lemma := finprod_def') (f : α → M) : M

{M : Type u_7}
{α : Sort u_8}
[CommMonoid M]
(f : α → M)

finprod f = if h : (Function.mulSupport (f ∘ PLift.down)).Finite then ∏ i ∈ h.toFinset, f i.down else 1


/-- `Matrix.transpose` as a `LinearMap` -/
@[simps apply]
def transposeLinearEquiv [Semiring R] [AddCommMonoid α] [Module R α] :
    Matrix m n α ≃ₗ[R] Matrix n m α

(m : Type u_2)
(n : Type u_3)
(R : Type u_7)
(α : Type v)
[Semiring R]
[AddCommMonoid α]
[Module R α]

∀ (a : Matrix m n α), (Matrix.transposeLinearEquiv m n R α) a = (Matrix.transposeAddEquiv m n α).toFun a


/-- Auxiliary definition: the limit category. -/
@[simps]
def limitConeX (F : J ⥤ Cat.{v, v}) : Cat.{v, v}

(F : CategoryTheory.Functor J CategoryTheory.Cat)

↑(CategoryTheory.Cat.HasLimits.limitConeX F) = CategoryTheory.Limits.limit (F.comp CategoryTheory.Cat.objects)


theorem pullback_topology {X Y Z : TopCat.{u}} (f : X ⟶ Z) (g : Y ⟶ Z) :
    (pullback f g).str =
      induced (pullback.fst f g) X.str ⊓
        induced (pullback.snd f g) Y.str

{X Y Z : TopCat}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.pullback f g).str =
  TopologicalSpace.induced (⇑(CategoryTheory.Limits.pullback.fst f g)) X.str ⊓
    TopologicalSpace.induced (⇑(CategoryTheory.Limits.pullback.snd f g)) Y.str


@[simp, norm_cast]
theorem coeComplex_coe (r : ℝ) : ((r : ℂ) : ℍ) = r


theorem le_max_triv_iff_bracket_eq_bot {N : LieSubmodule R L M} :
    N ≤ maxTrivSubmodule R L M ↔ ⁅(⊤ : LieIdeal R L), N⁆ = ⊥

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{N : LieSubmodule R L M}

N ≤ LieModule.maxTrivSubmodule R L M ↔ ⁅⊤, N⁆ = ⊥


theorem List.trop_minimum [LinearOrder R] (l : List R) :
    trop l.minimum = List.sum (l.map (trop ∘ WithTop.some))

{R : Type u_1}
[LinearOrder R]
(l : List R)

Tropical.trop l.minimum = (List.map (Tropical.trop ∘ WithTop.some) l).sum


@[simp] theorem take_replicate (a : α) : ∀ n m : Nat, take n (replicate m a) = replicate (min n m) a

List.take n (List.replicate m a) = List.replicate (min n m) a


protected theorem Set.pairwiseDisjoint_nhds [T2Space X] (s : Set X) : s.PairwiseDisjoint 𝓝

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
(s : Set X)


@[simp]
theorem PreservesLimitPair.iso_inv_fst :
    (PreservesLimitPair.iso G X Y).inv ≫ G.map prod.fst = prod.fst

[CategoryTheory.Limits.HasBinaryProduct (G.obj X) (G.obj Y)]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.pair X Y) G]

(CategoryTheory.Limits.PreservesLimitPair.iso G X Y).inv ≫ G.map CategoryTheory.Limits.prod.fst =
  CategoryTheory.Limits.prod.fst


/-- `k • circulant v` is another circulant matrix `circulant (k • v)`. -/
theorem circulant_smul [Sub n] [SMul R α] (k : R) (v : n → α) :
    circulant (k • v) = k • circulant v

{α : Type u_1}
{n : Type u_4}
{R : Type u_5}
[Sub n]
[SMul R α]
(k : R)
(v : n → α)

Matrix.circulant (k • v) = k • Matrix.circulant v


@[reassoc]
lemma mapCyclesIso_inv_naturality [S₁.HasLeftHomology] [S₂.HasLeftHomology]
    [F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂] :
    F.map (cyclesMap φ) ≫ (S₂.mapCyclesIso F).inv =
      (S₁.mapCyclesIso F).inv ≫ cyclesMap (F.mapShortComplex.map φ)

CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.ShortComplex.cyclesMap φ)) (S₂.mapCyclesIso F).inv =
  CategoryTheory.CategoryStruct.comp (S₁.mapCyclesIso F).inv
    (CategoryTheory.ShortComplex.cyclesMap (F.mapShortComplex.map φ))


@[simp]
theorem equivLT_top (f : r ≃r s) (g : s ≺i t) : (equivLT f g).top = g.top

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
(f : r ≃r s)
(g : s ≺i t)


/-- The abscissa of absolute convergence of the point-wise product of a power of `log` and `f`
is the same as that of `f`. -/
@[simp]
lemma LSeries.absicssaOfAbsConv_logPowMul {f : ℕ → ℂ} {m : ℕ} :
    abscissaOfAbsConv (logMul^[m] f) = abscissaOfAbsConv f

LSeries.abscissaOfAbsConv (LSeries.logMul^[m] f) = LSeries.abscissaOfAbsConv f


theorem isCompactOperator_iff_isCompact_closure_image_closedBall [ContinuousConstSMul 𝕜₂ M₂]
    [T2Space M₂] (f : M₁ →ₛₗ[σ₁₂] M₂) {r : ℝ} (hr : 0 < r) :
    IsCompactOperator f ↔ IsCompact (closure <| f '' Metric.closedBall 0 r)

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[SeminormedAddCommGroup M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[NormedSpace 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
[T2Space M₂]
(f : M₁ →ₛₗ[σ₁₂] M₂)
{r : ℝ}
(hr : 0 < r)

IsCompactOperator ⇑f ↔ IsCompact (closure (⇑f '' Metric.closedBall 0 r))


theorem indep_limsup_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) (hf : ∀ t, p t → tᶜ ∈ f)
    (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a)) (hns_univ : ∀ n, ∃ a, n ∈ ns a) :
    Indep (limsup s f) (limsup s f) μ

(h_indep : ProbabilityTheory.iIndep s μ)

(hns : Directed (fun x x_1 => x ≤ x_1) ns)

ProbabilityTheory.Indep (Filter.limsup s f) (Filter.limsup s f) μ


lemma lt_def : f < g ↔ f ≤ g ∧ ∃ i, f i < g i

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


/-- Two multivariate polynomials over an infinite integral domain are equal
if they are equal upon evaluating them on an arbitrary assignment of the variables. -/
theorem funext {σ : Type*} {p q : MvPolynomial σ R} (h : ∀ x : σ → R, eval x p = eval x q) :
    p = q

(h : ∀ (x : σ → R), (MvPolynomial.eval x) p = (MvPolynomial.eval x) q)


/-- A `FiniteRk` matroid is one whose bases are finite -/
class FiniteRk (M : Matroid α) : Prop where
  /-- There is a finite base -/
  exists_finite_base : ∃ B, M.Base B ∧ B.Finite

{α : Type u_1}
{M : Matroid α}
[self : M.FiniteRk]


@[simp, norm_cast]
theorem coe_inl [Module R₁ M₂] : (inl R₁ M₁ M₂ : M₁ →ₗ[R₁] M₁ × M₂) = LinearMap.inl R₁ M₁ M₂

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

↑(ContinuousLinearMap.inl R₁ M₁ M₂) = LinearMap.inl R₁ M₁ M₂


theorem pullbackFst_eq_pullback_snd (F : WalkingParallelPair ⥤ C) :
    pullbackFst F = pullback.snd _ _

(F : CategoryTheory.Limits.WalkingParallelPair ⥤ C)

CategoryTheory.Limits.HasEqualizersOfHasPullbacksAndBinaryProducts.pullbackFst F =
  CategoryTheory.Limits.pullback.snd
    (CategoryTheory.Limits.prod.lift (𝟙 (F.obj CategoryTheory.Limits.WalkingParallelPair.zero))
      (F.map CategoryTheory.Limits.WalkingParallelPairHom.left))
    (CategoryTheory.Limits.prod.lift (𝟙 (F.obj CategoryTheory.Limits.WalkingParallelPair.zero))
      (F.map CategoryTheory.Limits.WalkingParallelPairHom.right))


lemma isBoundedUnder_sum {κ : Type*} [AddCommMonoid R] {r : R → R → Prop}
    (hr : ∀ (v₁ v₂ : α → R), f.IsBoundedUnder r v₁ → f.IsBoundedUnder r v₂
      → f.IsBoundedUnder r (v₁ + v₂)) (hr₀ : r 0 0)
    {u : κ → α → R} (s : Finset κ) (h : ∀ k ∈ s, f.IsBoundedUnder r (u k)) :
    f.IsBoundedUnder r (∑ k ∈ s, u k)

(hr :
  ∀ (v₁ v₂ : α → R), Filter.IsBoundedUnder r f v₁ → Filter.IsBoundedUnder r f v₂ → Filter.IsBoundedUnder r f (v₁ + v₂))

(h : ∀ k ∈ s, Filter.IsBoundedUnder r f (u k))

Filter.IsBoundedUnder r f (∑ k ∈ s, u k)


/-- `F ⊣ G` represents the data of an adjunction between two functors
`F : C ⥤ D` and `G : D ⥤ C`. `F` is the left adjoint and `G` is the right adjoint.

To construct an `adjunction` between two functors, it's often easier to instead use the
constructors `mkOfHomEquiv` or `mkOfUnitCounit`. To construct a left adjoint,
there are also constructors `leftAdjointOfEquiv` and `adjunctionOfEquivLeft` (as
well as their duals) which can be simpler in practice.

Uniqueness of adjoints is shown in `CategoryTheory.Adjunction.Opposites`.

See <https://stacks.math.columbia.edu/tag/0037>.
-/
structure Adjunction (F : C ⥤ D) (G : D ⥤ C) where
  /-- The equivalence between `Hom (F X) Y` and `Hom X (G Y)` coming from an adjunction -/
  homEquiv : ∀ X Y, (F.obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
  /-- The unit of an adjunction -/
  unit : 𝟭 C ⟶ F.comp G
  /-- The counit of an adjunction -/
  counit : G.comp F ⟶ 𝟭 D
  -- Porting note: It's strange that this `Prop` is being flagged by the `docBlame` linter
  /-- Naturality of the unit of an adjunction -/
  homEquiv_unit : ∀ {X Y f}, (homEquiv X Y) f = (unit : _ ⟶ _).app X ≫ G.map f := by aesop_cat
  -- Porting note: It's strange that this `Prop` is being flagged by the `docBlame` linter
  /-- Naturality of the counit of an adjunction -/
  homEquiv_counit : ∀ {X Y g}, (homEquiv X Y).symm g = F.map g ≫ counit.app Y := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(self : F ⊣ G)
{X : C}
{Y : D}
{f : F.obj X ⟶ Y}

(self.homEquiv X Y) f = CategoryTheory.CategoryStruct.comp (self.unit.app X) (G.map f)


/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β


/-- If `𝕜` is a nontrivially normed field, any T2 topology on `𝕜` which makes it a topological
vector space over itself (with the norm topology) is *equal* to the norm topology. -/
theorem unique_topology_of_t2 {t : TopologicalSpace 𝕜} (h₁ : @TopologicalAddGroup 𝕜 t _)
    (h₂ : @ContinuousSMul 𝕜 𝕜 _ hnorm.toUniformSpace.toTopologicalSpace t) (h₃ : @T2Space 𝕜 t) :
    t = hnorm.toUniformSpace.toTopologicalSpace

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{t : TopologicalSpace 𝕜}
(h₁ : TopologicalAddGroup 𝕜)
(h₂ : ContinuousSMul 𝕜 𝕜)
(h₃ : T2Space 𝕜)


theorem lift'_nhds_closure (x : X) : (𝓝 x).lift' closure = 𝓝 x

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
(x : X)


theorem deg_pos [Nontrivial S] (h : IsAdjoinRootMonic S f) : 0 < natDegree f

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


/-- Embedding `Type` into `Cat` as discrete categories.

This ought to be modelled as a 2-functor!
-/
@[simps]
def typeToCat : Type u ⥤ Cat

CategoryTheory.typeToCat.obj X = CategoryTheory.Cat.of (CategoryTheory.Discrete X)


theorem range_piecewise (f g : α → β) : range (s.piecewise f g) = f '' s ∪ g '' sᶜ

{α : Type u_1}
{β : Type u_2}
(s : Set α)
[(j : α) → Decidable (j ∈ s)]
(f g : α → β)

Set.range (s.piecewise f g) = f '' s ∪ g '' sᶜ


protected theorem lt_of_le_of_ne : ∀ {x y : Bool}, x ≤ y → x ≠ y → x < y


lemma coeFn_def (μ : ProbabilityMeasure Ω) : μ = fun s ↦ ((μ : Measure Ω) s).toNNReal

(μ : MeasureTheory.ProbabilityMeasure Ω)


@[simp]
theorem coe_toBddDistLat (X : BoolAlg) : ↥X.toBddDistLat = ↥X


@[simp]
theorem limit.coneMorphism_hom {F : J ⥤ C} [HasLimit F] (c : Cone F) :
    (limit.coneMorphism c).hom = limit.lift F c

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.limit.coneMorphism c).hom = CategoryTheory.Limits.limit.lift F c


theorem inner_self_ne_zero {x : F} : ⟪x, x⟫ ≠ 0 ↔ x ≠ 0

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
{x : F}


/-- Given two bifunctors `F₁₂ : C₁ ⥤ C₂ ⥤ C₁₂` and `G : C₁₂ ⥤ C₃ ⥤ C₄`, this is
the trifunctor `C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄` obtained by composition. -/
@[simps]
def bifunctorComp₁₂ : C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄

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

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

(CategoryTheory.bifunctorComp₁₂ F₁₂ G).obj X₁ = CategoryTheory.bifunctorComp₁₂Obj F₁₂ G X₁


/-- **AM-GM inequality**: The geometric mean is less than or equal to the arithmetic mean, weighted
version for real-valued nonnegative functions. -/
theorem geom_mean_le_arith_mean_weighted (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) :
    ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1)
(hz : ∀ i ∈ s, 0 ≤ z i)


lemma traceForm_lieInvariant : (traceForm R L M).lieInvariant L

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]

LinearMap.BilinForm.lieInvariant L (LieModule.traceForm R L M)


lemma finite_image2 (hfs : ∀ b ∈ t, InjOn (f · b) s) (hft : ∀ a ∈ s, InjOn (f a) t) :
    (image2 f s t).Finite ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅

{f : α → β → γ}

(hfs : ∀ b ∈ t, Set.InjOn (fun x => f x b) s)

(Set.image2 f s t).Finite ↔ s.Finite ∧ t.Finite ∨ s = ∅ ∨ t = ∅


/-- This is a slightly more convenient method to verify that a fork is a limit cone. It
    only asks for a proof of facts that carry any mathematical content -/
@[simps]
def Fork.IsLimit.mk (t : Fork f g) (lift : ∀ s : Fork f g, s.pt ⟶ t.pt)
    (fac : ∀ s : Fork f g, lift s ≫ Fork.ι t = Fork.ι s)
    (uniq : ∀ (s : Fork f g) (m : s.pt ⟶ t.pt) (_ : m ≫ t.ι = s.ι), m = lift s) : IsLimit t

(lift : (s : CategoryTheory.Limits.Fork f g) → s.pt ⟶ t.pt)

(fac : ∀ (s : CategoryTheory.Limits.Fork f g), CategoryTheory.CategoryStruct.comp (lift s) t.ι = s.ι)

(uniq :
  ∀ (s : CategoryTheory.Limits.Fork f g) (m : s.pt ⟶ t.pt), CategoryTheory.CategoryStruct.comp m t.ι = s.ι → m = lift s)

(CategoryTheory.Limits.Fork.IsLimit.mk t lift fac uniq).lift s = lift s


theorem add_apply (f g : E →ₗ.[R] F) (x : (f.domain ⊓ g.domain : Submodule R E)) :
    (f + g) x = f ⟨x, x.prop.1⟩ + g ⟨x, x.prop.2⟩

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


theorem pointwise_smul_def {a : M} (S : Subring R) :
    a • S = S.map (MulSemiringAction.toRingHom _ _ a)

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[Ring R]
[MulSemiringAction M R]
{a : M}
(S : Subring R)

a • S = Subring.map (MulSemiringAction.toRingHom M R a) S


theorem log_of_pos (hx : 0 < x) : log x = expOrderIso.symm ⟨x, hx⟩

Real.log x = Real.expOrderIso.symm ⟨x, hx⟩


theorem map_nhdsWithin_eq {x} (hx : x ∈ e.source) (s : Set X) :
    map e (𝓝[s] x) = 𝓝[e '' (e.source ∩ s)] e x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(hx : x ∈ e.source)
(s : Set X)

Filter.map (↑e) (𝓝[s] x) = 𝓝[↑e '' (e.source ∩ s)] ↑e x


@[simp]
protected theorem add_iff_right :
    a₂ ≡ b₂ [PMOD p] → (a₁ + a₂ ≡ b₁ + b₂ [PMOD p] ↔ a₁ ≡ b₁ [PMOD p])

{α : Type u_1}
[AddCommGroup α]
{p a₁ a₂ b₁ b₂ : α}


/-- The counit for the adjunction for `Cones.functoriality K G : Cone K ⥤ Cone (K ⋙ G)`.

Auxiliary definition for `functorialityIsRightAdjoint`.
-/
@[simps]
def functorialityCounit' :
    Cones.functoriality _ G ⋙ functorialityLeftAdjoint adj K ⟶ 𝟭 (Cone K)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : F ⊣ G)
{J : Type u}
[CategoryTheory.Category.{v, u} J]
(K : CategoryTheory.Functor J D)
(c : CategoryTheory.Limits.Cone K)

((adj.functorialityCounit' K).app c).hom = adj.counit.app c.pt


/-- All convergents of `0` are zero. -/
@[simp]
theorem convergent_of_zero (n : ℕ) : convergent 0 n = 0


@[to_additive (attr := simp)]
theorem inv_eq_empty : s⁻¹ = ∅ ↔ s = ∅

{α : Type u_2}
[InvolutiveNeg α]
{s : Set α}


theorem map_disjiUnion {f : α ↪ β} {s : Finset α} {t : β → Finset γ} {h} :
    (s.map f).disjiUnion t h =
      s.disjiUnion (fun a => t (f a)) fun _ ha _ hb hab =>
        h (mem_map_of_mem _ ha) (mem_map_of_mem _ hb) (f.injective.ne hab)

{h : (↑(Finset.map f s)).PairwiseDisjoint t}

(Finset.map f s).disjiUnion t h = s.disjiUnion (fun a => t (f a)) ⋯


theorem self_mem_cylinder (x : ∀ n, E n) (n : ℕ) : x ∈ cylinder x n

{E : ℕ → Type u_1}
(x : (n : ℕ) → E n)
(n : ℕ)


theorem right_inv : A.str ≫ strInv h = 𝟙 _

{A : CategoryTheory.Endofunctor.Algebra F}

CategoryTheory.CategoryStruct.comp A.str (CategoryTheory.Endofunctor.Algebra.Initial.strInv h) =
  CategoryTheory.CategoryStruct.id (F.obj A.a)


theorem liftOn₂_mk {α : Type*} (f : M × S → M × S → α)
    (wd : ∀ (p q p' q' : M × S), p ≈ p' → q ≈ q' → f p q = f p' q') (m m' : M)
    (s s' : S) : liftOn₂ (mk m s) (mk m' s') f wd = f ⟨m, s⟩ ⟨m', s'⟩

(wd : ∀ (p q p' q' : M × ↥S), p ≈ p' → q ≈ q' → f p q = f p' q')

(LocalizedModule.mk m s).liftOn₂ (LocalizedModule.mk m' s') f wd = f (m, s) (m', s')


theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [Algebra.IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen

{K : Type u_4}
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
(F : Type u_6)
[Field F]
[Algebra L F]
[Algebra K F]
[IsScalarTower K L F]
(E : Type u_7)
[Field E]
[Algebra K E]
[IsAlgClosed E]
[FiniteDimensional K F]
[Algebra.IsSeparable K F]
(pb : PowerBasis K L)

∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = FiniteDimensional.finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen


/-- The equivalence of categories
`(Φ.LeftResolution X₂)ᵒᵖ ≌ Φ.op.RightResolution (Opposite.op X₂)`. -/
@[simps]
def LeftResolution.opEquivalence (X₂ : C₂) [W₁.IsMultiplicative] :
    (Φ.LeftResolution X₂)ᵒᵖ ≌ Φ.op.RightResolution (Opposite.op X₂)

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

(CategoryTheory.LocalizerMorphism.LeftResolution.opEquivalence Φ X₂).inverse =
  (CategoryTheory.LocalizerMorphism.RightResolution.unopFunctor Φ (Opposite.op X₂)).rightOp


theorem Nonempty.of_disjSups_right : (s ○ t).Nonempty → t.Nonempty

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
[OrderBot α]
[DecidableRel Disjoint]
{s t : Finset α}


theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
    (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
    ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1

[TopologicalSpace (Bundle.TotalSpace F E)]

(↑(chartAt (ModelProd HB F) x).symm y).proj = ↑(chartAt HB x.proj).symm y.1


@[simp]
theorem scalar_apply (a : α) : scalar n a = diagonal fun _ => a

{n : Type u_3}
{α : Type v}
[Semiring α]
[DecidableEq n]
[Fintype n]
(a : α)

(Matrix.scalar n) a = Matrix.diagonal fun x => a


theorem moveRight {x : PGame} (o : Numeric x) (j : x.RightMoves) : Numeric (x.moveRight j)

{x : SetTheory.PGame}
(o : x.Numeric)
(j : x.RightMoves)


/-- The Galois connection between fixing submonoids and fixed points of a monoid action -/
theorem fixingSubmonoid_fixedPoints_gc :
    GaloisConnection (OrderDual.toDual ∘ fixingSubmonoid M)
      ((fun P : Submonoid M => fixedPoints P α) ∘ OrderDual.ofDual)

(M : Type u_1)
(α : Type u_2)
[Monoid M]
[MulAction M α]

GaloisConnection (⇑OrderDual.toDual ∘ fixingSubmonoid M) ((fun P => MulAction.fixedPoints (↥P) α) ∘ ⇑OrderDual.ofDual)


/-- The coalgebra structure which will be the point of the new colimit cone for `D`. -/
@[simps]
def coconePoint : Coalgebra T

(D : CategoryTheory.Functor J T.Coalgebra)

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

(CategoryTheory.Comonad.ForgetCreatesColimits'.coconePoint D c t).a =
  t.desc (CategoryTheory.Comonad.ForgetCreatesColimits'.newCocone D c)


/-- For `f : α →ᵤ[𝔖] β`, where `𝔖 : Set (Set α)` is nonempty and directed, `𝓝 f` admits the
family `{g | ∀ x ∈ S, (f x, g x) ∈ V}` for `S ∈ 𝔖` and `V ∈ 𝓑` as a filter basis, for any basis
`𝓑` of `𝓤 β`. -/
protected theorem hasBasis_nhds_of_basis (f : α →ᵤ[𝔖] β) (h : 𝔖.Nonempty)
    (h' : DirectedOn (· ⊆ ·) 𝔖) {p : ι → Prop} {s : ι → Set (β × β)} (hb : HasBasis (𝓤 β) p s) :
    (𝓝 f).HasBasis (fun Si : Set α × ι => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si =>
      { g | (g, f) ∈ UniformOnFun.gen 𝔖 Si.1 (s Si.2) }

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

(𝓝 f).HasBasis (fun Si => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si => {g | (g, f) ∈ UniformOnFun.gen 𝔖 Si.1 (s Si.2)}


theorem biUnion_star_subset_nonuniformWitness :
    (star hP G ε hU V).biUnion id ⊆ G.nonuniformWitness ε U V

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{P : Finpartition Finset.univ}
(hP : P.IsEquipartition)
(G : SimpleGraph α)
[DecidableRel G.Adj]
(ε : ℝ)
{U : Finset α}
(hU : U ∈ P.parts)
(V : Finset α)

(SzemerediRegularity.star hP G ε hU V).biUnion id ⊆ G.nonuniformWitness ε U V


@[simp]
theorem gcd_zero : (0 : Multiset α).gcd = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]


theorem Fintype.card_pempty : Fintype.card PEmpty = 0


@[simp]
theorem univ_pi_empty [h : Nonempty ι] : pi univ (fun _ => ∅ : ∀ i, Set (α i)) = ∅

{ι : Type u_1}
{α : ι → Type u_2}
[h : Nonempty ι]


@[to_additive]
theorem Multipliable.comp_injective {i : γ → β} (hf : Multipliable f) (hi : Injective i) :
    Multipliable (f ∘ i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
{f : β → α}
[CompleteSpace α]
{i : γ → β}
(hf : Multipliable f)
(hi : Function.Injective i)


/-- Given a finite-dimensional space `E` and subspace `K`, the dimensions of `K` and `Kᗮ` add to
that of `E`. -/
theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K : Submodule 𝕜 E) :
    finrank 𝕜 K + finrank 𝕜 Kᗮ = finrank 𝕜 E

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[FiniteDimensional 𝕜 E]
(K : Submodule 𝕜 E)

FiniteDimensional.finrank 𝕜 ↥K + FiniteDimensional.finrank 𝕜 ↥Kᗮ = FiniteDimensional.finrank 𝕜 E


/-- Whiskering by an equivalence gives an equivalence between categories of cones.
-/
@[simps]
def whiskeringEquivalence (e : K ≌ J) : Cocone F ≌ Cocone (e.functor ⋙ F)

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

(CategoryTheory.Limits.Cocones.whiskeringEquivalence e).unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun s =>
      CategoryTheory.Limits.Cocones.ext (CategoryTheory.Iso.refl ((𝟭 (CategoryTheory.Limits.Cocone F)).obj s).pt) ⋯)
    ⋯


@[ext]
protected theorem ext {s t : CompactOpens α} (h : (s : Set α) = t) : s = t

{α : Type u_1}
[TopologicalSpace α]
{s t : TopologicalSpace.CompactOpens α}
(h : ↑s = ↑t)


/-- Multiplication of a matrix by its inverse is commutative.
This is the column and row partitioned matrix form of `Matrix.mul_eq_one_comm`.

The condition `e : n ≃ n₁ ⊕ n₂` states that `fromColumns A₁ A₂` and `fromRows B₁ B₂` are "square".
-/
lemma fromColumns_mul_fromRows_eq_one_comm (e : n ≃ n₁ ⊕ n₂)
    (A₁ : Matrix n n₁ R) (A₂ : Matrix n n₂ R) (B₁ : Matrix n₁ n R) (B₂ : Matrix n₂ n R) :
    fromColumns A₁ A₂ * fromRows B₁ B₂ = 1 ↔ fromRows B₁ B₂ * fromColumns A₁ A₂ = 1

{R : Type u_1}
{n : Type u_5}
{n₁ : Type u_6}
{n₂ : Type u_7}
[Fintype n]
[Fintype n₁]
[Fintype n₂]
[DecidableEq n]
[DecidableEq n₁]
[DecidableEq n₂]
[CommRing R]
(e : n ≃ n₁ ⊕ n₂)
(A₁ : Matrix n n₁ R)
(A₂ : Matrix n n₂ R)
(B₁ : Matrix n₁ n R)
(B₂ : Matrix n₂ n R)

A₁.fromColumns A₂ * B₁.fromRows B₂ = 1 ↔ B₁.fromRows B₂ * A₁.fromColumns A₂ = 1


@[elab_as_elim]
theorem induction_on₃ {C : Finmap β → Finmap β → Finmap β → Prop} (s₁ s₂ s₃ : Finmap β)
    (H : ∀ a₁ a₂ a₃ : AList β, C ⟦a₁⟧ ⟦a₂⟧ ⟦a₃⟧) : C s₁ s₂ s₃

(H : ∀ (a₁ a₂ a₃ : AList β), C ⟦a₁⟧ ⟦a₂⟧ ⟦a₃⟧)


/-- Let `x` be a submonoid of `A`, then `NumDenSameDeg 𝒜 x` is a structure with a numerator and a
denominator with same grading such that the denominator is contained in `x`.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure NumDenSameDeg where
  deg : ι
  (num den : 𝒜 deg)
  den_mem : (den : A) ∈ x

(self : HomogeneousLocalization.NumDenSameDeg 𝒜 x)


theorem opRingEquiv_symm_single [Monoid G] (r : kᵐᵒᵖ) (x : Gᵐᵒᵖ) :
    MonoidAlgebra.opRingEquiv.symm (single x r) = op (single x.unop r.unop)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Monoid G]
(r : kᵐᵒᵖ)
(x : Gᵐᵒᵖ)

MonoidAlgebra.opRingEquiv.symm (MonoidAlgebra.single x r) =
  MulOpposite.op (MonoidAlgebra.single (MulOpposite.unop x) (MulOpposite.unop r))


/-- **Uniqueness of Haar measures**:
Two Haar measures which are probability measures coincide. -/
@[to_additive]
lemma isHaarMeasure_eq_of_isProbabilityMeasure [LocallyCompactSpace G] (μ' μ : Measure G)
    [IsProbabilityMeasure μ] [IsProbabilityMeasure μ'] [IsHaarMeasure μ] [IsHaarMeasure μ'] :
    μ' = μ

{G : Type u_1}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[MeasurableSpace G]
[BorelSpace G]
[LocallyCompactSpace G]
(μ' μ : MeasureTheory.Measure G)
[MeasureTheory.IsProbabilityMeasure μ]
[MeasureTheory.IsProbabilityMeasure μ']
[μ.IsHaarMeasure]
[μ'.IsHaarMeasure]


theorem le_of_not_gt {x y : Int} (h : ¬ (y > x)) : y ≤ x


theorem mem_map_of_involutive {f : α → α} (hf : Involutive f) {a : α} {l : List α} :
    a ∈ map f l ↔ f a ∈ l

{α : Type u}
{f : α → α}
(hf : Function.Involutive f)
{a : α}
{l : List α}


theorem LinearMap.toMatrixAlgEquiv_mul (f g : M₁ →ₗ[R] M₁) :
    LinearMap.toMatrixAlgEquiv v₁ (f * g) =
      LinearMap.toMatrixAlgEquiv v₁ f * LinearMap.toMatrixAlgEquiv v₁ g

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(f g : M₁ →ₗ[R] M₁)

(LinearMap.toMatrixAlgEquiv v₁) (f * g) = (LinearMap.toMatrixAlgEquiv v₁) f * (LinearMap.toMatrixAlgEquiv v₁) g


/-- The space `Bundle.TotalSpace F E` (for `E : B → Type*` such that each `E x` is a topological
vector space) has a topological vector space structure with fiber `F` (denoted with
`VectorBundle R F E`) if around every point there is a fiber bundle trivialization which is linear
in the fibers. -/
class VectorBundle : Prop where
  trivialization_linear' : ∀ (e : Trivialization F (π F E)) [MemTrivializationAtlas e], e.IsLinear R
  continuousOn_coordChange' :
    ∀ (e e' : Trivialization F (π F E)) [MemTrivializationAtlas e] [MemTrivializationAtlas e'],
      ContinuousOn (fun b => Trivialization.coordChangeL R e e' b : B → F →L[R] F)
        (e.baseSet ∩ e'.baseSet)

[TopologicalSpace (Bundle.TotalSpace F E)]

(e e' : Trivialization F Bundle.TotalSpace.proj)

ContinuousOn (fun b => ↑(Trivialization.coordChangeL R e e' b)) (e.baseSet ∩ e'.baseSet)


theorem nhds_toMul (x : Additive X) : 𝓝 (toMul x) = map toMul (𝓝 x)

{X : Type u}
[TopologicalSpace X]
(x : Additive X)

𝓝 (Additive.toMul x) = Filter.map (⇑Additive.toMul) (𝓝 x)


@[simp]
theorem AlgebraicIndependent.aeval_repr (p) : aeval x (hx.repr p) = p

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(p : ↥(Algebra.adjoin R (Set.range x)))


@[simp]
theorem map_sub_nat (x : ℝ) (n : ℕ) : f (x - n) = f x - n


/-- If `F` is initial,
the category of cones on `F ⋙ G` is equivalent to the category of cones on `G`,
for any `G : D ⥤ E`.
-/
@[simps]
def conesEquiv : Cone (F ⋙ G) ≌ Cone G

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

(CategoryTheory.Functor.Initial.conesEquiv F G).unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun c =>
      CategoryTheory.Limits.Cones.ext
        (CategoryTheory.Iso.refl ((CategoryTheory.Functor.id (CategoryTheory.Limits.Cone (F.comp G))).obj c).pt) ⋯)
    ⋯


@[to_additive]
theorem prod_coe_sort_eq_attach (f : s → β) : ∏ i : s, f i = ∏ i ∈ s.attach, f i

{α : Type u_3}
{β : Type u_4}
(s : Finset α)
[AddCommMonoid β]
(f : { x // x ∈ s } → β)

∑ i : { x // x ∈ s }, f i = ∑ i ∈ s.attach, f i


theorem LinearIndependent.injective [Nontrivial R] (hv : LinearIndependent R v) : Injective v

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
(hv : LinearIndependent R v)


@[simp]
lemma starCenterIsoCentroid_apply (a : ↥(NonUnitalStarSubsemiring.center α)) :
    CentroidHom.starCenterIsoCentroid a = CentroidHom.starCenterToCentroid a


theorem update_update (self : Buckets α β) (i d d' h h') :
    (self.update i d h).update i d' h' = self.update i d' h

(self : Batteries.HashMap.Imp.Buckets α β)

(h' : i.toNat < (self.update i d h).val.size)


/-- Embedding of `ℝ≥0` to `ℝ` as a bundled continuous map. -/
@[simps (config := .asFn)]
def _root_.ContinuousMap.coeNNRealReal : C(ℝ≥0, ℝ)


/-- Build an isomorphism in the category `MagmaCat` from a `MulEquiv` between `Mul`s. -/
@[to_additive (attr := simps)
      "Build an isomorphism in the category `AddMagmaCat` from an `AddEquiv` between `Add`s."]
def MulEquiv.toMagmaCatIso (e : X ≃* Y) : MagmaCat.of X ≅ MagmaCat.of Y

{X Y : Type u}
[Mul X]
[Mul Y]
(e : X ≃* Y)

∀ (a : X), e.toMagmaCatIso.hom a = e.toFun a


@[to_additive (attr := simp)]
theorem image_mul_right : (· * b) '' t = (· * b⁻¹) ⁻¹' t

{α : Type u_2}
[Group α]
{t : Set α}
{b : α}

(fun x => x * b) '' t = (fun x => x * b⁻¹) ⁻¹' t


lemma meas_countablePartitionSet_le_of_fst_le (hκν : fst κ ≤ ν) (n : ℕ) (a : α) (x : γ)
    (s : Set β) :
    κ a (countablePartitionSet n x ×ˢ s) ≤ ν a (countablePartitionSet n x)

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

(κ a) (MeasurableSpace.countablePartitionSet n x ×ˢ s) ≤ (ν a) (MeasurableSpace.countablePartitionSet n x)


@[simp]
theorem eval_neg (p : R[X]) (x : R) : (-p).eval x = -p.eval x

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

Polynomial.eval x (-p) = -Polynomial.eval x p


@[ext]
theorem ext {s₁ s₂ : Finset α} : (∀ a, a ∈ s₁ ↔ a ∈ s₂) → s₁ = s₂


theorem norm_le_one (z : ℤ_[p]) : ‖z‖ ≤ 1

{p : ℕ}
[Fact (Nat.Prime p)]
(z : ℤ_[p])


/-- The obvious projection functor from costructured arrows. -/
@[simps!]
def proj (S : C ⥤ D) (T : D) : CostructuredArrow S T ⥤ C

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

∀ {X Y : CategoryTheory.Comma S (CategoryTheory.Functor.fromPUnit T)} (f : X ⟶ Y),
  (CategoryTheory.CostructuredArrow.proj S T).map f = f.left


theorem mulPosStrictMono_iff_mulPosReflectLE : MulPosStrictMono α ↔ MulPosReflectLE α

{α : Type u_1}
[Mul α]
[Zero α]
[LinearOrder α]


theorem iSup_insert_update {x : α} {t : Finset α} (f : α → β) {s : β} (hx : x ∉ t) :
    ⨆ i ∈ insert x t, Function.update f x s i = s ⊔ ⨆ i ∈ t, f i

{α : Type u_2}
{β : Type u_3}
[CompleteLattice β]
[DecidableEq α]
{x : α}
{t : Finset α}
(f : α → β)
{s : β}
(hx : x ∉ t)


@[simp]
lemma equivFreeAlgebra_symm_ι (b : Basis κ R M) (i : κ) :
    (equivFreeAlgebra b).symm (FreeAlgebra.ι R i) = ι R (b i)

{κ : Type uκ}
{R : Type uR}
{M : Type uM}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis κ R M)
(i : κ)

(TensorAlgebra.equivFreeAlgebra b).symm (FreeAlgebra.ι R i) = (TensorAlgebra.ι R) (b i)


lemma strictAntiOn_derivWithin (hfc : StrictConcaveOn ℝ S f) (hfd : DifferentiableOn ℝ f S) :
    StrictAntiOn (derivWithin f S) S

{S : Set ℝ}
{f : ℝ → ℝ}
(hfc : StrictConcaveOn ℝ S f)
(hfd : DifferentiableOn ℝ f S)


theorem toOuterMeasure_apply_le_toMeasure_apply : p.toOuterMeasure s ≤ p.toMeasure s

{α : Type u_1}
[MeasurableSpace α]
(p : PMF α)
(s : Set α)


@[ext 1200]
theorem algHom_ext {f g : R[X] →ₐ[R] B} (hX : f X = g X) :
    f = g

{R : Type u}
{B : Type u_2}
[CommSemiring R]
[Semiring B]
[Algebra R B]
{f g : R[X] →ₐ[R] B}
(hX : f Polynomial.X = g Polynomial.X)


theorem nodup_iff_pairwise {α} {s : Multiset α} : Nodup s ↔ Pairwise (· ≠ ·) s

s.Nodup ↔ Multiset.Pairwise (fun x x_1 => x ≠ x_1) s


theorem summable_of_isEquivalent_nat {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {f : ℕ → E} {g : ℕ → E} (hg : Summable g) (h : f ~[atTop] g) :
    Summable f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{f g : ℕ → E}
(hg : Summable g)
(h : f ~[Filter.atTop] g)


theorem associated_eq_self_apply (x : M) : associatedHom S Q x x = Q x

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[CommSemiring S]
[Algebra S R]
[Module S N]
[IsScalarTower S R N]
[Invertible 2]
(Q : QuadraticMap R M N)
(x : M)

(((QuadraticMap.associatedHom S) Q) x) x = Q x


/-- The following diagram is a pullback
```
X --id--> X
|         |
f         f
v         v
Z --id--> Z
```
-/
lemma id_horiz (f : X ⟶ Z) : IsPushout (𝟙 X) f f (𝟙 Z)

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

CategoryTheory.IsPushout (𝟙 X) f f (𝟙 Z)


@[to_additive]
theorem prod_union [DecidableEq α] (h : Disjoint s₁ s₂) :
    ∏ x ∈ s₁ ∪ s₂, f x = (∏ x ∈ s₁, f x) * ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[CommMonoid β]
[DecidableEq α]
(h : Disjoint s₁ s₂)


/-- `padicValNat p 0` is `0` for any `p`. -/
@[simp]
protected theorem zero : padicValNat p 0 = 0


@[to_additive]
lemma mem_ofUnits (S : Subgroup Mˣ) {x : M} {y : Mˣ} (h₁ : y ∈ S) (h₂ : y = x) : x ∈ S.ofUnits

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
{x : M}
{y : AddUnits M}
(h₁ : y ∈ S)
(h₂ : ↑y = x)


theorem univ : (Finset.univ : Finset α) = {⊤, ⊥}

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


theorem coe_expand : (expand R p : R[X] → R[X]) = eval₂ C (X ^ p)

⇑(Polynomial.expand R p) = Polynomial.eval₂ Polynomial.C (Polynomial.X ^ p)


@[simp]
theorem map_T (f : R →+* S) (n : ℤ) : map f (T R n) = T S n

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
(f : R →+* S)
(n : ℤ)

Polynomial.map f (Polynomial.Chebyshev.T R n) = Polynomial.Chebyshev.T S n


@[to_additive (attr := simps tensorObj_as leftUnitor rightUnitor associator) Discrete.addMonoidal]
instance Discrete.monoidal : MonoidalCategory (Discrete M)

(M : Type u)
[AddMonoid M]
(X Y Z : CategoryTheory.Discrete M)

α_ X Y Z = CategoryTheory.Discrete.eqToIso ⋯


@[simp]
theorem mapAccumr_mapAccumr :
    mapAccumr f₁ (mapAccumr f₂ xs s₂).snd s₁
    = let m := (mapAccumr (fun x s =>
        let r₂ := f₂ x s.snd
        let r₁ := f₁ r₂.snd s.fst
        ((r₁.fst, r₂.fst), r₁.snd)
      ) xs (s₁, s₂))
      (m.fst.fst, m.snd)

{α : Type u_3}
{n : ℕ}
{β : Type u_2}
{σ₁ : Type}
{γ : Type u_1}
{σ₂ : Type}
(xs : Mathlib.Vector α n)
(f₁ : β → σ₁ → σ₁ × γ)
(f₂ : α → σ₂ → σ₂ × β)
{s₂ : σ₂}
{s₁ : σ₁}

Mathlib.Vector.mapAccumr f₁ (Mathlib.Vector.mapAccumr f₂ xs s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr
      (fun x s =>
        let r₂ := f₂ x s.2;
        let r₁ := f₁ r₂.2 s.1;
        ((r₁.1, r₂.1), r₁.2))
      xs (s₁, s₂);
  (m.1.1, m.2)


theorem hasSum_inner (f g : lp G 2) : HasSum (fun i => ⟪f i, g i⟫) ⟪f, g⟫

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
(f g : ↥(lp G 2))

HasSum (fun i => ⟪↑f i, ↑g i⟫_𝕜) ⟪f, g⟫_𝕜


/-- The Riemann-Lebesgue lemma for functions on `ℝ`. -/
theorem Real.tendsto_integral_exp_smul_cocompact (f : ℝ → E) :
    Tendsto (fun w : ℝ => ∫ v : ℝ, 𝐞 (-(v * w)) • f v) (cocompact ℝ) (𝓝 0)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℝ → E)

Filter.Tendsto (fun w => ∫ (v : ℝ), 𝐞 (-(v * w)) • f v) (Filter.cocompact ℝ) (𝓝 0)


lemma isLUB_iff_sSup_eq : IsLUB s a ↔ sSup s = a

{α : Type u_1}
[CompleteSemilatticeSup α]
{s : Set α}
{a : α}


theorem fromLoop_apply (i : N) {p : Ω (Ω^ { j // j ≠ i } X x) const} {t : I^N} :
    fromLoop i p t = p (t i) (Cube.splitAt i t).snd

{p : Ω (↑(Ω^ { j // j ≠ i } X x)) GenLoop.const}

(GenLoop.fromLoop i p) t = (p (t i)) ((Cube.splitAt i) t).2


/-- In a locally compact group, any neighborhood of the identity contains a compact closed
neighborhood of the identity, even without separation assumptions on the space. -/
@[to_additive (attr := deprecated isCompact_isClosed_basis_nhds (since := "2024-01-28"))
  "In a locally compact additive group, any neighborhood of the identity contains a
  compact closed neighborhood of the identity, even without separation assumptions on the space."]
theorem local_isCompact_isClosed_nhds_of_group [LocallyCompactSpace G] {U : Set G}
    (hU : U ∈ 𝓝 (1 : G)) :
    ∃ K : Set G, IsCompact K ∧ IsClosed K ∧ K ⊆ U ∧ (1 : G) ∈ interior K

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[LocallyCompactSpace G]
{U : Set G}
(hU : U ∈ 𝓝 1)

∃ K, IsCompact K ∧ IsClosed K ∧ K ⊆ U ∧ 1 ∈ interior K


/-- If the set where you want `f` to be smooth lies entirely in a single chart, and `f` maps it
  into a single chart, the smoothness of `f` on that set can be expressed by purely looking in
  these charts.
  Note: this lemma uses `extChartAt I x '' s` instead of `(extChartAt I x).symm ⁻¹' s` to ensure
  that this set lies in `(extChartAt I x).target`. -/
theorem contMDiffOn_iff_of_subset_source {x : M} {y : M'} (hs : s ⊆ (chartAt H x).source)
    (h2s : MapsTo f s (chartAt H' y).source) :
    ContMDiffOn I I' n f s ↔
      ContinuousOn f s ∧
        ContDiffOn 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm) (extChartAt I x '' s)

(h2s : Set.MapsTo f s (chartAt H' y).source)

ContMDiffOn I I' n f s ↔
  ContinuousOn f s ∧ ContDiffOn 𝕜 n (↑(extChartAt I' y) ∘ f ∘ ↑(extChartAt I x).symm) (↑(extChartAt I x) '' s)


theorem Antiperiodic.int_even_mul_periodic [Ring α] [InvolutiveNeg β] (h : Antiperiodic f c)
    (n : ℤ) : Periodic f (n * (2 * c))

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


@[simp 1100]
theorem normalize_lcm (s : Multiset α) : normalize s.lcm = s.lcm

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(s : Multiset α)


@[simp]
theorem card_eq_coe_fintype_card [Fintype α] : card α = Fintype.card α


theorem Fintype.coe_image_univ [Fintype α] [DecidableEq β] {f : α → β} :
    ↑(Finset.image f Finset.univ) = Set.range f

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


theorem tendsto_map {f : α → β} {x : Filter α} : Tendsto f x (map f x)

{α : Type u}
{β : Type v}
{f : α → β}
{x : Filter α}


@[to_additive (attr := fun_prop)]
theorem ContinuousOn.inv (hf : ContinuousOn f s) : ContinuousOn (fun x => (f x)⁻¹) s

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Inv G]
[ContinuousInv G]
[TopologicalSpace α]
{f : α → G}
{s : Set α}
(hf : ContinuousOn f s)


theorem factors_lemma {k} : (k + 2) / minFac (k + 2) < k + 2


@[simp]
theorem liftRel_cons (R : α → β → Prop) (a b s t) :
    LiftRel R (cons a s) (cons b t) ↔ R a b ∧ LiftRel R s t

{α : Type u}
{β : Type v}
(R : α → β → Prop)
(a : α)
(b : β)
(s : Stream'.WSeq α)
(t : Stream'.WSeq β)

Stream'.WSeq.LiftRel R (Stream'.WSeq.cons a s) (Stream'.WSeq.cons b t) ↔ R a b ∧ Stream'.WSeq.LiftRel R s t


/-- If `f` has compact multiplicative support, then `f` tends to 1 at infinity. -/
@[to_additive "If `f` has compact support, then `f` tends to zero at infinity."]
theorem is_one_at_infty {f : α → γ} [TopologicalSpace γ] [One γ]
    (h : HasCompactMulSupport f) : Tendsto f (cocompact α) (𝓝 1)

{α : Type u_2}
{γ : Type u_5}
[TopologicalSpace α]
{f : α → γ}
[TopologicalSpace γ]
[Zero γ]
(h : HasCompactSupport f)

Filter.Tendsto f (Filter.cocompact α) (𝓝 0)


@[gcongr]
theorem mul_le_mul_of_nonneg_right [MulPosMono α] (h : b ≤ c) (a0 : 0 ≤ a) : b * a ≤ c * a

{α : Type u_1}
{a b c : α}
[Mul α]
[Zero α]
[Preorder α]
[MulPosMono α]
(h : b ≤ c)
(a0 : 0 ≤ a)


@[simp]
theorem mem_finset_inf {ι} {s : Finset ι} {p : ι → Submodule R M} {x : M} :
    x ∈ s.inf p ↔ ∀ i ∈ s, x ∈ p i

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
{s : Finset ι}
{p : ι → Submodule R M}
{x : M}


theorem let_body_eq {α : Sort v} {β : α → Sort u} (a : α) {b₁ b₂ : ∀ x : α, β x}
    (h : ∀ x, b₁ x = b₂ x) : (let x : α := a; b₁ x) = (let x : α := a; b₂ x)

{α : Sort v}
{β : α → Sort u}
(a : α)
{b₁ b₂ : (x : α) → β x}
(h : ∀ (x : α), b₁ x = b₂ x)

(let x := a;
  b₁ x) =
  let x := a;
  b₂ x


@[simp, deprecated coe_lt_coe "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem some_lt_some : @LT.lt (WithTop α) _ (Option.some a) (Option.some b) ↔ a < b


/-- Isometry between the tangent space `V` of a (semi)normed add torsor `P` and `P` given by
subtraction from `x : P`. -/
@[simps!]
def IsometryEquiv.constVSub (x : P) : P ≃ᵢ V

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

∀ (x_1 : P), (IsometryEquiv.constVSub x) x_1 = x -ᵥ x_1


theorem IsOpen.locallyConnectedSpace [LocallyConnectedSpace α] {U : Set α} (hU : IsOpen U) :
    LocallyConnectedSpace U

{α : Type u}
[TopologicalSpace α]
[LocallyConnectedSpace α]
{U : Set α}
(hU : IsOpen U)


@[to_additive]
theorem Group.rank_le [h : Group.FG G] {S : Finset G} (hS : Subgroup.closure (S : Set G) = ⊤) :
    Group.rank G ≤ S.card

(G : Type u_3)
[Group G]
[h : Group.FG G]
{S : Finset G}
(hS : Subgroup.closure ↑S = ⊤)


@[simp, rclike_simps, norm_cast]
theorem ratCast_im (q : ℚ) : im (q : K) = 0


theorem _root_.Matrix.toLin_finTwoProd_toContinuousLinearMap (a b c d : 𝕜) :
    LinearMap.toContinuousLinearMap
      (Matrix.toLin (Basis.finTwoProd 𝕜) (Basis.finTwoProd 𝕜) !![a, b; c, d]) =
      (a • ContinuousLinearMap.fst 𝕜 𝕜 𝕜 + b • ContinuousLinearMap.snd 𝕜 𝕜 𝕜).prod
        (c • ContinuousLinearMap.fst 𝕜 𝕜 𝕜 + d • ContinuousLinearMap.snd 𝕜 𝕜 𝕜)

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
(a b c d : 𝕜)

LinearMap.toContinuousLinearMap ((Matrix.toLin (Basis.finTwoProd 𝕜) (Basis.finTwoProd 𝕜)) !![a, b; c, d]) =
  (a • ContinuousLinearMap.fst 𝕜 𝕜 𝕜 + b • ContinuousLinearMap.snd 𝕜 𝕜 𝕜).prod
    (c • ContinuousLinearMap.fst 𝕜 𝕜 𝕜 + d • ContinuousLinearMap.snd 𝕜 𝕜 𝕜)


theorem eq_of_chain {c : Chain (Part α)} {a b : α} (ha : some a ∈ c) (hb : some b ∈ c) : a = b

{c : OmegaCompletePartialOrder.Chain (Part α)}


/-- Group equivalence between `G ≃+c[a, a] G` and the units of `G →+c[a, a] G`. -/
@[simps!]
def equivUnits : (G ≃+c[a, a] G) ≃* (G →+c[a, a] G)ˣ

{G : Type u_1}
[Add G]
{a : G}
(u : (G →+c[a, a] G)ˣ)

⇑(AddConstEquiv.equivUnits.symm u) = ⇑↑u


protected theorem dist_self (x : ∀ n, E n) : dist x x = 0


@[simp]
theorem finTwoProd_zero (R : Type*) [Semiring R] : Basis.finTwoProd R 0 = (1, 0)


@[to_additive]
theorem IsOfFinOrder.snd {x : α × β} (hx : IsOfFinOrder x) : IsOfFinOrder x.2

{α : Type u_4}
{β : Type u_5}
[AddMonoid α]
[AddMonoid β]
{x : α × β}
(hx : IsOfFinAddOrder x)


theorem map_toPoly : (map φ P).toPoly = Polynomial.map φ P.toPoly

{R : Type u_1}
{S : Type u_2}
{P : Cubic R}
[Semiring R]
[Semiring S]
{φ : R →+* S}

(Cubic.map φ P).toPoly = Polynomial.map φ P.toPoly


/-- An alternative way to prove that `μ` is left invariant under multiplication. -/
@[to_additive " An alternative way to prove that `μ` is left invariant under addition. "]
theorem forall_measure_preimage_mul_iff (μ : Measure G) :
    (∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => g * h) ⁻¹' A) = μ A) ↔
      IsMulLeftInvariant μ

{G : Type u_2}
[MeasurableSpace G]
[Mul G]
[MeasurableMul G]
(μ : MeasureTheory.Measure G)

(∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => g * h) ⁻¹' A) = μ A) ↔ μ.IsMulLeftInvariant


/-- Each element of the semiring defines a module endomorphism.

This is a stronger version of `DistribMulAction.toModuleEnd`. -/
@[simps]
def toModuleEnd : S →+* Module.End R M

(R : Type u_1)
{S : Type u_4}
(M : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring S]
[Module S M]
[SMulCommClass S R M]
(s : S)

(Module.toModuleEnd R M) s = DistribMulAction.toLinearMap R M s


theorem condexp_min_stopping_time_ae_eq_restrict_le_const (hτ : IsStoppingTime ℱ τ) (i : ι)
    [SigmaFinite (μ.trim (hτ.min_const i).measurableSpace_le)] :
    μ[f|(hτ.min_const i).measurableSpace] =ᵐ[μ.restrict {x | τ x ≤ i}] μ[f|hτ.measurableSpace]

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{μ : MeasureTheory.Measure Ω}
{ℱ : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : Ω → E}
[Filter.atTop.IsCountablyGenerated]
(hτ : MeasureTheory.IsStoppingTime ℱ τ)
(i : ι)
[MeasureTheory.SigmaFinite (μ.trim ⋯)]

μ[f|⋯.measurableSpace] =ᵐ[μ.restrict {x | τ x ≤ i}] μ[f|hτ.measurableSpace]


/-- The functor `Over S ⥤ Over S` that is constructed in order to apply the small
object argument to a family of morphisms `f i : A i ⟶ B i`, see the introduction
of the file `Mathlib.CategoryTheory.SmallObject.Construction` -/
@[simps! obj map]
noncomputable def functor : Over S ⥤ Over S

[∀ {X : C} (πX : X ⟶ S),
    CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πX))
      C]

(φ : π₁ ⟶ π₂)

(CategoryTheory.SmallObject.functor f S).map φ =
  CategoryTheory.Over.homMk (CategoryTheory.SmallObject.functorMap f π₁.hom π₂.hom φ.left ⋯) ⋯


theorem Ioo_cons_left (h : a < b) : a ::ₘ Ioo a b = Ico a b

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

a ::ₘ Multiset.Ioo a b = Multiset.Ico a b


theorem Set.Subsingleton.isGδ_compl {s : Set X} [T1Space X] (hs : s.Subsingleton) : IsGδ sᶜ

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[T1Space X]
(hs : s.Subsingleton)


lemma map_of_mono_of_preservesKernel (hS : S.Exact) (F : C ⥤ D)
    [F.PreservesZeroMorphisms] [(S.map F).HasHomology] (_ : Mono S.f)
    (_ : PreservesLimit (parallelPair S.g 0) F) :
    (S.map F).Exact

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Balanced C]
(hS : S.Exact)
(F : CategoryTheory.Functor C D)
[F.PreservesZeroMorphisms]
[(S.map F).HasHomology]

CategoryTheory.Mono S.f →
  CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair S.g 0) F → (S.map F).Exact


theorem two_sin : 2 * sin x = (exp (-x * I) - exp (x * I)) * I

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


@[to_additive]
theorem mul_mem_sup {S T : Subgroup G} {x y : G} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T

{G : Type u_1}
[Group G]
{S T : Subgroup G}
{x y : G}
(hx : x ∈ S)
(hy : y ∈ T)


theorem extract.go₁_add_right_cancel (s : List Char) (i b e n : Nat) :
    go₁ s ⟨i + n⟩ ⟨b + n⟩ ⟨e + n⟩ = go₁ s ⟨i⟩ ⟨b⟩ ⟨e⟩

String.extract.go₁ s { byteIdx := i + n } { byteIdx := b + n } { byteIdx := e + n } =
  String.extract.go₁ s { byteIdx := i } { byteIdx := b } { byteIdx := e }


theorem _root_.StrictMonoOn.congr (h₁ : StrictMonoOn f₁ s) (h : s.EqOn f₁ f₂) :
    StrictMonoOn f₂ s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f₁ f₂ : α → β}
[Preorder α]
[Preorder β]
(h₁ : StrictMonoOn f₁ s)
(h : Set.EqOn f₁ f₂ s)


@[simp] theorem reverseInduction_last {n : Nat} {motive : Fin (n + 1) → Sort _} {zero succ} :
    (reverseInduction zero succ (Fin.last n) : motive (Fin.last n)) = zero

{succ : (i : Fin n) → motive i.succ → motive i.castSucc}

Fin.reverseInduction zero succ (Fin.last n) = zero


theorem _root_.MeasurableSet.cylinder [∀ i, MeasurableSpace (α i)] (s : Finset ι)
    {S : Set (∀ i : s, α i)} (hS : MeasurableSet S) :
    MeasurableSet (cylinder s S)

{ι : Type u_2}
{α : ι → Type u_1}
[(i : ι) → MeasurableSpace (α i)]
(s : Finset ι)
{S : Set ((i : { x // x ∈ s }) → α ↑i)}
(hS : MeasurableSet S)

MeasurableSet (MeasureTheory.cylinder s S)


@[to_additive]
theorem pow_mem_closedBall {n : ℕ} (h : a ∈ closedBall b r) :
    a ^ n ∈ closedBall (b ^ n) (n • r)

{E : Type u_6}
[SeminormedCommGroup E]
{a b : E}
{r : ℝ}
{n : ℕ}
(h : a ∈ Metric.closedBall b r)

a ^ n ∈ Metric.closedBall (b ^ n) (n • r)


/-- An iterated product is a product over a sigma type. -/
@[simps]
def piPiIso {ι : Type*} (f : ι → Type*) (g : (i : ι) → (f i) → C)
    [∀ i, HasProduct (g i)] [HasProduct fun i => ∏ᶜ g i] :
    (∏ᶜ fun i => ∏ᶜ g i) ≅ (∏ᶜ fun p : Σ i, f i => g p.1 p.2)

[∀ (i : ι), CategoryTheory.Limits.HasProduct (g i)]

[CategoryTheory.Limits.HasProduct fun i => ∏ᶜ g i]

(CategoryTheory.Limits.piPiIso f g).hom =
  CategoryTheory.Limits.Pi.lift fun x =>
    match x with
    | ⟨i, x⟩ => CategoryTheory.Limits.Pi.π (fun i => ∏ᶜ g i) i ≫ CategoryTheory.Limits.Pi.π (g i) x


@[to_additive (attr := ext)]
theorem Group.ext {G : Type*} ⦃g₁ g₂ : Group G⦄ (h_mul : g₁.mul = g₂.mul) : g₁ = g₂

{G : Type u_1}
⦃g₁ g₂ : Group G⦄
(h_mul : Mul.mul = Mul.mul)


theorem mem_sections {L : List (List α)} {f} : f ∈ sections L ↔ Forall₂ (· ∈ ·) f L

{α : Type u_1}
{L : List (List α)}
{f : List α}

f ∈ L.sections ↔ List.Forall₂ (fun x x_1 => x ∈ x_1) f L


@[to_additive]
theorem MulEquivClass.toMulEquiv_injective [Mul α] [Mul β] [MulEquivClass F α β] :
    Function.Injective ((↑) : F → α ≃* β)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[EquivLike F α β]
[Mul α]
[Mul β]
[MulEquivClass F α β]


@[to_additive]
theorem exponent_eq_iSup_orderOf (h : ∀ g : G, 0 < orderOf g) :
    exponent G = ⨆ g : G, orderOf g

{G : Type u}
[CommMonoid G]
(h : ∀ (g : G), 0 < orderOf g)


theorem uniformInducing_comp (g : C(β, δ)) (hg : UniformInducing g) :
    UniformInducing (ContinuousMap.comp g : C(α, β) → C(α, δ))

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
{δ : Type u_2}
[UniformSpace δ]
(g : C(β, δ))
(hg : UniformInducing ⇑g)


/-- For a self-adjoint operator `T`, a local extremum of the Rayleigh quotient of `T` on a sphere
centred at the origin is an eigenvector of `T`. -/
theorem hasEigenvector_of_isLocalExtrOn (hT : IsSelfAdjoint T) {x₀ : E} (hx₀ : x₀ ≠ 0)
    (hextr : IsLocalExtrOn T.reApplyInnerSelf (sphere (0 : E) ‖x₀‖) x₀) :
    HasEigenvector (T : E →ₗ[𝕜] E) (↑(T.rayleighQuotient x₀)) x₀

(hextr : IsLocalExtrOn T.reApplyInnerSelf (Metric.sphere 0 ‖x₀‖) x₀)

Module.End.HasEigenvector (↑T) (↑(T.rayleighQuotient x₀)) x₀


@[norm_cast]
theorem UniformSpace.Completion.coe_zero [Zero α] : ((0 : α) : Completion α) = 0

{α : Type u_3}
[UniformSpace α]
[Zero α]


theorem mul_nonpos_of_nonneg_of_nonpos [PosMulMono α] (ha : 0 ≤ a) (hb : b ≤ 0) : a * b ≤ 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[Preorder α]
[PosMulMono α]
(ha : 0 ≤ a)
(hb : b ≤ 0)


theorem unop_sup (S₁ S₂ : Subsemiring Rᵐᵒᵖ) : (S₁ ⊔ S₂).unop = S₁.unop ⊔ S₂.unop

{R : Type u_2}
[NonAssocSemiring R]
(S₁ S₂ : Subsemiring Rᵐᵒᵖ)


theorem perm_mergeSort : ∀ l : List α, mergeSort r l ~ l

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


theorem map_comp (f : α → β) (g : β → γ) (s : WSeq α) : map (g ∘ f) s = map g (map f s)

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → β)
(g : β → γ)
(s : Stream'.WSeq α)

Stream'.WSeq.map (g ∘ f) s = Stream'.WSeq.map g (Stream'.WSeq.map f s)


/-- A dilation is continuous. -/
theorem toContinuous : Continuous (f : α → β)

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)


@[to_additive sum_le_sum_of_subset_of_nonneg]
theorem prod_le_prod_of_subset_of_one_le' (h : s ⊆ t) (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i

{ι : Type u_1}
{N : Type u_5}
[OrderedCommMonoid N]
{f : ι → N}
{s t : Finset ι}
(h : s ⊆ t)
(hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i)


@[simp]
theorem product_singleton {b : β} : s ×ˢ {b} = s.map ⟨fun i => (i, b), Prod.mk.inj_right _⟩

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{b : β}

s ×ˢ {b} = Finset.map { toFun := fun i => (i, b), inj' := ⋯ } s


/-- Given sets `s, t` of a commutative monoid `M`, `x ∈ M` is in the submonoid of `M` generated by
    `s ∪ t` iff there exists an element of the submonoid generated by `s` and an element of the
    submonoid generated by `t` whose product is `x`. -/
@[to_additive
      "Given sets `s, t` of a commutative `AddMonoid M`, `x ∈ M` is in the `AddSubmonoid`
      of `M` generated by `s ∪ t` iff there exists an element of the `AddSubmonoid` generated by `s`
      and an element of the `AddSubmonoid` generated by `t` whose sum is `x`."]
theorem mem_closure_union_iff {M : Type*} [CommMonoid M] {s t : Set M} {x : M} :
    x ∈ Closure (s ∪ t) ↔ ∃ y ∈ Closure s, ∃ z ∈ Closure t, y * z = x

{M : Type u_3}
[CommMonoid M]
{s t : Set M}
{x : M}

x ∈ Monoid.Closure (s ∪ t) ↔ ∃ y ∈ Monoid.Closure s, ∃ z ∈ Monoid.Closure t, y * z = x


lemma LeftFractionRel.unop {W : MorphismProperty Cᵒᵖ} {X Y : Cᵒᵖ}
    {z₁ z₂ : W.LeftFraction X Y}
    (h : LeftFractionRel z₁ z₂) : RightFractionRel z₁.unop z₂.unop

{W : CategoryTheory.MorphismProperty Cᵒᵖ}

(h : CategoryTheory.MorphismProperty.LeftFractionRel z₁ z₂)


@[continuity]
theorem continuous_im : Continuous fun q : ℍ => q.im


@[simp, norm_cast]
theorem coe_one : (↑(1 : R) : c.Quotient) = 1

{R : Type u_2}
[Add R]
[MulOneClass R]
(c : RingCon R)


theorem mem_lift {F : IntermediateField K L} {E : IntermediateField K F} (x : F) :
    x.1 ∈ lift E ↔ x ∈ E

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
{F : IntermediateField K L}
{E : IntermediateField K ↥F}
(x : ↥F)


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

{α : Type u_1}
{p q : α → Prop}
{f : Filter α}
(hq : ∀ (x : α), p x ↔ q x)


lemma rpow_mul_natCast (x : ℝ≥0∞) (y : ℝ) (n : ℕ) : x ^ (y * n) = (x ^ y) ^ n


theorem det_updateRow_smul' (M : Matrix n n R) (j : n) (s : R) (u : n → R) :
    det (updateRow (s • M) j u) = s ^ (Fintype.card n - 1) * det (updateRow M j u)

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

((s • M).updateRow j u).det = s ^ (Fintype.card n - 1) * (M.updateRow j u).det


/-- Alternate form of **Faulhaber's theorem**, relating the sum of p-th powers to the Bernoulli
numbers: $$\sum_{k=1}^{n} k^p = \sum_{i=0}^p (-1)^iB_i\binom{p+1}{i}\frac{n^{p+1-i}}{p+1}.$$
Deduced from `sum_range_pow`. -/
theorem sum_Ico_pow (n p : ℕ) :
    (∑ k ∈ Ico 1 (n + 1), (k : ℚ) ^ p) =
      ∑ i ∈ range (p + 1), bernoulli' i * (p + 1).choose i * (n : ℚ) ^ (p + 1 - i) / (p + 1)

∑ k ∈ Finset.Ico 1 (n + 1), ↑k ^ p =
  ∑ i ∈ Finset.range (p + 1), bernoulli' i * ↑((p + 1).choose i) * ↑n ^ (p + 1 - i) / (↑p + 1)


theorem map_map [Semiring T] (g : S →+* T) (p : R[X]) : (p.map f).map g = p.map (g.comp f)

{R : Type u}
{S : Type v}
{T : Type w}
[Semiring R]
[Semiring S]
(f : R →+* S)
[Semiring T]
(g : S →+* T)
(p : R[X])

Polynomial.map g (Polynomial.map f p) = Polynomial.map (g.comp f) p


/-- The recursion `hermite (n+1) = (x - d/dx) (hermite n)` -/
@[simp]
theorem hermite_succ (n : ℕ) : hermite (n + 1) = X * hermite n - derivative (hermite n)

Polynomial.hermite (n + 1) = Polynomial.X * Polynomial.hermite n - Polynomial.derivative (Polynomial.hermite n)


theorem eq_union_right (h : s ≤ t) : s ∪ t = t

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


@[to_additive Icc_add_Icc_subset]
theorem Icc_mul_Icc_subset' (a b c d : α) : Icc a b * Icc c d ⊆ Icc (a * c) (b * d)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LE.le]

Set.Icc a b + Set.Icc c d ⊆ Set.Icc (a + c) (b + d)


theorem toNNReal_of_nonpos {r : ℝ} : r ≤ 0 → Real.toNNReal r = 0


theorem normSq_inv (z : ℂ) : normSq z⁻¹ = (normSq z)⁻¹

Complex.normSq z⁻¹ = (Complex.normSq z)⁻¹


@[simp, norm_cast]
theorem of_natCast [AddGroupWithOne α] (n : ℕ) : ((n : ZNum) : α) = n

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


/-- The sine of an angle in a right-angled triangle as a ratio of sides. -/
theorem sin_oangle_add_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.sin (o.oangle x (x + y)) = ‖y‖ / ‖x + y‖

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

(o.oangle x (x + y)).sin = ‖y‖ / ‖x + y‖


theorem algebraMap_adicCompletion :
    ⇑(algebraMap K <| v.adicCompletion K) = ((↑) : K → adicCompletion K v)

(v : IsDedekindDomain.HeightOneSpectrum R)

⇑(algebraMap K (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)) = ↑K


lemma isTorsionBy_quotient_element_smul :
    IsTorsionBy R (M⧸r • (⊤ : Submodule R M)) r

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


theorem continuousOn_toNNReal : ContinuousOn ENNReal.toNNReal { a | a ≠ ∞ }

ContinuousOn ENNReal.toNNReal {a | a ≠ ⊤}


@[simp]
theorem coe_top : ((⊤ : Subsemiring R) : Set R) = Set.univ


@[ext]
theorem LinearOrder.toPartialOrder_injective :
    Function.Injective (@LinearOrder.toPartialOrder α)


@[simp]
theorem up_eq_up {a b : ULower α} : a.up = b.up ↔ a = b

{α : Type u_1}
[Encodable α]
{a b : ULower α}


@[to_additive (attr := simp)]
theorem coe_inv (S : Submonoid G) : ↑S⁻¹ = (S : Set G)⁻¹

{G : Type u_2}
[AddGroup G]
(S : AddSubmonoid G)


/-- A Boolean ring is a ring where multiplication is idempotent. -/
class BooleanRing (α) extends Ring α where
  /-- Multiplication in a boolean ring is idempotent. -/
  mul_self : ∀ a : α, a * a = a

{α : Type u_4}
[self : BooleanRing α]
(a : α)


theorem abs_def (x : ℝ) : (x : EReal).abs = ENNReal.ofReal |x|


@[integral_simps]
theorem integral_smul (c : 𝕜) (f : α →₁[μ] E) : integral (c • f) = c • integral f

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_4}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[SMulCommClass ℝ 𝕜 E]
[CompleteSpace E]
(c : 𝕜)
(f : ↥(MeasureTheory.Lp E 1 μ))

MeasureTheory.L1.integral (c • f) = c • MeasureTheory.L1.integral f


/-- A homomorphism `f` of seminormed groups is continuous, if there exists a constant `C` such that
for all `x`, one has `‖f x‖ ≤ C * ‖x‖`. -/
@[to_additive "A homomorphism `f` of seminormed groups is continuous, if there exists a constant `C`
such that for all `x`, one has `‖f x‖ ≤ C * ‖x‖`"]
theorem MonoidHomClass.continuous_of_bound [MonoidHomClass 𝓕 E F] (f : 𝓕) (C : ℝ)
    (h : ∀ x, ‖f x‖ ≤ C * ‖x‖) : Continuous f

{𝓕 : Type u_1}
{E : Type u_3}
{F : Type u_4}
[SeminormedAddGroup E]
[SeminormedAddGroup F]
[FunLike 𝓕 E F]
[AddMonoidHomClass 𝓕 E F]
(f : 𝓕)
(C : ℝ)
(h : ∀ (x : E), ‖f x‖ ≤ C * ‖x‖)


theorem bounded_ge_of_bounded_gt [Preorder α] (h : Bounded (· > ·) s) : Bounded (· ≥ ·) s

(h : Set.Bounded (fun x x_1 => x > x_1) s)


@[simp 1100]
theorem normalize_gcd (s : Multiset α) : normalize s.gcd = s.gcd

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(s : Multiset α)


theorem map_mul_right_nhds_one₀ (ha : a ≠ 0) : map (· * a) (𝓝 1) = 𝓝 (a)

{G₀ : Type u_3}
[TopologicalSpace G₀]
[GroupWithZero G₀]
[ContinuousMul G₀]
{a : G₀}
(ha : a ≠ 0)


theorem mapHom_id : mapHom M M (MonoidHom.id M) = 𝟭 _

(CategoryTheory.SingleObj.mapHom M M) (MonoidHom.id M) = 𝟭 (CategoryTheory.SingleObj M)


theorem ofNat_pos_of_pos {a : Nat} (h : 0 < a) : 0 < (a : Int)


theorem subsingleton_iff : Subsingleton α ↔ ∀ x y : α, x = y


/-- **Minimum principle** for concave functions on a segment. If a function `f` is concave on the
segment `[x, y]`, then the eventual minimum of `f` on `[x, y]` is at `x` or `y`. -/
lemma ConcaveOn.min_le_of_mem_segment (hf : ConcaveOn 𝕜 [x -[𝕜] y] f) (hz : z ∈ [x -[𝕜] y]) :
    min (f x) (f y) ≤ f z

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[LinearOrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
{x y z : E}
(hf : ConcaveOn 𝕜 [x-[𝕜]y] f)
(hz : z ∈ [x-[𝕜]y])


/-- The `reverse` function reverses the ordering invariants. -/
protected theorem Ordered.reverse : ∀ {t : RBNode α}, t.Ordered cmp → t.reverse.Ordered (flip cmp)

{α : Type u_1}
{cmp : α → α → Ordering}
{t : Batteries.RBNode α}

Batteries.RBNode.Ordered cmp t → Batteries.RBNode.Ordered (flip cmp) t.reverse


/-- A new left option cannot hurt Left. -/
lemma le_insertLeft (x x' : PGame) : x ≤ insertLeft x x'


@[to_additive (attr := simp)]
theorem prod_insert [DecidableEq α] : a ∉ s → ∏ x ∈ insert a s, f x = f a * ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{a : α}
{f : α → β}
[CommMonoid β]
[DecidableEq α]


lemma X_smul_of (m : M) : (X : R[X]) • (of R M a m) = of R M a (a • m)

{R : Type u_2}
{A : Type u_3}
{M : Type u_1}
[CommSemiring R]
[Semiring A]
(a : A)
[Algebra R A]
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
(m : M)

Polynomial.X • (Module.AEval.of R M a) m = (Module.AEval.of R M a) (a • m)


theorem mem_rat_span_latticeBasis [NumberField K] (x : K) :
    canonicalEmbedding K x ∈ Submodule.span ℚ (Set.range (latticeBasis K))

(K : Type u_1)
[Field K]
[NumberField K]
(x : K)

(NumberField.canonicalEmbedding K) x ∈ Submodule.span ℚ (Set.range ⇑(NumberField.canonicalEmbedding.latticeBasis K))


theorem support_single_ne_bot (i : α) (h : b ≠ 0) : (single i b).support ≠ ⊥

{α : Type u_1}
{M : Type u_5}
[Zero M]
{b : M}
(i : α)
(h : b ≠ 0)


theorem Group.exponent_dvd_card [Fintype G] : Monoid.exponent G ∣ Fintype.card G


@[simp]
theorem realize_rel₂ {R : L.Relations 2} {t₁ t₂ : L.Term _} :
    (R.formula₂ t₁ t₂).Realize v ↔ RelMap R ![t₁.realize v, t₂.realize v]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{v : α → M}
{R : L.Relations 2}
{t₁ t₂ : L.Term α}

(R.formula₂ t₁ t₂).Realize v ↔
  FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize v t₁, FirstOrder.Language.Term.realize v t₂]


@[simp]
theorem symm_apply_apply (f : M ≃[L] N) (a : M) : f.symm (f a) = a

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(f : L.Equiv M N)
(a : M)


@[to_additive (attr := fun_prop, aesop safe 20 apply (rule_sets := [Measurable]))]
theorem AEMeasurable.div [MeasurableDiv₂ G] (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    AEMeasurable (fun a => f a / g a) μ

{G : Type u_2}
{α : Type u_3}
[MeasurableSpace G]
[Div G]
{m : MeasurableSpace α}
{f g : α → G}
{μ : MeasureTheory.Measure α}
[MeasurableDiv₂ G]
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


theorem forall_or_right {q} {p : α → Prop} : (∀ x, p x ∨ q) ↔ (∀ x, p x) ∨ q

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

(∀ (x : α), p x ∨ q) ↔ (∀ (x : α), p x) ∨ q


theorem natDegree_C_mul_X_pow_le (a : R) (n : ℕ) : natDegree (C a * X ^ n) ≤ n

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

(Polynomial.C a * Polynomial.X ^ n).natDegree ≤ n


@[to_additive]
theorem continuousAt_const_smul_iff (c : G) :
    ContinuousAt (fun x => c • f x) b ↔ ContinuousAt f b

{α : Type u_2}
{β : Type u_3}
{G : Type u_4}
[TopologicalSpace α]
[AddGroup G]
[AddAction G α]
[ContinuousConstVAdd G α]
[TopologicalSpace β]
{f : β → α}
{b : β}
(c : G)

ContinuousAt (fun x => c +ᵥ f x) b ↔ ContinuousAt f b


@[simp]
theorem coe_mk (s : Clopens α) (h) : (mk s h : Set α) = s

{α : Type u_1}
[TopologicalSpace α]
[LE α]
(s : TopologicalSpace.Clopens α)
(h : IsUpperSet s.carrier)


theorem hasGradientAt_iff_isLittleO : HasGradientAt f f' x ↔
    (fun x' : F => f x' - f x - ⟪f', x' - x⟫) =o[𝓝 x] fun x' => x' - x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}

HasGradientAt f f' x ↔ (fun x' => f x' - f x - ⟪f', x' - x⟫_𝕜) =o[𝓝 x] fun x' => x' - x


@[simp]
theorem lift_mkRingHom_apply (f : R →+* T) {r : R → R → Prop} (w : ∀ ⦃x y⦄, r x y → f x = f y) (x) :
    lift ⟨f, w⟩ (mkRingHom r x) = f x

{R : Type uR}
[Semiring R]
{T : Type uT}
[Semiring T]
(f : R →+* T)
{r : R → R → Prop}
(w : ∀ ⦃x y : R⦄, r x y → f x = f y)
(x : R)

(RingQuot.lift ⟨f, w⟩) ((RingQuot.mkRingHom r) x) = f x


theorem HasDerivWithinAt.limsup_slope_le (hf : HasDerivWithinAt f f' s x) (hr : f' < r) :
    ∀ᶠ z in 𝓝[s \ {x}] x, slope f x z < r

{f : ℝ → ℝ}
{f' : ℝ}
{s : Set ℝ}
{x r : ℝ}
(hf : HasDerivWithinAt f f' s x)
(hr : f' < r)

∀ᶠ (z : ℝ) in 𝓝[s \ {x}] x, slope f x z < r


/-- The category of cocones on `F` is just the comma category `(F ↓ Δ)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cocone.equivStructuredArrow (F : J ⥤ C) : Cocone F ≌ StructuredArrow F (const J)

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

∀ {X Y : CategoryTheory.Limits.Cocone F} (f : X ⟶ Y),
  ((CategoryTheory.Limits.Cocone.equivStructuredArrow F).functor.map f).left =
    CategoryTheory.CategoryStruct.id { as := PUnit.unit }


theorem exists_rename_eq_of_vars_subset_range (p : MvPolynomial σ R) (f : τ → σ) (hfi : Injective f)
    (hf : ↑p.vars ⊆ Set.range f) : ∃ q : MvPolynomial τ R, rename f q = p

{R : Type u}
{σ : Type u_1}
{τ : Type u_2}
[CommSemiring R]
(p : MvPolynomial σ R)
(f : τ → σ)
(hfi : Function.Injective f)
(hf : ↑p.vars ⊆ Set.range f)


/-- The map `(x, y) ↦ (xy, x⁻¹)` is measure-preserving. -/
@[to_additive measurePreserving_add_prod_neg_right
"The map `(x, y) ↦ (x + y, - x)` is measure-preserving."]
theorem measurePreserving_mul_prod_inv_right [IsMulRightInvariant μ] [IsMulRightInvariant ν] :
    MeasurePreserving (fun z : G × G => (z.1 * z.2, z.1⁻¹)) (μ.prod ν) (μ.prod ν)

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

MeasureTheory.MeasurePreserving (fun z => (z.1 + z.2, -z.1)) (μ.prod ν) (μ.prod ν)


theorem sum_divisors_filter_squarefree {n : ℕ} (h0 : n ≠ 0) {α : Type*} [AddCommMonoid α]
    {f : ℕ → α} :
    ∑ i ∈ n.divisors.filter Squarefree, f i =
      ∑ i ∈ (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset, f i.val.prod

{n : ℕ}
(h0 : n ≠ 0)
{α : Type u_1}
[AddCommMonoid α]
{f : ℕ → α}

∑ i ∈ Finset.filter Squarefree n.divisors, f i =
  ∑ i ∈ (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset, f i.val.prod


/-- The inclusion functor from a connected component to the whole category. -/
@[simps!]
def Component.ι (j : ConnectedComponents J) : Component j ⥤ J

(j : CategoryTheory.ConnectedComponents J)

(self : CategoryTheory.FullSubcategory fun k => Quotient.mk'' k = j)

(CategoryTheory.Component.ι j).obj self = self.obj


lemma l2_opNorm_mul (A : Matrix m n 𝕜) (B : Matrix n l 𝕜) :
    ‖A * B‖ ≤ ‖A‖ * ‖B‖

{𝕜 : Type u_1}
{m : Type u_2}
{n : Type u_3}
{l : Type u_4}
[RCLike 𝕜]
[Fintype m]
[Fintype n]
[DecidableEq n]
[Fintype l]
[DecidableEq l]
(A : Matrix m n 𝕜)
(B : Matrix n l 𝕜)

‖A * B‖ ≤ ‖A‖ * ‖B‖