@[simp]
theorem AlgEquiv.liftNormal_commutes [Normal F E] (x : K₁) :
    χ.liftNormal E (algebraMap K₁ E x) = algebraMap K₂ E (χ x)

{F : Type u_1}
{K₁ : Type u_3}
{K₂ : Type u_4}
[Field F]
[Field K₁]
[Field K₂]
[Algebra F K₁]
[Algebra F K₂]
(χ : K₁ ≃ₐ[F] K₂)
(E : Type u_6)
[Field E]
[Algebra F E]
[Algebra K₁ E]
[Algebra K₂ E]
[IsScalarTower F K₁ E]
[IsScalarTower F K₂ E]
[Normal F E]
(x : K₁)

(χ.liftNormal E) ((algebraMap K₁ E) x) = (algebraMap K₂ E) (χ x)


/-- The least fixed point of f is reached after the successor of the domains cardinality -/
theorem lfpApprox_ord_eq_lfp : lfpApprox f ⊥ (ord <| succ #α) = lfp f

{α : Type u}
[CompleteLattice α]
(f : α →o α)

OrdinalApprox.lfpApprox f ⊥ (Order.succ (Cardinal.mk α)).ord = OrderHom.lfp f


theorem inf_eq_iInf (x y : α) : x ⊓ y = ⨅ b : Bool, cond b x y

{α : Type u_1}
[CompleteLattice α]
(x y : α)


@[simp] theorem toListAppend_eq (arr : Array α) (l) : arr.toListAppend l = arr.data ++ l

{α : Type u_1}
(arr : Array α)
(l : List α)


theorem denseInducing_coe : DenseInducing ((↑) : α → Completion α)


theorem subset_eval_image_pi (ht : (s.pi t).Nonempty) (i : ι) : t i ⊆ eval i '' s.pi t

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t : (i : ι) → Set (α i)}
(ht : (s.pi t).Nonempty)
(i : ι)


@[simp]
theorem coe_J : ↑(symJ l R) = J l R

{l : Type u_1}
{R : Type u_2}
[DecidableEq l]
[Fintype l]
[CommRing R]

↑(SymplecticGroup.symJ l R) = Matrix.J l R


theorem erase_single_ne {a a' : α} {b : M} (h : a ≠ a') : erase a (single a' b) = single a' b

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a a' : α}
{b : M}
(h : a ≠ a')

Finsupp.erase a (Finsupp.single a' b) = Finsupp.single a' b


@[simp]
theorem map₂_curry (m : α × β → γ) (f : Filter α) (g : Filter β) :
    map₂ (curry m) f g = (f ×ˢ g).map m

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
(m : α × β → γ)
(f : Filter α)
(g : Filter β)

Filter.map₂ (Function.curry m) f g = Filter.map m (f ×ˢ g)


@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Mul X] [Mul Y] (e : X ≃* Y) :
    (@DFunLike.coe (MagmaCat.of X ⟶ MagmaCat.of Y) _ (fun _ => (forget MagmaCat).obj _)
      ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e

{X Y : Type u_1}
[Add X]
[Add Y]
(e : X ≃+ Y)


theorem integral_mono_interval {c d} (hca : c ≤ a) (hab : a ≤ b) (hbd : b ≤ d)
    (hf : 0 ≤ᵐ[μ.restrict (Ioc c d)] f) (hfi : IntervalIntegrable f μ c d) :
    (∫ x in a..b, f x ∂μ) ≤ ∫ x in c..d, f x ∂μ

{f : ℝ → ℝ}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{c d : ℝ}
(hca : c ≤ a)
(hab : a ≤ b)
(hbd : b ≤ d)
(hf : 0 ≤ᵐ[μ.restrict (Set.Ioc c d)] f)
(hfi : IntervalIntegrable f μ c d)

∫ (x : ℝ) in a..b, f x ∂μ ≤ ∫ (x : ℝ) in c..d, f x ∂μ


/-- The exponential map in a complete normed field `𝕂` of characteristic zero has strict derivative
`1` at zero, as long as it converges on a neighborhood of zero. -/
theorem hasStrictDerivAt_exp_zero_of_radius_pos (h : 0 < (expSeries 𝕂 𝕂).radius) :
    HasStrictDerivAt (exp 𝕂) (1 : 𝕂) 0

(h : 0 < (NormedSpace.expSeries 𝕂 𝕂).radius)

HasStrictDerivAt (NormedSpace.exp 𝕂) 1 0


@[simp]
theorem roots_multiset_prod_X_sub_C (s : Multiset R) : (s.map fun a => X - C a).prod.roots = s

{R : Type u}
[CommRing R]
[IsDomain R]
(s : Multiset R)

(Multiset.map (fun a => Polynomial.X - Polynomial.C a) s).prod.roots = s


theorem edist_triangle_right (x y z : α) : edist x y ≤ edist x z + edist y z

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


/-- A graded version of `NonUnitalNonAssocSemiring`. -/
class GNonUnitalNonAssocSemiring [Add ι] [∀ i, AddCommMonoid (A i)] extends
  GradedMonoid.GMul A where
  /-- Multiplication from the right with any graded component's zero vanishes. -/
  mul_zero : ∀ {i j} (a : A i), mul a (0 : A j) = 0
  /-- Multiplication from the left with any graded component's zero vanishes. -/
  zero_mul : ∀ {i j} (b : A j), mul (0 : A i) b = 0
  /-- Multiplication from the right between graded components distributes with respect to
  addition. -/
  mul_add : ∀ {i j} (a : A i) (b c : A j), mul a (b + c) = mul a b + mul a c
  /-- Multiplication from the left between graded components distributes with respect to
  addition. -/
  add_mul : ∀ {i j} (a b : A i) (c : A j), mul (a + b) c = mul a c + mul b c

[self : DirectSum.GNonUnitalNonAssocSemiring A]

GradedMonoid.GMul.mul (a + b) c = GradedMonoid.GMul.mul a c + GradedMonoid.GMul.mul b c


theorem multiplicity_map_eq {F : Type*} [EquivLike F α β] [MulEquivClass F α β]
    (f : F) {a b : α} : multiplicity (f a) (f b) = multiplicity a b

{α : Type u_1}
{β : Type u_2}
[Monoid α]
[Monoid β]
[DecidableRel fun x x_1 => x ∣ x_1]
[DecidableRel fun x x_1 => x ∣ x_1]
{F : Type u_3}
[EquivLike F α β]
[MulEquivClass F α β]
(f : F)
{a b : α}


theorem isNat_ofNat (α : Type u) [AddMonoidWithOne α] {a : α} {n : ℕ}
    (h : n = a) : IsNat a n

(α : Type u)
[AddMonoidWithOne α]
{a : α}
{n : ℕ}
(h : ↑n = a)


@[simp, norm_cast]
theorem toENNReal_max (m n : ℕ∞) : ↑(max m n) = (max m n : ℝ≥0∞)


theorem mul_eq_mul_right_iff {a b c : Int} (h : c ≠ 0) : a * c = b * c ↔ a = b


theorem OrderTop.atTop_eq (α) [PartialOrder α] [OrderTop α] : (atTop : Filter α) = pure ⊤

(α : Type u_6)
[PartialOrder α]
[OrderTop α]


theorem comap_const (f : C(X, Y)) (y : Y) (h : ∀ x, f x = y) :
    (comap f : LocallyConstant Y Z → LocallyConstant X Z) = fun g => const X (g y)

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : C(X, Y))
(y : Y)
(h : ∀ (x : X), f x = y)

LocallyConstant.comap f = fun g => LocallyConstant.const X (g y)


@[reassoc (attr := simp)]
theorem preservesLimitsIso_inv_π (j) :
    (preservesLimitIso G F).inv ≫ G.map (limit.π F j) = limit.π _ j

CategoryTheory.CategoryStruct.comp (CategoryTheory.preservesLimitIso G F).inv
    (G.map (CategoryTheory.Limits.limit.π F j)) =
  CategoryTheory.Limits.limit.π (F.comp G) j


@[simp]
theorem whiskerRight {X Y : C} (f : X ⟶ Y) (Z : C) : f ▷ Z = Limits.prod.map f (𝟙 Z)

CategoryTheory.MonoidalCategory.whiskerRight f Z = CategoryTheory.Limits.prod.map f (CategoryTheory.CategoryStruct.id Z)


@[to_additive]
theorem exists_zpow_eq_one (x : G) : ∃ (i : ℤ) (_ : i ≠ 0), x ^ (i : ℤ) = 1

{G : Type u_1}
[AddGroup G]
[Finite G]
(x : G)


/-- Uniform isomorphism between `α` and `β` -/
--@[nolint has_nonempty_instance] -- Porting note(#5171): linter not yet ported
structure UniformEquiv (α : Type*) (β : Type*) [UniformSpace α] [UniformSpace β] extends
  α ≃ β where
  /-- Uniform continuity of the function -/
  uniformContinuous_toFun : UniformContinuous toFun
  /-- Uniform continuity of the inverse -/
  uniformContinuous_invFun : UniformContinuous invFun

{α : Type u_4}
{β : Type u_5}
[UniformSpace α]
[UniformSpace β]
(self : α ≃ᵤ β)


@[simp]
theorem zero_dotProduct' : (fun _ => (0 : α)) ⬝ᵥ v = 0

{m : Type u_2}
{α : Type v}
[Fintype m]
[NonUnitalNonAssocSemiring α]
(v : m → α)


theorem specializes_iff_not_disjoint : x ⤳ y ↔ ¬Disjoint (𝓝 x) (𝓝 y)

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


@[simp] lemma inf_Ici [OrderTop α] (a : α) : (Ici a).inf id = a

{α : Type u_2}
[SemilatticeInf α]
[LocallyFiniteOrderTop α]
[OrderTop α]
(a : α)


/-- The cosine of an angle in a right-angled triangle as a ratio of sides. -/
theorem cos_oangle_left_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    Real.Angle.cos (∡ p₃ p₁ p₂) = dist p₁ p₂ / dist p₁ p₃

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

(∡ p₃ p₁ p₂).cos = dist p₁ p₂ / dist p₁ p₃


@[simp]
lemma single_obj_X_self (j : ι) (A : V) :
    ((single V c j).obj A).X j = A

((HomologicalComplex.single V c j).obj A).X j = A


/-- When the second map `S.g` is zero, this is the left homology data on `S` given
by any colimit cokernel cofork of `S.f` -/
@[simps]
def ofIsColimitCokernelCofork (hg : S.g = 0) (c : CokernelCofork S.f) (hc : IsColimit c) :
    S.LeftHomologyData

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.LeftHomologyData.ofIsColimitCokernelCofork S hg c hc).π = CategoryTheory.Limits.Cofork.π c


/-- `Equiv.funUnique` as an `IsometryEquiv`. -/
@[simps!]
def funUnique [Unique ι] [Fintype ι] : (ι → α) ≃ᵢ α

(ι : Type u_1)
(α : Type u)
[PseudoEMetricSpace α]
[Unique ι]
[Fintype ι]
(x : α)
(i : ι)

(IsometryEquiv.funUnique ι α).invFun x i = x


@[to_additive (attr := simp)]
theorem prod_erase_eq_div {a : α} (h : a ∈ s) :
    ∏ x ∈ s.erase a, f x = (∏ x ∈ s, f x) / f a

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommGroup β]
[DecidableEq α]
{a : α}
(h : a ∈ s)

∑ x ∈ s.erase a, f x = ∑ x ∈ s, f x - f a


@[simp]
theorem nnnorm_star (x : E) : ‖star x‖₊ = ‖x‖₊

{E : Type u_2}
[SeminormedAddCommGroup E]
[StarAddMonoid E]
[NormedStarGroup E]
(x : E)

‖x⋆‖₊ = ‖x‖₊


theorem cos_pos_of_mem_Ioo {x : ℝ} (hx : x ∈ Ioo (-(π / 2)) (π / 2)) : 0 < cos x

(hx : x ∈ Set.Ioo (-(Real.pi / 2)) (Real.pi / 2))


theorem groupoid_of_pregroupoid_le (PG₁ PG₂ : Pregroupoid H)
    (h : ∀ f s, PG₁.property f s → PG₂.property f s) : PG₁.groupoid ≤ PG₂.groupoid

(h : ∀ (f : H → H) (s : Set H), PG₁.property f s → PG₂.property f s)


@[simp]
theorem continuum_mul_nat {n : ℕ} (hn : n ≠ 0) : 𝔠 * n = 𝔠

Cardinal.continuum * ↑n = Cardinal.continuum


theorem sup_lt_ord_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c) :
    (∀ i, f i < c.ord) → Ordinal.sup f < c.ord

{ι : Type (max u_2 u_3)}
{f : ι → Ordinal.{max u_2 u_3}}
{c : Cardinal.{max u_2 u_3}}
(hc : c.IsRegular)
(hι : #ι < c)

(∀ (i : ι), f i < c.ord) → Ordinal.sup f < c.ord


@[simp]
theorem vcomp_eq_comp (α : F ⟶ G) (β : G ⟶ H) : vcomp α β = α ≫ β

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

CategoryTheory.NatTrans.vcomp α β = CategoryTheory.CategoryStruct.comp α β


/-- The identity lax functor. -/
@[simps]
def id (B : Type u₁) [Bicategory.{w₁, v₁} B] : LaxFunctor B B

(B : Type u₁)
[CategoryTheory.Bicategory B]

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c),
  (CategoryTheory.LaxFunctor.id B).mapComp f g =
    CategoryTheory.CategoryStruct.id (CategoryTheory.CategoryStruct.comp f g)


theorem primeFactorsList_prime {p : ℕ} (hp : Nat.Prime p) : p.primeFactorsList = [p]


theorem DifferentiableAt.sqrt (hf : DifferentiableAt ℝ f x) (hx : f x ≠ 0) :
    DifferentiableAt ℝ (fun y => √(f y)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hf : DifferentiableAt ℝ f x)
(hx : f x ≠ 0)


@[simp]
theorem pullbackZeroZeroIso_hom_snd (X Y : C) [HasBinaryProduct X Y] :
    (pullbackZeroZeroIso X Y).hom ≫ prod.snd = pullback.snd 0 0

(CategoryTheory.Limits.pullbackZeroZeroIso X Y).hom ≫ CategoryTheory.Limits.prod.snd =
  CategoryTheory.Limits.pullback.snd 0 0


