theorem _root_.Subalgebra.fg_iff_finiteType (S : Subalgebra R A) : S.FG ↔ Algebra.FiniteType R S

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


@[to_additive]
theorem finprod_dmem {s : Set α} [DecidablePred (· ∈ s)] (f : ∀ a : α, a ∈ s → M) :
    (∏ᶠ (a : α) (h : a ∈ s), f a h) = ∏ᶠ (a : α) (_ : a ∈ s), if h' : a ∈ s then f a h' else 1

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{s : Set α}
[DecidablePred fun x => x ∈ s]
(f : (a : α) → a ∈ s → M)

∏ᶠ (a : α) (h : a ∈ s), f a h = ∏ᶠ (a : α) (_ : a ∈ s), if h' : a ∈ s then f a h' else 1


@[simp]
theorem ListBlank.nth_map {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ')
    (l : ListBlank Γ) (n : ℕ) : (l.map f).nth n = f (l.nth n)

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : Turing.ListBlank Γ)
(n : ℕ)

(Turing.ListBlank.map f l).nth n = f.f (l.nth n)


lemma monotone (x : LTSeries α) : Monotone x

{α : Type u_1}
[Preorder α]
(x : LTSeries α)


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

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


theorem Associated.mul_left [Monoid α] (a : α) {b c : α} (h : b ~ᵤ c) : a * b ~ᵤ a * c

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


/-- The continuous homomorphism given by swapping components. -/
@[to_additive (attr := simps!) "The continuous homomorphism given by swapping components."]
def swap : ContinuousMonoidHom (A × B) (B × A)

(A : Type u_2)
(B : Type u_3)
[AddMonoid A]
[AddMonoid B]
[TopologicalSpace A]
[TopologicalSpace B]
(i : A × B)

(ContinuousAddMonoidHom.swap A B) i =
  ((ContinuousAddMonoidHom.snd A B).toAddMonoidHom i, (ContinuousAddMonoidHom.fst A B).toAddMonoidHom i)


theorem isNat_prime_2 : {n n' : ℕ} →
    IsNat n n' → Nat.ble 2 n' = true → IsNat (minFac n') n' → n.Prime

Mathlib.Meta.NormNum.IsNat n n' → Nat.ble 2 n' = true → Mathlib.Meta.NormNum.IsNat n'.minFac n' → Nat.Prime n


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

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


/-- The natural isomorphism between pulling back then evaluating, and just evaluating. -/
@[simps!]
def comapEvalIsoEval (h : J → I) (j : J) : comap C h ⋙ eval (C ∘ h) j ≅ eval C (h j)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(CategoryTheory.Pi.comapEvalIsoEval C h j).inv.app X = CategoryTheory.CategoryStruct.id (X (h j))


lemma SpecializingMap.stableUnderSpecialization_range (h : SpecializingMap f) :
    StableUnderSpecialization (range f)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(h : SpecializingMap f)


theorem monotone_filter_right (s : Finset α) ⦃p q : α → Prop⦄ [DecidablePred p] [DecidablePred q]
    (h : p ≤ q) : s.filter p ⊆ s.filter q

{α : Type u_1}
(s : Finset α)
⦃p q : α → Prop⦄
[DecidablePred p]
[DecidablePred q]
(h : p ≤ q)


@[to_additive IsLowerSet.thickening]
protected theorem IsLowerSet.thickening' (hs : IsLowerSet s) (ε : ℝ) :
    IsLowerSet (thickening ε s)

{α : Type u_1}
[NormedOrderedAddGroup α]
{s : Set α}
(hs : IsLowerSet s)
(ε : ℝ)


@[norm_cast]
theorem natCast_le {m n : ℕ} : (m : Cardinal) ≤ n ↔ m ≤ n

↑m ≤ ↑n ↔ m ≤ n


theorem measure_smul_setAverage (f : α → E) {s : Set α} (h : μ s ≠ ∞) :
    (μ s).toReal • ⨍ x in s, f x ∂μ = ∫ x in s, f x ∂μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure α}
(f : α → E)
{s : Set α}
(h : μ s ≠ ⊤)

(μ s).toReal • ⨍ (x : α) in s, f x ∂μ = ∫ (x : α) in s, f x ∂μ


/-- A set is closed if its complement is open -/
class IsClosed (s : Set X) : Prop where
  /-- The complement of a closed set is an open set. -/
  isOpen_compl : IsOpen sᶜ

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


protected theorem _root_.Inducing.noetherianSpace [NoetherianSpace α] {i : β → α}
    (hi : Inducing i) : NoetherianSpace β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace.NoetherianSpace α]
{i : β → α}
(hi : Inducing i)


theorem isAdjointPair_id : IsAdjointPair B B 1 1

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}


@[field_simps]
lemma divp_eq_div [DivisionMonoid α] (a : α) (u : αˣ) : a /ₚ u = a / u

{α : Type u}
[DivisionMonoid α]
(a : α)
(u : αˣ)


theorem mk'_eq_iff_mk'_eq {x₁ x₂} {y₁ y₂ : M} :
    mk' S x₁ y₁ = mk' S x₂ y₂ ↔ mk' P x₁ y₁ = mk' P x₂ y₂

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
[Algebra R P]
[IsLocalization M P]
{x₁ x₂ : R}
{y₁ y₂ : ↥M}

IsLocalization.mk' S x₁ y₁ = IsLocalization.mk' S x₂ y₂ ↔ IsLocalization.mk' P x₁ y₁ = IsLocalization.mk' P x₂ y₂


/-- A lax monoidal functor induces a lax monoidal functor between
the categories of `G`-actions within those categories. -/
@[simps!]
def mapActionLax (F : LaxMonoidalFunctor V W) (G : MonCat.{u}) :
    LaxMonoidalFunctor (Action V G) (Action W G)

(F : CategoryTheory.LaxMonoidalFunctor V W)

((CategoryTheory.MonoidalFunctor.mapActionLax F G).μ X Y).hom = F.μ X.V Y.V


theorem uniformEquicontinuousOn_finite [Finite ι] {F : ι → β → α} {S : Set β} :
    UniformEquicontinuousOn F S ↔ ∀ i, UniformContinuousOn (F i) S

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
[Finite ι]
{F : ι → β → α}
{S : Set β}

UniformEquicontinuousOn F S ↔ ∀ (i : ι), UniformContinuousOn (F i) S


@[to_additive]
theorem smul_set_iInter_subset (a : α) (t : ι → Set β) : (a • ⋂ i, t i) ⊆ ⋂ i, a • t i

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
[VAdd α β]
(a : α)
(t : ι → Set β)


/-- **Cauchy integral formula**: if `f : ℂ → E` is continuous on a closed disc of radius `R` and is
complex differentiable at all but countably many points of its interior, then for any `w` in this
interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$.
-/
theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ} {c w : ℂ} {f : ℂ → E}
    {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R) (hc : ContinuousOn f (closedBall c R))
    (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w

(hc : ContinuousOn f (Metric.closedBall c R))

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

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


@[simp]
lemma natCastle_toNNReal' {n : ℕ} {r : ℝ} : ↑n ≤ r.toNNReal ↔ n ≤ r ∨ n = 0


@[simp]
theorem intervalIntegrable_sin : IntervalIntegrable sin μ a b


theorem Metric.instTietzeExtensionBall {𝕜 : Type v} [RCLike 𝕜] {E : Type w}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] [FiniteDimensional 𝕜 E] {r : ℝ} (hr : 0 < r) :
    TietzeExtension.{u, w} (Metric.ball (0 : E) r)


/-- A stronger version of `mul_right_injective` -/
@[simp]
theorem swap_mul_involutive (i j : α) : Function.Involutive (Equiv.swap i j * ·)

Function.Involutive fun x => Equiv.swap i j * x


theorem subtype_Ioi_eq : Ioi a = (Ioi (a : α)).subtype p

{α : Type u_1}
[Preorder α]
(p : α → Prop)
[DecidablePred p]
[LocallyFiniteOrderTop α]
(a : Subtype p)

Finset.Ioi a = Finset.subtype p (Finset.Ioi ↑a)


theorem right_inv : Function.RightInverse (invFun p) (toFun p)

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
{Ms : ι → Type u_3}
[(i : ι) → AddCommGroup (Ms i)]
[(i : ι) → Module R (Ms i)]
[Fintype ι]
[DecidableEq ι]
(p : (i : ι) → Submodule R (Ms i))

Function.RightInverse (Submodule.quotientPi_aux.invFun p) (Submodule.quotientPi_aux.toFun p)


theorem nontrivial_lowerCentralSeriesLast [Nontrivial M] [IsNilpotent R L M] :
    Nontrivial (lowerCentralSeriesLast R L M)

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

Nontrivial ↥↑(LieModule.lowerCentralSeriesLast R L M)


theorem zero : IsBoundedLinearMap 𝕜 fun _ : E => (0 : F)

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


@[simp] theorem toHopfAlgEquiv_symm (e : X ≅ Y) :
    toHopfAlgEquiv e.symm = (toHopfAlgEquiv e).symm

{R : Type u}
[CommRing R]
{X Y : HopfAlgebraCat R}
(e : X ≅ Y)


theorem Nonempty.toList_ne_nil {s : Finset α} (hs : s.Nonempty) : s.toList ≠ []

{α : Type u_1}
{s : Finset α}
(hs : s.Nonempty)


/-- If an element `p` of `FreeAddMonoid (R × Π i, s i)` lifts an element `x` of `⨂[R] i, s i`,
and if `a` is an element of `R`, then the list obtained by multiplying the first entry of each
element of `p` by `a` lifts `a • x`.
-/
lemma lifts_smul {x : ⨂[R] i, s i} {p : FreeAddMonoid (R × Π i, s i)} (h : p ∈ lifts x) (a : R) :
    List.map (fun (y : R × Π i, s i) ↦ (a * y.1, y.2)) p ∈ lifts (a • x)

{p : FreeAddMonoid (R × ((i : ι) → s i))}

List.map (fun y => (a * y.1, y.2)) p ∈ (a • x).lifts


@[simp]
theorem upperBounds_union : upperBounds (s ∪ t) = upperBounds s ∩ upperBounds t


@[to_additive (attr := simp)]
theorem map_bot (f : F) : (⊥ : Submonoid M).map f = ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
(f : F)


/-- A (non-commutative) Jordan multiplication. -/
class IsJordan [Mul A] : Prop where
  lmul_comm_rmul : ∀ a b : A, a * b * a = a * (b * a)
  lmul_lmul_comm_lmul : ∀ a b : A, a * a * (a * b) = a * (a * a * b)
  lmul_lmul_comm_rmul : ∀ a b : A, a * a * (b * a) = a * a * b * a
  lmul_comm_rmul_rmul : ∀ a b : A, a * b * (a * a) = a * (b * (a * a))
  rmul_comm_rmul_rmul : ∀ a b : A, b * a * (a * a) = b * (a * a) * a

{A : Type u_1}
[Mul A]
[self : IsJordan A]
(a b : A)


theorem _root_.Set.Countable.measure_zero (h : s.Countable) (μ : Measure α) [NoAtoms μ] :
    μ s = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{s : Set α}
(h : s.Countable)
(μ : MeasureTheory.Measure α)
[MeasureTheory.NoAtoms μ]


theorem dual_dep_iff_forall : (M✶.Dep I) ↔ (∀ B, M.Base B → (I ∩ B).Nonempty) ∧ I ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{I : Set α}

M✶.Dep I ↔ (∀ (B : Set α), M.Base B → (I ∩ B).Nonempty) ∧ I ⊆ M.E


theorem StarAlgEquiv.restrictScalars_injective :
    Function.Injective (StarAlgEquiv.restrictScalars R : (A ≃⋆ₐ[S] B) → A ≃⋆ₐ[R] B)

(R : Type u_1)
{S : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra S A]
[Algebra S B]
[Algebra R A]
[Algebra R B]
[IsScalarTower R S A]
[IsScalarTower R S B]
[Star A]
[Star B]


theorem fmod_eq_of_lt {a b : Int} (H1 : 0 ≤ a) (H2 : a < b) : a.fmod b = a


@[to_additive (attr := simp)]
theorem lift_inr_inl : lift (inr : M →* N ∗ M) inl = swap M N

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]

Monoid.Coprod.lift Monoid.Coprod.inr Monoid.Coprod.inl = Monoid.Coprod.swap M N


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

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

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


@[simp]
theorem add_apply {f g : ArithmeticFunction R} {n : ℕ} : (f + g) n = f n + g n

{R : Type u_1}
[AddMonoid R]
{f g : ArithmeticFunction R}
{n : ℕ}


@[simp]
lemma shiftIso_zero_inv_app (a : A) (X : C) :
    (F.shiftIso 0 a a (zero_add a)).inv.app X = (shiftFunctorZero D A).inv.app _

(F : CategoryTheory.SingleFunctors C D A)

(F.shiftIso 0 a a ⋯).inv.app X = (CategoryTheory.shiftFunctorZero D A).inv.app ((F.functor a).toPrefunctor.1 X)


theorem minFac_has_prop {n : ℕ} (n1 : n ≠ 1) : minFacProp n (minFac n)


@[simp]
theorem maximum_singleton (a : α) : maximum [a] = a

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
(a : α)


@[simp]
theorem zero : IsSymmetric (0 : MvPolynomial σ R)

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]


@[simp] theorem ne_ofNat (h : Irrational x) (n : ℕ) [n.AtLeastTwo] : x ≠ no_index (OfNat.ofNat n)

{x : ℝ}
(h : Irrational x)
(n : ℕ)
[n.AtLeastTwo]


theorem toMultiset_inf [DecidableEq α] (f g : α →₀ ℕ) :
    toMultiset (f ⊓ g) = toMultiset f ∩ toMultiset g

{α : Type u_1}
[DecidableEq α]
(f g : α →₀ ℕ)

Finsupp.toMultiset (f ⊓ g) = Finsupp.toMultiset f ∩ Finsupp.toMultiset g


/-- A real function into a finite dimensional real vector space with bounded variation on a set
is differentiable almost everywhere in this set. -/
theorem ae_differentiableWithinAt {f : ℝ → V} {s : Set ℝ} (h : LocallyBoundedVariationOn f s)
    (hs : MeasurableSet s) : ∀ᵐ x ∂volume.restrict s, DifferentiableWithinAt ℝ f s x

