@[to_additive]
theorem ContMDiff.mul (hf : ContMDiff I' I n f) (hg : ContMDiff I' I n g) :
    ContMDiff I' I n (f * g)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[Add G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{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 g : M → G}
{n : ℕ∞}
(hf : ContMDiff I' I n f)
(hg : ContMDiff I' I n g)


/-- Construct a cocone over a wide span. -/
@[simps]
def mkCocone {F : WidePushoutShape J ⥤ C} {X : C} (f : F.obj none ⟶ X) (ι : ∀ j, F.obj (some j) ⟶ X)
    (w : ∀ j, F.map (Hom.init j) ≫ ι j = f) : Cocone F

{F : CategoryTheory.Limits.WidePushoutShape J ⥤ C}

(w : ∀ (j : J), F.map (CategoryTheory.Limits.WidePushoutShape.Hom.init j) ≫ ι j = f)

(j : CategoryTheory.Limits.WidePushoutShape J)

(CategoryTheory.Limits.WidePushoutShape.mkCocone f ι w).ι.app j =
  match j with
  | none => f
  | some j => ι j


theorem exists_eq_pow_mul_of_isCompact_of_isQuasiSeparated (X : Scheme.{u}) (U : X.Opens)
    (hU : IsCompact U.1) (hU' : IsQuasiSeparated U.1) (f : Γ(X, U)) (x : Γ(X, X.basicOpen f)) :
    ∃ (n : ℕ) (y : Γ(X, U)), y |_ X.basicOpen f = (f |_ X.basicOpen f) ^ n * x

(X : AlgebraicGeometry.Scheme)
(U : X.Opens)
(hU : IsCompact U.carrier)
(hU' : IsQuasiSeparated U.carrier)
(f : ↑Γ(X, U))
(x : ↑Γ(X, X.basicOpen f))

∃ n y, (y |_ X.basicOpen f) ⋯ = (f |_ X.basicOpen f) ⋯ ^ n * x


@[to_additive (attr := simp)]
theorem smul_set_eq_empty : a • s = ∅ ↔ s = ∅

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


theorem analyticAt_exp_of_mem_ball (x : 𝔸) (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    AnalyticAt 𝕂 (exp 𝕂) x

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)


theorem eq_loopyOn_or_rkPos (M : Matroid α) : M = loopyOn M.E ∨ RkPos M


theorem map_updateRow [DecidableEq m] (f : α → β) :
    map (updateRow M i b) f = updateRow (M.map f) i (f ∘ b)

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
{M : Matrix m n α}
{i : m}
{b : n → α}
[DecidableEq m]
(f : α → β)

(M.updateRow i b).map f = (M.map f).updateRow i (f ∘ b)


theorem closure_subset_iff {s t : Set R} (ht : IsSubring t) : closure s ⊆ t ↔ s ⊆ t

{R : Type u}
[Ring R]
{s t : Set R}
(ht : IsSubring t)


theorem not_lt_argmin [Nonempty α] (a : α) : ¬f a < f (argmin f h)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
[LT β]
(h : WellFounded fun x x_1 => x < x_1)
[Nonempty α]
(a : α)


lemma autGaloisSystem_map_surjective ⦃A B : PointedGaloisObject F⦄ (f : A ⟶ B) :
    Function.Surjective ((autGaloisSystem F).map f)

(F : CategoryTheory.Functor C FintypeCat)

⦃A B : CategoryTheory.PreGaloisCategory.PointedGaloisObject F⦄

Function.Surjective ⇑((CategoryTheory.PreGaloisCategory.autGaloisSystem F).map f)


@[simp] theorem one_re : (1 : ℍ[R,c₁,c₂]).re = 1


lemma hasSmallLocalizedHom_of_isLocalization :
    HasSmallLocalizedHom.{v₂} W X Y

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(W : CategoryTheory.MorphismProperty C)
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(L : CategoryTheory.Functor C D)
[L.IsLocalization W]
{X Y : C}

CategoryTheory.Localization.HasSmallLocalizedHom W X Y


@[simp]
theorem descFactorial_succ (n k : ℕ) : n.descFactorial (k + 1) = (n - k) * n.descFactorial k


/-- The functor `LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def LeftExtension.precomp : LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)

{X Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D H).obj L)}

((CategoryTheory.Functor.LeftExtension.precomp L F G).map φ).left = CategoryTheory.CategoryStruct.id X.left


theorem add_limZero {f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f + g)

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{f g : CauSeq β abv}
(hf : f.LimZero)
(hg : g.LimZero)


/-- This is stated as a lemma to prevent class search from forming a loop since a sheaf morphism is
monic if and only if it is monic as a presheaf morphism (under suitable assumption). -/
theorem Sheaf.Hom.mono_of_presheaf_mono {F G : Sheaf J A} (f : F ⟶ G) [h : Mono f.1] : Mono f

(J : CategoryTheory.GrothendieckTopology C)


protected theorem SModEq.def :
    x ≡ y [SMOD U] ↔ (Submodule.Quotient.mk x : M ⧸ U) = Submodule.Quotient.mk y

{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
{x y : M}

x ≡ y [SMOD U] ↔ Submodule.Quotient.mk x = Submodule.Quotient.mk y


@[to_additive]
theorem map_le_of_le_comap {T : Submonoid N} {f : F} : S ≤ T.comap f → S.map f ≤ T

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(S : AddSubmonoid M)
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{T : AddSubmonoid N}
{f : F}

S ≤ AddSubmonoid.comap f T → AddSubmonoid.map f S ≤ T


@[reassoc]
theorem leftAdjointMate_comp_evaluation {X Y : C} [HasLeftDual X] [HasLeftDual Y] (f : X ⟶ Y) :
    X ◁ (ᘁf) ≫ ε_ _ _ = f ▷ _ ≫ ε_ _ _

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

(X ◁ ᘁf) ≫ ε_ (ᘁX) X = f ▷ ᘁY ≫ ε_ (ᘁY) Y


@[simp]
theorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b

{α : Type u_1}
(l : List α)
{R : α → α → Prop}
[DecidableRel R]
{a b : α}
(h : ¬R b a)

List.destutter' R b (a :: l) = List.destutter' R b l


@[norm_cast, simp]
theorem coe_zero : ⇑(0 : M →ₗ⁅R,L⁆ N) = 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]


theorem mk_bot : (⟨⊥, isComplemented_bot⟩ : Complementeds α) = ⊥

{α : Type u_1}
[Lattice α]
[BoundedOrder α]


theorem IsMultiplicative.prodPrimeFactors_one_sub_of_squarefree [CommRing R]
    (f : ArithmeticFunction R) (hf : f.IsMultiplicative) {n : ℕ} (hn : Squarefree n) :
    ∏ p ∈ n.primeFactors, (1 - f p) = ∑ d ∈ n.divisors, μ d * f d

{R : Type u_1}
[CommRing R]
(f : ArithmeticFunction R)
(hf : f.IsMultiplicative)
{n : ℕ}
(hn : Squarefree n)

∏ p ∈ n.primeFactors, (1 - f p) = ∑ d ∈ n.divisors, ↑(ArithmeticFunction.moebius d) * f d


theorem sigmaCongrRight_sigmaEquivProd :
    (sigmaCongrRight e).trans (sigmaEquivProd α₁ β₂)
    = (sigmaEquivProd α₁ β₁).trans (prodCongrRight e)

{α₁ : Type u_1}
{β₁ : Type u_3}
{β₂ : Type u_2}
(e : α₁ → β₁ ≃ β₂)

(Equiv.sigmaCongrRight e).trans (Equiv.sigmaEquivProd α₁ β₂) =
  (Equiv.sigmaEquivProd α₁ β₁).trans (Equiv.prodCongrRight e)


lemma complex_exactAt_succ (n : ℕ) :
    P.complex.ExactAt (n + 1)

(P : CategoryTheory.ProjectiveResolution Z)

HomologicalComplex.ExactAt P.complex (n + 1)


theorem BlankRel.equivalence (Γ) [Inhabited Γ] : Equivalence (@BlankRel Γ _)


@[simp] lemma choose_eq (a : α) : @Exists.choose _ (· = a) ⟨a, rfl⟩ = a


@[higher_order fst_id]
theorem id_fst : ∀ {α β} (x : F α β), fst id x = x

{F : Type u₀ → Type u₁ → Type u₂}
[Bifunctor F]
[LawfulBifunctor F]
{α : Type u₀}
{β : Type u₁}


theorem coe_torsion_eq_annihilator_ne_bot :
    (torsion R M : Set M) = { x : M | (R ∙ x).annihilator ≠ ⊥ }

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[NoZeroDivisors R]
[Nontrivial R]

↑(Submodule.torsion R M) = {x | (Submodule.span R {x}).annihilator ≠ ⊥}


/-- Any point in some neighborhood of `a` can be represented as
`HasStrictFDerivAt.implicitFunctionOfComplemented` of some point. -/
theorem eq_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤)
    (hker : (ker f').ClosedComplemented) :
    ∀ᶠ x in 𝓝 a, hf.implicitFunctionOfComplemented f f' hf' hker (f x)
      (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker x).snd = x

(hker : (LinearMap.ker f').ClosedComplemented)

∀ᶠ (x : E) in 𝓝 a,
  HasStrictFDerivAt.implicitFunctionOfComplemented f f' hf hf' hker (f x)
      (↑(HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented f f' hf hf' hker) x).2 =
    x


/-- The function `fun x ↦ r * f x` tends to negative infinity along a nontrivial filter
if and only if `r > 0` and `f` tends to negative infinity or `r < 0` and `f` tends to infinity. -/
theorem tendsto_const_mul_atBot_iff [NeBot l] :
    Tendsto (fun x => r * f x) l atBot ↔ 0 < r ∧ Tendsto f l atBot ∨ r < 0 ∧ Tendsto f l atTop

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]

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


theorem comp_symm_eq {α : Type*} (f : M₂ → α) (g : M₁ → α) : g ∘ e₁₂.symm = f ↔ g = f ∘ e₁₂

{R₁ : Type u_2}
{R₂ : Type u_3}
{M₁ : Type u_9}
{M₂ : Type u_10}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
{e₁₂ : M₁ ≃ₛₗ[σ₁₂] M₂}
{α : Type u_18}
(f : M₂ → α)
(g : M₁ → α)


lemma neg_norm_le_apply (f : α →ᵇ ℝ) (x : α) :
    -‖f‖ ≤ f x

{α : Type u}
[TopologicalSpace α]
(f : BoundedContinuousFunction α ℝ)
(x : α)


protected theorem coe_inj (f g : α →𝒄 β) (h : (f : α → β) = g) : f = g

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(f g : α →𝒄 β)
(h : ⇑f = ⇑g)


@[to_additive]
theorem isMonoidHom_coe (f : M →* N) : IsMonoidHom (f : M → N)

{M : Type u_1}
{N : Type u_2}
{mM : AddZeroClass M}
{mN : AddZeroClass N}
(f : M →+ N)


@[to_additive (attr := simp)]
theorem equivQuotientZPowOfEquiv_refl :
    MulEquiv.refl (A ⧸ (zpowGroupHom n : A →* A).range) =
      equivQuotientZPowOfEquiv (MulEquiv.refl A) n

AddEquiv.refl (A ⧸ (zsmulAddGroupHom n).range) = QuotientAddGroup.equivQuotientZSMulOfEquiv (AddEquiv.refl A) n


/-- A general version of the slash action of the space of modular forms. -/
class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where
  map : β → G → α → α
  zero_slash : ∀ (k : β) (g : G), map k g 0 = 0
  slash_one : ∀ (k : β) (a : α), map k 1 a = a
  slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a)
  smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a
  add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b

{β : Type u_1}
{G : Type u_2}
{α : Type u_3}
{γ : Type u_4}
[Group G]
[AddMonoid α]
[SMul γ α]
[self : SlashAction β G α γ]
(k : β)
(g : G)


@[simp]
theorem succ_one : succ (1 : Ordinal) = 2


@[simp]
theorem toAdd_le {a b : Multiplicative α} : toAdd a ≤ toAdd b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
{a b : Multiplicative α}

Multiplicative.toAdd a ≤ Multiplicative.toAdd b ↔ a ≤ b


@[simp] lemma principal_exterior (s : Set α) : 𝓟 (exterior s) = 𝓝ˢ s

{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]
(s : Set α)


/-- `LocallyConstant.congrRight` as a `RingEquiv`. -/
@[simps!]
def congrRightRingEquiv [Semiring Y] [Semiring Z] (e : Y ≃+* Z) :
    LocallyConstant X Y ≃+* LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{Z : Type u_6}
[Semiring Y]
[Semiring Z]
(e : Y ≃+* Z)
(g : LocallyConstant X Y)

∀ (a : X), ((LocallyConstant.congrRightRingEquiv e) g) a = e (g a)


/-- Composition of a partial homeomorphism and its inverse is equivalent to the restriction of the
identity to the source -/
theorem self_trans_symm : e.trans e.symm ≈ PartialHomeomorph.ofSet e.source e.open_source

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

e.trans e.symm ≈ PartialHomeomorph.ofSet e.source ⋯


/-- The minimal polynomial of a semisimple endomorphism is square free -/
theorem IsSemisimple.minpoly_squarefree : Squarefree (minpoly K f)

{M : Type u_2}
[AddCommGroup M]
{K : Type u_3}
[Field K]
[Module K M]
{f : Module.End K M}
[FiniteDimensional K M]
(hf : f.IsSemisimple)


theorem max'_subset {s t : Finset α} (H : s.Nonempty) (hst : s ⊆ t) :
    s.max' H ≤ t.max' (H.mono hst)

{α : Type u_2}
[LinearOrder α]
{s t : Finset α}
(H : s.Nonempty)
(hst : s ⊆ t)


@[simp]
theorem comp_id {U V : Type*} [Quiver U] [Quiver V] (F : Prefunctor U V) :
    F.comp (id _) = F

{U : Type u_1}
{V : Type u_2}
[Quiver U]
[Quiver V]
(F : U ⥤q V)


theorem comp_differentiable_iff {f : G → E} : Differentiable 𝕜 (iso ∘ f) ↔ Differentiable 𝕜 f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃L[𝕜] F)
{f : G → E}

Differentiable 𝕜 (⇑iso ∘ f) ↔ Differentiable 𝕜 f


theorem nonneg_of_mem_sphere (hy : y ∈ sphere x ε) : 0 ≤ ε

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


/-- Any element semiconjugates `1` to `1`. -/
@[to_additive (attr := simp) "Any element semiconjugates `0` to `0`."]
theorem one_right (a : M) : SemiconjBy a 1 1


/-- To construct an isomorphism of coalgebras, it suffices to give an isomorphism of the Vs which
commutes with the structure morphisms.
-/
@[simps]
def isoMk (h : V₀.1 ≅ V₁.1) (w : V₀.str ≫ F.map h.hom = h.hom ≫ V₁.str := by aesop_cat) :
    V₀ ≅ V₁

{V₀ V₁ : CategoryTheory.Endofunctor.Coalgebra F}

(w : CategoryTheory.CategoryStruct.comp V₀.str (F.map h.hom) = CategoryTheory.CategoryStruct.comp h.hom V₁.str := by
  aesop_cat)

(CategoryTheory.Endofunctor.Coalgebra.isoMk h w).hom.f = h.hom


theorem pbind_eq_some {f : ∀ a : α, a ∈ x → Option β} {y : β} :
    x.pbind f = some y ↔ ∃ (z : α) (H : z ∈ x), f z H = some y

{α : Type u_1}
{β : Type u_2}
{x : Option α}
{f : (a : α) → a ∈ x → Option β}
{y : β}

x.pbind f = some y ↔ ∃ z H, f z H = some y


theorem zpow_mul (A : M) (h : IsUnit A.det) : ∀ m n : ℤ, A ^ (m * n) = (A ^ m) ^ n

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
(A : Matrix n' n' R)
(h : IsUnit A.det)
(m n : ℤ)


theorem bound : ∃ C, 0 < C ∧ ∀ x, ‖f x‖ ≤ C * ‖x‖

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

∃ C, 0 < C ∧ ∀ (x : V₁), ‖f x‖ ≤ C * ‖x‖


theorem modEq_digits_sum (b b' : ℕ) (h : b' % b = 1) (n : ℕ) : n ≡ (digits b' n).sum [MOD b]


/-- The list version of `add_tsub_cancel_of_le` for multisets. -/
theorem subperm_append_diff_self_of_count_le {l₁ l₂ : List α}
    (h : ∀ x ∈ l₁, count x l₁ ≤ count x l₂) : l₁ ++ l₂.diff l₁ ~ l₂

(h : ∀ (x : α), x ∈ l₁ → List.count x l₁ ≤ List.count x l₂)


@[simp]
theorem stepSet_empty (a : α) : M.stepSet ∅ a = ∅

{α : Type u}
{σ : Type v}
(M : NFA α σ)
(a : α)


lemma AnalyticWithinAt.contDiffWithinAt [CompleteSpace F] {f : E → F} {s : Set E} {x : E}
    (h : AnalyticWithinAt 𝕜 f s x) {n : ℕ∞} : ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{s : Set E}
{x : E}
(h : AnalyticWithinAt 𝕜 f s x)
{n : ℕ∞}


lemma weightSpaceChain_def :
    weightSpaceChain M χ₁ χ₂ p q = ⨆ k ∈ Ioo p q, weightSpace M (k • χ₁ + χ₂)

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(M : Type u_3)
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
(χ₁ χ₂ : L → R)
(p q : ℤ)

LieModule.weightSpaceChain M χ₁ χ₂ p q = ⨆ k ∈ Set.Ioo p q, LieModule.weightSpace M (k • χ₁ + χ₂)


/-- `choose n 2` is the `n`-th triangle number. -/
theorem choose_two_right (n : ℕ) : choose n 2 = n * (n - 1) / 2


@[simp]
theorem toFinsupp_smul {S : Type*} [SMulZeroClass S R] (a : S) (b : R[X]) :
    (a • b).toFinsupp = a • b.toFinsupp

{R : Type u}
[Semiring R]
{S : Type u_1}
[SMulZeroClass S R]
(a : S)
(b : R[X])


theorem not_mem_sdiff_of_mem_right (h : a ∈ t) : a ∉ s \ t

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


@[simp]
theorem edgeSet_inf : (G₁ ⊓ G₂).edgeSet = G₁.edgeSet ∩ G₂.edgeSet


theorem Ioo_pred_left_of_not_isMin (ha : ¬IsMin a) : Ioo (pred a) b = Ico a b

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a b : α}
(ha : ¬IsMin a)


protected theorem eq_zero_of_ediv_eq_zero {d n : Int} (h : d ∣ n) (H : n / d = 0) : n = 0


@[simp]
theorem Subalgebra.rank_bot : Module.rank F (⊥ : Subalgebra F E) = 1

{F : Type u_2}
{E : Type u_3}
[CommRing F]
[Ring E]
[Algebra F E]
[StrongRankCondition F]
[NoZeroSMulDivisors F E]
[Nontrivial E]


protected theorem Monotone.antivary (hf : Monotone f) (hg : Antitone g) : Antivary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
[LinearOrder ι]
(hf : Monotone f)
(hg : Antitone g)


@[simp]
theorem Ideal.sInf_minimalPrimes : sInf I.minimalPrimes = I.radical

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}


theorem Perm.subtypeCongr.apply (a : ε) : ep.subtypeCongr en a =
    if h : p a then (ep ⟨a, h⟩ : ε) else en ⟨a, h⟩

{ε : Type u_1}
{p : ε → Prop}
[DecidablePred p]
(ep : Equiv.Perm { a // p a })
(en : Equiv.Perm { a // ¬p a })
(a : ε)

(ep.subtypeCongr en) a = if h : p a then ↑(ep ⟨a, h⟩) else ↑(en ⟨a, h⟩)


protected theorem congr_arg (f : α →ᵈ β) {x y : α} (h : x = y) : f x = f y

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(f : α →ᵈ β)
{x y : α}
(h : x = y)


/-- If `F` is cofinal,
the category of cocones on `F ⋙ G` is equivalent to the category of cocones on `G`,
for any `G : D ⥤ E`.
-/
@[simps]
def coconesEquiv : Cocone (F ⋙ G) ≌ Cocone G

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

(CategoryTheory.Functor.Final.coconesEquiv F G).inverse = CategoryTheory.Limits.Cocones.whiskering F


@[simp] lemma iterate_eq_pow (f : Perm α) (n : ℕ) : f^[n] = ⇑(f ^ n)


theorem Codisjoint.of_codisjoint_sup_of_le (h : Codisjoint (a ⊔ b) c) (hle : c ≤ a) :
    Codisjoint a b

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b c : α}
(h : Codisjoint (a ⊔ b) c)
(hle : c ≤ a)


@[to_additive]
theorem ker_prodMap {G' : Type*} {N' : Type*} [Group G'] [Group N'] (f : G →* N) (g : G' →* N') :
    (prodMap f g).ker = f.ker.prod g.ker

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


@[simp]
theorem linMulLin_compLeft (l : M →ₗ[R] M) :
    (linMulLin f g).compLeft l = linMulLin (f.comp l) g

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

(LinearMap.BilinForm.linMulLin f g).compLeft l = LinearMap.BilinForm.linMulLin (f ∘ₗ l) g


theorem integral_sin_pow_even :
    (∫ x in (0)..π, sin x ^ (2 * n)) = π * ∏ i ∈ range n, (2 * (i : ℝ) + 1) / (2 * i + 2)

∫ (x : ℝ) in 0 ..π, Real.sin x ^ (2 * n) = π * ∏ i ∈ Finset.range n, (2 * ↑i + 1) / (2 * ↑i + 2)


theorem Finite.isField_of_domain (R) [CommRing R] [IsDomain R] [Finite R] : IsField R

(R : Type u_3)
[CommRing R]
[IsDomain R]
[Finite R]


theorem eq_of_quickCmp {k k' : BuildKey}  :
quickCmp k k' = Ordering.eq → k = k'


@[simp]
theorem upperCrossingTime_zero : upperCrossingTime a b f N 0 = ⊥

{Ω : Type u_1}
{ι : Type u_2}
[Preorder ι]
[OrderBot ι]
[InfSet ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}

MeasureTheory.upperCrossingTime a b f N 0 = ⊥


@[to_additive]
theorem finprod_mem_inter_mul_diff (t : Set α) (h : s.Finite) :
    ((∏ᶠ i ∈ s ∩ t, f i) * ∏ᶠ i ∈ s \ t, f i) = ∏ᶠ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{s : Set α}
(t : Set α)
(h : s.Finite)

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


@[simp]
theorem natSepDegree_one : (1 : F[X]).natSepDegree = 0


@[to_additive zero_nsmul, simp]
theorem pow_zero (a : M) : a ^ 0 = 1


theorem mem_idealOfSet {s : Set X} {f : C(X, R)} :
    f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
{s : Set X}
{f : C(X, R)}

f ∈ ContinuousMap.idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0


theorem unitsSMul_neg (u : ℤˣ) (w : NormalWord d) :
    unitsSMul φ (-u) (unitsSMul φ u w) = w

{d : HNNExtension.NormalWord.TransversalPair G A B}

HNNExtension.NormalWord.unitsSMul φ (-u) (HNNExtension.NormalWord.unitsSMul φ u w) = w


theorem neg_units_smul (u : Rˣ) (v : Module.Ray R M) : -u • v = -(u • v)

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(u : Rˣ)
(v : Module.Ray R M)


lemma setIntegral_condKernel (a : α) {s : Set β} (hs : MeasurableSet s)
    {t : Set Ω} (ht : MeasurableSet t) (hf : IntegrableOn f (s ×ˢ t) (κ a)) :
    ∫ b in s, ∫ ω in t, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a)
      = ∫ x in s ×ˢ t, f x ∂(κ a)

{κ : ProbabilityTheory.Kernel α (β × Ω)}

(hf : MeasureTheory.IntegrableOn f (s ×ˢ t) (κ a))

∫ (b : β) in s, ∫ (ω : Ω) in t, f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫ (x : β × Ω) in s ×ˢ t, f x ∂κ a


@[to_additive]
theorem unop_surjective : Surjective (unop : αᵐᵒᵖ → α)


theorem mem_iff_append {a : α} {l : List α} : a ∈ l ↔ ∃ s t : List α, l = s ++ a :: t


lemma Module.FinitePresentation.fg_ker_iff [Module.FinitePresentation R M]
    (l : M →ₗ[R] N) (hl : Function.Surjective l) :
    Submodule.FG (LinearMap.ker l) ↔ Module.FinitePresentation R N

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[Module.FinitePresentation R M]
(l : M →ₗ[R] N)
(hl : Function.Surjective ⇑l)

(LinearMap.ker l).FG ↔ Module.FinitePresentation R N


theorem descFactorial_eq_prod_range (n : ℕ) : ∀ k, n.descFactorial k = ∏ i ∈ range k, (n - i)

n.descFactorial k = ∏ i ∈ Finset.range k, (n - i)


@[fun_prop]
protected nonrec theorem HasFDerivWithinAt.snd (h : HasFDerivWithinAt f₂ f₂' s x) :
    HasFDerivWithinAt (fun x => (f₂ x).2) ((snd 𝕜 F G).comp f₂') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{s : Set E}
{f₂ : E → F × G}
{f₂' : E →L[𝕜] F × G}
(h : HasFDerivWithinAt f₂ f₂' s x)

HasFDerivWithinAt (fun x => (f₂ x).2) ((ContinuousLinearMap.snd 𝕜 F G).comp f₂') s x


/-- A seminorm on a ring `R` is a function `f : R → ℝ` that preserves zero, takes nonnegative
  values, is subadditive and submultiplicative and such that `f (-x) = f x` for all `x ∈ R`. -/
structure RingSeminorm (R : Type*) [NonUnitalNonAssocRing R] extends AddGroupSeminorm R where
  /-- The property of a `RingSeminorm` that for all `x` and `y` in the ring, the norm of `x * y` is
    less than the norm of `x` times the norm of `y`. -/
  mul_le' : ∀ x y : R, toFun (x * y) ≤ toFun x * toFun y

{R : Type u_4}
[NonUnitalNonAssocRing R]
(self : RingSeminorm R)
(x y : R)

self.toFun (x * y) ≤ self.toFun x * self.toFun y


theorem nil_lt_cons [LT α] (a : α) (l : List α) : [] < a :: l

{α : Type u}
[LT α]
(a : α)
(l : List α)


@[simp]
theorem braiding_inv_apply {X Y : Type u} {x : X} {y : Y} :
    ((β_ X Y).inv : Y ⊗ X → X ⊗ Y) (y, x) = (x, y)


theorem degree_le (G' : Subgraph G) (v : V) [Fintype (G'.neighborSet v)]
    [Fintype (G.neighborSet v)] : G'.degree v ≤ G.degree v

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(v : V)
[Fintype ↑(G'.neighborSet v)]
[Fintype ↑(G.neighborSet v)]


lemma IsRatCondKernelCDF.iInf_rat_gt_eq (hf : IsRatCondKernelCDF f κ ν) (a : α) :
    ∀ᵐ b ∂(ν a), ∀ q, ⨅ r : Ioi q, f (a, b) r = f (a, b) q

{κ : ProbabilityTheory.Kernel α (β × ℝ)}

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

∀ᵐ (b : β) ∂ν a, ∀ (q : ℚ), ⨅ r, f (a, b) ↑r = f (a, b) q


private lemma coroot_eq_coreflection_of_root_eq_of_span_eq_top [CharZero R] [NoZeroSMulDivisors R M]
    (p : PerfectPairing R M N)
    (root : ι ↪ M)
    (coroot : ι ↪ N)
    (hp : ∀ i, p.toLin (root i) (coroot i) = 2)
    (hs : ∀ i, MapsTo (preReflection (root i) (p.toLin.flip (coroot i))) (range root) (range root))
    (hsp : span R (range root) = ⊤)
    {i j k : ι} (hk : root k = preReflection (root i) (p.toLin.flip (coroot i)) (root j)) :
    coroot k = preReflection (coroot i) (p.toLin (root i)) (coroot j)

(hp : ∀ (i : ι), (p.toLin (root i)) (coroot i) = 2)

(hs :
  ∀ (i : ι),
    Set.MapsTo (⇑(Module.preReflection (root i) (p.toLin.flip (coroot i)))) (Set.range ⇑root) (Set.range ⇑root))

(hsp : Submodule.span R (Set.range ⇑root) = ⊤)

(hk : root k = (Module.preReflection (root i) (p.toLin.flip (coroot i))) (root j))

coroot k = (Module.preReflection (coroot i) (p.toLin (root i))) (coroot j)


protected theorem _root_.FilterBasis.hasBasis (B : FilterBasis α) :
    HasBasis B.filter (fun s : Set α => s ∈ B) id


theorem coeff_X_of_ne_one {n : ℕ} (hn : n ≠ 1) : coeff (X : R[X]) n = 0

{R : Type u}
[Semiring R]
{n : ℕ}
(hn : n ≠ 1)


/-- The closed thickening with radius zero is the closure of the set. -/
@[simp]
theorem cthickening_zero (E : Set α) : cthickening 0 E = closure E

{α : Type u}
[PseudoEMetricSpace α]
(E : Set α)


/-- The definition of the "one" in the colimit is independent of the chosen object of `J`.
In particular, this lemma allows us to "unfold" the definition of `colimit_one` at a custom chosen
object `j`.
-/
@[to_additive
      "The definition of the \"zero\" in the colimit is independent of the chosen object
      of `J`. In particular, this lemma allows us to \"unfold\" the definition of `colimit_zero` at
      a custom chosen object `j`."]
theorem colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ MonCatMax)
[CategoryTheory.IsFiltered J]
(j : J)

1 = MonCat.FilteredColimits.M.mk F ⟨j, 1⟩


theorem Integrable.bdd_mul' {f g : α → 𝕜} {c : ℝ} (hg : Integrable g μ)
    (hf : AEStronglyMeasurable f μ) (hf_bound : ∀ᵐ x ∂μ, ‖f x‖ ≤ c) :
    Integrable (fun x => f x * g x) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.Integrable (fun x => f x * g x) μ


@[to_additive]
theorem mulRothNumber_lt_of_forall_not_threeGPFree
    (h : ∀ t ∈ powersetCard n s, ¬ThreeGPFree ((t : Finset α) : Set α)) :
    mulRothNumber s < n

(h : ∀ t ∈ Finset.powersetCard n s, ¬ThreeAPFree ↑t)


/-- See also `continuousAt_cpow` and `Complex.continuousAt_cpow_of_re_pos`. -/
theorem continuousAt_cpow_zero_of_re_pos {z : ℂ} (hz : 0 < z.re) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) (0, z)

ContinuousAt (fun x => x.1 ^ x.2) (0, z)


theorem Pairwise.iff_of_mem {S : α → α → Prop} {l : List α}
    (H : ∀ {a b}, a ∈ l → b ∈ l → (R a b ↔ S a b)) : Pairwise R l ↔ Pairwise S l

(H : ∀ {a b : α}, a ∈ l → b ∈ l → (R a b ↔ S a b))


/-- Given two sets `s, t` in a Hausdorff normal σ-compact finite-dimensional manifold `M`
with `s` open and `s ⊆ interior t`, there is a smooth function `f : M → [0,1]` which is equal to `s`
in a neighbourhood of `s` and has support contained in `t`. -/
theorem exists_smooth_one_nhds_of_subset_interior [T2Space M] [NormalSpace M] [SigmaCompactSpace M]
    {s t : Set M} (hs : IsClosed s) (hd : s ⊆ interior t) :
    ∃ f : C^∞⟮I, M; 𝓘(ℝ), ℝ⟯, (∀ᶠ x in 𝓝ˢ s, f x = 1) ∧ (∀ x ∉ t, f x = 0) ∧
      ∀ x, f x ∈ Icc 0 1

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[T2Space M]
[NormalSpace M]
[SigmaCompactSpace M]
{s t : Set M}
(hs : IsClosed s)
(hd : s ⊆ interior t)

∃ f, (∀ᶠ (x : M) in 𝓝ˢ s, f x = 1) ∧ (∀ x ∉ t, f x = 0) ∧ ∀ (x : M), f x ∈ Set.Icc 0 1


@[to_additive (attr := simp) sub_neg "For `a - -b = a + b`, see `sub_neg_eq_add`."]
theorem div_lt_one' : a / b < 1 ↔ a < b

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


@[simp]
theorem leftZigzagIso_inv : (leftZigzagIso η ε).inv = rightZigzag ε.inv η.inv

(η : CategoryTheory.CategoryStruct.id a ≅ CategoryTheory.CategoryStruct.comp f g)

(ε : CategoryTheory.CategoryStruct.comp g f ≅ CategoryTheory.CategoryStruct.id b)

(CategoryTheory.Bicategory.leftZigzagIso η ε).inv = CategoryTheory.Bicategory.rightZigzag ε.inv η.inv


theorem nth_strictMonoOn (hf : (setOf p).Finite) :
    StrictMonoOn (nth p) (Set.Iio hf.toFinset.card)

StrictMonoOn (Nat.nth p) (Set.Iio hf.toFinset.card)


@[simp]
theorem ofReal_cot_ofReal_re (x : ℝ) : ((cot x).re : ℂ) = cot x


/-- If the domain has dimension one, then Fréchet derivative is equivalent to the classical
definition with a limit. In this version we have to take the limit along the subset `-{x}`,
because for `y=x` the slope equals zero due to the convention `0⁻¹=0`. -/
theorem hasDerivAtFilter_iff_tendsto_slope {x : 𝕜} {L : Filter 𝕜} :
    HasDerivAtFilter f f' x L ↔ Tendsto (slope f x) (L ⊓ 𝓟 {x}ᶜ) (𝓝 f')

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

HasDerivAtFilter f f' x L ↔ Filter.Tendsto (slope f x) (L ⊓ 𝓟 {x}ᶜ) (𝓝 f')


theorem ediv_eq_zero_of_lt_abs {a b : ℤ} (H1 : 0 ≤ a) (H2 : a < |b|) : a / b = 0


lemma even_xor'_odd' (n : ℤ) : ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)


@[simp] lemma powersetCard_card_add (s : Finset α) (hn : 0 < n) :
    s.powersetCard (s.card + n) = ∅

{α : Type u_1}
{n : ℕ}
(s : Finset α)
(hn : 0 < n)


@[simp] lemma eraseLead_C_mul_X (r : R) : eraseLead (C r * X) = 0

(Polynomial.C r * Polynomial.X).eraseLead = 0


@[to_additive]
theorem injective_of_trivial_ker {f : G → H} (hf : IsGroupHom f) (h : ker f = trivial G) :
    Function.Injective f

(h : IsGroupHom.ker f = IsSubgroup.trivial G)


@[simp]
theorem lift_of (x : α) : lift f (of x) = f x

{α : Type u}
{R : Type v}
[CommRing R]
(f : α → R)
(x : α)

(FreeCommRing.lift f) (FreeCommRing.of x) = f x


/-- The range of a surjective monoid hom is the whole of the codomain. -/
@[to_additive (attr := simp)
  "The range of a surjective `AddMonoid` hom is the whole of the codomain."]
theorem mrange_top_of_surjective (f : F) (hf : Function.Surjective f) :
    mrange f = (⊤ : Submonoid N)

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_5}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
(f : F)
(hf : Function.Surjective ⇑f)


theorem gcd_mono (h : s₁ ⊆ s₂) : s₂.gcd f ∣ s₁.gcd f

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s₁ s₂ : Finset β}
{f : β → α}
(h : s₁ ⊆ s₂)


theorem rank_le_card_width [StrongRankCondition R] (A : Matrix m n R) :
    A.rank ≤ Fintype.card n

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[CommRing R]
[StrongRankCondition R]
(A : Matrix m n R)


theorem RelIso.image_eq_preimage_symm (e : r ≃r s) (t : Set α) : e '' t = e.symm ⁻¹' t

{α : Type u_5}
{β : Type u_6}
{r : α → α → Prop}
{s : β → β → Prop}
(e : r ≃r s)
(t : Set α)


@[simp] lemma mem_mk {s : Set α} {x h} : x ∈ mk s h ↔ x ∈ s

{α : Type u_2}
[TopologicalSpace α]
{s : Set α}
{x : α}
{h : IsClopen s}

x ∈ { carrier := s, isClopen' := h } ↔ x ∈ s


@[simp]
theorem Iio_diff_Iio : Iio b \ Iio a = Ico a b

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


theorem conjugate_nonneg {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ star c * a * c

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{a : R}
(ha : 0 ≤ a)
(c : R)


@[simp]
theorem none_orElse' (x : Option α) : none.orElse (fun _ ↦ x) = x


theorem bsup_eq_blsub_or_succ_bsup_eq_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    bsup.{_, v} o f = blsub.{_, v} o f ∨ succ (bsup.{_, v} o f) = blsub.{_, v} o f

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

o.bsup f = o.blsub f ∨ Order.succ (o.bsup f) = o.blsub f


protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
    IdentDistrib (u ∘ f) (u ∘ g) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (u ∘ f) (u ∘ g) μ ν


@[simp]
theorem coe_smul (f : CuspForm Γ k) (n : α) : ⇑(n • f) = n • ⇑f

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
{α : Type u_2}
[SMul α ℂ]
[IsScalarTower α ℂ ℂ]
(f : CuspForm Γ k)
(n : α)


/-- A linear equivalence which preserves a finite spanning set must have finite order. -/
lemma LinearEquiv.isOfFinOrder_of_finite_of_span_eq_top_of_mapsTo
    {R M : Type*} [CommSemiring R] [AddCommMonoid M] [Module R M]
    {Φ : Set M} (hΦ₁ : Φ.Finite) (hΦ₂ : span R Φ = ⊤) {e : M ≃ₗ[R] M} (he : MapsTo e Φ Φ) :
    IsOfFinOrder e

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{Φ : Set M}
(hΦ₁ : Φ.Finite)
(hΦ₂ : Submodule.span R Φ = ⊤)
{e : M ≃ₗ[R] M}
(he : Set.MapsTo (⇑e) Φ Φ)


/-- The order of the product of two formal power series over an integral domain
 is the sum of their orders. -/
theorem order_mul (φ ψ : R⟦X⟧) : order (φ * ψ) = order φ + order ψ

{R : Type u_1}
[CommRing R]
[IsDomain R]
(φ ψ : PowerSeries R)


/-- The minimal distance to a set is uniformly continuous in point -/
theorem uniformContinuous_infDist_pt : UniformContinuous (infDist · s)

{α : Type u}
[PseudoMetricSpace α]
(s : Set α)

UniformContinuous fun x => Metric.infDist x s


theorem eq_zero_of_mono_cokernel [Mono (cokernel.π f)] : f = 0


theorem inclusion_apply (m : N) : inclusion h m = ⟨m.1, h m.2⟩

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{N N' : LieSubmodule R L M}
(h : N ≤ N')
(m : ↥N)


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


theorem testBit_mul_two_pow_add_eq (a b i : Nat) :
    testBit (2^i*a + b) i = Bool.xor (a%2 = 1) (testBit b i)

(2 ^ i * a + b).testBit i = (decide (a % 2 = 1)).xor (b.testBit i)


theorem smooth_zeroSection : Smooth IB (IB.prod 𝓘(𝕜, F)) (zeroSection F E)

[TopologicalSpace (Bundle.TotalSpace F E)]

Smooth IB (IB.prod 𝓘(𝕜, F)) (Bundle.zeroSection F E)


@[measurability]
theorem Measurable.cexp : Measurable fun x => Complex.exp (f x)

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℂ}
(hf : Measurable f)


/-- An ideal is maximal if it is maximal in the collection of proper ideals.

Note that `IsCoatom` is less general because ideals only have a top element when `P` is directed
and nonempty. -/
@[mk_iff]
class IsMaximal (I : Ideal P) extends IsProper I : Prop where
  /-- This ideal is maximal in the collection of proper ideals. -/
  maximal_proper : ∀ ⦃J : Ideal P⦄, I < J → (J : Set P) = univ

{P : Type u_1}
[LE P]
(I : Order.Ideal P)

I.IsMaximal ↔ I.IsProper ∧ ∀ ⦃J : Order.Ideal P⦄, I < J → ↑J = Set.univ


/-- Given a 1-hypercover `E : J.OneHypercover X` of an object of `C`, a functor `F : C ⥤ D`
such that `E.IsPreversedBy F K` for a Grothendieck topology `K` on `D`, this is
the image of `E` by `F`, as a 1-hypercover of `F.obj X` for `K`. -/
@[simps toPreOneHypercover]
def map (F : C ⥤ D) (K : GrothendieckTopology D) [E.IsPreservedBy F K] :
    K.OneHypercover (F.obj X)

{J : CategoryTheory.GrothendieckTopology C}

(K : CategoryTheory.GrothendieckTopology D)

(E.map F K).toPreOneHypercover = E.map F


/-- If `B/K` is a nontrivial algebra over a field, and `x` is an element of `K`,
then the minimal polynomial of `algebraMap K B x` is `X - C x`. -/
theorem eq_X_sub_C (a : A) : minpoly A (algebraMap A B a) = X - C a

{A : Type u_1}
(B : Type u_2)
[Field A]
[Ring B]
[Algebra A B]
[Nontrivial B]
(a : A)

minpoly A ((algebraMap A B) a) = Polynomial.X - Polynomial.C a


@[to_additive (attr := simp)]
theorem inv_bind (f : α → FreeGroup β) (x : FreeGroup α) : x⁻¹ >>= f = (x >>= f)⁻¹

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


theorem List.lt_irrefl [LT α] (irrefl_α : ∀ a : α, ¬ a < a)
: (a : List α) → ¬ a < a

{α : Type u_1}
[LT α]
(irrefl_α : ∀ (a : α), ¬a < a)
(a : List α)


theorem abs_tendsto_atTop (hdeg : 0 < P.degree) :
    Tendsto (fun x => abs <| eval x P) atTop atTop

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
(P : 𝕜[X])
[OrderTopology 𝕜]
(hdeg : 0 < P.degree)

Filter.Tendsto (fun x => |Polynomial.eval x P|) Filter.atTop Filter.atTop


/-- A ring homomorphism `R →+* S` induces `Perfection R p →+* Perfection S p`. -/
@[simps]
def map (φ : R →+* S) : Ring.Perfection R p →+* Ring.Perfection S p

{R : Type u₁}
[CommSemiring R]
(p : ℕ)
[hp : Fact (Nat.Prime p)]
[CharP R p]
{S : Type u₂}
[CommSemiring S]
[CharP S p]
(φ : R →+* S)
(f : Ring.Perfection R p)
(n : ℕ)

↑((Perfection.map p φ) f) n = φ ((Perfection.coeff R p n) f)


theorem eq_of_dist_eq_zero {n m : ℕ} (h : dist n m = 0) : n = m


@[simp] theorem UInt16.toUInt8_toNat (x : UInt16) : x.toUInt8.toNat = x.toNat % 2 ^ 8


@[simp]
theorem getElem?_indexOf [DecidableEq α] {a : α} {l : List α} (h : a ∈ l) :
    l[indexOf a l]? = some a

{α : Type u}
[DecidableEq α]
{a : α}
{l : List α}
(h : a ∈ l)


@[simp] lemma maxGenEigenSpace_toEnd_eq_top [IsNilpotent R L M] (x : L) :
    ((toEnd R L M x).maxGenEigenspace 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]
[LieModule.IsNilpotent R L M]
(x : L)

((LieModule.toEnd R L M) x).maxGenEigenspace 0 = ⊤


theorem nonuniformWitness_subset (h : ¬G.IsUniform ε s t) : G.nonuniformWitness ε s t ⊆ s

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
(G : SimpleGraph α)
[DecidableRel G.Adj]
{ε : 𝕜}
{s t : Finset α}
(h : ¬G.IsUniform ε s t)


lemma Algebra.IsSeparable.of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [Field A₁] [Field B₁]
    [Field A₂] [Field B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁))
    [Algebra.IsSeparable A₁ B₁] : Algebra.IsSeparable A₂ B₂

(he : (algebraMap A₂ B₂).comp ↑e₁ = (↑e₂).comp (algebraMap A₁ B₁))


/-- In a non-trivial ring, the element `0` is not right-regular -- with typeclasses. -/
theorem not_isRightRegular_zero [nR : Nontrivial R] : ¬IsRightRegular (0 : R)

{R : Type u_1}
[MulZeroClass R]
[nR : Nontrivial R]


theorem ae_restrict_iff' {p : α → Prop} (hs : MeasurableSet s) :
    (∀ᵐ x ∂μ.restrict s, p x) ↔ ∀ᵐ x ∂μ, x ∈ s → p x

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{p : α → Prop}
(hs : MeasurableSet s)

(∀ᵐ (x : α) ∂μ.restrict s, p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ s → p x


theorem le_prod_iff {p₁ : Submodule R M} {p₂ : Submodule R M₂} {q : Submodule R (M × M₂)} :
    q ≤ p₁.prod p₂ ↔ map (LinearMap.fst R M M₂) q ≤ p₁ ∧ map (LinearMap.snd R M M₂) q ≤ p₂

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
{p₁ : Submodule R M}
{p₂ : Submodule R M₂}
{q : Submodule R (M × M₂)}

q ≤ p₁.prod p₂ ↔ Submodule.map (LinearMap.fst R M M₂) q ≤ p₁ ∧ Submodule.map (LinearMap.snd R M M₂) q ≤ p₂


@[simp] theorem forM_eq [Monad m] (f : α → β → m PUnit) (l) :
    forM f l = l.toList.forM (fun (a, b) => f a b)

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_4}
[Monad m]
(f : α → β → m PUnit)
(l : Batteries.AssocList α β)

Batteries.AssocList.forM f l =
  l.toList.forM fun x =>
    match x with
    | (a, b) => f a b


@[simp]
theorem le_inf_iff : a ≤ b ⊓ c ↔ a ≤ b ∧ a ≤ c

{α : Type u}
[SemilatticeInf α]
{a b c : α}


theorem integrableOn_Ioi_comp_mul_right_iff (f : ℝ → E) (c : ℝ) {a : ℝ} (ha : 0 < a) :
    IntegrableOn (fun x => f (x * a)) (Ioi c) ↔ IntegrableOn f (Ioi <| c * a)

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

MeasureTheory.IntegrableOn (fun x => f (x * a)) (Set.Ioi c) MeasureTheory.volume ↔
  MeasureTheory.IntegrableOn f (Set.Ioi (c * a)) MeasureTheory.volume


theorem algebraMap_succ (n : ℕ) (f : K[X]) :
    algebraMap K (SplittingFieldAux (n + 1) f) =
      (algebraMap (AdjoinRoot f.factor) (SplittingFieldAux n f.removeFactor)).comp
        (AdjoinRoot.of f.factor)

{K : Type v}
[Field K]
(n : ℕ)
(f : K[X])

algebraMap K (Polynomial.SplittingFieldAux (n + 1) f) =
  (algebraMap (AdjoinRoot f.factor) (Polynomial.SplittingFieldAux n f.removeFactor)).comp (AdjoinRoot.of f.factor)


@[simp]
theorem midpoint_pointReflection_right (x y : P) :
    midpoint R y (Equiv.pointReflection x y) = x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x y : P)

midpoint R y ((Equiv.pointReflection x) y) = x


@[simp]
lemma mem_quasiIso_iff [CategoryWithHomology C] (f : K ⟶ L) : quasiIso C c f ↔ QuasiIso f

HomologicalComplex.quasiIso C c f ↔ QuasiIso f


theorem nth_eq_orderEmbOfFin (hf : (setOf p).Finite) {n : ℕ} (hn : n < hf.toFinset.card) :
    nth p n = hf.toFinset.orderEmbOfFin rfl ⟨n, hn⟩

{p : ℕ → Prop}
(hf : (setOf p).Finite)
{n : ℕ}
(hn : n < hf.toFinset.card)

Nat.nth p n = (hf.toFinset.orderEmbOfFin ⋯) ⟨n, hn⟩


/-- For every open cover of a Lindelöf set, there exists a countable subcover. -/
theorem IsLindelof.elim_countable_subcover_image {b : Set ι} {c : ι → Set X} (hs : IsLindelof s)
    (hc₁ : ∀ i ∈ b, IsOpen (c i)) (hc₂ : s ⊆ ⋃ i ∈ b, c i) :
    ∃ b', b' ⊆ b ∧ Set.Countable b' ∧ s ⊆ ⋃ i ∈ b', c i

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
{s : Set X}
{b : Set ι}
{c : ι → Set X}
(hs : IsLindelof s)
(hc₁ : ∀ i ∈ b, IsOpen (c i))
(hc₂ : s ⊆ ⋃ i ∈ b, c i)

∃ b' ⊆ b, b'.Countable ∧ s ⊆ ⋃ i ∈ b', c i


theorem ContMDiffOn.prod_map (hf : ContMDiffOn I I' n f s) (hg : ContMDiffOn J J' n g r) :
    ContMDiffOn (I.prod J) (I'.prod J') n (Prod.map f g) (s ×ˢ r)

{𝕜 : 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 : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{f : M → M'}
{s : Set M}
{n : ℕ∞}
{g : N → N'}
{r : Set N}
(hf : ContMDiffOn I I' n f s)
(hg : ContMDiffOn J J' n g r)


theorem ex_of_psig {α : Sort u} {p : α → Prop} : (Σ' x, p x) → ∃ x, p x


lemma primitive_mul_isPrimitive {m : ℕ} (ψ : DirichletCharacter R m) :
    IsPrimitive (primitive_mul χ ψ)

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)
{m : ℕ}
(ψ : DirichletCharacter R m)


@[to_additive (attr := simp)]
theorem eventually_one {p : α → Prop} : (∀ᶠ x in 1, p x) ↔ p 1


@[simp]
theorem eval_X : ∀ n, eval f (X n) = f n

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{f : σ → R}
(n : σ)

(MvPolynomial.eval f) (MvPolynomial.X n) = f n


theorem LinearIndependent.option (hv : LinearIndependent K v)
    (hx : x ∉ Submodule.span K (range v)) :
    LinearIndependent K (fun o => Option.casesOn' o x v : Option ι → V)

(hx : x ∉ Submodule.span K (Set.range v))

LinearIndependent K fun o => o.casesOn' x v


/-- The truncated cast `ENNReal.truncateToReal t : ℝ≥0∞ → ℝ` is continuous when `t ≠ ∞`. -/
lemma continuous_truncateToReal {t : ℝ≥0∞} (t_ne_top : t ≠ ∞) : Continuous (truncateToReal t)


/-- A functor that preserves the pullbacks of `f i j` and `f i k` can map a family of glue data. -/
@[simps]
def mapGlueData : GlueData C'

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


theorem natDegree_not_mem_eraseLead_support : f.natDegree ∉ (eraseLead f).support


/-- The distance between `p₁` and the reflection of `p₂` equals that
between the reflection of `p₁` and `p₂`. -/
theorem dist_reflection (s : AffineSubspace ℝ P) [Nonempty s] [HasOrthogonalProjection s.direction]
    (p₁ p₂ : P) : dist p₁ (reflection s p₂) = dist (reflection s p₁) p₂

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : AffineSubspace ℝ P)
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
(p₁ p₂ : P)

dist p₁ ((EuclideanGeometry.reflection s) p₂) = dist ((EuclideanGeometry.reflection s) p₁) p₂


/-- A ring of sets `C` is a family of sets containing `∅`, stable by union and set difference.
It is then also stable by intersection (see `IsSetRing.inter_mem`). -/
structure IsSetRing (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  union_mem ⦃s t⦄ : s ∈ C → t ∈ C → s ∪ t ∈ C
  diff_mem ⦃s t⦄ : s ∈ C → t ∈ C → s \ t ∈ C

{α : Type u_1}
{C : Set (Set α)}
(self : MeasureTheory.IsSetRing C)
⦃s t : Set α⦄


private theorem one_smul' [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M]
    (x : ⨁ i, M i) :
    (1 : ⨁ i, A i) • x = x

{ιA : Type u_1}
{ιB : Type u_2}
(A : ιA → Type u_3)
(M : ιB → Type u_4)
[AddMonoid ιA]
[VAdd ιA ιB]
[(i : ιA) → AddCommMonoid (A i)]
[(i : ιB) → AddCommMonoid (M i)]
[DecidableEq ιA]
[DecidableEq ιB]
[GradedMonoid.GMonoid A]
[DirectSum.Gmodule A M]
(x : ⨁ (i : ιB), M i)


/-- `LocallyConstant.comap` as an `AlgHom` -/
@[simps!]
def comapₐ (R : Type*) [CommSemiring R] [Semiring Z] [Algebra R Z]
    (f : C(X, Y)) : LocallyConstant Y Z →ₐ[R] LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{Z : Type u_6}
(R : Type u_7)
[CommSemiring R]
[Semiring Z]
[Algebra R Z]
(f : C(X, Y))
(g : LocallyConstant Y Z)

∀ (a : X), ((LocallyConstant.comapₐ R f) g) a = g (f a)


/-- The negative of a finite adèle is a finite adèle. -/
theorem neg {x : K_hat R K} (hx : x.IsFiniteAdele) : (-x).IsFiniteAdele

{x : DedekindDomain.ProdAdicCompletions R K}


theorem neg_one (p : ℕ) [Nontrivial R] [h : CharP R p] (hp : p ≠ 2) :
    IsPrimitiveRoot (-1 : R) 2

{R : Type u_4}
[CommRing R]
(p : ℕ)
[Nontrivial R]
[h : CharP R p]
(hp : p ≠ 2)


protected theorem Tendsto.div {f : Filter α} {ma : α → ℝ≥0∞} {mb : α → ℝ≥0∞} {a b : ℝ≥0∞}
    (hma : Tendsto ma f (𝓝 a)) (ha : a ≠ 0 ∨ b ≠ 0) (hmb : Tendsto mb f (𝓝 b))
    (hb : b ≠ ∞ ∨ a ≠ ∞) : Tendsto (fun a => ma a / mb a) f (𝓝 (a / b))

{α : Type u_1}
{f : Filter α}
{ma mb : α → ℝ≥0∞}
{a b : ℝ≥0∞}
(hma : Filter.Tendsto ma f (𝓝 a))
(ha : a ≠ 0 ∨ b ≠ 0)
(hmb : Filter.Tendsto mb f (𝓝 b))
(hb : b ≠ ⊤ ∨ a ≠ ⊤)

Filter.Tendsto (fun a => ma a / mb a) f (𝓝 (a / b))


/-- Hard part of FTC-2 for integrable derivatives, real-valued functions: one has
`g b - g a ≤ ∫ y in a..b, g' y` when `g'` is integrable.
Auxiliary lemma in the proof of `integral_eq_sub_of_hasDeriv_right_of_le`.
We give the slightly more general version that `g b - g a ≤ ∫ y in a..b, φ y` when `g' ≤ φ` and
`φ` is integrable (even if `g'` is not known to be integrable).
Version assuming that `g` is differentiable on `[a, b)`. -/
theorem sub_le_integral_of_hasDeriv_right_of_le_Ico (hab : a ≤ b)
    (hcont : ContinuousOn g (Icc a b)) (hderiv : ∀ x ∈ Ico a b, HasDerivWithinAt g (g' x) (Ioi x) x)
    (φint : IntegrableOn φ (Icc a b)) (hφg : ∀ x ∈ Ico a b, g' x ≤ φ x) :
    g b - g a ≤ ∫ y in a..b, φ y

(hderiv : ∀ x ∈ Set.Ico a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x)

(φint : MeasureTheory.IntegrableOn φ (Set.Icc a b) MeasureTheory.volume)


theorem filter_image {p : β → Prop} [DecidablePred p] :
    (s.image f).filter p = (s.filter fun a ↦ p (f a)).image f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s : Finset α}
{p : β → Prop}
[DecidablePred p]

Finset.filter p (Finset.image f s) = Finset.image f (Finset.filter (fun a => p (f a)) s)


lemma dblY_of_Z_ne_zero {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    W.dblY P / W.dblZ P ^ 3 = W.toAffine.addY (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3)
      (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3))


lemma max_neg_neg (x y : EReal) : max (-x) (-y) = -min x y


@[to_additive]
theorem QuotientGroup.continuous_smul₁ (x : G ⧸ Γ) : Continuous fun g : G => g • x

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[ContinuousAdd G]
{Γ : AddSubgroup G}
(x : G ⧸ Γ)


/-- Given `w : TwoSquare T L R B`, one may obtain a 2-square `TwoSquare T L' R' B` if we
provide natural transformations `α : L ⟶ L'` and `β : R' ⟶ R`. -/
@[simps!]
def whiskerVertical (α : L ⟶ L') (β : R' ⟶ R) :
    TwoSquare T L' R' B

(w.whiskerVertical α β).app X =
  CategoryTheory.CategoryStruct.comp (β.app (T.obj X)) (CategoryTheory.CategoryStruct.comp (w.app X) (B.map (α.app X)))


/-- If `β - qα ... β ... β + rα` is the `α`-chain through `β`, then
  `β (coroot α) = q - r`. In particular, it is an integer. -/
lemma apply_coroot_eq_cast :
    β (coroot α) = (chainBotCoeff α β - chainTopCoeff α β : ℤ)

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : LieModule.Weight K (↥H) L)

β (LieAlgebra.IsKilling.coroot α) = ↑(↑(LieModule.chainBotCoeff (⇑α) β) - ↑(LieModule.chainTopCoeff (⇑α) β))


@[to_additive (attr := simp)]
theorem finite_one : (1 : Set α).Finite


lemma measurableSet_isRatStieltjesPoint (hf : Measurable f) :
    MeasurableSet {a | IsRatStieltjesPoint f a}

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℚ → ℝ}
(hf : Measurable f)

MeasurableSet {a | ProbabilityTheory.IsRatStieltjesPoint f a}


theorem Eventually.exists {p : α → Prop} {f : Filter α} [NeBot f] (hp : ∀ᶠ x in f, p x) :
    ∃ x, p x

{α : Type u}
{p : α → Prop}
{f : Filter α}
[f.NeBot]
(hp : ∀ᶠ (x : α) in f, p x)


/-- The identity affine map acts as the identity. -/
@[simp]
theorem coe_id : ⇑(id k P1) = _root_.id

(k : Type u_1)
{V1 : Type u_2}
(P1 : Type u_3)
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]


theorem NullMeasurableSet.mono_ac (h : NullMeasurableSet s μ) (hle : ν ≪ μ) :
    NullMeasurableSet s ν

(h : MeasureTheory.NullMeasurableSet s μ)


/-- `δ` is the function underlying the arithmetic function `1`. -/
lemma ArithmeticFunction.one_eq_delta : ↗(1 : ArithmeticFunction ℂ) = δ


theorem uniformEmbedding_pureCauchy : UniformEmbedding (pureCauchy : α → CauchyFilter α)


/-- A bounded subset has finite measure for a measure which is finite on compact sets, in a
proper space. -/
theorem _root_.Bornology.IsBounded.measure_lt_top [PseudoMetricSpace α] [ProperSpace α]
    {μ : Measure α} [IsFiniteMeasureOnCompacts μ] ⦃s : Set α⦄ (hs : Bornology.IsBounded s) :
    μ s < ∞


/-- `padicNorm p q` takes discrete values `p ^ -z` for `z : ℤ`. -/
protected theorem values_discrete {q : ℚ} (hq : q ≠ 0) : ∃ z : ℤ, padicNorm p q = (p : ℚ) ^ (-z)


theorem edge_other_incident_set {v : V} {e : Sym2 V} (h : e ∈ G.incidenceSet v) :
    e ∈ G.incidenceSet (G.otherVertexOfIncident h)

{V : Type u}
(G : SimpleGraph V)
[DecidableEq V]
{v : V}
{e : Sym2 V}
(h : e ∈ G.incidenceSet v)


/-- The constant path from a point to itself -/
@[refl, simps]
def refl (x : X) : Path x x

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


lemma LSeriesHasSum.smul {f : ℕ → ℂ} (c : ℂ) {s a : ℂ} (hf : LSeriesHasSum f s a) :
    LSeriesHasSum (c • f) s (c * a)


/-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements more than something in `𝒜`. -/
theorem mem_upShadow_iff_exists_mem_card_add :
    s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + k = s.card

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

s ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + k = s.card


@[simp] theorem pairwise_cons : Pairwise R (a::l) ↔ (∀ a' ∈ l, R a a') ∧ Pairwise R l

{α : Type u_1}
{R : α → α → Prop}
{a : α}
{l : List α}

List.Pairwise R (a :: l) ↔ (∀ (a' : α), a' ∈ l → R a a') ∧ List.Pairwise R l


/-- If a subspace is less than another, there is a point only in the second. -/
theorem exists_of_lt {s1 s2 : AffineSubspace k P} (h : s1 < s2) : ∃ p ∈ s2, p ∉ s1

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s1 s2 : AffineSubspace k P}
(h : s1 < s2)


/-- In a non-trivial ring, the element `0` is not regular -- with typeclasses. -/
theorem not_isRegular_zero [Nontrivial R] : ¬IsRegular (0 : R)

{R : Type u_1}
[MulZeroClass R]
[Nontrivial R]


/-- A variant of `AddSubmonoid.mem_iSup_iff_exists_dfinsupp` with the RHS fully unfolded. -/
theorem _root_.AddSubmonoid.mem_iSup_iff_exists_dfinsupp' [AddCommMonoid γ] (S : ι → AddSubmonoid γ)
    [∀ (i) (x : S i), Decidable (x ≠ 0)] (x : γ) :
    x ∈ iSup S ↔ ∃ f : Π₀ i, S i, (f.sum fun i xi => ↑xi) = x

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

x ∈ iSup S ↔ ∃ f, (f.sum fun i xi => ↑xi) = x


/-- Effective **Szemerédi Regularity Lemma**: For any sufficiently large graph, there is an
`ε`-uniform equipartition of bounded size (where the bound does not depend on the graph). -/
theorem szemeredi_regularity (hε : 0 < ε) (hl : l ≤ card α) :
    ∃ P : Finpartition univ,
      P.IsEquipartition ∧ l ≤ P.parts.card ∧ P.parts.card ≤ bound ε l ∧ P.IsUniform G ε

{α : Type u_1}
[DecidableEq α]
[Fintype α]
(G : SimpleGraph α)
[DecidableRel G.Adj]
{ε : ℝ}
{l : ℕ}
(hε : 0 < ε)
(hl : l ≤ Fintype.card α)

∃ P, P.IsEquipartition ∧ l ≤ P.parts.card ∧ P.parts.card ≤ SzemerediRegularity.bound ε l ∧ P.IsUniform G ε


theorem sin_add_pi_div_two (θ : Angle) : sin (θ + ↑(π / 2)) = cos θ


/-- If `a ≤ b`, then `(b, +∞) ⊆ [a, +∞)`. In preorders, this is just an implication. If you need
the equivalence in dense linear orders, use `Ioi_subset_Ici_iff`. -/
theorem Ioi_subset_Ici (h : a ≤ b) : Ioi b ⊆ Ici a

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


theorem extract_cons_addChar (c : Char) (cs : List Char) (b e : Pos) :
    extract ⟨c :: cs⟩ (b + c) (e + c) = extract ⟨cs⟩ b e

(c : Char)
(cs : List Char)
(b e : String.Pos)

{ data := c :: cs }.extract (b + c) (e + c) = { data := cs }.extract b e


/-- The top-left evaluation `Square C ⥤ C`. -/
@[simps]
def evaluation₁ : Square C ⥤ C

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

∀ {X Y : CategoryTheory.Square C} (φ : X ⟶ Y), CategoryTheory.Square.evaluation₁.map φ = φ.τ₁


theorem Balanced.subset_smul (hA : Balanced 𝕜 A) (ha : 1 ≤ ‖a‖) : A ⊆ a • A

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{A : Set E}
{a : 𝕜}
(hA : Balanced 𝕜 A)
(ha : 1 ≤ ‖a‖)


theorem MapsTo.coe_restrict (h : Set.MapsTo f s t) :
    Subtype.val ∘ h.restrict f s t = s.restrict f

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(h : Set.MapsTo f s t)

Subtype.val ∘ Set.MapsTo.restrict f s t h = s.restrict f


theorem ofReal_pow {p : ℝ} (hp : 0 ≤ p) (n : ℕ) :
    ENNReal.ofReal (p ^ n) = ENNReal.ofReal p ^ n


@[simp]
theorem not_isMax_of_lt (h : a < b) : ¬IsMax a

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


lemma exactAt_of_isSupported [K.IsSupported e] (i' : ι') (hi' : ∀ i, e.f i ≠ i') :
    K.ExactAt i'


@[simp]
theorem quot_mul_one (x : PGame) : (⟦x * 1⟧ : Game) = ⟦x⟧


@[simp]
theorem nonempty_invertible_iff_isUnit [Monoid α] (a : α) : Nonempty (Invertible a) ↔ IsUnit a


theorem nfpFamily_eq_self {f : ι → Ordinal → Ordinal} {a} (h : ∀ i, f i a = a) :
    nfpFamily f a = a

{f : ι → Ordinal.{max u u_1} → Ordinal.{max u u_1}}


@[simp, norm_cast]
theorem coe_min (r p : ℝ≥0) : ((min r p : ℝ≥0) : ℝ≥0∞) = min (r : ℝ≥0∞) p


theorem finite_support (f : α →₀ M) : Set.Finite (Function.support f)

{α : Type u_1}
{M : Type u_5}
[Zero M]
(f : α →₀ M)


/--
The `R`-linear equivalence between additive morphisms `A →+ B` and `ℕ`-linear morphisms `A →ₗ[ℕ] B`.
-/
@[simps]
def addMonoidHomLequivNat {A B : Type*} (R : Type*) [Semiring R] [AddCommMonoid A]
    [AddCommMonoid B] [Module R B] : (A →+ B) ≃ₗ[R] A →ₗ[ℕ] B

{A : Type u_17}
{B : Type u_18}
(R : Type u_19)
[Semiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R B]
(f : A →ₗ[ℕ] B)

(addMonoidHomLequivNat R).symm f = f.toAddMonoidHom


lemma ne_of_ne_of_eq {α : Sort*} {a b c : α} (h₁ : a ≠ b) (h₂ : b = c) : a ≠ c

{α : Sort u_1}
{a b c : α}
(h₁ : a ≠ b)
(h₂ : b = c)


theorem IsUnit.isNilpotent_unit_mul_of_commute_iff [MonoidWithZero R] {r u : R}
    (hu : IsUnit u) (h_comm : Commute r u) :
    IsNilpotent (u * r) ↔ IsNilpotent r

{R : Type u_1}
[MonoidWithZero R]
{r u : R}
(hu : IsUnit u)
(h_comm : Commute r u)


lemma natAbs_pow (n : ℤ) (k : ℕ) : Int.natAbs (n ^ k) = Int.natAbs n ^ k


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

{α : Type u_2}
{β : Type u_3}
[Bot α]
[Bot β]
(f : BotHom α β)


@[simp]
theorem bot_covering : S ∈ (⊥ : GrothendieckTopology C) X ↔ S = ⊤

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : C}
{S : CategoryTheory.Sieve X}


/-- Let `S` be an `R`-algebra, `M` a submonoid of `R`, and `S' = M⁻¹S`.
If the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
then there exists some `m : M` such that `m • x` falls in the
adjoin of `IsLocalization.finsetIntegerMultiple _ s` over `R`.
-/
theorem IsLocalization.lift_mem_adjoin_finsetIntegerMultiple [Algebra R S] [Algebra R S']
    [IsScalarTower R S S'] [IsLocalization (M.map (algebraMap R S)) S'] (x : S) (s : Finset S')
    (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) :
    ∃ m : M, m • x ∈
      Algebra.adjoin R
        (IsLocalization.finsetIntegerMultiple (M.map (algebraMap R S)) s : Set S)

[IsLocalization (Submonoid.map (algebraMap R S) M) S']

(hx : (algebraMap S S') x ∈ Algebra.adjoin R ↑s)

∃ m, m • x ∈ Algebra.adjoin R ↑(IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)


/-- If `R` is a field, then localizing at a submonoid not containing `0` adds no new elements. -/
theorem IsField.localization_map_bijective {R Rₘ : Type*} [CommRing R] [CommRing Rₘ]
    {M : Submonoid R} (hM : (0 : R) ∉ M) (hR : IsField R) [Algebra R Rₘ] [IsLocalization M Rₘ] :
    Function.Bijective (algebraMap R Rₘ)

{R : Type u_4}
{Rₘ : Type u_5}
[CommRing R]
[CommRing Rₘ]
{M : Submonoid R}
(hM : 0 ∉ M)
(hR : IsField R)
[Algebra R Rₘ]
[IsLocalization M Rₘ]


theorem algebraMap₀_mul_algebraMap₀ (r s : R) :
    cast R M (add_zero _) (algebraMap₀ r ₜ* algebraMap₀ s) = algebraMap₀ (r * s)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(r s : R)

(TensorPower.cast R M ⋯) (GradedMonoid.GMul.mul (TensorPower.algebraMap₀ r) (TensorPower.algebraMap₀ s)) =
  TensorPower.algebraMap₀ (r * s)


@[simp]
theorem subtype_comp_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x : A, f x ∈ S) :
    (NonUnitalSubalgebraClass.subtype S).comp (NonUnitalAlgHom.codRestrict f S hf) = f

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(f : F)
(S : NonUnitalSubalgebra R B)
(hf : ∀ (x : A), f x ∈ S)

(NonUnitalSubalgebraClass.subtype S).comp (NonUnitalAlgHom.codRestrict f S hf) =
  NonUnitalAlgHomClass.toNonUnitalAlgHom f


/-- A `Matroid α` is a ground set `E` of type `Set α`, and a nonempty collection of its subsets
  satisfying the exchange property and the maximal subset property. Each such set is called a
  `Base` of `M`. An `Indep`endent set is just a set contained in a base, but we include this
  predicate as a structure field for better definitional properties.

  In most cases, using this definition directly is not the best way to construct a matroid,
  since it requires specifying both the bases and independent sets. If the bases are known,
  use `Matroid.ofBase` or a variant. If just the independent sets are known,
  define an `IndepMatroid`, and then use `IndepMatroid.matroid`.
  -/
@[ext] structure Matroid (α : Type _) where
  /-- `M` has a ground set `E`. -/
  (E : Set α)
  /-- `M` has a predicate `Base` definining its bases. -/
  (Base : Set α → Prop)
  /-- `M` has a predicate `Indep` defining its independent sets. -/
  (Indep : Set α → Prop)
  /-- The `Indep`endent sets are those contained in `Base`s. -/
  (indep_iff' : ∀ ⦃I⦄, Indep I ↔ ∃ B, Base B ∧ I ⊆ B)
  /-- There is at least one `Base`. -/
  (exists_base : ∃ B, Base B)
  /-- For any bases `B`, `B'` and `e ∈ B \ B'`, there is some `f ∈ B' \ B` for which `B-e+f`
    is a base. -/
  (base_exchange : Matroid.ExchangeProperty Base)
  /-- Every independent subset `I` of a set `X` for is contained in a maximal independent
    subset of `X`. -/
  (maximality : ∀ X, X ⊆ E → Matroid.ExistsMaximalSubsetProperty Indep X)
  /-- Every base is contained in the ground set. -/
  (subset_ground : ∀ B, Base B → B ⊆ E)

{α : Type u_1}
(self : Matroid α)
⦃I : Set α⦄


theorem symm_apply_mem_iff (h : e.IsImage s t) (hy : y ∈ e.target) : e.symm y ∈ s ↔ y ∈ t

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}
{y : Y}
(h : e.IsImage s t)
(hy : y ∈ e.target)


protected theorem LawfulCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [BEq α] [LawfulBEq α] [LE α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (not_lt : ∀ {x y : α}, ¬x < y ↔ y ≤ x)
    (le_antisymm : ∀ {x y : α}, x ≤ y → y ≤ x → x = y) :
    LawfulCmp (α := α) (compareOfLessAndEq · ·)

Batteries.LawfulCmp fun x x_1 => compareOfLessAndEq x x_1


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

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


/-- An equivalence between categories gives an equivalence between the opposite categories.
-/
@[simps]
def op (e : C ≌ D) : Cᵒᵖ ≌ Dᵒᵖ

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


theorem Inseparable.prod {x₁ x₂ : X} {y₁ y₂ : Y} (hx : x₁ ~ᵢ x₂) (hy : y₁ ~ᵢ y₂) :
    (x₁, y₁) ~ᵢ (x₂, y₂)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x₁ x₂ : X}
{y₁ y₂ : Y}
(hx : x₁ ~ᵢ x₂)
(hy : y₁ ~ᵢ y₂)


@[simp]
protected theorem zero_mem : (0 : M) ∈ p

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
(p : Submodule R M)


/-- `HasLimit F` represents the mere existence of a limit for `F`. -/
class HasLimit (F : J ⥤ C) : Prop where mk' ::
  /-- There is some limit cone for `F` -/
  exists_limit : Nonempty (LimitCone F)

[self : CategoryTheory.Limits.HasLimit F]


theorem Pi.nnnorm_single [DecidableEq ι] [∀ i, NormedAddCommGroup (π i)] {i : ι} (y : π i) :
    ‖Pi.single i y‖₊ = ‖y‖₊

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → NormedAddCommGroup (π i)]
{i : ι}
(y : π i)


/-- A set `s` is open iff for every point `x` in `s` and every `y` close to `x`, `y` is in `s`. -/
theorem isOpen_iff_eventually : IsOpen s ↔ ∀ x, x ∈ s → ∀ᶠ y in 𝓝 x, y ∈ s

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

IsOpen s ↔ ∀ x ∈ s, ∀ᶠ (y : X) in 𝓝 x, y ∈ s


@[simp]
theorem toUniformOnFun_toFun (f : C(α, β)) :
    UniformOnFun.toFun _ f.toUniformOnFunIsCompact = f

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
(f : C(α, β))

(UniformOnFun.toFun {K | IsCompact K}) f.toUniformOnFunIsCompact = ⇑f


theorem mk_ne_zero {a : α} : Associates.mk a ≠ 0 ↔ a ≠ 0

{α : Type u_1}
[MonoidWithZero α]
{a : α}


/-- `subtypeDomain` but as an `AddMonoidHom`. -/
@[simps]
def subtypeDomainAddMonoidHom [∀ i, AddZeroClass (β i)] (p : ι → Prop) [DecidablePred p] :
    (Π₀ i : ι, β i) →+ Π₀ i : Subtype p, β i

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

(DFinsupp.subtypeDomainAddMonoidHom β p) x = DFinsupp.subtypeDomain p x


@[reassoc]
lemma shiftFunctorAdd_assoc_hom_app (a₁ a₂ a₃ : A) (X : C) :
    (shiftFunctorAdd C (a₁ + a₂) a₃).hom.app X ≫
      ((shiftFunctorAdd C a₁ a₂).hom.app X)⟦a₃⟧' =
    (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) (add_assoc _ _ _).symm).hom.app X ≫
      (shiftFunctorAdd C a₂ a₃).hom.app (X⟦a₁⟧)

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a₁ a₂ a₃ : A)
(X : C)

CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd C (a₁ + a₂) a₃).hom.app X)
    ((CategoryTheory.shiftFunctor C a₃).map ((CategoryTheory.shiftFunctorAdd C a₁ a₂).hom.app X)) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯).hom.app X)
    ((CategoryTheory.shiftFunctorAdd C a₂ a₃).hom.app ((CategoryTheory.shiftFunctor C a₁).obj X))


