theorem mapRange_add [AddZeroClass N] {f : M → N} {hf : f 0 = 0}
    (hf' : ∀ x y, f (x + y) = f x + f y) (v₁ v₂ : α →₀ M) :
    mapRange f hf (v₁ + v₂) = mapRange f hf v₁ + mapRange f hf v₂

(hf' : ∀ (x y : M), f (x + y) = f x + f y)

Finsupp.mapRange f hf (v₁ + v₂) = Finsupp.mapRange f hf v₁ + Finsupp.mapRange f hf v₂


@[simp, nolint simpNF] protected lemma add_eq_right : a + b = b ↔ a = 0


theorem det_vandermonde_id_eq_superFactorial (n : ℕ) :
    (Matrix.vandermonde (fun (i : Fin (n + 1)) ↦ (i : R))).det = Nat.superFactorial n

(Matrix.vandermonde fun i => ↑↑i).det = ↑n.superFactorial


@[to_additive] lemma MonovaryOn.pow_left (hfg : MonovaryOn f g s) (n : ℕ) :
    MonovaryOn (f ^ n) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hfg : MonovaryOn f g s)
(n : ℕ)


@[simp] lemma le_upperClosure {s : UpperSet α} : s ≤ upperClosure t ↔ t ⊆ s

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


theorem _root_.totallyBounded_Ioo (a b : α) : TotallyBounded (Ioo a b)

{α : Type u}
[PseudoMetricSpace α]
[Preorder α]
[CompactIccSpace α]
(a b : α)


/-- `PProd α β` is equivalent to `PLift α × PLift β` -/
@[simps! apply symm_apply]
def pprodEquivProdPLift : PProd α β ≃ PLift α × PLift β

∀ (a : PProd α β), Equiv.pprodEquivProdPLift a = (Equiv.plift.symm a.fst, Equiv.plift.symm a.snd)


@[refl]
theorem refl (v : VectorMeasure α M) : v ≪ᵥ v

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)


theorem forall₂_swap
    {ι₁ ι₂ : Sort*} {κ₁ : ι₁ → Sort*} {κ₂ : ι₂ → Sort*} {p : ∀ i₁, κ₁ i₁ → ∀ i₂, κ₂ i₂ → Prop} :
    (∀ i₁ j₁ i₂ j₂, p i₁ j₁ i₂ j₂) ↔ ∀ i₂ j₂ i₁ j₁, p i₁ j₁ i₂ j₂

{p : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Prop}

(∀ (i₁ : ι₁) (j₁ : κ₁ i₁) (i₂ : ι₂) (j₂ : κ₂ i₂), p i₁ j₁ i₂ j₂) ↔
  ∀ (i₂ : ι₂) (j₂ : κ₂ i₂) (i₁ : ι₁) (j₁ : κ₁ i₁), p i₁ j₁ i₂ j₂


@[simp]
theorem det_toMatrix (b : Basis ι A M) (f : M →ₗ[A] M) :
    Matrix.det (toMatrix b b f) = LinearMap.det f

{M : Type u_2}
[AddCommGroup M]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
{A : Type u_5}
[CommRing A]
[Module A M]
(b : Basis ι A M)
(f : M →ₗ[A] M)

((LinearMap.toMatrix b b) f).det = LinearMap.det f


@[simp] lemma mop_whiskerLeft (X : C) {Y Z : C} (f : Y ⟶ Z) :
    (X ◁ f).mop = f.mop ▷ mop X

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

(CategoryTheory.MonoidalCategory.whiskerLeft X f).mop =
  CategoryTheory.MonoidalCategory.whiskerRight f.mop { unmop := X }


