theorem _root_.ContinuousOn.prod_mapL {f : X → M₁ →L[𝕜] M₂} {g : X → M₃ →L[𝕜] M₄} {s : Set X}
    (hf : ContinuousOn f s) (hg : ContinuousOn g s) :
    ContinuousOn (fun x => (f x).prodMap (g x)) s

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{M₁ : Type u_5}
{M₂ : Type u_6}
{M₃ : Type u_7}
{M₄ : Type u_8}
[SeminormedAddCommGroup M₁]
[NormedSpace 𝕜 M₁]
[SeminormedAddCommGroup M₂]
[NormedSpace 𝕜 M₂]
[SeminormedAddCommGroup M₃]
[NormedSpace 𝕜 M₃]
[SeminormedAddCommGroup M₄]
[NormedSpace 𝕜 M₄]
{X : Type u_9}
[TopologicalSpace X]
{f : X → M₁ →L[𝕜] M₂}
{g : X → M₃ →L[𝕜] M₄}
{s : Set X}
(hf : ContinuousOn f s)
(hg : ContinuousOn g s)


theorem parts_top_subsingleton (a : α) [Decidable (a = ⊥)] :
    ((⊤ : Finpartition a).parts : Set α).Subsingleton

{α : Type u_1}
[Lattice α]
[OrderBot α]
(a : α)
[Decidable (a = ⊥)]


theorem exists_preirreducible (s : Set X) (H : IsPreirreducible s) :
    ∃ t : Set X, IsPreirreducible t ∧ s ⊆ t ∧ ∀ u, IsPreirreducible u → t ⊆ u → u = t

{X : Type u_1}
[TopologicalSpace X]
(s : Set X)
(H : IsPreirreducible s)

∃ t, IsPreirreducible t ∧ s ⊆ t ∧ ∀ (u : Set X), IsPreirreducible u → t ⊆ u → u = t


/-- `LocallyConstant.map` as a `MonoidHom`. -/
@[to_additive (attr := simps) "`LocallyConstant.map` as an `AddMonoidHom`."]
def mapMonoidHom [MulOneClass Y] [MulOneClass Z] (f : Y →* Z) :
    LocallyConstant X Y →* LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{Z : Type u_6}
[MulOneClass Y]
[MulOneClass Z]
(f : Y →* Z)
(g : LocallyConstant X Y)

(LocallyConstant.mapMonoidHom f) g = LocallyConstant.map (⇑f) g


theorem UInt16.toNat_zero : (0 : UInt16).toNat = 0


@[simp]
theorem maximals_singleton : maximals r {a} = {a}

{α : Type u_1}
(r : α → α → Prop)
(a : α)


@[simp]
theorem sup_eq_lsub {ι : Type u} (f : ι → Ordinal.{max u v}) :
    sup.{_, v} (succ ∘ f) = lsub.{_, v} f

Ordinal.sup (Order.succ ∘ f) = Ordinal.lsub f


theorem C_mul_X_pow_eq_monomial {s : σ} {a : R} {n : ℕ} :
    C a * X s ^ n = monomial (Finsupp.single s n) a

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{s : σ}
{a : R}
{n : ℕ}

MvPolynomial.C a * MvPolynomial.X s ^ n = (MvPolynomial.monomial (Finsupp.single s n)) a


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.mul {f g : X → M} {x : X} (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun x => f x * g x) x

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Mul M]
[ContinuousMul M]
{f g : X → M}
{x : X}
(hf : ContinuousAt f x)
(hg : ContinuousAt g x)


@[simp]
theorem zeta_apply {x : ℕ} : ζ x = if x = 0 then 0 else 1

ArithmeticFunction.zeta x = if x = 0 then 0 else 1


theorem abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) :
    abs (x ^ y) = x ^ re y


theorem Disjoint.of_disjoint_inf_of_le (h : Disjoint (a ⊓ b) c) (hle : a ≤ c) : Disjoint a b

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b c : α}
(h : Disjoint (a ⊓ b) c)
(hle : a ≤ c)


/-- The `p`-adic norm of an integer is at most `1`. -/
protected theorem of_int (z : ℤ) : padicNorm p z ≤ 1

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(z : ℤ)


theorem Decidable.ne_or_eq {α : Sort*} (x y : α) [Decidable (x = y)] : x ≠ y ∨ x = y

{α : Sort u_1}
(x y : α)
[Decidable (x = y)]


@[measurability]
theorem Measurable.const_pow (hg : Measurable g) (c : β) : Measurable fun x => c ^ g x

{β : Type u_2}
{γ : Type u_3}
{α : Type u_4}
[MeasurableSpace β]
[MeasurableSpace γ]
[Pow β γ]
[MeasurablePow β γ]
{m : MeasurableSpace α}
{g : α → γ}
(hg : Measurable g)
(c : β)


theorem condexp_ae_eq_integral_condDistrib_id [NormedSpace ℝ F] [CompleteSpace F] {X : Ω → β}
    {μ : Measure Ω} [IsFiniteMeasure μ] (hX : Measurable X) {f : Ω → F} (hf_int : Integrable f μ) :
    μ[f|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f y ∂condDistrib id X μ (X a)

{β : Type u_2}
{Ω : Type u_3}
{F : Type u_4}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
[NormedAddCommGroup F]
{mβ : MeasurableSpace β}
[NormedSpace ℝ F]
[CompleteSpace F]
{X : Ω → β}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
(hX : Measurable X)
{f : Ω → F}
(hf_int : MeasureTheory.Integrable f μ)

μ[f|MeasurableSpace.comap X mβ] =ᵐ[μ] fun a => ∫ (y : Ω), f y ∂(ProbabilityTheory.condDistrib id X μ) (X a)


protected theorem eq_or_lt_of_not_lt {a b : Nat} (hnlt : ¬ a < b) : a = b ∨ b < a


/-- The elements of `A.nonunits` are those of the maximal ideal of `A`.

See also `coe_mem_nonunits_iff`, which has a simpler right hand side but requires the element
to be in `A` already.
 -/
theorem mem_nonunits_iff_exists_mem_maximalIdeal {a : K} :
    a ∈ A.nonunits ↔ ∃ ha, (⟨a, ha⟩ : A) ∈ LocalRing.maximalIdeal A

{K : Type u}
[Field K]
{A : ValuationSubring K}
{a : K}

a ∈ A.nonunits ↔ ∃ (ha : a ∈ A), ⟨a, ha⟩ ∈ LocalRing.maximalIdeal ↥A


protected theorem wellFounded (f : α ↪o β) :
    WellFounded ((· < ·) : β → β → Prop) → WellFounded ((· < ·) : α → α → Prop)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : α ↪o β)

(WellFounded fun x x_1 => x < x_1) → WellFounded fun x x_1 => x < x_1


/-- If `E / F` is a finite extension such that `E = F(α)`, then for any intermediate field `K`, the
`F` adjoin the coefficients of `minpoly K α` is equal to `K` itself. -/
theorem adjoin_minpoly_coeff_of_exists_primitive_element
    [FiniteDimensional F E] (hprim : adjoin F {α} = ⊤) (K : IntermediateField F E) :
    adjoin F ((minpoly K α).map (algebraMap K E)).coeffs = K

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{α : E}
[FiniteDimensional F E]
(hprim : F⟮α⟯ = ⊤)
(K : IntermediateField F E)

IntermediateField.adjoin F ↑(Polynomial.map (algebraMap (↥K) E) (minpoly (↥K) α)).coeffs = K


private theorem toIxxMod_total (a b c : α) :
    toIcoMod hp a b ≤ toIocMod hp a c ∨ toIcoMod hp c b ≤ toIocMod hp c a

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


/-- Given a prepartition `π` of a box `I` and a collection of prepartitions `πi J` of all boxes
`J ∈ π`, returns the prepartition of `I` into the union of the boxes of all `πi J`.

Though we only use the values of `πi` on the boxes of `π`, we require `πi` to be a globally defined
function. -/
@[simps]
def biUnion (πi : ∀ J : Box ι, Prepartition J) : Prepartition I

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

(π.biUnion πi).boxes = π.boxes.biUnion fun J => (πi J).boxes


@[to_additive]
theorem IsCompact.mul_closedBall_one (hs : IsCompact s) (hδ : 0 ≤ δ) :
    s * closedBall (1 : E) δ = cthickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
{δ : ℝ}
{s : Set E}
(hs : IsCompact s)
(hδ : 0 ≤ δ)

s + Metric.closedBall 0 δ = Metric.cthickening δ s


protected theorem sub (hf : UnifIntegrable f p μ) (hg : UnifIntegrable g p μ) (hp : 1 ≤ p)
    (hf_meas : ∀ i, AEStronglyMeasurable (f i) μ) (hg_meas : ∀ i, AEStronglyMeasurable (g i) μ) :
    UnifIntegrable (f - g) p μ

{f g : ι → α → β}

(hf : MeasureTheory.UnifIntegrable f p μ)

(hg : MeasureTheory.UnifIntegrable g p μ)

(hf_meas : ∀ (i : ι), MeasureTheory.AEStronglyMeasurable (f i) μ)

(hg_meas : ∀ (i : ι), MeasureTheory.AEStronglyMeasurable (g i) μ)

MeasureTheory.UnifIntegrable (f - g) p μ


theorem KaehlerDifferential.tensorProductTo_surjective :
    Function.Surjective (KaehlerDifferential.D R S).tensorProductTo

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

Function.Surjective ⇑(KaehlerDifferential.D R S).tensorProductTo


protected theorem HasAntitoneBasis.map {l : Filter α} {s : ι'' → Set α}
    (hf : HasAntitoneBasis l s) (m : α → β) : HasAntitoneBasis (map m l) (m '' s ·)

{α : Type u_1}
{β : Type u_2}
{ι'' : Type u_6}
[Preorder ι'']
{l : Filter α}
{s : ι'' → Set α}
(hf : l.HasAntitoneBasis s)
(m : α → β)

(Filter.map m l).HasAntitoneBasis fun x => m '' s x


theorem comap_bracket_incl {I₁ I₂ : LieIdeal R L} :
    ⁅comap I.incl I₁, comap I.incl I₂⁆ = comap I.incl ⁅I ⊓ I₁, I ⊓ I₂⁆

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
{I₁ I₂ : LieIdeal R L}

⁅LieIdeal.comap I.incl I₁, LieIdeal.comap I.incl I₂⁆ = LieIdeal.comap I.incl ⁅I ⊓ I₁, I ⊓ I₂⁆


@[simp]
theorem smul_bot (a : α) : a • (⊥ : AddSubmonoid A) = ⊥

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Monoid α]
[DistribMulAction α A]
(a : α)


@[simp]
theorem N₁Γ₀_inv_app_f_f (K : ChainComplex C ℕ) (n : ℕ) :
    (N₁Γ₀.inv.app K).f.f n = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom.f.f n

(AlgebraicTopology.DoldKan.N₁Γ₀.inv.app K).f.f n =
  (AlgebraicTopology.DoldKan.Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom.f.f n


@[ext]
theorem ext (p q : MvPolynomial σ R) : (∀ m, coeff m p = coeff m q) → p = q

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

(∀ (m : σ →₀ ℕ), MvPolynomial.coeff m p = MvPolynomial.coeff m q) → p = q


theorem IsClopen.connectedComponent_subset {x} (hs : IsClopen s) (hx : x ∈ s) :
    connectedComponent x ⊆ s

{α : Type u}
[TopologicalSpace α]
{s : Set α}
{x : α}
(hs : IsClopen s)
(hx : x ∈ s)


@[simp]
theorem Ideal.smithCoeffs_ne_zero (b : Basis ι R S) (I : Ideal S) (hI : I ≠ ⊥) (i) :
    Ideal.smithCoeffs b I hI i ≠ 0

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
{S : Type u_4}
[CommRing S]
[IsDomain S]
[Algebra R S]
[Finite ι]
(b : Basis ι R S)
(I : Ideal S)
(hI : I ≠ ⊥)
(i : ι)


theorem algebraicIndependent_image {ι} {s : Set ι} {f : ι → A} (hf : Set.InjOn f s) :
    (AlgebraicIndependent R fun x : s => f x) ↔ AlgebraicIndependent R fun x : f '' s => (x : A)

{R : Type u_3}
{A : Type u_5}
[CommRing R]
[CommRing A]
[Algebra R A]
{ι : Type u_9}
{s : Set ι}
{f : ι → A}
(hf : Set.InjOn f s)

(AlgebraicIndependent R fun x => f ↑x) ↔ AlgebraicIndependent R fun x => ↑x


theorem Adapted.measurable_upcrossings (hf : Adapted ℱ f) (hab : a < b) :
    Measurable (upcrossings a b f)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{ℱ : MeasureTheory.Filtration ℕ m0}
(hf : MeasureTheory.Adapted ℱ f)
(hab : a < b)

Measurable (MeasureTheory.upcrossings a b f)


@[simp]
theorem of_eq_of {p : α → Prop} {q : β → Prop} : of p = of q ↔ ManyOneEquiv p q

{α : Type u}
[Primcodable α]
[Inhabited α]
{β : Type v}
[Primcodable β]
[Inhabited β]
{p : α → Prop}
{q : β → Prop}

ManyOneDegree.of p = ManyOneDegree.of q ↔ ManyOneEquiv p q


@[to_additive (attr := simp)]
theorem singleton_mul : {a} * t = (a * ·) '' t

{α : Type u_2}
[Mul α]
{t : Set α}
{a : α}


theorem apply_mem_spectrum [Nontrivial R] (φ : F) (a : A) : φ a ∈ σ a

{F : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommRing R]
[Ring A]
[Algebra R A]
[FunLike F A R]
[AlgHomClass F R A R]
[Nontrivial R]
(φ : F)
(a : A)


lemma Y_eq_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : P y * Q z ^ 3 = Q y * P z ^ 3

{R : Type u}
[CommRing R]
{P Q : Fin 3 → R}
(h : P ≈ Q)


/-- Every point is a fixed point of `id`. -/
theorem isFixedPt_id (x : α) : IsFixedPt id x


@[simp]
theorem torsionOf_zero : torsionOf R M (0 : M) = ⊤

(R : Type u_1)
(M : Type u_2)
[Semiring R]
[AddCommMonoid M]
[Module R M]


theorem ciInf_mem [Nonempty ι] (f : ι → α) : iInf f ∈ range f

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrder α]
[IsWellOrder α fun x x_1 => x < x_1]
[Nonempty ι]
(f : ι → α)


/-- If `K = Frac(R)` and `g : K[X]` divides a monic polynomial with coefficients in `R`, then
    `g * (C g.leadingCoeff⁻¹)` has coefficients in `R` -/
theorem IsIntegrallyClosed.eq_map_mul_C_of_dvd [IsIntegrallyClosed R] {f : R[X]} (hf : f.Monic)
    {g : K[X]} (hg : g ∣ f.map (algebraMap R K)) :
    ∃ g' : R[X], g'.map (algebraMap R K) * (C <| leadingCoeff g) = g

