theorem eventually_homothety_mem_of_mem_interior (x : Q) {s : Set Q} {y : Q} (hy : y ∈ interior s) :
    ∀ᶠ δ in 𝓝 (1 : 𝕜), homothety x δ y ∈ s

{W : Type u_4}
{Q : Type u_5}
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
(𝕜 : Type u_6)
[NormedField 𝕜]
[NormedSpace 𝕜 W]
(x : Q)
{s : Set Q}
{y : Q}
(hy : y ∈ interior s)

∀ᶠ (δ : 𝕜) in nhds 1, (AffineMap.homothety x δ) y ∈ s


theorem comp_apply (f : B →ₛₙₐ[ψ] C) (g : A →ₛₙₐ[φ] B) [MonoidHom.CompTriple φ ψ χ] (x : A) :
    f.comp g x = f (g x)

{R : Type u}
{S : Type u₁}
{T : Type u_1}
[Monoid R]
[Monoid S]
[Monoid T]
{φ : R →* S}
{A : Type v}
{B : Type w}
{C : Type w₁}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction S B]
[NonUnitalNonAssocSemiring C]
[DistribMulAction T C]
{ψ : S →* T}
{χ : R →* T}
(f : B →ₛₙₐ[ψ] C)
(g : A →ₛₙₐ[φ] B)
[φ.CompTriple ψ χ]
(x : A)


theorem coeff_derivativeFun (f : R⟦X⟧) (n : ℕ) :
    coeff R n f.derivativeFun = coeff R (n + 1) f * (n + 1)

{R : Type u_1}
[CommSemiring R]
(f : PowerSeries R)
(n : ℕ)

(PowerSeries.coeff R n) f.derivativeFun = (PowerSeries.coeff R (n + 1)) f * (↑n + 1)


/-- A condensed object regarded as a sheaf on `Profinite` satisfies the equalizer condition. -/
theorem equalizerCondition_profinite (X : Sheaf (coherentTopology Profinite.{u}) A) :
    EqualizerCondition X.val

(X : CategoryTheory.Sheaf (CategoryTheory.coherentTopology Profinite) A)


theorem Dep.nonempty (hD : M.Dep D) : D.Nonempty

{α : Type u_1}
{M : Matroid α}
{D : Set α}
(hD : M.Dep D)


@[simp]
theorem trace_transpose (A : Matrix n n R) : trace Aᵀ = trace A

{n : Type u_3}
{R : Type u_6}
[Fintype n]
[AddCommMonoid R]
(A : Matrix n n R)


@[simp, norm_cast]
theorem mod_to_nat : ∀ n d, ((n % d : Num) : ℕ) = n % d


