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

{α : Type u_1}
{n : Type u_3}
{m : Type u_4}
{A : Matrix m m α}
{B : Matrix m n α}
{C : Matrix n m α}
{D : Matrix n n α}
(hA : A.IsSymm)
(hBC : B.transpose = C)
(hD : D.IsSymm)


/-- An s-finite measure `μ` is sigma-finite iff `μ μ.sigmaFiniteSetᶜ = 0`. -/
lemma measure_compl_sigmaFiniteSet_eq_zero_iff_sigmaFinite (μ : Measure α) [SFinite μ] :
    μ μ.sigmaFiniteSetᶜ = 0 ↔ SigmaFinite μ

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]

μ μ.sigmaFiniteSetᶜ = 0 ↔ MeasureTheory.SigmaFinite μ


/-- (implementation detail) A function `Quot F → α` induces a cocone on `F` as long as the universes
    work out. -/
@[simps]
def toCocone {α : Type u} (f : Quot F → α) : Cocone F

(f : CategoryTheory.Limits.Types.Quot F → α)

(CategoryTheory.Limits.Types.toCocone f).pt = α


@[simp]
theorem expand_monomial (p : ℕ) (d : σ →₀ ℕ) (r : R) :
    expand p (monomial d r) = C r * ∏ i ∈ d.support, (X i ^ p) ^ d i

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(p : ℕ)
(d : σ →₀ ℕ)
(r : R)

(MvPolynomial.expand p) ((MvPolynomial.monomial d) r) = MvPolynomial.C r * ∏ i ∈ d.support, (MvPolynomial.X i ^ p) ^ d i


/-- The equivalence of categories expressing right unity of products of categories.  -/
@[simps]
def rightUnitorEquivalence : C × Discrete (PUnit : Type w) ≌ C

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

(CategoryTheory.prod.rightUnitorEquivalence C).counitIso =
  CategoryTheory.Iso.refl (CategoryTheory.prod.rightInverseUnitor C ⋙ CategoryTheory.prod.rightUnitor C)


@[norm_cast]
lemma cast_add_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q + r) = (q + r : α)

{α : Type u_3}
[DivisionSemiring α]
{q r : ℚ≥0}
(hq : ↑q.den ≠ 0)
(hr : ↑r.den ≠ 0)


theorem mul_le_nmul (a b : Ordinal.{u}) : a * b ≤ a ⨳ b


@[continuity, fun_prop]
theorem continuous_subtype_val : Continuous (@Subtype.val X p)

{X : Type u}
[TopologicalSpace X]
{p : X → Prop}


/-- The cardinal of the set of linearly independent vectors over a finite dimensional vector space
over a finite field. -/
theorem card_linearIndependent {k : ℕ} (hk : k ≤ n) :
    Nat.card { s : Fin k → V // LinearIndependent K s } =
      ∏ i : Fin k, (q ^ n - q ^ i.val)

(hk : k ≤ FiniteDimensional.finrank K V)

Nat.card { s // LinearIndependent K s } =
  ∏ i : Fin k, (Fintype.card K ^ FiniteDimensional.finrank K V - Fintype.card K ^ ↑i)


theorem Monic.eq_one_of_isUnit (hm : Monic p) (hpu : IsUnit p) : p = 1

{R : Type u}
[Semiring R]
{p : R[X]}
(hm : p.Monic)
(hpu : IsUnit p)


theorem finite_lt_nat (n : ℕ) : Set.Finite { i | i < n }


/-- If `s : ι → Set α` is an indexed family of sets, then finite intersections of `s i` form a basis
of `⨅ i, 𝓟 (s i)`.  -/
theorem hasBasis_iInf_principal_finite {ι : Type*} (s : ι → Set α) :
    (⨅ i, 𝓟 (s i)).HasBasis (fun t : Set ι => t.Finite) fun t => ⋂ i ∈ t, s i

{α : Type u_1}
{ι : Type u_6}
(s : ι → Set α)

(⨅ i, 𝓟 (s i)).HasBasis (fun t => t.Finite) fun t => ⋂ i ∈ t, s i


/-- `TopologicalSpace.Opens.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Closeds α`. -/
@[simps]
def Opens.complOrderIso : Opens α ≃o (Closeds α)ᵒᵈ

∀ (a : (TopologicalSpace.Closeds α)ᵒᵈ),
  (RelIso.symm (TopologicalSpace.Opens.complOrderIso α)) a = (TopologicalSpace.Closeds.compl ∘ ⇑OrderDual.ofDual) a


theorem left_inv (x : A ⊗ R[X]) : invFun R A ((toFunAlgHom R A) x) = x

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A ⊗[R] R[X])

PolyEquivTensor.invFun R A ((PolyEquivTensor.toFunAlgHom R A) x) = x


@[to_additive]
theorem mul_mem_cancel_right (h : a ∈ s) : b * a ∈ s ↔ b ∈ s

{G : Type u_1}
{a b : G}
[Group G]
{s : Set G}
(hs : IsSubgroup s)
(h : a ∈ s)


theorem bernoulli'_spec (n : ℕ) :
    (∑ k ∈ range n.succ, (n.choose (n - k) : ℚ) / (n - k + 1) * bernoulli' k) = 1

∑ k ∈ Finset.range n.succ, ↑(n.choose (n - k)) / (↑n - ↑k + 1) * bernoulli' k = 1


/-- The composition of morphisms in `Φ.LeftResolution X₂`. -/
@[simps]
def Hom.comp {L L' L'' : Φ.LeftResolution X₂}
    (φ : Hom L L') (ψ : Hom L' L'') :
    Hom L L''

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

(φ.comp ψ).f = CategoryTheory.CategoryStruct.comp φ.f ψ.f


/-- The functor `F.mapTriangle` commutes with the shift. -/
@[simps!]
noncomputable def mapTriangleCommShiftIso (n : ℤ) :
    Triangle.shiftFunctor C n ⋙ F.mapTriangle ≅ F.mapTriangle ⋙ Triangle.shiftFunctor D n

(X : CategoryTheory.Pretriangulated.Triangle C)

((F.mapTriangleCommShiftIso n).inv.app X).hom₃ = (F.commShiftIso n).inv.app X.obj₃


theorem Sublist.filter (p : α → Bool) {l₁ l₂} (s : l₁ <+ l₂) : filter p l₁ <+ filter p l₂

{α : Type u_1}
(p : α → Bool)
{l₁ l₂ : List α}
(s : l₁ <+ l₂)


/-- If `u` is a solution to `E` and `init` designates its first `E.order` values,
  then `∀ n, u n = E.mkSol init n`. -/
theorem eq_mk_of_is_sol_of_eq_init {u : ℕ → α} {init : Fin E.order → α} (h : E.IsSolution u)
    (heq : ∀ n : Fin E.order, u n = init n) : ∀ n, u n = E.mkSol init n

(heq : ∀ (n : Fin E.order), u ↑n = init n)


@[to_additive]
theorem finprod_set_coe_eq_finprod_mem (s : Set α) : ∏ᶠ j : s, f j = ∏ᶠ i ∈ s, f i

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

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


/-- If `v` is an additive valuation on a division ring then `v(x) = ⊤` iff `x = 0`. -/
@[simp]
theorem top_iff [Nontrivial Γ₀] (v : AddValuation K Γ₀) {x : K} : v x = (⊤ : Γ₀) ↔ x = 0

{K : Type u_1}
[DivisionRing K]
{Γ₀ : Type u_4}
[LinearOrderedAddCommMonoidWithTop Γ₀]
[Nontrivial Γ₀]
(v : AddValuation K Γ₀)
{x : K}


@[simp]
theorem mapRange.addEquiv_toAddMonoidHom (f : M ≃+ N) :
    ((mapRange.addEquiv f : (α →₀ _) ≃+ _) : _ →+ _) =
      (mapRange.addMonoidHom f.toAddMonoidHom : (α →₀ _) →+ _)

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
(f : M ≃+ N)

↑(Finsupp.mapRange.addEquiv f) = Finsupp.mapRange.addMonoidHom f.toAddMonoidHom


@[to_additive (attr := continuity, fun_prop)]
theorem Continuous.const_smul (hg : Continuous g) (c : M) : Continuous fun x => c • g x

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[SMul M α]
[ContinuousConstSMul M α]
[TopologicalSpace β]
{g : β → α}
(hg : Continuous g)
(c : M)


@[to_additive (attr := simp)]
theorem coeMonoidHom_apply (s : Finset α) : coeMonoidHom s = s

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


@[simp]
theorem Iic_inf [SemilatticeInf α] (a b : α) : Iic (a ⊓ b) = Iic a ⊓ Iic b

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

LowerSet.Iic (a ⊓ b) = LowerSet.Iic a ⊓ LowerSet.Iic b


@[simp] lemma bot_ne_ofNat (n : ℕ) [n.AtLeastTwo] : (⊥ : WithBot α) ≠ no_index (OfNat.ofNat n)

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]


/-- A morphism between target objects `T ⟶ T'`
covariantly induces a functor between costructured arrows,
`CostructuredArrow S T ⥤ CostructuredArrow S T'`.

Ideally this would be described as a 2-functor from `D`
(promoted to a 2-category with equations as 2-morphisms)
to `Cat`.
-/
@[simps!]
def map (f : T ⟶ T') : CostructuredArrow S T ⥤ CostructuredArrow S T'

(X : CategoryTheory.Comma S (CategoryTheory.Functor.fromPUnit T))

((CategoryTheory.CostructuredArrow.map f).obj X).hom = CategoryTheory.CategoryStruct.comp X.hom f


theorem isFiniteMeasure_withDensity_ofReal {f : α → ℝ} (hfi : HasFiniteIntegral f μ) :
    IsFiniteMeasure (μ.withDensity fun x => ENNReal.ofReal <| f x)

(hfi : MeasureTheory.HasFiniteIntegral f μ)

MeasureTheory.IsFiniteMeasure (μ.withDensity fun x => ENNReal.ofReal (f x))


/-- The "clifford conjugate" maps to the quaternion conjugate. -/
theorem toQuaternion_star (c : CliffordAlgebra (Q c₁ c₂)) :
    toQuaternion (star c) = star (toQuaternion c)

(c : CliffordAlgebra (CliffordAlgebraQuaternion.Q c₁ c₂))

CliffordAlgebraQuaternion.toQuaternion (star c) = star (CliffordAlgebraQuaternion.toQuaternion c)


@[simp]
theorem id_apply (X : ∀ i, C i) (i) : (𝟙 X : ∀ i, X i ⟶ X i) i = 𝟙 (X i)

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

CategoryTheory.CategoryStruct.id X i = CategoryTheory.CategoryStruct.id (X i)


@[simp]
theorem integrable_const [IsFiniteMeasure μ] (c : β) : Integrable (fun _ : α => c) μ

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


/-- If `L` is a finite separable extension of `K = Frac(A)`, where `A` is
integrally closed and Noetherian, the integral closure `C` of `A` in `L` is
Noetherian. -/
theorem IsIntegralClosure.isNoetherianRing [IsIntegrallyClosed A] [IsNoetherianRing A] :
    IsNoetherianRing C

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


@[simp]
theorem differentiableAt_tan {x : ℂ} : DifferentiableAt ℂ tan x ↔ cos x ≠ 0

DifferentiableAt ℂ Complex.tan x ↔ Complex.cos x ≠ 0


theorem finite_support (f : Π₀ i, β i) : Set.Finite { i | f i ≠ 0 }

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(f : Π₀ (i : ι), β i)


theorem set_eq_modifyNth (a : α) : ∀ n (l : List α), set l n a = modifyNth (fun _ => a) n l

{α : Type u_1}
(a : α)
(n : Nat)
(l : List α)

l.set n a = List.modifyNth (fun x => a) n l


theorem extendSubtype_apply_of_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : p x) :
    e.extendSubtype x = e ⟨x, hx⟩

{α : Type u_1}
[Finite α]
{p q : α → Prop}
[DecidablePred p]
[DecidablePred q]
(e : { x // p x } ≃ { x // q x })
(x : α)
(hx : p x)


@[ext] theorem hom_ext {X Y : Dial C} {x y : X ⟶ Y} (hf : x.f = y.f) (hF : x.F = y.F) : x = y


@[reassoc (attr := simp)]
theorem pentagon_inv (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    f ◁ (α_ g h i).inv ≫ (α_ f (g ≫ h) i).inv ≫ (α_ f g h).inv ▷ i =
      (α_ f g (h ≫ i)).inv ≫ (α_ (f ≫ g) h i).inv

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).inv)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).inv
      (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).inv i)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).inv
    (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).inv


/-- Auxiliary lemma for `rnDeriv_withDensity_right`. -/
lemma rnDeriv_withDensity_withDensity_rnDeriv_right (μ ν : Measure α) [SigmaFinite μ]
    [SigmaFinite ν] (hf : AEMeasurable f ν) (hf_ne_zero : ∀ᵐ x ∂ν, f x ≠ 0)
    (hf_ne_top : ∀ᵐ x ∂ν, f x ≠ ∞) :
    (ν.withDensity (μ.rnDeriv ν)).rnDeriv (ν.withDensity f) =ᵐ[ν] μ.rnDeriv (ν.withDensity f)

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℝ≥0∞}
(μ ν : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hf : AEMeasurable f ν)
(hf_ne_zero : ∀ᵐ (x : α) ∂ν, f x ≠ 0)
(hf_ne_top : ∀ᵐ (x : α) ∂ν, f x ≠ ⊤)


