/-- Avoid in favor of `Nat.factorial_mul_descFactorial` if you can. ℕ-division isn't worth it. -/
theorem descFactorial_eq_div {n k : ℕ} (h : k ≤ n) : n.descFactorial k = n ! / (n - k)!

n.descFactorial k = n.factorial / (n - k).factorial


@[to_additive]
lemma prod_mul_prod_eq_prod_zipWith_mul_prod_drop :
    ∀ l l' : List M,
      l.prod * l'.prod =
        (zipWith (· * ·) l l').prod * (l.drop l'.length).prod * (l'.drop l.length).prod

{M : Type u_4}
[CommMonoid M]
(l l' : List M)

l.prod * l'.prod =
  (List.zipWith (fun x x_1 => x * x_1) l l').prod * (List.drop l'.length l).prod * (List.drop l.length l').prod


theorem isHermitian_add_transpose_self (A : Matrix n n α) : (A + Aᴴ).IsHermitian

{α : Type u_1}
{n : Type u_4}
[AddCommMonoid α]
[StarAddMonoid α]
(A : Matrix n n α)


theorem HasBasis.limsSup_eq_iInf_sSup {ι} {p : ι → Prop} {s} {f : Filter α} (h : f.HasBasis p s) :
    limsSup f = ⨅ (i) (_ : p i), sSup (s i)

{α : Type u_1}
[CompleteLattice α]
{ι : Sort u_6}
{p : ι → Prop}
{s : ι → Set α}
{f : Filter α}
(h : f.HasBasis p s)

f.limsSup = ⨅ i, ⨅ (_ : p i), sSup (s i)


@[simp]
theorem zero_divByMonic (p : R[X]) : 0 /ₘ p = 0


/-- The counit of the equivalence `F.Elementsᵒᵖ ≅ (yoneda, F)` is indeed iso. -/
theorem to_fromCostructuredArrow_eq (F : Cᵒᵖ ⥤ Type v) :
    (fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F = 𝟭 _

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

(CategoryTheory.CategoryOfElements.fromCostructuredArrow F).rightOp.comp
    (CategoryTheory.CategoryOfElements.toCostructuredArrow F) =
  CategoryTheory.Functor.id (CategoryTheory.CostructuredArrow CategoryTheory.yoneda F)


/-- Compose an `EvenHom` with an `AlgHom` on the output. -/
@[simps]
def EvenHom.compr₂ (g : EvenHom Q A) (f : A →ₐ[R] B) : EvenHom Q B

{R : Type uR}
{M : Type uM}
[CommRing R]
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{A : Type uA}
{B : Type uB}
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(g : CliffordAlgebra.EvenHom Q A)
(f : A →ₐ[R] B)

(g.compr₂ f).bilin = g.bilin.compr₂ f.toLinearMap


theorem exists_countable_dense [SeparableSpace α] : ∃ s : Set α, s.Countable ∧ Dense s

(α : Type u)
[t : TopologicalSpace α]
[TopologicalSpace.SeparableSpace α]


theorem isLindelof_range [LindelofSpace X] {f : X → Y} (hf : Continuous f) :
    IsLindelof (range f)

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


/-- The second part of the third cosimplicial identity -/
@[reassoc]
theorem δ_comp_σ_succ {n} {i : Fin (n + 1)} : X.δ i.succ ≫ X.σ i = 𝟙 _

(X : CategoryTheory.CosimplicialObject C)

X.δ i.succ ≫ X.σ i = 𝟙 (X.obj (SimplexCategory.mk n))


@[to_additive]
theorem map_map (f : α →ₙ* β) (g : β →ₙ* γ) (x) : map g (map f x) = map (g.comp f) x

{α : Type u}
{β : Type v}
{γ : Type w}
[Add α]
[Add β]
[Add γ]
(f : AddHom α β)
(g : AddHom β γ)
(x : WithZero α)

(WithZero.map g) ((WithZero.map f) x) = (WithZero.map (g.comp f)) x


theorem nonPrincipals_def {I : Ideal R} : I ∈ nonPrincipals R ↔ ¬I.IsPrincipal

I ∈ nonPrincipals R ↔ ¬Submodule.IsPrincipal I


theorem induced_eq (h : X ≃ₜ Y) : TopologicalSpace.induced h ‹_› = ‹_›

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)

TopologicalSpace.induced (⇑h) inst✝ = inst✝¹


/-- Representable presheaves are (trivially) ind-objects. -/
theorem isIndObject_yoneda (X : C) : IsIndObject (yoneda.obj X)

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


lemma measurableEmbedding_prod_mk_left [MeasurableSingletonClass α] (x : α) :
    MeasurableEmbedding (Prod.mk x : β → α × β)

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSingletonClass α]
(x : α)


/-- If any two objects in a nonempty category are related by `Zigzag`, the category is connected.
-/
theorem zigzag_isConnected [Nonempty J] (h : ∀ j₁ j₂ : J, Zigzag j₁ j₂) : IsConnected J

(h : ∀ (j₁ j₂ : J), CategoryTheory.Zigzag j₁ j₂)


@[simp] theorem sdiff_subset {s t : Finset α} : s \ t ⊆ s

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


@[to_additive (attr := simp)]
theorem mul_inv_cancel_left (a : αˣ) (b : α) : (a : α) * (↑a⁻¹ * b) = b

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


/-- The difference of two `C^n` functions is `C^n`. -/
theorem ContDiff.sub {f g : E → F} (hf : ContDiff 𝕜 n f) (hg : ContDiff 𝕜 n g) :
    ContDiff 𝕜 n fun x => f x - g x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f g : E → F}
(hf : ContDiff 𝕜 n f)
(hg : ContDiff 𝕜 n g)


theorem map_injective (f : V ↪ W) : Function.Injective (SimpleGraph.map f)

{V : Type u_1}
{W : Type u_2}
(f : V ↪ W)


/-- An equivalence `f : α₁ ≃ α₂` generates an equivalence between `Σ a, β (f a)` and `Σ a, β a`. -/
@[simps apply] def sigmaCongrLeft {α₁ α₂ : Type*} {β : α₂ → Sort _} (e : α₁ ≃ α₂) :
    (Σ a : α₁, β (e a)) ≃ Σ a : α₂, β a

{α₁ : Type u_1}
{α₂ : Type u_2}
{β : α₂ → Type u_3}
(e : α₁ ≃ α₂)
(a : (a : α₁) × β (e a))


lemma integrable_right_of_integrable_add_of_nonneg {f g : α → ℝ}
    (h_meas : AEStronglyMeasurable f μ) (hf : 0 ≤ᵐ[μ] f) (hg : 0 ≤ᵐ[μ] g)
    (h_int : Integrable (f + g) μ) : Integrable g μ

(h_meas : MeasureTheory.AEStronglyMeasurable f μ)

(h_int : MeasureTheory.Integrable (f + g) μ)


@[reassoc (attr := simp)]
theorem map_hom_inv_id_app {X Y : C} (e : X ≅ Y) (F : C ⥤ D ⥤ E) (Z : D) :
    (F.map e.hom).app Z ≫ (F.map e.inv).app Z = 𝟙 _

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

CategoryTheory.CategoryStruct.comp ((F.map e.hom).app Z) ((F.map e.inv).app Z) =
  CategoryTheory.CategoryStruct.id ((F.obj X).obj Z)


theorem ext_iff {s₁ s₂ : String} : s₁ = s₂ ↔ s₁.data = s₂.data


/-- If `f : α → α` is a morphism of complete lattices, then the liminf of its iterates of any
`a : α` is a fixed point. -/
theorem _root_.CompleteLatticeHom.apply_liminf_iterate (f : CompleteLatticeHom α α) (a : α) :
    f (liminf (fun n => f^[n] a) atTop) = liminf (fun n => f^[n] a) atTop

{α : Type u_1}
[CompleteLattice α]
(f : CompleteLatticeHom α α)
(a : α)

f (Filter.liminf (fun n => (⇑f)^[n] a) Filter.atTop) = Filter.liminf (fun n => (⇑f)^[n] a) Filter.atTop


theorem vAdd_width_periodic (N : ℕ) (k n : ℤ) (f : SlashInvariantForm (Gamma N) k) (z : ℍ) :
    f (((N * n) : ℝ) +ᵥ z) = f z

(f : SlashInvariantForm (CongruenceSubgroup.Gamma N) k)


private theorem sup_aux (f g : E →ₗ.[R] F)
    (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) :
    ∃ fg : ↥(f.domain ⊔ g.domain) →ₗ[R] F,
      ∀ (x : f.domain) (y : g.domain) (z : ↥(f.domain ⊔ g.domain)),
        (x : E) + y = ↑z → fg z = f x + g y

(h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y)

∃ fg, ∀ (x : ↥f.domain) (y : ↥g.domain) (z : ↥(f.domain ⊔ g.domain)), ↑x + ↑y = ↑z → fg z = ↑f x + ↑g y


/-- The **Cayley-Hamilton Theorem**, that the characteristic polynomial of a matrix,
applied to the matrix itself, is zero.

This holds over any commutative ring.

See `LinearMap.aeval_self_charpoly` for the equivalent statement about endomorphisms.
-/
theorem aeval_self_charpoly (M : Matrix n n R) : aeval M M.charpoly = 0

{R : Type u_1}
[CommRing R]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)


/-- The augmented Čech nerve construction, as a functor from `Arrow C`. -/
@[simps!]
def augmentedCechNerve : Arrow C ⥤ SimplicialObject.Augmented C

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

(CategoryTheory.SimplicialObject.augmentedCechNerve.obj f).hom.app i =
  CategoryTheory.Limits.WidePullback.base fun x => f.hom


/-- An increasing function is injective -/
theorem RelHom.injective_of_increasing [IsTrichotomous α r] [IsIrrefl β s] (f : r →r s) :
    Injective f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[IsTrichotomous α r]
[IsIrrefl β s]
(f : r →r s)


/-- The image under an antitone function of a set which is bounded above is bounded below. -/
theorem map_bddAbove (Hf : AntitoneOn f t) (Hst : s ⊆ t) :
    (upperBounds s ∩ t).Nonempty → BddBelow (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s t : Set α}
(Hf : AntitoneOn f t)
(Hst : s ⊆ t)