(hg : g ∣ Polynomial.map (algebraMap R K) f)

∃ g', Polynomial.map (algebraMap R K) g' * Polynomial.C g.leadingCoeff = g


lemma AntitoneOn.mapsTo_Iic (h : AntitoneOn f (Iic b)) : MapsTo f (Iic b) (Ici (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : AntitoneOn f (Set.Iic b))

Set.MapsTo f (Set.Iic b) (Set.Ici (f b))


/-- If `r` is a negative constant, `fun x ↦ r * f x` tends to negative infinity along a filter `l`
if and only if `f` tends to infinity along `l`. -/
theorem tendsto_const_mul_atBot_of_neg (hr : r < 0) :
    Tendsto (fun x => r * f x) l atBot ↔ Tendsto f l atTop

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

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


theorem le_extendScalars_iff (E' : IntermediateField F L) :
    E' ≤ extendScalars h ↔ E'.toSubfield ≤ E

{L : Type u_2}
[Field L]
{F E : Subfield L}
(h : F ≤ E)
(E' : IntermediateField (↥F) L)

E' ≤ Subfield.extendScalars h ↔ E'.toSubfield ≤ E


@[simp]
theorem AdditiveFunctor.ofLeftExact_obj_fst (F : C ⥤ₗ D) :
    ((AdditiveFunctor.ofLeftExact C D).obj F).obj = F.obj

((CategoryTheory.AdditiveFunctor.ofLeftExact C D).obj F).obj = F.obj


@[to_additive neg_le]
theorem inv_le' : a⁻¹ ≤ b ↔ b⁻¹ ≤ a

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

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

a⁻¹ ≤ b ↔ b⁻¹ ≤ a


@[simp]
theorem csInf_Ioi [NoMaxOrder α] [DenselyOrdered α] : sInf (Ioi a) = a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{a : α}
[NoMaxOrder α]
[DenselyOrdered α]


lemma shiftFunctorAdd'_op_inv_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).inv.app X =
      (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).hom.app X) ≫
      (shiftFunctorOpIso C _ _ h₂).hom.app _ ≫
      ((shiftFunctorAdd' C b₁ b₂ b₃ (by omega)).hom.app X.unop).op ≫
      (shiftFunctorOpIso C _ _ h₃).inv.app X

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]
(X : Cᵒᵖ)
(a₁ a₂ a₃ : ℤ)
(h : a₁ + a₂ = a₃)
(b₁ b₂ b₃ : ℤ)
(h₁ : a₁ + b₁ = 0)
(h₂ : a₂ + b₂ = 0)
(h₃ : a₃ + b₃ = 0)

(CategoryTheory.shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).inv.app X =
  CategoryTheory.CategoryStruct.comp
    ((CategoryTheory.shiftFunctor Cᵒᵖ a₂).map ((CategoryTheory.Pretriangulated.shiftFunctorOpIso C a₁ b₁ h₁).hom.app X))
    (CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.Pretriangulated.shiftFunctorOpIso C a₂ b₂ h₂).hom.app
        ((CategoryTheory.shiftFunctor C b₁).op.obj X))
      (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd' C b₁ b₂ b₃ ⋯).hom.app (Opposite.unop X)).op
        ((CategoryTheory.Pretriangulated.shiftFunctorOpIso C a₃ b₃ h₃).inv.app X)))


theorem copy_eq (f : SupHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Sup β]
(f : SupHom α β)
(f' : α → β)
(h : f' = ⇑f)


/-- **Abel's limit theorem**. Given a power series converging at 1, the corresponding function
is continuous at 1 when approaching 1 within any fixed Stolz cone. -/
theorem tendsto_tsum_powerSeries_nhdsWithin_stolzCone
    (h : Tendsto (fun n ↦ ∑ i ∈ range n, f i) atTop (𝓝 l)) {s : ℝ} (hs : 0 < s) :
    Tendsto (fun z ↦ ∑' n, f n * z ^ n) (𝓝[stolzCone s] 1) (𝓝 l)

(h : Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop (𝓝 l))

Filter.Tendsto (fun z => ∑' (n : ℕ), f n * z ^ n) (𝓝[Complex.stolzCone s] 1) (𝓝 l)


@[simp, mfld_simps]
theorem trivializationAt_continuousLinearMapAt {b₀ b : B}
    (hb : b ∈ (trivializationAt F Z.Fiber b₀).baseSet) :
    (trivializationAt F Z.Fiber b₀).continuousLinearMapAt R b =
      Z.coordChange (Z.indexAt b) (Z.indexAt b₀) b

Trivialization.continuousLinearMapAt R (trivializationAt F Z.Fiber b₀) b = Z.coordChange (Z.indexAt b) (Z.indexAt b₀) b


/-- Every zero matrix is diagonal. -/
@[simp]
theorem isDiag_zero [Zero α] : (0 : Matrix n n α).IsDiag


theorem IsCoprime.mul_left_iff : IsCoprime (x * y) z ↔ IsCoprime x z ∧ IsCoprime y z

{R : Type u}
[CommSemiring R]
{x y z : R}


/-- Given `f : β → ℝ≥0∞`, if `f` sends `{i | p i}` to a set of positive numbers
accumulating to zero, then `f i`-neighborhoods of the diagonal form a basis of `𝓤 α`.

For specific bases see `uniformity_basis_edist`, `uniformity_basis_edist'`,
`uniformity_basis_edist_nnreal`, and `uniformity_basis_edist_inv_nat`. -/
protected theorem EMetric.mk_uniformity_basis {β : Type*} {p : β → Prop} {f : β → ℝ≥0∞}
    (hf₀ : ∀ x, p x → 0 < f x) (hf : ∀ ε, 0 < ε → ∃ x, p x ∧ f x ≤ ε) :
    (𝓤 α).HasBasis p fun x => { p : α × α | edist p.1 p.2 < f x }

{f : β → ℝ≥0∞}

(hf : ∀ (ε : ℝ≥0∞), 0 < ε → ∃ x, p x ∧ f x ≤ ε)

(𝓤 α).HasBasis p fun x => {p | edist p.1 p.2 < f x}


lemma stableUnderSpecialization_sInter (S : Set (Set X))
    (H : ∀ s ∈ S, StableUnderSpecialization s) : StableUnderSpecialization (⋂₀ S)


theorem op_le_iff {S₁ : Subring R} {S₂ : Subring Rᵐᵒᵖ} : S₁.op ≤ S₂ ↔ S₁ ≤ S₂.unop

{R : Type u_2}
[Ring R]
{S₁ : Subring R}
{S₂ : Subring Rᵐᵒᵖ}


/-- `f : ContDiffBump c`, where `c` is a point in a normed vector space, is a
bundled smooth function such that

- `f` is equal to `1` in `Metric.closedBall c f.rIn`;
- `support f = Metric.ball c f.rOut`;
- `0 ≤ f x ≤ 1` for all `x`.

The structure `ContDiffBump` contains the data required to construct the function:
real numbers `rIn`, `rOut`, and proofs of `0 < rIn < rOut`. The function itself is available through
`CoeFun` when the space is nice enough, i.e., satisfies the `HasContDiffBump` typeclass. -/
structure ContDiffBump (c : E) where
  /-- real numbers `0 < rIn < rOut` -/
  (rIn rOut : ℝ)
  rIn_pos : 0 < rIn
  rIn_lt_rOut : rIn < rOut

{E : Type u_1}
{c : E}
(self : ContDiffBump c)


@[simp] theorem and_zero (x : Nat) : x &&& 0 = 0


@[csimp] theorem zipWith_eq_zipWithTR : @zipWith = @zipWithTR

(α : Type u_3)
(β : Type u_2)
(γ : Type u_1)
(f : α → β → γ)
(as : List α)
(bs : List β)
(acc : Array γ)

List.zipWithTR.go f as bs acc = acc.data ++ List.zipWith f as bs


/-- A cotrident on `f : J → (X ⟶ Y)` is determined by the morphism `π : Y ⟶ P` satisfying
`∀ j₁ j₂, f j₁ ≫ π = f j₂ ≫ π`.
-/
@[simps]
def Cotrident.ofπ [Nonempty J] {P : C} (π : Y ⟶ P) (w : ∀ j₁ j₂, f j₁ ≫ π = f j₂ ≫ π) :
    Cotrident f

(w : ∀ (j₁ j₂ : J), CategoryTheory.CategoryStruct.comp (f j₁) π = CategoryTheory.CategoryStruct.comp (f j₂) π)

∀ (X_1 : CategoryTheory.Limits.WalkingParallelFamily J),
  (CategoryTheory.Limits.Cotrident.ofπ π w).ι.app X_1 =
    CategoryTheory.Limits.WalkingParallelFamily.casesOn X_1
      (CategoryTheory.CategoryStruct.comp (f (Classical.arbitrary J)) π) π


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


@[simp]
theorem mem_skewAdjointSubmodule (f : Module.End R₁ M₁) :
    f ∈ B₁.skewAdjointSubmodule ↔ B₁.IsSkewAdjoint f

{R₁ : Type u_3}
{M₁ : Type u_4}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
(B₁ : LinearMap.BilinForm R₁ M₁)
(f : Module.End R₁ M₁)


/-- Each element `a : S` has an `M`-multiple which is an integer.

This version multiplies `a` on the left, matching the argument order in the `SMul` instance.
-/
theorem exists_integer_multiple (a : S) : ∃ b : M, IsInteger R ((b : R) • a)

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

∃ b, IsLocalization.IsInteger R (↑b • a)


@[to_additive (attr := simp)]
theorem prod_map_erase [DecidableEq ι] {a : ι} (h : a ∈ m) :
    f a * ((m.erase a).map f).prod = (m.map f).prod

{ι : Type u_2}
{α : Type u_3}
[CommMonoid α]
{m : Multiset ι}
{f : ι → α}
[DecidableEq ι]
{a : ι}
(h : a ∈ m)

f a * (Multiset.map f (m.erase a)).prod = (Multiset.map f m).prod


theorem ext_iff_val (f g : HomogeneousLocalization 𝒜 x) : f = g ↔ f.val = g.val

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
{x : Submonoid A}
(f g : HomogeneousLocalization 𝒜 x)


@[to_additive]
theorem mulIndicator_symmDiff (s t : Set α) (f : α → M) :
    mulIndicator (s ∆ t) f = mulIndicator (s \ t) f * mulIndicator (t \ s) f

{α : Type u_1}
{M : Type u_4}
[MulOneClass M]
(s t : Set α)
(f : α → M)

(symmDiff s t).mulIndicator f = (s \ t).mulIndicator f * (t \ s).mulIndicator f


@[simp]
theorem ContinuousLinearEquiv.integrable_comp_iff {φ : α → H} (L : H ≃L[𝕜] E) :
    Integrable (fun a : α ↦ L (φ a)) μ ↔ Integrable φ μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedAddCommGroup E]
{𝕜 : Type u_6}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
{H : Type u_7}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{φ : α → H}
(L : H ≃L[𝕜] E)

MeasureTheory.Integrable (fun a => L (φ a)) μ ↔ MeasureTheory.Integrable φ μ


@[simp]
theorem pointReflection_symm (x : P) : (pointReflection 𝕜 x).symm = pointReflection 𝕜 x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x : P)

(AffineIsometryEquiv.pointReflection 𝕜 x).symm = AffineIsometryEquiv.pointReflection 𝕜 x


@[simp]
theorem toAffineIsometryEquiv_apply [Inhabited P₁] (li : P₁ →ᵃⁱ[𝕜] P₂)
    (h : finrank 𝕜 V₁ = finrank 𝕜 V₂) (x : P₁) : (li.toAffineIsometryEquiv h) x = li x

(h : FiniteDimensional.finrank 𝕜 V₁ = FiniteDimensional.finrank 𝕜 V₂)


/-- The equivalence of functor categories induced by `leftOp` and `rightOp`.
-/
@[simps!]
def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ

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

∀ {X Y : C} (f : X ⟶ Y),
  ((CategoryTheory.Functor.leftOpRightOpEquiv C D).functor.obj F).map f = ((Opposite.unop F).map f.op).op


/-- A monic irreducible polynomial over a field `F` of exponential characteristic `q` has
separable degree one if and only if it is of the form `X ^ (q ^ n) - C y`
for some `n : ℕ` and `y : F`. -/
theorem natSepDegree_eq_one_iff_of_monic (q : ℕ) [ExpChar F q] (hm : f.Monic)
    (hi : Irreducible f) : f.natSepDegree = 1 ↔ ∃ (n : ℕ) (y : F), f = X ^ q ^ n - C y

{F : Type u}
[Field F]
{f : F[X]}
(q : ℕ)
[ExpChar F q]
(hm : f.Monic)
(hi : Irreducible f)

f.natSepDegree = 1 ↔ ∃ n y, f = Polynomial.X ^ q ^ n - Polynomial.C y


@[to_additive]
theorem inv_comp_inv : Inv.inv ∘ Inv.inv = @id G


theorem comp_injective (f : α → β) (e : β ≃ γ) : Injective (e ∘ f) ↔ Injective f

{α : Sort u}
{β : Sort v}
{γ : Sort w}
(f : α → β)
(e : β ≃ γ)

Function.Injective (⇑e ∘ f) ↔ Function.Injective f


theorem comp {f : β → σ} {g : α → β} (hf : Primrec f) (hg : Primrec g) : Primrec fun a => f (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : β → σ}
{g : α → β}
(hf : Primrec f)
(hg : Primrec g)


theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
    MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v}

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[LocallyCompactSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MeasurableSpace E]
[OpensMeasurableSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{v : E}
(hf : Continuous f)

MeasurableSet {x | LineDifferentiableAt 𝕜 f x v}


@[fun_prop]
nonrec theorem HasFDerivWithinAt.const_smul (h : HasFDerivWithinAt f f' s x) (c : R) :
    HasFDerivWithinAt (fun x => c • f x) (c • f') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
{R : Type u_6}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(h : HasFDerivWithinAt f f' s x)
(c : R)


theorem gcd_congr {f g : β → α} (hs : s₁ = s₂) (hfg : ∀ a ∈ s₂, f a = g a) :
    s₁.gcd f = s₂.gcd g

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s₁ s₂ : Finset β}
{f g : β → α}
(hs : s₁ = s₂)
(hfg : ∀ a ∈ s₂, f a = g a)


theorem lcm_eq_right_iff [NormalizedGCDMonoid α] (a b : α) (h : normalize b = b) :
    lcm a b = b ↔ a ∣ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(a b : α)
(h : normalize b = b)


theorem count_concat (a : α) (l : List α) : count a (concat l a) = succ (count a l)

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

List.count a (l.concat a) = (List.count a l).succ


theorem blockTriangular_diagonal [DecidableEq m] (d : m → R) : BlockTriangular (diagonal d) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]
(d : m → R)


@[simp] theorem byteIdx_zero : (0 : Pos).byteIdx = 0


theorem comap_mono (f : C(α, β)) {s t : Opens β} (h : s ≤ t) : comap f s ≤ comap f t

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
{s t : TopologicalSpace.Opens β}
(h : s ≤ t)

(TopologicalSpace.Opens.comap f) s ≤ (TopologicalSpace.Opens.comap f) t


theorem takeWhile_replicate (p : α → Bool) :
    (replicate n a).takeWhile p = if p a then replicate n a else []

{α : Type u_1}
{n : Nat}
{a : α}
(p : α → Bool)

List.takeWhile p (List.replicate n a) = if p a = true then List.replicate n a else []


theorem iSup_def {ι} (s : ι → Opens α) : ⨆ i, s i = ⟨⋃ i, s i, isOpen_iUnion fun i => (s i).2⟩

{α : Type u_2}
[TopologicalSpace α]
{ι : Sort u_5}
(s : ι → TopologicalSpace.Opens α)

⨆ i, s i = { carrier := ⋃ i, ↑(s i), is_open' := ⋯ }


theorem injective_iff_ker_eq_bot : Function.Injective f ↔ ker f = ⊥

{R : Type u}
{S : Type v}
{F : Type u_1}
[Ring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)

Function.Injective ⇑f ↔ RingHom.ker f = ⊥


theorem op (h : HasLiftingProperty i p) : HasLiftingProperty p.op i.op

(h : CategoryTheory.HasLiftingProperty i p)


theorem continuousWithinAt_writtenInExtend_iff {f' : PartialHomeomorph M' H'} {g : M → M'} {y : M}
    (hy : y ∈ f.source) (hgy : g y ∈ f'.source) (hmaps : MapsTo g s f'.source) :
    ContinuousWithinAt (f'.extend I' ∘ g ∘ (f.extend I).symm)
      ((f.extend I).symm ⁻¹' s ∩ range I) (f.extend I y) ↔ ContinuousWithinAt g s y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
{E' : Type u_5}
{M' : Type u_6}
{H' : Type u_7}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
[TopologicalSpace H']
[TopologicalSpace M']
(I' : ModelWithCorners 𝕜 E' H')
{s : Set M}
{f' : PartialHomeomorph M' H'}
{g : M → M'}
{y : M}
(hy : y ∈ f.source)
(hgy : g y ∈ f'.source)
(hmaps : Set.MapsTo g s f'.source)

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


lemma disjoint_countablePartition {n : ℕ} {s t : Set α}
    (hs : s ∈ countablePartition α n) (ht : t ∈ countablePartition α n) (hst : s ≠ t) :
    Disjoint s t

[h : MeasurableSpace.CountablyGenerated α]

(hs : s ∈ MeasurableSpace.countablePartition α n)

(ht : t ∈ MeasurableSpace.countablePartition α n)


theorem principal_isMeasurablyGenerated_iff {s : Set α} :
    IsMeasurablyGenerated (𝓟 s) ↔ MeasurableSet s

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

(𝓟 s).IsMeasurablyGenerated ↔ MeasurableSet s


theorem eq_of_degrees_lt_of_eval_finset_eq (degree_f_lt : f.degree < s.card)
    (degree_g_lt : g.degree < s.card) (eval_fg : ∀ x ∈ s, f.eval x = g.eval x) : f = g

(eval_fg : ∀ x ∈ s, Polynomial.eval x f = Polynomial.eval x g)


/-- Countable unions of compact sets are σ-compact. -/
lemma isSigmaCompact_iUnion_of_isCompact [hι : Countable ι] (s : ι → Set X)
    (hcomp : ∀ i, IsCompact (s i)) : IsSigmaCompact (⋃ i, s i)

{X : Type u_1}
{ι : Type u_3}
[TopologicalSpace X]
[hι : Countable ι]
(s : ι → Set X)
(hcomp : ∀ (i : ι), IsCompact (s i))


/-- The two ways of summing over `(i, j)` in the range `a ≤ i < j < b` are equal. -/
theorem sum_Ico_Ico_comm' {M : Type*} [AddCommMonoid M] (a b : ℕ) (f : ℕ → ℕ → M) :
    (∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico (i + 1) b, f i j) =
      ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a j, f i j

{M : Type u_3}
[AddCommMonoid M]
(a b : ℕ)
(f : ℕ → ℕ → M)

∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico (i + 1) b, f i j = ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a j, f i j


theorem Nat.decreasing_induction_of_infinite (hP : { x | P x }.Infinite) (n : ℕ) : P n

{P : ℕ → Prop}
(h : ∀ (n : ℕ), P (n + 1) → P n)
(hP : {x | P x}.Infinite)
(n : ℕ)


theorem isGluing_iff_pairwise {sf s} : IsGluing F U sf s ↔
    ∀ i, (F.mapCone (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i

{sf : (i : ι) → (CategoryTheory.forget (Type u)).obj (F.obj (Opposite.op (U i)))}

{s : (CategoryTheory.forget (Type u)).obj (F.obj (Opposite.op (iSup U)))}

F.IsGluing U sf s ↔
  ∀ (i : (CategoryTheory.Pairwise ι)ᵒᵖ),
    (CategoryTheory.Functor.mapCone F (CategoryTheory.Pairwise.cocone U).op).π.app i s =
      TopCat.Presheaf.objPairwiseOfFamily sf i


@[simp]
theorem coe_toOrderIso_inv (f : CircleDeg1Liftˣ) : ⇑(toOrderIso f)⁻¹ = (f⁻¹ : CircleDeg1Liftˣ)

⇑(CircleDeg1Lift.toOrderIso f)⁻¹ = ⇑↑f⁻¹


theorem ordConnectedComponent_eq (h : [[x, y]] ⊆ s) :
    ordConnectedComponent s x = ordConnectedComponent s y

{α : Type u_1}
[LinearOrder α]
{s : Set α}
{x y : α}
(h : [[x, y]] ⊆ s)

s.ordConnectedComponent x = s.ordConnectedComponent y


theorem decompose_mul_add_left [AddLeftCancelMonoid ι] [GradedRing 𝒜] (a : 𝒜 i) {b : A} :
    decompose 𝒜 (↑a * b) (i + j) =
      @GradedMonoid.GMul.mul ι (fun i => 𝒜 i) _ _ _ _ a (decompose 𝒜 b j)

{ι : Type u_1}
{A : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
{i j : ι}
[AddLeftCancelMonoid ι]
[GradedRing 𝒜]
(a : ↥(𝒜 i))
{b : A}

((DirectSum.decompose 𝒜) (↑a * b)) (i + j) = GradedMonoid.GMul.mul a (((DirectSum.decompose 𝒜) b) j)


theorem ConcaveOn.add_strictConcaveOn (hf : ConcaveOn 𝕜 s f) (hg : StrictConcaveOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f + g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[DistribMulAction 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : ConcaveOn 𝕜 s f)
(hg : StrictConcaveOn 𝕜 s g)


theorem one_sub_e_mem_of_false {x y : (π C (· ∈ s))} {a : I} (ha : y.val a = true)
    (hx : x.val a = false) : 1 - e (π C (· ∈ s)) a ∈ factors C s x

{x y : ↑(Profinite.NobelingProof.π C fun x => x ∈ s)}

1 - Profinite.NobelingProof.e (Profinite.NobelingProof.π C fun x => x ∈ s) a ∈ Profinite.NobelingProof.factors C s x


@[reassoc (attr := simp)]
theorem PInfty_comp_πSummand_id (n : ℕ) :
    PInfty.f n ≫ s.πSummand (IndexSet.id (op [n])) = s.πSummand (IndexSet.id (op [n]))

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X : CategoryTheory.SimplicialObject C}
(s : SimplicialObject.Splitting X)
[CategoryTheory.Preadditive C]
(n : ℕ)

AlgebraicTopology.DoldKan.PInfty.f n ≫ s.πSummand (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n])) =
  s.πSummand (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n]))


@[simp]
theorem coe_detMonoidHom : (detMonoidHom : Matrix n n R → R) = det

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]


lemma ofBijective_apply_symm_apply (f : α → β) (hf : Bijective f) (x : β) :
    f ((ofBijective f hf).symm x) = x

{α : Sort u}
{β : Sort v}
(f : α → β)
(hf : Function.Bijective f)
(x : β)


theorem surjective_iff_bijective {f : α → α} : Surjective f ↔ Bijective f

Function.Surjective f ↔ Function.Bijective f


theorem isBigO_of_div_tendsto_nhds {α : Type*} {l : Filter α} {f g : α → 𝕜}
    (hgf : ∀ᶠ x in l, g x = 0 → f x = 0) (c : 𝕜) (H : Filter.Tendsto (f / g) l (𝓝 c)) :
    f =O[l] g

(hgf : ∀ᶠ (x : α) in l, g x = 0 → f x = 0)


@[ext 1199]
theorem hom_ext {f g : PushoutI φ →* K}
    (h : ∀ i, f.comp (of i : G i →* _) = g.comp (of i : G i →* _))
    (hbase : f.comp (base φ) = g.comp (base φ)) : f = g

(h : ∀ (i : ι), f.comp (Monoid.PushoutI.of i) = g.comp (Monoid.PushoutI.of i))

(hbase : f.comp (Monoid.PushoutI.base φ) = g.comp (Monoid.PushoutI.base φ))


@[to_additive (attr := simp)]
theorem coe_copy {s : Set M} (hs : s = S) : (S.copy s hs : Set M) = s

{M : Type u_1}
[Add M]
{S : AddSubsemigroup M}
{s : Set M}
(hs : s = ↑S)


theorem not_infinite_real (r : ℝ) : ¬Infinite r


theorem coeFn_le (f g : Lp E p μ) : f ≤ᵐ[μ] g ↔ f ≤ g

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

↑↑f ≤ᵐ[μ] ↑↑g ↔ f ≤ g


/-- If every vector is a multiple of some `v : M`, then `M` has dimension at most one.
-/
theorem finrank_le_one (v : M) (h : ∀ w : M, ∃ c : R, c • v = w) : finrank R M ≤ 1

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
[StrongRankCondition R]
(v : M)
(h : ∀ (w : M), ∃ c, c • v = w)


@[simp] theorem natDegree_C_add {a : R} : (C a + p).natDegree = p.natDegree

{R : Type u}
[Semiring R]
{p : R[X]}
{a : R}

(Polynomial.C a + p).natDegree = p.natDegree


@[simp]
theorem Matrix.mulVec_stdBasis_apply [DecidableEq n] (M : Matrix m n R) (j) :
    M *ᵥ LinearMap.stdBasis R (fun _ ↦ R) j 1 = Mᵀ j

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

M *ᵥ (LinearMap.stdBasis R (fun x => R) j) 1 = Mᵀ j


@[simp, norm_cast]
theorem coe_iInf {ι : Sort*} {S : ι → NonUnitalStarSubalgebra R A} :
    (↑(⨅ i, S i) : Set A) = ⋂ i, S i

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{ι : Sort u_1}
{S : ι → NonUnitalStarSubalgebra R A}


theorem seminormAux_smul_le (k n : ℕ) (c : 𝕜) (f : 𝓢(E, F)) :
    (c • f).seminormAux k n ≤ ‖c‖ * f.seminormAux k n

{𝕜 : Type u_1}
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedField 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(k n : ℕ)
(c : 𝕜)
(f : SchwartzMap E F)

SchwartzMap.seminormAux k n (c • f) ≤ ‖c‖ * SchwartzMap.seminormAux k n f


theorem card_filter_equitabilise_small (hm : m ≠ 0) :
    ((P.equitabilise h).parts.filter fun u : Finset α => u.card = m).card = a

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{m a b : ℕ}
(P : Finpartition s)
(h : a * m + b * (m + 1) = s.card)
(hm : m ≠ 0)

(Finset.filter (fun u => u.card = m) (Finpartition.equitabilise h).parts).card = a


theorem mem_connectedComponentIn {x : α} {F : Set α} (hx : x ∈ F) :
    x ∈ connectedComponentIn F x

{α : Type u}
[TopologicalSpace α]
{x : α}
{F : Set α}
(hx : x ∈ F)


/-- A finite field has prime power cardinality. -/
theorem Fintype.isPrimePow_card_of_field {α} [Fintype α] [Field α] : IsPrimePow ‖α‖


@[to_additive]
theorem unop_sInf (S : Set (Subgroup Gᵐᵒᵖ)) : (sInf S).unop = sInf (.op ⁻¹' S)

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

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


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

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set α}
{t₁ t₂ : Set β}

t₁ ⊆ t₂ → s +ᵥ t₁ ⊆ s +ᵥ t₂


lemma image_infs (f : F) (s t : Set α) : f '' (s ⊼ t) = f '' s ⊼ f '' t

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
[FunLike F α β]
[InfHomClass F α β]
(f : F)
(s t : Set α)


theorem implicitFunction_apply_image :
    ∀ᶠ x in 𝓝 φ.pt, φ.implicitFunction (φ.leftFun x) (φ.rightFun x) = x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[CompleteSpace G]
(φ : ImplicitFunctionData 𝕜 E F G)

∀ᶠ (x : E) in 𝓝 φ.pt, φ.implicitFunction (φ.leftFun x) (φ.rightFun x) = x


theorem cauchy_iff {f : Filter α} : Cauchy f ↔ NeBot f ∧ ∀ s ∈ 𝓤 α, ∃ t ∈ f, t ×ˢ t ⊆ s

{α : Type u}
[uniformSpace : UniformSpace α]
{f : Filter α}

Cauchy f ↔ f.NeBot ∧ ∀ s ∈ 𝓤 α, ∃ t ∈ f, t ×ˢ t ⊆ s


@[simp] lemma one_le_exp_iff {a : EReal} : 1 ≤ exp a ↔ 0 ≤ a


@[to_additive ofNat_zsmul]
lemma zpow_ofNat (a : G) (n : ℕ) : a ^ (no_index (OfNat.ofNat n) : ℤ) = a ^ OfNat.ofNat n

{G : Type u_1}
[DivInvMonoid G]
(a : G)
(n : ℕ)


theorem mul_isLimit_left {a b : Ordinal} (l : IsLimit a) (b0 : 0 < b) : IsLimit (a * b)

{a b : Ordinal.{u_4}}
(l : a.IsLimit)
(b0 : 0 < b)


theorem rfind_zero_none (p : ℕ →. Bool) (p0 : p 0 = Part.none) : rfind p = Part.none


theorem Set.Finite.measurableSet_sInter {s : Set (Set α)} (hs : s.Finite)
    (h : ∀ t ∈ s, MeasurableSet t) : MeasurableSet (⋂₀ s)

{α : Type u_1}
{m : MeasurableSpace α}
{s : Set (Set α)}
(hs : s.Finite)
(h : ∀ t ∈ s, MeasurableSet t)


theorem perm_inv_on_of_perm_on_finite {f : Perm α} {p : α → Prop} [Finite { x // p x }]
    (h : ∀ x, p x → p (f x)) {x : α} (hx : p x) : p (f⁻¹ x)

{α : Type u}
{f : Equiv.Perm α}
{p : α → Prop}
[Finite { x // p x }]
(h : ∀ (x : α), p x → p (f x))
{x : α}
(hx : p x)


theorem isCoprime_mul_unit_right_right : IsCoprime y (z * x) ↔ IsCoprime y z

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


@[simp]
theorem isUnit_star [Monoid R] [StarMul R] {a : R} : IsUnit (star a) ↔ IsUnit a

{R : Type u}
[Monoid R]
[StarMul R]
{a : R}


theorem range_add (a b : ℕ) : range (a + b) = range a ∪ (range b).map (addLeftEmbedding a)

Finset.range (a + b) = Finset.range a ∪ Finset.map (addLeftEmbedding a) (Finset.range b)


theorem getLast_eq_get : ∀ (l : List α) (h : l ≠ []),
    getLast l h = l.get ⟨l.length - 1, by
      match l with
      | [] => contradiction
      | a :: l => exact Nat.le_refl _⟩

{α : Type u_1}
(l : List α)
(h : l ≠ [])


@[trans]
theorem IsLittleO.trans_isEquivalent {f : α → β₂} {g₁ g₂ : α → β} (h : f =o[l] g₁)
    (h₂ : g₁ ~[l] g₂) : f =o[l] g₂

{α : Type u_1}
{β : Type u_2}
{β₂ : Type u_3}
[NormedAddCommGroup β]
[Norm β₂]
{l : Filter α}
{f : α → β₂}
{g₁ g₂ : α → β}
(h : f =o[l] g₁)
(h₂ : g₁ ~[l] g₂)


@[reassoc]
theorem id_tensor_associator_inv_naturality {X Y Z X' : C} (f : X ⟶ X') :
    (f ⊗ 𝟙 (Y ⊗ Z)) ≫ (α_ X' Y Z).inv = (α_ X Y Z).inv ≫ ((f ⊗ 𝟙 Y) ⊗ 𝟙 Z)

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

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


theorem mem_Lp_of_ae_nnnorm_bound [IsFiniteMeasure μ] {f : α →ₘ[μ] E} (C : ℝ≥0)
    (hfC : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ C) : f ∈ Lp E p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[MeasureTheory.IsFiniteMeasure μ]
{f : α →ₘ[μ] E}
(C : ℝ≥0)
(hfC : ∀ᵐ (x : α) ∂μ, ‖↑f x‖₊ ≤ C)


/-- Additive inverse of a rational function. -/
protected irreducible_def neg : RatFunc K → RatFunc K

∀ (x : RatFunc K),
  x.neg =
    match x with
    | { toFractionRing := p } => { toFractionRing := -p }


theorem AList.toFinmap_eq {s₁ s₂ : AList β} :
    toFinmap s₁ = toFinmap s₂ ↔ s₁.entries ~ s₂.entries

{α : Type u}
{β : α → Type v}
{s₁ s₂ : AList β}


theorem biUnion_image_left : (s.biUnion fun a => t.image <| f a) = image₂ f s t

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

(s.biUnion fun a => Finset.image (f a) t) = Finset.image₂ f s t


@[simp]
theorem comp_apply (f : BotHom β γ) (g : BotHom α β) (a : α) : (f.comp g) a = f (g a)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Bot α]
[Bot β]
[Bot γ]
(f : BotHom β γ)
(g : BotHom α β)
(a : α)


theorem sym2_map (f : α ↪ β) (s : Finset α) : (s.map f).sym2 = s.sym2.map (.sym2Map f)

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)
(s : Finset α)

(Finset.map f s).sym2 = Finset.map f.sym2Map s.sym2


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


theorem CardinalInterFilter.of_cardinalInterFilter_of_lt (l : Filter α) [CardinalInterFilter l c]
    {a : Cardinal.{u}} (hac : a < c) : CardinalInterFilter l a

{α : Type u}
{c : Cardinal.{u}}
(l : Filter α)
[CardinalInterFilter l c]
{a : Cardinal.{u}}
(hac : a < c)


{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)
{x : M}


@[simp] theorem runCatch_pure [Monad m] : runCatch (pure x : ExceptCpsT α m α) = pure x

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


theorem isUpperSet_sUnion {S : Set (Set α)} (hf : ∀ s ∈ S, IsUpperSet s) : IsUpperSet (⋃₀ S)

{α : Type u_1}
[LE α]
{S : Set (Set α)}
(hf : ∀ s ∈ S, IsUpperSet s)


lemma stableUnderGeneralization_iInter {ι : Sort*} (S : ι → Set X)
    (H : ∀ i, StableUnderGeneralization (S i)) : StableUnderGeneralization (⋂ i, S i)

(H : ∀ (i : ι), StableUnderGeneralization (S i))


theorem append_nil {α} (xs : LazyList α) : xs.append (Thunk.pure LazyList.nil) = xs


/-- A monotone decreasing convergence lemma for integrals of measures of thickenings:
`∫ t in (0, ‖f‖], μ (thickening ε {x | f(x) ≥ t}) dt` tends to
`∫ t in (0, ‖f‖], μ {x | f(x) ≥ t} dt` as `ε → 0`. -/
lemma tendsto_integral_meas_thickening_le (f : Ω →ᵇ ℝ)
    {A : Set ℝ} (A_finmeas : volume A ≠ ∞) (μ : ProbabilityMeasure Ω) :
    Tendsto (fun ε ↦ ∫ t in A, ENNReal.toReal (μ (thickening ε {a | t ≤ f a}))) (𝓝[>] (0 : ℝ))
      (𝓝 (∫ t in A, ENNReal.toReal (μ {a | t ≤ f a})))

(A_finmeas : MeasureTheory.volume A ≠ ⊤)

(μ : MeasureTheory.ProbabilityMeasure Ω)

Filter.Tendsto (fun ε => ∫ (t : ℝ) in A, (↑(μ (Metric.thickening ε {a | t ≤ f a}))).toReal) (𝓝[>] 0)
  (𝓝 (∫ (t : ℝ) in A, (↑(μ {a | t ≤ f a})).toReal))


theorem right_nhdsWithin_Ioo_neBot {a b : α} (H : a < b) : NeBot (𝓝[Ioo a b] b)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}
(H : a < b)


@[simp]
lemma rdrop_append_length_add {l₁ l₂ : List α} (k : ℕ) :
    List.rdrop (l₁ ++ l₂) (length l₂ + k) = List.rdrop l₁ k

(l₁ ++ l₂).rdrop (l₂.length + k) = l₁.rdrop k


@[trans]
theorem IsRotated.trans : ∀ {l l' l'' : List α}, l ~r l' → l' ~r l'' → l ~r l''


nonrec lemma withDensity_absolutelyContinuous [IsSFiniteKernel κ]
    (f : α → β → ℝ≥0∞) (a : α) :
    Kernel.withDensity κ f a ≪ κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
(f : α → β → ℝ≥0∞)
(a : α)


theorem order_eq_multiplicity_X {R : Type*} [Semiring R] [@DecidableRel R⟦X⟧ (· ∣ ·)] (φ : R⟦X⟧) :
    order φ = multiplicity X φ

{R : Type u_2}
[Semiring R]
[DecidableRel fun x x_1 => x ∣ x_1]
(φ : PowerSeries R)


@[simp] theorem ne_eq (a b : α) : (a ≠ b) = ¬(a = b)


@[simp] lemma compls_eq_empty : sᶜˢ = ∅ ↔ s = ∅

{α : Type u_2}
[BooleanAlgebra α]
{s : Finset α}


theorem SatisfiesM_foldrM [Monad m] [LawfulMonad m]
    {as : Array α} (motive : Nat → β → Prop)
    {init : β} (h0 : motive as.size init) {f : α → β → m β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → SatisfiesM (motive i.1) (f as[i] b)) :
    SatisfiesM (motive 0) (as.foldrM f init)

{f : α → β → m β}

(hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → SatisfiesM (motive ↑i) (f as[i] b))

SatisfiesM (motive 0) (Array.foldrM f init as as.size)


@[simp] theorem inv_apply_self (e : α ≃ᵢ α) (x : α) : e⁻¹ (e x) = x

{α : Type u}
[PseudoEMetricSpace α]
(e : α ≃ᵢ α)
(x : α)


@[to_additive]
theorem unop_inf (S₁ S₂ : Subgroup Gᵐᵒᵖ) : (S₁ ⊓ S₂).unop = S₁.unop ⊓ S₂.unop

{G : Type u_2}
[Group G]
(S₁ S₂ : Subgroup Gᵐᵒᵖ)


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

(X : CategoryTheory.CosimplicialObject C)

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


/-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β)

{α : Type u}
{β : Type v}
[Mul β]
(F : FreeMagma α →ₙ* β)

∀ (a : α), FreeMagma.lift.symm F a = (⇑F ∘ FreeMagma.of) a


@[simp] theorem SatisfiesM_ReaderT_eq [Monad m] :
    SatisfiesM (m := ReaderT ρ m) p x ↔ ∀ s, SatisfiesM p (x s)

{m : Type u_1 → Type u_2}
{ρ : Type u_1}

∀ {α : Type u_1} {p : α → Prop} {x : ReaderT ρ m α} [inst : Monad m], SatisfiesM p x ↔ ∀ (s : ρ), SatisfiesM p (x s)


@[simp]
theorem units_smul_eq_neg_iff {u : Rˣ} {v : Module.Ray R M} : u • v = -v ↔ u.1 < 0

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{u : Rˣ}
{v : Module.Ray R M}


protected theorem Antitone.comp_antitoneOn (hg : Antitone g) (hf : AntitoneOn f s) :
    MonotoneOn (g ∘ f) s

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
{s : Set α}
(hg : Antitone g)
(hf : AntitoneOn f s)


theorem Filter.HasBasis.uniformEquicontinuousOn_iff_right {p : κ → Prop}
    {s : κ → Set (α × α)} {F : ι → β → α} {S : Set β} (hα : (𝓤 α).HasBasis p s) :
    UniformEquicontinuousOn F S ↔
      ∀ k, p k → ∀ᶠ xy : β × β in 𝓤 β ⊓ 𝓟 (S ×ˢ S), ∀ i, (F i xy.1, F i xy.2) ∈ s k

{ι : Type u_1}
{κ : Type u_2}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{p : κ → Prop}
{s : κ → Set (α × α)}
{F : ι → β → α}
{S : Set β}
(hα : (uniformity α).HasBasis p s)

UniformEquicontinuousOn F S ↔
  ∀ (k : κ), p k → ∀ᶠ (xy : β × β) in uniformity β ⊓ Filter.principal (S ×ˢ S), ∀ (i : ι), (F i xy.1, F i xy.2) ∈ s k


theorem ofReal_setIntegral_one_of_measure_ne_top {X : Type*} {m : MeasurableSpace X}
    {μ : Measure X} {s : Set X} (hs : μ s ≠ ∞) : ENNReal.ofReal (∫ _ in s, (1 : ℝ) ∂μ) = μ s

{X : Type u_5}
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
{s : Set X}
(hs : μ s ≠ ⊤)

ENNReal.ofReal (∫ (x : X) in s, 1 ∂μ) = μ s


theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) {i j : ι}
    (hij : i ≤ j) : 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]

{f : ι → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)


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

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


theorem init_mul (x y : 𝕎 R) (n : ℕ) : init n (x * y) = init n (init n x * init n y)

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

WittVector.init n (x * y) = WittVector.init n (WittVector.init n x * WittVector.init n y)


@[simp] theorem run_seqLeft {α β σ : Type u} [Monad m] (x : StateT σ m α) (y : StateT σ m β) (s : σ) : (x <* y).run s = (x.run s >>= fun p => y.run p.2 >>= fun p' => pure (p.1, p'.2))

{m : Type u → Type u_1}
{α β σ : Type u}
[Monad m]
(x : StateT σ m α)
(y : StateT σ m β)
(s : σ)

(SeqLeft.seqLeft x fun x => y).run s = do
  let p ← x.run s
  let p' ← y.run p.snd
  pure (p.fst, p'.snd)


@[simp]
theorem preimage_mul_const_Ioi_of_neg (a : α) {c : α} (h : c < 0) :
    (fun x => x * c) ⁻¹' Ioi a = Iio (a / c)

{α : Type u_1}
[LinearOrderedField α]
(a : α)
{c : α}
(h : c < 0)

(fun x => x * c) ⁻¹' Set.Ioi a = Set.Iio (a / c)


lemma guitartExact_of_isRightDerivabilityStructure [Φ.IsRightDerivabilityStructure] :
    TwoSquare.GuitartExact ((Φ.catCommSq L₁ L₂).iso).hom

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

CategoryTheory.TwoSquare.GuitartExact (CategoryTheory.CatCommSq.iso Φ.functor L₁ L₂ (Φ.localizedFunctor L₁ L₂)).hom


/-- The order of an invertible power series is `0`. -/
theorem order_zero_of_unit {f : PowerSeries R} : IsUnit f → f.order = 0

{R : Type u_1}
[Semiring R]
[Nontrivial R]
{f : PowerSeries R}


/-- Bound for the sum of a geometric series in a normed ring. This formula does not assume that the
normed ring satisfies the axiom `‖1‖ = 1`. -/
theorem NormedRing.tsum_geometric_of_norm_lt_one (x : R) (h : ‖x‖ < 1) :
    ‖∑' n : ℕ, x ^ n‖ ≤ ‖(1 : R)‖ - 1 + (1 - ‖x‖)⁻¹

{R : Type u_4}
[NormedRing R]
[CompleteSpace R]
(x : R)
(h : ‖x‖ < 1)

‖∑' (n : ℕ), x ^ n‖ ≤ ‖1‖ - 1 + (1 - ‖x‖)⁻¹


theorem prevD_nat (C D : CochainComplex V ℕ) (i : ℕ) (f : ∀ i j, C.X i ⟶ D.X j) :
    prevD i f = f i (i - 1) ≫ D.d (i - 1) i

{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
(C D : CochainComplex V ℕ)
(i : ℕ)
(f : (i j : ℕ) → C.X i ⟶ D.X j)

(prevD i) f = f i (i - 1) ≫ D.d (i - 1) i


theorem ConvolutionExists.distrib_add (hfg : ConvolutionExists f g L μ)
    (hfg' : ConvolutionExists f g' L μ) : f ⋆[L, μ] (g + g') = f ⋆[L, μ] g + f ⋆[L, μ] g'

(hfg : MeasureTheory.ConvolutionExists f g L μ)

(hfg' : MeasureTheory.ConvolutionExists f g' L μ)

MeasureTheory.convolution f (g + g') L μ = MeasureTheory.convolution f g L μ + MeasureTheory.convolution f g' L μ


/-- Alternatizing a multilinear map that is already alternating results in a scale factor of `n!`,
where `n` is the number of inputs. -/
theorem coe_alternatization [DecidableEq ι] [Fintype ι] (a : M [⋀^ι]→ₗ[R] N') :
    MultilinearMap.alternatization (a : MultilinearMap R (fun _ => M) N')
    = Nat.factorial (Fintype.card ι) • a

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N' : Type u_6}
[AddCommGroup N']
[Module R N']
{ι : Type u_7}
[DecidableEq ι]
[Fintype ι]
(a : M [⋀^ι]→ₗ[R] N')

MultilinearMap.alternatization ↑a = (Fintype.card ι).factorial • a


theorem thinkN_equiv (s : Computation α) (n) : thinkN s n ~ s

{α : Type u}
(s : Computation α)
(n : ℕ)


/-- If two additive homomorphisms from `⨁ i, β i` are equal on each `of β i y`,
then they are equal.

See note [partially-applied ext lemmas]. -/
@[ext high]
theorem addHom_ext' {γ : Type*} [AddMonoid γ] ⦃f g : (⨁ i, β i) →+ γ⦄
    (H : ∀ i : ι, f.comp (of _ i) = g.comp (of _ i)) : f = g

(H : ∀ (i : ι), f.comp (DirectSum.of β i) = g.comp (DirectSum.of β i))


theorem unit_mem_mul_iff_mem_swap_mul {a b : A} {r : Rˣ} : ↑r ∈ σ (a * b) ↔ ↑r ∈ σ (b * a)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{a b : A}
{r : Rˣ}

↑r ∈ spectrum R (a * b) ↔ ↑r ∈ spectrum R (b * a)


@[mono]
theorem vsub_subset_vsub : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ -ᵥ t₁ ⊆ s₂ -ᵥ t₂

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{s₁ s₂ t₁ t₂ : Set β}

s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ -ᵥ t₁ ⊆ s₂ -ᵥ t₂


@[simp] lemma inter_eq_right : t ∩ s = s ↔ s ⊆ t

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


/-- The two-variable Jacobi theta function is quasi-periodic in `z` with period `τ`. -/
lemma jacobiTheta₂_add_left' (z τ : ℂ) :
    jacobiTheta₂ (z + τ) τ = cexp (-π * I * (τ + 2 * z)) * jacobiTheta₂ z τ

jacobiTheta₂ (z + τ) τ = cexp (-↑π * Complex.I * (τ + 2 * z)) * jacobiTheta₂ z τ


lemma Even.tsub [CanonicallyLinearOrderedAddCommMonoid α] [Sub α] [OrderedSub α]
    [ContravariantClass α α (· + ·) (· ≤ ·)] {m n : α} (hm : Even m) (hn : Even n) :
    Even (m - n)

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


theorem submodule_span_single :
    Submodule.span (reesAlgebra I) (⋃ i, single R i '' (F.N i : Set M)) = F.submodule

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
(F : I.Filtration M)

Submodule.span (↥(reesAlgebra I)) (⋃ i, ⇑(PolynomialModule.single R i) '' ↑(F.N i)) = F.submodule


/-- The functor sending an arrow to its source. -/
@[simps!]
def leftFunc : Arrow C ⥤ C

(X : CategoryTheory.Comma (CategoryTheory.Functor.id C) (CategoryTheory.Functor.id C))

CategoryTheory.Arrow.leftFunc.obj X = X.left


@[simp] lemma den_ne_zero (q : ℚ≥0) : q.den ≠ 0


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

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
{δ : Type u_6}
[Inf α]
[Inf β]
[Inf γ]
[Inf δ]
(f : InfHom γ δ)
(g : InfHom β γ)
(h : InfHom α β)


theorem QuotientAddGroup.norm_lt_iff {S : AddSubgroup M} {x : M ⧸ S} {r : ℝ} :
    ‖x‖ < r ↔ ∃ m : M, ↑m = x ∧ ‖m‖ < r

{M : Type u_1}
[SeminormedAddCommGroup M]
{S : AddSubgroup M}
{x : M ⧸ S}
{r : ℝ}


lemma exists_image_eq_injOn_of_subset_range (ht : t ⊆ range f) :
    ∃ s, f '' s = t ∧ InjOn f s

{α : Type u_1}
{β : Type u_2}
{t : Set β}
{f : α → β}
(ht : t ⊆ Set.range f)


theorem uniformContinuous_infDist_Hausdorff_dist :
    UniformContinuous fun p : α × NonemptyCompacts α => infDist p.1 p.2

UniformContinuous fun p => Metric.infDist p.1 ↑p.2


theorem span_singleton_le_span_singleton {x y : α} :
    span ({x} : Set α) ≤ span ({y} : Set α) ↔ y ∣ x


@[simp]
theorem box_zero : box (n + 1) 0 = ∅


@[to_additive LipschitzWith.nnorm_le_mul]
theorem LipschitzWith.nnorm_le_mul' {f : E → F} {K : ℝ≥0} (h : LipschitzWith K f) (hf : f 1 = 1)
    (x) : ‖f x‖₊ ≤ K * ‖x‖₊

{E : Type u_3}
{F : Type u_4}
[SeminormedGroup E]
[SeminormedGroup F]
{f : E → F}
{K : ℝ≥0}
(h : LipschitzWith K f)
(hf : f 1 = 1)
(x : E)

‖f x‖₊ ≤ K * ‖x‖₊


@[simp] lemma comap_adj {G : SimpleGraph W} {f : V → W} :
    (G.comap f).Adj u v ↔ G.Adj (f u) (f v)

{V : Type u_1}
{W : Type u_2}
{u v : V}
{G : SimpleGraph W}
{f : V → W}

(SimpleGraph.comap f G).Adj u v ↔ G.Adj (f u) (f v)


/-- **No wrap-around principle**.

The first `k` elements of `Fin (n + 1)` are `m`-Freiman isomorphic to the first `k` elements of `ℕ`
assuming there is no wrap-around. -/
lemma isAddFreimanIso_Iio (hm : m ≠ 0) (hkmn : m * k ≤ n) :
    IsAddFreimanIso m (Iio (k : Fin (n + 1))) (Iio k) val

{k m n : ℕ}
(hm : m ≠ 0)
(hkmn : m * k ≤ n)

IsAddFreimanIso m (Set.Iio ↑k) (Set.Iio k) Fin.val


@[mono]
theorem toAddSubgroup_strictMono : StrictMono (toAddSubgroup : Subring R → AddSubgroup R)


theorem coe_addMonoidHom_injective : Function.Injective ((↑) : (A →ₐ[R] B) → A →+ B)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]


theorem preimage_frontier (s : Set Y) :
    e.source ∩ e ⁻¹' frontier s = e.source ∩ frontier (e ⁻¹' s)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(s : Set Y)

e.source ∩ ↑e ⁻¹' frontier s = e.source ∩ frontier (↑e ⁻¹' s)


theorem range_diagonal [DecidableEq m] (w : m → K) :
    LinearMap.range (toLin' (diagonal w)) =
      ⨆ i ∈ { i | w i ≠ 0 }, LinearMap.range (LinearMap.stdBasis K (fun _ => K) i)

{m : Type u_1}
[Fintype m]
{K : Type u}
[Semifield K]
[DecidableEq m]
(w : m → K)

LinearMap.range (Matrix.toLin' (Matrix.diagonal w)) =
  ⨆ i ∈ {i | w i ≠ 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)


theorem Ioc_subset_Ioi_self : Ioc a b ⊆ Ioi a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
[LocallyFiniteOrderTop α]


theorem Filter.Tendsto.rpow_const {l : Filter α} {f : α → ℝ} {x p : ℝ} (hf : Tendsto f l (𝓝 x))
    (h : x ≠ 0 ∨ 0 ≤ p) : Tendsto (fun a => f a ^ p) l (𝓝 (x ^ p))

{α : Type u_1}
{l : Filter α}
{f : α → ℝ}
{x p : ℝ}
(hf : Filter.Tendsto f l (𝓝 x))
(h : x ≠ 0 ∨ 0 ≤ p)

Filter.Tendsto (fun a => f a ^ p) l (𝓝 (x ^ p))


theorem comap_dualAnnihilator (Φ : Submodule R (Module.Dual R M)) :
    Φ.dualAnnihilator.comap (Module.Dual.eval R M) = Φ.dualCoannihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(Φ : Submodule R (Module.Dual R M))

Submodule.comap (Module.Dual.eval R M) Φ.dualAnnihilator = Φ.dualCoannihilator


@[simp]
theorem pi_proj (p : Path.Homotopic.Quotient as bs) : (pi fun i => proj i p) = p

{ι : Type u_1}
{X : ι → Type u_2}
[(i : ι) → TopologicalSpace (X i)]
{as bs : (i : ι) → X i}
(p : Path.Homotopic.Quotient as bs)

(Path.Homotopic.pi fun i => Path.Homotopic.proj i p) = p


@[simp]
theorem pi_empty (p : (i : ι) → Submodule R (φ i)) : pi ∅ p = ⊤

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(p : (i : ι) → Submodule R (φ i))


/-- If the preimage of a set under an injective map is nontrivial, the set is nontrivial. -/
theorem nontrivial_of_preimage {f : α → β} (hf : Function.Injective f) (s : Set β)
    (hs : (f ⁻¹' s).Nontrivial) : s.Nontrivial

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(s : Set β)
(hs : (f ⁻¹' s).Nontrivial)


@[simp]
theorem diagonal' (F : C × D ⥤ E) (X X' : C) (f : X ⟶ X') (Y Y' : D) (g : Y ⟶ Y') :
    F.map ((f, 𝟙 Y) : (X, Y) ⟶ (X', Y)) ≫ F.map ((𝟙 X', g) : (X', Y) ⟶ (X', Y')) =
      F.map ((f, g) : (X, Y) ⟶ (X', Y'))

{C : Type u₁}
{D : Type u₂}
{E : Type u₃}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.Category.{v₃, u₃} E]
(F : C × D ⥤ E)
(X X' : C)
(f : X ⟶ X')
(Y Y' : D)
(g : Y ⟶ Y')

F.map (f, 𝟙 Y) ≫ F.map (𝟙 X', g) = F.map (f, g)


@[to_additive]
theorem CommMonoid.toMonoid_injective {M : Type u} :
    Function.Injective (@CommMonoid.toMonoid M)


@[simp]
theorem map_tmul {M M' : ModuleCat.{v} R} (g : M ⟶ M') (s : S) (m : M) :
    (extendScalars f).map g (s⊗ₜ[R,f]m) = s⊗ₜ[R,f]g m

{R : Type u₁}
{S : Type u₂}
[CommRing R]
[CommRing S]
(f : R →+* S)
{M M' : ModuleCat R}
(g : M ⟶ M')
(s : S)
(m : ↑M)

((ModuleCat.extendScalars f).map g) (s ⊗ₜ[R] m) = s ⊗ₜ[R] g m


@[to_additive]
theorem IsOfFinOrder.mono [Monoid β] {y : β} (hx : IsOfFinOrder x) (h : orderOf y ∣ orderOf x) :
    IsOfFinOrder y

{G : Type u_1}
{β : Type u_5}
[AddMonoid G]
{x : G}
[AddMonoid β]
{y : β}
(hx : IsOfFinAddOrder x)
(h : addOrderOf y ∣ addOrderOf x)


@[simp]
theorem some_orElse' (a : α) (x : Option α) : (some a).orElse (fun _ ↦ x) = some a


/-- An `AddMonoidWithOne` is an `AddMonoid` with a `1`.
It also contains data for the unique homomorphism `ℕ → R`. -/
class AddMonoidWithOne (R : Type*) extends NatCast R, AddMonoid R, One R where
  natCast := Nat.unaryCast
  /-- The canonical map `ℕ → R` sends `0 : ℕ` to `0 : R`. -/
  natCast_zero : natCast 0 = 0 := by intros; rfl
  /-- The canonical map `ℕ → R` is a homomorphism. -/
  natCast_succ : ∀ n, natCast (n + 1) = natCast n + 1 := by intros; rfl

{R : Type u_2}
[self : AddMonoidWithOne R]


lemma uIoc_injective_left (a : α) : Injective (Ι a)


theorem admissible_D' (n : ℕ+) : Admissible (D' n)


/-- An ordered additive commutative group is an additive commutative group
with a partial order in which addition is strictly monotone. -/
class OrderedAddCommGroup (α : Type u) extends AddCommGroup α, PartialOrder α where
  /-- Addition is monotone in an ordered additive commutative group. -/
  protected add_le_add_left : ∀ a b : α, a ≤ b → ∀ c : α, c + a ≤ c + b

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


theorem Perm.take_inter [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs ~ ys)
    (h' : ys.Nodup) : xs.take n ~ ys.inter (xs.take n)

{α : Type u_1}
[DecidableEq α]
{xs ys : List α}
(n : ℕ)
(h : xs.Perm ys)
(h' : ys.Nodup)

(List.take n xs).Perm (ys.inter (List.take n xs))


protected theorem mul_right' (c : ℕ) (h : a ≡ b [MOD n]) : a * c ≡ b * c [MOD n * c]


/-- If `f : X → Y` is a `Inducing`, `f(F)` is path-connected iff `F` is. -/
nonrec theorem Inducing.isPathConnected_iff {f : X → Y} (hf : Inducing f) :
    IsPathConnected F ↔ IsPathConnected (f '' F)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{F : Set X}
{f : X → Y}
(hf : Inducing f)


@[simp]
theorem one_lt_lift_iff {a : Cardinal.{u}} :
    (1 : Cardinal) < lift.{v} a ↔ 1 < a


@[simp]
theorem conj_comp (f g : End X) : α.conj (f ≫ g) = α.conj f ≫ α.conj g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(α : X ≅ Y)
(f g : CategoryTheory.End X)

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


@[simp]
theorem iSupLift_comp_inclusion {dir : Directed (· ≤ ·) K} {f : ∀ i, K i →ₐ[R] B}
    {hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h)}
    {T : Subalgebra R A} {hT : T = iSup K} {i : ι} (h : K i ≤ T) :
    (iSupLift K dir f hf T hT).comp (inclusion h) = f i

{dir : Directed (fun x x_1 => x ≤ x_1) K}

{hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (Subalgebra.inclusion h)}

(Subalgebra.iSupLift K dir f hf T hT).comp (Subalgebra.inclusion h) = f i


/-- If `X` is a normal topological space and `U i`, `i : ι`, is a locally finite open covering of a
closed set `s`, then there exists a `BumpCovering ι X s` that is subordinate to `U`. If `X` is a
paracompact space, then the assumption `hf : LocallyFinite U` can be omitted, see
`BumpCovering.exists_isSubordinate`. -/
theorem exists_isSubordinate_of_locallyFinite [NormalSpace X] (hs : IsClosed s) (U : ι → Set X)
    (ho : ∀ i, IsOpen (U i)) (hf : LocallyFinite U) (hU : s ⊆ ⋃ i, U i) :
    ∃ f : BumpCovering ι X s, f.IsSubordinate U

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
[NormalSpace X]
(hs : IsClosed s)
(U : ι → Set X)
(ho : ∀ (i : ι), IsOpen (U i))
(hf : LocallyFinite U)
(hU : s ⊆ ⋃ i, U i)


/-- To check that a function is `n` times continuously differentiable, it suffices to check that its
first `n` derivatives are differentiable. This is slightly too strong as the condition we
require on the `n`-th derivative is differentiability instead of continuity, but it has the
advantage of avoiding the discussion of continuity in the proof (and for `n = ∞` this is optimal).
-/
theorem contDiffOn_of_differentiableOn_deriv {n : ℕ∞}
    (h : ∀ m : ℕ, (m : ℕ∞) ≤ n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s) :
    ContDiffOn 𝕜 n f s

(h : ∀ (m : ℕ), ↑m ≤ n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s)


(R : Type u_1)
(A : Type u_2)
[CommRing R]
[CommRing A]
[Algebra R A]


theorem Matrix.isRepresentation.toEnd_exists_mem_ideal (f : Module.End R M) (I : Ideal R)
    (hI : LinearMap.range f ≤ I • ⊤) :
    ∃ M, Matrix.isRepresentation.toEnd R b hb M = f ∧ ∀ i j, M.1 i j ∈ I

(hb : Submodule.span R (Set.range b) = ⊤)

∃ M_1, (Matrix.isRepresentation.toEnd R b hb) M_1 = f ∧ ∀ (i j : ι), ↑M_1 i j ∈ I


theorem pred_ne_self : ∀ {a}, a ≠ 0 → pred a ≠ a


theorem continuousWithinAt_iff [PseudoMetricSpace β] {f : α → β} {a : α} {s : Set α} :
    ContinuousWithinAt f s a ↔
      ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) (f a) < ε

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


theorem mem_span_latticeBasis [NumberField K] (x : (K →+* ℂ) → ℂ) :
    x ∈ Submodule.span ℤ (Set.range (latticeBasis K)) ↔
      x ∈ ((canonicalEmbedding K).comp (algebraMap (𝓞 K) K)).range

(K : Type u_1)
[Field K]
[NumberField K]
(x : (K →+* ℂ) → ℂ)

x ∈ Submodule.span ℤ (Set.range ⇑(NumberField.canonicalEmbedding.latticeBasis K)) ↔
  x ∈ ((NumberField.canonicalEmbedding K).comp (algebraMap (NumberField.RingOfIntegers K) K)).range


/-- Composition on the left by a continuous linear map, as a `LinearMap`.
Similar to `LinearMap.compLeft`. -/
@[simps]
protected def _root_.ContinuousLinearMap.compLeftContinuous (α : Type*) [TopologicalSpace α]
    (g : M →L[R] M₂) : C(α, M) →ₗ[R] C(α, M₂)

(R : Type u_3)
{M : Type u_5}
[TopologicalSpace M]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[ContinuousAdd M]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M₂]
[Module R M₂]
[ContinuousConstSMul R M₂]
(α : Type u_7)
[TopologicalSpace α]
(g : M →L[R] M₂)

∀ (a : C(α, M)),
  (ContinuousLinearMap.compLeftContinuous R α g) a =
    (↑(AddMonoidHom.compLeftContinuous α (↑g).toAddMonoidHom ⋯)).toFun a


theorem data_dropWhile (p) : ∀ {s}, Valid s →
    (s.dropWhile p).toString.1 = s.toString.1.dropWhile p

s.Valid → (s.dropWhile p).toString.data = List.dropWhile p s.toString.data


theorem ncard_eq_two : s.ncard = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y}


theorem isPiSystem_Icc_mem (s t : Set α) :
    IsPiSystem { S | ∃ᵉ (l ∈ s) (u ∈ t), l ≤ u ∧ Icc l u = S }

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

IsPiSystem {S | ∃ l ∈ s, ∃ u ∈ t, l ≤ u ∧ Set.Icc l u = S}


/--
A finite-dimensional Lie algebra over a field is semisimple
if it does not have non-trivial abelian ideals and it admits a
non-degenerate reflexive invariant bilinear form.
Here a form is *invariant* if it is compatible with the Lie bracket: `Φ ⁅x, y⁆ z = Φ x ⁅y, z⁆`.
-/
theorem isSemisimple_of_nondegenerate : IsSemisimple K L

(hΦ_inv : LinearMap.BilinForm.lieInvariant L Φ)

(hL : ∀ (I : LieIdeal K L), IsAtom I → ¬IsLieAbelian ↥↑I)


@[simp]
theorem card_sub {s t : Multiset α} (h : t ≤ s) : card (s - t) = card s - card t

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}
(h : t ≤ s)

Multiset.card (s - t) = Multiset.card s - Multiset.card t


@[simp]
theorem abs_natCast (n : ℕ) : Complex.abs n = n


theorem Poly.denote_le_cancelAux (ctx : Context) (fuel : Nat) (m₁ m₂ r₁ r₂ : Poly)
    (h : denote_le ctx (r₁.reverse ++ m₁, r₂.reverse ++ m₂)) : denote_le ctx (cancelAux fuel m₁ m₂ r₁ r₂)

(h : Nat.Linear.Poly.denote_le ctx (List.reverse r₁ ++ m₁, List.reverse r₂ ++ m₂))

Nat.Linear.Poly.denote_le ctx (Nat.Linear.Poly.cancelAux fuel m₁ m₂ r₁ r₂)


@[simp]
theorem length_toList (s : Finset α) : s.toList.length = s.card


/-- Proof used in definition of `Finset.noncommProd` -/
@[to_additive]
theorem noncommProd_lemma (s : Finset α) (f : α → β)
    (comm : (s : Set α).Pairwise fun a b => Commute (f a) (f b)) :
    Set.Pairwise { x | x ∈ Multiset.map f s.val } Commute

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

{x | x ∈ Multiset.map f s.val}.Pairwise Commute


theorem le_opNorm_mul_prod_of_le {b : ι → ℝ} (hm : ∀ i, ‖m i‖ ≤ b i) : ‖f m‖ ≤ ‖f‖ * ∏ i, b i

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


protected theorem trans {x y z} : c x y → c y z → c x z

{R : Type u_2}
[Add R]
[Mul R]
(c : RingCon R)
{x y z : R}


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

{d : ℕ → ℝ≥0∞}

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


theorem mdifferentiableAt_const : MDifferentiableAt I I' (fun _ : M => c) x

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


theorem irreducible : Irreducible (minpoly G F x)

(G : Type u)
[Group G]
(F : Type v)
[Field F]
[MulSemiringAction G F]
[Fintype G]
(x : F)


/-- Postcomposing a cone by the composite natural transformation `α ≫ β` is the same as
postcomposing by `α` and then by `β`. -/
@[simps!]
def postcomposeComp {G H : J ⥤ C} (α : F ⟶ G) (β : G ⟶ H) :
    postcompose (α ≫ β) ≅ postcompose α ⋙ postcompose β

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G H : J ⥤ C}
(α : F ⟶ G)
(β : G ⟶ H)
(X : CategoryTheory.Limits.Cone F)

((CategoryTheory.Limits.Cones.postcomposeComp α β).hom.app X).hom = 𝟙 X.pt


theorem mem_nhdsWithin_iff {t : Set α} : s ∈ 𝓝[t] x ↔ ∃ ε > 0, ball x ε ∩ t ⊆ s

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

s ∈ 𝓝[t] x ↔ ∃ ε > 0, Metric.ball x ε ∩ t ⊆ s


@[reassoc (attr := simp)]
lemma ι_mapBifunctorComp₂₃MapObjIso_hom (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J)
    (h : r (i₁, i₂, i₃) = j) :
    ιMapTrifunctorMapObj (bifunctorComp₂₃ F G₂₃) r X₁ X₂ X₃ i₁ i₂ i₃ j h ≫
      (mapBifunctorComp₂₃MapObjIso F G₂₃ ρ₂₃ X₁ X₂ X₃).hom j =
      ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h

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

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

(ρ₂₃ : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)

(X₁ : CategoryTheory.GradedObject I₁ C₁)

(X₂ : CategoryTheory.GradedObject I₂ C₂)

(X₃ : CategoryTheory.GradedObject I₃ C₃)

[(((CategoryTheory.GradedObject.mapBifunctor G₂₃ I₂ I₃).obj X₂).obj X₃).HasMap ρ₂₃.p]

[(((CategoryTheory.GradedObject.mapBifunctor F I₁ ρ₂₃.I₂₃).obj X₁).obj
        (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃)).HasMap
    ρ₂₃.q]

[H : CategoryTheory.GradedObject.HasGoodTrifunctor₂₃Obj F G₂₃ ρ₂₃ X₁ X₂ X₃]

[((((CategoryTheory.GradedObject.mapTrifunctor (CategoryTheory.bifunctorComp₂₃ F G₂₃) I₁ I₂ I₃).obj X₁).obj X₂).obj
        X₃).HasMap
    r]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.ιMapTrifunctorMapObj (CategoryTheory.bifunctorComp₂₃ F G₂₃) r X₁ X₂ X₃ i₁ i₂ i₃ j h)
    ((CategoryTheory.GradedObject.mapBifunctorComp₂₃MapObjIso F G₂₃ ρ₂₃ X₁ X₂ X₃).hom j) =
  CategoryTheory.GradedObject.ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h


@[simp]
theorem comap_top (f : R →ₙ+* S) : (⊤ : NonUnitalSubring S).comap f = ⊤

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(f : R →ₙ+* S)


@[simp]
theorem sumProdDistrib_symm_apply_right (b : β × γ) :
    (sumProdDistrib α β γ).symm (inr b) = (inr b.1, b.2)

{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(b : β × γ)

(Equiv.sumProdDistrib α β γ).symm (Sum.inr b) = (Sum.inr b.1, b.2)


/-- Introduction rule to prove that `b` is the infimum of `f`: it suffices to check that `b`
is smaller than `f i` for all `i`, and that this is not the case of any `w>b`.
See `ciInf_eq_of_forall_ge_of_forall_gt_exists_lt` for a version in conditionally complete
lattices. -/
theorem iInf_eq_of_forall_ge_of_forall_gt_exists_lt :
    (∀ i, b ≤ f i) → (∀ w, b < w → ∃ i, f i < w) → ⨅ i, f i = b

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{f : ι → α}
{b : α}

(∀ (i : ι), b ≤ f i) → (∀ (w : α), b < w → ∃ i, f i < w) → ⨅ i, f i = b


theorem Injective.bijective₂_of_surjective {g : γ → α} (hf : Injective f) (hg : Injective g)
    (S : Surjective (f ∘ g)) : Bijective f ∧ Bijective g

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
{g : γ → α}
(hf : Function.Injective f)
(hg : Function.Injective g)
(S : Function.Surjective (f ∘ g))

Function.Bijective f ∧ Function.Bijective g


@[to_additive]
theorem prod_filter (p : α → Prop) [DecidablePred p] (f : α → β) :
    ∏ a ∈ s.filter p, f a = ∏ a ∈ s, if p a then f a else 1

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[AddCommMonoid β]
(p : α → Prop)
[DecidablePred p]
(f : α → β)

∑ a ∈ Finset.filter p s, f a = ∑ a ∈ s, if p a then f a else 0


theorem strictConvex_uIcc (r s : β) : StrictConvex 𝕜 (uIcc r s)

{𝕜 : Type u_1}
{β : Type u_5}
[OrderedSemiring 𝕜]
[TopologicalSpace β]
[LinearOrderedCancelAddCommMonoid β]
[OrderTopology β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r s : β)


theorem leadingCoeff_divByMonic_X_sub_C (p : R[X]) (hp : degree p ≠ 0) (a : R) :
    leadingCoeff (p /ₘ (X - C a)) = leadingCoeff p

{R : Type u}
[CommRing R]
[IsDomain R]
(p : R[X])
(hp : p.degree ≠ 0)
(a : R)

(p /ₘ (Polynomial.X - Polynomial.C a)).leadingCoeff = p.leadingCoeff


theorem reverse_singleton (a : α) : reverse [a] = [a]


@[simp]
theorem coe_toHom {f : M ≃[L] N} : (f.toHom : M → N) = (f : M → N)

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{f : L.Equiv M N}


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

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

(CategoryTheory.Kleisli.Adjunction.toKleisli T).map f = CategoryTheory.CategoryStruct.comp f (T.η.app Y)


theorem nonempty_of_mem {f : Filter α} [hf : NeBot f] {s : Set α} (hs : s ∈ f) : s.Nonempty

{α : Type u}
{f : Filter α}
[hf : f.NeBot]
{s : Set α}
(hs : s ∈ f)


theorem natDegree_pos_iff_degree_pos : 0 < natDegree p ↔ 0 < degree p


@[simp]
lemma cotangentComplex_mk (x) : P.cotangentComplex (.mk x) = 1 ⊗ₜ .D _ _ x

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

P.cotangentComplex (Algebra.Generators.Cotangent.mk x) = 1 ⊗ₜ[P.Ring] (KaehlerDifferential.D R P.Ring) ↑x


{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]


theorem covering_of_eq_top : S = ⊤ → S ∈ J X

(J : CategoryTheory.GrothendieckTopology C)


@[simp]
theorem toFinsupp_eq_zero {a : R[X]} : a.toFinsupp = 0 ↔ a = 0


protected theorem is_basis [T : TopologicalSpace α] (F : Realizer α) :
    TopologicalSpace.IsTopologicalBasis (Set.range F.F.f)

{α : Type u_1}
[T : TopologicalSpace α]
(F : Ctop.Realizer α)


theorem hasStrictDerivAt_pow :
    ∀ (n : ℕ) (x : 𝕜), HasStrictDerivAt (fun x : 𝕜 ↦ x ^ n) ((n : 𝕜) * x ^ (n - 1)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(n : ℕ)
(x : 𝕜)

HasStrictDerivAt (fun x => x ^ n) (↑n * x ^ (n - 1)) x


/-- If the measure `μ.trim hm` is sigma-finite, then the conditional expectation of a measurable set
with finite measure is integrable. -/
theorem integrable_condexpIndSMul (hm : m ≤ m0) [SigmaFinite (μ.trim hm)] (hs : MeasurableSet s)
    (hμs : μ s ≠ ∞) (x : G) : Integrable (condexpIndSMul hm hs hμs x) μ

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

MeasureTheory.Integrable (↑↑(MeasureTheory.condexpIndSMul hm hs hμs x)) μ


theorem nonempty_of_pos_dist (h : 0 < G.dist u v) :
    (Set.univ : Set (G.Walk u v)).Nonempty

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
(h : 0 < G.dist u v)


@[simp]
theorem pell_eqz (n : ℕ) : xz a1 n * xz a1 n - d a1 * yz a1 n * yz a1 n = 1

Pell.xz a1 n * Pell.xz a1 n - ↑(Pell.d a1) * Pell.yz a1 n * Pell.yz a1 n = 1


@[simp]
theorem coeff_X_mul (m) (s : σ) (p : MvPolynomial σ R) :
    coeff (Finsupp.single s 1 + m) (X s * p) = coeff m p

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(m : σ →₀ ℕ)
(s : σ)
(p : MvPolynomial σ R)

MvPolynomial.coeff (Finsupp.single s 1 + m) (MvPolynomial.X s * p) = MvPolynomial.coeff m p


@[simp]
theorem ofLeftInverse_symm_apply {g : B → A} {f : A →ₐ[R] B} (h : Function.LeftInverse g f)
    (x : f.range) : (ofLeftInverse h).symm x = g x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
{g : B → A}
{f : A →ₐ[R] B}
(h : Function.LeftInverse g ⇑f)
(x : ↥f.range)

(AlgEquiv.ofLeftInverse h).symm x = g ↑x


theorem log_neg_iff (h : 0 < x) : log x < 0 ↔ x < 1


theorem differentiable_circleMap (c : ℂ) (R : ℝ) : Differentiable ℝ (circleMap c R)


@[simp]
theorem sSup_atoms_le_eq (b : α) : sSup { a : α | IsAtom a ∧ a ≤ b } = b

{α : Type u_2}
[CompleteLattice α]
[IsAtomistic α]
(b : α)


@[to_additive]
theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i

{I : Type u}
{f : I → Type v₁}
(x y : (i : I) → f i)
[(i : I) → Sub (f i)]


@[simp] lemma rpow_rpow_inv {y : ℝ} (hy : y ≠ 0) (x : ℝ≥0) : (x ^ y) ^ y⁻¹ = x


@[simp]
theorem coe_piCongr_symm : ((h₁.piCongr h₂).symm :
    (∀ b, Z b) → ∀ a, W a) = fun f a => (h₂ a).symm (f (h₁ a))

{α : Sort u_2}
{β : Sort u_1}
{W : α → Sort w}
{Z : β → Sort z}
(h₁ : α ≃ β)
(h₂ : (a : α) → W a ≃ Z (h₁ a))

⇑(h₁.piCongr h₂).symm = fun f a => (h₂ a).symm (f (h₁ a))


/-- If the average of a function `f` along a sequence of sets `aₙ` converges to `c` (more precisely,
we require that `⨍ y in a i, ‖f y - c‖ ∂μ` tends to `0`), then the integral of `gₙ • f` also tends
to `c` if `gₙ` is supported in `aₙ`, has integral converging to one and supremum at most `K / μ aₙ`.
-/
theorem tendsto_integral_smul_of_tendsto_average_norm_sub
    {ι : Type*} {a : ι → Set α} {l : Filter ι} {f : α → E} {c : E} {g : ι → α → ℝ} (K : ℝ)
    (hf : Tendsto (fun i ↦ ⨍ y in a i, ‖f y - c‖ ∂μ) l (𝓝 0))
    (f_int : ∀ᶠ i in l, IntegrableOn f (a i) μ)
    (hg : Tendsto (fun i ↦ ∫ y, g i y ∂μ) l (𝓝 1))
    (g_supp : ∀ᶠ i in l, Function.support (g i) ⊆ a i)
    (g_bound : ∀ᶠ i in l, ∀ x, |g i x| ≤ K / (μ (a i)).toReal) :
    Tendsto (fun i ↦ ∫ y, g i y • f y ∂μ) l (𝓝 c)

{g : ι → α → ℝ}

(hf : Filter.Tendsto (fun i => ⨍ (y : α) in a i, ‖f y - c‖ ∂μ) l (𝓝 0))

(f_int : ∀ᶠ (i : ι) in l, MeasureTheory.IntegrableOn f (a i) μ)

(hg : Filter.Tendsto (fun i => ∫ (y : α), g i y ∂μ) l (𝓝 1))

(g_supp : ∀ᶠ (i : ι) in l, Function.support (g i) ⊆ a i)

(g_bound : ∀ᶠ (i : ι) in l, ∀ (x : α), |g i x| ≤ K / (μ (a i)).toReal)

Filter.Tendsto (fun i => ∫ (y : α), g i y • f y ∂μ) l (𝓝 c)


/-- The `y`-coordinate of a fundamental solution is a lower bound for the `y`-coordinate
of any positive solution. -/
theorem y_le_y {a₁ : Solution₁ d} (h : IsFundamental a₁) {a : Solution₁ d} (hax : 1 < a.x)
    (hay : 0 < a.y) : a₁.y ≤ a.y

{d : ℤ}
{a₁ : Pell.Solution₁ d}
(h : Pell.IsFundamental a₁)
{a : Pell.Solution₁ d}
(hax : 1 < a.x)
(hay : 0 < a.y)


@[reassoc, simp]
theorem comp_sub : f ≫ (g - g') = f ≫ g - f ≫ g'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{P Q R : C}
(f : P ⟶ Q)
(g g' : Q ⟶ R)


lemma rpow_lt_rpow_of_neg (hx : 0 < x) (hxy : x < y) (hz : z < 0) : y ^ z < x ^ z


theorem sSup_image2_eq_sSup_sSup (h₁ : ∀ b, GaloisConnection (swap l b) (u₁ b))
    (h₂ : ∀ a, GaloisConnection (l a) (u₂ a)) : sSup (image2 l s t) = l (sSup s) (sSup t)

{l : α → β → γ}

{u₁ : β → γ → α}

{u₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (Function.swap l b) (u₁ b))

(h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a))

sSup (Set.image2 l s t) = l (sSup s) (sSup t)


lemma of_injective {N F} [SMul R N] [FunLike F M N] [MulActionHomClass F R M N]
    (f : F) {r : R} (h1 : Function.Injective f) (h2 : IsSMulRegular N r) :
    IsSMulRegular M r

{R : Type u_1}
{M : Type u_3}
[SMul R M]
{N : Type u_4}
{F : Type u_5}
[SMul R N]
[FunLike F M N]
[MulActionHomClass F R M N]
(f : F)
{r : R}
(h1 : Function.Injective ⇑f)
(h2 : IsSMulRegular N r)


theorem CPolynomialOn_congr' {s : Set E} (h : f =ᶠ[𝓝ˢ s] g) :
    CPolynomialOn 𝕜 f s ↔ CPolynomialOn 𝕜 g s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{s : Set E}
(h : f =ᶠ[𝓝ˢ s] g)


nonrec theorem neg_le_neg {i : Set α} (hi : MeasurableSet i) (h : v ≤[i] w) : -w ≤[i] -v

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[OrderedAddCommGroup M]
[TopologicalAddGroup M]
(v w : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : MeasurableSet i)
(h : v.restrict i ≤ w.restrict i)


theorem card_mul_eq_card_mul [∀ a b, Decidable (r a b)]
    (hm : ∀ a ∈ s, (t.bipartiteAbove r a).card = m)
    (hn : ∀ b ∈ t, (s.bipartiteBelow r b).card = n) : s.card * m = t.card * n

(hm : ∀ a ∈ s, (Finset.bipartiteAbove r t a).card = m)

(hn : ∀ b ∈ t, (Finset.bipartiteBelow r s b).card = n)


theorem exists_mem_compactCovering (x : X) : ∃ n, x ∈ compactCovering X n

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


theorem foldr_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → motive i.1 (f as[i] b)) :
    motive 0 (as.foldr f init)

{f : α → β → β}

(hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b))

motive 0 (Array.foldrM.fold f as 0 i hi b)


@[reassoc (attr := simp)]
theorem triangle_assoc_comp_right (f : a ⟶ b) (g : b ⟶ c) :
    (α_ f (𝟙 b) g).inv ≫ (ρ_ f).hom ▷ g = f ◁ (λ_ g).hom

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.id b) g).inv
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.rightUnitor f).hom g) =
  CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.leftUnitor g).hom


@[gcongr]
theorem card_le_card : s ⊆ t → s.card ≤ t.card


@[simp]
theorem Units.inv_pos
    [ZeroLEOneClass α] [NeZero (R := α) 1] [PosMulStrictMono α]
    {u : αˣ} : (0 : α) < ↑u⁻¹ ↔ (0 : α) < u

{α : Type u}
[Semiring α]
[LinearOrder α]
[ZeroLEOneClass α]
[NeZero 1]
[PosMulStrictMono α]
{u : αˣ}


/-- A multiplicative action M ↻ X viewed as a functor mapping the single object of M to X
  and an element `m : M` to the map `X → X` given by multiplication by `m`. -/
@[simps]
def actionAsFunctor : SingleObj M ⥤ Type u

(M : Type u_1)
[Monoid M]
(X : Type u)
[MulAction M X]

∀ (x : CategoryTheory.SingleObj M), (CategoryTheory.actionAsFunctor M X).obj x = X


theorem map_id_right_eq_curry_swap_map {j j' : J} {f : j ⟶ j'} {k : K} :
    F.map ((f, 𝟙 k) : (j, k) ⟶ (j', k)) = ((curry.obj (Prod.swap K J ⋙ F)).obj k).map f

{J : Type u₁}
{K : Type u₂}
[CategoryTheory.Category.{v₁, u₁} J]
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : J × K ⥤ C)
{j j' : J}
{f : j ⟶ j'}
{k : K}

F.map (f, 𝟙 k) = ((CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ F)).obj k).map f


@[simp] lemma cast_eq_zero : (p : R) = 0

(R : Type u_1)
[AddMonoidWithOne R]
(p : ℕ)
[CharP R p]


/-- Convert a `Bicone` over a function on `WalkingPair` to a BinaryBicone. -/
@[simps]
def toBinaryBiconeFunctor {X Y : C} : Bicone (pairFunction X Y) ⥤ BinaryBicone X Y

(b : CategoryTheory.Limits.Bicone (CategoryTheory.Limits.pairFunction X Y))

(CategoryTheory.Limits.Bicone.toBinaryBiconeFunctor.obj b).snd = b.π CategoryTheory.Limits.WalkingPair.right


theorem blsub_nadd_of_mono {f : ∀ c < a ♯ b, Ordinal.{max u v}}
    (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) :
    -- Porting note: needed to add universe hint blsub.{u,v} in the line below
    blsub.{u,v} _ f =
      max (blsub.{u, v} a fun a' ha' => f (a' ♯ b) <| nadd_lt_nadd_right ha' b)
        (blsub.{u, v} b fun b' hb' => f (a ♯ b') <| nadd_lt_nadd_left hb' a)

{f : (c : Ordinal.{u}) → c < a ♯ b → Ordinal.{max u v}}

(hf : ∀ {i j : Ordinal.{u}} (hi : i < a ♯ b) (hj : j < a ♯ b), i ≤ j → f i hi ≤ f j hj)

(a ♯ b).blsub f = max (a.blsub fun a' ha' => f (a' ♯ b) ⋯) (b.blsub fun b' hb' => f (a ♯ b') ⋯)


@[simp]
theorem im_star : (star a).im = -a.im

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


@[simp, norm_cast] theorem coe_neg (x : ℝ) : (↑(-x) : EReal) = -↑x


theorem ConvexOn.lt_right_of_left_lt (hf : ConvexOn 𝕜 s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s)
    (hz : z ∈ openSegment 𝕜 x y) (hxz : f x < f z) : f z < f y

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
{x y z : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hz : z ∈ openSegment 𝕜 x y)
(hxz : f x < f z)


@[to_additive]
protected theorem mul_mem_cancel_right {x y : G} (h : x ∈ H) : y * x ∈ H ↔ y ∈ H

{G : Type u_1}
[Group G]
(H : Subgroup G)
{x y : G}
(h : x ∈ H)


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

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


/-- A side of a right-angled triangle divided by the tangent of the opposite angle equals the
adjacent side. -/
theorem norm_div_tan_oangle_add_right_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : ‖y‖ / Real.Angle.tan (o.oangle x (x + y)) = ‖x‖

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


@[to_additive (attr := simp)]
theorem coe_subgroupMap_apply (e : G ≃* G') (H : Subgroup G) (g : H) :
    ((subgroupMap e H g : H.map (e : G →* G')) : G') = e g

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(e : G ≃* G')
(H : Subgroup G)
(g : ↥H)


theorem IsIntegralClosure.isLocalization_of_isSeparable [Algebra.IsSeparable K L] :
    IsLocalization (Algebra.algebraMapSubmonoid C A⁰) L

(A : Type u_2)
(K : Type u_3)
[CommRing A]
[Field K]
[IsDomain A]
[Algebra A K]
[IsFractionRing A K]
(L : Type u_4)
[Field L]
(C : Type u_5)
[CommRing C]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[Algebra C L]
[IsIntegralClosure C A L]
[Algebra A C]
[IsScalarTower A C L]
[Algebra.IsSeparable K L]


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

(F : CategoryTheory.OplaxMonoidalFunctor C D)

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


theorem IsBoundedBilinearMap.isBoundedLinearMap_left (h : IsBoundedBilinearMap 𝕜 f) (y : F) :
    IsBoundedLinearMap 𝕜 fun x => f (x, y)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
(h : IsBoundedBilinearMap 𝕜 f)
(y : F)


@[to_additive nsmul_pos]
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k

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


@[simp]
theorem neLocus_eq_empty {f g : Π₀ a, N a} : f.neLocus g = ∅ ↔ f = g

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → Zero (N a)]
{f g : Π₀ (a : α), N a}


@[functor_norm]
theorem traverse_comp (g : α → F β) (h : β → G γ) :
    traverse (Comp.mk ∘ map h ∘ g) =
      (Comp.mk ∘ map (traverse h) ∘ traverse g : t α → Comp F G (t γ))

{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
{F G : Type u → Type u}
[Applicative F]
[LawfulApplicative F]
[Applicative G]
[LawfulApplicative G]
{α β γ : Type u}
(g : α → F β)
(h : β → G γ)

traverse (Functor.Comp.mk ∘ Functor.map h ∘ g) = Functor.Comp.mk ∘ Functor.map (traverse h) ∘ traverse g


theorem SetCoe.forall' {s : Set α} {p : ∀ x, x ∈ s → Prop} :
    (∀ (x) (h : x ∈ s), p x h) ↔ ∀ x : s, p x.1 x.2

{α : Type u}
{s : Set α}
{p : (x : α) → x ∈ s → Prop}

(∀ (x : α) (h : x ∈ s), p x h) ↔ ∀ (x : ↑s), p ↑x ⋯


lemma Odd.of_mul_left (h : Odd (m * n)) : Odd m


theorem embedding_inr : Embedding (@inr X Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


@[to_additive]
theorem Filter.Tendsto.pow {l : Filter α} {f : α → M} {x : M} (hf : Tendsto f l (𝓝 x)) (n : ℕ) :
    Tendsto (fun x => f x ^ n) l (𝓝 (x ^ n))

{α : Type u_2}
{M : Type u_3}
[TopologicalSpace M]
[AddMonoid M]
[ContinuousAdd M]
{l : Filter α}
{f : α → M}
{x : M}
(hf : Filter.Tendsto f l (𝓝 x))
(n : ℕ)

Filter.Tendsto (fun x => n • f x) l (𝓝 (n • x))


@[simp]
theorem preimage_const_add_Ioo : (fun x => a + x) ⁻¹' Ioo b c = Ioo (b - a) (c - a)

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

(fun x => a + x) ⁻¹' Set.Ioo b c = Set.Ioo (b - a) (c - a)


@[simp]
theorem refl_mul (e : Perm α) : Equiv.refl α * e = e


theorem dimensionLEOne : DimensionLEOne A

{A : Type u_2}
[CommRing A]
[IsDomain A]
(h : IsDedekindDomainInv A)


/-- A telescoping product along `{0, ..., n - 1}` of a commutative group valued function reduces to
the ratio of the last and first factors. -/
@[to_additive "A telescoping sum along `{0, ..., n - 1}` of an additive commutative group valued
function reduces to the difference of the last and first terms."]
theorem prod_range_div {M : Type*} [CommGroup M] (f : ℕ → M) (n : ℕ) :
    (∏ i ∈ range n, f (i + 1) / f i) = f n / f 0

{M : Type u_6}
[AddCommGroup M]
(f : ℕ → M)
(n : ℕ)

∑ i ∈ Finset.range n, (f (i + 1) - f i) = f n - f 0


@[simp, norm_cast]
theorem exp_coe (r : ℝ) : exp ℝ (r : ℍ[ℝ]) = ↑(exp ℝ r)

NormedSpace.exp ℝ ↑r = ↑(NormedSpace.exp ℝ r)


protected theorem sub_eq_of_eq_add_rev (hb : b ≠ ∞) : a = b + c → a - b = c


protected theorem congr_fun {φ₁ φ₂ : A →ₗc[R] B} (H : φ₁ = φ₂) (x : A) : φ₁ x = φ₂ x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{φ₁ φ₂ : A →ₗc[R] B}
(H : φ₁ = φ₂)
(x : A)


theorem Icc_def (a b : α) : { x | a ≤ x ∧ x ≤ b } = Icc a b


protected theorem sub_lt_of_lt_add (hac : c ≤ a) (h : a < b + c) : a - c < b

{a b c : ℝ≥0∞}
(hac : c ≤ a)
(h : a < b + c)


/-- A whole vector space is ample. -/
@[simp]
theorem ampleSet_univ {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] :
    AmpleSet (univ : Set F)

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]


@[simp]
theorem sdiff_eq_empty_iff_subset : s \ t = ∅ ↔ s ⊆ t

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


theorem conj_pow (f : End X) (n : ℕ) : α.conj (f ^ n) = α.conj f ^ n

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(α : X ≅ Y)
(f : CategoryTheory.End X)
(n : ℕ)


theorem out_injective : Function.Injective (Associates.out : _ → α)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]


/-- Symmetric statement to `Option.map_map₂_right_comm`. -/
theorem map_map₂_distrib_right {g : γ → δ} {f' : α → β' → δ} {g' : β → β'}
    (h_distrib : ∀ a b, g (f a b) = f' a (g' b)) : (map₂ f a b).map g = map₂ f' a (b.map g')

{f : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b))

Option.map g (Option.map₂ f a b) = Option.map₂ f' a (Option.map g' b)


protected theorem lt_asymm {a b : Char} (h : a < b) : ¬ b < a


/-- Any matrix can be written as the product of transvections, a diagonal matrix, and
transvections. -/
theorem exists_list_transvec_mul_diagonal_mul_list_transvec (M : Matrix n n 𝕜) :
    ∃ (L L' : List (TransvectionStruct n 𝕜)) (D : n → 𝕜),
      M = (L.map toMatrix).prod * diagonal D * (L'.map toMatrix).prod

{n : Type u_1}
{𝕜 : Type u_3}
[Field 𝕜]
[DecidableEq n]
[Fintype n]
(M : Matrix n n 𝕜)

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


lemma truncatedInf_union_left (hs : a ∈ upperClosure s) (ht : a ∉ upperClosure t) :
    truncatedInf (s ∪ t) a = truncatedInf s a

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

(s ∪ t).truncatedInf a = s.truncatedInf a


@[simp] lemma deleteEdges_univ : G.deleteEdges Set.univ = ⊥


@[simp]
theorem map_mk'_eq_bot_le : map (mk' N) N' = ⊥ ↔ N' ≤ N

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(N N' : LieSubmodule R L M)

LieSubmodule.map (LieSubmodule.Quotient.mk' N) N' = ⊥ ↔ N' ≤ N


theorem isSome_symm_get (f : α ≃. β) {a : α} (h : isSome (f a)) :
    isSome (f.symm (Option.get _ h))

{α : Type u}
{β : Type v}
(f : α ≃. β)
{a : α}
(h : (f a).isSome = true)


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

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


/-- When the second map `S.g` is zero, this is the homology data on `S` given
by any colimit cokernel cofork of `S.f` -/
@[simps]
def ofIsColimitCokernelCofork (hg : S.g = 0) (c : CokernelCofork S.f) (hc : IsColimit c) :
    S.HomologyData

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.HomologyData.ofIsColimitCokernelCofork S hg c hc).right =
  CategoryTheory.ShortComplex.RightHomologyData.ofIsColimitCokernelCofork S hg c hc


theorem sSup_le : (∀ b ∈ s, b ≤ a) → sSup s ≤ a

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


@[simp]
theorem powersetCard_card_add (s : Multiset α) {i : ℕ} (hi : 0 < i) :
    s.powersetCard (card s + i) = 0

{α : Type u_1}
(s : Multiset α)
{i : ℕ}
(hi : 0 < i)

Multiset.powersetCard (Multiset.card s + i) s = 0


theorem integrableOn_Icc_iff_integrableOn_Ico' (hb : μ {b} ≠ ∞) :
    IntegrableOn f (Icc a b) μ ↔ IntegrableOn f (Ico a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
(hb : μ {b} ≠ ⊤)

MeasureTheory.IntegrableOn f (Set.Icc a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ico a b) μ


@[refl]
theorem Reaches₀.refl {σ} {f : σ → Option σ} (a : σ) : Reaches₀ f a a

{σ : Type u_1}
{f : σ → Option σ}
(a : σ)


@[simp]
theorem filter_neg (p : α → Prop) [DecidablePred p] (f : α →₀ G) : filter p (-f) = -filter p f

{α : Type u_1}
{G : Type u_9}
[AddGroup G]
(p : α → Prop)
[DecidablePred p]
(f : α →₀ G)

Finsupp.filter p (-f) = -Finsupp.filter p f


/-- If P is not properly contained in any maximal ideal then it is not properly contained
  in any proper ideal -/
theorem maximal_of_no_maximal {P : Ideal α}
    (hmax : ∀ m : Ideal α, P < m → ¬IsMaximal m) (J : Ideal α) (hPJ : P < J) : J = ⊤

(hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal)


/-- Let `s` be a convex set in a real normed vector space `E`, let `f : E → G` be a function
differentiable within `s` in a neighborhood of `x : E` with derivative `f'`. Suppose that `f'` is
continuous within `s` at `x`. Then for any number `K : ℝ≥0` larger than `‖f' x‖₊`, `f` is Lipschitz
on some neighborhood of `x` within `s`. See also
`Convex.exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt_of_nnnorm_lt` for a version
with an explicit estimate on the Lipschitz constant. -/
theorem exists_nhdsWithin_lipschitzOnWith_of_hasFDerivWithinAt (hs : Convex ℝ s) {f : E → G}
    (hder : ∀ᶠ y in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y) (hcont : ContinuousWithinAt f' s x) :
    ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t

(hder : ∀ᶠ (y : E) in 𝓝[s] x, HasFDerivWithinAt f (f' y) s y)


/-- The equivalence between `C` and its monoidal opposite's monoidal opposite. -/
@[simps!] def MonoidalOpposite.mopMopEquivalence : Cᴹᵒᵖᴹᵒᵖ ≌ C

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

∀ {X Y : C} (f : X ⟶ Y), ((CategoryTheory.MonoidalOpposite.mopMopEquivalence C).inverse.map f).unmop.unmop = f


theorem vanishingIdeal_anti_mono {s t : Set (ProjectiveSpectrum 𝒜)} (h : s ⊆ t) :
    vanishingIdeal t ≤ vanishingIdeal s

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

ProjectiveSpectrum.vanishingIdeal t ≤ ProjectiveSpectrum.vanishingIdeal s


lemma homMk'_mk_id (f : S.obj Y ⟶ T) : homMk' (mk f) (𝟙 Y) = eqToHom (by aesop_cat)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{T : D}
{Y : C}
{S : CategoryTheory.Functor C D}
(f : S.obj Y ⟶ T)

(CategoryTheory.CostructuredArrow.mk f).homMk' (CategoryTheory.CategoryStruct.id Y) = CategoryTheory.eqToHom ⋯


/-- `hermite n` is (up to sign) the factor appearing in `deriv^[n]` of a gaussian -/
theorem deriv_gaussian_eq_hermite_mul_gaussian (n : ℕ) (x : ℝ) :
    deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x =
    (-1 : ℝ) ^ n * aeval x (hermite n) * Real.exp (-(x ^ 2 / 2))

deriv^[n] (fun y => Real.exp (-(y ^ 2 / 2))) x =
  (-1) ^ n * (Polynomial.aeval x) (Polynomial.hermite n) * Real.exp (-(x ^ 2 / 2))


/-- An alternative way to prove that `μ` is right invariant under multiplication. -/
@[to_additive " An alternative way to prove that `μ` is right invariant under addition. "]
theorem forall_measure_preimage_mul_right_iff (μ : Measure G) :
    (∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => h * g) ⁻¹' A) = μ A) ↔
      IsMulRightInvariant μ

{G : Type u_2}
[MeasurableSpace G]
[Add G]
[MeasurableAdd G]
(μ : MeasureTheory.Measure G)

(∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => h + g) ⁻¹' A) = μ A) ↔ μ.IsAddRightInvariant


/-- Given homology map data for morphisms `φ` and `φ'`, this is the induced homology
map data for `φ + φ'`. -/
@[simps]
def add : HomologyMapData (φ + φ') h₁ h₂

(γ : CategoryTheory.ShortComplex.HomologyMapData φ h₁ h₂)

(γ' : CategoryTheory.ShortComplex.HomologyMapData φ' h₁ h₂)


theorem mapDomain_notin_range {f : α → β} (x : α →₀ M) (a : β) (h : a ∉ Set.range f) :
    mapDomain f x a = 0

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{f : α → β}
(x : α →₀ M)
(a : β)
(h : a ∉ Set.range f)


lemma sign_cases_of_C_mul_pow_nonneg [PosMulStrictMono α]
    (h : ∀ n, 0 ≤ a * b ^ n) : a = 0 ∨ 0 < a ∧ 0 ≤ b

{α : Type u}
[Semiring α]
[LinearOrder α]
{a b : α}
[PosMulStrictMono α]
(h : ∀ (n : ℕ), 0 ≤ a * b ^ n)


theorem convexHull_convexHull_union_left (s t : Set E) :
    convexHull 𝕜 (convexHull 𝕜 s ∪ t) = convexHull 𝕜 (s ∪ t)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(s t : Set E)

(convexHull 𝕜) ((convexHull 𝕜) s ∪ t) = (convexHull 𝕜) (s ∪ t)


@[to_additive Ico_add_Ioc_subset]
theorem Ico_mul_Ioc_subset' [LocallyFiniteOrder α] (a b c d : α) :
    Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]

Finset.Ico a b * Finset.Ioc c d ⊆ Finset.Ioo (a * c) (b * d)


lemma Ici_inf_erase (ha : a ∈ s) (has : ∀ b ∈ s, b ≤ a → b = a) : Ici a ⊓ s.erase a = s

{α : Type u_1}
[Preorder α]
{s : UpperSet α}
{a : α}
(ha : a ∈ s)
(has : ∀ b ∈ s, b ≤ a → b = a)


/-- The type of arrows from `star α` to itself is equivalent to the original type `α`. -/
@[simps!]
def toHom : α ≃ (star α ⟶ star α)


theorem lintegral_nnnorm_eq_of_nonneg {f : α → ℝ} (h_nonneg : 0 ≤ f) :
    ∫⁻ x, ‖f x‖₊ ∂μ = ∫⁻ x, ENNReal.ofReal (f x) ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(h_nonneg : 0 ≤ f)

∫⁻ (x : α), ↑‖f x‖₊ ∂μ = ∫⁻ (x : α), ENNReal.ofReal (f x) ∂μ


theorem tail_zip (s₁ : Stream' α) (s₂ : Stream' β) :
    tail (zip f s₁ s₂) = zip f (tail s₁) (tail s₂)

{α : Type u}
{β : Type v}
{δ : Type w}
(f : α → β → δ)
(s₁ : Stream' α)
(s₂ : Stream' β)

(Stream'.zip f s₁ s₂).tail = Stream'.zip f s₁.tail s₂.tail


@[simp]
theorem mem_powerset {s t : Multiset α} : s ∈ powerset t ↔ s ≤ t


@[measurability]
theorem measurableSet_eball : MeasurableSet (EMetric.ball x ε)

{α : Type u_1}
[PseudoEMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{x : α}
{ε : ℝ≥0∞}


@[simp] theorem testBit_mod_two_pow (x j i : Nat) :
    testBit (x % 2^j) i = (decide (i < j) && testBit x i)

(x % 2 ^ j).testBit i = (decide (i < j) && x.testBit i)


/--
A comonoid object in a functor category induces a functor to the category of comonoid objects.
-/
@[simps]
def functorObj (A : Comon_ (C ⥤ D)) : C ⥤ Comon_ D

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

∀ {X Y : C} (f : X ⟶ Y), ((CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functorObj A).map f).hom = A.X.map f


(AdjoinRoot.mk f) Polynomial.X = AdjoinRoot.root f


/-- The morphism in `ShortComplex C` associated to a morphism in `ShortComplex Cᵒᵖ` -/
@[simps]
def unopMap {S₁ S₂ : ShortComplex Cᵒᵖ} (φ : S₁ ⟶ S₂) : S₂.unop ⟶ S₁.unop

{S₁ S₂ : CategoryTheory.ShortComplex Cᵒᵖ}

(CategoryTheory.ShortComplex.unopMap φ).τ₂ = φ.τ₂.unop


/-- Adjoining a finite subset is compact in the lattice of intermediate fields. -/
theorem adjoin_finset_isCompactElement (S : Finset E) :
    IsCompactElement (adjoin F S : IntermediateField F E)

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

CompleteLattice.IsCompactElement (IntermediateField.adjoin F ↑S)


theorem exists_forall_norm_le [ProperSpace R] (p : R[X]) : ∃ x, ∀ y, ‖p.eval x‖ ≤ ‖p.eval y‖

{R : Type u_2}
[NormedRing R]
[IsAbsoluteValue norm]
[ProperSpace R]
(p : Polynomial R)

∃ x, ∀ (y : R), ‖Polynomial.eval x p‖ ≤ ‖Polynomial.eval y p‖


theorem to_subgroup (H : Subgroup G) : IsPGroup p H

{p : ℕ}
{G : Type u_1}
[Group G]
(hG : IsPGroup p G)
(H : Subgroup G)


theorem Function.comp_def {α β δ} (f : β → δ) (g : α → β) : f ∘ g = fun x => f (g x)

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