protected theorem eq_of_le {a b : α} (h : a ≤ b) :
    variationOnFromTo f s a b = (eVariationOn f (s ∩ Icc a b)).toReal

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
(s : Set α)
{a b : α}
(h : a ≤ b)

variationOnFromTo f s a b = (eVariationOn f (s ∩ Set.Icc a b)).toReal


theorem rename_isHomogeneous_iff {f : σ → τ} (hf : f.Injective) :
    (rename f φ).IsHomogeneous n ↔ φ.IsHomogeneous n

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
{φ : MvPolynomial σ R}
{n : ℕ}
{f : σ → τ}
(hf : Function.Injective f)

((MvPolynomial.rename f) φ).IsHomogeneous n ↔ φ.IsHomogeneous n


theorem nhdsWithin_eq_comap_uniformity {x : α} (S : Set α) :
    𝓝[S] x = (𝓤 α ⊓ 𝓟 (univ ×ˢ S)).comap (Prod.mk x)

{α : Type ua}
[UniformSpace α]
{x : α}
(S : Set α)

𝓝[S] x = Filter.comap (Prod.mk x) (𝓤 α ⊓ 𝓟 (Set.univ ×ˢ S))


theorem ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable {f : α → E} (hf : Integrable f μ)
    (h'f : StronglyMeasurable f) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0)

(h'f : MeasureTheory.StronglyMeasurable f)

∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0)


/-- The identity map from a type with multiplication to itself. -/
@[to_additive (attr := simps) "The identity map from a type with addition to itself."]
def MulHom.id (M : Type*) [Mul M] : M →ₙ* M


@[simp, norm_cast]
theorem coe_symmDiff : (↑(s ∆ t) : Set α) = (s : Set α) ∆ t

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


@[simp]
theorem intrinsicClosure_diff_intrinsicFrontier (s : Set P) :
    intrinsicClosure 𝕜 s \ intrinsicFrontier 𝕜 s = intrinsicInterior 𝕜 s

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
(s : Set P)


theorem ContDiffAt.contDiffWithinAt (h : ContDiffAt 𝕜 n f x) : ContDiffWithinAt 𝕜 n f s x

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


lemma add_of_X_ne' {x₁ x₂ y₁ y₂ : F} {h₁ : W.Nonsingular x₁ y₁} {h₂ : W.Nonsingular x₂ y₂}
    (hx : x₁ ≠ x₂) : some h₁ + some h₂ = -some (nonsingular_negAdd h₁ h₂ fun h => (hx h).elim)

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
{h₁ : W.Nonsingular x₁ y₁}
{h₂ : W.Nonsingular x₂ y₂}
(hx : x₁ ≠ x₂)

WeierstrassCurve.Affine.Point.some h₁ + WeierstrassCurve.Affine.Point.some h₂ = -WeierstrassCurve.Affine.Point.some ⋯


theorem fst_injective [h : ∀ a, Subsingleton (β a)] : Injective (fst : (Σ a, β a) → α)

{α : Type u_1}
{β : α → Type u_4}
[h : ∀ (a : α), Subsingleton (β a)]


@[simp]
theorem aeval_algebraMap_eq_zero_iff [NoZeroSMulDivisors A B] [Nontrivial B] (x : A) (p : R[X]) :
    aeval (algebraMap A B x) p = 0 ↔ aeval x p = 0

{R : Type u_1}
{A : Type u_2}
(B : Type u_3)
[CommSemiring R]
[CommSemiring A]
[Semiring B]
[Algebra R A]
[Algebra A B]
[Algebra R B]
[IsScalarTower R A B]
[NoZeroSMulDivisors A B]
[Nontrivial B]
(x : A)
(p : R[X])

(Polynomial.aeval ((algebraMap A B) x)) p = 0 ↔ (Polynomial.aeval x) p = 0


lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y)

Surreal.Multiplication.P24 x₁ x₂ y ↔ Surreal.Multiplication.P24 x₁ x₂ (-y)


theorem IsOrtho.all (x y : M) : IsOrtho (0 : QuadraticMap R M N) x y

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(x y : M)


@[simp]
theorem whiskerRight_hom (X : Mon_ C) {Y Z : Mon_ C} (f : Y ⟶ Z) :
    (X ◁ f).hom = X.X ◁ f.hom

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


theorem IsGenericPoint.def {x : α} {S : Set α} (h : IsGenericPoint x S) :
    closure ({x} : Set α) = S

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{S : Set α}
(h : IsGenericPoint x S)


/-- When a right homology data `h` of a short complex `S` is preserved by a functor `F`,
this is the induced right homology data `h.map F` for the short complex `S.map F`. -/
@[simps]
noncomputable def map : (S.map F).RightHomologyData


/-- Let `e : S ≃ I` be an additive isomorphism (therefore a `ℤ`-linear equiv).
Then an alternative way to compute the norm of `I` is given by taking the determinant of `e`.
See `natAbs_det_basis_change` for a more familiar formulation of this result. -/
theorem natAbs_det_equiv (I : Ideal S) {E : Type*} [EquivLike E S I] [AddEquivClass E S I] (e : E) :
    Int.natAbs
        (LinearMap.det
          ((Submodule.subtype I).restrictScalars ℤ ∘ₗ AddMonoidHom.toIntLinearMap (e : S →+ I))) =
      Ideal.absNorm I

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
[Module.Finite ℤ S]
(I : Ideal S)
{E : Type u_2}
[EquivLike E S ↥I]
[AddEquivClass E S ↥I]
(e : E)

(LinearMap.det (↑ℤ (Submodule.subtype I) ∘ₗ (↑e).toIntLinearMap)).natAbs = Ideal.absNorm I


theorem fg_of_isUnit (I : FractionalIdeal S P) (h : IsUnit I) : FG (I : Submodule R P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I : FractionalIdeal S P)
(h : IsUnit I)


@[simp, norm_cast]
theorem coe_pow (x : Icc (0 : α) 1) (n : ℕ) : ↑(x ^ n) = ((x : α) ^ n)

{α : Type u_1}
[OrderedSemiring α]
(x : ↑(Set.Icc 0 1))
(n : ℕ)


theorem isRoot_prod {R} [CommRing R] [IsDomain R] {ι : Type*} (s : Finset ι) (p : ι → R[X])
    (x : R) : IsRoot (∏ j ∈ s, p j) x ↔ ∃ i ∈ s, IsRoot (p i) x

{R : Type u_2}
[CommRing R]
[IsDomain R]
{ι : Type u_1}
(s : Finset ι)
(p : ι → R[X])
(x : R)

(∏ j ∈ s, p j).IsRoot x ↔ ∃ i ∈ s, (p i).IsRoot x


theorem mem_of_mem_inter_right {x : α} {a b : Set α} (h : x ∈ a ∩ b) : x ∈ b

{α : Type u}
{x : α}
{a b : Set α}
(h : x ∈ a ∩ b)


theorem Fix.mk_dest (x : Fix F) : Fix.mk (Fix.dest x) = x

{F : Type u → Type u}
[q : QPF F]
(x : QPF.Fix F)


/-- A subset of a preorder `P` is an ideal if it is
  - nonempty
  - upward directed (any pair of elements in the ideal has an upper bound in the ideal)
  - downward closed (any element less than an element of the ideal is in the ideal). -/
@[mk_iff]
structure IsIdeal {P} [LE P] (I : Set P) : Prop where
  /-- The ideal is downward closed. -/
  IsLowerSet : IsLowerSet I
  /-- The ideal is nonempty. -/
  Nonempty : I.Nonempty
  /-- The ideal is upward directed. -/
  Directed : DirectedOn (· ≤ ·) I

{P : Type u_2}
[LE P]
{I : Set P}
(self : Order.IsIdeal I)


theorem SeparatingLeft.ne_zero [Nontrivial M₁] {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}
    (h : B.SeparatingLeft) : B ≠ 0