/-- The inclusion of the right factor into the sum of two languages. -/
@[simps]
protected def sumInr : L' →ᴸ L.sum L'

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(_n : ℕ)
(val : L'.Functions _n)

FirstOrder.Language.LHom.sumInr.onFunction val = Sum.inr val


theorem single_finset_sum [AddCommMonoid M] (s : Finset ι) (f : ι → M) (a : α) :
    single a (∑ b ∈ s, f b) = ∑ b ∈ s, single a (f b)

{α : Type u_1}
{ι : Type u_2}
{M : Type u_8}
[AddCommMonoid M]
(s : Finset ι)
(f : ι → M)
(a : α)

Finsupp.single a (∑ b ∈ s, f b) = ∑ b ∈ s, Finsupp.single a (f b)


theorem vonMangoldt_pos_iff {n : ℕ} : 0 < Λ n ↔ IsPrimePow n

0 < ArithmeticFunction.vonMangoldt n ↔ IsPrimePow n


theorem opow_isLimit_left {a b : Ordinal} (l : IsLimit a) (hb : b ≠ 0) : IsLimit (a ^ b)

{a b : Ordinal.{u_1}}
(l : a.IsLimit)
(hb : b ≠ 0)


theorem eq_zero_of_mem_range_zero [Zero β] : ∀ {y : β}, y ∈ (0 : α →ₛ β).range → y = 0

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Zero β]
{y : β}

