theorem aestronglyMeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜]
    [SecondCountableTopologyEither 𝕜 F] (f : 𝕜 → F) (μ : Measure 𝕜) :
    AEStronglyMeasurable (deriv f) μ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
[MeasurableSpace 𝕜]
[OpensMeasurableSpace 𝕜]
[SecondCountableTopologyEither 𝕜 F]
(f : 𝕜 → F)
(μ : MeasureTheory.Measure 𝕜)

MeasureTheory.AEStronglyMeasurable (deriv f) μ


/-- A Lie ring is an additive group with compatible product, known as the bracket, satisfying the
Jacobi identity. -/
class LieRing (L : Type v) extends AddCommGroup L, Bracket L L where
  /-- A Lie ring bracket is additive in its first component. -/
  protected add_lie : ∀ x y z : L, ⁅x + y, z⁆ = ⁅x, z⁆ + ⁅y, z⁆
  /-- A Lie ring bracket is additive in its second component. -/
  protected lie_add : ∀ x y z : L, ⁅x, y + z⁆ = ⁅x, y⁆ + ⁅x, z⁆
  /-- A Lie ring bracket vanishes on the diagonal in L × L. -/
  protected lie_self : ∀ x : L, ⁅x, x⁆ = 0
  /-- A Lie ring bracket satisfies a Leibniz / Jacobi identity. -/
  protected leibniz_lie : ∀ x y z : L, ⁅x, ⁅y, z⁆⁆ = ⁅⁅x, y⁆, z⁆ + ⁅y, ⁅x, z⁆⁆

{L : Type v}
[self : LieRing L]
(x y z : L)


theorem volume_preserving_equiv_real_prod : MeasurePreserving measurableEquivRealProd

MeasureTheory.MeasurePreserving (⇑Complex.measurableEquivRealProd) MeasureTheory.volume MeasureTheory.volume


theorem mul_def (e₁ e₂ : MulAut M) : e₁ * e₂ = e₂.trans e₁

(M : Type u_2)
[Mul M]
(e₁ e₂ : MulAut M)


theorem maximum_concat (a : α) (l : List α) : maximum (l ++ [a]) = max (maximum l) a

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


theorem one_half_lt_one : (1 / 2 : α) < 1

{α : Type u_2}
[LinearOrderedSemifield α]


theorem contSupp_supports {S k} (H : contSupp k ⊆ S) : Supports (contSupp k) S

(H : Turing.PartrecToTM2.contSupp k ⊆ S)

Turing.PartrecToTM2.Supports (Turing.PartrecToTM2.contSupp k) S


@[simp]
theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f : CentroidHom α)


theorem find?_replicate : find? p (replicate n a) = if n = 0 then none else if p a then some a else none

∀ {α : Type u_1} {p : α → Bool} {n : Nat} {a : α},
  List.find? p (List.replicate n a) = if n = 0 then none else if p a = true then some a else none


/-- A version of `CategoryTheory.whiskeringRight` for bifunctors, obtained by uncurrying,
applying `whiskeringRight` and currying back
-/
@[simps!]
def whiskeringRight₂ : (C ⥤ D ⥤ E) ⥤ (B ⥤ C) ⥤ (B ⥤ D) ⥤ B ⥤ E

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

∀ {X_1 Y : CategoryTheory.Functor B C} (f : X_1 ⟶ Y) (Y_1 : CategoryTheory.Functor B D) (X_2 : B),
  ((((CategoryTheory.whiskeringRight₂ B C D E).obj X).map f).app Y_1).app X_2 = (X.map (f.app X_2)).app (Y_1.obj X_2)


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


theorem continuous_circleTransform {R : ℝ} (hR : 0 < R) {f : ℂ → E} {z w : ℂ}
    (hf : ContinuousOn f <| sphere z R) (hw : w ∈ ball z R) :
    Continuous (circleTransform R z w f)

(hf : ContinuousOn f (Metric.sphere z R))

Continuous (Complex.circleTransform R z w f)


@[instance]
theorem ordConnected_Icc {a b : α} : OrdConnected (Icc a b)


/-- Let `f : ℝ → ℝ` be a differentiable function. If `f'` is nonnegative, then
`f` is a monotone function. -/
lemma monotone_of_hasDerivAt_nonneg {f f' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x)
    (hf' : 0 ≤ f') : Monotone f

{f f' : ℝ → ℝ}
(hf : ∀ (x : ℝ), HasDerivAt f (f' x) x)
(hf' : 0 ≤ f')


theorem add_succ : ∀ m n : PosNum, m + succ n = succ (m + n)


theorem lim_eq_iff [NeBot f] (h : ∃ x : X, f ≤ 𝓝 x) {x} : @lim _ _ ⟨x⟩ f = x ↔ f ≤ 𝓝 x

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
{f : Filter X}
[f.NeBot]
(h : ∃ x, f ≤ 𝓝 x)
{x : X}


protected theorem mdifferentiable : MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
(f : E →L[𝕜] E')


theorem ne_of_mem_sphere (h : y ∈ sphere x ε) (hε : ε ≠ 0) : y ≠ x

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}
(h : y ∈ Metric.sphere x ε)
(hε : ε ≠ 0)


theorem geom_sum_mul [Ring α] (x : α) (n : ℕ) : (∑ i ∈ range n, x ^ i) * (x - 1) = x ^ n - 1

(∑ i ∈ Finset.range n, x ^ i) * (x - 1) = x ^ n - 1


theorem isLUB_of_tendsto_atBot [TopologicalSpace α] [Preorder α] [OrderClosedTopology α]
    [Nonempty β] [SemilatticeInf β] {f : β → α} {a : α} (hf : Antitone f)
    (ha : Tendsto f atBot (𝓝 a)) : IsLUB (Set.range f) a

(ha : Filter.Tendsto f Filter.atBot (𝓝 a))


theorem of_lintegral_ne_top {f : α →ₛ ℝ≥0∞} (h : f.lintegral μ ≠ ∞) : f.FinMeasSupp μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : MeasureTheory.SimpleFunc α ℝ≥0∞}
(h : f.lintegral μ ≠ ⊤)


theorem Filter.HasBasis.lift'_closure {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) : (l.lift' closure).HasBasis p fun i => closure (s i)

{X : Type u}
{ι : Sort w}
[TopologicalSpace X]
{l : Filter X}
{p : ι → Prop}
{s : ι → Set X}
(h : l.HasBasis p s)


@[simp]
theorem coe_inf (p p' : Subring R) : ((p ⊓ p' : Subring R) : Set R) = (p : Set R) ∩ p'

{R : Type u}
[Ring R]
(p p' : Subring R)


@[simp] theorem snd_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
    (x * y).snd = GMul.mul x.snd y.snd

{ι : Type u_1}
(A : ι → Type u_2)
[Add ι]
[GradedMonoid.GMul A]
(x y : GradedMonoid A)

(x * y).snd = GradedMonoid.GMul.mul x.snd y.snd


/-- For any word `w` in the coproduct,
if `w` is reduced (i.e none its letters are in the image of the base monoid), and nonempty, then
`w` itself is not in the image of the base group. -/
theorem Reduced.eq_empty_of_mem_range (hφ : ∀ i, Injective (φ i))
    {w : Word G} (hw : Reduced φ w)
    (h : ofCoprodI w.prod ∈ (base φ).range) : w = .empty

(hφ : ∀ (i : ι), Function.Injective ⇑(φ i))

(h : Monoid.PushoutI.ofCoprodI w.prod ∈ (Monoid.PushoutI.base φ).range)


theorem StrictConvex.add (hs : StrictConvex 𝕜 s) (ht : StrictConvex 𝕜 t) :
    StrictConvex 𝕜 (s + t)

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
[ContinuousAdd E]
{s t : Set E}
(hs : StrictConvex 𝕜 s)
(ht : StrictConvex 𝕜 t)


theorem superpolynomialDecay_iff_isBigO (hk : Tendsto k l atTop) :
    SuperpolynomialDecay l k f ↔ ∀ z : ℤ, f =O[l] fun a : α => k a ^ z

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{k : α → β}
(f : α → β)
[NormedLinearOrderedField β]
[OrderTopology β]
(hk : Filter.Tendsto k l Filter.atTop)

Asymptotics.SuperpolynomialDecay l k f ↔ ∀ (z : ℤ), f =O[l] fun a => k a ^ z


theorem gt_trans (h₁ : cmp x y = .gt) (h₂ : cmp y z = .gt) : cmp x z = .gt

∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y = Ordering.gt → cmp y z = Ordering.gt → cmp x_1 z = Ordering.gt


@[to_additive (attr := simp)]
theorem coe_toMonoidHom (e : M ≃* N) : ⇑e.toMonoidHom = e

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


lemma dirac_compProd_apply [MeasurableSingletonClass α] {a : α} [IsSFiniteKernel κ]
    {s : Set (α × β)} (hs : MeasurableSet s) :
    (Measure.dirac a ⊗ₘ κ) s = κ a (Prod.mk a ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[MeasurableSingletonClass α]
{a : α}
[ProbabilityTheory.IsSFiniteKernel κ]
{s : Set (α × β)}
(hs : MeasurableSet s)

(MeasureTheory.Measure.dirac a ⊗ₘ κ) s = (κ a) (Prod.mk a ⁻¹' s)


theorem dvd_iff (h : a ≡ b [MOD m]) (hdm : d ∣ m) : d ∣ a ↔ d ∣ b

{m a b d : ℕ}
(h : a ≡ b [MOD m])
(hdm : d ∣ m)


lemma algebraMap_galRestrict_apply (σ : L ≃ₐ[K] L) (x : B) :
    algebraMap B L (galRestrict A K L B σ x) = σ (algebraMap B L x)

(A : Type u_1)
{K : Type u_2}
{L : Type u_3}
{B : Type u_4}
[CommRing A]
[CommRing B]
[Algebra A B]
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra B L]
[Algebra K L]
[Algebra A L]
[IsScalarTower A B L]
[IsScalarTower A K L]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
(σ : L ≃ₐ[K] L)
(x : B)

(algebraMap B L) (((galRestrict A K L B) σ) x) = σ ((algebraMap B L) x)


@[simp]
theorem ord_aleph0 : ord.{u} ℵ₀ = ω


@[scoped simp]
theorem map_add_int' [AddGroupWithOne G] [AddGroup H] [AddConstMapClass F G H 1 b]
    (f : F) (x : G) (n : ℤ) : f (x + n) = f x + n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{b : H}
[AddGroupWithOne G]
[AddGroup H]
[AddConstMapClass F G H 1 b]
(f : F)
(x : G)
(n : ℤ)


@[simp] theorem length_range (n : Nat) : length (range n) = n


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

Relation.Comp (fun x x_1 => x = x_1) r = r


/-- `-2` is a square in `F` iff `#F` is not congruent to `5` or `7` mod `8`. -/
theorem FiniteField.isSquare_neg_two_iff :
    IsSquare (-2 : F) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7

IsSquare (-2) ↔ Fintype.card F % 8 ≠ 5 ∧ Fintype.card F % 8 ≠ 7


theorem hasBasis_self {l : Filter α} {P : Set α → Prop} :
    HasBasis l (fun s => s ∈ l ∧ P s) id ↔ ∀ t ∈ l, ∃ r ∈ l, P r ∧ r ⊆ t

{α : Type u_1}
{l : Filter α}
{P : Set α → Prop}

l.HasBasis (fun s => s ∈ l ∧ P s) id ↔ ∀ t ∈ l, ∃ r ∈ l, P r ∧ r ⊆ t


/-- This is a cofork which is helpful for establishing monadicity: the morphism from the Beck
coequalizer to this cofork is the unit for the adjunction on the comparison functor.
-/
@[simps! pt]
def unitCofork (A : adj.toMonad.Algebra)
    [HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))] :
    Cofork (G.map (F.map A.a)) (G.map (adj.counit.app (F.obj A.A)))

[CategoryTheory.Limits.HasCoequalizer (F.map A.a) (adj.counit.app (F.obj A.A))]

(CategoryTheory.Monad.MonadicityInternal.unitCofork A).pt =
  G.obj (CategoryTheory.Limits.coequalizer (F.map A.a) (adj.counit.app (F.obj A.A)))


theorem exists_or : (∃ x, p x ∨ q x) ↔ (∃ x, p x) ∨ ∃ x, q x


theorem MeasureTheory.Measure.hausdorffMeasure_smul₀ {𝕜 E : Type*} [NormedAddCommGroup E]
    [NormedField 𝕜] [NormedSpace 𝕜 E] [MeasurableSpace E] [BorelSpace E] {d : ℝ} (hd : 0 ≤ d)
    {r : 𝕜} (hr : r ≠ 0) (s : Set E) : μH[d] (r • s) = ‖r‖₊ ^ d • μH[d] s

{𝕜 : Type u_4}
{E : Type u_5}
[NormedAddCommGroup E]
[NormedField 𝕜]
[NormedSpace 𝕜 E]
[MeasurableSpace E]
[BorelSpace E]
{d : ℝ}
(hd : 0 ≤ d)
{r : 𝕜}
(hr : r ≠ 0)
(s : Set E)


/-- Embedding `i : Fin n` into `Fin (n + 1)` using a pivot `p` that is greater
results in a value that is less than `p`. -/
lemma succAbove_lt_iff_castSucc_lt (p : Fin (n + 1)) (i : Fin n) :
    p.succAbove i < p ↔ castSucc i < p


@[to_additive const_smul]
theorem EventuallyEq.pow_const {γ} [Pow β γ] {f g : α → β} {l : Filter α} (h : f =ᶠ[l] g) (c : γ) :
    (fun x => f x ^ c) =ᶠ[l] fun x => g x ^ c

{α : Type u}
{β : Type v}
{γ : Type u_2}
[Pow β γ]
{f g : α → β}
{l : Filter α}
(h : f =ᶠ[l] g)
(c : γ)


lemma ae_compProd_of_ae_ae {p : β × γ → Prop} (hp : MeasurableSet {x | p x})
    (h : ∀ᵐ b ∂κ a, ∀ᵐ c ∂η (a, b), p (b, c)) :
    ∀ᵐ bc ∂(κ ⊗ₖ η) a, p bc

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

(h : ∀ᵐ (b : β) ∂κ a, ∀ᵐ (c : γ) ∂η (a, b), p (b, c))


theorem inv_antitoneOn_Icc_right (ha : 0 < a) :
    AntitoneOn (fun x : α ↦ x⁻¹) (Set.Icc a b)

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(ha : 0 < a)


@[simp] protected theorem fdiv_self {a : Int} (H : a ≠ 0) : a.fdiv a = 1


@[simp]
theorem sameCycle_inv_apply_right : SameCycle f x (f⁻¹ y) ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}


@[refl]
protected theorem refl {_m0 : MeasurableSpace α} (μ : Measure α) : μ ≪ μ

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


