@[simps!]
instance : MonoidalCategoryStruct (Dial C)

∀ {X₁ X₂ : CategoryTheory.Dial C} (f : X₁ ⟶ X₂) (Y : CategoryTheory.Dial C),
  (CategoryTheory.MonoidalCategory.whiskerRight f Y).F =
    CategoryTheory.Limits.prod.lift
      (CategoryTheory.CategoryStruct.comp
        (CategoryTheory.Limits.prod.map CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.fst) f.F)
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd)


/-- The duality equivalence `(WidePullbackShape J)ᵒᵖ ≌ WidePushoutShape J` -/
@[simps]
def widePullbackShapeOpEquiv : (WidePullbackShape J)ᵒᵖ ≌ WidePushoutShape J

(CategoryTheory.Limits.widePullbackShapeOpEquiv J).inverse = CategoryTheory.Limits.widePushoutShapeOp J


theorem add_one_pow_unbounded_of_pos (x : α) (hy : 0 < y) : ∃ n : ℕ, x < (y + 1) ^ n

{α : Type u_1}
[StrictOrderedSemiring α]
[Archimedean α]
{y : α}
(x : α)
(hy : 0 < y)


theorem max_eq_right_of_lt {a b : α} (h : a < b) : max a b = b

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


theorem length_eq_countP_add_countP (l) : length l = countP p l + countP (fun a => ¬p a) l

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

l.length = List.countP p l + List.countP (fun a => decide ¬p a = true) l


@[reassoc (attr := simp)]
lemma isoHomologyι₀_inv_naturality [L.HasHomology 0] :
    K.isoHomologyι₀.inv ≫ HomologicalComplex.homologyMap φ 0 =
      HomologicalComplex.opcyclesMap φ 0 ≫ L.isoHomologyι₀.inv


theorem of_terminatedAt_iff_intFractPair_seq1_terminatedAt :
    (of v).TerminatedAt n ↔ (IntFractPair.seq1 v).snd.TerminatedAt n

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
{n : ℕ}

(GenContFract.of v).TerminatedAt n ↔ (GenContFract.IntFractPair.seq1 v).2.TerminatedAt n


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

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


theorem zpowers_eq_closure (g : G) : zpowers g = closure {g}

Subgroup.zpowers g = Subgroup.closure {g}


@[simp]
protected theorem map_div {B : Type*} [CommSemiring B] [Algebra R B] (I J : Submodule R A)
    (h : A ≃ₐ[R] B) : (I / J).map h.toLinearMap = I.map h.toLinearMap / J.map h.toLinearMap

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
{B : Type u_1}
[CommSemiring B]
[Algebra R B]
(I J : Submodule R A)
(h : A ≃ₐ[R] B)

Submodule.map h.toLinearMap (I / J) = Submodule.map h.toLinearMap I / Submodule.map h.toLinearMap J


theorem isRightInversion_mul_left_iff {w : W} :
    cs.IsRightInversion (w * t) t ↔ ¬cs.IsRightInversion w t

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
{cs : CoxeterSystem M W}
{t : W}
(ht : cs.IsReflection t)
{w : W}


@[to_additive tsum_of_add_one_of_neg_add_one]
lemma tprod_of_add_one_of_neg_add_one [T2Space M] {f : ℤ → M}
    (hf₁ : Multipliable fun n : ℕ ↦ f (n + 1)) (hf₂ : Multipliable fun n : ℕ ↦ f (-(n + 1))) :
    ∏' n : ℤ, f n = (∏' n : ℕ, f (n + 1)) * f 0 * ∏' n : ℕ, f (-(n + 1))

(hf₁ : Multipliable fun n => f (↑n + 1))

(hf₂ : Multipliable fun n => f (-(↑n + 1)))


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

{R : Type u}
[Semiring R]
{S T : Ideal R}
{x : R}


theorem Pairwise.mono' (H : r ≤ p) (hr : s.Pairwise r) : s.Pairwise p

{α : Type u_1}
{r p : α → α → Prop}
{s : Set α}
(H : r ≤ p)
(hr : s.Pairwise r)


@[simp]
theorem Ici_mem_nhdsSet_Ici_iff {a b : α} [NeBot (𝓝[<] b)] : Ici a ∈ 𝓝ˢ (Ici b) ↔ a < b

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{a b : α}
[(𝓝[<] b).NeBot]


@[simp]
theorem map'_as_map {F : C → D} [Functorial.{v₁, v₂} F] {X Y : C} {f : X ⟶ Y} :
    Functorial.map'.{v₁, v₂} f = map F f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : C → D}
[CategoryTheory.Functorial F]
{X Y : C}
{f : X ⟶ Y}

CategoryTheory.Functorial.map' f = CategoryTheory.map F f


@[simp] theorem down_compl [HasCompl α] (a : ULift α) : down aᶜ = (down a)ᶜ

{α : Type u}
[HasCompl α]
(a : ULift.{u_1, u} α)


theorem false_imp_iff (a : Prop) : (False → a) ↔ True


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

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


lemma conjTranspose_mul_mul_same {A : Matrix n n R} (hA : PosSemidef A)
    {m : Type*} [Fintype m] (B : Matrix n m R) :
    PosSemidef (Bᴴ * A * B)

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
{A : Matrix n n R}
(hA : A.PosSemidef)
{m : Type u_5}
[Fintype m]
(B : Matrix n m R)


@[simp]
theorem map_coe_finRange (n : ℕ) : ((finRange n) : List (Fin n)).map (Fin.val) = List.range n

List.map Fin.val (List.finRange n) = List.range n


theorem insertNth_comp_rev {α} (i : Fin (n + 1)) (x : α) (p : Fin n → α) :
    (Fin.insertNth i x p) ∘ Fin.rev = Fin.insertNth (Fin.rev i) x (p ∘ Fin.rev)

{n : ℕ}
{α : Type u_1}
(i : Fin (n + 1))
(x : α)
(p : Fin n → α)

i.insertNth x p ∘ Fin.rev = i.rev.insertNth x (p ∘ Fin.rev)


/-- To give an object in the over category, it suffices to give a morphism with codomain `X`. -/
@[simps! left hom]
def mk {X Y : T} (f : Y ⟶ X) : Over X

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


@[simp]
theorem cmp_eq_eq_iff : cmp x y = Ordering.eq ↔ x = y

{α : Type u_1}
[LinearOrder α]
(x y : α)


theorem dist_zero_left (n : ℕ) : dist 0 n = n


/-- Base-changing the vector space of a clifford algebra is isomorphic as an A-algebra to
base-changing the clifford algebra itself; <|Cℓ(A ⊗_R V, Q_A) ≅ A ⊗_R Cℓ(V, Q)<|.

This is `CliffordAlgebra.toBaseChange` and `CliffordAlgebra.ofBaseChange` as an equivalence. -/
@[simps!]
-- `noncomputable` is a performance workaround for mathlib4#7103
noncomputable def equivBaseChange (Q : QuadraticForm R V) :
    CliffordAlgebra (Q.baseChange A) ≃ₐ[A] A ⊗[R] CliffordAlgebra Q

(a : CliffordAlgebra (QuadraticForm.baseChange A Q))

(CliffordAlgebra.equivBaseChange A Q) a = (CliffordAlgebra.toBaseChange A Q) a


/-- A typeclass on impartial games. -/
class Impartial (G : PGame) : Prop where
  out : ImpartialAux G

{G : SetTheory.PGame}
[self : G.Impartial]


/-- Functors from `Discrete PUnit` are equivalent to the category itself. -/
@[simps]
def equiv : Discrete PUnit.{w + 1} ⥤ C ≌ C

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

CategoryTheory.Functor.equiv.inverse = CategoryTheory.Functor.const (CategoryTheory.Discrete PUnit.{w + 1})


@[simp]
theorem le_sup_iff {u : Ultrafilter α} {f g : Filter α} : ↑u ≤ f ⊔ g ↔ ↑u ≤ f ∨ ↑u ≤ g

{α : Type u}
{u : Ultrafilter α}
{f g : Filter α}

↑u ≤ f ⊔ g ↔ ↑u ≤ f ∨ ↑u ≤ g


theorem hasBasis_principal (t : Set α) : (𝓟 t).HasBasis (fun _ : Unit => True) fun _ => t

(𝓟 t).HasBasis (fun x => True) fun x => t


theorem Integrable.im (hf : Integrable f μ) : Integrable (fun x => RCLike.im (f x)) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : α → 𝕜}
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun x => RCLike.im (f x)) μ


/-- We say that `l : Filter ℂ` is an *exponential comparison filter* if the real part tends to
infinity along `l` and the imaginary part grows subexponentially compared to the real part. These
properties guarantee that `(fun z ↦ z ^ a₁ * exp (b₁ * z)) =o[l] (fun z ↦ z ^ a₂ * exp (b₂ * z))`
for any complex `a₁`, `a₂` and real `b₁ < b₂`.

In particular, the second property is automatically satisfied if the imaginary part is bounded along
`l`. -/
structure IsExpCmpFilter (l : Filter ℂ) : Prop where
  tendsto_re : Tendsto re l atTop
  isBigO_im_pow_re : ∀ n : ℕ, (fun z : ℂ => z.im ^ n) =O[l] fun z => Real.exp z.re

{l : Filter ℂ}
(self : Complex.IsExpCmpFilter l)

Filter.Tendsto Complex.re l Filter.atTop


lemma isEquivalence_iff_of_iso {F G : C ⥤ D} (e : F ≅ G) :
    F.IsEquivalence ↔ G.IsEquivalence

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


/-- A variant of `image_comp`, useful for rewriting -/
theorem image_image (g : β → γ) (f : α → β) (s : Set α) : g '' (f '' s) = (fun x => g (f x)) '' s

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


@[to_additive addCHaar_nonneg]
theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K

(K₀ : TopologicalSpace.PositiveCompacts G)

0 ≤ MeasureTheory.Measure.haar.chaar K₀ K


lemma setIntegral_toReal_rnDeriv' [SigmaFinite μ] [HaveLebesgueDecomposition μ ν]
    (hμν : μ ≪ ν) {s : Set α} (hs : MeasurableSet s) :
    ∫ x in s, (μ.rnDeriv ν x).toReal ∂ν = (μ s).toReal

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[μ.HaveLebesgueDecomposition ν]
(hμν : μ ≪ ν)
{s : Set α}
(hs : MeasurableSet s)

∫ (x : α) in s, (μ.rnDeriv ν x).toReal ∂ν = (μ s).toReal


theorem ball_subset_closedBall (x r) : ball p x r ⊆ closedBall p x r

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
(x : E)
(r : ℝ)


/-- See also `Monotone.map_bddAbove`. -/
protected theorem BddAbove.image2 (h₀ : ∀ b, Monotone (swap f b)) (h₁ : ∀ a, Monotone (f a)) :
    BddAbove s → BddAbove t → BddAbove (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))

BddAbove s → BddAbove t → BddAbove (Set.image2 f s t)


theorem eq_update_iff {a : α} {b : β a} {f g : ∀ a, β a} :
    g = update f a b ↔ g a = b ∧ ∀ x ≠ a, g x = f x

{α : Sort u}
{β : α → Sort v}
[DecidableEq α]
{a : α}
{b : β a}
{f g : (a : α) → β a}

g = Function.update f a b ↔ g a = b ∧ ∀ (x : α), x ≠ a → g x = f x


@[to_additive (attr := simp) one_nsmul]
lemma pow_one (a : M) : a ^ 1 = a


@[simp]
theorem sameCycle_extendDomain {p : β → Prop} [DecidablePred p] {f : α ≃ Subtype p} :
    SameCycle (g.extendDomain f) (f x) (f y) ↔ g.SameCycle x y

{α : Type u_2}
{β : Type u_3}
{g : Equiv.Perm α}
{x y : α}
{p : β → Prop}
[DecidablePred p]
{f : α ≃ Subtype p}

(g.extendDomain f).SameCycle ↑(f x) ↑(f y) ↔ g.SameCycle x y


@[to_additive]
theorem inv_mul_eq_iff_eq_mul {b c : α} : ↑a⁻¹ * b = c ↔ b = a * c

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


{α : Type u_1}
[KleeneAlgebra α]
{a : α}


/-- Given an integrable function `g`, the conditional expectations of `g` with respect to a
filtration is uniformly integrable. -/
theorem Integrable.uniformIntegrable_condexp_filtration [Preorder ι] {μ : Measure Ω}
    [IsFiniteMeasure μ] {f : Filtration ι m} {g : Ω → ℝ} (hg : Integrable g μ) :
    UniformIntegrable (fun i => μ[g|f i]) 1 μ

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
{f : MeasureTheory.Filtration ι m}
{g : Ω → ℝ}
(hg : MeasureTheory.Integrable g μ)

MeasureTheory.UniformIntegrable (fun i => μ[g|↑f i]) 1 μ


theorem Complex.tsum_exp_neg_mul_int_sq {a : ℂ} (ha : 0 < a.re) :
    (∑' n : ℤ, cexp (-π * a * (n : ℂ) ^ 2)) =
      1 / a ^ (1 / 2 : ℂ) * ∑' n : ℤ, cexp (-π / a * (n : ℂ) ^ 2)


theorem bounded_le_Icc [Preorder α] (a b : α) : Bounded (· ≤ ·) (Icc a b)

Set.Bounded (fun x x_1 => x ≤ x_1) (Set.Icc a b)


/-- The value of the Infimum of a set of outer measures on a nonempty set is not simply
the minimum value of a measure on that set: it is the infimum sum of measures of countable set of
sets that covers that set, where a different measure can be used for each set in the cover. -/
theorem sInf_apply' {m : Set (OuterMeasure α)} {s : Set α} (h : s.Nonempty) :
    sInf m s =
      ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ (t n)

{m : Set (MeasureTheory.OuterMeasure α)}

(sInf m) s = ⨅ t, ⨅ (_ : s ⊆ Set.iUnion t), ∑' (n : ℕ), ⨅ μ ∈ m, μ (t n)


@[simp]
theorem himp_bot (a : α) : a ⇨ ⊥ = aᶜ

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


lemma quasiIsoAt_of_comp_left (φ : K ⟶ L) (φ' : L ⟶ M) (i : ι) [K.HasHomology i]
    [L.HasHomology i] [M.HasHomology i]
    [hφ : QuasiIsoAt φ i] [hφφ' : QuasiIsoAt (φ ≫ φ') i] :
    QuasiIsoAt φ' i


theorem sizeUpTo_succ {i : ℕ} (h : i < c.length) :
    c.sizeUpTo (i + 1) = c.sizeUpTo i + c.blocks[i]

{n : ℕ}
(c : Composition n)
{i : ℕ}
(h : i < c.length)


theorem RegularSpace.of_exists_mem_nhds_isClosed_subset
    (h : ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) : RegularSpace X


/-- The set of points where a function is continuous is a Gδ set. -/
theorem IsGδ.setOf_continuousAt [UniformSpace Y] [IsCountablyGenerated (𝓤 Y)] (f : X → Y) :
    IsGδ { x | ContinuousAt f x }

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[UniformSpace Y]
[(𝓤 Y).IsCountablyGenerated]
(f : X → Y)


protected theorem norm [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
    IdentDistrib (fun x => ‖f x‖) (fun x => ‖g x‖) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => ‖f x‖) (fun x => ‖g x‖) μ ν


theorem csInf_eq_univ_of_not_bddBelow {s : Set α} (hs : ¬BddBelow s) : sInf s = sInf univ

{α : Type u_1}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
(hs : ¬BddBelow s)


theorem nnnorm_changeOrigin_le (k : ℕ) (h : (‖x‖₊ : ℝ≥0∞) < p.radius) :
    ‖p.changeOrigin x k‖₊ ≤
      ∑' s : Σl : ℕ, { s : Finset (Fin (k + l)) // s.card = l }, ‖p (k + s.1)‖₊ * ‖x‖₊ ^ s.1

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{x : E}
(k : ℕ)
(h : ↑‖x‖₊ < p.radius)

‖p.changeOrigin x k‖₊ ≤ ∑' (s : (l : ℕ) × { s // s.card = l }), ‖p (k + s.fst)‖₊ * ‖x‖₊ ^ s.fst


@[to_additive]
theorem smul_mem_smul_finset : b ∈ s → a • b ∈ a • s

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s : Finset β}
{a : α}
{b : β}