{R : Type u_1}
{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{I₁ : R₁ →+* R}
{I₂ : R₂ →+* R}
[Nontrivial M₁]
{B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}
(h : B.SeparatingLeft)


@[simp]
theorem tensorObj (X Y : C) : X ⊗ Y = (X ⨯ Y)

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


@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem add_of_nat (m n) : ((m + n : ℕ) : Num) = m + n


theorem exists_mem_eq_sup' (f : ι → α) : ∃ i, i ∈ s ∧ s.sup' H f = f i

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
{s : Finset ι}
(H : s.Nonempty)
(f : ι → α)


@[to_additive (attr := simp)]
theorem prod_pi_mulSingle {β : α → Type*} [DecidableEq α] [∀ a, CommMonoid (β a)] (a : α)
    (f : ∀ a, β a) (s : Finset α) :
    (∏ a' ∈ s, Pi.mulSingle a' (f a') a) = if a ∈ s then f a else 1

{α : Type u_3}
{β : α → Type u_6}
[DecidableEq α]
[(a : α) → AddCommMonoid (β a)]
(a : α)
(f : (a : α) → β a)
(s : Finset α)

∑ a' ∈ s, Pi.single a' (f a') a = if a ∈ s then f a else 0


lemma trailingDegree_ne_zero : trailingDegree p ≠ 0 ↔ coeff p 0 = 0


theorem congr_right (h₁ : RightInvOn f' f₁ t) (hg : MapsTo f' t s) (heq : EqOn f₁ f₂ s) :
    RightInvOn f' f₂ t

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


@[simp]
theorem mapAlgHom_coe_ringHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    ↑(mapAlgHom f : _ →ₐ[R] MvPolynomial σ S₂) =
      (map ↑f : MvPolynomial σ S₁ →+* MvPolynomial σ S₂)

{R : Type u}
{S₁ : Type v}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[CommSemiring S₂]
[Algebra R S₁]
[Algebra R S₂]
(f : S₁ →ₐ[R] S₂)

↑(MvPolynomial.mapAlgHom f) = MvPolynomial.map ↑f


theorem closedBall_zero_eq : closedBall p 0 r = { y : E | p y ≤ r }

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
{r : ℝ}


@[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
    Pi.cons s a b f a h = b

{α : Type u_1}
{δ : α → Sort v}
[DecidableEq α]
(s : Finset α)
(a : α)
(b : δ a)
(f : (a : α) → a ∈ s → δ a)
(h : a ∈ insert a s)


@[simp]
theorem isOrtho_sSup_right {U : Submodule 𝕜 E} {V : Set (Submodule 𝕜 E)} :
    U ⟂ sSup V ↔ ∀ Vᵢ ∈ V, U ⟂ Vᵢ

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U : Submodule 𝕜 E}
{V : Set (Submodule 𝕜 E)}


private theorem exists_word_with_prod (w : W) : ∃ n ω, ω.length = n ∧ π ω = w

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


lemma ContinuousOn.inf' (hf : ContinuousOn f s) (hg : ContinuousOn g s) :
    ContinuousOn (f ⊓ g) s

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
[Inf L]
[ContinuousInf L]
{f g : X → L}
{s : Set X}
(hf : ContinuousOn f s)
(hg : ContinuousOn g s)


theorem continuousOn_update_iff [T1Space X] [DecidableEq X] [TopologicalSpace Y] {f : X → Y}
    {s : Set X} {x : X} {y : Y} :
    ContinuousOn (Function.update f x y) s ↔
      ContinuousOn f (s \ {x}) ∧ (x ∈ s → Tendsto f (𝓝[s \ {x}] x) (𝓝 y))

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T1Space X]
[DecidableEq X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
{x : X}
{y : Y}

ContinuousOn (Function.update f x y) s ↔ ContinuousOn f (s \ {x}) ∧ (x ∈ s → Filter.Tendsto f (𝓝[s \ {x}] x) (𝓝 y))


@[simp]
theorem countP_zero : countP p 0 = 0

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


@[norm_cast]
theorem coe_sum {s : Finset α} {f : α → ℚ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℚ)

{α : Type u_2}
{s : Finset α}
{f : α → ℚ≥0}


@[simp]
theorem transpose_apply (M : Matrix m n α) (i j) : transpose M i j = M j i

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


theorem Ico_ae_eq_Icc : Ico a b =ᵐ[μ] Icc a b

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


theorem mul_self_eq_mul_self_iff [CommRing R] [NoZeroDivisors R] {a b : R} :
    a * a = b * b ↔ a = b ∨ a = -b

{R : Type x}
[CommRing R]
[NoZeroDivisors R]
{a b : R}


@[to_additive (attr := simp)]
theorem coe_copy {s : Set M} (hs : s = S) : (S.copy s hs : Set M) = s

{M : Type u_1}
[MulOneClass M]
{S : Submonoid M}
{s : Set M}
(hs : s = ↑S)


/-- Two morphisms out of a pushout are equal if their compositions with the pushout morphisms are
    equal -/
@[ext 1100]
theorem pushout.hom_ext {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} [HasPushout f g] {W : C}
    {k l : pushout f g ⟶ W} (h₀ : pushout.inl _ _ ≫ k = pushout.inl _ _ ≫ l)
    (h₁ : pushout.inr _ _ ≫ k = pushout.inr _ _ ≫ l) : k = l

{k l : CategoryTheory.Limits.pushout f g ⟶ W}

(h₀ : CategoryTheory.Limits.pushout.inl f g ≫ k = CategoryTheory.Limits.pushout.inl f g ≫ l)

(h₁ : CategoryTheory.Limits.pushout.inr f g ≫ k = CategoryTheory.Limits.pushout.inr f g ≫ l)


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_sup (U V : OpenSubgroup G) : (↑(U ⊔ V) : Subgroup G) = ↑U ⊔ ↑V

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[ContinuousAdd G]
(U V : OpenAddSubgroup G)


theorem map_comp (f₂ : B →ₐ[S] C) (f₁ : A →ₐ[S] B) (g₂ : E →ₐ[R] F) (g₁ : D →ₐ[R] E) :
    map (f₂.comp f₁) (g₂.comp g₁) = (map f₂ g₂).comp (map f₁ g₁)

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
{E : Type uE}
{F : Type uF}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
[Semiring C]
[Algebra R C]
[Algebra S C]
[IsScalarTower R S C]
[Semiring D]
[Algebra R D]
[Semiring E]
[Algebra R E]
[Semiring F]
[Algebra R F]
(f₂ : B →ₐ[S] C)
(f₁ : A →ₐ[S] B)
(g₂ : E →ₐ[R] F)
(g₁ : D →ₐ[R] E)

Algebra.TensorProduct.map (f₂.comp f₁) (g₂.comp g₁) =
  (Algebra.TensorProduct.map f₂ g₂).comp (Algebra.TensorProduct.map f₁ g₁)


theorem nat_strong_rec (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Computable₂ g)
    (H : ∀ a n, g a ((List.range n).map (f a)) = Option.some (f a n)) : Computable₂ f

(f : α → ℕ → σ)

(H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n))


theorem image2_subset_iff_left : image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u

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

Set.image2 f s t ⊆ u ↔ ∀ a ∈ s, (fun b => f a b) '' t ⊆ u


theorem pairwise_cons' {a : α} (ha : a ∉ s) (r : β → β → Prop) (f : α → β) :
    Pairwise (r on fun a : s.cons a ha => f a) ↔
    Pairwise (r on fun a : s => f a) ∧ ∀ b ∈ s, r (f a) (f b) ∧ r (f b) (f a)

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{a : α}
(ha : a ∉ s)
(r : β → β → Prop)
(f : α → β)

Pairwise (r on fun a_1 => f ↑a_1) ↔ Pairwise (r on fun a => f ↑a) ∧ ∀ b ∈ s, r (f a) (f b) ∧ r (f b) (f a)


lemma toReal_rnDeriv_tilted_left {ν : Measure α} [SigmaFinite μ] [SigmaFinite ν]
    (hfν : AEMeasurable f ν) :
    (fun x ↦ ((μ.tilted f).rnDeriv ν x).toReal)
      =ᵐ[ν] fun x ↦ exp (f x) / (∫ x, exp (f x) ∂μ) * (μ.rnDeriv ν x).toReal

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{f : α → ℝ}
{ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hfν : AEMeasurable f ν)

(fun x => ((μ.tilted f).rnDeriv ν x).toReal) =ᵐ[ν] fun x =>
  (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * (μ.rnDeriv ν x).toReal


lemma _root_.MeasurableEquiv.withDensity_ofReal_map_symm_apply_eq_integral_abs_deriv_mul
    (f : ℝ ≃ᵐ ℝ) {s : Set ℝ} (hs : MeasurableSet s)
    {g : ℝ → ℝ} (hg : ∀ᵐ x, x ∈ f '' s → 0 ≤ g x) (hg_int : IntegrableOn g (f '' s))
    {f' : ℝ → ℝ} (hf' : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) :
    (volume.withDensity (fun x ↦ ENNReal.ofReal (g x))).map f.symm s
      = ENNReal.ofReal (∫ x in s, |f' x| * g (f x))

(f : ℝ ≃ᵐ ℝ)

(hg : ∀ᵐ (x : ℝ), x ∈ ⇑f '' s → 0 ≤ g x)

(hg_int : MeasureTheory.IntegrableOn g (⇑f '' s) MeasureTheory.volume)

(hf' : ∀ x ∈ s, HasDerivWithinAt (⇑f) (f' x) s x)

(MeasureTheory.Measure.map (⇑f.symm) (MeasureTheory.volume.withDensity fun x => ENNReal.ofReal (g x))) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * g (f x))


theorem iUnion_Ioc_add_intCast : ⋃ n : ℤ, Ioc (a + n) (a + n + 1) = Set.univ

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

⋃ n, Set.Ioc (a + ↑n) (a + ↑n + 1) = Set.univ


theorem nonempty_preirreducible_inter [PreirreducibleSpace X] :
    IsOpen s → IsOpen t → s.Nonempty → t.Nonempty → (s ∩ t).Nonempty

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
[PreirreducibleSpace X]


/-- An additive monoid `M` is finitely generated if and only if `R[M]` is of
finite type. -/
theorem finiteType_iff_fg [CommRing R] [Nontrivial R] :
    FiniteType R R[M] ↔ AddMonoid.FG M

{R : Type u_1}
{M : Type u_2}
[AddMonoid M]
[CommRing R]
[Nontrivial R]

Algebra.FiniteType R (AddMonoidAlgebra R M) ↔ AddMonoid.FG M


@[reassoc (attr := simp)]
lemma lift_fst (hP : IsPullback fst snd f g) {W : C} (h : W ⟶ X) (k : W ⟶ Y)
    (w : h ≫ f = k ≫ g) : hP.lift h k w ≫ fst = h

(hP : CategoryTheory.IsPullback fst snd f g)


/-- A composition of monad morphisms gives the composition of corresponding functors.
-/
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomComp {T₁ T₂ T₃ : Monad C} (f : T₁ ⟶ T₂) (g : T₂ ⟶ T₃) :
    algebraFunctorOfMonadHom (f ≫ g) ≅ algebraFunctorOfMonadHom g ⋙ algebraFunctorOfMonadHom f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ T₂ T₃ : CategoryTheory.Monad C}
(f : T₁ ⟶ T₂)
(g : T₂ ⟶ T₃)
(X : T₃.Algebra)

((CategoryTheory.Monad.algebraFunctorOfMonadHomComp f g).inv.app X).f =
  (CategoryTheory.Iso.refl
      ((CategoryTheory.Monad.algebraFunctorOfMonadHom (CategoryTheory.CategoryStruct.comp f g)).obj X).A).inv


theorem left_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : a.Dom

{α : Type u_1}
[Inter α]
{a b : Part α}
(hab : (a ∩ b).Dom)


theorem injective_pointReflection_left_of_module [Invertible (2 : k)] :
    ∀ y, Injective fun x : P₁ => pointReflection k x y

(k : Type u_1)
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[Invertible 2]
(y : P₁)

Function.Injective fun x => (AffineEquiv.pointReflection k x) y


@[simp] theorem symm_apply_apply (e : α ≃ β) (x : α) : e.symm (e x) = x

{α : Sort u}
{β : Sort v}
(e : α ≃ β)
(x : α)


/-- Given `R`-module X and `S`-module Y, any `g : Y ⟶ (coextendScalars f).obj X`
corresponds to `(restrictScalars f).obj Y ⟶ X` by `y ↦ g y 1`
-/
@[simps apply]
def HomEquiv.toRestriction {X Y} (g : Y ⟶ (coextendScalars f).obj X) :
    (restrictScalars f).obj Y ⟶ X

(g : Y ⟶ (ModuleCat.coextendScalars f).obj X)

(ModuleCat.RestrictionCoextensionAdj.HomEquiv.toRestriction f g) y = (g y).toFun 1


@[simp]
theorem map_top_of_surjective (hf : Function.Surjective f) : AffineSubspace.map f ⊤ = ⊤

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
(hf : Function.Surjective ⇑f)


theorem QuasilinearOn.monotoneOn_or_antitoneOn [LinearOrder β] (hf : QuasilinearOn 𝕜 s f) :
    MonotoneOn f s ∨ AntitoneOn f s

{𝕜 : Type u_1}
{β : Type u_4}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → β}
[LinearOrder β]
(hf : QuasilinearOn 𝕜 s f)


theorem forIn_eq_data_forIn [Monad m]
    (as : Array α) (b : β) (f : α → β → m (ForInStep β)) :
    forIn as b f = forIn as.data b f

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
(as : Array α)
(b : β)
(f : α → β → m (ForInStep β))


theorem exists_fin_succ' {P : Fin (n + 1) → Prop} :
    (∃ i, P i) ↔ (∃ i : Fin n, P i.castSucc) ∨ P (.last _)

(∃ i, P i) ↔ (∃ i, P i.castSucc) ∨ P (Fin.last n)


/-- If `a ≠ b`, `c ∈ [a, b]`, `f` is differentiable in the neighborhood of `c` within
`[a, b] \ {c}`, `‖f x‖ → ∞` as `x → c` within `[a, b] \ {c}`, and `f' = O(g)` along
`𝓝[[a, b] \ {c}] c`, where `f'` is the derivative of `f`, then `g` is not interval integrable on
`a..b`. -/
theorem not_intervalIntegrable_of_tendsto_norm_atTop_of_deriv_isBigO_within_diff_singleton
    {f : ℝ → E} {g : ℝ → F} {a b c : ℝ} (hne : a ≠ b) (hc : c ∈ [[a, b]])
    (h_deriv : ∀ᶠ x in 𝓝[[[a, b]] \ {c}] c, DifferentiableAt ℝ f x)
    (h_infty : Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \ {c}] c) atTop)
    (hg : deriv f =O[𝓝[[[a, b]] \ {c}] c] g) : ¬IntervalIntegrable g volume a b

(h_deriv : ∀ᶠ (x : ℝ) in 𝓝[[[a, b]] \ {c}] c, DifferentiableAt ℝ f x)

(h_infty : Filter.Tendsto (fun x => ‖f x‖) (𝓝[[[a, b]] \ {c}] c) Filter.atTop)

¬IntervalIntegrable g MeasureTheory.volume a b


@[simp]
theorem coe_trans (e : P₁ ≃ᵃL[k] P₂) (e' : P₂ ≃ᵃL[k] P₃) : ⇑(e.trans e') = e' ∘ e

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


@[simp]
theorem normSq_conj (z : ℂ) : normSq (conj z) = normSq z

Complex.normSq ((starRingEnd ℂ) z) = Complex.normSq z


theorem condexpIndL1_smul' [NormedSpace ℝ F] [SMulCommClass ℝ 𝕜 F] (c : 𝕜) (x : F) :
    condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x

{α : Type u_1}
{F : Type u_3}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
[NormedSpace ℝ F]
[SMulCommClass ℝ 𝕜 F]
(c : 𝕜)
(x : F)

MeasureTheory.condexpIndL1 hm μ s (c • x) = c • MeasureTheory.condexpIndL1 hm μ s x


@[to_additive (attr := simp)]
theorem coe_mulLeft (x : X) : ⇑(ContinuousMap.mulLeft x) = fun y => x * y

{X : Type u_5}
[TopologicalSpace X]
[Add X]
[ContinuousAdd X]
(x : X)

⇑(ContinuousMap.addLeft x) = fun y => x + y


theorem isLindelof_accumulate {K : ℕ → Set X} (hK : ∀ n, IsLindelof (K n)) (n : ℕ) :
    IsLindelof (Accumulate K n)

{X : Type u}
[TopologicalSpace X]
{K : ℕ → Set X}
(hK : ∀ (n : ℕ), IsLindelof (K n))
(n : ℕ)


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

(CategoryTheory.MonoidalCategory.rightUnitor X).inv.f =
  CategoryTheory.Limits.prod.lift (CategoryTheory.CategoryStruct.id X.src) (CategoryTheory.Limits.terminal.from X.src)


@[simp]
lemma quotientEquivClasses_mk_eq (r : Setoid α) (a : α) :
    (quotientEquivClasses r (Quotient.mk r a) : Set α) = { x | r.Rel x a }

↑(r.quotientEquivClasses ⟦a⟧) = {x | r.Rel x a}


@[reassoc (attr := simp)]
lemma isoHomologyπ₀_inv_naturality [L.HasHomology 0] :
    HomologicalComplex.homologyMap φ 0 ≫ L.isoHomologyπ₀.inv =
      K.isoHomologyπ₀.inv ≫ HomologicalComplex.cyclesMap φ 0


lemma map_ψ (n : ℤ) : (W.map f).ψ n = (W.ψ n).map (mapRingHom f)

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
(f : R →+* S)
(n : ℤ)

(W.map f).ψ n = Polynomial.map (Polynomial.mapRingHom f) (W.ψ n)


/-- Left unit cancellation `1 ⊗ X ≅ X` in `Dial C`. -/
@[simps!] def leftUnitor (X : Dial C) : tensorObj tensorUnit X ≅ X

X.leftUnitor.hom.F =
  CategoryTheory.Limits.prod.lift (CategoryTheory.Limits.terminal.from (((⊤_ C) ⨯ X.src) ⨯ X.tgt))
    CategoryTheory.Limits.prod.snd


theorem isLindelof_univ_iff : IsLindelof (univ : Set X) ↔ LindelofSpace X


theorem dist_eq_iff_dist_coe_center_eq :
    dist z w = r ↔ dist (z : ℂ) (w.center r) = w.im * Real.sinh r

dist z w = r ↔ dist ↑z ↑(w.center r) = w.im * Real.sinh r


theorem not_unit_iff_exists_factors_eq (a : α) (hn0 : a ≠ 0) :
    ¬IsUnit a ↔ ∃ f : Multiset α, (∀ b ∈ f, Irreducible b) ∧ f.prod = a ∧ f ≠ ∅

{α : Type u_1}
[CommMonoidWithZero α]
[WfDvdMonoid α]
(a : α)
(hn0 : a ≠ 0)

¬IsUnit a ↔ ∃ f, (∀ b ∈ f, Irreducible b) ∧ f.prod = a ∧ f ≠ ∅


theorem interior_eq_empty_iff_dense_compl : interior s = ∅ ↔ Dense sᶜ

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


/-- Split off the constant coefficient. -/
theorem eq_X_mul_shift_add_const (φ : R⟦X⟧) :
    φ = (X * mk fun p => coeff R (p + 1) φ) + C R (constantCoeff R φ)

{R : Type u_1}
[Semiring R]
(φ : PowerSeries R)

φ =
  (PowerSeries.X * PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) +
    (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ)


/-- If `s ⊆ t` and `t` is bounded above, then so is `s`. -/
theorem BddAbove.mono ⦃s t : Set α⦄ (h : s ⊆ t) : BddAbove t → BddAbove s

{α : Type u}
[Preorder α]
⦃s t : Set α⦄
(h : s ⊆ t)


/-- A solution has `x ≠ 0`. -/
theorem x_ne_zero (h₀ : 0 ≤ d) (a : Solution₁ d) : a.x ≠ 0

{d : ℤ}
(h₀ : 0 ≤ d)
(a : Pell.Solution₁ d)


/-- If `z` is a nonzero complex number, then `conj z / z` belongs to the unit circle. -/
@[simps]
def circle.ofConjDivSelf (z : ℂ) (hz : z ≠ 0) : circle

↑(circle.ofConjDivSelf z hz) = (starRingEnd ℂ) z / z


/-- A homeomorphism of spaces gives an equivalence of categories of presheaves. -/
@[simps!]
def presheafEquivOfIso {X Y : TopCat} (H : X ≅ Y) : X.Presheaf C ≌ Y.Presheaf C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{X Y : TopCat}
(H : X ≅ Y)
(G : (TopologicalSpace.Opens ↑X)ᵒᵖ ⥤ C)

∀ (X_1 : (TopologicalSpace.Opens ↑Y)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).functor.obj G).obj X_1 =
    G.obj (Opposite.op ((TopologicalSpace.Opens.map H.hom).obj (Opposite.unop X_1)))