protected theorem bind {n f g} (hf : @Partrec' n f) (hg : @Partrec' (n + 1) g) :
    @Partrec' n fun v => (f v).bind fun a => g (a ::ᵥ v)

{n : ℕ}
{f : Mathlib.Vector ℕ n →. ℕ}
{g : Mathlib.Vector ℕ (n + 1) →. ℕ}
(hf : Nat.Partrec' f)
(hg : Nat.Partrec' g)

Nat.Partrec' fun v => (f v).bind fun a => g (a ::ᵥ v)


@[to_additive]
lemma unit_of_mem_ofUnits_spec_eq_of_val_mem (S : Subgroup Mˣ) {x : Mˣ} (h : (x : M) ∈ S.ofUnits) :
    S.unit_of_mem_ofUnits h = x

{M : Type u_1}
[AddMonoid M]
(S : AddSubgroup (AddUnits M))
{x : AddUnits M}
(h : ↑x ∈ S.ofAddUnits)


theorem isSatisfiable [Nonempty M] : (L.completeTheory M).IsSatisfiable

(L : FirstOrder.Language)
(M : Type w)
[L.Structure M]
[Nonempty M]


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
protected theorem mul [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) : AEStronglyMeasurable (f * g) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (f + g) μ


lemma measure_eq_zero_or_top_of_subset_compl_sigmaFiniteSet [SFinite μ]
    (ht_subset : t ⊆ μ.sigmaFiniteSetᶜ) :
    μ t = 0 ∨ μ t = ∞

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{t : Set α}
[MeasureTheory.SFinite μ]
(ht_subset : t ⊆ μ.sigmaFiniteSetᶜ)


@[simp]
theorem Complex.logDeriv_sin : logDeriv (Complex.sin) = Complex.cot


@[simp]
theorem pointReflection_midpoint_right (x y : P) : pointReflection ℝ (midpoint ℝ x y) y = x

{V : Type u_2}
{P : Type u_10}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[NormedSpace ℝ V]
(x y : P)

(AffineIsometryEquiv.pointReflection ℝ (midpoint ℝ x y)) y = x


theorem card_zmod : Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n

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


theorem w : forkMap P X π ≫ firstMap P X π = forkMap P X π ≫ secondMap P X π

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Equalizer.Presieve.Arrows.forkMap P X π)
    (CategoryTheory.Equalizer.Presieve.Arrows.firstMap P X π) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Equalizer.Presieve.Arrows.forkMap P X π)
    (CategoryTheory.Equalizer.Presieve.Arrows.secondMap P X π)


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

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


/-- **Fundamental theorem of calculus-1**: if `f : ℝ → E` is integrable on `a..b` and `f` is
continuous at `a` and `b`, then `(u, v) ↦ ∫ x in u..v, f x` has derivative `(u, v) ↦ v • cb - u •
ca` at `(a, b)`. -/
theorem integral_hasFDerivAt (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f (𝓝 a)) (hmeas_b : StronglyMeasurableAtFilter f (𝓝 b))
    (ha : ContinuousAt f a) (hb : ContinuousAt f b) :
    HasFDerivAt (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x)
      ((snd ℝ ℝ ℝ).smulRight (f b) - (fst ℝ ℝ ℝ).smulRight (f a)) (a, b)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f (𝓝 a) MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

HasFDerivAt (fun p => ∫ (x : ℝ) in p.1 ..p.2, f x)
  ((ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)) (a, b)


/-- If `f` is a conservative self-map and `s` is a null measurable set of nonzero measure,
then there exists a point `x ∈ s` that returns to `s` under a non-zero iteration of `f`. -/
theorem exists_mem_iterate_mem (hf : Conservative f μ)
    (hsm : NullMeasurableSet s μ) (hs₀ : μ s ≠ 0) :
    ∃ x ∈ s, ∃ m ≠ 0, f^[m] x ∈ s

(hsm : MeasureTheory.NullMeasurableSet s μ)


@[to_additive]
lemma IsSquare.mul [CommSemigroup α] {a b : α} : IsSquare a → IsSquare b → IsSquare (a * b)

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


theorem lmul_algebraMap (x : R) : Algebra.lmul R A (algebraMap R A x) = Algebra.lsmul R R A x

(R : Type u)
{A : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : R)

(Algebra.lmul R A) ((algebraMap R A) x) = (Algebra.lsmul R R A) x


/-- The composite of two heterogeneous vertex operators acting on a vector, as an iterated Hahn
series. -/
@[simps]
def compHahnSeries (u : U) : HahnSeries Γ' (HahnSeries Γ W)

