@[to_additive]
theorem prod_zpow (f : α → β) (s : Finset α) (n : ℤ) : ∏ a ∈ s, f a ^ n = (∏ a ∈ s, f a) ^ n

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


lemma whiskerRightIso_mapId (f : a ⟶ b) : whiskerRightIso (F.mapId a) (F.map f) =
    (F.mapComp (𝟙 a) f).symm ≪≫ F.map₂Iso (λ_ f) ≪≫ (λ_ (F.map f)).symm

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

CategoryTheory.Bicategory.whiskerRightIso (F.mapId a) (F.map f) =
  (F.mapComp (CategoryTheory.CategoryStruct.id a) f).symm ≪≫
    F.map₂Iso (CategoryTheory.Bicategory.leftUnitor f) ≪≫ (CategoryTheory.Bicategory.leftUnitor (F.map f)).symm


@[simp]
theorem forall_cons (p : α → Prop) (x : α) : ∀ l : List α, Forall p (x :: l) ↔ p x ∧ Forall p l

{α : Type u}
(p : α → Prop)
(x : α)
(l : List α)

List.Forall p (x :: l) ↔ p x ∧ List.Forall p l


theorem isLowerSet_iInter₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsLowerSet (f i j)) :
    IsLowerSet (⋂ (i) (j), f i j)

(hf : ∀ (i : ι) (j : κ i), IsLowerSet (f i j))


@[simp]
theorem self_mul_sign (x : α) : x * sign x = |x|

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


theorem rootMultiplicity_sub_one_le_derivative_rootMultiplicity [CharZero R] (p : R[X]) (t : R) :
    p.rootMultiplicity t - 1 ≤ p.derivative.rootMultiplicity t

{R : Type u}
[CommRing R]
[IsDomain R]
[CharZero R]
(p : R[X])
(t : R)

Polynomial.rootMultiplicity t p - 1 ≤ Polynomial.rootMultiplicity t (Polynomial.derivative p)


theorem isPathConnected_singleton (x : X) : IsPathConnected ({x} : Set X)

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


/-- The relative product homotopy of `homotopies` between functions `f` and `g` -/
@[simps!]
def HomotopyRel.pi (homotopies : ∀ i : I, HomotopyRel (f i) (g i) S) :
    HomotopyRel (pi f) (pi g) S

(homotopies : (i : I) → (f i).HomotopyRel (g i) S)

(ContinuousMap.HomotopyRel.pi homotopies) a i = (homotopies i) a


theorem biUnion_empty (s : α → Set β) : ⋃ x ∈ (∅ : Set α), s x = ∅

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


@[simp] theorem getElem?_set_ne {l : List α} {i j : Nat} (h : i ≠ j) {a : α}  :
    (l.set i a)[j]? = l[j]?

{α : Type u_1}
{l : List α}
{i j : Nat}
(h : i ≠ j)
{a : α}


@[reassoc (attr := simp)]
theorem counit_comul_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (M.counit ⊗ f) = f ≫ (λ_ Z).inv

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


protected lemma IsCycle.isCircuit {p : Walk G u u} (h : IsCycle p) : IsCircuit p

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


@[simp]
theorem map_zero (f : M →ₗ⁅R,L⁆ N) : f 0 = 0

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


lemma cfcₙ_apply_of_not_predicate {f : R → R} (a : A) (ha : ¬ p a) :
    cfcₙ f a = 0


@[simp]
theorem const_min [LinearOrder β] (x y : β) : (↑(min x y : β) : β*) = min ↑x ↑y

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[LinearOrder β]
(x y : β)


theorem lpMeasSubgroupToLpTrim_add (hm : m ≤ m0) (f g : lpMeasSubgroup F m p μ) :
    lpMeasSubgroupToLpTrim F p μ hm (f + g) =
      lpMeasSubgroupToLpTrim F p μ hm f + lpMeasSubgroupToLpTrim F p μ hm g

(f g : ↥(MeasureTheory.lpMeasSubgroup F m p μ))

MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm (f + g) =
  MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm f + MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm g


theorem mul_ne_zero {a b : Ordinal} : a ≠ 0 → b ≠ 0 → a * b ≠ 0


@[simp]
theorem count_nsmul (a : α) (n s) : count a (n • s) = n * count a s

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

Multiset.count a (n • s) = n * Multiset.count a s


theorem norm_compContinuousLinearMapLRight_le (g : ContinuousMultilinearMap 𝕜 E₁ G) :
    ‖compContinuousLinearMapLRight (E := E) g‖ ≤ ‖g‖

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

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


theorem subgroup_on_SL_apply (s : Γ) (g : SL(2, ℤ)) (z : ℍ) :
    (s • g) • z = ((s : SL(2, ℤ)) * g) • z

(Γ : Subgroup SL(2, ℤ))
(s : ↥Γ)
(g : SL(2, ℤ))
(z : ℍ)


@[simp, mfld_simps]
theorem localTrivAt_apply_mk (b : B) (a : F) : (Z.localTrivAt b) ⟨b, a⟩ = ⟨b, a⟩

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(b : B)
(a : F)

↑(Z.localTrivAt b) { proj := b, snd := a } = (b, a)


theorem nodup_toList (p : Perm α) (x : α) : Nodup (toList p x)

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(p : Equiv.Perm α)
(x : α)


@[simp]
theorem zeroLocus_singleton_zero : zeroLocus 𝒜 ({0} : Set A) = Set.univ

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

ProjectiveSpectrum.zeroLocus 𝒜 {0} = Set.univ


theorem hcomp {f₀ f₁ : C(X, Y)} {g₀ g₁ : C(Y, Z)} (h₀ : Homotopic f₀ f₁) (h₁ : Homotopic g₀ g₁) :
    Homotopic (g₀.comp f₀) (g₁.comp f₁)

{X : Type u}
{Y : Type v}
{Z : Type w}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f₀ f₁ : C(X, Y)}
{g₀ g₁ : C(Y, Z)}
(h₀ : f₀.Homotopic f₁)
(h₁ : g₀.Homotopic g₁)


theorem singularPart_smul_right (μ ν : Measure α) (r : ℝ≥0) (hr : r ≠ 0) :
    μ.singularPart (r • ν) = μ.singularPart ν

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
(r : ℝ≥0)
(hr : r ≠ 0)


@[to_additive (attr := simp)]
theorem smul_comp [SMul R M] [ContinuousConstSMul R M] (r : R) (f : C(β, M)) (g : C(α, β)) :
    (r • f).comp g = r • f.comp g

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{R : Type u_3}
{M : Type u_5}
[TopologicalSpace M]
[VAdd R M]
[ContinuousConstVAdd R M]
(r : R)
(f : C(β, M))
(g : C(α, β))


@[simp]
theorem image₂_left [DecidableEq α] (h : t.Nonempty) : image₂ (fun x _ => x) s t = s

{α : Type u_1}
{β : Type u_3}
{s : Finset α}
{t : Finset β}
[DecidableEq α]
(h : t.Nonempty)


theorem addHaar_closedBall (x : E) {r : ℝ} (hr : 0 ≤ r) :
    μ (closedBall x r) = ENNReal.ofReal (r ^ finrank ℝ E) * μ (ball 0 1)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(x : E)
{r : ℝ}
(hr : 0 ≤ r)

μ (Metric.closedBall x r) = ENNReal.ofReal (r ^ FiniteDimensional.finrank ℝ E) * μ (Metric.ball 0 1)


@[to_additive (attr := measurability)]
theorem _root_.Finset.aestronglyMeasurable_prod' {ι : Type*} {f : ι → α → M} (s : Finset ι)
    (hf : ∀ i ∈ s, AEStronglyMeasurable (f i) μ) : AEStronglyMeasurable (∏ i ∈ s, f i) μ

(hf : ∀ i ∈ s, MeasureTheory.AEStronglyMeasurable (f i) μ)

MeasureTheory.AEStronglyMeasurable (∏ i ∈ s, f i) μ


theorem coprime_one_right : ∀ n, Coprime n 1


/-- If `0 : X ⟶ Y` is a monomorphism, then `X ≅ 0`. -/
@[simps]
def isoZeroOfMonoZero {X Y : C} (h : Mono (0 : X ⟶ Y)) : X ≅ 0

(CategoryTheory.Limits.isoZeroOfMonoZero h).hom = 0


@[to_additive]
theorem map_ne_one_iff (h : M ≃* N) {x : M} : h x ≠ 1 ↔ x ≠ 1

{M : Type u_6}
{N : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
(h : M ≃+ N)
{x : M}


@[simp]
theorem mem_maxTrivSubmodule (m : M) : m ∈ maxTrivSubmodule R L M ↔ ∀ x : L, ⁅x, m⁆ = 0

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

m ∈ LieModule.maxTrivSubmodule R L M ↔ ∀ (x : L), ⁅x, m⁆ = 0


theorem erase_apply [DecidableEq α] {a a' : α} {f : α →₀ M} :
    f.erase a a' = if a' = a then 0 else f a'

{α : Type u_1}
{M : Type u_5}
[Zero M]
[DecidableEq α]
{a a' : α}
{f : α →₀ M}

(Finsupp.erase a f) a' = if a' = a then 0 else f a'


theorem upperCrossingTime_eq_of_upcrossingsBefore_lt (hab : a < b)
    (hn : upcrossingsBefore a b f N ω < n) : upperCrossingTime a b f N n ω = N

{f : ℕ → Ω → ℝ}

(hn : MeasureTheory.upcrossingsBefore a b f N ω < n)

MeasureTheory.upperCrossingTime a b f N n ω = N


theorem setLIntegral_mono {s : Set α} {f g : α → ℝ≥0∞} (hg : Measurable g)
    (hfg : ∀ x ∈ s, f x ≤ g x) : ∫⁻ x in s, f x ∂μ ≤ ∫⁻ x in s, g x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{f g : α → ℝ≥0∞}
(hg : Measurable g)
(hfg : ∀ x ∈ s, f x ≤ g x)

∫⁻ (x : α) in s, f x ∂μ ≤ ∫⁻ (x : α) in s, g x ∂μ


theorem Sylow.stabilizer_eq_normalizer (P : Sylow p G) :
    stabilizer G P = (P : Subgroup G).normalizer

{p : ℕ}
{G : Type u_1}
[Group G]
(P : Sylow p G)

MulAction.stabilizer G P = (↑P).normalizer


theorem mellin_comp_mul_right (f : ℝ → E) (s : ℂ) {a : ℝ} (ha : 0 < a) :
    mellin (fun t => f (t * a)) s = (a : ℂ) ^ (-s) • mellin f s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℝ → E)
(s : ℂ)
{a : ℝ}
(ha : 0 < a)

mellin (fun t => f (t * a)) s = ↑a ^ (-s) • mellin f s


@[to_additive (attr := simp)]
theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Zero γ]
(x : α → β)


theorem Rel.smulOfTower {S : Type*} [Monoid S] [DistribMulAction S R] [IsScalarTower S R R] (t : S)
    (a b : lib R X) (h : Rel R X a b) : Rel R X (t • a) (t • b)

{R : Type u}
{X : Type v}
[CommRing R]
{S : Type u_1}
[Monoid S]
[DistribMulAction S R]
[IsScalarTower S R R]
(t : S)
(a b : lib R X)
(h : FreeLieAlgebra.Rel R X a b)


@[simp]
theorem centralizer_univ : centralizer R Set.univ = center R A

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

Subalgebra.centralizer R Set.univ = Subalgebra.center R A


theorem lineDerivWithin_of_mem_nhds (h : s ∈ 𝓝 x) :
    lineDerivWithin 𝕜 f s x v = lineDeriv 𝕜 f x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : E → F}
{s : Set E}
{x v : E}
(h : s ∈ 𝓝 x)


@[mono] lemma algebraMap_mono : Monotone (algebraMap α β)

{α : Type u_1}
(β : Type u_2)
[OrderedCommSemiring α]
[OrderedSemiring β]
[Algebra α β]
[SMulPosMono α β]


@[simp]
theorem ker_orthogonalProjection : LinearMap.ker (orthogonalProjection K) = Kᗮ

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


@[simp]
theorem fold_inf_univ [SemilatticeInf α] [OrderBot α] (a : α) :
    -- Porting note: added `haveI`
    haveI : Std.Commutative (α := α) (· ⊓ ·) := inferInstance
    (Finset.univ.fold (· ⊓ ·) a fun x => x) = ⊥

{α : Type u_2}
[Fintype α]
[SemilatticeInf α]
[OrderBot α]
(a : α)

Finset.fold (fun x x_1 => x ⊓ x_1) a (fun x => x) Finset.univ = ⊥


/-- A set `s` is compact if for every family of closed sets whose intersection avoids `s`,
there exists a finite subfamily whose intersection avoids `s`. -/
theorem isCompact_of_finite_subfamily_closed
    (h : ∀ {ι : Type u} (t : ι → Set X), (∀ i, IsClosed (t i)) → (s ∩ ⋂ i, t i) = ∅ →
      ∃ u : Finset ι, (s ∩ ⋂ i ∈ u, t i) = ∅) :
    IsCompact s

(h : ∀ {ι : Type u} (t : ι → Set X), (∀ (i : ι), IsClosed (t i)) → s ∩ ⋂ i, t i = ∅ → ∃ u, s ∩ ⋂ i ∈ u, t i = ∅)


@[simp]
theorem map_natCast [FunLike F R S] [RingHomClass F R S] (f : F) : ∀ n : ℕ, f (n : R) = n

{R : Type u_3}
{S : Type u_4}
{F : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
[FunLike F R S]
[RingHomClass F R S]
(f : F)
(n : ℕ)


@[simp]
theorem isClopen_compl_iff : IsClopen sᶜ ↔ IsClopen s

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


lemma congr_of_eventuallyEq {f g : ℝ → ℝ} (hfg : f =ᶠ[atTop] g) (hg : GrowsPolynomially g) :
    GrowsPolynomially f

(hg : AkraBazziRecurrence.GrowsPolynomially g)


@[to_additive]
theorem exponent_dvd_iff_forall_pow_eq_one {n : ℕ} : exponent G ∣ n ↔ ∀ g : G, g ^ n = 1

AddMonoid.exponent G ∣ n ↔ ∀ (g : G), n • g = 0


theorem inv_rpow (hx : 0 ≤ x) (y : ℝ) : x⁻¹ ^ y = (x ^ y)⁻¹


theorem map_def {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ a, p a → q (f a)) :
    map f h = fun x ↦ ⟨f x, h x x.prop⟩

{α : Sort u_1}
{β : Sort u_2}
{p : α → Prop}
{q : β → Prop}
(f : α → β)
(h : ∀ (a : α), p a → q (f a))


theorem Continuous.const_cpow {b : ℂ} (hf : Continuous f) (h : b ≠ 0 ∨ ∀ a, f a ≠ 0) :
    Continuous fun x => b ^ f x

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℂ}
{b : ℂ}
(hf : Continuous f)
(h : b ≠ 0 ∨ ∀ (a : α), f a ≠ 0)