y ∈ MeasureTheory.SimpleFunc.range 0 → y = 0


/-- An outer measure is a countably subadditive monotone function that sends `∅` to `0`. -/
structure OuterMeasure (α : Type*) where
  /-- Outer measure function. Use automatic coercion instead. -/
  protected measureOf : Set α → ℝ≥0∞
  protected empty : measureOf ∅ = 0
  protected mono : ∀ {s₁ s₂}, s₁ ⊆ s₂ → measureOf s₁ ≤ measureOf s₂
  protected iUnion_nat : ∀ s : ℕ → Set α, Pairwise (Disjoint on s) →
    measureOf (⋃ i, s i) ≤ ∑' i, measureOf (s i)

{α : Type u_2}
(self : MeasureTheory.OuterMeasure α)
{s₁ s₂ : Set α}

s₁ ⊆ s₂ → self.measureOf s₁ ≤ self.measureOf s₂


/-- Countable unions of compact sets are σ-compact. -/
lemma isSigmaCompact_sUnion_of_isCompact {S : Set (Set X)} (hc : Set.Countable S)
    (hcomp : ∀ (s : Set X), s ∈ S → IsCompact s) : IsSigmaCompact (⋃₀ S)

{X : Type u_1}
[TopologicalSpace X]
{S : Set (Set X)}
(hc : S.Countable)
(hcomp : ∀ s ∈ S, IsCompact s)