@[simp]
theorem coe_trans (e₁ : A ≃⋆ₐ[R] B) (e₂ : B ≃⋆ₐ[R] C) : ⇑(e₁.trans e₂) = e₂ ∘ e₁

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
[Add C]
[Mul C]
[SMul R C]
[Star C]
(e₁ : A ≃⋆ₐ[R] B)
(e₂ : B ≃⋆ₐ[R] C)


theorem concaveOn_iff_forall_pos {s : Set E} {f : E → β} :
    ConcaveOn 𝕜 s f ↔
      Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 →
        a • f x + b • f y ≤ f (a • x + b • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}

ConcaveOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y ≤ f (a • x + b • y)


/-- The equivalence between `BoolAlg` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : BoolAlg ≌ BoolAlg


@[simp]
theorem fst_comp_coe_prodComm :
    (RingHom.fst S R).comp ↑(prodComm : R × S ≃+* S × R) = RingHom.snd R S

{R : Type u_3}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]

(RingHom.fst S R).comp ↑RingEquiv.prodComm = RingHom.snd R S


@[simp]
theorem Perm.subtypeCongr.right_apply_subtype (a : { a // ¬p a }) : ep.subtypeCongr en a = en a

{ε : Type u_1}
{p : ε → Prop}
[DecidablePred p]
(ep : Equiv.Perm { a // p a })
(en : Equiv.Perm { a // ¬p a })
(a : { a // ¬p a })


/-- The canonical isomorphism `(𝟭 C).mapTriangle ≅ 𝟭 (Triangle C)`. -/
@[simps!]
def mapTriangleIdIso : (𝟭 C).mapTriangle ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIdIso C).inv.app X).hom₃ = CategoryTheory.CategoryStruct.id X.obj₃


/-- Composition of adjunctions. -/
@[simps]
def comp (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) : f₁ ≫ f₂ ⊣ g₂ ≫ g₁

(adj₁ : CategoryTheory.Bicategory.Adjunction f₁ g₁)

(adj₂ : CategoryTheory.Bicategory.Adjunction f₂ g₂)

(adj₁.comp adj₂).unit = adj₁.compUnit adj₂


theorem IsLUB.dual (h : IsLUB s a) : IsGLB (ofDual ⁻¹' s) (toDual a)

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsLUB s a)

IsGLB (⇑OrderDual.ofDual ⁻¹' s) (OrderDual.toDual a)


theorem hasDerivAt_sqrt {x : ℝ} (hx : x ≠ 0) : HasDerivAt (√·) (1 / (2 * √x)) x

HasDerivAt (fun x => √x) (1 / (2 * √x)) x


theorem card_fintype_Ioo : Fintype.card (Set.Ioo a b) = (b - a - 1).toNat

Fintype.card ↑(Set.Ioo a b) = (b - a - 1).toNat


/-- An octahedron is a type of datum whose existence is asserted by
the octahedron axiom (TR 4), see https://stacks.math.columbia.edu/tag/05QK -/
structure Octahedron
  {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
  {u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
  {v₁₂ : X₂ ⟶ Z₁₂} {w₁₂ : Z₁₂ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C)
  {v₂₃ : X₃ ⟶ Z₂₃} {w₂₃ : Z₂₃ ⟶ X₂⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C)
  {v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C) where
  m₁ : Z₁₂ ⟶ Z₁₃
  m₃ : Z₁₃ ⟶ Z₂₃
  comm₁ : v₁₂ ≫ m₁ = u₂₃ ≫ v₁₃
  comm₂ : m₁ ≫ w₁₃ = w₁₂
  comm₃ : v₁₃ ≫ m₃ = v₂₃
  comm₄ : w₁₃ ≫ u₁₂⟦1⟧' = m₃ ≫ w₂₃
  mem : Triangle.mk m₁ m₃ (w₂₃ ≫ v₁₂⟦1⟧') ∈ distTriang C

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

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

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

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

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

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

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

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

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

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

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

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

CategoryTheory.Pretriangulated.Triangle.mk self.m₁ self.m₃
    (CategoryTheory.CategoryStruct.comp w₂₃ ((CategoryTheory.shiftFunctor C 1).map v₁₂)) ∈
  CategoryTheory.Pretriangulated.distinguishedTriangles


/-- Squashing at position `n + 1` and taking the tail is the same as squashing the tail of the
sequence at position `n`. -/
theorem squashSeq_succ_n_tail_eq_squashSeq_tail_n :
    (squashSeq s (n + 1)).tail = squashSeq s.tail n

{K : Type u_1}
{n : ℕ}
{s : Stream'.Seq (GenContFract.Pair K)}
[DivisionRing K]

(GenContFract.squashSeq s (n + 1)).tail = GenContFract.squashSeq s.tail n


@[to_additive]
theorem finprod_eq_if {p : Prop} [Decidable p] {x : M} : ∏ᶠ _ : p, x = if p then x else 1

{M : Type u_2}
[AddCommMonoid M]
{p : Prop}
[Decidable p]
{x : M}


theorem coeSubgraph_injective (G' : G.Subgraph) :
    Function.Injective (Subgraph.coeSubgraph : G'.coe.Subgraph → G.Subgraph)

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


@[to_additive]
theorem noncommProd_commute (s : Finset α) (f : α → β) (comm) (y : β)
    (h : ∀ x ∈ s, Commute y (f x)) : Commute y (s.noncommProd f comm)

(comm : (↑s).Pairwise fun a b => Commute (f a) (f b))


@[simp]
theorem orderIsoIccZeroCoe_apply_coe_coe (a : ℝ≥0) (b : Set.Icc (0 : ℝ) a) :
    (orderIsoIccZeroCoe a b : ℝ) = b


/-- A module is Artinian iff every nonempty set of submodules has a minimal submodule among them. -/
theorem set_has_minimal_iff_artinian :
    (∀ a : Set <| Submodule R M, a.Nonempty → ∃ M' ∈ a, ∀ I ∈ a, ¬I < M') ↔ IsArtinian R M

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

(∀ (a : Set (Submodule R M)), a.Nonempty → ∃ M' ∈ a, ∀ I ∈ a, ¬I < M') ↔ IsArtinian R M


theorem compl_cIcc {a b : α} : (cIcc a b)ᶜ = cIoo b a

{α : Type u_1}
[CircularOrder α]
{a b : α}


theorem isClosed_image_of_isClosed {s : Set M} (hsc : IsClosed s) (hs : s ⊆ support f) :
    IsClosed (extChartAt I c '' s)

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)
{s : Set M}
(hsc : IsClosed s)
(hs : s ⊆ Function.support ↑f)


theorem under_left (U : Under X) : U.left = ⟨⟨⟩⟩

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
(U : CategoryTheory.Under X)


theorem sup_support_multiset_prod_le (degb0 : degb 0 ≤ 0)
    (degbm : ∀ a b, degb (a + b) ≤ degb a + degb b) (m : Multiset R[A]) :
    m.prod.support.sup degb ≤ (m.map fun f : R[A] => f.support.sup degb).sum

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

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

(degbm : ∀ (a b : A), degb (a + b) ≤ degb a + degb b)

m.prod.support.sup degb ≤ (Multiset.map (fun f => f.support.sup degb) m).sum


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(m : ℕ)


/-- A signed measure `s` is said to `HaveLebesgueDecomposition` with respect to a measure `μ`
if the positive part and the negative part of `s` both `HaveLebesgueDecomposition` with
respect to `μ`. -/
class HaveLebesgueDecomposition (s : SignedMeasure α) (μ : Measure α) : Prop where
  posPart : s.toJordanDecomposition.posPart.HaveLebesgueDecomposition μ
  negPart : s.toJordanDecomposition.negPart.HaveLebesgueDecomposition μ

{α : Type u_1}
{m : MeasurableSpace α}
{s : MeasureTheory.SignedMeasure α}
{μ : MeasureTheory.Measure α}
[self : s.HaveLebesgueDecomposition μ]


@[simp]
theorem sqrt_div {x : ℝ} (hx : 0 ≤ x) (y : ℝ) : √(x / y) = √x / √y


@[simp]
theorem opNorm_prod (f : E →L[𝕜] F) (g : E →L[𝕜] G) : ‖f.prod g‖ = ‖(f, g)‖

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
[NormedSpace 𝕜 G]
(f : E →L[𝕜] F)
(g : E →L[𝕜] G)


theorem add_pos_right {a₂ : ℕ} (a₁) (h : 0 < a₂) : 0 < a₁ + a₂


theorem IsCompact.exists_isLeast [ClosedIicTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : ∃ x, IsLeast s x

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


@[to_additive (attr := simp)]
theorem preimage_smul_ball (c : G) (x : X) (r : ℝ≥0∞) :
    (c • ·) ⁻¹' ball x r = ball (c⁻¹ • x) r

{G : Type v}
{X : Type w}
[PseudoEMetricSpace X]
[AddGroup G]
[AddAction G X]
[IsometricVAdd G X]
(c : G)
(x : X)
(r : ℝ≥0∞)

(fun x => c +ᵥ x) ⁻¹' EMetric.ball x r = EMetric.ball (-c +ᵥ x) r


@[to_additive (attr := simp)]
lemma unop_smul [SMul α β] (a : α) (b : βᵐᵒᵖ) : unop (a • b) = a • unop b

{α : Type u_1}
{β : Type u_2}
[SMul α β]
(a : α)
(b : βᵐᵒᵖ)

MulOpposite.unop (a • b) = a • MulOpposite.unop b


@[simp]
theorem centralizer_univ : centralizer Set.univ = center R

Subring.centralizer Set.univ = Subring.center R


theorem to_iso {X Y : Scheme.{u}} (f : X ⟶ Y) [h : IsOpenImmersion f] [Epi f.1.base] : IsIso f

[h : AlgebraicGeometry.IsOpenImmersion f]


@[to_additive (attr := simp)]
theorem mk_coe' (e : M ≃* N) (f h₁ h₂ h₃) : (MulEquiv.mk ⟨f, e, h₁, h₂⟩ h₃ : N ≃* M) = e.symm

(h₃ :
  ∀ (x y : N),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun (x + y) =
      { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun x +
        { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun y)

{ toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂, map_add' := h₃ } = e.symm


/-- The volume form on an oriented real inner product space, a nonvanishing top-dimensional
alternating form uniquely defined by compatibility with the orientation and inner product structure.
-/
irreducible_def volumeForm : E [⋀^Fin n]→ₗ[ℝ] ℝ

o.volumeForm =
  Nat.casesAuxOn (motive := fun a => n = a → E [⋀^Fin n]→ₗ[ℝ] ℝ) n
    (fun h =>
      Eq.ndrec (motive := fun {n} =>
        [_i : Fact (FiniteDimensional.finrank ℝ E = n)] → Orientation ℝ E (Fin n) → E [⋀^Fin n]→ₗ[ℝ] ℝ)
        (fun [Fact (FiniteDimensional.finrank ℝ E = 0)] o =>
          let opos := AlternatingMap.constOfIsEmpty ℝ E (Fin 0) 1;
          ⋯.by_cases (fun x => opos) fun x => -opos)
        ⋯ o)
    (fun n_1 h =>
      Eq.ndrec (motive := fun {n} =>
        [_i : Fact (FiniteDimensional.finrank ℝ E = n)] → Orientation ℝ E (Fin n) → E [⋀^Fin n]→ₗ[ℝ] ℝ)
        (fun [Fact (FiniteDimensional.finrank ℝ E = n_1 + 1)] o => (Orientation.finOrthonormalBasis ⋯ ⋯ o).toBasis.det)
        ⋯ o)
    ⋯


theorem divisors_filter_squarefree_of_squarefree {n : ℕ} (hn : Squarefree n) :
    n.divisors.filter Squarefree = n.divisors

Finset.filter Squarefree n.divisors = n.divisors


/-- The kernel of `f` is always a smaller subobject than the kernel of `f ≫ h`. -/
theorem kernelSubobject_comp_le (f : X ⟶ Y) [HasKernel f] {Z : C} (h : Y ⟶ Z) [HasKernel (f ≫ h)] :
    kernelSubobject f ≤ kernelSubobject (f ≫ h)

[CategoryTheory.Limits.HasKernel (f ≫ h)]

CategoryTheory.Limits.kernelSubobject f ≤ CategoryTheory.Limits.kernelSubobject (f ≫ h)


theorem mem_pure_self (a : α) : a ∈ pure a


lemma isConstant_comp_tendsto {lc : Filter γ} {g : γ → α}
    (hf : (f : Germ l β).IsConstant) (hg : Tendsto g lc l) : IsConstant (f ∘ g : Germ lc β)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{l : Filter α}
{f : α → β}
{lc : Filter γ}
{g : γ → α}
(hf : (↑f).IsConstant)
(hg : Filter.Tendsto g lc l)


/-- A projective presentation of an object `X` consists of an epimorphism `f : P ⟶ X`
from some projective object `P`.
-/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
structure ProjectivePresentation (X : C) where
  p : C
  [projective : Projective p]
  f : p ⟶ X
  [epi : Epi f]

(self : CategoryTheory.ProjectivePresentation X)


/-- The canonical map `Φ.op.LeftResolution X₂ → Φ.RightResolution X₂`. -/
@[simps]
def LeftResolution.unop {X₂ : C₂ᵒᵖ} (L : Φ.op.LeftResolution X₂) :
    Φ.RightResolution X₂.unop

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


theorem toTopologicalSpace_bot : @UniformSpace.toTopologicalSpace α ⊥ = ⊥


/-- The product of `mulShift ψ r` and `mulShift ψ s` is `mulShift ψ (r + s)`. -/
theorem mulShift_mul (ψ : AddChar R M) (r s : R) :
    mulShift ψ r * mulShift ψ s = mulShift ψ (r + s)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[CommMonoid M]
(ψ : AddChar R M)
(r s : R)

ψ.mulShift r * ψ.mulShift s = ψ.mulShift (r + s)


theorem update_eq_sub_add_single {β : ι → Type*} [∀ i, AddGroup (β i)] (f : Π₀ i, β i) (i : ι)
    (b : β i) : f.update i b = f - single i (f i) + single i b

{ι : Type u}
[DecidableEq ι]
{β : ι → Type u_1}
[(i : ι) → AddGroup (β i)]
(f : Π₀ (i : ι), β i)
(i : ι)
(b : β i)

DFinsupp.update i f b = f - DFinsupp.single i (f i) + DFinsupp.single i b


/--
Rational numbers, implemented as a pair of integers `num / den` such that the
denominator is positive and the numerator and denominator are coprime.
-/
-- `Rat` is not tagged with the `ext` attribute, since this is more often than not undesirable
structure Rat where
  /-- Constructs a rational number from components.
  We rename the constructor to `mk'` to avoid a clash with the smart constructor. -/
  mk' ::
  /-- The numerator of the rational number is an integer. -/
  num : Int
  /-- The denominator of the rational number is a natural number. -/
  den : Nat := 1
  /-- The denominator is nonzero. -/
  den_nz : den ≠ 0 := by decide
  /-- The numerator and denominator are coprime: it is in "reduced form". -/
  reduced : num.natAbs.Coprime den := by decide
  deriving DecidableEq


@[reassoc (attr := simp)]
theorem plusCompIso_whiskerRight {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    whiskerRight (J.plusMap η) F ≫ (J.plusCompIso F Q).hom =
      (J.plusCompIso F P).hom ≫ J.plusMap (whiskerRight η F)

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w₁} D]

[CategoryTheory.Category.{max v u, w₂} E]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (J.plusMap η) F) (J.plusCompIso F Q).hom =
  CategoryTheory.CategoryStruct.comp (J.plusCompIso F P).hom (J.plusMap (CategoryTheory.whiskerRight η F))


@[simp]
theorem Factors.piQuotientEquiv_mk (p : Ideal R) (hp : map (algebraMap R S) p ≠ ⊥) (x : S) :
    Factors.piQuotientEquiv p hp (Ideal.Quotient.mk _ x) = fun _ => Ideal.Quotient.mk _ x

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
[IsDedekindDomain S]
[Algebra R S]
(p : Ideal R)
(hp : Ideal.map (algebraMap R S) p ≠ ⊥)
(x : S)

(Ideal.Factors.piQuotientEquiv p hp) ((Ideal.Quotient.mk (Ideal.map (algebraMap R S) p)) x) = fun x_1 =>
  (Ideal.Quotient.mk (↑x_1 ^ Ideal.ramificationIdx (algebraMap R S) p ↑x_1)) x


/-- We can find equipartitions of arbitrary size. -/
theorem exists_equipartition_card_eq (hn : n ≠ 0) (hs : n ≤ s.card) :
    ∃ P : Finpartition s, P.IsEquipartition ∧ P.parts.card = n

{α : Type u_1}
[DecidableEq α]
(s : Finset α)
{n : ℕ}
(hn : n ≠ 0)
(hs : n ≤ s.card)

∃ P, P.IsEquipartition ∧ P.parts.card = n


@[to_additive (attr := simp)]
theorem coe_comap (S : Subsemigroup N) (f : M →ₙ* N) : (S.comap f : Set M) = f ⁻¹' S

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(S : Subsemigroup N)
(f : M →ₙ* N)


theorem setToL1_congr_left' (T T' : Set α → E →L[ℝ] F) {C C' : ℝ}
    (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C')
    (h : ∀ s, MeasurableSet s → μ s < ∞ → T s = T' s) (f : α →₁[μ] E) :
    setToL1 hT f = setToL1 hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

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

(h : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T s = T' s)

(MeasureTheory.L1.setToL1 hT) f = (MeasureTheory.L1.setToL1 hT') f


theorem lt_arcsin_iff_sin_lt {x y : ℝ} (hx : x ∈ Icc (-(π / 2)) (π / 2)) (hy : y ∈ Icc (-1 : ℝ) 1) :
    x < arcsin y ↔ sin x < y


@[to_additive]
theorem eq_inv_mul_iff_mul_eq {a c : α} : a = ↑b⁻¹ * c ↔ ↑b * a = c

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


theorem Sublist.cons_cons {l₁ l₂ : List α} (a : α) (s : l₁ <+ l₂) : a :: l₁ <+ a :: l₂

{α : Type u}
{l₁ l₂ : List α}
(a : α)
(s : l₁.Sublist l₂)


theorem apply_eq_coe_toFun (K : Compacts G) : μ K = μ.toFun K

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
(K : TopologicalSpace.Compacts G)

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


@[simp]
theorem mem_prod {s : UpperSet α} {t : UpperSet β} : x ∈ s ×ˢ t ↔ x.1 ∈ s ∧ x.2 ∈ t

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{x : α × β}
{s : UpperSet α}
{t : UpperSet β}


@[fun_prop]
protected theorem continuousWithinAt_aeval {s a} :
    ContinuousWithinAt (fun x : A => aeval x p) s a

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[TopologicalSpace A]
[TopologicalSemiring A]
(p : Polynomial R)
{s : Set A}
{a : A}

ContinuousWithinAt (fun x => (Polynomial.aeval x) p) s a


theorem equivMapDomain_symm_apply (f : α ≃ β) (l : β →₀ M) (a : α) :
    equivMapDomain f.symm l a = l (f a)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(f : α ≃ β)
(l : β →₀ M)
(a : α)

(Finsupp.equivMapDomain f.symm l) a = l (f a)


@[to_additive]
lemma unop_smul_eq_unop_smul_unop [SMul M α] [SMul Mᵐᵒᵖ α] [IsCentralScalar M α] (r : Mᵐᵒᵖ)
    (a : αᵐᵒᵖ) : unop (r • a) = unop r • unop a

{M : Type u_2}
{α : Type u_4}
[VAdd M α]
[VAdd Mᵃᵒᵖ α]
[IsCentralVAdd M α]
(r : Mᵃᵒᵖ)
(a : αᵃᵒᵖ)

AddOpposite.unop (r +ᵥ a) = AddOpposite.unop r +ᵥ AddOpposite.unop a


@[simp]
theorem mem_symmetricSubalgebra [CommSemiring R] (p : MvPolynomial σ R) :
    p ∈ symmetricSubalgebra σ R ↔ p.IsSymmetric

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

p ∈ MvPolynomial.symmetricSubalgebra σ R ↔ p.IsSymmetric


@[reassoc (attr := simp), elementwise (attr := simp)]
theorem kernelSubobject_arrow :
    (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow

(CategoryTheory.Limits.kernelSubobjectIso f).hom ≫ CategoryTheory.Limits.kernel.ι f =
  (CategoryTheory.Limits.kernelSubobject f).arrow


lemma GrowsPolynomially.add_isLittleO {f g : ℝ → ℝ} (hf : GrowsPolynomially f)
    (hfg : g =o[atTop] f) : GrowsPolynomially fun x => f x + g x

(hf : AkraBazziRecurrence.GrowsPolynomially f)

AkraBazziRecurrence.GrowsPolynomially fun x => f x + g x


/-- Flipping a complex of complexes over the diagonal, as a functor. -/
@[simps]
def flipFunctor :
    HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex₂ C c₂ c₁

(HomologicalComplex₂.flipFunctor C c₁ c₂).obj K = K.flip


theorem mem_or_not_mem (p : T.CompleteType α) (φ : L[[α]].Sentence) : φ ∈ p ∨ φ.not ∈ p

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
(p : T.CompleteType α)
(φ : L[[α]].Sentence)

φ ∈ p ∨ FirstOrder.Language.Formula.not φ ∈ p


theorem isPrimitiveRoot_of_mem_primitiveRoots {ζ : R} (h : ζ ∈ primitiveRoots k R) :
    IsPrimitiveRoot ζ k

{R : Type u_4}
{k : ℕ}
[CommRing R]
[IsDomain R]
{ζ : R}
(h : ζ ∈ primitiveRoots k R)


theorem eta (a : {x // p x}) (h : p (val a)) : mk (val a) h = a

{α : Type u}
{p : α → Prop}
(a : Subtype fun x => p x)
(h : p a.val)


@[to_additive AddSubgroup.IsComplement.card_mul_card]
lemma IsComplement.card_mul_card (h : IsComplement S T) : Nat.card S * Nat.card T = Nat.card G

{G : Type u_1}
[Group G]
{S T : Set G}
(h : Subgroup.IsComplement S T)


@[simp]
theorem sheafification_obj (P : Cᵒᵖ ⥤ D) : (J.sheafification D).obj P = J.sheafify P

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]


@[simp]
theorem keys_cons {s} {l : List (Sigma β)} : (s :: l).keys = s.1 :: l.keys

{α : Type u}
{β : α → Type v}
{s : Sigma β}
{l : List (Sigma β)}


lemma one_add_le_iff : 1 + m ≤ n ↔ m < n


/-- The composition of two localizers morphisms. -/
@[simps]
def comp (Φ : LocalizerMorphism W₁ W₂) (Ψ : LocalizerMorphism W₂ W₃) :
    LocalizerMorphism W₁ W₃

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{W₃ : CategoryTheory.MorphismProperty C₃}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

(Ψ : CategoryTheory.LocalizerMorphism W₂ W₃)

(Φ.comp Ψ).functor = Φ.functor.comp Ψ.functor


/-- Constructor for null homotopic morphisms, see also `Homotopy.ofNullHomotopic`
and `Homotopy.eq_add_nullHomotopic`. -/
@[simps]
def nullHomotopic (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
    S₁ ⟶ S₂

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

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

(S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃).τ₃ = CategoryTheory.CategoryStruct.comp h₂ S₂.g + h₃


theorem self_le_supp_comap (J : Ideal R) (v : Valuation (R ⧸ J) Γ₀) :
    J ≤ (v.comap (Ideal.Quotient.mk J)).supp

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedCommMonoidWithZero Γ₀]
(J : Ideal R)
(v : Valuation (R ⧸ J) Γ₀)

J ≤ (Valuation.comap (Ideal.Quotient.mk J) v).supp


lemma nhdsSet_le : 𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f

{X : Type u_1}
[TopologicalSpace X]
{f : Filter X}
{s : Set X}

𝓝ˢ s ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f


protected theorem Filter.Tendsto.IccExtend (f : γ → Icc a b → β) {la : Filter α} {lb : Filter β}
    {lc : Filter γ} (hf : Tendsto (↿f) (lc ×ˢ la.map (projIcc a b h)) lb) :
    Tendsto (↿(IccExtend h ∘ f)) (lc ×ˢ la) lb

(hf : Filter.Tendsto (↿f) (lc ×ˢ Filter.map (Set.projIcc a b h) la) lb)

Filter.Tendsto (↿(Set.IccExtend h ∘ f)) (lc ×ˢ la) lb


@[simp, norm_cast]
theorem coe_pure_interval (a : α) : (pure a : Interval α) = Interval.pure a

↑(NonemptyInterval.pure a) = Interval.pure a


lemma real_iff [Module ℂ A] [IsScalarTower ℂ A A] [SMulCommClass ℂ A A] {a : A} :
    QuasispectrumRestricts a Complex.reCLM ↔ ∀ x ∈ σₙ ℂ a, x = x.re

{A : Type u_3}
[NonUnitalRing A]
[Module ℂ A]
[IsScalarTower ℂ A A]
[SMulCommClass ℂ A A]
{a : A}

QuasispectrumRestricts a ⇑Complex.reCLM ↔ ∀ x ∈ quasispectrum ℂ a, x = ↑x.re


theorem partialSups_eq_sup_range [SemilatticeSup α] [OrderBot α] (f : ℕ → α) (n : ℕ) :
    partialSups f n = (Finset.range (n + 1)).sup f

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
(f : ℕ → α)
(n : ℕ)

(partialSups f) n = (Finset.range (n + 1)).sup f


lemma ChainComplex.quasiIsoAt₀_iff {K L : ChainComplex C ℕ} (f : K ⟶ L)
    [K.HasHomology 0] [L.HasHomology 0] [(K.sc' 1 0 0).HasHomology] [(L.sc' 1 0 0).HasHomology] :
    QuasiIsoAt f 0 ↔
      ShortComplex.QuasiIso ((HomologicalComplex.shortComplexFunctor' C _ 1 0 0).map f)

[(HomologicalComplex.sc' K 1 0 0).HasHomology]

[(HomologicalComplex.sc' L 1 0 0).HasHomology]

QuasiIsoAt f 0 ↔
  CategoryTheory.ShortComplex.QuasiIso ((HomologicalComplex.shortComplexFunctor' C (ComplexShape.down ℕ) 1 0 0).map f)


lemma uIcc_injective_left (a : α) : Injective (uIcc a)

{α : Type u_1}
[DistribLattice α]
(a : α)


protected theorem add_lt_add_iff_left {k n m : Nat} : k + n < k + m ↔ n < m


theorem take_add (l : List α) (m n : Nat) : l.take (m + n) = l.take m ++ (l.drop m).take n

List.take (m + n) l = List.take m l ++ List.take n (List.drop m l)


theorem div_im (z w : K) : im (z / w) = im z * re w / normSq w - re z * im w / normSq w

RCLike.im (z / w) = RCLike.im z * RCLike.re w / RCLike.normSq w - RCLike.re z * RCLike.im w / RCLike.normSq w


@[simp]
theorem algebraMap_pUnit (r : R) : algebraMap R PUnit r = PUnit.unit

(algebraMap R PUnit.{u_2 + 1}) r = PUnit.unit


@[to_additive]
theorem finprod_mem_eq_one_of_forall_eq_one {f : α → M} {s : Set α} (h : ∀ x ∈ s, f x = 1) :
    ∏ᶠ i ∈ s, f i = 1

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{s : Set α}
(h : ∀ x ∈ s, f x = 0)


theorem le_of_nth_le_nth_of_lt_card (hf : (setOf p).Finite) {m n : ℕ} (h : nth p m ≤ nth p n)
    (hm : m < hf.toFinset.card) : m ≤ n

{p : ℕ → Prop}
(hf : (setOf p).Finite)
{m n : ℕ}
(h : Nat.nth p m ≤ Nat.nth p n)
(hm : m < hf.toFinset.card)


lemma _root_.isStarNormal_of_mem_unitary {u : R} (hu : u ∈ unitary R) : IsStarNormal u

{R : Type u_1}
[Monoid R]
[StarMul R]
{u : R}
(hu : u ∈ unitary R)


lemma density_nonneg (hκν : fst κ ≤ ν) (a : α) (x : γ) (s : Set β) :
    0 ≤ density κ ν a x s

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


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


@[simp]
theorem cos_sub_pi (x : ℝ) : cos (x - π) = -cos x


theorem mulVec_sub [Fintype n] (A : Matrix m n α) (x y : n → α) :
    A *ᵥ (x - y) = A *ᵥ x - A *ᵥ y

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocRing α]
[Fintype n]
(A : Matrix m n α)
(x y : n → α)


/-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
`b`. -/
theorem commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
{f : β → β → α}
(comm : ∀ (a b : β), f a b ≤ f b a)
(a b : β)


theorem nat_sub : Primrec₂ ((· - ·) : ℕ → ℕ → ℕ)


theorem IsOpen.upperSemicontinuousWithinAt_indicator (hs : IsOpen s) (hy : y ≤ 0) :
    UpperSemicontinuousWithinAt (indicator s fun _x => y) t x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{x : α}
{s t : Set α}
{y : β}
[Zero β]
(hs : IsOpen s)
(hy : y ≤ 0)

UpperSemicontinuousWithinAt (s.indicator fun _x => y) t x


theorem card_extend (P : Finpartition a) (b c : α) {hb : b ≠ ⊥} {hab : Disjoint a b}
    {hc : a ⊔ b = c} : (P.extend hb hab hc).parts.card = P.parts.card + 1

{α : Type u_1}
[DistribLattice α]
[OrderBot α]
[DecidableEq α]
{a : α}
(P : Finpartition a)
(b c : α)
{hb : b ≠ ⊥}
{hab : Disjoint a b}
{hc : a ⊔ b = c}


@[simp] lemma unop_pow (x : αᵐᵒᵖ) (n : ℕ) : unop (x ^ n) = unop x ^ n

{α : Type u_1}
[Monoid α]
(x : αᵐᵒᵖ)
(n : ℕ)

MulOpposite.unop (x ^ n) = MulOpposite.unop x ^ n


theorem add_hadamard [Distrib α] : (B + C) ⊙ A = B ⊙ A + C ⊙ A

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

(B + C).hadamard A = B.hadamard A + C.hadamard A


@[to_additive]
theorem not_mem_of_not_mem_closure {P : M} (hP : P ∉ closure s) : P ∉ s

{M : Type u_1}
[Mul M]
{s : Set M}
{P : M}
(hP : P ∉ Subsemigroup.closure s)


@[to_additive]
theorem mul_inv_eq_of_eq_mul (h : a = c * b) : a * b⁻¹ = c

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : a = c + b)


theorem delayReflLeft_zero (γ : Path x y) : delayReflLeft 0 γ = (Path.refl x).trans γ

{X : Type u}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)

Path.delayReflLeft 0 γ = (Path.refl x).trans γ


@[simp] lemma nat_le_ofENat {m : ℕ} {n : ℕ∞} : (m : Cardinal) ≤ n ↔ m ≤ n

↑m ≤ ↑n ↔ ↑m ≤ n


/-- The equiv between `VectorMeasure α ℝ≥0∞` and `Measure α` formed by
`MeasureTheory.VectorMeasure.ennrealToMeasure` and
`MeasureTheory.Measure.toENNRealVectorMeasure`. -/
@[simps]
def equivMeasure [MeasurableSpace α] : VectorMeasure α ℝ≥0∞ ≃ Measure α

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

MeasureTheory.VectorMeasure.equivMeasure.symm μ = μ.toENNRealVectorMeasure


/-- The pullback cone whose cone point is the explicit pullback. -/
@[simps! pt π]
def pullback.cone : Limits.PullbackCone f g

{X Y B : Profinite}
(f : X ⟶ B)
(g : Y ⟶ B)

(Profinite.pullback.cone f g).pt = Profinite.pullback f g


theorem uniformContinuous_equiv_symm [∀ i, UniformSpace (β i)] :
    UniformContinuous (WithLp.equiv p (∀ i, β i)).symm

(p : ℝ≥0∞)
{ι : Type u_2}
(β : ι → Type u_4)
[(i : ι) → UniformSpace (β i)]

UniformContinuous ⇑(WithLp.equiv p ((i : ι) → β i)).symm


theorem normSq_div : normSq (a / b) = normSq a / normSq b

{R : Type u_1}
[LinearOrderedField R]
(a b : ℍ[R])

Quaternion.normSq (a / b) = Quaternion.normSq a / Quaternion.normSq b


/-- `prod C D` gives the cartesian product of two categories.

See <https://stacks.math.columbia.edu/tag/001K>.
-/
@[simps (config := { notRecursive := [] }) Hom id_fst id_snd comp_fst comp_snd]
instance prod : Category.{max v₁ v₂} (C × D)

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

∀ {X Y Z : C × D} (f : X ⟶ Y) (g : Y ⟶ Z),
  (CategoryTheory.CategoryStruct.comp f g).1 = CategoryTheory.CategoryStruct.comp f.1 g.1


theorem extensionOfMax_to_submodule_eq_top (h : Module.Baer R Q) :
    (extensionOfMax i f).domain = ⊤

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
{M : Type u_1}
{N : Type u_2}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(i : M →ₗ[R] N)
(f : M →ₗ[R] Q)
[Fact (Function.Injective ⇑i)]
(h : Module.Baer R Q)

(Module.Baer.extensionOfMax i f).domain = ⊤


/-- On an empty space, bounded continuous functions are at distance 0. -/
theorem dist_zero_of_empty [IsEmpty α] : dist f g = 0

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


/-- If we have a `Homotopy f₀ f₁` and a `Homotopy g₀ g₁`, then we can compose them and get a
`Homotopy (g₀.comp f₀) (g₁.comp f₁)`.
-/
@[simps]
def hcomp {f₀ f₁ : C(X, Y)} {g₀ g₁ : C(Y, Z)} (F : Homotopy f₀ f₁) (G : Homotopy g₀ g₁) :
    Homotopy (g₀.comp f₀) (g₁.comp f₁)

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


/-- Final functors preserve filteredness.

This can be seen as a generalization of `IsFiltered.of_right_adjoint` (which states that right
adjoints preserve filteredness), as right adjoints are always final, see `final_of_adjunction`.
-/
theorem IsFiltered.of_final (F : C ⥤ D) [Final F] [IsFiltered C] : IsFiltered D

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


/-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ

{α : Type u}
[AddMonoid α]
(u : AddUnits α)
(val : α)
(hv : val = ↑u)
(inv : α)
(hi : inv = ↑(-u))


theorem CliqueFreeOn.subset (hs : s₁ ⊆ s₂) (h₂ : G.CliqueFreeOn s₂ n) : G.CliqueFreeOn s₁ n

{α : Type u_1}
(G : SimpleGraph α)
{s₁ s₂ : Set α}
{n : ℕ}
(hs : s₁ ⊆ s₂)
(h₂ : G.CliqueFreeOn s₂ n)


/-- A function `f : 𝕜 → 𝕜` is strictly concave iff for any three points `x < y < z` the slope of
the secant line of `f` on `[x, y]` is strictly greater than the slope of the secant line of `f` on
`[y, z]`. -/
theorem strictConcaveOn_iff_slope_strict_anti_adjacent :
    StrictConcaveOn 𝕜 s f ↔
      Convex 𝕜 s ∧
        ∀ ⦃x y z : 𝕜⦄,
          x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}


/-- The isomorphism between `F.unop.op` and `F`. -/
@[simps!]
def unopOpIso (F : Cᵒᵖ ⥤ Dᵒᵖ) : F.unop.op ≅ F

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

F.unopOpIso.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


theorem injective_iff_injOn_univ : Injective f ↔ InjOn f univ

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

Function.Injective f ↔ Set.InjOn f Set.univ


theorem hasFPowerSeriesAt_exp_zero_of_radius_pos (h : 0 < (expSeries 𝕂 𝔸).radius) :
    HasFPowerSeriesAt (exp 𝕂) (expSeries 𝕂 𝔸) 0

(h : 0 < (NormedSpace.expSeries 𝕂 𝔸).radius)

HasFPowerSeriesAt (NormedSpace.exp 𝕂) (NormedSpace.expSeries 𝕂 𝔸) 0


/-- A natural transformation `R₁ ⟶ R₂` induces a functor `Comma L R₁ ⥤ Comma L R₂`. -/
@[simps]
def mapRight (r : R₁ ⟶ R₂) : Comma L R₁ ⥤ Comma L R₂

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

((CategoryTheory.Comma.mapRight L r).obj X).left = X.left


@[to_additive]
theorem coeFn_mul (f g : α →ₘ[μ] γ) : ⇑(f * g) =ᵐ[μ] f * g

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Mul γ]
[ContinuousMul γ]
(f g : α →ₘ[μ] γ)


theorem integral_exp_Iic_zero : ∫ x : ℝ in Iic 0, exp x = 1


theorem eLpNorm_exponent_top_lim_le_liminf_eLpNorm_exponent_top {ι} [Nonempty ι] [Countable ι]
    [LinearOrder ι] {f : ι → α → F} {f_lim : α → F}
    (h_lim : ∀ᵐ x : α ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))) :
    eLpNorm f_lim ∞ μ ≤ atTop.liminf fun n => eLpNorm (f n) ∞ μ

(h_lim : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (f_lim x)))

MeasureTheory.eLpNorm f_lim ⊤ μ ≤ Filter.liminf (fun n => MeasureTheory.eLpNorm (f n) ⊤ μ) Filter.atTop


@[simp]
theorem descPochhammer_one : descPochhammer R 1 = X


theorem subset_map_iff {f : α ↪ β} {s : Finset β} {t : Finset α} :
    s ⊆ t.map f ↔ ∃ u ⊆ t, s = u.map f

{α : Type u}
{β : Type v}
{f : α ↪ β}
{s : Finset β}
{t : Finset α}

s ⊆ Finset.map f t ↔ ∃ u ⊆ t, s = Finset.map f u


theorem disjoint_iff_not_le {f : Ultrafilter α} {g : Filter α} : Disjoint (↑f) g ↔ ¬↑f ≤ g

{α : Type u}
{f : Ultrafilter α}
{g : Filter α}


theorem ncard_inter_add_ncard_union (s t : Set α) (hs : s.Finite := by toFinite_tac)
    (ht : t.Finite := by toFinite_tac) : (s ∩ t).ncard + (s ∪ t).ncard = s.ncard + t.ncard

{α : Type u_1}
(s t : Set α)
(hs : s.Finite := by toFinite_tac)
(ht : t.Finite := by toFinite_tac)


@[to_additive (attr := gcongr) add_le_add_left]
theorem mul_le_mul_left' [CovariantClass α α (· * ·) (· ≤ ·)] {b c : α} (bc : b ≤ c) (a : α) :
    a * b ≤ a * c

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


theorem integrable_approxOn_range [BorelSpace E] {f : β → E} {μ : Measure β} (fmeas : Measurable f)
    [SeparableSpace (range f ∪ {0} : Set E)] (hf : Integrable f μ) (n : ℕ) :
    Integrable (approxOn f fmeas (range f ∪ {0}) 0 (by simp) n) μ

[TopologicalSpace.SeparableSpace ↑(Set.range f ∪ {0})]

MeasureTheory.Integrable (↑(MeasureTheory.SimpleFunc.approxOn f fmeas (Set.range f ∪ {0}) 0 ⋯ n)) μ


/-- A finite partition of `a : α` is a pairwise disjoint finite set of elements whose supremum is
`a`. We forbid `⊥` as a part. -/
@[ext]
structure Finpartition [Lattice α] [OrderBot α] (a : α) where
  -- Porting note: Docstrings added
  /-- The elements of the finite partition of `a` -/
  parts : Finset α
  /-- The partition is supremum-independent -/
  supIndep : parts.SupIndep id
  /-- The supremum of the partition is `a` -/
  sup_parts : parts.sup id = a
  /-- No element of the partition is bottom-/
  not_bot_mem : ⊥ ∉ parts
  deriving DecidableEq

{α : Type u_1}
[Lattice α]
[OrderBot α]
{a : α}
(self : Finpartition a)


@[deprecated Subalgebra.finite_bot (since := "2024-04-11")]
theorem Subalgebra.finiteDimensional_bot : FiniteDimensional F (⊥ : Subalgebra F E)

{F : Type u_1}
{E : Type u_2}
[Field F]
[Ring E]
[Algebra F E]


theorem le_zero_of_zero_ge {α : Type*} [Zero α] [LE α] {a : α} (h : 0 ≥ a) : a ≤ 0

{α : Type u_1}
[Zero α]
[LE α]
{a : α}
(h : 0 ≥ a)


/-- A `NormedOrderedAddGroup` is an additive group that is both a `NormedAddCommGroup` and an
`OrderedAddCommGroup`. This class is necessary to avoid diamonds caused by both classes
carrying their own group structure. -/
class NormedOrderedAddGroup (α : Type*) extends OrderedAddCommGroup α, Norm α, MetricSpace α where
  /-- The distance function is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = ‖x - y‖ := by aesop

{α : Type u_2}
[self : NormedOrderedAddGroup α]
(x y : α)


/-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R

(R : Type u_1)
[One R]
[Neg R]
(a : R × R × R × R)

((Quaternion.equivProd R).symm a).imJ = a.2.2.1


theorem bliminf_eq_iSup_biInf_of_nat {p : ℕ → Prop} {u : ℕ → α} :
    bliminf u atTop p = ⨆ i, ⨅ (j) (_ : p j ∧ i ≤ j), u j

{α : Type u_1}
[CompleteLattice α]
{p : ℕ → Prop}
{u : ℕ → α}

Filter.bliminf u Filter.atTop p = ⨆ i, ⨅ j, ⨅ (_ : p j ∧ i ≤ j), u j


/-- A variant of `lift_iSup_le_lift_iSup` with universes specialized via `w = v` and `w' = v'`.
This is sometimes necessary to avoid universe unification issues. -/
theorem lift_iSup_le_lift_iSup' {ι : Type v} {ι' : Type v'} {f : ι → Cardinal.{v}}
    {f' : ι' → Cardinal.{v'}} (hf : BddAbove (range f)) (hf' : BddAbove (range f')) (g : ι → ι')
    (h : ∀ i, lift.{v'} (f i) ≤ lift.{v} (f' (g i))) : lift.{v'} (iSup f) ≤ lift.{v} (iSup f')

(h : ∀ (i : ι), Cardinal.lift.{v', v} (f i) ≤ Cardinal.lift.{v, v'} (f' (g i)))

Cardinal.lift.{v', v} (iSup f) ≤ Cardinal.lift.{v, v'} (iSup f')


/-- The homotopy cofiber of a morphism of homological complexes,
also known as the mapping cone. -/
@[simps]
noncomputable def homotopyCofiber : HomologicalComplex C c

(HomologicalComplex.homotopyCofiber φ).d i j = HomologicalComplex.homotopyCofiber.d φ i j


@[to_additive]
protected theorem injective (e : M ≃* N) : Function.Injective e

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
(e : M ≃* N)


theorem Multiset.map_univ_coeEmbedding (m : Multiset α) :
    (Finset.univ : Finset m).map m.coeEmbedding = m.toEnumFinset

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

Finset.map m.coeEmbedding Finset.univ = m.toEnumFinset


theorem update_eq_updateFinset {i y} :
    Function.update x i y = updateFinset x {i} (uniqueElim y)

{ι : Type u_1}
{π : ι → Sort u_2}
{x : (i : ι) → π i}
[DecidableEq ι]
{i : ι}
{y : π i}

Function.update x i y = Function.updateFinset x {i} (uniqueElim y)


theorem IsSFiniteKernel.finset_sum {κs : ι → Kernel α β} (I : Finset ι)
    (h : ∀ i ∈ I, IsSFiniteKernel (κs i)) : IsSFiniteKernel (∑ i ∈ I, κs i)

(h : ∀ i ∈ I, ProbabilityTheory.IsSFiniteKernel (κs i))

ProbabilityTheory.IsSFiniteKernel (∑ i ∈ I, κs i)


/-- Two functions antivary iff the rearrangement inequality holds. -/
lemma antivary_iff_mul_rearrangement :
    Antivary f g ↔ ∀ i j, f i * g i + f j * g j ≤ f i * g j + f j * g i

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{f g : ι → α}

Antivary f g ↔ ∀ (i j : ι), f i * g i + f j * g j ≤ f i * g j + f j * g i


/-- Extensionality lemma for monoid homomorphisms `M ∗ N →* P`.
If two homomorphisms agree on the ranges of `Monoid.Coprod.inl` and `Monoid.Coprod.inr`,
then they are equal. -/
@[to_additive (attr := ext 1100)
  "Extensionality lemma for additive monoid homomorphisms `AddMonoid.Coprod M N →+ P`.
  If two homomorphisms agree on the ranges of `AddMonoid.Coprod.inl` and `AddMonoid.Coprod.inr`,
  then they are equal."]
theorem hom_ext {f g : M ∗ N →* P} (h₁ : f.comp inl = g.comp inl) (h₂ : f.comp inr = g.comp inr) :
    f = g

(h₁ : f.comp Monoid.Coprod.inl = g.comp Monoid.Coprod.inl)

(h₂ : f.comp Monoid.Coprod.inr = g.comp Monoid.Coprod.inr)


theorem _root_.IsClosed.measure_eq_one_iff_eq_univ [OpensMeasurableSpace X] [IsProbabilityMeasure μ]
    (hF : IsClosed F) :
    μ F = 1 ↔ F = univ

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{F : Set X}
[OpensMeasurableSpace X]
[MeasureTheory.IsProbabilityMeasure μ]
(hF : IsClosed F)


/-- A signed measure `s` is said to `HaveLebesgueDecomposition` with respect to a measure `μ`
if the positive part and the negative part of `s` both `HaveLebesgueDecomposition` with
respect to `μ`. -/
class HaveLebesgueDecomposition (s : SignedMeasure α) (μ : Measure α) : Prop where
  posPart : s.toJordanDecomposition.posPart.HaveLebesgueDecomposition μ
  negPart : s.toJordanDecomposition.negPart.HaveLebesgueDecomposition μ

{α : Type u_1}
{m : MeasurableSpace α}
{s : MeasureTheory.SignedMeasure α}
{μ : MeasureTheory.Measure α}
[self : s.HaveLebesgueDecomposition μ]


/--
These two rules follow trivially by simp, but are needed to avoid non-termination
in false_eq and true_eq.
-/
@[simp] theorem false_eq_true : (false = true) = False


@[simp]
theorem quot_left_distrib_sub (x y z : PGame) : (⟦x * (y - z)⟧ : Game) = ⟦x * y⟧ - ⟦x * z⟧


/-- In a pseudometric space, uniform Cauchy sequences are characterized by the fact that,
eventually, the distance between all its elements is uniformly, arbitrarily small. -/
-- Porting note: no attr @[nolint ge_or_gt]
theorem Metric.uniformCauchySeqOn_iff {γ : Type*} {F : β → γ → α} {s : Set γ} :
    UniformCauchySeqOn F atTop s ↔ ∀ ε > (0 : ℝ),
      ∃ N : β, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[Nonempty β]
[SemilatticeSup β]
{γ : Type u_3}
{F : β → γ → α}
{s : Set γ}

UniformCauchySeqOn F Filter.atTop s ↔ ∀ ε > 0, ∃ N, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε


/-- Reinterpret a bounded lattice homomorphism as a bounded lattice homomorphism between the dual
bounded lattices. -/
@[simps]
protected def dual : BoundedLatticeHom α β ≃ BoundedLatticeHom αᵒᵈ βᵒᵈ

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[BoundedOrder α]
[Lattice β]
[BoundedOrder β]
(f : BoundedLatticeHom αᵒᵈ βᵒᵈ)

(BoundedLatticeHom.dual.symm f).toLatticeHom = LatticeHom.dual.symm f.toLatticeHom


theorem log_neg_I : log (-I) = -(π / 2) * I

Complex.log (-Complex.I) = -(↑Real.pi / 2) * Complex.I


@[simp]
theorem id_c_app (X : SheafedSpace C) (U) :
    (𝟙 X : X ⟶ X).c.app U = 𝟙 _

(U : (TopologicalSpace.Opens ↑↑X.toPresheafedSpace)ᵒᵖ)


protected theorem eq_tsub_of_add_eq (hc : AddLECancellable c) (h : a + c = b) : a = b - c

{α : Type u_1}
[PartialOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}
(hc : AddLECancellable c)
(h : a + c = b)


private lemma has_decomp_connected_components_aux (F : C ⥤ FintypeCat.{w}) [FiberFunctor F]
    (n : ℕ) : ∀ (X : C), n = Nat.card (F.obj X) → ∃ (ι : Type) (f : ι → C)
    (g : (i : ι) → (f i) ⟶ X) (_ : IsColimit (Cofan.mk X g)),
    (∀ i, IsConnected (f i)) ∧ Finite ι

(F : CategoryTheory.Functor C FintypeCat)

n = Nat.card ↑(F.obj X) → ∃ ι f g x, (∀ (i : ι), CategoryTheory.PreGaloisCategory.IsConnected (f i)) ∧ Finite ι


theorem one_def : (1 : DihedralGroup n) = r 0


theorem eraseLead_add_of_natDegree_lt_left {p q : R[X]} (pq : q.natDegree < p.natDegree) :
    (p + q).eraseLead = p.eraseLead + q

{R : Type u_1}
[Semiring R]
{p q : R[X]}
(pq : q.natDegree < p.natDegree)


@[simp 1001]
theorem _root_.Set.mem_image_equiv {α β} {S : Set α} {f : α ≃ β} {x : β} :
    x ∈ f '' S ↔ f.symm x ∈ S

{α : Type u_1}
{β : Type u_2}
{S : Set α}
{f : α ≃ β}
{x : β}


/-- A crucial lemma to ensure that Catalan numbers can be defined via their explicit formula
  `catalan n = n.centralBinom / (n + 1)`. -/
theorem succ_dvd_centralBinom (n : ℕ) : n + 1 ∣ n.centralBinom


lemma bijective_dual_eval [IsReflexive R M] : Bijective (Dual.eval R M)

(R : Type u_1)
(M : Type u_2)
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.IsReflexive R M]

Function.Bijective ⇑(Module.Dual.eval R M)


theorem Ici_ofDual (a : αᵒᵈ) : Ici (ofDual a) = (Iic a).map ofDual.toEmbedding

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderTop α]
(a : αᵒᵈ)

Finset.Ici (OrderDual.ofDual a) = Finset.map OrderDual.ofDual.toEmbedding (Finset.Iic a)


lemma not_boundaryLE_prev [e.IsRelIff] {i j : ι} (hi : c.Rel i j) :
    ¬ e.BoundaryLE i

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
[e.IsRelIff]
{i j : ι}
(hi : c.Rel i j)


/-- In a finite-dimensional vector space, the zero map has determinant `1` in dimension `0`,
and `0` otherwise. We give a formula that also works in infinite dimension, where we define
the determinant to be `1`. -/
@[simp]
theorem det_zero {𝕜 : Type*} [Field 𝕜] {M : Type*} [AddCommGroup M] [Module 𝕜 M] :
    LinearMap.det (0 : M →ₗ[𝕜] M) = (0 : 𝕜) ^ FiniteDimensional.finrank 𝕜 M

{𝕜 : Type u_7}
[Field 𝕜]
{M : Type u_8}
[AddCommGroup M]
[Module 𝕜 M]

LinearMap.det 0 = 0 ^ FiniteDimensional.finrank 𝕜 M


@[simp]
theorem mem_Iio : x ∈ Iio b ↔ x < b


/-- Given `c = lineMap a b r`, `a < c`, the point `(c, f c)` is non-strictly below the
segment `[(a, f a), (b, f b)]` if and only if `slope f a c ≤ slope f a b`. -/
theorem map_le_lineMap_iff_slope_le_slope_left (h : 0 < r * (b - a)) :
    f c ≤ lineMap (f a) (f b) r ↔ slope f a c ≤ slope f a b

{k : Type u_1}
{E : Type u_2}
[LinearOrderedField k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{f : k → E}
{a b r : k}
(h : 0 < r * (b - a))

f ((AffineMap.lineMap a b) r) ≤ (AffineMap.lineMap (f a) (f b)) r ↔ slope f a ((AffineMap.lineMap a b) r) ≤ slope f a b


@[simp]
theorem residue_smul (g : G) (r : R) : residue R (g • r) = g • residue R r

{R : Type u_1}
[CommRing R]
[LocalRing R]
(G : Type u_4)
[Group G]
[MulSemiringAction G R]
(g : G)
(r : R)

(LocalRing.residue R) (g • r) = g • (LocalRing.residue R) r


@[reassoc]
lemma inlX_d' (i j : ι) (hij : c.Rel i j) (hj : ¬ c.Rel j (c.next j)) :
    inlX φ j i hij ≫ d φ i j = φ.f j ≫ inrX φ j

HomologicalComplex.homotopyCofiber.inlX φ j i hij ≫ HomologicalComplex.homotopyCofiber.d φ i j =
  φ.f j ≫ HomologicalComplex.homotopyCofiber.inrX φ j


lemma XYIdeal_add_eq (x₁ x₂ y₁ L : R) : XYIdeal W (W.addX x₁ x₂ L) (C <| W.addY x₁ x₂ y₁ L) =
    span {mk W <| W.negPolynomial - C (linePolynomial x₁ y₁ L)} ⊔ XIdeal W (W.addX x₁ x₂ L)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(x₁ x₂ y₁ L : R)

WeierstrassCurve.Affine.CoordinateRing.XYIdeal W (W.addX x₁ x₂ L) (Polynomial.C (W.addY x₁ x₂ y₁ L)) =
  Ideal.span
      {(WeierstrassCurve.Affine.CoordinateRing.mk W)
          (W.negPolynomial - Polynomial.C (WeierstrassCurve.Affine.linePolynomial x₁ y₁ L))} ⊔
    WeierstrassCurve.Affine.CoordinateRing.XIdeal W (W.addX x₁ x₂ L)


lemma mem_convexHull_pi (h : ∀ i ∈ s, x i ∈ convexHull 𝕜 (t i)) : x ∈ convexHull 𝕜 (s.pi t)

(h : ∀ i ∈ s, x i ∈ (convexHull 𝕜) (t i))


/-- `Quotient.mk'` is a surjective function. -/
theorem surjective_quotient_mk' (α : Sort*) [s : Setoid α] :
    Function.Surjective (Quotient.mk' : α → Quotient s)


/-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X

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

(PartialHomeomorph.ofSet s hs).source = s


theorem submatrix_mul_transpose_submatrix [Fintype m] [Fintype n] [AddCommMonoid α] [Mul α]
    (e : m ≃ n) (M : Matrix m n α) : M.submatrix id e * Mᵀ.submatrix e id = M * Mᵀ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Fintype m]
[Fintype n]
[AddCommMonoid α]
[Mul α]
(e : m ≃ n)
(M : Matrix m n α)

M.submatrix id ⇑e * Mᵀ.submatrix (⇑e) id = M * Mᵀ


theorem tendsto_approxBounded_of_norm_le {β} {f : α → β} [NormedAddCommGroup β] [NormedSpace ℝ β]
    {m : MeasurableSpace α} (hf : StronglyMeasurable[m] f) {c : ℝ} {x : α} (hfx : ‖f x‖ ≤ c) :
    Tendsto (fun n => hf.approxBounded c n x) atTop (𝓝 (f x))

(hf : MeasureTheory.StronglyMeasurable f)

Filter.Tendsto (fun n => ↑(hf.approxBounded c n) x) Filter.atTop (𝓝 (f x))


@[simp, rclike_simps]
theorem normSq_neg (z : K) : normSq (-z) = normSq z


lemma liftLatticeHom_injective : Injective (liftLatticeHom (α := α))

{α : Type u_1}
[GeneralizedBooleanAlgebra α]


protected theorem IsPWO.isWF (h : s.IsPWO) : s.IsWF

{α : Type u_2}
[Preorder α]
{s : Set α}
(h : s.IsPWO)


/--
The composition of the inverse of the isomorphism `pullbackSepcIso R S T` (from the pullback of
`Spec S ⟶ Spec R` and `Spec T ⟶ Spec R` to `Spec (S ⊗[R] T)`) with the second projection is
the morphism `Spec (S ⊗[R] T) ⟶ Spec T` obtained by applying `Spec.map` to the ring morphism
`t ↦ 1 ⊗ₜ[R] t`.
-/
@[reassoc (attr := simp)]
lemma pullbackSpecIso_inv_snd :
    (pullbackSpecIso R S T).inv ≫ pullback.snd _ _ = Spec.map (ofHom (toRingHom includeRight))

(R S T : Type u)
[CommRing R]
[CommRing S]
[CommRing T]
[Algebra R S]
[Algebra R T]

(AlgebraicGeometry.pullbackSpecIso R S T).inv ≫
    CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Spec.map (CommRingCat.ofHom (algebraMap R S)))
      (AlgebraicGeometry.Spec.map (CommRingCat.ofHom (algebraMap R T))) =
  AlgebraicGeometry.Spec.map (CommRingCat.ofHom ↑Algebra.TensorProduct.includeRight)


theorem Antiperiodic.nat_mul_eq_of_eq_zero [Semiring α] [NegZeroClass β] (h : Antiperiodic f c)
    (hi : f 0 = 0) : ∀ n : ℕ, f (n * c) = 0

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[Semiring α]
[NegZeroClass β]
(h : Function.Antiperiodic f c)
(hi : f 0 = 0)
(n : ℕ)


@[to_additive (attr := simp)]
theorem mul_liftRight_inv {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    f x * ↑(liftRight f g h x)⁻¹ = 1

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
{f : M →* N}
{g : M → Nˣ}
(h : ∀ (x : M), ↑(g x) = f x)
(x : M)

f x * ↑((Units.liftRight f g h) x)⁻¹ = 1


@[to_additive]
theorem Red.invRev {L₁ L₂ : List (α × Bool)} (h : Red L₁ L₂) : Red (invRev L₁) (invRev L₂)

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

FreeAddGroup.Red (FreeAddGroup.negRev L₁) (FreeAddGroup.negRev L₂)


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

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

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


@[simp]
theorem refl_trans (e : P₁ ≃ᵃL[k] P₂) : (refl k P₁).trans e = e

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)

(ContinuousAffineEquiv.refl k P₁).trans e = e


theorem Restriction.finiteRk {M : Matroid α} [FiniteRk M] (h : N ≤r M) : N.FiniteRk

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


theorem _root_.IsOpen.ae_eq_empty_iff_eq (hU : IsOpen U) :
    U =ᵐ[μ] (∅ : Set X) ↔ U = ∅

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{U : Set X}
(hU : IsOpen U)


@[simp]
theorem quotientEquiv_symm_mk (I : Ideal R) (J : Ideal S) (f : R ≃+* S)
    (hIJ : J = I.map (f : R →+* S)) (x : S) :
    (quotientEquiv I J f hIJ).symm (Ideal.Quotient.mk J x) = Ideal.Quotient.mk I (f.symm x)

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
(I : Ideal R)
(J : Ideal S)
(f : R ≃+* S)
(hIJ : J = Ideal.map (↑f) I)
(x : S)

(I.quotientEquiv J f hIJ).symm ((Ideal.Quotient.mk J) x) = (Ideal.Quotient.mk I) (f.symm x)


@[to_additive]
theorem exists_iff_exists_existsUnique :
    (∃ a0 b0 : G, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0) ↔
      ∃ g : G, ∃! ab, ab ∈ A ×ˢ B ∧ ab.1 * ab.2 = g

(∃ a0 b0, a0 ∈ A ∧ b0 ∈ B ∧ UniqueAdd A B a0 b0) ↔ ∃ g, ∃! ab, ab ∈ A ×ˢ B ∧ ab.1 + ab.2 = g


@[simps!]
instance category : Category (Square C)

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

∀ {X Y Z : CategoryTheory.Square C} (f : X.Hom Y) (g : Y.Hom Z),
  (CategoryTheory.CategoryStruct.comp f g).τ₄ = CategoryTheory.CategoryStruct.comp f.τ₄ g.τ₄


theorem surjective_trop : Function.Surjective (trop : R → Tropical R)


@[to_additive (attr := simp, norm_cast)]
protected theorem val_smul (r : R) (x : s) : (↑(r • x) : M) = r • (x : M)

{S : Type u'}
{R : Type u}
{M : Type v}
[VAdd R M]
[SetLike S M]
[hS : VAddMemClass S R M]
(s : S)
(r : R)
(x : ↥s)


/-- Laplacian expansion of the determinant of an `n+1 × n+1` matrix along column 0. -/
theorem det_succ_column_zero {n : ℕ} (A : Matrix (Fin n.succ) (Fin n.succ) R) :
    det A = ∑ i : Fin n.succ, (-1) ^ (i : ℕ) * A i 0 * det (A.submatrix i.succAbove Fin.succ)

A.det = ∑ i : Fin n.succ, (-1) ^ ↑i * A i 0 * (A.submatrix i.succAbove Fin.succ).det


@[simp] theorem untop'_eq_self_iff {d : α} {x : WithTop α} : untop' d x = d ↔ x = d ∨ x = ⊤


theorem StableUnderBaseChange.baseChange_obj [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) (X : Over S) (H : P X.hom) :
    P ((Over.pullback f).obj X).hom

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
{P : CategoryTheory.MorphismProperty C}
(hP : P.StableUnderBaseChange)
{S S' : C}
(f : S' ⟶ S)
(X : CategoryTheory.Over S)
(H : P X.hom)

P ((CategoryTheory.Over.pullback f).obj X).hom


theorem isClosed_omegaLimit : IsClosed (ω f ϕ s)

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


@[simp]
theorem AwayMap.lift_comp (hg : IsAddUnit (g x)) : (F.lift x hg).comp F.toMap = g

(F : AddSubmonoid.LocalizationMap.AwayMap x B)

(AddSubmonoid.LocalizationMap.AwayMap.lift x F hg).comp (AddSubmonoid.LocalizationMap.toMap F) = g


lemma addX_eq {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) : W.addX P Q =
      ((P y * Q z ^ 3 - Q y * P z ^ 3) ^ 2
        + W.a₁ * (P y * Q z ^ 3 - Q y * P z ^ 3) * P z * Q z * addZ P Q
        - W.a₂ * P z ^ 2 * Q z ^ 2 * addZ P Q ^ 2 - P x * Q z ^ 2 * addZ P Q ^ 2
        - Q x * P z ^ 2 * addZ P Q ^ 2) / (P z * Q z) ^ 2

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

W.addX P Q =
  ((P y * Q z ^ 3 - Q y * P z ^ 3) ^ 2 +
            W.a₁ * (P y * Q z ^ 3 - Q y * P z ^ 3) * P z * Q z * WeierstrassCurve.Jacobian.addZ P Q -
          W.a₂ * P z ^ 2 * Q z ^ 2 * WeierstrassCurve.Jacobian.addZ P Q ^ 2 -
        P x * Q z ^ 2 * WeierstrassCurve.Jacobian.addZ P Q ^ 2 -
      Q x * P z ^ 2 * WeierstrassCurve.Jacobian.addZ P Q ^ 2) /
    (P z * Q z) ^ 2


@[simp]
theorem coe_toEquiv_symm (e : R ≃+* S) : (e.symm : S ≃ R) = (e : R ≃ S).symm

{R : Type u_4}
{S : Type u_5}
[Mul R]
[Mul S]
[Add R]
[Add S]
(e : R ≃+* S)


theorem card_support_extend_domain (f : α ≃ Subtype p) {g : Perm α} :
    (g.extendDomain f).support.card = g.support.card

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{β : Type u_2}
[DecidableEq β]
[Fintype β]
{p : β → Prop}
[DecidablePred p]
(f : α ≃ Subtype p)
{g : Equiv.Perm α}


@[to_additive]
theorem comap_map_eq (H : Subgroup G) : comap f (map f H) = H ⊔ f.ker

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

AddSubgroup.comap f (AddSubgroup.map f H) = H ⊔ f.ker


@[simp]
theorem WithLp.equiv_symm_single (i : ι) (a : 𝕜) :
    (WithLp.equiv _ _).symm (Pi.single i a) = EuclideanSpace.single i a

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
(i : ι)
(a : 𝕜)

(WithLp.equiv 2 (ι → 𝕜)).symm (Pi.single i a) = EuclideanSpace.single i a


@[to_additive (attr := fun_prop) ContinuousAt.nnnorm]
theorem ContinuousAt.nnnorm' {a : α} (h : ContinuousAt f a) : ContinuousAt (fun x => ‖f x‖₊) a

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}
{a : α}
(h : ContinuousAt f a)


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)


theorem Basis.basis' (hI : M.Basis I X) : M.Basis' I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hI : M.Basis I X)


theorem mapsTo_prod_map_diagonal : MapsTo (Prod.map f f) (diagonal α) (diagonal β)

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

Set.MapsTo (Prod.map f f) (Set.diagonal α) (Set.diagonal β)


theorem _root_.Set.biInter_finsetSigma (s : Finset ι) (t : ∀ i, Finset (α i))
    (f : Sigma α → Set β) : ⋂ ij ∈ s.sigma t, f ij = ⋂ i ∈ s, ⋂ j ∈ t i, f ⟨i, j⟩

{ι : Type u_1}
{α : ι → Type u_2}
{β : Type u_3}
(s : Finset ι)
(t : (i : ι) → Finset (α i))
(f : Sigma α → Set β)


/-- The category of actions of `G` in the category `V`
is equivalent to the functor category `singleObj G ⥤ V`.
-/
@[simps]
def functorCategoryEquivalence : Action V G ≌ SingleObj G ⥤ V

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)

(Action.functorCategoryEquivalence V G).inverse = Action.FunctorCategoryEquivalence.inverse


theorem IsLocalMinOn.isLocalMin (hf : IsLocalMinOn f s a) (hs : s ∈ 𝓝 a) : IsLocalMin f a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalMinOn f s a)
(hs : s ∈ 𝓝 a)


theorem MDifferentiable.mdifferentiableOn (h : MDifferentiable I I' f) :
    MDifferentiableOn I I' f s

{𝕜 : 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}
(h : MDifferentiable I I' f)


theorem _root_.SimpleGraph.toSubgraph.isSpanning (H : SimpleGraph V) (h : H ≤ G) :
    (toSubgraph H h).IsSpanning

{V : Type u}
{G : SimpleGraph V}
(H : SimpleGraph V)
(h : H ≤ G)


/-- Prove `Set.Countable` from a `Countable` instance on the subtype. -/
theorem to_countable (s : Set α) [Countable s] : s.Countable


theorem CliqueFreeOn.anti (hGH : G ≤ H) (hH : H.CliqueFreeOn s n) : G.CliqueFreeOn s n

{α : Type u_1}
(G H : SimpleGraph α)
{s : Set α}
{n : ℕ}
(hGH : G ≤ H)
(hH : H.CliqueFreeOn s n)


@[simp]
theorem sumCompl_apply_inl {α : Type u} (s : Set α) [DecidablePred (· ∈ s)] (x : s) :
    Equiv.Set.sumCompl s (Sum.inl x) = x

{α : Type u}
(s : Set α)
[DecidablePred fun x => x ∈ s]
(x : ↑s)


theorem symm_injective : Function.Injective (@PEquiv.symm α β)


@[simp]
theorem principal_le_iff {F : PFilter P} : principal x ≤ F ↔ x ∈ F

{P : Type u_1}
[Preorder P]
{x : P}
{F : Order.PFilter P}


lemma map_slope {F : Type u} [Field F] (W : Affine F) {K : Type v} [Field K] (f : F →+* K)
    (x₁ x₂ y₁ y₂ : F) : (W.map f).toAffine.slope (f x₁) (f x₂) (f y₁) (f y₂) =
      f (W.slope x₁ x₂ y₁ y₂)

{F : Type u}
[Field F]
(W : WeierstrassCurve.Affine F)
{K : Type v}
[Field K]
(f : F →+* K)
(x₁ x₂ y₁ y₂ : F)

(WeierstrassCurve.map W f).toAffine.slope (f x₁) (f x₂) (f y₁) (f y₂) = f (W.slope x₁ x₂ y₁ y₂)


@[simp]
theorem not_nontrivial_singleton : ¬ ({a} : Finset α).Nontrivial


@[reassoc (attr := simp)]
theorem condition (a) : I.fst a ≫ K.π (I.fstFrom a) = I.snd a ≫ K.π (I.sndFrom a)

{I : CategoryTheory.Limits.MultispanIndex C}

(K : CategoryTheory.Limits.Multicofork I)

CategoryTheory.CategoryStruct.comp (I.fst a) (K.π (I.fstFrom a)) =
  CategoryTheory.CategoryStruct.comp (I.snd a) (K.π (I.sndFrom a))


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →⋆ₐ[R] B) × (A →⋆ₐ[R] C) ≃ (A →⋆ₐ[R] B × C)

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

StarAlgHom.prodEquiv.symm f = ((StarAlgHom.fst R B C).comp f, (StarAlgHom.snd R B C).comp f)


theorem lift.principalSeg_top' : lift.principalSeg.{u, u + 1}.top = @type Ordinal (· < ·) _

Ordinal.lift.principalSeg.top = Ordinal.type fun x x_1 => x < x_1


@[ext]
theorem ext {f g : α →Co β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
{f g : α →Co β}
(h : ∀ (a : α), f a = g a)


theorem Nodup.map_update [DecidableEq α] {l : List α} (hl : l.Nodup) (f : α → β) (x : α) (y : β) :
    l.map (Function.update f x y) =
      if x ∈ l then (l.map f).set (l.indexOf x) y else l.map f

{α : Type u}
{β : Type v}
[DecidableEq α]
{l : List α}
(hl : l.Nodup)
(f : α → β)
(x : α)
(y : β)

List.map (Function.update f x y) l = if x ∈ l then (List.map f l).set (List.indexOf x l) y else List.map f l


@[simp]
theorem disjSum_zero : s.disjSum (0 : Multiset β) = s.map inl

{α : Type u_1}
{β : Type u_2}
(s : Multiset α)


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

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]


theorem pi_diff_pi_subset (i : Set α) (s t : ∀ a, Set (π a)) :
    pi i s \ pi i t ⊆ ⋃ a ∈ i, eval a ⁻¹' (s a \ t a)

{α : Type u_1}
{π : α → Type u_11}
(i : Set α)
(s t : (a : α) → Set (π a))

i.pi s \ i.pi t ⊆ ⋃ a ∈ i, Function.eval a ⁻¹' (s a \ t a)


@[to_additive (attr := simp)]
theorem dist_div_eq_dist_mul_left (a b c : E) : dist (a / b) c = dist a (c * b)

{E : Type u_3}
[SeminormedGroup E]
(a b c : E)


theorem covBy_iff_atom_Ici (h : a ≤ b) : a ⋖ b ↔ IsAtom (⟨b, h⟩ : Set.Ici a)

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


/-- A continuous function on `ℝ` is `IntervalIntegrable` with respect to any locally finite measure
`ν` on ℝ. -/
theorem Continuous.intervalIntegrable {u : ℝ → E} (hu : Continuous u) (a b : ℝ) :
    IntervalIntegrable u μ a b


theorem mem_map_equiv {f : R ≃+* S} {K : NonUnitalSubsemiring R} {x : S} :
    x ∈ K.map (f : R →ₙ+* S) ↔ f.symm x ∈ K

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{f : R ≃+* S}
{K : NonUnitalSubsemiring R}
{x : S}

x ∈ NonUnitalSubsemiring.map (↑f) K ↔ f.symm x ∈ K


theorem forget₂_map_associator_inv (X Y Z : QuadraticModuleCat.{u} R) :
    (forget₂ (QuadraticModuleCat R) (ModuleCat R)).map (α_ X Y Z).inv =
      (α_ X.toModuleCat Y.toModuleCat Z.toModuleCat).inv

{R : Type u}
[CommRing R]
[Invertible 2]
(X Y Z : QuadraticModuleCat R)

(CategoryTheory.forget₂ (QuadraticModuleCat R) (ModuleCat R)).map (α_ X Y Z).inv =
  (α_ X.toModuleCat Y.toModuleCat Z.toModuleCat).inv


theorem Finset.centerMass_ite_eq (hi : i ∈ t) :
    t.centerMass (fun j => if i = j then (1 : R) else 0) z = z i

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(i : ι)
(t : Finset ι)
(z : ι → E)
(hi : i ∈ t)

t.centerMass (fun j => if i = j then 1 else 0) z = z i


/-- Additivity of a multilinear map along all coordinates at the same time,
writing `f (m + m')` as the sum of `f (s.piecewise m m')` over all sets `s`. -/
theorem map_add_univ [DecidableEq ι] [Fintype ι] (m m' : ∀ i, M₁ i) :
    f (m + m') = ∑ s : Finset ι, f (s.piecewise m m')

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
[DecidableEq ι]
[Fintype ι]
(m m' : (i : ι) → M₁ i)


theorem isConnected_univ [ConnectedSpace α] : IsConnected (univ : Set α)

{α : Type u}
[TopologicalSpace α]
[ConnectedSpace α]


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

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


/-- For `0 < r`, `turanGraph n r` is Turán-maximal. -/
theorem isTuranMaximal_turanGraph (hr : 0 < r) : (turanGraph n r).IsTuranMaximal r

(SimpleGraph.turanGraph n r).IsTuranMaximal r


theorem add_pow_eq_zero_of_add_le_succ_of_pow_eq_zero (h_comm : Commute x y) {m n k : ℕ}
    (hx : x ^ m = 0) (hy : y ^ n = 0) (h : m + n ≤ k + 1) :
    (x + y) ^ k = 0

{R : Type u_1}
{x y : R}
[Semiring R]
(h_comm : Commute x y)
{m n k : ℕ}
(hx : x ^ m = 0)
(hy : y ^ n = 0)
(h : m + n ≤ k + 1)


@[simp]
lemma image_val_union_self_left_eq : ↑D ∪ A = A


/-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N'

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : AddHom M N)
(N' : AddSubsemigroup N)
(x : ↥(AddSubsemigroup.comap f N'))


@[to_additive (attr := simp)]
lemma UniformOnFun.toFun_inv [Inv β] (f : α →ᵤ[𝔖] β) : toFun 𝔖 (f⁻¹) = (toFun 𝔖 f)⁻¹

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[Inv β]
(f : α →ᵤ[𝔖] β)

(UniformOnFun.toFun 𝔖) f⁻¹ = ((UniformOnFun.toFun 𝔖) f)⁻¹


theorem zoom_fill (H : zoom cut t path = (t', path')) : path.fill t = path'.fill t'

∀ {α : Type u_1} {cut : α → Ordering} {t : Batteries.RBNode α} {path : Batteries.RBNode.Path α}
  {t' : Batteries.RBNode α} {path' : Batteries.RBNode.Path α},
  Batteries.RBNode.zoom cut t path = (t', path') → path.fill t = path'.fill t'


theorem utf8GetAux_addChar_right_cancel (s : List Char) (i p : Pos) (c : Char) :
    utf8GetAux s (i + c) (p + c) = utf8GetAux s i p

(s : List Char)
(i p : String.Pos)
(c : Char)

String.utf8GetAux s (i + c) (p + c) = String.utf8GetAux s i p


/-- A simplicial object that is isomorphic to a split simplicial object is split. -/
@[simps]
def ofIso (e : X ≅ Y) : Splitting Y

{X Y : CategoryTheory.SimplicialObject C}

(s.ofIso e).isColimit' Δ = (s.isColimit Δ).ofIsoColimit (CategoryTheory.Limits.Cofan.ext (e.app Δ) ⋯)


@[simp]
theorem zero_mod (b : Ordinal) : 0 % b = 0


/-- The (Bochner) integral of the product of two independent, nonnegative random
  variables is the product of their integrals. The proof is just plumbing around
  `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'`. -/
theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
    (hXm : AEMeasurable X μ) (hYm : AEMeasurable Y μ) :
    integral μ (X * Y) = integral μ X * integral μ Y

(hXY : ProbabilityTheory.IndepFun X Y μ)

MeasureTheory.integral μ (X * Y) = MeasureTheory.integral μ X * MeasureTheory.integral μ Y


@[to_additive]
theorem mul_lt_mul_of_le_of_lt [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α} (h₁ : a ≤ b) (h₂ : c < d) :
    a * c < b * d

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

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


/-- Given a measurable embedding to a Borel space which is also a topological embedding, then the
source space is also a Borel space. -/
lemma MeasurableEmbedding.borelSpace {α β : Type*} [MeasurableSpace α] [TopologicalSpace α]
    [MeasurableSpace β] [TopologicalSpace β] [hβ : BorelSpace β] {e : α → β}
    (h'e : MeasurableEmbedding e) (h''e : Inducing e) :
    BorelSpace α

{α : Type u_6}
{β : Type u_7}
[MeasurableSpace α]
[TopologicalSpace α]
[MeasurableSpace β]
[TopologicalSpace β]
[hβ : BorelSpace β]
{e : α → β}
(h'e : MeasurableEmbedding e)
(h''e : Inducing e)


/-- A monoid is isomorphic to the opposite of its opposite. -/
@[to_additive (attr := simps!)
      "A additive monoid is isomorphic to the opposite of its opposite."]
def MulEquiv.opOp (M : Type*) [Mul M] : M ≃* Mᵐᵒᵖᵐᵒᵖ

∀ (a : M), (MulEquiv.opOp M) a = MulOpposite.op (MulOpposite.op a)


/-- **Chernoff bound** on the upper tail of a real random variable. -/
theorem measure_ge_le_exp_cgf [IsFiniteMeasure μ] (ε : ℝ) (ht : 0 ≤ t)
    (h_int : Integrable (fun ω => exp (t * X ω)) μ) :
    (μ {ω | ε ≤ X ω}).toReal ≤ exp (-t * ε + cgf X μ t)

(h_int : MeasureTheory.Integrable (fun ω => rexp (t * X ω)) μ)

(μ {ω | ε ≤ X ω}).toReal ≤ rexp (-t * ε + ProbabilityTheory.cgf X μ t)


theorem arcsin_eq_pi_div_two_sub_arccos (x : ℝ) : arcsin x = π / 2 - arccos x


theorem card_cast_subgroup_card_ne_zero [Ring K] [NoZeroDivisors K] [Nontrivial K]
    (G : Subgroup Kˣ) [Fintype G] : (Fintype.card G : K) ≠ 0

{K : Type u_1}
[Ring K]
[NoZeroDivisors K]
[Nontrivial K]
(G : Subgroup Kˣ)
[Fintype ↥G]


/-- Rule `r` rewrites string `u` is to string `v` iff they share both a prefix `p` and postfix `q`
such that the remaining middle part of `u` is the input of `r` and the remaining middle part
of `u` is the output of `r`. -/
theorem rewrites_iff {r : ContextFreeRule T N} (u v : List (Symbol T N)) :
    r.Rewrites u v ↔ ∃ p q : List (Symbol T N),
      u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q

{T : Type uT}
{N : Type uN}
{r : ContextFreeRule T N}
(u v : List (Symbol T N))

r.Rewrites u v ↔ ∃ p q, u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q


@[simp] theorem data_singleton (c : Char) : (singleton c).data = [c]

(String.singleton c).data = c :: List.nil


theorem localizationPreserves_surjective :
    RingHom.LocalizationPreserves fun {R S} _ _ f => Function.Surjective f

RingHom.LocalizationPreserves fun {R S} x x_1 f => Function.Surjective ⇑f


@[simp]
theorem mk_ρ_inv {X : F C} : ⟦Hom.ρ_inv X⟧ = (ρ_ X).inv

{X : CategoryTheory.FreeMonoidalCategory C}

⟦CategoryTheory.FreeMonoidalCategory.Hom.ρ_inv X⟧ = (CategoryTheory.MonoidalCategory.rightUnitor X).inv


@[simp] theorem forgetMonoidal_toFunctor : (forgetMonoidal C).toFunctor = forget C

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

(Mon_.forgetMonoidal C).toFunctor = Mon_.forget C


lemma smul_nonpos_of_nonpos_of_nonneg [SMulPosMono α β] (ha : a ≤ 0) (hb : 0 ≤ b) : a • b ≤ 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[Preorder α]
[Preorder β]
[SMulPosMono α β]
(ha : a ≤ 0)
(hb : 0 ≤ b)


theorem count_coe_fill_of_ne [DecidableEq α] {a x : α} {i : Fin (n + 1)} {s : Sym α (n - i)}
    (hx : x ≠ a) :
    count x (fill a i s : Multiset α) = count x s

{α : Type u_1}
{n : ℕ}
[DecidableEq α]
{a x : α}
{i : Fin (n + 1)}
{s : Sym α (n - ↑i)}
(hx : x ≠ a)

Multiset.count x ↑(Sym.fill a i s) = Multiset.count x ↑s


/-- The canonical morphism from `X` to the spectrum of its global sections. -/
@[simps! val_base]
def toΓSpec : X ⟶ Spec.locallyRingedSpaceObj (Γ.obj (op X))


@[simp]
theorem mem_map {β : Type*} {f : α → β} {b : β} {s : Cycle α} :
    b ∈ s.map f ↔ ∃ a, a ∈ s ∧ f a = b

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{b : β}
{s : Cycle α}


theorem dist_tri_right (n m : ℕ) : m ≤ n + dist n m


theorem insert_idem (a : α) (s : Finset α) : insert a (insert a s) = insert a s

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


theorem toLp_add {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    (hf.add hg).toLp (f + g) = hf.toLp f + hg.toLp g

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

MeasureTheory.Memℒp.toLp (f + g) ⋯ = MeasureTheory.Memℒp.toLp f hf + MeasureTheory.Memℒp.toLp g hg


theorem isMin_iff_forall_not_lt : IsMin a ↔ ∀ b, ¬b < a


/-- A choice of isomorphism `T₁ ≅ T₂` between two distinguished triangles
when we are given two isomorphisms `e₁ : T₁.obj₁ ≅ T₂.obj₁` and `e₂ : T₁.obj₂ ≅ T₂.obj₂`. -/
@[simps! hom_hom₁ hom_hom₂ inv_hom₁ inv_hom₂]
def isoTriangleOfIso₁₂ (T₁ T₂ : Triangle C) (hT₁ : T₁ ∈ distTriang C)
    (hT₂ : T₂ ∈ distTriang C) (e₁ : T₁.obj₁ ≅ T₂.obj₁) (e₂ : T₁.obj₂ ≅ T₂.obj₂)
    (comm : T₁.mor₁ ≫ e₂.hom = e₁.hom ≫ T₂.mor₁) : T₁ ≅ T₂

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

(T₁ T₂ : CategoryTheory.Pretriangulated.Triangle C)

(hT₁ : T₁ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(hT₂ : T₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.Pretriangulated.isoTriangleOfIso₁₂ T₁ T₂ hT₁ hT₂ e₁ e₂ comm).hom.hom₂ = e₂.hom


@[simp, mfld_simps]
theorem coe_coe : ⇑e.toPartialHomeomorph = e

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


@[to_additive]
theorem eq_mul_of_div_eq (h : a / c = b) : a = b * c

{G : Type u_3}
[Group G]
{a b c : G}
(h : a / c = b)


@[simp] theorem uniqueBaseOn_dual_eq (I E : Set α) :
    (uniqueBaseOn I E)✶ = uniqueBaseOn (E \ I) E

(Matroid.uniqueBaseOn I E)✶ = Matroid.uniqueBaseOn (E \ I) E


/-- If `S` is an extension of `R` with power basis `pb` and `g` is a monic polynomial over `R`
such that `pb.gen` has a minimal polynomial `g`, then `S` is isomorphic to `AdjoinRoot g`.

Compare `PowerBasis.equivOfRoot`, which would require
`h₂ : aeval pb.gen (minpoly R (root g)) = 0`; that minimal polynomial is not
guaranteed to be identical to `g`. -/
@[simps (config := .asFn)]
def equiv' (h₁ : aeval (root g) (minpoly R pb.gen) = 0) (h₂ : aeval pb.gen g = 0) :
    AdjoinRoot g ≃ₐ[R] S

(h₁ : (Polynomial.aeval (AdjoinRoot.root g)) (minpoly R pb.gen) = 0)

⇑(AdjoinRoot.equiv' g pb h₁ h₂) = ⇑(AdjoinRoot.liftHom g pb.gen h₂)


theorem hasFiniteIntegral_smul_iff [NormedRing 𝕜] [MulActionWithZero 𝕜 β] [BoundedSMul 𝕜 β] {c : 𝕜}
    (hc : IsUnit c) (f : α → β) : HasFiniteIntegral (c • f) μ ↔ HasFiniteIntegral f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[MulActionWithZero 𝕜 β]
[BoundedSMul 𝕜 β]
{c : 𝕜}
(hc : IsUnit c)
(f : α → β)

MeasureTheory.HasFiniteIntegral (c • f) μ ↔ MeasureTheory.HasFiniteIntegral f μ


/-- A function which is continuous on a compact set `s` is almost everywhere strongly measurable
with respect to `μ.restrict s`. -/
theorem ContinuousOn.aestronglyMeasurable_of_isCompact [TopologicalSpace α] [OpensMeasurableSpace α]
    [TopologicalSpace β] [PseudoMetrizableSpace β] {f : α → β} {s : Set α} {μ : Measure α}
    (hf : ContinuousOn f s) (hs : IsCompact s) (h's : MeasurableSet s) :
    AEStronglyMeasurable f (μ.restrict s)

MeasureTheory.AEStronglyMeasurable f (μ.restrict s)


@[to_additive (attr := simp)]
theorem measure_preimage_mul_right (μ : Measure G) [IsMulRightInvariant μ] (g : G) (A : Set G) :
    μ ((fun h => h * g) ⁻¹' A) = μ A

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(μ : MeasureTheory.Measure G)
[μ.IsMulRightInvariant]
(g : G)
(A : Set G)


/-- A non-unital star `R`-algebra `A` has a *continuous functional calculus* for elements
satisfying the property `p : A → Prop` if

+ for every such element `a : A` there is a non-unital star algebra homomorphism
  `cfcₙHom : C(quasispectrum R a, R)₀ →⋆ₙₐ[R] A` sending the (restriction of) the identity map
  to `a`.
+ `cfcₙHom` is a closed embedding for which the quasispectrum of the image of function `f` is its
  range.
+ `cfcₙHom` preserves the property `p`.

The property `p` is marked as an `outParam` so that the user need not specify it. In practice,

+ for `R := ℂ`, we choose `p := IsStarNormal`,
+ for `R := ℝ`, we choose `p := IsSelfAdjoint`,
+ for `R := ℝ≥0`, we choose `p := (0 ≤ ·)`.

Instead of directly providing the data we opt instead for a `Prop` class. In all relevant cases,
the continuous functional calculus is uniquely determined, and utilizing this approach
prevents diamonds or problems arising from multiple instances. -/
class NonUnitalContinuousFunctionalCalculus (R : Type*) {A : Type*} (p : outParam (A → Prop))
    [CommSemiring R] [Nontrivial R] [StarRing R] [MetricSpace R] [TopologicalSemiring R]
    [ContinuousStar R] [NonUnitalRing A] [StarRing A] [TopologicalSpace A] [Module R A]
    [IsScalarTower R A A] [SMulCommClass R A A] : Prop where
  predicate_zero : p 0
  exists_cfc_of_predicate : ∀ a, p a → ∃ φ : C(σₙ R a, R)₀ →⋆ₙₐ[R] A,
    ClosedEmbedding φ ∧ φ ⟨(ContinuousMap.id R).restrict <| σₙ R a, rfl⟩ = a ∧
      (∀ f, σₙ R (φ f) = Set.range f) ∧ ∀ f, p (φ f)

[self : NonUnitalContinuousFunctionalCalculus R p]

p a →
  ∃ φ,
    ClosedEmbedding ⇑φ ∧
      φ { toContinuousMap := ContinuousMap.restrict (σₙ R a) (ContinuousMap.id R), map_zero' := ⋯ } = a ∧
        (∀ (f : C(↑(σₙ R a), R)₀), σₙ R (φ f) = Set.range ⇑f) ∧ ∀ (f : C(↑(σₙ R a), R)₀), p (φ f)


lemma Derives.eq_or_head {u w : List (Symbol T g.NT)} (huw : g.Derives u w) :
    u = w ∨ ∃ v : List (Symbol T g.NT), g.Produces u v ∧ g.Derives v w

{T : Type uT}
{g : ContextFreeGrammar T}
{u w : List (Symbol T g.NT)}
(huw : g.Derives u w)

u = w ∨ ∃ v, g.Produces u v ∧ g.Derives v w


/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which antivary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` antivary
together. Stated by permuting the entries of `g`. -/
theorem AntivaryOn.sum_mul_eq_sum_mul_comp_perm_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i * g (σ i) = ∑ i ∈ s, f i * g i ↔ AntivaryOn f (g ∘ σ) s

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f g : ι → α}
(hfg : AntivaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)

∑ i ∈ s, f i * g (σ i) = ∑ i ∈ s, f i * g i ↔ AntivaryOn f (g ∘ ⇑σ) ↑s


theorem range_equiv_smaller_toFun_bijective (o : Ordinal) :
    Function.Bijective (range_equiv_smaller_toFun C o)

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))
(o : Ordinal.{u})

Function.Bijective (Profinite.NobelingProof.GoodProducts.range_equiv_smaller_toFun C o)


@[to_additive (attr := simp)]
theorem coe_singletonMonoidHom : (singletonMonoidHom : α → Set α) = singleton


@[reassoc]
lemma singleObjOpcyclesSelfIso_hom :
    (singleObjOpcyclesSelfIso c j A).hom =
      (singleObjXSelf c j A).inv ≫ ((single C c j).obj A).pOpcycles j

(HomologicalComplex.singleObjOpcyclesSelfIso c j A).hom =
  (HomologicalComplex.singleObjXSelf c j A).inv ≫ ((HomologicalComplex.single C c j).obj A).pOpcycles j


@[simp]
theorem preimage_range (f : α → β) : f ⁻¹' range f = univ

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


@[simp]
theorem restrict_univ : v.restrict Set.univ = v

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


@[simp] theorem nnnorm_equiv_symm (f : ∀ i, β i) : ‖(WithLp.equiv ⊤ _).symm f‖₊ = ‖f‖₊

[(i : ι) → SeminormedAddCommGroup (β i)]

‖(WithLp.equiv ⊤ ((i : ι) → β i)).symm f‖₊ = ‖f‖₊


theorem comp_continuous_iff {γ} [TopologicalSpace γ] {g : γ → α} :
    Continuous ((f : α → β) ∘ g) ↔ Continuous g

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)
{γ : Type u_6}
[TopologicalSpace γ]
{g : γ → α}


theorem IsExtrOn.comp_mapsTo {t : Set δ} {g : δ → α} {b : δ} (hf : IsExtrOn f s a)
    (hg : MapsTo g t s) (ha : g b = a) : IsExtrOn (f ∘ g) t b

{α : Type u}
{β : Type v}
{δ : Type x}
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
{t : Set δ}
{g : δ → α}
{b : δ}
(hf : IsExtrOn f s a)
(hg : Set.MapsTo g t s)
(ha : g b = a)


@[norm_cast]
theorem coe_neg (a : α) : ((-a : α) : Completion α) = -a

{α : Type u_3}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
(a : α)


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


theorem support_nonempty_iff {f : α →₀ M} : f.support.Nonempty ↔ f ≠ 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}


theorem not_specializes_iff_exists_closed : ¬x ⤳ y ↔ ∃ S : Set X, IsClosed S ∧ x ∈ S ∧ y ∉ S

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

¬x ⤳ y ↔ ∃ S, IsClosed S ∧ x ∈ S ∧ y ∉ S


/-- A subset of a preorder `P` is an ideal if it is
  - nonempty
  - upward directed (any pair of elements in the ideal has an upper bound in the ideal)
  - downward closed (any element less than an element of the ideal is in the ideal). -/
@[mk_iff]
structure IsIdeal {P} [LE P] (I : Set P) : Prop where
  /-- The ideal is downward closed. -/
  IsLowerSet : IsLowerSet I
  /-- The ideal is nonempty. -/
  Nonempty : I.Nonempty
  /-- The ideal is upward directed. -/
  Directed : DirectedOn (· ≤ ·) I

Order.IsIdeal I ↔ IsLowerSet I ∧ I.Nonempty ∧ DirectedOn (fun x x_1 => x ≤ x_1) I


@[simp] lemma map_injective : Injective (ULift.map f : ULift.{u'} α → ULift.{v'} β) ↔ Injective f

Function.Injective (ULift.map f) ↔ Function.Injective f


@[to_additive]
theorem op_smul_finset_smul_eq_smul_smul_finset (a : α) (s : Finset β) (t : Finset γ)
    (h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c) : (op a • s) • t = s • a • t

(h : ∀ (a : α) (b : β) (c : γ), (MulOpposite.op a • b) • c = b • a • c)


@[to_additive prod_mono_right]
theorem prod_mono_right (K : Subgroup G) : Monotone fun t : Subgroup N => K.prod t

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


lemma Base.map {B : Set α} (hB : M.Base B) {f : α → β} (hf) : (M.map f hf).Base (f '' B)

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{B : Set α}
(hB : M.Base B)
{f : α → β}
(hf : Set.InjOn f M.E)


/-- An additive `n`-Freiman homomorphism from a set `A` to a set `B` is a bijective map which
preserves sums of `n` elements. -/
structure IsAddFreimanIso [AddCommMonoid α] [AddCommMonoid β] (n : ℕ) (A : Set α) (B : Set β)
    (f : α → β) : Prop where
  bijOn : BijOn f A B
  /-- An additive `n`-Freiman homomorphism preserves sums of `n` elements. -/
  map_sum_eq_map_sum ⦃s t : Multiset α⦄ (hsA : ∀ ⦃x⦄, x ∈ s → x ∈ A) (htA : ∀ ⦃x⦄, x ∈ t → x ∈ A)
    (hs : Multiset.card s = n) (ht : Multiset.card t = n) :
    (s.map f).sum = (t.map f).sum ↔ s.sum = t.sum

{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{n : ℕ}
{A : Set α}
{B : Set β}
{f : α → β}
(self : IsAddFreimanIso n A B f)
⦃s t : Multiset α⦄
(hsA : ∀ ⦃x : α⦄, x ∈ s → x ∈ A)
(htA : ∀ ⦃x : α⦄, x ∈ t → x ∈ A)
(hs : Multiset.card s = n)
(ht : Multiset.card t = n)

(Multiset.map f s).sum = (Multiset.map f t).sum ↔ s.sum = t.sum


@[simp]
theorem trop_top [Top R] : trop (⊤ : R) = 0


theorem Perm.countP_eq (p : α → Bool) {l₁ l₂ : List α} (s : l₁ ~ l₂) :
    countP p l₁ = countP p l₂

{α : Type u_1}
(p : α → Bool)
{l₁ l₂ : List α}
(s : l₁ ~ l₂)


/-- The (distinguished) triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
@[simps!]
noncomputable def singleTriangle : Triangle (DerivedCategory C)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)


@[to_additive]
lemma mk_mul_mk_inv_eq_one (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) :
    (⟨_, h.1⟩ : S) * ⟨_, h.2⟩ = 1

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

⟨(AddUnits.coeHom M) x, ⋯⟩ + ⟨(AddUnits.coeHom M) (-x), ⋯⟩ = 0


theorem PushoutCocone.inl_colimit_cocone {X Y Z : C} (f : Z ⟶ X) (g : Z ⟶ Y)
    [HasColimit (span f g)] : PushoutCocone.inl (colimit.cocone (span f g)) = pushout.inl _ _

[CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.span f g)]

CategoryTheory.Limits.PushoutCocone.inl (CategoryTheory.Limits.colimit.cocone (CategoryTheory.Limits.span f g)) =
  CategoryTheory.Limits.pushout.inl f g


@[simp] protected theorem mul_one (a : Int) : a * 1 = a


/-- The difference with `Algebra.adjoin_induction` is that this acts on the subtype. -/
@[elab_as_elim]
theorem adjoin_induction' {p : adjoin R s → Prop} (mem : ∀ (x) (h : x ∈ s), p ⟨x, subset_adjoin h⟩)
    (algebraMap : ∀ r, p (algebraMap R _ r)) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) (x : adjoin R s) : p x

(algebraMap : ∀ (r : R), p ((algebraMap R ↥(Algebra.adjoin R s)) r))

(add : ∀ (x y : ↥(Algebra.adjoin R s)), p x → p y → p (x + y))

(mul : ∀ (x y : ↥(Algebra.adjoin R s)), p x → p y → p (x * y))


/-- (Implementation Detail) The glue data associated to a disjoint union. -/
@[simps! J V U f t]
noncomputable
def disjointGlueData : Scheme.GlueData

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)

(AlgebraicGeometry.disjointGlueData f).J = ι


theorem isImage_source_target_of_disjoint (e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
    (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
(hs : Disjoint e.source e'.source)
(ht : Disjoint e.target e'.target)


@[simp]
theorem extend_apply [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) (x : α) : (f₁.extend g hg f₂) (g x) = f₁ x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
(f₁ : MeasureTheory.SimpleFunc α γ)
{g : α → β}
(hg : MeasurableEmbedding g)
(f₂ : MeasureTheory.SimpleFunc β γ)
(x : α)


theorem affineBasisCover_map_range (X : Scheme.{u}) (x : X)
    (r : (X.local_affine x).choose_spec.choose) :
    Set.range (X.affineBasisCover.map ⟨x, r⟩).1.base =
      (X.affineCover.map x).1.base '' (PrimeSpectrum.basicOpen r).1

(X : AlgebraicGeometry.Scheme)
(x : ↑↑X.toPresheafedSpace)
(r : ↑⋯.choose)

Set.range ⇑(X.affineBasisCover.map ⟨x, r⟩).val.base =
  ⇑(X.affineCover.map x).val.base '' (PrimeSpectrum.basicOpen r).carrier


lemma pow_mod (a b n : ℕ) : a ^ b % n = (a % n) ^ b % n


theorem tendsto_atBot_iSup (h_anti : Antitone f) : Tendsto f atBot (𝓝 (⨆ i, f i))

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[CompleteLattice α]
[SupConvergenceClass α]
{f : ι → α}
(h_anti : Antitone f)

Filter.Tendsto f Filter.atBot (𝓝 (⨆ i, f i))


theorem coe_nnreal_eq_coe_real (x : ℝ≥0) : ((x : ℝ≥0∞) : EReal) = (x : ℝ)


@[simp]
theorem IsUnit.neg_iff [Monoid α] [HasDistribNeg α] (a : α) : IsUnit (-a) ↔ IsUnit a

{α : Type u}
[Monoid α]
[HasDistribNeg α]
(a : α)


/-- Augment a cosimplicial object with an object. -/
@[simps]
def augment (X : CosimplicialObject C) (X₀ : C) (f : X₀ ⟶ X.obj [0])
    (w : ∀ (i : SimplexCategory) (g₁ g₂ : ([0] : SimplexCategory) ⟶ i),
      f ≫ X.map g₁ = f ≫ X.map g₂) : CosimplicialObject.Augmented C

(X : CategoryTheory.CosimplicialObject C)

(w : ∀ (i : SimplexCategory) (g₁ g₂ : SimplexCategory.mk 0 ⟶ i), f ≫ X.map g₁ = f ≫ X.map g₂)


/-- Reinterpret `G ≃+ Additive H` as `Multiplicative G ≃* H`. -/
@[simps]
def AddEquiv.toMultiplicative'' [AddZeroClass G] [MulOneClass H] :
    G ≃+ Additive H ≃ (Multiplicative G ≃* H)

{G : Type u_1}
{H : Type u_2}
[AddZeroClass G]
[MulOneClass H]
(f : G ≃+ Additive H)
(a : H)

(AddEquiv.toMultiplicative'' f).symm a = (AddMonoidHom.toMultiplicative' f.symm.toAddMonoidHom) a


@[to_additive (attr := simp)]
theorem uncurry_mul [∀ a b, Mul (γ a b)] (x y : ∀ a b, γ a b) :
    Sigma.uncurry (x * y) = Sigma.uncurry x * Sigma.uncurry y

{α : Type u_3}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_5}
[(a : α) → (b : β a) → Mul (γ a b)]
(x y : (a : α) → (b : β a) → γ a b)


@[simp]
theorem WithBot.ciSup_empty [IsEmpty ι] [SupSet α] (f : ι → WithBot α) :
    ⨆ i, f i = ⊥

{α : Type u_1}
{ι : Sort u_4}
[Preorder α]
[IsEmpty ι]
[SupSet α]
(f : ι → WithBot α)