@[to_additive]
theorem smul_mem_smul : s ∈ f → t ∈ g → s • t ∈ f • g

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{f : Filter α}
{g : Filter β}
{s : Set α}
{t : Set β}


lemma isIso_of_isIso (f : S₁ ⟶ S₂) [IsIso f.τ₁] [IsIso f.τ₂] [IsIso f.τ₃] : IsIso f


lemma trim_add {ν : Measure α} (hm : m ≤ m0) : (μ + ν).trim hm = μ.trim hm + ν.trim hm

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


theorem copy_eq (S : IntermediateField K L) (s : Set L) (hs : s = ↑S) : S.copy s hs = S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
(s : Set L)
(hs : s = ↑S)


@[simp (low)]
theorem tensor_zero {W X Y Z : C} (f : W ⟶ X) : f ⊗ (0 : Y ⟶ Z) = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalPreadditive C]
{W X Y Z : C}
(f : W ⟶ X)

CategoryTheory.MonoidalCategory.tensorHom f 0 = 0


@[to_additive (attr := simp)]
theorem swap_comp_swap : (swap M N).comp (swap N M) = .id _

(M : Type u_1)
(N : Type u_2)
[AddZeroClass M]
[AddZeroClass N]

(AddMonoid.Coprod.swap M N).comp (AddMonoid.Coprod.swap N M) = AddMonoidHom.id (AddMonoid.Coprod N M)


theorem _root_.MeasureTheory.AEStronglyMeasurable.truncation (hf : AEStronglyMeasurable f μ)
    {A : ℝ} : AEStronglyMeasurable (truncation f A) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (ProbabilityTheory.truncation f A) μ


/-- Precomposing with a pullback-preserving functor preserves the equalizer condition. -/
theorem equalizerCondition_precomp_of_preservesPullback (P : Cᵒᵖ ⥤ D) (F : E ⥤ C)
    [∀ {X B} (π : X ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) F]
    [F.PreservesEffectiveEpis] (hP : EqualizerCondition P) : EqualizerCondition (F.op ⋙ P)

[{X B : E} →
    (π : X ⟶ B) →
      [inst : CategoryTheory.EffectiveEpi π] →
        CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan π π) F]

(hP : CategoryTheory.regularTopology.EqualizerCondition P)


@[simp]
theorem prod_inf_prod {S T : Subalgebra R A} {S₁ T₁ : Subalgebra R B} :
    S.prod S₁ ⊓ T.prod T₁ = (S ⊓ T).prod (S₁ ⊓ T₁)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{S T : Subalgebra R A}
{S₁ T₁ : Subalgebra R B}


theorem associated_mul_isUnit_left_iff {β : Type*} [Monoid β] {a u b : β} (hu : IsUnit u) :
    Associated (a * u) b ↔ Associated a b

{β : Type u_5}
[Monoid β]
{a u b : β}
(hu : IsUnit u)


/-- The empty bilinear map defeq to `Matrix.vecEmpty` -/
@[simps]
def LinearMap.vecEmpty₂ : M →ₗ[R] M₂ →ₗ[R] Fin 0 → M₃

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]

∀ (x : M), LinearMap.vecEmpty₂ x = LinearMap.vecEmpty


