/-- If `f` is invariant under negation of `x`, then so is `seminormFromBounded'`.-/
theorem seminormFromBounded_neg (f_neg : ∀ x : R, f (-x) = f x) (x : R) :
    seminormFromBounded' f (-x) = seminormFromBounded' f x

{R : Type u_1}
[CommRing R]
{f : R → ℝ}
(f_neg : ∀ (x : R), f (-x) = f x)
(x : R)


/-- Expressing `HasFDerivAtFilter f f' x L` in terms of `HasDerivAtFilter` -/
theorem hasFDerivAtFilter_iff_hasDerivAtFilter {f' : 𝕜 →L[𝕜] F} :
    HasFDerivAtFilter f f' x L ↔ HasDerivAtFilter f (f' 1) x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{L : Filter 𝕜}
{f' : 𝕜 →L[𝕜] F}


@[simp]
theorem coe_const (b : β) : ⇑(const α b) = Function.const α b

(α : Type u_1)
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(b : β)

⇑(ContinuousMap.const α b) = Function.const α b


@[to_additive]
theorem prod_range_succ_div_top : (∏ i ∈ range (n + 1), f i) / f n = ∏ i ∈ range n, f i

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

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


theorem continuousAt_update_of_ne [T1Space X] [DecidableEq X] [TopologicalSpace Y]
    {f : X → Y} {x x' : X} {y : Y} (hne : x' ≠ x) :
    ContinuousAt (Function.update f x y) x' ↔ ContinuousAt f x'

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T1Space X]
[DecidableEq X]
[TopologicalSpace Y]
{f : X → Y}
{x x' : X}
{y : Y}
(hne : x' ≠ x)


lemma exact₀ {Z : C} (P : ProjectiveResolution Z) :
    (ShortComplex.mk _ _ P.complex_d_comp_π_f_zero).Exact

(P : CategoryTheory.ProjectiveResolution Z)

(CategoryTheory.ShortComplex.mk (P.complex.d 1 0) (P.π.f 0) ⋯).Exact


lemma W_of_isLocallyBijective [Presheaf.IsLocallyInjective J f]
    [Presheaf.IsLocallySurjective J f] : J.W f

(J : CategoryTheory.GrothendieckTopology C)


theorem subset_range_nth : setOf p ⊆ Set.range (nth p)


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


theorem gauge_gaugeRescale (s : Set E) {t : Set E} (hta : Absorbent ℝ t) (htb : IsVonNBounded ℝ t)
    (x : E) : gauge t (gaugeRescale s t x) = gauge s x

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T1Space E]
(s : Set E)
{t : Set E}
(hta : Absorbent ℝ t)
(htb : Bornology.IsVonNBounded ℝ t)
(x : E)


theorem cos_sub_pi_div_two (x : ℝ) : cos (x - π / 2) = sin x


theorem pairwise_one_le_dist : Pairwise fun m n : ℤ => 1 ≤ dist m n


theorem tendsto_nhds_nhds [PseudoMetricSpace β] {f : α → β} {a b} :
    Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) b < ε

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

Filter.Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ {x : α}, dist x a < δ → dist (f x) b < ε


theorem tendsto_IicSnd_atBot [IsFiniteMeasure ρ] {s : Set α} (hs : MeasurableSet s) :
    Tendsto (fun r : ℚ ↦ ρ.IicSnd r s) atBot (𝓝 0)

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]
{s : Set α}
(hs : MeasurableSet s)

Filter.Tendsto (fun r => (ρ.IicSnd ↑r) s) Filter.atBot (𝓝 0)


@[simp]
theorem coe_top : ↑(⊤ : IntermediateField F E) = (Set.univ : Set E)

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]


theorem range_eq_of_proj {f : E →ₗ[R] p} (hf : ∀ x : p, f x = x) : range f = ⊤

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p : Submodule R E}
{f : E →ₗ[R] ↥p}
(hf : ∀ (x : ↥p), f ↑x = x)


@[simp]
theorem image_sub_const_uIcc : (fun x => x - a) '' [[b, c]] = [[b - a, c - a]]

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


theorem Char.ext_iff {x y : Char} : x = y ↔ x.val = y.val


@[simp]
theorem prod_coe (γ₁ : Path a₁ a₂) (γ₂ : Path b₁ b₂) :
    ⇑(γ₁.prod γ₂) = fun t => (γ₁ t, γ₂ t)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{a₁ a₂ : X}
{b₁ b₂ : Y}
(γ₁ : Path a₁ a₂)
(γ₂ : Path b₁ b₂)


@[to_additive Ico_add_Ioc_subset]
theorem Ico_mul_Ioc_subset' (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 HAdd.hAdd) LT.lt]

Set.Ico a b + Set.Ioc c d ⊆ Set.Ioo (a + c) (b + d)


lemma Γevaluation_naturality_apply (x : X) (a : Y.presheaf.obj (op ⊤)) :
    residueFieldMap f x (Y.Γevaluation (f.val.base x) a) =
      X.Γevaluation x (f.val.c.app (op ⊤) a)

{X Y : AlgebraicGeometry.LocallyRingedSpace}

(AlgebraicGeometry.LocallyRingedSpace.residueFieldMap f x) ((Y.Γevaluation (f.val.base x)) a) =
  (X.Γevaluation x) ((f.val.c.app (Opposite.op ⊤)) a)