{Γ : Type u_5}
{Γ' : Type u_6}
[OrderedCancelAddCommMonoid Γ]
[OrderedCancelAddCommMonoid Γ']
{R : Type u_7}
[CommRing R]
{U : Type u_8}
{V : Type u_9}
{W : Type u_10}
[AddCommGroup U]
[Module R U]
[AddCommGroup V]
[Module R V]
[AddCommGroup W]
[Module R W]
(A : HVertexOperator Γ R V W)
(B : HVertexOperator Γ' R U V)
(u : U)
(g' : Γ')

(A.compHahnSeries B u).coeff g' = A ((B.coeff g') u)


theorem union_eq_diff_union_diff_union_inter (s t : Set α) : s ∪ t = s \ t ∪ t \ s ∪ s ∩ t


theorem sub_apply [SubNegZeroMonoid G] (g₁ g₂ : α →₀ G) (a : α) : (g₁ - g₂) a = g₁ a - g₂ a

{α : Type u_1}
{G : Type u_9}
[SubNegZeroMonoid G]
(g₁ g₂ : α →₀ G)
(a : α)


/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C` on
`s`, then the function is `C`-Lipschitz on `s`. Version with `fderivWithin` and
`LipschitzOnWith`. -/
theorem lipschitzOnWith_of_nnnorm_fderivWithin_le {C : ℝ≥0} (hf : DifferentiableOn 𝕜 f s)
    (bound : ∀ x ∈ s, ‖fderivWithin 𝕜 f s x‖₊ ≤ C) (hs : Convex ℝ s) : LipschitzOnWith C f s


@[simp]
theorem biInter_mem {β : Type v} {s : β → Set α} {is : Set β} (hf : is.Finite) :
    (⋂ i ∈ is, s i) ∈ f ↔ ∀ i ∈ is, s i ∈ f

{α : Type u}
{f : Filter α}
{β : Type v}
{s : β → Set α}
{is : Set β}
(hf : is.Finite)


lemma mul_lt_mul'' (hac : a < c) (hbd : b < d) : a * b < c * d

{a b c d : ℕ}
(hac : a < c)
(hbd : b < d)


theorem le_csSup_iff (h : BddAbove s) (hs : s.Nonempty) :
    a ≤ sSup s ↔ ∀ b, b ∈ upperBounds s → a ≤ b

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(h : BddAbove s)
(hs : s.Nonempty)


theorem MonoidalClosed.linearHomEquiv_symm_hom (f : B ⟶ A ⟶[Rep k G] C) :
    ((MonoidalClosed.linearHomEquiv A B C).symm f).hom = TensorProduct.uncurry k A B C f.hom.flip

{k G : Type u}
[CommRing k]
[Group G]
{A B C : Rep k G}
(f : B ⟶ (CategoryTheory.ihom A).obj C)

((Rep.MonoidalClosed.linearHomEquiv A B C).symm f).hom =
  (TensorProduct.uncurry k (CoeSort.coe A) (CoeSort.coe B) (CoeSort.coe C)) (LinearMap.flip f.hom)


@[simp]
theorem MulDistribMulAction.toMonoidHom_apply (r : M) (x : A) :
    MulDistribMulAction.toMonoidHom A r x = r • x

{M : Type u_1}
{A : Type u_4}
[Monoid M]
[Monoid A]
[MulDistribMulAction M A]
(r : M)
(x : A)

(MulDistribMulAction.toMonoidHom A r) x = r • x


@[simp]
theorem stereographic'_target {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    (stereographic' n v).target = Set.univ

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


@[simp]
theorem symm_toAffineEquiv (e : P₁ ≃ᵃL[k] P₂) : e.toAffineEquiv.symm = e.symm.toAffineEquiv

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


theorem ae_of_all {p : α → Prop} (μ : F) : (∀ a, p a) → ∀ᵐ a ∂μ, p a

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{p : α → Prop}
(μ : F)


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

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


theorem of_comp {Y Z : C} {q n : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ) (f : Z ⟶ Y) :
    HigherFacesVanish q (f ≫ φ)

(v : AlgebraicTopology.DoldKan.HigherFacesVanish q φ)

AlgebraicTopology.DoldKan.HigherFacesVanish q (f ≫ φ)


theorem MeasurePreserving.integral_comp' {β} [MeasurableSpace β] {ν} {f : α ≃ᵐ β}
    (h : MeasurePreserving f μ ν) (g : β → G) :
    ∫ x, g (f x) ∂μ = ∫ y, g y ∂ν

{f : α ≃ᵐ β}

(h : MeasureTheory.MeasurePreserving (⇑f) μ ν)

∫ (x : α), g (f x) ∂μ = ∫ (y : β), g y ∂ν


/-- If `I ≠ 0`, then `val_v(I) = 0` for all but finitely many maximal ideals of `R`. -/
theorem finite_factors' {I : FractionalIdeal R⁰ K} (hI : I ≠ 0) {a : R}
    {J : Ideal R} (haJ : I = spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J) :
    ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite,
      ((Associates.mk v.asIdeal).count (Associates.mk J).factors : ℤ) -
        (Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {a})).factors = 0

(haJ : I = FractionalIdeal.spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J)

∀ᶠ (v : IsDedekindDomain.HeightOneSpectrum R) in Filter.cofinite,
  ↑((Associates.mk v.asIdeal).count (Associates.mk J).factors) -
      ↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {a})).factors) =
    0


theorem isSubterminal_of_isTerminal {T : C} (hT : IsTerminal T) : IsSubterminal T

(hT : CategoryTheory.Limits.IsTerminal T)


@[to_additive]
theorem contMDiff_finset_prod (h : ∀ i ∈ t, ContMDiff I' I n (f i)) :
    ContMDiff I' I n fun x => ∏ i ∈ t, f i x

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[CommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{t : Finset ι}
{f : ι → M → G}
{n : ℕ∞}
(h : ∀ i ∈ t, ContMDiff I' I n (f i))


@[to_additive (attr := simp)]
lemma stabilizer_subgroup (s : Subgroup G) : stabilizer G (s : Set G) = s

{G : Type u_1}
[Group G]
(s : Subgroup G)


@[to_additive] lemma leOnePart_mul_oneLePart (a : α) : a⁻ᵐ * a⁺ᵐ = |a|ₘ

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

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


theorem fib_le_of_contsAux_b :
    n ≤ 1 ∨ ¬(of v).TerminatedAt (n - 2) → (fib n : K) ≤ ((of v).contsAux n).b

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

n ≤ 1 ∨ ¬(GenContFract.of v).TerminatedAt (n - 2) → ↑(Nat.fib n) ≤ ((GenContFract.of v).contsAux n).b


theorem inf'_mem (s : Set α) (w : ∀ᵉ (x ∈ s) (y ∈ s), x ⊓ y ∈ s) {ι : Type*}
    (t : Finset ι) (H : t.Nonempty) (p : ι → α) (h : ∀ i ∈ t, p i ∈ s) : t.inf' H p ∈ s

{α : Type u_2}
[SemilatticeInf α]
(s : Set α)
(w : ∀ x ∈ s, ∀ y ∈ s, x ⊓ y ∈ s)
{ι : Type u_7}
(t : Finset ι)
(H : t.Nonempty)
(p : ι → α)
(h : ∀ i ∈ t, p i ∈ s)


theorem sin_eq_iff_eq_or_add_eq_pi {θ ψ : Angle} : sin θ = sin ψ ↔ θ = ψ ∨ θ + ψ = π


theorem image_eq_preimage (h : M ≃ₘ^n⟮I, J⟯ N) (s : Set M) : h '' s = h.symm ⁻¹' s

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


/-- A category is called `R`-linear if `P ⟶ Q` is an `R`-module such that composition is
    `R`-linear in both variables. -/
class Linear (R : Type w) [Semiring R] (C : Type u) [Category.{v} C] [Preadditive C] where
  homModule : ∀ X Y : C, Module R (X ⟶ Y) := by infer_instance
  /-- compatibility of the scalar multiplication with the post-composition -/
  smul_comp : ∀ (X Y Z : C) (r : R) (f : X ⟶ Y) (g : Y ⟶ Z), (r • f) ≫ g = r • f ≫ g := by
    aesop_cat
  /-- compatibility of the scalar multiplication with the pre-composition -/
  comp_smul : ∀ (X Y Z : C) (f : X ⟶ Y) (r : R) (g : Y ⟶ Z), f ≫ (r • g) = r • f ≫ g := by
    aesop_cat

{R : Type w}
[Semiring R]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[self : CategoryTheory.Linear R C]
(X Y Z : C)
(r : R)
(f : X ⟶ Y)
(g : Y ⟶ Z)


@[to_additive]
theorem pairwise_disjoint_Ioo_mul_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ioo (a * b ^ n) (a * b ^ (n + 1)))

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

Pairwise (Disjoint on fun n => Set.Ioo (a + n • b) (a + (n + 1) • b))


@[to_additive (attr := simp) smul_dite]
lemma dite_pow (p : Prop) [Decidable p] (a : p → α) (b : ¬ p → α) (c : β) :
    (if h : p then a h else b h) ^ c = if h : p then a h ^ c else b h ^ c

{α : Type u_1}
{β : Type u_2}
[Pow α β]
(p : Prop)
[Decidable p]
(a : p → α)
(b : ¬p → α)
(c : β)


/-- **Phragmen-Lindelöf principle** in the right half-plane. Let `f g : ℂ → E` be functions such
that

* `f` and `g` are differentiable in the open right half-plane and are continuous on its closure;
* `‖f z‖` and `‖g z‖` are bounded from above by `A * exp(B * (abs z) ^ c)` on the open right
  half-plane for some `c < 2`;
* `‖f z‖` and `‖g z‖` are bounded from above by constants on the imaginary axis;
* `f x - g x`, `x : ℝ`, tends to zero superexponentially fast as `x → ∞`:
  for any natural `n`, `exp (n * x) * ‖f x - g x‖` tends to zero as `x → ∞`.

Then `f` is equal to `g` on the closed right half-plane. -/
theorem eqOn_right_half_plane_of_superexponential_decay {g : ℂ → E}
    (hfd : DiffContOnCl ℂ f {z | 0 < z.re}) (hgd : DiffContOnCl ℂ g {z | 0 < z.re})
    (hfexp : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * abs z ^ c))
    (hgexp : ∃ c < (2 : ℝ), ∃ B,
      g =O[cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * abs z ^ c))
    (hre : SuperpolynomialDecay atTop expR fun x => ‖f x - g x‖)
    (hfim : ∃ C, ∀ x : ℝ, ‖f (x * I)‖ ≤ C) (hgim : ∃ C, ∀ x : ℝ, ‖g (x * I)‖ ≤ C) :
    EqOn f g {z : ℂ | 0 ≤ z.re}

(hfexp : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * Complex.abs z ^ c))

(hgexp : ∃ c < 2, ∃ B, g =O[Bornology.cobounded ℂ ⊓ 𝓟 {z | 0 < z.re}] fun z => expR (B * Complex.abs z ^ c))

(hre : Asymptotics.SuperpolynomialDecay Filter.atTop expR fun x => ‖f ↑x - g ↑x‖)

(hfim : ∃ C, ∀ (x : ℝ), ‖f (↑x * Complex.I)‖ ≤ C)

(hgim : ∃ C, ∀ (x : ℝ), ‖g (↑x * Complex.I)‖ ≤ C)


@[simp]
theorem mem_inf {p p' : NonUnitalSubring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{R : Type u}
[NonUnitalNonAssocRing R]
{p p' : NonUnitalSubring R}
{x : R}


@[simp] lemma map_id : map (ContinuousMap.id α) = OrderHom.id

Specialization.map (ContinuousMap.id α) = OrderHom.id


lemma hasFDerivAt_jacobiTheta₂_term (n : ℤ) (z τ : ℂ) :
    HasFDerivAt (fun p : ℂ × ℂ ↦ jacobiTheta₂_term n p.1 p.2)
    (jacobiTheta₂_term_fderiv n z τ) (z, τ)

HasFDerivAt (fun p => jacobiTheta₂_term n p.1 p.2) (jacobiTheta₂_term_fderiv n z τ) (z, τ)


theorem isPure_of_subsingleton [Subsingleton α] (q : Semiquot α) : IsPure q

{α : Type u_1}
[Subsingleton α]
(q : Semiquot α)


@[to_additive]
theorem relindex_ker (f : G →* G') (K : Subgroup G) :
    f.ker.relindex K = Nat.card (f '' K)

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(f : G →* G')
(K : Subgroup G)


theorem hasDerivWithinAt_arcsin_Iic {x : ℝ} (h : x ≠ 1) :
    HasDerivWithinAt arcsin (1 / √(1 - x ^ 2)) (Iic x) x

HasDerivWithinAt Real.arcsin (1 / √(1 - x ^ 2)) (Set.Iic x) x


theorem derivWithin_cosh (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => Real.cosh (f x)) s x = Real.sinh (f x) * derivWithin f s x

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


@[simp] theorem cast_trans {α β γ} (h : α = β) (h2 : β = γ) :
    (Equiv.cast h).trans (Equiv.cast h2) = Equiv.cast (h.trans h2)

{α β γ : Sort u_1}
(h : α = β)
(h2 : β = γ)

(Equiv.cast h).trans (Equiv.cast h2) = Equiv.cast ⋯


@[simps]
instance hasForgetToHeytAlg : HasForget₂ BoolAlg HeytAlg

{X Y : BoolAlg}
(f : BoundedLatticeHom ↑X ↑Y)
(a : ↑X)

(CategoryTheory.HasForget₂.forget₂.map f) a = f a


/-- A product of ideals in an integral domain is zero if and only if one of the terms is zero. -/
@[deprecated multiset_prod_eq_bot (since := "2023-12-26")]
theorem prod_eq_bot {R : Type*} [CommRing R] [IsDomain R] {s : Multiset (Ideal R)} :
    s.prod = ⊥ ↔ ∃ I ∈ s, I = ⊥

{R : Type u_2}
[CommRing R]
[IsDomain R]
{s : Multiset (Ideal R)}


theorem conj_apply (e : M ≃ₗ[R] M₂) (f : Module.End R M) :
    e.conj f = ((↑e : M →ₗ[R] M₂).comp f).comp (e.symm : M₂ →ₗ[R] M)

{R : Type u_1}
{M : Type u_8}
{M₂ : Type u_10}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(e : M ≃ₗ[R] M₂)
(f : Module.End R M)


theorem Real.iSup_mul_of_nonpos (ha : r ≤ 0) (f : ι → ℝ) : (⨆ i, f i) * r = ⨅ i, f i * r

{ι : Sort u_1}
{r : ℝ}
(ha : r ≤ 0)
(f : ι → ℝ)


/-- Let `0 < r ∈ ℝ` and `j ∈ ℤ`. Then either `j ∈ B_r` or `B_r` jumps over `j`. -/
private theorem hit_or_miss (h : r > 0) :
    j ∈ {beattySeq r k | k} ∨ ∃ k : ℤ, k < j / r ∧ (j + 1) / r ≤ k + 1

j ∈ {x | ∃ k, beattySeq r k = x} ∨ ∃ k, ↑k < ↑j / r ∧ (↑j + 1) / r ≤ ↑k + 1


theorem Products.limitOrdinal (l : Products I) : l.isGood (π C (ord I · < o)) ↔
    ∃ (o' : Ordinal), o' < o ∧ l.isGood (π C (ord I · < o'))

(l : Profinite.NobelingProof.Products I)

Profinite.NobelingProof.Products.isGood (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o) l ↔
  ∃ o' < o,
    Profinite.NobelingProof.Products.isGood (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o')
      l


theorem dot_sdiv_left (xs ys : IntList) {d : Int} (h : d ∣ xs.gcd) :
    dot (xs.sdiv d) ys = (dot xs ys) / d

(xs ys : Lean.Omega.IntList)
{d : Int}
(h : d ∣ ↑xs.gcd)


lemma isUnramified_self : IsUnramified K w

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


theorem support_mono {G G' : SimpleGraph V} (h : G ≤ G') : G.support ⊆ G'.support

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


/-- Converse to the mean value inequality: if `f` is line differentiable at `x₀` and `C`-lipschitz
on a neighborhood of `x₀` then its line derivative at `x₀` in the direction `v` has norm
bounded by `C * ‖v‖`. This version only assumes that `‖f x - f x₀‖ ≤ C * ‖x - x₀‖` in a
neighborhood of `x`. -/
theorem HasLineDerivAt.le_of_lipschitzOn
    {f : E → F} {f' : F} {x₀ : E} (hf : HasLineDerivAt 𝕜 f f' x₀ v)
    {s : Set E} (hs : s ∈ 𝓝 x₀) {C : ℝ≥0} (hlip : LipschitzOnWith C f s) :
    ‖f'‖ ≤ C * ‖v‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{v : E}
{f : E → F}
{f' : F}
{x₀ : E}
(hf : HasLineDerivAt 𝕜 f f' x₀ v)
{s : Set E}
(hs : s ∈ 𝓝 x₀)
{C : ℝ≥0}
(hlip : LipschitzOnWith C f s)

‖f'‖ ≤ ↑C * ‖v‖


theorem extendSubtype_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : p x) :
    q (e.extendSubtype x)

{α : Type u_1}
[Finite α]
{p q : α → Prop}
[DecidablePred p]
[DecidablePred q]
(e : { x // p x } ≃ { x // q x })
(x : α)
(hx : p x)


lemma ofCocomplex_d_0_1 :
    (ofCocomplex Z).d 0 1 = d (Injective.ι Z)

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

(CategoryTheory.InjectiveResolution.ofCocomplex Z).d 0 1 = CategoryTheory.Injective.d (CategoryTheory.Injective.ι Z)


/--
The contravariant functor turning monoid objects in the opposite category into comonoid objects.
-/
@[simps]
def Mon_OpOpToComon_ : (Mon_ (Cᵒᵖ))ᵒᵖ ⥤ Comon_ C

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

∀ {X Y : (Mon_ Cᵒᵖ)ᵒᵖ} (f : X ⟶ Y), ((Comon_.Mon_OpOpToComon_ C).map f).hom = f.unop.hom.unop


/-- Given a family of sets `t : ι → Set α`, a finite set `I` in the index type such that all sets
`t i`, `i ∈ I`, are finite, if all `t i`, `i ∈ I`, are pairwise disjoint, then the product of `f a`
over `a ∈ ⋃ i ∈ I, t i` is equal to the product over `i ∈ I` of the products of `f a` over
`a ∈ t i`. -/
@[to_additive
      "Given a family of sets `t : ι → Set α`, a finite set `I` in the index type such that
      all sets `t i`, `i ∈ I`, are finite, if all `t i`, `i ∈ I`, are pairwise disjoint, then the
      sum of `f a` over `a ∈ ⋃ i ∈ I, t i` is equal to the sum over `i ∈ I` of the sums of `f a`
      over `a ∈ t i`."]
theorem finprod_mem_biUnion {I : Set ι} {t : ι → Set α} (h : I.PairwiseDisjoint t) (hI : I.Finite)
    (ht : ∀ i ∈ I, (t i).Finite) : ∏ᶠ a ∈ ⋃ x ∈ I, t x, f a = ∏ᶠ i ∈ I, ∏ᶠ j ∈ t i, f j

{α : Type u_1}
{ι : Type u_3}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{I : Set ι}
{t : ι → Set α}
(h : I.PairwiseDisjoint t)
(hI : I.Finite)
(ht : ∀ i ∈ I, (t i).Finite)

∑ᶠ (a : α) (_ : a ∈ ⋃ x ∈ I, t x), f a = ∑ᶠ (i : ι) (_ : i ∈ I) (j : α) (_ : j ∈ t i), f j


theorem flag_le_ker_coord (b : Basis (Fin n) R M) {k : Fin (n + 1)} {l : Fin n}
    (h : k ≤ l.castSucc) : b.flag k ≤ LinearMap.ker (b.coord l)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{n : ℕ}
(b : Basis (Fin n) R M)
{k : Fin (n + 1)}
{l : Fin n}
(h : k ≤ l.castSucc)


@[simp]
theorem wellFoundedOn_empty (r : α → α → Prop) : WellFoundedOn ∅ r


@[to_additive]
theorem smul_inter_ne_empty_iff {s t : Set α} {x : α} :
    x • s ∩ t ≠ ∅ ↔ ∃ a b, (a ∈ t ∧ b ∈ s) ∧ a * b⁻¹ = x

{α : Type u_2}
[Group α]
{s t : Set α}
{x : α}


/-- If `r` is a positive constant, `fun x ↦ f x / r` tends to negative infinity along a filter
if and only if `f` tends to negative infinity along the same filter. -/
lemma tendsto_div_const_atBot_of_pos (hr : 0 < r) :
    Tendsto (fun x ↦ f x / r) l atBot ↔ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : 0 < r)

Filter.Tendsto (fun x => f x / r) l Filter.atBot ↔ Filter.Tendsto f l Filter.atBot


/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step1 (K : Subgroup G) (hK : K ⊔ N = ⊤) : K = ⊤

(h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Finite G'],
    Nat.card G' < Nat.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Nat.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H')

(h3 : ∀ (H : Subgroup G), ¬N.IsComplement' H)


@[to_additive]
theorem rangeKerLift_surjective : Surjective (rangeKerLift φ)

{G : Type u}
[AddGroup G]
{H : Type v}
[AddGroup H]
(φ : G →+ H)


theorem lt_add_of_limit {a b c : Ordinal.{u}} (h : IsLimit c) :
    a < b + c ↔ ∃ c' < c, a < b + c'


theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
{x : E}
(hK : Dense ↑K)
(h : x ∈ Kᗮ)


theorem aeStronglyMeasurable'_condexpIndSMul (hm : m ≤ m0) (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    (x : G) : AEStronglyMeasurable' m (condexpIndSMul hm hs hμs x) μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
(hm : m ≤ m0)
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(x : G)

MeasureTheory.AEStronglyMeasurable' m (↑↑(MeasureTheory.condexpIndSMul hm hs hμs x)) μ


lemma smoothSheafCommRing.eval_surjective (x) :
    Function.Surjective (smoothSheafCommRing.eval IM I M R x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{EM : Type u_2}
[NormedAddCommGroup EM]
[NormedSpace 𝕜 EM]
{HM : Type u_3}
[TopologicalSpace HM]
(IM : ModelWithCorners 𝕜 EM HM)
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u)
[TopologicalSpace M]
[ChartedSpace HM M]
(R : Type u)
[TopologicalSpace R]
[ChartedSpace H R]
[CommRing R]
[SmoothRing I R]
(x : M)

Function.Surjective ⇑(smoothSheafCommRing.eval IM I M R x)


theorem max_rec (hx : y ≤ x → p x) (hy : x ≤ y → p y) : p (max x y)

{α : Type u_2}
[LinearOrder α]
{p : α → Prop}
{x y : α}
(hx : y ≤ x → p x)
(hy : x ≤ y → p y)


/-- If a function `f` tends to negative infinity along a filter,
then `f` multiplied by a negative constant (on the left) tends to positive infinity. -/
theorem Tendsto.const_mul_atBot_of_neg (hr : r < 0) (hf : Tendsto f l atBot) :
    Tendsto (fun x => r * f x) l atTop

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : r < 0)
(hf : Filter.Tendsto f l Filter.atBot)

Filter.Tendsto (fun x => r * f x) l Filter.atTop


theorem biUnionIndex_le (πi : ∀ J, Prepartition J) (J : Box ι) : π.biUnionIndex πi J ≤ I

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)


theorem lt_one_of_lt_one (h : x < 1) : smoothTransition x < 1


lemma IsCompact.exists_clusterPt (hs : IsCompact s) {f : Filter X} [NeBot f] (hf : f ≤ 𝓟 s) :
    ∃ x ∈ s, ClusterPt x f

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsCompact s)
{f : Filter X}
[f.NeBot]
(hf : f ≤ 𝓟 s)


theorem gcd_mul_lcm (i j : ℤ) : gcd i j * lcm i j = natAbs (i * j)


/-- An extensionality lemma for being the zero arrow. -/
theorem zero_morphism_ext {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → f = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
{P Q : C}
(f : P ⟶ Q)

(∀ (a : CategoryTheory.Abelian.Pseudoelement P), CategoryTheory.Abelian.Pseudoelement.pseudoApply f a = 0) → f = 0


@[simp]
theorem balanced_empty : Balanced 𝕜 (∅ : Set E)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]


theorem ne_nil_of_drop_ne_nil {as : List α} {i : Nat} (h: as.drop i ≠ []) : as ≠ []

{α : Type u_1}
{as : List α}
{i : Nat}
(h : List.drop i as ≠ [])


theorem piecewise {s : Set α} [DecidablePred (· ∈ s)]
    (hs : MeasurableSet s) (hf : AEStronglyMeasurable f (μ.restrict s))
    (hg : AEStronglyMeasurable g (μ.restrict sᶜ)) :
    AEStronglyMeasurable (s.piecewise f g) μ

(hf : MeasureTheory.AEStronglyMeasurable f (μ.restrict s))

(hg : MeasureTheory.AEStronglyMeasurable g (μ.restrict sᶜ))

MeasureTheory.AEStronglyMeasurable (s.piecewise f g) μ


/-- The oriented angle between three points is zero if and only if one of the first and third
points is weakly between the other two. -/
theorem oangle_eq_zero_iff_wbtw {p₁ p₂ p₃ : P} :
    ∡ p₁ p₂ p₃ = 0 ↔ Wbtw ℝ p₂ p₁ p₃ ∨ Wbtw ℝ p₂ p₃ p₁

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


@[simp]
theorem disjoint_pi : Disjoint (s.pi t₁) (s.pi t₂) ↔ ∃ i ∈ s, Disjoint (t₁ i) (t₂ i)

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}
[∀ (i : ι), Nonempty (α i)]


@[simp]
theorem get_think : get (think s) = get s

{α : Type u}
(s : Computation α)
[h : s.Terminates]


@[simp] theorem empty_sigma : (∅ : Set ι).sigma t = ∅

{ι : Type u_1}
{α : ι → Type u_3}
{t : (i : ι) → Set (α i)}


/-- The `ComplexShape` allowing differentials from `X i` to `X (i+a)`.
(For example when `a = 1`, a cohomology theory indexed by `ℕ` or `ℤ`)
-/
@[simps]
def up' {α : Type*} [AddRightCancelSemigroup α] (a : α) : ComplexShape α

{α : Type u_2}
[AddRightCancelSemigroup α]
(a i j : α)

(ComplexShape.up' a).Rel i j = (i + a = j)


lemma iInf_rat_gt_defaultRatCDF (t : ℚ) :
    ⨅ r : Ioi t, defaultRatCDF r = defaultRatCDF t

⨅ r, ProbabilityTheory.defaultRatCDF ↑r = ProbabilityTheory.defaultRatCDF t


theorem le_csSup_iff' {s : Set α} {a : α} (h : BddAbove s) :
    a ≤ sSup s ↔ ∀ b, b ∈ upperBounds s → a ≤ b

{α : Type u_1}
[ConditionallyCompleteLinearOrderBot α]
{s : Set α}
{a : α}
(h : BddAbove s)


theorem logDeriv_const_mul {f : 𝕜 → 𝕜'} (x : 𝕜) (a : 𝕜') (ha : a ≠ 0):
    logDeriv (fun z => a * f z) x = logDeriv f x

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{f : 𝕜 → 𝕜'}
(x : 𝕜)
(a : 𝕜')
(ha : a ≠ 0)


theorem count_permutations'Aux_self [DecidableEq α] (l : List α) (x : α) :
    count (x :: l) (permutations'Aux x l) = length (takeWhile (x = ·) l) + 1

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

List.count (x :: l) (List.permutations'Aux x l) = (List.takeWhile (fun x_1 => decide (x = x_1)) l).length + 1


theorem union_self (s : Finset α) : s ∪ s = s

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


/-- Brahmagupta's identity, see <https://en.wikipedia.org/wiki/Brahmagupta%27s_identity>
-/
theorem sq_add_mul_sq_mul_sq_add_mul_sq :
    (x₁ ^ 2 + n * x₂ ^ 2) * (y₁ ^ 2 + n * y₂ ^ 2) =
    (x₁ * y₁ - n * x₂ * y₂) ^ 2 + n * (x₁ * y₂ + x₂ * y₁) ^ 2

{R : Type u_1}
[CommRing R]
{x₁ x₂ y₁ y₂ n : R}


@[to_additive rightAddCoset_mem_rightAddCoset]
theorem rightCoset_mem_rightCoset {a : α} (ha : a ∈ s) : op a • (s : Set α) = s

{α : Type u_1}
[AddGroup α]
(s : AddSubgroup α)
{a : α}
(ha : a ∈ s)


theorem AnalyticOn.eval_mvPolynomial [Fintype σ] (p : MvPolynomial σ 𝕜) :
    AnalyticOn 𝕜 (eval · p) Set.univ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{σ : Type u_5}
[CompleteSpace 𝕜]
[Fintype σ]
(p : MvPolynomial σ 𝕜)

AnalyticOn 𝕜 (fun x => (MvPolynomial.eval x) p) Set.univ


@[reassoc (attr := simp)]
lemma ι_mapBifunctorRightUnitor_hom_apply (j : J) :
    ιMapBifunctorMapObj F p X ((single₀ I).obj Y) j 0 j (hp j) ≫
        (mapBifunctorRightUnitor F Y e p hp X).hom j =
      (F.obj (X j)).map (singleObjApplyIso (0 : I) Y).hom ≫ e.hom.app (X j)

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

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

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

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

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


theorem yonedaFamily_fromCocone_compatible (S : Sieve X) (s : Cocone (diagram S.arrows)) :
    FamilyOfElements.Compatible <| yonedaFamilyOfElements_fromCocone S.arrows s

(s : CategoryTheory.Limits.Cocone S.arrows.diagram)


theorem leadingCoeff_expand {p : ℕ} {f : R[X]} (hp : 0 < p) :
    (expand R p f).leadingCoeff = f.leadingCoeff

{R : Type u}
[CommSemiring R]
{p : ℕ}
{f : R[X]}
(hp : 0 < p)

((Polynomial.expand R p) f).leadingCoeff = f.leadingCoeff


@[simp]
theorem map_X (s : σ) : map σ f (X s) = X s

{σ : Type u_1}
{R : Type u_2}
{S : Type u_3}
[Semiring R]
[Semiring S]
(f : R →+* S)
(s : σ)

(MvPowerSeries.map σ f) (MvPowerSeries.X s) = MvPowerSeries.X s


theorem iInf_congr (h : ∀ i, f i = g i) : ⨅ i, f i = ⨅ i, g i

{α : Type u_1}
{ι : Sort u_5}
[InfSet α]
{f g : ι → α}
(h : ∀ (i : ι), f i = g i)


theorem Antitone.isBoundedUnder_ge_comp_iff [Nonempty β] [LinearOrder β] [Preorder γ] [NoMinOrder γ]
    {g : β → γ} {f : α → β} {l : Filter α} (hg : Antitone g) (hg' : Tendsto g atTop atBot) :
    IsBoundedUnder (· ≥ ·) l (g ∘ f) ↔ IsBoundedUnder (· ≤ ·) l f

(hg' : Filter.Tendsto g Filter.atTop Filter.atBot)

Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l (g ∘ f) ↔ Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l f


/-- Suppose that `c₁` is equidistant from `p₁` and `p₂`, and the same applies to `c₂`. Then the
vector between `c₁` and `c₂` is orthogonal to that between `p₁` and `p₂`. (In two dimensions, this
says that the diagonals of a kite are orthogonal.) -/
theorem inner_vsub_vsub_of_dist_eq_of_dist_eq {c₁ c₂ p₁ p₂ : P} (hc₁ : dist p₁ c₁ = dist p₂ c₁)
    (hc₂ : dist p₁ c₂ = dist p₂ c₂) : ⟪c₂ -ᵥ c₁, p₂ -ᵥ p₁⟫ = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c₁ c₂ p₁ p₂ : P}
(hc₁ : dist p₁ c₁ = dist p₂ c₁)
(hc₂ : dist p₁ c₂ = dist p₂ c₂)


/-- We can upgrade `e.inverse` to a monoidal functor from `D` with the transported structure to `C`.
-/
@[simps!]
def fromTransported (e : C ≌ D) : MonoidalFunctor (Transported e) C

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

(CategoryTheory.Monoidal.fromTransported e).toFunctor = e.inverse


lemma IsLimit.isZero_pt {c : Cone F} (hc : IsLimit c) (hF : IsZero F) : IsZero c.pt


@[reassoc (attr := simp)]
theorem ofLE_comp_ofLEMk {B A : C} (X Y : Subobject B) (f : A ⟶ B) [Mono f] (h₁ : X ≤ Y)
    (h₂ : Y ≤ mk f) : ofLE X Y h₁ ≫ ofLEMk Y f h₂ = ofLEMk X f (h₁.trans h₂)

(h₂ : Y ≤ CategoryTheory.Subobject.mk f)

CategoryTheory.CategoryStruct.comp (X.ofLE Y h₁) (Y.ofLEMk f h₂) = X.ofLEMk f ⋯


theorem of_hasFiniteColimits [HasFiniteColimits C] : IsFiltered C


theorem of_surjective (f : A →+* B) (hf : Surjective f) (hker : f.ker.FG) :
    f.FinitePresentation

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
(f : A →+* B)
(hf : Function.Surjective ⇑f)
(hker : (RingHom.ker f).FG)


@[to_additive]
theorem subset_closure {s : Set G} : s ⊆ closure s


theorem forall_mem_map_iff {f : α → β} {p : β → Prop} {s : Multiset α} :
    (∀ y ∈ s.map f, p y) ↔ ∀ x ∈ s, p (f x)

{α : Type u_1}
{β : Type v}
{f : α → β}
{p : β → Prop}
{s : Multiset α}

(∀ y ∈ Multiset.map f s, p y) ↔ ∀ x ∈ s, p (f x)


theorem continuousAt_apply (i : ι) (x : ∀ i, π i) : ContinuousAt (fun p : ∀ i, π i => p i) x

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
(i : ι)
(x : (i : ι) → π i)


@[to_additive (attr := simp)]
theorem ofLex_one [One α] : (ofLex 1 : α) = 1


theorem mem_of_span_top_of_smul_mem (M' : Submodule R M) (s : Set R) (hs : Ideal.span s = ⊤) (x : M)
    (H : ∀ r : s, (r : R) • x ∈ M') : x ∈ M'

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(M' : Submodule R M)
(s : Set R)
(hs : Ideal.span s = ⊤)
(x : M)
(H : ∀ (r : ↑s), ↑r • x ∈ M')


lemma pushforward_obj_obj (M : PresheafOfModules.{v} R) (X : Cᵒᵖ) :
    ((pushforward φ).obj M).obj X =
      (ModuleCat.restrictScalars (φ.app X)).obj (M.obj (Opposite.op (F.obj X.unop)))

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : C ⥤ D}
{R : Dᵒᵖ ⥤ RingCat}
{S : Cᵒᵖ ⥤ RingCat}
(φ : S ⟶ F.op ⋙ R)
(M : PresheafOfModules R)
(X : Cᵒᵖ)

((PresheafOfModules.pushforward φ).obj M).obj X =
  (ModuleCat.restrictScalars (φ.app X)).obj (M.obj (Opposite.op (F.obj (Opposite.unop X))))


nonrec theorem HasFDerivAtFilter.mono (h : HasFDerivAtFilter f f' x L₂) (hst : L₁ ≤ L₂) :
    HasFDerivAtFilter f f' x L₁

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{L₁ L₂ : Filter E}
(h : HasFDerivAtFilter f f' x L₂)
(hst : L₁ ≤ L₂)


theorem condexpL1_smul (c : 𝕜) (f : α → F') : condexpL1 hm μ (c • f) = c • condexpL1 hm μ f

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

MeasureTheory.condexpL1 hm μ (c • f) = c • MeasureTheory.condexpL1 hm μ f


theorem embedding_inclusion {s t : Set X} (h : s ⊆ t) : Embedding (inclusion h)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(h : s ⊆ t)


@[reassoc]
theorem leftUnitor_inv_braiding (X : C) : (λ_ X).inv ≫ (β_ (𝟙_ C) X).hom = (ρ_ X).inv

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


theorem nontrivial_iff_exists_lt [LinearOrder α] :
    s.Nontrivial ↔ ∃ᵉ (x ∈ s) (y ∈ s), x < y

{α : Type u}
{s : Set α}
[LinearOrder α]


@[simp]
theorem toMultiset_sup : toMultiset (f ⊔ g) = toMultiset f∪ toMultiset g

{α : Type u_1}
[DecidableEq α]
(f g : Π₀ (_a : α), ℕ)

DFinsupp.toMultiset (f ⊔ g) = DFinsupp.toMultiset f ∪ DFinsupp.toMultiset g


/-- The Taylor series of the complex logarithm at `1` converges to the logarithm in the
open unit disk. -/
lemma hasSum_taylorSeries_log {z : ℂ} (hz : ‖z‖ < 1) :
    HasSum (fun n : ℕ ↦ (-1) ^ (n + 1) * z ^ n / n) (log (1 + z))

HasSum (fun n => (-1) ^ (n + 1) * z ^ n / ↑n) (Complex.log (1 + z))


theorem mem_pointwise_smul_iff_inv_smul_mem {a : α} {S : AddSubmonoid A} {x : A} :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Group α]
[DistribMulAction α A]
{a : α}
{S : AddSubmonoid A}
{x : A}

x ∈ a • S ↔ a⁻¹ • x ∈ S


theorem contDiff_inner {n} : ContDiff ℝ n fun p : E × E => ⟪p.1, p.2⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{n : ℕ∞}


nonrec theorem IsLocalMaxOn.sup (hf : IsLocalMaxOn f s a) (hg : IsLocalMaxOn g s a) :
    IsLocalMaxOn (fun x => f x ⊔ g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SemilatticeSup β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMaxOn f s a)
(hg : IsLocalMaxOn g s a)


/-- Makes a `OneHom` inverse from the bijective inverse of a `OneHom` -/
@[to_additive (attr := simps)
  "Make a `ZeroHom` inverse from the bijective inverse of a `ZeroHom`"]
def OneHom.inverse [One M] [One N]
    (f : OneHom M N) (g : N → M)
    (h₁ : Function.LeftInverse g f) :
  OneHom N M

{M : Type u_6}
{N : Type u_7}
[Zero M]
[Zero N]
(f : ZeroHom M N)
(g : N → M)
(h₁ : Function.LeftInverse g ⇑f)


protected theorem «forall» {p : Option α → Prop} : (∀ x, p x) ↔ p none ∧ ∀ x, p (some x)

(∀ (x : Option α), p x) ↔ p none ∧ ∀ (x : α), p (some x)


theorem reduceOption_length_lt_iff {l : List (Option α)} :
    l.reduceOption.length < l.length ↔ none ∈ l


/-- Swap the sets of a concept to make it a concept of the dual context. -/
@[simps]
def swap (c : Concept α β r) : Concept β α (swap r)

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
(c : Concept α β r)


/-- The object in the category of `R`-Hopf algebras associated to an `R`-Hopf algebra. -/
@[simps]
def of (X : Type v) [Ring X] [HopfAlgebra R X] :
    HopfAlgebraCat R

(R : Type u)
[CommRing R]
(X : Type v)
[Ring X]
[HopfAlgebra R X]

(HopfAlgebraCat.of R X).str = inferInstance


/-- Infinite set variant of `Nat.exists_infinite_pseudoprimes`
-/
theorem infinite_setOf_pseudoprimes {b : ℕ} (h : 1 ≤ b) :
    Set.Infinite { n : ℕ | FermatPsp n b }


theorem comp_elim (f : γ → δ) (g : α → γ) (h : β → γ) :
    f ∘ Sum.elim g h = Sum.elim (f ∘ g) (f ∘ h)

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


theorem betaIntegral_eval_one_right {u : ℂ} (hu : 0 < re u) : betaIntegral u 1 = 1 / u


@[to_additive]
protected lemma mul_inv_eq_one (h : IsUnit b) : a * b⁻¹ = 1 ↔ a = b

{α : Type u}
[DivisionMonoid α]
{a b : α}
(h : IsUnit b)


@[to_additive addCHaar_mono]
theorem chaar_mono {K₀ : PositiveCompacts G} {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂) :
    chaar K₀ K₁ ≤ chaar K₀ K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.addCHaar K₀ K₁ ≤ MeasureTheory.Measure.haar.addCHaar K₀ K₂


/-- If the sign of the angle between three points is nonzero, the first and third points are not
equal. -/
theorem left_ne_right_of_oangle_sign_ne_zero {p₁ p₂ p₃ : P} (h : (∡ p₁ p₂ p₃).sign ≠ 0) : p₁ ≠ p₃

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


/-- The obvious functor `ShortComplex Cᵒᵖ ⥤ (ShortComplex C)ᵒᵖ`. -/
@[simps]
def unopFunctor : ShortComplex Cᵒᵖ ⥤ (ShortComplex C)ᵒᵖ

∀ {X Y : CategoryTheory.ShortComplex Cᵒᵖ} (φ : X ⟶ Y),
  (CategoryTheory.ShortComplex.unopFunctor C).map φ = (CategoryTheory.ShortComplex.unopMap φ).op


@[simp]
theorem unitLattice_rank :
    finrank ℤ (unitLattice K) = Units.rank K

(K : Type u_1)
[Field K]
[NumberField K]

FiniteDimensional.finrank ℤ ↥(NumberField.Units.unitLattice K) = NumberField.Units.rank K


theorem dite_whiskerRight {P : Prop} [Decidable P]
    {X Y : C} (f : P → (X ⟶ Y)) (f' : ¬P → (X ⟶ Y)) (Z : C) :
      (if h : P then f h else f' h) ▷ Z = if h : P then f h ▷ Z else f' h ▷ Z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{P : Prop}
[Decidable P]
{X Y : C}
(f : P → (X ⟶ Y))
(f' : ¬P → (X ⟶ Y))
(Z : C)

CategoryTheory.MonoidalCategory.whiskerRight (if h : P then f h else f' h) Z =
  if h : P then CategoryTheory.MonoidalCategory.whiskerRight (f h) Z
  else CategoryTheory.MonoidalCategory.whiskerRight (f' h) Z


@[simp]
theorem constantCoeff_C (a : R) : constantCoeff σ R (C σ R a) = a

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

(MvPowerSeries.constantCoeff σ R) ((MvPowerSeries.C σ R) a) = a


/-- A predicate to express that a (semi)ring is a (semi)field.

This is mainly useful because such a predicate does not contain data,
and can therefore be easily transported along ring isomorphisms.
Additionally, this is useful when trying to prove that
a particular ring structure extends to a (semi)field. -/
structure IsField (R : Type u) [Semiring R] : Prop where
  /-- For a semiring to be a field, it must have two distinct elements. -/
  exists_pair_ne : ∃ x y : R, x ≠ y
  /-- Fields are commutative. -/
  mul_comm : ∀ x y : R, x * y = y * x
  /-- Nonzero elements have multiplicative inverses. -/
  mul_inv_cancel : ∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1

{R : Type u}
[Semiring R]
(self : IsField R)


theorem pow_lt_one (h₀ : 0 ≤ a) (h₁ : a < 1) : ∀ {n : ℕ}, n ≠ 0 → a ^ n < 1

{R : Type u_3}
[OrderedSemiring R]
{a : R}
(h₀ : 0 ≤ a)
(h₁ : a < 1)
{n : ℕ}


theorem StrictMono.mul [PosMulStrictMono α] [MulPosStrictMono α]
    (hf : StrictMono f) (hg : StrictMono g) (hf₀ : ∀ x, 0 ≤ f x)
    (hg₀ : ∀ x, 0 ≤ g x) : StrictMono (f * g)

{α : Type u}
{β : Type u_1}
[Semiring α]
[PartialOrder α]
[Preorder β]
{f g : β → α}
[PosMulStrictMono α]
[MulPosStrictMono α]
(hf : StrictMono f)
(hg : StrictMono g)
(hf₀ : ∀ (x : β), 0 ≤ f x)
(hg₀ : ∀ (x : β), 0 ≤ g x)


/-- A version of `Homeomorph.mulLeft a b⁻¹` that is defeq to `a / b`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }))
  " A version of `Homeomorph.addLeft a (-b)` that is defeq to `a - b`. "]
def Homeomorph.divLeft (x : G) : G ≃ₜ G

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
(x b : G)


theorem μ_natural {X Y X' Y' : Type u} (f : X ⟶ Y) (g : X' ⟶ Y') :
    ((free R).map f ⊗ (free R).map g) ≫ (μ R Y Y').hom = (μ R X X').hom ≫ (free R).map (f ⊗ g)

(R : Type u)
[CommRing R]
{X Y X' Y' : Type u}
(f : X ⟶ Y)
(g : X' ⟶ Y')

CategoryTheory.MonoidalCategory.tensorHom ((ModuleCat.free R).map f) ((ModuleCat.free R).map g) ≫
    (ModuleCat.Free.μ R Y Y').hom =
  (ModuleCat.Free.μ R X X').hom ≫ (ModuleCat.free R).map (CategoryTheory.MonoidalCategory.tensorHom f g)


@[simp]
theorem count_replicate_self (a : α) (n : ℕ) : count a (replicate n a) = n

{α : Type u_1}
[DecidableEq α]
(a : α)
(n : ℕ)

Multiset.count a (Multiset.replicate n a) = n


/-- Any product of proper maps is proper. -/
lemma IsProperMap.pi_map {X Y : ι → Type*} [∀ i, TopologicalSpace (X i)]
    [∀ i, TopologicalSpace (Y i)] {f : (i : ι) → X i → Y i} (h : ∀ i, IsProperMap (f i)) :
    IsProperMap (fun (x : ∀ i, X i) i ↦ f i (x i))

{ι : Type u_5}
{X : ι → Type u_6}
{Y : ι → Type u_7}
[(i : ι) → TopologicalSpace (X i)]
[(i : ι) → TopologicalSpace (Y i)]
{f : (i : ι) → X i → Y i}
(h : ∀ (i : ι), IsProperMap (f i))


theorem isLittleO_pow_id {n : ℕ} (h : 1 < n) : (fun x : 𝕜 => x ^ n) =o[𝓝 0] fun x => x

{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{n : ℕ}
(h : 1 < n)


@[continuity]
theorem Continuous.matrix_adjugate [Fintype n] [DecidableEq n] [CommRing R] [TopologicalRing R]
    {A : X → Matrix n n R} (hA : Continuous A) : Continuous fun x => (A x).adjugate

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Fintype n]
[DecidableEq n]
[CommRing R]
[TopologicalRing R]
{A : X → Matrix n n R}
(hA : Continuous A)


@[simp]
theorem bot_toAddSubmonoid : (⊥ : Submodule R M).toAddSubmonoid = ⊥

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]


/-- Reinterpret `G ≃* H` as `Additive G ≃+ Additive H`. -/
@[simps]
def MulEquiv.toAdditive [MulOneClass G] [MulOneClass H] :
    G ≃* H ≃ (Additive G ≃+ Additive H)

{G : Type u_1}
{H : Type u_2}
[MulOneClass G]
[MulOneClass H]
(f : Additive G ≃+ Additive H)
(a : G)

(MulEquiv.toAdditive.symm f) a = (MonoidHom.toAdditive.symm f.toAddMonoidHom) a


/-- Bijective affine maps are affine isomorphisms. -/
@[simps! linear apply]
noncomputable def ofBijective {φ : P₁ →ᵃ[k] P₂} (hφ : Function.Bijective φ) : P₁ ≃ᵃ[k] P₂

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{φ : P₁ →ᵃ[k] P₂}
(hφ : Function.Bijective ⇑φ)

(AffineEquiv.ofBijective hφ).linear = LinearEquiv.ofBijective φ.linear ⋯


theorem tendsto_Lp_iff_tendsto_ℒp' {ι} {fi : Filter ι} [Fact (1 ≤ p)] (f : ι → Lp E p μ)
    (f_lim : Lp E p μ) :
    fi.Tendsto f (𝓝 f_lim) ↔ fi.Tendsto (fun n => eLpNorm (⇑(f n) - ⇑f_lim) p μ) (𝓝 0)

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

Filter.Tendsto f fi (𝓝 f_lim) ↔ Filter.Tendsto (fun n => MeasureTheory.eLpNorm (↑↑(f n) - ↑↑f_lim) p μ) fi (𝓝 0)


theorem Additive.isAddSubgroup {s : Set G} (hs : IsSubgroup s) : @IsAddSubgroup (Additive G) _ s

{G : Type u_1}
[Group G]
{s : Set G}
(hs : IsSubgroup s)


theorem inv_hom_id : inv P ≫ hom P = 𝟙 _

Bimod.RightUnitorBimod.inv P ≫ Bimod.RightUnitorBimod.hom P = 𝟙 P.X


/-- If a sequence of peak functions `φᵢ` converges uniformly to zero away from a point `x₀`, and
`g` is integrable and has a limit at `x₀`, then `φᵢ • g` is eventually integrable. -/
theorem integrableOn_peak_smul_of_integrableOn_of_tendsto
    (hs : MeasurableSet s) (h'st : t ∈ 𝓝[s] x₀)
    (hlφ : ∀ u : Set α, IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u))
    (hiφ : Tendsto (fun i ↦ ∫ x in t, φ i x ∂μ) l (𝓝 1))
    (h'iφ : ∀ᶠ i in l, AEStronglyMeasurable (φ i) (μ.restrict s))
    (hmg : IntegrableOn g s μ) (hcg : Tendsto g (𝓝[s] x₀) (𝓝 a)) :
    ∀ᶠ i in l, IntegrableOn (fun x => φ i x • g x) s μ

{φ : ι → α → ℝ}

(hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u))

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

(h'iφ : ∀ᶠ (i : ι) in l, MeasureTheory.AEStronglyMeasurable (φ i) (μ.restrict s))

(hmg : MeasureTheory.IntegrableOn g s μ)

(hcg : Filter.Tendsto g (𝓝[s] x₀) (𝓝 a))

∀ᶠ (i : ι) in l, MeasureTheory.IntegrableOn (fun x => φ i x • g x) s μ


@[to_additive (attr := simp)]
theorem map_comap_map {f : F} : ((S.map f).comap f).map f = S.map f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(S : Submonoid M)
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}

Submonoid.map f (Submonoid.comap f (Submonoid.map f S)) = Submonoid.map f S


/-- An exact pairing is a pair of objects `X Y : C` which admit
  a coevaluation and evaluation morphism which fulfill two triangle equalities. -/
class ExactPairing (X Y : C) where
  /-- Coevaluation of an exact pairing.

  Do not use directly. Use `ExactPairing.coevaluation` instead. -/
  coevaluation' : 𝟙_ C ⟶ X ⊗ Y
  /-- Evaluation of an exact pairing.

  Do not use directly. Use `ExactPairing.evaluation` instead. -/
  evaluation' : Y ⊗ X ⟶ 𝟙_ C
  coevaluation_evaluation' :
    Y ◁ coevaluation' ≫ (α_ _ _ _).inv ≫ evaluation' ▷ Y = (ρ_ Y).hom ≫ (λ_ Y).inv := by
    aesop_cat
  evaluation_coevaluation' :
    coevaluation' ▷ X ≫ (α_ _ _ _).hom ≫ X ◁ evaluation' = (λ_ X).hom ≫ (ρ_ X).inv := by
    aesop_cat

[self : CategoryTheory.ExactPairing X Y]

Y ◁ CategoryTheory.ExactPairing.coevaluation' ≫ (α_ Y X Y).inv ≫ CategoryTheory.ExactPairing.evaluation' ▷ Y =
  (ρ_ Y).hom ≫ (λ_ Y).inv


theorem mem_parallel {S : WSeq (Computation α)} {a} (H : ∀ s ∈ S, s ~> a) {c} (cs : c ∈ S)
    (ac : a ∈ c) : a ∈ parallel S

(H : ∀ (s : Computation α), s ∈ S → s.Promises a)


@[reassoc (attr := simp)]
theorem pentagon_inv_inv_hom_hom_inv (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    (α_ f (g ≫ h) i).inv ≫ (α_ f g h).inv ▷ i ≫ (α_ (f ≫ g) h i).hom =
    f ◁ (α_ g h i).hom ≫ (α_ f g (h ≫ i)).inv

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c d e : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)
(i : d ⟶ e)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).inv i)
      (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).hom) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).hom)
    (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).inv


@[reassoc (attr := simp)]
theorem inr_pushoutLeftPushoutInrIso_hom :
    pushout.inr _ _ ≫ (pushoutLeftPushoutInrIso f g g').hom = pushout.inr _ _

[CategoryTheory.Limits.HasPushout (CategoryTheory.Limits.pushout.inr f g) g']

[CategoryTheory.Limits.HasPushout f (g ≫ g')]

CategoryTheory.Limits.pushout.inr (CategoryTheory.Limits.pushout.inr f g) g' ≫
    (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').hom =
  CategoryTheory.Limits.pushout.inr f (g ≫ g')


@[simp, norm_cast]
theorem cast_div_ofNat_charZero {k : Type*} [DivisionRing k] [CharZero k] {m n : ℕ}
    (n_dvd : n ∣ m) : (((m : ℤ) / (n : ℤ) : ℤ) : k) = m / n

{k : Type u_3}
[DivisionRing k]
[CharZero k]
{m n : ℕ}
(n_dvd : n ∣ m)


theorem ext (a b : Array α)
    (h₁ : a.size = b.size)
    (h₂ : (i : Nat) → (hi₁ : i < a.size) → (hi₂ : i < b.size) → a[i] = b[i])
    : a = b

(h₂ : ∀ (i : Nat) (hi₁ : i < a.size) (hi₂ : i < b.size), getElem a i hi₁ = getElem b i hi₂)


@[simp]
theorem adjunction_counit_map_functor {X : TopCat} {U : Opens X} (V : Opens U) :
    U.openEmbedding.isOpenMap.adjunction.counit.app (U.openEmbedding.isOpenMap.functor.obj V) =
      eqToHom (by dsimp; rw [map_functor_eq V])

{X : TopCat}
{U : TopologicalSpace.Opens ↑X}
(V : TopologicalSpace.Opens ↥U)

⋯.adjunction.counit.app (⋯.functor.obj V) = CategoryTheory.eqToHom ⋯


theorem isHenstock_toSubordinate (π : Prepartition I) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π.toSubordinate r).IsHenstock

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(r : (ι → ℝ) → ↑(Set.Ioi 0))


/-- If the vector passed to `secondInter` is given by a subtraction involving the point in
`secondInter`, and the second point is not outside the sphere, the second point is weakly
between the first point and the result of `secondInter`. -/
theorem Sphere.wbtw_secondInter {s : Sphere P} {p p' : P} (hp : p ∈ s)
    (hp' : dist p' s.center ≤ s.radius) : Wbtw ℝ p p' (s.secondInter p (p' -ᵥ 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}
(hp : p ∈ s)
(hp' : dist p' s.center ≤ s.radius)


@[simp]
theorem inf_toSubalgebra (S T : IntermediateField F E) :
    (S ⊓ T).toSubalgebra = S.toSubalgebra ⊓ T.toSubalgebra

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S T : IntermediateField F E)


/-- If there is a forgetful functor into `Type` that preserves enough (co)limits, then `D.ι` will
be jointly surjective. -/
theorem ι_jointly_surjective (F : C ⥤ Type v) [PreservesColimit D.diagram.multispan F]
    [∀ i j k : D.J, PreservesLimit (cospan (D.f i j) (D.f i k)) F] (x : F.obj D.glued) :
    ∃ (i : _) (y : F.obj (D.U i)), F.map (D.ι i) y = x

[(i j k : D.J) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (D.f i j) (D.f i k)) F]


/-- Assumes right covariance. -/
theorem Right.one_le_mul_of_le_of_le [MulPosMono α] (ha : 1 ≤ a) (hb : 1 ≤ b) (b0 : 0 ≤ b) :
    1 ≤ a * b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
(ha : 1 ≤ a)
(hb : 1 ≤ b)
(b0 : 0 ≤ b)


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

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

(CategoryTheory.ShortComplex.HomotopyEquiv.refl S).inv = CategoryTheory.CategoryStruct.id S


/-- Given a monoid homomorphism `f : M →* N` and an element `x : M`, if `x` has a right inverse,
then `f x` has a right inverse too. For elements invertible on both sides see `IsUnit.map`. -/
@[to_additive
  "Given an AddMonoid homomorphism `f : M →+ N` and an element `x : M`, if `x` has
  a right inverse, then `f x` has a right inverse too."]
theorem map_exists_right_inv (f : F) {x : M} (hx : ∃ y, x * y = 1) : ∃ y, f x * y = 1

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[AddZeroClass M]
[AddZeroClass N]
[FunLike F M N]
[AddMonoidHomClass F M N]
(f : F)
{x : M}
(hx : ∃ y, x + y = 0)


theorem mk {x : PGame} (h₁ : ∀ i j, x.moveLeft i < x.moveRight j) (h₂ : ∀ i, Numeric (x.moveLeft i))
    (h₃ : ∀ j, Numeric (x.moveRight j)) : Numeric x

(h₁ : ∀ (i : x.LeftMoves) (j : x.RightMoves), x.moveLeft i < x.moveRight j)

(h₂ : ∀ (i : x.LeftMoves), (x.moveLeft i).Numeric)

(h₃ : ∀ (j : x.RightMoves), (x.moveRight j).Numeric)


protected lemma IsPath.isTrail {p : Walk G u v}(h : IsPath p) : IsTrail p

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}
(h : p.IsPath)


/-- Alternative constructor for `IndObjectPresentation` taking a cocone instead of its defining
    natural transformation. -/
@[simps]
def ofCocone {I : Type v} [SmallCategory I] [IsFiltered I] {F : I ⥤ C}
    (c : Cocone (F ⋙ yoneda)) (hc : IsColimit c) : IndObjectPresentation c.pt

(c : CategoryTheory.Limits.Cocone (F.comp CategoryTheory.yoneda))

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.IndObjectPresentation.ofCocone c hc).F = F


theorem of_isEmpty [h : IsEmpty X] (f : X → Y) : IsOpenMap f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[h : IsEmpty X]
(f : X → Y)


/-- Given a diagram `D` of limit cones over the `F.obj j`, and a cone over `uncurry.obj F`,
we can construct a cone over the diagram consisting of the cone points from `D`.
-/
@[simps]
def coneOfConeUncurry {D : DiagramOfCones F} (Q : ∀ j, IsLimit (D.obj j))
    (c : Cone (uncurry.obj F)) : Cone D.conePoints

{D : CategoryTheory.Limits.DiagramOfCones F}

(Q : (j : J) → CategoryTheory.Limits.IsLimit (D.obj j))

(c : CategoryTheory.Limits.Cone (CategoryTheory.uncurry.obj F))

(CategoryTheory.Limits.coneOfConeUncurry Q c).π.app j =
  (Q j).lift { pt := c.pt, π := { app := fun k => c.π.app (j, k), naturality := ⋯ } }


theorem IsLUB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
    {s : Set α} {x : α} (hx : IsLUB (f '' s) (f x)) : IsLUB s x

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : ∀ {x y : α}, f x ≤ f y ↔ x ≤ y)
{s : Set α}
{x : α}
(hx : IsLUB (f '' s) (f x))


@[simp, norm_cast] lemma coe_le_one [One α] : (a : WithZero α) ≤ 1 ↔ a ≤ 1

{α : Type u_1}
[Preorder α]
{a : α}
[One α]

↑a ≤ 1 ↔ a ≤ 1


@[to_additive]
theorem comap_surjective_of_injective : Function.Surjective (comap f)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}
(hf : Function.Injective ⇑f)


theorem isFractional_of_fg {I : Submodule R P} (hI : I.FG) : IsFractional S I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
{I : Submodule R P}
(hI : I.FG)


theorem yn_modEq_two : ∀ n, yn a1 n ≡ n [MOD 2]


@[simp, norm_cast]
theorem coe_pow (n : ℕ) : ((φ ^ n : R[X]) : PowerSeries R) = (φ : PowerSeries R) ^ n

{R : Type u_2}
[CommSemiring R]
(φ : Polynomial R)
(n : ℕ)


@[simp]
theorem ι_colimitLimitToLimitColimit_π_apply [Small.{v} J] [Small.{v} K] (F : J × K ⥤ Type v)
    (j : J) (k : K) (f) : limit.π (curry.obj F ⋙ colim) j
        (colimitLimitToLimitColimit F (colimit.ι (curry.obj (Prod.swap K J ⋙ F) ⋙ lim) k f)) =
      colimit.ι ((curry.obj F).obj j) k (limit.π ((curry.obj (Prod.swap K J ⋙ F)).obj k) j f)

(f : (CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ F) ⋙ CategoryTheory.Limits.lim).obj k)

CategoryTheory.Limits.limit.π (CategoryTheory.curry.obj F ⋙ CategoryTheory.Limits.colim) j
    (CategoryTheory.Limits.colimitLimitToLimitColimit F
      (CategoryTheory.Limits.colimit.ι
        (CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ F) ⋙ CategoryTheory.Limits.lim) k f)) =
  CategoryTheory.Limits.colimit.ι ((CategoryTheory.curry.obj F).obj j) k
    (CategoryTheory.Limits.limit.π ((CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ F)).obj k) j f)


@[norm_cast]
theorem lt_to_int {m n : ZNum} : (m : ℤ) < n ↔ m < n


@[symm]
protected theorem symm : a ≡ b [ZMOD n] → b ≡ a [ZMOD n]


@[simp]
theorem Function.Embedding.toEquivRange_symm_apply_self (a : α) :
    f.toEquivRange.symm ⟨f a, Set.mem_range_self a⟩ = a

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)
(a : α)


theorem exists_of_mem_bind {s : WSeq α} {f : α → WSeq β} {b} (h : b ∈ bind s f) :
    ∃ a ∈ s, b ∈ f a

{α : Type u}
{β : Type v}
{s : Stream'.WSeq α}
{f : α → Stream'.WSeq β}
{b : β}
(h : b ∈ s.bind f)


theorem transferTransversal_apply' (q : orbitRel.Quotient (zpowers g) (G ⧸ H))
    (k : ZMod (minimalPeriod (g • ·) q.out')) :
    ↑(toEquiv (transferTransversal H g).2 (g ^ (cast k : ℤ) • q.out')) =
      g ^ (cast k : ℤ) * q.out'.out'

(q : MulAction.orbitRel.Quotient (↥(Subgroup.zpowers g)) (G ⧸ H))

(k : ZMod (Function.minimalPeriod (fun x => g • x) (Quotient.out' q)))

↑((Subgroup.MemLeftTransversals.toEquiv ⋯) (g ^ k.cast • Quotient.out' q)) =
  g ^ k.cast * Quotient.out' (Quotient.out' q)


lemma mem_ball_iff {x y : X} {r : ℝ} : y ∈ ball x r ↔ x ∈ ball y r

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
{x y : X}
{r : ℝ}

y ∈ Metric.ball x r ↔ x ∈ Metric.ball y r


@[simp]
theorem map_apply_ι (f : Q₁ →qᵢ Q₂) (m : M₁) : map f (ι Q₁ m) = ι Q₂ (f m)

{R : Type u_1}
[CommRing R]
{M₁ : Type u_4}
{M₂ : Type u_5}
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
{Q₁ : QuadraticForm R M₁}
{Q₂ : QuadraticForm R M₂}
(f : Q₁ →qᵢ Q₂)
(m : M₁)

(CliffordAlgebra.map f) ((CliffordAlgebra.ι Q₁) m) = (CliffordAlgebra.ι Q₂) (f m)


@[to_additive]
theorem Quotient.coe_smul_out' [QuotientAction β H] (b : β) (q : α ⧸ H) : ↑(b • q.out') = b • q

{α : Type u}
{β : Type v}
[Group α]
[Monoid β]
[MulAction β α]
(H : Subgroup α)
[MulAction.QuotientAction β H]
(b : β)
(q : α ⧸ H)


theorem IsEquivalent.summable_iff_nat {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {f : ℕ → E} {g : ℕ → E} (h : f ~[atTop] g) : Summable f ↔ Summable g

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{f g : ℕ → E}
(h : f ~[Filter.atTop] g)


lemma StrictMono.add_le_nat {f : ℕ → ℕ} (hf : StrictMono f) (m n : ℕ) : m + f n ≤ f (m + n)


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

Complex.equivRealProdAddHom z = (z.re, z.im)


theorem hom_desc (h : IsUniversal f) {c : C} (η : f.right ⟶ c) :
    η = h.desc (mk <| f.hom ≫ T.map η)

{f : CategoryTheory.StructuredArrow S T}

η = h.desc (CategoryTheory.StructuredArrow.mk (CategoryTheory.CategoryStruct.comp f.hom (T.map η)))


@[simp]
theorem rTensorOne'_tmul (y : R) (m : M) :
    M.rTensorOne' (m ⊗ₜ[R] algebraMap R _ y) = y • m

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
{M : Submodule R S}
(y : R)
(m : ↥M)

M.rTensorOne' (m ⊗ₜ[R] (algebraMap R ↥⊥) y) = y • m


@[simp] theorem mul_fmod_left (a b : Int) : (a * b).fmod b = 0


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

{X Y Z : CategoryTheory.FreeMonoidalCategory C}

⟦CategoryTheory.FreeMonoidalCategory.Hom.α_inv X Y Z⟧ = (CategoryTheory.MonoidalCategory.associator X Y Z).inv


theorem Eventually.and_frequently {p q : α → Prop} {f : Filter α} (hp : ∀ᶠ x in f, p x)
    (hq : ∃ᶠ x in f, q x) : ∃ᶠ x in f, p x ∧ q x

{α : Type u}
{p q : α → Prop}
{f : Filter α}
(hp : ∀ᶠ (x : α) in f, p x)
(hq : ∃ᶠ (x : α) in f, q x)


theorem edgeDensity_nonneg (s t : Finset α) : 0 ≤ G.edgeDensity s t

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
(s t : Finset α)


@[simp]
theorem leftUnitor_hom_hom (X : Mon_ C) : (λ_ X).hom.hom = (λ_ X.X).hom

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


@[simp]
theorem lowerCentralSeries_succ :
    lowerCentralSeries R L M (k + 1) = ⁅(⊤ : LieIdeal R L), lowerCentralSeries R L M k⁆

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(k : ℕ)

LieModule.lowerCentralSeries R L M (k + 1) = ⁅⊤, LieModule.lowerCentralSeries R L M k⁆


lemma lt_mul_of_div_lt (h : a / c < b) (hc : 0 < c) : a < b * c


@[simp]
theorem withTop_id : (SupHom.id α).withTop = SupHom.id _

(SupHom.id α).withTop = SupHom.id (WithTop α)


theorem type_uLift (r : α → α → Prop) [IsWellOrder α r] :
    type (ULift.down.{v,u} ⁻¹'o r) = lift.{v} (type r)

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

Ordinal.type (ULift.down ⁻¹'o r) = Ordinal.lift.{v, u} (Ordinal.type r)


theorem t2_iff_isClosed_diagonal : T2Space X ↔ IsClosed (diagonal X)


theorem extend_image_nhd_mem_nhds_of_boundaryless [I.Boundaryless] {x} (hx : x ∈ f.source)
    {s : Set M} (h : s ∈ 𝓝 x) : (f.extend I) '' s ∈ 𝓝 ((f.extend I) x)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
[I.Boundaryless]
{x : M}
(hx : x ∈ f.source)
{s : Set M}
(h : s ∈ 𝓝 x)

↑(f.extend I) '' s ∈ 𝓝 (↑(f.extend I) x)


theorem card_le_card_of_forall_subsingleton' (ht : ∀ b ∈ t, ∃ a, a ∈ s ∧ r a b)
    (hs : ∀ a ∈ s, ({ b ∈ t | r a b } : Set β).Subsingleton) : t.card ≤ s.card

(hs : ∀ a ∈ s, {b | b ∈ t ∧ r a b}.Subsingleton)


@[deprecated (since := "2024-06-05")]
theorem tailing_sup_tunnel_succ_le_tunnel (f : M × N →ₗ[R] M) (i : Injective f) (n : ℕ) :
    tailing f i n ⊔ (OrderDual.ofDual (α := Submodule R M) $ tunnel f i (n + 1)) ≤
      (OrderDual.ofDual (α := Submodule R M) <| tunnel f i n)

{R : Type u}
{M : Type v}
[Ring R]
{N : Type u_3}
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(f : M × N →ₗ[R] M)
(i : Function.Injective ⇑f)
(n : ℕ)

f.tailing i n ⊔ OrderDual.ofDual ((f.tunnel i) (n + 1)) ≤ OrderDual.ofDual ((f.tunnel i) n)


/-- The functor `F` factorises through its essential image, where the first functor is essentially
surjective and the second is fully faithful.
-/
@[simps!]
def toEssImageCompEssentialImageInclusion (F : C ⥤ D) : F.toEssImage ⋙ F.essImageInclusion ≅ F

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

F.toEssImageCompEssentialImageInclusion.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)


@[simp]
theorem map_dite (F : C ⥤ D) {X Y : C} {P : Prop} [Decidable P]
    (f : P → (X ⟶ Y)) (g : ¬P → (X ⟶ Y)) :
    F.map (if h : P then f h else g h) = if h : P then F.map (f h) else F.map (g h)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X Y : C}
{P : Prop}
[Decidable P]
(f : P → (X ⟶ Y))
(g : ¬P → (X ⟶ Y))


theorem ContDiffWithinAt.sqrt (hf : ContDiffWithinAt ℝ n f s x) (hx : f x ≠ 0) :
    ContDiffWithinAt ℝ n (fun y => √(f y)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{n : ℕ∞}
{s : Set E}
{x : E}
(hf : ContDiffWithinAt ℝ n f s x)
(hx : f x ≠ 0)


@[simp]
theorem comp_continuousOn_iff {f : α → P} {s : Set α} : ContinuousOn (e ∘ f) s ↔ ContinuousOn f s

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

ContinuousOn (⇑e ∘ f) s ↔ ContinuousOn f s


theorem sign_eq_neg_one_of_neg {a : Int} (h : a < 0) : sign a = -1


theorem mul_add_lt_is_or {b : Nat} (b_lt : b < 2^i) (a : Nat) : 2^i * a + b = 2^i * a ||| b

{i b : Nat}
(b_lt : b < 2 ^ i)
(a : Nat)


@[simp, mono]
theorem measure_le_measure_union_left : μ s ≤ μ (s ∪ t)

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


theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) :
    dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[StrictConvexSpace ℝ V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p : P)
{p₁ p₂ p₃ : P}
(h : Wbtw ℝ p₁ p₂ p₃)


@[simp]
theorem mul_mk_eq_max {α β : Type u} [Infinite α] [Infinite β] : #α * #β = max #α #β


@[to_additive]
theorem prod_hom_rel [CommMonoid γ] {r : β → γ → Prop} {f : α → β} {g : α → γ} {s : Finset α}
    (h₁ : r 1 1) (h₂ : ∀ a b c, r b c → r (f a * b) (g a * c)) :
    r (∏ x ∈ s, f x) (∏ x ∈ s, g x)

(h₂ : ∀ (a : α) (b : β) (c : γ), r b c → r (f a + b) (g a + c))


@[simp]
theorem LinearMap.curry_uncurryLeft (f : M 0 →ₗ[R] MultilinearMap R (fun i :
    Fin n => M i.succ) M₂) : f.uncurryLeft.curryLeft = f

[(i : Fin n.succ) → AddCommMonoid (M i)]

(f : M 0 →ₗ[R] MultilinearMap R (fun i => M i.succ) M₂)


@[reassoc, simp]
lemma map₂_inv_hom {f g : a ⟶ b} (η : f ≅ g) :
    F.map₂ η.inv ≫ F.map₂ η.hom = 𝟙 (F.map g)

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.PrelaxFunctor B C)
{a b : B}
{f g : a ⟶ b}
(η : f ≅ g)

CategoryTheory.CategoryStruct.comp (F.map₂ η.inv) (F.map₂ η.hom) = CategoryTheory.CategoryStruct.id (F.map g)


/-- A version of `edist_le_Ico_sum_edist` with each intermediate distance replaced
with an upper estimate. -/
theorem edist_le_Ico_sum_of_edist_le {f : ℕ → α} {m n} (hmn : m ≤ n) {d : ℕ → ℝ≥0∞}
    (hd : ∀ {k}, m ≤ k → k < n → edist (f k) (f (k + 1)) ≤ d k) :
    edist (f m) (f n) ≤ ∑ i ∈ Finset.Ico m n, d i

{d : ℕ → ℝ≥0∞}

(hd : ∀ {k : ℕ}, m ≤ k → k < n → edist (f k) (f (k + 1)) ≤ d k)


theorem real_smul_eq_coe_mul (r : ℝ) (z : K) : r • z = (r : K) * z

{K : Type u_1}
[RCLike K]
(r : ℝ)
(z : K)


theorem inter (d : Dioph S) (d' : Dioph S') : Dioph (S ∩ S')

{α : Type u}
{S S' : Set (α → ℕ)}
(d : Dioph S)
(d' : Dioph S')


/-- The adjunction between the free and forgetful constructions for Eilenberg-Moore algebras for
  a monad. cf Lemma 5.2.8 of [Riehl][riehl2017]. -/
@[simps! unit counit]
def adj : T.free ⊣ T.forget

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

T.adj.unit = { app := fun X => T.η.app X, naturality := ⋯ }


/-- If `b` semiconjugates `x` to `y` and `a` semiconjugates `y` to `z`, then `a * b`
semiconjugates `x` to `z`. -/
@[to_additive "If `b` semiconjugates `x` to `y` and `a` semiconjugates `y` to `z`, then `a + b`
semiconjugates `x` to `z`."]
theorem mul_left (ha : SemiconjBy a y z) (hb : SemiconjBy b x y) : SemiconjBy (a * b) x z

{S : Type u_1}
[AddSemigroup S]
{a b x y z : S}
(ha : AddSemiconjBy a y z)
(hb : AddSemiconjBy b x y)


/-- The functor from a category to the canonical quotient of its path category. -/
@[simps]
def toQuotientPaths : C ⥤ Quotient (pathsHomRel C)

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

((CategoryTheory.toQuotientPaths C).obj X).as = X


@[to_additive (attr := simp)]
theorem prod_single_index {a : α} {b : M} {h : α → M → N} (h_zero : h a 0 = 1) :
    (single a b).prod h = h a b

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
{a : α}
{b : M}
{h : α → M → N}
(h_zero : h a 0 = 0)


/-- This definition provides a convenient way to show that a multifork is a limit. -/
@[simps]
def IsLimit.mk (lift : ∀ E : Multifork I, E.pt ⟶ K.pt)
    (fac : ∀ (E : Multifork I) (i : I.L), lift E ≫ K.ι i = E.ι i)
    (uniq : ∀ (E : Multifork I) (m : E.pt ⟶ K.pt), (∀ i : I.L, m ≫ K.ι i = E.ι i) → m = lift E) :
    IsLimit K

{I : CategoryTheory.Limits.MulticospanIndex C}

(lift : (E : CategoryTheory.Limits.Multifork I) → E.pt ⟶ K.pt)

(fac : ∀ (E : CategoryTheory.Limits.Multifork I) (i : I.L), CategoryTheory.CategoryStruct.comp (lift E) (K.ι i) = E.ι i)

(uniq :
  ∀ (E : CategoryTheory.Limits.Multifork I) (m : E.pt ⟶ K.pt),
    (∀ (i : I.L), CategoryTheory.CategoryStruct.comp m (K.ι i) = E.ι i) → m = lift E)

(CategoryTheory.Limits.Multifork.IsLimit.mk K lift fac uniq).lift E = lift E


theorem Rel.add {s t u v} (hst : Rel r s t) (huv : Rel r u v) : Rel r (s + u) (t + v)

{α : Type u_1}
{β : Type v}
{r : α → β → Prop}
{s : Multiset α}
{t : Multiset β}
{u : Multiset α}
{v : Multiset β}
(hst : Multiset.Rel r s t)
(huv : Multiset.Rel r u v)


theorem isExtreme_iInter {ι : Sort*} [Nonempty ι] {F : ι → Set E}
    (hAF : ∀ i : ι, IsExtreme 𝕜 A (F i)) : IsExtreme 𝕜 A (⋂ i : ι, F i)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A : Set E}
{ι : Sort u_6}
[Nonempty ι]
{F : ι → Set E}
(hAF : ∀ (i : ι), IsExtreme 𝕜 A (F i))


theorem fderivWithin_const_apply (c : F) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (fun _ => c) s x = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
(c : F)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem Finset.card_compl_lt_iff_nonempty [Fintype α] [DecidableEq α] (s : Finset α) :
    sᶜ.card < Fintype.card α ↔ s.Nonempty

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


/-- `OrderDual` as a functor. -/
@[simps]
def dual : Lat ⥤ Lat

∀ {X Y : Lat} (a : LatticeHom ↑X ↑Y), Lat.dual.map a = LatticeHom.dual a


theorem gfp_le_map {a : α} (ha : gfp f ≤ a) : gfp f ≤ f a

{α : Type u}
[CompleteLattice α]
(f : α →o α)
{a : α}
(ha : OrderHom.gfp f ≤ a)


/-- Criterion for a subset `S ⊆ X` to be closed and discrete in terms of the punctured
neighbourhood filter at an arbitrary point of `X`. (Compare `discreteTopology_subtype_iff`.) -/
theorem isClosed_and_discrete_iff {S : Set X} :
    IsClosed S ∧ DiscreteTopology S ↔ ∀ x, Disjoint (𝓝[≠] x) (𝓟 S)

{X : Type u_1}
[TopologicalSpace X]
{S : Set X}

IsClosed S ∧ DiscreteTopology ↑S ↔ ∀ (x : X), Disjoint (𝓝[≠] x) (𝓟 S)


@[simp]
theorem range_fromSpec :
    Set.range hU.fromSpec.1.base = (U : Set X)

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)


@[reassoc (attr := simp)]
lemma liftOfIsRightKanExtension_fac_app (G : D ⥤ H) (β : L ⋙ G ⟶ F) (X : C) :
    (F'.liftOfIsRightKanExtension α G β).app (L.obj X) ≫ α.app X = β.app X

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_7, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : L.comp F' ⟶ F)
[F'.IsRightKanExtension α]
(G : CategoryTheory.Functor D H)
(β : L.comp G ⟶ F)
(X : C)

CategoryTheory.CategoryStruct.comp ((F'.liftOfIsRightKanExtension α G β).app (L.obj X)) (α.app X) = β.app X


theorem prod_image_image_eq {m₁ : α → γ} {m₂ : β → δ} :
    (m₁ '' s) ×ˢ (m₂ '' t) = (fun p : α × β => (m₁ p.1, m₂ p.2)) '' s ×ˢ t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{s : Set α}
{t : Set β}
{m₁ : α → γ}
{m₂ : β → δ}

(m₁ '' s) ×ˢ (m₂ '' t) = (fun p => (m₁ p.1, m₂ p.2)) '' s ×ˢ t


theorem rpow_add_nat {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℕ) : x ^ (y + n) = x ^ y * x ^ n


theorem mono_of_isIso_fst (h : IsKernelPair f a b) [IsIso a] : Mono f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{R X Y : C}
{f : X ⟶ Y}
{a b : R ⟶ X}
(h : CategoryTheory.IsKernelPair f a b)
[CategoryTheory.IsIso a]


@[simp]
theorem coe_toContinuousLinearEquiv (e : E ≃ₗ[𝕜] F) : (e.toContinuousLinearEquiv : E →ₗ[𝕜] F) = e

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
[T2Space E]
[T2Space F]
[FiniteDimensional 𝕜 E]
(e : E ≃ₗ[𝕜] F)


theorem mul_le_of_le_one_right [PosMulMono α] (ha : 0 ≤ a) (h : b ≤ 1) : a * b ≤ a

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(ha : 0 ≤ a)
(h : b ≤ 1)


@[simp]
theorem smeval_ascPochhammer_self_neg : ∀ n : ℕ,
    smeval (ascPochhammer ℕ n) (-n : ℤ) = (-1)^n * n.factorial

(ascPochhammer ℕ n).smeval (-↑n) = (-1) ^ n * ↑n.factorial


@[trans]
theorem _root_.Filter.EventuallyEq.trans_isLittleO {f₁ f₂ : α → E} {g : α → F} (hf : f₁ =ᶠ[l] f₂)
    (h : f₂ =o[l] g) : f₁ =o[l] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{l : Filter α}
{f₁ f₂ : α → E}
{g : α → F}
(hf : f₁ =ᶠ[l] f₂)
(h : f₂ =o[l] g)


/-- The type of bilinear maps which are accepted by `CliffordAlgebra.even.lift`. -/
@[ext]
structure EvenHom : Type max uA uM where
  bilin : M →ₗ[R] M →ₗ[R] A
  contract (m : M) : bilin m m = algebraMap R A (Q m)
  contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃

{R : Type uR}
{M : Type uM}
[CommRing R]
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{A : Type uA}
[Ring A]
[Algebra R A]
(self : CliffordAlgebra.EvenHom Q A)
(m : M)

(self.bilin m) m = (algebraMap R A) (Q m)


/-- Given a vector `v` of length `n`, make a vector of length `n + 1` whose product is `1`,
by appending the inverse of the product of `v`. -/
@[simps]
def vectorEquiv : Vector G n ≃ vectorsProdEqOne G (n + 1)

(G : Type u_2)
[Group G]
(n : ℕ)
(v : Mathlib.Vector G n)

↑((Equiv.Perm.VectorsProdEqOne.vectorEquiv G n) v) = v.toList.prod⁻¹ ::ᵥ v


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

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


/-- The functor which sends `S : SnakeInput C` to its third line `S.L₃`. -/
@[simps]
def functorL₃ : SnakeInput C ⥤ ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.ShortComplex.SnakeInput.functorL₃.obj S = S.L₃


@[simp] lemma zero_ne_top : 0 ≠ (⊤ : ℕ∞)


theorem lower_ne_upper (i) : I.lower i ≠ I.upper i

{ι : Type u_1}
(I : BoxIntegral.Box ι)
(i : ι)


lemma zpow_nonneg [PosMulMono α] (ha : 0 ≤ a) : ∀ n : ℤ, 0 ≤ a ^ n

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}
[PosMulMono α]
(ha : 0 ≤ a)
(n : ℤ)


theorem _root_.IsCoatom.isProper (hI : IsCoatom I) : IsProper I

{P : Type u_1}
[LE P]
[IsDirected P fun x x_1 => x ≤ x_1]
[Nonempty P]
{I : Order.Ideal P}
(hI : IsCoatom I)


/-- A version of `Trivialization.coordChangeL_apply` that fully unfolds `coordChange`. The
right-hand side is ugly, but has good definitional properties for specifically defined
trivializations. -/
theorem coordChangeL_apply' (e e' : Trivialization F (π F E)) [e.IsLinear R] [e'.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet ∩ e'.baseSet) (y : F) :
    coordChangeL R e e' b y = (e' (e.toPartialHomeomorph.symm (b, y))).2

[TopologicalSpace (Bundle.TotalSpace F E)]

(e e' : Trivialization F Bundle.TotalSpace.proj)

(Trivialization.coordChangeL R e e' b) y = (↑e' (↑e.symm (b, y))).2


lemma isRightDerivedFunctor_iff_isIso_rightDerivedDesc (G : D ⥤ H) (β : F ⟶ L ⋙ G) :
    G.IsRightDerivedFunctor β W ↔ IsIso (RF.rightDerivedDesc α W G β)

{C : Type u_5}
{D : Type u_3}
{H : Type u_4}
[CategoryTheory.Category.{u_6, u_5} C]
[CategoryTheory.Category.{u_1, u_3} D]
[CategoryTheory.Category.{u_2, u_4} H]
(RF : CategoryTheory.Functor D H)
{F : CategoryTheory.Functor C H}
{L : CategoryTheory.Functor C D}
(α : F ⟶ L.comp RF)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[RF.IsRightDerivedFunctor α W]
(G : CategoryTheory.Functor D H)
(β : F ⟶ L.comp G)

G.IsRightDerivedFunctor β W ↔ CategoryTheory.IsIso (RF.rightDerivedDesc α W G β)


/-- A set is equivalent to its image under an equivalence.
-/
@[simps]
def image {α β : Type*} (e : α ≃ β) (s : Set α) :
    s ≃ e '' s

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
(s : Set α)
(x : ↑s)


/-- The product of `X` with an initial object in a category with strict initial objects is itself
initial.
This is the generalisation of the fact that `X × Empty ≃ Empty` for types (or `n * 0 = 0`).
-/
@[simps! hom]
noncomputable def mulInitial (X : C) [HasBinaryProduct X (⊥_ C)] : X ⨯ ⊥_ C ≅ ⊥_ C

[CategoryTheory.Limits.HasBinaryProduct X (⊥_ C)]

(CategoryTheory.Limits.mulInitial X).hom = CategoryTheory.Limits.prod.snd


theorem LowerSemicontinuous.lowerSemicontinuousAt (h : LowerSemicontinuous f) (x : α) :
    LowerSemicontinuousAt f x

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


@[simp] lemma divInt_nonneg_iff_of_pos_right {a b : ℤ} (hb : 0 < b) : 0 ≤ a /. b ↔ 0 ≤ a


@[to_additive]
lemma le_mulIndicator (hfg : ∀ a ∈ s, f a ≤ g a) (hf : ∀ a ∉ s, f a ≤ 1) :
    f ≤ mulIndicator s g

{α : Type u_2}
{M : Type u_4}
[LE M]
[One M]
{s : Set α}
{f g : α → M}
(hfg : ∀ a ∈ s, f a ≤ g a)
(hf : ∀ a ∉ s, f a ≤ 1)


/-- The axis aligned parallelepiped over `ι → ℝ` is a cuboid. -/
theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
    (parallelepiped fun i => Pi.single i (a i)) = Set.uIcc 0 a

{ι : Type u_1}
[Fintype ι]
[DecidableEq ι]
(a : ι → ℝ)


@[simp] theorem singleton_def (v : α) : singleton v = #[v]


lemma monotone_or_antitone_iff_uIcc :
    Monotone f ∨ Antitone f ↔ ∀ a b c, c ∈ [[a, b]] → f c ∈ [[f a, f b]]

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

Monotone f ∨ Antitone f ↔ ∀ (a b c : α), c ∈ Set.uIcc a b → f c ∈ Set.uIcc (f a) (f b)


lemma toNNReal_add_add_neg_add_neg_eq (f g : C(X, ℝ)) :
    (f + g).toNNReal + (-f).toNNReal + (-g).toNNReal =
      (-(f + g)).toNNReal + f.toNNReal + g.toNNReal

{X : Type u_1}
[TopologicalSpace X]
(f g : C(X, ℝ))


/-- If `α` has no zero divisors, then for elements `a, b : α`, `a * b` equals zero iff so is
`b * a`. -/
theorem mul_eq_zero_comm : a * b = 0 ↔ b * a = 0

{M₀ : Type u_1}
[MulZeroClass M₀]
[NoZeroDivisors M₀]
{a b : M₀}


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


theorem floor_le_ceil (a : α) : ⌊a⌋₊ ≤ ⌈a⌉₊

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


@[to_additive]
theorem tendsto_div_comap_self (x₀ : α) :
    Tendsto (fun t : β × β => t.2 / t.1) ((comap fun p : β × β => (e p.1, e p.2)) <| 𝓝 (x₀, x₀))
      (𝓝 1)

{α : Type u_1}
{β : Type u_2}
{hom : Type u_3}
[TopologicalSpace α]
[Group α]
[TopologicalGroup α]
[TopologicalSpace β]
[Group β]
[FunLike hom β α]
[MonoidHomClass hom β α]
{e : hom}
(de : DenseInducing ⇑e)
(x₀ : α)

Filter.Tendsto (fun t => t.2 / t.1) (Filter.comap (fun p => (e p.1, e p.2)) (𝓝 (x₀, x₀))) (𝓝 1)


/-- The explicit pullback in the category of types, bundled up as a `LimitCone`
for given `f` and `g`.
-/
@[simps]
def pullbackLimitCone (f : X ⟶ Z) (g : Y ⟶ Z) : Limits.LimitCone (cospan f g)

{X Y Z : Type u}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.Types.pullbackLimitCone f g).isLimit =
  (CategoryTheory.Limits.Types.pullbackCone f g).isLimitAux (fun s x => ⟨(s.fst x, s.snd x), ⋯⟩) ⋯ ⋯ ⋯


@[to_additive]
theorem isComplement_univ_singleton {g : G} : IsComplement (univ : Set G) {g}


/-- The set `Set.pi Set.univ s` is equivalent to `Π a, s a`. -/
@[simps]
protected def univPi {α : Type*} {β : α → Type*} (s : ∀ a, Set (β a)) :
    pi univ s ≃ ∀ a, s a

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

↑((Equiv.Set.univPi s).symm f) a = ↑(f a)


@[to_additive]
theorem div_iUnion₂ (s : Set α) (t : ∀ i, κ i → Set α) :
    (s / ⋃ (i) (j), t i j) = ⋃ (i) (j), s / t i j

{α : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[Div α]
(s : Set α)
(t : (i : ι) → κ i → Set α)

s / ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s / t i j


@[simp]
theorem join_filter_ne_nil [DecidablePred fun l : List α => l ≠ []] {L : List (List α)} :
    join (L.filter fun l => l ≠ []) = L.join

{α : Type u_1}
[DecidablePred fun l => l ≠ []]
{L : List (List α)}

(List.filter (fun l => decide (l ≠ [])) L).join = L.join


theorem forall_apply_eq_imp_iff' {f : α → β} {p : β → Prop} :
    (∀ a b, f a = b → p b) ↔ ∀ a, p (f a)

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{p : β → Prop}

(∀ (a : α) (b : β), f a = b → p b) ↔ ∀ (a : α), p (f a)


protected theorem const' (b : β) {K : ℝ≥0} : LipschitzWith K fun _ : α => b

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(b : β)
{K : ℝ≥0}


@[simp]
theorem fst_ssubset_fst_iff : c.fst ⊂ d.fst ↔ c < d

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
{c d : Concept α β r}


theorem row_ne_zero [Nontrivial R] (g : SpecialLinearGroup n R) (i : n) : ↑ₘg i ≠ 0

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
[Nontrivial R]
(g : Matrix.SpecialLinearGroup n R)
(i : n)


lemma ShiftMkCore.shiftFunctor_eq (h : ShiftMkCore C A) (a : A) :
    letI := hasShiftMk C A h
    shiftFunctor C a = h.F a

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
(h : CategoryTheory.ShiftMkCore C A)
(a : A)


@[simp]
theorem dyadicMap_apply (m : ℤ) (p : Submonoid.powers (2 : ℤ)) :
    dyadicMap (IsLocalization.mk' (Localization (Submonoid.powers 2)) m p) =
      m * powHalf (Submonoid.log p)

Surreal.dyadicMap (IsLocalization.mk' (Localization (Submonoid.powers 2)) m p) = ↑m * Surreal.powHalf (Submonoid.log p)


theorem add_eq_one_iff : I + J = 1 ↔ ∃ i ∈ I, ∃ j ∈ J, i + j = 1

{R : Type u}
[CommSemiring R]
{I J : Ideal R}


@[simp]
theorem ofInjective_apply [RingHomInvPair σ₁₂ σ₂₁] [RingHomInvPair σ₂₁ σ₁₂] {h : Injective f}
    (x : M) : ↑(ofInjective f h x) = f x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
(f : M →ₛₗ[σ₁₂] M₂)
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{h : Function.Injective ⇑f}
(x : M)

↑((LinearEquiv.ofInjective f h) x) = f x


@[to_additive]
theorem mul_mem_sup {S T : Submonoid M} {x y : M} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T

{M : Type u_1}
[AddZeroClass M]
{S T : AddSubmonoid M}
{x y : M}
(hx : x ∈ S)
(hy : y ∈ T)


@[simp] lemma reciprocalFactors_one : reciprocalFactors 1 = []


@[simp]
theorem star_mem_iff {U : R} : star U ∈ unitary R ↔ U ∈ unitary R

{R : Type u_1}
[Monoid R]
[StarMul R]
{U : R}


@[simp] lemma dens_disjUnion (s t : Finset α) (h) : dens (s.disjUnion t h) = dens s + dens t

{α : Type u_2}
[Fintype α]
(s t : Finset α)
(h : Disjoint s t)

(s.disjUnion t h).dens = s.dens + t.dens


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


/-- A quadratic map on a module.

For a more familiar constructor when `R` is a ring, see `QuadraticMap.ofPolar`. -/
structure QuadraticMap (R : Type u) (M : Type v) (N : Type w) [CommSemiring R] [AddCommMonoid M]
    [Module R M] [AddCommMonoid N] [Module R N] where
  toFun : M → N
  toFun_smul : ∀ (a : R) (x : M), toFun (a • x) = (a * a) • toFun x
  exists_companion' : ∃ B : BilinMap R M N, ∀ x y, toFun (x + y) = toFun x + toFun y + B x y

{R : Type u}
{M : Type v}
{N : Type w}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(self : QuadraticMap R M N)
(a : R)
(x : M)

self.toFun (a • x) = (a * a) • self.toFun x


/-- **John Machin's 1706 formula**, which he used to compute π to 100 decimal places. -/
theorem four_mul_arctan_inv_5_sub_arctan_inv_239 : 4 * arctan 5⁻¹ - arctan 239⁻¹ = π / 4

4 * Real.arctan 5⁻¹ - Real.arctan 239⁻¹ = Real.pi / 4


@[simp]
theorem toMeasure_ofMultiset_apply [MeasurableSpace α] (ht : MeasurableSet t) :
    (ofMultiset s hs).toMeasure t = (∑' x, (s.filter (· ∈ t)).count x : ℝ≥0∞) / (Multiset.card s)

{α : Type u_1}
{s : Multiset α}
(hs : s ≠ 0)
(t : Set α)
[MeasurableSpace α]
(ht : MeasurableSet t)

(PMF.ofMultiset s hs).toMeasure t =
  (∑' (x : α), ↑(Multiset.count x (Multiset.filter (fun x => x ∈ t) s))) / ↑(Multiset.card s)


@[to_additive]
theorem one_lt_of_lt_mul_left [ContravariantClass α α (swap (· * ·)) (· < ·)] {a b : α}
    (h : b < a * b) :
    1 < a

[ContravariantClass α α (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1]


theorem foldlIdxM_eq_foldlM_enum [LawfulMonad m] {β} (f : ℕ → β → α → m β) (b : β) (as : List α) :
    foldlIdxM f b as = List.foldlM (fun b p ↦ f p.fst b p.snd) b (enum as)

{α : Type u}
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{β : Type u}
(f : ℕ → β → α → m β)
(b : β)
(as : List α)

List.foldlIdxM f b as = List.foldlM (fun b p => f p.1 b p.2) b as.enum


@[simp]
lemma Complex.rank_rat_complex : Module.rank ℚ ℂ = continuum


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

∀ (a : ↥S.op), S.mopRingEquivOp.symm a = MulOpposite.op (S.addEquivOp.symm a)


/-- Two polynomials `p` and `q` such that `p(q(X))=X` and `q(p(X))=X`
  induces an automorphism of the polynomial algebra. -/
@[simps!]
def algEquivOfCompEqX (p q : R[X]) (hpq : p.comp q = X) (hqp : q.comp p = X) : R[X] ≃ₐ[R] R[X]

{R : Type u}
[CommSemiring R]
(p q : R[X])
(hpq : p.comp q = Polynomial.X)
(hqp : q.comp p = Polynomial.X)
(a : R[X])

(p.algEquivOfCompEqX q hpq hqp).symm a = (Polynomial.aeval q) a


theorem alephIdx.init {a b} : b < alephIdx a → ∃ c, alephIdx c = b

{a : Cardinal.{u_1}}
{b : Ordinal.{u_1}}


@[to_additive]
theorem lt_of_lt_mul_of_le_one_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α}
    (h : a < b * c) (hle : b ≤ 1) :
    a < c

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


theorem AddMonoidHom.le_map_tsub [Preorder β] [AddCommMonoid β] [Sub β] [OrderedSub β] (f : α →+ β)
    (hf : Monotone f) (a b : α) : f a - f b ≤ f (a - b)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[AddCommMonoid α]
[Sub α]
[OrderedSub α]
[Preorder β]
[AddCommMonoid β]
[Sub β]
[OrderedSub β]
(f : α →+ β)
(hf : Monotone ⇑f)
(a b : α)


@[simp]
theorem toCone_pt (B : Bicone F) : B.toCone.pt = B.pt


@[simp]
theorem coe_zero : ⇑(0 : VectorMeasure α M) = 0

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]


@[simp]
theorem center_eq_top (A : Type*) [CommSemiring A] [Algebra R A] : center R A = ⊤

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


/-- The functor `Γ₀ : ChainComplex C ℕ ⥤ SimplicialObject C`, on objects. -/
@[simps]
def obj (K : ChainComplex C ℕ) : SimplicialObject C

(AlgebraicTopology.DoldKan.Γ₀.obj K).obj Δ = AlgebraicTopology.DoldKan.Γ₀.Obj.obj₂ K Δ


theorem isBigO_cpow_rpow (hl : IsBoundedUnder (· ≤ ·) l fun x => |(g x).im|) :
    (fun x => f x ^ g x) =O[l] fun x => abs (f x) ^ (g x).re

(hl : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun x => |(g x).im|)

(fun x => f x ^ g x) =O[l] fun x => Complex.abs (f x) ^ (g x).re


@[simp]
theorem mk_uLift (α) : #(ULift.{v, u} α) = lift.{v} #α

Cardinal.mk (ULift.{v, u} α) = Cardinal.lift.{v, u} (Cardinal.mk α)


@[to_additive]
theorem smul_set_compl : a • sᶜ = (a • s)ᶜ

{α : Type u_2}
{β : Type u_3}
[Group α]
[MulAction α β]
{s : Set β}
{a : α}


@[simp] theorem basis_empty_iff (M : Matroid α) : M.Basis I ∅ ↔ I = ∅

{α : Type u_1}
{I : Set α}
(M : Matroid α)


theorem ext_iff {f g : P1 →ᵃ[k] P2} : f = g ↔ ∀ p, f p = g p

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
{f g : P1 →ᵃ[k] P2}


@[simp]
lemma mul_ev (γ₁ γ₂ : OneCochain G U) (i j : I) {T : C} (a : T ⟶ U i) (b : T ⟶ U j) :
    (γ₁ * γ₂).ev i j a b = γ₁.ev i j a b * γ₂.ev i j a b

(γ₁ γ₂ : CategoryTheory.PresheafOfGroups.OneCochain G U)