/-- A sequence of identically distributed Lᵖ functions is p-uniformly integrable. -/
theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type*} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
    (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) :
    UniformIntegrable f p μ

(hf : ∀ (i : ι), ProbabilityTheory.IdentDistrib (f i) (f j) μ μ)


@[reassoc] theorem associator_hom_snd_snd (X Y Z : C) :
    (α_ X Y Z).hom ≫ prod.snd ≫ prod.snd = prod.snd

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


@[simp]
theorem sSup_Prop_eq {s : Set Prop} : sSup s = ∃ p ∈ s, p


theorem nonempty_Ico_subtype (h : a < b) : Nonempty (Ico a b)

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


/-- If `f` is complex differentiable on an open disc with center `c` and radius `R > 0` and is
continuous on its closure, then `f' c` can be represented as an integral over the corresponding
circle.

TODO: add a version for `w ∈ Metric.ball c R`.

TODO: add a version for higher derivatives. -/
theorem deriv_eq_smul_circleIntegral [CompleteSpace F] {R : ℝ} {c : ℂ} {f : ℂ → F} (hR : 0 < R)
    (hf : DiffContOnCl ℂ f (ball c R)) :
    deriv f c = (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) • f z

(hf : DiffContOnCl ℂ f (Metric.ball c R))

deriv f c = (2 * ↑π * Complex.I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - c) ^ (-2) • f z


theorem leadingCoeff_eq_zero_iff_deg_eq_bot : leadingCoeff p = 0 ↔ degree p = ⊥


theorem le_max_right (a b : α) : b ≤ max a b


@[simp]
theorem norm_eq_zero_of_empty [IsEmpty α] : ‖f‖ = 0

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : BoundedContinuousFunction α β)
[IsEmpty α]


/-- The canonical isomorphism
`Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b`
when `a + b = n`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorAdd' (a b n : ℤ) (h : a + b = n) :
    Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b

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

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorAdd' C a b n h).hom.app X).hom₂ =
  (CategoryTheory.shiftFunctorAdd' C a b n h).hom.app X.obj₂


/-- Construct an isomorphism of chain complexes from isomorphism of the objects
which commute with the differentials. -/
@[simps]
def isoOfComponents (f : ∀ i, C₁.X i ≅ C₂.X i)
    (hf : ∀ i j, c.Rel i j → (f i).hom ≫ C₂.d i j = C₁.d i j ≫ (f j).hom := by aesop_cat) :
    C₁ ≅ C₂

(hf : ∀ (i j : ι), c.Rel i j → (f i).hom ≫ C₂.d i j = C₁.d i j ≫ (f j).hom := by aesop_cat)

(HomologicalComplex.Hom.isoOfComponents f hf).hom.f i = (f i).hom


@[simp] lemma neg_last (n : ℕ) : -Fin.last n = 1


/-- The diagram describing the universal property for quotients of monoids commutes. -/
@[to_additive (attr := simp) "The diagram describing the universal property for quotients of
`AddMonoid`s commutes."]
theorem lift_coe (H : c ≤ ker f) (x : M) : c.lift f H x = f x

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{c : Con M}
{f : M →* P}
(H : c ≤ Con.ker f)
(x : M)


theorem norm_compContinuousLinearMap_le (g : ContinuousMultilinearMap 𝕜 E₁ G)
    (f : ∀ i, E i →L[𝕜] E₁ i) : ‖g.compContinuousLinearMap f‖ ≤ ‖g‖ * ∏ i, ‖f i‖

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

[(i : ι) → SeminormedAddCommGroup (E₁ i)]

‖g.compContinuousLinearMap f‖ ≤ ‖g‖ * ∏ i : ι, ‖f i‖


@[simp]
theorem Definable.compl {s : Set (α → M)} (hf : A.Definable L s) : A.Definable L sᶜ

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s : Set (α → M)}
(hf : A.Definable L s)


@[to_additive]
theorem comap_le_comap_of_le_range {f : G →* N} {K L : Subgroup N} (hf : K ≤ f.range) :
    K.comap f ≤ L.comap f ↔ K ≤ L

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{K L : Subgroup N}
(hf : K ≤ f.range)

Subgroup.comap f K ≤ Subgroup.comap f L ↔ K ≤ L


/-- Check that if `P ∈ Ps`, then `P` is indeed a sheaf for the finest topology on `Ps`. -/
theorem sheaf_for_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (h : P ∈ Ps) :
    Presieve.IsSheaf (finestTopology Ps) P

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

(Ps : Set (CategoryTheory.Functor Cᵒᵖ (Type v)))

CategoryTheory.Presieve.IsSheaf (CategoryTheory.Sheaf.finestTopology Ps) P


@[simp]
theorem map_replicate (f : α → β) (k : ℕ) (a : α) : (replicate k a).map f = replicate k (f a)

{α : Type u_1}
{β : Type v}
(f : α → β)
(k : ℕ)
(a : α)

Multiset.map f (Multiset.replicate k a) = Multiset.replicate k (f a)


theorem leftInverse_symm (e : A₁ ≃ₐ[R] A₂) : Function.LeftInverse e.symm e

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem nontrivial_iff_nonempty : Nontrivial (Filter α) ↔ Nonempty α


@[to_additive (attr := simp)]
theorem comp_one [MulOneClass M] [MulOneClass N] [MulOneClass P] (f : N →* P) :
    f.comp (1 : M →* N) = 1

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass P]
(f : N →+ P)


lemma isChain_range : IsChain (· ≤ ·) (Set.range c)

{α : Type u}
[Preorder α]
(c : OmegaCompletePartialOrder.Chain α)

IsChain (fun x x_1 => x ≤ x_1) (Set.range ⇑c)


@[simp, fun_prop]
protected theorem ContinuousLinearMap.differentiable : Differentiable 𝕜 e

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(e : E →L[𝕜] F)


@[continuity]
theorem continuous_transAssocReparamAux : Continuous transAssocReparamAux


lemma ContinuousOn.finset_inf' (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (s.inf' hne f) t

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeInf L]
[ContinuousInf L]
{s : Finset ι}
{f : ι → X → L}
{t : Set X}
(hne : s.Nonempty)
(hs : ∀ i ∈ s, ContinuousOn (f i) t)


/--
`HasRingHomProperty P Q` is a type class asserting that `P` is local at the target and the source,
and for `f : Spec B ⟶ Spec A`, it is equivalent to the ring hom property `Q`.
To make the proofs easier, we state it instead as
1. `Q` is local (See `RingHom.PropertyIsLocal`)
2. `P f` if and only if `Q` holds for every `Γ(Y, U) ⟶ Γ(X, V)` for all affine `U`, `V`.
See `HasRingHomProperty.iff_appLE`.
-/
class HasRingHomProperty (P : MorphismProperty Scheme.{u})
    (Q : outParam (∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop)) : Prop where
  isLocal_ringHomProperty : RingHom.PropertyIsLocal Q
  eq_affineLocally' : P = affineLocally Q

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