@[fun_prop]
theorem ContinuousOn.snd {f : α → β × γ} {s : Set α} (hf : ContinuousOn f s) :
    ContinuousOn (fun x => (f x).2) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : α → β × γ}
{s : Set α}
(hf : ContinuousOn f s)


theorem Bool.or_assoc (a b c : Bool) : (a || b || c) = (a || (b || c))


/-- An object in the image is in the essential image. -/
theorem obj_mem_essImage (F : D ⥤ C) (Y : D) : F.obj Y ∈ essImage F

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


@[to_additive]
theorem not_mem_mulTSupport_iff_eventuallyEq : x ∉ mulTSupport f ↔ f =ᶠ[𝓝 x] 1

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[Zero β]
{f : α → β}
{x : α}


@[to_additive (attr := simp, norm_cast)]
lemma val_div_eq_div_val : ∀ u₁ u₂ : αˣ, ↑(u₁ / u₂) = (u₁ / u₂ : α)

{α : Type u}
[SubtractionMonoid α]
(u₁ u₂ : AddUnits α)


theorem ContDiff.comp_contDiffAt {g : F → G} {f : E → F} (x : E) (hg : ContDiff 𝕜 n g)
    (hf : ContDiffAt 𝕜 n f x) : ContDiffAt 𝕜 n (g ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{g : F → G}
{f : E → F}
(x : E)
(hg : ContDiff 𝕜 n g)
(hf : ContDiffAt 𝕜 n f x)


protected theorem IsClosed.balancedCore (hU : IsClosed U) : IsClosed (balancedCore 𝕜 U)

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
{U : Set E}
(hU : IsClosed U)


lemma Embedding.isTotallyDisconnected_image [TopologicalSpace β] {f : α → β} (hf : Embedding f)
    {s : Set α} : IsTotallyDisconnected (f '' s) ↔ IsTotallyDisconnected s

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(hf : Embedding f)
{s : Set α}


/-- The equivalence `(ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n` obtained
by reversing the arrows. -/
@[simps!]
def opEquivalence : (ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n

(X : (CategoryTheory.Functor (Fin (n + 1)) C)ᵒᵖ)

∀ (X_1 : Fin (n + 1)),
  ((CategoryTheory.ComposableArrows.opEquivalence C n).functor.obj X).obj X_1 =
    Opposite.op ((Opposite.unop X).obj X_1.rev)


theorem abs_sinh (x : ℝ) : |sinh x| = sinh |x|


@[reassoc]
lemma rightHomologyIso_inv_naturality :
    S₁.rightHomologyIso.inv ≫ rightHomologyMap φ =
      homologyMap φ ≫ S₂.rightHomologyIso.inv

CategoryTheory.CategoryStruct.comp S₁.rightHomologyIso.inv (CategoryTheory.ShortComplex.rightHomologyMap φ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ) S₂.rightHomologyIso.inv


@[reassoc (attr := simp)]
lemma LeftHomologyData.leftHomologyIso_hom_comp_homologyIso_inv (h : S.LeftHomologyData) :
    h.leftHomologyIso.hom ≫ h.homologyIso.inv = S.leftHomologyIso.hom

CategoryTheory.CategoryStruct.comp h.leftHomologyIso.hom h.homologyIso.inv = S.leftHomologyIso.hom


theorem surjOn_logb' : SurjOn (logb b) (Iio 0) univ

{b : ℝ}
(b_pos : 0 < b)
(b_ne_one : b ≠ 1)

Set.SurjOn (Real.logb b) (Set.Iio 0) Set.univ


/-- Transform a `QuaternionAlgebra.Basis` through an `AlgHom`. -/
@[simps i j k]
def compHom (F : A →ₐ[R] B) : Basis B c₁ c₂

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
{c₁ c₂ : R}
(q : QuaternionAlgebra.Basis A c₁ c₂)
(F : A →ₐ[R] B)


theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
    (φsur : Surjective φ.obj) : ψ.IsCovering

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
(φ : U ⥤q V)
{W : Type u_3}
[Quiver W]
(ψ : V ⥤q W)
(hφ : φ.IsCovering)
(hφψ : (φ ⋙q ψ).IsCovering)
(φsur : Function.Surjective φ.obj)


theorem infinite_of_injective_forall_mem [Infinite α] {s : Set β} {f : α → β} (hi : Injective f)
    (hf : ∀ x : α, f x ∈ s) : s.Infinite

{α : Type u}
{β : Type v}
[Infinite α]
{s : Set β}
{f : α → β}
(hi : Function.Injective f)
(hf : ∀ (x : α), f x ∈ s)


lemma eq_zero_of_ofSpanSingleton_apply_self (a : A)
    (h : ofSpanSingleton a ⟨a, Submodule.mem_span_singleton_self a⟩ = 0) : a = 0

(h : (CharacterModule.ofSpanSingleton a) ⟨a, ⋯⟩ = 0)


theorem LinearMap.toMatrix₂Aux_eq (B : M₁ →ₗ[R] M₂ →ₗ[R] N₂) :
    LinearMap.toMatrix₂Aux R b₁ b₂ B = LinearMap.toMatrix₂ b₁ b₂ B

{R : Type u_1}
{M₁ : Type u_7}
{M₂ : Type u_8}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
[AddCommMonoid N₂]
[Module R N₂]
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
(b₁ : Basis n R M₁)
(b₂ : Basis m R M₂)
(B : M₁ →ₗ[R] M₂ →ₗ[R] N₂)

(LinearMap.toMatrix₂Aux R ⇑b₁ ⇑b₂) B = (LinearMap.toMatrix₂ b₁ b₂) B


theorem SmoothOn_inv₀ : SmoothOn I I (Inv.inv : G → G) {0}ᶜ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(I : ModelWithCorners 𝕜 E H)
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[Inv G]
[Zero G]
[SmoothInv₀ I G]


@[simp]
lemma degree_polynomial [Nontrivial R] : W.polynomial.degree = 2

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


lemma sup_iInf₂_eq {f : ∀ i, κ i → α} (a : α) : (a ⊔ ⨅ i, ⨅ j, f i j) = ⨅ i, ⨅ j, a ⊔ f i j

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
(minAx : Order.Coframe.MinimalAxioms α)
{f : (i : ι) → κ i → α}
(a : α)

a ⊔ ⨅ i, ⨅ j, f i j = ⨅ i, ⨅ j, a ⊔ f i j


/-- Two isomorphic functors `F₁` and `F₂` induce isomorphic functors
`F₁.mapTriangle` and `F₂.mapTriangle` if the isomorphism `F₁ ≅ F₂` is compatible
with the shifts. -/
@[simps!]
def mapTriangleIso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) [F₁.CommShift ℤ] [F₂.CommShift ℤ]
    [NatTrans.CommShift e.hom ℤ] : F₁.mapTriangle ≅ F₂.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIso e).hom.app X).hom₁ = e.hom.app X.obj₁