theorem valuation_def (x : K) :
    v.valuation x =
      v.intValuation.extendToLocalization
        (fun r hr => Set.mem_compl (v.intValuation_ne_zero' ⟨r, hr⟩)) K x

(v : IsDedekindDomain.HeightOneSpectrum R)

v.valuation x = (v.intValuation.extendToLocalization ⋯ K) x


theorem Function.LeftInverse.cast_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    cast (congr_arg (fun a ↦ γ (f a)) (h a)) (C (g (f a))) = C a

{α : Sort u_1}
{β : Sort u_2}
{γ : β → Sort v}
{f : α → β}
{g : β → α}
(h : Function.LeftInverse g f)
(C : (a : α) → γ (f a))
(a : α)


@[simp]
theorem zero_eq_lift_iff {a : Cardinal.{u}} :
    (0 : Cardinal) = lift.{v} a ↔ 0 = a


@[simp]
theorem unsym_smul {R : Type*} [SMul R α] (c : R) (a : αˢʸᵐ) : unsym (c • a) = c • unsym a

{α : Type u_1}
{R : Type u_2}
[SMul R α]
(c : R)
(a : αˢʸᵐ)

SymAlg.unsym (c • a) = c • SymAlg.unsym a


lemma ext_from_iff (i j : ℤ) (hij : j + 1 = i) {A : C} (f g : (mappingCone φ).X j ⟶ A) :
    f = g ↔ (inl φ).v i j (by omega) ≫ f = (inl φ).v i j (by omega) ≫ g ∧
      (inr φ).f j ≫ f = (inr φ).f j ≫ g

(f g : (CochainComplex.mappingCone φ).X j ⟶ A)

f = g ↔
  (CochainComplex.mappingCone.inl φ).v i j ⋯ ≫ f = (CochainComplex.mappingCone.inl φ).v i j ⋯ ≫ g ∧
    (CochainComplex.mappingCone.inr φ).f j ≫ f = (CochainComplex.mappingCone.inr φ).f j ≫ g


/-- Equivalence between `Fin n → Fin m` and `Fin (m ^ n)`. -/
@[simps!]
def finFunctionFinEquiv {m n : ℕ} : (Fin n → Fin m) ≃ Fin (m ^ n)

↑(finFunctionFinEquiv f) = ∑ i : Fin n, ↑(f i) * m ^ ↑i


@[aesop safe apply]
theorem zpow {x : R} (hx : IsSelfAdjoint x) (n : ℤ) : IsSelfAdjoint (x ^ n)

{R : Type u_1}
[DivisionSemiring R]
[StarRing R]
{x : R}
(hx : IsSelfAdjoint x)
(n : ℤ)


theorem volume_pi_le_diam_pow (s : Set (ι → ℝ)) : volume s ≤ EMetric.diam s ^ Fintype.card ι

{ι : Type u_1}
[Fintype ι]
(s : Set (ι → ℝ))

MeasureTheory.volume s ≤ EMetric.diam s ^ Fintype.card ι


@[simp, norm_cast]
lemma coe_sdiff (s : UpperSet α) (t : Set α) : s.sdiff t = (s : Set α) \ lowerClosure t

{α : Type u_1}
[Preorder α]
(s : UpperSet α)
(t : Set α)


theorem condexp_zero_or_one_of_measurableSet_limsup_atTop [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ] (h_le : ∀ n, s n ≤ m0)
    (h_indep : iCondIndep m hm s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1

(h_indep : ProbabilityTheory.iCondIndep m hm s μ)

∀ᵐ (ω : Ω) ∂μ, (μ[t.indicator fun ω => 1|m]) ω = 0 ∨ (μ[t.indicator fun ω => 1|m]) ω = 1


@[simp]
theorem Icc_eq_empty_of_lt (h : b < a) : Icc a b = ∅

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


/--
In a monoidal category, we can take the tensor product of objects, `X ⊗ Y` and of morphisms `f ⊗ g`.
Tensor product does not need to be strictly associative on objects, but there is a
specified associator, `α_ X Y Z : (X ⊗ Y) ⊗ Z ≅ X ⊗ (Y ⊗ Z)`. There is a tensor unit `𝟙_ C`,
with specified left and right unitor isomorphisms `λ_ X : 𝟙_ C ⊗ X ≅ X` and `ρ_ X : X ⊗ 𝟙_ C ≅ X`.
These associators and unitors satisfy the pentagon and triangle equations.

See <https://stacks.math.columbia.edu/tag/0FFK>.
-/
-- Porting note: The Mathport did not translate the temporary notation
class MonoidalCategory (C : Type u) [𝒞 : Category.{v} C] extends MonoidalCategoryStruct C where
  tensorHom_def {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
    f ⊗ g = (f ▷ X₂) ≫ (Y₁ ◁ g) := by
      aesop_cat
  /-- Tensor product of identity maps is the identity: `(𝟙 X₁ ⊗ 𝟙 X₂) = 𝟙 (X₁ ⊗ X₂)` -/
  tensor_id : ∀ X₁ X₂ : C, 𝟙 X₁ ⊗ 𝟙 X₂ = 𝟙 (X₁ ⊗ X₂) := by aesop_cat
  /--
  Composition of tensor products is tensor product of compositions:
  `(f₁ ⊗ g₁) ∘ (f₂ ⊗ g₂) = (f₁ ∘ f₂) ⊗ (g₁ ⊗ g₂)`
  -/
  tensor_comp :
    ∀ {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂),
      (f₁ ≫ g₁) ⊗ (f₂ ≫ g₂) = (f₁ ⊗ f₂) ≫ (g₁ ⊗ g₂) := by
    aesop_cat
  whiskerLeft_id : ∀ (X Y : C), X ◁ 𝟙 Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  id_whiskerRight : ∀ (X Y : C), 𝟙 X ▷ Y = 𝟙 (X ⊗ Y) := by
    aesop_cat
  /-- Naturality of the associator isomorphism: `(f₁ ⊗ f₂) ⊗ f₃ ≃ f₁ ⊗ (f₂ ⊗ f₃)` -/
  associator_naturality :
    ∀ {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃),
      ((f₁ ⊗ f₂) ⊗ f₃) ≫ (α_ Y₁ Y₂ Y₃).hom = (α_ X₁ X₂ X₃).hom ≫ (f₁ ⊗ (f₂ ⊗ f₃)) := by
    aesop_cat
  /--
  Naturality of the left unitor, commutativity of `𝟙_ C ⊗ X ⟶ 𝟙_ C ⊗ Y ⟶ Y` and `𝟙_ C ⊗ X ⟶ X ⟶ Y`
  -/
  leftUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), 𝟙_ _ ◁ f ≫ (λ_ Y).hom = (λ_ X).hom ≫ f := by
    aesop_cat
  /--
  Naturality of the right unitor: commutativity of `X ⊗ 𝟙_ C ⟶ Y ⊗ 𝟙_ C ⟶ Y` and `X ⊗ 𝟙_ C ⟶ X ⟶ Y`
  -/
  rightUnitor_naturality :
    ∀ {X Y : C} (f : X ⟶ Y), f ▷ 𝟙_ _ ≫ (ρ_ Y).hom = (ρ_ X).hom ≫ f := by
    aesop_cat
  /--
  The pentagon identity relating the isomorphism between `X ⊗ (Y ⊗ (Z ⊗ W))` and `((X ⊗ Y) ⊗ Z) ⊗ W`
  -/
  pentagon :
    ∀ W X Y Z : C,
      (α_ W X Y).hom ▷ Z ≫ (α_ W (X ⊗ Y) Z).hom ≫ W ◁ (α_ X Y Z).hom =
        (α_ (W ⊗ X) Y Z).hom ≫ (α_ W X (Y ⊗ Z)).hom := by
    aesop_cat
  /--
  The identity relating the isomorphisms between `X ⊗ (𝟙_ C ⊗ Y)`, `(X ⊗ 𝟙_ C) ⊗ Y` and `X ⊗ Y`
  -/
  triangle :
    ∀ X Y : C, (α_ X (𝟙_ _) Y).hom ≫ X ◁ (λ_ Y).hom = (ρ_ X).hom ▷ Y := by
    aesop_cat

[self : CategoryTheory.MonoidalCategory C]

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X (𝟙_ C) Y).hom
    (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.leftUnitor Y).hom) =
  CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.rightUnitor X).hom Y


lemma charP_of_prime_pow_injective (R) [Ring R] [Fintype R] (p n : ℕ) [hp : Fact p.Prime]
    (hn : card R = p ^ n) (hR : ∀ i ≤ n, (p : R) ^ i = 0 → i = n) : CharP R (p ^ n)

(R : Type u_6)
[Ring R]
[Fintype R]
(p n : ℕ)
[hp : Fact (Nat.Prime p)]
(hn : Fintype.card R = p ^ n)
(hR : ∀ i ≤ n, ↑p ^ i = 0 → i = n)


protected theorem isSymm (f : r ↪r s) [IsSymm β s] : IsSymm α r

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
[IsSymm β s]


theorem sub_iSup {ι : Sort*} [Nonempty ι] {b : ι → ℝ≥0∞} (hr : a < ∞) :
    (a - ⨆ i, b i) = ⨅ i, a - b i

{a : ℝ≥0∞}
{ι : Sort u_4}
[Nonempty ι]
{b : ι → ℝ≥0∞}
(hr : a < ⊤)


/-- Change of variables for continuous integrands. If `f` is continuous on `[a, b]` and has
continuous right-derivative `f'` in `(a, b)`, and `g` is continuous on `f '' [a, b]` then we can
substitute `u = f x` to get `∫ x in a..b, f' x • (g ∘ f) x = ∫ u in f a..f b, g u`.
-/
theorem integral_comp_smul_deriv'' {f f' : ℝ → ℝ} {g : ℝ → G} (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Ioi x) x)
    (hf' : ContinuousOn f' [[a, b]]) (hg : ContinuousOn g (f '' [[a, b]])) :
    (∫ x in a..b, f' x • (g ∘ f) x) = ∫ u in f a..f b, g u

(hff' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Set.Ioi x) x)

∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (u : ℝ) in f a..f b, g u


theorem distrib_lattice_lemma [FaithfulSMul M X] {P Q R : { P : M // IsLprojection X P }} :
    ((↑P : M) + ↑Pᶜ * R) * (↑P + ↑Q * ↑R * ↑Pᶜ) = ↑P + ↑Q * ↑R * ↑Pᶜ

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
[FaithfulSMul M X]
{P Q R : { P // IsLprojection X P }}

(↑P + ↑Pᶜ * ↑R) * (↑P + ↑Q * ↑R * ↑Pᶜ) = ↑P + ↑Q * ↑R * ↑Pᶜ


theorem ofFractionRing_div (p q : FractionRing K[X]) :
    ofFractionRing (p / q) = ofFractionRing p / ofFractionRing q

{K : Type u}
[CommRing K]
[IsDomain K]
(p q : FractionRing K[X])

{ toFractionRing := p / q } = { toFractionRing := p } / { toFractionRing := q }


/-- The n-ary version of `Set.mem_mul`. -/
@[to_additive " The n-ary version of `Set.mem_add`. "]
theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
    (a ∈ ∏ i ∈ t, f i) ↔ ∃ (g : ι → α) (_ : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i ∈ t, g i = a

{ι : Type u_1}
{α : Type u_2}
[CommMonoid α]
(t : Finset ι)
(f : ι → Set α)
(a : α)

a ∈ ∏ i ∈ t, f i ↔ ∃ g, ∃ (_ : ∀ {i : ι}, i ∈ t → g i ∈ f i), ∏ i ∈ t, g i = a


theorem comp_assoc (φ₁ : C →ₐ[R] D) (φ₂ : B →ₐ[R] C) (φ₃ : A →ₐ[R] B) :
    (φ₁.comp φ₂).comp φ₃ = φ₁.comp (φ₂.comp φ₃)

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type u₁}
{D : Type v₁}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Semiring C]
[Semiring D]
[Algebra R A]
[Algebra R B]
[Algebra R C]
[Algebra R D]
(φ₁ : C →ₐ[R] D)
(φ₂ : B →ₐ[R] C)
(φ₃ : A →ₐ[R] B)


protected lemma mono_ac (h : ν ≪ μ) (hμ : AEStronglyMeasurable f μ) : AEStronglyMeasurable f ν

(hμ : MeasureTheory.AEStronglyMeasurable f μ)


theorem uniformContinuous_extension : UniformContinuous (Completion.extension f)

{α : Type u_1}
[UniformSpace α]
{β : Type u_2}
[UniformSpace β]
{f : α → β}
[CompleteSpace β]


/-- Turn a subgraph of a `SimpleGraph` into a member of its subgraph type. -/
@[simps]
def _root_.SimpleGraph.toSubgraph (H : SimpleGraph V) (h : H ≤ G) : G.Subgraph

{V : Type u}
{G : SimpleGraph V}
(H : SimpleGraph V)
(h : H ≤ G)

∀ (a a_1 : V), (SimpleGraph.toSubgraph H h).Adj a a_1 = H.Adj a a_1


/-- The functor `(S, F ⋙ G) ⥤ (S, G)`. -/
@[simps!]
def pre (S : D) (F : B ⥤ C) (G : C ⥤ D) : StructuredArrow S (F ⋙ G) ⥤ StructuredArrow S G

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

∀ {X Y : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit S) (F.comp G)} (f : X ⟶ Y),
  ((CategoryTheory.StructuredArrow.pre S F G).map f).left = CategoryTheory.CategoryStruct.id X.left


@[simp]
theorem sInter_insert (s : Set α) (T : Set (Set α)) : ⋂₀ insert s T = s ∩ ⋂₀ T

{α : Type u_1}
(s : Set α)
(T : Set (Set α))


@[norm_cast]
theorem coe_iSup {ι} (f : ι → OuterMeasure α) : ⇑(⨆ i, f i) = ⨆ i, ⇑(f i)

{α : Type u_1}
{ι : Sort u_3}
(f : ι → MeasureTheory.OuterMeasure α)


theorem map_extChartAt_nhdsWithin' {x y : M} (hy : y ∈ (extChartAt I x).source) :
    map (extChartAt I x) (𝓝[s] y) = 𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] extChartAt I x y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
[ChartedSpace H M]
{x y : M}
(hy : y ∈ (extChartAt I x).source)

Filter.map (↑(extChartAt I x)) (𝓝[s] y) = 𝓝[↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I] ↑(extChartAt I x) y


@[simp]
theorem toAffineIsometryEquiv_linearIsometryEquiv :
    e.toAffineIsometryEquiv.linearIsometryEquiv = e

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
(e : V ≃ₗᵢ[𝕜] V₂)


/-- If `ringChar F` is odd, then `quadraticChar F a` can be computed in
terms of `a ^ (Fintype.card F / 2)`. -/
theorem quadraticChar_eq_pow_of_char_ne_two (hF : ringChar F ≠ 2) {a : F} (ha : a ≠ 0) :
    quadraticChar F a = if a ^ (Fintype.card F / 2) = 1 then 1 else -1

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
(hF : ringChar F ≠ 2)
{a : F}
(ha : a ≠ 0)

(quadraticChar F) a = if a ^ (Fintype.card F / 2) = 1 then 1 else -1


theorem isGreatest_gfp : IsGreatest (fixedPoints f) (gfp f)

{α : Type u}
[CompleteLattice α]
(f : α →o α)

IsGreatest (Function.fixedPoints ⇑f) (OrderHom.gfp f)


theorem isLUB_preimage' {s : Set β} {x : β} : IsLUB (f ⁻¹' s) (f.symm x) ↔ IsLUB s x

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
{s : Set β}
{x : β}


@[measurability]
theorem measurable_quotient_mk' [s : Setoid α] : Measurable (Quotient.mk' : α → Quotient s)

{α : Type u_1}
[MeasurableSpace α]
[s : Setoid α]


/-- Transfer `IsAdjoinRoot` across an algebra isomorphism.

This is the converse of `IsAdjoinRoot.aequiv`: this turns an `AlgEquiv` into an `IsAdjoinRoot`,
and `IsAdjoinRoot.aequiv` turns an `IsAdjoinRoot` into an `AlgEquiv`.
-/
@[simps! map_apply]
def ofEquiv (h : IsAdjoinRoot S f) (e : S ≃ₐ[R] T) : IsAdjoinRoot T f

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
(h : IsAdjoinRoot S f)
(e : S ≃ₐ[R] T)

∀ (a : R[X]), (h.ofEquiv e).map a = e (h.map a)


/-- If `e : S₁ ≅ S₂` is an isomorphism of short complexes and `h₁ : HomologyData S₁`,
this is the homology data for `S₂` deduced from the isomorphism. -/
@[simps!]
noncomputable def ofIso (e : S₁ ≅ S₂) (h : HomologyData S₁)

(CategoryTheory.ShortComplex.HomologyData.ofIso e h).left.H = h.left.H


theorem le_of_mul_le_mul_left (a b c : Associates α) (ha : a ≠ 0) : a * b ≤ a * c → b ≤ c

{α : Type u_1}
[CancelCommMonoidWithZero α]
(a b c : Associates α)
(ha : a ≠ 0)


@[to_additive]
theorem preimage_mul_right_one' : preimage 1 (· * b⁻¹) (mul_left_injective _).injOn = {b}

Finset.preimage 1 (fun x => x * b⁻¹) ⋯ = {b}


@[simp]
theorem tan_zero : tan (0 : Angle) = 0


/-- The variance of the sum of two independent random variables is the sum of the variances. -/
theorem IndepFun.variance_add [@IsProbabilityMeasure Ω _ ℙ] {X Y : Ω → ℝ} (hX : Memℒp X 2)
    (hY : Memℒp Y 2) (h : @IndepFun _ _ _ (_) _ _ X Y ℙ) : Var[X + Y] = Var[X] + Var[Y]

{Ω : Type u_1}
[MeasureTheory.MeasureSpace Ω]
[MeasureTheory.IsProbabilityMeasure ℙ]
{X Y : Ω → ℝ}
(hX : MeasureTheory.Memℒp X 2 ℙ)
(hY : MeasureTheory.Memℒp Y 2 ℙ)
(h : ProbabilityTheory.IndepFun X Y ℙ)

ProbabilityTheory.variance (X + Y) ℙ = ProbabilityTheory.variance X ℙ + ProbabilityTheory.variance Y ℙ


@[to_additive (attr := simp)]
theorem coe_map (f : M →ₙ* N) (S : Subsemigroup M) : (S.map f : Set N) = f '' S

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M →ₙ* N)
(S : Subsemigroup M)


@[to_additive] -- Porting note: was `@[simp]`
theorem integral_div_right_eq_self [IsMulRightInvariant μ] (f : G → E) (g : G) :
    (∫ x, f (x / g) ∂μ) = ∫ x, f x ∂μ

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
[μ.IsAddRightInvariant]
(f : G → E)
(g : G)

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


@[to_additive]
protected theorem setIntegral_eq (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → E} (hf : ∀ (g : G) (x), f (g • x) = f x) : ∫ x in s, f x ∂μ = ∫ x in t, f x ∂μ

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.IsFundamentalDomain G t μ)