{V : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[FiniteDimensional ℝ V]
{f : ℝ → V}
{s : Set ℝ}
(h : LocallyBoundedVariationOn f s)
(hs : MeasurableSet s)

∀ᵐ (x : ℝ) ∂MeasureTheory.volume.restrict s, DifferentiableWithinAt ℝ f s x


theorem compare_comp_eq_compare (γ : Type*) [TopologicalSpace γ]
    [T3Space γ] {f : α → γ} (cont_f : Continuous f) :
    letI := pkg.uniformStruct.toTopologicalSpace
    letI := pkg'.uniformStruct.toTopologicalSpace
    (∀ a : pkg.space,
      Filter.Tendsto f (Filter.comap pkg.coe (𝓝 a)) (𝓝 ((pkg.denseInducing.extend f) a))) →
      pkg.denseInducing.extend f ∘ pkg'.compare pkg = pkg'.denseInducing.extend f

{α : Type u_1}
[UniformSpace α]
(pkg pkg' : AbstractCompletion α)
(γ : Type u_3)
[TopologicalSpace γ]
[T3Space γ]
{f : α → γ}
(cont_f : Continuous f)

(∀ (a : pkg.space), Filter.Tendsto f (Filter.comap pkg.coe (nhds a)) (nhds (⋯.extend f a))) →
  ⋯.extend f ∘ pkg'.compare pkg = ⋯.extend f


@[congr]
theorem iInf_congr_Prop {p q : Prop} {f₁ : p → α} {f₂ : q → α} (pq : p ↔ q)
    (f : ∀ x, f₁ (pq.mpr x) = f₂ x) : iInf f₁ = iInf f₂

{α : Type u_1}
[InfSet α]
{p q : Prop}
{f₁ : p → α}
{f₂ : q → α}
(pq : p ↔ q)
(f : ∀ (x : q), f₁ ⋯ = f₂ x)


@[continuity]
theorem Continuous.matrix_reindex {A : X → Matrix l n R} (hA : Continuous A) (e₁ : l ≃ m)
    (e₂ : n ≃ p) : Continuous fun x => reindex e₁ e₂ (A x)

{X : Type u_1}
{l : Type u_3}
{m : Type u_4}
{n : Type u_5}
{p : Type u_6}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
{A : X → Matrix l n R}
(hA : Continuous A)
(e₁ : l ≃ m)
(e₂ : n ≃ p)

Continuous fun x => (Matrix.reindex e₁ e₂) (A x)


theorem eval_divByMonic_eq_trailingCoeff_comp {p : R[X]} {t : R} :
    (p /ₘ (X - C t) ^ p.rootMultiplicity t).eval t = (p.comp (X + C t)).trailingCoeff

{R : Type u}
[CommRing R]
{p : R[X]}
{t : R}

Polynomial.eval t (p /ₘ (Polynomial.X - Polynomial.C t) ^ Polynomial.rootMultiplicity t p) =
  (p.comp (Polynomial.X + Polynomial.C t)).trailingCoeff


theorem degree_sum_le (s : Finset ι) (f : ι → R[X]) :
    degree (∑ i ∈ s, f i) ≤ s.sup fun b => degree (f b)

{R : Type u}
[Semiring R]
{ι : Type u_1}
(s : Finset ι)
(f : ι → R[X])

(∑ i ∈ s, f i).degree ≤ s.sup fun b => (f b).degree


theorem rename_injective (f : σ → τ) (hf : Function.Injective f) :
    Function.Injective (rename f : MvPolynomial σ R → MvPolynomial τ R)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(f : σ → τ)
(hf : Function.Injective f)


@[simp]
theorem neg_smul (g : GL(2, ℝ)⁺) (z : ℍ) : -g • z = g • z


theorem smoothAt_inv₀ {x : G} (hx : x ≠ 0) : SmoothAt I I (fun y ↦ y⁻¹) x

{𝕜 : 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]
{x : G}
(hx : x ≠ 0)


@[simp]
theorem coe_comp (f' : G' ≃g G'') (f : G ≃g G') : ⇑(f'.comp f) = f' ∘ f

{V : Type u_1}
{W : Type u_2}
{X : Type u_3}
{G : SimpleGraph V}
{G' : SimpleGraph W}
{G'' : SimpleGraph X}
(f' : G' ≃g G'')
(f : G ≃g G')


theorem eq_of_add_pow [Ring α] [NoZeroDivisors α] (n : ℕ) (p : (a:α) = b)
    (H : (a' - b')^n - (a - b) = 0) : a' = b'

{α : Type u_1}
{a a' b b' : α}
[Ring α]
[NoZeroDivisors α]
(n : ℕ)
(p : a = b)
(H : (a' - b') ^ n - (a - b) = 0)


@[simp]
theorem transitionMap_comp_apply {m n k : ℕ} (hmn : m ≤ n) (hnk : n ≤ k)
    (x : M ⧸ (I ^ k • ⊤ : Submodule R M)) :
    transitionMap I M hmn (transitionMap I M hnk x) = transitionMap I M (hmn.trans hnk) x

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
{m n k : ℕ}
(hmn : m ≤ n)
(hnk : n ≤ k)
(x : M ⧸ I ^ k • ⊤)

(AdicCompletion.transitionMap I M hmn) ((AdicCompletion.transitionMap I M hnk) x) =
  (AdicCompletion.transitionMap I M ⋯) x


/-- Pointwise minimum of two antitone functions is an antitone function. -/
protected theorem min [Preorder α] [LinearOrder β] {f g : α → β} {s : Set α} (hf : AntitoneOn f s)
    (hg : AntitoneOn g s) : AntitoneOn (fun x => min (f x) (g x)) s

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


/-- Lift a `MonoidHom` to `Finset` via `image`. -/
@[to_additive (attr := simps) "Lift an `add_monoid_hom` to `Finset` via `image`"]
def imageMonoidHom [MulOneClass β] [FunLike F α β] [MonoidHomClass F α β] (f : F) :
    Finset α →* Finset β

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[DecidableEq β]
[AddZeroClass α]
[AddZeroClass β]
[FunLike F α β]
[AddMonoidHomClass F α β]
(f : F)

∀ (a : Finset α), (Finset.imageAddMonoidHom f) a = (Finset.imageAddHom f).toFun a


@[to_additive] lemma zpow_mul_comm (a : G) (m n : ℤ) : a ^ m * a ^ n = a ^ n * a ^ m

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


theorem ker_eq_bot_of_mono [Mono f] : LinearMap.ker f = ⊥

{R : Type u}
[Ring R]
{X Y : ModuleCat R}
(f : X ⟶ Y)
[CategoryTheory.Mono f]


@[simp]
theorem kunion_nil : ∀ {l : List (Sigma β)}, kunion l [] = l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{l : List (Sigma β)}


theorem coe_ne_zero (x : (𝓞 K)ˣ) : (x : K) ≠ 0


theorem nhdsWithin_neBot_of_mem {s : Set α} {x : α} (hx : x ∈ s) : NeBot (𝓝[s] x)

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
{x : α}
(hx : x ∈ s)


/-- `mapCone` commutes with `postcomposeEquivalence`
-/
@[simps!]
def mapConePostcomposeEquivalenceFunctor {α : F ≅ G} {c} :
    mapCone H ((Cones.postcomposeEquivalence α).functor.obj c) ≅
      (Cones.postcomposeEquivalence (isoWhiskerRight α H : _)).functor.obj (mapCone H c)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F G : J ⥤ C}
{α : F ≅ G}
{c : CategoryTheory.Limits.Cone F}

H.mapConePostcomposeEquivalenceFunctor.inv.hom = 𝟙 (H.obj c.pt)


/-- The 1-morphism `h` commutes with the left Kan lift `f₊ g`. -/
@[simps!]
def lanLiftCompIso : f₊ (h ≫ g) ≅ h ≫ f₊ g

[CategoryTheory.Bicategory.LanLift.CommuteWith f g h]

(CategoryTheory.Bicategory.LanLift.CommuteWith.lanLiftCompIso f g h).inv =
  (CategoryTheory.Bicategory.LanLift.CommuteWith.isKan f g h).desc
    (CategoryTheory.Bicategory.lanLiftLeftLift f (CategoryTheory.CategoryStruct.comp h g))


theorem one_sub_div {a b : K} (h : b ≠ 0) : 1 - a / b = (b - a) / b

{K : Type u_3}
[DivisionRing K]
{a b : K}
(h : b ≠ 0)


theorem map_extChartAt_symm_nhdsWithin_range (x : M) :
    map (extChartAt I x).symm (𝓝[range I] extChartAt I x x) = 𝓝 x

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

Filter.map (↑(extChartAt I x).symm) (𝓝[Set.range ↑I] ↑(extChartAt I x) x) = 𝓝 x


private theorem le_refl (d : ManyOneDegree) : d ≤ d


theorem isRegular_cof {o : Ordinal} (h : o.IsLimit) : IsRegular o.cof


theorem continuousAt_iff_prod [TopologicalSpace β] {f : β → α} {b : β} :
    ContinuousAt f b ↔ Tendsto (fun x : β × β => (f x.1, f x.2)) (𝓝 (b, b)) (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[TopologicalSpace β]
{f : β → α}
{b : β}

ContinuousAt f b ↔ Filter.Tendsto (fun x => (f x.1, f x.2)) (𝓝 (b, b)) (𝓤 α)


theorem single_mul_coeff_add [NonUnitalNonAssocSemiring R] {r : R} {x : HahnSeries Γ R} {a : Γ}
    {b : Γ} : (single b r * x).coeff (a + b) = r * x.coeff a

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{r : R}
{x : HahnSeries Γ R}
{a b : Γ}

((HahnSeries.single b) r * x).coeff (a + b) = r * x.coeff a


@[reassoc (attr := simp)]
theorem pullbackAssoc_hom_snd_snd [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄]
    [HasPullback f₁ ((pullback.fst _ _ : Z₂ ⟶ X₂) ≫ f₂)] :
    (pullbackAssoc f₁ f₂ f₃ f₄).hom ≫ pullback.snd _ _ ≫ pullback.snd _ _ = pullback.snd _ _

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄]

[CategoryTheory.Limits.HasPullback f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂)]

(CategoryTheory.Limits.pullbackAssoc f₁ f₂ f₃ f₄).hom ≫
    CategoryTheory.Limits.pullback.snd f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂) ≫
      CategoryTheory.Limits.pullback.snd f₃ f₄ =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄


@[simp]
theorem mem_supp_iff (x : R) : x ∈ supp v ↔ v x = 0

{R : Type u_3}
{Γ₀ : Type u_4}
[CommRing R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)
(x : R)


@[to_additive mul_zsmul'] lemma zpow_mul (a : α) : ∀ m n : ℤ, a ^ (m * n) = (a ^ m) ^ n

{α : Type u_1}
[DivisionMonoid α]
(a : α)
(m n : ℤ)


theorem OrderIso.map_top' [LE α] [PartialOrder β] (f : α ≃o β) {x : α} {y : β} (hx : ∀ x', x' ≤ x)
    (hy : ∀ y', y' ≤ y) : f x = y

{α : Type u_2}
{β : Type u_3}
[LE α]
[PartialOrder β]
(f : α ≃o β)
{x : α}
{y : β}
(hx : ∀ (x' : α), x' ≤ x)
(hy : ∀ (y' : β), y' ≤ y)


theorem derivedSeriesOfIdeal_antitone {k l : ℕ} (h : l ≤ k) : D k I ≤ D l I

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
{k l : ℕ}
(h : l ≤ k)

LieAlgebra.derivedSeriesOfIdeal R L k I ≤ LieAlgebra.derivedSeriesOfIdeal R L l I


lemma stolzCone_subset_stolzSet_aux {s : ℝ} (hs : 0 < s) :
    ∃ M ε, 0 < M ∧ 0 < ε ∧ {z : ℂ | 1 - ε < z.re} ∩ stolzCone s ⊆ stolzSet M

∃ M ε, 0 < M ∧ 0 < ε ∧ {z | 1 - ε < z.re} ∩ Complex.stolzCone s ⊆ Complex.stolzSet M


/-- A block matrix `A.from_blocks B C D` is hermitian,
    if `A` and `D` are hermitian and `Bᴴ = C`. -/
theorem IsHermitian.fromBlocks {A : Matrix m m α} {B : Matrix m n α} {C : Matrix n m α}
    {D : Matrix n n α} (hA : A.IsHermitian) (hBC : Bᴴ = C) (hD : D.IsHermitian) :
    (A.fromBlocks B C D).IsHermitian

{α : Type u_1}
{m : Type u_3}
{n : Type u_4}
[InvolutiveStar α]
{A : Matrix m m α}
{B : Matrix m n α}
{C : Matrix n m α}
{D : Matrix n n α}
(hA : A.IsHermitian)
(hBC : B.conjTranspose = C)
(hD : D.IsHermitian)


@[simp] theorem neg_imI : (-a).imI = -a.imI


theorem Sublist.of_cons_cons {l₁ l₂ : List α} {a b : α} (h : a :: l₁ <+ b :: l₂) : l₁ <+ l₂

{α : Type u}
{l₁ l₂ : List α}
{a b : α}
(h : (a :: l₁).Sublist (b :: l₂))


theorem cons_injective {a : α} {b : δ a} {s : Multiset α} (hs : a ∉ s) :
    Function.Injective (Pi.cons s a b)

{α : Type u_1}
[DecidableEq α]
{δ : α → Sort u_2}
{a : α}
{b : δ a}
{s : Multiset α}
(hs : a ∉ s)

Function.Injective (Multiset.Pi.cons s a b)


@[simp] nonrec lemma iInf_of_isEmpty {α : Sort*} [IsEmpty α] (f : α → ℝ) : ⨅ i, f i = 0


theorem eq_one_of_pos_of_log_eq_zero {x : ℝ} (h₁ : 0 < x) (h₂ : log x = 0) : x = 1

{x : ℝ}
(h₁ : 0 < x)
(h₂ : Real.log x = 0)


theorem Periodic.image_uIcc [LinearOrderedAddCommGroup α] [Archimedean α] (h : Periodic f c)
    (hc : c ≠ 0) (a : α) : f '' uIcc a (a + c) = range f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[LinearOrderedAddCommGroup α]
[Archimedean α]
(h : Function.Periodic f c)
(hc : c ≠ 0)
(a : α)


protected theorem image_eq_preimage (s : Set M) : e '' s = e.symm ⁻¹' s

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)
(s : Set M)


/-- The functor `Square C ⥤ Square D` induced by a functor `C ⥤ D`. -/
@[simps]
def mapSquare (F : C ⥤ D) : Square C ⥤ Square D

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

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


@[simp] lemma rev_castSucc {n} (i : Fin2 n) : rev (castSucc i) = fs (rev i)


theorem pi_apply {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, Module R (M' i)] (f : ∀ i, M [⋀^ι]→L[R] M' i) (m : ι → M)
    (j : ι') : pi f m j = f j m

{R : Type u_1}
{M : Type u_2}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
{ι' : Type u_7}
{M' : ι' → Type u_8}
[(i : ι') → AddCommMonoid (M' i)]
[(i : ι') → TopologicalSpace (M' i)]
[(i : ι') → Module R (M' i)]
(f : (i : ι') → M [⋀^ι]→L[R] M' i)
(m : ι → M)
(j : ι')

(ContinuousAlternatingMap.pi f) m j = (f j) m


@[to_additive]
theorem measurable_measure_mul_right (hs : MeasurableSet s) :
    Measurable fun x => μ ((fun y => y * x) ⁻¹' s)

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
{s : Set G}
(hs : MeasurableSet s)

Measurable fun x => μ ((fun y => y + x) ⁻¹' s)


@[simp]
theorem optionCongr_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
    (optionCongr e₁).trans (optionCongr e₂) = optionCongr (e₁.trans e₂)

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

e₁.optionCongr.trans e₂.optionCongr = (e₁.trans e₂).optionCongr


/-- A version of `star_mul` for `*` instead of `*`. -/
theorem star_mul [Fintype n] [NonUnitalSemiring α] [StarRing α] (M N : Matrix n n α) :
    star (M * N) = star N * star M

{n : Type u_3}
{α : Type v}
[Fintype n]
[NonUnitalSemiring α]
[StarRing α]
(M N : Matrix n n α)


@[to_additive]
theorem eventually_mul_right_iff (μ : Measure G) [IsMulRightInvariant μ] (t : G) {p : G → Prop} :
    (∀ᵐ x ∂μ, p (x * t)) ↔ ∀ᵐ x ∂μ, p x

{G : Type u_2}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(μ : MeasureTheory.Measure G)
[μ.IsAddRightInvariant]
(t : G)
{p : G → Prop}

(∀ᵐ (x : G) ∂μ, p (x + t)) ↔ ∀ᵐ (x : G) ∂μ, p x


@[simp]
theorem iteratedFDerivWithin_one_apply (h : UniqueDiffWithinAt 𝕜 s x) (m : Fin 1 → E) :
    iteratedFDerivWithin 𝕜 1 f s x m = fderivWithin 𝕜 f s x (m 0)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
(h : UniqueDiffWithinAt 𝕜 s x)
(m : Fin 1 → E)

(iteratedFDerivWithin 𝕜 1 f s x) m = (fderivWithin 𝕜 f s x) (m 0)


/-- If `s : Set (X × Y)` belongs to `l ×ˢ 𝓝 y` for all `y` from a compact set `K`,
then it belongs to `l ×ˢ (𝓝ˢ K)`,
i.e., there exist `t ∈ l` and an open `U ⊇ K` such that `t ×ˢ U ⊆ s`. -/
theorem IsCompact.mem_prod_nhdsSet_of_forall {K : Set Y} {l : Filter X} {s : Set (X × Y)}
    (hK : IsCompact K) (hs : ∀ y ∈ K, s ∈ l ×ˢ 𝓝 y) : s ∈ l ×ˢ 𝓝ˢ K

{X : Type u}
{Y : Type v}
[TopologicalSpace Y]
{K : Set Y}
{l : Filter X}
{s : Set (X × Y)}
(hK : IsCompact K)
(hs : ∀ y ∈ K, s ∈ l ×ˢ 𝓝 y)

s ∈ l ×ˢ 𝓝ˢ K


@[simp] protected lemma lt_mul_iff_one_lt_left (hb : 0 < b) : b < a * b ↔ 1 < a


theorem equivRealProdLm_symm_apply (p : ℝ × ℝ) :
    Complex.equivRealProdLm.symm p = p.1 + p.2 * Complex.I

Complex.equivRealProdLm.symm p = ↑p.1 + ↑p.2 * Complex.I


@[simp]
theorem ofDual_inf' [SemilatticeSup α] {s : Finset ι} (hs : s.Nonempty) (f : ι → αᵒᵈ) :
    ofDual (s.inf' hs f) = s.sup' hs (ofDual ∘ f)

{α : Type u_2}
{ι : Type u_5}
[SemilatticeSup α]
{s : Finset ι}
(hs : s.Nonempty)
(f : ι → αᵒᵈ)

OrderDual.ofDual (s.inf' hs f) = s.sup' hs (⇑OrderDual.ofDual ∘ f)


@[to_additive]
theorem smooth_finprod (h : ∀ i, Smooth I' I (f i))
    (hfin : LocallyFinite fun i => mulSupport (f i)) : Smooth I' I fun x => ∏ᶠ i, f i x

(hfin : LocallyFinite fun i => Function.support (f i))


theorem contMDiffAt_const : ContMDiffAt I I' n (fun _ : M => c) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{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']
{x : M}
{n : ℕ∞}
{c : M'}


@[simp]
theorem mk_preimage_sigma_eq_empty (hi : i ∉ s) : Sigma.mk i ⁻¹' s.sigma t = ∅

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
(hi : i ∉ s)


theorem trace_kronecker [Fintype m] [Fintype n] [Semiring α] (A : Matrix m m α) (B : Matrix n n α) :
    trace (A ⊗ₖ B) = trace A * trace B

{α : Type u_2}
{m : Type u_9}
{n : Type u_10}
[Fintype m]
[Fintype n]
[Semiring α]
(A : Matrix m m α)
(B : Matrix n n α)

(Matrix.kroneckerMap (fun x x_1 => x * x_1) A B).trace = A.trace * B.trace


lemma baseChange_mul (f g : Module.End R M) :
    (f * g).baseChange A = f.baseChange A * g.baseChange A

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
(f g : Module.End R M)

LinearMap.baseChange A (f * g) = LinearMap.baseChange A f * LinearMap.baseChange A g


@[reassoc (attr := simp)]
theorem leftDistributor_hom_comp_biproduct_π {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
    (leftDistributor X f).hom ≫ biproduct.π _ j = X ◁ biproduct.π _ j

CategoryTheory.CategoryStruct.comp (CategoryTheory.leftDistributor X f).hom
    (CategoryTheory.Limits.biproduct.π (fun j => CategoryTheory.MonoidalCategory.tensorObj X (f j)) j) =
  CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.Limits.biproduct.π f j)


theorem IsLeast.isGLB (h : IsLeast s a) : IsGLB s a

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsLeast s a)


theorem eq_univ_of_image_val_eq (hγ : (γ : Set α) = β) : γ = univ

{α : Type u}
{β : Set α}
{γ : Set ↑β}
(hγ : ↑γ = β)


/-- A solution is `1` or `-1` if and only if `y = 0`. -/
theorem eq_one_or_neg_one_iff_y_eq_zero {a : Solution₁ d} : a = 1 ∨ a = -1 ↔ a.y = 0


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

{M : Type u_1}
[AddMonoid M]
{a b c : M}
(h : IsAddUnit a)


theorem coeff_mul_X' [DecidableEq σ] (m) (s : σ) (p : MvPolynomial σ R) :
    coeff m (p * X s) = if s ∈ m.support then coeff (m - Finsupp.single s 1) p else 0

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

MvPolynomial.coeff m (p * MvPolynomial.X s) = if s ∈ m.support then MvPolynomial.coeff (m - Finsupp.single s 1) p else 0


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

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


theorem continuousAt_id : ContinuousAt id x

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


theorem card_union_add_card_inter (s t : Finset α) :
    (s ∪ t).card + (s ∩ t).card = s.card + t.card

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


@[simp]
theorem Rat.not_irrational (q : ℚ) : ¬Irrational q


/-- If `C` is filtered or empty, and we have a functor `R : C ⥤ D` with a left adjoint, then `D` is
filtered or empty.
-/
theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFilteredOrEmpty D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsFilteredOrEmpty C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
{L : CategoryTheory.Functor D C}
{R : CategoryTheory.Functor C D}
(h : L ⊣ R)


theorem mul_lt_of_lt_of_lt_one_of_pos [PosMulMono α] [MulPosStrictMono α] (bc : b < c) (ha : a ≤ 1)
    (a0 : 0 < a) (c0 : 0 ≤ c) : b * a < c

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


@[norm_cast]
theorem coe_domDomCongr (σ : ι ≃ ι') :
    ↑(f.domDomCongr σ) = (f : MultilinearMap R (fun _ : ι => M) N).domDomCongr σ

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{ι' : Type u_8}
(f : M [⋀^ι]→ₗ[R] N)
(σ : ι ≃ ι')

↑(AlternatingMap.domDomCongr σ f) = MultilinearMap.domDomCongr σ ↑f


lemma pairwise_disjoint_gammaSet : Pairwise (Disjoint on gammaSet N)

Pairwise (Disjoint on EisensteinSeries.gammaSet N)


/-- Some basic API lemmas -/
theorem quadraticCharFun_eq_zero_iff {a : F} : quadraticCharFun F a = 0 ↔ a = 0

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
{a : F}


theorem Functor.map_isPushout [PreservesColimit (span f g) F] (s : IsPushout f g h i) :
    IsPushout (F.map f) (F.map g) (F.map h) (F.map i)

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) F]

CategoryTheory.IsPushout (F.map f) (F.map g) (F.map h) (F.map i)


theorem subtypeDomain_def (f : Π₀ i, β i) :
    f.subtypeDomain p = mk (f.support.subtype p) fun i => f i

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

DFinsupp.subtypeDomain p f = DFinsupp.mk (Finset.subtype p f.support) fun i => f ↑↑i


/-- `fst` is analytic -/
theorem analyticAt_fst {p : E × F} : AnalyticAt 𝕜 (fun p : E × F ↦ p.fst) p

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}


/-- Given a diagram
```
a'        a --φ--> b
|         |        |
v         v        v
R' --g--> R --f--> S
```
such that `φ` is strongly cartesian, and morphisms `φ' : a' ⟶ b`, `ψ : a' ⟶ a` such that
`ψ ≫ φ = φ'`. Then `ψ` is the map induced by the universal property. -/
lemma map_uniq (ψ : a' ⟶ a) [IsHomLift p g ψ] (hψ : ψ ≫ φ = φ') : ψ = map p f φ hf' φ'

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
[CategoryTheory.Category.{v₂, u₂} 𝒳]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsStronglyCartesian f φ]
{R' : 𝒮}
{a' : 𝒳}
{g : R' ⟶ R}
{f' : R' ⟶ S}
(hf' : f' = g ≫ f)
(φ' : a' ⟶ b)
[p.IsHomLift f' φ']
(ψ : a' ⟶ a)
[p.IsHomLift g ψ]
(hψ : ψ ≫ φ = φ')

ψ = CategoryTheory.Functor.IsStronglyCartesian.map p f φ hf' φ'


theorem sum_casesOn {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ → σ} (hf : Computable f)
    (hg : Computable₂ g) (hh : Computable₂ h) :
    @Computable _ σ _ _ fun a => Sum.casesOn (f a) (g a) (h a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable σ]
{f : α → β ⊕ γ}
{g : α → β → σ}
{h : α → γ → σ}
(hf : Computable f)
(hg : Computable₂ g)
(hh : Computable₂ h)

Computable fun a => Sum.casesOn (f a) (g a) (h a)


/-- An infinite sum of functions with summable sup norm is the uniform limit of its partial sums.
Version with index set `ℕ`. -/
theorem tendstoUniformly_tsum_nat {f : ℕ → β → F} {u : ℕ → ℝ} (hu : Summable u)
    (hfu : ∀ n x, ‖f n x‖ ≤ u n) :
    TendstoUniformly (fun N => fun x => ∑ n ∈ Finset.range N, f n x) (fun x => ∑' n, f n x)
      atTop

(hfu : ∀ (n : ℕ) (x : β), ‖f n x‖ ≤ u n)

TendstoUniformly (fun N x => ∑ n ∈ Finset.range N, f n x) (fun x => ∑' (n : ℕ), f n x) Filter.atTop


@[simp]
theorem cycleOf_self_apply_pow (f : Perm α) [DecidableRel f.SameCycle] (n : ℕ) (x : α) :
    cycleOf f ((f ^ n) x) = cycleOf f x

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(n : ℕ)
(x : α)


theorem opNNNorm_prod (f : ContinuousMultilinearMap 𝕜 E G) (g : ContinuousMultilinearMap 𝕜 E G') :
    ‖f.prod g‖₊ = max ‖f‖₊ ‖g‖₊

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


@[simp]
theorem sub_contLinear (f g : P →ᴬ[R] W) : (f - g).contLinear = f.contLinear - g.contLinear

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(f g : P →ᴬ[R] W)


@[to_additive]
theorem relindex_iInf_ne_zero {ι : Type*} [_hι : Finite ι] {f : ι → Subgroup G}
    (hf : ∀ i, (f i).relindex L ≠ 0) : (⨅ i, f i).relindex L ≠ 0

{G : Type u_1}
[Group G]
{L : Subgroup G}
{ι : Type u_3}
[_hι : Finite ι]
{f : ι → Subgroup G}
(hf : ∀ (i : ι), (f i).relindex L ≠ 0)


theorem dvd_cancel_left_mem_nonZeroDivisors {x y r : R'} (hr : r ∈ R'⁰) : r * x ∣ r * y ↔ x ∣ y

{R' : Type u_6}
[CommRing R']
{x y r : R'}
(hr : r ∈ R'⁰)


/-- Any `CommMagma G` that satisfies `IsLeftCancelMul G` also satisfies `IsRightCancelMul G`. -/
@[to_additive AddCommMagma.IsLeftCancelAdd.toIsRightCancelAdd "Any `AddCommMagma G` that satisfies
`IsLeftCancelAdd G` also satisfies `IsRightCancelAdd G`."]
lemma CommMagma.IsLeftCancelMul.toIsRightCancelMul (G : Type u) [CommMagma G] [IsLeftCancelMul G] :
    IsRightCancelMul G

(G : Type u)
[AddCommMagma G]
[IsLeftCancelAdd G]


lemma toENatAux_eq_nat {x : Cardinal} {n : ℕ} : toENatAux x = n ↔ x = n


@[simp]
theorem prod_summand_smul {i : ι} (g : G i) (w : NormalWord d) :
    (g • w).prod = of i g * w.prod

{d : Monoid.PushoutI.NormalWord.Transversal φ}

(g • w).prod = (Monoid.PushoutI.of i) g * w.prod


@[to_additive (attr := simp)]
theorem map_mul_left_nhds (x y : G) : map (x * ·) (𝓝 y) = 𝓝 (x * y)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(x y : G)

Filter.map (fun x_1 => x + x_1) (𝓝 y) = 𝓝 (x + y)


/-- A mixin for power-associative multiplication. -/
class NatPowAssoc (M : Type*) [MulOneClass M] [Pow M ℕ] : Prop where
  /-- Multiplication is power-associative. -/
  protected npow_add : ∀ (k n : ℕ) (x : M), x ^ (k + n) = x ^ k * x ^ n
  /-- Exponent zero is one. -/
  protected npow_zero : ∀ (x : M), x ^ 0 = 1
  /-- Exponent one is identity. -/
  protected npow_one : ∀ (x : M), x ^ 1 = x

{M : Type u_2}
[MulOneClass M]
[Pow M ℕ]
[self : NatPowAssoc M]
(x : M)


/-- If `a` is a left identity for `f : α → β → β`, then `{a}` is a left identity for
`Set.image2 f`. -/
lemma image2_left_identity {f : α → β → β} {a : α} (h : ∀ b, f a b = b) (t : Set β) :
    image2 f {a} t = t

{α : Type u_1}
{β : Type u_3}
{f : α → β → β}
{a : α}
(h : ∀ (b : β), f a b = b)
(t : Set β)


theorem sup_eq_lsub_iff_lt_sup {ι : Type u} (f : ι → Ordinal.{max u v}) :
    sup.{_, v} f = lsub.{_, v} f ↔ ∀ i, f i < sup.{_, v} f

Ordinal.sup f = Ordinal.lsub f ↔ ∀ (i : ι), f i < Ordinal.sup f


lemma one_sub_lt_exp_neg {x : ℝ} (hx : x ≠ 0) : 1 - x < exp (-x)


@[ext]
theorem Preorder.toLE_injective : Function.Injective (@Preorder.toLE α)


theorem nf_repr_split' : ∀ {o o' m} [NF o], split' o = (o', m) → NF o' ∧ repr o = ω * repr o' + m

o.split' = (o', m) → o'.NF ∧ o.repr = ω * o'.repr + ↑m


@[simp] theorem getLeft?_eq_some_iff : x.getLeft? = some a ↔ x = inl a

∀ {α : Type u_1} {a : α} {β : Type u_2} {x : α ⊕ β}, x.getLeft? = some a ↔ x = Sum.inl a


theorem coeSubmodule_injective (h : M ≤ nonZeroDivisors R) :
    Function.Injective (coeSubmodule S : Ideal R → Submodule R S)

{R : Type u_1}
[CommRing R]
{M : Submonoid R}
(S : Type u_2)
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(h : M ≤ nonZeroDivisors R)


@[simp]
theorem add_left_iff : μ₁ + μ₂ ⟂ₘ ν ↔ μ₁ ⟂ₘ ν ∧ μ₂ ⟂ₘ ν

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ₁ μ₂ ν : MeasureTheory.Measure α}

μ₁ + μ₂ ⟂ₘ ν ↔ μ₁ ⟂ₘ ν ∧ μ₂ ⟂ₘ ν


/-- A field extension `E / F` of exponential characteristic `q` is purely inseparable
if and only if for every element `x` of `E`, the minimal polynomial of `x` over `F` is of form
`X ^ (q ^ n) - y` for some natural number `n` and some element `y` of `F`. -/
theorem isPurelyInseparable_iff_minpoly_eq_X_pow_sub_C (q : ℕ) [hF : ExpChar F q] :
    IsPurelyInseparable F E ↔ ∀ x : E, ∃ (n : ℕ) (y : F), minpoly F x = X ^ q ^ n - C y

(F : Type u)
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[hF : ExpChar F q]

IsPurelyInseparable F E ↔ ∀ (x : E), ∃ n y, minpoly F x = Polynomial.X ^ q ^ n - Polynomial.C y


theorem toNonUnitalNonAssocring_injective :
    Function.Injective (@toNonUnitalNonAssocRing R)


theorem degree_eq_of_le_of_coeff_ne_zero (pn : p.degree ≤ n) (p1 : p.coeff n ≠ 0) : p.degree = n

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(pn : p.degree ≤ ↑n)
(p1 : p.coeff n ≠ 0)


theorem infs_right_comm : s ⊼ t ⊼ u = s ⊼ u ⊼ t

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


/-- Monoidal functors commute with right tensoring up to isomorphism -/
@[simps!]
noncomputable def commTensorRight (X : C) :
    F.toFunctor ⋙ tensorRight (F.toFunctor.obj X) ≅ tensorRight X ⋙ F.toFunctor

(F : CategoryTheory.MonoidalFunctor C D)

∀ (X_1 : C), (F.commTensorRight X).hom.app X_1 = F.μ X_1 X


/-- If a measure `μ` on the quotient `G ⧸ Γ` of a group `G` by a discrete normal subgroup `Γ` having
fundamental domain, satisfies `QuotientMeasureEqMeasurePreimage` relative to a standardized choice
of Haar measure on `G`, and assuming `μ` is finite, then `μ` is itself Haar.
TODO: Is it possible to drop the assumption that `μ` is finite? -/
@[to_additive "If a measure `μ` on the quotient `G ⧸ Γ` of an additive group `G` by a discrete
normal subgroup `Γ` having fundamental domain, satisfies `AddQuotientMeasureEqMeasurePreimage`
relative to a standardized choice of Haar measure on `G`, and assuming `μ` is finite, then `μ` is
itself Haar."]
theorem MeasureTheory.QuotientMeasureEqMeasurePreimage.haarMeasure_quotient [LocallyCompactSpace G]
    [QuotientMeasureEqMeasurePreimage ν μ] [i : HasFundamentalDomain Γ.op G ν]
    [IsFiniteMeasure μ] : IsHaarMeasure μ

[i : MeasureTheory.HasAddFundamentalDomain (↥Γ.op) G ν]


/-- In a tower of field extensions `A / K / F`, if `A / F` is finite, so is `K / F`.

(In fact, it suffices that `A` is a nontrivial ring.)

Note this cannot be an instance as Lean cannot infer `A`.
-/
theorem left [Nontrivial A] [FiniteDimensional F A] : FiniteDimensional F K

(F : Type u)
(K : Type v)
(A : Type w)
[DivisionRing F]
[DivisionRing K]
[AddCommGroup A]
[Module F K]
[Module K A]
[Module F A]
[IsScalarTower F K A]
[Nontrivial A]
[FiniteDimensional F A]


private theorem symm_gen : map Prod.swap ((𝓤 α).lift' gen) ≤ (𝓤 α).lift' gen

Filter.map Prod.swap ((𝓤 α).lift' CauchyFilter.gen) ≤ (𝓤 α).lift' CauchyFilter.gen


theorem integral_fintype_prod_eq_pow {E : Type*} (ι : Type*) [Fintype ι] (f : E → 𝕜)
    [MeasureSpace E] [SigmaFinite (volume : Measure E)] :
    ∫ x : ι → E, ∏ i, f (x i) = (∫ x, f x) ^ (card ι)

∫ (x : ι → E), ∏ i : ι, f (x i) = (∫ (x : E), f x) ^ Fintype.card ι


@[to_additive]
theorem mem_sSup_of_directed_on {S : Set (Subsemigroup M)} (hS : DirectedOn (· ≤ ·) S) {x : M} :
    x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

(hS : DirectedOn (fun x x_1 => x ≤ x_1) S)


@[simp]
theorem inr_inj {g₁ g₂ : G} : (inr g₁ : N ⋊[φ] G) = inr g₂ ↔ g₁ = g₂

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

SemidirectProduct.inr g₁ = SemidirectProduct.inr g₂ ↔ g₁ = g₂


@[functor_norm]
theorem preserves_seq {α β : Type u} : ∀ (x : F (α → β)) (y : F α), η (x <*> y) = η x <*> η y

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
(η : ApplicativeTransformation F G)
{α β : Type u}
(x : F (α → β))
(y : F α)

(fun {α} => η.app α) (Seq.seq x fun x => y) = Seq.seq ((fun {α} => η.app α) x) fun x => (fun {α} => η.app α) y


/-- If `C` is cofiltered or empty, and we have a functor `L : C ⥤ D` with a right adjoint,
then `D` is cofiltered or empty.
-/
theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofilteredOrEmpty D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsCofilteredOrEmpty C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(h : L ⊣ R)


theorem Ico_mem_nhdsWithin_Ici' (H : a < b) : Ico a b ∈ 𝓝[≥] a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b : α}
(H : a < b)


theorem disjoint_powers_iff_not_mem (y : R) (hI : I.IsRadical) :
    Disjoint (Submonoid.powers y : Set R) ↑I ↔ y ∉ I.1

{R : Type u}
[CommSemiring R]
{I : Ideal R}
(y : R)
(hI : I.IsRadical)

Disjoint ↑(Submonoid.powers y) ↑I ↔ y ∉ I.toAddSubmonoid


@[to_additive]
protected lemma div_div_cancel (h : IsUnit a) : a / (a / b) = b

{α : Type u}
[DivisionCommMonoid α]
{a b : α}
(h : IsUnit a)


theorem nhds_left'_sup_nhds_right (a : α) : 𝓝[<] a ⊔ 𝓝[≥] a = 𝓝 a

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


/-- A polynomial over an irreducible ring `R` is irreducible if it is monic and irreducible after
mapping into an integral domain `S` (https://math.stackexchange.com/a/4843432/235999).
A generalization to `Polynomial.Monic.irreducible_of_irreducible_map`. -/
theorem Polynomial.Monic.irreducible_of_irreducible_map_of_isPrime_nilradical
    {R S : Type*} [CommRing R] [(nilradical R).IsPrime] [CommRing S] [IsDomain S]
    (φ : R →+* S) (f : R[X]) (hm : f.Monic) (hi : Irreducible (f.map φ)) : Irreducible f

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[(nilradical R).IsPrime]
[CommRing S]
[IsDomain S]
(φ : R →+* S)
(f : R[X])
(hm : f.Monic)
(hi : Irreducible (Polynomial.map φ f))


theorem dual_dual : ∀ t : Ordnode α, dual (dual t) = t


@[to_additive]
theorem Inducing.continuousMul {M N F : Type*} [Mul M] [Mul N] [FunLike F M N] [MulHomClass F M N]
    [TopologicalSpace M] [TopologicalSpace N] [ContinuousMul N] (f : F) (hf : Inducing f) :
    ContinuousMul M

{M : Type u_6}
{N : Type u_7}
{F : Type u_8}
[Mul M]
[Mul N]
[FunLike F M N]
[MulHomClass F M N]
[TopologicalSpace M]
[TopologicalSpace N]
[ContinuousMul N]
(f : F)
(hf : Inducing ⇑f)


protected theorem sum_repr' (b : OrthonormalBasis ι 𝕜 E) (x : E) : ∑ i, ⟪b i, x⟫_𝕜 • b i = x

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)
(x : E)


@[simp]
theorem lcm_zero_right (x : R) : lcm x 0 = 0

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x : R)


@[to_additive (attr := simp, norm_cast)]
theorem coe_div (s t : Finset α) : (↑(s / t) : Set α) = ↑s / ↑t

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


theorem leftMoves_mul :
    ∀ x y : PGame.{u},
      (x * y).LeftMoves = (x.LeftMoves × y.LeftMoves ⊕ x.RightMoves × y.RightMoves)


theorem Filter.Frequently.mem_of_closed (h : ∃ᶠ x in 𝓝 x, x ∈ s)
    (hs : IsClosed s) : x ∈ s

{X : Type u}
{x : X}
{s : Set X}
[TopologicalSpace X]
(h : ∃ᶠ (x : X) in 𝓝 x, x ∈ s)
(hs : IsClosed s)


@[simp]
theorem ppred_eq_some {m : ℕ} : ∀ {n}, ppred n = some m ↔ succ m = n


lemma congr_symm_apply_of [IsDirected ι (· ≤ ·)]
    (e : (i : ι) → G i ≃ₗ[R] G' i) (he : ∀ i j h, e j ∘ₗ f i j h = f' i j h ∘ₗ e i)
    {i : ι} (g : G' i) :
    (congr e he).symm (of _ _ G' f' i g) = of _ _ G f i ((e i).symm g)

{f' : (i j : ι) → i ≤ j → G' i →ₗ[R] G' j}

(he : ∀ (i j : ι) (h : i ≤ j), ↑(e j) ∘ₗ f i j h = f' i j h ∘ₗ ↑(e i))

(Module.DirectLimit.congr e he).symm ((Module.DirectLimit.of R ι G' f' i) g) =
  (Module.DirectLimit.of R ι G f i) ((e i).symm g)


@[to_additive]
theorem mk'_mul_eq_mk'_of_mul (x₁ x₂) (y : S) : f.mk' x₂ y * f.toMap x₁ = f.mk' (x₁ * x₂) y

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)
(x₁ x₂ : M)
(y : ↥S)

f.mk' x₂ y + f.toMap x₁ = f.mk' (x₁ + x₂) y


@[to_additive]
theorem TopologicalGroup.tendstoLocallyUniformly_iff {ι α : Type*} [TopologicalSpace α]
    (F : ι → α → G) (f : α → G) (p : Filter ι) :
    @TendstoLocallyUniformly α G ι (TopologicalGroup.toUniformSpace G) _ F f p ↔
      ∀ u ∈ 𝓝 (1 : G), ∀ (x : α), ∃ t ∈ 𝓝 x, ∀ᶠ i in p, ∀ a ∈ t, F i a / f a ∈ u

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
{ι : Type u_2}
{α : Type u_3}
[TopologicalSpace α]
(F : ι → α → G)
(f : α → G)
(p : Filter ι)

TendstoLocallyUniformly F f p ↔ ∀ u ∈ 𝓝 1, ∀ (x : α), ∃ t ∈ 𝓝 x, ∀ᶠ (i : ι) in p, ∀ a ∈ t, F i a / f a ∈ u


@[to_additive] -- Porting note: was `@[simp]`
theorem integral_div_left_eq_self (f : G → E) (μ : Measure G) [IsInvInvariant μ]
    [IsMulLeftInvariant μ] (x' : G) : (∫ x, f (x' / x) ∂μ) = ∫ x, f x ∂μ

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[AddGroup G]
[MeasurableAdd G]
[MeasurableNeg G]
(f : G → E)
(μ : MeasureTheory.Measure G)
[μ.IsNegInvariant]
[μ.IsAddLeftInvariant]
(x' : G)

∫ (x : G), f (x' - x) ∂μ = ∫ (x : G), f x ∂μ


protected theorem Connected.exists_walk_length_eq_dist (hconn : G.Connected) (u v : V) :
    ∃ p : G.Walk u v, p.length = G.dist u v

{V : Type u_1}
{G : SimpleGraph V}
(hconn : G.Connected)
(u v : V)


theorem contMDiffOn_iff_of_mem_maximalAtlas (he : e ∈ maximalAtlas I M)
    (he' : e' ∈ maximalAtlas I' M') (hs : s ⊆ e.source) (h2s : MapsTo f s e'.source) :
    ContMDiffOn I I' n f s ↔
      ContinuousOn f s ∧
        ContDiffOn 𝕜 n (e'.extend I' ∘ f ∘ (e.extend I).symm) (e.extend I '' s)

(he : e ∈ SmoothManifoldWithCorners.maximalAtlas I M)

(he' : e' ∈ SmoothManifoldWithCorners.maximalAtlas I' M')

ContMDiffOn I I' n f s ↔
  ContinuousOn f s ∧ ContDiffOn 𝕜 n (↑(e'.extend I') ∘ f ∘ ↑(e.extend I).symm) (↑(e.extend I) '' s)


theorem mul_polyOfInterest_aux4 (n : ℕ) :
    (p : 𝕄) ^ (n + 1) * wittMul p (n + 1) =
    -((p : 𝕄) ^ (n + 1) * X (0, n + 1)) * ((p : 𝕄) ^ (n + 1) * X (1, n + 1)) +
    (p : 𝕄) ^ (n + 1) * X (0, n + 1) * rename (Prod.mk (1 : Fin 2)) (wittPolynomial p ℤ (n + 1)) +
    (p : 𝕄) ^ (n + 1) * X (1, n + 1) * rename (Prod.mk (0 : Fin 2)) (wittPolynomial p ℤ (n + 1)) +
    (remainder p n - wittPolyProdRemainder p (n + 1))

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

↑p ^ (n + 1) * WittVector.wittMul p (n + 1) =
  -(↑p ^ (n + 1) * MvPolynomial.X (0, n + 1)) * (↑p ^ (n + 1) * MvPolynomial.X (1, n + 1)) +
        ↑p ^ (n + 1) * MvPolynomial.X (0, n + 1) * (MvPolynomial.rename (Prod.mk 1)) (wittPolynomial p ℤ (n + 1)) +
      ↑p ^ (n + 1) * MvPolynomial.X (1, n + 1) * (MvPolynomial.rename (Prod.mk 0)) (wittPolynomial p ℤ (n + 1)) +
    (WittVector.remainder p n - WittVector.wittPolyProdRemainder p (n + 1))


/-- The Fourier integral of an `L^1` function is a continuous function. -/
theorem fourierIntegral_continuous [FirstCountableTopology W] (he : Continuous e)
    (hL : Continuous fun p : V × W ↦ L p.1 p.2) {f : V → E} (hf : Integrable f μ) :
    Continuous (fourierIntegral e μ L f)

{𝕜 : Type u_1}
[CommRing 𝕜]
{V : Type u_2}
[AddCommGroup V]
[Module 𝕜 V]
[MeasurableSpace V]
{W : Type u_3}
[AddCommGroup W]
[Module 𝕜 W]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
[TopologicalSpace V]
[BorelSpace V]
[TopologicalSpace W]
{e : AddChar 𝕜 ↥𝕊}
{μ : MeasureTheory.Measure V}
{L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜}
[FirstCountableTopology W]
(he : Continuous ⇑e)
(hL : Continuous fun p => (L p.1) p.2)
{f : V → E}
(hf : MeasureTheory.Integrable f μ)

Continuous (VectorFourier.fourierIntegral e μ L f)


/-- The identity functor on `C`, viewed as a functor from `C` to its
monoidal opposite, upgraded to a braided functor. -/
@[simps!] def mopBraidedFunctor : BraidedFunctor C Cᴹᵒᵖ

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

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


/-- Combine a family of multilinear maps with the same domain and codomains `M' i` into a
multilinear map taking values in the space of functions `∀ i, M' i`. -/
@[simps]
def pi {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)] [∀ i, Module R (M' i)]
    (f : ∀ i, MultilinearMap R M₁ (M' i)) : MultilinearMap R M₁ (∀ i, M' i)

(f : (i : ι') → MultilinearMap R M₁ (M' i))


@[reassoc]
lemma ProjectiveResolution.iso_inv_naturality {X Y : C} (f : X ⟶ Y)
    (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f) :
    P.iso.inv ≫ (projectiveResolutions C).map f =
      (HomotopyCategory.quotient _ _).map φ ≫ Q.iso.inv

(P : CategoryTheory.ProjectiveResolution X)

(Q : CategoryTheory.ProjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (φ.f 0) (Q.π.f 0) = CategoryTheory.CategoryStruct.comp (P.π.f 0) f)

CategoryTheory.CategoryStruct.comp P.iso.inv ((CategoryTheory.projectiveResolutions C).map f) =
  CategoryTheory.CategoryStruct.comp ((HomotopyCategory.quotient C (ComplexShape.down ℕ)).map φ) Q.iso.inv


theorem mul_add_mod (m x y : Nat) : (m * x + y) % m = y % m


@[simp]
theorem toFinsupp_one : (1 : R[X]).toFinsupp = 1


@[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalSemiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : NonUnitalSemiring R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


@[simp]
theorem coe_fst : ⇑(fst R S) = Prod.fst

{R : Type u_3}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]


@[to_additive]
theorem Pi.monoidHom_injective {γ : Type w} [Nonempty I] [∀ i, MulOneClass (f i)] [MulOneClass γ]
    (g : ∀ i, γ →* f i) (hg : ∀ i, Function.Injective (g i)) :
    Function.Injective (Pi.monoidHom g)

(hg : ∀ (i : I), Function.Injective ⇑(g i))


theorem constantCoeff_comp_map (f : R →+* S₁) :
    (constantCoeff : MvPolynomial σ S₁ →+* S₁).comp (MvPolynomial.map f) = f.comp constantCoeff

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)

MvPolynomial.constantCoeff.comp (MvPolynomial.map f) = f.comp MvPolynomial.constantCoeff


/-- A *⋆-algebra* equivalence is an equivalence preserving addition, multiplication, scalar
multiplication and the star operation, which allows for considering both unital and non-unital
equivalences with a single structure. Currently, `AlgEquiv` requires unital algebras, which is
why this structure does not extend it. -/
structure StarAlgEquiv (R A B : Type*) [Add A] [Add B] [Mul A] [Mul B] [SMul R A] [SMul R B]
  [Star A] [Star B] extends A ≃+* B where
  /-- By definition, a ⋆-algebra equivalence preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)
  /-- By definition, a ⋆-algebra equivalence commutes with the action of scalars. -/
  map_smul' : ∀ (r : R) (a : A), toFun (r • a) = r • toFun a

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
(self : A ≃⋆ₐ[R] B)
(r : R)
(a : A)


theorem monomial_sub (n : ℕ) : monomial n (a - b) = monomial n a - monomial n b

(Polynomial.monomial n) (a - b) = (Polynomial.monomial n) a - (Polynomial.monomial n) b


@[to_additive]
theorem extend_one [One γ] (f : α → β) : Function.extend f (1 : α → γ) (1 : β → γ) = 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[One γ]
(f : α → β)


theorem evalFrom_of_pow {x y : List α} {s : σ} (hx : M.evalFrom s x = s)
    (hy : y ∈ ({x} : Language α)∗) : M.evalFrom s y = s

{α : Type u}
{σ : Type v}
(M : DFA α σ)
{x y : List α}
{s : σ}
(hx : M.evalFrom s x = s)
(hy : y ∈ {x}∗)


lemma eq_sUnion_finset_of_isTopologicalBasis_of_isCompact_open (b : Set (Set X))
    (hb : IsTopologicalBasis b) (U : Set X) (hUc : IsCompact U) (hUo : IsOpen U) :
    ∃ s : Finset b, U = s.toSet.sUnion

(hb : TopologicalSpace.IsTopologicalBasis b)


/-- If `φ : S₁ ⟶ S₂` is a morphism of short complexes such that `φ.τ₁` is epi, `φ.τ₂` is an iso
and `φ.τ₃` is mono, then a left homology data for `S₁` induces a left homology data for `S₂` with
the same `K` and `H` fields. The inverse construction is `ofEpiOfIsIsoOfMono'`. -/
@[simps]
noncomputable def ofEpiOfIsIsoOfMono (φ : S₁ ⟶ S₂) (h : LeftHomologyData S₁)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : LeftHomologyData S₂

(CategoryTheory.ShortComplex.LeftHomologyData.ofEpiOfIsIsoOfMono φ h).π = h.π


@[to_additive]
theorem smul_def : a • x = x.map (a • ·)

{M : Type u_1}
{α : Type u_3}
[SMul M α]
(a : M)
(x : Option α)


@[to_additive]
theorem tprod_bool (f : Bool → α) : ∏' i : Bool, f i = f false * f true

{α : Type u_1}
[AddCommMonoid α]
[TopologicalSpace α]
(f : Bool → α)


lemma sum_pow' (s : Finset ι) (f : ι → α) (n : ℕ) :
    (∑ a ∈ s, f a) ^ n = ∑ p ∈ piFinset fun _i : Fin n ↦ s, ∏ i, f (p i)

{ι : Type u_1}
{α : Type u_2}
[CommSemiring α]
(s : Finset ι)
(f : ι → α)
(n : ℕ)

(∑ a ∈ s, f a) ^ n = ∑ p ∈ Fintype.piFinset fun _i => s, ∏ i : Fin n, f (p i)


@[to_additive add_const]
theorem MonotoneOn.mul_const' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : MonotoneOn f s)
    (a : α) :
    MonotoneOn (fun x => f x * a) s

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


theorem min_of_nonempty {s : Finset α} (h : s.Nonempty) : ∃ a : α, s.min = a

{α : Type u_2}
[LinearOrder α]
{s : Finset α}
(h : s.Nonempty)


theorem subset_sSup_of_within [Inhabited s] {t : Set s}
    (h' : t.Nonempty) (h'' : BddAbove t)  (h : sSup ((↑) '' t : Set α) ∈ s) :
    sSup ((↑) '' t : Set α) = (@sSup s _ t : α)

{α : Type u_2}
(s : Set α)
[Preorder α]
[SupSet α]
[Inhabited ↑s]
{t : Set ↑s}
(h' : t.Nonempty)
(h'' : BddAbove t)
(h : sSup (Subtype.val '' t) ∈ s)


theorem associator_inv_hom {X Y Z : Action V G} :
    Hom.hom (α_ X Y Z).inv = (α_ X.V Y.V Z.V).inv

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.MonoidalCategory V]
{X Y Z : Action V G}

(CategoryTheory.MonoidalCategory.associator X Y Z).inv.hom =
  (CategoryTheory.MonoidalCategory.associator X.V Y.V Z.V).inv


/-- The isomorphism `(Γ₀.splitting K).nondegComplex ≅ K` for all `K : ChainComplex C ℕ`. -/
@[simps!]
def Γ₀NondegComplexIso (K : ChainComplex C ℕ) : (Γ₀.splitting K).nondegComplex ≅ K

(AlgebraicTopology.DoldKan.Γ₀NondegComplexIso K).hom.f i = 𝟙 ((AlgebraicTopology.DoldKan.Γ₀.splitting K).N i)


theorem convolution_mono_right_of_nonneg {f g g' : G → ℝ}
    (hfg' : ConvolutionExistsAt f g' x (lsmul ℝ ℝ) μ) (hf : ∀ x, 0 ≤ f x) (hg : ∀ x, g x ≤ g' x)
    (hg' : ∀ x, 0 ≤ g' x) : (f ⋆[lsmul ℝ ℝ, μ] g) x ≤ (f ⋆[lsmul ℝ ℝ, μ] g') x

(hfg' : MeasureTheory.ConvolutionExistsAt f g' x (ContinuousLinearMap.lsmul ℝ ℝ) μ)

MeasureTheory.convolution f g (ContinuousLinearMap.lsmul ℝ ℝ) μ x ≤
  MeasureTheory.convolution f g' (ContinuousLinearMap.lsmul ℝ ℝ) μ x


theorem norm_indicatorConstLp (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) :
    ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * (μ s).toReal ^ (1 / p.toReal)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
{hs : MeasurableSet s}
{hμs : μ s ≠ ⊤}
{c : E}
(hp_ne_zero : p ≠ 0)
(hp_ne_top : p ≠ ⊤)

‖MeasureTheory.indicatorConstLp p hs hμs c‖ = ‖c‖ * (μ s).toReal ^ (1 / p.toReal)


/-- If `c ∉ {0, ∞}` and `m₁ d ≤ c * m₂ d` for `d < ε` for some `ε > 0`
(we use `≤ᶠ[𝓝[≥] 0]` to state this), then `mkMetric m₁ hm₁ ≤ c • mkMetric m₂ hm₂`. -/
theorem mkMetric_mono_smul {m₁ m₂ : ℝ≥0∞ → ℝ≥0∞} {c : ℝ≥0∞} (hc : c ≠ ∞) (h0 : c ≠ 0)
    (hle : m₁ ≤ᶠ[𝓝[≥] 0] c • m₂) : (mkMetric m₁ : Measure X) ≤ c • mkMetric m₂

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{m₁ m₂ : ℝ≥0∞ → ℝ≥0∞}
{c : ℝ≥0∞}
(hc : c ≠ ⊤)
(h0 : c ≠ 0)
(hle : m₁ ≤ᶠ[𝓝[≥] 0] c • m₂)

MeasureTheory.Measure.mkMetric m₁ ≤ c • MeasureTheory.Measure.mkMetric m₂


/-- Given a map `f : C(X, Y)` and a set `S`, we can define a `HomotopyRel f f S` by setting
`F (t, x) = f x` for all `t`. This is defined using `HomotopyWith.refl`, but with the proof
filled in.
-/
@[simps!]
def refl (f : C(X, Y)) (S : Set X) : HomotopyRel f f S

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : C(X, Y))
(S : Set X)
(x : ↑I × X)

(ContinuousMap.HomotopyRel.refl f S) x = f x.2


@[simp]
theorem coassoc_symm :
    (TensorProduct.assoc R A A A).symm ∘ₗ comul.lTensor A ∘ₗ comul =
    comul.rTensor A ∘ₗ (comul (R := R))

{R : Type u}
{A : Type v}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Coalgebra R A]

↑(TensorProduct.assoc R A A A).symm ∘ₗ LinearMap.lTensor A Coalgebra.comul ∘ₗ Coalgebra.comul =
  LinearMap.rTensor A Coalgebra.comul ∘ₗ Coalgebra.comul


@[to_additive (attr := simp)]
lemma sup_one [SemilatticeSup β] [OrderBot β] (f : α → β) : sup 1 f = f 1

{α : Type u_2}
{β : Type u_3}
[One α]
[SemilatticeSup β]
[OrderBot β]
(f : α → β)


/-- If the counit of an is an isomorphism, one has an isomorphism `(R ⋙ L ⋙ R) ≅ R`. -/
@[simps!]
noncomputable def whiskerLeftRUnitIsoOfIsIsoCounit [IsIso h.counit] : R ⋙ L ⋙ R ≅ R

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
[CategoryTheory.IsIso h.counit]
(X : D)

h.whiskerLeftRUnitIsoOfIsIsoCounit.hom.app X = R.map (h.counit.app X)


/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A

{k G : Type u}
[CommRing k]
[Monoid G]
(A : Rep k G)
(x : CoeSort.coe A)

A.leftRegularHomEquiv.symm x = A.leftRegularHom x


/-- `ArgsRel` is well-founded. -/
theorem argsRel_wf : WellFounded ArgsRel


private theorem coprime_sq_sub_sq_add_of_even_odd {m n : ℤ} (h : Int.gcd m n = 1) (hm : m % 2 = 0)
    (hn : n % 2 = 1) : Int.gcd (m ^ 2 - n ^ 2) (m ^ 2 + n ^ 2) = 1


theorem le_iSup' (f : ι → α) (i : ι) : f i ≤ iSup f

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f : ι → α)
(i : ι)


theorem nhds_basis_closedBall_pow {r : ℝ} (h0 : 0 < r) (h1 : r < 1) :
    (𝓝 x).HasBasis (fun _ => True) fun n : ℕ => closedBall x (r ^ n)

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{r : ℝ}
(h0 : 0 < r)
(h1 : r < 1)

(𝓝 x).HasBasis (fun x => True) fun n => Metric.closedBall x (r ^ n)


@[simp]
theorem image_const_add_Ioo : (fun x => a + x) '' Ioo b c = Ioo (a + b) (a + c)

{M : Type u_1}
[OrderedCancelAddCommMonoid M]
[ExistsAddOfLE M]
(a b c : M)

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


@[to_additive (attr := simp)]
theorem mulSupport_inv' : mulSupport f⁻¹ = mulSupport f

{α : Type u_1}
{G : Type u_9}
[DivisionMonoid G]
(f : α → G)

Function.mulSupport f⁻¹ = Function.mulSupport f


@[simp] theorem ncard_inter_add_ncard_diff_eq_ncard (s t : Set α)
    (hs : s.Finite := by toFinite_tac) : (s ∩ t).ncard + (s \ t).ncard = s.ncard

{α : Type u_1}
(s t : Set α)
(hs : s.Finite := by toFinite_tac)


theorem exp_int_mul (z : ℂ) (n : ℤ) : Complex.exp (n * z) = Complex.exp z ^ n

Complex.exp (↑n * z) = Complex.exp z ^ n


/-- A version of `WithTop.map` for `RingHom`s. -/
@[simps (config := .asFn)]
protected def _root_.RingHom.withTopMap {R S : Type*} [CanonicallyOrderedCommSemiring R]
    [DecidableEq R] [Nontrivial R] [CanonicallyOrderedCommSemiring S] [DecidableEq S] [Nontrivial S]
    (f : R →+* S) (hf : Function.Injective f) : WithTop R →+* WithTop S

{R : Type u_2}
{S : Type u_3}
[CanonicallyOrderedCommSemiring R]
[DecidableEq R]
[Nontrivial R]
[CanonicallyOrderedCommSemiring S]
[DecidableEq S]
[Nontrivial S]
(f : R →+* S)
(hf : Function.Injective ⇑f)

⇑(f.withTopMap hf) = (↑(f.toMonoidWithZeroHom.withTopMap hf)).toFun


@[simp]
theorem card_ulift (α : Type*) : Nat.card (ULift α) = Nat.card α

Nat.card (ULift.{u_4, u_3} α) = Nat.card α


theorem lcm_mono (h : s₁ ⊆ s₂) : s₁.lcm f ∣ s₂.lcm f

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


lemma Y_ne_zero_of_Z_eq_zero [NoZeroDivisors R] {P : Fin 3 → R} (hP : W'.Nonsingular P)
    (hPz : P z = 0) : P y ≠ 0

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
[NoZeroDivisors R]
{P : Fin 3 → R}
(hP : W'.Nonsingular P)
(hPz : P z = 0)


@[to_additive (attr := simp)]
theorem map_comp_inl (f : M →* M') (g : N →* N') : (map f g).comp inl = inl.comp f

{M : Type u_1}
{N : Type u_2}
{M' : Type u_3}
{N' : Type u_4}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass M']
[AddZeroClass N']
(f : M →+ M')
(g : N →+ N')

(AddMonoid.Coprod.map f g).comp AddMonoid.Coprod.inl = AddMonoid.Coprod.inl.comp f


@[to_additive]
theorem subset_interior_mul_left : interior s * t ⊆ interior (s * t)

{α : Type u}
[TopologicalSpace α]
[AddGroup α]
[ContinuousConstVAdd αᵃᵒᵖ α]
{s t : Set α}


@[simp]
theorem snd_eps [Zero R] [One R] : snd ε = (1 : R)


theorem inf_sup_right (a b c : α) : (a ⊔ b) ⊓ c = a ⊓ c ⊔ b ⊓ c

{α : Type u}
[DistribLattice α]
(a b c : α)


theorem ssubset_iff_subset_not_subset : a ⊂ b ↔ a ⊆ b ∧ ¬b ⊆ a

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

a ⊂ b ↔ a ⊆ b ∧ ¬b ⊆ a


theorem not_isMax_natCast (x : ℕ) : ¬IsMax (x : PartENat)


theorem conjTranspose_map [Star α] [Star β] {A : Matrix m n α} (f : α → β)
    (hf : Function.Semiconj f star star) : Aᴴ.map f = (A.map f)ᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
[Star α]
[Star β]
{A : Matrix m n α}
(f : α → β)
(hf : Function.Semiconj f star star)


lemma toSlashInvariantForm_natCast (Γ : Subgroup SL(2, ℤ)) (n : ℕ) :
    (n : ModularForm Γ 0).toSlashInvariantForm = n


theorem setOf_wOppSide_eq_image2 {s : AffineSubspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) :
    { y | s.WOppSide x y } = Set.image2 (fun (t : R) q => t • (x -ᵥ p) +ᵥ q) (Set.Iic 0) s

{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 p : P}
(hx : x ∉ s)
(hp : p ∈ s)

{y | s.WOppSide x y} = Set.image2 (fun t q => t • (x -ᵥ p) +ᵥ q) (Set.Iic 0) ↑s


theorem Poly.denote_le_cancel_eq (ctx : Context) (m₁ m₂ : Poly) : denote_le ctx (cancel m₁ m₂) = denote_le ctx (m₁, m₂)

(ctx : Nat.Linear.Context)
(m₁ m₂ : Nat.Linear.Poly)

Nat.Linear.Poly.denote_le ctx (m₁.cancel m₂) = Nat.Linear.Poly.denote_le ctx (m₁, m₂)


/-- Another formulation of the reflection formula in terms of `Gammaℝ`. -/
lemma Gammaℝ_div_Gammaℝ_one_sub {s : ℂ} (hs : ∀ (n : ℕ), s ≠ -(2 * n + 1)) :
    Gammaℝ s / Gammaℝ (1 - s) = Gammaℂ s * cos (π * s / 2)

s.Gammaℝ / (1 - s).Gammaℝ = s.Gammaℂ * Complex.cos (↑π * s / 2)


theorem sup_sdiff_distrib (a b c : α) : (a ⊔ b) \ c = a \ c ⊔ b \ c

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


theorem Tendsto.isCompact_insert_range {f : ℕ → X} {x} (hf : Tendsto f atTop (𝓝 x)) :
    IsCompact (insert x (range f))

(hf : Filter.Tendsto f Filter.atTop (𝓝 x))


@[simp]
theorem isoWhiskerLeft_hom (F : C ⥤ D) {G H : D ⥤ E} (α : G ≅ H) :
    (isoWhiskerLeft F α).hom = whiskerLeft F α.hom

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

(CategoryTheory.isoWhiskerLeft F α).hom = CategoryTheory.whiskerLeft F α.hom


/-- Functor translating a monoid object in a functor category
to a functor into the category of monoid objects.
-/
@[simps]
def functor : Mon_ (C ⥤ D) ⥤ C ⥤ Mon_ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]

∀ {X Y : Mon_ (C ⥤ D)} (f : X ⟶ Y) (X_1 : C),
  ((CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.functor.map f).app X_1).hom = f.hom.app X_1


theorem Nonempty.of_vsub_left : (s -ᵥ t : Set α).Nonempty → s.Nonempty

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


@[simp] lemma sum'_ground_eq (M : ι → Matroid α) :
    (Matroid.sum' M).E = ⋃ i, Prod.mk i '' (M i).E

{α : Type u_1}
{ι : Type u_2}
(M : ι → Matroid α)


theorem Prod.noncompactSpace_iff :
    NoncompactSpace (X × Y) ↔ NoncompactSpace X ∧ Nonempty Y ∨ Nonempty X ∧ NoncompactSpace Y

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


@[simp]
theorem continuousAt_zpow {𝕜 : Type*} [NontriviallyNormedField 𝕜] {m : ℤ} {x : 𝕜} :
    ContinuousAt (fun x ↦ x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m

{𝕜 : Type u_4}
[NontriviallyNormedField 𝕜]
{m : ℤ}
{x : 𝕜}

ContinuousAt (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m


@[to_additive]
theorem le_one_of_mul_le_right [ContravariantClass α α (· * ·) (· ≤ ·)] {a b : α} (h : a * b ≤ a) :
    b ≤ 1

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


@[simp] lemma map_dual {hf} : (M.map f hf)✶ = M✶.map f hf

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{M : Matroid α}
{hf : Set.InjOn f M.E}


/-- A `V`-category is a category enriched in a monoidal category `V`.

Note that we do not assume that `V` is a concrete category,
so there may not be an "honest" underlying category at all!
-/
class EnrichedCategory (C : Type u₁) where
  Hom : C → C → V
  id (X : C) : 𝟙_ V ⟶ Hom X X
  comp (X Y Z : C) : Hom X Y ⊗ Hom Y Z ⟶ Hom X Z
  id_comp (X Y : C) : (λ_ (Hom X Y)).inv ≫ id X ▷ _ ≫ comp X X Y = 𝟙 _ := by aesop_cat
  comp_id (X Y : C) : (ρ_ (Hom X Y)).inv ≫ _ ◁ id Y ≫ comp X Y Y = 𝟙 _ := by aesop_cat
  assoc (W X Y Z : C) : (α_ _ _ _).inv ≫ comp W X Y ▷ _ ≫ comp W Y Z =
    _ ◁ comp X Y Z ≫ comp W X Z := by aesop_cat

[self : CategoryTheory.EnrichedCategory V C]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.associator (CategoryTheory.EnrichedCategory.Hom W X)
        (CategoryTheory.EnrichedCategory.Hom X Y) (CategoryTheory.EnrichedCategory.Hom Y Z)).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.EnrichedCategory.comp W X Y)
        (CategoryTheory.EnrichedCategory.Hom Y Z))
      (CategoryTheory.EnrichedCategory.comp W Y Z)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.EnrichedCategory.Hom W X)
      (CategoryTheory.EnrichedCategory.comp X Y Z))
    (CategoryTheory.EnrichedCategory.comp W X Z)


@[simp]
theorem tensorTensorTensorAssoc_symm_tmul (m : M) (n : N) (p : P) (q : Q) :
    (tensorTensorTensorAssoc R M N P Q).symm (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).symm ((m ⊗ₜ[R] n ⊗ₜ[R] p) ⊗ₜ[R] q) = (m ⊗ₜ[R] n) ⊗ₜ[R] p ⊗ₜ[R] q


protected theorem Associated.irreducible [Monoid α] {p q : α} (h : p ~ᵤ q) (hp : Irreducible p) :
    Irreducible q

{α : Type u_1}
[Monoid α]
{p q : α}
(h : p ~ᵤ q)
(hp : Irreducible p)


theorem sup_iInf_eq (a : α) (f : ι → α) : (a ⊔ ⨅ i, f i) = ⨅ i, a ⊔ f i

{α : Type u}
{ι : Sort w}
[Order.Coframe α]
(a : α)
(f : ι → α)


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

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

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


@[gcongr]
theorem prod_mono (hs : s₁ ⊆ s₂) (ht : t₁ ⊆ t₂) : s₁ ×ˢ t₁ ⊆ s₂ ×ˢ t₂

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{t₁ t₂ : Set β}
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊆ t₂)

s₁ ×ˢ t₁ ⊆ s₂ ×ˢ t₂


/-- Adding a point to a finite-dimensional subspace increases the dimension by at most one. -/
theorem finrank_vectorSpan_insert_le (s : AffineSubspace k P) (p : P) :
    finrank k (vectorSpan k (insert p (s : Set P))) ≤ finrank k s.direction + 1

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(s : AffineSubspace k P)
(p : P)

FiniteDimensional.finrank k ↥(vectorSpan k (insert p ↑s)) ≤ FiniteDimensional.finrank k ↥s.direction + 1


protected theorem Monotone.Ioi (hf : Monotone f) : Antitone fun x => Ioi (f x)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : Monotone f)


theorem fderiv_pi (h : ∀ i, DifferentiableAt 𝕜 (φ i) x) :
    fderiv 𝕜 (fun x i => φ i x) x = pi fun i => fderiv 𝕜 (φ i) x

(h : ∀ (i : ι), DifferentiableAt 𝕜 (φ i) x)

fderiv 𝕜 (fun x i => φ i x) x = ContinuousLinearMap.pi fun i => fderiv 𝕜 (φ i) x


/-- The distance equals the norm of subtracting two points. In this
lemma, it is necessary to have `V` as an explicit argument; otherwise
`rw dist_eq_norm_vsub'` sometimes doesn't work. -/
theorem dist_eq_norm_vsub' (x y : P) : dist x y = ‖y -ᵥ x‖

(V : Type u_2)
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y : P)


theorem Ioc_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Ioc a b ∈ 𝓝 x

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{a b x : α}
(ha : a < x)
(hb : x < b)


theorem toLp_injective [μ.IsOpenPosMeasure] [NormedField 𝕜] [NormedSpace 𝕜 E] :
    Function.Injective (⇑(toLp p μ 𝕜 : (α →ᵇ E) →L[𝕜] Lp E p μ))

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[μ.IsOpenPosMeasure]
[NormedField 𝕜]
[NormedSpace 𝕜 E]

Function.Injective ⇑(BoundedContinuousFunction.toLp p μ 𝕜)


/-- The `erase` function preserves the ordering invariants. -/
protected theorem Ordered.erase {t : RBNode α} (h : t.Ordered cmp) : (erase cut t).Ordered cmp

{α : Type u_1}
{cmp : α → α → Ordering}
{cut : α → Ordering}
{t : Batteries.RBNode α}
(h : Batteries.RBNode.Ordered cmp t)

Batteries.RBNode.Ordered cmp (Batteries.RBNode.erase cut t)


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

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


theorem opNorm_le_of_nhds_zero {f : E →SL[σ₁₂] F} {C : ℝ} (hC : 0 ≤ C)
    (hf : ∀ᶠ x in 𝓝 (0 : E), ‖f x‖ ≤ C * ‖x‖) : ‖f‖ ≤ C

{σ₁₂ : 𝕜 →+* 𝕜₂}

(hf : ∀ᶠ (x : E) in 𝓝 0, ‖f x‖ ≤ C * ‖x‖)


theorem rank_adjoin_simple_eq_one_iff :
    Module.rank F F⟮α⟯ = 1 ↔ α ∈ (⊥ : IntermediateField F E)

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


protected theorem le_add_left (h : μ ≤ ν) : μ ≤ ν' + ν

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


theorem kahler_mul (a x y : E) : o.kahler x a * o.kahler a y = ‖a‖ ^ 2 * o.kahler x y

[Fact (FiniteDimensional.finrank ℝ E = 2)]

(o.kahler x) a * (o.kahler a) y = ↑‖a‖ ^ 2 * (o.kahler x) y


theorem eval₂_eq_zero_of_dvd_of_eval₂_eq_zero (h : p ∣ q) (h0 : eval₂ f x p = 0) :
    eval₂ f x q = 0

{R : Type u}
{S : Type v}
[Semiring R]
{p q : R[X]}
[CommSemiring S]
(f : R →+* S)
(x : S)
(h : p ∣ q)
(h0 : Polynomial.eval₂ f x p = 0)


theorem is_fg_degreeLE [IsNoetherianRing R] (I : Ideal R[X]) (n : ℕ) :
    Submodule.FG (I.degreeLE n)

{R : Type u}
[CommRing R]
[IsNoetherianRing R]
(I : Ideal R[X])
(n : ℕ)


theorem destruct_congr {s t : WSeq α} :
    s ~ʷ t → Computation.LiftRel (BisimO (· ~ʷ ·)) (destruct s) (destruct t)

s ~ʷ t → Computation.LiftRel (Stream'.WSeq.BisimO fun x x_1 => x ~ʷ x_1) s.destruct t.destruct


@[simp]
theorem counit_comp_apply (f : F) (x : A) : counit (f x) = counit (R := R) x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{F : Type u_4}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[FunLike F A B]
[CoalgHomClass F R A B]
(f : F)
(x : A)

Coalgebra.counit (f x) = Coalgebra.counit x


theorem drop_length_cons {l : List α} (h : l ≠ []) (a : α) :
    (a :: l).drop l.length = [l.getLast h]

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

List.drop l.length (a :: l) = [l.getLast h]


theorem modEq_iff_toIcoMod_ne_toIocMod : a ≡ b [PMOD p] ↔ toIcoMod hp a b ≠ toIocMod hp a b

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


theorem abs_le_one_iff {a : ℤ} : |a| ≤ 1 ↔ a = 0 ∨ a = 1 ∨ a = -1


@[simp]
theorem star_zpow [Group R] [StarMul R] (x : R) (z : ℤ) : star (x ^ z) = star x ^ z

{R : Type u}
[Group R]
[StarMul R]
(x : R)
(z : ℤ)


@[to_additive (attr := simp, nolint simpNF)]
theorem mulEquivOfMulEquiv_mk' {k : LocalizationMap T Q} {j : M ≃* P} (H : S.map j.toMonoidHom = T)
    (x y) :
    f.mulEquivOfMulEquiv k H (f.mk' x y) = k.mk' (j x) ⟨j y, H ▸ Set.mem_image_of_mem j y.2⟩

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

(f.mulEquivOfMulEquiv k H) (f.mk' x y) = k.mk' (j x) ⟨j ↑y, ⋯⟩


theorem norm_Integral_le_one : ‖Integral‖ ≤ 1

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]

‖MeasureTheory.L1.SimpleFunc.integralCLM α E μ‖ ≤ 1


/-- If Cᵒᵖ is filtered, then C is cofiltered. -/
lemma isCofiltered_of_isFiltered_op [IsFiltered Cᵒᵖ] : IsCofiltered C

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


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

{A : Type u_17}
{B : Type u_18}
(R : Type u_19)
[Semiring R]
[AddCommGroup A]
[AddCommGroup B]
[Module R B]
(f : A →+ B)

(addMonoidHomLequivInt R) f = f.toIntLinearMap


theorem infs_infs_infs_comm : s ⊼ t ⊼ (u ⊼ v) = s ⊼ u ⊼ (t ⊼ v)

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


@[to_additive addOrderOf_eq_prime_pow]
theorem orderOf_eq_prime_pow (hnot : ¬x ^ p ^ n = 1) (hfin : x ^ p ^ (n + 1) = 1) :
    orderOf x = p ^ (n + 1)

{G : Type u_1}
[Monoid G]
{x : G}
{n p : ℕ}
[hp : Fact (Nat.Prime p)]
(hnot : ¬x ^ p ^ n = 1)
(hfin : x ^ p ^ (n + 1) = 1)


/-- See note [partially-applied ext lemmas]. -/
@[ext]
theorem hom_ext (φ ψ : Abelianization G →* A) (h : φ.comp of = ψ.comp of) : φ = ψ

(h : φ.comp Abelianization.of = ψ.comp Abelianization.of)


@[simp]
theorem QInfty_f_0 : (QInfty.f 0 : X _[0] ⟶ X _[0]) = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}

AlgebraicTopology.DoldKan.QInfty.f 0 = 0


/-- Strictly monotone functions preserve the colex ordering. -/
lemma toColex_image_lt_toColex_image (hf : StrictMono f) :
    toColex (s.image f) < toColex (t.image f) ↔ toColex s < toColex t

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

{ ofColex := Finset.image f s } < { ofColex := Finset.image f t } ↔ { ofColex := s } < { ofColex := t }


protected theorem add (hn : IsPeriodicPt f n x) (hm : IsPeriodicPt f m x) :
    IsPeriodicPt f (n + m) x

{α : Type u_1}
{f : α → α}
{x : α}
{m n : ℕ}
(hn : Function.IsPeriodicPt f n x)
(hm : Function.IsPeriodicPt f m x)


@[simp]
theorem coe_toDiffeomorph : ⇑e.toDiffeomorph = e

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


theorem of_comm {A ι : Type*} [CommRing A] (B : ι → AddSubgroup A)
    (inter : ∀ i j, ∃ k, B k ≤ B i ⊓ B j) (mul : ∀ i, ∃ j, (B j : Set A) * B j ⊆ B i)
    (leftMul : ∀ x : A, ∀ i, ∃ j, (B j : Set A) ⊆ (fun y : A => x * y) ⁻¹' B i) :
    RingSubgroupsBasis B

(inter : ∀ (i j : ι), ∃ k, B k ≤ B i ⊓ B j)

(mul : ∀ (i : ι), ∃ j, ↑(B j) * ↑(B j) ⊆ ↑(B i))

(leftMul : ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i))


lemma cons_mem_piFinset_cons {x₀ : α 0} {x : ∀ i : Fin n, α i.succ}
    {s₀ : Finset (α 0)} {s : ∀ i : Fin n, Finset (α i.succ)} :
    cons x₀ x ∈ piFinset (cons s₀ s) ↔ x₀ ∈ s₀ ∧ x ∈ piFinset s

{n : ℕ}
{α : Fin (n + 1) → Type u_1}
{x₀ : α 0}
{x : (i : Fin n) → α i.succ}
{s₀ : Finset (α 0)}
{s : (i : Fin n) → Finset (α i.succ)}

Fin.cons x₀ x ∈ Fintype.piFinset (Fin.cons s₀ s) ↔ x₀ ∈ s₀ ∧ x ∈ Fintype.piFinset s


@[simp] theorem le_toNat {n : Nat} {z : Int} (h : 0 ≤ z) : n ≤ z.toNat ↔ (n : Int) ≤ z


@[simp]
theorem swap_apply_left (a b : α) : swap a b a = b

{α : Sort u_1}
[DecidableEq α]
(a b : α)


/-- A continuous function which tendsto `Filter.atTop` along `Filter.atTop` and to `atBot` along
`at_bot` is surjective. -/
theorem Continuous.surjective {f : α → δ} (hf : Continuous f) (h_top : Tendsto f atTop atTop)
    (h_bot : Tendsto f atBot atBot) : Function.Surjective f

(h_top : Filter.Tendsto f Filter.atTop Filter.atTop)

(h_bot : Filter.Tendsto f Filter.atBot Filter.atBot)


protected theorem coe_add (x y : S) : (↑(x + y) : A) = ↑x + ↑y

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)
(x y : ↥S)


theorem StrictConcaveOn.convex_gt (hf : StrictConcaveOn 𝕜 s f) (r : β) :
    Convex 𝕜 ({ x ∈ s | r < f x })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConcaveOn 𝕜 s f)
(r : β)


theorem twoCocycles_map_one_snd (f : twoCocycles A) (g : G) :
    f.1 (g, 1) = A.ρ g (f.1 (1, 1))

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
(f : ↥(groupCohomology.twoCocycles A))
(g : G)


/-- (Implementation). Use `openCoverOfBase` instead. -/
@[simps! map]
def openCoverOfBase' (𝒰 : OpenCover Z) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)

(x :
  (i : (AlgebraicGeometry.Scheme.Pullback.openCoverOfLeft (𝒰.pullbackCover f) f g).J) ×
    ((fun i =>
          let Xᵢ := CategoryTheory.Limits.pullback f (𝒰.map i);
          let Yᵢ := CategoryTheory.Limits.pullback g (𝒰.map i);
          let W :=
            CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
              (CategoryTheory.Limits.pullback.snd f (𝒰.map i));
          let_fun this :=
            CategoryTheory.Limits.bigSquareIsPullback
              (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
                (CategoryTheory.Limits.pullback.snd f (𝒰.map i)))
              (CategoryTheory.Limits.pullback.fst g (𝒰.map i)) (CategoryTheory.Limits.pullback.snd f (𝒰.map i))
              (𝒰.map i)
              (CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
                (CategoryTheory.Limits.pullback.snd f (𝒰.map i)))
              (CategoryTheory.Limits.pullback.snd g (𝒰.map i)) g ⋯ ⋯
              (CategoryTheory.Limits.PullbackCone.isLimitOfFlip (CategoryTheory.Limits.pullbackIsPullback g (𝒰.map i)))
              (CategoryTheory.Limits.PullbackCone.isLimitOfFlip
                (CategoryTheory.Limits.pullbackIsPullback (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
                  (CategoryTheory.Limits.pullback.snd f (𝒰.map i))));
          AlgebraicGeometry.Scheme.openCoverOfIsIso
            ((CategoryTheory.Limits.pullbackSymmetry (CategoryTheory.Limits.pullback.snd f (𝒰.map i))
                  (CategoryTheory.Limits.pullback.snd g (𝒰.map i))).hom ≫
              (CategoryTheory.Limits.limit.isoLimitCone
                    {
                      cone :=
                        CategoryTheory.Limits.PullbackCone.mk
                          (CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
                            (CategoryTheory.Limits.pullback.snd f (𝒰.map i)))
                          (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd g (𝒰.map i))
                              (CategoryTheory.Limits.pullback.snd f (𝒰.map i)) ≫
                            CategoryTheory.Limits.pullback.fst g (𝒰.map i))
                          ⋯,
                      isLimit := this }).inv ≫
                CategoryTheory.Limits.pullback.map (CategoryTheory.Limits.pullback.snd f (𝒰.map i) ≫ 𝒰.map i) g
                  ((𝒰.pullbackCover f).map i ≫ f) g (𝟙 (CategoryTheory.Limits.pullback f (𝒰.map i))) (𝟙 Y) (𝟙 Z) ⋯ ⋯))
        i).J)

(AlgebraicGeometry.Scheme.Pullback.openCoverOfBase' 𝒰 f g).map x =
  (CategoryTheory.Limits.pullbackSymmetry (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst))
        (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))).hom ≫
    (CategoryTheory.Limits.limit.isoLimitCone
          {
            cone :=
              CategoryTheory.Limits.PullbackCone.mk
                (CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))
                  (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)))
                (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))
                    (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)) ≫
                  CategoryTheory.Limits.pullback.fst g (𝒰.map x.fst))
                ⋯,
            isLimit :=
              CategoryTheory.Limits.bigSquareIsPullback
                (CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))
                  (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)))
                (CategoryTheory.Limits.pullback.fst g (𝒰.map x.fst))
                (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)) (𝒰.map x.fst)
                (CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))
                  (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)))
                (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst)) g ⋯ ⋯
                (CategoryTheory.Limits.PullbackCone.isLimitOfFlip
                  (CategoryTheory.Limits.pullbackIsPullback g (𝒰.map x.fst)))
                (CategoryTheory.Limits.PullbackCone.isLimitOfFlip
                  (CategoryTheory.Limits.pullbackIsPullback (CategoryTheory.Limits.pullback.snd g (𝒰.map x.fst))
                    (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst)))) }).inv ≫
      CategoryTheory.Limits.pullback.map (CategoryTheory.Limits.pullback.snd f (𝒰.map x.fst) ≫ 𝒰.map x.fst) g
          (CategoryTheory.Limits.pullback.fst f (𝒰.map x.fst) ≫ f) g
          (𝟙 (CategoryTheory.Limits.pullback f (𝒰.map x.fst))) (𝟙 Y) (𝟙 Z) ⋯ ⋯ ≫
        CategoryTheory.Limits.pullback.map (CategoryTheory.Limits.pullback.fst f (𝒰.map x.fst) ≫ f) g f g
          (CategoryTheory.Limits.pullback.fst f (𝒰.map x.fst)) (𝟙 Y) (𝟙 Z) ⋯ ⋯


lemma singularPart_of_subset_compl_mutuallySingularSetSlice [IsFiniteKernel κ]
    [IsFiniteKernel η] {a : α} {s : Set γ} (hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ) :
    singularPart κ η a s = 0

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

(hs : s ⊆ (κ.mutuallySingularSetSlice η a)ᶜ)


theorem lex_def {r : ι → ι → Prop} {s : ∀ i, α i → α i → Prop} {a b : Π₀ i, α i} :
    DFinsupp.Lex r s a b ↔ ∃ j, (∀ d, r d j → a d = b d) ∧ s j (a j) (b j)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
{r : ι → ι → Prop}
{s : (i : ι) → α i → α i → Prop}
{a b : Π₀ (i : ι), α i}

DFinsupp.Lex r s a b ↔ ∃ j, (∀ (d : ι), r d j → a d = b d) ∧ s j (a j) (b j)


@[simp]
theorem closure_empty : closure (∅ : Set K) = ⊥


/-- A family of equivalences between fibers gives an equivalence between domains. -/
@[simps!]
def ofFiberEquiv {f : α → γ} {g : β → γ} (e : ∀ c, { a // f a = c } ≃ { b // g b = c }) : α ≃ β

∀ (a : β), (Equiv.ofFiberEquiv e).symm a = ↑((Equiv.sigmaCongrRight e).symm ((Equiv.sigmaFiberEquiv g).symm a)).snd


theorem isClosed_property2 [TopologicalSpace β] {e : α → β} {p : β → β → Prop} (he : DenseRange e)
    (hp : IsClosed { q : β × β | p q.1 q.2 }) (h : ∀ a₁ a₂, p (e a₁) (e a₂)) : ∀ b₁ b₂, p b₁ b₂

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace β]
{e : α → β}
{p : β → β → Prop}
(he : DenseRange e)
(hp : IsClosed {q | p q.1 q.2})
(h : ∀ (a₁ a₂ : α), p (e a₁) (e a₂))
(b₁ b₂ : β)


@[simp]
theorem bit_coe_nat (b) (n : ℕ) : bit b n = Nat.bit b n


@[symm]
theorem AntisymmRel.symm {a b : α} : AntisymmRel r a b → AntisymmRel r b a

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


@[to_additive (attr := simp)]
theorem coe_comap (S : Submonoid N) (f : F) : (S.comap f : Set M) = f ⁻¹' S

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


@[simp]
theorem Matrix.toLin_symm : (Matrix.toLin v₁ v₂).symm = LinearMap.toMatrix v₁ v₂

{R : Type u_1}
[CommSemiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Finite m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)


theorem mem_nhdsWithin_iff_eventually {s t : Set α} {x : α} :
    t ∈ 𝓝[s] x ↔ ∀ᶠ y in 𝓝 x, y ∈ s → y ∈ t

{α : Type u_1}
[TopologicalSpace α]
{s t : Set α}
{x : α}

t ∈ 𝓝[s] x ↔ ∀ᶠ (y : α) in 𝓝 x, y ∈ s → y ∈ t


/-- If `f` is invertible and closable as well as its closure being invertible, then
the graph of the inverse of the closure is given by the closure of the graph of the inverse. -/
theorem closure_inverse_graph (hf : LinearMap.ker f.toFun = ⊥) (hf' : f.IsClosable)
    (hcf : LinearMap.ker f.closure.toFun = ⊥) :
    f.closure.inverse.graph = f.inverse.graph.topologicalClosure


/-- If you add multiples of previous columns to the next columns, the determinant doesn't change. -/
theorem det_eq_of_forall_col_eq_smul_add_pred {n : ℕ} {A B : Matrix (Fin (n + 1)) (Fin (n + 1)) R}
    (c : Fin n → R) (A_zero : ∀ i, A i 0 = B i 0)
    (A_succ : ∀ (i) (j : Fin n), A i j.succ = B i j.succ + c j * A i (Fin.castSucc j)) :
    det A = det B

(A_zero : ∀ (i : Fin (n + 1)), A i 0 = B i 0)

(A_succ : ∀ (i : Fin (n + 1)) (j : Fin n), A i j.succ = B i j.succ + c j * A i j.castSucc)


@[to_additive (attr := simp, nolint simpNF)]
lemma finEquivZPowers_symm_apply (x : G) (hx) (n : ℕ) :
    (finEquivZPowers x hx).symm ⟨x ^ n, ⟨n, by simp⟩⟩ =
    ⟨n % orderOf x, Nat.mod_lt _ hx.orderOf_pos⟩

{G : Type u_1}
[AddGroup G]
(x : G)
(hx : IsOfFinAddOrder x)
(n : ℕ)

(finEquivZMultiples x hx).symm ⟨n • x, ⋯⟩ = ⟨n % addOrderOf x, ⋯⟩


theorem ContMDiff.clm_prodMap {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₄}
    (hg : ContMDiff I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g) (hf : ContMDiff I 𝓘(𝕜, F₂ →L[𝕜] F₄) n f) :
    ContMDiff I 𝓘(𝕜, F₁ × F₂ →L[𝕜] F₃ × F₄) n fun x => (g x).prodMap (f x)


@[deprecated getElem?_reverse (since := "2024-06-12")]
theorem get?_reverse {l : List α} {i} (h : i < length l) :
    get? l.reverse i = get? l (l.length - 1 - i)

{α : Type u_1}
{l : List α}
{i : Nat}
(h : i < l.length)

l.reverse.get? i = l.get? (l.length - 1 - i)


@[simp] theorem neg_eq_self_iff {a : R} : -a = a ↔ a = 0

{R : Type u_1}
[NonAssocRing R]
[NoZeroDivisors R]
[CharZero R]
{a : R}


@[to_additive (attr := simp, nolint simpNF)]
theorem mul_map_seq (x y : FreeSemigroup α) :
    ((· * ·) <$> x <*> y : Id (FreeSemigroup α)) = (x * y : FreeSemigroup α)

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


/-- The function that sends `x` to the `y`-derivative of `f(x,y)` at `g(x)` applied to `g₂(x)` is
`C^n` at `x₀`, where the derivative is taken as a continuous linear map.
We have to assume that `f` is `C^(n+1)` at `(x₀, g(x₀))` and `g` is `C^n` at `x₀`.
We have to insert a coordinate change from `x₀` to `g₁(x)` to make the derivative sensible.

This is similar to `ContMDiffAt.mfderiv`, but where the continuous linear map is applied to a
(variable) vector.
-/
theorem ContMDiffAt.mfderiv_apply {x₀ : N'} (f : N → M → M') (g : N → M) (g₁ : N' → N) (g₂ : N' → E)
    (hf : ContMDiffAt (J.prod I) I' n (Function.uncurry f) (g₁ x₀, g (g₁ x₀)))
    (hg : ContMDiffAt J I m g (g₁ x₀)) (hg₁ : ContMDiffAt J' J m g₁ x₀)
    (hg₂ : ContMDiffAt J' 𝓘(𝕜, E) m g₂ x₀) (hmn : m + 1 ≤ n) :
    ContMDiffAt J' 𝓘(𝕜, E') m
      (fun x => inTangentCoordinates I I' g (fun x => f x (g x))
        (fun x => mfderiv I I' (f x) (g x)) (g₁ x₀) (g₁ x) (g₂ x)) x₀

ContMDiffAt J' 𝓘(𝕜, E') m
  (fun x =>
    (inTangentCoordinates I I' g (fun x => f x (g x)) (fun x => mfderiv I I' (f x) (g x)) (g₁ x₀) (g₁ x)) (g₂ x))
  x₀


@[simp]
theorem flip_flip (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) : f.flip.flip = f

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P)


theorem cons_head!_tail [Inhabited α] {l : List α} (h : l ≠ []) : head! l :: tail l = l

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


theorem nhdsWithin_subtype (s : Set α) (a : { x // x ∈ s }) (t : Set { x // x ∈ s }) :
    𝓝[t] a = comap ((↑) : s → α) (𝓝[(↑) '' t] a)

{α : Type u_1}
[TopologicalSpace α]
(s : Set α)
(a : { x // x ∈ s })
(t : Set { x // x ∈ s })

𝓝[t] a = Filter.comap Subtype.val (𝓝[Subtype.val '' t] ↑a)


theorem smul [Monoid 𝕜] [DistribMulAction 𝕜 β] (hT : FinMeasAdditive μ T) (c : 𝕜) :
    FinMeasAdditive μ fun s => c • T s

(hT : MeasureTheory.FinMeasAdditive μ T)

MeasureTheory.FinMeasAdditive μ fun s => c • T s


/-- See <https://stacks.math.columbia.edu/tag/00Z7> -/
theorem isGLB_sInf (s : Set (GrothendieckTopology C)) : IsGLB s (sInf s)

(s : Set (CategoryTheory.GrothendieckTopology C))


theorem ext_num_den (hn : p.num = q.num) (hd : p.den = q.den) : p = q

{p q : ℚ≥0}
(hn : p.num = q.num)
(hd : p.den = q.den)


/-- The identity of a object in `Φ.RightResolution X₂`. -/
@[simps]
def Hom.id [W₁.ContainsIdentities] (R : Φ.RightResolution X₂) : Hom R R

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

(CategoryTheory.LocalizerMorphism.RightResolution.Hom.id R).f = CategoryTheory.CategoryStruct.id R.X₁


@[to_additive (attr := simp) sum_divisors_prime_pow]
theorem prod_divisors_prime_pow {α : Type*} [CommMonoid α] {k p : ℕ} {f : ℕ → α} (h : p.Prime) :
    (∏ x ∈ (p ^ k).divisors, f x) = ∏ x ∈ range (k + 1), f (p ^ x)

{α : Type u_1}
[AddCommMonoid α]
{k p : ℕ}
{f : ℕ → α}
(h : Nat.Prime p)

∑ x ∈ (p ^ k).divisors, f x = ∑ x ∈ Finset.range (k + 1), f (p ^ x)


lemma coeSubmodule_differentIdeal [NoZeroSMulDivisors A B] :
    coeSubmodule L (differentIdeal A B) = 1 / Submodule.traceDual A K 1

(A : Type u_1)
(K : Type u_2)
{L : Type u}
(B : Type u_3)
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]
[NoZeroSMulDivisors A B]

IsLocalization.coeSubmodule L (differentIdeal A B) = 1 / Submodule.traceDual A K 1


@[simp]
theorem coe_eval (n : ℕ) :
    (eval I M n : AdicCompletion I M → M ⧸ (I ^ n • ⊤ : Submodule R M)) = fun f => f.1 n

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
(n : ℕ)

⇑(AdicCompletion.eval I M n) = fun f => ↑f n


theorem sum_equiv_comp_eval_eq_elim : eval C ∘ (sum_equiv C hsC ho).toFun =
    (Sum.elim (fun (l : GoodProducts (π C (ord I · < o))) ↦ Products.eval C l.1)
    (fun (l : MaxProducts C ho) ↦ Products.eval C l.1))

(hsC : Profinite.NobelingProof.contained C (Order.succ o))

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

Profinite.NobelingProof.GoodProducts.eval C ∘ (Profinite.NobelingProof.GoodProducts.sum_equiv C hsC ho).toFun =
  Sum.elim (fun l => Profinite.NobelingProof.Products.eval C ↑l) fun l => Profinite.NobelingProof.Products.eval C ↑l


@[simp]
theorem mul_re (z w : ℤ√d) : (z * w).re = z.re * w.re + d * z.im * w.im


/-- If `q ≠ 0`, then `padicNorm p q ≠ 0`. -/
protected theorem nonzero {q : ℚ} (hq : q ≠ 0) : padicNorm p q ≠ 0

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{q : ℚ}
(hq : q ≠ 0)


theorem _root_.HasCompactSupport.convolutionExistsAt {x₀ : G}
    (h : HasCompactSupport fun t => L (f t) (g (x₀ - t))) (hf : LocallyIntegrable f μ)
    (hg : Continuous g) : ConvolutionExistsAt f g x₀ L μ

(h : HasCompactSupport fun t => (L (f t)) (g (x₀ - t)))

(hf : MeasureTheory.LocallyIntegrable f μ)

MeasureTheory.ConvolutionExistsAt f g x₀ L μ


@[simp, norm_cast] lemma coe_lt_one [One α] : (a : WithZero α) < 1 ↔ a < 1

{α : Type u_1}
[Preorder α]
{a : α}
[One α]


theorem not_terminates_empty : ¬Terminates (empty α)


@[simp]
theorem torusIntegral_dim0 (f : ℂ⁰ → E) (c : ℂ⁰) (R : ℝ⁰) : (∯ x in T(c, R), f x) = f c

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
(f : (Fin 0 → ℂ) → E)
(c : Fin 0 → ℂ)
(R : Fin 0 → ℝ)

(∯ (x : Fin 0 → ℂ) in T(c, R), f x) = f c


lemma smul_basis_mul_Y (p q : R[X]) : (p • (1 : W.CoordinateRing) + q • mk W Y) * mk W Y =
    (q * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) • (1 : W.CoordinateRing) +
      (p - q * (C W.a₁ * X + C W.a₃)) • mk W Y

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

(p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y) * (WeierstrassCurve.Affine.CoordinateRing.mk W) Y =
  (q *
        (Polynomial.X ^ 3 + Polynomial.C W.a₂ * Polynomial.X ^ 2 + Polynomial.C W.a₄ * Polynomial.X +
          Polynomial.C W.a₆)) •
      1 +
    (p - q * (Polynomial.C W.a₁ * Polynomial.X + Polynomial.C W.a₃)) • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y


@[to_additive (attr := aesop safe apply (rule_sets := [SetLike]))]
theorem zpow_mem {x : M} (hx : x ∈ K) : ∀ n : ℤ, x ^ n ∈ K

{M : Type u_5}
{S : Type u_6}
[SubNegMonoid M]
[SetLike S M]
[hSM : AddSubgroupClass S M]
{K : S}
{x : M}
(hx : x ∈ K)
(n : ℤ)


/-- An n x n matrix over a field has a finite spectrum. -/
theorem Matrix.finite_spectrum (A : Matrix n n R) : Set.Finite (spectrum R A)

{n : Type u_1}
{R : Type u_2}
[Field R]
[Fintype n]
[DecidableEq n]
(A : Matrix n n R)


protected theorem div_eq_of_eq_mul_left (H1 : 0 < n) (H2 : m = k * n) : m / n = k


@[simp]
theorem toSMul_apply (f : ι →ᵇᵃ[I₀] ℝ) (I : Box ι) (x : E) : f.toSMul I x = f I • x

{ι : Type u_1}
{I₀ : WithTop (BoxIntegral.Box ι)}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : BoxIntegral.BoxAdditiveMap ι ℝ I₀)
(I : BoxIntegral.Box ι)
(x : E)


@[simp] lemma find_lt_iff (h : ∃ n : ℕ, p n) (n : ℕ) : Nat.find h < n ↔ ∃ m < n, p m

{p : ℕ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
(n : ℕ)


theorem join_eq_some : x.join = some a ↔ x = some (some a)

∀ {α : Type u_1} {a : α} {x : Option (Option α)}, x.join = some a ↔ x = some (some a)


/-- A `MulEquiv` version of `Coprod.swap`. -/
@[to_additive (attr := simps! (config := .asFn))
  "An `AddEquiv` version of `AddMonoid.Coprod.swap`."]
def coprodComm : M ∗ N ≃* N ∗ M

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

⇑(Monoid.MulEquiv.coprodComm M N).symm = ⇑(Monoid.Coprod.swap N M)


theorem Antiperiodic.even_nsmul_periodic [AddMonoid α] [InvolutiveNeg β] (h : Antiperiodic f c)
    (n : ℕ) : Periodic f ((2 * n) • c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddMonoid α]
[InvolutiveNeg β]
(h : Function.Antiperiodic f c)
(n : ℕ)


theorem uncurry {f : α → β → σ} : Primrec (Function.uncurry f) ↔ Primrec₂ f

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


theorem _root_.LinearMap.annihilator_le_of_injective (f : M →ₗ[R] M') (hf : Function.Injective f) :
    Module.annihilator R M' ≤ Module.annihilator R M

{R : Type u}
{M : Type v}
{M' : Type u_1}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(f : M →ₗ[R] M')
(hf : Function.Injective ⇑f)


theorem sum_finsupport_smul_eq_finsum {M : Type*} [AddCommGroup M] [Module ℝ M] (φ : ι → X → M) :
    ∑ i ∈ ρ.finsupport x₀, ρ i x₀ • φ i x₀ = ∑ᶠ i, ρ i x₀ • φ i x₀

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(ρ : PartitionOfUnity ι X s)
{x₀ : X}
{M : Type u_2}
[AddCommGroup M]
[Module ℝ M]
(φ : ι → X → M)

∑ i ∈ ρ.finsupport x₀, (ρ i) x₀ • φ i x₀ = ∑ᶠ (i : ι), (ρ i) x₀ • φ i x₀