/-- Homotopy between morphisms of short complexes is compatible with substraction. -/
@[simps]
def sub (h : Homotopy φ₁ φ₂) (h' : Homotopy φ₃ φ₄) : Homotopy (φ₁ - φ₃) (φ₂ - φ₄)

{φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(h' : CategoryTheory.ShortComplex.Homotopy φ₃ φ₄)


/-- `Complex.re` turns `ℂ` into a trivial topological fiber bundle over `ℝ`. -/
theorem isHomeomorphicTrivialFiberBundle_re : IsHomeomorphicTrivialFiberBundle ℝ re


theorem memℒp_limitProcess_of_eLpNorm_bdd {R : ℝ≥0} {p : ℝ≥0∞} {F : Type*} [NormedAddCommGroup F]
    {ℱ : Filtration ℕ m} {f : ℕ → Ω → F} (hfm : ∀ n, AEStronglyMeasurable (f n) μ)
    (hbdd : ∀ n, eLpNorm (f n) p μ ≤ R) : Memℒp (limitProcess f ℱ μ) p μ

(hfm : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

(hbdd : ∀ (n : ℕ), MeasureTheory.eLpNorm (f n) p μ ≤ ↑R)

MeasureTheory.Memℒp (MeasureTheory.Filtration.limitProcess f ℱ μ) p μ


@[simp]
theorem PullbackCone.snd_limit_cone {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [HasLimit (cospan f g)] :
    PullbackCone.snd (limit.cone (cospan f g)) = pullback.snd f g

[CategoryTheory.Limits.HasLimit (CategoryTheory.Limits.cospan f g)]

CategoryTheory.Limits.PullbackCone.snd (CategoryTheory.Limits.limit.cone (CategoryTheory.Limits.cospan f g)) =
  CategoryTheory.Limits.pullback.snd f g


theorem log_of_one_lt_of_le {b n : ℕ} (h : 1 < b) (hn : b ≤ n) : log b n = log b (n / b) + 1


/-- The functor that restricts to open subschemes and then takes global section is
isomorphic to the structure sheaf. -/
@[simps!]
def Scheme.restrictFunctorΓ : X.restrictFunctor.op ⋙ (Over.forget X).op ⋙ Scheme.Γ ≅ X.presheaf

∀ (X_1 : X.Opensᵒᵖ), AlgebraicGeometry.Scheme.restrictFunctorΓ.hom.app X_1 = X.presheaf.map (CategoryTheory.eqToHom ⋯)


theorem image_update_Icc (f : ∀ i, α i) (i : ι) (a b : α i) :
    update f i '' Icc a b = Icc (update f i a) (update f i b)

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

Function.update f i '' Set.Icc a b = Set.Icc (Function.update f i a) (Function.update f i b)


theorem le_self_mul_one_div {I : FractionalIdeal R₁⁰ K} (hI : I ≤ (1 : FractionalIdeal R₁⁰ K)) :
    I ≤ I * (1 / I)

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[frac : IsFractionRing R₁ K]
[IsDomain R₁]
{I : FractionalIdeal R₁⁰ K}
(hI : I ≤ 1)


@[simp]
theorem linearProjOfIsCompl_range (h : IsCompl p q) : range (linearProjOfIsCompl p q h) = ⊤

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p q : Submodule R E}
(h : IsCompl p q)

LinearMap.range (p.linearProjOfIsCompl q h) = ⊤


theorem IsNilpotent.isUnit_one_add [Ring R] {r : R} (hnil : IsNilpotent r) : IsUnit (1 + r)

{R : Type u_1}
[Ring R]
{r : R}
(hnil : IsNilpotent r)


@[simp]
theorem prod_apply (p) : e₁.prod e₂ p = (e₁ p.1, e₂ p.2)

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
{M₄ : Type z}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[AddCommMonoid M₄]
{module_M : Module R M}
{module_M₂ : Module R M₂}
{module_M₃ : Module R M₃}
{module_M₄ : Module R M₄}
(e₁ : M ≃ₗ[R] M₂)
(e₂ : M₃ ≃ₗ[R] M₄)
(p : M × M₃)


theorem modNat_rev (i : Fin (m * n)) : i.rev.modNat = i.modNat.rev


lemma norm_jacobiTheta₂_term (n : ℤ) (z τ : ℂ) :
    ‖jacobiTheta₂_term n z τ‖ = rexp (-π * n ^ 2 * τ.im - 2 * π * n * z.im)

‖jacobiTheta₂_term n z τ‖ = rexp (-π * ↑n ^ 2 * τ.im - 2 * π * ↑n * z.im)


@[to_additive (attr := simp)]
theorem range_one : (1 : G →* N).range = ⊥

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]


/-- A version of `Complex.cpow_nat_mul` with RHS that matches `Complex.cpow_mul`.

The assumptions on the arguments are needed
because the equality fails, e.g., for `x = -I`, `n = 2`, `y = 1/2`. -/
lemma cpow_nat_mul' {x : ℂ} {n : ℕ} (hlt : -π < n * x.arg) (hle : n * x.arg ≤ π) (y : ℂ) :
    x ^ (n * y) = (x ^ n) ^ y

{x : ℂ}
{n : ℕ}
(hlt : -π < ↑n * x.arg)
(hle : ↑n * x.arg ≤ π)
(y : ℂ)


theorem mem_C'_eq_false : ∀ x, x ∈ C' C ho → x (term I ho) = false

(ho : o < Ordinal.type fun x x_1 => x < x_1)

x ∈ Profinite.NobelingProof.C' C ho → x (Profinite.NobelingProof.term I ho) = false


theorem contDiff_unitBallBall_symm (hr : 0 < r) : ContDiff ℝ n (unitBallBall c r hr).symm

{n : ℕ∞}
{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{c : E}
{r : ℝ}
(hr : 0 < r)

ContDiff ℝ n ↑(PartialHomeomorph.unitBallBall c r hr).symm


@[to_additive]
theorem finprod_eq_mulIndicator_apply (s : Set α) (f : α → M) (a : α) :
    ∏ᶠ _ : a ∈ s, f a = mulIndicator s f a

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(s : Set α)
(f : α → M)
(a : α)

∏ᶠ (_ : a ∈ s), f a = s.mulIndicator f a


/-- To check whether two maps are coequalized by both maps of a cofork, it suffices to check it for
    the second map -/
theorem Cofork.coequalizer_ext (s : Cofork f g) {W : C} {k l : s.pt ⟶ W}
    (h : Cofork.π s ≫ k = Cofork.π s ≫ l) : ∀ j : WalkingParallelPair, s.ι.app j ≫ k = s.ι.app j ≫ l

(h : CategoryTheory.CategoryStruct.comp s.π k = CategoryTheory.CategoryStruct.comp s.π l)

CategoryTheory.CategoryStruct.comp (s.ι.app j) k = CategoryTheory.CategoryStruct.comp (s.ι.app j) l


@[to_additive]
theorem ExponentExists.of_finite : ExponentExists G

{G : Type u}
[LeftCancelMonoid G]
[Finite G]


@[simp]
theorem support_smul_eq [Semiring R] [AddCommMonoid M] [Module R M] [NoZeroSMulDivisors R M] {b : R}
    (hb : b ≠ 0) {g : α →₀ M} : (b • g).support = g.support

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[NoZeroSMulDivisors R M]
{b : R}
(hb : b ≠ 0)
{g : α →₀ M}


@[simp]
theorem pred_bot : pred (⊥ : α) = ⊥

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
[OrderBot α]


theorem set_smul_mem_nhds_smul_iff {c : G₀} {s : Set α} {x : α} (hc : c ≠ 0) :
    c • s ∈ 𝓝 (c • x : α) ↔ s ∈ 𝓝 x

{α : Type u_2}
{G₀ : Type u_6}
[GroupWithZero G₀]
[MulAction G₀ α]
[TopologicalSpace α]
[ContinuousConstSMul G₀ α]
{c : G₀}
{s : Set α}
{x : α}
(hc : c ≠ 0)


@[simp, norm_cast]
theorem coe_sup (s t : LowerSet α) : (↑(s ⊔ t) : Set α) = (s : Set α) ∪ t

{α : Type u_1}
[LE α]
(s t : LowerSet α)


protected nonrec theorem ContinuousOn.nhds (h : ContinuousOn f s) : ContinuousOn (𝓝 ∘ f) s

{X : Type u_4}
{Y : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
(h : ContinuousOn f s)


theorem volume_preserving_funUnique (α : Type u) (β : Type v) [Unique α] [MeasureSpace β] :
    MeasurePreserving (MeasurableEquiv.funUnique α β) volume volume

(α : Type u)
(β : Type v)
[Unique α]
[MeasureTheory.MeasureSpace β]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.funUnique α β)) MeasureTheory.volume MeasureTheory.volume


/-- The restriction of a reflexive bilinear form `B` onto a submodule `W` is
nondegenerate if `Disjoint W (B.orthogonal W)`. -/
theorem nondegenerate_restrict_of_disjoint_orthogonal (B : BilinForm R₁ M₁) (b : B.IsRefl)
    {W : Submodule R₁ M₁} (hW : Disjoint W (B.orthogonal W)) : (B.restrict W).Nondegenerate

{R₁ : Type u_3}
{M₁ : Type u_4}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
(B : LinearMap.BilinForm R₁ M₁)
(b : B.IsRefl)
{W : Submodule R₁ M₁}
(hW : Disjoint W (B.orthogonal W))


/-- There is a morphism from a cocone to its extension. -/
@[simps]
def extend (s : Cocone F) {X : C} (f : s.pt ⟶ X) : s ⟶ s.extend f

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(s : CategoryTheory.Limits.Cocone F)
{X : C}
(f : s.pt ⟶ X)

(CategoryTheory.Limits.Cocones.extend s f).hom = f


@[simp] theorem bind_pure [Monad m] [LawfulMonad m] (x : m α) : x >>= pure = x

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


theorem mfderivWithin_of_mem_nhds (h : s ∈ 𝓝 x) : mfderivWithin I I' f s x = mfderiv I I' f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
{s : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(h : s ∈ 𝓝 x)


lemma finrank_orthogonal (hB : B.Nondegenerate) (hB₀ : B.IsRefl) (W : Submodule K V) :
    finrank K (B.orthogonal W) = finrank K V - finrank K W

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{B : LinearMap.BilinForm K V}
(hB : B.Nondegenerate)
(hB₀ : B.IsRefl)
(W : Submodule K V)

FiniteDimensional.finrank K ↥(B.orthogonal W) = FiniteDimensional.finrank K V - FiniteDimensional.finrank K ↥W


@[to_additive nsmul_add_sub_nsmul]
lemma pow_mul_pow_sub (a : M) (h : m ≤ n) : a ^ m * a ^ (n - m) = a ^ n

{M : Type u_4}
[AddMonoid M]
{m n : ℕ}
(a : M)
(h : m ≤ n)


protected theorem L1.SimpleFunc.integrable (f : α →₁ₛ[μ] E) :
    Integrable (Lp.simpleFunc.toSimpleFunc f) μ

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

MeasureTheory.Integrable (↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc f)) μ


@[to_additive (attr := simp)]
lemma Homeomorph.coe_mulRight (a : G) : ⇑(Homeomorph.mulRight a) = (· * a)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
(a : G)

⇑(Homeomorph.mulRight a) = fun x => x * a


@[simp]
theorem linMulLin_compRight (r : M →ₗ[R] M) :
    (linMulLin f g).compRight r = linMulLin f (g.comp r)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{f g : M →ₗ[R] R}
(r : M →ₗ[R] M)

(LinearMap.BilinForm.linMulLin f g).compRight r = LinearMap.BilinForm.linMulLin f (g ∘ₗ r)


theorem exists_of_lt_bmex {o : Ordinal} {f : ∀ a < o, Ordinal} {a} (ha : a < bmex o f) :
    ∃ i hi, f i hi = a

{f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5}}


theorem SatisfiesM_StateRefT_eq [Monad m] :
    SatisfiesM (m := StateRefT' ω σ m) p x ↔ ∀ s, SatisfiesM p (x s)

∀ {α : Type} {p : α → Prop} {x : StateRefT' ω σ m α} [inst : Monad m],
  SatisfiesM p x ↔ ∀ (s : ST.Ref ω σ), SatisfiesM p (x s)


theorem mk_eq_nat_iff {α : Type u} {n : ℕ} : #α = n ↔ Nonempty (α ≃ Fin n)

Cardinal.mk α = ↑n ↔ Nonempty (α ≃ Fin n)


lemma ediv_dvd_ediv : ∀ {a b c : ℤ}, a ∣ b → b ∣ c → b / a ∣ c / a


theorem liftp_iff {α : Type u} (p : α → Prop) (x : F α) :
    Liftp p x ↔ ∃ a f, x = abs ⟨a, f⟩ ∧ ∀ i, p (f i)

{F : Type u → Type u}
[q : QPF F]
{α : Type u}
(p : α → Prop)
(x : F α)

Functor.Liftp p x ↔ ∃ a f, x = QPF.abs ⟨a, f⟩ ∧ ∀ (i : (QPF.P F).B a), p (f i)


@[simp, norm_cast]
theorem coe_smul (r : R) (p : NonarchAddGroupSeminorm E) : ⇑(r • p) = r • ⇑p

{R : Type u_2}
{E : Type u_4}
[AddGroup E]
[SMul R ℝ]
[SMul R ℝ≥0]
[IsScalarTower R ℝ≥0 ℝ]
(r : R)
(p : NonarchAddGroupSeminorm E)


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

{G : Type w}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
(x b : G)


@[simp, nolint simpNF]
theorem zero_eq_bot : (0 : Submodule R M) = ⊥

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


theorem multinomial_pos : 0 < multinomial s f

{α : Type u_1}
(s : Finset α)
(f : α → ℕ)


@[simp]
theorem prodEquivOfIsCompl_symm_apply_right (h : IsCompl p q) (x : q) :
    (prodEquivOfIsCompl p q h).symm x = (0, x)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
(p q : Submodule R E)
(h : IsCompl p q)
(x : ↥q)

(p.prodEquivOfIsCompl q h).symm ↑x = (0, x)


@[to_additive]
theorem eq_liftOfRightInverse (hf : Function.RightInverse f_inv f) (g : G₁ →* G₃)
    (hg : f.ker ≤ g.ker) (h : G₂ →* G₃) (hh : h.comp f = g) :
    h = f.liftOfRightInverse f_inv hf ⟨g, hg⟩

{G₁ : Type u_5}
{G₂ : Type u_6}
{G₃ : Type u_7}
[AddGroup G₁]
[AddGroup G₂]
[AddGroup G₃]
(f : G₁ →+ G₂)
(f_inv : G₂ → G₁)
(hf : Function.RightInverse f_inv ⇑f)
(g : G₁ →+ G₃)
(hg : f.ker ≤ g.ker)
(h : G₂ →+ G₃)
(hh : h.comp f = g)

h = (f.liftOfRightInverse f_inv hf) ⟨g, hg⟩


theorem Restriction.eq_or_strictRestriction (h : N ≤r M) : N = M ∨ N <r M

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


theorem tendsto_ratCast_atBot_iff [LinearOrderedField R] [Archimedean R] {f : α → ℚ}
    {l : Filter α} : Tendsto (fun n => (f n : R)) l atBot ↔ Tendsto f l atBot

{α : Type u_1}
{R : Type u_2}
[LinearOrderedField R]
[Archimedean R]
{f : α → ℚ}
{l : Filter α}

Filter.Tendsto (fun n => ↑(f n)) l Filter.atBot ↔ Filter.Tendsto f l Filter.atBot


@[simp]
theorem not_lt_top_iff : ¬a < ⊤ ↔ a = ⊤

{α : Type u}
[PartialOrder α]
[OrderTop α]
{a : α}

¬a < ⊤ ↔ a = ⊤


theorem map_rotate {β : Type*} (f : α → β) (l : List α) (n : ℕ) :
    map f (l.rotate n) = (map f l).rotate n

{α : Type u}
{β : Type u_1}
(f : α → β)
(l : List α)
(n : ℕ)

List.map f (l.rotate n) = (List.map f l).rotate n


/-- A countable intersection of analytic sets is analytic. -/
theorem AnalyticSet.iInter [hι : Nonempty ι] [Countable ι] [T2Space α] {s : ι → Set α}
    (hs : ∀ n, AnalyticSet (s n)) : AnalyticSet (⋂ n, s n)

(hs : ∀ (n : ι), MeasureTheory.AnalyticSet (s n))


/-- If `m` and `n` are `Fintype` that lie in the same universe as `R`, the rank of `m × n` matrices
  is `# m * # n`. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem rank_matrix'' (m n : Type u) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) = #m * #n

(R : Type u)
[Ring R]
[StrongRankCondition R]
(m n : Type u)
[Finite m]
[Finite n]


/-- If `x : L` is a root of `minpoly K y`, then we can find `(σ : L ≃ₐ[K] L)` with `σ x = y`.
  That is, `x` and `y` are Galois conjugates. -/
theorem exists_algEquiv_of_root [Normal K L] {x y : L} (hy : IsAlgebraic K y)
    (h_ev : (Polynomial.aeval x) (minpoly K y) = 0) : ∃ σ : L ≃ₐ[K] L, σ x = y


theorem mem_conjugatesOf_self {a : α} : a ∈ conjugatesOf a


@[simp]
theorem mapL_coe : (mapL f).toLinearMap = map (fun i ↦ (f i).toLinearMap)

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

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

↑(PiTensorProduct.mapL f) = PiTensorProduct.map fun i => ↑(f i)


theorem disjoint_sdiff_inter (s t : Finset α) : Disjoint (s \ t) (s ∩ t)

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


lemma pos_iff_exists_ofReal : 0 < z ↔ ∃ x > (0 : ℝ), x = z


theorem exists_set_linearIndependent_of_isDomain [IsDomain R] :
    ∃ s : Set M, #s = Module.rank R M ∧ LinearIndependent (ι := s) R Subtype.val

(R : Type u)
(M : Type v)
[CommRing R]
[AddCommGroup M]
[Module R M]
[IsDomain R]

∃ s, #↑s = Module.rank R M ∧ LinearIndependent (ι := ↑s) R Subtype.val


/-- An element of `ℤ√d` has norm one (i.e., `a.re^2 - d*a.im^2 = 1`) if and only if
it is contained in the submonoid of unitary elements.

TODO: merge this result with `Pell.isPell_iff_mem_unitary`. -/
theorem is_pell_solution_iff_mem_unitary {d : ℤ} {a : ℤ√d} :
    a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)


/-- If `f` is invariant under the action of a countable group `G`, and `μ` is a `G`-invariant
  measure with a fundamental domain `s`, then the `essSup` of `f` restricted to `s` is the same as
  that of `f` on all of its domain. -/
@[to_additive "If `f` is invariant under the action of a countable additive group `G`, and `μ` is a
  `G`-invariant measure with a fundamental domain `s`, then the `essSup` of `f` restricted to `s`
  is the same as that of `f` on all of its domain."]
theorem essSup_measure_restrict (hs : IsFundamentalDomain G s μ) {f : α → ℝ≥0∞}
    (hf : ∀ γ : G, ∀ x : α, f (γ • x) = f x) : essSup f (μ.restrict s) = essSup f μ

[MeasureTheory.VAddInvariantMeasure G α μ]

(hs : MeasureTheory.IsAddFundamentalDomain G s μ)

{f : α → ℝ≥0∞}


theorem continuousOn_star {s : Set R} : ContinuousOn star s

{R : Type u_2}
[TopologicalSpace R]
[Star R]
[ContinuousStar R]
{s : Set R}


theorem symmDiff_eq_sup : a ∆ b = a ⊔ b ↔ Disjoint a b

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


@[simp] theorem count_nil (a : α) : count a [] = 0


theorem hom_chart (y₀ y : LE₁E₂) :
    chartAt (ModelProd HB (F₁ →L[𝕜] F₂)) y₀ y =
      (chartAt HB y₀.1 y.1, inCoordinates F₁ E₁ F₂ E₂ y₀.1 y.1 y₀.1 y.1 y.2)

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

↑(chartAt (ModelProd HB (F₁ →L[𝕜] F₂)) y₀) y =
  (↑(chartAt HB y₀.proj) y.proj, ContinuousLinearMap.inCoordinates F₁ E₁ F₂ E₂ y₀.proj y.proj y₀.proj y.proj y.snd)


/-- A version of `liftPropWithinAt_indep_chart`, that uses `LiftPropWithinAt` on both sides. -/
theorem liftPropWithinAt_indep_chart' [HasGroupoid M G] [HasGroupoid M' G']
    (he : e ∈ G.maximalAtlas M) (xe : x ∈ e.source) (hf : f ∈ G'.maximalAtlas M')
    (xf : g x ∈ f.source) :
    LiftPropWithinAt P g s x ↔
      ContinuousWithinAt g s x ∧ LiftPropWithinAt P (f ∘ g ∘ e.symm) (e.symm ⁻¹' s) (e x)

(he : e ∈ StructureGroupoid.maximalAtlas M G)

(hf : f ∈ StructureGroupoid.maximalAtlas M' G')

ChartedSpace.LiftPropWithinAt P g s x ↔
  ContinuousWithinAt g s x ∧ ChartedSpace.LiftPropWithinAt P (↑f ∘ g ∘ ↑e.symm) (↑e.symm ⁻¹' s) (↑e x)


theorem mk_le_aleph0_iff : #α ≤ ℵ₀ ↔ Countable α

Cardinal.mk α ≤ Cardinal.aleph0 ↔ Countable α


@[to_additive]
-- Porting note (#11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_smul_pure : (pure a : Filter α) • (pure b : Filter β) = pure (a • b)

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{a : α}
{b : β}


@[simp]
theorem map_neg (x : M) : Q (-x) = Q x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(x : M)


theorem coeff_C_mul_X (x : R) (n : ℕ) : coeff (C x * X : R[X]) n = if n = 1 then x else 0

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

(Polynomial.C x * Polynomial.X).coeff n = if n = 1 then x else 0


@[to_additive]
theorem mem_orbit_iff {a₁ a₂ : α} : a₂ ∈ orbit M a₁ ↔ ∃ x : M, x • a₁ = a₂

{M : Type u}
[AddMonoid M]
{α : Type v}
[AddAction M α]
{a₁ a₂ : α}

a₂ ∈ AddAction.orbit M a₁ ↔ ∃ x, x +ᵥ a₁ = a₂


@[to_additive]
theorem liftOn_mk {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn (mk a b) f H = f a b

(H : ∀ {a c : M} {b d : ↥S}, (AddLocalization.r S) (a, b) (c, d) → f a b = f c d)

(AddLocalization.mk a b).liftOn f H = f a b


theorem mul_self_norm (z : K) : ‖z‖ * ‖z‖ = normSq z


theorem mul_lt_of_lt_one_of_lt_of_pos [PosMulStrictMono α] [MulPosStrictMono α] (ha : a < 1)
    (bc : b < c) (a0 : 0 < a) (c0 : 0 < c) : a * b < c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosStrictMono α]
(ha : a < 1)
(bc : b < c)
(a0 : 0 < a)
(c0 : 0 < c)


lemma comp_left_inv (C : VariableChange R) : comp (inv C) C = id

{R : Type u}
[CommRing R]
(C : WeierstrassCurve.VariableChange R)

C.inv.comp C = WeierstrassCurve.VariableChange.id


@[simp]
theorem toLocalizationMap_eq_monoidOf : toLocalizationMap M (Localization M) = monoidOf M

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}

IsLocalization.toLocalizationMap M (Localization M) = Localization.monoidOf M


theorem rpow_le_self_of_le_one {x : ℝ≥0∞} {z : ℝ} (hx : x ≤ 1) (h_one_le : 1 ≤ z) : x ^ z ≤ x


@[to_additive]
lemma orbitRel_le_snd :
    orbitRel G (α × β) ≤ (orbitRel G β).comap Prod.snd

(G : Type u_1)
(α : Type u_2)
(β : Type u_3)
[AddGroup G]
[AddAction G α]
[AddAction G β]

AddAction.orbitRel G (α × β) ≤ Setoid.comap Prod.snd (AddAction.orbitRel G β)


theorem fold_max_lt : s.fold max b f < c ↔ b < c ∧ ∀ x ∈ s, f x < c

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{b : β}
{s : Finset α}
[LinearOrder β]
(c : β)

Finset.fold max b f s < c ↔ b < c ∧ ∀ x ∈ s, f x < c


@[to_additive]
theorem reduce_invRev {w : List (α × Bool)} : reduce (invRev w) = invRev (reduce w)

{α : Type u}
[DecidableEq α]
{w : List (α × Bool)}

FreeGroup.reduce (FreeGroup.invRev w) = FreeGroup.invRev (FreeGroup.reduce w)


/-- Gauss' summation formula -/
theorem sum_range_id (n : ℕ) : ∑ i ∈ range n, i = n * (n - 1) / 2

∑ i ∈ Finset.range n, i = n * (n - 1) / 2


@[simp]
theorem leadingCoeff_cubic (ha : a ≠ 0) :
    leadingCoeff (C a * X ^ 3 + C b * X ^ 2 + C c * X + C d) = a

{R : Type u}
{a b c d : R}
[Semiring R]
(ha : a ≠ 0)

(Polynomial.C a * Polynomial.X ^ 3 + Polynomial.C b * Polynomial.X ^ 2 + Polynomial.C c * Polynomial.X +
      Polynomial.C d).leadingCoeff =
  a


theorem eq_const_of_compQuasiMeasurePreserving_eq (h : QuasiErgodic f μ) {g : α →ₘ[μ] X}
    (hg_eq : g.compQuasiMeasurePreserving f h.1 = g) : ∃ c, g = .const α c

(hg_eq : g.compQuasiMeasurePreserving f ⋯ = g)

∃ c, g = MeasureTheory.AEEqFun.const α c


@[simp]
theorem coe_neg (f : Poly α) : ⇑(-f) = -f


theorem splits_iff_card_roots (ha : P.a ≠ 0) :
    Splits φ P.toPoly ↔ Multiset.card (map φ P).roots = 3

{F : Type u_3}
{K : Type u_4}
{P : Cubic F}
[Field F]
[Field K]
{φ : F →+* K}
(ha : P.a ≠ 0)

Polynomial.Splits φ P.toPoly ↔ Multiset.card (Cubic.map φ P).roots = 3


@[simp]
theorem germ_comp_stalkToFiberRingHom (U : Opens (ProjectiveSpectrum.top 𝒜)) (x : U) :
    (Proj.structureSheaf 𝒜).presheaf.germ x ≫ stalkToFiberRingHom 𝒜 x =
      openToLocalization 𝒜 U x x.2

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

CategoryTheory.CategoryStruct.comp ((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).presheaf.germ x)
    (AlgebraicGeometry.stalkToFiberRingHom 𝒜 ↑x) =
  AlgebraicGeometry.openToLocalization 𝒜 U ↑x ⋯


theorem surjective_mapsTo_image_restrict (f : α → β) (s : Set α) :
    Surjective ((mapsTo_image f s).restrict f s (f '' s))

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

Function.Surjective (Set.MapsTo.restrict f s (f '' s) ⋯)


theorem subset_insert_iff {a : α} {s t : Finset α} : s ⊆ insert a t ↔ erase s a ⊆ t

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


theorem nonempty_iff_card_le [Fintype α] [Fintype β] :
    Nonempty (α ↪ β) ↔ Fintype.card α ≤ Fintype.card β

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]


theorem zsmul_pow_two_powHalf (m : ℤ) (n k : ℕ) :
    (m * 2 ^ n) * powHalf (n + k) = m * powHalf k

↑m * 2 ^ n * Surreal.powHalf (n + k) = ↑m * Surreal.powHalf k


{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : NormedAddGroupHom V₁ V₂)


theorem t1Space_iff_continuous_cofinite_of : T1Space X ↔ Continuous (@CofiniteTopology.of X)

T1Space X ↔ Continuous ⇑CofiniteTopology.of


@[simp]
theorem support_zero : (0 : Π₀ i, β i).support = ∅

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


/-- Suppose that there exists a nonnegative box-additive function `B` with the following property.

For every `c : ℝ≥0`, a point `x ∈ I.Icc`, and a positive `ε` there exists `δ > 0` such that for any
box `J ≤ I` such that

- `J.Icc ⊆ Metric.closedBall x δ`;
- if `l.bDistortion` (i.e., `l = ⊥`), then the distortion of `J` is less than or equal to `c`,

the distance between the term `vol J (f x)` of an integral sum corresponding to `J` and `g J` is
less than or equal to `ε * B J`.

Then `f` is McShane integrable on `I` with integral `g I`. -/
theorem HasIntegral.mcShane_of_forall_isLittleO (B : ι →ᵇᵃ[I] ℝ) (hB0 : ∀ J, 0 ≤ B J)
    (g : ι →ᵇᵃ[I] F) (H : ∀ (c : ℝ≥0), ∀ x ∈ Box.Icc I, ∀ ε > (0 : ℝ), ∃ δ > 0, ∀ J ≤ I,
      Box.Icc J ⊆ Metric.closedBall x δ → dist (vol J (f x)) (g J) ≤ ε * B J) :
    HasIntegral I McShane f vol (g I)

(hB0 : ∀ (J : BoxIntegral.Box ι), 0 ≤ B J)

(H :
  ℝ≥0 →
    ∀ x ∈ BoxIntegral.Box.Icc I,
      ∀ ε > 0, ∃ δ > 0, ∀ J ≤ I, BoxIntegral.Box.Icc J ⊆ Metric.closedBall x δ → dist ((vol J) (f x)) (g J) ≤ ε * B J)

BoxIntegral.HasIntegral I BoxIntegral.IntegrationParams.McShane f vol (g I)


theorem Ioc_mem_nhdsSet_Ico (h : a < b) (h' : c ≤ d) : Ioc a d ∈ 𝓝ˢ (Ico b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c d : α}
(h : a < b)
(h' : c ≤ d)


theorem range_succ (n : Nat) : range (succ n) = range n ++ [n]


theorem Filter.Eventually.ratCast_atTop [LinearOrderedField R] [Archimedean R] {p : R → Prop}
    (h : ∀ᶠ (x : R) in atTop, p x) : ∀ᶠ (n : ℚ) in atTop, p n

{R : Type u_2}
[LinearOrderedField R]
[Archimedean R]
{p : R → Prop}
(h : ∀ᶠ (x : R) in Filter.atTop, p x)


@[simp]
theorem tendsto_iInf {f : α → β} {x : Filter α} {y : ι → Filter β} :
    Tendsto f x (⨅ i, y i) ↔ ∀ i, Tendsto f x (y i)

{α : Type u}
{β : Type v}
{ι : Sort x}
{f : α → β}
{x : Filter α}
{y : ι → Filter β}

Filter.Tendsto f x (⨅ i, y i) ↔ ∀ (i : ι), Filter.Tendsto f x (y i)


theorem encard_union_le (s t : Set α) : (s ∪ t).encard ≤ s.encard + t.encard


/-- **Cauchy-Goursat theorem** for an annulus. If `f : ℂ → E` is continuous on the closed annulus
`r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`, and is complex differentiable at all but countably many points of
its interior, then the integrals of `f` over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are equal
to each other. -/
theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {r R : ℝ} (h0 : 0 < r)
    (hle : r ≤ R) {f : ℂ → E} {s : Set ℂ} (hs : s.Countable)
    (hc : ContinuousOn f (closedBall c R \ ball c r))
    (hd : ∀ z ∈ (ball c R \ closedBall c r) \ s, DifferentiableAt ℂ f z) :
    (∮ z in C(c, R), f z) = ∮ z in C(c, r), f z

(hc : ContinuousOn f (Metric.closedBall c R \ Metric.ball c r))

(hd : ∀ z ∈ (Metric.ball c R \ Metric.closedBall c r) \ s, DifferentiableAt ℂ f z)

(∮ (z : ℂ) in C(c, R), f z) = ∮ (z : ℂ) in C(c, r), f z


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


/-- If `f` is integrable on `I`, then `fun J ↦ integral J l f vol` is box-additive on subboxes of
`I`: if `π₁`, `π₂` are two prepartitions of `I` covering the same part of `I`, the sum of integrals
of `f` over the boxes of `π₁` is equal to the sum of integrals of `f` over the boxes of `π₂`.

See also `BoxIntegral.Integrable.toBoxAdditive` for a bundled version. -/
theorem sum_integral_congr (h : Integrable I l f vol) {π₁ π₂ : Prepartition I}
    (hU : π₁.iUnion = π₂.iUnion) :
    ∑ J ∈ π₁.boxes, integral J l f vol = ∑ J ∈ π₂.boxes, integral J l f vol

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{f : (ι → ℝ) → E}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
[CompleteSpace F]
(h : BoxIntegral.Integrable I l f vol)
{π₁ π₂ : BoxIntegral.Prepartition I}
(hU : π₁.iUnion = π₂.iUnion)

∑ J ∈ π₁.boxes, BoxIntegral.integral J l f vol = ∑ J ∈ π₂.boxes, BoxIntegral.integral J l f vol


protected theorem dist_eq {α β : Type*} [PseudoMetricSpace α] [PseudoMetricSpace β] (h : α ≃ᵢ β)
    (x y : α) : dist (h x) (h y) = dist x y

{α : Type u_2}
{β : Type u_3}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(h : α ≃ᵢ β)
(x y : α)


theorem IsExtrFilter.comp_antitone (hf : IsExtrFilter f l a) {g : β → γ} (hg : Antitone g) :
    IsExtrFilter (g ∘ f) l a

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder β]
[Preorder γ]
{f : α → β}
{l : Filter α}
{a : α}
(hf : IsExtrFilter f l a)
{g : β → γ}
(hg : Antitone g)


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X i ⟶ K.X j ⟶ K.X k` for arbitrary indices `i`, `j` and `k`. -/
@[simps]
def shortComplexFunctor' (i j k : ι) : HomologicalComplex C c ⥤ ShortComplex C

∀ {X Y : HomologicalComplex C c} (f : X ⟶ Y), ((HomologicalComplex.shortComplexFunctor' C c i j k).map f).τ₁ = f.f i


@[simp]
lemma star_nonpos_iff {x : R} : star x ≤ 0 ↔ x ≤ 0

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x : R}


@[simp]
theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a)

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


theorem Indep.restrict_eq_freeOn (hI : M.Indep I) : M ↾ I = freeOn I

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


lemma mem_nsmul_of_ne_zero {a : α} {s : Multiset α} {n : ℕ} (h0 : n ≠ 0) : a ∈ n • s ↔ a ∈ s

{α : Type u_1}
{a : α}
{s : Multiset α}
{n : ℕ}
(h0 : n ≠ 0)


theorem smul_def {i} (m : M i) (w : Word M) :
    m • w = rcons { equivPair i w with head := m * (equivPair i w).head }

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
[(i : ι) → DecidableEq (M i)]
[DecidableEq ι]
{i : ι}
(m : M i)
(w : Monoid.CoprodI.Word M)

m • w =
  Monoid.CoprodI.Word.rcons
    (let __src := (Monoid.CoprodI.Word.equivPair i) w;
    { head := m * ((Monoid.CoprodI.Word.equivPair i) w).head, tail := __src.tail, fstIdx_ne := ⋯ })


theorem norm_lt_one_mul {z1 z2 : ℤ_[p]} (hz2 : ‖z2‖ < 1) : ‖z1 * z2‖ < 1

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{z1 z2 : ℤ_[p]}
(hz2 : ‖z2‖ < 1)


theorem isClosedMap (hf : ClosedEmbedding f) : IsClosedMap f

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


theorem EventuallyLE.countable_iUnion [Countable ι] {s t : ι → Set α} (h : ∀ i, s i ≤ᶠ[l] t i) :
    ⋃ i, s i ≤ᶠ[l] ⋃ i, t i

{ι : Sort u_1}
{α : Type u_2}
{l : Filter α}
[CountableInterFilter l]
[Countable ι]
{s t : ι → Set α}
(h : ∀ (i : ι), s i ≤ᶠ[l] t i)


/-- If three points are not collinear, the angle between them is positive. -/
theorem angle_pos_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear ℝ ({p₁, p₂, p₃} : Set P)) :
    0 < ∠ p₁ p₂ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : ¬Collinear ℝ {p₁, p₂, p₃})


/-- Rectangles formed by π-systems form a π-system. -/
theorem IsPiSystem.prod {C : Set (Set α)} {D : Set (Set β)} (hC : IsPiSystem C)
    (hD : IsPiSystem D) : IsPiSystem (image2 (· ×ˢ ·) C D)

{α : Type u_1}
{β : Type u_3}
{C : Set (Set α)}
{D : Set (Set β)}
(hC : IsPiSystem C)
(hD : IsPiSystem D)

IsPiSystem (Set.image2 (fun x x_1 => x ×ˢ x_1) C D)


theorem deriv_const_smul (c : R) (hf : DifferentiableAt 𝕜 f x) :
    deriv (fun y => c • f y) x = c • deriv f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{R : Type u_2}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(c : R)
(hf : DifferentiableAt 𝕜 f x)


lemma ofLowerSet_inj {a b : WithLowerSet α} : ofLowerSet a = ofLowerSet b ↔ a = b

{α : Type u_1}
{a b : Topology.WithLowerSet α}

Topology.WithLowerSet.ofLowerSet a = Topology.WithLowerSet.ofLowerSet b ↔ a = b


@[simp]
theorem addCases_right {m n : Nat} {motive : Fin (m + n) → Sort _} {left right} (i : Fin n) :
    addCases (motive := motive) left right (natAdd m i) = right i

{left : (i : Fin m) → motive (Fin.castAdd n i)}

{right : (i : Fin n) → motive (Fin.natAdd m i)}

Fin.addCases left right (Fin.natAdd m i) = right i


@[to_additive]
theorem unitsCenterToCenterUnits_injective [Monoid M] :
    Function.Injective (unitsCenterToCenterUnits M)


protected theorem Monotone.comp_monotoneOn (hg : Monotone g) (hf : MonotoneOn f s) :
    MonotoneOn (g ∘ f) s

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


@[simp] protected theorem ediv_zero : ∀ a : Int, a / 0 = 0


theorem lf_congr_imp {x₁ y₁ x₂ y₂ : PGame} (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ ⧏ y₁ → x₂ ⧏ y₂

{x₁ y₁ x₂ y₂ : SetTheory.PGame}
(hx : x₁ ≈ x₂)
(hy : y₁ ≈ y₂)


/-- The coercion of a subgroupoid as a groupoid -/
@[simps comp_coe, simps (config := .lemmasOnly) inv_coe]
instance coe : Groupoid S.objs

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

∀ {X Y Z : ↑S.objs} (p : X ⟶ Y) (q : Y ⟶ Z),
  ↑(CategoryTheory.CategoryStruct.comp p q) = CategoryTheory.CategoryStruct.comp ↑p ↑q


@[to_additive (attr := simp)]
theorem constSMul_symm (c : G) : (constSMul c : X ≃ᵢ X).symm = constSMul c⁻¹

{G : Type v}
{X : Type w}
[PseudoEMetricSpace X]
[AddGroup G]
[AddAction G X]
[IsometricVAdd G X]
(c : G)

(IsometryEquiv.constVAdd c).symm = IsometryEquiv.constVAdd (-c)


/-- Special case of the **Plünnecke-Ruzsa inequality**. Multiplication version. -/
@[to_additive "Special case of the **Plünnecke-Ruzsa inequality**. Addition version."]
theorem pluennecke_ruzsa_inequality_pow_mul (hA : A.Nonempty) (B : Finset α) (n : ℕ) :
    (B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card

{α : Type u_1}
[CommGroup α]
[DecidableEq α]
{A : Finset α}
(hA : A.Nonempty)
(B : Finset α)
(n : ℕ)

↑(B ^ n).card ≤ (↑(A * B).card / ↑A.card) ^ n * ↑A.card


@[simp, norm_cast] lemma coe_mk (μ : Measure Ω) (hμ) : toMeasure ⟨μ, hμ⟩ = μ

(hμ : MeasureTheory.IsProbabilityMeasure μ)

↑⟨μ, hμ⟩ = μ


theorem IsIntegralClosure.comap_ne_bot [Nontrivial R] {I : Ideal A} (I_ne_bot : I ≠ ⊥) :
    I.comap (algebraMap R A) ≠ ⊥

{R : Type u_1}
[CommRing R]
(S : Type u_2)
[CommRing S]
[Algebra R S]
{A : Type u_3}
[CommRing A]
[Algebra R A]
[Algebra A S]
[IsScalarTower R A S]
[IsIntegralClosure A R S]
[IsDomain A]
[Nontrivial R]
{I : Ideal A}
(I_ne_bot : I ≠ ⊥)


/-- The type of combinatorial subspaces. A subspace `l : Subspace η α ι` in the hypercube `ι → α`
defines a function `(η → α) → ι → α` from `η → α` to the hypercube, such that for each coordinate
`i : ι` and direction `e : η`, the function `fun x ↦ l x i` is either `fun x ↦ x e` for some
direction `e : η` or constant. We require subspaces to be non-degenerate in the sense that, for
every `e : η`, `fun x ↦ l x i` is `fun x ↦ x e` for at least one `i`.

Formally, a subspace is represented by a word `l.idxFun : ι → α ⊕ η` which says whether
`fun x ↦ l x i` is `fun x ↦ x e` (corresponding to `l.idxFun i = Sum.inr e`) or constantly `a`
(corresponding to `l.idxFun i = Sum.inl a`).

When `α` has size `1` there can be many elements of `Subspace η α ι` defining the same function. -/
@[ext]
structure Subspace (η α ι : Type*) where
  /-- The word representing a combinatorial subspace. `l.idxfun i = Sum.inr e` means that
  `l x i = x e` for all `x` and `l.idxfun i = some a` means that `l x i = a` for all `x`. -/
  idxFun : ι → α ⊕ η
  /-- We require combinatorial subspaces to be nontrivial in the sense that `fun x ↦ l x i` is
  `fun x ↦ x e` for at least one coordinate `i`. -/
  proper : ∀ e, ∃ i, idxFun i = Sum.inr e

{η : Type u_5}
{α : Type u_6}
{ι : Type u_7}
(self : Combinatorics.Subspace η α ι)
(e : η)


theorem Finsupp.toMultiset_eq_iff [DecidableEq α] {f : α →₀ ℕ} {s : Multiset α} :
    Finsupp.toMultiset f = s ↔ f = Multiset.toFinsupp s

{α : Type u_1}
[DecidableEq α]
{f : α →₀ ℕ}
{s : Multiset α}


theorem t0Space_iff_nhds_injective (X : Type u) [TopologicalSpace X] :
    T0Space X ↔ Injective (𝓝 : X → Filter X)


theorem card_Ico_of_le (h : a ≤ b) : ((Ico a b).card : ℤ) = b - a


theorem image_coe_nnreal_ennreal (h : t.OrdConnected) : ((↑) '' t : Set ℝ≥0∞).OrdConnected


theorem range_reparam (γ : Path x y) {f : I → I} (hfcont : Continuous f) (hf₀ : f 0 = 0)
    (hf₁ : f 1 = 1) : range (γ.reparam f hfcont hf₀ hf₁) = range γ

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)
{f : ↑I → ↑I}
(hfcont : Continuous f)
(hf₀ : f 0 = 0)
(hf₁ : f 1 = 1)

Set.range ⇑(γ.reparam f hfcont hf₀ hf₁) = Set.range ⇑γ


theorem range_eq (e : α ≃o β) : Set.range e = Set.univ

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)


/-- There is always a character on `F` of order `#F-1` with values in a ring that has
a primitive `(#F-1)`th root of unity. -/
lemma exists_mulChar_orderOf_eq_card_units [DecidableEq F]
    {ζ : R} (hζ : IsPrimitiveRoot ζ (Monoid.orderUnits F)) :
    ∃ χ : MulChar F R, orderOf χ = Fintype.card Fˣ

(hζ : IsPrimitiveRoot ζ ↑(MulChar.Monoid.orderUnits F))


@[simp]
theorem ediam_image (h : α ≃ᵢ β) (s : Set α) : EMetric.diam (h '' s) = EMetric.diam s

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)
(s : Set α)


@[simp]
theorem PreservesEqualizer.iso_inv_ι :
    (PreservesEqualizer.iso G f g).inv ≫ G.map (equalizer.ι f g) =
      equalizer.ι (G.map f) (G.map g)

[CategoryTheory.Limits.HasEqualizer (G.map f) (G.map g)]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f g) G]

(CategoryTheory.Limits.PreservesEqualizer.iso G f g).inv ≫ G.map (CategoryTheory.Limits.equalizer.ι f g) =
  CategoryTheory.Limits.equalizer.ι (G.map f) (G.map g)


theorem mapIdxMAux'_eq_mapIdxMGo {α} (f : ℕ → α → m PUnit) (as : List α) (arr : Array PUnit) :
    mapIdxMAux' f arr.size as = mapIdxM.go f as arr *> pure PUnit.unit

{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{α : Type u_1}
(f : ℕ → α → m PUnit.{u + 1})
(as : List α)
(arr : Array PUnit.{u + 1})

List.mapIdxMAux' f arr.size as = SeqRight.seqRight (List.mapIdxM.go f as arr) fun x => pure PUnit.unit


lemma baseChange_polynomialX : (W.baseChange B).toAffine.polynomialX =
    (W.baseChange A).toAffine.polynomialX.map (mapRingHom f)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[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)

(WeierstrassCurve.baseChange W B).toAffine.polynomialX =
  Polynomial.map (Polynomial.mapRingHom ↑f) (WeierstrassCurve.baseChange W A).toAffine.polynomialX


@[simp]
theorem himp_bihimp_right : b ⇨ a ⇔ b = b ⇨ a

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


theorem one_def : (1 : A →A[R] A) = ContinuousAlgHom.id R A

(R : Type u_1)
[CommSemiring R]
(A : Type u_2)
[Semiring A]
[TopologicalSpace A]
[Algebra R A]


/-- Two `CompositionSeries` are equal if they have the same elements. See also `ext_fun`. -/
@[ext]
theorem ext {s₁ s₂ : CompositionSeries X} (h : ∀ x, x ∈ s₁ ↔ x ∈ s₂) : s₁ = s₂

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
{s₁ s₂ : CompositionSeries X}
(h : ∀ (x : X), x ∈ s₁ ↔ x ∈ s₂)


theorem sum_le' {α : Type*} {F : α → ℚ} {t : ℚ} {s : Finset α}
    (hF : ∀ i ∈ s, padicNorm p (F i) ≤ t) (ht : 0 ≤ t) : padicNorm p (∑ i ∈ s, F i) ≤ t

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{α : Type u_1}
{F : α → ℚ}
{t : ℚ}
{s : Finset α}
(hF : ∀ i ∈ s, padicNorm p (F i) ≤ t)
(ht : 0 ≤ t)


theorem symmDiff_eq_iff_sdiff_eq (ha : a ≤ c) : a ∆ b = c ↔ c \ a = b

{α : Type u_2}
[GeneralizedBooleanAlgebra α]
{a b c : α}
(ha : a ≤ c)


lemma le_collapse_of_insert_mem (ha : a ∉ s) (hf : 0 ≤ f) (hts : t = insert a s) (ht : t ∈ 𝒜) :
    f t ≤ collapse 𝒜 a f s

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[LinearOrderedCommSemiring β]
{𝒜 : Finset (Finset α)}
{a : α}
{f : Finset α → β}
{s t : Finset α}
(ha : a ∉ s)
(hf : 0 ≤ f)
(hts : t = insert a s)
(ht : t ∈ 𝒜)


protected theorem leftInvOn : LeftInvOn e.symm e e.source

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


theorem isLUB_csSup' {s : Set α} (hs : BddAbove s) : IsLUB s (sSup s)

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


@[to_additive add_nsmul]
lemma pow_add (a : M) (m : ℕ) : ∀ n, a ^ (m + n) = a ^ m * a ^ n

{M : Type u_2}
[Monoid M]
(a : M)
(m n : ℕ)


theorem nonnegg_comm {c d : ℕ} {x y : ℤ} : Nonnegg c d x y = Nonnegg d c y x

Zsqrtd.Nonnegg c d x y = Zsqrtd.Nonnegg d c y x


theorem mem_merge_right (s : α → α → Bool) (h : x ∈ r) : x ∈ merge s l r

{α : Type u_1}
{x : α}
{r l : List α}
(s : α → α → Bool)
(h : x ∈ r)


theorem Function.LeftInverse.closedEmbedding [T2Space X] {f : X → Y} {g : Y → X}
    (h : Function.LeftInverse f g) (hf : Continuous f) (hg : Continuous g) : ClosedEmbedding g

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space X]
{f : X → Y}
{g : Y → X}
(h : Function.LeftInverse f g)
(hf : Continuous f)
(hg : Continuous g)


@[simp] theorem lookup_replicate_self_of_pos {a : α} (h : 0 < n) :
    (replicate n (a, b)).lookup a = some b

{α : Type u_2}
[BEq α]
[LawfulBEq α]
{n : Nat}

∀ {α_1 : Type u_1} {b : α_1} {a : α}, 0 < n → List.lookup a (List.replicate n (a, b)) = some b


@[to_additive]
theorem pow_pow_self (a : M) (m n : ℕ) : Commute (a ^ m) (a ^ n)

{M : Type u_2}
[AddMonoid M]
(a : M)
(m n : ℕ)


/-- If `f : X → Z` is a Borel measurable map from a standard Borel space to a
countably separated measurable space and the range of `f` is measurable,
then the preimage of a set `s` is measurable
if and only if the intesection with `Set.range f` is measurable. -/
theorem measurableSet_preimage_iff_inter_range {f : X → Z} [CountablySeparated (range f)]
    (hf : Measurable f) (hr : MeasurableSet (range f)) {s : Set Z} :
    MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ range f)

MeasurableSet (f ⁻¹' s) ↔ MeasurableSet (s ∩ Set.range f)


theorem Set.PairwiseDisjoint.subset_of_biUnion_subset_biUnion (h₀ : (s ∪ t).PairwiseDisjoint f)
    (h₁ : ∀ i ∈ s, (f i).Nonempty) (h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i) : s ⊆ t

{α : Type u_1}
{ι : Type u_4}
{f : ι → Set α}
{s t : Set ι}
(h₀ : (s ∪ t).PairwiseDisjoint f)
(h₁ : ∀ i ∈ s, (f i).Nonempty)
(h : ⋃ i ∈ s, f i ⊆ ⋃ i ∈ t, f i)


@[simp]
theorem bihimp_himp_eq_inf : a ⇔ (a ⇨ b) = a ⊓ b

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


/-- Given a coalgebra morphism whose carrier part is a monomorphism, we get an algebra monomorphism.
-/
theorem algebra_mono_of_mono {X Y : Coalgebra G} (f : X ⟶ Y) [h : Mono f.f] : Mono f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(G : CategoryTheory.Comonad C)
{X Y : G.Coalgebra}
(f : X ⟶ Y)
[h : CategoryTheory.Mono f.f]


@[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J

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


protected theorem one_mul (k : Fin (n + 1)) : (1 : Fin (n + 1)) * k = k


theorem Tendsto.isCompact_insert_range_of_cocompact {f : X → Y} {y}
    (hf : Tendsto f (cocompact X) (𝓝 y)) (hfc : Continuous f) : IsCompact (insert y (range f))

(hf : Filter.Tendsto f (Filter.cocompact X) (𝓝 y))


@[simp]
theorem toEnd_one : (1 : CentroidHom α).toEnd = 1

{α : Type u_5}
[NonUnitalNonAssocSemiring α]


@[simp]
lemma image_subtype_val_Ico_Iic {a b : α} (c : Ico a b) : Subtype.val '' Iic c = Icc a c

{α : Type u_1}
[Preorder α]
{a b : α}
(c : ↑(Set.Ico a b))


theorem toFinsupp_apply_lt (hn : n < l.length) : l.toFinsupp n = l.get ⟨n, hn⟩

{M : Type u_1}
[Zero M]
(l : List M)
[DecidablePred fun x => l.getD x 0 ≠ 0]
(n : ℕ)
(hn : n < l.length)


theorem pi_const_singleton {β : Type*} (s : Finset α) (i : β) :
    (s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i}

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


theorem CG.of_map_embedding {N : Type*} [L.Structure N] (f : M ↪[L] N) {s : L.Substructure M}
    (hs : (s.map f.toHom).CG) : s.CG

(hs : (FirstOrder.Language.Substructure.map f.toHom s).CG)


@[to_additive]
theorem isOpenMap_mul_right (a : G) : IsOpenMap (· * a)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
(a : G)


@[simp] lemma one_mod (n : ℕ) : 1 % (n + 2) = 1


theorem range_sin_infinite : (range Real.sin).Infinite


theorem commutatorElement_eq_one_iff_mul_comm : ⁅g₁, g₂⁆ = 1 ↔ g₁ * g₂ = g₂ * g₁


theorem type_subrel_lt (o : Ordinal.{u}) :
    type (Subrel ((· < ·) : Ordinal → Ordinal → Prop) { o' : Ordinal | o' < o })
      = Ordinal.lift.{u + 1} o

Ordinal.type (Subrel (fun x x_1 => x < x_1) {o' | o' < o}) = Ordinal.lift.{u + 1, u} o


theorem count_dedup (m : Multiset α) (a : α) : m.dedup.count a = if a ∈ m then 1 else 0

{α : Type u_1}
[DecidableEq α]
(m : Multiset α)
(a : α)

Multiset.count a m.dedup = if a ∈ m then 1 else 0


theorem ae_eq_comp {f : α → β} {g g' : β → δ} (hf : AEMeasurable f μ) (h : g =ᵐ[μ.map f] g') :
    g ∘ f =ᵐ[μ] g' ∘ f

(h : g =ᵐ[MeasureTheory.Measure.map f μ] g')


@[simp]
theorem update_idem {α} [DecidableEq α] {β : α → Sort*} {a : α} (v w : β a) (f : ∀ a, β a) :
    update (update f a v) a w = update f a w

{α : Sort u_2}
[DecidableEq α]
{β : α → Sort u_1}
{a : α}
(v w : β a)
(f : (a : α) → β a)

Function.update (Function.update f a v) a w = Function.update f a w


@[simp] lemma singleton_disjiUnion (a : α) {h} : Finset.disjiUnion {a} t h = t a

{α : Type u_1}
{β : Type u_2}
{t : α → Finset β}
(a : α)
{h : (↑{a}).PairwiseDisjoint t}


@[simp]
lemma factorizationLCMRight_zero_right : factorizationLCMRight a 0 = 1


/-- A *Shelf* is a structure with a self-distributive binary operation.
The binary operation is regarded as a left action of the type on itself.
-/
class Shelf (α : Type u) where
  /-- The action of the `Shelf` over `α`-/
  act : α → α → α
  /-- A verification that `act` is self-distributive-/
  self_distrib : ∀ {x y z : α}, act x (act y z) = act (act x y) (act x z)

{α : Type u}
[self : Shelf α]
{x y z : α}


theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → Tropical R) :
    untrop (∑ i ∈ s, f i) = s.inf (untrop ∘ f)

{R : Type u_1}
{S : Type u_2}
[LinearOrder R]
[OrderTop R]
(s : Finset S)
(f : S → Tropical R)

Tropical.untrop (∑ i ∈ s, f i) = s.inf (Tropical.untrop ∘ f)


theorem bind_eq_bind' {α β : Type u} {f : α → Option β} {x : Option α} : x >>= f = x.bind f


@[simp]
theorem trace_transpose' (f : M →ₗ[R] M) :
    trace R _ (Module.Dual.transpose (R := R) f) = trace R M f

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]
(f : M →ₗ[R] M)

(LinearMap.trace R (Module.Dual R M)) (Module.Dual.transpose f) = (LinearMap.trace R M) f


@[to_additive]
theorem smul_opposite_mul {H : Subgroup G} (x g : G) (h : H.op) :
    h • (g * x) = g * h • x

{G : Type u_2}
[AddGroup G]
{H : AddSubgroup G}
(x g : G)
(h : ↥H.op)


theorem next : ∀ {it}, ValidFor l (c :: r) it → ValidFor (c :: l) r it.next

{l : List Char}
{c : Char}
{r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor l (c :: r) it → String.Iterator.ValidFor (c :: l) r it.next


@[simp]
theorem toNonUnitalSubalgebra_eq_top {S : NonUnitalStarSubalgebra R A} :
    S.toNonUnitalSubalgebra = ⊤ ↔ S = ⊤

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


theorem Bounded.of_lt :
    ∀ {t o₁ o₂} {x : α}, Bounded t o₁ o₂ → Bounded nil o₁ x → All (· < x) t → Bounded t o₁ x

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}
{x : α}

t.Bounded o₁ o₂ → Ordnode.nil.Bounded o₁ ↑x → Ordnode.All (fun x_1 => x_1 < x) t → t.Bounded o₁ ↑x


theorem preimage_mono {s t : Set β} (h : s ⊆ t) : r.preimage s ⊆ r.preimage t

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)
{s t : Set β}
(h : s ⊆ t)


@[to_additive]
theorem finprod_mem_eq_prod_of_inter_mulSupport_eq (f : α → M) {s : Set α} {t : Finset α}
    (h : s ∩ mulSupport f = t.toSet ∩ mulSupport f) : ∏ᶠ i ∈ s, f i = ∏ i ∈ t, f i

(h : s ∩ Function.support f = ↑t ∩ Function.support f)

∑ᶠ (i : α) (_ : i ∈ s), f i = ∑ i ∈ t, f i


theorem left_le_iff (h : IsCompl x y) : x ≤ z ↔ Codisjoint z y

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{x y z : α}
(h : IsCompl x y)


@[symm]
theorem Disjoint.symm (d : Disjoint l₁ l₂) : Disjoint l₂ l₁

{α : Type u_1}
{l₁ l₂ : List α}
(d : l₁.Disjoint l₂)


@[simp] protected theorem one_lt_two_pow_iff : 1 < 2 ^ n ↔ n ≠ 0


@[simp]
theorem Ioc_eq_empty_iff : Ioc a b = ∅ ↔ ¬a < b

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


theorem integral_comp_rpow_Ioi_of_pos {g : ℝ → E} {p : ℝ} (hp : 0 < p) :
    (∫ x in Ioi 0, (p * x ^ (p - 1)) • g (x ^ p)) = ∫ y in Ioi 0, g y

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{g : ℝ → E}
{p : ℝ}
(hp : 0 < p)

∫ (x : ℝ) in Set.Ioi 0, (p * x ^ (p - 1)) • g (x ^ p) = ∫ (y : ℝ) in Set.Ioi 0, g y


theorem iterateFrobeniusEquiv_symm_add : (iterateFrobeniusEquiv R p (m + n)).symm =
    (iterateFrobeniusEquiv R p n).symm.trans (iterateFrobeniusEquiv R p m).symm

(R : Type u_1)
(p m n : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]


/-- If `-1` is a square modulo coprime natural numbers `m` and `n`, then `-1` is also
a square modulo `m*n`. -/
theorem ZMod.isSquare_neg_one_mul {m n : ℕ} (hc : m.Coprime n) (hm : IsSquare (-1 : ZMod m))
    (hn : IsSquare (-1 : ZMod n)) : IsSquare (-1 : ZMod (m * n))

{m n : ℕ}
(hc : m.Coprime n)
(hm : IsSquare (-1))
(hn : IsSquare (-1))


theorem isOpen_iff : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ball x ε ⊆ s

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

IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, EMetric.ball x ε ⊆ s


@[simp]
theorem weightedVSubVSubWeights_apply_of_ne [DecidableEq ι] {i j t : ι} (hi : t ≠ i) (hj : t ≠ j) :
    weightedVSubVSubWeights k i j t = 0

(k : Type u_1)
[Ring k]
{ι : Type u_4}
[DecidableEq ι]
{i j t : ι}
(hi : t ≠ i)
(hj : t ≠ j)

Finset.weightedVSubVSubWeights k i j t = 0


theorem has_cofiltered_limits_of_has_filtered_colimits_op [HasFilteredColimitsOfSize.{v₂, u₂} Cᵒᵖ] :
    HasCofilteredLimitsOfSize.{v₂, u₂} C

[CategoryTheory.Limits.HasFilteredColimitsOfSize.{v₂, u₂, v₁, u₁} Cᵒᵖ]

CategoryTheory.Limits.HasCofilteredLimitsOfSize.{v₂, u₂, v₁, u₁} C


theorem ortho_smul_right {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] V} {x y} {a : K₂} {ha : a ≠ 0} :
    IsOrtho B x y ↔ IsOrtho B x (a • y)