{Q : outParam ({R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop)}

[self : AlgebraicGeometry.HasRingHomProperty P Q]

RingHom.PropertyIsLocal fun {R S} [CommRing R] [CommRing S] => Q


theorem sups_infs_subset_right : t ⊼ u ⊻ s ⊆ (t ⊻ s) ⊼ (u ⊻ s)

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


@[to_additive (attr := simp) abs_nonpos_iff] lemma mabs_le_one : |a|ₘ ≤ 1 ↔ a = 1

[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 l_comm_iff_u_comm {X : Type*} [PartialOrder X] {Y : Type*} [Preorder Y] {Z : Type*}
    [Preorder Z] {W : Type*} [PartialOrder W] {lYX : X → Y} {uXY : Y → X}
    (hXY : GaloisConnection lYX uXY) {lWZ : Z → W} {uZW : W → Z} (hZW : GaloisConnection lWZ uZW)
    {lWY : Y → W} {uYW : W → Y} (hWY : GaloisConnection lWY uYW) {lZX : X → Z} {uXZ : Z → X}
    (hXZ : GaloisConnection lZX uXZ) :
    (∀ w : W, uXZ (uZW w) = uXY (uYW w)) ↔ ∀ x : X, lWZ (lZX x) = lWY (lYX x)

{X : Type u_2}
[PartialOrder X]
{Y : Type u_3}
[Preorder Y]
{Z : Type u_4}
[Preorder Z]
{W : Type u_5}
[PartialOrder W]
{lYX : X → Y}
{uXY : Y → X}
(hXY : GaloisConnection lYX uXY)
{lWZ : Z → W}
{uZW : W → Z}
(hZW : GaloisConnection lWZ uZW)
{lWY : Y → W}
{uYW : W → Y}
(hWY : GaloisConnection lWY uYW)
{lZX : X → Z}
{uXZ : Z → X}
(hXZ : GaloisConnection lZX uXZ)

(∀ (w : W), uXZ (uZW w) = uXY (uYW w)) ↔ ∀ (x : X), lWZ (lZX x) = lWY (lYX x)


theorem Continuous.quotient_liftOn' {f : X → Y} (h : Continuous f)
    (hs : ∀ a b, @Setoid.r _ s a b → f a = f b) :
    Continuous (fun x => Quotient.liftOn' x f hs : Quotient s → Y)

(hs : ∀ (a b : X), Setoid.r a b → f a = f b)


theorem exists_seq_strictAnti_tendsto [DenselyOrdered α] [NoMaxOrder α] [FirstCountableTopology α]
    (x : α) : ∃ u : ℕ → α, StrictAnti u ∧ (∀ n, x < u n) ∧ Tendsto u atTop (𝓝 x)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMaxOrder α]
[FirstCountableTopology α]
(x : α)

∃ u, StrictAnti u ∧ (∀ (n : ℕ), x < u n) ∧ Filter.Tendsto u Filter.atTop (𝓝 x)


theorem card_interedges_le_mul (s : Finset α) (t : Finset β) :
    (interedges r s t).card ≤ s.card * t.card

{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
(s : Finset α)
(t : Finset β)

(Rel.interedges r s t).card ≤ s.card * t.card


theorem disjointed_le_id : disjointed ≤ (id : (ℕ → α) → ℕ → α)

{α : Type u_1}
[GeneralizedBooleanAlgebra α]


@[simp]
theorem midpoint_le_left : midpoint k a b ≤ a ↔ b ≤ a

{k : Type u_1}
{E : Type u_2}
[LinearOrderedField k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{a b : E}


theorem _root_.MeasureTheory.Integrable.condDistrib_ae_map
    (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
    ∀ᵐ b ∂μ.map X, Integrable (fun ω => f (b, ω)) (condDistrib Y X μ b)

(hf_int : MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

∀ᵐ (b : β) ∂MeasureTheory.Measure.map X μ,
  MeasureTheory.Integrable (fun ω => f (b, ω)) ((ProbabilityTheory.condDistrib Y X μ) b)


@[reassoc]
lemma pushout.map_comp {X Y Z X' Y' Z' X'' Y'' Z'' : C}
    {f : X ⟶ Y} {g : X ⟶ Z} {f' : X' ⟶ Y'} {g' : X' ⟶ Z'} {f'' : X'' ⟶ Y''} {g'' : X'' ⟶ Z''}
    (i₁ : X ⟶ X') (j₁ : X' ⟶ X'') (i₂ : Y ⟶ Y') (j₂ : Y' ⟶ Y'') (i₃ : Z ⟶ Z') (j₃ : Z' ⟶ Z'')
    [HasPushout f g] [HasPushout f' g'] [HasPushout f'' g'']
    (e₁ e₂ e₃ e₄) :
    pushout.map f g f' g' i₂ i₃ i₁ e₁ e₂ ≫ pushout.map f' g' f'' g'' j₂ j₃ j₁ e₃ e₄ =
      pushout.map f g f'' g'' (i₂ ≫ j₂) (i₃ ≫ j₃) (i₁ ≫ j₁)
        (by rw [reassoc_of% e₁, e₃, Category.assoc])
        (by rw [reassoc_of% e₂, e₄, Category.assoc])

CategoryTheory.Limits.pushout.map f g f' g' i₂ i₃ i₁ e₁ e₂ ≫
    CategoryTheory.Limits.pushout.map f' g' f'' g'' j₂ j₃ j₁ e₃ e₄ =
  CategoryTheory.Limits.pushout.map f g f'' g'' (i₂ ≫ j₂) (i₃ ≫ j₃) (i₁ ≫ j₁) ⋯ ⋯


lemma productTriangle.zero₃₁ [HasZeroMorphisms C]
    (h : ∀ j, (T j).mor₃ ≫ (T j).mor₁⟦(1 : ℤ)⟧' = 0) :
    (productTriangle T).mor₃ ≫ (productTriangle T).mor₁⟦1⟧' = 0

(T : J → CategoryTheory.Pretriangulated.Triangle C)

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₁]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₂]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₃]

[CategoryTheory.Limits.HasProduct fun j => (CategoryTheory.shiftFunctor C 1).obj (T j).obj₁]

(h : ∀ (j : J), (T j).mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map (T j).mor₁ = 0)

(CategoryTheory.Pretriangulated.productTriangle T).mor₃ ≫
    (CategoryTheory.shiftFunctor C 1).map (CategoryTheory.Pretriangulated.productTriangle T).mor₁ =
  0


theorem setOf_bijective : Bijective (setOf : (α → Prop) → Set α)


theorem perm_dlookup (a : α) {l₁ l₂ : List (Sigma β)} (nd₁ : l₁.NodupKeys) (nd₂ : l₂.NodupKeys)
    (p : l₁ ~ l₂) : dlookup a l₁ = dlookup a l₂

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
{l₁ l₂ : List (Sigma β)}
(nd₁ : l₁.NodupKeys)
(nd₂ : l₂.NodupKeys)
(p : l₁.Perm l₂)


@[to_additive]
theorem iCondIndepFun.condIndepFun_prod_range_succ {f : ℕ → Ω → β}
    (hf_Indep : iCondIndepFun m' hm' (fun _ => m) f μ) (hf_meas : ∀ i, Measurable (f i)) (n : ℕ) :
    CondIndepFun m' hm' (∏ j ∈ Finset.range n, f j) (f n) μ

{f : ℕ → Ω → β}

(hf_Indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (∑ j ∈ Finset.range n, f j) (f n) μ


@[simp]
lemma evalEval_polynomial_zero : W.polynomial.evalEval 0 0 = -W.a₆

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)

Polynomial.evalEval 0 0 W.polynomial = -W.a₆


/-- The representation of the clifford conjugate (i.e. the reverse of the involute) in the even
subalgebra is just the reverse of the representation. -/
theorem coe_toEven_reverse_involute (x : CliffordAlgebra Q) :
    ↑(toEven Q (reverse (involute x))) =
      reverse (Q := Q' Q) (toEven Q x : CliffordAlgebra (Q' Q))

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

↑((CliffordAlgebra.toEven Q) (CliffordAlgebra.reverse (CliffordAlgebra.involute x))) =
  CliffordAlgebra.reverse ↑((CliffordAlgebra.toEven Q) x)


theorem le_limsup_of_le {f : Filter β} {u : β → α} {a}
    (hf : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h : ∀ b, (∀ᶠ n in f, u n ≤ b) → a ≤ b) : a ≤ limsup u f

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

(h : ∀ (b : α), (∀ᶠ (n : β) in f, u n ≤ b) → a ≤ b)


protected theorem isLocalHomeomorph : IsLocalHomeomorph f

{E : Type u_1}
{X : Type u_2}
[TopologicalSpace E]
[TopologicalSpace X]
{f : E → X}
(hf : IsCoveringMap f)


lemma natDegree_minpolyDiv_lt [Nontrivial S] :
    natDegree (minpolyDiv R x) < natDegree (minpoly R x)

{R : Type u_2}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(hx : IsIntegral R x)
[Nontrivial S]

(minpolyDiv R x).natDegree < (minpoly R x).natDegree


lemma Set.Icc.coe_iInf [ConditionallyCompleteLattice α] {a b : α} (h : a ≤ b)
    [Nonempty ι] {S : ι → Set.Icc a b} : letI := Set.Icc.completeLattice h
    ↑(iInf S) = (⨅ i, S i : α)

{ι : Sort u_1}
{α : Type u_2}
[ConditionallyCompleteLattice α]
{a b : α}
(h : a ≤ b)
[Nonempty ι]
{S : ι → ↑(Set.Icc a b)}


theorem adjugate_fin_two (A : Matrix (Fin 2) (Fin 2) α) :
    adjugate A = !![A 1 1, -A 0 1; -A 1 0, A 0 0]

{α : Type w}
[CommRing α]
(A : Matrix (Fin 2) (Fin 2) α)


theorem div_nonneg_of_nonpos (ha : a ≤ 0) (hb : b ≤ 0) : 0 ≤ a / b

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


theorem nhds_left'_le_nhds_ne (a : α) : 𝓝[<] a ≤ 𝓝[≠] a

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


protected theorem Periodic.int_mul [Ring α] (h : Periodic f c) (n : ℤ) : Periodic f (n * c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[Ring α]
(h : Function.Periodic f c)
(n : ℤ)


@[simp]
theorem funCongrLeft_symm (e : m ≃ n) : (funCongrLeft R M e).symm = funCongrLeft R M e.symm

(R : Type u_1)
(M : Type u_8)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{m : Type u_17}
{n : Type u_18}
(e : m ≃ n)

(LinearEquiv.funCongrLeft R M e).symm = LinearEquiv.funCongrLeft R M e.symm


@[to_additive]
theorem index_comap_of_surjective {f : G' →* G} (hf : Function.Surjective f) :
    (H.comap f).index = H.index

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


theorem card_image_of_injective [DecidableEq β] (s : Finset α) (H : Injective f) :
    (s.image f).card = s.card

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[DecidableEq β]
(s : Finset α)
(H : Function.Injective f)


@[to_additive (attr := simp)]
theorem op_unop (x : αᵐᵒᵖ) : op (unop x) = x


theorem Associated.neg_right [Monoid α] [HasDistribNeg α] {a b : α} (h : Associated a b) :
    Associated a (-b)

{α : Type u_1}
[Monoid α]
[HasDistribNeg α]
{a b : α}
(h : a ~ᵤ b)


@[to_additive (attr := simp)]
theorem inv_closedBall : (closedBall x δ)⁻¹ = closedBall x⁻¹ δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)

(Metric.closedBall x δ)⁻¹ = Metric.closedBall x⁻¹ δ


/-- Extract the functor `J ⥤ C` consisting of the cone points and the maps between them,
from a `DiagramOfCones`.
-/
@[simps]
def DiagramOfCones.conePoints (D : DiagramOfCones F) : J ⥤ C

(D : CategoryTheory.Limits.DiagramOfCones F)

∀ {X Y : J} (f : X ⟶ Y), D.conePoints.map f = (D.map f).hom


/-- The diagonal functor as a monoidal functor. -/
@[simps]
def diag : MonoidalFunctor C (C × C)

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

(CategoryTheory.MonoidalFunctor.diag C).ε = 𝟙 (𝟙_ (C × C))


/-- Adding a point to a set preserves its boundedness below. -/
@[simp]
theorem bddBelow_insert [IsDirected α (· ≥ ·)] {s : Set α} {a : α} :
    BddBelow (insert a s) ↔ BddBelow s

{α : Type u}
[Preorder α]
[IsDirected α fun x x_1 => x ≥ x_1]
{s : Set α}
{a : α}


@[simp]
theorem smul_apply (r : R) (f : NormedAddGroupHom V₁ V₂) (v : V₁) : (r • f) v = r • f v

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{R : Type u_5}
[MonoidWithZero R]
[DistribMulAction R V₂]
[PseudoMetricSpace R]
[BoundedSMul R V₂]
(r : R)
(f : NormedAddGroupHom V₁ V₂)
(v : V₁)


theorem hasInitialChangeUniverse [h : HasColimitsOfShape (Discrete.{w} PEmpty) C] :
    HasColimitsOfShape (Discrete.{w'} PEmpty) C

[h : CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete PEmpty.{w + 1}) C]

CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete PEmpty.{w' + 1}) C


theorem pathGraph_preconnected (n : ℕ) : (pathGraph n).Preconnected


@[to_additive (attr := simp)]
lemma isMulFreimanIso_empty : IsMulFreimanIso n (∅ : Set α) (∅ : Set β) f

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{f : α → β}
{n : ℕ}


@[simp]
lemma corootSpace_zero_eq_bot :
    corootSpace (0 : H → K) = ⊥

(K : Type u_2)
(L : Type u_3)
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
(H : LieSubalgebra K L)
[H.IsCartanSubalgebra]
[LieAlgebra.IsKilling K L]


/--
The `Applicative` typeclass only contains the operations of an applicative functor.
`LawfulApplicative` further asserts that these operations satisfy the laws of an applicative functor:
```
pure id <*> v = v
pure (·∘·) <*> u <*> v <*> w = u <*> (v <*> w)
pure f <*> pure x = pure (f x)
u <*> pure y = pure (· y) <*> u
```
-/
class LawfulApplicative (f : Type u → Type v) [Applicative f] extends LawfulFunctor f : Prop where
  seqLeft_eq  (x : f α) (y : f β)     : x <* y = const β <$> x <*> y
  seqRight_eq (x : f α) (y : f β)     : x *> y = const α id <$> x <*> y
  pure_seq    (g : α → β) (x : f α)   : pure g <*> x = g <$> x
  map_pure    (g : α → β) (x : α)     : g <$> (pure x : f α) = pure (g x)
  seq_pure    {α β : Type u} (g : f (α → β)) (x : α) : g <*> pure x = (fun h => h x) <$> g
  seq_assoc   {α β γ : Type u} (x : f α) (g : f (α → β)) (h : f (β → γ)) : h <*> (g <*> x) = ((@comp α β γ) <$> h) <*> g <*> x
  comp_map g h x := (by
    repeat rw [← pure_seq]
    simp [seq_assoc, map_pure, seq_pure])

{f : Type u → Type v}
[Applicative f]
[self : LawfulApplicative f]
{α β : Type u}
(g : f (α → β))
(x : α)

(Seq.seq g fun x_1 => pure x) = (fun h => h x) <$> g


/-- The angle between two vectors is π if and only if they are nonzero
and one is a negative multiple of the other. -/
theorem angle_eq_pi_iff {x y : V} : angle x y = π ↔ x ≠ 0 ∧ ∃ r : ℝ, r < 0 ∧ y = r • x

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}

InnerProductGeometry.angle x y = π ↔ x ≠ 0 ∧ ∃ r < 0, y = r • x


@[to_additive] lemma oneLePart_mono : Monotone (oneLePart : α → α)


@[simp] lemma compProd_zero_right (μ : Measure α) : μ ⊗ₘ (0 : Kernel α β) = 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(μ : MeasureTheory.Measure α)


theorem mem_append_left {a : α} {l₁ : List α} (l₂ : List α) (h : a ∈ l₁) : a ∈ l₁ ++ l₂

{α : Type u_1}
{a : α}
{l₁ : List α}
(l₂ : List α)
(h : a ∈ l₁)


/-- **Integration by parts on (∞, a].**
For finite intervals, see: `intervalIntegral.integral_mul_deriv_eq_deriv_mul`. -/
theorem integral_Iic_mul_deriv_eq_deriv_mul
    (hu : ∀ x ∈ Iio a, HasDerivAt u (u' x) x) (hv : ∀ x ∈ Iio a, HasDerivAt v (v' x) x)
    (huv' : IntegrableOn (u * v') (Iic a)) (hu'v : IntegrableOn (u' * v) (Iic a))
    (h_zero : Tendsto (u * v) (𝓝[<] a) (𝓝 a')) (h_infty : Tendsto (u * v) atBot (𝓝 b')) :
    ∫ (x : ℝ) in Iic a, u x * v' x = a' - b' - ∫ (x : ℝ) in Iic a, u' x * v x

(hu : ∀ x ∈ Set.Iio a, HasDerivAt u (u' x) x)

(hv : ∀ x ∈ Set.Iio a, HasDerivAt v (v' x) x)

(huv' : MeasureTheory.IntegrableOn (u * v') (Set.Iic a) MeasureTheory.volume)

(hu'v : MeasureTheory.IntegrableOn (u' * v) (Set.Iic a) MeasureTheory.volume)

(h_zero : Filter.Tendsto (u * v) (𝓝[<] a) (𝓝 a'))

(h_infty : Filter.Tendsto (u * v) Filter.atBot (𝓝 b'))

∫ (x : ℝ) in Set.Iic a, u x * v' x = a' - b' - ∫ (x : ℝ) in Set.Iic a, u' x * v x


theorem Blunt.anti {S T : ConvexCone 𝕜 E} (h : T ≤ S) : S.Blunt → T.Blunt

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


theorem AntitoneOn.sum_le_integral_Ico (hab : a ≤ b) (hf : AntitoneOn f (Set.Icc a b)) :
    (∑ i ∈ Finset.Ico a b, f (i + 1 : ℕ)) ≤ ∫ x in a..b, f x

{a b : ℕ}
{f : ℝ → ℝ}
(hab : a ≤ b)
(hf : AntitoneOn f (Set.Icc ↑a ↑b))

∑ i ∈ Finset.Ico a b, f ↑(i + 1) ≤ ∫ (x : ℝ) in ↑a..↑b, f x


theorem finset_card_lt_aleph0 (s : Finset α) : #(↑s : Set α) < ℵ₀


@[to_additive (attr := simp)]
theorem toDual_mul [Mul α] (a b : α) : toDual (a * b) = toDual a * toDual b

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


@[simp]
theorem star_ι (x : X) : star (ι R x) = ι R x

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

star (FreeAlgebra.ι R x) = FreeAlgebra.ι R x


theorem results_of_terminates (s : Computation α) [_T : Terminates s] :
    Results s (get s) (length s)

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


@[simp]
theorem det_conjTranspose [StarRing R] (M : Matrix m m R) : det Mᴴ = star (det M)

{m : Type u_1}
[DecidableEq m]
[Fintype m]
{R : Type v}
[CommRing R]
[StarRing R]
(M : Matrix m m R)


/-- `preimage_smul_setₛₗ` in the context of a `MonoidHomClass` -/
theorem preimage_smul_setₛₗ
    {G : Type*} [FunLike G R S] [MonoidHomClass G R S] (σ : G)
    {F : Type*} [FunLike F M N] [MulActionSemiHomClass F σ M N] (h : F)
    {c : R} (hc : IsUnit c) (t : Set N) :
    h ⁻¹' (σ c • t) = c • h ⁻¹' t

{R : Type u_1}
{S : Type u_2}
(M : Type u_3)
(N : Type u_6)
[Monoid R]
[Monoid S]
[MulAction R M]
[MulAction S N]
{G : Type u_8}
[FunLike G R S]
[MonoidHomClass G R S]
(σ : G)
{F : Type u_9}
[FunLike F M N]
[MulActionSemiHomClass F (⇑σ) M N]
(h : F)
{c : R}
(hc : IsUnit c)
(t : Set N)


@[simp]
theorem sSup_eq_sUnion (S : Set (Set α)) : sSup S = ⋃₀S


@[simp]
theorem cocone_inr (h : IsPushout f g inl inr) : h.cocone.inr = inr

(h : CategoryTheory.IsPushout f g inl inr)


@[simp]
theorem ι_ne_algebraMap [Nontrivial R] (x : X) (r : R) : ι R x ≠ algebraMap R _ r

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

FreeAlgebra.ι R x ≠ (algebraMap R (FreeAlgebra R X)) r


/-- The second cosimplicial identity -/
@[reassoc]
theorem δ_comp_σ_of_le {n} {i : Fin (n + 2)} {j : Fin (n + 1)} (H : i ≤ Fin.castSucc j) :
    X.δ (Fin.castSucc i) ≫ X.σ j.succ = X.σ j ≫ X.δ i

(X : CategoryTheory.CosimplicialObject C)

X.δ i.castSucc ≫ X.σ j.succ = X.σ j ≫ X.δ i


theorem integerNormalization_aeval_eq_zero [Algebra R R'] [Algebra S R'] [IsScalarTower R S R']
    (p : S[X]) {x : R'} (hx : aeval x p = 0) : aeval x (integerNormalization M p) = 0

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
{R' : Type u_4}
[CommRing R']
[Algebra R R']
[Algebra S R']
[IsScalarTower R S R']
(p : S[X])
{x : R'}
(hx : (Polynomial.aeval x) p = 0)

(Polynomial.aeval x) (IsLocalization.integerNormalization M p) = 0


theorem boxProd_degree (x : α × β)
    [Fintype (G.neighborSet x.1)] [Fintype (H.neighborSet x.2)] [Fintype ((G □ H).neighborSet x)] :
    (G □ H).degree x = G.degree x.1 + H.degree x.2

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{H : SimpleGraph β}
(x : α × β)
[Fintype ↑(G.neighborSet x.1)]
[Fintype ↑(H.neighborSet x.2)]
[Fintype ↑((G □ H).neighborSet x)]


lemma natMod_lt {n : ℕ} (hn : n ≠ 0) : m.natMod n < n


@[simp] theorem pred_toNat : ∀ i : Int, (i - 1).toNat = i.toNat - 1


@[simp]
theorem whisker_lift (t : LeftLift f g) {x : B} (h : x ⟶ c) :
    (t.whisker h).lift = h ≫ t.lift

(t : CategoryTheory.Bicategory.LeftLift f g)

(t.whisker h).lift = CategoryTheory.CategoryStruct.comp h t.lift


theorem divBy_mul_by (s : S) (p : LocalizedModule S M) :
    divBy s (algebraMap R (Module.End R (LocalizedModule S M)) s p) = p

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
(s : ↥S)
(p : LocalizedModule S M)

(LocalizedModule.divBy s) (((algebraMap R (Module.End R (LocalizedModule S M))) ↑s) p) = p


theorem mem_interleave_left {a : α} {s₁ : Stream' α} (s₂ : Stream' α) : a ∈ s₁ → a ∈ s₁ ⋈ s₂

{α : Type u}
{a : α}
{s₁ : Stream' α}
(s₂ : Stream' α)

a ∈ s₁ → a ∈ s₁ ⋈ s₂


@[simp] lemma predAbove_last_castSucc {i : Fin (n + 1)} : predAbove (last n) (i.castSucc) = i


theorem wf_subsequent : WellFounded Subsequent


@[norm_cast] lemma coe_stepBound {α : Type*} [Semiring α] (n : ℕ) :
    (stepBound n : α) = n * 4 ^ n

↑(SzemerediRegularity.stepBound n) = ↑n * 4 ^ n


@[simp]
theorem isoSheafify_hom {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (isoSheafify J hP).hom = toSheafify J P

(J : CategoryTheory.GrothendieckTopology C)

(hP : CategoryTheory.Presheaf.IsSheaf J P)

(CategoryTheory.isoSheafify J hP).hom = CategoryTheory.toSheafify J P


@[simp]
theorem round_ofNat_add (n : ℕ) [n.AtLeastTwo] (x : α) :
    round ((no_index (OfNat.ofNat n)) + x) = OfNat.ofNat n + round x

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(n : ℕ)
[n.AtLeastTwo]
(x : α)

round (OfNat.ofNat n + x) = OfNat.ofNat n + round x


theorem getElem_append_left (as bs : List α) (h : i < as.length) {h'} : (as ++ bs)[i] = as[i]

{α : Type u_1}
{i : Nat}
(as bs : List α)
(h : i < as.length)
{h' : i < (as ++ bs).length}


/-- If `p : 𝓞 K` is a prime that divides both `S.a + S.b` and `S.a + η * S.b`, then `p`
is associated with `λ`. -/
lemma associated_of_dvd_a_add_b_of_dvd_a_add_eta_mul_b {p : 𝓞 K} (hp : Prime p)
    (hpab : p ∣ S.a + S.b) (hpaηb : p ∣ S.a + η * S.b) : Associated p λ

(S : FermatLastTheoremForThreeGen.Solution hζ)


/-- Calculate the derivative of the Taylor polynomial with respect to `x₀`.

Version for arbitrary sets -/
theorem hasDerivWithinAt_taylorWithinEval {f : ℝ → E} {x y : ℝ} {n : ℕ} {s s' : Set ℝ}
    (hs'_unique : UniqueDiffWithinAt ℝ s' y) (hs_unique : UniqueDiffOn ℝ s) (hs' : s' ∈ 𝓝[s] y)
    (hy : y ∈ s') (h : s' ⊆ s) (hf : ContDiffOn ℝ n f s)
    (hf' : DifferentiableWithinAt ℝ (iteratedDerivWithin n f s) s y) :
    HasDerivWithinAt (fun t => taylorWithinEval f n s t x)
      (((n ! : ℝ)⁻¹ * (x - y) ^ n) • iteratedDerivWithin (n + 1) f s y) s' y

HasDerivWithinAt (fun t => taylorWithinEval f n s t x) (((↑n !)⁻¹ * (x - y) ^ n) • iteratedDerivWithin (n + 1) f s y) s'
  y


@[to_additive (attr := simp, norm_cast)]
theorem coe_prod {ι : Type*} (s : Finset ι) (f : ι → Finset α) :
    ↑(∏ i ∈ s, f i) = ∏ i ∈ s, (f i : Set α)

{α : Type u_2}
[DecidableEq α]
[CommMonoid α]
{ι : Type u_5}
(s : Finset ι)
(f : ι → Finset α)


/-- If two continuous functions on `[a, b]` have the same right derivative and are equal at `a`,
  then they are equal everywhere on `[a, b]`. -/
theorem eq_of_has_deriv_right_eq (derivf : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    (derivg : ∀ x ∈ Ico a b, HasDerivWithinAt g (f' x) (Ici x) x) (fcont : ContinuousOn f (Icc a b))
    (gcont : ContinuousOn g (Icc a b)) (hi : f a = g a) : ∀ y ∈ Icc a b, f y = g y

(derivf : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

(derivg : ∀ x ∈ Set.Ico a b, HasDerivWithinAt g (f' x) (Set.Ici x) x)


/-- The neighbourhoods filter of `x` within `s`, under the discrete topology, is equal to
the pure `x` filter (which is the principal filter at the singleton `{x}`.) -/
theorem nhdsWithin_of_mem_discrete {s : Set X} [DiscreteTopology s] {x : X} (hx : x ∈ s) :
    𝓝[s] x = pure x

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[DiscreteTopology ↑s]
{x : X}
(hx : x ∈ s)


@[simp]
theorem normalizeIsoApp_unitor (n : N C) : normalizeIsoApp C (𝟙_ (F C)) n = ρ_ _

(n : (CategoryTheory.Discrete ∘ CategoryTheory.FreeMonoidalCategory.NormalMonoidalObject) C)

CategoryTheory.FreeMonoidalCategory.normalizeIsoApp C (𝟙_ (CategoryTheory.FreeMonoidalCategory C)) n =
  CategoryTheory.MonoidalCategory.rightUnitor (CategoryTheory.FreeMonoidalCategory.inclusion.obj { as := n.as })


@[to_additive]
theorem map_strictMono_of_injective : StrictMono (map f)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)


@[to_additive]
theorem mulEquivOfMulEquiv_eq_map {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) :
    (f.mulEquivOfMulEquiv k H).toMonoidHom =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
{j : M ≃* P}
(H : Submonoid.map j.toMonoidHom S = T)

(f.mulEquivOfMulEquiv k H).toMonoidHom = f.map ⋯ k


@[simp]
theorem recTopCoe_coe {C : WithTop α → Sort*} (d : C ⊤) (f : ∀ a : α, C a) (x : α) :
    @recTopCoe _ C d f ↑x = f x

{α : Type u_1}
{C : WithTop α → Sort u_5}
(d : C ⊤)
(f : (a : α) → C ↑a)
(x : α)


theorem isCompactlyGenerated_of_wellFounded (h : WellFounded ((· > ·) : α → α → Prop)) :
    IsCompactlyGenerated α

{α : Type u_2}
[CompleteLattice α]
(h : WellFounded fun x x_1 => x > x_1)


/-- The constant map is alternating when `ι` is empty. -/
@[simps (config := .asFn)]
def constOfIsEmpty [IsEmpty ι] (m : N) : M [⋀^ι]→ₗ[R] N

(R : Type u_1)
[Semiring R]
(M : Type u_2)
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
(ι : Type u_7)
[IsEmpty ι]
(m : N)

⇑(AlternatingMap.constOfIsEmpty R M ι m) = Function.const (ι → M) m


/-- Given a point `x` in a discrete subset `s` of a pseudometric space, there is a closed ball
of positive radius centered at `x` and intersecting `s` only at `x`. -/
theorem exists_closedBall_inter_eq_singleton_of_discrete [DiscreteTopology s] {x : α} (hx : x ∈ s) :
    ∃ ε > 0, Metric.closedBall x ε ∩ s = {x}

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
[DiscreteTopology ↑s]
{x : α}
(hx : x ∈ s)


theorem nonZeroDivisors_le_comap [IsLocalization M S] :
    nonZeroDivisors R ≤ (nonZeroDivisors S).comap (algebraMap R S)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]

nonZeroDivisors R ≤ Submonoid.comap (algebraMap R S) (nonZeroDivisors S)


@[simp]
lemma N₂Γ₂ToKaroubiIso_hom_app (X : ChainComplex C ℕ) :
    (N₂Γ₂ToKaroubiIso.hom.app X).f = PInfty

(AlgebraicTopology.DoldKan.N₂Γ₂ToKaroubiIso.hom.app X).f = AlgebraicTopology.DoldKan.PInfty


@[simp]
theorem realize_onBoundedFormula [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] {n : ℕ}
    (ψ : L.BoundedFormula α n) {v : α → M} {xs : Fin n → M} :
    (φ.onBoundedFormula ψ).Realize v xs ↔ ψ.Realize v xs

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
[L'.Structure M]
(φ : L →ᴸ L')
[φ.IsExpansionOn M]
{n : ℕ}
(ψ : L.BoundedFormula α n)
{v : α → M}
{xs : Fin n → M}


theorem ContDiffOn.congr_mono (hf : ContDiffOn 𝕜 n f s) (h₁ : ∀ x ∈ s₁, f₁ x = f x) (hs : s₁ ⊆ s) :
    ContDiffOn 𝕜 n f₁ s₁

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s s₁ : Set E}
{f f₁ : E → F}
{n : ℕ∞}
(hf : ContDiffOn 𝕜 n f s)
(h₁ : ∀ x ∈ s₁, f₁ x = f x)
(hs : s₁ ⊆ s)


theorem lt_def [PartialOrder β] {f g : C(α, β)} : f < g ↔ (∀ a, f a ≤ g a) ∧ ∃ a, f a < g a

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

f < g ↔ (∀ (a : α), f a ≤ g a) ∧ ∃ a, f a < g a


theorem fixFEq (x : α) (acx : Acc r x) : fixF F x acx = F x (fun (y : α) (p : r y x) => fixF F y (Acc.inv acx p))

(F : (x : α) → ((y : α) → r y x → C y) → C x)

WellFounded.fixF F x acx = F x fun y p => WellFounded.fixF F y ⋯


@[to_additive pi_norm_le_iff_of_nonempty]
lemma pi_norm_le_iff_of_nonempty' [Nonempty ι] : ‖f‖ ≤ r ↔ ∀ b, ‖f b‖ ≤ r

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedGroup (π i)]
(f : (i : ι) → π i)
{r : ℝ}
[Nonempty ι]


theorem isSheaf_of_le (P : Cᵒᵖ ⥤ Type w) {J₁ J₂ : GrothendieckTopology C} :
    J₁ ≤ J₂ → IsSheaf J₂ P → IsSheaf J₁ P

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

{J₁ J₂ : CategoryTheory.GrothendieckTopology C}

J₁ ≤ J₂ → CategoryTheory.Presieve.IsSheaf J₂ P → CategoryTheory.Presieve.IsSheaf J₁ P


lemma ih1_swap (ih : ∀ a, ArgsRel a (Args.P1 x y) → P124 a) : IH1 y x

(ih :
  ∀ (a : Surreal.Multiplication.Args),
    Surreal.Multiplication.ArgsRel a (Surreal.Multiplication.Args.P1 x y) → Surreal.Multiplication.P124 a)


@[simp]
theorem equivalenceSelfOfHasFiniteBiproducts_inverse {C : Type (u₁ + 1)} [LargeCategory C]
    [Preadditive C] [HasFiniteBiproducts C] :
    (equivalenceSelfOfHasFiniteBiproducts C).inverse = embedding C

(CategoryTheory.Mat_.equivalenceSelfOfHasFiniteBiproducts C).inverse = CategoryTheory.Mat_.embedding C


theorem not_mem_of_not_mem_closure {s : Set R} {P : R} (hP : P ∉ closure s) : P ∉ s

{R : Type u}
[NonAssocSemiring R]
{s : Set R}
{P : R}
(hP : P ∉ Subsemiring.closure s)


/-- A dependent version of `Subgroup.closure_induction`.  -/
@[to_additive (attr := elab_as_elim) "A dependent version of `AddSubgroup.closure_induction`. "]
theorem closure_induction' {p : ∀ x, x ∈ closure k → Prop}
    (mem : ∀ (x) (h : x ∈ k), p x (subset_closure h)) (one : p 1 (one_mem _))
    (mul : ∀ x hx y hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
    (inv : ∀ x hx, p x hx → p x⁻¹ (inv_mem hx)) {x} (hx : x ∈ closure k) : p x hx

{p : (x : G) → x ∈ Subgroup.closure k → Prop}

(mul : ∀ (x : G) (hx : x ∈ Subgroup.closure k) (y : G) (hy : y ∈ Subgroup.closure k), p x hx → p y hy → p (x * y) ⋯)

(inv : ∀ (x : G) (hx : x ∈ Subgroup.closure k), p x hx → p x⁻¹ ⋯)


theorem powersetCard_one (s : Multiset α) : powersetCard 1 s = s.map singleton

Multiset.powersetCard 1 s = Multiset.map singleton s


theorem Ico_disjoint_Ico_consecutive (a b c : α) : Disjoint (Ico a b) (Ico b c)

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
(a b c : α)

Disjoint (Finset.Ico a b) (Finset.Ico b c)


/-- The characteristic predicate for localized module.
`IsLocalizedModule S f` describes that `f : M ⟶ M'` is the localization map identifying `M'` as
`LocalizedModule S M`.
-/
@[mk_iff] class IsLocalizedModule : Prop where
  map_units : ∀ x : S, IsUnit (algebraMap R (Module.End R M') x)
  surj' : ∀ y : M', ∃ x : M × S, x.2 • y = f x.1
  exists_of_eq : ∀ {x₁ x₂}, f x₁ = f x₂ → ∃ c : S, c • x₁ = c • x₂

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[self : IsLocalizedModule S f]
(x : ↥S)

IsUnit ((algebraMap R (Module.End R M')) ↑x)


@[simp]
theorem orthogonal_eq_top_iff : Kᗮ = ⊤ ↔ K = ⊥

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(K : Submodule 𝕜 E)

Kᗮ = ⊤ ↔ K = ⊥


/-- ```
   0 -----0---> X
   |            |
   0           inl
   |            |
   v            v
   Y --inr--> X ⊞ Y
```
is a bicartesian square.
-/
@[simp]
theorem of_has_biproduct₂ [HasBinaryBiproduct X Y] :
    BicartesianSq (0 : 0 ⟶ X) (0 : 0 ⟶ Y) biprod.inl biprod.inr

CategoryTheory.BicartesianSq 0 0 CategoryTheory.Limits.biprod.inl CategoryTheory.Limits.biprod.inr


/-- Radon-Nikodym derivative of the scalar multiple of a measure.
See also `rnDeriv_smul_left`, which has no hypothesis on `μ` but requires finite `ν`. -/
theorem rnDeriv_smul_left' (ν μ : Measure α) [SigmaFinite ν] [SigmaFinite μ] (r : ℝ≥0) :
    (r • ν).rnDeriv μ =ᵐ[μ] r • ν.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
(ν μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite ν]
[MeasureTheory.SigmaFinite μ]
(r : ℝ≥0)


@[simp]
theorem mul_invOf_self' [Mul α] [One α] (a : α) {_ : Invertible a} : a * ⅟ a = 1


@[reassoc (attr := simp)]
lemma OpenCover.pullbackHom_map {X W : Scheme.{u}} (𝒰 : X.OpenCover) (f : W ⟶ X) (i) :
    𝒰.pullbackHom f i ≫ 𝒰.map i = (𝒰.pullbackCover f).map i ≫ f

{X W : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : W ⟶ X)
(i : (𝒰.pullbackCover f).J)


/-- If the quotient by an ideal is a field, then the ideal is maximal. -/
theorem maximal_of_isField (I : Ideal R) (hqf : IsField (R ⧸ I)) : I.IsMaximal

{R : Type u}
[CommRing R]
(I : Ideal R)
(hqf : IsField (R ⧸ I))


/-- Given a bifunctor `F : C₁ ⥤ C₂ ⥤ C₃` and types `I` and `J`, this is the obvious
functor `GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject (I × J) C₃`. -/
@[simps]
def mapBifunctor (I J : Type*) :
    GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject (I × J) C₃

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂ C₃))

∀ {X_1 Y : CategoryTheory.GradedObject J C₂} (φ : X_1 ⟶ Y) (ij : I × J),
  ((CategoryTheory.GradedObject.mapBifunctor F I J).obj X).map φ ij = (F.obj (X ij.1)).map (φ ij.2)


theorem disjoint_right {s t : Multiset α} : Disjoint s t ↔ ∀ {a}, a ∈ t → a ∉ s


theorem add_comp (f : M →ₛₗ[σ₁₂] M₂) (g h : M₂ →ₛₗ[σ₂₃] M₃) :
    ((h + g).comp f : M →ₛₗ[σ₁₃] M₃) = h.comp f + g.comp f

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_9}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R₁ M]
[Module R₂ M₂]
[Module R₃ M₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(f : M →ₛₗ[σ₁₂] M₂)
(g h : M₂ →ₛₗ[σ₂₃] M₃)


theorem SeqCompactSpace.tendsto_subseq [SeqCompactSpace X] (x : ℕ → X) :
    ∃ (a : X) (φ : ℕ → ℕ), StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a)

{X : Type u_1}
[TopologicalSpace X]
[SeqCompactSpace X]
(x : ℕ → X)

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


/-- A topological space is called paracompact, if every open covering of this space admits a locally
finite refinement. We use the same universe for all types in the definition to avoid creating a
class like `ParacompactSpace.{u v}`. Due to lemma `precise_refinement` below, every open covering
`s : α → Set X` indexed on `α : Type v` has a *precise* locally finite refinement, i.e., a locally
finite refinement `t : α → Set X` indexed on the same type such that each `∀ i, t i ⊆ s i`. -/
class ParacompactSpace (X : Type v) [TopologicalSpace X] : Prop where
  /-- Every open cover of a paracompact space assumes a locally finite refinement. -/
  locallyFinite_refinement :
    ∀ (α : Type v) (s : α → Set X), (∀ a, IsOpen (s a)) → (⋃ a, s a = univ) →
      ∃ (β : Type v) (t : β → Set X),
        (∀ b, IsOpen (t b)) ∧ (⋃ b, t b = univ) ∧ LocallyFinite t ∧ ∀ b, ∃ a, t b ⊆ s a

{X : Type v}
[TopologicalSpace X]
[self : ParacompactSpace X]
(α : Type v)
(s : α → Set X)

(∀ (a : α), IsOpen (s a)) →
  ⋃ a, s a = Set.univ →
    ∃ β t, (∀ (b : β), IsOpen (t b)) ∧ ⋃ b, t b = Set.univ ∧ LocallyFinite t ∧ ∀ (b : β), ∃ a, t b ⊆ s a


/-- Log-convexity of the Gamma function on the positive reals (stated in multiplicative form),
proved using the Hölder inequality applied to Euler's integral. -/
theorem Gamma_mul_add_mul_le_rpow_Gamma_mul_rpow_Gamma {s t a b : ℝ} (hs : 0 < s) (ht : 0 < t)
    (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
    Gamma (a * s + b * t) ≤ Gamma s ^ a * Gamma t ^ b

Real.Gamma (a * s + b * t) ≤ Real.Gamma s ^ a * Real.Gamma t ^ b


@[simp]
theorem toContinuousMultilinearMap_add (f g : M [⋀^ι]→L[R] N) : (f + g).1 = f.1 + g.1

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
[ContinuousAdd N]
(f g : M [⋀^ι]→L[R] N)

(f + g).toContinuousMultilinearMap = f.toContinuousMultilinearMap + g.toContinuousMultilinearMap


lemma interedges_eq_biUnion :
    interedges r s t = s.biUnion (fun x ↦ (t.filter (r x)).map ⟨(x, ·), Prod.mk.inj_left x⟩)

{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
{s : Finset α}
{t : Finset β}
[DecidableEq α]
[DecidableEq β]

Rel.interedges r s t = s.biUnion fun x => Finset.map { toFun := fun x_1 => (x, x_1), inj' := ⋯ } (Finset.filter (r x) t)


lemma Module.mem_support_iff' :
    p ∈ Module.support R M ↔ ∃ m : M, ∀ r ∉ p.asIdeal, r • m ≠ 0

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{p : PrimeSpectrum R}

p ∈ Module.support R M ↔ ∃ m, ∀ r ∉ p.asIdeal, r • m ≠ 0


@[reassoc]
theorem coprod.inr_desc {W X Y : C} [HasBinaryCoproduct X Y] (f : X ⟶ W) (g : Y ⟶ W) :
    coprod.inr ≫ coprod.desc f g = g

CategoryTheory.Limits.coprod.inr ≫ CategoryTheory.Limits.coprod.desc f g = g


@[simp] theorem getElem_pop (a : Array α) (i : Nat) (hi : i < a.pop.size) :
    a.pop[i] = a[i]'(Nat.lt_of_lt_of_le (a.size_pop ▸ hi) (Nat.sub_le _ _))

{α : Type u_1}
(a : Array α)
(i : Nat)
(hi : i < a.pop.size)


theorem expand_eq_sum {f : R[X]} : expand R p f = f.sum fun e a => C a * (X ^ p) ^ e

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

(Polynomial.expand R p) f = f.sum fun e a => Polynomial.C a * (Polynomial.X ^ p) ^ e


@[to_additive (attr := simp)]
theorem invRev_length : (invRev L₁).length = L₁.length

(FreeGroup.invRev L₁).length = L₁.length


/-- When both `S.f` and `S.g` are zero, the middle object `S.X₂`
gives a right homology data on S -/
@[simps]
def ofZeros (hf : S.f = 0) (hg : S.g = 0) : S.RightHomologyData

(CategoryTheory.ShortComplex.RightHomologyData.ofZeros S hf hg).Q = S.X₂


@[simp]
theorem commMap_canonical_eq_mixed (x : K) :
    commMap K (canonicalEmbedding K x) = mixedEmbedding K x

(NumberField.mixedEmbedding.commMap K) ((NumberField.canonicalEmbedding K) x) = (NumberField.mixedEmbedding K) x


theorem IsNormal.strictMono {f} (H : IsNormal f) : StrictMono f

{f : Ordinal.{u_4} → Ordinal.{u_5}}
(H : Ordinal.IsNormal f)


theorem centralizer_toSubsemigroup : (centralizer S).toSubsemigroup = Subsemigroup.centralizer S

(Submonoid.centralizer S).toSubsemigroup = Subsemigroup.centralizer S


/-- Reformulation of the doubling formula in terms of `Gammaℝ`. -/
lemma Gammaℝ_mul_Gammaℝ_add_one (s : ℂ) : Gammaℝ s * Gammaℝ (s + 1) = Gammaℂ s


/-- Precomposition of functions into a topological semiring by a continuous map is an algebra
homomorphism. -/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A)

(R : Type u_2)
[CommSemiring R]
(A : Type u_3)
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[TopologicalSemiring A]
{α : Type u_5}
{β : Type u_6}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
(g : C(β, A))

(ContinuousMap.compRightAlgHom R A f) g = g.comp f


/-- Euler's Criterion: A unit `x` of `ZMod p` is a square if and only if `x ^ (p / 2) = 1`. -/
theorem euler_criterion_units (x : (ZMod p)ˣ) : (∃ y : (ZMod p)ˣ, y ^ 2 = x) ↔ x ^ (p / 2) = 1

(p : ℕ)
[Fact (Nat.Prime p)]
(x : (ZMod p)ˣ)


theorem extend_source_mem_nhdsWithin {x : M} (h : x ∈ f.source) : (f.extend I).source ∈ 𝓝[s] 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)
{s : Set M}
{x : M}
(h : x ∈ f.source)


@[simp]
theorem bddAbove_lowerClosure : BddAbove (lowerClosure s : Set α) ↔ BddAbove s


theorem hasDerivAt_cos (x : ℝ) : HasDerivAt cos (-sin x) x


@[simp]
theorem coe_add (s t : Cₛ^n⟮I; F, V⟯) : ⇑(s + t) = ⇑s + t

[TopologicalSpace (Bundle.TotalSpace F V)]


@[simp]
theorem from_to (X : ShrinkHoms C') : toShrinkHoms (fromShrinkHoms X) = X

(X : CategoryTheory.ShrinkHoms.{u_1} C')

CategoryTheory.ShrinkHoms.toShrinkHoms X.fromShrinkHoms = X


/-- The bijection `(unit R ⟶ M) ≃ M.sections` for `M : PresheafOfModules R`. -/
@[simps! apply_coe]
def unitHomEquiv (M : PresheafOfModules R) :
    (unit R ⟶ M) ≃ M.sections

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : PresheafOfModules R)
(f : PresheafOfModules.unit R ⟶ M)
(X : Cᵒᵖ)

↑(M.unitHomEquiv f) X = (PresheafOfModules.Hom.app f X) 1


@[simp]
theorem Γ_obj (X : Schemeᵒᵖ) : Γ.obj X = Γ(unop X, ⊤)

AlgebraicGeometry.Scheme.Γ.obj X = (Opposite.unop X).presheaf.obj (Opposite.op ⊤)


@[simp]
theorem homeomorphAddCircle_apply_mk (hp : p ≠ 0) (hq : q ≠ 0) (x : 𝕜) :
    homeomorphAddCircle p q hp hq (x : 𝕜) = (x * (p⁻¹ * q) : 𝕜)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p q : 𝕜)
(hp : p ≠ 0)
(hq : q ≠ 0)
(x : 𝕜)

(AddCircle.homeomorphAddCircle p q hp hq) ↑x = ↑(x * (p⁻¹ * q))


theorem arrowCongr_comp {N N₂ N₃ : Sort _} [AddCommMonoid N] [AddCommMonoid N₂] [AddCommMonoid N₃]
    [Module R N] [Module R N₂] [Module R N₃] (e₁ : M ≃ₗ[R] N) (e₂ : M₂ ≃ₗ[R] N₂) (e₃ : M₃ ≃ₗ[R] N₃)
    (f : M →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) :
    arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f)

{R : Type u_1}
{M : Type u_8}
{M₂ : Type u_10}
{M₃ : Type u_11}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
{N : Type u_17}
{N₂ : Type u_18}
{N₃ : Type u_19}
[AddCommMonoid N]
[AddCommMonoid N₂]
[AddCommMonoid N₃]
[Module R N]
[Module R N₂]
[Module R N₃]
(e₁ : M ≃ₗ[R] N)
(e₂ : M₂ ≃ₗ[R] N₂)
(e₃ : M₃ ≃ₗ[R] N₃)
(f : M →ₗ[R] M₂)
(g : M₂ →ₗ[R] M₃)

(e₁.arrowCongr e₃) (g ∘ₗ f) = (e₂.arrowCongr e₃) g ∘ₗ (e₁.arrowCongr e₂) f


theorem IsMinOn.on_preimage (g : δ → α) {b : δ} (hf : IsMinOn f s (g b)) :
    IsMinOn (f ∘ g) (g ⁻¹' s) b

{α : Type u}
{β : Type v}
{δ : Type x}
[Preorder β]
{f : α → β}
{s : Set α}
(g : δ → α)
{b : δ}
(hf : IsMinOn f s (g b))


@[to_additive]
protected theorem Filter.EventuallyEq.mulSupport [One β] {f g : α → β} {l : Filter α}
    (h : f =ᶠ[l] g) :
    Function.mulSupport f =ᶠ[l] Function.mulSupport g

{α : Type u_1}
{β : Type u_2}
[Zero β]
{f g : α → β}
{l : Filter α}
(h : f =ᶠ[l] g)

Function.support f =ᶠ[l] Function.support g


@[to_additive AddLocalization.r_iff_exists]
theorem r_iff_exists {x y : M × S} : r S x y ↔ ∃ c : S, ↑c * (↑y.2 * x.1) = c * (x.2 * y.1)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{x y : M × ↥S}

(Localization.r S) x y ↔ ∃ c, ↑c * (↑y.2 * x.1) = ↑c * (↑x.2 * y.1)


theorem le_exp_log (x : ℝ) : x ≤ exp (log x)


@[simp]
theorem adjMatrix_apply (v w : V) [Zero α] [One α] :
    G.adjMatrix α v w = if G.Adj v w then 1 else 0

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
(v w : V)
[Zero α]
[One α]

SimpleGraph.adjMatrix α G v w = if G.Adj v w then 1 else 0


theorem toOpen_unit_app_val_c_app {X : Scheme.{u}} (U) :
    StructureSheaf.toOpen _ _ ≫ (ΓSpec.adjunction.unit.app X).val.c.app U =
      X.presheaf.map (homOfLE (by exact le_top)).op

(U :
  (TopologicalSpace.Opens
      ↑↑((AlgebraicGeometry.Scheme.Γ.rightOp.comp AlgebraicGeometry.Scheme.Spec).obj X).toPresheafedSpace)ᵒᵖ)

CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toOpen (↑(Opposite.unop (AlgebraicGeometry.Scheme.Γ.rightOp.obj X)))
      (Opposite.unop U))
    ((AlgebraicGeometry.ΓSpec.adjunction.unit.app X).val.c.app U) =
  X.presheaf.map (CategoryTheory.homOfLE ⋯).op


theorem IsTheta.zpow {f : α → 𝕜} {g : α → 𝕜'} (h : f =Θ[l] g) (n : ℤ) :
    (fun x ↦ f x ^ n) =Θ[l] fun x ↦ g x ^ n

{α : Type u_1}
{𝕜 : Type u_14}
{𝕜' : Type u_15}
[NormedField 𝕜]
[NormedField 𝕜']
{l : Filter α}
{f : α → 𝕜}
{g : α → 𝕜'}
(h : f =Θ[l] g)
(n : ℤ)

(fun x => f x ^ n) =Θ[l] fun x => g x ^ n


theorem lintegral_indicator_const_comp {mβ : MeasurableSpace β} {f : α → β} {s : Set β}
    (hf : Measurable f) (hs : MeasurableSet s) (c : ℝ≥0∞) :
    ∫⁻ a, s.indicator (fun _ => c) (f a) ∂μ = c * μ (f ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{mβ : MeasurableSpace β}
{f : α → β}
{s : Set β}
(hf : Measurable f)
(hs : MeasurableSet s)
(c : ℝ≥0∞)

∫⁻ (a : α), s.indicator (fun x => c) (f a) ∂μ = c * μ (f ⁻¹' s)


theorem closure_lt_subset_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f)
    (hg : Continuous g) : closure { b | f b < g b } ⊆ { b | f b ≤ g b }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[t : OrderClosedTopology α]
[TopologicalSpace β]
{f g : β → α}
(hf : Continuous f)
(hg : Continuous g)

closure {b | f b < g b} ⊆ {b | f b ≤ g b}


theorem mem_closure {a : R} : a ∈ s → a ∈ closure s

{R : Type u}
[Ring R]
{s : Set R}
{a : R}


@[simp] lemma unmop_inv_leftUnitor (X : Cᴹᵒᵖ) : (λ_ X).inv.unmop = (ρ_ (unmop X)).inv

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

(CategoryTheory.MonoidalCategory.leftUnitor X).inv.unmop = (CategoryTheory.MonoidalCategory.rightUnitor X.unmop).inv


/-- The **Chicken McNugget theorem** stating that the Frobenius number
  of positive numbers `m` and `n` is `m * n - m - n`. -/
theorem frobeniusNumber_pair (cop : Coprime m n) (hm : 1 < m) (hn : 1 < n) :
    FrobeniusNumber (m * n - m - n) {m, n}

{m n : ℕ}
(cop : m.Coprime n)
(hm : 1 < m)
(hn : 1 < n)


@[simp]
theorem sum_X_index {S : Type*} [AddCommMonoid S] {f : ℕ → R → S} (hf : f 1 0 = 0) :
    (X : R[X]).sum f = f 1 1

{R : Type u}
[Semiring R]
{S : Type u_1}
[AddCommMonoid S]
{f : ℕ → R → S}
(hf : f 1 0 = 0)


theorem image_inter_subset [DecidableEq α] (f : α → β) (s t : Finset α) :
    (s ∩ t).image f ⊆ s.image f ∩ t.image f

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

Finset.image f (s ∩ t) ⊆ Finset.image f s ∩ Finset.image f t


@[simp]
theorem Basis.map_equivFun [Finite ι] (b : Basis ι R M) (f : M ≃ₗ[R] M') :
    (b.map f).equivFun = f.symm.trans b.equivFun

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
[Finite ι]
(b : Basis ι R M)
(f : M ≃ₗ[R] M')

(b.map f).equivFun = f.symm ≪≫ₗ b.equivFun


theorem galActionHom_restrict [Fact (p.Splits (algebraMap F E))] (ϕ : E ≃ₐ[F] E) (x : rootSet p E) :
    ↑(galActionHom p E (restrict p E ϕ) x) = ϕ x

[Fact (Polynomial.Splits (algebraMap F E) p)]

↑(((Polynomial.Gal.galActionHom p E) ((Polynomial.Gal.restrict p E) ϕ)) x) = ϕ ↑x


@[simp]
theorem preimage_cast_Ici (q : ℚ) : (↑) ⁻¹' Ici (q : K) = Ici q

{K : Type u_5}
[LinearOrderedField K]
(q : ℚ)


lemma mul_delta {n : ℕ} (χ : DirichletCharacter ℂ n) : ↗χ * δ = δ


/-- Reinterpret a bounded order homomorphism as a bounded order homomorphism between the dual
orders. -/
@[simps]
protected def dual :
    BoundedOrderHom α β ≃
      BoundedOrderHom αᵒᵈ
        βᵒᵈ

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[BoundedOrder α]
[Preorder β]
[BoundedOrder β]
(f : BoundedOrderHom α β)

(BoundedOrderHom.dual f).toOrderHom = OrderHom.dual f.toOrderHom


@[simp]
theorem top_disjoint : Disjoint ⊤ a ↔ a = ⊥

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
{a : α}


/-- An `AddGroupFilterBasis` on an additive group is a `FilterBasis` satisfying some additional
  axioms. Example : if `G` is a topological group then the neighbourhoods of the identity are an
  `AddGroupFilterBasis`. Conversely given an `AddGroupFilterBasis` one can define a topology
  compatible with the group structure on `G`. -/
class AddGroupFilterBasis (A : Type u) [AddGroup A] extends FilterBasis A where
  zero' : ∀ {U}, U ∈ sets → (0 : A) ∈ U
  add' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V + V ⊆ U
  neg' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ -x) ⁻¹' U
  conj' : ∀ x₀, ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ + x + -x₀) ⁻¹' U

{A : Type u}
[AddGroup A]
[self : AddGroupFilterBasis A]
{U : Set A}

U ∈ AddGroupFilterBasis.toFilterBasis.sets → ∃ V ∈ AddGroupFilterBasis.toFilterBasis.sets, V + V ⊆ U


theorem nnnorm_mul_le (a b : α) : ‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊

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

‖a * b‖₊ ≤ ‖a‖₊ * ‖b‖₊


@[simp]
lemma liftBaseChange_tmul (l : M →ₗ[R] N) (x y) : l.liftBaseChange A (x ⊗ₜ y) = x • l y

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
(A : Type u_4)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[Module A N]
[IsScalarTower R A N]
(l : M →ₗ[R] N)
(x : A)
(y : M)

(LinearMap.liftBaseChange A l) (x ⊗ₜ[R] y) = x • l y


theorem Chain'.imp {S : α → α → Prop} (H : ∀ a b, R a b → S a b) {l : List α} (p : Chain' R l) :
    Chain' S l

{α : Type u}
{R S : α → α → Prop}
(H : ∀ (a b : α), R a b → S a b)
{l : List α}
(p : List.Chain' R l)


/-- The `p`-adic norm of the entries of a nonzero Cauchy sequence of rationals is eventually
constant. -/
theorem stationary {f : CauSeq ℚ (padicNorm p)} (hf : ¬f ≈ 0) :
    ∃ N, ∀ m n, N ≤ m → N ≤ n → padicNorm p (f n) = padicNorm p (f m)

{p : ℕ}
[Fact (Nat.Prime p)]
{f : CauSeq ℚ (padicNorm p)}
(hf : ¬f ≈ 0)

∃ N, ∀ (m n : ℕ), N ≤ m → N ≤ n → padicNorm p (↑f n) = padicNorm p (↑f m)


/-- Bound for `|log x * x|` in the interval `(0, 1]`. -/
theorem abs_log_mul_self_lt (x : ℝ) (h1 : 0 < x) (h2 : x ≤ 1) : |log x * x| < 1


@[simp]
theorem zero_apply (x : E) : (0 : NonarchAddGroupSeminorm E) x = 0


theorem iff_continuous {_ : TopologicalSpace Y} [DiscreteTopology Y] (f : X → Y) :
    IsLocallyConstant f ↔ Continuous f

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

∀ {x : TopologicalSpace Y} [inst : DiscreteTopology Y] (f : X → Y), IsLocallyConstant f ↔ Continuous f


theorem cpow_mul_ofReal_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) (z : ℂ) :
    (x : ℂ) ^ (↑y * z) = (↑(x ^ y) : ℂ) ^ z


theorem Ideal.prime_generator_of_prime {P : Ideal A} (h : Prime P) [P.IsPrincipal] :
    Prime (generator P)

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
{P : Ideal A}
(h : Prime P)
[Submodule.IsPrincipal P]


@[simp]
theorem id_apply (m : M) : (𝟙 M : M → M) m = m

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


@[simp]
theorem not_lt {a b : α} : ¬a < b ↔ b ≤ a


@[to_additive]
protected theorem setLIntegral_eq (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    (f : α → ℝ≥0∞) (hf : ∀ (g : G) (x), f (g • x) = f x) :
    ∫⁻ x in s, f x ∂μ = ∫⁻ x in t, f x ∂μ

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.IsFundamentalDomain G t μ)

(f : α → ℝ≥0∞)

(hf : ∀ (g : G) (x : α), f (g • x) = f x)

∫⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α) in t, f x ∂μ


theorem byteIdx_mk (n : Nat) : byteIdx ⟨n⟩ = n


theorem div_lt_div_right (hc : 0 < c) : a / c < b / c ↔ a < b

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c : α}
(hc : 0 < c)


/-- An iso `α ≃* β` can equivalently be viewed as an iso `αᵐᵒᵖ ≃* βᵐᵒᵖ`. -/
@[to_additive (attr := simps)
  "An iso `α ≃+ β` can equivalently be viewed as an iso `αᵃᵒᵖ ≃+ βᵃᵒᵖ`."]
def MulEquiv.op {α β} [Mul α] [Mul β] : α ≃* β ≃ (αᵐᵒᵖ ≃* βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Mul β]
(f : α ≃* β)

∀ (a : αᵐᵒᵖ), (MulEquiv.op f) a = (MulOpposite.op ∘ ⇑f ∘ MulOpposite.unop) a


theorem floor_le (a : α) : (⌊a⌋ : α) ≤ a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


theorem comp_cons {α : Type*} {β : Type*} (g : α → β) (y : α) (q : Fin n → α) :
    g ∘ cons y q = cons (g y) (g ∘ q)

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(g : α → β)
(y : α)
(q : Fin n → α)

g ∘ Fin.cons y q = Fin.cons (g y) (g ∘ q)


theorem Equiv.equivalence : Equivalence (@Equiv α)


lemma IsOpenImmersion.of_isLocalization {R S} [CommRing R] [CommRing S]
    [Algebra R S] (f : R) [IsLocalization.Away f S] :
    IsOpenImmersion (Spec.map (CommRingCat.ofHom (algebraMap R S)))

{R S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
(f : R)
[IsLocalization.Away f S]

AlgebraicGeometry.IsOpenImmersion (AlgebraicGeometry.Spec.map (CommRingCat.ofHom (algebraMap R S)))


theorem comp_le_uniformity : ((𝓤 α).lift' fun s : Set (α × α) => s ○ s) ≤ 𝓤 α


theorem union_diff_cancel_right {s t : Set α} (h : s ∩ t ⊆ ∅) : (s ∪ t) \ t = s

{α : Type u}
{s t : Set α}
(h : s ∩ t ⊆ ∅)


@[to_additive]
theorem toEquiv_apply {f : Quotient (QuotientGroup.rightRel H) → G}
    (hf : ∀ q, Quotient.mk'' (f q) = q) (q : Quotient (QuotientGroup.rightRel H)) :
    (toEquiv (range_mem_rightTransversals hf) q : G) = f q

(hf : ∀ (q : Quotient (QuotientGroup.rightRel H)), Quotient.mk'' (f q) = q)

↑((Subgroup.MemRightTransversals.toEquiv ⋯) q) = f q


@[simp]
theorem mk'_spec (x) (y : M) : mk' S x y * algebraMap R S y = algebraMap R S x

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(y : ↥M)

IsLocalization.mk' S x y * (algebraMap R S) ↑y = (algebraMap R S) x


theorem LF.not_ge {x y : PGame} : x ⧏ y → ¬y ≤ x


@[reassoc (attr := simp)]
theorem colimitObjIsoColimitCompEvaluation_ι_inv [HasColimitsOfShape J C] (F : J ⥤ K ⥤ C) (j : J)
    (k : K) :
    colimit.ι (F ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation F k).inv =
      (colimit.ι F j).app k

CategoryTheory.Limits.colimit.ι (F ⋙ (CategoryTheory.evaluation K C).obj k) j ≫
    (CategoryTheory.Limits.colimitObjIsoColimitCompEvaluation F k).inv =
  (CategoryTheory.Limits.colimit.ι F j).app k


/-- A Lie module `M` of a Lie algebra `L` is triangularizable if the endomorhpism of `M` defined by
any `x : L` is triangularizable. -/
class IsTriangularizable : Prop :=
  iSup_eq_top : ∀ x, ⨆ φ, ⨆ k, (toEnd R L M x).genEigenspace φ k = ⊤

[self : LieModule.IsTriangularizable R L M]

⨆ φ, ⨆ k, (((LieModule.toEnd R L M) x).genEigenspace φ) k = ⊤


(F : CategoryTheory.ComposableArrows C n)

CategoryTheory.ComposableArrows.Precomp.obj F X 0 = X


@[simp]
theorem sum_zero [Countable ι] : (Kernel.sum fun _ : ι => (0 : Kernel α β)) = 0

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
[Countable ι]

(ProbabilityTheory.Kernel.sum fun x => 0) = 0


@[simp]
theorem range_mk : range (mk : X → SeparationQuotient X) = univ

Set.range SeparationQuotient.mk = Set.univ


protected theorem min_max_distrib_right (a b c : Nat) :
    min (max a b) c = max (min a c) (min b c)


lemma measurableSet_generateFrom_countablePartition_iff (n : ℕ) (s : Set α) :
    MeasurableSet[generateFrom (countablePartition α n)] s
      ↔ ∃ S : Finset (Set α), ↑S ⊆ countablePartition α n ∧ s = ⋃₀ S

[h : MeasurableSpace.CountablyGenerated α]

MeasurableSet s ↔ ∃ S, ↑S ⊆ MeasurableSpace.countablePartition α n ∧ s = ⋃₀ ↑S


theorem cof_blsub_le_lift {o} (f : ∀ a < o, Ordinal) :
    cof (blsub.{u, v} o f) ≤ Cardinal.lift.{v, u} o.card

(f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v})

(o.blsub f).cof ≤ Cardinal.lift.{v, u} o.card


lemma continuous_negMulLog : Continuous negMulLog


theorem eq_of_coeff_monomial_ne_zero {m n : σ →₀ ℕ} {a : R} (h : coeff R m (monomial R n a) ≠ 0) :
    m = n

(h : (MvPowerSeries.coeff R m) ((MvPowerSeries.monomial R n) a) ≠ 0)


theorem IsCodetecting.isCoseparating [HasCoequalizers C] {𝒢 : Set C} :
    IsCodetecting 𝒢 → IsCoseparating 𝒢

CategoryTheory.IsCodetecting 𝒢 → CategoryTheory.IsCoseparating 𝒢


@[simp]
theorem sqFrom_right (f : Hom C₁ C₂) (i : ι) : (f.sqFrom i).right = f.next i


@[simp] theorem one_imJ : (1 : ℍ[R]).imJ = 0


theorem crossing_eq_crossing_of_lowerCrossingTime_lt {M : ℕ} (hNM : N ≤ M)
    (h : lowerCrossingTime a b f N n ω < N) :
    upperCrossingTime a b f M n ω = upperCrossingTime a b f N n ω ∧
      lowerCrossingTime a b f M n ω = lowerCrossingTime a b f N n ω

{f : ℕ → Ω → ℝ}

(h : MeasureTheory.lowerCrossingTime a b f N n ω < N)

MeasureTheory.upperCrossingTime a b f M n ω = MeasureTheory.upperCrossingTime a b f N n ω ∧
  MeasureTheory.lowerCrossingTime a b f M n ω = MeasureTheory.lowerCrossingTime a b f N n ω


theorem principal_add_isLimit {o : Ordinal} (ho₁ : 1 < o) (ho : Principal (· + ·) o) :
    o.IsLimit

(ho : Ordinal.Principal (fun x x_1 => x + x_1) o)


@[to_additive]
theorem openEmbedding_mk_symm : OpenEmbedding (@mk M).symm


theorem le_opNorm_mul_pow_of_le {n : ℕ} {Ei : Fin n → Type*} [∀ i, SeminormedAddCommGroup (Ei i)]
    [∀ i, NormedSpace 𝕜 (Ei i)] (f : ContinuousMultilinearMap 𝕜 Ei G) {m : ∀ i, Ei i} {b : ℝ}
    (hm : ‖m‖ ≤ b) : ‖f m‖ ≤ ‖f‖ * b ^ n

[(i : Fin n) → SeminormedAddCommGroup (Ei i)]


theorem erase_def (i : ι) (f : Π₀ i, β i) : f.erase i = mk (f.support.erase i) fun j => f j.1

[(i : ι) → (x : β i) → Decidable (x ≠ 0)]

DFinsupp.erase i f = DFinsupp.mk (f.support.erase i) fun j => f ↑j


theorem prod_topology {X Y : TopCat.{u}} :
    (X ⨯ Y).str =
      induced (Limits.prod.fst : X ⨯ Y ⟶ _) X.str ⊓
        induced (Limits.prod.snd : X ⨯ Y ⟶ _) Y.str

(X ⨯ Y).str =
  TopologicalSpace.induced (⇑CategoryTheory.Limits.prod.fst) X.str ⊓
    TopologicalSpace.induced (⇑CategoryTheory.Limits.prod.snd) Y.str


theorem min_erase_ne_self {s : Finset α} : (s.erase x).min ≠ x

{α : Type u_2}
[LinearOrder α]
{x : α}
{s : Finset α}


theorem condIndepSets_of_condIndepSets_of_le_right {s₁ s₂ s₃ : Set (Set Ω)}
    (h_indep : CondIndepSets m' hm' s₁ s₂ μ) (h32 : s₃ ⊆ s₂) :
    CondIndepSets m' hm' s₁ s₃ μ

(h_indep : ProbabilityTheory.CondIndepSets m' hm' s₁ s₂ μ)

ProbabilityTheory.CondIndepSets m' hm' s₁ s₃ μ


@[to_additive]
lemma iIndepFun.indepFun_mul_left (hf_indep : iIndepFun (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (f i * f j) (f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iIndepFun (fun x => m) f μ)

ProbabilityTheory.IndepFun (f i * f j) (f k) μ


/-- The typeclass `IsLocalization (M : Submonoid R) S` where `S` is an `R`-algebra
expresses that `S` is isomorphic to the localization of `R` at `M`. -/
@[mk_iff] class IsLocalization : Prop where
  -- Porting note: add ' to fields, and made new versions of these with either `S` or `M` explicit.
  /-- Everything in the image of `algebraMap` is a unit -/
  map_units' : ∀ y : M, IsUnit (algebraMap R S y)
  /-- The `algebraMap` is surjective -/
  surj' : ∀ z : S, ∃ x : R × M, z * algebraMap R S x.2 = algebraMap R S x.1
  /-- The kernel of `algebraMap` is contained in the annihilator of `M`;
      it is then equal to the annihilator by `map_units'` -/
  exists_of_eq : ∀ {x y}, algebraMap R S x = algebraMap R S y → ∃ c : M, ↑c * x = ↑c * y

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[self : IsLocalization M S]
(z : S)

∃ x, z * (algebraMap R S) ↑x.2 = (algebraMap R S) x.1


lemma UniformConcaveOn.sub (hf : UniformConcaveOn s φ f) (hg : UniformConvexOn s ψ g) :
    UniformConcaveOn s (φ + ψ) (f - g)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{φ ψ : ℝ → ℝ}
{s : Set E}
{f g : E → ℝ}
(hf : UniformConcaveOn s φ f)
(hg : UniformConvexOn s ψ g)


/-- The "clifford algebra" functor, sending a quadratic `R`-module `V` to the clifford algebra on
`V`.

This is `CliffordAlgebra.map` through the lens of category theory. -/
@[simps]
def QuadraticModuleCat.cliffordAlgebra : QuadraticModuleCat.{u} R ⥤ AlgebraCat.{u} R

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

↑(QuadraticModuleCat.cliffordAlgebra.obj M) = CliffordAlgebra M.form


/-- A ring is algebraic over the ring `A` iff it is algebraic over the field of fractions of `A`.
-/
theorem comap_isAlgebraic_iff [Algebra A C] [Algebra K C] [IsScalarTower A K C] :
    Algebra.IsAlgebraic A C ↔ Algebra.IsAlgebraic K C

{A : Type u_4}
{K : Type u_5}
{C : Type u_6}
[CommRing A]
[IsDomain A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[CommRing C]
[Algebra A C]
[Algebra K C]
[IsScalarTower A K C]


@[simp]
theorem coeff_monomial_same (n : ℕ) (a : R) : coeff R n (monomial R n a) = a

{R : Type u_1}
[Semiring R]
(n : ℕ)
(a : R)

(PowerSeries.coeff R n) ((PowerSeries.monomial R n) a) = a


theorem hausdorffMeasure_homothety_preimage {d : ℝ} (hd : 0 ≤ d) (x : P) {c : 𝕜} (hc : c ≠ 0)
    (s : Set P) : μH[d] (AffineMap.homothety x c ⁻¹' s) = ‖c‖₊⁻¹ ^ d • μH[d] s

{𝕜 : Type u_4}
{E : Type u_5}
{P : Type u_6}
[NormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MeasurableSpace P]
[MetricSpace P]
[NormedAddTorsor E P]
[BorelSpace P]
{d : ℝ}
(hd : 0 ≤ d)
(x : P)
{c : 𝕜}
(hc : c ≠ 0)
(s : Set P)

μH[d] (⇑(AffineMap.homothety x c) ⁻¹' s) = ‖c‖₊⁻¹ ^ d • μH[d] s


theorem _root_.CompactExhaustion.hasAntitoneBasis_compactConvergenceUniformity
    {V : ℕ → Set (β × β)} (K : CompactExhaustion α) (hb : (𝓤 β).HasAntitoneBasis V) :
    HasAntitoneBasis (𝓤 C(α, β)) fun n ↦ {fg | ∀ x ∈ K n, (fg.1 x, fg.2 x) ∈ V n}

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
{V : ℕ → Set (β × β)}
(K : CompactExhaustion α)
(hb : (𝓤 β).HasAntitoneBasis V)

(𝓤 C(α, β)).HasAntitoneBasis fun n => {fg | ∀ x ∈ K n, (fg.1 x, fg.2 x) ∈ V n}


@[simp] theorem length_nil : length ([] : List α) = 0


theorem dist_eq_re_im (z w : ℂ) : dist z w = √((z.re - w.re) ^ 2 + (z.im - w.im) ^ 2)


@[simp]
theorem map_id (z : S) (h : M ≤ M.comap (RingHom.id R) := le_refl M) :
    map S (RingHom.id _) h z = z

(h : M ≤ Submonoid.comap (RingHom.id R) M := ⋯)

(IsLocalization.map S (RingHom.id R) h) z = z


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

￢a ≤ b ↔ ￢b ≤ a


@[to_additive (attr := norm_cast)] -- Porting note (#10618): removed `simp`, `simp` can prove it
theorem coe_multiset_prod {M} [CommMonoid M] (S : Submonoid M) (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod

{M : Type u_4}
[AddCommMonoid M]
(S : AddSubmonoid M)
(m : Multiset ↥S)

↑m.sum = (Multiset.map Subtype.val m).sum


@[to_additive (attr := simp)]
theorem div_eq_empty : s / t = ∅ ↔ s = ∅ ∨ t = ∅


@[to_additive]
lemma iCondIndepFun.indepFun_mul_mul (hf_indep : iCondIndepFun m' hm' (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    CondIndepFun m' hm' (f i * f j) (f k * f l) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (f i + f j) (f k + f l) μ


/-- For a based functor `F : 𝒳 ⟶ 𝒴`, and an arrow `φ` in `𝒳`, then `φ` lifts an arrow `f` in `𝒮`
if `F(φ)` does. -/
lemma isHomLift_map [IsHomLift 𝒴.p f (F.map φ)] : IsHomLift 𝒳.p f φ

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
{𝒳 : CategoryTheory.BasedCategory 𝒮}
{𝒴 : CategoryTheory.BasedCategory 𝒮}
(F : CategoryTheory.BasedFunctor 𝒳 𝒴)
{R S : 𝒮}
{a b : 𝒳.obj}
(f : R ⟶ S)
(φ : a ⟶ b)
[𝒴.p.IsHomLift f (F.map φ)]


theorem Algebra.IsAlgebraic.of_injective (f : A →ₐ[R] B) (hf : Function.Injective f)
    [Algebra.IsAlgebraic R B] : Algebra.IsAlgebraic R A

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{B : Type u_2}
[Ring B]
[Algebra R B]
(f : A →ₐ[R] B)
(hf : Function.Injective ⇑f)
[Algebra.IsAlgebraic R B]


theorem order_C {r : R} : order (C r : HahnSeries Γ R) = 0

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonAssocSemiring R]
{r : R}


@[simp]
theorem eval₂_at_intCast {S : Type*} [Ring S] (f : R →+* S) (n : ℤ) :
    p.eval₂ f n = f (p.eval n)

{R : Type u}
[Ring R]
{p : R[X]}
{S : Type u_1}
[Ring S]
(f : R →+* S)
(n : ℤ)

Polynomial.eval₂ f (↑n) p = f (Polynomial.eval (↑n) p)


/-- **Doob's upcrossing estimate**: given a real valued discrete submartingale `f` and real
values `a` and `b`, we have `(b - a) * 𝔼[upcrossingsBefore a b f N] ≤ 𝔼[(f N - a)⁺]` where
`upcrossingsBefore a b f N` is the number of times the process `f` crossed from below `a` to above
`b` before the time `N`. -/
theorem Submartingale.mul_integral_upcrossingsBefore_le_integral_pos_part [IsFiniteMeasure μ]
    (a b : ℝ) (hf : Submartingale f ℱ μ) (N : ℕ) :
    (b - a) * μ[upcrossingsBefore a b f N] ≤ μ[fun ω => (f N ω - a)⁺]

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(b - a) * ∫ (x : Ω), ↑(MeasureTheory.upcrossingsBefore a b f N x) ∂μ ≤ ∫ (x : Ω), (fun ω => (f N ω - a)⁺) x ∂μ


theorem op_eq_iff_eq_unop {x : α} {y} : op x = y ↔ x = unop y


@[simp]
theorem bind_comp {S : Presieve X} {R : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, S f → Presieve Y} {g : Z ⟶ Y}
    (h₁ : S f) (h₂ : R h₁ g) : bind S R (g ≫ f)

{R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → CategoryTheory.Presieve Y}

S.bind R (CategoryTheory.CategoryStruct.comp g f)


/-- If a function is `C^n` with `1 ≤ n` around a point, and its derivative at that point is given to
us as `f'`, then `f'` is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt' {f : 𝕂 → F'} {f' : F'} {x : 𝕂} (hf : ContDiffAt 𝕂 n f x)
    (hf' : HasDerivAt f f' x) (hn : 1 ≤ n) : HasStrictDerivAt f f' x

{n : ℕ∞}
{𝕂 : Type u_1}
[RCLike 𝕂]
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace 𝕂 F']
{f : 𝕂 → F'}
{f' : F'}
{x : 𝕂}
(hf : ContDiffAt 𝕂 n f x)
(hf' : HasDerivAt f f' x)
(hn : 1 ≤ n)


@[simp]
theorem inf_apply (p q : Seminorm 𝕜 E) (x : E) : (p ⊓ q) x = ⨅ u : E, p u + q (x - u)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p q : Seminorm 𝕜 E)
(x : E)


@[to_additive (attr := simp) tendsto_norm_atTop_iff_cobounded]
lemma tendsto_norm_atTop_iff_cobounded' {f : α → E} {l : Filter α} :
    Tendsto (‖f ·‖) l atTop ↔ Tendsto f l (cobounded E)

{α : Type u_1}
{E : Type u_3}
[SeminormedGroup E]
{f : α → E}
{l : Filter α}

Filter.Tendsto (fun x => ‖f x‖) l Filter.atTop ↔ Filter.Tendsto f l (Bornology.cobounded E)


@[to_additive]
theorem locallyFinite_mulSupport_iff [CommMonoid M] {f : ι → X → M} :
    (LocallyFinite fun i ↦ mulSupport <| f i) ↔ LocallyFinite fun i ↦ mulTSupport <| f i

{X : Type u_1}
{M : Type u_7}
{ι : Type u_10}
[TopologicalSpace X]
[CommMonoid M]
{f : ι → X → M}

(LocallyFinite fun i => Function.mulSupport (f i)) ↔ LocallyFinite fun i => mulTSupport (f i)


theorem StrictMono.apply_eq_top_iff (hf : StrictMono f) : f a = f ⊤ ↔ a = ⊤

{α : Type u}
{β : Type v}
[PartialOrder α]
[OrderTop α]
[Preorder β]
{f : α → β}
{a : α}
(hf : StrictMono f)


theorem tendsto_floor_right_pure_floor (x : α) : Tendsto (floor : α → ℤ) (𝓝[≥] x) (pure ⌊x⌋)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
(x : α)

Filter.Tendsto Int.floor (𝓝[≥] x) (pure ⌊x⌋)


theorem Basis.mk_eq_rank'.{m} (v : Basis ι R M) :
    Cardinal.lift.{max v m} #ι = Cardinal.lift.{max w m} (Module.rank R M)

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type w}
[StrongRankCondition R]
(v : Basis ι R M)

Cardinal.lift.{max v m, w} #ι = Cardinal.lift.{max w m, v} (Module.rank R M)


@[reassoc (attr := simp)]
theorem LaxMonoidalFunctor.left_unitality_inv (F : LaxMonoidalFunctor C D) (X : C) :
    (λ_ (F.obj X)).inv ≫ F.ε ▷ F.obj X ≫ F.μ (𝟙_ C) X = F.map (λ_ X).inv

(F : CategoryTheory.LaxMonoidalFunctor C D)

(CategoryTheory.MonoidalCategory.leftUnitor (F.obj X)).inv ≫
    CategoryTheory.MonoidalCategory.whiskerRight F.ε (F.obj X) ≫ F.μ (𝟙_ C) X =
  F.map (CategoryTheory.MonoidalCategory.leftUnitor X).inv


@[to_additive (attr := simp) const_nonneg]
theorem one_le_const : 1 ≤ const β a ↔ 1 ≤ a

{α : Type u_3}
{β : Type u_4}
[One α]
[Preorder α]
{a : α}
[Nonempty β]


theorem starConvex_iUnion {ι : Sort*} {s : ι → Set E} (hs : ∀ i, StarConvex 𝕜 x (s i)) :
    StarConvex 𝕜 x (⋃ i, s i)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{x : E}
{ι : Sort u_4}
{s : ι → Set E}
(hs : ∀ (i : ι), StarConvex 𝕜 x (s i))


/-- Over any ring `R`, if `b` is a basis for a module `M`,
and `s` is a maximal linearly independent set,
then the union of the supports of `x ∈ s` (when written out in the basis `b`) is all of `b`.
-/
theorem union_support_maximal_linearIndependent_eq_range_basis {ι : Type w} (b : Basis ι R M)
    {κ : Type w'} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) :
    ⋃ k, ((b.repr (v k)).support : Set ι) = Set.univ

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Nontrivial R]
[Module R M]
{ι : Type w}
(b : Basis ι R M)
{κ : Type w'}
(v : κ → M)
(i : LinearIndependent R v)
(m : i.Maximal)


@[simp]
theorem coe_toMulHom : ⇑abv.toMulHom = abv

{R : Type u_5}
{S : Type u_6}
[Semiring R]
[OrderedSemiring S]
(abv : AbsoluteValue R S)


theorem MulAction.smul_bijective_of_is_unit
    {M : Type*} [Monoid M] {α : Type*} [MulAction M α] {m : M} (hm : IsUnit m) :
    Function.Bijective (fun (a : α) ↦ m • a)

{M : Type u_1}
[Monoid M]
{α : Type u_2}
[MulAction M α]
{m : M}
(hm : IsUnit m)


/-- A type `G₀` is a “group with zero” if it is a monoid with zero element (distinct from `1`)
such that every nonzero element is invertible.
The type is required to come with an “inverse” function, and the inverse of `0` must be `0`.

Examples include division rings and the ordered monoids that are the
target of valuations in general valuation theory. -/
class GroupWithZero (G₀ : Type u) extends MonoidWithZero G₀, DivInvMonoid G₀, Nontrivial G₀ where
  /-- The inverse of `0` in a group with zero is `0`. -/
  inv_zero : (0 : G₀)⁻¹ = 0
  /-- Every nonzero element of a group with zero is invertible. -/
  protected mul_inv_cancel (a : G₀) : a ≠ 0 → a * a⁻¹ = 1

{G₀ : Type u}
[self : GroupWithZero G₀]
(a : G₀)


@[simp]
theorem LieIdeal.coe_to_lieSubalgebra_to_submodule (I : LieIdeal R L) :
    ((I : LieSubalgebra R L) : Submodule R L) = LieSubmodule.toSubmodule I

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)

(lieIdealSubalgebra R L I).toSubmodule = ↑I


@[to_additive]
protected lemma mul_eq_mul_of_div_eq_div (hb : IsUnit b) (hd : IsUnit d)
    (a c : α) (h : a / b = c / d) : a * d = c * b

{α : Type u}
[DivisionCommMonoid α]
{b d : α}
(hb : IsUnit b)
(hd : IsUnit d)
(a c : α)
(h : a / b = c / d)


@[simp]
theorem filter_add (s t : Multiset α) : filter p (s + t) = filter p s + filter p t

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

Multiset.filter p (s + t) = Multiset.filter p s + Multiset.filter p t


theorem ContDiffOn.norm (hf : ContDiffOn ℝ n f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
    ContDiffOn ℝ n (fun y => ‖f y‖) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{s : Set G}
{n : ℕ∞}
(hf : ContDiffOn ℝ n f s)
(h0 : ∀ x ∈ s, f x ≠ 0)


theorem cauchySeq_of_summable_dist (h : Summable fun n ↦ dist (f n) (f n.succ)) : CauchySeq f

(h : Summable fun n => dist (f n) (f n.succ))


theorem Path.cast_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (p : Path u v) :
    HEq (p.cast hu hv) p

{U : Type u_1}
[Quiver U]
{u v u' v' : U}
(hu : u = u')
(hv : v = v')
(p : Quiver.Path u v)


theorem mem_decode₂' [Encodable α] {n : ℕ} {a : α} :
    a ∈ decode₂ α n ↔ a ∈ decode n ∧ encode a = n

{α : Type u_1}
[Encodable α]
{n : ℕ}
{a : α}

a ∈ Encodable.decode₂ α n ↔ a ∈ Encodable.decode n ∧ Encodable.encode a = n


theorem nrComplexPlaces_eq_zero_of_finrank_eq_one (h : finrank ℚ K = 1) :
    NrComplexPlaces K = 0

{K : Type u_2}
[Field K]
[NumberField K]
(h : FiniteDimensional.finrank ℚ K = 1)

NumberField.InfinitePlace.NrComplexPlaces K = 0


theorem smul_map_inv_sub_map_inv_of_isTwoCocycle {f : G × G → A} (hf : IsTwoCocycle f) (g : G) :
    g • f (g⁻¹, g) - f (g, g⁻¹) = f (1, 1) - f (g, 1)

{G : Type u_1}
{A : Type u_2}
[Group G]
[AddCommGroup A]
[MulAction G A]
{f : G × G → A}
(hf : groupCohomology.IsTwoCocycle f)
(g : G)


theorem infs_left_comm : s ⊼ (t ⊼ u) = t ⊼ (s ⊼ u)

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


theorem cast_zpow_of_ne_zero {K} [DivisionSemiring K] (q : ℚ≥0) (z : ℤ) (hq : (q.num : K) ≠ 0) :
    NNRat.cast (q ^ z) = (NNRat.cast q : K) ^ z

{K : Type u_1}
[DivisionSemiring K]
(q : ℚ≥0)
(z : ℤ)
(hq : ↑q.num ≠ 0)


@[simp, mfld_simps]
theorem restr_coe (s : Set α) : (e.restr s : α → β) = e

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)
(s : Set α)


theorem getElem?_mem {l : List α} {n : Nat} {a : α} (e : l[n]? = some a) : a ∈ l

{α : Type u_1}
{l : List α}
{n : Nat}
{a : α}
(e : l[n]? = some a)


@[simp]
theorem mem_comap {A : ValuationSubring L} {f : K →+* L} {x : K} : x ∈ A.comap f ↔ f x ∈ A

{K : Type u}
[Field K]
{L : Type u_1}
[Field L]
{A : ValuationSubring L}
{f : K →+* L}
{x : K}


@[simp]
theorem coeFn_smul (c : 𝕜) (f : lp E p) : ⇑(c • f) = c • ⇑f

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{𝕜 : Type u_3}
[NormedRing 𝕜]
[(i : α) → Module 𝕜 (E i)]
[∀ (i : α), BoundedSMul 𝕜 (E i)]
(c : 𝕜)
(f : ↥(lp E p))


@[simp, nolint simpNF]
protected lemma neg_nonneg : 0 ≤ -a ↔ a ≤ 0


/-- The set of natural number powers of an element of a monoid `M` is a submonoid of `M`. -/
@[to_additive
      "The set of natural number multiples of an element of an `AddMonoid` `M` is
      an `AddSubmonoid` of `M`."]
theorem powers.isSubmonoid (x : M) : IsSubmonoid (powers x)


@[simp]
theorem iUnion_coe_set {α β : Type*} (s : Set α) (f : s → Set β) :
    ⋃ i, f i = ⋃ i ∈ s, f ⟨i, ‹i ∈ s›⟩

{α : Type u_11}
{β : Type u_12}
(s : Set α)
(f : ↑s → Set β)


@[simp]
theorem monotone_map_iff {f : α → β} : Monotone (WithBot.map f) ↔ Monotone f

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


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

(S : CategoryTheory.ShortComplex.SnakeInput C)

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


@[simp] theorem apply_le_one (μ : ProbabilityMeasure Ω) (s : Set Ω) : μ s ≤ 1

(μ : MeasureTheory.ProbabilityMeasure Ω)


theorem limsup_ae_eq_of_forall_ae_eq (s : ℕ → Set α) {t : Set α}
    (h : ∀ n, s n =ᵐ[μ] t) : limsup (α := Set α) s atTop =ᵐ[μ] t

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : ℕ → Set α)
{t : Set α}
(h : ∀ (n : ℕ), s n =ᵐ[μ] t)


/--
As `0` is the default value for `Real.sSup` of the empty set or sets which are not bounded above, it
suffices to show that `S` is bounded below by `0` to show that `0 ≤ sSup S`.
-/
theorem sSup_nonneg (S : Set ℝ) (hS : ∀ x ∈ S, (0 : ℝ) ≤ x) : 0 ≤ sSup S


private lemma lambda_not_dvd_Z : ¬ λ ∣ S.Z

(S : FermatLastTheoremForThreeGen.Solution hζ)

¬hζ.toInteger - 1 ∣ FermatLastTheoremForThreeGen.Solution.Z S


/-- **Integration by parts on (-∞, ∞).**
With respect to a general bilinear form, assuming moreover that the total function is integrable.
-/
theorem integral_bilinear_hasDerivAt_right_eq_neg_left_of_integrable
    (hu : ∀ x, HasDerivAt u (u' x) x) (hv : ∀ x, HasDerivAt v (v' x) x)
    (huv' : Integrable (fun x ↦ L (u x) (v' x))) (hu'v : Integrable (fun x ↦ L (u' x) (v x)))
    (huv : Integrable (fun x ↦ L (u x) (v x))) :
    ∫ (x : ℝ), L (u x) (v' x) = - ∫ (x : ℝ), L (u' x) (v x)

(huv' : MeasureTheory.Integrable (fun x => (L (u x)) (v' x)) MeasureTheory.volume)

(hu'v : MeasureTheory.Integrable (fun x => (L (u' x)) (v x)) MeasureTheory.volume)

(huv : MeasureTheory.Integrable (fun x => (L (u x)) (v x)) MeasureTheory.volume)


theorem edist_eq_card (f g : PiLp 0 β) :
    edist f g = {i | edist (f i) (g i) ≠ 0}.toFinite.toFinset.card

{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → EDist (β i)]
(f g : PiLp 0 β)


theorem norm_cderiv_lt (hr : 0 < r) (hfM : ∀ w ∈ sphere z r, ‖f w‖ < M)
    (hf : ContinuousOn f (sphere z r)) : ‖cderiv r f z‖ < M / r

(hfM : ∀ w ∈ Metric.sphere z r, ‖f w‖ < M)

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


theorem zipWith_eq_zipWith_data (f : α → β → γ) (as : Array α) (bs : Array β) :
    (as.zipWith bs f).data = as.data.zipWith f bs.data

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(as : Array α)
(bs : Array β)

(as.zipWith bs f).data = List.zipWith f as.data bs.data


theorem IsExtrFilter.comp_tendsto {g : δ → α} {l' : Filter δ} {b : δ} (hf : IsExtrFilter f l (g b))
    (hg : Tendsto g l' l) : IsExtrFilter (f ∘ g) l' b

{α : Type u}
{β : Type v}
{δ : Type x}
[Preorder β]
{f : α → β}
{l : Filter α}
{g : δ → α}
{l' : Filter δ}
{b : δ}
(hf : IsExtrFilter f l (g b))
(hg : Filter.Tendsto g l' l)


@[to_additive (attr := simp)]
theorem mulLeft_symm [IsometricSMul G G] (x : G) :
    (mulLeft x).symm = IsometryEquiv.mulLeft x⁻¹

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

(IsometryEquiv.mulLeft x).symm = IsometryEquiv.mulLeft x⁻¹


protected theorem mdifferentiableWithinAt : MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x

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

MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') (⇑f) s x


/-- Two equivalent partial equivs are equal when the source and target are `univ`. -/
theorem eq_of_eqOnSource_univ (e e' : PartialEquiv α β) (h : e ≈ e') (s : e.source = univ)
    (t : e.target = univ) : e = e'

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
(h : e ≈ e')
(s : e.source = Set.univ)
(t : e.target = Set.univ)


theorem ker_quotient_lift {I : Ideal R} (f : R →+* S)
    (H : I ≤ ker f) :
    ker (Ideal.Quotient.lift I f H) = f.ker.map (Quotient.mk I)

{R : Type u}
{S : Type v}
[CommRing R]
[Semiring S]
{I : Ideal R}
(f : R →+* S)
(H : I ≤ RingHom.ker f)

RingHom.ker (Ideal.Quotient.lift I f H) = Ideal.map (Ideal.Quotient.mk I) (RingHom.ker f)


theorem sub_add {X Y : C} (a b c : X ⟶ Y) : a - b + c = a - (b - c)


/-- Functional equation for the odd Hurwitz zeta function (alternative form). -/
lemma completedSinZeta_one_sub (a : UnitAddCircle) (s : ℂ) :
    completedSinZeta a (1 - s) = completedHurwitzZetaOdd a s

HurwitzZeta.completedSinZeta a (1 - s) = HurwitzZeta.completedHurwitzZetaOdd a s


protected theorem TFAE (R : Type u) [CommRing R] [IsDomain R] :
    List.TFAE
      [ValuationRing R,
        ∀ x : FractionRing R, IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
        IsTotal R (· ∣ ·), IsTotal (Ideal R) (· ≤ ·), LocalRing R ∧ IsBezout R]

[ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
    IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R].TFAE


@[reassoc]
lemma rightHomologyι_descOpcycles_π_eq_zero_of_boundary (x : S.X₃ ⟶ A) (hx : k = S.g ≫ x) :
    S.rightHomologyι ≫ S.descOpcycles k (by rw [hx, S.zero_assoc, zero_comp]) = 0

(hx : k = CategoryTheory.CategoryStruct.comp S.g x)

CategoryTheory.CategoryStruct.comp S.rightHomologyι (S.descOpcycles k ⋯) = 0


protected theorem IsSuffix.sublist (h : l₁ <:+ l₂) : l₁ <+ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <:+ l₂ → l₁ <+ l₂


/-- The multiplicative shear mapping `(x, y) ↦ (x, xy)` preserves the measure `μ × ν`.
This condition is part of the definition of a measurable group in [Halmos, §59].
There, the map in this lemma is called `S`. -/
@[to_additive measurePreserving_prod_add
" The shear mapping `(x, y) ↦ (x, x + y)` preserves the measure `μ × ν`. "]
theorem measurePreserving_prod_mul [IsMulLeftInvariant ν] :
    MeasurePreserving (fun z : G × G => (z.1, z.1 * z.2)) (μ.prod ν) (μ.prod ν)

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[ν.IsMulLeftInvariant]

MeasureTheory.MeasurePreserving (fun z => (z.1, z.1 * z.2)) (μ.prod ν) (μ.prod ν)


theorem exists_subset_image_finite_and {f : α → β} {s : Set α} {p : Set β → Prop} :
    (∃ t ⊆ f '' s, t.Finite ∧ p t) ↔ ∃ t ⊆ s, t.Finite ∧ p (f '' t)

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


lemma coe_evalEvalRingHom (x y : R) : evalEvalRingHom x y = evalEval x y

{R : Type u_1}
[CommSemiring R]
(x y : R)

⇑(Polynomial.evalEvalRingHom x y) = Polynomial.evalEval x y


protected theorem coe_one : ((1 : S) : L) = 1

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


lemma IsRatStieltjesPoint.ite {f g : α → ℚ → ℝ} {a : α} (p : α → Prop) [DecidablePred p]
    (hf : p a → IsRatStieltjesPoint f a) (hg : ¬ p a → IsRatStieltjesPoint g a) :
    IsRatStieltjesPoint (fun a ↦ if p a then f a else g a) a

{f g : α → ℚ → ℝ}

(hf : p a → ProbabilityTheory.IsRatStieltjesPoint f a)

(hg : ¬p a → ProbabilityTheory.IsRatStieltjesPoint g a)

ProbabilityTheory.IsRatStieltjesPoint (fun a => if p a then f a else g a) a


theorem min_eq_right {a b : α} (h : b ≤ a) : min a b = b

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


@[simp]
theorem coe_equivMapOfInjective_apply (f : F) (hf : Function.Injective f) (x : s) :
    (equivMapOfInjective s f hf x : S) = f x

{F : Type w}
{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(s : NonUnitalSubring R)
(f : F)
(hf : Function.Injective ⇑f)
(x : ↥s)

↑((s.equivMapOfInjective f hf) x) = f ↑x


@[simp]
lemma shiftMap_zero (X Y : C) (n a a' : M) (ha' : n + a = a') :
    F.shiftMap (0 : X ⟶ Y⟦n⟧) a a' ha' = 0

[∀ (n : M), (CategoryTheory.shiftFunctor C n).PreservesZeroMorphisms]


theorem isOpen_iff (U : Set (ProjectiveSpectrum 𝒜)) : IsOpen U ↔ ∃ s, Uᶜ = zeroLocus 𝒜 s

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

IsOpen U ↔ ∃ s, Uᶜ = ProjectiveSpectrum.zeroLocus 𝒜 s


theorem IsCycleOn.apply_mem_iff (hf : f.IsCycleOn s) : f x ∈ s ↔ x ∈ s

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
{x : α}
(hf : f.IsCycleOn s)


@[measurability]
theorem AEMeasurable.im (hf : AEMeasurable f μ) : AEMeasurable (fun x => RCLike.im (f x)) μ

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


@[to_additive]
theorem inter_mul_union_subset_union : s₁ ∩ s₂ * (t₁ ∪ t₂) ⊆ s₁ * t₁ ∪ s₂ * t₂

{α : Type u_2}
[DecidableEq α]
[Add α]
{s₁ s₂ t₁ t₂ : Finset α}

s₁ ∩ s₂ + (t₁ ∪ t₂) ⊆ s₁ + t₁ ∪ (s₂ + t₂)


theorem one_dotProduct (v : n → α) : 1 ⬝ᵥ v = ∑ i, v i

{n : Type u_3}
{α : Type v}
[Fintype n]
[MulOneClass α]
[AddCommMonoid α]
(v : n → α)


theorem lintegral_eq_measure_univ {X : Ω → E} [HasPDF X ℙ μ] :
    ∫⁻ x, pdf X ℙ μ x ∂μ = ℙ Set.univ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]
{m : MeasurableSpace Ω}
{ℙ : MeasureTheory.Measure Ω}
{μ : MeasureTheory.Measure E}
{X : Ω → E}
[MeasureTheory.HasPDF X ℙ μ]

∫⁻ (x : E), MeasureTheory.pdf X ℙ μ x ∂μ = ℙ Set.univ


lemma densityProcess_fst_univ_ae (κ : Kernel α (γ × β)) [IsFiniteKernel κ] (n : ℕ) (a : α) :
    ∀ᵐ x ∂(fst κ a), densityProcess κ (fst κ) n a x univ = 1

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

∀ᵐ (x : γ) ∂κ.fst a, κ.densityProcess κ.fst n a x Set.univ = 1


/-- If `s` is not in `-ℕ`, then `sinZeta a (1 - s)` is an explicit multiple of
`hurwitzZetaOdd s`. -/
lemma sinZeta_one_sub (a : UnitAddCircle) {s : ℂ} (hs : ∀ (n : ℕ), s ≠ -n) :
    sinZeta a (1 - s) = 2 * (2 * π) ^ (-s) * Gamma s * sin (π * s / 2) * hurwitzZetaOdd a s

(a : UnitAddCircle)
{s : ℂ}
(hs : ∀ (n : ℕ), s ≠ -↑n)

HurwitzZeta.sinZeta a (1 - s) =
  2 * (2 * ↑π) ^ (-s) * Complex.Gamma s * Complex.sin (↑π * s / 2) * HurwitzZeta.hurwitzZetaOdd a s


theorem infs_inter_subset_left : (s₁ ∩ s₂) ⊼ t ⊆ s₁ ⊼ t ∩ s₂ ⊼ t

{α : Type u_2}
[SemilatticeInf α]
{s₁ s₂ t : Set α}

(s₁ ∩ s₂) ⊼ t ⊆ s₁ ⊼ t ∩ s₂ ⊼ t


lemma variableChange_comp (C C' : VariableChange R) (W : WeierstrassCurve R) :
    W.variableChange (C.comp C') = (W.variableChange C').variableChange C

(C C' : WeierstrassCurve.VariableChange R)


@[to_additive]
theorem prod_induction_nonempty (p : α → Prop) (p_mul : ∀ a b, p a → p b → p (a * b)) (hs : s ≠ ∅)
    (p_s : ∀ a ∈ s, p a) : p s.prod

(p_mul : ∀ (a b : α), p a → p b → p (a * b))


theorem ofDual_le_iff {a : WithTop αᵒᵈ} {b : WithBot α} :
    WithTop.ofDual a ≤ b ↔ WithBot.toDual b ≤ a

{α : Type u_1}
[LE α]
{a : WithTop αᵒᵈ}
{b : WithBot α}


@[simp] theorem neg_zero (n:Nat) : -BitVec.ofNat n 0 = BitVec.ofNat n 0


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

SemilatInfCat.dual.obj X = SemilatSupCat.of X.Xᵒᵈ


/-- The counit isomorphism of the equivalence `equivalence₁` between `A` and `B'`. -/
@[simps!]
def equivalence₁CounitIso : (e'.inverse ⋙ eA.inverse) ⋙ F ≅ 𝟭 B'

{A : Type u_1}
{A' : Type u_2}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_4} B']
{eA : A ≌ A'}
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)
(X : B')

(AlgebraicTopology.DoldKan.Compatibility.equivalence₁CounitIso hF).inv.app X =
  e'.counitIso.inv.app X ≫
    e'.functor.map (eA.counitIso.inv.app (e'.inverse.obj X)) ≫ hF.hom.app (eA.inverse.obj (e'.inverse.obj X))


lemma proj_comp_transitionMapLE' {n m : ℕ} (h : n ≤ m) :
    S.transitionMapLE h ∘ S.proj m  = S.proj n

(S : LightProfinite)
{n m : ℕ}
(h : n ≤ m)

⇑(S.transitionMapLE h) ∘ ⇑(S.proj m) = ⇑(S.proj n)


@[simp]
theorem localizationToStalk_mk' (x : PrimeSpectrum.Top R) (f : R) (s : x.asIdeal.primeCompl) :
    localizationToStalk R x (IsLocalization.mk' (Localization.AtPrime x.asIdeal) f s) =
      (structureSheaf R).presheaf.germ (⟨x, s.2⟩ : PrimeSpectrum.basicOpen (s : R))
        (const R f s (PrimeSpectrum.basicOpen s) fun _ => id)

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(AlgebraicGeometry.StructureSheaf.localizationToStalk R x) (IsLocalization.mk' (Localization.AtPrime x.asIdeal) f s) =
  ((AlgebraicGeometry.Spec.structureSheaf R).presheaf.germ ⟨x, ⋯⟩)
    (AlgebraicGeometry.StructureSheaf.const R f (↑s) (PrimeSpectrum.basicOpen ↑s) ⋯)


/-- A non-unital seminormed ring is a not-necessarily-unital ring
endowed with a seminorm which satisfies the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NonUnitalSeminormedRing (α : Type*) extends Norm α, NonUnitalRing α,
  PseudoMetricSpace α where
  /-- The distance is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = norm (x - y)
  /-- The norm is submultiplicative. -/
  norm_mul : ∀ a b, norm (a * b) ≤ norm a * norm b

{α : Type u_5}
[self : NonUnitalSeminormedRing α]
(a b : α)

‖a * b‖ ≤ ‖a‖ * ‖b‖


protected theorem _root_.IsCompact.cthickening
    {α : Type*} [PseudoMetricSpace α] [ProperSpace α] {s : Set α}
    (hs : IsCompact s) {r : ℝ} : IsCompact (cthickening r s)

{α : Type u_2}
[PseudoMetricSpace α]
[ProperSpace α]
{s : Set α}
(hs : IsCompact s)
{r : ℝ}


lemma coeff_minpolyDiv_mem_adjoin (x : S) (i) :
    coeff (minpolyDiv R x) i ∈ Algebra.adjoin R {x}

{R : Type u_2}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
(x : S)
(i : ℕ)

(minpolyDiv R x).coeff i ∈ Algebra.adjoin R {x}


theorem replicate_add (m n : ℕ) (a : α) : replicate (m + n) a = replicate m a + replicate n a

Multiset.replicate (m + n) a = Multiset.replicate m a + Multiset.replicate n a


/-- Core data defining a locally trivial bundle with fiber `F` over a topological
space `B`. Note that "bundle" is used in its mathematical sense. This is the (computer science)
bundled version, i.e., all the relevant data is contained in the following structure. A family of
local trivializations is indexed by a type `ι`, on open subsets `baseSet i` for each `i : ι`.
Trivialization changes from `i` to `j` are given by continuous maps `coordChange i j` from
`baseSet i ∩ baseSet j` to the set of homeomorphisms of `F`, but we express them as maps
`B → F → F` and require continuity on `(baseSet i ∩ baseSet j) × F` to avoid the topology on the
space of continuous maps on `F`. -/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
structure FiberBundleCore (ι : Type*) (B : Type*) [TopologicalSpace B] (F : Type*)
    [TopologicalSpace F] where
  baseSet : ι → Set B
  isOpen_baseSet : ∀ i, IsOpen (baseSet i)
  indexAt : B → ι
  mem_baseSet_at : ∀ x, x ∈ baseSet (indexAt x)
  coordChange : ι → ι → B → F → F
  coordChange_self : ∀ i, ∀ x ∈ baseSet i, ∀ v, coordChange i i x v = v
  continuousOn_coordChange : ∀ i j,
    ContinuousOn (fun p : B × F => coordChange i j p.1 p.2) ((baseSet i ∩ baseSet j) ×ˢ univ)
  coordChange_comp : ∀ i j k, ∀ x ∈ baseSet i ∩ baseSet j ∩ baseSet k, ∀ v,
    (coordChange j k x) (coordChange i j x v) = coordChange i k x v

{ι : Type u_5}
{B : Type u_6}
[TopologicalSpace B]
{F : Type u_7}
[TopologicalSpace F]
(self : FiberBundleCore ι B F)
(i j : ι)

ContinuousOn (fun p => self.coordChange i j p.1 p.2) ((self.baseSet i ∩ self.baseSet j) ×ˢ Set.univ)


theorem support_C_mul_T_of_ne_zero {a : R} (a0 : a ≠ 0) (n : ℤ) :
    Finsupp.support (C a * T n) = {n}

{R : Type u_1}
[Semiring R]
{a : R}
(a0 : a ≠ 0)
(n : ℤ)

(LaurentPolynomial.C a * LaurentPolynomial.T n).support = {n}


@[to_additive (attr := simp)]
theorem Iic_one : Iic (1 : α) = 1


/-- Given `w : TwoSquare T L R B` and a morphism `g : R.obj X₂ ⟶ B.obj X₃`, this is
the obvious functor `w.CostructuredArrowDownwards g ⥤ w.StructuredArrowRightwards g`. -/
@[simps]
def inverse : w.CostructuredArrowDownwards g ⥤ w.StructuredArrowRightwards g

{C₁ : Type u₁}
{C₂ : Type u₂}
{C₃ : Type u₃}
{C₄ : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C₁]
[CategoryTheory.Category.{v₂, u₂} C₂]
[CategoryTheory.Category.{v₃, u₃} C₃]
[CategoryTheory.Category.{v₄, u₄} C₄]
{T : CategoryTheory.Functor C₁ C₂}
{L : CategoryTheory.Functor C₁ C₃}
{R : CategoryTheory.Functor C₂ C₄}
{B : CategoryTheory.Functor C₃ C₄}
(w : CategoryTheory.TwoSquare T L R B)
{X₂ : C₂}
{X₃ : C₃}
(g : R.obj X₂ ⟶ B.obj X₃)
(f : w.CostructuredArrowDownwards g)

(CategoryTheory.TwoSquare.EquivalenceJ.inverse w g).obj f =
  CategoryTheory.StructuredArrow.mk (CategoryTheory.CostructuredArrow.homMk f.left.hom ⋯)


theorem adjoin_le {S : NonUnitalSubalgebra R A} {s : Set A} (hs : s ⊆ S) : adjoin R s ≤ S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{S : NonUnitalSubalgebra R A}
{s : Set A}
(hs : s ⊆ ↑S)


@[simp]
theorem erase_cons_head [DecidableEq α] (s : Sym α n) (a : α)
    (h : a ∈ a ::ₛ s := mem_cons_self a s) : (a ::ₛ s).erase a h = s

{α : Type u_1}
{n : ℕ}
[DecidableEq α]
(s : Sym α n)
(a : α)
(h : a ∈ a ::ₛ s := ⋯)


@[simp]
theorem subtypeDomain_neg [∀ i, AddGroup (β i)] {p : ι → Prop} [DecidablePred p] {v : Π₀ i, β i} :
    (-v).subtypeDomain p = -v.subtypeDomain p

{ι : Type u}
{β : ι → Type v}
[(i : ι) → AddGroup (β i)]
{p : ι → Prop}
[DecidablePred p]
{v : Π₀ (i : ι), β i}

DFinsupp.subtypeDomain p (-v) = -DFinsupp.subtypeDomain p v


theorem exp_neg_two_mul_le {x : ℝ} (hx : 0 < x) : exp (-2 * x) < exp (2 - ⌈x⌉₊) / ⌈x⌉₊

rexp (-2 * x) < rexp (2 - ↑⌈x⌉₊) / ↑⌈x⌉₊


@[to_additive]
theorem map_le_iff_le_comap {f : G →* N} {K : Subgroup G} {H : Subgroup N} :
    K.map f ≤ H ↔ K ≤ H.comap f

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{K : Subgroup G}
{H : Subgroup N}

Subgroup.map f K ≤ H ↔ K ≤ Subgroup.comap f H


theorem upperCentralSeries.map {H : Type*} [Group H] {f : G →* H} (h : Function.Surjective f)
    (n : ℕ) : Subgroup.map f (upperCentralSeries G n) ≤ upperCentralSeries H n

{G : Type u_1}
[Group G]
{H : Type u_2}
[Group H]
{f : G →* H}
(h : Function.Surjective ⇑f)
(n : ℕ)


@[simp]
theorem spanNorm_eq_bot_iff [IsDomain R] [IsDomain S] [Module.Free R S] [Module.Finite R S]
    {I : Ideal S} : spanNorm R I = ⊥ ↔ I = ⊥

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsDomain R]
[IsDomain S]
[Module.Free R S]
[Module.Finite R S]
{I : Ideal S}


protected theorem Nodup.subperm (d : Nodup l₁) (H : l₁ ⊆ l₂) : l₁ <+~ l₂

{α : Type u_1}
{l₁ l₂ : List α}
(d : l₁.Nodup)
(H : l₁ ⊆ l₂)


@[simp]
theorem mapMatrix_symm (f : α ≃ β) : f.mapMatrix.symm = (f.symm.mapMatrix : Matrix m n β ≃ _)

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
(f : α ≃ β)


lemma restrictScalars_mul {A B C} [CommSemiring A] [CommSemiring B] [Semiring C]
    [Algebra A B] [Algebra A C] [Algebra B C] [IsScalarTower A B C] {I J : Submodule B C} :
  (I * J).restrictScalars A = I.restrictScalars A * J.restrictScalars A

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[CommSemiring A]
[CommSemiring B]
[Semiring C]
[Algebra A B]
[Algebra A C]
[Algebra B C]
[IsScalarTower A B C]
{I J : Submodule B C}

Submodule.restrictScalars A (I * J) = Submodule.restrictScalars A I * Submodule.restrictScalars A J


theorem RingHom.IsIntegral.quotient {I : Ideal S} (hf : f.IsIntegral) :
    (Ideal.quotientMap I f le_rfl).IsIntegral

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
{I : Ideal S}
(hf : f.IsIntegral)


theorem trace_comp_trace_of_basis [Algebra S T] [IsScalarTower R S T] {ι κ : Type*} [Finite ι]
    [Finite κ] (b : Basis ι R S) (c : Basis κ S T) :
    (trace R S).comp ((trace S T).restrictScalars R) = trace R T

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[CommRing T]
[Algebra R S]
[Algebra R T]
[Algebra S T]
[IsScalarTower R S T]
{ι : Type u_4}
{κ : Type u_5}
[Finite ι]
[Finite κ]
(b : Basis ι R S)
(c : Basis κ S T)

Algebra.trace R S ∘ₗ ↑R (Algebra.trace S T) = Algebra.trace R T


@[simp]
theorem zero_ne_cons {a : α} {m : Multiset α} : 0 ≠ a ::ₘ m


/-- A set `s` is preconnected if and only if for every cover by two open sets that are disjoint on
`s`, it is contained in one of the two covering sets. -/
theorem isPreconnected_iff_subset_of_disjoint {s : Set α} :
    IsPreconnected s ↔
      ∀ u v, IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v

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

IsPreconnected s ↔ ∀ (u v : Set α), IsOpen u → IsOpen v → s ⊆ u ∪ v → s ∩ (u ∩ v) = ∅ → s ⊆ u ∨ s ⊆ v


theorem sub_inv_antitoneOn_Iio :
    AntitoneOn (fun x ↦ (x-c)⁻¹) (Set.Iio c)

{α : Type u_2}
[LinearOrderedField α]
{c : α}

AntitoneOn (fun x => (x - c)⁻¹) (Set.Iio c)


lemma ε₂_ε₁ {i₁ i₁' : I₁} {i₂ i₂' : I₂} (h₁ : c₁.Rel i₁ i₁') (h₂ : c₂.Rel i₂ i₂') :
    ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ * ε₁ c₁ c₂ c₁₂ ⟨i₁, i₂'⟩ =
      - ε₁ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ * ε₂ c₁ c₂ c₁₂ ⟨i₁', i₂⟩

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(c₁₂ : ComplexShape I₁₂)
[TotalComplexShape c₁ c₂ c₁₂]
{i₁ i₁' : I₁}
{i₂ i₂' : I₂}
(h₁ : c₁.Rel i₁ i₁')
(h₂ : c₂.Rel i₂ i₂')

c₁.ε₂ c₂ c₁₂ (i₁, i₂) * c₁.ε₁ c₂ c₁₂ (i₁, i₂') = -c₁.ε₁ c₂ c₁₂ (i₁, i₂) * c₁.ε₂ c₂ c₁₂ (i₁', i₂)


@[simp]
lemma map_id (n : SimplexCategory) :
    (SSet.standardSimplex.map (SimplexCategory.Hom.mk OrderHom.id : n ⟶ n)) = 𝟙 _

SSet.standardSimplex.map (SimplexCategory.Hom.mk OrderHom.id) = 𝟙 (SSet.standardSimplex.obj n)


@[simp]
theorem iInf_coe {ι} (p : ι → LieSubmodule R L M) : (↑(⨅ i, p i) : Set M) = ⋂ i, ↑(p i)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{ι : Sort u_1}
(p : ι → LieSubmodule R L M)


@[to_additive]
theorem Multipliable.mul_compl {s : Set β} (hs : Multipliable (f ∘ (↑) : s → α))
    (hsc : Multipliable (f ∘ (↑) : (sᶜ : Set β) → α)) : Multipliable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
[ContinuousAdd α]
{s : Set β}
(hs : Summable (f ∘ Subtype.val))
(hsc : Summable (f ∘ Subtype.val))


@[simp]
theorem NumberField.place_apply (x : K) : (NumberField.place φ) x = norm (φ x)

{K : Type u_1}
[Field K]
{A : Type u_2}
[NormedDivisionRing A]
[Nontrivial A]
(φ : K →+* A)
(x : K)


@[to_additive]
theorem tendsto_iff_norm_div_tendsto_zero {f : α → E} {a : Filter α} {b : E} :
    Tendsto f a (𝓝 b) ↔ Tendsto (fun e => ‖f e / b‖) a (𝓝 0)

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
{f : α → E}
{a : Filter α}
{b : E}

Filter.Tendsto f a (𝓝 b) ↔ Filter.Tendsto (fun e => ‖f e - b‖) a (𝓝 0)


@[simp]
theorem product_zero : s ×ˢ (0 : Multiset β) = 0

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


lemma monotone_of_continuous (hf : Continuous f) : Monotone f

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScott α]
[Preorder β]
[TopologicalSpace β]
[Topology.IsScott β]
{f : α → β}
(hf : Continuous f)