@[continuity]
theorem Continuous.matrix_vecMul [NonUnitalNonAssocSemiring R] [ContinuousAdd R] [ContinuousMul R]
    [Fintype m] {A : X → m → R} {B : X → Matrix m n R} (hA : Continuous A) (hB : Continuous B) :
    Continuous fun x => A x ᵥ* B x

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[NonUnitalNonAssocSemiring R]
[ContinuousAdd R]
[ContinuousMul R]
[Fintype m]
{A : X → m → R}
{B : X → Matrix m n R}
(hA : Continuous A)
(hB : Continuous B)


lemma isSMulRegular_iff_mem_nonZeroSMulDivisors :
    IsSMulRegular M r ↔ r ∈ nonZeroSMulDivisors R M

{R : Type u_1}
(M : Type u_3)
[Ring R]
[AddCommGroup M]
[Module R M]
(r : R)


lemma LSeriesHasSum_iff {f : ℕ → ℂ} {s a : ℂ} :
    LSeriesHasSum f s a ↔ LSeriesSummable f s ∧ LSeries f s = a


theorem ne_zero {a b c : ℤ} (h : Fermat42 a b c) : c ≠ 0


theorem isNilpotentOfIsNilpotentSpanSupEqTop (hnp : IsNilpotent <| toEnd R L M x)
    (hIM : IsNilpotent R I M) : IsNilpotent R L M

(hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤)

(hnp : IsNilpotent ((LieModule.toEnd R L M) x))


theorem exists_open {f : X → Y} (hf : IsLocallyConstant f) (x : X) :
    ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ ∀ x' ∈ U, f x' = f x

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

∃ U, IsOpen U ∧ x ∈ U ∧ ∀ x' ∈ U, f x' = f x


/-- Evaluation of functions into an indexed collection of semigroups at a point is a semigroup
homomorphism.
This is `Function.eval i` as a `MulHom`. -/
@[to_additive (attr := simps)
  "Evaluation of functions into an indexed collection of additive semigroups at a point is an
  additive semigroup homomorphism. This is `Function.eval i` as an `AddHom`."]
def Pi.evalMulHom (i : I) : (∀ i, f i) →ₙ* f i

{I : Type u}
(f : I → Type v)
[(i : I) → Add (f i)]
(i : I)
(g : (i : I) → f i)


/-- The oplax functor associated with a pseudofunctor. -/
@[simps]
def toOplax : OplaxFunctor B C

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

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), F.toOplax.mapComp f g = (F.mapComp f g).hom


theorem min'_eq_sorted_zero {s : Finset α} {h : s.Nonempty} :
    s.min' h = (s.sort (· ≤ ·)).get ⟨0, (by rw [length_sort]; exact card_pos.2 h)⟩

{α : Type u_1}
[LinearOrder α]
{s : Finset α}
{h : s.Nonempty}

s.min' h = (Finset.sort (fun x x_1 => x ≤ x_1) s).get ⟨0, ⋯⟩