{K : Type u_13}
{K₁ : Type u_14}
{K₂ : Type u_15}
{V : Type u_16}
{V₁ : Type u_17}
{V₂ : Type u_18}
[Field K]
[AddCommGroup V]
[Module K V]
[Field K₁]
[AddCommGroup V₁]
[Module K₁ V₁]
[Field K₂]
[AddCommGroup V₂]
[Module K₂ V₂]
{I₁ : K₁ →+* K}
{I₂ : K₂ →+* K}
{B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] V}
{x : V₁}
{y : V₂}
{a : K₂}
{ha : a ≠ 0}


/-- Binet's formula as a dependent equality. -/
theorem Real.coe_fib_eq : ∀ n, (Nat.fib n : ℝ) = (φ ^ n - ψ ^ n) / √5


/-- `padicNorm p` is symmetric. -/
@[simp]
protected theorem neg (q : ℚ) : padicNorm p (-q) = padicNorm p q


theorem derivWithin_sqrt (hf : DifferentiableWithinAt ℝ f s x) (hx : f x ≠ 0)
    (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => √(f x)) s x = derivWithin f s x / (2 * √(f x))

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


@[to_additive]
theorem map_map (g : N →* P) (f : G →* N) : (K.map f).map g = K.map (g.comp f)

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)
{N : Type u_5}
[AddGroup N]
{P : Type u_6}
[AddGroup P]
(g : N →+ P)
(f : G →+ N)