theorem le_induced_generateFrom {α β} [t : TopologicalSpace α] {b : Set (Set β)} {f : α → β}
    (h : ∀ a : Set β, a ∈ b → IsOpen (f ⁻¹' a)) : t ≤ induced f (generateFrom b)

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace α]
{b : Set (Set β)}
{f : α → β}
(h : ∀ a ∈ b, IsOpen (f ⁻¹' a))

t ≤ TopologicalSpace.induced f (TopologicalSpace.generateFrom b)


/-- The structure presheaf, valued in `CommRing`, constructed by dressing up the `Type` valued
structure presheaf. -/
@[simps]
def structurePresheafInCommRing : Presheaf CommRingCat (ProjectiveSpectrum.top 𝒜)

(U : (TopologicalSpace.Opens ↑(ProjectiveSpectrum.top 𝒜))ᵒᵖ)

(AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf.structurePresheafInCommRing 𝒜).obj U =
  CommRingCat.of ((AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf.structureSheafInType 𝒜).val.obj U)


@[simp]
theorem isBigO_norm_right : (f =O[l] fun x => ‖g' x‖) ↔ f =O[l] g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{f : α → E}
{g' : α → F'}
{l : Filter α}


theorem X_sub_C_dvd_derivative_of_X_sub_C_dvd_divByMonic {K : Type*} [Field K] (f : K[X]) {a : K}
    (hf : (X - C a) ∣ f /ₘ (X - C a)) : X - C a ∣ derivative f

(hf : Polynomial.X - Polynomial.C a ∣ f /ₘ (Polynomial.X - Polynomial.C a))

Polynomial.X - Polynomial.C a ∣ Polynomial.derivative f


/-- 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 : G)

(IsometryEquiv.addRight c).toEquiv = Equiv.addRight c


/-- If all multiplications cancel on the right then every element is right-regular. -/
@[to_additive "If all additions cancel on the right then every element is add-right-regular."]
theorem IsRightRegular.all [Mul R] [IsRightCancelMul R] (g : R) : IsRightRegular g

{R : Type u_1}
[Mul R]
[IsRightCancelMul R]
(g : R)


theorem alternatization_apply (m : MultilinearMap R (fun _ : ι => M) N') (v : ι → M) :
    alternatization m v = ∑ σ : Perm ι, Equiv.Perm.sign σ • m.domDomCongr σ v

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N' : Type u_6}
[AddCommGroup N']
[Module R N']
{ι : Type u_7}
[Fintype ι]
[DecidableEq ι]
(m : MultilinearMap R (fun x => M) N')
(v : ι → M)

(MultilinearMap.alternatization m) v = ∑ σ : Equiv.Perm ι, Equiv.Perm.sign σ • (MultilinearMap.domDomCongr σ m) v


theorem contractNth_apply_of_ne (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (hjk : (j : ℕ) ≠ k) : contractNth j op g k = g (j.succAbove k)

{n : ℕ}
{α : Type u_1}
(j : Fin (n + 1))
(op : α → α → α)
(g : Fin (n + 1) → α)
(k : Fin n)
(hjk : ↑j ≠ ↑k)

j.contractNth op g k = g (j.succAbove k)


/-- If a Lie module `M` contains a self-normalizing Lie submodule `N`, then all terms of the upper
central series of `M` are contained in `N`.

An important instance of this situation arises from a Cartan subalgebra `H ⊆ L` with the roles of
`L`, `M`, `N` played by `H`, `L`, `H`, respectively. -/
theorem ucs_le_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) :
    (⊥ : LieSubmodule R L M).ucs k ≤ N₁

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{N₁ : LieSubmodule R L M}
(h : N₁.normalizer = N₁)
(k : ℕ)


theorem lt_iff_exists_coe_btwn [Preorder α] [DenselyOrdered α] [NoMinOrder α] {a b : WithBot α} :
    a < b ↔ ∃ x : α, a < ↑x ∧ ↑x < b

{α : Type u_1}
[Preorder α]
[DenselyOrdered α]
[NoMinOrder α]
{a b : WithBot α}


@[simp]
theorem testBit_lnot : ∀ n k, testBit (lnot n) k = not (testBit n k)


theorem LiftRel.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) (h : LiftRel r₁ s x y) :
    LiftRel r₂ s x y

∀ {α : Type u_1} {α_1 : Type u_2} {r₁ r₂ : α → α_1 → Prop} {β : Type u_3} {β_1 : Type u_4} {s : β → β_1 → Prop}
  {x : α ⊕ β} {y : α_1 ⊕ β_1}, (∀ (a : α) (b : α_1), r₁ a b → r₂ a b) → Sum.LiftRel r₁ s x y → Sum.LiftRel r₂ s x y


/-- `seminormFromConst' hf1 hc hpm c = f c`. -/
theorem seminormFromConst_apply_c : seminormFromConst' hf1 hc hpm c = f c

{R : Type u_1}
[CommRing R]
{c : R}
{f : RingSeminorm R}
(hf1 : f 1 ≤ 1)
(hc : f c ≠ 0)
(hpm : IsPowMul ⇑f)


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

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


theorem not_cliqueFree_iff (n : ℕ) : ¬G.CliqueFree n ↔ Nonempty ((⊤ : SimpleGraph (Fin n)) ↪g G)

{α : Type u_1}
{G : SimpleGraph α}
(n : ℕ)


/-- **Ruzsa's triangle inequality**. Multiplication version. -/
@[to_additive "**Ruzsa's triangle inequality**. Addition version."]
theorem ruzsa_triangle_inequality_mul_mul_mul (A B C : Finset α) :
    (A * C).card * B.card ≤ (A * B).card * (B * C).card

{α : Type u_1}
[CommGroup α]
[DecidableEq α]
(A B C : Finset α)


theorem csSup_mem_closure {s : Set α} (hs : s.Nonempty) (B : BddAbove s) : sSup s ∈ closure s

{α : Type u_1}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hs : s.Nonempty)
(B : BddAbove s)


/-- If the stabilizer of `a` is `S`, then the stabilizer of `g • a` is `gSg⁻¹`. -/
theorem stabilizer_smul_eq_stabilizer_map_conj (g : G) (a : α) :
    stabilizer G (g • a) = (stabilizer G a).map (MulAut.conj g).toMonoidHom

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
(g : G)
(a : α)

MulAction.stabilizer G (g • a) = Subgroup.map (MulEquiv.toMonoidHom (MulAut.conj g)) (MulAction.stabilizer G a)


protected theorem StrictMono.iterate {f : α → α} (hf : StrictMono f) (n : ℕ) : StrictMono f^[n]

{α : Type u}
[Preorder α]
{f : α → α}
(hf : StrictMono f)
(n : ℕ)


@[simp]
lemma sHomWhiskerLeft_id (K L : C) : sHomWhiskerLeft K (𝟙 L) = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.SimplicialCategory C]
(K L : C)

CategoryTheory.SimplicialCategory.sHomWhiskerLeft K (𝟙 L) = 𝟙 (CategoryTheory.SimplicialCategory.sHom K L)


theorem single_commute_single [Mul G] {a₁ a₂ : G} {b₁ b₂ : k}
    (ha : Commute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (single a₁ b₁) (single a₂ b₂)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Mul G]
{a₁ a₂ : G}
{b₁ b₂ : k}
(ha : Commute a₁ a₂)
(hb : Commute b₁ b₂)

Commute (MonoidAlgebra.single a₁ b₁) (MonoidAlgebra.single a₂ b₂)


/-- The frontier of a set is closed. -/
theorem isClosed_frontier : IsClosed (frontier s)

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


@[to_additive add_inf_eq_bot_of_coprime]
theorem inf_eq_bot_of_coprime {G : Type*} [Group G] {H K : Subgroup G}
    (h : Nat.Coprime (Nat.card H) (Nat.card K)) : H ⊓ K = ⊥

(h : (Nat.card ↥H).Coprime (Nat.card ↥K))


@[to_additive]
lemma map_comp_div' [DivInvMonoid G] [DivInvMonoid H] [MonoidHomClass F G H] (f : F)
    (hf : ∀ a, f a⁻¹ = (f a)⁻¹) (g h : ι → G) : f ∘ (g / h) = f ∘ g / f ∘ h

{ι : Type u_1}
{G : Type u_7}
{H : Type u_8}
{F : Type u_9}
[FunLike F G H]
[SubNegMonoid G]
[SubNegMonoid H]
[AddMonoidHomClass F G H]
(f : F)
(hf : ∀ (a : G), f (-a) = -f a)
(g h : ι → G)


theorem eLpNorm_le_eLpNorm_top_mul_eLpNorm (p : ℝ≥0∞) (f : α → E) {g : α → F}
    (hg : AEStronglyMeasurable g μ) (b : E → F → G)
    (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) :
    eLpNorm (fun x => b (f x) (g x)) p μ ≤ eLpNorm f ∞ μ * eLpNorm g p μ

(hg : MeasureTheory.AEStronglyMeasurable g μ)

(h : ∀ᵐ (x : α) ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊)

MeasureTheory.eLpNorm (fun x => b (f x) (g x)) p μ ≤ MeasureTheory.eLpNorm f ⊤ μ * MeasureTheory.eLpNorm g p μ


@[simp]
theorem coe_map (f : L →ₐ[K] L') : (S.map f : Set L') = f '' S

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
(S : IntermediateField K L)
(f : L →ₐ[K] L')


lemma _root_.Filter.EventuallyEq.isTheta {f g : α → E} (h : f =ᶠ[l] g) : f =Θ[l] g

{α : Type u_1}
{E : Type u_3}
[Norm E]
{l : Filter α}
{f g : α → E}
(h : f =ᶠ[l] g)


@[simp] lemma nilpotencyClass_eq_zero_of_subsingleton [Subsingleton R] :
    nilpotencyClass x = 0

{R : Type u_1}
{x : R}
[Zero R]
[Pow R ℕ]
[Subsingleton R]


/-- Any chain in the set of non-principal ideals has an upper bound which is non-principal.
(Namely, the union of the chain is such an upper bound.)
-/
theorem nonPrincipals_zorn (c : Set (Ideal R)) (hs : c ⊆ nonPrincipals R)
    (hchain : IsChain (· ≤ ·) c) {K : Ideal R} (hKmem : K ∈ c) :
    ∃ I ∈ nonPrincipals R, ∀ J ∈ c, J ≤ I

(hchain : IsChain (fun x x_1 => x ≤ x_1) c)


/-- Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration. -/
-- Porting note:
-- `simps` is incorrectly producing Prop-valued projections here,
-- so we manually specify which ones to produce.
-- See https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/!4.233204.20simps.20bug.20.28Grothendieck.20construction.29
@[simps! obj_base obj_fiber_as map_base]
def grothendieckTypeToCatInverse : G.Elements ⥤ Grothendieck (G ⋙ typeToCat)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(G : CategoryTheory.Functor C (Type w))
(X : G.Elements)

((CategoryTheory.Grothendieck.grothendieckTypeToCatInverse G).obj X).base = X.fst


theorem hasLiftingProperty_iff (adj : G ⊣ F) {A B : C} {X Y : D} (i : A ⟶ B) (p : X ⟶ Y) :
    HasLiftingProperty (G.map i) p ↔ HasLiftingProperty i (F.map p)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{G : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor D C}
(adj : G ⊣ F)
{A B : C}
{X Y : D}
(i : A ⟶ B)
(p : X ⟶ Y)

CategoryTheory.HasLiftingProperty (G.map i) p ↔ CategoryTheory.HasLiftingProperty i (F.map p)


@[simp]
theorem bddBelow_image (e : α ≃o β) {s : Set α} : BddBelow (e '' s) ↔ BddBelow s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
(e : α ≃o β)
{s : Set α}


@[simp]
theorem neg_top : -(⊤ : WithTop α) = ⊤

{α : Type u_1}
[LinearOrderedAddCommGroup α]


/-- Predicate for semiring homomorphisms (deprecated -- use the bundled `RingHom` version). -/
structure IsSemiringHom {α : Type u} {β : Type v} [Semiring α] [Semiring β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves the additive identity. -/
  map_zero : f 0 = 0
  /-- The proposition that `f` preserves the multiplicative identity. -/
  map_one : f 1 = 1
  /-- The proposition that `f` preserves addition. -/
  map_add : ∀ x y, f (x + y) = f x + f y
  /-- The proposition that `f` preserves multiplication. -/
  map_mul : ∀ x y, f (x * y) = f x * f y

{α : Type u}
{β : Type v}
[Semiring α]
[Semiring β]
{f : α → β}
(self : IsSemiringHom f)


@[simp]
theorem Ico_mk_mk : Ico (⟨i, a⟩ : Sigma α) ⟨i, b⟩ = (Ico a b).map (Embedding.sigmaMk i)

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → Preorder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(i : ι)
(a b : α i)

Finset.Ico ⟨i, a⟩ ⟨i, b⟩ = Finset.map (Function.Embedding.sigmaMk i) (Finset.Ico a b)


theorem monotone_approx (i : ℕ → β) (f : α → β) : Monotone (approx i f)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[SemilatticeSup β]
[OrderBot β]
[Zero β]
(i : ℕ → β)
(f : α → β)

Monotone (MeasureTheory.SimpleFunc.approx i f)


@[simp]
theorem unitization_apply (x : Unitization R s) :
    unitization s x = algebraMap R A x.fst + x.snd

{R : Type u_1}
{S : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[SetLike S A]
[hSA : NonUnitalSubsemiringClass S A]
[hSRA : SMulMemClass S R A]
(s : S)
(x : Unitization R ↥s)

(NonUnitalSubalgebra.unitization s) x = (algebraMap R A) x.fst + ↑x.snd


@[to_additive]
theorem EventuallyEq.smul {𝕜} [SMul 𝕜 β] {l : Filter α} {f f' : α → 𝕜} {g g' : α → β}
    (hf : f =ᶠ[l] f') (hg : g =ᶠ[l] g') : (fun x => f x • g x) =ᶠ[l] fun x => f' x • g' x

{α : Type u}
{β : Type v}
{𝕜 : Type u_2}
[VAdd 𝕜 β]
{l : Filter α}
{f f' : α → 𝕜}
{g g' : α → β}
(hf : f =ᶠ[l] f')
(hg : g =ᶠ[l] g')

(fun x => f x +ᵥ g x) =ᶠ[l] fun x => f' x +ᵥ g' x


@[simp] lemma flip_inl : t.flip.inl = t.inr

(t : CategoryTheory.Limits.PushoutCocone f g)


theorem vadd_mem_pointwise_vadd_iff {v : V} {s : AffineSubspace k P} {p : P} :
    v +ᵥ p ∈ v +ᵥ s ↔ p ∈ s

{k : Type u_1}
[Ring k]
{V : Type u_2}
{P : Type u_3}
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{v : V}
{s : AffineSubspace k P}
{p : P}


@[to_additive (attr := simp)]
theorem coe_comp' {G H K : Type _} [CommGroup G] [CommGroup H] [CommGroup K]
    (f : G →* H) (g : H →* K) :
    @DFunLike.coe (G →* K) G (fun _ ↦ K) MonoidHom.instFunLike (CategoryStruct.comp
      (X := CommGrp.of G) (Y := CommGrp.of H) (Z := CommGrp.of K) f g) = g ∘ f

{G H K : Type u_1}
[AddCommGroup G]
[AddCommGroup H]
[AddCommGroup K]
(f : G →+ H)
(g : H →+ K)


@[simp]
theorem sinh_sub_cosh : sinh x - cosh x = -exp (-x)

Real.sinh x - Real.cosh x = -Real.exp (-x)


/-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G]

(k : Type u₁)
(G : Type u₂)
[Semiring k]
[Add G]
(a : Multiplicative G)

(AddMonoidAlgebra.ofMagma k G) a = AddMonoidAlgebra.single a 1


@[simp]
theorem ι_ne_one [Nontrivial R] (x : X) : ι R x ≠ 1

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
[Nontrivial R]
(x : X)


/-- The "greater than" relation on `Upto p` is well founded if (and only if) there exists a value
satisfying `p`. -/
protected theorem wf : (∃ x, p x) → WellFounded (Upto.GT p)

(∃ x, p x) → WellFounded (Nat.Upto.GT p)


theorem sin_arcsin' {x : ℝ} (hx : x ∈ Icc (-1 : ℝ) 1) : sin (arcsin x) = x


/-- The map sending a congruence relation to its underlying binary relation is injective. -/
@[to_additive "The map sending an additive congruence relation to its underlying binary relation
is injective."]
theorem ext' {c d : Con M} (H : ⇑c = ⇑d) : c = d

{M : Type u_1}
[Mul M]
{c d : Con M}
(H : ⇑c = ⇑d)


theorem UniformSpace.mem_closure_iff_ball {s : Set α} {x} :
    x ∈ closure s ↔ ∀ {V}, V ∈ 𝓤 α → (ball x V ∩ s).Nonempty

{α : Type ua}
[UniformSpace α]
{s : Set α}
{x : α}

x ∈ closure s ↔ ∀ {V : Set (α × α)}, V ∈ 𝓤 α → (UniformSpace.ball x V ∩ s).Nonempty


theorem isFixedPt_newtonMap_of_isUnit_iff (h : IsUnit <| aeval x (derivative P)) :
    IsFixedPt P.newtonMap x ↔ aeval x P = 0

(h : IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)))

Function.IsFixedPt P.newtonMap x ↔ (Polynomial.aeval x) P = 0


@[simp]
theorem sInter_image (f : α → Set β) (s : Set α) : ⋂₀ (f '' s) = ⋂ x ∈ s, f x

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


theorem univ_eq_singleton_of_card_one {α} [Fintype α] (x : α) (h : Fintype.card α = 1) :
    (univ : Finset α) = {x}

{α : Type u_4}
[Fintype α]
(x : α)
(h : Fintype.card α = 1)


@[simp] theorem elim_comp_inl (f : α → γ) (g : β → γ) : Sum.elim f g ∘ inl = f

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


theorem toIocMod_apply_right (a : α) : toIocMod hp a (a + p) = a + p

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a : α)


lemma HomologicalComplexUpToQuasiIso.Q_inverts_homotopyEquivalences :
    (HomologicalComplex.homotopyEquivalences C c).IsInvertedBy
      HomologicalComplexUpToQuasiIso.Q


/-- The vertical composition of 2-squares. (Variant where we allow the replacement of
the vertical compositions by isomorphic functors.) -/
@[simps!]
def vComp' {L₁₂ : C₁ ⥤ C₃} {R₁₂ : D₁ ⥤ D₃} (eL : L₁ ⋙ L₂ ≅ L₁₂)
    (eR : R₁ ⋙ R₂ ≅ R₁₂) : TwoSquare H₁ L₁₂ R₁₂ H₃

(w : CategoryTheory.TwoSquare H₁ L₁ R₁ H₂)

(w' : CategoryTheory.TwoSquare H₂ L₂ R₂ H₃)

(w.vComp' w' eL eR).app X =
  CategoryTheory.CategoryStruct.comp (eR.inv.app (H₁.obj X))
    (CategoryTheory.CategoryStruct.comp (R₂.map (w.app X))
      (CategoryTheory.CategoryStruct.comp (w'.app (L₁.obj X)) (H₃.map (eL.hom.app X))))


/-- Commutative monoid objects in `C` are "just" braided lax monoidal functors from the trivial
braided monoidal category to `C`.
-/
@[simps]
def equivLaxBraidedFunctorPUnit : LaxBraidedFunctor (Discrete PUnit.{u + 1}) C ≌ CommMon_ C

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

(CommMon_.equivLaxBraidedFunctorPUnit C).functor = CommMon_.EquivLaxBraidedFunctorPUnit.laxBraidedToCommMon C


theorem not_mem_Ioo_of_ge (hb : b ≤ c) : c ∉ Ioo a b

{α : Type u_1}
[Preorder α]
{a b c : α}
(hb : b ≤ c)


@[simp] theorem length_list (n) : (list n).length = n


theorem aeval_verschiebung_poly' (x : 𝕎 R) (n : ℕ) :
    aeval x.coeff (verschiebungPoly n) = (verschiebungFun x).coeff n

{p : ℕ}
{R : Type u_1}
[CommRing R]
(x : WittVector p R)
(n : ℕ)

(MvPolynomial.aeval x.coeff) (WittVector.verschiebungPoly n) = x.verschiebungFun.coeff n


theorem pairwise_iff_of_refl [IsRefl α r] : s.Pairwise r ↔ ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → r a b

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
[IsRefl α r]

s.Pairwise r ↔ ∀ ⦃a : α⦄, a ∈ s → ∀ ⦃b : α⦄, b ∈ s → r a b


lemma dblY_of_Y_eq [NoZeroDivisors R] {P Q : Fin 3 → R} (hQz : Q z ≠ 0)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 = Q y * P z ^ 3)
    (hy' : P y * Q z ^ 3 = W'.negY Q * P z ^ 3) : W'.dblY P = W'.dblU P ^ 3


@[simp]
theorem coe_smulRightₗ (c : M →L[R] S) : ⇑(smulRightₗ c : M₂ →ₗ[T] M →L[R] M₂) = c.smulRight

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[Semiring S]
[Semiring T]
[Module R S]
[AddCommMonoid M₂]
[Module R M₂]
[Module S M₂]
[IsScalarTower R S M₂]
[TopologicalSpace S]
[TopologicalSpace M₂]
[ContinuousSMul S M₂]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousAdd M₂]
[Module T M₂]
[ContinuousConstSMul T M₂]
[SMulCommClass R T M₂]
[SMulCommClass S T M₂]
(c : M →L[R] S)


/-- If preconnected set in a linear order space is unbounded below and above, then it is the whole
space. -/
theorem IsPreconnected.eq_univ_of_unbounded {s : Set α} (hs : IsPreconnected s) (hb : ¬BddBelow s)
    (ha : ¬BddAbove s) : s = univ

{α : Type v}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{s : Set α}
(hs : IsPreconnected s)
(hb : ¬BddBelow s)
(ha : ¬BddAbove s)


theorem le_of_inf_le_sup_le (h₁ : x ⊓ z ≤ y ⊓ z) (h₂ : x ⊔ z ≤ y ⊔ z) : x ≤ y

{α : Type u}
[DistribLattice α]
{x y z : α}
(h₁ : x ⊓ z ≤ y ⊓ z)
(h₂ : x ⊔ z ≤ y ⊔ z)


@[simp]
lemma DilationEquiv.smulTorsor_ratio {c : P} {k : 𝕜} (hk : k ≠ 0) {x y : E}
    (h : dist x y ≠ 0) : ratio (smulTorsor c hk) = ‖k‖₊

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

Dilation.ratio (DilationEquiv.smulTorsor c hk) = ‖k‖₊


@[to_additive]
theorem Multipliable.hasProd_iff (h : Multipliable f) : HasProd f a ↔ ∏' b, f b = a

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
[T2Space α]
(h : Multipliable f)


theorem takeI_left' {l₁ l₂ : List α} {n} (h : length l₁ = n) : takeI n (l₁ ++ l₂) = l₁

{α : Type u}
[Inhabited α]
{l₁ l₂ : List α}
{n : ℕ}
(h : l₁.length = n)


theorem ne_nat (h : Irrational x) (m : ℕ) : x ≠ m


theorem irreducible_of_degree_eq_one (hp1 : degree p = 1) : Irreducible p

{R : Type u}
[Field R]
{p : R[X]}
(hp1 : p.degree = 1)


theorem cast_type (eq : ds₁ = ds₂) (a : Holor α ds₁) :
    cast (congr_arg (Holor α) eq) a = fun t => a (cast (congr_arg HolorIndex eq.symm) t)

{α : Type}
{ds₁ ds₂ : List ℕ}
(eq : ds₁ = ds₂)
(a : Holor α ds₁)


lemma Equicontinuous.equicontinuousOn {F : ι → X → α} (H : Equicontinuous F)
    (S : Set X) : EquicontinuousOn F S

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
(H : Equicontinuous F)
(S : Set X)


@[to_additive (attr := gcongr) neg_lt_neg]
theorem inv_lt_inv' : a < b → b⁻¹ < a⁻¹

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


theorem UniformEmbedding.of_comp_iff {g : β → γ} (hg : UniformEmbedding g) {f : α → β} :
    UniformEmbedding (g ∘ f) ↔ UniformEmbedding f

{α : Type u}
{β : Type v}
{γ : Type w}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{g : β → γ}
(hg : UniformEmbedding g)
{f : α → β}


/-- If the vector passed to `secondInter` is given by a subtraction involving the point in
`secondInter`, the three points are collinear. -/
theorem Sphere.secondInter_collinear (s : Sphere P) (p p' : P) :
    Collinear ℝ ({p, p', s.secondInter p (p' -ᵥ p)} : Set P)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : EuclideanGeometry.Sphere P)
(p p' : P)

Collinear ℝ {p, p', s.secondInter p (p' -ᵥ p)}


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


@[norm_cast]
theorem coe_one : (↑(1 : R) : A) = 1

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


@[to_additive (attr := simp)]
theorem isUnit_mul_self_iff : IsUnit (a * a) ↔ IsUnit a


/-- Given `e : ComplexShape.Embedding c c'`, this is the restriction
functor `HomologicalComplex C c' ⥤ HomologicalComplex C c`. -/
@[simps]
noncomputable def restrictionFunctor [HasZeroMorphisms C] :
    HomologicalComplex C c' ⥤ HomologicalComplex C c

(e.restrictionFunctor C).obj K = K.restriction e


/-- If `f` is a conservative self-map and `s` is a measurable set of positive measure, then
`ae μ`-frequently we have `x ∈ s` and `s` returns to `s` under infinitely many iterations of `f`. -/
theorem frequently_ae_mem_and_frequently_image_mem (hf : Conservative f μ)
    (hs : NullMeasurableSet s μ) (h0 : μ s ≠ 0) : ∃ᵐ x ∂μ, x ∈ s ∧ ∃ᶠ n in atTop, f^[n] x ∈ s

(hs : MeasureTheory.NullMeasurableSet s μ)

∃ᵐ (x : α) ∂μ, x ∈ s ∧ ∃ᶠ (n : ℕ) in Filter.atTop, f^[n] x ∈ s


/-- Restrict a partial homeomorphism to the subsets of the source and target
that consist of points `x ∈ f.source`, `y = f x ∈ f.target`
such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.

Note that `n` is a natural number, not `∞`,
because the set of points of `C^∞`-smoothness of `f` is not guaranteed to be open. -/
@[simps! apply symm_apply source target]
def restrContDiff (f : PartialHomeomorph E F) (n : ℕ) : PartialHomeomorph E F

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : PartialHomeomorph E F)
(n : ℕ)

(PartialHomeomorph.restrContDiff 𝕜 f n).target =
  f.target ∩ {y | ContDiffAt 𝕜 (↑n) (↑f.symm) y ∧ ContDiffAt 𝕜 (↑n) (↑f) (↑f.symm y)}


lemma MonovaryOn.mul_right₀ (hg₁ : ∀ i ∈ s, 0 ≤ g₁ i) (hg₂ : ∀ i ∈ s, 0 ≤ g₂ i)
    (h₁ : MonovaryOn f g₁ s) (h₂ : MonovaryOn f g₂ s) : MonovaryOn f (g₁ * g₂) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemiring α]
[LinearOrderedSemiring β]
{s : Set ι}
{f : ι → α}
{g₁ g₂ : ι → β}
(hg₁ : ∀ i ∈ s, 0 ≤ g₁ i)
(hg₂ : ∀ i ∈ s, 0 ≤ g₂ i)
(h₁ : MonovaryOn f g₁ s)
(h₂ : MonovaryOn f g₂ s)


theorem univ_pi_Ico_ae_eq_Icc {f g : ∀ i, α i} :
    (pi univ fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g

{μ : (i : ι) → MeasureTheory.Measure (α i)}

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

[∀ (i : ι), MeasureTheory.NoAtoms (μ i)]

(Set.univ.pi fun i => Set.Ico (f i) (g i)) =ᵐ[MeasureTheory.Measure.pi μ] Set.Icc f g


@[simp] lemma exterior_union (s t : Set α) : exterior (s ∪ t) = exterior s ∪ exterior t

{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]
(s t : Set α)


/-- An auxiliary lemma that can be used to prove that coercion `Mˣ → M` is a topological embedding.
Use `Units.embedding_val₀`, `Units.embedding_val`, or `toUnits_homeomorph` instead. -/
@[to_additive "An auxiliary lemma that can be used to prove that coercion `AddUnits M → M` is a
topological embedding. Use `AddUnits.embedding_val` or `toAddUnits_homeomorph` instead."]
lemma embedding_val_mk {M : Type*} [DivisionMonoid M] [TopologicalSpace M]
    (h : ContinuousOn Inv.inv {x : M | IsUnit x}) : Embedding (val : Mˣ → M)

(h : ContinuousOn Neg.neg {x | IsAddUnit x})


/-- The `n`th element of a list -/
theorem get?_ofFn {n} (f : Fin n → α) (i) : get? (ofFn f) i = ofFnNthVal f i

{α : Type u}
{n : ℕ}
(f : Fin n → α)
(i : ℕ)

(List.ofFn f).get? i = List.ofFnNthVal f i


theorem coord_apply [DecidableEq ι] (i j : ι) : b.coord i (b j) = if i = j then 1 else 0

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
[DecidableEq ι]
(i j : ι)

(b.coord i) (b j) = if i = j then 1 else 0


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


@[simp]
theorem stdBasis_apply' (i i' : ι) : (stdBasis R (fun _x : ι => R) i) 1 i' = ite (i = i') 1 0

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
[DecidableEq ι]
(i i' : ι)

(LinearMap.stdBasis R (fun _x => R) i) 1 i' = if i = i' then 1 else 0


theorem nth_eq_zero_mono (h₀ : ¬p 0) {a b : ℕ} (hab : a ≤ b) (ha : nth p a = 0) : nth p b = 0

{p : ℕ → Prop}
(h₀ : ¬p 0)
{a b : ℕ}
(hab : a ≤ b)
(ha : Nat.nth p a = 0)


/-- Any `CommMagma G` that satisfies `IsRightCancelMul G` also satisfies `IsCancelMul G`. -/
@[to_additive AddCommMagma.IsRightCancelAdd.toIsCancelAdd "Any `AddCommMagma G` that satisfies
`IsRightCancelAdd G` also satisfies `IsCancelAdd G`."]
lemma CommMagma.IsRightCancelMul.toIsCancelMul (G : Type u) [CommMagma G] [IsRightCancelMul G] :
    IsCancelMul G

(G : Type u)
[AddCommMagma G]
[IsRightCancelAdd G]


theorem ext_iff {f g : ArithmeticFunction R} : f = g ↔ ∀ x, f x = g x

{R : Type u_1}
[Zero R]
{f g : ArithmeticFunction R}


theorem HasFDerivWithinAt.cos (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => Real.cos (f x)) (-Real.sin (f x) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{s : Set E}
(hf : HasFDerivWithinAt f f' s x)


theorem Coprime.gcd_left (k : Nat) (hmn : Coprime m n) : Coprime (gcd k m) n

{m n : Nat}
(k : Nat)
(hmn : m.Coprime n)


theorem cons_eq_smul {i : ι} (g : G i)
    (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
    (hgr : g ∉ (φ i).range) : cons g w hmw hgr = of (φ := φ) i g  • w

{d : Monoid.PushoutI.NormalWord.Transversal φ}

Monoid.PushoutI.NormalWord.cons g w hmw hgr = (Monoid.PushoutI.of i) g • w


@[simp]
theorem bot_apply (a : α) : (⊥ : BotHom α β) a = ⊥

{α : Type u_2}
{β : Type u_3}
[Bot α]
[LE β]
[OrderBot β]
(a : α)


theorem init_nsmul (m : ℕ) (x : 𝕎 R) (n : ℕ) : init n (m • x) = init n (m • init n x)

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

WittVector.init n (m • x) = WittVector.init n (m • WittVector.init n x)


protected theorem sub_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x y : A} (hx : x ∈ S) (hy : y ∈ S) : x - y ∈ S


theorem prod_mono_right (s : NonUnitalSubring R) :
    Monotone fun t : NonUnitalSubring S => s.prod t

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(s : NonUnitalSubring R)


theorem Restriction.antisymm {M' : Matroid α} (h : M ≤r M') (h' : M' ≤r M) : M = M'

{α : Type u_1}
{M M' : Matroid α}
(h : M.Restriction M')
(h' : M'.Restriction M)


/-- The composition of two group homomorphisms is a group homomorphism. -/
@[to_additive
      "The composition of two additive group homomorphisms is an additive
      group homomorphism."]
theorem comp (hf : IsGroupHom f) {γ} [Group γ] {g : β → γ} (hg : IsGroupHom g) :
    IsGroupHom (g ∘ f)

{α : Type u}
{β : Type v}
[AddGroup α]
[AddGroup β]
{f : α → β}
(hf : IsAddGroupHom f)
{γ : Type u_1}
[AddGroup γ]
{g : β → γ}
(hg : IsAddGroupHom g)


@[to_additive]
theorem op_sSup (S : Set (Subgroup G)) : (sSup S).op = sSup (.unop ⁻¹' S)

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

(sSup S).op = sSup (AddSubgroup.unop ⁻¹' S)


/-- The minimal star subalgebra that contains `s`. -/
@[simps!]
def adjoin (s : Set A) : StarSubalgebra R A

(R : Type u_2)
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
(s : Set A)

↑(StarAlgebra.adjoin R s) = ⋂ t, ⋂ (_ : Set.range ⇑(algebraMap R A) ⊆ ↑t ∧ s ⊆ ↑t ∧ star s ⊆ ↑t), ↑t


theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(h : MeasureTheory.Memℒp f 2 μ)

MeasureTheory.Integrable (fun x => f x ^ 2) μ


@[simp]
theorem coe_toSubfield : (S.toSubfield : Set L) = S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)


@[to_additive]
protected theorem aEStronglyMeasurable_on_iff {β : Type*} [TopologicalSpace β]
    [PseudoMetrizableSpace β] (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → β} (hf : ∀ (g : G) (x), f (g • x) = f x) :
    AEStronglyMeasurable f (μ.restrict s) ↔ AEStronglyMeasurable f (μ.restrict t)

[MeasureTheory.VAddInvariantMeasure G α μ]

(hs : MeasureTheory.IsAddFundamentalDomain G s μ)

(ht : MeasureTheory.IsAddFundamentalDomain G t μ)

MeasureTheory.AEStronglyMeasurable f (μ.restrict s) ↔ MeasureTheory.AEStronglyMeasurable f (μ.restrict t)


/-- The counit isomorphism of the
equivalence `triangleOpEquivalence C : (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ` . -/
@[simps!]
noncomputable def counitIso : inverse C ⋙ functor C ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

((CategoryTheory.Pretriangulated.TriangleOpEquivalence.counitIso C).inv.app X).hom₃ =
  CategoryTheory.CategoryStruct.id X.obj₃


theorem HasStrictDerivAt.sqrt (hf : HasStrictDerivAt f f' x) (hx : f x ≠ 0) :
    HasStrictDerivAt (fun t => √(f t)) (f' / (2 * √(f x))) x

{f : ℝ → ℝ}
{f' x : ℝ}
(hf : HasStrictDerivAt f f' x)
(hx : f x ≠ 0)


theorem appendFun_aux {α α' : TypeVec n} {β β' : Type*} (f : (α ::: β) ⟹ (α' ::: β')) :
    (dropFun f ::: lastFun f) = f

(TypeVec.dropFun f ::: TypeVec.lastFun f) = f


theorem _root_.MeasureTheory.memℒp_re_im_iff {f : α → K} :
    Memℒp (fun x ↦ RCLike.re (f x)) p μ ∧ Memℒp (fun x ↦ RCLike.im (f x)) p μ ↔
      Memℒp f p μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{K : Type u_6}
[RCLike K]
{f : α → K}

MeasureTheory.Memℒp (fun x => RCLike.re (f x)) p μ ∧ MeasureTheory.Memℒp (fun x => RCLike.im (f x)) p μ ↔
  MeasureTheory.Memℒp f p μ


theorem cons_subset {a} {l₁ l₂ : Lists' α true} : Lists'.cons a l₁ ⊆ l₂ ↔ a ∈ l₂ ∧ l₁ ⊆ l₂

{α : Type u_1}
{a : Lists α}
{l₁ l₂ : Lists' α true}


@[reassoc]
theorem ι_desc (j : J) : ι arrows j ≫ desc f fs w = fs _

[CategoryTheory.Limits.HasWidePushout B objs arrows]

CategoryTheory.Limits.WidePushout.ι arrows j ≫ CategoryTheory.Limits.WidePushout.desc f fs w = fs j


theorem limsup_le_iff {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α} {u : α → β} {x : β}
    (h₁ : f.IsCoboundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h₂ : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault) :
    limsup u f ≤ x ↔ ∀ y > x, ∀ᶠ a in f, u a < y

(h₁ : Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

(h₂ : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

Filter.limsup u f ≤ x ↔ ∀ y > x, ∀ᶠ (a : α) in f, u a < y


@[simp]
theorem mk_whiskerRight {X₁ X₂ : F C} (f : X₁ ⟶ᵐ X₂) (Y : F C) :
    ⟦f.whiskerRight Y⟧ = MonoidalCategory.whiskerRight (C := F C) (f := ⟦f⟧) (Y := Y)

{X₁ X₂ : CategoryTheory.FreeMonoidalCategory C}

(Y : CategoryTheory.FreeMonoidalCategory C)

⟦f.whiskerRight Y⟧ = CategoryTheory.MonoidalCategory.whiskerRight ⟦f⟧ Y


@[to_additive (attr := simp)]
theorem coe_coeMulHom [Monoid M] : (coeMulHom l : (α → M) → Germ l M) = ofFun

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
[Monoid M]

⇑(Filter.Germ.coeMulHom l) = Filter.Germ.ofFun


@[to_additive]
protected theorem mul_le_iff_le_one_right [MulOneClass α] [CovariantClass α α (· * ·) (· ≤ ·)]
    {a b : α} (ha : MulLECancellable a) :
    a * b ≤ a ↔ b ≤ 1

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


@[simp]
theorem proj_bot_eq [LocallyConnectedSpace X] {x y : X} :
    proj ⊥ x = proj ⊥ y ↔ connectedComponent x = connectedComponent y

{X : Type u_2}
[TopologicalSpace X]
[LocallyConnectedSpace X]
{x y : X}

⊥.proj x = ⊥.proj y ↔ connectedComponent x = connectedComponent y


/-- Extend the domain of a `Finsupp` by using `0` where `P x` does not hold. -/
@[simps! support toFun]
def extendDomain (f : Subtype P →₀ M) : α →₀ M

{α : Type u_1}
{M : Type u_13}
[Zero M]
{P : α → Prop}
[DecidablePred P]
(f : Subtype P →₀ M)
(a : α)

f.extendDomain a = if h : P a then f ⟨a, h⟩ else 0


theorem two_nsmul_lie_lmul_lmul_add_eq_lie_lmul_lmul_add (a b : A) :
    2 • (⁅L a, L (a * b)⁆ + ⁅L b, L (b * a)⁆) = ⁅L (a * a), L b⁆ + ⁅L (b * b), L a⁆

{A : Type u_1}
[NonUnitalNonAssocCommRing A]
[IsCommJordan A]
(a b : A)


theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
    (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ

{f : ℕ → Ω → ℝ}

(hint : ∀ (i : ℕ), MeasureTheory.Integrable (f i) μ)


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

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

(CategoryTheory.Limits.BinaryBicone.ofLimitCone ht).snd = t.π.app { as := CategoryTheory.Limits.WalkingPair.right }


@[simp]
theorem coe_subset {l₁ l₂ : List α} : (l₁ : Multiset α) ⊆ l₂ ↔ l₁ ⊆ l₂

↑l₁ ⊆ ↑l₂ ↔ l₁ ⊆ l₂


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

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

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


@[to_additive (attr := simp)]
theorem self_le_mul_right (a b : α) : a ≤ a * b

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


/-- A version of `UniformContinuous.inf_dom_right` for binary functions -/
theorem uniformContinuous_inf_dom_right₂ {α β γ} {f : α → β → γ} {ua1 ua2 : UniformSpace α}
    {ub1 ub2 : UniformSpace β} {uc1 : UniformSpace γ}
    (h : by haveI := ua2; haveI := ub2; exact UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := ua1 ⊓ ua2; haveI := ub1 ⊓ ub2
      exact UniformContinuous fun p : α × β => f p.1 p.2

{f : α → β → γ}

(h : UniformContinuous fun p => f p.1 p.2)


theorem isTopologicalBasis_basic_opens :
    TopologicalSpace.IsTopologicalBasis
      (Set.range fun r : A => (basicOpen 𝒜 r : Set (ProjectiveSpectrum 𝒜)))

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]

TopologicalSpace.IsTopologicalBasis (Set.range fun r => ↑(ProjectiveSpectrum.basicOpen 𝒜 r))


theorem min_mem {r : α → α → Prop} (H : WellFounded r) (s : Set α) (h : s.Nonempty) :
    H.min s h ∈ s

{α : Type u_1}
{r : α → α → Prop}
(H : WellFounded r)
(s : Set α)
(h : s.Nonempty)


theorem Cofix.dest_corec {α : TypeVec n} {β : Type u} (g : β → F (α.append1 β)) (x : β) :
    Cofix.dest (Cofix.corec g x) = appendFun id (Cofix.corec g) <$$> g x

{n : ℕ}
{F : TypeVec.{u} (n + 1) → Type u}
[q : MvQPF F]
{α : TypeVec.{u} n}
{β : Type u}
(g : β → F (α ::: β))
(x : β)

(MvQPF.Cofix.corec g x).dest = (TypeVec.id ::: MvQPF.Cofix.corec g) <$$> g x


@[simp]
theorem comp_continuous_iff {α : Type*} [TopologicalSpace α] {g : α → P} :
    Continuous (f ∘ g) ↔ Continuous g

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)
{α : Type u_14}
[TopologicalSpace α]
{g : α → P}


{α : Type u}
[SemilatticeSup α]
{a b : α}


@[to_additive]
theorem compl_mulSupport {f : α → M} : (mulSupport f)ᶜ = { x | f x = 1 }

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

(Function.mulSupport f)ᶜ = {x | f x = 1}


theorem measure_le_tsum [SecondCountableTopology α] : μ s ≤ ∑' x : h.index, μ (h.covering x)

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{v : VitaliFamily μ}
{f : α → Set (Set α)}
{s : Set α}
(h : v.FineSubfamilyOn f s)
[SecondCountableTopology α]

μ s ≤ ∑' (x : ↑h.index), μ (h.covering ↑x)


@[simp]
theorem toIocMod_sub (a b : α) : toIocMod hp a (b - p) = toIocMod hp a b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)


@[simp]
theorem coe_none : (@Option.none α : Part α) = none


@[to_additive]
lemma _root_.MeasurableSet.mul_closure_one_eq {s : Set G} (hs : MeasurableSet s) :
    s * (closure {1} : Set G) = s

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s : Set G}
(hs : MeasurableSet s)


/-- If `‖pₙ‖ rⁿ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : ℝ) {r : ℝ≥0} (h : ∀ n : ℕ, ‖p n‖ * (r : ℝ) ^ n ≤ C) :
    (r : ℝ≥0∞) ≤ p.radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(C : ℝ)
{r : ℝ≥0}
(h : ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C)


/-- Pulling back a Polish topology under an equiv gives again a Polish topology. -/
theorem _root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace β] (f : α ≃ β) :
    @PolishSpace α (t.induced f)

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace β]
[PolishSpace β]
(f : α ≃ β)


/-- The equivalence, given by swapping factors, between `C × D` and `D × C`.
-/
@[simps!]
def braiding : C × D ≌ D × C

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

(CategoryTheory.Prod.braiding C D).functor.obj X = (X.2, X.1)


@[simp] lemma natTrailingDegree_eq_zero : natTrailingDegree p = 0 ↔ p = 0 ∨ coeff p 0 ≠ 0

p.natTrailingDegree = 0 ↔ p = 0 ∨ p.coeff 0 ≠ 0


@[to_additive] lemma AntivaryOn.pow_right (hfg : AntivaryOn f g s) (n : ℕ) :
    AntivaryOn f (g ^ n) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[LinearOrderedAddCommGroup β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hfg : AntivaryOn f g s)
(n : ℕ)


@[to_additive (attr := simp)]
theorem mulIndicator_eq_one : (mulIndicator s f = fun x => 1) ↔ Disjoint (mulSupport f) s

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s : Set α}
{f : α → M}

(s.indicator f = fun x => 0) ↔ Disjoint (Function.support f) s


theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b

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


/-- **Harris-Kleitman inequality**: Any two lower sets of finsets correlate. -/
theorem IsLowerSet.le_card_inter_finset (h𝒜 : IsLowerSet (𝒜 : Set (Finset α)))
    (hℬ : IsLowerSet (ℬ : Set (Finset α))) : 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card

{α : Type u_1}
[DecidableEq α]
{𝒜 ℬ : Finset (Finset α)}
[Fintype α]
(h𝒜 : IsLowerSet ↑𝒜)
(hℬ : IsLowerSet ↑ℬ)


theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v

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


protected theorem neg_ne_zero : -a ≠ 0 ↔ a ≠ 0


lemma lawson_le_scott : lawson α ≤ scott α


theorem mem_or_eq_of_mem_set : ∀ {l : List α} {n : Nat} {a b : α}, a ∈ l.set n b → a ∈ l ∨ a = b

{α : Type u_1}
{l : List α}
{n : Nat}
{a b : α}


/-- One implication of the portmanteau theorem:
Weak convergence of probability measures implies that the limsup of the measures of any closed
set is at most the measure of the closed set under the limit probability measure.
-/
theorem ProbabilityMeasure.limsup_measure_closed_le_of_tendsto {Ω ι : Type*} {L : Filter ι}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [OpensMeasurableSpace Ω] [HasOuterApproxClosed Ω]
    {μ : ProbabilityMeasure Ω} {μs : ι → ProbabilityMeasure Ω} (μs_lim : Tendsto μs L (𝓝 μ))
    {F : Set Ω} (F_closed : IsClosed F) :
    (L.limsup fun i => (μs i : Measure Ω) F) ≤ (μ : Measure Ω) F

{μ : MeasureTheory.ProbabilityMeasure Ω}

{μs : ι → MeasureTheory.ProbabilityMeasure Ω}

Filter.limsup (fun i => ↑(μs i) F) L ≤ ↑μ F


@[simp]
theorem strictMonoOn_toDual_comp_iff : StrictMonoOn (toDual ∘ f : α → βᵒᵈ) s ↔ StrictAntiOn f s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s : Set α}

StrictMonoOn (⇑OrderDual.toDual ∘ f) s ↔ StrictAntiOn f s


lemma IsSublattice.inter (hs : IsSublattice s) (ht : IsSublattice t) : IsSublattice (s ∩ t)

{α : Type u_2}
[Lattice α]
{s t : Set α}
(hs : IsSublattice s)
(ht : IsSublattice t)


theorem prodAssoc_prod [SFinite τ] :
    map MeasurableEquiv.prodAssoc ((μ.prod ν).prod τ) = μ.prod (ν.prod τ)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSpace γ]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
{τ : MeasureTheory.Measure γ}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[MeasureTheory.SFinite τ]

MeasureTheory.Measure.map (⇑MeasurableEquiv.prodAssoc) ((μ.prod ν).prod τ) = μ.prod (ν.prod τ)


theorem cauchySeq_Lp_iff_cauchySeq_ℒp {ι} [Nonempty ι] [SemilatticeSup ι] [hp : Fact (1 ≤ p)]
    (f : ι → Lp E p μ) :
    CauchySeq f ↔ Tendsto (fun n : ι × ι => eLpNorm (⇑(f n.fst) - ⇑(f n.snd)) p μ) atTop (𝓝 0)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{ι : Type u_5}
[Nonempty ι]
[SemilatticeSup ι]
[hp : Fact (1 ≤ p)]
(f : ι → ↥(MeasureTheory.Lp E p μ))

CauchySeq f ↔ Filter.Tendsto (fun n => MeasureTheory.eLpNorm (↑↑(f n.1) - ↑↑(f n.2)) p μ) Filter.atTop (𝓝 0)


/-- The Halting problem is recursively enumerable -/
theorem halting_problem_re (n) : RePred fun c => (eval c n).Dom


lemma zariskiPretopology_openCover {Y : Scheme.{u}} (U : OpenCover.{u} Y) :
    zariskiPretopology Y (Presieve.ofArrows U.obj U.map)

{Y : AlgebraicGeometry.Scheme}
(U : Y.OpenCover)

AlgebraicGeometry.Scheme.zariskiPretopology.coverings Y (CategoryTheory.Presieve.ofArrows U.obj U.map)


/-- **Eisenstein's lemma** -/
theorem eisenstein_lemma {p : ℕ} [Fact p.Prime] (hp : p ≠ 2) {a : ℕ} (ha1 : a % 2 = 1)
    (ha0 : (a : ZMod p) ≠ 0) : legendreSym p a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p

{p : ℕ}
[Fact (Nat.Prime p)]
(hp : p ≠ 2)
{a : ℕ}
(ha1 : a % 2 = 1)
(ha0 : ↑a ≠ 0)

legendreSym p ↑a = (-1) ^ ∑ x ∈ Finset.Ico 1 (p / 2).succ, x * a / p


theorem Antivary.dual : Antivary f g → Antivary (toDual ∘ f) (toDual ∘ g)

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}

Antivary f g → Antivary (⇑OrderDual.toDual ∘ f) (⇑OrderDual.toDual ∘ g)


@[to_additive]
theorem measure_smul_null {s} (h : μ s = 0) (c : G) : μ (c • s) = 0

[MeasureTheory.VAddInvariantMeasure G α μ]


@[to_additive]
theorem mulRothNumber_union_le (s t : Finset α) :
    mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t

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

addRothNumber (s ∪ t) ≤ addRothNumber s + addRothNumber t


theorem comp_val_c_app {X Y Z : LocallyRingedSpace.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) (U : (Opens Z)ᵒᵖ) :
    (f ≫ g).val.c.app U = g.val.c.app U ≫ f.val.c.app (op <| (Opens.map g.val.base).obj U.unop)

{X Y Z : AlgebraicGeometry.LocallyRingedSpace}

(U : (TopologicalSpace.Opens ↑Z.toTopCat)ᵒᵖ)

(f ≫ g).val.c.app U =
  g.val.c.app U ≫ f.val.c.app (Opposite.op ((TopologicalSpace.Opens.map g.val.base).obj (Opposite.unop U)))


@[to_additive]
theorem tprod_le_of_prod_le' (ha₂ : 1 ≤ a₂) (h : ∀ s, ∏ i ∈ s, f i ≤ a₂) : ∏' i, f i ≤ a₂

(h : ∀ (s : Finset ι), ∑ i ∈ s, f i ≤ a₂)


theorem pow_le_pow_of_le_right {n : Nat} (hx : n > 0) {i : Nat} : ∀ {j}, i ≤ j → n^i ≤ n^j


theorem inf_le_right {A : C} (f g : Subobject A) : (inf.obj f).obj g ≤ g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A : C}
(f g : CategoryTheory.Subobject A)

(CategoryTheory.Subobject.inf.obj f).obj g ≤ g


@[simp] theorem eventuallyConst_id : EventuallyConst id l ↔ l.Subsingleton

Filter.EventuallyConst id l ↔ l.Subsingleton


theorem HasMFDerivAt.sub (hf : HasMFDerivAt I 𝓘(𝕜, E') f z f')
    (hg : HasMFDerivAt I 𝓘(𝕜, E') g z g') : HasMFDerivAt I 𝓘(𝕜, E') (f - g) z (f' - g')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{z : M}
{f g : M → E'}
{f' g' : TangentSpace I z →L[𝕜] E'}
(hf : HasMFDerivAt I 𝓘(𝕜, E') f z f')
(hg : HasMFDerivAt I 𝓘(𝕜, E') g z g')


@[simp]
theorem length_ndinsert_of_not_mem {a : α} {s : Multiset α} (h : a ∉ s) :
    card (ndinsert a s) = card s + 1

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

Multiset.card (Multiset.ndinsert a s) = Multiset.card s + 1


@[simp]
theorem aeval_algHom_eq_zero (ϕ : AdjoinRoot f →ₐ[R] S) : aeval (ϕ (root f)) f = 0

{R : Type u}
{S : Type v}
[CommRing R]
(f : R[X])
[CommRing S]
[Algebra R S]
(ϕ : AdjoinRoot f →ₐ[R] S)

(Polynomial.aeval (ϕ (AdjoinRoot.root f))) f = 0


theorem isDomain_of_prime (hf : Prime f) : IsDomain (AdjoinRoot f)

{R : Type u}
[CommRing R]
{f : R[X]}
(hf : Prime f)


@[to_additive (attr := simp)]
theorem noncommProd_empty (h) : noncommProd (0 : Multiset α) h = 1

{α : Type u_3}
[Monoid α]
(h : {x | x ∈ 0}.Pairwise Commute)


@[ext]
theorem ext {f g : M →ₛₗ[σ] M₃} (h : ∀ x, f x = g x) : f = g

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
{f g : M →ₛₗ[σ] M₃}
(h : ∀ (x : M), f x = g x)


@[simp]
lemma measure_nullSet (h : μ ⟂ₘ ν) : μ h.nullSet = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(h : μ ⟂ₘ ν)


theorem surjective (f : α → β) (hf : Surjective f) : Surjective (mapFun f : 𝕎 α → 𝕎 β)

{p : ℕ}
{α : Type u_4}
{β : Type u_5}
(f : α → β)
(hf : Function.Surjective f)


/-- A prime `p` is a unit in a commutative ring `R` of nonzero characteristic iff it does not divide
the characteristic. -/
theorem isUnit_iff_not_dvd_char_of_ringChar_ne_zero (R : Type*) [CommRing R] (p : ℕ) [Fact p.Prime]
    (hR : ringChar R ≠ 0) : IsUnit (p : R) ↔ ¬p ∣ ringChar R

(R : Type u_1)
[CommRing R]
(p : ℕ)
[Fact (Nat.Prime p)]
(hR : ringChar R ≠ 0)


@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf

{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
(s₁ s₂ : Multiset α)


theorem preimage_emetric_ball (h : Isometry f) (x : α) (r : ℝ≥0∞) :
    f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(h : Isometry f)
(x : α)
(r : ℝ≥0∞)


theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A : Matrix n' n' R}
(h : IsUnit A.det)
(i : ℤ)


lemma of_isLocalizedModule [Module.Finite R M] : Module.Finite Rₚ Mₚ

{R : Type u}
[CommSemiring R]
(S : Submonoid R)
{Rₚ : Type v}
[CommSemiring Rₚ]
[Algebra R Rₚ]
[IsLocalization S Rₚ]
{M : Type w}
[AddCommMonoid M]
[Module R M]
{Mₚ : Type t}
[AddCommMonoid Mₚ]
[Module R Mₚ]
[Module Rₚ Mₚ]
[IsScalarTower R Rₚ Mₚ]
(f : M →ₗ[R] Mₚ)
[IsLocalizedModule S f]
[Module.Finite R M]


@[to_additive]
theorem mem_sSup_of_directedOn {K : Set (Subgroup G)} (Kne : K.Nonempty) (hK : DirectedOn (· ≤ ·) K)
    {x : G} : x ∈ sSup K ↔ ∃ s ∈ K, x ∈ s

(hK : DirectedOn (fun x x_1 => x ≤ x_1) K)


theorem exists_ofStep (z : AlgebraicClosureAux k) : ∃ n x, ofStep k n x = z

(k : Type u)
[Field k]
(z : AlgebraicClosureAux k)

∃ n x, (AlgebraicClosureAux.ofStep k n) x = z


/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `f ∘ g` admits a Taylor
series in `g ⁻¹' s`, whose `k`-th term is given by `p k (g v₁, ..., g vₖ)` . -/
theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpToOn n f p s)
    (g : G →L[𝕜] E) :
    HasFTaylorSeriesUpToOn n (f ∘ g) (fun x k => (p (g x) k).compContinuousLinearMap fun _ => g)
      (g ⁻¹' s)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(hf : HasFTaylorSeriesUpToOn n f p s)
(g : G →L[𝕜] E)

HasFTaylorSeriesUpToOn n (f ∘ ⇑g) (fun x k => (p (g x) k).compContinuousLinearMap fun x => g) (⇑g ⁻¹' s)


theorem LinearMap.iterateFrobenius_def [Algebra R S] (n : ℕ) (x : S) :
    iterateFrobenius R S p n x = x ^ p ^ n

(R : Type u)
[CommSemiring R]
(S : Type u_1)
[CommSemiring S]
(p : ℕ)
[ExpChar R p]
[ExpChar S p]
[Algebra R S]
(n : ℕ)
(x : S)

(LinearMap.iterateFrobenius R S p n) x = x ^ p ^ n


@[reassoc (attr := simp)]
theorem KernelFork.condition (s : KernelFork f) : Fork.ι s ≫ f = 0

(s : CategoryTheory.Limits.KernelFork f)


@[deprecated measure_mono (since := "2024-05-14")]
theorem mono' (m : OuterMeasure α) {s₁ s₂} (h : s₁ ⊆ s₂) : m s₁ ≤ m s₂

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)
{s₁ s₂ : Set α}
(h : s₁ ⊆ s₂)


theorem supported_eq_range_rename (s : Set σ) : supported R s = (rename ((↑) : s → σ)).range

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

MvPolynomial.supported R s = (MvPolynomial.rename Subtype.val).range


@[simp]
theorem id_hom' (M : Mod_ A) : (𝟙 M : M ⟶ M).hom = 𝟙 M.X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{A : Mon_ C}
(M : Mod_ A)


theorem ite_sub_ite {α} [Sub α] (P : Prop) [Decidable P] (a b c d : α) :
    ((if P then a else b) - if P then c else d) = if P then a - c else b - d

{α : Type u_1}
[Sub α]
(P : Prop)
[Decidable P]
(a b c d : α)


@[simp]
theorem lt_eq_subset : ((· < ·) : Finset α → Finset α → Prop) = (· ⊂ ·)


theorem wOppSide_iff_exists_right {s : AffineSubspace R P} {x y p₂ : P} (h : p₂ ∈ s) :
    s.WOppSide x y ↔ y ∈ s ∨ ∃ p₁ ∈ s, SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y p₂ : P}
(h : p₂ ∈ s)


/-- Analogue of `HasFPowerSeriesOnBall` where convergence is required only on a set `s`. -/
structure HasFPowerSeriesWithinOnBall (f : E → F) (p : FormalMultilinearSeries 𝕜 E F) (s : Set E)
    (x : E) (r : ℝ≥0∞) : Prop where
  /-- `p` converges on `ball 0 r` -/
  r_le : r ≤ p.radius
  /-- The radius of convergence is positive -/
  r_pos : 0 < r
  /-- `p converges to f` within `s` -/
  hasSum : ∀ {y}, x + y ∈ s → y ∈ EMetric.ball (0 : E) r →
    HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))
  /-- We require `ContinuousWithinAt f s x` to ensure `f x` is nice -/
  continuousWithinAt : ContinuousWithinAt f s x

(self : HasFPowerSeriesWithinOnBall f p s x r)


/-- The set in the `lsub` characterization of `cof` is nonempty. -/
theorem cof_lsub_def_nonempty (o) :
    { a : Cardinal | ∃ (ι : _) (f : ι → Ordinal), lsub.{u, u} f = o ∧ #ι = a }.Nonempty

{a | ∃ ι f, Ordinal.lsub f = o ∧ #ι = a}.Nonempty


theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
    (h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
    distortion I = distortion J

(h : ∀ (i : ι), I.upper i - I.lower i = (J.upper i - J.lower i) / r)


/-- A `pow` form of `Nat.factorization_choose_le` -/
theorem pow_factorization_choose_le (hn : 0 < n) : p ^ (choose n k).factorization p ≤ n


theorem pow_mod_orderOf_cycleOf_apply (f : Perm α) [DecidableRel f.SameCycle] (n : ℕ) (x : α) :
    (f ^ (n % orderOf (cycleOf f x))) x = (f ^ n) x

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(n : ℕ)
(x : α)

(f ^ (n % orderOf (f.cycleOf x))) x = (f ^ n) x


theorem disjoint_iUnion₂_left {s : ∀ i, κ i → Set α} {t : Set α} :
    Disjoint (⋃ (i) (j), s i j) t ↔ ∀ i j, Disjoint (s i j) t

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
{s : (i : ι) → κ i → Set α}
{t : Set α}

Disjoint (⋃ i, ⋃ j, s i j) t ↔ ∀ (i : ι) (j : κ i), Disjoint (s i j) t


@[simp]
theorem closure_empty : closure L (∅ : Set M) = ⊥

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

(FirstOrder.Language.Substructure.closure L).toFun ∅ = ⊥


theorem HasDerivWithinAt.liminf_right_slope_le (hf : HasDerivWithinAt f f' (Ici x) x)
    (hr : f' < r) : ∃ᶠ z in 𝓝[>] x, slope f x z < r

(hf : HasDerivWithinAt f f' (Set.Ici x) x)


/-- Basic hypothesis to talk about a topological monoid or a topological semigroup.
A topological monoid over `M`, for example, is obtained by requiring both the instances `Monoid M`
and `ContinuousMul M`.

Continuity in only the left/right argument can be stated using
`ContinuousConstSMul α α`/`ContinuousConstSMul αᵐᵒᵖ α`. -/
@[to_additive]
class ContinuousMul (M : Type u) [TopologicalSpace M] [Mul M] : Prop where
  continuous_mul : Continuous fun p : M × M => p.1 * p.2

{M : Type u}
[TopologicalSpace M]
[Mul M]
[self : ContinuousMul M]


@[to_additive] lemma AntivaryOn.div_left (h₁ : AntivaryOn f₁ g s) (h₂ : MonovaryOn f₂ g s) :
    AntivaryOn (f₁ / f₂) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{s : Set ι}
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : AntivaryOn f₁ g s)
(h₂ : MonovaryOn f₂ g s)


@[to_additive]
lemma units_left_inverse :
    Function.LeftInverse (units (M := M)) (Subgroup.ofUnits (M := M))


lemma _root_.CovBy.card_finset (h : s ⋖ t) : s.card ⋖ t.card

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


/-- The interior of `M × N` is the product of the interiors of `M` and `N`. -/
lemma ModelWithCorners.interior_prod :
    (I.prod J).interior (M × N) = (I.interior M) ×ˢ (J.interior N)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace H' N]
(J : ModelWithCorners 𝕜 E' H')

(I.prod J).interior (M × N) = I.interior M ×ˢ J.interior N


lemma tendsto_ite {β : Type*} {p : ι → Prop} [DecidablePred p] {q : Prop} [Decidable q]
    {a b : β} {F G : Filter β}
    (haG : {a}ᶜ ∈ G) (hbF : {b}ᶜ ∈ F) (haF : principal {a} ≤ F) (hbG : principal {b} ≤ G) :
    Tendsto (fun i ↦ if p i then a else b) L (if q then F else G) ↔ ∀ᶠ i in L, p i ↔ q

{ι : Type u_3}
(L : Filter ι)
{β : Type u_4}
{p : ι → Prop}
[DecidablePred p]
{q : Prop}
[Decidable q]
{a b : β}
{F G : Filter β}
(haG : {a}ᶜ ∈ G)
(hbF : {b}ᶜ ∈ F)
(haF : 𝓟 {a} ≤ F)
(hbG : 𝓟 {b} ≤ G)

Filter.Tendsto (fun i => if p i then a else b) L (if q then F else G) ↔ ∀ᶠ (i : ι) in L, p i ↔ q


theorem totient_lt (n : ℕ) (hn : 1 < n) : φ n < n


@[simp] theorem zero_mod (b : Int) : mod 0 b = 0


@[simp]
theorem coe_p (X : C) : (X : Karoubi C).p = 𝟙 X

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

{ X := X, p := CategoryTheory.CategoryStruct.id X, idem := ⋯ }.p = CategoryTheory.CategoryStruct.id X


/-- The adjoint of the composition of two operators is the composition of the two adjoints
in reverse order. -/
@[simp]
theorem adjoint_comp (A : F →ₗ[𝕜] G) (B : E →ₗ[𝕜] F) :
    LinearMap.adjoint (A ∘ₗ B) = LinearMap.adjoint B ∘ₗ LinearMap.adjoint A

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


theorem smeval_X_pow_mul : ∀ (n : ℕ), (X^n * p).smeval x = x^n * p.smeval x

(R : Type u_1)
[Semiring R]
(p : Polynomial R)
{S : Type u_2}
[NonAssocSemiring S]
[Module R S]
[SMulCommClass R S S]
[Pow S ℕ]
[NatPowAssoc S]
(x : S)
(n : ℕ)

(Polynomial.X ^ n * p).smeval x = x ^ n * p.smeval x


/-- `forget₂ (AlgebraCat R) (ModuleCat R)` as a braided functor. -/
@[simps toMonoidalFunctor]
def toModuleCatBraidedFunctor : BraidedFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R)

(AlgebraCat.toModuleCatBraidedFunctor R).toMonoidalFunctor = AlgebraCat.toModuleCatMonoidalFunctor R


@[simp]
theorem isAtom_top : IsAtom (⊤ : α)

{α : Type u_2}
[PartialOrder α]
[BoundedOrder α]
[IsSimpleOrder α]


/-- **Liouville's theorem**: a complex differentiable bounded function is a constant. -/
theorem exists_eq_const_of_bounded {f : E → F} (hf : Differentiable ℂ f)
    (hb : IsBounded (range f)) : ∃ c, f = const E c

(hb : Bornology.IsBounded (Set.range f))


@[simp, reassoc]
theorem whiskerLeft_comp (F : C ⥤ D) {G H K : D ⥤ E} (α : G ⟶ H) (β : H ⟶ K) :
    whiskerLeft F (α ≫ β) = whiskerLeft F α ≫ whiskerLeft F β

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(F : CategoryTheory.Functor C D)
{G H K : CategoryTheory.Functor D E}
(α : G ⟶ H)
(β : H ⟶ K)

CategoryTheory.whiskerLeft F (CategoryTheory.CategoryStruct.comp α β) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft F α) (CategoryTheory.whiskerLeft F β)


theorem inf_sup_distrib_left (s : Finset ι) (f : ι → α) (a : α) :
    a ⊔ s.inf f = s.inf fun i => a ⊔ f i

{α : Type u_2}
{ι : Type u_5}
[DistribLattice α]
[OrderTop α]
(s : Finset ι)
(f : ι → α)
(a : α)


/-- Vieta's formula for split polynomials over a field. -/
theorem _root_.Polynomial.coeff_eq_esymm_roots_of_splits {F} [Field F] {p : F[X]}
    (hsplit : p.Splits (RingHom.id F)) {k : ℕ} (h : k ≤ p.natDegree) :
    p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k)

(hsplit : Polynomial.Splits (RingHom.id F) p)


theorem Prime.dvd_iff_eq {p a : ℕ} (hp : p.Prime) (a1 : a ≠ 1) : a ∣ p ↔ p = a

{p a : ℕ}
(hp : Nat.Prime p)
(a1 : a ≠ 1)


theorem not_ringChar_dvd_of_invertible {t : ℕ} [Invertible (t : K)] : ¬ringChar K ∣ t

{K : Type u_1}
[Field K]
{t : ℕ}
[Invertible ↑t]


lemma isRegular_def :
    IsRegular R M x ↔ (toEnd R L M x).charpoly.coeff (rank R L M) ≠ 0

(R : Type u_1)
{L : Type u_3}
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[Module.Free R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Finite R M]
[Module.Free R M]
(x : L)

LieModule.IsRegular R M x ↔ (LinearMap.charpoly ((LieModule.toEnd R L M) x)).coeff (LieModule.rank R L M) ≠ 0


@[to_additive (attr := simp)] theorem fst_apply_inr (x : N) : fst (inr x : M ∗ N) = 1

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]
(x : N)

AddMonoid.Coprod.fst (AddMonoid.Coprod.inr x) = 0


/-- If two complex differentiable functions `f g : E → F` are equal on the boundary of a bounded set
`U`, then they are equal on `closure U`. -/
theorem eqOn_closure_of_eqOn_frontier {f g : E → F} {U : Set E} (hU : IsBounded U)
    (hf : DiffContOnCl ℂ f U) (hg : DiffContOnCl ℂ g U) (hfg : EqOn f g (frontier U)) :
    EqOn f g (closure U)

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace ℂ F]
[Nontrivial E]
{f g : E → F}
{U : Set E}
(hU : Bornology.IsBounded U)
(hf : DiffContOnCl ℂ f U)
(hg : DiffContOnCl ℂ g U)
(hfg : Set.EqOn f g (frontier U))


/-- A compact neighborhood of `1` in a topological group admits a closed compact subset
that is a neighborhood of `1`. -/
@[to_additive (attr := deprecated IsCompact.isCompact_isClosed_basis_nhds (since := "2024-01-28"))
  "A compact neighborhood of `0` in a topological additive group
admits a closed compact subset that is a neighborhood of `0`."]
theorem exists_isCompact_isClosed_subset_isCompact_nhds_one
    {L : Set G} (Lcomp : IsCompact L) (L1 : L ∈ 𝓝 (1 : G)) :
    ∃ K : Set G, IsCompact K ∧ IsClosed K ∧ K ⊆ L ∧ K ∈ 𝓝 (1 : G)

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{L : Set G}
(Lcomp : IsCompact L)
(L1 : L ∈ 𝓝 1)

∃ K, IsCompact K ∧ IsClosed K ∧ K ⊆ L ∧ K ∈ 𝓝 1


theorem bind_decode₂_iff {f : α →. σ} :
    Partrec f ↔ Nat.Partrec fun n => Part.bind (decode₂ α n) fun a => (f a).map encode

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f : α →. σ}

Partrec f ↔ Nat.Partrec fun n => (↑(Encodable.decode₂ α n)).bind fun a => Part.map Encodable.encode (f a)


theorem const_self (f : R) (U hu) : const R f f U hu = 1

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

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

AlgebraicGeometry.StructureSheaf.const R f f U hu = 1


theorem HasLineDerivWithinAt.smul (h : HasLineDerivWithinAt 𝕜 f f' s x v) (c : 𝕜) :
    HasLineDerivWithinAt 𝕜 f (c • f') s x (c • v)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{s : Set E}
{x v : E}
{f' : F}
(h : HasLineDerivWithinAt 𝕜 f f' s x v)
(c : 𝕜)


protected theorem rangeFactorization (h : Monotone f) : Monotone (Set.rangeFactorization f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α → β}
(h : Monotone f)


@[to_additive (attr := ext)]
theorem ext : (∀ x, p x = q x) → p = q

{E : Type u_4}
[Group E]
{p q : GroupNorm E}


@[simp]
theorem closure_three_cycles_eq_alternating :
    closure { σ : Perm α | IsThreeCycle σ } = alternatingGroup α

{α : Type u_1}
[Fintype α]
[DecidableEq α]

Subgroup.closure {σ | σ.IsThreeCycle} = alternatingGroup α


theorem le_one_iff_subsingleton {α : Type u} : #α ≤ 1 ↔ Subsingleton α


@[simp]
theorem UnitsInt.univ : (Finset.univ : Finset ℤˣ) = {1, -1}


theorem antidiagonal_succ' {n : ℕ} :
    antidiagonal (n + 1) = (antidiagonal n).map (Prod.map id Nat.succ) ++ [(n + 1, 0)]

List.Nat.antidiagonal (n + 1) = List.map (Prod.map id Nat.succ) (List.Nat.antidiagonal n) ++ [(n + 1, 0)]


/-- A finite union of sets which are all bounded above is still bounded above. -/
theorem Finite.bddAbove_biUnion {I : Set β} {S : β → Set α} (H : I.Finite) :
    BddAbove (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddAbove (S i)

{α : Type u}
{β : Type v}
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
[Nonempty α]
{I : Set β}
{S : β → Set α}
(H : I.Finite)


@[to_additive]
theorem of_card_le_one (hA : A.Nonempty) (hB : B.Nonempty) (hA1 : A.card ≤ 1) (hB1 : B.card ≤ 1) :
    ∃ a ∈ A, ∃ b ∈ B, UniqueMul A B a b

{G : Type u_1}
[Add G]
{A B : Finset G}
(hA : A.Nonempty)
(hB : B.Nonempty)
(hA1 : A.card ≤ 1)
(hB1 : B.card ≤ 1)


theorem HasDerivWithinAt.sin (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => Real.sin (f x)) (Real.cos (f x) * f') s x

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


theorem diagonal_ofNat' [Zero α] [NatCast α] (m : ℕ) [m.AtLeastTwo] :
    diagonal (no_index (OfNat.ofNat m : n → α)) = OfNat.ofNat m

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[NatCast α]
(m : ℕ)
[m.AtLeastTwo]

Matrix.diagonal (OfNat.ofNat m) = OfNat.ofNat m


/-- This applies to the sup norm of sup norm. -/
protected theorem boundedSMul [SeminormedRing R] [SeminormedAddCommGroup α] [Module R α]
    [BoundedSMul R α] : BoundedSMul R (Matrix m n α)

{R : Type u_1}
{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedRing R]
[SeminormedAddCommGroup α]
[Module R α]
[BoundedSMul R α]


theorem dist_pos_of_ne {i j : Nat} : i ≠ j → 0 < dist i j


@[simp]
theorem isBot_bot : IsBot (⊥ : α)


@[simp] lemma log_zero : log (0 : A) = 0


@[simp]
theorem iSup_pos {p : Prop} {f : p → α} (hp : p) : ⨆ h : p, f h = f hp

{α : Type u_1}
[CompleteLattice α]
{p : Prop}
{f : p → α}
(hp : p)


@[simp, norm_cast] lemma coe_castLEEmb {m n} (hmn : m ≤ n) : castLEEmb hmn = castLE hmn


/-- The composition of `C^n` functions at points is `C^n`. -/
nonrec theorem ContMDiffAt.comp {g : M' → M''} (x : M) (hg : ContMDiffAt I' I'' n g (f x))
    (hf : ContMDiffAt I I' n f x) : ContMDiffAt I I'' n (g ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{n : ℕ∞}
{g : M' → M''}
(x : M)
(hg : ContMDiffAt I' I'' n g (f x))
(hf : ContMDiffAt I I' n f x)


theorem xor_iff_not_iff' : Xor' a b ↔ (¬a ↔ b)


lemma lift_mk_le_lift_mk_of_injective {α : Type u} {β : Type v} {f : α → β} (hf : Injective f) :
    Cardinal.lift.{v} (#α) ≤ Cardinal.lift.{u} (#β)

{α : Type u}
{β : Type v}
{f : α → β}
(hf : Function.Injective f)

Cardinal.lift.{v, u} (Cardinal.mk α) ≤ Cardinal.lift.{u, v} (Cardinal.mk β)


theorem inf_iSup₂_eq {f : ∀ i, κ i → α} (a : α) :
    (a ⊓ ⨆ (i) (j), f i j) = ⨆ (i) (j), a ⊓ f i j

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
[Order.Frame α]
{f : (i : ι) → κ i → α}
(a : α)

a ⊓ ⨆ i, ⨆ j, f i j = ⨆ i, ⨆ j, a ⊓ f i j


lemma exists_isRegular [Infinite R] : ∃ x : L, IsRegular R M x

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[Nontrivial R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[Module.Free R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Finite R M]
[Module.Free R M]
[IsDomain R]
[Infinite R]


@[reassoc (attr := simp)]
lemma leftHomologyπ_comp_leftHomologyIso_hom :
    S.leftHomologyπ ≫ h.leftHomologyIso.hom = h.cyclesIso.hom ≫ h.π

CategoryTheory.CategoryStruct.comp S.leftHomologyπ h.leftHomologyIso.hom =
  CategoryTheory.CategoryStruct.comp h.cyclesIso.hom h.π


@[simp]
theorem bidirectionalRec_cons_append {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b])))
    (a : α) (l : List α) (b : α) :
    bidirectionalRec nil singleton cons_append (a :: (l ++ [b])) =
      cons_append a l b (bidirectionalRec nil singleton cons_append l)

(cons_append : (a : α) → (l : List α) → (b : α) → motive l → motive (a :: (l ++ [b])))

List.bidirectionalRec nil singleton cons_append (a :: (l ++ [b])) =
  cons_append a l b (List.bidirectionalRec nil singleton cons_append l)


lemma isoOneCocycles_hom_comp_subtype :
    (isoOneCocycles A).hom ≫ ModuleCat.ofHom (oneCocycles A).subtype =
      iCocycles A 1 ≫ (oneCochainsLequiv A).toModuleIso.hom

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

(groupCohomology.isoOneCocycles A).hom ≫ ModuleCat.ofHom (groupCohomology.oneCocycles A).subtype =
  groupCohomology.iCocycles A 1 ≫ (groupCohomology.oneCochainsLequiv A).toModuleIso.hom


theorem spectrum.subset_circle_of_unitary {u : E} (h : u ∈ unitary E) :
    spectrum 𝕜 u ⊆ Metric.sphere 0 1

{𝕜 : Type u_1}
[NormedField 𝕜]
{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
[NormedAlgebra 𝕜 E]
[CompleteSpace E]
{u : E}
(h : u ∈ unitary E)


@[to_additive (attr := simp)]
theorem coprodAssoc_symm_apply_inr_inr (x : P) :
    (coprodAssoc M N P).symm (inr (inr x)) = inr x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddMonoid M]
[AddMonoid N]
[AddMonoid P]
(x : P)

(AddMonoid.MulEquiv.coprodAssoc M N P).symm (AddMonoid.Coprod.inr (AddMonoid.Coprod.inr x)) = AddMonoid.Coprod.inr x


@[to_additive (attr := continuity)]
theorem continuous_multiset_prod {f : ι → X → M} (s : Multiset ι) :
    (∀ i ∈ s, Continuous (f i)) → Continuous fun a => (s.map fun i => f i a).prod

{ι : Type u_1}
{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[CommMonoid M]
[ContinuousMul M]
{f : ι → X → M}
(s : Multiset ι)

(∀ i ∈ s, Continuous (f i)) → Continuous fun a => (Multiset.map (fun i => f i a) s).prod


theorem mul_polyOfInterest_aux2 (n : ℕ) :
    (p : 𝕄) ^ n * wittMul p n + wittPolyProdRemainder p n = wittPolyProd p n

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

↑p ^ n * WittVector.wittMul p n + WittVector.wittPolyProdRemainder p n = WittVector.wittPolyProd p n


@[simp]
theorem keys_val (s : AList β) : (keys ⟦s⟧).val = s.keys

{α : Type u}
{β : α → Type v}
(s : AList β)


@[reassoc (attr := simp)]
theorem OplaxMonoidalFunctor.left_unitality_hom (F : OplaxMonoidalFunctor C D) (X : C) :
    F.δ (𝟙_ C) X ≫ F.η ▷ F.obj X ≫ (λ_ (F.obj X)).hom = F.map (λ_ X).hom

(F : CategoryTheory.OplaxMonoidalFunctor C D)

F.δ (𝟙_ C) X ≫
    CategoryTheory.MonoidalCategory.whiskerRight F.η (F.obj X) ≫
      (CategoryTheory.MonoidalCategory.leftUnitor (F.obj X)).hom =
  F.map (CategoryTheory.MonoidalCategory.leftUnitor X).hom


theorem gcd_eq_left {m n : Nat} (H : m ∣ n) : gcd m n = m


@[to_additive noncommSum_eq_card_nsmul]
theorem noncommProd_eq_pow_card (s : Finset α) (f : α → β) (comm) (m : β) (h : ∀ x ∈ s, f x = m) :
    s.noncommProd f comm = m ^ s.card

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


@[simp] lemma comapOn_indep_iff :
    (N.comapOn E f).Indep I ↔ (N.Indep (f '' I) ∧ InjOn f I ∧ I ⊆ E)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{N : Matroid β}
{E I : Set α}

(N.comapOn E f).Indep I ↔ N.Indep (f '' I) ∧ Set.InjOn f I ∧ I ⊆ E


theorem liftProp_id (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y) :
    LiftProp Q (id : M → M)

{H : Type u_1}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G : StructureGroupoid H}
{Q : (H → H) → Set H → H → Prop}
(hG : G.LocalInvariantProp G Q)
(hQ : ∀ (y : H), Q id Set.univ y)


theorem GammaAux_recurrence2 (s : ℂ) (n : ℕ) (h1 : -s.re < ↑n) :
    GammaAux n s = GammaAux (n + 1) s

Complex.GammaAux n s = Complex.GammaAux (n + 1) s


theorem zero_le_add_right_neg (x : PGame) : 0 ≤ x + -x


/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas
below. -/
theorem specializes_TFAE (x y : X) :
    TFAE [x ⤳ y,
      pure x ≤ 𝓝 y,
      ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s,
      ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s,
      y ∈ closure ({ x } : Set X),
      closure ({ y } : Set X) ⊆ closure { x },
      ClusterPt y (pure x)]

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

[x ⤳ y, pure x ≤ 𝓝 y, ∀ (s : Set X), IsOpen s → y ∈ s → x ∈ s, ∀ (s : Set X), IsClosed s → x ∈ s → y ∈ s,
    y ∈ closure {x}, closure {y} ⊆ closure {x}, ClusterPt y (pure x)].TFAE


@[simp]
theorem prefix_cons_inj (a) : a :: l₁ <+: a :: l₂ ↔ l₁ <+: l₂

∀ {α : Type u_1} {l₁ l₂ : List α} (a : α), a :: l₁ <+: a :: l₂ ↔ l₁ <+: l₂


@[to_additive (attr := simp)]
theorem toFreeSemigroup_of (x : α) : toFreeSemigroup (of x) = FreeSemigroup.of x

FreeAddMagma.toFreeAddSemigroup (FreeAddMagma.of x) = FreeAddSemigroup.of x


/-- Precomposition of a 1-morphism as a functor from the category of 1-morphisms `a ⟶ b` into the
category of functors `(b ⟶ c) ⥤ (a ⟶ c)`. -/
@[simps]
def precomposing (a b c : B) : (a ⟶ b) ⥤ (b ⟶ c) ⥤ (a ⟶ c)

{B : Type u}
[CategoryTheory.Bicategory B]
(a b c : B)
(f : a ⟶ b)

(CategoryTheory.Bicategory.precomposing a b c).obj f = CategoryTheory.Bicategory.precomp c f


theorem monic_of_injective (hf : Injective f) {p : R[X]} (hp : (p.map f).Monic) : p.Monic

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R →+* S}
(hf : Function.Injective ⇑f)
{p : R[X]}
(hp : (Polynomial.map f p).Monic)


theorem stereographic'_symm_apply {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1)
    (x : EuclideanSpace ℝ (Fin n)) :
    ((stereographic' n v).symm x : E) =
      let U : (ℝ ∙ (v : E))ᗮ ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=
        (OrthonormalBasis.fromOrthogonalSpanSingleton n (ne_zero_of_mem_unit_sphere v)).repr
      (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (4 : ℝ) • (U.symm x : E) +
        (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (‖(U.symm x : E)‖ ^ 2 - 4) • v.val

[Fact (FiniteDimensional.finrank ℝ E = n + 1)]

↑(↑(stereographic' n v).symm x) =
  let U := (OrthonormalBasis.fromOrthogonalSpanSingleton n ⋯).repr;
  (‖↑(U.symm x)‖ ^ 2 + 4)⁻¹ • 4 • ↑(U.symm x) + (‖↑(U.symm x)‖ ^ 2 + 4)⁻¹ • (‖↑(U.symm x)‖ ^ 2 - 4) • ↑v


theorem eventually_homothety_image_subset_of_finite_subset_interior (x : Q) {s : Set Q} {t : Set Q}
    (ht : t.Finite) (h : t ⊆ interior s) : ∀ᶠ δ in 𝓝 (1 : 𝕜), homothety x δ '' t ⊆ s

{W : Type u_4}
{Q : Type u_5}
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
(𝕜 : Type u_6)
[NormedField 𝕜]
[NormedSpace 𝕜 W]
(x : Q)
{s t : Set Q}
(ht : t.Finite)
(h : t ⊆ interior s)

∀ᶠ (δ : 𝕜) in nhds 1, ⇑(AffineMap.homothety x δ) '' t ⊆ s


@[simp]
theorem commutatorElement_inv : ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆

⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆


/-- If `𝓕 : ι → β → α` tends to `f : β → α` *pointwise on `S : Set β`* along some nontrivial
filter, and if the family `𝓕` is uniformly equicontinuous on `S`, then the limit is uniformly
continuous on `S`. -/
theorem Filter.Tendsto.uniformContinuousOn_of_uniformEquicontinuousOn {l : Filter ι} [l.NeBot]
    {F : ι → β → α} {f : β → α} {S : Set β} (h₁ : ∀ x ∈ S, Tendsto (F · x) l (𝓝 (f x)))
    (h₂ : UniformEquicontinuousOn F S) :
    UniformContinuousOn f S

{F : ι → β → α}

(h₁ : ∀ x ∈ S, Filter.Tendsto (fun x_1 => F x_1 x) l (nhds (f x)))


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


@[to_additive]
theorem unop_injective : Injective (unop : αᵐᵒᵖ → α)


@[simp]
theorem toAdd_one [Zero α] : toAdd (1 : Multiplicative α) = 0


@[simp]
theorem getElem_cyclicPermutations (l : List α) (n : Nat) (h : n < length (cyclicPermutations l)) :
    (cyclicPermutations l)[n] = l.rotate n

{α : Type u}
(l : List α)
(n : ℕ)
(h : n < l.cyclicPermutations.length)


/-- A sufficient condition to prove that `f ⋆[L, μ] g` exists.
We assume that the integrand has compact support and `g` is bounded on this support (note that
both properties hold if `g` is continuous with compact support). We also require that `f` is
integrable on the support of the integrand, and that both functions are strongly measurable.

This is a variant of `BddAbove.convolutionExistsAt'` in an abelian group with a left-invariant
measure. This allows us to state the boundedness and measurability of `g` in a more natural way. -/
theorem _root_.BddAbove.convolutionExistsAt [MeasurableAdd₂ G] [SFinite μ] {x₀ : G} {s : Set G}
    (hbg : BddAbove ((fun i => ‖g i‖) '' ((fun t => x₀ - t) ⁻¹' s))) (hs : MeasurableSet s)
    (h2s : (support fun t => L (f t) (g (x₀ - t))) ⊆ s) (hf : IntegrableOn f s μ)
    (hmg : AEStronglyMeasurable g μ) : ConvolutionExistsAt f g x₀ L μ

(h2s : (Function.support fun t => (L (f t)) (g (x₀ - t))) ⊆ s)

(hmg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.ConvolutionExistsAt f g x₀ L μ


/-- (Pseudo) metric space has discrete `UniformSpace` structure
iff the distances between distinct points are uniformly bounded away from zero. -/
protected lemma uniformSpace_eq_bot :
    ‹PseudoMetricSpace α›.toUniformSpace = ⊥ ↔
      ∃ r : ℝ, 0 < r ∧ Pairwise (r ≤ dist · · : α → α → Prop)

PseudoMetricSpace.toUniformSpace = ⊥ ↔ ∃ r, 0 < r ∧ Pairwise fun x x_1 => r ≤ dist x x_1


theorem tendsto_const_mul_pow_nhds_iff {n : ℕ} {c d : 𝕜} (hc : c ≠ 0) :
    Tendsto (fun x : 𝕜 => c * x ^ n) atTop (𝓝 d) ↔ n = 0 ∧ c = d

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{n : ℕ}
{c d : 𝕜}
(hc : c ≠ 0)

Filter.Tendsto (fun x => c * x ^ n) Filter.atTop (𝓝 d) ↔ n = 0 ∧ c = d


theorem Finite.exists_maximal_wrt [PartialOrder β] (f : α → β) (s : Set α) (h : s.Finite)
    (hs : s.Nonempty) : ∃ a ∈ s, ∀ a' ∈ s, f a ≤ f a' → f a = f a'

{α : Type u}
{β : Type v}
[PartialOrder β]
(f : α → β)
(s : Set α)
(h : s.Finite)
(hs : s.Nonempty)


theorem prime_of_factor {a : α} (x : α) (hx : x ∈ factors a) : Prime x

(hx : x ∈ UniqueFactorizationMonoid.factors a)


@[to_additive]
theorem smul_oreDiv_one (r : R) (x : X) : r • (x /ₒ (1 : S)) = (r • x) /ₒ (1 : S)

{R : Type u_1}
{M : Type u_3}
{X : Type u_4}
[Monoid M]
{S : Submonoid M}
[OreLocalization.OreSet S]
[MulAction M X]
[SMul R X]
[SMul R M]
[IsScalarTower R M M]
[IsScalarTower R M X]
(r : R)
(x : X)


@[simp]
theorem adjugate_fin_two_of (a b c d : α) : adjugate !![a, b; c, d] = !![d, -b; -c, a]


@[simp]
theorem zero_apply {V W : SemiNormedGrp₁} (x : V) : (0 : V ⟶ W) x = 0


theorem frontier_setOf_le_re_and_im_le (a b : ℝ) :
    frontier { z | a ≤ re z ∧ im z ≤ b } = { z | a ≤ re z ∧ im z = b ∨ re z = a ∧ im z ≤ b }

frontier {z | a ≤ z.re ∧ z.im ≤ b} = {z | a ≤ z.re ∧ z.im = b ∨ z.re = a ∧ z.im ≤ b}


@[simp]
theorem AffineEquiv.map_midpoint (f : P ≃ᵃ[R] P') (a b : P) :
    f (midpoint R a b) = midpoint R (f a) (f b)

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
(f : P ≃ᵃ[R] P')
(a b : P)


/-- The definitional equality between `0`-ary heterogeneous functions into `τ` and `τ`. -/
@[simps!]
def fromTypes_zero_equiv (p : Fin 0 → Type u) (τ : Type u) :
    FromTypes p τ ≃ τ

(p : Fin 0 → Type u)
(τ : Type u)
(a : Function.FromTypes p τ)

(Function.fromTypes_zero_equiv p τ).symm a = a


theorem dimH_countable {s : Set X} (hs : s.Countable) : dimH s = 0

{X : Type u_2}
[EMetricSpace X]
{s : Set X}
(hs : s.Countable)


/-- We can pull out a product over a list in the second argument of the Jacobi symbol. -/
theorem list_prod_right {a : ℤ} {l : List ℕ} (hl : ∀ n ∈ l, n ≠ 0) :
    J(a | l.prod) = (l.map fun n => J(a | n)).prod

jacobiSym a l.prod = (List.map (fun n => jacobiSym a n) l).prod


/-- A type with a set `s` whose `coe_sort` is a nontrivial type is nontrivial.
For the corresponding result for `Subtype`, see `Subtype.nontrivial_iff_exists_ne`. -/
theorem nontrivial_of_nontrivial_coe (hs : Nontrivial s) : Nontrivial α

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


@[simp] theorem add_re : (a + b).re = a.re + b.re

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a b : ℍ[R,c₁,c₂])


theorem bounded' (f : CauSeq β abv) (x : α) : ∃ r > x, ∀ i, abv (f i) < r

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(f : CauSeq β abv)
(x : α)


@[simp]
lemma preΨ'_three : W.preΨ' 3 = W.Ψ₃

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


/-- A single function is tight. -/
theorem unifTight_of_subsingleton [Subsingleton ι] (hp_top : p ≠ ∞)
    {f : ι → α → β} (hf : ∀ i, Memℒp (f i) p μ) : UnifTight f p μ

{f : ι → α → β}

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


theorem coeff_toSubring' {n : ℕ} : (coeff (toSubring p T hp) n).1 = coeff p n

{R : Type u}
[Ring R]
(p : R[X])
(T : Subring R)
(hp : ↑p.coeffs ⊆ ↑T)
{n : ℕ}

↑((p.toSubring T hp).coeff n) = p.coeff n


@[simp]
protected theorem eq {p p' : α × α} : Sym2.mk p = Sym2.mk p' ↔ Sym2.Rel α p p'


@[deprecated (since := "2024-06-12")]
theorem get_of_append_proof {l : List α}
    (eq : l = l₁ ++ a :: l₂) (h : l₁.length = n) : n < length l

{α : Type u_1}
{l₁ : List α}
{a : α}
{l₂ : List α}
{n : Nat}
{l : List α}
(eq : l = l₁ ++ a :: l₂)
(h : l₁.length = n)


theorem Ideal.IsHomogeneous.iff_eq : I.IsHomogeneous 𝒜 ↔ (I.homogeneousCore 𝒜).toIdeal = I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]
(I : Ideal A)

Ideal.IsHomogeneous 𝒜 I ↔ (Ideal.homogeneousCore 𝒜 I).toIdeal = I


@[simp]
theorem toQuadraticMap_neg (B : BilinMap R M N) : (-B).toQuadraticMap = -B.toQuadraticMap

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(B : LinearMap.BilinMap R M N)


@[simp]
theorem accept_zero : (0 : εNFA α σ).accept = ∅


@[simp] theorem toZeroAtInfty_apply (f : 𝓢(E, F)) (x : E) : f.toZeroAtInfty x = f x

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[ProperSpace E]
(f : SchwartzMap E F)
(x : E)


theorem zero_mem_ℓp' : Memℓp (fun i : α => (0 : E i)) p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]


theorem eval_at_1 (n ν : ℕ) : (bernsteinPolynomial R n ν).eval 1 = if ν = n then 1 else 0

Polynomial.eval 1 (bernsteinPolynomial R n ν) = if ν = n then 1 else 0


@[simp]
lemma rightHomologyMap_id [HasRightHomology S] :
    rightHomologyMap (𝟙 S) = 𝟙 _

CategoryTheory.ShortComplex.rightHomologyMap (CategoryTheory.CategoryStruct.id S) =
  CategoryTheory.CategoryStruct.id S.rightHomology


protected lemma lt_sub_iff_add_lt : a < c - b ↔ a + b < c


@[simp, mfld_simps]
theorem mem_prod : p ∈ s ×ˢ t ↔ p.1 ∈ s ∧ p.2 ∈ t

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
{p : α × β}


theorem zero_or_succ_or_limit (o : Ordinal) : o = 0 ∨ (∃ a, o = succ a) ∨ IsLimit o

o = 0 ∨ (∃ a, o = Order.succ a) ∨ o.IsLimit


lemma add_eq_union_right_of_le [DecidableEq α] {x y z : Multiset α} (h : z ≤ y) :
    x + y = x ∪ z ↔ y = z ∧ x.Disjoint y

{α : Type u_1}
[DecidableEq α]
{x y z : Multiset α}
(h : z ≤ y)


private theorem inner_le_Lp_mul_Lp_of_norm_eq_zero (f g : ι → ℝ≥0) {p q : ℝ}
    (hpq : p.IsConjExponent q) (hf : ∑ i ∈ s, f i ^ p = 0) :
    ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q)

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ≥0)
{p q : ℝ}
(hpq : p.IsConjExponent q)
(hf : ∑ i ∈ s, f i ^ p = 0)


@[mono]
theorem coe_mono : Monotone (SetLike.coe : A → Set B)

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


theorem hasDerivWithinAt_inter (h : t ∈ 𝓝 x) :
    HasDerivWithinAt f f' (s ∩ t) x ↔ HasDerivWithinAt f f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s t : Set 𝕜}
(h : t ∈ 𝓝 x)


theorem totalDegree_eq (p : MvPolynomial σ R) :
    p.totalDegree = p.support.sup fun m => Multiset.card (toMultiset m)

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

p.totalDegree = p.support.sup fun m => Multiset.card (Finsupp.toMultiset m)


theorem braiding_naturality_right (X : Dial C) {Y Z : Dial C} (f : Y ⟶ Z) :
    tensorHom (𝟙 X) f ≫ (braiding X Z).hom = (braiding X Y).hom ≫ tensorHom f (𝟙 X)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Dial.tensorHom (CategoryTheory.CategoryStruct.id X) f)
    (X.braiding Z).hom =
  CategoryTheory.CategoryStruct.comp (X.braiding Y).hom
    (CategoryTheory.Dial.tensorHom f (CategoryTheory.CategoryStruct.id X))


/-- An isomorphism of graphs induces a bijection of connected components. -/
@[simps]
def connectedComponentEquiv (φ : G ≃g G') : G.ConnectedComponent ≃ G'.ConnectedComponent

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
(φ : G ≃g G')
(C : G.ConnectedComponent)

φ.connectedComponentEquiv C = SimpleGraph.ConnectedComponent.map (RelIso.toRelEmbedding φ).toRelHom C


theorem periodicOrbit_chain (r : α → α → Prop) {f : α → α} {x : α} :
    (periodicOrbit f x).Chain r ↔ ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)

{α : Type u_1}
(r : α → α → Prop)
{f : α → α}
{x : α}

Cycle.Chain r (Function.periodicOrbit f x) ↔ ∀ n < Function.minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)


@[simp]
theorem mem_offDiag : x ∈ s.offDiag ↔ x.1 ∈ s ∧ x.2 ∈ s ∧ x.1 ≠ x.2

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{x : α × α}


theorem isClosed_iInter {f : ι → Set X} (h : ∀ i, IsClosed (f i)) : IsClosed (⋂ i, f i)

{X : Type u}
{ι : Sort w}
[TopologicalSpace X]
{f : ι → Set X}
(h : ∀ (i : ι), IsClosed (f i))


@[simp]
theorem ιMulti_succ_apply {n : ℕ} (v : Fin n.succ → M) :
    ιMulti R _ v = ι R (v 0) * ιMulti R _ (Matrix.vecTail v)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{n : ℕ}
(v : Fin n.succ → M)

(ExteriorAlgebra.ιMulti R n.succ) v = (ExteriorAlgebra.ι R) (v 0) * (ExteriorAlgebra.ιMulti R n) (Matrix.vecTail v)


@[simp] lemma supClosure_singleton : supClosure {a} = {a}

{α : Type u_2}
[SemilatticeSup α]
{a : α}


@[simp]
theorem star_def : (Star.star : K → K) = conj


/-- If `f` belongs to `Lp` for the measure `μ.trim hm`, then it belongs to the subgroup
`lpMeasSubgroup F m p μ`. -/
theorem mem_lpMeasSubgroup_toLp_of_trim (hm : m ≤ m0) (f : Lp F p (μ.trim hm)) :
    (memℒp_of_memℒp_trim hm (Lp.memℒp f)).toLp f ∈ lpMeasSubgroup F m p μ

(f : ↥(MeasureTheory.Lp F p (μ.trim hm)))

MeasureTheory.Memℒp.toLp ↑↑f ⋯ ∈ MeasureTheory.lpMeasSubgroup F m p μ


@[to_additive]
theorem finprod_eq_single (f : α → M) (a : α) (ha : ∀ x, x ≠ a → f x = 1) :
    ∏ᶠ x, f x = f a

{M : Type u_2}
{α : Sort u_4}
[CommMonoid M]
(f : α → M)
(a : α)
(ha : ∀ (x : α), x ≠ a → f x = 1)


theorem card_image₂_iff :
    (image₂ f s t).card = s.card * t.card ↔ (s ×ˢ t : Set (α × β)).InjOn fun x => f x.1 x.2

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}

(Finset.image₂ f s t).card = s.card * t.card ↔ Set.InjOn (fun x => f x.1 x.2) (↑s ×ˢ ↑t)


@[simp]
theorem prod_self_lt_prod_self : s₁ ×ˢ s₁ < s₂ ×ˢ s₂ ↔ s₁ < s₂

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

s₁ ×ˢ s₁ < s₂ ×ˢ s₂ ↔ s₁ < s₂


@[simp] lemma unop_rightUnitor (X : Cᵒᵖ) : (ρ_ X).unop = (ρ_ (unop X)).symm

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

(CategoryTheory.MonoidalCategory.rightUnitor X).unop =
  (CategoryTheory.MonoidalCategory.rightUnitor (Opposite.unop X)).symm


@[simp]
theorem sqrtd_im : (sqrtd : ℤ√d).im = 1


theorem totalDegree_multiset_prod (s : Multiset (MvPolynomial σ R)) :
    s.prod.totalDegree ≤ (s.map MvPolynomial.totalDegree).sum

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : Multiset (MvPolynomial σ R))

s.prod.totalDegree ≤ (Multiset.map MvPolynomial.totalDegree s).sum


@[simp]
theorem toLocallyRingedSpaceHom_val : (toLocallyRingedSpaceHom Y f).val = f

{X : AlgebraicGeometry.PresheafedSpace CommRingCat}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toLocallyRingedSpaceHom Y f).val = f


theorem AECover.lintegral_tendsto_of_countably_generated [l.IsCountablyGenerated] {φ : ι → Set α}
    (hφ : AECover μ l φ) {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ) :
    Tendsto (fun i => ∫⁻ x in φ i, f x ∂μ) l (𝓝 <| ∫⁻ x, f x ∂μ)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[l.IsCountablyGenerated]
{φ : ι → Set α}
(hφ : MeasureTheory.AECover μ l φ)
{f : α → ℝ≥0∞}
(hfm : AEMeasurable f μ)

Filter.Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) l (𝓝 (∫⁻ (x : α), f x ∂μ))


lemma LinearIndependent.eq_zero_of_pair' {x y : M} (h : LinearIndependent R ![x, y])
    {s t : R} (h' : s • x = t • y) : s = 0 ∧ t = 0

{R : Type u_2}
{M : Type u_4}
[Ring R]
[AddCommGroup M]
[Module R M]
{x y : M}
(h : LinearIndependent R ![x, y])
{s t : R}
(h' : s • x = t • y)


@[simp]
theorem empty_union {s₁ : Finmap β} : ∅ ∪ s₁ = s₁

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{s₁ : Finmap β}


@[simp]
lemma symm_add : φ.symm.add = φ.add

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(φ : W.LeftFraction₂ X Y)


/-- This lemma has an abbreviated name because it is used frequently. -/
theorem cancel_coe {a : ℝ≥0} : AddLECancellable (a : ℝ≥0∞)


/-- A continuous function on a compact space is automatically a continuous function vanishing at
infinity. -/
@[simps]
def ContinuousMap.liftZeroAtInfty [CompactSpace α] : C(α, β) ≃ C₀(α, β)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
[CompactSpace α]
(f : C(α, β))
(a : α)

(ZeroAtInftyContinuousMap.ContinuousMap.liftZeroAtInfty f) a = f a


@[mono]
theorem toSubMulAction_mono : Monotone (toSubMulAction : Submodule R M → SubMulAction R M)

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


protected theorem All.balRight
    (hl : l.All p) (hv : p v) (hr : r.All p) : (balRight l v r).All p

∀ {α : Type u_1} {p : α → Prop} {l : Batteries.RBNode α} {v : α} {r : Batteries.RBNode α},
  Batteries.RBNode.All p l → p v → Batteries.RBNode.All p r → Batteries.RBNode.All p (l.balRight v r)


@[simp]
theorem ceil_pos : 0 < ⌈a⌉₊ ↔ 0 < a

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}


theorem SkyscraperPresheafFunctor.map'_comp {a b c : C} (f : a ⟶ b) (g : b ⟶ c) :
    SkyscraperPresheafFunctor.map' p₀ (f ≫ g) =
      SkyscraperPresheafFunctor.map' p₀ f ≫ SkyscraperPresheafFunctor.map' p₀ g

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]


/-- A constructor for `SMulPosMono` requiring you to prove `a₁ ≤ a₂ → a₁ • b ≤ a₂ • b` only when
`0 < b`-/
lemma SMulPosMono.of_pos (h₀ : ∀ b : β, 0 < b → ∀ a₁ a₂ : α, a₁ ≤ a₂ → a₁ • b ≤ a₂ • b) :
    SMulPosMono α β

(h₀ : ∀ (b : β), 0 < b → ∀ (a₁ a₂ : α), a₁ ≤ a₂ → a₁ • b ≤ a₂ • b)


nonrec theorem cos_sq : cos x ^ 2 = 1 / 2 + cos (2 * x) / 2

Real.cos x ^ 2 = 1 / 2 + Real.cos (2 * x) / 2


@[simp]
theorem coe_basisOfOrthonormalOfCardEqFinrank [Fintype ι] [Nonempty ι] {v : ι → E}
    (hv : Orthonormal 𝕜 v) (card_eq : Fintype.card ι = finrank 𝕜 E) :
    (basisOfOrthonormalOfCardEqFinrank hv card_eq : ι → E) = v

(card_eq : Fintype.card ι = FiniteDimensional.finrank 𝕜 E)

⇑(basisOfOrthonormalOfCardEqFinrank hv card_eq) = v


@[to_additive (attr := simp)]
theorem Submonoid.equivMapOfInjective_coe_mulEquiv (e : M ≃* N) :
    S.equivMapOfInjective (e : M →* N) (EquivLike.injective e) = e.submonoidMap S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(S : AddSubmonoid M)
(e : M ≃+ N)

S.equivMapOfInjective ↑e ⋯ = e.addSubmonoidMap S


/-- A prime natural number is prime in `ℤ[i]` if and only if it is `3` mod `4` -/
theorem prime_iff_mod_four_eq_three_of_nat_prime (p : ℕ) [Fact p.Prime] :
    Prime (p : ℤ[i]) ↔ p % 4 = 3


lemma biUnion_mono (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) : s.biUnion t₁ ⊆ s.biUnion t₂

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t₁ t₂ : α → Finset β}
[DecidableEq β]
(h : ∀ a ∈ s, t₁ a ⊆ t₂ a)


theorem degree_lt_iff_coeff_zero (f : R[X]) (n : ℕ) :
    degree f < n ↔ ∀ m : ℕ, n ≤ m → coeff f m = 0

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

f.degree < ↑n ↔ ∀ (m : ℕ), n ≤ m → f.coeff m = 0


/-- The inverse of a group homomorphism is a group homomorphism if the target is commutative. -/
@[to_additive
      "The negation of an additive group homomorphism is an additive group homomorphism
      if the target is commutative."]
theorem inv {α β} [Group α] [CommGroup β] {f : α → β} (hf : IsGroupHom f) :
    IsGroupHom fun a => (f a)⁻¹

{α : Type u_1}
{β : Type u_2}
[AddGroup α]
[AddCommGroup β]
{f : α → β}
(hf : IsAddGroupHom f)


@[simp, norm_cast]
theorem coe_sInf (S : Set (Subfield K)) : ((sInf S : Subfield K) : Set K) = ⋂ s ∈ S, ↑s

{K : Type u}
[DivisionRing K]
(S : Set (Subfield K))


/-- A bounded convergence theorem for a finite measure:
If a sequence of bounded continuous non-negative functions are uniformly bounded by a constant
and tend pointwise to a limit, then their integrals (`MeasureTheory.lintegral`) against the finite
measure tend to the integral of the limit.

A related result with more general assumptions is
`MeasureTheory.tendsto_lintegral_nn_filter_of_le_const`.
-/
theorem tendsto_lintegral_nn_of_le_const (μ : FiniteMeasure Ω) {fs : ℕ → Ω →ᵇ ℝ≥0} {c : ℝ≥0}
    (fs_le_const : ∀ n ω, fs n ω ≤ c) {f : Ω → ℝ≥0}
    (fs_lim : ∀ ω, Tendsto (fun n => fs n ω) atTop (𝓝 (f ω))) :
    Tendsto (fun n => ∫⁻ ω, fs n ω ∂(μ : Measure Ω)) atTop (𝓝 (∫⁻ ω, f ω ∂(μ : Measure Ω)))

{fs : ℕ → Ω →ᵇ ℝ≥0}

(fs_le_const : ∀ (n : ℕ) (ω : Ω), (fs n) ω ≤ c)

(fs_lim : ∀ (ω : Ω), Filter.Tendsto (fun n => (fs n) ω) Filter.atTop (𝓝 (f ω)))

Filter.Tendsto (fun n => ∫⁻ (ω : Ω), ↑((fs n) ω) ∂↑μ) Filter.atTop (𝓝 (∫⁻ (ω : Ω), ↑(f ω) ∂↑μ))


theorem Prime.not_coprime_iff_dvd {m n : ℕ} : ¬Coprime m n ↔ ∃ p, Prime p ∧ p ∣ m ∧ p ∣ n

¬m.Coprime n ↔ ∃ p, Nat.Prime p ∧ p ∣ m ∧ p ∣ n


theorem hasColimit_of_comp_equivalence (E : C ⥤ D) [E.IsEquivalence] [HasColimit (K ⋙ E)] :
    HasColimit K


theorem map_contract {p : ℕ} (hp : p ≠ 0) {f : R →+* S} {q : R[X]} :
    (q.contract p).map f = (q.map f).contract p

{R : Type u}
[CommSemiring R]
{S : Type v}
[CommSemiring S]
{p : ℕ}
(hp : p ≠ 0)
{f : R →+* S}
{q : R[X]}

Polynomial.map f (Polynomial.contract p q) = Polynomial.contract p (Polynomial.map f q)


theorem tails_eq_iterate (s : Stream' α) : tails s = iterate tail (tail s)

s.tails = Stream'.iterate Stream'.tail s.tail


/-- If a set of algebraic elements in a field extension `K/F` have minimal polynomials that
  split in another extension `L/F`, then all minimal polynomials in the intermediate field
  generated by the set also split in `L/F`. -/
theorem splits_of_mem_adjoin {L} [Field L] [Algebra F L] {S : Set K}
    (splits : ∀ x ∈ S, IsIntegral F x ∧ (minpoly F x).Splits (algebraMap F L)) {x : K}
    (hx : x ∈ adjoin F S) : (minpoly F x).Splits (algebraMap F L)

(splits : ∀ x ∈ S, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x))


theorem map_map_zero_lt : f (g 0) < f 0 + g 0 + 1


/-- If `L / K` is a field extension, `S` is a finite subset of `L`, such that every element of `S`
is integral (= algebraic) over `K`, then `K(S) / K` is a finite extension.
A direct corollary of `finiteDimensional_iSup_of_finite`. -/
theorem finiteDimensional_adjoin {S : Set L} [Finite S] (hS : ∀ x ∈ S, IsIntegral K x) :
    FiniteDimensional K (adjoin K S)

{K : Type u}
[Field K]
{L : Type u_3}
[Field L]
[Algebra K L]
{S : Set L}
[Finite ↑S]
(hS : ∀ x ∈ S, IsIntegral K x)

FiniteDimensional K ↥(IntermediateField.adjoin K S)


@[to_additive (attr := simp) nsmul_bot]
theorem bot_pow {n : ℕ} (hn : n ≠ 0) : (⊥ : Filter α) ^ n = ⊥

{α : Type u_2}
[AddMonoid α]
{n : ℕ}
(hn : n ≠ 0)


/-- Pointwise infimum of two monotone functions is a monotone function. -/
protected theorem inf [Preorder α] [SemilatticeInf β] {f g : α → β} {s : Set α}
    (hf : MonotoneOn f s) (hg : MonotoneOn g s) : MonotoneOn (f ⊓ g) s

{α : Type u}
{β : Type v}
[Preorder α]
[SemilatticeInf β]
{f g : α → β}
{s : Set α}
(hf : MonotoneOn f s)
(hg : MonotoneOn g s)


theorem card_add_two_mul_card_eq_rank :
    NrRealPlaces K + 2 * NrComplexPlaces K = finrank ℚ K

(K : Type u_2)
[Field K]
[NumberField K]

NumberField.InfinitePlace.NrRealPlaces K + 2 * NumberField.InfinitePlace.NrComplexPlaces K =
  FiniteDimensional.finrank ℚ K


theorem IsGLB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
    {s : Set α} {x : α} (hx : IsGLB (f '' s) (f x)) : IsGLB s x

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : ∀ {x y : α}, f x ≤ f y ↔ x ≤ y)
{s : Set α}
{x : α}
(hx : IsGLB (f '' s) (f x))


@[simp]
theorem limitRecOn_succ {C} (o H₁ H₂ H₃) :
    @limitRecOn C (succ o) H₁ H₂ H₃ = H₂ o (@limitRecOn C o H₁ H₂ H₃)

(H₂ : (o : Ordinal.{u_4}) → C o → C (Order.succ o))

(H₃ : (o : Ordinal.{u_4}) → o.IsLimit → ((o' : Ordinal.{u_4}) → o' < o → C o') → C o)

(Order.succ o).limitRecOn H₁ H₂ H₃ = H₂ o (o.limitRecOn H₁ H₂ H₃)


@[simp]
theorem Quiver.Hom.op_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) : f.unop.op = f

{C : Type u₁}
[Quiver C]
{X Y : Cᵒᵖ}
(f : X ⟶ Y)


theorem dist_comm : G.dist u v = G.dist v u

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