(hf : ∀ (g : G) (x : α), f (g • x) = f x)

∫ (x : α) in s, f x ∂μ = ∫ (x : α) in t, f x ∂μ


theorem HasDerivAtFilter.sub (hf : HasDerivAtFilter f f' x L) (hg : HasDerivAtFilter g g' x L) :
    HasDerivAtFilter (fun x => f x - g x) (f' - g') x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : 𝕜 → F}
{f' g' : F}
{x : 𝕜}
{L : Filter 𝕜}
(hf : HasDerivAtFilter f f' x L)
(hg : HasDerivAtFilter g g' x L)


theorem toPartitionOfUnity_zero_of_zero {i : ι} {x : X} (h : f i x = 0) :
    f.toPartitionOfUnity i x = 0

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(f : BumpCovering ι X s)
{i : ι}
{x : X}
(h : (f i) x = 0)


/-- Extensionality rule for congruence relations. -/
theorem ext {c d : RingCon R} (H : ∀ x y, c x y ↔ d x y) : c = d

{R : Type u_2}
[Add R]
[Mul R]
{c d : RingCon R}
(H : ∀ (x y : R), c x y ↔ d x y)


@[simp]
theorem toMatrix_refl [DecidableEq n] [Zero α] [One α] :
    ((PEquiv.refl n).toMatrix : Matrix n n α) = 1

{n : Type u_4}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]


@[simp] lemma sq_sqrt (x : ℝ≥0) : sqrt x ^ 2 = x


theorem get_rotate (l : List α) (n : ℕ) (k : Fin (l.rotate n).length) :
    (l.rotate n).get k =
      l.get ⟨(k + n) % l.length, mod_lt _ (length_rotate l n ▸ k.1.zero_le.trans_lt k.2)⟩

{α : Type u}
(l : List α)
(n : ℕ)
(k : Fin (l.rotate n).length)

(l.rotate n).get k = l.get ⟨(↑k + n) % l.length, ⋯⟩


lemma eval_polynomialX (P : Fin 3 → R) : eval P W'.polynomialX =
    W'.a₁ * P y * P z - (3 * P x ^ 2 + 2 * W'.a₂ * P x * P z ^ 2 + W'.a₄ * P z ^ 4)

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

(MvPolynomial.eval P) W'.polynomialX = W'.a₁ * P y * P z - (3 * P x ^ 2 + 2 * W'.a₂ * P x * P z ^ 2 + W'.a₄ * P z ^ 4)


@[to_additive]
theorem const_le_one_of_le_one (ha : a ≤ 1) : const β a ≤ 1

{α : Type u_3}
(β : Type u_4)
[Zero α]
[Preorder α]
{a : α}
(ha : a ≤ 0)


@[to_additive (attr := simp)]
theorem map_id : map (MulHom.id α) = MonoidHom.id (WithOne α)

WithZero.map (AddHom.id α) = AddMonoidHom.id (WithZero α)


@[simp] theorem unbot'_eq_self_iff {d : α} {x : WithBot α} : unbot' d x = d ↔ x = d ∨ x = ⊥


theorem coeFn_sum {ι : Type*} (f : ι → lp E p) (s : Finset ι) :
    ⇑(∑ i ∈ s, f i) = ∑ i ∈ s, ⇑(f i)

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{ι : Type u_3}
(f : ι → ↥(lp E p))
(s : Finset ι)


theorem natDegree_basisDivisor_self : (basisDivisor x x).natDegree = 0

(Lagrange.basisDivisor x x).natDegree = 0


theorem coe_max' {s : Finset α} (hs : s.Nonempty) : ↑(s.max' hs) = s.max

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


theorem integrableOn_Ioi_iff_integrableAtFilter_atTop_nhdsWithin
    [LinearOrder X] [CompactIccSpace X] [NoMaxOrder X] [OrderTopology X] :
    IntegrableOn f (Ioi a) μ ↔ IntegrableAtFilter f atTop μ ∧
    IntegrableAtFilter f (𝓝[>] a) μ ∧ LocallyIntegrableOn f (Ioi a) μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{f : X → E}
{μ : MeasureTheory.Measure X}
{a : X}
[LinearOrder X]
[CompactIccSpace X]
[NoMaxOrder X]
[OrderTopology X]

MeasureTheory.IntegrableOn f (Set.Ioi a) μ ↔
  MeasureTheory.IntegrableAtFilter f Filter.atTop μ ∧
    MeasureTheory.IntegrableAtFilter f (𝓝[>] a) μ ∧ MeasureTheory.LocallyIntegrableOn f (Set.Ioi a) μ


@[simp]
theorem invFun_eq_symm {e : A ≃⋆ₐ[R] B} : EquivLike.inv e = e.symm

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
{e : A ≃⋆ₐ[R] B}


lemma prod_const (μ : Measure β) [SFinite μ] (ν : Measure γ) [SFinite ν] :
    const α μ ×ₖ const α ν = const α (μ.prod ν)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
(μ : MeasureTheory.Measure β)
[MeasureTheory.SFinite μ]
(ν : MeasureTheory.Measure γ)
[MeasureTheory.SFinite ν]

(ProbabilityTheory.Kernel.const α μ).prod (ProbabilityTheory.Kernel.const α ν) =
  ProbabilityTheory.Kernel.const α (μ.prod ν)


@[to_additive neg_lt]
theorem inv_lt' : a⁻¹ < b ↔ b⁻¹ < a

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

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


@[simp] theorem inv_apply : ⇑A⁻¹ = (star A : Matrix n n α)

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
(A : ↥(Matrix.unitaryGroup n α))


@[simp, norm_cast]
theorem ofReal_zero : ((0 : ℝ) : ℂ) = 0


