@[simp]
theorem id_comp (f : α →*₀o β) : (OrderMonoidWithZeroHom.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulZeroOneClass α]
[MulZeroOneClass β]
(f : α →*₀o β)


@[to_additive]
theorem image_subgroup {f : G → H} (hf : IsGroupHom f) {s : Set G} (hs : IsSubgroup s) :
    IsSubgroup (f '' s)

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)
{s : Set G}
(hs : IsAddSubgroup s)


/-- We say a quotient of `α` by `G` `HasFundamentalDomain` if there is a measurable set `s` for
  which `IsFundamentalDomain G s` holds. -/
class HasFundamentalDomain (G : Type*) (α : Type*) [One G] [SMul G α] [MeasurableSpace α]
    (ν : Measure α := by volume_tac) : Prop where
  ExistsIsFundamentalDomain : ∃ (s : Set α), IsFundamentalDomain G s ν

{ν : autoParam (MeasureTheory.Measure α) _auto✝}

[self : MeasureTheory.HasFundamentalDomain G α ν]

∃ s, MeasureTheory.IsFundamentalDomain G s ν


/-- For `D : J ⥤ Algebra T`, `D ⋙ forget T` has a colimit, then `D` has a colimit provided colimits
of shape `J` are preserved by `T`.
-/
theorem forget_creates_colimits_of_monad_preserves [PreservesColimitsOfShape J (T : C ⥤ C)]
    (D : J ⥤ Algebra T) [HasColimit (D ⋙ forget T)] : HasColimit D

(D : CategoryTheory.Functor J T.Algebra)


lemma append_apply_right (p q : RelSeries r) (connect : r p.last q.head)
    (i : Fin (q.length + 1)) :
    p.append q connect (i.natAdd p.length + 1) = q i

{α : Type u_1}
{r : Rel α α}
(p q : RelSeries r)
(connect : r p.last q.head)
(i : Fin (q.length + 1))

(p.append q connect).toFun (↑↑(Fin.natAdd p.length i) + 1) = q.toFun i


theorem self_le_power (a : Cardinal) {b : Cardinal} (hb : 1 ≤ b) : a ≤ a ^ b

(a : Cardinal.{u_1})
{b : Cardinal.{u_1}}
(hb : 1 ≤ b)


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

Polynomial.C (a ^ n) = Polynomial.C a ^ n


/-- For every family of closed sets whose intersection avoids a Lindelö set,
there exists a countable subfamily whose intersection avoids this Lindelöf set. -/
theorem IsLindelof.elim_countable_subfamily_closed {ι : Type v} (hs : IsLindelof s)
    (t : ι → Set X) (htc : ∀ i, IsClosed (t i)) (hst : (s ∩ ⋂ i, t i) = ∅) :
    ∃ u : Set ι, u.Countable ∧ (s ∩ ⋂ i ∈ u, t i) = ∅

{X : Type u}
[TopologicalSpace X]
{s : Set X}
{ι : Type v}
(hs : IsLindelof s)
(t : ι → Set X)
(htc : ∀ (i : ι), IsClosed (t i))
(hst : s ∩ ⋂ i, t i = ∅)


private theorem toMonoidHom_apply_symm_apply (a : PresentedGroup (M.relationsSet)) :
    (MulEquiv.toMonoidHom cs.mulEquiv : W →* PresentedGroup (M.relationsSet))
    ((MulEquiv.symm cs.mulEquiv) a) = a

{B : Type u_1}
{W : Type u_3}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(a : PresentedGroup M.relationsSet)

cs.mulEquiv.toMonoidHom (cs.mulEquiv.symm a) = a


@[gcongr]
theorem min_le_min : a ≤ c → b ≤ d → min a b ≤ min c d

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


theorem abs_toReal_neg_coe_eq_self_iff {θ : ℝ} : |(-θ : Angle).toReal| = θ ↔ 0 ≤ θ ∧ θ ≤ π


theorem ContDiffOn.of_le (h : ContDiffOn 𝕜 n f s) (hmn : m ≤ n) : ContDiffOn 𝕜 m f s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{m n : ℕ∞}
(h : ContDiffOn 𝕜 n f s)
(hmn : m ≤ n)


theorem mem_skewAdjointMatricesSubmodule' :
    A ∈ skewAdjointMatricesSubmodule J ↔ J.IsSkewAdjoint A

{R₃ : Type u_7}
[CommRing R₃]
{n : Type u_11}
[Fintype n]
(J A : Matrix n n R₃)
[DecidableEq n]


@[simp]
theorem toLinearEquiv_symm : e.toLinearEquiv.symm = e.symm.toLinearEquiv

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)


/-- `Functor.hom` is the hom-pairing, sending `(X, Y)` to `X ⟶ Y`, contravariant in `X` and
covariant in `Y`. -/
@[simps]
def hom : Cᵒᵖ × C ⥤ Type v

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(p : Cᵒᵖ × C)

(CategoryTheory.Functor.hom C).obj p = (Opposite.unop p.1 ⟶ p.2)


theorem exists_lieIdeal_coe_eq_iff :
    (∃ I : LieIdeal R L, ↑I = K) ↔ ∀ x y : L, y ∈ K → ⁅x, y⁆ ∈ K

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{K : LieSubalgebra R L}

(∃ I, lieIdealSubalgebra R L I = K) ↔ ∀ (x y : L), y ∈ K → ⁅x, y⁆ ∈ K


lemma isCompl_weightSpaceOf_zero_posFittingCompOf (x : L) :
    IsCompl (weightSpaceOf M 0 x) (posFittingCompOf R M x)

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[IsNoetherian R M]
[IsArtinian R M]
(x : L)

IsCompl (LieModule.weightSpaceOf M 0 x) (LieModule.posFittingCompOf R M x)


@[simp]
theorem inr_mul [Semiring R] [AddCommMonoid A] [Mul A] [SMulWithZero R A] (a₁ a₂ : A) :
    (↑(a₁ * a₂) : Unitization R A) = a₁ * a₂

(R : Type u_1)
{A : Type u_2}
[Semiring R]
[AddCommMonoid A]
[Mul A]
[SMulWithZero R A]
(a₁ a₂ : A)


theorem le_coe_iff {x : WithTop α} : x ≤ b ↔ ∃ a : α, x = a ∧ a ≤ b

{α : Type u_1}
{b : α}
[LE α]
{x : WithTop α}