theorem contDiffAt_inv {x : 𝕜'} (hx : x ≠ 0) {n} : ContDiffAt 𝕜 n Inv.inv x

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_4}
[NormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[CompleteSpace 𝕜']
{x : 𝕜'}
(hx : x ≠ 0)
{n : ℕ∞}


@[simp, norm_cast]
theorem coe_inj : (I : Set (ι → ℝ)) = J ↔ I = J

{ι : Type u_1}
{I J : BoxIntegral.Box ι}


theorem closure_image_mem_nhds {s : Set α} {a : α} (di : DenseInducing i) (hs : s ∈ 𝓝 a) :
    closure (i '' s) ∈ 𝓝 (i a)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
{s : Set α}
{a : α}
(di : DenseInducing i)
(hs : s ∈ 𝓝 a)


theorem isInt_sub {α} [Ring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℤ},
    f = HSub.hSub → IsInt a a' → IsInt b b' → Int.sub a' b' = c → IsInt (f a b) c

{α : Type u_1}
[Ring α]
{f : α → α → α}
{a b : α}
{a' b' c : ℤ}

f = HSub.hSub →
  Mathlib.Meta.NormNum.IsInt a a' →
    Mathlib.Meta.NormNum.IsInt b b' → a'.sub b' = c → Mathlib.Meta.NormNum.IsInt (f a b) c


protected theorem oldMapIdxCore_append : ∀ (f : ℕ → α → β) (n : ℕ) (l₁ l₂ : List α),
    List.oldMapIdxCore f n (l₁ ++ l₂) =
    List.oldMapIdxCore f n l₁ ++ List.oldMapIdxCore f (n + l₁.length) l₂

{α : Type u}
{β : Type v}
(f : ℕ → α → β)
(n : ℕ)
(l₁ l₂ : List α)


theorem MeasurableSet.eventuallyMeasurableSet (hs : MeasurableSet s) :
    EventuallyMeasurableSet m l s

{α : Type u_1}
{m : MeasurableSpace α}
{l : Filter α}
[CountableInterFilter l]
{s : Set α}
(hs : MeasurableSet s)


@[to_additive]
theorem HasProd.update (hf : HasProd f a₁) (b : β) [DecidableEq β] (a : α) :
    HasProd (update f b a) (a / f b * a₁)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
{a₁ : α}
(hf : HasSum f a₁)
(b : β)
[DecidableEq β]
(a : α)

HasSum (Function.update f b a) (a - f b + a₁)


@[simp] protected lemma inv_zero : (0 : Finset α)⁻¹ = 0

{α : Type u_2}
[GroupWithZero α]
[DecidableEq α]


@[simp]
theorem mapEquiv_symm : (mapEquiv f e).symm = mapEquiv f e.symm

(f : Type u₀ → Type u₁)
[EquivFunctor f]
{α β : Type u₀}
(e : α ≃ β)

(EquivFunctor.mapEquiv f e).symm = EquivFunctor.mapEquiv f e.symm


@[simp]
theorem symm_dual_id : sSupHom.dual.symm (sInfHom.id _) = sSupHom.id α

sSupHom.dual.symm (sInfHom.id αᵒᵈ) = sSupHom.id α


theorem inf_strictMonoOn_Icc_sup {a b : α} : StrictMonoOn (fun c => a ⊓ c) (Icc b (a ⊔ b))

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

StrictMonoOn (fun c => a ⊓ c) (Set.Icc b (a ⊔ b))


/-- The counit isomorphism of `equivalence`. -/
@[simps!]
def equivalenceCounitIso : G ⋙ F ⋙ eB.inverse ≅ 𝟭 B

{A : Type u_1}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_3} B]
[CategoryTheory.Category.{u_7, u_4} B']
{eB : B ≌ B'}
{F : A ⥤ B'}
{G : B ⥤ A}
(η : G ⋙ F ≅ eB.functor)
(X : B)

(AlgebraicTopology.DoldKan.Compatibility.equivalenceCounitIso η).inv.app X =
  eB.unitIso.hom.app X ≫ eB.inverse.map (η.inv.app X)


theorem derivWithin_ccosh (hf : DifferentiableWithinAt ℂ f s x) (hxs : UniqueDiffWithinAt ℂ s x) :
    derivWithin (fun x => Complex.cosh (f x)) s x = Complex.sinh (f x) * derivWithin f s x

{f : ℂ → ℂ}
{x : ℂ}
{s : Set ℂ}
(hf : DifferentiableWithinAt ℂ f s x)
(hxs : UniqueDiffWithinAt ℂ s x)


private theorem mul_comm' (a b : Cardinal.{u}) : a * b = b * a


/-- Given `c = lineMap a b r`, `a < c < b`, the point `(c, f c)` is strictly above the
segment `[(a, f a), (b, f b)]` if and only if `slope f c b < slope f a c`. -/
theorem lineMap_lt_map_iff_slope_lt_slope (hab : a < b) (h₀ : 0 < r) (h₁ : r < 1) :
    lineMap (f a) (f b) r < f c ↔ slope f c b < slope f a c

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

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


@[simp]
theorem comp_f {A A' A'' : Algebra T} (f : A ⟶ A') (g : A' ⟶ A'') : (f ≫ g).f = f.f ≫ g.f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Monad C}
{A A' A'' : T.Algebra}
(f : A ⟶ A')
(g : A' ⟶ A'')

(CategoryTheory.CategoryStruct.comp f g).f = CategoryTheory.CategoryStruct.comp f.f g.f


theorem card_Iic : (Iic f).card = ∏ i ∈ f.support, (Iic (f i)).card

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
[LocallyFiniteOrder α]
(f : ι →₀ α)

(Finset.Iic f).card = ∏ i ∈ f.support, (Finset.Iic (f i)).card


theorem IsExtrOn.lineDeriv_eq_zero (h : IsExtrOn f s a) (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) :
    lineDeriv ℝ f a b = 0

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
{f : E → ℝ}
{s : Set E}
{a b : E}
(h : IsExtrOn f s a)
(h' : ∀ᶠ (t : ℝ) in 𝓝 0, a + t • b ∈ s)


/-- A Dynkin system is a collection of subsets of a type `α` that contains the empty set,
  is closed under complementation and under countable union of pairwise disjoint sets.
  The disjointness condition is the only difference with `σ`-algebras.

  The main purpose of Dynkin systems is to provide a powerful induction rule for σ-algebras
  generated by a collection of sets which is stable under intersection.

  A Dynkin system is also known as a "λ-system" or a "d-system".
-/
structure DynkinSystem (α : Type*) where
  /-- Predicate saying that a given set is contained in the Dynkin system. -/
  Has : Set α → Prop
  /-- A Dynkin system contains the empty set. -/
  has_empty : Has ∅
  /-- A Dynkin system is closed under complementation. -/
  has_compl : ∀ {a}, Has a → Has aᶜ
  /-- A Dynkin system is closed under countable union of pairwise disjoint sets. Use a more general
  `MeasurableSpace.DynkinSystem.has_iUnion` instead. -/
  has_iUnion_nat : ∀ {f : ℕ → Set α}, Pairwise (Disjoint on f) → (∀ i, Has (f i)) → Has (⋃ i, f i)

{α : Type u_2}
(self : MeasurableSpace.DynkinSystem α)
{a : Set α}


@[simp]
theorem size_shiftLeft' {b m n} (h : shiftLeft' b m n ≠ 0) :
    size (shiftLeft' b m n) = size m + n

{b : Bool}
{m n : ℕ}
(h : Nat.shiftLeft' b m n ≠ 0)

(Nat.shiftLeft' b m n).size = m.size + n


@[simp]
lemma XXIsoOfEq_rfl (i₁ : I₁) (i₂ : I₂) :
    K.XXIsoOfEq (rfl : i₁ = i₁) (rfl : i₂ = i₂) = Iso.refl _

HomologicalComplex₂.XXIsoOfEq C c₁ c₂ K ⋯ ⋯ = CategoryTheory.Iso.refl ((K.X i₁).X i₂)


@[reassoc (attr := simp)] lemma L₁_f_φ₁ : S.L₀'.f ≫ S.φ₁ = S.v₁₂.τ₁

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.CategoryStruct.comp S.L₀'.f S.φ₁ = S.v₁₂.τ₁


/-- A map `f : α → β` between uniform spaces is a *uniform embedding* if it is uniform inducing and
injective. If `α` is a separated space, then the latter assumption follows from the former. -/
@[mk_iff]
structure UniformEmbedding (f : α → β) extends UniformInducing f : Prop where
  /-- A uniform embedding is injective. -/
  inj : Function.Injective f

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
(f : α → β)

UniformEmbedding f ↔ UniformInducing f ∧ Function.Injective f


@[simp]
theorem map_hom_map_inv_apply (f : X ≅ Y) (y : F.obj Y) : F.map f.hom (F.map f.inv y) = y

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : CategoryTheory.Functor C (Type w))
{X Y : C}
(f : X ≅ Y)
(y : F.obj Y)


theorem exists_Icc_mem_subset_of_mem_nhds [OrderTopology α] {a : α} {s : Set α} (hs : s ∈ 𝓝 a) :
    ∃ b c, a ∈ Icc b c ∧ Icc b c ∈ 𝓝 a ∧ Icc b c ⊆ s

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a : α}
{s : Set α}
(hs : s ∈ 𝓝 a)

∃ b c, a ∈ Set.Icc b c ∧ Set.Icc b c ∈ 𝓝 a ∧ Set.Icc b c ⊆ s


/-- The equivalence `Karoubi C ≌ Karoubi (Karoubi C)` -/
@[simps]
def equivalence : Karoubi C ≌ Karoubi (Karoubi C)

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]

(CategoryTheory.Idempotents.KaroubiKaroubi.equivalence C).counitIso =
  CategoryTheory.Idempotents.KaroubiKaroubi.counitIso C


@[simp] theorem true_implies (p : Prop) : (True → p) = p


/-- Flipping a square by switching the top-right and the bottom-left objects. -/
@[simps]
def flip (sq : Square C) : Square C

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


@[simp]
theorem typein_le_typein (r : α → α → Prop) [IsWellOrder α r] {x x' : α} :
    typein r x ≤ typein r x' ↔ ¬r x' x

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
{x x' : α}

Ordinal.typein r x ≤ Ordinal.typein r x' ↔ ¬r x' x


/-- Boxes form a π-system. -/
theorem isPiSystem_pi [∀ i, MeasurableSpace (α i)] :
    IsPiSystem (pi univ '' pi univ fun i => { s : Set (α i) | MeasurableSet s })

{ι : Type u_1}
{α : ι → Type u_3}
[(i : ι) → MeasurableSpace (α i)]

IsPiSystem (Set.univ.pi '' Set.univ.pi fun i => {s | MeasurableSet s})


lemma Ψ_odd (m : ℕ) : W.Ψ (2 * (m + 2) + 1) =
    W.Ψ (m + 4) * W.Ψ (m + 2) ^ 3 - W.Ψ (m + 1) * W.Ψ (m + 3) ^ 3 +
      W.toAffine.polynomial * (16 * W.toAffine.polynomial - 8 * W.ψ₂ ^ 2) * C
        (if Even m then W.preΨ' (m + 4) * W.preΨ' (m + 2) ^ 3
          else -W.preΨ' (m + 1) * W.preΨ' (m + 3) ^ 3)

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

W.Ψ (2 * (↑m + 2) + 1) =
  W.Ψ (↑m + 4) * W.Ψ (↑m + 2) ^ 3 - W.Ψ (↑m + 1) * W.Ψ (↑m + 3) ^ 3 +
    W.toAffine.polynomial * (16 * W.toAffine.polynomial - 8 * W.ψ₂ ^ 2) *
      Polynomial.C (if Even m then W.preΨ' (m + 4) * W.preΨ' (m + 2) ^ 3 else -W.preΨ' (m + 1) * W.preΨ' (m + 3) ^ 3)


@[to_additive (attr := simp,norm_cast)]
theorem coe_div (s t : LowerSet α) : (↑(s / t) : Set α) = s / t

{α : Type u_1}
[OrderedAddCommGroup α]
(s t : LowerSet α)


theorem convexHull_toCone_isLeast (s : Set E) :
    IsLeast { t : ConvexCone 𝕜 E | s ⊆ t } ((convex_convexHull 𝕜 s).toCone _)

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(s : Set E)

IsLeast {t | s ⊆ ↑t} (Convex.toCone ((convexHull 𝕜) s) ⋯)


@[simp] theorem coe_natAdd (n : Nat) {m : Nat} (i : Fin m) : (natAdd n i : Nat) = n + i


theorem chainHeight_le_chainHeight_TFAE (s : Set α) (t : Set β) :
    TFAE [s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l = length l',
      ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l']

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]
(s : Set α)
(t : Set β)

[s.chainHeight ≤ t.chainHeight, ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, l.length = l'.length,
    ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, l.length ≤ l'.length].TFAE


theorem le_of_mono {n m : ℕ} {f : ([n] : SimplexCategory) ⟶ [m]} : CategoryTheory.Mono f → n ≤ m

{f : SimplexCategory.mk n ⟶ SimplexCategory.mk m}


@[simp]
lemma map_homOfLE (f : X ⟶ Y) {U V : Opens Y} (e : U ≤ V) :
    (TopologicalSpace.Opens.map f).map (homOfLE e) =
      homOfLE (show (Opens.map f).obj U ≤ (Opens.map f).obj V from fun _ hx ↦ e hx)

{X Y : TopCat}
(f : X ⟶ Y)
{U V : TopologicalSpace.Opens ↑Y}
(e : U ≤ V)

(TopologicalSpace.Opens.map f).map (CategoryTheory.homOfLE e) = CategoryTheory.homOfLE ⋯


@[simp]
lemma cyclesMap'_neg :
    cyclesMap' (-φ) h₁ h₂ = -cyclesMap' φ h₁ h₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ : S₁ ⟶ S₂}
(h₁ : S₁.LeftHomologyData)
(h₂ : S₂.LeftHomologyData)

CategoryTheory.ShortComplex.cyclesMap' (-φ) h₁ h₂ = -CategoryTheory.ShortComplex.cyclesMap' φ h₁ h₂


theorem unbounded_principal (op : Ordinal → Ordinal → Ordinal) :
    Set.Unbounded (· < ·) { o | Principal op o }

(op : Ordinal.{u_1} → Ordinal.{u_1} → Ordinal.{u_1})

Set.Unbounded (fun x x_1 => x < x_1) {o | Ordinal.Principal op o}


/-- Specialization of `Finset.prod_nbij'` that automatically fills in most arguments.

See `Fintype.prod_equiv` for the version where `s` and `t` are `univ`. -/
@[to_additive "`Specialization of `Finset.sum_nbij'` that automatically fills in most arguments.

See `Fintype.sum_equiv` for the version where `s` and `t` are `univ`."]
lemma prod_equiv (e : ι ≃ κ) (hst : ∀ i, i ∈ s ↔ e i ∈ t) (hfg : ∀ i ∈ s, f i = g (e i)) :
    ∏ i ∈ s, f i = ∏ i ∈ t, g i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[AddCommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(e : ι ≃ κ)
(hst : ∀ (i : ι), i ∈ s ↔ e i ∈ t)
(hfg : ∀ i ∈ s, f i = g (e i))


theorem filter_eq_self {s} : filter p s = s ↔ ∀ a ∈ s, p a

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s : Multiset α}


@[simp] theorem not_beq_self : ∀ (x : Bool), ((!x) == x) = false


@[simp] theorem sizeOf_getElem [SizeOf α] (as : Array α) (i : Nat) (h : i < as.size) :
  sizeOf (as[i]'h) < sizeOf as

{α : Type u_1}
[SizeOf α]
(as : Array α)
(i : Nat)
(h : i < as.size)


@[to_additive (attr := simp)]
theorem OneHom.coe_mk [One M] [One N] (f : M → N) (h1) : (OneHom.mk f h1 : M → N) = f

{M : Type u_4}
{N : Type u_5}
[Zero M]
[Zero N]
(f : M → N)
(h1 : f 0 = 0)


theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
    (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 ξ) (hbdd : ∀ n ω, ξ n ω ≤ R)
    (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
    Submartingale (fun n => ∑ k ∈ Finset.range n, ξ k * (f (k + 1) - f k)) 𝒢 μ

{ξ f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f 𝒢 μ)

(hnonneg : ∀ (n : ℕ) (ω : Ω), 0 ≤ ξ n ω)

MeasureTheory.Submartingale (fun n => ∑ k ∈ Finset.range n, ξ k * (f (k + 1) - f k)) 𝒢 μ


theorem abs_le_sqrt (h : x ^ 2 ≤ y) : |x| ≤ √y


theorem get : ∀ {s}, ValidFor l (m₁ ++ c :: m₂) r s → s.get ⟨utf8Len m₁⟩ = c

{l m₁ : List Char}
{c : Char}
{m₂ r : List Char}
{s : Substring}

Substring.ValidFor l (m₁ ++ c :: m₂) r s → s.get { byteIdx := String.utf8Len m₁ } = c


@[to_additive (attr := simp)]
theorem snd_swap (x : M ∗ N) : snd (swap M N x) = fst x

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
(x : Monoid.Coprod M N)

Monoid.Coprod.snd ((Monoid.Coprod.swap M N) x) = Monoid.Coprod.fst x


/-- The map `lcRow0` is proper, that is, preimages of cocompact sets are finite in
`[[* , *], [c, d]]`. -/
theorem tendsto_lcRow0 {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) :
    Tendsto (fun g : { g : SL(2, ℤ) // (↑ₘg) 1 = cd } => lcRow0 cd ↑(↑g : SL(2, ℝ))) cofinite
      (cocompact ℝ)

Filter.Tendsto (fun g => (ModularGroup.lcRow0 cd) ↑((Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) ↑g))
  Filter.cofinite (Filter.cocompact ℝ)


@[reassoc]
lemma restrictScalarsId'App_inv_naturality {M N : ModuleCat R} (φ : M ⟶ N) :
    φ ≫ (restrictScalarsId'App f hf N).inv =
      (restrictScalarsId'App f hf M).inv ≫ (restrictScalars f).map φ

{R : Type u₁}
[Ring R]
(f : R →+* R)
(hf : f = RingHom.id R)
{M N : ModuleCat R}
(φ : M ⟶ N)

φ ≫ (ModuleCat.restrictScalarsId'App f hf N).inv =
  (ModuleCat.restrictScalarsId'App f hf M).inv ≫ (ModuleCat.restrictScalars f).map φ


@[simp]
theorem realize_noTopOrder [h : NoTopOrder M] : M ⊨ Language.order.noTopOrderSentence


@[simp, reassoc]
lemma iso_hom_app (a : A) (X : C) :
    (commShiftOfLocalization.iso L W F F' a).hom.app (L.obj X) =
      F'.map ((L.commShiftIso a).inv.app X) ≫
      (Lifting.iso L W F F').hom.app (X⟦a⟧) ≫
        (F.commShiftIso a).hom.app X ≫
          (shiftFunctor E a).map ((Lifting.iso L W F F').inv.app X)

[CategoryTheory.Localization.Lifting L W F F']

(CategoryTheory.Functor.commShiftOfLocalization.iso L W F F' a).hom.app (L.obj X) =
  CategoryTheory.CategoryStruct.comp (F'.map ((L.commShiftIso a).inv.app X))
    (CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.Localization.Lifting.iso L W F F').hom.app ((CategoryTheory.shiftFunctor C a).obj X))
      (CategoryTheory.CategoryStruct.comp ((F.commShiftIso a).hom.app X)
        ((CategoryTheory.shiftFunctor E a).map ((CategoryTheory.Localization.Lifting.iso L W F F').inv.app X))))


theorem iterateFrobeniusEquiv_add : iterateFrobeniusEquiv R p (m + n) =
    (iterateFrobeniusEquiv R p n).trans (iterateFrobeniusEquiv R p m)

(R : Type u_1)
(p m n : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]


@[simp, norm_cast]
theorem val_neg (x : p) : ((-x : p) : M) = -x

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : SubMulAction R M)
(x : ↥p)


theorem l_top [Preorder α] [PartialOrder β] [OrderTop α] [OrderTop β]
    (gi : GaloisInsertion l u) : l ⊤ = ⊤

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[PartialOrder β]
[OrderTop α]
[OrderTop β]
(gi : GaloisInsertion l u)


theorem lt_or_equiv_or_gf (x y : PGame) : x < y ∨ (x ≈ y) ∨ y ⧏ x


@[to_additive]
theorem tendsto_norm_nhdsWithin_one : Tendsto (norm : E → ℝ) (𝓝[≠] 1) (𝓝[>] 0)


theorem trimmed (μ : Measure α) : μ.toOuterMeasure.trim = μ.toOuterMeasure

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


theorem HasDerivWithinAt.const_mul (c : 𝔸) (hd : HasDerivWithinAt d d' s x) :
    HasDerivWithinAt (fun y => c * d y) (c * d') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{d : 𝕜 → 𝔸}
{d' : 𝔸}
(c : 𝔸)
(hd : HasDerivWithinAt d d' s x)


theorem max_ack_left (m₁ m₂ n : ℕ) : ack (max m₁ m₂) n = max (ack m₁ n) (ack m₂ n)


/-- The equivalence between Boolean rings and Boolean algebras. This is actually an isomorphism. -/
@[simps functor inverse]
def boolRingCatEquivBoolAlg : BoolRing ≌ BoolAlg

boolRingCatEquivBoolAlg.inverse = CategoryTheory.forget₂ BoolAlg BoolRing


@[simp]
theorem logb_inv (x : ℝ) : logb b x⁻¹ = -logb b x


@[simp] lemma symmDiff_nonempty : (s ∆ t).Nonempty ↔ s ≠ t

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


/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePushout f.left (fun x => f.right) fun x => f.hom]

(X : CategoryTheory.CosimplicialObject.Augmented C)

(G : F ⟶ CategoryTheory.CosimplicialObject.Augmented.toArrow.obj X)

(CategoryTheory.CosimplicialObject.equivalenceRightToLeft F X G).left = G.left


theorem convex_halfspace_gt {f : E → β} (h : IsLinearMap 𝕜 f) (r : β) : Convex 𝕜 { w | r < f w }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[OrderedCancelAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
(h : IsLinearMap 𝕜 f)
(r : β)


@[to_additive (attr := norm_cast, simp)]
theorem orderOf_submonoid {H : Submonoid G} (y : H) : orderOf (y : G) = orderOf y

{G : Type u_1}
[AddMonoid G]
{H : AddSubmonoid G}
(y : ↥H)


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

(B : Type u₁)
[CategoryTheory.Bicategory B]
(C : Type u₂)
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)
(a : B)

(CategoryTheory.CategoryStruct.id F).app a = CategoryTheory.CategoryStruct.id (F.obj a)


theorem eventually_right_inverse' {x} (hx : x ∈ e.source) :
    ∀ᶠ y in 𝓝 (e x), e (e.symm y) = y

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

∀ᶠ (y : Y) in 𝓝 (↑e x), ↑e (↑e.symm y) = y


/-- If `M` is a finite module such that `Mₚ = 0` for some `p`,
then `M[1/f] = 0` for some `p ∈ D(f)`. -/
lemma LocalizedModule.exists_subsingleton_away [Module.Finite R M] (p : Ideal R) [p.IsPrime]
    [Subsingleton (LocalizedModule p.primeCompl M)] :
    ∃ f ∉ p, Subsingleton (LocalizedModule (.powers f) M)

∃ f ∉ p, Subsingleton (LocalizedModule (Submonoid.powers f) M)


theorem Matrix.toLinearMapRight'_mul_apply [Fintype l] [DecidableEq l] (M : Matrix l m R)
    (N : Matrix m n R) (x) :
    Matrix.toLinearMapRight' (M * N) x =
      Matrix.toLinearMapRight' N (Matrix.toLinearMapRight' M x)

{R : Type u_1}
[Semiring R]
{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
[Fintype m]
[DecidableEq m]
[Fintype l]
[DecidableEq l]
(M : Matrix l m R)
(N : Matrix m n R)
(x : l → R)

(Matrix.toLinearMapRight' (M * N)) x = (Matrix.toLinearMapRight' N) ((Matrix.toLinearMapRight' M) x)


@[simp]
theorem eval₂_add : (p + q).eval₂ f x = p.eval₂ f x + q.eval₂ f x

{R : Type u}
{S : Type v}
[Semiring R]
{p q : R[X]}
[Semiring S]
(f : R →+* S)
(x : S)

Polynomial.eval₂ f x (p + q) = Polynomial.eval₂ f x p + Polynomial.eval₂ f x q


/-- Multiplication `y ↦ y * x` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Addition `y ↦ y + x` as an `IsometryEquiv`."]
def mulRight [IsometricSMul Gᵐᵒᵖ G] (c : G) : G ≃ᵢ G

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd Gᵃᵒᵖ G]
(c x : G)


theorem ae_eq_mk (hf : AEFinStronglyMeasurable f μ) : f =ᵐ[μ] hf.mk f

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

f =ᵐ[μ] MeasureTheory.AEFinStronglyMeasurable.mk f hf


/-- Given `u : α → β` a uniform inducing map, a family `𝓕 : ι → X → α` is equicontinuous on a
subset `S : Set X` iff the family `𝓕'`, obtained by composing each function of `𝓕` by `u`, is
equicontinuous on `S`. -/
theorem UniformInducing.equicontinuousOn_iff {F : ι → X → α} {S : Set X} {u : α → β}
    (hu : UniformInducing u) : EquicontinuousOn F S ↔ EquicontinuousOn ((u ∘ ·) ∘ F) S

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
{β : Type u_9}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → X → α}
{S : Set X}
{u : α → β}
(hu : UniformInducing u)

EquicontinuousOn F S ↔ EquicontinuousOn ((fun x => u ∘ x) ∘ F) S


@[to_additive (attr := simp)]
theorem coe_zpow (s : Finset α) : ∀ n : ℤ, ↑(s ^ n) = (s : Set α) ^ n

{α : Type u_2}
[DecidableEq α]
[DivisionMonoid α]
(s : Finset α)
(n : ℤ)


/-- Assumes right covariance.
The lemma assuming left covariance is `Left.mul_lt_one_of_le_of_lt`. -/
@[to_additive Right.add_neg_of_nonpos_of_neg
      "Assumes right covariance.
      The lemma assuming left covariance is `Left.add_neg_of_nonpos_of_neg`."]
theorem Right.mul_lt_one_of_le_of_lt [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b : α}
    (ha : a ≤ 1) (hb : b < 1) :
    a * b < 1

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


@[simp]
theorem not_isEmpty_of_nonempty [h : Nonempty α] : ¬IsEmpty α


theorem Icc_subset_Ico_right (h : b₁ < b₂) : Icc a b₁ ⊆ Ico a b₂

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


/-- Uniformizers exist in a DVR. -/
theorem exists_irreducible : ∃ ϖ : R, Irreducible ϖ

(R : Type u)
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]


@[simp (low)]
theorem zero_tensor {W X Y Z : C} (f : Y ⟶ Z) : (0 : W ⟶ X) ⊗ f = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalPreadditive C]
{W X Y Z : C}
(f : Y ⟶ Z)

CategoryTheory.MonoidalCategory.tensorHom 0 f = 0


theorem exists_familyOfElements (hx : Compatible P π x) :
    ∃ (x' : FamilyOfElements P (ofArrows X π)), ∀ (i : I), x' _ (ofArrows.mk i) = x i

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

{x : (i : I) → P.obj (Opposite.op (X i))}

(hx : CategoryTheory.Presieve.Arrows.Compatible P π x)


theorem binary_relation_sSup_iff {α β : Type*} (s : Set (α → β → Prop)) {a : α} {b : β} :
    sSup s a b ↔ ∃ r : α → β → Prop, r ∈ s ∧ r a b

{α : Type u_9}
{β : Type u_10}
(s : Set (α → β → Prop))
{a : α}
{b : β}


@[simp] theorem unop_reverseOp (x : CliffordAlgebra Q) : (reverseOp x).unop = reverse x

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

MulOpposite.unop (CliffordAlgebra.reverseOp x) = CliffordAlgebra.reverse x


/-- A product of a function over a `Finset` in a subtype equals a
product in the main type of a function that agrees with the first
function on that `Finset`. -/
@[to_additive "A sum of a function over a `Finset` in a subtype equals a
sum in the main type of a function that agrees with the first
function on that `Finset`."]
theorem prod_subtype_map_embedding {p : α → Prop} {s : Finset { x // p x }} {f : { x // p x } → β}
    {g : α → β} (h : ∀ x : { x // p x }, x ∈ s → g x = f x) :
    (∏ x ∈ s.map (Function.Embedding.subtype _), g x) = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{p : α → Prop}
{s : Finset { x // p x }}
{f : { x // p x } → β}
{g : α → β}
(h : ∀ x ∈ s, g ↑x = f x)

∑ x ∈ Finset.map (Function.Embedding.subtype fun x => p x) s, g x = ∑ x ∈ s, f x


protected theorem MemBaseSet.filter (hπ : l.MemBaseSet I c r π) (p : Box ι → Prop) :
    l.MemBaseSet I c r (π.filter p)

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
{c : ℝ≥0}
{r : (ι → ℝ) → ↑(Set.Ioi 0)}
{π : BoxIntegral.TaggedPrepartition I}
{l : BoxIntegral.IntegrationParams}
(hπ : l.MemBaseSet I c r π)
(p : BoxIntegral.Box ι → Prop)


theorem erase_insert_of_ne {a b : α} {s : Finset α} (h : a ≠ b) :
    erase (insert a s) b = insert a (erase s b)

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

(insert a s).erase b = insert a (s.erase b)


/-- We can assume that a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` has positive `c`. -/
theorem neg_of_minimal {a b c : ℤ} : Minimal a b c → Minimal a b (-c)

Fermat42.Minimal a b c → Fermat42.Minimal a b (-c)


/-- `MultilinearMap.domDomCongr` as an equivalence.

This is declared separately because it does not work with dot notation. -/
@[simps apply symm_apply]
def domDomCongrEquiv (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃+ MultilinearMap R (fun _ : ι₂ => M₂) M₃

{R : Type uR}
{M₂ : Type v₂}
{M₃ : Type v₃}
[Semiring R]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M₂]
[Module R M₃]
{ι₁ : Type u_1}
{ι₂ : Type u_2}
(σ : ι₁ ≃ ι₂)
(m : MultilinearMap R (fun x => M₂) M₃)

(MultilinearMap.domDomCongrEquiv σ) m = MultilinearMap.domDomCongr σ m


/-- The functor `(L, R) ⥤ (L ⋙ F, R ⋙ F)` -/
@[simps]
def post (L : A ⥤ T) (R : B ⥤ T) (F : T ⥤ C) : Comma L R ⥤ Comma (L ⋙ F) (R ⋙ F)

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

((CategoryTheory.Comma.post L R F).obj X).right = X.right


lemma isConjExponent_iff_eq_conjExponent (h : 1 < p) : p.IsConjExponent q ↔ q = p / (p - 1)


theorem frequently_inf_principal {f : Filter α} {s : Set α} {p : α → Prop} :
    (∃ᶠ x in f ⊓ 𝓟 s, p x) ↔ ∃ᶠ x in f, x ∈ s ∧ p x

{α : Type u}
{f : Filter α}
{s : Set α}
{p : α → Prop}

(∃ᶠ (x : α) in f ⊓ 𝓟 s, p x) ↔ ∃ᶠ (x : α) in f, x ∈ s ∧ p x


/-- Let `G` be a complete nonarchimedean multiplicative abelian group, and let `f : α → G` be a
function that tends to one on the filter of cofinite sets. Then `f` is unconditionally
multipliable. -/
@[to_additive "Let `G` be a complete nonarchimedean additive abelian group, and let `f : α → G` be a
function that tends to zero on the filter of cofinite sets. Then `f` is unconditionally summable."]
theorem multipliable_of_tendsto_cofinite_one [CompleteSpace G] {f : α → G}
    (hf : Tendsto f cofinite (𝓝 1)) : Multipliable f

(hf : Filter.Tendsto f Filter.cofinite (𝓝 0))


/-- Morphism of smooth monoids. -/
@[to_additive]
structure SmoothMonoidMorphism (I : ModelWithCorners 𝕜 E H) (I' : ModelWithCorners 𝕜 E' H')
    (G : Type*) [TopologicalSpace G] [ChartedSpace H G] [Monoid G] [SmoothMul I G] (G' : Type*)
    [TopologicalSpace G'] [ChartedSpace H' G'] [Monoid G'] [SmoothMul I' G'] extends
    G →* G' where
  smooth_toFun : Smooth I I' toFun

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H' : Type u_5}
[TopologicalSpace H']
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{G : Type u_8}
[TopologicalSpace G]
[ChartedSpace H G]
[Monoid G]
[SmoothMul I G]
{G' : Type u_9}
[TopologicalSpace G']
[ChartedSpace H' G']
[Monoid G']
[SmoothMul I' G']
(self : SmoothMonoidMorphism I I' G G')


theorem _root_.one_memℓp_infty : Memℓp (1 : ∀ i, B i) ∞

{I : Type u_3}
{B : I → Type u_4}
[(i : I) → NormedRing (B i)]
[∀ (i : I), NormOneClass (B i)]


@[simp]
theorem prodProdProdComm_symm :
    (prodProdProdComm R M M₂ M₃ M₄).symm = prodProdProdComm R M M₃ M₂ M₄

(R : Type u)
(M : Type v)
(M₂ : Type w)
(M₃ : Type y)
(M₄ : Type z)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[AddCommMonoid M₄]
[Module R M]
[Module R M₂]
[Module R M₃]
[Module R M₄]

(LinearEquiv.prodProdProdComm R M M₂ M₃ M₄).symm = LinearEquiv.prodProdProdComm R M M₃ M₂ M₄


theorem auxEquiv_mul (x y : 𝒜 ᵍ⊗[R] ℬ) :
    auxEquiv R 𝒜 ℬ (x * y) = gradedMul R (𝒜 ·) (ℬ ·) (auxEquiv R 𝒜 ℬ x) (auxEquiv R 𝒜 ℬ y)

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
(x y : 𝒜 ᵍ⊗[R] ℬ)

(GradedTensorProduct.auxEquiv R 𝒜 ℬ) (x * y) =
  ((TensorProduct.gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) x))
    ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) y)


/--
This structure encodes the data required for a family of morphisms to be effective epimorphic.
-/
structure EffectiveEpiFamilyStruct {B : C} {α : Type*}
    (X : α → C) (π : (a : α) → (X a ⟶ B)) where
  /--
  For every `W` with a family of morphisms `e a : Y a ⟶ W` that coequalizes every pair of morphisms
  `g₁ : Z ⟶ Y a₁`, `g₂ : Z ⟶ Y a₂` which the family `π` coequalizes, `desc e h` is a morphism
  `X ⟶ W`...
  -/
  desc : ∀ {W} (e : (a : α) → (X a ⟶ W)),
          (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
      g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _) → (B ⟶ W)
  /-- ...factorizing the components of `e` through the components of `π`... -/
  fac : ∀ {W} (e : (a : α) → (X a ⟶ W))
          (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
            g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _)
          (a : α), π a ≫ desc e h = e a
  /-- ...and as such, unique. -/
  uniq : ∀ {W} (e : (a : α) → (X a ⟶ W))
          (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
            g₁ ≫ π _ = g₂ ≫ π _ → g₁ ≫ e _ = g₂ ≫ e _)
          (m : B ⟶ W), (∀ (a : α), π a ≫ m = e a) → m = desc e h

(self : CategoryTheory.EffectiveEpiFamilyStruct X π)

(h :
  ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
    CategoryTheory.CategoryStruct.comp g₁ (π a₁) = CategoryTheory.CategoryStruct.comp g₂ (π a₂) →
      CategoryTheory.CategoryStruct.comp g₁ (e a₁) = CategoryTheory.CategoryStruct.comp g₂ (e a₂))

(∀ (a : α), CategoryTheory.CategoryStruct.comp (π a) m = e a) → m = self.desc e ⋯


@[simp]
theorem kstar_apply (a : ∀ i, π i) (i : ι) : a∗ i = (a i)∗

{ι : Type u_3}
{π : ι → Type u_4}
[(i : ι) → KleeneAlgebra (π i)]
(a : (i : ι) → π i)
(i : ι)


@[simp]
theorem orderedStructure_iff [IsOrdered L] [LE M] [L.Structure M] :
    L.OrderedStructure M ↔ LHom.IsExpansionOn (orderLHom L) M

{L : FirstOrder.Language}
{M : Type w'}
[L.IsOrdered]
[LE M]
[L.Structure M]

L.OrderedStructure M ↔ L.orderLHom.IsExpansionOn M


/-- `ε` commutes with every element of the algebra. -/
theorem commute_eps_left [Semiring R] (x : DualNumber R) : Commute ε x


theorem le_dirac_apply {a} : s.indicator 1 a ≤ dirac a s

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

s.indicator 1 a ≤ (MeasureTheory.Measure.dirac a) s


/--
The extended distance between vertices is equal to `1` if and only if these vertices are adjacent.
-/
@[simp]
theorem edist_eq_one_iff_adj : G.edist u v = 1 ↔ G.Adj u v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}


/-- Multiplication `y ↦ x * y` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Addition `y ↦ x + y` as an `IsometryEquiv`."]
def mulLeft [IsometricSMul G G] (c : G) : G ≃ᵢ G

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul G G]
(c x : G)


@[to_additive]
theorem one_ker_inv {f : G → H} (hf : IsGroupHom f) {a b : G} (h : f (a * b⁻¹) = 1) :
    f a = f b

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)
{a b : G}
(h : f (a + -b) = 0)


/-- The trimmed property of a measure μ states that `μ.toOuterMeasure.trim = μ.toOuterMeasure`.
This theorem shows that a restricted trimmed outer measure is a trimmed outer measure. -/
theorem restrict_trim {μ : OuterMeasure α} {s : Set α} (hs : MeasurableSet s) :
    (restrict s μ).trim = restrict s μ.trim

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.OuterMeasure α}
{s : Set α}
(hs : MeasurableSet s)

((MeasureTheory.OuterMeasure.restrict s) μ).trim = (MeasureTheory.OuterMeasure.restrict s) μ.trim


@[simp]
theorem toLocallyRingedSpace_toSheafedSpace :
    (toLocallyRingedSpace Y f).toSheafedSpace = toSheafedSpace Y.1 f

{X : AlgebraicGeometry.PresheafedSpace CommRingCat}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toLocallyRingedSpace Y f).toSheafedSpace =
  AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toSheafedSpace Y.toSheafedSpace f


theorem sin_eq_sqrt_one_sub_cos_sq {x : ℝ} (hl : 0 ≤ x) (hu : x ≤ π) :
    sin x = √(1 - cos x ^ 2)


theorem Gamma_eq_zero_iff (s : ℝ) : Gamma s = 0 ↔ ∃ m : ℕ, s = -m


theorem memℒp_const (c : E) [IsFiniteMeasure μ] : Memℒp (fun _ : α => c) p μ

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


/--
If `p` is always true, then every `x` satisfies it.
(This is the strongest postcondition version of `of_true`.)
-/
protected theorem trivial [Applicative m] [LawfulApplicative m] {x : m α} :
  SatisfiesM (fun _ => True) x

{m : Type u_1 → Type u_2}
{α : Type u_1}
[Applicative m]
[LawfulApplicative m]
{x : m α}


theorem single_zero (a : G) : (single a 0 : MonoidAlgebra k G) = 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(a : G)


@[reassoc]
theorem δ_comp_σ_succ' {n} {j : Fin (n + 2)} {i : Fin (n + 1)} (H : j = i.succ) :
    X.δ j ≫ X.σ i = 𝟙 _

(X : CategoryTheory.CosimplicialObject C)

X.δ j ≫ X.σ i = 𝟙 (X.obj (SimplexCategory.mk n))


theorem disjoint_left_ordSeparatingSet : Disjoint s (ordSeparatingSet s t)

{α : Type u_1}
[LinearOrder α]
{s t : Set α}


/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (formulated with `deriv`) is `C^n`. -/
theorem contDiffOn_succ_iff_deriv_of_isOpen {n : ℕ} (hs : IsOpen s₂) :
    ContDiffOn 𝕜 (n + 1 : ℕ) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 n (deriv f₂) s₂

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₂ : 𝕜 → F}
{s₂ : Set 𝕜}
{n : ℕ}
(hs : IsOpen s₂)

ContDiffOn 𝕜 (↑(n + 1)) f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 (↑n) (deriv f₂) s₂


/-- A version of **Bolzano-Weierstrass**: in a proper metric space (eg. $ℝ^n$),
every bounded sequence has a converging subsequence. This version assumes only
that the sequence is frequently in some bounded set. -/
theorem tendsto_subseq_of_frequently_bounded (hs : IsBounded s) {x : ℕ → X}
    (hx : ∃ᶠ n in atTop, x n ∈ s) :
    ∃ a ∈ closure s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a)

(hx : ∃ᶠ (n : ℕ) in Filter.atTop, x n ∈ s)

∃ a ∈ closure s, ∃ φ, StrictMono φ ∧ Filter.Tendsto (x ∘ φ) Filter.atTop (𝓝 a)


@[simp]
protected theorem inv_pos : 0 < a⁻¹ ↔ a ≠ ∞

0 < a⁻¹ ↔ a ≠ ⊤


theorem nhds_coe_coe {r p : ℝ≥0} :
    𝓝 ((r : ℝ≥0∞), (p : ℝ≥0∞)) = (𝓝 (r, p)).map fun p : ℝ≥0 × ℝ≥0 => (↑p.1, ↑p.2)

𝓝 (↑r, ↑p) = Filter.map (fun p => (↑p.1, ↑p.2)) (𝓝 (r, p))


theorem expSeries_summable (x : 𝔸) : Summable fun n => expSeries 𝕂 𝔸 n fun _ => x

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

Summable fun n => (NormedSpace.expSeries 𝕂 𝔸 n) fun x_1 => x


lemma specializingMap_iff_stableUnderSpecialization_image :
    SpecializingMap f ↔ ∀ s, StableUnderSpecialization s → StableUnderSpecialization (f '' s)

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

SpecializingMap f ↔ ∀ (s : Set X), StableUnderSpecialization s → StableUnderSpecialization (f '' s)


theorem ExistsUnique.elim₂ {α : Sort*} {p : α → Sort*} [∀ x, Subsingleton (p x)]
    {q : ∀ (x) (_ : p x), Prop} {b : Prop} (h₂ : ∃! x, ∃! h : p x, q x h)
    (h₁ : ∀ (x) (h : p x), q x h → (∀ (y) (hy : p y), q y hy → y = x) → b) : b

(h₁ : ∀ (x : α) (h : p x), q x h → (∀ (y : α) (hy : p y), q y hy → y = x) → b)


/--
The `Fin.le_zero_iff` in `Lean` only applies in `Fin (n+1)`.
This one instead uses a `NeZero n` typeclass hypothesis.
-/
@[simp]
theorem le_zero_iff' {n : ℕ} [NeZero n] {k : Fin n} : k ≤ 0 ↔ k = 0


@[simp]
theorem LinearMap.toMatrix'_toLin' (M : Matrix m n R) : LinearMap.toMatrix' (Matrix.toLin' M) = M

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


theorem univ_nontrivial [h : Nontrivial α] :
    (Finset.univ : Finset α).Nontrivial

{α : Type u_1}
[Fintype α]
[h : Nontrivial α]


/-- A multiplicative norm composed with the absolute value on integers equals the norm itself. -/
lemma MulRingNorm.apply_natAbs_eq {R : Type*} [Ring R] (x : ℤ) (f : MulRingNorm R) : f (natAbs x) =
    f x

{R : Type u_4}
[Ring R]
(x : ℤ)
(f : MulRingNorm R)


/-- Describes the counit of the adjunction `M ⊗ - ⊣ Hom(M, -)`. Given an `R`-module `N` this
should give a map `M ⊗ Hom(M, N) ⟶ N`, so we flip the order of the arguments in the identity map
`Hom(M, N) ⟶ (M ⟶ N)` and uncurry the resulting map `M ⟶ Hom(M, N) ⟶ N.` -/
theorem ihom_ev_app (M N : ModuleCat.{u} R) :
    (ihom.ev M).app N = TensorProduct.uncurry _ _ _ _ LinearMap.id.flip

{R : Type u}
[CommRing R]
(M N : ModuleCat R)

(CategoryTheory.ihom.ev M).app N = (TensorProduct.uncurry R (↑M) (↑M →ₗ[R] ↑N) ↑N) LinearMap.id.flip


@[simp]
theorem realize_reflexive : M ⊨ r.reflexive ↔ Reflexive fun x y : M => RelMap r ![x, y]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{r : L.Relations 2}

M ⊨ r.reflexive ↔ Reflexive fun x y => FirstOrder.Language.Structure.RelMap r ![x, y]


@[simp]
theorem union_ae_eq_right_iff_ae_subset : (s ∪ t : Set α) =ᵐ[μ] t ↔ s ≤ᵐ[μ] t

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}


{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)


@[simp]
theorem finiteAt_principal : μ.FiniteAtFilter (𝓟 s) ↔ μ s < ∞

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


@[simp]
lemma findGreatest_of_not (h : ¬ P (n + 1)) : findGreatest P (n + 1) = findGreatest P n

{P : ℕ → Prop}
[DecidablePred P]
{n : ℕ}
(h : ¬P (n + 1))

Nat.findGreatest P (n + 1) = Nat.findGreatest P n


@[simp, reassoc, elementwise]
theorem imageIsoRange_inv_image_ι {G H : ModuleCat.{v} R} (f : G ⟶ H) :
    (imageIsoRange f).inv ≫ Limits.image.ι f = ModuleCat.ofHom f.range.subtype

{R : Type u}
[Ring R]
{G H : ModuleCat R}
(f : G ⟶ H)

(ModuleCat.imageIsoRange f).inv ≫ CategoryTheory.Limits.image.ι f = ModuleCat.ofHom (LinearMap.range f).subtype


/-- An equicontinuous family of functions defined on a compact uniform space is automatically
uniformly equicontinuous. -/
theorem CompactSpace.uniformEquicontinuous_of_equicontinuous {ι : Type*} {F : ι → β → α}
    [CompactSpace β] (h : Equicontinuous F) : UniformEquicontinuous F

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[UniformSpace β]
{ι : Type u_4}
{F : ι → β → α}
[CompactSpace β]
(h : Equicontinuous F)


theorem Nat.isCoprime_iff_coprime {m n : ℕ} : IsCoprime (m : ℤ) n ↔ Nat.Coprime m n


@[simp]
theorem sSup_empty : sSup ∅ = (⊥ : α)


theorem mul_le_mul_of_nonneg' [PosMulMono α] [MulPosMono α]
    (h₁ : a ≤ b) (h₂ : c ≤ d) (c0 : 0 ≤ c) (b0 : 0 ≤ b) : a * c ≤ b * d

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulMono α]
[MulPosMono α]
(h₁ : a ≤ b)
(h₂ : c ≤ d)
(c0 : 0 ≤ c)
(b0 : 0 ≤ b)


theorem combine_sat : (c : Constraint) → (c' : Constraint) → (t : Int) →
    (c.combine c').sat t = (c.sat t ∧ c'.sat t)

(c c' : Lean.Omega.Constraint)
(t : Int)

((c.combine c').sat t = true) = (c.sat t = true ∧ c'.sat t = true)


@[simp]
theorem not_isTop [NoTopOrder α] (a : α) : ¬IsTop a

{α : Type u_1}
[LE α]
[NoTopOrder α]
(a : α)


@[reassoc]
theorem map_whiskerRight {X Y : C} (f : X ⟶ Y) (Z : C) :
    F.map (f ▷ Z) = inv (F.μ X Z) ≫ F.map f ▷ F.obj Z ≫ F.μ Y Z

(F : CategoryTheory.MonoidalFunctor C D)

F.map (CategoryTheory.MonoidalCategory.whiskerRight f Z) =
  CategoryTheory.inv (F.μ X Z) ≫ CategoryTheory.MonoidalCategory.whiskerRight (F.map f) (F.obj Z) ≫ F.μ Y Z


/-- In this version of the spectral mapping theorem, we assume the spectrum
is nonempty instead of assuming the degree of the polynomial is positive. -/
theorem map_polynomial_aeval_of_nonempty [IsAlgClosed 𝕜] (a : A) (p : 𝕜[X])
    (hnon : (σ a).Nonempty) : σ (aeval a p) = (fun k => eval k p) '' σ a

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
[IsAlgClosed 𝕜]
(a : A)
(p : Polynomial 𝕜)
(hnon : (spectrum 𝕜 a).Nonempty)

spectrum 𝕜 ((Polynomial.aeval a) p) = (fun k => Polynomial.eval k p) '' spectrum 𝕜 a


/-- If you rotate a triangle, you get another triangle.
Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `rotate` gives a triangle of the form:
```
      g       h        -f⟦1⟧'
  Y  ───> Z  ───>  X⟦1⟧ ───> Y⟦1⟧
```
-/
@[simps!]
def Triangle.rotate (T : Triangle C) : Triangle C

(T : CategoryTheory.Pretriangulated.Triangle C)


/-- Constant size closed neighborhoods of the diagonal form a basis
of the uniformity filter. -/
theorem uniformity_basis_dist_le :
    (𝓤 α).HasBasis ((0 : ℝ) < ·) fun ε => { p : α × α | dist p.1 p.2 ≤ ε }

(𝓤 α).HasBasis (fun x => 0 < x) fun ε => {p | dist p.1 p.2 ≤ ε}


/-- If the action is periodic, then a lower bound for its period can be computed. -/
@[to_additive "If the action is periodic, then a lower bound for its period can be computed."]
theorem le_period {m : M} {a : α} {n : ℕ} (period_pos : 0 < period m a)
    (moved : ∀ k, 0 < k → k < n → m ^ k • a ≠ a) : n ≤ period m a

(moved : ∀ (k : ℕ), 0 < k → k < n → k • m +ᵥ a ≠ a)


/-- The standard one-dimensional simplex in `ℝ² = Fin 2 → ℝ`
is homeomorphic to the unit interval. -/
@[simps! (config := .asFn)]
def stdSimplexHomeomorphUnitInterval : stdSimplex ℝ (Fin 2) ≃ₜ unitInterval

↑(stdSimplexHomeomorphUnitInterval.symm x) = ![↑x, 1 - ↑x]


@[simp]
theorem forget₂_map (X Y : ModuleCat R) (f : X ⟶ Y) :
    (forget₂ (ModuleCat R) AddCommGrp).map f = LinearMap.toAddMonoidHom f

(R : Type u)
[Ring R]
(X Y : ModuleCat R)
(f : X ⟶ Y)

(CategoryTheory.forget₂ (ModuleCat R) AddCommGrp).map f = LinearMap.toAddMonoidHom f


theorem Basis.basis_of_basis_of_subset_of_subset (hI : M.Basis I X) (hJ : M.Basis J Y) (hJX : J ⊆ X)
    (hIY : I ⊆ Y) : M.Basis I Y

{α : Type u_1}
{M : Matroid α}
{I X Y J : Set α}
(hI : M.Basis I X)
(hJ : M.Basis J Y)
(hJX : J ⊆ X)
(hIY : I ⊆ Y)


theorem extend_symm_continuousWithinAt_comp_right_iff {X} [TopologicalSpace X] {g : M → X}
    {s : Set M} {x : M} :
    ContinuousWithinAt (g ∘ (f.extend I).symm) ((f.extend I).symm ⁻¹' s ∩ range I) (f.extend I x) ↔
      ContinuousWithinAt (g ∘ f.symm) (f.symm ⁻¹' s) (f x)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
{X : Type u_8}
[TopologicalSpace X]
{g : M → X}
{s : Set M}
{x : M}

ContinuousWithinAt (g ∘ ↑(f.extend I).symm) (↑(f.extend I).symm ⁻¹' s ∩ Set.range ↑I) (↑(f.extend I) x) ↔
  ContinuousWithinAt (g ∘ ↑f.symm) (↑f.symm ⁻¹' s) (↑f x)


@[simp]
theorem iUnion_Ioo_left [NoMinOrder α] (b : α) : ⋃ a, Ioo a b = Iio b

{α : Type v}
[Preorder α]
[NoMinOrder α]
(b : α)


/-- The image of a binary bicone under a functor. -/
@[simps!]
def mapBinaryBicone {X Y : C} (b : BinaryBicone X Y) : BinaryBicone (F.obj X) (F.obj Y)

(b : CategoryTheory.Limits.BinaryBicone X Y)


private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) :
    f ∣[k](A * B) = (f ∣[k]A) ∣[k]B

ModularForm.slash k (A * B) f = ModularForm.slash k B (ModularForm.slash k A f)


lemma IndepSet_iff (s t : Set Ω) (μ : Measure Ω) :
    IndepSet s t μ ↔ ∀ t1 t2, MeasurableSet[generateFrom {s}] t1
      → MeasurableSet[generateFrom {t}] t2 → μ (t1 ∩ t2) = μ t1 * μ t2

∀ {x : MeasurableSpace Ω} (s t : Set Ω) (μ : MeasureTheory.Measure Ω),
  ProbabilityTheory.IndepSet s t μ ↔ ∀ (t1 t2 : Set Ω), MeasurableSet t1 → MeasurableSet t2 → μ (t1 ∩ t2) = μ t1 * μ t2


theorem chromaticNumber_le_one_of_subsingleton (G : SimpleGraph V) [Subsingleton V] :
    G.chromaticNumber ≤ 1

{V : Type u}
(G : SimpleGraph V)
[Subsingleton V]


@[simp]
theorem upperCentralSeries_zero : upperCentralSeries G 0 = ⊥


theorem univ_pi_piecewise {ι : Type*} {α : ι → Type*} (s : Set ι) (t t' : ∀ i, Set (α i))
    [∀ x, Decidable (x ∈ s)] : pi univ (s.piecewise t t') = pi s t ∩ pi sᶜ t'

{ι : Type u_7}
{α : ι → Type u_8}
(s : Set ι)
(t t' : (i : ι) → Set (α i))
[(x : ι) → Decidable (x ∈ s)]

Set.univ.pi (s.piecewise t t') = s.pi t ∩ sᶜ.pi t'


/-- If a `Finset` of a subtype is converted to the main type with
`Embedding.subtype`, the result does not contain any value that does
not satisfy the property of the subtype. -/
theorem not_mem_map_subtype_of_not_property {p : α → Prop} (s : Finset { x // p x }) {a : α}
    (h : ¬p a) : a ∉ s.map (Embedding.subtype _)

{α : Type u_1}
{p : α → Prop}
(s : Finset { x // p x })
{a : α}
(h : ¬p a)

a ∉ Finset.map (Function.Embedding.subtype fun x => p x) s


@[simp] theorem log_eq_top_iff {x : ℝ≥0∞} : log x = ⊤ ↔ x = ⊤


@[simp]
theorem _root_.Submodule.ker_subtypeL (p : Submodule R₁ M₁) : ker p.subtypeL = ⊥

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
(p : Submodule R₁ M₁)


lemma le_of_smul_le_smul_of_neg [PosSMulReflectLE α β] (h : a • b₁ ≤ a • b₂) (ha : a < 0) :
    b₂ ≤ b₁

{α : Type u_1}
{β : Type u_2}
{a : α}
{b₁ b₂ : β}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulReflectLE α β]
(h : a • b₁ ≤ a • b₂)
(ha : a < 0)


theorem infinitesimal_of_tendsto_zero {f : ℕ → ℝ} (h : Tendsto f atTop (𝓝 0)) :
    Infinitesimal (ofSeq f)

(h : Filter.Tendsto f Filter.atTop (𝓝 0))


theorem smul_le_smul {p q : Seminorm 𝕜 E} {a b : ℝ≥0} (hpq : p ≤ q) (hab : a ≤ b) :
    a • p ≤ b • q

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{p q : Seminorm 𝕜 E}
{a b : ℝ≥0}
(hpq : p ≤ q)
(hab : a ≤ b)


/-- A **corner** of a set `A` in an abelian group is a triple of points of the form
`(x, y), (x + d, y), (x, y + d)`. It is **nontrivial** if `d ≠ 0`.

Here we define it as triples `(x₁, y₁), (x₂, y₁), (x₁, y₂)` where `x₁ + y₂ = x₂ + y₁` in order for
the definition to make sense in commutative monoids, the motivating example being `ℕ`. -/
@[mk_iff]
structure IsCorner (A : Set (G × G)) (x₁ y₁ x₂ y₂ : G) : Prop where
  fst_fst_mem : (x₁, y₁) ∈ A
  fst_snd_mem : (x₁, y₂) ∈ A
  snd_fst_mem : (x₂, y₁) ∈ A
  add_eq_add : x₁ + y₂ = x₂ + y₁

{G : Type u_1}
[AddCommMonoid G]
{A : Set (G × G)}
{x₁ y₁ x₂ y₂ : G}
(self : IsCorner A x₁ y₁ x₂ y₂)


/-- When we have `[CommSemiring R]`, the function `C` is the same as `algebraMap R R[X]`.

(But note that `C` is defined when `R` is not necessarily commutative, in which case
`algebraMap` is not available.)
-/
theorem C_eq_algebraMap (r : R) : C r = algebraMap R R[X] r


theorem AddTorsor.subsingleton_iff (G P : Type*) [AddGroup G] [AddTorsor G P] :
    Subsingleton G ↔ Subsingleton P

(G : Type u_1)
(P : Type u_2)
[AddGroup G]
[AddTorsor G P]


theorem algebraMap_injective : Function.Injective (algebraMap K[X] (RatFunc K))

Function.Injective ⇑(algebraMap K[X] (RatFunc K))


@[simp] theorem natAbs_neg : ∀ (a : Int), natAbs (-a) = natAbs a


@[to_additive (attr := simp)]
theorem mem_inf {p p' : Subgroup G} {x : G} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{G : Type u_1}
[Group G]
{p p' : Subgroup G}
{x : G}


theorem integral_add_compl₀ (hs : NullMeasurableSet s μ) (hfi : Integrable f μ) :
    ∫ x in s, f x ∂μ + ∫ x in sᶜ, f x ∂μ = ∫ x, f x ∂μ

(hs : MeasureTheory.NullMeasurableSet s μ)

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


/-- `PartialEquivBEq α` says that the `BEq` implementation is a
partial equivalence relation, that is:
* it is symmetric: `a == b → b == a`
* it is transitive: `a == b → b == c → a == c`.
-/
class PartialEquivBEq (α) [BEq α] : Prop where
  /-- Symmetry for `BEq`. If `a == b` then `b == a`. -/
  symm : (a : α) == b → b == a
  /-- Transitivity for `BEq`. If `a == b` and `b == c` then `a == c`. -/
  trans : (a : α) == b → b == c → a == c

{α : Type u_1}
[BEq α]
[self : PartialEquivBEq α]
{a b : α}


theorem iIndepSets.indepSets {s : ι → Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} (h_indep : iIndepSets s κ μ) {i j : ι} (hij : i ≠ j) :
    IndepSets (s i) (s j) κ μ

(h_indep : ProbabilityTheory.Kernel.iIndepSets s κ μ)

ProbabilityTheory.Kernel.IndepSets (s i) (s j) κ μ


theorem vsub_iUnion (s : Set β) (t : ι → Set β) : (s -ᵥ ⋃ i, t i) = ⋃ i, s -ᵥ t i

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
[VSub α β]
(s : Set β)
(t : ι → Set β)


@[to_additive]
theorem mono' {f' : α → γ} (hf : HasCompactMulSupport f)
    (hff' : mulSupport f' ⊆ mulTSupport f) : HasCompactMulSupport f'

(hff' : Function.mulSupport f' ⊆ mulTSupport f)


@[simp]
theorem coe_algebraMap [CommSemiring R] :
    ⇑(algebraMap (PowerSeries R) (LaurentSeries R)) = HahnSeries.ofPowerSeries ℤ R

⇑(algebraMap (PowerSeries R) (LaurentSeries R)) = ⇑(HahnSeries.ofPowerSeries ℤ R)


theorem comp_assoc {R : Type*} [CommSemiring R] (φ ψ χ : R[X]) :
    (φ.comp ψ).comp χ = φ.comp (ψ.comp χ)

{R : Type u_1}
[CommSemiring R]
(φ ψ χ : R[X])


@[simp]
theorem lift_of_apply (f : X → A) (x) : lift R f (of R x) = f x

(R : Type u)
{X : Type v}
[Semiring R]
{A : Type w}
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(f : X → A)
(x : X)

((FreeNonUnitalNonAssocAlgebra.lift R) f) (FreeNonUnitalNonAssocAlgebra.of R x) = f x


/-- Dependence is the negation of independence. -/
theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f

{ι : Type u_1}
{K : Type u_2}
{V : Type u_3}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{f : ι → ℙ K V}

Projectivization.Dependent f ↔ ¬Projectivization.Independent f


theorem tsum_geometric_nnreal {r : ℝ≥0} (hr : r < 1) : ∑' n : ℕ, r ^ n = (1 - r)⁻¹


@[simp]
theorem comp_id (f : SpectralMap α β) : f.comp (SpectralMap.id α) = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : SpectralMap α β)


@[simp]
theorem top_fst : (⊤ : Concept α β r).fst = univ

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}


theorem absNorm_apply (I : Ideal S) : absNorm I = cardQuot I

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
(I : Ideal S)


theorem image_coe_sphere (z : ℍ) (r : ℝ) :
    ((↑) : ℍ → ℂ) '' sphere (α := ℍ) z r = sphere ↑(z.center r) (z.im * Real.sinh r)

UpperHalfPlane.coe '' Metric.sphere z r = Metric.sphere (↑(z.center r)) (z.im * Real.sinh r)


theorem prec' {f g h} (hf : Partrec f) (hg : Partrec g) (hh : Partrec h) :
    Partrec fun a => (f a).bind fun n => n.rec (g a)
      fun y IH => do {let i ← IH; h (Nat.pair a (Nat.pair y i))}

{f g h : ℕ →. ℕ}
(hf : Nat.Partrec f)
(hg : Nat.Partrec g)
(hh : Nat.Partrec h)

Nat.Partrec fun a =>
  (f a).bind fun n =>
    Nat.rec (g a)
      (fun y IH => do
        let i ← IH
        h (Nat.pair a (Nat.pair y i)))
      n


/-- Consider a product of `g i (f i)` over a finset.  Suppose `g` is a function such as
`n ↦ (· ^ n)`, which maps a second argument of `1` to `1`. Then if `f` is replaced by the
corresponding multiplicative indicator function, the finset may be replaced by a possibly larger
finset without changing the value of the product. -/
@[to_additive "Consider a sum of `g i (f i)` over a finset.  Suppose `g` is a function such as
`n ↦ (n • ·)`, which maps a second argument of `0` to `0` (or a weighted sum of `f i * h i` or
`f i • h i`, where `f` gives the weights that are multiplied by some other function `h`). Then if
`f` is replaced by the corresponding indicator function, the finset may be replaced by a possibly
larger finset without changing the value of the sum."]
lemma prod_mulIndicator_subset_of_eq_one [One α] (f : ι → α) (g : ι → α → β) {s t : Finset ι}
    (h : s ⊆ t) (hg : ∀ a, g a 1 = 1) :
    ∏ i ∈ t, g i (mulIndicator ↑s f i) = ∏ i ∈ s, g i (f i)

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
[One α]
(f : ι → α)
(g : ι → α → β)
{s t : Finset ι}
(h : s ⊆ t)
(hg : ∀ (a : ι), g a 1 = 1)

∏ i ∈ t, g i ((↑s).mulIndicator f i) = ∏ i ∈ s, g i (f i)


lemma isCompl_even_odd : IsCompl { n : ℤ | Even n } { n | Odd n }


lemma krullDim_eq_of_orderIso (f : α ≃o β) : krullDim α = krullDim β

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


@[to_additive (attr := simp, norm_cast)]
theorem coe_le_coe : (p : E → ℝ) ≤ q ↔ p ≤ q

{E : Type u_4}
[AddGroup E]
{p q : AddGroupSeminorm E}

⇑p ≤ ⇑q ↔ p ≤ q


/-- The counit isomorphism of the auto-equivalence of categories `triangleRotation C` of
`Triangle C` given by the rotation of triangles. -/
@[simps!]
def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C)

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

(X : CategoryTheory.Pretriangulated.Triangle C)

(CategoryTheory.Pretriangulated.invRotCompRot.hom.app X).hom₃ =
  (CategoryTheory.shiftFunctorCompIsoId C (-1) 1 ⋯).hom.app X.obj₃


@[simp]
lemma star_lt_star_iff {x y : R} : star x < star y ↔ x < y

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x y : R}


/-- If the Lebesgue integral of a function is bounded by some constant on all sets with finite
measure in a sub-σ-algebra and the measure is σ-finite on that sub-σ-algebra, then the integral
over the whole space is bounded by that same constant. -/
theorem lintegral_le_of_forall_fin_meas_trim_le {μ : Measure α} (hm : m ≤ m0)
    [SigmaFinite (μ.trim hm)] (C : ℝ≥0∞) {f : α → ℝ≥0∞}
    (hf : ∀ s, MeasurableSet[m] s → μ s ≠ ∞ → ∫⁻ x in s, f x ∂μ ≤ C) : ∫⁻ x, f x ∂μ ≤ C

{f : α → ℝ≥0∞}

(hf : ∀ (s : Set α), MeasurableSet s → μ s ≠ ⊤ → ∫⁻ (x : α) in s, f x ∂μ ≤ C)


@[to_additive] lemma isUnit_iff_eq_one [Unique Mˣ] {x : M} : IsUnit x ↔ x = 1

{M : Type u_1}
[Monoid M]
[Unique Mˣ]
{x : M}


/-- **Baer's criterion** for injective module : a Baer module is an injective module, i.e. if every
linear map from an ideal can be extended, then the module is injective. -/
protected theorem injective (h : Module.Baer R Q) : Module.Injective R Q

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
(h : Module.Baer R Q)


@[simp]
theorem coe_comp_to_continuous_fun (f : C_c(γ, δ)) (g : β →co γ) : ((f.comp g) : β → δ) = f ∘ g

{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(f : γ →C_c δ)
(g : CocompactMap β γ)


theorem monotone_arcsin : Monotone arcsin


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


lemma truncatedSup_of_mem (h : a ∈ lowerClosure s) :
    truncatedSup s a = (s.filter fun b ↦ a ≤ b).sup' (sup_aux h) id

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{a : α}
(h : a ∈ lowerClosure ↑s)

s.truncatedSup a = (Finset.filter (fun b => a ≤ b) s).sup' ⋯ id


/-- Given a quotient space `G ⧸ Γ` where `Γ` is `Countable`, and the restriction,
  `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
  will take the value `∞` on any open set in the quotient! -/
@[to_additive "Given an additive quotient space `G ⧸ Γ` where `Γ` is `Countable`, and the
  restriction, `μ_𝓕`, of a right-invariant measure `μ` on `G` to a fundamental domain `𝓕`, a set
  in the quotient which has `μ_𝓕`-measure zero, also has measure zero under the
  folding of `μ` under the quotient. Note that, if `Γ` is infinite, then the folded map
  will take the value `∞` on any open set in the quotient!"]
lemma _root_.MeasureTheory.IsFundamentalDomain.absolutelyContinuous_map
    [μ.IsMulRightInvariant] :
    map (QuotientGroup.mk : G → G ⧸ Γ) μ ≪ map (QuotientGroup.mk : G → G ⧸ Γ) (μ.restrict 𝓕)

(h𝓕 : MeasureTheory.IsFundamentalDomain (↥Γ.op) 𝓕 μ)

MeasureTheory.Measure.map QuotientGroup.mk μ ≪ MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)


theorem tendsto_abs_tan_of_cos_eq_zero {x : ℂ} (hx : cos x = 0) :
    Tendsto (fun x => abs (tan x)) (𝓝[≠] x) atTop

Filter.Tendsto (fun x => Complex.abs (Complex.tan x)) (nhdsWithin x {x}ᶜ) Filter.atTop


theorem commProb_def' : commProb G = Nat.card (ConjClasses G) / Nat.card G

commProb G = ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)


/-- An isomorphism of short complexes `S₁ ≅ S₂` induces an isomorphism on the `H` fields
of left homology data of `S₁` and `S₂`. -/
@[simps]
def leftHomologyMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.LeftHomologyData)
    (h₂ : S₂.LeftHomologyData) : h₁.H ≅ h₂.H

(CategoryTheory.ShortComplex.leftHomologyMapIso' e h₁ h₂).inv = CategoryTheory.ShortComplex.leftHomologyMap' e.inv h₂ h₁


theorem unbounded_ge_iff_unbounded_inter_ge [LinearOrder α] (a : α) :
    Unbounded (· ≥ ·) (s ∩ { b | b ≤ a }) ↔ Unbounded (· ≥ ·) s

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

Set.Unbounded (fun x x_1 => x ≥ x_1) (s ∩ {b | b ≤ a}) ↔ Set.Unbounded (fun x x_1 => x ≥ x_1) s


@[simp]
theorem slope_sub_smul (f : k → E) {a b : k} (h : a ≠ b) :
    slope (fun x => (x - a) • f x) a b = f b

{k : Type u_1}
{E : Type u_2}
[Field k]
[AddCommGroup E]
[Module k E]
(f : k → E)
{a b : k}
(h : a ≠ b)


theorem iff_unop {A B X Y : Cᵒᵖ} (i : A ⟶ B) (p : X ⟶ Y) :
    HasLiftingProperty i p ↔ HasLiftingProperty p.unop i.unop

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : Cᵒᵖ}
(i : A ⟶ B)
(p : X ⟶ Y)

CategoryTheory.HasLiftingProperty i p ↔ CategoryTheory.HasLiftingProperty p.unop i.unop


/-- `cardinalGenerate g hc` is the greatest `cardinalInterFilter c` containing `g`. -/
theorem cardinalGenerate_isGreatest (hc : 2 < c) :
    IsGreatest { f : Filter α | CardinalInterFilter f c ∧ g ⊆ f.sets } (cardinalGenerate g hc)

{α : Type u}
{c : Cardinal.{u}}
{g : Set (Set α)}
(hc : 2 < c)

IsGreatest {f | CardinalInterFilter f c ∧ g ⊆ f.sets} (Filter.cardinalGenerate g hc)


/-- Bernoulli's inequality reformulated to estimate `(n : α)`. -/
theorem Nat.cast_le_pow_sub_div_sub (H : 1 < a) (n : ℕ) : (n : α) ≤ (a ^ n - 1) / (a - 1)

{α : Type u_1}
[LinearOrderedField α]
{a : α}
(H : 1 < a)
(n : ℕ)


theorem slope_def_field (f : k → k) (a b : k) : slope f a b = (f b - f a) / (b - a)

{k : Type u_1}
[Field k]
(f : k → k)
(a b : k)


theorem IsVonNBounded.of_add_left (hst : IsVonNBounded 𝕜 (s + t)) (ht : t.Nonempty) :
    IsVonNBounded 𝕜 s

(hst : Bornology.IsVonNBounded 𝕜 (s + t))


@[reassoc] theorem associator_inv_fst_snd (X Y Z : C) :
    (α_ X Y Z).inv ≫ prod.fst ≫ prod.snd = prod.snd ≫ prod.fst

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd) =
  CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst


@[to_additive (attr := simp)]
theorem lift_eq (x : M) : f.lift hg (f.toMap x) = g x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
(hg : ∀ (y : ↥S), IsUnit (g ↑y))
(x : M)


theorem iUnion_comp {f : ι → ι₂} (hf : Surjective f) (g : ι₂ → Set α) : ⋃ x, g (f x) = ⋃ y, g y

{α : Type u_1}
{ι : Sort u_4}
{ι₂ : Sort u_6}
{f : ι → ι₂}
(hf : Function.Surjective f)
(g : ι₂ → Set α)


/-- **Fermat's Theorem**: the derivative of a function at a local maximum equals zero. -/
theorem IsLocalMax.deriv_eq_zero (h : IsLocalMax f a) : deriv f a = 0

{f : ℝ → ℝ}
{a : ℝ}
(h : IsLocalMax f a)


lemma uIcc_comm (a b : α) : [[a, b]] = [[b, a]]


/-- If `α` is a nonempty preorder with no maximal elements, then there exists a strictly monotone
function `ℕ → α`. -/
theorem exists_strictMono [Nonempty α] [NoMaxOrder α] : ∃ f : ℕ → α, StrictMono f

(α : Type u)
[Preorder α]
[Nonempty α]
[NoMaxOrder α]


theorem fuzzy_congr_imp {x₁ y₁ x₂ y₂ : PGame} (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ ‖ y₁ → x₂ ‖ y₂

{x₁ y₁ x₂ y₂ : SetTheory.PGame}
(hx : x₁ ≈ x₂)
(hy : y₁ ≈ y₂)


/-- **Fourier inversion formula**: If a function `f` on a finite-dimensional real inner product
space is integrable, and its Fourier transform `𝓕 f` is also integrable, then `𝓕 (𝓕⁻ f) = f` at
continuity points of `f`. -/
theorem MeasureTheory.Integrable.fourier_inversion_inv
    (hf : Integrable f) (h'f : Integrable (𝓕 f)) {v : V}
    (hv : ContinuousAt f v) : 𝓕 (𝓕⁻ f) v = f v

(hf : MeasureTheory.Integrable f MeasureTheory.volume)

(h'f : MeasureTheory.Integrable (𝓕 f) MeasureTheory.volume)


protected theorem «forall» {p : WithBot α → Prop} : (∀ x, p x) ↔ p ⊥ ∧ ∀ x : α, p x

(∀ (x : WithBot α), p x) ↔ p ⊥ ∧ ∀ (x : α), p ↑x


@[simp]
theorem embedding_of_isReal_apply {w : InfinitePlace K} (hw : IsReal w) (x : K) :
    ((embedding_of_isReal hw) x : ℂ) = (embedding w) x

{K : Type u_2}
[Field K]
{w : NumberField.InfinitePlace K}
(hw : w.IsReal)
(x : K)

↑((NumberField.InfinitePlace.embedding_of_isReal hw) x) = w.embedding x


protected theorem neg (hf : UnifTight f p μ) : UnifTight (-f) p μ

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : ι → α → β}
{p : ENNReal}
(hf : MeasureTheory.UnifTight f p μ)


/-- By assumption, for each `c : CU P` there exists an open set `u`
such that `c.C ⊆ u` and `closure u ⊆ c.U`. `c.right` is the pair `(closure u, c.U)`. -/
@[simps U]
def right (c : CU P) : CU P

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)


lemma MeasurableEmbedding.prod_mk_left {β γ : Type*} [MeasurableSingletonClass α]
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ}
    (x : α) {f : γ → β} (hf : MeasurableEmbedding f) :
    MeasurableEmbedding (fun y ↦ (x, f y))

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_7}
{γ : Type u_8}
[MeasurableSingletonClass α]
{mβ : MeasurableSpace β}
{mγ : MeasurableSpace γ}
(x : α)
{f : γ → β}
(hf : MeasurableEmbedding f)


@[to_additive]
theorem image_div : m '' (s / t) = m '' s / m '' t

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
[FunLike F α β]
[AddMonoidHomClass F α β]
(m : F)
{s t : Set α}


/-- Formula for `ζ 1`. Note that mathematically `ζ 1` is undefined, but our construction ascribes
this particular value to it. -/
lemma _root_.riemannZeta_one : riemannZeta 1 = (γ - Complex.log (4 * ↑π)) / 2

riemannZeta 1 = (↑γ - Complex.log (4 * ↑π)) / 2


@[to_additive (attr := simp)]
theorem mk_eq_monoidOf_mk' : mk = (monoidOf S).mk'

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}

Localization.mk = (Localization.monoidOf S).mk'


@[simp]
theorem changeForm_ι (m : M) : changeForm h (ι (M := M) Q m) = ι (M := M) Q' m

(h : LinearMap.BilinMap.toQuadraticMap B = Q' - Q)

(CliffordAlgebra.changeForm h) ((CliffordAlgebra.ι Q) m) = (CliffordAlgebra.ι Q') m


/-- The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of)
  the symmetric version of Tonelli's theorem is measurable. -/
theorem Measurable.lintegral_prod_left' [SFinite μ] {f : α × β → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun y => ∫⁻ x, f (x, y) ∂μ

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
[MeasureTheory.SFinite μ]
{f : α × β → ℝ≥0∞}
(hf : Measurable f)

Measurable fun y => ∫⁻ (x : α), f (x, y) ∂μ


/-- A morphism of schemes `f : X ⟶ Y` is a preimmersion if the underlying map of
topological spaces is an embedding and the induced morphisms of stalks are all surjective. -/
@[mk_iff]
class IsPreimmersion {X Y : Scheme} (f : X ⟶ Y) : Prop where
  base_embedding : Embedding f.1.base
  surj_on_stalks : ∀ x, Function.Surjective (f.stalkMap x)

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

AlgebraicGeometry.IsPreimmersion f ↔
  Embedding ⇑f.val.base ∧
    ∀ (x : ↑↑X.toPresheafedSpace), Function.Surjective ⇑(AlgebraicGeometry.Scheme.Hom.stalkMap f x)


theorem leadingCoeff_mul' (h : leadingCoeff p * leadingCoeff q ≠ 0) :
    leadingCoeff (p * q) = leadingCoeff p * leadingCoeff q

(h : p.leadingCoeff * q.leadingCoeff ≠ 0)

(p * q).leadingCoeff = p.leadingCoeff * q.leadingCoeff


/-- A filter is a subsingleton iff it is equal to `⊥` or to `pure a` for some `a`. -/
theorem subsingleton_iff_bot_or_pure : l.Subsingleton ↔ l = ⊥ ∨ ∃ a, l = pure a


@[simp, norm_cast]
lemma coe_sdiff (s : LowerSet α) (t : Set α) : s.sdiff t = (s : Set α) \ upperClosure t

{α : Type u_1}
[Preorder α]
(s : LowerSet α)
(t : Set α)


theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π)

(fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (Real.log x.1 * x.2) * Real.cos (x.2 * π)


/-- If a function `f` is concave on `s`, then the value it takes at some center of mass of points of
`s` is greater than the value it takes on one of those points. -/
theorem ConcaveOn.exists_le_of_centerMass (h : ConcaveOn 𝕜 s f) (hw₀ : ∀ i ∈ t, 0 ≤ w i)
    (hw₁ : 0 < ∑ i ∈ t, w i) (hp : ∀ i ∈ t, p i ∈ s) : ∃ i ∈ t, f (p i) ≤ f (t.centerMass w p)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[LinearOrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
(h : ConcaveOn 𝕜 s f)
(hw₀ : ∀ i ∈ t, 0 ≤ w i)
(hw₁ : 0 < ∑ i ∈ t, w i)
(hp : ∀ i ∈ t, p i ∈ s)


/-- Value of a geometric sum over the naturals. Note: see `geom_sum_mul_add` for a formulation
that avoids division and subtraction. -/
lemma Nat.geomSum_eq (hm : 2 ≤ m) (n : ℕ) :
    ∑ k ∈ range n, m ^ k = (m ^ n - 1) / (m - 1)

∑ k ∈ Finset.range n, m ^ k = (m ^ n - 1) / (m - 1)


/-- Cancel left multiplication on both sides of the `≡` and in the modulus.

For cancelling left multiplication in the modulus, see `Nat.ModEq.of_mul_left`. -/
protected theorem mul_left_cancel' {a b c m : ℕ} (hc : c ≠ 0) :
    c * a ≡ c * b [MOD c * m] → a ≡ b [MOD m]


lemma add_smul_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) {u v : R} (hu : IsUnit u) (hv : IsUnit v) :
    W'.add (u • P) (v • Q) = u ^ 4 • W'.add P Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(h : P ≈ Q)
{u v : R}
(hu : IsUnit u)
(hv : IsUnit v)


theorem Convex.openSegment_interior_self_subset_interior {s : Set E} (hs : Convex 𝕜 s) {x y : E}
    (hx : x ∈ interior s) (hy : y ∈ s) : openSegment 𝕜 x y ⊆ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ interior s)
(hy : y ∈ s)


theorem map_mk {f : α → β} (h : UniformContinuous f) (a : α) : map f (mk a) = mk (f a)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
(h : UniformContinuous f)
(a : α)

SeparationQuotient.map f (SeparationQuotient.mk a) = SeparationQuotient.mk (f a)


theorem le_iInf (h : ∀ i, a ≤ f i) : a ≤ iInf f

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{f : ι → α}
{a : α}
(h : ∀ (i : ι), a ≤ f i)


theorem integralNormalization_coeff_ne_natDegree {f : R[X]} {i : ℕ} (hi : i ≠ natDegree f) :
    coeff (integralNormalization f) i = coeff f i * f.leadingCoeff ^ (f.natDegree - 1 - i)

{R : Type u}
[Semiring R]
{f : R[X]}
{i : ℕ}
(hi : i ≠ f.natDegree)

f.integralNormalization.coeff i = f.coeff i * f.leadingCoeff ^ (f.natDegree - 1 - i)


theorem NatTrans.equifibered_of_isIso {F G : J ⥤ C} (α : F ⟶ G) [IsIso α] : Equifibered α

{J : Type v'}
[CategoryTheory.Category.{u', v'} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : CategoryTheory.Functor J C}
(α : F ⟶ G)
[CategoryTheory.IsIso α]


theorem Zigzag.of_inv_hom {j₁ j₂ j₃ : J} (f₂₁ : j₂ ⟶ j₁) (f₂₃ : j₂ ⟶ j₃) : Zigzag j₁ j₃

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{j₁ j₂ j₃ : J}
(f₂₁ : j₂ ⟶ j₁)
(f₂₃ : j₂ ⟶ j₃)


protected theorem lipschitz (hf : ApproximatesLinearOn f f' s c) :
    LipschitzWith (‖f'‖₊ + c) (s.restrict f)

{𝕜 : 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}
{s : Set E}
{c : ℝ≥0}
(hf : ApproximatesLinearOn f f' s c)


@[to_additive sub_le_sub_iff]
theorem div_le_div_iff' : a / b ≤ c / d ↔ a * d ≤ c * b

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


@[norm_cast]
theorem le_to_nat {m n : Num} : (m : ℕ) ≤ n ↔ m ≤ n

↑m ≤ ↑n ↔ m ≤ n


/-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
theorem fourierCoeffOn_of_hasDerivAt_Ioo {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
    {n : ℤ} (hn : n ≠ 0)
    (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivAt f (f' x) x)
    (hf' : IntervalIntegrable f' volume a b) :
    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n)

(hff' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt f (f' x) x)

(hf' : IntervalIntegrable f' MeasureTheory.volume a b)

fourierCoeffOn hab f n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((fourier (-n)) ↑a * (f b - f a) - (↑b - ↑a) * fourierCoeffOn hab f' n)


@[to_additive]
theorem injective_iff_trivial_ker {f : G → H} (hf : IsGroupHom f) :
    Function.Injective f ↔ ker f = trivial G

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)

Function.Injective f ↔ IsGroupHom.ker f = IsSubgroup.trivial G


theorem bounded_gt_Ico [Preorder α] [NoMinOrder α] (a b : α) : Bounded (· > ·) (Ico a b)

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

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


lemma mapBifunctorLeftUnitor_inv_apply (j : J) :
    (mapBifunctorLeftUnitor F X e p hp Y).inv j =
      e.inv.app (Y j) ≫ (F.map (singleObjApplyIso (0 : I) X).inv).app (Y j) ≫
      ιMapBifunctorMapObj F p ((single₀ I).obj X) Y 0 j j (hp j)

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

(e : F.obj X ≅ CategoryTheory.Functor.id D)

[(Y : D) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Functor.empty C) (F.flip.obj Y)]

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj ((CategoryTheory.GradedObject.single₀ I).obj X)).obj Y).HasMap
    p]

(CategoryTheory.GradedObject.mapBifunctorLeftUnitor F X e p hp Y).inv j =
  CategoryTheory.CategoryStruct.comp (e.inv.app (Y j))
    (CategoryTheory.CategoryStruct.comp ((F.map (CategoryTheory.GradedObject.singleObjApplyIso 0 X).inv).app (Y j))
      (CategoryTheory.GradedObject.ιMapBifunctorMapObj F p ((CategoryTheory.GradedObject.single₀ I).obj X) Y 0 j j ⋯))


/-- The group homomorphism between unitary subgroups of star monoids induced by a star
homomorphism -/
@[simps]
def map : unitary R →* unitary S

{F : Type u_2}
{R : Type u_3}
{S : Type u_4}
[Monoid R]
[StarMul R]
[Monoid S]
[StarMul S]
[FunLike F R S]
[StarHomClass F R S]
[MonoidHomClass F R S]
(f : F)

∀ (a : ↥(unitary R)), (unitary.map f) a = Subtype.map ⇑f ⋯ a


theorem IsTheta.isBigO_congr_left (h : f' =Θ[l] g') : f' =O[l] k ↔ g' =O[l] k

{α : Type u_1}
{G : Type u_5}
{E' : Type u_6}
{F' : Type u_7}
[Norm G]
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{k : α → G}
{f' : α → E'}
{g' : α → F'}
{l : Filter α}
(h : f' =Θ[l] g')


/-- `Ω[S⁄R]` is isomorphic to `S` copies of `S` with kernel `KaehlerDifferential.kerTotal`. -/
@[simps!]
noncomputable def KaehlerDifferential.quotKerTotalEquiv :
    ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R]

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

∀ (a : (S →₀ S) ⧸ (KaehlerDifferential.kerTotal R S).toAddSubgroup),
  (KaehlerDifferential.quotKerTotalEquiv R S) a =
    (QuotientAddGroup.lift (KaehlerDifferential.kerTotal R S).toAddSubgroup
        (Finsupp.total S (Ω[S⁄R]) S ⇑(KaehlerDifferential.D R S)).toAddMonoidHom ⋯)
      a


@[simp]
theorem powerset_cons (a : α) (s) : powerset (a ::ₘ s) = powerset s + map (cons a) (powerset s)

(a ::ₘ s).powerset = s.powerset + Multiset.map (Multiset.cons a) s.powerset


theorem Antiperiodic.div [Add α] [DivisionMonoid β] [HasDistribNeg β] (hf : Antiperiodic f c)
    (hg : Antiperiodic g c) : Periodic (f / g) c

{α : Type u_1}
{β : Type u_2}
{f g : α → β}
{c : α}
[Add α]
[DivisionMonoid β]
[HasDistribNeg β]
(hf : Function.Antiperiodic f c)
(hg : Function.Antiperiodic g c)


theorem zmultiples_nsmul_eq_nsmul_iff {ψ θ : R ⧸ AddSubgroup.zmultiples p} {n : ℕ} (hz : n ≠ 0) :
    n • ψ = n • θ ↔ ∃ k : Fin n, ψ = θ + (k : ℕ) • (p / n : R)

{R : Type u_1}
[DivisionRing R]
[CharZero R]
{p : R}
{ψ θ : R ⧸ AddSubgroup.zmultiples p}
{n : ℕ}
(hz : n ≠ 0)

n • ψ = n • θ ↔ ∃ k, ψ = θ + ↑k • ↑(p / ↑n)


/-- The counit iso in the equivalence of sheaf categories. -/
@[simps!]
def sheafCongr.counitIso : inverse J K e A ⋙ functor J K e A ≅ 𝟭 (Sheaf _ A)

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Equivalence.TransportsGrothendieckTopology J K e]

∀ (X_1 : Dᵒᵖ),
  ((CategoryTheory.Equivalence.sheafCongr.counitIso J K e A).hom.app X).val.app X_1 =
    X.val.map (e.counitIso.inv.app (Opposite.unop X_1)).op


protected theorem eq (a b : Trunc α) : a = b


@[to_additive]
theorem embedProduct_injective (α : Type*) [Monoid α] : Function.Injective (embedProduct α)


/-- In the domain of a bundle trivialization, the projection is continuous-/
theorem continuousAt_proj (ex : x ∈ e.source) : ContinuousAt proj x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : Z}
(ex : x ∈ e.source)


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

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
(f : C(γ, δ))
(g : C(β, γ))
(h : C(α, β))


@[simp]
theorem coe_ofStrictMono {α β} [LinearOrder α] [Preorder β] {f : α → β} (h : StrictMono f) :
    ⇑(ofStrictMono f h) = f

{α : Type u_6}
{β : Type u_7}
[LinearOrder α]
[Preorder β]
{f : α → β}
(h : StrictMono f)


theorem prod_le_prod_iff : s₁ ×ˢ t₁ ≤ s₂ ×ˢ t₂ ↔ s₁ ≤ s₂ ∧ t₁ ≤ t₂ ∨ s₁ = ⊥ ∨ t₁ = ⊥

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s₁ s₂ : LowerSet α}
{t₁ t₂ : LowerSet β}


theorem solvable_of_surjective (hf : Function.Surjective f) [IsSolvable G] : IsSolvable G'

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
{f : G →* G'}
(hf : Function.Surjective ⇑f)
[IsSolvable G]


/-- `affineCombination` gives equal results for two families of weights and two families of
points that are equal on `s`. -/
theorem affineCombination_congr {w₁ w₂ : ι → k} (hw : ∀ i ∈ s, w₁ i = w₂ i) {p₁ p₂ : ι → P}
    (hp : ∀ i ∈ s, p₁ i = p₂ i) : s.affineCombination k p₁ w₁ = s.affineCombination k p₂ w₂

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

(Finset.affineCombination k s p₁) w₁ = (Finset.affineCombination k s p₂) w₂


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

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


@[simp]
lemma map_incl_le {N' : LieSubmodule R L N} :
    N'.map N.incl ≤ N

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{N : LieSubmodule R L M}
{N' : LieSubmodule R L ↥↑N}


theorem multiset_sum_right (a : α) (h : ∀ b ∈ s, Commute a b) : Commute a s.sum

{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(s : Multiset α)
(a : α)
(h : ∀ b ∈ s, Commute a b)


@[simp]
theorem extend_extends' {a b : X} (γ : Path a b) (t : (Icc 0 1 : Set ℝ)) : γ.extend t = γ t

{X : Type u_1}
[TopologicalSpace X]
{a b : X}
(γ : Path a b)
(t : ↑(Set.Icc 0 1))


@[aesop safe apply (rule_sets := [SetLike])]
theorem natCast_mem [AddSubmonoidWithOneClass S R] (n : ℕ) : (n : R) ∈ s

{S : Type u_1}
{R : Type u_2}
[AddMonoidWithOne R]
[SetLike S R]
(s : S)
[AddSubmonoidWithOneClass S R]
(n : ℕ)


@[simp, norm_cast]
theorem ceil_cast (x : ℚ) : ⌈(x : α)⌉ = ⌈x⌉

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


@[continuity]
protected theorem continuous : Continuous f

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


theorem generateFrom_surjective : Surjective (generateFrom : Set (Set α) → TopologicalSpace α)


/-- If `C` has colimits of shape `J` then any coreflective subcategory has colimits of shape `J`. -/
theorem hasColimitsOfShape_of_coreflective [HasColimitsOfShape J C] (R : D ⥤ C) [Coreflective R] :
    HasColimitsOfShape J D


/-- The sequence `log_stirlingSeq` is bounded below for `n ≥ 1`. -/
theorem log_stirlingSeq_bounded_by_constant : ∃ c, ∀ n : ℕ, c ≤ log (stirlingSeq (n + 1))

∃ c, ∀ (n : ℕ), c ≤ Real.log (Stirling.stirlingSeq (n + 1))


/-- This functor `SimplexCategory ⥤ Cat` sends `[n]` (for `n : ℕ`)
to the category attached to the ordered set `{0, 1, ..., n}` -/
@[simps! obj map]
def toCat : SimplexCategory ⥤ Cat.{0}

∀ {X Y : SimplexCategory} (f : X ⟶ Y), SimplexCategory.toCat.map f = ⋯.functor


/-- The homotopy equivalence from a short complex to itself that is induced
by the identity. -/
@[simps]
def refl (S : ShortComplex C) : HomotopyEquiv S S

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(S : CategoryTheory.ShortComplex C)

(CategoryTheory.ShortComplex.HomotopyEquiv.refl S).homotopyInvHomId = CategoryTheory.ShortComplex.Homotopy.ofEq ⋯


lemma mul_div_cancel_of_imp' (h : b = 0 → a = 0) : b * (a / b) = a

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{a b : G₀}
(h : b = 0 → a = 0)


/-- An equivalence of categories transfers enough injectives. -/
lemma EnoughInjectives.of_equivalence {C : Type u₁} {D : Type u₂}
    [Category.{v₁} C] [Category.{v₂} D]
    (e : C ⥤ D) [e.IsEquivalence] [EnoughInjectives D] : EnoughInjectives C

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


theorem separableClosure_inf_perfectClosure : separableClosure F E ⊓ perfectClosure F E = ⊥

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


@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_hom_naturality :
    homologyMap ((single C c j).map f) j ≫ (singleObjHomologySelfIso c j B).hom =
      (singleObjHomologySelfIso c j A).hom ≫ f

HomologicalComplex.homologyMap ((HomologicalComplex.single C c j).map f) j ≫
    (HomologicalComplex.singleObjHomologySelfIso c j B).hom =
  (HomologicalComplex.singleObjHomologySelfIso c j A).hom ≫ f


theorem div_mul_le_self : ∀ (m n : Nat), m / n * n ≤ m


theorem mem_oneCocycles_iff (f : G → A) :
    f ∈ oneCocycles A ↔ ∀ g h : G, f (g * h) = A.ρ g (f h) + f g

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
(f : G → CoeSort.coe A)

f ∈ groupCohomology.oneCocycles A ↔ ∀ (g h : G), f (g * h) = (A.ρ g) (f h) + f g


theorem productMap_eq_comp_map : productMap f g = (lmul' R).comp (TensorProduct.map f g)

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[CommSemiring S]
[Algebra R A]
[Algebra R B]
[Algebra R S]
(f : A →ₐ[R] S)
(g : B →ₐ[R] S)

Algebra.TensorProduct.productMap f g = (Algebra.TensorProduct.lmul' R).comp (Algebra.TensorProduct.map f g)


theorem IsClosed.interior_union_left (_ : IsClosed s) :
    interior (s ∪ t) ⊆ s ∪ interior t

{X : Type u}
{s t : Set X}
[TopologicalSpace X]

IsClosed s → interior (s ∪ t) ⊆ s ∪ interior t


theorem tendsto_atBot_atBot [Nonempty α] [SemilatticeInf α] [Preorder β] {f : α → β} :
    Tendsto f atBot atBot ↔ ∀ b : β, ∃ i : α, ∀ a : α, a ≤ i → f a ≤ b

{α : Type u_3}
{β : Type u_4}
[Nonempty α]
[SemilatticeInf α]
[Preorder β]
{f : α → β}

Filter.Tendsto f Filter.atBot Filter.atBot ↔ ∀ (b : β), ∃ i, ∀ a ≤ i, f a ≤ b


@[simp]
theorem subset_univ (s : Set α) : s ⊆ univ


theorem mem_ker (v : V₁) : v ∈ f.ker ↔ f v = 0

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


theorem isOpen_pi_iff' [Finite ι] {s : Set (∀ a, π a)} :
    IsOpen s ↔
      ∀ f, f ∈ s → ∃ u : ∀ a, Set (π a), (∀ a, IsOpen (u a) ∧ f a ∈ u a) ∧ univ.pi u ⊆ s

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
[Finite ι]
{s : Set ((a : ι) → π a)}

IsOpen s ↔ ∀ f ∈ s, ∃ u, (∀ (a : ι), IsOpen (u a) ∧ f a ∈ u a) ∧ Set.univ.pi u ⊆ s


/-- The left adjoint of the adjunction which induces the monad `(T, η_ T, μ_ T)`. -/
@[simps]
def toKleisli : C ⥤ Kleisli T

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

(CategoryTheory.Kleisli.Adjunction.toKleisli T).obj X = X


theorem not_lt_maximum_of_mem' (ha : a ∈ l) : ¬maximum l < (a : WithBot α)

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{l : List α}
{a : α}
(ha : a ∈ l)


@[simp]
lemma coeff_preΨ' (n : ℕ) : (W.preΨ' n).coeff ((n ^ 2 - if Even n then 4 else 1) / 2) =
    if Even n then n / 2 else n

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℕ)

(W.preΨ' n).coeff ((n ^ 2 - if Even n then 4 else 1) / 2) = ↑(if Even n then n / 2 else n)


theorem lt_last_of_mem_eraseLast {s : CompositionSeries X} {x : X} (h : 0 < s.length)
    (hx : x ∈ s.eraseLast) : x < s.last

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
{s : CompositionSeries X}
{x : X}
(h : 0 < s.length)
(hx : x ∈ RelSeries.eraseLast s)


lemma Filter.tendsto_sub_const_iff {G : Type*}
    [AddCommGroup G] [TopologicalSpace G] [ContinuousSub G]
    (b : G) {c : G} {f : α → G} {l : Filter α} :
    Tendsto (f · - b) l (𝓝 (c - b)) ↔ Tendsto f l (𝓝 c)

{α : Type u}
{G : Type u_1}
[AddCommGroup G]
[TopologicalSpace G]
[ContinuousSub G]
(b : G)
{c : G}
{f : α → G}
{l : Filter α}

Filter.Tendsto (fun x => f x - b) l (𝓝 (c - b)) ↔ Filter.Tendsto f l (𝓝 c)


/-- Interpreting the legs of a cone as a structured arrow and then forgetting the arrow again does
    nothing. -/
@[simps!]
def Cone.toStructuredArrowCompProj {F : J ⥤ C} (c : Cone F) :
    c.toStructuredArrow ⋙ StructuredArrow.proj _ _ ≅ 𝟭 J

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

c.toStructuredArrowCompProj.inv.app X = CategoryTheory.CategoryStruct.id X


theorem natAbs_eq_iff {a : Int} {n : Nat} : a.natAbs = n ↔ a = n ∨ a = -↑n


theorem findIdx_eq_length {p : α → Bool} {xs : List α} :
    xs.findIdx p = xs.length ↔ ∀ x ∈ xs, ¬p x

{α : Type u}
{p : α → Bool}
{xs : List α}

List.findIdx p xs = xs.length ↔ ∀ x ∈ xs, ¬p x = true


/-- The category of `MonoOver α`, for `α : Type u`, is equivalent to the partial order `Set α`.
-/
@[simps]
noncomputable def Types.monoOverEquivalenceSet (α : Type u) : MonoOver α ≌ Set α

(Types.monoOverEquivalenceSet α).inverse.obj s = CategoryTheory.MonoOver.mk' Subtype.val


theorem map_unique {f : α → β} {g : hatα → hatβ} (hg : UniformContinuous g)
    (h : ∀ a, ι' (f a) = g (ι a)) : map f = g

(h : ∀ (a : α), pkg'.coe (f a) = g (pkg.coe a))


theorem mem_nonunits_iff {x : K} : x ∈ A.nonunits ↔ A.valuation x < 1

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


@[simp]
lemma root_reflection_perm (j : ι) :
    P.root (P.reflection_perm i j) = (P.reflection i) (P.root j)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i j : ι)

P.root ((P.reflection_perm i) j) = (P.reflection i) (P.root j)


lemma _root_.CovBy.exists_set_insert (h : s ⋖ t) : ∃ a ∉ s, insert a s = t

{α : Type u_1}
{s t : Set α}
(h : s ⋖ t)


@[to_additive (attr := simp)]
theorem ofDual_one [One α] : (ofDual 1 : α) = 1


theorem splits_iff (f : K[X]) [IsSplittingField K L f] :
    Splits (RingHom.id K) f ↔ (⊤ : Subalgebra K L) = ⊥

{K : Type v}
(L : Type w)
[Field K]
[Field L]
[Algebra K L]
(f : K[X])
[Polynomial.IsSplittingField K L f]

Polynomial.Splits (RingHom.id K) f ↔ ⊤ = ⊥


@[simp]
theorem toRelIsoLT_apply (e : α ≃o β) (x : α) : e.toRelIsoLT x = e x

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(x : α)


theorem one_add (n : PosNum) : 1 + n = succ n


theorem erase_union_distrib (s t : Finset α) (a : α) : (s ∪ t).erase a = s.erase a ∪ t.erase a

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


theorem not_separable_zero [Nontrivial R] : ¬Separable (0 : R[X])

{R : Type u}
[CommSemiring R]
[Nontrivial R]


theorem sameRay_neg_swap : SameRay R (-x) y ↔ SameRay R x (-y)

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}


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

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


@[simp]
theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.sup

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(a : α)
(s : Multiset α)


@[simp]
theorem PointedMap.headI_map {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ')
    (l : List Γ) : (l.map f).headI = f l.headI

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : List Γ)


lemma isOption {x' x} (h : IsOption x' x) (hx : Numeric x) : Numeric x'

{x' x : SetTheory.PGame}
(h : x'.IsOption x)
(hx : x.Numeric)


theorem Monotone.reflect_lt (hf : Monotone f) {a b : α} (h : f a < f b) : a < b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : Monotone f)
{a b : α}
(h : f a < f b)


theorem centralBinom_pos (n : ℕ) : 0 < centralBinom n


@[simp]
theorem not_mem_zero (x : List α) : x ∉ (0 : Language α)


theorem toEmbedding_completeGraph {α β : Type*} (f : α ≃ β) :
    (Iso.completeGraph f).toEmbedding = Embedding.completeGraph f.toEmbedding

{α : Type u_4}
{β : Type u_5}
(f : α ≃ β)

(SimpleGraph.Iso.completeGraph f).toEmbedding = SimpleGraph.Embedding.completeGraph f.toEmbedding


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

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


@[to_additive]
theorem IsUnit.mem_submonoid_iff {M : Type*} [Monoid M] (a : M) :
    a ∈ IsUnit.submonoid M ↔ IsUnit a


theorem mul_le_mul_left {M N P : AddSubmonoid R} (h : M ≤ N) : M * P ≤ N * P

{R : Type u_4}
[NonUnitalNonAssocSemiring R]
{M N P : AddSubmonoid R}
(h : M ≤ N)


@[simp]
theorem coe_id : ⇑(BialgHom.id R A) = id

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[CoalgebraStruct R A]


{S : Type u_5}
[LinearOrderedSemifield S]
{R : Type u_6}
[Semiring R]
[Nontrivial R]
(abv : R → S)
[IsAbsoluteValue abv]


theorem ext_iff : p = q ↔ ∀ x, x ∈ p ↔ x ∈ q

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p q : A}


@[to_additive]
theorem isometry_mul_right [Mul M] [PseudoEMetricSpace M] [IsometricSMul Mᵐᵒᵖ M] (a : M) :
    Isometry fun x => x * a

{M : Type u}
[Add M]
[PseudoEMetricSpace M]
[IsometricVAdd Mᵃᵒᵖ M]
(a : M)


theorem secondCountable_of_almost_dense_set
    (hs : ∀ ε > 0, ∃ t : Set α, t.Countable ∧ ⋃ x ∈ t, closedBall x ε = univ) :
    SecondCountableTopology α

(hs : ∀ ε > 0, ∃ t, t.Countable ∧ ⋃ x ∈ t, EMetric.closedBall x ε = Set.univ)


theorem uniformEmbedding_coeFn [UniformSpace F] [UniformAddGroup F] (𝔖 : Set (Set E)) :
    UniformEmbedding (α := UniformConvergenceCLM σ F 𝔖) (β := E →ᵤ[𝔖] F) DFunLike.coe

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
(σ : 𝕜₁ →+* 𝕜₂)
{E : Type u_3}
(F : Type u_4)
[AddCommGroup E]
[Module 𝕜₁ E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜₂ F]
[UniformSpace F]
[UniformAddGroup F]
(𝔖 : Set (Set E))


@[simp]
theorem preimage_Iic {a : α} (ha : 0 ≤ a) : (Nat.cast : ℕ → α) ⁻¹' Set.Iic a = Set.Iic ⌊a⌋₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
(ha : 0 ≤ a)


theorem sum_C_mul_X_pow_eq (p : R[X]) : (p.sum fun n a => C a * X ^ n) = p

(p.sum fun n a => Polynomial.C a * Polynomial.X ^ n) = p


theorem HasFiniteFPowerSeriesOnBall.neg (hf : HasFiniteFPowerSeriesOnBall f pf x n r) :
    HasFiniteFPowerSeriesOnBall (-f) (-pf) x n r


theorem nhds_basis_closedBall {x : E} : (𝓝 x).HasBasis (fun r : ℝ => 0 < r) (closedBall x)

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
{x : E}

(𝓝 x).HasBasis (fun r => 0 < r) (Euclidean.closedBall x)


/-- Any large enough family of vectors in `R^ι` has a pair of elements
whose remainders are close together, pointwise. -/
theorem exists_approx {ι : Type*} [Fintype ι] {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0)
    (h : abv.IsAdmissible) (A : Fin (h.card ε ^ Fintype.card ι).succ → ι → R) :
    ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ k, (abv (A i₁ k % b - A i₀ k % b) : ℝ) < abv b • ε

∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(abv (A i₁ k % b - A i₀ k % b)) < abv b • ε


protected lemma div_div_self (h : n ∣ m) (hm : m ≠ 0) : m / (m / n) = n


@[simp] lemma top_ne_natCast (n : ℕ) : (⊤ : WithTop α) ≠ n

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)


theorem append_inj_left (h : s₁ ++ t₁ = s₂ ++ t₂) (hl : length s₁ = length s₂) : s₁ = s₂

∀ {α : Type u_1} {s₁ t₁ s₂ t₂ : List α}, s₁ ++ t₁ = s₂ ++ t₂ → s₁.length = s₂.length → s₁ = s₂


theorem IsCoprime.of_mul_add_right_left (h : IsCoprime (z * y + x) y) : IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime (z * y + x) y)


theorem card_support_eraseLead' {c : ℕ} (fc : f.support.card = c + 1) :
    f.eraseLead.support.card = c

{R : Type u_1}
[Semiring R]
{f : R[X]}
{c : ℕ}
(fc : f.support.card = c + 1)


@[simp]
theorem frobeniusEquiv_symm_comp_frobenius :
    ((frobeniusEquiv R p).symm : R →+* R).comp (frobenius R p) = RingHom.id R

(R : Type u_1)
(p : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]

(↑(frobeniusEquiv R p).symm).comp (frobenius R p) = RingHom.id R


theorem continuous_toDual : Continuous (toDual : X → Xᵒᵈ)


/-- `lift r` is injective if `d` is non-square, and R has characteristic zero (that is, the map from
`ℤ` into `R` is injective). -/
theorem lift_injective [CharZero R] {d : ℤ} (r : { r : R // r * r = ↑d })
    (hd : ∀ n : ℤ, d ≠ n * n) : Function.Injective (lift r)

{R : Type}
[CommRing R]
[CharZero R]
{d : ℤ}
(r : { r // r * r = ↑d })
(hd : ∀ (n : ℤ), d ≠ n * n)


theorem adjoin.algebraMap_mem (x : F) : algebraMap F E x ∈ adjoin F S

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S : Set E)
(x : F)

(algebraMap F E) x ∈ IntermediateField.adjoin F S