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

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

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

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


/-- Tensoring on the right with a fixed object, as a functor. -/
@[simps!]
def tensorRight (X : C) : C ⥤ C

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

(CategoryTheory.MonoidalCategory.tensorRight X).obj j = CategoryTheory.MonoidalCategory.tensorObj j X


@[to_additive]
protected theorem mul_left_cancel (h : IsUnit a) : a * b = a * c → b = c

{M : Type u_1}
[Monoid M]
{a b c : M}
(h : IsUnit a)


lemma Odd.natCast {R : Type*} [Semiring R] {n : ℕ} (hn : Odd n) : Odd (n : R)

{R : Type u_5}
[Semiring R]
{n : ℕ}
(hn : Odd n)


theorem eLpNorm_mono_real {f : α → F} {g : α → ℝ} (h : ∀ x, ‖f x‖ ≤ g x) :
    eLpNorm f p μ ≤ eLpNorm g p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
{g : α → ℝ}
(h : ∀ (x : α), ‖f x‖ ≤ g x)

MeasureTheory.eLpNorm f p μ ≤ MeasureTheory.eLpNorm g p μ


theorem finrank {n} (h : n ≠ 0) : FiniteDimensional.finrank (ZMod p) (GaloisField p n) = n

(p : ℕ)
[h_prime : Fact (Nat.Prime p)]
{n : ℕ}
(h : n ≠ 0)


/-- The group exponent exists for any bounded torsion group. -/
@[to_additive IsAddTorsion.exponentExists
      "The group exponent exists for any bounded additive torsion group."]
theorem IsTorsion.exponentExists (tG : IsTorsion G)
    (bounded : (Set.range fun g : G => orderOf g).Finite) : ExponentExists G

(bounded : (Set.range fun g => addOrderOf g).Finite)


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

∀ (a_1 : G ≃+c[a, a] G) (a_2 : G), ↑(AddConstEquiv.equivUnits a_1)⁻¹ a_2 = a_1⁻¹ a_2


theorem subset_coe_pow (p : SubMulAction R M) : ∀ {n : ℕ}, (p : Set M) ^ n ⊆ ↑(p ^ n)

{R : Type u_1}
{M : Type u_2}
[Monoid R]
[MulAction R M]
[Monoid M]
[IsScalarTower R M M]
[SMulCommClass R M M]
(p : SubMulAction R M)
{n : ℕ}


@[simp]
theorem empty_product (t : Finset β) : (∅ : Finset α) ×ˢ t = ∅

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


/-- Removing a finset from a dense set in a space without isolated points, one still
obtains a dense set. -/
theorem Dense.diff_finset [T1Space X] [∀ x : X, NeBot (𝓝[≠] x)] {s : Set X} (hs : Dense s)
    (t : Finset X) : Dense (s \ t)

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
[∀ (x : X), (𝓝[≠] x).NeBot]
{s : Set X}
(hs : Dense s)
(t : Finset X)


@[to_additive (attr := simp)]
theorem one_comp (f : α →*o β) : (1 : β →*o γ).comp f = 1

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[AddZeroClass α]
[AddZeroClass β]
[AddZeroClass γ]
(f : α →+o β)


theorem intCast_eq_divInt (z : ℤ) : (z : ℚ) = z /. 1


lemma baseChange_preΨ (n : ℤ) : (W.baseChange B).preΨ n = ((W.baseChange A).preΨ n).map f

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(n : ℤ)

(W.baseChange B).preΨ n = Polynomial.map (↑f) ((W.baseChange A).preΨ n)


theorem supportsStmt_write {S : Finset Λ'₁} {l : List Bool} {q : Stmt'₁} :
    SupportsStmt S (write l q) = SupportsStmt S q

{q : Turing.TM1.Stmt Bool Turing.TM1to1.Λ' σ}

Turing.TM1.SupportsStmt S (Turing.TM1to1.write l q) = Turing.TM1.SupportsStmt S q


theorem measurableSet_filtrationOfSet {s : ι → Set Ω} (hsm : ∀ i, MeasurableSet[m] (s i)) (i : ι)
    {j : ι} (hj : j ≤ i) : MeasurableSet[filtrationOfSet hsm i] (s j)

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{s : ι → Set Ω}
(hsm : ∀ (i : ι), MeasurableSet (s i))
(i : ι)
{j : ι}
(hj : j ≤ i)


@[simp]
theorem mem_toAlist {f : α →₀ M} {x : α} : x ∈ f.toAList ↔ f x ≠ 0

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


theorem weightedSMul_smul_measure {m : MeasurableSpace α} (μ : Measure α) (c : ℝ≥0∞) {s : Set α} :
    (weightedSMul (c • μ) s : F →L[ℝ] F) = c.toReal • weightedSMul μ s

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(c : ℝ≥0∞)
{s : Set α}

MeasureTheory.weightedSMul (c • μ) s = c.toReal • MeasureTheory.weightedSMul μ s


@[simp] theorem getElem_ofFn (f : Fin n → α) (i : Nat) (h) :
    (ofFn f)[i] = f ⟨i, size_ofFn f ▸ h⟩

{n : Nat}
{α : Type u_1}
(f : Fin n → α)
(i : Nat)
(h : i < (Array.ofFn f).size)


@[to_additive]
theorem prod_eq_tprod_mulIndicator (f : β → α) (s : Finset β) :
    ∏ x ∈ s, f x = ∏' x, Set.mulIndicator (↑s) f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(f : β → α)
(s : Finset β)

∏ x ∈ s, f x = ∏' (x : β), (↑s).mulIndicator f x


@[simp]
theorem coe_toAffineIsometry : ⇑e.toAffineIsometry = e

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)


/-- The projection on the base of a vector bundle created from core is an open map -/
theorem isOpenMap_proj : IsOpenMap Z.proj

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)


@[ext]
theorem Scheme.empty_ext {X : Scheme.{u}} (f g : ∅ ⟶ X) : f = g

{X : AlgebraicGeometry.Scheme}
(f g : ∅ ⟶ X)