/-- Build an isomorphism in the category `Semigroup` from a `MulEquiv` between `Semigroup`s. -/
@[to_additive (attr := simps)
  "Build an isomorphism in the category
  `AddSemigroup` from an `AddEquiv` between `AddSemigroup`s."]
def MulEquiv.toSemigrpIso (e : X ≃* Y) : Semigrp.of X ≅ Semigrp.of Y

{X Y : Type u}
[AddSemigroup X]
[AddSemigroup Y]
(e : X ≃+ Y)

∀ (a : Y), e.toAddSemigrpIso.inv a = e.symm.toFun a


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

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


theorem circleMap_ne_mem_ball {c : ℂ} {R : ℝ} {w : ℂ} (hw : w ∈ ball c R) (θ : ℝ) :
    circleMap c R θ ≠ w

{c : ℂ}
{R : ℝ}
{w : ℂ}
(hw : w ∈ Metric.ball c R)
(θ : ℝ)


theorem card_derangements_fin_eq_numDerangements {n : ℕ} :
    card (derangements (Fin n)) = numDerangements n

Fintype.card ↑(derangements (Fin n)) = numDerangements n


theorem single_add_erase (a : α) (f : α →₀ M) : single a (f a) + f.erase a = f

{α : Type u_1}
{M : Type u_5}
[AddZeroClass M]
(a : α)
(f : α →₀ M)

Finsupp.single a (f a) + Finsupp.erase a f = f


theorem addVal_def (r : R) (u : Rˣ) {ϖ : R} (hϖ : Irreducible ϖ) (n : ℕ) (hr : r = u * ϖ ^ n) :
    addVal R r = n

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
(r : R)
(u : Rˣ)
{ϖ : R}
(hϖ : Irreducible ϖ)
(n : ℕ)
(hr : r = ↑u * ϖ ^ n)


protected theorem dual {l : α → β} {u : β → α} (gc : GaloisConnection l u) :
    GaloisConnection (OrderDual.toDual ∘ u ∘ OrderDual.ofDual)
      (OrderDual.toDual ∘ l ∘ OrderDual.ofDual)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)

GaloisConnection (⇑OrderDual.toDual ∘ u ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ l ∘ ⇑OrderDual.ofDual)


theorem integral_comp_mul_right_Ioi (g : ℝ → E) (a : ℝ) {b : ℝ} (hb : 0 < b) :
    (∫ x in Ioi a, g (x * b)) = b⁻¹ • ∫ x in Ioi (a * b), g x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(g : ℝ → E)
(a : ℝ)
{b : ℝ}
(hb : 0 < b)

∫ (x : ℝ) in Set.Ioi a, g (x * b) = b⁻¹ • ∫ (x : ℝ) in Set.Ioi (a * b), g x


theorem hasStrictDerivAt_lineMap : HasStrictDerivAt (lineMap a b) (b - a) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{a b : E}
{x : 𝕜}

HasStrictDerivAt (⇑(AffineMap.lineMap a b)) (b - a) x


theorem himp_le : x ⇨ y ≤ z ↔ y ≤ z ∧ Codisjoint x z

{α : Type u}
{x y z : α}
[BooleanAlgebra α]


theorem leftInverse_trop : Function.LeftInverse (trop : R → Tropical R) untrop


@[to_additive]
theorem prod_disjiUnion (s : Finset ι) (t : ι → Finset α) (h) :
    ∏ x ∈ s.disjiUnion t h, f x = ∏ i ∈ s, ∏ x ∈ t i, f x

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
{f : α → β}
[CommMonoid β]
(s : Finset ι)
(t : ι → Finset α)
(h : (↑s).PairwiseDisjoint t)


theorem measurableEquiv_range_coe_nat_of_infinite_of_countable [Infinite α] [Countable α] :
    Nonempty (α ≃ᵐ range ((↑) : ℕ → ℝ))

(α : Type u_1)
[MeasurableSpace α]
[StandardBorelSpace α]
[Infinite α]
[Countable α]


theorem Equiv.swap_bijOn_self (hs : a ∈ s ↔ b ∈ s) : BijOn (Equiv.swap a b) s s

{α : Type u_1}
[DecidableEq α]
{a b : α}
{s : Set α}
(hs : a ∈ s ↔ b ∈ s)


theorem nhds_eq_uniformity {x : α} : 𝓝 x = (𝓤 α).lift' (ball x)


theorem Hom.cast_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟶ v) :
    HEq (e.cast hu hv) e

{U : Type u_1}
[Quiver U]
{u v u' v' : U}
(hu : u = u')
(hv : v = v')
(e : u ⟶ v)


theorem distrib (f g h k : X ⟶ Y) : (f +ᵣ g) +ₗ h +ᵣ k = (f +ₗ h) +ᵣ g +ₗ k

CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd X Y
    (CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd X Y f g)
    (CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd X Y h k) =
  CategoryTheory.SemiadditiveOfBinaryBiproducts.rightAdd X Y
    (CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd X Y f h)
    (CategoryTheory.SemiadditiveOfBinaryBiproducts.leftAdd X Y g k)


@[to_additive]
theorem inv_def [Inv β] (x : α) :
    letI := Equiv.Inv e
    x⁻¹ = e.symm (e x)⁻¹

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Inv β]
(x : α)


theorem le_of_lt_add (h1 : a ≡ b [MOD m]) (h2 : a < b + m) : a ≤ b

{m a b : ℕ}
(h1 : a ≡ b [MOD m])
(h2 : a < b + m)


theorem sdiff_le_comm : a \ b ≤ c ↔ a \ c ≤ b

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


@[simp]
theorem uniformEquiv_mk_coe (a : Equiv α β) (b c) : (UniformEquiv.mk a b c : α → β) = a

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(a : α ≃ β)
(b : UniformContinuous a.toFun)
(c : UniformContinuous a.invFun)

⇑{ toEquiv := a, uniformContinuous_toFun := b, uniformContinuous_invFun := c } = ⇑a


lemma abv_add (x y) : abv (x + y) ≤ abv x + abv y

{S : Type u_5}
[OrderedSemiring S]
{R : Type u_6}
[Semiring R]
(abv : R → S)
[IsAbsoluteValue abv]
(x y : R)


@[simp, mfld_simps]
protected theorem left_inv (x : H) : I.symm (I x) = x

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


@[to_additive (attr := simp)]
theorem inv_involutive : Function.Involutive (Inv.inv : G → G)


@[to_additive]
theorem IsWF.smul [LinearOrder G] [LinearOrder P] [SMul G P] [IsOrderedCancelSMul G P] {s : Set G}
    {t : Set P} (hs : s.IsWF) (ht : t.IsWF) : IsWF (s • t)

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[SMul G P]
[IsOrderedCancelSMul G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)


@[simp] theorem size_enum (n) : (enum n).size = n


theorem seqRight_eq_bind [Monad m] [LawfulMonad m] (x : m α) (y : m β) : x *> y = x >>= fun _ => y

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

(SeqRight.seqRight x fun x => y) = do
  let _ ← x
  y


/-- The image of a star-convex set under an affine map is star-convex. -/
theorem StarConvex.affine_image (f : E →ᵃ[𝕜] F) {s : Set E} (hs : StarConvex 𝕜 x s) :
    StarConvex 𝕜 (f x) (f '' s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
{x : E}
(f : E →ᵃ[𝕜] F)
{s : Set E}
(hs : StarConvex 𝕜 x s)


/-- `Equiv.piCongr` as a uniform isomorphism: this is the natural isomorphism
`Π i₁, β₁ i ≃ᵤ Π i₂, β₂ i₂` obtained from a bijection `ι₁ ≃ ι₂` and isomorphisms
`β₁ i₁ ≃ᵤ β₂ (e i₁)` for each `i₁ : ι₁`. -/
@[simps! apply toEquiv]
def piCongr {ι₁ ι₂ : Type*} {β₁ : ι₁ → Type*} {β₂ : ι₂ → Type*}
    [∀ i₁, UniformSpace (β₁ i₁)] [∀ i₂, UniformSpace (β₂ i₂)]
    (e : ι₁ ≃ ι₂) (F : ∀ i₁, β₁ i₁ ≃ᵤ β₂ (e i₁)) : (∀ i₁, β₁ i₁) ≃ᵤ ∀ i₂, β₂ i₂

{ι₁ : Type u_4}
{ι₂ : Type u_5}
{β₁ : ι₁ → Type u_6}
{β₂ : ι₂ → Type u_7}
[(i₁ : ι₁) → UniformSpace (β₁ i₁)]
[(i₂ : ι₂) → UniformSpace (β₂ i₂)]
(e : ι₁ ≃ ι₂)
(F : (i₁ : ι₁) → β₁ i₁ ≃ᵤ β₂ (e i₁))

(UniformEquiv.piCongr e F).toEquiv = (Equiv.piCongrRight fun i => (F i).toEquiv).trans (Equiv.piCongrLeft β₂ e)


/-- The forward direction of the equivalence `F.Elementsᵒᵖ ≅ (yoneda, F)`,
given by `CategoryTheory.yonedaEquiv`.
-/
@[simps]
def toCostructuredArrow (F : Cᵒᵖ ⥤ Type v) : F.Elementsᵒᵖ ⥤ CostructuredArrow yoneda F

(F : CategoryTheory.Functor Cᵒᵖ (Type v))

∀ {X Y : F.Elementsᵒᵖ} (f : X ⟶ Y),
  (CategoryTheory.CategoryOfElements.toCostructuredArrow F).map f =
    CategoryTheory.CostructuredArrow.homMk (↑f.unop).unop ⋯


/-- If `IsUnit n` in a `CommRing R`, then `X ^ n - u` is separable for any unit `u`. -/
theorem separable_X_pow_sub_C_unit {n : ℕ} (u : Rˣ) (hn : IsUnit (n : R)) :
    Separable (X ^ n - C (u : R))

{R : Type u}
[CommRing R]
{n : ℕ}
(u : Rˣ)
(hn : IsUnit ↑n)

(Polynomial.X ^ n - Polynomial.C ↑u).Separable


theorem ssubset_of_subset_not_subset (h₁ : a ⊆ b) (h₂ : ¬b ⊆ a) : a ⊂ b

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


nonrec
theorem _root_.ContinuousAt.clog {f : α → ℂ} {x : α} (h₁ : ContinuousAt f x)
    (h₂ : f x ∈ slitPlane) : ContinuousAt (fun t => log (f t)) x

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℂ}
{x : α}
(h₁ : ContinuousAt f x)
(h₂ : f x ∈ Complex.slitPlane)

ContinuousAt (fun t => Complex.log (f t)) x


theorem ContDiffAt.sin {n} (hf : ContDiffAt ℝ n f x) : ContDiffAt ℝ n (fun x => Real.sin (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{n : ℕ∞}
(hf : ContDiffAt ℝ n f x)


@[simp]
theorem tensorTensorTensorAssoc_tmul (m : M) (n : N) (p : P) (q : Q) :
    tensorTensorTensorAssoc R M N P Q (m ⊗ₜ n ⊗ₜ (p ⊗ₜ q)) = m ⊗ₜ (n ⊗ₜ p) ⊗ₜ q

(R : Type u_1)
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(m : M)
(n : N)
(p : P)
(q : Q)

(TensorProduct.tensorTensorTensorAssoc R M N P Q) ((m ⊗ₜ[R] n) ⊗ₜ[R] p ⊗ₜ[R] q) = (m ⊗ₜ[R] n ⊗ₜ[R] p) ⊗ₜ[R] q


/-- Subgroups of a group `G` are isomorphic to additive subgroups of `Additive G`. -/
@[simps!]
def Subgroup.toAddSubgroup : Subgroup G ≃o AddSubgroup (Additive G)

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

↑(Subgroup.toAddSubgroup S) = ⇑Additive.toMul ⁻¹' ↑S


theorem exists_eq_disjoint_finiteSpanningSetsIn (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] :
    ∃ (S : μ.FiniteSpanningSetsIn { s | MeasurableSet s })
      (T : ν.FiniteSpanningSetsIn { s | MeasurableSet s }),
      S.set = T.set ∧ Pairwise (Disjoint on S.set)

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]

∃ S T, S.set = T.set ∧ Pairwise (Disjoint on S.set)


@[simp] theorem mem_diagonal_iff {x : α × α} : x ∈ diagonal α ↔ x.1 = x.2


lemma Odd.pos [Nontrivial α] : Odd a → 0 < a

{α : Type u}
[CanonicallyOrderedCommSemiring α]
{a : α}
[Nontrivial α]


theorem sOppSide_iff_exists_left {s : AffineSubspace R P} {x y p₁ : P} (h : p₁ ∈ s) :
    s.SOppSide x y ↔ x ∉ s ∧ y ∉ s ∧ ∃ p₂ ∈ s, SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y p₁ : P}
(h : p₁ ∈ s)


theorem finrank_span_eq_card [Nontrivial R] {ι : Type*} [Fintype ι] {b : ι → M}
    (hb : LinearIndependent R b) :
    finrank R (span R (Set.range b)) = Fintype.card ι

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Nontrivial R]
{ι : Type u_2}
[Fintype ι]
{b : ι → M}
(hb : LinearIndependent R b)

FiniteDimensional.finrank R ↥(Submodule.span R (Set.range b)) = Fintype.card ι


theorem map_mono {S₁ S₂ : StarSubalgebra R A} {f : A →⋆ₐ[R] B} : S₁ ≤ S₂ → S₁.map f ≤ S₂.map f

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
{S₁ S₂ : StarSubalgebra R A}
{f : A →⋆ₐ[R] B}

S₁ ≤ S₂ → StarSubalgebra.map f S₁ ≤ StarSubalgebra.map f S₂


theorem map_sSup (s : Set (Ideal R)) : (sSup s).map f = ⨆ I ∈ s, (I : Ideal R).map f

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

Ideal.map f (sSup s) = ⨆ I ∈ s, Ideal.map f I


/-- The range of the adjoint action on a finite-dimensional Killing Lie algebra is full. -/
@[simp]
lemma range_ad_eq_top : 𝕀 = ⊤