/-- The functor `LeftExtension L' F ⥤ LeftExtension L F`
induced by a natural transformation `L' ⟶ L ⋙ G'`. -/
@[simps!]
def LeftExtension.postcomp₁ (f : L' ⟶ L ⋙ G) (F : C ⥤ H) :
    LeftExtension L' F ⥤ LeftExtension L F

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

((CategoryTheory.Functor.LeftExtension.postcomp₁ G f F).obj X).left = X.left


theorem dual_rank_eq [Module.Finite K V] :
    Cardinal.lift.{uK,uV} (Module.rank K V) = Module.rank K (Dual K V)

{K : Type uK}
{V : Type uV}
[CommRing K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
[Module.Finite K V]

Cardinal.lift.{uK, uV} (Module.rank K V) = Module.rank K (Module.Dual K V)


@[simp] theorem truncate_cast {h : w = v} : (cast h x).truncate k = x.truncate k

{w v : Nat}
{x : BitVec w}
{k : Nat}
{h : w = v}

BitVec.truncate k (BitVec.cast h x) = BitVec.truncate k x


theorem eLpNormEssSup_map_measure (hg : AEStronglyMeasurable g (Measure.map f μ))
    (hf : AEMeasurable f μ) : eLpNormEssSup g (Measure.map f μ) = eLpNormEssSup (g ∘ f) μ

(hg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map f μ))

MeasureTheory.eLpNormEssSup g (MeasureTheory.Measure.map f μ) = MeasureTheory.eLpNormEssSup (g ∘ f) μ


@[to_additive]
theorem Group.rank_range_le [Group.FG G] {f : G →* G'} : Group.rank f.range ≤ Group.rank G

{G : Type u_3}
[AddGroup G]
{G' : Type u_5}
[AddGroup G']
[AddGroup.FG G]
{f : G →+ G'}

AddGroup.rank ↥f.range ≤ AddGroup.rank G


theorem zero_le_toSignedMeasure : 0 ≤ μ.toSignedMeasure

{α : Type u_1}
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]


@[to_additive zero_lt_one_add_norm_sq]
theorem zero_lt_one_add_norm_sq' (x : E) : 0 < 1 + ‖x‖ ^ 2

{E : Type u_6}
[SeminormedAddGroup E]
(x : E)


theorem deriv_clm_apply (hc : DifferentiableAt 𝕜 c x) (hu : DifferentiableAt 𝕜 u x) :
    deriv (fun y => (c y) (u y)) x = deriv c x (u x) + c x (deriv u x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{G : Type u_2}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{c : 𝕜 → F →L[𝕜] G}
{u : 𝕜 → F}
(hc : DifferentiableAt 𝕜 c x)
(hu : DifferentiableAt 𝕜 u x)

deriv (fun y => (c y) (u y)) x = (deriv c x) (u x) + (c x) (deriv u x)


theorem locallyConnectedSpace_of_connected_bases {ι : Type*} (b : α → ι → Set α) (p : α → ι → Prop)
    (hbasis : ∀ x, (𝓝 x).HasBasis (p x) (b x))
    (hconnected : ∀ x i, p x i → IsPreconnected (b x i)) : LocallyConnectedSpace α

(hbasis : ∀ (x : α), (𝓝 x).HasBasis (p x) (b x))

(hconnected : ∀ (x : α) (i : ι), p x i → IsPreconnected (b x i))


@[to_additive]
lemma mem_stabilizer_set {s : Set α} : a ∈ stabilizer G s ↔ ∀ b, a • b ∈ s ↔ b ∈ s

{G : Type u_1}
{α : Type u_3}
[AddGroup G]
[AddAction G α]
{a : G}
{s : Set α}

a ∈ AddAction.stabilizer G s ↔ ∀ (b : α), a +ᵥ b ∈ s ↔ b ∈ s


theorem cardinal_mk_le_max : #{ x : A // IsAlgebraic R x } ≤ max #R ℵ₀

(R A : Type u)
[CommRing R]
[CommRing A]
[IsDomain A]
[Algebra R A]
[NoZeroSMulDivisors R A]


theorem find_eq_some_iff {p : Fin n → Prop} [DecidablePred p] {i : Fin n} :
    Fin.find p = some i ↔ p i ∧ ∀ j, p j → i ≤ j

{n : ℕ}
{p : Fin n → Prop}
[DecidablePred p]
{i : Fin n}

Fin.find p = some i ↔ p i ∧ ∀ (j : Fin n), p j → i ≤ j


{R : Type x}
[Monoid R]
[HasDistribNeg R]
(a : R)
(n : ℕ)


/-- One can bound `‖w‖^n * ‖D^k (𝓕 f) w‖` in terms of integrals of the derivatives of `f` (or order
at most `n`) multiplied by powers of `v` (of order at most `k`). -/
lemma pow_mul_norm_iteratedFDeriv_fourierIntegral_le [FiniteDimensional ℝ V]
    {K N : ℕ∞} (hf : ContDiff ℝ N f)
    (h'f : ∀ (k n : ℕ), k ≤ K → n ≤ N → Integrable (fun v ↦ ‖v‖^k * ‖iteratedFDeriv ℝ n f v‖))
    {k n : ℕ} (hk : k ≤ K) (hn : n ≤ N) (w : V) :
    ‖w‖ ^ n * ‖iteratedFDeriv ℝ k (𝓕 f) w‖ ≤ (2 * π) ^ k * (2 * k + 2) ^ n *
      ∑ p in Finset.range (k + 1) ×ˢ Finset.range (n + 1),
        ∫ v, ‖v‖ ^ p.1 * ‖iteratedFDeriv ℝ p.2 f v‖

(h'f :
  ∀ (k n : ℕ),
    ↑k ≤ K → ↑n ≤ N → MeasureTheory.Integrable (fun v => ‖v‖ ^ k * ‖iteratedFDeriv ℝ n f v‖) MeasureTheory.volume)

‖w‖ ^ n * ‖iteratedFDeriv ℝ k (𝓕 f) w‖ ≤
  (2 * π) ^ k * (2 * ↑k + 2) ^ n *
    ∑ p ∈ Finset.range (k + 1) ×ˢ Finset.range (n + 1), ∫ (v : V), ‖v‖ ^ p.1 * ‖iteratedFDeriv ℝ p.2 f v‖


/-- If `R →+* A` is injective, and `A` is of characteristic `p`, then `R` is also of
characteristic `p`. Similar to `RingHom.charZero`. -/
theorem RingHom.charP {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) [CharP A p] : CharP R p

{R : Type u_1}
{A : Type u_2}
[NonAssocSemiring R]
[NonAssocSemiring A]
(f : R →+* A)
(H : Function.Injective ⇑f)
(p : ℕ)
[CharP A p]


@[simp]
theorem coe_card (l : List α) : card (l : Multiset α) = length l


/-- `x + 0` is equivalent to `x`. -/
theorem add_zero_equiv (x : PGame.{u}) : x + 0 ≈ x


theorem nhdsWithin_eq_nhdsWithin' {a : α} {s t u : Set α} (hs : s ∈ 𝓝 a) (h₂ : t ∩ s = u ∩ s) :
    𝓝[t] a = 𝓝[u] a

{α : Type u_1}
[TopologicalSpace α]
{a : α}
{s t u : Set α}
(hs : s ∈ 𝓝 a)
(h₂ : t ∩ s = u ∩ s)


protected theorem eq_true_of_true_le : ∀ {x : Bool}, true ≤ x → x = true


@[to_additive (attr := simp)]
theorem one_compContinuous [TopologicalSpace γ] (f : C(γ, α)) : (1 : α →ᵇ β).compContinuous f = 1

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero β]
[TopologicalSpace γ]
(f : C(γ, α))

BoundedContinuousFunction.compContinuous 0 f = 0


@[simp] theorem one_den : (1 : Rat).den = 1


/-- Given an inducing map of a topological space into a pseudo metrizable space, the source space
is also pseudo metrizable. -/
theorem _root_.Inducing.pseudoMetrizableSpace [PseudoMetrizableSpace Y] {f : X → Y}
    (hf : Inducing f) : PseudoMetrizableSpace X


@[simp]
theorem mem_Ici_iff : b ∈ Ici a ↔ a ≤ b


@[simp] theorem down_sdiff [SDiff α] (a b : ULift α) : down (a \ b) = down a \ down b

{α : Type u}
[SDiff α]
(a b : ULift.{u_1, u} α)


theorem liftCover_restrict {i : ι} : (liftCover S φ hφ hS).restrict (S i) = φ i

{hφ : ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j), (φ i) ⟨x, hxi⟩ = (φ j) ⟨x, hxj⟩}

ContinuousMap.restrict (S i) (ContinuousMap.liftCover S φ hφ hS) = φ i


theorem wronskian_self_eq_zero (a : R[X]) : wronskian a a = 0


lemma eventuallyConst_atTop [SemilatticeSup α] [Nonempty α] :
    EventuallyConst f atTop ↔ (∃ i, ∀ j, i ≤ j → f j = f i)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[SemilatticeSup α]
[Nonempty α]

Filter.EventuallyConst f Filter.atTop ↔ ∃ i, ∀ (j : α), i ≤ j → f j = f i


/-- Unlike `support_congr`, which assumes that `∀ (x ∈ g.support), f x = g x)`, here
we have the weaker assumption that `∀ (x ∈ f.support), f x = g x`. -/
theorem IsCycle.support_congr (hf : IsCycle f) (hg : IsCycle g) (h : f.support ⊆ g.support)
    (h' : ∀ x ∈ f.support, f x = g x) : f = g

{α : Type u_2}
{f g : Equiv.Perm α}
[DecidableEq α]
[Fintype α]
(hf : f.IsCycle)
(hg : g.IsCycle)
(h : f.support ⊆ g.support)
(h' : ∀ x ∈ f.support, f x = g x)


protected theorem subsingleton_iff : Subsingleton R⟦X⟧ ↔ Subsingleton R

Subsingleton (PowerSeries R) ↔ Subsingleton R


theorem vonMangoldt_apply_pow {n k : ℕ} (hk : k ≠ 0) : Λ (n ^ k) = Λ n

ArithmeticFunction.vonMangoldt (n ^ k) = ArithmeticFunction.vonMangoldt n


@[simp]
theorem withTop_comp (f : InfHom β γ) (g : InfHom α β) :
    (f.comp g).withTop = f.withTop.comp g.withTop

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[SemilatticeInf α]
[SemilatticeInf β]
[SemilatticeInf γ]
(f : InfHom β γ)
(g : InfHom α β)


theorem tendsto_diag : Tendsto (fun i => (i, i)) f (f ×ˢ f)

Filter.Tendsto (fun i => (i, i)) f (f ×ˢ f)


/-- The `changeLevel` map is injective (except in the degenerate case `m = 0`). -/
lemma changeLevel_injective {m : ℕ} [NeZero m] (hm : n ∣ m) :
    Function.Injective (changeLevel (R := R) hm)

{R : Type u_1}
[CommMonoidWithZero R]
{n m : ℕ}
[NeZero m]
(hm : n ∣ m)


theorem mul_rpow_of_ne_top {x y : ℝ≥0∞} (hx : x ≠ ⊤) (hy : y ≠ ⊤) (z : ℝ) :
    (x * y) ^ z = x ^ z * y ^ z


@[to_additive]
theorem lipschitz_with_lipschitz_const_mul :
    ∀ p q : β × β, dist (p.1 * p.2) (q.1 * q.2) ≤ LipschitzMul.C β * dist p q

{β : Type u_2}
[PseudoMetricSpace β]
[Monoid β]
[LipschitzMul β]
(p q : β × β)

dist (p.1 * p.2) (q.1 * q.2) ≤ ↑(LipschitzMul.C β) * dist p q


protected theorem pow_sub_mul_pow (a : Nat) {m n : Nat} (h : m ≤ n) :
    a ^ (n - m) * a ^ m = a ^ n


@[to_additive]
theorem ContMDiff.div_const (hf : ContMDiff I' I n f) :
    ContMDiff I' I n (fun x ↦ f x / c)

{𝕜 : 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}
[DivInvMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f : M → G}
{n : ℕ∞}
(c : G)
(hf : ContMDiff I' I n f)


theorem eq_neg_one_iff' {a : ℕ} : legendreSym p a = -1 ↔ ¬IsSquare (a : ZMod p)


theorem dualLift_injective : Function.Injective W.dualLift

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
{W : Subspace K V}


theorem Continuous.comp_continuousOn {g : β → γ} {f : α → β} {s : Set α} (hg : Continuous g)
    (hf : ContinuousOn f s) : ContinuousOn (g ∘ f) s

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


/-- Taking a product over `f : α →₀ M` is the same as multiplying the value on a single element
`y ∈ f.support` by the product over `erase y f`. -/
@[to_additive
      " Taking a sum over `f : α →₀ M` is the same as adding the value on a
      single element `y ∈ f.support` to the sum over `erase y f`. "]
theorem mul_prod_erase (f : α →₀ M) (y : α) (g : α → M → N) (hyf : y ∈ f.support) :
    g y (f y) * (erase y f).prod g = f.prod g

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
(f : α →₀ M)
(y : α)
(g : α → M → N)
(hyf : y ∈ f.support)

g y (f y) * (Finsupp.erase y f).prod g = f.prod g


theorem liftPropOn_of_mem_groupoid (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y)
    {f : PartialHomeomorph H H} (hf : f ∈ G) : LiftPropOn Q f f.source

{H : Type u_1}
[TopologicalSpace H]
{G : StructureGroupoid H}
{Q : (H → H) → Set H → H → Prop}
(hG : G.LocalInvariantProp G Q)
(hQ : ∀ (y : H), Q id Set.univ y)
{f : PartialHomeomorph H H}
(hf : f ∈ G)


@[simp] lemma intCast_left : Commute (n : α) a

{α : Type u_3}
[NonAssocRing α]
{a : α}
{n : ℤ}


theorem getI_eq_default {n : ℕ} (hn : l.length ≤ n) : l.getI n = default

{α : Type u}
(l : List α)
[Inhabited α]
{n : ℕ}
(hn : l.length ≤ n)


theorem eq_mk_of_mem {q : Semiquot α} {a : α} (h : a ∈ q) : q = @mk _ a q.1 h

{α : Type u_1}
{q : Semiquot α}
{a : α}
(h : a ∈ q)


lemma eq_one_of_isUnit_natCast {n : ℕ} (h : IsUnit (n : ZMod 0)) : n = 1


theorem natDegree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : p.natDegree ≤ q.natDegree

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : R[X]}
(h1 : p ∣ q)
(h2 : q ≠ 0)


@[to_additive]
theorem le_self_mul : a ≤ a * c

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a c : α}


@[simp]
theorem mkAlgHom_coe (s : A → A → Prop) : (mkAlgHom S s : A →+* RingQuot s) = mkRingHom s

(S : Type uS)
[CommSemiring S]
{A : Type uA}
[Semiring A]
[Algebra S A]
(s : A → A → Prop)

↑(RingQuot.mkAlgHom S s) = RingQuot.mkRingHom s


/-- Hölder's inequality, as an inequality on the `ℒp` seminorm of an elementwise operation
`fun x => b (f x) (g x)`. -/
theorem eLpNorm_le_eLpNorm_mul_eLpNorm'_of_norm {p q r : ℝ≥0∞} (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) (b : E → F → G)
    (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖ ≤ ‖f x‖ * ‖g x‖) (hpqr : 1 / p = 1 / q + 1 / r) :
    eLpNorm (fun x => b (f x) (g x)) p μ ≤ eLpNorm f q μ * eLpNorm g r μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

(h : ∀ᵐ (x : α) ∂μ, ‖b (f x) (g x)‖ ≤ ‖f x‖ * ‖g x‖)

MeasureTheory.eLpNorm (fun x => b (f x) (g x)) p μ ≤ MeasureTheory.eLpNorm f q μ * MeasureTheory.eLpNorm g r μ


lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s)

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{u : β → α}
{s : Set β}
[DecidablePred fun x => x ∈ s]
{v : β → α}

Filter.limsup (s.piecewise u v) f = (Filter.blimsup u f fun x => x ∈ s) ⊔ Filter.blimsup v f fun x => x ∉ s


theorem add_mul_left_right : IsRelPrime x (y + x * z)

{R : Type u_1}
[CommRing R]
{x y : R}
(h : IsRelPrime x y)
(z : R)


theorem constr_eq {g : ι → M'} {f : M →ₗ[R] M'} (h : ∀ i, g i = f (b i)) :
    constr (M' := M') b S g = f

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(S : Type u_10)
[Semiring S]
[Module S M']
[SMulCommClass R S M']
{g : ι → M'}
{f : M →ₗ[R] M'}
(h : ∀ (i : ι), g i = f (b i))


theorem add_apply (f g : P →ᴬ[R] W) (x : P) : (f + g) x = f x + g x

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


protected theorem exists_not_mem_row (μ : YoungDiagram) (i : ℕ) : ∃ j, (i, j) ∉ μ


theorem contMDiff_snd : ContMDiff (I.prod J) J n (@Prod.snd M N)

{𝕜 : 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]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}


theorem det_ne_zero_of_left_inverse [Nontrivial α] (h : B * A = 1) : A.det ≠ 0

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A B : Matrix n n α}
[Nontrivial α]
(h : B * A = 1)


theorem exists_primitive_element_lt_of_isComplex {w₀ : InfinitePlace K} (hw₀ : IsComplex w₀)
    {B : ℝ≥0} (hB : minkowskiBound K ↑1 < convexBodyLT'Factor K * B) :
    ∃ a : 𝓞 K, ℚ⟮(a : K)⟯ = ⊤ ∧
      ∀ w : InfinitePlace K, w a < Real.sqrt (1 + B ^ 2)

(hB : NumberField.mixedEmbedding.minkowskiBound K 1 < ↑(NumberField.mixedEmbedding.convexBodyLT'Factor K) * ↑B)

∃ a, ℚ⟮↑a⟯ = ⊤ ∧ ∀ (w : NumberField.InfinitePlace K), w ↑a < √(1 + ↑B ^ 2)


lemma homEquiv_eq (G : D₁ ⥤ D₂) (e : L₁ ⋙ G ≅ L₂) (f : L₁.obj X ⟶ L₁.obj Y) :
    homEquiv W L₁ L₂ f = e.inv.app X ≫ G.map f ≫ e.hom.app Y

{C : Type u_1}
{D₁ : Type u_5}
{D₂ : Type u_6}
[CategoryTheory.Category.{u_10, u_1} C]
[CategoryTheory.Category.{u_8, u_5} D₁]
[CategoryTheory.Category.{u_9, u_6} D₂]
(W : CategoryTheory.MorphismProperty C)
(L₁ : CategoryTheory.Functor C D₁)
[L₁.IsLocalization W]
(L₂ : CategoryTheory.Functor C D₂)
[L₂.IsLocalization W]
{X Y : C}
(G : CategoryTheory.Functor D₁ D₂)
(e : L₁.comp G ≅ L₂)
(f : L₁.obj X ⟶ L₁.obj Y)

(CategoryTheory.Localization.homEquiv W L₁ L₂) f =
  CategoryTheory.CategoryStruct.comp (e.inv.app X) (CategoryTheory.CategoryStruct.comp (G.map f) (e.hom.app Y))


@[simp] theorem SatisfiesM_Option_eq : SatisfiesM (m := Option) p x ↔ ∀ a, x = some a → p a

∀ {α : Type u_1} {p : α → Prop} {x : Option α}, SatisfiesM p x ↔ ∀ (a : α), x = some a → p a


theorem map_comp_apply (f : M →ₗ[R] N) (g : N →ₗ[R] P) (a : AdicCauchySequence I M) :
    map I g (map I f a) = map I (g ∘ₗ f) a

(a : AdicCompletion.AdicCauchySequence I M)

(AdicCompletion.AdicCauchySequence.map I g) ((AdicCompletion.AdicCauchySequence.map I f) a) =
  (AdicCompletion.AdicCauchySequence.map I (g ∘ₗ f)) a


/-- The tensor product bifunctor `C ⥤ C ⥤ C` of a monoidal category. -/
@[simps]
def curriedTensor : C ⥤ C ⥤ C

(C : Type u)
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(X Y : C)

((CategoryTheory.MonoidalCategory.curriedTensor C).obj X).obj Y = CategoryTheory.MonoidalCategory.tensorObj X Y


@[simp] lemma mulSupport_zero : mulSupport (0 : ι → R) = univ

{ι : Type u_1}
(R : Type u_5)
[Zero R]
[One R]
[NeZero 1]


theorem reverse_mul {f g : R[X]} (fg : f.leadingCoeff * g.leadingCoeff ≠ 0) :
    reverse (f * g) = reverse f * reverse g


@[simp]
theorem deriv_sinh : deriv sinh = cosh


/-- Given an element `x` of a module `M` over `R`, the natural map from
    `R` to scalar multiples of `x`. See also `LinearMap.ringLmapEquivSelf`. -/
@[simps!]
def toSpanSingleton (x : M) : R →ₗ[R] M

(R : Type u_1)
(M : Type u_4)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)
(b : R)

(LinearMap.toSpanSingleton R M x) b = b • x


theorem max_top_left [OrderTop α] (a : α) : max ⊤ a = ⊤

{α : Type u}
[LinearOrder α]
[OrderTop α]
(a : α)


/-- The exponential pdf is positive for all positive reals -/
lemma exponentialPDFReal_pos {x r : ℝ} (hr : 0 < r) (hx : 0 < x) :
    0 < exponentialPDFReal r x

0 < ProbabilityTheory.exponentialPDFReal r x


@[to_additive]
lemma mulIndicator_le_self (s : Set α) (f : α → M) : mulIndicator s f ≤ f

{α : Type u_2}
{M : Type u_4}
[CanonicallyOrderedCommMonoid M]
(s : Set α)
(f : α → M)


@[simp]
theorem coeff_modMonomial_of_not_le {s' s : σ →₀ ℕ} (x : MvPolynomial σ R) (h : ¬s ≤ s') :
    coeff s' (x %ᵐᵒⁿᵒᵐⁱᵃˡ s) = coeff s' x

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
{s' s : σ →₀ ℕ}
(x : MvPolynomial σ R)
(h : ¬s ≤ s')

MvPolynomial.coeff s' (x.modMonomial s) = MvPolynomial.coeff s' x


theorem IntermediateField.algHomEquivAlgHomOfSplits_apply_apply (L : IntermediateField F A)
    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
    algHomEquivAlgHomOfSplits A L hL f x = algebraMap L A (f x)

(hL : ∀ (x : K), Polynomial.Splits (algebraMap F ↥L) (minpoly F x))

((IntermediateField.algHomEquivAlgHomOfSplits A L hL) f) x = (algebraMap (↥L) A) (f x)


@[simp] lemma coe_eq_ofNat (n : ℕ) [n.AtLeastTwo] (m : α) :
    (m : WithTop α) = no_index (OfNat.ofNat n) ↔ m = OfNat.ofNat n

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)


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

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

[CovariantClass α α (Function.swap HAdd.hAdd) LT.lt]

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


theorem le_generateFrom {t : TopologicalSpace α} {g : Set (Set α)} (h : ∀ s ∈ g, IsOpen s) :
    t ≤ generateFrom g

{α : Type u}
{t : TopologicalSpace α}
{g : Set (Set α)}
(h : ∀ s ∈ g, IsOpen s)


theorem erase_add_left_neg {a : α} (s) {t : Multiset α} (h : a ∉ t) :
    (s + t).erase a = s.erase a + t

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


/-- The residue of `Λ` at `s = 0` is equal to `-f₀`. -/
theorem Λ_residue_zero :
    Tendsto (fun s : ℂ ↦ s • P.Λ s) (𝓝[≠] 0) (𝓝 (-P.f₀))

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(P : WeakFEPair E)

Filter.Tendsto (fun s => s • P.Λ s) (𝓝[≠] 0) (𝓝 (-P.f₀))


theorem uniformContinuous_completionSeparationQuotientEquiv_symm :
    UniformContinuous (completionSeparationQuotientEquiv α).symm


protected theorem injective (e : P₁ ≃ᵃL[k] P₂) : Injective e

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)


theorem det_eq_one_of_subsingleton [Subsingleton M] (f : M →ₗ[R] M) :
    LinearMap.det (f : M →ₗ[R] M) = 1

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


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

(CategoryTheory.MonoidalCategory.rightUnitor X).inv.F =
  CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst


/--
Accessing bits in `x.rotateLeft r` the range `[0, r)` is equal to
accessing bits `x` in the range `[w - r, w)`.

Proof by example:
Let x := <6 5 4 3 2 1 0> : BitVec 7.
x.rotateLeft 2 = (<6 5 | 4 3 2 1 0>).rotateLeft 2 = <3 2 1 0 | 6 5>

(x.rotateLeft 2).getLsb ⟨i, i < 2⟩
= <3 2 1 0 | 6 5>.getLsb ⟨i, i < 2⟩
= <6 5>[i]
= <6 5 | 4 3 2 1 0>[i + len(<4 3 2 1 0>)]
= <6 5 | 4 3 2 1 0>[i + 7 - 2]
-/
theorem getLsb_rotateLeftAux_of_le {x : BitVec w} {r : Nat} {i : Nat} (hi : i < r) :
    (x.rotateLeftAux r).getLsb i = x.getLsb (w - r + i)

{w : Nat}
{x : BitVec w}
{r i : Nat}
(hi : i < r)


/-- For a continuous real linear map `f`, if one controls the norm of every `f x`, `‖x‖ = 1`, then
one controls the norm of `f`. -/
theorem opNorm_le_of_unit_norm [NormedSpace ℝ E] [NormedSpace ℝ F] {f : E →L[ℝ] F} {C : ℝ}
    (hC : 0 ≤ C) (hf : ∀ x, ‖x‖ = 1 → ‖f x‖ ≤ C) : ‖f‖ ≤ C

{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NormedSpace ℝ E]
[NormedSpace ℝ F]
{f : E →L[ℝ] F}
{C : ℝ}
(hC : 0 ≤ C)
(hf : ∀ (x : E), ‖x‖ = 1 → ‖f x‖ ≤ C)


theorem mul_mem_nthRootsFinset
    {η₁ η₂ : R} (hη₁ : η₁ ∈ nthRootsFinset n R) (hη₂ : η₂ ∈ nthRootsFinset n R) :
    η₁ * η₂ ∈ nthRootsFinset n R

(hη₁ : η₁ ∈ Polynomial.nthRootsFinset n R)

(hη₂ : η₂ ∈ Polynomial.nthRootsFinset n R)


theorem dist_le_tsum_of_dist_le_of_tendsto (d : ℕ → ℝ) (hf : ∀ n, dist (f n) (f n.succ) ≤ d n)
    (hd : Summable d) {a : α} (ha : Tendsto f atTop (𝓝 a)) (n : ℕ) :
    dist (f n) a ≤ ∑' m, d (n + m)

(hf : ∀ (n : ℕ), dist (f n) (f n.succ) ≤ d n)

(ha : Filter.Tendsto f Filter.atTop (𝓝 a))


@[simp]
lemma δ_ofHomotopy {φ₁ φ₂ : F ⟶ G} (h : Homotopy φ₁ φ₂) :
    δ (-1) 0 (Cochain.ofHomotopy h) = Cochain.ofHom φ₁ - Cochain.ofHom φ₂

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
{φ₁ φ₂ : F ⟶ G}
(h : Homotopy φ₁ φ₂)

CochainComplex.HomComplex.δ (-1) 0 (CochainComplex.HomComplex.Cochain.ofHomotopy h) =
  CochainComplex.HomComplex.Cochain.ofHom φ₁ - CochainComplex.HomComplex.Cochain.ofHom φ₂


@[to_additive (attr := simp)]
theorem mul_empty : s * ∅ = ∅


/-- Functional equation formulated for `Λ₀`. -/
theorem functional_equation₀ (s : ℂ) : P.Λ₀ (P.k - s) = P.ε • P.symm.Λ₀ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(P : WeakFEPair E)
(s : ℂ)


theorem closedBall_subset_ball (h : ε₁ < ε₂) : closedBall x ε₁ ⊆ ball x ε₂

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε₁ ε₂ : ℝ}
(h : ε₁ < ε₂)

Metric.closedBall x ε₁ ⊆ Metric.ball x ε₂


@[to_additive]
theorem map_eq (x) : f.map hy k (f.toMap x) = k.toMap (g x)

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
{T : AddSubmonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[AddCommMonoid Q]
{k : T.LocalizationMap Q}
(x : M)

(f.map hy k) (f.toMap x) = k.toMap (g x)


@[to_additive (attr := simp)]
theorem ofList_nil : ofList ([] : List α) = 1


theorem mul_self_abs (z : ℂ) : Complex.abs z * Complex.abs z = normSq z

Complex.abs z * Complex.abs z = Complex.normSq z


theorem subtype_Ico_eq : Ico a b = (Ico (a : α) b).subtype p

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

Finset.Ico a b = Finset.subtype p (Finset.Ico ↑a ↑b)


theorem _root_.AddSubmonoid.mem_bsupr_iff_exists_dfinsupp (p : ι → Prop) [DecidablePred p]
    [AddCommMonoid γ] (S : ι → AddSubmonoid γ) (x : γ) :
    (x ∈ ⨆ (i) (_ : p i), S i) ↔
      ∃ f : Π₀ i, S i, DFinsupp.sumAddHom (fun i => (S i).subtype) (f.filter p) = x

{ι : Type u}
{γ : Type w}
[DecidableEq ι]
(p : ι → Prop)
[DecidablePred p]
[AddCommMonoid γ]
(S : ι → AddSubmonoid γ)
(x : γ)

x ∈ ⨆ i, ⨆ (_ : p i), S i ↔ ∃ f, (DFinsupp.sumAddHom fun i => (S i).subtype) (DFinsupp.filter p f) = x


/-- The inner product in `L2` of the indicator of a set `indicatorConstLp 2 hs hμs c` and `f` is
equal to the inner product of the constant `c` and the integral of `f` over `s`. -/
theorem inner_indicatorConstLp_eq_inner_setIntegral [CompleteSpace E] [NormedSpace ℝ E]
    (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (c : E) (f : Lp E 2 μ) :
    (⟪indicatorConstLp 2 hs hμs c, f⟫ : 𝕜) = ⟪c, ∫ x in s, f x ∂μ⟫

{α : Type u_1}
{E : Type u_2}
(𝕜 : Type u_4)
[RCLike 𝕜]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{s : Set α}
[CompleteSpace E]
[NormedSpace ℝ E]
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(c : E)
(f : ↥(MeasureTheory.Lp E 2 μ))

⟪MeasureTheory.indicatorConstLp 2 hs hμs c, f⟫_𝕜 = ⟪c, ∫ (x : α) in s, ↑↑f x ∂μ⟫_𝕜


/-- Any point in some neighborhood of `a` can be represented as `HasStrictFDerivAt.implicitFunction`
of some point. -/
theorem eq_implicitFunction (hf : HasStrictFDerivAt f f' a) (hf' : range f' = ⊤) :
    ∀ᶠ x in 𝓝 a,
      hf.implicitFunction f f' hf' (f x) (hf.implicitToPartialHomeomorph f f' hf' x).snd = x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[FiniteDimensional 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f f' a)
(hf' : LinearMap.range f' = ⊤)

∀ᶠ (x : E) in 𝓝 a,
  HasStrictFDerivAt.implicitFunction f f' hf hf' (f x)
      (↑(HasStrictFDerivAt.implicitToPartialHomeomorph f f' hf hf') x).2 =
    x


theorem gcd_dvd (xs : IntList) {a : Int} (m : a ∈ xs) : (xs.gcd : Int) ∣ a

(xs : Lean.Omega.IntList)
{a : Int}
(m : a ∈ xs)


@[simp]
theorem AwayMap.lift_comp (hg : IsUnit (g x)) : (lift x hg).comp (algebraMap R S) = g

{R : Type u_1}
[CommSemiring R]
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
(x : R)
[IsLocalization.Away x S]
{g : R →+* P}
(hg : IsUnit (g x))

(IsLocalization.Away.lift x hg).comp (algebraMap R S) = g


lemma MonoidHom.apply_mint (f : Multiplicative ℤ →* α) (n : Multiplicative ℤ) :
    f n = f (ofAdd 1) ^ (toAdd n)

(α : Type u_3)
[Group α]
(f : Multiplicative ℤ →* α)
(n : Multiplicative ℤ)

f n = f (Multiplicative.ofAdd 1) ^ Multiplicative.toAdd n


theorem Isometry.completion_extension [MetricSpace β] [CompleteSpace β] {f : α → β}
    (h : Isometry f) : Isometry (Completion.extension f)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[MetricSpace β]
[CompleteSpace β]
{f : α → β}
(h : Isometry f)


theorem nmul_comm : ∀ a b, a ⨳ b = b ⨳ a


theorem isCobounded_ofBounded_iff (B : Set (Set α)) {empty_mem subset_mem union_mem sUnion_univ} :
    @IsCobounded _ (ofBounded B empty_mem subset_mem union_mem sUnion_univ) s ↔ sᶜ ∈ B

{subset_mem : ∀ s₁ ∈ B, ∀ s₂ ⊆ s₁, s₂ ∈ B}

{union_mem : ∀ s₁ ∈ B, ∀ s₂ ∈ B, s₁ ∪ s₂ ∈ B}


theorem trunc_trunc_mul_trunc {n} (f g : R⟦X⟧) :
    trunc n (trunc n f * trunc n g : R⟦X⟧) = trunc n (f * g)

{R : Type u_2}
[CommSemiring R]
{n : ℕ}
(f g : PowerSeries R)

PowerSeries.trunc n (↑(PowerSeries.trunc n f) * ↑(PowerSeries.trunc n g)) = PowerSeries.trunc n (f * g)


@[to_additive]
theorem pairwise_disjoint_Ioc_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ioc (b ^ n) (b ^ (n + 1)))

{α : Type u_1}
[OrderedCommGroup α]
(b : α)

Pairwise (Disjoint on fun n => Set.Ioc (b ^ n) (b ^ (n + 1)))


@[simp]
theorem one_apply (x) : (1 : Poly α) x = 1


@[to_additive (attr := simp 1100, nolint simpNF)]
theorem mem_map_iff_mem {f : G →* N} (hf : Function.Injective f) {K : Subgroup G} {x : G} :
    f x ∈ K.map f ↔ x ∈ K

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
(hf : Function.Injective ⇑f)
{K : AddSubgroup G}
{x : G}


@[simp]
theorem zero_lie : ⁅(0 : L), m⁆ = 0

{L : Type v}
{M : Type w}
[LieRing L]
[AddCommGroup M]
[LieRingModule L M]
(m : M)


theorem measure_iUnion₀ [Countable ι] {f : ι → Set α} (hd : Pairwise (AEDisjoint μ on f))
    (h : ∀ i, NullMeasurableSet (f i) μ) : μ (⋃ i, f i) = ∑' i, μ (f i)

(hd : Pairwise (MeasureTheory.AEDisjoint μ on f))

(h : ∀ (i : ι), MeasureTheory.NullMeasurableSet (f i) μ)


/-- UV-compression is injective on the sets that are not UV-compressed. -/
theorem compress_injOn : Set.InjOn (compress u v) ↑(s.filter (compress u v · ∉ s))

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableRel Disjoint]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{u v : α}
[DecidableEq α]

Set.InjOn (UV.compress u v) ↑(Finset.filter (fun x => UV.compress u v x ∉ s) s)


@[simp]
theorem bihimp_eq_inf : a ⇔ b = a ⊓ b ↔ Codisjoint a b

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


/-- Maps a bounded formula's symbols along a language equivalence. -/
@[simps]
def onBoundedFormula (φ : L ≃ᴸ L') : L.BoundedFormula α n ≃ L'.BoundedFormula α n

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
(φ : L ≃ᴸ L')

∀ (a : L'.BoundedFormula α n), φ.onBoundedFormula.symm a = φ.invLHom.onBoundedFormula a


lemma one_le_dual_one :
    1 ≤ dual A K (1 : FractionalIdeal B⁰ L)

(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]


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

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
{x y : G}
(h : x ∈ H)


protected theorem nonempty_Icc : (Icc v.tMin v.tMax).Nonempty

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)


theorem Filter.EventuallyEq.isLocalMax_iff {f g : α → β} {a : α} (heq : f =ᶠ[𝓝 a] g) :
    IsLocalMax f a ↔ IsLocalMax g a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f g : α → β}
{a : α}
(heq : f =ᶠ[𝓝 a] g)


@[simp]
theorem mem_top (x : M) : x ∈ (⊤ : LieSubmodule R L M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(x : M)


lemma norm_log_natCast_le_rpow_div (n : ℕ) {ε : ℝ} (hε : 0 < ε) : ‖log n‖ ≤ n ^ ε / ε


theorem nhds_basis_closedBall : (𝓝 x).HasBasis (fun ε : ℝ => 0 < ε) (closedBall x)

{α : Type u}
[PseudoMetricSpace α]
{x : α}

(𝓝 x).HasBasis (fun ε => 0 < ε) (Metric.closedBall x)


/-- A preorder which embeds into a well-founded preorder is itself well-founded. -/
protected theorem wellFoundedLT [WellFoundedLT β] (f : α ↪o β) : WellFoundedLT α

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


theorem Finite.of_injective_finite_range {f : ι → α} (hf : Function.Injective f)
    [Finite (range f)] : Finite ι

{α : Type u}
{ι : Sort w}
{f : ι → α}
(hf : Function.Injective f)
[Finite ↑(Set.range f)]


@[simp] theorem size_mapIdx (a : Array α) (f : Fin a.size → α → β) : (a.mapIdx f).size = a.size

{α : Type u_1}
{β : Type u_2}
(a : Array α)
(f : Fin a.size → α → β)


lemma comp_mk₀ {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0) (g : Y ⟶ Z) :
    f.comp (mk₀ m₀ hm₀ g) (by rw [hm₀, zero_add]) = f ≫ g⟦a⟧'

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
{M : Type u_4}
[AddMonoid M]
[CategoryTheory.HasShift C M]
{X Y Z : C}
{a : M}
(f : CategoryTheory.ShiftedHom X Y a)
(m₀ : M)
(hm₀ : m₀ = 0)
(g : Y ⟶ Z)

f.comp (CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ g) ⋯ =
  CategoryTheory.CategoryStruct.comp f ((CategoryTheory.shiftFunctor C a).map g)


@[to_additive (attr := elab_as_elim)]
theorem induction_on' {C : α ⧸ s → Prop} (x : α ⧸ s) (H : ∀ z : α, C z) : C x

{α : Type u_1}
[AddGroup α]
{s : AddSubgroup α}
{C : α ⧸ s → Prop}
(x : α ⧸ s)
(H : ∀ (z : α), C ↑z)


theorem IsLittleO.prod_rightr (h : f =o[l] g') : f =o[l] fun x => (f' x, g' x)

{α : Type u_1}
{E : Type u_3}
{E' : Type u_6}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{f : α → E}
(f' : α → E')
{g' : α → F'}
{l : Filter α}
(h : f =o[l] g')


@[simp]
theorem tan_coe (x : ℝ) : tan (x : Angle) = Real.tan x


@[simp]
theorem norm_eq_abs (r : ℝ) : ‖r‖ = |r|


@[simp]
theorem bihimp_apply [∀ i, GeneralizedHeytingAlgebra (π i)] (a b : ∀ i, π i) (i : ι) :
    (a ⇔ b) i = a i ⇔ b i

[(i : ι) → GeneralizedHeytingAlgebra (π i)]


/-- Auxiliary definition for the `MonoidalCategory` instance on `Center C`. -/
@[simps]
def tensorUnit : Center C

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

CategoryTheory.Center.tensorUnit.fst = 𝟙_ C


@[simp, norm_cast]
theorem val_div (x y : selfAdjoint R) : ↑(x / y) = (x / y : R)

{R : Type u_1}
[Field R]
[StarRing R]
(x y : ↥(selfAdjoint R))


@[to_additive]
theorem prod_apply_ite {s : Finset α} {p : α → Prop} {_hp : DecidablePred p} (f g : α → γ)
    (h : γ → β) :
    (∏ x ∈ s, h (if p x then f x else g x)) =
      (∏ x ∈ s.filter p, h (f x)) * ∏ x ∈ s.filter fun x => ¬p x, h (g x)

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

∑ x ∈ s, h (if p x then f x else g x) =
  ∑ x ∈ Finset.filter p s, h (f x) + ∑ x ∈ Finset.filter (fun x => ¬p x) s, h (g x)


@[simp]
theorem mem_cons : a ∈ b ::ₛ s ↔ a = b ∨ a ∈ s

{α : Type u_1}
{n : ℕ}
{s : Sym α n}
{a b : α}


@[to_additive]
theorem div_subset_div_left : t₁ ⊆ t₂ → s / t₁ ⊆ s / t₂

{α : Type u_2}
[Div α]
{s t₁ t₂ : Set α}


theorem IsTerminal.isIso_from (hI : IsTerminal I) {A : C} (f : I ⟶ A) : IsIso f

(hI : CategoryTheory.Limits.IsTerminal I)


/-- A continuous antitone function sends indexed infimum to indexed supremum in conditionally
complete linear order, under a boundedness assumption. -/
theorem Antitone.map_ciInf_of_continuousAt {f : α → β} {g : γ → α} (Cf : ContinuousAt f (⨅ i, g i))
    (Af : Antitone f) (H : BddBelow (range g)) : f (⨅ i, g i) = ⨆ i, f (g i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
[Nonempty γ]
{f : α → β}
{g : γ → α}
(Cf : ContinuousAt f (⨅ i, g i))
(Af : Antitone f)
(H : BddBelow (Set.range g))


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

{α : Type u_2}
[Add α]
{s t₁ t₂ : Set α}


theorem atEnd_of_valid (cs : List Char) (cs' : List Char) :
    atEnd ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ ↔ cs' = []

{ data := cs ++ cs' }.atEnd { byteIdx := String.utf8Len cs } = true ↔ cs' = []


theorem map_filterMap (f : α → Option β) (g : β → γ) (l : List α) :
    map g (filterMap f l) = filterMap (fun x => (f x).map g) l

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

List.map g (List.filterMap f l) = List.filterMap (fun x => Option.map g (f x)) l


/-- Shows that the recurrence relation (`convs`) and direct evaluation (`convs'`) of the
generalized continued fraction coincide at position `n` if the sequence of fractions contains
strictly positive values only.
Requiring positivity of all values is just one possible condition to obtain this result.
For example, the dual - sequences with strictly negative values only - would also work.

In practice, one most commonly deals with regular continued fractions, which satisfy the
positivity criterion required here. The analogous result for them
(see `ContFract.convs_eq_convs`) hence follows directly from this theorem.
-/
theorem convs_eq_convs' [LinearOrderedField K]
    (s_pos : ∀ {gp : Pair K} {m : ℕ}, m < n → g.s.get? m = some gp → 0 < gp.a ∧ 0 < gp.b) :
    g.convs n = g.convs' n

(s_pos : ∀ {gp : GenContFract.Pair K} {m : ℕ}, m < n → g.s.get? m = some gp → 0 < gp.a ∧ 0 < gp.b)


/-- Given a clopen set `U` and a locally constant function `f`, `LocallyConstant.mulIndicator`
  returns the locally constant function that is `f` on `U` and `1` otherwise. -/
@[to_additive (attr := simps) "Given a clopen set `U` and a locally constant function `f`,
  `LocallyConstant.indicator` returns the locally constant function that is `f` on `U` and `0`
  otherwise. "]
noncomputable def mulIndicator (hU : IsClopen U) : LocallyConstant X R

{X : Type u_1}
[TopologicalSpace X]
{R : Type u_5}
[Zero R]
{U : Set X}
(f : LocallyConstant X R)
(hU : IsClopen U)
(x : X)


@[simp, norm_cast]
theorem coe_smul [SMulZeroClass S R] (s : S) (r : R) :
    (↑(s • r) : ℍ[R,c₁,c₂]) = s • (r : ℍ[R,c₁,c₂])

{S : Type u_1}
{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
[SMulZeroClass S R]
(s : S)
(r : R)


@[simp, norm_cast]
theorem coe_ennreal_le_coe_ennreal_iff {x y : ℝ≥0∞} : (x : EReal) ≤ (y : EReal) ↔ x ≤ y

↑x ≤ ↑y ↔ x ≤ y


@[to_additive (attr := simp)]
theorem mul_pure : f * pure b = f.map (· * b)

{α : Type u_2}
[Mul α]
{f : Filter α}
{b : α}

f * pure b = Filter.map (fun x => x * b) f


lemma bddAbove_pi {s : Set (∀ a, π a)} :
    BddAbove s ↔ ∀ a, BddAbove (Function.eval a '' s)

{α : Type u}
{π : α → Type u_1}
[(a : α) → Preorder (π a)]
{s : Set ((a : α) → π a)}

BddAbove s ↔ ∀ (a : α), BddAbove (Function.eval a '' s)


theorem Monotone.exists {P : β → α → Prop} (hP : ∀ x, Monotone (P x)) :
    Monotone fun y => ∃ x, P x y

{α : Type u}
{β : Type v}
[Preorder α]
{P : β → α → Prop}
(hP : ∀ (x : β), Monotone (P x))


theorem norm_int_lt_one_iff_dvd (k : ℤ) : ‖(k : ℤ_[p])‖ < 1 ↔ (p : ℤ) ∣ k

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

‖↑k‖ < 1 ↔ ↑p ∣ k


theorem eLpNorm'_eq_zero_of_ae_zero' (hq0_ne : q ≠ 0) (hμ : μ ≠ 0) {f : α → F}
    (hf_zero : f =ᵐ[μ] 0) :
    eLpNorm' f q μ = 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(hq0_ne : q ≠ 0)
(hμ : μ ≠ 0)
{f : α → F}
(hf_zero : f =ᵐ[μ] 0)


theorem StrictConcaveOn.sub_convexOn (hf : StrictConcaveOn 𝕜 s f) (hg : ConvexOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f - g)

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


theorem pos_of_mem_ball (hy : y ∈ ball x ε) : 0 < ε

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


theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
    (hu : ∀ n, Integrable (u n) μ) (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
    Integrable (stoppedProcess u τ n) μ

(hu : ∀ (n : ι), MeasureTheory.Integrable (u n) μ)

MeasureTheory.Integrable (MeasureTheory.stoppedProcess u τ n) μ


@[simp]
theorem homEquiv_naturality_right_symm_aux (f : X ⟶ G.obj Y) (g : Y ⟶ Y') :
    F.map f ≫ (adj.homEquiv (G.obj Y) Y').symm (G.map g) = (adj.homEquiv X Y).symm f ≫ g

(adj : CategoryTheory.Adjunction.CoreHomEquiv F G)

CategoryTheory.CategoryStruct.comp (F.map f) ((adj.homEquiv (G.obj Y) Y').symm (G.map g)) =
  CategoryTheory.CategoryStruct.comp ((adj.homEquiv X Y).symm f) g


theorem finSuccEquiv_X_zero : finSuccEquiv R n (X 0) = Polynomial.X

(MvPolynomial.finSuccEquiv R n) (MvPolynomial.X 0) = Polynomial.X


@[to_additive]
theorem mul_mem_closedBall_iff_norm : a * b ∈ closedBall a r ↔ ‖b‖ ≤ r

{E : Type u_6}
[SeminormedAddCommGroup E]
{a b : E}
{r : ℝ}


nonrec theorem SmoothAt.mdifferentiableAt (hf : SmoothAt I I' f x) : MDifferentiableAt I I' f x

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


theorem antilipschitz (h : Isometry f) : AntilipschitzWith 1 f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(h : Isometry f)


/-- The gaussian distribution pdf integrates to 1 when the variance is not zero.  -/
lemma integral_gaussianPDFReal_eq_one (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    ∫ x, gaussianPDFReal μ v x = 1

∫ (x : ℝ), ProbabilityTheory.gaussianPDFReal μ v x = 1


lemma rpow_inv_eq (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : z ≠ 0) : x ^ z⁻¹ = y ↔ x = y ^ z

{x y z : ℝ}
(hx : 0 ≤ x)
(hy : 0 ≤ y)
(hz : z ≠ 0)


protected theorem mul_comm (a b : Int) : a * b = b * a


theorem continuousOn_Icc_extendFrom_Ioo [TopologicalSpace α] [LinearOrder α] [DenselyOrdered α]
    [OrderTopology α] [TopologicalSpace β] [RegularSpace β] {f : α → β} {a b : α} {la lb : β}
    (hab : a ≠ b) (hf : ContinuousOn f (Ioo a b)) (ha : Tendsto f (𝓝[>] a) (𝓝 la))
    (hb : Tendsto f (𝓝[<] b) (𝓝 lb)) : ContinuousOn (extendFrom (Ioo a b) f) (Icc a b)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[LinearOrder α]
[DenselyOrdered α]
[OrderTopology α]
[TopologicalSpace β]
[RegularSpace β]
{f : α → β}
{a b : α}
{la lb : β}
(hab : a ≠ b)
(hf : ContinuousOn f (Set.Ioo a b))
(ha : Filter.Tendsto f (𝓝[>] a) (𝓝 la))
(hb : Filter.Tendsto f (𝓝[<] b) (𝓝 lb))

ContinuousOn (extendFrom (Set.Ioo a b) f) (Set.Icc a b)


theorem ClusterPt.map {lx : Filter X} {ly : Filter Y} (H : ClusterPt x lx)
    (hfc : ContinuousAt f x) (hf : Tendsto f lx ly) : ClusterPt (f x) ly

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{x : X}
{lx : Filter X}
{ly : Filter Y}
(H : ClusterPt x lx)
(hfc : ContinuousAt f x)
(hf : Filter.Tendsto f lx ly)


theorem coord_apply_smul (y : Submodule.span R ({x} : Set M)) : coord R M x h y • x = y

(R : Type u_1)
(M : Type u_4)
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(x : M)
(h : x ≠ 0)
(y : ↥(Submodule.span R {x}))


theorem inv_antitoneOn_Icc_left (hb : b < 0) :
    AntitoneOn (fun x : α ↦ x⁻¹) (Set.Icc a b)

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(hb : b < 0)


@[to_additive]
theorem div_iUnion (s : Set α) (t : ι → Set α) : (s / ⋃ i, t i) = ⋃ i, s / t i

{α : Type u_2}
{ι : Sort u_5}
[Div α]
(s : Set α)
(t : ι → Set α)


theorem integral_sin_pow_pos : 0 < ∫ x in (0)..π, sin x ^ n


theorem algebraMap_eq_inl' (s : S) : algebraMap S (tsze R M) s = inl (algebraMap S R s)

(S : Type u_1)
(R : Type u)
(M : Type v)
[CommSemiring S]
[Semiring R]
[AddCommMonoid M]
[Algebra S R]
[Module S M]
[Module R M]
[Module Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
[IsScalarTower S R M]
[IsScalarTower S Rᵐᵒᵖ M]
(s : S)

(algebraMap S (tsze R M)) s = TrivSqZeroExt.inl ((algebraMap S R) s)


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

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

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

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


@[simp, measurability]
theorem measurableSet_Ici : MeasurableSet (Ici a)

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[Preorder α]
[OrderClosedTopology α]
{a : α}


@[simp]
theorem preimage_ball (x : E₂) (r : ℝ) : e ⁻¹' Metric.ball x r = Metric.ball (e.symm x) r

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
(x : E₂)
(r : ℝ)

⇑e ⁻¹' Metric.ball x r = Metric.ball (e.symm x) r


@[simp]
theorem fst_prod (f : A →⋆ₐ[R] B) (g : A →⋆ₐ[R] C) : (fst R B C).comp (prod f g) = f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
[Semiring C]
[Algebra R C]
[Star C]
(f : A →⋆ₐ[R] B)
(g : A →⋆ₐ[R] C)

(StarAlgHom.fst R B C).comp (f.prod g) = f


@[simp]
theorem linfty_opNNNorm_col (v : m → α) : ‖col ι v‖₊ = ‖v‖₊

{m : Type u_3}
{α : Type u_5}
{ι : Type u_7}
[Fintype m]
[Unique ι]
[SeminormedAddCommGroup α]
(v : m → α)


@[to_additive]
theorem not_step_nil : ¬Step [] L


/-- In a (semi)normed group, inversion `x ↦ x⁻¹` tends to infinity at infinity. -/
@[to_additive "In a (semi)normed group, negation `x ↦ -x` tends to infinity at infinity."]
theorem Filter.tendsto_inv_cobounded : Tendsto Inv.inv (cobounded E) (cobounded E)

Filter.Tendsto Inv.inv (Bornology.cobounded E) (Bornology.cobounded E)


lemma Codisjoint.preimage (f : α → β) {s t : Set β} (h : Codisjoint s t) :
    Codisjoint (f ⁻¹' s) (f ⁻¹' t)

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


@[simp]
theorem deriv_cos (hc : DifferentiableAt ℝ f x) :
    deriv (fun x => Real.cos (f x)) x = -Real.sin (f x) * deriv f x

{f : ℝ → ℝ}
{x : ℝ}
(hc : DifferentiableAt ℝ f x)


@[simp]
theorem comp_toNatTrans {F G H : MonoidalFunctor C D} {α : F ⟶ G} {β : G ⟶ H} :
    (α ≫ β).toNatTrans = @CategoryStruct.comp (C ⥤ D) _ _ _ _ α.toNatTrans β.toNatTrans

{F G H : CategoryTheory.MonoidalFunctor C D}

(α ≫ β).toNatTrans = α.toNatTrans ≫ β.toNatTrans


/-- See also `Finset.sup'_prodMap`. -/
lemma prodMk_sup'_sup' (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
    (sup' s hs f, sup' t ht g) = sup' (s ×ˢ t) (hs.product ht) (Prod.map f g)

{ι : Type u_7}
{κ : Type u_8}
{α : Type u_9}
{β : Type u_10}
[SemilatticeSup α]
[SemilatticeSup β]
{s : Finset ι}
{t : Finset κ}
(hs : s.Nonempty)
(ht : t.Nonempty)
(f : ι → α)
(g : κ → β)

(s.sup' hs f, t.sup' ht g) = (s ×ˢ t).sup' ⋯ (Prod.map f g)


theorem Module.free_iff_set : Module.Free R M ↔ ∃ S : Set M, Nonempty (Basis S R M)

(R : Type u)
(M : Type v)
[Semiring R]
[AddCommMonoid M]
[Module R M]

Module.Free R M ↔ ∃ S, Nonempty (Basis (↑S) R M)


theorem join_eq_none : o.join = none ↔ o = none ∨ o = some none

∀ {α : Type u_1} {o : Option (Option α)}, o.join = none ↔ o = none ∨ o = some none


/-- Any continuous function on compact Hausdorff spaces is a closed map. -/
theorem isClosedMap {X Y : CompHausLike.{u} P} (f : X ⟶ Y) : IsClosedMap f

{P : TopCat → Prop}
{X Y : CompHausLike P}
(f : X ⟶ Y)


/-- The isomorphism between `F.rightOp.leftOp` and `F`. -/
@[simps!]
def rightOpLeftOpIso (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp ≅ F

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

F.rightOpLeftOpIso.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)


theorem of_le (h₁ : x ⊓ y ≤ ⊥) (h₂ : ⊤ ≤ x ⊔ y) : IsCompl x y

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{x y : α}
(h₁ : x ⊓ y ≤ ⊥)
(h₂ : ⊤ ≤ x ⊔ y)


@[simp]
theorem primeSpectrumProd_symm_inr_asIdeal (x : PrimeSpectrum S) :
    ((primeSpectrumProd R S).symm <| Sum.inr x).asIdeal = Ideal.prod ⊤ x.asIdeal

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
(x : PrimeSpectrum S)

((PrimeSpectrum.primeSpectrumProd R S).symm (Sum.inr x)).asIdeal = ⊤.prod x.asIdeal


lemma tensorQuotEquivQuotSMul_comp_mk (I : Ideal R) :
    tensorQuotEquivQuotSMul M I ∘ₗ (TensorProduct.mk R M (R ⧸ I)).flip 1 =
      Submodule.mkQ (I • ⊤)

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

↑(tensorQuotEquivQuotSMul M I) ∘ₗ (TensorProduct.mk R M (R ⧸ I)).flip 1 = (I • ⊤).mkQ


@[to_additive]
theorem union_smul_inter_subset_union : (s₁ ∪ s₂) • (t₁ ∩ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

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


@[simp] lemma restrictSubtype_ground : (M.restrictSubtype X).E = univ

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


lemma bijOn_reflection_of_mapsTo {Φ : Set M} (h : f x = 2) (h' : MapsTo (reflection h) Φ Φ) :
    BijOn (reflection h) Φ Φ

(h' : Set.MapsTo (⇑(Module.reflection h)) Φ Φ)


/--
Cost structure for strings, where cost is the log base 2 length of the token.
-/
@[simps!]
def stringLogLengthCost : Cost String String ℕ

Levenshtein.stringLogLengthCost.delete a = (a.length + 1).log2


theorem zpow_mem_zpowers (g : G) (k : ℤ) : g ^ k ∈ zpowers g

{G : Type u_1}
[Group G]
(g : G)
(k : ℤ)


lemma changeLevel_def {m : ℕ} (hm : n ∣ m) :
    changeLevel hm χ = MulChar.ofUnitHom (χ.toUnitHom.comp (ZMod.unitsMap hm))

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

(DirichletCharacter.changeLevel hm) χ = MulChar.ofUnitHom ((MulChar.toUnitHom χ).comp (ZMod.unitsMap hm))


@[csimp] theorem append_eq_appendTR : @List.append = @appendTR


theorem VanishingDiam.dist_lt (hA : VanishingDiam A) (ε : ℝ) (ε_pos : 0 < ε) (x : ℕ → β) :
    ∃ n : ℕ, ∀ (y) (_ : y ∈ A (res x n)) (z) (_ : z ∈ A (res x n)), dist y z < ε

{β : Type u_1}
{α : Type u_2}
{A : List β → Set α}
[PseudoMetricSpace α]
(hA : CantorScheme.VanishingDiam A)
(ε : ℝ)
(ε_pos : 0 < ε)
(x : ℕ → β)

∃ n, ∀ y ∈ A (PiNat.res x n), ∀ z ∈ A (PiNat.res x n), dist y z < ε


@[to_additive]
theorem map_comap_le {S : Submonoid N} {f : F} : (S.comap f).map 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}

AddSubmonoid.map f (AddSubmonoid.comap f S) ≤ S


theorem _root_.Function.Commute.set_image {f g : α → α} (h : Function.Commute f g) :
    Function.Commute (image f) (image g)

{α : Type u_1}
{f g : α → α}
(h : Function.Commute f g)

Function.Commute (Set.image f) (Set.image g)


lemma prod_map_add {s : Multiset ι} {f g : ι → α} :
    prod (s.map fun i ↦ f i + g i) =
      sum ((antidiagonal s).map fun p ↦ (p.1.map f).prod * (p.2.map g).prod)

{ι : Type u_1}
{α : Type u_2}
[CommSemiring α]
{s : Multiset ι}
{f g : ι → α}

(Multiset.map (fun i => f i + g i) s).prod =
  (Multiset.map (fun p => (Multiset.map f p.1).prod * (Multiset.map g p.2).prod) s.antidiagonal).sum


theorem prod_edist_eq_add (hp : 0 < p.toReal) (f g : WithLp p (α × β)) :
    edist f g = (edist f.fst g.fst ^ p.toReal + edist f.snd g.snd ^ p.toReal) ^ (1 / p.toReal)

{p : ℝ≥0∞}
{α : Type u_2}
{β : Type u_3}
[EDist α]
[EDist β]
(hp : 0 < p.toReal)
(f g : WithLp p (α × β))

edist f g = (edist f.1 g.1 ^ p.toReal + edist f.2 g.2 ^ p.toReal) ^ (1 / p.toReal)


theorem algebraMap_eq_inl_comp : ⇑(algebraMap S (Unitization R A)) = inl ∘ algebraMap S R

(S : Type u_1)
(R : Type u_2)
(A : Type u_3)
[CommSemiring S]
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[Algebra S R]
[DistribMulAction S A]
[IsScalarTower S R A]

⇑(algebraMap S (Unitization R A)) = Unitization.inl ∘ ⇑(algebraMap S R)


theorem not_lt_of_gt {a b : α} (h : a > b) : ¬a < b

{α : Type u}
[LinearOrder α]
{a b : α}
(h : a > b)


@[to_additive]
theorem div_iUnion₂ (s : Set α) (t : ∀ i, κ i → Set α) :
    (s / ⋃ (i) (j), t i j) = ⋃ (i) (j), s / t i j

{α : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[Sub α]
(s : Set α)
(t : (i : ι) → κ i → Set α)

s - ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s - t i j


@[simp] lemma toLinearMap₂_apply (L : E →L[𝕜] F →L[𝕜] G) (v : E) (w : F) :
    L.toLinearMap₂ v w = L v w

{𝕜 : Type u_1}
[NormedField 𝕜]
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[AddCommGroup G]
[Module 𝕜 G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(L : E →L[𝕜] F →L[𝕜] G)
(v : E)
(w : F)


/-- Assemble an `I`-indexed family of equivalences of categories
into a single equivalence. -/
@[simps]
def pi (E : ∀ i, C i ≌ D i) : (∀ i, C i) ≌ (∀ i, D i)

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

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

(CategoryTheory.Equivalence.pi E).functor = CategoryTheory.Functor.pi fun i => (E i).functor


theorem bind₁_rename_expand_wittPolynomial (Φ : MvPolynomial idx ℤ) (n : ℕ)
    (IH :
      ∀ m : ℕ,
        m < n + 1 →
          map (Int.castRingHom ℚ) (wittStructureInt p Φ m) =
            wittStructureRat p (map (Int.castRingHom ℚ) Φ) m) :
    bind₁ (fun b => rename (fun i => (b, i)) (expand p (W_ ℤ n))) Φ =
      bind₁ (fun i => expand p (wittStructureInt p Φ i)) (W_ ℤ n)

(IH :
  ∀ m < n + 1,
    (MvPolynomial.map (Int.castRingHom ℚ)) (wittStructureInt p Φ m) =
      wittStructureRat p ((MvPolynomial.map (Int.castRingHom ℚ)) Φ) m)

(MvPolynomial.bind₁ fun b => (MvPolynomial.rename fun i => (b, i)) ((MvPolynomial.expand p) (W_ ℤ n))) Φ =
  (MvPolynomial.bind₁ fun i => (MvPolynomial.expand p) (wittStructureInt p Φ i)) (W_ ℤ n)


@[simp]
theorem add_eq_sup : N + N' = N ⊔ N'

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


/-- The equivalence between `FinPartOrd` and itself induced by `OrderDual` both ways. -/
@[simps! functor inverse]
def dualEquiv : FinPartOrd ≌ FinPartOrd


@[simp]
theorem interior_interior : interior (interior s) = interior s

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


@[to_additive nsmul_nonneg_iff]
theorem one_le_pow_iff {x : M} {n : ℕ} (hn : n ≠ 0) : 1 ≤ x ^ n ↔ 1 ≤ x

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


/-- A graded version of `MulAction`. -/
class GMulAction [AddMonoid ιA] [VAdd ιA ιM] [GMonoid A] extends GSMul A M where
  /-- One is the neutral element for `•` -/
  one_smul (b : GradedMonoid M) : (1 : GradedMonoid A) • b = b
  /-- Associativity of `•` and `*` -/
  mul_smul (a a' : GradedMonoid A) (b : GradedMonoid M) : (a * a') • b = a • a' • b

{ιA : Type u_1}
{ιM : Type u_3}
{A : ιA → Type u_4}
{M : ιM → Type u_5}
[AddMonoid ιA]
[VAdd ιA ιM]
[GradedMonoid.GMonoid A]
[self : GradedMonoid.GMulAction A M]
(a a' : GradedMonoid A)
(b : GradedMonoid M)


@[simp]
theorem finset_iUnion_left_iff {ι : Type*} {I : Finset ι} {s : ι → Set X} {t : Set X} :
    IsMetricSeparated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, IsMetricSeparated (s i) t

{X : Type u_1}
[EMetricSpace X]
{ι : Type u_2}
{I : Finset ι}
{s : ι → Set X}
{t : Set X}


@[simp]
theorem conjTranspose_neg [AddGroup α] [StarAddMonoid α] (M : Matrix m n α) : (-M)ᴴ = -Mᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddGroup α]
[StarAddMonoid α]
(M : Matrix m n α)


@[simp]
theorem differentiableWithinAt_sub_const_iff (c : F) :
    DifferentiableWithinAt 𝕜 (fun y => f y - c) s x ↔ DifferentiableWithinAt 𝕜 f s x

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


@[to_additive (attr := simp)]
lemma UniformOnFun.toFun_div [Div β] (f g : α →ᵤ[𝔖] β) :
    toFun 𝔖 (f / g) = toFun 𝔖 f / toFun 𝔖 g

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[Sub β]
(f g : α →ᵤ[𝔖] β)

(UniformOnFun.toFun 𝔖) (f - g) = (UniformOnFun.toFun 𝔖) f - (UniformOnFun.toFun 𝔖) g


theorem adjMatrix_mulVec_const_apply [NonAssocSemiring α] {a : α} {v : V} :
    (G.adjMatrix α *ᵥ Function.const _ a) v = G.degree v * a

{V : Type u_1}
{α : Type u_2}
{G : SimpleGraph V}
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
{a : α}
{v : V}

(SimpleGraph.adjMatrix α G *ᵥ Function.const V a) v = ↑(G.degree v) * a


/-- A Weierstrass curve is nonsingular at every point if its discriminant is non-zero. -/
lemma nonsingular_of_Δ_ne_zero {x y : R} (h : W.Equation x y) (hΔ : W.Δ ≠ 0) : W.Nonsingular x y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{x y : R}
(h : W.Equation x y)
(hΔ : WeierstrassCurve.Δ W ≠ 0)


@[simp]
theorem symm_range {a b : X} (γ : Path a b) : range γ.symm = range γ

{X : Type u_1}
[TopologicalSpace X]
{a b : X}
(γ : Path a b)


theorem div_int (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (x / m)

{x : ℝ}
(h : Irrational x)
{m : ℤ}
(hm : m ≠ 0)


@[to_additive (attr := simp)]
theorem prod_ite_irrel (p : Prop) [Decidable p] (s : Finset α) (f g : α → β) :
    ∏ x ∈ s, (if p then f x else g x) = if p then ∏ x ∈ s, f x else ∏ x ∈ s, g x

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

(∏ x ∈ s, if p then f x else g x) = if p then ∏ x ∈ s, f x else ∏ x ∈ s, g x


@[simp] theorem isNone_iff_eq_none {o : Option α} : o.isNone ↔ o = none


@[simp]
theorem isCompl_ofDual_iff {a b : αᵒᵈ} : IsCompl (ofDual a) (ofDual b) ↔ IsCompl a b

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{a b : αᵒᵈ}

IsCompl (OrderDual.ofDual a) (OrderDual.ofDual b) ↔ IsCompl a b


lemma countP_bind (p : β → Bool) (l : List α) (f : α → List β) :
    countP p (l.bind f) = sum (map (countP p ∘ f) l)

{α : Type u_2}
{β : Type u_3}
(p : β → Bool)
(l : List α)
(f : α → List β)

List.countP p (l.bind f) = (List.map (List.countP p ∘ f) l).sum


@[simp]
theorem sum_ite_self_eq_aux [DecidableEq α] {N : Type*} [AddCommMonoid N] (f : α →₀ N) (a : α) :
    (if a ∈ f.support then f a else 0) = f a

{α : Type u_1}
[DecidableEq α]
{N : Type u_16}
[AddCommMonoid N]
(f : α →₀ N)
(a : α)


theorem map_permutations' (f : α → β) (ts : List α) :
    map (map f) (permutations' ts) = permutations' (map f ts)

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

List.map (List.map f) ts.permutations' = (List.map f ts).permutations'


lemma antivaryOn_inv₀ (hf : ∀ i ∈ s, 0 < f i) (hg : ∀ i ∈ s, 0 < g i) :
    AntivaryOn f⁻¹ g⁻¹ s ↔ AntivaryOn f g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hf : ∀ i ∈ s, 0 < f i)
(hg : ∀ i ∈ s, 0 < g i)


theorem iterate_succ (n : ℕ) : f' ^ (n + 1) = comp (f' ^ n) f'

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f' : M →ₗ[R] M}
(n : ℕ)


theorem IsPreirreducible.image (H : IsPreirreducible s) (f : X → Y) (hf : ContinuousOn f s) :
    IsPreirreducible (f '' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
(H : IsPreirreducible s)
(f : X → Y)
(hf : ContinuousOn f s)


theorem ne_int (h : Irrational x) (m : ℤ) : x ≠ m


{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)


theorem bliminf_eq_liminf_subtype {f : Filter β} {u : β → α} {p : β → Prop} :
    bliminf u f p = liminf (u ∘ ((↑) : { x | p x } → β)) (comap (↑) f)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{f : Filter β}
{u : β → α}
{p : β → Prop}

Filter.bliminf u f p = Filter.liminf (u ∘ Subtype.val) (Filter.comap Subtype.val f)


@[simp]
theorem coe_of (α : Type*) [PartialOrder α] : ↥(of α) = α


@[to_additive]
theorem measurePreserving_mul_right_inv (μ : Measure G) [IsInvInvariant μ] [IsMulLeftInvariant μ]
    (g : G) : MeasurePreserving (fun t => (g * t)⁻¹) μ μ

{G : Type u_2}
[MeasurableSpace G]
[DivisionMonoid G]
[MeasurableMul G]
[MeasurableInv G]
(μ : MeasureTheory.Measure G)
[μ.IsInvInvariant]
[μ.IsMulLeftInvariant]
(g : G)

MeasureTheory.MeasurePreserving (fun t => (g * t)⁻¹) μ μ


theorem prod_mem_nhds_iff {s : Set X} {t : Set Y} {x : X} {y : Y} :
    s ×ˢ t ∈ 𝓝 (x, y) ↔ s ∈ 𝓝 x ∧ t ∈ 𝓝 y

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{t : Set Y}
{x : X}
{y : Y}


/-- The multiplicative equivalence between the type of units of `M` and the submonoid of unit
elements of `M`. -/
@[to_additive (attr := simps!) " The additive equivalence between the type of additive units of `M`
  and the additive submonoid whose elements are the additive units of `M`. "]
noncomputable def unitsTypeEquivIsUnitSubmonoid [Monoid M] : Mˣ ≃* IsUnit.submonoid M

{M : Type u_1}
[AddMonoid M]
(x : ↥(IsAddUnit.addSubmonoid M))

↑(-AddSubmonoid.addUnitsTypeEquivIsAddUnitAddSubmonoid.symm x) = ↑(-Classical.choose ⋯)


@[simps]
instance : Trans Equiv Equiv Equiv

∀ {a : Sort u_2} {b : Sort u_1} {c : Sort u_3} (e₁ : a ≃ b) (e₂ : b ≃ c), Trans.trans e₁ e₂ = e₁.trans e₂


@[simp, norm_cast]
theorem coeFn_univ (ν : ProbabilityMeasure Ω) : ν univ = 1

(ν : MeasureTheory.ProbabilityMeasure Ω)


@[simp] lemma mk_neg (i : NumDenSameDeg 𝒜 x) : mk (-i) = -mk i

(i : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

HomogeneousLocalization.mk (-i) = -HomogeneousLocalization.mk i


theorem apply_lt_nfpBFamily (H : ∀ i hi, IsNormal (f i hi)) {a b} (hb : b < nfpBFamily.{u, v} o f a)
    (i hi) : f i hi b < nfpBFamily.{u, v} o f a

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

(H : ∀ (i : Ordinal.{u}) (hi : i < o), Ordinal.IsNormal (f i hi))


lemma pairwiseDisjoint_piAntidiag_map_addRightEmbedding (hi : i ∉ s) (n : μ) :
    (antidiagonal n : Set (μ × μ)).PairwiseDisjoint fun p ↦
      map (addRightEmbedding fun j ↦ if j = i then p.1 else 0) (s.piAntidiag p.2)

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCancelCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
{i : ι}
{s : Finset ι}
(hi : i ∉ s)
(n : μ)

(↑(Finset.antidiagonal n)).PairwiseDisjoint fun p =>
  Finset.map (addRightEmbedding fun j => if j = i then p.1 else 0) (s.piAntidiag p.2)


@[to_additive (attr := simp)]
theorem op_bot : (⊥ : Submonoid M).op = ⊥


theorem ssubset_of_ssubset_of_subset [IsTrans α (· ⊆ ·)] (h₁ : a ⊂ b) (h₂ : b ⊆ c) : a ⊂ c

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


private lemma nonsingular_neg_of_Z_ne_zero {P : Fin 3 → F} (hP : W.Nonsingular P) (hPz : P z ≠ 0) :
    W.Nonsingular ![P x / P z ^ 2, W.toAffine.negY (P x / P z ^ 2) (P y / P z ^ 3), 1]

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.Nonsingular P)
(hPz : P z ≠ 0)


theorem IsBoundedBilinearMap.continuous_left (h : IsBoundedBilinearMap 𝕜 f) {e₂ : F} :
    Continuous fun e₁ => f (e₁, e₂)

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


theorem nat_mul : Primrec₂ ((· * ·) : ℕ → ℕ → ℕ)


theorem map_bot (f : X ⟶ Y) [Mono f] : (map f).obj ⊥ = ⊥

(CategoryTheory.Subobject.map f).obj ⊥ = ⊥


theorem skewAdjointMatricesLieSubalgebraEquiv_apply (P : Matrix n n R) (h : Invertible P)
    (A : skewAdjointMatricesLieSubalgebra J) :
    ↑(skewAdjointMatricesLieSubalgebraEquiv J P h A) = P⁻¹ * (A : Matrix n n R) * P

(A : ↥(skewAdjointMatricesLieSubalgebra J))

↑((skewAdjointMatricesLieSubalgebraEquiv J P h) A) = P⁻¹ * ↑A * P


@[to_additive]
theorem measure_ne_zero [Countable G] [SMulInvariantMeasure G α μ]
    (hμ : μ ≠ 0) (h : IsFundamentalDomain G s μ) : μ s ≠ 0

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)


@[simp]
protected theorem map_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : R[X]).map f = OfNat.ofNat n

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
(n : ℕ)
[n.AtLeastTwo]

Polynomial.map f (OfNat.ofNat n) = OfNat.ofNat n


lemma term_nonneg (n : ℕ) (s : ℝ) : 0 ≤ term n s


lemma Antivary.mul_left₀ (hf₁ : 0 ≤ f₁) (hf₂ : 0 ≤ f₂) (h₁ : Antivary f₁ g) (h₂ : Antivary f₂ g) :
    Antivary (f₁ * f₂) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedSemiring α]
[OrderedSemiring β]
{f₁ f₂ : ι → α}
{g : ι → β}
(hf₁ : 0 ≤ f₁)
(hf₂ : 0 ≤ f₂)
(h₁ : Antivary f₁ g)
(h₂ : Antivary f₂ g)


theorem mem_span : x ∈ span R s ↔ ∀ p : Submodule R M, s ⊆ p → x ∈ p

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

x ∈ Submodule.span R s ↔ ∀ (p : Submodule R M), s ⊆ ↑p → x ∈ p


@[to_additive]
theorem mul_lt_of_le_of_lt_one [CovariantClass α α (· * ·) (· < ·)] {a b c : α} (hbc : b ≤ c)
    (ha : a < 1) :
    b * a < c

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


theorem OrderEmbedding.le_map_sup [SemilatticeSup α] [SemilatticeSup β] (f : α ↪o β) (x y : α) :
    f x ⊔ f y ≤ f (x ⊔ y)

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[SemilatticeSup β]
(f : α ↪o β)
(x y : α)


theorem one_minus_lt_one (x : Ioo (0 : β) 1) : 1 - (x : β) < 1

{β : Type u_2}
[OrderedRing β]
(x : ↑(Set.Ioo 0 1))


@[simp] lemma preimage_subtype_val_Ici (a : {x // p x}) : (↑) ⁻¹' (Ici a.1) = Ici a

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a : { x // p x })


theorem two_mul_arctan_inv_2_sub_arctan_inv_7 : 2 * arctan 2⁻¹ - arctan 7⁻¹ = π / 4

2 * Real.arctan 2⁻¹ - Real.arctan 7⁻¹ = Real.pi / 4


@[to_additive (attr := simp) MeasureTheory.addFundamentalInterior_union_addFundamentalFrontier]
theorem fundamentalInterior_union_fundamentalFrontier :
    fundamentalInterior G s ∪ fundamentalFrontier G s = s

(G : Type u_1)
{α : Type u_3}
[Group G]
[MulAction G α]
(s : Set α)

MeasureTheory.fundamentalInterior G s ∪ MeasureTheory.fundamentalFrontier G s = s


theorem Algebra.lift_algHom_comp_right [Algebra.IsPushout R S R' S'] {A : Type*} [Semiring A]
    [Algebra R A] (f : S →ₐ[R] A) (g : R' →ₐ[R] A) (H) :
    (Algebra.pushoutDesc S' f g H).comp (toAlgHom R R' S') = g

(H : ∀ (x : S) (y : R'), f x * g y = g y * f x)

(Algebra.pushoutDesc S' f g H).comp (IsScalarTower.toAlgHom R R' S') = g


/-- If `u` is a solution to `E` and `init` designates its first `E.order` values,
  then `u = E.mkSol init`. This proves that `E.mkSol init` is the only solution
  of `E` whose first `E.order` values are given by `init`. -/
theorem eq_mk_of_is_sol_of_eq_init' {u : ℕ → α} {init : Fin E.order → α} (h : E.IsSolution u)
    (heq : ∀ n : Fin E.order, u n = init n) : u = E.mkSol init

(heq : ∀ (n : Fin E.order), u ↑n = init n)


@[simp]
theorem coeFn_ofBijective (f : E →SL[σ] F) (hinj : ker f = ⊥) (hsurj : LinearMap.range f = ⊤) :
    ⇑(ofBijective f hinj hsurj) = f

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(f : E →SL[σ] F)
(hinj : LinearMap.ker f = ⊥)
(hsurj : LinearMap.range f = ⊤)

⇑(ContinuousLinearEquiv.ofBijective f hinj hsurj) = ⇑f


@[simp]
theorem constantCoeff_mk {f : ℕ → R} : constantCoeff R (mk f) = f 0

(PowerSeries.constantCoeff R) (PowerSeries.mk f) = f 0


lemma isTorsionBySet_quotient_set_smul :
    IsTorsionBySet R (M⧸s • (⊤ : Submodule R M)) s

{R : Type u_1}
(M : Type u_2)
[CommRing R]
[AddCommGroup M]
[Module R M]
(s : Set R)


/-- Group homomorphisms preserve inverse. -/
@[to_additive (attr := simp) "Additive group homomorphisms preserve negation."]
theorem map_inv [Group G] [DivisionMonoid H] [MonoidHomClass F G H]
    (f : F) (a : G) : f a⁻¹ = (f a)⁻¹

{G : Type u_7}
{H : Type u_8}
{F : Type u_9}
[FunLike F G H]
[AddGroup G]
[SubtractionMonoid H]
[AddMonoidHomClass F G H]
(f : F)
(a : G)


theorem map_lt_sum' {ι : Type*} {s : Finset ι} {f : ι → R} {g : Γ₀} (hg : g < ⊤)
    (hf : ∀ i ∈ s, g < v (f i)) : g < v (∑ i ∈ s, f i)

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
{ι : Type u_6}
{s : Finset ι}
{f : ι → R}
{g : Γ₀}
(hg : g < ⊤)
(hf : ∀ i ∈ s, g < v (f i))


theorem v_sq_scalar (m : M) : v Q m * v Q m = algebraMap _ _ (Q m)

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

(CliffordAlgebra.EquivEven.v Q) m * (CliffordAlgebra.EquivEven.v Q) m =
  (algebraMap R (CliffordAlgebra (CliffordAlgebra.EquivEven.Q' Q))) (Q m)


protected theorem mul_left' (h : a ≡ b [ZMOD n]) : c * a ≡ c * b [ZMOD c * n]


/-- The measure of a set under `p.bind f` is the sum over `a : α`
  of the probability of `a` under `p` times the measure of the set under `f a`. -/
@[simp]
theorem toMeasure_bind_apply [MeasurableSpace β] (hs : MeasurableSet s) :
    (p.bind f).toMeasure s = ∑' a, p a * (f a).toMeasure s

{α : Type u_1}
{β : Type u_2}
(p : PMF α)
(f : α → PMF β)
(s : Set β)
[MeasurableSpace β]
(hs : MeasurableSet s)

(p.bind f).toMeasure s = ∑' (a : α), p a * (f a).toMeasure s


theorem SuperpolynomialDecay.const_mul [ContinuousMul β] (hf : SuperpolynomialDecay l k f) (c : β) :
    SuperpolynomialDecay l k fun n => c * f n

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k fun n => c * f n


@[simp]
theorem lift_bot (K : IntermediateField F E) :
    lift (F := K) ⊥ = ⊥

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(K : IntermediateField F E)


@[simp]
theorem image2_singleton_right : image2 f s {b} = (fun a => f a b) '' s

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s : Set α}
{b : β}

Set.image2 f s {b} = (fun a => f a b) '' s


theorem mul_apply (e₁ e₂ : r ≃r r) (x : α) : (e₁ * e₂) x = e₁ (e₂ x)

{α : Type u_1}
{r : α → α → Prop}
(e₁ e₂ : r ≃r r)
(x : α)


theorem Factors.ne_bot (P : (factors (map (algebraMap R S) p)).toFinset) : (P : Ideal S) ≠ ⊥

(P : { x // x ∈ (UniqueFactorizationMonoid.factors (Ideal.map (algebraMap R S) p)).toFinset })


theorem HasSum.norm_le_of_bounded {f : ι → E} {g : ι → ℝ} {a : E} {b : ℝ} (hf : HasSum f a)
    (hg : HasSum g b) (h : ∀ i, ‖f i‖ ≤ g i) : ‖a‖ ≤ b

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
{f : ι → E}
{g : ι → ℝ}
{a : E}
{b : ℝ}
(hf : HasSum f a)
(hg : HasSum g b)
(h : ∀ (i : ι), ‖f i‖ ≤ g i)


/--
Turn a monoid object in the opposite category into a comonoid object.
-/
@[simps] def Mon_OpOpToComon_obj' (A : (Mon_ (Cᵒᵖ))) : Comon_ C

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
(A : Mon_ Cᵒᵖ)

(Comon_.Mon_OpOpToComon_obj' C A).counit = A.one.unop


theorem pow_length_le_mul_ofDigits {b : ℕ} {l : List ℕ} (hl : l ≠ []) (hl2 : l.getLast hl ≠ 0) :
    (b + 2) ^ l.length ≤ (b + 2) * ofDigits (b + 2) l

(b + 2) ^ l.length ≤ (b + 2) * Nat.ofDigits (b + 2) l


@[simp]
theorem omega_succ {n} : n ∈ omega.{u} → insert n n ∈ omega.{u}

n ∈ ZFSet.omega → insert n n ∈ ZFSet.omega


@[to_additive (attr := simp)]
theorem div_eq_self : a / b = a ↔ b = 1


theorem Iic_sInf (s : Set α) : Iic (sInf s) = ⋂ a ∈ s, Iic a

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


theorem ofFractionRing_comp_algebraMap :
    ofFractionRing ∘ algebraMap K[X] (FractionRing K[X]) = algebraMap _ _

RatFunc.ofFractionRing ∘ ⇑(algebraMap K[X] (FractionRing K[X])) = ⇑(algebraMap K[X] (RatFunc K))


/-- Symmetric statement to `Finset.image_image₂_distrib_right`. -/
theorem image_image₂_right_comm {f : α → β' → γ} {g : β → β'} {f' : α → β → δ} {g' : δ → γ}
    (h_right_comm : ∀ a b, f a (g b) = g' (f' a b)) :
    image₂ f s (t.image g) = (image₂ f' s t).image g'

{f : α → β' → γ}

{f' : α → β → δ}

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

Finset.image₂ f s (Finset.image g t) = Finset.image g' (Finset.image₂ f' s t)


@[simp, norm_cast]
theorem coe_dual (K : ProperCone ℝ E) : K.dual = (K : Set E).innerDualCone

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
(K : ProperCone ℝ E)


@[to_additive (attr := simp)]
theorem fst_one [One M] [One N] : (1 : M × N).1 = 1

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


@[to_additive]
theorem ae_measure_preimage_mul_right_lt_top_of_ne_zero (h2s : ν' s ≠ 0) (h3s : ν' s ≠ ∞) :
    ∀ᵐ x ∂μ', ν' ((fun y => y * x) ⁻¹' s) < ∞

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
{s : Set G}
[MeasurableInv G]
(μ' ν' : MeasureTheory.Measure G)
[MeasureTheory.SigmaFinite μ']
[MeasureTheory.SigmaFinite ν']
[μ'.IsMulLeftInvariant]
[ν'.IsMulLeftInvariant]
(h2s : ν' s ≠ 0)
(h3s : ν' s ≠ ⊤)

∀ᵐ (x : G) ∂μ', ν' ((fun y => y * x) ⁻¹' s) < ⊤


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

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


theorem IndepSets.bUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : Kernel α Ω} {μ : Measure α} {u : Set ι} (hyp : ∀ n ∈ u, IndepSets (s n) s' κ μ) :
    IndepSets (⋃ n ∈ u, s n) s' κ μ

(hyp : ∀ n ∈ u, ProbabilityTheory.Kernel.IndepSets (s n) s' κ μ)

ProbabilityTheory.Kernel.IndepSets (⋃ n ∈ u, s n) s' κ μ


theorem mem_rcons_iff {i j : ι} (p : Pair M i) (m : M j) :
    ⟨_, m⟩ ∈ (rcons p).toList ↔ ⟨_, m⟩ ∈ p.tail.toList ∨
      m ≠ 1 ∧ (∃ h : i = j, m = h ▸ p.head)

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

⟨j, m⟩ ∈ (Monoid.CoprodI.Word.rcons p).toList ↔ ⟨j, m⟩ ∈ p.tail.toList ∨ m ≠ 1 ∧ ∃ (h : i = j), m = h ▸ p.head


@[ext]
theorem biprod.hom_ext {X Y Z : C} [HasBinaryBiproduct X Y] (f g : Z ⟶ X ⊞ Y)
    (h₀ : f ≫ biprod.fst = g ≫ biprod.fst) (h₁ : f ≫ biprod.snd = g ≫ biprod.snd) : f = g

(h₀ : f ≫ CategoryTheory.Limits.biprod.fst = g ≫ CategoryTheory.Limits.biprod.fst)

(h₁ : f ≫ CategoryTheory.Limits.biprod.snd = g ≫ CategoryTheory.Limits.biprod.snd)


theorem natAbs_lt_iff_mul_self_lt {a b : ℤ} : a.natAbs < b.natAbs ↔ a * a < b * b


@[simp]
theorem Subsingleton.stronglyMeasurable' {α β} [MeasurableSpace α] [TopologicalSpace β]
    [Subsingleton α] (f : α → β) : StronglyMeasurable f

{α : Type u_5}
{β : Type u_6}
[MeasurableSpace α]
[TopologicalSpace β]
[Subsingleton α]
(f : α → β)


theorem const_mul_rev (f g : R) (U hu₁ hu₂) : const R f g U hu₁ * const R g f U hu₂ = 1

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(hu₁ : ∀ x ∈ U, g ∈ x.asIdeal.primeCompl)

(hu₂ : ∀ x ∈ U, f ∈ x.asIdeal.primeCompl)

AlgebraicGeometry.StructureSheaf.const R f g U hu₁ * AlgebraicGeometry.StructureSheaf.const R g f U hu₂ = 1


@[to_additive (attr := measurability)]
theorem measurable_leOnePart : Measurable (leOnePart : α → α)

{α : Type u_1}
[Lattice α]
[AddGroup α]
[MeasurableSpace α]
[MeasurableSup α]
[MeasurableNeg α]


theorem coeff_mul_monomial' (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ R) :
    coeff m (p * monomial s r) = if s ≤ m then coeff (m - s) p * r else 0

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

MvPolynomial.coeff m (p * (MvPolynomial.monomial s) r) = if s ≤ m then MvPolynomial.coeff (m - s) p * r else 0


@[to_additive]
theorem Multipliable.inv (hf : Multipliable f) : Multipliable fun b ↦ (f b)⁻¹

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
(hf : Summable f)


private lemma ghostFun_nsmul (m : ℕ) (x : WittVector p R) : ghostFun (m • x) = m • ghostFun x

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

WittVector.ghostFun (m • x) = m • WittVector.ghostFun x


theorem tendsto_atTop_iff_leadingCoeff_nonneg :
    Tendsto (fun x => eval x P) atTop atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
(P : 𝕜[X])
[OrderTopology 𝕜]

Filter.Tendsto (fun x => Polynomial.eval x P) Filter.atTop Filter.atTop ↔ 0 < P.degree ∧ 0 ≤ P.leadingCoeff


@[simp]
theorem wronskian_zero_left (a : R[X]) : wronskian 0 a = 0


theorem getLast?_eq_getLast : ∀ l h, @getLast? α l = some (getLast l h)

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


private lemma continuousAt_mul_top_pos {a : ℝ} (h : 0 < a) :
    ContinuousAt (fun p : EReal × EReal ↦ p.1 * p.2) (⊤, a)

ContinuousAt (fun p => p.1 * p.2) (⊤, ↑a)


@[simp]
theorem map_id (M : Matrix m n α) : M.map id = M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
(M : Matrix m n α)


/-- The functor associating the topological `n`-simplex to `[n] : SimplexCategory`. -/
@[simps obj map]
def toTop : SimplexCategory ⥤ TopCat

∀ {X Y : SimplexCategory} (f : X ⟶ Y),
  SimplexCategory.toTop.map f = { toFun := SimplexCategory.toTopMap f, continuous_toFun := ⋯ }


theorem aleph0_le_cof {o} : ℵ₀ ≤ cof o ↔ IsLimit o


@[simp]
theorem contractRight_apply (f : Module.Dual R M) (m : M) : contractRight R M (m ⊗ₜ f) = f m

{R : Type u}
{M : Type v₁}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(f : Module.Dual R M)
(m : M)


@[simp]
theorem imJ_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
    (dualNumberEquiv q).snd.imJ = q.imJ.snd

{R : Type u_1}
[CommRing R]
(q : Quaternion (DualNumber R))

(TrivSqZeroExt.snd (Quaternion.dualNumberEquiv q)).imJ = TrivSqZeroExt.snd q.imJ


private theorem rat_prop (r : ℚ) : innerProp' E (r : 𝕜)

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[InnerProductSpaceable E]
(r : ℚ)


theorem submartingale_of_setIntegral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j : ι,
      i ≤ j → ∀ s : Set Ω, MeasurableSet[ℱ i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ) :
    Submartingale f ℱ μ

{f : ι → Ω → ℝ}

(hint : ∀ (i : ι), MeasureTheory.Integrable (f i) μ)

(hf : ∀ (i j : ι), i ≤ j → ∀ (s : Set Ω), MeasurableSet s → ∫ (ω : Ω) in s, f i ω ∂μ ≤ ∫ (ω : Ω) in s, f j ω ∂μ)


@[simp]
theorem normSq_star : normSq (star a) = normSq a

Quaternion.normSq (star a) = Quaternion.normSq a


@[simp]
theorem erase_of_not_mem {a : α} {s : Multiset α} : a ∉ s → s.erase a = s

{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Multiset α}


theorem norm_ofSubsingleton_id [Subsingleton ι] [Nontrivial G] (i : ι) :
    ‖ofSubsingleton 𝕜 G G i (.id _ _)‖ = 1

(𝕜 : Type u)
{ι : Type v}
(G : Type wG)
[Fintype ι]
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[Subsingleton ι]
[Nontrivial G]
(i : ι)

‖(ContinuousMultilinearMap.ofSubsingleton 𝕜 G G i) (ContinuousLinearMap.id 𝕜 G)‖ = 1


lemma isContinuous_of_iso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂)
    (J : GrothendieckTopology C) (K : GrothendieckTopology D)
    [Functor.IsContinuous.{t} F₁ J K] : Functor.IsContinuous.{t} F₂ J K

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)


lemma ConcaveOn.mul_convexOn (hf : ConcaveOn 𝕜 s f) (hg : ConvexOn 𝕜 s g)
    (hf₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ f x) (hg₀ : ∀ ⦃x⦄, x ∈ s → g x ≤ 0) (hfg : MonovaryOn f g s) :
    ConvexOn 𝕜 s (f * g)

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{s : Set 𝕜}
[IsScalarTower 𝕜 E E]
[SMulCommClass 𝕜 E E]
{f g : 𝕜 → E}
(hf : ConcaveOn 𝕜 s f)
(hg : ConvexOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ f x)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → g x ≤ 0)
(hfg : MonovaryOn f g s)


protected lemma nonneg_total (a : ℚ) : 0 ≤ a ∨ 0 ≤ -a


@[to_additive]
theorem range_eq_map (f : G →* N) : f.range = (⊤ : Subgroup G).map f

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


/-- If a vector space is finite-dimensional, then the cardinality of any basis is equal to its
`finrank`. -/
theorem finrank_eq_card_basis' [FiniteDimensional K V] {ι : Type w} (h : Basis ι K V) :
    (finrank K V : Cardinal.{w}) = #ι

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{ι : Type w}
(h : Basis ι K V)


/-- If `I` divides `J`, then `I` contains `J`.

In a Dedekind domain, to divide and contain are equivalent, see `Ideal.dvd_iff_le`.
-/
theorem le_of_dvd {I J : Ideal R} : I ∣ J → J ≤ I

{R : Type u}
[CommSemiring R]
{I J : Ideal R}


nonrec theorem tendsto_const_smul_iff {f : β → α} {l : Filter β} {a : α} {c : M} (hc : IsUnit c) :
    Tendsto (fun x => c • f x) l (𝓝 <| c • a) ↔ Tendsto f l (𝓝 a)

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Monoid M]
[TopologicalSpace α]
[MulAction M α]
[ContinuousConstSMul M α]
{f : β → α}
{l : Filter β}
{a : α}
{c : M}
(hc : IsUnit c)

Filter.Tendsto (fun x => c • f x) l (𝓝 (c • a)) ↔ Filter.Tendsto f l (𝓝 a)


@[to_additive]
theorem even_mul_odd {f : ℕ → M} (he : Multipliable fun k ↦ f (2 * k))
    (ho : Multipliable fun k ↦ f (2 * k + 1)) : Multipliable f

(ho : Multipliable fun k => f (2 * k + 1))


theorem neg_eq (H : B₁.IsAlt) (x y : M₁) : -B₁ x y = B₁ y x

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


theorem trim_trim (m : OuterMeasure α) : m.trim.trim = m.trim

{α : Type u_1}
[MeasurableSpace α]
(m : MeasureTheory.OuterMeasure α)


@[to_additive]
lemma one_le_elim_iff : 1 ≤ Sum.elim v₁ v₂ ↔ 1 ≤ v₁ ∧ 1 ≤ v₂

{α₁ : Type u_1}
{α₂ : Type u_2}
{β : Type u_3}
[LE β]
[One β]
{v₁ : α₁ → β}
{v₂ : α₂ → β}


theorem IsPositive.inner_nonneg_right {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) :
    0 ≤ re ⟪x, T x⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{T : E →L[𝕜] E}
(hT : T.IsPositive)
(x : E)


@[simp]
theorem Ici_succ (a : α) : Ici (succ a) = Ioi a

{α : Type u_1}
[Preorder α]
[SuccOrder α]
[NoMaxOrder α]
(a : α)


theorem continuousOn_symm : ContinuousOn e.symm e.target

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


@[simp]
theorem mem_sInf {S : Set (Submodule R M)} {x : M} : x ∈ sInf S ↔ ∀ p ∈ S, x ∈ p

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{S : Set (Submodule R M)}
{x : M}


theorem Bounded.mono (hst : s ⊆ t) (hs : Bounded r t) : Bounded r s

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}
(hst : s ⊆ t)
(hs : Set.Bounded r t)


theorem wellFoundedGT_dual_iff (α : Type*) [LT α] : WellFoundedGT αᵒᵈ ↔ WellFoundedLT α


theorem CNF_of_le_one {b o : Ordinal} (hb : b ≤ 1) (ho : o ≠ 0) : CNF b o = [⟨0, o⟩]

{b o : Ordinal.{u_1}}
(hb : b ≤ 1)
(ho : o ≠ 0)


theorem norm_eq_one_of_pow_eq_one {ζ : ℂ} {n : ℕ} (h : ζ ^ n = 1) (hn : n ≠ 0) : ‖ζ‖ = 1


theorem le_iff : μ₁ ≤ μ₂ ↔ ∀ s, MeasurableSet s → μ₁ s ≤ μ₂ s

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

μ₁ ≤ μ₂ ↔ ∀ (s : Set α), MeasurableSet s → μ₁ s ≤ μ₂ s


/-- A `DistribMulAction` that is continuous on a uniform group is uniformly continuous.
This can't be an instance due to it forming a loop with
`UniformContinuousConstSMul.to_continuousConstSMul` -/
theorem uniformContinuousConstSMul_of_continuousConstSMul [Monoid R] [AddCommGroup M]
    [DistribMulAction R M] [UniformSpace M] [UniformAddGroup M] [ContinuousConstSMul R M] :
    UniformContinuousConstSMul R M

(R : Type u)
(M : Type v)
[Monoid R]
[AddCommGroup M]
[DistribMulAction R M]
[UniformSpace M]
[UniformAddGroup M]
[ContinuousConstSMul R M]


@[simp]
theorem blockDiag_conjTranspose {α : Type*} [AddMonoid α] [StarAddMonoid α]
    (M : Matrix (m × o) (n × o) α) (k : o) : blockDiag Mᴴ k = (blockDiag M k)ᴴ

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_14}
[AddMonoid α]
[StarAddMonoid α]
(M : Matrix (m × o) (n × o) α)
(k : o)


theorem product_eq_biUnion [DecidableEq (α × β)] (s : Finset α) (t : Finset β) :
    s ×ˢ t = s.biUnion fun a => t.image fun b => (a, b)

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

s ×ˢ t = s.biUnion fun a => Finset.image (fun b => (a, b)) t


/-- The snake input in the opposite category that is deduced from a snake input. -/
@[simps]
noncomputable def op : SnakeInput Cᵒᵖ

(S : CategoryTheory.ShortComplex.SnakeInput C)


/-- An equivalence between `ℕ+` and `ℕ` given by `PNat.natPred` and `Nat.succPNat`. -/
@[simps (config := .asFn)]
def _root_.Equiv.pnatEquivNat : ℕ+ ≃ ℕ


theorem comap_equiv_eq_map_symm (f : R ≃+* S) (K : NonUnitalSubsemiring S) :
    K.comap (f : R →ₙ+* S) = K.map f.symm

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R ≃+* S)
(K : NonUnitalSubsemiring S)

NonUnitalSubsemiring.comap (↑f) K = NonUnitalSubsemiring.map f.symm K


@[mono]
theorem MemBaseSet.mono (I : Box ι) (h : l₁ ≤ l₂) (hc : c₁ ≤ c₂) {π : TaggedPrepartition I}
    (hr : ∀ x ∈ Box.Icc I, r₁ x ≤ r₂ x) (hπ : l₁.MemBaseSet I c₁ r₁ π) : l₂.MemBaseSet I c₂ r₂ π

(hr : ∀ x ∈ BoxIntegral.Box.Icc I, r₁ x ≤ r₂ x)


@[simp]
theorem span_singleton_one : span ({1} : Set α) = ⊤


/-- **First moment method**. The maximum of an integrable function is greater than its mean. -/
theorem exists_average_le (hμ : μ ≠ 0) (hf : Integrable f μ) : ∃ x, ⨍ a, f a ∂μ ≤ f x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
[MeasureTheory.IsFiniteMeasure μ]
(hμ : μ ≠ 0)
(hf : MeasureTheory.Integrable f μ)


theorem birkhoffAverage_zero (f : α → α) (g : α → M) (x : α) :
    birkhoffAverage R f g 0 x = 0

(R : Type u_1)
{α : Type u_2}
{M : Type u_3}
[DivisionSemiring R]
[AddCommMonoid M]
[Module R M]
(f : α → α)
(g : α → M)
(x : α)


@[simp] lemma nat_eq_ofENat {m : ℕ} {n : ℕ∞} : (m : Cardinal) = n ↔ m = n


lemma homologyMap'_op : (homologyMap' φ h₁ h₂).op =
    h₂.iso.inv.op ≫ homologyMap' (opMap φ) h₂.op h₁.op ≫ h₁.iso.hom.op

(CategoryTheory.ShortComplex.homologyMap' φ h₁ h₂).op =
  CategoryTheory.CategoryStruct.comp h₂.iso.inv.op
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.ShortComplex.homologyMap' (CategoryTheory.ShortComplex.opMap φ) h₂.op h₁.op) h₁.iso.hom.op)


@[fun_prop]
protected lemma Continuous.nndist [TopologicalSpace β] {f g : β → α} (hf : Continuous f)
    (hg : Continuous g) : Continuous fun b => nndist (f b) (g b)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[TopologicalSpace β]
{f g : β → α}
(hf : Continuous f)
(hg : Continuous g)


protected theorem add_le_of_le_sub_left {a b c : Int} (h : b ≤ c - a) : a + b ≤ c


@[simp]
theorem zeroLocus_empty : zeroLocus 𝒜 (∅ : Set A) = Set.univ

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

ProjectiveSpectrum.zeroLocus 𝒜 ∅ = Set.univ


theorem continuousAt_snd {p : X × Y} : ContinuousAt Prod.snd p

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


/-- The `Kleisli` category of a `Control.Monad` is equivalent to the `Kleisli` category of its
category-theoretic version, provided the monad is lawful.
-/
@[simps]
def eq : KleisliCat m ≌ Kleisli (ofTypeMonad m)

(m : Type u → Type u)
[Monad m]
[LawfulMonad m]

(CategoryTheory.eq m).unitIso = CategoryTheory.NatIso.ofComponents (fun X => CategoryTheory.Iso.refl X) ⋯


theorem symm_bijective :
    Function.Bijective (LieModuleEquiv.symm : (M ≃ₗ⁅R,L⁆ N) → N ≃ₗ⁅R,L⁆ M)

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]


lemma IsRegular.of_perm_of_subset_jacobson_annihilator [IsNoetherian R M]
    {rs rs' : List R} (h1 : IsRegular M rs) (h2 : List.Perm rs rs')
    (h3 : ∀ r ∈ rs, r ∈ (Module.annihilator R M).jacobson) : IsRegular M rs'

(h1 : RingTheory.Sequence.IsRegular M rs)


/-- Build an isomorphism in the category `AlgebraCat R` from a `AlgEquiv` between `Algebra`s. -/
@[simps]
def AlgEquiv.toAlgebraIso {g₁ : Ring X₁} {g₂ : Ring X₂} {m₁ : Algebra R X₁} {m₂ : Algebra R X₂}
    (e : X₁ ≃ₐ[R] X₂) : AlgebraCat.of R X₁ ≅ AlgebraCat.of R X₂

{R : Type u}
[CommRing R]
{X₁ X₂ : Type u}
{g₁ : Ring X₁}
{g₂ : Ring X₂}
{m₁ : Algebra R X₁}
{m₂ : Algebra R X₂}
(e : X₁ ≃ₐ[R] X₂)


/-- Given a trifunctor `F : C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄` and types `I₁`, `I₂`, `I₃`,
this is the obvious functor
`GradedObject I₁ C₁ ⥤ GradedObject I₂ C₂ ⥤ GradedObject I₃ C₃ ⥤ GradedObject (I₁ × I₂ × I₃) C₄`.
-/
@[simps]
def mapTrifunctor (I₁ I₂ I₃ : Type*) :
    GradedObject I₁ C₁ ⥤ GradedObject I₂ C₂ ⥤ GradedObject I₃ C₃ ⥤
      GradedObject (I₁ × I₂ × I₃) C₄

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

{X₁ Y₁ : CategoryTheory.GradedObject I₁ C₁}

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

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

(((CategoryTheory.GradedObject.mapTrifunctor F I₁ I₂ I₃).map φ).app X₂).app X₃ x =
  ((F.map (φ x.1)).app (X₂ x.2.1)).app (X₃ x.2.2)


theorem lift_lift'_assoc {g : Set α → Set β} {h : Set β → Filter γ} (hg : Monotone g)
    (hh : Monotone h) : (f.lift' g).lift h = f.lift fun s => h (g s)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Set α → Set β}
{h : Set β → Filter γ}
(hg : Monotone g)
(hh : Monotone h)


theorem Trident.IsLimit.hom_ext [Nonempty J] {s : Trident f} (hs : IsLimit s) {W : C}
    {k l : W ⟶ s.pt} (h : k ≫ s.ι = l ≫ s.ι) : k = l

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


theorem inter_filter (s t : Finset α) : s ∩ filter p t = filter p (s ∩ t)

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
[DecidableEq α]
(s t : Finset α)

s ∩ Finset.filter p t = Finset.filter p (s ∩ t)