theorem aestronglyMeasurable'_integral_condexpKernel [NormedSpace ℝ F]
    (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable' m (fun ω => ∫ y, f y ∂condexpKernel μ m ω) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable' m (fun ω => ∫ (y : Ω), f y ∂(ProbabilityTheory.condexpKernel μ m) ω) μ


/-- If `i : K →+* L` is `p`-radical, then for any reduced ring `M` of exponential charactistic `p`,
the map `(L →+* M) → (K →+* M)` induced by `i` is injective.
A special case of `IsPRadical.injective_comp_of_pNilradical_eq_bot`
and a generalization of `IsPurelyInseparable.injective_comp_algebraMap`. -/
theorem injective_comp [IsPRadical i p] [IsReduced M] :
    Function.Injective fun f : L →+* M ↦ f.comp i

{K : Type u_1}
{L : Type u_2}
(M : Type u_3)
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(p : ℕ)
[ExpChar M p]
[IsPRadical i p]
[IsReduced M]


theorem condexpInd_disjoint_union_apply (hs : MeasurableSet s) (ht : MeasurableSet t)
    (hμs : μ s ≠ ∞) (hμt : μ t ≠ ∞) (hst : s ∩ t = ∅) (x : G) :
    condexpInd G hm μ (s ∪ t) x = condexpInd G hm μ s x + condexpInd G hm μ t x

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(ht : MeasurableSet t)
(hμs : μ s ≠ ⊤)
(hμt : μ t ≠ ⊤)
(hst : s ∩ t = ∅)
(x : G)

(MeasureTheory.condexpInd G hm μ (s ∪ t)) x =
  (MeasureTheory.condexpInd G hm μ s) x + (MeasureTheory.condexpInd G hm μ t) x


theorem eq_cons_of_mem_head? {x : α} : ∀ {l : List α}, x ∈ l.head? → l = x :: tail l


@[reassoc]
theorem hexagon_reverse_inv (X Y Z : C) :
    (α_ Z X Y).hom ≫ (β_ (X ⊗ Y) Z).inv ≫ (α_ X Y Z).hom =
      (β_ X Z).inv ▷ Y ≫ (α_ X Z Y).hom ≫ X ◁ (β_ Y Z).inv

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


@[simp]
theorem sUnion_empty : ⋃₀∅ = (∅ : Set α)


@[simp, norm_cast]
theorem coe_min (x y : ℝ) : ((min x y : ℝ) : ℝ*) = min ↑x ↑y


theorem sSup_range : sSup (range f) = iSup f

{α : Type u_1}
{ι : Sort u_5}
[SupSet α]
{f : ι → α}


@[simp]
theorem Icc_union_Ici_eq_Ici (h : a ≤ b) : Icc a b ∪ Ici b = Ici a

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


/-- If there is a multiplicative character of order `n` on `F`, then `#F ≡ 1 mod n`. -/
lemma orderOf_dvd_card_sub_one (χ : MulChar F R) : orderOf χ ∣ Fintype.card F - 1

(F : Type u_1)
[Field F]
[Fintype F]
{R : Type u_2}
[CommRing R]
(χ : MulChar F R)


@[simp] theorem testBit_shiftLeft (x : Nat) : testBit (x <<< i) j =
    (decide (j ≥ i) && testBit x (j-i))

(x <<< i).testBit j = (decide (j ≥ i) && x.testBit (j - i))


theorem HasStrictDerivAt.arsinh (hf : HasStrictDerivAt f f' a) :
    HasStrictDerivAt (fun x => arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a

{f : ℝ → ℝ}
{a f' : ℝ}
(hf : HasStrictDerivAt f f' a)

HasStrictDerivAt (fun x => Real.arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a


@[to_additive (attr := simp, norm_cast)]
theorem coe_lt_coe : (p : E → ℝ) < q ↔ p < q

{E : Type u_4}
[Group E]
{p q : GroupNorm E}


theorem eq_fst (F : HomotopyRel f₀ f₁ S) (t : I) {x : X} (hx : x ∈ S) : F (t, x) = f₀ x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{S : Set X}
(F : f₀.HomotopyRel f₁ S)
(t : ↑I)
{x : X}
(hx : x ∈ S)


@[to_additive]
theorem div_eq_iff_eq_mul' : a / b = c ↔ a = b * c

{G : Type u_3}
[CommGroup G]
{a b c : G}


@[to_additive]
theorem finprod_curry (f : α × β → M) (hf : (mulSupport f).Finite) :
    ∏ᶠ ab, f ab = ∏ᶠ (a) (b), f (a, b)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
(f : α × β → M)
(hf : (Function.mulSupport f).Finite)

∏ᶠ (ab : α × β), f ab = ∏ᶠ (a : α) (b : β), f (a, b)


protected theorem isCompact_Icc (I : Box ι) : IsCompact (Box.Icc I)


@[simp]
theorem affineCombinationLineMapWeights_apply_left [DecidableEq ι] {i j : ι} (h : i ≠ j) (c : k) :
    affineCombinationLineMapWeights i j c i = 1 - c

{k : Type u_1}
[Ring k]
{ι : Type u_4}
[DecidableEq ι]
{i j : ι}
(h : i ≠ j)
(c : k)

Finset.affineCombinationLineMapWeights i j c i = 1 - c


theorem mem_iff_annIdealGenerator_dvd {p : 𝕜[X]} {a : A} :
    p ∈ annIdeal 𝕜 a ↔ annIdealGenerator 𝕜 a ∣ p

{𝕜 : Type u_1}
{A : Type u_2}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
{p : 𝕜[X]}
{a : A}

p ∈ Polynomial.annIdeal 𝕜 a ↔ Polynomial.annIdealGenerator 𝕜 a ∣ p


lemma withDensity_rnDeriv_eq_zero_iff_apply_eq_zero (κ η : Kernel α γ) [IsFiniteKernel κ]
    [IsFiniteKernel η] (a : α) :
    withDensity η (rnDeriv κ η) a = 0
      ↔ withDensity η (rnDeriv κ η) a (mutuallySingularSetSlice κ η a)ᶜ = 0

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

(η.withDensity (κ.rnDeriv η)) a = 0 ↔ ((η.withDensity (κ.rnDeriv η)) a) (κ.mutuallySingularSetSlice η a)ᶜ = 0


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

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

Finset.affineCombinationLineMapWeights i j c t = 0


theorem le_of_le_of_eq {f g h : CauSeq α abs} (hfg : f ≤ g) (hgh : g ≈ h) : f ≤ h

{α : Type u_1}
[LinearOrderedField α]
{f g h : CauSeq α abs}
(hfg : f ≤ g)
(hgh : g ≈ h)


lemma strongConcaveOn_iff_convex :
    StrongConcaveOn s m f ↔ ConcaveOn ℝ s fun x ↦ f x + m / (2 : ℝ) * ‖x‖ ^ 2

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{s : Set E}
{m : ℝ}
{f : E → ℝ}

StrongConcaveOn s m f ↔ ConcaveOn ℝ s fun x => f x + m / 2 * ‖x‖ ^ 2


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

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


/-- `functoriality F _ ⋙ precompose (whiskerLeft F _)` simplifies to `functoriality F _`. -/
@[simps!]
def functorialityCompPrecompose {H H' : C ⥤ D} (α : H ≅ H') :
    Cocones.functoriality F H ⋙ Cocones.precompose (whiskerLeft F α.inv) ≅
      Cocones.functoriality F H'

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

((CategoryTheory.Functor.functorialityCompPrecompose α).hom.app X).hom = α.hom.app X.pt


theorem inf_arrow_factors_left {B : C} (X Y : Subobject B) : X.Factors (X ⊓ Y).arrow

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{B : C}
(X Y : CategoryTheory.Subobject B)


/-- The ring `HahnSeries ℕ R` is isomorphic to `PowerSeries R`. -/
@[simps]
def toPowerSeries : HahnSeries ℕ R ≃+* PowerSeries R

{R : Type u_2}
[Semiring R]
(f : HahnSeries ℕ R)

HahnSeries.toPowerSeries f = PowerSeries.mk f.coeff


/-- This lemmas characterizes when a subset `s` of a densely ordered conditionally complete linear
order is totally disconnected with respect to the order topology: between any two distinct points
of `s` must lie a point not in `s`. -/
lemma isTotallyDisconnected_iff_lt {s : Set α} :
    IsTotallyDisconnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x < y → ∃ z ∉ s, z ∈ Ioo x y

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{s : Set α}

IsTotallyDisconnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x < y → ∃ z ∉ s, z ∈ Set.Ioo x y


@[simp]
theorem bind_dom {f : Part α} {g : α → Part β} : (f.bind g).Dom ↔ ∃ h : f.Dom, (g (f.get h)).Dom

{α : Type u_1}
{β : Type u_2}
{f : Part α}
{g : α → Part β}

(f.bind g).Dom ↔ ∃ (h : f.Dom), (g (f.get h)).Dom


theorem algebraicIndependent_sUnion_of_directed {s : Set (Set A)} (hsn : s.Nonempty)
    (hs : DirectedOn (· ⊆ ·) s) (h : ∀ a ∈ s, AlgebraicIndependent R ((↑) : a → A)) :
    AlgebraicIndependent R ((↑) : ⋃₀ s → A)

(hs : DirectedOn (fun x x_1 => x ⊆ x_1) s)

(h : ∀ a ∈ s, AlgebraicIndependent R Subtype.val)


@[simp]
theorem log_div_base (b n : ℕ) : log b (n / b) = log b n - 1


lemma degreeOf_le_totalDegree (f : MvPolynomial σ R) (i : σ) : f.degreeOf i ≤ f.totalDegree

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(f : MvPolynomial σ R)
(i : σ)

MvPolynomial.degreeOf i f ≤ f.totalDegree


/--
Equivalent preregular categories give equivalent regular toposes.
-/
@[simps!]
def sheafCongrPreregular : haveI := e.preregular
    Sheaf (regularTopology C) A ≌ Sheaf (regularTopology D) A

(F : CategoryTheory.Sheaf (CategoryTheory.regularTopology C) A)

((e.sheafCongrPreregular A).functor.obj F).val.obj X = F.val.obj (Opposite.op (e.inverse.obj (Opposite.unop X)))


lemma eq_zero_iff_eq_zero_of_mem_box  {x : α} (hx : x ∈ box n) : x = 0 ↔ n = 0

{α : Type u_1}
[OrderedRing α]
[LocallyFiniteOrder α]
[DecidableEq α]
{n : ℕ}
{x : α}
(hx : x ∈ Finset.box n)


theorem toReal_laverage {f : α → ℝ≥0∞} (hf : AEMeasurable f μ) (hf' : ∀ᵐ x ∂μ, f x ≠ ∞) :
    (⨍⁻ x, f x ∂μ).toReal = ⨍ x, (f x).toReal ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)
(hf' : ∀ᵐ (x : α) ∂μ, f x ≠ ⊤)

(⨍⁻ (x : α), f x ∂μ).toReal = ⨍ (x : α), (f x).toReal ∂μ


@[simp]
theorem IsMax.not_infPrime (ha : IsMax a) : ¬InfPrime a

{α : Type u_2}
[SemilatticeInf α]
{a : α}
(ha : IsMax a)


theorem nhds_basis_ball_inv_nat_succ :
    (𝓝 x).HasBasis (fun _ => True) fun n : ℕ => ball x (1 / (↑n + 1))

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

(𝓝 x).HasBasis (fun x => True) fun n => Metric.ball x (1 / (↑n + 1))


theorem val_zsmul (n : ℤ) (y : HomogeneousLocalization 𝒜 x) : (n • y).val = n • y.val

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
(x : Submonoid A)
(n : ℤ)
(y : HomogeneousLocalization 𝒜 x)


/-- Hausdorff measure `μH[d] s` is monotone in `d`. -/
theorem hausdorffMeasure_mono {d₁ d₂ : ℝ} (h : d₁ ≤ d₂) (s : Set X) : μH[d₂] s ≤ μH[d₁] s

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{d₁ d₂ : ℝ}
(h : d₁ ≤ d₂)
(s : Set X)


protected theorem add {B₁ B₂ : BilinForm R M} (hB₁ : B₁.IsSymm) (hB₂ : B₂.IsSymm) :
    (B₁ + B₂).IsSymm

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B₁ B₂ : LinearMap.BilinForm R M}
(hB₁ : B₁.IsSymm)
(hB₂ : B₂.IsSymm)


theorem Sublist.sublistForall₂ {l₁ l₂ : List α} (h : l₁ <+ l₂) [IsRefl α Rₐ] :
    SublistForall₂ Rₐ l₁ l₂

{α : Type u_1}
{Rₐ : α → α → Prop}
{l₁ l₂ : List α}
(h : l₁.Sublist l₂)
[IsRefl α Rₐ]


@[fun_prop]
protected theorem differentiable : Differentiable 𝕜 iso

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(iso : E ≃ₗᵢ[𝕜] F)


@[to_additive (attr := simp)]
theorem one_subset : (1 : Finset α) ⊆ s ↔ (1 : α) ∈ s


@[simp] theorem toInt_ofInt {n : Nat} (i : Int) :
  (BitVec.ofInt n i).toInt = i.bmod (2^n)

(BitVec.ofInt n i).toInt = i.bmod (2 ^ n)


@[simp]
theorem piecewise_same (f : α →ₛ β) {s : Set α} (hs : MeasurableSet s) :
    piecewise s hs f f = f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
{s : Set α}
(hs : MeasurableSet s)

MeasureTheory.SimpleFunc.piecewise s hs f f = f


theorem Filter.HasBasis.uniformEmbedding_iff {ι ι'} {p : ι → Prop} {p' : ι' → Prop} {s s'}
    (h : (𝓤 α).HasBasis p s) (h' : (𝓤 β).HasBasis p' s') {f : α → β} :
    UniformEmbedding f ↔ Injective f ∧ UniformContinuous f ∧
      (∀ j, p j → ∃ i, p' i ∧ ∀ x y, (f x, f y) ∈ s' i → (x, y) ∈ s j)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{ι : Sort u_1}
{ι' : Sort u_2}
{p : ι → Prop}
{p' : ι' → Prop}
{s : ι → Set (α × α)}
{s' : ι' → Set (β × β)}
(h : (𝓤 α).HasBasis p s)
(h' : (𝓤 β).HasBasis p' s')
{f : α → β}

UniformEmbedding f ↔
  Function.Injective f ∧
    UniformContinuous f ∧ ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j


theorem not_mem_commonNeighbors_left (v w : V) : v ∉ G.commonNeighbors v w

{V : Type u}
(G : SimpleGraph V)
(v w : V)


/-- `LinearEquiv.prodProdProdComm` is isometric. -/
@[simps!]
def IsometryEquiv.prodProdProdComm
    (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P)
    (Q₃ : QuadraticMap R N₁ P) (Q₄ : QuadraticMap R N₂ P) :
    ((Q₁.prod Q₂).prod (Q₃.prod Q₄)).IsometryEquiv ((Q₁.prod Q₃).prod (Q₂.prod Q₄))

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{N₁ : Type u_5}
{N₂ : Type u_6}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N₁]
[AddCommMonoid N₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R N₁]
[Module R N₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)
(Q₃ : QuadraticMap R N₁ P)
(Q₄ : QuadraticMap R N₂ P)
(mmnn : (M₁ × N₁) × M₂ × N₂)

(QuadraticMap.IsometryEquiv.prodProdProdComm Q₁ Q₂ Q₃ Q₄).invFun mmnn = ((mmnn.1.1, mmnn.2.1), mmnn.1.2, mmnn.2.2)


@[to_additive]
theorem Submonoid.coe_topologicalClosure (s : Submonoid M) :
    (s.topologicalClosure : Set M) = _root_.closure (s : Set M)

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
(s : Submonoid M)


@[to_additive]
theorem append_append_left_iff : ∀ L, Red (L ++ L₁) (L ++ L₂) ↔ Red L₁ L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
(L : List (α × Bool))

FreeGroup.Red (L ++ L₁) (L ++ L₂) ↔ FreeGroup.Red L₁ L₂


lemma NatTrans.isIso_iff_isIso_app {F G : C ⥤ D} (τ : F ⟶ G) :
    IsIso τ ↔ ∀ X, IsIso (τ.app X)

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

CategoryTheory.IsIso τ ↔ ∀ (X : C), CategoryTheory.IsIso (τ.app X)


private theorem bracket_lie_self (x : A ⊗[R] L) : ⁅x, x⁆ = 0

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
[CommRing R]
[CommRing A]
[Algebra R A]
[LieRing L]
[LieAlgebra R L]
(x : A ⊗[R] L)


theorem IsCompact.exists_isMaxOn_mem_subset [ClosedIciTopology α] {f : β → α} {s t : Set β}
    {z : β} (ht : IsCompact t) (hf : ContinuousOn f t) (hz : z ∈ t)
    (hfz : ∀ z' ∈ t \ s, f z' < f z) : ∃ x ∈ s, IsMaxOn f t x

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[TopologicalSpace α]
[TopologicalSpace β]
[ClosedIciTopology α]
{f : β → α}
{s t : Set β}
{z : β}
(ht : IsCompact t)
(hf : ContinuousOn f t)
(hz : z ∈ t)
(hfz : ∀ z' ∈ t \ s, f z' < f z)


@[to_additive]
theorem Monotone.inv (hf : Monotone f) : Antitone fun x => (f x)⁻¹

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

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


theorem IsBigOWith.pow [NormOneClass R] {f : α → R} {g : α → 𝕜} (h : IsBigOWith c l f g) :
    ∀ n : ℕ, IsBigOWith (c ^ n) l (fun x => f x ^ n) fun x => g x ^ n

{α : Type u_1}
{R : Type u_13}
{𝕜 : Type u_15}
[SeminormedRing R]
[NormedDivisionRing 𝕜]
{c : ℝ}
{l : Filter α}
[NormOneClass R]
{f : α → R}
{g : α → 𝕜}
(h : Asymptotics.IsBigOWith c l f g)
(n : ℕ)

Asymptotics.IsBigOWith (c ^ n) l (fun x => f x ^ n) fun x => g x ^ n


@[simp] theorem getElem_cons_succ (a : α) (as : List α) (i : Nat) (h : i + 1 < (a :: as).length) : getElem (a :: as) (i+1) h = getElem as i (Nat.lt_of_succ_lt_succ h)

{α : Type u_1}
(a : α)
(as : List α)
(i : Nat)
(h : i + 1 < (a :: as).length)

getElem (a :: as) (i + 1) h = getElem as i ⋯


theorem mkContinuousLinear_norm_le (f : G →ₗ[𝕜] MultilinearMap 𝕜 E G') {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ x m, ‖f x m‖ ≤ C * ‖x‖ * ∏ i, ‖m i‖) : ‖mkContinuousLinear f C H‖ ≤ C

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

(H : ∀ (x : G) (m : (i : ι) → E i), ‖(f x) m‖ ≤ C * ‖x‖ * ∏ i : ι, ‖m i‖)

‖MultilinearMap.mkContinuousLinear f C H‖ ≤ C


theorem IsEquivalent.tendsto_atTop_iff [OrderTopology β] (huv : u ~[l] v) :
    Tendsto u l atTop ↔ Tendsto v l atTop

{α : Type u_1}
{β : Type u_2}
[NormedLinearOrderedField β]
{u v : α → β}
{l : Filter α}
[OrderTopology β]
(huv : u ~[l] v)

Filter.Tendsto u l Filter.atTop ↔ Filter.Tendsto v l Filter.atTop


theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [Algebra.IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x)

{R : Type u_1}
[CommRing R]
(K : Type u_4)
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
[Algebra R L]
[Algebra R K]
[IsScalarTower R K L]
[Algebra.IsSeparable K L]
[FiniteDimensional K L]
{x : L}
(hx : IsIntegral R x)


/-- The kernel of `quotQuotMk` -/
theorem ker_quotQuotMk : RingHom.ker (quotQuotMk I J) = I ⊔ J

{R : Type u}
[CommRing R]
(I J : Ideal R)

RingHom.ker (DoubleQuot.quotQuotMk I J) = I ⊔ J


theorem coinduction2 (s) (f g : Seq α → Seq β)
    (H :
      ∀ s,
        BisimO (fun s1 s2 : Seq β => ∃ s : Seq α, s1 = f s ∧ s2 = g s) (destruct (f s))
          (destruct (g s))) :
    f s = g s

(H : ∀ (s : Stream'.Seq α), Stream'.Seq.BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (f s).destruct (g s).destruct)


theorem mapDomain_apply' (S : Set α) {f : α → β} (x : α →₀ M) (hS : (x.support : Set α) ⊆ S)
    (hf : Set.InjOn f S) {a : α} (ha : a ∈ S) : mapDomain f x (f a) = x a

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(S : Set α)
{f : α → β}
(x : α →₀ M)
(hS : ↑x.support ⊆ S)
(hf : Set.InjOn f S)
{a : α}
(ha : a ∈ S)


private theorem add_one_le_exp_of_nonneg {x : ℝ} (hx : 0 ≤ x) : x + 1 ≤ exp x


theorem memℓp_zero {f : ∀ i, E i} (hf : Set.Finite { i | f i ≠ 0 }) : Memℓp f 0

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
{f : (i : α) → E i}
(hf : {i | f i ≠ 0}.Finite)


/-- Given `(f : B ≃ₐ[A] C)`, if `IsCyclotomicExtension S A B` then
`IsCyclotomicExtension S A C`. -/
protected
theorem equiv {C : Type*} [CommRing C] [Algebra A C] [h : IsCyclotomicExtension S A B]
    (f : B ≃ₐ[A] C) : IsCyclotomicExtension S A C

(S : Set ℕ+)
(A : Type u)
(B : Type v)
[CommRing A]
[CommRing B]
[Algebra A B]
{C : Type u_1}
[CommRing C]
[Algebra A C]
[h : IsCyclotomicExtension S A B]
(f : B ≃ₐ[A] C)


theorem IsClosed.not_inseparable (hs : IsClosed s) (hx : x ∈ s) (hy : y ∉ s) : ¬(x ~ᵢ y)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(hs : IsClosed s)
(hx : x ∈ s)
(hy : y ∉ s)


@[to_additive (attr := simp)]
theorem OneHom.comp_one [One M] [One N] [One P] (f : OneHom N P) : f.comp (1 : OneHom M N) = 1

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Zero M]
[Zero N]
[Zero P]
(f : ZeroHom N P)


@[simp, norm_cast]
theorem coe_map (f : α ↪ β) (s : Finset α) : (s.map f : Set β) = f '' s

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


theorem Nodup.toFinset_inj {l l' : Multiset α} (hl : Nodup l) (hl' : Nodup l')
    (h : l.toFinset = l'.toFinset) : l = l'

{α : Type u_1}
[DecidableEq α]
{l l' : Multiset α}
(hl : l.Nodup)
(hl' : l'.Nodup)
(h : l.toFinset = l'.toFinset)


@[simp]
lemma preimage_coe_Iio (y : ℝ) : Real.toEReal ⁻¹' Iio y = Iio y


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv (s : Finset α) : ↑s⁻¹ = (s : Set α)⁻¹

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

↑s⁻¹ = (↑s)⁻¹


theorem LE.le.codisjoint_hnot_left (h : a ≤ b) : Codisjoint (￢a) b

{α : Type u_2}
[CoheytingAlgebra α]
{a b : α}
(h : a ≤ b)


theorem frontier_preimage (e : Trivialization F proj) (s : Set B) :
    e.source ∩ frontier (proj ⁻¹' s) = proj ⁻¹' (e.baseSet ∩ frontier s)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
(s : Set B)


/-- A point `c` belongs the perpendicular bisector of `[p₁, p₂] iff `c -ᵥ midpoint ℝ p₁ p₂` is
orthogonal to `p₂ -ᵥ p₁`. -/
theorem mem_perpBisector_iff_inner_eq_zero :
    c ∈ perpBisector p₁ p₂ ↔ ⟪c -ᵥ midpoint ℝ p₁ p₂, p₂ -ᵥ p₁⟫ = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c p₁ p₂ : P}

c ∈ AffineSubspace.perpBisector p₁ p₂ ↔ ⟪c -ᵥ midpoint ℝ p₁ p₂, p₂ -ᵥ p₁⟫_ℝ = 0


theorem leftInvSeq_reverse (ω : List B) :
    lis (ω.reverse) = (ris ω).reverse

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(ω : List B)

cs.leftInvSeq ω.reverse = (cs.rightInvSeq ω).reverse


theorem inter_ae_eq_empty_of_ae_eq_empty_right (h : t =ᵐ[μ] (∅ : Set α)) :
    (s ∩ t : Set α) =ᵐ[μ] (∅ : Set α)

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(h : t =ᵐ[μ] ∅)


theorem approx_le_one (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ 1

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)
(n : ℕ)
(x : X)


@[to_additive]
protected theorem Set.Finite.multipliable {s : Set β} (hs : s.Finite) (f : β → α) :
    Multipliable (f ∘ (↑) : s → α)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{s : Set β}
(hs : s.Finite)
(f : β → α)


@[simp]
theorem cospan_left {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) : (cospan f g).obj WalkingCospan.left = X

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

(CategoryTheory.Limits.cospan f g).obj CategoryTheory.Limits.WalkingCospan.left = X


lemma mem_of_isLE (X : C) (n : ℤ) [t.IsLE X n] : t.LE n X

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

(t : CategoryTheory.Triangulated.TStructure C)


@[to_additive const_add]
theorem Antitone.const_mul' [CovariantClass α α (· * ·) (· ≤ ·)] (hf : Antitone f) (a : α) :
    Antitone fun x => a * f x

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


theorem Or.imp_left (f : a → b) : a ∨ c → b ∨ c


@[simp]
theorem not_bot_lt_iff : ¬⊥ < a ↔ a = ⊥

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

¬⊥ < a ↔ a = ⊥


@[to_additive (attr := simp, nolint simpNF)]
theorem tprod_singleton (b : β) (f : β → α) : ∏' x : ({b} : Set β), f x = f b

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


/-- A Dedekind domain is a PID if its set of primes is finite. -/
theorem IsPrincipalIdealRing.of_finite_primes [IsDedekindDomain R]
    (h : {I : Ideal R | I.IsPrime}.Finite) : IsPrincipalIdealRing R

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
(h : {I | I.IsPrime}.Finite)


theorem Indep.exists_insert_of_not_basis (hI : M.Indep I) (hIX : I ⊆ X) (hI' : ¬M.Basis I X)
    (hJ : M.Basis J X) : ∃ e ∈ J \ I, M.Indep (insert e I)

{α : Type u_1}
{M : Matroid α}
{I X J : Set α}
(hI : M.Indep I)
(hIX : I ⊆ X)
(hI' : ¬M.Basis I X)
(hJ : M.Basis J X)


@[simp, norm_cast]
theorem cast_mul [Semiring α] (m n) : ((m * n : PosNum) : α) = m * n

{α : Type u_1}
[Semiring α]
(m n : PosNum)


@[ext]
theorem ext ⦃η η' : ApplicativeTransformation F G⦄ (h : ∀ (α : Type u) (x : F α), η x = η' x) :
    η = η'

(h : ∀ (α : Type u) (x : F α), (fun {α} => η.app α) x = (fun {α} => η'.app α) x)


@[simp, norm_cast]
theorem disjoint_coe : Disjoint (s : Set α) t ↔ Disjoint s t


theorem Real.Ioo_eq_ball (x y : ℝ) : Ioo x y = ball ((x + y) / 2) ((y - x) / 2)

Set.Ioo x y = Metric.ball ((x + y) / 2) ((y - x) / 2)


theorem locallyConnectedSpace_iff_open_connected_basis :
    LocallyConnectedSpace α ↔
      ∀ x, (𝓝 x).HasBasis (fun s : Set α => IsOpen s ∧ x ∈ s ∧ IsConnected s) id

LocallyConnectedSpace α ↔ ∀ (x : α), (𝓝 x).HasBasis (fun s => IsOpen s ∧ x ∈ s ∧ IsConnected s) id


theorem closure_prod_eq {s : Set X} {t : Set Y} : closure (s ×ˢ t) = closure s ×ˢ closure t

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


theorem isCobounded_le_nhds (a : α) : (𝓝 a).IsCobounded (· ≤ ·)

{α : Type u_2}
[Preorder α]
[TopologicalSpace α]
[BoundedGENhdsClass α]
(a : α)

Filter.IsCobounded (fun x x_1 => x ≤ x_1) (𝓝 a)


theorem Limit.lift_π_apply (s : Cone F) (j : J) (x : s.pt) :
    limit.π F j (limit.lift F s x) = s.π.app j x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type u)
[CategoryTheory.Limits.HasLimit F]
(s : CategoryTheory.Limits.Cone F)
(j : J)
(x : s.pt)

CategoryTheory.Limits.limit.π F j (CategoryTheory.Limits.limit.lift F s x) = s.π.app j x


@[simp]
theorem tail_cons : tail (cons x p) = p

{n : ℕ}
{α : Fin (n + 1) → Type u}
(x : α 0)
(p : (i : Fin n) → α i.succ)


theorem dioph_comp {S : Set (Vector3 ℕ n)} (d : Dioph S) (f : Vector3 ((α → ℕ) → ℕ) n)
    (df : VectorAllP DiophFn f) : Dioph {v | (fun i => f i v) ∈ S}

{α : Type}
{n : ℕ}
{S : Set (Vector3 ℕ n)}
(d : Dioph S)
(f : Vector3 ((α → ℕ) → ℕ) n)
(df : VectorAllP Dioph.DiophFn f)


theorem ι_openEmbedding (i : D.J) : OpenEmbedding (𝖣.ι i)


theorem right_mono [Preorder α] [Preorder β] {f : α → β} {g : β → α} (h : IsOrderRightAdjoint f g) :
    Monotone g

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


theorem equiv_iff_mem {x y : PSet.{u}} : Equiv x y ↔ ∀ {w : PSet.{u}}, w ∈ x ↔ w ∈ y


theorem _root_.Bornology.IsBounded.subset_ball (h : IsBounded s) (c : α) : ∃ r, s ⊆ ball c r

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(h : Bornology.IsBounded s)
(c : α)


theorem Colorable.mono {n m : ℕ} (h : n ≤ m) (hc : G.Colorable n) : G.Colorable m

{V : Type u}
{G : SimpleGraph V}
{n m : ℕ}
(h : n ≤ m)
(hc : G.Colorable n)


@[simp]
theorem map_bijective_iff {f : α → β} : Bijective (map f) ↔ Bijective f

Function.Bijective (List.map f) ↔ Function.Bijective f


@[to_additive]
theorem copy_eq (f : α →*o β) (f' : α → β) (h : f' = f) : f.copy f' h = f

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


lemma shiftFunctorAdd_add_zero_hom_app (a : A) (X : C) : (shiftFunctorAdd C a 0).hom.app X =
    eqToHom (by dsimp; rw [add_zero]) ≫ (shiftFunctorZero C A).inv.app (X⟦a⟧)

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

(CategoryTheory.shiftFunctorAdd C a 0).hom.app X =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
    ((CategoryTheory.shiftFunctorZero C A).inv.app ((CategoryTheory.shiftFunctor C a).obj X))


lemma oddKernel_def' (a x : ℝ) : ↑(oddKernel ↑a x) = cexp (-π * a ^ 2 * x) *
    (jacobiTheta₂' (a * I * x) (I * x) / (2 * π * I) + a * jacobiTheta₂ (a * I * x) (I * x))

↑(HurwitzZeta.oddKernel (↑a) x) =
  cexp (-↑π * ↑a ^ 2 * ↑x) *
    (jacobiTheta₂' (↑a * Complex.I * ↑x) (Complex.I * ↑x) / (2 * ↑π * Complex.I) +
      ↑a * jacobiTheta₂ (↑a * Complex.I * ↑x) (Complex.I * ↑x))


@[to_additive (attr := simp)]
theorem ofQuotientStabilizer_mk (g : α) : ofQuotientStabilizer α x (QuotientGroup.mk g) = g • x

(α : Type u)
{β : Type v}
[Group α]
[MulAction α β]
(x : β)
(g : α)

MulAction.ofQuotientStabilizer α x ↑g = g • x


@[simp] lemma powerset_infs_powerset_self (s : Finset α) :
    s.powerset ⊼ s.powerset = s.powerset

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


@[to_additive (attr := simp)]
theorem coe_pow {G : Type*} [Monoid G] [TopologicalSpace G] [ChartedSpace H' G] [SmoothMul I' G]
    (f : C^∞⟮I, N; I', G⟯) (n : ℕ) :
    ⇑(f ^ n) = (f : N → G) ^ n

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_4}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{H' : Type u_5}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{N : Type u_6}
[TopologicalSpace N]
[ChartedSpace H N]
{G : Type u_10}
[AddMonoid G]
[TopologicalSpace G]
[ChartedSpace H' G]
[SmoothAdd I' G]
(f : C^⊤⟮I, N; I', G⟯)
(n : ℕ)


@[to_additive]
theorem lift_mk'_spec (x v) (y : S) : f.lift hg (f.mk' x y) = v ↔ g x = g y * v

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
(hg : ∀ (y : ↥S), IsUnit (g ↑y))
(x : M)
(v : P)
(y : ↥S)

(f.lift hg) (f.mk' x y) = v ↔ g x = g ↑y * v


theorem imageIsoImage_inv :
    (imageIsoImage f).inv =
      kernel.lift _ (Limits.image.ι f) (by simp [← cancel_epi (factorThruImage f)])

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

(CategoryTheory.Abelian.imageIsoImage f).inv =
  CategoryTheory.Limits.kernel.lift (CategoryTheory.Limits.cokernel.π f) (CategoryTheory.Limits.image.ι f) ⋯


/-- The main result, *Legendre's Theorem* on rational approximation:
if `ξ` is a real number and `q` is a rational number such that `|ξ - q| < 1/(2*q.den^2)`,
then `q` is a convergent of the continued fraction expansion of `ξ`.
This version uses `Real.convergent`. -/
theorem exists_rat_eq_convergent {q : ℚ} (h : |ξ - q| < 1 / (2 * (q.den : ℝ) ^ 2)) :
    ∃ n, q = ξ.convergent n


@[simp] theorem map_drop (f : α → β) :
    ∀ (L : List α) (i : Nat), (L.drop i).map f = (L.map f).drop i

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(L : List α)
(i : Nat)

List.map f (List.drop i L) = List.drop i (List.map f L)


@[simp]
theorem cosh_neg : cosh (-x) = cosh x


theorem lift_unique' (F : MonoidAlgebra k G →ₐ[k] A) :
    F = lift k G A ((F : MonoidAlgebra k G →* A).comp (of k G))

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[Monoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
(F : MonoidAlgebra k G →ₐ[k] A)

F = (MonoidAlgebra.lift k G A) ((↑F).comp (MonoidAlgebra.of k G))


theorem right_continuous (x : ℝ) : ContinuousWithinAt f (Ici x) x


theorem map_comap_of_mem {f : Filter β} {m : α → β} (hf : range m ∈ f) : (f.comap m).map m = f

{α : Type u}
{β : Type v}
{f : Filter β}
{m : α → β}
(hf : Set.range m ∈ f)


theorem Associates.mk_ne_zero' {R : Type*} [CommSemiring R] {r : R} :
    Associates.mk (Ideal.span {r} : Ideal R) ≠ 0 ↔ r ≠ 0

Associates.mk (Ideal.span {r}) ≠ 0 ↔ r ≠ 0


theorem prod_cyclotomic_eq_geom_sum {n : ℕ} (h : 0 < n) (R) [CommRing R] :
    ∏ i ∈ n.divisors.erase 1, cyclotomic i R = ∑ i ∈ Finset.range n, X ^ i

{n : ℕ}
(h : 0 < n)
(R : Type u_1)
[CommRing R]

∏ i ∈ n.divisors.erase 1, Polynomial.cyclotomic i R = ∑ i ∈ Finset.range n, Polynomial.X ^ i


/-- This is like `rank_eq_one_iff_finrank_eq_one` but works for `2`, `3`, `4`, ... -/
lemma rank_eq_ofNat_iff_finrank_eq_ofNat (n : ℕ) [Nat.AtLeastTwo n] :
    Module.rank R M = OfNat.ofNat n ↔ finrank R M = OfNat.ofNat n

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
(n : ℕ)
[n.AtLeastTwo]

Module.rank R M = OfNat.ofNat n ↔ FiniteDimensional.finrank R M = OfNat.ofNat n


/-- `cantorFunction c` is injective if `0 < c < 1/2`. -/
theorem cantorFunction_injective (h1 : 0 < c) (h2 : c < 1 / 2) :
    Function.Injective (cantorFunction c)


theorem nsmul_mem_zmultiples_iff_exists_sub_div {r : R} {n : ℕ} (hn : n ≠ 0) :
    n • r ∈ AddSubgroup.zmultiples p ↔
      ∃ k : Fin n, r - (k : ℕ) • (p / n : R) ∈ AddSubgroup.zmultiples p

{R : Type u_1}
[DivisionRing R]
[CharZero R]
{p r : R}
{n : ℕ}
(hn : n ≠ 0)

n • r ∈ AddSubgroup.zmultiples p ↔ ∃ k, r - ↑k • (p / ↑n) ∈ AddSubgroup.zmultiples p


/-- The non-commutative version of `Finset.prod_mul_distrib` -/
@[to_additive "The non-commutative version of `Finset.sum_add_distrib`"]
theorem noncommProd_mul_distrib {s : Finset α} (f : α → β) (g : α → β) (comm_ff comm_gg comm_gf) :
    noncommProd s (f * g) (noncommProd_mul_distrib_aux comm_ff comm_gg comm_gf) =
      noncommProd s f comm_ff * noncommProd s g comm_gg

(comm_ff : (↑s).Pairwise fun x y => Commute (f x) (f y))

(comm_gg : (↑s).Pairwise fun x y => Commute (g x) (g y))

(comm_gf : (↑s).Pairwise fun x y => Commute (g x) (f y))

s.noncommProd (f * g) ⋯ = s.noncommProd f comm_ff * s.noncommProd g comm_gg


@[simp]
theorem subtypeDomain_sub : (v - v').subtypeDomain p = v.subtypeDomain p - v'.subtypeDomain p

{α : Type u_1}
{G : Type u_9}
[AddGroup G]
{p : α → Prop}
{v v' : α →₀ G}

Finsupp.subtypeDomain p (v - v') = Finsupp.subtypeDomain p v - Finsupp.subtypeDomain p v'


/-- Permutations on a subtype are equivalent to permutations on the original type that fix pointwise
the rest. -/
@[simps]
protected def subtypeEquivSubtypePerm (p : α → Prop) [DecidablePred p] :
    Perm (Subtype p) ≃ { f : Perm α // ∀ a, ¬p a → f a = a }

(f : { f // ∀ (a : α), ¬p a → f a = a })

(Equiv.Perm.subtypeEquivSubtypePerm p).symm f = (↑f).subtypePerm ⋯


/-- Bounding below the radius of the composition of two formal multilinear series assuming
summability over all compositions. -/
theorem le_comp_radius_of_summable (q : FormalMultilinearSeries 𝕜 F G)
    (p : FormalMultilinearSeries 𝕜 E F) (r : ℝ≥0)
    (hr : Summable fun i : Σ n, Composition n => ‖q.compAlongComposition p i.2‖₊ * r ^ i.1) :
    (r : ℝ≥0∞) ≤ (q.comp p).radius

(hr : Summable fun i => ‖q.compAlongComposition p i.snd‖₊ * r ^ i.fst)


theorem convex_list_sum {l : List (Set E)} (h : ∀ i ∈ l, Convex 𝕜 i) : Convex 𝕜 l.sum

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{l : List (Set E)}
(h : ∀ i ∈ l, Convex 𝕜 i)


@[reassoc]
lemma map₂_hom_inv_isIso {f g : a ⟶ b} (η : f ⟶ g) [IsIso η] :
    F.map₂ η ≫ F.map₂ (inv η) = 𝟙 (F.map f)

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

CategoryTheory.CategoryStruct.comp (F.map₂ η) (F.map₂ (CategoryTheory.inv η)) =
  CategoryTheory.CategoryStruct.id (F.map f)


@[simp, norm_cast]
theorem one_le_coe_iff : (1 : ℝ≥0∞) ≤ ↑r ↔ 1 ≤ r

1 ≤ ↑r ↔ 1 ≤ r


theorem lowerSemicontinuous_aux {ι : Type*} {F : ι → α → E} {p : Filter ι} {f : α → E} {s : Set α}
    (Ffs : ∀ x ∈ s, Tendsto (fun i => F i x) p (𝓝 (f x))) {v : ℝ≥0∞} (hv : v < eVariationOn f s) :
    ∀ᶠ n : ι in p, v < eVariationOn (F n) s

(Ffs : ∀ x ∈ s, Filter.Tendsto (fun i => F i x) p (𝓝 (f x)))

∀ᶠ (n : ι) in p, v < eVariationOn (F n) s


@[simp]
theorem rotate_append_length_eq (l l' : List α) : (l ++ l').rotate l.length = l' ++ l


theorem imageSubobject_factors_comp_self {W : C} (k : W ⟶ X) : (imageSubobject f).Factors (k ≫ f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.Limits.HasImage f]
{W : C}
(k : W ⟶ X)

(CategoryTheory.Limits.imageSubobject f).Factors (k ≫ f)


@[simp]
theorem LinearMap.toMatrixAlgEquiv'_symm :
    (LinearMap.toMatrixAlgEquiv'.symm : Matrix n n R ≃ₐ[R] _) = Matrix.toLinAlgEquiv'

{R : Type u_1}
[CommSemiring R]
{n : Type u_5}
[DecidableEq n]
[Fintype n]


@[simp]
theorem coe_toSubMulAction (p : Submodule R M) : (p.toSubMulAction : Set M) = p

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


/-- A product of a function `f : Fin 0 → β` is `1` because `Fin 0` is empty -/
@[to_additive "A sum of a function `f : Fin 0 → β` is `0` because `Fin 0` is empty"]
theorem prod_univ_zero [CommMonoid β] (f : Fin 0 → β) : ∏ i, f i = 1

{β : Type u_2}
[AddCommMonoid β]
(f : Fin 0 → β)


@[simp]
theorem get_ofFn {n} (f : Fin n → α) (i) : get (ofFn f) i = f i

{α : Type u_1}
{n : ℕ}
(f : Fin n → α)
(i : Fin n)


lemma uzpow_sub (s : ℤˣ) (x y : R) : s ^ (x - y) = s ^ x / s ^ y

{R : Type u_1}
[CommRing R]
[Module R (Additive ℤˣ)]
(s : ℤˣ)
(x y : R)


theorem hitting_def [Preorder ι] [InfSet ι] (u : ι → Ω → β) (s : Set β) (n m : ι) :
    hitting u s n m =
    fun x => if ∃ j ∈ Set.Icc n m, u j x ∈ s then sInf (Set.Icc n m ∩ {i : ι | u i x ∈ s}) else m

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[Preorder ι]
[InfSet ι]
(u : ι → Ω → β)
(s : Set β)
(n m : ι)

MeasureTheory.hitting u s n m = fun x =>
  if ∃ j ∈ Set.Icc n m, u j x ∈ s then sInf (Set.Icc n m ∩ {i | u i x ∈ s}) else m


@[simp]
theorem foldrm.ofFreeMonoid_comp_of {m} [Monad m] [LawfulMonad m] (f : β → α → m α) :
    foldrM.ofFreeMonoid f ∘ FreeMonoid.of = foldrM.mk ∘ f

{α β : Type u}
{m : Type u → Type u}
[Monad m]
[LawfulMonad m]
(f : β → α → m α)

⇑(Monoid.foldrM.ofFreeMonoid f) ∘ FreeMonoid.of = Monoid.foldrM.mk ∘ f


theorem tendstoUniformlyOn_deriv_of_cthickening_subset (hf : TendstoLocallyUniformlyOn F f φ U)
    (hF : ∀ᶠ n in φ, DifferentiableOn ℂ (F n) U) {δ : ℝ} (hδ : 0 < δ) (hK : IsCompact K)
    (hU : IsOpen U) (hKU : cthickening δ K ⊆ U) :
    TendstoUniformlyOn (deriv ∘ F) (cderiv δ f) φ K

(hF : ∀ᶠ (n : ι) in φ, DifferentiableOn ℂ (F n) U)

TendstoUniformlyOn (deriv ∘ F) (Complex.cderiv δ f) φ K


/-- A subspace is dense iff its topological closure is the entire space. -/
theorem Submodule.dense_iff_topologicalClosure_eq_top {s : Submodule R M} :
    Dense (s : Set M) ↔ s.topologicalClosure = ⊤

{R : Type u}
{M : Type v}
[Semiring R]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M]
{s : Submodule R M}


/-- `Finsupp.single` as a `MonoidHom` from the product type into the monoid algebra.

Note the order of the elements of the product are reversed compared to the arguments of
`Finsupp.single`.
-/
@[simps]
def singleHom [MulOneClass G] : k × G →* MonoidAlgebra k G

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[MulOneClass G]
(a : k × G)

MonoidAlgebra.singleHom a = MonoidAlgebra.single a.2 a.1


theorem vsub_mem_vsub : s ∈ f → t ∈ g → s -ᵥ t ∈ f -ᵥ g

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


theorem LinearEquiv.dualMap_trans {M₃ : Type*} [AddCommGroup M₃] [Module R M₃] (f : M₁ ≃ₗ[R] M₂)
    (g : M₂ ≃ₗ[R] M₃) : g.dualMap.trans f.dualMap = (f.trans g).dualMap

{R : Type u}
[CommSemiring R]
{M₁ : Type v}
{M₂ : Type v'}
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
{M₃ : Type u_1}
[AddCommGroup M₃]
[Module R M₃]
(f : M₁ ≃ₗ[R] M₂)
(g : M₂ ≃ₗ[R] M₃)

g.dualMap ≪≫ₗ f.dualMap = (f ≪≫ₗ g).dualMap


@[simp] lemma isSublattice (L : Sublattice α) : IsSublattice (L : Set α)

{α : Type u_2}
[Lattice α]
(L : Sublattice α)


/-- An anti-equivalence between the categories of triangles in `C` and in `Cᵒᵖ`.
A triangle in `Cᵒᵖ` shall be distinguished iff it correspond to a distinguished
triangle in `C` via this equivalence. -/
@[simps]
noncomputable def triangleOpEquivalence :
    (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]

(CategoryTheory.Pretriangulated.triangleOpEquivalence C).functor =
  CategoryTheory.Pretriangulated.TriangleOpEquivalence.functor C


@[simp]
theorem coe_subtype {α} (p : α → Prop) : ↑(subtype p) = Subtype.val

⇑(Function.Embedding.subtype p) = Subtype.val


theorem IsQuasiSeparated.image_of_embedding {s : Set α} (H : IsQuasiSeparated s) (h : Embedding f) :
    IsQuasiSeparated (f '' s)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
(H : IsQuasiSeparated s)
(h : Embedding f)


@[simp]
theorem sInf_toSubring (s : Set (Subfield K)) :
    (sInf s).toSubring = ⨅ t ∈ s, Subfield.toSubring t

{K : Type u}
[DivisionRing K]
(s : Set (Subfield K))

(sInf s).toSubring = ⨅ t ∈ s, t.toSubring


theorem splits_pow {f : K[X]} (hf : f.Splits i) (n : ℕ) : (f ^ n).Splits i

{K : Type v}
{L : Type w}
[CommRing K]
[Field L]
(i : K →+* L)
{f : K[X]}
(hf : Polynomial.Splits i f)
(n : ℕ)


/-- The diamond isomorphism between the intervals `]a ⊓ b, a[` and `}b, a ⊔ b[`. -/
@[simps]
def infIooOrderIsoIooSup (a b : α) : Ioo (a ⊓ b) a ≃o Ioo b (a ⊔ b)

{α : Type u_1}
[Lattice α]
[IsModularLattice α]
(a b : α)
(c : ↑(Set.Ioo (a ⊓ b) a))

↑((infIooOrderIsoIooSup a b) c) = ↑c ⊔ b


/-- An invertible ideal in a commutative ring with finitely many maximal ideals is principal.

https://math.stackexchange.com/a/95857 -/
theorem Ideal.IsPrincipal.of_finite_maximals_of_isUnit (hf : {I : Ideal R | I.IsMaximal}.Finite)
    {I : Ideal R} (hI : IsUnit (I : FractionalIdeal R⁰ (FractionRing R))) : I.IsPrincipal

{R : Type u_1}
[CommRing R]
(hf : {I | I.IsMaximal}.Finite)
{I : Ideal R}
(hI : IsUnit ↑I)


@[simp]
theorem basisFun_apply [DecidableEq ι] (i) :
    basisFun p 𝕜 ι i = (WithLp.equiv p _).symm (Pi.single i 1)

(p : ℝ≥0∞)
(𝕜 : Type u_1)
(ι : Type u_2)
[Finite ι]
[Ring 𝕜]
[DecidableEq ι]
(i : ι)

(PiLp.basisFun p 𝕜 ι) i = (WithLp.equiv p (ι → 𝕜)).symm (Pi.single i 1)


@[simp]
protected theorem mem_toFinset : a ∈ hs.toFinset ↔ a ∈ s

{α : Type u}
{s : Set α}
{a : α}
(hs : s.Finite)


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


@[simp] lemma card_plift (α : Type*) : card (PLift α) = card α

PartENat.card (PLift α) = PartENat.card α


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

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

TendstoLocallyUniformlyOn F f p s ↔ ∀ u ∈ 𝓝 1, ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∀ᶠ (i : ι) in p, ∀ a ∈ t, F i a / f a ∈ u


@[simp]
theorem tail_cons (a : α) (s) : tail (cons a s) = s

{α : Type u}
(a : α)
(s : Stream'.Seq α)


theorem star_eq_conjTranspose [Star α] (M : Matrix m m α) : star M = Mᴴ

{m : Type u_2}
{α : Type v}
[Star α]
(M : Matrix m m α)


theorem one_of_mem_closedBall (hx : x ∈ closedBall c f.rIn) : f x = 1

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)
{x : E}
(hx : x ∈ Metric.closedBall c f.rIn)


theorem LinearIndependent.sum_type {v' : ι' → M} (hv : LinearIndependent R v)
    (hv' : LinearIndependent R v')
    (h : Disjoint (Submodule.span R (range v)) (Submodule.span R (range v'))) :
    LinearIndependent R (Sum.elim v v')

(h : Disjoint (Submodule.span R (Set.range v)) (Submodule.span R (Set.range v')))


/-- If `f` is `O(x ^ (-a))` as `x → 0`, then `log • f` is `O(x ^ (-b))` for every `a < b`. -/
theorem isBigO_rpow_zero_log_smul [NormedSpace ℝ E] {a b : ℝ} {f : ℝ → E} (hab : a < b)
    (hf : f =O[𝓝[>] 0] (· ^ (-a))) :
    (fun t : ℝ => log t • f t) =O[𝓝[>] 0] (· ^ (-b))

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{f : ℝ → E}
(hab : a < b)
(hf : f =O[𝓝[>] 0] fun x => x ^ (-a))

(fun t => Real.log t • f t) =O[𝓝[>] 0] fun x => x ^ (-b)


theorem isPrimal (hu : IsUnit u) : IsPrimal u

{α : Type u_1}
[Monoid α]
{u : α}
(hu : IsUnit u)


/-- If two homomorphisms from a division monoid to a monoid are equal at a unit `x`, then they are
equal at `x⁻¹`. -/
@[to_additive
  "If two homomorphisms from a subtraction monoid to an additive monoid are equal at an
  additive unit `x`, then they are equal at `-x`."]
theorem IsUnit.eq_on_inv {F G N} [DivisionMonoid G] [Monoid N] [FunLike F G N]
    [MonoidHomClass F G N] {x : G} (hx : IsUnit x) (f g : F) (h : f x = g x) : f x⁻¹ = g x⁻¹

{F : Type u_1}
{G : Type u_2}
{N : Type u_3}
[SubtractionMonoid G]
[AddMonoid N]
[FunLike F G N]
[AddMonoidHomClass F G N]
{x : G}
(hx : IsAddUnit x)
(f g : F)
(h : f x = g x)


@[simp] protected lemma inv_eq_one : a⁻¹ = 1 ↔ a = 1


/-- The inverse of an element in the field of fractions of an integral domain. -/
protected noncomputable irreducible_def inv (z : K) : K

(A : Type u_6)
[CommRing A]
[IsDomain A]
{K : Type u_7}
[CommRing K]
[Algebra A K]
[IsFractionRing A K]
(z : K)

IsFractionRing.inv A z =
  if h : z = 0 then 0
  else
    IsLocalization.mk' K ↑(IsLocalization.sec (nonZeroDivisors A) z).2 ⟨(IsLocalization.sec (nonZeroDivisors A) z).1, ⋯⟩


theorem EuclideanSpace.volume_closedBall (x : EuclideanSpace ℝ ι) (r : ℝ) :
    volume (Metric.closedBall x r) = (.ofReal r) ^ card ι *
      .ofReal (sqrt π ^ card ι / Gamma (card ι / 2 + 1))

(ι : Type u_1)
[Nonempty ι]
[Fintype ι]
(x : EuclideanSpace ℝ ι)
(r : ℝ)

MeasureTheory.volume (Metric.closedBall x r) =
  ENNReal.ofReal r ^ Fintype.card ι *
    ENNReal.ofReal (√Real.pi ^ Fintype.card ι / Real.Gamma (↑(Fintype.card ι) / 2 + 1))


@[simp] lemma ofENat_add_aleph0 (m : ℕ∞) : m + ℵ₀ = ℵ₀


@[simp]
protected theorem _root_.Complex.oangle (w z : ℂ) :
    Complex.orientation.oangle w z = Complex.arg (conj w * z)

Complex.orientation.oangle w z = ↑((starRingEnd ℂ) w * z).arg


/-- A local diffeomorphism has open range. -/
lemma IsLocalDiffeomorph.isOpen_range (hf : IsLocalDiffeomorph I J n f) : IsOpen (range f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{f : M → N}
(hf : IsLocalDiffeomorph I J n f)


theorem norm_fderiv_norm_rpow_le {f : F → E} (hf : Differentiable ℝ f) {x : F}
    {p : ℝ} (hp : 1 < p) :
    ‖fderiv ℝ (fun x ↦ ‖f x‖ ^ p) x‖ ≤ p * ‖f x‖ ^ (p - 1) * ‖fderiv ℝ f x‖

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : F → E}
(hf : Differentiable ℝ f)
{x : F}
{p : ℝ}
(hp : 1 < p)

‖fderiv ℝ (fun x => ‖f x‖ ^ p) x‖ ≤ p * ‖f x‖ ^ (p - 1) * ‖fderiv ℝ f x‖


theorem LinearMap.mul_toMatrix' (B : (n → R) →ₗ[R] (m → R) →ₗ[R] R) (M : Matrix n' n R) :
    M * toMatrix₂' R B = toMatrix₂' R (B.comp <| toLin' Mᵀ)

{n : Type u_12}
{m : Type u_13}
{n' : Type u_14}
{R : Type u_17}
[CommSemiring R]
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
[Fintype n']
[DecidableEq n']
(B : (n → R) →ₗ[R] (m → R) →ₗ[R] R)
(M : Matrix n' n R)

M * (LinearMap.toMatrix₂' R) B = (LinearMap.toMatrix₂' R) (B ∘ₗ Matrix.toLin' Mᵀ)


@[to_additive]
theorem _root_.Fintype.prod_eq_mul_prod_compl [DecidableEq α] [Fintype α] (a : α) (f : α → β) :
    ∏ i, f i = f a * ∏ i ∈ {a}ᶜ, f i

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
[Fintype α]
(a : α)
(f : α → β)


theorem measure_trim_toMeasurable_eq_zero {hm : m ≤ m0} (hs : μ.trim hm s = 0) :
    μ (@toMeasurable α m (μ.trim hm) s) = 0

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{hm : m ≤ m0}
(hs : (μ.trim hm) s = 0)

μ (MeasureTheory.toMeasurable (μ.trim hm) s) = 0


/-- If `r` is less than the Hausdorff dimension of a set `s` in an (extended) metric space with
second countable topology, then there exists a point `x ∈ s` such that every neighborhood
`t` of `x` within `s` has Hausdorff dimension greater than `r`. -/
theorem exists_mem_nhdsWithin_lt_dimH_of_lt_dimH {s : Set X} {r : ℝ≥0∞} (h : r < dimH s) :
    ∃ x ∈ s, ∀ t ∈ 𝓝[s] x, r < dimH t

{X : Type u_2}
[EMetricSpace X]
[SecondCountableTopology X]
{s : Set X}
{r : ℝ≥0∞}
(h : r < dimH s)


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

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

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


theorem isPiSystem_isOpen [TopologicalSpace α] : IsPiSystem ({s : Set α | IsOpen s})


private theorem lin_1 (l k r) : a k l * (newBasis K) r =
    ∑ u, (a' K a k l r u) * (newBasis K) u

(a : Matrix α β (NumberField.RingOfIntegers K))

a k l * (NumberField.house.newBasis K) r =
  ∑ u : K →+* ℂ, ↑(NumberField.house.a' K a k l r u) * (NumberField.house.newBasis K) u


theorem lineMap_vsub (p₁ p₂ p₃ : P₁) (c : k) :
    lineMap p₁ p₂ c -ᵥ p₃ = lineMap (p₁ -ᵥ p₃) (p₂ -ᵥ p₃) c

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

(AffineMap.lineMap p₁ p₂) c -ᵥ p₃ = (AffineMap.lineMap (p₁ -ᵥ p₃) (p₂ -ᵥ p₃)) c


@[to_additive ofNat_zsmul]
lemma zpow_ofNat (a : G) (n : ℕ) : a ^ (no_index (OfNat.ofNat n) : ℤ) = a ^ OfNat.ofNat n

{G : Type u_1}
[SubNegMonoid G]
(a : G)
(n : ℕ)


theorem coeff_pow_p (f : Ring.Perfection R p) (n : ℕ) :
    coeff R p (n + 1) (f ^ p) = coeff R p n f

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

(Perfection.coeff R p (n + 1)) (f ^ p) = (Perfection.coeff R p n) f


protected theorem data_eq_of_eq {a b : String} (h : a = b) : a.data = b.data


theorem coe_pow (p : SubMulAction R M) : ∀ {n : ℕ} (_ : n ≠ 0), ↑(p ^ n) = (p : Set M) ^ n

{R : Type u_1}
{M : Type u_2}
[Monoid R]
[MulAction R M]
[Monoid M]
[IsScalarTower R M M]
[SMulCommClass R M M]
(p : SubMulAction R M)
{n : ℕ}


@[simp, norm_cast]
theorem coe_smul' (c : S₂) (f : M₁ →SL[σ₁₂] M₂) :
    ↑(c • f) = c • (f : M₁ → M₂)

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{S₂ : Type u_9}
[Monoid S₂]
[DistribMulAction S₂ M₂]
[SMulCommClass R₂ S₂ M₂]
[ContinuousConstSMul S₂ M₂]
(c : S₂)
(f : M₁ →SL[σ₁₂] M₂)


/-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(e : M ≃* N)

e.toSingleObjEquiv.counitIso.hom = CategoryTheory.eqToHom ⋯


theorem le_prod {f : Filter (α × β)} {g : Filter α} {g' : Filter β} :
    (f ≤ g ×ˢ g') ↔ Tendsto Prod.fst f g ∧ Tendsto Prod.snd f g'

{α : Type u_1}
{β : Type u_2}
{f : Filter (α × β)}
{g : Filter α}
{g' : Filter β}

f ≤ g ×ˢ g' ↔ Filter.Tendsto Prod.fst f g ∧ Filter.Tendsto Prod.snd f g'


theorem ne_of_not_mem_cons {a b : α} {l : List α} : a ∉ b::l → a ≠ b


theorem Ico_subset_Icc_self : Ico a b ⊆ Icc a b


/-- If the domain of a function `f : α → β` is a Fréchet-Urysohn space, then convergence
is equivalent to sequential convergence. See also `Filter.tendsto_iff_seq_tendsto` for a version
that works for any pair of filters assuming that the filter in the domain is countably generated.

This property is equivalent to the definition of `FrechetUrysohnSpace`, see
`FrechetUrysohnSpace.of_seq_tendsto_imp_tendsto`. -/
theorem tendsto_nhds_iff_seq_tendsto [FrechetUrysohnSpace X] {f : X → Y} {a : X} {b : Y} :
    Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ u : ℕ → X, Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 b)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[FrechetUrysohnSpace X]
{f : X → Y}
{a : X}
{b : Y}

Filter.Tendsto f (𝓝 a) (𝓝 b) ↔
  ∀ (u : ℕ → X), Filter.Tendsto u Filter.atTop (𝓝 a) → Filter.Tendsto (f ∘ u) Filter.atTop (𝓝 b)


@[simp]
theorem add_coeff' {x y : HahnSeries Γ R} : (x + y).coeff = x.coeff + y.coeff

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
{x y : HahnSeries Γ R}


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


/-- In the characteristic zero case, the weights in the centroid sum
to 1 if the number of points is `n + 1`. -/
theorem sum_centroidWeights_eq_one_of_card_eq_add_one [CharZero k] {n : ℕ} (h : card s = n + 1) :
    ∑ i ∈ s, s.centroidWeights k i = 1

(k : Type u_1)
[DivisionRing k]
{ι : Type u_4}
(s : Finset ι)
[CharZero k]
{n : ℕ}
(h : s.card = n + 1)

∑ i ∈ s, Finset.centroidWeights k s i = 1


/-- A normal epimorphism is a morphism which is the cokernel of some morphism. -/
class NormalEpi (f : X ⟶ Y) where
  W : C
  g : W ⟶ X
  w : g ≫ f = 0
  isColimit : IsColimit (CokernelCofork.ofπ f w)

CategoryTheory.CategoryStruct.comp CategoryTheory.NormalEpi.g f = 0


theorem typesGlue_eval {S hs α} (s) : typesGlue.{u} S hs α (eval S α s) = s

{S : CategoryTheory.Functor Type uᵒᵖ (Type u)}

{hs : CategoryTheory.Presieve.IsSheaf CategoryTheory.typesGrothendieckTopology S}

CategoryTheory.typesGlue S hs α (CategoryTheory.eval S α s) = s


@[simp]
nonrec theorem nodup_nil : Nodup (@nil α)


theorem lt_ofReal_iff_toReal_lt {a : ℝ≥0∞} {b : ℝ} (ha : a ≠ ∞) :
    a < ENNReal.ofReal b ↔ ENNReal.toReal a < b


/-- A family of submodules in an `R`-module `M` is a submodules basis if it satisfies
some axioms ensuring there is a topology on `M` which is compatible with the module structure and
admits this family as a basis of neighborhoods of zero. -/
structure SubmodulesBasis [TopologicalSpace R] (B : ι → Submodule R M) : Prop where
  /-- Condition for `B` to be a filter basis on `M`. -/
  inter : ∀ i j, ∃ k, B k ≤ B i ⊓ B j
  /-- For any element `m : M` and any set `B` in the basis, `a • m` lies in `B` for all
    `a` sufficiently close to `0`. -/
  smul : ∀ (m : M) (i : ι), ∀ᶠ a in 𝓝 (0 : R), a • m ∈ B i

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
[TopologicalSpace R]
{B : ι → Submodule R M}
(self : SubmodulesBasis B)
(i j : ι)


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

(CategoryTheory.MonoidalCategory.tensorObj X Y).tgt = (X.tgt ⨯ Y.tgt)


theorem Nat.zpow_ne_zero_of_pos {a : ℕ} (h : 0 < a) (n : ℤ) : (a : α) ^ n ≠ 0

{α : Type u_1}
[LinearOrderedSemifield α]
{a : ℕ}
(h : 0 < a)
(n : ℤ)


/-- `Matrix.conjTranspose` as a `RingEquiv` to the opposite ring -/
@[simps]
def conjTransposeRingEquiv [Semiring α] [StarRing α] [Fintype m] :
    Matrix m m α ≃+* (Matrix m m α)ᵐᵒᵖ

(m : Type u_2)
(α : Type v)
[Semiring α]
[StarRing α]
[Fintype m]
(M : Matrix m m α)

(Matrix.conjTransposeRingEquiv m α) M = MulOpposite.op Mᴴ


@[simp]
theorem prodFun_apply (x : E) : φ.prodFun x = (φ.leftFun x, φ.rightFun x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[CompleteSpace G]
(φ : ImplicitFunctionData 𝕜 E F G)
(x : E)


lemma norm_fourierSMulRight_le (L : V →L[ℝ] W →L[ℝ] ℝ) (f : V → E) (v : V) :
    ‖fourierSMulRight L f v‖ ≤ 2 * π * ‖L‖ * ‖v‖ * ‖f v‖

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
(f : V → E)
(v : V)

‖VectorFourier.fourierSMulRight L f v‖ ≤ 2 * π * ‖L‖ * ‖v‖ * ‖f v‖


/-- The map `M.sections → N.sections` induced by a morphisms `M ⟶ N` of presheaves of modules. -/
@[simps!]
def sectionsMap {M N : PresheafOfModules.{v} R} (f : M ⟶ N) (s : M.sections) : N.sections

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
{M N : PresheafOfModules R}
(f : M ⟶ N)
(s : M.sections)
(X : Cᵒᵖ)

↑(PresheafOfModules.sectionsMap f s) X = (PresheafOfModules.Hom.app f X) (↑s X)


@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set G) = ⊥


theorem encode_injective [Encodable α] : Function.Injective (@encode α _)


@[to_additive] lemma mabs_lt : |a|ₘ < b ↔ b⁻¹ < a ∧ a < b

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

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


@[simp]
nonrec theorem disjoint_toFinset {hs : s.Finite} {ht : t.Finite} :
    Disjoint hs.toFinset ht.toFinset ↔ Disjoint s t

{α : Type u}
{s t : Set α}
{hs : s.Finite}
{ht : t.Finite}


a⁻¹ ≠ ⊤ ↔ a ≠ 0


@[simp]
theorem filter_ne_eq_erase' (f : Π₀ i, β i) (i : ι) : f.filter (i ≠ ·) = f.erase i

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

DFinsupp.filter (fun x => i ≠ x) f = DFinsupp.erase i f


@[simp]
theorem coe_comp_botHom (f : BoundedOrderHom β γ) (g : BoundedOrderHom α β) :
    (f.comp g : BotHom α γ) = (f : BotHom β γ).comp g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[BoundedOrder α]
[BoundedOrder β]
[BoundedOrder γ]
(f : BoundedOrderHom β γ)
(g : BoundedOrderHom α β)


theorem get_length_sub_one {l : List α} (h : l.length - 1 < l.length) :
    l.get ⟨l.length - 1, h⟩ = l.getLast (by rintro rfl; exact Nat.lt_irrefl 0 h)

{α : Type u}
{l : List α}
(h : l.length - 1 < l.length)


/-- If a function `g` is locally integrable, then the convolution `φ i * g` converges almost
everywhere to `g` if `φ i` is a sequence of bump functions with support tending to `0`, provided
that the ratio between the inner and outer radii of `φ i` remains bounded. -/
theorem ae_convolution_tendsto_right_of_locallyIntegrable
    {ι} {φ : ι → ContDiffBump (0 : G)} {l : Filter ι} {K : ℝ}
    (hφ : Tendsto (fun i ↦ (φ i).rOut) l (𝓝 0))
    (h'φ : ∀ᶠ i in l, (φ i).rOut ≤ K * (φ i).rIn) (hg : LocallyIntegrable g μ) : ∀ᵐ x₀ ∂μ,
    Tendsto (fun i ↦ ((φ i).normed μ ⋆[lsmul ℝ ℝ, μ] g) x₀) l (𝓝 (g x₀))

(hφ : Filter.Tendsto (fun i => (φ i).rOut) l (𝓝 0))

(h'φ : ∀ᶠ (i : ι) in l, (φ i).rOut ≤ K * (φ i).rIn)

(hg : MeasureTheory.LocallyIntegrable g μ)

∀ᵐ (x₀ : G) ∂μ, Filter.Tendsto (fun i => ((φ i).normed μ ⋆[ContinuousLinearMap.lsmul ℝ ℝ, μ] g) x₀) l (𝓝 (g x₀))


@[simp]
theorem pow_apply [Monoid R] [BoundedMul R] [ContinuousMul R] (n : ℕ) (f : α →ᵇ R) (x : α) :
    (f ^ n) x = f x ^ n

{α : Type u}
[TopologicalSpace α]
{R : Type u_2}
[PseudoMetricSpace R]
[Monoid R]
[BoundedMul R]
[ContinuousMul R]
(n : ℕ)
(f : BoundedContinuousFunction α R)
(x : α)


@[to_additive]
theorem SMul.smul_eq_hSMul {α β} [SMul α β] : (SMul.smul : α → β → β) = HSMul.hSMul

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


@[simp] theorem isStronglyCoatomic_dual_iff_is_stronglyAtomic :
    IsStronglyCoatomic αᵒᵈ ↔ IsStronglyAtomic α


theorem iSup_eapprox_apply (f : α → ℝ≥0∞) (hf : Measurable f) (a : α) :
    ⨆ n, (eapprox f n : α →ₛ ℝ≥0∞) a = f a

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

⨆ n, ↑(MeasureTheory.SimpleFunc.eapprox f n) a = f a


/-- **Sperner's theorem**. The size of an antichain in `Finset α` is bounded by the size of the
maximal layer in `Finset α`. This precisely means that `Finset α` is a Sperner order. -/
theorem IsAntichain.sperner [Fintype α] {𝒜 : Finset (Finset α)}
    (h𝒜 : IsAntichain (· ⊆ ·) (𝒜 : Set (Finset α))) :
    𝒜.card ≤ (Fintype.card α).choose (Fintype.card α / 2)

(h𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜)


theorem Perm.kinsert {a} {b : β a} {l₁ l₂ : List (Sigma β)} (nd₁ : l₁.NodupKeys) (p : l₁ ~ l₂) :
    kinsert a b l₁ ~ kinsert a b l₂

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{l₁ l₂ : List (Sigma β)}
(nd₁ : l₁.NodupKeys)
(p : l₁.Perm l₂)

(List.kinsert a b l₁).Perm (List.kinsert a b l₂)


@[reassoc (attr := simp)]
theorem rightDistributor_inv_comp_biproduct_π {J : Type} [Fintype J] (f : J → C) (X : C) (j : J) :
    (rightDistributor f X).inv ≫ (biproduct.π _ j ▷ X) = biproduct.π _ j

CategoryTheory.CategoryStruct.comp (CategoryTheory.rightDistributor f X).inv
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.π f j) X) =
  CategoryTheory.Limits.biproduct.π (fun j => CategoryTheory.MonoidalCategory.tensorObj (f j) X) j


theorem Integrable.integral_prod_right [SFinite μ] ⦃f : α × β → E⦄
    (hf : Integrable f (μ.prod ν)) : Integrable (fun y => ∫ x, f (x, y) ∂μ) ν

⦃f : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

MeasureTheory.Integrable (fun y => ∫ (x : α), f (x, y) ∂μ) ν


theorem ge_trans (h₁ : cmp x y ≠ .lt) (h₂ : cmp y z ≠ .lt) : cmp x z ≠ .lt

∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y z : x},
  cmp x_1 y ≠ Ordering.lt → cmp y z ≠ Ordering.lt → cmp x_1 z ≠ Ordering.lt


@[simp]
theorem comp_isOpenMap_iff' (h : X ≃ₜ Y) {f : Y → Z} : IsOpenMap (f ∘ h) ↔ IsOpenMap f

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(h : X ≃ₜ Y)
{f : Y → Z}


theorem sub_smul_slope_vadd (f : k → PE) (a b : k) : (b - a) • slope f a b +ᵥ f a = f b

{k : Type u_1}
{E : Type u_2}
{PE : Type u_3}
[Field k]
[AddCommGroup E]
[Module k E]
[AddTorsor E PE]
(f : k → PE)
(a b : k)


theorem Submodule.isSemisimple_torsionBy_of_irreducible {a : R} (h : Irreducible a) :
    IsSemisimpleModule R (torsionBy R M a)

{R : Type u}
[CommRing R]
[IsPrincipalIdealRing R]
{M : Type v}
[AddCommGroup M]
[Module R M]
{a : R}
(h : Irreducible a)

IsSemisimpleModule R ↥(Submodule.torsionBy R M a)


@[symm]
nonrec theorem symm (H : Homotopic f g) : Homotopic g f

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
{f g : ↑(Ω^ N X x)}
(H : GenLoop.Homotopic f g)


@[csimp] private theorem fix_eq_fixC : @fix = @fixC


theorem card_eq_of_equiv_fin {α : Type*} {n : ℕ} (f : α ≃ Fin n) : Nat.card α = n


theorem edist_dist (x y : α) : edist x y = ENNReal.ofReal (dist x y)

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


@[simp] theorem getD_none : getD none a = a

∀ {α : Type u_1} {a : α}, none.getD a = a


lemma LSeriesSummable.neg {f : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s) :
    LSeriesSummable (-f) s


protected theorem right_le_sup (f g : E →ₗ.[R] F)
    (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : g ≤ f.sup g h

(h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y)


theorem isArtinianRing_iff {R} [Ring R] : IsArtinianRing R ↔ IsArtinian R R


@[simp] lemma coe_weight_mk (χ : L → R) (h) :
    (↑(⟨χ, h⟩ : Weight R L M) : L → R) = χ

{R : Type u_2}
{L : Type u_3}
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(χ : L → R)
(h : LieModule.weightSpace M χ ≠ ⊥)

⇑{ toFun := χ, weightSpace_ne_bot' := h } = χ


@[to_additive]
theorem isCompact_range [TopologicalSpace β] (h : HasCompactMulSupport f)
    (hf : Continuous f) : IsCompact (range f)

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[One β]
{f : α → β}
[TopologicalSpace β]
(h : HasCompactMulSupport f)
(hf : Continuous f)


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

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

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


lemma eq {p q : ℕ} (_hp : CharP R p) (_hq : CharP R q) : p = q

(R : Type u_1)
[AddMonoidWithOne R]
{p q : ℕ}
(_hp : CharP R p)
(_hq : CharP R q)


@[simp]
theorem length_edges {u v : V} (p : G.Walk u v) : p.edges.length = p.length

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


theorem isPiSystem_Iio : IsPiSystem (range Iio : Set (Set α))


@[simp]
theorem snoc_cons : (x ::ᵥ xs).snoc y = x ::ᵥ (xs.snoc y)

{α : Type u_1}
{n : ℕ}
(xs : Mathlib.Vector α n)
{x y : α}


lemma Spec.locallyRingedSpaceObj_sheaf' (R : Type u) [CommRing R] :
    (Spec.locallyRingedSpaceObj <| CommRingCat.of R).sheaf = structureSheaf R

(AlgebraicGeometry.Spec.locallyRingedSpaceObj (CommRingCat.of R)).sheaf = AlgebraicGeometry.Spec.structureSheaf R


theorem not_subset : ¬s ⊆ t ↔ ∃ a ∈ s, a ∉ t


theorem UInt16.toNat_div (x y : UInt16) : (x / y).toNat = x.toNat / y.toNat


@[nontriviality, measurability]
theorem Subsingleton.measurable [Subsingleton α] : Measurable f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[MeasurableSpace α]
[MeasurableSpace β]
[Subsingleton α]


/-- If `H ≤ K`, then `H` as a subgroup of `K` is isomorphic to `H`. -/
@[to_additive (attr := simps) "If `H ≤ K`, then `H` as a subgroup of `K` is isomorphic to `H`."]
def subgroupOfEquivOfLe {G : Type*} [Group G] {H K : Subgroup G} (h : H ≤ K) :
    H.subgroupOf K ≃* H

{G : Type u_7}
[AddGroup G]
{H K : AddSubgroup G}
(h : H ≤ K)
(g : ↥H)

↑↑((AddSubgroup.addSubgroupOfEquivOfLe h).symm g) = ↑g


@[simp, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n


theorem elim_comp_map {f₁ : α → β} {f₂ : β → ε} {g₁ : γ → δ} {g₂ : δ → ε} :
    Sum.elim f₂ g₂ ∘ Sum.map f₁ g₁ = Sum.elim (f₂ ∘ f₁) (g₂ ∘ g₁)

{α : Type u_1}
{β : Type u_2}
{ε : Sort u_3}
{γ : Type u_4}
{δ : Type u_5}
{f₁ : α → β}
{f₂ : β → ε}
{g₁ : γ → δ}
{g₂ : δ → ε}


@[simp]
theorem restrictₗ_apply {_m0 : MeasurableSpace α} (s : Set α) (μ : Measure α) :
    restrictₗ s μ = μ.restrict s

{α : Type u_2}
{_m0 : MeasurableSpace α}
(s : Set α)
(μ : MeasureTheory.Measure α)

(MeasureTheory.Measure.restrictₗ s) μ = μ.restrict s


@[refl]
theorem Subset.refl (a : Set α) : a ⊆ a


theorem hasMFDerivWithinAt_inter' (h : t ∈ 𝓝[s] x) :
    HasMFDerivWithinAt I I' f (s ∩ t) x f' ↔ HasMFDerivWithinAt I I' f s x f'

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


@[simp]
theorem piCongrRight_trans (e : (i : ι) → φ i ≃ₗ[R] ψ i) (f : (i : ι) → ψ i ≃ₗ[R] χ i) :
    (piCongrRight e).trans (piCongrRight f) = piCongrRight fun i => (e i).trans (f i)

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
{ψ : ι → Type u_2}
{χ : ι → Type u_3}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[(i : ι) → AddCommMonoid (ψ i)]
[(i : ι) → Module R (ψ i)]
[(i : ι) → AddCommMonoid (χ i)]
[(i : ι) → Module R (χ i)]
(e : (i : ι) → φ i ≃ₗ[R] ψ i)
(f : (i : ι) → ψ i ≃ₗ[R] χ i)

LinearEquiv.piCongrRight e ≪≫ₗ LinearEquiv.piCongrRight f = LinearEquiv.piCongrRight fun i => e i ≪≫ₗ f i


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

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

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


/-- Given presieve `R` and presheaf `P : Cᵒᵖ ⥤ A`, the natural cone associated to `P` and
    the sieve `Sieve.generate R` generated by `R` is a limit cone iff `Hom (E, P -)` is a
    sheaf of types for the presieve `R` and all `E : A`. -/
theorem isLimit_iff_isSheafFor_presieve :
    Nonempty (IsLimit (P.mapCone (generate R).arrows.cocone.op)) ↔
      ∀ E : Aᵒᵖ, IsSheafFor (P ⋙ coyoneda.obj E) R

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{A : Type u₂}
[CategoryTheory.Category.{v₂, u₂} A]
(P : CategoryTheory.Functor Cᵒᵖ A)
{X : C}
(R : CategoryTheory.Presieve X)

Nonempty (CategoryTheory.Limits.IsLimit (P.mapCone (CategoryTheory.Sieve.generate R).arrows.cocone.op)) ↔
  ∀ (E : Aᵒᵖ), CategoryTheory.Presieve.IsSheafFor (P.comp (CategoryTheory.coyoneda.obj E)) R


@[simp]
theorem rightAdjointMate_id {X : C} [HasRightDual X] : (𝟙 X)ᘁ = 𝟙 (Xᘁ)

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


lemma closedEmbedding {X Y : Scheme} (f : X ⟶ Y)
    [IsClosedImmersion f] : ClosedEmbedding f.1.base

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[AlgebraicGeometry.IsClosedImmersion f]


lemma variableChange_comp (C C' : WeierstrassCurve.VariableChange R) (E : EllipticCurve R) :
    E.variableChange (C.comp C') = (E.variableChange C').variableChange C


@[rclike_simps, norm_cast]
theorem ofReal_ratCast (n : ℚ) : ((n : ℝ) : K) = n


@[simp]
theorem smulRightₗ_apply (f : M₂ →ₗ[R] R) (x : M) (c : M₂) :
    (smulRightₗ : (M₂ →ₗ[R] R) →ₗ[R] M →ₗ[R] M₂ →ₗ[R] M) f x c = f c • x

{R : Type u_1}
{M : Type u_5}
{M₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(f : M₂ →ₗ[R] R)
(x : M)
(c : M₂)

((LinearMap.smulRightₗ f) x) c = f c • x


theorem isMulTwoCocycle_of_twoCocycles (f : twoCocycles (Rep.ofMulDistribMulAction G M)) :
    IsMulTwoCocycle (M := M) (Additive.toMul ∘ f.1)

(f : ↥(groupCohomology.twoCocycles (Rep.ofMulDistribMulAction G M)))

groupCohomology.IsMulTwoCocycle (⇑Additive.toMul ∘ ↑f)


@[simp]
theorem range_projIic : range (projIic a) = univ


@[to_additive (attr := simp)]
theorem coe_refl : ↑(refl M) = id


lemma Scheme.Opens.ι_image_basicOpen (r : Γ(U, ⊤)) :
    U.ι ''ᵁ (U.toScheme.basicOpen r) = X.basicOpen r

(r : ↑((↑U).presheaf.obj (Opposite.op ⊤)))

(AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj ((↑U).basicOpen r) = X.basicOpen r


theorem eval_iterate_derivative_rootMultiplicity {p : R[X]} {t : R} :
    (derivative^[p.rootMultiplicity t] p).eval t =
      (p.rootMultiplicity t).factorial • (p /ₘ (X - C t) ^ p.rootMultiplicity t).eval t

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

Polynomial.eval t ((⇑Polynomial.derivative)^[Polynomial.rootMultiplicity t p] p) =
  (Polynomial.rootMultiplicity t p).factorial •
    Polynomial.eval t (p /ₘ (Polynomial.X - Polynomial.C t) ^ Polynomial.rootMultiplicity t p)