@[to_additive prod_map_comap_prod']
theorem prod_map_comap_prod' {M' : Type*} {N' : Type*} [MulOneClass M'] [MulOneClass N']
    (f : M →* N) (g : M' →* N') (S : Submonoid N) (S' : Submonoid N') :
    (S.prod S').comap (prodMap f g) = (S.comap f).prod (S'.comap g)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{M' : Type u_6}
{N' : Type u_7}
[AddZeroClass M']
[AddZeroClass N']
(f : M →+ N)
(g : M' →+ N')
(S : AddSubmonoid N)
(S' : AddSubmonoid N')

AddSubmonoid.comap (f.prodMap g) (S.prod S') = (AddSubmonoid.comap f S).prod (AddSubmonoid.comap g S')


@[simp]
theorem mem_image : b ∈ s.image f ↔ ∃ a ∈ s, f a = b

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s : Finset α}
{b : β}


@[simp] lemma infClosure_prod (s : Set α) (t : Set β) :
    infClosure (s ×ˢ t) = infClosure s ×ˢ infClosure t

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
(s : Set α)
(t : Set β)


@[simp] lemma mop_inv_braiding (X Y : C) : (β_ X Y).inv.mop = (β_ (mop Y) (mop X)).inv

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

(β_ X Y).inv.mop = (β_ { unmop := Y } { unmop := X }).inv


/-- The set difference of a Lindelöf set and an open set is a Lindelöf set. -/
theorem IsLindelof.diff (hs : IsLindelof s) (ht : IsOpen t) : IsLindelof (s \ t)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsLindelof s)
(ht : IsOpen t)


theorem gauge_pos (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    0 < gauge s x ↔ x ≠ 0

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
[TopologicalSpace E]
[T1Space E]
(hs : Absorbent ℝ s)
(hb : Bornology.IsVonNBounded ℝ s)


theorem sorted_mergeSort : ∀ l : List α, Sorted r (mergeSort r l)

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


lemma antidiagonal_eq_map (n : ℕ) :
    antidiagonal n = (range (n + 1)).map ⟨fun i ↦ (i, n - i), fun _ _ h ↦ (Prod.ext_iff.1 h).1⟩

Finset.antidiagonal n = Finset.map { toFun := fun i => (i, n - i), inj' := ⋯ } (Finset.range (n + 1))


theorem Pairwise.imp {α R S} (H : ∀ {a b}, R a b → S a b) :
    ∀ {l : List α}, l.Pairwise R → l.Pairwise S

{α : Type u_1}
{R S : α → α → Prop}
(H : ∀ {a b : α}, R a b → S a b)
{l : List α}


protected lemma map_smul (u : R) : f ∘ (u • P) = f u • (f ∘ P)

{R : Type u}
[CommRing R]
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P : Fin 3 → R)
(u : R)


theorem eLpNormEssSup_add_le {f g : α → E} :
    eLpNormEssSup (f + g) μ ≤ eLpNormEssSup f μ + eLpNormEssSup g μ

{α : Type u_1}
{E : Type u_2}
{m : MeasurableSpace α}
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
{f g : α → E}

MeasureTheory.eLpNormEssSup (f + g) μ ≤ MeasureTheory.eLpNormEssSup f μ + MeasureTheory.eLpNormEssSup g μ


theorem cos_mul_I : cos (x * I) = cosh x

Complex.cos (x * Complex.I) = Complex.cosh x


@[reassoc (attr := simp)]
lemma rightHomologyIso_hom_comp_ι :
    h.rightHomologyIso.hom ≫ h.ι = S.rightHomologyι ≫ h.opcyclesIso.hom

CategoryTheory.CategoryStruct.comp h.rightHomologyIso.hom h.ι =
  CategoryTheory.CategoryStruct.comp S.rightHomologyι h.opcyclesIso.hom


@[simp]
theorem aequiv_root (h : IsAdjoinRoot S f) (h' : IsAdjoinRoot T f) :
    h.aequiv h' h.root = h'.root

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
(h : IsAdjoinRoot S f)
(h' : IsAdjoinRoot T f)


theorem equiv [Finite R M] (e : M ≃ₗ[R] N) : Finite R N

{R : Type u_1}
{M : Type u_4}
{N : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[Module.Finite R M]
(e : M ≃ₗ[R] N)


theorem sup_sup_distrib_left (a b c : α) : a ⊔ (b ⊔ c) = a ⊔ b ⊔ (a ⊔ c)

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


@[simp]
theorem neg_iff {f : NormedAddGroupHom V₁ V₂} : (-f).NormNoninc ↔ f.NormNoninc

{V₁ : Type u_3}
{V₂ : Type u_4}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{f : NormedAddGroupHom V₁ V₂}


@[reassoc, simp]
theorem tensor_whiskerLeft (X Y : C) {Z Z' : C} (f : Z ⟶ Z') :
    (X ⊗ Y) ◁ f = (α_ X Y Z).hom ≫ X ◁ Y ◁ f ≫ (α_ X Y Z').inv

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

CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.MonoidalCategory.tensorObj X Y) f =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.whiskerLeft Y f))
      (CategoryTheory.MonoidalCategory.associator X Y Z').inv)


/-- `opow b` and `log b` (almost) form a Galois connection. -/
theorem opow_le_iff_le_log {b x c : Ordinal} (hb : 1 < b) (hx : x ≠ 0) : b ^ c ≤ x ↔ c ≤ log b x

{b x c : Ordinal.{u_1}}
(hb : 1 < b)
(hx : x ≠ 0)


@[reassoc]
theorem δ_comp_δ_self' {n} {j : Fin (n + 3)} {i : Fin (n + 2)} (H : j = Fin.castSucc i) :
    X.δ j ≫ X.δ i = X.δ i.succ ≫ X.δ i

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(X : CategoryTheory.SimplicialObject C)
{n : ℕ}
{j : Fin (n + 3)}
{i : Fin (n + 2)}
(H : j = i.castSucc)


@[simp]
theorem top_eq : (⊤ : PUnit) = unit


@[simp]
theorem one_one : (1 : ArithmeticFunction R) 1 = 1


@[simp]
theorem pullbackConeOfLeftIso_π_app_right : (pullbackConeOfLeftIso f g).π.app right = 𝟙 _

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

(CategoryTheory.Limits.pullbackConeOfLeftIso f g).π.app CategoryTheory.Limits.WalkingCospan.right =
  𝟙
    (((CategoryTheory.Functor.const CategoryTheory.Limits.WalkingCospan).obj
          (CategoryTheory.Limits.pullbackConeOfLeftIso f g).pt).obj
      CategoryTheory.Limits.WalkingCospan.right)


theorem hom_desc (h : IsColimit t) {W : C} (m : t.pt ⟶ W) :
    m =
      h.desc
        { pt := W
          ι :=
            { app := fun b => t.ι.app b ≫ m
              naturality := by intros; erw [← assoc, t.ι.naturality, comp_id, comp_id] } }

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{t : CategoryTheory.Limits.Cocone F}
(h : CategoryTheory.Limits.IsColimit t)
{W : C}
(m : t.pt ⟶ W)

m = h.desc { pt := W, ι := { app := fun b => t.ι.app b ≫ m, naturality := ⋯ } }


lemma ofCocomplex_exactAt_succ (n : ℕ) :
    (ofCocomplex Z).ExactAt (n + 1)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.EnoughInjectives C]
(Z : C)
(n : ℕ)

HomologicalComplex.ExactAt (CategoryTheory.InjectiveResolution.ofCocomplex Z) (n + 1)


@[to_additive (attr := simp)]
theorem casesOn_of_mul {C : FreeMonoid α → Sort*} (x : α) (xs : FreeMonoid α) (h0 : C 1)
    (ih : ∀ x xs, C (of x * xs)) : @casesOn α C (of x * xs) h0 ih = ih x xs

(ih : (x : α) → (xs : FreeMonoid α) → C (FreeMonoid.of x * xs))

(FreeMonoid.of x * xs).casesOn h0 ih = ih x xs


@[simp]
lemma homologyMap_nullHomotopic [S₁.HasHomology] [S₂.HasHomology]
    (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) :
    homologyMap (nullHomotopic _ _ h₀ h₀_f h₁ h₂ h₃ g_h₃) = 0

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

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

CategoryTheory.ShortComplex.homologyMap (S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃) = 0


theorem Finite.iInf_biSup_of_antitone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Coframe α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Antitone (f i)) : ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j

{ι : Type u_1}
{ι' : Type u_2}
{α : Type u_3}
[Preorder ι']
[Nonempty ι']
[IsDirected ι' fun x x_1 => x ≤ x_1]
[Order.Coframe α]
{s : Set ι}
(hs : s.Finite)
{f : ι → ι' → α}
(hf : ∀ i ∈ s, Antitone (f i))


theorem equiv_def₃ {f g : CauSeq β abv} (h : f ≈ g) {ε : α} (ε0 : 0 < ε) :
    ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - g j) < ε

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

∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (↑f k - ↑g j) < ε


/-- Construct a functor out of the wide pullback shape given a J-indexed collection of arrows to a
fixed object.
-/
@[simps]
def wideCospan (B : C) (objs : J → C) (arrows : ∀ j : J, objs j ⟶ B) : WidePullbackShape J ⥤ C

{J : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(B : C)
(objs : J → C)
(arrows : (j : J) → objs j ⟶ B)

∀ {X Y : CategoryTheory.Limits.WidePullbackShape J} (f : X ⟶ Y),
  (CategoryTheory.Limits.WidePullbackShape.wideCospan B objs arrows).map f =
    CategoryTheory.Limits.WidePullbackShape.Hom.casesOn (motive := fun a a_1 t =>
      X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y)) f
      (fun X_1 h =>
        Eq.ndrec (motive := fun X_2 =>
          Y = X_2 →
            HEq f (CategoryTheory.Limits.WidePullbackShape.Hom.id X_2) →
              ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
          (fun h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : X ⟶ Y) →
                HEq f (CategoryTheory.Limits.WidePullbackShape.Hom.id X) →
                  ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
              (fun f h => 𝟙 ((fun j => Option.casesOn j B objs) X)) ⋯ f)
          h)
      (fun j h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = none →
              HEq f (CategoryTheory.Limits.WidePullbackShape.Hom.term j) →
                ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : some j ⟶ Y) →
                HEq f (CategoryTheory.Limits.WidePullbackShape.Hom.term j) →
                  ((fun j => Option.casesOn j B objs) (some j) ⟶ (fun j => Option.casesOn j B objs) Y))
              (fun f h => arrows j) ⋯ f)
          ⋯ f)
      ⋯ ⋯ ⋯


@[simp]
theorem image_const_mul_uIcc (a b c : α) : (a * ·) '' [[b, c]] = [[a * b, a * c]]

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


@[simp] theorem or_self_left  : ∀(a b : Bool), (a || (a || b)) = (a || b)


theorem tsum_mono_subtype (f : α → ℝ≥0∞) {s t : Set α} (h : s ⊆ t) :
    ∑' x : s, f x ≤ ∑' x : t, f x

{α : Type u_1}
(f : α → ℝ≥0∞)
{s t : Set α}
(h : s ⊆ t)


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

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


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

{c c' : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F)}

((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor F U).map f).hom = f.hom


/--
Lifting a multilinear map to an algebra homomorphism from tensor product
-/
@[simps!]
def liftAlgHom {S : Type*} [Semiring S] [Algebra R S]
    (f : MultilinearMap R A S)
    (one : f 1 = 1) (mul : ∀ x y, f (x * y) = f x * f y) : (⨂[R] i, A i) →ₐ[R] S

(mul : ∀ (x y : (i : ι) → A i), f (x * y) = f x * f y)

(PiTensorProduct.liftAlgHom f one mul) a = (PiTensorProduct.lift f) a


/-- The first cyclotomic polyomial is `X - 1`. -/
@[simp]
theorem cyclotomic_one (R : Type*) [Ring R] : cyclotomic 1 R = X - 1

Polynomial.cyclotomic 1 R = Polynomial.X - 1


theorem fin_two_induction (P : SL(2, R) → Prop)
    (h : ∀ (a b c d : R) (hdet : a * d - b * c = 1), P ⟨!![a, b; c, d], by rwa [det_fin_two_of]⟩)
    (g : SL(2, R)) : P g

(P : Matrix.SpecialLinearGroup (Fin 2) R → Prop)

(h : ∀ (a b c d : R) (hdet : a * d - b * c = 1), P ⟨!![a, b; c, d], ⋯⟩)

(g : Matrix.SpecialLinearGroup (Fin 2) R)


@[simp]
theorem BinaryFan.assocInv_fst {X Y Z : C} {sXY : BinaryFan X Y} (P : IsLimit sXY)
    {sYZ : BinaryFan Y Z} (s : BinaryFan X sYZ.pt) :
    (BinaryFan.assocInv P s).fst = P.lift (BinaryFan.mk s.fst (s.snd ≫ sYZ.fst))

{sXY : CategoryTheory.Limits.BinaryFan X Y}

{sYZ : CategoryTheory.Limits.BinaryFan Y Z}

(s : CategoryTheory.Limits.BinaryFan X sYZ.pt)

(CategoryTheory.Limits.BinaryFan.assocInv P s).fst =
  P.lift (CategoryTheory.Limits.BinaryFan.mk s.fst (CategoryTheory.CategoryStruct.comp s.snd sYZ.fst))


lemma testTrueHelper (p : ℕ) (hp : Nat.blt 1 p = true) (h : sMod' (2 ^ p - 1) (p - 2) = 0) :
    LucasLehmerTest p

(h : LucasLehmer.norm_num_ext.sMod' (2 ^ p - 1) (p - 2) = 0)


theorem IsEquivalent.tendsto_const {c : β} (hu : u ~[l] const _ c) : Tendsto u l (𝓝 c)

{α : Type u_1}
{β : Type u_2}
[NormedAddCommGroup β]
{u : α → β}
{l : Filter α}
{c : β}
(hu : u ~[l] Function.const α c)


/-- The forgetful monoidal functor from a full monoidal subcategory into the original category
("forgetting" the condition).
-/
@[simps]
def fullMonoidalSubcategoryInclusion : MonoidalFunctor (FullSubcategory P) C

(CategoryTheory.MonoidalCategory.fullMonoidalSubcategoryInclusion P).ε = CategoryTheory.CategoryStruct.id (𝟙_ C)


theorem add_nat (h : Irrational x) (m : ℕ) : Irrational (x + m)


theorem changeOriginSeries_summable_aux₃ {r : ℝ≥0} (hr : ↑r < p.radius) (k : ℕ) :
    Summable fun l : ℕ => ‖p.changeOriginSeries k l‖₊ * r ^ l

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{r : ℝ≥0}
(hr : ↑r < p.radius)
(k : ℕ)

Summable fun l => ‖p.changeOriginSeries k l‖₊ * r ^ l


theorem nadd_lt_nadd_iff_right : ∀ (a) {b c}, b ♯ a < c ♯ a ↔ b < c

(a : Ordinal.{u_1})
{b c : Ordinal.{u_1}}


theorem card_congr (f : α ≃ β) : Nat.card α = Nat.card β

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


theorem setIntegral_compl (hs : MeasurableSet s) (hfi : Integrable f μ) :
    ∫ x in sᶜ, f x ∂μ = ∫ x, f x ∂μ - ∫ x in s, f x ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{s : Set X}
{μ : MeasureTheory.Measure X}
(hs : MeasurableSet s)
(hfi : MeasureTheory.Integrable f μ)

∫ (x : X) in sᶜ, f x ∂μ = ∫ (x : X), f x ∂μ - ∫ (x : X) in s, f x ∂μ


/-- If the union of s is unbounded and s is smaller than the cofinality,
  then s has an unbounded member -/
theorem unbounded_of_unbounded_sUnion (r : α → α → Prop) [wo : IsWellOrder α r] {s : Set (Set α)}
    (h₁ : Unbounded r <| ⋃₀ s) (h₂ : #s < StrictOrder.cof r) : ∃ x ∈ s, Unbounded r x

{α : Type u_1}
(r : α → α → Prop)
[wo : IsWellOrder α r]
{s : Set (Set α)}
(h₁ : Set.Unbounded r (⋃₀ s))
(h₂ : #↑s < StrictOrder.cof r)


theorem const_mul (f₁ f₂ g₁ g₂ : R) (U hu₁ hu₂) :
    const R f₁ g₁ U hu₁ * const R f₂ g₂ U hu₂ =
      const R (f₁ * f₂) (g₁ * g₂) U fun x hx => Submonoid.mul_mem _ (hu₁ x hx) (hu₂ x hx)

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(hu₁ : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl)

(hu₂ : ∀ x ∈ U, g₂ ∈ x.asIdeal.primeCompl)

AlgebraicGeometry.StructureSheaf.const R f₁ g₁ U hu₁ * AlgebraicGeometry.StructureSheaf.const R f₂ g₂ U hu₂ =
  AlgebraicGeometry.StructureSheaf.const R (f₁ * f₂) (g₁ * g₂) U ⋯


theorem LinearIndependent.image {ι} {s : Set ι} {f : ι → M}
    (hs : LinearIndependent R fun x : s => f x) :
    LinearIndependent R fun x : f '' s => (x : M)

(hs : LinearIndependent R fun (x : ↑s) => f ↑x)

LinearIndependent R fun (x : ↑(f '' s)) => ↑x


/-- The explicit quotient construction of the colimit of `J : SingleObj G ⥤ Type u` is
equivalent to the quotient of `J.obj (SingleObj.star G)` by the induced action. -/
@[simps]
def Types.Quot.equivOrbitRelQuotient :
    Types.Quot J ≃ MulAction.orbitRel.Quotient G (J.obj (SingleObj.star G))

(J : CategoryTheory.Functor (CategoryTheory.SingleObj G) (Type u))

(a : Quot (CategoryTheory.Limits.Types.Quot.Rel J))

(CategoryTheory.Limits.SingleObj.Types.Quot.equivOrbitRelQuotient J) a = Quot.lift (fun p => ⟦p.snd⟧) ⋯ a


@[to_additive]
theorem Set.preimage_one {α β : Type*} [One β] (s : Set β) [Decidable ((1 : β) ∈ s)] :
    (1 : α → β) ⁻¹' s = if (1 : β) ∈ s then Set.univ else ∅

{α : Type u_3}
{β : Type u_4}
[Zero β]
(s : Set β)
[Decidable (0 ∈ s)]


theorem lmapDomain_supported (f : α → α') (s : Set α) :
    (supported M R s).map (lmapDomain M R f) = supported M R (f '' s)

{α : Type u_1}
(M : Type u_2)
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α' : Type u_7}
(f : α → α')
(s : Set α)

Submodule.map (Finsupp.lmapDomain M R f) (Finsupp.supported M R s) = Finsupp.supported M R (f '' s)


@[simp] lemma mem_diffs : c ∈ s \\ t ↔ ∃ a ∈ s, ∃ b ∈ t, a \ b = c

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

c ∈ s.diffs t ↔ ∃ a ∈ s, ∃ b ∈ t, a \ b = c


theorem arcsin_le_iff_le_sin' {x y : ℝ} (hy : y ∈ Ico (-(π / 2)) (π / 2)) :
    arcsin x ≤ y ↔ x ≤ sin y


theorem integrableOn_exp_Iic (c : ℝ) : IntegrableOn exp (Iic c)

MeasureTheory.IntegrableOn rexp (Set.Iic c) MeasureTheory.volume


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

* `f` is differentiable in the open first quadrant and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * (abs z) ^ c)` on the open first quadrant
  for some `c < 2`;
* `‖f z‖` is bounded from above by a constant `C` on the boundary of the first quadrant.

Then `‖f z‖` is bounded from above by the same constant on the closed first quadrant. -/
nonrec theorem quadrant_I (hd : DiffContOnCl ℂ f (Ioi 0 ×ℂ Ioi 0))
    (hB : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Ioi 0 ×ℂ Ioi 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, 0 ≤ x → ‖f x‖ ≤ C) (him : ∀ x : ℝ, 0 ≤ x → ‖f (x * I)‖ ≤ C) (hz_re : 0 ≤ z.re)
    (hz_im : 0 ≤ z.im) : ‖f z‖ ≤ C

(hd : DiffContOnCl ℂ f (Set.Ioi 0 ×ℂ Set.Ioi 0))

(hB : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 (Set.Ioi 0 ×ℂ Set.Ioi 0)] fun z => expR (B * Complex.abs z ^ c))

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


@[simp] lemma comap_comap (L : Sublattice γ) (g : LatticeHom β γ) (f : LatticeHom α β) :
    (L.comap g).comap f = L.comap (g.comp f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Lattice α]
[Lattice β]
[Lattice γ]
(L : Sublattice γ)
(g : LatticeHom β γ)
(f : LatticeHom α β)

Sublattice.comap f (Sublattice.comap g L) = Sublattice.comap (g.comp f) L


theorem ndinter_le_right {s} (t : Multiset α) (d : Nodup s) : ndinter s t ≤ t

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


@[simp] lemma supClosure_univ : supClosure (Set.univ : Set α) = Set.univ


theorem mem_span_iff {N : Type*} [AddCommGroup N] [Module R N] [Module S N] [IsScalarTower R S N]
    {x : N} {a : Set N} :
    x ∈ Submodule.span S a ↔ ∃ y ∈ Submodule.span R a, ∃ z : M, x = mk' S 1 z • y

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
{N : Type u_5}
[AddCommGroup N]
[Module R N]
[Module S N]
[IsScalarTower R S N]
{x : N}
{a : Set N}

x ∈ Submodule.span S a ↔ ∃ y ∈ Submodule.span R a, ∃ z, x = IsLocalization.mk' S 1 z • y


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

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

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


@[to_additive (attr := simp)]
theorem ofDual_mul [Mul α] (a b : αᵒᵈ) : ofDual (a * b) = ofDual a * ofDual b

OrderDual.ofDual (a + b) = OrderDual.ofDual a + OrderDual.ofDual b


lemma isBigO_apply_r_sub_b (q : ℝ → ℝ) (hq_diff : DifferentiableOn ℝ q (Set.Ioi 1))
    (hq_poly : GrowsPolynomially fun x => ‖deriv q x‖) (i : α) :
    (fun n => q (r i n) - q (b i * n)) =O[atTop] fun n => (deriv q n) * (r i n - b i * n)

{r : α → ℕ → ℕ}

(hq_poly : AkraBazziRecurrence.GrowsPolynomially fun x => ‖deriv q x‖)

(fun n => q ↑(r i n) - q (b i * ↑n)) =O[Filter.atTop] fun n => deriv q ↑n * (↑(r i n) - b i * ↑n)


theorem Nodup.not_mem_erase [DecidableEq α] {a : α} {s} (h : Nodup s) : a ∉ s.erase a

{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Multiset α}
(h : s.Nodup)


class IncidenceGeometry where
  Point : Type u₁
  Line : Type u₂
  Circle : Type u₃

  between : Point → Point → Point → Prop -- implies colinearity
  onLine : Point → Line → Prop
  onCircle : Point → Circle → Prop
  inCircle : Point → Circle → Prop
  centerCircle : Point → Circle → Prop
  circlesInter : Circle → Circle → Prop

  ne_23_of_between : ∀ {a b c : Point}, between a b c → b ≠ c
  line_unique_of_pts : ∀ {a b : Point}, ∀ {L M : Line},
    a ≠ b → onLine a L → onLine b L → onLine a M → onLine b M → L = M
  onLine_2_of_between : ∀ {a b c : Point}, ∀ {L : Line},
    between a b c → onLine a L → onLine c L → onLine b L
  line_of_pts : ∀ a b, ∃ L, onLine a L ∧ onLine b L
  circle_of_ne : ∀ a b, a ≠ b → ∃ C, centerCircle a C ∧ onCircle b C
  circlesInter_of_onCircle_inCircle :
    ∀ {a b α β}, onCircle b α → onCircle a β → inCircle a α →
    inCircle b β → circlesInter α β
  pts_of_circlesInter : ∀ {α β}, circlesInter α β →
    ∃ a b, a ≠ b ∧ onCircle a α ∧ onCircle a β ∧ onCircle b α ∧ onCircle b β
  inCircle_of_centerCircle : ∀ {a α}, centerCircle a α → inCircle a α

[self : IncidenceGeometry]
{a b c : IncidenceGeometry.Point}


@[to_additive (attr := simp)]
theorem map_mk (M : Subgroup H) [M.Normal] (f : G →* H) (h : N ≤ M.comap f) (x : G) :
    map N M f h ↑x = ↑(f x)

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]
{H : Type v}
[AddGroup H]
(M : AddSubgroup H)
[M.Normal]
(f : G →+ H)
(h : N ≤ AddSubgroup.comap f M)
(x : G)

(QuotientAddGroup.map N M f h) ↑x = ↑(f x)


@[fun_prop]
theorem HasStrictFDerivAt.add_const (hf : HasStrictFDerivAt f f' x) (c : F) :
    HasStrictFDerivAt (fun y => f y + c) f' x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
(hf : HasStrictFDerivAt f f' x)
(c : F)


@[simp, reassoc]
lemma NatTrans.rightDerivedToHomotopyCategory_comp {F G H : C ⥤ D} (α : F ⟶ G) (β : G ⟶ H)
    [F.Additive] [G.Additive] [H.Additive] :
    NatTrans.rightDerivedToHomotopyCategory (α ≫ β) =
      NatTrans.rightDerivedToHomotopyCategory α ≫
        NatTrans.rightDerivedToHomotopyCategory β

CategoryTheory.NatTrans.rightDerivedToHomotopyCategory (CategoryTheory.CategoryStruct.comp α β) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.NatTrans.rightDerivedToHomotopyCategory α)
    (CategoryTheory.NatTrans.rightDerivedToHomotopyCategory β)


lemma binaryRec_decreasing (h : n ≠ 0) : div2 n < n


@[deprecated (since := "2024-04-26")]
theorem LinearMap.toBilinAux_eq (f : M →ₗ[R] M →ₗ[R] R) :
    LinearMap.toBilinAux f = f

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(f : M →ₗ[R] M →ₗ[R] R)


theorem IsPrimePow.ne_one {n : R} (h : IsPrimePow n) : n ≠ 1

{R : Type u_1}
[CommMonoidWithZero R]
{n : R}
(h : IsPrimePow n)


lemma truncatedInf_of_mem (h : a ∈ upperClosure s) :
    truncatedInf s a = (s.filter (· ≤ a)).inf' (inf_aux h) id

{α : Type u_1}
[SemilatticeInf α]
[BoundedOrder α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{a : α}
(h : a ∈ upperClosure ↑s)

s.truncatedInf a = (Finset.filter (fun x => x ≤ a) s).inf' ⋯ id


theorem neg_neg {x y : R} (h : IsCoprime x y) : IsCoprime (-x) (-y)

{R : Type u}
[CommRing R]
{x y : R}
(h : IsCoprime x y)


/-- The tautological 1-hypercover induced by `S : J.Cover X`. Its index type `I₀`
is given by `S.Arrow` (i.e. all the morphisms in the sieve `S`), while `I₁` is given
by all possible pullback cones. -/
@[simps toPreOneHypercover]
def oneHypercover : J.OneHypercover X

{J : CategoryTheory.GrothendieckTopology C}


@[simp] lemma smul_apply {f : E →WOT[𝕜] F} (c : 𝕜) (x : E) : (c • f) x = c • (f x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E →WOT[𝕜]F}
(c : 𝕜)
(x : E)


@[elab_as_elim]
theorem inductionOn {p : Cardinal → Prop} (c : Cardinal) (h : ∀ α, p #α) : p c

(h : ∀ (α : Type u_1), p (Cardinal.mk α))


/-- A linear isomorphism induces an order isomorphism of submodules. -/
@[simps! symm_apply apply]
def orderIsoMapComap [EquivLike F M M₂] [SemilinearMapClass F σ₁₂ M M₂] (f : F) :
    Submodule R M ≃o Submodule R₂ M₂

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[EquivLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)
(p : Submodule R M)

(Submodule.orderIsoMapComap f) p = Submodule.map f p


@[simp] -- Porting note (#10618): was @[simp]
theorem smul_integral_comp_mul_left (c) :
    (c • ∫ x in a..b, f (c * x)) = ∫ x in c * a..c * b, f x

{E : Type u_3}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)
(c : ℝ)

c • ∫ (x : ℝ) in a..b, f (c * x) = ∫ (x : ℝ) in c * a..c * b, f x


theorem isAdjointPair_zero : IsAdjointPair B B' 0 0

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{M₃ : Type u_8}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₃]
[Module R M₃]
{I : R →+* R}
{B : M →ₗ[R] M →ₛₗ[I] M₃}
{B' : M₁ →ₗ[R] M₁ →ₛₗ[I] M₃}


theorem WithTop.coe_sInf' [InfSet α] {s : Set α} (hs : s.Nonempty) (h's : BddBelow s) :
    ↑(sInf s) = (sInf ((fun (a : α) ↦ ↑a) '' s) : WithTop α)

{α : Type u_1}
[Preorder α]
[InfSet α]
{s : Set α}
(hs : s.Nonempty)
(h's : BddBelow s)


/-- To get commutativity, we need the underlying multiplication to be commutative. -/
@[to_additive conv_comm]
theorem mconv_comm {M : Type*} [CommMonoid M] [MeasurableSpace M] [MeasurableMul₂ M] (μ : Measure M)
    (ν : Measure M) [SFinite μ] [SFinite ν] : μ ∗ ν = ν ∗ μ

{M : Type u_2}
[AddCommMonoid M]
[MeasurableSpace M]
[MeasurableAdd₂ M]
(μ ν : MeasureTheory.Measure M)
[MeasureTheory.SFinite μ]
[MeasureTheory.SFinite ν]


theorem condexp_bot' [hμ : NeZero μ] (f : α → F') :
    μ[f|⊥] = fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[hμ : NeZero μ]
(f : α → F')

μ[f|⊥] = fun x => (μ Set.univ).toReal⁻¹ • ∫ (x : α), f x ∂μ


@[to_additive tsum_prod]
theorem tprod_prod {f : β × γ → α} (h : Multipliable f) :
    ∏' p, f p = ∏' (b) (c), f ⟨b, c⟩

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommGroup α]
[UniformSpace α]
[UniformAddGroup α]
[CompleteSpace α]
[T0Space α]
{f : β × γ → α}
(h : Summable f)


@[to_additive]
theorem isComplement_univ_right : IsComplement S univ ↔ ∃ g : G, S = {g}

Subgroup.IsComplement S Set.univ ↔ ∃ g, S = {g}


theorem HasStrictDerivAt.comp_hasStrictFDerivAt_of_eq {f : E → 𝕜'} {f' : E →L[𝕜] 𝕜'} (x)
    (hh : HasStrictDerivAt h₂ h₂' y) (hf : HasStrictFDerivAt f f' x) (hy : y = f x) :
    HasStrictFDerivAt (h₂ ∘ f) (h₂' • f') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h₂ : 𝕜' → 𝕜'}
{h₂' y : 𝕜'}
{f : E → 𝕜'}
{f' : E →L[𝕜] 𝕜'}
(x : E)
(hh : HasStrictDerivAt h₂ h₂' y)
(hf : HasStrictFDerivAt f f' x)
(hy : y = f x)


/-- Precompose a partial equivalence with an equivalence.
We modify the source and target to have better definitional behavior. -/
@[simps!]
def transPartialEquiv (e : α ≃ β) (f' : PartialEquiv β γ) : PartialEquiv α γ

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : α ≃ β)
(f' : PartialEquiv β γ)

(e.transPartialEquiv f').source = ⇑e ⁻¹' f'.source


/-- Combine two `PartialEquiv`s using `Set.piecewise`. The source of the new `PartialEquiv` is
`s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for target.  The function
sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
and similarly for the inverse function. The definition assumes `e.isImage s t` and
`e'.isImage s t`. -/
@[simps (config := .asFn)]
def piecewise (e e' : PartialEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
    PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
(s : Set α)
(t : Set β)
[(x : α) → Decidable (x ∈ s)]
[(y : β) → Decidable (y ∈ t)]
(H : e.IsImage s t)
(H' : e'.IsImage s t)

(e.piecewise e' s t H H').target = t.ite e.target e'.target


@[to_additive]
theorem closure_mono {s t : Set G} (h : s ⊆ t) : closure s ⊆ closure t

{G : Type u_1}
[AddGroup G]
{s t : Set G}
(h : s ⊆ t)


@[to_additive (attr := simp)]
theorem coe_singletonMulHom : (singletonMulHom : α → Finset α) = singleton


@[simp]
lemma i_cyclesMk [S.HasHomology] (x₂ : (forget₂ C Ab).obj S.X₂)
    (hx₂ : ((forget₂ C Ab).map S.g) x₂ = 0) :
    (forget₂ C Ab).map S.iCycles (S.cyclesMk x₂ hx₂) = x₂

(x₂ : ↑((CategoryTheory.forget₂ C Ab).obj S.X₂))

(hx₂ : ((CategoryTheory.forget₂ C Ab).map S.g) x₂ = 0)

((CategoryTheory.forget₂ C Ab).map S.iCycles) (S.cyclesMk x₂ hx₂) = x₂


/-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one

{ι : Type u_1}
{A : ι → Type u_2}
[AddMonoid ι]
[(i : ι) → AddCommMonoid (A i)]
[self : DirectSum.GSemiring A]


theorem epi_iff_surjective {A B : NonemptyFinLinOrd.{u}} (f : A ⟶ B) :
    Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


@[simp]
theorem intDegree_neg (x : RatFunc K) : intDegree (-x) = intDegree x


theorem finite_pure (a : α) : (pure a : Set α).Finite


@[to_additive]
theorem zpow_apply [Group β] [TopologicalGroup β] (f : C(α, β)) (z : ℤ) (x : α) :
    (f ^ z) x = f x ^ z

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[AddGroup β]
[TopologicalAddGroup β]
(f : C(α, β))
(z : ℤ)
(x : α)


theorem left_mem_Icc : a ∈ Icc a b ↔ a ≤ b


theorem ClassGroup.mk_eq_one_of_coe_ideal {I : (FractionalIdeal R⁰ <| FractionRing R)ˣ}
    {I' : Ideal R} (hI : (I : FractionalIdeal R⁰ <| FractionRing R) = I') :
    ClassGroup.mk I = 1 ↔ ∃ x : R, x ≠ 0 ∧ I' = Ideal.span {x}

{I : (FractionalIdeal R⁰ (FractionRing R))ˣ}

ClassGroup.mk I = 1 ↔ ∃ x, x ≠ 0 ∧ I' = Ideal.span {x}


/-- If `f` is an injective function, then `s` is equivalent to `f '' s`. -/
@[simps! apply]
protected noncomputable def image {α β} (f : α → β) (s : Set α) (H : Injective f) : s ≃ f '' s

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s : Set α)
(H : Function.Injective f)
(p : ↑s)


theorem image_subtype_val_Ioo_subset (a b : {x // p x}) :
    Subtype.val '' Ioo a b ⊆ Ioo a.val b.val

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val '' Set.Ioo a b ⊆ Set.Ioo ↑a ↑b


theorem measure_Ico_lt_top : μ (Ico a b) < ∞


lemma chromaticNumber_eq_biInf {G : SimpleGraph V} :
    G.chromaticNumber = ⨅ n ∈ setOf G.Colorable, (n : ℕ∞)

G.chromaticNumber = ⨅ n ∈ setOf G.Colorable, ↑n


theorem image_const_mul_Ioi_zero {k : Type*} [LinearOrderedField k] {x : k} (hx : 0 < x) :
    (fun y => x * y) '' Ioi (0 : k) = Ioi 0

{k : Type u_2}
[LinearOrderedField k]
{x : k}
(hx : 0 < x)

(fun y => x * y) '' Set.Ioi 0 = Set.Ioi 0


lemma exactAt_iff' (hi : c.prev j = i) (hk : c.next j = k) :
    K.ExactAt j ↔ (K.sc' i j k).Exact


theorem lift_type_lt {α : Type u} {β : Type v} {r s} [IsWellOrder α r] [IsWellOrder β s] :
    lift.{max v w} (type r) < lift.{max u w} (type s) ↔ Nonempty (r ≺i s)

{α : Type u}
{β : Type v}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]

Ordinal.lift.{max v w, u} (Ordinal.type r) < Ordinal.lift.{max u w, v} (Ordinal.type s) ↔ Nonempty (r ≺i s)


/-- `SubadditiveHomClass F α β` states that `F` is a type of subadditive morphisms. -/
class SubadditiveHomClass (F α β : Type*) [Add α] [Add β] [LE β] [FunLike F α β] : Prop where
  /-- the image of a sum is less or equal than the sum of the images. -/
  map_add_le_add (f : F) : ∀ a b, f (a + b) ≤ f a + f b

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Add α]
[Add β]
[LE β]
[FunLike F α β]
[self : SubadditiveHomClass F α β]
(f : F)
(a b : α)


/-- Linearly disjoint is symmetric in a commutative ring. -/
theorem LinearDisjoint.symm (H : M.LinearDisjoint N) : N.LinearDisjoint M

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
{M N : Submodule R S}
(H : M.LinearDisjoint N)


@[to_additive] lemma IsUnit.mul : IsUnit a → IsUnit b → IsUnit (a * b)

IsAddUnit a → IsAddUnit b → IsAddUnit (a + b)


@[to_additive]
theorem smul_univ_pi [∀ i, SMul K (R i)] (r : K) (t : ∀ i, Set (R i)) :
    r • pi (univ : Set ι) t = pi (univ : Set ι) (r • t)

{K : Type u_1}
{ι : Type u_2}
{R : ι → Type u_3}
[(i : ι) → SMul K (R i)]
(r : K)
(t : (i : ι) → Set (R i))


/-- Postcomposing `f` with `Prod.fst` is continuous -/
@[fun_prop]
theorem Continuous.fst {f : X → Y × Z} (hf : Continuous f) : Continuous fun x : X => (f x).1

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y × Z}
(hf : Continuous f)


/-- To cancel a common factor `c` from a `ModEq` we must divide the modulus `m` by `gcd m c` -/
lemma cancel_right_div_gcd (hm : 0 < m) (h : a * c ≡ b * c [MOD m]) : a ≡ b [MOD m / gcd m c]

{m a b c : ℕ}
(hm : 0 < m)
(h : a * c ≡ b * c [MOD m])


@[simp, norm_cast]
theorem cast_le [LinearOrderedSemiring α] {m n : PosNum} : (m : α) ≤ n ↔ m ≤ n

{α : Type u_1}
[LinearOrderedSemiring α]
{m n : PosNum}

↑m ≤ ↑n ↔ m ≤ n


/-- The top subalgebra is isomorphic to the algebra.

This is the algebra version of `Submodule.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a : A)


/-- The orbit of `a` under a subgroup containing the stabilizer of `a` is a block -/
theorem IsBlock.of_orbit {H : Subgroup G} {a : X} (hH : stabilizer G a ≤ H) :
    IsBlock G (MulAction.orbit H a)

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{H : Subgroup G}
{a : X}
(hH : MulAction.stabilizer G a ≤ H)

MulAction.IsBlock G (MulAction.orbit (↥H) a)


@[simp]
theorem ofRelIsoLT_toRelIsoLT {α β} [PartialOrder α] [PartialOrder β] (e : α ≃o β) :
    ofRelIsoLT (toRelIsoLT e) = e

{α : Type u_6}
{β : Type u_7}
[PartialOrder α]
[PartialOrder β]
(e : α ≃o β)


lemma sum_cons' [AddCommMonoid M] [AddCommMonoid N] (n : ℕ) (σ : Fin n →₀ M) (i : M)
    (f : Fin (n+1) → M → N) (h : ∀ x, f x 0 = 0) :
    (sum (Finsupp.cons i σ) f) = f 0 i + sum σ (Fin.tail f)

{M : Type u_8}
{N : Type u_10}
[AddCommMonoid M]
[AddCommMonoid N]
(n : ℕ)
(σ : Fin n →₀ M)
(i : M)
(f : Fin (n + 1) → M → N)
(h : ∀ (x : Fin (n + 1)), f x 0 = 0)

(Finsupp.cons i σ).sum f = f 0 i + σ.sum (Fin.tail f)


/-- `J` commutes with any positively-oriented isometric automorphism. -/
theorem linearIsometryEquiv_comp_rightAngleRotation (φ : E ≃ₗᵢ[ℝ] E)
    (hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) (x : E) : φ (J x) = J (φ x)

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

(hφ : 0 < LinearMap.det ↑φ.toLinearEquiv)

φ (o.rightAngleRotation x) = o.rightAngleRotation (φ x)


theorem restrict_toMeasurable_of_cover {s : Set α} {v : ℕ → Set α} (hv : s ⊆ ⋃ n, v n)
    (h'v : ∀ n, μ (s ∩ v n) ≠ ∞) : μ.restrict (toMeasurable μ s) = μ.restrict s

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{v : ℕ → Set α}
(hv : s ⊆ ⋃ n, v n)
(h'v : ∀ (n : ℕ), μ (s ∩ v n) ≠ ⊤)

μ.restrict (MeasureTheory.toMeasurable μ s) = μ.restrict s


@[elab_as_elim]
theorem inductionOn₃ {p : Cardinal → Cardinal → Cardinal → Prop} (c₁ : Cardinal) (c₂ : Cardinal)
    (c₃ : Cardinal) (h : ∀ α β γ, p #α #β #γ) : p c₁ c₂ c₃

{p : Cardinal.{u_1} → Cardinal.{u_2} → Cardinal.{u_3} → Prop}

(h : ∀ (α : Type u_1) (β : Type u_2) (γ : Type u_3), p (Cardinal.mk α) (Cardinal.mk β) (Cardinal.mk γ))


theorem _root_.Relator.RightUnique.forall₂ (hr : RightUnique R) : RightUnique (Forall₂ R)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(hr : Relator.RightUnique R)


lemma mul_div_eq_iff_dvd {n d : ℕ} : d * (n / d) = n ↔ d ∣ n


/-- If `U` is a neighborhood of each point of a set `s` then it is a neighborhood of `s`:
it contains an open set containing `s`. -/
theorem exists_open_set_nhds {U : Set X} (h : ∀ x ∈ s, U ∈ 𝓝 x) :
    ∃ V : Set X, s ⊆ V ∧ IsOpen V ∧ V ⊆ U

{X : Type u}
{s : Set X}
[TopologicalSpace X]
{U : Set X}
(h : ∀ x ∈ s, U ∈ 𝓝 x)


/-- The gaussian pdf is measurable. -/
lemma measurable_gaussianPDFReal (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDFReal μ v)

Measurable (ProbabilityTheory.gaussianPDFReal μ v)


/-- Let `F` and `G` be sheaves valued in a concrete category, whose forgetful functor reflects
isomorphisms, preserves limits and filtered colimits. Then a morphism `f : F ⟶ G` is an
isomorphism if and only if all of its stalk maps are isomorphisms.
-/
theorem isIso_iff_stalkFunctor_map_iso {F G : Sheaf C X} (f : F ⟶ G) :
    IsIso f ↔ ∀ x : X, IsIso ((stalkFunctor C x).map f.1)

CategoryTheory.IsIso f ↔ ∀ (x : ↑X), CategoryTheory.IsIso ((TopCat.Presheaf.stalkFunctor C x).map f.val)


theorem dot_neg_left (xs ys : IntList) : dot (-xs) ys = -dot xs ys

Lean.Omega.Coeffs.dot (-xs) ys = -Lean.Omega.Coeffs.dot xs ys


protected theorem sub_eq_zero {a b : Int} : a - b = 0 ↔ a = b


@[to_additive]
theorem tprod_congr_subtype (f : β → α) {P Q : β → Prop} (h : ∀ x, P x ↔ Q x) :
    ∏' x : {x // P x}, f x = ∏' x : {x // Q x}, f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(f : β → α)
{P Q : β → Prop}
(h : ∀ (x : β), P x ↔ Q x)


theorem t1Space_iff_disjoint_pure_nhds : T1Space X ↔ ∀ ⦃x y : X⦄, x ≠ y → Disjoint (pure x) (𝓝 y)


/-- The functor swapping the factors of a cartesian product of categories, `C × D ⥤ D × C`. -/
@[simps]
def swap : C × D ⥤ D × C

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

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


@[simps]
instance : MonoidalCategoryStruct (FullSubcategory P)

(X Y Z : CategoryTheory.FullSubcategory P)

(CategoryTheory.MonoidalCategory.associator X Y Z).inv =
  (CategoryTheory.MonoidalCategory.associator X.obj Y.obj Z.obj).inv


/-- When `C` has pushouts, a morphism `f : X ⟶ Y` induces a functor `Under X ⥤ Under Y`,
by pushing a morphism forward along `f`. -/
@[simps]
def pushout {X Y : C} (f : X ⟶ Y) : Under X ⥤ Under Y

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPushouts C]
{X Y : C}
(f : X ⟶ Y)
(x : CategoryTheory.Under X)
{x' : CategoryTheory.Under X}
{u : x ⟶ x'}

(CategoryTheory.Under.pushout f).map u =
  CategoryTheory.Under.homMk
    (CategoryTheory.Limits.pushout.desc
      (CategoryTheory.CategoryStruct.comp u.right (CategoryTheory.Limits.pushout.inl x'.hom f))
      (CategoryTheory.Limits.pushout.inr x'.hom f) ⋯)
    ⋯


theorem monotone_intro (hu : Monotone u) (hl : Monotone l) (hul : ∀ a, a ≤ u (l a))
    (hlu : ∀ a, l (u a) ≤ a) : GaloisConnection l u

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(hu : Monotone u)
(hl : Monotone l)
(hul : ∀ (a : α), a ≤ u (l a))
(hlu : ∀ (a : β), l (u a) ≤ a)


/-- The ring of Witt Vectors of a perfect field of positive characteristic is a DVR.
-/
theorem discreteValuationRing : DiscreteValuationRing (𝕎 k)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[CharP k p]
[PerfectRing k p]


/-- `Finsupp.single 0` as a `RingHom` -/
@[simps]
def singleZeroRingHom [Semiring k] [AddMonoid G] : k →+* k[G]

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[AddMonoid G]

∀ (a : k), AddMonoidAlgebra.singleZeroRingHom a = (↑(Finsupp.singleAddHom 0)).toFun a


@[simp]
theorem empty_eq_zero : (∅ : Multiset α) = 0


theorem sections_eq_nil_of_isEmpty : ∀ {L}, L.any isEmpty → @sections α L = []

L.any List.isEmpty = true → L.sections = []


@[simp]
theorem treeHom_root : treeHom T (root' T) = 𝟙 _

(T : WideSubquiver (Quiver.Symmetrify (IsFreeGroupoid.Generators G)))

[Quiver.Arborescence (WideSubquiver.toType (Quiver.Symmetrify (IsFreeGroupoid.Generators G)) T)]

IsFreeGroupoid.SpanningTree.treeHom T (IsFreeGroupoid.SpanningTree.root' T) = 𝟙 (IsFreeGroupoid.SpanningTree.root' T)


theorem not_top_le_coe (a : α) : ¬(⊤ : WithTop α) ≤ ↑a


@[simp]
theorem iUnion_coe_splitCenterBox (I : Box ι) : ⋃ s, (I.splitCenterBox s : Set (ι → ℝ)) = I


/-- The natural isomorphism between a pullback cone and the corresponding pullback cone
reconstructed using `PullbackCone.mk`. -/
@[simps!]
def eta (t : PullbackCone f g) : t ≅ mk t.fst t.snd t.condition

(t : CategoryTheory.Limits.PullbackCone f g)


theorem vanishingIdeal_iUnion {γ : Sort*} (t : γ → Set (ProjectiveSpectrum 𝒜)) :
    vanishingIdeal (⋃ i, t i) = ⨅ i, vanishingIdeal (t i)

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

ProjectiveSpectrum.vanishingIdeal (⋃ i, t i) = ⨅ i, ProjectiveSpectrum.vanishingIdeal (t i)


@[simp] theorem minimum?_eq_none_iff {xs : List α} [Min α] : xs.minimum? = none ↔ xs = []


protected theorem IsMin.grade (h : IsMin a) : IsMin (grade 𝕆 a)

(𝕆 : Type u_1)
{α : Type u_3}
[Preorder 𝕆]
[Preorder α]
[GradeMinOrder 𝕆 α]
{a : α}
(h : IsMin a)


theorem continuousAt_gaussian_integral (b : ℂ) (hb : 0 < re b) :
    ContinuousAt (fun c : ℂ => ∫ x : ℝ, cexp (-c * (x : ℂ) ^ 2)) b

ContinuousAt (fun c => ∫ (x : ℝ), cexp (-c * ↑x ^ 2)) b


theorem mul_top' : a * ∞ = if a = 0 then 0 else ∞


@[simp]
theorem toHomeomorph_inj {f g : E ≃ₛₗᵢ[σ₁₂] E₂} : f.toHomeomorph = g.toHomeomorph ↔ f = g

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


theorem lt_or_gt_of_ne {a b : α} (h : a ≠ b) : a < b ∨ a > b

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


/-- Characterization of multiplicative inverse -/
theorem inv_spec [Nonempty N] {i} {p : Ω^ N X x} :
    ((⟦p⟧)⁻¹ : HomotopyGroup N X x) = ⟦symmAt i p⟧

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
[Nonempty N]
{i : N}
{p : ↑(Ω^ N X x)}


lemma algebraMap_surjective : Function.Surjective (algebraMap P.Ring S)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(P : Algebra.Generators R S)

Function.Surjective ⇑(algebraMap P.Ring S)


@[simp] lemma toRingEquiv_toOpposite : (toOpposite R A : A ≃+* Aᵐᵒᵖ) = RingEquiv.toOpposite A

(R : Type u_1)
(A : Type u_3)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]

↑(AlgEquiv.toOpposite R A) = RingEquiv.toOpposite A


@[simp] theorem map_id_id : Sum.map (@id α) (@id β) = id


theorem ext_iff {inst₁ inst₂ : NonUnitalNonAssocRing R} :
    inst₁ = inst₂ ↔
      (local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) ∧
      (local_hMul[R, inst₁] = local_hMul[R, inst₂])

{R : Type u}
{inst₁ inst₂ : NonUnitalNonAssocRing R}

inst₁ = inst₂ ↔ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul


@[simp]
theorem gcd_self (i : ℤ) : gcd i i = natAbs i


theorem of_surjective (f : A →ₐ[R] B) (hf : Surjective f) : f.Finite

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)
(hf : Function.Surjective ⇑f)


/-- The **Tarski-Vaught test** for elementarity of an embedding. -/
theorem isElementary_of_exists (f : M ↪[L] N)
    (htv :
      ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → M) (a : N),
        φ.Realize default (Fin.snoc (f ∘ x) a : _ → N) →
          ∃ b : M, φ.Realize default (Fin.snoc (f ∘ x) (f b) : _ → N)) :
    ∀ {n} (φ : L.Formula (Fin n)) (x : Fin n → M), φ.Realize (f ∘ x) ↔ φ.Realize x

(htv :
  ∀ (n : ℕ) (φ : L.BoundedFormula Empty (n + 1)) (x : Fin n → M) (a : N),
    φ.Realize default (Fin.snoc (⇑f ∘ x) a) → ∃ b, φ.Realize default (Fin.snoc (⇑f ∘ x) (f b)))


theorem Ico_union_Ici' (h₁ : c ≤ b) : Ico a b ∪ Ici c = Ici (min a c)

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(h₁ : c ≤ b)

Set.Ico a b ∪ Set.Ici c = Set.Ici (min a c)


@[simp]
lemma DilationEquiv.smulTorsor_preimage_ball {c : P} {k : 𝕜} (hk : k ≠ 0) :
    smulTorsor c hk ⁻¹' (Metric.ball c ‖k‖) = Metric.ball (0 : E) 1

{𝕜 : Type u_1}
{E : Type u_2}
[NormedDivisionRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
{P : Type u_3}
[PseudoMetricSpace P]
[NormedAddTorsor E P]
{c : P}
{k : 𝕜}
(hk : k ≠ 0)

⇑(DilationEquiv.smulTorsor c hk) ⁻¹' Metric.ball c ‖k‖ = Metric.ball 0 1


/--
An `R`-algebra `S` is called standard smooth of relative dimension `n`, if there exists
a submersive presentation of dimension `n`.
-/
class IsStandardSmoothOfRelativeDimension : Prop where
  out : ∃ P : SubmersivePresentation.{t, w} R S, P.dimension = n

[self : Algebra.IsStandardSmoothOfRelativeDimension n R S]


@[simp, norm_cast]
theorem natCast_imK (n : ℕ) : (n : ℍ[R,c₁,c₂]).imK = 0

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(n : ℕ)


theorem lintegral_rnDeriv_lt_top (μ ν : Measure α) [IsFiniteMeasure μ] :
    ∫⁻ x, μ.rnDeriv ν x ∂ν < ∞

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


@[simp]
theorem unsym_sub [Sub α] (a b : αˢʸᵐ) : unsym (a - b) = unsym a - unsym b

SymAlg.unsym (a - b) = SymAlg.unsym a - SymAlg.unsym b


theorem Quotient.mk_out [Setoid α] (a : α) : ⟦a⟧.out ≈ a


@[simp]
theorem subtypeDomain_apply {a : Subtype p} {v : α →₀ M} : (subtypeDomain p v) a = v a.val

{α : Type u_1}
{M : Type u_5}
[Zero M]
{p : α → Prop}
{a : Subtype p}
{v : α →₀ M}


theorem pointed_iff_not_blunt (S : ConvexCone 𝕜 E) : S.Pointed ↔ ¬S.Blunt

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(S : ConvexCone 𝕜 E)


/-- If `l : Filter ℂ` is an "exponential comparison filter", then for any complex `a₁`, `a₂` and any
integer `b₁ < b₂`, we have
`(fun z ↦ z ^ a₁ * exp (b₁ * z)) =o[l] (fun z ↦ z ^ a₂ * exp (b₂ * z))`. -/
theorem isLittleO_zpow_mul_exp {b₁ b₂ : ℝ} (hl : IsExpCmpFilter l) (hb : b₁ < b₂) (m n : ℤ) :
    (fun z => z ^ m * exp (b₁ * z)) =o[l] fun z => z ^ n * exp (b₂ * z)

{l : Filter ℂ}
{b₁ b₂ : ℝ}
(hl : Complex.IsExpCmpFilter l)
(hb : b₁ < b₂)
(m n : ℤ)

(fun z => z ^ m * Complex.exp (↑b₁ * z)) =o[l] fun z => z ^ n * Complex.exp (↑b₂ * z)


@[reassoc (attr := simp)]
theorem fac_right [hsq : HasLift sq] : sq.lift ≫ p = g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : C}
{f : A ⟶ X}
{i : A ⟶ B}
{p : X ⟶ Y}
{g : B ⟶ Y}
(sq : CategoryTheory.CommSq f i p g)
[hsq : sq.HasLift]

CategoryTheory.CategoryStruct.comp sq.lift p = g


/-- While equal, the former has a convenient definitional reduction. -/
theorem homogeneousSubmodule_eq_finsupp_supported [CommSemiring R] (n : ℕ) :
    homogeneousSubmodule σ R n = Finsupp.supported _ R { d | d.degree = n }

(σ : Type u_1)
(R : Type u_3)
[CommSemiring R]
(n : ℕ)

MvPolynomial.homogeneousSubmodule σ R n = Finsupp.supported R R {d | d.degree = n}


@[simp]
lemma restrictScalars_zero : (0 : M →ₗ[S] N).restrictScalars R = 0

{R : Type u_17}
{S : Type u_18}
{M : Type u_19}
(N : Type u_20)
[Semiring R]
[Semiring S]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Module S M]
[Module S N]
[LinearMap.CompatibleSMul M N R S]


@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove that
theorem mem_carrier (x : K) : x ∈ A.carrier ↔ x ∈ A

{K : Type u}
[Field K]
(A : ValuationSubring K)
(x : K)


/-- A typeclass indicating that the right (aka `MulOpposite`) and left actions by `M` on `α` are
equal, that is that `M` acts centrally on `α`. This can be thought of as a version of commutativity
for `•`. -/
@[to_additive]
class IsCentralScalar (M α : Type*) [SMul M α] [SMul Mᵐᵒᵖ α] : Prop where
  /-- The right and left actions of `M` on `α` are equal. -/
  op_smul_eq_smul : ∀ (m : M) (a : α), MulOpposite.op m • a = m • a

{M : Type u_11}
{α : Type u_12}
[SMul M α]
[SMul Mᵐᵒᵖ α]
[self : IsCentralScalar M α]
(m : M)
(a : α)


theorem Iic_injective : Injective (Iic : α → Set α)


/-- A single function is uniformly integrable in the probability sense. -/
theorem uniformIntegrable_subsingleton [Subsingleton ι] (hp_one : 1 ≤ p) (hp_top : p ≠ ∞)
    (hf : ∀ i, Memℒp (f i) p μ) : UniformIntegrable f p μ

{f : ι → α → β}

(hf : ∀ (i : ι), MeasureTheory.Memℒp (f i) p μ)


/-- **Cauchy-Schwarz inequality** for finsets using square roots in `ℝ`. -/
lemma sum_sqrt_mul_sqrt_le (s : Finset ι) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) :
    ∑ i ∈ s, √(f i) * √(g i) ≤ √(∑ i ∈ s, f i) * √(∑ i ∈ s, g i)

{ι : Type u_2}
{f g : ι → ℝ}
(s : Finset ι)
(hf : ∀ (i : ι), 0 ≤ f i)
(hg : ∀ (i : ι), 0 ≤ g i)


protected theorem neg_mul_comm (a b : Int) : -a * b = a * -b


/-- The natural `LinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdLm : ℂ ≃ₗ[ℝ] ℝ × ℝ

∀ (a : ℂ), Complex.equivRealProdLm a = (a.re, a.im)


/-- In an infinite-dimensional normed space, there exists a sequence of points which are all
bounded by `R` and at distance at least `1`. For a version not assuming `c` and `R`, see
`exists_seq_norm_le_one_le_norm_sub`. -/
theorem exists_seq_norm_le_one_le_norm_sub' {c : 𝕜} (hc : 1 < ‖c‖) {R : ℝ} (hR : ‖c‖ < R)
    (h : ¬FiniteDimensional 𝕜 E) :
    ∃ f : ℕ → E, (∀ n, ‖f n‖ ≤ R) ∧ Pairwise fun m n => 1 ≤ ‖f m - f n‖

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
{c : 𝕜}
(hc : 1 < ‖c‖)
{R : ℝ}
(hR : ‖c‖ < R)
(h : ¬FiniteDimensional 𝕜 E)

∃ f, (∀ (n : ℕ), ‖f n‖ ≤ R) ∧ Pairwise fun m n => 1 ≤ ‖f m - f n‖


theorem Submodule.exists_lieSubmodule_coe_eq_iff (p : Submodule R M) :
    (∃ N : LieSubmodule R L M, ↑N = p) ↔ ∀ (x : L) (m : M), m ∈ p → ⁅x, m⁆ ∈ p

{R : Type u}
(L : Type v)
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(p : Submodule R M)

(∃ N, ↑N = p) ↔ ∀ (x : L), ∀ m ∈ p, ⁅x, m⁆ ∈ p


/-- If `‖pₙ‖ rⁿ = O(1)`, as `n → ∞`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => ‖p n‖ * (r : ℝ) ^ n) =O[atTop] fun _ => (1 : ℝ)) :
    ↑r ≤ p.radius

(h : (fun n => ‖p n‖ * ↑r ^ n) =O[Filter.atTop] fun x => 1)


theorem nmul_nadd_le {a' b' : Ordinal} (ha : a' ≤ a) (hb : b' ≤ b) :
    a' ⨳ b ♯ a ⨳ b' ≤ a ⨳ b ♯ a' ⨳ b'

{a b a' b' : Ordinal.{u}}
(ha : a' ≤ a)
(hb : b' ≤ b)


/-- As well as being linear, `ι Q` squares to the quadratic form -/
@[simp]
theorem ι_sq_scalar (m : M) : ι Q m * ι Q m = algebraMap R _ (Q m)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(m : M)

(CliffordAlgebra.ι Q) m * (CliffordAlgebra.ι Q) m = (algebraMap R (CliffordAlgebra Q)) (Q m)


@[simp]
theorem kstar_idem (a : α) : a∗∗ = a∗

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


@[simp]
theorem mem_comap (S : NonUnitalStarSubalgebra R B) (f : F) (x : A) : x ∈ comap f S ↔ f x ∈ S

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(S : NonUnitalStarSubalgebra R B)
(f : F)
(x : A)

x ∈ NonUnitalStarSubalgebra.comap f S ↔ f x ∈ S


/-- Scalar multiplication as a monoid homomorphism with zero. -/
@[simps]
def smulMonoidWithZeroHom {α β : Type*} [MonoidWithZero α] [MulZeroOneClass β]
    [MulActionWithZero α β] [IsScalarTower α β β] [SMulCommClass α β β] : α × β →*₀ β

{α : Type u_5}
{β : Type u_6}
[MonoidWithZero α]
[MulZeroOneClass β]
[MulActionWithZero α β]
[IsScalarTower α β β]
[SMulCommClass α β β]

∀ (a : α × β), smulMonoidWithZeroHom a = (↑smulMonoidHom).toFun a


/-- If `x : R` is multiplicative for `f`, then it is multiplicative for
  `seminormFromConst' hf1 hc hpm`. -/
theorem seminormFromConst_isMul_of_isMul {x : R} (hx : ∀ y : R, f (x * y) = f x * f y) (y : R) :
    seminormFromConst' hf1 hc hpm (x * y) =
      seminormFromConst' hf1 hc hpm x * seminormFromConst' hf1 hc hpm y

{R : Type u_1}
[CommRing R]
{c : R}
{f : RingSeminorm R}
(hf1 : f 1 ≤ 1)
(hc : f c ≠ 0)
(hpm : IsPowMul ⇑f)
{x : R}
(hx : ∀ (y : R), f (x * y) = f x * f y)
(y : R)


theorem disjoint_nhdsSet_cobounded {s : Set α} (hs : IsCompact s) : Disjoint (𝓝ˢ s) (cobounded α)

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(hs : IsCompact s)


theorem Squarefree.gcd_left {a : α} (b : α) (ha : Squarefree a) : Squarefree (gcd a b)

{α : Type u_2}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a : α}
(b : α)
(ha : Squarefree a)


theorem recF_eq {α : TypeVec n} {β : Type u} (g : F (α.append1 β) → β) (a : q.P.A)
    (f' : q.P.drop.B a ⟹ α) (f : q.P.last.B a → q.P.W α) :
    recF g (q.P.wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)

(f : (MvQPF.P F).last.B a → (MvQPF.P F).W α)

MvQPF.recF g ((MvQPF.P F).wMk a f' f) = g (MvQPF.abs ⟨a, TypeVec.splitFun f' (MvQPF.recF g ∘ f)⟩)


theorem Icc_pred_right_of_not_isMin (ha : ¬IsMin b) : Icc a (pred b) = Ico a b

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a b : α}
(ha : ¬IsMin b)


theorem of_near (f : ℕ → ℚ) (x : ℝ) (h : ∀ ε > 0, ∃ i, ∀ j ≥ i, |(f j : ℝ) - x| < ε) :
    ∃ h', Real.mk ⟨f, h'⟩ = x

(h : ∀ ε > 0, ∃ i, ∀ j ≥ i, |↑(f j) - x| < ε)

∃ (h' : IsCauSeq abs f), Real.mk ⟨f, h'⟩ = x


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

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


@[simp high]
theorem toFinsupp_X_pow (n : ℕ) : (X ^ n).toFinsupp = Finsupp.single n (1 : R)

(Polynomial.X ^ n).toFinsupp = Finsupp.single n 1


{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderBot α]
(b : α)


/-- The adjunction showing that evaluation is a right adjoint. -/
@[simps! unit_app counit_app_app]
def evaluationAdjunctionRight (c : C) : evaluationLeftAdjoint D c ⊣ (evaluation _ _).obj c

[∀ (a b : C), CategoryTheory.Limits.HasCoproductsOfShape (a ⟶ b) D]

((CategoryTheory.evaluationAdjunctionRight D c).counit.app Y).app e = CategoryTheory.Limits.Sigma.desc fun h => Y.map h


theorem ext_iff {A B : CostructuredArrow S T} (f g : A ⟶ B) : f = g ↔ f.left = g.left

{A B : CategoryTheory.CostructuredArrow S T}


theorem add_le_add_ge (a c : Nat) {b d : Nat} (h : b ≥ d) : (a + b ≤ c + d) = (a + (b - d) ≤ c)


theorem run_withContT (f : (β → m r) → α → m r) (x : ContT r m α) :
    run (withContT f x) = run x ∘ f

{r : Type u}
{m : Type u → Type v}
{α β : Type w}
(f : (β → m r) → α → m r)
(x : ContT r m α)


@[simp]
theorem LSeriesSummable_zero {s : ℂ} : LSeriesSummable 0 s


@[simp 1001] -- Porting note: increase `simp` priority so left-hand side doesn't simplify
theorem truncate_one_one {a b : X} (γ : Path a b) :
    γ.truncate 1 1 = (Path.refl b).cast (by rw [min_self, γ.extend_one]) γ.extend_one

{X : Type u_1}
[TopologicalSpace X]
{a b : X}
(γ : Path a b)


@[to_additive]
lemma mem_ofUnits_of_isUnit_of_unit_mem (S : Subgroup Mˣ) {x : M} (h₁ : IsUnit x)
    (h₂ : h₁.unit ∈ S) : x ∈ S.ofUnits

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
{x : M}
(h₁ : IsUnit x)
(h₂ : h₁.unit ∈ S)


@[simp]
lemma zero_hom_app_obj (X : C) :
    (zero F s i).hom.app (F.obj X) =
      (i 0).hom.app X ≫ F.map ((shiftFunctorZero C A).hom.app X)

(i : (a : A) → F.comp (s a) ≅ (CategoryTheory.shiftFunctor C a).comp F)

[((CategoryTheory.whiskeringLeft C D D).obj F).Full]

[((CategoryTheory.whiskeringLeft C D D).obj F).Faithful]

(CategoryTheory.HasShift.Induced.zero F s i).hom.app (F.obj X) =
  CategoryTheory.CategoryStruct.comp ((i 0).hom.app X) (F.map ((CategoryTheory.shiftFunctorZero C A).hom.app X))


theorem imageToKernel_op {X Y Z : V} (f : X ⟶ Y) (g : Y ⟶ Z) (w : f ≫ g = 0) :
    imageToKernel g.op f.op (by rw [← op_comp, w, op_zero]) =
      (imageSubobjectIso _ ≪≫ (imageOpOp _).symm).hom ≫
        (cokernel.desc f (factorThruImage g)
              (by rw [← cancel_mono (image.ι g), Category.assoc, image.fac, w, zero_comp])).op ≫
          (kernelSubobjectIso _ ≪≫ kernelOpOp _).inv

{V : Type u_1}
[CategoryTheory.Category.{u_2, u_1} V]
[CategoryTheory.Abelian V]
{X Y Z : V}
(f : X ⟶ Y)
(g : Y ⟶ Z)
(w : f ≫ g = 0)

imageToKernel g.op f.op ⋯ =
  (CategoryTheory.Limits.imageSubobjectIso g.op ≪≫ (CategoryTheory.imageOpOp g).symm).hom ≫
    (CategoryTheory.Limits.cokernel.desc f (CategoryTheory.Limits.factorThruImage g) ⋯).op ≫
      (CategoryTheory.Limits.kernelSubobjectIso f.op ≪≫ CategoryTheory.kernelOpOp f).inv


/-- If `M` is quasicoherent, it is locally generated by sections. -/
@[simps]
def localGeneratorsData (q : M.QuasicoherentData) : M.LocalGeneratorsData

{J : CategoryTheory.GrothendieckTopology C}

[∀ (X : C), (J.over X).HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

[∀ (X : C), CategoryTheory.HasWeakSheafify (J.over X) AddCommGrp]

[∀ (X : C), (J.over X).WEqualsLocallyBijective AddCommGrp]

q.localGeneratorsData.generators i = (q.presentation i).generators


lemma mem_unitary_of_spectrum_subset_circle {u : A}
    [IsStarNormal u] (hu : spectrum ℂ u ⊆ circle) : u ∈ unitary A


theorem bind_map_comm (m : Multiset α) (n : Multiset β) {f : α → β → γ} :
    ((bind m) fun a => n.map fun b => f a b) = (bind n) fun b => m.map fun a => f a b

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(m : Multiset α)
(n : Multiset β)
{f : α → β → γ}

(m.bind fun a => Multiset.map (fun b => f a b) n) = n.bind fun b => Multiset.map (fun a => f a b) m


/-- A measure `μ` is inner regular if, for any measurable set `s`, then
`μ(s) = sup {μ(K) | K ⊆ s compact}`. -/
class InnerRegular (μ : Measure α) : Prop where
  protected innerRegular : InnerRegularWRT μ IsCompact (fun s ↦ MeasurableSet s)

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[self : μ.InnerRegular]

μ.InnerRegularWRT IsCompact fun s => MeasurableSet s


theorem norm_eq_matrix_det [Fintype ι] [DecidableEq ι] (b : Basis ι R S) (s : S) :
    norm R s = Matrix.det (Algebra.leftMulMatrix b s)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{ι : Type w}
[Fintype ι]
[DecidableEq ι]
(b : Basis ι R S)
(s : S)

(Algebra.norm R) s = ((Algebra.leftMulMatrix b) s).det


/-- Inversion on a group is a `MulEquiv` to the opposite group. When `G` is commutative, there is
`MulEquiv.inv`. -/
@[to_additive (attr := simps! (config := { fullyApplied := false, simpRhs := true }))
      "Negation on an additive group is an `AddEquiv` to the opposite group. When `G`
      is commutative, there is `AddEquiv.inv`."]
def MulEquiv.inv' (G : Type*) [DivisionMonoid G] : G ≃* Gᵐᵒᵖ

⇑(MulEquiv.inv' G).symm = Inv.inv ∘ MulOpposite.unop


@[simp]
theorem ofReal_eq_one {z : ℝ} : (z : ℂ) = 1 ↔ z = 1


@[simp]
theorem toZ_of_eq : toZ i0 i0 = 0

{ι : Type u_1}
[LinearOrder ι]
[SuccOrder ι]
[IsSuccArchimedean ι]
[PredOrder ι]
{i0 : ι}


theorem false_xor : ∀ (x : Bool), xor false x = x


/-- An injective family `v : ι → E` is orthonormal if and only if `Subtype.val : (range v) → E` is
orthonormal. -/
theorem orthonormal_subtype_range {v : ι → E} (hv : Function.Injective v) :
    Orthonormal 𝕜 (Subtype.val : Set.range v → E) ↔ Orthonormal 𝕜 v

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{v : ι → E}
(hv : Function.Injective v)

Orthonormal 𝕜 Subtype.val ↔ Orthonormal 𝕜 v


/-- See Note [no_index around OfNat.ofNat] -/
lemma cpow_mul_ofNat (x y : ℂ) (n : ℕ) [n.AtLeastTwo] :
    x ^ (y * no_index (OfNat.ofNat n)) = (x ^ y) ^ (OfNat.ofNat n : ℕ)

x ^ (y * OfNat.ofNat n) = (x ^ y) ^ OfNat.ofNat n


theorem Nontrivial.infsep_of_fintype [DecidableEq α] [Fintype s] (hs : s.Nontrivial) :
    s.infsep = s.offDiag.toFinset.inf' (by simpa) (uncurry dist)

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}
[DecidableEq α]
[Fintype ↑s]
(hs : s.Nontrivial)

s.infsep = s.offDiag.toFinset.inf' ⋯ (Function.uncurry dist)


@[to_additive existing (attr := simp)]
lemma equivShrink_symm_inv [Inv α] [Small α] (x : Shrink α) :
    (equivShrink α).symm x⁻¹ = ((equivShrink α).symm x)⁻¹

{α : Type u_1}
[Inv α]
[Small.{u_2, u_1} α]
(x : Shrink.{u_2, u_1} α)


/-- Deprecated. Use `DFunLike.congr_fun` instead. -/
protected theorem congr_fun {f g : C(α, β)} (H : f = g) (x : α) : f x = g x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f g : C(α, β)}
(H : f = g)
(x : α)


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

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


theorem untrop_eq_iff_eq_trop {x} {y : R} : untrop x = y ↔ x = trop y

Tropical.untrop x = y ↔ x = Tropical.trop y


theorem measurable_coeFn [MeasurableSpace β] [BorelSpace β] (f : α →₁[μ] β) : Measurable f

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


/-- The cardinality of the interval (-∞, a). -/
theorem mk_Iio_real (a : ℝ) : #(Iio a) = 𝔠


@[simp]
theorem closure_iSup_closure (f : ι → α) : c (⨆ i, c (f i)) = c (⨆ i, f i)

{α : Type u_1}
{ι : Sort u_2}
[CompleteLattice α]
(c : ClosureOperator α)
(f : ι → α)


@[simp]
theorem bot_lt_top : (⊥ : α) < ⊤

{α : Type u}
[PartialOrder α]
[BoundedOrder α]
[Nontrivial α]


protected theorem dist_edist (f g : Lp E p μ) : dist f g = (edist f g).toReal

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f g : ↥(MeasureTheory.Lp E p μ))


@[simp]
theorem pi_div_two_eq_arcsin {x} : π / 2 = arcsin x ↔ 1 ≤ x


private lemma inf_aux : a ∈ upperClosure s → (s.filter (· ≤ a)).Nonempty

{α : Type u_1}
[SemilatticeInf α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{a : α}

a ∈ upperClosure ↑s → (Finset.filter (fun x => x ≤ a) s).Nonempty


@[simp] theorem rTensor_zpow (f : M ≃ₗ[R] M) (n : ℤ) : f.rTensor N ^ n = (f ^ n).rTensor N

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : M ≃ₗ[R] M)
(n : ℤ)

LinearEquiv.rTensor N f ^ n = LinearEquiv.rTensor N (f ^ n)


@[simp]
lemma preimage_symmDiff {f : α → β} (s t : Set β) : f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t)

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

f ⁻¹' symmDiff s t = symmDiff (f ⁻¹' s) (f ⁻¹' t)


theorem continuousAt_fract [OrderClosedTopology α] [TopologicalAddGroup α]
    {x : α} (h : x ≠ ⌊x⌋) : ContinuousAt fract x

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
[TopologicalAddGroup α]
{x : α}
(h : x ≠ ↑⌊x⌋)


theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_left
    {i₂ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ 0) (hm₂ : m₂ ∈ evenOdd Q₂ i₂) :
    Commute (map f₁ m₁) (map f₂ m₂)

(hf : ∀ (x : M₁) (y : M₂), QuadraticMap.IsOrtho Qₙ (f₁ x) (f₂ y))

(hm₁ : m₁ ∈ CliffordAlgebra.evenOdd Q₁ 0)

(hm₂ : m₂ ∈ CliffordAlgebra.evenOdd Q₂ i₂)

Commute ((CliffordAlgebra.map f₁) m₁) ((CliffordAlgebra.map f₂) m₂)


theorem cardinal_le_max_transcendence_basis (hv : IsTranscendenceBasis R v) :
    #K ≤ max (max #R #ι) ℵ₀

{R K : Type u}
[CommRing R]
[Field K]
[Algebra R K]
[IsAlgClosed K]
{ι : Type u}
(v : ι → K)
(hv : IsTranscendenceBasis R v)


@[simp]
theorem einfsep_empty : (∅ : Set α).einfsep = ∞


theorem Function.Bijective.cauchySeq_comp_iff {f : ℕ → ℕ} (hf : Bijective f) (u : ℕ → α) :
    CauchySeq (u ∘ f) ↔ CauchySeq u

{α : Type u}
[uniformSpace : UniformSpace α]
{f : ℕ → ℕ}
(hf : Function.Bijective f)
(u : ℕ → α)


@[simp, norm_cast]
theorem coe_iInf (f : ι → UpperSet α) : (↑(⨅ i, f i) : Set α) = ⋃ i, f i

{α : Type u_1}
{ι : Sort u_4}
[LE α]
(f : ι → UpperSet α)


lemma Finset.univ_of_card_le_three (h : Fintype.card R ≤ 3) :
    (univ : Finset R) = {0, 1, -1}

{R : Type u_1}
[Ring R]
[Fintype R]
[DecidableEq R]
(h : Fintype.card R ≤ 3)


theorem map_map {T : Type*} [Semiring T] {I : Ideal R} (f : R →+* S) (g : S →+* T) :
    (I.map f).map g = I.map (g.comp f)

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{T : Type u_3}
[Semiring T]
{I : Ideal R}
(f : R →+* S)
(g : S →+* T)

Ideal.map g (Ideal.map f I) = Ideal.map (g.comp f) I


theorem degrees_X' (n : σ) : degrees (X n : MvPolynomial σ R) ≤ {n}

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(n : σ)


@[simp]
lemma toFinset_Iic (a : α) [Fintype (Iic a)] : (Iic a).toFinset = Finset.Iic a

{α : Type u_3}
[Preorder α]
[LocallyFiniteOrderBot α]
(a : α)
[Fintype ↑(Set.Iic a)]


/-- Auxiliary lemma used in the proof of `setIntegral_condexpL1CLM`. -/
theorem setIntegral_condexpL1CLM_of_measure_ne_top (f : α →₁[μ] F') (hs : MeasurableSet[m] s)
    (hμs : μ s ≠ ∞) : ∫ x in s, condexpL1CLM F' hm μ f x ∂μ = ∫ x in s, f x ∂μ

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
{s : Set α}
(f : ↥(MeasureTheory.Lp F' 1 μ))
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)

∫ (x : α) in s, ↑↑((MeasureTheory.condexpL1CLM F' hm μ) f) x ∂μ = ∫ (x : α) in s, ↑↑f x ∂μ


theorem degree_eq_of_mem_mem {x : M} {i j : ι} (hxi : x ∈ ℳ i) (hxj : x ∈ ℳ j) (hx : x ≠ 0) :
    i = j

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
{x : M}
{i j : ι}
(hxi : x ∈ ℳ i)
(hxj : x ∈ ℳ j)
(hx : x ≠ 0)


/-- A multiplicative bijection between two monoids is a monoid hom
  (deprecated -- use `MulEquiv.toMonoidHom`). -/
@[to_additive
      "An additive bijection between two additive monoids is an additive
      monoid hom (deprecated). "]
theorem isMonoidHom (h : M ≃* N) : IsMonoidHom h

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(h : M ≃* N)


/-- See also `Finset.prod_ite_eq'`. -/
@[to_additive "See also `Finset.sum_ite_eq'`."]
lemma prod_ite_eq' (i : ι) (f : ι → α) : ∏ j, (if j = i then f j else 1) = f i

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[CommMonoid α]
[DecidableEq ι]
(i : ι)
(f : ι → α)

(∏ j : ι, if j = i then f j else 1) = f i


theorem isUnit_sq {a : ℤ} (ha : IsUnit a) : a ^ 2 = 1


theorem ssubset_iff_insert {s t : Set α} : s ⊂ t ↔ ∃ a ∉ s, insert a s ⊆ t


theorem card_support_prod_list_of_pairwise_disjoint {l : List (Perm α)} (h : l.Pairwise Disjoint) :
    l.prod.support.card = (l.map (Finset.card ∘ support)).sum

(h : List.Pairwise Equiv.Perm.Disjoint l)

l.prod.support.card = (List.map (Finset.card ∘ Equiv.Perm.support) l).sum


theorem inf (hs : ClosedUnder f s) (ht : ClosedUnder f t) : ClosedUnder f (s ⊓ t)

(hs : FirstOrder.Language.ClosedUnder f s)

(ht : FirstOrder.Language.ClosedUnder f t)

FirstOrder.Language.ClosedUnder f (s ⊓ t)


theorem Coprime.coprime_mul_right_right (H : Coprime m (n * k)) : Coprime m n


@[deprecated OrderTop.atTop_eq (since := "2024-02-14")]
theorem atTop_le_nhds_top [OrderTop α] : (atTop : Filter α) ≤ 𝓝 ⊤

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTop α]


/-- The supremum of an intersection of two sets is bounded by the minimum of the suprema of each
set, if all sets are bounded above and nonempty. -/
theorem csSup_inter_le (hs : BddAbove s) (ht : BddAbove t) (hst : (s ∩ t).Nonempty) :
    sSup (s ∩ t) ≤ sSup s ⊓ sSup t

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s t : Set α}
(hs : BddAbove s)
(ht : BddAbove t)
(hst : (s ∩ t).Nonempty)


lemma toAffineLift_some {X Y : F} (h : W.NonsingularLift ⟦![X, Y, 1]⟧) :
    toAffineLift ⟨h⟩ = .some ((nonsingular_some ..).mp h)

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{X Y : F}
(h : W.NonsingularLift ⟦![X, Y, 1]⟧)

(WeierstrassCurve.Jacobian.Point.mk h).toAffineLift = WeierstrassCurve.Affine.Point.some ⋯


theorem extend_unique (g : Fₗ →SL[σ₁₂] F) (H : g.comp e = f) : extend f e h_dense h_e = g

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜 Fₗ]
{σ₁₂ : 𝕜 →+* 𝕜₂}
(f : E →SL[σ₁₂] F)
[CompleteSpace F]
(e : E →L[𝕜] Fₗ)
(h_dense : DenseRange ⇑e)
(h_e : UniformInducing ⇑e)
(g : Fₗ →SL[σ₁₂] F)
(H : g.comp e = f)


@[simp]
theorem nnnorm_equiv_symm_fst (x : α) :
    ‖(WithLp.equiv p (α × β)).symm (x, 0)‖₊ = ‖x‖₊

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(x : α)


theorem MeasurePreserving.lintegral_comp {mb : MeasurableSpace β} {ν : Measure β} {g : α → β}
    (hg : MeasurePreserving g μ ν) {f : β → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, f (g a) ∂μ = ∫⁻ b, f b ∂ν

(hg : MeasureTheory.MeasurePreserving g μ ν)

{f : β → ℝ≥0∞}

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


@[simp]
protected theorem RingHom.smul_def (f : R →+* R) (a : R) : f • a = f a

(R : Type v)
[Semiring R]
(f : R →+* R)
(a : R)


theorem abs_sub_round (x : α) : |x - round x| ≤ 1 / 2

{α : Type u_2}
[LinearOrderedField α]
[FloorRing α]
(x : α)


@[to_additive]
theorem smul_subset_smul_right : s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s₁ s₂ : Finset α}
{t : Finset β}

s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t


theorem not_mem_Ico_of_lt (ha : c < a) : c ∉ Ico a b

{α : Type u_1}
[Preorder α]
{a b c : α}
(ha : c < a)


/-- `SMul` version of `comp_mul_left` -/
@[to_additive "`VAdd` version of `comp_add_left`"]
lemma comp_smul_left (a₁ a₂ : M) : (a₁ • ·) ∘ (a₂ • ·) = (((a₁ * a₂) • ·) : α → α)

(M : Type u_1)
{α : Type u_7}
[AddMonoid M]
[AddAction M α]
(a₁ a₂ : M)

((fun x => a₁ +ᵥ x) ∘ fun x => a₂ +ᵥ x) = fun x => a₁ + a₂ +ᵥ x


/-- Inductive step for the reduction: if one knows that any size `r` matrix can be reduced to
diagonal form by elementary operations, then one deduces it for matrices over `Fin r ⊕ Unit`. -/
theorem exists_list_transvec_mul_mul_list_transvec_eq_diagonal_induction
    (IH :
      ∀ M : Matrix (Fin r) (Fin r) 𝕜,
        ∃ (L₀ L₀' : List (TransvectionStruct (Fin r) 𝕜)) (D₀ : Fin r → 𝕜),
          (L₀.map toMatrix).prod * M * (L₀'.map toMatrix).prod = diagonal D₀)
    (M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜) :
    ∃ (L L' : List (TransvectionStruct (Fin r ⊕ Unit) 𝕜)) (D : Fin r ⊕ Unit → 𝕜),
      (L.map toMatrix).prod * M * (L'.map toMatrix).prod = diagonal D

(IH :
  ∀ (M : Matrix (Fin r) (Fin r) 𝕜),
    ∃ L₀ L₀' D₀,
      (List.map Matrix.TransvectionStruct.toMatrix L₀).prod * M *
          (List.map Matrix.TransvectionStruct.toMatrix L₀').prod =
        Matrix.diagonal D₀)

∃ L L' D,
  (List.map Matrix.TransvectionStruct.toMatrix L).prod * M * (List.map Matrix.TransvectionStruct.toMatrix L').prod =
    Matrix.diagonal D


nonrec theorem gcd_mul_left {a : α} : (s.gcd fun x ↦ a * f x) = normalize a * s.gcd f

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}
{a : α}

(s.gcd fun x => a * f x) = normalize a * s.gcd f


theorem ord_compl_mul (a b p : ℕ) : ord_compl[p] (a * b) = ord_compl[p] a * ord_compl[p] b

a * b / p ^ (a * b).factorization p = a / p ^ a.factorization p * (b / p ^ b.factorization p)


/-- We intentionally restrict the type of `α` in this lemma so that this is a safer to use in simp
than `forall_swap`. -/
theorem imp_forall_iff {α : Type*} {p : Prop} {q : α → Prop} : (p → ∀ x, q x) ↔ ∀ x, p → q x

{α : Type u_3}
{p : Prop}
{q : α → Prop}

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


theorem range_add_one' (n : ℕ) :
    range (n + 1) = insert 0 ((range n).map ⟨fun i => i + 1, fun i j => by simp⟩)

Finset.range (n + 1) = insert 0 (Finset.map { toFun := fun i => i + 1, inj' := ⋯ } (Finset.range n))


/-- `NonarchAddGroupSeminormClass F α` states that `F` is a type of nonarchimedean seminorms on
the additive group `α`.

You should extend this class when you extend `NonarchAddGroupSeminorm`. -/
class NonarchAddGroupSeminormClass (F : Type*) (α : outParam Type*) [AddGroup α] [FunLike F α ℝ]
    extends NonarchimedeanHomClass F α ℝ : Prop where
  /-- The image of zero is zero. -/
  protected map_zero (f : F) : f 0 = 0
  /-- The seminorm is invariant under negation. -/
  protected map_neg_eq_map' (f : F) (a : α) : f (-a) = f a

[self : NonarchAddGroupSeminormClass F α]


theorem _root_.Function.Injective.bijective_of_nat_card_le [Finite β] {f : α → β}
    (inj : Injective f) (hc : Nat.card β ≤ Nat.card α) : Bijective f

{α : Type u_1}
{β : Type u_2}
[Finite β]
{f : α → β}
(inj : Function.Injective f)
(hc : Nat.card β ≤ Nat.card α)


theorem mem_extChartAt_source (x : M) : x ∈ (extChartAt I x).source

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


/-- The identification `mop X ⊗ - = mop (- ⊗ X)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorLeftMopIso (X : C) :
    tensorLeft (mop X) ≅ unmopFunctor C ⋙ tensorRight X ⋙ mopFunctor C

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

∀ (X_1 : Cᴹᵒᵖ),
  ((CategoryTheory.MonoidalOpposite.tensorLeftMopIso X).hom.app X_1).unmop =
    𝟙 (CategoryTheory.MonoidalCategory.tensorObj X_1.unmop X)


theorem inter_symmDiff_distrib_right (s t u : Set α) : s ∆ t ∩ u = (s ∩ u) ∆ (t ∩ u)

symmDiff s t ∩ u = symmDiff (s ∩ u) (t ∩ u)


theorem coeff_pow_of_natDegree_le (pn : p.natDegree ≤ n) :
    (p ^ m).coeff (m * n) = p.coeff n ^ m

{R : Type u}
{m n : ℕ}
[Semiring R]
{p : R[X]}
(pn : p.natDegree ≤ n)


lemma trace_comp_cycle (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : P →ₗ[R] M) :
    trace R P (g ∘ₗ f ∘ₗ h) = trace R N (f ∘ₗ h ∘ₗ g)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
{P : Type u_4}
[AddCommGroup N]
[Module R N]
[AddCommGroup P]
[Module R P]
[Module.Free R N]
[Module.Finite R N]
[Module.Free R P]
[Module.Finite R P]
(f : M →ₗ[R] N)
(g : N →ₗ[R] P)
(h : P →ₗ[R] M)

(LinearMap.trace R P) (g ∘ₗ f ∘ₗ h) = (LinearMap.trace R N) (f ∘ₗ h ∘ₗ g)


@[simp]
theorem isLUB_image {s : Set α} {x : β} : IsLUB (f '' s) x ↔ IsLUB s (f.symm x)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
{s : Set α}
{x : β}


theorem splits_id_of_splits {f : K[X]} (h : Splits i f)
    (roots_mem_range : ∀ a ∈ (f.map i).roots, a ∈ i.range) : Splits (RingHom.id K) f

(roots_mem_range : ∀ a ∈ (Polynomial.map i f).roots, a ∈ i.range)


@[simp]
lemma map_id : C.map (RingHom.id R) = C

{R : Type u}
[CommRing R]
(C : WeierstrassCurve.VariableChange R)

WeierstrassCurve.VariableChange.map (RingHom.id R) C = C


/-- If every finite diagram in `C` admits a cocone, then `C` is filtered. It is sufficient to verify
    this for diagrams whose shape lives in any one fixed universe. -/
theorem of_cocone_nonempty (h : ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
    Nonempty (Cocone F)) : IsFiltered C

(h :
  ∀ {J : Type w} [inst : CategoryTheory.SmallCategory J] [inst_1 : CategoryTheory.FinCategory J]
    (F : CategoryTheory.Functor J C), Nonempty (CategoryTheory.Limits.Cocone F))


theorem Set.Subsingleton.isAntichain (hs : s.Subsingleton) (r : α → α → Prop) : IsAntichain r s

{α : Type u_1}
{s : Set α}
(hs : s.Subsingleton)
(r : α → α → Prop)


theorem nonempty_of_mem_parts {a : Finset α} (ha : a ∈ P.parts) : a.Nonempty

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)
{a : Finset α}
(ha : a ∈ P.parts)


theorem sequenceOfCofinals.encode_mem (i : ι) :
    sequenceOfCofinals p 𝒟 (Encodable.encode i + 1) ∈ 𝒟 i

{P : Type u_1}
[Preorder P]
(p : P)
{ι : Type u_2}
[Encodable ι]
(𝒟 : ι → Order.Cofinal P)
(i : ι)

Order.sequenceOfCofinals p 𝒟 (Encodable.encode i + 1) ∈ 𝒟 i


@[simp]
theorem mem_lowerClosure : x ∈ lowerClosure s ↔ ∃ a ∈ s, x ≤ a

{α : Type u_1}
[Preorder α]
{s : Set α}
{x : α}


/-- Replacing a set by its closure does not change the Hausdorff distance. -/
@[simp]
theorem hausdorffDist_closure₁ : hausdorffDist (closure s) t = hausdorffDist s t

{α : Type u}
[PseudoMetricSpace α]
{s t : Set α}

Metric.hausdorffDist (closure s) t = Metric.hausdorffDist s t


theorem cardinal_mk_le_max {R : Type u} [Semiring R] : #(R[X]) ≤ max #R ℵ₀


@[simp]
theorem bind₁_X_right (f : σ → MvPolynomial τ R) (i : σ) : bind₁ f (X i) = f i

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
(f : σ → MvPolynomial τ R)
(i : σ)

(MvPolynomial.bind₁ f) (MvPolynomial.X i) = f i


lemma CstarRing.star_mul_le_algebraMap_norm_sq {a : A} : star a * a ≤ algebraMap ℝ A (‖a‖ ^ 2)

{A : Type u_1}
[NormedRing A]
[StarRing A]
[CstarRing A]
[CompleteSpace A]
[NormedAlgebra ℂ A]
[StarModule ℂ A]
[PartialOrder A]
[StarOrderedRing A]
{a : A}


theorem shift_zero_eq_zero (X Y : C) (n : A) : (0 : X ⟶ Y)⟦n⟧' = (0 : X⟦n⟧ ⟶ Y⟦n⟧)

(CategoryTheory.shiftFunctor C n).map 0 = 0


@[simp] theorem transpose_inj {A B : Matrix m n α} : Aᵀ = Bᵀ ↔ A = B

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{A B : Matrix m n α}


protected theorem add_pow_prime_pow_eq (hp : p.Prime) (h : Commute x y) (n : ℕ) :
    (x + y) ^ p ^ n =
      x ^ p ^ n + y ^ p ^ n +
        p * ∑ k ∈ Ioo 0 (p ^ n), x ^ k * y ^ (p ^ n - k) * ↑((p ^ n).choose k / p)

{R : Type u_1}
[Semiring R]
{p : ℕ}
{x y : R}
(hp : Nat.Prime p)
(h : Commute x y)
(n : ℕ)

(x + y) ^ p ^ n =
  x ^ p ^ n + y ^ p ^ n + ↑p * ∑ k ∈ Finset.Ioo 0 (p ^ n), x ^ k * y ^ (p ^ n - k) * ↑((p ^ n).choose k / p)


theorem Tendsto.comp {f : α → β} {g : β → γ} {x : Filter α} {y : Filter β} {z : Filter γ}
    (hg : Tendsto g y z) (hf : Tendsto f x y) : Tendsto (g ∘ f) x z

{α : Type u}
{β : Type v}
{γ : Type w}
{f : α → β}
{g : β → γ}
{x : Filter α}
{y : Filter β}
{z : Filter γ}
(hg : Filter.Tendsto g y z)
(hf : Filter.Tendsto f x y)


/-- Restating the definition of a limit cone in terms of the ∃! operator. -/
theorem existsUnique {t : Cone F} (h : IsLimit t) (s : Cone F) :
    ∃! l : s.pt ⟶ t.pt, ∀ j, l ≫ t.π.app j = s.π.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{t : CategoryTheory.Limits.Cone F}
(h : CategoryTheory.Limits.IsLimit t)
(s : CategoryTheory.Limits.Cone F)

∃! l, ∀ (j : J), l ≫ t.π.app j = s.π.app j


@[simp, norm_cast]
theorem coe_sInf (S : Set (Subalgebra R A)) : (↑(sInf S) : Set A) = ⋂ s ∈ S, ↑s

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Set (Subalgebra R A))


/-- If two maps of short complexes are homotopic, their opposites also are. -/
@[simps]
def neg (h : Homotopy φ₁ φ₂) : Homotopy (-φ₁) (-φ₂)

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

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


/--
The family of elements given by `x : FirstObj P S` is compatible iff `firstMap` and `secondMap`
map it to the same point.
-/
theorem compatible_iff (x : FirstObj P S) :
    ((firstObjEqFamily P S).hom x).Compatible ↔ firstMap P S x = secondMap P S x

(P : CategoryTheory.Functor Cᵒᵖ (Type (max v u)))

(x : CategoryTheory.Equalizer.FirstObj P S.arrows)

((CategoryTheory.Equalizer.firstObjEqFamily P S.arrows).hom x).Compatible ↔
  CategoryTheory.Equalizer.Sieve.firstMap P S x = CategoryTheory.Equalizer.Sieve.secondMap P S x


@[simp]
theorem mk_snd {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) :
    (mk fst snd eq).snd = snd

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Z}
{g : Y ⟶ Z}
{W : C}
(fst : W ⟶ X)
(snd : W ⟶ Y)
(eq : fst ≫ f = snd ≫ g)

(CategoryTheory.Limits.PullbackCone.mk fst snd eq).snd = snd


@[to_additive (attr := congr)]
theorem finprod_congr_Prop {p q : Prop} {f : p → M} {g : q → M} (hpq : p = q)
    (hfg : ∀ h : q, f (hpq.mpr h) = g h) : finprod f = finprod g

{M : Type u_2}
[CommMonoid M]
{p q : Prop}
{f : p → M}
{g : q → M}
(hpq : p = q)
(hfg : ∀ (h : q), f ⋯ = g h)


@[to_additive (attr := simp)]
theorem op_div [DivInvMonoid α] (x y : α) : op (x / y) = (op y)⁻¹ * op x

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

AddOpposite.op (x - y) = -AddOpposite.op y + AddOpposite.op x


theorem toDual_inj {a b : α} : toDual a = toDual b ↔ a = b

OrderDual.toDual a = OrderDual.toDual b ↔ a = b


theorem covariant_flip_iff [IsSymmOp N N mu] :
    Covariant N N (flip mu) r ↔ Covariant N N mu r

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


/-- Inverses of elements of finite order have finite order. -/
@[to_additive (attr := simp) "Inverses of elements of finite additive order
have finite additive order."]
theorem isOfFinOrder_inv_iff {x : G} : IsOfFinOrder x⁻¹ ↔ IsOfFinOrder x


theorem contDiffAt_prod' {t : Finset ι} {f : ι → E → 𝔸'} (h : ∀ i ∈ t, ContDiffAt 𝕜 n (f i) x) :
    ContDiffAt 𝕜 n (∏ i ∈ t, f i) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{n : ℕ∞}
{𝔸' : Type u_4}
{ι : Type u_5}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{t : Finset ι}
{f : ι → E → 𝔸'}
(h : ∀ i ∈ t, ContDiffAt 𝕜 n (f i) x)


theorem IsRelPrime.mul_left (H1 : IsRelPrime x z) (H2 : IsRelPrime y z) : IsRelPrime (x * y) z

{α : Type u_1}
[CommMonoid α]
{x y z : α}
[DecompositionMonoid α]
(H1 : IsRelPrime x z)
(H2 : IsRelPrime y z)


theorem coe_linearMapAt_of_mem (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) : ⇑(e.linearMapAt R b) = fun y => (e ⟨b, y⟩).2

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

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


@[to_additive]
theorem div_apply [Div Y] (f g : LocallyConstant X Y) (x : X) : (f / g) x = f x / g x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Sub Y]
(f g : LocallyConstant X Y)
(x : X)


/-- verschiebung is a natural transformation -/
@[simp]
theorem map_verschiebung (f : R →+* S) (x : 𝕎 R) :
    map f (verschiebung x) = verschiebung (map f x)

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(x : WittVector p R)

(WittVector.map f) (WittVector.verschiebung x) = WittVector.verschiebung ((WittVector.map f) x)


/-- The two paths coercion can take to an `Equiv` are equivalent -/
theorem toEquiv_commutes (f : R ≃+* S) : (f : R ≃+ S).toEquiv = (f : R ≃* S).toEquiv

{R : Type u_4}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R ≃+* S)


theorem prod_aux_uniformity_eq [PseudoEMetricSpace α] [PseudoEMetricSpace β] :
    𝓤 (WithLp p (α × β)) = 𝓤[instUniformSpaceProd]

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]


theorem eq_of_le_of_cast_pow_eq_zero [CharP R p] (i : ℕ) (hin : i ≤ n)
    (hpi : (p : TruncatedWittVector p n R) ^ i = 0) : i = n

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)
(R : Type u_1)
[CommRing R]
[CharP R p]
(i : ℕ)
(hin : i ≤ n)
(hpi : ↑p ^ i = 0)


@[simp] theorem emod_add_emod (m n k : Int) : (m % n + k) % n = (m + k) % n


theorem relMap_unify_equiv {n : ℕ} (R : L.Relations n) (x : Fin n → Σˣ f) (i j : ι)
    (hi : i ∈ upperBounds (range (Sigma.fst ∘ x))) (hj : j ∈ upperBounds (range (Sigma.fst ∘ x))) :
    RelMap R (unify f x i hi) = RelMap R (unify f x j hj)

[DirectedSystem G fun i j h => ⇑(f i j h)]

(x : Fin n → FirstOrder.Language.Structure.Sigma f)

(hi : i ∈ upperBounds (Set.range (Sigma.fst ∘ x)))

(hj : j ∈ upperBounds (Set.range (Sigma.fst ∘ x)))

FirstOrder.Language.Structure.RelMap R (FirstOrder.Language.DirectLimit.unify f x i hi) =
  FirstOrder.Language.Structure.RelMap R (FirstOrder.Language.DirectLimit.unify f x j hj)


@[simp]
theorem isCycleOn_one : (1 : Perm α).IsCycleOn s ↔ s.Subsingleton

Equiv.Perm.IsCycleOn 1 s ↔ s.Subsingleton


theorem tendsto_exp_atBot_nhdsWithin : Tendsto exp atBot (𝓝[>] 0)

Filter.Tendsto Real.exp Filter.atBot (𝓝[>] 0)


@[simp]
protected theorem tsum_eq_zero : ∑' i, f i = 0 ↔ ∀ i, f i = 0


@[simp]
theorem fderiv_sin (hc : DifferentiableAt ℝ f x) :
    fderiv ℝ (fun x => Real.sin (f x)) x = Real.cos (f x) • fderiv ℝ f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)


theorem contDiff_zero_fun : ContDiff 𝕜 n fun _ : E => (0 : F)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}


@[to_additive neg_nonneg_of_nonpos]
theorem one_le_inv_of_le_one : a ≤ 1 → 1 ≤ a⁻¹

{α : Type u}
[OrderedAddCommGroup α]
{a : α}


/-- The identity lax prefunctor. -/
@[simps]
def id (B : Type u₁) [Quiver.{v₁ + 1} B] [∀ a b : B, Quiver.{w₁ + 1} (a ⟶ b)] :
    PrelaxFunctorStruct B B

(B : Type u₁)
[Quiver B]
[(a b : B) → Quiver (a ⟶ b)]

(CategoryTheory.PrelaxFunctorStruct.id B).toPrefunctor = 𝟭q B


theorem coe_smul (a : S) (f : M →ₛₗ[σ₁₂] M₂) : (a • f : M →ₛₗ[σ₁₂] M₂) = a • (f : M → M₂)

{R : Type u_1}
{R₂ : Type u_3}
{S : Type u_6}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[Monoid S]
[DistribMulAction S M₂]
[SMulCommClass R₂ S M₂]
(a : S)
(f : M →ₛₗ[σ₁₂] M₂)


@[to_additive (attr := simp, nolint simpNF)]
theorem of_mulEquivOfMulEquiv_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap x = k.toMap (j x)

(H : AddSubmonoid.map j.toAddMonoidHom S = T)

(f.ofAddEquivOfLocalizations (f.addEquivOfAddEquiv k H)).toMap x = k.toMap (j x)


@[simp]
theorem submoduleMap_apply (p : Submodule R M) (x : p) : ↑(e.submoduleMap p x) = e x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
(e : M ≃ₛₗ[σ₁₂] M₂)
(p : Submodule R M)
(x : ↥p)


theorem nontrivial_of_lt [Preorder α] (x y : α) (h : x < y) : Nontrivial α

{α : Type u_1}
[Preorder α]
(x y : α)
(h : x < y)


theorem hasMellin_add {f g : ℝ → E} {s : ℂ} (hf : MellinConvergent f s)
    (hg : MellinConvergent g s) : HasMellin (fun t => f t + g t) s (mellin f s + mellin g s)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : ℝ → E}
{s : ℂ}
(hf : MellinConvergent f s)
(hg : MellinConvergent g s)


/-- The **extreme value theorem**: if a continuous function `f` is smaller than a value in its range
away from compact sets, then it has a global maximum. -/
theorem Continuous.exists_forall_ge' [ClosedIciTopology α] {f : β → α} (hf : Continuous f)
    (x₀ : β) (h : ∀ᶠ x in cocompact β, f x ≤ f x₀) : ∃ x : β, ∀ y : β, f y ≤ f x

(h : ∀ᶠ (x : β) in Filter.cocompact β, f x ≤ f x₀)


/-- If a continuous map `f` maps `s` to `t`, then it maps `closure s` to `closure t`. -/
protected theorem Set.MapsTo.closure {t : Set Y} (h : MapsTo f s t)
    (hc : Continuous f) : MapsTo f (closure s) (closure t)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
{t : Set Y}
(h : Set.MapsTo f s t)
(hc : Continuous f)


@[simp]
theorem matches'_star (P : RegularExpression α) : P.star.matches' = P.matches'∗

{α : Type u_1}
(P : RegularExpression α)


theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[Filter.atTop.IsCountablyGenerated]
[Filter.atTop.NeBot]
(hτ : MeasureTheory.IsStoppingTime f τ)


/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
    TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
      (EMetric.ball (0 : E) r)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
(hf : HasFPowerSeriesOnBall f p x r)

TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) Filter.atTop (EMetric.ball 0 r)


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

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


/-- We can turn any limit cone over a pair into a bicone. -/
@[simps]
def BinaryBicone.ofLimitCone {X Y : C} {t : Cone (pair X Y)} (ht : IsLimit t) :
    BinaryBicone X Y

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

(CategoryTheory.Limits.BinaryBicone.ofLimitCone ht).pt = t.pt


/-- The functor `ComposableArrows C (n + 1) ⥤ ComposableArrows C n` which forgets
the first arrow. -/
@[simps!]
def δ₀Functor : ComposableArrows C (n + 1) ⥤ ComposableArrows C n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{n : ℕ}

∀ {X Y : CategoryTheory.ComposableArrows C (n + 1)} (f : X ⟶ Y) (X_1 : Fin (n + 1)),
  (CategoryTheory.ComposableArrows.δ₀Functor.map f).app X_1 = f.app X_1.succ


theorem sumFinsuppEquivProdFinsupp_symm_inl {α β γ : Type*} [Zero γ] (fg : (α →₀ γ) × (β →₀ γ))
    (x : α) : (sumFinsuppEquivProdFinsupp.symm fg) (Sum.inl x) = fg.1 x

{α : Type u_13}
{β : Type u_14}
{γ : Type u_15}
[Zero γ]
(fg : (α →₀ γ) × (β →₀ γ))
(x : α)

(Finsupp.sumFinsuppEquivProdFinsupp.symm fg) (Sum.inl x) = fg.1 x


theorem iInf_colon_iSup (ι₁ : Sort*) (f : ι₁ → Submodule R M) (ι₂ : Sort*)
    (g : ι₂ → Submodule R M) : (⨅ i, f i).colon (⨆ j, g j) = ⨅ (i) (j), (f i).colon (g j)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(ι₁ : Sort u_6)
(f : ι₁ → Submodule R M)
(ι₂ : Sort u_7)
(g : ι₂ → Submodule R M)

(⨅ i, f i).colon (⨆ j, g j) = ⨅ i, ⨅ j, (f i).colon (g j)


@[simp]
theorem sInter_singleton (s : Set α) : ⋂₀ {s} = s


theorem IsLeast.mono (ha : IsLeast s a) (hb : IsLeast t b) (hst : s ⊆ t) : b ≤ a

{α : Type u}
[Preorder α]
{s t : Set α}
{a b : α}
(ha : IsLeast s a)
(hb : IsLeast t b)
(hst : s ⊆ t)


@[simp]
theorem mem_basicOpen {U : Opens X} (f : X.presheaf.obj (op U)) (x : U) :
    ↑x ∈ X.basicOpen f ↔ IsUnit (X.presheaf.germ x f)

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}

↑x ∈ X.basicOpen f ↔ IsUnit ((X.presheaf.germ x) f)


theorem inner_conj_symm (x y : F) : ⟪y, x⟫† = ⟪x, y⟫

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


@[to_additive (attr := fun_prop, aesop safe 20 apply (rule_sets := [Measurable]))]
theorem Measurable.mul [MeasurableMul₂ M] (hf : Measurable f) (hg : Measurable g) :
    Measurable fun a => f a * g a

{M : Type u_2}
{α : Type u_3}
[MeasurableSpace M]
[Add M]
{m : MeasurableSpace α}
{f g : α → M}
[MeasurableAdd₂ M]
(hf : Measurable f)
(hg : Measurable g)


/-- Functorially associated to each functor `J ⥤ C`, we have the `C`-presheaf consisting of
cones with a given cone point.
-/
@[simps!]
def cones : (J ⥤ C) ⥤ Cᵒᵖ ⥤ Type max u₁ v₃

(J : Type u₁)
[CategoryTheory.Category.{v₁, u₁} J]
(C : Type u₃)
[CategoryTheory.Category.{v₃, u₃} C]
(F : J ⥤ C)
(X : Cᵒᵖ)

((CategoryTheory.cones J C).obj F).obj X = ((CategoryTheory.Functor.const J).obj (Opposite.unop X) ⟶ F)


/-- The identity is an isometry -/
theorem _root_.isometry_id : Isometry (id : α → α)


{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(φ : MvPowerSeries σ R)


theorem hitting_le_of_mem {m : ι} (hin : n ≤ i) (him : i ≤ m) (his : u i ω ∈ s) :
    hitting u s n m ω ≤ i

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrder ι]
{u : ι → Ω → β}
{s : Set β}
{n i : ι}
{ω : Ω}
{m : ι}
(hin : n ≤ i)
(him : i ≤ m)
(his : u i ω ∈ s)


theorem diff_ae_eq_right (h : AEDisjoint μ s t) : (t \ s : Set α) =ᵐ[μ] t

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : MeasureTheory.AEDisjoint μ s t)


lemma rnDeriv_of_not_haveLebesgueDecomposition (h : ¬ HaveLebesgueDecomposition μ ν) :
    μ.rnDeriv ν = 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(h : ¬μ.HaveLebesgueDecomposition ν)


theorem hasSum_iff (f : α → 𝕜) (c : 𝕜) :
    HasSum f c ↔ HasSum (fun x => re (f x)) (re c) ∧ HasSum (fun x => im (f x)) (im c)

{α : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
(f : α → 𝕜)
(c : 𝕜)

HasSum f c ↔ HasSum (fun x => RCLike.re (f x)) (RCLike.re c) ∧ HasSum (fun x => RCLike.im (f x)) (RCLike.im c)