/-- Sometimes, one may want to construct a charted space structure on a space which does not yet
have a topological structure, where the topology would come from the charts. For this, one needs
charts that are only partial equivalences, and continuity properties for their composition.
This is formalised in `ChartedSpaceCore`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure ChartedSpaceCore (H : Type*) [TopologicalSpace H] (M : Type*) where
  /-- An atlas of charts, which are only `PartialEquiv`s -/
  atlas : Set (PartialEquiv M H)
  /-- The preferred chart at each point -/
  chartAt : M → PartialEquiv M H
  mem_chart_source : ∀ x, x ∈ (chartAt x).source
  chart_mem_atlas : ∀ x, chartAt x ∈ atlas
  open_source : ∀ e e' : PartialEquiv M H, e ∈ atlas → e' ∈ atlas → IsOpen (e.symm.trans e').source
  continuousOn_toFun : ∀ e e' : PartialEquiv M H, e ∈ atlas → e' ∈ atlas →
    ContinuousOn (e.symm.trans e') (e.symm.trans e').source

{H : Type u_5}
[TopologicalSpace H]
{M : Type u_6}
(self : ChartedSpaceCore H M)
(e e' : PartialEquiv M H)

e ∈ self.atlas → e' ∈ self.atlas → IsOpen (e.symm ≫ e').source


theorem openEmbedding' (U : Opens α) : OpenEmbedding (Subtype.val : U → α)

{α : Type u_2}
[TopologicalSpace α]
(U : TopologicalSpace.Opens α)


/-- The identity functor on `C`, viewed as a functor from the monoidal opposite of `C` to `C`. -/
@[simps obj map] -- not necessary but the symmetry with `mopFunctor` looks nicer
def unmopFunctor : Cᴹᵒᵖ ⥤ C

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

∀ {X Y : Cᴹᵒᵖ} (f : X ⟶ Y), (CategoryTheory.unmopFunctor C).map f = f.unmop


/-- Applying a pseudoelement to a composition of morphisms is the same as composing
    with each morphism. Sadly, this is not a definitional equality, but at least it is
    true. -/
theorem comp_apply {P Q R : C} (f : P ⟶ Q) (g : Q ⟶ R) (a : P) : (f ≫ g) a = g (f a)

(a : CategoryTheory.Abelian.Pseudoelement P)

CategoryTheory.Abelian.Pseudoelement.pseudoApply (f ≫ g) a =
  CategoryTheory.Abelian.Pseudoelement.pseudoApply g (CategoryTheory.Abelian.Pseudoelement.pseudoApply f a)


theorem volume_fundamentalDomain_stdBasis :
    volume (fundamentalDomain (stdBasis K)) = 1

(K : Type u_1)
[Field K]
[NumberField K]

MeasureTheory.volume (Zspan.fundamentalDomain (NumberField.mixedEmbedding.stdBasis K)) = 1


theorem monomial_mem_adjoin_monomial {I : Ideal R} {n : ℕ} {r : R} (hr : r ∈ I ^ n) :
    monomial n r ∈ Algebra.adjoin R (Submodule.map (monomial 1 : R →ₗ[R] R[X]) I : Set R[X])

{R : Type u}
[CommRing R]
{I : Ideal R}
{n : ℕ}
{r : R}
(hr : r ∈ I ^ n)

(Polynomial.monomial n) r ∈ Algebra.adjoin R ↑(Submodule.map (Polynomial.monomial 1) I)


/-- An embedding of first-order structures is an embedding that commutes with the
  interpretations of functions and relations. -/
structure Embedding extends M ↪ N where
  map_fun' : ∀ {n} (f : L.Functions n) (x), toFun (funMap f x) = funMap f (toFun ∘ x) := by
    -- Porting note: see porting note on `Hom.map_fun'`
    intros; trivial
  map_rel' : ∀ {n} (r : L.Relations n) (x), RelMap r (toFun ∘ x) ↔ RelMap r x := by
    -- Porting note: see porting note on `Hom.map_fun'`
    intros; trivial

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(self : L.Embedding M N)
{n : ℕ}
(f : L.Functions n)
(x : Fin n → M)

self.toFun (FirstOrder.Language.Structure.funMap f x) = FirstOrder.Language.Structure.funMap f (self.toFun ∘ x)


theorem sUnion_pair (s t : Set α) : ⋃₀{s, t} = s ∪ t


/-- Bijection between a subgroup `H` and its opposite. -/
@[to_additive (attr := simps!) "Bijection between an additive subgroup `H` and its opposite."]
def equivOp (H : Subgroup G) : H ≃ H.op

{G : Type u_2}
[AddGroup G]
(H : AddSubgroup G)
(b : { b // (fun x => x ∈ H.op) b })

↑(H.equivOp.symm b) = AddOpposite.unop ↑b


/--
For a derivation `d : A → M` and an element `a : A`, `d.compAEval a` is the
derivation of `R[X]` which takes a polynomial `f` to `d(aeval a f)`.

This derivation takes values in `Module.AEval R M a`, which is `M`, regarded as an
`R[X]`-module, with the action of a polynomial `f` defined by `f • m = (aeval a f) • m`.
-/
/-
Note: `compAEval` is not defined using `Derivation.compAlgebraMap`.
This because `A` is not an `R[X]` algebra and it would be messy to create an algebra instance
within the definition.
-/
@[simps]
def compAEval : Derivation R R[X] <| AEval R M a

{R : Type u_1}
{A : Type u_2}
{M : Type u_3}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
(d : Derivation R A M)
(a : A)
(f : Polynomial R)

(d.compAEval a) f = (Module.AEval.of R M a) (d ((Polynomial.aeval a) f))


@[simp]
theorem restriction_of (p) : restriction s (of p) = if H : p ∈ s then of ⟨p, H⟩ else 0

{α : Type u}
(s : Set α)
[DecidablePred fun x => x ∈ s]
(p : α)

(FreeCommRing.restriction s) (FreeCommRing.of p) = if H : p ∈ s then FreeCommRing.of ⟨p, H⟩ else 0


@[simp, bv_toNat] theorem toInt_add (x y : BitVec w) :
  (x + y).toInt = (x.toInt + y.toInt).bmod (2^w)

(x + y).toInt = (x.toInt + y.toInt).bmod (2 ^ w)


@[simp, norm_cast]
theorem natCast_opow (m : ℕ) : ∀ n : ℕ, ↑(m ^ n : ℕ) = (m : Ordinal) ^ (n : Ordinal)


theorem map_traverse {G : Type* → Type _} [Applicative G] [CommApplicative G] {α β γ : Type _}
    (g : α → G β) (h : β → γ) (x : Multiset α) :
    Functor.map (Functor.map h) (traverse g x) = traverse (Functor.map h ∘ g) x

{G : Type u_1 → Type u_1}
[Applicative G]
[CommApplicative G]
{α β γ : Type u_1}
(g : α → G β)
(h : β → γ)
(x : Multiset α)

Functor.map h <$> Multiset.traverse g x = Multiset.traverse (Functor.map h ∘ g) x


/-- A locally finite measure on a second countable topological space admits a finite spanning
sequence of open sets. -/
noncomputable irreducible_def MeasureTheory.Measure.finiteSpanningSetsInOpen' [TopologicalSpace α]
  [SecondCountableTopology α] {m : MeasurableSpace α} (μ : Measure α) [IsLocallyFiniteMeasure μ] :
  μ.FiniteSpanningSetsIn { K | IsOpen K }

μ.finiteSpanningSetsInOpen' =
  let_fun H := ⋯;
  H.some


/-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ)

(CochainComplex.mappingCone.triangleRotateShortComplex φ).X₂ = (CochainComplex.mappingCone.triangle φ).rotate.obj₂


theorem eqOn_closure₂' [T2Space Z] {s : Set X} {t : Set Y} {f g : X → Y → Z}
    (h : ∀ x ∈ s, ∀ y ∈ t, f x y = g x y) (hf₁ : ∀ x, Continuous (f x))
    (hf₂ : ∀ y, Continuous fun x => f x y) (hg₁ : ∀ x, Continuous (g x))
    (hg₂ : ∀ y, Continuous fun x => g x y) : ∀ x ∈ closure s, ∀ y ∈ closure t, f x y = g x y

(hf₂ : ∀ (y : Y), Continuous fun x => f x y)

(hg₂ : ∀ (y : Y), Continuous fun x => g x y)

x ∈ closure s → ∀ y ∈ closure t, f x y = g x y


@[fun_prop]
theorem DifferentiableOn.comp {g : F → G} {t : Set F} (hg : DifferentiableOn 𝕜 g t)
    (hf : DifferentiableOn 𝕜 f s) (st : MapsTo f s t) : DifferentiableOn 𝕜 (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{s : Set E}
{g : F → G}
{t : Set F}
(hg : DifferentiableOn 𝕜 g t)
(hf : DifferentiableOn 𝕜 f s)
(st : Set.MapsTo f s t)


theorem nat_lt : PrimrecRel ((· < ·) : ℕ → ℕ → Prop)


@[measurability]
theorem measurable_toReal : Measurable ENNReal.toReal


@[simp]
theorem fderiv_sqrt (hf : DifferentiableAt ℝ f x) (hx : f x ≠ 0) :
    fderiv ℝ (fun x => √(f x)) x = (1 / (2 * √(f x))) • fderiv ℝ f x

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


theorem exists_gen_dvd_sub (pb : PowerBasis A B) (b : B) : ∃ a, pb.gen ∣ b - algebraMap A B a

{A : Type u_4}
{B : Type u_5}
[CommRing A]
[CommRing B]
[Algebra A B]
(pb : PowerBasis A B)
(b : B)


@[simp, mono]
theorem sym2_mono {m m' : Multiset α} (h : m ≤ m') : m.sym2 ≤ m'.sym2

{α : Type u_1}
{m m' : Multiset α}
(h : m ≤ m')


theorem tan_arccos (x : ℝ) : tan (arccos x) = √(1 - x ^ 2) / x

Real.tan (Real.arccos x) = √(1 - x ^ 2) / x


@[simp]
theorem lim_nhds (x : X) : @lim _ _ ⟨x⟩ (𝓝 x) = x

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
(x : X)


theorem continuousSMul_of_algebraMap [TopologicalSemiring A] (h : Continuous (algebraMap R A)) :
    ContinuousSMul R A

(R : Type u_1)
(A : Type u)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[TopologicalSpace R]
[TopologicalSpace A]
[TopologicalSemiring A]
(h : Continuous ⇑(algebraMap R A))


theorem eval₂_pow (n : ℕ) : (p ^ n).eval₂ f x = p.eval₂ f x ^ n

{R : Type u}
{S : Type v}
[Semiring R]
{p : R[X]}
[CommSemiring S]
(f : R →+* S)
(x : S)
(n : ℕ)

Polynomial.eval₂ f x (p ^ n) = Polynomial.eval₂ f x p ^ n


@[simp, norm_cast]
theorem coe_union (x y : ZFSet.{u}) : ↑(x ∪ y) = (x : Class.{u}) ∪ y


theorem support_subset_singleton {f : α →₀ M} {a : α} : f.support ⊆ {a} ↔ f = single a (f a)

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}
{a : α}

f.support ⊆ {a} ↔ f = Finsupp.single a (f a)


/-- Map an `Arrow` along a refinement `S ⟶ T`. -/
@[simps]
def Arrow.map {S T : J.Cover X} (I : S.Arrow) (f : S ⟶ T) : T.Arrow

{J : CategoryTheory.GrothendieckTopology C}


protected theorem UniformSpace.sInf_le {tt : Set (UniformSpace α)} {t : UniformSpace α}
    (h : t ∈ tt) : sInf tt ≤ t

{α : Type ua}
{tt : Set (UniformSpace α)}
{t : UniformSpace α}
(h : t ∈ tt)


theorem IsStrictTotalOrder.swap (r) [IsStrictTotalOrder α r] : IsStrictTotalOrder α (swap r)

{α : Type u}
(r : α → α → Prop)
[IsStrictTotalOrder α r]


@[to_additive neg_add]
theorem mul_inv : (a * b)⁻¹ = a⁻¹ * b⁻¹

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


/-- The Schnirelmann density is unaffected by removing `0`. -/
lemma schnirelmannDensity_diff_singleton_zero [DecidablePred (· ∈ A \ {0})] :
    schnirelmannDensity (A \ {0}) = schnirelmannDensity A

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
[DecidablePred fun x => x ∈ A \ {0}]


lemma lookup_eq_some_iff {s : Finmap β} {a : α} {b : β a} :
    s.lookup a = b ↔ Sigma.mk a b ∈ s.entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{s : Finmap β}
{a : α}
{b : β a}

Finmap.lookup a s = some b ↔ ⟨a, b⟩ ∈ s.entries


@[simp]
theorem coe_comapOfInjective (hϕ : Function.Injective ϕ) (h : ↑P ≤ ϕ.range) :
    ↑(P.comapOfInjective ϕ hϕ h) = Subgroup.comap ϕ ↑P

{p : ℕ}
{G : Type u_1}
[Group G]
(P : Sylow p G)
{K : Type u_2}
[Group K]
(ϕ : K →* G)
(hϕ : Function.Injective ⇑ϕ)
(h : ↑P ≤ ϕ.range)


theorem diag_image (s : Set α) : (fun x => (x, x)) '' s = diagonal α ∩ s ×ˢ s

(fun x => (x, x)) '' s = Set.diagonal α ∩ s ×ˢ s


@[to_additive]
theorem Infinite.orderOf_eq_zero_of_forall_mem_zpowers [Infinite α] {g : α}
    (h : ∀ x, x ∈ zpowers g) : orderOf g = 0

{α : Type u}
[Group α]
[Infinite α]
{g : α}
(h : ∀ (x : α), x ∈ Subgroup.zpowers g)


/-- A fraction `r /ₒ s` is equal to its expansion by an arbitrary factor `t` if `t * s ∈ S`. -/
@[to_additive "A difference `r -ₒ s` is equal to its expansion by an
arbitrary translation `t` if `t + s ∈ S`."]
protected theorem expand (r : X) (s : S) (t : R) (hst : t * (s : R) ∈ S) :
    r /ₒ s = t • r /ₒ ⟨t * s, hst⟩

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{X : Type u_2}
[AddAction R X]
(r : X)
(s : ↥S)
(t : R)
(hst : t + ↑s ∈ S)


@[simp]
theorem Perm.subtypeCongr.left_apply_subtype (a : { a // p a }) : ep.subtypeCongr en a = ep a

{ε : Type u_1}
{p : ε → Prop}
[DecidablePred p]
(ep : Equiv.Perm { a // p a })
(en : Equiv.Perm { a // ¬p a })
(a : { a // p a })


lemma Exact.epi_f (hS : S.Exact) (hg : S.g = 0) : Epi S.f

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
(hS : S.Exact)
(hg : S.g = 0)


theorem val_one (n : ℕ) [Fact (1 < n)] : (1 : ZMod n).val = 1


nonrec theorem IsLocalMin.comp_mono (hf : IsLocalMin f a) {g : β → γ} (hg : Monotone g) :
    IsLocalMin (g ∘ f) a

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[Preorder β]
[Preorder γ]
{f : α → β}
{a : α}
(hf : IsLocalMin f a)
{g : β → γ}
(hg : Monotone g)


theorem ker_eq_bot_iff_ker_flip_eq_bot (H : B.IsRefl) :
    LinearMap.ker B = ⊥ ↔ LinearMap.ker B.flip = ⊥

{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
{I₁ I₂ : R₁ →+* R}
{B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M}
(H : B.IsRefl)


@[reassoc (attr := simp)]
lemma inl_v_triangle_mor₃_f (p q : ℤ) (hpq : p + (-1) = q) :
    (inl φ).v p q hpq ≫ (triangle φ).mor₃.f q =
      -(K.shiftFunctorObjXIso 1 q p (by rw [← hpq, neg_add_cancel_right])).inv

(CochainComplex.mappingCone.inl φ).v p q hpq ≫ (CochainComplex.mappingCone.triangle φ).mor₃.f q =
  -(K.shiftFunctorObjXIso 1 q p ⋯).inv


/-- The complex measures form an equivalence to the type of pairs of signed measures. -/
@[simps]
def equivSignedMeasure : ComplexMeasure α ≃ SignedMeasure α × SignedMeasure α

{α : Type u_1}
{m : MeasurableSpace α}
(c : MeasureTheory.ComplexMeasure α)

MeasureTheory.ComplexMeasure.equivSignedMeasure c =
  (MeasureTheory.ComplexMeasure.re c, MeasureTheory.ComplexMeasure.im c)


theorem mk_preimage_prod_left_eq_if [DecidablePred (· ∈ t)] :
    (fun a => (a, b)) ⁻¹' s ×ˢ t = if b ∈ t then s else ∅

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{b : β}
[DecidablePred fun x => x ∈ t]


lemma iff {X Y : C} (f : X ⟶ Y) (a : A) : W (f⟦a⟧') ↔ W f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(W : CategoryTheory.MorphismProperty C)
{A : Type w}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[W.IsCompatibleWithShift A]
{X Y : C}
(f : X ⟶ Y)
(a : A)

W ((CategoryTheory.shiftFunctor C a).map f) ↔ W f


theorem tail_inits (s : Stream' α) :
    tail (inits s) = initsCore [head s, head (tail s)] (tail (tail s))

s.inits.tail = Stream'.initsCore [s.head, s.tail.head] s.tail.tail


@[to_additive]
theorem prod_zero_index [∀ i, AddCommMonoid (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid γ] {h : ∀ i, β i → γ} : (0 : Π₀ i, β i).prod h = 1

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


theorem isSatisfiable_union_distinctConstantsTheory_of_card_le (T : L.Theory) (s : Set α)
    (M : Type w') [Nonempty M] [L.Structure M] [M ⊨ T]
    (h : Cardinal.lift.{w'} #s ≤ Cardinal.lift.{w} #M) :
    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable

(h : Cardinal.lift.{w', w} #↑s ≤ Cardinal.lift.{w, w'} #M)


@[to_additive (attr := simp, norm_cast) coe_nnnorm]
theorem coe_nnnorm' (a : E) : (‖a‖₊ : ℝ) = ‖a‖

{E : Type u_6}
[SeminormedGroup E]
(a : E)


theorem _root_.BddBelow.finite {s : Set α} (hs : BddBelow s) : s.Finite

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderTop α]
{s : Set α}
(hs : BddBelow s)


theorem fixedPoint_unique' {x y} (hx : IsFixedPt f x) (hy : IsFixedPt f y) : x = y

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x y : α}
(hx : Function.IsFixedPt f x)
(hy : Function.IsFixedPt f y)


theorem isGLB_Ioo {a b : γ} (h : a < b) : IsGLB (Ioo a b) a

{γ : Type w}
[SemilatticeSup γ]
[DenselyOrdered γ]
{a b : γ}
(h : a < b)


@[simp]
theorem Cone.ofTrident_π {F : WalkingParallelFamily J ⥤ C} (t : Trident fun j => F.map (line j))
    (j) : (Cone.ofTrident t).π.app j = t.π.app j ≫ eqToHom (by cases j <;> aesop_cat)

{F : CategoryTheory.Functor (CategoryTheory.Limits.WalkingParallelFamily J) C}

(t : CategoryTheory.Limits.Trident fun j => F.map (CategoryTheory.Limits.WalkingParallelFamily.Hom.line j))

(j : CategoryTheory.Limits.WalkingParallelFamily J)

(CategoryTheory.Limits.Cone.ofTrident t).π.app j =
  CategoryTheory.CategoryStruct.comp (t.π.app j) (CategoryTheory.eqToHom ⋯)


/-- Homeomorphism between dependent functions `Π i : Fin 2, X i` and `X 0 × X 1`. -/
@[simps! (config := .asFn)]
def piFinTwo.{u} (X : Fin 2 → Type u) [∀ i, TopologicalSpace (X i)] : (∀ i, X i) ≃ₜ X 0 × X 1

(X : Fin 2 → Type u)
[(i : Fin 2) → TopologicalSpace (X i)]

⇑(Homeomorph.piFinTwo X).symm = fun p => Fin.cons p.1 (Fin.cons p.2 finZeroElim)


theorem Equiv.ext {s t : WSeq α} (h : ∀ n, get? s n ~ get? t n) : s ~ʷ t

(h : ∀ (n : ℕ), (s.get? n).Equiv (t.get? n))


@[simp] theorem reverseAux_cons : reverseAux (a::l) r = reverseAux l (a::r)

∀ {α : Type u_1} {a : α} {l r : List α}, (a :: l).reverseAux r = l.reverseAux (a :: r)


@[simp]
protected lemma max_le_iff {m : WithBot α} {s : Finset α} : s.max ≤ m ↔ ∀ a ∈ s, a ≤ m

{α : Type u_2}
[LinearOrder α]
{m : WithBot α}
{s : Finset α}


theorem isBigOWith_iff_exists_eq_mul (hc : 0 ≤ c) :
    IsBigOWith c l u v ↔ ∃ φ : α → 𝕜, (∀ᶠ x in l, ‖φ x‖ ≤ c) ∧ u =ᶠ[l] φ * v

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{c : ℝ}
{l : Filter α}
{u v : α → 𝕜}
(hc : 0 ≤ c)

Asymptotics.IsBigOWith c l u v ↔ ∃ φ, (∀ᶠ (x : α) in l, ‖φ x‖ ≤ c) ∧ u =ᶠ[l] φ * v


/-- `α →ᵇ β` is the type of bounded continuous functions `α → β` from a topological space to a
metric space.

When possible, instead of parametrizing results over `(f : α →ᵇ β)`,
you should parametrize over `(F : Type*) [BoundedContinuousMapClass F α β] (f : F)`.

When you extend this structure, make sure to extend `BoundedContinuousMapClass`. -/
structure BoundedContinuousFunction (α : Type u) (β : Type v) [TopologicalSpace α]
    [PseudoMetricSpace β] extends ContinuousMap α β : Type max u v where
  map_bounded' : ∃ C, ∀ x y, dist (toFun x) (toFun y) ≤ C

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(self : BoundedContinuousFunction α β)

∃ C, ∀ (x y : α), dist (self.toFun x) (self.toFun y) ≤ C


theorem multiplicity_mk_eq_multiplicity
    [DecidableRel ((· ∣ ·) : Associates α → Associates α → Prop)] {a b : α} :
    multiplicity (Associates.mk a) (Associates.mk b) = multiplicity a b

{α : Type u_1}
[CommMonoidWithZero α]
[DecidableRel fun x x_1 => x ∣ x_1]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}


lemma Nat.pos_of_neZero (n : ℕ) [NeZero n] : 0 < n


@[simp]
lemma Ψ_neg (n : ℤ) : W.Ψ (-n) = -W.Ψ n

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℤ)


@[simp]
theorem circleEquivGen_apply (hk : ∀ x : K, 1 + x ^ 2 ≠ 0) (x : K) :
    (circleEquivGen hk x : K × K) = ⟨2 * x / (1 + x ^ 2), (1 - x ^ 2) / (1 + x ^ 2)⟩


@[simp]
theorem mk_coe' (e : A₁ ≃ₐ[R] A₂) (f h₁ h₂ h₃ h₄ h₅) :
    (⟨⟨f, e, h₁, h₂⟩, h₃, h₄, h₅⟩ : A₂ ≃ₐ[R] A₁) = e.symm

(h₃ :
  ∀ (x y : A₂),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun (x * y) =
      { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun x *
        { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun y)

(h₄ :
  ∀ (x y : A₂),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun (x + y) =
      { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun x +
        { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun y)

(h₅ :
  ∀ (r : R),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun ((algebraMap R A₂) r) = (algebraMap R A₁) r)

{ toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄, commutes' := h₅ } = e.symm


@[simp]
theorem univBall_apply_zero (c : P) (r : ℝ) : univBall c r 0 = c

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{P : Type u_2}
[PseudoMetricSpace P]
[NormedAddTorsor E P]
(c : P)
(r : ℝ)


theorem pow_iff (hm : 0 < m) (hn : 0 < n) :
    IsRelPrime (x ^ m) (y ^ n) ↔ IsRelPrime x y

{α : Type u_1}
[CommMonoid α]
[DecompositionMonoid α]
{x y : α}
{m n : ℕ}
(hm : 0 < m)
(hn : 0 < n)


@[to_additive (attr := simp)]
theorem Quotient.smul_coe [QuotientAction β H] (b : β) (a : α) :
    b • (a : α ⧸ H) = (↑(b • a) : α ⧸ H)

{α : Type u}
{β : Type v}
[AddGroup α]
[AddMonoid β]
[AddAction β α]
(H : AddSubgroup α)
[AddAction.QuotientAction β H]
(b : β)
(a : α)


/-- The fifth simplicial identity -/
@[reassoc]
theorem σ_comp_σ {n} {i j : Fin (n + 1)} (H : i ≤ j) :
    σ (Fin.castSucc i) ≫ σ j = σ j.succ ≫ σ i

SimplexCategory.σ i.castSucc ≫ SimplexCategory.σ j = SimplexCategory.σ j.succ ≫ SimplexCategory.σ i


theorem apply_lt_nfpBFamily_iff (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b < nfpBFamily.{u, v} o f a) ↔ b < nfpBFamily.{u, v} o f a

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

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

(∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < o.nfpBFamily f a) ↔ b < o.nfpBFamily f a


/-- If a function is continuous on a neighborhood of a compact set `k`, then it is bounded on
some open neighborhood of `k`. -/
theorem exists_isOpen_isBounded_image_of_isCompact_of_continuousOn [TopologicalSpace β]
    {k s : Set β} {f : β → α} (hk : IsCompact k) (hs : IsOpen s) (hks : k ⊆ s)
    (hf : ContinuousOn f s) : ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' t)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[TopologicalSpace β]
{k s : Set β}
{f : β → α}
(hk : IsCompact k)
(hs : IsOpen s)
(hks : k ⊆ s)
(hf : ContinuousOn f s)

∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' t)


@[simp]
theorem sum_single_index {N} [AddCommMonoid N] {a : G} {b : k} {h : G → k → N}
    (h_zero : h a 0 = 0) :
    (single a b).sum h = h a b

{k : Type u₁}
{G : Type u₂}
[Semiring k]
{N : Type u_3}
[AddCommMonoid N]
{a : G}
{b : k}
{h : G → k → N}
(h_zero : h a 0 = 0)

Finsupp.sum (AddMonoidAlgebra.single a b) h = h a b


/-- Every isometry is a dilation of ratio `1`. -/
@[simps]
def _root_.Isometry.toDilation (f : α → β) (hf : Isometry f) : α →ᵈ β

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(f : α → β)
(hf : Isometry f)

∀ (a : α), (Isometry.toDilation f hf) a = f a


lemma neg_add {x y : EReal} (h1 : x ≠ ⊥ ∨ y ≠ ⊤) (h2 : x ≠ ⊤ ∨ y ≠ ⊥) :
    - (x + y) = - x - y


@[to_additive]
protected theorem eq {a b : α} : (a : α ⧸ s) = b ↔ a⁻¹ * b ∈ s

{α : Type u_1}
[AddGroup α]
{s : AddSubgroup α}
{a b : α}


theorem part_iff {n f} : @Partrec' n f ↔ _root_.Partrec f


@[simp]
theorem right_inv_of_invOfMemRange (a : α) : f.invOfMemRange ⟨f a, Set.mem_range_self a⟩ = a

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)
(a : α)


/-- The function `exp(x) / x ^ s` tends to `+∞` at `+∞`, for any real number `s`. -/
theorem tendsto_exp_div_rpow_atTop (s : ℝ) : Tendsto (fun x : ℝ => exp x / x ^ s) atTop atTop

Filter.Tendsto (fun x => rexp x / x ^ s) Filter.atTop Filter.atTop


theorem posDef_of_toMatrix' [DecidableEq n] {Q : QuadraticForm ℝ (n → ℝ)}
    (hQ : Q.toMatrix'.PosDef) : Q.PosDef

(hQ : (QuadraticMap.toMatrix' Q).PosDef)


theorem empty_ssubset_singleton : (∅ : Set α) ⊂ {a}


@[simp] theorem empty_left (s : Set X) : SeparatedNhds ∅ s

{X : Type u_1}
[TopologicalSpace X]
(s : Set X)


protected theorem gc : GaloisConnection (adjoin R : Set A → Subalgebra R A) (↑)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]

GaloisConnection (Algebra.adjoin R) SetLike.coe


theorem pi_eq_empty_iff : s.pi t = ∅ ↔ ∃ i, IsEmpty (α i) ∨ i ∈ s ∧ t i = ∅

{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t : (i : ι) → Set (α i)}


protected theorem MonotoneOn.Ioi (hf : MonotoneOn f s) : AntitoneOn (fun x => Ioi (f x)) s

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


/-- A coalgebra morphism with an underlying isomorphism hom in `C` is a coalgebra isomorphism. -/
theorem iso_of_iso (f : V₀ ⟶ V₁) [IsIso f.1] : IsIso f

{V₀ V₁ : CategoryTheory.Endofunctor.Coalgebra F}


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

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

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


/-- A bi-Heyting algebra is a Heyting algebra that is also a co-Heyting algebra. -/
class BiheytingAlgebra (α : Type*) extends HeytingAlgebra α, SDiff α, HNot α where
  /-- `\ a` is right adjoint to `⊔ a` -/
  sdiff_le_iff (a b c : α) : a \ b ≤ c ↔ a ≤ b ⊔ c
  /-- `⊤ \ a` is `￢a` -/
  top_sdiff (a : α) : ⊤ \ a = ￢a

{α : Type u_4}
[self : BiheytingAlgebra α]
(a b c : α)


/-- The set of functions `f : E → F` that represent continuous linear maps `f : E →SL[σ₁₂] F`
at distance `≤ r` from `f₀ : E →SL[σ₁₂] F` is closed in the topology of pointwise convergence.
This is one of the key steps in the proof of the **Banach-Alaoglu** theorem. -/
theorem isClosed_image_coe_closedBall (f₀ : E →SL[σ₁₂] F) (r : ℝ) :
    IsClosed (((↑) : (E →SL[σ₁₂] F) → E → F) '' closedBall f₀ r)

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f₀ : E →SL[σ₁₂] F)
(r : ℝ)

IsClosed (DFunLike.coe '' Metric.closedBall f₀ r)


theorem integerNormalization_map_to_map (p : S[X]) :
    ∃ b : M, (integerNormalization M p).map (algebraMap R S) = (b : R) • p

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(p : S[X])

∃ b, Polynomial.map (algebraMap R S) (IsLocalization.integerNormalization M p) = ↑b • p


@[to_additive]
theorem tprod_subtype_eq_of_mulSupport_subset {f : β → α} {s : Set β} (hs : mulSupport f ⊆ s) :
    ∏' x : s, f x = ∏' x, f x

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{s : Set β}
(hs : Function.support f ⊆ s)


theorem compl_eq_univ_diff (s : Set α) : sᶜ = univ \ s


@[to_additive]
theorem conj : ∀ x₀, ∀ {U}, U ∈ B → ∃ V ∈ B, V ⊆ (fun x ↦ x₀ * x * x₀⁻¹) ⁻¹' U

{G : Type u}
[AddGroup G]
{B : AddGroupFilterBasis G}
(x₀ : G)
{U : Set G}

U ∈ B → ∃ V ∈ B, V ⊆ (fun x => x₀ + x + -x₀) ⁻¹' U


theorem symm_apply_eq {α β} (e : α ≃ β) {x y} : e.symm x = y ↔ x = e y

{α : Sort u_1}
{β : Sort u_2}
(e : α ≃ β)
{x : β}
{y : α}


@[gcongr]
lemma verticalStrip_anti_right (A) {B B'} (h : B' ≤ B) : verticalStrip A B ⊆ verticalStrip A B'

UpperHalfPlane.verticalStrip A B ⊆ UpperHalfPlane.verticalStrip A B'


@[simp] lemma memberSubfamily_image_erase : (𝒜.image (erase · a)).memberSubfamily a = ∅

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

Finset.memberSubfamily a (Finset.image (fun x => x.erase a) 𝒜) = ∅


theorem coe_C (r : R) : ((C R r : PowerSeries R) : LaurentSeries R) = HahnSeries.C r

(HahnSeries.ofPowerSeries ℤ R) ((PowerSeries.C R) r) = HahnSeries.C r


@[simp]
theorem Spec.locallyRingedSpaceMap_id (R : CommRingCat.{u}) :
    Spec.locallyRingedSpaceMap (𝟙 R) = 𝟙 (Spec.locallyRingedSpaceObj R)

AlgebraicGeometry.Spec.locallyRingedSpaceMap (CategoryTheory.CategoryStruct.id R) =
  CategoryTheory.CategoryStruct.id (AlgebraicGeometry.Spec.locallyRingedSpaceObj R)


/-- The functor from a category to its double-opposite.  -/
@[simps]
def opOp : C ⥤ Cᵒᵖᵒᵖ

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

(CategoryTheory.opOp C).obj X = Opposite.op (Opposite.op X)


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

(CategoryTheory.ShortComplex.LeftHomologyData.ofZeros S hf hg).i = CategoryTheory.CategoryStruct.id S.X₂


theorem deriv_fourierIntegral
    {f : ℝ → E} (hf : Integrable f) (hf' : Integrable (fun x : ℝ ↦ x • f x)) :
    deriv (𝓕 f) = 𝓕 (fun x : ℝ ↦ (-2 * π * I * x) • f x)

(hf : MeasureTheory.Integrable f MeasureTheory.volume)

(hf' : MeasureTheory.Integrable (fun x => x • f x) MeasureTheory.volume)

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


lemma deriv2_mul_log {x : ℝ} (hx : x ≠ 0) : deriv^[2] (fun x ↦ x * log x) x = x⁻¹

deriv^[2] (fun x => x * Real.log x) x = x⁻¹


theorem inf_sdiff_distrib_right (a b c : α) : a \ b ⊓ c = (a ⊓ c) \ (b ⊓ c)

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


theorem bounded_gt_inter_ge [LinearOrder α] (a : α) :
    Bounded (· > ·) (s ∩ { b | b ≤ a }) ↔ Bounded (· > ·) s

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

Set.Bounded (fun x x_1 => x > x_1) (s ∩ {b | b ≤ a}) ↔ Set.Bounded (fun x x_1 => x > x_1) s


theorem IsRotated.nodup_iff (h : l ~r l') : Nodup l ↔ Nodup l'

{α : Type u}
{l l' : List α}
(h : l ~r l')


theorem SatisfiesM_mapM' [Monad m] [LawfulMonad m] (as : Array α) (f : α → m β)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, SatisfiesM (p i) (f as[i])) :
    SatisfiesM
      (fun arr => ∃ eq : arr.size = as.size, ∀ i h, p ⟨i, h⟩ arr[i])
      (Array.mapM f as)

(hs : ∀ (i : Fin as.size), SatisfiesM (p i) (f as[i]))

SatisfiesM (fun arr => ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ arr[i]) (Array.mapM f as)


theorem R1Space.of_continuous_specializes_imp [TopologicalSpace Y] {f : Y → X} (hc : Continuous f)
    (hspec : ∀ x y, f x ⤳ f y → x ⤳ y) : R1Space Y

(hspec : ∀ (x y : Y), f x ⤳ f y → x ⤳ y)


/-- `ContinuousLinearMap.prod` as an `Equiv`. -/
@[simps apply]
def prodEquiv : (M →L[R] N₂) × (M →L[R] N₃) ≃ (M →L[R] N₂ × N₃)

{R : Type u_1}
[Semiring R]
{M : Type u_6}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{N₂ : Type u_9}
[TopologicalSpace N₂]
[AddCommMonoid N₂]
[Module R N₂]
{N₃ : Type u_10}
[TopologicalSpace N₃]
[AddCommMonoid N₃]
[Module R N₃]
(f : (M →L[R] N₂) × (M →L[R] N₃))

ContinuousLinearMap.prodEquiv f = f.1.prod f.2


/-- A category being equivalent to `PUnit` is equivalent to it having a unique morphism between
  any two objects. (In fact, such a category is also a groupoid;
  see `CategoryTheory.Groupoid.ofHomUnique`) -/
theorem equiv_punit_iff_unique :
    Nonempty (C ≌ Discrete PUnit.{w + 1}) ↔ Nonempty C ∧ ∀ x y : C, Nonempty <| Unique (x ⟶ y)

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

Nonempty (C ≌ CategoryTheory.Discrete PUnit.{w + 1}) ↔ Nonempty C ∧ ∀ (x y : C), Nonempty (Unique (x ⟶ y))


theorem lowerCrossingTime_le_upperCrossingTime_succ :
    lowerCrossingTime a b f N n ω ≤ upperCrossingTime a b f N (n + 1) ω

{Ω : Type u_1}
{ι : Type u_2}
[ConditionallyCompleteLinearOrderBot ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}
{n : ℕ}
{ω : Ω}

MeasureTheory.lowerCrossingTime a b f N n ω ≤ MeasureTheory.upperCrossingTime a b f N (n + 1) ω


theorem eq_of_subset_of_subset {a b : Set α} : a ⊆ b → b ⊆ a → a = b


theorem tan_lt_tan_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y

{x y : ℝ}
(hx₁ : -(Real.pi / 2) < x)
(hy₂ : y < Real.pi / 2)
(hxy : x < y)


@[to_additive addCHaar_mem_clAddPrehaar]
theorem chaar_mem_clPrehaar (K₀ : PositiveCompacts G) (V : OpenNhdsOf (1 : G)) :
    chaar K₀ ∈ clPrehaar (K₀ : Set G) V

(K₀ : TopologicalSpace.PositiveCompacts G)

MeasureTheory.Measure.haar.addCHaar K₀ ∈ MeasureTheory.Measure.haar.clAddPrehaar (↑K₀) V


theorem _root_.BddAbove.finite {s : Set α} (hs : BddAbove s) : s.Finite

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderBot α]
{s : Set α}
(hs : BddAbove s)


lemma lintegral_rnDeriv [HaveLebesgueDecomposition μ ν] (hμν : μ ≪ ν) :
    ∫⁻ x, μ.rnDeriv ν x ∂ν = μ Set.univ

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

∫⁻ (x : α), μ.rnDeriv ν x ∂ν = μ Set.univ


@[to_additive (attr := simp)]
theorem lt_inv_self_iff : a < a⁻¹ ↔ a < 1

{α : Type u}
[LinearOrderedAddCommGroup α]
{a : α}


/-- An equivalence of Lie algebras is a morphism which is also a linear equivalence. We could
instead define an equivalence to be a morphism which is also a (plain) equivalence. However it is
more convenient to define via linear equivalence to get `.toLinearEquiv` for free. -/
structure LieEquiv (R : Type u) (L : Type v) (L' : Type w) [CommRing R] [LieRing L] [LieAlgebra R L]
  [LieRing L'] [LieAlgebra R L'] extends L →ₗ⁅R⁆ L' where
  /-- The inverse function of an equivalence of Lie algebras -/
  invFun : L' → L
  /-- The inverse function of an equivalence of Lie algebras is a left inverse of the underlying
  function. -/
  left_inv : Function.LeftInverse invFun toLieHom.toFun
  /-- The inverse function of an equivalence of Lie algebras is a right inverse of the underlying
  function. -/
  right_inv : Function.RightInverse invFun toLieHom.toFun

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(self : L ≃ₗ⁅R⁆ L')


@[simp]
theorem foldr_cons (f : α → β → β) (H b a s) : foldr f H b (a ::ₘ s) = f a (foldr f H b s)

{α : Type u_1}
{β : Type v}
(f : α → β → β)
(H : LeftCommutative f)
(b : β)
(a : α)
(s : Multiset α)

Multiset.foldr f H b (a ::ₘ s) = f a (Multiset.foldr f H b s)


@[simp] theorem eq_true_imp_eq_false : ∀(b:Bool), (b = true → b = false) ↔ (b = false)


theorem isNat_lcm : {x y nx ny z : ℕ} →
    IsNat x nx → IsNat y ny → Nat.lcm nx ny = z → IsNat (Nat.lcm x y) z

Mathlib.Meta.NormNum.IsNat x nx →
  Mathlib.Meta.NormNum.IsNat y ny → nx.lcm ny = z → Mathlib.Meta.NormNum.IsNat (x.lcm y) z


theorem Separable.eval₂_derivative_ne_zero [Nontrivial S] (f : R →+* S) {p : R[X]}
    (h : p.Separable) {x : S} (hx : p.eval₂ f x = 0) :
    (derivative p).eval₂ f x ≠ 0

{R : Type u}
[CommSemiring R]
{S : Type v}
[CommSemiring S]
[Nontrivial S]
(f : R →+* S)
{p : R[X]}
(h : p.Separable)
{x : S}
(hx : Polynomial.eval₂ f x p = 0)

Polynomial.eval₂ f x (Polynomial.derivative p) ≠ 0


a < UInt16.size → ↑(UInt16.ofNat a).val = a


@[simp]
theorem coe_mapAlgHom (f : A →ₐ[R] B) : ⇑(mapAlgHom f) = map f

{R : Type u}
{A : Type z}
{B : Type u_2}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)

⇑(Polynomial.mapAlgHom f) = Polynomial.map ↑f


theorem IsCycle.sign {f : Perm α} (hf : IsCycle f) : sign f = -(-1) ^ f.support.card

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}
(hf : f.IsCycle)

Equiv.Perm.sign f = -(-1) ^ f.support.card


theorem of_surjective' [CommRing S] [Nontrivial S] (f : R →+* S) (hf : Function.Surjective f) :
    LocalRing S

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[LocalRing R]
[CommRing S]
[Nontrivial S]
(f : R →+* S)
(hf : Function.Surjective ⇑f)


/-- The Weierstrass curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$. -/
@[simps]
def variableChange : WeierstrassCurve R

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(C : WeierstrassCurve.VariableChange R)

(W.variableChange C).a₄ =
  ↑C.u⁻¹ ^ 4 * (W.a₄ - C.s * W.a₃ + 2 * C.r * W.a₂ - (C.t + C.r * C.s) * W.a₁ + 3 * C.r ^ 2 - 2 * C.s * C.t)


theorem InjOn.eq_iff {x y} (h : InjOn f s) (hx : x ∈ s) (hy : y ∈ s) : f x = f y ↔ x = y

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{x y : α}
(h : Set.InjOn f s)
(hx : x ∈ s)
(hy : y ∈ s)


theorem MDifferentiableAt.mdifferentiableWithinAt (h : MDifferentiableAt I I' f x) :
    MDifferentiableWithinAt I I' f s x

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


/-- Infimum of `s i`, `i : ι`, is equal to the infimum over `t : Finset ι` of infima
`⨅ i ∈ t, s i`. This version works for `ι : Sort*`. See `iInf_eq_iInf_finset` for a version
that assumes `ι : Type*` but has no `PLift`s. -/
theorem iInf_eq_iInf_finset' (s : ι' → α) :
    ⨅ i, s i = ⨅ t : Finset (PLift ι'), ⨅ i ∈ t, s (PLift.down i)

{α : Type u_2}
{ι' : Sort u_7}
[CompleteLattice α]
(s : ι' → α)


theorem isLowerSet_iUnion {f : ι → Set α} (hf : ∀ i, IsLowerSet (f i)) : IsLowerSet (⋃ i, f i)

{α : Type u_1}
{ι : Sort u_4}
[LE α]
{f : ι → Set α}
(hf : ∀ (i : ι), IsLowerSet (f i))


theorem dart_fst_fiber_card_eq_degree [DecidableEq V] (v : V) :
    (univ.filter fun d : G.Dart => d.fst = v).card = G.degree v

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

(Finset.filter (fun d => d.toProd.1 = v) Finset.univ).card = G.degree v


/-- The multiplicative indicators of δ-thickenings of a set tend pointwise to the multiplicative
indicator of the set, as δ>0 tends to zero. -/
@[to_additive "The indicators of δ-thickenings of a set tend pointwise to the indicator of the
set, as δ>0 tends to zero."]
lemma tendsto_mulIndicator_thickening_mulIndicator_closure (f : α → β) (E : Set α) :
    Tendsto (fun δ ↦ (Metric.thickening δ E).mulIndicator f) (𝓝[>] 0)
      (𝓝 ((closure E).mulIndicator f))

{α : Type u_1}
[PseudoEMetricSpace α]
{β : Type u_2}
[Zero β]
[TopologicalSpace β]
(f : α → β)
(E : Set α)

Filter.Tendsto (fun δ => (Metric.thickening δ E).indicator f) (𝓝[>] 0) (𝓝 ((closure E).indicator f))


@[simp]
theorem coe_add [AddZeroClass β] [ContinuousAdd β] (f g : C_c(α, β)) : ⇑(f + g) = f + g

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[AddZeroClass β]
[ContinuousAdd β]
(f g : α →C_c β)


@[simp]
theorem toNatOrdinal_zero : toNatOrdinal 0 = 0


theorem coimageIsoImage_hom {X Y : C} (f : X ⟶ Y) :
    (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f

(i : F.comp G ≅ CategoryTheory.Functor.id C)

(CategoryTheory.AbelianOfAdjunction.coimageIsoImage F G i adj f).hom = CategoryTheory.Abelian.coimageImageComparison f


theorem exists_nat_subset_range (s : Finset ℕ) : ∃ n : ℕ, s ⊆ range n


@[simp, nolint simpNF]
theorem sup_eq : a ⊔ b = unit


/-- Helper when we need some `c.rel i j` (i.e. `ComplexShape.down ℕ`),
e.g. `c_mk n (n+1) rfl` -/
theorem c_mk (i j : ℕ) (h : j + 1 = i) : c.Rel i j


theorem mem_cons_self (a : α) (s : Multiset α) : a ∈ a ::ₘ s


@[ext]
theorem ext {x y : X q} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y

{q : ℕ+}
{x y : LucasLehmer.X q}
(h₁ : x.1 = y.1)
(h₂ : x.2 = y.2)


@[to_additive]
theorem Bornology.IsBounded.div (hs : IsBounded s) (ht : IsBounded t) : IsBounded (s / t)

{E : Type u_1}
[SeminormedAddGroup E]
{s t : Set E}
(hs : Bornology.IsBounded s)
(ht : Bornology.IsBounded t)


/-- An angle in a right-angled triangle expressed using `arctan`. -/
theorem oangle_left_eq_arctan_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    ∡ p₃ p₁ p₂ = Real.arctan (dist p₃ p₂ / dist p₁ p₂)

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

∡ p₃ p₁ p₂ = ↑(Real.arctan (dist p₃ p₂ / dist p₁ p₂))


@[simp]
theorem translationNumber_conj_eq (f : CircleDeg1Liftˣ) (g : CircleDeg1Lift) :
    τ (↑f * g * ↑f⁻¹) = τ g

(↑f * g * ↑f⁻¹).translationNumber = g.translationNumber


@[to_additive]
theorem center_le_normalizer : center G ≤ H.normalizer

{G : Type u_1}
[Group G]
{H : Subgroup G}


theorem interpolate_eq_add_interpolate_erase (hvs : Set.InjOn v s) (hi : i ∈ s) (hj : j ∈ s)
    (hij : i ≠ j) :
    interpolate s v r =
      interpolate (s.erase j) v r * basisDivisor (v i) (v j) +
        interpolate (s.erase i) v r * basisDivisor (v j) (v i)

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{i j : ι}
{v : ι → F}
(r : ι → F)
(hvs : Set.InjOn v ↑s)
(hi : i ∈ s)
(hj : j ∈ s)
(hij : i ≠ j)

(Lagrange.interpolate s v) r =
  (Lagrange.interpolate (s.erase j) v) r * Lagrange.basisDivisor (v i) (v j) +
    (Lagrange.interpolate (s.erase i) v) r * Lagrange.basisDivisor (v j) (v i)


theorem lim_eq_of_equiv_const {f : CauSeq β abv} {x : β} (h : f ≈ CauSeq.const abv x) : lim f = x

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
[CauSeq.IsComplete β abv]
{f : CauSeq β abv}
{x : β}
(h : f ≈ CauSeq.const abv x)


theorem IsMaxOn.neg (hf : IsMaxOn f s a) : IsMinOn (fun x => -f x) s a

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


@[simp]
theorem sum_single [AddCommMonoid M] (f : α →₀ M) : f.sum single = f

{α : Type u_1}
{M : Type u_8}
[AddCommMonoid M]
(f : α →₀ M)


@[simp]
theorem toNNRat_coe_nat (n : ℕ) : toNNRat n = n


theorem IsLittleO.congr_of_sub (h : (fun x => f₁ x - f₂ x) =o[l] g) : f₁ =o[l] g ↔ f₂ =o[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{l : Filter α}
{f₁ f₂ : α → E'}
(h : (fun x => f₁ x - f₂ x) =o[l] g)


@[to_additive]
theorem prod_mul_prod_eq_prod_zipWith [CommMonoid α] (x y : Vector α n) :
    x.toList.prod * y.toList.prod = (Vector.zipWith (· * ·) x y).toList.prod

{α : Type u_1}
{n : ℕ}
[CommMonoid α]
(x y : Mathlib.Vector α n)

x.toList.prod * y.toList.prod = (Mathlib.Vector.zipWith (fun x x_1 => x * x_1) x y).toList.prod


@[gcongr]
lemma verticalStrip_mono_left {A A'} (h : A ≤ A') (B) : verticalStrip A B ⊆ verticalStrip A' B

UpperHalfPlane.verticalStrip A B ⊆ UpperHalfPlane.verticalStrip A' B


@[simp]
theorem functorCategoryMonoidalAdjunction.unit_app_hom (A : Action V G) :
    ((functorCategoryMonoidalAdjunction _ _).unit.app A).hom = 𝟙 _

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

((Action.functorCategoryMonoidalAdjunction V G).unit.app A).hom = 𝟙 ((𝟭 (Action V G)).obj A).V


lemma rank_eq_zero_iff_isTorsion {R M} [CommRing R] [IsDomain R] [AddCommGroup M] [Module R M] :
    Module.rank R M = 0 ↔ Module.IsTorsion R M

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[IsDomain R]
[AddCommGroup M]
[Module R M]


@[simp]
theorem sSup_N (S : Set (I.Filtration M)) : (sSup S).N = sSup (Ideal.Filtration.N '' S)

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
(S : Set (I.Filtration M))


@[simp] theorem negSucc_sub_one (n : Nat) : -[n+1] - 1 = -[n + 1 +1]


theorem formPerm_pow_length_eq_one_of_nodup (hl : Nodup l) : formPerm l ^ length l = 1

{α : Type u_1}
[DecidableEq α]
(l : List α)
(hl : l.Nodup)


@[simps! tensorObj tensorHom tensorUnit whiskerLeft whiskerRight associator]
instance prodMonoidal : MonoidalCategory (C₁ × C₂)

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

∀ {X₁ X₂ : C₁ × C₂} (f : X₁ ⟶ X₂) (X : C₁ × C₂),
  CategoryTheory.MonoidalCategory.whiskerRight f X =
    (CategoryTheory.MonoidalCategory.whiskerRight f.1 X.1, CategoryTheory.MonoidalCategory.whiskerRight f.2 X.2)


@[simp]
protected theorem inv_eq_zero : a⁻¹ = 0 ↔ a = ∞


/-- The function `(W.FunctorsInverting D) ⥤ (W.Localization ⥤ D)` induced by
`Construction.lift`. -/
@[simps!]
def inverse : W.FunctorsInverting D ⥤ W.Localization ⥤ D

(a : CategoryTheory.Quotient (CategoryTheory.Localization.Construction.relations W))

((CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.inverse W D).obj G).obj a = G.obj.obj a.as.obj


@[to_additive (attr := simp)]
lemma inv_left_iff : Commute a⁻¹ b ↔ Commute a b


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

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

∀ {X Y : CategoryTheory.StructuredArrow PUnit.{w + 1} F} (f : X ⟶ Y),
  (CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).inverse.map f = ⟨f.right, ⋯⟩


/-- Measurable equivalence between `Π j : Fin (n + 1), α j` and
`α i × Π j : Fin n, α (Fin.succAbove i j)`. -/
@[simps! (config := .asFn)]
def piFinSuccAbove {n : ℕ} (α : Fin (n + 1) → Type*) [∀ i, MeasurableSpace (α i)]
    (i : Fin (n + 1)) : (∀ j, α j) ≃ᵐ α i × ∀ j, α (i.succAbove j)

[(i : Fin (n + 1)) → MeasurableSpace (α i)]

⇑(MeasurableEquiv.piFinSuccAbove α i).symm = fun f => i.insertNth f.1 f.2


theorem add_nonnneg_iff_neg_le' (a b : Int) : 0 ≤ a + b ↔ -a ≤ b


/-- The vertex group at `c`. -/
@[simps mul one inv]
instance vertexGroup (c : C) : Group (c ⟶ c)

{C : Type u}
[CategoryTheory.Groupoid C]
(c : C)
(x y : c ⟶ c)

x * y = CategoryTheory.CategoryStruct.comp x y


/-- We can reexpress a sum over `p.support` as a sum over `range (p.natDegree + 1)`.
-/
theorem sum_over_range [AddCommMonoid S] (p : R[X]) {f : ℕ → R → S} (h : ∀ n, f n 0 = 0) :
    p.sum f = ∑ a ∈ range (p.natDegree + 1), f a (coeff p a)

{R : Type u}
{S : Type v}
[Semiring R]
[AddCommMonoid S]
(p : R[X])
{f : ℕ → R → S}
(h : ∀ (n : ℕ), f n 0 = 0)

p.sum f = ∑ a ∈ Finset.range (p.natDegree + 1), f a (p.coeff a)


@[to_additive] lemma one_ne_bot : (1 : Interval α) ≠ ⊥


@[to_additive (attr := simp)]
theorem _root_.MulEquiv.withOneCongr_refl : (MulEquiv.refl α).withOneCongr = MulEquiv.refl _

(AddEquiv.refl α).withZeroCongr = AddEquiv.refl (WithZero α)


@[simp]
theorem algebraMap_eq_zero_iff (x : R) : algebraMap R (FreeAlgebra R X) x = 0 ↔ x = 0

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
(x : R)

(algebraMap R (FreeAlgebra R X)) x = 0 ↔ x = 0


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

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


lemma modEq_list_prod_iff {a b} {l : List ℕ} (co : l.Pairwise Coprime) :
    a ≡ b [MOD l.prod] ↔ ∀ i, a ≡ b [MOD l.get i]

{a b : ℕ}
{l : List ℕ}
(co : List.Pairwise Nat.Coprime l)

a ≡ b [MOD l.prod] ↔ ∀ (i : Fin l.length), a ≡ b [MOD l.get i]


@[simp]
theorem coe_top [Preorder α] [OrderTop α] {a : α} : ↑(⊤ : Ici a) = (⊤ : α)

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


@[reassoc (attr := simp)]
theorem lanUnit_desc [HasLeftKanExtension f g] (s : LeftExtension f g) :
    lanUnit f g ≫ f ◁ lanDesc s = s.unit

(s : CategoryTheory.Bicategory.LeftExtension f g)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.lanUnit f g)
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.lanDesc s)) =
  s.unit


@[to_additive]
theorem mulETransformRight.fst_mul_snd_subset :
    (mulETransformRight e x).1 * (mulETransformRight e x).2 ⊆ x.1 * x.2

{α : Type u_1}
[DecidableEq α]
[AddGroup α]
(e : α)
(x : Finset α × Finset α)

(Finset.addETransformRight e x).1 + (Finset.addETransformRight e x).2 ⊆ x.1 + x.2


theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
(S : L.Substructure M)


theorem IsOpenMap.restrictPreimage (H : IsOpenMap f) (s : Set β) :
    IsOpenMap (s.restrictPreimage f)

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


theorem mem_of_mem_of_mem_sym {n : ℕ} {xs : List α} {a : α} {z : Sym α n}
    (ha : a ∈ z) (hz : z ∈ xs.sym n) : a ∈ xs

{α : Type u_1}
{n : ℕ}
{xs : List α}
{a : α}
{z : Sym α n}
(ha : a ∈ z)
(hz : z ∈ List.sym n xs)


@[to_additive]
theorem mul_subset_mul_left : t₁ ⊆ t₂ → s * t₁ ⊆ s * t₂

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


/-- Given `S' : Solution'`, we have that `λ ^ 2` divides `S'.c`. -/
lemma lambda_sq_dvd_c : λ ^ 2 ∣ S'.c

(S' : FermatLastTheoremForThreeGen.Solution' hζ)


@[simp] theorem coe_rTensor_symm : (rTensor M f).symm = (f.symm : P →ₗ[R] N).rTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : N ≃ₗ[R] P)

↑(LinearEquiv.rTensor M f).symm = LinearMap.rTensor M ↑f.symm


/-- Also known as the maximality axiom. -/
@[simp]
theorem top_mem (X : C) : ⊤ ∈ J X

(J : CategoryTheory.GrothendieckTopology C)


theorem Valid'.mono_right {x y : α} (xy : x ≤ y) {t : Ordnode α} {o} (h : Valid' o t x) :
    Valid' o t y

{α : Type u_1}
[Preorder α]
{x y : α}
(xy : x ≤ y)
{t : Ordnode α}
{o : WithBot α}
(h : Ordnode.Valid' o t ↑x)


@[to_additive]
theorem prod_univ_def [CommMonoid β] {n : ℕ} (f : Fin n → β) :
    ∏ i, f i = ((List.finRange n).map f).prod

{β : Type u_2}
[CommMonoid β]
{n : ℕ}
(f : Fin n → β)

∏ i : Fin n, f i = (List.map f (List.finRange n)).prod


theorem HasFDerivAtFilter.star (h : HasFDerivAtFilter f f' x L) :
    HasFDerivAtFilter (fun x => star (f x)) (((starL' 𝕜 : F ≃L[𝕜] F) : F →L[𝕜] F) ∘L f') x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[StarRing 𝕜]
[TrivialStar 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[StarAddMonoid F]
[NormedSpace 𝕜 F]
[StarModule 𝕜 F]
[ContinuousStar F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{L : Filter E}
(h : HasFDerivAtFilter f f' x L)

HasFDerivAtFilter (fun x => star (f x)) ((↑(starL' 𝕜)).comp f') x L


@[simp] theorem symm_apply_apply (e : X ≃ᵈ Y) (x : X) : e.symm (e x) = x

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(e : X ≃ᵈ Y)
(x : X)


@[simp]
theorem symm_symm (e : M ≃ₗ⁅R,L⁆ N) : e.symm.symm = e

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(e : M ≃ₗ⁅R,L⁆ N)


/-- An equality of subobjects gives an isomorphism of the corresponding objects. -/
@[simps]
def isoOfMkEq {B A : C} (f : A ⟶ B) [Mono f] (X : Subobject B) (h : mk f = X) : A ≅ (X : C)

{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.Subobject.isoOfMkEq f X h).inv = X.ofLEMk f ⋯


theorem isNoetherianRing (R S : Type*) [CommRing R] [CommRing S] [Algebra R S]
    [h : Algebra.FiniteType R S] [IsNoetherianRing R] : IsNoetherianRing S

(R : Type u_1)
(S : Type u_2)
[CommRing R]
[CommRing S]
[Algebra R S]
[h : Algebra.FiniteType R S]
[IsNoetherianRing R]


theorem range_inr : range (@Sum.inr α β) = {x | Sum.isRight x}

Set.range Sum.inr = {x | x.isRight = true}


lemma Module.support_eq_empty [Subsingleton M] :
    Module.support R M = ∅

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Subsingleton M]


@[simp]
theorem sSup_compact_eq_top : sSup { a : α | CompleteLattice.IsCompactElement a } = ⊤

{α : Type u_2}
[CompleteLattice α]
[IsCompactlyGenerated α]

sSup {a | CompleteLattice.IsCompactElement a} = ⊤


/-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A)

(k : Type u₁)
{G : Type u₂}
[Semiring k]
[Mul G]
{A : Type u₃}
[NonUnitalNonAssocSemiring A]
[Module k A]
[IsScalarTower k A A]
[SMulCommClass k A A]
(F : MonoidAlgebra k G →ₙₐ[k] A)

(MonoidAlgebra.liftMagma k).symm F = F.toMulHom.comp (MonoidAlgebra.ofMagma k G)


theorem toArrayLit_eq (as : Array α) (n : Nat) (hsz : as.size = n) : as = toArrayLit as n hsz

{α : Type u_1}
(n : Nat)
(as : Array α)
(i : Nat)
(h₁ : as.size = n)
(h₂ : i < n)


theorem pred_le_iff_eq_or_le : pred a ≤ b ↔ b = pred a ∨ a ≤ b

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}

Order.pred a ≤ b ↔ b = Order.pred a ∨ a ≤ b


@[simp]
theorem fromBlocks_apply₂₁ (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) (i : o) (j : l) : fromBlocks A B C D (Sum.inr i) (Sum.inl j) = C i j

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)
(i : o)
(j : l)

Matrix.fromBlocks A B C D (Sum.inr i) (Sum.inl j) = C i j


theorem toComplexMeasure_to_signedMeasure (c : ComplexMeasure α) :
    SignedMeasure.toComplexMeasure (ComplexMeasure.re c) (ComplexMeasure.im c) = c

{α : Type u_1}
{m : MeasurableSpace α}
(c : MeasureTheory.ComplexMeasure α)

(MeasureTheory.ComplexMeasure.re c).toComplexMeasure (MeasureTheory.ComplexMeasure.im c) = c


theorem mem_center_iff {R} [NonUnitalSemiring R] {z : R} : z ∈ center R ↔ ∀ g, g * z = z * g

{R : Type u_1}
[NonUnitalSemiring R]
{z : R}

z ∈ NonUnitalSubsemiring.center R ↔ ∀ (g : R), g * z = z * g


@[simp]
theorem frequently_const {f : Filter α} [NeBot f] {p : Prop} : (∃ᶠ _ in f, p) ↔ p

{α : Type u}
{f : Filter α}
[f.NeBot]
{p : Prop}


@[simp]
theorem Icc_eq_empty (h : ¬a ≤ b) : Icc a b = ∅

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


@[simp]
theorem subset_singleton_iff {α : Type*} {s : Set α} {x : α} : s ⊆ {x} ↔ ∀ y ∈ s, y = x


/-- A coproduct over an index type with exactly one term is just the object over that term. -/
@[simps!]
def coproductUniqueIso : ∐ f ≅ f default

{β : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
[Unique β]
(f : β → C)

(CategoryTheory.Limits.coproductUniqueIso f).hom =
  CategoryTheory.Limits.colimit.desc (CategoryTheory.Discrete.functor f)
    (CategoryTheory.Limits.colimitCoconeOfUnique f).cocone


@[simp]
theorem tensorRightHomEquiv_whiskerRight_comp_evaluation {X Y : C} [HasRightDual X] (f : Y ⟶ Xᘁ) :
    (tensorRightHomEquiv _ _ _ _) (f ▷ X ≫ ε_ X (Xᘁ)) = f ≫ (λ_ _).inv

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

(CategoryTheory.tensorRightHomEquiv Y X Xᘁ (𝟙_ C)) (f ▷ X ≫ ε_ X Xᘁ) = f ≫ (λ_ Xᘁ).inv


/-- The equalizer condition is preserved by natural isomorphism. -/
theorem equalizerCondition_of_natIso {P P' : Cᵒᵖ ⥤ D} (i : P ≅ P')
    (hP : EqualizerCondition P) : EqualizerCondition P'

(hP : CategoryTheory.regularTopology.EqualizerCondition P)


theorem covering_mem {p : α × Set α} (hp : p ∈ h.index) : h.covering p ∈ f p.1

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{v : VitaliFamily μ}
{f : α → Set (Set α)}
{s : Set α}
(h : v.FineSubfamilyOn f s)
{p : α × Set α}
(hp : p ∈ h.index)


/-- **Fundamental theorem of calculus-1**, local version for any measure.
Let filters `l` and `l'` be related by `TendstoIxxClass Ioc`.
If `f` has a finite limit `c` at `l ⊓ ae μ`, where `μ` is a measure
finite at `l`, then `∫ x in u..v, f x ∂μ = μ (Ioc u v) • c + o(μ(Ioc u v))` as both
`u` and `v` tend to `l` so that `u ≤ v`.

See also `measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le` for a version assuming
`[intervalIntegral.FTCFilter a l l']` and `[MeasureTheory.IsLocallyFiniteMeasure μ]`. If `l` is one
of `𝓝[≥] a`, `𝓝[≤] a`, `𝓝 a`, then it's easier to apply the non-primed version.  The primed version
also works, e.g., for `l = l' = Filter.atTop`. -/
theorem measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le' [IsMeasurablyGenerated l']
    [TendstoIxxClass Ioc l l'] (hfm : StronglyMeasurableAtFilter f l' μ)
    (hf : Tendsto f (l' ⊓ ae μ) (𝓝 c)) (hl : μ.FiniteAtFilter l') (hu : Tendsto u lt l)
    (hv : Tendsto v lt l) (huv : u ≤ᶠ[lt] v) :
    (fun t => (∫ x in u t..v t, f x ∂μ) - (μ (Ioc (u t) (v t))).toReal • c) =o[lt] fun t =>
      (μ <| Ioc (u t) (v t)).toReal

(hf : Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (𝓝 c))

(fun t => ∫ (x : ℝ) in u t..v t, f x ∂μ - (μ (Set.Ioc (u t) (v t))).toReal • c) =o[lt] fun t =>
  (μ (Set.Ioc (u t) (v t))).toReal


@[simp]
theorem lt_pure_iff : f < pure a ↔ f = ⊥


theorem HasFDerivWithinAt.const_cpow (hf : HasFDerivWithinAt f f' s x) (h0 : c ≠ 0 ∨ f x ≠ 0) :
    HasFDerivWithinAt (fun x => c ^ f x) ((c ^ f x * Complex.log c) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{f' : E →L[ℂ] ℂ}
{x : E}
{s : Set E}
{c : ℂ}
(hf : HasFDerivWithinAt f f' s x)
(h0 : c ≠ 0 ∨ f x ≠ 0)


/-- The linear span of the monomials `fourier n` is dense in `C(AddCircle T, ℂ)`. -/
theorem span_fourier_closure_eq_top : (span ℂ (range <| @fourier T)).topologicalClosure = ⊤

(Submodule.span ℂ (Set.range fourier)).topologicalClosure = ⊤


/-- If `M` is reflexive then a linear equivalence `N ≃ Dual R M` is a perfect pairing. -/
@[simps]
noncomputable def toPerfectPairing : PerfectPairing R N M

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[Module.IsReflexive R M]
(e : N ≃ₗ[R] Module.Dual R M)


/-- If each component of the counit is an epimorphism, then the right adjoint is faithful. -/
lemma faithful_R_of_epi_counit_app [∀ X, Epi (h.counit.app X)] : R.Faithful

[∀ (X : D), CategoryTheory.Epi (h.counit.app X)]


@[to_additive]
theorem isSimpleGroup_of_surjective {H : Type*} [Group H] [IsSimpleGroup G] [Nontrivial H]
    (f : G →* H) (hf : Function.Surjective f) : IsSimpleGroup H

{G : Type u_1}
[Group G]
{H : Type u_3}
[Group H]
[IsSimpleGroup G]
[Nontrivial H]
(f : G →* H)
(hf : Function.Surjective ⇑f)


protected theorem add {w x y z} : c w x → c y z → c (w + y) (x + z)

{R : Type u_2}
[Add R]
[Mul R]
(c : RingCon R)
{w x y z : R}


@[to_additive sum_le_sum]
lemma SublistForall₂.prod_le_prod' [Preorder M]
    [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] [CovariantClass M M (· * ·) (· ≤ ·)]
    {l₁ l₂ : List M} (h : SublistForall₂ (· ≤ ·) l₁ l₂) (h₁ : ∀ a ∈ l₂, (1 : M) ≤ a) :
    l₁.prod ≤ l₂.prod

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

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

(h : List.SublistForall₂ (fun x x_1 => x ≤ x_1) l₁ l₂)


/-- A category with countably many objects and morphisms. -/
class CountableCategory (J : Type*) [Category J] : Prop where
  countableObj : Countable J := by infer_instance
  countableHom : ∀ j j' : J, Countable (j ⟶ j') := by infer_instance

[self : CategoryTheory.CountableCategory J]


/-- Adjoining a single element is compact in the lattice of intermediate fields. -/
theorem adjoin_simple_isCompactElement (x : E) : IsCompactElement F⟮x⟯

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


/-- The number of roots of a real polynomial `p` is at most the number of roots of its derivative
that are not roots of `p` plus one. -/
theorem card_roots_toFinset_le_card_roots_derivative_diff_roots_succ (p : ℝ[X]) :
    p.roots.toFinset.card ≤ (p.derivative.roots.toFinset \ p.roots.toFinset).card + 1

p.roots.toFinset.card ≤ ((Polynomial.derivative p).roots.toFinset \ p.roots.toFinset).card + 1


theorem setIntegral_Ioi_zero_rpow (s : ℝ) : ∫ x in Ioi (0 : ℝ), x ^ s = 0


@[simp]
theorem coe_neLocus : ↑(f.neLocus g) = { x | f x ≠ g x }

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → Zero (N a)]
(f g : Π₀ (a : α), N a)


theorem ker_eq_bot_iff_range_eq_top_of_finrank_eq_finrank [FiniteDimensional K V]
    [FiniteDimensional K V₂] (H : finrank K V = finrank K V₂) {f : V →ₗ[K] V₂} :
    LinearMap.ker f = ⊥ ↔ LinearMap.range f = ⊤

(H : FiniteDimensional.finrank K V = FiniteDimensional.finrank K V₂)


/-- The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
See also `iteratedFDerivWithin_add_apply'`, which uses the spelling `(fun x ↦ f x + g x)`
instead of `f + g`. -/
theorem iteratedFDerivWithin_add_apply {f g : E → F} (hf : ContDiffOn 𝕜 i f s)
    (hg : ContDiffOn 𝕜 i g s) (hu : UniqueDiffOn 𝕜 s) (hx : x ∈ s) :
    iteratedFDerivWithin 𝕜 i (f + g) s x =
      iteratedFDerivWithin 𝕜 i f s x + iteratedFDerivWithin 𝕜 i g s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{x : E}
{i : ℕ}
{f g : E → F}
(hf : ContDiffOn 𝕜 (↑i) f s)
(hg : ContDiffOn 𝕜 (↑i) g s)
(hu : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)


theorem Complex.integral_rpow_mul_exp_neg_mul_rpow {p q b : ℝ} (hp : 1 ≤ p) (hq : - 2 < q)
    (hb : 0 < b) :
    ∫ x : ℂ, ‖x‖ ^ q * rexp (- b * ‖x‖ ^ p) = (2 * π / p) *
      b ^ (-(q + 2) / p) * Real.Gamma ((q + 2) / p)


theorem le_iff_bounds : I ≤ J ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper

{ι : Type u_1}
{I J : BoxIntegral.Box ι}


@[simp, mfld_simps]
theorem coe_mk (e : PartialHomeomorph Z (B × F)) (i j k l m) (x : Z) :
    (Trivialization.mk e i j k l m : Trivialization F proj) x = e x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : PartialHomeomorph Z (B × F))
(i : Set B)
(j : IsOpen i)
(k : e.source = proj ⁻¹' i)
(l : e.target = i ×ˢ Set.univ)
(m : ∀ p ∈ e.source, (↑e p).1 = proj p)
(x : Z)

↑{ toPartialHomeomorph := e, baseSet := i, open_baseSet := j, source_eq := k, target_eq := l, proj_toFun := m } x = ↑e x


theorem LinearMap.isClosed_range_coe : IsClosed (Set.range ((↑) : (M₁ →ₛₗ[σ] M₂) → M₁ → M₂))

(M₁ : Type u_1)
(M₂ : Type u_2)
{R : Type u_4}
{S : Type u_5}
[TopologicalSpace M₂]
[T2Space M₂]
[Semiring R]
[Semiring S]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module S M₂]
[ContinuousConstSMul S M₂]
[ContinuousAdd M₂]
(σ : R →+* S)


@[simp] lemma isSquare_zero [MulZeroClass α] : IsSquare (0 : α)


theorem subset_pair_iff : s ⊆ {a, b} ↔ ∀ x ∈ s, x = a ∨ x = b


theorem to_ofPNatMultiset (v : Multiset ℕ+) (h) : (ofPNatMultiset v h : Multiset ℕ+) = v

(v : Multiset ℕ+)
(h : ∀ p ∈ v, p.Prime)

(PrimeMultiset.ofPNatMultiset v h).toPNatMultiset = v


@[simp] theorem lex_inl_inl : Lex r s (inl a₁) (inl a₂) ↔ r a₁ a₂

∀ {α : Type u_1} {r : α → α → Prop} {β : Type u_2} {s : β → β → Prop} {a₁ a₂ : α},
  Sum.Lex r s (Sum.inl a₁) (Sum.inl a₂) ↔ r a₁ a₂


@[simp]
theorem sbtw_const_vsub_iff {x y z : P} (p : P) :
    Sbtw R (p -ᵥ x) (p -ᵥ y) (p -ᵥ z) ↔ Sbtw R x y z

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


theorem two_le_iff' (x : α) : (2 : Cardinal) ≤ #α ↔ ∃ y : α, y ≠ x


/-- Closed balls defined using the distance or the edistance coincide -/
@[simp]
theorem Metric.emetric_closedBall_nnreal {x : α} {ε : ℝ≥0} :
    EMetric.closedBall x ε = closedBall x ε

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ≥0}

EMetric.closedBall x ↑ε = Metric.closedBall x ↑ε


@[to_additive leftAddCoset_mem_leftAddCoset]
theorem leftCoset_mem_leftCoset {a : α} (ha : a ∈ s) : a • (s : Set α) = s

{α : Type u_1}
[Group α]
(s : Subgroup α)
{a : α}
(ha : a ∈ s)


@[reassoc (attr := simp)]
lemma i_mapZ :
    (data.factorizationData f).i ≫ data.mapZ φ = φ.left ≫ (data.factorizationData g).i

{W₁ W₂ : CategoryTheory.MorphismProperty C}

(data : W₁.FunctorialFactorizationData W₂)

(φ : CategoryTheory.Arrow.mk f ⟶ CategoryTheory.Arrow.mk g)

CategoryTheory.CategoryStruct.comp (data.factorizationData f).i (data.mapZ φ) =
  CategoryTheory.CategoryStruct.comp φ.left (data.factorizationData g).i


@[simp, reassoc]
theorem pullbackP1Iso_hom_fst (i : 𝒰.J) :
    (pullbackP1Iso 𝒰 f g i).hom ≫ pullback.fst _ _ = pullback.snd _ _

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

(AlgebraicGeometry.Scheme.Pullback.pullbackP1Iso 𝒰 f g i).hom ≫ CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g =
  CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.p1 𝒰 f g) (𝒰.map i)


/-- The restriction of a reflexive bilinear map `B` onto a submodule `W` is
nondegenerate if `W` has trivial intersection with its orthogonal complement,
that is `Disjoint W (W.orthogonalBilin B)`. -/
theorem nondegenerate_restrict_of_disjoint_orthogonal {B : M →ₗ[R] M →ₗ[R] M₁} (hB : B.IsRefl)
    {W : Submodule R M} (hW : Disjoint W (W.orthogonalBilin B)) :
    (B.domRestrict₁₂ W W).Nondegenerate

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₁]
[Module R M₁]
{B : M →ₗ[R] M →ₗ[R] M₁}
(hB : B.IsRefl)
{W : Submodule R M}
(hW : Disjoint W (W.orthogonalBilin B))


theorem LieEquiv.nilpotent_iff_equiv_nilpotent (e : L ≃ₗ⁅R⁆ L') :
    IsNilpotent R L ↔ IsNilpotent R L'

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(e : L ≃ₗ⁅R⁆ L')

LieAlgebra.IsNilpotent R L ↔ LieAlgebra.IsNilpotent R L'


@[to_additive]
lemma prod_fiberwise' [DecidableEq κ] (g : ι → κ) (f : κ → α) :
    ∏ j, ∏ _i : {i // g i = j}, f j = ∏ i, f (g i)

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[Fintype ι]
[Fintype κ]
[AddCommMonoid α]
[DecidableEq κ]
(g : ι → κ)
(f : κ → α)

∑ j : κ, ∑ _i : { i // g i = j }, f j = ∑ i : ι, f (g i)


theorem cos_eq_neg_one_iff {x : ℝ} : cos x = -1 ↔ ∃ k : ℤ, π + k * (2 * π) = x

Real.cos x = -1 ↔ ∃ k, Real.pi + ↑k * (2 * Real.pi) = x


@[simp]
theorem recTopCoe_ofNat {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) (x : ℕ) [x.AtLeastTwo] :
    @recTopCoe C d f (no_index (OfNat.ofNat x)) = f (OfNat.ofNat x)

{C : ℕ∞ → Sort u_1}
(d : C ⊤)
(f : (a : ℕ) → C ↑a)
(x : ℕ)
[x.AtLeastTwo]

ENat.recTopCoe d f (OfNat.ofNat x) = f (OfNat.ofNat x)


/-- The canonical `R`-linear inclusion `M → TrivSqZeroExt R M`. -/
@[simps apply]
def inrHom [Semiring R] [AddCommMonoid M] [Module R M] : M →ₗ[R] tsze R M

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

(TrivSqZeroExt.inrHom R M) m = TrivSqZeroExt.inr m


@[to_additive]
theorem iInter₂_mul_subset (s : ∀ i, κ i → Set α) (t : Set α) :
    (⋂ (i) (j), s i j) * t ⊆ ⋂ (i) (j), s i j * t

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

(⋂ i, ⋂ j, s i j) + t ⊆ ⋂ i, ⋂ j, s i j + t


@[simp]
theorem one_right_iff : IsPrimitiveRoot ζ 1 ↔ ζ = 1


@[to_additive]
theorem pow_eq_one_iff_modEq : x ^ n = 1 ↔ n ≡ 0 [MOD orderOf x]

{G : Type u_1}
[Monoid G]
{x : G}
{n : ℕ}


/-- The functor which sends a bicomplex to its associated graded object. -/
@[simps]
def toGradedObjectFunctor : HomologicalComplex₂ C c₁ c₂ ⥤ GradedObject (I₁ × I₂) C

∀ {X Y : HomologicalComplex₂ C c₁ c₂} (φ : X ⟶ Y) (i : I₁ × I₂),
  (HomologicalComplex₂.toGradedObjectFunctor C c₁ c₂).map φ i = HomologicalComplex₂.toGradedObjectMap φ i


@[to_additive (attr := simp)]
theorem toProd_comp_inr : (toProd : M ∗ N →* M × N).comp inr = .inr _ _

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

Monoid.Coprod.toProd.comp Monoid.Coprod.inr = MonoidHom.inr M N


protected theorem integrable_stoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingale f 𝒢 μ)
    {τ : Ω → ℕ} (hτ : IsStoppingTime 𝒢 τ) {N : ℕ} (hbdd : ∀ ω, τ ω ≤ N) :
    Integrable (stoppedValue f τ) μ

(hf : MeasureTheory.Submartingale f 𝒢 μ)

MeasureTheory.Integrable (MeasureTheory.stoppedValue f τ) μ


@[to_additive (attr := simp)]
lemma mulSupport_along_fiber_finite_of_finite (f : α × β → γ) (a : α) (h : (mulSupport f).Finite) :
    (mulSupport fun b ↦ f (a, b)).Finite

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[One γ]
(f : α × β → γ)
(a : α)
(h : (Function.mulSupport f).Finite)

(Function.mulSupport fun b => f (a, b)).Finite


@[simp]
theorem closure_addSubmonoid_closure {s : Set R} :
    closure ↑(AddSubmonoid.closure s) = closure s

{R : Type u}
[NonAssocSemiring R]
{s : Set R}

Subsemiring.closure ↑(AddSubmonoid.closure s) = Subsemiring.closure s


/-- **Integration by parts for Fréchet derivatives**
Version with two scalar functions: `∫ f * g' = - ∫ f' * g` when `f * g'` and `f' * g` and `f * g`
are integrable, where `f'` and `g'` are the derivatives of `f` and `g` in a given direction `v`. -/
theorem integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable
    {f : E → 𝕜} {g : E → 𝕜} {v : E}
    (hf'g : Integrable (fun x ↦ fderiv ℝ f x v * g x) μ)
    (hfg' : Integrable (fun x ↦ f x * fderiv ℝ g x v) μ)
    (hfg : Integrable (fun x ↦ f x * g x) μ)
    (hf : Differentiable ℝ f) (hg : Differentiable ℝ g) :
    ∫ x, f x * fderiv ℝ g x v ∂μ = - ∫ x, fderiv ℝ f x v * g x ∂μ

(hf'g : MeasureTheory.Integrable (fun x => (fderiv ℝ f x) v * g x) μ)

(hfg' : MeasureTheory.Integrable (fun x => f x * (fderiv ℝ g x) v) μ)

(hfg : MeasureTheory.Integrable (fun x => f x * g x) μ)

∫ (x : E), f x * (fderiv ℝ g x) v ∂μ = -∫ (x : E), (fderiv ℝ f x) v * g x ∂μ


theorem mono_num (hc : c ≤ c') (hf : ApproximatesLinearOn f f' s c) :
    ApproximatesLinearOn f f' s c'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{s : Set E}
{c c' : ℝ≥0}
(hc : c ≤ c')
(hf : ApproximatesLinearOn f f' s c)


theorem one_lt_card : 1 < s.card ↔ ∃ a ∈ s, ∃ b ∈ s, a ≠ b


theorem UInt16.le_antisymm {x y : UInt16} (h1 : x ≤ y) (h2 : y ≤ x) : x = y


theorem image_subset_preimage_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set α) :
    f '' s ⊆ g ⁻¹' s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{g : β → α}
(I : Function.LeftInverse g f)
(s : Set α)


/--
The family of elements given by `x : FirstObj P S` is compatible iff `firstMap` and `secondMap`
map it to the same point.
-/
theorem compatible_iff (x : FirstObj P R) :
    ((firstObjEqFamily P R).hom x).Compatible ↔ firstMap P R x = secondMap P R x

(P : CategoryTheory.Functor Cᵒᵖ (Type (max v u)))

(x : CategoryTheory.Equalizer.FirstObj P R)

((CategoryTheory.Equalizer.firstObjEqFamily P R).hom x).Compatible ↔
  CategoryTheory.Equalizer.Presieve.firstMap P R x = CategoryTheory.Equalizer.Presieve.secondMap P R x


@[simp]
theorem transpose_eq_ofNat [DecidableEq n] [AddMonoidWithOne α]
    {M : Matrix n n α} {d : ℕ} [d.AtLeastTwo] :
    Mᵀ = no_index (OfNat.ofNat d) ↔ M = OfNat.ofNat d

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[AddMonoidWithOne α]
{M : Matrix n n α}
{d : ℕ}
[d.AtLeastTwo]


/-- A version of the **Arzela-Ascoli theorem**.

Let `X, ι` be topological spaces, `𝔖` a covering of `X` by compact subsets, `α` a T2 uniform space,
`F : ι → (X → α)`, and `s` a subset of `ι`. Assume that:
* `F`, viewed as a function `ι → (X →ᵤ[𝔖] α)`, is a closed embedding (in other words, `ι`
  identifies to a closed subset of `X →ᵤ[𝔖] α` through `F`)
* `F '' s` is equicontinuous on each `K ∈ 𝔖`
* For all `x ∈ ⋃₀ 𝔖`, the image of `s` under `i ↦ F i x` is contained in some fixed compact subset.

Then `s` has compact closure in `ι`. -/
theorem ArzelaAscoli.isCompact_closure_of_closedEmbedding [TopologicalSpace ι] [T2Space α]
    {𝔖 : Set (Set X)} (𝔖_compact : ∀ K ∈ 𝔖, IsCompact K)
    (F_clemb : ClosedEmbedding (UniformOnFun.ofFun 𝔖 ∘ F))
    {s : Set ι} (s_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn (F ∘ ((↑) : s → ι)) K)
    (s_pointwiseCompact : ∀ K ∈ 𝔖, ∀ x ∈ K, ∃ Q, IsCompact Q ∧ ∀ i ∈ s, F i x ∈ Q) :
    IsCompact (closure s)

(F_clemb : ClosedEmbedding (⇑(UniformOnFun.ofFun 𝔖) ∘ F))

(s_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn (F ∘ Subtype.val) K)


theorem CondIndep.condIndepSets {s1 s2 : Set (Set Ω)}
    (h_indep : CondIndep m' (generateFrom s1) (generateFrom s2) hm' μ) :
    CondIndepSets m' hm' s1 s2 μ

(h_indep : ProbabilityTheory.CondIndep m' (MeasurableSpace.generateFrom s1) (MeasurableSpace.generateFrom s2) hm' μ)

ProbabilityTheory.CondIndepSets m' hm' s1 s2 μ


@[to_additive (attr := simp)] theorem MonoidHom.comp_id_commMonCat
    {G : CommMonCat.{u}} {H : Type u} [CommMonoid H] (f : G →* H) : f.comp (𝟙 G) = f

{G : CommMonCat}
{H : Type u}
[CommMonoid H]
(f : ↑G →* H)


theorem ae_restrict_iff'₀ {p : α → Prop} (hs : NullMeasurableSet s μ) :
    (∀ᵐ x ∂μ.restrict s, p x) ↔ ∀ᵐ x ∂μ, x ∈ s → p x

(hs : MeasureTheory.NullMeasurableSet s μ)

(∀ᵐ (x : α) ∂μ.restrict s, p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ s → p x


theorem pairwise_subtype_iff_pairwise_finset (r : α → α → Prop) :
    Pairwise (r on fun x : s => x) ↔ (s : Set α).Pairwise r

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

Pairwise (r on fun x => ↑x) ↔ (↑s).Pairwise r


@[simp]
theorem mem_map {f : F} {p : Submodule R M} {x : M₂} : x ∈ map f p ↔ ∃ y, y ∈ p ∧ f y = x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{f : F}
{p : Submodule R M}
{x : M₂}

x ∈ Submodule.map f p ↔ ∃ y ∈ p, f y = x


theorem liminf_eq_iSup_iInf_of_nat' {u : ℕ → α} : liminf u atTop = ⨆ n : ℕ, ⨅ i : ℕ, u (i + n)

{α : Type u_1}
[CompleteLattice α]
{u : ℕ → α}

Filter.liminf u Filter.atTop = ⨆ n, ⨅ i, u (i + n)


/-- Implementation of `CommMon_.equivLaxBraidedFunctorPunit`. -/
@[simps]
def commMonToLaxBraided : CommMon_ C ⥤ LaxBraidedFunctor (Discrete PUnit.{u + 1}) C

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

∀ {X Y : CommMon_ C} (f : X ⟶ Y) (x : CategoryTheory.Discrete PUnit.{u + 1}),
  ((CommMon_.EquivLaxBraidedFunctorPUnit.commMonToLaxBraided C).map f).app x = f.hom


theorem merge' {f g : α →. σ} (hf : Partrec f) (hg : Partrec g) :
    ∃ k : α →. σ,
      Partrec k ∧ ∀ a, (∀ x ∈ k a, x ∈ f a ∨ x ∈ g a) ∧ ((k a).Dom ↔ (f a).Dom ∨ (g a).Dom)

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f g : α →. σ}
(hf : Partrec f)
(hg : Partrec g)

∃ k, Partrec k ∧ ∀ (a : α), (∀ x ∈ k a, x ∈ f a ∨ x ∈ g a) ∧ ((k a).Dom ↔ (f a).Dom ∨ (g a).Dom)


theorem abs_im_pow_eventuallyLE_exp_re (hl : IsExpCmpFilter l) (n : ℕ) :
    (fun z : ℂ => |z.im| ^ n) ≤ᶠ[l] fun z => Real.exp z.re

{l : Filter ℂ}
(hl : Complex.IsExpCmpFilter l)
(n : ℕ)

(fun z => |z.im| ^ n) ≤ᶠ[l] fun z => Real.exp z.re


/-- The product in `CommRingCat` is the cartesian product. This is the binary fan. -/
@[simps! pt]
def prodFan : BinaryFan A B

(A.prodFan B).pt = CommRingCat.of (↑A × ↑B)


/-- If a measurable space has a finite measure `μ` and a countable group `G` acts
quasi-measure-preservingly, then to show that a set `s` is a fundamental domain, it is sufficient
to check that its translates `g • s` are (almost) disjoint and that the sum `∑' g, μ (g • s)` is
sufficiently large. -/
@[to_additive
  "If a measurable space has a finite measure `μ` and a countable additive group `G` acts
  quasi-measure-preservingly, then to show that a set `s` is a fundamental domain, it is sufficient
  to check that its translates `g +ᵥ s` are (almost) disjoint and that the sum `∑' g, μ (g +ᵥ s)` is
  sufficiently large."]
theorem mk_of_measure_univ_le [IsFiniteMeasure μ] [Countable G] (h_meas : NullMeasurableSet s μ)
    (h_ae_disjoint : ∀ g ≠ (1 : G), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • · : α → α) μ μ)
    (h_measure_univ_le : μ (univ : Set α) ≤ ∑' g : G, μ (g • s)) : IsFundamentalDomain G s μ

(h_meas : MeasureTheory.NullMeasurableSet s μ)

(h_ae_disjoint : ∀ (g : G), g ≠ 0 → MeasureTheory.AEDisjoint μ (g +ᵥ s) s)

(h_qmp : ∀ (g : G), MeasureTheory.Measure.QuasiMeasurePreserving (fun x => g +ᵥ x) μ μ)

(h_measure_univ_le : μ Set.univ ≤ ∑' (g : G), μ (g +ᵥ s))

MeasureTheory.IsAddFundamentalDomain G s μ


lemma factorsThru_of_le {X : C} (S T : Presieve X) (h : S ≤ T) :
    S.FactorsThru T

{C : Type u_2}
[CategoryTheory.Category.{u_1, u_2} C]
{X : C}
(S T : CategoryTheory.Presieve X)
(h : S ≤ T)


theorem ι_jointly_surjective (x : 𝖣.glued) : ∃ (i : D.J) (y : D.U i), (𝖣.ι i).1.base y = x


theorem orthogonalProjectionFn_norm_sq (v : E) :
    ‖v‖ * ‖v‖ =
      ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
        ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖

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


theorem IsBigOWith.prod_left (hf : IsBigOWith c l f' k') (hg : IsBigOWith c' l g' k') :
    IsBigOWith (max c c') l (fun x => (f' x, g' x)) k'

(hg : Asymptotics.IsBigOWith c' l g' k')

Asymptotics.IsBigOWith (max c c') l (fun x => (f' x, g' x)) k'


theorem ofReal_ne_one {z : ℝ} : (z : ℂ) ≠ 1 ↔ z ≠ 1

↑z ≠ 1 ↔ z ≠ 1