(R : Type u_1)
(L : Type u_2)
[Field R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[LieAlgebra.IsKilling R L]


theorem applyId_mem_iff [DecidableEq α] {xs ys : List α} (h₀ : List.Nodup xs) (h₁ : xs ~ ys)
    (x : α) : List.applyId.{u} (xs.zip ys) x ∈ ys ↔ x ∈ xs

{α : Type u}
[DecidableEq α]
{xs ys : List α}
(h₀ : xs.Nodup)
(h₁ : xs ~ ys)
(x : α)

SlimCheck.InjectiveFunction.List.applyId (xs.zip ys) x ∈ ys ↔ x ∈ xs


/-- Two closed sets are at zero Hausdorff distance if and only if they coincide. -/
theorem _root_.IsClosed.hausdorffDist_zero_iff_eq (hs : IsClosed s) (ht : IsClosed t)
    (fin : hausdorffEdist s t ≠ ⊤) : hausdorffDist s t = 0 ↔ s = t

{α : Type u}
[PseudoMetricSpace α]
{s t : Set α}
(hs : IsClosed s)
(ht : IsClosed t)
(fin : EMetric.hausdorffEdist s t ≠ ⊤)


/-- A variation of `Algebra.discr_powerBasis_eq_prod`. -/
theorem discr_powerBasis_eq_prod' [Algebra.IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K pb.basis) =
      ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, -((e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen))

(K : Type u)
{L : Type v}
(E : Type z)
[Field K]
[Field L]
[Field E]
[Algebra K L]
[Algebra K E]
[Module.Finite K L]
[IsAlgClosed E]
(pb : PowerBasis K L)
[Algebra.IsSeparable K L]
(e : Fin pb.dim ≃ (L →ₐ[K] E))

(algebraMap K E) (Algebra.discr K ⇑pb.basis) =
  ∏ i : Fin pb.dim, ∏ j ∈ Finset.Ioi i, -(((e j) pb.gen - (e i) pb.gen) * ((e i) pb.gen - (e j) pb.gen))


theorem IsNilpotent.map [MonoidWithZero R] [MonoidWithZero S] {r : R} {F : Type*}
    [FunLike F R S] [MonoidWithZeroHomClass F R S] (hr : IsNilpotent r) (f : F) :
    IsNilpotent (f r)

{R : Type u_1}
{S : Type u_2}
[MonoidWithZero R]
[MonoidWithZero S]
{r : R}
{F : Type u_3}
[FunLike F R S]
[MonoidWithZeroHomClass F R S]
(hr : IsNilpotent r)
(f : F)


/-- If `(x, y)` is a solution with `x` and `y` positive, then the `y` component of any power
has the same sign as the exponent. -/
theorem sign_y_zpow_eq_sign_of_x_pos_of_y_pos {a : Solution₁ d} (hax : 0 < a.x) (hay : 0 < a.y)
    (n : ℤ) : (a ^ n).y.sign = n.sign

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


theorem isOpen_preimage_ofLawson {S : Set α} :
    IsOpen (ofLawson ⁻¹' S) ↔ (lawson α).IsOpen S

IsOpen (⇑Topology.WithLawson.ofLawson ⁻¹' S) ↔ TopologicalSpace.IsOpen S


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

{α : Type u_2}
{β : Type u_3}
[Bornology α]
[Bornology β]
{f g : LocallyBoundedMap α β}
(h : ∀ (a : α), f a = g a)


protected theorem lt_add_of_neg_lt_sub_right {a b c : Int} (h : -b < a - c) : c < a + b


theorem cmp_compares : ∀ (a b : ONote) [NF a] [NF b], (cmp a b).Compares a b


/-- The `Matrix` version of `inv_sub_inv'` -/
theorem inv_sub_inv {A B : Matrix n n α} (h : IsUnit A ↔ IsUnit B) :
    A⁻¹ - B⁻¹ = A⁻¹ * (B - A) * B⁻¹

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A B : Matrix n n α}
(h : IsUnit A ↔ IsUnit B)


@[simp]
theorem bot_ne_coe (x : ℝ) : (⊥ : EReal) ≠ x


/-- If a compact closed set is everywhere positive with respect to a left-invariant measure on a
topological group, then it is a Gδ set. This is nontrivial, as there is no second-countability or
metrizability assumption in the statement, so a general compact closed set has no reason to be
a countable intersection of open sets. -/
@[to_additive]
lemma IsEverywherePos.IsGdelta_of_isMulLeftInvariant
    {k : Set G} (h : μ.IsEverywherePos k) (hk : IsCompact k) (h'k : IsClosed k) :
    IsGδ k


@[to_additive (attr := simp)]
theorem clift_comp_mk (f : FreeMonoid (M ⊕ N) →* P) (hM₁ hN₁ hM hN) :
    (clift f hM₁ hN₁ hM hN).comp mk = f

(hM₁ : f (FreeAddMonoid.of (Sum.inl 0)) = 0)

(hN₁ : f (FreeAddMonoid.of (Sum.inr 0)) = 0)

(hM :
  ∀ (x y : M), f (FreeAddMonoid.of (Sum.inl (x + y))) = f (FreeAddMonoid.of (Sum.inl x) + FreeAddMonoid.of (Sum.inl y)))

(hN :
  ∀ (x y : N), f (FreeAddMonoid.of (Sum.inr (x + y))) = f (FreeAddMonoid.of (Sum.inr x) + FreeAddMonoid.of (Sum.inr y)))

(AddMonoid.Coprod.clift f hM₁ hN₁ hM hN).comp AddMonoid.Coprod.mk = f


theorem lift_app {X Y U : Scheme.{u}} (f : U ⟶ Y) (g : X ⟶ Y) [IsOpenImmersion f] (H)
    (V : U.Opens) :
    (IsOpenImmersion.lift f g H).app V = (f.appIso V).inv ≫ g.app (f ''ᵁ V) ≫
      X.presheaf.map (eqToHom <| IsOpenImmersion.app_eq_invApp_app_of_comp_eq_aux _ _ _
        (IsOpenImmersion.lift_fac f g H).symm V).op

(H : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base)

AlgebraicGeometry.Scheme.Hom.app (AlgebraicGeometry.IsOpenImmersion.lift f g H) V =
  (AlgebraicGeometry.Scheme.Hom.appIso f V).inv ≫
    AlgebraicGeometry.Scheme.Hom.app g ((AlgebraicGeometry.Scheme.Hom.opensFunctor f).obj V) ≫
      X.presheaf.map (CategoryTheory.eqToHom ⋯).op


/-- We can more explicitly show that a category has a terminal object by specifying the object,
and showing there is a unique morphism to it from any other object. -/
theorem hasTerminal_of_unique (X : C) [h : ∀ Y : C, Unique (Y ⟶ X)] : HasTerminal C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(X : C)
[h : (Y : C) → Unique (Y ⟶ X)]


theorem imp_congr_left (h : a ↔ b) : (a → c) ↔ (b → c)


theorem log_exp {x : ℂ} (hx₁ : -π < x.im) (hx₂ : x.im ≤ π) : log (exp x) = x

{x : ℂ}
(hx₁ : -Real.pi < x.im)
(hx₂ : x.im ≤ Real.pi)


/-- The homotopy between morphisms in `ShortComplex Cᵒᵖ` that is induced by a homotopy
between morphisms in `ShortComplex C`. -/
@[simps]
def op (h : Homotopy φ₁ φ₂) : Homotopy (opMap φ₁) (opMap φ₂)

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

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


@[to_additive Ici_add_Ioi_subset]
theorem Ici_mul_Ioi_subset' (a b : α) : Ici a * Ioi b ⊆ Ioi (a * b)

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

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


theorem sub_rat (h : Irrational x) : Irrational (x - q)


theorem results_think {s : Computation α} {a n} (h : Results s a n) : Results (think s) a (n + 1)

{α : Type u}
{s : Computation α}
{a : α}
{n : ℕ}
(h : s.Results a n)


/-- A family of bijective functions with pairwise disjoint
domains and pairwise disjoint ranges can be glued together
to form a bijective function. -/
theorem piecewise_bij {β : Type*} {f : ι → α → β}
    {t : ι → Set β} (ht : IndexedPartition t)
    (hf : ∀ i, BijOn (f i) (s i) (t i)) :
    Bijective (piecewise hs f)

{f : ι → α → β}

(hf : ∀ (i : ι), Set.BijOn (f i) (s i) (t i))


theorem lt_mul_of_one_le_of_lt_of_nonneg [MulPosMono α] (ha : 1 ≤ a) (h : b < c) (hc : 0 ≤ c) :
    b < a * c

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


theorem associatesNonZeroDivisorsEquivIsPrincipal_mul (x y : Associates R⁰) :
    (associatesNonZeroDivisorsEquivIsPrincipal R (x * y) : Ideal R) =
      (associatesNonZeroDivisorsEquivIsPrincipal R x) *
        (associatesNonZeroDivisorsEquivIsPrincipal R y)

{R : Type u_1}
[CommRing R]
[IsDomain R]
(x y : Associates ↥(nonZeroDivisors R))

↑↑((Ideal.associatesNonZeroDivisorsEquivIsPrincipal R) (x * y)) =
  ↑↑((Ideal.associatesNonZeroDivisorsEquivIsPrincipal R) x) * ↑↑((Ideal.associatesNonZeroDivisorsEquivIsPrincipal R) y)


theorem map_zero (d : ℕ) (a : Fin 0 → ℕ) : map d a = 0


@[ext]
theorem initial.strict_hom_ext {A : C} (f g : A ⟶ ⊥_ C) : f = g


/-- Class of composing triples -/
class CompTriple  {M N P : Type*} (φ : M → N) (ψ : N → P) (χ : outParam (M → P)) : Prop where
  /-- The maps form a commuting triangle -/
  comp_eq : ψ.comp φ = χ

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
{φ : M → N}
{ψ : N → P}
{χ : outParam (M → P)}
[self : CompTriple φ ψ χ]


/-- Composition of affine maps acts as applying the two functions. -/
@[simp]
theorem coe_comp (f : P2 →ᵃ[k] P3) (g : P1 →ᵃ[k] P2) : ⇑(f.comp g) = f ∘ g

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


@[simp]
theorem get_mem (i : Fin n) (v : Vector α n) : v.get i ∈ v.toList

{α : Type u_1}
{n : ℕ}
(i : Fin n)
(v : Mathlib.Vector α n)


theorem range_loop_range' : ∀ s n : Nat, range.loop s (range' s n) = range' 0 (n + s)

List.range.loop s (List.range' s n) = List.range' 0 (n + s)


theorem exists_isLUB {S : Set ℝ} (hne : S.Nonempty) (hbdd : BddAbove S) : ∃ x, IsLUB S x


theorem absNorm_bot : absNorm (⊥ : FractionalIdeal R⁰ K) = 0

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
[Module.Free ℤ R]
[Module.Finite ℤ R]
{K : Type u_2}
[CommRing K]
[Algebra R K]
[IsFractionRing R K]


@[to_additive]
theorem mul_iff_left [CommGroup β] [TopologicalGroup β] (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (g * f) μ ↔ AEStronglyMeasurable g μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (g * f) μ ↔ MeasureTheory.AEStronglyMeasurable g μ


theorem cos_int_mul_two_pi_sub_pi (n : ℤ) : cos (n * (2 * π) - π) = -1

Real.cos (↑n * (2 * Real.pi) - Real.pi) = -1


theorem IsLittleO.of_const_mul_right {g : α → R} {c : R} (h : f =o[l] fun x => c * g x) :
    f =o[l] g

{α : Type u_1}
{E : Type u_3}
{R : Type u_13}
[Norm E]
[SeminormedRing R]
{f : α → E}
{l : Filter α}
{g : α → R}
{c : R}
(h : f =o[l] fun x => c * g x)


/-- `PUnit` is a right identity for type product up to an equivalence. -/
@[simps]
def prodPUnit (α) : α × PUnit ≃ α

(α : Type u_1)
(p : α × PUnit.{u_2 + 1})


@[simp]
theorem toScheme_toLocallyRingedSpace :
    (toScheme Y f).toLocallyRingedSpace = toLocallyRingedSpace Y.1 f

{X : AlgebraicGeometry.PresheafedSpace CommRingCat}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toScheme Y f).toLocallyRingedSpace =
  AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toLocallyRingedSpace Y.toLocallyRingedSpace f


@[to_additive]
theorem prod_unique_nonempty {α β : Type*} [CommMonoid β] [Unique α] (s : Finset α) (f : α → β)
    (h : s.Nonempty) : ∏ x ∈ s, f x = f default

{α : Type u_6}
{β : Type u_7}
[CommMonoid β]
[Unique α]
(s : Finset α)
(f : α → β)
(h : s.Nonempty)


theorem harmonic_floor_le_one_add_log (y : ℝ) (hy : 1 ≤ y) :
    harmonic ⌊y⌋₊ ≤ 1 + Real.log y


/-- Given an equivalence to a subtype, produce an embedding to the elements of the corresponding
set. -/
@[simps!]
def asEmbedding {β α : Sort*} {p : β → Prop} (e : α ≃ Subtype p) : α ↪ β

{β : Sort u_1}
{α : Sort u_2}
{p : β → Prop}
(e : α ≃ Subtype p)


theorem span_span : span R (span R s : Set M) = span R s

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}

Submodule.span R ↑(Submodule.span R s) = Submodule.span R s


/-- Proper group action in the sense of Bourbaki:
the map `G × X → X × X` is a proper map (see `IsProperMap`). -/
class ProperVAdd (G X : Type*) [TopologicalSpace G] [TopologicalSpace X] [AddGroup G]
    [AddAction G X] : Prop where
  /-- Proper group action in the sense of Bourbaki:
  the map `G × X → X × X` is a proper map (see `IsProperMap`). -/
  isProperMap_vadd_pair : IsProperMap (fun gx ↦ (gx.1 +ᵥ gx.2, gx.2) : G × X → X × X)

{G : Type u_1}
{X : Type u_2}
[TopologicalSpace G]
[TopologicalSpace X]
[AddGroup G]
[AddAction G X]
[self : ProperVAdd G X]

IsProperMap fun gx => (gx.1 +ᵥ gx.2, gx.2)


@[to_additive]
theorem mul_inv_lt_iff_le_mul' : a * b⁻¹ < c ↔ a < b * c

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


@[simp]
theorem norm_p : ‖(p : ℤ_[p])‖ = (p : ℝ)⁻¹

‖↑p‖ = (↑p)⁻¹


@[simp]
theorem subtypeCongrHom.card_range {α : Type*} (p : α → Prop) [DecidablePred p]
    [Fintype (subtypeCongrHom p).range] [Fintype (Perm { a // p a } × Perm { a // ¬p a })] :
    Fintype.card (subtypeCongrHom p).range =
      Fintype.card (Perm { a // p a } × Perm { a // ¬p a })

[Fintype (Equiv.Perm { a // p a } × Equiv.Perm { a // ¬p a })]

Fintype.card ↥(Equiv.Perm.subtypeCongrHom p).range = Fintype.card (Equiv.Perm { a // p a } × Equiv.Perm { a // ¬p a })


theorem mem_fill_iff {a b : α} {i : Fin (n + 1)} {s : Sym α (n - i)} :
    a ∈ Sym.fill b i s ↔ (i : ℕ) ≠ 0 ∧ a = b ∨ a ∈ s

{α : Type u_1}
{n : ℕ}
{a b : α}
{i : Fin (n + 1)}
{s : Sym α (n - ↑i)}

a ∈ Sym.fill b i s ↔ ↑i ≠ 0 ∧ a = b ∨ a ∈ s


@[simp] lemma unmop_braiding (X Y : Cᴹᵒᵖ) : (β_ X Y).unmop = β_ (unmop Y) (unmop X)

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


theorem trList_ne_consₗ : ∀ (l), ∀ x ∈ trList l, x ≠ Γ'.consₗ

(l : List ℕ)
(x : Turing.PartrecToTM2.Γ')

x ∈ Turing.PartrecToTM2.trList l → x ≠ Turing.PartrecToTM2.Γ'.consₗ


lemma smul_finset_univ₀ [Fintype β] (ha : a ≠ 0) : a • (univ : Finset β) = univ

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[GroupWithZero α]
[MulAction α β]
{a : α}
[Fintype β]
(ha : a ≠ 0)


@[simp]
theorem nhds_iInf (f : ι → Filter α) : 𝓝 (⨅ i, f i) = ⨅ i, 𝓝 (f i)

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


@[simp (high)]
theorem norm_p_zpow (n : ℤ) : ‖(p : ℚ_[p]) ^ n‖ = (p : ℝ) ^ (-n)

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