AddSubgroup.map g (AddSubgroup.map f K) = AddSubgroup.map (g.comp f) K


@[to_additive (attr := simp)]
theorem measure_smul (c : G) (s : Set α) : μ (c • s) = μ s

[MeasureTheory.SMulInvariantMeasure G α μ]


theorem le_ciSup_of_le {f : ι → α} (H : BddAbove (range f)) (c : ι) (h : a ≤ f c) : a ≤ iSup f

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{a : α}
{f : ι → α}
(H : BddAbove (Set.range f))
(c : ι)
(h : a ≤ f c)


theorem le_sup_inf_aux (a b c : α) : (a + b + a * b) * (a + c + a * c) = a + b * c + a * (b * c)

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


theorem rank_mvPolynomial : Module.rank K (MvPolynomial σ K) = Cardinal.mk (σ →₀ ℕ)


theorem nontrivial_iff_ne_bot : Nontrivial p ↔ p ≠ ⊥

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


/-- The nerve of a category -/
@[simps]
def nerve (C : Type u) [Category.{v} C] : SSet.{max u v}

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

∀ {X Y : SimplexCategoryᵒᵖ} (f : X ⟶ Y) (x : CategoryTheory.ComposableArrows C (Opposite.unop X).len),
  (CategoryTheory.nerve C).map f x = x.whiskerLeft (SimplexCategory.toCat.map f.unop)


