lemma homologySequenceδ_triangleh (n₀ : ℤ) (n₁ : ℤ) (h : n₀ + 1 = n₁) :
    (homologyFunctor C (up ℤ) 0).homologySequenceδ (triangleh S.f) n₀ n₁ h =
      (homologyFunctorFactors C (up ℤ) n₀).hom.app _ ≫
        HomologicalComplex.homologyMap (descShortComplex S) n₀ ≫ hS.δ n₀ n₁ h ≫
          (homologyFunctorFactors C (up ℤ) n₁).inv.app _

{S : CategoryTheory.ShortComplex (CochainComplex C ℤ)}

(HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).homologySequenceδ (CochainComplex.mappingCone.triangleh S.f)
    n₀ n₁ h =
  (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) n₀).hom.app (CochainComplex.mappingCone S.f) ≫
    HomologicalComplex.homologyMap (CochainComplex.mappingCone.descShortComplex S) n₀ ≫
      hS.δ n₀ n₁ h ≫ (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) n₁).inv.app S.X₁


@[simp]
theorem conj_inv_apply [Group G] (g h : G) : (conj g)⁻¹ h = g⁻¹ * h * g


@[simp]
theorem get_map (n : ℕ) (s : Stream' α) : get (map f s) n = f (get s n)

{α : Type u}
{β : Type v}
(f : α → β)
(n : ℕ)
(s : Stream' α)


theorem dominatedFinMeasAdditive_condexpInd (hm : m ≤ m0) (μ : Measure α)
    [SigmaFinite (μ.trim hm)] :
    DominatedFinMeasAdditive μ (condexpInd G hm μ : Set α → G →L[ℝ] α →₁[μ] G) 1

{α : Type u_1}
(G : Type u_5)
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
[NormedSpace ℝ G]
(hm : m ≤ m0)
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite (μ.trim hm)]

MeasureTheory.DominatedFinMeasAdditive μ (MeasureTheory.condexpInd G hm μ) 1


theorem forall_insert_of_forall {P : α → Prop} {a : α} {s : Set α} (H : ∀ x, x ∈ s → P x) (ha : P a)
    (x) (h : x ∈ insert a s) : P x

{α : Type u}
{P : α → Prop}
{a : α}
{s : Set α}
(H : ∀ x ∈ s, P x)
(ha : P a)
(x : α)
(h : x ∈ insert a s)


lemma sin_sq_eq_half_sub : sin x ^ 2 = 1 / 2 - cos (2 * x) / 2

Real.sin x ^ 2 = 1 / 2 - Real.cos (2 * x) / 2


theorem lt_mul_succ_div (a) {b : Ordinal} (h : b ≠ 0) : a < b * succ (a / b)

(a : Ordinal.{u_4})
{b : Ordinal.{u_4}}
(h : b ≠ 0)


theorem IsCompact.exists_isOpen_closure_subset {K U : Set X} (hK : IsCompact K) (hU : U ∈ 𝓝ˢ K) :
    ∃ V, IsOpen V ∧ K ⊆ V ∧ closure V ⊆ U

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
{K U : Set X}
(hK : IsCompact K)
(hU : U ∈ 𝓝ˢ K)


theorem prod_preimage_eq {f : γ → α} {g : δ → β} :
    (f ⁻¹' s) ×ˢ (g ⁻¹' t) = (fun p : γ × δ => (f p.1, g p.2)) ⁻¹' s ×ˢ t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{s : Set α}
{t : Set β}
{f : γ → α}
{g : δ → β}

(f ⁻¹' s) ×ˢ (g ⁻¹' t) = (fun p => (f p.1, g p.2)) ⁻¹' s ×ˢ t


@[simp]
theorem coe_compMultilinearMap (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂) :
    ⇑(g.compMultilinearMap f) = g ∘ f

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
{M₃ : Type v₃}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[Module R M₃]
(g : M₂ →ₗ[R] M₃)
(f : MultilinearMap R M₁ M₂)


theorem t0Space_iff_not_inseparable (X : Type u) [TopologicalSpace X] :
    T0Space X ↔ Pairwise fun x y : X => ¬Inseparable x y

T0Space X ↔ Pairwise fun x y => ¬Inseparable x y


@[simp, norm_cast]
theorem cast_lt [LinearOrderedSemiring α] {m n : Num} : (m : α) < n ↔ m < n

{α : Type u_1}
[LinearOrderedSemiring α]
{m n : Num}


theorem prod_mono_right (s : NonUnitalSubsemiring R) :
    Monotone fun t : NonUnitalSubsemiring S => s.prod t

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(s : NonUnitalSubsemiring R)


theorem Fin.circulant_mul [Semiring α] :
    ∀ {n} (v w : Fin n → α), circulant v * circulant w = circulant (circulant v *ᵥ w)

{α : Type u_1}
[Semiring α]
{n : ℕ}
(v w : Fin n → α)

Matrix.circulant v * Matrix.circulant w = Matrix.circulant ((Matrix.circulant v).mulVec w)


theorem not_wSameSide_bot (x y : P) : ¬(⊥ : AffineSubspace R P).WSameSide x y

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


@[simp, mfld_simps]
theorem mfderiv_const :
    mfderiv I I' (fun _ : M => c) x = (0 : TangentSpace I x →L[𝕜] TangentSpace I' c)