@[fun_prop]
theorem ContinuousLinearMap.hasStrictFDerivAt_of_bilinear
    {f : G' → E} {g : G' → F} {f' : G' →L[𝕜] E}
    {g' : G' →L[𝕜] F} {x : G'} (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x) :
    HasStrictFDerivAt (fun y => B (f y) (g y))
      (B.precompR G' (f x) g' + B.precompL G' f' (g x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{G' : Type u_5}
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
(B : E →L[𝕜] F →L[𝕜] G)
{f : G' → E}
{g : G' → F}
{f' : G' →L[𝕜] E}
{g' : G' →L[𝕜] F}
{x : G'}
(hf : HasStrictFDerivAt f f' x)
(hg : HasStrictFDerivAt g g' x)

HasStrictFDerivAt (fun y => (B (f y)) (g y))
  (((ContinuousLinearMap.precompR G' B) (f x)) g' + ((ContinuousLinearMap.precompL G' B) f') (g x)) x


@[simp]
lemma equivPullbackObj_symm_apply_snd (x : Types.PullbackObj f g) :
    c.snd ((equivPullbackObj hc).symm x) = x.1.2

{c : CategoryTheory.Limits.PullbackCone f g}

(x : CategoryTheory.Limits.Types.PullbackObj f g)

c.snd ((CategoryTheory.Limits.PullbackCone.IsLimit.equivPullbackObj hc).symm x) = (↑x).2


theorem iSup_biUnion (s : Finset γ) (t : γ → Finset α) (f : α → β) :
    ⨆ y ∈ s.biUnion t, f y = ⨆ (x ∈ s) (y ∈ t x), f y

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CompleteLattice β]
[DecidableEq α]
(s : Finset γ)
(t : γ → Finset α)
(f : α → β)

⨆ y ∈ s.biUnion t, f y = ⨆ x ∈ s, ⨆ y ∈ t x, f y


theorem comap_equiv_symm (e : α ≃ β) (f : Filter α) : comap e.symm f = map e f

{α : Type u}
{β : Type v}
(e : α ≃ β)
(f : Filter α)

Filter.comap (⇑e.symm) f = Filter.map (⇑e) f


@[ext]
theorem ext {F G : Homotopy f₀ f₁} (h : ∀ x, F x = G x) : F = G

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{F G : f₀.Homotopy f₁}
(h : ∀ (x : ↑I × X), F x = G x)


@[simp]
theorem linearProjOfIsCompl_apply_right (h : IsCompl p q) (x : q) :
    linearProjOfIsCompl p q h x = 0

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p q : Submodule R E}
(h : IsCompl p q)
(x : ↥q)


lemma eq_liftCycles_homologyπ_up_to_refinements {A : C} {i : ι} (γ : A ⟶ K.homology i)
    (j : ι) (hj : c.next i = j) :
    ∃ (A' : C) (π : A' ⟶ A) (_ : Epi π) (z : A' ⟶ K.X i) (hz : z ≫ K.d i j = 0),
      π ≫ γ = K.liftCycles z j hj hz ≫ K.homologyπ i

{C : Type u_1}
{ι : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Abelian C]
{c : ComplexShape ι}
(K : HomologicalComplex C c)
{A : C}
{i : ι}
(γ : A ⟶ K.homology i)
(j : ι)
(hj : c.next i = j)

∃ A' π, ∃ (_ : CategoryTheory.Epi π), ∃ z, ∃ (hz : z ≫ K.d i j = 0), π ≫ γ = K.liftCycles z j hj hz ≫ K.homologyπ i


@[simp]
theorem diff_inter_self {a b : Set α} : b \ a ∩ a = ∅


lemma unique' (g : L ≃+* L) {c : ZMod (Fintype.card { x // x ∈ rootsOfUnity n L })}
    (hc : ∀ t ∈ rootsOfUnity n L, g t = t ^ c.val) :
    c = ModularCyclotomicCharacter' L n g

{c : ZMod (Fintype.card ↥(rootsOfUnity n L))}

(hc : ∀ t ∈ rootsOfUnity n L, g ↑t = ↑t ^ c.val)

c = ↑((ModularCyclotomicCharacter' L n) g)


theorem transitive_reflTransGen : Transitive (ReflTransGen r)


/-- The `MonoidHom` from the preimage of a subgroup to itself. -/
@[to_additive (attr := simps!) "the `AddMonoidHom` from the preimage of an
additive subgroup to itself."]
def subgroupComap (f : G →* G') (H' : Subgroup G') : H'.comap f →* H'

(x : ↥(AddSubmonoid.comap f H'.toAddSubmonoid))


@[simp] theorem run_seq {α β σ : Type u} [Monad m] [LawfulMonad m] (f : StateT σ m (α → β)) (x : StateT σ m α) (s : σ) : (f <*> x).run s = (f.run s >>= fun fs => (fun (p : α × σ) => (fs.1 p.1, p.2)) <$> x.run fs.2)

{m : Type u → Type u_1}
{α β σ : Type u}
[Monad m]
[LawfulMonad m]
(f : StateT σ m (α → β))
(x : StateT σ m α)
(s : σ)

(Seq.seq f fun x_1 => x).run s = do
  let fs ← f.run s
  (fun p => (fs.fst p.fst, p.snd)) <$> x.run fs.snd


/-- The prime case of the **Erdős–Ginzburg–Ziv theorem** for `ℤ`.

Any sequence of `2 * p - 1` elements of `ℤ` contains a subsequence of `p` elements whose sum is
divisible by `p`. -/
private theorem Int.erdos_ginzburg_ziv_prime (a : ι → ℤ) (hs : s.card = 2 * p - 1) :
    ∃ t ⊆ s, t.card = p ∧ ↑p ∣ ∑ i ∈ t, a i

{ι : Type u_1}
{p : ℕ}
[Fact (Nat.Prime p)]
{s : Finset ι}
(a : ι → ℤ)
(hs : s.card = 2 * p - 1)


/-- A circular preorder is the analogue of a preorder where you can loop around. `≤` and `<` are
replaced by ternary relations `btw` and `sbtw`. `btw` is reflexive and cyclic. `sbtw` is transitive.
-/
class CircularPreorder (α : Type*) extends Btw α, SBtw α where
  /-- `a` is between `a` and `a`. -/
  btw_refl (a : α) : btw a a a
  /-- If `b` is between `a` and `c`, then `c` is between `b` and `a`.
  This is motivated by imagining three points on a circle. -/
  btw_cyclic_left {a b c : α} : btw a b c → btw b c a
  sbtw := fun a b c => btw a b c ∧ ¬btw c b a
  /-- Strict betweenness is given by betweenness in one direction and non-betweenness in the other.

  I.e., if `b` is between `a` and `c` but not between `c` and `a`, then we say `b` is strictly
  between `a` and `c`. -/
  sbtw_iff_btw_not_btw {a b c : α} : sbtw a b c ↔ btw a b c ∧ ¬btw c b a := by intros; rfl
  /-- For any fixed `c`, `fun a b ↦ sbtw a b c` is a transitive relation.

  I.e., given `a` `b` `d` `c` in that "order", if we have `b` strictly between `a` and `c`, and `d`
  strictly between `b` and `c`, then `d` is strictly between `a` and `c`. -/
  sbtw_trans_left {a b c d : α} : sbtw a b c → sbtw b d c → sbtw a d c

{α : Type u_1}
[self : CircularPreorder α]
{a b c d : α}


/-- The set of right differentiability points of a function taking values in a complete space is
Borel-measurable. -/
theorem measurableSet_of_differentiableWithinAt_Ioi :
    MeasurableSet { x | DifferentiableWithinAt ℝ f (Ioi x) x }

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : ℝ → F)
[CompleteSpace F]

MeasurableSet {x | DifferentiableWithinAt ℝ f (Set.Ioi x) x}


nonrec theorem _root_.Function.RightInverse.filter_map {f : α → β} {g : β → α}
    (hfg : RightInverse g f) : RightInverse (map g) (map f)

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(hfg : Function.RightInverse g f)

Function.RightInverse (Filter.map g) (Filter.map f)


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

μ ⟂ₘ ν ↔ ν ⟂ₘ μ


lemma LSeriesHasSum.add {f g : ℕ → ℂ} {s a b : ℂ} (hf : LSeriesHasSum f s a)
    (hg : LSeriesHasSum g s b) :
    LSeriesHasSum (f + g) s (a + b)


@[simp, elementwise]
theorem biprodIsoProd_inv_comp_fst (G H : AddCommGrp.{u}) :
    (biprodIsoProd G H).inv ≫ biprod.fst = AddMonoidHom.fst G H

(G.biprodIsoProd H).inv ≫ CategoryTheory.Limits.biprod.fst = AddMonoidHom.fst ↑G ↑H


theorem apply_lt_nfpFamily_iff [Nonempty ι] (H : ∀ i, IsNormal (f i)) {a b} :
    (∀ i, f i b < nfpFamily.{u, v} f a) ↔ b < nfpFamily.{u, v} f a

{f : ι → Ordinal.{max u v} → Ordinal.{max u v}}

(∀ (i : ι), f i b < Ordinal.nfpFamily f a) ↔ b < Ordinal.nfpFamily f a


/-- Equal chain maps are homotopic. -/
@[simps]
def ofEq (h : f = g) : Homotopy f g

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


theorem lift'_inf_le (f g : Filter α) (s : Set α → Set β) :
    (f ⊓ g).lift' s ≤ f.lift' s ⊓ g.lift' s

{α : Type u_1}
{β : Type u_2}
(f g : Filter α)
(s : Set α → Set β)


theorem spectrum_apply_subset (φ : F) (a : A) : σ ((φ : A → B) a) ⊆ σ a

{F : Type u_1}
{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Ring A]
[Algebra R A]
[Ring B]
[Algebra R B]
[FunLike F A B]
[AlgHomClass F R A B]
(φ : F)
(a : A)


theorem lintegral_indicator₀ (f : α → ℝ≥0∞) {s : Set α} (hs : NullMeasurableSet s μ) :
    ∫⁻ a, s.indicator f a ∂μ = ∫⁻ a in s, f a ∂μ

(f : α → ℝ≥0∞)

(hs : MeasureTheory.NullMeasurableSet s μ)

∫⁻ (a : α), s.indicator f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ


theorem lt_iff_le_and_ne [PartialOrder α] {a b : α} : a < b ↔ a ≤ b ∧ a ≠ b

{α : Type u_2}
[PartialOrder α]
{a b : α}


@[simp]
theorem count_toMultiset [DecidableEq α] (f : α →₀ ℕ) (a : α) : (toMultiset f).count a = f a

{α : Type u_1}
[DecidableEq α]
(f : α →₀ ℕ)
(a : α)

Multiset.count a (Finsupp.toMultiset f) = f a


lemma InjOn.image (h : s.InjOn f) : s.powerset.InjOn (image f)

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


/-- Convolution of the zero measure with a measure μ returns the zero measure. -/
@[to_additive (attr := simp) conv_zero]
theorem mconv_zero (μ : Measure M) : (0 : Measure M) ∗ μ = (0 : Measure M)

{M : Type u_1}
[Monoid M]
[MeasurableSpace M]
(μ : MeasureTheory.Measure M)


theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTopology ι]
    [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
    (hπ : IsStoppingTime f π) : MeasurableSet[hπ.measurableSpace] {ω | τ ω ≤ π ω}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ π : Ω → ι}
[TopologicalSpace ι]
[SecondCountableTopology ι]
[OrderTopology ι]
[MeasurableSpace ι]
[BorelSpace ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)


theorem ContDiffAt.comp_contMDiffWithinAt {g : F → F'} {f : M → F} {s : Set M}
    {x : M} (hg : ContDiffAt 𝕜 n g (f x)) (hf : ContMDiffWithinAt I 𝓘(𝕜, F) n f s x) :
    ContMDiffWithinAt I 𝓘(𝕜, F') n (g ∘ f) s x


theorem isInt_le_true [OrderedRing α] : {a b : α} → {a' b' : ℤ} →
    IsInt a a' → IsInt b b' → decide (a' ≤ b') → a ≤ b

{α : Type u_1}
[OrderedRing α]
{a b : α}
{a' b' : ℤ}

Mathlib.Meta.NormNum.IsInt a a' → Mathlib.Meta.NormNum.IsInt b b' → decide (a' ≤ b') = true → a ≤ b


theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[f i] {ω | i < τ ω}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


/-- If adjoin of a set is the whole algebra, then any two derivations equal on this set are equal
on the whole algebra. -/
theorem ext_of_adjoin_eq_top (s : Set A) (hs : adjoin R s = ⊤) (h : Set.EqOn D1 D2 s) : D1 = D2

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]
{D1 D2 : Derivation R A M}
(s : Set A)
(hs : Algebra.adjoin R s = ⊤)
(h : Set.EqOn (⇑D1) (⇑D2) s)


/-- If ∠BCD = π, then ∠ACB + ∠ACD = π. -/
nonrec theorem angle_add_angle_eq_pi_of_angle_eq_pi (p1 : P) {p2 p3 p4 : P} (h : ∠ p2 p3 p4 = π) :
    ∠ p1 p3 p2 + ∠ p1 p3 p4 = π

(h : EuclideanGeometry.angle p2 p3 p4 = π)

EuclideanGeometry.angle p1 p3 p2 + EuclideanGeometry.angle p1 p3 p4 = π


@[to_additive]
theorem toFreeSemigroup_map (f : α → β) (x : FreeMagma α) :
    toFreeSemigroup (map f x) = FreeSemigroup.map f (toFreeSemigroup x)

{α : Type u}
{β : Type v}
(f : α → β)
(x : FreeAddMagma α)

FreeAddMagma.toFreeAddSemigroup ((FreeAddMagma.map f) x) = (FreeAddSemigroup.map f) (FreeAddMagma.toFreeAddSemigroup x)


theorem IsEquipartition.average_le_card_part (hP : P.IsEquipartition) (ht : t ∈ P.parts) :
    s.card / P.parts.card ≤ t.card

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{P : Finpartition s}
(hP : P.IsEquipartition)
(ht : t ∈ P.parts)


theorem dedup_sublist : ∀ l : List α, dedup l <+ l

{α : Type u_1}
[DecidableEq α]
(l : List α)


@[simp]
theorem sup_apply [SemilatticeSup α] {i : ι} {f g : ι →₀ α} : (f ⊔ g) i = f i ⊔ g i

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[SemilatticeSup α]
{i : ι}
{f g : ι →₀ α}


/-- Bijection between `MulOpposite` of a subsemiring `S` and its opposite. -/
@[simps!]
def mopRingEquivOp (S : Subsemiring R) : Sᵐᵒᵖ ≃+* S.op

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

∀ (a : (↥S)ᵐᵒᵖ), ↑(S.mopRingEquivOp a) = MulOpposite.op ↑(MulOpposite.unop a)


/-- Associate to an embedding `f` from `α` to `β` the order embedding that maps a multiset to its
image under `f`. -/
@[simps!]
def mapEmbedding (f : α ↪ β) : Multiset α ↪o Multiset β

{α : Type u_1}
{β : Type v}
(f : α ↪ β)
(s : Multiset α)

(Multiset.mapEmbedding f) s = Multiset.map (⇑f) s


/-- An angle in a right-angled triangle expressed using `arcsin`. -/
theorem angle_add_eq_arcsin_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x ≠ 0 ∨ y ≠ 0) :
    angle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖)

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x ≠ 0 ∨ y ≠ 0)

InnerProductGeometry.angle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖)


theorem lower_raise : ∀ l n, lower (raise l n) n = l

Denumerable.lower (Denumerable.raise l n) n = l


@[to_additive]
private theorem mul_aux (hA : A.Nonempty) (hAB : A ⊆ B)
    (h : ∀ A' ∈ B.powerset.erase ∅, ((A * C).card : ℚ≥0) / ↑A.card ≤ (A' * C).card / ↑A'.card) :
    ∀ A' ⊆ A, (A * C).card * A'.card ≤ (A' * C).card * A.card

(h : ∀ A' ∈ B.powerset.erase ∅, ↑(A * C).card / ↑A.card ≤ ↑(A' * C).card / ↑A'.card)

A' ⊆ A → (A * C).card * A'.card ≤ (A' * C).card * A.card


theorem adjoin_res_eq_adjoin_res (C D E F : Type*) [CommSemiring C] [CommSemiring D]
    [CommSemiring E] [CommSemiring F] [Algebra C D] [Algebra C E] [Algebra C F] [Algebra D F]
    [Algebra E F] [IsScalarTower C D F] [IsScalarTower C E F] {S : Set D} {T : Set E}
    (hS : Algebra.adjoin C S = ⊤) (hT : Algebra.adjoin C T = ⊤) :
    (Algebra.adjoin E (algebraMap D F '' S)).restrictScalars C =
      (Algebra.adjoin D (algebraMap E F '' T)).restrictScalars C

(C : Type u_1)
(D : Type u_2)
(E : Type u_3)
(F : Type u_4)
[CommSemiring C]
[CommSemiring D]
[CommSemiring E]
[CommSemiring F]
[Algebra C D]
[Algebra C E]
[Algebra C F]
[Algebra D F]
[Algebra E F]
[IsScalarTower C D F]
[IsScalarTower C E F]
{S : Set D}
{T : Set E}
(hS : Algebra.adjoin C S = ⊤)
(hT : Algebra.adjoin C T = ⊤)

Subalgebra.restrictScalars C (Algebra.adjoin E (⇑(algebraMap D F) '' S)) =
  Subalgebra.restrictScalars C (Algebra.adjoin D (⇑(algebraMap E F) '' T))


@[simp]
theorem mem_const (a : α) : a ∈ const a


/-- Multiplication in a normed algebra over `𝕜` is analytic. -/
lemma analyticAt_mul (z : A × A) : AnalyticAt 𝕜 (fun x : A × A ↦ x.1 * x.2) z

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{A : Type u_8}
[NormedRing A]
[NormedAlgebra 𝕜 A]
(z : A × A)


/-- Singular part of the kernel `κ` with respect to the kernel `η`. -/
noncomputable
irreducible_def singularPart (κ η : Kernel α γ) [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    Kernel α γ

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

κ.singularPart η =
  (κ + η).withDensity fun a x =>
    ↑(κ.rnDerivAux (κ + η) a x).toNNReal - ↑(1 - κ.rnDerivAux (κ + η) a x).toNNReal * κ.rnDeriv η a x


theorem eventually_gt_nhds (hab : b < a) : ∀ᶠ x in 𝓝 a, b < x

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b : α}
(hab : b < a)


theorem ContDiffOn.pow {f : E → 𝔸} (hf : ContDiffOn 𝕜 n f s) (m : ℕ) :
    ContDiffOn 𝕜 n (fun y => f y ^ m) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{n : ℕ∞}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{f : E → 𝔸}
(hf : ContDiffOn 𝕜 n f s)
(m : ℕ)


theorem exists_iInter_of_mem_iInf {ι : Type*} {α : Type*} {f : ι → Filter α} {s}
    (hs : s ∈ ⨅ i, f i) : ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i

{ι : Type u_2}
{α : Type u_3}
{f : ι → Filter α}
{s : Set α}
(hs : s ∈ ⨅ i, f i)

∃ t, (∀ (i : ι), t i ∈ f i) ∧ s = ⋂ i, t i


theorem contravariant_flip_iff [IsSymmOp N N mu] :
    Contravariant N N (flip mu) r ↔ Contravariant N N mu r

(N : Type u_2)
(r : N → N → Prop)
(mu : N → N → N)
[IsSymmOp N N mu]


@[simp]
theorem vectorAllP_singleton (p : α → Prop) (x : α) : VectorAllP p (cons x []) = p x


private theorem m_pos [Nonempty α] (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) : 0 < m

(hPα : P.parts.card * 16 ^ P.parts.card ≤ Fintype.card α)


/-- `Basis.det` is not the zero map. -/
theorem Basis.det_ne_zero [Nontrivial R] : e.det ≠ 0

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
(e : Basis ι R M)
[Nontrivial R]


lemma ker_evalStarAlgHom_inter_adjoin_id (s : Set 𝕜) (h0 : 0 ∈ s) :
    (StarAlgebra.adjoin 𝕜 {restrict s (.id 𝕜)} : Set C(s, 𝕜)) ∩
      RingHom.ker (evalStarAlgHom 𝕜 𝕜 (⟨0, h0⟩ : s)) = adjoin 𝕜 {restrict s (.id 𝕜)}

{𝕜 : Type u_2}
[RCLike 𝕜]
(s : Set 𝕜)
(h0 : 0 ∈ s)

↑(StarAlgebra.adjoin 𝕜 {ContinuousMap.restrict s (ContinuousMap.id 𝕜)}) ∩
    ↑(RingHom.ker (ContinuousMap.evalStarAlgHom 𝕜 𝕜 ⟨0, h0⟩)) =
  ↑(NonUnitalStarAlgebra.adjoin 𝕜 {ContinuousMap.restrict s (ContinuousMap.id 𝕜)})


@[simp]
theorem unop_id {X : Cᵒᵖ} : (𝟙 X).unop = 𝟙 (unop X)

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

(CategoryTheory.CategoryStruct.id X).unop = CategoryTheory.CategoryStruct.id (Opposite.unop X)


theorem contMDiffWithinAt_fst {s : Set (M × N)} {p : M × N} :
    ContMDiffWithinAt (I.prod J) I n Prod.fst s p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{s : Set (M × N)}
{p : M × N}


theorem imageFactorization_eq {f : α → β} {s : Set α} :
    Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val

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

Subtype.val ∘ Set.imageFactorization f s = f ∘ Subtype.val


theorem dropLast_append_getLast : ∀ {l : List α} (h : l ≠ []), dropLast l ++ [getLast l h] = l


/-- The functor lifting a braided category to its center, using the braiding as the half-braiding.
-/
@[simps]
def ofBraided : MonoidalFunctor C (Center C)

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

(CategoryTheory.Center.ofBraided C).obj X = CategoryTheory.Center.ofBraidedObj X


@[simp]
theorem rotate_eq_rotate {l l' : List α} {n : ℕ} : l.rotate n = l'.rotate n ↔ l = l'


@[simp]
theorem map_join (f : α → β) : ∀ S, map f (join S) = join (map (map f) S)

{α : Type u}
{β : Type v}
(f : α → β)
(S : Stream'.Seq1 (Stream'.Seq1 α))

Stream'.Seq1.map f S.join = (Stream'.Seq1.map (Stream'.Seq1.map f) S).join


@[to_additive (attr := simp)]
theorem mem_op {x : Gᵐᵒᵖ} {S : Subgroup G} : x ∈ S.op ↔ x.unop ∈ S

{G : Type u_2}
[AddGroup G]
{x : Gᵃᵒᵖ}
{S : AddSubgroup G}


/-- The negative of a `C^n` function on a domain is `C^n`. -/
theorem ContDiffOn.neg {s : Set E} {f : E → F} (hf : ContDiffOn 𝕜 n f s) :
    ContDiffOn 𝕜 n (fun x => -f x) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{s : Set E}
{f : E → F}
(hf : ContDiffOn 𝕜 n f s)


theorem copy_eq (f : α →CO β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α →CO β)
(f' : α → β)
(h : f' = ⇑f)


theorem comp_eq_sum_left : p.comp q = p.sum fun e a => C a * q ^ e

p.comp q = p.sum fun e a => Polynomial.C a * q ^ e


theorem funMap_quotient_mk' {n : ℕ} (f : L.Functions n) (x : Fin n → M) :
    (funMap f fun i => (⟦x i⟧ : Quotient s)) = ⟦@funMap _ _ ps.toStructure _ f x⟧

{L : FirstOrder.Language}
{M : Type u_1}
(s : Setoid M)
[ps : L.Prestructure s]
{n : ℕ}
(f : L.Functions n)
(x : Fin n → M)

(FirstOrder.Language.Structure.funMap f fun i => ⟦x i⟧) = ⟦FirstOrder.Language.Structure.funMap f x⟧


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

(X : CategoryTheory.Endofunctor.Algebra G)

((CategoryTheory.Endofunctor.Algebra.functorOfNatTransEq h).hom.app X).f = CategoryTheory.CategoryStruct.id X.a


theorem limsInf_le_limsInf {f g : Filter α}
    (hf : f.IsBounded (· ≥ ·) := by isBoundedDefault)
    (hg : g.IsCobounded (· ≥ ·) := by isBoundedDefault)
    (h : ∀ a, (∀ᶠ n in f, a ≤ n) → ∀ᶠ n in g, a ≤ n) : limsInf f ≤ limsInf g

(hf : Filter.IsBounded (fun x x_1 => x ≥ x_1) f := by isBoundedDefault)

(hg : Filter.IsCobounded (fun x x_1 => x ≥ x_1) g := by isBoundedDefault)

(h : ∀ (a : α), (∀ᶠ (n : α) in f, a ≤ n) → ∀ᶠ (n : α) in g, a ≤ n)


@[simp]
lemma of_comul {X : Type v} [Ring X] [Bialgebra R X] :
    Coalgebra.comul (A := of R X) = Coalgebra.comul (R := R) (A := X)

{R : Type u}
[CommRing R]
{X : Type v}
[Ring X]
[Bialgebra R X]


@[simp 1100]
theorem dTo_comp_dFrom (j : ι) : C.dTo j ≫ C.dFrom j = 0


lemma mapRange_finsuppAntidiag_subset {e : μ ≃+ μ'} {s : Finset ι} {n : μ} :
    (finsuppAntidiag s n).map (mapRange.addEquiv e).toEmbedding ⊆ finsuppAntidiag s (e n)

{ι : Type u_1}
{μ : Type u_2}
{μ' : Type u_3}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
[AddCommMonoid μ']
[Finset.HasAntidiagonal μ']
[DecidableEq μ']
{e : μ ≃+ μ'}
{s : Finset ι}
{n : μ}

Finset.map (Finsupp.mapRange.addEquiv e).toEmbedding (s.finsuppAntidiag n) ⊆ s.finsuppAntidiag (e n)


@[simp]
theorem ofModule_asModule_act (g : G) (x : RestrictScalars k (MonoidAlgebra k G) ρ.asModule) :
    ofModule (k := k) (G := G) ρ.asModule g x = -- Porting note: more help with implicit
      (RestrictScalars.addEquiv _ _ _).symm
        (ρ.asModuleEquiv.symm (ρ g (ρ.asModuleEquiv (RestrictScalars.addEquiv _ _ _ x))))

((Representation.ofModule ρ.asModule) g) x =
  (RestrictScalars.addEquiv k (MonoidAlgebra k G) ρ.asModule).symm
    (ρ.asModuleEquiv.symm ((ρ g) (ρ.asModuleEquiv ((RestrictScalars.addEquiv k (MonoidAlgebra k G) ρ.asModule) x))))


theorem IsGLB.unique (Ha : IsGLB s a) (Hb : IsGLB s b) : a = b

{α : Type u}
[PartialOrder α]
{s : Set α}
{a b : α}
(Ha : IsGLB s a)
(Hb : IsGLB s b)


lemma memberSubfamily_image_insert (h𝒜 : ∀ s ∈ 𝒜, a ∉ s) :
    (𝒜.image <| insert a).memberSubfamily a = 𝒜

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{a : α}
(h𝒜 : ∀ s ∈ 𝒜, a ∉ s)

Finset.memberSubfamily a (Finset.image (insert a) 𝒜) = 𝒜


@[simp]
theorem symm_toEquiv (h : M ≃ₘ^n⟮I, J⟯ N) : h.symm.toEquiv = h.toEquiv.symm

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


theorem curry_injective : Function.Injective (curry : (A ⊗ Y ⟶ X) → (Y ⟶ A ⟶[C] X))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{A X Y : C}
[CategoryTheory.Closed A]


@[to_additive]
protected theorem inv (hab : Commute a b) : (a * b)⁻¹ = a⁻¹ * b⁻¹

{G : Type u_1}
[DivisionMonoid G]
{a b : G}
(hab : Commute a b)


@[simp]
theorem dual_Ioi : Ioi (toDual a) = ofDual ⁻¹' Iio a

Set.Ioi (OrderDual.toDual a) = ⇑OrderDual.ofDual ⁻¹' Set.Iio a


@[to_additive (attr := simp)]
lemma mk_inv [Inv M] (a : M) : mk (a⁻¹) = (mk a)⁻¹


theorem coeff_one [Nontrivial S] (h : IsAdjoinRootMonic S f) : h.coeff 1 = Pi.single 0 1

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


/-- A separable polynomial is square-free.

See `PerfectField.separable_iff_squarefree` for the converse when the coefficients are a perfect
field. -/
theorem Separable.squarefree {p : R[X]} (hsep : Separable p) : Squarefree p

{R : Type u}
[CommSemiring R]
{p : R[X]}
(hsep : p.Separable)


@[simp] theorem getElem_reverse (l : List α) (i : Nat) (h1 h2) :
    (reverse l)[length l - 1 - i]'h1 = l[i]'h2

(h1 : l.length - 1 - i < l.reverse.length)


@[simp]
theorem spanningCoe_bot : (⊥ : Subgraph G).spanningCoe = ⊥


@[reassoc]
lemma mapComp_assoc_right {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
    F.mapComp f (g ≫ h) ≫ F.map f ◁ F.mapComp g h = F.map₂ (α_ f g h).inv ≫
    F.mapComp (f ≫ g) h ≫ F.mapComp f g ▷ F.map h ≫
    (α_ (F.map f) (F.map g) (F.map h)).hom

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)
{a b c d : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)

CategoryTheory.CategoryStruct.comp (F.mapComp f (CategoryTheory.CategoryStruct.comp g h))
    (CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapComp g h)) =
  CategoryTheory.CategoryStruct.comp (F.map₂ (CategoryTheory.Bicategory.associator f g h).inv)
    (CategoryTheory.CategoryStruct.comp (F.mapComp (CategoryTheory.CategoryStruct.comp f g) h)
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (F.mapComp f g) (F.map h))
        (CategoryTheory.Bicategory.associator (F.map f) (F.map g) (F.map h)).hom))


@[simp]
theorem ciSup_partialSups_eq {f : ℕ → α} (h : BddAbove (Set.range f)) :
    ⨆ n, partialSups f n = ⨆ n, f n

{α : Type u_1}
[ConditionallyCompleteLattice α]
{f : ℕ → α}
(h : BddAbove (Set.range f))


theorem tendsto_atBot_add_left_of_ge (C : β) (hf : ∀ x, f x ≤ C) (hg : Tendsto g l atBot) :
    Tendsto (fun x => f x + g x) l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommGroup β]
(l : Filter α)
{f g : α → β}
(C : β)
(hf : ∀ (x : α), f x ≤ C)
(hg : Filter.Tendsto g l Filter.atBot)

Filter.Tendsto (fun x => f x + g x) l Filter.atBot


/-- Let `V` be a real topological vector space. A subset of `V` is a convex body if and only if
it is convex, compact, and nonempty.
-/
structure ConvexBody (V : Type*) [TopologicalSpace V] [AddCommMonoid V] [SMul ℝ V] where
  /-- The **carrier set** underlying a convex body: the set of points contained in it -/
  carrier : Set V
  /-- A convex body has convex carrier set -/
  convex' : Convex ℝ carrier
  /-- A convex body has compact carrier set -/
  isCompact' : IsCompact carrier
  /-- A convex body has non-empty carrier set -/
  nonempty' : carrier.Nonempty

{V : Type u_2}
[TopologicalSpace V]
[AddCommMonoid V]
[SMul ℝ V]
(self : ConvexBody V)


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

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


@[simp] theorem insert_of_not_mem {l : List α} (h : a ∉ l) : l.insert a = a :: l

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{a : α}
{l : List α}
(h : ¬a ∈ l)


/-- If a function is continuous on a measurable set `s`, then it is measurable at the filter
  `𝓝[s] x` for all `x`. -/
theorem ContinuousOn.stronglyMeasurableAtFilter_nhdsWithin {α β : Type*} [MeasurableSpace α]
    [TopologicalSpace α] [OpensMeasurableSpace α] [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopologyEither α β] {f : α → β} {s : Set α} {μ : Measure α}
    (hf : ContinuousOn f s) (hs : MeasurableSet s) (x : α) :
    StronglyMeasurableAtFilter f (𝓝[s] x) μ


@[simp]
theorem manyOneReducible_toNat_toNat {p : Set α} {q : Set β} : toNat p ≤₀ toNat q ↔ p ≤₀ q

{α : Type u}
[Primcodable α]
[Inhabited α]
{β : Type v}
[Primcodable β]
[Inhabited β]
{p : Set α}
{q : Set β}


theorem pow {p : N} (n : ℕ) (h : IsIdempotentElem p) : IsIdempotentElem (p ^ n)

{N : Type u_2}
[Monoid N]
{p : N}
(n : ℕ)
(h : IsIdempotentElem p)


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

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

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.BinaryBicone.ofColimitCocone ht).inl = t.ι.app { as := CategoryTheory.Limits.WalkingPair.left }


@[to_additive (attr := measurability)]
theorem Multiset.aemeasurable_prod (s : Multiset (α → M)) (hs : ∀ f ∈ s, AEMeasurable f μ) :
    AEMeasurable (fun x => (s.map fun f : α → M => f x).prod) μ

{M : Type u_2}
{α : Type u_4}
[AddCommMonoid M]
[MeasurableSpace M]
[MeasurableAdd₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : Multiset (α → M))
(hs : ∀ f ∈ s, AEMeasurable f μ)

AEMeasurable (fun x => (Multiset.map (fun f => f x) s).sum) μ


@[to_additive (attr := simp)]
theorem prod_mk : prod (mk L) = List.prod (L.map fun x => cond x.2 x.1 x.1⁻¹)

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

FreeGroup.prod (FreeGroup.mk L) = (List.map (fun x => bif x.2 then x.1 else x.1⁻¹) L).prod


theorem div_mul_cancel : ∀ {a b : Ordinal}, a ≠ 0 → a ∣ b → a * (b / a) = b


@[simp]
theorem mem_subtype {p : α → Prop} [DecidablePred p] {s : Finset α} :
    ∀ {a : Subtype p}, a ∈ s.subtype p ↔ (a : α) ∈ s

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s : Finset α}
{a : Subtype p}


theorem map_comap (f : Filter β) (m : α → β) : (f.comap m).map m = f ⊓ 𝓟 (range m)

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

Filter.map m (Filter.comap m f) = f ⊓ 𝓟 (Set.range m)


/-- Let `n : ℤ` and `s` a subset of a commutative group `G` that is invariant under preimage for
the map `x ↦ x^n`. Then `s` is invariant under the pointwise action of the subgroup of elements
`g : G` such that `g^(n^j) = 1` for some `j : ℕ`. (This subgroup is called the Prüfer subgroup when
 `G` is the `Circle` and `n` is prime.) -/
@[to_additive
      "Let `n : ℤ` and `s` a subset of an additive commutative group `G` that is invariant
      under preimage for the map `x ↦ n • x`. Then `s` is invariant under the pointwise action of
      the additive subgroup of elements `g : G` such that `(n^j) • g = 0` for some `j : ℕ`.
      (This additive subgroup is called the Prüfer subgroup when `G` is the `AddCircle` and `n` is
      prime.)"]
theorem smul_eq_self_of_preimage_zpow_eq_self {G : Type*} [CommGroup G] {n : ℤ} {s : Set G}
    (hs : (fun x => x ^ n) ⁻¹' s = s) {g : G} {j : ℕ} (hg : g ^ n ^ j = 1) : g • s = s

{G : Type u_1}
[AddCommGroup G]
{n : ℤ}
{s : Set G}
(hs : (fun x => n • x) ⁻¹' s = s)
{g : G}
{j : ℕ}
(hg : n ^ j • g = 0)


@[simp]
theorem prod_assoc_preimage {α β γ} {s : Set α} {t : Set β} {u : Set γ} :
    Equiv.prodAssoc α β γ ⁻¹' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{u : Set γ}

⇑(Equiv.prodAssoc α β γ) ⁻¹' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u


@[simp]
theorem sum_affineCombinationSingleWeights [DecidableEq ι] {i : ι} (h : i ∈ s) :
    ∑ j ∈ s, affineCombinationSingleWeights k i j = 1

(k : Type u_1)
[Ring k]
{ι : Type u_4}
(s : Finset ι)
[DecidableEq ι]
{i : ι}
(h : i ∈ s)

∑ j ∈ s, Finset.affineCombinationSingleWeights k i j = 1


@[simp, mfld_simps]
theorem tangentMapWithin_proj {p : TangentBundle I M} :
    (tangentMapWithin I I' f s p).proj = f p.proj

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
{p : TangentBundle I M}


@[simp]
theorem one_eq_zero_iff [NeZero n] : (1 : Fin n) = 0 ↔ n = 1


theorem complete'' : ∃ q : ℚ_[p], ∀ ε > 0, ∃ N, ∀ i ≥ N, padicNormE (f i - q : ℚ_[p]) < ε

{p : ℕ}
[Fact (Nat.Prime p)]
(f : CauSeq ℚ_[p] ⇑padicNormE)

∃ q, ∀ ε > 0, ∃ N, ∀ i ≥ N, padicNormE (↑f i - q) < ε


theorem generate_union {s t : Set (Set α)} :
    Filter.generate (s ∪ t) = Filter.generate s ⊓ Filter.generate t


protected theorem injective (e : X ≃ᵈ Y) : Injective e

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


theorem castSucc_lt_or_lt_succ (p : Fin (n + 1)) (i : Fin n) : castSucc i < p ∨ p < i.succ


theorem cos_sub_int_mul_pi (x : ℝ) (n : ℤ) : cos (x - n * π) = (-1) ^ n * cos x

Real.cos (x - ↑n * Real.pi) = (-1) ^ n * Real.cos x


protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ

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


theorem compLinearMap_inj (f : ∀ i, M₁ i →ₗ[R] M₁' i) (hf : ∀ i, Surjective (f i))
    (g₁ g₂ : MultilinearMap R M₁' M₂) : g₁.compLinearMap f = g₂.compLinearMap f ↔ g₁ = g₂

(hf : ∀ (i : ι), Function.Surjective ⇑(f i))


theorem IsBigOWith.right_le_sub_of_lt_one {f₁ f₂ : α → E'} (h : IsBigOWith c l f₁ f₂) (hc : c < 1) :
    IsBigOWith (1 / (1 - c)) l f₂ fun x => f₂ x - f₁ x

{α : Type u_1}
{E' : Type u_6}
[SeminormedAddCommGroup E']
{c : ℝ}
{l : Filter α}
{f₁ f₂ : α → E'}
(h : Asymptotics.IsBigOWith c l f₁ f₂)
(hc : c < 1)

Asymptotics.IsBigOWith (1 / (1 - c)) l f₂ fun x => f₂ x - f₁ x


theorem rpow_neg_one (x : ℝ) : x ^ (-1 : ℝ) = x⁻¹


@[simp]
theorem eval₂Hom_comp_C (f : R →+* S) (g : σ → S) : (eval₂Hom f g).comp C = f

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(g : σ → S)

(MvPolynomial.eval₂Hom f g).comp MvPolynomial.C = f


theorem ceil_add_ceil_le (a b : α) : ⌈a⌉ + ⌈b⌉ ≤ ⌈a + b⌉ + 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a b : α)


@[simp] theorem update_size (self : Buckets α β) (i d h) :
    (self.update i d h).1.size = self.1.size

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

(self.update i d h).val.size = self.val.size


/-- Two measures are equal if they have equal restrictions on a spanning collection of sets
  (formulated using `Union`). -/
theorem ext_iff_of_iUnion_eq_univ [Countable ι] {s : ι → Set α} (hs : ⋃ i, s i = univ) :
    μ = ν ↔ ∀ i, μ.restrict (s i) = ν.restrict (s i)

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[Countable ι]
{s : ι → Set α}
(hs : ⋃ i, s i = Set.univ)

μ = ν ↔ ∀ (i : ι), μ.restrict (s i) = ν.restrict (s i)


theorem Mem.duplicate_cons_self (h : x ∈ l) : x ∈+ x :: l

{α : Type u_1}
{l : List α}
{x : α}
(h : x ∈ l)


/-- The tangent of an angle in a right-angled triangle as a ratio of sides, version subtracting
vectors. -/
theorem tan_oangle_sub_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.tan (o.oangle y (y - x)) = ‖x‖ / ‖y‖

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


/-- A variant of `of_isLimit` that is more useful with `apply`. -/
theorem of_isLimit' (w : CommSq fst snd f g) (h : Limits.IsLimit w.cone) :
    IsPullback fst snd f g

(h : CategoryTheory.Limits.IsLimit w.cone)


lemma fderiv_eq_deriv_mul {f : 𝕜 → 𝕜} {x y : 𝕜} : (fderiv 𝕜 f x : 𝕜 → 𝕜) y = (deriv f x) * y

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{f : 𝕜 → 𝕜}
{x y : 𝕜}


protected theorem mul_inv_cancel {p : Ring.DirectLimit G f} (hp : p ≠ 0) : p * inv G f p = 1

{ι : Type v}
[Preorder ι]
(G : ι → Type w)
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
[(i : ι) → Field (G i)]
(f : (i j : ι) → i ≤ j → G i → G j)
{p : Ring.DirectLimit G f}
(hp : p ≠ 0)


@[simp]
lemma fst_compProd (κ : Kernel α β) (η : Kernel (α × β) γ) [IsSFiniteKernel κ] [IsMarkovKernel η] :
    fst (κ ⊗ₖ η) = κ

(η : ProbabilityTheory.Kernel (α × β) γ)


theorem upperCentralSeries_mono : Monotone (upperCentralSeries G)


theorem HasBasis.frequently_iff (hl : l.HasBasis p s) {q : α → Prop} :
    (∃ᶠ x in l, q x) ↔ ∀ i, p i → ∃ x ∈ s i, q x

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

(∃ᶠ (x : α) in l, q x) ↔ ∀ (i : ι), p i → ∃ x ∈ s i, q x


lemma LSeries.one_convolution_eq_zeta_convolution {R : Type*} [Semiring R] (f : ℕ → R) :
    (1 : ℕ → R) ⍟ f = ((ArithmeticFunction.zeta ·) : ℕ → R) ⍟ f

1 ⍟ f = (fun x => ↑(ArithmeticFunction.zeta x)) ⍟ f


theorem unbounded_le_Ici [SemilatticeSup α] [NoMaxOrder α] (a : α) :
    Unbounded (· ≤ ·) (Ici a)

{α : Type u_1}
[SemilatticeSup α]
[NoMaxOrder α]
(a : α)

Set.Unbounded (fun x x_1 => x ≤ x_1) (Set.Ici a)


theorem setLIntegral_measure_zero (s : Set α) (f : α → ℝ≥0∞) (hs' : μ s = 0) :
    ∫⁻ x in s, f x ∂μ = 0

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


/-- The Monge point is the only point in all the Monge planes from any
one vertex. -/
theorem eq_mongePoint_of_forall_mem_mongePlane {n : ℕ} {s : Simplex ℝ P (n + 2)} {i₁ : Fin (n + 3)}
    {p : P} (h : ∀ i₂, i₁ ≠ i₂ → p ∈ s.mongePlane i₁ i₂) : p = s.mongePoint

(h : ∀ (i₂ : Fin (n + 3)), i₁ ≠ i₂ → p ∈ s.mongePlane i₁ i₂)


/-- If a set of points is a subset of another set of points, then its span will be contained in the
span of that set. -/
@[mono]
theorem monotone_span : Monotone (span : Set (ℙ K V) → Subspace K V)

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]


theorem sub_sub_sub {X Y : C} (a b c d : X ⟶ Y) : a - c - (b - d) = a - b - (c - d)


@[to_additive (attr := simp)]
theorem div_empty (s : Finset α) : s / ∅ = ∅

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


/-- Product of a list of elements in a `Subsemiring` is in the `Subsemiring`. -/
nonrec theorem list_prod_mem {R : Type*} [Semiring R] (s : Subsemiring R) {l : List R} :
    (∀ x ∈ l, x ∈ s) → l.prod ∈ s

{R : Type u_1}
[Semiring R]
(s : Subsemiring R)
{l : List R}


/-- The infimum of a set of congruence relations is the same as the infimum of the set's image
    under the map to the underlying binary relation. -/
@[to_additive (attr := simp, norm_cast)
  "The infimum of a set of additive congruence relations is the same as the infimum
  of the set's image under the map to the underlying binary relation."]
theorem coe_sInf (S : Set (Con M)) :
    ⇑(sInf S) = sInf ((⇑) '' S)

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


@[ext] theorem UInt8.ext : {x y : UInt8} → x.toNat = y.toNat → x = y


@[to_additive]
theorem image_mulSingle_uIcc_right (i : ι) (b : α i) :
    Pi.mulSingle i '' uIcc 1 b = uIcc 1 (Pi.mulSingle i b)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Lattice (α i)]
[DecidableEq ι]
[(i : ι) → Zero (α i)]
(i : ι)
(b : α i)

Pi.single i '' Set.uIcc 0 b = Set.uIcc 0 (Pi.single i b)


@[simp, mfld_simps]
theorem left_inv {x : X} (h : x ∈ e.source) : e.symm (e x) = x

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


@[simp]
theorem finrank_eq_one_iff [Nontrivial E] [Module.Free F S] : finrank F S = 1 ↔ S = ⊥

{F : Type u_1}
{E : Type u_2}
[CommRing F]
[StrongRankCondition F]
[Ring E]
[Algebra F E]
{S : Subalgebra F E}
[Nontrivial E]
[Module.Free F ↥S]

FiniteDimensional.finrank F ↥S = 1 ↔ S = ⊥


/-- One direction of `div_le_iff` where `b` is allowed to be `0` (but `c` must be nonnegative) -/
theorem div_le_of_nonneg_of_le_mul (hb : 0 ≤ b) (hc : 0 ≤ c) (h : a ≤ c * b) : a / b ≤ c

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c : α}
(hb : 0 ≤ b)
(hc : 0 ≤ c)
(h : a ≤ c * b)


theorem separated_pureCauchy_injective {α : Type*} [UniformSpace α] [T0Space α] :
    Function.Injective fun a : α => SeparationQuotient.mk (pureCauchy a)

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

Function.Injective fun a => SeparationQuotient.mk (CauchyFilter.pureCauchy a)


theorem Memℒp.left_of_add_measure {f : α → E} (h : Memℒp f p (μ + ν)) : Memℒp f p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f : α → E}
(h : MeasureTheory.Memℒp f p (μ + ν))


/-- In a pseudometric space, the extended distance is always finite-/
theorem edist_lt_top {α : Type*} [PseudoMetricSpace α] (x y : α) : edist x y < ⊤

{α : Type u_3}
[PseudoMetricSpace α]
(x y : α)


@[simp]
theorem BinaryBicone.fstKernelFork_ι : (BinaryBicone.fstKernelFork c).ι = c.inr

(c : CategoryTheory.Limits.BinaryBicone X Y)

CategoryTheory.Limits.Fork.ι c.fstKernelFork = c.inr


/-- Intermediate stage of assembling the unit. -/
@[simps!]
def unitAuxAux {F : Cᵒᵖ ⥤ Type v} (η : F ⟶ A) :
    yonedaCollectionPresheaf A (restrictedYonedaObj η) ≅ F

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

∀
  (a :
    (CategoryTheory.OverPresheafAux.yonedaCollectionPresheaf A
          (CategoryTheory.OverPresheafAux.restrictedYonedaObj η)).obj
      X),
  (CategoryTheory.OverPresheafAux.unitAuxAux η).hom.app X a =
    CategoryTheory.OverPresheafAux.unitForward η (Opposite.unop X) a


lemma exterior_singleton_subset_iff_mem_nhds : exterior {a} ⊆ t ↔ t ∈ 𝓝 a

{α : Type u_3}
[TopologicalSpace α]
{t : Set α}
{a : α}
[AlexandrovDiscrete α]


@[mono]
protected lemma Connected.mono {G G' : SimpleGraph V} (h : G ≤ G')
    (hG : G.Connected) : G'.Connected

{V : Type u}
{G G' : SimpleGraph V}
(h : G ≤ G')
(hG : G.Connected)


theorem lt_one (a : R) : a ≺ (1 : R) → a = 0

{R : Type u}
[EuclideanDomain R]
(a : R)


theorem comp_ι_eq : f.comp (ι f g) = g.comp (ι f g)

{V : Type u_1}
{W : Type u_2}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
(f g : NormedAddGroupHom V W)

f.comp (NormedAddGroupHom.Equalizer.ι f g) = g.comp (NormedAddGroupHom.Equalizer.ι f g)


/-- When multiplication is commutative, `star` preserves division. -/
@[simp]
theorem star_div' [Semifield R] [StarRing R] (x y : R) : star (x / y) = star x / star y

{R : Type u}
[Semifield R]
[StarRing R]
(x y : R)


theorem foldl_assoc_comm_cons {l : List α} {a₁ a₂} : ((a₁ :: l) <*> a₂) = a₁ ⋆ l <*> a₂

{α : Type u}
{op : α → α → α}
[ha : Std.Associative op]
[hc : Std.Commutative op]
{l : List α}
{a₁ a₂ : α}

List.foldl op a₂ (a₁ :: l) = op a₁ (List.foldl op a₂ l)


theorem leadingCoeff_add_of_degree_lt (h : degree p < degree q) :
    leadingCoeff (p + q) = leadingCoeff q

{R : Type u}
[Semiring R]
{p q : R[X]}
(h : p.degree < q.degree)


theorem isCompactOpen_iff_eq_basicOpen_union {X : Scheme} [IsAffine X] (U : Set X) :
    IsCompact U ∧ IsOpen U ↔
      ∃ s : Set Γ(X, ⊤), s.Finite ∧ U = ⋃ i ∈ s, X.basicOpen i

{X : AlgebraicGeometry.Scheme}
[AlgebraicGeometry.IsAffine X]
(U : Set ↑↑X.toPresheafedSpace)

IsCompact U ∧ IsOpen U ↔ ∃ s, s.Finite ∧ U = ⋃ i ∈ s, ↑(X.basicOpen i)


@[to_additive]
theorem div_mul_div_comm : a / b * (c / d) = a * c / (b * d)

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


@[simp] theorem isClique_map_image_iff {f : α ↪ β} :
    (G.map f).IsClique (f '' s) ↔ G.IsClique s

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{s : Set α}
{f : α ↪ β}

(SimpleGraph.map f G).IsClique (⇑f '' s) ↔ G.IsClique s


theorem symmDiff_symmDiff_right :
    a ∆ (b ∆ c) = a \ (b ⊔ c) ⊔ b \ (a ⊔ c) ⊔ c \ (a ⊔ b) ⊔ a ⊓ b ⊓ c

{α : Type u_2}
[GeneralizedBooleanAlgebra α]
(a b c : α)


/-- **Tychonoff's theorem**: product of compact sets is compact. -/
theorem isCompact_pi_infinite {s : ∀ i, Set (X i)} :
    (∀ i, IsCompact (s i)) → IsCompact { x : ∀ i, X i | ∀ i, x i ∈ s i }

{ι : Type u_1}
{X : ι → Type u_2}
[(i : ι) → TopologicalSpace (X i)]
{s : (i : ι) → Set (X i)}

(∀ (i : ι), IsCompact (s i)) → IsCompact {x | ∀ (i : ι), x i ∈ s i}


theorem ultrafilterBasis_is_basis : TopologicalSpace.IsTopologicalBasis (ultrafilterBasis α)


@[simp, mfld_simps]
theorem modelWithCornersSelf_coe_symm : (𝓘(𝕜, E).symm : E → E) = id

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(E : Type u_2)
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]


/-- There are `b / r + [v % r < b % r]` numbers in `[0, b)` congruent to `v` mod `r`,
where `[·]` is the Iverson bracket. -/
theorem count_modEq_card (v : ℕ) :
    b.count (· ≡ v [MOD r]) = b / r + if v % r < b % r then 1 else 0

Nat.count (fun x => x ≡ v [MOD r]) b = b / r + if v % r < b % r then 1 else 0


/-- `F.flip` is isomorphic to uncurrying `F`, swapping the variables, and currying. -/
@[simps!]
def flipIsoCurrySwapUncurry (F : C ⥤ D ⥤ E) : F.flip ≅ curry.obj (Prod.swap _ _ ⋙ uncurry.obj F)

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

∀ (X_1 : C),
  ((CategoryTheory.flipIsoCurrySwapUncurry F).hom.app X).app X_1 = CategoryTheory.CategoryStruct.id ((F.obj X_1).obj X)


/-- Given `φ : F ⟶ G`, this is the cocycle in `Cocycle K (mappingCone φ) n` that is
constructed from `α : Cochain K F m` (with `n + 1 = m`) and `β : Cocycle K G n`,
when a suitable cocycle relation is satisfied. -/
@[simps!]
noncomputable def liftCocycle {K : CochainComplex C ℤ} {n m : ℤ}
    (α : Cocycle K F m) (β : Cochain K G n) (h : n + 1 = m)
    (eq : δ n m β + α.1.comp (Cochain.ofHom φ) (add_zero m) = 0) :
    Cocycle K (mappingCone φ) n

(α : CochainComplex.HomComplex.Cocycle K F m)

(β : CochainComplex.HomComplex.Cochain K G n)

(eq : CochainComplex.HomComplex.δ n m β + (↑α).comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯ = 0)

↑(CochainComplex.mappingCone.liftCocycle φ α β h eq) = CochainComplex.mappingCone.liftCochain φ (↑α) β h


/-- `TensorProduct.comm` corresponds to a permutation of the identity matrix. -/
theorem TensorProduct.toMatrix_comm :
    toMatrix (bM.tensorProduct bN) (bN.tensorProduct bM) (TensorProduct.comm R M N) =
      (1 : Matrix (ι × κ) (ι × κ) R).submatrix Prod.swap _root_.id

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{ι : Type u_7}
{κ : Type u_8}
[DecidableEq ι]
[DecidableEq κ]
[Fintype ι]
[Fintype κ]
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(bM : Basis ι R M)
(bN : Basis κ R N)

(LinearMap.toMatrix (bM.tensorProduct bN) (bN.tensorProduct bM)) ↑(TensorProduct.comm R M N) =
  Matrix.submatrix 1 Prod.swap id


theorem neg_one_mul {R} [Ring R] {a b : R} (_ : (Int.negOfNat (nat_lit 1)).rawCast * a = b) :
    -a = b

(Int.negOfNat 1).rawCast * a = b → -a = b


theorem single_apply_of_ne {a₁ a₂ : α} (h : a₁ ≠ a₂) (b : β) : single a₁ b a₂ = none

{α : Type u}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
{a₁ a₂ : α}
(h : a₁ ≠ a₂)
(b : β)


protected theorem zero_add [NeZero n] (k : Fin n) : 0 + k = k


@[to_additive]
theorem mul_le_of_mul_le_left [CovariantClass α α (· * ·) (· ≤ ·)] {a b c d : α} (h : a * b ≤ c)
    (hle : d ≤ b) :
    a * d ≤ c

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


theorem arcsin_eq_arctan {x : ℝ} (h : x ∈ Ioo (-(1 : ℝ)) 1) :
    arcsin x = arctan (x / √(1 - x ^ 2))

Real.arcsin x = Real.arctan (x / √(1 - x ^ 2))


protected theorem Nontrivial.ne_empty (hs : s.Nontrivial) : s ≠ ∅

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


@[simp]
theorem isLittleO_one_iff : f' =o[l] (fun _x => 1 : α → F) ↔ Tendsto f' l (𝓝 0)

{α : Type u_1}
(F : Type u_4)
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{f' : α → E'}
{l : Filter α}
[One F]
[NormOneClass F]

(f' =o[l] fun _x => 1) ↔ Filter.Tendsto f' l (𝓝 0)


theorem lower_bound_le_one' (hN : 2 ≤ N) (hN' : N ≤ 4096) :
    (N : ℝ) * exp (-4 * √(log N)) ≤ 1


theorem extract.go₂_append_left : ∀ (s t : List Char) (i e : Nat),
    e = utf8Len s + i → go₂ (s ++ t) ⟨i⟩ ⟨e⟩ = s

e = String.utf8Len s + i → String.extract.go₂ (s ++ t) { byteIdx := i } { byteIdx := e } = s


theorem locallyConvexSpace_iff_exists_convex_subset :
    LocallyConvexSpace 𝕜 E ↔ ∀ x : E, ∀ U ∈ 𝓝 x, ∃ S ∈ 𝓝 x, Convex 𝕜 S ∧ S ⊆ U

(𝕜 : Type u_1)
(E : Type u_2)
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]

LocallyConvexSpace 𝕜 E ↔ ∀ (x : E), ∀ U ∈ 𝓝 x, ∃ S ∈ 𝓝 x, Convex 𝕜 S ∧ S ⊆ U


theorem colimit.ι_coconeMorphism {F : J ⥤ C} [HasColimit F] (c : Cocone F) (j : J) :
    colimit.ι F j ≫ (colimit.coconeMorphism c).hom = c.ι.app j

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

CategoryTheory.Limits.colimit.ι F j ≫ (CategoryTheory.Limits.colimit.coconeMorphism c).hom = c.ι.app j


theorem LowerSemicontinuous.measurable [TopologicalSpace δ] [OpensMeasurableSpace δ] {f : δ → α}
    (hf : LowerSemicontinuous f) : Measurable f

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[LinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
[TopologicalSpace δ]
[OpensMeasurableSpace δ]
{f : δ → α}
(hf : LowerSemicontinuous f)


@[simp] theorem mul_top (h : a ≠ 0) : a * ∞ = ∞


/-- Bijection between types of morphisms in two localized categories
for the same class of morphisms `W`. -/
@[simps (config := .lemmasOnly) apply]
noncomputable def homEquiv :
    (L₁.obj X ⟶ L₁.obj Y) ≃ (L₂.obj X ⟶ L₂.obj Y)

(CategoryTheory.Localization.homEquiv W L₁ L₂) f = (CategoryTheory.LocalizerMorphism.id W).homMap L₁ L₂ f


private lemma ite_pos [LT α] (ha : 0 < a) (hb : 0 < b) : 0 < ite p a b

{α : Type u_1}
[Zero α]
(p : Prop)
[Decidable p]
{a b : α}
[LT α]
(ha : 0 < a)
(hb : 0 < b)


/-- Given families of generators `X ⊆ T` over `S` and `Y ⊆ S` over `R`,
there is a map of generators `R[Y] → R[X, Y]`. -/
@[simps]
noncomputable
def toComp (Q : Generators S T) (P : Generators R S) : Hom P (Q.comp P)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{T : Type u_1}
[CommRing T]
[Algebra R T]
[Algebra S T]
[IsScalarTower R S T]
(Q : Algebra.Generators S T)
(P : Algebra.Generators R S)
(i : P.vars)

(Q.toComp P).val i = MvPolynomial.X (Sum.inr i)


/-- (Impl) Construct the lifted cone in `Algebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D

(D : CategoryTheory.Functor J T.Algebra)

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

(CategoryTheory.Monad.ForgetCreatesLimits.liftedCone D c t).pt =
  CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t


theorem coe_toNat_le_self (n : ℕ∞) : ↑(toNat n) ≤ n


lemma X_ne_zero_of_Z_eq_zero [NoZeroDivisors R] {P : Fin 3 → R} (hP : W'.Nonsingular P)
    (hPz : P z = 0) : P x ≠ 0

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


theorem Raised.add_left (k) {n m} (H : Raised n m) : Raised (k + n) (k + m)

(k : ℕ)
{n m : ℕ}
(H : Ordnode.Raised n m)


/-- Auxiliary lemmas for the "monotonicity on a fundamental interval implies monotonicity" lemmas.
We formulate it for any relation so that the proof works both for `Monotone` and `StrictMono`. -/
protected theorem rel_map_of_Icc [LinearOrderedAddCommGroup G] [Archimedean G] [AddGroup H]
    [AddConstMapClass F G H a b] {f : F} {R : H → H → Prop} [IsTrans H R]
    [hR : CovariantClass H H (fun x y ↦ y + x) R] (ha : 0 < a) {l : G}
    (hf : ∀ x ∈ Icc l (l + a), ∀ y ∈ Icc l (l + a), x < y → R (f x) (f y)) :
    ((· < ·) ⇒ R) f f

[hR : CovariantClass H H (fun x y => y + x) R]

(hf : ∀ x ∈ Set.Icc l (l + a), ∀ y ∈ Set.Icc l (l + a), x < y → R (f x) (f y))


@[simp]
theorem coe_inr : (inr R A B : B → A × B) = Prod.mk 0

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[StarAddMonoid A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[StarAddMonoid B]

⇑(NonUnitalStarAlgHom.inr R A B) = Prod.mk 0


theorem hasGradientAt_iff_hasFDerivAt :
    HasGradientAt f f' x ↔ HasFDerivAt f (toDual 𝕜 F f') x

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

HasGradientAt f f' x ↔ HasFDerivAt f ((InnerProductSpace.toDual 𝕜 F) f') x


theorem ball_mono {V W : Set (β × β)} (h : V ⊆ W) (x : β) : ball x V ⊆ ball x W

{β : Type ub}
{V W : Set (β × β)}
(h : V ⊆ W)
(x : β)

UniformSpace.ball x V ⊆ UniformSpace.ball x W


theorem mulN_coeff (n : ℕ) (x : 𝕎 R) (k : ℕ) :
    (x * n).coeff k = aeval x.coeff (wittMulN p n k)

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

(x * ↑n).coeff k = (MvPolynomial.aeval x.coeff) (WittVector.wittMulN p n k)


theorem integrableOn_zero : IntegrableOn (fun _ => (0 : E)) s μ

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

MeasureTheory.IntegrableOn (fun x => 0) s μ


theorem inf_sup_left (a b c : α) : a ⊓ (b ⊔ c) = a ⊓ b ⊔ a ⊓ c

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


@[simp]
theorem mirror_eq_zero : p.mirror = 0 ↔ p = 0

{R : Type u_1}
[Semiring R]
{p : Polynomial R}


@[reassoc (attr := simp)]
lemma cyclesIso_inv_comp_iCycles : h.cyclesIso.inv ≫ S.iCycles = h.i

CategoryTheory.CategoryStruct.comp h.cyclesIso.inv S.iCycles = h.i


@[symm]
theorem Equiv.symm : ∀ {s t : WSeq α}, s ~ʷ t → t ~ʷ s


protected theorem hasSum : HasSum f (⨆ s : Finset α, ∑ a ∈ s, f a)


@[simp, norm_cast]
theorem coe_sup : ⇑(p ⊔ q) = ⇑p ⊔ ⇑q

{E : Type u_4}
[AddGroup E]
(p q : NonarchAddGroupSeminorm E)


theorem condexpL1CLM_smul (c : 𝕜) (f : α →₁[μ] F') :
    condexpL1CLM F' hm μ (c • f) = c • condexpL1CLM F' hm μ f

{α : Type u_1}
{F' : Type u_4}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(c : 𝕜)
(f : ↥(MeasureTheory.Lp F' 1 μ))

(MeasureTheory.condexpL1CLM F' hm μ) (c • f) = c • (MeasureTheory.condexpL1CLM F' hm μ) f


@[simp]
theorem comp_apply {M N K : Mat R} (f : M ⟶ N) (g : N ⟶ K) (i k) :
    (f ≫ g) i k = ∑ j : N, f i j * g j k

(R : Type u)
[Semiring R]
{M N K : CategoryTheory.Mat R}
(f : M ⟶ N)
(g : N ⟶ K)
(i : ↑M)
(k : ↑K)


lemma exp_sub_sum_range_isBigO_pow (n : ℕ) :
    (fun x ↦ exp x - ∑ i ∈ Finset.range n, x ^ i / i !) =O[𝓝 0] (· ^ n)

(fun x => Real.exp x - ∑ i ∈ Finset.range n, x ^ i / ↑i !) =O[𝓝 0] fun x => x ^ n


theorem ker_liftQ (f : M →ₛₗ[τ₁₂] M₂) (h) : ker (p.liftQ f h) = (ker f).map (mkQ p)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
(f : M →ₛₗ[τ₁₂] M₂)
(h : p ≤ LinearMap.ker f)

LinearMap.ker (p.liftQ f h) = Submodule.map p.mkQ (LinearMap.ker f)


/-- The validity predicate for an `Ordnode` subtree. This asserts that the `size` fields are
correct, the tree is balanced, and the elements of the tree are organized according to the
ordering. This version of `Valid` also puts all elements in the tree in the interval `(lo, hi)`. -/
structure Valid' (lo : WithBot α) (t : Ordnode α) (hi : WithTop α) : Prop where
  ord : t.Bounded lo hi
  sz : t.Sized
  bal : t.Balanced

{α : Type u_1}
[Preorder α]
{lo : WithBot α}
{t : Ordnode α}
{hi : WithTop α}
(self : Ordnode.Valid' lo t hi)


/-- If `z = lineMap x y c` is a point on the line passing through `x` and `y`, then the open
segment `openSegment 𝕜 x y` is included in the union of the open segments `openSegment 𝕜 x z`,
`openSegment 𝕜 z y`, and the point `z`. Informally, `(x, y) ⊆ {z} ∪ (x, z) ∪ (z, y)`. -/
theorem openSegment_subset_union (x y : E) {z : E} (hz : z ∈ range (lineMap x y : 𝕜 → E)) :
    openSegment 𝕜 x y ⊆ insert z (openSegment 𝕜 x z ∪ openSegment 𝕜 z y)

(hz : z ∈ Set.range ⇑(AffineMap.lineMap x y))


@[to_additive]
lemma mul_not_mem_of_exponent_two (h : Monoid.exponent G = 2) {x y : G}
    (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G)

{G : Type u}
[AddGroup G]
(h : AddMonoid.exponent G = 2)
{x y : G}
(hx : x ≠ 0)
(hy : y ≠ 0)
(hxy : x ≠ y)


theorem eq_replicate {a : α} {n : ℕ} {s : Sym α n} : s = replicate n a ↔ ∀ b ∈ s, b = a

{α : Type u_1}
{a : α}
{n : ℕ}
{s : Sym α n}


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded function, then for every `x : R`,
  `f x ≤ f 1 * seminormFromBounded' f x`. -/
theorem seminormFromBounded_ge (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) (x : R) :
    f x ≤ f 1 * seminormFromBounded' f x

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)


theorem wittStructureInt_rename {σ : Type*} (Φ : MvPolynomial idx ℤ) (f : idx → σ) (n : ℕ) :
    wittStructureInt p (rename f Φ) n = rename (Prod.map f id) (wittStructureInt p Φ n)

(p : ℕ)
{idx : Type u_2}
[hp : Fact (Nat.Prime p)]
{σ : Type u_3}
(Φ : MvPolynomial idx ℤ)
(f : idx → σ)
(n : ℕ)

wittStructureInt p ((MvPolynomial.rename f) Φ) n = (MvPolynomial.rename (Prod.map f id)) (wittStructureInt p Φ n)


theorem sqrtTwoAddSeries_zero : sqrtTwoAddSeries x 0 = x


theorem le_coe_iff : a ≤ ↑r ↔ ∃ p : ℝ≥0, a = p ∧ p ≤ r


theorem fractRestrict_surjective : Function.Surjective (fractRestrict b)

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Fintype ι]


theorem range_succ_eq_map (n : Nat) : range (n + 1) = 0 :: map succ (range n)

List.range (n + 1) = 0 :: List.map Nat.succ (List.range n)


@[simp]
theorem dropFun_appendFun {α α' : TypeVec n} {β β' : Type*} (f : α ⟹ α') (g : β → β') :
    dropFun (f ::: g) = f

{n : ℕ}
{α : TypeVec.{u_1} n}
{α' : TypeVec.{u_2} n}
{β : Type u_1}
{β' : Type u_2}
(f : α.Arrow α')
(g : β → β')


theorem OrderIso.map_bot' [LE α] [PartialOrder β] (f : α ≃o β) {x : α} {y : β} (hx : ∀ x', x ≤ x')
    (hy : ∀ y', y ≤ y') : f x = y

{α : Type u_2}
{β : Type u_3}
[LE α]
[PartialOrder β]
(f : α ≃o β)
{x : α}
{y : β}
(hx : ∀ (x' : α), x ≤ x')
(hy : ∀ (y' : β), y ≤ y')


theorem Antitone.piecewise_eventually_eq_iInter {β : α → Type*} [Preorder ι] {s : ι → Set α}
    [∀ i, DecidablePred (· ∈ s i)] [DecidablePred (· ∈ ⋂ i, s i)]
    (hs : Antitone s) (f g : (a : α) → β a) (a : α) :
    ∀ᶠ i in atTop, (s i).piecewise f g a = (⋂ i, s i).piecewise f g a

[(i : ι) → DecidablePred fun x => x ∈ s i]

∀ᶠ (i : ι) in Filter.atTop, (s i).piecewise f g a = (⋂ i, s i).piecewise f g a


private theorem add_left_aux1 (x y z : E) : ‖x + y + z‖ * ‖x + y + z‖ =
    (‖2 • x + y‖ * ‖2 • x + y‖ + ‖2 • z + y‖ * ‖2 • z + y‖) / 2 - ‖x - z‖ * ‖x - z‖

{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpaceable E]
(x y z : E)


@[simp] theorem isOpen_empty : IsOpen (∅ : Set X)


@[simp]
theorem top_prod_top : (⊤ : NonUnitalSubsemiring R).prod (⊤ : NonUnitalSubsemiring S) = ⊤

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]


@[simp]
theorem card_sum :
    (L.sum L').card = Cardinal.lift.{max u' v'} L.card + Cardinal.lift.{max u v} L'.card

{L : FirstOrder.Language}
{L' : FirstOrder.Language}

(L.sum L').card = Cardinal.lift.{max u' v', max u v} L.card + Cardinal.lift.{max u v, max u' v'} L'.card


/-- The `δ`-thickened indicator of a set `E` is the function that equals `1` on `E`
and `0` outside a `δ`-thickening of `E` and interpolates (continuously) between
these values using `infEdist _ E`.

`thickenedIndicator` is the (bundled) bounded continuous function with `ℝ≥0`-values.
See `thickenedIndicatorAux` for the unbundled `ℝ≥0∞`-valued function. -/
@[simps]
def thickenedIndicator {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) : α →ᵇ ℝ≥0

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

(thickenedIndicator δ_pos E) x = (thickenedIndicatorAux δ E x).toNNReal


/-- A structure `M` is a Fraïssé limit for a class `K` if it is countably generated,
ultrahomogeneous, and has age `K`. -/
structure IsFraisseLimit [Countable (Σ l, L.Functions l)] [Countable M] : Prop where
  protected ultrahomogeneous : IsUltrahomogeneous L M
  protected age : L.age M = K

{K : Set (CategoryTheory.Bundled L.Structure)}

(self : FirstOrder.Language.IsFraisseLimit K M)


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

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

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


theorem Normal.out : Normal F K → ∀ x : K, IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)

{F : Type u_1}
{K : Type u_2}
[Field F]
[Field K]
[Algebra F K]

Normal F K → ∀ (x : K), IsIntegral F x ∧ Polynomial.Splits (algebraMap F K) (minpoly F x)


/-- If a set is a right-neighborhood of all of its points, then it is measurable. -/
theorem measurableSet_of_mem_nhdsWithin_Ioi {s : Set α} (h : ∀ x ∈ s, s ∈ 𝓝[>] x) :
    MeasurableSet s

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[LinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
{s : Set α}
(h : ∀ x ∈ s, s ∈ 𝓝[>] x)


theorem comp_whiskerRight_bimod {X Y Z : Mon_ C} {M N P : Bimod X Y} (f : M ⟶ N) (g : N ⟶ P)
    (Q : Bimod Y Z) : whiskerRight (f ≫ g) Q = whiskerRight f Q ≫ whiskerRight g Q

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

Bimod.whiskerRight (f ≫ g) Q = Bimod.whiskerRight f Q ≫ Bimod.whiskerRight g Q


protected theorem gen_mem_uniformity (hs : s ∈ 𝔖) {V : Set (β × β)} (hV : V ∈ 𝓤 β) :
    UniformOnFun.gen 𝔖 s V ∈ 𝓤 (α →ᵤ[𝔖] β)

{α : Type u_1}
(β : Type u_2)
{s : Set α}
[UniformSpace β]
(𝔖 : Set (Set α))
(hs : s ∈ 𝔖)
{V : Set (β × β)}
(hV : V ∈ 𝓤 β)


/-- Factoring a prime gives the corresponding one-element multiset. -/
theorem factorMultiset_ofPrime (p : Nat.Primes) :
    (p : ℕ+).factorMultiset = PrimeMultiset.ofPrime p

(↑p).factorMultiset = PrimeMultiset.ofPrime p


theorem integral_inter_add_diff₀ (ht : NullMeasurableSet t μ) (hfs : IntegrableOn f s μ) :
    ∫ x in s ∩ t, f x ∂μ + ∫ x in s \ t, f x ∂μ = ∫ x in s, f x ∂μ

(ht : MeasureTheory.NullMeasurableSet t μ)

(hfs : MeasureTheory.IntegrableOn f s μ)

∫ (x : X) in s ∩ t, f x ∂μ + ∫ (x : X) in s \ t, f x ∂μ = ∫ (x : X) in s, f x ∂μ


theorem zeta_pow : zeta n A B ^ (n : ℕ) = 1

(n : ℕ+)
(A : Type w)
(B : Type z)
[CommRing A]
[CommRing B]
[Algebra A B]
[IsCyclotomicExtension {n} A B]

IsCyclotomicExtension.zeta n A B ^ ↑n = 1


@[to_additive (attr := fun_prop, measurability)]
theorem AEMeasurable.inv (hf : AEMeasurable f μ) : AEMeasurable (fun x => (f x)⁻¹) μ

{G : Type u_2}
{α : Type u_3}
[Inv G]
[MeasurableSpace G]
[MeasurableInv G]
{m : MeasurableSpace α}
{f : α → G}
{μ : MeasureTheory.Measure α}
(hf : AEMeasurable f μ)


@[simp]
theorem coe_add : ⇑(f + g) = f + g

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[AddMonoid β]
[BoundedAdd β]
[ContinuousAdd β]
(f g : BoundedContinuousFunction α β)


theorem and_or_inj_right : ∀ {m x y : Bool}, (x && m) = (y && m) → (x || m) = (y || m) → x = y


protected theorem dvd_neg {a b : Int} : a ∣ -b ↔ a ∣ b


@[simp]
theorem preimage_Ioc {a b : α} : ((↑) : ℤ → α) ⁻¹' Set.Ioc a b = Set.Ioc ⌊a⌋ ⌊b⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a b : α}

Int.cast ⁻¹' Set.Ioc a b = Set.Ioc ⌊a⌋ ⌊b⌋


/-- Local homeomorphism between a real (semi)normed space and the unit ball.
See also `Homeomorph.unitBall`. -/
@[simps (config := .lemmasOnly)]
def PartialHomeomorph.univUnitBall : PartialHomeomorph E E

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
(x : E)

↑PartialHomeomorph.univUnitBall x = (√(1 + ‖x‖ ^ 2))⁻¹ • x


/-- A canonically ordered monoid is an ordered commutative monoid
  in which the ordering coincides with the divisibility relation,
  which is to say, `a ≤ b` iff there exists `c` with `b = a * c`.
  Examples seem rare; it seems more likely that the `OrderDual`
  of a naturally-occurring lattice satisfies this than the lattice
  itself (for example, dual of the lattice of ideals of a PID or
  Dedekind domain satisfy this; collections of all things ≤ 1 seem to
  be more natural that collections of all things ≥ 1).
-/
@[to_additive]
class CanonicallyOrderedCommMonoid (α : Type*) extends OrderedCommMonoid α, OrderBot α where
  /-- For `a ≤ b`, there is a `c` so `b = a * c`. -/
  protected exists_mul_of_le : ∀ {a b : α}, a ≤ b → ∃ c, b = a * c
  /-- For any `a` and `b`, `a ≤ a * b` -/
  protected le_self_mul : ∀ a b : α, a ≤ a * b

{α : Type u_1}
[self : CanonicallyOrderedCommMonoid α]
{a b : α}


theorem coe_coeHom : (coeHom E F : 𝓢(E, F) → E → F) = DFunLike.coe

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]

⇑(SchwartzMap.coeHom E F) = DFunLike.coe


theorem not_injective_limitation_set : ¬ InjOn g (Iio (ord <| succ #α))

¬Set.InjOn g (Set.Iio (SuccOrder.succ (Cardinal.mk α)).ord)


theorem pullbackIsoProdSubtype_hom_fst (f : X ⟶ Z) (g : Y ⟶ Z) :
    (pullbackIsoProdSubtype f g).hom ≫ pullbackFst f g = pullback.fst _ _

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

(TopCat.pullbackIsoProdSubtype f g).hom ≫ TopCat.pullbackFst f g = CategoryTheory.Limits.pullback.fst f g


theorem descPochhammer_succ_comp_X_sub_one (n : ℕ) :
    (descPochhammer R (n + 1)).comp (X - 1) =
      descPochhammer R (n + 1) - (n + (1 : R[X])) • (descPochhammer R n).comp (X - 1)

(descPochhammer R (n + 1)).comp (Polynomial.X - 1) =
  descPochhammer R (n + 1) - (↑n + 1) • (descPochhammer R n).comp (Polynomial.X - 1)


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

{α : Type u_1}
(𝕜 : Type u_2)
[RCLike 𝕜]
{f : α → 𝕜}
{x : 𝕜}
(h : HasSum f x)

HasSum (fun x => RCLike.re (f x)) (RCLike.re x)


@[to_additive (attr := simp)]
theorem div_down [Div α] : (x / y).down = x.down / y.down

{α : Type u}
{x y : ULift.{v, u} α}
[Sub α]


theorem monotone_iff {f : WithBot α → β} :
    Monotone f ↔ Monotone (fun a ↦ f a : α → β) ∧ ∀ x : α, f ⊥ ≤ f x

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

Monotone f ↔ (Monotone fun a => f ↑a) ∧ ∀ (x : α), f ⊥ ≤ f ↑x


@[reassoc]
lemma ProjectiveResolution.isoLeftDerivedToHomotopyCategoryObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f)
    (F : C ⥤ D) [F.Additive] :
    F.leftDerivedToHomotopyCategory.map f ≫ (Q.isoLeftDerivedToHomotopyCategoryObj F).hom =
      (P.isoLeftDerivedToHomotopyCategoryObj F).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map φ

(P : CategoryTheory.ProjectiveResolution X)

(Q : CategoryTheory.ProjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (φ.f 0) (Q.π.f 0) = CategoryTheory.CategoryStruct.comp (P.π.f 0) f)

CategoryTheory.CategoryStruct.comp (F.leftDerivedToHomotopyCategory.map f)
    (Q.isoLeftDerivedToHomotopyCategoryObj F).hom =
  CategoryTheory.CategoryStruct.comp (P.isoLeftDerivedToHomotopyCategoryObj F).hom
    (((F.mapHomologicalComplex (ComplexShape.down ℕ)).comp (HomotopyCategory.quotient D (ComplexShape.down ℕ))).map φ)


@[simp]
theorem maximals_empty : maximals r ∅ = ∅


theorem ContDiffWithinAt.norm (hf : ContDiffWithinAt ℝ n f s x) (h0 : f x ≠ 0) :
    ContDiffWithinAt ℝ n (fun y => ‖f y‖) s x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{s : Set G}
{x : G}
{n : ℕ∞}
(hf : ContDiffWithinAt ℝ n f s x)
(h0 : f x ≠ 0)


theorem hasDerivAt_of_bilinear (hu : HasDerivAt u u' x) (hv : HasDerivAt v v' x) :
    HasDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_1}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : 𝕜}
{B : E →L[𝕜] F →L[𝕜] G}
{u : 𝕜 → E}
{v : 𝕜 → F}
{u' : E}
{v' : F}
(hu : HasDerivAt u u' x)
(hv : HasDerivAt v v' x)

HasDerivAt (fun x => (B (u x)) (v x)) ((B (u x)) v' + (B u') (v x)) x


@[simp]
theorem homeomorph_mk_coe_symm (a : X ≃ Y) (b c) :
    ((Homeomorph.mk a b c).symm : Y → X) = a.symm

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(a : X ≃ Y)
(b : Continuous a.toFun)
(c : Continuous a.invFun)

⇑{ toEquiv := a, continuous_toFun := b, continuous_invFun := c }.symm = ⇑a.symm


theorem map_comp (f₂ : P →ₗ[A] P') (f₁ : M →ₗ[A] P) (g₂ : Q →ₗ[R] Q') (g₁ : N →ₗ[R] Q) :
    map (f₂.comp f₁) (g₂.comp g₁) = (map f₂ g₂).comp (map f₁ g₁)

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
{P' : Type uP'}
{Q' : Type uQ'}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
[AddCommMonoid Q]
[Module R Q]
[AddCommMonoid P']
[Module R P']
[Module A P']
[IsScalarTower R A P']
[AddCommMonoid Q']
[Module R Q']
(f₂ : P →ₗ[A] P')
(f₁ : M →ₗ[A] P)
(g₂ : Q →ₗ[R] Q')
(g₁ : N →ₗ[R] Q)

TensorProduct.AlgebraTensorModule.map (f₂ ∘ₗ f₁) (g₂ ∘ₗ g₁) =
  TensorProduct.AlgebraTensorModule.map f₂ g₂ ∘ₗ TensorProduct.AlgebraTensorModule.map f₁ g₁


/-- Composing the preadditive yoneda embedding with the forgetful functor yields the regular
Yoneda embedding.
-/
@[simp]
theorem whiskering_preadditiveYoneda :
    preadditiveYoneda ⋙
        (whiskeringRight Cᵒᵖ AddCommGrp (Type v)).obj (forget AddCommGrp) =
      yoneda

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

CategoryTheory.preadditiveYoneda.comp
    ((CategoryTheory.whiskeringRight Cᵒᵖ AddCommGrp (Type v)).obj (CategoryTheory.forget AddCommGrp)) =
  CategoryTheory.yoneda


protected theorem irrational {x : ℝ} (h : Liouville x) : Irrational x


/-- A class guaranteeing that the continuous functional calculus is uniquely determined by the
properties that it is a continuous star algebra homomorphism mapping the (restriction of) the
identity to `a`. This is the necessary tool used to establish `cfcHom_comp` and the more common
variant `cfc_comp`.

This class has instances, which can be found in
`Mathlib.Analysis.CstarAlgebra.ContinuousFunctionalCalculus.Unique`, in each of the common cases
`ℂ`, `ℝ` and `ℝ≥0` as a consequence of the Stone-Weierstrass theorem.

This class is separate from `ContinuousFunctionalCalculus` primarily because we will later use
`SpectrumRestricts` to derive an instance of `ContinuousFunctionalCalculus` on a scalar subring
from one on a larger ring (i.e., to go from a continuous functional calculus over `ℂ` for normal
elements to one over `ℝ` for selfadjoint elements), and proving this additional property is
preserved would be burdensome or impossible. -/
class UniqueContinuousFunctionalCalculus (R A : Type*) [CommSemiring R] [StarRing R]
    [MetricSpace R] [TopologicalSemiring R] [ContinuousStar R] [Ring A] [StarRing A]
    [TopologicalSpace A] [Algebra R A] : Prop where
  eq_of_continuous_of_map_id (s : Set R) [CompactSpace s]
    (φ ψ : C(s, R) →⋆ₐ[R] A) (hφ : Continuous φ) (hψ : Continuous ψ)
    (h : φ (.restrict s <| .id R) = ψ (.restrict s <| .id R)) :
    φ = ψ
  compactSpace_spectrum (a : A) : CompactSpace (spectrum R a)

[self : UniqueContinuousFunctionalCalculus R A]


protected theorem HasBasis.smallSets {p : ι → Prop} {s : ι → Set α} (h : HasBasis l p s) :
    HasBasis l.smallSets p fun i => 𝒫 s i

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


@[instance]
theorem ordConnected_preimage {F : Type*} [FunLike F α β] [OrderHomClass F α β] (f : F)
    {s : Set β} [hs : OrdConnected s] : OrdConnected (f ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{F : Type u_3}
[FunLike F α β]
[OrderHomClass F α β]
(f : F)
{s : Set β}
[hs : s.OrdConnected]


theorem dif_eq_if (c : Prop) {h : Decidable c} {α : Sort u} (t : α) (e : α) : dite c (fun _ => t) (fun _ => e) = ite c t e

(c : Prop)
{h : Decidable c}
{α : Sort u}
(t e : α)


@[simp]
theorem compFormalMultilinearSeries_apply (f : F →L[𝕜] G) (p : FormalMultilinearSeries 𝕜 E F)
    (n : ℕ) : (f.compFormalMultilinearSeries p) n = f.compContinuousMultilinearMap (p n)

{𝕜 : Type u}
{E : Type v}
{F : Type w}
{G : Type x}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
[AddCommGroup G]
[Module 𝕜 G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(f : F →L[𝕜] G)
(p : FormalMultilinearSeries 𝕜 E F)
(n : ℕ)

f.compFormalMultilinearSeries p n = f.compContinuousMultilinearMap (p n)


@[simp] theorem matPolyEquiv_symm_C (M : Matrix n n R) : matPolyEquiv.symm (C M) = M.map C

{R : Type u_1}
[CommSemiring R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)

matPolyEquiv.symm (Polynomial.C M) = M.map ⇑Polynomial.C


/-- The isomorphism `L.obj X ≅ L.obj Y` that is deduced from a morphism `f : X ⟶ Y` which
belongs to `W`, when `L.IsLocalization W`. -/
@[simps! hom]
def isoOfHom {X Y : C} (f : X ⟶ Y) (hf : W f) : L.obj X ≅ L.obj Y

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
{X Y : C}
(f : X ⟶ Y)
(hf : W f)

(CategoryTheory.Localization.isoOfHom L W f hf).hom = L.map f


theorem hasseDeriv_zero' : hasseDeriv 0 f = f

{R : Type u_1}
[Semiring R]
(f : Polynomial R)


theorem linearIndependent_fin_succ' {n} {v : Fin (n + 1) → V} : LinearIndependent K v ↔
    LinearIndependent K (Fin.init v) ∧ v (Fin.last _) ∉ Submodule.span K (range <| Fin.init v)

{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{n : ℕ}
{v : Fin (n + 1) → V}

LinearIndependent K v ↔ LinearIndependent K (Fin.init v) ∧ v (Fin.last n) ∉ Submodule.span K (Set.range (Fin.init v))


/-- Reinterpret `α →+ β` as `Multiplicative α →* Multiplicative β`. -/
@[simps]
def AddMonoidHom.toMultiplicative [AddZeroClass α] [AddZeroClass β] :
    (α →+ β) ≃ (Multiplicative α →* Multiplicative β)

{α : Type u}
{β : Type v}
[AddZeroClass α]
[AddZeroClass β]
(f : α →+ β)
(a : Multiplicative α)

(AddMonoidHom.toMultiplicative f) a = Multiplicative.ofAdd (f (Multiplicative.toAdd a))


theorem exists_primitive_element_lt_of_isReal {w₀ : InfinitePlace K} (hw₀ : IsReal w₀) {B : ℝ≥0}
    (hB : minkowskiBound K ↑1 < convexBodyLTFactor K * B) :
    ∃ a : 𝓞 K, ℚ⟮(a : K)⟯ = ⊤ ∧
      ∀ w : InfinitePlace K, w a < max B 1

(hB : NumberField.mixedEmbedding.minkowskiBound K 1 < ↑(NumberField.mixedEmbedding.convexBodyLTFactor K) * ↑B)

∃ a, ℚ⟮↑a⟯ = ⊤ ∧ ∀ (w : NumberField.InfinitePlace K), w ↑a < ↑(max B 1)


theorem coeff_mul_one_sub_of_lt_order {R : Type*} [CommRing R] {φ ψ : R⟦X⟧} (n : ℕ)
    (h : ↑n < ψ.order) : coeff R n (φ * (1 - ψ)) = coeff R n φ

{R : Type u_2}
[CommRing R]
{φ ψ : PowerSeries R}
(n : ℕ)
(h : ↑n < ψ.order)

(PowerSeries.coeff R n) (φ * (1 - ψ)) = (PowerSeries.coeff R n) φ


/-- The fundamental property of the adjoint. -/
theorem adjoint_inner_left (A : E →ₗ[𝕜] F) (x : E) (y : F) : ⟪adjoint A y, x⟫ = ⟪y, A x⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[FiniteDimensional 𝕜 E]
[FiniteDimensional 𝕜 F]
(A : E →ₗ[𝕜] F)
(x : E)
(y : F)

⟪(LinearMap.adjoint A) y, x⟫_𝕜 = ⟪y, A x⟫_𝕜


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

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


@[simp]
theorem mop_id_unmop {X : Cᴹᵒᵖ} : (𝟙 (unmop X)).mop = 𝟙 X

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


theorem addVal_add {a b : R} : min (addVal R a) (addVal R b) ≤ addVal R (a + b)

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{a b : R}

min ((DiscreteValuationRing.addVal R) a) ((DiscreteValuationRing.addVal R) b) ≤ (DiscreteValuationRing.addVal R) (a + b)


theorem support_mul_single_subset [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) (r : k) (a : G) :
    (f * single a r).support ⊆ Finset.image (· * a) f.support

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Mul G]
(f : MonoidAlgebra k G)
(r : k)
(a : G)

(f * MonoidAlgebra.single a r).support ⊆ Finset.image (fun x => x * a) f.support


theorem compress_of_disjoint_of_le' (hva : Disjoint v a) (hua : u ≤ a) :
    compress u v ((a ⊔ v) \ u) = a

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableRel Disjoint]
[DecidableRel fun x x_1 => x ≤ x_1]
{u v a : α}
(hva : Disjoint v a)
(hua : u ≤ a)


theorem MonotoneOn.convex_lt (hf : MonotoneOn f s) (hs : Convex 𝕜 s) (r : β) :
    Convex 𝕜 ({ x ∈ s | f x < r })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{s : Set E}
{f : E → β}
(hf : MonotoneOn f s)
(hs : Convex 𝕜 s)
(r : β)


/-- The norm of the image under the natural morphism to the quotient. -/
theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) :
    ‖mk' S m‖ = sInf ((‖m + ·‖) '' S)

{M : Type u_1}
[SeminormedAddCommGroup M]
(S : AddSubgroup M)
(m : M)

‖(QuotientAddGroup.mk' S) m‖ = sInf ((fun x => ‖m + x‖) '' ↑S)


protected theorem inter [ContinuousAdd 𝕜] {A B C : Set E} (hB : IsExposed 𝕜 A B)
    (hC : IsExposed 𝕜 A C) : IsExposed 𝕜 A (B ∩ C)

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


theorem isPreconnected_empty : IsPreconnected (∅ : Set α)


lemma isoZero_hom_app_obj (X : C) :
    (isoZero e M F' e').hom.app (L.obj X) =
      (e' 0).hom.app X ≫ (isoShiftZero G M).hom.app X ≫ e.inv.app X

[((CategoryTheory.whiskeringLeft C D A).obj L).Full]

[((CategoryTheory.whiskeringLeft C D A).obj L).Faithful]

(CategoryTheory.Functor.ShiftSequence.induced.isoZero e M F' e').hom.app (L.obj X) =
  (e' 0).hom.app X ≫ (G.isoShiftZero M).hom.app X ≫ e.inv.app X


/-- `LatticeHomClass F α β` states that `F` is a type of lattice morphisms.

You should extend this class when you extend `LatticeHom`. -/
class LatticeHomClass (F α β : Type*) [Lattice α] [Lattice β] [FunLike F α β]
  extends SupHomClass F α β : Prop where
  /-- A `LatticeHomClass` morphism preserves infima. -/
  map_inf (f : F) (a b : α) : f (a ⊓ b) = f a ⊓ f b

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Lattice α]
[Lattice β]
[FunLike F α β]
[self : LatticeHomClass F α β]
(f : F)
(a b : α)


/-- A variant of `Module.ext` that's convenient for term-mode. -/
theorem Module.ext' {R : Type*} [Semiring R] {M : Type*} [AddCommMonoid M] (P Q : Module R M)
    (w : ∀ (r : R) (m : M), (haveI := P; r • m) = (haveI := Q; r • m)) :
    P = Q

{R : Type u_9}
[Semiring R]
{M : Type u_10}
[AddCommMonoid M]
(P Q : Module R M)
(w : ∀ (r : R) (m : M), r • m = r • m)


/-- If `e : A ≃+* B` is an isomorphism of rings, then so is `map e`. -/
@[simps apply]
def mapEquiv [CommSemiring S₁] [CommSemiring S₂] (e : S₁ ≃+* S₂) :
    MvPolynomial σ S₁ ≃+* MvPolynomial σ S₂

{S₁ : Type v}
{S₂ : Type w}
(σ : Type u_1)
[CommSemiring S₁]
[CommSemiring S₂]
(e : S₁ ≃+* S₂)
(a : MvPolynomial σ S₁)

(MvPolynomial.mapEquiv σ e) a = (MvPolynomial.map ↑e) a


@[simp]
theorem tail_const (a : α) : tail (const a) = const a

(Stream'.const a).tail = Stream'.const a


@[simp, deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn' {n} (f : Fin n → α) {i : ℕ} (h : i < (ofFn f).length) :
    nthLe (ofFn f) i h = f ⟨i, length_ofFn f ▸ h⟩

{α : Type u}
{n : ℕ}
(f : Fin n → α)
{i : ℕ}
(h : i < (List.ofFn f).length)


theorem ConcreteCategory.congr_hom {X Y : C} {f g : X ⟶ Y} (h : f = g) (x : X) : f x = g x

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.ConcreteCategory C]
{X Y : C}
{f g : X ⟶ Y}
(h : f = g)
(x : (CategoryTheory.forget C).obj X)


theorem AlgEquiv.isAlgebraic_iff (e : A ≃ₐ[R] B) :
    Algebra.IsAlgebraic R A ↔ Algebra.IsAlgebraic R B

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{B : Type u_2}
[Ring B]
[Algebra R B]
(e : A ≃ₐ[R] B)


@[continuity]
theorem AddMonoidHom.continuous_completion (f : α →+ β) (hf : Continuous f) :
    Continuous (AddMonoidHom.completion f hf : Completion α → Completion β)

{α : Type u_3}
{β : Type u_4}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
[UniformSpace β]
[AddGroup β]
[UniformAddGroup β]
(f : α →+ β)
(hf : Continuous ⇑f)


/-- If `U` is a family of open sets that covers `X`, then `X.restrict U` forms an `X.open_cover`. -/
@[simps! J obj map]
def Scheme.openCoverOfISupEqTop {s : Type*} (X : Scheme.{u}) (U : s → X.Opens)
    (hU : ⨆ i, U i = ⊤) : X.OpenCover

{s : Type u_1}
(X : AlgebraicGeometry.Scheme)
(U : s → X.Opens)
(hU : ⨆ i, U i = ⊤)
(i : s)

(X.openCoverOfISupEqTop U hU).map i = (U i).ι


theorem Ideal.homogeneousCore'_mono : Monotone (Ideal.homogeneousCore' 𝒜)

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
(𝒜 : ι → σ)


theorem lintegral_edist_triangle {f g h : α → β} (hf : AEStronglyMeasurable f μ)
    (hh : AEStronglyMeasurable h μ) :
    (∫⁻ a, edist (f a) (g a) ∂μ) ≤ (∫⁻ a, edist (f a) (h a) ∂μ) + ∫⁻ a, edist (g a) (h a) ∂μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hh : MeasureTheory.AEStronglyMeasurable h μ)

∫⁻ (a : α), edist (f a) (g a) ∂μ ≤ ∫⁻ (a : α), edist (f a) (h a) ∂μ + ∫⁻ (a : α), edist (g a) (h a) ∂μ


/-- The oriented angle between three points is `π` if and only if the unoriented angle is `π`. -/
theorem oangle_eq_pi_iff_angle_eq_pi {p₁ p₂ p₃ : P} : ∡ p₁ p₂ p₃ = π ↔ ∠ p₁ p₂ p₃ = π

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

∡ p₁ p₂ p₃ = ↑π ↔ ∠ p₁ p₂ p₃ = π


theorem mul_self_le_mul_self [PosMulMono α] [MulPosMono α] (ha : 0 ≤ a) (hab : a ≤ b) :
    a * a ≤ b * b

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


@[deprecated getElem?_length (since := "2024-06-12")]
theorem get?_length (l : List α) : l.get? l.length = none


@[to_additive (attr := simp)]
theorem coe_set_mk {s : Subsemigroup M} (h_one) : (mk s h_one : Set M) = s

{M : Type u_1}
[MulOneClass M]
{s : Subsemigroup M}
(h_one : 1 ∈ s.carrier)

↑{ toSubsemigroup := s, one_mem' := h_one } = ↑s


@[to_additive tsum_setProd_singleton_left]
lemma tprod_setProd_singleton_left (b : β) (t : Set γ) (f : β × γ → α) :
    (∏' x : {b} ×ˢ t, f x) = ∏' c : t, f (b, c)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
(b : β)
(t : Set γ)
(f : β × γ → α)

∏' (x : ↑({b} ×ˢ t)), f ↑x = ∏' (c : ↑t), f (b, ↑c)


theorem mfderiv_zero_of_not_mdifferentiableAt (h : ¬MDifferentiableAt I I' f x) :
    mfderiv I I' f x = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(h : ¬MDifferentiableAt I I' f x)


/-- The angle between two nonzero vectors is `θ` if and only if the second vector is the first
rotated by `θ` and scaled by the ratio of the norms. -/
theorem oangle_eq_iff_eq_norm_div_norm_smul_rotation_of_ne_zero {x y : V} (hx : x ≠ 0) (hy : y ≠ 0)
    (θ : Real.Angle) : o.oangle x y = θ ↔ y = (‖y‖ / ‖x‖) • o.rotation θ x

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

o.oangle x y = θ ↔ y = (‖y‖ / ‖x‖) • (o.rotation θ) x


@[reassoc (attr := simp)]
theorem colimitObjIsoColimitCompEvaluation_ι_app_hom [HasColimitsOfShape J C] (F : J ⥤ K ⥤ C)
    (j : J) (k : K) :
    (colimit.ι F j).app k ≫ (colimitObjIsoColimitCompEvaluation F k).hom =
      colimit.ι (F ⋙ (evaluation K C).obj k) j

(CategoryTheory.Limits.colimit.ι F j).app k ≫ (CategoryTheory.Limits.colimitObjIsoColimitCompEvaluation F k).hom =
  CategoryTheory.Limits.colimit.ι (F ⋙ (CategoryTheory.evaluation K C).obj k) j


@[to_additive nnnorm_nsmul_le]
theorem nnnorm_pow_le_mul_norm (n : ℕ) (a : E) : ‖a ^ n‖₊ ≤ n * ‖a‖₊

{E : Type u_6}
[SeminormedAddCommGroup E]
(n : ℕ)
(a : E)

‖n • a‖₊ ≤ ↑n * ‖a‖₊


/-- A nontrivial monoid is not torsion-free if any nontrivial element has finite order. -/
@[to_additive (attr := simp) "An additive monoid is not torsion free if any
  nontrivial element has finite order."]
theorem not_isTorsionFree_iff : ¬IsTorsionFree G ↔ ∃ g : G, g ≠ 1 ∧ IsOfFinOrder g

¬Monoid.IsTorsionFree G ↔ ∃ g, g ≠ 1 ∧ IsOfFinOrder g


theorem nonempty_omegaLimit [CompactSpace β] [NeBot f] (hs : s.Nonempty) : (ω f ϕ s).Nonempty

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)
[CompactSpace β]
[f.NeBot]
(hs : s.Nonempty)


@[deprecated (since := "2024-02-23")]
theorem t2Space (α : Type*) [TopologicalSpace α] [PolishSpace α] : T2Space α

(α : Type u_3)
[TopologicalSpace α]
[PolishSpace α]


theorem Antisymm.aux [IsWellOrder α r] (f : r ≼i s) (g : s ≼i r) : LeftInverse g f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
(f : r ≼i s)
(g : s ≼i r)


/-- Auxiliary definition for `HomologicalComplex₂.flipEquivalence`. -/
@[simps!]
def flipEquivalenceCounitIso :
    flipFunctor C c₂ c₁ ⋙ flipFunctor C c₁ c₂ ≅ 𝟭 (HomologicalComplex₂ C c₂ c₁)

∀ (i_1 : I₁), (((HomologicalComplex₂.flipEquivalenceCounitIso C c₁ c₂).hom.app X).f i).f i_1 = 𝟙 ((X.X i).X i_1)


/-- A condition for not cancelling whose hypothese are the same as those of the `cons` function. -/
theorem not_cancels_of_cons_hyp (u : ℤˣ) (w : NormalWord d)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
      w.head ∈ toSubgroup A B u → u = u') :
    ¬ Cancels u w

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

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


theorem sup_sdiff_eq_sup (h : c ≤ a) : a ⊔ b \ c = a ⊔ b

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


/-- A family of `LinearMap`s preserving `DirectSum.GOne.one` and `DirectSum.GMul.mul`
describes an `AlgHom` on `⨁ i, A i`. This is a stronger version of `DirectSum.toSemiring`.

Of particular interest is the case when `A i` are bundled subojects, `f` is the family of
coercions such as `Submodule.subtype (A i)`, and the `[GMonoid A]` structure originates from
`DirectSum.GMonoid.ofAddSubmodules`, in which case the proofs about `GOne` and `GMul`
can be discharged by `rfl`. -/
@[simps]
def toAlgebra (f : ∀ i, A i →ₗ[R] B) (hone : f _ GradedMonoid.GOne.one = 1)
    (hmul : ∀ {i j} (ai : A i) (aj : A j), f _ (GradedMonoid.GMul.mul ai aj) = f _ ai * f _ aj) :
    (⨁ i, A i) →ₐ[R] B

(hone : (f 0) GradedMonoid.GOne.one = 1)

(hmul : ∀ {i j : ι} (ai : A i) (aj : A j), (f (i + j)) (GradedMonoid.GMul.mul ai aj) = (f i) ai * (f j) aj)

(DirectSum.toAlgebra R A f hone hmul) a = (DirectSum.toSemiring (fun i => (f i).toAddMonoidHom) hone hmul) a


@[simp] theorem getLast?_singleton (a : α) : getLast? [a] = a


/-- A convex combination of two centers of mass is a center of mass as well. This version
works if two centers of mass share the set of original points. -/
theorem Finset.centerMass_segment (s : Finset ι) (w₁ w₂ : ι → R) (z : ι → E)
    (hw₁ : ∑ i ∈ s, w₁ i = 1) (hw₂ : ∑ i ∈ s, w₂ i = 1) (a b : R) (hab : a + b = 1) :
    a • s.centerMass w₁ z + b • s.centerMass w₂ z =
    s.centerMass (fun i => a * w₁ i + b * w₂ i) z

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(s : Finset ι)
(w₁ w₂ : ι → R)
(z : ι → E)
(hw₁ : ∑ i ∈ s, w₁ i = 1)
(hw₂ : ∑ i ∈ s, w₂ i = 1)
(a b : R)
(hab : a + b = 1)


@[to_additive]
theorem Bornology.IsBounded.mul (hs : IsBounded s) (ht : IsBounded t) : IsBounded (s * t)

{E : Type u_1}
[SeminormedAddGroup E]
{s t : Set E}
(hs : Bornology.IsBounded s)
(ht : Bornology.IsBounded t)


@[simp]
theorem symmDiff_left_inj : a ∆ b = c ∆ b ↔ a = c

{α : Type u_2}
[GeneralizedBooleanAlgebra α]
{a b c : α}


/-- A `l : List α` is `Sublist l l'` for `l' : List α` iff
there is `f`, an order-preserving embedding of `ℕ` into `ℕ` such that
any element of `l` found at index `ix` can be found at index `f ix` in `l'`.
-/
theorem sublist_iff_exists_orderEmbedding_get?_eq {l l' : List α} :
    l <+ l' ↔ ∃ f : ℕ ↪o ℕ, ∀ ix : ℕ, l.get? ix = l'.get? (f ix)

l.Sublist l' ↔ ∃ f, ∀ (ix : ℕ), l.get? ix = l'.get? (f ix)


/-- An algebra of sets contains the whole set. -/
theorem univ_mem (h𝒜 : IsSetAlgebra 𝒜) : univ ∈ 𝒜

{α : Type u_1}
{𝒜 : Set (Set α)}
(h𝒜 : MeasureTheory.IsSetAlgebra 𝒜)


theorem frobenius_zmod (f : MvPolynomial σ (ZMod p)) : frobenius _ p f = expand p f

{σ : Type u_1}
{p : ℕ}
[Fact (Nat.Prime p)]
(f : MvPolynomial σ (ZMod p))

(frobenius (MvPolynomial σ (ZMod p)) p) f = (MvPolynomial.expand p) f


@[simp, norm_cast]
theorem coe_one : ⇑(1 : CentroidHom α) = id

{α : Type u_5}
[NonUnitalNonAssocSemiring α]


@[mono]
theorem monotone_smallSets : Monotone (@smallSets α)


theorem measurableSet_of_differentiableAt_of_isComplete_with_param
    (hf : Continuous f.uncurry) {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
    MeasurableSet {p : α × E | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ K}

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[LocallyCompactSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{α : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[MeasurableSpace E]
[OpensMeasurableSpace α]
[OpensMeasurableSpace E]
{f : α → E → F}
(hf : Continuous (Function.uncurry f))
{K : Set (E →L[𝕜] F)}
(hK : IsComplete K)

MeasurableSet {p | DifferentiableAt 𝕜 (f p.1) p.2 ∧ fderiv 𝕜 (f p.1) p.2 ∈ K}


/-- This is [grinberg_clifford_2016][] Theorem 14 -/
theorem contractRight_comm (x : CliffordAlgebra Q) : x⌊d⌊d' = -(x⌊d'⌊d)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(d d' : Module.Dual R M)
(x : CliffordAlgebra Q)

(CliffordAlgebra.contractRight ((CliffordAlgebra.contractRight x) d)) d' =
  -(CliffordAlgebra.contractRight ((CliffordAlgebra.contractRight x) d')) d


theorem epi_of_epi_fac {X Y Z : C} {f : X ⟶ Y} {g : Y ⟶ Z} {h : X ⟶ Z} [Epi h]
    (w : f ≫ g = h) : Epi g

(w : CategoryTheory.CategoryStruct.comp f g = h)


theorem lt_or_eq_of_le {a b : α} : a ≤ b → a < b ∨ a = b


/-- A right homology data for a short complex `S` consists of morphisms `p : S.X₂ ⟶ Q` and
`ι : H ⟶ Q` such that `p` identifies `Q` to the kernel of `f : S.X₁ ⟶ S.X₂`,
and that `ι` identifies `H` to the kernel of the induced map `g' : Q ⟶ S.X₃` -/
structure RightHomologyData where
  /-- a choice of cokernel of `S.f : S.X₁ ⟶ S.X₂`-/
  Q : C
  /-- a choice of kernel of the induced morphism `S.g' : S.Q ⟶ X₃`-/
  H : C
  /-- the projection from `S.X₂` -/
  p : S.X₂ ⟶ Q
  /-- the inclusion of the (right) homology in the chosen cokernel of `S.f` -/
  ι : H ⟶ Q
  /-- the cokernel condition for `p` -/
  wp : S.f ≫ p = 0
  /-- `p : S.X₂ ⟶ Q` is a cokernel of `S.f : S.X₁ ⟶ S.X₂` -/
  hp : IsColimit (CokernelCofork.ofπ p wp)
  /-- the kernel condition for `ι` -/
  wι : ι ≫ hp.desc (CokernelCofork.ofπ _ S.zero) = 0
  /-- `ι : H ⟶ Q` is a kernel of `S.g' : Q ⟶ S.X₃` -/
  hι : IsLimit (KernelFork.ofι ι wι)

CategoryTheory.CategoryStruct.comp S.f self.p = 0


theorem trim_congr {m₁ m₂ : OuterMeasure α} (H : ∀ {s : Set α}, MeasurableSet s → m₁ s = m₂ s) :
    m₁.trim = m₂.trim


/-- `f` is an explicit argument so we can `apply` this theorem and obtain `h` as a new goal. -/
theorem not_mem_span_of_apply_not_mem_span_image [RingHomSurjective σ₁₂] (f : F) {x : M}
    {s : Set M} (h : f x ∉ Submodule.span R₂ (f '' s)) : x ∉ Submodule.span R s

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[AddCommMonoid M₂]
[Module R₂ M₂]
{F : Type u_8}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
(f : F)
{x : M}
{s : Set M}
(h : f x ∉ Submodule.span R₂ (⇑f '' s))


theorem map_ofNat_add [AddCommMonoidWithOne G] [AddMonoidWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (n : ℕ) [n.AtLeastTwo] (x : G) :
    f (OfNat.ofNat n + x) = f x + OfNat.ofNat n

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
[AddCommMonoidWithOne G]
[AddMonoidWithOne H]
[AddConstMapClass F G H 1 1]
(f : F)
(n : ℕ)
[n.AtLeastTwo]
(x : G)


/-- The tautological 1-pre-hypercover induced by `S : J.Cover X`. Its index type `I₀`
is given by `S.Arrow` (i.e. all the morphisms in the sieve `S`), while `I₁` is given
by all possible pullback cones. -/
@[simps]
def preOneHypercover : PreOneHypercover.{max u v} X

{J : CategoryTheory.GrothendieckTopology C}

S.preOneHypercover.I₁ f₁ f₂ = f₁.Relation f₂


@[csimp] theorem insertNth_eq_insertNthTR : @insertNth = @insertNthTR


/-- `ℤ` with its usual ring structure is not a field. -/
theorem Int.not_isField : ¬IsField ℤ


@[simp]
theorem pullbackZeroZeroIso_inv_snd (X Y : C) [HasBinaryProduct X Y] :
    (pullbackZeroZeroIso X Y).inv ≫ pullback.snd 0 0 = prod.snd

(CategoryTheory.Limits.pullbackZeroZeroIso X Y).inv ≫ CategoryTheory.Limits.pullback.snd 0 0 =
  CategoryTheory.Limits.prod.snd


theorem fst_inf_snd : Submodule.fst R M M₂ ⊓ Submodule.snd R M M₂ = ⊥

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]


@[simp] lemma chainBotCoeff_neg : chainBotCoeff (-α) β = chainTopCoeff α β

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)

LieModule.chainBotCoeff (-α) β = LieModule.chainTopCoeff α β


theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖

{V : Type u}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[CompleteSpace V]
{B : V →L[ℝ] V →L[ℝ] ℝ}
(coercive : IsCoercive B)

∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(InnerProductSpace.continuousLinearMapOfBilin B) v‖


theorem dvd_gcd_iff [GCDMonoid α] (a b c : α) : a ∣ gcd b c ↔ a ∣ b ∧ a ∣ c

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


theorem Nodup.cons (m : a ∉ s) (n : Nodup s) : Nodup (a ::ₘ s)

{α : Type u_1}
{s : Multiset α}
{a : α}
(m : a ∉ s)
(n : s.Nodup)