@[simp, norm_cast]
theorem intCast_imK (z : ℤ) : (z : ℍ[R]).imK = 0


theorem closedEmbedding_sigmaMk {i : ι} : ClosedEmbedding (@Sigma.mk ι σ i)

{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
{i : ι}


theorem isConformalMap_id : IsConformalMap (id R M)

{R : Type u_1}
{M : Type u_2}
[NormedField R]
[SeminormedAddCommGroup M]
[NormedSpace R M]

IsConformalMap (ContinuousLinearMap.id R M)


lemma completedHurwitzZetaOdd_neg (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaOdd (-a) s = -completedHurwitzZetaOdd a s

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


lemma inf_nhds [Inf L] [ContinuousInf L] (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (fun i => f i ⊓ g i) l (𝓝 (x ⊓ y))

{L : Type u_1}
[TopologicalSpace L]
{α : Type u_3}
{l : Filter α}
{f g : α → L}
{x y : L}
[Inf L]
[ContinuousInf L]
(hf : Filter.Tendsto f l (𝓝 x))
(hg : Filter.Tendsto g l (𝓝 y))

Filter.Tendsto (fun i => f i ⊓ g i) l (𝓝 (x ⊓ y))


theorem trailingDegree_eq_iff_natTrailingDegree_eq {p : R[X]} {n : ℕ} (hp : p ≠ 0) :
    p.trailingDegree = n ↔ p.natTrailingDegree = n

{R : Type u}
[Semiring R]
{p : R[X]}
{n : ℕ}
(hp : p ≠ 0)

p.trailingDegree = ↑n ↔ p.natTrailingDegree = n


/-- The **corners theorem** for finite abelian groups.

The maximum density of a corner-free set in `G × G` goes to zero as `|G|` tends to infinity. -/
theorem corners_theorem (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound ε ≤ card G)
    (A : Finset (G × G)) (hAε : ε * card G ^ 2 ≤ A.card) : ¬ IsCornerFree (A : Set (G × G))

(hG : cornersTheoremBound ε ≤ Fintype.card G)

(hAε : ε * ↑(Fintype.card G) ^ 2 ≤ ↑A.card)


theorem trStmts₁_self (q) : q ∈ trStmts₁ q


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

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


/-- A group homomorphism (a bundled morphism of a type that implements `MonoidHomClass`) between
two uniform groups is uniformly continuous provided that it is continuous at one. See also
`continuous_of_continuousAt_one`. -/
@[to_additive "An additive group homomorphism (a bundled morphism of a type that implements
`AddMonoidHomClass`) between two uniform additive groups is uniformly continuous provided that it
is continuous at zero. See also `continuous_of_continuousAt_zero`."]
theorem uniformContinuous_of_continuousAt_one {hom : Type*} [UniformSpace β] [Group β]
    [UniformGroup β] [FunLike hom α β] [MonoidHomClass hom α β]
    (f : hom) (hf : ContinuousAt f 1) :
    UniformContinuous f

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[Group α]
[UniformGroup α]
{hom : Type u_3}
[UniformSpace β]
[Group β]
[UniformGroup β]
[FunLike hom α β]
[MonoidHomClass hom α β]
(f : hom)
(hf : ContinuousAt (⇑f) 1)


theorem integral_sub_average (μ : Measure α) [IsFiniteMeasure μ] (f : α → E) :
    ∫ x, f x - ⨍ a, f a ∂μ ∂μ = 0

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
(f : α → E)

∫ (x : α), f x - ⨍ (a : α), f a ∂μ ∂μ = 0


@[to_additive (attr := mono, gcongr) nsmul_le_nsmul_right]
theorem pow_le_pow_left' [CovariantClass M M (swap (· * ·)) (· ≤ ·)] {a b : M} (hab : a ≤ b) :
    ∀ i : ℕ, a ^ i ≤ b ^ i

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

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


@[simp] lemma sign_natCast_add_one (n : ℕ) : sign (n + 1) = 1


/-- If `f g : α → ℝ≥0∞` are two functions and one of them is (a.e.) measurable, then the Lebesgue
integral of `f + g` equals the sum of integrals. This lemma assumes that `g` is integrable, see also
`MeasureTheory.lintegral_add_left` and primed versions of these lemmas. -/
@[simp]
theorem lintegral_add_right (f : α → ℝ≥0∞) {g : α → ℝ≥0∞} (hg : Measurable g) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ≥0∞)
{g : α → ℝ≥0∞}
(hg : Measurable g)

∫⁻ (a : α), f a + g a ∂μ = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), g a ∂μ


theorem const_eventuallyEq [NeBot l] {a b : β} : ((fun _ => a) =ᶠ[l] fun _ => b) ↔ a = b

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[l.NeBot]
{a b : β}


@[simp]
theorem const_apply {t} : (@const N X _ x) t = x

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
{t : N → ↑I}


theorem continuousLinearMap_symm_apply (p : B × (F₁ →SL[σ] F₂)) :
    (continuousLinearMap σ e₁ e₂).toPartialEquiv.symm p =
      ⟨p.1, .comp (e₂.symmL 𝕜₂ p.1) (p.2.comp (e₁.continuousLinearMapAt 𝕜₁ p.1))⟩

(σ : 𝕜₁ →+* 𝕜₂)

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

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

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

↑(Pretrivialization.continuousLinearMap σ e₁ e₂).symm p =
  { proj := p.1,
    snd := (Trivialization.symmL 𝕜₂ e₂ p.1).comp (p.2.comp (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.1)) }


theorem lt_rootMultiplicity_of_isRoot_iterate_derivative_of_mem_nonZeroDivisors
    {p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
    (hroot : ∀ m ≤ n, (derivative^[m] p).IsRoot t)
    (hnzd : (n.factorial : R) ∈ nonZeroDivisors R) :
    n < p.rootMultiplicity t

(hroot : ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)

(hnzd : ↑n.factorial ∈ nonZeroDivisors R)


@[instance]
theorem nhdsWithin_Ioi_one_neBot : (𝓝[>] (1 : ℝ≥0∞)).NeBot


lemma preconnectedSpace_iff_univ : PreconnectedSpace α ↔ IsPreconnected (univ : Set α)

PreconnectedSpace α ↔ IsPreconnected Set.univ


theorem HasStrictDerivAt.scomp (hg : HasStrictDerivAt g₁ g₁' (h x)) (hh : HasStrictDerivAt h h' x) :
    HasStrictDerivAt (g₁ ∘ h) (h' • g₁') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
(hg : HasStrictDerivAt g₁ g₁' (h x))
(hh : HasStrictDerivAt h h' x)


theorem uniqueDiffOn_Ioc (a b : ℝ) : UniqueDiffOn ℝ (Ioc a b)


/-- A morphism of comonads is a natural transformation compatible with ε and δ. -/
@[ext]
structure ComonadHom (M N : Comonad C) extends NatTrans (M : C ⥤ C) N where
  app_ε : ∀ X, app X ≫ N.ε.app X = M.ε.app X := by aesop_cat
  app_δ : ∀ X, app X ≫ N.δ.app X = M.δ.app X ≫ app _ ≫ N.map (app X) := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{M N : CategoryTheory.Comonad C}
(self : CategoryTheory.ComonadHom M N)
(X : C)

CategoryTheory.CategoryStruct.comp (self.app X) (N.δ.app X) =
  CategoryTheory.CategoryStruct.comp (M.δ.app X)
    (CategoryTheory.CategoryStruct.comp (self.app (M.obj X)) (N.map (self.app X)))


/-- The distinguished triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
lemma singleTriangle_distinguished :
    hS.singleTriangle ∈ distTriang (DerivedCategory C)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)


@[simp]
theorem iteratedDerivWithin_zero : iteratedDerivWithin 0 f s = f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{s : Set 𝕜}


theorem list_reverse_induction (p : List α → Prop) (base : p [])
    (ind : ∀ (l : List α) (e : α), p l → p (l ++ [e])) : (∀ (l : List α), p l)


theorem castPred_zero (h := Fin.ext_iff.not.2 last_pos.ne)  :
    castPred (0 : Fin (n + 2)) h = 0


@[to_additive]
theorem const_ne_one : const ι a ≠ 1 ↔ a ≠ 1

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[Nonempty ι]
{a : α}


theorem IsAffineOpen.isQuasiSeparated {X : Scheme} {U : X.Opens} (hU : IsAffineOpen U) :
    IsQuasiSeparated (U : Set X)

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


lemma addY_neg {P : Fin 3 → R} (hP : W'.Equation P) : W'.addY P (W'.neg P) = -W'.dblZ P ^ 3

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


theorem mem_span_pair {x y z : α} : z ∈ span ({x, y} : Set α) ↔ ∃ a b, a * x + b * y = z

z ∈ Ideal.span {x, y} ↔ ∃ a b, a * x + b * y = z


/-- Precomposition of a 1-morphism as a functor. -/
@[simps]
def precomp (c : B) (f : a ⟶ b) : (b ⟶ c) ⥤ (a ⟶ c)

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

∀ (x : b ⟶ c), (CategoryTheory.Bicategory.precomp c f).obj x = CategoryTheory.CategoryStruct.comp f x


lemma homologyMap_eq :
    homologyMap φ = h₁.homologyIso.hom ≫ γ.φH ≫ h₂.homologyIso.inv

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

CategoryTheory.ShortComplex.homologyMap φ =
  CategoryTheory.CategoryStruct.comp h₁.homologyIso.hom (CategoryTheory.CategoryStruct.comp γ.φH h₂.homologyIso.inv)


@[simp]
theorem subset_inter_iff {s t r : Set α} : r ⊆ s ∩ t ↔ r ⊆ s ∧ r ⊆ t


theorem coe_to_continuousMap (f : P →ᴬ[R] Q) : ((f : C(P, Q)) : P → Q) = f

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]
(f : P →ᴬ[R] Q)


lemma exact_iff_surjective_abToCycles :
    S.Exact ↔ Function.Surjective S.abToCycles

S.Exact ↔ Function.Surjective ⇑S.abToCycles


@[to_additive] lemma inv_le_mabs (a : α) : a⁻¹ ≤ |a|ₘ

{α : Type u_1}
[Lattice α]
[Group α]
(a : α)


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

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

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


theorem reverse_singleton {u v : V} (h : G.Adj u v) : (cons h nil).reverse = cons (G.symm h) nil

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(h : G.Adj u v)

(SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).reverse = SimpleGraph.Walk.cons ⋯ SimpleGraph.Walk.nil


lemma strictMono_rpow_of_base_gt_one {b : ℝ} (hb : 1 < b) :
    StrictMono (b ^ · : ℝ → ℝ)


theorem setToL1S_smul_left (T : Set α → E →L[ℝ] F) (c : ℝ) (f : α →₁ₛ[μ] E) :
    setToL1S (fun s => c • T s) f = c • setToL1S T f

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

MeasureTheory.L1.SimpleFunc.setToL1S (fun s => c • T s) f = c • MeasureTheory.L1.SimpleFunc.setToL1S T f


@[elab_as_elim]
theorem compact_open_induction_on {P : X.Opens → Prop} (S : X.Opens)
    (hS : IsCompact S.1) (h₁ : P ⊥)
    (h₂ : ∀ (S : X.Opens) (_ : IsCompact S.1) (U : X.affineOpens), P S → P (S ⊔ U)) :
    P S

(h₂ : ∀ (S : X.Opens), IsCompact S.carrier → ∀ (U : ↑X.affineOpens), P S → P (S ⊔ ↑U))


theorem psub_eq_sub {m n} (h : n ≤ m) : psub m n = some (m - n)


lemma zpow_ne_zero_iff {n : ℤ} (hn : n ≠ 0) : a ^ n ≠ 0 ↔ a ≠ 0

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
{n : ℤ}
(hn : n ≠ 0)


theorem HasDerivWithinAt.mono_of_mem (h : HasDerivWithinAt f f' t x) (hst : t ∈ 𝓝[s] x) :
    HasDerivWithinAt f f' s x

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


@[simp, norm_cast]
theorem coe_pure (a : α) : (pure a : Set α) = {a}


theorem Ioc_inter_Ioo_of_left_lt (h : b₁ < b₂) : Ioc a₁ b₁ ∩ Ioo a₂ b₂ = Ioc (max a₁ a₂) b₁

{α : Type u_1}
[LinearOrder α]
{a₁ a₂ b₁ b₂ : α}
(h : b₁ < b₂)

Set.Ioc a₁ b₁ ∩ Set.Ioo a₂ b₂ = Set.Ioc (max a₁ a₂) b₁


theorem IsLocalMax.hasLineDerivAt_eq_zero (h : IsLocalMax f a) (hd : HasLineDerivAt ℝ f f' a b) :
    f' = 0

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul ℝ E]
{f : E → ℝ}
{a b : E}
{f' : ℝ}
(h : IsLocalMax f a)
(hd : HasLineDerivAt ℝ f f' a b)


@[simp]
theorem preimage_cast_Ico (p q : ℚ) : (↑) ⁻¹' Ico (p : K) q = Ico p q

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

Rat.cast ⁻¹' Set.Ico ↑p ↑q = Set.Ico p q


@[simp]
theorem compl_empty_iff {s : Set α} : sᶜ = ∅ ↔ s = univ


theorem pi_if {p : ι → Prop} [h : DecidablePred p] (s : Set ι) (t₁ t₂ : ∀ i, Set (α i)) :
    (pi s fun i => if p i then t₁ i else t₂ i) =
      pi ({ i ∈ s | p i }) t₁ ∩ pi ({ i ∈ s | ¬p i }) t₂

{ι : Type u_1}
{α : ι → Type u_2}
{p : ι → Prop}
[h : DecidablePred p]
(s : Set ι)
(t₁ t₂ : (i : ι) → Set (α i))

(s.pi fun i => if p i then t₁ i else t₂ i) = {i | i ∈ s ∧ p i}.pi t₁ ∩ {i | i ∈ s ∧ ¬p i}.pi t₂


/-- If two additive homomorphisms from `Π₀ i, β i` are equal on each `single a b`, then
they are equal. -/
theorem addHom_ext {γ : Type w} [AddZeroClass γ] ⦃f g : (Π₀ i, β i) →+ γ⦄
    (H : ∀ (i : ι) (y : β i), f (single i y) = g (single i y)) : f = g

(H : ∀ (i : ι) (y : β i), f (DFinsupp.single i y) = g (DFinsupp.single i y))


/-- If `x` is a separable element, then `x⁻¹` is also a separable element. -/
theorem isSeparable_inv {x : E} (hx : IsSeparable F x) : IsSeparable F x⁻¹

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{x : E}
(hx : IsSeparable F x)


theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
    edist (f^[n] x) (f^[n + 1] x) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n

{α : Type u}
[PseudoEMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : LipschitzWith K f)
(x : α)
(n : ℕ)

edist (f^[n] x) (f^[n + 1] x) ≤ edist x (f x) * ↑K ^ n


/-- The preimage of a set `s` under a linear map `f` with nonzero determinant has measure
equal to `μ s` times the absolute value of the inverse of the determinant of `f`. -/
@[simp]
theorem addHaar_preimage_linearMap {f : E →ₗ[ℝ] E} (hf : LinearMap.det f ≠ 0) (s : Set E) :
    μ (f ⁻¹' s) = ENNReal.ofReal |(LinearMap.det f)⁻¹| * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
{f : E →ₗ[ℝ] E}
(hf : LinearMap.det f ≠ 0)
(s : Set E)

μ (⇑f ⁻¹' s) = ENNReal.ofReal |(LinearMap.det f)⁻¹| * μ s


@[simp]
theorem kernelZeroIsoSource_hom : kernelZeroIsoSource.hom = kernel.ι (0 : X ⟶ Y)

CategoryTheory.Limits.kernelZeroIsoSource.hom = CategoryTheory.Limits.kernel.ι 0


theorem range_toAddSubmonoid [RingHomSurjective τ₁₂] (f : M →ₛₗ[τ₁₂] M₂) :
    f.range.toAddSubmonoid = AddMonoidHom.mrange f

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
(f : M →ₛₗ[τ₁₂] M₂)

(LinearMap.range f).toAddSubmonoid = AddMonoidHom.mrange f


lemma coe_mul_bot_of_neg {x : ℝ} (h : x < 0) : (x : EReal) * ⊥ = ⊤


theorem mono_of_nonzero_from_simple [HasKernels C] {X Y : C} [Simple X] {f : X ⟶ Y} (w : f ≠ 0) :
    Mono f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Limits.HasKernels C]
{X Y : C}
[CategoryTheory.Simple X]
{f : X ⟶ Y}
(w : f ≠ 0)


/-- If `x` is isolated in `s`, then `f` has any derivative at `x` within `s`,
as this statement is empty. -/
theorem HasFDerivWithinAt.of_nhdsWithin_eq_bot (h : 𝓝[s\{x}] x = ⊥) :
    HasFDerivWithinAt f f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : 𝓝[s \ {x}] x = ⊥)


theorem MeasurableSet.image_fract [BorelSpace R] {s : Set R} (hs : MeasurableSet s) :
    MeasurableSet (Int.fract '' s)

{R : Type u_2}
[LinearOrderedRing R]
[FloorRing R]
[TopologicalSpace R]
[OrderTopology R]
[MeasurableSpace R]
[BorelSpace R]
{s : Set R}
(hs : MeasurableSet s)


theorem not_countably_generated_nhds_infty_opc : ¬IsCountablyGenerated (𝓝 (∞ : ℚ∞))


theorem separable_prod {ι : Sort _} [Fintype ι] {f : ι → R[X]} (h1 : Pairwise (IsCoprime on f))
    (h2 : ∀ x, (f x).Separable) : (∏ x, f x).Separable

{R : Type u}
[CommRing R]
{ι : Type u_1}
[Fintype ι]
{f : ι → R[X]}
(h1 : Pairwise (IsCoprime on f))
(h2 : ∀ (x : ι), (f x).Separable)


/-- A variant of `ProjRestrict` with domain of the form `π C K` -/
@[simps!]
def ProjRestricts (h : ∀ i, J i → K i) : π C K → π C J

{I : Type u}
(C : Set (I → Bool))
{J K : I → Prop}
[(i : I) → Decidable (J i)]
[(i : I) → Decidable (K i)]
(h : ∀ (i : I), J i → K i)

∀ (a : ↑(Profinite.NobelingProof.π C K)) (a_1 : I),
  ↑(Profinite.NobelingProof.ProjRestricts C h a) a_1 = Profinite.NobelingProof.Proj J (↑a) a_1


theorem Periodic.add_const [AddCommSemigroup α] (h : Periodic f c) (a : α) :
    Periodic (fun x => f (x + a)) c

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddCommSemigroup α]
(h : Function.Periodic f c)
(a : α)

Function.Periodic (fun x => f (x + a)) c


@[simp]
theorem norm_algebraMap' [NormOneClass 𝕜'] (x : 𝕜) : ‖algebraMap 𝕜 𝕜' x‖ = ‖x‖

{𝕜 : Type u_1}
(𝕜' : Type u_2)
[NormedField 𝕜]
[SeminormedRing 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormOneClass 𝕜']
(x : 𝕜)


theorem Continuous.range_subset_closure_image_dense {f : X → Y} (hf : Continuous f)
    (hs : Dense s) : range f ⊆ closure (f '' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{f : X → Y}
(hf : Continuous f)
(hs : Dense s)


theorem symm_toRingHom_comp_toRingHom (e : R ≃+* S) :
    e.symm.toRingHom.comp e.toRingHom = RingHom.id _

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

e.symm.toRingHom.comp e.toRingHom = RingHom.id R


@[simp]
theorem nnnorm_smulRight (f : ContinuousMultilinearMap 𝕜 E 𝕜) (z : G) :
    ‖f.smulRight z‖₊ = ‖f‖₊ * ‖z‖₊

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


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

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

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


theorem summable_sum_mul_range_of_summable_mul (h : Summable fun x : ℕ × ℕ ↦ f x.1 * g x.2) :
    Summable fun n ↦ ∑ k ∈ range (n + 1), f k * g (n - k)

{α : Type u_4}
[TopologicalSpace α]
[NonUnitalNonAssocSemiring α]
{f g : ℕ → α}
[T3Space α]
[TopologicalSemiring α]
(h : Summable fun x => f x.1 * g x.2)

Summable fun n => ∑ k ∈ Finset.range (n + 1), f k * g (n - k)


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

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

List.bidirectionalRec nil singleton cons_append [a] = singleton a


@[simp] theorem mem_eraseP_of_neg {l : List α} (pa : ¬p a) : a ∈ l.eraseP p ↔ a ∈ l

{α : Type u_1}
{p : α → Bool}
{a : α}
{l : List α}
(pa : ¬p a = true)


/-- The cokernel of `g.unop` is the opposite of `kernel g`. -/
@[simps!]
def cokernelUnopUnop : cokernel g.unop ≅ (kernel g).unop

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

(CategoryTheory.cokernelUnopUnop g).hom =
  CategoryTheory.Limits.cokernel.desc g.unop (CategoryTheory.Limits.kernel.ι g).unop ⋯


/-- The star operation on `NonUnitalSubalgebra` commutes with `NonUnitalAlgebra.adjoin`. -/
theorem star_adjoin_comm (s : Set A) :
    star (NonUnitalAlgebra.adjoin R s) = NonUnitalAlgebra.adjoin R (star s)

(R : Type u)
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(s : Set A)


@[to_additive (attr := simp) coe_unzero]
lemma coe_unone : ∀ {x : WithOne α} (hx : x ≠ 1), unone hx = x

{α : Type u}
{x : WithOne α}
(hx : x ≠ 1)


/-- A map to a group preserving multiplication is a monoid homomorphism. -/
@[to_additive "A map to an additive group preserving addition is an additive monoid
homomorphism."]
theorem IsMulHom.to_isMonoidHom [MulOneClass α] [Group β] {f : α → β} (hf : IsMulHom f) :
    IsMonoidHom f

{α : Type u}
{β : Type v}
[AddZeroClass α]
[AddGroup β]
{f : α → β}
(hf : IsAddHom f)


@[simp]
theorem top_toAddSubmonoid : (⊤ : Submodule R M).toAddSubmonoid = ⊤

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


@[simp] lemma reverse_C_add (p : R[X]) (t : R) :
    reverse (C t + p) = C t * X ^ p.natDegree + reverse p

{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(t : R)

(Polynomial.C t + p).reverse = Polynomial.C t * Polynomial.X ^ p.natDegree + p.reverse


/-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k'

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(n i j k i' j' k' : ℤ)
(hi : n + i = i')
(hj : n + j = j')
(hk : n + k = k')
(X : CochainComplex C ℤ)

((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).inv.app X).τ₃ =
  n.negOnePow • (HomologicalComplex.XIsoOfEq X ⋯).inv


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

{f : ι → Ω → β}

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

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


theorem mul_one_sub (a b : α) : a * (1 - b) = a - a * b


theorem updateFinset_updateFinset {s t : Finset ι} (hst : Disjoint s t)
    {y : ∀ i : ↥s, π i} {z : ∀ i : ↥t, π i} :
    updateFinset (updateFinset x s y) t z =
    updateFinset x (s ∪ t) (Equiv.piFinsetUnion π hst ⟨y, z⟩)

{ι : Type u_1}
{π : ι → Type u_2}
{x : (i : ι) → π i}
[DecidableEq ι]
{s t : Finset ι}
(hst : Disjoint s t)
{y : (i : { x // x ∈ s }) → π ↑i}
{z : (i : { x // x ∈ t }) → π ↑i}

Function.updateFinset (Function.updateFinset x s y) t z =
  Function.updateFinset x (s ∪ t) ((Equiv.piFinsetUnion π hst) (y, z))


@[simp]
theorem thickening_singleton (δ : ℝ) (x : X) : thickening δ ({x} : Set X) = ball x δ

{X : Type u}
[PseudoMetricSpace X]
(δ : ℝ)
(x : X)

Metric.thickening δ {x} = Metric.ball x δ


theorem valMinAbs_neg_of_ne_half {n : ℕ} {a : ZMod n} (ha : 2 * a.val ≠ n) :
    (-a).valMinAbs = -a.valMinAbs


theorem forall₂_iff_get {l₁ : List α} {l₂ : List β} :
    Forall₂ R l₁ l₂ ↔ l₁.length = l₂.length ∧ ∀ i h₁ h₂, R (l₁.get ⟨i, h₁⟩) (l₂.get ⟨i, h₂⟩)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{l₁ : List α}
{l₂ : List β}

List.Forall₂ R l₁ l₂ ↔
  l₁.length = l₂.length ∧ ∀ (i : ℕ) (h₁ : i < l₁.length) (h₂ : i < l₂.length), R (l₁.get ⟨i, h₁⟩) (l₂.get ⟨i, h₂⟩)


@[simp, norm_cast]
theorem coe_sdiff (s t : L.DefinableSet A α) :
    ((s \ t : L.DefinableSet A α) : Set (α → M)) = (s : Set (α → M)) \ (t : Set (α → M))

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


theorem reflTransGen_iff_eq_or_transGen : ReflTransGen r a b ↔ b = a ∨ TransGen r a b

{α : Type u_1}
{r : α → α → Prop}
{a b : α}

Relation.ReflTransGen r a b ↔ b = a ∨ Relation.TransGen r a b


@[simp] theorem tensorUnit : 𝟙_ C = ⊤_ C


@[simp] theorem getElem?_set_ne (a : Array α) (i : Fin a.size) {j : Nat} (v : α)
    (ne : i.val ≠ j) : (a.set i v)[j]? = a[j]?

{α : Type u_1}
(a : Array α)
(i : Fin a.size)
{j : Nat}
(v : α)
(ne : ↑i ≠ j)


@[simp] theorem ncard_map (f : α ↪ β) : (f '' s).ncard = s.ncard

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


/-- A group is free if it admits a free group basis. In the definition, we require the basis to
be in the same universe as `G`, although this property follows from the existence of a basis in
any universe, see `FreeGroupBasis.isFreeGroup`. -/
class IsFreeGroup (G : Type u) [Group G] : Prop where
  nonempty_basis : ∃ (ι : Type u), Nonempty (FreeGroupBasis ι G)

{G : Type u}
[Group G]
[self : IsFreeGroup G]


theorem roots_expand_pow_map_iterateFrobenius_le :
    (expand R (p ^ n) f).roots.map (iterateFrobenius R p n) ≤ p ^ n • f.roots

{R : Type u_1}
[CommRing R]
[IsDomain R]
(p n : ℕ)
[ExpChar R p]
(f : R[X])

Multiset.map (⇑(iterateFrobenius R p n)) ((Polynomial.expand R (p ^ n)) f).roots ≤ p ^ n • f.roots


protected theorem surjective (hf : QuotientMap f) : Surjective f

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


lemma sq_eq_zero_iff : a ^ 2 = 0 ↔ a = 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a : M₀}
[NoZeroDivisors M₀]


@[to_additive]
theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Mul γ]
(x y : β → γ)
(z : α → β)


@[simp]
theorem ofAdd_sum (s : Finset ι) (f : ι → α) : ofAdd (∑ i ∈ s, f i) = ∏ i ∈ s, ofAdd (f i)

{ι : Type u_1}
{α : Type u_3}
[AddCommMonoid α]
(s : Finset ι)
(f : ι → α)

Multiplicative.ofAdd (∑ i ∈ s, f i) = ∏ i ∈ s, Multiplicative.ofAdd (f i)


theorem iSup_sInfGen_nonempty {m : Set (OuterMeasure α)} (h : m.Nonempty) (t : Set α) :
    ⨆ _ : t.Nonempty, sInfGen m t = ⨅ (μ : OuterMeasure α) (_ : μ ∈ m), μ t

{m : Set (MeasureTheory.OuterMeasure α)}

⨆ (_ : t.Nonempty), MeasureTheory.OuterMeasure.sInfGen m t = ⨅ μ ∈ m, μ t


@[simp]
theorem singularPart_zero (ν : Measure α) : (0 : Measure α).singularPart ν = 0

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

MeasureTheory.Measure.singularPart 0 ν = 0


@[simp]
theorem mem_cocardinal {s : Set α} :
    s ∈ cocardinal α hreg ↔ Cardinal.mk (sᶜ : Set α) < c

{α : Type u}
{c : Cardinal.{u}}
{hreg : c.IsRegular}
{s : Set α}


protected theorem integral_comp_polarCoord_symm {E : Type*} [NormedAddCommGroup E]
    [NormedSpace ℝ E] (f : ℂ → E) :
    (∫ p in polarCoord.target, p.1 • f (Complex.polarCoord.symm p)) = ∫ p, f p

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : ℂ → E)

∫ (p : ℝ × ℝ) in polarCoord.target, p.1 • f (↑Complex.polarCoord.symm p) = ∫ (p : ℂ), f p


@[to_additive]
lemma powers_eq_zpowers (x : G) : (powers x : Set G) = zpowers x

{G : Type u_1}
[AddGroup G]
[Finite G]
(x : G)

↑(AddSubmonoid.multiples x) = ↑(AddSubgroup.zmultiples x)


theorem contDiff_all_iff_nat : (∀ n, ContDiff 𝕜 n f) ↔ ∀ n : ℕ, ContDiff 𝕜 n f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}

(∀ (n : ℕ∞), ContDiff 𝕜 n f) ↔ ∀ (n : ℕ), ContDiff 𝕜 (↑n) f


/-- A cone on `F` with cone point `X` is the same as an element of `lim Hom(X, F·)`,
    naturally in `X`. -/
@[simps!]
noncomputable def coyonedaCompLimIsoCones (F : J ⥤ C) :
    coyoneda ⋙ (whiskeringLeft _ _ _).obj F ⋙ lim ≅ F.cones

{J : Type v}
[CategoryTheory.SmallCategory J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : J ⥤ C)
(X : Cᵒᵖ)

∀ (a : F.cones.obj X),
  (CategoryTheory.Limits.coyonedaCompLimIsoCones F).inv.app X a =
    (CategoryTheory.Limits.Types.limitEquivSections (F ⋙ CategoryTheory.coyoneda.obj X)).symm
      ((CategoryTheory.Limits.compCoyonedaSectionsEquiv F (Opposite.unop X)).symm a)


@[simp]
theorem lt_iff_lt (e : α ≃o β) {x y : α} : e x < e y ↔ x < y

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(e : α ≃o β)
{x y : α}


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

a ≤ bᶜ ↔ b ≤ aᶜ


theorem hom_left_act_hom' :
    ((P.tensorBimod Q).tensorBimod L).actLeft ≫ hom P Q L =
      (R.X ◁ hom P Q L) ≫ (P.tensorBimod (Q.tensorBimod L)).actLeft

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

((P.tensorBimod Q).tensorBimod L).actLeft ≫ Bimod.AssociatorBimod.hom P Q L =
  R.X ◁ Bimod.AssociatorBimod.hom P Q L ≫ (P.tensorBimod (Q.tensorBimod L)).actLeft


@[simp]
theorem arrowCongr_apply {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁]
    [AddCommMonoid M₂] [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂]
    [Module R M₂₁] [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) (f : M₁ →ₗ[R] M₂₁)
    (x : M₂) : arrowCongr e₁ e₂ f x = e₂ (f (e₁.symm x))

{R : Type u_17}
{M₁ : Type u_18}
{M₂ : Type u_19}
{M₂₁ : Type u_20}
{M₂₂ : Type u_21}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₂₁]
[AddCommMonoid M₂₂]
[Module R M₁]
[Module R M₂]
[Module R M₂₁]
[Module R M₂₂]
(e₁ : M₁ ≃ₗ[R] M₂)
(e₂ : M₂₁ ≃ₗ[R] M₂₂)
(f : M₁ →ₗ[R] M₂₁)
(x : M₂)

((e₁.arrowCongr e₂) f) x = e₂ (f (e₁.symm x))


theorem pow_bit0 {k : ℕ} (_ : (a : R) ^ k = b) (_ : b * b = c) :
    a ^ (Nat.mul (nat_lit 2) k) = c

{R : Type u_1}
[CommSemiring R]
{a b c : R}
{k : ℕ}

a ^ k = b → b * b = c → a ^ Nat.mul 2 k = c


@[simp]
theorem map_val_val_powersetCard (s : Finset α) (i : ℕ) :
    (s.powersetCard i).val.map Finset.val = s.1.powersetCard i

Multiset.map Finset.val (Finset.powersetCard i s).val = Multiset.powersetCard i s.val


theorem lt_iff' : μ < ν ↔ μ ≤ ν ∧ ∃ s, μ s < ν s

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}

μ < ν ↔ μ ≤ ν ∧ ∃ s, μ s < ν s


/-- Construct a functor out of the wide pushout shape given a J-indexed collection of arrows from a
fixed object.
-/
@[simps]
def wideSpan (B : C) (objs : J → C) (arrows : ∀ j : J, B ⟶ objs j) : WidePushoutShape J ⥤ C

(j : CategoryTheory.Limits.WidePushoutShape J)

(CategoryTheory.Limits.WidePushoutShape.wideSpan B objs arrows).obj j = Option.casesOn j B objs


lemma mem_ideal_sup_principal (a b : α) (J : Ideal α) : b ∈ J ⊔ principal a ↔ ∃ j ∈ J, b ≤ j ⊔ a

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
(a b : α)
(J : Order.Ideal α)

b ∈ J ⊔ Order.Ideal.principal a ↔ ∃ j ∈ J, b ≤ j ⊔ a


theorem gal_X_pow_sub_one_isSolvable (n : ℕ) : IsSolvable (X ^ n - 1 : F[X]).Gal


theorem cardDistinctFactors_zero : ω 0 = 0

ArithmeticFunction.cardDistinctFactors 0 = 0


/--
The well-formedness invariant for the bucket array says that every element hashes to its index
(assuming the hash is lawful - otherwise there are no promises about where elements are located).
-/
structure WF [BEq α] [Hashable α] (buckets : Buckets α β) : Prop where
  /-- The elements of a bucket are all distinct according to the `BEq` relation. -/
  distinct [LawfulHashable α] [PartialEquivBEq α] : ∀ bucket ∈ buckets.1.data,
    bucket.toList.Pairwise fun a b => ¬(a.1 == b.1)
  /-- Every element in a bucket should hash to its location. -/
  hash_self (i : Nat) (h : i < buckets.1.size) :
    buckets.1[i].All fun k _ => ((hash k).toUSize % buckets.1.size).toNat = i

{buckets : Batteries.HashMap.Imp.Buckets α β}

Batteries.AssocList.All (fun k x => ((hash k).toUSize % buckets.val.size).toNat = i) buckets.val[i]


@[simp]
theorem digits_zero_succ (n : ℕ) : digits 0 n.succ = [n + 1]


@[simp]
lemma units_smul_comp {X Y Z : C} (r : Rˣ) (f : X ⟶ Y) (g : Y ⟶ Z) :
    (r • f) ≫ g = r • f ≫ g

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


theorem count_one : count p 1 = if p 0 then 1 else 0


lemma AffineIndependent.eq_of_sum_eq_sum_subtype {s : Finset V}
    (hp : AffineIndependent k ((↑) : s → V)) {w₁ w₂ : V → k} (hw : ∑ i ∈ s, w₁ i = ∑ i ∈ s, w₂ i)
    (hwp : ∑ i ∈ s, w₁ i • i = ∑ i ∈ s, w₂ i • i) : ∀ i ∈ s, w₁ i = w₂ i


/-- A locally uniform limit of holomorphic functions on an open domain of the complex plane is
holomorphic (the derivatives converge locally uniformly to that of the limit, which is proved
as `TendstoLocallyUniformlyOn.deriv`). -/
theorem _root_.TendstoLocallyUniformlyOn.differentiableOn [φ.NeBot]
    (hf : TendstoLocallyUniformlyOn F f φ U) (hF : ∀ᶠ n in φ, DifferentiableOn ℂ (F n) U)
    (hU : IsOpen U) : DifferentiableOn ℂ f U

(hF : ∀ᶠ (n : ι) in φ, DifferentiableOn ℂ (F n) U)


theorem natDegree_X_add_C (x : R) : (X + C x).natDegree = 1

{R : Type u}
[Nontrivial R]
[Semiring R]
(x : R)

(Polynomial.X + Polynomial.C x).natDegree = 1


theorem changeOriginSeries_support {k l : ℕ} (h : k + l ≠ Fintype.card ι) :
    f.toFormalMultilinearSeries.changeOriginSeries k l = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)
{k l : ℕ}
(h : k + l ≠ Fintype.card ι)


theorem ncard_le_ncard_insert (a : α) (s : Set α) : s.ncard ≤ (insert a s).ncard


theorem sdiff_sdiff_left' : (x \ y) \ z = x \ y ⊓ x \ z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]


theorem map_jacobson_of_surjective {f : R →+* S} (hf : Function.Surjective f) :
    RingHom.ker f ≤ I → map f I.jacobson = (map f I).jacobson

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{I : Ideal R}
{f : R →+* S}
(hf : Function.Surjective ⇑f)

RingHom.ker f ≤ I → Ideal.map f I.jacobson = (Ideal.map f I).jacobson


theorem IsInitial.mono_from [InitialMonoClass C] {I} {X : C} (hI : IsInitial I) (f : I ⟶ X) :
    Mono f

(hI : CategoryTheory.Limits.IsInitial I)