{𝕜 : 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']
{x : M}
{c : M'}


theorem DifferentiableOn.ccos (hc : DifferentiableOn ℂ f s) :
    DifferentiableOn ℂ (fun x => Complex.cos (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{s : Set E}
(hc : DifferentiableOn ℂ f s)


@[simp]
theorem comp_zero (p : Seminorm 𝕜₂ E₂) : p.comp (0 : E →ₛₗ[σ₁₂] E₂) = 0

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[AddCommGroup E]
[AddCommGroup E₂]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
(p : Seminorm 𝕜₂ E₂)


@[simp]
theorem mem_equalizer (φ ψ : F) (x : A) :
    x ∈ NonUnitalStarAlgHom.equalizer φ ψ ↔ φ x = ψ x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(φ ψ : F)
(x : A)


/-- Constructs an equivalence between linear orders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : LinOrd.{u}} (e : α ≃o β) : α ≅ β


@[ext]
theorem CoconeMorphism.ext {c c' : Cocone F} (f g : c ⟶ c') (w : f.hom = g.hom) : f = g

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{c c' : CategoryTheory.Limits.Cocone F}
(f g : c ⟶ c')
(w : f.hom = g.hom)


@[simp]
protected theorem liftOn₂'_mk [t : Setoid β] (f : α → β → γ) (h) (a : α) (b : β) :
    Quotient.liftOn₂' (Quotient.mk s a) (Quotient.mk t b) f h = f a b

(f : α → β → γ)

(h : ∀ (a₁ : α) (a₂ : β) (b₁ : α) (b₂ : β), Setoid.r a₁ b₁ → Setoid.r a₂ b₂ → f a₁ a₂ = f b₁ b₂)


/-- The obvious functor `WidePushoutShape J ⥤ (WidePullbackShape J)ᵒᵖ` -/
@[simps]
def widePushoutShapeOp : WidePushoutShape J ⥤ (WidePullbackShape J)ᵒᵖ

{X Y : CategoryTheory.Limits.WidePushoutShape J}

∀ (a : X ⟶ Y), (CategoryTheory.Limits.widePushoutShapeOp J).map a = CategoryTheory.Limits.widePushoutShapeOpMap J X Y a


protected theorem neg_of_neg_pos {a : Int} (h : 0 < -a) : a < 0


@[reassoc (attr := simp)] lemma w₀₂_τ₁ : S.v₀₁.τ₁ ≫ S.v₁₂.τ₁ = 0

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.CategoryStruct.comp S.v₀₁.τ₁ S.v₁₂.τ₁ = 0


theorem cons_subperm_of_mem {a : α} {l₁ l₂ : List α} (d₁ : Nodup l₁) (h₁ : a ∉ l₁) (h₂ : a ∈ l₂)
    (s : l₁ <+~ l₂) : a :: l₁ <+~ l₂

{α : Type u_1}
{a : α}
{l₁ l₂ : List α}
(d₁ : l₁.Nodup)
(h₁ : a ∉ l₁)
(h₂ : a ∈ l₂)
(s : l₁.Subperm l₂)


@[to_additive]
theorem multipliable_congr (hfg : ∀ b, f b = g b) : Multipliable f ↔ Multipliable g

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f g : β → α}
(hfg : ∀ (b : β), f b = g b)


theorem mem_treesOfNumNodesEq_numNodes (x : Tree Unit) : x ∈ treesOfNumNodesEq x.numNodes


/-- **Jensen's inequality**: if a function `g : E → ℝ` is concave and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points of a set `t` to `s`, then the average value of `g ∘ f` over `t` is less than or
equal to the value of `g` at the average value of `f` over `t` provided that both `f` and `g ∘ f`
are integrable. -/
theorem ConcaveOn.le_map_set_average (hg : ConcaveOn ℝ s g) (hgc : ContinuousOn g s)
    (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)
    (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :
    (⨍ x in t, g (f x) ∂μ) ≤ g (⨍ x in t, f x ∂μ)

(hfs : ∀ᵐ (x : α) ∂μ.restrict t, f x ∈ s)

(hfi : MeasureTheory.IntegrableOn f t μ)

(hgi : MeasureTheory.IntegrableOn (g ∘ f) t μ)

⨍ (x : α) in t, g (f x) ∂μ ≤ g (⨍ (x : α) in t, f x ∂μ)


theorem Ico_eq_range' : Ico a b = ⟨List.range' a (b - a), List.nodup_range' _ _⟩

Finset.Ico a b = { val := ↑(List.range' a (b - a)), nodup := ⋯ }


theorem bot_isMaximal : IsMaximal (⊥ : Ideal K)


/-- `Multiplicative (Additive H)` is just `H`. -/
@[simps!]
def MulEquiv.multiplicativeAdditive [MulOneClass H] : Multiplicative (Additive H) ≃* H

(MulEquiv.multiplicativeAdditive H).symm a = Multiplicative.ofAdd (Additive.ofMul a)


@[to_additive]
theorem mem_map_equiv {f : G ≃* N} {K : Subgroup G} {x : N} :
    x ∈ K.map f.toMonoidHom ↔ f.symm x ∈ K

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G ≃* N}
{K : Subgroup G}
{x : N}

x ∈ Subgroup.map f.toMonoidHom K ↔ f.symm x ∈ K


/-- `Complex.abs (Complex.exp z) → ∞` as `Complex.re z → ∞`. -/
theorem tendsto_exp_comap_re_atTop : Tendsto exp (comap re atTop) (cobounded ℂ)

Filter.Tendsto Complex.exp (Filter.comap Complex.re Filter.atTop) (Bornology.cobounded ℂ)


theorem MapsTo.inter_inter (h₁ : MapsTo f s₁ t₁) (h₂ : MapsTo f s₂ t₂) :
    MapsTo f (s₁ ∩ s₂) (t₁ ∩ t₂)

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


@[simp]
theorem conjugateEquiv_symm_id : (conjugateEquiv adj₁ adj₁).symm (𝟙 _) = 𝟙 _

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

(CategoryTheory.conjugateEquiv adj₁ adj₁).symm (CategoryTheory.CategoryStruct.id R₁) =
  CategoryTheory.CategoryStruct.id L₁


@[simp]
theorem fderiv_arctan (hc : DifferentiableAt ℝ f x) :
    fderiv ℝ (fun x => arctan (f x)) x = (1 / (1 + f x ^ 2)) • fderiv ℝ f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)

fderiv ℝ (fun x => Real.arctan (f x)) x = (1 / (1 + f x ^ 2)) • fderiv ℝ f x


@[simp]
theorem aeval_C (r : R) : aeval x (C r) = algebraMap R A r

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
(r : R)

(Polynomial.aeval x) (Polynomial.C r) = (algebraMap R A) r


theorem modOf_apply_self_add (x : k[G]) (g : G) (d : G) : (x %ᵒᶠ g) (g + d) = 0

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(x : AddMonoidAlgebra k G)
(g d : G)


@[simp]
theorem iUnion_unionComplToSubordinate_boxes (π₁ : TaggedPrepartition I) (π₂ : Prepartition I)
    (hU : π₂.iUnion = ↑I \ π₁.iUnion) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π₁.unionComplToSubordinate π₂ hU r).iUnion = I

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
(π₁ : BoxIntegral.TaggedPrepartition I)
(π₂ : BoxIntegral.Prepartition I)
(hU : π₂.iUnion = ↑I \ π₁.iUnion)
(r : (ι → ℝ) → ↑(Set.Ioi 0))

(π₁.unionComplToSubordinate π₂ hU r).iUnion = ↑I


@[simp]
theorem length_sub : (s - t).length = s.length + t.length

{α : Type u_2}
[OrderedAddCommGroup α]
(s t : NonemptyInterval α)


@[simp, norm_cast]
theorem coe_sub (x y : s) : (↑(x - y) : K) = ↑x - ↑y

{K : Type u}
[DivisionRing K]
(s : Subfield K)
(x y : ↥s)


@[simp, norm_cast] lemma coe_onFinset (s : Finset α) (f : α → M) (hf) : onFinset s f hf = f

{α : Type u_1}
{M : Type u_5}
[Zero M]
(s : Finset α)
(f : α → M)
(hf : ∀ (a : α), f a ≠ 0 → a ∈ s)


theorem symmetric_disjoint : Symmetric (Disjoint : α → α → Prop)

{α : Type u_1}
[PartialOrder α]
[OrderBot α]


theorem liftRel_append (R : α → β → Prop) {s1 s2 : WSeq α} {t1 t2 : WSeq β} (h1 : LiftRel R s1 t1)
    (h2 : LiftRel R s2 t2) : LiftRel R (append s1 s2) (append t1 t2)

{α : Type u}
{β : Type v}
(R : α → β → Prop)
{s1 s2 : Stream'.WSeq α}
{t1 t2 : Stream'.WSeq β}
(h1 : Stream'.WSeq.LiftRel R s1 t1)
(h2 : Stream'.WSeq.LiftRel R s2 t2)

Stream'.WSeq.LiftRel R (s1.append s2) (t1.append t2)


theorem le_span_singleton_iff {s : Submodule R M} {v₀ : M} :
    (s ≤ R ∙ v₀) ↔ ∀ v ∈ s, ∃ r : R, r • v₀ = v

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Submodule R M}
{v₀ : M}

s ≤ Submodule.span R {v₀} ↔ ∀ v ∈ s, ∃ r, r • v₀ = v


@[simp]
theorem self_module_ker_eq_center : LieModule.ker R L L = center R L

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]

LieModule.ker R L L = LieAlgebra.center R L


theorem Integrable.comp_mul_left' {g : ℝ → F} (hg : Integrable g) {R : ℝ} (hR : R ≠ 0) :
    Integrable fun x => g (R * x)

(hg : MeasureTheory.Integrable g MeasureTheory.volume)

MeasureTheory.Integrable (fun x => g (R * x)) MeasureTheory.volume


theorem iUnion_diff (s : Set β) (t : ι → Set β) : (⋃ i, t i) \ s = ⋃ i, t i \ s

{β : Type u_2}
{ι : Sort u_4}
(s : Set β)
(t : ι → Set β)


theorem mem_accepts {x : List α} : x ∈ M.accepts ↔ M.eval x ∈ M.accept

{α : Type u}
{σ : Type v}
(M : DFA α σ)
{x : List α}


protected theorem ne_of_lt' : ∀{a b : Nat}, a < b → b ≠ a


/-- The Hausdorff distance is controlled by the diameter of the union. -/
theorem hausdorffEdist_le_ediam (hs : s.Nonempty) (ht : t.Nonempty) :
    hausdorffEdist s t ≤ diam (s ∪ t)

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}
(hs : s.Nonempty)
(ht : t.Nonempty)

EMetric.hausdorffEdist s t ≤ EMetric.diam (s ∪ t)


/-- To show a category is an `InitialMonoClass` it suffices to show the unique morphism from an
initial object to a terminal object is a monomorphism. -/
theorem InitialMonoClass.of_isTerminal {I T : C} (hI : IsInitial I) (hT : IsTerminal T)
    (_ : Mono (hI.to T)) : InitialMonoClass C

(hI : CategoryTheory.Limits.IsInitial I)

(hT : CategoryTheory.Limits.IsTerminal T)

CategoryTheory.Mono (hI.to T) → CategoryTheory.Limits.InitialMonoClass C


theorem count_ne_zero' (hs' : s.Nonempty) (s_mble : MeasurableSet s) : count s ≠ 0

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
(hs' : s.Nonempty)
(s_mble : MeasurableSet s)


@[to_additive (attr := simp) prod_unique]
theorem prod_unique (f : M →ₙ* N × P) : ((fst N P).comp f).prod ((snd N P).comp f) = f

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Mul M]
[Mul N]
[Mul P]
(f : M →ₙ* N × P)

((MulHom.fst N P).comp f).prod ((MulHom.snd N P).comp f) = f


@[simp]
theorem one_toPGame_leftMoves_default_eq :
    (default : (toPGame 1).LeftMoves) = @toLeftMovesToPGame 1 ⟨0, Set.mem_Iio.mpr zero_lt_one⟩

default = Ordinal.toLeftMovesToPGame ⟨0, ⋯⟩


@[to_additive]
theorem trivial_ker_iff_eq_one {f : G → H} (hf : IsGroupHom f) :
    ker f = trivial G ↔ ∀ x, f x = 1 → x = 1

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)

IsAddGroupHom.ker f = IsAddSubgroup.trivial G ↔ ∀ (x : G), f x = 0 → x = 0


theorem prod_sInter {T : Set (Set β)} (hT : T.Nonempty) (s : Set α) :
    s ×ˢ ⋂₀ T = ⋂ t ∈ T, s ×ˢ t

{α : Type u_1}
{β : Type u_2}
{T : Set (Set β)}
(hT : T.Nonempty)
(s : Set α)

s ×ˢ ⋂₀ T = ⋂ t ∈ T, s ×ˢ t


theorem nullMeasurableSet_empty : NullMeasurableSet ∅ μ

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


@[to_additive (attr := simp)]
theorem units_val_iff : Commute (u₁ : M) u₂ ↔ Commute u₁ u₂


@[simp]
theorem transpose_sub [Sub α] (M : Matrix m n α) (N : Matrix m n α) : (M - N)ᵀ = Mᵀ - Nᵀ

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


@[simp]
theorem factorization_prod_pow_eq_self {n : ℕ} (hn : n ≠ 0) : n.factorization.prod (· ^ ·) = n

(n.factorization.prod fun x x_1 => x ^ x_1) = n


@[to_additive le_of_nsmul_le_nsmul_right]
theorem le_of_pow_le_pow_left' {a b : M} {n : ℕ} (hn : n ≠ 0) : a ^ n ≤ b ^ n → a ≤ b

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

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


theorem contMDiffOn_congr (h₁ : ∀ y ∈ s, f₁ y = f y) :
    ContMDiffOn I I' n f₁ s ↔ ContMDiffOn I I' n f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{s : Set M}
{n : ℕ∞}
(h₁ : ∀ y ∈ s, f₁ y = f y)


lemma csInf_mem_of_not_isPredLimit
    (hne : s.Nonempty) (hbdd : BddBelow s) (hlim : ¬ IsPredLimit (sInf s)) :
    sInf s ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
(hne : s.Nonempty)
(hbdd : BddBelow s)
(hlim : ¬Order.IsPredLimit (sInf s))


@[simp]
theorem ofConeEquiv_apply_desc {D : Type u₄} [Category.{v₄} D] {G : K ⥤ D} (h : Cone G ≌ Cone F)
    {c : Cone G} (P : IsLimit (h.functor.obj c)) (s) :
    (ofConeEquiv h P).lift s =
      ((h.unitIso.hom.app s).hom ≫ (h.inverse.map (P.liftConeMorphism (h.functor.obj s))).hom) ≫
        (h.unitIso.inv.app c).hom

(h : CategoryTheory.Limits.Cone G ≌ CategoryTheory.Limits.Cone F)

(P : CategoryTheory.Limits.IsLimit (h.functor.obj c))

((CategoryTheory.Limits.IsLimit.ofConeEquiv h) P).lift s =
  ((h.unitIso.hom.app s).hom ≫ (h.inverse.map (P.liftConeMorphism (h.functor.obj s))).hom) ≫ (h.unitIso.inv.app c).hom


theorem Tendsto.curry {f : α → β → γ} {la : Filter α} {lb : Filter β} {lc : Filter γ}
    (h : ∀ᶠ a in la, Tendsto (fun b : β => f a b) lb lc) : Tendsto (↿f) (la.curry lb) lc

{f : α → β → γ}

(h : ∀ᶠ (a : α) in la, Filter.Tendsto (fun b => f a b) lb lc)


lemma not_hasEigenvalue_zero_tfae (φ : Module.End K M) :
    List.TFAE [
      ¬ Module.End.HasEigenvalue φ 0,
      ¬ IsRoot (minpoly K φ) 0,
      constantCoeff φ.charpoly ≠ 0,
      LinearMap.det φ ≠ 0,
      ker φ = ⊥,
      ∀ (m : M), φ m = 0 → m = 0 ]

{K : Type u_2}
{M : Type u_3}
[Field K]
[AddCommGroup M]
[Module K M]
[Module.Finite K M]
(φ : Module.End K M)

[¬φ.HasEigenvalue 0, ¬(minpoly K φ).IsRoot 0, Polynomial.constantCoeff (LinearMap.charpoly φ) ≠ 0, LinearMap.det φ ≠ 0,
    LinearMap.ker φ = ⊥, ∀ (m : M), φ m = 0 → m = 0].TFAE


theorem le_of_one_div_le_one_div (ha : 0 < a) (h : 1 / a ≤ 1 / b) : b ≤ a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(h : 1 / a ≤ 1 / b)


/-- A nontrivial torsion-free group is not torsion. -/
@[to_additive AddMonoid.IsTorsionFree.not_torsion
      "A nontrivial torsion-free additive group is not torsion."]
theorem IsTorsionFree.not_torsion [hN : Nontrivial G] : IsTorsionFree G → ¬IsTorsion G

{G : Type u_1}
[Group G]
[hN : Nontrivial G]

Monoid.IsTorsionFree G → ¬Monoid.IsTorsion G


theorem gauge_lt_of_mem_smul (x : E) (ε : ℝ) (hε : 0 < ε) (hs₂ : IsOpen s) (hx : x ∈ ε • s) :
    gauge s x < ε

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
[TopologicalSpace E]
[ContinuousSMul ℝ E]
(x : E)
(ε : ℝ)
(hε : 0 < ε)
(hs₂ : IsOpen s)
(hx : x ∈ ε • s)


protected theorem add_comm (x y : X[S⁻¹]) : x + y = y + x

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddCommMonoid X]
[DistribMulAction R X]
(x y : OreLocalization S X)


@[simp]
theorem quot_neg (a : PGame) : (⟦-a⟧ : Game) = -⟦a⟧


@[to_additive]
theorem mem_leftTransversals_iff_existsUnique_inv_mul_mem :
    S ∈ leftTransversals T ↔ ∀ g : G, ∃! s : S, (s : G)⁻¹ * g ∈ T

{G : Type u_1}
[AddGroup G]
{S T : Set G}

S ∈ AddSubgroup.leftTransversals T ↔ ∀ (g : G), ∃! s, -↑s + g ∈ T


theorem subtypeOrLeftEmbedding_apply_right {p q : α → Prop} [DecidablePred p]
    (x : { x // p x ∨ q x }) (hx : ¬p x) :
    subtypeOrLeftEmbedding p q x = Sum.inr ⟨x, x.prop.resolve_left hx⟩

{α : Type u_1}
{p q : α → Prop}
[DecidablePred p]
(x : { x // p x ∨ q x })
(hx : ¬p ↑x)

(subtypeOrLeftEmbedding p q) x = Sum.inr ⟨↑x, ⋯⟩


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

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

((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).inverse.obj K).X.X n = (K.X n).X


/-- To show `P (LinearMap.det f)` it suffices to consider `P (Matrix.det (toMatrix _ _ f))` and
`P 1`. -/
-- @[elab_as_elim] -- Porting note: This attr can't be applied.
theorem det_cases [DecidableEq M] {P : A → Prop} (f : M →ₗ[A] M)
    (hb : ∀ (s : Finset M) (b : Basis s A M), P (Matrix.det (toMatrix b b f))) (h1 : P 1) :
    P (LinearMap.det f)

(hb : ∀ (s : Finset M) (b : Basis { x // x ∈ s } A M), P ((LinearMap.toMatrix b b) f).det)


/-- The extension of a compatible family to the generated sieve is compatible. -/
theorem FamilyOfElements.Compatible.sieveExtend {x : FamilyOfElements P R} (hx : x.Compatible) :
    x.sieveExtend.Compatible

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

{x : CategoryTheory.Presieve.FamilyOfElements P R}


theorem maximals_subset : maximals r s ⊆ s

{α : Type u_1}
(r : α → α → Prop)
(s : Set α)


theorem inject_dummies_lem (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)
    (p : Poly (α ⊕ β)) (v : α → ℕ) :
    (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, p.map (inl ⊗ inr ∘ f) (v ⊗ t) = 0

{α β γ : Type u}
(f : β → γ)
(g : γ → Option β)
(inv : ∀ (x : β), g (f x) = some x)
(p : Poly (α ⊕ β))
(v : α → ℕ)

(∃ t, p (v ⊗ t) = 0) ↔ ∃ t, (Poly.map (Sum.inl ⊗ Sum.inr ∘ f) p) (v ⊗ t) = 0


theorem den_eq_conts_b : g.dens n = (g.conts n).b

{K : Type u_1}
{g : GenContFract K}
{n : ℕ}
[DivisionRing K]


lemma LSeries.term_neg (f : ℕ → ℂ) (s : ℂ) : term (-f) s = -term f s


@[simp]
theorem product_cons (a : α) (l₁ : List α) (l₂ : List β) :
    (a :: l₁) ×ˢ l₂ = map (fun b => (a, b)) l₂ ++ (l₁ ×ˢ l₂)

{α : Type u_1}
{β : Type u_2}
(a : α)
(l₁ : List α)
(l₂ : List β)

(a :: l₁) ×ˢ l₂ = List.map (fun b => (a, b)) l₂ ++ l₁ ×ˢ l₂


@[to_additive]
theorem finprod_comp_equiv (e : α ≃ β) {f : β → M} : (∏ᶠ i, f (e i)) = ∏ᶠ i', f i'

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(e : α ≃ β)
{f : β → M}


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

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

(Comon_.Comon_ToMon_OpOp_obj' C A).mul = A.comul.op


@[simp]
theorem cast_zero' [Zero α] [One α] [Add α] [Neg α] : (ZNum.zero : α) = 0

{α : Type u_1}
[Zero α]
[One α]
[Add α]
[Neg α]


nonrec theorem div_le_div_left {a b c : ℝ≥0} (a0 : 0 < a) (b0 : 0 < b) (c0 : 0 < c) :
    a / b ≤ a / c ↔ c ≤ b


/-- A continuous function with compact support is strongly measurable. -/
@[to_additive]
theorem _root_.Continuous.stronglyMeasurable_of_hasCompactMulSupport
    [MeasurableSpace α] [TopologicalSpace α] [OpensMeasurableSpace α] [MeasurableSpace β]
    [TopologicalSpace β] [PseudoMetrizableSpace β] [BorelSpace β] [One β] {f : α → β}
    (hf : Continuous f) (h'f : HasCompactMulSupport f) : StronglyMeasurable f


theorem fastGrowingε₀_one : fastGrowingε₀ 1 = 2


@[to_additive]
theorem mk_left_injective (b : s) : Injective fun a => mk a b

{α : Type u_1}
[CancelCommMonoid α]
{s : Submonoid α}
(b : ↥s)

Function.Injective fun a => Localization.mk a b


theorem ker_le_ker_comp (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) :
    ker f ≤ ker (g.comp f : M →ₛₗ[τ₁₃] M₃)

{R : Type u_1}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_6}
{M₂ : Type u_8}
{M₃ : Type u_9}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{τ₁₂ : R →+* R₂}
{τ₂₃ : R₂ →+* R₃}
{τ₁₃ : R →+* R₃}
[RingHomCompTriple τ₁₂ τ₂₃ τ₁₃]
(f : M →ₛₗ[τ₁₂] M₂)
(g : M₂ →ₛₗ[τ₂₃] M₃)

LinearMap.ker f ≤ LinearMap.ker (g.comp f)


@[simp]
theorem pullbackIsoPullback_hom_snd (p : pullback f g) :
    ((pullbackIsoPullback f g).hom p : X × Y).snd = (pullback.snd f g) p

(p : CategoryTheory.Limits.pullback f g)

(↑((CategoryTheory.Limits.Types.pullbackIsoPullback f g).hom p)).2 = CategoryTheory.Limits.pullback.snd f g p


/-- The isomorphism `S₁.sc' _ i j k ≅ S₂.sc' _ i j k` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def sc'MapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k

{S₁ S₂ : CategoryTheory.ComposableArrows C n}

(CategoryTheory.ComposableArrows.sc'MapIso e h₁ h₂ i j k hij hjk hk).hom =
  CategoryTheory.ComposableArrows.sc'Map e.hom h₁ h₂ i j k ⋯ ⋯ ⋯


@[simp, norm_cast]
theorem coe_bipartiteBelow : (s.bipartiteBelow r b : Set α) = { a ∈ s | r a b }

{α : Type u_1}
{β : Type u_2}
(r : α → β → Prop)
(s : Finset α)
(b : β)
[(a : α) → Decidable (r a b)]

↑(Finset.bipartiteBelow r s b) = {a | a ∈ s ∧ r a b}


@[mono]
theorem eLpNorm_mono_measure (f : α → F) (hμν : ν ≤ μ) : eLpNorm f p ν ≤ eLpNorm f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(f : α → F)
(hμν : ν ≤ μ)

MeasureTheory.eLpNorm f p ν ≤ MeasureTheory.eLpNorm f p μ


/-- The Landau notation `f =O[l] g` where `f` and `g` are two functions on a type `α` and `l` is
a filter on `α`, means that eventually for `l`, `‖f‖` is bounded by a constant multiple of `‖g‖`.
In other words, `‖f‖ / ‖g‖` is eventually bounded, modulo division by zero issues that are avoided
by this definition. -/
irreducible_def IsBigO (l : Filter α) (f : α → E) (g : α → F) : Prop

{α : Type u_17}
{E : Type u_18}
{F : Type u_19}
[Norm E]
[Norm F]
(l : Filter α)
(f : α → E)
(g : α → F)

f =O[l] g = ∃ c, Asymptotics.IsBigOWith c l f g


@[continuity, fun_prop]
theorem continuous_sigmaMk {i : ι} : Continuous (@Sigma.mk ι σ i)

{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
{i : ι}


protected theorem nonempty (s : Ideal P) : (s : Set P).Nonempty

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


@[simp]
theorem tsub_pos_iff_lt : 0 < a - b ↔ b < a


@[to_additive (attr := simp, to_additive) (reorder := 1 2, 4 5) toDual_smul']
theorem pow_toDual [Pow α β] (a : α) (b : β) : a ^ toDual b = a ^ b

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


lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ

(hf : MeasureTheory.Integrable (fun x => Real.exp (f x)) μ)


@[to_additive bot_prod_bot]
theorem bot_prod_bot : (⊥ : Submonoid M).prod (⊥ : Submonoid N) = ⊥

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


@[simp] theorem toFin_or (x y : BitVec v) :
    BitVec.toFin (x ||| y) = BitVec.toFin x ||| BitVec.toFin y


@[simp]
theorem dropWhile_eq_self_iff : dropWhile p l = l ↔ ∀ hl : 0 < l.length, ¬p (l.get ⟨0, hl⟩)

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

List.dropWhile p l = l ↔ ∀ (hl : 0 < l.length), ¬p (l.get ⟨0, hl⟩) = true


/-- When `V` is braided the forgetful functor `Action V G` to `V` is braided. -/
@[simps!]
def forgetBraided : BraidedFunctor (Action V G) V

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)
[CategoryTheory.MonoidalCategory V]
[CategoryTheory.BraidedCategory V]
(M : Action V G)


/-- The identity strong natural transformation. -/
@[simps!]
def id : StrongOplaxNatTrans F F

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

∀ {a b : B} (f : a ⟶ b),
  ((CategoryTheory.StrongOplaxNatTrans.id F).naturality f).hom =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.rightUnitor (F.map f)).hom
      (CategoryTheory.Bicategory.leftUnitor (F.map f)).inv


@[simp]
theorem mem_dedup {a : α} {s : Multiset α} : a ∈ dedup s ↔ a ∈ s

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


/-- Symmetric statement to `Option.map_map₂_distrib_left`. -/
theorem map₂_map_left_comm {f : α' → β → γ} {g : α → α'} {f' : α → β → δ} {g' : δ → γ}
    (h_left_comm : ∀ a b, f (g a) b = g' (f' a b)) : map₂ f (a.map g) b = (map₂ f' a b).map g'

{f : α' → β → γ}

{f' : α → β → δ}

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

Option.map₂ f (Option.map g a) b = Option.map g' (Option.map₂ f' a b)


theorem IsPartition.sUnion_eq_univ {c : Set (Set α)} (hc : IsPartition c) : ⋃₀ c = Set.univ

{α : Type u_1}
{c : Set (Set α)}
(hc : Setoid.IsPartition c)


theorem iteratedDeriv_fourierIntegral {f : ℝ → E} {N : ℕ∞} {n : ℕ}
    (hf : ∀ (n : ℕ), n ≤ N → Integrable (fun x ↦ x^n • f x)) (hn : n ≤ N) :
    iteratedDeriv n (𝓕 f) = 𝓕 (fun x : ℝ ↦ (-2 * π * I * x) ^ n • f x)

(hf : ∀ (n : ℕ), ↑n ≤ N → MeasureTheory.Integrable (fun x => x ^ n • f x) MeasureTheory.volume)

iteratedDeriv n (𝓕 f) = 𝓕 fun x => (-2 * ↑π * Complex.I * ↑x) ^ n • f x


@[to_additive (attr := simp)]
theorem lift_comp : (f.lift hg).comp f.toMap = g

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


lemma pow {f : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (n : ℕ) : MeromorphicAt (f ^ n) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{f : 𝕜 → 𝕜}
{x : 𝕜}
(hf : MeromorphicAt f x)
(n : ℕ)


/--
[Stacks Lemma 00J7](https://stacks.math.columbia.edu/tag/00J7)
-/
lemma maximal_ideals_finite : {I : Ideal R | I.IsMaximal}.Finite

(R : Type u_1)
[CommRing R]
[IsArtinianRing R]


/-- Note that this is an equality of types not holding definitionally. Use wisely. -/
theorem coeSort_toFinset : ↥hs.toFinset = ↥s

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


theorem not_lt {i j : Fin n} : ¬ i < j ↔ j ≤ i


@[simp] theorem testBit_shiftRight (x : Nat) : testBit (x >>> i) j = testBit x (i+j)


theorem differentiableAt_sinh : DifferentiableAt ℝ sinh x


theorem _root_.Real.toNNReal_rpow_of_nonneg {x y : ℝ} (hx : 0 ≤ x) :
    Real.toNNReal (x ^ y) = Real.toNNReal x ^ y


theorem type_preimage {α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β ≃ α) :
    type (f ⁻¹'o r) = type r

Ordinal.type (⇑f ⁻¹'o r) = Ordinal.type r


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


theorem algebraMap_eq {R A : Type*} [CommSemiring R] [CommSemiring A] [Semiring α] [Algebra R A]
    [Algebra A α] (S : Subalgebra R A) : algebraMap S α = (algebraMap A α).comp S.val

{α : Type u_1}
{R : Type u_3}
{A : Type u_4}
[CommSemiring R]
[CommSemiring A]
[Semiring α]
[Algebra R A]
[Algebra A α]
(S : Subalgebra R A)

algebraMap (↥S) α = (algebraMap A α).comp ↑S.val


theorem dvd_iff_normalizedFactors_le_normalizedFactors {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
    x ∣ y ↔ normalizedFactors x ≤ normalizedFactors y

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
{x y : α}
(hx : x ≠ 0)
(hy : y ≠ 0)

x ∣ y ↔ UniqueFactorizationMonoid.normalizedFactors x ≤ UniqueFactorizationMonoid.normalizedFactors y


/-- `is_basis p s` means the image of `s` bounded by `p` is a filter basis. -/
structure Filter.IsBasis (p : ι → Prop) (s : ι → Set α) : Prop where
  /-- There exists at least one `i` that satisfies `p`. -/
  nonempty : ∃ i, p i
  /-- `s` is directed downwards on `i` such that `p i`. -/
  inter : ∀ {i j}, p i → p j → ∃ k, p k ∧ s k ⊆ s i ∩ s j

{α : Type u_1}
{ι : Sort u_4}
{p : ι → Prop}
{s : ι → Set α}
(self : Filter.IsBasis p s)


/-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R

(R : Type u_1)
[One R]
[Neg R]
(a : R × R × R × R)

((Quaternion.equivProd R).symm a).re = a.1


@[to_additive]
theorem quotientMap_mk_symm : QuotientMap (@mk M).symm


/-- A subgroup is normal if whenever `n ∈ H`, then `g * n * g⁻¹ ∈ H` for every `g : G` -/
structure Normal : Prop where
  /-- `N` is closed under conjugation -/
  conj_mem : ∀ n, n ∈ H → ∀ g : G, g * n * g⁻¹ ∈ H

{G : Type u_1}
[Group G]
{H : Subgroup G}
(self : H.Normal)
(n : G)


theorem ne_nil_of_length_eq_add_one (_ : length l = n + 1) : l ≠ []

∀ {α : Type u_1} {l : List α} {n : Nat}, l.length = n + 1 → l ≠ []


theorem add_nfBelow {b} : ∀ {o₁ o₂}, NFBelow o₁ b → NFBelow o₂ b → NFBelow (o₁ + o₂) b

o₁.NFBelow b → o₂.NFBelow b → (o₁ + o₂).NFBelow b


/-- The functor lifting a braided category to its center, using the braiding as the half-braiding.
-/
@[simps]
def ofBraided : MonoidalFunctor C (Center C)

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

((CategoryTheory.Center.ofBraided C).μ X Y).f =
  𝟙
    ({ obj := CategoryTheory.Center.ofBraidedObj, map := fun {X Y} f => { f := f, comm := ⋯ }, map_id := ⋯,
              map_comp := ⋯ }.obj
          X ⊗
        { obj := CategoryTheory.Center.ofBraidedObj, map := fun {X Y} f => { f := f, comm := ⋯ }, map_id := ⋯,
              map_comp := ⋯ }.obj
          Y).fst


/-- A 'dite' producing a `Pi` type `Π a, σ a`, applied to a value `a : α` is a `dite` that applies
either branch to `a`. -/
theorem dite_apply (f : P → ∀ a, σ a) (g : ¬P → ∀ a, σ a) (a : α) :
    (dite P f g) a = dite P (fun h ↦ f h a) fun h ↦ g h a

{α : Sort u_1}
{σ : α → Sort u_2}
(P : Prop)
[Decidable P]
(f : P → (a : α) → σ a)
(g : ¬P → (a : α) → σ a)
(a : α)

dite P f g a = if h : P then f h a else g h a


theorem mul_self_lt_mul_self_iff [PosMulStrictMono α] [MulPosMono α]
    {a b : α} (h1 : 0 ≤ a) (h2 : 0 ≤ b) : a < b ↔ a * a < b * b

{α : Type u}
[Semiring α]
[LinearOrder α]
[PosMulStrictMono α]
[MulPosMono α]
{a b : α}
(h1 : 0 ≤ a)
(h2 : 0 ≤ b)


theorem toΓSpecSheafedSpace_app_eq :
    X.toΓSpecSheafedSpace.c.app (op (basicOpen r)) = X.toΓSpecCApp r

(r : ↑(AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))

X.toΓSpecSheafedSpace.c.app (Opposite.op (PrimeSpectrum.basicOpen r)) = X.toΓSpecCApp r


theorem conformalFactorAt_inner_eq_mul_inner {f : E → F} {x : E} {f' : E →L[ℝ] F}
    (h : HasFDerivAt f f' x) (H : ConformalAt f x) (u v : E) :
    ⟪f' u, f' v⟫ = (conformalFactorAt H : ℝ) * ⟪u, v⟫

{E : Type u_1}
{F : Type u_2}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace ℝ E]
[InnerProductSpace ℝ F]
{f : E → F}
{x : E}
{f' : E →L[ℝ] F}
(h : HasFDerivAt f f' x)
(H : ConformalAt f x)
(u v : E)

⟪f' u, f' v⟫_ℝ = conformalFactorAt H * ⟪u, v⟫_ℝ


@[simp, nolint simpNF] protected lemma nsmul_eq_mul (m n : ℕ) : m • n = m * n


@[simp]
theorem sqrt_inj (hx : 0 ≤ x) (hy : 0 ≤ y) : √x = √y ↔ x = y


protected theorem ext_iff {f g : R ≃+* S} : f = g ↔ ∀ x, f x = g x

{R : Type u_4}
{S : Type u_5}
[Mul R]
[Mul S]
[Add R]
[Add S]
{f g : R ≃+* S}


@[measurability]
theorem AEMeasurable.indicator (hfm : AEMeasurable f μ) {s} (hs : MeasurableSet s) :
    AEMeasurable (s.indicator f) μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
[Zero β]
(hfm : AEMeasurable f μ)
{s : Set α}
(hs : MeasurableSet s)


protected theorem IsBasis.hasBasis (h : IsBasis p s) : HasBasis h.filter p s

{α : Type u_1}
{ι : Sort u_4}
{p : ι → Prop}
{s : ι → Set α}
(h : Filter.IsBasis p s)


/-- The sequence `log (stirlingSeq (m + 1)) - log (stirlingSeq (m + 2))` has the series expansion
   `∑ 1 / (2 * (k + 1) + 1) * (1 / 2 * (m + 1) + 1)^(2 * (k + 1))`
-/
theorem log_stirlingSeq_diff_hasSum (m : ℕ) :
    HasSum (fun k : ℕ => (1 : ℝ) / (2 * ↑(k + 1) + 1) * ((1 / (2 * ↑(m + 1) + 1)) ^ 2) ^ ↑(k + 1))
      (log (stirlingSeq (m + 1)) - log (stirlingSeq (m + 2)))

HasSum (fun k => 1 / (2 * ↑(k + 1) + 1) * ((1 / (2 * ↑(m + 1) + 1)) ^ 2) ^ (k + 1))
  (Real.log (Stirling.stirlingSeq (m + 1)) - Real.log (Stirling.stirlingSeq (m + 2)))


/-- The union of `{0}` with the interior of a balanced set is balanced. -/
theorem Balanced.zero_insert_interior (hA : Balanced 𝕜 A) :
    Balanced 𝕜 (insert 0 (interior A))

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{A : Set E}
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
(hA : Balanced 𝕜 A)


@[simp, reassoc, elementwise] lemma smoothSheafCommRing.forgetStalk_hom_comp_evalHom
    (x : TopCat.of M) :
    (smoothSheafCommRing.forgetStalk IM I M R x).hom ≫ (smoothSheaf.evalHom IM I R x) =
    (forget _).map (smoothSheafCommRing.evalHom _ _ _ _ _)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{EM : Type u_2}
[NormedAddCommGroup EM]
[NormedSpace 𝕜 EM]
{HM : Type u_3}
[TopologicalSpace HM]
(IM : ModelWithCorners 𝕜 EM HM)
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u)
[TopologicalSpace M]
[ChartedSpace HM M]
(R : Type u)
[TopologicalSpace R]
[ChartedSpace H R]
[CommRing R]
[SmoothRing I R]
(x : ↑(TopCat.of M))

CategoryTheory.CategoryStruct.comp (smoothSheafCommRing.forgetStalk IM I M R x).hom (smoothSheaf.evalHom IM I R x) =
  (CategoryTheory.forget CommRingCat).map (smoothSheafCommRing.evalHom IM I M R x)


theorem cokernel_zero_of_nonzero_to_simple {X Y : C} [Simple Y] {f : X ⟶ Y} (w : f ≠ 0) :
    cokernel.π f = 0

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


theorem valMinAbs_natCast_of_half_lt (ha : n / 2 < a) (ha' : a < n) :
    (a : ZMod n).valMinAbs = a - n


lemma infIrredUpperSet_surjective : Surjective (infIrredUpperSet (α := α))

{α : Type u_1}
[PartialOrder α]
[Finite α]


@[to_additive]
theorem norm_le_mul_norm_add (u v : E) : ‖u‖ ≤ ‖u * v‖ + ‖v‖

{E : Type u_6}
[SeminormedGroup E]
(u v : E)

‖u‖ ≤ ‖u * v‖ + ‖v‖


theorem contDiffWithinAt_inter (h : t ∈ 𝓝 x) :
    ContDiffWithinAt 𝕜 n f (s ∩ t) x ↔ ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s t : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(h : t ∈ 𝓝 x)


theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)

(V : TopCat.Presheaf.SheafCondition.OpensLeCover U)

((TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).obj V).obj.right.as = PUnit.unit


theorem mul_eq_span_mul_set (s t : Submodule R A) : s * t = span R ((s : Set A) * (t : Set A))

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(s t : Submodule R A)


/-- The empty reduced word. -/
@[simps]
def ReducedWord.empty : ReducedWord G A B

(G : Type u_1)
[Group G]
(A B : Subgroup G)

(HNNExtension.NormalWord.ReducedWord.empty G A B).head = 1


theorem fderivWithin_finset_prod [DecidableEq ι] {x : E} (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hg : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (g i) s x) :
    fderivWithin 𝕜 (∏ i ∈ u, g i ·) s x =
      ∑ i ∈ u, (∏ j ∈ u.erase i, (g j x)) • fderivWithin 𝕜 (g i) s x

fderivWithin 𝕜 (fun x => ∏ i ∈ u, g i x) s x = ∑ i ∈ u, (∏ j ∈ u.erase i, g j x) • fderivWithin 𝕜 (g i) s x


lemma lintegral_condKernel_mem (a : α) {s : Set (β × Ω)} (hs : MeasurableSet s) :
    ∫⁻ x, Kernel.condKernel κ (a, x) {y | (x, y) ∈ s} ∂(Kernel.fst κ a) = κ a s

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

∫⁻ (x : β), (κ.condKernel (a, x)) {y | (x, y) ∈ s} ∂κ.fst a = (κ a) s


@[simp]
theorem image₂_singleton_left : image₂ f {a} t = t.image fun b => f a b

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{t : Finset β}
{a : α}

Finset.image₂ f {a} t = Finset.image (fun b => f a b) t


theorem prod_unitsSMul (u : ℤˣ) (w : NormalWord d) :
    (unitsSMul φ u w).prod φ = (t^(u : ℤ) * w.prod φ : HNNExtension G A B φ)

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

HNNExtension.NormalWord.ReducedWord.prod φ (HNNExtension.NormalWord.unitsSMul φ u w).toReducedWord =
  HNNExtension.t ^ ↑u * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord


/-- Two `R`-linear maps from `Finsupp X M` which agree on each `single x y` agree everywhere.

We formulate this fact using equality of linear maps `φ.comp (lsingle a)` and `ψ.comp (lsingle a)`
so that the `ext` tactic can apply a type-specific extensionality lemma to prove equality of these
maps. E.g., if `M = R`, then it suffices to verify `φ (single a 1) = ψ (single a 1)`. -/
-- Porting note: The priority should be higher than `LinearMap.ext`.
@[ext high]
theorem lhom_ext' ⦃φ ψ : (α →₀ M) →ₗ[R] N⦄ (h : ∀ a, φ.comp (lsingle a) = ψ.comp (lsingle a)) :
    φ = ψ

⦃φ ψ : (α →₀ M) →ₗ[R] N⦄

(h : ∀ (a : α), φ ∘ₗ Finsupp.lsingle a = ψ ∘ₗ Finsupp.lsingle a)


/-- Convert back any exotic `ℕ`-smul to the canonical instance. This should not be needed since in
mathlib all `AddCommMonoid`s should normally have exactly one `ℕ`-module structure by design.
-/
theorem nat_smul_eq_nsmul (h : Module ℕ M) (n : ℕ) (x : M) : @SMul.smul ℕ M h.toSMul n x = n • x

{M : Type u_5}
[AddCommMonoid M]
(h : Module ℕ M)
(n : ℕ)
(x : M)


theorem Dart.edge_fiber [DecidableEq V] (d : G.Dart) :
    (univ.filter fun d' : G.Dart => d'.edge = d.edge) = {d, d.symm}

{V : Type u}
{G : SimpleGraph V}
[Fintype V]
[DecidableRel G.Adj]
[DecidableEq V]
(d : G.Dart)

Finset.filter (fun d' => d'.edge = d.edge) Finset.univ = {d, d.symm}


@[simp]
theorem val_mk (i : NumDenSameDeg 𝒜 x) :
    val (mk i) = Localization.mk (i.num : A) ⟨i.den, i.den_mem⟩

(i : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

(HomogeneousLocalization.mk i).val = Localization.mk ↑i.num ⟨↑i.den, ⋯⟩


@[simp]
theorem leftAssocTensor_map {X Y} (f : X ⟶ Y) : (leftAssocTensor C).map f = (f.1 ⊗ f.2.1) ⊗ f.2.2

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

(CategoryTheory.MonoidalCategory.leftAssocTensor C).map f =
  CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.tensorHom f.1 f.2.1) f.2.2


theorem HasDerivWithinAt.scomp_of_eq (hg : HasDerivWithinAt g₁ g₁' t' y)
    (hh : HasDerivWithinAt h h' s x) (hst : MapsTo h s t') (hy : y = h x) :
    HasDerivWithinAt (g₁ ∘ h) (h' • g₁') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{s : Set 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{t' : Set 𝕜'}
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
{y : 𝕜'}
(hg : HasDerivWithinAt g₁ g₁' t' y)
(hh : HasDerivWithinAt h h' s x)
(hst : Set.MapsTo h s t')
(hy : y = h x)


@[simp]
theorem sections_cons (s : Multiset (Multiset α)) (m : Multiset α) :
    Sections (m ::ₘ s) = m.bind fun a => (Sections s).map (Multiset.cons a)

{α : Type u_1}
(s : Multiset (Multiset α))
(m : Multiset α)

(m ::ₘ s).Sections = m.bind fun a => Multiset.map (Multiset.cons a) s.Sections


/-- An equivalent expression of `Structure.cg`. -/
theorem cg_iff : CG L M ↔ ∃ S : Set M, S.Countable ∧ closure L S = (⊤ : L.Substructure M)

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]

FirstOrder.Language.Structure.CG L M ↔ ∃ S, S.Countable ∧ (FirstOrder.Language.Substructure.closure L).toFun S = ⊤


@[simp]
theorem comp_left_top (r : Rel α β) : (⊤ : Rel γ α) • r = fun _ y ↦ y ∈ r.codom

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(r : Rel α β)


theorem max_eq_eval_unapply :
    (Linear_CC' C hsC ho) ∘ (fun (l : MaxProducts C ho) ↦ Products.eval C l.val) =
    (fun l ↦ l.val.Tail.eval (C' C ho))

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

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

(⇑(Profinite.NobelingProof.Linear_CC' C hsC ho) ∘ fun l => Profinite.NobelingProof.Products.eval C ↑l) = fun l =>
  Profinite.NobelingProof.Products.eval (Profinite.NobelingProof.C' C ho) (↑l).Tail


theorem _root_.MeasureTheory.AEStronglyMeasurable.integrable_truncation [IsFiniteMeasure μ]
    (hf : AEStronglyMeasurable f μ) {A : ℝ} : Integrable (truncation f A) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.Integrable (ProbabilityTheory.truncation f A) μ


@[simp]
protected theorem reverseAux_append {u v w x : V}
    (p : G.Walk u v) (q : G.Walk u w) (r : G.Walk w x) :
    (p.reverseAux q).append r = p.reverseAux (q.append r)

{V : Type u}
{G : SimpleGraph V}
{u v w x : V}
(p : G.Walk u v)
(q : G.Walk u w)
(r : G.Walk w x)


@[simp, norm_cast]
theorem abs_cast [LinearOrderedRing α] (a : ℕ) : |(a : α)| = a

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


theorem bit_to_nat (b n) : (bit b n : ℕ) = Nat.bit b n


lemma isClosed_ball (x : X) (r : ℝ) : IsClosed (ball x r)

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x : X)
(r : ℝ)


@[simp, norm_cast]
theorem coe_neg (m : N) : (↑(-m) : M) = -(m : M)

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


private theorem glueDist_triangle_inl_inr_inl (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ)
    (H : ∀ p q, |dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)| ≤ 2 * ε) (x : X) (y : Y) (z : X) :
    glueDist Φ Ψ ε (.inl x) (.inl z) ≤
      glueDist Φ Ψ ε (.inl x) (.inr y) + glueDist Φ Ψ ε (.inr y) (.inl z)

(H : ∀ (p q : Z), |dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)| ≤ 2 * ε)

Metric.glueDist Φ Ψ ε (Sum.inl x) (Sum.inl z) ≤
  Metric.glueDist Φ Ψ ε (Sum.inl x) (Sum.inr y) + Metric.glueDist Φ Ψ ε (Sum.inr y) (Sum.inl z)


theorem cramer_apply (i : n) : cramer A b i = (A.updateColumn i b).det

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)
(i : n)


@[simp]
theorem decode_unit_succ (n) : decode (succ n) = (none : Option PUnit)


lemma autEquivRootsOfUnity_apply_rootOfSplit (σ : L ≃ₐ[K] L) :
    σ (rootOfSplitsXPowSubC hn a L) =
      autEquivRootsOfUnity hζ hn H L σ • (rootOfSplitsXPowSubC hn a L)

(H : Irreducible (Polynomial.X ^ n - Polynomial.C a))

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]

σ (rootOfSplitsXPowSubC hn a L) = (autEquivRootsOfUnity hζ hn H L) σ • rootOfSplitsXPowSubC hn a L


theorem Int.ofNat_floor_eq_floor (ha : 0 ≤ a) : (⌊a⌋₊ : ℤ) = ⌊a⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}
(ha : 0 ≤ a)


/-- If `X ⟶ S`, `Y ⟶ S` are open embeddings, then so is `X ×ₛ Y ⟶ S`. -/
theorem openEmbedding_of_pullback_open_embeddings {X Y S : TopCat} {f : X ⟶ S} {g : Y ⟶ S}
    (H₁ : OpenEmbedding f) (H₂ : OpenEmbedding g) :
    OpenEmbedding (limit.π (cospan f g) WalkingCospan.one)

{X Y S : TopCat}
{f : X ⟶ S}
{g : Y ⟶ S}
(H₁ : OpenEmbedding ⇑f)
(H₂ : OpenEmbedding ⇑g)

OpenEmbedding
  ⇑(CategoryTheory.Limits.limit.π (CategoryTheory.Limits.cospan f g) CategoryTheory.Limits.WalkingCospan.one)


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


/-- A typeclass stating that multiplication is left distributive over addition. -/
class LeftDistribClass (R : Type*) [Mul R] [Add R] : Prop where
  /-- Multiplication is left distributive over addition -/
  protected left_distrib : ∀ a b c : R, a * (b + c) = a * b + a * c

{R : Type u_1}
[Mul R]
[Add R]
[self : LeftDistribClass R]
(a b c : R)


lemma _root_.NNReal.spectralRadius_mem_spectrum {A : Type*} [NormedRing A] [NormedAlgebra ℝ A]
    [CompleteSpace A] {a : A} (ha : (spectrum ℝ a).Nonempty)
    (ha' : SpectrumRestricts a ContinuousMap.realToNNReal) :
    (spectralRadius ℝ a).toNNReal ∈ spectrum ℝ≥0 a

(ha' : SpectrumRestricts a ⇑ContinuousMap.realToNNReal)


private irreducible_def le (x y : ℝ) : Prop


@[simp]
theorem restrictScalars_add (f g : M →L[A] M₂) :
    (f + g).restrictScalars R = f.restrictScalars R + g.restrictScalars R

{A : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring A]
[AddCommGroup M]
[AddCommGroup M₂]
[Module A M]
[Module A M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{R : Type u_4}
[Ring R]
[Module R M]
[Module R M₂]
[LinearMap.CompatibleSMul M M₂ R A]
[TopologicalAddGroup M₂]
(f g : M →L[A] M₂)

ContinuousLinearMap.restrictScalars R (f + g) =
  ContinuousLinearMap.restrictScalars R f + ContinuousLinearMap.restrictScalars R g


theorem add_assoc {X Y : C} (a b c : X ⟶ Y) : a + b + c = a + (b + c)


/-- The fact that `χ` factors through `χ₀` of level `d` -/
lemma eq_changeLevel {d : ℕ} (h : FactorsThrough χ d) : χ = changeLevel h.dvd h.χ₀

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
{χ : DirichletCharacter R n}
{d : ℕ}
(h : χ.FactorsThrough d)

χ = (DirichletCharacter.changeLevel ⋯) h.χ₀


private theorem remainder_lt_aux (p : R[X]) (hq : q ≠ 0) : degree (mod p q) < degree q

{R : Type u}
[Field R]
{q : R[X]}
(p : R[X])
(hq : q ≠ 0)


@[simp]
theorem normalizedFactors_pos (x : α) (hx : x ≠ 0) : 0 < normalizedFactors x ↔ ¬IsUnit x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
(x : α)
(hx : x ≠ 0)

0 < UniqueFactorizationMonoid.normalizedFactors x ↔ ¬IsUnit x


@[simp] lemma IsRightRegular.mul_right_eq_zero_iff (hb : IsRightRegular b) : a * b = 0 ↔ a = 0

{R : Type u_1}
[MulZeroClass R]
{a b : R}
(hb : IsRightRegular b)


@[simp]
theorem quot_add (a b : PGame) : ⟦a + b⟧ = (⟦a⟧ : Game) + ⟦b⟧


@[simp]
theorem coeff_mul_X_pow (p : R⟦X⟧) (n d : ℕ) :
    coeff R (d + n) (p * X ^ n) = coeff R d p

{R : Type u_1}
[Semiring R]
(p : PowerSeries R)
(n d : ℕ)

(PowerSeries.coeff R (d + n)) (p * PowerSeries.X ^ n) = (PowerSeries.coeff R d) p


theorem lex_lt_of_lt [∀ i, PartialOrder (α i)] (r) [IsStrictOrder ι r] {x y : Π₀ i, α i}
    (hlt : x < y) : Pi.Lex r (· < ·) x y

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → PartialOrder (α i)]
(r : ι → ι → Prop)
[IsStrictOrder ι r]
{x y : Π₀ (i : ι), α i}
(hlt : x < y)

Pi.Lex r (fun {i} x x_1 => x < x_1) ⇑x ⇑y


theorem Module.finite_of_rank_eq_zero [NoZeroSMulDivisors R M]
    (h : Module.rank R M = 0) :
    Module.Finite R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(h : Module.rank R M = 0)


theorem two_div_one_sub_two_div_e_le_eight : 2 / (1 - 2 / exp 1) ≤ 8


@[simp]
theorem nnnorm_changeOriginSeriesTerm (k l : ℕ) (s : Finset (Fin (k + l))) (hs : s.card = l) :
    ‖p.changeOriginSeriesTerm k l s hs‖₊ = ‖p (k + l)‖₊

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(k l : ℕ)
(s : Finset (Fin (k + l)))
(hs : s.card = l)


theorem Ideal.homogeneousHull_eq_iSup :
    I.homogeneousHull 𝒜 =
      ⨆ i, ⟨Ideal.span (GradedRing.proj 𝒜 i '' I), Ideal.homogeneous_span 𝒜 _ (by
        rintro _ ⟨x, -, rfl⟩
        apply SetLike.homogeneous_coe)⟩

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[GradedRing 𝒜]
(I : Ideal A)

Ideal.homogeneousHull 𝒜 I = ⨆ i, { toSubmodule := Ideal.span (⇑(GradedRing.proj 𝒜 i) '' ↑I), is_homogeneous' := ⋯ }


@[simp]
theorem ofMkLE_arrow {B A : C} {f : A ⟶ B} [Mono f] {X : Subobject B} (h : mk f ≤ X) :
    ofMkLE f X h ≫ X.arrow = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{B A : C}
{f : A ⟶ B}
[CategoryTheory.Mono f]
{X : CategoryTheory.Subobject B}
(h : CategoryTheory.Subobject.mk f ≤ X)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Subobject.ofMkLE f X h) X.arrow = f


theorem map_injective {f : G →g G'} (hinj : Function.Injective f) (u v : V) :
    Function.Injective (Path.map f hinj : G.Path u v → G'.Path (f u) (f v))

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{f : G →g G'}
(hinj : Function.Injective ⇑f)
(u v : V)

Function.Injective (SimpleGraph.Path.map f hinj)


@[simp]
theorem top_arrow (X : C) : (⊤ : MonoOver X).arrow = 𝟙 X

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


/-- The range of `circleMap c R` is the circle with center `c` and radius `|R|`. -/
@[simp]
theorem range_circleMap (c : ℂ) (R : ℝ) : range (circleMap c R) = sphere c |R|

Set.range (circleMap c R) = Metric.sphere c |R|


theorem mem_union_left (h : a ∈ l₁) (l₂ : List α) : a ∈ l₁ ∪ l₂

{α : Type u_1}
{l₁ : List α}
{a : α}
[DecidableEq α]
(h : a ∈ l₁)
(l₂ : List α)


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_functor' :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ⥤
    OpensLeCover U

(f :
  CategoryTheory.FullSubcategory fun f =>
    (CategoryTheory.Sieve.generate (TopCat.Presheaf.presieveOfCoveringAux U Y)).arrows f.hom)

((TopCat.Presheaf.generateEquivalenceOpensLe_functor' U hY).obj f).obj = f.obj.left


private lemma lower_aux : a ∈ lowerClosure ↑(s ∪ t) ↔ a ∈ lowerClosure s ∨ a ∈ lowerClosure t

{α : Type u_1}
[SemilatticeSup α]
{s t : Finset α}
{a : α}
[DecidableEq α]

a ∈ lowerClosure ↑(s ∪ t) ↔ a ∈ lowerClosure ↑s ∨ a ∈ lowerClosure ↑t


theorem Pairwise.forall (hR : Symmetric R) (hl : l.Pairwise R) :
    ∀ ⦃a⦄, a ∈ l → ∀ ⦃b⦄, b ∈ l → a ≠ b → R a b

{α : Type u_1}
{R : α → α → Prop}
{l : List α}
(hR : Symmetric R)
(hl : List.Pairwise R l)
⦃a : α⦄

a ∈ l → ∀ ⦃b : α⦄, b ∈ l → a ≠ b → R a b


theorem mkOfAlgebra {R S S' : Type*} [CommRing R] [CommRing S] [CommRing S'] [Algebra R S]
    [Algebra R S'] (M : Submonoid R) (f : S →ₐ[R] S') (h₁ : ∀ x ∈ M, IsUnit (algebraMap R S' x))
    (h₂ : ∀ y, ∃ x : S × M, x.2 • y = f x.1) (h₃ : ∀ x, f x = 0 → ∃ m : M, m • x = 0) :
    IsLocalizedModule M f.toLinearMap

(h₁ : ∀ x ∈ M, IsUnit ((algebraMap R S') x))

(h₃ : ∀ (x : S), f x = 0 → ∃ m, m • x = 0)


theorem map_mono (hφ : Function.Injective φ.obj) (S T : Subgroupoid C) :
    S ≤ T → map φ hφ S ≤ map φ hφ T

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(hφ : Function.Injective φ.obj)
(S T : CategoryTheory.Subgroupoid C)

S ≤ T → CategoryTheory.Subgroupoid.map φ hφ S ≤ CategoryTheory.Subgroupoid.map φ hφ T


@[to_additive]
theorem zpowers_ne_bot : zpowers g ≠ ⊥ ↔ g ≠ 1


@[simp]
theorem lift_of_apply (f : X → L) (x) : lift R f (of R x) = f x

{R : Type u}
{X : Type v}
[CommRing R]
{L : Type w}
[LieRing L]
[LieAlgebra R L]
(f : X → L)
(x : X)

((FreeLieAlgebra.lift R) f) (FreeLieAlgebra.of R x) = f x


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


@[simp]
theorem rpow_le_rpow_left_iff (hx : 1 < x) : x ^ y ≤ x ^ z ↔ y ≤ z


theorem map_vecMul [NonAssocSemiring R] [NonAssocSemiring S] (f : R →+* S) (M : Matrix n m R)
    (v : n → R) (i : m) : f ((v ᵥ* M) i) =  ((f ∘ v) ᵥ* M.map f) i

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{S : Type u_8}
[Fintype n]
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)
(M : Matrix n m R)
(v : n → R)
(i : m)


/-- In a quiver with involutive inverses, the star and costar at every vertex are equivalent.
This map is induced by `Quiver.reverse`. -/
@[simps]
def Quiver.starEquivCostar (u : U) : Quiver.Star u ≃ Quiver.Costar u

{U : Type u_1}
[Quiver U]
[Quiver.HasInvolutiveReverse U]
(u : U)
(e : Quiver.Costar u)

((Quiver.starEquivCostar u).symm e).fst = e.fst


theorem volume_pi_ball [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
    [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 < r) :
    volume (Metric.ball x r) = ∏ i, volume (Metric.ball (x i) r)

[(i : ι) → MeasureTheory.MeasureSpace (α i)]

[∀ (i : ι), MeasureTheory.SigmaFinite MeasureTheory.volume]

MeasureTheory.volume (Metric.ball x r) = ∏ i : ι, MeasureTheory.volume (Metric.ball (x i) r)


theorem ext_iff : e = e' ↔ ∀ x, e x = e' x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{e e' : A ≃ₗc[R] B}


/-- The comap of the cocompact filter on `Y` by a continuous function `f : X → Y` is less than or
equal to the cocompact filter on `X`.
This is a reformulation of the fact that images of compact sets are compact. -/
theorem Filter.comap_cocompact_le {f : X → Y} (hf : Continuous f) :
    (Filter.cocompact Y).comap f ≤ Filter.cocompact X

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : Continuous f)

Filter.comap f (Filter.cocompact Y) ≤ Filter.cocompact X


@[simp] lemma discrim_neg [Ring R] (a b c : R) : discrim (-a) (-b) (-c) = discrim a b c


@[to_additive (attr := simp)]
theorem mem_trivial {g : G} : g ∈ trivial G ↔ g = 1


@[to_additive (attr := simp)]
theorem _root_.MulEquiv.withOneCongr_trans (e₁ : α ≃* β) (e₂ : β ≃* γ) :
    e₁.withOneCongr.trans e₂.withOneCongr = (e₁.trans e₂).withOneCongr

{α : Type u}
{β : Type v}
{γ : Type w}
[Mul α]
[Mul β]
[Mul γ]
(e₁ : α ≃* β)
(e₂ : β ≃* γ)


@[simp]
lemma sigmaAll_apply {n} {φ : L.BoundedFormula α (n + 1)} :
    sigmaAll ⟨n + 1, φ⟩ = ⟨n, φ.all⟩

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α (n + 1)}

FirstOrder.Language.BoundedFormula.sigmaAll ⟨n + 1, φ⟩ = ⟨n, φ.all⟩


@[simp]
theorem hexagon_reverse (X Y Z : ModuleCat.{u} R) :
    (α_ X Y Z).inv ≫ (braiding _ Z).hom ≫ (α_ Z X Y).inv =
      X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y

{R : Type u}
[CommRing R]
(X Y Z : ModuleCat R)

(α_ X Y Z).inv ≫ ((X ⊗ Y).braiding Z).hom ≫ (α_ Z X Y).inv =
  X ◁ (Y.braiding Z).hom ≫ (α_ X Z Y).inv ≫ (X.braiding Z).hom ▷ Y


@[simp]
theorem mul_right_eq_zero (u : M₀ˣ) {a : M₀} : ↑u * a = 0 ↔ a = 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
(u : M₀ˣ)
{a : M₀}


theorem iUnion_subset {s : ι → Set α} {t : Set α} (h : ∀ i, s i ⊆ t) : ⋃ i, s i ⊆ t

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


theorem NormedAddGroupHom.completion_comp (f : NormedAddGroupHom G H) (g : NormedAddGroupHom H K) :
    g.completion.comp f.completion = (g.comp f).completion

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
{K : Type u_3}
[SeminormedAddCommGroup K]
(f : NormedAddGroupHom G H)
(g : NormedAddGroupHom H K)


@[simp] lemma deleteEdges_eq_self : G.deleteEdges s = G ↔ Disjoint G.edgeSet s

{V : Type u}
{G : SimpleGraph V}
{s : Set (Sym2 V)}


@[simp]
theorem incl_idealRange : I.incl.idealRange = I

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)


theorem IsAtomic.liftAt {k m : ℕ} (h : IsAtomic φ) : (φ.liftAt k m).IsAtomic

{L : FirstOrder.Language}
{α : Type u'}
{l : ℕ}
{φ : L.BoundedFormula α l}
{k m : ℕ}
(h : φ.IsAtomic)

(FirstOrder.Language.BoundedFormula.liftAt k m φ).IsAtomic


/-- A normed vector space over an infinite normed field is a noncompact space.
This cannot be an instance because in order to apply it,
Lean would have to search for `NormedSpace 𝕜 E` with unknown `𝕜`.
We register this as an instance in two cases: `𝕜 = E` and `𝕜 = ℝ`. -/
protected theorem NormedSpace.noncompactSpace : NoncompactSpace E

(𝕜 : Type u_1)
(E : Type u_3)
[NormedField 𝕜]
[Infinite 𝕜]
[NormedAddCommGroup E]
[Nontrivial E]
[NormedSpace 𝕜 E]


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

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

∀ (X_1 : Cᵒᵖ),
  ((e.sheafCongrPreregular A).unitIso.hom.app X).val.app X_1 = X.val.map (e.unitIso.inv.app (Opposite.unop X_1)).op


@[simp]
lemma Hom.id_eq_id (X : WalkingMultispan fst snd) : Hom.id X = 𝟙 X

(X : CategoryTheory.Limits.WalkingMultispan fst snd)

CategoryTheory.Limits.WalkingMultispan.Hom.id X = CategoryTheory.CategoryStruct.id X


@[simp]
theorem baseSet_prod : (prod e₁ e₂).baseSet = e₁.baseSet ∩ e₂.baseSet

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

(e₁ : Trivialization F₁ Bundle.TotalSpace.proj)

(e₂ : Trivialization F₂ Bundle.TotalSpace.proj)

(e₁.prod e₂).baseSet = e₁.baseSet ∩ e₂.baseSet


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


lemma AnalyticOn.meromorphicOn {f : 𝕜 → E} {U : Set 𝕜} (hf : AnalyticOn 𝕜 f U) :
    MeromorphicOn f U

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{U : Set 𝕜}
(hf : AnalyticOn 𝕜 f U)


@[simp]
theorem comp_toAlgHom (φ₁ : B →ₐc[R] C) (φ₂ : A →ₐc[R] B) :
    φ₁.comp φ₂ = (φ₁ : B →ₐ[R] C).comp (φ₂ : A →ₐ[R] B)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
(φ₁ : B →ₐc[R] C)
(φ₂ : A →ₐc[R] B)


theorem withTopEquiv_zero : withTopEquiv 0 = 0


theorem ground_nonempty_iff (M : Matroid α) : M.E.Nonempty ↔ M.Nonempty


/-- The weak-star topology is coarser than the dual-norm topology. -/
theorem dual_norm_topology_le_weak_dual_topology :
    (UniformSpace.toTopologicalSpace : TopologicalSpace (Dual 𝕜 E)) ≤
      (WeakDual.instTopologicalSpace : TopologicalSpace (WeakDual 𝕜 E))

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]


lemma le_add_one_iff : m ≤ n + 1 ↔ m ≤ n ∨ m = n + 1


@[simp]
theorem mem_sup_iff : a ∈ s ⊔ t ↔ a ∈ s ∧ a ∈ t

{α : Type u_1}
[LE α]
{s t : UpperSet α}
{a : α}


/-- When the derivative of a function is nonnegative, then it is automatically integrable,
interval version. -/
theorem intervalIntegrable_deriv_of_nonneg (hcont : ContinuousOn g (uIcc a b))
    (hderiv : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt g (g' x) x)
    (hpos : ∀ x ∈ Ioo (min a b) (max a b), 0 ≤ g' x) : IntervalIntegrable g' volume a b

(hderiv : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivAt g (g' x) x)

(hpos : ∀ x ∈ Set.Ioo (min a b) (max a b), 0 ≤ g' x)

IntervalIntegrable g' MeasureTheory.volume a b


@[simp] theorem or_self (p : Prop) : (p ∨ p) = p


theorem image_relIso (hs : IsAntichain r s) (φ : r ≃r r') : IsAntichain r' (φ '' s)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{r' : β → β → Prop}
{s : Set α}
(hs : IsAntichain r s)
(φ : r ≃r r')


@[local simp]
theorem mk_smul_mk (r : R) (x : M) :
    Ideal.Quotient.mk (I • ⊤) r • Submodule.Quotient.mk (p := (I • ⊤ : Submodule R M)) x
      = r • Submodule.Quotient.mk (p := (I • ⊤ : Submodule R M)) x

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

(Ideal.Quotient.mk (I • ⊤)) r • Submodule.Quotient.mk x = r • Submodule.Quotient.mk x


theorem smul_eq_C_mul (a : R) : a • p = C a * p

{R : Type u}
[Semiring R]
{p : R[X]}
(a : R)


theorem le_abs' : a ≤ |b| ↔ b ≤ -a ∨ a ≤ b

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


@[simp]
theorem snd_star [Star R] [Star S] (x : R × S) : (star x).2 = star x.2

{R : Type u}
{S : Type v}
[Star R]
[Star S]
(x : R × S)


@[simp]
theorem id_apply (X : FintypeCat) (x : X) : (𝟙 X : X → X) x = x


theorem Finset.card_lt_univ_of_not_mem [Fintype α] {s : Finset α} {x : α} (hx : x ∉ s) :
    s.card < Fintype.card α

{α : Type u_1}
[Fintype α]
{s : Finset α}
{x : α}
(hx : x ∉ s)


/-- Two `ℝ`-algebra homomorphisms from `ℂ` are equal if they agree on `Complex.I`. -/
@[ext]
theorem algHom_ext ⦃f g : ℂ →ₐ[ℝ] A⦄ (h : f I = g I) : f = g

{A : Type u_3}
[Semiring A]
[Algebra ℝ A]
⦃f g : ℂ →ₐ[ℝ] A⦄
(h : f Complex.I = g Complex.I)


theorem eLpNorm_const' (c : F) (h0 : p ≠ 0) (h_top : p ≠ ∞) :
    eLpNorm (fun _ : α => c) p μ = (‖c‖₊ : ℝ≥0∞) * μ Set.univ ^ (1 / ENNReal.toReal p)

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(c : F)
(h0 : p ≠ 0)
(h_top : p ≠ ⊤)

MeasureTheory.eLpNorm (fun x => c) p μ = ↑‖c‖₊ * μ Set.univ ^ (1 / p.toReal)


/-- `s` is a subgroup: a set containing 1 and closed under multiplication and inverse. -/
@[to_additive]
structure IsSubgroup (s : Set G) extends IsSubmonoid s : Prop where
  /-- The proposition that `s` is closed under inverse. -/
  inv_mem {a} : a ∈ s → a⁻¹ ∈ s

{G : Type u_1}
[Group G]
{s : Set G}
(self : IsSubgroup s)
{a : G}

a ∈ s → a⁻¹ ∈ s


theorem ext_chart_model_space_apply {x y : E} : extChartAt 𝓘(𝕜, E) x y = y

(𝕜 : Type u_1)
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x y : E}


theorem FamilyOfElements.Compatible.compPresheafMap (f : P ⟶ Q) {x : FamilyOfElements P R}
    (h : x.Compatible) : (x.compPresheafMap f).Compatible

{P Q : CategoryTheory.Functor Cᵒᵖ (Type w)}

{x : CategoryTheory.Presieve.FamilyOfElements P R}


@[simp]
theorem mem_inf {p p' : NonUnitalSubsemiring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{R : Type u}
[NonUnitalNonAssocSemiring R]
{p p' : NonUnitalSubsemiring R}
{x : R}


/-- The right fraction corresponding to a left fraction in the opposite category. -/
@[simps]
def LeftFraction.unop {W : MorphismProperty Cᵒᵖ}
    {X Y : Cᵒᵖ} (φ : W.LeftFraction X Y) :
    W.unop.RightFraction (Opposite.unop Y) (Opposite.unop X)

{W : CategoryTheory.MorphismProperty Cᵒᵖ}


/-- `OrderDual` as a functor. -/
@[simps]
def dual : FinPartOrd ⥤ FinPartOrd

FinPartOrd.dual.obj X = FinPartOrd.of (↑X.toPartOrd)ᵒᵈ


theorem inter_le_right (s : Multiset α) : ∀ t, s ∩ t ≤ t

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


/-- A set stable by supremum is `≤`-directed. -/
theorem directedOn_of_sup_mem [SemilatticeSup α] {S : Set α}
    (H : ∀ ⦃i j⦄, i ∈ S → j ∈ S → i ⊔ j ∈ S) : DirectedOn (· ≤ ·) S

(H : ∀ ⦃i j : α⦄, i ∈ S → j ∈ S → i ⊔ j ∈ S)


theorem dist_eq_sInf : G.dist u v = sInf (Set.range (Walk.length : G.Walk u v → ℕ))

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

G.dist u v = sInf (Set.range SimpleGraph.Walk.length)


@[simp]
lemma piScalarRight_symm_single (x : N) (i : ι) :
    (piScalarRight R S N ι).symm (Pi.single i x) = x ⊗ₜ Pi.single i 1

(R : Type u_1)
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(N : Type u_3)
[AddCommMonoid N]
[Module R N]
[Module S N]
[IsScalarTower R S N]
(ι : Type u_4)
[Fintype ι]
[DecidableEq ι]
(x : N)
(i : ι)

(TensorProduct.piScalarRight R S N ι).symm (Pi.single i x) = x ⊗ₜ[R] Pi.single i 1


theorem IsAdjointPair.add (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') :
    IsAdjointPair B B' (f + f') (g + g')

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
{M₃ : Type u_8}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₃]
[Module R M₃]
{I : R →+* R}
{B : M →ₗ[R] M →ₛₗ[I] M₃}
{B' : M₁ →ₗ[R] M₁ →ₛₗ[I] M₃}
{f f' : M →ₗ[R] M₁}
{g g' : M₁ →ₗ[R] M}
(h : B.IsAdjointPair B' f g)
(h' : B.IsAdjointPair B' f' g')


/-- Given a pair of monoid homomorphisms `f`, `g` such that `g.comp f = id` and `f.comp g = id`,
returns a multiplicative equivalence with `toFun = f` and `invFun = g`.  This constructor is
useful if the underlying type(s) have specialized `ext` lemmas for monoid homomorphisms. -/
@[to_additive (attr := simps (config := .asFn))
  "Given a pair of additive monoid homomorphisms `f`, `g` such that `g.comp f = id`
  and `f.comp g = id`, returns an additive equivalence with `toFun = f` and `invFun = g`.  This
  constructor is useful if the underlying type(s) have specialized `ext` lemmas for additive
  monoid homomorphisms."]
def MonoidHom.toMulEquiv [MulOneClass M] [MulOneClass N] (f : M →* N) (g : N →* M)
    (h₁ : g.comp f = MonoidHom.id _) (h₂ : f.comp g = MonoidHom.id _) : M ≃* N

{M : Type u_6}
{N : Type u_7}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)
(g : N →* M)
(h₁ : g.comp f = MonoidHom.id M)
(h₂ : f.comp g = MonoidHom.id N)


@[to_additive]
theorem relindex_iInf_le {ι : Type*} [Fintype ι] (f : ι → Subgroup G) :
    (⨅ i, f i).relindex L ≤ ∏ i, (f i).relindex L

{G : Type u_1}
[Group G]
{L : Subgroup G}
{ι : Type u_3}
[Fintype ι]
(f : ι → Subgroup G)

(⨅ i, f i).relindex L ≤ ∏ i : ι, (f i).relindex L


@[gcongr] theorem min_le_min_left (c) (h : a ≤ b) : min c a ≤ min c b

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


@[reassoc (attr := simp)]
theorem lift_comp_kernelIsoOfEq_inv {Z} {f g : X ⟶ Y} [HasKernel f] [HasKernel g] (h : f = g)
    (e : Z ⟶ X) (he) :
    kernel.lift _ e he ≫ (kernelIsoOfEq h).inv = kernel.lift _ e (by simp [h, he])

CategoryTheory.Limits.kernel.lift g e he ≫ (CategoryTheory.Limits.kernelIsoOfEq h).inv =
  CategoryTheory.Limits.kernel.lift f e ⋯


@[to_additive]
theorem mul_left_ne_self : a * b ≠ b ↔ a ≠ 1

{M : Type u}
[AddRightCancelMonoid M]
{a b : M}


/-- The parametric integral over a continuous function on a compact set is continuous,
  under mild assumptions on the topologies involved. -/
theorem continuous_parametric_integral_of_continuous
    [FirstCountableTopology X] [LocallyCompactSpace X]
    [OpensMeasurableSpace Y] [SecondCountableTopologyEither Y E] [IsLocallyFiniteMeasure μ]
    {f : X → Y → E} (hf : Continuous f.uncurry) {s : Set Y} (hs : IsCompact s) :
    Continuous (∫ y in s, f · y ∂μ)

Continuous fun x => ∫ (y : Y) in s, f x y ∂μ


/-- The degree-sum formula.  This is also known as the handshaking lemma, which might
more specifically refer to `SimpleGraph.even_card_odd_degree_vertices`. -/
theorem sum_degrees_eq_twice_card_edges : ∑ v, G.degree v = 2 * G.edgeFinset.card

{V : Type u}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
[Fintype (Sym2 V)]

∑ v : V, G.degree v = 2 * G.edgeFinset.card


protected lemma Monotone.disjointed_succ_sup {f : ℕ → α} (hf : Monotone f) (n : ℕ) :
    disjointed f (n + 1) ⊔ f n = f (n + 1)

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
{f : ℕ → α}
(hf : Monotone f)
(n : ℕ)


theorem eq_default (a : α) : a = default


@[simp]
theorem liftOn₂_mk (a : α) (b : β) (f : α → β → γ) (hr : ∀ a b₁ b₂, s b₁ b₂ → f a b₁ = f a b₂)
    (hs : ∀ a₁ a₂ b, r a₁ a₂ → f a₁ b = f a₂ b) :
    Quot.liftOn₂ (Quot.mk r a) (Quot.mk s b) f hr hs = f a b

(f : α → β → γ)

(hr : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂)

(hs : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b)

(Quot.mk r a).liftOn₂ (Quot.mk s b) f hr hs = f a b


theorem normSq_mul (z w : ℂ) : normSq (z * w) = normSq z * normSq w

Complex.normSq (z * w) = Complex.normSq z * Complex.normSq w


@[to_additive]
theorem lt_iff_exists_mul [CovariantClass α α (· * ·) (· < ·)] : a < b ↔ ∃ c > 1, b = a * c

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


theorem is_noetherian_subring_closure (s : Set R) (hs : s.Finite) :
    IsNoetherianRing (Subring.closure s)

{R : Type u}
[CommRing R]
(s : Set R)
(hs : s.Finite)


theorem eval_eq_πJ (l : Products I) (hl : l.isGood (π C (· ∈ s))) :
    l.eval C = πJ C s (l.eval (π C (· ∈ s)))

(l : Profinite.NobelingProof.Products I)

(hl : Profinite.NobelingProof.Products.isGood (Profinite.NobelingProof.π C fun x => x ∈ s) l)

Profinite.NobelingProof.Products.eval C l =
  (Profinite.NobelingProof.πJ C s)
    (Profinite.NobelingProof.Products.eval (Profinite.NobelingProof.π C fun x => x ∈ s) l)


theorem exists_maximal_independent (s : ι → M) :
    ∃ I : Set ι,
      (LinearIndependent R fun x : I => s x) ∧
        ∀ i ∉ I, ∃ a : R, a ≠ 0 ∧ a • s i ∈ span R (s '' I)

{ι : Type u'}
(R : Type u_2)
{M : Type u_4}
[Ring R]
[AddCommGroup M]
[Module R M]
(s : ι → M)

∃ I, (LinearIndependent R fun (x : ↑I) => s ↑x) ∧ ∀ i ∉ I, ∃ a, a ≠ 0 ∧ a • s i ∈ Submodule.span R (s '' I)


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

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

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


theorem zpow_negSucc (a : G) (n : ℕ) : a ^ (Int.negSucc n) = (a ^ (n + 1))⁻¹

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


@[to_additive (attr := measurability)]
theorem Multiset.measurable_prod (s : Multiset (α → M)) (hs : ∀ f ∈ s, Measurable f) :
    Measurable fun x => (s.map fun f : α → M => f x).prod

{M : Type u_2}
{α : Type u_4}
[CommMonoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
(s : Multiset (α → M))
(hs : ∀ f ∈ s, Measurable f)

Measurable fun x => (Multiset.map (fun f => f x) s).prod


theorem BinaryCofan.isColimit_iff_isIso_inr {X Y : C} (h : IsInitial X) (c : BinaryCofan X Y) :
    Nonempty (IsColimit c) ↔ IsIso c.inr

(c : CategoryTheory.Limits.BinaryCofan X Y)

Nonempty (CategoryTheory.Limits.IsColimit c) ↔ CategoryTheory.IsIso c.inr


/-- An algebra isomorphism induces a group isomorphism between automorphism groups.

This is a more bundled version of `AlgEquiv.equivCongr`. -/
@[simps apply]
def autCongr (ϕ : A₁ ≃ₐ[R] A₂) : (A₁ ≃ₐ[R] A₁) ≃* A₂ ≃ₐ[R] A₂

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(ϕ : A₁ ≃ₐ[R] A₂)
(ψ : A₁ ≃ₐ[R] A₁)


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.inv (hf : ContinuousAt f x) : ContinuousAt (fun x => (f x)⁻¹) x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Inv G]
[ContinuousInv G]
[TopologicalSpace α]
{f : α → G}
{x : α}
(hf : ContinuousAt f x)


theorem mk_covBy_mk_iff : (a₁, b₁) ⋖ (a₂, b₂) ↔ a₁ ⋖ a₂ ∧ b₁ = b₂ ∨ b₁ ⋖ b₂ ∧ a₁ = a₂

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
{a₁ a₂ : α}
{b₁ b₂ : β}


theorem norm_inner_eq_norm_tfae (x y : E) :
    List.TFAE [‖⟪x, y⟫‖ = ‖x‖ * ‖y‖,
      x = 0 ∨ y = (⟪x, y⟫ / ⟪x, x⟫) • x,
      x = 0 ∨ ∃ r : 𝕜, y = r • x,
      x = 0 ∨ y ∈ 𝕜 ∙ x]

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)

[‖⟪x, y⟫_𝕜‖ = ‖x‖ * ‖y‖, x = 0 ∨ y = (⟪x, y⟫_𝕜 / ⟪x, x⟫_𝕜) • x, x = 0 ∨ ∃ r, y = r • x,
    x = 0 ∨ y ∈ Submodule.span 𝕜 {x}].TFAE


/-- If `x` is an adherent (cluster) point for a Cauchy filter `f`, then it is a limit point
for `f`. -/
theorem le_nhds_of_cauchy_adhp {f : Filter α} {x : α} (hf : Cauchy f) (adhs : ClusterPt x f) :
    f ≤ 𝓝 x

{α : Type u}
[uniformSpace : UniformSpace α]
{f : Filter α}
{x : α}
(hf : Cauchy f)
(adhs : ClusterPt x f)


@[simp]
theorem mkOfCompact_apply [CompactSpace α] (f : C(α, β)) (a : α) : mkOfCompact f a = f a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[CompactSpace α]
(f : C(α, β))
(a : α)

(BoundedContinuousFunction.mkOfCompact f) a = f a


theorem Disjoint.set_pi (hi : i ∈ s) (ht : Disjoint (t₁ i) (t₂ i)) : Disjoint (s.pi t₁) (s.pi t₂)

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}
{i : ι}
(hi : i ∈ s)
(ht : Disjoint (t₁ i) (t₂ i))


theorem projectiveSeminorm_apply (x : ⨂[𝕜] i, E i) :
    projectiveSeminorm x = iInf (fun (p : lifts x) ↦ projectiveSeminormAux p.1)

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

PiTensorProduct.projectiveSeminorm x = ⨅ p, PiTensorProduct.projectiveSeminormAux ↑p


lemma eq_one_or_neg_one_of_mul_eq_one' (h : u * v = 1) : u = 1 ∧ v = 1 ∨ u = -1 ∧ v = -1


theorem monotone_nhds : Monotone (𝓝 : Filter α → Filter (Filter α))


@[fun_prop]
protected theorem HasFDerivAt.prodMap (hf : HasFDerivAt f f' p.1) (hf₂ : HasFDerivAt f₂ f₂' p.2) :
    HasFDerivAt (Prod.map f f₂) (f'.prodMap f₂') p

{𝕜 : 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]
{G' : Type u_5}
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
{f : E → F}
{f' : E →L[𝕜] F}
{f₂ : G → G'}
{f₂' : G →L[𝕜] G'}
(p : E × G)
(hf : HasFDerivAt f f' p.1)
(hf₂ : HasFDerivAt f₂ f₂' p.2)


theorem SameCycle.of_zpow {n : ℤ} : SameCycle (f ^ n) x y → SameCycle f x y

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


@[simp]
lemma one_scaleRoots (r : R) :
    (1 : R[X]).scaleRoots r = 1


@[simp]
theorem coe_mul [Mul R] [BoundedMul R] [ContinuousMul R] (f g : α →ᵇ R) : ⇑(f * g) = f * g

{α : Type u}
[TopologicalSpace α]
{R : Type u_2}
[PseudoMetricSpace R]
[Mul R]
[BoundedMul R]
[ContinuousMul R]
(f g : BoundedContinuousFunction α R)


theorem mod_def [Mod α] (a b : Part α) : a % b = bind a fun y => map (y % ·) b

a % b = do
  let y ← a
  Part.map (fun x => y % x) b


theorem normalize_coe_units (u : αˣ) : normalize (u : α) = 1

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
(u : αˣ)


theorem comap_radical : comap f (radical K) = radical (comap f K)

{R : Type u}
{S : Type v}
{F : Type u_1}
[CommRing R]
[CommRing S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(K : Ideal S)

Ideal.comap f K.radical = (Ideal.comap f K).radical


@[simp]
theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd

{α : Type u_5}
[NonUnitalNonAssocRing α]
(x : CentroidHom α)


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

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

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


/-- The trace of a linear map correspond to the contraction pairing under the isomorphism
 `End(M) ≃ M* ⊗ M`-/
theorem trace_eq_contract_of_basis [Finite ι] (b : Basis ι R M) :
    LinearMap.trace R M ∘ₗ dualTensorHom R M M = contractLeft R M

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_5}
[Finite ι]
(b : Basis ι R M)


theorem coeIdeal_injective : Function.Injective (fun (I : Ideal R) ↦ (I : FractionalIdeal R⁰ K))

{R : Type u_1}
[CommRing R]
{K : Type u_3}
[Field K]
[Algebra R K]
[IsFractionRing R K]


@[simp]
theorem mapDomain_single {f : α → β} {a : α} {b : M} : mapDomain f (single a b) = single (f a) b

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{f : α → β}
{a : α}
{b : M}

Finsupp.mapDomain f (Finsupp.single a b) = Finsupp.single (f a) b


@[simp]
theorem aleph0_mul_nat {n : ℕ} (hn : n ≠ 0) : ℵ₀ * n = ℵ₀


theorem coe_le_one (p : PMF α) (a : α) : p a ≤ 1


/-- `IsPrimitiveRoot.autToPow` is injective in the case that it's considered over a cyclotomic
field extension. -/
theorem autToPow_injective : Function.Injective <| hμ.autToPow K

{n : ℕ+}
(K : Type u_1)
[Field K]
{L : Type u_2}
{μ : L}
[CommRing L]
[IsDomain L]
(hμ : IsPrimitiveRoot μ ↑n)
[Algebra K L]
[IsCyclotomicExtension {n} K L]

Function.Injective ⇑(IsPrimitiveRoot.autToPow K hμ)


theorem map_eq_top_iff {f : F} (hf : range f = ⊤) {p : Submodule R M} :
    p.map f = ⊤ ↔ p ⊔ LinearMap.ker f = ⊤

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[Semiring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
{F : Type u_8}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f : F}
(hf : LinearMap.range f = ⊤)
{p : Submodule R M}

Submodule.map f p = ⊤ ↔ p ⊔ LinearMap.ker f = ⊤


/-- The fully faithful embedding of `FintypeCat` into the category of types. -/
@[simps!]
def incl : FintypeCat ⥤ Type*

∀ {X Y : CategoryTheory.InducedCategory (Type u_1) CategoryTheory.Bundled.α} (f : X ⟶ Y) (a : ↑X),
  FintypeCat.incl.map f a = f a


theorem _root_.Function.LeftInverse.list_map {f : α → β} {g : β → α} (h : LeftInverse f g) :
    LeftInverse (map f) (map g)

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(h : Function.LeftInverse f g)

Function.LeftInverse (List.map f) (List.map g)


/-- Free modules are projective. -/
theorem Projective.of_basis {ι : Type*} (b : Basis ι R P) : Projective R P

{R : Type u}
[Ring R]
{P : Type v}
[AddCommGroup P]
[Module R P]
{ι : Type u_1}
(b : Basis ι R P)


theorem negSucc_ediv (m : Nat) {b : Int} (H : 0 < b) : -[m+1] / b = -(div m b + 1)


theorem comap_strictMono_of_surjective : StrictMono (comap f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}
(hf : Function.Surjective ⇑f)


/-- An encoding of terms as lists. -/
@[simps]
protected def encoding : Encoding (L.Term α)

∀ (a : L.Term α), FirstOrder.Language.Term.encoding.encode a = a.listEncode


theorem algebraMap_eq' [CommSemiring S] [Algebra S R] :
    algebraMap S (AdjoinRoot f) = (of f).comp (algebraMap S R)

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

algebraMap S (AdjoinRoot f) = (AdjoinRoot.of f).comp (algebraMap S R)


lemma of_ladder_addEquiv_of_exact (comm₁₂ : g₁₂.comp e₁ = AddMonoidHom.comp e₂ f₁₂)
    (comm₂₃ : g₂₃.comp e₂ = AddMonoidHom.comp e₃ f₂₃) (H : Exact f₁₂ f₂₃) : Exact g₁₂ g₂₃

(comm₁₂ : g₁₂.comp ↑e₁ = (↑e₂).comp f₁₂)

(comm₂₃ : g₂₃.comp ↑e₂ = (↑e₃).comp f₂₃)


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


/-- The same point subtracted from two points produces equal results
if and only if those points are equal. -/
@[simp]
theorem vsub_left_cancel_iff {p₁ p₂ p : P} : p₁ -ᵥ p = p₂ -ᵥ p ↔ p₁ = p₂

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
{p₁ p₂ p : P}


/-- A version of Hölder with multiple arguments, one of which plays a distinguished role. -/
theorem lintegral_mul_prod_norm_pow_le {α ι : Type*} [MeasurableSpace α] {μ : Measure α}
    (s : Finset ι) {g : α →  ℝ≥0∞} {f : ι → α → ℝ≥0∞} (hg : AEMeasurable g μ)
    (hf : ∀ i ∈ s, AEMeasurable (f i) μ) (q : ℝ) {p : ι → ℝ} (hpq : q + ∑ i ∈ s, p i = 1)
    (hq :  0 ≤ q) (hp : ∀ i ∈ s, 0 ≤ p i) :
    ∫⁻ a, g a ^ q * ∏ i ∈ s, f i a ^ p i ∂μ ≤
      (∫⁻ a, g a ∂μ) ^ q * ∏ i ∈ s, (∫⁻ a, f i a ∂μ) ^ p i

{α : Type u_2}
{ι : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
(s : Finset ι)
{g : α → ENNReal}
{f : ι → α → ENNReal}
(hg : AEMeasurable g μ)
(hf : ∀ i ∈ s, AEMeasurable (f i) μ)
(q : ℝ)
{p : ι → ℝ}
(hpq : q + ∑ i ∈ s, p i = 1)
(hq : 0 ≤ q)
(hp : ∀ i ∈ s, 0 ≤ p i)

∫⁻ (a : α), g a ^ q * ∏ i ∈ s, f i a ^ p i ∂μ ≤ (∫⁻ (a : α), g a ∂μ) ^ q * ∏ i ∈ s, (∫⁻ (a : α), f i a ∂μ) ^ p i


@[simp]
theorem nndist_vadd_right (v : V) (x : P) : nndist x (v +ᵥ x) = ‖v‖₊

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


@[simp]
theorem refl_toEquiv : (Diffeomorph.refl I M n).toEquiv = Equiv.refl _

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u_9)
[TopologicalSpace M]
[ChartedSpace H M]
(n : ℕ∞)

(Diffeomorph.refl I M n).toEquiv = Equiv.refl M


@[simp, norm_cast]
protected theorem coe_nsmul [AddMonoid α] [Preorder α] [CovariantClass α α (· + ·) (· ≤ ·)]
    (n : ℕ) (a : { x : α // 0 ≤ x }) : ((n • a : { x : α // 0 ≤ x }) : α) = n • (a : α)

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


lemma closedBall_subset_trichotomy :
    closedBall x r ⊆ closedBall y s ∨ closedBall y s ⊆ closedBall x r ∨
    Disjoint (closedBall x r) (closedBall y s)

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x y : X)
(r s : ℝ)

Metric.closedBall x r ⊆ Metric.closedBall y s ∨
  Metric.closedBall y s ⊆ Metric.closedBall x r ∨ Disjoint (Metric.closedBall x r) (Metric.closedBall y s)


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

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


@[simp]
theorem neg_posPart : (-j).posPart = j.negPart

(j : MeasureTheory.JordanDecomposition α)


@[simp]
theorem _root_.Subalgebra.topologicalClosure_coe
    (s : Subalgebra R A) :
  (s.topologicalClosure : Set A) = closure ↑s

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[TopologicalSemiring A]
[Algebra R A]
(s : Subalgebra R A)


lemma comp_sheafifyHomEquiv'_symm_hom {F : PresheafOfModules.{v} R.val}
    (hF : Presheaf.IsSheaf J F.presheaf) (f : M₀ ⟶ (restrictScalars α).obj F) :
    φ ≫ ((sheafifyHomEquiv' α φ hF).symm f).hom = f.hom

{J : CategoryTheory.GrothendieckTopology C}

(hF : CategoryTheory.Presheaf.IsSheaf J F.presheaf)

(f : M₀ ⟶ (PresheafOfModules.restrictScalars α).obj F)

φ ≫ ((PresheafOfModules.sheafifyHomEquiv' α φ hF).symm f).hom = f.hom


lemma isIso_of_isIso_apply (f : X ⟶ Y) [hf : ∀ i, IsIso (f i)] :
    IsIso f

[hf : ∀ (i : β), CategoryTheory.IsIso (f i)]


/-- `succ` commutes with `succAbove`. -/
@[simp] lemma succ_succAbove_succ {n : ℕ} (i : Fin (n + 1)) (j : Fin n) :
    i.succ.succAbove j.succ = (i.succAbove j).succ


theorem surjOn_empty (f : α → β) (s : Set α) : SurjOn f s ∅

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


/-- A version of Sard lemma in fixed dimension: given a differentiable function from `E` to `E` and
a set where the differential is not invertible, then the image of this set has zero measure. -/
theorem addHaar_image_eq_zero_of_det_fderivWithin_eq_zero
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (h'f' : ∀ x ∈ s, (f' x).det = 0) :
    μ (f '' s) = 0


protected theorem sub_le_sub_iff_right {n : Nat} (h : k ≤ m) : n - k ≤ m - k ↔ n ≤ m


@[simp]
theorem id_toAlgHom : BialgHom.id R A = AlgHom.id R A

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[CoalgebraStruct R A]


theorem lt_iff_exists_coe : a < b ↔ ∃ p : ℝ≥0, a = p ∧ ↑p < b


@[simp]
theorem inr_lt_inr_iff [LT α] [LT β] {a b : β} : (inr a : α ⊕ β) < inr b ↔ a < b

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]
{a b : β}


@[simp]
theorem eventuallyEq_principal {s : Set α} {f g : α → β} : f =ᶠ[𝓟 s] g ↔ EqOn f g s

{α : Type u}
{β : Type v}
{s : Set α}
{f g : α → β}


theorem subgraphOfAdj_symm {v w : V} (hvw : G.Adj v w) :
    G.subgraphOfAdj hvw.symm = G.subgraphOfAdj hvw

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


theorem mono_to_simple_zero_of_not_iso {X Y : C} [Simple Y] {f : X ⟶ Y} [Mono f]
    (w : IsIso f → False) : f = 0


theorem u_sInf_l_image [CompleteLattice α] [CompleteLattice β] (gi : GaloisCoinsertion l u)
    (s : Set α) : u (sInf (l '' s)) = sInf s

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[CompleteLattice α]
[CompleteLattice β]
(gi : GaloisCoinsertion l u)
(s : Set α)


theorem le_comap_mul : comap f K * comap f L ≤ comap f (K * L)

{R : Type u}
{S : Type v}
{F : Type u_1}
[CommRing R]
[CommRing S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
{K L : Ideal S}

Ideal.comap f K * Ideal.comap f L ≤ Ideal.comap f (K * L)


@[simp]
theorem map_id :
    map I (LinearMap.id (M := M)) =
      LinearMap.id (R := AdicCompletion I R) (M := AdicCompletion I M)

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

AdicCompletion.map I LinearMap.id = LinearMap.id


@[simp] theorem bind_none (x : Option α) : x.bind (fun _ => none (α := β)) = none

{α : Type u_1}
{β : Type u_2}
(x : Option α)


/-- The identity sequence is an EDS. -/
theorem isEllDivSequence_id : IsEllDivSequence id


@[reassoc (attr := simp)]
lemma inl_v_desc_f (p q : ℤ) (h : p + (-1) = q) :
    (inl φ).v p q h ≫ (desc φ α β eq).f q = α.v p q h

(α : CochainComplex.HomComplex.Cochain F K (-1))

(eq : CochainComplex.HomComplex.δ (-1) 0 α = CochainComplex.HomComplex.Cochain.ofHom (φ ≫ β))

(CochainComplex.mappingCone.inl φ).v p q h ≫ (CochainComplex.mappingCone.desc φ α β eq).f q = α.v p q h


theorem ext [Fact p.Prime] {f g} (hf : IsPoly₂ p f) (hg : IsPoly₂ p g)
    (h : ∀ (R : Type u) [_Rcr : CommRing R] (x y : 𝕎 R) (n : ℕ),
        ghostComponent n (f x y) = ghostComponent n (g x y)) :
    ∀ (R) [_Rcr : CommRing R] (x y : 𝕎 R), f x y = g x y

{f g : ⦃R : Type u⦄ → [inst : CommRing R] → WittVector p R → WittVector p R → WittVector p R}

(h :
  ∀ (R : Type u) [_Rcr : CommRing R] (x y : WittVector p R) (n : ℕ),
    (WittVector.ghostComponent n) (f x y) = (WittVector.ghostComponent n) (g x y))


/-- A variant of `lift_unique` with `Z` a terminal object. -/
@[simps!]
def liftToTerminalUnique {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (hZ : Limits.IsTerminal Z)
    (G : WithTerminal C ⥤ D) (h : incl ⋙ G ≅ F) (hG : G.obj star ≅ Z) : G ≅ liftToTerminal F hZ

(hZ : CategoryTheory.Limits.IsTerminal Z)

(G : CategoryTheory.Functor (CategoryTheory.WithTerminal C) D)

(h : CategoryTheory.WithTerminal.incl.comp G ≅ F)

(hG : G.obj CategoryTheory.WithTerminal.star ≅ Z)

(CategoryTheory.WithTerminal.liftToTerminalUnique F hZ G h hG).hom.app X =
  (match X with
    | CategoryTheory.WithTerminal.of x => h.app x
    | CategoryTheory.WithTerminal.star => hG).hom


@[to_additive] theorem inducing_mk_symm : Inducing (@mk M).symm


@[simp]
theorem Icc_eq_zero_iff : Icc a b = 0 ↔ ¬a ≤ b

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


@[to_additive (attr := simp)]
theorem mk_coe (f : α →*o β) (h) : OrderMonoidHom.mk (f : α →* β) h = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]
(f : α →*o β)
(h : Monotone (↑↑f).toFun)

{ toMonoidHom := ↑f, monotone' := h } = f


theorem smul_of_tower_mem (s : S) {x : M} (h : x ∈ p) : s • x ∈ p

{S : Type u'}
{R : Type u}
{M : Type v}
[Monoid R]
[MulAction R M]
[SMul S R]
[SMul S M]
[IsScalarTower S R M]
(p : SubMulAction R M)
(s : S)
{x : M}
(h : x ∈ p)


protected lemma monotone_iff_continuous [TopologicalSpace α] [TopologicalSpace β]
    [Topology.IsUpperSet α] [Topology.IsUpperSet β] {f : α → β} : Monotone f ↔ Continuous f

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[TopologicalSpace α]
[TopologicalSpace β]
[Topology.IsUpperSet α]
[Topology.IsUpperSet β]
{f : α → β}


theorem iff_false_intro (h : ¬a) : a ↔ False


theorem IntermediateField.splits_of_splits (h : p.Splits (algebraMap K L))
    (hF : ∀ x ∈ p.rootSet L, x ∈ F) : p.Splits (algebraMap K F)

(h : Polynomial.Splits (algebraMap K L) p)


theorem isUnit_C {x : R} : IsUnit (C x) ↔ IsUnit x


@[simp]
theorem mk0_inj {a b : G₀} (ha : a ≠ 0) (hb : b ≠ 0) : Units.mk0 a ha = Units.mk0 b hb ↔ a = b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}
(ha : a ≠ 0)
(hb : b ≠ 0)


theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻¹' s).Nonempty) :
    s.Nonempty

{α : Type u_1}
{β : Type u_2}
{s : Set β}
{f : α → β}
(hf : (f ⁻¹' s).Nonempty)


theorem WSameSide.map {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) (f : P →ᵃ[R] P') :
    (s.map f).WSameSide (f x) (f y)

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{s : AffineSubspace R P}
{x y : P}
(h : s.WSameSide x y)
(f : P →ᵃ[R] P')

(AffineSubspace.map f s).WSameSide (f x) (f y)


theorem terminates_congr {c₁ c₂ : Computation α} (h : c₁ ~ c₂) : Terminates c₁ ↔ Terminates c₂

{α : Type u}
{c₁ c₂ : Computation α}
(h : c₁.Equiv c₂)


/-- This is the heart of the proof of the primitive element theorem. It shows that if `F` is
infinite and `α` and `β` are separable over `F` then `F⟮α, β⟯` is generated by a single element. -/
theorem primitive_element_inf_aux [Algebra.IsSeparable F E] : ∃ γ : E, F⟮α, β⟯ = F⟮γ⟯

(F : Type u_1)
[Field F]
[Infinite F]
{E : Type u_2}
[Field E]
(α β : E)
[Algebra F E]
[Algebra.IsSeparable F E]

∃ γ, F⟮α, β⟯ = F⟮γ⟯


@[simp]
theorem sup_image [DecidableEq β] (s : Finset γ) (f : γ → β) (g : β → α) :
    (s.image f).sup g = s.sup (g ∘ f)

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

(Finset.image f s).sup g = s.sup (g ∘ f)


@[simp]
theorem wbtw_lineMap_iff [NoZeroSMulDivisors R V] {x y : P} {r : R} :
    Wbtw R x (lineMap x y r) y ↔ x = y ∨ r ∈ Set.Icc (0 : R) 1

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NoZeroSMulDivisors R V]
{x y : P}
{r : R}

Wbtw R x ((AffineMap.lineMap x y) r) y ↔ x = y ∨ r ∈ Set.Icc 0 1


@[reassoc]
theorem whisker_assoc_symm (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d) :
    f ◁ η ▷ h = (α_ f g h).inv ≫ (f ◁ η) ▷ h ≫ (α_ f g' h).hom

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

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerRight η h) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g h).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.whiskerLeft f η) h)
      (CategoryTheory.Bicategory.associator f g' h).hom)


@[elab_as_elim]
theorem adjoin_induction {s : Set E} {p : E → Prop} {x} (h : x ∈ adjoin F s) (mem : ∀ x ∈ s, p x)
    (algebraMap : ∀ x, p (algebraMap F E x)) (add : ∀ x y, p x → p y → p (x + y))
    (neg : ∀ x, p x → p (-x)) (inv : ∀ x, p x → p x⁻¹) (mul : ∀ x y, p x → p y → p (x * y)) :
    p x

(algebraMap : ∀ (x : F), p ((algebraMap F E) x))

(add : ∀ (x y : E), p x → p y → p (x + y))

(mul : ∀ (x y : E), p x → p y → p (x * y))


/-- If `R` is a monoid, an element in `Rˣ` is regular. -/
@[to_additive "If `R` is an additive monoid, an element in `add_units R` is add-regular."]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R)


/-- Let `E` be a TVS, `𝔖 : Set (Set α)` and `H` a submodule of `α →ᵤ[𝔖] E`. If the image of any
`S ∈ 𝔖` by any `u ∈ H` is bounded (in the sense of `Bornology.IsVonNBounded`), then `H`,
equipped with the topology of `𝔖`-convergence, is a TVS.

If you have a hard time using this lemma, try the one above instead. -/
theorem UniformOnFun.continuousSMul_submodule_of_image_bounded (H : Submodule 𝕜 (α →ᵤ[𝔖] E))
    (h : ∀ u ∈ H, ∀ s ∈ 𝔖, Bornology.IsVonNBounded 𝕜 (u '' s)) :
    @ContinuousSMul 𝕜 H _ _ ((UniformOnFun.topologicalSpace α E 𝔖).induced ((↑) : H → α →ᵤ[𝔖] E))


protected theorem leftInverse : LeftInverse I.symm I

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


/-- If a monoid's only unit is `1`, then it is isomorphic to its associates. -/
@[simps]
def associatesEquivOfUniqueUnits : Associates α ≃* α

{α : Type u_1}
[CancelCommMonoidWithZero α]
[Unique αˣ]
(a : α)

associatesEquivOfUniqueUnits.symm a = Associates.mk a


/-- If two nonzero vectors are equivalent, so are their negations. -/
@[simp]
theorem equiv_neg_iff {v₁ v₂ : RayVector R M} : -v₁ ≈ -v₂ ↔ v₁ ≈ v₂

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{v₁ v₂ : RayVector R M}

-v₁ ≈ -v₂ ↔ v₁ ≈ v₂


@[simp]
theorem mem_pi : x ∈ pi I p ↔ ∀ i ∈ I, x i ∈ p i

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
{I : Set ι}
{p : (i : ι) → Submodule R (φ i)}
{x : (i : ι) → φ i}

x ∈ Submodule.pi I p ↔ ∀ i ∈ I, x i ∈ p i


/-- A maximal proper subspace of a topological module (i.e a `Submodule` satisfying `IsCoatom`)
is either closed or dense. -/
theorem Submodule.isClosed_or_dense_of_isCoatom (s : Submodule R M) (hs : IsCoatom s) :
    IsClosed (s : Set M) ∨ Dense (s : Set M)

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


/-- Homotopy between morphisms of short complexes is compatible with composition. -/
@[simps!]
def comp (h : Homotopy φ₁ φ₂) {ψ₁ ψ₂ : S₂ ⟶ S₃} (h' : Homotopy ψ₁ ψ₂) :
    Homotopy (φ₁ ≫ ψ₁) (φ₂ ≫ ψ₂)

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

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

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

{ψ₁ ψ₂ : S₂ ⟶ S₃}

(h' : CategoryTheory.ShortComplex.Homotopy ψ₁ ψ₂)

(h.comp h').h₃ = CategoryTheory.CategoryStruct.comp h.h₃ ψ₁.τ₃ + CategoryTheory.CategoryStruct.comp φ₂.τ₃ h'.h₃


theorem _root_.Dvd.dvd.modEq_zero_int (h : n ∣ a) : a ≡ 0 [ZMOD n]


/-- The global sections of the restriction is isomorphic to the sections on the open set. -/
@[simps!]
def topIso : Γ(U, ⊤) ≅ Γ(X, U)

{X : AlgebraicGeometry.Scheme}
(U : X.Opens)

U.topIso.inv = X.presheaf.map (CategoryTheory.eqToHom ⋯).op


lemma le_fib_add_one : ∀ n, n ≤ fib n + 1


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

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


/-- If words `w₁ w₂` are such that `w₁` reduces to `w₂`, then `w₂` reduces to the maximal reduction
  of `w₁`. -/
@[to_additive "If words `w₁ w₂` are such that `w₁` reduces to `w₂`, then `w₂` reduces to the maximal
  reduction of `w₁`."]
theorem reduce.rev (H : Red L₁ L₂) : Red L₂ (reduce L₁)

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(H : FreeGroup.Red L₁ L₂)


theorem sym2_toFinset [DecidableEq α] (m : Multiset α) :
    m.toFinset.sym2 = m.sym2.toFinset

{α : Type u_1}
[DecidableEq α]
(m : Multiset α)


theorem pred_eq_pred_iff_of_not_isMin (ha : ¬IsMin a) (hb : ¬IsMin b) :
    pred a = pred b ↔ a = b

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


@[simp] theorem replace_cons_self [LawfulBEq α] {a : α} : (a::as).replace a b = b::as

{α : Type u_1}
[BEq α]
{as : List α}
{b : α}
[LawfulBEq α]
{a : α}


theorem condexpL1_neg (f : α → F') : condexpL1 hm μ (-f) = -condexpL1 hm μ f

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(f : α → F')

MeasureTheory.condexpL1 hm μ (-f) = -MeasureTheory.condexpL1 hm μ f


/-- The **Kummer-Dedekind Theorem**. -/
theorem normalizedFactors_ideal_map_eq_normalizedFactors_min_poly_mk_map (hI : IsMaximal I)
    (hI' : I ≠ ⊥) (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤) (hx' : IsIntegral R x) :
    normalizedFactors (I.map (algebraMap R S)) =
      Multiset.map
        (fun f =>
          ((normalizedFactorsMapEquivNormalizedFactorsMinPolyMk hI hI' hx hx').symm f : Ideal S))
        (normalizedFactors (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))).attach

(hx : Ideal.comap (algebraMap R S) (conductor R x) ⊔ I = ⊤)

UniqueFactorizationMonoid.normalizedFactors (Ideal.map (algebraMap R S) I) =
  Multiset.map (fun f => ↑((KummerDedekind.normalizedFactorsMapEquivNormalizedFactorsMinPolyMk hI hI' hx hx').symm f))
    (UniqueFactorizationMonoid.normalizedFactors (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))).attach


protected theorem mdifferentiableOn (h : M ≃ₘ^n⟮I, I'⟯ M') (s : Set M) (hn : 1 ≤ n) :
    MDifferentiableOn I I' h s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, I'⟯ M')
(s : Set M)
(hn : 1 ≤ n)