theorem IsLocalMinOn.not_nhds_le_map [TopologicalSpace β] (hf : IsLocalMinOn f s a)
    [NeBot (𝓝[<] f a)] : ¬𝓝 (f a) ≤ map f (𝓝[s] a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
[TopologicalSpace β]
(hf : IsLocalMinOn f s a)
[(𝓝[<] f a).NeBot]


@[simp]
theorem ack_zero (n : ℕ) : ack 0 n = n + 1


@[simp]
theorem substructureEquivMap_apply (f : M ↪[L] N) (p : L.Substructure M) (x : p) :
    (f.substructureEquivMap p x : N) = f x

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(f : L.Embedding M N)
(p : L.Substructure M)
(x : ↥p)


theorem mem_unique : ∀ {a b : α} {o : Part α}, a ∈ o → b ∈ o → a = b


@[to_additive]
theorem NeBot.of_smul_right : (f • g).NeBot → g.NeBot

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


theorem denseRange_iff_closure_range : DenseRange f ↔ closure (range f) = univ

{X : Type u_1}
[TopologicalSpace X]
{α : Type u_4}
{f : α → X}

DenseRange f ↔ closure (Set.range f) = Set.univ


/-- Postcomposing by the identity does not change the cone up to isomorphism. -/
@[simps!]
def postcomposeId : postcompose (𝟙 F) ≅ 𝟭 (Cone F)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(X : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.Cones.postcomposeId.hom.app X).hom = 𝟙 X.pt


theorem foldl_loop_eq (f : α → Fin n → α) (x) : foldl.loop n f x n = x

{α : Sort u_1}
{n : Nat}
(f : α → Fin n → α)
(x : α)


/-- To construct a morphism of structured arrows,
we need a morphism of the objects underlying the target,
and to check that the triangle commutes.
-/
@[simps]
def homMk {f f' : StructuredArrow S T} (g : f.right ⟶ f'.right)
    (w : f.hom ≫ T.map g = f'.hom := by aesop_cat) : f ⟶ f'

{f f' : CategoryTheory.StructuredArrow S T}

(w : CategoryTheory.CategoryStruct.comp f.hom (T.map g) = f'.hom := by aesop_cat)

(CategoryTheory.StructuredArrow.homMk g w).left = CategoryTheory.CategoryStruct.id f.left


@[simp]
theorem incl_range : K.incl.range = K

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(K : LieSubalgebra R L)


lemma div_nonpos_of_nonpos_of_nonneg {a b : EReal} (h : a ≤ 0) (h' : 0 ≤ b) : a / b ≤ 0


@[simp]
theorem mapOfLE_valuation_apply (R S : ValuationSubring K) (h : R ≤ S) (x : K) :
    R.mapOfLE S h (R.valuation x) = S.valuation x

{K : Type u}
[Field K]
(R S : ValuationSubring K)
(h : R ≤ S)
(x : K)

(R.mapOfLE S h) (R.valuation x) = S.valuation x


theorem IsSeparatedMap.isClosed_eqLocus (he : f ∘ g₁ = f ∘ g₂) : IsClosed {a | g₁ a = g₂ a}

{X : Type u_3}
{Y : Type u_2}
{A : Type u_1}
[TopologicalSpace X]
[TopologicalSpace A]
{f : X → Y}
(sep : IsSeparatedMap f)
{g₁ g₂ : A → X}
(h₁ : Continuous g₁)
(h₂ : Continuous g₂)
(he : f ∘ g₁ = f ∘ g₂)


@[reassoc]
lemma D₂_totalShift₂XIso_hom (n₀ n₁ n₀' n₁' : ℤ) (h₀ : n₀ + y = n₀') (h₁ : n₁ + y = n₁') :
    ((shiftFunctor₂ C y).obj K).D₂ (up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
      y.negOnePow • ((K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₂ (up ℤ) n₀' n₁')

(K : HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ))

((HomologicalComplex₂.shiftFunctor₂ C y).obj K).D₂ (ComplexShape.up ℤ) n₀ n₁ ≫ (K.totalShift₂XIso y n₁ n₁' h₁).hom =
  y.negOnePow • (K.totalShift₂XIso y n₀ n₀' h₀).hom ≫ K.D₂ (ComplexShape.up ℤ) n₀' n₁'


/-- For a regular topological space with second countable topology,
there exists an inducing map to `l^∞ = ℕ →ᵇ ℝ`. -/
theorem exists_inducing_l_infty : ∃ f : X → ℕ →ᵇ ℝ, Inducing f

(X : Type u_1)
[TopologicalSpace X]
[RegularSpace X]
[SecondCountableTopology X]


theorem pow_add_pow (hxy : p ∣ x + y) (hx : ¬p ∣ x) {n : ℕ} (hn : Odd n) :
    padicValNat p (x ^ n + y ^ n) = padicValNat p (x + y) + padicValNat p n

{x y p : ℕ}
[hp : Fact (Nat.Prime p)]
(hp1 : Odd p)
(hxy : p ∣ x + y)
(hx : ¬p ∣ x)
{n : ℕ}
(hn : Odd n)


@[simp]
theorem row_add [Add α] (v w : m → α) : row ι (v + w) = row ι v + row ι w

{m : Type u_2}
{α : Type v}
{ι : Type u_6}
[Add α]
(v w : m → α)

Matrix.row ι (v + w) = Matrix.row ι v + Matrix.row ι w


@[simp]
theorem add_closure_iUnion_range_single :
    AddSubmonoid.closure (⋃ i : ι, Set.range (single i : β i → Π₀ i, β i)) = ⊤

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]

AddSubmonoid.closure (⋃ i, Set.range (DFinsupp.single i)) = ⊤


@[simp]
theorem lsub_sum {α : Type u} {β : Type v} (f : α ⊕ β → Ordinal) :
    lsub.{max u v, w} f =
      max (lsub.{u, max v w} fun a => f (Sum.inl a)) (lsub.{v, max u w} fun b => f (Sum.inr b))

{α : Type u}
{β : Type v}
(f : α ⊕ β → Ordinal.{max (max u v) w})

Ordinal.lsub f = max (Ordinal.lsub fun a => f (Sum.inl a)) (Ordinal.lsub fun b => f (Sum.inr b))


theorem List.applyId_eq_self [DecidableEq α] {xs ys : List α} (x : α) :
    x ∉ xs → List.applyId.{u} (xs.zip ys) x = x

{α : Type u}
[DecidableEq α]
{xs ys : List α}
(x : α)

x ∉ xs → SlimCheck.InjectiveFunction.List.applyId (xs.zip ys) x = x


@[simp] theorem coe_toReal (r : ℝ≥0) : (r : ℝ≥0∞).toReal = r


theorem ediam_univ (h : α ≃ᵢ β) : EMetric.diam (univ : Set α) = EMetric.diam (univ : Set β)

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

EMetric.diam Set.univ = EMetric.diam Set.univ


@[simp]
theorem partialSups_zero (f : ℕ → α) : partialSups f 0 = f 0

{α : Type u_1}
[SemilatticeSup α]
(f : ℕ → α)


@[reassoc]
theorem conePointsIsoOfNatIso_hom_comp {F G : J ⥤ C} {s : Cone F} {t : Cone G} (P : IsLimit s)
    (Q : IsLimit t) (w : F ≅ G) (j : J) :
    (conePointsIsoOfNatIso P Q w).hom ≫ t.π.app j = s.π.app j ≫ w.hom.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
{s : CategoryTheory.Limits.Cone F}
{t : CategoryTheory.Limits.Cone G}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)
(w : F ≅ G)
(j : J)

(P.conePointsIsoOfNatIso Q w).hom ≫ t.π.app j = s.π.app j ≫ w.hom.app j


@[to_additive]
theorem mk_eq_monoidOf_mk'_apply (x y) : mk x y = (monoidOf S).mk' x y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
(x : M)
(y : ↥S)

Localization.mk x y = (Localization.monoidOf S).mk' x y


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_prod (U : OpenSubgroup G) (V : OpenSubgroup H) :
    (U.prod V : Subgroup (G × H)) = (U : Subgroup G).prod V

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{H : Type u_2}
[Group H]
[TopologicalSpace H]
(U : OpenSubgroup G)
(V : OpenSubgroup H)


/-- If `G : D ⥤ C` is a right adjoint it satisfies the solution set condition.  -/
theorem solutionSetCondition_of_isRightAdjoint [G.IsRightAdjoint] : SolutionSetCondition G

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


@[simp]
theorem restrict_apply_mk (f : C(α, β)) (s : Set α) (x : α) (hx : x ∈ s) :
    f.restrict s ⟨x, hx⟩ = f x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
(s : Set α)
(x : α)
(hx : x ∈ s)

(ContinuousMap.restrict s f) ⟨x, hx⟩ = f x


@[simp] theorem takeWhile_append_dropWhile (p : α → Bool) :
    ∀ (l : List α), takeWhile p l ++ dropWhile p l = l

{α : Type u_1}
(p : α → Bool)
(l : List α)

List.takeWhile p l ++ List.dropWhile p l = l


@[to_additive]
theorem mul_comp [Mul M] [Mul N] [CommSemigroup P] (g₁ g₂ : N →ₙ* P) (f : M →ₙ* N) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f

{M : Type u_3}
{N : Type u_4}
{P : Type u_5}
[Add M]
[Add N]
[AddCommSemigroup P]
(g₁ g₂ : AddHom N P)
(f : AddHom M N)

(g₁ + g₂).comp f = g₁.comp f + g₂.comp f


lemma find_pos (h : ∃ n : ℕ, p n) : 0 < Nat.find h ↔ ¬p 0

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


@[simp]
theorem sumDualDistrib_symm_inr : (sumDualDistrib α β).symm (inr (toDual b)) = toDual (inr b)

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
(b : β)

(OrderIso.sumDualDistrib α β).symm (Sum.inr (OrderDual.toDual b)) = OrderDual.toDual (Sum.inr b)


lemma cliqueSet_eq_image [NoAccidental t] : (graph t).cliqueSet 3 = toTriangle '' t

(SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3 = ⇑SimpleGraph.TripartiteFromTriangles.toTriangle '' ↑t


/-- The spectrum of a commutative ring, as a `LocallyRingedSpace`.
-/
@[simps! toSheafedSpace presheaf]
def Spec.locallyRingedSpaceObj (R : CommRingCat.{u}) : LocallyRingedSpace

(AlgebraicGeometry.Spec.locallyRingedSpaceObj R).toSheafedSpace = AlgebraicGeometry.Spec.sheafedSpaceObj R


@[deprecated nhds_nhdsAdjoint_of_ne (since := "2024-02-10")]
theorem nhdsAdjoint_nhds_of_ne (a : α) (f : Filter α) {b : α} (h : b ≠ a) :
    @nhds α (nhdsAdjoint a f) b = pure b

{α : Type u}
(a : α)
(f : Filter α)
{b : α}
(h : b ≠ a)


/-- The default cost structure, for which all operations cost `1`. -/
@[simps]
def defaultCost [DecidableEq α] : Cost α α ℕ

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

Levenshtein.defaultCost.substitute a b = if a = b then 0 else 1


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

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

∑ x ∈ s.disjiUnion t h, f x = ∑ i ∈ s, ∑ x ∈ t i, f x


theorem eq_re_of_ofReal_le {r : ℝ} {z : ℂ} (hz : (r : ℂ) ≤ z) : z = z.re


protected theorem sup_comm (s : Finset β) (t : Finset γ) (f : β → γ → α) :
    (s.sup fun b => t.sup (f b)) = t.sup fun c => s.sup fun b => f b c

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeSup α]
[OrderBot α]
(s : Finset β)
(t : Finset γ)
(f : β → γ → α)


protected theorem mul_ediv_assoc (a : Int) : ∀ {b c : Int}, c ∣ b → (a * b) / c = a * (b / c)


/-- The equation that characterizes `enumOrd` definitionally. This isn't the nicest expression to
    work with, so consider using `enumOrd_def` instead. -/
theorem enumOrd_def' (o) :
    enumOrd S o = sInf (S ∩ Set.Ici (blsub.{u, u} o fun a _ => enumOrd S a))

Ordinal.enumOrd S o = sInf (S ∩ Set.Ici (o.blsub fun a x => Ordinal.enumOrd S a))


theorem stmts_supportsStmt {M : Λ → Stmt₁} {S : Finset Λ} {q : Stmt₁} (ss : Supports M S) :
    some q ∈ stmts M S → SupportsStmt S q

{Γ : Type u_1}
{Λ : Type u_2}
{σ : Type u_3}
[Inhabited Λ]
{M : Λ → Turing.TM1.Stmt Γ Λ σ}
{S : Finset Λ}
{q : Turing.TM1.Stmt Γ Λ σ}
(ss : Turing.TM1.Supports M S)

some q ∈ Turing.TM1.stmts M S → Turing.TM1.SupportsStmt S q


@[simp]
theorem NatTrans.leftDerived_id (F : C ⥤ D) [F.Additive] (n : ℕ) :
    NatTrans.leftDerived (𝟙 F) n = 𝟙 (F.leftDerived n)

CategoryTheory.NatTrans.leftDerived (CategoryTheory.CategoryStruct.id F) n =
  CategoryTheory.CategoryStruct.id (F.leftDerived n)


/-- Multiplicative congruence relations preserve natural powers. -/
@[to_additive "Additive congruence relations preserve natural scaling."]
protected theorem pow {M : Type*} [Monoid M] (c : Con M) :
    ∀ (n : ℕ) {w x}, c w x → c (w ^ n) (x ^ n)

{M : Type u_4}
[Monoid M]
(c : Con M)
(n : ℕ)
{w x : M}


lemma rnDeriv_pos' [SigmaFinite μ] [SFinite ν] (hμν : μ ≪ ν) :
    ∀ᵐ x ∂μ, 0 < ν.rnDeriv μ x

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


@[simp]
theorem inverseAssociator_obj_inr_inl (X) :
    (inverseAssociator C D E).obj (inr (inl X)) = inl (inr X)

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

(CategoryTheory.sum.inverseAssociator C D E).obj (Sum.inr (Sum.inl X)) = Sum.inl (Sum.inr X)


theorem decide_true {p : Prop} [Decidable p] : p → decide p


theorem le_closure_iff (x y : α) : x ≤ u (l y) ↔ u (l x) ≤ u (l y)

{α : Type u_1}
{β : Type u_4}
[PartialOrder α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)
(x y : α)

x ≤ u (l.toFun y) ↔ u (l.toFun x) ≤ u (l.toFun y)


/-- A form of the **equality case of Jensen's equality**.

For a strictly concave function `f` and positive weights `w`, if
`f (∑ i ∈ t, w i • p i) = ∑ i ∈ t, w i • f (p i)`, then the points `p` are all equal.

See also `StrictConcaveOn.map_sum_eq_iff`. -/
lemma StrictConcaveOn.eq_of_map_sum_eq (hf : StrictConcaveOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 < w i)
    (h₁ : ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s)
    (h_eq : f (∑ i ∈ t, w i • p i) ≤ ∑ i ∈ t, w i • f (p i)) :
    ∀ ⦃j⦄, j ∈ t → ∀ ⦃k⦄, k ∈ t → p j = p k


@[simp] theorem and_iff_left_iff_imp  : ∀(a b : Bool), ((a && b) = a) ↔ (a → b)


theorem integral_comp_mul_left (g : ℝ → F) (a : ℝ) :
    (∫ x : ℝ, g (a * x)) = |a⁻¹| • ∫ y : ℝ, g y

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(g : ℝ → F)
(a : ℝ)

∫ (x : ℝ), g (a * x) = |a⁻¹| • ∫ (y : ℝ), g y


@[continuity]
theorem Continuous.Prod.mk (x : X) : Continuous fun y : Y => (x, y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(x : X)


@[simp] theorem toBialgEquiv_refl : toBialgEquiv (.refl X) = .refl _ _

{R : Type u}
[CommRing R]
{X : BialgebraCat R}

(CategoryTheory.Iso.refl X).toBialgEquiv = BialgEquiv.refl R ↑X.toBundled


theorem X_pow_sub_C_irreducible_of_prime_pow
    {p : ℕ} (hp : p.Prime) (hp' : p ≠ 2) (n : ℕ) {a : K} (ha : ∀ b : K, b ^ p ≠ a) :
    Irreducible (X ^ (p ^ n) - C a)

{K : Type u}
[Field K]
{p : ℕ}
(hp : Nat.Prime p)
(hp' : p ≠ 2)
(n : ℕ)
{a : K}
(ha : ∀ (b : K), b ^ p ≠ a)

Irreducible (Polynomial.X ^ p ^ n - Polynomial.C a)


theorem ediam_image_le (hf : HolderWith C r f) (s : Set X) :
    EMetric.diam (f '' s) ≤ (C : ℝ≥0∞) * EMetric.diam s ^ (r : ℝ)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
(hf : HolderWith C r f)
(s : Set X)

EMetric.diam (f '' s) ≤ ↑C * EMetric.diam s ^ ↑r


theorem aeval_root (h : IsAdjoinRoot S f) : aeval h.root f = 0

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRoot S f)


/-- Given an open cover `{ Zᵢ }` of `Z`, then `X ×[Z] Y` is covered by `Xᵢ ×[Zᵢ] Yᵢ`, where
  `Xᵢ = X ×[Z] Zᵢ` and `Yᵢ = Y ×[Z] Zᵢ` is the preimage of `Zᵢ` in `X` and `Y`. -/
@[simps! J obj map]
def openCoverOfBase (𝒰 : OpenCover Z) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)

{X Y Z : AlgebraicGeometry.Scheme}
(𝒰 : Z.OpenCover)
(f : X ⟶ Z)
(g : Y ⟶ Z)
(i : 𝒰.J)

(AlgebraicGeometry.Scheme.Pullback.openCoverOfBase 𝒰 f g).obj i =
  CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.snd f (𝒰.map i))
    (CategoryTheory.Limits.pullback.snd g (𝒰.map i))


theorem toNNRat_add_le : toNNRat (q + p) ≤ toNNRat q + toNNRat p


@[to_additive]
theorem tprod_le_of_prod_range_le (hf : Multipliable f) (h : ∀ n, ∏ i ∈ range n, f i ≤ c) :
    ∏' n, f n ≤ c

(h : ∀ (n : ℕ), ∏ i ∈ Finset.range n, f i ≤ c)


/-- The `averageMap` acts as the identity on the subspace of invariants.
-/
theorem averageMap_id (v : V) (hv : v ∈ invariants ρ) : averageMap ρ v = v

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
[CommSemiring k]
[Group G]
[AddCommMonoid V]
[Module k V]
(ρ : Representation k G V)
[Fintype G]
[Invertible ↑(Fintype.card G)]
(v : V)
(hv : v ∈ ρ.invariants)


/-- The projection from a trivial fiber bundle to its base is open. -/
protected theorem isOpenMap_proj (h : IsHomeomorphicTrivialFiberBundle F proj) :
    IsOpenMap proj


theorem comap_smul' (f : V →ₗ[K] V₂) (p : Submodule K V₂) (a : K) :
    p.comap (a • f) = ⨅ _ : a ≠ 0, p.comap f

{K : Type u_9}
{V : Type u_10}
{V₂ : Type u_11}
[Semifield K]
[AddCommMonoid V]
[Module K V]
[AddCommMonoid V₂]
[Module K V₂]
(f : V →ₗ[K] V₂)
(p : Submodule K V₂)
(a : K)

Submodule.comap (a • f) p = ⨅ (_ : a ≠ 0), Submodule.comap f p


theorem nadd_lt_nadd_left (h : b < c) (a) : a ♯ b < a ♯ c

{b c : Ordinal.{u}}
(h : b < c)
(a : Ordinal.{u})


@[simp]
lemma ltByCases_gt (h : y < x) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
    ltByCases x y h₁ h₂ h₃ = h₃ h

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : y < x)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}


@[simp]
theorem sameCycle_pow_right {n : ℕ} : SameCycle f x ((f ^ n) y) ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
{n : ℕ}

f.SameCycle x ((f ^ n) y) ↔ f.SameCycle x y


theorem sign_pow (x : α) (n : ℕ) : sign (x ^ n) = sign x ^ n

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

SignType.sign (x ^ n) = SignType.sign x ^ n


private lemma if_exact : Function.Exact (LinearMap.ker f).subtype f

{R : Type u}
[CommRing R]
(M : Type u)
[AddCommGroup M]
[Module R M]
{ι : Type}
(f : (ι → R) →ₗ[R] M)

Function.Exact ⇑(LinearMap.ker f).subtype ⇑f


theorem isIntegral_of_irreducibleSpace_of_isReduced [IsReduced X] [H : IrreducibleSpace X] :
    IsIntegral X

[H : IrreducibleSpace ↑↑X.toPresheafedSpace]


/-- Any ascending central series for a group is bounded above by the upper central series. -/
theorem ascending_central_series_le_upper (H : ℕ → Subgroup G) (hH : IsAscendingCentralSeries H) :
    ∀ n : ℕ, H n ≤ upperCentralSeries G n

{G : Type u_1}
[Group G]
(H : ℕ → Subgroup G)
(hH : IsAscendingCentralSeries H)
(n : ℕ)


@[simp] lemma shiftr_eq_shiftRight (p : PosNum) (n : Nat) : p.shiftr n = p >>> n


/-- The factorisation of a morphism through its abelian image. -/
@[simps]
def imageMonoFactorisation {X Y : C} (f : X ⟶ Y) : MonoFactorisation f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Limits.HasKernels C]
[CategoryTheory.Limits.HasCokernels C]
{X Y : C}
(f : X ⟶ Y)

(CategoryTheory.Abelian.OfCoimageImageComparisonIsIso.imageMonoFactorisation f).I = CategoryTheory.Abelian.image f


theorem mk_univ_quaternionAlgebra_of_infinite [Infinite R] :
    #(Set.univ : Set ℍ[R,c₁,c₂]) = #R


@[simps]
instance : SMul S (torsion' R M S)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(S : Type u_3)
[CommMonoid S]
[DistribMulAction S M]
[SMulCommClass S R M]
(s : S)
(x : ↥(Submodule.torsion' R M S))


@[simp] theorem length_push (c : Char) : (String.push s c).length = s.length + 1


protected theorem le_sub_left_of_add_le {a b c : Int} (h : a + b ≤ c) : b ≤ c - a


@[simp] theorem reverse_reverse (as : List α) : as.reverse.reverse = as


@[simp]
theorem mul_one_hom {Z : C} (f : Z ⟶ M.X) : (f ⊗ M.one) ≫ M.mul = (ρ_ Z).hom ≫ f

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


theorem right_nonuniformWitnesses_card (h : ¬G.IsUniform ε s t) :
    (t.card : 𝕜) * ε ≤ (G.nonuniformWitnesses ε s t).2.card

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

↑t.card * ε ≤ ↑(G.nonuniformWitnesses ε s t).2.card


theorem IsMaxOn.inter (hf : IsMaxOn f s a) (t) : IsMaxOn f (s ∩ t) a

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsMaxOn f s a)
(t : Set α)


theorem apply_total (f : M →ₗ[R] M') (v) (l : α →₀ R) :
    f (Finsupp.total α M R v l) = Finsupp.total α M' R (f ∘ v) l

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_8}
[AddCommMonoid M']
[Module R M']
(f : M →ₗ[R] M')
(v : α → M)
(l : α →₀ R)

f ((Finsupp.total α M R v) l) = (Finsupp.total α M' R (⇑f ∘ v)) l


protected theorem eq_zero_or_eq_zero_of_mul_eq_zero {a b : ℤ} (h : a * b = 0) : a = 0 ∨ b = 0


@[simp]
theorem normalizedFactors_pow {x : α} (n : ℕ) :
    normalizedFactors (x ^ n) = n • normalizedFactors x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
{x : α}
(n : ℕ)

UniqueFactorizationMonoid.normalizedFactors (x ^ n) = n • UniqueFactorizationMonoid.normalizedFactors x


theorem Cofix.bisim' {α : Type*} (Q : α → Prop) (u v : α → Cofix F)
    (h : ∀ x, Q x → ∃ a f f', Cofix.dest (u x) = abs ⟨a, f⟩ ∧ Cofix.dest (v x) = abs ⟨a, f'⟩ ∧
      ∀ i, ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x') :
    ∀ x, Q x → u x = v x

(h :
  ∀ (x : α),
    Q x →
      ∃ a f f',
        (u x).dest = QPF.abs ⟨a, f⟩ ∧
          (v x).dest = QPF.abs ⟨a, f'⟩ ∧ ∀ (i : (QPF.P F).B a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x')


@[simp, norm_cast]
lemma cast_list_sum [AddGroupWithOne β] (s : List ℤ) : (↑s.sum : β) = (s.map (↑)).sum

{β : Type u_3}
[AddGroupWithOne β]
(s : List ℤ)


theorem IsSuccLimit.isMin_of_noMax [NoMaxOrder α] (h : IsSuccLimit a) : IsMin a

{α : Type u_1}
[Preorder α]
{a : α}
[SuccOrder α]
[IsSuccArchimedean α]
[NoMaxOrder α]
(h : Order.IsSuccLimit a)


theorem C_eq_natCast (n : ℕ) : C (n : R) = (n : R[X])


@[to_additive (attr := simp)]
theorem Set.range_one {α β : Type*} [One β] [Nonempty α] : Set.range (1 : α → β) = {1}

{α : Type u_3}
{β : Type u_4}
[Zero β]
[Nonempty α]


@[to_additive]
theorem mulIndicator_comp_of_one {g : M → N} (hg : g 1 = 1) :
    mulIndicator s (g ∘ f) = g ∘ mulIndicator s f

{α : Type u_1}
{M : Type u_4}
{N : Type u_5}
[Zero M]
[Zero N]
{s : Set α}
{f : α → M}
{g : M → N}
(hg : g 0 = 0)


@[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeGroup β) (x y : FreeGroup α) : x * y >>= f = (x >>= f) * (y >>= f)

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


theorem map₂_left_comm {m : α → δ → ε} {n : β → γ → δ} {m' : α → γ → δ'} {n' : β → δ' → ε}
    (h_left_comm : ∀ a b c, m a (n b c) = n' b (m' a c)) :
    map₂ m f (map₂ n g h) = map₂ n' g (map₂ m' f h)

{m : α → δ → ε}

{n : β → γ → δ}

(h_left_comm : ∀ (a : α) (b : β) (c : γ), m a (n b c) = n' b (m' a c))

Filter.map₂ m f (Filter.map₂ n g h) = Filter.map₂ n' g (Filter.map₂ m' f h)


theorem nhds_nhdsAdjoint [DecidableEq α] (a : α) (f : Filter α) :
    @nhds α (nhdsAdjoint a f) = update pure a (pure a ⊔ f)

{α : Type u}
[DecidableEq α]
(a : α)
(f : Filter α)


theorem hasBasis_compactConvergenceUniformity_of_compact :
    HasBasis (𝓤 C(α, β)) (fun V : Set (β × β) => V ∈ 𝓤 β) fun V =>
      { fg : C(α, β) × C(α, β) | ∀ x, (fg.1 x, fg.2 x) ∈ V }

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
[CompactSpace α]

(𝓤 C(α, β)).HasBasis (fun V => V ∈ 𝓤 β) fun V => {fg | ∀ (x : α), (fg.1 x, fg.2 x) ∈ V}


@[simp] lemma sum_basis_iff {M : Matroid α} {N : Matroid β} {I X : Set (α ⊕ β)} :
    (M.sum N).Basis I X ↔
      (M.Basis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.Basis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X))

{α : Type u}
{β : Type v}
{M : Matroid α}
{N : Matroid β}
{I X : Set (α ⊕ β)}

(M.sum N).Basis I X ↔ M.Basis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.Basis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X)


@[to_additive (attr := simp)]
lemma inf'_inv [SemilatticeInf β] {s : Finset α} (hs : s⁻¹.Nonempty) (f : α → β) :
    inf' s⁻¹ hs f = inf' s hs.of_inv (f ·⁻¹)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Neg α]
[SemilatticeInf β]
{s : Finset α}
(hs : (-s).Nonempty)
(f : α → β)

(-s).inf' hs f = s.inf' ⋯ fun x => f (-x)


@[simp] theorem bitIndices_two_mul (n : ℕ) :
    bitIndices (2 * n) = (bitIndices n).map (· + 1)

(2 * n).bitIndices = List.map (fun x => x + 1) n.bitIndices


/-- Constructively countable type. Made from an explicit injection `encode : α → ℕ` and a partial
inverse `decode : ℕ → Option α`. Note that finite types *are* countable. See `Denumerable` if you
wish to enforce infiniteness. -/
class Encodable (α : Type*) where
  /-- Encoding from Type α to ℕ -/
  encode : α → ℕ
  -- Porting note: was `decode [] : ℕ → Option α`. This means that `decode` does not take the type
  --explicitly in Lean4
  /-- Decoding from ℕ to Option α-/
  decode : ℕ → Option α
  /-- Invariant relationship between encoding and decoding-/
  encodek : ∀ a, decode (encode a) = some a

{α : Type u_1}
[self : Encodable α]
(a : α)

Encodable.decode (Encodable.encode a) = some a


/-- A language map defined on two factors of a sum. -/
@[simps]
protected def sumElim : L.sum L'' →ᴸ L'

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(ϕ : L →ᴸ L')
{L'' : FirstOrder.Language}
(ψ : L'' →ᴸ L')
(_n : ℕ)

∀ (a : L.Functions _n ⊕ L''.Functions _n),
  (ϕ.sumElim ψ).onFunction a = Sum.elim (fun f => ϕ.onFunction f) (fun f => ψ.onFunction f) a


theorem integral_cexp_neg_mul_sq_add_real_mul_I (hb : 0 < b.re) (c : ℝ) :
    ∫ x : ℝ, cexp (-b * (x + c * I) ^ 2) = (π / b) ^ (1 / 2 : ℂ)


@[simp, nolint simpNF] -- linter times out
theorem gradedComm_one : gradedComm R 𝒜 ℬ 1 = 1

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]


/-- If `E / F` is both purely inseparable and separable, then `algebraMap F E` is surjective. -/
theorem IsPurelyInseparable.surjective_algebraMap_of_isSeparable
    [IsPurelyInseparable F E] [Algebra.IsSeparable F E] : Function.Surjective (algebraMap F E)

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[IsPurelyInseparable F E]
[Algebra.IsSeparable F E]


/-- A choice-free shortcut instance. -/
@[to_additive "A choice-free shortcut instance."]
theorem OrderedCommGroup.to_contravariantClass_left_le (α : Type u) [OrderedCommGroup α] :
    ContravariantClass α α (· * ·) (· ≤ ·)

ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1


theorem nonempty_biUnion {t : Set α} {s : α → Set β} :
    (⋃ i ∈ t, s i).Nonempty ↔ ∃ i ∈ t, (s i).Nonempty

{α : Type u_1}
{β : Type u_2}
{t : Set α}
{s : α → Set β}


lemma exists_succAbove_eq {x y : Fin (n + 1)} (h : x ≠ y) : ∃ z, y.succAbove z = x


theorem le_of_mul_le_mul_right {a b c : Int} (w : b * a ≤ c * a) (h : 0 < a) : b ≤ c


@[to_additive (attr := simp)]
protected theorem inv_le_inv_iff : f⁻¹ ≤ g⁻¹ ↔ f ≤ g

{α : Type u_2}
[InvolutiveInv α]
{f g : Filter α}

f⁻¹ ≤ g⁻¹ ↔ f ≤ g


theorem Hom.cast_eq_cast {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟶ v) :
    e.cast hu hv = _root_.cast (by {rw [hu, hv]}) e

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


protected theorem dist_comm (x y : ∀ n, E n) : dist x y = dist y x

{E : ℕ → Type u_1}
(x y : (n : ℕ) → E n)


theorem id_apply (x : L₁) : (id : L₁ →ₗ⁅R⁆ L₁) x = x

{R : Type u}
{L₁ : Type v}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
(x : L₁)


@[simp]
theorem sym_zero : s.sym 0 = {∅}

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


@[to_additive]
theorem measurableEmbedding_inv [InvolutiveInv α] [MeasurableInv α] :
    MeasurableEmbedding (Inv.inv (α := α))

{α : Type u_3}
{m : MeasurableSpace α}
[InvolutiveInv α]
[MeasurableInv α]


@[to_additive]
lemma mem_stabilizer_finset_iff_subset_smul_finset {s : Finset α} :
    a ∈ stabilizer G s ↔ s ⊆ a • s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{a : G}
[DecidableEq α]
{s : Finset α}

a ∈ MulAction.stabilizer G s ↔ s ⊆ a • s


theorem linearIndependent_X : LinearIndependent R (X : σ → MvPolynomial σ R)

(σ : Type u)
(R : Type v)
[CommSemiring R]


/-- Mixin for a `VectorBundleCore` stating smoothness (of transition functions). -/
class IsSmooth (IB : ModelWithCorners 𝕜 EB HB) : Prop where
  smoothOn_coordChange :
    ∀ i j, SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (Z.coordChange i j) (Z.baseSet i ∩ Z.baseSet j)

{𝕜 : Type u_1}
{B : Type u_2}
{F : Type u_4}
[NontriviallyNormedField 𝕜]
{EB : Type u_7}
[NormedAddCommGroup EB]
[NormedSpace 𝕜 EB]
{HB : Type u_8}
[TopologicalSpace HB]
[TopologicalSpace B]
[ChartedSpace HB B]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_11}
{Z : VectorBundleCore 𝕜 B F ι}
{IB : ModelWithCorners 𝕜 EB HB}
[self : Z.IsSmooth IB]
(i j : ι)


theorem map_smul_inv {σ' : S →+* R} [RingHomInvPair σ σ'] (c : S) (x : M) :
    c • f x = f (σ' c • x)

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
{F : Type u_17}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
(f : F)
[FunLike F M M₃]
[SemilinearMapClass F σ M M₃]
{σ' : S →+* R}
[RingHomInvPair σ σ']
(c : S)
(x : M)


theorem degree_C_le (a : R) : (C a).degree ≤ 0


@[simp] theorem eraseP_nil : [].eraseP p = []

∀ {α : Type u_1} {p : α → Bool}, List.eraseP p [] = []


@[simp]
theorem reduct_withConstants :
    (L.lhomWithConstants A).substructureReduct (S.withConstants h) = S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{S : L.Substructure M}
{A : Set M}
(h : A ⊆ ↑S)

(L.lhomWithConstants ↑A).substructureReduct (S.withConstants h) = S


theorem closedEmbedding_coe_real : ClosedEmbedding ((↑) : ℤ → ℝ)


/-- When `S₁.f`, `S₁.g`, `S₂.f` and `S₂.g` are all zero, the action on homology of a
morphism `φ : S₁ ⟶ S₂` is given by the action `φ.τ₂` on the middle objects. -/
@[simps]
def ofZeros (φ : S₁ ⟶ S₂) (hf₁ : S₁.f = 0) (hg₁ : S₁.g = 0) (hf₂ : S₂.f = 0) (hg₂ : S₂.g = 0) :
    HomologyMapData φ (HomologyData.ofZeros S₁ hf₁ hg₁) (HomologyData.ofZeros S₂ hf₂ hg₂)

(CategoryTheory.ShortComplex.HomologyMapData.ofZeros φ hf₁ hg₁ hf₂ hg₂).left =
  CategoryTheory.ShortComplex.LeftHomologyMapData.ofZeros φ hf₁ hg₁ hf₂ hg₂


/-- The product of two natural numbers is greater than 1 if and only if
  at least one of them is greater than 1 and both are positive. -/
lemma one_lt_mul_iff : 1 < m * n ↔ 0 < m ∧ 0 < n ∧ (1 < m ∨ 1 < n)


/-- The equivalence `Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiChainComplexEquivalence : Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.down α)))

(((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).functor.obj P).X n).X = P.X.X n


theorem disjSum_ssubset_disjSum_of_subset_of_ssubset (hs : s₁ ⊆ s₂) (ht : t₁ ⊂ t₂) :
    s₁.disjSum t₁ ⊂ s₂.disjSum t₂

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


theorem differentiableWithinAt_congr_set (h : s =ᶠ[𝓝 x] t) :
    DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f t x

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


/-- A restatement of `prod_ite_eq` with the equality test reversed. -/
@[to_additive (attr := simp) "A restatement of `sum_ite_eq` with the equality test reversed."]
theorem prod_ite_eq' [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
    (f.prod fun x v => ite (x = a) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
[DecidableEq α]
(f : α →₀ M)
(a : α)
(b : α → M → N)

(f.prod fun x v => if x = a then b x v else 1) = if a ∈ f.support then b a (f a) else 1


theorem IsAtom.Iic (ha : IsAtom a) (hax : a ≤ x) : IsAtom (⟨a, hax⟩ : Set.Iic x)

{α : Type u_2}
[Preorder α]
[OrderBot α]
{a x : α}
(ha : IsAtom a)
(hax : a ≤ x)


/-- The derivative of the zero section of the tangent bundle maps `⟨x, v⟩` to `⟨⟨x, 0⟩, ⟨v, 0⟩⟩`.

Note that, as currently framed, this is a statement in coordinates, thus reliant on the choice
of the coordinate system we use on the tangent bundle.

However, the result itself is coordinate-dependent only to the extent that the coordinates
determine a splitting of the tangent bundle.  Moreover, there is a canonical splitting at each
point of the zero section (since there is a canonical horizontal space there, the tangent space
to the zero section, in addition to the canonical vertical space which is the kernel of the
derivative of the projection), and this canonical splitting is also the one that comes from the
coordinates on the tangent bundle in our definitions. So this statement is not as crazy as it
may seem.

TODO define splittings of vector bundles; state this result invariantly. -/
theorem tangentMap_tangentBundle_pure (p : TangentBundle I M) :
    tangentMap I I.tangent (zeroSection E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩

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

tangentMap I I.tangent (Bundle.zeroSection E (TangentSpace I)) p =
  { proj := { proj := p.proj, snd := 0 }, snd := (p.snd, 0) }


/-- The functor from augmented objects to arrows. -/
@[simps!]
def toArrow : Augmented C ⥤ Arrow C

(X : CategoryTheory.CosimplicialObject.Augmented C)

(CategoryTheory.CosimplicialObject.Augmented.toArrow.obj X).hom = X.hom.app (SimplexCategory.mk 0)


lemma OrthogonalIdempotents.equiv {J} (i : J ≃ I) :
    OrthogonalIdempotents (e ∘ i) ↔ OrthogonalIdempotents e

{R : Type u_1}
[Ring R]
{I : Type u_3}
{e : I → R}
{J : Type u_4}
(i : J ≃ I)

OrthogonalIdempotents (e ∘ ⇑i) ↔ OrthogonalIdempotents e


theorem lex_swap : Lex (Function.swap r) s a b ↔ Lex r (fun i => Function.swap (s i)) b a

{ι : Type u_1}
{α : ι → Type u_2}
{r : ι → ι → Prop}
{s : (i : ι) → α i → α i → Prop}
{a b : (i : ι) × α i}

Sigma.Lex (Function.swap r) s a b ↔ Sigma.Lex r (fun i => Function.swap (s i)) b a


@[simp]
theorem invOf_units [Monoid α] (u : αˣ) [Invertible (u : α)] : ⅟ (u : α) = ↑u⁻¹

{α : Type u}
[Monoid α]
(u : αˣ)
[Invertible ↑u]


theorem geom_sum_alternating_of_lt_neg_one [StrictOrderedRing α] (hx : x + 1 < 0) (hn : 1 < n) :
    if Even n then (∑ i ∈ range n, x ^ i) < 0 else 1 < ∑ i ∈ range n, x ^ i

{α : Type u}
{n : ℕ}
{x : α}
[StrictOrderedRing α]
(hx : x + 1 < 0)
(hn : 1 < n)

if Even n then ∑ i ∈ Finset.range n, x ^ i < 0 else 1 < ∑ i ∈ Finset.range n, x ^ i


/-- The `DFinsupp` version of `Finsupp.liftAddHom_apply_single`,-/
theorem liftAddHom_apply_single [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (f : ∀ i, β i →+ γ)
    (i : ι) (x : β i) : liftAddHom (β := β) f (single i x) = f i x

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
[AddCommMonoid γ]
(f : (i : ι) → β i →+ γ)
(i : ι)
(x : β i)

(DFinsupp.liftAddHom f) (DFinsupp.single i x) = (f i) x


/-- The equivalence `Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiCochainComplexEquivalence :
    Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α

(K : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) (ComplexShape.up α))

((CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).inverse.obj K).p.f n = (K.X n).p


theorem sInf_add {s : Set ℝ≥0∞} : sInf s + a = ⨅ b ∈ s, b + a


private theorem invariant : ContfracLegendre.Ass (fract ξ)⁻¹ v (u - ⌊ξ⌋ * v)

{ξ : ℝ}
{u v : ℤ}
(hv : 2 ≤ v)
(h : Real.ContfracLegendre.Ass ξ u v)

Real.ContfracLegendre.Ass (Int.fract ξ)⁻¹ v (u - ⌊ξ⌋ * v)


theorem Tendsto.atTop_nsmul_neg_const {f : α → ℕ} (hr : r < 0) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x • r) l atBot

{α : Type u_1}
{R : Type u_2}
{l : Filter α}
{r : R}
[LinearOrderedAddCommGroup R]
[Archimedean R]
{f : α → ℕ}
(hr : r < 0)
(hf : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x • r) l Filter.atBot


theorem sdiff_sdiff_eq_sdiff_sup (h : z ≤ x) : x \ (y \ z) = x \ y ⊔ z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(h : z ≤ x)


theorem mem_open_iff (h : x ~ᵢ y) (hs : IsOpen s) : x ∈ s ↔ y ∈ s

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(h : x ~ᵢ y)
(hs : IsOpen s)


theorem up_iInf [InfSet α] (f : ι → α) : up (⨅ i, f i) = ⨅ i, up (f i)

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

{ down := ⨅ i, f i } = ⨅ i, { down := f i }


theorem norm_setToL1SCLM_le' {T : Set α → E →L[ℝ] F} {C : ℝ} (hT : DominatedFinMeasAdditive μ T C) :
    ‖setToL1SCLM α E μ hT‖ ≤ max C 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

‖MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT‖ ≤ max C 0


protected theorem congr_fun (h : e = e') (x : A) : e x = e' x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{e e' : A ≃ₐc[R] B}
(h : e = e')
(x : A)


theorem degree_eq_degree_of_associated (h : Associated p q) : degree p = degree q

{R : Type u}
[CommRing R]
[IsDomain R]
{p q : R[X]}
(h : Associated p q)


protected lemma sUnion (hT : T.Finite) (hs : ∀ t ∈ T, Absorbs M s t) :
    Absorbs M s (⋃₀ T)

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s : Set α}
{T : Set (Set α)}
(hT : T.Finite)
(hs : ∀ t ∈ T, Absorbs M s t)


lemma setIntegral_tilted' (f : α → ℝ) (g : α → E) {s : Set α} (hs : MeasurableSet s) :
    ∫ x in s, g x ∂(μ.tilted f) = ∫ x in s, (exp (f x) / ∫ x, exp (f x) ∂μ) • (g x) ∂μ

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(f : α → ℝ)
(g : α → E)
{s : Set α}
(hs : MeasurableSet s)

∫ (x : α) in s, g x ∂μ.tilted f = ∫ (x : α) in s, (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) • g x ∂μ


@[simp]
theorem adjoint_id :
    ContinuousLinearMap.adjoint (ContinuousLinearMap.id 𝕜 E) = ContinuousLinearMap.id 𝕜 E

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]


theorem nfpBFamily_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal → Ordinal} {c}
    (hc : IsRegular c) (ho : Cardinal.lift.{v, u} o.card < c) (hc' : c ≠ ℵ₀)
    (hf : ∀ (i hi), ∀ b < c.ord, f i hi b < c.ord) {a} :
    a < c.ord → nfpBFamily.{u, v} o f a < c.ord

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

(hf : ∀ (i : Ordinal.{u}) (hi : i < o), ∀ b < c.ord, f i hi b < c.ord)


lemma continuous_nndist : Continuous fun p : α × α => nndist p.1 p.2


@[simp]
theorem card_subtype (p : α → Prop) [DecidablePred p] (s : Finset α) :
    (s.subtype p).card = (s.filter p).card

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(s : Finset α)

(Finset.subtype p s).card = (Finset.filter p s).card


theorem blockDiagonal'_injective [DecidableEq o] :
    Function.Injective (blockDiagonal' : (∀ i, Matrix (m' i) (n' i) α) → Matrix _ _ α)

{o : Type u_4}
{m' : o → Type u_7}
{n' : o → Type u_8}
{α : Type u_12}
[Zero α]
[DecidableEq o]


/-- The `ℒ^p` norm of the indicator of a set is uniformly small if the set itself has small measure,
for any `p < ∞`. Given here as an existential `∀ ε > 0, ∃ η > 0, ...` to avoid later
management of `ℝ≥0∞`-arithmetic. -/
theorem exists_eLpNorm_indicator_le (hp : p ≠ ∞) (c : E) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ η : ℝ≥0, 0 < η ∧ ∀ s : Set α, μ s ≤ η → eLpNorm (s.indicator fun _ => c) p μ ≤ ε

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(hp : p ≠ ⊤)
(c : E)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ η, 0 < η ∧ ∀ (s : Set α), μ s ≤ ↑η → MeasureTheory.eLpNorm (s.indicator fun x => c) p μ ≤ ε


@[simp]
protected theorem «exists» {p : αᵒᵈ → Prop} : (∃ a, p a) ↔ ∃ a, p (toDual a)

(∃ a, p a) ↔ ∃ a, p (OrderDual.toDual a)


@[fun_prop]
theorem HasFDerivWithinAt.clm_comp (hc : HasFDerivWithinAt c c' s x)
    (hd : HasFDerivWithinAt d d' s x) :
    HasFDerivWithinAt (fun y => (c y).comp (d y))
      ((compL 𝕜 F G H (c x)).comp d' + ((compL 𝕜 F G H).flip (d x)).comp c') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{s : Set E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{c' : E →L[𝕜] G →L[𝕜] H}
{d : E → F →L[𝕜] G}
{d' : E →L[𝕜] F →L[𝕜] G}
(hc : HasFDerivWithinAt c c' s x)
(hd : HasFDerivWithinAt d d' s x)

HasFDerivWithinAt (fun y => (c y).comp (d y))
  (((ContinuousLinearMap.compL 𝕜 F G H) (c x)).comp d' + ((ContinuousLinearMap.compL 𝕜 F G H).flip (d x)).comp c') s x


theorem not_isPrimePow_one : ¬IsPrimePow (1 : R)


@[simp]
theorem setPreimage_apply (f : α → β) (s : Set β) : setPreimage f s = s.preimage f

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

(CompleteLatticeHom.setPreimage f) s = f ⁻¹' s


@[simp] theorem bne_self_eq_false' [DecidableEq α] (a : α) : (a != a) = false


@[to_additive]
lemma mem_units_iff (S : Submonoid M) (x : Mˣ) : x ∈ S.units ↔
    ((x : M) ∈ S ∧ ((x⁻¹ : Mˣ) : M) ∈ S)

{M : Type u_1}
[AddMonoid M]
(S : AddSubmonoid M)
(x : AddUnits M)


theorem Lp.ae_eq_zero_of_forall_setIntegral_eq_zero (f : Lp E p μ) (hp_ne_zero : p ≠ 0)
    (hp_ne_top : p ≠ ∞) (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) : f =ᵐ[μ] 0

(hf_int_finite : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → MeasureTheory.IntegrableOn (↑↑f) s μ)

(hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫ (x : α) in s, ↑↑f x ∂μ = 0)


theorem summand_smul_def {i : ι} (g : G i) (w : NormalWord d) :
    of (φ := φ) i g • w = (equivPair i).symm
      { equivPair i w with
        head := g * (equivPair i w).head }

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

(Monoid.PushoutI.of i) g • w =
  (Monoid.PushoutI.NormalWord.equivPair i).symm
    (let __src := (Monoid.PushoutI.NormalWord.equivPair i) w;
    { head := g * ((Monoid.PushoutI.NormalWord.equivPair i) w).head, tail := __src.tail, fstIdx_ne := ⋯,
      normalized := ⋯ })


@[simp]
theorem deriv_csinh (hc : DifferentiableAt ℂ f x) :
    deriv (fun x => Complex.sinh (f x)) x = Complex.cosh (f x) * deriv f x

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


theorem uniformContinuous_fst [UniformSpace α] [UniformSpace β] :
    UniformContinuous fun p : α × β => p.1

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]


theorem map_reverseAux (f : α → β) (l₁ l₂ : List α) :
    map f (reverseAux l₁ l₂) = reverseAux (map f l₁) (map f l₂)

{α : Type u}
{β : Type v}
(f : α → β)
(l₁ l₂ : List α)

List.map f (l₁.reverseAux l₂) = (List.map f l₁).reverseAux (List.map f l₂)


theorem iUnion_Ioc_zsmul : ⋃ n : ℤ, Ioc (n • p) ((n + 1) • p) = univ

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

⋃ n, Set.Ioc (n • p) ((n + 1) • p) = Set.univ


@[simp]
theorem Icc_pred_right (a b : α) : Icc a (pred b) = Ico a b

{α : Type u_1}
[Preorder α]
[PredOrder α]
[NoMinOrder α]
(a b : α)


/-- In a preconnected set, given a transitive relation `P`, if `P x y` and `P y x` are true
for `y` close enough to `x`, then `P x y` holds for all `x, y`. This is a version of the fact
that, if an equivalence relation has open classes, then it has a single equivalence class. -/
lemma IsPreconnected.induction₂' {s : Set α} (hs : IsPreconnected s) (P : α → α → Prop)
    (h : ∀ x ∈ s, ∀ᶠ y in 𝓝[s] x, P x y ∧ P y x)
    (h' : ∀ x y z, x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z)
    {x y : α} (hx : x ∈ s) (hy : y ∈ s) : P x y

(h : ∀ x ∈ s, ∀ᶠ (y : α) in 𝓝[s] x, P x y ∧ P y x)

(h' : ∀ (x y z : α), x ∈ s → y ∈ s → z ∈ s → P x y → P y z → P x z)


@[reassoc (attr := simp)]
lemma descOfIsLeftKanExtension_fac_app (G : D ⥤ H) (β : F ⟶ L ⋙ G) (X : C) :
    α.app X ≫ (F'.descOfIsLeftKanExtension α G β).app (L.obj X) = β.app X

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_7, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : F ⟶ L.comp F')
[F'.IsLeftKanExtension α]
(G : CategoryTheory.Functor D H)
(β : F ⟶ L.comp G)
(X : C)

CategoryTheory.CategoryStruct.comp (α.app X) ((F'.descOfIsLeftKanExtension α G β).app (L.obj X)) = β.app X


lemma weightedVSubOfPoint_vadd (s : Finset ι) (w : ι → k) (p : ι → P) (b : P) (v : V) :
    s.weightedVSubOfPoint (v +ᵥ p) b w = s.weightedVSubOfPoint p (-v +ᵥ b) w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
(b : P)
(v : V)

(s.weightedVSubOfPoint (v +ᵥ p) b) w = (s.weightedVSubOfPoint p (-v +ᵥ b)) w


theorem subset_compl_iff_disjoint_left : s ⊆ tᶜ ↔ Disjoint t s


@[simp]
theorem cospanCompIso_inv_app_one : (cospanCompIso F f g).inv.app WalkingCospan.one = 𝟙 _

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

(CategoryTheory.Limits.cospanCompIso F f g).inv.app CategoryTheory.Limits.WalkingCospan.one =
  𝟙 ((CategoryTheory.Limits.cospan (F.map f) (F.map g)).obj CategoryTheory.Limits.WalkingCospan.one)


@[simp]
theorem inf_insert [DecidableEq β] {b : β} : (insert b s : Finset β).inf f = f b ⊓ s.inf f

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderTop α]
{s : Finset β}
{f : β → α}
[DecidableEq β]
{b : β}


@[simp, norm_cast] lemma cast_abs (q : ℚ) : ((|q| : ℚ) : K) = |(q : K)|

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


theorem edist_efixedPoint_lt_top' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    edist x (efixedPoint' f hsc hsf hf x hxs hx) < ∞

(hf : ContractingWith K (Set.MapsTo.restrict f s s hsf))

edist x (ContractingWith.efixedPoint' f hsc hsf hf x hxs hx) < ⊤


/-- If `f` is a monoid homomorphism then `f 1 = 1`. -/
@[to_additive "If `f` is an additive monoid homomorphism then `f 0 = 0`."]
protected theorem MonoidHom.map_one [MulOneClass M] [MulOneClass N] (f : M →* N) : f 1 = 1

{M : Type u_4}
{N : Type u_5}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)


/-- Given a locally bijective morphism `α : R₀ ⟶ R.val` where `R₀` is a presheaf of rings
and `R` a sheaf of rings, this is the adjunction
`sheafification.{v} α ⊣ SheafOfModules.forget R ⋙ restrictScalars α`. -/
@[simps! (config := .lemmasOnly) homEquiv_apply]
noncomputable def sheafificationAdjunction :
    sheafification.{v} α ⊣ SheafOfModules.forget R ⋙ restrictScalars α

{J : CategoryTheory.GrothendieckTopology C}

∀ (a : PresheafOfModules.sheafify α (CategoryTheory.toSheafify J X.presheaf) ⟶ Y),
  ((PresheafOfModules.sheafificationAdjunction α).homEquiv X Y) a =
    (PresheafOfModules.sheafifyHomEquiv' α (CategoryTheory.toSheafify J X.presheaf) ⋯)
      ((SheafOfModules.fullyFaithfulForget R).homEquiv a)


@[mono]
theorem count_monotone : Monotone (count p)


@[simp]
theorem thickening_iUnion (δ : ℝ) (f : ι → Set α) :
    thickening δ (⋃ i, f i) = ⋃ i, thickening δ (f i)

{ι : Sort u_1}
{α : Type u}
[PseudoEMetricSpace α]
(δ : ℝ)
(f : ι → Set α)

Metric.thickening δ (⋃ i, f i) = ⋃ i, Metric.thickening δ (f i)


@[to_additive (attr := simp 1100)]
theorem smul_closedBall_one : x • closedBall (1 : E) δ = closedBall x δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)

x • Metric.closedBall 1 δ = Metric.closedBall x δ


lemma isRegular_cons_iff' (r : R) (rs : List R) :
    IsRegular M (r :: rs) ↔
      IsSMulRegular M r ∧ IsRegular (QuotSMulTop r M)
          (rs.map (Ideal.Quotient.mk (Ideal.span {r})))

{R : Type u_1}
(M : Type u_3)
[CommRing R]
[AddCommGroup M]
[Module R M]
(r : R)
(rs : List R)

RingTheory.Sequence.IsRegular M (r :: rs) ↔
  IsSMulRegular M r ∧
    RingTheory.Sequence.IsRegular (QuotSMulTop r M) (List.map (⇑(Ideal.Quotient.mk (Ideal.span {r}))) rs)


@[simp]
theorem one_sub_iff {p : R} : IsIdempotentElem (1 - p) ↔ IsIdempotentElem p


@[simp]
theorem Nodup.pairwise_coe [IsSymm α r] (hl : l.Nodup) :
    { a | a ∈ l }.Pairwise r ↔ l.Pairwise r

{α : Type u}
{l : List α}
{r : α → α → Prop}
[IsSymm α r]
(hl : l.Nodup)

{a | a ∈ l}.Pairwise r ↔ List.Pairwise r l


protected theorem Set.EquicontinuousOn.mono {H H' : Set <| X → α} {S : Set X}
    (h : H.EquicontinuousOn S) (hH : H' ⊆ H) : H'.EquicontinuousOn S

{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{H H' : Set (X → α)}
{S : Set X}
(h : H.EquicontinuousOn S)
(hH : H' ⊆ H)


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

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


theorem tan_conj : tan (conj x) = conj (tan x)

Complex.tan ((starRingEnd ℂ) x) = (starRingEnd ℂ) (Complex.tan x)


/-- `sectr Z D` is the functor `D ⥤ C × D` given by `Y ↦ (Z, Y)` . -/
@[simps]
def sectr {C : Type u₁} [Category.{v₁} C] (Z : C) (D : Type u₂) [Category.{v₂} D] : D ⥤ C × D

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

(CategoryTheory.Prod.sectr Z D).obj X = (Z, X)


theorem natCast_div_le (m n : ℕ) :
    (m / n : ℕ) ≤ (m : EReal) / (n : EReal)


@[simp]
theorem volume_pi_Ioc_toReal {a b : ι → ℝ} (h : a ≤ b) :
    (volume (pi univ fun i => Ioc (a i) (b i))).toReal = ∏ i, (b i - a i)

{ι : Type u_1}
[Fintype ι]
{a b : ι → ℝ}
(h : a ≤ b)

(MeasureTheory.volume (Set.univ.pi fun i => Set.Ioc (a i) (b i))).toReal = ∏ i : ι, (b i - a i)


@[nolint unusedHavesSuffices] -- false positive from unfolding String.foldrAux
theorem foldrAux_of_valid (f : Char → α → α) (l m r a) :
    foldrAux f a ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ = m.foldr f a

{α : Type u_1}
(f : Char → α → α)
(l m r : List Char)
(a : α)

String.foldrAux f a { data := l ++ m ++ r } { byteIdx := String.utf8Len l + String.utf8Len m }
    { byteIdx := String.utf8Len l } =
  List.foldr f a m


@[gcongr] theorem rpow_le_rpow {x y : ℝ≥0∞} {z : ℝ} (h₁ : x ≤ y) (h₂ : 0 ≤ z) : x ^ z ≤ y ^ z


theorem cycleRange_of_eq {n : ℕ} {i j : Fin n.succ} (h : j = i) : cycleRange i j = 0


theorem interior_preimage (hsurj : Surjective f) (s : Set F) :
    interior (f ⁻¹' s) = f ⁻¹' interior s

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
(f : E →SL[σ] F)
[CompleteSpace F]
[CompleteSpace E]
(hsurj : Function.Surjective ⇑f)
(s : Set F)


lemma charmatrix_map (M : Matrix n n R) (f : R →+* S) :
    charmatrix (M.map f) = (charmatrix M).map (Polynomial.map f)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(f : R →+* S)

(M.map ⇑f).charmatrix = M.charmatrix.map (Polynomial.map f)


theorem eq_X_sub_C_of_separable_of_root_eq {x : F} {h : F[X]} (h_sep : h.Separable)
    (h_root : h.eval x = 0) (h_splits : Splits i h) (h_roots : ∀ y ∈ (h.map i).roots, y = i x) :
    h = C (leadingCoeff h) * (X - C x)

(h_roots : ∀ y ∈ (Polynomial.map i h).roots, y = i x)

h = Polynomial.C h.leadingCoeff * (Polynomial.X - Polynomial.C x)


@[simp] theorem reverse_cons (a : α) (as : List α) : reverse (a :: as) = reverse as ++ [a]

(a :: as).reverse = as.reverse ++ a :: List.nil


@[simp]
theorem coe_piCongr' :
    (h₁.piCongr' h₂ : (∀ a, W a) → ∀ b, Z b) = fun f b => h₂ b <| f <| h₁.symm b

{α : Sort u_1}
{β : Sort u_2}
{W : α → Sort w}
{Z : β → Sort z}
(h₁ : α ≃ β)
(h₂ : (b : β) → W (h₁.symm b) ≃ Z b)

⇑(h₁.piCongr' h₂) = fun f b => (h₂ b) (f (h₁.symm b))


/-- The multilinear version of `LinearMap.subtype_comp_codRestrict` -/
@[simp]
theorem subtype_compMultilinearMap_codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂)
    (h) : p.subtype.compMultilinearMap (f.codRestrict p h) = f

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
(p : Submodule R M₂)
(h : ∀ (v : (i : ι) → M₁ i), f v ∈ p)


theorem dualCopairing_nondegenerate (W : Subspace K V₁) : W.dualCopairing.Nondegenerate

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
[AddCommGroup V₁]
[Module K V₁]
(W : Subspace K V₁)


@[to_additive (attr := simp)]
theorem fst_comp_swap : fst.comp (swap M N) = snd

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

AddMonoid.Coprod.fst.comp (AddMonoid.Coprod.swap M N) = AddMonoid.Coprod.snd


@[csimp] theorem filterMap_eq_filterMapTR : @List.filterMap = @filterMapTR

(α : Type u_2)
(β : Type u_1)
(f : α → Option β)
(as : List α)
(acc : Array β)

List.filterMapTR.go f as acc = acc.data ++ List.filterMap f as


/-- If `i : R → K` is a ring homomorphism, `f` is a polynomial with coefficients in `R`,
`a, b` are elements of `R`, with `i b` invertible, then there is a `D ∈ R` such that
`b ^ f.natDegree * f (a / b)` equals `i D`. -/
theorem denomsClearable_natDegree (i : R →+* K) (f : R[X]) (a : R) (bu : bi * i b = 1) :
    DenomsClearable a b f.natDegree f i

{R : Type u_1}
{K : Type u_2}
[Semiring R]
[CommSemiring K]
{b : R}
{bi : K}
(i : R →+* K)
(f : R[X])
(a : R)
(bu : bi * i b = 1)


@[simp]
theorem orthogonalProjection_orthogonal_val (u : E) :
    (orthogonalProjection Kᗮ u : E) = u - orthogonalProjection K u

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

↑((orthogonalProjection Kᗮ) u) = u - ↑((orthogonalProjection K) u)


/-- The value of the quadratic character on `a` is zero iff `a = 0`. -/
theorem quadraticChar_eq_zero_iff {a : F} : quadraticChar F a = 0 ↔ a = 0

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


@[simp, norm_cast]
theorem coe_top_interval [BoundedOrder α] : ((⊤ : NonemptyInterval α) : Interval α) = ⊤

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


lemma dist_ne_zero_iff_ne_and_reachable : G.dist u v ≠ 0 ↔ u ≠ v ∧ G.Reachable u v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}


/-- When both `S.f` and `S.g` are zero, the middle object `S.X₂` gives a homology data on S -/
@[simps]
noncomputable def ofZeros (hf : S.f = 0) (hg : S.g = 0) :
    S.HomologyData

(CategoryTheory.ShortComplex.HomologyData.ofZeros S hf hg).iso =
  CategoryTheory.Iso.refl (CategoryTheory.ShortComplex.LeftHomologyData.ofZeros S hf hg).H


theorem exists_image_iff (f : α → β) (x : Set α) (P : β → Prop) :
    (∃ a : f '' x, P a) ↔ ∃ a : x, P (f a)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(x : Set α)
(P : β → Prop)


@[to_additive]
theorem fst_one : (1 : NonemptyInterval α).fst = 1


theorem mod_modEq (a n) : a % n ≡ a [ZMOD n]


@[trans]
theorem lt_trans : ∀ {a b c : α}, a < b → b < c → a < c


lemma IsInitial.isZero {X : C} (hX : IsInitial X) : IsZero X

(hX : CategoryTheory.Limits.IsInitial X)


lemma equation_neg_of {x y : R} (h : W.Equation x <| W.negY x y) : W.Equation x y

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


@[simp]
theorem lift_mk {f : X → α} (hf : ∀ x y, (x ~ᵢ y) → f x = f y) (x : X) : lift f hf (mk x) = f x

(hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y)

SeparationQuotient.lift f hf (SeparationQuotient.mk x) = f x


/-- `F.mapAddHom` is an additive homomorphism whose underlying function is `F.map`. -/
@[simps!]
def mapAddHom {X Y : C} : (X ⟶ Y) →+ (F.obj X ⟶ F.obj Y)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
(F : CategoryTheory.Functor C D)
[F.Additive]
{X Y : C}
(f : X ⟶ Y)


theorem smul_closure (a : α) (s : Set G) : a • closure s = closure (a • s)

{α : Type u_1}
{G : Type u_2}
[Group G]
[Monoid α]
[MulDistribMulAction α G]
(a : α)
(s : Set G)

a • Subgroup.closure s = Subgroup.closure (a • s)


theorem not_eq_zero_of_lt (h : b < a) : a ≠ 0


theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A

(f * g) ∣[k1 + k2] A = (↑↑A).det • f ∣[k1] A * g ∣[k2] A


/-- Uses `right` co(ntra)variant. -/
@[to_additive (attr := simp) Right.neg_pos_iff "Uses `right` co(ntra)variant."]
theorem Right.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1

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


/-- Taking the product of an indicator function over a possibly larger finset is the same as
taking the original function over the original finset. -/
@[to_additive "Summing an indicator function over a possibly larger `Finset` is the same as summing
  the original function over the original finset."]
lemma prod_mulIndicator_subset (f : ι → β) {s t : Finset ι} (h : s ⊆ t) :
    ∏ i ∈ t, mulIndicator (↑s) f i = ∏ i ∈ s, f i

{ι : Type u_1}
{β : Type u_4}
[CommMonoid β]
(f : ι → β)
{s t : Finset ι}
(h : s ⊆ t)

∏ i ∈ t, (↑s).mulIndicator f i = ∏ i ∈ s, f i


theorem nat_add_eq {a : Cardinal} (n : ℕ) (ha : ℵ₀ ≤ a) : n + a = a

{a : Cardinal.{u_1}}
(n : ℕ)
(ha : ℵ₀ ≤ a)


theorem Valid'.node4L {l} {x : α} {m} {y : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hm : Valid' x m y)
    (hr : Valid' (↑y) r o₂) (Hm : 0 < size m)
    (H : size l = 0 ∧ size m = 1 ∧ size r ≤ 1 ∨
        0 < size l ∧
          ratio * size r ≤ size m ∧
            delta * size l ≤ size m + size r ∧
              3 * (size m + size r) ≤ 16 * size l + 9 ∧ size m ≤ delta * size r) :
    Valid' o₁ (@node4L α l x m y r) o₂

(H :
  l.size = 0 ∧ m.size = 1 ∧ r.size ≤ 1 ∨
    0 < l.size ∧
      Ordnode.ratio * r.size ≤ m.size ∧
        Ordnode.delta * l.size ≤ m.size + r.size ∧
          3 * (m.size + r.size) ≤ 16 * l.size + 9 ∧ m.size ≤ Ordnode.delta * r.size)


@[simp] theorem prod_nnnorm_equiv_symm (f : α × β) : ‖(WithLp.equiv ⊤ _).symm f‖₊ = ‖f‖₊

{α : Type u_2}
{β : Type u_3}
[SeminormedAddCommGroup α]
[SeminormedAddCommGroup β]
(f : α × β)

‖(WithLp.equiv ⊤ (α × β)).symm f‖₊ = ‖f‖₊


@[simp]
/- Porting note: abomination -/
theorem id_hom (X : C) : Iso.hom (coreCategory.id X) = @CategoryStruct.id C _ X

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

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


theorem denseRange_id : DenseRange (id : X → X)


@[simp]
theorem mem_toSubmodule {x} : x ∈ (toSubmodule S) ↔ x ∈ S

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


theorem setOfIdeal_open [T2Space R] (I : Ideal C(X, R)) : IsOpen (setOfIdeal I)

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
[T2Space R]
(I : Ideal C(X, R))


/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {p₁ p₂ : FormalMultilinearSeries 𝕜 𝕜 E}
    {f : 𝕜 → E} {x : 𝕜} (h₁ : HasFPowerSeriesAt f p₁ x) (h₂ : HasFPowerSeriesAt f p₂ x) : p₁ = p₂

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{p₁ p₂ : FormalMultilinearSeries 𝕜 𝕜 E}
{f : 𝕜 → E}
{x : 𝕜}
(h₁ : HasFPowerSeriesAt f p₁ x)
(h₂ : HasFPowerSeriesAt f p₂ x)


lemma Gammaℝ_residue_zero : Tendsto (fun s ↦ s * Gammaℝ s) (𝓝[≠] 0) (𝓝 2)

Filter.Tendsto (fun s => s * s.Gammaℝ) (𝓝[≠] 0) (𝓝 2)


lemma div_le_iff_le_mul {a b c : EReal} (h : 0 < b) (h' : b ≠ ⊤) :
    a / b ≤ c ↔ a ≤ b * c


/-- Let `s` be a discrete subset of a topological space. Then the preimage of `s` by
a continuous injective map is also discrete. -/
theorem DiscreteTopology.preimage_of_continuous_injective {X Y : Type*} [TopologicalSpace X]
    [TopologicalSpace Y] (s : Set Y) [DiscreteTopology s] {f : X → Y} (hc : Continuous f)
    (hinj : Function.Injective f) : DiscreteTopology (f ⁻¹' s)

{X : Type u_5}
{Y : Type u_6}
[TopologicalSpace X]
[TopologicalSpace Y]
(s : Set Y)
[DiscreteTopology ↑s]
{f : X → Y}
(hc : Continuous f)
(hinj : Function.Injective f)


theorem isCoatom_iff_isAtom : IsCoatom a ↔ IsAtom b

{α : Type u_2}
[Lattice α]
[BoundedOrder α]
[IsModularLattice α]
{a b : α}
(hc : IsCompl a b)


/-- `{a} ≤ s` in colex iff `s` contains an element greated than or equal to `a`. -/
lemma singleton_le_toColex : (toColex {a} : Colex α) ≤ toColex s ↔ ∃ x ∈ s, a ≤ x

{α : Type u_1}
[PartialOrder α]
{s : Finset α}
{a : α}

{ ofColex := {a} } ≤ { ofColex := s } ↔ ∃ x ∈ s, a ≤ x


theorem mul_left_le_iff [IsDedekindDomain A] {J : FractionalIdeal A⁰ K} (hJ : J ≠ 0) {I I'} :
    J * I ≤ J * I' ↔ I ≤ I'

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDedekindDomain A]
{J : FractionalIdeal A⁰ K}
(hJ : J ≠ 0)
{I I' : FractionalIdeal A⁰ K}


lemma Real.dist_le_of_mem_Icc {x y x' y' : ℝ} (hx : x ∈ Icc x' y') (hy : y ∈ Icc x' y') :
    dist x y ≤ y' - x'

{x y x' y' : ℝ}
(hx : x ∈ Set.Icc x' y')
(hy : y ∈ Set.Icc x' y')


theorem coe_finRotate (i : Fin n.succ) :
    (finRotate n.succ i : ℕ) = if i = Fin.last n then (0 : ℕ) else i + 1

↑((finRotate n.succ) i) = if i = Fin.last n then 0 else ↑i + 1


theorem shift_shift_neg' (i : A) :
    f⟦i⟧'⟦-i⟧' = (shiftFunctorCompIsoId C i (-i) (add_neg_self i)).hom.app X ≫
      f ≫ (shiftFunctorCompIsoId C i (-i) (add_neg_self i)).inv.app Y

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddGroup A]
[CategoryTheory.HasShift C A]
{X Y : C}
(f : X ⟶ Y)
(i : A)

(CategoryTheory.shiftFunctor C (-i)).map ((CategoryTheory.shiftFunctor C i).map f) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorCompIsoId C i (-i) ⋯).hom.app X)
    (CategoryTheory.CategoryStruct.comp f ((CategoryTheory.shiftFunctorCompIsoId C i (-i) ⋯).inv.app Y))


theorem isList_toList (l : List (Lists α)) : IsList (ofList l)


/-- Auxiliary definition for `FunctorialFactorizationData.functorCategory`. -/
@[simps]
def functorCategory.Z : Arrow (J ⥤ C) ⥤ J ⥤ C

{W₁ W₂ : CategoryTheory.MorphismProperty C}

(data : W₁.FunctorialFactorizationData W₂)

(f : CategoryTheory.Arrow (CategoryTheory.Functor J C))

∀ {X Y : J} (φ : X ⟶ Y),
  ((CategoryTheory.MorphismProperty.FunctorialFactorizationData.functorCategory.Z data J).obj f).map φ =
    data.mapZ { left := f.left.map φ, right := f.right.map φ, w := ⋯ }


@[simp]
theorem cos_add_pi (x : ℝ) : cos (x + π) = -cos x


theorem isPrimePow_of_has_chain {q : Associates M} {n : ℕ} (hn : n ≠ 0)
    {c : Fin (n + 1) → Associates M} (h₁ : StrictMono c)
    (h₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i) (hq : q ≠ 0) : IsPrimePow q


/-- The recurrence relation for the indefinite version of the `Γ` function. -/
theorem partialGamma_add_one {s : ℂ} (hs : 0 < s.re) {X : ℝ} (hX : 0 ≤ X) :
    partialGamma (s + 1) X = s * partialGamma s X - (-X).exp * X ^ s

(s + 1).partialGamma X = s * s.partialGamma X - ↑(rexp (-X)) * ↑X ^ s


theorem map_alternatingFaceMapComplex {D : Type*} [Category D] [Preadditive D] (F : C ⥤ D)
    [F.Additive] :
    alternatingFaceMapComplex C ⋙ F.mapHomologicalComplex _ =
      (SimplicialObject.whiskering C D).obj F ⋙ alternatingFaceMapComplex D

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive D]
(F : C ⥤ D)
[F.Additive]

AlgebraicTopology.alternatingFaceMapComplex C ⋙ F.mapHomologicalComplex (ComplexShape.down ℕ) =
  (CategoryTheory.SimplicialObject.whiskering C D).obj F ⋙ AlgebraicTopology.alternatingFaceMapComplex D


theorem bsup_le_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    bsup.{_, v} o f ≤ blsub.{_, v} o f

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


@[simp]
theorem lt_inv_iff_mul_lt {r p : ℝ≥0} (h : p ≠ 0) : r < p⁻¹ ↔ r * p < 1


/-- Typeclass for multiplicative actions on multiplicative structures. This generalizes
conjugation actions. -/
@[ext]
class MulDistribMulAction (M : Type*) (A : Type*) [Monoid M] [Monoid A] extends
  MulAction M A where
  /-- Distributivity of `•` across `*` -/
  smul_mul : ∀ (r : M) (x y : A), r • (x * y) = r • x * r • y
  /-- Multiplying `1` by a scalar gives `1` -/
  smul_one : ∀ r : M, r • (1 : A) = 1

{M : Type u_10}
{A : Type u_11}
[Monoid M]
[Monoid A]
[self : MulDistribMulAction M A]
(r : M)
(x y : A)


/-- `VectorMeasure.map` as a linear map. -/
@[simps]
def mapₗ (f : α → β) : VectorMeasure α M →ₗ[R] VectorMeasure β M

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
[MeasurableSpace β]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
{R : Type u_4}
[Semiring R]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M]
(f : α → β)
(v : MeasureTheory.VectorMeasure α M)

(MeasureTheory.VectorMeasure.mapₗ f) v = v.map f


@[simp] theorem castSucc_lt_castSucc_iff {a b : Fin n} :
    Fin.castSucc a < Fin.castSucc b ↔ a < b


@[simp]
theorem evalFrom_singleton (S : Set σ) (a : α) : M.evalFrom S [a] = M.stepSet (M.εClosure S) a

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


@[fun_prop]
theorem Differentiable.differentiableAt (h : Differentiable 𝕜 f) : DifferentiableAt 𝕜 f x

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


@[to_additive]
nonrec theorem _root_.Commute.unop [Mul α] {x y : αᵐᵒᵖ} (h : Commute x y) :
    Commute (unop x) (unop y)

{α : Type u_1}
[Add α]
{x y : αᵃᵒᵖ}
(h : AddCommute x y)

AddCommute (AddOpposite.unop x) (AddOpposite.unop y)


@[simp]
theorem fst_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : α × β)).1 = (OfNat.ofNat n : α)

{α : Type u_1}
{β : Type u_2}
[AddMonoidWithOne α]
[AddMonoidWithOne β]
(n : ℕ)
[n.AtLeastTwo]


theorem homogeneousSubmodule_mul [CommSemiring R] (m n : ℕ) :
    homogeneousSubmodule σ R m * homogeneousSubmodule σ R n ≤ homogeneousSubmodule σ R (m + n)

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(m n : ℕ)

MvPolynomial.homogeneousSubmodule σ R m * MvPolynomial.homogeneousSubmodule σ R n ≤
  MvPolynomial.homogeneousSubmodule σ R (m + n)


/-- The isomorphism `eB.functor ⋙ e'.inverse ⋙ e'.functor ≅ eB.functor` deduced
from the counit isomorphism of `e'`. -/
@[simps! hom_app]
def τ₀ : eB.functor ⋙ e'.inverse ⋙ e'.functor ≅ eB.functor

{A' : Type u_2}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_2} A']
[CategoryTheory.Category.{u_6, u_3} B]
[CategoryTheory.Category.{u_7, u_4} B']
{eB : B ≌ B'}
{e' : A' ≌ B'}
(X : B)

AlgebraicTopology.DoldKan.Compatibility.τ₀.hom.app X = e'.counitIso.hom.app (eB.functor.obj X)


@[simp]
theorem mul_integral_comp_mul_add :
    (c * ∫ x in a..b, f (c * x + d)) = ∫ x in c * a + d..c * b + d, f x

c * ∫ (x : ℝ) in a..b, f (c * x + d) = ∫ (x : ℝ) in c * a + d..c * b + d, f x


/-- The empty finpartition. -/
@[simps]
protected def empty : Finpartition (⊥ : α)


/-- Change a cone on `F : Jᵒᵖ ⥤ C` to a cocone on `F.rightOp : Jᵒᵖ ⥤ C`. -/
@[simps]
def coconeRightOpOfCone (c : Cone F) : Cocone F.rightOp

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : Jᵒᵖ ⥤ C}
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.coconeRightOpOfCone c).ι = CategoryTheory.NatTrans.rightOp c.π


/-- The strong pigeonhole principle for finitely many pigeons and pigeonholes.
There is a pigeonhole with at most as many pigeons as
the floor of the average number of pigeons across all pigeonholes.
("The minimum is at most the mean" specialized to integers.)

More formally, given a function `f` between finite types `α` and `β` and a number `n` such that
`card α < card β * n`, there exists an element `y : β` such that its preimage has less than `n`
elements. -/
theorem exists_card_fiber_lt_of_card_lt_mul (hn : card α < card β * n) :
    ∃ y : β, (univ.filter fun x => f x = y).card < n

(hn : Fintype.card α < Fintype.card β * n)

∃ y, (Finset.filter (fun x => f x = y) Finset.univ).card < n


theorem _root_.AlgHom.map_det [Algebra R S] {T : Type z} [CommRing T] [Algebra R T] (f : S →ₐ[R] T)
    (M : Matrix n n S) : f M.det = Matrix.det (f.mapMatrix M)

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{S : Type w}
[CommRing S]
[Algebra R S]
{T : Type z}
[CommRing T]
[Algebra R T]
(f : S →ₐ[R] T)
(M : Matrix n n S)


theorem IsBigOWith.eq_zero_imp (h : IsBigOWith c l f'' g'') : ∀ᶠ x in l, g'' x = 0 → f'' x = 0

(h : Asymptotics.IsBigOWith c l f'' g'')


theorem span_singleton_eq_span_singleton {α : Type u} [CommRing α] [IsDomain α] {x y : α} :
    span ({x} : Set α) = span ({y} : Set α) ↔ Associated x y

Ideal.span {x} = Ideal.span {y} ↔ Associated x y


@[to_additive]
lemma mul_comp [MulOneClass P] (g₁ g₂ : M →* N) (f : P →* M) :
    (g₁ * g₂).comp f = g₁.comp f * g₂.comp f

{M : Type u_3}
{N : Type u_4}
{P : Type u_5}
[MulOneClass M]
[CommMonoid N]
[MulOneClass P]
(g₁ g₂ : M →* N)
(f : P →* M)


@[simp]
theorem algebraMap_lift (x : S) : algebraMap A B (lift R A B x) = algebraMap S B x

(R : Type u_1)
(A : Type u_2)
(B : Type u_3)
[CommRing R]
[CommRing A]
[CommRing B]
[Algebra R B]
[Algebra A B]
[IsIntegralClosure A R B]
{S : Type u_4}
[CommRing S]
[Algebra R S]
[Algebra S B]
[IsScalarTower R S B]
[Algebra R A]
[IsScalarTower R A B]
[isIntegral : Algebra.IsIntegral R S]
(x : S)

(algebraMap A B) ((IsIntegralClosure.lift R A B) x) = (algebraMap S B) x


theorem PairwiseDisjoint.attach (hs : (s : Set ι).PairwiseDisjoint f) :
    (s.attach : Set { x // x ∈ s }).PairwiseDisjoint (f ∘ Subtype.val)

{α : Type u_1}
{ι : Type u_2}
[SemilatticeInf α]
[OrderBot α]
{s : Finset ι}
{f : ι → α}
(hs : (↑s).PairwiseDisjoint f)

(↑s.attach).PairwiseDisjoint (f ∘ Subtype.val)


theorem mem_lp_const_smul (c : 𝕜) (f : lp E p) : c • (f : PreLp E) ∈ lp E p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{𝕜 : Type u_3}
[NormedRing 𝕜]
[(i : α) → Module 𝕜 (E i)]
[∀ (i : α), BoundedSMul 𝕜 (E i)]
(c : 𝕜)
(f : ↥(lp E p))


/-- Adding an open immersion into an open cover gives another open cover. -/
@[simps]
def OpenCover.add {X Y : Scheme.{u}} (𝒰 : X.OpenCover) (f : Y ⟶ X) [IsOpenImmersion f] :
    X.OpenCover

{X Y : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : Y ⟶ X)
[AlgebraicGeometry.IsOpenImmersion f]
(x : ↑↑X.toPresheafedSpace)


lemma smul_neg_iff_of_pos_left [PosSMulStrictMono α β] [PosSMulReflectLT α β] (ha : 0 < a) :
    a • b < 0 ↔ b < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulZeroClass α β]
[Preorder α]
[Preorder β]
[PosSMulStrictMono α β]
[PosSMulReflectLT α β]
(ha : 0 < a)


@[simp]
lemma gluing_ι (j : 𝒰.J) :
    (gluing 𝒰 f g).ι j = Multicoequalizer.π (gluing 𝒰 f g).diagram j

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

(AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).ι j =
  CategoryTheory.Limits.Multicoequalizer.π (AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).diagram j


/-- `Function.const` is a continuous function. -/
@[simps!]
def const (x : β) : α →𝒄 β

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(x : β)

∀ (a : α), (OmegaCompletePartialOrder.ContinuousHom.const x) a = x


theorem lt_neg_iff {x y : PGame} : y < -x ↔ x < -y


@[to_additive (attr := simp)]
lemma one_of {A : Type*} [Monoid A] : (1 : MonCat.of A) = (1 : A)


lemma refl {X Y : C} (z : W.RightFraction X Y) : RightFractionRel z z

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(z : W.RightFraction X Y)


@[gcongr]
protected theorem _root_.GCongr.ennreal_tsum_le_tsum (h : ∀ a, f a ≤ g a) : tsum f ≤ tsum g

{α : Type u_1}
{f g : α → ℝ≥0∞}
(h : ∀ (a : α), f a ≤ g a)


theorem append_mem_mul : a ∈ l → b ∈ m → a ++ b ∈ l * m

{α : Type u_1}
{l m : Language α}
{a b : List α}


theorem mem_support_bernoulli_iff : b ∈ (bernoulli p h).support ↔ cond b (p ≠ 0) (p ≠ 1)

b ∈ (PMF.bernoulli p h).support ↔ bif b then p ≠ 0 else p ≠ 1


@[to_additive]
theorem le_comap_map (H : Subgroup G) : H ≤ comap f (map f H)

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


theorem val_smul_eq_evalₐ_smul (n : ℕ) (r : AdicCompletion I R)
    (x : M ⧸ (I ^ n • ⊤ : Submodule R M)) : r.val n • x = evalₐ I n r • x

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(n : ℕ)
(r : AdicCompletion I R)
(x : M ⧸ I ^ n • ⊤)

↑r n • x = (AdicCompletion.evalₐ I n) r • x


@[to_additive (attr := simp)]
theorem mul_inv_lt_iff_lt_mul : a * b⁻¹ < c ↔ a < c * b

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


theorem Iio_ae_eq_Iic : Iio a =ᵐ[μ] Iic a

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a : α}


theorem normSq_lt_one (z : 𝔻) : normSq z < 1


lemma collapse_eq (ha : a ∉ s) (𝒜 : Finset (Finset α)) (f : Finset α → β) :
    collapse 𝒜 a f s = (if s ∈ 𝒜 then f s else 0) +
      if insert a s ∈ 𝒜 then f (insert a s) else 0

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[LinearOrderedCommSemiring β]
{a : α}
{s : Finset α}
(ha : a ∉ s)
(𝒜 : Finset (Finset α))
(f : Finset α → β)


@[to_additive (attr := simp)]
theorem singletonMonoidHom_apply (a : α) : singletonMonoidHom a = {a}


theorem card_pos_iff : 0 < card α ↔ Nonempty α


@[simp]
theorem pred'_succ' (n) : pred' (succ' n) = n


@[simp] lemma biUnion_val (s : Finset α) (t : α → Finset β) :
    (s.biUnion t).1 = (s.1.bind fun a ↦ (t a).1).dedup

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

(s.biUnion t).val = (s.val.bind fun a => (t a).val).dedup


theorem continuousAt_equivIco : ContinuousAt (equivIco p a) x

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p : 𝕜)
[hp : Fact (0 < p)]
(a : 𝕜)
[Archimedean 𝕜]
{x : AddCircle p}
(hx : x ≠ ↑a)

ContinuousAt (⇑(AddCircle.equivIco p a)) x


/-- A compact set is covered by finitely many left multiplicative translates of a set
  with non-empty interior. -/
@[to_additive
  "A compact set is covered by finitely many left additive translates of a set
    with non-empty interior."]
theorem compact_covered_by_mul_left_translates {K V : Set G} (hK : IsCompact K)
    (hV : (interior V).Nonempty) : ∃ t : Finset G, K ⊆ ⋃ g ∈ t, (g * ·) ⁻¹' V

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{K V : Set G}
(hK : IsCompact K)
(hV : (interior V).Nonempty)

∃ t, K ⊆ ⋃ g ∈ t, (fun x => g * x) ⁻¹' V


theorem mdifferentiable_of_mem_atlas (h : e ∈ atlas H M) : e.MDifferentiable I I

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{e : PartialHomeomorph M H}
(h : e ∈ atlas H M)


@[simp]
theorem unitization_apply (x : Unitization ℕ s) : unitization s x = x.fst + x.snd

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[SetLike S R]
[hSR : NonUnitalSubsemiringClass S R]
(s : S)
(x : Unitization ℕ ↥s)

(NonUnitalSubsemiring.unitization s) x = ↑x.fst + ↑x.snd


/--
The sign extension is a bitwise not, followed by a zero extend, followed by another bitwise not
when `msb = true`. The double bitwise not ensures that the high bits are '1',
and the lower bits are preserved. -/
theorem signExtend_eq_not_zeroExtend_not_of_msb_true {x : BitVec w} {v : Nat} (hmsb : x.msb = true) :
    x.signExtend v = ~~~((~~~x).zeroExtend v)

{w : Nat}
{x : BitVec w}
{v : Nat}
(hmsb : x.msb = true)

BitVec.signExtend v x = ~~~BitVec.zeroExtend v (~~~x)


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.smul (hf : ContinuousAt f b) (hg : ContinuousAt g b) :
    ContinuousAt (fun x => f x • g x) b

{M : Type u_1}
{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace M]
[TopologicalSpace X]
[TopologicalSpace Y]
[SMul M X]
[ContinuousSMul M X]
{f : Y → M}
{g : Y → X}
{b : Y}
(hf : ContinuousAt f b)
(hg : ContinuousAt g b)


@[simp] lemma coe_recolorOfCardLE [Fintype α] [Fintype β] (hαβ : card α ≤ card β) :
    ⇑(G.recolorOfCardLE hαβ) =
      (Embedding.completeGraph (Embedding.nonempty_of_card_le hαβ).some).toHom.comp

{V : Type u}
(G : SimpleGraph V)
{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(hαβ : Fintype.card α ≤ Fintype.card β)

⇑(G.recolorOfCardLE hαβ) = (SimpleGraph.Embedding.completeGraph ⋯.some).toHom.comp


theorem isLocalDiffeomorph_iff_isLocalDiffeomorphOn_univ {f : M → N} :
    IsLocalDiffeomorph I J n f ↔ IsLocalDiffeomorphOn I J n f Set.univ

{𝕜 : 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}


@[simp]
theorem min_eq_left_iff : min a b = a ↔ a ≤ b


theorem smooth_iff_target :
    Smooth I I' f ↔
      Continuous f ∧
        ∀ y : M', SmoothOn I 𝓘(𝕜, E') (extChartAt I' y ∘ f) (f ⁻¹' (extChartAt I' y).source)

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

Smooth I I' f ↔ Continuous f ∧ ∀ (y : M'), SmoothOn I 𝓘(𝕜, E') (↑(extChartAt I' y) ∘ f) (f ⁻¹' (extChartAt I' y).source)


@[to_additive (attr := simp)]
theorem coe_mulLeft (a : G) : ⇑(Equiv.mulLeft a) = (a * ·)


/-- The categorical equivalence between `C` and `ULift C`. -/
@[simps]
def ULift.equivalence : C ≌ ULift.{u₂} C

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

CategoryTheory.ULift.equivalence.unitIso.inv =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ULift.upFunctor.comp CategoryTheory.ULift.downFunctor)


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

{α : Type u_1}
{cmp : α → α → Ordering}
{t : Batteries.RBNode α}

Batteries.RBNode.Ordered cmp t.setRed ↔ Batteries.RBNode.Ordered cmp t


/-- We say that a collection of `SmoothBumpFunction`s is a `SmoothBumpCovering` of a set `s` if

* `(f i).c ∈ s` for all `i`;
* the family `fun i ↦ support (f i)` is locally finite;
* for each point `x ∈ s` there exists `i` such that `f i =ᶠ[𝓝 x] 1`;
  in other words, `x` belongs to the interior of `{y | f i y = 1}`;

If `M` is a finite dimensional real manifold which is a `σ`-compact Hausdorff topological space,
then for every covering `U : M → Set M`, `∀ x, U x ∈ 𝓝 x`, there exists a `SmoothBumpCovering`
subordinate to `U`, see `SmoothBumpCovering.exists_isSubordinate`.

This covering can be used, e.g., to construct a partition of unity and to prove the weak
Whitney embedding theorem. -/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
structure SmoothBumpCovering (s : Set M := univ) where
  /-- The center point of each bump in the smooth covering. -/
  c : ι → M
  /-- A smooth bump function around `c i`. -/
  toFun : ∀ i, SmoothBumpFunction I (c i)
  /-- All the bump functions in the covering are centered at points in `s`. -/
  c_mem' : ∀ i, c i ∈ s
  /-- Around each point, there are only finitely many nonzero bump functions in the family. -/
  locallyFinite' : LocallyFinite fun i => support (toFun i)
  /-- Around each point in `s`, one of the bump functions is equal to `1`. -/
  eventuallyEq_one' : ∀ x ∈ s, ∃ i, toFun i =ᶠ[𝓝 x] 1

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : optParam (Set M) Set.univ}
(self : SmoothBumpCovering ι I M s)
(i : ι)


theorem comap_map {f : Filter α} {m : α → β} (h : Injective m) : comap m (map m f) = f

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}
(h : Function.Injective m)


theorem le_csInf_iff (hb : BddBelow s) (hs : s.Nonempty) : a ≤ sInf s ↔ ∀ b ∈ s, a ≤ b

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(hb : BddBelow s)
(hs : s.Nonempty)


theorem System.Platform.numBits_eq : Or (Eq numBits 32) (Eq numBits 64)

Or (Eq System.Platform.numBits 32) (Eq System.Platform.numBits 64)


lemma exterior_mem_nhdsSet : exterior s ∈ 𝓝ˢ s

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


theorem one_eq_closure : (1 : AddSubmonoid R) = closure {1}


@[to_additive]
theorem tprod_congr_set_coe (f : β → α) {s t : Set β} (h : s = t) :
    ∏' x : s, f x = ∏' x : t, f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(f : β → α)
{s t : Set β}
(h : s = t)


lemma exact_succ (n : ℕ) :
    (ShortComplex.mk _ _ (I.cocomplex.d_comp_d n (n + 1) (n + 2))).Exact

(I : CategoryTheory.InjectiveResolution Z)

(CategoryTheory.ShortComplex.mk (I.cocomplex.d n (n + 1)) (I.cocomplex.d (n + 1) (n + 2)) ⋯).Exact


/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfLax' (F : LaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), ((CategoryTheory.Pseudofunctor.mkOfLax' F).mapComp f g).inv = F.mapComp f g


theorem sInf_le_sSup (s : Set ℝ) (h₁ : BddBelow s) (h₂ : BddAbove s) : sInf s ≤ sSup s


theorem get_swap (a : Array α) (i j : Fin a.size) (k : Nat) (hk: k < a.size) :
    (a.swap i j)[k]'(by simp_all) = if k = i then a[j] else if k = j then a[i]  else a[k]

{α : Type u_1}
(a : Array α)
(i j : Fin a.size)
(k : Nat)
(hk : k < a.size)

(a.swap i j)[k] = if k = ↑i then a[j] else if k = ↑j then a[i] else a[k]


theorem norm_compLp_sub_le (hg : LipschitzWith c g) (g0 : g 0 = 0) (f f' : Lp E p μ) :
    ‖hg.compLp g0 f - hg.compLp g0 f'‖ ≤ c * ‖f - f'‖

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{g : E → F}
{c : ℝ≥0}
(hg : LipschitzWith c g)
(g0 : g 0 = 0)
(f f' : ↥(MeasureTheory.Lp E p μ))

‖hg.compLp g0 f - hg.compLp g0 f'‖ ≤ ↑c * ‖f - f'‖


theorem differentiable_set_eq_D (hK : IsComplete K) :
    { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ K } = D f K

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : ℝ → F}
(K : Set F)
(hK : IsComplete K)

{x | DifferentiableWithinAt ℝ f (Set.Ici x) x ∧ derivWithin f (Set.Ici x) x ∈ K} = RightDerivMeasurableAux.D f K


theorem toSemiring_injective :
    Function.Injective (@toSemiring R)


@[simp]
lemma mem_idealizer {x : L} : x ∈ N.idealizer ↔ ∀ m : M, ⁅x, m⁆ ∈ N

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(N : LieSubmodule R L M)
{x : L}


@[simp] theorem one_imJ : (1 : ℍ[R,c₁,c₂]).imJ = 0


theorem restrict_eq_restrict_iff (M M' : Matroid α) (X : Set α) :
    M ↾ X = M' ↾ X ↔ ∀ I, I ⊆ X → (M.Indep I ↔ M'.Indep I)

{α : Type u_1}
(M M' : Matroid α)
(X : Set α)

M.restrict X = M'.restrict X ↔ ∀ I ⊆ X, M.Indep I ↔ M'.Indep I


/--
If `g` is a linear map `M → M''` such that all scalar multiplication by `s : S` is invertible and
`l` is another linear map `LocalizedModule S M ⟶ M''` such that `l ∘ mkLinearMap = g` then
`l = lift g`
-/
theorem lift_unique (g : M →ₗ[R] M'') (h : ∀ x : S, IsUnit ((algebraMap R (Module.End R M'')) x))
    (l : LocalizedModule S M →ₗ[R] M'') (hl : l.comp (LocalizedModule.mkLinearMap S M) = g) :
    LocalizedModule.lift S g h = l

(h : ∀ (x : ↥S), IsUnit ((algebraMap R (Module.End R M'')) ↑x))

(hl : l ∘ₗ LocalizedModule.mkLinearMap S M = g)


@[rclike_simps, norm_cast]
theorem ofReal_div (r s : ℝ) : ((r / s : ℝ) : K) = r / s


theorem swap_comp {α β : Type*} [DecidableEq α] [DecidableEq β] (f : α ↪ β) (x y : α) :
    Equiv.swap (f x) (f y) ∘ f = f ∘ Equiv.swap x y

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
(f : α ↪ β)
(x y : α)

⇑(Equiv.swap (f x) (f y)) ∘ ⇑f = ⇑f ∘ ⇑(Equiv.swap x y)


theorem pow_zero (a : R) : a ^ 0 = (nat_lit 1).rawCast + 0


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

(h : (s ∩ Function.mulSupport f).Finite)

(∏ᶠ (i : α) (_ : i ∈ s ∩ t), f i) * ∏ᶠ (i : α) (_ : i ∈ s \ t), f i = ∏ᶠ (i : α) (_ : i ∈ s), f i


theorem btw_refl_right (a b : α) : btw a b b

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


@[simp]
theorem ofHamming_neg [∀ i, Neg (β i)] {x : Hamming β} : ofHamming (-x) = -ofHamming x

{ι : Type u_2}
{β : ι → Type u_3}
[(i : ι) → Neg (β i)]
{x : Hamming β}

Hamming.ofHamming (-x) = -Hamming.ofHamming x


@[simp]
lemma σ_smul (x y) : P.σ x • y = x * y

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(P : Algebra.Generators R S)
(x y : S)


/-- `iUnionLift_unary` is useful for proving that `iUnionLift` is a homomorphism
  of algebraic structures when defined on the Union of algebraic subobjects.
  For example, it could be used to prove that the lift of a collection
  of linear_maps on a union of submodules preserves scalar multiplication. -/
theorem iUnionLift_unary (u : T → T) (ui : ∀ i, S i → S i)
    (hui :
      ∀ (i) (x : S i),
        u (Set.inclusion (show S i ⊆ T from hT'.symm ▸ Set.subset_iUnion S i) x) =
          Set.inclusion (show S i ⊆ T from hT'.symm ▸ Set.subset_iUnion S i) (ui i x))
    (uβ : β → β) (h : ∀ (i) (x : S i), f i (ui i x) = uβ (f i x)) (x : T) :
    iUnionLift S f hf T (le_of_eq hT') (u x) = uβ (iUnionLift S f hf T (le_of_eq hT') x)

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

(hui : ∀ (i : ι) (x : ↑(S i)), u (Set.inclusion ⋯ x) = Set.inclusion ⋯ (ui i x))

(uβ : β → β)

(h : ∀ (i : ι) (x : ↑(S i)), f i (ui i x) = uβ (f i x))

Set.iUnionLift S f hf T ⋯ (u x) = uβ (Set.iUnionLift S f hf T ⋯ x)


@[to_additive]
theorem fixedBy_mul (m₁ m₂ : M) : fixedBy α m₁ ∩ fixedBy α m₂ ⊆ fixedBy α (m₁ * m₂)

(α : Type u_1)
{M : Type u_3}
[Monoid M]
[MulAction M α]
(m₁ m₂ : M)

MulAction.fixedBy α m₁ ∩ MulAction.fixedBy α m₂ ⊆ MulAction.fixedBy α (m₁ * m₂)


theorem not_wellFounded_of_decreasing_seq (f : ((· > ·) : ℕ → ℕ → Prop) ↪r r) : ¬WellFounded r

{α : Type u_1}
{r : α → α → Prop}
[IsStrictOrder α r]
(f : (fun x x_1 => x > x_1) ↪r r)


protected theorem comm [Monoid α] {x y : α} : x ~ᵤ y ↔ y ~ᵤ x


theorem Subalgebra.separatesPoints_monotone :
    Monotone fun s : Subalgebra R C(α, A) => s.SeparatesPoints

{α : Type u_1}
[TopologicalSpace α]
{R : Type u_2}
[CommSemiring R]
{A : Type u_3}
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[TopologicalSemiring A]


@[to_additive]
theorem mem_carrier {s : Submonoid M} {x : M} : x ∈ s.carrier ↔ x ∈ s

{M : Type u_1}
[MulOneClass M]
{s : Submonoid M}
{x : M}


@[to_additive]
theorem finprod_emb_domain' {f : α → β} (hf : Injective f) [DecidablePred (· ∈ Set.range f)]
    (g : α → M) :
    (∏ᶠ b : β, if h : b ∈ Set.range f then g (Classical.choose h) else 1) = ∏ᶠ a : α, g a

[DecidablePred fun x => x ∈ Set.range f]

(∏ᶠ (b : β), if h : b ∈ Set.range f then g (Classical.choose h) else 1) = ∏ᶠ (a : α), g a


lemma ad_mem_ker_killingForm_ad_range_of_mem_orthogonal
    {D : LieDerivation R L L} (hD : D ∈ 𝕀ᗮ) (x : L) :
    ad R L (D x) ∈ (LinearMap.ker (killingForm R 𝕀)).map (LieHom.range (ad R L)).subtype

(hD : D ∈ (killingForm R (LieDerivation R L L)).orthogonal (LieDerivation.ad R L).range.toSubmodule)

(LieDerivation.ad R L) (D x) ∈
  Submodule.map (LieDerivation.ad R L).range.subtype (LinearMap.ker (killingForm R ↥(LieDerivation.ad R L).range))


@[simp]
theorem monotone_toDual_comp_iff : Monotone (toDual ∘ f : α → βᵒᵈ) ↔ Antitone f

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}

Monotone (⇑OrderDual.toDual ∘ f) ↔ Antitone f


/--
Given two relations `r, s` on `α` such that `r ≤ s`, any relation series of `r` induces a relation
series of `s`
-/
@[simps!]
def ofLE (x : RelSeries r) {s : Rel α α} (h : r ≤ s) : RelSeries s

{α : Type u_1}
{r : Rel α α}
(x : RelSeries r)
{s : Rel α α}
(h : r ≤ s)


/-- A pushout cocone on `f` and `g` is determined by morphisms `inl : Y ⟶ W` and `inr : Z ⟶ W` such
    that `f ≫ inl = g ↠ inr`. -/
@[simps]
def mk {W : C} (inl : Y ⟶ W) (inr : Z ⟶ W) (eq : f ≫ inl = g ≫ inr) : PushoutCocone f g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
{W : C}
(inl : Y ⟶ W)
(inr : Z ⟶ W)
(eq : f ≫ inl = g ≫ inr)
(j : CategoryTheory.Limits.WalkingSpan)

(CategoryTheory.Limits.PushoutCocone.mk inl inr eq).ι.app j =
  Option.casesOn j (f ≫ inl) fun j' => CategoryTheory.Limits.WalkingPair.casesOn j' inl inr


@[reassoc (attr := simp)]
lemma opcyclesIsoRightHomology_inv_hom_id (hg : S.g = 0) :
    S.rightHomologyι ≫ (S.opcyclesIsoRightHomology hg).hom = 𝟙 _

CategoryTheory.CategoryStruct.comp S.rightHomologyι (S.opcyclesIsoRightHomology hg).hom =
  CategoryTheory.CategoryStruct.id S.rightHomology


theorem toReal_mem_Ioc (θ : Angle) : θ.toReal ∈ Set.Ioc (-π) π


protected theorem add_le_add_iff_right {n : Nat} : m + n ≤ k + n ↔ m ≤ k


theorem isLittleO_congr (hf : f₁ =ᶠ[l] f₂) (hg : g₁ =ᶠ[l] g₂) : f₁ =o[l] g₁ ↔ f₂ =o[l] g₂

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{l : Filter α}
{f₁ f₂ : α → E}
{g₁ g₂ : α → F}
(hf : f₁ =ᶠ[l] f₂)
(hg : g₁ =ᶠ[l] g₂)


protected lemma isNilpotent_mul_left_iff (h_comm : Commute x y) (hy : y ∈ nonZeroDivisorsLeft R) :
    IsNilpotent (x * y) ↔ IsNilpotent x

{R : Type u_1}
{x y : R}
[Semiring R]
(h_comm : Commute x y)
(hy : y ∈ nonZeroDivisorsLeft R)


@[to_additive (attr := simp)]
theorem div_inv_eq_mul : a / b⁻¹ = a * b

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


theorem HasMFDerivWithinAt.congr_of_eventuallyEq (h : HasMFDerivWithinAt I I' f s x f')
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : HasMFDerivWithinAt I I' f₁ s x f'

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


/-- A restatement of `MetricSpace.tendsto_atTop` in terms of the norm. -/
theorem NormedAddCommGroup.tendsto_atTop [Nonempty α] [SemilatticeSup α] {β : Type*}
    [SeminormedAddCommGroup β] {f : α → β} {b : β} :
    Tendsto f atTop (𝓝 b) ↔ ∀ ε, 0 < ε → ∃ N, ∀ n, N ≤ n → ‖f n - b‖ < ε

{α : Type u_1}
[Nonempty α]
[SemilatticeSup α]
{β : Type u_5}
[SeminormedAddCommGroup β]
{f : α → β}
{b : β}

Filter.Tendsto f Filter.atTop (𝓝 b) ↔ ∀ (ε : ℝ), 0 < ε → ∃ N, ∀ (n : α), N ≤ n → ‖f n - b‖ < ε


lemma of_aeval_smul (f : R[X]) (m : M) : of R M a (aeval a f • m) = f • of R M a m

{R : Type u_1}
{A : Type u_3}
{M : Type u_2}
[CommSemiring R]
[Semiring A]
(a : A)
[Algebra R A]
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
(f : R[X])
(m : M)

(Module.AEval.of R M a) ((Polynomial.aeval a) f • m) = f • (Module.AEval.of R M a) m


theorem tendsto_ofReal {f : Filter α} {m : α → ℝ} {a : ℝ} (h : Tendsto m f (𝓝 a)) :
    Tendsto (fun a => ENNReal.ofReal (m a)) f (𝓝 (ENNReal.ofReal a))

{α : Type u_1}
{f : Filter α}
{m : α → ℝ}
{a : ℝ}
(h : Filter.Tendsto m f (𝓝 a))

Filter.Tendsto (fun a => ENNReal.ofReal (m a)) f (𝓝 (ENNReal.ofReal a))


theorem map_neg (e : M ≃SL[σ₁₂] M₂) (x : M) : e (-x) = -e x

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_3}
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]
{M₂ : Type u_4}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
(e : M ≃SL[σ₁₂] M₂)
(x : M)


theorem piecewise_apply (i : ι) : x.piecewise y s i = if i ∈ s then x i else y i

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(x y : Π₀ (i : ι), β i)
(s : Set ι)
[(i : ι) → Decidable (i ∈ s)]
(i : ι)

(x.piecewise y s) i = if i ∈ s then x i else y i


protected theorem min_eq_left {a b : Int} (h : a ≤ b) : min a b = a


@[to_additive]
theorem ker_eq_bot_iff (f : G →* M) : f.ker = ⊥ ↔ Function.Injective f

{G : Type u_1}
[AddGroup G]
{M : Type u_7}
[AddZeroClass M]
(f : G →+ M)


theorem iUnion_mono' {s : ι → Set α} {t : ι₂ → Set α} (h : ∀ i, ∃ j, s i ⊆ t j) :
    ⋃ i, s i ⊆ ⋃ i, t i

{α : Type u_1}
{ι : Sort u_4}
{ι₂ : Sort u_6}
{s : ι → Set α}
{t : ι₂ → Set α}
(h : ∀ (i : ι), ∃ j, s i ⊆ t j)


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable])) const_nsmul]
protected theorem pow [Monoid β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (n : ℕ) :
    AEStronglyMeasurable (f ^ n) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (f ^ n) μ


/-- For `r` strictly smaller than the radius of `p`, then `‖pₙ‖ rⁿ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries 𝕜 E F) {r : ℝ≥0}
    (h0 : 0 < r) (h : (r : ℝ≥0∞) < p.radius) : ∃ C > 0, ∀ n, ‖p n‖ ≤ C / (r : ℝ) ^ n

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{r : ℝ≥0}
(h0 : 0 < r)
(h : ↑r < p.radius)


/-- The action of the galois group on infinite places. -/
@[simps! smul_coe_apply]
instance : MulAction (K ≃ₐ[k] K) (InfinitePlace K)

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
(σ : K ≃ₐ[k] K)
(w : NumberField.InfinitePlace K)

∀ (a : K), ↑(SMul.smul σ w) a = ↑w (σ.symm a)


@[simp] lemma comp_lt_comp : comp a < comp b ↔ b < a

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

Booleanisation.comp a < Booleanisation.comp b ↔ b < a


/-- If a function admits a finite power series expansion on a disk, then it is continuous there. -/
protected theorem HasFiniteFPowerSeriesOnBall.continuousOn
    (hf : HasFiniteFPowerSeriesOnBall f p x n r) :
    ContinuousOn f (EMetric.ball x r)


/-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C

[CategoryTheory.LocallySmall.{w, v, u} C]

(CategoryTheory.ShrinkHoms.equivalence C).unitIso.hom.app X = 𝟙 X


theorem ConvexOn.lt_left_of_right_lt' (hf : ConvexOn 𝕜 s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s)
    {a b : 𝕜} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfy : f y < f (a • x + b • y)) :
    f (a • x + b • y) < f x

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
{x y : E}
(hx : x ∈ s)
(hy : y ∈ s)
{a b : 𝕜}
(ha : 0 < a)
(hb : 0 < b)
(hab : a + b = 1)
(hfy : f y < f (a • x + b • y))


@[to_additive]
lemma mul_not_mem_of_exponent_two (h : Monoid.exponent G = 2) {x y : G}
    (hx : x ≠ 1) (hy : y ≠ 1) (hxy : x ≠ y) : x * y ∉ ({x, y, 1} : Set G)

{G : Type u}
[Group G]
(h : Monoid.exponent G = 2)
{x y : G}
(hx : x ≠ 1)
(hy : y ≠ 1)
(hxy : x ≠ y)


@[simp]
theorem not_irreducible_one [Monoid α] : ¬Irreducible (1 : α)


theorem restrict_top_presheaf (X : PresheafedSpace C) :
    (X.restrict (Opens.openEmbedding ⊤)).presheaf =
      (Opens.inclusionTopIso X.carrier).inv _* X.presheaf

(X : AlgebraicGeometry.PresheafedSpace C)

(X.restrict ⋯).presheaf = (TopCat.Presheaf.pushforward C (TopologicalSpace.Opens.inclusionTopIso ↑X).inv).obj X.presheaf


lemma BoundaryGE.not_mem {j : ι} (hj : e.BoundaryGE j) {i' : ι'} (hi' : c'.Rel i' (e.f j))
    (a : ι) : e.f a ≠ i'

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
{e : c.Embedding c'}
{j : ι}
(hj : e.BoundaryGE j)
{i' : ι'}
(hi' : c'.Rel i' (e.f j))
(a : ι)


/-- The set of fixed points of the conjugation action of `G` on itself is the center of `G`. -/
theorem fixedPoints_eq_center : fixedPoints (ConjAct G) G = center G

MulAction.fixedPoints (ConjAct G) G = ↑(Subgroup.center G)


@[simp, reassoc]
lemma induced_shiftIso_hom_app_obj (n a a' : M) (ha' : n + a = a') (X : C) :
    letI := (induced e M F' e')
    (F.shiftIso n a a' ha').hom.app (L.obj X) =
      (F.shift a).map ((L.commShiftIso n).inv.app X) ≫ (e' a).hom.app (X⟦n⟧) ≫
        (G.shiftIso n a a' ha').hom.app X ≫ (e' a').inv.app X

[((CategoryTheory.whiskeringLeft C D A).obj L).Full]

[((CategoryTheory.whiskeringLeft C D A).obj L).Faithful]

(F.shiftIso n a a' ha').hom.app (L.obj X) =
  (F.shift a).map ((L.commShiftIso n).inv.app X) ≫
    (e' a).hom.app ((CategoryTheory.shiftFunctor C n).obj X) ≫ (G.shiftIso n a a' ha').hom.app X ≫ (e' a').inv.app X


theorem add_le (ha : a ≤ c) (hb : b ≤ c) : a + b ≤ c

{α : Type u_1}
[IdemSemiring α]
{a b c : α}
(ha : a ≤ c)
(hb : b ≤ c)


lemma div_mul_div_cancel (a : G₀) (hc : c ≠ 0) : a / c * (c / b) = a / b

{G₀ : Type u_3}
[GroupWithZero G₀]
{b c : G₀}
(a : G₀)
(hc : c ≠ 0)


/-- The braiding isomorphism `X ⊗ Y ≅ Y ⊗ X` in `Dial C`. -/
@[simps!] def braiding (X Y : Dial C) : tensorObj X Y ≅ tensorObj Y X

(X.braiding Y).hom.f = CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst


@[simp]
lemma map_c₆ : (W.map φ).c₆ = φ W.c₆

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


theorem castAdd_natAdd (p m : Nat) {n : Nat} (i : Fin n) :
    castAdd p (natAdd m i) = cast (Nat.add_assoc ..).symm (natAdd m (castAdd p i))

Fin.castAdd p (Fin.natAdd m i) = Fin.cast ⋯ (Fin.natAdd m (Fin.castAdd p i))


@[to_additive (attr := simp)]
theorem pow_left (h : Commute a b) (n : ℕ) : Commute (a ^ n) b

{M : Type u_2}
[AddMonoid M]
{a b : M}
(h : AddCommute a b)
(n : ℕ)