theorem prod_id : ∀ {n} {α β : TypeVec.{u} n}, (id ⊗' id) = (id : α ⊗ β ⟹ _)

TypeVec.prod.map TypeVec.id TypeVec.id = TypeVec.id


@[simp]
theorem aeval_monomial {n : ℕ} {r : R} : aeval x (monomial n r) = algebraMap _ _ r * x ^ n

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
{n : ℕ}
{r : R}

(Polynomial.aeval x) ((Polynomial.monomial n) r) = (algebraMap R A) r * x ^ n


theorem iIndep.iIndepSets
    {s : ι → Set (Set Ω)} (hms : ∀ n, m n = generateFrom (s n)) (h_indep : iIndep m μ) :
    iIndepSets s μ

(hms : ∀ (n : ι), m n = MeasurableSpace.generateFrom (s n))

(h_indep : ProbabilityTheory.iIndep m μ)


theorem le_of_eq {a b : α} : a = b → a ≤ b


@[to_additive LinearOrderedAddCommGroup.add_lt_add_left]
theorem LinearOrderedCommGroup.mul_lt_mul_left' (a b : α) (h : a < b) (c : α) : c * a < c * b

{α : Type u}
[LinearOrderedAddCommGroup α]
(a b : α)
(h : a < b)
(c : α)


theorem DifferentiableWithinAt.div_const (hc : DifferentiableWithinAt 𝕜 c s x) (d : 𝕜') :
    DifferentiableWithinAt 𝕜 (fun x => c x / d) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{c : 𝕜 → 𝕜'}
(hc : DifferentiableWithinAt 𝕜 c s x)
(d : 𝕜')


/-- If `find p = some i`, then `p i` holds -/
theorem find_spec :
    ∀ {n : ℕ} (p : Fin n → Prop) [DecidablePred p] {i : Fin n} (_ : i ∈ Fin.find p), p i


/-- A projection from the product of a family of triangles. -/
@[simps]
def productTriangle.π (j : J) :
    productTriangle T ⟶ T j

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

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

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

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

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

(CategoryTheory.Pretriangulated.productTriangle.π T j).hom₂ = CategoryTheory.Limits.Pi.π (fun j => (T j).obj₂) j


@[to_additive]
theorem EventuallyEq.mul [Mul β] {f f' g g' : α → β} {l : Filter α} (h : f =ᶠ[l] g)
    (h' : f' =ᶠ[l] g') : (fun x => f x * f' x) =ᶠ[l] fun x => g x * g' x

{α : Type u}
{β : Type v}
[Mul β]
{f f' g g' : α → β}
{l : Filter α}
(h : f =ᶠ[l] g)
(h' : f' =ᶠ[l] g')


/-- The **Downward Löwenheim–Skolem theorem** :
  If `s` is a set in an `L`-structure `M` and `κ` an infinite cardinal such that
  `max (#s, L.card) ≤ κ` and `κ ≤ # M`, then `M` has an elementary substructure containing `s` of
  cardinality `κ`.  -/
theorem exists_elementarySubstructure_card_eq (s : Set M) (κ : Cardinal.{w'}) (h1 : ℵ₀ ≤ κ)
    (h2 : Cardinal.lift.{w'} #s ≤ Cardinal.lift.{w} κ)
    (h3 : Cardinal.lift.{w'} L.card ≤ Cardinal.lift.{max u v} κ)
    (h4 : Cardinal.lift.{w} κ ≤ Cardinal.lift.{w'} #M) :
    ∃ S : L.ElementarySubstructure M, s ⊆ S ∧ Cardinal.lift.{w'} #S = Cardinal.lift.{w} κ

(h2 : Cardinal.lift.{w', w} (Cardinal.mk ↑s) ≤ Cardinal.lift.{w, w'} κ)

(h3 : Cardinal.lift.{w', max u v} L.card ≤ Cardinal.lift.{max u v, w'} κ)

(h4 : Cardinal.lift.{w, w'} κ ≤ Cardinal.lift.{w', w} (Cardinal.mk M))

∃ S, s ⊆ ↑S ∧ Cardinal.lift.{w', w} (Cardinal.mk ↥S) = Cardinal.lift.{w, w'} κ


lemma eisensteinSeries_SIF_apply (k : ℤ) (z : ℍ) :
    eisensteinSeries_SIF a k z = eisensteinSeries a k z

{N : ℕ}
(a : Fin 2 → ZMod N)
(k : ℤ)
(z : ℍ)

(EisensteinSeries.eisensteinSeries_SIF a k) z = eisensteinSeries a k z


theorem SameCycle.exists_pow_eq_of_mem_support {f} [DecidableEq α] [Fintype α] (h : SameCycle f x y)
    (hx : x ∈ f.support) : ∃ i < (f.cycleOf x).support.card, (f ^ i) x = y

{α : Type u_2}
{x y : α}
{f : Equiv.Perm α}
[DecidableEq α]
[Fintype α]
(h : f.SameCycle x y)
(hx : x ∈ f.support)


@[simp]
theorem BinaryBicone.sndKernelFork_ι : (BinaryBicone.sndKernelFork c).ι = c.inl

(c : CategoryTheory.Limits.BinaryBicone X Y)

CategoryTheory.Limits.Fork.ι c.sndKernelFork = c.inl


theorem continuous_normed : Continuous (f.normed μ)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
[MeasurableSpace E]
{c : E}
(f : ContDiffBump c)
{μ : MeasureTheory.Measure E}


theorem sdiff_sdiff_comm : (a \ b) \ c = (a \ c) \ b

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b c : α}


@[to_additive (attr := simp)]
theorem coe_copy (f : α →*o β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(f : α →*o β)
(f' : α → β)
(h : f' = ⇑f)


protected theorem HasBasis.nhds {l : Filter α} {p : ι → Prop} {s : ι → Set α} (h : HasBasis l p s) :
    HasBasis (𝓝 l) p fun i => Iic (𝓟 (s i))

{ι : Sort u_1}
{α : Type u_2}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)

(𝓝 l).HasBasis p fun i => Set.Iic (𝓟 (s i))


theorem Subalgebra.isClosed_topologicalClosure (s : Subalgebra R A) :
    IsClosed (s.topologicalClosure : Set A)

{R : Type u_1}
[CommSemiring R]
{A : Type u}
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[TopologicalSemiring A]
(s : Subalgebra R A)


@[simp]
theorem mkOfCompact_add [CompactSpace α] (f g : C(α, β)) :
    mkOfCompact (f + g) = mkOfCompact f + mkOfCompact g

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[AddMonoid β]
[BoundedAdd β]
[ContinuousAdd β]
[CompactSpace α]
(f g : C(α, β))

BoundedContinuousFunction.mkOfCompact (f + g) =
  BoundedContinuousFunction.mkOfCompact f + BoundedContinuousFunction.mkOfCompact g


theorem bernoulli'PowerSeries_mul_exp_sub_one :
    bernoulli'PowerSeries A * (exp A - 1) = X * exp A

(A : Type u_1)
[CommRing A]
[Algebra ℚ A]

bernoulli'PowerSeries A * (PowerSeries.exp A - 1) = PowerSeries.X * PowerSeries.exp A


theorem disjoint_nhdsSet_principal : Disjoint (𝓝ˢ s) (𝓟 t) ↔ Disjoint s (closure t)

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


theorem option_map₁ {f : α → σ} (hf : Primrec f) : Primrec (Option.map f)

{α : Type u_1}
{σ : Type u_5}
[Primcodable α]
[Primcodable σ]
{f : α → σ}
(hf : Primrec f)


lemma two_not_dvd_two_mul_add_one (n : ℤ) : ¬2 ∣ 2 * n + 1


@[simp, norm_cast]
theorem coeComplex_add (z w : ℂ) : ↑(z + w) = (z + w : ℍ)


lemma StrictAnti.image_Ioi_subset (h : StrictAnti f) : f '' Ioi a ⊆ Iio (f a)

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


theorem Heap.realSize_tail (le) (s : Heap α) : (s.tail le).realSize = s.realSize - 1

{α : Type u_1}
(le : α → α → Bool)
(s : Batteries.BinomialHeap.Imp.Heap α)

(Batteries.BinomialHeap.Imp.Heap.tail le s).realSize = s.realSize - 1


theorem eq_bot_of_bot_eq_top (hα : (⊥ : α) = ⊤) (x : α) : x = (⊥ : α)

{α : Type u}
[PartialOrder α]
[BoundedOrder α]
(hα : ⊥ = ⊤)
(x : α)


theorem ppred_to_nat : ∀ n : Num, (↑) <$> ppred n = Nat.ppred n


theorem sInf_eq_iInf' (s : Set α) : sInf s = ⨅ a : s, (a : α)


theorem mem_jacobson_iff {x : R} : x ∈ jacobson I ↔ ∀ y, ∃ z, z * y * x + z - 1 ∈ I

{R : Type u}
[Ring R]
{I : Ideal R}
{x : R}

x ∈ I.jacobson ↔ ∀ (y : R), ∃ z, z * y * x + z - 1 ∈ I


@[to_additive]
theorem inv_eq_iff_mul_eq_one : a⁻¹ = b ↔ a * b = 1


@[simp]
theorem quotAdjoinRootEquivQuotPolynomialQuot_symm_mk_mk (p : R[X]) :
    (quotAdjoinRootEquivQuotPolynomialQuot I f).symm
        (Ideal.Quotient.mk (span ({f.map (Ideal.Quotient.mk I)} : Set (R ⧸ I)[X]))
        (p.map (Ideal.Quotient.mk I))) =
      Ideal.Quotient.mk (I.map (of f)) (mk f p)

{R : Type u}
[CommRing R]
(I : Ideal R)
(f p : R[X])

(AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot I f).symm
    ((Ideal.Quotient.mk (Ideal.span {Polynomial.map (Ideal.Quotient.mk I) f}))
      (Polynomial.map (Ideal.Quotient.mk I) p)) =
  (Ideal.Quotient.mk (Ideal.map (AdjoinRoot.of f) I)) ((AdjoinRoot.mk f) p)


@[simp]
theorem contractLeft_one : d⌋(1 : CliffordAlgebra Q) = 0

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(d : Module.Dual R M)


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

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


theorem AlgHom.normal_bijective [h : Normal F E] (ϕ : E →ₐ[F] K) : Function.Bijective ϕ

(F : Type u_1)
(K : Type u_2)
[Field F]
[Field K]
[Algebra F K]
(E : Type u_3)
[Field E]
[Algebra F E]
[Algebra K E]
[IsScalarTower F K E]
[h : Normal F E]
(ϕ : E →ₐ[F] K)


/-- `SimpleFunc.integral` and `SimpleFunc.lintegral` agree when the integrand has type
    `α →ₛ ℝ≥0∞`. But since `ℝ≥0∞` is not a `NormedSpace`, we need some form of coercion.
    See `integral_eq_lintegral` for a simpler version. -/
theorem integral_eq_lintegral' {f : α →ₛ E} {g : E → ℝ≥0∞} (hf : Integrable f μ) (hg0 : g 0 = 0)
    (ht : ∀ b, g b ≠ ∞) :
    (f.map (ENNReal.toReal ∘ g)).integral μ = ENNReal.toReal (∫⁻ a, g (f a) ∂μ)

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : MeasureTheory.SimpleFunc α E}
{g : E → ℝ≥0∞}
(hf : MeasureTheory.Integrable (↑f) μ)
(hg0 : g 0 = 0)
(ht : ∀ (b : E), g b ≠ ⊤)

MeasureTheory.SimpleFunc.integral μ (MeasureTheory.SimpleFunc.map (ENNReal.toReal ∘ g) f) =
  (∫⁻ (a : α), g (↑f a) ∂μ).toReal


/-- The tangent of an angle in a right-angled triangle as a ratio of sides, version subtracting
vectors. -/
theorem tan_oangle_sub_left_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.tan (o.oangle (x - y) x) = ‖y‖ / ‖x‖

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


theorem factorial_smul_hasseDeriv : ⇑(k ! • @hasseDeriv R _ k) = (@derivative R _)^[k]

⇑(k.factorial • Polynomial.hasseDeriv k) = (⇑Polynomial.derivative)^[k]


theorem mem_supp {α : TypeVec n} (x : F α) (i) (u : α i) :
    u ∈ supp x i ↔ ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[q : MvQPF F]
{α : TypeVec.{u} n}
(x : F α)
(i : Fin2 n)
(u : α i)

u ∈ MvFunctor.supp x i ↔ ∀ (a : (MvQPF.P F).A) (f : (MvQPF.P F).B a ⟹ α), MvQPF.abs ⟨a, f⟩ = x → u ∈ f i '' Set.univ


theorem coe_real_ereal_eq_coe_toNNReal_sub_coe_toNNReal (x : ℝ) :
    (x : EReal) = Real.toNNReal x - Real.toNNReal (-x)


lemma cond_absolutelyContinuous : μ[|s] ≪ μ

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


/-- A projection from the product of a family of triangles. -/
@[simps]
def productTriangle.π (j : J) :
    productTriangle T ⟶ T j

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

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

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

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

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

(CategoryTheory.Pretriangulated.productTriangle.π T j).hom₃ = CategoryTheory.Limits.Pi.π (fun j => (T j).obj₃) j


/-- `g : R ≃+* S` is `R`-linear when the module structure on `S` is `Module.compHom S g` . -/
@[simps]
def compHom.toLinearEquiv {R S : Type*} [Semiring R] [Semiring S] (g : R ≃+* S) :
    haveI := compHom S (↑g : R →+* S)
    R ≃ₗ[R] S

{R : Type u_17}
{S : Type u_18}
[Semiring R]
[Semiring S]
(g : R ≃+* S)
(a : R)

(Module.compHom.toLinearEquiv g) a = g a


theorem comp_memℒp' (L : E →L[𝕜] F) {f : α → E} (hf : Memℒp f p μ) : Memℒp (L ∘ f) p μ

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
(L : E →L[𝕜] F)
{f : α → E}
(hf : MeasureTheory.Memℒp f p μ)


theorem aeval_eq_smeval {R : Type*} [CommSemiring R] {S : Type*} [Semiring S] [Algebra R S]
    (x : S) (p : R[X]) : aeval x p = p.smeval x

{R : Type u_1}
[CommSemiring R]
{S : Type u_2}
[Semiring S]
[Algebra R S]
(x : S)
(p : Polynomial R)


theorem IsCompactElement.exists_finset_of_le_iSup {k : α} (hk : IsCompactElement k) {ι : Type*}
    (f : ι → α) (h : k ≤ ⨆ i, f i) : ∃ s : Finset ι, k ≤ ⨆ i ∈ s, f i

(hk : CompleteLattice.IsCompactElement k)


theorem mkMetric_nnreal_smul (m : ℝ≥0∞ → ℝ≥0∞) {c : ℝ≥0} (hc : c ≠ 0) :
    (mkMetric (c • m) : OuterMeasure X) = c • mkMetric m

{X : Type u_2}
[EMetricSpace X]
(m : ℝ≥0∞ → ℝ≥0∞)
{c : ℝ≥0}
(hc : c ≠ 0)

MeasureTheory.OuterMeasure.mkMetric (c • m) = c • MeasureTheory.OuterMeasure.mkMetric m


lemma maxTrivSubmodule_eq_bot_of_center_eq_bot (h : LieAlgebra.center R L = ⊥) :
    LieModule.maxTrivSubmodule R L (LieDerivation R L L) = ⊥

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(h : LieAlgebra.center R L = ⊥)


theorem C_surjective {R : Type*} [CommSemiring R] (σ : Type*) [IsEmpty σ] :
    Function.Surjective (C : R → MvPolynomial σ R)

{R : Type u_2}
[CommSemiring R]
(σ : Type u_3)
[IsEmpty σ]


@[to_additive]
protected theorem mul_right_cancel (h : IsUnit b) : a * b = c * b → a = c

{M : Type u_1}
[Monoid M]
{a b c : M}
(h : IsUnit b)


/-- Uniform isomorphism between dependent functions `Π i : Fin 2, α i` and `α 0 × α 1`. -/
@[simps! (config := .asFn)]
def piFinTwo (α : Fin 2 → Type u) [∀ i, UniformSpace (α i)] : (∀ i, α i) ≃ᵤ α 0 × α 1

(α : Fin 2 → Type u)
[(i : Fin 2) → UniformSpace (α i)]

⇑(UniformEquiv.piFinTwo α).symm = fun p => Fin.cons p.1 (Fin.cons p.2 finZeroElim)


theorem multichoose_succ_neg_natCast [NatPowAssoc R] (n : ℕ) :
    multichoose (-n : R) (n + 1) = 0

{R : Type u_1}
[NonAssocRing R]
[Pow R ℕ]
[BinomialRing R]
[NatPowAssoc R]
(n : ℕ)


/-- The exponential map in a commutative Banach algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ` has strict
Fréchet derivative `exp 𝕂 x • 1 : 𝔸 →L[𝕂] 𝔸` at any point `x`. -/
theorem hasStrictFDerivAt_exp {x : 𝔸} : HasStrictFDerivAt (exp 𝕂) (exp 𝕂 x • (1 : 𝔸 →L[𝕂] 𝔸)) x

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedCommRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
{x : 𝔸}

HasStrictFDerivAt (NormedSpace.exp 𝕂) (NormedSpace.exp 𝕂 x • 1) x


@[simp]
theorem compl_symmDiff : (a ∆ b)ᶜ = a ⇔ b

{α : Type u_2}
[BooleanAlgebra α]
(a b : α)


@[to_additive]
theorem mul_mul_inv_cancel'_right (a b : G) : a * (b * a⁻¹) = b


theorem isIntegral_iff_irreducibleSpace_and_isReduced :
    IsIntegral X ↔ IrreducibleSpace X ∧ IsReduced X

AlgebraicGeometry.IsIntegral X ↔ IrreducibleSpace ↑↑X.toPresheafedSpace ∧ AlgebraicGeometry.IsReduced X


/-- If `K₁` is complete and contained in `K₂`, `K₁` and `K₁ᗮ ⊓ K₂` span `K₂`. -/
theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 𝕜 E} (h : K₁ ≤ K₂)
    [HasOrthogonalProjection K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K₁ K₂ : Submodule 𝕜 E}
(h : K₁ ≤ K₂)
[HasOrthogonalProjection K₁]

K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂


lemma rnDeriv_eq_zero_of_mutuallySingular [SigmaFinite μ] {ν' : Measure α}
    [SigmaFinite ν'] (h : μ ⟂ₘ ν) (hνν' : ν ≪ ν') :
    μ.rnDeriv ν' =ᵐ[ν] 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
{ν' : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite ν']
(h : μ ⟂ₘ ν)
(hνν' : ν ≪ ν')


/-- The two paths coercion can take to a `MonoidHom` are equivalent -/
theorem toMonoidHom_commutes (f : R ≃+* S) :
    (f : R →+* S).toMonoidHom = (f : R ≃* S).toMonoidHom

{R : Type u_4}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R ≃+* S)


@[simp, norm_cast]
theorem coe_ennreal_add (x y : ENNReal) : ((x + y : ℝ≥0∞) : EReal) = x + y


@[to_additive]
theorem min_mul_mul_right (a b c : α) : min (a * c) (b * c) = min a b * c

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


theorem tendsto_abv_atTop {R k α : Type*} [Ring R] [LinearOrderedField k] (abv : R → k)
    [IsAbsoluteValue abv] (p : R[X]) (h : 0 < degree p) {l : Filter α} {z : α → R}
    (hz : Tendsto (abv ∘ z) l atTop) : Tendsto (fun x => abv (p.eval (z x))) l atTop

(hz : Filter.Tendsto (abv ∘ z) l Filter.atTop)

Filter.Tendsto (fun x => abv (Polynomial.eval (z x) p)) l Filter.atTop


theorem norm_le_pow_iff_mem_span_pow (x : ℤ_[p]) (n : ℕ) :
    ‖x‖ ≤ (p : ℝ) ^ (-n : ℤ) ↔ x ∈ (Ideal.span {(p : ℤ_[p]) ^ n} : Ideal ℤ_[p])

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])
(n : ℕ)

‖x‖ ≤ ↑p ^ (-↑n) ↔ x ∈ Ideal.span {↑p ^ n}


protected lemma Nil.eq {p : G.Walk v w} : p.Nil → v = w

{V : Type u}
{G : SimpleGraph V}
{v w : V}
{p : G.Walk v w}


/-- A homeomorphism of spaces gives an equivalence of categories of open sets.

TODO: define `OrderIso.equivalence`, use it.
-/
@[simps]
def mapMapIso {X Y : TopCat.{u}} (H : X ≅ Y) : Opens Y ≌ Opens X

(TopologicalSpace.Opens.mapMapIso H).inverse = TopologicalSpace.Opens.map H.inv


theorem HasSum.unop {f : β → αᵐᵒᵖ} {a : αᵐᵒᵖ} (hf : HasSum f a) :
    HasSum (fun a ↦ unop (f a)) (unop a)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → αᵐᵒᵖ}
{a : αᵐᵒᵖ}
(hf : HasSum f a)

HasSum (fun a => MulOpposite.unop (f a)) (MulOpposite.unop a)


theorem units_smul_span_eq_top {v : ι → M} (hv : Submodule.span R (Set.range v) = ⊤) {w : ι → Rˣ} :
    Submodule.span R (Set.range (w • v)) = ⊤


@[to_additive (attr := simp)]
lemma prod_map_val [CommMonoid β] (s : Finset α) (f : α → β) : (s.1.map f).prod = ∏ a ∈ s, f a

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(s : Finset α)
(f : α → β)

(Multiset.map f s.val).prod = ∏ a ∈ s, f a


theorem pdf_of_not_haveLebesgueDecomposition {_ : MeasurableSpace Ω} {ℙ : Measure Ω}
    {μ : Measure E} {X : Ω → E} (h : ¬(map X ℙ).HaveLebesgueDecomposition μ) : pdf X ℙ μ = 0

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {μ : MeasureTheory.Measure E} {X : Ω → E},
  ¬(MeasureTheory.Measure.map X ℙ).HaveLebesgueDecomposition μ → MeasureTheory.pdf X ℙ μ = 0


@[to_additive (attr := simp)] lemma top_ne_one : (⊤ : WithTop α) ≠ 1


theorem inner_self_eq_zero {x : F} : ⟪x, x⟫ = 0 ↔ x = 0

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
{x : F}


/-- **Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or
equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both
exist. A version for `ℝ`-valued functions. For an alternative version, convenient if the infinite
sums are not already expressed as `p`-th powers, see `Lp_add_le_tsum_of_nonneg`. -/
theorem Lp_add_le_hasSum_of_nonneg (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) {A B : ℝ}
    (hA : 0 ≤ A) (hB : 0 ≤ B) (hfA : HasSum (fun i => f i ^ p) (A ^ p))
    (hgB : HasSum (fun i => g i ^ p) (B ^ p)) :
    ∃ C, 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)


/-- The first of two points lies in their affine span. -/
theorem left_mem_affineSpan_pair (p₁ p₂ : P) : p₁ ∈ line[k, p₁, p₂]

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(p₁ p₂ : P)


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

{α : Type u_2}
{β : Type u_3}
[CoheytingAlgebra α]
[CoheytingAlgebra β]
(f : CoheytingHom α β)


theorem lintegral_dirac [MeasurableSingletonClass α] (a : α) (f : α → ℝ≥0∞) :
    ∫⁻ a, f a ∂dirac a = f a

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
(a : α)
(f : α → ℝ≥0∞)

∫⁻ (a : α), f a ∂MeasureTheory.Measure.dirac a = f a


theorem funLeft_comp (f₁ : n → p) (f₂ : m → n) :
    funLeft R M (f₁ ∘ f₂) = (funLeft R M f₂).comp (funLeft R M f₁)

(R : Type u_1)
(M : Type u_8)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{m : Type u_17}
{n : Type u_18}
{p : Type u_19}
(f₁ : n → p)
(f₂ : m → n)

LinearMap.funLeft R M (f₁ ∘ f₂) = LinearMap.funLeft R M f₂ ∘ₗ LinearMap.funLeft R M f₁


theorem Sum.mem_uniformity_iff_glueDist (hε : 0 < ε) (s : Set ((X ⊕ Y) × (X ⊕ Y))) :
    s ∈ 𝓤 (X ⊕ Y) ↔ ∃ δ > 0, ∀ a b, glueDist Φ Ψ ε a b < δ → (a, b) ∈ s

{X : Type u}
{Y : Type v}
{Z : Type w}
[MetricSpace X]
[MetricSpace Y]
{Φ : Z → X}
{Ψ : Z → Y}
{ε : ℝ}
(hε : 0 < ε)
(s : Set ((X ⊕ Y) × (X ⊕ Y)))

s ∈ 𝓤 (X ⊕ Y) ↔ ∃ δ > 0, ∀ (a b : X ⊕ Y), Metric.glueDist Φ Ψ ε a b < δ → (a, b) ∈ s


@[simp]
theorem coe_iciSupHom : (iciSupHom : α → UpperSet α) = Ici


theorem nat_iff {f : ℕ →. ℕ} : Partrec f ↔ Nat.Partrec f


@[to_additive (attr := simp)]
theorem map_id (S : Subsemigroup M) : S.map (MulHom.id M) = S

{M : Type u_1}
[Mul M]
(S : Subsemigroup M)


theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.star u)) (u : U) :
    Injective (φ.pathStar u)

(hφ : ∀ (u : U), Function.Injective (φ.star u))


@[to_additive (attr := simp)]
theorem Interval.inv_bot : (⊥ : Interval α)⁻¹ = ⊥


@[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeMagma α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)
(x y : FreeMagma α)

traverse F (x * y) = Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y


theorem digits_ne_nil_iff_ne_zero {b n : ℕ} : digits b n ≠ [] ↔ n ≠ 0


@[simp]
theorem seq_def (s : Finset α) (t : Finset (α → β)) : t <*> s = t.sup fun f => s.image f

{α β : Type u}
[(P : Prop) → Decidable P]
(s : Finset α)
(t : Finset (α → β))

(Seq.seq t fun x => s) = t.sup fun f => Finset.image f s


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


theorem Pred.rec_linear {p : α → Prop} (hsucc : ∀ a, p a ↔ p (pred a)) (a b : α) : p a ↔ p b

(hsucc : ∀ (a : α), p a ↔ p (Order.pred a))


@[simp]
theorem cliqueSet_bot (hn : 1 < n) : (⊥ : SimpleGraph α).cliqueSet n = ∅


@[to_additive add_zsmul_self]
lemma mul_self_zpow (a : G) (n : ℤ) : a * a ^ n = a ^ (n + 1)

{G : Type u_3}
[Group G]
(a : G)
(n : ℤ)


theorem image_val_of_injOn (H : Set.InjOn f s) : (image f s).1 = s.1.map f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s : Finset α}
(H : Set.InjOn f ↑s)

(Finset.image f s).val = Multiset.map f s.val


lemma pred_eq_of_eq_succ (H : m = n.succ) : m.pred = n


theorem algebraicIndependent_of_finite (s : Set A)
    (H : ∀ t ⊆ s, t.Finite → AlgebraicIndependent R ((↑) : t → A)) :
    AlgebraicIndependent R ((↑) : s → A)

(H : ∀ t ⊆ s, t.Finite → AlgebraicIndependent R Subtype.val)


theorem smul_single_one [Semiring R] (a : α) (b : R) : b • single a (1 : R) = single a b

{α : Type u_1}
{R : Type u_11}
[Semiring R]
(a : α)
(b : R)

b • Finsupp.single a 1 = Finsupp.single a b


lemma nilRankAux_le [Nontrivial R] (b : Basis ι R L) (b' : Basis ι' R L) :
    nilRankAux φ b ≤ nilRankAux φ b'

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
{ι' : Type u_6}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[Fintype ι']
[DecidableEq ι]
[DecidableEq ι']
[Module.Free R M]
[Module.Finite R M]
[Nontrivial R]
(b : Basis ι R L)
(b' : Basis ι' R L)


theorem toMatrix_smul_left {G} [Group G] [DistribMulAction G M] [SMulCommClass G R M] (g : G) :
    (g • e).toMatrix v = e.toMatrix (g⁻¹ • v)

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(e : Basis ι R M)
(v : ι' → M)
{G : Type u_9}
[Group G]
[DistribMulAction G M]
[SMulCommClass G R M]
(g : G)


@[simp]
theorem mk_coeFn (f : α →ₘ[μ] β) : mk f f.aestronglyMeasurable = f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
(f : α →ₘ[μ] β)


/-- To prove a property of a product, it suffices to prove that
the property is multiplicative and holds on factors. -/
@[to_additive "To prove a property of a sum, it suffices to prove that
the property is additive and holds on summands."]
theorem prod_induction_nonempty {M : Type*} [CommMonoid M] (f : α → M) (p : M → Prop)
    (hom : ∀ a b, p a → p b → p (a * b)) (nonempty : s.Nonempty) (base : ∀ x ∈ s, p <| f x) :
    p <| ∏ x ∈ s, f x

(hom : ∀ (a b : M), p a → p b → p (a + b))


/-- The sum of two lower semicontinuous functions is lower semicontinuous. Formulated with an
explicit continuity assumption on addition, for application to `EReal`. The unprimed version of
the lemma uses `[ContinuousAdd]`. -/
theorem LowerSemicontinuousAt.add' {f g : α → γ} (hf : LowerSemicontinuousAt f x)
    (hg : LowerSemicontinuousAt g x)
    (hcont : ContinuousAt (fun p : γ × γ => p.1 + p.2) (f x, g x)) :
    LowerSemicontinuousAt (fun z => f z + g z) x

(hcont : ContinuousAt (fun p => p.1 + p.2) (f x, g x))


protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β)

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]


lemma cfcHom_nnreal_eq_restrict {a : A} (ha : 0 ≤ a) :
    cfcHom ha = (SpectrumRestricts.nnreal_of_nonneg ha).starAlgHom
      (cfcHom (IsSelfAdjoint.of_nonneg ha))

[ContinuousFunctionalCalculus NNReal fun x => 0 ≤ x]

cfcHom ha = SpectrumRestricts.starAlgHom (cfcHom ⋯) ⋯


@[simp]
theorem divisors_one : divisors 1 = {1}


/-- If the sequence of Fourier coefficients of `f` is summable, then the Fourier series of `f`
converges everywhere pointwise to `f`. -/
theorem has_pointwise_sum_fourier_series_of_summable (h : Summable (fourierCoeff f))
    (x : AddCircle T) : HasSum (fun i => fourierCoeff f i • fourier i x) (f x)

{T : ℝ}
[hT : Fact (0 < T)]
{f : C(AddCircle T, ℂ)}
(h : Summable (fourierCoeff ⇑f))
(x : AddCircle T)

HasSum (fun i => fourierCoeff (⇑f) i • (fourier i) x) (f x)


theorem IsBounded.snd_of_prod (h : IsBounded (s ×ˢ t)) (hs : s.Nonempty) : IsBounded t

{α : Type u_1}
{β : Type u_2}
[Bornology α]
[Bornology β]
{s : Set α}
{t : Set β}
(h : Bornology.IsBounded (s ×ˢ t))
(hs : s.Nonempty)


theorem LiftRelO.imp_right (R : α → β → Prop) {C D : WSeq α → WSeq β → Prop}
    (H : ∀ s t, C s t → D s t) {o p} : LiftRelO R C o p → LiftRelO R D o p

{C D : Stream'.WSeq α → Stream'.WSeq β → Prop}

(H : ∀ (s : Stream'.WSeq α) (t : Stream'.WSeq β), C s t → D s t)

Stream'.WSeq.LiftRelO R C o p → Stream'.WSeq.LiftRelO R D o p


@[fun_prop]
theorem aemeasurable_id'' (μ : Measure α) {m : MeasurableSpace α} (hm : m ≤ m0) :
    @AEMeasurable α α m m0 id μ

{α : Type u_2}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{m : MeasurableSpace α}
(hm : m ≤ m0)


theorem Coprime.gcd_mul_left_cancel_right (n : Nat)
    (H : Coprime k m) : gcd m (k * n) = gcd m n


theorem slash_action_eqn [SlashInvariantFormClass F Γ k] (f : F) (γ : Γ) :
    ↑f ∣[k] γ = ⇑f

{F : Type u_1}
{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
[FunLike F ℍ ℂ]
[SlashInvariantFormClass F Γ k]
(f : F)
(γ : ↥Γ)


/-- Let `f : α → α` be an ergodic map.
Let `g : α → X` be an a.e. strongly measurable function
from `α` to a nonempty metrizable topological space.
If `g` is a.e.-invariant under `f`, then `g` is a.e. constant. -/
theorem ae_eq_const_of_ae_eq_comp_ae {g : α → X} (h : Ergodic f μ) (hgm : AEStronglyMeasurable g μ)
    (hg_eq : g ∘ f =ᵐ[μ] g) : ∃ c, g =ᵐ[μ] const α c

(hgm : MeasureTheory.AEStronglyMeasurable g μ)


@[simp]
theorem _root_.OrthonormalBasis.coe_toHilbertBasis [Fintype ι] (b : OrthonormalBasis ι 𝕜 E) :
    (b.toHilbertBasis : ι → E) = b

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)

(fun i => b.toHilbertBasis.repr.symm (lp.single 2 i 1)) = ⇑b


/-- Interpreting as a base `p` number and dividing by `p` is the same as interpreting the tail.
-/
lemma ofDigits_div_eq_ofDigits_tail {p : ℕ} (hpos : 0 < p) (digits : List ℕ)
    (w₁ : ∀ l ∈ digits, l < p) : ofDigits p digits / p = ofDigits p digits.tail

Nat.ofDigits p digits / p = Nat.ofDigits p digits.tail


theorem ofNat_add {n} (x y : Nat) : BitVec.ofNat n (x + y) = BitVec.ofNat n x + BitVec.ofNat n y


theorem balancedCoreAux_maximal (h : t ⊆ s) (ht : Balanced 𝕜 t) : t ⊆ balancedCoreAux 𝕜 s

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(h : t ⊆ s)
(ht : Balanced 𝕜 t)


theorem IsClosed.union : IsClosed s₁ → IsClosed s₂ → IsClosed (s₁ ∪ s₂)

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


@[simp]
theorem div_self {a : R} (a0 : a ≠ 0) : a / a = 1

{R : Type u}
[EuclideanDomain R]
{a : R}
(a0 : a ≠ 0)


theorem roots_X_pow_card_sub_X : roots (X ^ q - X : K[X]) = Finset.univ.val

(Polynomial.X ^ q - Polynomial.X).roots = Finset.univ.val


lemma nonempty_oreSet_iff {R : Type*} [Ring R] {S : Submonoid R} :
    Nonempty (OreSet S) ↔ (∀ (r₁ r₂ : R) (s : S), r₁ * s = r₂ * s → ∃ s' : S, s' * r₁ = s' * r₂) ∧
      (∀ (r : R) (s : S), ∃ (r' : R) (s' : S), s' * r = r' * s)

{R : Type u_1}
[Ring R]
{S : Submonoid R}

Nonempty (OreLocalization.OreSet S) ↔
  (∀ (r₁ r₂ : R) (s : ↥S), r₁ * ↑s = r₂ * ↑s → ∃ s', ↑s' * r₁ = ↑s' * r₂) ∧
    ∀ (r : R) (s : ↥S), ∃ r' s', ↑s' * r = r' * ↑s


@[simp]
theorem gcd_mul_right_add_left (m n k : ℕ) : gcd (k * n + m) n = gcd m n


/-- 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).functor.map f = f.unmop.unmop


/-- If Cᵒᵖ is filtered or empty, then C is cofiltered or empty. -/
lemma isCofilteredOrEmpty_of_isFilteredOrEmpty_op [IsFilteredOrEmpty Cᵒᵖ] : IsCofilteredOrEmpty C

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


@[simp]
lemma restrictionLT_map {k₁ k₂ : { k // k < i }} (φ : k₁ ⟶ k₂) :
    (restrictionLT F hi).map φ = F.map (homOfLE (by simpa using leOfHom φ))

(F : CategoryTheory.Functor { i // i ≤ j } C)

(CategoryTheory.Functor.Iteration.restrictionLT F hi).map φ = F.map (CategoryTheory.homOfLE ⋯)


@[to_additive (attr := simp) add_le_iff_nonpos_right]
theorem mul_le_iff_le_one_right' [CovariantClass α α (· * ·) (· ≤ ·)]
    [ContravariantClass α α (· * ·) (· ≤ ·)] (a : α) {b : α} :
    a * b ≤ a ↔ b ≤ 1

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

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


theorem getD_eq_get {n : ℕ} (hn : n < l.length) : l.getD n d = l.get ⟨n, hn⟩

{α : Type u}
(l : List α)
(d : α)
{n : ℕ}
(hn : n < l.length)


theorem exists_nonneg_left_iff_sameRay (hx : x ≠ 0) :
    (∃ r : R, 0 ≤ r ∧ r • x = y) ↔ SameRay R x y

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(hx : x ≠ 0)

(∃ r, 0 ≤ r ∧ r • x = y) ↔ SameRay R x y


/-- `Equiv.mulRight₀` as an order_iso. -/
@[simps! (config := { simpRhs := true })]
def OrderIso.mulRight₀ (a : α) (ha : 0 < a) : α ≃o α

{α : Type u_2}
[LinearOrderedSemifield α]
(a : α)
(ha : 0 < a)
(x : α)


theorem map_comap_le : map f (comap f N₂) ≤ N₂

{R : Type u}
{L : Type v}
{M : Type w}
{M₂ : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
(N₂ : LieSubmodule R L M₂)
(f : M →ₗ⁅R,L⁆ M₂)

LieSubmodule.map f (LieSubmodule.comap f N₂) ≤ N₂


protected theorem image_eq (s : Set H) : I '' s = I.symm ⁻¹' s ∩ range I

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(s : Set H)


theorem not_of_eq_false {p : Prop} (h : p = False) : ¬p


theorem zipWithAll_map_left (l₁ : List α) (l₂ : List β) (f : α → α') (g : Option α' → Option β → γ) :
    zipWithAll g (l₁.map f) l₂ = zipWithAll (fun a b => g (f <$> a) b) l₁ l₂

{α : Type u_1}
{β : Type u_2}
{α' : Type u_1}
{γ : Type u_3}
(l₁ : List α)
(l₂ : List β)
(f : α → α')
(g : Option α' → Option β → γ)

List.zipWithAll g (List.map f l₁) l₂ = List.zipWithAll (fun a b => g (f <$> a) b) l₁ l₂


theorem IsBigO.trans_tendsto (hfg : f'' =O[l] g'') (hg : Tendsto g'' l (𝓝 0)) :
    Tendsto f'' l (𝓝 0)

{α : Type u_1}
{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{f'' : α → E''}
{g'' : α → F''}
{l : Filter α}
(hfg : f'' =O[l] g'')
(hg : Filter.Tendsto g'' l (𝓝 0))


@[fun_prop]
theorem IsBoundedLinearMap.hasFDerivAt (h : IsBoundedLinearMap 𝕜 f) :
    HasFDerivAt f h.toContinuousLinearMap x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
(h : IsBoundedLinearMap 𝕜 f)


/-- A type is `Small.{w}` if there exists an equivalence to some `S : Type w`.
-/
@[mk_iff, pp_with_univ]
class Small (α : Type v) : Prop where
  /-- If a type is `Small.{w}`, then there exists an equivalence with some `S : Type w` -/
  equiv_small : ∃ S : Type w, Nonempty (α ≃ S)


/-- The colimit cocone exhibiting `⨁ Subtype.restrict pᶜ f` as the cokernel of
`biproduct.fromSubtype f p` -/
@[simps]
def cokernelCoforkBiproductFromSubtype (p : Set K) :
    ColimitCocone (parallelPair (biproduct.fromSubtype f p) 0)

(CategoryTheory.Limits.cokernelCoforkBiproductFromSubtype f p).isColimit =
  CategoryTheory.Limits.CokernelCofork.IsColimit.ofπ (CategoryTheory.Limits.biproduct.toSubtype f pᶜ) ⋯
    (fun {W} g x => CategoryTheory.Limits.biproduct.fromSubtype f pᶜ ≫ g) ⋯ ⋯


theorem hasFPowerSeriesAt_const {c : F} {e : E} :
    HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries 𝕜 E c) e

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{c : F}
{e : E}

HasFPowerSeriesAt (fun x => c) (constFormalMultilinearSeries 𝕜 E c) e


/-- The image under a semigroup hom of the subsemigroup generated by a set equals the subsemigroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddSemigroup` hom of the `AddSubsemigroup` generated by a set
      equals the `AddSubsemigroup` generated by the image of the set."]
theorem map_mclosure (f : M →ₙ* N) (s : Set M) : (closure s).map f = closure (f '' s)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : AddHom M N)
(s : Set M)

AddSubsemigroup.map f (AddSubsemigroup.closure s) = AddSubsemigroup.closure (⇑f '' s)


protected lemma dvd_add_left (h : a ∣ c) : a ∣ b + c ↔ a ∣ b


@[simp] theorem isEmpty_replicate : (replicate n a).isEmpty = decide (n = 0)

∀ {α : Type u_1} {a : α}, (List.replicate n a).isEmpty = decide (n = 0)


@[simp]
lemma biUnion_insert [DecidableEq α] {a : α} : (insert a s).biUnion t = t a ∪ s.biUnion t

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
[DecidableEq β]
[DecidableEq α]
{a : α}


theorem zipWith_swap_prod_support' (l l' : List α) :
    { x | (zipWith swap l l').prod x ≠ x } ≤ l.toFinset ⊔ l'.toFinset

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

{x | (List.zipWith Equiv.swap l l').prod x ≠ x} ≤ ↑(l.toFinset ⊔ l'.toFinset)


theorem liftPropOn_univ : LiftPropOn P g univ ↔ LiftProp P g

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
{P : (H → H') → Set H → H → Prop}
{g : M → M'}

ChartedSpace.LiftPropOn P g Set.univ ↔ ChartedSpace.LiftProp P g


theorem digits_succ (b n m r l) (e : r + b * m = n) (hr : r < b)
    (h : Nat.digits b m = l ∧ 1 < b ∧ 0 < m) : (Nat.digits b n = r :: l) ∧ 1 < b ∧ 0 < n

(b n m r : ℕ)
(l : List ℕ)
(e : r + b * m = n)
(hr : r < b)
(h : b.digits m = l ∧ 1 < b ∧ 0 < m)


@[simp]
theorem mem_toSubalgebra {S : StarSubalgebra R A} {x} : x ∈ S.toSubalgebra ↔ x ∈ S

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
{S : StarSubalgebra R A}
{x : A}


@[to_additive]
theorem le_inv_iff_mul_le_one_right : a ≤ b⁻¹ ↔ a * b ≤ 1

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


@[simp]
theorem adjoin_top :
    adjoin (⊤ : Subalgebra R S) t = (adjoin S t).restrictScalars (⊤ : Subalgebra R S)

(R : Type uR)
{S : Type uS}
{A : Type uA}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra S A]
{t : Set A}

Algebra.adjoin (↥⊤) t = Subalgebra.restrictScalars (↥⊤) (Algebra.adjoin S t)


@[simp]
theorem get_map₂ (v₁ : Vector α n) (v₂ : Vector β n) (f : α → β → γ) (i : Fin n) :
    get (map₂ f v₁ v₂) i = f (get v₁ i) (get v₂ i)

{α : Type u_2}
{β : Type u_3}
{n : ℕ}
{γ : Type u_1}
(v₁ : Mathlib.Vector α n)
(v₂ : Mathlib.Vector β n)
(f : α → β → γ)
(i : Fin n)

(Mathlib.Vector.map₂ f v₁ v₂).get i = f (v₁.get i) (v₂.get i)


@[to_additive]
nonrec lemma orbitRel.Quotient.mapsTo_smul_orbit (g : G) (x : orbitRel.Quotient G α) :
    Set.MapsTo (g • ·) x.orbit x.orbit

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
(g : G)
(x : MulAction.orbitRel.Quotient G α)

Set.MapsTo (fun x => g • x) x.orbit x.orbit


theorem choose_le_choose {a b : ℕ} (c : ℕ) (h : a ≤ b) : choose a c ≤ choose b c


lemma dblX_smul (P : Fin 3 → R) (u : R) : W'.dblX (u • P) = (u ^ 4) ^ 2 * W'.dblX P

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P : Fin 3 → R)
(u : R)


@[simp]
theorem pred_succ : ∀ n : ZNum, n.pred.succ = n


@[to_additive]
theorem mk'_eq_of_same {a b} {d : S} :
    f.mk' a d = f.mk' b d ↔ ∃ c : S, c * a = c * b

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
{a b : M}
{d : ↥S}

f.mk' a d = f.mk' b d ↔ ∃ c, ↑c * a = ↑c * b


@[simp]
theorem seq_sub (f : FreeAbelianGroup (α → β)) (x y : FreeAbelianGroup α) :
    f <*> x - y = (f <*> x) - (f <*> y)

{α β : Type u}
(f : FreeAbelianGroup (α → β))
(x y : FreeAbelianGroup α)

(Seq.seq f fun x_1 => x - y) = (Seq.seq f fun x_1 => x) - Seq.seq f fun x => y


lemma ad_apply_lieDerivation (x : L) (D : LieDerivation R L L) : ad R L (D x) = - ⁅x, D⁆

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(x : L)
(D : LieDerivation R L L)


theorem eq_const_of_subsingleton {β : Sort*} [Subsingleton α] (f : α → β) (a : α) :
    f = Function.const α (f a)

{α : Sort u_1}
{β : Sort u_2}
[Subsingleton α]
(f : α → β)
(a : α)


theorem lieIdeal_oper_eq_span :
    ⁅I, N⁆ = lieSpan R L { m | ∃ (x : I) (n : N), ⁅(x : L), (n : M)⁆ = m }

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

⁅I, N⁆ = LieSubmodule.lieSpan R L {m | ∃ x n, ⁅↑x, ↑n⁆ = m}


@[simp]
theorem LeftExactFunctor.ofExact_map {F G : C ⥤ₑ D} (α : F ⟶ G) :
    (LeftExactFunctor.ofExact C D).map α = α

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : C ⥤ₑ D}
(α : F ⟶ G)

(CategoryTheory.LeftExactFunctor.ofExact C D).map α = α


@[simp]
theorem apply (φ : K →+* ℂ) (x : K) : (mk φ) x = Complex.abs (φ x)

{K : Type u_2}
[Field K]
(φ : K →+* ℂ)
(x : K)

(NumberField.InfinitePlace.mk φ) x = Complex.abs (φ x)


lemma baseChange_preΨ₄ : (W.baseChange B).preΨ₄ = (W.baseChange A).preΨ₄.map f

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)

(W.baseChange B).preΨ₄ = Polynomial.map (↑f) (W.baseChange A).preΨ₄


theorem Integrable.aefinStronglyMeasurable (hf : Integrable f μ) : AEFinStronglyMeasurable f μ

{α : Type u_1}
{G : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup G]
{f : α → G}
(hf : MeasureTheory.Integrable f μ)


@[to_additive]
theorem isSimpleGroup_of_surjective {H : Type*} [Group H] [IsSimpleGroup G] [Nontrivial H]
    (f : G →* H) (hf : Function.Surjective f) : IsSimpleGroup H

{G : Type u_1}
[AddGroup G]
{H : Type u_3}
[AddGroup H]
[IsSimpleAddGroup G]
[Nontrivial H]
(f : G →+ H)
(hf : Function.Surjective ⇑f)


/-- Do not use this, use `ContinuousOn.comp_fract` instead. -/
theorem ContinuousOn.comp_fract' {f : β → α → γ} (h : ContinuousOn (uncurry f) <| univ ×ˢ I)
    (hf : ∀ s, f s 0 = f s 1) : Continuous fun st : β × α => f st.1 (fract st.2)

{f : β → α → γ}

(h : ContinuousOn (Function.uncurry f) (Set.univ ×ˢ Set.Icc 0 1))

Continuous fun st => f st.1 (Int.fract st.2)


lemma finiteCoproduct.ι_jointly_surjective (R : finiteCoproduct X) :
    ∃ (a : α) (r : X a), R = finiteCoproduct.ι X a r

(R : ↑(Profinite.finiteCoproduct X).toTop)

∃ a r, R = (Profinite.finiteCoproduct.ι X a) r


theorem dense_of_exists_between [OrderTopology α] [Nontrivial α] {s : Set α}
    (h : ∀ ⦃a b⦄, a < b → ∃ c ∈ s, a < c ∧ c < b) : Dense s

(h : ∀ ⦃a b : α⦄, a < b → ∃ c ∈ s, a < c ∧ c < b)


/-- A valuation has rank one if it is nontrivial and its image is contained in `ℝ≥0`.
  Note that this class includes the data of an inclusion morphism `Γ₀ → ℝ≥0`. -/
class RankOne (v : Valuation R Γ₀) where
  /-- The inclusion morphism from `Γ₀` to `ℝ≥0`. -/
  hom : Γ₀ →*₀ ℝ≥0
  strictMono' : StrictMono hom
  nontrivial' : ∃ r : R, v r ≠ 0 ∧ v r ≠ 1

{R : Type u_1}
[Ring R]
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
{v : Valuation R Γ₀}
[self : v.RankOne]


/-- The complex exponential is everywhere differentiable, with the derivative `exp x`. -/
theorem hasDerivAt_exp (x : ℂ) : HasDerivAt exp (exp x) x

HasDerivAt Complex.exp (Complex.exp x) x


theorem log_two_gt_d9 : 0.6931471803 < log 2


@[simp] lemma disjoint_fromEdgeSet : Disjoint G (fromEdgeSet s) ↔ Disjoint G.edgeSet s

{V : Type u}
(G : SimpleGraph V)
(s : Set (Sym2 V))

Disjoint G (SimpleGraph.fromEdgeSet s) ↔ Disjoint G.edgeSet s


@[simp]
theorem mem_support (x : HahnSeries Γ R) (a : Γ) : a ∈ x.support ↔ x.coeff a ≠ 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
(x : HahnSeries Γ R)
(a : Γ)


theorem sub_ne_top (ha : a ≠ ∞) : a - b ≠ ∞


protected theorem IsCycle.transfer {q : G.Walk u u} (qc : q.IsCycle) (hq) :
    (q.transfer H hq).IsCycle

{V : Type u}
{G : SimpleGraph V}
{u : V}
{H : SimpleGraph V}
{q : G.Walk u u}
(qc : q.IsCycle)
(hq : ∀ e ∈ q.edges, e ∈ H.edgeSet)


/-- If `f` is locally integrable, decays exponentially at infinity, and is `O(x ^ (-b))` at 0, then
its Mellin transform converges for `b < s.re`. -/
theorem mellinConvergent_of_isBigO_rpow_exp [NormedSpace ℂ E] {a b : ℝ} (ha : 0 < a) {f : ℝ → E}
    {s : ℂ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] fun t => exp (-a * t))
    (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : MellinConvergent f s

(hfc : MeasureTheory.LocallyIntegrableOn f (Set.Ioi 0) MeasureTheory.volume)

(hf_top : f =O[Filter.atTop] fun t => rexp (-a * t))


@[simp]
theorem mk_d_1_0 : (mk X₀ X₁ X₂ d₀ d₁ s succ).d 0 1 = d₀

(succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0)

(CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ).d 0 1 = d₀


@[simp] theorem castLE_succ {m n : Nat} (h : m + 1 ≤ n + 1) (i : Fin m) :
    castLE h i.succ = (castLE (Nat.succ_le_succ_iff.mp h) i).succ

Fin.castLE h i.succ = (Fin.castLE ⋯ i).succ


theorem CauchySeq.tendsto_limUnder [Preorder β] [CompleteSpace α] {u : β → α} (h : CauchySeq u) :
    haveI := h.1.nonempty; Tendsto u atTop (𝓝 <| limUnder atTop u)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[Preorder β]
[CompleteSpace α]
{u : β → α}
(h : CauchySeq u)

Filter.Tendsto u Filter.atTop (𝓝 (limUnder Filter.atTop u))


theorem fderivWithin_clm_apply (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hc : DifferentiableWithinAt 𝕜 c s x) (hu : DifferentiableWithinAt 𝕜 u s x) :
    fderivWithin 𝕜 (fun y => (c y) (u y)) s x =
      (c x).comp (fderivWithin 𝕜 u s x) + (fderivWithin 𝕜 c s x).flip (u x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{s : Set E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{u : E → G}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(hc : DifferentiableWithinAt 𝕜 c s x)
(hu : DifferentiableWithinAt 𝕜 u s x)


@[to_additive]
theorem disjoint_def {H₁ H₂ : Subgroup G} : Disjoint H₁ H₂ ↔ ∀ {x : G}, x ∈ H₁ → x ∈ H₂ → x = 1

{G : Type u_1}
[AddGroup G]
{H₁ H₂ : AddSubgroup G}

Disjoint H₁ H₂ ↔ ∀ {x : G}, x ∈ H₁ → x ∈ H₂ → x = 0


theorem Pi.uniformContinuous_proj (i : ι) : UniformContinuous fun a : ∀ i : ι, α i => a i

{ι : Type u_1}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
(i : ι)


@[to_additive]
theorem prod_dite {s : Finset α} {p : α → Prop} {hp : DecidablePred p} (f : ∀ x : α, p x → β)
    (g : ∀ x : α, ¬p x → β) :
    ∏ x ∈ s, (if hx : p x then f x hx else g x hx) =
      (∏ x ∈ (s.filter p).attach, f x.1 (by simpa using (mem_filter.mp x.2).2)) *
        ∏ x ∈ (s.filter fun x => ¬p x).attach, g x.1 (by simpa using (mem_filter.mp x.2).2)

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

(∑ x ∈ s, if hx : p x then f x hx else g x hx) =
  ∑ x ∈ (Finset.filter p s).attach, f ↑x ⋯ + ∑ x ∈ (Finset.filter (fun x => ¬p x) s).attach, g ↑x ⋯


@[simp]
theorem lookup_insert {a} {b : β a} (s : AList β) : lookup a (insert a b s) = some b

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
(s : AList β)

AList.lookup a (AList.insert a b s) = some b


protected theorem mdifferentiableOn : MDifferentiableOn 𝓘(𝕜, E) 𝓘(𝕜, E') f s

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

MDifferentiableOn 𝓘(𝕜, E) 𝓘(𝕜, E') (⇑f) s


@[to_additive (attr := simp)]
theorem curry_mulSingle [DecidableEq α] [∀ a, DecidableEq (β a)] [∀ a b, One (γ a b)]
    (i : Σ a, β a) (x : γ i.1 i.2) :
    Sigma.curry (Pi.mulSingle i x) = Pi.mulSingle i.1 (Pi.mulSingle i.2 x)

{α : Type u_3}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_5}
[DecidableEq α]
[(a : α) → DecidableEq (β a)]
[(a : α) → (b : β a) → Zero (γ a b)]
(i : (a : α) × β a)
(x : γ i.fst i.snd)

Sigma.curry (Pi.single i x) = Pi.single i.fst (Pi.single i.snd x)


@[simp]
theorem add_apply {M N : Mat R} (f g : M ⟶ N) (i j) : (f + g) i j = f i j + g i j

{R : Type}
[Ring R]
{M N : CategoryTheory.Mat R}
(f g : M ⟶ N)
(i : ↑M)
(j : ↑N)


@[to_additive]
theorem noncommProd_commute (s : Finset α) (f : α → β) (comm) (y : β)
    (h : ∀ x ∈ s, Commute y (f x)) : Commute y (s.noncommProd f comm)

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


@[to_additive]
theorem TendstoUniformlyOn.div (hf : TendstoUniformlyOn f g l s)
    (hf' : TendstoUniformlyOn f' g' l s) : TendstoUniformlyOn (f / f') (g / g') l s

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Type u_3}
{l : Filter ι}
{f f' : ι → β → α}
{g g' : β → α}
{s : Set β}
(hf : TendstoUniformlyOn f g l s)
(hf' : TendstoUniformlyOn f' g' l s)


@[to_additive]
theorem apply_eq_iff_symm_apply (e : M ≃* N) {x : M} {y : N} : e x = y ↔ x = e.symm y

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(e : M ≃+ N)
{x : M}
{y : N}


/-- If `u` is a monotone function with linear ordered codomain and the range of `u` is not bounded
below, then `Tendsto u atBot atBot`. -/
theorem tendsto_atBot_atBot_of_monotone' [Preorder ι] [LinearOrder α] {u : ι → α} (h : Monotone u)
    (H : ¬BddBelow (range u)) : Tendsto u atBot atBot

{ι : Type u_1}
{α : Type u_3}
[Preorder ι]
[LinearOrder α]
{u : ι → α}
(h : Monotone u)
(H : ¬BddBelow (Set.range u))

Filter.Tendsto u Filter.atBot Filter.atBot


theorem exists_true_iff_nonempty {α : Sort*} : (∃ _ : α, True) ↔ Nonempty α


/-- The Galois insertion `ContinuousMap.opensOfIdeal : Ideal C(X, 𝕜) → Opens X` and
`fun s ↦ ContinuousMap.idealOfSet ↑s`. -/
@[simps]
def idealOpensGI :
    GaloisInsertion (opensOfIdeal : Ideal C(X, 𝕜) → Opens X) fun s => idealOfSet 𝕜 s

(X : Type u_1)
(𝕜 : Type u_2)
[RCLike 𝕜]
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
(I : Ideal C(X, 𝕜))

∀ (x : ContinuousMap.idealOfSet 𝕜 ↑(ContinuousMap.opensOfIdeal I) ≤ I),
  (ContinuousMap.idealOpensGI X 𝕜).choice I x = ContinuousMap.opensOfIdeal I.closure


theorem encode_iff {f : α → β → σ} : (Primrec₂ fun a b => encode (f a b)) ↔ Primrec₂ f

{α : Type u_1}
{β : Type u_2}
{σ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → β → σ}

(Primrec₂ fun a b => Encodable.encode (f a b)) ↔ Primrec₂ f


/-- A constant sequence is tight. -/
theorem unifTight_const {g : α → β} (hp_ne_top : p ≠ ∞) (hg : Memℒp g p μ) :
    UnifTight (fun _ : ι => g) p μ

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{p : ENNReal}
{g : α → β}
(hp_ne_top : p ≠ ⊤)
(hg : MeasureTheory.Memℒp g p μ)

MeasureTheory.UnifTight (fun x => g) p μ


@[reassoc, simp]
theorem coprod.map_desc {S T U V W : C} [HasBinaryCoproduct U W] [HasBinaryCoproduct T V]
    (f : U ⟶ S) (g : W ⟶ S) (h : T ⟶ U) (k : V ⟶ W) :
    coprod.map h k ≫ coprod.desc f g = coprod.desc (h ≫ f) (k ≫ g)

CategoryTheory.Limits.coprod.map h k ≫ CategoryTheory.Limits.coprod.desc f g =
  CategoryTheory.Limits.coprod.desc (h ≫ f) (k ≫ g)


@[simp]
theorem inl_inj {n₁ n₂ : N} : (inl n₁ : N ⋊[φ] G) = inl n₂ ↔ n₁ = n₂

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}
{n₁ n₂ : N}

SemidirectProduct.inl n₁ = SemidirectProduct.inl n₂ ↔ n₁ = n₂


theorem apply_eq_of_preconnectedSpace [PreconnectedSpace X] {f : X → Y} (hf : IsLocallyConstant f)
    (x y : X) : f x = f y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[PreconnectedSpace X]
{f : X → Y}
(hf : IsLocallyConstant f)
(x y : X)


lemma eq_inv_mul_iff_mul_eq₀ (hb : b ≠ 0) : a = b⁻¹ * c ↔ b * a = c

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b c : G₀}
(hb : b ≠ 0)


@[simp] theorem finrank_bot' : finrank (⊥ : IntermediateField F E) E = finrank F E

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]

FiniteDimensional.finrank (↥⊥) E = FiniteDimensional.finrank F E


theorem image₂_subset_right (hs : s ⊆ s') : image₂ f s t ⊆ image₂ f s' t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s s' : Finset α}
{t : Finset β}
(hs : s ⊆ s')

Finset.image₂ f s t ⊆ Finset.image₂ f s' t


@[to_additive (attr := simp)]
theorem edist_inv_inv [PseudoEMetricSpace G] [IsometricSMul G G] [IsometricSMul Gᵐᵒᵖ G]
    (a b : G) : edist a⁻¹ b⁻¹ = edist a b

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


@[to_additive (attr := simp)] lemma inv_right_iff : SemiconjBy a x⁻¹ y⁻¹ ↔ SemiconjBy a x y


@[simp]
theorem val_neg_one (n : ℕ) : (-1 : ZMod n.succ).val = n


@[to_additive (attr := simp)]
theorem pure_one : pure (1 : α) = 1


@[to_additive (attr := simp, nolint simpComm)]
theorem unop_eq_one_iff [One α] (a : αᵐᵒᵖ) : a.unop = 1 ↔ a = 1


theorem HasDerivWithinAt.inv (hc : HasDerivWithinAt c c' s x) (hx : c x ≠ 0) :
    HasDerivWithinAt (fun y => (c y)⁻¹) (-c' / c x ^ 2) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{c : 𝕜 → 𝕜}
{c' : 𝕜}
(hc : HasDerivWithinAt c c' s x)
(hx : c x ≠ 0)


theorem induced_to_pi {X : Type*} (f : X → ∀ i, π i) :
    induced f Pi.topologicalSpace = ⨅ i, induced (f · i) inferInstance

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

TopologicalSpace.induced f Pi.topologicalSpace = ⨅ i, TopologicalSpace.induced (fun x => f x i) inferInstance


theorem neg_right (x y : M₁) : B₁ x (-y) = -B₁ x y

{R₁ : Type u_4}
{M₁ : Type u_5}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B₁ : LinearMap.BilinForm R₁ M₁}
(x y : M₁)


theorem corec_def {X} (f : X → F X) (x₀ : X) : M.corec f x₀ = M.mk (F.map (M.corec f) (f x₀))

{F : PFunctor.{u}}
{X : Type u_2}
(f : X → ↑F X)
(x₀ : X)

PFunctor.M.corec f x₀ = PFunctor.M.mk (F.map (PFunctor.M.corec f) (f x₀))


@[to_additive]
theorem mem_pow {a : α} {n : ℕ} :
    a ∈ s ^ n ↔ ∃ f : Fin n → s, (List.ofFn fun i => ↑(f i)).prod = a

{α : Type u_2}
[DecidableEq α]
[AddMonoid α]
{s : Finset α}
{a : α}
{n : ℕ}

a ∈ n • s ↔ ∃ f, (List.ofFn fun i => ↑(f i)).sum = a


/-- When `IsEmpty ι`, this lemma does not hold without the additional assumption `p ≠ ∞` because
the left-hand side simplifies to `0`, while the right-hand side simplifies to `‖b‖₊`. See
`PiLp.norm_equiv_symm_const` for a version which exchanges the hypothesis `Nonempty ι`.
for `p ≠ ∞`. -/
theorem norm_equiv_symm_const' {β} [SeminormedAddCommGroup β] [Nonempty ι] (b : β) :
    ‖(WithLp.equiv p (ι → β)).symm (Function.const _ b)‖ =
      (Fintype.card ι : ℝ≥0) ^ (1 / p).toReal * ‖b‖

{p : ℝ≥0∞}
{ι : Type u_2}
[Fact (1 ≤ p)]
[Fintype ι]
{β : Type u_5}
[SeminormedAddCommGroup β]
[Nonempty ι]
(b : β)

‖(WithLp.equiv p (ι → β)).symm (Function.const ι b)‖ = ↑↑(Fintype.card ι) ^ (1 / p).toReal * ‖b‖


@[simp]
theorem cof_eq_zero {o} : cof o = 0 ↔ o = 0


lemma IsStandardSmoothOfRelativeDimension.isStandardSmooth (f : R →+* S)
    (hf : IsStandardSmoothOfRelativeDimension.{t, w} n f) :
    IsStandardSmooth.{t, w} f

(hf : RingHom.IsStandardSmoothOfRelativeDimension n f)


@[simp]
theorem bodd_negOfNat (n : ℕ) : bodd (negOfNat n) = n.bodd


theorem splits (f : K[X]) [IsSplittingField K L f] : Splits (algebraMap K L) f

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


@[reassoc (attr := simp)]
theorem pullbackSymmetry_inv_comp_fst [HasPullback f g] :
    (pullbackSymmetry f g).inv ≫ pullback.fst f g = pullback.snd g f

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

(CategoryTheory.Limits.pullbackSymmetry f g).inv ≫ CategoryTheory.Limits.pullback.fst f g =
  CategoryTheory.Limits.pullback.snd g f


theorem one_le_evenOdd_zero : 1 ≤ evenOdd Q 0

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


@[to_additive (attr := simp)]
theorem map_bot (f : G →* N) : (⊥ : Subgroup G).map f = ⊥

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)


lemma scalarRTensor_apply_tmul (p : MvPolynomial σ R) (n : N) :
    scalarRTensor (p ⊗ₜ[R] n) = p.sum (fun i m ↦ Finsupp.single i (m • n))

{R : Type u}
{N : Type w}
[CommSemiring R]
{σ : Type u_1}
[DecidableEq σ]
[AddCommMonoid N]
[Module R N]
(p : MvPolynomial σ R)
(n : N)

MvPolynomial.scalarRTensor (p ⊗ₜ[R] n) = Finsupp.sum p fun i m => Finsupp.single i (m • n)


/-- `J` is connected if: given any function `F : J → α` which is constant for any
`j₁, j₂` for which there is a morphism `j₁ ⟶ j₂`, then `F` is constant.
This can be thought of as a local-to-global property.

The converse of `constant_of_preserves_morphisms`.
-/
theorem IsPreconnected.of_constant_of_preserves_morphisms
    (h : ∀ {α : Type u₁} (F : J → α),
      (∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), F j₁ = F j₂) → ∀ j j' : J, F j = F j') :
    IsPreconnected J

(h : ∀ {α : Type u₁} (F : J → α), (∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → F j₁ = F j₂) → ∀ (j j' : J), F j = F j')


/-- Under a continuous algebra map, the image of the `TopologicalClosure` of a subalgebra is
contained in the `TopologicalClosure` of its image. -/
theorem _root_.Subalgebra.topologicalClosure_map
    [TopologicalSemiring B] (f : A →A[R] B) (s : Subalgebra R A) :
    s.topologicalClosure.map f ≤ (s.map f.toAlgHom).topologicalClosure

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[TopologicalSemiring A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
[TopologicalSemiring B]
(f : A →A[R] B)
(s : Subalgebra R A)

Subalgebra.map (↑f) s.topologicalClosure ≤ (Subalgebra.map f.toAlgHom s).topologicalClosure


@[to_additive]
lemma prod_attach (s : Finset α) (f : α → β) : ∏ x ∈ s.attach, f x = ∏ x ∈ s, f x

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


@[simp] lemma coord_apply_embedding_eq_smul_coord {i : Fin n} :
    snf.bM.coord (snf.f i) ∘ₗ N.subtype = snf.a i • snf.bN.coord i

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{n : ℕ}
{N : Submodule R M}
(snf : Basis.SmithNormalForm N ι n)
{i : Fin n}


theorem map_range : f.range.map g = (g.comp f).range

{R : Type u}
{S : Type v}
{T : Type w}
[Ring R]
[Ring S]
[Ring T]
(g : S →+* T)
(f : R →+* S)

Subring.map g f.range = (g.comp f).range


theorem const_inner {𝕜 β} [RCLike 𝕜] [NormedAddCommGroup β] [InnerProductSpace 𝕜 β] {f : α → β}
    (hfm : AEStronglyMeasurable' m f μ) (c : β) :
    AEStronglyMeasurable' m (fun x => (inner c (f x) : 𝕜)) μ

(hfm : MeasureTheory.AEStronglyMeasurable' m f μ)

MeasureTheory.AEStronglyMeasurable' m (fun x => ⟪c, f x⟫_𝕜) μ


theorem spanningHom.injective {x : Subgraph G} : Function.Injective x.spanningHom

{V : Type u}
{G : SimpleGraph V}
{x : G.Subgraph}


lemma succ_max (a b : α) : succ (max a b) = max (succ a) (succ b)

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

Order.succ (max a b) = max (Order.succ a) (Order.succ b)


theorem IsMaximal.mem_iff_models (h : T.IsMaximal) (φ : L.Sentence) : φ ∈ T ↔ T ⊨ᵇ φ

{L : FirstOrder.Language}
{T : L.Theory}
(h : T.IsMaximal)
(φ : L.Sentence)

φ ∈ T ↔ T ⊨ᵇ φ


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

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


/-- If `B : M → N → Pₗ` is `R`-`S` bilinear and `R'` and `S'` are compatible scalar multiplications,
then the restriction of scalars is a `R'`-`S'` bilinear map. -/
@[simps!]
def restrictScalars₁₂ (B : M →ₗ[R] N →ₗ[S] Pₗ) : M →ₗ[R'] N →ₗ[S'] Pₗ

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{M : Type u_5}
{N : Type u_6}
{Pₗ : Type u_12}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid Pₗ]
[Module R M]
[Module S N]
[Module R Pₗ]
[Module S Pₗ]
[SMulCommClass S R Pₗ]
(R' : Type u_16)
(S' : Type u_17)
[Semiring R']
[Semiring S']
[Module R' M]
[Module S' N]
[Module R' Pₗ]
[Module S' Pₗ]
[SMulCommClass S' R' Pₗ]
[SMul S' S]
[IsScalarTower S' S N]
[IsScalarTower S' S Pₗ]
[SMul R' R]
[IsScalarTower R' R M]
[IsScalarTower R' R Pₗ]
(B : M →ₗ[R] N →ₗ[S] Pₗ)
(m : M)

∀ (x : N), ((LinearMap.restrictScalars₁₂ R' S' B) m) x = (B m) x


@[to_additive]
protected theorem mul_mul_mul_comm (hbc : Commute b c) (a d : S) :
    a * b * (c * d) = a * c * (b * d)

{S : Type u_3}
[AddSemigroup S]
{b c : S}
(hbc : AddCommute b c)
(a d : S)


@[to_additive (attr := simp)]
theorem coe_one : ((1 : NonemptyInterval α) : Set α) = 1

{α : Type u_2}
[PartialOrder α]
[Zero α]


theorem restrict_le_zero_of_not_measurable (hi : ¬MeasurableSet i) : v ≤[i] 0

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[OrderedAddCommMonoid M]
(v : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : ¬MeasurableSet i)

v.restrict i ≤ MeasureTheory.VectorMeasure.restrict 0 i


protected theorem Ne.dite_eq_right_iff (h : ∀ h, A h ≠ b) : (dite P A fun _ ↦ b) = b ↔ ¬P

{α : Sort u_1}
{P : Prop}
[Decidable P]
{b : α}
{A : P → α}
(h : ∀ (h : P), A h ≠ b)


theorem chineseRemainderOfMultiset_lt_prod {m : Multiset ι}
    (nod : m.Nodup) (hs : ∀ i ∈ m, s i ≠ 0) (pp : Set.Pairwise {x | x ∈ m} (Coprime on s)) :
    chineseRemainderOfMultiset a s nod hs pp < (m.map s).prod

(pp : {x | x ∈ m}.Pairwise (Nat.Coprime on s))

↑(Nat.chineseRemainderOfMultiset a s nod hs pp) < (Multiset.map s m).prod


/-- Isomorphism between `M ∗ PUnit` and `M`. -/
@[simps! (config := .asFn)]
def coprodPUnit : M ∗ PUnit ≃* M

⇑(Monoid.MulEquiv.coprodPUnit M) = ⇑Monoid.Coprod.fst


theorem multiplicity_one {p : ℕ} (hp : p.Prime) : multiplicity p 1 = 0


@[deprecated (since := "2024-04-14")]
theorem coe_sub : ⇑(B₁ - D₁) = B₁ - D₁

{R₁ : Type u_4}
{M₁ : Type u_5}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
(B₁ D₁ : LinearMap.BilinForm R₁ M₁)


theorem card_infs_iff :
    (s ⊼ t).card = s.card * t.card ↔ (s ×ˢ t : Set (α × α)).InjOn fun x => x.1 ⊓ x.2

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

(s ⊼ t).card = s.card * t.card ↔ Set.InjOn (fun x => x.1 ⊓ x.2) (↑s ×ˢ ↑t)


@[simp]
theorem canonicalEquiv_coeIdeal (I : Ideal R) : canonicalEquiv S P P' I = I

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
(P : Type u_2)
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(P' : Type u_3)
[CommRing P']
[Algebra R P']
[loc' : IsLocalization S P']
(I : Ideal R)

(FractionalIdeal.canonicalEquiv S P P') ↑I = ↑I


@[simp]
theorem cancelBaseChange_tmul (m : M) (n : N) (a : A) :
    cancelBaseChange R A B M N (m ⊗ₜ (a ⊗ₜ n)) = (a • m) ⊗ₜ n

(R : Type uR)
(A : Type uA)
(B : Type uB)
{M : Type uM}
{N : Type uN}
[CommSemiring R]
[CommSemiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[AddCommMonoid M]
[Module R M]
[Module A M]
[Module B M]
[IsScalarTower R A M]
[IsScalarTower R B M]
[SMulCommClass A B M]
[AddCommMonoid N]
[Module R N]
[Algebra A B]
[IsScalarTower A B M]
(m : M)
(n : N)
(a : A)

(TensorProduct.AlgebraTensorModule.cancelBaseChange R A B M N) (m ⊗ₜ[A] a ⊗ₜ[R] n) = (a • m) ⊗ₜ[R] n


theorem HasBasis.prod_same_index {p : ι → Prop} {sb : ι → Set β} (hla : la.HasBasis p sa)
    (hlb : lb.HasBasis p sb) (h_dir : ∀ {i j}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j) :
    (la ×ˢ lb).HasBasis p fun i => sa i ×ˢ sb i

(h_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j)


/-- Extensionality lemma for algebra maps out of `A'[X]` over a smaller base ring than `A'`
-/
@[ext 1100]
theorem algHom_ext' {f g : A[X] →ₐ[R] B}
    (hC : f.comp CAlgHom = g.comp CAlgHom)
    (hX : f X = g X) : f = g

(hC : f.comp Polynomial.CAlgHom = g.comp Polynomial.CAlgHom)


theorem iter_deriv_zpow (m : ℤ) (x : 𝕜) (k : ℕ) :
    deriv^[k] (fun y => y ^ m) x = (∏ i ∈ Finset.range k, ((m : 𝕜) - i)) * x ^ (m - k)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(m : ℤ)
(x : 𝕜)
(k : ℕ)

deriv^[k] (fun y => y ^ m) x = (∏ i ∈ Finset.range k, (↑m - ↑i)) * x ^ (m - ↑k)


/-- `f z ^ g z` is analytic if `f z` avoids nonpositive reals -/
theorem AnalyticOn.cpow (fs : AnalyticOn ℂ f s) (gs : AnalyticOn ℂ g s)
    (m : ∀ z ∈ s, f z ∈ slitPlane) : AnalyticOn ℂ (fun z ↦ f z ^ g z) s

{E : Type}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : E → ℂ}
{s : Set E}
(fs : AnalyticOn ℂ f s)
(gs : AnalyticOn ℂ g s)
(m : ∀ z ∈ s, f z ∈ Complex.slitPlane)


@[simp] lemma Function.End.smul_def (f : Function.End α) (a : α) : f • a = f a

{α : Type u_7}
(f : Function.End α)
(a : α)


theorem det_eq_zero_of_column_eq_zero {A : Matrix n n R} (j : n) (h : ∀ i, A i j = 0) :
    det A = 0

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{A : Matrix n n R}
(j : n)
(h : ∀ (i : n), A i j = 0)


theorem univ_pi_singleton (f : ∀ i, α i) : (pi univ fun i => {f i}) = ({f} : Set (∀ i, α i))

{ι : Type u_1}
{α : ι → Type u_2}
(f : (i : ι) → α i)


@[to_additive] lemma card_le_card_div_left (hs : s.Nonempty) : t.card ≤ (s / t).card

{α : Type u_2}
[Group α]
[DecidableEq α]
{s t : Finset α}
(hs : s.Nonempty)


theorem triangle (M N : ModuleCat.{u} R) :
    (associator M (ModuleCat.of R R) N).hom ≫ tensorHom (𝟙 M) (leftUnitor N).hom =
      tensorHom (rightUnitor M).hom (𝟙 N)

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

(ModuleCat.MonoidalCategory.associator M (ModuleCat.of R R) N).hom ≫
    ModuleCat.MonoidalCategory.tensorHom (𝟙 M) (ModuleCat.MonoidalCategory.leftUnitor N).hom =
  ModuleCat.MonoidalCategory.tensorHom (ModuleCat.MonoidalCategory.rightUnitor M).hom (𝟙 N)


@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one_swapped :
    𝓤 α = comap (fun x : α × α => x.2⁻¹ * x.1) (𝓝 (1 : α))

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]

𝓤 α = Filter.comap (fun x => x.2⁻¹ * x.1) (𝓝 1)


theorem Continuous.cpow (hf : Continuous f) (hg : Continuous g)
    (h0 : ∀ a, f a ∈ slitPlane) : Continuous fun x => f x ^ g x

(h0 : ∀ (a : α), f a ∈ Complex.slitPlane)


@[simp]
theorem centralizer_univ {R} [NonUnitalSemiring R] : centralizer Set.univ = center R

NonUnitalSubsemiring.centralizer Set.univ = NonUnitalSubsemiring.center R


/-- The L-series of a Dirichlet character does not vanish on the right half-plane `re s > 1`. -/
lemma LSeries_ne_zero_of_one_lt_re {N : ℕ} (χ : DirichletCharacter ℂ N) {s : ℂ} (hs : 1 < s.re) :
    L ↗χ s ≠ 0


@[simp]
theorem map_apply_ι (f : M →ₗ[R] N) (m : M) : map f (ι R m) = ι R (f m)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{N : Type u4}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)
(m : M)

(ExteriorAlgebra.map f) ((ExteriorAlgebra.ι R) m) = (ExteriorAlgebra.ι R) (f m)


/-- A simplicial set `S` is a *quasicategory* if it satisfies the following horn-filling condition:
for every `n : ℕ` and `0 < i < n`,
every map of simplicial sets `σ₀ : Λ[n, i] → S` can be extended to a map `σ : Δ[n] → S`.

[Kerodon, 003A] -/
class Quasicategory (S : SSet) : Prop where
  hornFilling' : ∀ ⦃n : ℕ⦄ ⦃i : Fin (n+3)⦄ (σ₀ : Λ[n+2, i] ⟶ S)
    (_h0 : 0 < i) (_hn : i < Fin.last (n+2)),
      ∃ σ : Δ[n+2] ⟶ S, σ₀ = hornInclusion (n+2) i ≫ σ

{S : SSet}
[self : S.Quasicategory]
⦃n : ℕ⦄
⦃i : Fin (n + 3)⦄
(σ₀ : SSet.horn (n + 2) i ⟶ S)
(_h0 : 0 < i)
(_hn : i < Fin.last (n + 2))

∃ σ, σ₀ = CategoryTheory.CategoryStruct.comp (SSet.hornInclusion (n + 2) i) σ


@[to_additive (attr := simp)]
theorem coe_snd : ⇑(snd M N) = Prod.snd

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]


@[to_additive]
theorem subset_interior_div : interior s / interior t ⊆ interior (s / t)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s t : Set G}

interior s - interior t ⊆ interior (s - t)


theorem comonadToFunctor_mapIso_comonad_iso_mk {M N : Comonad C} (f : (M : C ⥤ C) ≅ N) (f_ε f_δ) :
    (comonadToFunctor _).mapIso (ComonadIso.mk f f_ε f_δ) = f

(f_ε : ∀ (X : C), CategoryTheory.CategoryStruct.comp (f.hom.app X) (N.ε.app X) = M.ε.app X)

(f_δ :
  ∀ (X : C),
    CategoryTheory.CategoryStruct.comp (f.hom.app X) (N.δ.app X) =
      CategoryTheory.CategoryStruct.comp (M.δ.app X)
        (CategoryTheory.CategoryStruct.comp (f.hom.app (M.obj X)) (N.map (f.hom.app X))))

(CategoryTheory.comonadToFunctor C).mapIso (CategoryTheory.ComonadIso.mk f f_ε f_δ) = f


@[simp]
theorem coeff_frobenius_charP (x : 𝕎 R) (n : ℕ) : coeff (frobenius x) n = x.coeff n ^ p

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

(WittVector.frobenius x).coeff n = x.coeff n ^ p


theorem blockDiagonal_map (M : o → Matrix m n α) (f : α → β) (hf : f 0 = 0) :
    (blockDiagonal M).map f = blockDiagonal fun k => (M k).map f

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
{β : Type u_13}
[DecidableEq o]
[Zero α]
[Zero β]
(M : o → Matrix m n α)
(f : α → β)
(hf : f 0 = 0)

(Matrix.blockDiagonal M).map f = Matrix.blockDiagonal fun k => (M k).map f


theorem Prop.exists_iff {p : Prop → Prop} : (∃ h, p h) ↔ p False ∨ p True


theorem incMatrix_mul_transpose
    [∀ a, Fintype (neighborSet G a)] [DecidableEq α] [DecidableRel G.Adj] :
    G.incMatrix R * (G.incMatrix R)ᵀ = fun a b =>
      if a = b then (G.degree a : R) else if G.Adj a b then 1 else 0

{R : Type u_1}
{α : Type u_2}
(G : SimpleGraph α)
[Fintype (Sym2 α)]
[Semiring R]
[(a : α) → Fintype ↑(G.neighborSet a)]
[DecidableEq α]
[DecidableRel G.Adj]

SimpleGraph.incMatrix R G * (SimpleGraph.incMatrix R G)ᵀ = fun a b =>
  if a = b then ↑(G.degree a) else if G.Adj a b then 1 else 0


theorem card_fintype_Ico : Fintype.card (Set.Ico a b) = (b - a).toNat

Fintype.card ↑(Set.Ico a b) = (b - a).toNat


theorem sSup_image2_eq_sInf_sInf (h₁ : ∀ b, GaloisConnection (swap l b ∘ ofDual) (toDual ∘ u₁ b))
    (h₂ : ∀ a, GaloisConnection (l a ∘ ofDual) (toDual ∘ u₂ a)) :
    sSup (image2 l s t) = l (sInf s) (sInf t)

{l : α → β → γ}

{u₁ : β → γ → α}

{u₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (Function.swap l b ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ u₁ b))

(h₂ : ∀ (a : α), GaloisConnection (l a ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ u₂ a))

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


theorem mk_lt_mk_iff_left : (a₁, b) < (a₂, b) ↔ a₁ < a₂

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{a₁ a₂ : α}
{b : β}


theorem _root_.MeasurableEmbedding.aestronglyMeasurable_map_iff {γ : Type*}
    {mγ : MeasurableSpace γ} {mα : MeasurableSpace α} {f : γ → α} {μ : Measure γ}
    (hf : MeasurableEmbedding f) {g : α → β} :
    AEStronglyMeasurable g (Measure.map f μ) ↔ AEStronglyMeasurable (g ∘ f) μ

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace β]
{γ : Type u_5}
{mγ : MeasurableSpace γ}
{mα : MeasurableSpace α}
{f : γ → α}
{μ : MeasureTheory.Measure γ}
(hf : MeasurableEmbedding f)
{g : α → β}

MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map f μ) ↔ MeasureTheory.AEStronglyMeasurable (g ∘ f) μ


theorem IsWide.id_mem {S : Subgroupoid C} (Sw : S.IsWide) (c : C) : 𝟙 c ∈ S.arrows c c

{C : Type u}
[CategoryTheory.Groupoid C]
{S : CategoryTheory.Subgroupoid C}
(Sw : S.IsWide)
(c : C)

CategoryTheory.CategoryStruct.id c ∈ S.arrows c c


@[simp]
theorem coe_id : ⇑(CocompactMap.id α) = id


theorem norm_setToL1_le_norm_setToL1SCLM (hT : DominatedFinMeasAdditive μ T C) :
    ‖setToL1 hT‖ ≤ ‖setToL1SCLM α E μ hT‖

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

‖MeasureTheory.L1.setToL1 hT‖ ≤ ‖MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT‖


/-- If a function is analytic on a set `s`, so is its Fréchet derivative. -/
theorem AnalyticOn.fderiv [CompleteSpace F] (h : AnalyticOn 𝕜 f s) :
    AnalyticOn 𝕜 (fderiv 𝕜 f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
[CompleteSpace F]
(h : AnalyticOn 𝕜 f s)


theorem hasDerivAt_const : HasDerivAt (fun _ => c) 0 x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
(c : F)


private theorem Heap.realSize_findMin {s : Heap α}
    (m) (hk : ∀ s, (k s).realSize = m + s.realSize)
    (eq : n = m + s.realSize) (hres : res.HasSize n) :
    (s.findMin le k res).HasSize n

{k : Batteries.BinomialHeap.Imp.Heap α → Batteries.BinomialHeap.Imp.Heap α}

{res : Batteries.BinomialHeap.Imp.FindMin α}

(hk : ∀ (s : Batteries.BinomialHeap.Imp.Heap α), (k s).realSize = m + s.realSize)

(hres : Batteries.BinomialHeap.Imp.FindMin.HasSize res n)

Batteries.BinomialHeap.Imp.FindMin.HasSize (Batteries.BinomialHeap.Imp.Heap.findMin le k s res) n


/-- Reinterpret an `⨅`-homomorphism as a `⨆`-homomorphism between the dual orders. -/
@[simps]
protected def dual : sInfHom α β ≃ sSupHom αᵒᵈ βᵒᵈ

{α : Type u_2}
{β : Type u_3}
[InfSet α]
[InfSet β]
(f : sInfHom α β)

∀ (a : αᵒᵈ), (sInfHom.dual f) a = (⇑OrderDual.toDual ∘ ⇑f ∘ ⇑OrderDual.ofDual) a


theorem iSup_eq_dif {p : Prop} [Decidable p] (a : p → α) :
    ⨆ h : p, a h = if h : p then a h else ⊥

{α : Type u_1}
[CompleteLattice α]
{p : Prop}
[Decidable p]
(a : p → α)

⨆ (h : p), a h = if h : p then a h else ⊥


theorem diam_univ : Metric.diam (univ : Set α) = Metric.diam (univ : Set β)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(h : α ≃ᵢ β)

Metric.diam Set.univ = Metric.diam Set.univ


@[simp]
theorem frontier_prod_univ_eq (s : Set X) :
    frontier (s ×ˢ (univ : Set Y)) = frontier s ×ˢ univ

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(s : Set X)

frontier (s ×ˢ Set.univ) = frontier s ×ˢ Set.univ


theorem mem_map_iff_of_surjective {I : Ideal R} {y} : y ∈ map f I ↔ ∃ x, x ∈ I ∧ f x = y

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(hf : Function.Surjective ⇑f)
{I : Ideal R}
{y : S}


/-- A nonzero Hermitian matrix has an eigenvector with nonzero eigenvalue. -/
lemma exists_eigenvector_of_ne_zero (hA : IsHermitian A) (h_ne : A ≠ 0) :
    ∃ (v : n → 𝕜) (t : ℝ), t ≠ 0 ∧ v ≠ 0 ∧ A *ᵥ v = t • v

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
(hA : A.IsHermitian)
(h_ne : A ≠ 0)

∃ v t, t ≠ 0 ∧ v ≠ 0 ∧ A.mulVec v = t • v


@[simp]
theorem Cotrident.π_eq_app_one (t : Cotrident f) : t.π = t.ι.app one

{J : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f : J → (X ⟶ Y)}
(t : CategoryTheory.Limits.Cotrident f)

t.π = t.ι.app CategoryTheory.Limits.WalkingParallelFamily.one


lemma isIso_unit_app_iff_mem_essImage [R.Faithful] [R.Full] {Y : C} :
    IsIso (h.unit.app Y) ↔ Y ∈ R.essImage

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
[R.Faithful]
[R.Full]
{Y : C}

CategoryTheory.IsIso (h.unit.app Y) ↔ Y ∈ R.essImage


/-- A measure is complete if every null set is also measurable.
  A null set is a subset of a measurable set with measure `0`.
  Since every measure is defined as a special case of an outer measure, we can more simply state
  that a set `s` is null if `μ s = 0`. -/
class Measure.IsComplete {_ : MeasurableSpace α} (μ : Measure α) : Prop where
  out' : ∀ s, μ s = 0 → MeasurableSet s

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [self : μ.IsComplete] (s : Set α), μ s = 0 → MeasurableSet s


@[simp]
theorem forget_obj {U : Over X} : (forget X).obj U = U.left

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
{U : CategoryTheory.Over X}

(CategoryTheory.Over.forget X).obj U = U.left


@[simp]
theorem zeroth_cont_eq_h_one : g.conts 0 = ⟨g.h, 1⟩

{K : Type u_1}
{g : GenContFract K}
[DivisionRing K]


@[to_additive]
theorem symm_comp_eq {α : Type*} (e : M ≃* N) (f : α → M) (g : α → N) :
    e.symm ∘ g = f ↔ g = e ∘ f

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
{α : Type u_12}
(e : M ≃* N)
(f : α → M)
(g : α → N)


@[simp]
theorem inl_one [One R] [Zero M] : (inl 1 : tsze R M) = 1

{R : Type u}
(M : Type v)
[One R]
[Zero M]


@[to_additive (attr := simp)]
theorem ofLex_mul [Mul α] (a b : Lex α) : ofLex (a * b) = ofLex a * ofLex b


lemma rnDeriv_zero (ν : Measure α) : (0 : Measure α).rnDeriv ν =ᵐ[ν] 0

{α : Type u_1}
{m : MeasurableSpace α}
(ν : MeasureTheory.Measure α)

MeasureTheory.Measure.rnDeriv 0 ν =ᵐ[ν] 0


@[simp]
theorem biInter_and (p : ι → Prop) (q : ι → ι' → Prop) (s : ∀ x y, p x ∧ q x y → Set α) :
    ⋂ (x : ι) (y : ι') (h : p x ∧ q x y), s x y h =
      ⋂ (x : ι) (hx : p x) (y : ι') (hy : q x y), s x y ⟨hx, hy⟩

(s : (x : ι) → (y : ι') → p x ∧ q x y → Set α)

⋂ x, ⋂ y, ⋂ (h : p x ∧ q x y), s x y h = ⋂ x, ⋂ (hx : p x), ⋂ y, ⋂ (hy : q x y), s x y ⋯


@[deprecated map_mul (since := "2024-06-20")]
protected theorem map_mul : ∀ x y, e (x * y) = e x * e y

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


theorem product_sdiff_offDiag : s ×ˢ s \ s.offDiag = s.diag

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


@[mono]
theorem toFinset_subset_toFinset [Fintype s] [Fintype t] : s.toFinset ⊆ t.toFinset ↔ s ⊆ t

{α : Type u_1}
{s t : Set α}
[Fintype ↑s]
[Fintype ↑t]


theorem div_lt_of_lt_mul' (h : a < b * c) : a / b < c


@[simp]
theorem Limit.π_mk (x : ∀ j, F.obj j) (h : ∀ (j j') (f : j ⟶ j'), F.map f (x j) = x j') (j) :
    limit.π F j (Limit.mk F x h) = x j

(h : ∀ (j j' : J) (f : j ⟶ j'), F.map f (x j) = x j')

CategoryTheory.Limits.limit.π F j (CategoryTheory.Limits.Types.Limit.mk F x h) = x j


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

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

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


theorem tail_congr {s t : WSeq α} (h : s ~ʷ t) : tail s ~ʷ tail t

{α : Type u}
{s t : Stream'.WSeq α}
(h : s ~ʷ t)


@[to_additive (attr := simp, norm_cast)]
theorem coe_one [One M] : ↑(1 : α → M) = (1 : Germ l M)

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


/-- Given an adjunction `F ⊣ G`, this provides the natural adjunction
  `(whiskeringRight C _ _).obj F ⊣ (whiskeringRight C _ _).obj G`. -/
@[simps! unit_app_app counit_app_app]
protected def whiskerRight (adj : F ⊣ G) :
    (whiskeringRight C D E).obj F ⊣ (whiskeringRight C E D).obj G

(C : Type u_1)
{D : Type u_2}
{E : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} E]
{F : CategoryTheory.Functor D E}
{G : CategoryTheory.Functor E D}
(adj : F ⊣ G)
(X : CategoryTheory.Functor C D)

∀ (X_1 : C), ((CategoryTheory.Adjunction.whiskerRight C adj).unit.app X).app X_1 = adj.unit.app (X.obj X_1)


@[to_additive (attr := simp)]
theorem mul_inv : (a * ↑a⁻¹ : α) = 1

{α : Type u}
[AddMonoid α]
(a : AddUnits α)


/-- Given a predicate on `β` and `Set α` where both `α` and `β` are measurable spaces, if the
predicate holds for almost every `x : β` and
- `∅ : Set α`
- a family of sets generating the σ-algebra of `α`
Moreover, if for almost every `x : β`, the predicate is closed under complements and countable
disjoint unions, then the predicate holds for almost every `x : β` and all measurable sets of `α`.

This is an AE version of `MeasurableSpace.induction_on_inter` where the condition is dependent
on a measurable space `β`. -/
theorem _root_.MeasurableSpace.ae_induction_on_inter {β} [MeasurableSpace β] {μ : Measure β}
    {C : β → Set α → Prop} {s : Set (Set α)} [m : MeasurableSpace α]
    (h_eq : m = MeasurableSpace.generateFrom s)
    (h_inter : IsPiSystem s) (h_empty : ∀ᵐ x ∂μ, C x ∅) (h_basic : ∀ᵐ x ∂μ, ∀ t ∈ s, C x t)
    (h_compl : ∀ᵐ x ∂μ, ∀ t, MeasurableSet t → C x t → C x tᶜ)
    (h_union : ∀ᵐ x ∂μ, ∀ f : ℕ → Set α,
        Pairwise (Disjoint on f) → (∀ i, MeasurableSet (f i)) → (∀ i, C x (f i)) → C x (⋃ i, f i)) :
    ∀ᵐ x ∂μ, ∀ ⦃t⦄, MeasurableSet t → C x t

(h_basic : ∀ᵐ (x : β) ∂μ, ∀ t ∈ s, C x t)

(h_compl : ∀ᵐ (x : β) ∂μ, ∀ (t : Set α), MeasurableSet t → C x t → C x tᶜ)

(h_union :
  ∀ᵐ (x : β) ∂μ,
    ∀ (f : ℕ → Set α),
      Pairwise (Disjoint on f) → (∀ (i : ℕ), MeasurableSet (f i)) → (∀ (i : ℕ), C x (f i)) → C x (⋃ i, f i))

∀ᵐ (x : β) ∂μ, ∀ ⦃t : Set α⦄, MeasurableSet t → C x t


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

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

(IntermediateField.map f S).toSubfield = Subfield.map (↑f) S.toSubfield


/-- An exterior point of a subset `E` (i.e., a point outside the closure of `E`) is not in the
closed `δ`-thickening of `E` for small enough positive `δ`. -/
lemma eventually_not_mem_cthickening_of_infEdist_pos {E : Set α} {x : α} (h : x ∉ closure E) :
    ∀ᶠ δ in 𝓝 (0 : ℝ), x ∉ Metric.cthickening δ E

{α : Type u}
[PseudoEMetricSpace α]
{E : Set α}
{x : α}
(h : x ∉ closure E)

∀ᶠ (δ : ℝ) in 𝓝 0, x ∉ Metric.cthickening δ E


/-- Construct a homeomorphism from an isomorphism. -/
@[simps]
def homeoOfIso {X Y : CompactlyGenerated.{u, w}} (f : X ≅ Y) : X ≃ₜ Y

(a : (CategoryTheory.forget CompactlyGenerated).obj Y)

(CompactlyGenerated.homeoOfIso f).symm a = f.inv a


theorem pullbackIsoProdSubtype_hom_apply {f : X ⟶ Z} {g : Y ⟶ Z}
    (x : ConcreteCategory.forget.obj (pullback f g)) :
    (pullbackIsoProdSubtype f g).hom x =
      ⟨⟨pullback.fst f g x, pullback.snd f g x⟩, by
        simpa using ConcreteCategory.congr_hom pullback.condition x⟩

(x : CategoryTheory.ConcreteCategory.forget.obj (CategoryTheory.Limits.pullback f g))

(TopCat.pullbackIsoProdSubtype f g).hom x =
  ⟨((CategoryTheory.Limits.pullback.fst f g) x, (CategoryTheory.Limits.pullback.snd f g) x), ⋯⟩


@[simp]
theorem integral_zero_measure {m : MeasurableSpace α} (f : α → G) :
    (∫ x, f x ∂(0 : Measure α)) = 0

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
(f : α → G)


/-- One implication of the portmanteau theorem:
Weak convergence of probability measures implies that the liminf of the measures of any open set
is at least the measure of the open set under the limit probability measure.
-/
theorem ProbabilityMeasure.le_liminf_measure_open_of_tendsto {Ω ι : Type*} {L : Filter ι}
    [MeasurableSpace Ω] [PseudoEMetricSpace Ω] [OpensMeasurableSpace Ω] [HasOuterApproxClosed Ω]
    {μ : ProbabilityMeasure Ω} {μs : ι → ProbabilityMeasure Ω} (μs_lim : Tendsto μs L (𝓝 μ))
    {G : Set Ω} (G_open : IsOpen G) :
    (μ : Measure Ω) G ≤ L.liminf fun i => (μs i : Measure Ω) G

{μ : MeasureTheory.ProbabilityMeasure Ω}

{μs : ι → MeasureTheory.ProbabilityMeasure Ω}

↑μ G ≤ Filter.liminf (fun i => ↑(μs i) G) L


theorem tendsto_nhdsWithin_mono_left {f : α → β} {a : α} {s t : Set α} {l : Filter β} (hst : s ⊆ t)
    (h : Tendsto f (𝓝[t] a) l) : Tendsto f (𝓝[s] a) l

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{f : α → β}
{a : α}
{s t : Set α}
{l : Filter β}
(hst : s ⊆ t)
(h : Filter.Tendsto f (𝓝[t] a) l)


/-- **Chebyshev's Sum Inequality**: When `f` and `g` antivary together (eg one is monotone, the
other is antitone), the product of their sum is greater than the size of the set times their scalar
product. -/
theorem AntivaryOn.card_mul_sum_le_sum_mul_sum (hfg : AntivaryOn f g s) :
    ((s.card : α) * ∑ i ∈ s, f i * g i) ≤ (∑ i ∈ s, f i) * ∑ i ∈ s, g i

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{s : Finset ι}
{f g : ι → α}
(hfg : AntivaryOn f g ↑s)

↑s.card * ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i) * ∑ i ∈ s, g i


@[simp]
theorem mapIdx_nil {α β} (f : ℕ → α → β) : mapIdx f [] = []

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


theorem tendsto_log_comp_add_sub_log (y : ℝ) :
    Tendsto (fun x : ℝ => log (x + y) - log x) atTop (𝓝 0)

Filter.Tendsto (fun x => Real.log (x + y) - Real.log x) Filter.atTop (𝓝 0)


/-- The product of two dense inducings is a dense inducing -/
protected theorem prod [TopologicalSpace γ] [TopologicalSpace δ] {e₁ : α → β} {e₂ : γ → δ}
    (de₁ : DenseInducing e₁) (de₂ : DenseInducing e₂) :
    DenseInducing fun p : α × γ => (e₁ p.1, e₂ p.2)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
{e₁ : α → β}
{e₂ : γ → δ}
(de₁ : DenseInducing e₁)
(de₂ : DenseInducing e₂)


@[to_additive (attr := simp)]
theorem unop_comp_op : (unop : αᵐᵒᵖ → α) ∘ op = id


theorem HasStrictDerivAt.add_const (c : F) (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun y ↦ f y + c) f' x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
(c : F)
(hf : HasStrictDerivAt f f' x)

HasStrictDerivAt (fun y => f y + c) f' x


theorem monotone_map {f : M →[L] N} : Monotone (map f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}


theorem integrable_const_iff {c : β} : Integrable (fun _ : α => c) μ ↔ c = 0 ∨ μ univ < ∞

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{c : β}

MeasureTheory.Integrable (fun x => c) μ ↔ c = 0 ∨ μ Set.univ < ⊤


lemma preΨ_odd (m : ℕ) : W.preΨ (2 * (m + 2) + 1) =
    W.preΨ (m + 4) * W.preΨ (m + 2) ^ 3 * (if Even m then W.Ψ₂Sq ^ 2 else 1) -
      W.preΨ (m + 1) * W.preΨ (m + 3) ^ 3 * (if Even m then 1 else W.Ψ₂Sq ^ 2)

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

W.preΨ (2 * (↑m + 2) + 1) =
  (W.preΨ (↑m + 4) * W.preΨ (↑m + 2) ^ 3 * if Even m then W.Ψ₂Sq ^ 2 else 1) -
    W.preΨ (↑m + 1) * W.preΨ (↑m + 3) ^ 3 * if Even m then 1 else W.Ψ₂Sq ^ 2


@[simp]
theorem cospanExt_hom_app_one : (cospanExt iX iY iZ wf wg).hom.app WalkingCospan.one = iZ.hom

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z X' Y' Z' : C}
(iX : X ≅ X')
(iY : Y ≅ Y')
(iZ : Z ≅ Z')
{f : X ⟶ Z}
{g : Y ⟶ Z}
{f' : X' ⟶ Z'}
{g' : Y' ⟶ Z'}
(wf : iX.hom ≫ f' = f ≫ iZ.hom)
(wg : iY.hom ≫ g' = g ≫ iZ.hom)

(CategoryTheory.Limits.cospanExt iX iY iZ wf wg).hom.app CategoryTheory.Limits.WalkingCospan.one = iZ.hom


lemma pow_left_injective (hn : n ≠ 0) : Injective (fun a : ℕ ↦ a ^ n)


/-- `IsOption x y` means that `x` is either a left or right option for `y`. -/
@[mk_iff]
inductive IsOption : PGame → PGame → Prop
  | moveLeft {x : PGame} (i : x.LeftMoves) : IsOption (x.moveLeft i) x
  | moveRight {x : PGame} (i : x.RightMoves) : IsOption (x.moveRight i) x

∀ (a a_1 : SetTheory.PGame), a.IsOption a_1 ↔ (∃ i, a = a_1.moveLeft i) ∨ ∃ i, a = a_1.moveRight i


@[ext]
theorem ext {f g : SupBotHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Bot α]
[Sup β]
[Bot β]
{f g : SupBotHom α β}
(h : ∀ (a : α), f a = g a)


@[simp]
theorem sup_sdiff_inf (x y : α) : x \ y ⊔ x ⊓ y = x

{α : Type u}
[GeneralizedBooleanAlgebra α]
(x y : α)


@[simp]
theorem moebius_eq_zero_of_not_squarefree {n : ℕ} (h : ¬Squarefree n) : μ n = 0


@[simp]
theorem nfp_zero_mul : nfp (HMul.hMul 0) = id


@[simp]
lemma _root_.Isometry.toDilation_ratio {f : α → β} {hf : Isometry f} : ratio hf.toDilation = 1

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
{hf : Isometry f}

Dilation.ratio (Isometry.toDilation f hf) = 1


@[to_additive]
theorem TopologicalGroup.of_comm_of_nhds_one {G : Type u} [CommGroup G] [TopologicalSpace G]
    (hmul : Tendsto (uncurry ((· * ·) : G → G → G)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (x₀ * ·) (𝓝 1)) : TopologicalGroup G

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x + x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0))

(hinv : Filter.Tendsto (fun x => -x) (𝓝 0) (𝓝 0))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ + x) (𝓝 0))


/-- The angle ∠ABB at a point is always `π / 2`. -/
@[simp] lemma angle_self_right (p₀ p : P) : ∠ p p₀ p₀ = π / 2

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p₀ p : P)


theorem permCongr_def (p : Equiv.Perm α') : e.permCongr p = (e.symm.trans p).trans e

{α' : Type u_1}
{β' : Type u_2}
(e : α' ≃ β')
(p : Equiv.Perm α')


lemma CompleteOrthogonalIdempotents.single {I : Type*} [Fintype I] [DecidableEq I]
    (R : I → Type*) [∀ i, Ring (R i)] :
    CompleteOrthogonalIdempotents (Pi.single (f := R) · 1)

{I : Type u_4}
[Fintype I]
[DecidableEq I]
(R : I → Type u_5)
[(i : I) → Ring (R i)]

CompleteOrthogonalIdempotents fun x => Pi.single x 1


@[simp]
theorem diagram_fst (i j : D.J) : D.diagram.fst ⟨i, j⟩ = D.f i j

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(D : CategoryTheory.GlueData C)
(i j : D.J)


theorem not_mem_of_ortho {x : M} {N : Submodule R M}
    (ortho : ∀ (c : R), ∀ y ∈ N, c • x + y = (0 : M) → c = 0) : x ∉ N

(ortho : ∀ (c : R), ∀ y ∈ N, c • x + y = 0 → c = 0)


lemma chainLength_smul {x} (hx : x ∈ rootSpace H (chainTop α β)) :
    (chainLength α β : K) • x = ⁅coroot α, x⁆

(hx : x ∈ LieAlgebra.rootSpace H ⇑(LieModule.chainTop (⇑α) β))

↑(LieAlgebra.IsKilling.chainLength α β) • x = ⁅LieAlgebra.IsKilling.coroot α, x⁆


theorem equiv_fst_eq_one_of_mem_of_one_mem {g : G} (h1 : 1 ∈ S) (hg : g ∈ T) :
    (hST.equiv g).fst = ⟨1, h1⟩

{G : Type u_1}
[Group G]
{S T : Set G}
(hST : Subgroup.IsComplement S T)
{g : G}
(h1 : 1 ∈ S)
(hg : g ∈ T)


theorem pow_toAddSubmonoid {n : ℕ} (h : n ≠ 0) : (M ^ n).toAddSubmonoid = M.toAddSubmonoid ^ n

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M : Submodule R A)
{n : ℕ}
(h : n ≠ 0)


/-- The singleton prepartition `{J}`, `J ≤ I`. -/
@[simps]
def single (I J : Box ι) (h : J ≤ I) : Prepartition I

{ι : Type u_1}
(I J : BoxIntegral.Box ι)
(h : J ≤ I)

(BoxIntegral.Prepartition.single I J h).boxes = {J}


@[simp] protected theorem le_zero (a : Associates α) : a ≤ 0

{α : Type u_1}
[CommMonoidWithZero α]
(a : Associates α)


@[to_additive]
theorem exists_ne_one_of_nontrivial (H : Subgroup G) [Nontrivial H] :
    ∃ x ∈ H, x ≠ 1

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
[Nontrivial ↥H]


theorem inl_snd' {b : BinaryBicone X Y} (h : b.IsBilimit) :
    IsPullback b.inl (0 : X ⟶ 0) b.snd (0 : 0 ⟶ Y)

{b : CategoryTheory.Limits.BinaryBicone X Y}

CategoryTheory.IsPullback b.inl 0 b.snd 0


@[to_additive (attr := simp)]
theorem map_subtype_le_map_subtype {G' : Subgroup G} {H K : Subgroup G'} :
    H.map G'.subtype ≤ K.map G'.subtype ↔ H ≤ K

{G : Type u_1}
[Group G]
{G' : Subgroup G}
{H K : Subgroup ↥G'}

Subgroup.map G'.subtype H ≤ Subgroup.map G'.subtype K ↔ H ≤ K


@[simp]
theorem quot_mk_eq_ι (m : X) : Quot.mk (FreeAlgebra.Rel R X) m = ι R m

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

Quot.mk (FreeAlgebra.Rel R X) (FreeAlgebra.Pre.of m) = FreeAlgebra.ι R m


@[to_additive (attr := simp)]
theorem prod_take_succ :
    ∀ (L : List M) (i : ℕ) (p : i < L.length), (L.take (i + 1)).prod = (L.take i).prod * L[i]

{M : Type u_4}
[Monoid M]
(L : List M)
(i : ℕ)
(p : i < L.length)

(List.take (i + 1) L).prod = (List.take i L).prod * L[i]


theorem isLowerSet_Iio : IsLowerSet (Iio a)


@[to_additive is_left_invariant_addCHaar]
theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compacts G) :
    chaar K₀ (K.map _ <| continuous_mul_left g) = chaar K₀ K

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.addCHaar K₀ (TopologicalSpace.Compacts.map (fun b => g + b) ⋯ K) =
  MeasureTheory.Measure.haar.addCHaar K₀ K


theorem fderivWithin_neg (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (fun y => -f y) s x = -fderivWithin 𝕜 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}
{x : E}
{s : Set E}
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem Odd.zpow_nonpos_iff (hn : Odd n) : a ^ n ≤ 0 ↔ a ≤ 0

{α : Type u_1}
[LinearOrderedField α]
{a : α}
{n : ℤ}
(hn : Odd n)


theorem tendsto_atBot_of_add_const_left (C : β) (hf : Tendsto (fun x => C + f x) l atBot) :
    Tendsto f l atBot

(hf : Filter.Tendsto (fun x => C + f x) l Filter.atBot)


theorem inv_natCast_den_of_pos {a : ℕ} (ha0 : 0 < a) : (a : ℚ)⁻¹.den = a


protected theorem Ioo_subset_Icc (I : Box ι) : Box.Ioo I ⊆ Box.Icc I

BoxIntegral.Box.Ioo I ⊆ BoxIntegral.Box.Icc I


theorem hcomp_half (F : Homotopy p₀ q₀) (G : Homotopy p₁ q₁) (t : I) :
    F.hcomp G (t, ⟨1 / 2, by norm_num, by norm_num⟩) = x₁

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ x₂ : X}
{p₀ q₀ : Path x₀ x₁}
{p₁ q₁ : Path x₁ x₂}
(F : p₀.Homotopy q₀)
(G : p₁.Homotopy q₁)
(t : ↑I)


@[to_additive] lemma mabs_choice (x : α) : |x|ₘ = x ∨ |x|ₘ = x⁻¹

{α : Type u_1}
[Group α]
[LinearOrder α]
(x : α)


@[simp]
theorem Sigma.uncurry_curry {γ : ∀ a, β a → Type*} (f : ∀ x : Sigma β, γ x.1 x.2) :
    Sigma.uncurry (Sigma.curry f) = f

{α : Type u_1}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_7}
(f : (x : Sigma β) → γ x.fst x.snd)


lemma re_neg_ne_zero_of_one_lt_re {s : ℂ} (hs : 1 < s.re) : (-s).re ≠ 0


/-- If `i : D ⥤ C` is reflective, the inverse functor of `i ≌ F.essImage` can be explicitly
defined by the reflector. -/
@[simps]
def equivEssImageOfReflective [Reflective i] : D ≌ i.EssImageSubcategory

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{i : CategoryTheory.Functor D C}
[CategoryTheory.Reflective i]


theorem lt_pow_succ_log_self {b : ℕ} (hb : 1 < b) (x : ℕ) : x < b ^ (log b x).succ


@[simp]
theorem get_bind (s : Computation α) (f : α → Computation β) [Terminates s]
    [Terminates (f (get s))] : get (bind s f) = get (f (get s))

{α : Type u}
{β : Type v}
(s : Computation α)
(f : α → Computation β)
[s.Terminates]
[(f s.get).Terminates]


lemma mem_stabilizer_iff {g : (Perm α)ᵈᵐᵃ} :
    g ∈ stabilizer (Perm α)ᵈᵐᵃ f ↔ f ∘ (mk.symm g :) = f

{α : Type u_1}
{ι : Type u_2}
{f : α → ι}
{g : (Equiv.Perm α)ᵈᵐᵃ}

g ∈ MulAction.stabilizer (Equiv.Perm α)ᵈᵐᵃ f ↔ f ∘ ⇑(DomMulAct.mk.symm g) = f


/-- Show that an element extracted from `P : ∃ a, p a` using `P.choose` satisfies `p`. -/
theorem Exists.choose_spec {p : α → Prop} (P : ∃ a, p a) : p P.choose

{α : Sort u_1}
{p : α → Prop}
(P : ∃ a, p a)


theorem one_out_eq (x : (1 : Ordinal).out.α) : x = enum (· < ·) 0 (by simp)

x = Ordinal.enum (fun x x_1 => x < x_1) 0 ⋯


theorem eq_of_eqOn_set_top {f g : R →ₙ+* S} (h : Set.EqOn f g (⊤ : NonUnitalSubring R)) : f = g

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
{f g : R →ₙ+* S}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


@[simp]
theorem prodMkRight_apply (κ : Kernel α β) (ca : α × γ) : prodMkRight γ κ ca = κ ca.fst

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_5}
{mγ : MeasurableSpace γ}
(κ : ProbabilityTheory.Kernel α β)
(ca : α × γ)

(ProbabilityTheory.Kernel.prodMkRight γ κ) ca = κ ca.1


@[to_additive (attr := simp, norm_cast)]
theorem coe_dfinsupp_prod [Monoid R] [CommMonoid S] (f : Π₀ i, β i) (g : ∀ i, β i → R →* S) :
    ⇑(f.prod g) = f.prod fun a b => ⇑(g a b)

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


/-- If a continuous linear map is constructed from a linear map via the constructor `mkContinuous`,
then its norm is bounded by the bound given to the constructor if it is nonnegative. -/
theorem mkContinuous_norm_le (f : E →ₛₗ[σ₁₂] F) {C : ℝ} (hC : 0 ≤ C) (h : ∀ x, ‖f x‖ ≤ C * ‖x‖) :
    ‖f.mkContinuous C h‖ ≤ C

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
(f : E →ₛₗ[σ₁₂] F)
{C : ℝ}
(hC : 0 ≤ C)
(h : ∀ (x : E), ‖f x‖ ≤ C * ‖x‖)


theorem fst_surjective [h : Nonempty β] : Function.Surjective (@fst α β)

{α : Type u_1}
{β : Type u_2}
[h : Nonempty β]


theorem quickCmp_rfl {n : Name} : n.quickCmp n = .eq


theorem hasColimitsOfShape_of_hasLimitsOfShape_op [HasLimitsOfShape Jᵒᵖ Cᵒᵖ] :
    HasColimitsOfShape J C


@[to_additive]
theorem inr_injective : Injective (inr : N →* M ∗ N)

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]


theorem eventually_imp_distrib_right {f : Filter α} {p : α → Prop} {q : Prop} :
    (∀ᶠ x in f, p x → q) ↔ (∃ᶠ x in f, p x) → q

{α : Type u}
{f : Filter α}
{p : α → Prop}
{q : Prop}

(∀ᶠ (x : α) in f, p x → q) ↔ (∃ᶠ (x : α) in f, p x) → q


/-- Partial sums of an alternating monotone series with an even number of terms provide
upper bounds on the limit. -/
theorem Monotone.tendsto_le_alternating_series
    (hfl : Tendsto (fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i) atTop (𝓝 l))
    (hfm : Monotone f) (k : ℕ) : l ≤ ∑ i ∈ range (2 * k), (-1) ^ i * f i

(hfl : Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, (-1) ^ i * f i) Filter.atTop (𝓝 l))

l ≤ ∑ i ∈ Finset.range (2 * k), (-1) ^ i * f i


nonrec theorem BoundedAtFilter.mul [SeminormedRing β] {l : Filter α} {f g : α → β}
    (hf : BoundedAtFilter l f) (hg : BoundedAtFilter l g) : BoundedAtFilter l (f * g)

{α : Type u_2}
{β : Type u_3}
[SeminormedRing β]
{l : Filter α}
{f g : α → β}
(hf : l.BoundedAtFilter f)
(hg : l.BoundedAtFilter g)


@[to_additive] lemma isMulFreimanIso_id : IsMulFreimanIso n A A id

{α : Type u_2}
[CommMonoid α]
{A : Set α}
{n : ℕ}